{"version":3,"file":"deposit-5219fd47.js","sources":["../../../client-app/src/apps/deposit/i18n.ts","../../../client-app/src/apps/deposit/pages/Application/stages-se.tsx","../../../client-app/src/apps/deposit/pages/Application/stages-no.tsx","../../../client-app/src/apps/deposit/pages/Application/index.tsx","../../../client-app/src/apps/deposit/pages/Offer/loader.ts","../../../client-app/src/apps/deposit/pages/Offer/index.tsx","../../../client-app/src/apps/deposit/pages/Sign/actions.ts","../../../client-app/src/apps/deposit/pages/Sign/loader.ts","../../../client-app/src/apps/deposit/pages/Sign/index.tsx","../../../client-app/src/apps/deposit/App.tsx","../../../client-app/src/apps/deposit/main.tsx"],"sourcesContent":["import i18next from 'i18next';\nimport { initReactI18next } from 'react-i18next';\nimport HttpApi from 'i18next-http-backend';\nimport { getRuntime } from '../../common/lib/runtime';\nimport { DocumentLanguageDetector } from '@n2-common/lib/DocumentLanguageDetector';\n\nconst runtime = getRuntime();\n\ni18next //\n .use(initReactI18next)\n .use(HttpApi)\n .use(DocumentLanguageDetector)\n .init({\n interpolation: { escapeValue: false },\n debug: false, //!runtime.isProd,\n ns: ['common', 'validation', 'deposit'],\n backend: {\n loadPath: `${runtime.isProd ? '/client-apps' : ''}/locales/{{lng}}/{{ns}}.json?v=${runtime.build}`,\n },\n fallbackLng: 'se',\n });\n","import { WizardStage } from '@n2-common/components/MultiStageOnePageWizard/types';\nimport { CreditCardNoApplicationInputModel } from '@n2-common/serverGeneratedTypings/creditCardNoApplicationInputModel';\nimport { TFunction } from 'i18next';\nimport { Config } from '.';\nimport { FormikValues } from 'formik';\nimport { EmailInput, PhoneNumberInput, SwedishSsnInput } from '@n2-common/ui/CustomInput';\nimport { swedishPhoneNumber } from '@n2-common/validation/se/phoneNumber';\nimport { emailRequired } from '@n2-common/validation/common/email';\nimport { swedishNationalId } from '@n2-common/validation/se/nationalId';\nimport { stringRequired } from '@n2-common/validation/common/string';\nimport { addPleaseSelectOption } from '@n2-common/components/MultiStageOnePageWizard';\nimport { employmentStatusCodeSe } from '@n2-common/uiFieldValues/applicationFormFields';\nimport { FormikSelect } from '@n2-common/ui';\ntype FormValues = {\n Applicant: Record;\n Consents: Record,\n};\n\nfunction cleanup(values: FormikValues): CreditCardNoApplicationInputModel {\n return values as CreditCardNoApplicationInputModel;\n}\n\nconst initialValues: FormValues = { Applicant: {}, Consents: {} };\n\nfunction resolveStages(t: TFunction): WizardStage[] {\n return [\n {\n legend: '',\n sectionNameForTracking: 'PersonalInformation',\n fields: [\n {\n name: 'Applicant.Email',\n validation: emailRequired(t),\n componentProps: {\n label: 'E-postadress',\n },\n Component: EmailInput,\n },\n {\n name: 'Applicant.Phonenumber',\n validation: swedishPhoneNumber(t),\n componentProps: {\n label: 'Mobilnummer',\n },\n Component: PhoneNumberInput,\n },\n {\n name: 'Applicant.NationalId',\n validation: swedishNationalId(),\n componentProps: {\n label: 'Personnummer',\n },\n Component: SwedishSsnInput,\n },\n {\n name: 'Applicant.EmploymentStatus',\n validation: stringRequired(t),\n componentProps: {\n label: 'Din arbetssituation',\n },\n Component: (props) => ,\n },\n ],\n }\n ];\n}\n\nexport const config: Config = { cleanup, initialValues, resolveStages };\n","import { WizardStage } from '@n2-common/components/MultiStageOnePageWizard/types';\nimport { CreditCardNoApplicationInputModel } from '@n2-common/serverGeneratedTypings/creditCardNoApplicationInputModel';\nimport { TFunction } from 'i18next';\nimport { Config } from '.';\nimport { FormikValues } from 'formik';\nimport { EmailInput, NationalIdInput, PhoneNumberInput } from '@n2-common/ui/CustomInput';\nimport { nationalId } from '@n2-common/validation/no';\nimport { emailRequired } from '@n2-common/validation/common/email';\nimport { norwegianPhoneNumber } from '@n2-common/validation/no/phoneNumber';\nimport { stringRequired } from '@n2-common/validation/common/string';\nimport { employmentStatusCodeNo } from '@n2-common/uiFieldValues/applicationFormFields';\nimport { addPleaseSelectOption } from '@n2-common/components/MultiStageOnePageWizard';\nimport { FormikSelect } from '@n2-common/ui';\n\ntype FormValues = {\n Applicant: Record;\n Consents: Record,\n};\n\nfunction cleanup(values: FormikValues): CreditCardNoApplicationInputModel {\n return values as CreditCardNoApplicationInputModel;\n}\n\nconst initialValues: FormValues = { Applicant: {}, Consents: {} };\n\nfunction resolveStages(t: TFunction): WizardStage[] {\n return [\n {\n legend: '',\n sectionNameForTracking: 'PersonalInformation',\n fields: [\n {\n name: 'Applicant.Email',\n validation: emailRequired(t),\n componentProps: {\n label: 'E-postadresse',\n },\n Component: EmailInput,\n },\n {\n name: 'Applicant.Phonenumber',\n validation: norwegianPhoneNumber(t),\n componentProps: {\n label: 'Mobilnummer',\n },\n Component: PhoneNumberInput,\n },\n {\n name: 'Applicant.NationalId',\n validation: nationalId.norwegianNationalId(),\n componentProps: {\n label: 'Personnummer',\n },\n Component: NationalIdInput,\n },\n {\n name: 'Applicant.EmploymentStatus',\n validation: stringRequired(t),\n componentProps: {\n label: 'Din arbeidssituation',\n },\n Component: (props) => ,\n },\n ],\n }\n ];\n}\n\nexport const config: Config = { cleanup, initialValues, resolveStages };\n","import { Headline, useDismissableErrorMessage } from '@n2-common/ui';\nimport { useTranslation } from 'react-i18next';\nimport { MultiStageOnePageWizard } from '@n2-common/components';\nimport type { SubmitState, WizardStage } from '@n2-common/components/MultiStageOnePageWizard/types';\nimport { useCallback, useEffect, useLayoutEffect, useMemo, useState } from 'react';\nimport { getApplicatId, pollForExpectedApplicationState, postLoanApplication, submitSsnToGetGpid } from '@n2-common/services/legacyApplicationApiService';\nimport { N2ApplicationStatusToECommerceStatus, trackCoreBankEvent, trackEcommerceEvent } from '@n2-common/lib/gtm';\nimport { ApplicationStatusModel } from '@n2-common/serverGeneratedTypings/applicationStatusModel';\nimport { navigateToStep, ApplicationPaths } from '@n2-common/applicationPages/ApplicationFormsHelpers';\nimport { N2ApplicationStatus } from '@n2-common/serverGeneratedTypings/n2ApplicationStatus';\nimport { navigateToCorrectStep } from '../../App';\nimport { useNavigate } from 'react-router-dom';\nimport { useApplicationIdContext } from '@n2-common/components/ApplicationContext';\nimport { config as configSE } from './stages-se';\nimport { config as configNO } from './stages-no';\nimport { FormikValues } from 'formik';\nimport { TFunction } from 'i18next';\nimport { N2MajorApplicationStatus } from '@n2-common/serverGeneratedTypings/n2MajorApplicationStatus';\nimport { errorToAction } from '@n2-common/applicationPages/applicationErrorHelper';\n\nexport default function WizardApp() {\n const { country, productType } = useApplicationIdContext(false, false);\n const { t } = useTranslation(['common', 'validation', 'deposit']);\n const navigate = useNavigate();\n const { setErrorMessage, ErrorOutput } = useDismissableErrorMessage();\n const [gpid, setGpid] = useState(\"\");\n\n useLayoutEffect(() => {\n document.title = t('deposit:wizard.headline');\n }, [t]);\n\n useEffect(() => {\n trackCoreBankEvent(productType, country, 'application_start');\n trackEcommerceEvent(productType, country, 'view_item', 0);\n }, [country, productType]);\n\n const { resolveStages, initialValues, cleanup } = useMemo(() => {\n switch (country) {\n case 'SE':\n return configSE;\n case 'NO':\n return configNO;\n\n default:\n console.log(`Missing stages for country ${country}`);\n return {} as never;\n }\n }, [country]);\n const stages = useMemo(() => resolveStages(t), [resolveStages, t]) as WizardStage[];\n\n const [isSubmitting, setIsSubmitting] = useState(false);\n\n \n const onSsnStepFinished = useCallback(\n async (values: typeof initialValues) => {\n \n const cleanedValues = cleanup(values);\n \n try {\n const [, res] = await submitSsnToGetGpid({Ssn : cleanedValues.Applicant.NationalId});\n setGpid(res.Gpid);\n trackEcommerceEvent(productType, country, 'begin_checkout', 0, res.Gpid); \n \n } catch (err) {\n console.error(err);\n return;\n } \n },\n [cleanup, country, productType]\n );\n\n\n const submit = useCallback(\n async (values: typeof initialValues, setSubmitState: (state: SubmitState) => void) => {\n if (isSubmitting) {\n return;\n }\n setIsSubmitting(true);\n const cleanedValues = cleanup(values);\n setSubmitState('Submitted');\n try {\n const [, res] = await postLoanApplication(cleanedValues, `/api/n2/depositapplication/${country}/submit`);\n\n trackCoreBankEvent(productType, country, 'application_sent');\n setSubmitState('Processing');\n const model = res;\n console.log(`ApplicationId: ${model.ApplicationGuid}`);\n\n const status = await pollForExpectedApplicationState(\n model.ApplicationGuid,\n '',\n (res: ApplicationStatusModel) =>\n res.Status === N2ApplicationStatus.ReadyForSigning || res.Status === N2ApplicationStatus.Declined,\n false\n );\n\n if (!status) {\n navigateToStep(ApplicationPaths.loadApplication, model.ApplicationGuid, navigate, null);\n return;\n }\n\n trackEcommerceEvent(productType, country, 'add_shipping_info', 0, gpid, model.ApplicationGuid, N2ApplicationStatusToECommerceStatus(status.MajorStatus));\n trackCoreBankEvent(\n productType,\n country,\n 'application_status',\n status.MajorStatus === N2MajorApplicationStatus.Aproved ? 'approved' : 'declined'\n );\n const applicantIdModel = await getApplicatId(model.ApplicationGuid);\n if (!applicantIdModel.ApplicantId) {\n throw new Error('Error fetching applicantId after submitting');\n }\n\n setSubmitState('Done');\n setIsSubmitting(false);\n navigateToCorrectStep({ ...status, IsMainApplicant: true }, applicantIdModel.ApplicantId, navigate);\n } catch (err) {\n const action = errorToAction(err, `${productType}-${country}`, undefined, undefined);\n if (action) {\n setErrorMessage(action);\n } else {\n navigateToStep(ApplicationPaths.error, undefined, navigate, undefined);\n }\n setIsSubmitting(false);\n setSubmitState('Error');\n return;\n }\n },\n [cleanup, country, gpid, isSubmitting, navigate, productType, setErrorMessage]\n );\n return (\n <>\n {t('deposit:wizard.headline')}\n \n \n \n );\n}\n\nexport type Config = {\n cleanup: (values: FormikValues) => TInputModel;\n initialValues: TFormValues;\n resolveStages: (t: TFunction) => WizardStage[];\n};\n","import { ApplicationPaths } from '@n2-common/applicationPages/ApplicationFormsHelpers';\nimport { getRedirectUrl } from '@n2-common/applicationPages/applicationStatusHelpers';\nimport { assertDataIsNotResponse } from '@n2-common/asserts';\nimport { getApplicationIds } from '@n2-common/components/ApplicationContext';\nimport { ApplicationStatusModel } from '@n2-common/serverGeneratedTypings/applicationStatusModel';\nimport { N2ApplicationStatus } from '@n2-common/serverGeneratedTypings/n2ApplicationStatus';\nimport { N2Product } from '@n2-common/serverGeneratedTypings/n2Product';\nimport { getApplicationStatus } from '@n2-common/services/legacyApplicationApiService';\nimport { logErrorToServerside } from '@n2-common/services/serverSideLogging';\nimport { generatePath, LoaderFunctionArgs, redirect, useLoaderData } from 'react-router-dom';\n\nexport async function offerPageLoader({ request }: LoaderFunctionArgs) {\n const { applicantId, applicationId } = await getApplicationIds(request);\n\n if (applicantId === null || applicationId === null) {\n return redirect(generatePath(ApplicationPaths.error));\n }\n\n try {\n const applicationStatus = await getApplicationStatus(applicationId, applicantId, request.signal);\n\n if (!readyForOffer(applicationStatus)) {\n return redirect(getRedirectUrl(applicationStatus, applicantId));\n }\n\n return { applicationId, applicantId, applicationStatus };\n } catch (err) {\n logErrorToServerside(`Error loading data for OfferPage.`, applicationId, applicantId, err || {});\n return redirect(generatePath(ApplicationPaths.error));\n }\n}\n\nexport function useOfferPageLoaderData() {\n const data = useLoaderData() as Awaited>;\n assertDataIsNotResponse(data);\n return data;\n}\n\nfunction readyForOffer(applicationStatus: ApplicationStatusModel) {\n if (applicationStatus.Product !== N2Product.Deposit) {\n return false;\n }\n if (applicationStatus.Status !== N2ApplicationStatus.Offer && applicationStatus.Status !== N2ApplicationStatus.ReadyForSigning) {\n return false;\n }\n if (!applicationStatus.IsMainApplicant) {\n return false;\n }\n return true;\n}\n","import { ApplicationPaths, navigateToStep } from '@n2-common/applicationPages/ApplicationFormsHelpers';\nimport { trackSectionView } from '@n2-common/lib/gtm';\nimport { Button, ButtonRowContainer, Headline, Paragraph } from '@n2-common/ui';\nimport { useEffect, useCallback } from 'react';\nimport { useNavigate } from 'react-router-dom';\nimport { useTranslation } from 'react-i18next';\nimport { useApplicationIdContext } from '@n2-common/components/ApplicationContext';\nexport * from './loader';\n\nexport function Offer() {\n const { applicationId, applicantId, country } = useApplicationIdContext();\n const { t } = useTranslation('deposit');\n\n const navigate = useNavigate();\n\n const handleNext = useCallback(\n () => navigateToStep(ApplicationPaths.cdd, applicationId, navigate, applicantId),\n [applicantId, applicationId, navigate]\n );\n\n useEffect(() => {\n document.title = t('offer.title');\n trackSectionView('SA', country, '2.0', 'Offer');\n }, [country, t]);\n\n return (\n <>\n {t('offer.headline')}\n {t('offer.text')}\n \n \n \n \n );\n}\n","import { type ApplicationSignStatusModel } from '@n2-common/serverGeneratedTypings/applicationSignStatusModel';\nimport { Action, ActionState } from '@n2-common/ui/ActionList';\nimport { N2ApplicationStatus } from '@n2-common/serverGeneratedTypings/n2ApplicationStatus';\nimport { SignLoaderData } from './loader';\nimport { DocumentRequirement } from '@n2-common/components/UploadDocuments';\nimport { TFunction } from 'i18next';\nimport { assertDataIsNotResponse } from '@n2-common/asserts';\nimport { getDocumentationState } from '@n2-common/applicationPages/applicationStatusHelpers';\n\nexport function getActions(status: SignLoaderData, documentStatus: DocumentRequirement[], t: TFunction) {\n assertDataIsNotResponse(status);\n const { applicationStatus, applicationSignStatus } = status;\n const actions: Action<'start-signing' | 'documents'>[] = [];\n if (applicationStatus && applicationStatus.Status == N2ApplicationStatus.ReadyForSigning) {\n const state = getSignatureState(applicationSignStatus);\n \n actions.push({\n name: t(`signature.actions.start-signing.${state}.title`),\n parameter: 'start-signing',\n state,\n description: ``,\n iconName: 'signIcon',\n });\n }\n if (documentStatus && documentStatus.length) {\n const state = getDocumentationState(documentStatus);\n actions.push({\n name: t(`signature.actions.documents.${state}.title`),\n description: t(`signature.actions.documents.${state}.description`),\n parameter: 'documents',\n state,\n iconName: 'multipleDocumentIcon',\n });\n }\n\n return actions;\n}\n\nfunction getSignatureState(signStatus?: ApplicationSignStatusModel | null): ActionState {\n if (!signStatus) {\n return 'invalid';\n }\n return signStatus.MainApplicantHasSigned ? 'final' : 'ready';\n}","import { ApplicationPaths } from '@n2-common/applicationPages/ApplicationFormsHelpers';\nimport { getRedirectUrl } from '@n2-common/applicationPages/applicationStatusHelpers';\nimport { assertDataIsNotResponse } from '@n2-common/asserts';\nimport { getApplicationIds } from '@n2-common/components/ApplicationContext';\nimport { ApplicationStatusModel } from '@n2-common/serverGeneratedTypings/applicationStatusModel';\nimport { N2ApplicationStatus } from '@n2-common/serverGeneratedTypings/n2ApplicationStatus';\nimport { N2Product } from '@n2-common/serverGeneratedTypings/n2Product';\nimport { getApplicationDocumentStatus, getApplicationSignStatus, getApplicationStatus } from '@n2-common/services/legacyApplicationApiService';\nimport { logErrorToServerside } from '@n2-common/services/serverSideLogging';\nimport { generatePath, LoaderFunctionArgs, redirect, useLoaderData } from 'react-router-dom';\n\nexport async function signPageLoader({ request }: LoaderFunctionArgs) {\n const { applicantId, applicationId } = await getApplicationIds(request);\n\n if (applicantId === null || applicationId === null) {\n return redirect(generatePath(ApplicationPaths.error));\n }\n try {\n const applicationStatus = await getApplicationStatus(applicationId, applicantId, request.signal);\n\n if (!readyForSignPage(applicationStatus)) {\n return redirect(getRedirectUrl(applicationStatus, applicantId));\n }\n\n const [documentStatus, applicationSignStatus] = await Promise.all([\n getApplicationDocumentStatus(applicationId, applicantId, request.signal),\n getApplicationSignStatus(applicationId, request.signal),\n ]);\n\n return { applicantId, applicationId, applicationStatus, documentStatus, applicationSignStatus };\n } catch (err) {\n logErrorToServerside(`Error loading data for SignPage.`, applicationId, applicantId, err || {});\n return redirect(generatePath(ApplicationPaths.error));\n }\n}\nexport type SignLoaderData = Awaited>;\n\nexport function useSignPageLoaderData() {\n const data = useLoaderData() as SignLoaderData;\n assertDataIsNotResponse(data);\n return data;\n}\n\nfunction readyForSignPage(applicationStatus: ApplicationStatusModel) {\n if (applicationStatus.Product !== N2Product.Deposit) {\n return false;\n }\n if (![N2ApplicationStatus.ReadyForSigning].includes(applicationStatus.Status)) {\n return false;\n }\n if (applicationStatus.IsMainApplicant) {\n return !applicationStatus.ApplicantCddPending;\n }\n return true;\n}\n","import { ActionList, Button, ButtonRowContainer, Headline, Hero, Paragraph } from '@n2-common/ui';\nimport { ApplicationSignContextProps } from '@n2-common/components/Sign/SignCommon';\nimport { getActions } from './actions';\nimport { Dispatch, SetStateAction, useEffect, useLayoutEffect, useMemo, useState } from 'react';\nimport { SubmitProgressBox, type SubmitProgressBoxProps } from '@n2-common/ui/SubmitProgress';\nimport { ApplicationPaths, navigateToStep } from '@n2-common/applicationPages/ApplicationFormsHelpers';\nimport { NavigateFunction, useNavigate } from 'react-router-dom';\nimport { useSignPageLoaderData } from './loader';\nimport { useTranslation } from 'react-i18next';\nimport { TFunction } from 'i18next';\nimport { startDepositSigning } from '@n2-common/services/legacyApplicationApiService';\nimport { O1DocumentationContextProvider, useDocumentationContext } from '@n2-common/components/UploadDocuments';\nimport { trackCoreBankEvent, trackSectionView } from '@n2-common/lib/gtm';\nimport { useApplicationIdContext } from '@n2-common/components/ApplicationContext';\nimport { CmsNotification } from '@n2-common/components';\nimport { logInfoToServerSide } from '@n2-common/services/serverSideLogging';\nexport * from './loader';\n\ntype ActionDispatcher = (actionType: ReturnType[number]['parameter']) => void;\n\nexport function SignaturePage(): JSX.Element {\n return (\n \n \n \n );\n}\nexport function SignatureComponent(): JSX.Element {\n\n const navigate = useNavigate();\n const { t } = useTranslation(['deposit', 'common']);\n const status = useSignPageLoaderData();\n const { requirements } = useDocumentationContext();\n const { country } = useApplicationIdContext();\n const actions = useMemo(() => getActions(status, requirements, t), [requirements, status, t]);\n const showComplete = useMemo(() => actions.every((a) => ['final', 'completed'].includes(a.state)), [actions]);\n const [processing, setProcessing] = useState();\n const dispatch = useMemo(() => getDispatcher(navigate, status, setProcessing, t), [navigate, status, t]);\n\n useEffect(() => {\n trackSectionView('SA', country, '4.0', 'Sign Overview');\n }, [country, t]);\n \n useEffect(() => {\n if(showComplete) {\n trackCoreBankEvent('SA', country, 'application_complete',\n undefined, status.applicationStatus.ApplicationId, status.applicationStatus?.IsAgentApplication);\n logInfoToServerSide(`All steps completed`, status.applicationId, status.applicantId);\n }\n }, [country, showComplete, status]);\n \n\n useLayoutEffect(() => {\n document.title = t('signature.title');\n\n }, [t]);\n\n return (\n <> \n\n {t('signature.headline')}\n {t('signature.description')}\n \n \n \n {showComplete && (\n <>\n {t('common:Sign.AllDone')}\n \n \n navigateToStep(ApplicationPaths.applicantActionsCompleted, status.applicationId, navigate, status.applicantId)\n }\n >\n {t('common:Sign.Complete')}\n \n \n \n )}\n\n {processing && }\n \n );\n}\n\nfunction getDispatcher(\n navigate: NavigateFunction,\n status: Partial,\n setProgress: Dispatch>,\n t: TFunction\n) {\n const dispatch: ActionDispatcher = (actionType) => {\n const { applicantId, applicationId } = status;\n if (!applicantId || !applicationId) {\n return navigate(ApplicationPaths.error);\n }\n switch (actionType) {\n case 'start-signing':\n {\n setProgress({\n processingText: t('signature.actions.start-signing.progress.processingText'),\n state: 'Processing',\n submitText: t('signature.actions.start-signing.progress.submitText'),\n });\n startDepositSigning(applicationId, applicantId).then(\n (result) => {\n setProgress(undefined);\n location.replace(result.Url);\n },\n () => {\n navigateToStep(ApplicationPaths.error, applicationId, navigate, applicantId);\n }\n );\n }\n break;\n case 'documents':\n navigateToStep(ApplicationPaths.uploadDocuments, applicationId, navigate, applicantId);\n break;\n\n default:\n throw new Error(`Action '${actionType}' is not implemented`);\n }\n };\n return dispatch;\n}\n","import { createHashRouter, NavigateFunction, RouterProvider } from 'react-router-dom';\nimport { ApplicationStatusModel } from '../../common/serverGeneratedTypings/applicationStatusModel';\nimport ApplicantActionsCompletedPage from '../../common/applicationPages/ApplicantActionsCompletedPage';\nimport CanceledPage from '../../common/applicationPages/CanceledPage';\nimport CompletedPage from '../../common/applicationPages/CompletedPage';\nimport DeclinedPage from '../../common/applicationPages/DeclinedPage';\nimport { CddPage, LoadApplicationPage, SblCompleted } from '../../common/applicationPages';\nimport ErrorPage from '../../common/applicationPages/ErrorPage';\nimport NotFoundPage from '../../common/applicationPages/NotFoundPage';\n\nimport { SignCompletedPage } from '../../common/applicationPages/SignCompleted';\n\nimport { UploadDocumentsPage } from '../../common/applicationPages/UploadDocuments';\nimport { ReactRouterErrorBoundary } from '../../common/applicationPages/ReactRouterErrorBoundary';\nimport { navigateToStep, ApplicationPaths } from '../../common/applicationPages/ApplicationFormsHelpers';\nimport { PageLayout } from '../../common/applicationPages/AppBase/AppBase';\n\nimport InProgressPage from '../../common/applicationPages/InProgressPage';\nimport { N2Product } from '@n2-common/serverGeneratedTypings/n2Product';\n\nimport { commonNavigateToCorrectStepForSingleApplicantProducts } from '@n2-common/applicationPages/applicationStatusHelpers';\nimport WizardApp from './pages/Application';\nimport { Offer, offerPageLoader } from './pages/Offer';\nimport { SignaturePage, signPageLoader } from './pages/Sign';\n\nexport const navigateToCorrectStep = (application: ApplicationStatusModel, applicantId: string, navigate: NavigateFunction) => {\n if (application.Product !== N2Product.Deposit) {\n console.log('product is not deposit, navigating to notfound');\n navigateToStep(ApplicationPaths.notFound, application.ApplicationId, navigate, applicantId);\n return;\n }\n\n return commonNavigateToCorrectStepForSingleApplicantProducts(application, applicantId, navigate);\n};\ntype AppProps = { antiforgeryToken: string | undefined; country: Country };\n\nexport const App = ({ antiforgeryToken, country }: AppProps) => {\n const depositRouter = createHashRouter([\n {\n element: ,\n children: [\n {\n path: ApplicationPaths.wizard,\n element: ,\n },\n {\n path: ApplicationPaths.offer,\n loader: offerPageLoader,\n element: ,\n },\n {\n path: ApplicationPaths.cdd,\n element: (\n {\n navigateToStep(ApplicationPaths.sign, applicationStatus.ApplicationId, navigate, applicantId);\n }}\n navigateToCorrectStepFunc={navigateToCorrectStep}\n />\n ),\n },\n\n {\n path: ApplicationPaths.sign,\n loader: signPageLoader,\n element: ,\n },\n /* {\n path: ApplicationPaths.signDetails,\n element: \n },*/\n {\n path: ApplicationPaths.signCompleted,\n element: ,\n },\n {\n path: ApplicationPaths.sblCompleted,\n element: ,\n },\n {\n path: ApplicationPaths.uploadDocuments,\n element: ,\n },\n {\n path: ApplicationPaths.applicantActionsCompleted,\n element: ,\n },\n {\n path: ApplicationPaths.declined,\n element: ,\n },\n {\n path: ApplicationPaths.declinedFromAgent,\n element: ,\n },\n {\n path: ApplicationPaths.canceled,\n element: ,\n },\n {\n path: ApplicationPaths.completed,\n element: ,\n },\n {\n path: ApplicationPaths.error,\n element: ,\n },\n {\n path: ApplicationPaths.notFound,\n element: ,\n },\n {\n path: ApplicationPaths.inProgress,\n element: ,\n },\n {\n path: ApplicationPaths.loadApplication,\n element: ,\n },\n ],\n errorElement: ,\n },\n ]);\n\n return (\n <>\n \n \n );\n};\n","import './i18n';\nimport CookieConsent from '@n2-common/components/CookieConsent';\nimport React from 'react';\nimport ReactDOM from 'react-dom/client';\n\nimport { App } from './App';\n\nconst rootEl = document.getElementById('root');\nif (!rootEl) {\n throw new Error(\"Missing root element with id='root' in DOM\");\n}\n//const model = JSON.parse(rootEl.dataset.model || \"{}\");\nconst country = rootEl.dataset.country as Country;\n\n//loadGtm(window.document.getElementById('head')?.dataset.gtmid || '');\nReactDOM.createRoot(rootEl as HTMLElement).render(\n \n \n \n \n);\n"],"names":["runtime","getRuntime","i18next","initReactI18next","HttpApi","DocumentLanguageDetector","cleanup","values","initialValues","resolveStages","emailRequired","EmailInput","swedishPhoneNumber","PhoneNumberInput","swedishNationalId","SwedishSsnInput","stringRequired","props","jsx","FormikSelect","addPleaseSelectOption","employmentStatusCodeSe","config","norwegianPhoneNumber","nationalId.norwegianNationalId","NationalIdInput","employmentStatusCodeNo","WizardApp","country","productType","useApplicationIdContext","t","useTranslation","navigate","useNavigate","setErrorMessage","ErrorOutput","useDismissableErrorMessage","gpid","setGpid","useState","useLayoutEffect","useEffect","trackCoreBankEvent","trackEcommerceEvent","useMemo","configSE","configNO","stages","isSubmitting","setIsSubmitting","onSsnStepFinished","useCallback","cleanedValues","res","submitSsnToGetGpid","err","submit","setSubmitState","postLoanApplication","model","status","pollForExpectedApplicationState","N2ApplicationStatus","navigateToStep","ApplicationPaths","N2ApplicationStatusToECommerceStatus","N2MajorApplicationStatus","applicantIdModel","getApplicatId","navigateToCorrectStep","action","errorToAction","jsxs","Fragment","Headline","MultiStageOnePageWizard","offerPageLoader","request","applicantId","applicationId","getApplicationIds","redirect","generatePath","applicationStatus","getApplicationStatus","readyForOffer","getRedirectUrl","logErrorToServerside","N2Product","Offer","handleNext","trackSectionView","Paragraph","ButtonRowContainer","Button","getActions","documentStatus","assertDataIsNotResponse","applicationSignStatus","actions","state","getSignatureState","getDocumentationState","signStatus","signPageLoader","readyForSignPage","getApplicationDocumentStatus","getApplicationSignStatus","useSignPageLoaderData","data","useLoaderData","SignaturePage","O1DocumentationContextProvider","SignatureComponent","requirements","useDocumentationContext","showComplete","a","processing","setProcessing","dispatch","getDispatcher","_a","logInfoToServerSide","CmsNotification","ActionList","Hero","SubmitProgressBox","setProgress","actionType","startDepositSigning","result","application","commonNavigateToCorrectStepForSingleApplicantProducts","App","antiforgeryToken","depositRouter","createHashRouter","PageLayout","CddPage","SignCompletedPage","SblCompleted","UploadDocumentsPage","ApplicantActionsCompletedPage","DeclinedPage","CanceledPage","CompletedPage","ErrorPage","NotFoundPage","InProgressPage","LoadApplicationPage","ReactRouterErrorBoundary","RouterProvider","rootEl","ReactDOM","React","CookieConsent"],"mappings":"izCAMA,MAAMA,GAAUC,GAAW,EAE3BC,GACK,IAAIC,EAAgB,EACpB,IAAIC,EAAO,EACX,IAAIC,EAAwB,EAC5B,KAAK,CACF,cAAe,CAAE,YAAa,EAAM,EACpC,MAAO,GACP,GAAI,CAAC,SAAU,aAAc,SAAS,EACtC,QAAS,CACL,SAAU,8CAAyEL,GAAQ,KAAK,EACpG,EACA,YAAa,IACjB,CAAC,ECFL,SAASM,GAAQC,EAAyD,CAC/D,OAAAA,CACX,CAEA,MAAMC,GAA4B,CAAE,UAAW,CAAI,EAAA,SAAU,CAAG,CAAA,EAEhE,SAASC,GAAc,EAAyC,CACrD,MAAA,CACH,CACI,OAAQ,GACR,uBAAwB,sBACxB,OAAQ,CACJ,CACI,KAAM,kBACN,WAAYC,EAAc,CAAC,EAC3B,eAAgB,CACZ,MAAO,cACX,EACA,UAAWC,CACf,EACA,CACI,KAAM,wBACN,WAAYC,GAAmB,CAAC,EAChC,eAAgB,CACZ,MAAO,aACX,EACA,UAAWC,CACf,EACA,CACI,KAAM,uBACN,WAAYC,GAAkB,EAC9B,eAAgB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