@adyen/kyc-components 2.50.4 → 2.51.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 (136) hide show
  1. package/dist/es/adyen-kyc-components.es.js +1627 -1016
  2. package/dist/es/arrow-left-BLTu7dpi.js +5 -0
  3. package/dist/es/{arrow-right-C4o8oS1C.js → arrow-right-BntH-Qlw.js} +2 -2
  4. package/dist/es/{bin-CGwewvcn.js → bin-Bj6qtSTy.js} +1 -1
  5. package/dist/es/check-ZYTuehgv.js +5 -0
  6. package/dist/es/checkmark-DxCwXAIK.js +5 -0
  7. package/dist/es/{checkmark-small-D_9HLctx.js → checkmark-small-BsdIbd2G.js} +1 -1
  8. package/dist/es/{chevron-down-C8-1xmDI.js → chevron-down-BIOZPblQ.js} +2 -2
  9. package/dist/es/chevron-left-B_GtBez_.js +11 -0
  10. package/dist/es/{chevron-right-BDZzxAre.js → chevron-right-DTyHLnb5.js} +2 -2
  11. package/dist/es/{chevron-up-BLtnROd5.js → chevron-up-0etcs99k.js} +1 -1
  12. package/dist/es/{company-2-JG34IScE.js → company-2-B3NuVpZ7.js} +1 -1
  13. package/dist/es/company-CYi9zTX1.js +5 -0
  14. package/dist/es/contract-Ca5T1p29.js +5 -0
  15. package/dist/es/controlling-person-BQledQz3.js +5 -0
  16. package/dist/es/{cross-D-SQig6J.js → cross-_WDtYXwH.js} +2 -2
  17. package/dist/es/decision-maker-IOjBp4Cn.js +5 -0
  18. package/dist/es/document-Daivbade.js +5 -0
  19. package/dist/es/document-blurred-gtj03M4x.js +28 -0
  20. package/dist/es/document-cut-off-D2vCeeIS.js +23 -0
  21. package/dist/es/document-expired-_4Syh1xW.js +29 -0
  22. package/dist/es/document-front-9Glzn7ZR.js +21 -0
  23. package/dist/es/{download-COfxdarq.js → download-6WUrs5fL.js} +2 -2
  24. package/dist/es/edit-vu4T5TEr.js +5 -0
  25. package/dist/es/field-error-Dc-vt_Ng.js +5 -0
  26. package/dist/es/id-blurred-A45CVnPk.js +50 -0
  27. package/dist/es/id-cut-off-DMoJYcGr.js +46 -0
  28. package/dist/es/id-front-CTIDY7Nu.js +43 -0
  29. package/dist/es/id-glare-DRN1UgPb.js +40 -0
  30. package/dist/es/id-verification-instant-JpZYE7gU.js +49 -0
  31. package/dist/es/id-verification-manual-CnkUMBXD.js +46 -0
  32. package/dist/es/image-C5KqhIDJ.js +8 -0
  33. package/dist/es/{info-circle-DkHN1ugA.js → info-circle-DvvWfz1E.js} +1 -1
  34. package/dist/es/light-bulb-B9fSxkAk.js +5 -0
  35. package/dist/es/{location-B1Til-7Q.js → location-6Th9xn5O.js} +1 -1
  36. package/dist/es/more-horiz-BW6d91R8.js +5 -0
  37. package/dist/es/new-document-Cpqmj9Kl.js +5 -0
  38. package/dist/es/onfido-logo-DWX1GbUz.js +9 -0
  39. package/dist/es/owners-DT55tjrZ.js +5 -0
  40. package/dist/es/passport-blurred-Cw3cn4-0.js +50 -0
  41. package/dist/es/passport-cut-off-B0WAEH9S.js +47 -0
  42. package/dist/es/passport-front-DOkc7OdE.js +43 -0
  43. package/dist/es/passport-glare-DZiLpHLG.js +41 -0
  44. package/dist/es/payout-W95Oslv1.js +5 -0
  45. package/dist/es/payout-verification-instant-D9r3JgYA.js +31 -0
  46. package/dist/es/payout-verification-manual-BVzHrwSY.js +32 -0
  47. package/dist/es/pci-5RzbfIJy.js +5 -0
  48. package/dist/es/plaid-logo-CldAG-6v.js +13 -0
  49. package/dist/es/{plus-DAnbeoyS.js → plus-DUFyqbPe.js} +1 -1
  50. package/dist/es/remove-CR7nAYBO.js +5 -0
  51. package/dist/es/{review-CeQeKHXH.js → review-C4CnZ2XP.js} +1 -1
  52. package/dist/es/save-DsoIf4Q0.js +5 -0
  53. package/dist/es/search-3G14C_IW.js +5 -0
  54. package/dist/es/{signatory-BVoLPYPu.js → signatory-BUpU_luQ.js} +1 -1
  55. package/dist/es/store-CNHDWfwi.js +5 -0
  56. package/dist/es/tink-logo-CPPNzyT1.js +5 -0
  57. package/dist/es/trust-PKlVgWsv.js +5 -0
  58. package/dist/es/trustly-logo-QZ7eqdLL.js +11 -0
  59. package/dist/es/upload-CA264b-V.js +8 -0
  60. package/dist/es/{user-D6swzlYs.js → user-Dt1-0v-v.js} +1 -1
  61. package/dist/es/{user-business-CwS5j1qX.js → user-business-BZ3Ko-Oi.js} +1 -1
  62. package/dist/es/{users-3-BdjQ9rEA.js → users-3-Dshq7JI-.js} +1 -1
  63. package/dist/es/warning-vQPFTjLC.js +5 -0
  64. package/dist/es/wrong-BFDOMiyi.js +5 -0
  65. package/dist/style.css +284 -152
  66. package/dist/types/components/AdditionalInformation/component/AdditionalInformationComponent.d.ts +1 -1
  67. package/dist/types/components/BasicInformation/component/BasicInformationComponent.d.ts +2 -2
  68. package/dist/types/components/BasicInformation/types.d.ts +1 -1
  69. package/dist/types/components/BusinessDetails/forms.d.ts +1 -1
  70. package/dist/types/components/Dropins/DropinLayout/DropinLayout.d.ts +1 -1
  71. package/dist/types/components/Dropins/DropinLayout/EmbeddedActionBar/EmbeddedActionBar.d.ts +7 -0
  72. package/dist/types/components/Dropins/DropinLayout/types.d.ts +3 -0
  73. package/dist/types/components/Dropins/FormWrapper/FormWrapper.d.ts +4 -1
  74. package/dist/types/components/Dropins/IndividualDropin/components/IndividualDropinComponent.d.ts +1 -1
  75. package/dist/types/components/Dropins/types.d.ts +1 -0
  76. package/dist/types/components/EmbeddedDropins/CreateIndividualComponent/CreateIndividualComponent.d.ts +4 -1
  77. package/dist/types/components/EmbeddedDropins/ManageIndividualComponent/ManageIndividualComponent.d.ts +6 -0
  78. package/dist/types/components/EmbeddedDropins/ViewVerificationStatus/ViewVerificationStatusComponent.d.ts +1 -2
  79. package/dist/types/components/EmbeddedDropins/ViewVerificationStatus/types.d.ts +1 -9
  80. package/dist/types/components/IdVerificationMethod/idVerificationMethodMetadata.d.ts +5 -4
  81. package/dist/types/components/Individual/types.d.ts +1 -0
  82. package/dist/types/components/LegalEntityStatus/LegalEntityStatus.d.ts +9 -0
  83. package/dist/types/components/PayoutVerificationMethod/payoutVerificationMethodMetadata.d.ts +4 -4
  84. package/dist/types/components/TrustRegistrationDetails/validate.d.ts +1 -0
  85. package/dist/types/components/index.d.ts +2 -0
  86. package/dist/types/components/internal/Address/validate.d.ts +2 -0
  87. package/dist/types/components/internal/Alert/types.d.ts +1 -1
  88. package/dist/types/components/internal/DocumentGuidance/types.d.ts +3 -1
  89. package/dist/types/components/internal/EmbeddedStatus/EmbeddedStatus.d.ts +16 -0
  90. package/dist/types/components/internal/EmbeddedStatus/statusToTag.d.ts +12 -0
  91. package/dist/types/components/internal/Icon/Icon.d.ts +4 -47
  92. package/dist/types/components/internal/LegalCompanyNameField/fieldConfig.d.ts +2 -0
  93. package/dist/types/components/internal/NewModal/Modal.d.ts +11 -0
  94. package/dist/types/components/internal/Skeleton/Skeleton.d.ts +8 -0
  95. package/dist/types/components/internal/Svg/Svg.d.ts +13 -0
  96. package/dist/types/components/internal/Svg/index.d.ts +1 -0
  97. package/dist/types/components/internal/Svg/svgs.d.ts +68 -0
  98. package/dist/types/core/Context/ConfigurationApiContext/ConfigurationApiContext.d.ts +0 -1
  99. package/dist/types/core/Context/CoreContext.d.ts +2 -0
  100. package/dist/types/core/Context/ExperimentContext/types.d.ts +1 -1
  101. package/dist/types/core/hooks/useFormComposer.d.ts +1 -0
  102. package/dist/types/core/hooks/usePolling.d.ts +9 -0
  103. package/dist/types/core/models/api/view-verification-status.d.ts +1 -1
  104. package/dist/types/core/models/file.d.ts +1 -0
  105. package/dist/types/core/models/sole-prop.d.ts +2 -4
  106. package/dist/types/utils/coerceError.d.ts +1 -0
  107. package/dist/types/utils/mapping/documentGuidanceMap.d.ts +1 -1
  108. package/dist/types/utils/regex/patternValidators.d.ts +1 -0
  109. package/dist/types/utils/validatorUtils.d.ts +3 -2
  110. package/package.json +1 -1
  111. package/dist/es/arrow-left-CCxYxfCP.js +0 -5
  112. package/dist/es/check-CeSLN4_9.js +0 -5
  113. package/dist/es/checkmark-DEh9MPYR.js +0 -5
  114. package/dist/es/chevron-left-DSyI3arz.js +0 -11
  115. package/dist/es/company-D5_F_6SW.js +0 -5
  116. package/dist/es/contract-C6wDy9zU.js +0 -5
  117. package/dist/es/controlling-person-C4KoSyi2.js +0 -5
  118. package/dist/es/decision-maker-Cef3-OzY.js +0 -5
  119. package/dist/es/document-Cg4kZHpA.js +0 -5
  120. package/dist/es/edit--fDhojib.js +0 -5
  121. package/dist/es/field-error-WElEN1mN.js +0 -5
  122. package/dist/es/light-bulb-DEUhbRWP.js +0 -5
  123. package/dist/es/more-horiz-BieZKfy3.js +0 -5
  124. package/dist/es/new-document-BEAJnXCG.js +0 -5
  125. package/dist/es/owners-D1pksb86.js +0 -5
  126. package/dist/es/payout-BFiI--HY.js +0 -5
  127. package/dist/es/pci-DMQLRoAn.js +0 -5
  128. package/dist/es/remove-CEmd9YX7.js +0 -5
  129. package/dist/es/save-vVXwP4OB.js +0 -5
  130. package/dist/es/search-hf3HRVbu.js +0 -5
  131. package/dist/es/store-D2z639xh.js +0 -5
  132. package/dist/es/trust-CpcaQaV7.js +0 -5
  133. package/dist/es/warning-99uFf1WU.js +0 -5
  134. package/dist/es/wrong-1wvh7nZe.js +0 -5
  135. package/dist/types/core/Services/agnostic/get-images.d.ts +0 -1
  136. package/dist/types/core/Services/agnostic/index.d.ts +0 -1
@@ -8,8 +8,8 @@ import debounce from "lodash-es/debounce";
8
8
  import isEmpty$1 from "lodash-es/isEmpty";
9
9
  import isISIN from "validator/es/lib/isISIN.js";
10
10
  import OpenBankingSDK from "@adyen/openbankingsdk";
11
- import noop$1 from "lodash-es/noop";
12
11
  import range from "lodash-es/range";
12
+ import noop$1 from "lodash-es/noop";
13
13
  import { jsxs as jsxs$1, jsx as jsx$1 } from "preact/compat/jsx-runtime";
14
14
  import "@adyen/adyen-document-viewer/dist/adyen-document-viewer.min.css";
15
15
  import AdyenDocumentViewer from "@adyen/adyen-document-viewer";
@@ -78,6 +78,7 @@ const defaultTrans = {
78
78
  invalidFormat: "Invalid format",
79
79
  formatIsCorrect: "Format is correct",
80
80
  checkForTypos: "Check for typos and try again",
81
+ fieldMustContainAtLeast: "%{fieldName} must contain at least %{minLength} characters",
81
82
  nameMustContainLetters: "Name must contain letters. Check for typos and try again.",
82
83
  fieldIsRequired: "Field is required",
83
84
  optional: "(optional)",
@@ -128,9 +129,11 @@ const defaultTrans = {
128
129
  invalidFormatBankStatementDescription: "Please ensure your input contains solely letters, digits, currency codes, and the specified special characters: -._,:;'*!@#%()+?¿/「」",
129
130
  residencyCountry: "Country/region of residence",
130
131
  basicInformation: "Basic information",
131
- dragYourFilesHereOr: "Drag your files here, or",
132
- browse: "Browse",
133
- supports: "Supports: %{fileTypes}. Size up to %{maxSize}. Maximum %{maxFiles} page.",
132
+ dropFileToUpload: "Drop file to upload",
133
+ browseFiles: "Browse files",
134
+ supportedFileTypes: "Supported file types: %{fileTypes}",
135
+ maxFileSize: "Max file size: %{maxSize}. Maximal 1 page.",
136
+ upToFiles: "Up to %{maxFiles} file(s).",
134
137
  complete: "Complete",
135
138
  summary: "Summary",
136
139
  summaryLegalCaption: "By submitting this summary you are confirming the following; I confirm (on behalf of the company that I am authorized to represent), that the information and supporting documentation provided during this KYC process is accurate and up-to-date, and therefore correctly represents the current state of affairs.",
@@ -540,6 +543,7 @@ const defaultTrans = {
540
543
  vatNumber: "VAT number",
541
544
  vatRegistrationNumber: "VAT registration number",
542
545
  regonKrsNumber: "REGON / KRS number",
546
+ rejected: "Rejected",
543
547
  identificationNumber: "Identification number",
544
548
  whichTypeOfRegistrationNumberDoYouHave: "Which type of registration number do you have?",
545
549
  whichTypeOfIdNumberDoYouHave: "Which type of identification number do you have?",
@@ -936,7 +940,7 @@ const defaultTrans = {
936
940
  legalCompanyName__helperText__AU: "Enter the name exactly as it is on your Australian Securities and Investment Commission's (ASIC).",
937
941
  legalCompanyName__helperText__NL: "Enter the name exactly as it is on your Chamber of Commerce registration.",
938
942
  legalCompanyName__helperText__US: "Enter the name exactly as it appears on your Secretary of State Registration.",
939
- legalCompanyName__helperText__US__business: "The legal name is used to identify a business with the government. This information came from a trusted data source and can not be edited.",
943
+ legalCompanyName__helperText__US__business: "The legal name is used to identify a business with the government; enter it exactly as it appears on your government or legal forms.",
940
944
  legalCompanyName__helperText__PR: "Enter the name exactly as it appears on your Department of State Registration.",
941
945
  legalCompanyName__helperText__SG: "Enter the name exactly as it is on your Accounting and Corporate Regulatory Authority (ACRA) BizFile.",
942
946
  legalCompanyName__helperText__HK: "Enter the name exactly as it is on your Hong Kong Companies Registry's Certificate of Incorporation.",
@@ -945,10 +949,10 @@ const defaultTrans = {
945
949
  dbaName: "Doing Business As (DBA) name",
946
950
  country: "Country/region",
947
951
  countryRegionOfEstablishment: "Country/region of establishment",
948
- country__US__business: "Where is your business located?",
952
+ country__US__business: "Where is your business registered?",
949
953
  businessName: "Business name",
950
954
  stateOrProvince: "State or province",
951
- stateOrProvince__US__business: "In which state is your business headquartered?",
955
+ stateOrProvince__US__business: "In which state is your business registered?",
952
956
  stateOrProvince__placeHolder: "Select a state or province",
953
957
  stateOrProvince__placeHolder__US: "Select one...",
954
958
  registrationNumber: "Registration number",
@@ -988,8 +992,6 @@ const defaultTrans = {
988
992
  companyTaxDocumentFormHeading: "Upload a tax document",
989
993
  companyTaxDocumentFormDescription: "We need an official document to verify your organization’s tax details.",
990
994
  businessSelection__heading: "Select your business",
991
- businessSelection__searching: "We're searching for your business - this can take a few moments",
992
- businessSelection__verifying: "We're processing your business details",
993
995
  businessSelection__footer: "Can't find your business?",
994
996
  businessSelection__footerButton: "Add details manually",
995
997
  businessSelection__invalidTin: "This company's TIN doesn't match yours",
@@ -998,9 +1000,10 @@ const defaultTrans = {
998
1000
  thisIsMyBusiness: "This is my business",
999
1001
  basicInformationFormName: "Basic details",
1000
1002
  basicInformationFormHeading: "Basic details about your business",
1003
+ basicInformationFormDescription: "In the next steps, we'll collect and verify details about your business in compliance with financial regulations. Learn about how your data is managed in our",
1004
+ basicInformationFormDescriptionLink: "Privacy Statement.",
1001
1005
  additionalInformationFormName: "Additional details",
1002
1006
  additionalInformationFormHeading: "Additional business details",
1003
- additionalInformationFormDescription: "To continue, we need to know a little bit more about your business and it's operations. ",
1004
1007
  showDetails: "Show details",
1005
1008
  hideDetails: "Hide details",
1006
1009
  showOnMap: "Show on map",
@@ -1860,12 +1863,13 @@ const getFormattingRegEx = (specChars, flags = "g") => new RegExp(`[${specChars}
1860
1863
  const trimValWithOneSpace = (val) => val.trimStart().replace(/\s+/g, " ");
1861
1864
  const EMOJI_REGEX = new RegExp("(\\p{Emoji}\\uFE0F|\\p{Emoji_Presentation}|\\p{Extended_Pictographic})", "gu");
1862
1865
  const NO_ALPHABET_REGEX = /^[^a-zA-Z]*$/;
1863
- const ALLOWED_CHARS_REGEX = /^[\w\s\-—./']*$/;
1866
+ const INDIVIDUAL_VALID_CHAR_REGEX = /^[\w\s\-—./']*$/;
1867
+ const OTHER_ENTITIES_VALID_CHAR_REGEX = /^[\w\s,.;:\-—&!?@()"'/\\+]+$/;
1864
1868
  const matchesRegex = (regex, input) => isString(input) && regex.test(input ?? "");
1865
1869
  const hasRepeatedCharacters = (input) => !isEmpty(input) && new Set(input).size === 1;
1866
- const isValidInputLength = (input) => !isEmpty(input) && input.length > 1;
1870
+ const isValidMinLength = (input, minLength = 1) => !isEmpty(input) && input.length >= minLength;
1867
1871
  const isInvalidName = (input) => {
1868
- const invalidNames = /* @__PURE__ */ new Set(["ABCD", "ABCDE", "ABCDEF", "ABCDEFG", "My Customer", "An other", "not applicable", "not app", "null"]);
1872
+ const invalidNames = /* @__PURE__ */ new Set(["John Doe", "Jane Doe", "ABCD", "ABCDE", "ABCDEF", "ABCDEFG", "My Customer", "An other", "n/a", "not applicable", "n/A", "N/A", "N/a", "N\\ /A", "not app", "null"]);
1869
1873
  return invalidNames.has(input || "");
1870
1874
  };
1871
1875
  let suppressed = false;
@@ -1887,71 +1891,111 @@ const createLogger = (namespace) => {
1887
1891
  });
1888
1892
  return methods;
1889
1893
  };
1890
- const icons = {
1891
- "arrow-left": lazy(() => import("./arrow-left-CCxYxfCP.js")),
1892
- "arrow-right": lazy(() => import("./arrow-right-C4o8oS1C.js")),
1893
- bin: lazy(() => import("./bin-CGwewvcn.js")),
1894
- check: lazy(() => import("./check-CeSLN4_9.js")),
1895
- checkmark: lazy(() => import("./checkmark-DEh9MPYR.js")),
1896
- "checkmark-small": lazy(() => import("./checkmark-small-D_9HLctx.js")),
1897
- "chevron-down": lazy(() => import("./chevron-down-C8-1xmDI.js")),
1898
- "chevron-right": lazy(() => import("./chevron-right-BDZzxAre.js")),
1899
- "chevron-left": lazy(() => import("./chevron-left-DSyI3arz.js")),
1900
- "chevron-up": lazy(() => import("./chevron-up-BLtnROd5.js")),
1901
- company: lazy(() => import("./company-D5_F_6SW.js")),
1902
- "company-2": lazy(() => import("./company-2-JG34IScE.js")),
1903
- contract: lazy(() => import("./contract-C6wDy9zU.js")),
1904
- "controlling-person": lazy(() => import("./controlling-person-C4KoSyi2.js")),
1905
- cross: lazy(() => import("./cross-D-SQig6J.js")),
1906
- "decision-maker": lazy(() => import("./decision-maker-Cef3-OzY.js")),
1907
- document: lazy(() => import("./document-Cg4kZHpA.js")),
1908
- download: lazy(() => import("./download-COfxdarq.js")),
1909
- edit: lazy(() => import("./edit--fDhojib.js")),
1910
- "field-error": lazy(() => import("./field-error-WElEN1mN.js")),
1911
- "info-circle": lazy(() => import("./info-circle-DkHN1ugA.js")),
1912
- "light-bulb": lazy(() => import("./light-bulb-DEUhbRWP.js")),
1913
- location: lazy(() => import("./location-B1Til-7Q.js")),
1914
- "more-horiz": lazy(() => import("./more-horiz-BieZKfy3.js")),
1915
- "new-document": lazy(() => import("./new-document-BEAJnXCG.js")),
1916
- owners: lazy(() => import("./owners-D1pksb86.js")),
1917
- payout: lazy(() => import("./payout-BFiI--HY.js")),
1918
- pci: lazy(() => import("./pci-DMQLRoAn.js")),
1919
- plus: lazy(() => import("./plus-DAnbeoyS.js")),
1920
- remove: lazy(() => import("./remove-CEmd9YX7.js")),
1921
- review: lazy(() => import("./review-CeQeKHXH.js")),
1922
- save: lazy(() => import("./save-vVXwP4OB.js")),
1923
- search: lazy(() => import("./search-hf3HRVbu.js")),
1924
- signatory: lazy(() => import("./signatory-BVoLPYPu.js")),
1925
- store: lazy(() => import("./store-D2z639xh.js")),
1926
- trust: lazy(() => import("./trust-CpcaQaV7.js")),
1927
- user: lazy(() => import("./user-D6swzlYs.js")),
1928
- "user-business": lazy(() => import("./user-business-CwS5j1qX.js")),
1929
- "users-3": lazy(() => import("./users-3-BdjQ9rEA.js")),
1930
- warning: lazy(() => import("./warning-99uFf1WU.js")),
1931
- wrong: lazy(() => import("./wrong-1wvh7nZe.js"))
1932
- };
1933
- const logger$D = createLogger("Icon");
1934
- const Icon = ({
1894
+ const svgs = {
1895
+ // icons
1896
+ "arrow-left": lazy(() => import("./arrow-left-BLTu7dpi.js")),
1897
+ "arrow-right": lazy(() => import("./arrow-right-BntH-Qlw.js")),
1898
+ bin: lazy(() => import("./bin-Bj6qtSTy.js")),
1899
+ check: lazy(() => import("./check-ZYTuehgv.js")),
1900
+ checkmark: lazy(() => import("./checkmark-DxCwXAIK.js")),
1901
+ "checkmark-small": lazy(() => import("./checkmark-small-BsdIbd2G.js")),
1902
+ "chevron-down": lazy(() => import("./chevron-down-BIOZPblQ.js")),
1903
+ "chevron-right": lazy(() => import("./chevron-right-DTyHLnb5.js")),
1904
+ "chevron-left": lazy(() => import("./chevron-left-B_GtBez_.js")),
1905
+ "chevron-up": lazy(() => import("./chevron-up-0etcs99k.js")),
1906
+ company: lazy(() => import("./company-CYi9zTX1.js")),
1907
+ "company-2": lazy(() => import("./company-2-B3NuVpZ7.js")),
1908
+ contract: lazy(() => import("./contract-Ca5T1p29.js")),
1909
+ "controlling-person": lazy(() => import("./controlling-person-BQledQz3.js")),
1910
+ cross: lazy(() => import("./cross-_WDtYXwH.js")),
1911
+ "decision-maker": lazy(() => import("./decision-maker-IOjBp4Cn.js")),
1912
+ document: lazy(() => import("./document-Daivbade.js")),
1913
+ download: lazy(() => import("./download-6WUrs5fL.js")),
1914
+ edit: lazy(() => import("./edit-vu4T5TEr.js")),
1915
+ "field-error": lazy(() => import("./field-error-Dc-vt_Ng.js")),
1916
+ "info-circle": lazy(() => import("./info-circle-DvvWfz1E.js")),
1917
+ image: lazy(() => import("./image-C5KqhIDJ.js")),
1918
+ "light-bulb": lazy(() => import("./light-bulb-B9fSxkAk.js")),
1919
+ location: lazy(() => import("./location-6Th9xn5O.js")),
1920
+ "more-horiz": lazy(() => import("./more-horiz-BW6d91R8.js")),
1921
+ "new-document": lazy(() => import("./new-document-Cpqmj9Kl.js")),
1922
+ owners: lazy(() => import("./owners-DT55tjrZ.js")),
1923
+ payout: lazy(() => import("./payout-W95Oslv1.js")),
1924
+ pci: lazy(() => import("./pci-5RzbfIJy.js")),
1925
+ plus: lazy(() => import("./plus-DUFyqbPe.js")),
1926
+ remove: lazy(() => import("./remove-CR7nAYBO.js")),
1927
+ review: lazy(() => import("./review-C4CnZ2XP.js")),
1928
+ save: lazy(() => import("./save-DsoIf4Q0.js")),
1929
+ search: lazy(() => import("./search-3G14C_IW.js")),
1930
+ signatory: lazy(() => import("./signatory-BUpU_luQ.js")),
1931
+ store: lazy(() => import("./store-CNHDWfwi.js")),
1932
+ trust: lazy(() => import("./trust-PKlVgWsv.js")),
1933
+ user: lazy(() => import("./user-Dt1-0v-v.js")),
1934
+ upload: lazy(() => import("./upload-CA264b-V.js")),
1935
+ "user-business": lazy(() => import("./user-business-BZ3Ko-Oi.js")),
1936
+ "users-3": lazy(() => import("./users-3-Dshq7JI-.js")),
1937
+ warning: lazy(() => import("./warning-vQPFTjLC.js")),
1938
+ wrong: lazy(() => import("./wrong-BFDOMiyi.js")),
1939
+ // images
1940
+ "document-blurred": lazy(() => import("./document-blurred-gtj03M4x.js")),
1941
+ "document-cutoff": lazy(() => import("./document-cut-off-D2vCeeIS.js")),
1942
+ "document-expired": lazy(() => import("./document-expired-_4Syh1xW.js")),
1943
+ "document-front": lazy(() => import("./document-front-9Glzn7ZR.js")),
1944
+ "id-blurred": lazy(() => import("./id-blurred-A45CVnPk.js")),
1945
+ "id-cutoff": lazy(() => import("./id-cut-off-DMoJYcGr.js")),
1946
+ "id-front": lazy(() => import("./id-front-CTIDY7Nu.js")),
1947
+ "id-glare": lazy(() => import("./id-glare-DRN1UgPb.js")),
1948
+ "passport-blurred": lazy(() => import("./passport-blurred-Cw3cn4-0.js")),
1949
+ "passport-cutoff": lazy(() => import("./passport-cut-off-B0WAEH9S.js")),
1950
+ "passport-front": lazy(() => import("./passport-front-DOkc7OdE.js")),
1951
+ "passport-glare": lazy(() => import("./passport-glare-DZiLpHLG.js")),
1952
+ "id-verification-instant": lazy(() => import("./id-verification-instant-JpZYE7gU.js")),
1953
+ "id-verification-manual": lazy(() => import("./id-verification-manual-CnkUMBXD.js")),
1954
+ "payout-verification-instant": lazy(() => import("./payout-verification-instant-D9r3JgYA.js")),
1955
+ "payout-verification-manual": lazy(() => import("./payout-verification-manual-BVzHrwSY.js")),
1956
+ "singpass-verification-instant": lazy(() => Promise.resolve().then(() => singpassVerificationInstant)),
1957
+ "singpass-verification-manual": lazy(() => Promise.resolve().then(() => singpassVerificationManual)),
1958
+ // id verification
1959
+ "onfido-logo": lazy(() => import("./onfido-logo-DWX1GbUz.js")),
1960
+ "tink-logo": lazy(() => import("./tink-logo-CPPNzyT1.js")),
1961
+ "singpass-logo": lazy(() => Promise.resolve().then(() => singpassLogo)),
1962
+ // payout verification
1963
+ "plaid-logo": lazy(() => import("./plaid-logo-CldAG-6v.js")),
1964
+ "trustly-logo": lazy(() => import("./trustly-logo-QZ7eqdLL.js"))
1965
+ };
1966
+ const logger$E = createLogger("Icon");
1967
+ const Svg = ({
1935
1968
  className,
1936
1969
  name,
1937
- testId
1970
+ testId,
1971
+ alt,
1972
+ type
1938
1973
  }) => {
1939
- const LazyLoadedIcon = icons[name];
1940
- if (!LazyLoadedIcon) {
1941
- logger$D.error(`No such icon: "${name}"`);
1974
+ const LazyLoadedSvg = svgs[name];
1975
+ if (!LazyLoadedSvg) {
1976
+ logger$E.error(`No such svg: "${name}"`);
1942
1977
  return null;
1943
1978
  }
1944
1979
  return jsx("span", {
1945
- className: cx("adyen-kyc-icon", `adyen-kyc-icon-${name}`, className),
1946
- role: "img",
1947
- "aria-hidden": true,
1980
+ className: cx(`adyen-kyc-${type} adyen-kyc-${type}-${name}`, className),
1948
1981
  "data-testid": testId,
1949
1982
  children: jsx(Suspense, {
1950
1983
  fallback: null,
1951
- children: jsx(LazyLoadedIcon, {})
1984
+ children: jsx(LazyLoadedSvg, {
1985
+ alt,
1986
+ "aria-hidden": type === "icon"
1987
+ })
1952
1988
  })
1953
1989
  });
1954
1990
  };
1991
+ const Icon = ({
1992
+ name,
1993
+ ...props
1994
+ }) => jsx(Svg, {
1995
+ type: "icon",
1996
+ name,
1997
+ ...props
1998
+ });
1955
1999
  const Loader = ({
1956
2000
  inline = false,
1957
2001
  size = "large",
@@ -2044,7 +2088,7 @@ const Button = ({
2044
2088
  const Divider = () => jsx("hr", {
2045
2089
  className: "adyen-kyc-divider"
2046
2090
  });
2047
- const ChevronDownIcon = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20viewBox='0%200%2015%2015'%3e%3cdefs%3e%3cpath%20fill='currentColor'%20id='chevron-down_svg__a'%20d='M2%205a1%201%200%200%201%201.74-.67L7.5%208.51l3.76-4.18a1%201%200%200%201%201.48%201.34l-4.5%205a1%201%200%200%201-1.48%200l-4.5-5A1%201%200%200%201%202%205'/%3e%3c/defs%3e%3cuse%20xlink:href='%23chevron-down_svg__a'%20fill-rule='evenodd'/%3e%3c/svg%3e";
2091
+ const ChevronDownIcon = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20viewBox='0%200%2015%2015'%3e%3cdefs%3e%3cpath%20id='chevron-down_svg__a'%20fill='currentColor'%20d='M2%205a1%201%200%200%201%201.74-.67L7.5%208.51l3.76-4.18a1%201%200%200%201%201.48%201.34l-4.5%205a1%201%200%200%201-1.48%200l-4.5-5A1%201%200%200%201%202%205'/%3e%3c/defs%3e%3cuse%20xlink:href='%23chevron-down_svg__a'%20fill-rule='evenodd'/%3e%3c/svg%3e";
2048
2092
  const Accordion = ({
2049
2093
  title,
2050
2094
  children,
@@ -2130,6 +2174,28 @@ const Alert = ({
2130
2174
  })]
2131
2175
  });
2132
2176
  }
2177
+ if (type === "callToAction") {
2178
+ return jsxs("div", {
2179
+ className: cx("adyen-kyc-alert", className, `adyen-kyc-alert--${variant}`, {
2180
+ "adyen-kyc-alert--without-icon": !renderedIcon
2181
+ }),
2182
+ role: "alert",
2183
+ "data-testid": testId,
2184
+ children: [jsxs("div", {
2185
+ className: "adyen-kyc-alert__header",
2186
+ children: [renderedIcon, title && jsx("span", {
2187
+ className: "adyen-kyc-alert__title",
2188
+ children: title
2189
+ }), !!actions && jsx("div", {
2190
+ className: "adyen-kyc-alert__actions",
2191
+ children: actions
2192
+ })]
2193
+ }), !!children && jsx("div", {
2194
+ className: "adyen-kyc-alert__explanation",
2195
+ children
2196
+ })]
2197
+ });
2198
+ }
2133
2199
  return jsxs("div", {
2134
2200
  className: cx("adyen-kyc-alert", className, `adyen-kyc-alert--${variant}`, {
2135
2201
  "adyen-kyc-alert--without-icon": !renderedIcon
@@ -2194,7 +2260,7 @@ function useFormRouterContext() {
2194
2260
  }
2195
2261
  return context;
2196
2262
  }
2197
- const logger$C = createLogger("Link");
2263
+ const logger$D = createLogger("Link");
2198
2264
  const getIconClass = (icon, external) => {
2199
2265
  if (external) {
2200
2266
  return "adyen-kyc-link__icon adyen-kyc-icon-external-link";
@@ -2206,7 +2272,7 @@ const getIconClass = (icon, external) => {
2206
2272
  };
2207
2273
  const isValidLink = (href) => {
2208
2274
  if (href === "#") {
2209
- logger$C.error('Links must include a valid href. If your href is "#", consider using a Button instead');
2275
+ logger$D.error('Links must include a valid href. If your href is "#", consider using a Button instead');
2210
2276
  return false;
2211
2277
  }
2212
2278
  return true;
@@ -2480,6 +2546,24 @@ function getFieldProps(props, innerFormFields) {
2480
2546
  }
2481
2547
  return null;
2482
2548
  }
2549
+ var ExperimentNames = /* @__PURE__ */ ((ExperimentNames2) => {
2550
+ ExperimentNames2["EnableCompanySearchFlow"] = "EnableCompanySearchFlow";
2551
+ ExperimentNames2["EnableNewBusinessDetailsFlow"] = "EnableNewBusinessDetailsFlow";
2552
+ ExperimentNames2["EnableNewEntryFlow"] = "EnableNewEntryFlow";
2553
+ ExperimentNames2["AllowOrganizationSettlorWithExemptionReason"] = "AllowOrganizationSettlorWithExemptionReason";
2554
+ ExperimentNames2["AllowMoreRolesForMainRootTrustee"] = "AllowMoreRolesForMainRootTrustee";
2555
+ ExperimentNames2["ShowUnsupportedEntityType"] = "ShowUnsupportedEntityType";
2556
+ ExperimentNames2["ShowSingPassButtonForCompanies"] = "ShowSingPassButtonForCompanies";
2557
+ ExperimentNames2["ShowSingPassButtonForIndividuals"] = "ShowSingPassButtonForIndividuals";
2558
+ ExperimentNames2["ShowExtraTaxExemptionReasons"] = "ShowExtraTaxExemptionReasons";
2559
+ ExperimentNames2["EnableCountryOfGoverningLawForUKCompanies"] = "EnableCountryOfGoverningLawForUKCompanies";
2560
+ ExperimentNames2["HidePayoutAccountTask"] = "HidePayoutAccountTask";
2561
+ ExperimentNames2["HidePciTask"] = "HidePciTask";
2562
+ ExperimentNames2["EnableAgeVerification"] = "EnableAgeVerification";
2563
+ ExperimentNames2["PreserveMismatchedInitialValues"] = "PreserveMismatchedInitialValues";
2564
+ ExperimentNames2["HOStrictNameAndAddressValidationV4"] = "HOStrictNameAndAddressValidationV4";
2565
+ return ExperimentNames2;
2566
+ })(ExperimentNames || {});
2483
2567
  const ON_CHANGE_DEBOUNCE_DURATION = 200;
2484
2568
  const KEYBOARD_KEYS = {
2485
2569
  arrowDown: "ArrowDown",
@@ -2538,7 +2622,7 @@ const useSetting = (settingName) => {
2538
2622
  } = context;
2539
2623
  return getSetting(settingName);
2540
2624
  };
2541
- const logger$B = createLogger("useAllowedCountries");
2625
+ const logger$C = createLogger("useAllowedCountries");
2542
2626
  const useAllowedCountries = () => {
2543
2627
  const acceptedCountries = useSetting("acceptedCountries");
2544
2628
  const {
@@ -2547,7 +2631,7 @@ const useAllowedCountries = () => {
2547
2631
  const [allowedCountries, setAllowedCountries] = useState(acceptedCountries);
2548
2632
  useEffect(() => {
2549
2633
  if (acceptedCountries !== void 0) return;
2550
- getAllowedCountries2().then((response) => setAllowedCountries(response.countries)).catch(logger$B.error);
2634
+ getAllowedCountries2().then((response) => setAllowedCountries(response.countries)).catch(logger$C.error);
2551
2635
  }, [acceptedCountries]);
2552
2636
  return allowedCountries;
2553
2637
  };
@@ -2906,7 +2990,7 @@ function reducer({
2906
2990
  }
2907
2991
  };
2908
2992
  }
2909
- const logger$A = createLogger("useAsyncValidator");
2993
+ const logger$B = createLogger("useAsyncValidator");
2910
2994
  const useAsyncValidator = (asyncRules) => {
2911
2995
  const [asyncValidationResults, setAsyncValidationResults] = useState({});
2912
2996
  const clearAsyncValidationResults = useCallback(() => setAsyncValidationResults({}), []);
@@ -2927,7 +3011,7 @@ const useAsyncValidator = (asyncRules) => {
2927
3011
  hasError: !isValid
2928
3012
  }])
2929
3013
  });
2930
- }).catch(logger$A.error);
3014
+ }).catch(logger$B.error);
2931
3015
  }, [asyncRules, clearAsyncValidationResults]);
2932
3016
  return {
2933
3017
  asyncValidationResults,
@@ -3372,7 +3456,7 @@ const Tag = ({
3372
3456
  children
3373
3457
  });
3374
3458
  };
3375
- const styles$2 = {
3459
+ const styles$3 = {
3376
3460
  "adyen-kyc-dropdown": "adyen-kyc-dropdown",
3377
3461
  "adyen-kyc-dropdown-button": "adyen-kyc-dropdown-button",
3378
3462
  "adyen-kyc-dropdown-button--active": "adyen-kyc-dropdown-button--active",
@@ -3428,10 +3512,10 @@ function SelectButton({
3428
3512
  "aria-haspopup": "listbox",
3429
3513
  className: cx({
3430
3514
  "adyen-kyc-dropdown-button": true,
3431
- [styles$2["adyen-kyc-dropdown-button"]]: true,
3515
+ [styles$3["adyen-kyc-dropdown-button"]]: true,
3432
3516
  "adyen-kyc-dropdown-button--readonly": readonly,
3433
3517
  "adyen-kyc-dropdown-button--active": showList,
3434
- [styles$2["adyen-kyc-dropdown-button--active"]]: showList,
3518
+ [styles$3["adyen-kyc-dropdown-button--active"]]: showList,
3435
3519
  "adyen-kyc-dropdown-button--invalid": isInvalid,
3436
3520
  "adyen-kyc-dropdown-field--valid": isValid,
3437
3521
  "adyen-kyc-dropdown-button-search": isSearch
@@ -3501,7 +3585,7 @@ const SelectButtonContentSingle = ({
3501
3585
  "aria-expanded": showList,
3502
3586
  "aria-owns": selectListId,
3503
3587
  autoComplete: "off",
3504
- className: cx("adyen-kyc-filter-input", [styles$2["adyen-kyc-filter-input"]]),
3588
+ className: cx("adyen-kyc-filter-input", [styles$3["adyen-kyc-filter-input"]]),
3505
3589
  onInput,
3506
3590
  placeholder,
3507
3591
  ref: filterInputRef,
@@ -3589,7 +3673,7 @@ const SelectListItem = ({
3589
3673
  }) => jsx("li", {
3590
3674
  "aria-disabled": !!item.disabled,
3591
3675
  "aria-selected": selected,
3592
- className: cx(["adyen-kyc-dropdown-element", styles$2["adyen-kyc-dropdown-element"], {
3676
+ className: cx(["adyen-kyc-dropdown-element", styles$3["adyen-kyc-dropdown-element"], {
3593
3677
  "adyen-kyc-dropdown-element--active": selected,
3594
3678
  "adyen-kyc-dropdown-element--disabled": !!item.disabled,
3595
3679
  "adyen-kyc-dropdown-multi-element": isMulti,
@@ -3637,6 +3721,8 @@ const SelectListItem = ({
3637
3721
  })]
3638
3722
  })
3639
3723
  });
3724
+ const ITEM_HEIGHT = 35;
3725
+ const VISIBLE_ITEMS = 10;
3640
3726
  function SelectList({
3641
3727
  active,
3642
3728
  items,
@@ -3652,6 +3738,37 @@ function SelectList({
3652
3738
  const {
3653
3739
  i18n
3654
3740
  } = useI18nContext();
3741
+ const listRef = useRef(null);
3742
+ const [startIndex, setStartIndex] = useState(0);
3743
+ const [endIndex, setEndIndex] = useState(VISIBLE_ITEMS);
3744
+ const [listHeight, setListHeight] = useState(0);
3745
+ const filteredItems = items.filter((item) => {
3746
+ var _a;
3747
+ if (isSearch) {
3748
+ return item;
3749
+ }
3750
+ return !textFilter || ((_a = item.name) == null ? void 0 : _a.toLowerCase().includes(textFilter));
3751
+ });
3752
+ const totalItems = filteredItems.length;
3753
+ const visibleItems = filteredItems.slice(startIndex, endIndex);
3754
+ const handleScroll = useCallback(() => {
3755
+ if (listRef.current) {
3756
+ const {
3757
+ scrollTop
3758
+ } = listRef.current;
3759
+ const maxStartIndex = totalItems - VISIBLE_ITEMS;
3760
+ const newStartIndex = Math.min(Math.max(0, Math.floor(scrollTop / ITEM_HEIGHT)), maxStartIndex);
3761
+ const newEndIndex = Math.min(newStartIndex + VISIBLE_ITEMS, totalItems);
3762
+ setStartIndex(newStartIndex);
3763
+ setEndIndex(newEndIndex);
3764
+ }
3765
+ }, [totalItems]);
3766
+ useEffect(() => {
3767
+ if (listRef.current) {
3768
+ const newHeight = totalItems ? Math.min(totalItems, VISIBLE_ITEMS) * ITEM_HEIGHT : ITEM_HEIGHT;
3769
+ setListHeight(newHeight);
3770
+ }
3771
+ }, [totalItems]);
3655
3772
  const getItems = () => {
3656
3773
  if (loading) {
3657
3774
  return jsx("div", {
@@ -3659,46 +3776,58 @@ function SelectList({
3659
3776
  children: i18n.get("loading")
3660
3777
  });
3661
3778
  }
3779
+ if (!filteredItems.length) {
3780
+ return jsx("div", {
3781
+ className: "adyen-kyc-dropdown-element adyen-kyc-dropdown-element--no-options",
3782
+ children: i18n.get("noOptionsFound")
3783
+ });
3784
+ }
3662
3785
  if (isSearch && (!textFilter || textFilter.length < 3)) {
3663
3786
  return null;
3664
3787
  }
3665
- if (mappedFilteredItems.length) {
3666
- return mappedFilteredItems;
3788
+ if (visibleItems.length) {
3789
+ return visibleItems.map((item) => jsx(SelectListItem, {
3790
+ item,
3791
+ onKeyDown: (event) => props.onKeyDown(event, item),
3792
+ onSelect: () => props.onSelect(item),
3793
+ selected: !!active.find((activeItem) => activeItem.id === item.id),
3794
+ isMulti,
3795
+ isSearch,
3796
+ children: getSearchItem && getSearchItem(item)
3797
+ }, item.id));
3667
3798
  }
3668
- return jsx("div", {
3669
- className: "adyen-kyc-dropdown-element adyen-kyc-dropdown-element--no-options",
3670
- children: i18n.get("noOptionsFound")
3671
- });
3799
+ return null;
3672
3800
  };
3673
- const filteredItems = items.filter((item) => {
3674
- var _a;
3675
- if (isSearch) {
3676
- return item;
3677
- }
3678
- return !textFilter || ((_a = item.name) == null ? void 0 : _a.toLowerCase().includes(textFilter));
3679
- });
3680
- const mappedFilteredItems = filteredItems.map((item) => jsx(SelectListItem, {
3681
- item,
3682
- onKeyDown: (event) => props.onKeyDown(event, item),
3683
- onSelect: () => props.onSelect(item),
3684
- selected: !!active.find((activeItem) => activeItem.id === item.id),
3685
- isMulti,
3686
- isSearch,
3687
- children: getSearchItem && getSearchItem(item)
3688
- }, item.id));
3689
3801
  return jsx("ul", {
3690
3802
  className: cx({
3691
3803
  test: true,
3692
3804
  "adyen-kyc-dropdown-list--above": showAbove,
3693
3805
  "adyen-kyc-dropdown-list": true,
3694
- [styles$2["adyen-kyc-dropdown-list"]]: true,
3806
+ [styles$3["adyen-kyc-dropdown-list"]]: true,
3695
3807
  "adyen-kyc-dropdown-list--active": showList,
3696
- [styles$2["adyen-kyc-dropdown-list--active"]]: showList
3808
+ [styles$3["adyen-kyc-dropdown-list--active"]]: showList
3697
3809
  }),
3698
3810
  id: props.selectListId,
3699
- ref: props.selectListRef,
3811
+ ref: listRef,
3700
3812
  role: "listbox",
3701
- children: getItems()
3813
+ onScroll: handleScroll,
3814
+ style: {
3815
+ height: `${listHeight}px`,
3816
+ overflowY: totalItems > VISIBLE_ITEMS ? "auto" : "hidden",
3817
+ position: "relative"
3818
+ },
3819
+ children: jsx("div", {
3820
+ style: {
3821
+ height: `${totalItems * ITEM_HEIGHT}px`,
3822
+ position: "relative"
3823
+ },
3824
+ children: jsx("div", {
3825
+ style: {
3826
+ transform: `translateY(${startIndex * ITEM_HEIGHT}px)`
3827
+ },
3828
+ children: getItems()
3829
+ })
3830
+ })
3702
3831
  });
3703
3832
  }
3704
3833
  const SELECTLIST_MAX_HEIGHT = 145;
@@ -3884,7 +4013,7 @@ const Select = ({
3884
4013
  };
3885
4014
  }, []);
3886
4015
  return jsxs("div", {
3887
- className: cx(["adyen-kyc-dropdown", styles$2["adyen-kyc-dropdown"], className, ...classNameModifiers.map((m) => `adyen-kyc-dropdown--${m}`)]),
4016
+ className: cx(["adyen-kyc-dropdown", styles$3["adyen-kyc-dropdown"], className, ...classNameModifiers.map((m) => `adyen-kyc-dropdown--${m}`)]),
3888
4017
  ref: selectContainerRef,
3889
4018
  onClick: (e) => {
3890
4019
  e.stopPropagation();
@@ -3942,7 +4071,7 @@ function CountryField({
3942
4071
  handleChangeFor,
3943
4072
  helperText,
3944
4073
  allowedCountries,
3945
- classNameModifiers = []
4074
+ classNameModifiers = ["country"]
3946
4075
  }) {
3947
4076
  const {
3948
4077
  i18n
@@ -3958,6 +4087,7 @@ function CountryField({
3958
4087
  classNameModifiers,
3959
4088
  isValid: valid.country,
3960
4089
  helper: helperText == null ? void 0 : helperText.country,
4090
+ "data-testid": "country",
3961
4091
  children: (childProps) => jsx(Select, {
3962
4092
  ...childProps,
3963
4093
  name,
@@ -4468,6 +4598,19 @@ const validateNotEmptyOnBlur = {
4468
4598
  validate: (val) => !isEmpty(val),
4469
4599
  errorMessage: "fieldIsRequired"
4470
4600
  };
4601
+ const validateLegalCompanyName = [{
4602
+ modes: ["blur"],
4603
+ validate: hasText,
4604
+ errorMessage: "fieldIsRequired"
4605
+ }, {
4606
+ modes: ["blur"],
4607
+ validate: (input) => !matchesRegex(NO_ALPHABET_REGEX, input),
4608
+ errorMessage: "nameMustContainLetters"
4609
+ }, {
4610
+ modes: ["blur"],
4611
+ validate: (input) => !matchesRegex(EMOJI_REGEX, input) && !hasRepeatedCharacters(input) && isValidMinLength(input, 3) && !isInvalidName(input) && matchesRegex(OTHER_ENTITIES_VALID_CHAR_REGEX, input),
4612
+ errorMessage: "checkForTypos"
4613
+ }];
4471
4614
  const validatePatternOnBlur = (pattern) => ({
4472
4615
  modes: ["blur"],
4473
4616
  validate: (val) => !!val && pattern.test(val)
@@ -4506,6 +4649,40 @@ const defaultFieldConfig$a = {
4506
4649
  validators: validateNotEmptyOnBlur
4507
4650
  })
4508
4651
  };
4652
+ const defaultFieldMetadataV4 = {
4653
+ label: "legalCompanyName",
4654
+ helperText: "legalCompanyName__helperText",
4655
+ validators: validateLegalCompanyName
4656
+ };
4657
+ const defaultFieldConfigV4 = {
4658
+ [CountryCodes.Australia]: {
4659
+ label: "legalCompanyName",
4660
+ helperText: "legalCompanyName__helperText__AU",
4661
+ validators: validateLegalCompanyName
4662
+ },
4663
+ [CountryCodes.HongKong]: {
4664
+ label: "legalCompanyName",
4665
+ helperText: "legalCompanyName__helperText__HK",
4666
+ validators: validateLegalCompanyName
4667
+ },
4668
+ [CountryCodes.Netherlands]: {
4669
+ label: "legalCompanyName",
4670
+ helperText: "legalCompanyName__helperText__NL",
4671
+ validators: validateLegalCompanyName
4672
+ },
4673
+ [CountryCodes.Singapore]: {
4674
+ label: "legalCompanyName",
4675
+ helperText: "legalCompanyName__helperText__SG",
4676
+ validators: validateLegalCompanyName
4677
+ },
4678
+ [CountryCodes.UnitedStates]: ({
4679
+ isBusiness
4680
+ }) => ({
4681
+ label: "legalCompanyName__US",
4682
+ helperText: isBusiness ? "legalCompanyName__helperText__US__business" : "legalCompanyName__helperText__US",
4683
+ validators: validateLegalCompanyName
4684
+ })
4685
+ };
4509
4686
  const PatriotActDisclosure = () => {
4510
4687
  const {
4511
4688
  i18n
@@ -4532,11 +4709,19 @@ const companyCountryValidationRules = {
4532
4709
  validate: (companyCountry) => !isEmpty(companyCountry),
4533
4710
  errorMessage: "fieldIsRequired"
4534
4711
  },
4535
- legalCompanyName: {
4712
+ legalCompanyName: [{
4536
4713
  modes: ["blur"],
4537
- validate: (legalCompanyName) => !isEmpty(legalCompanyName),
4714
+ validate: hasText,
4538
4715
  errorMessage: "fieldIsRequired"
4539
- },
4716
+ }, {
4717
+ modes: ["blur"],
4718
+ validate: (input) => !matchesRegex(NO_ALPHABET_REGEX, input),
4719
+ errorMessage: "nameMustContainLetters"
4720
+ }, {
4721
+ modes: ["blur"],
4722
+ validate: (input) => !matchesRegex(EMOJI_REGEX, input) && !hasRepeatedCharacters(input) && isValidMinLength(input, 3) && !isInvalidName(input) && matchesRegex(OTHER_ENTITIES_VALID_CHAR_REGEX, input),
4723
+ errorMessage: "checkForTypos"
4724
+ }],
4540
4725
  countryOfGoverningLaw: {
4541
4726
  modes: ["blur"],
4542
4727
  validate: (countryOfGoverningLaw) => !isEmpty(countryOfGoverningLaw),
@@ -4556,14 +4741,17 @@ function CompanyNameAndCountry(props) {
4556
4741
  const {
4557
4742
  isExperimentEnabled
4558
4743
  } = useExperimentsContext();
4744
+ const isStrictNameAndAddressValidationEnabled = isExperimentEnabled(ExperimentNames.HOStrictNameAndAddressValidationV4);
4559
4745
  const {
4560
4746
  sliceData,
4561
4747
  updateStateSlice
4562
4748
  } = useGlobalDataSlice(props.id);
4749
+ const LegalCompanyNameDefaultFieldConfig = isStrictNameAndAddressValidationEnabled ? defaultFieldConfigV4 : defaultFieldConfig$a;
4750
+ const LegalCompanyNameDefaultFieldMetadata = isStrictNameAndAddressValidationEnabled ? defaultFieldMetadataV4 : defaultFieldMetadata$a;
4563
4751
  let mergedProps = props;
4564
- mergedProps = mergeFieldMetadataIntoProps("legalCompanyName", resolveFieldMetadata(defaultFieldConfig$a[sliceData == null ? void 0 : sliceData.country], {
4752
+ mergedProps = mergeFieldMetadataIntoProps("legalCompanyName", resolveFieldMetadata(LegalCompanyNameDefaultFieldConfig[sliceData == null ? void 0 : sliceData.country], {
4565
4753
  isBusiness: false
4566
- }, defaultFieldMetadata$a), mergedProps);
4754
+ }, LegalCompanyNameDefaultFieldMetadata), mergedProps);
4567
4755
  const schemaWithGoverningLaw = (sliceData == null ? void 0 : sliceData.country) === "GB" && (sliceData == null ? void 0 : sliceData.differentCountryOfGoverningLaw) ? countryWithGoverningLawFields : companyNameAndCountryFields;
4568
4756
  const {
4569
4757
  data: formData,
@@ -5114,7 +5302,7 @@ const businessRegistrationNumberMasks = {
5114
5302
  },
5115
5303
  [CountryCodes.Spain]: {
5116
5304
  default: {
5117
- mask: makeMask(...alphaInputs(1), ...numericInputs(8)),
5305
+ mask: makeMask(...alphaInputs(1), ...alphanumericInputs(8)),
5118
5306
  transformOnType: uppercase
5119
5307
  }
5120
5308
  },
@@ -6804,7 +6992,7 @@ const deriveInputState = (isValid, isFocused, isDisabled, isOptional, hasNullish
6804
6992
  };
6805
6993
  };
6806
6994
  const MISMATCH_ANIMATION_NAME = "mismatchShake";
6807
- const logger$z = createLogger("MaskedInputText");
6995
+ const logger$A = createLogger("MaskedInputText");
6808
6996
  const MaskedInputText = ({
6809
6997
  value,
6810
6998
  onInput,
@@ -6850,7 +7038,7 @@ const MaskedInputText = ({
6850
7038
  };
6851
7039
  useEffect(() => {
6852
7040
  if (!mask) {
6853
- logger$z.warn("`mask` is undefined. No masking of input will take place.");
7041
+ logger$A.warn("`mask` is undefined. No masking of input will take place.");
6854
7042
  }
6855
7043
  }, [mask]);
6856
7044
  const getMaskResult = useCallback((pureValue) => {
@@ -6875,13 +7063,13 @@ const MaskedInputText = ({
6875
7063
  return;
6876
7064
  }
6877
7065
  if (preserveMismatchingInitialValue) {
6878
- logger$z.warn(`Value received "${value}" does not match mask`, maskResult, `
7066
+ logger$A.warn(`Value received "${value}" does not match mask`, maskResult, `
6879
7067
  Preserving mismatched initial value until user input.`);
6880
7068
  setPreservingMismatchedValue(true);
6881
7069
  return;
6882
7070
  }
6883
7071
  const fallback = displayValueToPure(maskResult.partialDisplayValue);
6884
- logger$z.warn(`Value received "${value}" does not match mask`, maskResult, `
7072
+ logger$A.warn(`Value received "${value}" does not match mask`, maskResult, `
6885
7073
  Falling back to partially valid value "${fallback}"`);
6886
7074
  onInput(fallback);
6887
7075
  }
@@ -7045,7 +7233,7 @@ function RadioGroup({
7045
7233
  type: "radio",
7046
7234
  checked: value === item.id,
7047
7235
  "aria-checked": value === item.id,
7048
- name,
7236
+ name: name ?? item.name,
7049
7237
  onChange,
7050
7238
  onClick: onChange,
7051
7239
  value: item.id,
@@ -9015,24 +9203,6 @@ const tradingNameFieldMetadata = {
9015
9203
  label: "tradingName",
9016
9204
  validators: [validateNotEmptyOnBlur]
9017
9205
  };
9018
- var ExperimentNames = /* @__PURE__ */ ((ExperimentNames2) => {
9019
- ExperimentNames2["EnableCompanySearchFlow"] = "EnableCompanySearchFlow";
9020
- ExperimentNames2["EnableNewBusinessDetailsFlow"] = "EnableNewBusinessDetailsFlow";
9021
- ExperimentNames2["EnableNewEntryFlow"] = "EnableNewEntryFlow";
9022
- ExperimentNames2["AllowOrganizationSettlorWithExemptionReason"] = "AllowOrganizationSettlorWithExemptionReason";
9023
- ExperimentNames2["AllowMoreRolesForMainRootTrustee"] = "AllowMoreRolesForMainRootTrustee";
9024
- ExperimentNames2["ShowUnsupportedEntityType"] = "ShowUnsupportedEntityType";
9025
- ExperimentNames2["ShowSingPassButtonForCompanies"] = "ShowSingPassButtonForCompanies";
9026
- ExperimentNames2["ShowSingPassButtonForIndividuals"] = "ShowSingPassButtonForIndividuals";
9027
- ExperimentNames2["ShowExtraTaxExemptionReasons"] = "ShowExtraTaxExemptionReasons";
9028
- ExperimentNames2["EnableCountryOfGoverningLawForUKCompanies"] = "EnableCountryOfGoverningLawForUKCompanies";
9029
- ExperimentNames2["HidePayoutAccountTask"] = "HidePayoutAccountTask";
9030
- ExperimentNames2["HidePciTask"] = "HidePciTask";
9031
- ExperimentNames2["EnableAgeVerification"] = "EnableAgeVerification";
9032
- ExperimentNames2["PreserveMismatchedInitialValues"] = "PreserveMismatchedInitialValues";
9033
- ExperimentNames2["StrictNameAndAddressValidation"] = "StrictNameAndAddressValidation";
9034
- return ExperimentNames2;
9035
- })(ExperimentNames || {});
9036
9206
  var VatAbsenceReason = /* @__PURE__ */ ((VatAbsenceReason2) => {
9037
9207
  VatAbsenceReason2["IndustryExemption"] = "industryExemption";
9038
9208
  VatAbsenceReason2["BelowTaxThreshold"] = "belowTaxThreshold";
@@ -10529,7 +10699,7 @@ const accountHolderValidationRules = {
10529
10699
  }
10530
10700
  };
10531
10701
  const accountHolderFields = ["accountHolder"];
10532
- const logger$y = createLogger("AccountHolder");
10702
+ const logger$z = createLogger("AccountHolder");
10533
10703
  function getAvailableAccountHolderOptions(legalEntityType, isChangeOfLegalEntityTypeAllowed, isTrustFlowEnabled, isSoleProprietorshipAllowed, isChangeToMyNameAllowed) {
10534
10704
  switch (legalEntityType) {
10535
10705
  case LegalEntityType.ORGANIZATION: {
@@ -10539,7 +10709,7 @@ function getAvailableAccountHolderOptions(legalEntityType, isChangeOfLegalEntity
10539
10709
  return [...isChangeToMyNameAllowed ? ["myName"] : [], ...isChangeOfLegalEntityTypeAllowed ? ["theCompanyIWorkFor"] : [], ...isTrustFlowEnabled ? ["aTrust"] : [], ...isSoleProprietorshipAllowed ? ["mySoleProprietorName"] : []];
10540
10710
  }
10541
10711
  default:
10542
- logger$y.error(`No available account holder options for legal entity type '${legalEntityType}'`);
10712
+ logger$z.error(`No available account holder options for legal entity type '${legalEntityType}'`);
10543
10713
  return [];
10544
10714
  }
10545
10715
  }
@@ -10722,20 +10892,20 @@ function CompanyTypeComponent(props) {
10722
10892
  })]
10723
10893
  });
10724
10894
  }
10725
- const getDocumentGuidancePrefix = (documentType, isIcon = false, isFront = true) => {
10895
+ const getDocumentGuidancePrefix = (documentType) => {
10726
10896
  switch (documentType) {
10727
10897
  case DocumentType.PASSPORT:
10728
10898
  return "passport";
10729
10899
  case DocumentType.DRIVERS_LICENSE:
10730
10900
  case DocumentType.IDENTITY_CARD:
10731
- return isIcon ? isFront ? "id-front" : "id-back" : "id";
10901
+ return "id";
10732
10902
  case DocumentType.BANK_STATEMENT:
10733
10903
  case DocumentType.VAT_DOCUMENT:
10734
10904
  case DocumentType.REGISTRATION_DOCUMENT:
10735
10905
  case DocumentType.PROOF_OF_ADDRESS:
10736
10906
  case DocumentType.PROOF_OF_RESIDENCY:
10737
10907
  default:
10738
- return "generic-document";
10908
+ return "document";
10739
10909
  }
10740
10910
  };
10741
10911
  function DocumentGuidance({
@@ -10745,50 +10915,48 @@ function DocumentGuidance({
10745
10915
  const {
10746
10916
  i18n
10747
10917
  } = useI18nContext();
10748
- const {
10749
- loadDocumentGuidance: loadDocumentGuidance2
10750
- } = useConfigurationApi();
10751
- const [guidancePrefix, setGuidancePrefix] = useState(null);
10752
- useEffect(() => {
10753
- loadDocumentGuidance2();
10754
- }, []);
10755
- useEffect(() => {
10756
- setGuidancePrefix(getDocumentGuidancePrefix(type));
10918
+ const documentGuidanceItems = useMemo(() => {
10919
+ const guidancePrefix = getDocumentGuidancePrefix(type);
10920
+ return [{
10921
+ svgName: `${guidancePrefix}-front`,
10922
+ translationKey: "good",
10923
+ valid: true
10924
+ }, {
10925
+ svgName: `${guidancePrefix}-cutoff`,
10926
+ translationKey: "notCutOff"
10927
+ }, {
10928
+ svgName: `${guidancePrefix}-blurred`,
10929
+ translationKey: "notBlurry"
10930
+ }, guidancePrefix === "document" ? {
10931
+ svgName: `document-expired`,
10932
+ translationKey: "notExpired"
10933
+ } : {
10934
+ svgName: `${guidancePrefix}-glare`,
10935
+ translationKey: "noGlare"
10936
+ }];
10757
10937
  }, [type]);
10758
- const documentGuidanceItems = useMemo(() => [{
10759
- type: "valid",
10760
- translationKey: "good"
10761
- }, {
10762
- type: "invalid-cut",
10763
- translationKey: "notCutOff"
10764
- }, {
10765
- type: "invalid-blur",
10766
- translationKey: "notBlurry"
10767
- }, guidancePrefix === "generic-document" ? {
10768
- type: "invalid-expired",
10769
- translationKey: "notExpired"
10770
- } : {
10771
- type: "invalid-glare",
10772
- translationKey: "noGlare"
10773
- }], [guidancePrefix]);
10774
10938
  return jsx("div", {
10775
10939
  className: cx("adyen-kyc-document-guidance", className),
10776
10940
  children: jsx("div", {
10777
10941
  className: "adyen-kyc-document-guidance__container",
10778
10942
  children: documentGuidanceItems.map((item) => jsxs("figure", {
10779
10943
  className: "adyen-kyc-document-guidance__item",
10780
- children: [jsx("svg", {
10781
- width: "100%",
10782
- height: "100%",
10783
- role: "img",
10784
- children: jsx("use", {
10785
- href: `#adyen-kyc-${guidancePrefix}-${item.type}`
10786
- })
10787
- }), jsx("figcaption", {
10944
+ children: [jsx(Svg, {
10945
+ type: "image",
10946
+ name: item.svgName
10947
+ }), jsxs("figcaption", {
10788
10948
  className: "adyen-kyc-document-guidance__description",
10789
- children: i18n.get(item.translationKey)
10949
+ children: [item.valid ? jsx(Svg, {
10950
+ type: "icon",
10951
+ name: "check",
10952
+ className: cx("adyen-kyc-document-guidance__icon", "adyen-kyc-document-guidance__icon--valid")
10953
+ }) : jsx(Svg, {
10954
+ type: "icon",
10955
+ name: "cross",
10956
+ className: cx("adyen-kyc-document-guidance__icon", "adyen-kyc-document-guidance__icon--invalid")
10957
+ }), i18n.get(item.translationKey)]
10790
10958
  })]
10791
- }, item.type))
10959
+ }, item.translationKey))
10792
10960
  })
10793
10961
  });
10794
10962
  }
@@ -10802,15 +10970,16 @@ function bytesToSize(bytes) {
10802
10970
  const isExistingFile = (file) => "existing" in file && file.existing;
10803
10971
  const isNewlyUploadedFile = (file) => !isExistingFile(file);
10804
10972
  function DropzoneFile(props) {
10973
+ var _a;
10805
10974
  const {
10806
10975
  file,
10807
10976
  errorMessage,
10808
- onDelete,
10809
- iconPrefix
10977
+ onDelete
10810
10978
  } = props;
10811
10979
  const {
10812
10980
  i18n
10813
10981
  } = useI18nContext();
10982
+ let documentIcon;
10814
10983
  const formatSize = (bytes) => {
10815
10984
  const sizes = ["Bytes", "KB", "MB", "GB", "TB"];
10816
10985
  if (!bytes || bytes === 0) return "n/a";
@@ -10818,40 +10987,46 @@ function DropzoneFile(props) {
10818
10987
  if (i === 0) return `${bytes} ${sizes[i]}`;
10819
10988
  return `${(bytes / 1024 ** i).toFixed(1)} ${sizes[i]}`;
10820
10989
  };
10990
+ switch ((_a = file.type) == null ? void 0 : _a.split("/")[0]) {
10991
+ case "image":
10992
+ documentIcon = "image";
10993
+ break;
10994
+ default:
10995
+ documentIcon = "document";
10996
+ }
10821
10997
  return jsxs("div", {
10822
- className: "adyen-kyc-dropzone-file",
10823
- children: [jsx("div", {
10824
- className: "adyen-kyc-dropzone-file__icon",
10825
- children: jsx("svg", {
10826
- height: "100%",
10827
- width: "100%",
10828
- children: errorMessage ? jsx("use", {
10829
- "data-testid": "document-invalid",
10830
- href: `#adyen-kyc-${iconPrefix}-icon-invalid`
10831
- }) : jsx("use", {
10832
- "data-testid": "document-valid",
10833
- href: `#adyen-kyc-${iconPrefix}-icon-valid`
10834
- })
10835
- })
10836
- }), jsxs("div", {
10837
- className: "adyen-kyc-dropzone-file__labels",
10838
- children: [jsx("div", {
10839
- className: "adyen-kyc-dropzone-file__name",
10840
- children: file.name
10841
- }), errorMessage ? jsx("div", {
10998
+ className: cx("adyen-kyc-dropzone-file", {
10999
+ "adyen-kyc-dropzone-file--error": errorMessage
11000
+ }),
11001
+ children: [jsxs("div", {
11002
+ className: "adyen-kyc-dropzone-file__details",
11003
+ children: [jsxs("div", {
11004
+ className: "adyen-kyc-dropzone-file__labels",
11005
+ children: [errorMessage ? jsx(Icon, {
11006
+ testId: "document-invalid",
11007
+ name: "warning",
11008
+ className: "adyen-kyc-dropzone-file__icon"
11009
+ }) : jsx(Icon, {
11010
+ testId: "document-valid",
11011
+ name: documentIcon,
11012
+ className: "adyen-kyc-dropzone-file__icon"
11013
+ }), jsx(Typography, {
11014
+ variant: "body-stronger",
11015
+ className: "adyen-kyc-dropzone-file__name",
11016
+ children: file.name
11017
+ }), jsx(Typography, {
11018
+ className: "adyen-kyc-dropzone-file__size",
11019
+ children: isNewlyUploadedFile(file) && formatSize(file.size)
11020
+ })]
11021
+ }), errorMessage && jsx("div", {
10842
11022
  className: "adyen-kyc-dropzone-file__error",
10843
11023
  children: i18n.get(errorMessage)
10844
- }) : jsx("div", {
10845
- className: "adyen-kyc-dropzone-file__size",
10846
- children: isNewlyUploadedFile(file) ? formatSize(file.size) : void 0
10847
11024
  })]
10848
- }), jsx("button", {
10849
- type: "button",
11025
+ }), jsx(Button, {
11026
+ icon: errorMessage ? "cross" : "bin",
10850
11027
  className: "adyen-kyc-dropzone-file__button",
10851
- onClick: onDelete,
10852
- children: jsx(Icon, {
10853
- name: "remove"
10854
- })
11028
+ tertiary: true,
11029
+ onClick: onDelete
10855
11030
  })]
10856
11031
  });
10857
11032
  }
@@ -10909,7 +11084,6 @@ function Dropzone(props) {
10909
11084
  var _a, _b;
10910
11085
  const {
10911
11086
  name,
10912
- iconPrefix = "generic-document",
10913
11087
  label = "",
10914
11088
  multiple = false,
10915
11089
  required = true,
@@ -11032,8 +11206,7 @@ function Dropzone(props) {
11032
11206
  return jsx(DropzoneFile, {
11033
11207
  file,
11034
11208
  onDelete: () => handleFileDelete(file),
11035
- errorMessage: (_a2 = errors == null ? void 0 : errors[name]) == null ? void 0 : _a2.errorMessage,
11036
- iconPrefix
11209
+ errorMessage: (_a2 = errors == null ? void 0 : errors[name]) == null ? void 0 : _a2.errorMessage
11037
11210
  }, file);
11038
11211
  }), showDropzone && jsxs("div", {
11039
11212
  role: "region",
@@ -11047,35 +11220,45 @@ function Dropzone(props) {
11047
11220
  onDragLeave: (e) => handleDragLeave(e),
11048
11221
  children: [jsx("div", {
11049
11222
  className: "adyen-kyc-dropzone__icon",
11050
- children: jsx("svg", {
11051
- height: "100%",
11052
- width: "100%",
11053
- children: jsx("use", {
11054
- href: `#adyen-kyc-${iconPrefix}-icon`
11055
- })
11223
+ children: jsx(Icon, {
11224
+ name: "upload"
11056
11225
  })
11057
11226
  }), jsxs("div", {
11058
11227
  className: "adyen-kyc-dropzone__labels",
11059
- children: [jsxs("div", {
11060
- className: "adyen-kyc-dropzone__drag-text",
11061
- children: [jsxs("span", {
11062
- children: [i18n.get("dragYourFilesHereOr"), " "]
11063
- }), jsx("button", {
11064
- className: "adyen-kyc-dropzone__button",
11065
- type: "button",
11066
- onClick: selectFile,
11067
- children: i18n.get("browse")
11068
- })]
11069
- }), jsx("div", {
11070
- className: "adyen-kyc-dropzone__supports-text",
11071
- children: i18n.get("supports", {
11228
+ children: [jsx(Typography, {
11229
+ el: "h4",
11230
+ variant: "body-strongest",
11231
+ children: i18n.get("dropFileToUpload")
11232
+ }), jsx(Typography, {
11233
+ color: "secondary",
11234
+ children: i18n.get("supportedFileTypes", {
11235
+ values: {
11236
+ fileTypes: allowedFiletypes
11237
+ }
11238
+ })
11239
+ }), jsx(Typography, {
11240
+ color: "secondary",
11241
+ children: i18n.get("maxFileSize", {
11242
+ values: {
11243
+ maxSize: bytesToSize(maxSize)
11244
+ }
11245
+ })
11246
+ }), jsx(Typography, {
11247
+ color: "secondary",
11248
+ children: i18n.get("upToFiles", {
11072
11249
  values: {
11073
- fileTypes: allowedFiletypes,
11074
- maxSize: bytesToSize(maxSize),
11075
11250
  maxFiles: maxNumberOfFiles
11076
11251
  }
11077
11252
  })
11078
11253
  })]
11254
+ }), jsx("div", {
11255
+ className: "adyen-kyc-dropzone__button",
11256
+ children: jsx(Button, {
11257
+ label: i18n.get("browseFiles"),
11258
+ onClick: selectFile,
11259
+ secondary: true,
11260
+ small: true
11261
+ })
11079
11262
  }), jsx("input", {
11080
11263
  className: "adyen-kyc-dropzone__input",
11081
11264
  ref: fileInput,
@@ -11093,7 +11276,7 @@ function Dropzone(props) {
11093
11276
  })]
11094
11277
  });
11095
11278
  }
11096
- const logger$x = createLogger("TextArea");
11279
+ const logger$y = createLogger("TextArea");
11097
11280
  function TextArea(props) {
11098
11281
  const {
11099
11282
  classNameModifiers,
@@ -11114,7 +11297,7 @@ function TextArea(props) {
11114
11297
  } = useI18nContext();
11115
11298
  const [value, setValue] = useState("");
11116
11299
  if (Object.prototype.hasOwnProperty.call(props, "onChange")) {
11117
- logger$x.error("Error: Form fields that rely on InputBase may not have an onChange property");
11300
+ logger$y.error("Error: Form fields that rely on InputBase may not have an onChange property");
11118
11301
  }
11119
11302
  const handleInput = (e) => {
11120
11303
  var _a;
@@ -11266,7 +11449,6 @@ function DocumentUploadComponent({
11266
11449
  }), jsx(Dropzone, {
11267
11450
  defaultData: document2,
11268
11451
  id: props.id,
11269
- iconPrefix: getDocumentGuidancePrefix(documentType, true),
11270
11452
  isOptional: isOptional || formUtils.isOptionalField(documentField),
11271
11453
  maxSize: documentType === DocumentType.CONSTITUTIONAL_DOCUMENT ? 31457280 : void 0,
11272
11454
  name: documentField,
@@ -11419,7 +11601,7 @@ function StateField({
11419
11601
  readonly,
11420
11602
  handleChangeFor,
11421
11603
  selectedCountry,
11422
- classNameModifiers = []
11604
+ classNameModifiers = ["stateOrProvince"]
11423
11605
  }) {
11424
11606
  const {
11425
11607
  i18n
@@ -11560,7 +11742,7 @@ function useIsElementVisible(ref, fallback = true) {
11560
11742
  }, [ref]);
11561
11743
  return isOnScreen;
11562
11744
  }
11563
- const logger$w = createLogger("SearchAddress");
11745
+ const logger$x = createLogger("SearchAddress");
11564
11746
  const SearchAddress = ({
11565
11747
  data,
11566
11748
  legalEntityId,
@@ -11604,7 +11786,7 @@ const SearchAddress = ({
11604
11786
  const response = await handleFindAddress(selectedAddressId);
11605
11787
  autocompleteAddressForm(response);
11606
11788
  } catch (e) {
11607
- logger$w.error(e);
11789
+ logger$x.error(e);
11608
11790
  }
11609
11791
  };
11610
11792
  const onDrilldown = async (selectedAddress) => {
@@ -11616,7 +11798,7 @@ const SearchAddress = ({
11616
11798
  }, legalEntityId);
11617
11799
  setItems((response == null ? void 0 : response.results) || []);
11618
11800
  } catch (e) {
11619
- logger$w.error(e);
11801
+ logger$x.error(e);
11620
11802
  }
11621
11803
  };
11622
11804
  const onChange = (e) => {
@@ -11671,7 +11853,7 @@ const SearchAddress = ({
11671
11853
  setItems([]);
11672
11854
  }
11673
11855
  } catch (e) {
11674
- logger$w.error(e);
11856
+ logger$x.error(e);
11675
11857
  }
11676
11858
  setLoading(false);
11677
11859
  }
@@ -12051,15 +12233,11 @@ const addressValidationRules = (country) => {
12051
12233
  var _a, _b;
12052
12234
  const postalCodeFormat = (_b = (_a = countrySpecificFormatters[country]) == null ? void 0 : _a.postalCode) == null ? void 0 : _b.format;
12053
12235
  return {
12054
- address: [{
12236
+ address: {
12055
12237
  modes: ["blur"],
12056
12238
  validate: (val) => hasText(val),
12057
12239
  errorMessage: "fieldIsRequired"
12058
- }, {
12059
- modes: ["blur"],
12060
- validate: (val) => !matchesRegex(EMOJI_REGEX, val),
12061
- errorMessage: "checkForTypos"
12062
- }],
12240
+ },
12063
12241
  postalCode: {
12064
12242
  modes: ["blur"],
12065
12243
  validate: (val) => {
@@ -12090,6 +12268,82 @@ const addressValidationRules = (country) => {
12090
12268
  }
12091
12269
  };
12092
12270
  };
12271
+ const addressValidationRulesV4 = (country, i18n) => {
12272
+ var _a, _b;
12273
+ const postalCodeFormat = (_b = (_a = countrySpecificFormatters[country]) == null ? void 0 : _a.postalCode) == null ? void 0 : _b.format;
12274
+ const MIN_LENGTH_3 = 3;
12275
+ return {
12276
+ address: [{
12277
+ modes: ["blur"],
12278
+ validate: (val) => hasText(val),
12279
+ errorMessage: "fieldIsRequired"
12280
+ }, {
12281
+ modes: ["blur"],
12282
+ validate: (val) => !matchesRegex(EMOJI_REGEX, val) && !hasRepeatedCharacters(val) && !isInvalidName(val),
12283
+ errorMessage: "checkForTypos"
12284
+ }, {
12285
+ modes: ["blur"],
12286
+ validate: (val) => isValidMinLength(val, MIN_LENGTH_3),
12287
+ errorMessage: {
12288
+ key: "fieldMustContainAtLeast",
12289
+ values: {
12290
+ fieldName: i18n.get("address"),
12291
+ minLength: String(MIN_LENGTH_3)
12292
+ }
12293
+ }
12294
+ }],
12295
+ postalCode: {
12296
+ modes: ["blur"],
12297
+ validate: (val) => {
12298
+ const pattern = postalCodePatterns[country];
12299
+ return pattern ? !!val && pattern.test(val) : !!val;
12300
+ },
12301
+ errorMessage: postalCodeFormat ? {
12302
+ key: "invalidFormatExpects",
12303
+ values: {
12304
+ format: postalCodeFormat
12305
+ }
12306
+ } : "invalidFormat"
12307
+ },
12308
+ city: [{
12309
+ modes: ["blur"],
12310
+ validate: hasText,
12311
+ errorMessage: "fieldIsRequired"
12312
+ }, {
12313
+ modes: ["blur"],
12314
+ validate: (val) => !hasRepeatedCharacters(val) && !isInvalidName(val),
12315
+ errorMessage: "checkForTypos"
12316
+ }, {
12317
+ modes: ["blur"],
12318
+ validate: (val) => isValidMinLength(val, MIN_LENGTH_3),
12319
+ errorMessage: {
12320
+ key: "fieldMustContainAtLeast",
12321
+ values: {
12322
+ fieldName: i18n.get("city"),
12323
+ minLength: String(MIN_LENGTH_3)
12324
+ }
12325
+ }
12326
+ }],
12327
+ stateOrProvince: [{
12328
+ modes: ["blur"],
12329
+ validate: (val) => !!val,
12330
+ errorMessage: "fieldIsRequired"
12331
+ }, {
12332
+ modes: ["blur"],
12333
+ validate: (val) => !hasRepeatedCharacters(val) && !isInvalidName(val),
12334
+ errorMessage: "checkForTypos"
12335
+ }],
12336
+ country: [{
12337
+ modes: ["blur"],
12338
+ validate: (val) => !!val,
12339
+ errorMessage: "fieldIsRequired"
12340
+ }, {
12341
+ modes: ["blur"],
12342
+ validate: (val) => !hasRepeatedCharacters(val) && !isInvalidName(val),
12343
+ errorMessage: "checkForTypos"
12344
+ }]
12345
+ };
12346
+ };
12093
12347
  function Address(props) {
12094
12348
  const {
12095
12349
  data: dataProp,
@@ -12114,6 +12368,7 @@ function Address(props) {
12114
12368
  const {
12115
12369
  isExperimentEnabled
12116
12370
  } = useExperimentsContext();
12371
+ const isStrictNameAndAddressValidationEnabled = isExperimentEnabled(ExperimentNames.HOStrictNameAndAddressValidationV4);
12117
12372
  const [showAutocompletedAddressFields, setShowAutocompletedAddressFields] = useState(false);
12118
12373
  const [showAddAddressButton, setShowAddAddressButton] = useState(true);
12119
12374
  const [isHandlerPresent, setIsHandlerPresent] = useState(false);
@@ -12124,6 +12379,7 @@ function Address(props) {
12124
12379
  const datasetUtils = datasetUtilities(i18n.locale);
12125
12380
  const requiredFields = (requiredFieldsProp == null ? void 0 : requiredFieldsProp.includes("stateOrProvince")) || dataProp.country && COUNTRIES_WITH_STATES_DATASET.includes(dataProp.country) ? addressFields : addressFields.filter((ad) => ad !== "stateOrProvince");
12126
12381
  const rules2 = useMemo(() => addressValidationRules(dataProp.country), [dataProp.country]);
12382
+ const rulesV4 = useMemo(() => addressValidationRulesV4(dataProp.country, i18n), [dataProp.country, i18n]);
12127
12383
  const {
12128
12384
  data,
12129
12385
  errors,
@@ -12140,7 +12396,7 @@ function Address(props) {
12140
12396
  schema: requiredFields,
12141
12397
  defaultData: dataProp,
12142
12398
  formatters: addressFormatters,
12143
- rules: rules2,
12399
+ rules: isStrictNameAndAddressValidationEnabled ? rulesV4 : rules2,
12144
12400
  fieldProblems: fieldValidationErrorsProp,
12145
12401
  obscuredFields: []
12146
12402
  });
@@ -14251,7 +14507,6 @@ function IdDocumentManualUploadComponent(props) {
14251
14507
  defaultData: idFrontPage,
14252
14508
  id: props.id,
14253
14509
  isOptional,
14254
- iconPrefix: getDocumentGuidancePrefix(data.idDocumentType, true, true),
14255
14510
  shouldValidate: props.shouldValidate
14256
14511
  })]
14257
14512
  }), data.idDocumentType && hasBack && jsx("div", {
@@ -14262,7 +14517,6 @@ function IdDocumentManualUploadComponent(props) {
14262
14517
  defaultData: idBackPage,
14263
14518
  id: props.id,
14264
14519
  isOptional,
14265
- iconPrefix: getDocumentGuidancePrefix(data.idDocumentType, true, false),
14266
14520
  shouldValidate: props.shouldValidate
14267
14521
  })
14268
14522
  })]
@@ -14320,7 +14574,7 @@ const useIdVerificationToken = ({
14320
14574
  loadingStatus
14321
14575
  };
14322
14576
  };
14323
- const styles$1 = {
14577
+ const styles$2 = {
14324
14578
  "adyen-kyc-loading-input__form": "adyen-kyc-loading-input__form",
14325
14579
  "adyen-kyc-loading-input__form--loading-opacity0": "adyen-kyc-loading-input__form--loading-opacity0",
14326
14580
  "adyen-kyc-loading-input__form--loading-opacity0-1": "adyen-kyc-loading-input__form--loading-opacity0-1",
@@ -14348,12 +14602,12 @@ const LoaderWrapper = ({
14348
14602
  const digit = formOpacityStrArr[0];
14349
14603
  const decimal = formOpacityStrArr[1];
14350
14604
  const opacity = decimal ? `${digit}-${decimal}` : `${digit}`;
14351
- const wrapperClass = cx("adyen-kyc-loading-input__form", styles$1["adyen-kyc-loading-input__form"], {
14352
- [styles$1[`adyen-kyc-loading-input__form--loading-opacity${opacity}`]]: status === "loading"
14605
+ const wrapperClass = cx("adyen-kyc-loading-input__form", styles$2["adyen-kyc-loading-input__form"], {
14606
+ [styles$2[`adyen-kyc-loading-input__form--loading-opacity${opacity}`]]: status === "loading"
14353
14607
  });
14354
14608
  const loaderWrapperClass = cx({
14355
- [styles$1["adyen-kyc-loading-input__loader"]]: true,
14356
- [styles$1["adyen-kyc-loading-input__loader--active"]]: status === "loading" && showSpinner
14609
+ [styles$2["adyen-kyc-loading-input__loader"]]: true,
14610
+ [styles$2["adyen-kyc-loading-input__loader--active"]]: status === "loading" && showSpinner
14357
14611
  });
14358
14612
  const overlayClass = cx("adyen-kyc-loading-input", className);
14359
14613
  return jsxs("div", {
@@ -14422,7 +14676,7 @@ const initOnfido = async ({
14422
14676
  language: getOnfidoLocaleConfig(i18n)
14423
14677
  });
14424
14678
  };
14425
- const logger$v = createLogger("IdVerificationComponent");
14679
+ const logger$w = createLogger("IdVerificationComponent");
14426
14680
  function IdVerificationComponent({
14427
14681
  userDetails,
14428
14682
  legalEntityId,
@@ -14454,7 +14708,7 @@ function IdVerificationComponent({
14454
14708
  onIdVerificationError,
14455
14709
  onIdVerificationComplete
14456
14710
  });
14457
- })().catch(logger$v.error);
14711
+ })().catch(logger$w.error);
14458
14712
  return () => {
14459
14713
  if (onfidoSdk.current) onfidoSdk.current.tearDown();
14460
14714
  };
@@ -14504,7 +14758,7 @@ function IdDocumentAlreadyUpload(props) {
14504
14758
  })]
14505
14759
  });
14506
14760
  }
14507
- const logger$u = createLogger("IdDocumentInstantVerificationComponent");
14761
+ const logger$v = createLogger("IdDocumentInstantVerificationComponent");
14508
14762
  const idVerificationSchema = ["instantIdVerificationData", "idDocumentType"];
14509
14763
  const documentTypeValidationRules = {
14510
14764
  instantIdVerificationData: {
@@ -14586,7 +14840,7 @@ function IdDocumentInstantVerificationComponent(props) {
14586
14840
  userDetails: props.userDetails,
14587
14841
  legalEntityId: props.legalEntityId,
14588
14842
  onIdVerificationComplete: handleIdVerificationComplete,
14589
- onIdVerificationError: logger$u.error
14843
+ onIdVerificationError: logger$v.error
14590
14844
  }), jsxs("div", {
14591
14845
  className: "adyen-kyc-document-upload__manual-upload",
14592
14846
  children: [i18n.get("canNotCompleteInstantVerification"), " ", jsx("button", {
@@ -14614,116 +14868,56 @@ function IdDocumentUploadComponent(props) {
14614
14868
  ...props
14615
14869
  });
14616
14870
  }
14617
- const layoutBreakpointClassnames = {
14618
- xsOnly: "adyen-layout-xs-only",
14619
- md: "adyen-layout-md",
14620
- lg: "adyen-layout-lg"
14621
- };
14622
- const layoutBreakpointSizes = {
14623
- md: 680,
14624
- lg: 1024
14625
- };
14626
- const getBreakpointClassNames = (containerSize) => {
14627
- const breakPoints = Object.entries(layoutBreakpointSizes);
14628
- const classes = breakPoints.reduce((acc, [bp, size]) => {
14629
- if (size <= containerSize) acc.push(layoutBreakpointClassnames[bp]);
14630
- return acc;
14631
- }, []);
14632
- return classes.length > 0 ? classes : ["adyen-layout-xs-only"];
14633
- };
14634
- function assignLayoutClasses(entries, container) {
14635
- let newClasses = [];
14636
- entries.forEach((entry) => {
14637
- var _a;
14638
- const parentWidth = (_a = entry.contentBoxSize) == null ? void 0 : _a[0].inlineSize;
14639
- if (parentWidth) {
14640
- newClasses = getBreakpointClassNames(parentWidth);
14641
- } else {
14642
- newClasses.push(layoutBreakpointClassnames.lg);
14643
- }
14644
- container.classList.remove(...Object.values(layoutBreakpointClassnames));
14645
- container.classList.add(...newClasses);
14646
- });
14647
- }
14648
- const AutoResizer = ({
14649
- children
14650
- }) => {
14651
- const containerRef = useRef(null);
14652
- useEffect(() => {
14653
- const container = containerRef.current;
14654
- if (!container) return;
14655
- const resizeObserver = new ResizeObserver((entries) => assignLayoutClasses(entries, container));
14656
- resizeObserver.observe(container);
14657
- return () => resizeObserver.unobserve(container);
14658
- });
14659
- return jsx("div", {
14660
- ref: containerRef,
14661
- children
14662
- });
14663
- };
14664
- const makeIdVerificationMethodsMetadata = (svgPath) => ({
14871
+ const idVerificationMethodsMetadata = {
14665
14872
  instantVerification: {
14666
14873
  name: "instantVerification",
14667
14874
  description: "instantIDVerificationDescription",
14668
- iconComponentDesktop: `${svgPath}/instant-verification-desktop.svg`,
14669
- iconComponentMobile: `${svgPath}/instant-verification-mobile.svg`,
14875
+ svgName: "id-verification-instant",
14670
14876
  provider: {
14671
14877
  name: "Onfido",
14672
- icon: `${svgPath}/provider-logo-onfido.svg`
14878
+ svgName: `onfido-logo`
14673
14879
  }
14674
14880
  },
14675
14881
  manualVerification: {
14676
14882
  name: "manualUpload",
14677
14883
  description: "manualIDVerificationDescription",
14678
- iconComponentDesktop: `${svgPath}/manual-verification-desktop.svg`,
14679
- iconComponentMobile: `${svgPath}/manual-verification-mobile.svg`
14884
+ svgName: "id-verification-manual"
14680
14885
  }
14681
- });
14886
+ };
14682
14887
  const idVerificationMethods = ["instantVerification", "manualVerification"];
14683
14888
  const IdVerificationMethodOptionIcon = ({
14684
- method,
14685
- methodsMetadata
14889
+ method
14686
14890
  }) => {
14687
14891
  const {
14688
14892
  i18n
14689
14893
  } = useI18nContext();
14690
14894
  const {
14691
14895
  description,
14692
- iconComponentDesktop,
14693
- iconComponentMobile
14694
- } = methodsMetadata[method];
14896
+ svgName
14897
+ } = idVerificationMethodsMetadata[method];
14695
14898
  return jsx("div", {
14696
14899
  className: "adyen-kyc-radio-group-card__illustration",
14697
- children: jsxs("picture", {
14698
- children: [jsx("source", {
14699
- type: "image/svg+xml",
14700
- media: `(min-width: ${layoutBreakpointSizes.md}px)`,
14701
- srcSet: methodsMetadata[method].iconComponentDesktop
14702
- }), jsx("source", {
14703
- type: "image/svg+xml",
14704
- media: `(max-width: ${layoutBreakpointSizes.md}px)`,
14705
- srcSet: iconComponentMobile
14706
- }), jsx("img", {
14707
- srcSet: iconComponentDesktop,
14708
- alt: i18n.get(description)
14709
- })]
14900
+ children: jsx(Svg, {
14901
+ type: "image",
14902
+ name: svgName,
14903
+ alt: i18n.get(description)
14710
14904
  })
14711
14905
  });
14712
14906
  };
14713
14907
  const IdVerificationMethodOptionFooter = ({
14714
- method,
14715
- methodsMetadata
14908
+ method
14716
14909
  }) => {
14717
14910
  const {
14718
14911
  i18n
14719
14912
  } = useI18nContext();
14720
14913
  const {
14721
14914
  provider
14722
- } = methodsMetadata[method];
14915
+ } = idVerificationMethodsMetadata[method];
14723
14916
  return provider ? jsxs("div", {
14724
14917
  className: "adyen-kyc-field-verification-methods__footer",
14725
- children: [i18n.get("poweredBy"), jsx("img", {
14726
- src: provider.icon,
14918
+ children: [i18n.get("poweredBy"), jsx(Svg, {
14919
+ type: "image",
14920
+ name: provider.svgName,
14727
14921
  alt: provider.name
14728
14922
  })]
14729
14923
  }) : null;
@@ -14742,16 +14936,11 @@ function IdVerificationMethodComponent(props) {
14742
14936
  const {
14743
14937
  i18n
14744
14938
  } = useI18nContext();
14745
- const {
14746
- getImageUrl
14747
- } = useConfigurationApi();
14748
14939
  const verificationMethodFormId = id;
14749
14940
  const schema = idVerificationMethodFields;
14750
14941
  const stateRef = useRef({
14751
14942
  setState: null
14752
14943
  });
14753
- const svgPath = `${getImageUrl()}id-verification-method`;
14754
- const methodsMetadata = makeIdVerificationMethodsMetadata(svgPath);
14755
14944
  const {
14756
14945
  handleChangeFor,
14757
14946
  data,
@@ -14812,30 +15001,28 @@ function IdVerificationMethodComponent(props) {
14812
15001
  onSelect: handleChangeFor("idVerificationMethod"),
14813
15002
  selected: data.idVerificationMethod,
14814
15003
  optionId: (method) => method,
14815
- optionName: (method) => methodsMetadata[method].name,
14816
- optionDescription: (method) => methodsMetadata[method].description,
15004
+ optionName: (method) => idVerificationMethodsMetadata[method].name,
15005
+ optionDescription: (method) => idVerificationMethodsMetadata[method].description,
14817
15006
  className: "adyen-kyc-field-verification-methods",
14818
15007
  optionClassNames: () => ({
14819
15008
  label: "adyen-kyc-field-verification-methods__card adyen-kyc-radio-group-card--floating-radio"
14820
15009
  }),
14821
15010
  renderOptionIcon: (method) => jsx(IdVerificationMethodOptionIcon, {
14822
- method,
14823
- methodsMetadata
15011
+ method
14824
15012
  }),
14825
15013
  renderOptionFooter: (method) => jsx(IdVerificationMethodOptionFooter, {
14826
- method,
14827
- methodsMetadata
15014
+ method
14828
15015
  })
14829
15016
  })
14830
15017
  }), jsx(ContextGuidance, {
14831
15018
  page: "Instant verification with Onfido",
14832
15019
  title: i18n.get("howVerificationWithOnfidoWork"),
14833
15020
  content: jsxs(Fragment, {
14834
- children: [jsx("div", {
15021
+ children: [jsx(Typography, {
14835
15022
  className: "adyen-kyc-u-margin-bottom-8",
14836
15023
  children: i18n.get("onfidoIsOurTrustedPartner")
14837
15024
  }), jsxs(List, {
14838
- className: "adyen-kyc-id-verification-method__guidance adyen-kyc-u-margin-bottom-8",
15025
+ className: "adyen-kyc-id-verification-method__guidance",
14839
15026
  children: [jsx(ListItem, {
14840
15027
  children: i18n.get("usePhoneToScanId")
14841
15028
  }), jsx(ListItem, {
@@ -14843,7 +15030,7 @@ function IdVerificationMethodComponent(props) {
14843
15030
  }), jsx(ListItem, {
14844
15031
  children: i18n.get("theIdCheckWillBeAutomaticallyValidated")
14845
15032
  })]
14846
- }), jsx("div", {
15033
+ }), jsx(Typography, {
14847
15034
  className: "adyen-kyc-u-margin-bottom-8",
14848
15035
  children: i18n.get("adyenKeepsDataAsLongAsLegallyRequired")
14849
15036
  }), jsx(Link, {
@@ -15078,7 +15265,7 @@ const phoneFormatters = {
15078
15265
  };
15079
15266
  const phoneFields = ["phoneNumber"];
15080
15267
  const DEFAULT_PHONE_PREFIX = "+1";
15081
- const logger$t = createLogger("PhoneInput");
15268
+ const logger$u = createLogger("PhoneInput");
15082
15269
  const usePhonePrefixes = () => {
15083
15270
  const [phonePrefixes, setPhonePrefixes] = useState();
15084
15271
  useEffect(() => {
@@ -15086,7 +15273,7 @@ const usePhonePrefixes = () => {
15086
15273
  const loaded = (await import("./phonePrefixes-zV4hciyK.js")).default;
15087
15274
  setPhonePrefixes(loaded);
15088
15275
  };
15089
- loadPhonePrefixes().catch(logger$t.error);
15276
+ loadPhonePrefixes().catch(logger$u.error);
15090
15277
  }, []);
15091
15278
  return phonePrefixes;
15092
15279
  };
@@ -15930,7 +16117,7 @@ const handleKeys = (keys, callback, propagationMode = "stopIfMatches") => (event
15930
16117
  callback();
15931
16118
  }
15932
16119
  };
15933
- const styles = {
16120
+ const styles$1 = {
15934
16121
  "adyen-kyc-multi-select-list": "adyen-kyc-multi-select-list",
15935
16122
  "adyen-kyc-multi-select-list-item": "adyen-kyc-multi-select-list-item",
15936
16123
  "adyen-kyc-multi-select-list-item--with-description": "adyen-kyc-multi-select-list-item--with-description",
@@ -15942,7 +16129,7 @@ const MultiSelectList = ({
15942
16129
  onSelect,
15943
16130
  mapToSelectItem
15944
16131
  }) => jsx("ul", {
15945
- className: styles["adyen-kyc-multi-select-list"],
16132
+ className: styles$1["adyen-kyc-multi-select-list"],
15946
16133
  children: options.map((option) => {
15947
16134
  const item = mapToSelectItem(option);
15948
16135
  const isSelected = selected.includes(option);
@@ -15956,8 +16143,8 @@ const MultiSelectList = ({
15956
16143
  onKeyDown: handleKeys(["Enter", " "], handleSelect),
15957
16144
  onSelect: handleSelect,
15958
16145
  isMulti: true,
15959
- className: cx([styles["adyen-kyc-multi-select-list-item"], {
15960
- [styles["adyen-kyc-multi-select-list-item--with-description"]]: !!item.description
16146
+ className: cx([styles$1["adyen-kyc-multi-select-list-item"], {
16147
+ [styles$1["adyen-kyc-multi-select-list-item--with-description"]]: !!item.description
15961
16148
  }])
15962
16149
  }, item.id);
15963
16150
  })
@@ -16088,27 +16275,27 @@ const nameValidationRulesV4 = {
16088
16275
  modes: ["blur"],
16089
16276
  validate: hasText,
16090
16277
  errorMessage: "fieldIsRequired"
16091
- }, {
16092
- modes: ["blur"],
16093
- validate: (input) => !matchesRegex(EMOJI_REGEX, input) && !hasRepeatedCharacters(input) && isValidInputLength(input) && !isInvalidName(input) && matchesRegex(ALLOWED_CHARS_REGEX, input),
16094
- errorMessage: "checkForTypos"
16095
16278
  }, {
16096
16279
  modes: ["blur"],
16097
16280
  validate: (input) => !matchesRegex(NO_ALPHABET_REGEX, input),
16098
16281
  errorMessage: "nameMustContainLetters"
16282
+ }, {
16283
+ modes: ["blur"],
16284
+ validate: (input) => !matchesRegex(EMOJI_REGEX, input) && !hasRepeatedCharacters(input) && isValidMinLength(input, 2) && !isInvalidName(input) && matchesRegex(INDIVIDUAL_VALID_CHAR_REGEX, input),
16285
+ errorMessage: "checkForTypos"
16099
16286
  }],
16100
16287
  lastName: [{
16101
16288
  modes: ["blur"],
16102
16289
  validate: hasText,
16103
16290
  errorMessage: "fieldIsRequired"
16104
- }, {
16105
- modes: ["blur"],
16106
- validate: (input) => !matchesRegex(EMOJI_REGEX, input) && !hasRepeatedCharacters(input) && isValidInputLength(input) && !isInvalidName(input) && matchesRegex(ALLOWED_CHARS_REGEX, input),
16107
- errorMessage: "checkForTypos"
16108
16291
  }, {
16109
16292
  modes: ["blur"],
16110
16293
  validate: (input) => !matchesRegex(NO_ALPHABET_REGEX, input),
16111
16294
  errorMessage: "nameMustContainLetters"
16295
+ }, {
16296
+ modes: ["blur"],
16297
+ validate: (input) => !matchesRegex(EMOJI_REGEX, input) && !hasRepeatedCharacters(input) && isValidMinLength(input, 1) && !isInvalidName(input) && matchesRegex(INDIVIDUAL_VALID_CHAR_REGEX, input),
16298
+ errorMessage: "checkForTypos"
16112
16299
  }]
16113
16300
  };
16114
16301
  const specialCharsRegEx = getFormattingRegEx(SPECIAL_CHARS.replace("-", ""));
@@ -16131,7 +16318,7 @@ function NameComponent(props) {
16131
16318
  const {
16132
16319
  isExperimentEnabled
16133
16320
  } = useExperimentsContext();
16134
- const isStrictNameAndAddressValidationEnabled = isExperimentEnabled(ExperimentNames.StrictNameAndAddressValidation);
16321
+ const isStrictNameAndAddressValidationEnabled = isExperimentEnabled(ExperimentNames.HOStrictNameAndAddressValidationV4);
16135
16322
  const schema = props.requiredFields || ["firstName", "lastName"];
16136
16323
  const {
16137
16324
  handleChangeFor,
@@ -16386,10 +16573,8 @@ const DriversLicense$1 = ({
16386
16573
  page: "Personal details",
16387
16574
  title: i18n.get("whereCanIFindTheseNumbersOnMyDriversLicense"),
16388
16575
  content: jsxs(Fragment, {
16389
- children: [i18n.get("whereToFindNumbersOnDriversLicense"), " ", jsx("a", {
16576
+ children: [i18n.get("whereToFindNumbersOnDriversLicense"), " ", jsx(Link, {
16390
16577
  href: "https://www.usi.gov.au/about/forms-id/drivers-licence",
16391
- target: "_blank",
16392
- rel: "noreferrer",
16393
16578
  children: i18n.get("iStillCantFindIt")
16394
16579
  })]
16395
16580
  }),
@@ -16693,10 +16878,8 @@ const DriversLicense = ({
16693
16878
  page: "Personal details",
16694
16879
  title: i18n.get("whereCanIFindTheseNumbersOnMyDriversLicense"),
16695
16880
  content: jsxs(Fragment, {
16696
- children: [i18n.get("whereToFindNumbersOnDriversLicense__NZ"), " ", jsx("a", {
16881
+ children: [i18n.get("whereToFindNumbersOnDriversLicense__NZ"), " ", jsx(Link, {
16697
16882
  href: "https://www.nzta.govt.nz/driver-licences/getting-a-licence/your-driver-licence-explained/",
16698
- target: "_blank",
16699
- rel: "noreferrer",
16700
16883
  children: i18n.get("iStillCantFindIt")
16701
16884
  })]
16702
16885
  }),
@@ -17750,35 +17933,45 @@ function FilePicker({
17750
17933
  onDragLeave: handleDragLeave,
17751
17934
  children: [jsx("div", {
17752
17935
  className: "adyen-kyc-dropzone__icon",
17753
- children: jsx("svg", {
17754
- height: "100%",
17755
- width: "100%",
17756
- children: jsx("use", {
17757
- href: `#adyen-kyc-${iconPrefix}-icon`
17758
- })
17936
+ children: jsx(Icon, {
17937
+ name: "upload"
17759
17938
  })
17760
17939
  }), jsxs("div", {
17761
17940
  className: "adyen-kyc-dropzone__labels",
17762
- children: [jsxs("div", {
17763
- className: "adyen-kyc-dropzone__drag-text",
17764
- children: [jsxs("span", {
17765
- children: [i18n.get("dragYourFilesHereOr"), " "]
17766
- }), jsx("button", {
17767
- className: "adyen-kyc-dropzone__button",
17768
- type: "button",
17769
- onClick: openFilePicker,
17770
- children: i18n.get("browse")
17771
- })]
17772
- }), jsx("div", {
17773
- className: "adyen-kyc-dropzone__supports-text",
17774
- children: i18n.get("supports", {
17941
+ children: [jsx(Typography, {
17942
+ el: "h4",
17943
+ variant: "body-strongest",
17944
+ children: i18n.get("dropFileToUpload")
17945
+ }), jsx(Typography, {
17946
+ color: "secondary",
17947
+ children: i18n.get("supportedFileTypes", {
17948
+ values: {
17949
+ fileTypes: allowedFileTypesString
17950
+ }
17951
+ })
17952
+ }), jsx(Typography, {
17953
+ color: "secondary",
17954
+ children: i18n.get("maxFileSize", {
17955
+ values: {
17956
+ maxSize: bytesToSize(maxSize)
17957
+ }
17958
+ })
17959
+ }), jsx(Typography, {
17960
+ color: "secondary",
17961
+ children: i18n.get("upToFiles", {
17775
17962
  values: {
17776
- fileTypes: allowedFileTypesString,
17777
- maxSize: bytesToSize(maxSize),
17778
17963
  maxFiles: maxNumberOfFiles
17779
17964
  }
17780
17965
  })
17781
17966
  })]
17967
+ }), jsx("div", {
17968
+ className: "adyen-kyc-dropzone__button",
17969
+ children: jsx(Button, {
17970
+ label: i18n.get("browseFiles"),
17971
+ onClick: openFilePicker,
17972
+ secondary: true,
17973
+ small: true
17974
+ })
17782
17975
  }), jsx("input", {
17783
17976
  className: "adyen-kyc-dropzone__input",
17784
17977
  ref: fileInput,
@@ -18134,7 +18327,6 @@ function BankDocument(props) {
18134
18327
  setFiles: handleChangeFor("bankStatementDocument"),
18135
18328
  isValid: valid.bankStatementDocument ?? isBankStatementOptional,
18136
18329
  errorMessage: (_a2 = errors.bankStatementDocument) == null ? void 0 : _a2.errorMessage,
18137
- iconPrefix: getDocumentGuidancePrefix(DocumentType.BANK_STATEMENT, true),
18138
18330
  ...bankStatementValidationOptions
18139
18331
  });
18140
18332
  }
@@ -18327,7 +18519,7 @@ class AdyenKycSdkError extends Error {
18327
18519
  }
18328
18520
  let sdkToken;
18329
18521
  let fetchSdkToken;
18330
- const logger$s = createLogger("Session");
18522
+ const logger$t = createLogger("Session");
18331
18523
  const setSdkToken = (token) => {
18332
18524
  sdkToken = token;
18333
18525
  };
@@ -18350,7 +18542,7 @@ const refreshSession = async () => {
18350
18542
  setSdkToken(token);
18351
18543
  isSessionRefreshed = true;
18352
18544
  } catch (e) {
18353
- logger$s.error("Failed to fetch sdk token", e);
18545
+ logger$t.error("Failed to fetch sdk token", e);
18354
18546
  }
18355
18547
  return isSessionRefreshed;
18356
18548
  };
@@ -18360,7 +18552,7 @@ const addAnimationStartListener = (element, listener) => {
18360
18552
  const removeAnimationStartListener = (element, listener) => {
18361
18553
  element.removeEventListener("animationstart", listener, false);
18362
18554
  };
18363
- const logger$r = createLogger("Fetch");
18555
+ const logger$s = createLogger("Fetch");
18364
18556
  const getRequestObject = (options, data) => {
18365
18557
  const {
18366
18558
  headers = [],
@@ -18407,10 +18599,10 @@ const logFetchError = (message, level) => {
18407
18599
  case "info":
18408
18600
  case "warn":
18409
18601
  case "error":
18410
- logger$r[level](message);
18602
+ logger$s[level](message);
18411
18603
  break;
18412
18604
  default:
18413
- logger$r.error(message);
18605
+ logger$s.error(message);
18414
18606
  }
18415
18607
  };
18416
18608
  const handleFetchResponse = async (response, responseType) => {
@@ -18501,7 +18693,7 @@ const RELEVANT_MESSAGE_TYPES = ["account_verification_report_id", "error"];
18501
18693
  const TERMINAL_DATA_PROPS = ["accounts", "error", "reference"];
18502
18694
  const MOUNT_TIMEOUT = 10 * 1e3;
18503
18695
  const TINK_VENDOR = "Tink";
18504
- const logger$q = createLogger("iframeWidget");
18696
+ const logger$r = createLogger("iframeWidget");
18505
18697
  const isObjectData = (data) => typeof data === "object" && !Array.isArray(data) && data !== null;
18506
18698
  const isTerminalMessageData = (data) => isObjectData(data) && Object.entries(data).some(([prop]) => TERMINAL_DATA_PROPS.includes(prop));
18507
18699
  const parseMessageJson = (message) => {
@@ -18519,7 +18711,7 @@ const callbackErrorHandler = async (response) => {
18519
18711
  try {
18520
18712
  await response;
18521
18713
  } catch (ex) {
18522
- logger$q.error(ex);
18714
+ logger$r.error(ex);
18523
18715
  }
18524
18716
  return {
18525
18717
  error: "UNKNOWN_ERROR",
@@ -18622,7 +18814,7 @@ class IFrameWidget {
18622
18814
  message = responseData.errorMessage;
18623
18815
  }
18624
18816
  } catch (ex) {
18625
- logger$q.error(ex);
18817
+ logger$r.error(ex);
18626
18818
  }
18627
18819
  throw new AdyenKycSdkError(reason, jsonData.error);
18628
18820
  }
@@ -18809,7 +19001,7 @@ function BankVerificationWidget({
18809
19001
  ref: widgetContainerRef
18810
19002
  });
18811
19003
  }
18812
- const logger$p = createLogger("BankVerification");
19004
+ const logger$q = createLogger("BankVerification");
18813
19005
  const accountVerificationFields = ["verifiedAccountHolder", "verifiedBankCountry", "verifiedBankName", "verifiedCurrencyCode", "verifiedBankAccountNumber"];
18814
19006
  const InstantVerificationErrorContext = createContext(null);
18815
19007
  const useInstantVerificationErrorNotification = (notificationVisibilityDuration) => {
@@ -18841,7 +19033,7 @@ const usePreferredVendorForCountry = (country, getBankVerificationVendors) => {
18841
19033
  const vendor = vendors[0];
18842
19034
  setPreferredVendor(vendor.name ? vendor : void 0);
18843
19035
  };
18844
- getPreferredVendor().catch(logger$p.error);
19036
+ getPreferredVendor().catch(logger$q.error);
18845
19037
  }, [country, getBankVerificationVendors]);
18846
19038
  return preferredVendor;
18847
19039
  };
@@ -20082,24 +20274,22 @@ const regions = {
20082
20274
  apac: [CountryCodes.NewZealand, CountryCodes.Australia]
20083
20275
  };
20084
20276
  const getAllowedBankCountries = (country) => Object.values(regions).find((countriesInARegion) => countriesInARegion.includes(country)) ?? [country];
20085
- const makePayoutVerificationMethodsMetadata = (svgPath, instantVerificationProvider) => ({
20277
+ const makePayoutVerificationMethodsMetadata = (instantVerificationProvider) => ({
20086
20278
  instantVerification: {
20087
20279
  name: "verifyViaMobileBankingAppOrWebsite",
20088
20280
  subtitle: "instant",
20089
20281
  description: "instantVerificationDescription",
20090
- iconComponentDesktop: `${svgPath}/instant-verification-desktop.svg`,
20091
- iconComponentMobile: `${svgPath}/instant-verification-mobile.svg`,
20282
+ svgName: "payout-verification-instant",
20092
20283
  provider: instantVerificationProvider ? {
20093
20284
  name: instantVerificationProvider,
20094
- icon: `${svgPath}/provider-logo-${instantVerificationProvider}.svg`
20285
+ svgName: `${instantVerificationProvider}-logo`
20095
20286
  } : void 0
20096
20287
  },
20097
20288
  manualVerification: {
20098
20289
  name: "uploadABankStatement",
20099
20290
  subtitle: "mayTakeAFewDays",
20100
20291
  description: "manualVerificationDescription",
20101
- iconComponentDesktop: `${svgPath}/manual-verification-desktop.svg`,
20102
- iconComponentMobile: `${svgPath}/manual-verification-mobile.svg`
20292
+ svgName: "payout-verification-manual"
20103
20293
  }
20104
20294
  });
20105
20295
  const payoutVerificationMethods = ["instantVerification", "manualVerification"];
@@ -20187,24 +20377,14 @@ const PayoutVerificationMethodOptionIcon = ({
20187
20377
  } = useI18nContext();
20188
20378
  const {
20189
20379
  description,
20190
- iconComponentDesktop,
20191
- iconComponentMobile
20380
+ svgName
20192
20381
  } = methodsMetadata[method];
20193
20382
  return jsx("div", {
20194
20383
  className: "adyen-kyc-radio-group-card__illustration",
20195
- children: jsxs("picture", {
20196
- children: [jsx("source", {
20197
- type: "image/svg+xml",
20198
- media: `(min-width: ${layoutBreakpointSizes.md}px)`,
20199
- srcSet: iconComponentDesktop
20200
- }), jsx("source", {
20201
- type: "image/svg+xml",
20202
- media: `(max-width: ${layoutBreakpointSizes.md}px)`,
20203
- srcSet: iconComponentMobile
20204
- }), jsx("img", {
20205
- srcSet: iconComponentDesktop,
20206
- alt: i18n.get(description)
20207
- })]
20384
+ children: jsx(Svg, {
20385
+ type: "image",
20386
+ name: svgName,
20387
+ alt: i18n.get(description)
20208
20388
  })
20209
20389
  });
20210
20390
  };
@@ -20220,9 +20400,9 @@ const PayoutVerificationMethodOptionFooter = ({
20220
20400
  } = methodsMetadata[method];
20221
20401
  return provider ? jsxs("div", {
20222
20402
  className: "adyen-kyc-field-verification-methods__footer",
20223
- children: [i18n.get("poweredBy"), jsx("img", {
20224
- className: "adyen-kyc-field-verification-methods__icon",
20225
- src: provider.icon,
20403
+ children: [i18n.get("poweredBy"), jsx(Svg, {
20404
+ type: "image",
20405
+ name: provider.svgName,
20226
20406
  alt: provider.name
20227
20407
  })]
20228
20408
  }) : null;
@@ -20263,9 +20443,6 @@ function PayoutVerificationMethod(props) {
20263
20443
  const {
20264
20444
  i18n
20265
20445
  } = useI18nContext();
20266
- const {
20267
- getImageUrl
20268
- } = useConfigurationApi();
20269
20446
  const instantVerificationError = useContext(InstantVerificationErrorContext);
20270
20447
  const {
20271
20448
  isSettingEnabled
@@ -20305,8 +20482,7 @@ function PayoutVerificationMethod(props) {
20305
20482
  }), [data, errors, fieldProblems, valid]);
20306
20483
  const providerName = getInstantVerificationProvider(props.bankVerificationVendors, data.bankCountry);
20307
20484
  const instantVerificationAvailable = Boolean(props.instantVerificationAllowed && providerName && providerName !== "loading");
20308
- const svgPath = `${getImageUrl()}payout-verification-method`;
20309
- const methodsMetadata = makePayoutVerificationMethodsMetadata(svgPath, providerName === "loading" ? void 0 : providerName);
20485
+ const methodsMetadata = makePayoutVerificationMethodsMetadata(providerName === "loading" ? void 0 : providerName);
20310
20486
  useEffect(() => {
20311
20487
  if (!hasSelectedMethod && instantVerificationAvailable && data.payoutVerificationMethod !== "instantVerification") {
20312
20488
  handleChangeFor("payoutVerificationMethod")("instantVerification");
@@ -20418,31 +20594,29 @@ function PayoutVerificationMethod(props) {
20418
20594
  }
20419
20595
  }),
20420
20596
  content: jsxs(Fragment, {
20421
- children: [jsxs("p", {
20422
- children: [" ", i18n.get("isOurTrustedPartnerHelpingSpeedUpSetup", {
20597
+ children: [jsx(Typography, {
20598
+ children: i18n.get("isOurTrustedPartnerHelpingSpeedUpSetup", {
20423
20599
  values: {
20424
20600
  provider: getProviderDisplayName(providerName)
20425
20601
  }
20426
- }), " "]
20427
- }), jsxs("ul", {
20428
- className: "adyen-kyc-guidance-list",
20429
- children: [jsx("li", {
20430
- className: "adyen-kyc-guidance-list__item",
20602
+ })
20603
+ }), jsxs(List, {
20604
+ children: [jsx(ListItem, {
20431
20605
  children: i18n.get("selectTheBankToReceivePayouts")
20432
- }), jsx("li", {
20433
- className: "adyen-kyc-guidance-list__item",
20606
+ }), jsx(ListItem, {
20434
20607
  children: i18n.get("loginIntoYourBankingEnvironment")
20435
- }), jsx("li", {
20436
- className: "adyen-kyc-guidance-list__item",
20608
+ }), jsx(ListItem, {
20437
20609
  children: i18n.get("yourBankWillConfirmYourAccountDetails")
20438
20610
  })]
20439
- }), jsx("p", {
20611
+ }), jsx(Typography, {
20440
20612
  children: i18n.get("adyenWillOnlyGetTemporaryAccess")
20441
20613
  }), jsx(Link, {
20442
- className: "adyen-kyc-guidance-external-link",
20443
20614
  href: "https://www.adyen.com/policies-and-disclaimer/privacy-policy",
20444
20615
  external: true,
20445
- children: i18n.get("learnMore")
20616
+ children: jsx(Typography, {
20617
+ variant: "caption",
20618
+ children: i18n.get("learnMore")
20619
+ })
20446
20620
  })]
20447
20621
  })
20448
20622
  }) : void 0]
@@ -20515,7 +20689,7 @@ function PayoutDetailsComponent(props) {
20515
20689
  data: propData
20516
20690
  } = props;
20517
20691
  const [instantVerificationError, setInstantVerificationError] = useInstantVerificationErrorNotification(1e4);
20518
- const verificationMethodFormProps = getFormProps(props, payoutSteps.payoutVerificationMethod.formId);
20692
+ const verificationMethodFormProps = getFormProps(props, PayoutVerificationMethodFormID);
20519
20693
  const accountVerificationFormProps = getFormProps(props, PayoutAccountVerificationFormID);
20520
20694
  const payoutAccountFormProps = getFormProps(props, payoutSteps.payoutAccountDetails(taskType, isExperimentEnabled("EnableNewEntryFlow")).formId);
20521
20695
  const bankDocumentFormProps = getFormProps(props, PayoutAccountDocumentsFormID);
@@ -21406,6 +21580,36 @@ const trustRegistrationDetailsValidations = {
21406
21580
  errorMessage: "fieldIsRequired"
21407
21581
  }
21408
21582
  };
21583
+ const trustRegistrationDetailsValidationsV4 = {
21584
+ trustType: {
21585
+ modes: ["blur"],
21586
+ validate: (trustType) => !!trustType,
21587
+ errorMessage: "fieldIsRequired"
21588
+ },
21589
+ country: {
21590
+ modes: ["blur"],
21591
+ validate: (country) => !!country,
21592
+ errorMessage: "fieldIsRequired"
21593
+ },
21594
+ legalName: [{
21595
+ modes: ["blur"],
21596
+ validate: hasText,
21597
+ errorMessage: "fieldIsRequired"
21598
+ }, {
21599
+ modes: ["blur"],
21600
+ validate: (input) => !matchesRegex(NO_ALPHABET_REGEX, input),
21601
+ errorMessage: "nameMustContainLetters"
21602
+ }, {
21603
+ modes: ["blur"],
21604
+ validate: (input) => !matchesRegex(EMOJI_REGEX, input) && !hasRepeatedCharacters(input) && isValidMinLength(input, 3) && !isInvalidName(input) && matchesRegex(OTHER_ENTITIES_VALID_CHAR_REGEX, input),
21605
+ errorMessage: "checkForTypos"
21606
+ }],
21607
+ objectOfTrust: {
21608
+ modes: ["blur"],
21609
+ validate: (objectOfTrust) => !!objectOfTrust,
21610
+ errorMessage: "fieldIsRequired"
21611
+ }
21612
+ };
21409
21613
  const trustRegistrationDetailsFields = ["legalName", "country", "trustType", "objectOfTrust", "taxId", "registrationNumber"];
21410
21614
  const ALLOWED_TRUST_COUNTRIES = [CountryCodes.Australia, CountryCodes.NewZealand];
21411
21615
  function TrustRegistrationDetailsComponent(props) {
@@ -21416,6 +21620,10 @@ function TrustRegistrationDetailsComponent(props) {
21416
21620
  const {
21417
21621
  i18n
21418
21622
  } = useI18nContext();
21623
+ const {
21624
+ isExperimentEnabled
21625
+ } = useExperimentsContext();
21626
+ const isStrictNameAndAddressValidationEnabled = isExperimentEnabled(ExperimentNames.HOStrictNameAndAddressValidationV4);
21419
21627
  const TRUST_REGISTRATION_DETAILS = props.id || trustForms.trustRegistrationDetails.formId;
21420
21628
  const stateRef = useRef({
21421
21629
  setState: null
@@ -21437,7 +21645,7 @@ function TrustRegistrationDetailsComponent(props) {
21437
21645
  ...props.data,
21438
21646
  country
21439
21647
  },
21440
- rules: props.validators || trustRegistrationDetailsValidations,
21648
+ rules: props.validators || (isStrictNameAndAddressValidationEnabled ? trustRegistrationDetailsValidationsV4 : trustRegistrationDetailsValidations),
21441
21649
  fieldProblems: props == null ? void 0 : props.fieldValidationErrors
21442
21650
  });
21443
21651
  const formUtils = formUtilities(props, i18n);
@@ -22481,8 +22689,9 @@ const useFormComposer = ({
22481
22689
  const isFormSummaryStep = (form) => form.formId === summaryStep.formId;
22482
22690
  const [hasAlreadyNavigatedForm, setHasAlreadyNavigatedForm] = useState(false);
22483
22691
  const getFormIndex = (formId) => forms2.findIndex((form) => form.formId === formId);
22484
- const isFinalStep = getFormIndex(activeForm.formId) === forms2.length - 1;
22485
- const isFirstStep = getFormIndex(activeForm.formId) === 0;
22692
+ const currentStep = getFormIndex(activeForm.formId);
22693
+ const isFinalStep = currentStep === forms2.length - 1;
22694
+ const isFirstStep = currentStep === 0;
22486
22695
  const [hideHomeButton, setHideHomeButton] = useState(false);
22487
22696
  const [hideBackButton, setHideBackButton] = useState(false);
22488
22697
  useHideButton(isFirstStep, setHideBackButton);
@@ -22585,7 +22794,8 @@ const useFormComposer = ({
22585
22794
  gotoFormByFormIndex,
22586
22795
  activeForm,
22587
22796
  shouldValidate,
22588
- setShouldValidate
22797
+ setShouldValidate,
22798
+ currentStep
22589
22799
  };
22590
22800
  };
22591
22801
  const obscuredPayoutFields = ["bankAccountNumber", "iban"];
@@ -22648,7 +22858,7 @@ const useUnifyLoadingStatus = (setParentLoadingStatus, ...childLoadingStatuses)
22648
22858
  setParentLoadingStatus(loadingStatus);
22649
22859
  }, [...childLoadingStatuses]);
22650
22860
  };
22651
- const logger$o = createLogger("useScenarioConfiguration");
22861
+ const logger$p = createLogger("useScenarioConfiguration");
22652
22862
  const useScenarioConfiguration = ({
22653
22863
  getConfigurationData,
22654
22864
  getPayoutAccountFormatData,
@@ -22674,12 +22884,12 @@ const useScenarioConfiguration = ({
22674
22884
  const response = await getConfigurationData();
22675
22885
  setConfigurationResponse(response);
22676
22886
  } catch (err) {
22677
- logger$o.warn("WARNING: Configuration request failed - error:", err);
22887
+ logger$p.warn("WARNING: Configuration request failed - error:", err);
22678
22888
  } finally {
22679
22889
  setConfigurationLoadingStatus("success");
22680
22890
  }
22681
22891
  };
22682
- makeConfigCallAndSave().catch(logger$o.error);
22892
+ makeConfigCallAndSave().catch(logger$p.error);
22683
22893
  }, [getConfigurationData, setConfigurationLoadingStatus]);
22684
22894
  useEffect(() => {
22685
22895
  if (!getPayoutAccountFormatData) return;
@@ -22696,12 +22906,12 @@ const useScenarioConfiguration = ({
22696
22906
  const defaultAccountFormat = defaultPayoutAccountFormat[country] ?? allowedBankAccountFormats[0];
22697
22907
  setAccountFormat(existingBankAccountFormat ?? defaultAccountFormat);
22698
22908
  } catch (err) {
22699
- logger$o.warn("WARNING: Payout format request failed - error:", err);
22909
+ logger$p.warn("WARNING: Payout format request failed - error:", err);
22700
22910
  } finally {
22701
22911
  setpayoutFormatLoadingStatus("success");
22702
22912
  }
22703
22913
  };
22704
- makePayoutFormatCallAndSave().catch(logger$o.error);
22914
+ makePayoutFormatCallAndSave().catch(logger$p.error);
22705
22915
  }, [country, setAccountFormat, getPayoutAccountFormatData, setpayoutFormatLoadingStatus, existingBankAccountFormat]);
22706
22916
  const {
22707
22917
  fieldConfigurations,
@@ -22910,7 +23120,6 @@ const taxInformationBase = {
22910
23120
  vatAbsenceReason: {
22911
23121
  rule: "countryUsesVat"
22912
23122
  },
22913
- // it still needs support from the BE: https://youtrack.is.adyen.com/issue/UO-2290
22914
23123
  taxInformation: {
22915
23124
  rule: "countryUsesTaxId"
22916
23125
  },
@@ -23457,10 +23666,8 @@ function VerifiedBusinessCard({
23457
23666
  }), jsx(Typography, {
23458
23667
  children: jsxs("div", {
23459
23668
  className: "adyen-kyc-verified-business-card__address",
23460
- children: [address, jsx("a", {
23669
+ children: [address, addressLink && jsx(Link, {
23461
23670
  href: addressLink,
23462
- target: "_blank",
23463
- rel: "noreferrer",
23464
23671
  children: i18n.get("showOnMap")
23465
23672
  })]
23466
23673
  })
@@ -23479,7 +23686,7 @@ function VerifiedBusinessCard({
23479
23686
  });
23480
23687
  }
23481
23688
  const ADDITIONAL_INFORMATION_FORM_ID = "additionalInformation";
23482
- const additionalInformationFields = [...LEGAL_COMPANY_NAME_FIELD, ...DBA_NAME_FIELD, ...BUSINESS_REGISTRATION_NUMBER_FIELD, ...TAX_INFORMATION_FIELD, ...VAT_NUMBER_FIELD, ...DATE_OF_INCORPORATION_FIELD, ...STOCK_EXCHANGE_MIC_FIELD, ...STOCK_ISIN_FIELD, ...STOCK_TICKER_SYMBOL_FIELD, "legalFormDescription"];
23689
+ const ADDITIONAL_INFORMATION_FIELDS = [...LEGAL_COMPANY_NAME_FIELD, ...DBA_NAME_FIELD, ...BUSINESS_REGISTRATION_NUMBER_FIELD, ...TAX_INFORMATION_FIELD, ...VAT_NUMBER_FIELD, ...DATE_OF_INCORPORATION_FIELD, ...STOCK_EXCHANGE_MIC_FIELD, ...STOCK_ISIN_FIELD, ...STOCK_TICKER_SYMBOL_FIELD, "legalFormDescription"];
23483
23690
  function AdditionalInformationComponent({
23484
23691
  data,
23485
23692
  labels: labels2,
@@ -23630,10 +23837,12 @@ function AdditionalInformationComponent({
23630
23837
  }, [formSchema, formData, formErrors, formFieldProblems, formValid, updateStateSlice]);
23631
23838
  useEffect(() => {
23632
23839
  if (verifiedBusiness && verifiedBusiness.name !== formData.legalCompanyName) return handleChangeFor("legalCompanyName")(verifiedBusiness.name);
23840
+ }, [formData.legalCompanyName, verifiedBusiness, showCompanyStructure]);
23841
+ useEffect(() => {
23633
23842
  if (!verifiedBusiness && !showCompanyStructure) {
23634
23843
  return resetToDefaultData();
23635
23844
  }
23636
- }, [formData.legalCompanyName, verifiedBusiness, showCompanyStructure]);
23845
+ }, [verifiedBusiness]);
23637
23846
  const showField = (fieldKeys) => fieldKeys.some((field) => {
23638
23847
  switch (field) {
23639
23848
  case "legalCompanyName": {
@@ -23644,6 +23853,8 @@ function AdditionalInformationComponent({
23644
23853
  }
23645
23854
  });
23646
23855
  return jsxs("form", {
23856
+ id: ADDITIONAL_INFORMATION_FORM_ID,
23857
+ className: "adyen-kyc-additional-information",
23647
23858
  children: [jsx(FormHeader, {
23648
23859
  heading,
23649
23860
  description
@@ -23652,167 +23863,164 @@ function AdditionalInformationComponent({
23652
23863
  verificationErrors: formVerificationErrors,
23653
23864
  validationErrors: fieldValidationErrors,
23654
23865
  formUtils
23655
- }), jsxs("div", {
23656
- className: "adyen-kyc-additional-information",
23657
- children: [showVerified && jsx(VerifiedBusinessCard, {
23658
- verifiedBusiness
23659
- }), jsxs("section", {
23660
- children: [showVerified && jsx(Typography, {
23661
- el: "h3",
23662
- children: i18n.get("otherBusinessInformation")
23663
- }), showField(LEGAL_COMPANY_NAME_FIELD) && jsx("div", {
23664
- className: "adyen-kyc-field-wrapper",
23665
- children: jsx(LegalCompanyNameField, {
23666
- data: formUtils.getFieldData(formData, LEGAL_COMPANY_NAME_FIELD),
23667
- valid: formUtils.getFieldValid(formValid, LEGAL_COMPANY_NAME_FIELD),
23668
- errors: formUtils.getFieldErrors(formErrors, formFieldProblems, LEGAL_COMPANY_NAME_FIELD),
23669
- labels: formUtils.getFieldLabels(LEGAL_COMPANY_NAME_FIELD),
23670
- helperText: formUtils.getFieldHelperText(LEGAL_COMPANY_NAME_FIELD, {
23671
- legalCompanyName: "legalCompanyName__helperText"
23672
- }),
23673
- readonly: formUtils.isReadOnly("legalCompanyName"),
23674
- handleChangeFor
23675
- })
23676
- }), showField(DBA_NAME_FIELD) && jsx("div", {
23677
- className: "adyen-kyc-field-wrapper",
23678
- children: jsx(DBANameField, {
23679
- data: formUtils.getFieldData(formData, DBA_NAME_FIELD),
23680
- valid: formUtils.getFieldValid(formValid, DBA_NAME_FIELD),
23681
- errors: formUtils.getFieldErrors(formErrors, formFieldProblems, DBA_NAME_FIELD),
23682
- labels: formUtils.getFieldLabels(DBA_NAME_FIELD, {
23683
- hasDba: "hasDba"
23684
- }),
23685
- readonly: formUtils.isReadOnly("dbaName"),
23686
- handleChangeFor,
23687
- setErrors
23688
- })
23689
- }), showField(BUSINESS_REGISTRATION_NUMBER_FIELD) && jsx("div", {
23690
- className: "adyen-kyc-field-wrapper",
23691
- children: jsx(BusinessRegistrationNumberField, {
23692
- data: formUtils.getFieldData(formData, BUSINESS_REGISTRATION_NUMBER_FIELD),
23693
- valid: formUtils.getFieldValid(formValid, BUSINESS_REGISTRATION_NUMBER_FIELD),
23694
- errors: formUtils.getFieldErrors(formErrors, formFieldProblems, BUSINESS_REGISTRATION_NUMBER_FIELD),
23695
- labels: formUtils.getFieldLabels(BUSINESS_REGISTRATION_NUMBER_FIELD, {
23696
- exemptedFromRegistrationNumber: "iDontHaveARegistrationNumber"
23697
- }),
23698
- mask: formUtils.getMask("registrationNumber"),
23699
- guidanceText: formUtils.getFieldGuidanceText(BUSINESS_REGISTRATION_NUMBER_FIELD),
23700
- placeholders: formUtils.getFieldPlaceholders(BUSINESS_REGISTRATION_NUMBER_FIELD),
23701
- helperText: formUtils.getFieldHelperText(BUSINESS_REGISTRATION_NUMBER_FIELD),
23702
- readonly: formUtils.isReadOnly("registrationNumber"),
23703
- optional: formUtils.isOptionalField("registrationNumber"),
23704
- shouldValidate,
23705
- handleChangeFor,
23706
- country,
23707
- canExempt: formUtils.isRequiredField("exemptedFromRegistrationNumber"),
23708
- companyType,
23709
- registrationNumberOptions,
23710
- registrationNumberType,
23711
- setRegistrationNumberType
23712
- })
23713
- }), showField(TAX_INFORMATION_FIELD) && jsx("div", {
23714
- className: "adyen-kyc-field-wrapper",
23715
- children: jsx(TaxInformationField, {
23716
- data: formUtils.getFieldData(formData, TAX_INFORMATION_FIELD),
23717
- valid: formUtils.getFieldValid(formValid, TAX_INFORMATION_FIELD),
23718
- errors: formUtils.getFieldErrors(formErrors, formFieldProblems, TAX_INFORMATION_FIELD),
23719
- labels: formUtils.getFieldLabels(TAX_INFORMATION_FIELD, {
23720
- exemptedFromTax: "iDontHaveATaxId"
23721
- }),
23722
- mask: formUtils.getMask("taxInformation"),
23723
- helperText: formUtils.getFieldHelperText(TAX_INFORMATION_FIELD),
23724
- guidanceText: formUtils.getFieldGuidanceText(TAX_INFORMATION_FIELD),
23725
- readonly: formUtils.isReadOnly("taxInformation"),
23726
- shouldValidate,
23727
- handleChangeFor,
23728
- canExempt: formUtils.isRequiredField("exemptedFromTax"),
23729
- isUen: formUtils.isRequiredField("isUen"),
23730
- country,
23731
- companyType,
23732
- taxIdNumberType,
23733
- setTaxIdNumberType,
23734
- defaultData: data == null ? void 0 : data.taxInformation
23735
- })
23736
- }), showField(VAT_NUMBER_FIELD) && jsx("div", {
23737
- className: "adyen-kyc-field-wrapper",
23738
- children: jsx(VatNumberField, {
23739
- data: formUtils.getFieldData(formData, VAT_NUMBER_FIELD),
23740
- valid: formUtils.getFieldValid(formValid, VAT_NUMBER_FIELD),
23741
- errors: formUtils.getFieldErrors(formErrors, formFieldProblems, VAT_NUMBER_FIELD),
23742
- labels: formUtils.getFieldLabels(VAT_NUMBER_FIELD, {
23743
- exemptedFromVat: "iDontHaveAVatNumber"
23744
- }),
23745
- mask: formUtils.getMask("vatNumber"),
23746
- guidanceText: formUtils.getFieldGuidanceText(VAT_NUMBER_FIELD),
23747
- placeholders: formUtils.getFieldPlaceholders(VAT_NUMBER_FIELD),
23748
- readonly: formUtils.isReadOnly("vatNumber"),
23749
- handleChangeFor,
23750
- country,
23751
- canExempt: formUtils.isRequiredField("exemptedFromVat"),
23752
- vatNumberType,
23753
- setVatNumberType
23754
- })
23755
- }), showField(DATE_OF_INCORPORATION_FIELD) && jsx("div", {
23756
- className: "adyen-kyc-field-wrapper",
23757
- children: jsx(DateOfIncorporationField, {
23758
- data: formUtils.getFieldData(formData, DATE_OF_INCORPORATION_FIELD),
23759
- valid: formUtils.getFieldValid(formValid, DATE_OF_INCORPORATION_FIELD),
23760
- errors: formUtils.getFieldErrors(formErrors, formFieldProblems, DATE_OF_INCORPORATION_FIELD),
23761
- labels: formUtils.getFieldLabels(DATE_OF_INCORPORATION_FIELD),
23762
- placeholders: formUtils.getFieldPlaceholders(DATE_OF_INCORPORATION_FIELD, {
23763
- dateOfIncorporation: "datePlaceholder"
23764
- }),
23765
- readonly: formUtils.isReadOnly("dateOfIncorporation"),
23766
- handleChangeFor
23767
- })
23768
- })]
23769
- }), showStockData && jsxs("section", {
23770
- children: [jsx(Typography, {
23771
- el: "h3",
23772
- children: i18n.get("stockExchangeInformation")
23773
- }), showField(STOCK_EXCHANGE_MIC_FIELD) && jsx("div", {
23774
- className: "adyen-kyc-field-wrapper",
23775
- children: jsx(StockExchangeMICField, {
23776
- data: formUtils.getFieldData(formData, STOCK_EXCHANGE_MIC_FIELD),
23777
- valid: formUtils.getFieldValid(formValid, STOCK_EXCHANGE_MIC_FIELD),
23778
- errors: formUtils.getFieldErrors(formErrors, formFieldProblems, STOCK_EXCHANGE_MIC_FIELD),
23779
- labels: formUtils.getFieldLabels(STOCK_EXCHANGE_MIC_FIELD),
23780
- placeholders: formUtils.getFieldPlaceholders(STOCK_EXCHANGE_MIC_FIELD),
23781
- mask: formUtils.getMask("stockExchangeMIC"),
23782
- guidanceText: formUtils.getFieldGuidanceText(STOCK_EXCHANGE_MIC_FIELD),
23783
- readonly: formUtils.isReadOnly("stockExchangeMIC"),
23784
- shouldValidate,
23785
- handleChangeFor
23786
- })
23787
- }), showField(STOCK_ISIN_FIELD) && jsx("div", {
23788
- className: "adyen-kyc-field-wrapper",
23789
- children: jsx(StockISINField, {
23790
- data: formUtils.getFieldData(formData, STOCK_ISIN_FIELD),
23791
- valid: formUtils.getFieldValid(formValid, STOCK_ISIN_FIELD),
23792
- errors: formUtils.getFieldErrors(formErrors, formFieldProblems, STOCK_ISIN_FIELD),
23793
- labels: formUtils.getFieldLabels(STOCK_ISIN_FIELD),
23794
- placeholders: formUtils.getFieldPlaceholders(STOCK_ISIN_FIELD),
23795
- mask: formUtils.getMask("stockISIN"),
23796
- guidanceText: formUtils.getFieldGuidanceText(STOCK_ISIN_FIELD),
23797
- readonly: formUtils.isReadOnly("stockISIN"),
23798
- shouldValidate,
23799
- handleChangeFor
23800
- })
23801
- }), showField(STOCK_TICKER_SYMBOL_FIELD) && jsx("div", {
23802
- className: "adyen-kyc-field-wrapper",
23803
- children: jsx(StockTickerSymbolField, {
23804
- data: formUtils.getFieldData(formData, STOCK_TICKER_SYMBOL_FIELD),
23805
- valid: formUtils.getFieldValid(formValid, STOCK_TICKER_SYMBOL_FIELD),
23806
- errors: formUtils.getFieldErrors(formErrors, formFieldProblems, STOCK_TICKER_SYMBOL_FIELD),
23807
- labels: formUtils.getFieldLabels(STOCK_TICKER_SYMBOL_FIELD),
23808
- placeholders: formUtils.getFieldPlaceholders(STOCK_TICKER_SYMBOL_FIELD),
23809
- mask: formUtils.getMask("stockTickerSymbol"),
23810
- guidanceText: formUtils.getFieldGuidanceText(STOCK_TICKER_SYMBOL_FIELD),
23811
- readonly: formUtils.isReadOnly("stockTickerSymbol"),
23812
- shouldValidate,
23813
- handleChangeFor
23814
- })
23815
- })]
23866
+ }), showVerified && jsx(VerifiedBusinessCard, {
23867
+ verifiedBusiness
23868
+ }), jsxs("fieldset", {
23869
+ children: [showVerified && jsx(Typography, {
23870
+ el: "h3",
23871
+ children: i18n.get("otherBusinessInformation")
23872
+ }), showField(LEGAL_COMPANY_NAME_FIELD) && jsx("div", {
23873
+ className: "adyen-kyc-field-wrapper",
23874
+ children: jsx(LegalCompanyNameField, {
23875
+ data: formUtils.getFieldData(formData, LEGAL_COMPANY_NAME_FIELD),
23876
+ valid: formUtils.getFieldValid(formValid, LEGAL_COMPANY_NAME_FIELD),
23877
+ errors: formUtils.getFieldErrors(formErrors, formFieldProblems, LEGAL_COMPANY_NAME_FIELD),
23878
+ labels: formUtils.getFieldLabels(LEGAL_COMPANY_NAME_FIELD),
23879
+ helperText: formUtils.getFieldHelperText(LEGAL_COMPANY_NAME_FIELD, {
23880
+ legalCompanyName: "legalCompanyName__helperText"
23881
+ }),
23882
+ readonly: formUtils.isReadOnly("legalCompanyName"),
23883
+ handleChangeFor
23884
+ })
23885
+ }), showField(DBA_NAME_FIELD) && jsx("div", {
23886
+ className: "adyen-kyc-field-wrapper",
23887
+ children: jsx(DBANameField, {
23888
+ data: formUtils.getFieldData(formData, DBA_NAME_FIELD),
23889
+ valid: formUtils.getFieldValid(formValid, DBA_NAME_FIELD),
23890
+ errors: formUtils.getFieldErrors(formErrors, formFieldProblems, DBA_NAME_FIELD),
23891
+ labels: formUtils.getFieldLabels(DBA_NAME_FIELD, {
23892
+ hasDba: "hasDba"
23893
+ }),
23894
+ readonly: formUtils.isReadOnly("dbaName"),
23895
+ handleChangeFor,
23896
+ setErrors
23897
+ })
23898
+ }), showField(BUSINESS_REGISTRATION_NUMBER_FIELD) && jsx("div", {
23899
+ className: "adyen-kyc-field-wrapper",
23900
+ children: jsx(BusinessRegistrationNumberField, {
23901
+ data: formUtils.getFieldData(formData, BUSINESS_REGISTRATION_NUMBER_FIELD),
23902
+ valid: formUtils.getFieldValid(formValid, BUSINESS_REGISTRATION_NUMBER_FIELD),
23903
+ errors: formUtils.getFieldErrors(formErrors, formFieldProblems, BUSINESS_REGISTRATION_NUMBER_FIELD),
23904
+ labels: formUtils.getFieldLabels(BUSINESS_REGISTRATION_NUMBER_FIELD, {
23905
+ exemptedFromRegistrationNumber: "iDontHaveARegistrationNumber"
23906
+ }),
23907
+ mask: formUtils.getMask("registrationNumber"),
23908
+ guidanceText: formUtils.getFieldGuidanceText(BUSINESS_REGISTRATION_NUMBER_FIELD),
23909
+ placeholders: formUtils.getFieldPlaceholders(BUSINESS_REGISTRATION_NUMBER_FIELD),
23910
+ helperText: formUtils.getFieldHelperText(BUSINESS_REGISTRATION_NUMBER_FIELD),
23911
+ readonly: formUtils.isReadOnly("registrationNumber"),
23912
+ optional: formUtils.isOptionalField("registrationNumber"),
23913
+ shouldValidate,
23914
+ handleChangeFor,
23915
+ country,
23916
+ canExempt: formUtils.isRequiredField("exemptedFromRegistrationNumber"),
23917
+ companyType,
23918
+ registrationNumberOptions,
23919
+ registrationNumberType,
23920
+ setRegistrationNumberType
23921
+ })
23922
+ }), showField(TAX_INFORMATION_FIELD) && jsx("div", {
23923
+ className: "adyen-kyc-field-wrapper",
23924
+ children: jsx(TaxInformationField, {
23925
+ data: formUtils.getFieldData(formData, TAX_INFORMATION_FIELD),
23926
+ valid: formUtils.getFieldValid(formValid, TAX_INFORMATION_FIELD),
23927
+ errors: formUtils.getFieldErrors(formErrors, formFieldProblems, TAX_INFORMATION_FIELD),
23928
+ labels: formUtils.getFieldLabels(TAX_INFORMATION_FIELD, {
23929
+ exemptedFromTax: "iDontHaveATaxId"
23930
+ }),
23931
+ mask: formUtils.getMask("taxInformation"),
23932
+ helperText: formUtils.getFieldHelperText(TAX_INFORMATION_FIELD),
23933
+ guidanceText: formUtils.getFieldGuidanceText(TAX_INFORMATION_FIELD),
23934
+ readonly: formUtils.isReadOnly("taxInformation"),
23935
+ shouldValidate,
23936
+ handleChangeFor,
23937
+ canExempt: formUtils.isRequiredField("exemptedFromTax"),
23938
+ isUen: formUtils.isRequiredField("isUen"),
23939
+ country,
23940
+ companyType,
23941
+ taxIdNumberType,
23942
+ setTaxIdNumberType,
23943
+ defaultData: data == null ? void 0 : data.taxInformation
23944
+ })
23945
+ }), showField(VAT_NUMBER_FIELD) && jsx("div", {
23946
+ className: "adyen-kyc-field-wrapper",
23947
+ children: jsx(VatNumberField, {
23948
+ data: formUtils.getFieldData(formData, VAT_NUMBER_FIELD),
23949
+ valid: formUtils.getFieldValid(formValid, VAT_NUMBER_FIELD),
23950
+ errors: formUtils.getFieldErrors(formErrors, formFieldProblems, VAT_NUMBER_FIELD),
23951
+ labels: formUtils.getFieldLabels(VAT_NUMBER_FIELD, {
23952
+ exemptedFromVat: "iDontHaveAVatNumber"
23953
+ }),
23954
+ mask: formUtils.getMask("vatNumber"),
23955
+ guidanceText: formUtils.getFieldGuidanceText(VAT_NUMBER_FIELD),
23956
+ placeholders: formUtils.getFieldPlaceholders(VAT_NUMBER_FIELD),
23957
+ readonly: formUtils.isReadOnly("vatNumber"),
23958
+ handleChangeFor,
23959
+ country,
23960
+ canExempt: formUtils.isRequiredField("exemptedFromVat"),
23961
+ vatNumberType,
23962
+ setVatNumberType
23963
+ })
23964
+ }), showField(DATE_OF_INCORPORATION_FIELD) && jsx("div", {
23965
+ className: "adyen-kyc-field-wrapper",
23966
+ children: jsx(DateOfIncorporationField, {
23967
+ data: formUtils.getFieldData(formData, DATE_OF_INCORPORATION_FIELD),
23968
+ valid: formUtils.getFieldValid(formValid, DATE_OF_INCORPORATION_FIELD),
23969
+ errors: formUtils.getFieldErrors(formErrors, formFieldProblems, DATE_OF_INCORPORATION_FIELD),
23970
+ labels: formUtils.getFieldLabels(DATE_OF_INCORPORATION_FIELD),
23971
+ placeholders: formUtils.getFieldPlaceholders(DATE_OF_INCORPORATION_FIELD, {
23972
+ dateOfIncorporation: "datePlaceholder"
23973
+ }),
23974
+ readonly: formUtils.isReadOnly("dateOfIncorporation"),
23975
+ handleChangeFor
23976
+ })
23977
+ })]
23978
+ }), showStockData && jsxs("fieldset", {
23979
+ children: [jsx(Typography, {
23980
+ el: "h3",
23981
+ children: i18n.get("stockExchangeInformation")
23982
+ }), showField(STOCK_EXCHANGE_MIC_FIELD) && jsx("div", {
23983
+ className: "adyen-kyc-field-wrapper",
23984
+ children: jsx(StockExchangeMICField, {
23985
+ data: formUtils.getFieldData(formData, STOCK_EXCHANGE_MIC_FIELD),
23986
+ valid: formUtils.getFieldValid(formValid, STOCK_EXCHANGE_MIC_FIELD),
23987
+ errors: formUtils.getFieldErrors(formErrors, formFieldProblems, STOCK_EXCHANGE_MIC_FIELD),
23988
+ labels: formUtils.getFieldLabels(STOCK_EXCHANGE_MIC_FIELD),
23989
+ placeholders: formUtils.getFieldPlaceholders(STOCK_EXCHANGE_MIC_FIELD),
23990
+ mask: formUtils.getMask("stockExchangeMIC"),
23991
+ guidanceText: formUtils.getFieldGuidanceText(STOCK_EXCHANGE_MIC_FIELD),
23992
+ readonly: formUtils.isReadOnly("stockExchangeMIC"),
23993
+ shouldValidate,
23994
+ handleChangeFor
23995
+ })
23996
+ }), showField(STOCK_ISIN_FIELD) && jsx("div", {
23997
+ className: "adyen-kyc-field-wrapper",
23998
+ children: jsx(StockISINField, {
23999
+ data: formUtils.getFieldData(formData, STOCK_ISIN_FIELD),
24000
+ valid: formUtils.getFieldValid(formValid, STOCK_ISIN_FIELD),
24001
+ errors: formUtils.getFieldErrors(formErrors, formFieldProblems, STOCK_ISIN_FIELD),
24002
+ labels: formUtils.getFieldLabels(STOCK_ISIN_FIELD),
24003
+ placeholders: formUtils.getFieldPlaceholders(STOCK_ISIN_FIELD),
24004
+ mask: formUtils.getMask("stockISIN"),
24005
+ guidanceText: formUtils.getFieldGuidanceText(STOCK_ISIN_FIELD),
24006
+ readonly: formUtils.isReadOnly("stockISIN"),
24007
+ shouldValidate,
24008
+ handleChangeFor
24009
+ })
24010
+ }), showField(STOCK_TICKER_SYMBOL_FIELD) && jsx("div", {
24011
+ className: "adyen-kyc-field-wrapper",
24012
+ children: jsx(StockTickerSymbolField, {
24013
+ data: formUtils.getFieldData(formData, STOCK_TICKER_SYMBOL_FIELD),
24014
+ valid: formUtils.getFieldValid(formValid, STOCK_TICKER_SYMBOL_FIELD),
24015
+ errors: formUtils.getFieldErrors(formErrors, formFieldProblems, STOCK_TICKER_SYMBOL_FIELD),
24016
+ labels: formUtils.getFieldLabels(STOCK_TICKER_SYMBOL_FIELD),
24017
+ placeholders: formUtils.getFieldPlaceholders(STOCK_TICKER_SYMBOL_FIELD),
24018
+ mask: formUtils.getMask("stockTickerSymbol"),
24019
+ guidanceText: formUtils.getFieldGuidanceText(STOCK_TICKER_SYMBOL_FIELD),
24020
+ readonly: formUtils.isReadOnly("stockTickerSymbol"),
24021
+ shouldValidate,
24022
+ handleChangeFor
24023
+ })
23816
24024
  })]
23817
24025
  })]
23818
24026
  });
@@ -23891,7 +24099,7 @@ const defaultFieldConfig = {
23891
24099
  })
23892
24100
  };
23893
24101
  const BASIC_INFORMATION_FORM_ID = "basicInformation";
23894
- const basicInformationFields = [...COUNTRY_FIELD, ...BUSINESS_NAME_FIELD, ...TAX_INFORMATION_FIELD, ...STATE_FIELD, ...BUSINESS_REGISTRATION_NUMBER_FIELD];
24102
+ const BASIC_INFORMATION_FIELDS = [...COUNTRY_FIELD, ...BUSINESS_NAME_FIELD, ...TAX_INFORMATION_FIELD, ...STATE_FIELD, ...BUSINESS_REGISTRATION_NUMBER_FIELD];
23895
24103
  function BasicInformationComponent({
23896
24104
  data,
23897
24105
  labels: labels2,
@@ -23912,9 +24120,9 @@ function BasicInformationComponent({
23912
24120
  country,
23913
24121
  companyType = CompanyTypesValue.PRIVATE_COMPANY,
23914
24122
  isTopLevelEntity,
23915
- isBusinessSelection,
23916
24123
  setVerifiedBusiness,
23917
- searchName
24124
+ searchName,
24125
+ className
23918
24126
  }) {
23919
24127
  var _a, _b, _c, _d, _e;
23920
24128
  const {
@@ -23929,6 +24137,14 @@ function BasicInformationComponent({
23929
24137
  } = useSettingsContext();
23930
24138
  const allowedCountries = useAllowedCountries();
23931
24139
  const isAllowedEditPrefilledCountry = isSettingEnabled(SettingNames.AllowPrefilledCountryEdit);
24140
+ const formDescription = jsxs("div", {
24141
+ className: "adyen-kyc-form-header__description",
24142
+ children: [description, " ", jsx(Link, {
24143
+ href: "https://www.adyen.com/privacy-policy",
24144
+ external: true,
24145
+ children: i18n.get("basicInformationFormDescriptionLink")
24146
+ })]
24147
+ });
23932
24148
  const initialFormUtilsProps = useMemo(() => ({
23933
24149
  labels: labels2,
23934
24150
  placeholders,
@@ -23966,16 +24182,16 @@ function BasicInformationComponent({
23966
24182
  return mergeFieldMetadataIntoProps(field, resolveFieldMetadata(defaultFieldConfig[country], {
23967
24183
  isBusiness: true
23968
24184
  }, defaultFieldMetadata), acc);
24185
+ case "taxInformation":
24186
+ return mergeFieldMetadataIntoProps(field, resolveFieldMetadata(defaultFieldConfig$6[country], {
24187
+ taxIdNumberType
24188
+ }, defaultFieldMetadata$6), acc);
23969
24189
  case "registrationNumber":
23970
24190
  return mergeFieldMetadataIntoProps(field, resolveFieldMetadata(defaultFieldConfig$9[country], {
23971
24191
  companyType,
23972
24192
  registrationNumberType,
23973
24193
  state: sliceData == null ? void 0 : sliceData.stateOrProvince
23974
24194
  }, defaultFieldMetadata$9), acc);
23975
- case "taxInformation":
23976
- return mergeFieldMetadataIntoProps(field, resolveFieldMetadata(defaultFieldConfig$6[country], {
23977
- taxIdNumberType
23978
- }, defaultFieldMetadata$6), acc);
23979
24195
  default:
23980
24196
  return acc;
23981
24197
  }
@@ -24013,106 +24229,105 @@ function BasicInformationComponent({
24013
24229
  setVerifiedBusiness(void 0);
24014
24230
  }
24015
24231
  }, [formData.businessName, searchName, setVerifiedBusiness]);
24232
+ const classNames = cx("adyen-kyc-basic-information", className);
24016
24233
  return jsxs("form", {
24017
- className: isBusinessSelection ? "adyen-kyc-hide-form" : void 0,
24234
+ id: BASIC_INFORMATION_FORM_ID,
24235
+ className: classNames,
24018
24236
  children: [jsx(FormHeader, {
24019
24237
  heading,
24020
- description
24238
+ descriptionComponent: formDescription
24021
24239
  }), jsx(ErrorPanel, {
24022
24240
  id: "ariaErrorField",
24023
24241
  verificationErrors: formVerificationErrors,
24024
24242
  validationErrors: fieldValidationErrors,
24025
24243
  formUtils
24026
- }), jsxs("div", {
24027
- className: "adyen-kyc-basic-information",
24028
- children: [jsx("fieldset", {
24029
- children: jsx("div", {
24030
- className: "adyen-kyc-field-wrapper",
24031
- children: jsx(CountryField, {
24032
- data: formUtils.getFieldData(formData, COUNTRY_FIELD),
24033
- valid: formUtils.getFieldValid(formValid, COUNTRY_FIELD),
24034
- errors: formUtils.getFieldErrors(formErrors, formFieldProblems, COUNTRY_FIELD),
24035
- labels: formUtils.getFieldLabels(COUNTRY_FIELD, {
24036
- country: "countryRegionOfEstablishment"
24037
- }),
24038
- readonly: formUtils.isReadOnly("country") || !isAllowedEditPrefilledCountry,
24039
- handleChangeFor,
24040
- allowedCountries: isTopLevelEntity ? allowedCountries : void 0
24041
- })
24244
+ }), jsx("fieldset", {
24245
+ children: jsx("div", {
24246
+ className: "adyen-kyc-field-wrapper",
24247
+ children: jsx(CountryField, {
24248
+ data: formUtils.getFieldData(formData, COUNTRY_FIELD),
24249
+ valid: formUtils.getFieldValid(formValid, COUNTRY_FIELD),
24250
+ errors: formUtils.getFieldErrors(formErrors, formFieldProblems, COUNTRY_FIELD),
24251
+ labels: formUtils.getFieldLabels(COUNTRY_FIELD, {
24252
+ country: "countryRegionOfEstablishment"
24253
+ }),
24254
+ readonly: formUtils.isReadOnly("country") || !isAllowedEditPrefilledCountry,
24255
+ handleChangeFor,
24256
+ allowedCountries: isTopLevelEntity ? allowedCountries : void 0
24257
+ })
24258
+ })
24259
+ }), COUNTRIES_USING_COMPANY_SEARCH.includes(formData.country ?? country) && jsxs("fieldset", {
24260
+ children: [formUtils.isRequiredField("businessName") && jsx("div", {
24261
+ className: "adyen-kyc-field-wrapper",
24262
+ children: jsx(BusinessNameField, {
24263
+ data: formUtils.getFieldData(formData, BUSINESS_NAME_FIELD),
24264
+ valid: formUtils.getFieldValid(formValid, BUSINESS_NAME_FIELD),
24265
+ errors: formUtils.getFieldErrors(formErrors, formFieldProblems, BUSINESS_NAME_FIELD),
24266
+ labels: formUtils.getFieldLabels(BUSINESS_NAME_FIELD),
24267
+ readonly: formUtils.isReadOnly("businessName"),
24268
+ handleChangeFor
24269
+ })
24270
+ }), formUtils.isRequiredField("taxInformation") && jsx("div", {
24271
+ className: "adyen-kyc-field-wrapper",
24272
+ children: jsx(TaxInformationField, {
24273
+ data: formUtils.getFieldData(formData, TAX_INFORMATION_FIELD),
24274
+ valid: formUtils.getFieldValid(formValid, TAX_INFORMATION_FIELD),
24275
+ errors: formUtils.getFieldErrors(formErrors, formFieldProblems, TAX_INFORMATION_FIELD),
24276
+ labels: formUtils.getFieldLabels(TAX_INFORMATION_FIELD, {
24277
+ exemptedFromTax: "iDontHaveATaxId"
24278
+ }),
24279
+ mask: formUtils.getMask("taxInformation"),
24280
+ helperText: formUtils.getFieldHelperText(TAX_INFORMATION_FIELD),
24281
+ placeholders: formUtils.getFieldPlaceholders(TAX_INFORMATION_FIELD),
24282
+ guidanceText: formUtils.getFieldGuidanceText(TAX_INFORMATION_FIELD),
24283
+ readonly: formUtils.isReadOnly("taxInformation"),
24284
+ shouldValidate,
24285
+ handleChangeFor,
24286
+ canExempt: formUtils.isRequiredField("exemptedFromTax"),
24287
+ registrationNumber: formData.registrationNumber,
24288
+ isUen: formUtils.isRequiredField("isUen"),
24289
+ country: formData.country ?? country,
24290
+ companyType,
24291
+ taxIdNumberType,
24292
+ setTaxIdNumberType,
24293
+ defaultData: data == null ? void 0 : data.taxInformation
24294
+ })
24295
+ }), formUtils.isRequiredField("stateOrProvince") && jsx("div", {
24296
+ className: "adyen-kyc-field-wrapper",
24297
+ children: jsx(StateField, {
24298
+ data: formUtils.getFieldData(formData, STATE_FIELD),
24299
+ valid: formUtils.getFieldValid(formValid, STATE_FIELD),
24300
+ errors: formUtils.getFieldErrors(formErrors, formFieldProblems, STATE_FIELD),
24301
+ labels: formUtils.getFieldLabels(STATE_FIELD),
24302
+ placeholders: formUtils.getFieldPlaceholders(STATE_FIELD),
24303
+ readonly: formUtils.isReadOnly("stateOrProvince"),
24304
+ handleChangeFor,
24305
+ selectedCountry: formData.country
24306
+ })
24307
+ }), (formUtils.isRequiredField("registrationNumber") || formUtils.isOptionalField("registrationNumber")) && jsx("div", {
24308
+ className: "adyen-kyc-field-wrapper",
24309
+ children: jsx(BusinessRegistrationNumberField, {
24310
+ data: formUtils.getFieldData(formData, BUSINESS_REGISTRATION_NUMBER_FIELD),
24311
+ valid: formUtils.getFieldValid(formValid, BUSINESS_REGISTRATION_NUMBER_FIELD),
24312
+ errors: formUtils.getFieldErrors(formErrors, formFieldProblems, BUSINESS_REGISTRATION_NUMBER_FIELD),
24313
+ labels: formUtils.getFieldLabels(BUSINESS_REGISTRATION_NUMBER_FIELD, {
24314
+ exemptedFromRegistrationNumber: "iDontHaveARegistrationNumber"
24315
+ }),
24316
+ mask: formUtils.getMask("registrationNumber"),
24317
+ guidanceText: formUtils.getFieldGuidanceText(BUSINESS_REGISTRATION_NUMBER_FIELD),
24318
+ placeholders: formUtils.getFieldPlaceholders(BUSINESS_REGISTRATION_NUMBER_FIELD),
24319
+ helperText: formUtils.getFieldHelperText(BUSINESS_REGISTRATION_NUMBER_FIELD),
24320
+ readonly: formUtils.isReadOnly("registrationNumber"),
24321
+ optional: formUtils.isOptionalField("registrationNumber"),
24322
+ shouldValidate,
24323
+ handleChangeFor,
24324
+ country: formData.country ?? country,
24325
+ canExempt: formUtils.isRequiredField("exemptedFromRegistrationNumber"),
24326
+ companyType,
24327
+ registrationNumberOptions,
24328
+ registrationNumberType,
24329
+ setRegistrationNumberType
24042
24330
  })
24043
- }), COUNTRIES_USING_COMPANY_SEARCH.includes(formData.country ?? country) && jsxs("fieldset", {
24044
- children: [formUtils.isRequiredField("businessName") && jsx("div", {
24045
- className: "adyen-kyc-field-wrapper",
24046
- children: jsx(BusinessNameField, {
24047
- data: formUtils.getFieldData(formData, BUSINESS_NAME_FIELD),
24048
- valid: formUtils.getFieldValid(formValid, BUSINESS_NAME_FIELD),
24049
- errors: formUtils.getFieldErrors(formErrors, formFieldProblems, BUSINESS_NAME_FIELD),
24050
- labels: formUtils.getFieldLabels(BUSINESS_NAME_FIELD),
24051
- readonly: formUtils.isReadOnly("businessName"),
24052
- handleChangeFor
24053
- })
24054
- }), formUtils.isRequiredField("taxInformation") && jsx("div", {
24055
- className: "adyen-kyc-field-wrapper",
24056
- children: jsx(TaxInformationField, {
24057
- data: formUtils.getFieldData(formData, TAX_INFORMATION_FIELD),
24058
- valid: formUtils.getFieldValid(formValid, TAX_INFORMATION_FIELD),
24059
- errors: formUtils.getFieldErrors(formErrors, formFieldProblems, TAX_INFORMATION_FIELD),
24060
- labels: formUtils.getFieldLabels(TAX_INFORMATION_FIELD, {
24061
- exemptedFromTax: "iDontHaveATaxId"
24062
- }),
24063
- mask: formUtils.getMask("taxInformation"),
24064
- helperText: formUtils.getFieldHelperText(TAX_INFORMATION_FIELD),
24065
- placeholders: formUtils.getFieldPlaceholders(TAX_INFORMATION_FIELD),
24066
- guidanceText: formUtils.getFieldGuidanceText(TAX_INFORMATION_FIELD),
24067
- readonly: formUtils.isReadOnly("taxInformation"),
24068
- shouldValidate,
24069
- handleChangeFor,
24070
- canExempt: formUtils.isRequiredField("exemptedFromTax"),
24071
- registrationNumber: formData.registrationNumber,
24072
- isUen: formUtils.isRequiredField("isUen"),
24073
- country: formData.country ?? country,
24074
- companyType,
24075
- taxIdNumberType,
24076
- setTaxIdNumberType,
24077
- defaultData: data == null ? void 0 : data.taxInformation
24078
- })
24079
- }), formUtils.isRequiredField("stateOrProvince") && jsx("div", {
24080
- className: "adyen-kyc-field-wrapper",
24081
- children: jsx(StateField, {
24082
- data: formUtils.getFieldData(formData, STATE_FIELD),
24083
- valid: formUtils.getFieldValid(formValid, STATE_FIELD),
24084
- errors: formUtils.getFieldErrors(formErrors, formFieldProblems, STATE_FIELD),
24085
- labels: formUtils.getFieldLabels(STATE_FIELD),
24086
- placeholders: formUtils.getFieldPlaceholders(STATE_FIELD),
24087
- readonly: formUtils.isReadOnly("stateOrProvince"),
24088
- handleChangeFor,
24089
- selectedCountry: formData.country
24090
- })
24091
- }), (formUtils.isRequiredField("registrationNumber") || formUtils.isOptionalField("registrationNumber")) && jsx("div", {
24092
- className: "adyen-kyc-field-wrapper",
24093
- children: jsx(BusinessRegistrationNumberField, {
24094
- data: formUtils.getFieldData(formData, BUSINESS_REGISTRATION_NUMBER_FIELD),
24095
- valid: formUtils.getFieldValid(formValid, BUSINESS_REGISTRATION_NUMBER_FIELD),
24096
- errors: formUtils.getFieldErrors(formErrors, formFieldProblems, BUSINESS_REGISTRATION_NUMBER_FIELD),
24097
- labels: formUtils.getFieldLabels(BUSINESS_REGISTRATION_NUMBER_FIELD, {
24098
- exemptedFromRegistrationNumber: "iDontHaveARegistrationNumber"
24099
- }),
24100
- mask: formUtils.getMask("registrationNumber"),
24101
- guidanceText: formUtils.getFieldGuidanceText(BUSINESS_REGISTRATION_NUMBER_FIELD),
24102
- placeholders: formUtils.getFieldPlaceholders(BUSINESS_REGISTRATION_NUMBER_FIELD),
24103
- helperText: formUtils.getFieldHelperText(BUSINESS_REGISTRATION_NUMBER_FIELD),
24104
- readonly: formUtils.isReadOnly("registrationNumber"),
24105
- optional: formUtils.isOptionalField("registrationNumber"),
24106
- shouldValidate,
24107
- handleChangeFor,
24108
- country: formData.country ?? country,
24109
- canExempt: formUtils.isRequiredField("exemptedFromRegistrationNumber"),
24110
- companyType,
24111
- registrationNumberOptions,
24112
- registrationNumberType,
24113
- setRegistrationNumberType
24114
- })
24115
- })]
24116
24331
  })]
24117
24332
  })]
24118
24333
  });
@@ -24437,7 +24652,8 @@ const getForms = (country) => ({
24437
24652
  formId: "basicInformation",
24438
24653
  formName: "basicInformationFormName",
24439
24654
  formHeading: "basicInformationFormHeading",
24440
- fields: COUNTRIES_USING_COMPANY_SEARCH.includes(country) ? basicInformationFields : basicInformationFields.filter((field) => !FIELDS_NEEDED_FOR_COMPANY_SEARCH.includes(field))
24655
+ formDescription: "basicInformationFormDescription",
24656
+ fields: COUNTRIES_USING_COMPANY_SEARCH.includes(country) ? BASIC_INFORMATION_FIELDS : BASIC_INFORMATION_FIELDS.filter((field) => !FIELDS_NEEDED_FOR_COMPANY_SEARCH.includes(field))
24441
24657
  },
24442
24658
  companyStructure: {
24443
24659
  formId: "companyStructure",
@@ -24450,8 +24666,7 @@ const getForms = (country) => ({
24450
24666
  formId: "additionalInformation",
24451
24667
  formName: "additionalInformationFormName",
24452
24668
  formHeading: "additionalInformationFormHeading",
24453
- formDescription: "additionalInformationFormDescription",
24454
- fields: COUNTRIES_USING_COMPANY_SEARCH.includes(country) ? additionalInformationFields.filter((field) => !FIELDS_NEEDED_FOR_COMPANY_SEARCH.includes(field)) : additionalInformationFields
24669
+ fields: COUNTRIES_USING_COMPANY_SEARCH.includes(country) ? ADDITIONAL_INFORMATION_FIELDS.filter((field) => !FIELDS_NEEDED_FOR_COMPANY_SEARCH.includes(field)) : ADDITIONAL_INFORMATION_FIELDS
24455
24670
  },
24456
24671
  companyRegistrationAddress: {
24457
24672
  formId: "companyRegistrationAddress",
@@ -24600,7 +24815,7 @@ var CompanySearchEvents = /* @__PURE__ */ ((CompanySearchEvents2) => {
24600
24815
  CompanySearchEvents2["SELECTION_ERROR"] = "CompanySearch_CompanySelectionError";
24601
24816
  return CompanySearchEvents2;
24602
24817
  })(CompanySearchEvents || {});
24603
- const logger$n = createLogger("useCompanySearch");
24818
+ const logger$o = createLogger("useCompanySearch");
24604
24819
  const LOW_RISK_COMPANY_DATA_COMPLIANCE_WINDOW = 1577664e5;
24605
24820
  function useCompanySearch({
24606
24821
  defaultData,
@@ -24724,7 +24939,7 @@ function useCompanySearch({
24724
24939
  state: companyData.state ?? stateOrProvince
24725
24940
  });
24726
24941
  } catch (e) {
24727
- logger$n.error(e);
24942
+ logger$o.error(e);
24728
24943
  setError(e);
24729
24944
  setStatus("error");
24730
24945
  } finally {
@@ -24757,7 +24972,7 @@ function useCompanySearch({
24757
24972
  indexSearch: handleCompanyIndexSearch,
24758
24973
  deepSearch: handleCompanyDeepSearch,
24759
24974
  resultsLimit: limit
24760
- })) == null ? void 0 : _a.catch((e) => logger$n.error(e));
24975
+ })) == null ? void 0 : _a.catch((e) => logger$o.error(e));
24761
24976
  }
24762
24977
  }, [legalCompanyName, country, stateOrProvince, taxIdentificationNumber, verifiedCompany, searchCompanies, handleCompanyIndexSearch, handleCompanyDeepSearch, limit, canVerify, baseTrackingPayload]);
24763
24978
  useEffect(() => {
@@ -24864,38 +25079,47 @@ function BusinessInformation({
24864
25079
  const {
24865
25080
  i18n
24866
25081
  } = useI18nContext();
24867
- const businessInformationClass = cx("adyen-kyc-business-information", {
24868
- "adyen-kyc-business-information--loading": fetching
25082
+ const businessInformationClasses = cx("adyen-kyc-business-information", {
25083
+ "adyen-kyc-business-information--fetching": fetching
24869
25084
  });
25085
+ if (fetching) {
25086
+ return jsx("div", {
25087
+ className: businessInformationClasses,
25088
+ children: jsx(Loader, {
25089
+ size: "large"
25090
+ })
25091
+ });
25092
+ }
24870
25093
  return jsx("div", {
24871
- className: businessInformationClass,
24872
- children: fetching ? jsx(Loader, {
24873
- size: "large"
24874
- }) : jsxs("ul", {
25094
+ className: businessInformationClasses,
25095
+ children: jsxs("ul", {
24875
25096
  className: "adyen-kyc-business-information__business-data",
24876
- children: [(selectedBusiness == null ? void 0 : selectedBusiness.legalForm) && jsxs("li", {
25097
+ children: [!!(selectedBusiness == null ? void 0 : selectedBusiness.legalForm) && jsxs("li", {
25098
+ name: "legalForm",
24877
25099
  children: [jsx(Typography, {
24878
25100
  className: "adyen-kyc-business-data__key",
24879
25101
  color: "secondary",
24880
25102
  children: i18n.get("legalForm")
24881
25103
  }), jsx(Typography, {
24882
- children: selectedBusiness == null ? void 0 : selectedBusiness.legalForm
25104
+ children: selectedBusiness.legalForm
24883
25105
  })]
24884
- }), jsxs("li", {
25106
+ }), !!(selectedBusiness == null ? void 0 : selectedBusiness.name) && jsxs("li", {
25107
+ name: "name",
24885
25108
  children: [jsx(Typography, {
24886
25109
  className: "adyen-kyc-business-data__key",
24887
25110
  color: "secondary",
24888
25111
  children: i18n.get("legalCompanyName__US")
24889
25112
  }), jsx(Typography, {
24890
- children: selectedBusiness == null ? void 0 : selectedBusiness.name
25113
+ children: selectedBusiness.name
24891
25114
  })]
24892
- }), (selectedBusiness == null ? void 0 : selectedBusiness.address) && jsxs("li", {
25115
+ }), !!(selectedBusiness == null ? void 0 : selectedBusiness.address) && jsxs("li", {
25116
+ name: "address",
24893
25117
  children: [jsx(Typography, {
24894
25118
  className: "adyen-kyc-business-data__key",
24895
25119
  color: "secondary",
24896
25120
  children: i18n.get("address")
24897
25121
  }), jsx(Typography, {
24898
- children: selectedBusiness == null ? void 0 : selectedBusiness.address
25122
+ children: selectedBusiness.address
24899
25123
  })]
24900
25124
  })]
24901
25125
  })
@@ -24933,7 +25157,7 @@ function BusinessInformationCard({
24933
25157
  children: selectedBusinessId === result.id && jsxs(Fragment, {
24934
25158
  children: [jsx(Divider, {}), invalidTin && jsx(Alert, {
24935
25159
  variant: "warning",
24936
- type: "dismissible",
25160
+ type: "callToAction",
24937
25161
  title: i18n.get("businessSelection__invalidTin"),
24938
25162
  actions: jsx(Button, {
24939
25163
  label: "Go back",
@@ -24944,7 +25168,7 @@ function BusinessInformationCard({
24944
25168
  testId: "invalidTin"
24945
25169
  }), failedToLoad && jsx(Alert, {
24946
25170
  variant: "info",
24947
- type: "dismissible",
25171
+ type: "callToAction",
24948
25172
  title: i18n.get("businessSelection__failedToLoad"),
24949
25173
  actions: jsx(Button, {
24950
25174
  label: "Try again",
@@ -24960,7 +25184,7 @@ function BusinessInformationCard({
24960
25184
  })
24961
25185
  });
24962
25186
  }
24963
- const logger$m = createLogger("BusinessSelection");
25187
+ const logger$n = createLogger("BusinessSelection");
24964
25188
  function BusinessSelectionComponent({
24965
25189
  country,
24966
25190
  state,
@@ -25027,7 +25251,7 @@ function BusinessSelectionComponent({
25027
25251
  setCurrentBusinessSelection(businessData);
25028
25252
  } catch (e) {
25029
25253
  setFailedToLoad(true);
25030
- logger$m.error(e);
25254
+ logger$n.error(e);
25031
25255
  } finally {
25032
25256
  setFetching(false);
25033
25257
  }
@@ -25049,7 +25273,7 @@ function BusinessSelectionComponent({
25049
25273
  setInvalidTin(true);
25050
25274
  }
25051
25275
  } catch (e) {
25052
- logger$m.error(e);
25276
+ logger$n.error(e);
25053
25277
  } finally {
25054
25278
  setIsLoading(false);
25055
25279
  }
@@ -25082,7 +25306,7 @@ function BusinessSelectionComponent({
25082
25306
  }
25083
25307
  }
25084
25308
  } catch (e) {
25085
- logger$m.error(e);
25309
+ logger$n.error(e);
25086
25310
  } finally {
25087
25311
  setIsLoading(false);
25088
25312
  }
@@ -25092,23 +25316,26 @@ function BusinessSelectionComponent({
25092
25316
  setIsLoading(true);
25093
25317
  await (handleClearCompanyData == null ? void 0 : handleClearCompanyData());
25094
25318
  } catch (e) {
25095
- logger$m.error(e);
25319
+ logger$n.error(e);
25096
25320
  } finally {
25097
25321
  setShowCompanyStructure(true);
25098
25322
  setIsLoading(false);
25099
25323
  }
25100
25324
  }, [handleClearCompanyData, setIsLoading, setShowCompanyStructure]);
25101
- return jsxs("div", {
25102
- className: "adyen-kyc-business-selection",
25103
- children: [isLoading && jsxs("div", {
25104
- className: "adyen-kyc-business-selection__loader",
25105
- children: [jsx(Loader, {
25325
+ const businessSelectionClasses = cx("adyen-kyc-business-selection", {
25326
+ "adyen-kyc-business-selection--loading": isLoading
25327
+ });
25328
+ if (isLoading) {
25329
+ return jsx("div", {
25330
+ className: businessSelectionClasses,
25331
+ children: jsx(Loader, {
25106
25332
  size: "large"
25107
- }), jsx(Typography, {
25108
- el: "span",
25109
- children: !currentBusinessSelection && (!searchResults || shouldSearch) ? i18n.get("businessSelection__searching") : i18n.get("businessSelection__verifying")
25110
- })]
25111
- }), !isLoading && searchResults && jsxs(Fragment, {
25333
+ })
25334
+ });
25335
+ }
25336
+ return jsx("div", {
25337
+ className: businessSelectionClasses,
25338
+ children: searchResults && jsxs(Fragment, {
25112
25339
  children: [jsx(FormHeader, {
25113
25340
  heading: i18n.get("businessSelection__heading")
25114
25341
  }), jsxs(CardGroup, {
@@ -25135,7 +25362,7 @@ function BusinessSelectionComponent({
25135
25362
  })]
25136
25363
  })]
25137
25364
  })]
25138
- })]
25365
+ })
25139
25366
  });
25140
25367
  }
25141
25368
  function BusinessDetailsComponent(props) {
@@ -25230,6 +25457,7 @@ function BusinessDetailsComponent(props) {
25230
25457
  handleClearCompanyData
25231
25458
  }), jsx(BasicInformationComponent, {
25232
25459
  ...getFormProps(props, forms2.basicInformation.formId),
25460
+ className: isBusinessSelection ? "adyen-kyc-basic-information--hide" : "",
25233
25461
  id: forms2.basicInformation.formId,
25234
25462
  heading: i18n.get((activeForm == null ? void 0 : activeForm.formHeading) ?? forms2.basicInformation.formHeading),
25235
25463
  description: (activeForm == null ? void 0 : activeForm.formDescription) ? i18n.get(activeForm == null ? void 0 : activeForm.formDescription) : void 0,
@@ -25237,7 +25465,6 @@ function BusinessDetailsComponent(props) {
25237
25465
  companyType: companyStructure == null ? void 0 : companyStructure.entityType,
25238
25466
  isTopLevelEntity,
25239
25467
  baseTrackingPayload,
25240
- isBusinessSelection,
25241
25468
  setVerifiedBusiness,
25242
25469
  searchName
25243
25470
  })]
@@ -25258,7 +25485,6 @@ function BusinessDetailsComponent(props) {
25258
25485
  ...getFormProps(props, forms2.additionalInformation.formId),
25259
25486
  id: forms2.additionalInformation.formId,
25260
25487
  heading: i18n.get((activeForm == null ? void 0 : activeForm.formHeading) ?? forms2.additionalInformation.formHeading),
25261
- description: i18n.get((activeForm == null ? void 0 : activeForm.formDescription) ?? forms2.additionalInformation.formDescription),
25262
25488
  country,
25263
25489
  companyType: companyStructure == null ? void 0 : companyStructure.entityType,
25264
25490
  verifiedBusiness,
@@ -25503,7 +25729,7 @@ const ExpiredBanner = () => {
25503
25729
  children: i18n.get("startANewSessionFromTheSamePlaceYouOriginallyAccessed")
25504
25730
  });
25505
25731
  };
25506
- const Modal = ({
25732
+ const Modal$1 = ({
25507
25733
  content,
25508
25734
  footer,
25509
25735
  header,
@@ -25635,7 +25861,7 @@ const ExpiryModal = ({
25635
25861
  leftoverSeconds
25636
25862
  } = getDurationInMinutesAndSeconds(secondsUntilExpiry);
25637
25863
  const hasExpired = secondsUntilExpiry <= 0;
25638
- return jsx(Modal, {
25864
+ return jsx(Modal$1, {
25639
25865
  size: "small",
25640
25866
  header: i18n.get("sessionTimeout"),
25641
25867
  content: hasExpired ? i18n.get("toProtectYourInformationThisSessionHasExpired") : i18n.get({
@@ -25708,7 +25934,7 @@ const useExpiryThreshold = (expiry) => {
25708
25934
  };
25709
25935
  };
25710
25936
  const ExpiryContext = createContext(false);
25711
- const logger$l = createLogger("ExpiryProvider");
25937
+ const logger$m = createLogger("ExpiryProvider");
25712
25938
  const ExpiryProvider = ({
25713
25939
  expiry: initialExpiry,
25714
25940
  eventEmitter,
@@ -25742,7 +25968,7 @@ const ExpiryProvider = ({
25742
25968
  refreshExpiry().then((newExpiry) => {
25743
25969
  setExpiry(newExpiry);
25744
25970
  setModalDismissed(false);
25745
- }).catch(logger$l.error);
25971
+ }).catch(logger$m.error);
25746
25972
  }
25747
25973
  }), children]
25748
25974
  });
@@ -25762,7 +25988,7 @@ const ExpiryProvider = ({
25762
25988
  });
25763
25989
  };
25764
25990
  const useHasExpired = () => useContext(ExpiryContext);
25765
- const logger$k = createLogger("FormRouterContextProvider");
25991
+ const logger$l = createLogger("FormRouterContextProvider");
25766
25992
  function FormRouterContextProvider({
25767
25993
  children,
25768
25994
  forms: forms2,
@@ -25782,7 +26008,7 @@ function FormRouterContextProvider({
25782
26008
  if (formIndex > -1) {
25783
26009
  setFormIndex(formIndex);
25784
26010
  } else {
25785
- logger$k.error("No form was found to have that field so form navigation failed.");
26011
+ logger$l.error("No form was found to have that field so form navigation failed.");
25786
26012
  }
25787
26013
  }
25788
26014
  }), [forms2, handleGetIdVerificationToken, setFormIndex]);
@@ -25791,25 +26017,151 @@ function FormRouterContextProvider({
25791
26017
  children
25792
26018
  });
25793
26019
  }
25794
- const DropinLayout = (props) => {
25795
- const {
25796
- content,
25797
- footer
25798
- } = props;
25799
- return jsxs("div", {
25800
- className: "adyen-kyc-dropin",
25801
- children: [jsx("div", {
25802
- className: "adyen-kyc-dropin__content",
26020
+ const shouldHighlight = (active, current, fillBefore) => !fillBefore ? active === current : active >= current;
26021
+ const StepProgressIndicator = ({
26022
+ activeStepIndex,
26023
+ stepsCount,
26024
+ fillBefore,
26025
+ thick
26026
+ }) => stepsCount > 0 ? jsx("div", {
26027
+ "aria-label": `Step ${activeStepIndex + 1} of ${stepsCount}`,
26028
+ className: "adyen-kyc-progress",
26029
+ role: "group",
26030
+ children: jsx("ol", {
26031
+ className: cx("adyen-kyc-progress__bar", {
26032
+ "adyen-kyc-progress__bar--thick": thick
26033
+ }),
26034
+ children: range(stepsCount).map((stepNumber) => {
26035
+ const isHighlighted = shouldHighlight(activeStepIndex, stepNumber, fillBefore);
26036
+ return jsx("li", {
26037
+ "aria-current": isHighlighted ? "step" : void 0,
26038
+ className: cx("adyen-kyc-progress__step", {
26039
+ "adyen-kyc-progress__step--active": isHighlighted
26040
+ }),
26041
+ children: jsx("span", {
26042
+ className: "adyen-kyc-progress__step-label",
26043
+ children: `Step ${stepNumber + 1}: ${stepNumber < activeStepIndex ? "completed" : "not completed"}`
26044
+ })
26045
+ }, stepNumber);
26046
+ })
26047
+ })
26048
+ }) : null;
26049
+ const Modal = ({
26050
+ title,
26051
+ children,
26052
+ footer,
26053
+ fullscreen = false,
26054
+ onBack,
26055
+ onClose
26056
+ }) => {
26057
+ const modalRef = useRef(null);
26058
+ useLayoutEffect(() => {
26059
+ const modalElement = modalRef.current;
26060
+ if (!modalElement) return;
26061
+ modalElement.showModal();
26062
+ modalElement.focus();
26063
+ modalElement.blur();
26064
+ return () => modalElement.close();
26065
+ }, []);
26066
+ return jsx("dialog", {
26067
+ ref: modalRef,
26068
+ className: cx("adyen-kyc-modal2", {
26069
+ "adyen-kyc-modal2__fullscreen": fullscreen
26070
+ }),
26071
+ onClose,
26072
+ children: jsxs("div", {
26073
+ className: "adyen-kyc-modal2-wrapper",
26074
+ children: [title && jsx("header", {
26075
+ children: jsx(Typography, {
26076
+ el: "h2",
26077
+ variant: "title-l",
26078
+ children: title
26079
+ })
26080
+ }), jsx("section", {
26081
+ className: "adyen-kyc-modal2-content",
26082
+ children
26083
+ }), jsx("div", {
26084
+ children: footer && jsx("footer", {
26085
+ className: "adyen-kyc-modal2-footer",
26086
+ children: footer
26087
+ })
26088
+ }), jsxs("section", {
26089
+ className: "adyen-kyc-modal2-top-bar",
26090
+ children: [onBack ? jsx(Button, {
26091
+ tertiary: true,
26092
+ "aria-label": "back",
26093
+ icon: "arrow-left",
26094
+ onClick: onBack,
26095
+ shaded: true
26096
+ }) : jsx("div", {}), jsx(Button, {
26097
+ tertiary: true,
26098
+ "aria-label": "close",
26099
+ icon: "cross",
26100
+ onClick: onClose,
26101
+ shaded: true
26102
+ })]
26103
+ })]
26104
+ })
26105
+ });
26106
+ };
26107
+ const DropinLayout = ({
26108
+ content,
26109
+ footer,
26110
+ showAsModal,
26111
+ onBack,
26112
+ onClose
26113
+ }) => {
26114
+ const [modalOpen, setModalOpen] = useState(true);
26115
+ const handleClose = () => {
26116
+ setModalOpen(false);
26117
+ onClose == null ? void 0 : onClose();
26118
+ };
26119
+ if (!showAsModal) {
26120
+ return jsxs("div", {
26121
+ className: "adyen-kyc-dropin",
26122
+ children: [jsx("div", {
26123
+ className: "adyen-kyc-dropin__content",
26124
+ children: jsx("div", {
26125
+ className: "adyen-kyc-dropin__content-main",
26126
+ children: content
26127
+ })
26128
+ }), footer && jsx("div", {
26129
+ className: "adyen-kyc-dropin__footer-container",
26130
+ children: footer
26131
+ })]
26132
+ });
26133
+ }
26134
+ if (modalOpen) {
26135
+ return jsx(Modal, {
26136
+ footer,
26137
+ onClose: handleClose,
26138
+ onBack,
25803
26139
  children: jsx("div", {
25804
- className: "adyen-kyc-dropin__content-main",
25805
- children: content
26140
+ className: "adyen-kyc-dropin",
26141
+ children: jsx("div", {
26142
+ className: "adyen-kyc-dropin__content",
26143
+ children: jsx("div", {
26144
+ className: "adyen-kyc-dropin__content-main",
26145
+ children: content
26146
+ })
26147
+ })
25806
26148
  })
25807
- }), footer && jsx("div", {
25808
- className: "adyen-kyc-dropin__footer-container",
25809
- children: footer
25810
- })]
25811
- });
26149
+ });
26150
+ }
26151
+ return null;
25812
26152
  };
26153
+ const EmbeddedActionBar = ({
26154
+ left,
26155
+ right
26156
+ }) => jsxs("footer", {
26157
+ className: "adyen-kyc-embedded-action-bar",
26158
+ children: [jsx("section", {
26159
+ children: left
26160
+ }), jsx("section", {
26161
+ className: "adyen-kyc-embedded-action-bar-right",
26162
+ children: right
26163
+ })]
26164
+ });
25813
26165
  const FormNavigationItem = ({
25814
26166
  form,
25815
26167
  isActive,
@@ -25906,6 +26258,7 @@ const FormWrapper = ({
25906
26258
  handleNextClick,
25907
26259
  handleBackClick,
25908
26260
  handleHomeClick,
26261
+ handleCloseClick,
25909
26262
  nextButtonLabel,
25910
26263
  backButtonLabel,
25911
26264
  homeButtonLabel,
@@ -25922,9 +26275,11 @@ const FormWrapper = ({
25922
26275
  hideBackButton,
25923
26276
  hideNextButton,
25924
26277
  hideNavigation,
26278
+ asModal,
25925
26279
  canSubmit: canSubmit2,
25926
26280
  onSubmit,
25927
- problems
26281
+ problems,
26282
+ currentStep
25928
26283
  }) => {
25929
26284
  var _a;
25930
26285
  const {
@@ -25969,6 +26324,8 @@ const FormWrapper = ({
25969
26324
  showTaxExemptedLegalCaption
25970
26325
  })
25971
26326
  });
26327
+ const handleFinishLater = () => {
26328
+ };
25972
26329
  const formFooter = !hideDropinLayout && !hideFooter && jsx(ActionBar, {
25973
26330
  onNext: handleNextClick,
25974
26331
  onBack: handleBackClick,
@@ -25980,6 +26337,25 @@ const FormWrapper = ({
25980
26337
  hideBackButton,
25981
26338
  hideNextButton
25982
26339
  });
26340
+ const embeddedFooter = jsx(EmbeddedActionBar, {
26341
+ left: jsx(StepProgressIndicator, {
26342
+ activeStepIndex: currentStep ?? 0,
26343
+ stepsCount: 3,
26344
+ fillBefore: true,
26345
+ thick: true
26346
+ }),
26347
+ right: jsxs(Fragment, {
26348
+ children: [!hideBackButton && jsx(Button, {
26349
+ label: "Finish Later",
26350
+ secondary: true,
26351
+ icon: "save",
26352
+ onClick: handleFinishLater
26353
+ }), jsx(Button, {
26354
+ label: nextButtonLabel,
26355
+ onClick: handleNextClick
26356
+ })]
26357
+ })
26358
+ });
25983
26359
  const multiStepForm = jsxs("div", {
25984
26360
  className: "adyen-kyc-form-container",
25985
26361
  children: [hasExpired && jsx(ExpiredBanner, {}), jsx(LoaderWrapper, {
@@ -25990,7 +26366,7 @@ const FormWrapper = ({
25990
26366
  setFormIndex: gotoFormByFormIndex,
25991
26367
  forms: forms2,
25992
26368
  handleGetIdVerificationToken,
25993
- children: [children, activeForm.formId === summaryStep.formId && summaryContent, formFooter]
26369
+ children: [children, activeForm.formId === summaryStep.formId && summaryContent]
25994
26370
  })
25995
26371
  })]
25996
26372
  });
@@ -26019,11 +26395,19 @@ const FormWrapper = ({
26019
26395
  verificationErrors: problems == null ? void 0 : problems.verificationErrors
26020
26396
  })
26021
26397
  });
26022
- return jsx(DropinLayout, {
26023
- content: jsxs(Fragment, {
26024
- children: [sidebar, multiStepForm]
26025
- })
26026
- });
26398
+ const footer = hideNavigation ? embeddedFooter : formFooter;
26399
+ return jsx(
26400
+ DropinLayout,
26401
+ {
26402
+ showAsModal: asModal,
26403
+ onBack: !hideBackButton ? handleBackClick : void 0,
26404
+ onClose: handleCloseClick,
26405
+ content: jsxs(Fragment, {
26406
+ children: [sidebar, multiStepForm]
26407
+ }),
26408
+ footer: footer || void 0
26409
+ }
26410
+ );
26027
26411
  };
26028
26412
  var BusinessDetailsEvents = /* @__PURE__ */ ((BusinessDetailsEvents2) => {
26029
26413
  BusinessDetailsEvents2["TASK_START"] = "BusinessDetails_TaskStarted";
@@ -26152,7 +26536,7 @@ const removeConditionalForms = (forms2, problems, isSkippingCompanyStructure, is
26152
26536
  }
26153
26537
  };
26154
26538
  const formatBasicInformation = (data, labels2, datasetUtils, companyType) => {
26155
- var _a, _b, _c, _d;
26539
+ var _a, _b, _c;
26156
26540
  const country = data == null ? void 0 : data.country;
26157
26541
  const registrationNumberLabel = resolveFieldMetadata(defaultFieldConfig$9[country], {
26158
26542
  companyType,
@@ -26164,9 +26548,9 @@ const formatBasicInformation = (data, labels2, datasetUtils, companyType) => {
26164
26548
  companyType: void 0
26165
26549
  }, defaultFieldMetadata$6).label;
26166
26550
  return {
26167
- [((_b = labels2 == null ? void 0 : labels2.basicInformation) == null ? void 0 : _b.country) ?? "country"]: datasetUtils.getCountryName(data.country),
26551
+ country: datasetUtils.getCountryName(data.country),
26168
26552
  [getKeyForField("stateOrProvince", data.country)]: datasetUtils.getStateName(data.stateOrProvince, data.country),
26169
- [taxIdLabel]: (_d = (_c = data.taxInformation) == null ? void 0 : _c.find((taxId) => data.country === taxId.country)) == null ? void 0 : _d.number,
26553
+ [taxIdLabel]: (_c = (_b = data.taxInformation) == null ? void 0 : _b.find((taxId) => data.country === taxId.country)) == null ? void 0 : _c.number,
26170
26554
  [registrationNumberLabel]: data.registrationNumber
26171
26555
  };
26172
26556
  };
@@ -26414,7 +26798,7 @@ function BusinessDetailsDropinComponent({
26414
26798
  handleClearCompanyData,
26415
26799
  onTypeSwitch
26416
26800
  }) {
26417
- var _a, _b, _c, _d, _e, _f, _g;
26801
+ var _a, _b, _c, _d, _e, _f, _g, _h;
26418
26802
  const {
26419
26803
  state: {
26420
26804
  currentState
@@ -26506,7 +26890,7 @@ function BusinessDetailsDropinComponent({
26506
26890
  const forms2 = useMemo(() => {
26507
26891
  const requiredForms = getRequiredForms(initialForms, derivedProps == null ? void 0 : derivedProps.requiredFields, derivedProps == null ? void 0 : derivedProps.optionalFields);
26508
26892
  const validityAddedForms = addValidityToForms(requiredForms, currentState.validityByForm, currentProblems);
26509
- return removeConditionalForms(validityAddedForms, currentProblems, currentCountry !== "US" && isSkippingCompanyStructure || !showCompanyStructure, isSkippingCompanyRegistrationDocument);
26893
+ return removeConditionalForms(validityAddedForms, currentProblems, currentCountry !== "US" ? isSkippingCompanyStructure : !showCompanyStructure, isSkippingCompanyRegistrationDocument);
26510
26894
  }, [initialForms, derivedProps == null ? void 0 : derivedProps.requiredFields, derivedProps == null ? void 0 : derivedProps.optionalFields, currentState.validityByForm, currentProblems, currentCountry, isSkippingCompanyStructure, showCompanyStructure, isSkippingCompanyRegistrationDocument]);
26511
26895
  const canSubmitForm = useMemo(() => canSubmit$3(currentState.data) && hasDataChanged(initialData, currentState.data), [initialData, currentState.data]);
26512
26896
  const summaryData = useMemo(() => ({
@@ -26582,17 +26966,21 @@ function BusinessDetailsDropinComponent({
26582
26966
  }
26583
26967
  }, [canSubmitForm, currentCountry, forms2, gotoFormByFormIndex, isBusinessSelection, searchResults, showCompanyStructure, verifiedBusiness]);
26584
26968
  const nextClick = useCallback(() => {
26969
+ var _a2;
26585
26970
  if (!COUNTRIES_USING_COMPANY_SEARCH.includes(currentCountry)) return handleNextClick();
26586
26971
  switch (activeForm.formId) {
26587
26972
  case "basicInformation":
26588
26973
  if (showCompanyStructure || verifiedBusiness) {
26589
26974
  return handleNextClick();
26590
26975
  }
26591
- return isBusinessSelection ? handleNextClick() : setIsBusinessSelection(true);
26976
+ if (!isBusinessSelection && ((_a2 = currentState.validityByForm) == null ? void 0 : _a2.basicInformation)) {
26977
+ return setIsBusinessSelection(true);
26978
+ }
26979
+ return handleNextClick();
26592
26980
  default:
26593
26981
  return handleNextClick();
26594
26982
  }
26595
- }, [activeForm.formId, currentCountry, handleNextClick, isBusinessSelection, showCompanyStructure, verifiedBusiness]);
26983
+ }, [activeForm.formId, currentCountry, handleNextClick, isBusinessSelection, showCompanyStructure, verifiedBusiness, (_h = currentState.validityByForm) == null ? void 0 : _h.basicInformation]);
26596
26984
  const backClick = useCallback(() => {
26597
26985
  if (!COUNTRIES_USING_COMPANY_SEARCH.includes(country)) return handleNextClick();
26598
26986
  switch (activeForm.formId) {
@@ -27337,7 +27725,7 @@ const CompanyLookupResultsList = ({
27337
27725
  }, option.id))
27338
27726
  });
27339
27727
  };
27340
- const Skeleton = ({
27728
+ const Skeleton$1 = ({
27341
27729
  quantity
27342
27730
  }) => {
27343
27731
  const renderBones = () => {
@@ -27461,7 +27849,7 @@ function CompanyLookup({
27461
27849
  verifiedCompany,
27462
27850
  reset: resetSelection,
27463
27851
  retrySearch
27464
- }), displaySkeleton && jsx(Skeleton, {
27852
+ }), displaySkeleton && jsx(Skeleton$1, {
27465
27853
  quantity: 3
27466
27854
  }), displaySearchResults && jsx(CompanyLookupResultsList, {
27467
27855
  results,
@@ -28102,7 +28490,7 @@ const formatDataForSummary = (data, forms2, labels2, i18n) => {
28102
28490
  }
28103
28491
  }, {});
28104
28492
  };
28105
- const logger$j = createLogger("useFormTaskSubmit");
28493
+ const logger$k = createLogger("useFormTaskSubmit");
28106
28494
  function useCompanySearchTaskSubmit({
28107
28495
  task,
28108
28496
  forms: forms2,
@@ -28145,7 +28533,7 @@ function useCompanySearchTaskSubmit({
28145
28533
  });
28146
28534
  }
28147
28535
  } catch (e) {
28148
- logger$j.error(e);
28536
+ logger$k.error(e);
28149
28537
  userEvents.addEvent(CompanySearchEvents.DOCUMENTS_ERROR, {
28150
28538
  segmentation: {
28151
28539
  ...baseTrackingPayload,
@@ -28197,7 +28585,7 @@ function useCompanySearchTaskSubmit({
28197
28585
  ...trackingPayload
28198
28586
  }
28199
28587
  });
28200
- logger$j.log(submittedLegalEntity);
28588
+ logger$k.log(submittedLegalEntity);
28201
28589
  clearToasts();
28202
28590
  onExternalSubmit == null ? void 0 : onExternalSubmit(data);
28203
28591
  } catch (e) {
@@ -28221,7 +28609,7 @@ function useCompanySearchTaskSubmit({
28221
28609
  type: "error"
28222
28610
  });
28223
28611
  }
28224
- logger$j.error(e);
28612
+ logger$k.error(e);
28225
28613
  userEvents.addEvent(CompanySearchEvents.TASK_ERROR, {
28226
28614
  segmentation: {
28227
28615
  ...baseTrackingPayload,
@@ -28582,7 +28970,7 @@ function CompanySearchDropinComponent({
28582
28970
  }
28583
28971
  const IgnoreLocalStorageContext = createContext(false);
28584
28972
  const useIgnoreLocalStorage = () => useContext(IgnoreLocalStorageContext);
28585
- const logger$i = createLogger("useLocalStorage");
28973
+ const logger$j = createLogger("useLocalStorage");
28586
28974
  const useLocalStorage = (key, defaultValue, options) => {
28587
28975
  const {
28588
28976
  serializer,
@@ -28603,7 +28991,7 @@ const useLocalStorage = (key, defaultValue, options) => {
28603
28991
  const res = rawValueRef.current ? parser(rawValueRef.current) : defaultValue;
28604
28992
  return res;
28605
28993
  } catch (err) {
28606
- logger$i.error(err);
28994
+ logger$j.error(err);
28607
28995
  return defaultValue;
28608
28996
  }
28609
28997
  });
@@ -28634,7 +29022,7 @@ const useLocalStorage = (key, defaultValue, options) => {
28634
29022
  try {
28635
29023
  updateLocalStorage();
28636
29024
  } catch (err) {
28637
- logger$i.error(err);
29025
+ logger$j.error(err);
28638
29026
  }
28639
29027
  }, [value, ignoreLocalStorage]);
28640
29028
  useEffect(() => {
@@ -28647,7 +29035,7 @@ const useLocalStorage = (key, defaultValue, options) => {
28647
29035
  setValue(event.newValue ? parser(event.newValue) : void 0);
28648
29036
  }
28649
29037
  } catch (err) {
28650
- logger$i.error(err);
29038
+ logger$j.error(err);
28651
29039
  }
28652
29040
  };
28653
29041
  if (ignoreLocalStorage) return;
@@ -28794,7 +29182,7 @@ const useSingpassMyInfoLogin = ({
28794
29182
  trustedFields: trustedFields$1
28795
29183
  };
28796
29184
  };
28797
- const logger$h = createLogger("useAssociatedLegalArrangement");
29185
+ const logger$i = createLogger("useAssociatedLegalArrangement");
28798
29186
  function useAssociatedLegalArrangement({
28799
29187
  rootLegalEntity,
28800
29188
  getLegalEntity: getLegalEntity2
@@ -28805,7 +29193,7 @@ function useAssociatedLegalArrangement({
28805
29193
  var _a;
28806
29194
  const foundEntity = (_a = rootLegalEntity == null ? void 0 : rootLegalEntity.entityAssociations) == null ? void 0 : _a.find((entity) => entity.type === LegalEntityType.SOLE_PROPRIETORSHIP || entity.type === LegalEntityType.TRUST);
28807
29195
  if (foundEntity == null ? void 0 : foundEntity.legalEntityId) {
28808
- getAssociatedEntity(foundEntity == null ? void 0 : foundEntity.legalEntityId).then((res) => setAssociatedLegalArrangement(res)).catch(logger$h.error);
29196
+ getAssociatedEntity(foundEntity == null ? void 0 : foundEntity.legalEntityId).then((res) => setAssociatedLegalArrangement(res)).catch(logger$i.error);
28809
29197
  }
28810
29198
  }, [getAssociatedEntity, rootLegalEntity == null ? void 0 : rootLegalEntity.entityAssociations]);
28811
29199
  useEffect(() => {
@@ -28862,7 +29250,7 @@ const useCanSeeEntitySelection = (legalEntityId) => {
28862
29250
  setCanSeeEntitySelection: setCanSeeEntitySelectionIntoLocalStorage
28863
29251
  };
28864
29252
  };
28865
- const logger$g = createLogger("useExemptSettlor");
29253
+ const logger$h = createLogger("useExemptSettlor");
28866
29254
  const useExemptSettlor = ({
28867
29255
  trust,
28868
29256
  handleGetLegalEntity
@@ -28875,10 +29263,29 @@ const useExemptSettlor = ({
28875
29263
  }, [handleGetLegalEntity]);
28876
29264
  useEffect(() => {
28877
29265
  if (!(trust == null ? void 0 : trust.trust)) return;
28878
- updateExemptSettlor(trust).catch(logger$g.error);
29266
+ updateExemptSettlor(trust).catch(logger$h.error);
28879
29267
  }, [trust, updateExemptSettlor]);
28880
29268
  return exemptSettlor;
28881
29269
  };
29270
+ const usePolling = ({
29271
+ poller,
29272
+ pollingInterval,
29273
+ onNewValueReceived,
29274
+ skip,
29275
+ immediate = false
29276
+ }) => {
29277
+ useEffect(() => {
29278
+ if (skip) return;
29279
+ const pollAndProvideNewValue = () => {
29280
+ poller().then((newValue) => onNewValueReceived(newValue)).catch((err) => console.error(err));
29281
+ };
29282
+ if (immediate) {
29283
+ pollAndProvideNewValue();
29284
+ }
29285
+ const timeoutId = setInterval(pollAndProvideNewValue, pollingInterval);
29286
+ return () => clearInterval(timeoutId);
29287
+ }, [onNewValueReceived, poller, pollingInterval, skip, immediate]);
29288
+ };
28882
29289
  function useSalesChannelsSettings() {
28883
29290
  const {
28884
29291
  isSettingEnabled
@@ -30351,35 +30758,6 @@ const useIntroductionScreens = ({
30351
30758
  }) : [], [legalEntityType, tasks]);
30352
30759
  return canSeeIntroduction && (introductionScreens == null ? void 0 : introductionScreens.length) > 0 ? [IntroductionScreens.PROLOGUE, ...introductionScreens, IntroductionScreens.EPILOGUE] : void 0;
30353
30760
  };
30354
- const shouldHighlight = (active, current, fillBefore) => !fillBefore ? active === current : active >= current;
30355
- const StepProgressIndicator = ({
30356
- activeStepIndex,
30357
- stepsCount,
30358
- fillBefore,
30359
- thick
30360
- }) => stepsCount > 0 ? jsx("div", {
30361
- "aria-label": `Step ${activeStepIndex + 1} of ${stepsCount}`,
30362
- className: "adyen-kyc-progress",
30363
- role: "group",
30364
- children: jsx("ol", {
30365
- className: cx("adyen-kyc-progress__bar", {
30366
- "adyen-kyc-progress__bar--thick": thick
30367
- }),
30368
- children: range(stepsCount).map((stepNumber) => {
30369
- const isHighlighted = shouldHighlight(activeStepIndex, stepNumber, fillBefore);
30370
- return jsx("li", {
30371
- "aria-current": isHighlighted ? "step" : void 0,
30372
- className: cx("adyen-kyc-progress__step", {
30373
- "adyen-kyc-progress__step--active": isHighlighted
30374
- }),
30375
- children: jsx("span", {
30376
- className: "adyen-kyc-progress__step-label",
30377
- children: `Step ${stepNumber + 1}: ${stepNumber < activeStepIndex ? "completed" : "not completed"}`
30378
- })
30379
- }, stepNumber);
30380
- })
30381
- })
30382
- }) : null;
30383
30761
  const toCapitalized = (s) => `${s[0].toUpperCase()}${s.slice(1).toLowerCase()}`;
30384
30762
  const toPascalCase = (s) => s.split(/[^A-Za-z]/).map((word) => toCapitalized(word)).join("");
30385
30763
  var IntroductionScreenTranslationKeyElements = /* @__PURE__ */ ((IntroductionScreenTranslationKeyElements2) => {
@@ -30677,10 +31055,14 @@ function ReviewComponent({
30677
31055
  footer
30678
31056
  });
30679
31057
  }
30680
- const SvgSingpassLogo = (props) => /* @__PURE__ */ jsxs$1("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 93 16", ...props, children: [
31058
+ const SvgSingpassLogo = (props) => /* @__PURE__ */ jsxs$1("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 93 16", role: "img", ...props, children: [
30681
31059
  /* @__PURE__ */ jsx$1("path", { fill: "#F4333D", d: "M5.88 11.8c-2.54 0-4.34-.85-5.13-1.57l1.69-2.48a5.5 5.5 0 0 0 3.44 1.36c.92 0 1.33-.27 1.33-.77 0-.38-.32-.68-1.3-.9l-2-.47c-1.96-.46-2.89-1.65-2.89-3.3C1.02 1.42 2.82.1 5.5.1c2.07 0 3.73.63 4.54 1.35L8.35 3.92A4.5 4.5 0 0 0 5.5 2.75c-.86 0-1.24.3-1.24.74 0 .45.4.7 1.17.88l2 .45c2.05.45 3.04 1.56 3.04 3.18 0 2.32-1.73 3.81-4.59 3.81m12-.22h3.38V5.52c0-1.48.72-2.4 2.12-2.4 1.32 0 2.02.76 2.02 2.4v6.06h3.37V4.67c0-3.02-1.5-4.58-4.09-4.58q-2.2 0-3.42 1.74V1.1c0-.5-.29-.8-.78-.8h-2.59v11.27M42.46.32v9.75c0 4.24-2.75 5.93-6.12 5.93-2.25 0-4.12-.59-5.24-1.6l1.75-2.61a5 5 0 0 0 3.49 1.37c1.73 0 2.74-1.1 2.74-2.64V9.8c-.8 1.02-1.98 1.47-3.41 1.47-2.73 0-5.09-2.39-5.09-5.59S32.93.09 35.66.09a3.9 3.9 0 0 1 3.41 1.7V1.1c0-.5.3-.8.8-.8zM39.2 5.68c0-1.46-1.1-2.61-2.63-2.61A2.57 2.57 0 0 0 34 5.68a2.6 2.6 0 0 0 2.57 2.61 2.56 2.56 0 0 0 2.63-2.61m18 .27c0 3.47-2.35 5.86-5.28 5.86-1.53 0-2.74-.45-3.62-1.46v5.38h-3.37V.32h2.59c.5 0 .78.29.78.79v.67A4.2 4.2 0 0 1 51.91.1c2.93 0 5.29 2.39 5.29 5.86m-3.4 0c0-1.69-1.2-2.88-2.78-2.88a2.77 2.77 0 0 0-2.83 2.88 2.8 2.8 0 0 0 2.83 2.89c1.58 0 2.77-1.2 2.77-2.89M70.91.32v11.26h-3.38v-1.46a4.2 4.2 0 0 1-3.62 1.69c-2.92 0-5.28-2.39-5.28-5.86S61 .09 63.92.09c1.53 0 2.8.54 3.62 1.7V1.1c0-.5.3-.8.79-.8zm-3.26 5.63a2.8 2.8 0 0 0-2.84-2.88c-1.57 0-2.76 1.19-2.76 2.88 0 1.7 1.19 2.89 2.76 2.89 1.6 0 2.84-1.2 2.84-2.89m10.1 5.86c2.85 0 4.58-1.49 4.58-3.8 0-1.63-.99-2.73-3.03-3.19l-2-.45c-.77-.18-1.18-.43-1.18-.88s.39-.74 1.24-.74c1.04 0 2.11.5 2.86 1.17l1.68-2.48C81.11.72 79.44.1 77.37.1 74.7.1 72.9 1.42 72.9 3.68c0 1.64.92 2.83 2.88 3.29l2 .47c.99.22 1.3.52 1.3.9 0 .5-.4.77-1.33.77a5.5 5.5 0 0 1-3.44-1.36l-1.68 2.48c.78.72 2.58 1.58 5.12 1.58m10.65 0C91.27 11.8 93 10.32 93 8c0-1.63-.99-2.73-3.04-3.19l-2-.45c-.76-.18-1.17-.43-1.17-.88s.38-.74 1.24-.74c1.03 0 2.11.5 2.86 1.17l1.68-2.48C91.77.72 90.1.1 88.03.1c-2.68 0-4.47 1.33-4.47 3.59 0 1.64.92 2.83 2.87 3.29l2 .47c1 .22 1.3.52 1.3.9 0 .5-.4.77-1.32.77a5.5 5.5 0 0 1-3.44-1.36l-1.69 2.48c.8.72 2.6 1.58 5.13 1.58" }),
30682
31060
  /* @__PURE__ */ jsx$1("path", { fill: "#000", d: "M13.8 3.92c1.1 0 1.95-.86 1.95-1.96S14.9 0 13.8 0s-1.96.86-1.96 1.96.85 1.96 1.96 1.96m-2.12 7.66h4.23l-.9-7a5 5 0 0 1-2.43 0z" })
30683
31061
  ] });
31062
+ const singpassLogo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
31063
+ __proto__: null,
31064
+ default: SvgSingpassLogo
31065
+ }, Symbol.toStringTag, { value: "Module" }));
30684
31066
  const legalEntityTypeToSubtitleTranslationKey = {
30685
31067
  [LegalEntityType.INDIVIDUAL]: "myInfoYouCanGetVerifiedDetails",
30686
31068
  [LegalEntityType.ORGANIZATION]: "myInfoBusinessYouCanGetVerifiedDetails"
@@ -30756,28 +31138,7 @@ const SingpassBanner = (props) => {
30756
31138
  })]
30757
31139
  });
30758
31140
  };
30759
- const SvgSetupManual = (props) => /* @__PURE__ */ jsxs$1("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 102 100", ...props, children: [
30760
- /* @__PURE__ */ jsx$1("path", { fill: "#EEF0F3", stroke: "#00112C", strokeLinecap: "round", strokeLinejoin: "round", d: "M66.82 10.09H2.9c-1.19 0-2.15.96-2.15 2.15v84.05c0 1.19.96 2.15 2.15 2.15h63.9c1.2 0 2.15-.96 2.15-2.15V12.24c0-1.19-.96-2.15-2.14-2.15" }),
30761
- /* @__PURE__ */ jsx$1("path", { fill: "#A0BEE6", stroke: "#A0BEE6", strokeLinecap: "round", strokeLinejoin: "round", d: "M25.44 35.7H9.02v3.94h16.42z" }),
30762
- /* @__PURE__ */ jsx$1("path", { fill: "#6F7988", stroke: "#6F7988", strokeLinecap: "round", strokeLinejoin: "round", d: "M24.44 55.91H9.02v1.97h15.42z" }),
30763
- /* @__PURE__ */ jsx$1("path", { fill: "#A0BEE6", stroke: "#A0BEE6", strokeLinecap: "round", strokeLinejoin: "round", d: "M55.77 35.7H29.16v3.94h26.61z" }),
30764
- /* @__PURE__ */ jsx$1("path", { stroke: "#6F7988", strokeLinecap: "round", strokeLinejoin: "round", d: "M9.02 29.58H20.4m-11.38-3.4h20.14" }),
30765
- /* @__PURE__ */ jsx$1("path", { stroke: "#A0BEE6", strokeLinecap: "round", strokeLinejoin: "round", d: "M9.02 51.75h18.9" }),
30766
- /* @__PURE__ */ jsx$1("path", { fill: "#6F7988", stroke: "#6F7988", strokeLinecap: "round", strokeLinejoin: "round", d: "M24.44 69.35H9.02v1.97h15.42z" }),
30767
- /* @__PURE__ */ jsx$1("path", { stroke: "#A0BEE6", strokeLinecap: "round", strokeLinejoin: "round", d: "M9.02 65.19h18.9" }),
30768
- /* @__PURE__ */ jsx$1("path", { fill: "#6F7988", stroke: "#6F7988", strokeLinecap: "round", strokeLinejoin: "round", d: "M48 55.91H32.57v1.97h15.41z" }),
30769
- /* @__PURE__ */ jsx$1("path", { stroke: "#A0BEE6", strokeLinecap: "round", strokeLinejoin: "round", d: "M32.58 51.75h18.9" }),
30770
- /* @__PURE__ */ jsx$1("path", { fill: "#6F7988", stroke: "#6F7988", strokeLinecap: "round", strokeLinejoin: "round", d: "M48 69.35H32.57v1.97h15.41z" }),
30771
- /* @__PURE__ */ jsx$1("path", { stroke: "#A0BEE6", strokeLinecap: "round", strokeLinejoin: "round", d: "M32.58 65.19h18.9" }),
30772
- /* @__PURE__ */ jsx$1("path", { stroke: "#6F7988", strokeLinecap: "round", strokeLinejoin: "round", d: "M9.02 82.5h9.46M9.02 86h25.8" }),
30773
- /* @__PURE__ */ jsx$1("path", { fill: "#fff", stroke: "#00112C", strokeLinecap: "round", strokeLinejoin: "round", d: "M83.1.79H19.17c-1.18 0-2.14.96-2.14 2.15v84.05c0 1.19.96 2.15 2.14 2.15H83.1c1.19 0 2.15-.96 2.15-2.15V2.94c0-1.19-.96-2.15-2.15-2.15" }),
30774
- /* @__PURE__ */ jsx$1("path", { fill: "#A0BEE6", stroke: "#A0BEE6", strokeLinecap: "round", strokeLinejoin: "round", d: "M64.64 16.78h-39.1v6.01h39.1zm0 11.71h-39.1v6.01h39.1zm0 11.71h-39.1v6.01h39.1z" }),
30775
- /* @__PURE__ */ jsx$1("path", { stroke: "#00112C", strokeLinecap: "round", strokeLinejoin: "round", d: "M25.44 10.14h22.54" }),
30776
- /* @__PURE__ */ jsx$1("path", { stroke: "#6F7988", strokeLinecap: "round", strokeLinejoin: "round", d: "M25.44 51.9h22.54m-22.54 5.7h32.82M25.44 68.99h26.54m-26.54 5.69H37.4" }),
30777
- /* @__PURE__ */ jsx$1("path", { stroke: "#00112C", strokeLinecap: "round", strokeLinejoin: "round", d: "M54.4 10.14h17.28M27.93 41.7v2.84m-.4-2.94h.8m-.8 3.2h.8m-.8-25.02h7.83m3.49 0h9.75M27.7 31.5h14.32m9.96-11.72h2.85" }),
30778
- /* @__PURE__ */ jsx$1("path", { fill: "#00112C", stroke: "#00112C", strokeLinecap: "round", strokeLinejoin: "round", d: "m79.81 76.03 1.96 21.5a1.12 1.12 0 0 0 1.93.68l6.59-6.82q.2-.2.46-.28l9.01-2.96c.9-.3 1.05-1.52.23-2.02L81.51 74.96a1.12 1.12 0 0 0-1.69 1.06z" })
30779
- ] });
30780
- const SvgSetupSingpass = (props) => /* @__PURE__ */ jsxs$1("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 146 95", ...props, children: [
31141
+ const SvgSingpassVerificationInstant = (props) => /* @__PURE__ */ jsxs$1("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 146 95", role: "img", ...props, children: [
30781
31142
  /* @__PURE__ */ jsx$1("path", { fill: "#fff", stroke: "#00112C", strokeLinecap: "round", strokeLinejoin: "round", d: "M55.82 76.52a6.1 6.1 0 0 0 6.11 6.11h76.67a6.1 6.1 0 0 0 6.11-6.11V21.46H55.83z" }),
30782
31143
  /* @__PURE__ */ jsx$1("path", { fill: "#A0BEE6", stroke: "#00112C", strokeLinecap: "round", strokeLinejoin: "round", d: "M138.6 13.88H61.93a6.1 6.1 0 0 0-6.11 6.11v1.47h88.88V20a6.1 6.1 0 0 0-6.11-6.11z" }),
30783
31144
  /* @__PURE__ */ jsx$1("path", { fill: "#fff", d: "m30.16 94.33 3.47-2.6a41 41 0 0 0 8.1-8.1l2.6-3.48 6.07-2.02 13.53-1.69a3.04 3.04 0 0 0-.71-6.03l-8.6.96.7-3.47 12.66-1.58a3.04 3.04 0 0 0-.71-6.03L56.6 61.48l.8-3.96 10.58-1.32a3.04 3.04 0 0 0-.71-6.03l-8.6.95.8-3.98 8.5-1.06a3.04 3.04 0 0 0-.7-6.03L52.42 41.7l-22.26 2.47V41a4.86 4.86 0 0 0-4.86-4.86c-.68 0-1.22.55-1.22 1.22v2.7c0 1.42-.36 2.8-1.07 4.02L17.2 54.25c-.8 1.4-1.4 2.93-1.75 4.51L11.93 74.6" }),
@@ -30804,6 +31165,35 @@ const SvgSetupSingpass = (props) => /* @__PURE__ */ jsxs$1("svg", { xmlns: "http
30804
31165
  /* @__PURE__ */ jsx$1("path", { stroke: "#00112C", strokeLinecap: "round", strokeLinejoin: "round", d: "M86.73 53.7v3.13m1.1-2.68-2.2 2.21m2.2 0-2.2-2.2m2.67 1.1h-3.13m19.61-1.56v3.13m1.1-2.68-2.21 2.21m2.21 0-2.21-2.2m2.67 1.1h-3.13m10.59-1.56v3.13m1.1-2.68-2.2 2.21m2.2 0-2.2-2.2m2.66 1.1h-3.12M95.75 53.7v3.13m1.1-2.68-2.2 2.21m2.2 0-2.2-2.2m2.66 1.1H94.2" }),
30805
31166
  /* @__PURE__ */ jsx$1("path", { stroke: "#6F7988", strokeLinecap: "round", strokeLinejoin: "round", d: "M80.65 34.88h30.2m-30.2 3.21h13.47" })
30806
31167
  ] });
31168
+ const singpassVerificationInstant = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
31169
+ __proto__: null,
31170
+ default: SvgSingpassVerificationInstant
31171
+ }, Symbol.toStringTag, { value: "Module" }));
31172
+ const SvgSingpassVerificationManual = (props) => /* @__PURE__ */ jsxs$1("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 102 100", role: "img", ...props, children: [
31173
+ /* @__PURE__ */ jsx$1("path", { fill: "#EEF0F3", stroke: "#00112C", strokeLinecap: "round", strokeLinejoin: "round", d: "M66.82 10.09H2.9c-1.19 0-2.15.96-2.15 2.15v84.05c0 1.19.96 2.15 2.15 2.15h63.9c1.2 0 2.15-.96 2.15-2.15V12.24c0-1.19-.96-2.15-2.14-2.15" }),
31174
+ /* @__PURE__ */ jsx$1("path", { fill: "#A0BEE6", stroke: "#A0BEE6", strokeLinecap: "round", strokeLinejoin: "round", d: "M25.44 35.7H9.02v3.94h16.42z" }),
31175
+ /* @__PURE__ */ jsx$1("path", { fill: "#6F7988", stroke: "#6F7988", strokeLinecap: "round", strokeLinejoin: "round", d: "M24.44 55.91H9.02v1.97h15.42z" }),
31176
+ /* @__PURE__ */ jsx$1("path", { fill: "#A0BEE6", stroke: "#A0BEE6", strokeLinecap: "round", strokeLinejoin: "round", d: "M55.77 35.7H29.16v3.94h26.61z" }),
31177
+ /* @__PURE__ */ jsx$1("path", { stroke: "#6F7988", strokeLinecap: "round", strokeLinejoin: "round", d: "M9.02 29.58H20.4m-11.38-3.4h20.14" }),
31178
+ /* @__PURE__ */ jsx$1("path", { stroke: "#A0BEE6", strokeLinecap: "round", strokeLinejoin: "round", d: "M9.02 51.75h18.9" }),
31179
+ /* @__PURE__ */ jsx$1("path", { fill: "#6F7988", stroke: "#6F7988", strokeLinecap: "round", strokeLinejoin: "round", d: "M24.44 69.35H9.02v1.97h15.42z" }),
31180
+ /* @__PURE__ */ jsx$1("path", { stroke: "#A0BEE6", strokeLinecap: "round", strokeLinejoin: "round", d: "M9.02 65.19h18.9" }),
31181
+ /* @__PURE__ */ jsx$1("path", { fill: "#6F7988", stroke: "#6F7988", strokeLinecap: "round", strokeLinejoin: "round", d: "M48 55.91H32.57v1.97h15.41z" }),
31182
+ /* @__PURE__ */ jsx$1("path", { stroke: "#A0BEE6", strokeLinecap: "round", strokeLinejoin: "round", d: "M32.58 51.75h18.9" }),
31183
+ /* @__PURE__ */ jsx$1("path", { fill: "#6F7988", stroke: "#6F7988", strokeLinecap: "round", strokeLinejoin: "round", d: "M48 69.35H32.57v1.97h15.41z" }),
31184
+ /* @__PURE__ */ jsx$1("path", { stroke: "#A0BEE6", strokeLinecap: "round", strokeLinejoin: "round", d: "M32.58 65.19h18.9" }),
31185
+ /* @__PURE__ */ jsx$1("path", { stroke: "#6F7988", strokeLinecap: "round", strokeLinejoin: "round", d: "M9.02 82.5h9.46M9.02 86h25.8" }),
31186
+ /* @__PURE__ */ jsx$1("path", { fill: "#fff", stroke: "#00112C", strokeLinecap: "round", strokeLinejoin: "round", d: "M83.1.79H19.17c-1.18 0-2.14.96-2.14 2.15v84.05c0 1.19.96 2.15 2.14 2.15H83.1c1.19 0 2.15-.96 2.15-2.15V2.94c0-1.19-.96-2.15-2.15-2.15" }),
31187
+ /* @__PURE__ */ jsx$1("path", { fill: "#A0BEE6", stroke: "#A0BEE6", strokeLinecap: "round", strokeLinejoin: "round", d: "M64.64 16.78h-39.1v6.01h39.1zm0 11.71h-39.1v6.01h39.1zm0 11.71h-39.1v6.01h39.1z" }),
31188
+ /* @__PURE__ */ jsx$1("path", { stroke: "#00112C", strokeLinecap: "round", strokeLinejoin: "round", d: "M25.44 10.14h22.54" }),
31189
+ /* @__PURE__ */ jsx$1("path", { stroke: "#6F7988", strokeLinecap: "round", strokeLinejoin: "round", d: "M25.44 51.9h22.54m-22.54 5.7h32.82M25.44 68.99h26.54m-26.54 5.69H37.4" }),
31190
+ /* @__PURE__ */ jsx$1("path", { stroke: "#00112C", strokeLinecap: "round", strokeLinejoin: "round", d: "M54.4 10.14h17.28M27.93 41.7v2.84m-.4-2.94h.8m-.8 3.2h.8m-.8-25.02h7.83m3.49 0h9.75M27.7 31.5h14.32m9.96-11.72h2.85" }),
31191
+ /* @__PURE__ */ jsx$1("path", { fill: "#00112C", stroke: "#00112C", strokeLinecap: "round", strokeLinejoin: "round", d: "m79.81 76.03 1.96 21.5a1.12 1.12 0 0 0 1.93.68l6.59-6.82q.2-.2.46-.28l9.01-2.96c.9-.3 1.05-1.52.23-2.02L81.51 74.96a1.12 1.12 0 0 0-1.69 1.06z" })
31192
+ ] });
31193
+ const singpassVerificationManual = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
31194
+ __proto__: null,
31195
+ default: SvgSingpassVerificationManual
31196
+ }, Symbol.toStringTag, { value: "Module" }));
30807
31197
  const setupAccountMethods = ["singpass", "manual"];
30808
31198
  const setupAccountMethodFields = ["setupAccountMethod"];
30809
31199
  const getSingpassSelectionDisabled = (legalEntityType) => {
@@ -30833,7 +31223,7 @@ const getSetupAccountMethodMetadata = (legalEntityType) => {
30833
31223
  description: translationSingpassDescriptionKey,
30834
31224
  icon: jsx("span", {
30835
31225
  className: "adyen-kyc-setup-singpass-container",
30836
- children: jsx(SvgSetupSingpass, {})
31226
+ children: jsx(SvgSingpassVerificationInstant, {})
30837
31227
  }),
30838
31228
  provider: {
30839
31229
  name: "singpass",
@@ -30849,7 +31239,7 @@ const getSetupAccountMethodMetadata = (legalEntityType) => {
30849
31239
  description: "youAlsoHaveToUploadSomeSupportingDocuments",
30850
31240
  icon: jsx("span", {
30851
31241
  className: "adyen-kyc-setup-manual-container",
30852
- children: jsx(SvgSetupManual, {})
31242
+ children: jsx(SvgSingpassVerificationManual, {})
30853
31243
  })
30854
31244
  }
30855
31245
  };
@@ -31796,6 +32186,7 @@ function IndividualDropinComponent({
31796
32186
  legalEntityResponse,
31797
32187
  taskName,
31798
32188
  handleHomeClick,
32189
+ handleCloseClick,
31799
32190
  homeButtonLabel,
31800
32191
  isTargetLegalEntityType,
31801
32192
  country: parentCountry,
@@ -31808,6 +32199,7 @@ function IndividualDropinComponent({
31808
32199
  onSubmit: externalOnSubmit,
31809
32200
  onTypeSwitch,
31810
32201
  hideNavigation = false,
32202
+ asModal = false,
31811
32203
  handleBackClick: externalBackClick,
31812
32204
  trustedFields: trustedFields2,
31813
32205
  trustedFieldsProvider
@@ -32237,7 +32629,8 @@ function IndividualDropinComponent({
32237
32629
  shouldValidate,
32238
32630
  setShouldValidate,
32239
32631
  gotoFormByFormIndex,
32240
- nextButtonLabel
32632
+ nextButtonLabel,
32633
+ currentStep
32241
32634
  } = useFormComposer({
32242
32635
  problems,
32243
32636
  baseTrackingPayload,
@@ -32256,6 +32649,7 @@ function IndividualDropinComponent({
32256
32649
  handleBackClick,
32257
32650
  handleNextClick,
32258
32651
  handleHomeClick,
32652
+ handleCloseClick,
32259
32653
  hideHomeButton,
32260
32654
  hideBackButton,
32261
32655
  hideFooter,
@@ -32271,6 +32665,8 @@ function IndividualDropinComponent({
32271
32665
  canSubmit: canSubmit2() && hasDataChanged(dataFromResponse, data),
32272
32666
  problems,
32273
32667
  hideNavigation,
32668
+ asModal,
32669
+ currentStep,
32274
32670
  children: jsx(IndividualComponent, {
32275
32671
  ...derivedProps,
32276
32672
  capabilities: getCapabilities(legalEntityResponse),
@@ -32302,7 +32698,7 @@ function IndividualDropinComponent({
32302
32698
  })
32303
32699
  });
32304
32700
  }
32305
- const logger$f = createLogger("useBankConfigurationHandler");
32701
+ const logger$g = createLogger("useBankConfigurationHandler");
32306
32702
  const useBankConfigurationHandlers = ({
32307
32703
  isEmbeddedDropin,
32308
32704
  handleGetBankVerificationVendors,
@@ -32319,7 +32715,7 @@ const useBankConfigurationHandlers = ({
32319
32715
  (async () => {
32320
32716
  const bankVerificationVendorsResponse2 = callBankVerificationVendorsUpfront ? await handleGetBankVerificationVendors(bankAccountCountry) : [];
32321
32717
  setBankVerificationVendorsResponse(bankVerificationVendorsResponse2);
32322
- })().catch(logger$f.error).finally(() => {
32718
+ })().catch(logger$g.error).finally(() => {
32323
32719
  setLoadingStatus("success");
32324
32720
  });
32325
32721
  }, [bankAccountCountry]);
@@ -33720,8 +34116,8 @@ const serviceAgreementValidationRules = {
33720
34116
  errorMessage: "fieldIsRequired"
33721
34117
  }
33722
34118
  };
33723
- const logger$e = createLogger("useServiceAgreement");
33724
- const FALLBACK_LANGUAGE_CODE = "en";
34119
+ const logger$f = createLogger("useServiceAgreement");
34120
+ const FALLBACK_LANGUAGE_CODE$1 = "en";
33725
34121
  const useServiceAgreement = ({
33726
34122
  handleGetServiceAgreement,
33727
34123
  handleServiceAgreementIsNotAvailableInThatLanguage,
@@ -33753,7 +34149,7 @@ const useServiceAgreement = ({
33753
34149
  contract
33754
34150
  });
33755
34151
  };
33756
- requestAcceptedServiceAgreement().catch(logger$e.error).finally(() => setLoading("success"));
34152
+ requestAcceptedServiceAgreement().catch(logger$f.error).finally(() => setLoading("success"));
33757
34153
  }, [acceptanceId, handleViewAcceptedTermsOfServiceDocument]);
33758
34154
  useEffect(() => {
33759
34155
  const requestServiceAgreement = async () => {
@@ -33768,7 +34164,7 @@ const useServiceAgreement = ({
33768
34164
  language: agreementLanguage
33769
34165
  });
33770
34166
  if (!document2) {
33771
- logger$e.log('"document" field was missing in response');
34167
+ logger$f.log('"document" field was missing in response');
33772
34168
  return;
33773
34169
  }
33774
34170
  const contract = JSON.parse(decodeURIComponent(escape(window.atob(document2))));
@@ -33778,15 +34174,15 @@ const useServiceAgreement = ({
33778
34174
  });
33779
34175
  setLoading("success");
33780
34176
  } catch (err) {
33781
- if (agreementLanguage !== FALLBACK_LANGUAGE_CODE) {
34177
+ if (agreementLanguage !== FALLBACK_LANGUAGE_CODE$1) {
33782
34178
  handleServiceAgreementIsNotAvailableInThatLanguage();
33783
- setAgreementLanguage(FALLBACK_LANGUAGE_CODE);
34179
+ setAgreementLanguage(FALLBACK_LANGUAGE_CODE$1);
33784
34180
  return;
33785
34181
  }
33786
34182
  throw err;
33787
34183
  }
33788
34184
  };
33789
- requestServiceAgreement().catch(logger$e.error);
34185
+ requestServiceAgreement().catch(logger$f.error);
33790
34186
  }, [handleGetServiceAgreement, handleServiceAgreementIsNotAvailableInThatLanguage, agreementLanguage, legalEntityId, serviceAgreementType]);
33791
34187
  return {
33792
34188
  loading,
@@ -33803,6 +34199,8 @@ const serviceAgreementTypesTranslationMapping = {
33803
34199
  adyenFranchisee: "franchiseesTAndCs",
33804
34200
  adyenPccr: "pccr"
33805
34201
  };
34202
+ const logger$e = createLogger("ServiceAgreementDropinComponent");
34203
+ const FALLBACK_LANGUAGE_CODE = "en";
33806
34204
  function ServiceAgreementDropinComponent({
33807
34205
  legalEntityResponse,
33808
34206
  handleGetServiceAgreement,
@@ -33999,16 +34397,23 @@ function ServiceAgreementDropinComponent({
33999
34397
  }
34000
34398
  };
34001
34399
  const onDownloadUnacceptedTermsOfServiceDocument = async () => {
34002
- try {
34003
- if (!handleDownloadUnacceptedTermsOfServiceDocument) return;
34004
- const response = await handleDownloadUnacceptedTermsOfServiceDocument(legalEntityResponse.id, {
34400
+ const requestAndDownload = async (languageCode) => {
34401
+ const response = await (handleDownloadUnacceptedTermsOfServiceDocument == null ? void 0 : handleDownloadUnacceptedTermsOfServiceDocument(legalEntityResponse.id, {
34005
34402
  type: activeForm.serviceAgreementType,
34006
- language: i18n.languageCode,
34403
+ language: languageCode,
34007
34404
  termsOfServiceDocumentFormat: "PDF"
34008
- });
34009
- if (!response.document) throw new Error();
34405
+ }));
34406
+ if (!(response == null ? void 0 : response.document)) throw new Error();
34010
34407
  await downloadFile(response.document, `${i18n.get(activeForm.formName)}.pdf`);
34408
+ };
34409
+ try {
34410
+ if (!handleDownloadUnacceptedTermsOfServiceDocument) return;
34411
+ await requestAndDownload(i18n.languageCode);
34011
34412
  } catch (e) {
34413
+ if (i18n.languageCode !== FALLBACK_LANGUAGE_CODE) {
34414
+ await requestAndDownload(FALLBACK_LANGUAGE_CODE).catch(logger$e.error);
34415
+ return;
34416
+ }
34012
34417
  showToast({
34013
34418
  label: i18n.get("failedToDownloadServiceAgreementDocument"),
34014
34419
  type: "error"
@@ -34853,7 +35258,6 @@ const hasProgressedBeyondEntitySelection = (legalEntity) => {
34853
35258
  return hasOwnEntityAssocation || !!hasOrganizationType;
34854
35259
  };
34855
35260
  const PAGES_WITH_POLLING = [TaskTypes.DECISION_MAKER_OVERVIEW, TaskTypes.TASKS_OVERVIEW];
34856
- const POLLING_INTERVAL = 3e3;
34857
35261
  const logger$d = createLogger("DropinComposerComponent");
34858
35262
  const isOrganizationSettlorWithExemptionReasonEnabled = (enabled, country) => country === CountryCodes.Australia && enabled;
34859
35263
  function DropinComposerComponent({
@@ -35073,19 +35477,26 @@ function DropinComposerComponent({
35073
35477
  }
35074
35478
  }
35075
35479
  };
35076
- const refreshLegalEntity = useCallback(async () => {
35480
+ const retrieveLegalEntity = useCallback(async () => {
35077
35481
  if (rootLegalEntity.id && (args == null ? void 0 : args.handleGetLegalEntity)) {
35078
35482
  try {
35079
- const response = await (args == null ? void 0 : args.handleGetLegalEntity(rootLegalEntity.id));
35080
- setRootLegalEntity(response);
35081
- setCapabilityProblems(getCapabilityProblems(response, rootLegalEntityCountry, isExperimentEnabled));
35082
- return response;
35483
+ return await args.handleGetLegalEntity(rootLegalEntity.id);
35083
35484
  } catch (e) {
35084
- logger$d.warn(i18n.get("failedToFetchLegalEntityDetails"));
35485
+ logger$d.warn("Failed to fetch legal entity details", e);
35085
35486
  }
35086
35487
  }
35087
35488
  return void 0;
35088
- }, [i18n, rootLegalEntity.id]);
35489
+ }, [rootLegalEntity.id, args == null ? void 0 : args.handleGetLegalEntity, i18n]);
35490
+ const updateLegalEntityAndCapabilityProblems = useCallback((legalEntity) => {
35491
+ if (!legalEntity) return;
35492
+ setRootLegalEntity(legalEntity);
35493
+ setCapabilityProblems(getCapabilityProblems(legalEntity, getLegalEntityCountry(legalEntity), isExperimentEnabled));
35494
+ }, [isExperimentEnabled]);
35495
+ const refreshLegalEntity = useCallback(async () => {
35496
+ const legalEntity = await retrieveLegalEntity();
35497
+ updateLegalEntityAndCapabilityProblems(legalEntity);
35498
+ return legalEntity;
35499
+ }, [retrieveLegalEntity, updateLegalEntityAndCapabilityProblems]);
35089
35500
  const deleteTransferInstrument = async (id) => {
35090
35501
  if (id && (args == null ? void 0 : args.handleDeleteTransferInstrument)) {
35091
35502
  try {
@@ -35437,20 +35848,16 @@ function DropinComposerComponent({
35437
35848
  navigateTo(TaskTypes.CAPABILITY_REJECTED, true);
35438
35849
  }
35439
35850
  }, [rootLegalEntity]);
35440
- useEffect(() => {
35441
- if (!PAGES_WITH_POLLING.includes(currentTask) || hasResolvedCapabilities(rootLegalEntity)) {
35442
- return;
35443
- }
35444
- if (hasRejectedCapabilities(rootLegalEntity)) {
35445
- return;
35446
- }
35447
- const timeoutId = setTimeout(() => {
35448
- refreshLegalEntity().catch(logger$d.error);
35449
- }, POLLING_INTERVAL);
35450
- return () => {
35451
- clearInterval(timeoutId);
35452
- };
35453
- }, [refreshLegalEntity, rootLegalEntity]);
35851
+ usePolling({
35852
+ poller: retrieveLegalEntity,
35853
+ pollingInterval: 3e3,
35854
+ onNewValueReceived: updateLegalEntityAndCapabilityProblems,
35855
+ skip: (
35856
+ // Stop polling when not on an applicable page
35857
+ // or the LE has fully resolved capabilities
35858
+ !PAGES_WITH_POLLING.includes(currentTask) || hasResolvedCapabilities(rootLegalEntity) || hasRejectedCapabilities(rootLegalEntity)
35859
+ )
35860
+ });
35454
35861
  useEffect(() => {
35455
35862
  const newAccountHolder = getDefaultAccountHolderType(rootLegalEntity, false, accountHolder);
35456
35863
  if (newAccountHolder !== accountHolder) setAccountHolder(newAccountHolder);
@@ -35469,13 +35876,14 @@ function DropinComposerComponent({
35469
35876
  handleSingpassMyInfoLoginFailure(e);
35470
35877
  }
35471
35878
  },
35472
- onMessage: ({
35879
+ onMessage: async ({
35473
35880
  data: {
35474
35881
  isSuccessful
35475
35882
  }
35476
35883
  }) => {
35477
35884
  if (isSuccessful) {
35478
35885
  handleSingpassMyInfoLoginSuccess();
35886
+ await refreshLegalEntity();
35479
35887
  } else {
35480
35888
  handleSingpassMyInfoLoginFailure(legalEntityResponse.type === LegalEntityType.INDIVIDUAL ? "weCouldntConnectToMyinfo" : "weCouldntConnectToMyinfoBusiness");
35481
35889
  }
@@ -36348,11 +36756,16 @@ function CreateIndividualComponent({
36348
36756
  legalEntityId,
36349
36757
  taskType,
36350
36758
  onSubmitSuccess,
36351
- handleBackClick
36759
+ handleBackClick,
36760
+ modalView,
36761
+ open,
36762
+ onClose
36352
36763
  }) {
36353
36764
  var _a;
36354
36765
  const {
36355
- contextCountry
36766
+ contextCountry,
36767
+ isModalView,
36768
+ setIsModalView
36356
36769
  } = useCoreContext();
36357
36770
  if (!legalEntityId && !parentLegalEntityId) {
36358
36771
  throw new Error("Must provide at-least one of parentLegalEntityId or legalEntityId");
@@ -36369,9 +36782,13 @@ function CreateIndividualComponent({
36369
36782
  getIdVerificationToken,
36370
36783
  idVerificationStartCheck
36371
36784
  } = useComponentApi(legalEntityId ?? parentLegalEntityId);
36785
+ const [showForm, setShowForm] = useState(false);
36372
36786
  const [legalEntity, setLegalEntity] = useState();
36373
36787
  const [parentLegalEntity, setParentLegalEntity] = useState();
36374
- const [loadingStatus, setLoadingStatus] = useState("loading");
36788
+ setShowForm(open ?? false);
36789
+ if (modalView) {
36790
+ setIsModalView(true);
36791
+ }
36375
36792
  const fetchLegalEntity = useCallback(async () => {
36376
36793
  try {
36377
36794
  const [parentEntity, entity] = await Promise.all([parentLegalEntityId ? getLegalEntity2(parentLegalEntityId) : Promise.resolve(void 0), legalEntityId ? getLegalEntity2(legalEntityId) : Promise.resolve(void 0)]);
@@ -36379,17 +36796,19 @@ function CreateIndividualComponent({
36379
36796
  setLegalEntity(entity);
36380
36797
  } catch (error) {
36381
36798
  logger$c.error(error);
36382
- } finally {
36383
- setLoadingStatus("success");
36384
36799
  }
36385
36800
  }, [parentLegalEntityId, legalEntityId, getLegalEntity2]);
36386
36801
  useEffect(() => {
36387
36802
  fetchLegalEntity().catch(logger$c.error);
36388
36803
  }, [fetchLegalEntity]);
36389
36804
  const country = ((_a = legalEntity == null ? void 0 : legalEntity.individual) == null ? void 0 : _a.residentialAddress.country) ?? contextCountry;
36390
- return loadingStatus === "loading" ? jsx(Loader, {
36391
- size: "medium"
36392
- }) : jsx(IndividualDropinComponent, {
36805
+ const onSubmit = (d) => {
36806
+ setShowForm(false);
36807
+ if (onSubmitSuccess) {
36808
+ onSubmitSuccess(d);
36809
+ }
36810
+ };
36811
+ return showForm ? jsx(IndividualDropinComponent, {
36393
36812
  parentLegalEntity,
36394
36813
  legalEntityResponse: legalEntity,
36395
36814
  country,
@@ -36404,9 +36823,11 @@ function CreateIndividualComponent({
36404
36823
  handleGetIdVerificationStartCheck: idVerificationStartCheck,
36405
36824
  handleBackClick,
36406
36825
  hideNavigation: true,
36407
- onSubmit: onSubmitSuccess,
36826
+ asModal: isModalView,
36827
+ onSubmit,
36828
+ handleCloseClick: onClose,
36408
36829
  taskType
36409
- });
36830
+ }) : null;
36410
36831
  }
36411
36832
  const logger$b = createLogger("CreateTransferInstrumentComponent");
36412
36833
  function CreateTransferInstrumentComponent({
@@ -36469,6 +36890,183 @@ function CreateTransferInstrumentComponent({
36469
36890
  taskType: TaskTypes.PAYOUT
36470
36891
  }) : null;
36471
36892
  }
36893
+ var OnboardingStatus = /* @__PURE__ */ ((OnboardingStatus2) => {
36894
+ OnboardingStatus2["AWAITING_DATA"] = "AWAITING_DATA";
36895
+ OnboardingStatus2["IN_REVIEW"] = "IN_REVIEW";
36896
+ OnboardingStatus2["UNSUCCESSFUL"] = "UNSUCCESSFUL";
36897
+ OnboardingStatus2["REJECTED"] = "REJECTED";
36898
+ OnboardingStatus2["VERIFIED"] = "VERIFIED";
36899
+ return OnboardingStatus2;
36900
+ })(OnboardingStatus || {});
36901
+ const Skeleton = ({
36902
+ circle = false,
36903
+ text = false,
36904
+ height = "1em",
36905
+ width
36906
+ }) => {
36907
+ const classNames = cx("adyen-kyc-skeleton", {
36908
+ "adyen-kyc-skeleton__circle": circle,
36909
+ "adyen-kyc-skeleton__text": text
36910
+ });
36911
+ return jsx("div", {
36912
+ className: classNames,
36913
+ style: {
36914
+ height,
36915
+ width
36916
+ }
36917
+ });
36918
+ };
36919
+ const styles = {
36920
+ "adyen-kyc-embedded-status": "adyen-kyc-embedded-status",
36921
+ "adyen-kyc-embedded-status__avatar": "adyen-kyc-embedded-status__avatar",
36922
+ "adyen-kyc-embedded-status__loading": "adyen-kyc-embedded-status__loading",
36923
+ "adyen-kyc-embedded-status__info": "adyen-kyc-embedded-status__info",
36924
+ "adyen-kyc-embedded-status__title": "adyen-kyc-embedded-status__title"
36925
+ };
36926
+ const statusToTag = (status) => {
36927
+ switch (status) {
36928
+ case OnboardingStatus.IN_REVIEW:
36929
+ return {
36930
+ translationKey: "inReview",
36931
+ variant: "grey"
36932
+ };
36933
+ case OnboardingStatus.VERIFIED:
36934
+ return {
36935
+ translationKey: "verified",
36936
+ variant: "green"
36937
+ };
36938
+ case OnboardingStatus.REJECTED:
36939
+ return {
36940
+ translationKey: "rejected",
36941
+ variant: "red"
36942
+ };
36943
+ case OnboardingStatus.AWAITING_DATA:
36944
+ return {
36945
+ translationKey: "inReview",
36946
+ variant: "grey"
36947
+ };
36948
+ case OnboardingStatus.UNSUCCESSFUL:
36949
+ return {
36950
+ translationKey: "unsuccessful",
36951
+ variant: "red"
36952
+ };
36953
+ default:
36954
+ return {
36955
+ variant: "grey"
36956
+ };
36957
+ }
36958
+ };
36959
+ const EmbeddedStatus = ({
36960
+ title,
36961
+ subtitle,
36962
+ status,
36963
+ loading = false,
36964
+ tagLabel,
36965
+ tagVariant = "green",
36966
+ onClick
36967
+ }) => {
36968
+ const {
36969
+ i18n
36970
+ } = useI18nContext();
36971
+ const statusTag = status ? statusToTag(status) : {
36972
+ translationKey: tagLabel,
36973
+ variant: tagVariant
36974
+ };
36975
+ return jsxs("button", {
36976
+ type: "button",
36977
+ className: styles["adyen-kyc-embedded-status"],
36978
+ onClick,
36979
+ children: [jsx("section", {
36980
+ className: cx(styles["adyen-kyc-embedded-status__avatar"], {
36981
+ "adyen-kyc-embedded-status__loading": loading
36982
+ }),
36983
+ children: loading ? jsx(Skeleton, {
36984
+ height: "100%",
36985
+ width: "100%",
36986
+ circle: true
36987
+ }) : jsx(Icon, {
36988
+ className: styles["adyen-kyc-embedded-status__icon"],
36989
+ name: "user"
36990
+ })
36991
+ }), jsxs("section", {
36992
+ className: styles["adyen-kyc-embedded-status__info"],
36993
+ children: [loading ? jsx(Skeleton, {
36994
+ text: true,
36995
+ width: "20ch",
36996
+ height: "1em"
36997
+ }) : jsx(Typography, {
36998
+ variant: "title",
36999
+ children: title
37000
+ }), loading ? jsx(Skeleton, {
37001
+ text: true,
37002
+ width: "90%",
37003
+ height: "1em"
37004
+ }) : jsx(Typography, {
37005
+ variant: "caption",
37006
+ children: subtitle
37007
+ })]
37008
+ }), jsx("section", {
37009
+ className: styles["adyen-kyc-embedded-status__tag"],
37010
+ children: loading ? jsx(Skeleton, {
37011
+ width: "8ch",
37012
+ height: "1em"
37013
+ }) : jsx(Tag, {
37014
+ variant: statusTag.variant,
37015
+ children: !statusTag.translationKey ? "---" : i18n.get(statusTag.translationKey)
37016
+ })
37017
+ })]
37018
+ });
37019
+ };
37020
+ function LegalEntityStatus({
37021
+ legalEntityId,
37022
+ onClick
37023
+ }) {
37024
+ var _a, _b, _c;
37025
+ const {
37026
+ getLegalEntity: getLegalEntity2,
37027
+ getOnboardingStatus: getOnboardingStatus2
37028
+ } = useComponentApi(legalEntityId);
37029
+ const [legalEntity, setLegalEntity] = useState();
37030
+ const [isLoading, setIsLoading] = useState(!legalEntity);
37031
+ const [onboardingStatus, setOnboardingStatus] = useState();
37032
+ const fetchLegalEntity = useCallback(async () => getLegalEntity2(legalEntityId), [getLegalEntity2, legalEntityId]);
37033
+ const checkStatus = useCallback(async () => getOnboardingStatus2(), [getOnboardingStatus2]);
37034
+ const onNewValueReceived = useCallback(({
37035
+ status
37036
+ }) => {
37037
+ setOnboardingStatus(status);
37038
+ if (status === OnboardingStatus.VERIFIED) {
37039
+ fetchLegalEntity().then((newLegalEntity) => {
37040
+ setLegalEntity(newLegalEntity);
37041
+ setIsLoading(false);
37042
+ }).catch((e) => {
37043
+ console.log(e);
37044
+ });
37045
+ }
37046
+ }, [fetchLegalEntity]);
37047
+ usePolling({
37048
+ poller: checkStatus,
37049
+ pollingInterval: 3e3,
37050
+ onNewValueReceived,
37051
+ immediate: true
37052
+ });
37053
+ return jsx(EmbeddedStatus, {
37054
+ onClick,
37055
+ title: ((_b = (_a = legalEntity == null ? void 0 : legalEntity.individual) == null ? void 0 : _a.name) == null ? void 0 : _b.firstName) ?? "",
37056
+ subtitle: ((_c = legalEntity == null ? void 0 : legalEntity.individual) == null ? void 0 : _c.email) ?? "",
37057
+ status: onboardingStatus,
37058
+ loading: isLoading
37059
+ });
37060
+ }
37061
+ function ManageIndividualComponent({
37062
+ legalEntityId,
37063
+ onClick
37064
+ }) {
37065
+ return jsx(LegalEntityStatus, {
37066
+ legalEntityId,
37067
+ onClick
37068
+ });
37069
+ }
36472
37070
  const setDefaultCurrencies = (dataObject, country) => {
36473
37071
  const countryCurrencies = currencyByCountry[country] || [];
36474
37072
  if (dataObject.totalAssetsCurrency && dataObject.annualTurnoverCurrency) return;
@@ -38083,19 +38681,15 @@ function UpdateLegalEntityForHighExposure({
38083
38681
  })
38084
38682
  });
38085
38683
  }
38086
- var OnboardingUrlTarget = /* @__PURE__ */ ((OnboardingUrlTarget2) => {
38087
- OnboardingUrlTarget2["BLANK"] = "_blank";
38088
- OnboardingUrlTarget2["SELF"] = "_self";
38089
- return OnboardingUrlTarget2;
38090
- })(OnboardingUrlTarget || {});
38091
- var OnboardingStatus = /* @__PURE__ */ ((OnboardingStatus2) => {
38092
- OnboardingStatus2["AWAITING_DATA"] = "AWAITING_DATA";
38093
- OnboardingStatus2["IN_REVIEW"] = "IN_REVIEW";
38094
- OnboardingStatus2["UNSUCCESSFUL"] = "UNSUCCESSFUL";
38095
- OnboardingStatus2["REJECTED"] = "REJECTED";
38096
- OnboardingStatus2["VERIFIED"] = "VERIFIED";
38097
- return OnboardingStatus2;
38098
- })(OnboardingStatus || {});
38684
+ const coerceError = (err) => {
38685
+ if (err instanceof Error) return err;
38686
+ if (typeof err === "object") {
38687
+ if (err !== null && "message" in err && typeof err.message === "string") {
38688
+ return new Error(err.message);
38689
+ }
38690
+ }
38691
+ return new Error("Unknown error");
38692
+ };
38099
38693
  const contentMap = {
38100
38694
  [OnboardingStatus.AWAITING_DATA]: {
38101
38695
  description: ["onboardingRedirectAwaitingDescriptionP1"],
@@ -38119,20 +38713,18 @@ const contentMap = {
38119
38713
  function getContentByStatus(status) {
38120
38714
  return contentMap[status];
38121
38715
  }
38716
+ const FINAL_STATUSES = [OnboardingStatus.VERIFIED, OnboardingStatus.REJECTED];
38122
38717
  const logger$7 = createLogger("ViewVerificationStatusComponent");
38123
38718
  function ViewVerificationStatusComponent({
38124
38719
  legalEntityId,
38125
38720
  hideExplanation = false,
38126
38721
  returnUrl,
38127
- redirectTarget,
38722
+ redirectTarget = "_blank",
38128
38723
  themeId,
38129
38724
  onStatusChange,
38130
38725
  onError,
38131
38726
  onRedirect
38132
38727
  }) {
38133
- if (!legalEntityId) {
38134
- throw new Error("legalEntityId argument is required!");
38135
- }
38136
38728
  const {
38137
38729
  i18n
38138
38730
  } = useI18nContext();
@@ -38148,45 +38740,41 @@ function ViewVerificationStatusComponent({
38148
38740
  if (statusContent) return statusContent;
38149
38741
  logger$7.error(`there is no content for status "${onboardingStatus}"`);
38150
38742
  }, [onboardingStatus]);
38151
- const handleError = ({
38152
- trKey,
38153
- error
38154
- }) => {
38155
- if (trKey) {
38156
- setAlertContent(trKey);
38157
- }
38158
- if (error) {
38159
- logger$7.error(error);
38160
- }
38161
- if (typeof onError === "function") {
38162
- const userMessage = trKey ? i18n.get(trKey) : "";
38163
- onError({
38164
- error: error || {
38165
- message: userMessage
38166
- },
38167
- userMessage
38168
- });
38743
+ const handleError = useCallback((rawError, userMessage) => {
38744
+ const error = coerceError(rawError);
38745
+ logger$7.error(error);
38746
+ setAlertContent(userMessage);
38747
+ onError == null ? void 0 : onError({
38748
+ error,
38749
+ userMessage: i18n.get(userMessage)
38750
+ });
38751
+ }, [i18n, onError]);
38752
+ const fetchOnboardingStatus = useCallback(async () => {
38753
+ try {
38754
+ const {
38755
+ status
38756
+ } = await getOnboardingStatus2();
38757
+ return status;
38758
+ } catch (error) {
38759
+ handleError(error, "onboardingRedirectLinkError");
38760
+ return void 0;
38169
38761
  }
38170
- };
38762
+ }, [getOnboardingStatus2, handleError]);
38763
+ const updateOnboardingStatus = useCallback((newStatus) => {
38764
+ if (!newStatus) return;
38765
+ setOnboardingStatus(newStatus);
38766
+ if (newStatus !== onboardingStatus) onStatusChange == null ? void 0 : onStatusChange(newStatus);
38767
+ }, [onStatusChange]);
38768
+ usePolling({
38769
+ poller: fetchOnboardingStatus,
38770
+ pollingInterval: 1e4,
38771
+ onNewValueReceived: updateOnboardingStatus,
38772
+ skip: onboardingStatus && FINAL_STATUSES.includes(onboardingStatus)
38773
+ });
38171
38774
  useEffect(() => {
38172
- setAlertContent("");
38173
- (async () => {
38174
- try {
38175
- const {
38176
- status
38177
- } = await getOnboardingStatus2();
38178
- setOnboardingStatus(status);
38179
- if (typeof onStatusChange === "function") {
38180
- onStatusChange(status);
38181
- }
38182
- } catch (error) {
38183
- handleError({
38184
- trKey: "onboardingRedirectLinkError",
38185
- error
38186
- });
38187
- }
38188
- })().catch(logger$7.error);
38189
- }, [legalEntityId, getOnboardingStatus2]);
38775
+ setAlertContent(void 0);
38776
+ fetchOnboardingStatus().then(updateOnboardingStatus).catch(logger$7.error);
38777
+ }, [fetchOnboardingStatus, updateOnboardingStatus]);
38190
38778
  const [loadingLinkStatus, setLinkLoadingStatus] = useState("success");
38191
38779
  const redirectToAdyen = async () => {
38192
38780
  setLinkLoadingStatus("loading");
@@ -38200,41 +38788,30 @@ function ViewVerificationStatusComponent({
38200
38788
  redirectUrl
38201
38789
  } = await generateOnboardingLink2(config);
38202
38790
  if (!redirectUrl) {
38203
- handleError({
38204
- trKey: "onboardingRedirectLinkError"
38205
- });
38791
+ handleError(new Error("No redirectUrl returned"), "onboardingRedirectLinkError");
38206
38792
  return;
38207
38793
  }
38208
38794
  openUrl(redirectUrl, config);
38209
38795
  } catch (error) {
38210
- handleError({
38211
- trKey: "onboardingRedirectLinkError",
38212
- error
38213
- });
38796
+ handleError(error, "onboardingRedirectLinkError");
38214
38797
  } finally {
38215
38798
  setLinkLoadingStatus("success");
38216
38799
  }
38217
38800
  };
38218
38801
  const openUrl = (url, config) => {
38219
- const target = redirectTarget && Object.values(OnboardingUrlTarget).includes(redirectTarget) ? redirectTarget : OnboardingUrlTarget.BLANK;
38220
- const newTab = window.open("", target);
38221
- if (newTab) {
38222
- newTab.location.href = url;
38223
- if (typeof onRedirect === "function") {
38224
- onRedirect({
38225
- ...config,
38226
- onboardingLink: url
38227
- });
38228
- }
38229
- } else {
38230
- handleError({
38231
- trKey: "onboardingRedirectOpenError"
38232
- });
38802
+ const newTab = window.open(url, redirectTarget);
38803
+ if (!newTab) {
38804
+ handleError(new Error("Could not open redirect in new tab"), "onboardingRedirectOpenError");
38805
+ return;
38233
38806
  }
38807
+ onRedirect == null ? void 0 : onRedirect({
38808
+ ...config,
38809
+ onboardingLink: url
38810
+ });
38234
38811
  };
38235
38812
  const renderFooter = () => {
38236
38813
  const statusesWithoutActions = [OnboardingStatus.REJECTED, OnboardingStatus.VERIFIED];
38237
- if (statusesWithoutActions.includes(onboardingStatus) || !(content == null ? void 0 : content.ctaButton)) {
38814
+ if (onboardingStatus && statusesWithoutActions.includes(onboardingStatus) || !(content == null ? void 0 : content.ctaButton)) {
38238
38815
  return;
38239
38816
  }
38240
38817
  return jsx(Button, {
@@ -38285,6 +38862,7 @@ const componentsMap = {
38285
38862
  pci: PciDropinComponent,
38286
38863
  createTransferInstrumentComponent: CreateTransferInstrumentComponent,
38287
38864
  createIndividualComponent: CreateIndividualComponent,
38865
+ manageIndividualComponent: ManageIndividualComponent,
38288
38866
  viewVerificationStatusComponent: ViewVerificationStatusComponent,
38289
38867
  updateLegalEntityForHighExposureComponent: UpdateLegalEntityForHighExposure
38290
38868
  };
@@ -38386,28 +38964,6 @@ const useAnalytics = async ({
38386
38964
  userEvents.subscribe(onUserEvent);
38387
38965
  }
38388
38966
  };
38389
- let isDocumentGuidanceLoaded = false;
38390
- const getIconContainer = () => {
38391
- const container = document.createElement("div");
38392
- container.setAttribute("aria-hidden", "true");
38393
- container.setAttribute("id", "adyen-kyc-icon-container");
38394
- container.style.height = "0";
38395
- return container;
38396
- };
38397
- const buildSpriteDOMFromResponse = (responseData) => {
38398
- const iconContainer = getIconContainer();
38399
- iconContainer.innerHTML = responseData;
38400
- return iconContainer;
38401
- };
38402
- const loadDocumentGuidance = async (loadingContext) => {
38403
- if (isDocumentGuidanceLoaded) return;
38404
- isDocumentGuidanceLoaded = true;
38405
- const responseData = await http({
38406
- loadingContext,
38407
- path: "static/images/document-guidance.svg"
38408
- }, null, "text");
38409
- document.body.insertBefore(buildSpriteDOMFromResponse(responseData), document.body.firstChild);
38410
- };
38411
38967
  const logger$6 = createLogger("loadCountries");
38412
38968
  const countriesImports = /* @__PURE__ */ Object.assign({ "./de-DE.json": () => import("./de-DE-Cx8Uim1K.js"), "./el-GR.json": () => import("./el-GR-B7_JR3z5.js"), "./en-US.json": () => import("./en-US-CkdCbOCX.js"), "./es-ES.json": () => import("./es-ES-NBv3HHhn.js"), "./fr-FR.json": () => import("./fr-FR-DdSVMVsp.js"), "./it-IT.json": () => import("./it-IT-Bwdk3zuj.js"), "./ja-JP.json": () => import("./ja-JP-Bsvzm8zu.js"), "./nl-NL.json": () => import("./nl-NL-DofKaNkk.js"), "./pt-PT.json": () => import("./pt-PT-DFEvMD1M.js"), "./ru-RU.json": () => import("./ru-RU-PiM0ZI5h.js"), "./sv-SE.json": () => import("./sv-SE-C0GoLwTg.js"), "./zh-CN.json": () => import("./zh-CN-DJs6Hct-.js"), "./zh-TW.json": () => import("./zh-TW-BWhLbns8.js") });
38413
38969
  const loadCountriesDataset = async (locale) => {
@@ -38580,7 +39136,6 @@ const getEmbeddedApi = ({
38580
39136
  };
38581
39137
  },
38582
39138
  getDataset,
38583
- loadDocumentGuidance: async () => loadDocumentGuidance(base),
38584
39139
  getImageUrl: () => `${base}static/images/`,
38585
39140
  getAllowedCountries: async () => getSupportedCountries(baseRequestContext),
38586
39141
  getAllowedLocales: async () => getAllowedLocales$1(baseRequestContext),
@@ -38697,7 +39252,6 @@ const getKycExternalApi = ({
38697
39252
  clientKey
38698
39253
  }),
38699
39254
  getDataset,
38700
- loadDocumentGuidance: async () => loadDocumentGuidance(loadingContext),
38701
39255
  verifyIdNumber: async (request) => verifyIdNumber({
38702
39256
  loadingContext,
38703
39257
  clientKey
@@ -38725,7 +39279,7 @@ const ConfigurationApiProvider = ({
38725
39279
  isEmbeddedDropin,
38726
39280
  loadingContext
38727
39281
  } = authContext;
38728
- const sdkVersion = "2.50.4";
39282
+ const sdkVersion = "2.51.0";
38729
39283
  useAnalytics({
38730
39284
  onUserEvent,
38731
39285
  legalEntityId: rootLegalEntityId,
@@ -38768,6 +39322,7 @@ const CoreProvider = ({
38768
39322
  setAccountHolder
38769
39323
  } = useAccountHolder(rootLegalEntityId);
38770
39324
  const [accountFormat, setAccountFormat] = useState("local");
39325
+ const [isModalView, setIsModalView] = useState(false);
38771
39326
  const allowedCountries = useAllowedCountries();
38772
39327
  const isCountryAllowed = (allowedCountries == null ? void 0 : allowedCountries.includes(contextCountry)) ?? true;
38773
39328
  useEffect(() => {
@@ -38785,8 +39340,10 @@ const CoreProvider = ({
38785
39340
  setAccountHolder,
38786
39341
  accountHolder,
38787
39342
  setAccountFormat,
38788
- accountFormat
38789
- }), [contextCountry, accountHolder, accountFormat]);
39343
+ accountFormat,
39344
+ setIsModalView,
39345
+ isModalView
39346
+ }), [contextCountry, accountHolder, accountFormat, isModalView]);
38790
39347
  return jsx(CoreContext.Provider, {
38791
39348
  value: contextValue,
38792
39349
  children
@@ -39210,6 +39767,53 @@ function ToastContextProvider({
39210
39767
  }), children]
39211
39768
  });
39212
39769
  }
39770
+ const layoutBreakpointClassnames = {
39771
+ xsOnly: "adyen-layout-xs-only",
39772
+ md: "adyen-layout-md",
39773
+ lg: "adyen-layout-lg"
39774
+ };
39775
+ const layoutBreakpointSizes = {
39776
+ md: 680,
39777
+ lg: 1024
39778
+ };
39779
+ const getBreakpointClassNames = (containerSize) => {
39780
+ const breakPoints = Object.entries(layoutBreakpointSizes);
39781
+ const classes = breakPoints.reduce((acc, [bp, size]) => {
39782
+ if (size <= containerSize) acc.push(layoutBreakpointClassnames[bp]);
39783
+ return acc;
39784
+ }, []);
39785
+ return classes.length > 0 ? classes : ["adyen-layout-xs-only"];
39786
+ };
39787
+ function assignLayoutClasses(entries, container) {
39788
+ let newClasses = [];
39789
+ entries.forEach((entry) => {
39790
+ var _a;
39791
+ const parentWidth = (_a = entry.contentBoxSize) == null ? void 0 : _a[0].inlineSize;
39792
+ if (parentWidth) {
39793
+ newClasses = getBreakpointClassNames(parentWidth);
39794
+ } else {
39795
+ newClasses.push(layoutBreakpointClassnames.lg);
39796
+ }
39797
+ container.classList.remove(...Object.values(layoutBreakpointClassnames));
39798
+ container.classList.add(...newClasses);
39799
+ });
39800
+ }
39801
+ const AutoResizer = ({
39802
+ children
39803
+ }) => {
39804
+ const containerRef = useRef(null);
39805
+ useEffect(() => {
39806
+ const container = containerRef.current;
39807
+ if (!container) return;
39808
+ const resizeObserver = new ResizeObserver((entries) => assignLayoutClasses(entries, container));
39809
+ resizeObserver.observe(container);
39810
+ return () => resizeObserver.unobserve(container);
39811
+ });
39812
+ return jsx("div", {
39813
+ ref: containerRef,
39814
+ children
39815
+ });
39816
+ };
39213
39817
  class EventEmitter {
39214
39818
  constructor() {
39215
39819
  this.listeners = {
@@ -39353,7 +39957,7 @@ const DebugModal = ({
39353
39957
  };
39354
39958
  const copyToClipboard = async () => {
39355
39959
  const toCopy = {
39356
- sdkVersion: "2.50.4",
39960
+ sdkVersion: "2.51.0",
39357
39961
  experiments: Object.fromEntries(allExperimentsWithValues),
39358
39962
  settings: Object.fromEntries(allSettingsWithValues)
39359
39963
  };
@@ -39366,7 +39970,7 @@ const DebugModal = ({
39366
39970
  setDebugInfoCopied(false);
39367
39971
  }, 5e3);
39368
39972
  };
39369
- return jsx(Modal, {
39973
+ return jsx(Modal$1, {
39370
39974
  size: "large",
39371
39975
  header: jsxs(Fragment, {
39372
39976
  children: ["Debug ", jsx(Button, {
@@ -39383,7 +39987,7 @@ const DebugModal = ({
39383
39987
  children: [jsxs("div", {
39384
39988
  className: "adyen-kyc-debug-modal__meta",
39385
39989
  children: [jsxs("span", {
39386
- children: ["SDK version: ", "2.50.4"]
39990
+ children: ["SDK version: ", "2.51.0"]
39387
39991
  }), jsxs("span", {
39388
39992
  children: ["rootLegalEntityId: ", rootLegalEntityId]
39389
39993
  })]
@@ -40292,6 +40896,11 @@ const createIndividualComponentSchema = {
40292
40896
  type: "function"
40293
40897
  }
40294
40898
  };
40899
+ const manageIndividualComponentSchema = {
40900
+ legalEntityId: {
40901
+ type: "string"
40902
+ }
40903
+ };
40295
40904
  const viewVerificationStatusComponentSchema = {
40296
40905
  legalEntityId: {
40297
40906
  type: "string",
@@ -40301,7 +40910,8 @@ const viewVerificationStatusComponentSchema = {
40301
40910
  type: "boolean"
40302
40911
  },
40303
40912
  redirectTarget: {
40304
- type: "string"
40913
+ type: "string",
40914
+ exactValue: ["_self", "_blank"]
40305
40915
  },
40306
40916
  themeId: {
40307
40917
  type: "string"
@@ -40339,6 +40949,7 @@ const componentsSchemaMap = {
40339
40949
  trustDropin: trustDropinSchema,
40340
40950
  taskList: taskListSchema,
40341
40951
  createIndividualComponent: createIndividualComponentSchema,
40952
+ manageIndividualComponent: manageIndividualComponentSchema,
40342
40953
  createTransferInstrumentComponent: createTransferInstrumentComponentSchema,
40343
40954
  viewVerificationStatusComponent: viewVerificationStatusComponentSchema,
40344
40955
  updateLegalEntityForHighExposureComponent: updateLegalEntityForHighExposureComponentSchema