{"version":3,"sources":["serviceWorker.ts","models/CurrentPage.ts","Settings.ts","UriUtilities.ts","accessors/AccessorUtilities.ts","accessors/BrandingAccessor.ts","models/Gender.ts","redux/Validation/DemographicInformationReducer.ts","accessors/QuoteAccessor.ts","redux/AvailableStates/Actions.ts","accessors/NotificationAccessor.ts","redux/DemographicInformation/Actions.ts","models/Question.ts","accessors/CaseAccessor.ts","redux/InterviewQuestions/Utilities.ts","models/CaseResult.ts","models/NicotineType.ts","redux/Case/Actions.ts","redux/InterviewQuestions/Actions.ts","redux/CurrentPage/Actions.ts","redux/PersonalInformation/Actions.ts","models/State/CurrentPageState.ts","redux/CurrentPage/Utilities.ts","TrackingHelpers.ts","redux/CurrentPage/Reducer.ts","redux/ReducersUtilities.ts","redux/DemographicInformation/Reducer.ts","redux/BenefitAmount/Actions.ts","redux/BenefitAmount/Reducer.ts","redux/AvailableStates/Reducer.ts","redux/PersonalInformation/Reducer.ts","redux/BirthLocation/Actions.ts","redux/BirthLocation/Reducer.ts","redux/Payment/Actions.ts","redux/Payment/Reducer.ts","redux/Validation/SelectedAmountReducer.ts","redux/Validation/PersonalInformationReducer.ts","redux/Validation/PaymentReducer.ts","redux/Validation/Reducer.ts","redux/Case/Reducer.ts","redux/Brand/Actions.ts","redux/Brand/Reducer.ts","redux/InterviewQuestions/Reducer.ts","accessors/FormsAccessor.ts","redux/Documents/Actions.ts","redux/Documents/Reducer.ts","accessors/ApplicationAccessor.ts","redux/Policy/Actions.ts","redux/Policy/Reducer.ts","redux/AppReducer.ts","store.ts","components/Card/CardBody.tsx","components/Card/Card.tsx","components/NavigationButtons/NavigationButtons.tsx","pages/PageUtilities.ts","pages/DemographicInformation/Gender.tsx","pages/DemographicInformation/UseNicotineProducts.tsx","components/DateSelector/DateSelector.tsx","pages/DemographicInformation/DateOfBirth.tsx","pages/DemographicInformation/State.tsx","pages/BenefitAmount/BenefitSelection.tsx","pages/Terms/Terms.tsx","pages/Terms/FullTerms.tsx","pages/BenefitAmount/FullDetails.tsx","pages/PersonalInformation/UserIdentification.tsx","pages/PersonalInformation/Citizenship.tsx","pages/PersonalInformation/BirthLocation.tsx","pages/PersonalInformation/PermanentResident.tsx","pages/Status/Declined.tsx","pages/Status/FinalApproved.tsx","redux/Approved/Actions.ts","pages/Documents/SignDocuments.tsx","pages/PersonalInformation/Residence.tsx","pages/PersonalInformation/PhoneNumber.tsx","pages/PersonalInformation/SocialSecurityNumber.tsx","components/IntegerInput.tsx","pages/PersonalInformation/Body.tsx","pages/Payments/PaymentFields.tsx","pages/Payments/Payments.tsx","components/Loading/LoadingData.tsx","components/Progress/ProgressBar.tsx","pages/InterviewQuestions/BinaryQuestion.tsx","pages/InterviewQuestions/SearchQuestion.tsx","pages/InterviewQuestions/PrimaryQuestion.tsx","pages/InterviewQuestions/OptionsQuestion.tsx","pages/InterviewQuestions/TextQuestion.tsx","pages/InterviewQuestions/NumericQuestion.tsx","pages/InterviewQuestions/Question.tsx","components/Disclosure.tsx","components/PageTransition.tsx","pages/InterviewQuestions/Questions.tsx","pages/Status/TentativeApproved.tsx","pages/InterviewQuestions/CaseDecisionDetermination.tsx","pages/Status/SubmittingApplication.tsx","pages/PersonalInformation/NicotineDetails.tsx","pages/PersonalInformation/ExistingCoverage.tsx","pages/Status/TentativeSentToUnderwriting.tsx","pages/PersonalInformation/ComprehensiveHealthcare.tsx","App.tsx","index.tsx","components/Loading/bars.svg","images/FAQ.png"],"names":["Boolean","window","location","hostname","match","CurrentPage","getSettings","JSON","parse","document","getElementById","text","getBrandName","url","URL","href","brandName","searchParams","get","toLowerCase","endsWith","replace","undefined","getGender","gender","getUseNicotineProducts","nicotine","getDateOfBirth","dob","getState","state","getEmail","email","getReferrer","referrer","getPartnerSubdomain","partnerSubdomain","processRequest","_ref","Object","asyncToGenerator","regenerator_default","a","mark","_callee","input","init","response","wrap","_context","prev","next","fetch","sent","t0","abrupt","status","stop","_x","_x2","apply","this","arguments","screenFlowUrl","getPageOrder","_getPageOrder","settings","fetchResult","result","apiHost","append","apiKey","json","page","State","isRequired","Gender","NicotineProducts","DateOfBirth","BenefitSelection","Terms","UserIdentification","Citizenship","Birthstate","PermanentStatus","Residence","Phone","SocialSecurityNumber","NicotineDetails","Body","ExistingCoverage","ComprehensiveHealthcare","InterviewQuestions","CaseDecisionDetermination","TentativeApproved","TentativeSentToUnderwriting","Payment","SignDocuments","SubmittingApplication","FinalApproved","linksUrl","defaultLinks","headerImage","homepage","getLinks","_getLinks","_callee2","retrievedLinks","_context2","forEach","key","value","assign","isDateOfBirthValid","currState","demographicInformation","dateOfBirth","moment","toDate","subtract","isValid","isGenderValid","isNicotineProductsValid","useNicotineProducts","isStateValid","availableStates","some","isStateAvailable","isAvailable","demographicInformationReducer","fields","dateOfBirthValidation","overall","availableStatesUrl","availableBirthCountriesUrl","availableBenefitAmountsUrl","getQuestionsUrl","getSearchOptionsUrl","answerQuestionUrl","getFollowUpQuestionUrl","getAvailableStates","_getAvailableStates","getBirthCountries","_getBirthCountries","getAvailableBenefitAmounts","_x3","_x4","_x5","_x6","_x7","_getAvailableBenefitAmounts","_callee3","usesNicotineProducts","_context3","Female","format","getQuestions","_x8","_getQuestions","_callee4","caseId","results","_context4","hasSavedAnswer","getSearchOptions","_x9","_x10","_x11","_getSearchOptions","_callee5","category","_context5","answerQuestion","_x12","_x13","_answerQuestion","_callee6","question","body","_context6","case","buildQuestionAnswerRequest","method","stringify","selectedValue","options","find","answer","followUpId","id","subQuestions","map","followUpQuestion","pickList","getFollowUpQuestions","_x14","_x15","_x16","_getFollowUpQuestions","_callee7","baseQuestionId","serverResult","_context7","length","fixFollowUpQuestionFromServer","questionWithoutFollowUp","_result","objectSpread","objectWithoutProperties","_result2","fixFollowUpOptionsFromServer","FETCH_AVAILABLESTATES","RETRIEVED_AVAILABLESTATES","loadAvailableStates","dispatch","states","isLoadingAvailableStates","type","payload","sendNotAvailableInStateEmailUrl","sendApplicationConfirmationEmailUrl","sendApplicationUnderwritingEmailUrl","sendNotAvailableInStateEmail","_sendNotAvailableInStateEmail","applicantFirstName","applicantLastName","applicantEmail","applicantName","concat","sendApplicationConfirmationEmail","_sendApplicationConfirmationEmail","policyId","sendApplicationUnderwritingEmail","_sendApplicationUnderwritingEmail","UPDATE_DATEOFBIRTH","UPDATE_GENDER","UPDATE_USENICOTINEPRODUCTS","UPDATE_STATE","UPDATE_REFERRER","UPDATE_PARTNERSUBDOMAIN","UPDATE_EMAIL","updateDateOfBirthAction","updateGenderAction","updateUseNicotineProductsAction","updateStateAction","updateReferrerAction","updatePartnerSubdomainAction","updateEmailAction","QuestionType","createCaseUrl","getcasedecisionUrl","createCase","_createCase","caseRequest","post","toString","benefitAmount","streetAddress","city","zip","firstName","lastName","heightFeet","heightInches","weightPounds","birthState","birthCountry","phoneNumber","socialSecurityNumber","SSN","isCitizen","tobaccoUses","tobaccoType","tobaccoDailyUseCount","tobaccoMonthlyUseCount","tobaccoLastUseDate","quotedUsesTobacco","isPermanentResident","greenCard","hasExistingCoverage","hasComprehensiveHealthcare","code","catch","error","console","getCaseResult","_getCaseResult","applicationAlreadySubmitted","String","caseResult","data","_args3","mode","cache","credentials","headers","Content-Type","redirect","then","CaseResult","getCurrentQuestion","interviewQuestions","questions","currentPage","currentQuestionIndex","areQuestionAnswersSaving","isQuestionAnswerSaving","areQuestionsFetchingFollowUps","isFetchingFollowUpQuestions","followUpQuestionRetrieved","isQuestionComplete","PrimaryQuestion","every","NicotineType","CREATE_CASE","RETRIEVED_CASE","UPDATE_CASERESULT","receivedCreateCaseAction","setCaseResultAction","validateCaseResultAction","_ref2","setTimeout","applicationSubmitted","Processing","FETCH_QUESTIONS","RETRIEVED_QUESTIONS","ANSWER_QUESTION","ANSWER_PICKLISTQUESTION","UPDATE_QUESTIONOPTIONS","SET_FOLLOWUPQUESTION","SET_FOLLOWUPQUESTIONPICKLIST","SET_HASSAVEDANSWER","STORE_FOLLOWUPQUESTION","retrievedQuestionsAction","answerQuestionAction","answerPickListQuestionAction","setFollowUpQuestionAction","storeFollowUpQuestionAction","updateQuestionOptionsAction","setFollowUpQuestionPicklistAction","questionId","pickListId","submitQuestionAnswerAction","_ref3","currQuestion","findQuestion","isFollowUp","processFollowUpQuestionAnswer","processBaseQuestionAnswer","saveQuestionAnswerAction","_ref5","_ref6","processFollowUpQuestion","_x17","_ref7","currFollowUpQuestion","nextFollowUpQuestion","flatFollowUpQuestionCache","findMatchingSelectedValue","canSetValue","option","convertFollowUpQuestion","_x18","_x19","_x20","_x21","_x22","allQuestions","findSubQuestion","Text","Numeric","intAnswer","parseInt","i","currOption","foundOption","_callee10","followUp","retrievedFollowUps","_context10","followUpQuestionCache","NEXT","PREVIOUS","DETAILS","FULL_DETAILS","FULL_TERMS","HIDE_STATEUNAVAILABLEMODAL","APPROVED","DECLINED","FETCH_PAGEORDER","RECEIVED_PAGEORDER","UPDATE_CURRENTQUESTION","declinedPageAction","nextPageAction","parseDateOfBirth","dobMoment","parseGender","Male","parseUseNicotine","receivedPageOrderAction","pageOrder","useTobacco","LastPageMovement","UPDATE_USERDIDACCEPTTERMS","UPDATE_USERSFIRSTNAME","UPDATE_USERSLASTNAME","UPDATE_EMAILADDRESS","UPDATE_STREETADDRESS","UPDATE_STREETADDRESS2","UPDATE_CITY","UPDATE_ZIP","UPDATE_ISCITIZEN","UPDATE_HASEXISTINGCOVERAGE","UPDATE_HASCOMPREHENSIVEHEALTHCARE","UPDATE_ISPERMANENTRESIDENT","UPDATE_GREENCARD","UPDATE_BIRTHCOUNTRY","UPDATE_BIRTHSTATE","UPDATE_PHONENUMBER","UPDATE_SOCIALSECURITYNUMBER","UPDATE_TOBACCOUSES","UPDATE_TOBACCOTYPE","UPDATE_TOBACCODAILYUSECOUNT","UPDATE_TOBACCOMONTHLYUSECOUNT","UPDATE_TOBACCOLASTUSEDATE","UPDATE_HEIGHTFEET","UPDATE_HEIGHTINCHES","UPDATE_WEIGHT","currentState","personalInformationPages","initializeApplicationInsights","browserHistory","createBrowserHistory","basename","aiInstrumentationKey","normalizeSetting","reactPlugin","ReactPlugin","ApplicationInsights","config","instrumentationKey","extensions","extensionConfig","defineProperty","identifier","history","loadAppInsights","recordPageView","currentQuestion","ReactGA","pageview","startsWith","nonWorkflowPages","SeeDetails","FullTerms","FullDetails","nextPageReducer","previousPages","push","nextPage","getNextPage","lastPageMovement","Forward","setupPageProps","canContinue","action","label","questionIndex","validation","nextQuestion","hasQuestionsLoaded","movedPast","getNextQuestion","findNextPage","Declined","SentToUnderwriting","policy","policyNumber","gaKey","event","Error","currentPageIndex","findIndex","nextPageInOrder","displayStateIsUnavailable","previousPageReducer","getPreviousPage","Backward","canGoBack","previousPage","getPreviousQuestion","findPreviousPage","includes","pop","prevPageInOrder","detailsPageReducer","Actions","fullDetailsPageReducer","fullTermsPageReducer","approvedPageReducer","declinedPageReducer","updateIsCitizenReducer","PersonalInformationActions","permanentStatusPageIndex","items","toConsumableArray","item","updateStateReducer","DemographicInformationActions","comprehensiveHealthcarePageIndex","fetchPageOrderReducer","isLoadingPageOrderData","hideStateUnavailableModalReducer","receivedPageOrderReducer","updateCurrentQuestionReducer","index","setCurrentPageState","appState","setCanNavigateState","progress","getProgress","totalCount","completedCount","currentPageFound","b","getPotentialPreviousPage","selectedAmount","isSelectedAmountValid","personalInformation","userDidAcceptTerms","isBirthLocationValid","isHeightFeetValid","isHeightInchesValid","isWeightValid","isCitizenValid","isHasExistingCoverageValid","isHasComprehensiveHealthcareValid","isPermanentResidentValid","isGreenCardValid","isPhoneNumberValid","isStreetAddressValid","isCityValid","isZipValid","isSocialSecurityNumberValid","isTobaccoUsesValid","isTobaccoTypeValid","isTobaccoUseCountValid","tobaccoLastUseDateValidation","isUsersFirstNameValid","isUsersLastNameValid","isEmailAddressValid","payment","isPaymentInformationValid","isPaymentTokenValid","isCurrentQuestionComplete","createReducer","initialState","handlers","hasOwnProperty","_createReducer","trim","SELECT_BENEFITAMOUNT","FETCH_AVAILABLEBENEFITAMOUNTS","RETRIEVED_AVAILABLEBENEFITAMOUNTS","retrievedAvailableBenefitAmountsAction","availableBenefitAmounts","updateKeyDemographicsReducer","availableAmounts","isLoadingAvailableAmounts","Reducer_createReducer","currSelectedAmount","isRecommended","AvailableStates_Reducer_createReducer","updateCitizenshipData","PersonalInformation_Reducer_createReducer","usersFirstName","usersLastName","emailAddress","streetAddress2","substr","feet","inches","pounds","FETCH_AVAILABLECOUNTRIES","RETRIEVED_AVAILABLECOUNTRIES","isLoadingAvailableCountries","BirthLocation_Reducer_createReducer","availableCountries","UPDATE_CARDFIELDS","FETCH_TOKEN","RETRIEVED_TOKEN","isRetrievingToken","Payment_Reducer_createReducer","tokenResponse","token","paymentError","message","card","cardType","brand","stripeElementData","elementChangeResponse","isStringEmpty","EmailValidator","isCitizenshipValid","isGreenCardRequired","birthLocation","matchingCountry","test","Smokeless","Nicotine_Patches_Gum_Other","isTobaccoLastUseDateValid","personalInformationReducer","hasPaymentToken","complete","empty","Validation_Reducer","paymentReducer","isLoadingCaseResponse","Case_Reducer_createReducer","FETCH_BRANDLINKS","RECEIVED_BRANDLINKS","receivedBrandLinksAction","links","isLoadingLinks","Brand_Reducer_createReducer","setFlatFollowUpQuestionCache","updateQuestionSet","values","updateQuestion","updatePickListQuestion","pickListOption","isRetrievingQuestions","isSavingAnswers","isFetchingFollowUps","InterviewQuestions_Reducer_createReducer","questionSet","updatedState","flatCache","pickListOptionIndex","clonedPickList","getSigningUrl","brandUrl","origin","FETCH_URL","RETRIEVED_URL","isLoadingSigningUrl","Documents_Reducer_createReducer","signingUrl","envelopeId","submitApplicationUrl","submitApplication","_submitApplication","applicationRequest","paymentId","_args2","SUBMIT_APPLICATION","RECEIVED_APPLICATION","receivedApplicationAction","applicationResult","isLoadingApplication","Policy_Reducer_createReducer","combinedReducers","combineReducers","benefitAmountReducer","availableStatesReducer","birthLocationReducer","interviewQuestionsReducer","caseReducer","documentReducer","brandReducer","policyReducer","win","enhancers","compose","applyMiddleware","thunkMiddleware","devToolsExtension","f","store","createStore","validatedState","validationReducer","crossStateReducer","CardBody","children","props","react_default","createElement","className","Component","Card","title","Card_CardBody","NavigationButtonsComponent","_React$Component","_getPrototypeOf2","_this","classCallCheck","_len","args","Array","_key","possibleConstructorReturn","getPrototypeOf","call","continue","goBack","inherits","createClass","onClick","disabled","showProcessing","alt","src","bars","React","connect","setupApplicationInsightsPageTracking","reactComponent","applicationInsightsInit","withAITracking","formatNumber","x","GenderComponent","setGenderFemale","e","target","checked","updateGender","setGenderMale","scrollTo","femaleClassName","maleClassName","Fragment","components_Card_Card","htmlFor","data-toggle","name","autoComplete","onChange","NavigationButtons","UsesNicotineProductComponent","setUsesNicotineProducts","updateUsesNicotineProducts","setDoesntUseNicotineProducts","yesClassName","noClassName","DateSelector","updateDate","formatDate","dateHasCompleted","date","dateCallback","setState","cursor","selectionStart","charAt","defaultValue","slice","dateFormatted","dateCursorLocation","createRef","current","selectionEnd","ref","maxLength","bind","placeholder","min","max","dateValidation","DateOfBirthComponent","updateDateOfBirth","components_DateSelector_DateSelector","StateComponent","componentDidMount","updateState","selectedOption","selectedOptions","hideUnavailableModal","sendUnavailableNotification","modalFirstName","modalLastName","modalEmail","setModalFirstName","setModalLastName","setModalEmail","modalCanContinue","displayModal","Modal_default","show","onHide","Header","closeButton","required","Footer","sendUnavailableStateNotificationAction","BenefitSelectionComponent","seeFullDetails","toggleModal","modalDisplayed","updateSelectedBenefitAmount","seeDetails","benefitAmountClicked","activeTab","loadBenefitAmounts","_this2","recommended","highlighted","filter","isHighlighted","dropdownIems","cost","toFixed","BenefitSelection_BenefitButton","benefitAmountFormatted","isSelected","selectedBenefitAmount","size","BenefitButton","_this3","acceptTerms","didAcceptTerms","seeFullTerms","getPdfName","download","UserIdentificationComponent","_React$Component2","_getPrototypeOf3","_len3","_key3","updateUsersFirstName","updateUsersLastName","updateEmailAddress","CitizenshipComponent","setIsCitizen","updateIsCitizen","setIsNotCitizen","BirthLocationComponent","updateBirthCountry","updateBirthState","loadAvailableCountries","selectedState","selectedCountry","matchingBirthCountry","countries","country","PermanentResidentComponent","setIsPermanentResident","updateIsPermanentResident","setIsNotPermanentResident","updateGreenCard","getHomepageAddress","sendConfirmationEmail","isFinalApproved","Approved","loadFrame","iFrame","contentWindow","declined","fetchUrlAction","onLoad","updateStreetAddress","updateStreetAddress2","updateCity","updateZip","updatePhoneNumber","SocialSecurityNumberComponent","updateSocialSecurityNumber","IntegerInput","handleKeyPress","isNaN","Number","stopPropagation","preventDefault","onKeyPress","BodyComponent","updateHeightFeet","updateHeightInches","updateWeight","IntegerInput_IntegerInput","weight","PaymentsComponent","updateCardFields","submitCreditCard","stripe","react_stripe_elements_es","canSubmit","injectStripe","stripeProps","createToken","submitCreditCardAction","stripeApiKey","PaymentFields","LoadingData","heading","subheading","defaultProps","ProgressBarComponent","style","width","role","aria-valuenow","aria-valuemin","aria-valuemax","BinaryQuestionComponent","setFirstValue","setSecondValue","firstClassName","secondClassName","SearchQuestionComponent","search","actionMeta","searchCategoryId","searchQuestionAnswers","changeValue","react_select_browser_esm","isMulti","onInputChange","searchQuestionOptionsAction","PrimaryQuestionComponent","answerAllNo","answers","answerQuestions","answerSubQuestion","questionAnswer","PrimaryQuestion_SubQuestion","SubQuestion","checkboxId","_ref8","_callee9","updates","_context9","followUpPromise","_ref9","_callee8","_context8","t1","t2","t3","t4","_x25","_x23","_x24","submitQuestionAnswersAction","OptionsQuestionComponent","evt","NumericQuestionComponent","QuestionComponent","getQuestionTypeComponent","BinaryChoice","BinaryQuestion","Search","SearchQuestion","Options","OptionsQuestion","TextQuestion","NumericQuestion","subHeadingHtml","dangerouslySetInnerHTML","__html","Question_PickListComponent","setAnswer","Question_FollowUpQuestionComponent","isSubQuestion","FollowUpQuestionComponent","Question_QuestionComponent","_ref4","t5","setPickListAnswerAction","PickListComponent","Question_PickListOptionComponent","PickListOptionComponent","inputId","Disclosure","PageTransition","CSSTransition","in","classNames","timeout","mountOnEnter","unmountOnExit","position","top","left","right","includeDisclosure","Disclosure_Disclosure","QuestionsComponent","loadQuestions","PageTransition_PageTransition","Question","isEligible","CaseDecisionDeterminationComponent","validateCaseResult","hasResult","SubmittingApplicationComponent","NicotineDetailsComponent","setTobaccoUsesTrue","updateTobaccoUses","setTobaccoUsesFalse","updateTobaccoType","stringVal","val","updateFrequency","Cigarettes","Ecigarettes","updateTobaccoDailyUseCount","updateTobaccoMonthlyUseCount","Pipe","Cigar","updateLastUse","updateTobaccoLastUseDate","tobaccoDemographic","trueClassName","usesTobacco","falseClassName","frequencyType","tobaccoTypeValue","tobaccoLastUseDateValidationMessage","ExistingCoverageComponent","setHasExistingCoverage","updateHasExistingCoverage","setDoesNotHaveExistingCoverage","ComprehensiveHealthcareComponent","setHasComprehensiveHealthcare","updateHasComprehensiveHealthcare","setDoesNotHaveComprehensiveHealthcare","AppInternal","getBody","DemographicInformation_Gender","UseNicotineProducts","BirthLocation","pages_Terms_Terms","Terms_FullTerms","PermanentResident","PhoneNumber","BenefitAmount_FullDetails","Questions","Payments","Status_FinalApproved","Status_Declined","Documents_SignDocuments","Status_TentativeApproved","Status_TentativeSentToUnderwriting","getBodyWidthClassName","getHeaderImageSource","loadLinks","loadPageOrderData","bodyContainerClass","height","FAQLogo","hasProgressBar","ProgressBar","bodyCard","loading","Loading_LoadingData","App_FaqIFrame","FaqIFrame","borderRadius","frameBorder","_gender","_state","appStateClone","validationData","getStateFromUri","getEmailFromUri","getReferrerFromUri","getPartnerSubdomainFromUri","toUpperCase","initialize","subscribe","previousState","initializeGoogleAnalytics","styleSheetLink","rel","media","head","appendChild","ReactDOM","render","es","src_App","navigator","serviceWorker","ready","registration","unregister","module","exports","__webpack_require__","p"],"mappings":"yLAYoBA,QACW,cAA7BC,OAAOC,SAASC,UAEe,UAA7BF,OAAOC,SAASC,UAEhBF,OAAOC,SAASC,SAASC,MACvB,+DClBDC,gpCA+BUA,iDCvBR,SAASC,IACZ,OAAOC,KAAKC,MACPC,SAASC,eAAe,eAAqCC,MCV/D,SAASC,IACZ,IAAIC,EAAM,IAAIC,IAAIb,OAAOC,SAASa,MAC9B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AmBkjC,WACrBA,UAAUC,cAAcC,MAAMpxB,KAAK,SAAAqxB,GACjCA,EAAaC,mCoG3InBC,EAAAC,QAAiBC,EAAAC,EAAuB,mDCAxCH,EAAAC,QAAA","file":"static/js/main.3ded801c.chunk.js","sourcesContent":["// This optional code is used to register a service worker.\r\n// register() is not called by default.\r\n\r\n// This lets the app load faster on subsequent visits in production, and gives\r\n// it offline capabilities. However, it also means that developers (and users)\r\n// will only see deployed updates on subsequent visits to a page, after all the\r\n// existing tabs open on the page have been closed, since previously cached\r\n// resources are updated in the background.\r\n\r\n// To learn more about the benefits of this model and instructions on how to\r\n// opt-in, read https://bit.ly/CRA-PWA\r\n\r\nconst isLocalhost = Boolean(\r\n window.location.hostname === 'localhost' ||\r\n // [::1] is the IPv6 localhost address.\r\n window.location.hostname === '[::1]' ||\r\n // 127.0.0.1/8 is considered localhost for IPv4.\r\n window.location.hostname.match(\r\n /^127(?:\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/\r\n )\r\n);\r\n\r\ntype Config = {\r\n onSuccess?: (registration: ServiceWorkerRegistration) => void;\r\n onUpdate?: (registration: ServiceWorkerRegistration) => void;\r\n};\r\n\r\nexport function register(config?: Config) {\r\n if (process.env.NODE_ENV === 'production' && 'serviceWorker' in navigator) {\r\n // The URL constructor is available in all browsers that support SW.\r\n const publicUrl = new URL(\r\n (process as { env: { [key: string]: string } }).env.PUBLIC_URL,\r\n window.location.href\r\n );\r\n if (publicUrl.origin !== window.location.origin) {\r\n // Our service worker won't work if PUBLIC_URL is on a different origin\r\n // from what our page is served on. This might happen if a CDN is used to\r\n // serve assets; see https://github.com/facebook/create-react-app/issues/2374\r\n return;\r\n }\r\n\r\n window.addEventListener('load', () => {\r\n const swUrl = `${process.env.PUBLIC_URL}/service-worker.js`;\r\n\r\n if (isLocalhost) {\r\n // This is running on localhost. Let's check if a service worker still exists or not.\r\n checkValidServiceWorker(swUrl, config);\r\n\r\n // Add some additional logging to localhost, pointing developers to the\r\n // service worker/PWA documentation.\r\n navigator.serviceWorker.ready.then(() => {\r\n console.log(\r\n 'This web app is being served cache-first by a service ' +\r\n 'worker. To learn more, visit https://bit.ly/CRA-PWA'\r\n );\r\n });\r\n } else {\r\n // Is not localhost. Just register service worker\r\n registerValidSW(swUrl, config);\r\n }\r\n });\r\n }\r\n}\r\n\r\nfunction registerValidSW(swUrl: string, config?: Config) {\r\n navigator.serviceWorker\r\n .register(swUrl)\r\n .then(registration => {\r\n registration.onupdatefound = () => {\r\n const installingWorker = registration.installing;\r\n if (installingWorker == null) {\r\n return;\r\n }\r\n installingWorker.onstatechange = () => {\r\n if (installingWorker.state === 'installed') {\r\n if (navigator.serviceWorker.controller) {\r\n // At this point, the updated precached content has been fetched,\r\n // but the previous service worker will still serve the older\r\n // content until all client tabs are closed.\r\n console.log(\r\n 'New content is available and will be used when all ' +\r\n 'tabs for this page are closed. See https://bit.ly/CRA-PWA.'\r\n );\r\n\r\n // Execute callback\r\n if (config && config.onUpdate) {\r\n config.onUpdate(registration);\r\n }\r\n } else {\r\n // At this point, everything has been precached.\r\n // It's the perfect time to display a\r\n // \"Content is cached for offline use.\" message.\r\n console.log('Content is cached for offline use.');\r\n\r\n // Execute callback\r\n if (config && config.onSuccess) {\r\n config.onSuccess(registration);\r\n }\r\n }\r\n }\r\n };\r\n };\r\n })\r\n .catch(error => {\r\n console.error('Error during service worker registration:', error);\r\n });\r\n}\r\n\r\nfunction checkValidServiceWorker(swUrl: string, config?: Config) {\r\n // Check if the service worker can be found. If it can't reload the page.\r\n fetch(swUrl)\r\n .then(response => {\r\n // Ensure service worker exists, and that we really are getting a JS file.\r\n const contentType = response.headers.get('content-type');\r\n if (\r\n response.status === 404 ||\r\n (contentType != null && contentType.indexOf('javascript') === -1)\r\n ) {\r\n // No service worker found. Probably a different app. Reload the page.\r\n navigator.serviceWorker.ready.then(registration => {\r\n registration.unregister().then(() => {\r\n window.location.reload();\r\n });\r\n });\r\n } else {\r\n // Service worker found. Proceed as normal.\r\n registerValidSW(swUrl, config);\r\n }\r\n })\r\n .catch(() => {\r\n console.log(\r\n 'No internet connection found. App is running in offline mode.'\r\n );\r\n });\r\n}\r\n\r\nexport function unregister() {\r\n if ('serviceWorker' in navigator) {\r\n navigator.serviceWorker.ready.then(registration => {\r\n registration.unregister();\r\n });\r\n }\r\n}\r\n","enum CurrentPage {\r\n Gender = 1,\r\n NicotineProducts = 2,\r\n DateOfBirth = 3,\r\n State = 4,\r\n BenefitSelection = 5,\r\n Terms = 6,\r\n FullTerms = 7,\r\n UserIdentification = 8,\r\n Citizenship = 9,\r\n Birthstate = 10,\r\n PermanentStatus = 11,\r\n Residence = 12,\r\n Phone = 13,\r\n SocialSecurityNumber = 14,\r\n Body = 15,\r\n SeeDetails = 16,\r\n FullDetails = 17,\r\n InterviewQuestions = 18,\r\n SignDocuments = 19,\r\n CaseDecisionDetermination = 20,\r\n TentativeApproved = 21, \r\n SubmittingApplication = 22,\r\n NicotineDetails = 23,\r\n ExistingCoverage = 24,\r\n ComprehensiveHealthcare = 25,\r\n TentativeSentToUnderwriting = 26, \r\n Payment = 500,\r\n Declined = 990,\r\n FinalApproved = 999\r\n}\r\nexport default CurrentPage;","export interface ISettings{\r\n apiHost: string;\r\n aiInstrumentationKey: string;\r\n gaKey: string;\r\n apiKey: string;\r\n stripeApiKey: string;\r\n}\r\n\r\nexport function getSettings(): ISettings {\r\n return JSON.parse(\r\n (document.getElementById('appSettings') as HTMLScriptElement).text\r\n );\r\n}","export function getBrandName(): string | undefined {\r\n var url = new URL(window.location.href);\r\n let brandName = url.searchParams.get('brandName');\r\n if (brandName === null) {\r\n let hostname = url.hostname;\r\n if (hostname.toLowerCase().endsWith('.prepareinsure.com')) {\r\n brandName = hostname.replace(/\\.prepareinsure\\.com$/i, '');\r\n }\r\n }\r\n return brandName ? brandName : undefined;\r\n}\r\n\r\nexport function getGender(): string | undefined {\r\n var url = new URL(window.location.href);\r\n let gender = url.searchParams.get('gender');\r\n return gender ? gender : undefined;\r\n}\r\n\r\nexport function getUseNicotineProducts(): string | undefined {\r\n var url = new URL(window.location.href);\r\n let nicotine = url.searchParams.get('nicotine');\r\n return nicotine ? nicotine : undefined;\r\n}\r\n\r\nexport function getDateOfBirth(): string | undefined {\r\n var url = new URL(window.location.href);\r\n let dob = url.searchParams.get('dob');\r\n return dob ? dob : undefined;\r\n}\r\n\r\nexport function getState(): string | undefined {\r\n var url = new URL(window.location.href);\r\n let state = url.searchParams.get('state');\r\n return state ? state : undefined;\r\n}\r\n\r\nexport function getEmail(): string | undefined {\r\n var url = new URL(window.location.href);\r\n let email = url.searchParams.get('email');\r\n return email ? email : undefined;\r\n}\r\n\r\nexport function getReferrer(): string {\r\n var url = new URL(window.location.href);\r\n let referrer = url.searchParams.get('referrer');\r\n return referrer ? referrer : '';\r\n}\r\n\r\nexport function getPartnerSubdomain(): string {\r\n var url = new URL(window.location.href);\r\n let partnerSubdomain = url.searchParams.get('partner_subdomain');\r\n return partnerSubdomain ? partnerSubdomain : '';\r\n}","export const processRequest = async (input: RequestInfo, init?: RequestInit): Promise => {\r\n let response: Response | undefined;\r\n try {\r\n response = await fetch(input, init);\r\n } catch (e) {\r\n window.location.href = \"/Error.html\";\r\n return undefined as any;\r\n }\r\n if (response === undefined || response.status < 200 || response.status >= 300) {\r\n window.location.href = \"/Error.html\";\r\n return undefined as any;\r\n }\r\n return response;\r\n}","import { getSettings } from \"../Settings\";\r\nimport CurrentPage from \"../models/CurrentPage\";\r\nimport PageOrderData from \"../models/PageOrderData\";\r\nimport { getBrandName } from \"../UriUtilities\";\r\nimport { Dictionary } from \"../models/State/BrandState\";\r\nimport { processRequest } from \"./AccessorUtilities\";\r\n\r\nconst screenFlowUrl: string = \"/api/branding/screenflow.json\";\r\n\r\nexport async function getPageOrder(): Promise {\r\n let brandName = getBrandName();\r\n if (brandName !== undefined) {\r\n let settings = getSettings(); \r\n var url = new URL(screenFlowUrl, settings.apiHost);\r\n url.searchParams.append(\"brandName\", brandName);\r\n url.searchParams.append(\"code\", settings.apiKey);\r\n\r\n let fetchResult = await processRequest(url.href);\r\n\r\n let result = await fetchResult.json();\r\n\r\n if (result) {\r\n return result;\r\n }\r\n }\r\n\r\n return [\r\n { page: CurrentPage.State, isRequired: true },\r\n { page: CurrentPage.Gender, isRequired: true },\r\n { page: CurrentPage.NicotineProducts, isRequired: true },\r\n { page: CurrentPage.DateOfBirth, isRequired: true },\r\n { page: CurrentPage.BenefitSelection, isRequired: true },\r\n { page: CurrentPage.Terms, isRequired: true },\r\n { page: CurrentPage.UserIdentification, isRequired: true },\r\n { page: CurrentPage.Citizenship, isRequired: true },\r\n { page: CurrentPage.Birthstate, isRequired: true },\r\n { page: CurrentPage.PermanentStatus, isRequired: true },\r\n { page: CurrentPage.Residence, isRequired: true },\r\n { page: CurrentPage.Phone, isRequired: true },\r\n { page: CurrentPage.SocialSecurityNumber, isRequired: true },\r\n { page: CurrentPage.NicotineDetails, isRequired: true },\r\n { page: CurrentPage.Body, isRequired: true },\r\n { page: CurrentPage.ExistingCoverage, isRequired: true },\r\n { page: CurrentPage.ComprehensiveHealthcare, isRequired: true }, \r\n { page: CurrentPage.InterviewQuestions, isRequired: true },\r\n { page: CurrentPage.CaseDecisionDetermination, isRequired: true },\r\n { page: CurrentPage.TentativeApproved, isRequired: true },\r\n { page: CurrentPage.TentativeSentToUnderwriting, isRequired: true },\r\n { page: CurrentPage.Payment, isRequired: true },\r\n { page: CurrentPage.SignDocuments, isRequired: true },\r\n { page: CurrentPage.SubmittingApplication, isRequired: true },\r\n { page: CurrentPage.FinalApproved, isRequired: true }\r\n ];\r\n}\r\n\r\nconst linksUrl: string = \"/api/branding/links.json\";\r\nconst defaultLinks: Dictionary = {\r\n \"headerImage\": \"/logo-prepare-insurance.png\",\r\n \"homepage\": \"https://prepareinsure.com\"\r\n};\r\nexport async function getLinks(): Promise {\r\n let brandName = getBrandName();\r\n if (brandName !== undefined) {\r\n let settings = getSettings();\r\n var url = new URL(linksUrl, settings.apiHost);\r\n url.searchParams.append(\"brandName\", brandName);\r\n url.searchParams.append(\"code\", settings.apiKey);\r\n\r\n let fetchResult = await processRequest(url.href);\r\n\r\n let result = await fetchResult.json() as { key: string, value: string }[];\r\n let retrievedLinks: Dictionary = {};\r\n result.forEach(a => {\r\n retrievedLinks[a.key] = a.value\r\n })\r\n return Object.assign({}, defaultLinks, retrievedLinks);\r\n }\r\n\r\n return defaultLinks;\r\n}","enum Gender{\r\n Female = 0,\r\n Male = 1\r\n}\r\n\r\nexport default Gender; ","import { Validation, DemographicInformationValidation } from \"../../models/State/ValidationState\";\r\nimport AppState from \"../../models/State/AppState\";\r\nimport moment from 'moment';\r\n\r\nfunction isDateOfBirthValid(currState: AppState) {\r\n if (currState.demographicInformation.dateOfBirth !== undefined) {\r\n if (currState.demographicInformation.dateOfBirth > moment().toDate()) {\r\n return \"Please enter a valid date of birth (Date of birth cannot be a future date)\"\r\n }\r\n if (currState.demographicInformation.dateOfBirth > moment().subtract(18, 'years').toDate() ||\r\n currState.demographicInformation.dateOfBirth < moment().subtract(70, 'years').toDate()) {\r\n return \"Please enter a valid date of birth (Policy is available from ages 18 through 70)\";\r\n }\r\n if (!moment(currState.demographicInformation.dateOfBirth).isValid()) {\r\n return \"Please enter a valid date of birth.\";\r\n }\r\n } else {\r\n return \"Please enter a valid date of birth (Date of birth cannot be undefined)\";\r\n }\r\n\r\n return \"\";\r\n}\r\n\r\nfunction isGenderValid(currState: AppState) {\r\n return currState.demographicInformation.gender !== undefined;\r\n}\r\n\r\nfunction isNicotineProductsValid(currState: AppState) {\r\n return currState.demographicInformation.useNicotineProducts !== undefined;\r\n}\r\n\r\nfunction isStateValid(currState: AppState) {\r\n if (currState.availableStates.availableStates === undefined) {\r\n return false;\r\n }\r\n return currState.demographicInformation.state !== undefined &&\r\n currState.availableStates.availableStates.some(a => a.value === currState.demographicInformation.state);\r\n}\r\n\r\nfunction isStateAvailable(currState: AppState) {\r\n if (currState.availableStates.availableStates === undefined || currState.availableStates.availableStates === undefined || currState.demographicInformation.state === undefined) {\r\n return true;\r\n }\r\n return currState.availableStates.availableStates.some(a => a.value === currState.demographicInformation.state && a.isAvailable);\r\n}\r\n\r\nexport default function demographicInformationReducer(currState: AppState): Validation {\r\n let fields: DemographicInformationValidation = {\r\n dateOfBirthValidation: isDateOfBirthValid(currState),\r\n isGenderValid: isGenderValid(currState),\r\n isNicotineProductsValid: isNicotineProductsValid(currState),\r\n isStateValid: isStateValid(currState),\r\n isStateAvailable: isStateAvailable(currState)\r\n }\r\n return {\r\n overall: !fields.dateOfBirthValidation &&\r\n fields.isGenderValid &&\r\n fields.isNicotineProductsValid &&\r\n fields.isStateValid,\r\n fields: fields\r\n }\r\n}","import { getSettings } from \"../Settings\";\r\nimport AvailableState from \"../models/AvailableState\";\r\nimport AvailableBenefitAmount from \"../models/AvailableBenefitAmount\";\r\nimport Gender from \"../models/Gender\";\r\nimport moment from 'moment';\r\nimport AvailableCountry from \"../models/AvailableCountry\";\r\nimport { QuestionOption, FollowUpQuestion, FollowUpQuestionOption, BaseQuestion, Question } from \"../models/Question\";\r\nimport { processRequest } from \"./AccessorUtilities\";\r\n\r\nconst availableStatesUrl: string = \"/api/quote/availablestates.json\";\r\nconst availableBirthCountriesUrl: string = \"/api/quote/availablebirthcountries.json\";\r\nconst availableBenefitAmountsUrl: string = \"/api/quote/availablebenefitamounts.json\";\r\nconst getQuestionsUrl: string = \"/api/quote/getquestions.json\";\r\nconst getSearchOptionsUrl: string = \"/api/quote/getsearchoptions.json\";\r\nconst answerQuestionUrl: string = \"/api/quote/answerquestion.json\";\r\nconst getFollowUpQuestionUrl: string = \"/api/quote/getfollowupquestion.json\";\r\n\r\nexport async function getAvailableStates(): Promise {\r\n let settings = getSettings();\r\n let url = new URL(availableStatesUrl, settings.apiHost);\r\n url.searchParams.append(\"code\", settings.apiKey);\r\n let fetchResult = await processRequest(url.href);\r\n return await fetchResult.json() as AvailableState[];\r\n}\r\n\r\nexport async function getBirthCountries(): Promise {\r\n let settings = getSettings();\r\n let url = new URL(availableBirthCountriesUrl, settings.apiHost);\r\n url.searchParams.append(\"code\", settings.apiKey);\r\n let fetchResult = await processRequest(url.href);\r\n return await fetchResult.json() as AvailableCountry[];\r\n}\r\n\r\nexport async function getAvailableBenefitAmounts(gender: Gender, dateOfBirth: Date, usesNicotineProducts: boolean, state: string, referrer: string, email: string | undefined, partnerSubdomain: string | undefined): Promise {\r\n let settings = getSettings();\r\n let url = new URL(availableBenefitAmountsUrl, settings.apiHost);\r\n url.searchParams.append(\"gender\", gender === Gender.Female ? \"f\" : \"m\");\r\n url.searchParams.append(\"dateOfBirth\", moment(dateOfBirth).format('YYYY-MM-DD'));\r\n url.searchParams.append(\"nicotine\", usesNicotineProducts ? \"1\" : \"0\");\r\n url.searchParams.append(\"state\", state);\r\n url.searchParams.append(\"code\", settings.apiKey);\r\n url.searchParams.append(\"referrer\", referrer);\r\n if(email !== undefined) {\r\n url.searchParams.append(\"email\", email);\r\n } \r\n if(partnerSubdomain !== undefined) {\r\n url.searchParams.append(\"partner_subdomain\", partnerSubdomain);\r\n }\r\n let fetchResult = await processRequest(url.href);\r\n return await fetchResult.json() as AvailableBenefitAmount[];\r\n}\r\n\r\nexport async function getQuestions(caseId: string): Promise {\r\n let settings = getSettings();\r\n let url = new URL(getQuestionsUrl, settings.apiHost);\r\n url.searchParams.append(\"case\", caseId);\r\n url.searchParams.append(\"code\", settings.apiKey);\r\n let fetchResult = await processRequest(url.href);\r\n let results = await fetchResult.json() as BaseQuestion[];\r\n results.forEach(a => a.hasSavedAnswer = false);\r\n return results;\r\n}\r\n\r\nexport async function getSearchOptions(caseId: string, category: string, value: string): Promise {\r\n let settings = getSettings();\r\n let url = new URL(getSearchOptionsUrl, settings.apiHost);\r\n url.searchParams.append(\"case\", caseId);\r\n url.searchParams.append(\"category\", category);\r\n url.searchParams.append(\"value\", value);\r\n url.searchParams.append(\"code\", settings.apiKey);\r\n let fetchResult = await processRequest(url.href);\r\n return await fetchResult.json() as QuestionOption[];\r\n}\r\n\r\nexport async function answerQuestion(caseId: string, question: BaseQuestion): Promise {\r\n let settings = getSettings();\r\n let url = new URL(answerQuestionUrl, settings.apiHost);\r\n url.searchParams.append(\"code\", settings.apiKey);\r\n let body = {\r\n case: caseId,\r\n question: buildQuestionAnswerRequest(question)\r\n };\r\n await processRequest(url.href, {\r\n method: 'POST',\r\n body: JSON.stringify(body)\r\n });\r\n}\r\n\r\nconst buildQuestionAnswerRequest = (question: Question | undefined): any => {\r\n if (question === undefined) {\r\n return undefined;\r\n }\r\n let selectedValue = question.options.find(a => a.value === question.answer);\r\n let followUpId = selectedValue === undefined ? undefined : selectedValue.followUpId;\r\n return {\r\n id: question.id,\r\n answer: question.answer,\r\n followUpId: followUpId,\r\n subQuestions: question.subQuestions === undefined ? undefined : question.subQuestions.map(buildQuestionAnswerRequest),\r\n followUpQuestion: buildQuestionAnswerRequest(question.followUpQuestion),\r\n pickList: question.pickList === undefined ? undefined : question.pickList.map(a => ({\r\n id: a.id,\r\n answer: a.answer,\r\n followUpQuestion: buildQuestionAnswerRequest(a.followUpQuestion)\r\n }))\r\n }\r\n}\r\n\r\nexport type QuestionAnswer = {\r\n questionId: string;\r\n answer: string | undefined;\r\n};\r\n\r\nexport async function getFollowUpQuestions(caseId: string, baseQuestionId: string, followUpId?: string | null): Promise {\r\n if (followUpId === undefined || followUpId === null || followUpId.length === 0) {\r\n return undefined;\r\n }\r\n let settings = getSettings();\r\n let url = new URL(getFollowUpQuestionUrl, settings.apiHost);\r\n url.searchParams.append(\"case\", caseId);\r\n url.searchParams.append(\"followUp\", followUpId);\r\n url.searchParams.append(\"code\", settings.apiKey);\r\n let fetchResult = await processRequest(url.href);\r\n let serverResult = await fetchResult.text();\r\n if (serverResult === undefined || serverResult === null || serverResult.length === 0) {\r\n return undefined;\r\n }\r\n return fixFollowUpQuestionFromServer(JSON.parse(serverResult), baseQuestionId);\r\n}\r\n\r\nfunction fixFollowUpQuestionFromServer(result: FollowUpQuestionFromServer | undefined | null, baseQuestionId: string): FollowUpQuestion | undefined {\r\n if (result === null || result === undefined) {\r\n return undefined;\r\n }\r\n\r\n let followUpQuestion = result.followUpQuestion;\r\n let questionWithoutFollowUp: FollowUpQuestionWithoutSubFollowUpQuestion;\r\n\r\n ({ followUpQuestion, ...questionWithoutFollowUp } = { ...result });\r\n\r\n let returnValue = { ...questionWithoutFollowUp, baseQuestionId: baseQuestionId, followUpQuestion: fixFollowUpQuestionFromServer(followUpQuestion, baseQuestionId), options: result.options.map(a => fixFollowUpOptionsFromServer(a, baseQuestionId)) };\r\n return returnValue;\r\n}\r\n\r\nfunction fixFollowUpOptionsFromServer(result: FollowUpOptionFromServer, baseQuestionId: string): FollowUpQuestionOption {\r\n let followUpQuestion = result.followUpQuestion;\r\n let questionWithoutFollowUp: FollowUpOptionWithoutFollowUpQuestion;\r\n\r\n ({ followUpQuestion, ...questionWithoutFollowUp } = { ...result });\r\n\r\n let returnValue = { ...questionWithoutFollowUp, followUpQuestion: fixFollowUpQuestionFromServer(followUpQuestion, baseQuestionId) };\r\n return returnValue;\r\n}\r\n\r\ntype FollowUpQuestionWithoutSubFollowUpQuestion = Omit, 'options'>, 'baseQuestionId'>;\r\ntype FollowUpOptionWithoutFollowUpQuestion = Omit;\r\n\r\ninterface FollowUpQuestionFromServer extends FollowUpQuestionWithoutSubFollowUpQuestion {\r\n followUpQuestion?: FollowUpQuestionFromServer | null;\r\n options: FollowUpOptionFromServer[]\r\n}\r\n\r\ninterface FollowUpOptionFromServer extends FollowUpOptionWithoutFollowUpQuestion {\r\n followUpQuestion?: FollowUpQuestionFromServer | null;\r\n}","import AppState from \"../../models/State/AppState\";\r\nimport { ActionCreator, AnyAction } from \"redux\";\r\nimport { ThunkDispatch, ThunkAction } from \"redux-thunk\";\r\nimport { getAvailableStates } from \"../../accessors/QuoteAccessor\";\r\nimport AvailableState from \"../../models/AvailableState\";\r\n\r\n// Action Types\r\nexport const FETCH_AVAILABLESTATES = 'available_states/fetch';\r\nexport const RETRIEVED_AVAILABLESTATES = 'available_states/retrieved';\r\n\r\nexport type Types = typeof FETCH_AVAILABLESTATES |\r\n typeof RETRIEVED_AVAILABLESTATES;\r\n\r\nexport interface FetchAvailableStatesPayload{\r\n}\r\n\r\nexport interface RetrievedAvailableStatesPayload{\r\n availableStates: AvailableState[];\r\n}\r\n\r\ntype TypePayload = {type: T1, payload: T2};\r\n\r\nexport const loadAvailableStates: ActionCreator, AppState, null, AnyAction>> = () => {\r\n return async (dispatch: ThunkDispatch, getState: ()=>AppState): Promise => {\r\n const currState = getState();\r\n if(currState.availableStates.availableStates === undefined && !currState.availableStates.isLoadingAvailableStates){\r\n dispatch(fetchAvailableStatesAction());\r\n const states = await getAvailableStates();\r\n return dispatch(retrievedAvailableStatesAction(states));\r\n }\r\n };\r\n}\r\n\r\nexport function fetchAvailableStatesAction(): TypePayload {\r\n return {type: FETCH_AVAILABLESTATES, payload: {}};\r\n}\r\n\r\nexport function retrievedAvailableStatesAction(availableStates: AvailableState[]): TypePayload {\r\n return {type: RETRIEVED_AVAILABLESTATES, payload: {availableStates: availableStates}};\r\n}","import { getSettings } from \"../Settings\";\r\nimport { processRequest } from \"./AccessorUtilities\";\r\n\r\nconst sendNotAvailableInStateEmailUrl: string = \"api/notification/sendnotavailableemail.json\";\r\nconst sendApplicationConfirmationEmailUrl: string = \"api/notification/sendapplicationconfirmationemail.json\";\r\nconst sendApplicationUnderwritingEmailUrl: string = \"api/notification/sendapplicationunderwritingemail.json\";\r\n\r\nexport async function sendNotAvailableInStateEmail(applicantFirstName: string, applicantLastName: string, applicantEmail: string, state?: string) {\r\n let settings = getSettings();\r\n var url = new URL(sendNotAvailableInStateEmailUrl, settings.apiHost);\r\n url.searchParams.append(\"code\", settings.apiKey);\r\n\r\n let body = {\r\n applicantName: `${applicantFirstName} ${applicantLastName}`,\r\n applicantEmail: applicantEmail,\r\n state: state\r\n };\r\n\r\n await processRequest(url.href, {\r\n method: 'POST',\r\n body: JSON.stringify(body)\r\n });\r\n}\r\n\r\nexport async function sendApplicationConfirmationEmail(applicantFirstName: string, applicantLastName: string, applicantEmail: string, referrer: string, policyId: string) {\r\n let settings = getSettings();\r\n var url = new URL(sendApplicationConfirmationEmailUrl, settings.apiHost);\r\n url.searchParams.append(\"code\", settings.apiKey);\r\n\r\n let body = {\r\n applicantName: `${applicantFirstName} ${applicantLastName}`,\r\n applicantEmail: applicantEmail,\r\n referrer: referrer,\r\n policyId: policyId\r\n };\r\n\r\n await processRequest(url.href, {\r\n method: 'POST',\r\n body: JSON.stringify(body)\r\n });\r\n}\r\n\r\nexport async function sendApplicationUnderwritingEmail(applicantFirstName: string, applicantLastName: string, applicantEmail: string, referrer: string, policyId: string) {\r\n let settings = getSettings();\r\n var url = new URL(sendApplicationUnderwritingEmailUrl, settings.apiHost);\r\n url.searchParams.append(\"code\", settings.apiKey);\r\n\r\n let body = {\r\n applicantName: `${applicantFirstName} ${applicantLastName}`,\r\n applicantEmail: applicantEmail,\r\n referrer: referrer,\r\n policyId: policyId\r\n };\r\n\r\n await processRequest(url.href, {\r\n method: 'POST',\r\n body: JSON.stringify(body)\r\n });\r\n}","import Gender from \"../../models/Gender\";\r\nimport { ActionCreator, AnyAction } from \"redux\";\r\nimport { ThunkAction, ThunkDispatch } from \"redux-thunk\";\r\nimport AppState from \"../../models/State/AppState\";\r\nimport { sendNotAvailableInStateEmail } from \"../../accessors/NotificationAccessor\";\r\n\r\n// Action Types\r\nexport const UPDATE_DATEOFBIRTH = 'demographic_information/update_dateofbirth';\r\nexport const UPDATE_GENDER = 'demographic_information/update_gender';\r\nexport const UPDATE_USENICOTINEPRODUCTS = 'demographic_information/update_usenicotineproducts';\r\nexport const UPDATE_STATE = 'demographic_information/update_state';\r\nexport const UPDATE_REFERRER = 'demographic_information/update_referrer';\r\nexport const UPDATE_PARTNERSUBDOMAIN = 'demographic_information/update_partnerSubdomain';\r\nexport const UPDATE_EMAIL = 'demographic_information/update_email';\r\n\r\nexport type Types = typeof UPDATE_DATEOFBIRTH |\r\n typeof UPDATE_GENDER |\r\n typeof UPDATE_USENICOTINEPRODUCTS |\r\n typeof UPDATE_STATE |\r\n typeof UPDATE_REFERRER | \r\n typeof UPDATE_EMAIL | \r\n typeof UPDATE_PARTNERSUBDOMAIN;\r\n\r\nexport interface UpdateDateOfBirthPayload {\r\n dateOfBirth?: Date;\r\n}\r\n\r\nexport interface UpdateGenderPayload {\r\n gender?: Gender;\r\n}\r\n\r\nexport interface UpdateUseNicotineProductsPayload {\r\n useNicotineProducts?: boolean;\r\n}\r\n\r\nexport interface UpdateStatePayload {\r\n state?: string;\r\n}\r\n\r\nexport interface UpdateEmailPayload {\r\n email?: string;\r\n}\r\n\r\nexport interface UpdatePartnerSubdomainPayload {\r\n partnerSubdomain?: string;\r\n}\r\n\r\nexport interface UpdateReferrerPayload {\r\n referrer: string;\r\n}\r\n\r\ntype TypePayload = { type: T1, payload: T2 };\r\n\r\nexport function updateDateOfBirthAction(dateOfBirth?: Date): TypePayload {\r\n return { type: UPDATE_DATEOFBIRTH, payload: { dateOfBirth: dateOfBirth } };\r\n}\r\n\r\nexport function updateGenderAction(gender?: Gender): TypePayload {\r\n return { type: UPDATE_GENDER, payload: { gender: gender } };\r\n}\r\n\r\nexport function updateUseNicotineProductsAction(useNicotineProducts?: boolean): TypePayload {\r\n return { type: UPDATE_USENICOTINEPRODUCTS, payload: { useNicotineProducts: useNicotineProducts } };\r\n}\r\n\r\nexport function updateStateAction(state?: string): TypePayload {\r\n return { type: UPDATE_STATE, payload: { state: state } };\r\n}\r\n\r\nexport function updateReferrerAction(referrer: string): TypePayload {\r\n return { type: UPDATE_REFERRER, payload: { referrer: referrer } };\r\n}\r\n\r\nexport function updatePartnerSubdomainAction(partnerSubdomain: string): TypePayload {\r\n return { type: UPDATE_PARTNERSUBDOMAIN, payload: { partnerSubdomain: partnerSubdomain } };\r\n}\r\n\r\nexport function updateEmailAction(email: string | undefined): TypePayload {\r\n return { type: UPDATE_EMAIL, payload: { email: email } };\r\n}\r\n\r\nexport const sendUnavailableStateNotificationAction: ActionCreator, AppState, null, AnyAction>> = (firstName: string, lastName: string, email: string, state?: string) => {\r\n return async (dispatch: ThunkDispatch, getState: () => AppState): Promise => {\r\n\r\n await sendNotAvailableInStateEmail(firstName, lastName, email, state);\r\n\r\n var currState = getState();\r\n if (currState.brand.links !== undefined) {\r\n window.location.replace(currState.brand.links[\"homepage\"]);\r\n } else {\r\n window.location.replace(\"/\");\r\n }\r\n };\r\n}","export enum QuestionType {\r\n BinaryChoice = 0,\r\n Search = 1,\r\n Text = 2,\r\n Options = 3,\r\n PrimaryQuestion = 4,\r\n SubQuestion = 5,\r\n Numeric = 6\r\n}\r\n\r\nexport type Question = {\r\n id: string;\r\n type: QuestionType;\r\n text: string;\r\n subHeadingHtml?: string;\r\n options: QuestionOption[];\r\n answer?: string;\r\n searchCategoryId?: string;\r\n followUpQuestion?: Question;\r\n followUpQuestionRetrieved: boolean;\r\n pickList?: PickListOption[];\r\n subQuestions?: Question[];\r\n}\r\n\r\nexport type BaseQuestion = Question & {\r\n hasSavedAnswer: boolean;\r\n}\r\n\r\nexport type QuestionOption = {\r\n value: string;\r\n text: string;\r\n followUpId?: string;\r\n pickList?: PickListOption[];\r\n}\r\n\r\nexport interface PickListOption {\r\n id: string;\r\n text: string;\r\n answer?: string;\r\n followUpQuestion?: Question;\r\n followUpQuestionRetrieved: boolean;\r\n}\r\n\r\nexport type FollowUpQuestion = {\r\n id: string;\r\n type: QuestionType;\r\n text: string;\r\n baseQuestionId: string;\r\n followUpId: string;\r\n answer?: string;\r\n options: FollowUpQuestionOption[];\r\n}\r\n\r\nexport type FollowUpQuestionOption = {\r\n value: string;\r\n text: string;\r\n followUpQuestion?: FollowUpQuestion;\r\n}","import { getSettings } from \"../Settings\";\r\nimport Gender from \"../models/Gender\";\r\nimport Case from \"../models/Case\";\r\nimport CaseResult from \"../models/CaseResult\";\r\nimport { processRequest } from \"./AccessorUtilities\";\r\n\r\nconst createCaseUrl: string = \"/api/quote/createcase.json\";\r\nconst getcasedecisionUrl: string = \"/api/quote/getcasedecision.json\";\r\n\r\nexport async function createCase(caseRequest: CaseRequest) {\r\n\r\n let settings = getSettings();\r\n var url = new URL(createCaseUrl, settings.apiHost);\r\n url.searchParams.append(\"code\", settings.apiKey);\r\n \r\n const response = await post(url.toString(), {\r\n benefitAmount: caseRequest.benefitAmount,\r\n streetAddress: caseRequest.streetAddress,\r\n city: caseRequest.city,\r\n state: caseRequest.state,\r\n zip: caseRequest.zip,\r\n firstName: caseRequest.firstName,\r\n lastName: caseRequest.lastName,\r\n gender: caseRequest.gender,\r\n dateOfBirth: caseRequest.dateOfBirth,\r\n heightFeet: caseRequest.heightFeet,\r\n heightInches: caseRequest.heightInches,\r\n weightPounds: caseRequest.weightPounds,\r\n birthState: caseRequest.birthState,\r\n birthCountry: caseRequest.birthCountry,\r\n phoneNumber: caseRequest.phoneNumber.replace(/\\D/g, ''),\r\n socialSecurityNumber: caseRequest.SSN,\r\n isCitizen: caseRequest.isCitizen,\r\n tobaccoUses: caseRequest.tobaccoUses,\r\n tobaccoType: caseRequest.tobaccoType,\r\n tobaccoDailyUseCount: caseRequest.tobaccoDailyUseCount,\r\n tobaccoMonthlyUseCount: caseRequest.tobaccoMonthlyUseCount,\r\n tobaccoLastUseDate: caseRequest.tobaccoLastUseDate,\r\n quotedUsesTobacco: caseRequest.quotedUsesTobacco,\r\n isPermanentResident: !caseRequest.isCitizen,\r\n greenCard: caseRequest.greenCard,\r\n hasExistingCoverage: caseRequest.hasExistingCoverage,\r\n hasComprehensiveHealthcare: caseRequest.hasComprehensiveHealthcare,\r\n code: settings.apiKey,\r\n referrer: caseRequest.referrer\r\n }).catch(error => console.error(error));\r\n\r\n return response as Case;\r\n}\r\n\r\nexport async function getCaseResult(caseId: string, applicationAlreadySubmitted: boolean): Promise {\r\n let settings = getSettings();\r\n var url = new URL(getcasedecisionUrl, settings.apiHost);\r\n url.searchParams.append(\"case\", caseId);\r\n url.searchParams.append(\"applicationAlreadySubmitted\", String(applicationAlreadySubmitted));\r\n url.searchParams.append(\"code\", settings.apiKey);\r\n \r\n let fetchResult = await processRequest(url.href);\r\n let result = await fetchResult.json() as CaseResultResponse;\r\n return result.caseResult;\r\n}\r\n\r\ntype CaseResultResponse = {\r\n caseResult: CaseResult\r\n}\r\n\r\nasync function post(url = '', data = {}) {\r\n return await processRequest(url, {\r\n method: 'POST',\r\n mode: 'cors',\r\n cache: 'no-cache',\r\n credentials: 'same-origin',\r\n headers: {\r\n 'Content-Type': 'application/json'\r\n },\r\n redirect: 'follow',\r\n referrer: 'no-referrer',\r\n body: JSON.stringify(data),\r\n })\r\n .then(response => response.json());\r\n}\r\n\r\nexport interface CaseRequest {\r\n quotedUsesTobacco: boolean;\r\n benefitAmount: number;\r\n streetAddress: string;\r\n streetAddress2?: string;\r\n city: string;\r\n state: string;\r\n zip: string;\r\n firstName: string;\r\n lastName: string;\r\n gender: Gender;\r\n dateOfBirth: Date;\r\n heightFeet: number;\r\n heightInches: number;\r\n weightPounds: number;\r\n birthState?: string;\r\n birthCountry: string;\r\n phoneNumber: string;\r\n SSN: string;\r\n isCitizen: boolean;\r\n tobaccoUses: boolean;\r\n tobaccoType?: string;\r\n tobaccoDailyUseCount?: number;\r\n tobaccoMonthlyUseCount?: number;\r\n tobaccoLastUseDate?: Date;\r\n greenCard: string | undefined;\r\n hasExistingCoverage: boolean;\r\n hasComprehensiveHealthcare?: boolean;\r\n referrer: string;\r\n}","import AppState from \"../../models/State/AppState\";\r\nimport { Question, QuestionType, BaseQuestion } from \"../../models/Question\";\r\nimport InterviewQuestionsState from \"../../models/State/InterviewQuestionsState\";\r\n\r\ntype switchQuestionResult = {\r\n hasQuestionsLoaded: false\r\n} | {\r\n hasQuestionsLoaded: true,\r\n movedPast: true\r\n} | {\r\n hasQuestionsLoaded: true,\r\n movedPast: false,\r\n question: Question,\r\n questionIndex: number\r\n}\r\nexport const getNextQuestion = (state: AppState): switchQuestionResult => {\r\n if (state.interviewQuestions.questions === undefined) {\r\n return { hasQuestionsLoaded: false };\r\n }\r\n let currentQuestionIndex = state.currentPage.currentQuestionIndex;\r\n if (currentQuestionIndex === undefined) {\r\n currentQuestionIndex = 0;\r\n } else {\r\n currentQuestionIndex++;\r\n }\r\n if (state.interviewQuestions.questions.length <= currentQuestionIndex) {\r\n return { hasQuestionsLoaded: true, movedPast: true };\r\n }\r\n return { hasQuestionsLoaded: true, movedPast: false, question: state.interviewQuestions.questions[currentQuestionIndex], questionIndex: currentQuestionIndex };\r\n}\r\n\r\nexport const getPreviousQuestion = (state: AppState): switchQuestionResult => {\r\n if (state.interviewQuestions.questions === undefined) {\r\n return { hasQuestionsLoaded: false };\r\n }\r\n let currentQuestionIndex = state.currentPage.currentQuestionIndex;\r\n if (currentQuestionIndex === undefined) {\r\n currentQuestionIndex = state.interviewQuestions.questions.length - 1;\r\n } else {\r\n currentQuestionIndex--;\r\n }\r\n if (currentQuestionIndex < 0) {\r\n return { hasQuestionsLoaded: true, movedPast: true };\r\n }\r\n return { hasQuestionsLoaded: true, movedPast: false, question: state.interviewQuestions.questions[currentQuestionIndex], questionIndex: currentQuestionIndex };\r\n}\r\n\r\nexport const getCurrentQuestion = (state: AppState): BaseQuestion | undefined => {\r\n if (state.interviewQuestions.questions === undefined || state.currentPage.currentQuestionIndex === undefined || state.interviewQuestions.questions.length <= state.currentPage.currentQuestionIndex || state.currentPage.currentQuestionIndex < 0) {\r\n return undefined;\r\n }\r\n return state.interviewQuestions.questions[state.currentPage.currentQuestionIndex];\r\n}\r\n\r\nexport const areQuestionAnswersSaving = (state: InterviewQuestionsState): boolean => {\r\n if (state.questions === undefined) {\r\n return false;\r\n }\r\n return state.questions.some(isQuestionAnswerSaving);\r\n}\r\n\r\nexport const areQuestionsFetchingFollowUps = (state: InterviewQuestionsState): boolean => {\r\n if (state.questions === undefined) {\r\n return false;\r\n }\r\n return state.questions.some(isFetchingFollowUpQuestions);\r\n}\r\n\r\nexport const isQuestionAnswerSaving = (question: BaseQuestion): boolean => {\r\n if (question.hasSavedAnswer !== undefined && !question.hasSavedAnswer) {\r\n return true;\r\n }\r\n\r\n return false;\r\n}\r\n\r\nexport const isCurrentQuestionComplete = (state: AppState): boolean | undefined => {\r\n if (state.interviewQuestions.questions === undefined || state.currentPage.currentQuestionIndex === undefined || state.currentPage.currentQuestionIndex < 0 || state.currentPage.currentQuestionIndex >= state.interviewQuestions.questions.length) {\r\n return undefined;\r\n }\r\n let currQuestion = state.interviewQuestions.questions[state.currentPage.currentQuestionIndex];\r\n return isQuestionComplete(currQuestion);\r\n}\r\n\r\nexport const isFetchingFollowUpQuestions = (question: Question): boolean => {\r\n if (question.answer !== undefined && !question.followUpQuestionRetrieved) {\r\n return true;\r\n }\r\n\r\n if (question.subQuestions !== undefined && question.subQuestions.some(a => isFetchingFollowUpQuestions(a))) {\r\n return true;\r\n }\r\n\r\n if (question.followUpQuestion !== undefined && isFetchingFollowUpQuestions(question.followUpQuestion)) {\r\n return true;\r\n }\r\n\r\n if (question.pickList !== undefined && question.pickList.length > 0) {\r\n if(question.pickList.some(a => a.followUpQuestion !== undefined && isFetchingFollowUpQuestions(a.followUpQuestion))){\r\n return true;\r\n }\r\n if(question.pickList.some(a => a.answer === \"true\" && !a.followUpQuestionRetrieved)){\r\n return true;\r\n }\r\n }\r\n\r\n return false;\r\n}\r\n\r\nexport const isQuestionComplete = (question: Question): boolean => {\r\n if(isFetchingFollowUpQuestions(question)){\r\n return false;\r\n }\r\n if (question.type !== QuestionType.PrimaryQuestion && question.answer === undefined) {\r\n return false;\r\n }\r\n\r\n if(question.pickList !== undefined && question.pickList.length > 0){\r\n if(question.pickList.every(a=>a.answer === \"false\" || a.answer === undefined)){\r\n return false;\r\n }\r\n if(question.pickList.some(a=>a.followUpQuestion !== undefined && !isQuestionComplete(a.followUpQuestion))){\r\n return false;\r\n }\r\n }\r\n\r\n if (question.subQuestions !== undefined && !question.subQuestions.every(a => isQuestionComplete(a))) {\r\n return false;\r\n }\r\n\r\n if (question.followUpQuestion !== undefined && !isQuestionComplete(question.followUpQuestion)) {\r\n return false;\r\n }\r\n\r\n return true;\r\n}\r\n","enum CaseResult{\r\n Processing = 0,\r\n Approved = 1,\r\n SentToUnderwriting = 2,\r\n Declined = 3,\r\n TentativeApproved = 4\r\n}\r\nexport default CaseResult;","enum NicotineType{\r\n Cigarettes = 0,\r\n Cigar = 1,\r\n Pipe = 2,\r\n Smokeless = 3,\r\n Ecigarettes = 4,\r\n Nicotine_Patches_Gum_Other = 5\r\n}\r\n\r\nexport default NicotineType; ","import { ActionCreator, AnyAction } from \"redux\";\r\nimport { ThunkAction, ThunkDispatch } from \"redux-thunk\";\r\n\r\nimport AppState from \"../../models/State/AppState\";\r\nimport Case from \"../../models/Case\";\r\nimport { createCase, getCaseResult } from \"../../accessors/CaseAccessor\";\r\nimport { areQuestionAnswersSaving } from \"../InterviewQuestions/Utilities\";\r\nimport CaseResult from \"../../models/CaseResult\";\r\nimport NicotineType from \"../../models/NicotineType\";\r\n\r\nexport const CREATE_CASE = 'case/post_case';\r\nexport const RETRIEVED_CASE = 'case/retrieved_case';\r\nexport const UPDATE_CASERESULT = 'case/update_caseresult';\r\n\r\nexport type Types = typeof CREATE_CASE |\r\n typeof RETRIEVED_CASE |\r\n typeof UPDATE_CASERESULT;\r\n\r\nexport interface CreateCaseActionPayload {\r\n}\r\n\r\nexport interface CreateCaseActionResponsePayload {\r\n case: Case;\r\n}\r\n\r\nexport interface SetCaseResultPayload {\r\n result: CaseResult;\r\n}\r\n\r\ntype TypePayload = { type: T1, payload: T2 };\r\n\r\nexport const createCaseAction: ActionCreator, AppState, null, AnyAction>> = () => {\r\n return async (dispatch: ThunkDispatch, getState: () => AppState): Promise => {\r\n const currState = getState();\r\n if (currState.benefitAmount.selectedAmount === undefined\r\n || currState.personalInformation.streetAddress === undefined\r\n || currState.personalInformation.city === undefined\r\n || currState.demographicInformation.state === undefined\r\n || currState.personalInformation.zip === undefined\r\n || currState.personalInformation.usersFirstName === undefined\r\n || currState.personalInformation.usersLastName === undefined\r\n || currState.demographicInformation.gender === undefined\r\n || currState.demographicInformation.dateOfBirth === undefined\r\n || currState.personalInformation.heightFeet === undefined\r\n || currState.personalInformation.heightInches === undefined\r\n || currState.personalInformation.weightPounds === undefined\r\n || currState.personalInformation.birthCountry === undefined\r\n || currState.personalInformation.phoneNumber === undefined\r\n || currState.personalInformation.socialSecurityNumber === undefined\r\n || currState.personalInformation.tobaccoUses === undefined\r\n || currState.personalInformation.isCitizen === undefined\r\n || currState.demographicInformation.useNicotineProducts === undefined\r\n || currState.personalInformation.hasExistingCoverage === undefined\r\n || (currState.demographicInformation.state === \"CA\" && currState.personalInformation.hasComprehensiveHealthcare === undefined)\r\n || currState.demographicInformation.referrer === undefined\r\n ) {\r\n throw new Error(\"Not enough data to create a case.\");\r\n }\r\n\r\n dispatch(loadingCreateCaseAction());\r\n\r\n const caseResult = await createCase({\r\n benefitAmount: currState.benefitAmount.selectedAmount.benefitAmount,\r\n streetAddress: currState.personalInformation.streetAddress,\r\n streetAddress2: currState.personalInformation.streetAddress2,\r\n city: currState.personalInformation.city,\r\n state: currState.demographicInformation.state,\r\n zip: currState.personalInformation.zip,\r\n firstName: currState.personalInformation.usersFirstName,\r\n lastName: currState.personalInformation.usersLastName,\r\n gender: currState.demographicInformation.gender,\r\n dateOfBirth: currState.demographicInformation.dateOfBirth,\r\n heightFeet: currState.personalInformation.heightFeet,\r\n heightInches: currState.personalInformation.heightInches,\r\n weightPounds: currState.personalInformation.weightPounds,\r\n birthState: currState.personalInformation.birthState,\r\n birthCountry: currState.personalInformation.birthCountry,\r\n phoneNumber: currState.personalInformation.phoneNumber,\r\n SSN: currState.personalInformation.socialSecurityNumber,\r\n isCitizen: currState.personalInformation.isCitizen,\r\n tobaccoUses: currState.personalInformation.tobaccoUses,\r\n tobaccoType: currState.personalInformation.tobaccoType === undefined ? \"\" : NicotineType[currState.personalInformation.tobaccoType],\r\n tobaccoDailyUseCount: currState.personalInformation.tobaccoDailyUseCount,\r\n tobaccoMonthlyUseCount: currState.personalInformation.tobaccoMonthlyUseCount,\r\n tobaccoLastUseDate: currState.personalInformation.tobaccoLastUseDate,\r\n greenCard: currState.personalInformation.greenCard,\r\n quotedUsesTobacco: currState.demographicInformation.useNicotineProducts,\r\n hasExistingCoverage: currState.personalInformation.hasExistingCoverage,\r\n hasComprehensiveHealthcare: currState.personalInformation.hasComprehensiveHealthcare,\r\n referrer: currState.demographicInformation.referrer\r\n });\r\n return dispatch(receivedCreateCaseAction(caseResult));\r\n };\r\n}\r\n\r\nexport function loadingCreateCaseAction(): TypePayload {\r\n return { type: CREATE_CASE, payload: {} };\r\n}\r\n\r\nexport function receivedCreateCaseAction(caseResult: Case): TypePayload {\r\n return { type: RETRIEVED_CASE, payload: { case: caseResult } };\r\n}\r\n\r\nexport function setCaseResultAction(result: CaseResult): TypePayload {\r\n return { type: UPDATE_CASERESULT, payload: { result: result } };\r\n}\r\n\r\nexport const validateCaseResultAction: ActionCreator, AppState, null, AnyAction>> = (id: string, answer?: string) => {\r\n return async (dispatch: ThunkDispatch, getState: () => AppState): Promise => {\r\n const currState = getState();\r\n\r\n if (currState.case.case === undefined || areQuestionAnswersSaving(currState.interviewQuestions)) {\r\n setTimeout(() => dispatch(validateCaseResultAction()), 5000);\r\n return;\r\n }\r\n\r\n let result = await getCaseResult(currState.case.case.caseId, currState.case.applicationSubmitted === true);\r\n await dispatch(setCaseResultAction(result));\r\n if (result === undefined || result === CaseResult.Processing) {\r\n setTimeout(() => dispatch(validateCaseResultAction()), 5000);\r\n }\r\n };\r\n}","import { ActionCreator, AnyAction } from \"redux\";\r\nimport { ThunkAction, ThunkDispatch } from \"redux-thunk\";\r\nimport AppState from \"../../models/State/AppState\";\r\nimport { Question, QuestionOption, FollowUpQuestion, QuestionType, PickListOption, BaseQuestion, FollowUpQuestionOption } from \"../../models/Question\";\r\nimport { getQuestions, answerQuestion, getSearchOptions, getFollowUpQuestions } from \"../../accessors/QuoteAccessor\";\r\nimport { updateCurrentQuestionAction, declinedPageAction } from \"../CurrentPage/Actions\";\r\nimport { createCaseAction } from \"../Case/Actions\";\r\nimport { isQuestionComplete } from \"./Utilities\";\r\n\r\n// Action Types\r\nexport const FETCH_QUESTIONS = 'interview_questions/fetch_questions';\r\nexport const RETRIEVED_QUESTIONS = 'interview_questions/retrieved_questions';\r\nexport const ANSWER_QUESTION = 'interview_questions/answer_question';\r\nexport const ANSWER_PICKLISTQUESTION = 'interview_questions/answer_picklistquestion';\r\nexport const UPDATE_QUESTIONOPTIONS = 'interview_questions/update_questionoptions';\r\nexport const SET_FOLLOWUPQUESTION = 'interview_questions/set_followupquestion';\r\nexport const SET_FOLLOWUPQUESTIONPICKLIST = 'interview_questions/set_followupquestionpicklist';\r\nexport const SET_HASSAVEDANSWER = 'interview_questions/set_hassavedanswer';\r\nexport const STORE_FOLLOWUPQUESTION = 'interview_questions/store_followupdata';\r\n\r\nexport type Types = typeof FETCH_QUESTIONS |\r\n typeof RETRIEVED_QUESTIONS |\r\n typeof ANSWER_QUESTION |\r\n typeof UPDATE_QUESTIONOPTIONS |\r\n typeof SET_FOLLOWUPQUESTION |\r\n typeof SET_HASSAVEDANSWER |\r\n typeof STORE_FOLLOWUPQUESTION |\r\n typeof SET_FOLLOWUPQUESTIONPICKLIST |\r\n typeof ANSWER_PICKLISTQUESTION;\r\n\r\nexport interface FetchQuestionsPayload {\r\n}\r\n\r\nexport interface RetrievedQuestionsPayload {\r\n questions?: BaseQuestion[];\r\n}\r\n\r\nexport interface AnswerQuestionPayload {\r\n id: string;\r\n answer?: string;\r\n pickList?: PickListOption[];\r\n baseQuestionId: string;\r\n}\r\n\r\nexport interface AnswerPickListQuestionPayload {\r\n id: string;\r\n answer?: string;\r\n baseQuestionId: string;\r\n}\r\n\r\nexport interface SetFollowUpQuestionPayload {\r\n id: string;\r\n followUpQuestion?: Question;\r\n}\r\n\r\nexport interface UpdateQuestionOptionsPayload {\r\n id: string;\r\n options: QuestionOption[];\r\n}\r\n\r\nexport interface FetchFollowUpQuestionsPayload {\r\n followUpQuestionId: string;\r\n}\r\n\r\nexport interface RetrievedFollowUpQuestionsPayload {\r\n questions: Question[];\r\n}\r\n\r\nexport interface SubmitFollowUpQuestionAnswerPayload {\r\n id: string;\r\n value: string;\r\n}\r\n\r\nexport interface HasSavedAnswerPayload {\r\n id: string;\r\n}\r\n\r\nexport interface StoreFollowUpQuestionPayload {\r\n followUpId: string,\r\n followUpQuestion?: FollowUpQuestion\r\n}\r\n\r\nexport interface SetFollowUpQuestionPicklistPayload {\r\n questionId: string;\r\n pickListId: string;\r\n followUpQuestion?: Question;\r\n}\r\n\r\ntype TypePayload = { type: T1, payload: T2 };\r\n\r\nexport function fetchQuestionsAction(): TypePayload {\r\n return { type: FETCH_QUESTIONS, payload: {} };\r\n}\r\n\r\nexport function retrievedQuestionsAction(questions?: BaseQuestion[]): TypePayload {\r\n return { type: RETRIEVED_QUESTIONS, payload: { questions: questions } };\r\n}\r\n\r\nexport function answerQuestionAction(id: string, baseQuestionId: string, answer?: string, pickList?: PickListOption[]): TypePayload {\r\n return { type: ANSWER_QUESTION, payload: { id: id, answer: answer, pickList: pickList, baseQuestionId: baseQuestionId } };\r\n}\r\n\r\nexport function answerPickListQuestionAction(id: string, baseQuestionId: string, answer?: string): TypePayload {\r\n return { type: ANSWER_PICKLISTQUESTION, payload: { id: id, answer: answer, baseQuestionId: baseQuestionId } };\r\n}\r\n\r\nexport function setFollowUpQuestionAction(id: string, followUpQuestion?: Question): TypePayload {\r\n return { type: SET_FOLLOWUPQUESTION, payload: { id: id, followUpQuestion: followUpQuestion } };\r\n}\r\n\r\nexport function storeFollowUpQuestionAction(followUpId: string, followUpQuestion?: FollowUpQuestion): TypePayload {\r\n return { type: STORE_FOLLOWUPQUESTION, payload: { followUpId: followUpId, followUpQuestion: followUpQuestion } };\r\n}\r\n\r\nexport function setHasSavedAnswerAction(id: string): TypePayload {\r\n return { type: SET_HASSAVEDANSWER, payload: { id: id } };\r\n}\r\n\r\nexport function updateQuestionOptionsAction(id: string, options: QuestionOption[]): TypePayload {\r\n return { type: UPDATE_QUESTIONOPTIONS, payload: { id: id, options: options } };\r\n}\r\n\r\nexport function setFollowUpQuestionPicklistAction(questionId: string, pickListId: string, followUpQuestion: Question | undefined): TypePayload {\r\n return { type: SET_FOLLOWUPQUESTIONPICKLIST, payload: { questionId: questionId, pickListId: pickListId, followUpQuestion: followUpQuestion } };\r\n}\r\n\r\nexport const loadQuestionsAction: ActionCreator, AppState, null, AnyAction>> = () => {\r\n return async (dispatch: ThunkDispatch, getState: () => AppState): Promise => {\r\n dispatch(fetchQuestionsAction());\r\n await dispatch(createCaseAction());\r\n\r\n const updatedState = getState();\r\n if (updatedState.case.case === undefined) {\r\n dispatch(retrievedQuestionsAction());\r\n return;\r\n }\r\n\r\n if(updatedState.case.case.isEligible){\r\n const questions = await getQuestions(updatedState.case.case.caseId);\r\n dispatch(retrievedQuestionsAction(questions));\r\n } else {\r\n dispatch(retrievedQuestionsAction());\r\n dispatch(declinedPageAction());\r\n }\r\n \r\n return dispatch(updateCurrentQuestionAction(0));\r\n };\r\n}\r\n\r\nexport const searchQuestionOptionsAction: ActionCreator, AppState, null, AnyAction>> = (id: string, category: string, value: string) => {\r\n return async (dispatch: ThunkDispatch, getState: () => AppState): Promise => {\r\n const currState = getState();\r\n if (currState.case.case === undefined) {\r\n return;\r\n }\r\n if (value.length < 3) {\r\n return dispatch(updateQuestionOptionsAction(id, []));\r\n }\r\n const options = await getSearchOptions(currState.case.case.caseId, category, value); //todo: remove hard coded case id\r\n return dispatch(updateQuestionOptionsAction(id, options));\r\n };\r\n}\r\n\r\nexport const submitQuestionAnswerAction: ActionCreator, AppState, null, AnyAction>> = (id: string, answer?: string) => {\r\n return async (dispatch: ThunkDispatch, getState: () => AppState): Promise => {\r\n const currState = getState();\r\n if (currState.interviewQuestions.questions === undefined || currState.case.case === undefined) {\r\n return;\r\n }\r\n let currQuestion = findQuestion(id, currState.interviewQuestions.questions);\r\n if (currQuestion === undefined) {\r\n return;\r\n }\r\n if (currQuestion.question.answer !== answer) {\r\n if (currQuestion.isFollowUp) {\r\n await processFollowUpQuestionAnswer(currState, currQuestion, answer, id, dispatch);\r\n } else {\r\n await processBaseQuestionAnswer(currState, currQuestion, answer, id, currState.case.case.caseId, dispatch, getState);\r\n }\r\n }\r\n };\r\n}\r\n\r\nexport const setPickListAnswerAction: ActionCreator, AppState, null, AnyAction>> = (questionId: string, pickListId: string, answer?: string) => {\r\n return async (dispatch: ThunkDispatch, getState: () => AppState): Promise => {\r\n const currState = getState();\r\n if (currState.interviewQuestions.questions === undefined || currState.case.case === undefined) {\r\n return;\r\n }\r\n let currQuestion = findQuestion(questionId, currState.interviewQuestions.questions);\r\n if (currQuestion === undefined) {\r\n return;\r\n }\r\n\r\n dispatch(answerPickListQuestionAction(pickListId, questionId, answer));\r\n\r\n if (answer === \"true\") {\r\n dispatch(setFollowUpQuestionPicklistAction(questionId, pickListId, await processFollowUpQuestion(questionId, pickListId, currState, currState.case.case.caseId, dispatch, getState)));\r\n } else {\r\n dispatch(setFollowUpQuestionPicklistAction(questionId, pickListId, undefined));\r\n }\r\n };\r\n}\r\n\r\nexport const saveQuestionAnswerAction: ActionCreator, AppState, null, AnyAction>> = (question: BaseQuestion) => {\r\n return async (dispatch: ThunkDispatch, getState: () => AppState): Promise => {\r\n const currState = getState();\r\n if (currState.case.case === undefined) {\r\n return;\r\n }\r\n if (question !== undefined && isQuestionComplete(question) && !question.hasSavedAnswer) {\r\n await answerQuestion(currState.case.case.caseId, question);\r\n dispatch(setHasSavedAnswerAction(question.id));\r\n }\r\n\r\n };\r\n}\r\n\r\ntype CurrentQuestion = {\r\n question: Question,\r\n isFollowUp: boolean,\r\n baseQuestionId: string\r\n}\r\n\r\nconst processBaseQuestionAnswer = async (currState: AppState, currQuestion: CurrentQuestion, answer: string | undefined, id: string, caseId: string, dispatch: ThunkDispatch, getState: () => AppState): Promise => {\r\n let selectedValue = currQuestion.question.options.find(a => a.value === answer);\r\n if (answer !== undefined && selectedValue === undefined) {\r\n return;\r\n }\r\n let pickList = selectedValue === undefined ? undefined : selectedValue.pickList;\r\n if (pickList !== undefined) {\r\n pickList.forEach(a => {\r\n if (a.answer === undefined) {\r\n a.answer = \"false\";\r\n }\r\n if (a.followUpQuestionRetrieved === undefined) {\r\n a.followUpQuestionRetrieved = false;\r\n }\r\n });\r\n }\r\n\r\n dispatch(answerQuestionAction(id, id, answer, pickList));\r\n\r\n let followUpQuestion: Question | undefined\r\n let followUpId = selectedValue === undefined ? undefined : selectedValue.followUpId;\r\n followUpQuestion = await processFollowUpQuestion(id, followUpId, currState, caseId, dispatch, getState);\r\n\r\n dispatch(setFollowUpQuestionAction(id, followUpQuestion));\r\n}\r\n\r\nconst processFollowUpQuestionAnswer = async (currState: AppState, currQuestion: CurrentQuestion, answer: string | undefined, id: string, dispatch: ThunkDispatch): Promise => {\r\n let currFollowUpQuestion = currState.interviewQuestions.flatFollowUpQuestionCache[id];\r\n if (currFollowUpQuestion === undefined) {\r\n return;\r\n }\r\n let selectedValue = findMatchingSelectedValue(currFollowUpQuestion, answer);\r\n if (!selectedValue.canSetValue) {\r\n return;\r\n }\r\n\r\n let nextFollowUpQuestion = selectedValue.option === undefined ? undefined : selectedValue.option.followUpQuestion;\r\n\r\n dispatch(answerQuestionAction(id, currQuestion.baseQuestionId, answer));\r\n\r\n let followUpQuestion = convertFollowUpQuestion(nextFollowUpQuestion);\r\n if(currQuestion.question.followUpQuestion !== undefined && followUpQuestion !== undefined && currQuestion.question.followUpQuestion.id === followUpQuestion.id){\r\n dispatch(setFollowUpQuestionAction(id, currQuestion.question.followUpQuestion));\r\n } else {\r\n dispatch(setFollowUpQuestionAction(id, followUpQuestion));\r\n }\r\n \r\n}\r\n\r\nexport const submitQuestionAnswersAction: ActionCreator, AppState, null, AnyAction>> = (answers: { id: string, answer?: string }[]) => {\r\n return async (dispatch: ThunkDispatch, getState: () => AppState): Promise => {\r\n const currState = getState();\r\n if (currState.interviewQuestions.questions === undefined || currState.case.case === undefined) {\r\n return;\r\n }\r\n let allQuestions = currState.interviewQuestions.questions;\r\n let caseId = currState.case.case.caseId;\r\n let updates = new Array<{ questionId: string, answer: string | undefined, followUpPromise: Promise | undefined }>();\r\n answers.forEach(a => {\r\n let currQuestion = findQuestion(a.id, allQuestions);\r\n if (currQuestion === undefined) {\r\n return;\r\n }\r\n if (currQuestion.question.answer !== a.answer) {\r\n let selectedValue = currQuestion.question.options.find(b => b.value === a.answer);\r\n if (a.answer !== undefined && selectedValue === undefined) {\r\n return;\r\n }\r\n dispatch(answerQuestionAction(a.id, currQuestion.baseQuestionId, a.answer));\r\n\r\n let followUpId = selectedValue === undefined ? undefined : selectedValue.followUpId;\r\n let followUpPromise = processFollowUpQuestion(a.id, followUpId, currState, caseId, dispatch, getState);\r\n\r\n updates.push({ questionId: a.id, answer: a.answer, followUpPromise: followUpPromise })\r\n }\r\n });\r\n updates.forEach(async a => {\r\n dispatch(setFollowUpQuestionAction(a.questionId, await a.followUpPromise))\r\n })\r\n };\r\n}\r\n\r\nconst findQuestion = (id: string, allQuestions: Question[] | undefined): CurrentQuestion | undefined => {\r\n if (allQuestions === undefined) {\r\n return undefined;\r\n }\r\n return allQuestions.map(a => findSubQuestion(id, a, false, a.id)).find(a => a !== undefined);\r\n}\r\n\r\nconst findSubQuestion = (id: string, question: Question | undefined, isFollowUp: boolean, baseQuestionId: string): CurrentQuestion | undefined => {\r\n if (question === undefined) {\r\n return undefined;\r\n }\r\n if (question.id === id) {\r\n return { question: question, isFollowUp: isFollowUp, baseQuestionId: baseQuestionId };\r\n }\r\n if (question.subQuestions !== undefined) {\r\n let match = question.subQuestions.map(a => findSubQuestion(id, a, isFollowUp, baseQuestionId)).find(a => a !== undefined);\r\n if (match !== undefined) {\r\n return match;\r\n }\r\n }\r\n if (question.followUpQuestion !== undefined) {\r\n let match = findSubQuestion(id, question.followUpQuestion, true, baseQuestionId);\r\n if (match !== undefined) {\r\n return match;\r\n }\r\n }\r\n if (question.pickList !== undefined) {\r\n let match = question.pickList.map(a => findSubQuestion(id, a.followUpQuestion, true, baseQuestionId)).find(a => a !== undefined);\r\n if (match !== undefined) {\r\n return match;\r\n }\r\n }\r\n return undefined;\r\n}\r\n\r\nconst findMatchingSelectedValue = (currFollowUpQuestion: FollowUpQuestion, answer: string | undefined): { option: FollowUpQuestionOption | undefined, canSetValue: boolean } => {\r\n if (currFollowUpQuestion.type === QuestionType.Text || answer === undefined) {\r\n return { option: undefined, canSetValue: true };\r\n }\r\n if (currFollowUpQuestion.type === QuestionType.Numeric) {\r\n let intAnswer = parseInt(answer);\r\n for(let i=currFollowUpQuestion.options.length - 1; i>=0; i--){\r\n let currOption = currFollowUpQuestion.options[i];\r\n if(intAnswer >= parseInt(currOption.value)){\r\n return { option: currOption, canSetValue: true }\r\n }\r\n }\r\n return { option: undefined, canSetValue: false }\r\n }\r\n let foundOption = currFollowUpQuestion.options.find(a => a.value === answer);\r\n return { option: foundOption, canSetValue: foundOption !== undefined };\r\n}\r\n\r\nasync function processFollowUpQuestion(baseQuestionId: string, followUpId: string | undefined, currState: AppState, caseId: string, dispatch: ThunkDispatch, getState: () => AppState): Promise {\r\n let followUpQuestion: Question | undefined;\r\n if (followUpId !== undefined) {\r\n let followUp: FollowUpQuestion | undefined;\r\n followUp = currState.interviewQuestions.followUpQuestionCache[followUpId];\r\n if (followUp === undefined) {\r\n let retrievedFollowUps = await getFollowUpQuestions(caseId, baseQuestionId, followUpId);\r\n await dispatch(storeFollowUpQuestionAction(followUpId, retrievedFollowUps));\r\n }\r\n currState = getState();\r\n followUp = currState.interviewQuestions.followUpQuestionCache[followUpId];\r\n followUpQuestion = convertFollowUpQuestion(followUp);\r\n }\r\n return followUpQuestion;\r\n}\r\n\r\nconst convertFollowUpQuestion = (followUp: FollowUpQuestion | undefined): Question | undefined => {\r\n let followUpQuestion: Question | undefined;\r\n\r\n if (followUp !== undefined) {\r\n followUpQuestion = {\r\n id: followUp.id,\r\n type: followUp.type,\r\n options: followUp.options.map(a => {\r\n return {\r\n value: a.value,\r\n text: a.text,\r\n followUpId: a.followUpQuestion === undefined ? undefined : a.followUpQuestion.id\r\n };\r\n }),\r\n text: followUp.text,\r\n followUpQuestionRetrieved: false\r\n };\r\n }\r\n\r\n return followUpQuestion;\r\n}\r\n","import { ActionCreator, AnyAction } from \"redux\";\r\nimport { ThunkAction, ThunkDispatch } from \"redux-thunk\";\r\nimport moment from 'moment';\r\n\r\nimport AppState from \"../../models/State/AppState\";\r\nimport PageOrderData from \"../../models/PageOrderData\";\r\nimport { getPageOrder } from \"../../accessors/BrandingAccessor\";\r\nimport Gender from \"../../models/Gender\";\r\nimport { getGender, getDateOfBirth, getUseNicotineProducts, getReferrer as getReferrerFromUri, getState as getStateFromUri, getEmail as getEmailFromUri, getPartnerSubdomain as getPartnerSubdomainFromUri } from \"../../UriUtilities\";\r\nimport DemographicInformationState from \"../../models/State/DemographicInformationState\";\r\nimport demographicInformationReducer from \"../Validation/DemographicInformationReducer\";\r\nimport CurrentPage from \"../../models/CurrentPage\";\r\nimport { loadAvailableStates } from \"../AvailableStates/Actions\";\r\nimport { updateGenderAction, updateUseNicotineProductsAction, updateStateAction, updateDateOfBirthAction, updateReferrerAction, updateEmailAction, updatePartnerSubdomainAction } from \"../DemographicInformation/Actions\";\r\nimport { saveQuestionAnswerAction } from \"../InterviewQuestions/Actions\";\r\nimport { getCurrentQuestion } from \"../InterviewQuestions/Utilities\";\r\n\r\nexport const NEXT = 'current_page/next';\r\nexport const PREVIOUS = 'current_page/previous';\r\nexport const DETAILS = 'current_page/details';\r\nexport const FULL_DETAILS = 'current_page/fulldetails';\r\nexport const FULL_TERMS = 'current_page/fullterms';\r\nexport const HIDE_STATEUNAVAILABLEMODAL = 'current_page/hide_stateunavailablemodal';\r\nexport const APPROVED = 'current_page/approved';\r\nexport const DECLINED = 'current_page/declined';\r\nexport const FETCH_PAGEORDER = 'current_page/fetch_pageorder';\r\nexport const RECEIVED_PAGEORDER = 'current_page/received_pageorder';\r\nexport const UPDATE_CURRENTQUESTION = 'current_page/update_currentquestion';\r\n\r\ntype Types = typeof NEXT |\r\n typeof PREVIOUS |\r\n typeof DETAILS |\r\n typeof FULL_DETAILS |\r\n typeof FULL_TERMS |\r\n typeof HIDE_STATEUNAVAILABLEMODAL |\r\n typeof APPROVED |\r\n typeof DECLINED |\r\n typeof FETCH_PAGEORDER |\r\n typeof RECEIVED_PAGEORDER |\r\n typeof UPDATE_CURRENTQUESTION;\r\n\r\nexport interface NextPagePayload {\r\n}\r\n\r\nexport interface PreviousPagePayload {\r\n}\r\n\r\nexport interface DetailsPagePayload {\r\n}\r\n\r\nexport interface FullDetailsPagePayload {\r\n}\r\n\r\nexport interface FullTermsPagePayload {\r\n}\r\n\r\nexport interface HideStateUnavailablePayload {\r\n}\r\n\r\nexport interface ApprovedPagePayload {\r\n}\r\n\r\nexport interface DeclinedPagePayload {\r\n}\r\n\r\nexport interface FetchPageOrderPayload {\r\n}\r\n\r\nexport interface ReceivedPageOrderPayload {\r\n pageOrder?: PageOrderData[];\r\n dateOfBirth?: string;\r\n gender?: string;\r\n useTobacco?: string;\r\n state?: string;\r\n}\r\n\r\nexport interface UpdateCurrentQuestionPayload {\r\n index: number;\r\n}\r\n\r\ntype TypePayload = { type: T1, payload: T2 };\r\n\r\nexport function moveNextPageAction(): TypePayload {\r\n return { type: NEXT, payload: {} };\r\n}\r\n\r\nexport function previousPageAction(): TypePayload {\r\n return { type: PREVIOUS, payload: {} };\r\n}\r\n\r\nexport function detailsPageAction(): TypePayload {\r\n return { type: DETAILS, payload: {} };\r\n}\r\n\r\nexport function fullDetailsPageAction(): TypePayload {\r\n return { type: FULL_DETAILS, payload: {} };\r\n}\r\n\r\nexport function fullTermsPageAction(): TypePayload {\r\n return { type: FULL_TERMS, payload: {} };\r\n}\r\n\r\nexport function approvedPageAction(): TypePayload {\r\n return { type: APPROVED, payload: {} };\r\n}\r\n\r\nexport function declinedPageAction(): TypePayload {\r\n return { type: DECLINED, payload: {} };\r\n}\r\n\r\nexport function hideStateUnavailableModalAction(): TypePayload {\r\n return { type: HIDE_STATEUNAVAILABLEMODAL, payload: {} };\r\n}\r\n\r\nexport function updateCurrentQuestionAction(index: number): TypePayload {\r\n return { type: UPDATE_CURRENTQUESTION, payload: { index: index } };\r\n}\r\n\r\nexport const loadPageOrderAction: ActionCreator, AppState, null, AnyAction>> = (dateOfBirth: string | undefined, gender: string | undefined, useTobacco: string | undefined, state: string | undefined) => {\r\n return async (dispatch: ThunkDispatch, getState: () => AppState): Promise => {\r\n let currState = getState();\r\n if (currState.currentPage.pageOrder === undefined && !currState.benefitAmount.isLoadingAvailableAmounts) {\r\n dispatch(fetchPageOrderAction());\r\n\r\n let pageOrder = await getPageOrder();\r\n if (pageOrder !== undefined) {\r\n let dob = parseDateOfBirth(getDateOfBirth());\r\n let gender = parseGender(getGender());\r\n let useNicotineProducts = parseUseNicotine(getUseNicotineProducts());\r\n let state = getStateFromUri();\r\n let email = getEmailFromUri();\r\n let referrer = getReferrerFromUri();\r\n let partnerSubdomain = getPartnerSubdomainFromUri();\r\n if (state !== undefined && state.length > 0) {\r\n await dispatch(loadAvailableStates());\r\n state = state.toUpperCase();\r\n currState = getState();\r\n }\r\n\r\n let demographicInformation: DemographicInformationState = \r\n { \r\n ...currState.demographicInformation, \r\n dateOfBirth: dob, \r\n gender: gender, \r\n useNicotineProducts: useNicotineProducts, \r\n referrer: referrer, \r\n state: state, \r\n email: email,\r\n partnerSubdomain: partnerSubdomain\r\n };\r\n\r\n let appStateClone = { ...currState, demographicInformation: demographicInformation };\r\n let validationData = demographicInformationReducer(appStateClone);\r\n if (validationData.fields.isGenderValid) {\r\n await dispatch(updateGenderAction(demographicInformation.gender));\r\n pageOrder = pageOrder.filter(a => a.page !== CurrentPage.Gender);\r\n }\r\n if (validationData.fields.isNicotineProductsValid) {\r\n await dispatch(updateUseNicotineProductsAction(demographicInformation.useNicotineProducts));\r\n pageOrder = pageOrder.filter(a => a.page !== CurrentPage.NicotineProducts);\r\n }\r\n if (validationData.fields.isStateValid === true && validationData.fields.isStateAvailable) {\r\n await dispatch(updateStateAction(demographicInformation.state));\r\n pageOrder = pageOrder.filter(a => a.page !== CurrentPage.State);\r\n }\r\n if (validationData.fields.dateOfBirthValidation !== undefined && validationData.fields.dateOfBirthValidation.length === 0) {\r\n await dispatch(updateDateOfBirthAction(demographicInformation.dateOfBirth));\r\n pageOrder = pageOrder.filter(a => a.page !== CurrentPage.DateOfBirth);\r\n }\r\n await dispatch(updateReferrerAction(referrer));\r\n await dispatch(updateEmailAction(email));\r\n await dispatch(updatePartnerSubdomainAction(partnerSubdomain));\r\n }\r\n\r\n return dispatch(receivedPageOrderAction(pageOrder));\r\n }\r\n };\r\n}\r\n\r\nexport const nextPageAction: ActionCreator, AppState, null, AnyAction>> = () => {\r\n return async (dispatch: ThunkDispatch, getState: () => AppState): Promise => {\r\n let currState = getState();\r\n dispatch(saveQuestionAnswerAction(getCurrentQuestion(currState)));\r\n dispatch(moveNextPageAction());\r\n };\r\n}\r\n\r\nfunction parseDateOfBirth(dateOfBirth?: string): Date | undefined {\r\n let dob: Date | undefined;\r\n if (dateOfBirth !== undefined && dateOfBirth.length > 0) {\r\n let dobMoment = moment(dateOfBirth);\r\n if (dobMoment.isValid()) {\r\n dob = dobMoment.toDate();\r\n }\r\n }\r\n return dob;\r\n}\r\n\r\nfunction parseGender(gender?: string): Gender | undefined {\r\n if (gender === undefined || gender.length === 0) {\r\n return undefined;\r\n }\r\n if (gender.toLowerCase() === \"f\" || gender.toLowerCase() === \"female\") {\r\n return Gender.Female;\r\n }\r\n if (gender.toLowerCase() === \"m\" || gender.toLowerCase() === \"male\") {\r\n return Gender.Male;\r\n }\r\n return undefined;\r\n}\r\n\r\nfunction parseUseNicotine(useNicotineProducts?: string): boolean | undefined {\r\n if (useNicotineProducts === undefined || useNicotineProducts.length === 0) {\r\n return undefined;\r\n }\r\n if (useNicotineProducts.toLowerCase() === \"t\" || useNicotineProducts.toLowerCase() === \"true\" || useNicotineProducts.toLowerCase() === \"1\") {\r\n return true;\r\n }\r\n if (useNicotineProducts.toLowerCase() === \"f\" || useNicotineProducts.toLowerCase() === \"false\" || useNicotineProducts.toLowerCase() === \"0\") {\r\n return false;\r\n }\r\n return undefined;\r\n}\r\n\r\nexport function fetchPageOrderAction(): TypePayload {\r\n return { type: FETCH_PAGEORDER, payload: {} };\r\n}\r\n\r\nexport function receivedPageOrderAction(pageOrder?: PageOrderData[], dateOfBirth?: string, gender?: string, useTobacco?: string, state?: string): TypePayload {\r\n return {\r\n type: RECEIVED_PAGEORDER,\r\n payload: {\r\n pageOrder: pageOrder,\r\n dateOfBirth: dateOfBirth,\r\n gender: gender,\r\n useTobacco: useTobacco,\r\n state: state\r\n }\r\n };\r\n}","import NicotineType from \"../../models/NicotineType\";\r\n\r\n// Action Types\r\nexport const UPDATE_USERDIDACCEPTTERMS = 'personal_information/update_userdidacceptterms';\r\nexport const UPDATE_USERSFIRSTNAME = 'personal_information/update_usersfirstname';\r\nexport const UPDATE_USERSLASTNAME = 'personal_information/update_userslastname';\r\nexport const UPDATE_EMAILADDRESS = 'personal_information/update_emailaddress';\r\nexport const UPDATE_DATEOFBIRTH = 'personal_information/update_dateofbirth';\r\nexport const UPDATE_STREETADDRESS = 'personal_information/update_streetaddress';\r\nexport const UPDATE_STREETADDRESS2 = 'personal_information/update_streetaddress2';\r\nexport const UPDATE_CITY = 'personal_information/update_city';\r\nexport const UPDATE_ZIP = 'personal_information/update_zip';\r\nexport const UPDATE_ISCITIZEN = 'personal_information/update_iscitizen';\r\nexport const UPDATE_HASEXISTINGCOVERAGE = 'personal_information/update_hasexistingcoverage';\r\nexport const UPDATE_HASCOMPREHENSIVEHEALTHCARE = 'personal_information/update_hascomprehensivehealthcare';\r\nexport const UPDATE_ISPERMANENTRESIDENT = 'personal_information/update_ispermanentresident';\r\nexport const UPDATE_GREENCARD = 'personal_information/update_greencard';\r\nexport const UPDATE_BIRTHCOUNTRY = 'personal_information/update_birthcountry';\r\nexport const UPDATE_BIRTHSTATE = 'personal_information/update_birthstate';\r\nexport const UPDATE_PHONENUMBER = 'personal_information/update_phonenumber';\r\nexport const UPDATE_SOCIALSECURITYNUMBER = 'personal_information/update_socialsecuritynumber';\r\nexport const UPDATE_TOBACCOUSES = 'personal_information/update_tobaccouses';\r\nexport const UPDATE_TOBACCOTYPE = 'personal_information/update_tobaccotype';\r\nexport const UPDATE_TOBACCODAILYUSECOUNT = 'personal_information/update_tobaccodailyusecount';\r\nexport const UPDATE_TOBACCOMONTHLYUSECOUNT = 'personal_information/update_tobaccomonthlyusecount';\r\nexport const UPDATE_TOBACCOLASTUSEDATE = 'personal_information/update_tobaccolastusedate';\r\nexport const UPDATE_HEIGHTFEET = 'personal_information/update_heightfeet';\r\nexport const UPDATE_HEIGHTINCHES = 'personal_information/update_heightinches';\r\nexport const UPDATE_WEIGHT = 'personal_information/update_weight';\r\n\r\nexport type Types = typeof UPDATE_USERDIDACCEPTTERMS |\r\n typeof UPDATE_USERSFIRSTNAME |\r\n typeof UPDATE_USERSLASTNAME |\r\n typeof UPDATE_EMAILADDRESS |\r\n typeof UPDATE_STREETADDRESS |\r\n typeof UPDATE_STREETADDRESS2 |\r\n typeof UPDATE_CITY |\r\n typeof UPDATE_ZIP |\r\n typeof UPDATE_ISCITIZEN |\r\n typeof UPDATE_HASEXISTINGCOVERAGE |\r\n typeof UPDATE_HASCOMPREHENSIVEHEALTHCARE |\r\n typeof UPDATE_ISPERMANENTRESIDENT |\r\n typeof UPDATE_GREENCARD |\r\n typeof UPDATE_BIRTHCOUNTRY |\r\n typeof UPDATE_BIRTHSTATE |\r\n typeof UPDATE_PHONENUMBER |\r\n typeof UPDATE_SOCIALSECURITYNUMBER |\r\n typeof UPDATE_TOBACCOUSES |\r\n typeof UPDATE_TOBACCOTYPE |\r\n typeof UPDATE_TOBACCODAILYUSECOUNT |\r\n typeof UPDATE_TOBACCOMONTHLYUSECOUNT |\r\n typeof UPDATE_TOBACCOLASTUSEDATE |\r\n typeof UPDATE_HEIGHTFEET |\r\n typeof UPDATE_HEIGHTINCHES |\r\n typeof UPDATE_WEIGHT;\r\n\r\nexport interface UpdateUserDidAcceptTermsPayload{\r\n userDidAcceptTerms?: boolean\r\n}\r\n\r\nexport interface UpdateUsersFirstNamePayload {\r\n usersFirstName?: string;\r\n}\r\n\r\nexport interface UpdateUsersLastNamePayload {\r\n usersLastName?: string;\r\n}\r\n\r\nexport interface UpdateEmailAddressPayload {\r\n emailAddress?: string;\r\n}\r\n\r\nexport interface UpdateStreetAddressPayload {\r\n streetAddress?: string;\r\n}\r\n\r\nexport interface UpdateStreetAddress2Payload {\r\n streetAddress2?: string;\r\n}\r\n\r\nexport interface UpdateCityPayload {\r\n city?: string;\r\n}\r\n\r\nexport interface UpdateZipPayload {\r\n zip?: string;\r\n}\r\n\r\nexport interface UpdateIsCitizenPayload {\r\n isCitizen?: boolean;\r\n}\r\n\r\nexport interface UpdateHasExistingCoveragePayload {\r\n hasExistingCoverage?: boolean;\r\n}\r\n\r\nexport interface UpdateHasComprehensiveHealthcarePayload {\r\n hasComprehensiveHealthcare?: boolean;\r\n}\r\n\r\nexport interface UpdateIsPermanentResidentPayload {\r\n isPermanentResident?: boolean;\r\n}\r\n\r\nexport interface UpdateGreenCardPayload {\r\n greenCard?: string;\r\n}\r\n\r\nexport interface UpdateBirthCountryPayload {\r\n birthCountry?: string;\r\n}\r\n\r\nexport interface UpdateBirthStatePayload {\r\n birthState?: string;\r\n}\r\n\r\nexport interface UpdatePhoneNumberPayload {\r\n phoneNumber?: string;\r\n}\r\n\r\nexport interface UpdateSocialSecurityNumberPayload {\r\n socialSecurityNumber?: string;\r\n}\r\n\r\nexport interface UpdateTobaccoUses {\r\n tobaccoUses: boolean;\r\n}\r\n\r\nexport interface UpdateTobaccoType {\r\n tobaccoType?: NicotineType;\r\n}\r\n\r\nexport interface UpdateTobaccoDailyUseCount {\r\n tobaccoDailyUseCount: number;\r\n}\r\n\r\nexport interface UpdateTobaccoMonthlyUseCount {\r\n tobaccoMonthlyUseCount: number;\r\n}\r\n\r\nexport interface UpdateTobaccoLastUseDate {\r\n tobaccoLastUseDate: Date;\r\n}\r\n\r\nexport interface UpdateHeightFeetPayload {\r\n feet?: number;\r\n}\r\n\r\nexport interface UpdateHeightInchesPayload {\r\n inches?: number;\r\n}\r\n\r\nexport interface UpdateWeightPayload {\r\n pounds?: number;\r\n}\r\n\r\ntype TypePayload = { type: T1, payload: T2 };\r\n\r\nexport function updateUsersDidAcceptTermsAction(userDidAcceptTerms?: boolean): TypePayload {\r\n return { type: UPDATE_USERDIDACCEPTTERMS, payload: { userDidAcceptTerms: userDidAcceptTerms } };\r\n}\r\n\r\nexport function updateUsersFirstNameAction(usersFirstName?: string): TypePayload {\r\n return { type: UPDATE_USERSFIRSTNAME, payload: { usersFirstName: usersFirstName } };\r\n}\r\n\r\nexport function updateUsersLastNameAction(usersLastName?: string): TypePayload {\r\n return { type: UPDATE_USERSLASTNAME, payload: { usersLastName: usersLastName } };\r\n}\r\n\r\nexport function updateEmailAddressAction(emailAddress?: string): TypePayload {\r\n return { type: UPDATE_EMAILADDRESS, payload: { emailAddress: emailAddress } };\r\n}\r\n\r\nexport function updateStreetAddressAction(streetAddress?: string): TypePayload {\r\n return { type: UPDATE_STREETADDRESS, payload: { streetAddress: streetAddress } };\r\n}\r\n\r\nexport function updateStreetAddress2Action(streetAddress?: string): TypePayload {\r\n return { type: UPDATE_STREETADDRESS2, payload: { streetAddress2: streetAddress } };\r\n}\r\n\r\nexport function updateCityAction(city?: string): TypePayload {\r\n return { type: UPDATE_CITY, payload: { city: city } };\r\n}\r\n\r\nexport function updateZipAction(zip?: string): TypePayload {\r\n return { type: UPDATE_ZIP, payload: { zip: zip } };\r\n}\r\n\r\nexport function updateIsCitizenAction(isCitizen?: boolean): TypePayload {\r\n return { type: UPDATE_ISCITIZEN, payload: { isCitizen: isCitizen } };\r\n}\r\n\r\nexport function updateHasExistingCoverageAction(hasExistingCoverage?: boolean): TypePayload {\r\n return { type: UPDATE_HASEXISTINGCOVERAGE, payload: { hasExistingCoverage: hasExistingCoverage } };\r\n}\r\n\r\nexport function updateHasComprehensiveHealthcareAction(hasComprehensiveHealthcare?: boolean): TypePayload {\r\n return { type: UPDATE_HASCOMPREHENSIVEHEALTHCARE, payload: { hasComprehensiveHealthcare: hasComprehensiveHealthcare } };\r\n}\r\n\r\nexport function updateIsPermanentResidentAction(isPermanentResident?: boolean): TypePayload {\r\n return { type: UPDATE_ISPERMANENTRESIDENT, payload: { isPermanentResident: isPermanentResident } };\r\n}\r\n\r\nexport function updateGreenCardAction(greenCard?: string): TypePayload {\r\n return { type: UPDATE_GREENCARD, payload: { greenCard: greenCard } };\r\n}\r\n\r\nexport function updateBirthCountryAction(birthCountry?: string): TypePayload {\r\n return { type: UPDATE_BIRTHCOUNTRY, payload: { birthCountry: birthCountry } };\r\n}\r\n\r\nexport function updateBirthStateAction(birthState?: string): TypePayload {\r\n return { type: UPDATE_BIRTHSTATE, payload: { birthState: birthState } };\r\n}\r\n\r\nexport function updatePhoneNumberAction(phoneNumber?: string): TypePayload {\r\n return { type: UPDATE_PHONENUMBER, payload: { phoneNumber: phoneNumber } };\r\n}\r\n\r\nexport function updateSocialSecurityNumberAction(socialSecurityNumber?: string): TypePayload {\r\n return { type: UPDATE_SOCIALSECURITYNUMBER, payload: { socialSecurityNumber: socialSecurityNumber } };\r\n}\r\n\r\nexport function updateTobaccoUsesAction(tobaccoUses: boolean): TypePayload {\r\n return { type: UPDATE_TOBACCOUSES, payload: { tobaccoUses: tobaccoUses } };\r\n}\r\n\r\nexport function updateTobaccoTypeAction(tobaccoType: NicotineType | undefined): TypePayload {\r\n return { type: UPDATE_TOBACCOTYPE, payload: { tobaccoType: tobaccoType } };\r\n}\r\n\r\nexport function updateTobaccoDailyUseCountAction(tobaccoDailyUseCount: number): TypePayload {\r\n return { type: UPDATE_TOBACCODAILYUSECOUNT, payload: { tobaccoDailyUseCount: tobaccoDailyUseCount } };\r\n}\r\n\r\nexport function updateTobaccoMonthlyUseCountAction(tobaccoMonthlyUseCount: number): TypePayload {\r\n return { type: UPDATE_TOBACCOMONTHLYUSECOUNT, payload: { tobaccoMonthlyUseCount: tobaccoMonthlyUseCount } };\r\n}\r\n\r\nexport function updateTobaccoLastUseDateAction(tobaccoLastUseDate: Date): TypePayload {\r\n return { type: UPDATE_TOBACCOLASTUSEDATE, payload: { tobaccoLastUseDate: tobaccoLastUseDate } };\r\n}\r\n\r\nexport function updateHeightFeetAction(feet?: number): TypePayload {\r\n return { type: UPDATE_HEIGHTFEET, payload: { feet: feet } };\r\n}\r\n\r\nexport function updateHeightInchesAction(inches?: number): TypePayload {\r\n return { type: UPDATE_HEIGHTINCHES, payload: { inches: inches } };\r\n}\r\n\r\nexport function updateWeightAction(pounds?: number): TypePayload {\r\n return { type: UPDATE_WEIGHT, payload: { pounds: pounds } };\r\n}","import CurrentPage from \"../CurrentPage\";\r\nimport PageOrderData from \"../PageOrderData\";\r\n\r\nexport enum LastPageMovement{\r\n Forward,\r\n Backward\r\n}\r\n\r\nexport default interface CurrentPageState {\r\n currentPage?: CurrentPage;\r\n previousPages?: CurrentPage[];\r\n pageOrder?: PageOrderData[];\r\n isLoadingPageOrderData: boolean;\r\n canGoBack:boolean;\r\n canContinue:boolean;\r\n progress?: number;\r\n displayStateIsUnavailable?: boolean;\r\n currentQuestionIndex?: number;\r\n lastPageMovement?:LastPageMovement;\r\n}","import CurrentPage from \"../../models/CurrentPage\";\r\n\r\nexport const personalInformationPages = [CurrentPage.Birthstate, CurrentPage.Body, CurrentPage.Citizenship, CurrentPage.PermanentStatus, CurrentPage.Phone, CurrentPage.Residence, CurrentPage.SocialSecurityNumber, CurrentPage.UserIdentification, CurrentPage.NicotineDetails, CurrentPage.ExistingCoverage, CurrentPage.ComprehensiveHealthcare];\r\nexport const demographicInformationPages = [CurrentPage.Gender, CurrentPage.NicotineProducts, CurrentPage.State, CurrentPage.DateOfBirth];","import { ApplicationInsights } from '@microsoft/applicationinsights-web';\r\nimport { ReactPlugin } from '@microsoft/applicationinsights-react-js';\r\nimport { createBrowserHistory } from \"history\";\r\nimport { getSettings } from './Settings';\r\nimport ReactGA from 'react-ga';\r\nimport AppState from './models/State/AppState';\r\nimport CurrentPage from './models/CurrentPage';\r\nimport { getCurrentQuestion } from './redux/InterviewQuestions/Utilities';\r\nimport { Store } from 'redux';\r\n\r\nexport const initializeApplicationInsights = (): ReactPlugin | undefined => {\r\n const browserHistory = createBrowserHistory({ basename: '' });\r\n let aiInstrumentationKey = normalizeSetting(getSettings().aiInstrumentationKey);\r\n if (aiInstrumentationKey === undefined) {\r\n return undefined;\r\n }\r\n let reactPlugin = new ReactPlugin();\r\n let appInsights = new ApplicationInsights({\r\n config: {\r\n instrumentationKey: aiInstrumentationKey,\r\n extensions: [reactPlugin],\r\n extensionConfig: {\r\n [reactPlugin.identifier]: { history: browserHistory }\r\n }\r\n }\r\n });\r\n appInsights.loadAppInsights();\r\n return reactPlugin;\r\n}\r\n\r\nlet currentState: AppState;\r\nexport const initializeGoogleAnalytics = (store: Store): void => {\r\n let gaKey = normalizeSetting(getSettings().gaKey);\r\n if (gaKey === undefined) {\r\n return;\r\n }\r\n ReactGA.initialize(gaKey);\r\n\r\n store.subscribe(() => {\r\n let previousState = currentState;\r\n currentState = store.getState();\r\n if (previousState === undefined || currentState.currentPage.currentPage !== previousState.currentPage.currentPage) {\r\n recordPageView(currentState);\r\n }\r\n else if (currentState.currentPage.currentPage === CurrentPage.InterviewQuestions && currentState.currentPage.currentQuestionIndex !== previousState.currentPage.currentQuestionIndex) {\r\n recordPageView(currentState);\r\n }\r\n });\r\n}\r\n\r\nconst recordPageView = (state: AppState): void => {\r\n if (state.currentPage.currentPage === undefined) {\r\n return;\r\n }\r\n if (state.currentPage.currentPage === CurrentPage.InterviewQuestions) {\r\n let currentQuestion = getCurrentQuestion(state);\r\n if (currentQuestion !== undefined) {\r\n ReactGA.pageview(`${CurrentPage[state.currentPage.currentPage]}_${currentQuestion.id}`);\r\n return;\r\n }\r\n }\r\n ReactGA.pageview(CurrentPage[state.currentPage.currentPage]);\r\n}\r\n\r\nexport const recordEvent = (category: string, action: string, label?: string, value?: number): void => {\r\n let gaKey = normalizeSetting(getSettings().gaKey);\r\n if (gaKey === undefined) {\r\n return;\r\n }\r\n ReactGA.event({category: category, action: action, label: label, value: value});\r\n}\r\n\r\nconst normalizeSetting = (value: string | undefined): string | undefined => {\r\n if (value === undefined ||\r\n value === null ||\r\n value.length === 0 ||\r\n (value.startsWith('#') && value.endsWith('#'))) {\r\n return undefined;\r\n }\r\n return value;\r\n}\r\n\r\n\r\n","import CurrentPage from \"../../models/CurrentPage\";\r\nimport * as Actions from './Actions';\r\nimport * as PersonalInformationActions from '../PersonalInformation/Actions';\r\nimport * as DemographicInformationActions from '../DemographicInformation/Actions';\r\nimport CurrentPageState, { LastPageMovement } from \"../../models/State/CurrentPageState\";\r\nimport AppState from \"../../models/State/AppState\";\r\nimport { getNextQuestion, getPreviousQuestion, isCurrentQuestionComplete } from \"../InterviewQuestions/Utilities\";\r\nimport CaseResult from \"../../models/CaseResult\";\r\nimport { personalInformationPages } from \"./Utilities\";\r\nimport { recordEvent } from \"../../TrackingHelpers\";\r\nimport DemographicInformationState from \"../../models/State/DemographicInformationState\";\r\n\r\ntype Action = ReturnType |\r\n ReturnType |\r\n ReturnType |\r\n ReturnType |\r\n ReturnType |\r\n ReturnType |\r\n ReturnType |\r\n ReturnType |\r\n ReturnType |\r\n ReturnType |\r\n ReturnType |\r\n ReturnType | \r\n ReturnType;\r\n\r\nconst nonWorkflowPages = [\r\n CurrentPage.SeeDetails,\r\n CurrentPage.FullTerms,\r\n CurrentPage.FullDetails\r\n]\r\n\r\nconst nextPageReducer = (state: AppState): CurrentPageState => {\r\n if (state.currentPage.previousPages === undefined) {\r\n state.currentPage.previousPages = [];\r\n }\r\n if (state.currentPage.currentPage !== undefined) {\r\n state.currentPage.previousPages.push(state.currentPage.currentPage);\r\n }\r\n\r\n let nextPage = getNextPage(state);\r\n\r\n return { ...state.currentPage, ...nextPage, lastPageMovement: LastPageMovement.Forward };\r\n};\r\n\r\nconst getNextPage = (state: AppState): Partial => {\r\n if (state.currentPage.pageOrder === undefined || state.currentPage.pageOrder.length === 0) {\r\n return { ...setupPageProps(state, state.currentPage.currentPage) };\r\n }\r\n\r\n if (state.currentPage.currentPage === undefined) {\r\n return { currentPage: state.currentPage.pageOrder[0].page, ...setupPageProps(state, state.currentPage.pageOrder[0].page) };\r\n }\r\n\r\n if (!canContinue(state)) {\r\n return { ...setupPageProps(state, state.currentPage.currentPage) };\r\n }\r\n\r\n let nextPage: CurrentPage;\r\n let questionIndex: number | undefined = undefined;\r\n if (state.currentPage.currentPage === CurrentPage.State && !state.validation.demographicInformation.fields.isStateAvailable) {\r\n nextPage = CurrentPage.State\r\n recordEvent(\"Demographic Information\", \"Selected unavailable state\", state.demographicInformation.state);\r\n } else if (state.currentPage.currentPage === CurrentPage.InterviewQuestions) {\r\n let nextQuestion = getNextQuestion(state);\r\n if (!nextQuestion.hasQuestionsLoaded) {\r\n nextPage = CurrentPage.InterviewQuestions;\r\n } else if (nextQuestion.movedPast) {\r\n nextPage = findNextPage(state);\r\n } else {\r\n nextPage = CurrentPage.InterviewQuestions;\r\n questionIndex = nextQuestion.questionIndex\r\n }\r\n } else if (state.currentPage.currentPage === CurrentPage.CaseDecisionDetermination && state.case.caseResult !== undefined && state.case.caseResult !== CaseResult.Processing) {\r\n if (state.case.caseResult === CaseResult.Declined) {\r\n nextPage = CurrentPage.Declined;\r\n } else if (state.case.caseResult === CaseResult.SentToUnderwriting) {\r\n nextPage = CurrentPage.TentativeSentToUnderwriting;\r\n } else {\r\n nextPage = CurrentPage.TentativeApproved;\r\n }\r\n } else if (state.currentPage.currentPage === CurrentPage.SubmittingApplication && state.policy !== undefined && state.policy.policyNumber !== undefined) {\r\n nextPage = CurrentPage.FinalApproved;\r\n }\r\n else if (state.currentPage.currentPage === CurrentPage.TentativeApproved || state.currentPage.currentPage === CurrentPage.TentativeSentToUnderwriting ) {\r\n nextPage = CurrentPage.Payment;\r\n } else {\r\n nextPage = findNextPage(state);\r\n }\r\n\r\n return { currentPage: nextPage, currentQuestionIndex: questionIndex, ...setupPageProps(state, nextPage) };\r\n};\r\n\r\nconst findNextPage = (state: AppState): CurrentPage => {\r\n if (state.currentPage.currentPage === undefined || state.currentPage.pageOrder === undefined) {\r\n throw Error(\"Invalid page state\");\r\n }\r\n\r\n let currentPageIndex = state.currentPage.pageOrder.findIndex(a => a.page === state.currentPage.currentPage);\r\n let nextPageInOrder = state.currentPage.pageOrder.find((a, i) => i > currentPageIndex && a.isRequired);\r\n if (nextPageInOrder === undefined) {\r\n return state.currentPage.currentPage;\r\n } else {\r\n return nextPageInOrder.page;\r\n }\r\n}\r\n\r\nconst setupPageProps = (state: AppState, page?: CurrentPage): Partial => {\r\n if (page === CurrentPage.State) {\r\n return {\r\n displayStateIsUnavailable: !state.validation.demographicInformation.fields.isStateAvailable\r\n }\r\n }\r\n return {};\r\n}\r\n\r\nconst previousPageReducer = (state: AppState): CurrentPageState => {\r\n let nextPage = getPreviousPage(state);\r\n return { ...state.currentPage, ...(nextPage as any), lastPageMovement: LastPageMovement.Backward };\r\n}\r\n\r\nconst getPreviousPage = (state: AppState): Partial => {\r\n if (state.currentPage.pageOrder === undefined || state.currentPage.pageOrder.length === 0) {\r\n return { currentPage: state.currentPage.currentPage, ...setupPageProps(state, state.currentPage.currentPage) };\r\n }\r\n\r\n if (state.currentPage.currentPage === undefined) {\r\n return { currentPage: state.currentPage.pageOrder[0].page, ...setupPageProps(state, state.currentPage.pageOrder[0].page) };\r\n }\r\n\r\n if (!canGoBack(state)) {\r\n return { currentPage: state.currentPage.currentPage, ...setupPageProps(state, state.currentPage.currentPage) };\r\n }\r\n\r\n let previousPage: CurrentPage;\r\n let questionIndex: number | undefined = undefined;\r\n if (state.currentPage.currentPage === CurrentPage.InterviewQuestions) {\r\n let nextQuestion = getPreviousQuestion(state);\r\n if (!nextQuestion.hasQuestionsLoaded) {\r\n previousPage = CurrentPage.InterviewQuestions;\r\n } else if (nextQuestion.movedPast) {\r\n previousPage = findPreviousPage(state);\r\n } else {\r\n previousPage = CurrentPage.InterviewQuestions;\r\n questionIndex = nextQuestion.questionIndex\r\n }\r\n } else {\r\n previousPage = findPreviousPage(state);\r\n }\r\n\r\n if (state.currentPage.previousPages !== undefined && nonWorkflowPages.includes(state.currentPage.currentPage)) {\r\n let nextPage = state.currentPage.previousPages.pop();\r\n return { currentPage: nextPage, currentQuestionIndex: questionIndex, ...setupPageProps(state, previousPage) };\r\n } else if (state.currentPage.previousPages !== undefined) {\r\n state.currentPage.previousPages.pop();\r\n }\r\n\r\n return { currentPage: previousPage, currentQuestionIndex: questionIndex, ...setupPageProps(state, previousPage) };\r\n}\r\n\r\nconst findPreviousPage = (state: AppState) => {\r\n if (state.currentPage.currentPage === undefined || state.currentPage.pageOrder === undefined) {\r\n throw Error(\"Invalid page state\");\r\n }\r\n let currentPageIndex = state.currentPage.pageOrder.findIndex(a => a.page === state.currentPage.currentPage);\r\n let prevPageInOrder;\r\n for (let i = currentPageIndex - 1; i >= 0; i--) {\r\n if (state.currentPage.pageOrder[i].isRequired) {\r\n prevPageInOrder = state.currentPage.pageOrder[i];\r\n break;\r\n }\r\n }\r\n if (prevPageInOrder === undefined) {\r\n return state.currentPage.currentPage;\r\n } else {\r\n return prevPageInOrder.page;\r\n }\r\n}\r\n\r\nconst getPotentialPreviousPage = (state: AppState): CurrentPage | undefined => {\r\n if (state.currentPage.pageOrder === undefined || state.currentPage.pageOrder.length === 0) {\r\n return state.currentPage.currentPage;\r\n }\r\n\r\n let previousPage: CurrentPage;\r\n\r\n let currentPageIndex = state.currentPage.pageOrder.findIndex(a => a.page === state.currentPage.currentPage);\r\n let prevPageInOrder;\r\n for (let i = currentPageIndex - 1; i >= 0; i--) {\r\n if (state.currentPage.pageOrder[i].isRequired) {\r\n prevPageInOrder = state.currentPage.pageOrder[i];\r\n break;\r\n }\r\n }\r\n if (prevPageInOrder === undefined) {\r\n return state.currentPage.currentPage;\r\n }\r\n previousPage = prevPageInOrder.page;\r\n\r\n return previousPage;\r\n}\r\n\r\nconst detailsPageReducer = (state: CurrentPageState, action: Action): CurrentPageState => {\r\n if (action.type !== Actions.DETAILS) {\r\n return state;\r\n }\r\n if (state.currentPage !== undefined && state.previousPages !== undefined) {\r\n state.previousPages.push(state.currentPage);\r\n }\r\n\r\n return { ...state, currentPage: CurrentPage.SeeDetails, lastPageMovement: LastPageMovement.Forward };\r\n}\r\n\r\n\r\nconst fullDetailsPageReducer = (state: CurrentPageState, action: Action): CurrentPageState => {\r\n if (action.type !== Actions.FULL_DETAILS) {\r\n return state;\r\n }\r\n if (state.currentPage !== undefined && state.previousPages !== undefined) {\r\n state.previousPages.push(state.currentPage);\r\n }\r\n\r\n return { ...state, currentPage: CurrentPage.FullDetails, lastPageMovement: LastPageMovement.Forward };\r\n}\r\n\r\n\r\nconst fullTermsPageReducer = (state: CurrentPageState, action: Action): CurrentPageState => {\r\n if (action.type !== Actions.FULL_TERMS) {\r\n return state;\r\n }\r\n if (state.currentPage !== undefined && state.previousPages !== undefined) {\r\n state.previousPages.push(state.currentPage);\r\n }\r\n\r\n return { ...state, currentPage: CurrentPage.FullTerms, lastPageMovement: LastPageMovement.Forward };\r\n}\r\n\r\nconst approvedPageReducer = (state: CurrentPageState, action: Action): CurrentPageState => {\r\n if (action.type !== Actions.APPROVED) {\r\n return state;\r\n }\r\n\r\n return { ...state, currentPage: CurrentPage.FinalApproved };\r\n}\r\n\r\nconst declinedPageReducer = (state: CurrentPageState, action: Action): CurrentPageState => {\r\n if (action.type !== Actions.DECLINED) {\r\n return state;\r\n }\r\n\r\n return { ...state, currentPage: CurrentPage.Declined };\r\n}\r\n\r\nconst updateIsCitizenReducer = (state: CurrentPageState, action: Action): CurrentPageState => {\r\n if (action.type !== PersonalInformationActions.UPDATE_ISCITIZEN || state.pageOrder === undefined) {\r\n return state;\r\n }\r\n let permanentStatusPageIndex = state.pageOrder.findIndex(a => a.page === CurrentPage.PermanentStatus);\r\n if (permanentStatusPageIndex === -1) {\r\n return state;\r\n }\r\n let items = [...state.pageOrder];\r\n let item = { ...state.pageOrder[permanentStatusPageIndex], isRequired: !action.payload.isCitizen };\r\n items[permanentStatusPageIndex] = item;\r\n\r\n return { ...state, pageOrder: items };\r\n}\r\n\r\nconst updateStateReducer = (state: CurrentPageState, action: Action, demographicInformation: DemographicInformationState): CurrentPageState => {\r\n if (action.type !== DemographicInformationActions.UPDATE_STATE || state.pageOrder === undefined) {\r\n return state;\r\n }\r\n let comprehensiveHealthcarePageIndex = state.pageOrder.findIndex(a => a.page === CurrentPage.ComprehensiveHealthcare);\r\n if (comprehensiveHealthcarePageIndex === -1) {\r\n return state;\r\n }\r\n let items = [...state.pageOrder];\r\n let item = { ...state.pageOrder[comprehensiveHealthcarePageIndex], isRequired: demographicInformation.state === \"CA\" };\r\n items[comprehensiveHealthcarePageIndex] = item;\r\n\r\n return { ...state, pageOrder: items };\r\n}\r\n\r\n\r\nconst fetchPageOrderReducer = (state: CurrentPageState, action: Action): CurrentPageState => {\r\n if (action.type !== Actions.FETCH_PAGEORDER) {\r\n return state;\r\n }\r\n\r\n return { ...state, isLoadingPageOrderData: true };\r\n}\r\n\r\nconst hideStateUnavailableModalReducer = (state: CurrentPageState, action: Action): CurrentPageState => {\r\n if (action.type !== Actions.HIDE_STATEUNAVAILABLEMODAL) {\r\n return state;\r\n }\r\n\r\n if (state.currentPage !== CurrentPage.State) {\r\n return state;\r\n }\r\n return { ...state, displayStateIsUnavailable: false };\r\n}\r\n\r\nconst receivedPageOrderReducer = (state: CurrentPageState, action: Action, demographicInformation: DemographicInformationState): CurrentPageState => {\r\n if (action.type !== Actions.RECEIVED_PAGEORDER) {\r\n return state;\r\n }\r\n\r\n let currentPage: CurrentPage | undefined;\r\n if (action.payload.pageOrder !== undefined && action.payload.pageOrder.length > 0) {\r\n currentPage = action.payload.pageOrder[0].page;\r\n }\r\n\r\n if(action.payload.pageOrder !== undefined) {\r\n let comprehensiveHealthcarePageIndex = action.payload.pageOrder.findIndex(a => a.page === CurrentPage.ComprehensiveHealthcare);\r\n if (comprehensiveHealthcarePageIndex > -1) {\r\n action.payload.pageOrder[comprehensiveHealthcarePageIndex].isRequired = (demographicInformation.state === \"CA\");\r\n }\r\n }\r\n\r\n return { ...state, currentPage: currentPage, pageOrder: action.payload.pageOrder, isLoadingPageOrderData: false, displayStateIsUnavailable: false };\r\n}\r\n\r\nconst updateCurrentQuestionReducer = (state: CurrentPageState, action: Action): CurrentPageState => {\r\n if (action.type !== Actions.UPDATE_CURRENTQUESTION) {\r\n return state;\r\n }\r\n\r\n return { ...state, currentQuestionIndex: action.payload.index };\r\n}\r\n\r\nexport default function setCurrentPageState(state: AppState, action?: Action): CurrentPageState {\r\n let appState = { ...state };\r\n if (appState.currentPage === undefined) {\r\n appState.currentPage = { isLoadingPageOrderData: false, canGoBack: false, canContinue: false };\r\n }\r\n\r\n if (appState.currentPage.currentPage === undefined || (action !== undefined && action.type === Actions.NEXT)) {\r\n appState.currentPage = nextPageReducer(appState);\r\n }\r\n if (action !== undefined && action.type === Actions.PREVIOUS) {\r\n appState.currentPage = previousPageReducer(appState);\r\n }\r\n if (action !== undefined && action.type === Actions.DETAILS) {\r\n appState.currentPage = detailsPageReducer(appState.currentPage, action);\r\n }\r\n if (action !== undefined && action.type === Actions.FULL_DETAILS) {\r\n appState.currentPage = fullDetailsPageReducer(appState.currentPage, action);\r\n }\r\n if (action !== undefined && action.type === Actions.FULL_TERMS) {\r\n appState.currentPage = fullTermsPageReducer(appState.currentPage, action);\r\n }\r\n if (action !== undefined && action.type === Actions.APPROVED) {\r\n appState.currentPage = approvedPageReducer(appState.currentPage, action);\r\n }\r\n if (action !== undefined && action.type === Actions.DECLINED) {\r\n appState.currentPage = declinedPageReducer(appState.currentPage, action);\r\n }\r\n if (action !== undefined && action.type === Actions.FETCH_PAGEORDER) {\r\n appState.currentPage = fetchPageOrderReducer(appState.currentPage, action);\r\n }\r\n if (action !== undefined && action.type === Actions.RECEIVED_PAGEORDER) {\r\n appState.currentPage = receivedPageOrderReducer(appState.currentPage, action, appState.demographicInformation);\r\n }\r\n if (action !== undefined && action.type === PersonalInformationActions.UPDATE_ISCITIZEN) {\r\n appState.currentPage = updateIsCitizenReducer(appState.currentPage, action);\r\n }\r\n if (action !== undefined && action.type === DemographicInformationActions.UPDATE_STATE) {\r\n appState.currentPage = updateStateReducer(appState.currentPage, action, appState.demographicInformation);\r\n }\r\n if (action !== undefined && action.type === Actions.HIDE_STATEUNAVAILABLEMODAL) {\r\n appState.currentPage = hideStateUnavailableModalReducer(appState.currentPage, action);\r\n }\r\n if (action !== undefined && action.type === Actions.UPDATE_CURRENTQUESTION) {\r\n appState.currentPage = updateCurrentQuestionReducer(appState.currentPage, action);\r\n }\r\n\r\n return setCanNavigateState(appState);\r\n}\r\n\r\nconst setCanNavigateState = (state: AppState): CurrentPageState => {\r\n return {\r\n ...state.currentPage,\r\n canGoBack: canGoBack(state),\r\n canContinue: canContinue(state),\r\n progress: getProgress(state)\r\n };\r\n}\r\n\r\nconst getProgress = (state: AppState): number | undefined => {\r\n if (state.currentPage.pageOrder === undefined || state.currentPage.currentPage === undefined) {\r\n return undefined;\r\n }\r\n\r\n if (personalInformationPages.some(a => state.currentPage.currentPage === a)) {\r\n let totalCount = 0;\r\n let completedCount = 0;\r\n let currentPageFound = false;\r\n\r\n if (state.currentPage.pageOrder === undefined) {\r\n return undefined;\r\n }\r\n\r\n state.currentPage.pageOrder.forEach(a => {\r\n if (a.page === state.currentPage.currentPage) {\r\n currentPageFound = true;\r\n }\r\n if (a.isRequired && personalInformationPages.some(b => a.page === b)) {\r\n totalCount++;\r\n if (!currentPageFound) {\r\n completedCount++;\r\n }\r\n }\r\n })\r\n\r\n return completedCount / totalCount * 50;\r\n } else if (state.currentPage.currentPage === CurrentPage.InterviewQuestions) {\r\n if (state.currentPage.currentQuestionIndex === undefined || state.interviewQuestions.questions === undefined) {\r\n return 50;\r\n }\r\n return (state.currentPage.currentQuestionIndex / state.interviewQuestions.questions.length * 50) + 50\r\n } else {\r\n return undefined;\r\n }\r\n\r\n\r\n}\r\n\r\nconst canGoBack = (state: AppState): boolean => {\r\n if (state.currentPage.currentPage === CurrentPage.InterviewQuestions && state.currentPage.currentQuestionIndex !== undefined && state.currentPage.currentQuestionIndex > 0) {\r\n return true;\r\n }\r\n if (state.currentPage.currentPage === undefined || state.currentPage.pageOrder === undefined || state.currentPage.pageOrder.length === 0) {\r\n return false;\r\n }\r\n if (state.currentPage.pageOrder[0].page === state.currentPage.currentPage) {\r\n return false;\r\n }\r\n if (state.currentPage.currentPage === CurrentPage.BenefitSelection) {\r\n return false;\r\n }\r\n\r\n var previousPage = getPotentialPreviousPage(state);\r\n if (previousPage === CurrentPage.BenefitSelection) {\r\n return false;\r\n }\r\n return true;\r\n}\r\n\r\nconst canContinue = (state: AppState): boolean => {\r\n if (state.currentPage.currentPage === undefined || state.currentPage.pageOrder === undefined || state.currentPage.pageOrder.length === 0) {\r\n return false;\r\n }\r\n if (state.currentPage.pageOrder[state.currentPage.pageOrder.length - 1].page === state.currentPage.currentPage) {\r\n return false;\r\n }\r\n switch (state.currentPage.currentPage) {\r\n case CurrentPage.DateOfBirth:\r\n return !state.validation.demographicInformation.fields.dateOfBirthValidation;\r\n case CurrentPage.Gender:\r\n return state.validation.demographicInformation.fields.isGenderValid;\r\n case CurrentPage.State:\r\n return state.validation.demographicInformation.fields.isStateValid;\r\n case CurrentPage.NicotineProducts:\r\n return state.validation.demographicInformation.fields.isNicotineProductsValid;\r\n case CurrentPage.BenefitSelection:\r\n return state.validation.selectedAmount.fields.isSelectedAmountValid;\r\n case CurrentPage.Terms:\r\n return state.validation.personalInformation.fields.userDidAcceptTerms;\r\n case CurrentPage.Birthstate:\r\n return state.validation.personalInformation.fields.isBirthLocationValid;\r\n case CurrentPage.Body:\r\n return state.validation.personalInformation.fields.isHeightFeetValid &&\r\n state.validation.personalInformation.fields.isHeightInchesValid &&\r\n state.validation.personalInformation.fields.isWeightValid;\r\n case CurrentPage.Citizenship:\r\n return state.validation.personalInformation.fields.isCitizenValid;\r\n case CurrentPage.ExistingCoverage:\r\n return state.validation.personalInformation.fields.isHasExistingCoverageValid;\r\n case CurrentPage.ComprehensiveHealthcare:\r\n return state.validation.personalInformation.fields.isHasComprehensiveHealthcareValid;\r\n case CurrentPage.PermanentStatus:\r\n return state.validation.personalInformation.fields.isPermanentResidentValid &&\r\n state.validation.personalInformation.fields.isGreenCardValid;\r\n case CurrentPage.Phone:\r\n return state.validation.personalInformation.fields.isPhoneNumberValid;\r\n case CurrentPage.Residence:\r\n return state.validation.personalInformation.fields.isStreetAddressValid &&\r\n state.validation.personalInformation.fields.isCityValid &&\r\n state.validation.personalInformation.fields.isZipValid;\r\n case CurrentPage.SocialSecurityNumber:\r\n return state.validation.personalInformation.fields.isSocialSecurityNumberValid;\r\n case CurrentPage.NicotineDetails:\r\n return state.validation.personalInformation.fields.isTobaccoUsesValid &&\r\n state.validation.personalInformation.fields.isTobaccoTypeValid &&\r\n state.validation.personalInformation.fields.isTobaccoUseCountValid &&\r\n !state.validation.personalInformation.fields.tobaccoLastUseDateValidation;\r\n case CurrentPage.UserIdentification:\r\n return state.validation.personalInformation.fields.isUsersFirstNameValid &&\r\n state.validation.personalInformation.fields.isUsersLastNameValid &&\r\n state.validation.personalInformation.fields.isEmailAddressValid;\r\n case CurrentPage.Payment:\r\n return state.validation.payment.fields.isPaymentInformationValid &&\r\n state.validation.payment.fields.isPaymentTokenValid;\r\n case CurrentPage.InterviewQuestions:\r\n return isCurrentQuestionComplete(state) === true;\r\n case CurrentPage.CaseDecisionDetermination:\r\n return state.case.caseResult !== undefined &&\r\n state.case.caseResult !== CaseResult.Processing;\r\n case CurrentPage.TentativeApproved:\r\n return true;\r\n case CurrentPage.TentativeSentToUnderwriting:\r\n return true;\r\n case CurrentPage.SignDocuments:\r\n return true;\r\n case CurrentPage.SubmittingApplication:\r\n var canContinue = state.policy.policyNumber !== undefined && state.case.applicationSubmitted === true && state.case.caseResult !== undefined;\r\n return canContinue;\r\n }\r\n return false;\r\n}","import { Action } from 'redux';\r\n\r\ntype Handlers> = {\r\n readonly [Type in Types]: (state: State, action: Actions) => State\r\n}\r\n\r\nexport const createReducer = >(initialState: State, handlers: Handlers) => (state = initialState, action: Actions) => {\r\n return handlers.hasOwnProperty(action.type) ? handlers[action.type as Types](state, action) : state\r\n}","import { createReducer } from \"../ReducersUtilities\";\r\nimport * as Actions from './Actions';\r\nimport DemographicInformationState from \"../../models/State/DemographicInformationState\";\r\n\r\ntype Action = ReturnType |\r\n ReturnType |\r\n ReturnType |\r\n ReturnType |\r\n ReturnType | \r\n ReturnType |\r\n ReturnType;\r\n\r\nexport function updateDateOfBirthReducer(state: DemographicInformationState, action: Action): DemographicInformationState {\r\n if (action.type !== Actions.UPDATE_DATEOFBIRTH) {\r\n return state;\r\n }\r\n return { ...state, dateOfBirth: action.payload.dateOfBirth };\r\n}\r\n\r\nexport function updateGenderReducer(state: DemographicInformationState, action: Action): DemographicInformationState {\r\n if (action.type !== Actions.UPDATE_GENDER) {\r\n return state;\r\n }\r\n return { ...state, gender: action.payload.gender };\r\n}\r\n\r\nexport function updateEmailReducer(state: DemographicInformationState, action: Action): DemographicInformationState {\r\n if (action.type !== Actions.UPDATE_EMAIL) {\r\n return state;\r\n }\r\n return { ...state, email: action.payload.email };\r\n}\r\n\r\nexport function updateUseNicotineProductsReducer(state: DemographicInformationState, action: Action): DemographicInformationState {\r\n if (action.type !== Actions.UPDATE_USENICOTINEPRODUCTS) {\r\n return state;\r\n }\r\n return { ...state, useNicotineProducts: action.payload.useNicotineProducts };\r\n}\r\n\r\nexport function updateStateReducer(state: DemographicInformationState, action: Action): DemographicInformationState {\r\n if (action.type !== Actions.UPDATE_STATE) {\r\n return state;\r\n }\r\n let value = action.payload.state ? action.payload.state.trim() : action.payload.state;\r\n return { ...state, state: value };\r\n}\r\n\r\nexport function updateReferrerReducer(state: DemographicInformationState, action: Action): DemographicInformationState {\r\n if (action.type !== Actions.UPDATE_REFERRER) {\r\n return state;\r\n }\r\n return { ...state, referrer: action.payload.referrer };\r\n}\r\n\r\nexport function updatePartnerSubdomain(state: DemographicInformationState, action: Action): DemographicInformationState {\r\n if (action.type !== Actions.UPDATE_PARTNERSUBDOMAIN) {\r\n return state;\r\n }\r\n return { ...state, partnerSubdomain: action.payload.partnerSubdomain };\r\n}\r\n\r\nexport default createReducer({ referrer: '' }, {\r\n [Actions.UPDATE_DATEOFBIRTH]: updateDateOfBirthReducer,\r\n [Actions.UPDATE_GENDER]: updateGenderReducer,\r\n [Actions.UPDATE_USENICOTINEPRODUCTS]: updateUseNicotineProductsReducer,\r\n [Actions.UPDATE_STATE]: updateStateReducer,\r\n [Actions.UPDATE_REFERRER]: updateReferrerReducer,\r\n [Actions.UPDATE_EMAIL]: updateEmailReducer,\r\n [Actions.UPDATE_PARTNERSUBDOMAIN]: updatePartnerSubdomain,\r\n});","import { ActionCreator, AnyAction } from \"redux\";\r\nimport { ThunkAction, ThunkDispatch } from \"redux-thunk\";\r\n\r\nimport BenefitAmount from \"../../models/BenefitAmount\";\r\nimport AvailableBenefitAmount from \"../../models/AvailableBenefitAmount\";\r\nimport AppState from \"../../models/State/AppState\";\r\nimport { getAvailableBenefitAmounts } from \"../../accessors/QuoteAccessor\";\r\n\r\n// Action Types\r\nexport const SELECT_BENEFITAMOUNT = 'benefit_amount/select_benefitamount';\r\nexport const FETCH_AVAILABLEBENEFITAMOUNTS = 'benefit_amount/fetch_available';\r\nexport const RETRIEVED_AVAILABLEBENEFITAMOUNTS = 'benefit_amount/retrieved_available';\r\n\r\nexport type Types = typeof SELECT_BENEFITAMOUNT |\r\n typeof FETCH_AVAILABLEBENEFITAMOUNTS |\r\n typeof RETRIEVED_AVAILABLEBENEFITAMOUNTS;\r\n\r\nexport interface SelectBenefitAmountPayload{\r\n benefitAmount?: BenefitAmount;\r\n}\r\n\r\nexport interface FetchAvailableBenefitAmountsPayload{\r\n}\r\n\r\nexport interface RetrievedAvailableBenefitAmountsPayload{\r\n availableBenefitAmounts?: AvailableBenefitAmount[];\r\n}\r\n\r\ntype TypePayload = {type: T1, payload: T2};\r\n\r\nexport function selectBenefitAmountAction(benefitAmount?: BenefitAmount): TypePayload {\r\n return {type: SELECT_BENEFITAMOUNT, payload: {benefitAmount: benefitAmount}};\r\n}\r\n\r\nexport const loadAvailableBenefitAmountsAction: ActionCreator, AppState, null, AnyAction>> = () => {\r\n return async (dispatch: ThunkDispatch, getState: ()=>AppState): Promise => {\r\n const currState = getState();\r\n if(currState.benefitAmount.availableAmounts === undefined && !currState.benefitAmount.isLoadingAvailableAmounts){\r\n if(currState.demographicInformation.gender === undefined || currState.demographicInformation.dateOfBirth === undefined || currState.demographicInformation.useNicotineProducts === undefined|| currState.demographicInformation.state === undefined){\r\n throw new Error(\"not enough data to retrieve available benefit amounts\");\r\n }\r\n dispatch(fetchAvailableBenefitAmountsAction());\r\n\r\n const availableBenefitAmounts = await getAvailableBenefitAmounts(currState.demographicInformation.gender, currState.demographicInformation.dateOfBirth, currState.demographicInformation.useNicotineProducts, currState.demographicInformation.state, currState.demographicInformation.referrer, currState.demographicInformation.email, currState.demographicInformation.partnerSubdomain);\r\n return dispatch(retrievedAvailableBenefitAmountsAction(availableBenefitAmounts));\r\n }\r\n };\r\n}\r\n\r\nexport function fetchAvailableBenefitAmountsAction(): TypePayload {\r\n return {type: FETCH_AVAILABLEBENEFITAMOUNTS, payload: {}};\r\n}\r\n\r\nexport function retrievedAvailableBenefitAmountsAction(availableBenefitAmounts: AvailableBenefitAmount[]): TypePayload {\r\n return {type: RETRIEVED_AVAILABLEBENEFITAMOUNTS, payload: {availableBenefitAmounts: availableBenefitAmounts}};\r\n}\r\n\r\n","import { createReducer } from \"../ReducersUtilities\";\r\nimport * as Actions from './Actions';\r\nimport * as DemographicInformationActions from '../DemographicInformation/Actions';\r\nimport BenefitAmountState from \"../../models/State/BenefitAmountState\";\r\n\r\ntype Action = ReturnType |\r\n ReturnType |\r\n ReturnType |\r\n ReturnType |\r\n ReturnType |\r\n ReturnType |\r\n ReturnType;\r\n\r\ntype allActions = Actions.Types | \r\n typeof DemographicInformationActions.UPDATE_DATEOFBIRTH |\r\n typeof DemographicInformationActions.UPDATE_USENICOTINEPRODUCTS |\r\n typeof DemographicInformationActions.UPDATE_GENDER |\r\n typeof DemographicInformationActions.UPDATE_STATE;\r\n\r\nexport function updateKeyDemographicsReducer(state: BenefitAmountState, action: Action): BenefitAmountState {\r\n if (action.type !== DemographicInformationActions.UPDATE_DATEOFBIRTH &&\r\n action.type !== DemographicInformationActions.UPDATE_USENICOTINEPRODUCTS &&\r\n action.type !== DemographicInformationActions.UPDATE_GENDER &&\r\n action.type !== DemographicInformationActions.UPDATE_STATE) {\r\n return state;\r\n }\r\n \r\n return { ...state, availableAmounts: undefined, selectedAmount: undefined };\r\n}\r\n\r\nexport function selectBenefitAmountReducer(state: BenefitAmountState, action: Action): BenefitAmountState {\r\n if (action.type !== Actions.SELECT_BENEFITAMOUNT) {\r\n return state;\r\n }\r\n \r\n return { ...state, selectedAmount: action.payload.benefitAmount };\r\n}\r\n\r\nexport function fetchAvailableBenefitAmountsReducer(state: BenefitAmountState, action: Action): BenefitAmountState {\r\n if (action.type !== Actions.FETCH_AVAILABLEBENEFITAMOUNTS) {\r\n return state;\r\n }\r\n\r\n return { ...state, isLoadingAvailableAmounts: true };\r\n}\r\n\r\nexport function retrievedAvailableBenefitAmountsReducer(state: BenefitAmountState, action: Action): BenefitAmountState {\r\n if (action.type !== Actions.RETRIEVED_AVAILABLEBENEFITAMOUNTS) {\r\n return state;\r\n }\r\n\r\n var currSelectedAmount = state.selectedAmount;\r\n if(action.payload.availableBenefitAmounts===undefined){\r\n currSelectedAmount = undefined;\r\n } else {\r\n currSelectedAmount = action.payload.availableBenefitAmounts.find(a=>a.isRecommended);\r\n }\r\n \r\n return { ...state, availableAmounts: action.payload.availableBenefitAmounts, isLoadingAvailableAmounts: false, selectedAmount: currSelectedAmount };\r\n}\r\n\r\nexport default createReducer({isLoadingAvailableAmounts: false}, {\r\n [DemographicInformationActions.UPDATE_DATEOFBIRTH]: updateKeyDemographicsReducer,\r\n [DemographicInformationActions.UPDATE_USENICOTINEPRODUCTS]: updateKeyDemographicsReducer,\r\n [DemographicInformationActions.UPDATE_GENDER]: updateKeyDemographicsReducer,\r\n [DemographicInformationActions.UPDATE_STATE]: updateKeyDemographicsReducer,\r\n [Actions.SELECT_BENEFITAMOUNT]: selectBenefitAmountReducer,\r\n [Actions.FETCH_AVAILABLEBENEFITAMOUNTS]: fetchAvailableBenefitAmountsReducer,\r\n [Actions.RETRIEVED_AVAILABLEBENEFITAMOUNTS]: retrievedAvailableBenefitAmountsReducer,\r\n});","import { createReducer } from \"../ReducersUtilities\";\r\nimport * as Actions from './Actions';\r\nimport AvailableStatesState from \"../../models/State/AvailableStatesState\";\r\n\r\ntype Action = ReturnType |\r\n ReturnType;\r\n\r\nexport function fetchAvailableStatesReducer(state: AvailableStatesState, action: Action): AvailableStatesState {\r\n if (action.type !== Actions.FETCH_AVAILABLESTATES) {\r\n return state;\r\n }\r\n \r\n return { ...state, isLoadingAvailableStates: true };\r\n}\r\n\r\nexport function retrievedAvailableStatesReducer(state: AvailableStatesState, action: Action): AvailableStatesState {\r\n if (action.type !== Actions.RETRIEVED_AVAILABLESTATES) {\r\n return state;\r\n }\r\n \r\n return { ...state, availableStates: action.payload.availableStates, isLoadingAvailableStates: false };\r\n}\r\n\r\n\r\nexport default createReducer({isLoadingAvailableStates: false}, {\r\n [Actions.FETCH_AVAILABLESTATES]: fetchAvailableStatesReducer,\r\n [Actions.RETRIEVED_AVAILABLESTATES]: retrievedAvailableStatesReducer\r\n});","import { createReducer } from \"../ReducersUtilities\";\r\nimport * as Actions from './Actions';\r\nimport PersonalInformationState from \"../../models/State/PersonalInformationState\";\r\n\r\ntype Action = ReturnType |\r\n ReturnType |\r\n ReturnType |\r\n ReturnType |\r\n ReturnType |\r\n ReturnType |\r\n ReturnType |\r\n ReturnType |\r\n ReturnType |\r\n ReturnType |\r\n ReturnType |\r\n ReturnType |\r\n ReturnType |\r\n ReturnType |\r\n ReturnType |\r\n ReturnType |\r\n ReturnType |\r\n ReturnType |\r\n ReturnType |\r\n ReturnType |\r\n ReturnType |\r\n ReturnType |\r\n ReturnType |\r\n ReturnType |\r\n ReturnType;\r\n\r\nexport function updateUsersDidAcceptTermsReducer(state: PersonalInformationState, action: Action): PersonalInformationState {\r\n if (action.type !== Actions.UPDATE_USERDIDACCEPTTERMS) {\r\n return state;\r\n }\r\n return { ...state, userDidAcceptTerms: action.payload.userDidAcceptTerms };\r\n}\r\n\r\nexport function updateUsersFirstNameReducer(state: PersonalInformationState, action: Action): PersonalInformationState {\r\n if (action.type !== Actions.UPDATE_USERSFIRSTNAME) {\r\n return state;\r\n }\r\n return { ...state, usersFirstName: action.payload.usersFirstName };\r\n}\r\n\r\nexport function updateUsersLastNameReducer(state: PersonalInformationState, action: Action): PersonalInformationState {\r\n if (action.type !== Actions.UPDATE_USERSLASTNAME) {\r\n return state;\r\n }\r\n return { ...state, usersLastName: action.payload.usersLastName };\r\n}\r\n\r\nexport function updateEmailAddressReducer(state: PersonalInformationState, action: Action): PersonalInformationState {\r\n if (action.type !== Actions.UPDATE_EMAILADDRESS) {\r\n return state;\r\n }\r\n return { ...state, emailAddress: action.payload.emailAddress };\r\n}\r\n\r\nexport function updateStreetAddressReducer(state: PersonalInformationState, action: Action): PersonalInformationState {\r\n if (action.type !== Actions.UPDATE_STREETADDRESS) {\r\n return state;\r\n }\r\n return { ...state, streetAddress: action.payload.streetAddress };\r\n}\r\n\r\nexport function updateStreetAddress2Reducer(state: PersonalInformationState, action: Action): PersonalInformationState {\r\n if (action.type !== Actions.UPDATE_STREETADDRESS2) {\r\n return state;\r\n }\r\n return { ...state, streetAddress2: action.payload.streetAddress2 };\r\n}\r\n\r\nexport function updateCityReducer(state: PersonalInformationState, action: Action): PersonalInformationState {\r\n if (action.type !== Actions.UPDATE_CITY) {\r\n return state;\r\n }\r\n let value = action.payload.city ? action.payload.city.replace(/^\\s*/g, \"\") : action.payload.city;;\r\n if(value !== undefined){\r\n value = value.replace(/[^a-zA-Z\\s]/g, \"\");\r\n }\r\n return { ...state, city: value };\r\n}\r\n\r\nexport function updateZipReducer(state: PersonalInformationState, action: Action): PersonalInformationState {\r\n if (action.type !== Actions.UPDATE_ZIP) {\r\n return state;\r\n }\r\n let value = action.payload.zip ? action.payload.zip.trim() : action.payload.zip;\r\n return { ...state, zip: value };\r\n}\r\n\r\nexport function updateIsCitizenReducer(state: PersonalInformationState, action: Action): PersonalInformationState {\r\n if (action.type !== Actions.UPDATE_ISCITIZEN) {\r\n return state;\r\n }\r\n return updateCitizenshipData(state, action.payload.isCitizen, state.isPermanentResident, state.greenCard);\r\n}\r\n\r\nexport function updateHasExistingCoverageReducer(state: PersonalInformationState, action: Action): PersonalInformationState {\r\n if (action.type !== Actions.UPDATE_HASEXISTINGCOVERAGE) {\r\n return state;\r\n }\r\n return { ...state, hasExistingCoverage: action.payload.hasExistingCoverage };\r\n}\r\n\r\nexport function updateHasComprehensiveHealthcareReducer(state: PersonalInformationState, action: Action): PersonalInformationState {\r\n if (action.type !== Actions.UPDATE_HASCOMPREHENSIVEHEALTHCARE) {\r\n return state;\r\n }\r\n return { ...state, hasComprehensiveHealthcare: action.payload.hasComprehensiveHealthcare };\r\n}\r\n\r\nexport function updateIsPermanentResidentReducer(state: PersonalInformationState, action: Action): PersonalInformationState {\r\n if (action.type !== Actions.UPDATE_ISPERMANENTRESIDENT) {\r\n return state;\r\n }\r\n return updateCitizenshipData(state, state.isCitizen, action.payload.isPermanentResident, state.greenCard);\r\n}\r\n\r\nexport function updateGreenCardReducer(state: PersonalInformationState, action: Action): PersonalInformationState {\r\n if (action.type !== Actions.UPDATE_GREENCARD) {\r\n return state;\r\n }\r\n return updateCitizenshipData(state, state.isCitizen, state.isPermanentResident, action.payload.greenCard);\r\n}\r\n\r\nexport function updateBirthCountryReducer(state: PersonalInformationState, action: Action): PersonalInformationState {\r\n if (action.type !== Actions.UPDATE_BIRTHCOUNTRY) {\r\n return state;\r\n }\r\n return { ...state, birthCountry: action.payload.birthCountry };\r\n}\r\n\r\nexport function updateBirthStateReducer(state: PersonalInformationState, action: Action): PersonalInformationState {\r\n if (action.type !== Actions.UPDATE_BIRTHSTATE) {\r\n return state;\r\n }\r\n return { ...state, birthState: action.payload.birthState };\r\n}\r\n\r\nexport function updatePhoneNumberReducer(state: PersonalInformationState, action: Action): PersonalInformationState {\r\n if (action.type !== Actions.UPDATE_PHONENUMBER) {\r\n return state;\r\n }\r\n var value = action.payload.phoneNumber;\r\n if(value !== undefined){\r\n value = value.replace(/[^0-9]/g, \"\");\r\n if(value.length > 3)\r\n {\r\n value = \"(\" + value.substr(0, 3) + \") \" + value.substr(3);\r\n }\r\n if(value.length > 9){\r\n value = value.substr(0, 9) + \"-\" + value.substr(9);\r\n }\r\n }\r\n return { ...state, phoneNumber: value };\r\n}\r\n\r\nexport function updateSocialSecurityNumberReducer(state: PersonalInformationState, action: Action): PersonalInformationState {\r\n if (action.type !== Actions.UPDATE_SOCIALSECURITYNUMBER) {\r\n return state;\r\n }\r\n var value = action.payload.socialSecurityNumber;\r\n if(value !== undefined){\r\n value = value.replace(/[-]|[^0-9]/g, \"\");\r\n if(value.length > 3)\r\n {\r\n value = value.substr(0, 3) + \"-\" + value.substr(3);\r\n }\r\n if(value.length > 6){\r\n value = value.substr(0, 6) + \"-\" + value.substr(6);\r\n }\r\n }\r\n return { ...state, socialSecurityNumber: value };\r\n}\r\n\r\nexport function updateTobaccoUsesReducer(state: PersonalInformationState, action: Action): PersonalInformationState {\r\n if (action.type !== Actions.UPDATE_TOBACCOUSES) {\r\n return state;\r\n }\r\n return { ...state, tobaccoUses: action.payload.tobaccoUses };\r\n}\r\n\r\nexport function updateTobaccoTypeReducer(state: PersonalInformationState, action: Action): PersonalInformationState {\r\n if (action.type !== Actions.UPDATE_TOBACCOTYPE) {\r\n return state;\r\n }\r\n return { ...state, tobaccoType: action.payload.tobaccoType };\r\n}\r\n\r\nexport function updateTobaccoDailyUseCountReducer(state: PersonalInformationState, action: Action): PersonalInformationState {\r\n if (action.type !== Actions.UPDATE_TOBACCODAILYUSECOUNT) {\r\n return state;\r\n }\r\n return { ...state, tobaccoDailyUseCount: action.payload.tobaccoDailyUseCount };\r\n}\r\n\r\nexport function updateTobaccoMonthlyUseCountReducer(state: PersonalInformationState, action: Action): PersonalInformationState {\r\n if (action.type !== Actions.UPDATE_TOBACCOMONTHLYUSECOUNT) {\r\n return state;\r\n }\r\n return { ...state, tobaccoMonthlyUseCount: action.payload.tobaccoMonthlyUseCount };\r\n}\r\n\r\nexport function updateTobaccoLastUseDateReducer(state: PersonalInformationState, action: Action): PersonalInformationState {\r\n if (action.type !== Actions.UPDATE_TOBACCOLASTUSEDATE) {\r\n return state;\r\n }\r\n return { ...state, tobaccoLastUseDate: action.payload.tobaccoLastUseDate };\r\n}\r\n\r\nexport function updateHeightFeetReducer(state: PersonalInformationState, action: Action): PersonalInformationState {\r\n if (action.type !== Actions.UPDATE_HEIGHTFEET) {\r\n return state;\r\n }\r\n\r\n if(action.payload.feet !== undefined && action.payload.feet > 9){\r\n action.payload.feet = 9;\r\n }\r\n\r\n return { ...state, heightFeet: action.payload.feet };\r\n}\r\n\r\nexport function updateHeightInchesReducer(state: PersonalInformationState, action: Action): PersonalInformationState {\r\n if (action.type !== Actions.UPDATE_HEIGHTINCHES) {\r\n return state;\r\n }\r\n\r\n if(action.payload.inches !== undefined && action.payload.inches > 11){\r\n action.payload.inches = 11\r\n }\r\n\r\n return { ...state, heightInches: action.payload.inches };\r\n}\r\n\r\nexport function updateWeightReducer(state: PersonalInformationState, action: Action): PersonalInformationState {\r\n if (action.type !== Actions.UPDATE_WEIGHT) {\r\n return state;\r\n }\r\n\r\n if(action.payload.pounds !== undefined && action.payload.pounds > 1000){\r\n action.payload.pounds = 1000\r\n }\r\n\r\n return { ...state, weightPounds: action.payload.pounds };\r\n}\r\n\r\nconst updateCitizenshipData = (state: PersonalInformationState, isCitizen?: boolean, isPermanentResident?: boolean, greenCard?: string): PersonalInformationState => {\r\n if (isCitizen === undefined) {\r\n return {\r\n ...state,\r\n isCitizen: undefined,\r\n isPermanentResident: undefined,\r\n greenCard: undefined,\r\n };\r\n }\r\n if (isCitizen === true) {\r\n return {\r\n ...state,\r\n isCitizen: true,\r\n isPermanentResident: undefined,\r\n greenCard: undefined,\r\n };\r\n }\r\n if (isPermanentResident === undefined) {\r\n return {\r\n ...state,\r\n isCitizen: false,\r\n isPermanentResident: undefined,\r\n greenCard: undefined,\r\n };\r\n }\r\n if (isPermanentResident === true) {\r\n return {\r\n ...state,\r\n isCitizen: false,\r\n isPermanentResident: true,\r\n greenCard: greenCard,\r\n };\r\n }\r\n\r\n return {\r\n ...state,\r\n isCitizen: false,\r\n isPermanentResident: false,\r\n greenCard: undefined,\r\n };\r\n}\r\n\r\nexport default createReducer({birthCountry: \"USA\"}, {\r\n [Actions.UPDATE_USERDIDACCEPTTERMS]: updateUsersDidAcceptTermsReducer,\r\n [Actions.UPDATE_USERSFIRSTNAME]: updateUsersFirstNameReducer,\r\n [Actions.UPDATE_USERSLASTNAME]: updateUsersLastNameReducer,\r\n [Actions.UPDATE_EMAILADDRESS]: updateEmailAddressReducer,\r\n [Actions.UPDATE_STREETADDRESS]: updateStreetAddressReducer,\r\n [Actions.UPDATE_STREETADDRESS2]: updateStreetAddress2Reducer,\r\n [Actions.UPDATE_CITY]: updateCityReducer,\r\n [Actions.UPDATE_ZIP]: updateZipReducer,\r\n [Actions.UPDATE_ISCITIZEN]: updateIsCitizenReducer,\r\n [Actions.UPDATE_HASEXISTINGCOVERAGE]: updateHasExistingCoverageReducer,\r\n [Actions.UPDATE_HASCOMPREHENSIVEHEALTHCARE]: updateHasComprehensiveHealthcareReducer,\r\n [Actions.UPDATE_ISPERMANENTRESIDENT]: updateIsPermanentResidentReducer,\r\n [Actions.UPDATE_GREENCARD]: updateGreenCardReducer,\r\n [Actions.UPDATE_BIRTHCOUNTRY]: updateBirthCountryReducer,\r\n [Actions.UPDATE_BIRTHSTATE]: updateBirthStateReducer,\r\n [Actions.UPDATE_PHONENUMBER]: updatePhoneNumberReducer,\r\n [Actions.UPDATE_SOCIALSECURITYNUMBER]: updateSocialSecurityNumberReducer,\r\n [Actions.UPDATE_TOBACCOUSES]: updateTobaccoUsesReducer,\r\n [Actions.UPDATE_TOBACCOTYPE]: updateTobaccoTypeReducer,\r\n [Actions.UPDATE_TOBACCODAILYUSECOUNT]: updateTobaccoDailyUseCountReducer,\r\n [Actions.UPDATE_TOBACCOMONTHLYUSECOUNT]: updateTobaccoMonthlyUseCountReducer,\r\n [Actions.UPDATE_TOBACCOLASTUSEDATE]: updateTobaccoLastUseDateReducer,\r\n [Actions.UPDATE_HEIGHTFEET]: updateHeightFeetReducer,\r\n [Actions.UPDATE_HEIGHTINCHES]: updateHeightInchesReducer,\r\n [Actions.UPDATE_WEIGHT]: updateWeightReducer\r\n});","import AppState from \"../../models/State/AppState\";\r\nimport { ActionCreator, AnyAction } from \"redux\";\r\nimport { ThunkDispatch, ThunkAction } from \"redux-thunk\";\r\nimport { getBirthCountries } from \"../../accessors/QuoteAccessor\";\r\nimport AvailableCountry from \"../../models/AvailableCountry\";\r\n\r\n// Action Types\r\nexport const FETCH_AVAILABLECOUNTRIES = 'birth_location/fetch';\r\nexport const RETRIEVED_AVAILABLECOUNTRIES = 'birth_location/retrieved_availablecountries';\r\n\r\nexport type Types = typeof FETCH_AVAILABLECOUNTRIES |\r\n typeof RETRIEVED_AVAILABLECOUNTRIES;\r\n\r\nexport interface FetchAvailableCountriesPayload{\r\n}\r\n\r\nexport interface RetrievedAvailableCountriesPayload{\r\n availableCountries: AvailableCountry[];\r\n}\r\n\r\ntype TypePayload = {type: T1, payload: T2};\r\n\r\nexport const loadAvailableCountries: ActionCreator, AppState, null, AnyAction>> = () => {\r\n return async (dispatch: ThunkDispatch, getState: ()=>AppState): Promise => {\r\n const currState = getState();\r\n if(currState.birthLocation.availableCountries === undefined && !currState.birthLocation.isLoadingAvailableCountries){\r\n dispatch(fetchAvailableCountriesAction());\r\n const countries = await getBirthCountries();\r\n return dispatch(retrievedAvailableCountriesAction(countries));\r\n }\r\n };\r\n}\r\n\r\nexport function fetchAvailableCountriesAction(): TypePayload {\r\n return {type: FETCH_AVAILABLECOUNTRIES, payload: {}};\r\n}\r\n\r\nexport function retrievedAvailableCountriesAction(availableCountries: AvailableCountry[]): TypePayload {\r\n return {type: RETRIEVED_AVAILABLECOUNTRIES, payload: {availableCountries: availableCountries}};\r\n}","import { createReducer } from \"../ReducersUtilities\";\r\nimport * as Actions from './Actions';\r\nimport BirthLocationsState from \"../../models/State/BirthLocationsState\";\r\n\r\ntype Action = ReturnType |\r\n ReturnType;\r\n\r\nexport function fetchAvailableCountriesReducer(state: BirthLocationsState, action: Action): BirthLocationsState {\r\n if (action.type !== Actions.FETCH_AVAILABLECOUNTRIES) {\r\n return state;\r\n }\r\n \r\n return { ...state, isLoadingAvailableCountries: true };\r\n}\r\n\r\nexport function retrievedAvailableCountriesReducer(state: BirthLocationsState, action: Action): BirthLocationsState {\r\n if (action.type !== Actions.RETRIEVED_AVAILABLECOUNTRIES) {\r\n return state;\r\n }\r\n \r\n return { ...state, availableCountries: action.payload.availableCountries, isLoadingAvailableCountries: false };\r\n}\r\n\r\n\r\nexport default createReducer({isLoadingAvailableCountries: false}, {\r\n [Actions.FETCH_AVAILABLECOUNTRIES]: fetchAvailableCountriesReducer,\r\n [Actions.RETRIEVED_AVAILABLECOUNTRIES]: retrievedAvailableCountriesReducer\r\n});","import AppState from \"../../models/State/AppState\";\r\nimport { ActionCreator, AnyAction } from \"redux\";\r\nimport { ThunkDispatch, ThunkAction } from \"redux-thunk\";\r\nimport { ReactStripeElements } from \"react-stripe-elements\";\r\nimport { nextPageAction } from \"../CurrentPage/Actions\";\r\n\r\n// Action Types\r\nexport const UPDATE_CARDFIELDS = 'payment_state/update_cardfields';\r\nexport const FETCH_TOKEN = 'payment_state/fetch_token';\r\nexport const RETRIEVED_TOKEN = 'payment_state/retrieved_token';\r\n\r\nexport type Types = typeof UPDATE_CARDFIELDS |\r\n typeof FETCH_TOKEN |\r\n typeof RETRIEVED_TOKEN;\r\n\r\nexport interface UpdateCardFieldsPayload {\r\n elementChangeResponse: stripe.elements.ElementChangeResponse;\r\n}\r\n\r\nexport interface FetchTokenPayload {\r\n}\r\n\r\nexport interface RetrievedTokenPayload {\r\n tokenResponse: ReactStripeElements.PatchedTokenResponse;\r\n}\r\n\r\ntype TypePayload = { type: T1, payload: T2 };\r\n\r\nexport const submitCreditCardAction: ActionCreator, AppState, null, AnyAction>> = (stripeProps?: ReactStripeElements.StripeProps) => {\r\n return async (dispatch: ThunkDispatch, getState: () => AppState): Promise => {\r\n const currState = getState();\r\n if (stripeProps !== undefined) {\r\n dispatch(fetchTokenAction());\r\n const result = await stripeProps.createToken({\r\n name: `${currState.personalInformation.usersFirstName} ${currState.personalInformation.usersLastName}`\r\n });\r\n let value = dispatch(retrievedTokenAction(result));\r\n if (result.error) {\r\n return value;\r\n }\r\n return dispatch(nextPageAction());\r\n }\r\n };\r\n}\r\n\r\nexport function fetchTokenAction(): TypePayload {\r\n return { type: FETCH_TOKEN, payload: {} };\r\n}\r\n\r\nexport function retrievedTokenAction(tokenResponse: ReactStripeElements.PatchedTokenResponse): TypePayload {\r\n return { type: RETRIEVED_TOKEN, payload: { tokenResponse: tokenResponse } };\r\n}\r\n\r\nexport function updateCardFieldAction(elementChangeResponse: stripe.elements.ElementChangeResponse): TypePayload {\r\n return { type: UPDATE_CARDFIELDS, payload: { elementChangeResponse: elementChangeResponse } };\r\n}","import { createReducer } from \"../ReducersUtilities\";\r\nimport * as Actions from './Actions';\r\nimport PaymentState from \"../../models/State/PaymentState\";\r\n\r\ntype Action = ReturnType |\r\n ReturnType |\r\n ReturnType;\r\n\r\nexport function updateCardFieldReducer(state: PaymentState, action: Action): PaymentState {\r\n if (action.type !== Actions.UPDATE_CARDFIELDS) {\r\n return state;\r\n }\r\n\r\n return { ...state, stripeElementData: action.payload.elementChangeResponse };\r\n}\r\n\r\nexport function fetchAvailableStatesReducer(state: PaymentState, action: Action): PaymentState {\r\n if (action.type !== Actions.FETCH_TOKEN) {\r\n return state;\r\n }\r\n\r\n return { ...state, isRetrievingToken: true };\r\n}\r\n\r\nexport function retrievedAvailableStatesReducer(state: PaymentState, action: Action): PaymentState {\r\n if (action.type !== Actions.RETRIEVED_TOKEN) {\r\n return state;\r\n }\r\n\r\n if (action.payload.tokenResponse.error) {\r\n return { ...state, token: undefined, paymentError: action.payload.tokenResponse.error.message, isRetrievingToken: false };\r\n }\r\n\r\n if (!action.payload.tokenResponse.token || !action.payload.tokenResponse.token.id || !action.payload.tokenResponse.token.card) {\r\n return { ...state, token: undefined, paymentError: 'Unable to process credit card', isRetrievingToken: false };\r\n }\r\n\r\n return { ...state, paymentError: undefined, token: action.payload.tokenResponse.token.id, cardType: action.payload.tokenResponse.token.card.brand, isRetrievingToken: false };\r\n}\r\n\r\nexport default createReducer({ isRetrievingToken: false }, {\r\n [Actions.FETCH_TOKEN]: fetchAvailableStatesReducer,\r\n [Actions.RETRIEVED_TOKEN]: retrievedAvailableStatesReducer,\r\n [Actions.UPDATE_CARDFIELDS]: updateCardFieldReducer\r\n});","import { Validation, SelectedAmountValidation } from \"../../models/State/ValidationState\";\r\nimport AppState from \"../../models/State/AppState\";\r\n\r\n\r\nfunction isSelectedAmountValid(currState: AppState): boolean {\r\n if (currState.benefitAmount.availableAmounts === undefined) {\r\n return false;\r\n }\r\n if (currState.benefitAmount.selectedAmount === undefined) {\r\n return false;\r\n }\r\n var benefitAmount = currState.benefitAmount.selectedAmount.benefitAmount;\r\n return currState.benefitAmount.availableAmounts.some(a => a.benefitAmount === benefitAmount)\r\n}\r\n\r\nexport default function selectedAmount(currState: AppState): Validation {\r\n let fields: SelectedAmountValidation = {\r\n isSelectedAmountValid: isSelectedAmountValid(currState)\r\n }\r\n return {\r\n overall: fields.isSelectedAmountValid,\r\n fields: fields\r\n }\r\n}","import * as EmailValidator from 'email-validator';\r\n\r\nimport { Validation, PersonalInformationValidation } from \"../../models/State/ValidationState\";\r\nimport AppState from \"../../models/State/AppState\";\r\nimport moment from \"moment\";\r\nimport NicotineType from '../../models/NicotineType';\r\n\r\nconst userDidAcceptTerms = (currState: AppState): boolean => {\r\n if (currState.personalInformation.userDidAcceptTerms === undefined) {\r\n return false;\r\n }\r\n return currState.personalInformation.userDidAcceptTerms;\r\n}\r\n\r\nconst isUsersFirstNameValid = (currState: AppState): boolean => {\r\n return !isStringEmpty(currState.personalInformation.usersFirstName);\r\n}\r\n\r\nconst isUsersLastNameValid = (currState: AppState): boolean => {\r\n return !isStringEmpty(currState.personalInformation.usersLastName);\r\n}\r\n\r\nconst isEmailAddressValid = (currState: AppState): boolean => {\r\n return currState.personalInformation.emailAddress !== undefined && EmailValidator.validate(currState.personalInformation.emailAddress);\r\n}\r\n\r\nconst isStreetAddressValid = (currState: AppState): boolean => {\r\n return !isStringEmpty(currState.personalInformation.streetAddress);\r\n}\r\n\r\nconst isCityValid = (currState: AppState): boolean => {\r\n return !isStringEmpty(currState.personalInformation.city);\r\n}\r\n\r\nconst isZipValid = (currState: AppState): boolean => {\r\n return currState.personalInformation.zip !== undefined && currState.personalInformation.zip.length === 5;\r\n}\r\n\r\nconst isCitizenshipValid = (currState: AppState): { isCitizenValid: boolean, isPermanentResidentValid: boolean, isGreenCardRequired: boolean, isGreenCardValid: boolean } => {\r\n if (currState.personalInformation.isCitizen === undefined) {\r\n return {\r\n isCitizenValid: false,\r\n isPermanentResidentValid: false,\r\n isGreenCardRequired: false,\r\n isGreenCardValid: false\r\n };\r\n }\r\n if (currState.personalInformation.isCitizen === true) {\r\n return {\r\n isCitizenValid: true,\r\n isPermanentResidentValid: true,\r\n isGreenCardRequired: false,\r\n isGreenCardValid: true\r\n };\r\n }\r\n if (currState.personalInformation.isPermanentResident === undefined) {\r\n return {\r\n isCitizenValid: true,\r\n isPermanentResidentValid: false,\r\n isGreenCardRequired: false,\r\n isGreenCardValid: false\r\n };\r\n }\r\n if (currState.personalInformation.isPermanentResident === true) {\r\n return {\r\n isCitizenValid: true,\r\n isPermanentResidentValid: true,\r\n isGreenCardRequired: true,\r\n isGreenCardValid: !isStringEmpty(currState.personalInformation.greenCard)\r\n };\r\n }\r\n\r\n return {\r\n isCitizenValid: true,\r\n isPermanentResidentValid: true,\r\n isGreenCardRequired: false,\r\n isGreenCardValid: true\r\n };\r\n}\r\n\r\nconst isBirthLocationValid = (currState: AppState): boolean => {\r\n if (currState.birthLocation.availableCountries === undefined) {\r\n return false;\r\n }\r\n if (isStringEmpty(currState.personalInformation.birthCountry)) {\r\n return false;\r\n }\r\n let matchingCountry = currState.birthLocation.availableCountries.find(a => a.value === currState.personalInformation.birthCountry);\r\n if (matchingCountry === undefined) {\r\n return false;\r\n }\r\n if (matchingCountry.states === undefined || matchingCountry.states.length === 0) {\r\n return true;\r\n }\r\n let matchingState = matchingCountry.states.find(a => a.value === currState.personalInformation.birthState);\r\n return matchingState !== undefined;\r\n}\r\n\r\nconst isPhoneNumberValid = (currState: AppState): boolean => {\r\n return !isStringEmpty(currState.personalInformation.phoneNumber);\r\n}\r\n\r\nconst isSocialSecurityNumberValid = (currState: AppState): boolean => {\r\n return currState.personalInformation.socialSecurityNumber !== undefined && /^\\d{3}-\\d{2}-\\d{4}$/.test(currState.personalInformation.socialSecurityNumber);\r\n}\r\n\r\nconst isTobaccoUsesValid = (currState: AppState): boolean => {\r\n return currState.personalInformation.tobaccoUses !== undefined;\r\n}\r\n\r\nconst isTobaccoTypeValid = (currState: AppState): boolean => {\r\n if(currState.personalInformation.tobaccoUses === false){\r\n return true;\r\n }\r\n\r\n return currState.personalInformation.tobaccoType !== undefined;\r\n}\r\n\r\nconst isTobaccoUseCountValid = (currState: AppState): boolean => {\r\n if(currState.personalInformation.tobaccoUses === false){\r\n return true;\r\n }\r\n\r\n if(currState.personalInformation.tobaccoType === NicotineType.Smokeless ||\r\n currState.personalInformation.tobaccoType === NicotineType.Nicotine_Patches_Gum_Other){\r\n return true;\r\n }\r\n\r\n return (currState.personalInformation.tobaccoDailyUseCount !== undefined &&\r\n currState.personalInformation.tobaccoDailyUseCount > 0 ) ||\r\n (currState.personalInformation.tobaccoMonthlyUseCount !== undefined &&\r\n currState.personalInformation.tobaccoMonthlyUseCount > 0 );\r\n}\r\n\r\nfunction isTobaccoLastUseDateValid(currState: AppState) {\r\n if(currState.personalInformation.tobaccoUses === false){\r\n return \"\";\r\n }\r\n \r\n if(currState.personalInformation.tobaccoLastUseDate !== undefined ){\r\n if(currState.personalInformation.tobaccoLastUseDate > moment().toDate()){\r\n return \"Please enter a valid date (Cannot be a future date)\"\r\n }\r\n if(currState.demographicInformation.dateOfBirth !== undefined ){\r\n if(currState.personalInformation.tobaccoLastUseDate < currState.demographicInformation.dateOfBirth){\r\n return \"Please enter a valid date (Cannot be before date of birth)\"\r\n }\r\n }\r\n if(!moment(currState.personalInformation.tobaccoLastUseDate).isValid()){\r\n return \"Please enter a valid date.\";\r\n }\r\n } else {\r\n return \"Please enter a valid date (Date cannot be undefined)\";\r\n }\r\n\r\n return \"\";\r\n}\r\n\r\nconst isHeightFeetValid = (currState: AppState): boolean => {\r\n return currState.personalInformation.heightFeet !== undefined && currState.personalInformation.heightFeet > 0 && currState.personalInformation.heightFeet <= 9;\r\n}\r\n\r\nconst isHeightInchesValid = (currState: AppState): boolean => {\r\n return currState.personalInformation.heightInches !== undefined && currState.personalInformation.heightInches >= 0 && currState.personalInformation.heightInches < 12;\r\n}\r\n\r\nconst isWeightValid = (currState: AppState): boolean => {\r\n return currState.personalInformation.weightPounds !== undefined && currState.personalInformation.weightPounds > 0 && currState.personalInformation.weightPounds <= 1000;\r\n}\r\n\r\nconst isHasExistingCoverageValid = (currState: AppState): boolean => {\r\n return currState.personalInformation.hasExistingCoverage !== undefined;\r\n}\r\n\r\nconst isHasComprehensiveHealthcareValid = (currState: AppState): boolean => {\r\n return currState.personalInformation.hasComprehensiveHealthcare !== undefined;\r\n}\r\n\r\nfunction isStringEmpty(value?: string): boolean {\r\n return value === undefined || value === null || value.trim().length === 0;\r\n}\r\n\r\nexport default function personalInformationReducer(currState: AppState): Validation {\r\n let fields: PersonalInformationValidation = Object.assign(\r\n {},\r\n {\r\n userDidAcceptTerms: userDidAcceptTerms(currState),\r\n isUsersFirstNameValid: isUsersFirstNameValid(currState),\r\n isUsersLastNameValid: isUsersLastNameValid(currState),\r\n isEmailAddressValid: isEmailAddressValid(currState),\r\n isStreetAddressValid: isStreetAddressValid(currState),\r\n isCityValid: isCityValid(currState),\r\n isZipValid: isZipValid(currState),\r\n isBirthLocationValid: isBirthLocationValid(currState),\r\n isPhoneNumberValid: isPhoneNumberValid(currState),\r\n isSocialSecurityNumberValid: isSocialSecurityNumberValid(currState),\r\n isTobaccoUsesValid: isTobaccoUsesValid(currState),\r\n isTobaccoTypeValid: isTobaccoTypeValid(currState),\r\n isTobaccoUseCountValid: isTobaccoUseCountValid(currState),\r\n tobaccoLastUseDateValidation: isTobaccoLastUseDateValid(currState),\r\n isHeightFeetValid: isHeightFeetValid(currState),\r\n isHeightInchesValid: isHeightInchesValid(currState),\r\n isWeightValid: isWeightValid(currState),\r\n isHasExistingCoverageValid: isHasExistingCoverageValid(currState),\r\n isHasComprehensiveHealthcareValid: isHasComprehensiveHealthcareValid(currState) \r\n },\r\n isCitizenshipValid(currState)\r\n );\r\n return {\r\n overall: fields.userDidAcceptTerms &&\r\n fields.isUsersFirstNameValid &&\r\n fields.isUsersLastNameValid &&\r\n fields.isEmailAddressValid &&\r\n fields.isStreetAddressValid &&\r\n fields.isCityValid &&\r\n fields.isZipValid &&\r\n fields.isCitizenValid &&\r\n fields.isHasExistingCoverageValid &&\r\n fields.isHasComprehensiveHealthcareValid &&\r\n fields.isPermanentResidentValid &&\r\n fields.isGreenCardValid &&\r\n fields.isBirthLocationValid &&\r\n fields.isPhoneNumberValid &&\r\n fields.isSocialSecurityNumberValid &&\r\n fields.isTobaccoUsesValid &&\r\n fields.isTobaccoTypeValid &&\r\n fields.isTobaccoUseCountValid &&\r\n !fields.tobaccoLastUseDateValidation,\r\n fields: fields\r\n }\r\n}","import { Validation, PaymentValidation } from \"../../models/State/ValidationState\";\r\nimport AppState from \"../../models/State/AppState\";\r\n\r\nconst hasPaymentToken = (currState: AppState): boolean => {\r\n return !isStringEmpty(currState.payment.token) && isStringEmpty(currState.payment.paymentError);\r\n}\r\n\r\nconst isPaymentInformationValid = (currState: AppState): boolean => {\r\n return currState.payment.stripeElementData !== undefined && currState.payment.stripeElementData.complete && !currState.payment.stripeElementData.empty && currState.payment.stripeElementData.error === undefined;\r\n}\r\n\r\nfunction isStringEmpty(value?: string): boolean {\r\n return value === undefined || value === null || value.trim().length === 0;\r\n}\r\n\r\nexport default function personalInformationReducer(currState: AppState): Validation {\r\n let fields: PaymentValidation =\r\n {\r\n isPaymentTokenValid: hasPaymentToken(currState),\r\n isPaymentInformationValid: isPaymentInformationValid(currState)\r\n };\r\n return {\r\n overall: fields.isPaymentTokenValid &&\r\n fields.isPaymentInformationValid,\r\n fields: fields\r\n }\r\n}","import ValidationState from \"../../models/State/ValidationState\";\r\nimport AppState from \"../../models/State/AppState\";\r\nimport selectedAmount from \"./SelectedAmountReducer\";\r\nimport demographicInformationReducer from \"./DemographicInformationReducer\";\r\nimport personalInformationReducer from \"./PersonalInformationReducer\";\r\nimport paymentReducer from \"./PaymentReducer\";\r\n\r\nexport default function (currState: AppState): ValidationState {\r\n return {\r\n selectedAmount: selectedAmount(currState),\r\n demographicInformation: demographicInformationReducer(currState),\r\n personalInformation: personalInformationReducer(currState),\r\n payment: paymentReducer(currState)\r\n }\r\n}","import { createReducer } from \"../ReducersUtilities\";\r\nimport * as Actions from './Actions';\r\nimport CaseState from \"../../models/State/CaseState\";\r\n\r\ntype Action = ReturnType |\r\n ReturnType |\r\n ReturnType;\r\n\r\nexport function loadingCreateCaseReducer(state: CaseState, action: Action): CaseState {\r\n if (action.type !== Actions.CREATE_CASE) {\r\n return state;\r\n }\r\n\r\n return { ...state, isLoadingCaseResponse: true };\r\n}\r\n\r\nexport function receivedCreateCaseReducer(state: CaseState, action: Action): CaseState {\r\n if (action.type !== Actions.RETRIEVED_CASE) {\r\n return state;\r\n }\r\n\r\n return { ...state, case: action.payload.case, isLoadingCaseResponse: false };\r\n}\r\n\r\nexport function updateCaseResultReducer(state: CaseState, action: Action): CaseState {\r\n if (action.type !== Actions.UPDATE_CASERESULT) {\r\n return state;\r\n }\r\n return { ...state, caseResult: action.payload.result };\r\n}\r\n\r\nexport default createReducer({ isLoadingCaseResponse: false }, {\r\n [Actions.CREATE_CASE]: loadingCreateCaseReducer,\r\n [Actions.RETRIEVED_CASE]: receivedCreateCaseReducer,\r\n [Actions.UPDATE_CASERESULT]: updateCaseResultReducer\r\n});","import { ActionCreator, AnyAction } from \"redux\";\r\nimport { ThunkAction, ThunkDispatch } from \"redux-thunk\";\r\nimport AppState from \"../../models/State/AppState\";\r\nimport { getLinks } from \"../../accessors/BrandingAccessor\";\r\nimport { Dictionary } from \"../../models/State/BrandState\";\r\n\r\nexport const FETCH_BRANDLINKS = 'brand/fetch_brandlinks';\r\nexport const RECEIVED_BRANDLINKS = 'brand/received_brandlinks';\r\n\r\nexport type Types = typeof FETCH_BRANDLINKS |\r\n typeof RECEIVED_BRANDLINKS;\r\n\r\nexport interface FetchBrandLinksPayload {\r\n\r\n}\r\n\r\nexport interface ReceivedBrandLinksPayload {\r\n links?: Dictionary;\r\n}\r\n\r\ntype TypePayload = { type: T1, payload: T2 };\r\n\r\nexport const loadLinksAction: ActionCreator, AppState, null, AnyAction>> = () => {\r\n return async (dispatch: ThunkDispatch, getState: () => AppState): Promise => {\r\n const currState = getState();\r\n\r\n if (currState.brand.links === undefined && !currState.brand.isLoadingLinks) {\r\n dispatch(fetchBrandLinksAction());\r\n\r\n const links = await getLinks();\r\n return dispatch(receivedBrandLinksAction(links));\r\n }\r\n }\r\n}\r\n\r\nexport function fetchBrandLinksAction(): TypePayload {\r\n return { type: FETCH_BRANDLINKS, payload: {} };\r\n}\r\n\r\nexport function receivedBrandLinksAction(links?: Dictionary): TypePayload {\r\n return { type: RECEIVED_BRANDLINKS, payload: { links: links } };\r\n}","import * as Actions from './Actions';\r\nimport BrandState from \"../../models/State/BrandState\";\r\nimport { createReducer } from '../ReducersUtilities';\r\n\r\ntype Action = ReturnType |\r\n ReturnType;\r\n\r\nconst fetchBrandLinksReducer = (state: BrandState, action: Action): BrandState => {\r\n if (action.type !== Actions.FETCH_BRANDLINKS) {\r\n return state;\r\n }\r\n\r\n return { ...state, isLoadingLinks: true };\r\n}\r\n\r\nconst receivedBrandLinksReducer = (state: BrandState, action: Action): BrandState => {\r\n if (action.type !== Actions.RECEIVED_BRANDLINKS) {\r\n return state;\r\n }\r\n\r\n return { ...state, links: action.payload.links, isLoadingLinks: false, };\r\n}\r\n\r\nexport default createReducer({ isLoadingLinks: false }, {\r\n [Actions.FETCH_BRANDLINKS]: fetchBrandLinksReducer,\r\n [Actions.RECEIVED_BRANDLINKS]: receivedBrandLinksReducer\r\n});","import { createReducer } from \"../ReducersUtilities\";\r\nimport * as Actions from './Actions';\r\nimport InterviewQuestionsState from \"../../models/State/InterviewQuestionsState\";\r\nimport { Question, FollowUpQuestion, PickListOption, BaseQuestion } from \"../../models/Question\";\r\nimport { areQuestionAnswersSaving, areQuestionsFetchingFollowUps } from \"./Utilities\";\r\n\r\ntype Action = ReturnType |\r\n ReturnType |\r\n ReturnType |\r\n ReturnType |\r\n ReturnType |\r\n ReturnType |\r\n ReturnType |\r\n ReturnType |\r\n ReturnType;\r\n\r\nexport function fetchQuestionsReducer(state: InterviewQuestionsState, action: Action): InterviewQuestionsState {\r\n if (action.type !== Actions.FETCH_QUESTIONS) {\r\n return state;\r\n }\r\n return { ...state, isRetrievingQuestions: true };\r\n}\r\n\r\nexport function retrievedQuestionsReducer(state: InterviewQuestionsState, action: Action): InterviewQuestionsState {\r\n if (action.type !== Actions.RETRIEVED_QUESTIONS) {\r\n return state;\r\n }\r\n return { ...state, isRetrievingQuestions: false, questions: action.payload.questions };\r\n}\r\n\r\nexport function storeFollowUpQuestionReducer(state: InterviewQuestionsState, action: Action): InterviewQuestionsState {\r\n if (action.type !== Actions.STORE_FOLLOWUPQUESTION) {\r\n return state;\r\n }\r\n let cache = { ...state.followUpQuestionCache };\r\n cache[action.payload.followUpId] = action.payload.followUpQuestion;\r\n\r\n let flatCache = { ...state.flatFollowUpQuestionCache };\r\n setFlatFollowUpQuestionCache(flatCache, action.payload.followUpQuestion);\r\n\r\n return { ...state, followUpQuestionCache: cache, flatFollowUpQuestionCache: flatCache }\r\n}\r\n\r\nconst setFlatFollowUpQuestionCache = (cache: { [questionId: string]: FollowUpQuestion | undefined; }, followUpQuestion: FollowUpQuestion | undefined): void => {\r\n if (followUpQuestion === undefined) {\r\n return;\r\n }\r\n cache[followUpQuestion.id] = followUpQuestion;\r\n followUpQuestion.options.forEach(a => setFlatFollowUpQuestionCache(cache, a.followUpQuestion))\r\n}\r\n\r\nexport function answerQuestionReducer(state: InterviewQuestionsState, action: Action): InterviewQuestionsState {\r\n if (action.type !== Actions.ANSWER_QUESTION || state.questions === undefined) {\r\n return state;\r\n }\r\n\r\n let questionSet = updateQuestionSet(action.payload.id, state.questions, { answer: action.payload.answer, followUpQuestionRetrieved: false, followUpQuestion: undefined, pickList: action.payload.pickList });\r\n questionSet = updateQuestionSet(action.payload.baseQuestionId, questionSet, { hasSavedAnswer: false })\r\n return {\r\n ...state,\r\n isSavingAnswers: true,\r\n isFetchingFollowUps: true,\r\n questions: questionSet,\r\n };\r\n}\r\n\r\nexport function answerPickListQuestionReducer(state: InterviewQuestionsState, action: Action): InterviewQuestionsState {\r\n if (action.type !== Actions.ANSWER_PICKLISTQUESTION || state.questions === undefined) {\r\n return state;\r\n }\r\n\r\n let currQuestion = state.questions.find(a => a.id === action.payload.baseQuestionId);\r\n if (currQuestion === undefined || currQuestion.pickList === undefined) {\r\n return state;\r\n }\r\n let pickListOptionIndex = currQuestion.pickList.findIndex(a => a.id === action.payload.id);\r\n if (pickListOptionIndex === -1) {\r\n return state;\r\n }\r\n\r\n let clonedPickList = [...currQuestion.pickList];\r\n\r\n clonedPickList[pickListOptionIndex] = { ...clonedPickList[pickListOptionIndex], answer: action.payload.answer, followUpQuestionRetrieved: false };\r\n\r\n let updatedState = {\r\n ...state,\r\n questions: updateQuestionSet(\r\n action.payload.baseQuestionId,\r\n state.questions,\r\n {\r\n pickList: clonedPickList\r\n }\r\n )\r\n };\r\n return { ...updatedState, isFetchingFollowUps: areQuestionsFetchingFollowUps(updatedState) }\r\n}\r\n\r\nexport function updateQuestionOptionsReducer(state: InterviewQuestionsState, action: Action): InterviewQuestionsState {\r\n if (action.type !== Actions.UPDATE_QUESTIONOPTIONS || state.questions === undefined) {\r\n return state;\r\n }\r\n\r\n return { ...state, questions: updateQuestionSet(action.payload.id, state.questions, { options: action.payload.options }) };\r\n}\r\n\r\nexport function setFollowUpQuestionReducer(state: InterviewQuestionsState, action: Action): InterviewQuestionsState {\r\n if (action.type !== Actions.SET_FOLLOWUPQUESTION || state.questions === undefined) {\r\n return state;\r\n }\r\n\r\n let updatedState = { ...state, questions: updateQuestionSet(action.payload.id, state.questions, { followUpQuestionRetrieved: true, followUpQuestion: action.payload.followUpQuestion }) };\r\n return { ...updatedState, isFetchingFollowUps: areQuestionsFetchingFollowUps(updatedState) }\r\n}\r\n\r\nexport function setFollowUpQuestionPickListReducer(state: InterviewQuestionsState, action: Action): InterviewQuestionsState {\r\n if (action.type !== Actions.SET_FOLLOWUPQUESTIONPICKLIST || state.questions === undefined) {\r\n return state;\r\n }\r\n let currQuestion = state.questions.find(a => a.id === action.payload.questionId);\r\n if (currQuestion === undefined || currQuestion.pickList === undefined) {\r\n return state;\r\n }\r\n let pickListOptionIndex = currQuestion.pickList.findIndex(a => a.id === action.payload.pickListId);\r\n if (pickListOptionIndex === -1) {\r\n return state;\r\n }\r\n\r\n let clonedPickList = [...currQuestion.pickList];\r\n\r\n clonedPickList[pickListOptionIndex] = { ...clonedPickList[pickListOptionIndex], followUpQuestion: action.payload.followUpQuestion, followUpQuestionRetrieved: true };\r\n\r\n let updatedState = {\r\n ...state,\r\n questions: updateQuestionSet(\r\n action.payload.questionId,\r\n state.questions,\r\n {\r\n pickList: clonedPickList\r\n }\r\n )\r\n };\r\n return { ...updatedState, isFetchingFollowUps: areQuestionsFetchingFollowUps(updatedState) }\r\n}\r\n\r\nconst updateQuestionSet = (id: string, allQuestions: BaseQuestion[], values: Partial): BaseQuestion[] => {\r\n return allQuestions.map(a => updateQuestion(id, a, values));\r\n}\r\n\r\nconst updateQuestion = (id: string, question: T, values: Partial): T => {\r\n if (question.id === id) {\r\n return { ...question, ...values }\r\n }\r\n let result = { ...question };\r\n if (result.followUpQuestion !== undefined) {\r\n result.followUpQuestion = updateQuestion(id, result.followUpQuestion, values);\r\n }\r\n if (result.subQuestions !== undefined) {\r\n result.subQuestions = result.subQuestions.map(a => updateQuestion(id, a, values));\r\n }\r\n if (result.pickList !== undefined) {\r\n result.pickList = result.pickList.map(a => updatePickListQuestion(id, a, values));\r\n }\r\n return result;\r\n}\r\n\r\nconst updatePickListQuestion = (id: string, pickListOption: PickListOption, values: Partial): PickListOption => {\r\n if (pickListOption.followUpQuestion === undefined) {\r\n return { ...pickListOption };\r\n }\r\n return { ...pickListOption, followUpQuestion: updateQuestion(id, pickListOption.followUpQuestion, values) };\r\n}\r\n\r\nexport function setHasSavedAnswerReducer(state: InterviewQuestionsState, action: Action): InterviewQuestionsState {\r\n if (action.type !== Actions.SET_HASSAVEDANSWER || state.questions === undefined) {\r\n return state;\r\n }\r\n\r\n let updatedState = { ...state, questions: updateQuestionSet(action.payload.id, state.questions, { hasSavedAnswer: true }) };\r\n return { ...updatedState, isSavingAnswers: areQuestionAnswersSaving(updatedState) };\r\n}\r\n\r\nexport default createReducer({ isRetrievingQuestions: false, isSavingAnswers: false, isFetchingFollowUps: false, followUpQuestionCache: {}, flatFollowUpQuestionCache: {} }, {\r\n [Actions.FETCH_QUESTIONS]: fetchQuestionsReducer,\r\n [Actions.RETRIEVED_QUESTIONS]: retrievedQuestionsReducer,\r\n [Actions.ANSWER_QUESTION]: answerQuestionReducer,\r\n [Actions.UPDATE_QUESTIONOPTIONS]: updateQuestionOptionsReducer,\r\n [Actions.SET_FOLLOWUPQUESTION]: setFollowUpQuestionReducer,\r\n [Actions.SET_HASSAVEDANSWER]: setHasSavedAnswerReducer,\r\n [Actions.STORE_FOLLOWUPQUESTION]: storeFollowUpQuestionReducer,\r\n [Actions.SET_FOLLOWUPQUESTIONPICKLIST]: setFollowUpQuestionPickListReducer,\r\n [Actions.ANSWER_PICKLISTQUESTION]: answerPickListQuestionReducer\r\n});","import { getSettings } from \"../Settings\";\r\nimport { processRequest } from \"./AccessorUtilities\";\r\n\r\nconst getSigningUrlUrl: string = \"api/forms/signingurl.json\";\r\n\r\nexport const getSigningUrl = async (caseId: string, applicantFirstName: string, applicantLastName: string, applicantEmail: string, benefitAmount: number, cardType: string, referrer: string): Promise<{ url: string, envelopeId: string }> => {\r\n let settings = getSettings();\r\n var url = new URL(getSigningUrlUrl, settings.apiHost);\r\n var brandUrl = new URL(\"/blank.html\", window.location.origin);\r\n url.searchParams.append(\"caseId\", caseId);\r\n url.searchParams.append(\"applicantName\", `${applicantFirstName} ${applicantLastName}`);\r\n url.searchParams.append(\"applicantEmail\", applicantEmail);\r\n url.searchParams.append(\"benefitAmount\", benefitAmount.toString());\r\n url.searchParams.append(\"cardType\", cardType);\r\n url.searchParams.append(\"brandUrl\", brandUrl.href);\r\n url.searchParams.append(\"code\", settings.apiKey);\r\n url.searchParams.append(\"referrer\", referrer);\r\n\r\n let fetchResult = await processRequest(url.href);\r\n\r\n return await fetchResult.json();\r\n}","import AppState from \"../../models/State/AppState\";\r\nimport { AnyAction, ActionCreator } from \"redux\";\r\nimport { ThunkAction, ThunkDispatch } from \"redux-thunk\";\r\nimport { getSigningUrl } from \"../../accessors/FormsAccessor\";\r\n\r\nexport const FETCH_URL = 'documents/fetch_url';\r\nexport const RETRIEVED_URL = 'documents/retrieved_url';\r\n\r\nexport type Types = typeof FETCH_URL |\r\n typeof RETRIEVED_URL;\r\n\r\nexport interface FetchUrlPayload {\r\n\r\n}\r\n\r\nexport interface RetrievedUrlPayload {\r\n signingUrl: string;\r\n envelopeId: string;\r\n}\r\n\r\ntype TypePayload = { type: T1, payload: T2 };\r\n\r\nexport function loadingSigningUrlAction(): TypePayload {\r\n return { type: FETCH_URL, payload: {} };\r\n}\r\n\r\nexport function retrievedSigningUrlAction(signingUrl: string, envelopeId: string): TypePayload {\r\n return { type: RETRIEVED_URL, payload: { signingUrl: signingUrl, envelopeId: envelopeId } };\r\n}\r\n\r\nexport const fetchUrlAction: ActionCreator, AppState, null, AnyAction>> = () => {\r\n return async (dispatch: ThunkDispatch, getState: () => AppState): Promise => {\r\n const currState = getState();\r\n\r\n if (currState.document.signingUrl === undefined &&\r\n !currState.document.isLoadingSigningUrl &&\r\n currState.case.case !== undefined &&\r\n currState.personalInformation.usersFirstName !== undefined &&\r\n currState.personalInformation.usersLastName !== undefined &&\r\n currState.personalInformation.emailAddress !== undefined &&\r\n currState.benefitAmount.selectedAmount !== undefined &&\r\n currState.payment.cardType !== undefined) {\r\n dispatch(loadingSigningUrlAction());\r\n let result = await getSigningUrl(\r\n currState.case.case.caseId,\r\n currState.personalInformation.usersFirstName,\r\n currState.personalInformation.usersLastName,\r\n currState.personalInformation.emailAddress,\r\n currState.benefitAmount.selectedAmount.benefitAmount,\r\n currState.payment.cardType,\r\n currState.demographicInformation.referrer);\r\n \r\n return dispatch(retrievedSigningUrlAction(result.url, result.envelopeId));\r\n }\r\n };\r\n}\r\n","import * as Actions from './Actions';\r\nimport { DocumentState } from '../../models/State/DocumentState';\r\nimport { createReducer } from '../ReducersUtilities';\r\n\r\ntype Action = ReturnType |\r\n ReturnType;\r\n\r\nexport function loadingSigningUrlReducer(state: DocumentState, action: Action): DocumentState {\r\n if (action.type !== Actions.FETCH_URL) {\r\n return state;\r\n }\r\n\r\n return { ...state, isLoadingSigningUrl: true };\r\n}\r\n\r\nexport function retrievedSigningUrlReducer(state: DocumentState, action: Action): DocumentState {\r\n if (action.type !== Actions.RETRIEVED_URL) {\r\n return state;\r\n }\r\n\r\n return { ...state, signingUrl: action.payload.signingUrl, envelopeId: action.payload.envelopeId, isLoadingSigningUrl: false };\r\n}\r\n\r\nexport default createReducer({ isLoadingSigningUrl: false }, {\r\n [Actions.FETCH_URL]: loadingSigningUrlReducer,\r\n [Actions.RETRIEVED_URL]: retrievedSigningUrlReducer\r\n});","import { getSettings } from \"../Settings\";\r\nimport { processRequest } from \"./AccessorUtilities\";\r\n\r\nconst submitApplicationUrl: string = \"/api/quote/submitapplication.json\";\r\n\r\nexport async function submitApplication(applicationRequest: ApplicationRequest) {\r\n\r\n let settings = getSettings();\r\n var url = new URL(submitApplicationUrl, settings.apiHost);\r\n url.searchParams.append(\"code\", settings.apiKey);\r\n\r\n const response = await post(url.toString(), {\r\n caseId: applicationRequest.caseId,\r\n envelopeId: applicationRequest.envelopeId,\r\n paymentId: applicationRequest.paymentId,\r\n benefitAmount: applicationRequest.benefitAmount,\r\n referrer: applicationRequest.referrer\r\n }).catch(error => console.error(error));\r\n\r\n return response as SubmitApplicationResponse;\r\n}\r\n\r\nasync function post(url = '', data = {}) {\r\n return await processRequest(url, {\r\n method: 'POST',\r\n mode: 'cors',\r\n cache: 'no-cache',\r\n credentials: 'same-origin',\r\n headers: {\r\n 'Content-Type': 'application/json'\r\n },\r\n redirect: 'follow',\r\n referrer: 'no-referrer',\r\n body: JSON.stringify(data),\r\n })\r\n .then(response => response.json());\r\n}\r\n\r\nexport interface ApplicationRequest {\r\n caseId: string;\r\n envelopeId: string;\r\n paymentId: string;\r\n benefitAmount: number;\r\n referrer: string;\r\n}\r\n\r\nexport interface SubmitApplicationResponse {\r\n policyNumber: number;\r\n}","import { ActionCreator, AnyAction } from \"redux\";\r\nimport { ThunkAction, ThunkDispatch } from \"redux-thunk\";\r\n\r\nimport AppState from \"../../models/State/AppState\";\r\nimport { submitApplication } from \"../../accessors/ApplicationAccessor\";\r\n\r\nexport const SUBMIT_APPLICATION = 'case/post_application';\r\nexport const RECEIVED_APPLICATION = 'case/received_application';\r\nexport const UPDATE_CASERESULT = 'case/update_caseresult';\r\n\r\nexport type Types = typeof SUBMIT_APPLICATION |\r\n typeof RECEIVED_APPLICATION;\r\n\r\nexport interface SubmitApplicationPayload{\r\n}\r\n\r\nexport interface ReceivedApplicationPayload{\r\n policyNumber: number;\r\n}\r\n\r\ntype TypePayload = { type: T1, payload: T2 };\r\n\r\nexport const submitApplicationAction: ActionCreator, AppState, null, AnyAction>> = () => {\r\n return async (dispatch: ThunkDispatch, getState: ()=>AppState): Promise => {\r\n const currState = getState();\r\n if(currState.policy.policyNumber === undefined){\r\n if(currState.case.case === undefined ||\r\n currState.case.case.caseId === undefined ||\r\n currState.document.envelopeId === undefined ||\r\n currState.payment.token === undefined ||\r\n currState.benefitAmount.selectedAmount === undefined)\r\n {\r\n throw new Error(\"Not enough data to submit an application.\");\r\n }\r\n dispatch(loadingSubmitApplicationAction());\r\n \r\n const applicationResult = await submitApplication({\r\n caseId: currState.case.case.caseId,\r\n envelopeId: currState.document.envelopeId, \r\n paymentId: currState.payment.token,\r\n benefitAmount: currState.benefitAmount.selectedAmount.benefitAmount,\r\n referrer: currState.demographicInformation.referrer \r\n });\r\n\r\n currState.case.applicationSubmitted = true; \r\n currState.case.caseResult = undefined;\r\n\r\n return dispatch(receivedApplicationAction(applicationResult.policyNumber));\r\n }\r\n };\r\n}\r\n\r\nexport function loadingSubmitApplicationAction(): TypePayload {\r\n return {type: SUBMIT_APPLICATION, payload: {}};\r\n}\r\n\r\nexport function receivedApplicationAction( applicationResult: number ): TypePayload {\r\n return {type: RECEIVED_APPLICATION, payload: { policyNumber: applicationResult }};\r\n}","import { createReducer } from \"../ReducersUtilities\";\r\nimport * as Actions from './Actions';\r\nimport PolicyState from \"../../models/State/PolicyState\";\r\n\r\ntype Action = ReturnType |\r\n ReturnType;\r\n\r\nexport function loadingSubmitApplicationReducer(state: PolicyState, action: Action): PolicyState {\r\n if (action.type !== Actions.SUBMIT_APPLICATION) {\r\n return state;\r\n }\r\n return { ...state, isLoadingApplication: true };\r\n}\r\n\r\nexport function receivedApplicationReducer(state: PolicyState, action: Action): PolicyState {\r\n if (action.type !== Actions.RECEIVED_APPLICATION) {\r\n return state;\r\n }\r\n return { ...state, policyNumber: action.payload.policyNumber, isLoadingApplication: false };\r\n}\r\n\r\nexport default createReducer({ isLoadingApplication: false }, {\r\n [Actions.SUBMIT_APPLICATION]: loadingSubmitApplicationReducer,\r\n [Actions.RECEIVED_APPLICATION]: receivedApplicationReducer\r\n});","import { combineReducers } from 'redux';\r\nimport setCurrentPageState from './CurrentPage/Reducer';\r\nimport demographicInformationReducer from './DemographicInformation/Reducer';\r\nimport benefitAmountReducer from './BenefitAmount/Reducer';\r\nimport availableStatesReducer from './AvailableStates/Reducer';\r\nimport personalInformationReducer from './PersonalInformation/Reducer';\r\nimport birthLocationReducer from './BirthLocation/Reducer';\r\nimport paymentReducer from './Payment/Reducer';\r\nimport validationReducer from './Validation/Reducer';\r\nimport caseReducer from './Case/Reducer';\r\nimport brandReducer from './Brand/Reducer';\r\nimport interviewQuestionsReducer from './InterviewQuestions/Reducer';\r\nimport documentReducer from './Documents/Reducer';\r\nimport policyReducer from './Policy/Reducer';\r\nimport AppState from '../models/State/AppState';\r\n\r\nconst combinedReducers = combineReducers({\r\n currentPage: (state = {}) => state,\r\n demographicInformation: demographicInformationReducer,\r\n benefitAmount: benefitAmountReducer,\r\n availableStates: availableStatesReducer,\r\n personalInformation: personalInformationReducer,\r\n birthLocation: birthLocationReducer,\r\n interviewQuestions: interviewQuestionsReducer,\r\n payment: paymentReducer,\r\n case: caseReducer,\r\n document: documentReducer,\r\n brand: brandReducer,\r\n policy: policyReducer,\r\n validation: (state = {}) => state\r\n})\r\n\r\nfunction crossStateReducer(state: any, action?: any): AppState{\r\n var validatedState = {...state, validation: validationReducer(state)};\r\n return {...validatedState, currentPage: setCurrentPageState(validatedState, action)}\r\n}\r\n\r\nexport default function(state?: AppState, action?: any){\r\n const intermediateState = combinedReducers(state, action);\r\n return crossStateReducer(intermediateState, action);\r\n};","import thunkMiddleware from 'redux-thunk'\r\nimport { createStore, applyMiddleware, compose } from \"redux\";\r\nimport appReducer from \"./redux/AppReducer\";\r\n\r\ndeclare global {\r\n interface Window { devToolsExtension?: any; }\r\n}\r\n\r\nlet win = window as any;\r\nconst enhancers = compose(\r\n applyMiddleware(thunkMiddleware),\r\n win.devToolsExtension ? win.devToolsExtension() : (f: any) => f\r\n );\r\nconst store = createStore(appReducer, {}, enhancers);\r\nexport default store;","import React, { Component } from 'react';\r\n\r\nclass CardBody extends Component {\r\n render() {\r\n const {\r\n props: {\r\n children,\r\n },\r\n } = this;\r\n\r\n return (\r\n
\r\n {children}\r\n
\r\n );\r\n }\r\n}\r\n\r\nexport default CardBody;","import React, { Component } from 'react';\r\nimport CardBody from './CardBody';\r\n\r\ninterface CardProps {\r\n\ttitle: string;\r\n}\r\n\r\nclass Card extends Component {\r\n\trender() {\r\n\t\treturn (\r\n\t\t\t
\r\n\t\t\t\t
\r\n\t\t\t\t\t

{this.props.title}

\r\n\t\t\t\t
\r\n\t\t\t\t\r\n\t\t\t\t\t{this.props.children}\r\n\t\t\t\t\r\n\t\t\t
\r\n\t\t);\r\n\t}\r\n}\r\n\r\nexport default Card;","import React from 'react';\r\nimport { connect } from \"react-redux\";\r\nimport { AnyAction } from 'redux';\r\nimport { nextPageAction, previousPageAction } from '../../redux/CurrentPage/Actions';\r\nimport { ThunkDispatch } from 'redux-thunk';\r\nimport AppState from '../../models/State/AppState';\r\n\r\nimport bars from '../Loading/bars.svg';\r\n\r\nconst mapStateToProps = (state: AppState) => {\r\n return {\r\n canGoBack: state.currentPage.canGoBack,\r\n canContinue: state.currentPage.canContinue,\r\n showProcessing: state.interviewQuestions.isFetchingFollowUps\r\n };\r\n};\r\n\r\nconst mapDispatchToProps = (dispatch: ThunkDispatch) => {\r\n return {\r\n goBack: () => dispatch(previousPageAction()),\r\n continue: () => dispatch(nextPageAction())\r\n };\r\n};\r\n\r\ninterface NavigationButtonsComponentProps {\r\n canGoBack: boolean;\r\n canContinue: boolean;\r\n showProcessing: boolean;\r\n continue: () => void;\r\n goBack: () => void;\r\n}\r\n\r\nexport class NavigationButtonsComponent extends React.Component{\r\n private continue = () => {\r\n this.props.continue();\r\n }\r\n\r\n private goBack = () => {\r\n this.props.goBack();\r\n }\r\n render() {\r\n return (\r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n );\r\n }\r\n}\r\n\r\nexport default connect(mapStateToProps, mapDispatchToProps)(NavigationButtonsComponent);","import { withAITracking } from \"@microsoft/applicationinsights-react-js\";\r\nimport {initializeApplicationInsights as applicationInsightsInit} from '../TrackingHelpers';\r\n\r\nexport const setupApplicationInsightsPageTracking =

(reactComponent: React.ComponentType

): React.ComponentClass

| React.ComponentType

=>{\r\n let reactPlugin = applicationInsightsInit();\r\n if(reactPlugin===undefined){\r\n return reactComponent;\r\n }\r\n return withAITracking(reactPlugin, reactComponent);\r\n}\r\n\r\nexport const formatNumber = (x: string | number) => {\r\n return x.toString().replace(/[^0-9]/g, \"\").replace(/\\B(?=(\\d{3})+(?!\\d))/g, \",\");\r\n}","import React from 'react';\r\nimport { connect } from \"react-redux\";\r\nimport { updateGenderAction } from '../../redux/DemographicInformation/Actions';\r\nimport { AnyAction } from 'redux';\r\nimport { ThunkDispatch } from 'redux-thunk';\r\nimport AppState from '../../models/State/AppState';\r\nimport Gender from '../../models/Gender';\r\nimport Card from '../../components/Card/Card';\r\nimport NavigationButtons from '../../components/NavigationButtons/NavigationButtons';\r\nimport { setupApplicationInsightsPageTracking } from '../PageUtilities';\r\n\r\nconst mapStateToProps = (state: AppState) => {\r\n return {\r\n gender: state.demographicInformation.gender\r\n };\r\n};\r\n\r\nconst mapDispatchToProps = (dispatch: ThunkDispatch) => {\r\n return {\r\n updateGender: (value: Gender | undefined) => dispatch(updateGenderAction(value))\r\n };\r\n};\r\n\r\ninterface GenderComponentProps {\r\n gender?: Gender;\r\n updateGender: (gender: Gender) => void;\r\n}\r\n\r\nexport class GenderComponent extends React.Component{\r\n componentDidMount() {\r\n window.scrollTo(0, 0);\r\n }\r\n \r\n private setGenderFemale = (e: React.ChangeEvent) => {\r\n if (e.target.checked) {\r\n this.props.updateGender(Gender.Female);\r\n }\r\n }\r\n private setGenderMale = (e: React.ChangeEvent) => {\r\n if (e.target.checked) {\r\n this.props.updateGender(Gender.Male);\r\n }\r\n }\r\n render() {\r\n const baseButtonClassName = 'btn btn-outline-primary';\r\n const femaleClassName = baseButtonClassName + (this.props.gender === Gender.Female ? ' active' : '');\r\n const maleClassName = baseButtonClassName + (this.props.gender === Gender.Male ? ' active' : '');\r\n return (\r\n <>\r\n \r\n

\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n );\r\n }\r\n}\r\n\r\nexport default connect(mapStateToProps, mapDispatchToProps)(setupApplicationInsightsPageTracking(GenderComponent));","import React from 'react';\r\nimport { connect } from \"react-redux\";\r\nimport { updateUseNicotineProductsAction } from '../../redux/DemographicInformation/Actions';\r\nimport { AnyAction } from 'redux';\r\nimport { ThunkDispatch } from 'redux-thunk';\r\nimport AppState from '../../models/State/AppState';\r\nimport Card from '../../components/Card/Card';\r\nimport NavigationButtons from '../../components/NavigationButtons/NavigationButtons';\r\nimport { setupApplicationInsightsPageTracking } from '../PageUtilities';\r\n\r\nconst mapStateToProps = (state: AppState) => {\r\n return {\r\n usesNicotineProducts: state.demographicInformation.useNicotineProducts\r\n };\r\n};\r\n\r\nconst mapDispatchToProps = (dispatch: ThunkDispatch) => {\r\n return {\r\n updateUsesNicotineProducts: (value: boolean | undefined) => dispatch(updateUseNicotineProductsAction(value))\r\n };\r\n};\r\n\r\ninterface UsesNicotineProductComponentProps {\r\n usesNicotineProducts?: boolean;\r\n updateUsesNicotineProducts: (usesNicotineProducts: boolean) => void;\r\n}\r\n\r\nexport class UsesNicotineProductComponent extends React.Component{\r\n componentDidMount() {\r\n window.scrollTo(0, 0);\r\n }\r\n private setUsesNicotineProducts = (e: React.ChangeEvent) => {\r\n if (e.target.checked) {\r\n this.props.updateUsesNicotineProducts(true);\r\n }\r\n }\r\n private setDoesntUseNicotineProducts = (e: React.ChangeEvent) => {\r\n if (e.target.checked) {\r\n this.props.updateUsesNicotineProducts(false);\r\n }\r\n }\r\n render() {\r\n const baseButtonClassName = 'btn btn-outline-primary';\r\n const yesClassName = baseButtonClassName + (this.props.usesNicotineProducts ? ' active' : '');\r\n const noClassName = baseButtonClassName + (this.props.usesNicotineProducts === false ? ' active' : '');\r\n return (\r\n <>\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n );\r\n }\r\n}\r\n\r\nexport default connect(mapStateToProps, mapDispatchToProps)(setupApplicationInsightsPageTracking(UsesNicotineProductComponent));","import React, { ChangeEvent } from 'react';\r\nimport moment from 'moment';\r\n\r\ninterface DateSelectorComponentProps {\r\n label: string;\r\n defaultValue?: Date;\r\n dateValidation?: string;\r\n dateCallback: (date: Date) => void;\r\n}\r\n\r\ninterface DateSelectorComponentState {\r\n date?: Date;\r\n dateFormatted: string;\r\n dateCursorLocation: number;\r\n dateHasCompleted: boolean;\r\n}\r\n\r\nexport class DateSelector extends React.Component{\r\n private input: React.RefObject;\r\n constructor(props: DateSelectorComponentProps) {\r\n super(props);\r\n this.input = React.createRef();\r\n this.state = {\r\n date: undefined,\r\n dateFormatted: \"\",\r\n dateCursorLocation: 0,\r\n dateHasCompleted: false\r\n };\r\n }\r\n componentDidMount() {\r\n if (this.props.defaultValue !== undefined) {\r\n this.setState({\r\n dateFormatted: moment(this.props.defaultValue).format('MM[/]DD[/]YYYY').toString()\r\n });\r\n }\r\n }\r\n componentDidUpdate() {\r\n if (this.input.current !== null) {\r\n this.input.current.selectionStart = this.state.dateCursorLocation;\r\n this.input.current.selectionEnd = this.state.dateCursorLocation;\r\n }\r\n }\r\n private updateDate = (e: ChangeEvent) => {\r\n this.formatDate(e);\r\n \r\n if (this.state.dateHasCompleted || e.target.value.length >= 10) {\r\n let date = moment(e.target.value, \"MM/DD/YYYY\").toDate();\r\n this.props.dateCallback(date);\r\n this.setState({\r\n date: date\r\n });\r\n }\r\n }\r\n private formatDate = (e: ChangeEvent) => {\r\n let cursor = e.target.selectionStart ? e.target.selectionStart++ : 0;\r\n let date = e.target.value.replace(/[^0-9 ^MDY]/g, \"\")\r\n\r\n if (date.length === 1 && parseInt(date) > 1) {\r\n date = \"0\" + date;\r\n }\r\n if (date.length > 1) {\r\n date = date.substr(0, 2) + \"/\" + date.substr(2);\r\n }\r\n if (date.length > 2 && parseInt(date.substr(0, 2)) > 12) {\r\n date = \"12/\" + date.substr(3);\r\n }\r\n if (date.length === 4 && parseInt(date.charAt(3)) > 3) {\r\n date = date.substr(0, 3) + \"0\" + date.substr(3);\r\n }\r\n if (date.length > 4) {\r\n date = date.substr(0, 5) + \"/\" + date.substr(5);\r\n }\r\n if (date.length > 5 && parseInt(date.substr(3, 5)) > 31) {\r\n date = date.substr(0, 3) + \"31/\" + date.substr(6);\r\n }\r\n\r\n if (e.target.defaultValue.length > e.target.value.length && e.target.defaultValue.charAt(e.target.defaultValue.length - 2) === '/') {\r\n date = e.target.value.slice(0, -1);\r\n }\r\n else if (e.target.defaultValue.length > e.target.value.length) {\r\n date = e.target.value;\r\n }\r\n\r\n cursor = date.length + 1;\r\n if (date.length === 3) {\r\n cursor = date.length + 1;\r\n }\r\n if (date.length === 6) {\r\n cursor = date.length + 1;\r\n }\r\n\r\n if (date.length >= 9 && !this.state.dateHasCompleted) {\r\n this.setState({\r\n dateFormatted: date,\r\n dateCursorLocation: cursor,\r\n dateHasCompleted: true\r\n });\r\n } else {\r\n this.setState({\r\n dateFormatted: date,\r\n dateCursorLocation: cursor\r\n });\r\n }\r\n }\r\n\r\n render() {\r\n return (\r\n <>\r\n
\r\n
\r\n
\r\n \r\n \r\n {(this.props.dateValidation !== undefined && this.state.date !== undefined) &&\r\n
{this.props.dateValidation}
}\r\n
\r\n
\r\n
\r\n \r\n );\r\n }\r\n}\r\n\r\nexport default DateSelector;","import React from 'react';\r\n\r\nimport { connect } from \"react-redux\";\r\nimport { updateDateOfBirthAction } from '../../redux/DemographicInformation/Actions';\r\nimport { AnyAction } from 'redux';\r\nimport { ThunkDispatch } from 'redux-thunk';\r\n\r\nimport AppState from '../../models/State/AppState';\r\nimport Card from '../../components/Card/Card';\r\nimport NavigationButtons from '../../components/NavigationButtons/NavigationButtons';\r\nimport DateSelector from '../../components/DateSelector/DateSelector';\r\n\r\nimport { setupApplicationInsightsPageTracking } from '../PageUtilities';\r\n\r\nconst mapStateToProps = (state: AppState) => {\r\n return {\r\n dateOfBirth: state.demographicInformation.dateOfBirth,\r\n dateOfBirthValidation: state.validation.demographicInformation.fields.dateOfBirthValidation,\r\n };\r\n};\r\n\r\nconst mapDispatchToProps = (dispatch: ThunkDispatch) => {\r\n return {\r\n updateDateOfBirth: (value: Date | undefined) => dispatch(updateDateOfBirthAction(value))\r\n };\r\n};\r\n\r\ninterface DateOfBirthComponentProps {\r\n dateOfBirth?: Date;\r\n dateOfBirthValidation: string;\r\n updateDateOfBirth: (dateOfBirth: Date | undefined) => void;\r\n}\r\n\r\n\r\nexport class DateOfBirthComponent extends React.Component{\r\n componentDidMount() {\r\n window.scrollTo(0, 0);\r\n }\r\n \r\n private updateDateOfBirth = (date: Date) => {\r\n this.props.updateDateOfBirth(date);\r\n }\r\n\r\n render() {\r\n return (\r\n <>\r\n \r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n );\r\n }\r\n}\r\n\r\nexport default connect(mapStateToProps, mapDispatchToProps)(setupApplicationInsightsPageTracking(DateOfBirthComponent));","import React, { ChangeEvent } from 'react';\r\nimport { connect } from \"react-redux\";\r\nimport { AnyAction } from 'redux';\r\nimport { ThunkDispatch } from 'redux-thunk';\r\nimport * as EmailValidator from 'email-validator';\r\n\r\nimport { updateStateAction, sendUnavailableStateNotificationAction } from '../../redux/DemographicInformation/Actions';\r\nimport AppState from '../../models/State/AppState';\r\nimport { loadAvailableStates } from '../../redux/AvailableStates/Actions';\r\nimport AvailableState from '../../models/AvailableState';\r\nimport Card from '../../components/Card/Card';\r\nimport NavigationButtons from '../../components/NavigationButtons/NavigationButtons';\r\nimport Modal from 'react-bootstrap/Modal';\r\nimport { hideStateUnavailableModalAction } from '../../redux/CurrentPage/Actions';\r\nimport { setupApplicationInsightsPageTracking } from '../PageUtilities';\r\n\r\nconst mapStateToProps = (state: AppState) => {\r\n return {\r\n state: state.demographicInformation.state,\r\n availableStates: state.availableStates.availableStates,\r\n displayModal: state.currentPage.displayStateIsUnavailable === undefined ? false : state.currentPage.displayStateIsUnavailable\r\n };\r\n};\r\n\r\nconst mapDispatchToProps = (dispatch: ThunkDispatch) => {\r\n return {\r\n updateState: (value: string | undefined) => dispatch(updateStateAction(value)),\r\n loadAvailableStates: () => dispatch(loadAvailableStates()),\r\n hideUnavailableModal: () => dispatch(hideStateUnavailableModalAction()),\r\n sendUnavailableNotification: (firstName: string, lastName: string, email: string, state?: string) => dispatch(sendUnavailableStateNotificationAction(firstName, lastName, email, state)),\r\n };\r\n};\r\n\r\ninterface StateComponentProps {\r\n state?: string;\r\n availableStates?: AvailableState[];\r\n displayModal: boolean;\r\n updateState: (state: string | undefined) => void;\r\n loadAvailableStates: () => void;\r\n hideUnavailableModal: () => void;\r\n sendUnavailableNotification: (firstName: string, lastName: string, email: string, state?: string) => void;\r\n}\r\n\r\ninterface StateComponentState {\r\n modalFirstName: string;\r\n modalLastName: string;\r\n modalEmail: string;\r\n}\r\n\r\nexport class StateComponent extends React.Component{\r\n constructor(props: StateComponentProps) {\r\n super(props);\r\n\r\n this.state = {\r\n modalFirstName: \"\",\r\n modalLastName: \"\",\r\n modalEmail: \"\"\r\n }\r\n }\r\n componentDidMount = () => {\r\n window.scrollTo(0, 0);\r\n this.props.loadAvailableStates();\r\n }\r\n private updateState = (e: ChangeEvent) => {\r\n var selectedOption = e.target.selectedOptions && e.target.selectedOptions.length > 0 && e.target.selectedOptions[0].value.length > 0 ? e.target.selectedOptions[0].value : undefined;\r\n this.props.updateState(selectedOption);\r\n }\r\n private hideUnavailableModal = () => {\r\n this.props.hideUnavailableModal();\r\n }\r\n private sendUnavailableNotification = () => {\r\n this.props.sendUnavailableNotification(this.state.modalFirstName, this.state.modalLastName, this.state.modalEmail, this.props.state);\r\n }\r\n private setModalFirstName = (e: ChangeEvent) => {\r\n this.setState({\r\n modalFirstName: e.target.value\r\n });\r\n }\r\n private setModalLastName = (e: ChangeEvent) => {\r\n this.setState({\r\n modalLastName: e.target.value\r\n });\r\n }\r\n private setModalEmail = (e: ChangeEvent) => {\r\n this.setState({\r\n modalEmail: e.target.value\r\n });\r\n }\r\n render() {\r\n let modalCanContinue: boolean = this.state.modalFirstName.length > 0 && this.state.modalLastName.length > 0 && EmailValidator.validate(this.state.modalEmail);\r\n\r\n return (\r\n <>\r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n

We appreciate your time, but we are unable to offer you Critical Illness Insurance coverage at the moment.

\r\n \r\n
\r\n
\r\n Please give us your contact information and we will let you know when it is available. If you would like more information, please contact us at hello@prepareinsure.com.\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n \r\n );\r\n }\r\n}\r\n\r\nexport default connect(mapStateToProps, mapDispatchToProps)(setupApplicationInsightsPageTracking(StateComponent));","import React, { ChangeEvent } from 'react';\r\nimport { connect } from \"react-redux\";\r\nimport { AnyAction } from 'redux';\r\nimport { ThunkDispatch } from 'redux-thunk';\r\n\r\nimport { formatNumber } from '../PageUtilities';\r\nimport { nextPageAction, detailsPageAction } from '../../redux/CurrentPage/Actions';\r\nimport AppState from '../../models/State/AppState';\r\nimport BenefitAmount from '../../models/BenefitAmount';\r\nimport AvailableBenefitAmount from '../../models/AvailableBenefitAmount';\r\nimport { selectBenefitAmountAction, loadAvailableBenefitAmountsAction } from '../../redux/BenefitAmount/Actions';\r\nimport Card from '../../components/Card/Card';\r\nimport { setupApplicationInsightsPageTracking } from '../PageUtilities';\r\nimport Modal from 'react-bootstrap/Modal';\r\nimport { fullDetailsPageAction } from '../../redux/CurrentPage/Actions';\r\n\r\nconst mapStateToProps = (state: AppState) => {\r\n return {\r\n selectedBenefitAmount: state.benefitAmount.selectedAmount,\r\n availableBenefitAmounts: state.benefitAmount.availableAmounts,\r\n canContinue: state.validation.selectedAmount.fields.isSelectedAmountValid\r\n };\r\n};\r\n\r\nconst mapDispatchToProps = (dispatch: ThunkDispatch) => {\r\n return {\r\n updateSelectedBenefitAmount: (value: BenefitAmount | undefined) => dispatch(selectBenefitAmountAction(value)),\r\n loadBenefitAmounts: () => dispatch(loadAvailableBenefitAmountsAction()),\r\n continue: () => dispatch(nextPageAction()),\r\n seeDetails: () => dispatch(detailsPageAction()),\r\n seeFullDetails: () => dispatch(fullDetailsPageAction())\r\n };\r\n};\r\n\r\ninterface BenefitSelectionProps {\r\n selectedBenefitAmount?: BenefitAmount;\r\n availableBenefitAmounts?: AvailableBenefitAmount[];\r\n canContinue: boolean;\r\n updateSelectedBenefitAmount: (benefitAmount: BenefitAmount | undefined) => void;\r\n loadBenefitAmounts: () => void;\r\n continue: () => void;\r\n seeDetails: () => void;\r\n seeFullDetails: () => void;\r\n}\r\n\r\ninterface BenefitSelectionComponentState {\r\n activeTab: string;\r\n modalDisplayed: boolean;\r\n}\r\n\r\nexport class BenefitSelectionComponent extends React.Component{\r\n constructor(props: BenefitSelectionProps) {\r\n super(props);\r\n\r\n this.state = {\r\n activeTab: \"Disclosures\",\r\n modalDisplayed: false\r\n };\r\n }\r\n\r\n private seeFullDetails = () => {\r\n this.props.seeFullDetails();\r\n }\r\n\r\n private toggleModal = () => {\r\n this.setState({\r\n modalDisplayed: !this.state.modalDisplayed\r\n });\r\n }\r\n\r\n componentDidMount() {\r\n window.scrollTo(0, 0);\r\n this.props.loadBenefitAmounts();\r\n }\r\n\r\n private updateSelectedBenefitAmount = (e: ChangeEvent): void => {\r\n if (this.props.availableBenefitAmounts === undefined) {\r\n return;\r\n }\r\n let benefitAmount = this.props.availableBenefitAmounts.find(a => a.benefitAmount === parseInt(e.target.value));\r\n this.props.updateSelectedBenefitAmount(benefitAmount);\r\n }\r\n\r\n private continue = () => {\r\n this.props.continue();\r\n }\r\n\r\n private seeDetails = () => {\r\n this.props.seeDetails();\r\n }\r\n\r\n private benefitAmountClicked = (benefitAmount: BenefitAmount): void => {\r\n this.props.updateSelectedBenefitAmount(benefitAmount);\r\n }\r\n\r\n render() {\r\n if (this.props.availableBenefitAmounts === undefined) {\r\n return null;\r\n }\r\n let recommended = this.props.availableBenefitAmounts.find(a => a.isRecommended);\r\n let highlighted = this.props.availableBenefitAmounts.filter(a => a.isHighlighted);\r\n let dropdownIems = this.props.availableBenefitAmounts.filter(a => !a.isHighlighted);\r\n return (\r\n <>\r\n\r\n \r\n {recommended &&\r\n
\r\n

We recommend ${formatNumber(recommended.benefitAmount)} in benefit for ${recommended.cost.toFixed(2)} a month!

\r\n

Covered Conditions:

\r\n

100% Benefit

Heart Attack, Stroke, Invasive Cancer, Kidney (Renal) Failure, Advanced Alzheimer’s Disease, Paralysis, and Coma

\r\n

Partial Benefit

Coronary Artery Bypass Surgery, Angioplasty, Non-Invasive Cancer, Major Organ Transplant

\r\n

Get a decision in less than 5 minutes!

\r\n
\r\n }\r\n {highlighted.length > 0 &&\r\n highlighted.map(a => (\r\n
\r\n
\r\n \r\n
\r\n
\r\n ))\r\n }\r\n {dropdownIems.length > 0 &&\r\n
\r\n
\r\n Or choose a custom benefit:\r\n
\r\n
\r\n \r\n
\r\n
\r\n }\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n \r\n
\r\n \r\n

Critical Illness Insurance

\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
Covered Conditions\r\n

100% Benefit – Heart Attack, Stroke, Invasive Cancer, Kidney (Renal) Failure, Advanced Alzheimer's Disease, Paralysis, and Coma

\r\n

Partial Benefit – Coronary Artery Bypass Surgery, Angioplasty, Non-Invasive Cancer, Major Organ Transplant

\r\n
Diagnosis Benefit\r\n

Pays a lump-sum benefit if you are diagnosed with an illness or undergo a procedure from a list of covered conditions while this policy is in force.

\r\n
Additional Diagnosis Benefit\r\n

Benefits are available for multiple different critical illness diagnoses covered in the policy if the date of diagnosis is separated from the prior diagnosis by at least six consecutive months, and the new critical illness is not caused by or contributed to by a critical illness for which benefits have already been paid.

\r\n
Major Benefits\r\n

Simple, streamlined underwriting.

\r\n

Return of Premium - If you die from a cause other than a specified critical illness while the policy is inforce, 100 percent of the premiums paid for the policy less any benefits paid under the policy will be returned to the beneficiary or estate.

\r\n

Policy is guaranteed renewable for life as long as you pay the premium; benefit amount is reduced by 50 percent on the later of the policy anniversary following your 70th birthday or the third policy anniversary.

\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n\r\n \r\n );\r\n }\r\n}\r\n\r\ninterface BenefitButtonProps {\r\n benefitAmount: AvailableBenefitAmount;\r\n benefitAmountFormatted: string;\r\n isSelected: boolean;\r\n onClick: (benefitAmount: BenefitAmount) => void;\r\n}\r\n\r\nclass BenefitButton extends React.Component{\r\n private onClick = () => {\r\n this.props.onClick(this.props.benefitAmount)\r\n }\r\n render() {\r\n let className = \"btn btn-outline-primary btn-block\" + (this.props.isSelected ? \" active\" : \"\");\r\n return \r\n }\r\n}\r\n\r\nexport default connect(mapStateToProps, mapDispatchToProps)(setupApplicationInsightsPageTracking(BenefitSelectionComponent));","import React from 'react';\r\nimport { connect } from \"react-redux\";\r\nimport { AnyAction } from 'redux';\r\nimport { ThunkDispatch } from 'redux-thunk';\r\nimport { nextPageAction, fullTermsPageAction } from '../../redux/CurrentPage/Actions';\r\nimport { updateUsersDidAcceptTermsAction } from '../../redux/PersonalInformation/Actions';\r\nimport AppState from '../../models/State/AppState';\r\nimport Card from '../../components/Card/Card';\r\n\r\nimport './Terms'\r\nimport { setupApplicationInsightsPageTracking } from '../PageUtilities';\r\n\r\nconst mapStateToProps = (state: AppState) => {\r\n return {\r\n didAcceptTerms: state.personalInformation.userDidAcceptTerms,\r\n canContinue: state.currentPage.canContinue\r\n };\r\n};\r\n\r\nconst mapDispatchToProps = (dispatch: ThunkDispatch) => {\r\n return {\r\n acceptTerms: (value?: boolean) => dispatch(updateUsersDidAcceptTermsAction(value)),\r\n continue: () => dispatch(nextPageAction()),\r\n seeFullTerms: () => dispatch(fullTermsPageAction())\r\n };\r\n};\r\n\r\ninterface TermsComponentProps {\r\n didAcceptTerms?: boolean;\r\n canContinue: boolean;\r\n acceptTerms: (value?: boolean) => void;\r\n continue: () => void;\r\n seeFullTerms: () => void;\r\n}\r\n\r\nclass Terms extends React.Component {\r\n componentDidMount() {\r\n window.scrollTo(0, 0);\r\n }\r\n private acceptTerms = () => {\r\n this.props.acceptTerms(!this.props.didAcceptTerms);\r\n }\r\n private continue = () => {\r\n this.props.continue();\r\n }\r\n private seeFullTerms = () => {\r\n this.props.seeFullTerms();\r\n }\r\n render() {\r\n return (\r\n <>\r\n \r\n
\r\n
\r\n
\r\n Policies are underwritten by Assurity Life Insurance Company, an \"A-\" (Excellent) rated company by A.M. Best.* Assurity's roots date back to 1890 and they are excellent at what they do!\r\n
\r\n
\r\n Let's confirm your identity and eligibility for coverage!\r\n
\r\n
\r\n * A.M. Best ratings range from A++ (Superior) to F (in liquidation)\r\n
\r\n
\r\n In order to determine your eligibility for insurance, Assurity must collect certain information about you from third parties. These third parties may include, but not be limited to, MIB Inc., LexisNexis Risk Solutions, pharmacies and pharmacy benefit managers and may include information such as your medical/prescription drug history/conditions (health information), driving records and credit information. By checking \"I have read and agreed to the Authorization and Pre-Notice\" checkbox, you hereby authorize such third parties to disclose information to Assurity Life Insurance Company as fully described in the Confidential Information Authorization (\"Authorization\").\r\n
\r\n
\r\n By checking \"I have read and agreed to the Authorization and Pre-Notice\" checkbox, you further understand that you may inspect or copy the protected health information described by the Authorization at any time by providing written notice to Assurity. You understand you have the right to revoke your Authorization by writing to Assurity and that a revocation is not effective to the extent action has been taken in reliance on the Authorization. You understand that this authorization is valid for a period of two years. You understand that this information may be subject to redisclosure by Assurity and may no longer be protected by federal rules governing privacy of health information, and that this information may only be redisclosed in accordance with other applicable laws or regulations. You further understand that if you refuse to sign the Authorization, Assurity may not be able to process your application for insurance.\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n );\r\n }\r\n}\r\n\r\nexport default connect(mapStateToProps, mapDispatchToProps)(setupApplicationInsightsPageTracking(Terms));","import React from 'react';\r\nimport { connect } from \"react-redux\";\r\nimport Card from '../../components/Card/Card';\r\nimport NavigationButtons from '../../components/NavigationButtons/NavigationButtons';\r\n\r\nimport './Terms'\r\nimport { setupApplicationInsightsPageTracking } from '../PageUtilities';\r\nimport AppState from '../../models/State/AppState';\r\n\r\nconst mapStateToProps = (state: AppState) => {\r\n return {\r\n state: state.demographicInformation.state\r\n };\r\n};\r\n\r\ninterface FullTermsProps {\r\n state?: string;\r\n}\r\n\r\nclass FullTerms extends React.Component {\r\n componentDidMount() {\r\n window.scrollTo(0, 0);\r\n }\r\n private getPdfName = ():string => {\r\n switch (this.props.state) {\r\n case \"AZ\":\r\n return \"/AZ Prenotice.pdf\";\r\n case \"CA\":\r\n return \"/CA Prenotice.pdf\";\r\n case \"ME\":\r\n return \"/ME Prenotice.pdf\";\r\n case \"MN\":\r\n return \"/MN Prenotice.pdf\";\r\n case \"NC\":\r\n return \"/NC Prenotice.pdf\";\r\n case \"VA\":\r\n return \"/VA Prenotice.pdf\";\r\n case \"VT\":\r\n return \"/VT Prenotice.pdf\";\r\n }\r\n return \"/Generic Prenotice.pdf\";\r\n }\r\n\r\n render() {\r\n return (\r\n <>\r\n \r\n
\r\n
\r\n \r\n

Your browser isn't supporting embedded pdf files. You can download the file here.

\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n );\r\n }\r\n}\r\n\r\nexport default connect(mapStateToProps)(setupApplicationInsightsPageTracking(FullTerms));","import React from 'react';\r\nimport { connect } from \"react-redux\";\r\nimport { Component } from 'react';\r\n\r\nimport Card from '../../components/Card/Card';\r\nimport NavigationButtons from '../../components/NavigationButtons/NavigationButtons';\r\nimport { setupApplicationInsightsPageTracking } from '../PageUtilities';\r\n\r\nclass FullDetails extends Component {\r\n componentDidMount() {\r\n window.scrollTo(0, 0);\r\n }\r\n render() {\r\n return (\r\n <>\r\n \r\n
\r\n
\r\n \r\n

Your browser isn't supporting embedded pdf files. You can download the file here.

\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n );\r\n }\r\n}\r\n\r\nexport default connect()(setupApplicationInsightsPageTracking(FullDetails));","import React from 'react';\r\nimport { connect } from \"react-redux\";\r\nimport { updateUsersFirstNameAction, updateUsersLastNameAction, updateEmailAddressAction } from '../../redux/PersonalInformation/Actions';\r\nimport { AnyAction } from 'redux';\r\nimport { ThunkDispatch } from 'redux-thunk';\r\nimport AppState from '../../models/State/AppState';\r\nimport Card from '../../components/Card/Card';\r\nimport NavigationButtons from '../../components/NavigationButtons/NavigationButtons';\r\nimport { setupApplicationInsightsPageTracking } from '../PageUtilities';\r\n\r\nconst mapStateToProps = (state: AppState) => {\r\n return {\r\n usersFirstName: state.personalInformation.usersFirstName,\r\n usersLastName: state.personalInformation.usersLastName,\r\n emailAddress: state.personalInformation.emailAddress\r\n };\r\n};\r\n\r\nconst mapDispatchToProps = (dispatch: ThunkDispatch) => {\r\n return {\r\n updateUsersFirstName: (value: string | undefined) => dispatch(updateUsersFirstNameAction(value)),\r\n updateUsersLastName: (value: string | undefined) => dispatch(updateUsersLastNameAction(value)),\r\n updateEmailAddress: (value: string | undefined) => dispatch(updateEmailAddressAction(value))\r\n };\r\n};\r\n\r\ninterface UserIdentificationComponentProps {\r\n usersFirstName?: string;\r\n usersLastName?: string;\r\n emailAddress?: string;\r\n updateUsersFirstName: (usersFirstName: string) => void;\r\n updateUsersLastName: (usersFirstName: string) => void;\r\n updateEmailAddress: (userName: string) => void;\r\n}\r\n\r\nexport class UserIdentificationFieldsComponent extends React.Component{\r\n componentDidMount() {\r\n window.scrollTo(0, 0);\r\n }\r\n private updateUsersFirstName = (e: React.ChangeEvent) => {\r\n this.props.updateUsersFirstName(e.target.value);\r\n }\r\n private updateUsersLastName = (e: React.ChangeEvent) => {\r\n this.props.updateUsersLastName(e.target.value);\r\n }\r\n private updateEmailAddress = (e: React.ChangeEvent) => {\r\n this.props.updateEmailAddress(e.target.value);\r\n }\r\n render() {\r\n return (\r\n <>\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n );\r\n }\r\n}\r\n\r\nexport class UserIdentificationComponent extends React.Component{\r\n componentDidMount() {\r\n window.scrollTo(0, 0);\r\n }\r\n private updateUsersFirstName = (e: React.ChangeEvent) => {\r\n this.props.updateUsersFirstName(e.target.value);\r\n }\r\n private updateUsersLastName = (e: React.ChangeEvent) => {\r\n this.props.updateUsersLastName(e.target.value);\r\n }\r\n private updateEmailAddress = (e: React.ChangeEvent) => {\r\n this.props.updateEmailAddress(e.target.value);\r\n }\r\n render() {\r\n return (\r\n <>\r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n );\r\n }\r\n}\r\n\r\nexport default connect(mapStateToProps, mapDispatchToProps)(setupApplicationInsightsPageTracking(UserIdentificationComponent));","import React from 'react';\r\nimport { connect } from \"react-redux\";\r\nimport { updateIsCitizenAction } from '../../redux/PersonalInformation/Actions';\r\nimport { AnyAction } from 'redux';\r\nimport { ThunkDispatch } from 'redux-thunk';\r\nimport AppState from '../../models/State/AppState';\r\nimport Card from '../../components/Card/Card';\r\nimport NavigationButtons from '../../components/NavigationButtons/NavigationButtons';\r\nimport { setupApplicationInsightsPageTracking } from '../PageUtilities';\r\n\r\nconst mapStateToProps = (state: AppState) => {\r\n return {\r\n isCitizen: state.personalInformation.isCitizen\r\n };\r\n};\r\n\r\nconst mapDispatchToProps = (dispatch: ThunkDispatch) => {\r\n return {\r\n updateIsCitizen: (value?: boolean) => dispatch(updateIsCitizenAction(value))\r\n };\r\n};\r\n\r\ninterface CitizenshipComponentProps {\r\n isCitizen?: boolean;\r\n updateIsCitizen: (value?: boolean) => void;\r\n}\r\n\r\nexport class CitizenshipComponent extends React.Component{\r\n componentDidMount() {\r\n window.scrollTo(0, 0);\r\n }\r\n private setIsCitizen = (e: React.ChangeEvent) => {\r\n this.props.updateIsCitizen(true);\r\n }\r\n private setIsNotCitizen = (e: React.ChangeEvent) => {\r\n this.props.updateIsCitizen(false);\r\n }\r\n render() {\r\n const baseButtonClassName = 'btn btn-outline-primary';\r\n const yesClassName = baseButtonClassName + (this.props.isCitizen ? ' active' : '');\r\n const noClassName = baseButtonClassName + (this.props.isCitizen === false ? ' active' : '');\r\n return (\r\n <>\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n );\r\n }\r\n}\r\n\r\nexport default connect(mapStateToProps, mapDispatchToProps)(setupApplicationInsightsPageTracking(CitizenshipComponent));","import React from 'react';\r\nimport { connect } from \"react-redux\";\r\nimport { AnyAction } from 'redux';\r\nimport { ThunkDispatch } from 'redux-thunk';\r\nimport AppState from '../../models/State/AppState';\r\nimport AvailableState from '../../models/AvailableState';\r\nimport AvailableCountry from '../../models/AvailableCountry';\r\nimport { updateBirthCountryAction, updateBirthStateAction } from '../../redux/PersonalInformation/Actions';\r\nimport { loadAvailableCountries } from '../../redux/BirthLocation/Actions';\r\nimport Card from '../../components/Card/Card';\r\nimport NavigationButtons from '../../components/NavigationButtons/NavigationButtons';\r\nimport { setupApplicationInsightsPageTracking } from '../PageUtilities';\r\n\r\nconst mapStateToProps = (state: AppState) => {\r\n let matchingBirthCountry = state.birthLocation.availableCountries ? state.birthLocation.availableCountries.find(a => a.value === state.personalInformation.birthCountry) : undefined;\r\n return {\r\n availableCountries: state.birthLocation.availableCountries,\r\n availableStates: matchingBirthCountry ? matchingBirthCountry.states : [],\r\n selectedCountry: state.personalInformation.birthCountry,\r\n selectedState: state.personalInformation.birthState\r\n };\r\n};\r\n\r\nconst mapDispatchToProps = (dispatch: ThunkDispatch) => {\r\n return {\r\n loadAvailableCountries: () => dispatch(loadAvailableCountries()),\r\n updateBirthCountry: (country: string) => dispatch(updateBirthCountryAction(country)),\r\n updateBirthState: (state?: string) => dispatch(updateBirthStateAction(state))\r\n };\r\n};\r\n\r\ninterface CitizenshipComponentProps {\r\n availableCountries?: AvailableCountry[];\r\n availableStates?: AvailableState[];\r\n selectedCountry?: string;\r\n selectedState?: string;\r\n loadAvailableCountries: () => void;\r\n updateBirthCountry: (country: string) => void;\r\n updateBirthState: (state?: string) => void;\r\n}\r\n\r\nexport class BirthLocationComponent extends React.Component{\r\n componentDidMount() {\r\n window.scrollTo(0, 0);\r\n this.props.loadAvailableCountries();\r\n }\r\n private updateBirthCountry = (e: React.ChangeEvent) => {\r\n this.props.updateBirthCountry(e.target.value);\r\n }\r\n private updateBirthState = (e: React.ChangeEvent) => {\r\n this.props.updateBirthState(e.target.value);\r\n }\r\n componentDidUpdate() {\r\n if (this.props.selectedState !== undefined && this.props.selectedState.length > 0) {\r\n if (this.props.availableStates && this.props.availableStates.length > 0) {\r\n if (!this.props.availableStates.some(a => a.value === this.props.selectedState)) {\r\n this.props.updateBirthState(undefined);\r\n }\r\n } else {\r\n this.props.updateBirthState(undefined);\r\n }\r\n }\r\n }\r\n render() {\r\n return (\r\n <>\r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n {this.props.availableStates && this.props.availableStates.length > 0 &&\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n }\r\n
\r\n \r\n \r\n );\r\n }\r\n}\r\n\r\nexport default connect(mapStateToProps, mapDispatchToProps)(setupApplicationInsightsPageTracking(BirthLocationComponent));","import React from 'react';\r\nimport { connect } from \"react-redux\";\r\nimport { updateIsPermanentResidentAction, updateGreenCardAction } from '../../redux/PersonalInformation/Actions';\r\nimport { AnyAction } from 'redux';\r\nimport { ThunkDispatch } from 'redux-thunk';\r\nimport AppState from '../../models/State/AppState';\r\nimport Card from '../../components/Card/Card';\r\nimport NavigationButtons from '../../components/NavigationButtons/NavigationButtons';\r\nimport { setupApplicationInsightsPageTracking } from '../PageUtilities';\r\n\r\nconst mapStateToProps = (state: AppState) => {\r\n return {\r\n isPermanentResident: state.personalInformation.isPermanentResident,\r\n greenCard: state.personalInformation.greenCard,\r\n isGreenCardRequired: state.validation.personalInformation.fields.isGreenCardRequired\r\n };\r\n};\r\n\r\nconst mapDispatchToProps = (dispatch: ThunkDispatch) => {\r\n return {\r\n updateIsPermanentResident: (value?: boolean) => dispatch(updateIsPermanentResidentAction(value)),\r\n updateGreenCard: (value?: string) => dispatch(updateGreenCardAction(value))\r\n };\r\n};\r\n\r\ninterface PermanentResidentComponentProps {\r\n isPermanentResident?: boolean;\r\n greenCard?: string;\r\n isGreenCardRequired: boolean;\r\n updateIsPermanentResident: (value?: boolean) => void;\r\n updateGreenCard: (value?: string) => void;\r\n}\r\n\r\nexport class PermanentResidentComponent extends React.Component{\r\n componentDidMount() {\r\n window.scrollTo(0, 0);\r\n }\r\n private setIsPermanentResident = (e: React.ChangeEvent) => {\r\n this.props.updateIsPermanentResident(true);\r\n }\r\n private setIsNotPermanentResident = (e: React.ChangeEvent) => {\r\n this.props.updateIsPermanentResident(false);\r\n }\r\n private updateGreenCard = (e: React.ChangeEvent) => {\r\n this.props.updateGreenCard(e.target.value);\r\n }\r\n render() {\r\n const baseButtonClassName = 'btn btn-outline-primary';\r\n const yesClassName = baseButtonClassName + (this.props.isPermanentResident ? ' active' : '');\r\n const noClassName = baseButtonClassName + (this.props.isPermanentResident === false ? ' active' : '');\r\n return (\r\n <>\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n {this.props.isGreenCardRequired &&\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n }\r\n
\r\n \r\n \r\n );\r\n }\r\n}\r\n\r\nexport default connect(mapStateToProps, mapDispatchToProps)(setupApplicationInsightsPageTracking(PermanentResidentComponent));","import React from 'react';\r\nimport { connect } from \"react-redux\";\r\nimport AppState from '../../models/State/AppState';\r\n\r\nimport { Dictionary } from '../../models/State/BrandState';\r\nimport { setupApplicationInsightsPageTracking } from '../PageUtilities';\r\n\r\nconst mapStateToProps = (state: AppState) => {\r\n return {\r\n canContinue: state.currentPage.canContinue,\r\n links: state.brand.links\r\n };\r\n};\r\n\r\ninterface DeclinedComponentProps {\r\n canContinue: boolean;\r\n links?: Dictionary;\r\n}\r\n\r\nclass Declined extends React.Component {\r\n componentDidMount() {\r\n window.scrollTo(0, 0);\r\n }\r\n private getHomepageAddress = (): string | undefined => {\r\n if (this.props.links !== undefined && this.props.links[\"homepage\"] !== undefined) {\r\n return this.props.links[\"homepage\"];\r\n }\r\n \r\n return undefined;\r\n }\r\n\r\n render() {\r\n return (\r\n <>\r\n
\r\n
\r\n

We appreciate your time, but we are unable to offer you Critical Illness Insurance coverage at the moment.

\r\n

If you would like more information, please contact us at hello@prepareinsure.com

\r\n
\r\n
\r\n
\r\n Done\r\n
\r\n
\r\n
\r\n \r\n );\r\n }\r\n}\r\n\r\nexport default connect(mapStateToProps)(setupApplicationInsightsPageTracking(Declined));","import React from 'react';\r\nimport { connect } from \"react-redux\";\r\nimport { AnyAction } from 'redux';\r\nimport { ThunkDispatch } from 'redux-thunk';\r\nimport AppState from '../../models/State/AppState';\r\n\r\nimport { sendConfirmationEmail } from '../../redux/Approved/Actions';\r\nimport { Dictionary } from '../../models/State/BrandState';\r\nimport { setupApplicationInsightsPageTracking } from '../PageUtilities';\r\nimport CaseResult from '../../models/CaseResult';\r\n\r\nconst mapStateToProps = (state: AppState) => {\r\n return {\r\n isFinalApproved: state.case.caseResult === CaseResult.Approved, \r\n emailAddress: state.personalInformation.emailAddress,\r\n policyNumber: state.policy.policyNumber,\r\n links: state.brand.links\r\n };\r\n};\r\n\r\nconst mapDispatchToProps = (dispatch: ThunkDispatch) => {\r\n return {\r\n sendConfirmationEmail: (isFinalApproved: boolean) => dispatch(sendConfirmationEmail(isFinalApproved))\r\n };\r\n};\r\n\r\ninterface FinalApprovedComponentProps {\r\n isFinalApproved: boolean;\r\n emailAddress?: string;\r\n policyNumber?: number;\r\n sendConfirmationEmail: (isFinalApproved: boolean) => void;\r\n links?: Dictionary;\r\n}\r\n\r\nclass FinalApproved extends React.Component {\r\n componentDidMount() {\r\n window.scrollTo(0, 0);\r\n this.props.sendConfirmationEmail(this.props.isFinalApproved);\r\n }\r\n\r\n private getHomepageAddress = (): string | undefined => {\r\n if (this.props.links !== undefined && this.props.links[\"homepage\"] !== undefined) {\r\n return this.props.links[\"homepage\"];\r\n }\r\n return undefined;\r\n }\r\n\r\n render() {\r\n return (\r\n <>\r\n
\r\n
\r\n {this.props.isFinalApproved ?\r\n <>\r\n

Your application has been submitted to Assurity.

\r\n

Your policy number is {this.props.policyNumber}.

\r\n

Your policy will be issued and mailed to you in the next 2-4 business days.

\r\n

No coverage is effective until the first full premium is paid and payment is honored.

\r\n

A confirmation email has been sent to {this.props.emailAddress}.

\r\n : <>\r\n

Thank you for applying!

\r\n

Additional information is needed to make a decision on this application. Upon signature and submission, the application will be referred to Underwriting for review.

\r\n

Your policy number is {this.props.policyNumber}.

\r\n

We will reach out to you shortly with next steps.

\r\n

A confirmation email has been sent to {this.props.emailAddress}.

\r\n \r\n }\r\n
\r\n
\r\n
\r\n Done\r\n
\r\n
\r\n
\r\n \r\n );\r\n }\r\n}\r\n\r\nexport default connect(mapStateToProps, mapDispatchToProps)(setupApplicationInsightsPageTracking(FinalApproved));","import { ActionCreator, AnyAction } from \"redux\";\r\nimport { ThunkAction, ThunkDispatch } from \"redux-thunk\";\r\nimport AppState from \"../../models/State/AppState\";\r\nimport { sendApplicationConfirmationEmail, sendApplicationUnderwritingEmail } from \"../../accessors/NotificationAccessor\";\r\n\r\nexport const sendConfirmationEmail: ActionCreator, AppState, null, AnyAction>> = (isFinalApproved: boolean) => {\r\n return async (dispatch: ThunkDispatch, getState: () => AppState): Promise => {\r\n const currState = getState();\r\n if (currState.personalInformation.usersFirstName !== undefined &&\r\n currState.personalInformation.usersLastName !== undefined &&\r\n currState.personalInformation.emailAddress !== undefined &&\r\n currState.policy.policyNumber !== undefined) {\r\n if (isFinalApproved) {\r\n sendApplicationConfirmationEmail(currState.personalInformation.usersFirstName,\r\n currState.personalInformation.usersLastName,\r\n currState.personalInformation.emailAddress,\r\n currState.demographicInformation.referrer,\r\n currState.policy.policyNumber.toString());\r\n } else {\r\n sendApplicationUnderwritingEmail(currState.personalInformation.usersFirstName,\r\n currState.personalInformation.usersLastName,\r\n currState.personalInformation.emailAddress,\r\n currState.demographicInformation.referrer,\r\n currState.policy.policyNumber.toString()); \r\n }\r\n }\r\n };\r\n}","import React from 'react';\r\nimport { ThunkDispatch } from 'redux-thunk';\r\nimport { AnyAction } from 'redux';\r\nimport AppState from '../../models/State/AppState';\r\nimport { connect } from \"react-redux\";\r\nimport { fetchUrlAction } from '../../redux/Documents/Actions';\r\nimport { nextPageAction, declinedPageAction } from '../../redux/CurrentPage/Actions';\r\nimport { setupApplicationInsightsPageTracking } from '../PageUtilities';\r\n\r\nconst mapStateToProps = (state: AppState) => {\r\n return {\r\n signingUrl: state.document.signingUrl\r\n };\r\n};\r\n\r\nconst mapDispatchToProps = (dispatch: ThunkDispatch) => {\r\n return {\r\n continue: () => dispatch(nextPageAction()),\r\n declined: () => dispatch(declinedPageAction()),\r\n fetchUrlAction: () => dispatch(fetchUrlAction())\r\n };\r\n};\r\n\r\ninterface SignDocumentsProps {\r\n signingUrl?: string;\r\n continue: () => void;\r\n declined: () => void;\r\n fetchUrlAction: () => void;\r\n}\r\n\r\nclass SignDocuments extends React.Component {\r\n componentDidMount() {\r\n window.scrollTo(0, 0);\r\n this.props.fetchUrlAction();\r\n }\r\n\r\n private loadFrame = (): void => {\r\n var iFrame = document.getElementById('docuSignFrame') as HTMLIFrameElement;\r\n \r\n if (iFrame.contentWindow !== null) {\r\n try {\r\n if (iFrame.contentWindow.location.href.startsWith(window.location.origin)) {\r\n let url = new URL(iFrame.contentWindow.location.href);\r\n\r\n if (url.searchParams.get(\"event\") === 'signing_complete') {\r\n this.props.continue();\r\n } else {\r\n this.props.declined();\r\n }\r\n }\r\n } catch(e) {\r\n }\r\n }\r\n };\r\n\r\n render() {\r\n return (\r\n
\r\n {this.props.signingUrl !== undefined &&\r\n \r\n }\r\n
\r\n );\r\n }\r\n}\r\n\r\nexport default connect(mapStateToProps, mapDispatchToProps)(setupApplicationInsightsPageTracking(SignDocuments));","import React from 'react';\r\nimport { connect } from \"react-redux\";\r\nimport { updateStreetAddressAction, updateCityAction, updateZipAction, updateStreetAddress2Action } from '../../redux/PersonalInformation/Actions';\r\nimport { AnyAction } from 'redux';\r\nimport { ThunkDispatch } from 'redux-thunk';\r\nimport AppState from '../../models/State/AppState';\r\nimport Card from '../../components/Card/Card';\r\nimport NavigationButtons from '../../components/NavigationButtons/NavigationButtons';\r\nimport { setupApplicationInsightsPageTracking } from '../PageUtilities';\r\n\r\nconst mapStateToProps = (state: AppState) => {\r\n return {\r\n streetAddress: state.personalInformation.streetAddress,\r\n streetAddress2: state.personalInformation.streetAddress2,\r\n city: state.personalInformation.city,\r\n state: state.demographicInformation.state,\r\n zip: state.personalInformation.zip\r\n };\r\n};\r\n\r\nconst mapDispatchToProps = (dispatch: ThunkDispatch) => {\r\n return {\r\n updateStreetAddress: (value: string | undefined) => dispatch(updateStreetAddressAction(value)),\r\n updateStreetAddress2: (value: string | undefined) => dispatch(updateStreetAddress2Action(value)),\r\n updateCity: (value: string | undefined) => dispatch(updateCityAction(value)),\r\n updateZip: (value: string | undefined) => dispatch(updateZipAction(value))\r\n };\r\n};\r\n\r\ninterface UserIdentificationComponentProps {\r\n streetAddress?: string;\r\n streetAddress2?: string;\r\n city?: string;\r\n state?: string;\r\n zip?: string;\r\n updateStreetAddress: (value: string) => void;\r\n updateStreetAddress2: (value: string) => void;\r\n updateCity: (value: string) => void;\r\n updateZip: (value: string) => void;\r\n}\r\n\r\nexport class UserIdentificationComponent extends React.Component{\r\n componentDidMount() {\r\n window.scrollTo(0, 0);\r\n }\r\n private updateStreetAddress = (e: React.ChangeEvent) => {\r\n this.props.updateStreetAddress(e.target.value);\r\n }\r\n private updateStreetAddress2 = (e: React.ChangeEvent) => {\r\n this.props.updateStreetAddress2(e.target.value);\r\n }\r\n private updateCity = (e: React.ChangeEvent) => {\r\n this.props.updateCity(e.target.value);\r\n }\r\n private updateZip = (e: React.ChangeEvent) => {\r\n this.props.updateZip(e.target.value);\r\n }\r\n render() {\r\n return (\r\n <>\r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n );\r\n }\r\n}\r\n\r\nexport default connect(mapStateToProps, mapDispatchToProps)(setupApplicationInsightsPageTracking(UserIdentificationComponent));","import React from 'react';\r\nimport { connect } from \"react-redux\";\r\nimport { updatePhoneNumberAction } from '../../redux/PersonalInformation/Actions';\r\nimport { AnyAction } from 'redux';\r\nimport { ThunkDispatch } from 'redux-thunk';\r\nimport AppState from '../../models/State/AppState';\r\nimport NavigationButtons from '../../components/NavigationButtons/NavigationButtons';\r\nimport Card from '../../components/Card/Card';\r\nimport { setupApplicationInsightsPageTracking } from '../PageUtilities';\r\n\r\nconst mapStateToProps = (state: AppState) => {\r\n return {\r\n phoneNumber: state.personalInformation.phoneNumber\r\n };\r\n};\r\n\r\nconst mapDispatchToProps = (dispatch: ThunkDispatch) => {\r\n return {\r\n updatePhoneNumber: (value: string | undefined) => dispatch(updatePhoneNumberAction(value))\r\n };\r\n};\r\n\r\ninterface UserIdentificationComponentProps {\r\n phoneNumber?: string;\r\n updatePhoneNumber: (value: string) => void;\r\n}\r\n\r\nexport class UserIdentificationComponent extends React.Component{\r\n componentDidMount() {\r\n window.scrollTo(0, 0);\r\n }\r\n private updatePhoneNumber = (e: React.ChangeEvent) => {\r\n this.props.updatePhoneNumber(e.target.value);\r\n }\r\n render() {\r\n return (\r\n <>\r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n );\r\n }\r\n}\r\n\r\nexport default connect(mapStateToProps, mapDispatchToProps)(setupApplicationInsightsPageTracking(UserIdentificationComponent));","import React from 'react';\r\nimport { connect } from \"react-redux\";\r\nimport { updateSocialSecurityNumberAction } from '../../redux/PersonalInformation/Actions';\r\nimport { AnyAction } from 'redux';\r\nimport { ThunkDispatch } from 'redux-thunk';\r\nimport AppState from '../../models/State/AppState';\r\nimport Card from '../../components/Card/Card';\r\nimport NavigationButtons from '../../components/NavigationButtons/NavigationButtons';\r\nimport { setupApplicationInsightsPageTracking } from '../PageUtilities';\r\n\r\nconst mapStateToProps = (state: AppState) => {\r\n return {\r\n socialSecurityNumber: state.personalInformation.socialSecurityNumber\r\n };\r\n};\r\n\r\nconst mapDispatchToProps = (dispatch: ThunkDispatch) => {\r\n return {\r\n updateSocialSecurityNumber: (value: string | undefined) => dispatch(updateSocialSecurityNumberAction(value))\r\n };\r\n};\r\n\r\ninterface SocialSecurityNumberComponentProps {\r\n socialSecurityNumber?: string;\r\n updateSocialSecurityNumber: (value: string) => void;\r\n}\r\n\r\nexport class SocialSecurityNumberComponent extends React.Component{\r\n componentDidMount() {\r\n window.scrollTo(0, 0);\r\n }\r\n private updateSocialSecurityNumber = (e: React.ChangeEvent) => {\r\n this.props.updateSocialSecurityNumber(e.target.value);\r\n }\r\n render() {\r\n return (\r\n <>\r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n );\r\n }\r\n}\r\n\r\nexport default connect(mapStateToProps, mapDispatchToProps)(setupApplicationInsightsPageTracking(SocialSecurityNumberComponent));","import React from \"react\";\r\n\r\ntype IntegerInputProps = Omit, 'type'>;\r\nexport default class IntegerInput extends React.Component{\r\n private handleKeyPress = (e: React.KeyboardEvent) =>{\r\n if(isNaN(Number(e.key))){\r\n e.stopPropagation();\r\n e.preventDefault();\r\n return;\r\n }\r\n if(this.props.onKeyPress){\r\n this.props.onKeyPress(e);\r\n }\r\n }\r\n render(){\r\n return \r\n }\r\n}","import React from 'react';\r\nimport { connect } from \"react-redux\";\r\nimport { updateHeightFeetAction, updateWeightAction, updateHeightInchesAction } from '../../redux/PersonalInformation/Actions';\r\nimport { AnyAction } from 'redux';\r\nimport { ThunkDispatch } from 'redux-thunk';\r\nimport AppState from '../../models/State/AppState';\r\nimport NavigationButtons from '../../components/NavigationButtons/NavigationButtons';\r\nimport Card from '../../components/Card/Card';\r\nimport { setupApplicationInsightsPageTracking } from '../PageUtilities';\r\nimport IntegerInput from '../../components/IntegerInput';\r\n\r\nconst mapStateToProps = (state: AppState) => {\r\n return {\r\n heightFeet: state.personalInformation.heightFeet,\r\n heightInches: state.personalInformation.heightInches,\r\n weight: state.personalInformation.weightPounds\r\n };\r\n};\r\n\r\nconst mapDispatchToProps = (dispatch: ThunkDispatch) => {\r\n return {\r\n updateHeightFeet: (value?: number) => dispatch(updateHeightFeetAction(value)),\r\n updateHeightInches: (value?: number) => dispatch(updateHeightInchesAction(value)),\r\n updateWeight: (value?: number) => dispatch(updateWeightAction(value))\r\n };\r\n};\r\n\r\ninterface BodyComponentProps {\r\n heightFeet?: number;\r\n heightInches?: number;\r\n weight?: number;\r\n updateHeightFeet: (value?: number) => void;\r\n updateHeightInches: (value?: number) => void;\r\n updateWeight: (value?: number) => void;\r\n}\r\n\r\nexport class BodyComponent extends React.Component{\r\n componentDidMount() {\r\n window.scrollTo(0, 0);\r\n }\r\n private updateHeightFeet = (e: React.ChangeEvent) => {\r\n let value = parseInt(e.target.value);\r\n this.props.updateHeightFeet(value);\r\n }\r\n private updateHeightInches = (e: React.ChangeEvent) => {\r\n let value = parseInt(e.target.value);\r\n this.props.updateHeightInches(value);\r\n }\r\n private updateWeight = (e: React.ChangeEvent) => {\r\n let value = parseInt(e.target.value);\r\n this.props.updateWeight(value);\r\n }\r\n render() {\r\n return (\r\n <>\r\n \r\n
\r\n
Height
\r\n
\r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
Weight
\r\n
\r\n
\r\n
\r\n \r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n );\r\n }\r\n}\r\n\r\nexport default connect(mapStateToProps, mapDispatchToProps)(setupApplicationInsightsPageTracking(BodyComponent));","import React from 'react';\r\nimport { connect } from \"react-redux\";\r\nimport { AnyAction } from 'redux';\r\nimport { CardElement, injectStripe, ReactStripeElements } from 'react-stripe-elements';\r\nimport { ThunkDispatch } from 'redux-thunk';\r\nimport { formatNumber } from '../PageUtilities';\r\nimport { updateCardFieldAction, submitCreditCardAction } from '../../redux/Payment/Actions';\r\nimport AppState from '../../models/State/AppState';\r\n\r\nconst mapStateToProps = (state: AppState) => {\r\n return {\r\n benefitAmount: (state.benefitAmount.selectedAmount && state.benefitAmount.selectedAmount.benefitAmount) || 0,\r\n cost: (state.benefitAmount.selectedAmount && state.benefitAmount.selectedAmount.cost) || 0,\r\n canSubmit: state.validation.payment.fields.isPaymentInformationValid\r\n };\r\n};\r\n\r\nconst mapDispatchToProps = (dispatch: ThunkDispatch) => {\r\n return {\r\n updateCardFields: (stripeProps: stripe.elements.ElementChangeResponse) => dispatch(updateCardFieldAction(stripeProps)),\r\n submitCreditCard: (stripeProps?: ReactStripeElements.StripeProps) => dispatch(submitCreditCardAction(stripeProps)),\r\n };\r\n};\r\n\r\ninterface PaymentsComponentProps {\r\n stripe?: ReactStripeElements.StripeProps;\r\n benefitAmount: number;\r\n cost: number;\r\n canSubmit: boolean;\r\n updateCardFields: (stripeProps: stripe.elements.ElementChangeResponse) => void;\r\n submitCreditCard: (stripeProps?: ReactStripeElements.StripeProps) => void;\r\n}\r\n\r\nexport class PaymentsComponent extends React.Component{\r\n componentDidMount() {\r\n window.scrollTo(0, 0);\r\n }\r\n private updateCardFields = (e: stripe.elements.ElementChangeResponse) => {\r\n this.props.updateCardFields(e)\r\n }\r\n private submitCreditCard = () => {\r\n this.props.submitCreditCard(this.props.stripe);\r\n }\r\n render() {\r\n return (\r\n <>\r\n
\r\n
\r\n You are purchasing a ${formatNumber(this.props.benefitAmount)} Critical Illness Insurance Policy for ${this.props.cost.toFixed(2)} per month.\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n );\r\n }\r\n}\r\n\r\nexport default injectStripe(connect(mapStateToProps, mapDispatchToProps)(PaymentsComponent));\r\n","import React from 'react';\r\nimport { StripeProvider, Elements } from 'react-stripe-elements';\r\nimport PaymentFields from './PaymentFields';\r\nimport Card from '../../components/Card/Card';\r\nimport { getSettings } from '../../Settings';\r\n\r\nexport class PaymentsComponent extends React.Component{\r\n componentDidMount() {\r\n window.scrollTo(0, 0);\r\n }\r\n render() {\r\n var stripeApiKey = getSettings().stripeApiKey;\r\n return (\r\n <>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n }\r\n}\r\n\r\nexport default PaymentsComponent;\r\n","import React from 'react';\r\n\r\nimport bars from './bars.svg';\r\n\r\ninterface LoadingDataProps{\r\n heading: string;\r\n subheading: string;\r\n}\r\n\r\nexport class LoadingData extends React.Component{\r\n static defaultProps = { heading: \"Loading\", subheading: \"just one moment\"};\r\n render() {\r\n return (\r\n
\r\n \"loading\r\n {this.props.heading}\r\n {this.props.subheading}\r\n
\r\n );\r\n }\r\n}\r\n\r\nexport default LoadingData;\r\n","import React from 'react';\r\nimport { AnyAction } from 'redux';\r\nimport { connect } from \"react-redux\";\r\nimport { ThunkDispatch } from 'redux-thunk';\r\n\r\nimport AppState from '../../models/State/AppState';\r\n\r\nconst mapStateToProps = (state: AppState) => {\r\n return {\r\n progress: state.currentPage.progress\r\n };\r\n};\r\n\r\nconst mapDispatchToProps = (dispatch: ThunkDispatch) => {\r\n return {\r\n };\r\n};\r\n\r\n\r\ninterface ProgressBarComponentProps {\r\n progress?: number;\r\n}\r\n\r\nexport class ProgressBarComponent extends React.Component{\r\n render() {\r\n return (\r\n this.props.progress !== undefined &&\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n );\r\n }\r\n}\r\n\r\nexport default connect(mapStateToProps, mapDispatchToProps)(ProgressBarComponent);\r\n","import React from 'react';\r\nimport { connect } from \"react-redux\";\r\nimport { AnyAction } from 'redux';\r\nimport { ThunkDispatch } from 'redux-thunk';\r\nimport { Question } from '../../models/Question';\r\nimport { submitQuestionAnswerAction } from '../../redux/InterviewQuestions/Actions';\r\n\r\n\r\nconst mapDispatchToProps = (dispatch: ThunkDispatch) => {\r\n return {\r\n answerQuestion: (id: string, value: string) => dispatch(submitQuestionAnswerAction(id, value))\r\n };\r\n};\r\n\r\ninterface BinaryQuestionComponentProps {\r\n question: Question;\r\n answerQuestion: (id: string, value: string) => void;\r\n}\r\nclass BinaryQuestionComponent extends React.Component{\r\n componentDidMount() {\r\n window.scrollTo(0, 0);\r\n }\r\n private setFirstValue = () => {\r\n this.props.answerQuestion(this.props.question.id, this.props.question.options[0].value);\r\n }\r\n private setSecondValue = () => {\r\n this.props.answerQuestion(this.props.question.id, this.props.question.options[1].value);\r\n }\r\n render() {\r\n const baseButtonClassName = 'btn btn-outline-primary';\r\n const firstClassName = baseButtonClassName + (this.props.question.options[0].value === this.props.question.answer ? ' active' : '');\r\n const secondClassName = baseButtonClassName + (this.props.question.options[1].value === this.props.question.answer ? ' active' : '');\r\n return (\r\n <>\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n );\r\n }\r\n}\r\n\r\nexport default connect(null, mapDispatchToProps)(BinaryQuestionComponent);","import React from 'react';\r\nimport { connect } from \"react-redux\";\r\nimport { AnyAction } from 'redux';\r\nimport { ThunkDispatch } from 'redux-thunk';\r\nimport { Question } from '../../models/Question';\r\nimport { searchQuestionOptionsAction, submitQuestionAnswerAction } from '../../redux/InterviewQuestions/Actions';\r\nimport Select from 'react-select';\r\nimport { ValueType, InputActionMeta } from 'react-select/src/types';\r\n\r\n\r\nconst mapDispatchToProps = (dispatch: ThunkDispatch) => {\r\n return {\r\n answerQuestion: (id: string, value: string) => dispatch(submitQuestionAnswerAction(id, value)),\r\n searchQuestionAnswers: (id: string, category: string, value: string) => dispatch(searchQuestionOptionsAction(id, category, value))\r\n };\r\n};\r\n\r\ninterface SearchQuestionComponentProps {\r\n question: Question;\r\n answerQuestion: (id: string, value: string) => void;\r\n searchQuestionAnswers: (id: string, category: string, value: string) => void;\r\n}\r\nclass SearchQuestionComponent extends React.Component{\r\n componentDidMount() {\r\n window.scrollTo(0, 0);\r\n }\r\n private search = (value: string, actionMeta: InputActionMeta): void =>{\r\n if(actionMeta.action === \"input-change\" && this.props.question.searchCategoryId !== undefined){\r\n this.props.searchQuestionAnswers(this.props.question.id, this.props.question.searchCategoryId, value);\r\n }\r\n }\r\n private answer = (changeValue: ValueType<{value: string, label: string}>): void =>{\r\n this.props.answerQuestion(this.props.question.id, (changeValue as {value: string, label: string}).value );\r\n }\r\n render() {\r\n let values = this.props.question.options.map(a=>({value: a.value, label: a.text}));\r\n\r\n return (\r\n <>\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n \r\n );\r\n }\r\n}\r\n\r\nexport default connect(null, mapDispatchToProps)(SearchQuestionComponent);","import React from 'react';\r\nimport { connect } from \"react-redux\";\r\nimport { AnyAction } from 'redux';\r\nimport { ThunkDispatch } from 'redux-thunk';\r\nimport { Question } from '../../models/Question';\r\nimport { submitQuestionAnswersAction } from '../../redux/InterviewQuestions/Actions';\r\n\r\n\r\nconst mapDispatchToProps = (dispatch: ThunkDispatch) => {\r\n return {\r\n answerQuestions: (answers: { id: string, answer?: string }[]) => dispatch(submitQuestionAnswersAction(answers))\r\n }\r\n};\r\n\r\ninterface PrimaryQuestionComponentProps {\r\n question: Question;\r\n answerQuestions: (answers: { id: string, answer?: string }[]) => void;\r\n}\r\nclass PrimaryQuestionComponent extends React.Component{\r\n componentDidMount() {\r\n window.scrollTo(0, 0);\r\n }\r\n private answerAllNo = (e: React.ChangeEvent): void => {\r\n if (this.props.question.subQuestions !== undefined) {\r\n let answer = e.target.checked ? 'false' : undefined;\r\n let answers = this.props.question.subQuestions.map(a => {\r\n return {\r\n id: a.id,\r\n answer: answer\r\n };\r\n });\r\n this.props.answerQuestions(answers);\r\n }\r\n }\r\n private answerSubQuestion = (id: string, answer: string): void => {\r\n if (this.props.question.subQuestions !== undefined) {\r\n let answers = this.props.question.subQuestions.map(a => {\r\n let questionAnswer: string | undefined;\r\n if (a.id === id) {\r\n questionAnswer = answer;\r\n } else if (a.answer === undefined) {\r\n questionAnswer = 'false';\r\n } else {\r\n questionAnswer = a.answer;\r\n }\r\n return {\r\n id: a.id,\r\n answer: questionAnswer\r\n };\r\n });\r\n this.props.answerQuestions(answers);\r\n }\r\n }\r\n render() {\r\n if (this.props.question.subQuestions === undefined) {\r\n return undefined;\r\n }\r\n return (\r\n <>\r\n {\r\n this.props.question.subQuestions.map(a => )\r\n }\r\n
\r\n
\r\n
\r\n
\r\n a.answer === \"false\")} />\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n );\r\n }\r\n}\r\n\r\ninterface SubQuestionComponentProps {\r\n question: Question;\r\n answerQuestion: (id: string, value: string) => void;\r\n}\r\n\r\nclass SubQuestion extends React.Component{\r\n private answer = (e: React.ChangeEvent) => {\r\n let value = e.target.checked ? \"true\" : \"false\";\r\n this.props.answerQuestion(this.props.question.id, value);\r\n }\r\n render() {\r\n const checkboxId = `subQuestion_${this.props.question.id}`;\r\n return (\r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n );\r\n }\r\n}\r\n\r\nexport default connect(null, mapDispatchToProps)(PrimaryQuestionComponent);","import React from 'react';\r\nimport { connect } from \"react-redux\";\r\nimport { AnyAction } from 'redux';\r\nimport { ThunkDispatch } from 'redux-thunk';\r\nimport { Question } from '../../models/Question';\r\nimport { submitQuestionAnswerAction } from '../../redux/InterviewQuestions/Actions';\r\n\r\n\r\nconst mapDispatchToProps = (dispatch: ThunkDispatch) => {\r\n return {\r\n answerQuestion: (id: string, value: string | undefined) => dispatch(submitQuestionAnswerAction(id, value))\r\n };\r\n};\r\n\r\ninterface OptionsQuestionComponentProps {\r\n question: Question;\r\n answerQuestion: (id: string, value: string | undefined) => void;\r\n}\r\nclass OptionsQuestionComponent extends React.Component{\r\n componentDidMount() {\r\n window.scrollTo(0, 0);\r\n }\r\n private answer = (e: React.ChangeEvent): void => {\r\n let answer = e.target.value === \"\" ? undefined : e.target.value;\r\n this.props.answerQuestion(this.props.question.id, answer);\r\n }\r\n render() {\r\n let values = this.props.question.options.map(a => ({ value: a.value, label: a.text }));\r\n let answer = this.props.question.answer === undefined ? \"\" : this.props.question.answer;\r\n return (\r\n <>\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n \r\n );\r\n }\r\n}\r\n\r\nexport default connect(null, mapDispatchToProps)(OptionsQuestionComponent);","import React from 'react';\r\nimport { connect } from \"react-redux\";\r\nimport { AnyAction } from 'redux';\r\nimport { ThunkDispatch } from 'redux-thunk';\r\nimport { Question } from '../../models/Question';\r\nimport { submitQuestionAnswerAction } from '../../redux/InterviewQuestions/Actions';\r\n\r\nconst mapDispatchToProps = (dispatch: ThunkDispatch) => {\r\n return {\r\n answerQuestion: (id: string, value: string) => dispatch(submitQuestionAnswerAction(id, value))\r\n };\r\n};\r\n\r\ninterface SearchQuestionComponentProps {\r\n question: Question;\r\n answerQuestion: (id: string, value: string) => void;\r\n}\r\nclass SearchQuestionComponent extends React.Component{\r\n componentDidMount() {\r\n window.scrollTo(0, 0);\r\n }\r\n private answerQuestion(answer: string) {\r\n this.props.answerQuestion(this.props.question.id, answer);\r\n }\r\n\r\n private answer = (e: React.ChangeEvent): void => {\r\n this.answerQuestion(e.target.value);\r\n }\r\n render() {\r\n let value = this.props.question.answer === undefined ? \"\" : this.props.question.answer;\r\n return (\r\n <>\r\n
\r\n
\r\n
\r\n