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b,EAAM/b,OACvBgc,EAEJ,IAAIE,MAAc,iBAAiBC,OAAOH,EAAkB,C","sources":["components/Breadcrumb/BreadcrumbLoader.tsx","components/Form/Form.styled.ts","components/FormSection/FormSection.styled.ts","components/Hero/HeroLoader.tsx","components/PageContent/PageContent.tsx","components/Progress/ProgressLoader.tsx","pages/MortgageApplicationPage/MortgageApplicationPage.styled.ts","pages/MortgageApplicationPage/MortgageApplicationPageUtils/getFormElement.tsx","pages/MortgageApplicationPage/MortgageApplicationPageUtils/renderElement.tsx","pages/MortgageApplicationPage/MortgageApplicationPageElements/AntiForgeryElement.tsx","pages/MortgageApplicationPage/MortgageApplicationPageUtils/showNextFormSections.tsx","pages/MortgageApplicationPage/MortgageApplicationPageUtils/branchFlowOnChange.tsx","pages/MortgageApplicationPage/MortgageApplicationPageUtils/generateDynamicReplacements.tsx","utils/sleep.tsx","pages/MortgageApplicationPage/MortgageApplicationPageUtils/setFieldErrorsFromValidation.ts","pages/MortgageApplicationPage/MortgageApplicationPageUtils/unregisterElements.ts","pages/MortgageApplicationPage/MortgageApplicationPageElements/LoanTypeElement.tsx","pages/MortgageApplicationPage/MortgageApplicationPageElements/CollateralTypeElement.tsx","pages/MortgageApplicationPage/MortgageApplicationPageElements/NumberOfFullTimeDependantsElement.tsx","pages/MortgageApplicationPage/MortgageApplicationPageElements/TransferAmountElement.tsx","pages/MortgageApplicationPage/MortgageApplicationPageElements/DownPaymentElement.tsx","pages/MortgageApplicationPage/MortgageApplicationPageElements/KeptAssetElements.tsx","pages/MortgageApplicationPage/MortgageApplicationPageElements/PurchasePriceElement.tsx","pages/MortgageApplicationPage/MortgageApplicationPageElements/CollateralMunicipalityElement.tsx","pages/MortgageApplicationPage/MortgageApplicationPageElements/CollateralStreetElement.tsx","pages/MortgageApplicationPage/MortgageApplicationPageElements/CollateralPostalCodeElement.tsx","pages/MortgageApplicationPage/MortgageApplicationPageElements/CollateralMonthlyFeeElement.tsx","pages/MortgageApplicationPage/MortgageApplicationPageElements/CollateralAreaElement.tsx","pages/MortgageApplicationPage/MortgageApplicationPageElements/CollateralIsNewProductionElement.tsx","pages/MortgageApplicationPage/MortgageApplicationPageElements/CreditsElements.tsx","pages/MortgageApplicationPage/MortgageApplicationPageElements/NumberOfApplicantsElement.tsx","pages/MortgageApplicationPage/MortgageApplicationPageElements/AcceptTermsElement.tsx","pages/MortgageApplicationPage/MortgageApplicationPageElements/PhoneNumberElement.tsx","pages/MortgageApplicationPage/MortgageApplicationPageElements/CivilStatusElement.tsx","pages/MortgageApplicationPage/MortgageApplicationPageElements/OccupationTypeElement.tsx","pages/MortgageApplicationPage/MortgageApplicationPageElements/EmployerNameElement.tsx","pages/MortgageApplicationPage/MortgageApplicationPageElements/OwnCompanyOrgNumberElement.tsx","pages/MortgageApplicationPage/MortgageApplicationPageElements/MonthlyIncomeElement.tsx","pages/MortgageApplicationPage/MortgageApplicationPageElements/IncomeInForeignCurrencyElement.tsx","pages/MortgageApplicationPage/MortgageApplicationPageElements/HasDependentsElement.tsx","pages/MortgageApplicationPage/MortgageApplicationPageElements/NumberOfPartTimeDependantsElement.tsx","pages/MortgageApplicationPage/MortgageApplicationPageElements/HasCreditsElement.tsx","pages/MortgageApplicationPage/MortgageApplicationPageElements/HasKeptAssetsElement.tsx","pages/MortgageApplicationPage/MortgageApplicationPageElements/GivenNameElement.tsx","pages/MortgageApplicationPage/MortgageApplicationPageElements/NinElement.tsx","pages/MortgageApplicationPage/MortgageApplicationPageElements/FamilyNameElement.tsx","pages/MortgageApplicationPage/MortgageApplicationPageElements/EmailElement.tsx","pages/MortgageApplicationPage/MortgageApplicationPageUtils/getCaptionByValue.tsx","pages/MortgageApplicationPage/MortgageApplicationPageElements/ReviewLoanAmountsAndCollateralInfo.tsx","pages/MortgageApplicationPage/MortgageApplicationPageElements/ReviewHousehold.tsx","pages/MortgageApplicationPage/MortgageApplicationPageElements/ReviewLifeSituationAndEconomy.tsx","pages/MortgageApplicationPage/MortgageApplicationPageElements/ReviewPersonalinformation.tsx","pages/MortgageApplicationPage/MortgageApplicationPageSteps/MortgageApplicationInitialStep.tsx","pages/MortgageApplicationPage/MortgageApplicationPageSteps/PersonalInformationStep.tsx","pages/MortgageApplicationPage/MortgageApplicationPageSteps/ReviewStep.tsx","pages/MortgageApplicationPage/MortgageApplicationPageSteps/ConfirmationStep.tsx","pages/MortgageApplicationPage/MortgageApplicationPageSteps/BankIdV2AuthStep.tsx","pages/MortgageApplicationPage/MortgageApplicationPage.tsx","pages/MortgageApplicationPage/MortgageApplicationPageUtils/pollAuthenticationToken.ts","utils/forms.ts"],"sourcesContent":["import loadable, { DefaultComponent } from \"@loadable/component\";\nimport React, { ReactElement } from \"react\";\n\nimport BreadcrumbProps from \"./BreadcrumbProps\";\n\nconst Breadcrumb = loadable(\n (): Promise> =>\n import(/* webpackChunkName: \"Breadcrumb\" */ \"./Breadcrumb\"),\n);\nconst BreadcrumbLoader = (props: BreadcrumbProps): ReactElement => (\n \n);\nexport default BreadcrumbLoader;\n","import { FormHelperText } from \"@mui/material\";\nimport { styled, css } from \"styled-components\";\nimport theme from \"styled-theming\";\n\nimport {\n styleBodyL,\n styleHeadingM,\n styleHeadingXL,\n} from \"style/components/Typography\";\nimport { columnGap } from \"style/grid\";\nimport { MQ } from \"style/mediaQueries\";\n\nexport const StyledForm = styled.form`\n ${columnGap};\n align-items: center;\n display: flex;\n flex-direction: column;\n margin-top: 2.1875rem;\n padding-bottom: 4.8125rem;\n position: relative;\n width: 100%;\n\n ${MQ.FROM_M} {\n margin-top: 3.9375rem;\n }\n\n ${MQ.FROM_XL} {\n margin-top: 5.25rem;\n }\n ${theme(\"formGuide\", {\n true: css`\n display: grid;\n grid-column: col-start 1 / span 12;\n grid-template-columns: repeat(1, [col-start] 1fr);\n ${MQ.FROM_M} {\n grid-template-columns: repeat(12, [col-start] 1fr);\n }\n `,\n })}\n`;\n\nexport const FormGuideHeader = styled.div`\n align-self: flex-start;\n grid-column: col-start 1 / span 12;\n margin-bottom: 3.5rem;\n\n ${MQ.FROM_M} {\n grid-column: col-start 1 / span 6;\n }\n`;\n\nexport const FormGuideHeading = styled.h2`\n ${styleHeadingXL};\n margin-bottom: 1.75rem;\n margin-top: 0;\n`;\n\nexport const FormGuideIntroduction = styled.div`\n ${styleBodyL};\n margin-top: 0;\n`;\n\nexport const FormElements = styled.div`\n ${columnGap}\n display: grid;\n flex-direction: column;\n gap: 0.875rem;\n grid-column: col-start 1 / span 4;\n grid-template-columns: repeat(2, [col-start] 1fr);\n width: 100%;\n\n ${MQ.FROM_M} {\n grid-template-columns: repeat(6, [col-start] 1fr);\n gap: 1.3125rem;\n }\n\n ${MQ.FROM_XL} {\n gap: 1.75rem;\n }\n\n button[type=\"submit\"] {\n align-self: flex-start;\n }\n`;\n\nexport const FormMessage = styled(FormHelperText)`\n grid-column: col-start 1 / span 4;\n\n && {\n ${styleBodyL};\n &.Mui-error {\n color: var(--color-coral);\n }\n }\n`;\n\nexport const SuccessMessage = styled.div`\n ${styleHeadingM};\n grid-column: col-start 1 / span 4;\n margin: 0;\n`;\n","import { styled, css } from \"styled-components\";\nimport theme from \"styled-theming\";\n\nimport Form from \"components/Form\";\nimport { Container as GridContainer } from \"style/components/Page\";\nimport { styleBodyL, styleHeadingXL } from \"style/components/Typography\";\nimport { GUTTER } from \"style/grid\";\nimport { topPadOffset } from \"style/headerOffsets\";\nimport { MQ } from \"style/mediaQueries\";\n\nexport const Container = styled(GridContainer)`\n position: relative;\n\n ${MQ.FROM_M} {\n column-gap: ${GUTTER.XL};\n display: grid;\n grid-auto-rows: auto;\n grid-template-areas: \"text form\";\n grid-template-columns: repeat(12, [col-start] 1fr);\n }\n`;\n\nexport const MultiStepWrapper = styled.div`\n align-items: center;\n display: flex;\n flex-direction: column;\n width: 100%;\n`;\n\nexport const MultiStepContent = styled(GridContainer)`\n padding-bottom: 0;\n position: relative;\n`;\n\nexport const Content = styled.div.attrs<{\n $headerVisible: boolean;\n}>(() => ({}))`\n ${MQ.FROM_M} {\n align-self: flex-start;\n grid-area: text;\n grid-column: ${theme(\"displayOption\", {\n Left: \"col-start 1 / span 6\",\n Right: \"col-start 7 / span 6\",\n })};\n position: sticky;\n text-align: ${theme(\"displayOption\", {\n Left: \"left\",\n Right: \"right\",\n })};\n top: 4.375rem;\n ${topPadOffset};\n }\n`;\n\nexport const Heading = styled.h2`\n ${styleHeadingXL};\n margin-bottom: 1.75rem;\n margin-top: 0;\n`;\n\nexport const Introduction = styled.div`\n ${styleBodyL};\n margin-top: 0;\n`;\n\nexport const StyledForm = styled(Form)`\n justify-content: flex-start;\n ${theme(\"isMultiStepForm\", {\n false: css`\n ${MQ.FROM_M} {\n grid-area: form;\n grid-column: ${theme(\"displayOption\", {\n Left: \"col-start 7 / span 6\",\n Right: \"col-start 1 / span 6\",\n })};\n }\n\n ${MQ.FROM_XL} {\n grid-column: ${theme(\"displayOption\", {\n Left: \"col-start 7 / span 5\",\n Right: \"col-start 2 / span 5\",\n })};\n }\n `,\n })}\n`;\n","import loadable, { DefaultComponent } from \"@loadable/component\";\nimport React, { ReactElement } from \"react\";\n\nimport HeroProps from \"./HeroProps\";\n\nconst Hero = loadable(\n (): Promise> =>\n import(/* webpackChunkName: \"Hero\" */ \"./Hero\"),\n);\nconst HeroLoader = (props: HeroProps): ReactElement => ;\nexport default HeroLoader;\n","import React, { ReactElement } from \"react\";\n\nimport ContentArea from \"components/ContentArea\";\n\nimport { PageContentProps } from \"./PageContentProps\";\n\nconst PageContent = ({\n mainContent = [],\n children,\n areaName = \"MainContent\",\n className,\n componentSelector,\n}: PageContentProps): ReactElement => {\n return (\n <>\n {children}\n \n \n );\n};\n\nexport default React.memo(PageContent);\n","import loadable, { DefaultComponent } from \"@loadable/component\";\nimport React, { ReactElement } from \"react\";\n\nimport ProgressProps from \"./ProgressProps\";\n\nconst Progress = loadable(\n (): Promise> =>\n import(/* webpackChunkName: \"Progress\" */ \"./Progress\"),\n);\nconst ProgressLoader = (props: ProgressProps): ReactElement => (\n \n);\nexport default ProgressLoader;\n","import { styled } from \"styled-components\";\n\nimport Button from \"components/Button\";\nimport { StyledForm as Form } from \"components/Form/Form.styled\";\nimport {\n Container as FormSectionContainer,\n Content as FormSectionContent,\n} from \"components/FormSection/FormSection.styled\";\nimport { styledLink } from \"components/Link/Link.styled\";\nimport { Container as PageContainer } from \"style/components/Page\";\nimport {\n styleBodyLAlt,\n styleBodyM,\n styleHeadingL,\n styleLabelM,\n styleLabelS,\n styleNumber,\n} from \"style/components/Typography\";\nimport { columnGap } from \"style/grid\";\nimport { scrollMarginTopPad } from \"style/headerOffsets\";\nimport { MQ } from \"style/mediaQueries\";\n\nexport const StyledForm = styled(Form)`\n align-items: center;\n display: flex;\n flex-direction: column;\n padding-bottom: 2.625rem;\n width: 100%;\n\n ${MQ.FROM_M} {\n padding-bottom: 3.5rem;\n }\n\n ${MQ.FROM_XL} {\n padding-bottom: 4.375rem;\n }\n`;\n\nexport const FormPage = styled.div.attrs<{\n $show?: boolean;\n}>(() => ({}))`\n ${scrollMarginTopPad};\n align-items: center;\n display: ${(props) => (props.$show ? \"flex\" : \"none\")};\n flex-direction: column;\n width: 100%;\n`;\n\nexport const Content = styled(FormSectionContent)`\n ${MQ.FROM_M} {\n grid-column: col-start 1 / span 6;\n text-align: left;\n }\n`;\n\nexport const Container = styled(FormSectionContainer)`\n padding-bottom: 0;\n`;\n\nexport const ButtonRow = styled.div`\n ${columnGap}\n border-top: 1px solid var(--line-on-cyan-default);\n display: flex;\n flex-direction: column-reverse;\n grid-column: col-start 1 / span 4;\n padding-bottom: 0;\n padding-top: 2.625rem;\n row-gap: 0.875rem;\n\n ${MQ.FROM_M} {\n flex-direction: row;\n grid-column: col-start 1 / span 12;\n padding-top: 3.5rem;\n align-items: flex-end;\n }\n\n ${MQ.FROM_XL} {\n padding-top: 4.375rem;\n }\n`;\n\nexport const FormItems = styled.div`\n display: flex;\n flex-flow: column wrap;\n justify-content: flex-start;\n row-gap: 0.875rem;\n\n ${MQ.FROM_M} {\n grid-area: form;\n grid-column: col-start 7 / span 6;\n row-gap: 1.3125rem;\n }\n\n ${MQ.FROM_XL} {\n grid-column: col-start 7 / span 5;\n row-gap: 1.75rem;\n }\n`;\n\nexport const ConfirmationIntroduction = styled.div`\n ${styleBodyLAlt};\n margin-bottom: 1.625rem;\n\n ${MQ.FROM_M} {\n grid-column: col-start 7 / span 6;\n }\n\n ${MQ.FROM_XL} {\n grid-column: col-start 7 / span 6;\n }\n`;\n\nexport const ConfirmationText = styled.div`\n ${styleBodyM};\n\n a {\n ${styledLink}\n }\n\n p {\n &:first-child {\n margin-top: 0;\n }\n\n & :last-child {\n margin-bottom: 0;\n }\n }\n\n ${MQ.FROM_M} {\n grid-column: col-start 7 / span 6;\n }\n\n ${MQ.FROM_XL} {\n grid-column: col-start 7 / span 5;\n }\n`;\n\nexport const FormSubSection = styled.section`\n background-color: var(--block-white-default);\n border-radius: 0.25rem;\n width: 100%;\n`;\n\nexport const FormSubSectionHeader = styled.div`\n border-bottom: 1px solid var(--line-on-neutral-default);\n padding: 1.75rem;\n position: relative;\n`;\n\nexport const FormSubSectionContent = styled.div`\n align-items: flex-start;\n display: flex;\n flex-direction: column;\n gap: 2.1875rem;\n padding: 2.1875rem 1.75rem;\n\n ${MQ.FROM_M} {\n padding: 2.625rem 1.75rem;\n row-gap: 2.625rem;\n }\n\n ${MQ.FROM_XL} {\n padding: 3.5rem 1.75rem;\n row-gap: 3.5rem;\n }\n`;\n\nexport const FormItemsWrapper = styled.div`\n align-items: flex-start;\n display: flex;\n flex-direction: column;\n gap: 2.1875rem;\n position: relative;\n width: 100%;\n\n ${MQ.FROM_M} {\n row-gap: 2.625rem;\n }\n\n ${MQ.FROM_XL} {\n row-gap: 3.5rem;\n }\n`;\n\nexport const Heading = styled.h2`\n ${styleHeadingL}\n margin-bottom: 1.75rem;\n margin-top: 0;\n`;\n\nexport const SubHeading = styled.h4`\n ${styleLabelM}\n color: var(--text-on-neutral-primary);\n margin: 0;\n`;\n\nexport const NextButton = styled(Button)`\n && {\n ${MQ.FROM_M} {\n margin-left: auto;\n }\n }\n`;\n\nexport const PrevButton = styled(Button)`\n && {\n ${MQ.FROM_M} {\n margin-right: auto;\n }\n }\n`;\n\nexport const AddButton = styled(Button)`\n && {\n margin-right: auto; /* Lessen the gap above the button */\n margin-top: calc(1.75rem - 2.1875rem);\n\n ${MQ.FROM_M} {\n margin-top: calc(\n 1.75rem - 2.625rem\n ); /* Lessen the gap above the button */\n }\n\n ${MQ.FROM_XL} {\n margin-top: calc(\n 1.75rem - 3.5rem\n ); /* Lessen the gap above the button */\n }\n }\n`;\n\nexport const ReviewSection = styled.div`\n display: flex;\n flex-flow: column wrap;\n row-gap: 2.1875rem;\n width: 100%;\n\n ${MQ.FROM_M} {\n row-gap: 2.625rem;\n }\n\n ${MQ.FROM_XL} {\n row-gap: 3.5rem;\n }\n\n dl {\n border-top: 1px solid var(--line-on-neutral-default);\n column-gap: 0;\n display: grid;\n grid-gap: 0;\n grid-template-columns: 1fr 1fr;\n\n dt,\n dd {\n border: none;\n border-bottom: 1px solid var(--line-on-neutral-default);\n color: var(--text-on-neutral-primary);\n line-height: 1;\n margin-left: 0;\n padding: 1.75rem;\n text-align: left;\n }\n\n dt {\n ${styleLabelS};\n padding-left: 0;\n }\n\n dd {\n ${styleBodyM};\n padding-right: 0;\n\n ul {\n list-style: none;\n margin: 0;\n padding: 0;\n\n li {\n margin-bottom: 0.875rem;\n\n &:last-child {\n margin-bottom: 0;\n }\n }\n }\n }\n }\n`;\n\nexport const ReviewHeading = styled.div`\n ${styleLabelM};\n`;\n\nexport const CloseButton = styled(Button)`\n && {\n position: absolute;\n right: 1.3125rem;\n top: 1.3125rem;\n }\n`;\n\nexport const LoanBanner = styled(PageContainer)`\n ${columnGap};\n display: grid;\n flex-direction: row;\n grid-template-columns: 1fr;\n padding-block: 1.75rem;\n row-gap: 0.875rem;\n\n ${MQ.FROM_M} {\n padding-block: 3.5rem;\n grid-template-columns: 1fr 1fr;\n }\n\n span {\n ${styleHeadingL}\n }\n`;\n\nexport const LoanAmount = styled.span`\n ${styleNumber};\n`;\n","import { EpiFormContent } from \"types/EpiContent\";\nimport { PropsWithEpiContent } from \"types/Props\";\n\nimport { FormState } from \"../MortgageApplicationPageProps\";\n\nconst getFormElement = (\n form: FormState,\n identifier?: string | undefined,\n checkElementName = false,\n): PropsWithEpiContent | undefined => {\n return form.formElements.find((element: EpiFormContent) =>\n checkElementName\n ? element.elementName === identifier\n : element.identifier === identifier,\n );\n};\n\nexport default getFormElement;\n","import React, { ReactElement } from \"react\";\n\nimport BlockComponentSelector from \"components/BlockComponentSelector\";\nimport { PropsWithEpiContent } from \"types/Props\";\nimport getComponentTypeForContent from \"utils/getComponentTypeForContent\";\n\nimport getFormElement from \"./getFormElement\";\n\nimport {\n RenderElementProps,\n DynamicReplacement,\n} from \"../MortgageApplicationPageProps\";\n\nconst replaceValuesDynamically = (\n formElement: PropsWithEpiContent,\n dynamicReplacements: DynamicReplacement[],\n): object => {\n const replacedValues: Record = {};\n dynamicReplacements.forEach((r) => {\n const fieldValue = formElement[r.field] as string;\n if (fieldValue && fieldValue.length > 0) {\n const replacedValue = fieldValue.replace(r.fromValue, r.toValue);\n replacedValues[r.field] = replacedValue;\n }\n });\n return replacedValues;\n};\n\nconst renderElement = ({\n identifier,\n form,\n dynamicReplacements,\n ...props\n}: RenderElementProps): ReactElement => {\n const formElement = getFormElement(form, identifier);\n\n if (!formElement) {\n return <>;\n }\n\n const replacedPropertyValues = dynamicReplacements\n ? replaceValuesDynamically(formElement, dynamicReplacements)\n : {};\n\n const content = {\n ...formElement,\n ...props,\n ...replacedPropertyValues,\n };\n\n return (\n \n );\n};\n\nexport default renderElement;\n","import React, { ReactElement } from \"react\";\n\nimport { RenderElementProps } from \"../MortgageApplicationPageProps\";\nimport renderElement from \"../MortgageApplicationPageUtils/renderElement\";\n\nconst AntiForgeryElement = (elementProps: RenderElementProps): ReactElement => {\n return renderElement({\n ...elementProps,\n identifier: \"97840171-84AD-45A0-89EE-E1C3889BF84B\",\n });\n};\n\nexport default React.memo(AntiForgeryElement);\n","import { NextSteps } from \"../MortgageApplicationPageProps\";\n\nconst showNextFormSections = (self: string, nextSteps: NextSteps) => {\n const { nextSections, visibleSections, setVisibleSections } = nextSteps;\n const currentIndex =\n visibleSections.find((x) => x.key === self)?.index || 0;\n setVisibleSections((current) => [\n ...current.filter((x) => x.index <= currentIndex), // Hide sections after this one\n ...nextSections.map((x) => {\n return {\n key: x,\n index: currentIndex + 1,\n };\n }),\n ]);\n};\n\nexport default showNextFormSections;\n","import showNextFormSections from \"./showNextFormSections\";\n\nimport { Branching, NextSteps } from \"../MortgageApplicationPageProps\";\n\nconst branchFlowOnChange = (\n self: string,\n value: string,\n branching: Branching,\n) => {\n const { instructions, visibleSections, setVisibleSections } = branching;\n const branch = instructions.find((x) => x.value == value);\n showNextFormSections(self, {\n nextSections: branch?.nextSections || [],\n visibleSections: visibleSections,\n setVisibleSections: setVisibleSections,\n } as NextSteps);\n};\n\nexport default branchFlowOnChange;\n","import { DynamicReplacement } from \"../MortgageApplicationPageProps\";\n\nconst generateDynamicReplacements = (\n fields: string[],\n fromValue: string,\n toValue: string,\n): DynamicReplacement[] => {\n return fields.map((f) => {\n return {\n field: f,\n fromValue: fromValue,\n toValue: toValue,\n } as DynamicReplacement;\n });\n};\n\nexport default generateDynamicReplacements;\n","export const sleep = (ms: number) => new Promise((r) => setTimeout(r, ms));\n","import { FieldValues, UseFormSetError } from \"react-hook-form\";\n\nconst setFieldErrorsFromValidation = (\n validationErrors: { [key: string]: string[] },\n setError: UseFormSetError,\n): void => {\n for (const field in validationErrors) {\n const fieldErrors = validationErrors[field];\n if (fieldErrors && fieldErrors.length > 0) {\n const elementName = `${field.charAt(0).toUpperCase()}${field.slice(\n 1,\n )}`;\n setError(elementName, {\n type: \"custom\",\n message: fieldErrors[0],\n });\n }\n }\n};\n\nexport default setFieldErrorsFromValidation;\n","import { UseFormUnregister, FieldValues } from \"react-hook-form\";\n\nconst unregisterElements = (\n elements: object,\n skipFields: string[] = [],\n unregister: UseFormUnregister,\n prefix = \"\",\n) =>\n Object.entries(elements).forEach(([key, value]) => {\n const fieldName = prefix ? `${prefix}.${key}` : key;\n\n if (typeof value === \"object\") {\n unregisterElements(value, skipFields, unregister, fieldName);\n } else if (\n !skipFields.includes(fieldName) &&\n !fieldName.startsWith(\"__\")\n ) {\n unregister(fieldName);\n }\n });\n\nexport default unregisterElements;\n","import React, { Dispatch, ReactElement, SetStateAction } from \"react\";\nimport { useFormContext } from \"react-hook-form\";\n\nimport { Branching, RenderElementProps } from \"../MortgageApplicationPageProps\";\nimport { unregisterElements } from \"../MortgageApplicationPageUtils\";\nimport branchFlowOnChange from \"../MortgageApplicationPageUtils/branchFlowOnChange\";\nimport renderElement from \"../MortgageApplicationPageUtils/renderElement\";\n\nconst LoanTypeElement = ({\n branching,\n setGtmFormStarted,\n ...elementProps\n}: LoanTypeElementProps): ReactElement => {\n const {\n setValue,\n unregister,\n formState: { isDirty, dirtyFields },\n } = useFormContext();\n return renderElement({\n onChange: (_, value) => {\n branchFlowOnChange(\"loan-type\", value as string, branching);\n\n if (isDirty && dirtyFields)\n // If form is dirty, clean it up but skip LoanType\n unregisterElements(dirtyFields, [\"LoanType\"], unregister, \"\");\n\n setValue(\"LoanFor\", \"\"); // Reset LoanFor when changing loan type\n setGtmFormStarted(true);\n },\n identifier: \"E5E4DF0B-A0BC-4717-AB68-44690F159A5D\",\n ...elementProps,\n });\n};\n\ninterface LoanTypeElementProps extends RenderElementProps {\n branching: Branching;\n setGtmFormStarted: Dispatch>;\n}\n\nexport default React.memo(LoanTypeElement);\n","import React, { ReactElement } from \"react\";\nimport { useFormContext } from \"react-hook-form\";\n\nimport { Branching, RenderElementProps } from \"../MortgageApplicationPageProps\";\nimport {\n branchFlowOnChange,\n unregisterElements,\n} from \"../MortgageApplicationPageUtils\";\nimport renderElement from \"../MortgageApplicationPageUtils/renderElement\";\n\nconst CollateralTypeElement = ({\n isTransfer,\n branching,\n ...elementProps\n}: CollateralTypeElementProps): ReactElement => {\n const {\n unregister,\n formState: { isDirty, dirtyFields },\n } = useFormContext();\n return renderElement({\n identifier: isTransfer\n ? \"74B9C8E6-0E41-49EC-BB2C-18F94853CC5A\"\n : \"AE78B72C-5767-43BD-ABDD-80148207CD3B\",\n onChange: (_, value) => {\n branchFlowOnChange(\n isTransfer\n ? \"transfer-mortgage-collateral-type\"\n : \"new-mortgage-collateral-type\",\n value as string,\n branching,\n );\n\n if (isDirty && dirtyFields)\n // If form is dirty, clean it up but skip LoanFor and LoanType\n unregisterElements(\n dirtyFields,\n [\"LoanFor\", \"LoanType\"],\n unregister,\n \"\",\n );\n },\n ...elementProps,\n });\n};\n\ninterface CollateralTypeElementProps extends RenderElementProps {\n isTransfer: boolean;\n branching: Branching;\n}\n\nexport default React.memo(CollateralTypeElement);\n","import React, { ReactElement } from \"react\";\n\nimport { RenderElementProps } from \"../MortgageApplicationPageProps\";\nimport { renderElement } from \"../MortgageApplicationPageUtils\";\n\nconst NumberOfFullTimeDependantsElement = (\n elementProps: RenderElementProps,\n): ReactElement => {\n return renderElement({\n identifier: \"DDDA0592-B6F7-4F6B-950B-BE468D51CDBC\",\n ...elementProps,\n });\n};\n\nexport default React.memo(NumberOfFullTimeDependantsElement);\n","import React, { ReactElement } from \"react\";\n\nimport { RenderElementProps } from \"../MortgageApplicationPageProps\";\nimport { renderElement } from \"../MortgageApplicationPageUtils\";\n\nconst TransferAmountElement = (\n elementProps: RenderElementProps,\n): ReactElement => {\n const { l18n } = elementProps;\n return renderElement({\n identifier: \"365B6431-43B2-46B1-B3BF-D2550D79E285\",\n input: true,\n adornment: l18n.currencySymbol,\n ...elementProps,\n });\n};\n\nexport default React.memo(TransferAmountElement);\n","import React, { ReactElement } from \"react\";\n\nimport { RenderElementProps } from \"../MortgageApplicationPageProps\";\nimport { renderElement } from \"../MortgageApplicationPageUtils\";\n\nconst DownPaymentElement = ({\n downPaymentRange,\n ...elementProps\n}: DownPaymentElementProps): ReactElement => {\n const { l18n } = elementProps;\n const props: RenderElementProps = {\n identifier: \"D581D007-8004-4844-AB24-674D10A1507\",\n input: true,\n adornment: l18n.currencySymbol,\n ...elementProps,\n };\n\n if (downPaymentRange !== undefined) {\n props.min = downPaymentRange[0];\n props.max = downPaymentRange[1];\n }\n\n return renderElement(props);\n};\n\ninterface DownPaymentElementProps extends RenderElementProps {\n downPaymentRange: [number, number] | undefined;\n}\n\nexport default React.memo(DownPaymentElement);\n","import React, {\n Dispatch,\n ReactChild,\n ReactElement,\n SetStateAction,\n} from \"react\";\nimport {\n FieldValues,\n UseFormUnregister,\n useFormContext,\n} from \"react-hook-form\";\n\nimport {\n AddButton,\n CloseButton,\n SubHeading,\n FormSubSection,\n FormItemsWrapper,\n FormSubSectionContent,\n FormSubSectionHeader,\n} from \"../MortgageApplicationPage.styled\";\nimport { KeptAsset, RenderElementProps } from \"../MortgageApplicationPageProps\";\nimport {\n renderElement,\n generateDynamicReplacements,\n} from \"../MortgageApplicationPageUtils\";\n\nconst renderKeptAssetTypeElement = (\n index: number,\n setKeptAssets: Dispatch>,\n elementProps: RenderElementProps,\n unregister: UseFormUnregister,\n): ReactChild => {\n const replacements = generateDynamicReplacements(\n [\"elementName\", \"description\", \"label\", \"placeholder\"],\n \"{0}\",\n index.toString(),\n );\n return renderElement({\n identifier: \"34B54C2F-D83B-427C-8006-733C00336C4C\",\n onChange: (_, value) => {\n unregister([\n `KeptAssets.${index}.FeePerMonth`,\n `KeptAssets.${index}.HasMortgage`,\n `KeptAssets.${index}.Mortgage`,\n ]);\n\n return setKeptAssets((current: KeptAsset[]) =>\n current.map((a) => {\n if (a.index === index) {\n return {\n index: index as number,\n type: value as string,\n } as KeptAsset;\n }\n return a;\n }),\n );\n },\n dynamicReplacements: replacements,\n ...elementProps,\n });\n};\n\nconst renderKeptAssetMonthlyFeeElement = (\n index: number,\n elementProps: RenderElementProps,\n): ReactChild => {\n const replacements = generateDynamicReplacements(\n [\"elementName\", \"description\", \"label\", \"placeholder\"],\n \"{0}\",\n index.toString(),\n );\n const { l18n } = elementProps;\n return renderElement({\n identifier: \"36976DBF-5BD4-45A4-B8B9-F2F89860179D\",\n dynamicReplacements: replacements,\n inputFormatNumber: true,\n endAdornment: l18n.currencySymbol,\n ...elementProps,\n });\n};\n\nconst renderKeptAssetMonthlyRentElement = (\n index: number,\n elementProps: RenderElementProps,\n): ReactChild => {\n const replacements = generateDynamicReplacements(\n [\"elementName\", \"description\", \"label\", \"placeholder\"],\n \"{0}\",\n index.toString(),\n );\n const { l18n } = elementProps;\n return renderElement({\n identifier: \"763AE62F-10D9-4227-966A-9082C84FCBA1\",\n dynamicReplacements: replacements,\n inputFormatNumber: true,\n endAdornment: l18n.currencySymbol,\n ...elementProps,\n });\n};\n\nconst renderKeptAssetHasMortgageElement = (\n index: number,\n setKeptAssets: Dispatch>,\n elementProps: RenderElementProps,\n unregister: UseFormUnregister,\n): ReactChild => {\n const replacements = generateDynamicReplacements(\n [\"elementName\", \"description\", \"label\", \"placeholder\"],\n \"{0}\",\n index.toString(),\n );\n\n return renderElement({\n identifier: \"CB42328A-E3C0-4101-98CB-0DB2E8F16921\",\n onChange: (_, value) => {\n if (value !== \"true\") unregister(`KeptAssets.${index}.Mortgage`);\n return setKeptAssets((current: KeptAsset[]) =>\n current.map((a) => {\n if (a.index === index) {\n return { ...a, hasMortgage: value === \"true\" };\n }\n return a;\n }),\n );\n },\n\n dynamicReplacements: replacements,\n ...elementProps,\n });\n};\n\nconst renderKeptAssetMortgageElement = (\n asset: KeptAsset,\n elementProps: RenderElementProps,\n): ReactChild => {\n if (!asset.hasMortgage) {\n return <>;\n }\n const replacements = generateDynamicReplacements(\n [\"elementName\", \"description\", \"label\", \"placeholder\"],\n \"{0}\",\n asset.index.toString(),\n );\n const { l18n } = elementProps;\n return renderElement({\n identifier: \"EFAEE4A7-60A1-48B3-85D5-19C9BFB2D4AD\",\n dynamicReplacements: replacements,\n inputFormatNumber: true,\n endAdornment: l18n.currencySymbol,\n ...elementProps,\n });\n};\n\nconst KeptAssetElements = ({\n hasKeptAssets,\n keptAssets,\n setKeptAssets,\n ...elementProps\n}: KeptAssetElementsProps): ReactElement => {\n const { unregister } = useFormContext();\n if (!hasKeptAssets) {\n return <>;\n }\n const { l18n } = elementProps;\n const resultElements: ReactChild[] = [];\n keptAssets\n .sort((a: KeptAsset, b: KeptAsset) => a.index - b.index)\n .forEach((asset: KeptAsset, index: number) => {\n const assetElements: ReactChild[] = [\n renderKeptAssetTypeElement(\n asset.index,\n setKeptAssets,\n elementProps,\n unregister,\n ),\n ];\n if (asset.type !== undefined) {\n switch (asset.type) {\n case \"Rental\":\n assetElements.push(\n \n {renderKeptAssetMonthlyRentElement(\n asset.index,\n elementProps,\n )}\n ,\n );\n break;\n case \"Bostadsratt\":\n assetElements.push(\n \n {renderKeptAssetMonthlyFeeElement(\n asset.index,\n elementProps,\n )}\n {renderKeptAssetHasMortgageElement(\n asset.index,\n setKeptAssets,\n elementProps,\n unregister,\n )}\n {renderKeptAssetMortgageElement(\n asset,\n elementProps,\n )}\n ,\n );\n break;\n case \"HolidayHome\":\n case \"House\":\n assetElements.push(\n \n {renderKeptAssetHasMortgageElement(\n asset.index,\n setKeptAssets,\n elementProps,\n unregister,\n )}\n {renderKeptAssetMortgageElement(\n asset,\n elementProps,\n )}\n ,\n );\n break;\n }\n }\n\n resultElements.push(\n \n \n \n {l18n.assetSubHeading} {index + 1}\n \n {keptAssets.length > 1 && (\n {\n setKeptAssets(\n (current: KeptAsset[]): KeptAsset[] =>\n current.filter(\n (a: KeptAsset) =>\n a.index !== asset.index,\n ),\n );\n unregister(`KeptAssets.${asset.index}`);\n }}\n >\n {l18n.removeButton}\n \n )}\n \n \n {assetElements}\n \n ,\n );\n });\n resultElements.push(\n {\n if (keptAssets.length > 0) {\n const lastIndex = keptAssets.sort(\n (a: KeptAsset, b: KeptAsset) => b.index - a.index,\n )[0].index;\n\n setKeptAssets((current: KeptAsset[]): KeptAsset[] => [\n ...current,\n {\n index: lastIndex + 1,\n } as KeptAsset,\n ]);\n } else {\n setKeptAssets([{ index: 0 } as KeptAsset]);\n }\n }}\n >\n {l18n.addMoreButton}\n ,\n );\n\n return <>{resultElements};\n};\n\ninterface KeptAssetElementsProps extends RenderElementProps {\n hasKeptAssets: boolean;\n keptAssets: KeptAsset[];\n setKeptAssets: Dispatch>;\n}\n\nexport default React.memo(KeptAssetElements);\n","import React, { Dispatch, ReactElement, SetStateAction } from \"react\";\n\nimport { RenderElementProps } from \"../MortgageApplicationPageProps\";\nimport renderElement from \"../MortgageApplicationPageUtils/renderElement\";\n\nconst PurchasePriceElement = ({\n setDownPaymentRange,\n l18n,\n ...elementProps\n}: PurchasePriceElementProps): ReactElement => {\n return renderElement({\n onChange: (_, value) => {\n const loan = value as number;\n setDownPaymentRange([loan * 0.15, loan * 0.99]);\n },\n identifier: \"CF2693D1-5936-49ED-8D54-CEDE8AC24BB8\",\n input: true,\n adornment: l18n.currencySymbol,\n l18n: l18n,\n ...elementProps,\n });\n};\n\ninterface PurchasePriceElementProps extends RenderElementProps {\n setDownPaymentRange: Dispatch>;\n}\n\nexport default React.memo(PurchasePriceElement);\n","import React, { ReactElement } from \"react\";\n\nimport { RenderElementProps } from \"../MortgageApplicationPageProps\";\nimport renderElement from \"../MortgageApplicationPageUtils/renderElement\";\n\nconst CollateralMunicipalityElement = (\n elementProps: RenderElementProps,\n): ReactElement => {\n return renderElement({\n identifier: \"E023F073-A7A5-4E0F-B21E-4FFEED0DD52B\",\n searchable: true,\n ...elementProps,\n });\n};\n\nexport default React.memo(CollateralMunicipalityElement);\n","import React, { ReactElement } from \"react\";\n\nimport { RenderElementProps } from \"../MortgageApplicationPageProps\";\nimport renderElement from \"../MortgageApplicationPageUtils/renderElement\";\n\nconst CollateralStreetElement = (\n elementProps: RenderElementProps,\n): ReactElement => {\n return renderElement({\n identifier: \"7C32B6EC-90BF-47BD-BA6D-1B61EF9686C6\",\n ...elementProps,\n });\n};\n\nexport default React.memo(CollateralStreetElement);\n","import React, { ReactElement } from \"react\";\n\nimport { RenderElementProps } from \"../MortgageApplicationPageProps\";\nimport renderElement from \"../MortgageApplicationPageUtils/renderElement\";\n\nconst CollateralPostalCodeElement = (\n elementProps: RenderElementProps,\n): ReactElement => {\n return renderElement({\n identifier: \"15A74B97-CAD9-4E6F-A1CC-44E40AC0736F\",\n ...elementProps,\n });\n};\n\nexport default React.memo(CollateralPostalCodeElement);\n","import React, { ReactElement } from \"react\";\n\nimport { RenderElementProps } from \"../MortgageApplicationPageProps\";\nimport renderElement from \"../MortgageApplicationPageUtils/renderElement\";\n\nconst CollateralMonthlyFeeElement = (\n elementProps: RenderElementProps,\n): ReactElement => {\n const { l18n } = elementProps;\n\n return renderElement({\n identifier: \"3F5B3CDA-33D9-44AB-A7E9-D725C7F8279D\",\n input: true,\n adornment: l18n.currencySymbol,\n ...elementProps,\n });\n};\n\nexport default React.memo(CollateralMonthlyFeeElement);\n","import React, { ReactElement } from \"react\";\n\nimport { RenderElementProps } from \"../MortgageApplicationPageProps\";\nimport renderElement from \"../MortgageApplicationPageUtils/renderElement\";\n\nconst CollateralAreaElement = (\n elementProps: RenderElementProps,\n): ReactElement => {\n const { l18n } = elementProps;\n return renderElement({\n identifier: \"1195DEC8-0EE6-453C-B514-1B20D4465FD2\",\n input: true,\n adornment: l18n.areaSymbol,\n ...elementProps,\n });\n};\nexport default React.memo(CollateralAreaElement);\n","import React, { ReactElement } from \"react\";\n\nimport { RenderElementProps } from \"../MortgageApplicationPageProps\";\nimport renderElement from \"../MortgageApplicationPageUtils/renderElement\";\n\nconst CollateralIsNewProductionElement = (\n elementProps: RenderElementProps,\n): ReactElement => {\n return renderElement({\n identifier: \"42B295CD-1A1B-4504-8D6D-A64D85EE623F\",\n ...elementProps,\n });\n};\nexport default React.memo(CollateralIsNewProductionElement);\n","import React, {\n Dispatch,\n ReactChild,\n ReactElement,\n SetStateAction,\n} from \"react\";\nimport { useFormContext } from \"react-hook-form\";\n\nimport {\n FormSubSection,\n AddButton,\n CloseButton,\n SubHeading,\n FormSubSectionContent,\n FormSubSectionHeader,\n} from \"../MortgageApplicationPage.styled\";\nimport { RenderElementProps, Credit } from \"../MortgageApplicationPageProps\";\nimport {\n renderElement,\n generateDynamicReplacements,\n} from \"../MortgageApplicationPageUtils\";\nconst renderCreditTypeElement = (\n index: number,\n setCredits: Dispatch>,\n elementProps: RenderElementProps,\n): ReactChild => {\n const replacements = generateDynamicReplacements(\n [\"elementName\", \"description\", \"label\", \"placeholder\"],\n \"{0}\",\n index.toString(),\n );\n return renderElement({\n identifier: \"E2E9966C-8B67-4E0A-8D17-7EB4810E2042\",\n onChange: (_, value) =>\n setCredits((current: Credit[]) =>\n current.map((c) => {\n if (c.index === index) {\n return { ...c, type: value as string };\n }\n return c;\n }),\n ),\n dynamicReplacements: replacements,\n ...elementProps,\n });\n};\n\nconst renderCreditAmountElement = (\n index: number,\n isCreditCard: boolean,\n elementProps: RenderElementProps,\n): ReactChild => {\n const replacements = generateDynamicReplacements(\n [\"elementName\", \"description\", \"label\", \"placeholder\"],\n \"{0}\",\n index.toString(),\n );\n const { l18n } = elementProps;\n\n return renderElement({\n identifier: isCreditCard\n ? \"96883957-06F2-4A46-835A-3283320B7896\"\n : \"CDB29EDC-ED9D-4A96-801A-2F5F5CD0C35E\",\n dynamicReplacements: replacements,\n inputFormatNumber: true,\n endAdornment: l18n.currencySymbol,\n ...elementProps,\n });\n};\n\nconst CreditsElements = ({\n hasCredits,\n credits,\n setCredits,\n ...elementProps\n}: CreditsElementsProps): ReactElement => {\n const { unregister } = useFormContext();\n\n if (!hasCredits) {\n return <>;\n }\n const { l18n } = elementProps;\n const resultElements: ReactChild[] = [];\n\n credits\n .sort((a: Credit, b: Credit) => a.index - b.index)\n .forEach((credit: Credit, index: number) => {\n const creditElements: ReactChild[] = [\n renderCreditTypeElement(credit.index, setCredits, elementProps),\n renderCreditAmountElement(\n credit.index,\n credit.type === \"CREDIT_CARD\",\n elementProps,\n ),\n ];\n resultElements.push(\n \n \n \n {l18n.creditSubHeading} {index + 1}\n \n {credits.length > 1 && (\n {\n setCredits((current: Credit[]) =>\n current.filter(\n (c) => c.index !== credit.index,\n ),\n );\n unregister(\n `Borrowers[0].Credits[${credit.index}]`,\n );\n }}\n >\n {l18n.removeButton}\n \n )}\n \n \n {creditElements}\n \n ,\n );\n });\n\n resultElements.push(\n {\n const lastIndex = credits.sort(\n (a: Credit, b: Credit) => b.index - a.index,\n )[0].index;\n setCredits((current: Credit[]) => [\n ...current,\n { index: lastIndex + 1 },\n ]);\n }}\n >\n {l18n.addMoreButton}\n ,\n );\n return <>{resultElements};\n};\n\ninterface CreditsElementsProps extends RenderElementProps {\n hasCredits: boolean;\n credits: Credit[];\n setCredits: Dispatch>;\n}\n\nexport default React.memo(CreditsElements);\n","import React, { Dispatch, ReactElement, SetStateAction } from \"react\";\nimport { useFormContext } from \"react-hook-form\";\n\nimport { NextSteps, RenderElementProps } from \"../MortgageApplicationPageProps\";\nimport {\n showNextFormSections,\n unregisterElements,\n} from \"../MortgageApplicationPageUtils\";\nimport renderElement from \"../MortgageApplicationPageUtils/renderElement\";\n\nconst NumberOfApplicantsElement = ({\n setNumberOfApplicants,\n nextSteps,\n ...elementProps\n}: NumberOfApplicantsElementProps): ReactElement => {\n const {\n unregister,\n formState: { isDirty, dirtyFields },\n } = useFormContext();\n\n return renderElement({\n identifier: \"569EBC77-6B89-4D32-983A-E18169EDB41B\",\n onChange: (_, value) => {\n const choice = value as string;\n setNumberOfApplicants(choice === \"partner\" ? 2 : 1);\n showNextFormSections(\"applicants\", nextSteps);\n if (isDirty && dirtyFields.Borrowers) {\n unregisterElements(\n dirtyFields.Borrowers,\n [],\n unregister,\n \"Borrowers\",\n );\n if (choice !== \"partner\") unregister(\"Borrowers.1\");\n }\n },\n ...elementProps,\n });\n};\n\ninterface NumberOfApplicantsElementProps extends RenderElementProps {\n setNumberOfApplicants: Dispatch>;\n nextSteps: NextSteps;\n}\n\nexport default React.memo(NumberOfApplicantsElement);\n","import React, { ReactElement } from \"react\";\n\nimport { RenderElementProps } from \"../MortgageApplicationPageProps\";\nimport renderElement from \"../MortgageApplicationPageUtils/renderElement\";\n\nconst AcceptTermsElement = (elementProps: RenderElementProps): ReactElement => {\n return renderElement({\n identifier: \"CE0ED703-F609-41F8-A65D-A3A369241388\",\n ...elementProps,\n });\n};\nexport default React.memo(AcceptTermsElement);\n","import React, { ReactElement } from \"react\";\n\nimport { ApplicantElementProps } from \"../MortgageApplicationPageProps\";\nimport renderElement from \"../MortgageApplicationPageUtils/renderElement\";\n\nconst PhoneNumberElement = ({\n isMainApplicant,\n ...elementProps\n}: ApplicantElementProps): ReactElement => {\n return renderElement({\n identifier: isMainApplicant\n ? \"2F316CB5-6F70-459E-B3B6-A9B4B1EF1436\"\n : \"F91E70A0-32BE-4E5F-A97E-4620ACEE2750\",\n ...elementProps,\n });\n};\nexport default React.memo(PhoneNumberElement);\n","import React, { ReactElement } from \"react\";\n\nimport { ApplicantElementProps } from \"../MortgageApplicationPageProps\";\nimport renderElement from \"../MortgageApplicationPageUtils/renderElement\";\n\nconst CivilStatusElement = ({\n isMainApplicant,\n ...elementProps\n}: ApplicantElementProps): ReactElement => {\n return renderElement({\n identifier: isMainApplicant\n ? \"F5B0522C-83DE-4192-8AD1-C02249A39089\"\n : \"BD9E51C4-3679-457F-B0FE-28CCF322A677\",\n ...elementProps,\n });\n};\n\nexport default React.memo(CivilStatusElement);\n","import React, { Dispatch, ReactElement, SetStateAction } from \"react\";\nimport { useFormContext } from \"react-hook-form\";\n\nimport { ApplicantElementProps } from \"../MortgageApplicationPageProps\";\nimport renderElement from \"../MortgageApplicationPageUtils/renderElement\";\n\nconst OccupationTypeElement = ({\n isMainApplicant,\n occupationType,\n setOccupationType,\n ...elementProps\n}: OccupationTypeElementProps): ReactElement => {\n const { unregister } = useFormContext();\n return renderElement({\n identifier: isMainApplicant\n ? \"C43EC801-1BDE-42D4-B6F9-9A43DF59AB2D\"\n : \"F365EF53-5139-402B-AEEB-451CB025B1AB\",\n onChange: (_, value) => {\n const index = isMainApplicant ? 0 : 1;\n const occupationTypes = [...occupationType];\n occupationTypes[index] = value as string;\n setOccupationType(occupationTypes);\n\n if (value === \"PERMANENT_LONG\" || value === \"TIME_LIMITED\") {\n unregister(\n `Borrowers[${index}].OrganizationNumberForOwnCompany`,\n );\n } else if (value === \"OWN_EMPLOYED\") {\n unregister(`Borrowers[${index}].Employer`);\n } else {\n unregister([\n `Borrowers[${index}].OrganizationNumberForOwnCompany`,\n `Borrowers[${index}].Employer`,\n ]);\n }\n },\n ...elementProps,\n });\n};\n\ninterface OccupationTypeElementProps extends ApplicantElementProps {\n occupationType: (string | undefined)[];\n setOccupationType: Dispatch>;\n}\n\nexport default React.memo(OccupationTypeElement);\n","import React, { ReactElement } from \"react\";\n\nimport { ApplicantElementProps } from \"../MortgageApplicationPageProps\";\nimport renderElement from \"../MortgageApplicationPageUtils/renderElement\";\n\nconst EmployerNameElement = ({\n isMainApplicant,\n ...elementProps\n}: ApplicantElementProps): ReactElement => {\n return renderElement({\n identifier: isMainApplicant\n ? \"3DECCB6F-6EA8-4C03-A0E3-9A1A067C2858\"\n : \"070D4E1A-CD72-45C5-871A-C627B0753FFB\",\n ...elementProps,\n });\n};\n\nexport default React.memo(EmployerNameElement);\n","import React, { ReactElement } from \"react\";\n\nimport { ApplicantElementProps } from \"../MortgageApplicationPageProps\";\nimport renderElement from \"../MortgageApplicationPageUtils/renderElement\";\n\nconst OwnCompanyOrgNumberElement = ({\n isMainApplicant,\n ...elementProps\n}: ApplicantElementProps): ReactElement => {\n return renderElement({\n identifier: isMainApplicant\n ? \"32B85D73-3B9E-4722-9887-0445C98C0441\"\n : \"51FE2B68-7C7A-43DE-8FB7-25D9C70B096C\",\n ...elementProps,\n });\n};\nexport default React.memo(OwnCompanyOrgNumberElement);\n","import React, { ReactElement } from \"react\";\n\nimport { ApplicantElementProps } from \"../MortgageApplicationPageProps\";\nimport renderElement from \"../MortgageApplicationPageUtils/renderElement\";\n\nconst MonthlyIncomeElement = ({\n isMainApplicant,\n ...elementProps\n}: ApplicantElementProps): ReactElement => {\n const { l18n } = elementProps;\n return renderElement({\n identifier: isMainApplicant\n ? \"E06FFB12-A384-45F9-93A1-7F7A3C6503C2\"\n : \"F77EEDC2-32EC-48C0-953D-0155B1A0881F\",\n input: true,\n adornment: l18n.currencySymbol,\n ...elementProps,\n });\n};\n\nexport default React.memo(MonthlyIncomeElement);\n","import React, { ReactElement } from \"react\";\n\nimport { ApplicantElementProps } from \"../MortgageApplicationPageProps\";\nimport renderElement from \"../MortgageApplicationPageUtils/renderElement\";\n\nconst IncomeInForeignCurrencyElement = ({\n isMainApplicant,\n ...elementProps\n}: ApplicantElementProps): ReactElement => {\n return renderElement({\n identifier: isMainApplicant\n ? \"7ADC09AC-8F10-4A01-981E-35D831BCF828\"\n : \"C17F694E-17C9-449C-A32B-54A0C6D4C6C9\",\n ...elementProps,\n });\n};\n\nexport default React.memo(IncomeInForeignCurrencyElement);\n","import React, { Dispatch, ReactElement, SetStateAction } from \"react\";\nimport { useFormContext } from \"react-hook-form\";\n\nimport { RenderElementProps } from \"../MortgageApplicationPageProps\";\nimport renderElement from \"../MortgageApplicationPageUtils/renderElement\";\n\nconst HasDependentsElement = ({\n setHasDependants,\n ...elementProps\n}: HasDependentsElementProps): ReactElement => {\n const { unregister } = useFormContext();\n return renderElement({\n onChange: (_, value) => {\n setHasDependants(value === \"true\");\n if (value !== \"true\")\n unregister([\"DependentsFullTime\", \"DependentsPartTime\"]);\n },\n identifier: \"5C95F0EB-B51F-497A-A7D6-B35535369D21\",\n ...elementProps,\n });\n};\n\ninterface HasDependentsElementProps extends RenderElementProps {\n setHasDependants: Dispatch>;\n}\n\nexport default React.memo(HasDependentsElement);\n","import React, { ReactElement } from \"react\";\n\nimport { RenderElementProps } from \"../MortgageApplicationPageProps\";\nimport renderElement from \"../MortgageApplicationPageUtils/renderElement\";\n\nconst NumberOfPartTimeDependantsElement = (\n elementProps: RenderElementProps,\n): ReactElement => {\n return renderElement({\n identifier: \"9E67A773-E02F-425C-9228-058FA8190950\",\n ...elementProps,\n });\n};\n\nexport default React.memo(NumberOfPartTimeDependantsElement);\n","import React, { Dispatch, ReactElement, SetStateAction } from \"react\";\nimport { useFormContext } from \"react-hook-form\";\n\nimport { Credit, RenderElementProps } from \"../MortgageApplicationPageProps\";\nimport renderElement from \"../MortgageApplicationPageUtils/renderElement\";\n\nconst HasCreditsElement = ({\n credits,\n setHasCredits,\n setCredits,\n ...elementProps\n}: HasCreditsElementProps): ReactElement => {\n const { unregister } = useFormContext();\n return renderElement({\n onChange: (_, value) => {\n if (value === \"true\") {\n setHasCredits(true);\n if (credits.length === 0) {\n setCredits([{ index: 0 } as Credit]);\n }\n } else {\n setHasCredits(false);\n unregister(`Borrowers.0.Credits`);\n }\n },\n identifier: \"A1BCB590-6BF3-454C-B761-ABF460C8C966\",\n ...elementProps,\n });\n};\n\ninterface HasCreditsElementProps extends RenderElementProps {\n credits: Credit[];\n setHasCredits: Dispatch>;\n setCredits: Dispatch>;\n}\n\nexport default React.memo(HasCreditsElement);\n","import React, { Dispatch, ReactElement, SetStateAction } from \"react\";\nimport { useFormContext } from \"react-hook-form\";\n\nimport { KeptAsset, RenderElementProps } from \"../MortgageApplicationPageProps\";\nimport renderElement from \"../MortgageApplicationPageUtils/renderElement\";\n\nconst HasKeptAssetsElement = ({\n keptAssets,\n setHasKeptAssets,\n setKeptAssets,\n ...elementProps\n}: HasKeptAssetsElementProps): ReactElement => {\n const { unregister } = useFormContext();\n return renderElement({\n onChange: (_, value) => {\n if (value === \"true\") {\n setHasKeptAssets(true);\n if (keptAssets.length === 0) {\n setKeptAssets([{ index: 0 } as KeptAsset]);\n }\n } else {\n setHasKeptAssets(false);\n unregister(\"KeptAssets\");\n }\n },\n identifier: \"FB4E190E-067B-4C91-8B3C-58D440970CC2\",\n ...elementProps,\n });\n};\n\ninterface HasKeptAssetsElementProps extends RenderElementProps {\n keptAssets: KeptAsset[];\n setHasKeptAssets: Dispatch>;\n setKeptAssets: Dispatch>;\n}\n\nexport default React.memo(HasKeptAssetsElement);\n","import React, { ReactElement } from \"react\";\n\nimport { ApplicantElementProps } from \"../MortgageApplicationPageProps\";\nimport renderElement from \"../MortgageApplicationPageUtils/renderElement\";\n\nconst GivenNameElement = ({\n isMainApplicant,\n ...elementProps\n}: ApplicantElementProps): ReactElement => {\n return renderElement({\n identifier: isMainApplicant\n ? \"B5516ACF-083F-4BB8-9CAC-E6EA755405BD\"\n : \"B2381714-4CC1-4546-A5AC-F38117047AE4\",\n ...elementProps,\n });\n};\n\nexport default React.memo(GivenNameElement);\n","import React, { Dispatch, ReactElement, SetStateAction } from \"react\";\n\nimport { ApplicantElementProps } from \"../MortgageApplicationPageProps\";\nimport renderElement from \"../MortgageApplicationPageUtils/renderElement\";\n\nconst NinElement = ({\n isMainApplicant,\n setMainApplicantNin,\n ...elementProps\n}: NinElementProps): ReactElement => {\n const onChange = isMainApplicant\n ? (\n _: React.ChangeEvent | Event,\n value: string | number,\n ) => {\n setMainApplicantNin(value as string);\n }\n : undefined;\n\n return renderElement({\n identifier: isMainApplicant\n ? \"055D00A9-E11C-4004-AE66-5CDCFE9A4C5F\"\n : \"43EFEA61-3EB8-4F94-A39F-8EBDFB01CE5E\",\n onChange: onChange,\n inputFormatPattern: \"########-####\",\n ...elementProps,\n });\n};\n\ninterface NinElementProps extends ApplicantElementProps {\n setMainApplicantNin: Dispatch>;\n}\nexport default React.memo(NinElement);\n","import React, { ReactElement } from \"react\";\n\nimport { ApplicantElementProps } from \"../MortgageApplicationPageProps\";\nimport renderElement from \"../MortgageApplicationPageUtils/renderElement\";\n\nconst FamilyNameElement = ({\n isMainApplicant,\n ...elementProps\n}: ApplicantElementProps): ReactElement => {\n return renderElement({\n identifier: isMainApplicant\n ? \"7420A587-4C01-4FBF-9BBD-72AAB1D766C5\"\n : \"A54D1DB2-CF1B-41E0-A572-0286D9D42C44\",\n ...elementProps,\n });\n};\n\nexport default React.memo(FamilyNameElement);\n","import React, { ReactElement } from \"react\";\n\nimport { ApplicantElementProps } from \"../MortgageApplicationPageProps\";\nimport renderElement from \"../MortgageApplicationPageUtils/renderElement\";\n\nconst EmailElement = ({\n isMainApplicant,\n ...elementProps\n}: ApplicantElementProps): ReactElement => {\n return renderElement({\n identifier: isMainApplicant\n ? \"8B11932B-CC9D-4399-B081-367DFC8980D2\"\n : \"AD5086D9-A33C-4D82-943D-04044C63053A\",\n ...elementProps,\n });\n};\n\nexport default React.memo(EmailElement);\n","import getFormElement from \"./getFormElement\";\n\nimport { FormState } from \"../MortgageApplicationPageProps\";\n\nconst getCaptionByValue = (\n form: FormState,\n identifier: string | undefined,\n value: string | undefined,\n isElementName = false,\n): string | undefined => {\n const element = getFormElement(form, identifier, isElementName) as any; // eslint-disable-line @typescript-eslint/no-explicit-any\n return (\n element?.items?.find((item: any) => item.value === value)?.caption || // eslint-disable-line @typescript-eslint/no-explicit-any\n undefined\n );\n};\n\nexport default getCaptionByValue;\n","import React, { ReactElement } from \"react\";\nimport { useFormContext } from \"react-hook-form\";\n\nimport {\n ReviewSection,\n ReviewHeading,\n} from \"../MortgageApplicationPage.styled\";\nimport { ReviewSectionProps } from \"../MortgageApplicationPageProps\";\nimport getCaptionByValue from \"../MortgageApplicationPageUtils/getCaptionByValue\";\n\nconst ReviewLoanAmountsAndCollateralInfo = ({\n form,\n l18n,\n}: ReviewSectionProps): ReactElement => {\n const { getValues } = useFormContext();\n const formData = getValues();\n const municipalityName = getCaptionByValue(\n form,\n \"Collateral.MunicipalityCode\",\n formData?.Collateral?.MunicipalityCode,\n true,\n );\n\n return (\n \n {l18n.reviewCollateralHeading}\n
\n {!!formData?.LoanType && formData.LoanType === \"take\" && (\n <>\n
\n {l18n.reviewPurchasePriceSubHeading}\n
\n
{`${\n formData.PurchasePriceAmount?.toLocaleString(\n \"sv-SE\",\n ) || \"\"\n } ${l18n.currencySymbol}`}
\n
\n {l18n.reviewDownPaymentSubHeading}\n
\n
{`${\n formData.DownPaymentLoanAmount?.toLocaleString(\n \"sv-SE\",\n ) || \"\"\n } ${l18n.currencySymbol}`}
\n
\n {l18n.reviewLoanAmountSubHeading}\n
\n
{`${\n (formData.PurchasePriceAmount &&\n formData.DownPaymentLoanAmount &&\n (\n formData.PurchasePriceAmount -\n formData.DownPaymentLoanAmount\n ).toLocaleString(\"sv-SE\")) ||\n \"\"\n } ${l18n.currencySymbol}`}
\n \n )}\n {!!formData?.LoanType && formData.LoanType === \"transfer\" && (\n <>\n
\n {l18n.reviewTransferAmountSubHeading}\n
\n
{`${\n formData.AmountToTransfer?.toLocaleString(\n \"sv-SE\",\n ) || \"\"\n } ${l18n.currencySymbol}`}
\n \n )}\n {!!formData?.Collateral?.MunicipalityCode &&\n municipalityName &&\n municipalityName !== \"\" && (\n <>\n
\n {l18n.reviewMunicipalitySubHeading}\n
\n
\n {municipalityName}\n
\n \n )}\n {!!formData?.Collateral?.Street &&\n formData.Collateral.Street !== \"\" && (\n <>\n
\n {l18n.reviewAddressSubHeading}\n
\n
\n {formData.Collateral.Street}\n
\n \n )}\n {!!formData?.Collateral?.PostalCode &&\n formData.Collateral.PostalCode !== \"\" && (\n <>\n
\n {l18n.reviewPostalCodeSubHeading}\n
\n
\n {formData.Collateral.PostalCode}\n
\n \n )}\n {!!formData?.Collateral?.FeePerMonth &&\n formData.Collateral.FeePerMonth !== \"\" && (\n <>\n
\n {l18n.reviewMonthlyFeeSubHeading}\n
\n {`${formData.Collateral.FeePerMonth.toLocaleString(\n \"sv-SE\",\n )} ${l18n.currencyPerMonthSymbol}`}\n \n )}\n {!!formData?.Collateral?.Area &&\n formData.Collateral.Area !== \"0\" && (\n <>\n
{l18n.reviewAreaSubHeading}
\n
\n {formData.Collateral.Area.toLocaleString(\n \"sv-SE\",\n )}\n {l18n.areaSymbol}\n
\n \n )}\n {!!formData?.Collateral?.IsNewProduction &&\n formData.Collateral.IsNewProduction !== \"\" && (\n <>\n
\n {l18n.reviewIsNewProductionSubHeading}\n
\n
\n {formData.Collateral.IsNewProduction === \"true\"\n ? l18n.yes\n : l18n.no}\n
\n \n )}\n
\n
\n );\n};\n\nexport default React.memo(ReviewLoanAmountsAndCollateralInfo);\n","import React, { ReactElement } from \"react\";\nimport { useFormContext } from \"react-hook-form\";\n\nimport {\n ReviewSection,\n ReviewHeading,\n} from \"../MortgageApplicationPage.styled\";\nimport { ReviewSectionProps } from \"../MortgageApplicationPageProps\";\nimport getCaptionByValue from \"../MortgageApplicationPageUtils/getCaptionByValue\";\n\nconst ReviewHousehold = ({ form, l18n }: ReviewSectionProps): ReactElement => {\n const { getValues } = useFormContext();\n const formData = getValues();\n\n if (formData.Borrowers && formData.Borrowers.length > 0)\n formData.Borrowers = formData.Borrowers.filter(Boolean); // filter out empty Borrowers\n\n return (\n \n {l18n.reviewHouseholdHeading}\n
\n {!!formData.Borrowers && formData.Borrowers.length > 0 && (\n <>\n
\n {l18n.reviewNumApplicantsSubHeading}\n
\n
\n {formData.Borrowers.length > 1 &&\n !!formData.Borrowers[1].Nin\n ? l18n.reviewNumApplicantsMultiple\n : l18n.reviewNumApplicantsSingle}\n
\n \n )}\n {(!!formData.DependentsFullTime ||\n !!formData.DependentsPartTime) && (\n <>\n
\n {l18n.reviewDependentsSubHeading}\n
\n
\n
    \n {!!formData.DependentsFullTime &&\n formData.DependentsFullTime > 0 && (\n
  • \n {`${l18n.reviewDependentsFullTimeSubHeading} ${formData.DependentsFullTime}`}\n
  • \n )}\n {!!formData.DependentsPartTime &&\n formData.DependentsPartTime > 0 && (\n
  • \n {`${l18n.reviewDependentsPartTimeSubHeading} ${formData.DependentsPartTime}`}\n
  • \n )}\n
\n
\n \n )}\n {!!formData.Borrowers &&\n formData.Borrowers.length > 0 &&\n formData.Borrowers[0].Credits &&\n formData.Borrowers[0].HasCredits &&\n formData.Borrowers[0].Credits.length > 0 && (\n <>\n
\n {l18n.reviewCreditsSubHeading}\n
\n
\n
    \n {formData.Borrowers[0].Credits.filter(\n Boolean,\n ).map(\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n (credit: any, index: number) => {\n const assetType = getCaptionByValue(\n form,\n `Borrowers[0].Credits[{0}].Type`,\n credit.Type,\n true,\n );\n return (\n
  • \n {assetType}\n {!!credit.Amount &&\n `, ${\n credit.Amount\n ? Number(\n credit.Amount,\n ).toLocaleString(\n \"sv-SE\",\n )\n : 0\n } ${\n l18n.currencySymbol\n }`}\n
  • \n );\n },\n )}\n
\n
\n \n )}\n {!!formData.KeptAssets &&\n formData.HasKeptAssets === \"true\" &&\n formData.KeptAssets.length > 0 && (\n <>\n
\n {l18n.reviewAssetsSubHeading}\n
\n
\n
    \n {formData.KeptAssets.filter(Boolean).map(\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n (keptAsset: any, index: number) => {\n const assetType = getCaptionByValue(\n form,\n `KeptAssets[{0}].AssetType`,\n keptAsset.AssetType,\n true,\n );\n return (\n
  • \n {assetType}\n {!!keptAsset.Mortgage &&\n `, ${\n l18n.reviewAssetMortgage\n } ${\n keptAsset.Mortgage\n ? Number(\n keptAsset.Mortgage,\n ).toLocaleString(\n \"sv-SE\",\n )\n : 0\n } ${\n l18n.currencySymbol\n }`}\n {!!keptAsset.FeePerMonth &&\n `, ${\n keptAsset.FeePerMonth\n ? Number(\n keptAsset.FeePerMonth,\n ).toLocaleString(\n \"sv-SE\",\n )\n : 0\n } ${\n l18n.currencyPerMonthSymbol\n }`}\n
  • \n );\n },\n )}\n
\n
\n \n )}\n
\n
\n );\n};\n\nexport default React.memo(ReviewHousehold);\n","import React, { ReactElement } from \"react\";\nimport { useFormContext } from \"react-hook-form\";\n\nimport {\n ReviewSection,\n ReviewHeading,\n} from \"../MortgageApplicationPage.styled\";\nimport { ReviewSectionProps } from \"../MortgageApplicationPageProps\";\nimport getCaptionByValue from \"../MortgageApplicationPageUtils/getCaptionByValue\";\n\nconst ReviewLifeSituationAndEconomy = ({\n form,\n l18n,\n}: ReviewSectionProps): ReactElement => {\n const { getValues } = useFormContext();\n const formData = getValues();\n return (\n \n {l18n.reviewEconomyHeading}\n {formData.Borrowers &&\n formData.Borrowers.filter(Boolean)\n .filter(\n (\n borrower: any, // eslint-disable-line @typescript-eslint/no-explicit-any\n ) =>\n !!borrower.GivenName ||\n !!borrower.FamilyName ||\n !!borrower.CivilStatus ||\n !!borrower.Occupation ||\n !!borrower.Employer ||\n !!borrower.EarnedIncomePerMonth ||\n !!borrower.EarnedIncomePerMonth,\n )\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n .map((borrower: any, index: number) => {\n const civilStatus = getCaptionByValue(\n form,\n `Borrowers[${index}].CivilStatus`,\n borrower.CivilStatus,\n true,\n );\n\n const occupation = getCaptionByValue(\n form,\n `Borrowers[${index}].Occupation`,\n borrower.Occupation,\n true,\n );\n\n return (\n \n {(!!borrower.GivenName ||\n !!borrower.FamilyName) && (\n <>\n
\n {l18n.reviewApplicantSubHeading}\n
\n
\n {[\n borrower.GivenName,\n borrower.FamilyName,\n ].join(\" \")}\n
\n \n )}\n {!!borrower.CivilStatus &&\n civilStatus &&\n civilStatus !== \"\" && (\n <>\n
\n {\n l18n.reviewCivilStatusSubHeading\n }\n
\n
\n {civilStatus}\n
\n \n )}\n {!!borrower.Occupation &&\n occupation &&\n occupation !== \"\" && (\n <>\n
\n {\n l18n.reviewEmploymentTypeSubHeading\n }\n
\n
\n {occupation}\n
\n \n )}\n {!!borrower.Employer && (\n <>\n
\n {l18n.reviewEmployerSubHeading}\n
\n
\n {borrower.Employer}\n
\n \n )}\n {!!borrower.EarnedIncomePerMonth && (\n <>\n \n {l18n.reviewMonthlyIncomeSubHeading}\n \n {`${borrower.EarnedIncomePerMonth.toLocaleString(\n \"sv-SE\",\n )} ${l18n.currencySymbol}`}\n \n )}\n \n );\n })}\n
\n );\n};\n\nexport default React.memo(ReviewLifeSituationAndEconomy);\n","import React, { ReactElement } from \"react\";\nimport { useFormContext } from \"react-hook-form\";\n\nimport {\n ReviewSection,\n ReviewHeading,\n} from \"../MortgageApplicationPage.styled\";\nimport { ReviewSectionProps } from \"../MortgageApplicationPageProps\";\n\nconst ReviewPersonalInformation = ({\n l18n,\n}: ReviewSectionProps): ReactElement => {\n const { getValues } = useFormContext();\n const formData = getValues();\n return (\n \n \n {l18n.reviewPersonalInformationHeading}\n \n {formData.Borrowers &&\n formData.Borrowers.filter(Boolean)\n .filter(\n (\n borrower: any, // eslint-disable-line @typescript-eslint/no-explicit-any\n ) =>\n !!borrower.GivenName ||\n !!borrower.FamilyName ||\n !!borrower.Nin ||\n !!borrower.Phone ||\n !!borrower.Email,\n )\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n .map((borrower: any, index: number) => {\n return (\n \n {(!!borrower.GivenName ||\n !!borrower.FamilyName) && (\n <>\n
\n {l18n.reviewApplicantSubHeading}\n
\n
\n {[\n borrower.GivenName,\n borrower.FamilyName,\n ].join(\" \")}\n
\n \n )}\n {!!borrower.Nin && (\n <>\n
\n {l18n.reviewNinSubHeading}\n
\n
\n {borrower.Nin}\n
\n \n )}\n {!!borrower.Phone && (\n <>\n
\n {l18n.reviewPhoneSubHeading}\n
\n
\n {borrower.Phone}\n
\n \n )}\n {!!borrower.Email && (\n <>\n
\n {l18n.reviewEmailSubHeading}\n
\n
\n {borrower.Email}\n
\n \n )}\n \n );\n })}\n
\n );\n};\nexport default React.memo(ReviewPersonalInformation);\n","import React, { Dispatch, ReactElement, SetStateAction, useState } from \"react\";\n\nimport { useHeader } from \"hooks\";\n\nimport {\n Container,\n Content,\n FormPage,\n FormItems,\n ButtonRow,\n NextButton,\n Heading,\n SubHeading,\n FormSubSection,\n FormSubSectionContent,\n FormSubSectionHeader,\n} from \"../MortgageApplicationPage.styled\";\nimport {\n LoanTypeElement,\n CollateralTypeElement,\n NumberOfFullTimeDependantsElement,\n TransferAmountElement,\n DownPaymentElement,\n KeptAssetElements,\n PurchasePriceElement,\n CollateralMunicipalityElement,\n CollateralStreetElement,\n CollateralPostalCodeElement,\n CollateralMonthlyFeeElement,\n CollateralAreaElement,\n CollateralIsNewProductionElement,\n CreditsElements,\n NumberOfApplicantsElement,\n CivilStatusElement,\n OccupationTypeElement,\n EmployerNameElement,\n OwnCompanyOrgNumberElement,\n MonthlyIncomeElement,\n IncomeInForeignCurrencyElement,\n HasDependentsElement,\n NumberOfPartTimeDependantsElement,\n HasCreditsElement,\n HasKeptAssetsElement,\n} from \"../MortgageApplicationPageElements\";\nimport {\n PageStepProps,\n Credit,\n KeptAsset,\n} from \"../MortgageApplicationPageProps\";\n\nconst MortgageApplicationInitialStep = ({\n id = \"application\",\n show,\n isSectionVisible,\n buildBranching,\n buildNextSteps,\n onNext,\n setGtmFormStarted,\n numberOfApplicants,\n setNumberOfApplicants,\n l18n,\n elementProps,\n}: MortgageApplicationInitialStepProps): ReactElement => {\n const [downPaymentRange, setDownPaymentRange] =\n useState<[number, number]>();\n const [occupationType, setOccupationType] = useState<\n (string | undefined)[]\n >([]);\n const [hasDependants, setHasDependants] = useState(false);\n const [hasCredits, setHasCredits] = useState(false);\n const [credits, setCredits] = useState([]);\n const [hasKeptAssets, setHasKeptAssets] = useState(false);\n const [keptAssets, setKeptAssets] = useState([]);\n const headerState = useHeader();\n\n const hasOccupationType = (\n index: number,\n occupationTypes: string[],\n ): boolean => {\n return (\n !!occupationType &&\n !!occupationType[index] &&\n occupationTypes.some((t) => occupationType[index] === t)\n );\n };\n\n return (\n \n {isSectionVisible(\"loan-type\") && (\n \n \n \n \n \n )}\n {isSectionVisible(\"new-mortgage-collateral-type\") && (\n \n \n {l18n.typeOfCollateralHeading}\n \n \n \n \n \n )}\n {isSectionVisible(\"transfer-mortgage-collateral-type\") && (\n \n \n {l18n.typeOfCollateralHeading}\n \n \n \n \n \n )}\n {isSectionVisible(\"new-mortgage-collateral-bostadsratt\") && (\n \n \n {l18n.collateralHeading}\n \n \n \n \n \n \n \n \n \n \n \n \n )}\n {isSectionVisible(\"new-mortgage-collateral-property\") && (\n \n \n {l18n.collateralHeading}\n \n \n \n \n \n \n \n \n \n \n )}\n {isSectionVisible(\"transfer-mortgage-collateral-bostadsratt\") && (\n \n \n {l18n.collateralHeading}\n \n \n \n \n \n \n \n \n \n \n \n )}\n {isSectionVisible(\"transfer-mortgage-collateral-property\") && (\n \n \n {l18n.collateralHeading}\n \n \n \n \n \n \n \n \n \n )}\n {isSectionVisible(\"applicants\") &&\n numberOfApplicants === undefined && (\n \n \n {l18n.applicantsHeading}\n \n \n \n \n \n )}\n {isSectionVisible(\"applicants\") && numberOfApplicants === 1 && (\n \n \n {l18n.applicantsHeading}\n \n \n \n \n \n {hasOccupationType(0, [\n \"PERMANENT_LONG\",\n \"TIME_LIMITED\",\n ]) && (\n \n )}\n {hasOccupationType(0, [\"OWN_EMPLOYED\"]) && (\n \n )}\n \n \n \n \n )}\n {isSectionVisible(\"applicants\") && numberOfApplicants === 2 && (\n \n \n {l18n.applicantsHeading}\n \n \n \n {[0, 1].map((index) => {\n const isMainApplicant = index === 0;\n return (\n \n \n \n {isMainApplicant\n ? l18n.mainApplicantSubHeading\n : l18n.coApplicantSubHeading}\n \n \n \n \n \n {hasOccupationType(index, [\n \"PERMANENT_LONG\",\n \"TIME_LIMITED\",\n ]) && (\n \n )}\n {hasOccupationType(index, [\n \"OWN_EMPLOYED\",\n ]) && (\n \n )}\n \n \n \n \n );\n })}\n \n \n )}\n {isSectionVisible(\"dependants-credits-assets\") && (\n \n \n {l18n.creditsAssetsHeading}\n \n \n \n {hasDependants && (\n \n \n \n \n \n \n )}\n \n \n \n \n \n \n )}\n \n \n onNext() : undefined}\n >\n {l18n.navigateToPersonalInformationButton}\n \n \n \n \n );\n};\n\ninterface MortgageApplicationInitialStepProps extends PageStepProps {\n setGtmFormStarted: Dispatch>;\n numberOfApplicants: number | undefined;\n setNumberOfApplicants: Dispatch>;\n}\n\nexport default React.memo(MortgageApplicationInitialStep);\n","import React, { Dispatch, ReactElement, SetStateAction } from \"react\";\n\nimport { useHeader } from \"hooks\";\n\nimport {\n Container,\n Content,\n FormPage,\n FormItems,\n ButtonRow,\n PrevButton,\n Heading,\n SubHeading,\n FormSubSection,\n NextButton,\n FormSubSectionContent,\n FormSubSectionHeader,\n} from \"../MortgageApplicationPage.styled\";\nimport {\n PhoneNumberElement,\n GivenNameElement,\n NinElement,\n FamilyNameElement,\n EmailElement,\n} from \"../MortgageApplicationPageElements\";\nimport { PageStepProps } from \"../MortgageApplicationPageProps\";\n\nconst PersonalInformationStep = ({\n id = \"personal-information\",\n show,\n isSectionVisible,\n onPrev,\n onNext,\n numberOfApplicants,\n setMainApplicantNin,\n l18n,\n elementProps,\n}: PersonalInformationStepProps): ReactElement => {\n const headerState = useHeader();\n\n return (\n \n {isSectionVisible(\"personal-information\") &&\n numberOfApplicants === 1 && (\n \n \n \n {l18n.personalInformationSingleHeading}\n \n \n\n \n \n \n \n \n \n \n \n )}\n\n {isSectionVisible(\"personal-information\") &&\n numberOfApplicants === 2 && (\n \n \n \n {l18n.personalInformationMultipleHeading}\n \n \n \n {[0, 1].map((index) => {\n const isMainApplicant = index === 0;\n return (\n \n \n \n {isMainApplicant\n ? l18n.mainApplicantSubHeading\n : l18n.coApplicantSubHeading}\n \n \n \n \n \n \n \n \n \n \n );\n })}\n \n \n )}\n \n \n onPrev() : undefined}\n >\n {l18n.navigateBackToApplicationButton}\n \n onNext() : undefined}\n >\n {l18n.navigateToReviewButton}\n \n \n \n \n );\n};\n\ninterface PersonalInformationStepProps extends PageStepProps {\n numberOfApplicants: number | undefined;\n setMainApplicantNin: Dispatch>;\n}\n\nexport default React.memo(PersonalInformationStep);\n","import React, { ReactElement } from \"react\";\nimport { useFormContext } from \"react-hook-form\";\n\nimport SubmitButton from \"components/Button/SubmitButton\";\nimport { FormMessage } from \"components/Form/Form.styled\";\nimport { useHeader } from \"hooks\";\n\nimport {\n Container,\n Content,\n FormPage,\n FormItems,\n ButtonRow,\n PrevButton,\n Heading,\n} from \"../MortgageApplicationPage.styled\";\nimport {\n AcceptTermsElement,\n ReviewLoanAmountsAndCollateralInfo,\n ReviewHousehold,\n ReviewLifeSituationAndEconomy,\n ReviewPersonalInformation,\n} from \"../MortgageApplicationPageElements\";\nimport { PageStepProps } from \"../MortgageApplicationPageProps\";\nconst ReviewStep = ({\n id = \"review\",\n show,\n isSectionVisible,\n onPrev,\n onNext,\n errorMessage,\n validationErrors,\n l18n,\n elementProps,\n reviewProps,\n}: ReviewStepProps): ReactElement => {\n const headerState = useHeader();\n const { getValues } = useFormContext();\n const formData = getValues();\n return (\n \n {isSectionVisible(\"review\") && formData && (\n \n \n {l18n.reviewHeading}\n \n \n \n \n \n \n \n \n )}\n {isSectionVisible(\"submit\") && (\n <>\n \n \n {l18n.termsAndConditionsHeading}\n \n \n

\n \n
\n
\n \n \n onPrev() : undefined}\n >\n {l18n.navigateBackToPersonalInformationButton}\n \n onNext() : undefined}\n label={l18n.submitButton}\n />\n \n \n \n )}\n {errorMessage && (\n \n \n \n {errorMessage}\n {validationErrors && (\n
    \n {Object.keys(validationErrors).map(\n (field, index) => {\n return validationErrors[field] ? (\n \n {validationErrors[field][0]}\n \n ) : (\n <>\n );\n },\n )}\n
\n )}\n
\n
\n
\n )}\n
\n );\n};\n\ninterface ReviewStepProps extends PageStepProps {\n errorMessage: string | null;\n validationErrors: {\n [key: string]: string[];\n } | null;\n}\n\nexport default React.memo(ReviewStep);\n","import React, { ReactElement } from \"react\";\n\nimport { useHeader } from \"hooks\";\n\nimport {\n Container,\n Content,\n FormPage,\n Heading,\n ConfirmationIntroduction,\n ConfirmationText,\n} from \"../MortgageApplicationPage.styled\";\nimport { PageStepProps } from \"../MortgageApplicationPageProps\";\n\nconst ConfirmationStep = ({\n id = \"confirmation\",\n show,\n l18n,\n}: PageStepProps): ReactElement => {\n const headerState = useHeader();\n\n return (\n \n \n \n {l18n.confirmationHeader}\n \n \n {l18n.confirmationIntroduction}\n \n \n \n \n );\n};\n\nexport default React.memo(ConfirmationStep);\n","import { QRCodeSVG } from \"qrcode.react\";\nimport React, { ReactElement, useEffect, useState } from \"react\";\nimport { isMobile } from \"react-device-detect\";\n\nimport Button from \"components/Button/Button\";\nimport Progress from \"components/Progress\";\nimport { useHeader } from \"hooks\";\n\nimport {\n Container,\n Content,\n FormPage,\n FormItems,\n Heading,\n} from \"../MortgageApplicationPage.styled\";\nimport { PageStepProps } from \"../MortgageApplicationPageProps\";\n\nconst BankIdV2AuthStep = ({\n id,\n show,\n isSectionVisible,\n l18n,\n qrAuthProps,\n useQrForMobile,\n}: PageStepProps): ReactElement => {\n const headerState = useHeader();\n const [qrData, setQrData] = useState(\"\");\n\n const desktopAuth = () => {\n return (\n <>\n \n {l18n.bankIdAuthPendingText}\n \n );\n };\n\n const mobileAuth = () => {\n return (\n <>\n \n \n {l18n.bankIdAuthPendingText}\n \n \n );\n };\n\n useEffect(() => {\n if (qrAuthProps?.qrData !== undefined) setQrData(qrAuthProps.qrData);\n }, [qrAuthProps]);\n\n return (\n \n \n \n {l18n.bankIdAuthHeading}\n \n\n {isSectionVisible(\"bankid-auth-pending\") && (\n \n {isMobile && !useQrForMobile && mobileAuth()}\n {isMobile && useQrForMobile && desktopAuth()}\n {!isMobile && desktopAuth()}\n \n )}\n\n {isSectionVisible(\"bankid-auth-complete\") && (\n \n \n {l18n.bankIdAuthCompletedText}\n \n )}\n \n \n );\n};\n\nexport default React.memo(BankIdV2AuthStep);\n","import { useGTMDispatch } from \"@elgorditosalsero/react-gtm-hook\";\nimport {\n ThemeProvider as MuiThemeProvider,\n createTheme,\n} from \"@mui/material/styles\";\nimport React, { useState, ReactElement, useEffect, useCallback } from \"react\";\nimport { FormProvider, useForm, useFormState } from \"react-hook-form\";\nimport { useDispatch } from \"react-redux\";\nimport { Prompt } from \"react-router-dom\";\nimport { ThemeProvider } from \"styled-components\";\n\nimport Breadcrumb from \"components/Breadcrumb\";\nimport Hero from \"components/Hero\";\nimport HiddenField from \"components/HiddenField\";\nimport PageContent from \"components/PageContent\";\nimport Section from \"components/Section\";\nimport { useForm as useFormHook } from \"hooks\";\nimport { SUBMIT_FORM } from \"store/actionTypes\";\nimport { Wrapper } from \"style/components/Page\";\nimport { SingleFormState } from \"types/state/FormState\";\nimport { scrollToFirstError } from \"utils/forms\";\nimport getComponentTypeForContent from \"utils/getComponentTypeForContent\";\n\nimport {\n LoanAmount,\n LoanBanner,\n StyledForm,\n} from \"./MortgageApplicationPage.styled\";\nimport { AntiForgeryElement } from \"./MortgageApplicationPageElements\";\nimport MortgageApplicationPageProps, {\n VisibleSection,\n RenderElementProps,\n ReviewSectionProps,\n PageStepProps,\n BranchingInstruction,\n Branching,\n NextSteps,\n NavigateForwardProps,\n NavigateBackProps,\n QrAuthProps,\n} from \"./MortgageApplicationPageProps\";\nimport {\n ConfirmationStep,\n MortgageApplicationInitialStep,\n PersonalInformationStep,\n ReviewStep,\n} from \"./MortgageApplicationPageSteps\";\nimport BankIdV2AuthStep from \"./MortgageApplicationPageSteps/BankIdV2AuthStep\";\nimport {\n showNextFormSections,\n setFieldErrorsFromValidation,\n pollAuthenticationV2Token,\n} from \"./MortgageApplicationPageUtils\";\n\nconst MortgageApplicationPage = ({\n breadcrumb,\n identifier = \"mortgage\",\n contentId,\n hero,\n blocks,\n form,\n theme = \"lightgray\",\n contentTheme = \"black\",\n actionTheme = \"coral\",\n l18n = {},\n}: MortgageApplicationPageProps): ReactElement => {\n const methods = useForm({\n mode: \"onBlur\",\n reValidateMode: \"onBlur\",\n shouldFocusError: true,\n });\n const { control, handleSubmit, reset, trigger, setError, getValues } =\n methods;\n const [errorMessage, setErrorMessage] = useState(null);\n const [validationErrors, setValidationErrors] = useState<{\n [key: string]: string[];\n } | null>(null);\n const [isSuccess, setIsSuccess] = useState(false);\n const [isSubmitting, setIsSubmitting] = useState(false);\n const [direction, setDirection] = useState<\"forward\" | \"back\">(\"forward\");\n const [page, setPage] = useState(\"\");\n const [visibleSections, setVisibleSections] = useState([\n { key: \"loan-type\", index: 0 },\n ]);\n const [gtmFormStarted, setGtmFormStarted] = React.useState(false);\n const [numberOfApplicants, setNumberOfApplicants] = useState<\n number | undefined\n >();\n // eslint-disable-next-line unused-imports/no-unused-vars\n const [mainApplicantNin, setMainApplicantNin] = useState();\n const [qrAuthProps, setQrAuthProps] = useState(\n {} as QrAuthProps,\n );\n\n const dispatch = useDispatch();\n\n const formState = useFormState({ control });\n const formHook = useFormHook(identifier);\n const sendDataToGTM = useGTMDispatch();\n\n const setQrCode = (newQrCodeData: string) => {\n setQrAuthProps({ ...qrAuthProps, qrData: newQrCodeData });\n };\n\n const setAutoStartToken = (autoStartToken: string) => {\n setQrAuthProps({ ...qrAuthProps, autoStartToken: autoStartToken });\n };\n\n /* SUBMISSION AND ERROR HANDLING */\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const onSubmit = async (formData: any) => {\n navigateForward({\n page: \"bankid-auth\",\n nextSections: [\"bankid-auth-pending\"],\n });\n\n const pollAuthTokenResult = await pollAuthenticationV2Token(\n form.authPollUrl,\n setQrCode,\n setAutoStartToken,\n );\n\n const authToken = pollAuthTokenResult.authToken;\n const authErrorMessage = pollAuthTokenResult.authErrorMessage;\n\n if (!authToken) {\n handleAnyFormSubmissionError({\n isError: true,\n errorMessage: authErrorMessage || \"Authentication failed\",\n } as SingleFormState);\n return;\n }\n\n switchSections(\"bankid-auth-pending\", \"bankid-auth-complete\");\n\n dispatch({\n type: SUBMIT_FORM,\n payload: {\n path: form.postUrl,\n id: identifier,\n formData: {\n ...formData,\n authToken: authToken,\n },\n postAsJson: true,\n },\n });\n };\n\n const handleAnyFormSubmissionError = useCallback(\n (form: SingleFormState): void => {\n if (!form.isError) {\n setErrorMessage(null);\n setValidationErrors(null);\n return;\n }\n\n setErrorMessage(form.errorMessage || null);\n setValidationErrors(form.validationErrors || null);\n if (form.validationErrors) {\n setFieldErrorsFromValidation(form.validationErrors, setError);\n }\n\n setDirection(\"forward\");\n setPage(\"fail\");\n\n setTimeout(() => {\n const element = document.getElementById(\"errors\");\n if (element) {\n element.scrollIntoView({ behavior: \"smooth\" });\n }\n }, 0);\n },\n [setError],\n );\n\n useEffect(() => {\n if (formHook) {\n handleAnyFormSubmissionError(formHook);\n\n if (!formHook.isSuccess) {\n setIsSuccess(false);\n } else {\n setDirection(\"forward\");\n setPage(\"confirmation\");\n setIsSuccess(true);\n }\n\n setIsSubmitting(formHook.isSubmitting == true);\n }\n }, [formHook, setError, handleAnyFormSubmissionError]);\n\n useEffect(() => {\n isSubmitting && isSuccess && reset();\n }, [isSubmitting, isSuccess, reset]);\n\n useEffect(() => {\n if (formState.errors) {\n scrollToFirstError(formState.errors);\n }\n }, [formState]);\n\n /* GTM EVENTS */\n\n useEffect(() => {\n if (gtmFormStarted) {\n sendDataToGTM({\n event: \"mortgage_step\",\n step_name: \"application started\",\n });\n }\n }, [gtmFormStarted, sendDataToGTM]);\n\n useEffect(() => {\n if (page) {\n let stepName = page.replace(\"-\", \" \");\n\n if (direction === \"back\") {\n stepName = \"back to \" + stepName;\n }\n\n sendDataToGTM({\n event: \"mortgage_step\",\n step_name: stepName,\n });\n }\n }, [page, direction, sendDataToGTM]);\n\n useEffect(() => {\n if (isSuccess) {\n sendDataToGTM({\n event: \"mortgage_submission\",\n step_name: \"mortgage application submission\",\n });\n }\n }, [isSuccess, sendDataToGTM]);\n\n /* CONTROL FLOW */\n\n const buildBranching = (\n instructions: BranchingInstruction[],\n ): Branching => {\n return {\n instructions: instructions,\n visibleSections: visibleSections,\n setVisibleSections: setVisibleSections,\n } as Branching;\n };\n\n const buildNextSteps = (nextSections: string[]): NextSteps => {\n return {\n nextSections: nextSections,\n visibleSections: visibleSections,\n setVisibleSections: setVisibleSections,\n } as NextSteps;\n };\n\n const isSectionVisible = (key: string): boolean => {\n return visibleSections.findIndex((x) => x.key === key) > -1;\n };\n\n const navigateForward = ({\n page,\n nextSections,\n }: NavigateForwardProps): void => {\n setPage(page);\n setDirection(\"forward\");\n const lastVisibleSection = visibleSections[visibleSections.length - 1];\n showNextFormSections(\n lastVisibleSection.key,\n buildNextSteps(nextSections),\n );\n };\n\n const navigateBack = ({\n page,\n hideSectionsAfter,\n }: NavigateBackProps): void => {\n setPage(page);\n setDirection(\"back\");\n showNextFormSections(hideSectionsAfter, buildNextSteps([]));\n };\n\n const switchSections = (\n sectionKey: string,\n newSectionKey: string,\n ): void => {\n const sectionToReplace = visibleSections.find(\n (x) => x.key === sectionKey,\n );\n if (sectionToReplace) {\n setVisibleSections((current) => [\n ...current.filter((x) => x.key !== sectionKey),\n { key: newSectionKey, index: sectionToReplace.index },\n ]);\n }\n };\n\n useEffect(() => {\n setTimeout(() => {\n if (page) {\n const element = document.getElementById(page);\n if (element) {\n element.scrollIntoView({ behavior: \"smooth\" });\n }\n }\n }, 0);\n }, [page]);\n\n /* GENERAL PROPS */\n\n const elementProps: RenderElementProps = {\n control,\n form,\n l18n,\n disabled: isSubmitting,\n };\n\n const reviewProps: ReviewSectionProps = {\n form,\n l18n,\n };\n\n const pageStepProps: PageStepProps = {\n isSectionVisible,\n buildBranching,\n buildNextSteps,\n l18n,\n elementProps,\n reviewProps,\n };\n\n const loanValues = getValues([\n \"PurchasePriceAmount\",\n \"DownPaymentLoanAmount\",\n \"AmountToTransfer\",\n ]);\n\n return (\n \n \n \n {hero && (\n \n )}\n {breadcrumb?.items && (\n \n )}\n \n
\n \n \n \n\n \n\n {\n const isValid = await trigger();\n if (isValid) {\n navigateForward({\n page: \"personal-information\",\n nextSections: [\n \"personal-information\",\n ],\n });\n }\n }}\n {...pageStepProps}\n />\n\n {\n navigateBack({\n page: \"application\",\n hideSectionsAfter:\n \"dependants-credits-assets\",\n });\n }}\n onNext={async () => {\n const isValid = await trigger();\n if (isValid) {\n navigateForward({\n page: \"review\",\n nextSections: [\n \"review\",\n \"submit\",\n ],\n });\n }\n }}\n {...pageStepProps}\n />\n\n {\n navigateBack({\n page: \"personal-information\",\n hideSectionsAfter:\n \"personal-information\",\n });\n }}\n {...pageStepProps}\n />\n\n \n\n \n \n \n \n
\n {!(isSubmitting || isSuccess) && (\n
\n \n {l18n.loanBannerText}\n \n {(\n loanValues[2] ||\n loanValues[0] - loanValues[1] ||\n 0\n ).toLocaleString(\"sv-SE\")}{\" \"}\n {l18n.currencySymbol}\n \n \n
\n )}\n
\n
\n
\n );\n};\n\nexport default React.memo(MortgageApplicationPage);\n","import { AxiosResponse } from \"axios\";\n\nimport { postJsonData } from \"utils/fetch\";\n\nimport { sleep } from \"../../../utils/sleep\";\nimport {\n AuthenticationV2PollPostModel,\n PollAuthenticationV2Response,\n} from \"../MortgageApplication.types\";\n\nconst pollAuthenticationV2Token = async (\n authPollUrl: string,\n refreshQrCodeCallback: (qrData: string) => void,\n setAutoStartTokenCallback: (token: string) => void,\n): Promise => {\n const maxAttempts = 1000;\n\n let attempts = 0;\n let response;\n let authToken: string | undefined = undefined;\n let authLocation: string | undefined = undefined;\n let isError = false;\n let authError = undefined;\n let shouldAbort = false;\n\n while (!authToken && !shouldAbort && attempts < maxAttempts) {\n attempts++;\n\n try {\n response = (await postJsonData(authPollUrl, {\n authLocation: authLocation,\n } as AuthenticationV2PollPostModel)) as AxiosResponse;\n authToken = response?.data?.authToken;\n authLocation = response?.data?.authLocation;\n refreshQrCodeCallback(response.data?.qrData);\n if (response.data?.autoStartToken)\n setAutoStartTokenCallback(response.data.autoStartToken);\n\n await sleep(1000);\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n } catch (error: any) {\n if (error.response || (!error.response && !error.request)) {\n isError = true;\n authError = error;\n shouldAbort = true;\n }\n }\n }\n\n return {\n isError: isError,\n authToken: authToken,\n authErrorMessage: authError?.response?.data?.title,\n };\n};\n\nexport interface PollAuthTokenResult {\n isError: boolean;\n authToken?: string;\n authErrorMessage?: string;\n}\n\nexport { pollAuthenticationV2Token };\n","import { FieldErrors, FieldValues } from \"react-hook-form\";\n\nimport { PropsWithEpiContent } from \"../types/Props\";\n\nexport const scrollToFirstError = (errors: FieldErrors): void => {\n const firstError = Object.keys(errors).reduce(\n (field: string | undefined, a) => {\n return field && errors[field] ? field : a;\n },\n undefined,\n );\n if (firstError) {\n const elements = document.getElementsByName(firstError);\n elements &&\n elements.length > 0 &&\n elements[0].scrollIntoView({\n behavior: \"smooth\",\n block: \"center\",\n inline: \"center\",\n });\n }\n};\n\nexport const splitItemsByStep = (\n formItems: PropsWithEpiContent[],\n hasSteps: boolean,\n): PropsWithEpiContent[][] => {\n if (!hasSteps) return [formItems];\n\n const result: PropsWithEpiContent[][] = [[]];\n let stepNumber = 1;\n formItems.forEach((item) => {\n if (\n item.component === \"FormStepBlock\" ||\n item.component === \"FormResultStepBlock\" ||\n item.component === \"FormSummaryStepBlock\"\n ) {\n result.push([]); // If new step, create new subarray\n item.stepNumber = stepNumber++; // Assign the step number\n }\n result[result.length - 1].push(item); // Push element to last array\n });\n\n if (result[0]?.length === 0) result.shift(); // Remove first item if empty\n return result;\n};\n\nexport const getStepElements = (\n formItems: PropsWithEpiContent[],\n): PropsWithEpiContent[] =>\n formItems.filter(\n (item) =>\n item.component === \"FormStepBlock\" ||\n item.component === \"FormResultStepBlock\" ||\n item.component === \"FormSummaryStepBlock\",\n );\n\nexport const getStepComponentNames = (\n stepElements: PropsWithEpiContent[],\n steps: PropsWithEpiContent[][],\n) => {\n const defaultComponents = stepElements.map(\n (stepElement) => stepElement.component,\n ) as string[];\n if (stepElements.length === steps.length) {\n return defaultComponents;\n }\n return new Array(\"FormStepBlock\").concat(defaultComponents);\n};\n"],"names":["Breadcrumb","loadable","resolved","chunkName","isReady","props","key","resolve","__webpack_modules__","importAsync","requireAsync","then","requireSync","id","__webpack_require__","BreadcrumbLoader","_jsx","StyledForm","styled","form","withConfig","componentId","columnGap","MQ","FROM_M","FROM_XL","theme","true","css","FormGuideHeader","div","FormGuideHeading","h2","styleHeadingXL","FormGuideIntroduction","styleBodyL","FormElements","FormMessage","FormHelperText","SuccessMessage","styleHeadingM","Container","GridContainer","GUTTER","XL","MultiStepWrapper","MultiStepContent","Content","attrs","Left","Right","topPadOffset","Heading","Introduction","Form","false","Hero","HeroLoader","PageContent","mainContent","children","areaName","className","componentSelector","_jsxs","_Fragment","ContentArea","items","React","Progress","ProgressLoader","FormPage","scrollMarginTopPad","$show","FormSectionContent","FormSectionContainer","ButtonRow","FormItems","ConfirmationIntroduction","styleBodyLAlt","ConfirmationText","styleBodyM","styledLink","FormSubSection","section","FormSubSectionHeader","FormSubSectionContent","FormItemsWrapper","styleHeadingL","SubHeading","h4","styleLabelM","NextButton","Button","PrevButton","AddButton","ReviewSection","styleLabelS","ReviewHeading","CloseButton","LoanBanner","PageContainer","LoanAmount","span","styleNumber","getFormElement","identifier","checkElementName","formElements","find","element","elementName","renderElement","dynamicReplacements","formElement","replacedPropertyValues","replaceValuesDynamically","replacedValues","forEach","r","fieldValue","field","length","replacedValue","replace","fromValue","toValue","content","BlockComponentSelector","getComponentTypeForContent","AntiForgeryElement","elementProps","showNextFormSections","self","nextSteps","_visibleSections$find","nextSections","visibleSections","setVisibleSections","currentIndex","x","index","current","filter","map","branchFlowOnChange","value","branching","instructions","branch","generateDynamicReplacements","fields","f","sleep","ms","Promise","setTimeout","setFieldErrorsFromValidation","validationErrors","setError","fieldErrors","charAt","toUpperCase","slice","type","message","unregisterElements","elements","skipFields","unregister","prefix","Object","entries","fieldName","includes","startsWith","LoanTypeElement","setGtmFormStarted","setValue","formState","isDirty","dirtyFields","useFormContext","onChange","_","CollateralTypeElement","isTransfer","NumberOfFullTimeDependantsElement","TransferAmountElement","l18n","input","adornment","currencySymbol","DownPaymentElement","downPaymentRange","undefined","min","max","renderKeptAssetTypeElement","setKeptAssets","replacements","toString","a","renderKeptAssetMonthlyFeeElement","inputFormatNumber","endAdornment","renderKeptAssetMonthlyRentElement","renderKeptAssetHasMortgageElement","hasMortgage","renderKeptAssetMortgageElement","asset","KeptAssetElements","hasKeptAssets","keptAssets","resultElements","sort","b","assetElements","push","assetSubHeading","size","iconOnly","icon","onClick","removeButton","variant","actionTheme","lastIndex","addMoreButton","PurchasePriceElement","setDownPaymentRange","CollateralMunicipalityElement","searchable","CollateralStreetElement","CollateralPostalCodeElement","CollateralMonthlyFeeElement","CollateralAreaElement","areaSymbol","CollateralIsNewProductionElement","renderCreditTypeElement","setCredits","c","renderCreditAmountElement","isCreditCard","CreditsElements","hasCredits","credits","credit","creditElements","creditSubHeading","NumberOfApplicantsElement","setNumberOfApplicants","choice","Borrowers","AcceptTermsElement","PhoneNumberElement","isMainApplicant","CivilStatusElement","OccupationTypeElement","occupationType","setOccupationType","occupationTypes","EmployerNameElement","OwnCompanyOrgNumberElement","MonthlyIncomeElement","IncomeInForeignCurrencyElement","HasDependentsElement","setHasDependants","NumberOfPartTimeDependantsElement","HasCreditsElement","setHasCredits","HasKeptAssetsElement","setHasKeptAssets","GivenNameElement","NinElement","setMainApplicantNin","inputFormatPattern","FamilyNameElement","EmailElement","getCaptionByValue","isElementName","_element$items","_element$items$find","item","caption","ReviewLoanAmountsAndCollateralInfo","_formData$Collateral","_formData$PurchasePri","_formData$DownPayment","_formData$AmountToTra","_formData$Collateral2","_formData$Collateral3","_formData$Collateral4","_formData$Collateral5","_formData$Collateral6","_formData$Collateral7","getValues","formData","municipalityName","Collateral","MunicipalityCode","reviewCollateralHeading","LoanType","reviewPurchasePriceSubHeading","PurchasePriceAmount","toLocaleString","reviewDownPaymentSubHeading","DownPaymentLoanAmount","reviewLoanAmountSubHeading","reviewTransferAmountSubHeading","AmountToTransfer","reviewMunicipalitySubHeading","Street","reviewAddressSubHeading","PostalCode","reviewPostalCodeSubHeading","FeePerMonth","reviewMonthlyFeeSubHeading","currencyPerMonthSymbol","Area","reviewAreaSubHeading","IsNewProduction","reviewIsNewProductionSubHeading","yes","no","ReviewHousehold","Boolean","reviewHouseholdHeading","reviewNumApplicantsSubHeading","Nin","reviewNumApplicantsMultiple","reviewNumApplicantsSingle","DependentsFullTime","DependentsPartTime","reviewDependentsSubHeading","reviewDependentsFullTimeSubHeading","reviewDependentsPartTimeSubHeading","Credits","HasCredits","reviewCreditsSubHeading","assetType","Type","Amount","Number","KeptAssets","HasKeptAssets","reviewAssetsSubHeading","keptAsset","AssetType","Mortgage","reviewAssetMortgage","ReviewLifeSituationAndEconomy","reviewEconomyHeading","borrower","GivenName","FamilyName","CivilStatus","Occupation","Employer","EarnedIncomePerMonth","civilStatus","occupation","reviewApplicantSubHeading","join","reviewCivilStatusSubHeading","reviewEmploymentTypeSubHeading","reviewEmployerSubHeading","reviewMonthlyIncomeSubHeading","ReviewPersonalInformation","reviewPersonalInformationHeading","Phone","Email","reviewNinSubHeading","reviewPhoneSubHeading","reviewEmailSubHeading","MortgageApplicationInitialStep","show","isSectionVisible","buildBranching","buildNextSteps","onNext","numberOfApplicants","useState","hasDependants","headerState","useHeader","hasOccupationType","some","t","$headerVisible","visible","typeOfCollateralHeading","collateralHeading","applicantsHeading","mainApplicantSubHeading","coApplicantSubHeading","creditsAssetsHeading","primaryButton","isLink","navigateToPersonalInformationButton","PersonalInformationStep","onPrev","personalInformationSingleHeading","personalInformationMultipleHeading","navigateBackToApplicationButton","navigateToReviewButton","ReviewStep","errorMessage","reviewProps","reviewHeading","termsAndConditionsHeading","dangerouslySetInnerHTML","__html","termsAndConditionsText","navigateBackToPersonalInformationButton","SubmitButton","label","submitButton","error","keys","ConfirmationStep","confirmationHeader","confirmationIntroduction","confirmationText","BankIdV2AuthStep","qrAuthProps","useQrForMobile","qrData","setQrData","desktopAuth","QRCodeSVG","bankIdAuthPendingText","useEffect","bankIdAuthHeading","style","alignItems","isMobile","url","autoStartToken","text","bankIdOpenMobileApp","textAlign","bankIdAuthCompletedText","MortgageApplicationPage","breadcrumb","contentId","hero","blocks","contentTheme","methods","useForm","mode","reValidateMode","shouldFocusError","control","handleSubmit","reset","trigger","setErrorMessage","setValidationErrors","isSuccess","setIsSuccess","isSubmitting","setIsSubmitting","direction","setDirection","page","setPage","gtmFormStarted","mainApplicantNin","setQrAuthProps","dispatch","useDispatch","useFormState","formHook","useFormHook","sendDataToGTM","useGTMDispatch","setQrCode","newQrCodeData","setAutoStartToken","handleAnyFormSubmissionError","useCallback","isError","document","getElementById","scrollIntoView","behavior","errors","scrollToFirstError","event","step_name","stepName","navigateForward","lastVisibleSection","navigateBack","hideSectionsAfter","switchSections","sectionKey","newSectionKey","sectionToReplace","disabled","pageStepProps","findIndex","loanValues","MuiThemeProvider","createTheme","ThemeProvider","isMultiStepForm","Wrapper","Section","FormProvider","action","postUrl","method","onSubmit","async","pollAuthTokenResult","authPollUrl","refreshQrCodeCallback","setAutoStartTokenCallback","_authError","_authError$response","_authError$response$d","response","authToken","authLocation","authError","attempts","shouldAbort","_response","_response$data","_response2","_response2$data","_response$data2","_response$data3","postJsonData","data","request","authErrorMessage","title","pollAuthenticationV2Token","SUBMIT_FORM","payload","path","postAsJson","HiddenField","predefinedValue","useQrCodeForMobileV2","Prompt","when","backWarning","loanBannerText","firstError","reduce","getElementsByName","block","inline","splitItemsByStep","formItems","hasSteps","_result$","result","stepNumber","component","shift","getStepElements","getStepComponentNames","stepElements","steps","defaultComponents","stepElement","Array","concat"],"sourceRoot":""}