@adyen/kyc-components 2.59.1 → 2.59.3

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.
@@ -2917,27 +2917,6 @@ function useResetGlobalData(caller) {
2917
2917
  [dispatch, caller]
2918
2918
  );
2919
2919
  }
2920
- const useSetting = (settingName) => {
2921
- const context = useContext(SettingsContext);
2922
- if (context === void 0) {
2923
- throw new Error("useSetting must be used within a SettingsProvider");
2924
- }
2925
- const { getSetting } = context;
2926
- return getSetting(settingName);
2927
- };
2928
- const logger$B = createLogger("useAllowedCountries");
2929
- const useAllowedCountries = () => {
2930
- const acceptedCountries = useSetting("acceptedCountries");
2931
- const { getAllowedCountries: getAllowedCountries2 } = useConfigurationApi();
2932
- const [allowedCountries, setAllowedCountries] = useState(
2933
- acceptedCountries
2934
- );
2935
- useEffect(() => {
2936
- if (acceptedCountries !== void 0) return;
2937
- getAllowedCountries2().then((response) => setAllowedCountries(response.countries)).catch(logger$B.error);
2938
- }, [acceptedCountries]);
2939
- return allowedCountries;
2940
- };
2941
2920
  class ValidationResult {
2942
2921
  constructor(results) {
2943
2922
  this.validationResults = results;
@@ -2955,7 +2934,7 @@ class ValidationResult {
2955
2934
  return this.validationResults.find((result) => result.hasError);
2956
2935
  }
2957
2936
  }
2958
- const logger$A = createLogger("useAsyncValidator");
2937
+ const logger$B = createLogger("useAsyncValidator");
2959
2938
  const useAsyncValidator = (asyncRules) => {
2960
2939
  const [asyncValidationResults, setAsyncValidationResults] = useState({});
2961
2940
  const clearAsyncValidationResults = useCallback(() => setAsyncValidationResults({}), []);
@@ -2975,7 +2954,7 @@ const useAsyncValidator = (asyncRules) => {
2975
2954
  }
2976
2955
  ])
2977
2956
  });
2978
- }).catch(logger$A.error);
2957
+ }).catch(logger$B.error);
2979
2958
  },
2980
2959
  [asyncRules, clearAsyncValidationResults]
2981
2960
  );
@@ -5062,7 +5041,7 @@ const companyNameAndCountryFields = [
5062
5041
  function CompanyNameAndCountry(props) {
5063
5042
  const { i18n } = useI18nContext();
5064
5043
  const { isSettingEnabled } = useSettingsContext();
5065
- const allowedCountries = useAllowedCountries();
5044
+ const { allowedCountries } = useCoreContext();
5066
5045
  const { isExperimentEnabled } = useExperimentsContext();
5067
5046
  const isStrictNameAndAddressValidationEnabled = isExperimentEnabled(
5068
5047
  ExperimentNames.StrictNameAndAddressValidationV4
@@ -7306,7 +7285,7 @@ const deriveInputState = (isValid, isFocused, isDisabled, isOptional, hasNullish
7306
7285
  };
7307
7286
  };
7308
7287
  const MISMATCH_ANIMATION_NAME = "mismatchShake";
7309
- const logger$z = createLogger("MaskedInputText");
7288
+ const logger$A = createLogger("MaskedInputText");
7310
7289
  const MaskedInputText = ({
7311
7290
  value,
7312
7291
  onInput,
@@ -7351,7 +7330,7 @@ const MaskedInputText = ({
7351
7330
  };
7352
7331
  useEffect(() => {
7353
7332
  if (!mask) {
7354
- logger$z.warn("`mask` is undefined. No masking of input will take place.");
7333
+ logger$A.warn("`mask` is undefined. No masking of input will take place.");
7355
7334
  }
7356
7335
  }, [mask]);
7357
7336
  const getMaskResult = useCallback(
@@ -7395,7 +7374,7 @@ const MaskedInputText = ({
7395
7374
  return;
7396
7375
  }
7397
7376
  if (preserveMismatchingInitialValue) {
7398
- logger$z.warn(
7377
+ logger$A.warn(
7399
7378
  `Value received "${value}" does not match mask`,
7400
7379
  maskResult,
7401
7380
  `
@@ -7405,7 +7384,7 @@ Preserving mismatched initial value until user input.`
7405
7384
  return;
7406
7385
  }
7407
7386
  const fallback = displayValueToPure(maskResult.partialDisplayValue);
7408
- logger$z.warn(
7387
+ logger$A.warn(
7409
7388
  `Value received "${value}" does not match mask`,
7410
7389
  maskResult,
7411
7390
  `
@@ -11042,7 +11021,7 @@ function Dropzone(props) {
11042
11021
  isRequired && /* @__PURE__ */ jsx("div", { className: "adyen-kyc-error-text", children: i18n.get("fieldIsRequired") })
11043
11022
  ] });
11044
11023
  }
11045
- const logger$y = createLogger("TextArea");
11024
+ const logger$z = createLogger("TextArea");
11046
11025
  function TextArea(props) {
11047
11026
  const { classNameModifiers, uniqueId, ...passedProps } = props;
11048
11027
  const {
@@ -11057,7 +11036,7 @@ function TextArea(props) {
11057
11036
  const { i18n } = useI18nContext();
11058
11037
  const [value, setValue] = useState("");
11059
11038
  if (Object.prototype.hasOwnProperty.call(props, "onChange")) {
11060
- logger$y.error("Error: Form fields that rely on InputBase may not have an onChange property");
11039
+ logger$z.error("Error: Form fields that rely on InputBase may not have an onChange property");
11061
11040
  }
11062
11041
  const handleInput = (e) => {
11063
11042
  var _a;
@@ -11476,7 +11455,7 @@ const styles$6 = {
11476
11455
  "financial-information-reported-value-options": "adyen-kyc-financial-information-reported-value-options",
11477
11456
  financialInformationReportedValueOptions
11478
11457
  };
11479
- const logger$x = createLogger("InputCurrency");
11458
+ const logger$y = createLogger("InputCurrency");
11480
11459
  const determineDecimalSeparator = (formatter) => formatter.formatToParts(0.1).find((part) => part.type === "decimal").value;
11481
11460
  const determineCurrencySymbol = (formatter) => formatter.formatToParts(0).find((part) => part.type === "currency").value;
11482
11461
  const getNumberFromFormattedCurrency = (formatted, decimalSeparator) => {
@@ -11507,7 +11486,7 @@ const InputCurrency = ({
11507
11486
  const rawValue = e.target.value;
11508
11487
  const value = getNumberFromFormattedCurrency(rawValue, decimalSeparator);
11509
11488
  if (Number.isNaN(value)) {
11510
- logger$x.warn(`Unable to get number from formatted currency: "${rawValue}"`);
11489
+ logger$y.warn(`Unable to get number from formatted currency: "${rawValue}"`);
11511
11490
  setText(isUndefinedOrNull(amount) ? currencySymbol : formatter.format(amount));
11512
11491
  return;
11513
11492
  }
@@ -11972,7 +11951,7 @@ function FieldContainer(props) {
11972
11951
  }
11973
11952
  return renderField(fieldName);
11974
11953
  }
11975
- const logger$w = createLogger("SearchAddress");
11954
+ const logger$x = createLogger("SearchAddress");
11976
11955
  const SearchAddress = ({
11977
11956
  data,
11978
11957
  legalEntityId,
@@ -12005,7 +11984,7 @@ const SearchAddress = ({
12005
11984
  const response = await handleFindAddress(selectedAddressId);
12006
11985
  autocompleteAddressForm(response);
12007
11986
  } catch (e) {
12008
- logger$w.error(e);
11987
+ logger$x.error(e);
12009
11988
  }
12010
11989
  };
12011
11990
  const onDrilldown = async (selectedAddress) => {
@@ -12016,7 +11995,7 @@ const SearchAddress = ({
12016
11995
  );
12017
11996
  setItems((response == null ? void 0 : response.results) || []);
12018
11997
  } catch (e) {
12019
- logger$w.error(e);
11998
+ logger$x.error(e);
12020
11999
  }
12021
12000
  };
12022
12001
  const onChange = (e) => {
@@ -12068,7 +12047,7 @@ const SearchAddress = ({
12068
12047
  setItems([]);
12069
12048
  }
12070
12049
  } catch (e) {
12071
- logger$w.error(e);
12050
+ logger$x.error(e);
12072
12051
  }
12073
12052
  setLoading(false);
12074
12053
  }
@@ -12711,7 +12690,7 @@ Address.defaultProps = {
12711
12690
  requiredFields: ADDRESS_SCHEMA,
12712
12691
  countryCode: null
12713
12692
  };
12714
- const logger$v = createLogger("AddressFieldContainer");
12693
+ const logger$w = createLogger("AddressFieldContainer");
12715
12694
  const formatAddressItem = (item) => {
12716
12695
  if (item.description.includes("Addresses")) {
12717
12696
  const splittedDescription = item.description.split(" - ");
@@ -12849,7 +12828,7 @@ function FieldContainerComponent({
12849
12828
  setItems([]);
12850
12829
  }
12851
12830
  } catch (e) {
12852
- logger$v.error(e);
12831
+ logger$w.error(e);
12853
12832
  }
12854
12833
  setLoading(false);
12855
12834
  };
@@ -12883,7 +12862,7 @@ function FieldContainerComponent({
12883
12862
  });
12884
12863
  }
12885
12864
  } catch (e) {
12886
- logger$v.error(e);
12865
+ logger$w.error(e);
12887
12866
  }
12888
12867
  };
12889
12868
  const onDrilldown = async (address) => {
@@ -12895,7 +12874,7 @@ function FieldContainerComponent({
12895
12874
  ));
12896
12875
  setItems((response == null ? void 0 : response.results) || []);
12897
12876
  } catch (e) {
12898
- logger$v.error(e);
12877
+ logger$w.error(e);
12899
12878
  }
12900
12879
  };
12901
12880
  const handleOnChange = (e) => {
@@ -15366,7 +15345,7 @@ const initOnfido = async ({
15366
15345
  language: getOnfidoLocaleConfig(i18n)
15367
15346
  });
15368
15347
  };
15369
- const logger$u = createLogger("IdVerificationComponent");
15348
+ const logger$v = createLogger("IdVerificationComponent");
15370
15349
  function IdVerificationComponent({
15371
15350
  userDetails,
15372
15351
  legalEntityId,
@@ -15393,7 +15372,7 @@ function IdVerificationComponent({
15393
15372
  onIdVerificationError,
15394
15373
  onIdVerificationComplete
15395
15374
  });
15396
- })().catch(logger$u.error);
15375
+ })().catch(logger$v.error);
15397
15376
  return () => {
15398
15377
  if (onfidoSdk.current) onfidoSdk.current.tearDown();
15399
15378
  };
@@ -15437,7 +15416,7 @@ function IdDocumentAlreadyUpload(props) {
15437
15416
  ] })
15438
15417
  ] });
15439
15418
  }
15440
- const logger$t = createLogger("IdDocumentInstantVerificationComponent");
15419
+ const logger$u = createLogger("IdDocumentInstantVerificationComponent");
15441
15420
  const idVerificationSchema = [
15442
15421
  "instantIdVerificationData",
15443
15422
  "idDocumentType"
@@ -15509,7 +15488,7 @@ function IdDocumentInstantVerificationComponent(props) {
15509
15488
  userDetails: props.userDetails,
15510
15489
  legalEntityId: props.legalEntityId,
15511
15490
  onIdVerificationComplete: handleIdVerificationComplete,
15512
- onIdVerificationError: logger$t.error
15491
+ onIdVerificationError: logger$u.error
15513
15492
  }
15514
15493
  ),
15515
15494
  /* @__PURE__ */ jsxs("div", { className: "adyen-kyc-document-upload__manual-upload", children: [
@@ -15929,7 +15908,7 @@ const phoneFormatters = {
15929
15908
  };
15930
15909
  const phoneFields = ["phoneNumber"];
15931
15910
  const DEFAULT_PHONE_PREFIX = "+1";
15932
- const logger$s = createLogger("PhoneInput");
15911
+ const logger$t = createLogger("PhoneInput");
15933
15912
  const usePhonePrefixes = () => {
15934
15913
  const [phonePrefixes, setPhonePrefixes] = useState();
15935
15914
  useEffect(() => {
@@ -15937,7 +15916,7 @@ const usePhonePrefixes = () => {
15937
15916
  const loaded = (await import("./phonePrefixes-zV4hciyK.js")).default;
15938
15917
  setPhonePrefixes(loaded);
15939
15918
  };
15940
- loadPhonePrefixes().catch(logger$s.error);
15919
+ loadPhonePrefixes().catch(logger$t.error);
15941
15920
  }, []);
15942
15921
  return phonePrefixes;
15943
15922
  };
@@ -17974,7 +17953,7 @@ function PersonalDetailsComponent(props) {
17974
17953
  var _a, _b, _c, _d;
17975
17954
  const { i18n } = useI18nContext();
17976
17955
  const { isSettingEnabled } = useSettingsContext();
17977
- const allowedCountries = useAllowedCountries();
17956
+ const { allowedCountries } = useCoreContext();
17978
17957
  const canChangeEntityType = isSettingEnabled(SettingNames.AllowLegalEntityTypeChange);
17979
17958
  const { isExperimentEnabled } = useExperimentsContext();
17980
17959
  const isAgeVerificationEnabled = isExperimentEnabled("EnableAgeVerification");
@@ -19404,7 +19383,7 @@ class AdyenKycSdkError extends Error {
19404
19383
  }
19405
19384
  let sdkToken;
19406
19385
  let fetchSdkToken;
19407
- const logger$r = createLogger("Session");
19386
+ const logger$s = createLogger("Session");
19408
19387
  const setSdkToken = (token) => {
19409
19388
  sdkToken = token;
19410
19389
  };
@@ -19429,7 +19408,7 @@ const refreshSession = async () => {
19429
19408
  setSdkToken(token);
19430
19409
  isSessionRefreshed = true;
19431
19410
  } catch (e) {
19432
- logger$r.error("Failed to fetch sdk token", e);
19411
+ logger$s.error("Failed to fetch sdk token", e);
19433
19412
  }
19434
19413
  return isSessionRefreshed;
19435
19414
  };
@@ -19439,7 +19418,7 @@ const addAnimationStartListener = (element, listener) => {
19439
19418
  const removeAnimationStartListener = (element, listener) => {
19440
19419
  element.removeEventListener("animationstart", listener, false);
19441
19420
  };
19442
- const logger$q = createLogger("Fetch");
19421
+ const logger$r = createLogger("Fetch");
19443
19422
  const getRequestObject = (options, data) => {
19444
19423
  const { headers = [], method = "GET", authentication } = options;
19445
19424
  let authHeaders;
@@ -19480,10 +19459,10 @@ const logFetchError = (message, level) => {
19480
19459
  case "info":
19481
19460
  case "warn":
19482
19461
  case "error":
19483
- logger$q[level](message);
19462
+ logger$r[level](message);
19484
19463
  break;
19485
19464
  default:
19486
- logger$q.error(message);
19465
+ logger$r.error(message);
19487
19466
  }
19488
19467
  };
19489
19468
  const handleFetchResponse = async (response, responseType) => {
@@ -19563,7 +19542,7 @@ const RELEVANT_MESSAGE_TYPES = ["account_verification_report_id", "error"];
19563
19542
  const TERMINAL_DATA_PROPS = ["accounts", "error", "reference"];
19564
19543
  const MOUNT_TIMEOUT = 10 * 1e3;
19565
19544
  const TINK_VENDOR = "Tink";
19566
- const logger$p = createLogger("iframeWidget");
19545
+ const logger$q = createLogger("iframeWidget");
19567
19546
  const isObjectData = (data) => typeof data === "object" && !Array.isArray(data) && data !== null;
19568
19547
  const isTerminalMessageData = (data) => isObjectData(data) && Object.entries(data).some(([prop]) => TERMINAL_DATA_PROPS.includes(prop));
19569
19548
  const parseMessageJson = (message) => {
@@ -19581,7 +19560,7 @@ const callbackErrorHandler = async (response) => {
19581
19560
  try {
19582
19561
  await response;
19583
19562
  } catch (ex) {
19584
- logger$p.error(ex);
19563
+ logger$q.error(ex);
19585
19564
  }
19586
19565
  return {
19587
19566
  error: "UNKNOWN_ERROR",
@@ -19677,7 +19656,7 @@ class IFrameWidget {
19677
19656
  message = responseData.errorMessage;
19678
19657
  }
19679
19658
  } catch (ex) {
19680
- logger$p.error(ex);
19659
+ logger$q.error(ex);
19681
19660
  }
19682
19661
  throw new AdyenKycSdkError(reason, jsonData.error);
19683
19662
  }
@@ -21186,7 +21165,6 @@ const PayoutAccount = memo(
21186
21165
  PayoutAccountComponent,
21187
21166
  (prevProps, nextProps) => objectsDeepEqual(prevProps.requiredFields, nextProps.requiredFields) && objectsDeepEqual(prevProps.optionalFields, nextProps.optionalFields) && objectsDeepEqual(prevProps.data, nextProps.data) && objectsDeepEqual(prevProps.formVerificationErrors, nextProps.formVerificationErrors) && objectsDeepEqual(prevProps.fieldValidationErrors, nextProps.fieldValidationErrors) && prevProps.country === nextProps.country && prevProps.shouldValidate === nextProps.shouldValidate
21188
21167
  );
21189
- const toCapitalized = (s) => `${s[0].toUpperCase()}${s.slice(1).toLowerCase()}`;
21190
21168
  const eeaCountries = [
21191
21169
  CountryCodes.Austria,
21192
21170
  CountryCodes.Belgium,
@@ -21230,27 +21208,37 @@ const regions = {
21230
21208
  const getAllowedBankCountries = (country) => Object.values(regions).find((countriesInARegion) => countriesInARegion.includes(country)) ?? [
21231
21209
  country
21232
21210
  ];
21233
- const makePayoutVerificationMethodsMetadata = (instantVerificationProvider) => {
21234
- const providerName = instantVerificationProvider == null ? void 0 : instantVerificationProvider.toLowerCase();
21235
- return {
21236
- instantVerification: {
21237
- name: "verifyViaMobileBankingAppOrWebsite",
21238
- subtitle: "instant",
21239
- description: "instantVerificationDescription",
21240
- svgName: "payout-verification-instant",
21241
- provider: providerName ? {
21242
- name: providerName,
21243
- svgName: `${providerName}-logo`
21244
- } : void 0
21245
- },
21246
- manualVerification: {
21247
- name: "uploadABankStatement",
21248
- subtitle: "mayTakeAFewDays",
21249
- description: "manualVerificationDescription",
21250
- svgName: "payout-verification-manual"
21251
- }
21252
- };
21211
+ const getProviderName = (providerName) => providerName === "PayWithMyBank" ? "Trustly" : providerName;
21212
+ const getProviderIconName = (providerName) => {
21213
+ switch (providerName == null ? void 0 : providerName.toLowerCase()) {
21214
+ case "tink":
21215
+ return "tink-logo";
21216
+ case "paywithmybank":
21217
+ return "trustly-logo";
21218
+ case "plaid":
21219
+ return "plaid-logo";
21220
+ default:
21221
+ return void 0;
21222
+ }
21253
21223
  };
21224
+ const makePayoutVerificationMethodsMetadata = (instantVerificationProviderName) => ({
21225
+ instantVerification: {
21226
+ name: "verifyViaMobileBankingAppOrWebsite",
21227
+ subtitle: "instant",
21228
+ description: "instantVerificationDescription",
21229
+ svgName: "payout-verification-instant",
21230
+ provider: instantVerificationProviderName ? {
21231
+ name: instantVerificationProviderName,
21232
+ svgName: getProviderIconName(instantVerificationProviderName)
21233
+ } : void 0
21234
+ },
21235
+ manualVerification: {
21236
+ name: "uploadABankStatement",
21237
+ subtitle: "mayTakeAFewDays",
21238
+ description: "manualVerificationDescription",
21239
+ svgName: "payout-verification-manual"
21240
+ }
21241
+ });
21254
21242
  const payoutVerificationMethods = ["instantVerification", "manualVerification"];
21255
21243
  function Card({
21256
21244
  className,
@@ -21335,48 +21323,7 @@ const Skeleton = ({
21335
21323
  });
21336
21324
  return /* @__PURE__ */ jsx("div", { className: classNames, style: { height, width } });
21337
21325
  };
21338
- const isInstantVerificationAvailable = ({
21339
- verificationVendorsCallback,
21340
- provider
21341
- }) => Boolean(verificationVendorsCallback && (provider == null ? void 0 : provider.redirectUrl));
21342
21326
  const isProviderPlaidEmbedded = (redirectUrl) => !!(redirectUrl == null ? void 0 : redirectUrl.includes("/plaid/embedded-search/sdk?"));
21343
- const rules$2 = ({ data, requiredFields }) => ({
21344
- whenUsingManualVerification: () => {
21345
- var _a;
21346
- if (!data.payoutVerificationMethod) return;
21347
- if (((_a = data == null ? void 0 : data.payoutVerificationMethod) == null ? void 0 : _a.payoutVerificationMethod) === "manualVerification") {
21348
- return "REQUIRED";
21349
- }
21350
- },
21351
- whenUsingInstantVerification: () => {
21352
- var _a;
21353
- if (!data.payoutVerificationMethod) {
21354
- return "REQUIRED";
21355
- }
21356
- if (((_a = data == null ? void 0 : data.payoutVerificationMethod) == null ? void 0 : _a.payoutVerificationMethod) === "instantVerification") {
21357
- return "REQUIRED";
21358
- }
21359
- },
21360
- verifiedBankAccountNumber: () => {
21361
- var _a;
21362
- if (((_a = data == null ? void 0 : data.payoutVerificationMethod) == null ? void 0 : _a.payoutVerificationMethod) === "instantVerification") {
21363
- return "REQUIRED";
21364
- }
21365
- },
21366
- bankStatementRequirement: () => {
21367
- var _a;
21368
- if (((_a = data == null ? void 0 : data.payoutVerificationMethod) == null ? void 0 : _a.payoutVerificationMethod) === "manualVerification") {
21369
- return requiredFields == null ? void 0 : requiredFields.bankStatementRequirement;
21370
- }
21371
- },
21372
- // "bankStatement description" field is always "optional" and it's coupled with bank statement document.
21373
- bankStatementDescription: () => {
21374
- var _a;
21375
- if (((_a = data == null ? void 0 : data.payoutVerificationMethod) == null ? void 0 : _a.payoutVerificationMethod) === "manualVerification" && !!(requiredFields == null ? void 0 : requiredFields.bankStatementRequirement)) {
21376
- return "OPTIONAL";
21377
- }
21378
- }
21379
- });
21380
21327
  const preferInstantVerificationMethod = "adyen-kyc-prefer-instant-verification-method";
21381
21328
  const preferInstantVerificationMethodCard = "adyen-kyc-prefer-instant-verification-method-card";
21382
21329
  const preferInstantVerificationMethodImage = "adyen-kyc-prefer-instant-verification-method-image";
@@ -21397,18 +21344,6 @@ const styles$2 = {
21397
21344
  "prefer-instant-verification-method-manual-button-darker": "adyen-kyc-prefer-instant-verification-method-manual-button-darker",
21398
21345
  preferInstantVerificationMethodManualButtonDarker
21399
21346
  };
21400
- const getProviderIconName = (providerName) => {
21401
- switch (providerName) {
21402
- case "tink":
21403
- return "tink-logo";
21404
- case "trustly":
21405
- return "trustly-logo";
21406
- case "plaid":
21407
- return "plaid-logo";
21408
- default:
21409
- return void 0;
21410
- }
21411
- };
21412
21347
  const PreferInstantVerificationMethod = ({
21413
21348
  loadingStatus,
21414
21349
  provider,
@@ -21423,9 +21358,8 @@ const PreferInstantVerificationMethod = ({
21423
21358
  handleChangeFor,
21424
21359
  triggerValidation
21425
21360
  }) => {
21426
- var _a;
21427
21361
  const { i18n } = useI18nContext();
21428
- const iconName = getProviderIconName((_a = provider == null ? void 0 : provider.name) == null ? void 0 : _a.toLocaleLowerCase());
21362
+ const iconName = getProviderIconName(provider == null ? void 0 : provider.name);
21429
21363
  const showVerificationWidget = isProviderPlaidEmbedded(provider == null ? void 0 : provider.redirectUrl);
21430
21364
  const [verificationComplete, setVerificationComplete] = useState(false);
21431
21365
  const retrieveBankAccountInfo = async ({
@@ -21510,14 +21444,14 @@ const PayoutVerificationMethodOptionFooter = ({
21510
21444
  const { provider } = methodsMetadata[method];
21511
21445
  return provider ? /* @__PURE__ */ jsxs(Typography, { variant: "caption", className: "adyen-kyc-field-verification-methods__footer", children: [
21512
21446
  i18n.get("poweredBy"),
21513
- /* @__PURE__ */ jsx(
21447
+ provider.svgName ? /* @__PURE__ */ jsx(
21514
21448
  Icon,
21515
21449
  {
21516
21450
  className: "adyen-kyc-field-verification-methods__logo",
21517
21451
  name: provider.svgName,
21518
21452
  alt: provider.name
21519
21453
  }
21520
- )
21454
+ ) : provider.name
21521
21455
  ] }) : null;
21522
21456
  };
21523
21457
  const payoutVerificationMethodFields = ["payoutVerificationMethod", "bankCountry", ...accountVerificationFields];
@@ -21543,7 +21477,7 @@ function PayoutVerificationMethod(props) {
21543
21477
  accountHolder,
21544
21478
  provider,
21545
21479
  bankVendorsLoadingStatus,
21546
- instantVerificationAllowed,
21480
+ instantVerificationAvailable,
21547
21481
  legalEntityResponse,
21548
21482
  forms,
21549
21483
  validators: validators2,
@@ -21570,6 +21504,7 @@ function PayoutVerificationMethod(props) {
21570
21504
  SettingNames.AllowIntraRegionCrossBorderPayout
21571
21505
  );
21572
21506
  const [hasSelectedMethod, setHasSelectedMethod] = useState(false);
21507
+ const providerName = getProviderName(provider == null ? void 0 : provider.name);
21573
21508
  const { handleChangeFor, data, valid, errors, fieldProblems, triggerValidation } = useForm({
21574
21509
  ...props,
21575
21510
  schema: payoutVerificationMethodFields,
@@ -21590,14 +21525,8 @@ function PayoutVerificationMethod(props) {
21590
21525
  );
21591
21526
  useEffect(() => {
21592
21527
  if (!enablePreferInstantVerificationMethodFlow) return;
21593
- setHideFooter == null ? void 0 : setHideFooter(
21594
- enablePreferInstantVerificationMethodFlow && isActiveForm && !bankInfoValidated
21595
- );
21528
+ setHideFooter == null ? void 0 : setHideFooter(isActiveForm && !bankInfoValidated);
21596
21529
  }, [enablePreferInstantVerificationMethodFlow, isActiveForm, bankInfoValidated, setHideFooter]);
21597
- const instantVerificationAvailable = useMemo(
21598
- () => Boolean(instantVerificationAllowed && (provider == null ? void 0 : provider.redirectUrl)),
21599
- [instantVerificationAllowed, provider]
21600
- );
21601
21530
  const methodsMetadata = makePayoutVerificationMethodsMetadata(provider == null ? void 0 : provider.name);
21602
21531
  const selectVerificationMethod = (method) => {
21603
21532
  setHasSelectedMethod(true);
@@ -21763,18 +21692,18 @@ function PayoutVerificationMethod(props) {
21763
21692
  id: "ariaErrorField"
21764
21693
  }
21765
21694
  ),
21766
- !enablePreferInstantVerificationMethodFlow && (provider == null ? void 0 : provider.name) && bankVendorsLoadingStatus === "success" ? /* @__PURE__ */ jsx(
21695
+ !enablePreferInstantVerificationMethodFlow && providerName && bankVendorsLoadingStatus === "success" ? /* @__PURE__ */ jsx(
21767
21696
  ContextGuidance,
21768
21697
  {
21769
21698
  page: "Instant verification with partner",
21770
21699
  titleId: "howDoesVerificationWithOurPartnerWorks",
21771
21700
  contentId: "bankVerificationWithPartnerSteps",
21772
21701
  title: i18n.get("howDoesVerificationWithOurPartnerWorks", {
21773
- values: { provider: toCapitalized(provider.name) }
21702
+ values: { provider: providerName }
21774
21703
  }),
21775
21704
  content: /* @__PURE__ */ jsxs(Fragment, { children: [
21776
21705
  /* @__PURE__ */ jsx(Typography, { children: i18n.get("isOurTrustedPartnerHelpingSpeedUpSetup", {
21777
- values: { provider: toCapitalized(provider.name) }
21706
+ values: { provider: providerName }
21778
21707
  }) }),
21779
21708
  /* @__PURE__ */ jsxs(List, { children: [
21780
21709
  /* @__PURE__ */ jsx(ListItem, { children: i18n.get("selectTheBankToReceivePayouts") }),
@@ -21824,8 +21753,7 @@ function PayoutDetailsComponent(props) {
21824
21753
  associatedLegalArrangement,
21825
21754
  provider,
21826
21755
  bankVendorsLoadingStatus,
21827
- instantVerificationEnabled,
21828
- handleGetBankVerificationVendors,
21756
+ instantVerificationAvailable,
21829
21757
  setHideDropinLayout,
21830
21758
  setHideOnHomeButton,
21831
21759
  setSkipSubmit,
@@ -21885,9 +21813,7 @@ function PayoutDetailsComponent(props) {
21885
21813
  bankInfoValidated,
21886
21814
  setBankInfoValidated,
21887
21815
  handleNextClick,
21888
- instantVerificationAllowed: Boolean(
21889
- instantVerificationEnabled && handleGetBankVerificationVendors
21890
- ),
21816
+ instantVerificationAvailable,
21891
21817
  createTrustedTransferInstrument: createTrustedTransferInstrument2,
21892
21818
  handleBankVerificationError: handleBankVerificationError2,
21893
21819
  setBankVerificationError: setInstantVerificationError,
@@ -23990,13 +23916,13 @@ const useUnifyLoadingStatus = (setParentLoadingStatus, ...childLoadingStatuses)
23990
23916
  setParentLoadingStatus(loadingStatus);
23991
23917
  }, [...childLoadingStatuses]);
23992
23918
  };
23993
- const logger$o = createLogger("useScenarioConfiguration");
23919
+ const logger$p = createLogger("useScenarioConfiguration");
23994
23920
  const useScenarioConfiguration = ({
23995
23921
  getConfigurationData,
23996
23922
  getPayoutAccountFormatData,
23997
23923
  parseConfiguration: parseConfiguration2,
23998
23924
  country,
23999
- instantVerificationEnabled,
23925
+ instantVerificationAvailable,
24000
23926
  setLoadingStatus,
24001
23927
  existingBankAccountFormat
24002
23928
  }) => {
@@ -24013,12 +23939,12 @@ const useScenarioConfiguration = ({
24013
23939
  const response = await getConfigurationData();
24014
23940
  setConfigurationResponse(response);
24015
23941
  } catch (err) {
24016
- logger$o.warn("WARNING: Configuration request failed - error:", err);
23942
+ logger$p.warn("WARNING: Configuration request failed - error:", err);
24017
23943
  } finally {
24018
23944
  setConfigurationLoadingStatus("success");
24019
23945
  }
24020
23946
  };
24021
- makeConfigCallAndSave().catch(logger$o.error);
23947
+ makeConfigCallAndSave().catch(logger$p.error);
24022
23948
  }, [getConfigurationData, setConfigurationLoadingStatus]);
24023
23949
  useEffect(() => {
24024
23950
  if (!getPayoutAccountFormatData) return;
@@ -24037,12 +23963,12 @@ const useScenarioConfiguration = ({
24037
23963
  const defaultAccountFormat = defaultPayoutAccountFormat[country] ?? allowedBankAccountFormats[0];
24038
23964
  setAccountFormat(existingBankAccountFormat ?? defaultAccountFormat);
24039
23965
  } catch (err) {
24040
- logger$o.warn("WARNING: Payout format request failed - error:", err);
23966
+ logger$p.warn("WARNING: Payout format request failed - error:", err);
24041
23967
  } finally {
24042
23968
  setpayoutFormatLoadingStatus("success");
24043
23969
  }
24044
23970
  };
24045
- makePayoutFormatCallAndSave().catch(logger$o.error);
23971
+ makePayoutFormatCallAndSave().catch(logger$p.error);
24046
23972
  }, [
24047
23973
  country,
24048
23974
  setAccountFormat,
@@ -24052,14 +23978,14 @@ const useScenarioConfiguration = ({
24052
23978
  ]);
24053
23979
  const { fieldConfigurations, requiredFields } = useMemo(() => {
24054
23980
  if (!configurationResponse) return {};
24055
- const { matchingScenario, provider } = configurationResponse;
23981
+ const { matchingScenario } = configurationResponse;
24056
23982
  const payoutRequiredFields = accountFormatResponse && accountFormat ? accountFormatResponse[accountFormat] : void 0;
24057
23983
  const scenarioConfig = parseConfiguration2(
24058
23984
  payoutRequiredFields ? {
24059
23985
  matchingScenario,
24060
23986
  country,
24061
23987
  requiredFields: payoutRequiredFields,
24062
- bankVerificationAvailable: instantVerificationEnabled && !!(provider == null ? void 0 : provider.redirectUrl)
23988
+ bankVerificationAvailable: instantVerificationAvailable
24063
23989
  } : {
24064
23990
  matchingScenario,
24065
23991
  country,
@@ -24077,7 +24003,7 @@ const useScenarioConfiguration = ({
24077
24003
  configurationResponse,
24078
24004
  country,
24079
24005
  parseConfiguration2,
24080
- instantVerificationEnabled
24006
+ instantVerificationAvailable
24081
24007
  ]);
24082
24008
  return {
24083
24009
  requiredFields,
@@ -25638,7 +25564,7 @@ function BusinessInformationCard({
25638
25564
  }
25639
25565
  );
25640
25566
  }
25641
- const logger$n = createLogger("BusinessSelection");
25567
+ const logger$o = createLogger("BusinessSelection");
25642
25568
  function BusinessSelectionComponent({
25643
25569
  showCompanyStructure,
25644
25570
  searching,
@@ -25690,7 +25616,7 @@ function BusinessSelectionComponent({
25690
25616
  setCurrentBusinessSelection(businessData);
25691
25617
  }
25692
25618
  } catch (e) {
25693
- logger$n.error(e);
25619
+ logger$o.error(e);
25694
25620
  }
25695
25621
  },
25696
25622
  [basicInformation == null ? void 0 : basicInformation.stateOrProvince, fetchBusinessData, fetching, selectedBusinessId]
@@ -25704,7 +25630,7 @@ function BusinessSelectionComponent({
25704
25630
  handleNextClick == null ? void 0 : handleNextClick();
25705
25631
  }
25706
25632
  } catch (e) {
25707
- logger$n.error(e);
25633
+ logger$o.error(e);
25708
25634
  }
25709
25635
  },
25710
25636
  [currentTin, handleNextClick, handleBusinessVerification]
@@ -25891,7 +25817,7 @@ function BasicInformationComponent({
25891
25817
  const { i18n } = useI18nContext();
25892
25818
  const { isSettingEnabled } = useSettingsContext();
25893
25819
  const { isExperimentEnabled } = useExperimentsContext();
25894
- const allowedCountries = useAllowedCountries();
25820
+ const { allowedCountries } = useCoreContext();
25895
25821
  const isAllowedEditPrefilledCountry = isSettingEnabled(SettingNames.AllowPrefilledCountryEdit);
25896
25822
  const formDescription = /* @__PURE__ */ jsxs("div", { className: "adyen-kyc-form-header__description", children: [
25897
25823
  description,
@@ -26814,7 +26740,7 @@ const DECISION_MAKER_TYPES_WITH_JOBTITLE = [
26814
26740
  DecisionMakerType.SIGNATORY,
26815
26741
  DecisionMakerType.CONTROLLING_PERSON
26816
26742
  ];
26817
- const rules$1 = ({
26743
+ const rules$2 = ({
26818
26744
  data,
26819
26745
  country,
26820
26746
  taskType,
@@ -27289,7 +27215,7 @@ const useExpiryThreshold = (expiry) => {
27289
27215
  return { expiryStatus: "notYetCloseToExpiry", secondsUntilExpiry: void 0 };
27290
27216
  };
27291
27217
  const ExpiryContext = createContext(false);
27292
- const logger$m = createLogger("ExpiryProvider");
27218
+ const logger$n = createLogger("ExpiryProvider");
27293
27219
  const ExpiryProvider = ({
27294
27220
  expiry: initialExpiry,
27295
27221
  eventEmitter,
@@ -27318,7 +27244,7 @@ const ExpiryProvider = ({
27318
27244
  refreshExpiry().then((newExpiry) => {
27319
27245
  setExpiry(newExpiry);
27320
27246
  setModalDismissed(false);
27321
- }).catch(logger$m.error);
27247
+ }).catch(logger$n.error);
27322
27248
  }
27323
27249
  }
27324
27250
  ),
@@ -27340,7 +27266,7 @@ const ExpiryProvider = ({
27340
27266
  return /* @__PURE__ */ jsx(ExpiryContext.Provider, { value: expiryStatus === "expired", children });
27341
27267
  };
27342
27268
  const useHasExpired = () => useContext(ExpiryContext);
27343
- const logger$l = createLogger("FormRouterContextProvider");
27269
+ const logger$m = createLogger("FormRouterContextProvider");
27344
27270
  function FormRouterContextProvider({
27345
27271
  children,
27346
27272
  forms,
@@ -27363,7 +27289,7 @@ function FormRouterContextProvider({
27363
27289
  if (formIndex > -1) {
27364
27290
  setFormIndex(formIndex);
27365
27291
  } else {
27366
- logger$l.error("No form was found to have that field so form navigation failed.");
27292
+ logger$m.error("No form was found to have that field so form navigation failed.");
27367
27293
  }
27368
27294
  }
27369
27295
  }),
@@ -29054,7 +28980,7 @@ function CompanyDropinComponent({
29054
28980
  }
29055
28981
  const IgnoreLocalStorageContext = createContext(false);
29056
28982
  const useIgnoreLocalStorage = () => useContext(IgnoreLocalStorageContext);
29057
- const logger$k = createLogger("useLocalStorage");
28983
+ const logger$l = createLogger("useLocalStorage");
29058
28984
  const useLocalStorage = (key, defaultValue, options) => {
29059
28985
  const { serializer, parser, syncData } = useMemo(
29060
28986
  () => ({
@@ -29074,7 +29000,7 @@ const useLocalStorage = (key, defaultValue, options) => {
29074
29000
  const res = rawValueRef.current ? parser(rawValueRef.current) : defaultValue;
29075
29001
  return res;
29076
29002
  } catch (err) {
29077
- logger$k.error(err);
29003
+ logger$l.error(err);
29078
29004
  return defaultValue;
29079
29005
  }
29080
29006
  });
@@ -29109,7 +29035,7 @@ const useLocalStorage = (key, defaultValue, options) => {
29109
29035
  try {
29110
29036
  updateLocalStorage();
29111
29037
  } catch (err) {
29112
- logger$k.error(err);
29038
+ logger$l.error(err);
29113
29039
  }
29114
29040
  }, [value, ignoreLocalStorage]);
29115
29041
  useEffect(() => {
@@ -29122,7 +29048,7 @@ const useLocalStorage = (key, defaultValue, options) => {
29122
29048
  setValue(event.newValue ? parser(event.newValue) : void 0);
29123
29049
  }
29124
29050
  } catch (err) {
29125
- logger$k.error(err);
29051
+ logger$l.error(err);
29126
29052
  }
29127
29053
  };
29128
29054
  if (ignoreLocalStorage) return;
@@ -29306,7 +29232,7 @@ const useSingpassMyInfoLogin = ({
29306
29232
  trustedEntityAssociations
29307
29233
  };
29308
29234
  };
29309
- const logger$j = createLogger("useAssociatedLegalArrangement");
29235
+ const logger$k = createLogger("useAssociatedLegalArrangement");
29310
29236
  function useAssociatedLegalArrangement({
29311
29237
  rootLegalEntity,
29312
29238
  getLegalEntity: getLegalEntity2
@@ -29322,7 +29248,7 @@ function useAssociatedLegalArrangement({
29322
29248
  (entity) => entity.type === LegalEntityType.SOLE_PROPRIETORSHIP || entity.type === LegalEntityType.TRUST
29323
29249
  );
29324
29250
  if (foundEntity == null ? void 0 : foundEntity.legalEntityId) {
29325
- getAssociatedEntity(foundEntity == null ? void 0 : foundEntity.legalEntityId).then((res) => setAssociatedLegalArrangement(res)).catch(logger$j.error);
29251
+ getAssociatedEntity(foundEntity == null ? void 0 : foundEntity.legalEntityId).then((res) => setAssociatedLegalArrangement(res)).catch(logger$k.error);
29326
29252
  }
29327
29253
  }, [getAssociatedEntity, rootLegalEntity == null ? void 0 : rootLegalEntity.entityAssociations]);
29328
29254
  useEffect(() => {
@@ -29372,7 +29298,7 @@ const useCanSeeEntitySelection = (legalEntityId) => {
29372
29298
  setCanSeeEntitySelection: setCanSeeEntitySelectionIntoLocalStorage
29373
29299
  };
29374
29300
  };
29375
- const logger$i = createLogger("useExemptSettlor");
29301
+ const logger$j = createLogger("useExemptSettlor");
29376
29302
  const useExemptSettlor = ({
29377
29303
  trust,
29378
29304
  handleGetLegalEntity
@@ -29390,7 +29316,7 @@ const useExemptSettlor = ({
29390
29316
  );
29391
29317
  useEffect(() => {
29392
29318
  if (!(trust == null ? void 0 : trust.trust)) return;
29393
- updateExemptSettlor(trust).catch(logger$i.error);
29319
+ updateExemptSettlor(trust).catch(logger$j.error);
29394
29320
  }, [trust, updateExemptSettlor]);
29395
29321
  return exemptSettlor;
29396
29322
  };
@@ -30904,6 +30830,7 @@ const useIntroductionScreens = ({ legalEntity, tasks }) => {
30904
30830
  );
30905
30831
  return canSeeIntroduction && (introductionScreens == null ? void 0 : introductionScreens.length) > 0 ? [IntroductionScreens.PROLOGUE, ...introductionScreens, IntroductionScreens.EPILOGUE] : void 0;
30906
30832
  };
30833
+ const toCapitalized = (s) => `${s[0].toUpperCase()}${s.slice(1).toLowerCase()}`;
30907
30834
  const toPascalCase = (s) => s.split(/[^A-Za-z]/).map((word) => toCapitalized(word)).join("");
30908
30835
  var IntroductionScreenTranslationKeyElements = /* @__PURE__ */ ((IntroductionScreenTranslationKeyElements2) => {
30909
30836
  IntroductionScreenTranslationKeyElements2["ListItem"] = "LI";
@@ -31414,6 +31341,14 @@ const SingpassSelection = (props) => {
31414
31341
  )
31415
31342
  ] }) });
31416
31343
  };
31344
+ const useSetting = (settingName) => {
31345
+ const context = useContext(SettingsContext);
31346
+ if (context === void 0) {
31347
+ throw new Error("useSetting must be used within a SettingsProvider");
31348
+ }
31349
+ const { getSetting } = context;
31350
+ return getSetting(settingName);
31351
+ };
31417
31352
  const businessTypeMapping = {
31418
31353
  myName: {
31419
31354
  [LegalEntityType.INDIVIDUAL]: "individual"
@@ -32456,7 +32391,7 @@ function IndividualDropinComponent({
32456
32391
  country
32457
32392
  });
32458
32393
  const fieldsFromCustomRules = useMemo(
32459
- () => rules$1({
32394
+ () => rules$2({
32460
32395
  data,
32461
32396
  country,
32462
32397
  taskType,
@@ -32920,7 +32855,7 @@ function IndividualDropinComponent({
32920
32855
  }
32921
32856
  );
32922
32857
  }
32923
- const logger$h = createLogger("useBankConfigurationHandler");
32858
+ const logger$i = createLogger("useBankConfigurationHandler");
32924
32859
  const useBankConfigurationHandlers = ({
32925
32860
  handleGetBankVerificationVendors,
32926
32861
  bankAccountCountry,
@@ -32938,7 +32873,7 @@ const useBankConfigurationHandlers = ({
32938
32873
  const bankVerificationVendorsResponse = handleGetBankVerificationVendors ? await handleGetBankVerificationVendors(bankAccountCountry) : [];
32939
32874
  setProvider(bankVerificationVendorsResponse == null ? void 0 : bankVerificationVendorsResponse[0]);
32940
32875
  })().catch(() => {
32941
- logger$h.error();
32876
+ logger$i.error();
32942
32877
  setProvider(void 0);
32943
32878
  }).finally(() => {
32944
32879
  setLoadingStatus("success");
@@ -32951,17 +32886,14 @@ const useBankConfigurationHandlers = ({
32951
32886
  handleGetBankVerificationVendors,
32952
32887
  bankAccountCountry
32953
32888
  ]);
32954
- const getConfigurationData = useCallback(async () => {
32955
- const configuration = await getConfiguration2({
32889
+ const getConfigurationData = useCallback(
32890
+ () => getConfiguration2({
32956
32891
  legalEntityType,
32957
32892
  capabilities,
32958
32893
  country: bankAccountCountry
32959
- });
32960
- return {
32961
- ...configuration,
32962
- provider
32963
- };
32964
- }, [getConfiguration2, legalEntityType, bankAccountCountry, capabilities, provider]);
32894
+ }),
32895
+ [getConfiguration2, legalEntityType, bankAccountCountry, capabilities]
32896
+ );
32965
32897
  return {
32966
32898
  getConfigurationData,
32967
32899
  provider
@@ -32975,6 +32907,43 @@ const getAccountFormatsForCountry = async (country) => {
32975
32907
  }
32976
32908
  return (await importForCountry()).default;
32977
32909
  };
32910
+ const rules$1 = ({ data, requiredFields }) => ({
32911
+ whenUsingManualVerification: () => {
32912
+ var _a;
32913
+ if (!data.payoutVerificationMethod) return;
32914
+ if (((_a = data == null ? void 0 : data.payoutVerificationMethod) == null ? void 0 : _a.payoutVerificationMethod) === "manualVerification") {
32915
+ return "REQUIRED";
32916
+ }
32917
+ },
32918
+ whenUsingInstantVerification: () => {
32919
+ var _a;
32920
+ if (!data.payoutVerificationMethod) {
32921
+ return "REQUIRED";
32922
+ }
32923
+ if (((_a = data == null ? void 0 : data.payoutVerificationMethod) == null ? void 0 : _a.payoutVerificationMethod) === "instantVerification") {
32924
+ return "REQUIRED";
32925
+ }
32926
+ },
32927
+ verifiedBankAccountNumber: () => {
32928
+ var _a;
32929
+ if (((_a = data == null ? void 0 : data.payoutVerificationMethod) == null ? void 0 : _a.payoutVerificationMethod) === "instantVerification") {
32930
+ return "REQUIRED";
32931
+ }
32932
+ },
32933
+ bankStatementRequirement: () => {
32934
+ var _a;
32935
+ if (((_a = data == null ? void 0 : data.payoutVerificationMethod) == null ? void 0 : _a.payoutVerificationMethod) === "manualVerification") {
32936
+ return requiredFields == null ? void 0 : requiredFields.bankStatementRequirement;
32937
+ }
32938
+ },
32939
+ // "bankStatement description" field is always "optional" and it's coupled with bank statement document.
32940
+ bankStatementDescription: () => {
32941
+ var _a;
32942
+ if (((_a = data == null ? void 0 : data.payoutVerificationMethod) == null ? void 0 : _a.payoutVerificationMethod) === "manualVerification" && !!(requiredFields == null ? void 0 : requiredFields.bankStatementRequirement)) {
32943
+ return "OPTIONAL";
32944
+ }
32945
+ }
32946
+ });
32978
32947
  const labels = () => ({
32979
32948
  verifiedAccountHolder: () => "accountHolder",
32980
32949
  verifiedBankCountry: () => "bankCountry",
@@ -33052,7 +33021,7 @@ function PayoutDetailsDropinComponent({
33052
33021
  const existingPayoutDetails = transferInstrument ? mapTransferInstrumentToPayoutAccount(transferInstrument) : void 0;
33053
33022
  const [documents, setDocuments] = useState();
33054
33023
  const [newTransferInstrumentId, setNewTransferInstrumentId] = useState();
33055
- const [useFreshProviderRedirectUrl, setUseFreshProviderRedirectUrl] = useState(true);
33024
+ const [useFreshProviderRedirectUrl, setUseFreshProviderRedirectUrl] = useState(false);
33056
33025
  const fallbackCurrency = (_a = currencyByCountry[defaultPayoutCountry]) == null ? void 0 : _a[0];
33057
33026
  const accountHolderName = accountHolder || getLegalEntityNameBasedOnType(legalEntityResponse);
33058
33027
  const instantVerificationEnabled = Boolean(
@@ -33116,6 +33085,10 @@ function PayoutDetailsDropinComponent({
33116
33085
  useFreshProviderRedirectUrl,
33117
33086
  setUseFreshProviderRedirectUrl
33118
33087
  });
33088
+ const instantVerificationAvailable = useMemo(
33089
+ () => Boolean(instantVerificationEnabled && (provider == null ? void 0 : provider.redirectUrl)),
33090
+ [instantVerificationEnabled, provider == null ? void 0 : provider.redirectUrl]
33091
+ );
33119
33092
  const getPayoutAccountFormatData = useCallback(
33120
33093
  async () => getAccountFormatsForCountry(bankAccountCountry ?? defaultPayoutCountry),
33121
33094
  [bankAccountCountry]
@@ -33124,13 +33097,13 @@ function PayoutDetailsDropinComponent({
33124
33097
  parseConfiguration: parseConfiguration$3,
33125
33098
  getConfigurationData,
33126
33099
  getPayoutAccountFormatData,
33127
- instantVerificationEnabled,
33100
+ instantVerificationAvailable,
33128
33101
  setLoadingStatus: setConfigurationLoadingStatus,
33129
33102
  country: bankAccountCountry ?? defaultPayoutCountry,
33130
33103
  existingBankAccountFormat
33131
33104
  });
33132
33105
  const fieldsFromCustomRules = useMemo(
33133
- () => rules$2({
33106
+ () => rules$1({
33134
33107
  data,
33135
33108
  country: bankAccountCountry ?? defaultPayoutCountry,
33136
33109
  taskType,
@@ -33148,10 +33121,7 @@ function PayoutDetailsDropinComponent({
33148
33121
  var _a2;
33149
33122
  return getAppropriatePayoutDetailsSteps(
33150
33123
  Boolean((_a2 = prefilledData == null ? void 0 : prefilledData.payoutAccountDetails) == null ? void 0 : _a2.transferInstrumentId),
33151
- !transferInstrument && isInstantVerificationAvailable({
33152
- provider,
33153
- verificationVendorsCallback: handleGetBankVerificationVendors
33154
- }),
33124
+ instantVerificationAvailable,
33155
33125
  isSettingEnabled(SettingNames.AllowIntraRegionCrossBorderPayout),
33156
33126
  showWidgetInVerificationMethodStep
33157
33127
  );
@@ -33456,8 +33426,7 @@ function PayoutDetailsDropinComponent({
33456
33426
  associatedLegalArrangement,
33457
33427
  provider,
33458
33428
  bankVendorsLoadingStatus,
33459
- handleGetBankVerificationVendors,
33460
- instantVerificationEnabled,
33429
+ instantVerificationAvailable,
33461
33430
  refreshLegalEntity,
33462
33431
  shouldValidate,
33463
33432
  createTrustedTransferInstrument: createTrustedTransferInstrumentHandler,
@@ -34391,7 +34360,7 @@ const serviceAgreementValidationRules = {
34391
34360
  errorMessage: "fieldIsRequired"
34392
34361
  }
34393
34362
  };
34394
- const logger$g = createLogger("useServiceAgreement");
34363
+ const logger$h = createLogger("useServiceAgreement");
34395
34364
  const FALLBACK_LANGUAGE_CODE$1 = "en";
34396
34365
  const useServiceAgreement = ({
34397
34366
  handleGetServiceAgreement,
@@ -34421,7 +34390,7 @@ const useServiceAgreement = ({
34421
34390
  const contract = JSON.parse(decodeURIComponent(escape(window.atob(document2))));
34422
34391
  setServiceAgreement({ id, contract });
34423
34392
  };
34424
- requestAcceptedServiceAgreement().catch(logger$g.error).finally(() => setLoading("success"));
34393
+ requestAcceptedServiceAgreement().catch(logger$h.error).finally(() => setLoading("success"));
34425
34394
  }, [acceptanceId, handleViewAcceptedTermsOfServiceDocument]);
34426
34395
  useEffect(() => {
34427
34396
  const requestServiceAgreement = async () => {
@@ -34436,7 +34405,7 @@ const useServiceAgreement = ({
34436
34405
  }
34437
34406
  );
34438
34407
  if (!document2) {
34439
- logger$g.log('"document" field was missing in response');
34408
+ logger$h.log('"document" field was missing in response');
34440
34409
  return;
34441
34410
  }
34442
34411
  const contract = JSON.parse(decodeURIComponent(escape(window.atob(document2))));
@@ -34451,13 +34420,14 @@ const useServiceAgreement = ({
34451
34420
  throw err;
34452
34421
  }
34453
34422
  };
34454
- requestServiceAgreement().catch(logger$g.error);
34423
+ requestServiceAgreement().catch(logger$h.error);
34455
34424
  }, [
34456
34425
  handleGetServiceAgreement,
34457
34426
  handleServiceAgreementIsNotAvailableInThatLanguage,
34458
34427
  agreementLanguage,
34459
34428
  legalEntityId,
34460
- serviceAgreementType
34429
+ serviceAgreementType,
34430
+ acceptanceId
34461
34431
  ]);
34462
34432
  return {
34463
34433
  loading,
@@ -34475,7 +34445,7 @@ const serviceAgreementTypesTranslationMapping = {
34475
34445
  adyenPccr: "pccr",
34476
34446
  adyenChargeCard: "chargeCardUserAgreement"
34477
34447
  };
34478
- const logger$f = createLogger("ServiceAgreementDropinComponent");
34448
+ const logger$g = createLogger("ServiceAgreementDropinComponent");
34479
34449
  const FALLBACK_LANGUAGE_CODE = "en";
34480
34450
  function ServiceAgreementDropinComponent({
34481
34451
  legalEntityResponse,
@@ -34654,7 +34624,7 @@ function ServiceAgreementDropinComponent({
34654
34624
  await requestAndDownload(i18n.languageCode);
34655
34625
  } catch (e) {
34656
34626
  if (i18n.languageCode !== FALLBACK_LANGUAGE_CODE) {
34657
- await requestAndDownload(FALLBACK_LANGUAGE_CODE).catch(logger$f.error);
34627
+ await requestAndDownload(FALLBACK_LANGUAGE_CODE).catch(logger$g.error);
34658
34628
  return;
34659
34629
  }
34660
34630
  showToast({
@@ -35600,10 +35570,9 @@ const hasProgressedBeyondEntitySelection = (legalEntity) => {
35600
35570
  return hasOwnEntityAssocation || !!hasOrganizationType;
35601
35571
  };
35602
35572
  const PAGES_WITH_POLLING = [TaskTypes.DECISION_MAKER_OVERVIEW, TaskTypes.TASKS_OVERVIEW];
35603
- const logger$e = createLogger("DropinComposerComponent");
35573
+ const logger$f = createLogger("DropinComposerComponent");
35604
35574
  const isOrganizationSettlorWithExemptionReasonEnabled = (enabled, country) => country === CountryCodes.Australia && enabled;
35605
35575
  function DropinComposerComponent({
35606
- capabilities,
35607
35576
  legalEntityResponse,
35608
35577
  onSubmit,
35609
35578
  onChange,
@@ -35628,6 +35597,7 @@ function DropinComposerComponent({
35628
35597
  });
35629
35598
  const [tasks, setTasks] = useState([]);
35630
35599
  const [rootLegalEntity, setRootLegalEntity] = useState(legalEntityResponse);
35600
+ const capabilities = useMemo(() => getCapabilities(rootLegalEntity), [rootLegalEntity]);
35631
35601
  const {
35632
35602
  isEligibleForSingpass,
35633
35603
  state: singpassLoginState,
@@ -35707,7 +35677,7 @@ function DropinComposerComponent({
35707
35677
  setPciStatus(response);
35708
35678
  return response;
35709
35679
  } catch (e) {
35710
- logger$e.warn(i18n.get("failedToGetPciStatus"));
35680
+ logger$f.warn(i18n.get("failedToGetPciStatus"));
35711
35681
  }
35712
35682
  }
35713
35683
  return void 0;
@@ -35735,7 +35705,7 @@ function DropinComposerComponent({
35735
35705
  }, [additionalSalesChannels, i18n, rootLegalEntity.id, args.handleGetPciTemplate]);
35736
35706
  useEffect(() => {
35737
35707
  if (!tasks.includes(TaskTypes.PCI_DSS)) return;
35738
- getPciTemplate().catch(logger$e.error);
35708
+ getPciTemplate().catch(logger$f.error);
35739
35709
  }, [getPciTemplate, tasks]);
35740
35710
  const addFetchedAcceptedByName = async (acceptanceInfo) => {
35741
35711
  try {
@@ -35745,7 +35715,7 @@ function DropinComposerComponent({
35745
35715
  acceptedByName: getLegalEntityNameBasedOnType(acceptedByEntity)
35746
35716
  };
35747
35717
  } catch (e) {
35748
- logger$e.warn(i18n.get("failedToFetchAcceptedByName"));
35718
+ logger$f.warn(i18n.get("failedToFetchAcceptedByName"));
35749
35719
  return {
35750
35720
  ...acceptanceInfo,
35751
35721
  acceptedByName: null
@@ -35759,7 +35729,7 @@ function DropinComposerComponent({
35759
35729
  const serviceAgreementAcceptanceInfosWithNames2 = await Promise.all(response.data.map(addFetchedAcceptedByName));
35760
35730
  setServiceAgreementAcceptanceInfosWithNames(serviceAgreementAcceptanceInfosWithNames2);
35761
35731
  } catch (e) {
35762
- logger$e.warn(i18n.get("failedToGetServiceAgreementStatus"));
35732
+ logger$f.warn(i18n.get("failedToGetServiceAgreementStatus"));
35763
35733
  }
35764
35734
  }
35765
35735
  };
@@ -35769,7 +35739,7 @@ function DropinComposerComponent({
35769
35739
  const response = await args.handleGetServiceAgreementStatus(rootLegalEntity.id);
35770
35740
  setServiceAgreementTypes(response.termsOfServiceTypes);
35771
35741
  } catch (e) {
35772
- logger$e.warn(i18n.get("failedToGetServiceAgreementStatus"));
35742
+ logger$f.warn(i18n.get("failedToGetServiceAgreementStatus"));
35773
35743
  }
35774
35744
  }
35775
35745
  };
@@ -35799,7 +35769,7 @@ function DropinComposerComponent({
35799
35769
  try {
35800
35770
  return await args.handleGetLegalEntity(rootLegalEntity.id);
35801
35771
  } catch (e) {
35802
- logger$e.warn("Failed to fetch legal entity details", e);
35772
+ logger$f.warn("Failed to fetch legal entity details", e);
35803
35773
  }
35804
35774
  }
35805
35775
  return void 0;
@@ -35855,7 +35825,7 @@ function DropinComposerComponent({
35855
35825
  await refreshAssociatedLegalArrangement();
35856
35826
  showToast({ type: "success", label: i18n.get("successFullyRemovedTrustMember") });
35857
35827
  } catch (err) {
35858
- logger$e.error(`Failed to delete trust member`, err);
35828
+ logger$f.error(`Failed to delete trust member`, err);
35859
35829
  showToast({ type: "error", label: i18n.get("failedToRemoveTrustMember") });
35860
35830
  }
35861
35831
  };
@@ -35922,14 +35892,14 @@ function DropinComposerComponent({
35922
35892
  }
35923
35893
  break;
35924
35894
  default:
35925
- logger$e.warn(
35895
+ logger$f.warn(
35926
35896
  `Updating trust member type "${trustMember.trustMemberType}" is not implemented.`
35927
35897
  );
35928
35898
  }
35929
35899
  showToast({ label: i18n.get("successfullyUpdatedDetails"), type: "success" });
35930
35900
  await refreshLegalArrangementAndRunOnSubmit(associatedLegalArrangement, 1);
35931
35901
  } catch (err) {
35932
- logger$e.error(err);
35902
+ logger$f.error(err);
35933
35903
  showToast({ label: i18n.get("failedToUpdateDetails"), type: "error" });
35934
35904
  }
35935
35905
  };
@@ -35941,7 +35911,7 @@ function DropinComposerComponent({
35941
35911
  singpassTabRef.current = window.open(authUrl, "_blank");
35942
35912
  singpassTabRef.current.focus();
35943
35913
  } catch (e) {
35944
- logger$e.error(e);
35914
+ logger$f.error(e);
35945
35915
  handleSingpassMyInfoLoginFailure(e);
35946
35916
  }
35947
35917
  }
@@ -36119,7 +36089,7 @@ function DropinComposerComponent({
36119
36089
  const fetchConfiguration = async () => {
36120
36090
  const data = await getConfiguration2({
36121
36091
  country: contextCountry,
36122
- capabilities,
36092
+ capabilities: args == null ? void 0 : args.capabilities,
36123
36093
  legalEntityType: rootLegalEntity.type
36124
36094
  });
36125
36095
  if (data == null ? void 0 : data.taskList) {
@@ -36132,7 +36102,7 @@ function DropinComposerComponent({
36132
36102
  }
36133
36103
  };
36134
36104
  setIsLoadingConfiguration(true);
36135
- fetchConfiguration().catch(logger$e.error).finally(() => {
36105
+ fetchConfiguration().catch(logger$f.error).finally(() => {
36136
36106
  setIsLoadingConfiguration(false);
36137
36107
  onLoad();
36138
36108
  });
@@ -36169,7 +36139,7 @@ function DropinComposerComponent({
36169
36139
  singpassTabRef.current = window.open(authUrl);
36170
36140
  singpassTabRef.current.focus();
36171
36141
  } catch (e) {
36172
- logger$e.error(e);
36142
+ logger$f.error(e);
36173
36143
  handleSingpassMyInfoLoginFailure(e);
36174
36144
  }
36175
36145
  },
@@ -36280,7 +36250,7 @@ function DropinComposerComponent({
36280
36250
  legalEntityResponse: rootLegalEntity,
36281
36251
  country: rootLegalEntityCountry,
36282
36252
  problems: getLegalEntityProblems(rootLegalEntity),
36283
- capabilities: getCapabilities(legalEntityResponse),
36253
+ capabilities,
36284
36254
  onChange: componentOnChange,
36285
36255
  onSubmit: async (data) => {
36286
36256
  onSubmit == null ? void 0 : onSubmit(data);
@@ -36326,7 +36296,7 @@ function DropinComposerComponent({
36326
36296
  legalEntityResponse: associatedLegalEntity,
36327
36297
  country: rootLegalEntityCountry,
36328
36298
  problems: getLegalEntityProblems(associatedLegalEntity),
36329
- capabilities: getCapabilities(legalEntityResponse),
36299
+ capabilities,
36330
36300
  onChange: componentOnChange,
36331
36301
  onSubmit: componentOnSubmit,
36332
36302
  handleHomeClick: navigateBack,
@@ -36358,7 +36328,7 @@ function DropinComposerComponent({
36358
36328
  legalEntityResponse: associatedLegalEntity,
36359
36329
  problems: getLegalEntityProblems(associatedLegalEntity),
36360
36330
  country: rootLegalEntityCountry,
36361
- capabilities: getCapabilities(legalEntityResponse),
36331
+ capabilities,
36362
36332
  onChange: componentOnChange,
36363
36333
  onSubmit: async (data) => {
36364
36334
  await refreshAssociatedLegalArrangement();
@@ -36389,7 +36359,7 @@ function DropinComposerComponent({
36389
36359
  legalEntityResponse: associatedLegalEntity,
36390
36360
  country: rootLegalEntityCountry,
36391
36361
  problems: getLegalEntityProblems(associatedLegalEntity),
36392
- capabilities: getCapabilities(legalEntityResponse),
36362
+ capabilities,
36393
36363
  onChange: componentOnChange,
36394
36364
  onSubmit: (data) => refreshLegalArrangementAndRunOnSubmit(data, 2),
36395
36365
  handleBackClick: navigateBack,
@@ -36418,7 +36388,7 @@ function DropinComposerComponent({
36418
36388
  taskType: TaskTypes.COMPANY,
36419
36389
  taskName: hasTrust ? "companyTrusteeDetails" : "companyDetails",
36420
36390
  legalEntityResponse: rootLegalEntity,
36421
- capabilities: getCapabilities(legalEntityResponse),
36391
+ capabilities,
36422
36392
  problems: getLegalEntityProblems(rootLegalEntity),
36423
36393
  onChange: componentOnChange,
36424
36394
  onSubmit: async (data) => {
@@ -36447,7 +36417,7 @@ function DropinComposerComponent({
36447
36417
  taskType: TaskTypes.BUSINESS_DETAILS,
36448
36418
  taskName: hasTrust ? "businessTrusteeDetails" : "businessDetails",
36449
36419
  legalEntityResponse: rootLegalEntity,
36450
- capabilities: getCapabilities(legalEntityResponse),
36420
+ capabilities,
36451
36421
  problems: getLegalEntityProblems(rootLegalEntity),
36452
36422
  homeButtonLabel: i18n.get("saveAndGoToOverview"),
36453
36423
  country: legalEntityResponse.organization.registeredAddress.country ?? contextCountry,
@@ -36485,7 +36455,7 @@ function DropinComposerComponent({
36485
36455
  taskType: TaskTypes.TRUST_MEMBER_COMPANY,
36486
36456
  parentLegalEntity: associatedLegalArrangement,
36487
36457
  legalEntityResponse: associatedLegalEntity,
36488
- capabilities: getCapabilities(legalEntityResponse),
36458
+ capabilities,
36489
36459
  problems: (_e = capabilityProblems == null ? void 0 : capabilityProblems.LegalEntity) == null ? void 0 : _e[rootLegalEntity.id],
36490
36460
  onChange: componentOnChange,
36491
36461
  onSubmit: (data) => refreshLegalArrangementAndRunOnSubmit(data, 2),
@@ -36512,7 +36482,7 @@ function DropinComposerComponent({
36512
36482
  associatedLegalArrangement,
36513
36483
  refreshLegalEntity,
36514
36484
  accountHolder: getPayoutAccountHolderName(rootLegalEntity, i18n),
36515
- capabilities: getCapabilities(legalEntityResponse),
36485
+ capabilities,
36516
36486
  onChange: componentOnChange,
36517
36487
  onSubmit: componentOnSubmit,
36518
36488
  handleHomeClick: navigateBack,
@@ -36538,7 +36508,7 @@ function DropinComposerComponent({
36538
36508
  problems: (_g = capabilityProblems == null ? void 0 : capabilityProblems.LegalEntity) == null ? void 0 : _g[associatedLegalArrangement == null ? void 0 : associatedLegalArrangement.id],
36539
36509
  parentLegalEntity: rootLegalEntity,
36540
36510
  legalEntityResponse: associatedLegalArrangement,
36541
- capabilities: getCapabilities(legalEntityResponse),
36511
+ capabilities,
36542
36512
  onChange: componentOnChange,
36543
36513
  onSubmit: (data) => refreshLegalArrangementAndRunOnSubmit(data, 1),
36544
36514
  handleHomeClick: navigateBack,
@@ -36613,7 +36583,7 @@ function DropinComposerComponent({
36613
36583
  taskType: TaskTypes.SOLE_PROPRIETOR_COMPANY,
36614
36584
  parentLegalEntity: rootLegalEntity,
36615
36585
  legalEntityResponse: associatedLegalArrangement,
36616
- capabilities: getCapabilities(legalEntityResponse),
36586
+ capabilities,
36617
36587
  problems: (_j = capabilityProblems == null ? void 0 : capabilityProblems.LegalEntity) == null ? void 0 : _j[associatedLegalArrangement == null ? void 0 : associatedLegalArrangement.id],
36618
36588
  onChange: componentOnChange,
36619
36589
  onSubmit: (data) => refreshLegalArrangementAndRunOnSubmit(data, 1),
@@ -36676,7 +36646,7 @@ function DropinComposerComponent({
36676
36646
  legalEntityResponse: associatedLegalRepresentative,
36677
36647
  country: rootLegalEntityCountry,
36678
36648
  problems: getLegalEntityProblems(associatedLegalRepresentative),
36679
- capabilities: getCapabilities(legalEntityResponse),
36649
+ capabilities,
36680
36650
  onChange: componentOnChange,
36681
36651
  onSubmit: componentOnSubmit,
36682
36652
  handleHomeClick: navigateBack,
@@ -37014,7 +36984,7 @@ const useComponentApi = (rootLegalEntityId) => {
37014
36984
  };
37015
36985
  }, [base, rootLegalEntityId]);
37016
36986
  };
37017
- const logger$d = createLogger("CreateIndividualComponent");
36987
+ const logger$e = createLogger("CreateIndividualComponent");
37018
36988
  function CreateIndividualComponent({
37019
36989
  parentLegalEntityId,
37020
36990
  legalEntityId,
@@ -37061,11 +37031,11 @@ function CreateIndividualComponent({
37061
37031
  setParentLegalEntity(parentEntity);
37062
37032
  setLegalEntity(entity);
37063
37033
  } catch (error) {
37064
- logger$d.error(error);
37034
+ logger$e.error(error);
37065
37035
  }
37066
37036
  }, [parentLegalEntityId, legalEntityId, getLegalEntity2]);
37067
37037
  useEffect(() => {
37068
- fetchLegalEntity().catch(logger$d.error);
37038
+ fetchLegalEntity().catch(logger$e.error);
37069
37039
  }, [fetchLegalEntity]);
37070
37040
  const country = ((_a = legalEntity == null ? void 0 : legalEntity.individual) == null ? void 0 : _a.residentialAddress.country) ?? contextCountry;
37071
37041
  const onSubmit = (d) => {
@@ -37097,7 +37067,7 @@ function CreateIndividualComponent({
37097
37067
  }
37098
37068
  );
37099
37069
  }
37100
- const logger$c = createLogger("CreateTransferInstrumentComponent");
37070
+ const logger$d = createLogger("CreateTransferInstrumentComponent");
37101
37071
  function CreateTransferInstrumentComponent({
37102
37072
  legalEntityId,
37103
37073
  transferInstrumentId,
@@ -37136,7 +37106,7 @@ function CreateTransferInstrumentComponent({
37136
37106
  const ti = await getTransferInstrument2(transferInstrumentId);
37137
37107
  setTransferInstrument(ti);
37138
37108
  }
37139
- })().catch(logger$c.error);
37109
+ })().catch(logger$d.error);
37140
37110
  }, [transferInstrumentId, fetchLegalEntity]);
37141
37111
  return legalEntity ? /* @__PURE__ */ jsx(
37142
37112
  PayoutDetailsDropinComponent,
@@ -37634,7 +37604,7 @@ const highExposureUltimateParentCompanyDetailsValidations = {
37634
37604
  // errorMessage: 'fieldIsRequired',
37635
37605
  // },
37636
37606
  };
37637
- const logger$b = createLogger("LegalFormField");
37607
+ const logger$c = createLogger("LegalFormField");
37638
37608
  function LegalFormField({
37639
37609
  name = "legalForm",
37640
37610
  data,
@@ -37659,7 +37629,7 @@ function LegalFormField({
37659
37629
  }));
37660
37630
  setLegalForms(legalFormsResponse);
37661
37631
  }
37662
- }).catch(() => logger$b.error);
37632
+ }).catch(() => logger$c.error);
37663
37633
  }, [countryCode]);
37664
37634
  return /* @__PURE__ */ jsx(
37665
37635
  Field,
@@ -37685,7 +37655,7 @@ function LegalFormField({
37685
37655
  }
37686
37656
  );
37687
37657
  }
37688
- const logger$a = createLogger("NaceCodeField");
37658
+ const logger$b = createLogger("NaceCodeField");
37689
37659
  function NaceCodeField({
37690
37660
  name = "naceCode",
37691
37661
  data,
@@ -37705,7 +37675,7 @@ function NaceCodeField({
37705
37675
  if (response) {
37706
37676
  setNaceCodes(response);
37707
37677
  }
37708
- }).catch(() => logger$a.error);
37678
+ }).catch(() => logger$b.error);
37709
37679
  }, []);
37710
37680
  return /* @__PURE__ */ jsx(
37711
37681
  Field,
@@ -38680,7 +38650,7 @@ function HighExposureDropinComponent(props) {
38680
38650
  return /* @__PURE__ */ jsx("div", { className: "adyen-kyc", children: renderActiveForm(props.activeForm || highExposureForms.company) });
38681
38651
  }
38682
38652
  const parseConfiguration = ({ matchingScenario }) => parseHighExposureScenarios(matchingScenario == null ? void 0 : matchingScenario[LegalEntityType.ORGANIZATION]);
38683
- const logger$9 = createLogger("UpdateLegalEntityForHighExposure");
38653
+ const logger$a = createLogger("UpdateLegalEntityForHighExposure");
38684
38654
  const customLabels = {
38685
38655
  company: {
38686
38656
  legalForm: "businessStructure",
@@ -38728,7 +38698,7 @@ function UpdateLegalEntityForHighExposure({
38728
38698
  useEffect(() => {
38729
38699
  (async () => {
38730
38700
  await fetchLegalEntity();
38731
- })().catch(logger$9.error);
38701
+ })().catch(logger$a.error);
38732
38702
  }, [fetchLegalEntity]);
38733
38703
  const dataFromResponse = legalEntity ? mapLegalEntityToHighExposure(legalEntity) : {};
38734
38704
  const [data, setData] = useState(dataFromResponse);
@@ -38933,7 +38903,7 @@ function getContentByStatus(status) {
38933
38903
  return contentMap[status];
38934
38904
  }
38935
38905
  const FINAL_STATUSES = [OnboardingStatus.VERIFIED, OnboardingStatus.REJECTED];
38936
- const logger$8 = createLogger("ViewVerificationStatusComponent");
38906
+ const logger$9 = createLogger("ViewVerificationStatusComponent");
38937
38907
  function ViewVerificationStatusComponent({
38938
38908
  legalEntityId,
38939
38909
  hideExplanation = false,
@@ -38952,12 +38922,12 @@ function ViewVerificationStatusComponent({
38952
38922
  if (!onboardingStatus) return;
38953
38923
  const statusContent = getContentByStatus(onboardingStatus);
38954
38924
  if (statusContent) return statusContent;
38955
- logger$8.error(`there is no content for status "${onboardingStatus}"`);
38925
+ logger$9.error(`there is no content for status "${onboardingStatus}"`);
38956
38926
  }, [onboardingStatus]);
38957
38927
  const handleError = useCallback(
38958
38928
  (rawError, userMessage) => {
38959
38929
  const error = coerceError(rawError);
38960
- logger$8.error(error);
38930
+ logger$9.error(error);
38961
38931
  setAlertContent(userMessage);
38962
38932
  onError == null ? void 0 : onError({
38963
38933
  error,
@@ -38991,7 +38961,7 @@ function ViewVerificationStatusComponent({
38991
38961
  });
38992
38962
  useEffect(() => {
38993
38963
  setAlertContent(void 0);
38994
- fetchOnboardingStatus().then(updateOnboardingStatus).catch(logger$8.error);
38964
+ fetchOnboardingStatus().then(updateOnboardingStatus).catch(logger$9.error);
38995
38965
  }, [fetchOnboardingStatus, updateOnboardingStatus]);
38996
38966
  const [loadingLinkStatus, setLinkLoadingStatus] = useState("success");
38997
38967
  const redirectToAdyen = async () => {
@@ -39167,22 +39137,22 @@ const useAnalytics = async ({
39167
39137
  userEvents.subscribe(onUserEvent);
39168
39138
  }
39169
39139
  };
39170
- const logger$7 = createLogger("loadCountries");
39140
+ const logger$8 = createLogger("loadCountries");
39171
39141
  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") });
39172
39142
  const loadCountriesDataset = async (locale) => {
39173
39143
  const importForLocale = countriesImports[`./${locale}.json`];
39174
39144
  if (!importForLocale) {
39175
- logger$7.warn(`No countries dataset for ${locale}, falling back to en-US`);
39145
+ logger$8.warn(`No countries dataset for ${locale}, falling back to en-US`);
39176
39146
  return (await import("./en-US-CkdCbOCX.js")).default;
39177
39147
  }
39178
39148
  return (await importForLocale()).default;
39179
39149
  };
39180
- const logger$6 = createLogger("loadStates");
39150
+ const logger$7 = createLogger("loadStates");
39181
39151
  const statesImports = /* @__PURE__ */ Object.assign({ "./AU/en-US.json": () => import("./en-US-CQv3D6--.js"), "./BR/en-US.json": () => import("./en-US-eaysbh-g.js"), "./BR/pt-BR.json": () => import("./pt-BR-CNtbeGFJ.js"), "./CA/en-US.json": () => import("./en-US-gM26UC0X.js"), "./NZ/en-US.json": () => import("./en-US-CLmaFLwu.js"), "./US/en-US.json": () => import("./en-US-7uBFgKyC.js") });
39182
39152
  const loadStatesDataset = async (country, locale) => {
39183
39153
  const importForLocale = statesImports[`./${country}/${locale}.json`];
39184
39154
  if (!importForLocale) {
39185
- logger$6.warn(`No ${country} states dataset for ${locale}, falling back to en-US`);
39155
+ logger$7.warn(`No ${country} states dataset for ${locale}, falling back to en-US`);
39186
39156
  const fallbackImport = statesImports[`./${country}/en-US.json`];
39187
39157
  return (await fallbackImport()).default;
39188
39158
  }
@@ -39296,7 +39266,7 @@ const validatePhoneNumber$1 = async (context, phoneNumber) => {
39296
39266
  { number: phoneNumber }
39297
39267
  );
39298
39268
  };
39299
- const logger$5 = createLogger("verify-id-number");
39269
+ const logger$6 = createLogger("verify-id-number");
39300
39270
  const verifyIdNumber$1 = async (context, request) => {
39301
39271
  const { loadingContext, legalEntityId } = context;
39302
39272
  try {
@@ -39319,13 +39289,13 @@ const verifyIdNumber$1 = async (context, request) => {
39319
39289
  if (responseData.status === 500) {
39320
39290
  return { status: 500, message: "Service did not respond, do not block verification" };
39321
39291
  }
39322
- return logger$5.warn(`Unexpected response status ${responseData.status}`);
39292
+ return logger$6.warn(`Unexpected response status ${responseData.status}`);
39323
39293
  }
39324
39294
  },
39325
39295
  request
39326
39296
  );
39327
39297
  } catch (e) {
39328
- logger$5.warn("WARNING: idNumber verification failed - error:", e);
39298
+ logger$6.warn("WARNING: idNumber verification failed - error:", e);
39329
39299
  }
39330
39300
  };
39331
39301
  const getEmbeddedApi = ({
@@ -39406,7 +39376,7 @@ const validatePhoneNumber = async (context, phoneNumber) => {
39406
39376
  { number: phoneNumber }
39407
39377
  );
39408
39378
  };
39409
- const logger$4 = createLogger("verify-id-number");
39379
+ const logger$5 = createLogger("verify-id-number");
39410
39380
  const verifyIdNumber = async (context, request) => {
39411
39381
  const { loadingContext, clientKey } = context;
39412
39382
  try {
@@ -39424,7 +39394,7 @@ const verifyIdNumber = async (context, request) => {
39424
39394
  if (responseData.status === 500) {
39425
39395
  return { status: 500, message: "Service did not respond, do not block verification" };
39426
39396
  }
39427
- return logger$4.warn(`Unexpected response status ${responseData.status}`);
39397
+ return logger$5.warn(`Unexpected response status ${responseData.status}`);
39428
39398
  },
39429
39399
  path: "v1/verification/idNumber",
39430
39400
  clientKey
@@ -39432,7 +39402,7 @@ const verifyIdNumber = async (context, request) => {
39432
39402
  request
39433
39403
  );
39434
39404
  } catch (e) {
39435
- logger$4.warn("WARNING: idNumber verification failed - error:", e);
39405
+ logger$5.warn("WARNING: idNumber verification failed - error:", e);
39436
39406
  }
39437
39407
  };
39438
39408
  const getKycExternalApi = ({
@@ -39461,7 +39431,7 @@ const ConfigurationApiProvider = ({
39461
39431
  }) => {
39462
39432
  const authContext = useAuthContext();
39463
39433
  const { isEmbeddedDropin, loadingContext } = authContext;
39464
- const sdkVersion = "2.59.1";
39434
+ const sdkVersion = "2.59.3";
39465
39435
  useAnalytics({
39466
39436
  onUserEvent,
39467
39437
  legalEntityId: rootLegalEntityId,
@@ -39491,6 +39461,19 @@ const useAccountHolder = (legalEntityId) => {
39491
39461
  setAccountHolder: setAccountHolderIntoLocalStorage
39492
39462
  };
39493
39463
  };
39464
+ const logger$4 = createLogger("useAllowedCountries");
39465
+ const useAllowedCountries = () => {
39466
+ const acceptedCountries = useSetting("acceptedCountries");
39467
+ const { getAllowedCountries: getAllowedCountries2 } = useConfigurationApi();
39468
+ const [allowedCountries, setAllowedCountries] = useState(
39469
+ acceptedCountries
39470
+ );
39471
+ useEffect(() => {
39472
+ if (acceptedCountries !== void 0) return;
39473
+ getAllowedCountries2().then((response) => setAllowedCountries(response.countries)).catch(logger$4.error);
39474
+ }, [acceptedCountries]);
39475
+ return allowedCountries;
39476
+ };
39494
39477
  const logger$3 = createLogger("CoreProvider");
39495
39478
  const CoreProvider = ({
39496
39479
  contextCountry: initialContextCountry,
@@ -39523,9 +39506,10 @@ const CoreProvider = ({
39523
39506
  setAccountFormat,
39524
39507
  accountFormat,
39525
39508
  setIsModalView,
39526
- isModalView
39509
+ isModalView,
39510
+ allowedCountries
39527
39511
  }),
39528
- [contextCountry, accountHolder, accountFormat, isModalView]
39512
+ [contextCountry, accountHolder, accountFormat, isModalView, allowedCountries]
39529
39513
  );
39530
39514
  return /* @__PURE__ */ jsx(CoreContext.Provider, { value: contextValue, children });
39531
39515
  };
@@ -40120,7 +40104,7 @@ const DebugModal = ({ rootLegalEntityId, onExit, getRootLegalEntity }) => {
40120
40104
  };
40121
40105
  const copyToClipboard = async () => {
40122
40106
  const toCopy = {
40123
- sdkVersion: "2.59.1",
40107
+ sdkVersion: "2.59.3",
40124
40108
  experiments: Object.fromEntries(allExperimentsWithValues),
40125
40109
  settings: Object.fromEntries(allSettingsWithValues)
40126
40110
  };
@@ -40185,7 +40169,7 @@ const DebugModal = ({ rootLegalEntityId, onExit, getRootLegalEntity }) => {
40185
40169
  /* @__PURE__ */ jsx("div", { className: "adyen-kyc-debug-modal__meta", children: /* @__PURE__ */ jsx("table", { children: /* @__PURE__ */ jsxs("tbody", { children: [
40186
40170
  /* @__PURE__ */ jsx("tr", { children: /* @__PURE__ */ jsxs("td", { children: [
40187
40171
  /* @__PURE__ */ jsx("span", { className: "adyen-kyc-debug-modal__table-key", children: "SDK version" }),
40188
- /* @__PURE__ */ jsx(Tag, { variant: "green", className: "adyen-kyc-tag--large", children: "2.59.1" })
40172
+ /* @__PURE__ */ jsx(Tag, { variant: "green", className: "adyen-kyc-tag--large", children: "2.59.3" })
40189
40173
  ] }) }),
40190
40174
  /* @__PURE__ */ jsx("tr", { children: /* @__PURE__ */ jsxs("td", { children: [
40191
40175
  /* @__PURE__ */ jsx("span", { className: "adyen-kyc-debug-modal__table-key", children: "rootLegalEntityId" }),