@adyen/kyc-components 3.71.2 → 3.72.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (132) hide show
  1. package/dist/{AcceptTermsOfServiceComponent-DMzlz5ur.js → AcceptTermsOfServiceComponent-Bt8sRAoc.js} +2 -2
  2. package/dist/{AccountSetupRejected-B_ll-DYK.js → AccountSetupRejected-BwL6Q3-7.js} +3 -3
  3. package/dist/{BusinessDetailsDropin--GT26UUf.js → BusinessDetailsDropin-z-LBYatN.js} +195 -98
  4. package/dist/BusinessFinancingPage-BZ0ukckI.js +35 -0
  5. package/dist/{BusinessTypeSelection-DrKppT76.js → BusinessTypeSelectionPage-Bl0fkgrq.js} +46 -40
  6. package/dist/{CXEL7IU7-BadU4Quy.js → CXEL7IU7-BDgMbrmd.js} +3 -3
  7. package/dist/{CreateIndividualComponent-Cw8jncCj.js → CreateIndividualComponent-BYcoaXRs.js} +257 -370
  8. package/dist/{CustomerSupport-hGFkG8i3.js → CustomerSupport-C1aqVIO5.js} +3 -3
  9. package/dist/{DebugModal-DWrh3Luo.js → DebugModal-sw85K_ur.js} +11 -10
  10. package/dist/DecisionMakerDetailsPage-uOytW22H.js +80 -0
  11. package/dist/{DecisionMakers-DEspQGcu.js → DecisionMakers-CCWH6S3m.js} +5 -5
  12. package/dist/{EmbedShell-B_11fu1C.js → EmbedShell-n61dt-oX.js} +3 -3
  13. package/dist/{EventEmitter-Bq8xlXVA.js → EventEmitter-D4j8YPMw.js} +897 -1119
  14. package/dist/{HASRA6WW-CzhpDwYQ.js → HASRA6WW-c_NjaqBL.js} +2 -2
  15. package/dist/{I3HPI4QX-DYJ1Uod-.js → I3HPI4QX-7hHBw-hy.js} +3 -3
  16. package/dist/{Introduction-ocOgetqy.js → Introduction-BIciUCV2.js} +14 -6
  17. package/dist/LegalRepresentativeDetailsPage-B5NB1_0c.js +55 -0
  18. package/dist/PayoutDetailsPage-csmuS7XY.js +57 -0
  19. package/dist/{Review-dujxCIfE.js → Review-OUouKkBK.js} +3 -3
  20. package/dist/RootBusinessDetailsPage-8GCh8CZ9.js +43 -0
  21. package/dist/RootIndividualDetailsPage-zZl4WLcr.js +71 -0
  22. package/dist/{SingpassSelection-BF6kWg3g.js → SingpassSelection-DZx1cQy-.js} +2 -2
  23. package/dist/SoleProprietorshipPage-WVtWeQL6.js +45 -0
  24. package/dist/{SourceOfFunds.module-caoQ--io.js → SourceOfFunds.module-3s3uanVF.js} +2 -2
  25. package/dist/{SourceOfFundsDropin-Bhk41z_b.js → SourceOfFundsPage-6mejBSsi.js} +38 -20
  26. package/dist/{TaskItemStatus-PMtq1Pi9.js → TaskItemStatus-BTND6V1w.js} +2 -2
  27. package/dist/{TaxReportingDropin-zwlu6qxX.js → TaxReportingDropin-Canpx2fK.js} +5 -5
  28. package/dist/{TrustOuter-BsEoJkzE.js → TrustDetailsPage-DSDYwyW0.js} +17 -29
  29. package/dist/TrustMemberCompanyPage-D7V4OAf4.js +55 -0
  30. package/dist/TrustMemberIndividualPage-C9zoI3NZ.js +60 -0
  31. package/dist/UnincorporatedPartnershipIndividualPage-BKEuBPUD.js +60 -0
  32. package/dist/UnincorporatedPartnershipMemberCompanyPage-Ij6N40YA.js +58 -0
  33. package/dist/adyen-kyc-components.js +1 -1
  34. package/dist/adyenConfig.js +2 -2
  35. package/dist/{bg-BG-CzEF3tzV.js → bg-BG-CZRQZyXO.js} +12 -5
  36. package/dist/{core-BGMNir1l.js → core-C1rJ5Pjl.js} +687 -573
  37. package/dist/{cs-CZ-TMjslGp_.js → cs-CZ-BbUFgifZ.js} +12 -5
  38. package/dist/{css-DB40kUpv.js → css-FlY03KiS.js} +2 -2
  39. package/dist/{da-DK-DWzvDWZJ.js → da-DK-CP71BFS7.js} +12 -5
  40. package/dist/{de-DE-BtIL-7gp.js → de-DE-DY56JGZt.js} +12 -5
  41. package/dist/{el-GR-DHSSlqbw.js → el-GR-CnENEp5c.js} +12 -5
  42. package/dist/{es-ES-OwkE9-Cu.js → es-ES-dV62vQcV.js} +28 -21
  43. package/dist/{et-EE-DvixWnLd.js → et-EE-BBgAN3Wc.js} +12 -5
  44. package/dist/{fi-FI-DZiXWe_g.js → fi-FI-DVmGWIxn.js} +12 -5
  45. package/dist/{fr-FR-BBwiWhiT.js → fr-FR-VwG8Rg7R.js} +12 -5
  46. package/dist/{hr-HR-DJYofWKU.js → hr-HR-Bs_lxjxQ.js} +12 -5
  47. package/dist/{hu-HU-k9c6wZld.js → hu-HU-8dVSiOZM.js} +12 -5
  48. package/dist/individual.js +4 -4
  49. package/dist/{it-IT-oOwbWW3K.js → it-IT-DvwWMDl1.js} +12 -5
  50. package/dist/{ja-JP-CT3g8Hhn.js → ja-JP-BB6zzyEg.js} +12 -5
  51. package/dist/{json-BfjwC9Z8.js → json-C0fKu7KI.js} +2 -2
  52. package/dist/{lt-LT-CVHIsEF8.js → lt-LT-BQtNojlb.js} +12 -5
  53. package/dist/{lv-LV-BFx0cvZ2.js → lv-LV-BpEw5uN5.js} +12 -5
  54. package/dist/{nl-NL-rmSZu4Rf.js → nl-NL-vBEBXTP-.js} +12 -5
  55. package/dist/{no-NO-BOnQvimN.js → no-NO-BFhTqUoD.js} +12 -5
  56. package/dist/{pl-PL-5j22An4E.js → pl-PL-dsGZvzVf.js} +12 -5
  57. package/dist/{plaintext-cxU_oLhE.js → plaintext-VVpKsKsN.js} +2 -2
  58. package/dist/{pt-PT-DP8U1qyu.js → pt-PT-BB38pZbh.js} +12 -5
  59. package/dist/{ro-RO-BTdtoC6P.js → ro-RO-BgxNxoxJ.js} +12 -5
  60. package/dist/{sk-SK-DYTx4mOB.js → sk-SK-rtDeCztl.js} +12 -5
  61. package/dist/{sl-SI-D8CiUN69.js → sl-SI-qoGCwUdU.js} +12 -5
  62. package/dist/style.css +175 -223
  63. package/dist/styles-CLV89_hH.js +175 -223
  64. package/dist/{sv-SE-Daslxeqr.js → sv-SE-f1T7PBSW.js} +12 -5
  65. package/dist/terms-of-service.js +4 -4
  66. package/dist/types/api/transferInstruments/useTransferInstrument.d.ts +2 -1
  67. package/dist/types/components/BankAccount/forms/BankDocument/types.d.ts +2 -0
  68. package/dist/types/components/BankAccount/forms/PayoutDetails/types.d.ts +2 -5
  69. package/dist/types/components/BankAccount/forms/PayoutVerificationMethod/types.d.ts +1 -11
  70. package/dist/types/components/BankAccount/pages/PayoutDetailsPage.d.ts +14 -0
  71. package/dist/types/components/BankAccount/tasks/PayoutDetailsDropin/PayoutDetailsDropin.d.ts +1 -1
  72. package/dist/types/components/BankAccount/tasks/PayoutDetailsDropin/payoutDetailsFormConfig.d.ts +12 -1
  73. package/dist/types/components/Business/forms/BusinessDetails/forms.d.ts +14 -0
  74. package/dist/types/components/Business/forms/BusinessDetails/types.d.ts +1 -0
  75. package/dist/types/components/Business/forms/ProofOfOwnershipDocument/ProofOfOwnershipDocument.d.ts +2 -0
  76. package/dist/types/components/Business/forms/ProofOfOwnershipDocument/types.d.ts +8 -0
  77. package/dist/types/components/Business/forms/rules.d.ts +0 -1
  78. package/dist/types/components/Business/mapping/businessDetails/businessDetailsKeyMappings.d.ts +1 -1
  79. package/dist/types/components/Business/mapping/businessDetails/solePropBusinessDetailsKeyMappings.d.ts +1 -1
  80. package/dist/types/components/Business/pages/RootBusinessDetailsPage.d.ts +8 -0
  81. package/dist/types/components/Business/tasks/BusinessDetailsDropin/types.d.ts +1 -3
  82. package/dist/types/components/EFP/pages/BusinessFinancingPage.d.ts +7 -0
  83. package/dist/types/components/EFP/pages/SourceOfFundsPage.d.ts +7 -0
  84. package/dist/types/components/EmbeddedDropins/OnboardingDropinComponent/DropinComposer/DropinComposer.d.ts +1 -1
  85. package/dist/types/components/Individual/forms/Individual/IdDocumentUpload/types.d.ts +1 -0
  86. package/dist/types/components/Individual/forms/Individual/IdVerificationMethod/IdVerificationMethod.d.ts +0 -1
  87. package/dist/types/components/Individual/forms/IndividualOnfido/IdVerificationMethod/IdVerificationMethod.types.d.ts +0 -2
  88. package/dist/types/components/Individual/forms/IndividualOnfido/IndividualOnfido.types.d.ts +2 -1
  89. package/dist/types/components/Individual/pages/DecisionMakerDetailsPage.d.ts +20 -0
  90. package/dist/types/components/Individual/pages/LegalRepresentativeDetailsPage.d.ts +12 -0
  91. package/dist/types/components/Individual/pages/RootIndividualDetailsPage.d.ts +16 -0
  92. package/dist/types/components/Individual/tasks/DecisionMakers/types.d.ts +0 -2
  93. package/dist/types/components/Shared/Introduction/Introduction.d.ts +4 -2
  94. package/dist/types/components/Shared/forms/Address/utils.d.ts +1 -1
  95. package/dist/types/components/Shared/forms/BusinessTypeSelection/BusinessTypeSelection.d.ts +1 -1
  96. package/dist/types/components/Shared/forms/BusinessTypeSelection/types.d.ts +3 -5
  97. package/dist/types/components/Shared/forms/DocumentUpload/DocumentUpload.d.ts +1 -1
  98. package/dist/types/components/Shared/forms/DocumentUpload/types.d.ts +5 -0
  99. package/dist/types/components/Shared/pages/BusinessTypeSelectionPage.d.ts +2 -0
  100. package/dist/types/components/Shared/tasks/TaskList/TaskList.d.ts +7 -1
  101. package/dist/types/components/Shared/tasks/TaskList/types.d.ts +0 -6
  102. package/dist/types/components/Shared/tasks/TaskList/utils.d.ts +2 -1
  103. package/dist/types/components/SoleProprietorship/pages/SoleProprietorshipPage.d.ts +8 -0
  104. package/dist/types/components/Trust/pages/TrustDetailsPage.d.ts +10 -0
  105. package/dist/types/components/Trust/pages/TrustMemberCompanyPage.d.ts +11 -0
  106. package/dist/types/components/Trust/pages/TrustMemberIndividualPage.d.ts +16 -0
  107. package/dist/types/components/Trust/pages/TrustMemberRoleAndTypePage.d.ts +9 -0
  108. package/dist/types/components/Trust/tasks/TrustMembers/TrustMembersOverview.d.ts +4 -7
  109. package/dist/types/components/UnincorporatedPartnership/hooks/useUnincorporatedPartnershipNavigation.d.ts +0 -2
  110. package/dist/types/components/UnincorporatedPartnership/pages/UnincorporatedPartnershipIndividualPage.d.ts +16 -0
  111. package/dist/types/components/UnincorporatedPartnership/pages/UnincorporatedPartnershipMemberCompanyPage.d.ts +11 -0
  112. package/dist/types/components/UnincorporatedPartnership/pages/UnincorporatedPartnershipMemberRoleAndTypePage.d.ts +8 -0
  113. package/dist/types/components/UnincorporatedPartnership/tasks/UnincorporatedPartnershipMembers/UnincorporatedPartnershipMembersOverview.d.ts +1 -5
  114. package/dist/types/components/UnincorporatedPartnership/tasks/UnincorporatedPartnershipRoleAndType/UnincorporatedPartnershipRoleAndType.d.ts +1 -1
  115. package/dist/types/components/ui/molecules/Dropzone/types.d.ts +1 -0
  116. package/dist/types/context/ExperimentContext/types.d.ts +11 -6
  117. package/dist/types/core/models/api/document.d.ts +1 -1
  118. package/dist/types/hooks/useDataConflicts.d.ts +1 -5
  119. package/dist/types/stores/globalStore/calculateTaskStatus.d.ts +3 -1
  120. package/dist/types/stores/globalStore/taskTypes.d.ts +0 -1
  121. package/dist/types/utils/country.d.ts +3 -2
  122. package/dist/types/utils/entityStatusUtil.d.ts +1 -1
  123. package/dist/types/utils/getDisplayErrorMessage.d.ts +3 -0
  124. package/dist/{utils-CxEv8UGu.js → utils-DD_s-Xlo.js} +1 -1
  125. package/dist/{utils-9cd3ykqp.js → utils-UcNoMAHV.js} +4 -4
  126. package/dist/{yaml-BGFeLEJY.js → yaml-BipFvPsw.js} +2 -2
  127. package/package.json +1 -1
  128. package/dist/types/components/BankAccount/forms/PayoutDetails/utils.d.ts +0 -2
  129. package/dist/types/components/BankAccount/forms/PayoutVerificationMethod/PreferInstantVerificationMethod/PreferInstantVerificationMethod.d.ts +0 -22
  130. package/dist/types/components/Individual/forms/Individual/IndividualOuter.d.ts +0 -26
  131. package/dist/types/components/Trust/tasks/TrustDropin/TrustOuter.d.ts +0 -10
  132. package/dist/types/components/ui/atoms/List/List.d.ts +0 -9
@@ -2,14 +2,14 @@
2
2
  {
3
3
  try {
4
4
  let e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
5
- n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "9b17ef06-174b-4801-b24d-b3c029ee2ae7", e._sentryDebugIdIdentifier = "sentry-dbid-9b17ef06-174b-4801-b24d-b3c029ee2ae7");
5
+ n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "d0f03303-f73a-42ce-931e-707dc0a82420", e._sentryDebugIdIdentifier = "sentry-dbid-d0f03303-f73a-42ce-931e-707dc0a82420");
6
6
  } catch (e) {
7
7
  }
8
8
  }
9
9
  ;
10
10
  import { jsx, jsxs, Fragment } from "preact/jsx-runtime";
11
- import { m as useApiContext, a5 as useMutation, a4 as httpPost, U as useInvalidateRootLegalEntity, a6 as useQueryClient, at as createLogger, bp as TrustedFieldsProvider, bM as businessDetailsApiKeyMapping, bN as individualApiKeyMapping, aa as keysOf, bO as remediationHasFileUploadField, bP as dataMissingRemediationsToFieldsMap, a2 as useLegalEntity, ay as skipToken, a as useAnalyticsContext, s as summaryStep, p as useQuery, q as httpGet, ac as CountryCodes, aN as useSignalValue, bQ as AdyenKycSdkError, bR as payoutAccountFormat, bS as FormRouterContext, ae as TaskTypes, bT as remediationPayoutApiKeyMapping, bU as remediationBusinessDetailsApiKeyMapping, bV as remediationIndividualApiKeyMapping, h as drop, aW as TrustMemberTypes, i as LegalEntityType, ad as getLegalEntityNameBasedOnType, bb as getOwnEntityAssociations, am as ROOT_LE, b as useExperimentsContext, bl as mapEntityAssociationsToUnincorporatedPartnershipMembers, af as getCapabilityProblems, a3 as getLegalEntityCountry, bW as FormContext, aB as isPartOfTrustFromLegalEntity, aC as hasSolePropInLegalEntity, bX as individualComponentsKeyMapping, bY as businessDetailsComponentsKeyMapping, o as objectsDeepEqual, bZ as ValidationResult, b_ as isNotEmptyValidator, k as isEmpty, b$ as hasText, c0 as matchesRegex, c1 as trimValWithOneSpace, c2 as NO_ALPHABET_REGEX, c3 as EMOJI_REGEX, c4 as hasRepeatedCharacters, c5 as isInvalidName, c6 as INDIVIDUAL_VALID_CHAR_REGEX, c7 as getFormattingRegEx, c8 as SPECIAL_CHARS, u as useI18nContext, M as MaybeModal, L as LoaderWrapper, g as Summary, B as Button, ar as IconButton, as as Confirm, an as httpDelete, c9 as getLocalizedIdDocumentTypeOptions, ca as isNewlyUploadedFile, cb as getNestedPropertyKeys, j as cloneObject, cc as isValueObscured, cd as isTruthyValidator, ce as emailPattern, aY as resolveFieldMetadata, cf as getSSNType, cg as defaultFieldMetadata, ch as defaultFieldConfig, ci as defaultFieldMetadata$1, cj as fieldConfig, ck as defaultFieldMetadata$2, cl as defaultFieldConfig$1, cm as getAgeToday, cn as euCountries, co as DecisionMakerType, a7 as createFormRules, cp as allowedCountriesForNominee, N as getAddressSchemaForCountry, O as COUNTRIES_WITH_STATES_DATASET, cq as Scenarios, r as reverseMapping, cr as getNomineeFromAssociation, aG as useAccountHolder, W as useToastContext, Y as useSettingsContext, cs as useProviderStatus, _ as getAssociatedLeAnalyticsPayload, ct as addressValidators, cu as getAsyncIdNumberValidationRule, cv as getAsyncPhoneValidationRules, cw as addressFormatters, cx as setHasMotionCaptureScenario, cy as individualDocumentMapping, cz as individualForms, cA as showIndividualMotionCapture, cB as getAllowedDecisionMakerRoles, V as datasetUtilities, cC as Individual, cD as individualObscuredFields, cE as filterOutUnwantedAssociationsIfRootLE, cF as mapAddressLabels, cG as individualDocumentForms, l as localizeDateString, cH as hasNomineesChanged, cI as attachNomineeToRole, cJ as idVerificationProviderId, cK as doArraysMatch, cL as getAvailableDecisionMakerRoleTypes, F as Field, t as Select, cM as licenseCardNumberDefaultMetadata, cN as licenseCardNumberDefaultConfig, aX as mergeFieldMetadataIntoProps, J as createFormUtils, cO as useFormContext, a$ as getFieldProps, cP as idNumberFields, cQ as IdentityNumber, cR as additionallIdNumberOptions, cS as MaskedInput, y as InputDate, cT as formatDateObj, cU as DriversLicense, cV as addressFields, bu as useAllowedCountries, cW as getDefaultTaxIdNumberType, b1 as FormHeader, H as ErrorPanel, T as Typography, b7 as CountryField, P as Address, Q as getAddressSchemaLabelsByCountry, cX as IndividualIdNumberTypeSelector, cY as TaxInformationField, cZ as PatriotActDisclosure, b0 as nameFields, c_ as decisionMakerRoleFields, c$ as nomineeFields, d0 as contactDetailFields, ao as Alert, bj as ContextGuidance, d1 as DecisionMakerRole, d2 as NomineeDecisionMakerRole, b6 as Name, I as InputText, d3 as ContactDetails, d4 as isEmpty$1, d5 as RadioWithLabel, ai as Modal, v as Link, d6 as Svg, d7 as pick, d8 as IdVerification, S as Spacer, au as useDataset, av as datasetIdentifier, a0 as Loader, aA as ProviderButton, d9 as IdDocumentManualUpload, da as useId, a1 as Icon, db as KEYBOARD_KEYS, aK as noop, dc as idDocumentUploadFields, dd as useFormRouterContext, $ as getFormProps, de as useCapabilities, df as setShowIndividualMotionCapture, dg as shouldShowMotionCapture, dh as hasMotionCaptureScenario, di as MemoizedProofOfRelationship, dj as MemoizedDocumentUpload, dk as MemoizedProofOfResidencyUpload, aH as EntityType } from "./EventEmitter-Bq8xlXVA.js";
12
- import { useMemo, useState, useEffect, useCallback, useReducer, useRef } from "preact/hooks";
11
+ import { m as useApiContext, a5 as useMutation, a4 as httpPost, Q as useInvalidateRootLegalEntity, a7 as useQueryClient, au as createLogger, bo as TrustedFieldsProvider, bL as businessDetailsApiKeyMapping, bM as individualApiKeyMapping, ab as keysOf, bN as remediationHasFileUploadField, bO as dataMissingRemediationsToFieldsMap, a as useAnalyticsContext, s as summaryStep, p as useQuery, q as httpGet, ad as CountryCodes, aO as useSignalValue, bP as AdyenKycSdkError, bQ as payoutAccountFormat, bR as FormRouterContext, ah as TaskTypes, bS as remediationPayoutApiKeyMapping, bT as remediationBusinessDetailsApiKeyMapping, bU as remediationIndividualApiKeyMapping, bV as EEA_Countries, h as drop, a2 as useLegalEntity, ao as ROOT_LE, aj as getCapabilityProblems, a3 as getLegalEntityCountry, bW as FormContext, b as useExperimentsContext, aA as isPartOfTrustFromLegalEntity, i as LegalEntityType, aB as hasSolePropInLegalEntity, bX as individualComponentsKeyMapping, bY as businessDetailsComponentsKeyMapping, o as objectsDeepEqual, bZ as ValidationResult, b_ as isNotEmptyValidator, k as isEmpty, b$ as hasText, c0 as matchesRegex, c1 as trimValWithOneSpace, c2 as NO_ALPHABET_REGEX, c3 as EMOJI_REGEX, c4 as hasRepeatedCharacters, c5 as isInvalidName, c6 as INDIVIDUAL_VALID_CHAR_REGEX, c7 as getFormattingRegEx, c8 as SPECIAL_CHARS, u as useI18nContext, ak as Modal, T as Typography, B as Button, M as MaybeModal, L as LoaderWrapper, g as Summary, at as IconButton, ap as httpDelete, c9 as getLocalizedIdDocumentTypeOptions, ca as isNewlyUploadedFile, cb as getNestedPropertyKeys, j as cloneObject, cc as isValueObscured, cd as isTruthyValidator, ce as emailPattern, aZ as resolveFieldMetadata, cf as getSSNType, cg as defaultFieldMetadata, ch as defaultFieldConfig, ci as defaultFieldMetadata$1, cj as fieldConfig, ck as defaultFieldMetadata$2, cl as defaultFieldConfig$1, cm as getAgeToday, cn as euCountries, co as DecisionMakerType, a8 as createFormRules, cp as allowedCountriesForNominee, K as getAddressSchemaForCountry, N as COUNTRIES_WITH_STATES_DATASET, cq as Scenarios, r as reverseMapping, cr as getNomineeFromAssociation, aF as useAccountHolder, W as useToastContext, Y as useSettingsContext, cs as useProviderStatus, _ as getAssociatedLeAnalyticsPayload, ct as addressValidators, cu as getAsyncIdNumberValidationRule, cv as getAsyncPhoneValidationRules, cw as addressFormatters, cx as setHasMotionCaptureScenario, cy as individualForms, cz as showIndividualMotionCapture, cA as getAllowedDecisionMakerRoles, V as datasetUtilities, cB as Individual, cC as filterOutUnwantedAssociationsIfRootLE, cD as mapAddressLabels, cE as individualDocumentForms, l as localizeDateString, cF as individualDocumentMapping, cG as individualObscuredFields, aX as getOwnEntityAssociations, cH as hasNomineesChanged, cI as attachNomineeToRole, cJ as idVerificationProviderId, cK as doArraysMatch, cL as getAvailableDecisionMakerRoleTypes, F as Field, t as Select, cM as licenseCardNumberDefaultMetadata, cN as licenseCardNumberDefaultConfig, aY as mergeFieldMetadataIntoProps, H as createFormUtils, cO as useFormContext, b0 as getFieldProps, cP as idNumberFields, cQ as IdentityNumber, cR as additionallIdNumberOptions, cS as MaskedInput, y as InputDate, cT as formatDateObj, cU as DriversLicense, cV as addressFields, bt as useAllowedCountries, cW as getDefaultTaxIdNumberType, b2 as FormHeader, G as ErrorPanel, b8 as CountryField, O as Address, P as getAddressSchemaLabelsByCountry, v as Link, cX as IndividualIdNumberTypeSelector, cY as TaxInformationField, cZ as PatriotActDisclosure, b1 as nameFields, c_ as decisionMakerRoleFields, c$ as nomineeFields, d0 as contactDetailFields, aq as Alert, bj as ContextGuidance, d1 as DecisionMakerRole, d2 as NomineeDecisionMakerRole, b7 as Name, I as InputText, d3 as ContactDetails, d4 as Svg, d5 as isEmpty$1, d6 as RadioWithLabel, d7 as pick, d8 as IdVerification, S as Spacer, av as useDataset, aw as datasetIdentifier, a0 as Loader, d9 as IdDocumentManualUpload, da as useId, a1 as Icon, db as KEYBOARD_KEYS, aJ as noop, dc as idDocumentUploadFields, dd as useFormRouterContext, $ as getFormProps, de as useCapabilities, df as setShowIndividualMotionCapture, dg as shouldShowMotionCapture, dh as hasMotionCaptureScenario, di as MemoizedProofOfRelationship, dj as MemoizedDocumentUpload, dk as MemoizedProofOfResidencyUpload, aG as EntityType } from "./EventEmitter-D4j8YPMw.js";
12
+ import { useState, useEffect, useMemo, useCallback, useReducer, useRef } from "preact/hooks";
13
13
  import cx from "classnames";
14
14
  import { l as listToRecord } from "./listToRecord-CO3M1Q74.js";
15
15
  const createLegalEntity = async (legalEntityId, baseUrl, data) => {
@@ -94,7 +94,7 @@ const addLinkedFields = (fields) => {
94
94
  }
95
95
  return [...new Set(withLinkedFields)];
96
96
  };
97
- const logger$a = createLogger();
97
+ const logger$9 = createLogger();
98
98
  const composePerScenarioFormConfigurations = (scenarios = [], configurations) => scenarios.reduce(
99
99
  (composedConfiguration, scenarioName) => ({
100
100
  ...composedConfiguration,
@@ -126,7 +126,7 @@ const evaluateRules = (fieldSettings, customRules) => {
126
126
  default: {
127
127
  const ruleFn = customRules[ruleName];
128
128
  if (!ruleFn) {
129
- logger$a.error(`Rule with name '${ruleName}' is not defined`);
129
+ logger$9.error(`Rule with name '${ruleName}' is not defined`);
130
130
  return () => void 0;
131
131
  }
132
132
  return ruleFn;
@@ -246,26 +246,6 @@ const isFieldRequiredToRemediateDataMissingError = (formId, field, dataMissingEr
246
246
  const getFormTrustedFields = (formId, trustedFields) => trustedFields.filter((field) => field.split(".")[0] === formId).map(
247
247
  (field) => field.split(".").filter((item) => formId !== item).join(".")
248
248
  );
249
- const logger$9 = createLogger();
250
- function useAssociatedLegalEntity(parentLegalEntity, associationType) {
251
- const matchingAssociation = useMemo(() => {
252
- var _a;
253
- if (!parentLegalEntity) return void 0;
254
- const typesToFind = Array.isArray(associationType) ? associationType : [associationType];
255
- const matchingAssociations = ((_a = parentLegalEntity.entityAssociations) == null ? void 0 : _a.filter((entity) => typesToFind.includes(entity.type))) ?? [];
256
- if (matchingAssociations.length > 1) {
257
- logger$9.warn(
258
- `Multiple matching associations found for types: ${typesToFind.join(", ")} - returning the first.
259
- ${matchingAssociations.map((ass) => JSON.stringify(ass, null, 2)).join("\n")}`
260
- );
261
- }
262
- return matchingAssociations[0];
263
- }, [parentLegalEntity, associationType]);
264
- const { data, refetch, isLoading } = useLegalEntity(
265
- (matchingAssociation == null ? void 0 : matchingAssociation.legalEntityId) ?? skipToken
266
- );
267
- return { data, refetch, isLoading };
268
- }
269
249
  const trackNavigation = ({
270
250
  userEvents,
271
251
  actionType,
@@ -668,6 +648,9 @@ const addValidityToForms = (forms, formValidity, problems) => forms.map(({ formI
668
648
  hasServerValidationErrors: Boolean((_a = problems == null ? void 0 : problems.validationErrors) == null ? void 0 : _a[formId])
669
649
  };
670
650
  });
651
+ const isEeaCountry = (country) => !country ? false : EEA_Countries.includes(country);
652
+ const isLowRiskEea = (countryCode) => !!countryCode && isEeaCountry(countryCode) && countryCode !== CountryCodes.Liechtenstein;
653
+ const isUK = (countryCode) => countryCode === CountryCodes.UnitedKingdom;
671
654
  const identityBase = {
672
655
  role: {
673
656
  rule: "requiredIfDecisionMakerTask"
@@ -822,175 +805,6 @@ const fieldsPerScenario = {
822
805
  L1_IDDOC: idDocument,
823
806
  L_PH: phoneNumberBase$1
824
807
  };
825
- const splitAtFirstOccurrence = (str, separator) => {
826
- const firstOccurrence = str.indexOf(separator);
827
- if (firstOccurrence === -1) return [str];
828
- return [str.slice(0, firstOccurrence), str.slice(firstOccurrence + 1)];
829
- };
830
- const getTrustMemberOwnerId = (trustMemberId, entityAssociations) => {
831
- var _a;
832
- return (_a = entityAssociations.find((association) => association.associatorId === trustMemberId)) == null ? void 0 : _a.legalEntityId;
833
- };
834
- const getFallbackName = (exemptSettlorAssociation) => {
835
- const [firstName, lastName] = splitAtFirstOccurrence(exemptSettlorAssociation.name ?? "", " ");
836
- return {
837
- firstName,
838
- lastName
839
- };
840
- };
841
- const convertEntityAssociationIntoTrustMember = (association, associations, exemptSettlorLE) => {
842
- var _a;
843
- if (association.settlorExemptionReason) {
844
- return {
845
- trustMemberType: "exemptSettlor",
846
- roles: [TrustMemberTypes.SETTLOR],
847
- legalEntityType: association.entityType,
848
- legalEntityId: association.legalEntityId,
849
- settlorExemptionReason: association.settlorExemptionReason,
850
- exemptSettlorName: association.entityType === LegalEntityType.INDIVIDUAL ? ((_a = exemptSettlorLE == null ? void 0 : exemptSettlorLE.individual) == null ? void 0 : _a.name) ?? getFallbackName(association) : void 0,
851
- name: association.name
852
- };
853
- }
854
- if (association.entityType === LegalEntityType.ORGANIZATION)
855
- return {
856
- trustMemberType: "company",
857
- roles: [],
858
- legalEntityType: LegalEntityType.ORGANIZATION,
859
- legalEntityId: association.legalEntityId,
860
- name: association.name,
861
- ownerId: getTrustMemberOwnerId(association.legalEntityId, associations)
862
- };
863
- if (association.entityType === LegalEntityType.INDIVIDUAL)
864
- return {
865
- trustMemberType: "regular",
866
- roles: [],
867
- legalEntityType: LegalEntityType.INDIVIDUAL,
868
- legalEntityId: association.legalEntityId,
869
- name: association.name
870
- };
871
- throw new Error(`Not a valid trust member: ${JSON.stringify(association)}`);
872
- };
873
- const mapEntityAssociationsToTrustMembers = (trustEntityId, entityAssociations, exemptSettlorLE) => {
874
- const mappedTrustMembers = entityAssociations.reduce(
875
- (acc, entityAssociation) => {
876
- if (!Object.values(TrustMemberTypes).includes(entityAssociation.type) || entityAssociation.associatorId !== trustEntityId || !entityAssociation.legalEntityId) {
877
- return acc;
878
- }
879
- const trustMember = acc[entityAssociation.legalEntityId] ?? convertEntityAssociationIntoTrustMember(
880
- entityAssociation,
881
- entityAssociations,
882
- exemptSettlorLE
883
- );
884
- const trustMemberType = entityAssociation.type;
885
- acc[entityAssociation.legalEntityId] = {
886
- ...trustMember,
887
- roles: [.../* @__PURE__ */ new Set([...trustMember.roles, trustMemberType])]
888
- };
889
- return acc;
890
- },
891
- {}
892
- );
893
- return Object.values(mappedTrustMembers);
894
- };
895
- const mapRootLegalEntityToTrustMember = (rootLegalEntity) => ({
896
- trustMemberType: "rootTrustee",
897
- roles: [TrustMemberTypes.TRUSTEE],
898
- legalEntityType: rootLegalEntity.type,
899
- legalEntityId: rootLegalEntity.id,
900
- name: getLegalEntityNameBasedOnType(rootLegalEntity)
901
- });
902
- const mapUndefinedBeneficiaryInfoToTrustMembers = (undefinedBeneficiaryInfo) => undefinedBeneficiaryInfo.map(({ reference, description }) => ({
903
- trustMemberType: "undefinedBeneficiary",
904
- roles: [TrustMemberTypes.UNDEFINED_BENEFICIARY],
905
- reference,
906
- description
907
- }));
908
- const getTrustMembers = (trustLE, rootLegalEntity, exemptSettlorLE) => {
909
- var _a;
910
- return [
911
- mapRootLegalEntityToTrustMember(rootLegalEntity),
912
- ...mapEntityAssociationsToTrustMembers(
913
- trustLE.id,
914
- trustLE.entityAssociations ?? [],
915
- exemptSettlorLE
916
- ),
917
- ...mapUndefinedBeneficiaryInfoToTrustMembers(((_a = trustLE.trust) == null ? void 0 : _a.undefinedBeneficiaryInfo) ?? [])
918
- ];
919
- };
920
- const combineRootLegalEntityWithEntityAssociations = (rootLegalEntity, entityAssociations) => {
921
- const allowedRolesForRootLegalEntity = [
922
- TrustMemberTypes.SETTLOR,
923
- TrustMemberTypes.PROTECTOR,
924
- TrustMemberTypes.DEFINED_BENEFICIARY
925
- ];
926
- const roles = entityAssociations.map((entityAssociation) => entityAssociation.type).filter((role) => allowedRolesForRootLegalEntity.includes(role));
927
- return {
928
- trustMemberType: "rootTrustee",
929
- roles: [...roles, TrustMemberTypes.TRUSTEE],
930
- legalEntityType: rootLegalEntity.type,
931
- legalEntityId: rootLegalEntity.id,
932
- name: getLegalEntityNameBasedOnType(rootLegalEntity)
933
- };
934
- };
935
- const getRootTrusteeTrustMembers = (trustLE, rootLegalEntity, exemptSettlorLE) => {
936
- var _a;
937
- const entityAssociations = trustLE.entityAssociations ?? [];
938
- const rootLegalEntityAssociations = entityAssociations.filter(
939
- (a) => a.legalEntityId === rootLegalEntity.id
940
- );
941
- const nonRootLegalEntityAssociations = entityAssociations.filter(
942
- (a) => a.legalEntityId !== rootLegalEntity.id
943
- );
944
- return [
945
- combineRootLegalEntityWithEntityAssociations(rootLegalEntity, rootLegalEntityAssociations),
946
- ...mapEntityAssociationsToTrustMembers(
947
- trustLE.id,
948
- nonRootLegalEntityAssociations ?? [],
949
- exemptSettlorLE
950
- ),
951
- ...mapUndefinedBeneficiaryInfoToTrustMembers(((_a = trustLE.trust) == null ? void 0 : _a.undefinedBeneficiaryInfo) ?? [])
952
- ];
953
- };
954
- const useExemptSettlor = ({
955
- trust
956
- }) => {
957
- const matchingAssociation = useMemo(() => {
958
- if (!trust) return void 0;
959
- return getOwnEntityAssociations(trust).find(
960
- (association) => association.type === TrustMemberTypes.SETTLOR && Boolean(association.settlorExemptionReason)
961
- );
962
- }, [trust]);
963
- const { data } = useLegalEntity((matchingAssociation == null ? void 0 : matchingAssociation.legalEntityId) ?? skipToken);
964
- return data;
965
- };
966
- function useTrustMembers() {
967
- const { data: rootLegalEntity } = useLegalEntity(ROOT_LE);
968
- const { data: trust } = useAssociatedLegalEntity(rootLegalEntity, LegalEntityType.TRUST);
969
- const { isExperimentEnabled } = useExperimentsContext();
970
- const exemptSettlor = useExemptSettlor({
971
- trust
972
- });
973
- const allowMoreRolesForMainRootTrustee = isExperimentEnabled("AllowMoreRolesForMainRootTrustee");
974
- return useMemo(() => {
975
- if (!rootLegalEntity || !(trust == null ? void 0 : trust.trust)) return [];
976
- return allowMoreRolesForMainRootTrustee ? getRootTrusteeTrustMembers(trust, rootLegalEntity, exemptSettlor) : getTrustMembers(trust, rootLegalEntity, exemptSettlor);
977
- }, [rootLegalEntity, trust, exemptSettlor, allowMoreRolesForMainRootTrustee]);
978
- }
979
- function useUnincorporatedPartnershipMembers() {
980
- const { data: rootLegalEntity } = useLegalEntity(ROOT_LE);
981
- const { data: unincorporatedPartnership } = useAssociatedLegalEntity(
982
- rootLegalEntity,
983
- LegalEntityType.UNINCORPORATED_PARTNERSHIP
984
- );
985
- return useMemo(() => {
986
- if (!rootLegalEntity || !(unincorporatedPartnership == null ? void 0 : unincorporatedPartnership.unincorporatedPartnership)) return [];
987
- return mapEntityAssociationsToUnincorporatedPartnershipMembers(
988
- unincorporatedPartnership.id,
989
- unincorporatedPartnership.entityAssociations ?? [],
990
- rootLegalEntity
991
- );
992
- }, [rootLegalEntity, unincorporatedPartnership]);
993
- }
994
808
  const useCapabilityProblems = () => {
995
809
  const { data: rootLegalEntity } = useLegalEntity(ROOT_LE);
996
810
  return rootLegalEntity ? getCapabilityProblems(rootLegalEntity, getLegalEntityCountry(rootLegalEntity)) : void 0;
@@ -2150,7 +1964,7 @@ const nameFormatters = {
2150
1964
  const progressBar = "adyen-kyc-progress-bar";
2151
1965
  const progressBarRounded = "adyen-kyc-progress-bar-rounded";
2152
1966
  const progressBarIndicator = "adyen-kyc-progress-bar-indicator";
2153
- const styles$a = {
1967
+ const styles$c = {
2154
1968
  progressBar,
2155
1969
  progressBarRounded,
2156
1970
  progressBarIndicator
@@ -2161,8 +1975,8 @@ const ProgressBar = ({ progress, ariaLabel, rounded = false }) => {
2161
1975
  };
2162
1976
  const clampedProgress = clamp(progress);
2163
1977
  const cssWidth = `${clampedProgress}%`;
2164
- const className = cx(styles$a.progressBar, {
2165
- [styles$a.progressBarRounded]: rounded
1978
+ const className = cx(styles$c.progressBar, {
1979
+ [styles$c.progressBarRounded]: rounded
2166
1980
  });
2167
1981
  return /* @__PURE__ */ jsx(
2168
1982
  "div",
@@ -2173,20 +1987,60 @@ const ProgressBar = ({ progress, ariaLabel, rounded = false }) => {
2173
1987
  "aria-valuenow": clampedProgress,
2174
1988
  "aria-valuemin": 0,
2175
1989
  "aria-valuemax": 100,
2176
- children: /* @__PURE__ */ jsxs("div", { className: styles$a.progressBarIndicator, style: { width: cssWidth }, children: [
1990
+ children: /* @__PURE__ */ jsxs("div", { className: styles$c.progressBarIndicator, style: { width: cssWidth }, children: [
2177
1991
  progress,
2178
1992
  "%"
2179
1993
  ] })
2180
1994
  }
2181
1995
  );
2182
1996
  };
1997
+ const confirm = "adyen-kyc-confirm";
1998
+ const confirmMessage = "adyen-kyc-confirm-message";
1999
+ const confirmActions = "adyen-kyc-confirm-actions";
2000
+ const styles$b = {
2001
+ confirm,
2002
+ confirmMessage,
2003
+ confirmActions
2004
+ };
2005
+ const Confirm = ({
2006
+ description,
2007
+ cancelText,
2008
+ confirmText,
2009
+ critical = false,
2010
+ onCancel,
2011
+ onConfirm,
2012
+ title
2013
+ }) => {
2014
+ const { i18n } = useI18nContext();
2015
+ const [isInFlight, setIsInFlight] = useState(false);
2016
+ const showCancelButton = onCancel !== void 0;
2017
+ const buttonVariant = critical ? "critical" : "primary";
2018
+ const handleConfirm = async () => {
2019
+ setIsInFlight(true);
2020
+ try {
2021
+ await onConfirm();
2022
+ } finally {
2023
+ setIsInFlight(false);
2024
+ }
2025
+ };
2026
+ return /* @__PURE__ */ jsx(Modal, { size: "small", transition: "dropIn", showCloseButton: false, ariaLabel: title, children: /* @__PURE__ */ jsxs("div", { className: styles$b.confirm, children: [
2027
+ /* @__PURE__ */ jsxs("div", { className: styles$b.confirmMessage, children: [
2028
+ /* @__PURE__ */ jsx(Typography, { variant: "title", el: "h3", children: title }),
2029
+ description && /* @__PURE__ */ jsx(Typography, { variant: "body", el: "p", children: description })
2030
+ ] }),
2031
+ /* @__PURE__ */ jsxs("div", { className: styles$b.confirmActions, children: [
2032
+ showCancelButton && /* @__PURE__ */ jsx(Button, { onClick: onCancel, variant: "secondary", disabled: isInFlight, children: cancelText ?? i18n.get("cancel") }),
2033
+ /* @__PURE__ */ jsx(Button, { onClick: handleConfirm, variant: buttonVariant, loading: isInFlight, children: confirmText ?? i18n.get("confirm") })
2034
+ ] })
2035
+ ] }) });
2036
+ };
2183
2037
  const formFlow = "adyen-kyc-form-flow";
2184
2038
  const formFlowContent = "adyen-kyc-form-flow-content";
2185
2039
  const formFlowFooter = "adyen-kyc-form-flow-footer";
2186
2040
  const formFlowFooterBorder = "adyen-kyc-form-flow-footer-border";
2187
2041
  const formFlowActions = "adyen-kyc-form-flow-actions";
2188
2042
  const formFlowActionGroup = "adyen-kyc-form-flow-action-group";
2189
- const styles$9 = {
2043
+ const styles$a = {
2190
2044
  formFlow,
2191
2045
  formFlowContent,
2192
2046
  formFlowFooter,
@@ -2272,15 +2126,15 @@ const FormFlow = ({
2272
2126
  });
2273
2127
  gotoFormByFormIndex(currentStep + 1);
2274
2128
  };
2275
- const footerClassName = cx(styles$9.formFlowFooter, {
2276
- [styles$9.formFlowFooterBorder]: isSingleStepForm
2129
+ const footerClassName = cx(styles$a.formFlowFooter, {
2130
+ [styles$a.formFlowFooterBorder]: isSingleStepForm
2277
2131
  });
2278
2132
  return /* @__PURE__ */ jsxs(MaybeModal, { inline: !asModal, onClose: handleDismiss, children: [
2279
- /* @__PURE__ */ jsxs("div", { ref: contentRef, className: styles$9.formFlow, children: [
2280
- /* @__PURE__ */ jsx("div", { className: styles$9.formFlowContent, children: /* @__PURE__ */ jsx(LoaderWrapper, { status: loadingStatus, formOpacityWhenLoading: 0, loaderSize: "large", children: /* @__PURE__ */ jsx(FormRouterContextProvider, { forms, setFormIndex: gotoFormByFormIndex, children: isLastStep && summary !== void 0 ? /* @__PURE__ */ jsx(Summary, { ...summary, forms, gotoForm: gotoFormByFormIndex }) : children }) }) }),
2133
+ /* @__PURE__ */ jsxs("div", { ref: contentRef, className: styles$a.formFlow, children: [
2134
+ /* @__PURE__ */ jsx("div", { className: styles$a.formFlowContent, children: /* @__PURE__ */ jsx(LoaderWrapper, { status: loadingStatus, formOpacityWhenLoading: 0, loaderSize: "large", children: /* @__PURE__ */ jsx(FormRouterContextProvider, { forms, setFormIndex: gotoFormByFormIndex, children: isLastStep && summary !== void 0 ? /* @__PURE__ */ jsx(Summary, { ...summary, forms, gotoForm: gotoFormByFormIndex }) : children }) }) }),
2281
2135
  /* @__PURE__ */ jsxs("div", { className: footerClassName, children: [
2282
2136
  !isSingleStepForm && /* @__PURE__ */ jsx(ProgressBar, { ariaLabel: i18n.get("progress"), progress }),
2283
- /* @__PURE__ */ jsxs("div", { className: styles$9.formFlowActions, children: [
2137
+ /* @__PURE__ */ jsxs("div", { className: styles$a.formFlowActions, children: [
2284
2138
  isFirstStep || handleBackClick === void 0 ? /* @__PURE__ */ jsx(
2285
2139
  Button,
2286
2140
  {
@@ -2299,7 +2153,7 @@ const FormFlow = ({
2299
2153
  children: i18n.get("back")
2300
2154
  }
2301
2155
  ),
2302
- isLastStep ? /* @__PURE__ */ jsx(Button, { onClick: handleSubmit, loading: isSubmitting, children: i18n.get("submit") }) : /* @__PURE__ */ jsxs("div", { className: styles$9.formFlowActionGroup, children: [
2156
+ isLastStep ? /* @__PURE__ */ jsx(Button, { onClick: handleSubmit, loading: isSubmitting, children: i18n.get("submit") }) : /* @__PURE__ */ jsxs("div", { className: styles$a.formFlowActionGroup, children: [
2303
2157
  isSaveButtonVisible && /* @__PURE__ */ jsx(
2304
2158
  IconButton,
2305
2159
  {
@@ -4101,10 +3955,24 @@ const individualOnfidoRules = ({
4101
3955
  return (idDocumentOption == null ? void 0 : idDocumentOption.hasBackPage) ? REQUIRED : void 0;
4102
3956
  },
4103
3957
  isProofOfResidencyRequired: () => {
4104
- var _a, _b;
3958
+ var _a, _b, _c, _d, _e, _f;
4105
3959
  if ((_b = (_a = data.proofOfResidency) == null ? void 0 : _a.proofOfResidency) == null ? void 0 : _b.length) {
4106
3960
  return REQUIRED;
4107
3961
  }
3962
+ const isInstantFlow = ((_c = data == null ? void 0 : data.idVerificationMethod) == null ? void 0 : _c.idVerificationMethod) === "instantVerification";
3963
+ if (!isInstantFlow) {
3964
+ return void 0;
3965
+ }
3966
+ const documentCountry = (_e = (_d = data == null ? void 0 : data.idVerificationMethod) == null ? void 0 : _d.idDocument) == null ? void 0 : _e.documentCountry;
3967
+ const residenceCountry = ((_f = data == null ? void 0 : data.additionalPersonalDetails) == null ? void 0 : _f.country) ?? country;
3968
+ if (!documentCountry || !residenceCountry) {
3969
+ return void 0;
3970
+ }
3971
+ const countriesMismatch = documentCountry !== residenceCountry;
3972
+ const isEeaLowRiskException = !isUK(documentCountry) && isLowRiskEea(documentCountry) && isLowRiskEea(residenceCountry);
3973
+ if (countriesMismatch && !isEeaLowRiskException) {
3974
+ return REQUIRED;
3975
+ }
4108
3976
  },
4109
3977
  isProofOfNationalIdRequired: () => {
4110
3978
  var _a, _b;
@@ -4619,7 +4487,11 @@ function AdditionalPersonalDetails(props) {
4619
4487
  ),
4620
4488
  /* @__PURE__ */ jsxs("div", { className: "adyen-kyc-additional-information__section-heading", children: [
4621
4489
  /* @__PURE__ */ jsx(Typography, { el: "h3", variant: "title", children: i18n.get("personalIdentityDetails") }),
4622
- /* @__PURE__ */ jsx(Typography, { el: "p", variant: "body", children: i18n.get("personalIdentityDetailsDescription") })
4490
+ /* @__PURE__ */ jsxs(Typography, { el: "p", variant: "body", children: [
4491
+ i18n.get("personalIdentityDetailsDescription"),
4492
+ " ",
4493
+ /* @__PURE__ */ jsx(Link, { href: "https://www.adyen.com/privacy-policy", external: true, children: i18n.get("personalIdentityDetailsDescriptionLink") })
4494
+ ] })
4623
4495
  ] }),
4624
4496
  formUtils.isRequiredField("birthDate") && /* @__PURE__ */ jsx(
4625
4497
  Field,
@@ -4867,6 +4739,60 @@ const useExtractDocumentInformation = (options2) => {
4867
4739
  ...options2
4868
4740
  });
4869
4741
  };
4742
+ const providerButton = "adyen-kyc-provider-button";
4743
+ const providerButtonDisplayName = "adyen-kyc-provider-button-display-name";
4744
+ const styles$9 = {
4745
+ providerButton,
4746
+ providerButtonDisplayName
4747
+ };
4748
+ const ProviderButton = ({
4749
+ provider,
4750
+ disabled = false,
4751
+ fullWidth,
4752
+ loading = false,
4753
+ onClick,
4754
+ testId
4755
+ }) => {
4756
+ const isSingpass = provider.includes("singpassMyInfo");
4757
+ const buttonVariant = isSingpass ? "secondary" : "primary";
4758
+ const { i18n } = useI18nContext();
4759
+ const buttonProps = {
4760
+ disabled,
4761
+ fullWidth,
4762
+ loading,
4763
+ onClick,
4764
+ testId
4765
+ };
4766
+ const providerLogo = {
4767
+ tink: "tink-logo",
4768
+ yapily: "yapily-logo",
4769
+ plaid: "plaid-logo",
4770
+ onfido: "onfido-logo",
4771
+ singpassMyInfo: "singpass-logo",
4772
+ singpassMyInfoBusiness: "singpass-logo"
4773
+ };
4774
+ const providerDisplayName = {
4775
+ tink: "Tink",
4776
+ yapily: "Yapily",
4777
+ plaid: "Plaid",
4778
+ onfido: "Onfido",
4779
+ singpassMyInfo: "Singpass",
4780
+ singpassMyInfoBusiness: "Singpass"
4781
+ };
4782
+ const buttonLabel = {
4783
+ tink: i18n.get("addAccountWith"),
4784
+ yapily: i18n.get("addAccountWith"),
4785
+ plaid: i18n.get("addAccountWith"),
4786
+ onfido: i18n.get("addDetailsWith"),
4787
+ singpassMyInfo: i18n.get("retrieveMyinfoWith"),
4788
+ singpassMyInfoBusiness: i18n.get("retrieveMyinfoBusinessWith")
4789
+ };
4790
+ return /* @__PURE__ */ jsx(Button, { ...buttonProps, variant: buttonVariant, children: /* @__PURE__ */ jsxs("div", { className: styles$9.providerButton, children: [
4791
+ buttonLabel[provider],
4792
+ /* @__PURE__ */ jsx("span", { className: styles$9.providerButtonDisplayName, children: providerDisplayName[provider] }),
4793
+ /* @__PURE__ */ jsx(Svg, { name: providerLogo[provider], type: "image" })
4794
+ ] }) });
4795
+ };
4870
4796
  const mapApiAddressToSchema = (address) => ({
4871
4797
  address: address.street,
4872
4798
  otherAddressInformation: address.street2,
@@ -4887,14 +4813,20 @@ const addressToString = ({ address, otherAddressInformation, postalCode, city, s
4887
4813
  out = appendWithPreSeparator(out, ", ", datasetUtils.getCountryName(country) ?? country);
4888
4814
  return out;
4889
4815
  };
4890
- const defaultConflictRule = (provided, detected) => ({
4891
- hasConflict: !objectsDeepEqual(provided, detected)
4892
- });
4893
- const caseInsensitiveStringConflictRule = (provided, detected) => {
4894
- const p = String(provided ?? "");
4895
- const d = String(detected ?? "");
4816
+ const defaultConflictRule = (provided, detected) => {
4817
+ if (detected === void 0 || detected === null) {
4818
+ return { hasConflict: false };
4819
+ }
4820
+ if (provided === void 0 || provided === null) {
4821
+ return { hasConflict: false, resolvedValue: detected };
4822
+ }
4823
+ if (typeof provided === "string" && typeof detected === "string") {
4824
+ return {
4825
+ hasConflict: provided.trim().toLowerCase() !== detected.trim().toLowerCase()
4826
+ };
4827
+ }
4896
4828
  return {
4897
- hasConflict: p.trim().toLowerCase() !== d.trim().toLowerCase()
4829
+ hasConflict: !objectsDeepEqual(provided, detected)
4898
4830
  };
4899
4831
  };
4900
4832
  const createAddressConflictRule = (datasetUtils) => (provided, detected) => {
@@ -4928,7 +4860,7 @@ const useDataConflicts = (providedData, detectedData, rules2 = {}, onAutoResolve
4928
4860
  resolvedData: void 0
4929
4861
  };
4930
4862
  }
4931
- const propertiesToCompare = keysOf(rules2);
4863
+ const propertiesToCompare = keysOf(detectedData);
4932
4864
  const conflictingProperties2 = [];
4933
4865
  const autoResolvedPatches = /* @__PURE__ */ new Map();
4934
4866
  for (const property of propertiesToCompare) {
@@ -4989,7 +4921,7 @@ const ConflictRow = ({
4989
4921
  variant: "caption",
4990
4922
  color: "tertiary",
4991
4923
  className: styles$8.conflictRowListOptionLabel,
4992
- children: i18n.get("original")
4924
+ children: i18n.get("youEntered")
4993
4925
  }
4994
4926
  ),
4995
4927
  /* @__PURE__ */ jsx(
@@ -5009,7 +4941,7 @@ const ConflictRow = ({
5009
4941
  variant: "caption",
5010
4942
  color: "tertiary",
5011
4943
  className: styles$8.conflictRowListOptionLabel,
5012
- children: i18n.get("detected")
4944
+ children: i18n.get("weDetected")
5013
4945
  }
5014
4946
  ),
5015
4947
  /* @__PURE__ */ jsx(
@@ -5112,8 +5044,8 @@ const DataConflictsModal = ({
5112
5044
  /* @__PURE__ */ jsxs("table", { className: styles$7.dataConflictsTable, children: [
5113
5045
  /* @__PURE__ */ jsx("thead", { children: /* @__PURE__ */ jsxs("tr", { children: [
5114
5046
  /* @__PURE__ */ jsx("th", {}),
5115
- /* @__PURE__ */ jsx("th", { children: /* @__PURE__ */ jsx(Typography, { variant: "caption", color: "tertiary", children: i18n.get("original") }) }),
5116
- /* @__PURE__ */ jsx("th", { children: /* @__PURE__ */ jsx(Typography, { variant: "caption", color: "tertiary", children: i18n.get("detected") }) })
5047
+ /* @__PURE__ */ jsx("th", { children: /* @__PURE__ */ jsx(Typography, { variant: "caption", color: "tertiary", children: i18n.get("youEntered") }) }),
5048
+ /* @__PURE__ */ jsx("th", { children: /* @__PURE__ */ jsx(Typography, { variant: "caption", color: "tertiary", children: i18n.get("weDetected") }) })
5117
5049
  ] }) }),
5118
5050
  /* @__PURE__ */ jsx("tbody", { children: keysOf(conflictItems).map((property) => /* @__PURE__ */ jsx(
5119
5051
  ConflictRow,
@@ -5405,11 +5337,10 @@ const UploadedDocument = ({ document, onDelete, onUpdate }) => {
5405
5337
  const logger$2 = createLogger();
5406
5338
  const idVerificationMethodFields = [
5407
5339
  "idVerificationMethod",
5408
- "ocrExtractedData",
5409
5340
  "idDocument"
5410
5341
  ];
5411
5342
  function IdVerificationMethod(props) {
5412
- var _a, _b, _c, _d, _e, _f;
5343
+ var _a, _b, _c, _d, _e;
5413
5344
  const { legalEntityId, handlers, formVerificationErrors, fieldValidationErrors } = props;
5414
5345
  const { i18n } = useI18nContext();
5415
5346
  const userEvents = useAnalyticsContext();
@@ -5420,7 +5351,6 @@ function IdVerificationMethod(props) {
5420
5351
  const datasetUtils = datasetUtilities(i18n.locale);
5421
5352
  const existingDocument = (_a = data.idVerificationMethod) == null ? void 0 : _a.idDocument;
5422
5353
  const hasExistingDocument = !isEmpty$1(existingDocument);
5423
- const ocrData = (_b = data.idVerificationMethod) == null ? void 0 : _b.ocrExtractedData;
5424
5354
  const handleFieldChange = useCallback(
5425
5355
  (fieldName, mode = "input") => handleChangeFor(fieldName, "idVerificationMethod", mode),
5426
5356
  [handleChangeFor]
@@ -5430,9 +5360,12 @@ function IdVerificationMethod(props) {
5430
5360
  const [error, setError] = useState();
5431
5361
  const [showLoadingSpinner, setShowLoadingSpinner] = useState(false);
5432
5362
  const clearError = () => setError(void 0);
5363
+ const [ocrExtractedData, setOcrExtractedData] = useState(
5364
+ void 0
5365
+ );
5433
5366
  const extractedData = useMemo(
5434
- () => ocrData ? mapExtractionResultToSchema(ocrData) : void 0,
5435
- [ocrData]
5367
+ () => ocrExtractedData ? mapExtractionResultToSchema(ocrExtractedData) : void 0,
5368
+ [ocrExtractedData]
5436
5369
  );
5437
5370
  const comparableExistingData = useMemo(() => toIndividualOnfidoConflictSchema(data), [data]);
5438
5371
  const comparableExtractedData = useMemo(
@@ -5441,8 +5374,6 @@ function IdVerificationMethod(props) {
5441
5374
  );
5442
5375
  const conflictRules = useMemo(
5443
5376
  () => ({
5444
- firstName: caseInsensitiveStringConflictRule,
5445
- lastName: caseInsensitiveStringConflictRule,
5446
5377
  address: createAddressConflictRule(datasetUtils)
5447
5378
  }),
5448
5379
  [datasetUtils]
@@ -5451,7 +5382,7 @@ function IdVerificationMethod(props) {
5451
5382
  const resolvedSchema = fromIndividualOnfidoConflictSchema(resolvedData2);
5452
5383
  setFormData("basicDetails", { ...data.basicDetails, ...resolvedSchema.basicDetails });
5453
5384
  setFormData("additionalPersonalDetails", resolvedSchema.additionalPersonalDetails);
5454
- handleFieldChange("ocrExtractedData")(void 0);
5385
+ setOcrExtractedData(void 0);
5455
5386
  handlers.handleContinueToAdditionalDetails();
5456
5387
  };
5457
5388
  const { hasConflicts, conflictingProperties, resolvedData } = useDataConflicts(
@@ -5461,9 +5392,9 @@ function IdVerificationMethod(props) {
5461
5392
  onAutoResolve
5462
5393
  );
5463
5394
  const minimumApplicantDetails = {
5464
- firstName: (_c = data.basicDetails) == null ? void 0 : _c.firstName,
5465
- lastName: (_d = data.basicDetails) == null ? void 0 : _d.lastName,
5466
- residencyCountry: (_e = data.additionalPersonalDetails) == null ? void 0 : _e.country
5395
+ firstName: (_b = data.basicDetails) == null ? void 0 : _b.firstName,
5396
+ lastName: (_c = data.basicDetails) == null ? void 0 : _c.lastName,
5397
+ residencyCountry: (_d = data.additionalPersonalDetails) == null ? void 0 : _d.country
5467
5398
  };
5468
5399
  const launchOnfido = () => {
5469
5400
  clearError();
@@ -5478,11 +5409,6 @@ function IdVerificationMethod(props) {
5478
5409
  const handleOnfidoComplete = async (onfidoResult) => {
5479
5410
  clearError();
5480
5411
  setShowLoadingSpinner(true);
5481
- handleFieldChange("idDocument")({
5482
- instantIdVerificationData: onfidoResult,
5483
- idDocumentType: onfidoResult.document_front.type,
5484
- modificationDate: (/* @__PURE__ */ new Date()).toISOString()
5485
- });
5486
5412
  setStatus("extractionLoading");
5487
5413
  const { document_front, document_back } = onfidoResult;
5488
5414
  const documentIds = [document_front.id];
@@ -5491,7 +5417,13 @@ function IdVerificationMethod(props) {
5491
5417
  const extractionResult = await extractDocumentInformation2.mutateAsync({
5492
5418
  documents: documentIds.map((documentId) => ({ documentId }))
5493
5419
  });
5494
- handleFieldChange("ocrExtractedData")(extractionResult);
5420
+ setOcrExtractedData(extractionResult);
5421
+ handleFieldChange("idDocument")({
5422
+ instantIdVerificationData: onfidoResult,
5423
+ idDocumentType: onfidoResult.document_front.type,
5424
+ modificationDate: (/* @__PURE__ */ new Date()).toISOString(),
5425
+ documentCountry: extractionResult.issuingCountry
5426
+ });
5495
5427
  setStatus("ready");
5496
5428
  } catch (err) {
5497
5429
  handleOnfidoError(err);
@@ -5513,7 +5445,7 @@ function IdVerificationMethod(props) {
5513
5445
  const resolvedSchema = fromIndividualOnfidoConflictSchema(resolved);
5514
5446
  setFormData("basicDetails", { ...data.basicDetails, ...resolvedSchema.basicDetails });
5515
5447
  setFormData("additionalPersonalDetails", resolvedSchema.additionalPersonalDetails);
5516
- handleFieldChange("ocrExtractedData")(void 0);
5448
+ setOcrExtractedData(void 0);
5517
5449
  setStatus("ready");
5518
5450
  userEvents.addPageEvent("Success", {
5519
5451
  actionType: "submit",
@@ -5595,7 +5527,7 @@ function IdVerificationMethod(props) {
5595
5527
  onClick: launchOnfido
5596
5528
  }
5597
5529
  ),
5598
- !((_f = showIndividualMotionCapture) == null ? void 0 : _f.value) && /* @__PURE__ */ jsx(
5530
+ !((_e = showIndividualMotionCapture) == null ? void 0 : _e.value) && /* @__PURE__ */ jsx(
5599
5531
  Button,
5600
5532
  {
5601
5533
  onClick: () => setStatus("confirmManualFlowModal"),
@@ -5647,12 +5579,12 @@ function IdVerificationMethod(props) {
5647
5579
  address: (val) => addressToString(val, datasetUtils),
5648
5580
  id: (val) => formatId(val, i18n)
5649
5581
  },
5650
- title: "confirmPersonalInformation",
5651
- explanation: "thereAreDifferencesBetweenYourEntryAndWhatWeDetectedInYourIdDocument",
5582
+ title: "confirmPersonalDetails",
5583
+ explanation: "theDetailsYouEnteredDontMatch",
5652
5584
  onContinue: handleDataConflictsResolved,
5653
5585
  onCancel: () => {
5654
5586
  handleFieldChange("idDocument")(void 0);
5655
- handleFieldChange("ocrExtractedData")(void 0);
5587
+ setOcrExtractedData(void 0);
5656
5588
  handleFieldChange("idVerificationMethod")(void 0);
5657
5589
  }
5658
5590
  }
@@ -5679,6 +5611,9 @@ const ManualIdUpload = () => {
5679
5611
  }
5680
5612
  );
5681
5613
  };
5614
+ const getDisplayErrorMessage = (errorMessage, i18n) => {
5615
+ return typeof errorMessage !== "boolean" ? i18n.get(errorMessage) : errorMessage;
5616
+ };
5682
5617
  const tileContainer = "adyen-kyc-tile-container";
5683
5618
  const tile = "adyen-kyc-tile";
5684
5619
  const tileIcon = "adyen-kyc-tile-icon";
@@ -5887,6 +5822,7 @@ function SignatoryQuestionnaire(props) {
5887
5822
  const { i18n } = useI18nContext();
5888
5823
  const {
5889
5824
  data,
5825
+ errors,
5890
5826
  formVerificationErrors,
5891
5827
  heading,
5892
5828
  fieldValidationErrors,
@@ -5897,6 +5833,7 @@ function SignatoryQuestionnaire(props) {
5897
5833
  if (!handleFieldChange) {
5898
5834
  return;
5899
5835
  }
5836
+ const errorMessage = formUtils.getErrorMessage("isSignatory", errors, fieldValidationErrors);
5900
5837
  return /* @__PURE__ */ jsxs("form", { className: "adyen-kyc-individual__personal-details", "aria-describedby": "ariaErrorField", children: [
5901
5838
  /* @__PURE__ */ jsx(FormHeader, { heading }),
5902
5839
  /* @__PURE__ */ jsx(
@@ -5916,7 +5853,8 @@ function SignatoryQuestionnaire(props) {
5916
5853
  onChange: handleFieldChange("isSignatory"),
5917
5854
  onDescriptionLinkClick: handleDescriptionLinkClick,
5918
5855
  question: i18n.get("signatoryQuestion"),
5919
- descriptionLinkText: i18n.get("whatDoesThisMean")
5856
+ descriptionLinkText: i18n.get("whatDoesThisMean"),
5857
+ errorMessage: getDisplayErrorMessage(errorMessage, i18n)
5920
5858
  }
5921
5859
  )
5922
5860
  ] });
@@ -5931,6 +5869,7 @@ function UboQuestionnaire(props) {
5931
5869
  const {
5932
5870
  data,
5933
5871
  description,
5872
+ errors,
5934
5873
  formVerificationErrors,
5935
5874
  heading,
5936
5875
  fieldValidationErrors,
@@ -5941,6 +5880,17 @@ function UboQuestionnaire(props) {
5941
5880
  if (!handleFieldChange) {
5942
5881
  return;
5943
5882
  }
5883
+ const isDirectorErrorMessage = formUtils.getErrorMessage(
5884
+ "isDirector",
5885
+ errors,
5886
+ fieldValidationErrors
5887
+ );
5888
+ const isOwnerErrorMessage = formUtils.getErrorMessage("isOwner", errors, fieldValidationErrors);
5889
+ const isControllingPersonErrorMessage = formUtils.getErrorMessage(
5890
+ "isControllingPerson",
5891
+ errors,
5892
+ fieldValidationErrors
5893
+ );
5944
5894
  return /* @__PURE__ */ jsxs("form", { className: "adyen-kyc-individual__personal-details", "aria-describedby": "ariaErrorField", children: [
5945
5895
  /* @__PURE__ */ jsx(FormHeader, { heading, description }),
5946
5896
  /* @__PURE__ */ jsx(
@@ -5960,7 +5910,8 @@ function UboQuestionnaire(props) {
5960
5910
  onChange: handleFieldChange("isDirector"),
5961
5911
  onDescriptionLinkClick: handleDescriptionLinkClick,
5962
5912
  question: i18n.get("directorQuestion"),
5963
- descriptionLinkText: i18n.get("whatDoesThisMean")
5913
+ descriptionLinkText: i18n.get("whatDoesThisMean"),
5914
+ errorMessage: getDisplayErrorMessage(isDirectorErrorMessage, i18n)
5964
5915
  }
5965
5916
  ),
5966
5917
  formUtils.isRequiredField("isOwner") && /* @__PURE__ */ jsx(
@@ -5971,7 +5922,8 @@ function UboQuestionnaire(props) {
5971
5922
  onChange: handleFieldChange("isOwner"),
5972
5923
  onDescriptionLinkClick: handleDescriptionLinkClick,
5973
5924
  question: i18n.get("ownerQuestion"),
5974
- descriptionLinkText: i18n.get("whatDoesThisMean")
5925
+ descriptionLinkText: i18n.get("whatDoesThisMean"),
5926
+ errorMessage: getDisplayErrorMessage(isOwnerErrorMessage, i18n)
5975
5927
  }
5976
5928
  ),
5977
5929
  formUtils.isRequiredField("isControllingPerson") && /* @__PURE__ */ jsx(
@@ -5982,7 +5934,8 @@ function UboQuestionnaire(props) {
5982
5934
  onChange: handleFieldChange("isControllingPerson"),
5983
5935
  onDescriptionLinkClick: handleDescriptionLinkClick,
5984
5936
  question: i18n.get("controllingPersonQuestion"),
5985
- descriptionLinkText: i18n.get("whatDoesThisMean")
5937
+ descriptionLinkText: i18n.get("whatDoesThisMean"),
5938
+ errorMessage: getDisplayErrorMessage(isControllingPersonErrorMessage, i18n)
5986
5939
  }
5987
5940
  )
5988
5941
  ] });
@@ -6156,7 +6109,9 @@ function IndividualOnfido(props) {
6156
6109
  heading: i18n.get("signatoryQuestionnaireHeader"),
6157
6110
  id: signatoryQuestionnaireFormID,
6158
6111
  handleFieldChange: handleFieldChange("signatoryQuestionnaire"),
6159
- handleDescriptionLinkClick
6112
+ handleDescriptionLinkClick,
6113
+ errors: errors == null ? void 0 : errors.signatoryQuestionnaire,
6114
+ fieldValidationErrors: fieldValidationErrors == null ? void 0 : fieldValidationErrors.signatoryQuestionnaire
6160
6115
  }
6161
6116
  );
6162
6117
  case uboQuestionnaireFormID:
@@ -6168,7 +6123,9 @@ function IndividualOnfido(props) {
6168
6123
  description: i18n.get("uboQuestionnaireDescription"),
6169
6124
  id: uboQuestionnaireFormID,
6170
6125
  handleFieldChange: handleFieldChange("uboQuestionnaire"),
6171
- handleDescriptionLinkClick
6126
+ handleDescriptionLinkClick,
6127
+ errors: errors == null ? void 0 : errors.uboQuestionnaire,
6128
+ fieldValidationErrors: fieldValidationErrors == null ? void 0 : fieldValidationErrors.uboQuestionnaire
6172
6129
  }
6173
6130
  );
6174
6131
  case basicDetailsFormID:
@@ -7117,7 +7074,7 @@ function IndividualOnfidoDropin({
7117
7074
  i18n.locale
7118
7075
  );
7119
7076
  }
7120
- if (isManualVerificationOrExistingDoc((_f2 = summaryData.idVerificationMethod) == null ? void 0 : _f2.idVerificationMethod)) {
7077
+ if (isManualVerificationOrExistingDoc((_f2 = summaryData.idVerificationMethod) == null ? void 0 : _f2.idVerificationMethod) || summaryData.proofOfResidency) {
7121
7078
  const fileSummaryData = formatFileSummaryData(data);
7122
7079
  summaryData = { ...summaryData, ...fileSummaryData };
7123
7080
  summaryData.manualIdUpload = { ...summaryData.idDocument };
@@ -7228,93 +7185,6 @@ function IndividualOnfidoDropin({
7228
7185
  }
7229
7186
  ) });
7230
7187
  }
7231
- function IndividualOuter({
7232
- taskType,
7233
- taskName,
7234
- individualLegalEntityId,
7235
- parentLegalEntityId,
7236
- asModal = false,
7237
- hideSidebar = false,
7238
- isTargetLegalEntityType = false,
7239
- onSubmit,
7240
- newMember,
7241
- trustedFields,
7242
- trustedFieldsProvider,
7243
- trustedRoles,
7244
- /** below from {@link DropinProps} */
7245
- handleBackClick,
7246
- handleCloseClick,
7247
- handleHomeClick
7248
- }) {
7249
- const individualLeQuery = useLegalEntity(individualLegalEntityId ?? skipToken);
7250
- const parentLeQuery = useLegalEntity(parentLegalEntityId ?? skipToken);
7251
- const rootLeQuery = useLegalEntity(ROOT_LE);
7252
- const isLoading = individualLegalEntityId && individualLeQuery.isLoading || parentLegalEntityId && parentLeQuery.isLoading || rootLeQuery.isLoading;
7253
- const capabilityProblems = useCapabilityProblems();
7254
- const country = getLegalEntityCountry(
7255
- individualLeQuery.data ?? parentLeQuery.data ?? rootLeQuery.data
7256
- );
7257
- const problems = capabilityProblems && individualLegalEntityId ? getProblemsForEntity(capabilityProblems, EntityType.LEGAL_ENTITY, individualLegalEntityId) : void 0;
7258
- const trustMembers = useTrustMembers();
7259
- const trustMember = newMember ?? trustMembers.find(
7260
- (tm) => tm.trustMemberType !== "undefinedBeneficiary" && tm.legalEntityId === individualLegalEntityId
7261
- );
7262
- const unincorporatedPartnershipMembers = useUnincorporatedPartnershipMembers();
7263
- const unincorporatedPartnershipMember = newMember ?? unincorporatedPartnershipMembers.find(
7264
- (member) => member.legalEntityId === individualLegalEntityId
7265
- );
7266
- const { isExperimentEnabled } = useExperimentsContext();
7267
- const isOnfidoAutofillFlow = isOnfidoAutofillFlowEnabled(country, taskType, isExperimentEnabled);
7268
- if (isLoading) {
7269
- return /* @__PURE__ */ jsx(Loader, {});
7270
- }
7271
- return isOnfidoAutofillFlow ? /* @__PURE__ */ jsx(
7272
- IndividualOnfidoDropin,
7273
- {
7274
- taskType,
7275
- legalEntityResponse: individualLeQuery.data,
7276
- parentLegalEntity: parentLeQuery.data,
7277
- problems,
7278
- country,
7279
- asModal,
7280
- hideSidebar,
7281
- isTargetLegalEntityType,
7282
- onSubmit,
7283
- trustedFields,
7284
- trustedFieldsProvider,
7285
- trustedRoles,
7286
- taskName,
7287
- handleBackClick,
7288
- handleCloseClick,
7289
- handleHomeClick
7290
- }
7291
- ) : /* @__PURE__ */ jsx(
7292
- IndividualDropin,
7293
- {
7294
- taskType,
7295
- legalEntityResponse: individualLeQuery.data,
7296
- parentLegalEntity: parentLeQuery.data,
7297
- trustMember: trustMember ?? unincorporatedPartnershipMember,
7298
- problems,
7299
- country,
7300
- asModal,
7301
- hideSidebar,
7302
- isTargetLegalEntityType,
7303
- onSubmit,
7304
- trustedFields,
7305
- trustedFieldsProvider,
7306
- trustedRoles,
7307
- taskName,
7308
- handleBackClick,
7309
- handleCloseClick,
7310
- handleHomeClick
7311
- }
7312
- );
7313
- }
7314
- const IndividualOuter$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
7315
- __proto__: null,
7316
- IndividualOuter
7317
- }, Symbol.toStringTag, { value: "Module" }));
7318
7188
  const CreateIndividualComponent = ({
7319
7189
  legalEntityId,
7320
7190
  onSubmitSuccess,
@@ -7325,6 +7195,9 @@ const CreateIndividualComponent = ({
7325
7195
  if (!legalEntityId) {
7326
7196
  throw new Error("Must provide a legalEntityId");
7327
7197
  }
7198
+ const { data: individualLe } = useLegalEntity(legalEntityId);
7199
+ const capabilityProblems = useCapabilityProblems();
7200
+ const { isExperimentEnabled } = useExperimentsContext();
7328
7201
  const handleOnClose = () => {
7329
7202
  if (modalView) {
7330
7203
  onUnmount == null ? void 0 : onUnmount();
@@ -7337,47 +7210,61 @@ const CreateIndividualComponent = ({
7337
7210
  }
7338
7211
  onSubmitSuccess == null ? void 0 : onSubmitSuccess(d);
7339
7212
  };
7340
- return /* @__PURE__ */ jsx(
7341
- IndividualOuter,
7342
- {
7343
- taskType: TaskTypes.INDIVIDUAL,
7344
- taskName: "individualDetails",
7345
- individualLegalEntityId: legalEntityId,
7346
- asModal: modalView,
7347
- hideSidebar: true,
7348
- onSubmit,
7349
- handleHomeClick: handleOnClose
7350
- }
7213
+ if (!individualLe) {
7214
+ return /* @__PURE__ */ jsx(Loader, {});
7215
+ }
7216
+ const country = getLegalEntityCountry(individualLe);
7217
+ const problems = capabilityProblems ? getProblemsForEntity(capabilityProblems, EntityType.LEGAL_ENTITY, individualLe.id) : void 0;
7218
+ const isOnfidoAutofillFlow = isOnfidoAutofillFlowEnabled(
7219
+ country,
7220
+ TaskTypes.INDIVIDUAL,
7221
+ isExperimentEnabled
7351
7222
  );
7223
+ const props = {
7224
+ taskType: TaskTypes.INDIVIDUAL,
7225
+ taskName: "individualDetails",
7226
+ legalEntityResponse: individualLe,
7227
+ problems,
7228
+ country,
7229
+ asModal: modalView,
7230
+ hideSidebar: true,
7231
+ onSubmit,
7232
+ handleHomeClick: handleOnClose,
7233
+ handleCloseClick: handleOnClose
7234
+ };
7235
+ return isOnfidoAutofillFlow ? /* @__PURE__ */ jsx(IndividualOnfidoDropin, { ...props }) : /* @__PURE__ */ jsx(IndividualDropin, { ...props });
7352
7236
  };
7353
7237
  export {
7354
- mapCreateOrUpdateTransferInstrumentErrorMessageToTranslatable as A,
7355
- augmentWithCountryConfigs as B,
7238
+ isBankStatementUploadError as A,
7239
+ mapCreateOrUpdateTransferInstrumentErrorMessageToTranslatable as B,
7356
7240
  CreateIndividualComponent as C,
7357
7241
  getFileExtention as D,
7358
- useTrustMembers as E,
7242
+ Confirm as E,
7359
7243
  FormRouterContextProvider as F,
7360
- useSingpassMyInfoLogin as G,
7361
- contactDetailsValidationRules as H,
7362
- useValidatePhoneNumberImperatively as I,
7363
- useMultiForm as J,
7364
- FormContextProvider as K,
7365
- FormFlow as L,
7366
- getFieldsWithExistingData as M,
7367
- useCapabilityProblems as N,
7368
- getProblemsForEntity as O,
7369
- IndividualOuter$1 as P,
7244
+ useCapabilityProblems as G,
7245
+ useSingpassMyInfoLogin as H,
7246
+ contactDetailsValidationRules as I,
7247
+ useValidatePhoneNumberImperatively as J,
7248
+ useMultiForm as K,
7249
+ FormContextProvider as L,
7250
+ FormFlow as M,
7251
+ getProblemsForEntity as N,
7252
+ getFieldsWithExistingData as O,
7253
+ ProviderButton as P,
7254
+ isOnfidoAutofillFlowEnabled as Q,
7255
+ IndividualOnfidoDropin as R,
7370
7256
  SOLE_PROP_COUNTRIES as S,
7371
7257
  TileGroup as T,
7258
+ IndividualDropin as U,
7372
7259
  useUpdateLegalEntity as a,
7373
- useAssociatedLegalEntity as b,
7374
- useScenarioConfiguration as c,
7375
- getPropsFromConfigurations as d,
7376
- getRequiredForms as e,
7260
+ useScenarioConfiguration as b,
7261
+ getPropsFromConfigurations as c,
7262
+ getRequiredForms as d,
7263
+ addValidityToForms as e,
7377
7264
  formatObject as f,
7378
7265
  getProp as g,
7379
- addValidityToForms as h,
7380
- useFormComposer as i,
7266
+ useFormComposer as h,
7267
+ isEeaCountry as i,
7381
7268
  composePerScenarioFormConfigurations as j,
7382
7269
  fieldsPerScenario as k,
7383
7270
  isValidationError as l,
@@ -7390,9 +7277,9 @@ export {
7390
7277
  mapWith as s,
7391
7278
  trackNavigation as t,
7392
7279
  useCreateLegalEntity as u,
7393
- documentApiUtils as v,
7394
- useUnifyLoadingStatus as w,
7395
- omitObscuredFieldsIfUnchanged as x,
7396
- isIdDocumentUploadError as y,
7397
- isBankStatementUploadError as z
7280
+ augmentWithCountryConfigs as v,
7281
+ documentApiUtils as w,
7282
+ useUnifyLoadingStatus as x,
7283
+ omitObscuredFieldsIfUnchanged as y,
7284
+ isIdDocumentUploadError as z
7398
7285
  };