@adyen/adyen-web 6.0.0-alpha.5 → 6.0.0-alpha.6

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 (420) hide show
  1. package/dist/cjs/adyen.css +10 -9
  2. package/dist/cjs/adyen.css.map +1 -1
  3. package/dist/cjs/index.cjs +2 -2
  4. package/dist/cjs/index.cjs.map +1 -1
  5. package/dist/cjs/index.d.cts +33 -29
  6. package/dist/es/adyen.css +10 -9
  7. package/dist/es/adyen.css.map +1 -1
  8. package/dist/es/components/Address/Address.js +1 -1
  9. package/dist/es/components/Address/Address.js.map +1 -1
  10. package/dist/es/components/BacsDD/components/BacsInput.js +1 -1
  11. package/dist/es/components/BacsDD/components/BacsInput.js.map +1 -1
  12. package/dist/es/components/Blik/components/BlikInput.js +1 -1
  13. package/dist/es/components/Blik/components/BlikInput.js.map +1 -1
  14. package/dist/es/components/Card/components/CardInput/CardInput.js +1 -1
  15. package/dist/es/components/Card/components/CardInput/CardInput.js.map +1 -1
  16. package/dist/es/components/CashAppPay/CashAppPay.js +1 -1
  17. package/dist/es/components/CashAppPay/CashAppPay.js.map +1 -1
  18. package/dist/es/components/CashAppPay/components/CashAppComponent.js +1 -1
  19. package/dist/es/components/CashAppPay/components/CashAppComponent.js.map +1 -1
  20. package/dist/es/components/Dropin/components/PaymentMethod/InstantPaymentMethods.js.map +1 -1
  21. package/dist/es/components/GooglePay/components/GooglePayButton.js +1 -1
  22. package/dist/es/components/GooglePay/components/GooglePayButton.js.map +1 -1
  23. package/dist/es/components/GooglePay/defaultProps.js +1 -1
  24. package/dist/es/components/GooglePay/defaultProps.js.map +1 -1
  25. package/dist/es/components/PersonalDetails/PersonalDetails.js +1 -1
  26. package/dist/es/components/PersonalDetails/PersonalDetails.js.map +1 -1
  27. package/dist/es/components/internal/Address/Address.js +1 -1
  28. package/dist/es/components/internal/Address/Address.js.map +1 -1
  29. package/dist/es/components/internal/ClickToPay/components/CtPCards/CtPCards.js +1 -1
  30. package/dist/es/components/internal/ClickToPay/components/CtPCards/CtPCards.js.map +1 -1
  31. package/dist/es/components/internal/ClickToPay/components/CtPLogin/CtPLogin.js +1 -1
  32. package/dist/es/components/internal/ClickToPay/components/CtPLogin/CtPLogin.js.map +1 -1
  33. package/dist/es/components/internal/ClickToPay/components/CtPOneTimePassword/CtPOneTimePassword.js +1 -1
  34. package/dist/es/components/internal/ClickToPay/components/CtPOneTimePassword/CtPOneTimePassword.js.map +1 -1
  35. package/dist/es/components/internal/ClickToPay/components/CtPOneTimePassword/CtPOneTimePasswordInput/CtPResendOtpLink.js +1 -1
  36. package/dist/es/components/internal/ClickToPay/components/CtPOneTimePassword/CtPOneTimePasswordInput/CtPResendOtpLink.js.map +1 -1
  37. package/dist/es/components/internal/ClickToPay/services/sdks/AbstractSrcInitiator.js.map +1 -1
  38. package/dist/es/components/internal/ClickToPay/services/sdks/MastercardSdk.js.map +1 -1
  39. package/dist/es/components/internal/ClickToPay/services/sdks/VisaSdk.js.map +1 -1
  40. package/dist/es/components/internal/ClickToPay/services/utils.js +1 -1
  41. package/dist/es/components/internal/ClickToPay/services/utils.js.map +1 -1
  42. package/dist/es/components/internal/CompanyDetails/CompanyDetails.js +1 -1
  43. package/dist/es/components/internal/CompanyDetails/CompanyDetails.js.map +1 -1
  44. package/dist/es/components/internal/FormFields/Field/Field.js +1 -1
  45. package/dist/es/components/internal/FormFields/Field/Field.js.map +1 -1
  46. package/dist/es/components/internal/FormFields/InputBase.js.map +1 -1
  47. package/dist/es/components/internal/FormFields/Select/components/SelectListItem.js +1 -1
  48. package/dist/es/components/internal/FormFields/Select/components/SelectListItem.js.map +1 -1
  49. package/dist/es/components/internal/Icon/constants.js +2 -0
  50. package/dist/es/components/internal/Icon/constants.js.map +1 -0
  51. package/dist/es/components/internal/OpenInvoice/OpenInvoice.js +1 -1
  52. package/dist/es/components/internal/OpenInvoice/OpenInvoice.js.map +1 -1
  53. package/dist/es/components/internal/OpenInvoice/useSRPanelForOpenInvoiceErrors.js +2 -0
  54. package/dist/es/components/internal/OpenInvoice/useSRPanelForOpenInvoiceErrors.js.map +1 -0
  55. package/dist/es/components/internal/QRLoader/QRLoader.js +1 -1
  56. package/dist/es/components/internal/QRLoader/QRLoader.js.map +1 -1
  57. package/dist/es/components/internal/SecuredFields/lib/constants.js +1 -1
  58. package/dist/es/components/internal/SecuredFields/lib/constants.js.map +1 -1
  59. package/dist/es/components/internal/UIElement/UIElement.js +1 -1
  60. package/dist/es/components/internal/UIElement/UIElement.js.map +1 -1
  61. package/dist/es/components/internal/Voucher/Voucher.js +1 -1
  62. package/dist/es/components/internal/Voucher/Voucher.js.map +1 -1
  63. package/dist/es/core/Analytics/Analytics.js +1 -1
  64. package/dist/es/core/Analytics/Analytics.js.map +1 -1
  65. package/dist/es/core/Analytics/constants.js +1 -1
  66. package/dist/es/core/Analytics/constants.js.map +1 -1
  67. package/dist/es/core/Analytics/utils.js.map +1 -1
  68. package/dist/es/core/Context/Resources.js +1 -1
  69. package/dist/es/core/Context/Resources.js.map +1 -1
  70. package/dist/es/core/Environment/Environment.js +1 -1
  71. package/dist/es/core/Environment/Environment.js.map +1 -1
  72. package/dist/es/core/Environment/constants.js +2 -0
  73. package/dist/es/core/Environment/constants.js.map +1 -0
  74. package/dist/es/core/Errors/SRMessages.js +1 -1
  75. package/dist/es/core/Errors/SRMessages.js.map +1 -1
  76. package/dist/es/core/Errors/SRPanel.js +1 -1
  77. package/dist/es/core/Errors/SRPanel.js.map +1 -1
  78. package/dist/es/core/Services/analytics/collect-id.js +1 -1
  79. package/dist/es/core/Services/analytics/collect-id.js.map +1 -1
  80. package/dist/es/core/Services/analytics/log-event.js +1 -1
  81. package/dist/es/core/Services/get-translations.js +1 -1
  82. package/dist/es/core/Services/get-translations.js.map +1 -1
  83. package/dist/es/core/core.defaultProps.js +1 -1
  84. package/dist/es/core/core.defaultProps.js.map +1 -1
  85. package/dist/es/core/core.js +1 -1
  86. package/dist/es/core/core.js.map +1 -1
  87. package/dist/es/core/utils.js +1 -1
  88. package/dist/es/core/utils.js.map +1 -1
  89. package/dist/es/external/preact/dist/preact.js +1 -1
  90. package/dist/es/external/preact/dist/preact.js.map +1 -1
  91. package/dist/es/external/preact/hooks/dist/hooks.js +1 -1
  92. package/dist/es/external/preact/hooks/dist/hooks.js.map +1 -1
  93. package/dist/es/index.d.ts +33 -29
  94. package/dist/es/utils/arrayUtils.js +1 -1
  95. package/dist/es/utils/arrayUtils.js.map +1 -1
  96. package/dist/es/utils/useForm/useForm.js +1 -1
  97. package/dist/es/utils/validator-utils.js +1 -1
  98. package/dist/es/utils/validator-utils.js.map +1 -1
  99. package/dist/es-legacy/adyen.css +10 -9
  100. package/dist/es-legacy/adyen.css.map +1 -1
  101. package/dist/es-legacy/components/ANCV/ANCV.js +1 -1
  102. package/dist/es-legacy/components/ANCV/ANCV.js.map +1 -1
  103. package/dist/es-legacy/components/Ach/Ach.js +1 -1
  104. package/dist/es-legacy/components/Ach/Ach.js.map +1 -1
  105. package/dist/es-legacy/components/Ach/components/AchInput/AchInput.js +1 -1
  106. package/dist/es-legacy/components/Ach/components/AchInput/AchInput.js.map +1 -1
  107. package/dist/es-legacy/components/Address/Address.js +1 -1
  108. package/dist/es-legacy/components/Address/Address.js.map +1 -1
  109. package/dist/es-legacy/components/Affirm/Affirm.js +1 -1
  110. package/dist/es-legacy/components/Affirm/Affirm.js.map +1 -1
  111. package/dist/es-legacy/components/AfterPay/AfterPay.js +1 -1
  112. package/dist/es-legacy/components/AfterPay/AfterPay.js.map +1 -1
  113. package/dist/es-legacy/components/AfterPay/AfterPayB2B.js +1 -1
  114. package/dist/es-legacy/components/AfterPay/AfterPayB2B.js.map +1 -1
  115. package/dist/es-legacy/components/AmazonPay/AmazonPay.js +1 -1
  116. package/dist/es-legacy/components/AmazonPay/AmazonPay.js.map +1 -1
  117. package/dist/es-legacy/components/AmazonPay/components/AmazonPayButton.js +1 -1
  118. package/dist/es-legacy/components/AmazonPay/components/AmazonPayButton.js.map +1 -1
  119. package/dist/es-legacy/components/AmazonPay/components/AmazonPayComponent.js +1 -1
  120. package/dist/es-legacy/components/AmazonPay/components/AmazonPayComponent.js.map +1 -1
  121. package/dist/es-legacy/components/AmazonPay/utils.js +1 -1
  122. package/dist/es-legacy/components/AmazonPay/utils.js.map +1 -1
  123. package/dist/es-legacy/components/ApplePay/ApplePay.js +1 -1
  124. package/dist/es-legacy/components/ApplePay/ApplePay.js.map +1 -1
  125. package/dist/es-legacy/components/Atome/Atome.js +1 -1
  126. package/dist/es-legacy/components/Atome/Atome.js.map +1 -1
  127. package/dist/es-legacy/components/Atome/config.js +1 -1
  128. package/dist/es-legacy/components/Atome/config.js.map +1 -1
  129. package/dist/es-legacy/components/BacsDD/BacsDD.js +1 -1
  130. package/dist/es-legacy/components/BacsDD/BacsDD.js.map +1 -1
  131. package/dist/es-legacy/components/BacsDD/components/BacsInput.js +1 -1
  132. package/dist/es-legacy/components/BacsDD/components/BacsInput.js.map +1 -1
  133. package/dist/es-legacy/components/BankTransfer/BankTransfer.js +1 -1
  134. package/dist/es-legacy/components/BankTransfer/BankTransfer.js.map +1 -1
  135. package/dist/es-legacy/components/BillDesk/BillDeskOnline.js +1 -1
  136. package/dist/es-legacy/components/BillDesk/BillDeskOnline.js.map +1 -1
  137. package/dist/es-legacy/components/BillDesk/BillDeskWallet.js +1 -1
  138. package/dist/es-legacy/components/BillDesk/BillDeskWallet.js.map +1 -1
  139. package/dist/es-legacy/components/Blik/Blik.js +1 -1
  140. package/dist/es-legacy/components/Blik/Blik.js.map +1 -1
  141. package/dist/es-legacy/components/Blik/components/BlikInput.js +1 -1
  142. package/dist/es-legacy/components/Blik/components/BlikInput.js.map +1 -1
  143. package/dist/es-legacy/components/Boleto/Boleto.js +1 -1
  144. package/dist/es-legacy/components/Boleto/Boleto.js.map +1 -1
  145. package/dist/es-legacy/components/Boleto/components/BoletoInput/BoletoInput.js +1 -1
  146. package/dist/es-legacy/components/Boleto/components/BoletoInput/BoletoInput.js.map +1 -1
  147. package/dist/es-legacy/components/Card/Bancontact.js +1 -1
  148. package/dist/es-legacy/components/Card/Bancontact.js.map +1 -1
  149. package/dist/es-legacy/components/Card/Card.js +1 -1
  150. package/dist/es-legacy/components/Card/Card.js.map +1 -1
  151. package/dist/es-legacy/components/Card/components/CardInput/CardInput.js +1 -1
  152. package/dist/es-legacy/components/Card/components/CardInput/CardInput.js.map +1 -1
  153. package/dist/es-legacy/components/Card/components/CardInput/components/IframeLabelAlternative.js +1 -1
  154. package/dist/es-legacy/components/Card/components/CardInput/components/IframeLabelAlternative.js.map +1 -1
  155. package/dist/es-legacy/components/Card/components/CardInput/components/StoredCardFields.js +1 -1
  156. package/dist/es-legacy/components/Card/components/CardInput/components/StoredCardFields.js.map +1 -1
  157. package/dist/es-legacy/components/CashAppPay/CashAppPay.js +1 -1
  158. package/dist/es-legacy/components/CashAppPay/CashAppPay.js.map +1 -1
  159. package/dist/es-legacy/components/CashAppPay/components/CashAppComponent.js +1 -1
  160. package/dist/es-legacy/components/CashAppPay/components/CashAppComponent.js.map +1 -1
  161. package/dist/es-legacy/components/ClickToPay/ClickToPay.js +1 -1
  162. package/dist/es-legacy/components/ClickToPay/ClickToPay.js.map +1 -1
  163. package/dist/es-legacy/components/CustomCard/CustomCard.js +1 -1
  164. package/dist/es-legacy/components/CustomCard/CustomCard.js.map +1 -1
  165. package/dist/es-legacy/components/CustomCard/CustomCardInput/CustomCardInput.js +1 -1
  166. package/dist/es-legacy/components/CustomCard/CustomCardInput/CustomCardInput.js.map +1 -1
  167. package/dist/es-legacy/components/Doku/Doku.js +1 -1
  168. package/dist/es-legacy/components/Doku/Doku.js.map +1 -1
  169. package/dist/es-legacy/components/Donation/Donation.js +1 -1
  170. package/dist/es-legacy/components/Donation/Donation.js.map +1 -1
  171. package/dist/es-legacy/components/Donation/components/DonationComponent.js +1 -1
  172. package/dist/es-legacy/components/Donation/components/DonationComponent.js.map +1 -1
  173. package/dist/es-legacy/components/Dragonpay/Dragonpay.js +1 -1
  174. package/dist/es-legacy/components/Dragonpay/Dragonpay.js.map +1 -1
  175. package/dist/es-legacy/components/Dragonpay/components/DragonpayInput/DragonpayInput.js +1 -1
  176. package/dist/es-legacy/components/Dragonpay/components/DragonpayInput/DragonpayInput.js.map +1 -1
  177. package/dist/es-legacy/components/Dropin/Dropin.js +1 -1
  178. package/dist/es-legacy/components/Dropin/Dropin.js.map +1 -1
  179. package/dist/es-legacy/components/Dropin/components/DropinComponent.js +1 -1
  180. package/dist/es-legacy/components/Dropin/components/DropinComponent.js.map +1 -1
  181. package/dist/es-legacy/components/Dropin/components/PaymentMethod/InstantPaymentMethods.js.map +1 -1
  182. package/dist/es-legacy/components/Dropin/components/PaymentMethod/PaymentMethodItem/PaymentMethodItem.js +1 -1
  183. package/dist/es-legacy/components/Dropin/components/PaymentMethod/PaymentMethodItem/PaymentMethodItem.js.map +1 -1
  184. package/dist/es-legacy/components/Dropin/components/PaymentMethod/PaymentMethodList.js +1 -1
  185. package/dist/es-legacy/components/Dropin/components/PaymentMethod/PaymentMethodList.js.map +1 -1
  186. package/dist/es-legacy/components/Dropin/elements/createInstantPaymentElements.js +1 -1
  187. package/dist/es-legacy/components/Dropin/elements/createInstantPaymentElements.js.map +1 -1
  188. package/dist/es-legacy/components/Dropin/elements/createStoredElements.js +1 -1
  189. package/dist/es-legacy/components/Dropin/elements/createStoredElements.js.map +1 -1
  190. package/dist/es-legacy/components/EPS/index.js +1 -1
  191. package/dist/es-legacy/components/EPS/index.js.map +1 -1
  192. package/dist/es-legacy/components/Econtext/Econtext.js +1 -1
  193. package/dist/es-legacy/components/Econtext/Econtext.js.map +1 -1
  194. package/dist/es-legacy/components/FacilyPay/FacilyPay10x.js +1 -1
  195. package/dist/es-legacy/components/FacilyPay/FacilyPay10x.js.map +1 -1
  196. package/dist/es-legacy/components/FacilyPay/FacilyPay12x.js +1 -1
  197. package/dist/es-legacy/components/FacilyPay/FacilyPay12x.js.map +1 -1
  198. package/dist/es-legacy/components/FacilyPay/FacilyPay3x.js +1 -1
  199. package/dist/es-legacy/components/FacilyPay/FacilyPay3x.js.map +1 -1
  200. package/dist/es-legacy/components/FacilyPay/FacilyPay4x.js +1 -1
  201. package/dist/es-legacy/components/FacilyPay/FacilyPay4x.js.map +1 -1
  202. package/dist/es-legacy/components/FacilyPay/FacilyPay6x.js +1 -1
  203. package/dist/es-legacy/components/FacilyPay/FacilyPay6x.js.map +1 -1
  204. package/dist/es-legacy/components/Giftcard/Giftcard.js +1 -1
  205. package/dist/es-legacy/components/Giftcard/Giftcard.js.map +1 -1
  206. package/dist/es-legacy/components/Giftcard/components/GiftcardComponent.js +1 -1
  207. package/dist/es-legacy/components/Giftcard/components/GiftcardComponent.js.map +1 -1
  208. package/dist/es-legacy/components/Giftcard/components/GiftcardFields.js +1 -1
  209. package/dist/es-legacy/components/Giftcard/components/GiftcardFields.js.map +1 -1
  210. package/dist/es-legacy/components/Giropay/Giropay.js +1 -1
  211. package/dist/es-legacy/components/Giropay/Giropay.js.map +1 -1
  212. package/dist/es-legacy/components/GooglePay/GooglePay.js +1 -1
  213. package/dist/es-legacy/components/GooglePay/GooglePay.js.map +1 -1
  214. package/dist/es-legacy/components/GooglePay/components/GooglePayButton.js +1 -1
  215. package/dist/es-legacy/components/GooglePay/components/GooglePayButton.js.map +1 -1
  216. package/dist/es-legacy/components/GooglePay/defaultProps.js +1 -1
  217. package/dist/es-legacy/components/GooglePay/defaultProps.js.map +1 -1
  218. package/dist/es-legacy/components/Klarna/KlarnaPayments.js +1 -1
  219. package/dist/es-legacy/components/Klarna/KlarnaPayments.js.map +1 -1
  220. package/dist/es-legacy/components/Klarna/components/KlarnaContainer/KlarnaContainer.js +1 -1
  221. package/dist/es-legacy/components/Klarna/components/KlarnaContainer/KlarnaContainer.js.map +1 -1
  222. package/dist/es-legacy/components/MBWay/MBWay.js +1 -1
  223. package/dist/es-legacy/components/MBWay/MBWay.js.map +1 -1
  224. package/dist/es-legacy/components/MBWay/components/MBWayInput/MBWayInput.js +1 -1
  225. package/dist/es-legacy/components/MBWay/components/MBWayInput/MBWayInput.js.map +1 -1
  226. package/dist/es-legacy/components/MealVoucherFR/MealVoucherFR.js +1 -1
  227. package/dist/es-legacy/components/MealVoucherFR/MealVoucherFR.js.map +1 -1
  228. package/dist/es-legacy/components/MealVoucherFR/components/MealVoucherFields.js +1 -1
  229. package/dist/es-legacy/components/MealVoucherFR/components/MealVoucherFields.js.map +1 -1
  230. package/dist/es-legacy/components/Multibanco/Multibanco.js +1 -1
  231. package/dist/es-legacy/components/Multibanco/Multibanco.js.map +1 -1
  232. package/dist/es-legacy/components/OnlineBankingCZ/index.js +1 -1
  233. package/dist/es-legacy/components/OnlineBankingCZ/index.js.map +1 -1
  234. package/dist/es-legacy/components/OnlineBankingIN/index.js +1 -1
  235. package/dist/es-legacy/components/OnlineBankingIN/index.js.map +1 -1
  236. package/dist/es-legacy/components/OnlineBankingPL/OnlineBankingPL.js +1 -1
  237. package/dist/es-legacy/components/OnlineBankingPL/OnlineBankingPL.js.map +1 -1
  238. package/dist/es-legacy/components/OnlineBankingSK/index.js +1 -1
  239. package/dist/es-legacy/components/OnlineBankingSK/index.js.map +1 -1
  240. package/dist/es-legacy/components/Oxxo/Oxxo.js +1 -1
  241. package/dist/es-legacy/components/Oxxo/Oxxo.js.map +1 -1
  242. package/dist/es-legacy/components/PayByBank/PayByBank.js +1 -1
  243. package/dist/es-legacy/components/PayByBank/PayByBank.js.map +1 -1
  244. package/dist/es-legacy/components/PayPal/Paypal.js +1 -1
  245. package/dist/es-legacy/components/PayPal/Paypal.js.map +1 -1
  246. package/dist/es-legacy/components/PayPal/components/PaypalButtons.js +1 -1
  247. package/dist/es-legacy/components/PayPal/components/PaypalButtons.js.map +1 -1
  248. package/dist/es-legacy/components/PayPal/components/PaypalComponent.js +1 -1
  249. package/dist/es-legacy/components/PayPal/components/PaypalComponent.js.map +1 -1
  250. package/dist/es-legacy/components/PayPal/utils/get-paypal-settings.js +1 -1
  251. package/dist/es-legacy/components/PayPal/utils/get-paypal-settings.js.map +1 -1
  252. package/dist/es-legacy/components/PayU/PayuCashcard.js +1 -1
  253. package/dist/es-legacy/components/PayU/PayuCashcard.js.map +1 -1
  254. package/dist/es-legacy/components/PayU/PayuNetBanking.js +1 -1
  255. package/dist/es-legacy/components/PayU/PayuNetBanking.js.map +1 -1
  256. package/dist/es-legacy/components/PersonalDetails/PersonalDetails.js +1 -1
  257. package/dist/es-legacy/components/PersonalDetails/PersonalDetails.js.map +1 -1
  258. package/dist/es-legacy/components/Pix/Pix.js +1 -1
  259. package/dist/es-legacy/components/Pix/Pix.js.map +1 -1
  260. package/dist/es-legacy/components/RatePay/RatePay.js +1 -1
  261. package/dist/es-legacy/components/RatePay/RatePay.js.map +1 -1
  262. package/dist/es-legacy/components/RatePay/RatePayDirectDebit.js +1 -1
  263. package/dist/es-legacy/components/RatePay/RatePayDirectDebit.js.map +1 -1
  264. package/dist/es-legacy/components/Redirect/Redirect.js +1 -1
  265. package/dist/es-legacy/components/Redirect/Redirect.js.map +1 -1
  266. package/dist/es-legacy/components/Riverty/Riverty.js +1 -1
  267. package/dist/es-legacy/components/Riverty/Riverty.js.map +1 -1
  268. package/dist/es-legacy/components/Sepa/Sepa.js +1 -1
  269. package/dist/es-legacy/components/Sepa/Sepa.js.map +1 -1
  270. package/dist/es-legacy/components/ThreeDS2/ThreeDS2Challenge.js +1 -1
  271. package/dist/es-legacy/components/ThreeDS2/ThreeDS2Challenge.js.map +1 -1
  272. package/dist/es-legacy/components/ThreeDS2/ThreeDS2DeviceFingerprint.js +1 -1
  273. package/dist/es-legacy/components/ThreeDS2/ThreeDS2DeviceFingerprint.js.map +1 -1
  274. package/dist/es-legacy/components/ThreeDS2/components/Challenge/PrepareChallenge3DS2.js +1 -1
  275. package/dist/es-legacy/components/ThreeDS2/components/Challenge/PrepareChallenge3DS2.js.map +1 -1
  276. package/dist/es-legacy/components/ThreeDS2/components/DeviceFingerprint/PrepareFingerprint3DS2.js +1 -1
  277. package/dist/es-legacy/components/ThreeDS2/components/DeviceFingerprint/PrepareFingerprint3DS2.js.map +1 -1
  278. package/dist/es-legacy/components/Trustly/Trustly.js +1 -1
  279. package/dist/es-legacy/components/Trustly/Trustly.js.map +1 -1
  280. package/dist/es-legacy/components/Twint/Twint.js +1 -1
  281. package/dist/es-legacy/components/Twint/Twint.js.map +1 -1
  282. package/dist/es-legacy/components/UPI/UPI.js +1 -1
  283. package/dist/es-legacy/components/UPI/UPI.js.map +1 -1
  284. package/dist/es-legacy/components/WalletIN/index.js +1 -1
  285. package/dist/es-legacy/components/WalletIN/index.js.map +1 -1
  286. package/dist/es-legacy/components/helpers/IssuerListContainer/IssuerListContainer.js +1 -1
  287. package/dist/es-legacy/components/helpers/IssuerListContainer/IssuerListContainer.js.map +1 -1
  288. package/dist/es-legacy/components/helpers/OpenInvoiceContainer/OpenInvoiceContainer.js +1 -1
  289. package/dist/es-legacy/components/helpers/OpenInvoiceContainer/OpenInvoiceContainer.js.map +1 -1
  290. package/dist/es-legacy/components/helpers/QRLoaderContainer/QRLoaderContainer.js +1 -1
  291. package/dist/es-legacy/components/helpers/QRLoaderContainer/QRLoaderContainer.js.map +1 -1
  292. package/dist/es-legacy/components/internal/Address/Address.js +1 -1
  293. package/dist/es-legacy/components/internal/Address/Address.js.map +1 -1
  294. package/dist/es-legacy/components/internal/Address/components/CountryField.js +1 -1
  295. package/dist/es-legacy/components/internal/Address/components/CountryField.js.map +1 -1
  296. package/dist/es-legacy/components/internal/BaseElement/BaseElement.js +1 -1
  297. package/dist/es-legacy/components/internal/BaseElement/BaseElement.js.map +1 -1
  298. package/dist/es-legacy/components/internal/ClickToPay/components/CtPCards/CtPCards.js +1 -1
  299. package/dist/es-legacy/components/internal/ClickToPay/components/CtPCards/CtPCards.js.map +1 -1
  300. package/dist/es-legacy/components/internal/ClickToPay/components/CtPLogin/CtPLogin.js +1 -1
  301. package/dist/es-legacy/components/internal/ClickToPay/components/CtPLogin/CtPLogin.js.map +1 -1
  302. package/dist/es-legacy/components/internal/ClickToPay/components/CtPOneTimePassword/CtPOneTimePassword.js +1 -1
  303. package/dist/es-legacy/components/internal/ClickToPay/components/CtPOneTimePassword/CtPOneTimePassword.js.map +1 -1
  304. package/dist/es-legacy/components/internal/ClickToPay/components/CtPOneTimePassword/CtPOneTimePasswordInput/CtPResendOtpLink.js +1 -1
  305. package/dist/es-legacy/components/internal/ClickToPay/components/CtPOneTimePassword/CtPOneTimePasswordInput/CtPResendOtpLink.js.map +1 -1
  306. package/dist/es-legacy/components/internal/ClickToPay/services/ClickToPayService.js +1 -1
  307. package/dist/es-legacy/components/internal/ClickToPay/services/ClickToPayService.js.map +1 -1
  308. package/dist/es-legacy/components/internal/ClickToPay/services/sdks/AbstractSrcInitiator.js.map +1 -1
  309. package/dist/es-legacy/components/internal/ClickToPay/services/sdks/MastercardSdk.js +1 -1
  310. package/dist/es-legacy/components/internal/ClickToPay/services/sdks/MastercardSdk.js.map +1 -1
  311. package/dist/es-legacy/components/internal/ClickToPay/services/sdks/VisaSdk.js +1 -1
  312. package/dist/es-legacy/components/internal/ClickToPay/services/sdks/VisaSdk.js.map +1 -1
  313. package/dist/es-legacy/components/internal/ClickToPay/services/utils.js +1 -1
  314. package/dist/es-legacy/components/internal/ClickToPay/services/utils.js.map +1 -1
  315. package/dist/es-legacy/components/internal/CompanyDetails/CompanyDetails.js +1 -1
  316. package/dist/es-legacy/components/internal/CompanyDetails/CompanyDetails.js.map +1 -1
  317. package/dist/es-legacy/components/internal/FormFields/Checkbox/Checkbox.js +1 -1
  318. package/dist/es-legacy/components/internal/FormFields/Checkbox/Checkbox.js.map +1 -1
  319. package/dist/es-legacy/components/internal/FormFields/Field/Field.js +1 -1
  320. package/dist/es-legacy/components/internal/FormFields/Field/Field.js.map +1 -1
  321. package/dist/es-legacy/components/internal/FormFields/InputBase.js +1 -1
  322. package/dist/es-legacy/components/internal/FormFields/InputBase.js.map +1 -1
  323. package/dist/es-legacy/components/internal/FormFields/InputDate/InputDate.js +1 -1
  324. package/dist/es-legacy/components/internal/FormFields/InputDate/InputDate.js.map +1 -1
  325. package/dist/es-legacy/components/internal/FormFields/InputEmail.js +1 -1
  326. package/dist/es-legacy/components/internal/FormFields/InputEmail.js.map +1 -1
  327. package/dist/es-legacy/components/internal/FormFields/InputTelephone.js +1 -1
  328. package/dist/es-legacy/components/internal/FormFields/InputTelephone.js.map +1 -1
  329. package/dist/es-legacy/components/internal/FormFields/InputText.js +1 -1
  330. package/dist/es-legacy/components/internal/FormFields/InputText.js.map +1 -1
  331. package/dist/es-legacy/components/internal/FormFields/Select/components/SelectButton.js +1 -1
  332. package/dist/es-legacy/components/internal/FormFields/Select/components/SelectButton.js.map +1 -1
  333. package/dist/es-legacy/components/internal/FormFields/Select/components/SelectListItem.js +1 -1
  334. package/dist/es-legacy/components/internal/FormFields/Select/components/SelectListItem.js.map +1 -1
  335. package/dist/es-legacy/components/internal/IbanInput/IbanInput.js +1 -1
  336. package/dist/es-legacy/components/internal/IbanInput/IbanInput.js.map +1 -1
  337. package/dist/es-legacy/components/internal/Icon/constants.js +2 -0
  338. package/dist/es-legacy/components/internal/Icon/constants.js.map +1 -0
  339. package/dist/es-legacy/components/internal/Img/Img.js +1 -1
  340. package/dist/es-legacy/components/internal/Img/Img.js.map +1 -1
  341. package/dist/es-legacy/components/internal/IssuerList/IssuerButtonGroup/IssuerButtonGroup.js +1 -1
  342. package/dist/es-legacy/components/internal/IssuerList/IssuerButtonGroup/IssuerButtonGroup.js.map +1 -1
  343. package/dist/es-legacy/components/internal/OpenInvoice/OpenInvoice.js +1 -1
  344. package/dist/es-legacy/components/internal/OpenInvoice/OpenInvoice.js.map +1 -1
  345. package/dist/es-legacy/components/internal/OpenInvoice/useSRPanelForOpenInvoiceErrors.js +2 -0
  346. package/dist/es-legacy/components/internal/OpenInvoice/useSRPanelForOpenInvoiceErrors.js.map +1 -0
  347. package/dist/es-legacy/components/internal/PayButton/PayButton.js +1 -1
  348. package/dist/es-legacy/components/internal/PayButton/PayButton.js.map +1 -1
  349. package/dist/es-legacy/components/internal/PersonalDetails/PersonalDetails.js +1 -1
  350. package/dist/es-legacy/components/internal/PersonalDetails/PersonalDetails.js.map +1 -1
  351. package/dist/es-legacy/components/internal/PhoneInput/PhoneInput.js +1 -1
  352. package/dist/es-legacy/components/internal/PhoneInput/PhoneInput.js.map +1 -1
  353. package/dist/es-legacy/components/internal/QRLoader/QRLoader.js +1 -1
  354. package/dist/es-legacy/components/internal/QRLoader/QRLoader.js.map +1 -1
  355. package/dist/es-legacy/components/internal/RedirectButton/RedirectButton.js +1 -1
  356. package/dist/es-legacy/components/internal/RedirectButton/RedirectButton.js.map +1 -1
  357. package/dist/es-legacy/components/internal/SecuredFields/SFP/SecuredFieldsProvider.js +1 -1
  358. package/dist/es-legacy/components/internal/SecuredFields/SFP/SecuredFieldsProvider.js.map +1 -1
  359. package/dist/es-legacy/components/internal/SecuredFields/SFP/SecuredFieldsProviderHandlers.js +1 -1
  360. package/dist/es-legacy/components/internal/SecuredFields/SFP/SecuredFieldsProviderHandlers.js.map +1 -1
  361. package/dist/es-legacy/components/internal/SecuredFields/lib/CSF/extensions/handleBrandFromBinLookup.js +1 -1
  362. package/dist/es-legacy/components/internal/SecuredFields/lib/CSF/extensions/handleBrandFromBinLookup.js.map +1 -1
  363. package/dist/es-legacy/components/internal/SecuredFields/lib/constants.js +1 -1
  364. package/dist/es-legacy/components/internal/SecuredFields/lib/constants.js.map +1 -1
  365. package/dist/es-legacy/components/internal/SecuredFields/lib/securedField/SecuredField.js +1 -1
  366. package/dist/es-legacy/components/internal/SecuredFields/lib/securedField/SecuredField.js.map +1 -1
  367. package/dist/es-legacy/components/internal/SecuredFields/lib/securedField/utils/processAriaConfig.js +1 -1
  368. package/dist/es-legacy/components/internal/SecuredFields/lib/securedField/utils/processAriaConfig.js.map +1 -1
  369. package/dist/es-legacy/components/internal/UIElement/UIElement.js +1 -1
  370. package/dist/es-legacy/components/internal/UIElement/UIElement.js.map +1 -1
  371. package/dist/es-legacy/components/internal/Voucher/Voucher.js +1 -1
  372. package/dist/es-legacy/components/internal/Voucher/Voucher.js.map +1 -1
  373. package/dist/es-legacy/core/Analytics/Analytics.js +1 -1
  374. package/dist/es-legacy/core/Analytics/Analytics.js.map +1 -1
  375. package/dist/es-legacy/core/Analytics/constants.js +1 -1
  376. package/dist/es-legacy/core/Analytics/constants.js.map +1 -1
  377. package/dist/es-legacy/core/Analytics/utils.js.map +1 -1
  378. package/dist/es-legacy/core/Context/Resources.js +1 -1
  379. package/dist/es-legacy/core/Context/Resources.js.map +1 -1
  380. package/dist/es-legacy/core/Environment/Environment.js +1 -1
  381. package/dist/es-legacy/core/Environment/Environment.js.map +1 -1
  382. package/dist/es-legacy/core/Environment/constants.js +2 -0
  383. package/dist/es-legacy/core/Environment/constants.js.map +1 -0
  384. package/dist/es-legacy/core/Errors/SRPanel.js +1 -1
  385. package/dist/es-legacy/core/Errors/SRPanel.js.map +1 -1
  386. package/dist/es-legacy/core/ProcessResponse/PaymentAction/actionTypes.js +1 -1
  387. package/dist/es-legacy/core/ProcessResponse/PaymentAction/actionTypes.js.map +1 -1
  388. package/dist/es-legacy/core/ProcessResponse/PaymentMethods/utils.js +1 -1
  389. package/dist/es-legacy/core/ProcessResponse/PaymentMethods/utils.js.map +1 -1
  390. package/dist/es-legacy/core/ProcessResponse/process-response.js +1 -1
  391. package/dist/es-legacy/core/ProcessResponse/process-response.js.map +1 -1
  392. package/dist/es-legacy/core/RiskModule/RiskModule.js +1 -1
  393. package/dist/es-legacy/core/RiskModule/RiskModule.js.map +1 -1
  394. package/dist/es-legacy/core/Services/analytics/collect-id.js +1 -1
  395. package/dist/es-legacy/core/Services/analytics/collect-id.js.map +1 -1
  396. package/dist/es-legacy/core/Services/analytics/log-event.js +1 -1
  397. package/dist/es-legacy/core/Services/get-translations.js +1 -1
  398. package/dist/es-legacy/core/Services/get-translations.js.map +1 -1
  399. package/dist/es-legacy/core/Services/http.js +1 -1
  400. package/dist/es-legacy/core/Services/http.js.map +1 -1
  401. package/dist/es-legacy/core/core.defaultProps.js +1 -1
  402. package/dist/es-legacy/core/core.defaultProps.js.map +1 -1
  403. package/dist/es-legacy/core/core.js +1 -1
  404. package/dist/es-legacy/core/core.js.map +1 -1
  405. package/dist/es-legacy/core/core.registry.js +1 -1
  406. package/dist/es-legacy/core/core.registry.js.map +1 -1
  407. package/dist/es-legacy/core/utils.js +1 -1
  408. package/dist/es-legacy/core/utils.js.map +1 -1
  409. package/dist/es-legacy/external/preact/dist/preact.js +1 -1
  410. package/dist/es-legacy/external/preact/dist/preact.js.map +1 -1
  411. package/dist/es-legacy/external/preact/hooks/dist/hooks.js +1 -1
  412. package/dist/es-legacy/external/preact/hooks/dist/hooks.js.map +1 -1
  413. package/dist/es-legacy/utils/arrayUtils.js +1 -1
  414. package/dist/es-legacy/utils/arrayUtils.js.map +1 -1
  415. package/dist/es-legacy/utils/useForm/reducer.js +1 -1
  416. package/dist/es-legacy/utils/useForm/reducer.js.map +1 -1
  417. package/dist/es-legacy/utils/useForm/useForm.js +1 -1
  418. package/dist/es-legacy/utils/validator-utils.js +1 -1
  419. package/dist/es-legacy/utils/validator-utils.js.map +1 -1
  420. package/package.json +146 -148
@@ -1,2 +1,2 @@
1
- const e="https://checkoutshopper-live.adyen.com/checkoutshopper/",c=(c="",t)=>{if(t)return t;return{test:"https://checkoutshopper-test.adyen.com/checkoutshopper/",live:"https://checkoutshopper-live.adyen.com/checkoutshopper/","live-us":"https://checkoutshopper-live-us.adyen.com/checkoutshopper/","live-au":"https://checkoutshopper-live-au.adyen.com/checkoutshopper/","live-apse":"https://checkoutshopper-live-apse.adyen.com/checkoutshopper/","live-in":"https://checkoutshopper-live-in.adyen.com/checkoutshopper/"}[c.toLowerCase()]||e},t="https://checkoutshopper-live.adyen.com/checkoutshopper/",o=(e="",c)=>{if(c)return c;return{beta:"https://cdf6519016.cdn.adyen.com/checkoutshopper/",test:"https://checkoutshopper-test.adyen.com/checkoutshopper/",live:"https://checkoutshopper-live.adyen.com/checkoutshopper/","live-us":"https://checkoutshopper-live-us.adyen.com/checkoutshopper/","live-au":"https://checkoutshopper-live-au.adyen.com/checkoutshopper/","live-apse":"https://checkoutshopper-live-apse.adyen.com/checkoutshopper/","live-in":"https://checkoutshopper-live-in.adyen.com/checkoutshopper/"}[e.toLowerCase()]||t},h="https://checkoutanalytics-live.adyen.com/checkoutanalytics/",s=(e=h)=>{const c={test:"https://checkoutanalytics-test.adyen.com/checkoutanalytics/",live:"https://checkoutanalytics-live.adyen.com/checkoutanalytics/","live-us":"https://checkoutanalytics-live-us.adyen.com/checkoutanalytics/","live-au":"https://checkoutanalytics-live-au.adyen.com/checkoutanalytics/","live-apse":"https://checkoutanalytics-live-apse.adyen.com/checkoutanalytics/","live-in":"https://checkoutanalytics-live-in.adyen.com/checkoutanalytics/"};return c[e]||c[e.toLowerCase()]||e};export{h as FALLBACK_ANALYTICS_CONTEXT,t as FALLBACK_CDN_CONTEXT,e as FALLBACK_CONTEXT,s as resolveAnalyticsEnvironment,o as resolveCDNEnvironment,c as resolveEnvironment};
1
+ import{API_ENVIRONMENTS as a,ANALYTICS_ENVIRONMENTS as n,CDN_ENVIRONMENTS as s}from"./constants.js";const t=(a="",n,s)=>s||(n[a.toLowerCase()]||n.fallback),l=(l,r)=>({apiUrl:t(l,a,r?.api),analyticsUrl:t(l,n,r?.analytics),cdnImagesUrl:t(l,s,r?.cdn?.images),cdnTranslationsUrl:t(l,s,r?.cdn?.translations)});export{l as resolveEnvironments};
2
2
  //# sourceMappingURL=Environment.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Environment.js","sources":["../../../../src/core/Environment/Environment.ts"],"sourcesContent":["export const FALLBACK_CONTEXT = 'https://checkoutshopper-live.adyen.com/checkoutshopper/';\nexport const resolveEnvironment = (env = '', environmentUrl?: string): string => {\n if (environmentUrl) {\n return environmentUrl;\n }\n\n const environments = {\n test: 'https://checkoutshopper-test.adyen.com/checkoutshopper/',\n live: 'https://checkoutshopper-live.adyen.com/checkoutshopper/',\n 'live-us': 'https://checkoutshopper-live-us.adyen.com/checkoutshopper/',\n 'live-au': 'https://checkoutshopper-live-au.adyen.com/checkoutshopper/',\n 'live-apse': 'https://checkoutshopper-live-apse.adyen.com/checkoutshopper/',\n 'live-in': 'https://checkoutshopper-live-in.adyen.com/checkoutshopper/'\n };\n\n return environments[env.toLowerCase()] || FALLBACK_CONTEXT;\n};\n\nexport const FALLBACK_CDN_CONTEXT = 'https://checkoutshopper-live.adyen.com/checkoutshopper/';\nexport const resolveCDNEnvironment = (env = '', environmentUrl?: string) => {\n if (environmentUrl) {\n return environmentUrl;\n }\n\n const environments = {\n beta: 'https://cdf6519016.cdn.adyen.com/checkoutshopper/',\n test: 'https://checkoutshopper-test.adyen.com/checkoutshopper/',\n live: 'https://checkoutshopper-live.adyen.com/checkoutshopper/',\n 'live-us': 'https://checkoutshopper-live-us.adyen.com/checkoutshopper/',\n 'live-au': 'https://checkoutshopper-live-au.adyen.com/checkoutshopper/',\n 'live-apse': 'https://checkoutshopper-live-apse.adyen.com/checkoutshopper/',\n 'live-in': 'https://checkoutshopper-live-in.adyen.com/checkoutshopper/'\n };\n\n return environments[env.toLowerCase()] || FALLBACK_CDN_CONTEXT;\n};\n\nexport const FALLBACK_ANALYTICS_CONTEXT = 'https://checkoutanalytics-live.adyen.com/checkoutanalytics/';\n\nexport const resolveAnalyticsEnvironment = (env: string = FALLBACK_ANALYTICS_CONTEXT) => {\n const environments = {\n test: 'https://checkoutanalytics-test.adyen.com/checkoutanalytics/',\n live: 'https://checkoutanalytics-live.adyen.com/checkoutanalytics/',\n 'live-us': 'https://checkoutanalytics-live-us.adyen.com/checkoutanalytics/',\n 'live-au': 'https://checkoutanalytics-live-au.adyen.com/checkoutanalytics/',\n 'live-apse': 'https://checkoutanalytics-live-apse.adyen.com/checkoutanalytics/',\n 'live-in': 'https://checkoutanalytics-live-in.adyen.com/checkoutanalytics/'\n };\n\n return environments[env] || environments[env.toLowerCase()] || env;\n};\n"],"names":["FALLBACK_CONTEXT","resolveEnvironment","env","environmentUrl","test","live","toLowerCase","FALLBACK_CDN_CONTEXT","resolveCDNEnvironment","beta","FALLBACK_ANALYTICS_CONTEXT","resolveAnalyticsEnvironment","environments"],"mappings":"AAAO,MAAMA,EAAmB,0DACnBC,EAAqB,CAACC,EAAM,GAAIC,KACzC,GAAIA,EACA,OAAOA,EAYX,MATqB,CACjBC,KAAM,0DACNC,KAAM,0DACN,UAAW,6DACX,UAAW,6DACX,YAAa,+DACb,UAAW,8DAGKH,EAAII,gBAAkBN,CAAAA,EAGjCO,EAAuB,0DACvBC,EAAwB,CAACN,EAAM,GAAIC,KAC5C,GAAIA,EACA,OAAOA,EAaX,MAVqB,CACjBM,KAAM,oDACNL,KAAM,0DACNC,KAAM,0DACN,UAAW,6DACX,UAAW,6DACX,YAAa,+DACb,UAAW,8DAGKH,EAAII,gBAAkBC,CAAAA,EAGjCG,EAA6B,8DAE7BC,EAA8B,CAACT,EAAcQ,KACtD,MAAME,EAAe,CACjBR,KAAM,8DACNC,KAAM,8DACN,UAAW,iEACX,UAAW,iEACX,YAAa,mEACb,UAAW,kEAGf,OAAOO,EAAaV,IAAQU,EAAaV,EAAII,gBAAkBJ,CAAAA"}
1
+ {"version":3,"file":"Environment.js","sources":["../../../../src/core/Environment/Environment.ts"],"sourcesContent":["import { ANALYTICS_ENVIRONMENTS, API_ENVIRONMENTS, CDN_ENVIRONMENTS } from './constants';\nimport type { CoreConfiguration } from '../types';\n\nconst getUrlFromMap = (env: CoreConfiguration['environment'] = '', environmentMap: Record<string, string>, environmentUrl?: string): string => {\n if (environmentUrl) {\n return environmentUrl;\n }\n return environmentMap[env.toLowerCase()] || environmentMap.fallback;\n};\n\nexport const resolveEnvironments = (environment: CoreConfiguration['environment'], environmentsUrls?: CoreConfiguration['_environmentUrls']) => {\n const apiUrl = getUrlFromMap(environment, API_ENVIRONMENTS, environmentsUrls?.api);\n const analyticsUrl = getUrlFromMap(environment, ANALYTICS_ENVIRONMENTS, environmentsUrls?.analytics);\n const cdnImagesUrl = getUrlFromMap(environment, CDN_ENVIRONMENTS, environmentsUrls?.cdn?.images);\n const cdnTranslationsUrl =\n process.env.NODE_ENV === 'development' ? '/' : getUrlFromMap(environment, CDN_ENVIRONMENTS, environmentsUrls?.cdn?.translations);\n\n return {\n apiUrl,\n analyticsUrl,\n cdnImagesUrl,\n cdnTranslationsUrl\n };\n};\n"],"names":["getUrlFromMap","env","environmentMap","environmentUrl","toLowerCase","fallback","resolveEnvironments","environment","environmentsUrls","apiUrl","API_ENVIRONMENTS","api","analyticsUrl","ANALYTICS_ENVIRONMENTS","analytics","cdnImagesUrl","CDN_ENVIRONMENTS","cdn","images","cdnTranslationsUrl","translations"],"mappings":"oGAGA,MAAMA,EAAgB,CAACC,EAAwC,GAAIC,EAAwCC,IACnGA,IAGGD,EAAeD,EAAIG,gBAAkBF,EAAeG,UAGlDC,EAAsB,CAACC,EAA+CC,KAOxE,CACHC,OAPWT,EAAcO,EAAaG,EAAkBF,GAAkBG,KAQ1EC,aAPiBZ,EAAcO,EAAaM,EAAwBL,GAAkBM,WAQtFC,aAPiBf,EAAcO,EAAaS,EAAkBR,GAAkBS,KAAKC,QAQrFC,mBAN+CnB,EAAcO,EAAaS,EAAkBR,GAAkBS,KAAKG"}
@@ -0,0 +1,2 @@
1
+ const c={test:"https://checkoutshopper-test.adyen.com/checkoutshopper/",live:"https://checkoutshopper-live.adyen.com/checkoutshopper/","live-us":"https://checkoutshopper-live-us.adyen.com/checkoutshopper/","live-au":"https://checkoutshopper-live-au.adyen.com/checkoutshopper/","live-apse":"https://checkoutshopper-live-apse.adyen.com/checkoutshopper/","live-in":"https://checkoutshopper-live-in.adyen.com/checkoutshopper/",fallback:"https://checkoutshopper-live.adyen.com/checkoutshopper/"},e={test:"https://cdf6519016.cdn.adyen.com/checkoutshopper/",live:"https://bae81f955b.cdn.adyen.com/checkoutshopper/","live-us":"https://26280c4f4d.cdn.adyen.com/checkoutshopper/","live-au":"https://1706f728fe.cdn.adyen.com/checkoutshopper/","live-apse":"https://0688ecafff.cdn.adyen.com/checkoutshopper/","live-in":"https://0b777a1160.cdn.adyen.com/checkoutshopper/",fallback:"https://bae81f955b.cdn.adyen.com/checkoutshopper/"},t={test:"https://checkoutanalytics-test.adyen.com/checkoutanalytics/",live:"https://checkoutanalytics-live.adyen.com/checkoutanalytics/","live-us":"https://checkoutanalytics-live-us.adyen.com/checkoutanalytics/","live-au":"https://checkoutanalytics-live-au.adyen.com/checkoutanalytics/","live-apse":"https://checkoutanalytics-live-apse.adyen.com/checkoutanalytics/","live-in":"https://checkoutanalytics-live-in.adyen.com/checkoutanalytics/",fallback:"https://checkoutanalytics-live.adyen.com/checkoutanalytics/"};export{t as ANALYTICS_ENVIRONMENTS,c as API_ENVIRONMENTS,e as CDN_ENVIRONMENTS};
2
+ //# sourceMappingURL=constants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.js","sources":["../../../../src/core/Environment/constants.ts"],"sourcesContent":["const API_ENVIRONMENTS = {\n test: 'https://checkoutshopper-test.adyen.com/checkoutshopper/',\n live: 'https://checkoutshopper-live.adyen.com/checkoutshopper/',\n 'live-us': 'https://checkoutshopper-live-us.adyen.com/checkoutshopper/',\n 'live-au': 'https://checkoutshopper-live-au.adyen.com/checkoutshopper/',\n 'live-apse': 'https://checkoutshopper-live-apse.adyen.com/checkoutshopper/',\n 'live-in': 'https://checkoutshopper-live-in.adyen.com/checkoutshopper/',\n fallback: 'https://checkoutshopper-live.adyen.com/checkoutshopper/'\n};\n\nconst CDN_ENVIRONMENTS = {\n test: 'https://cdf6519016.cdn.adyen.com/checkoutshopper/',\n live: 'https://bae81f955b.cdn.adyen.com/checkoutshopper/',\n 'live-us': 'https://26280c4f4d.cdn.adyen.com/checkoutshopper/',\n 'live-au': 'https://1706f728fe.cdn.adyen.com/checkoutshopper/',\n 'live-apse': 'https://0688ecafff.cdn.adyen.com/checkoutshopper/',\n 'live-in': 'https://0b777a1160.cdn.adyen.com/checkoutshopper/',\n fallback: 'https://bae81f955b.cdn.adyen.com/checkoutshopper/'\n};\n\nconst ANALYTICS_ENVIRONMENTS = {\n test: 'https://checkoutanalytics-test.adyen.com/checkoutanalytics/',\n live: 'https://checkoutanalytics-live.adyen.com/checkoutanalytics/',\n 'live-us': 'https://checkoutanalytics-live-us.adyen.com/checkoutanalytics/',\n 'live-au': 'https://checkoutanalytics-live-au.adyen.com/checkoutanalytics/',\n 'live-apse': 'https://checkoutanalytics-live-apse.adyen.com/checkoutanalytics/',\n 'live-in': 'https://checkoutanalytics-live-in.adyen.com/checkoutanalytics/',\n fallback: 'https://checkoutanalytics-live.adyen.com/checkoutanalytics/'\n};\n\nexport { API_ENVIRONMENTS, CDN_ENVIRONMENTS, ANALYTICS_ENVIRONMENTS };\n"],"names":["API_ENVIRONMENTS","test","live","fallback","CDN_ENVIRONMENTS","ANALYTICS_ENVIRONMENTS"],"mappings":"AAAA,MAAMA,EAAmB,CACrBC,KAAM,0DACNC,KAAM,0DACN,UAAW,6DACX,UAAW,6DACX,YAAa,+DACb,UAAW,6DACXC,SAAU,2DAGRC,EAAmB,CACrBH,KAAM,oDACNC,KAAM,oDACN,UAAW,oDACX,UAAW,oDACX,YAAa,oDACb,UAAW,oDACXC,SAAU,qDAGRE,EAAyB,CAC3BJ,KAAM,8DACNC,KAAM,8DACN,UAAW,iEACX,UAAW,iEACX,YAAa,mEACb,UAAW,iEACXC,SAAU"}
@@ -1,2 +1,2 @@
1
- import{createElement as e,Fragment as t}from"../../external/preact/dist/preact.js";import{useRef as s,useState as r}from"../../external/preact/hooks/dist/hooks.js";function n({setComponentRef:n}){const a=s({});Object.keys(a.current).length||n?.(a.current);const[o,c]=r(null);return a.current.setMessages=e=>{c(e)},o?e(t,null,o.map((t=>e("div",{key:t,className:"adyen-checkout-sr-panel__msg",...!1},t)))):null}export{n as SRMessages};
1
+ import{createElement as e,Fragment as t}from"../../external/preact/dist/preact.js";import{useRef as s,useState as r}from"../../external/preact/hooks/dist/hooks.js";function n({setComponentRef:n}){const a=s({});Object.keys(a.current).length||n?.(a.current);const[o,c]=r(null);return a.current.setMessages=e=>{c(e)},o?e(t,null,o.map((t=>e("div",{key:t,className:"adyen-checkout-sr-panel__msg"},t)))):null}export{n as SRMessages};
2
2
  //# sourceMappingURL=SRMessages.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"SRMessages.js","sources":["../../../../src/core/Errors/SRMessages.tsx"],"sourcesContent":["import { h, Fragment } from 'preact';\nimport { useRef, useState } from 'preact/hooks';\nimport { SRMessagesProps } from './types';\n\n// An interface for the members exposed by SRMessages to its parent\nexport interface SRMessagesRef {\n setMessages?: (who: string[]) => void;\n}\n\nexport function SRMessages({ setComponentRef }: SRMessagesProps) {\n const messagesRef = useRef<SRMessagesRef>({});\n // Just call once to create the object by which we expose the members expected by the parent comp\n if (!Object.keys(messagesRef.current).length) {\n setComponentRef?.(messagesRef.current);\n }\n\n const [messages, setMessages] = useState(null);\n\n // Expose method expected by parent\n messagesRef.current.setMessages = (msgs: string[]) => {\n setMessages(msgs);\n };\n\n return messages ? (\n <Fragment>\n {messages.map(msg => {\n return (\n <div key={msg} className=\"adyen-checkout-sr-panel__msg\" {...(process.env.NODE_ENV !== 'production' && { 'data-testid': msg })}>\n {msg}\n </div>\n );\n })}\n </Fragment>\n ) : null;\n}\n"],"names":["SRMessages","setComponentRef","messagesRef","useRef","Object","keys","current","length","messages","setMessages","useState","msgs","h","Fragment","map","msg","div","key","className"],"mappings":"oKASO,SAASA,GAAWC,gBAAEA,IACzB,MAAMC,EAAcC,EAAsB,CAAA,GAErCC,OAAOC,KAAKH,EAAYI,SAASC,QAClCN,IAAkBC,EAAYI,SAGlC,MAAOE,EAAUC,GAAeC,EAAS,MAOzC,OAJAR,EAAYI,QAAQG,YAAeE,IAC/BF,EAAYE,EAAAA,EAGTH,EACHI,EAACC,EAAAA,KACIL,EAASM,KAAIC,GAENH,EAACI,MAAAA,CAAIC,IAAKF,EAAKG,UAAU,mCAAoC,GACxDH,MAKjB,IACR"}
1
+ {"version":3,"file":"SRMessages.js","sources":["../../../../src/core/Errors/SRMessages.tsx"],"sourcesContent":["import { h, Fragment } from 'preact';\nimport { useRef, useState } from 'preact/hooks';\nimport { SRMessagesProps } from './types';\n\n// An interface for the members exposed by SRMessages to its parent\nexport interface SRMessagesRef {\n setMessages?: (who: string[]) => void;\n}\n\nexport function SRMessages({ setComponentRef }: SRMessagesProps) {\n const messagesRef = useRef<SRMessagesRef>({});\n // Just call once to create the object by which we expose the members expected by the parent comp\n if (!Object.keys(messagesRef.current).length) {\n setComponentRef?.(messagesRef.current);\n }\n\n const [messages, setMessages] = useState(null);\n\n // Expose method expected by parent\n messagesRef.current.setMessages = (msgs: string[]) => {\n setMessages(msgs);\n };\n\n return messages ? (\n <Fragment>\n {messages.map(msg => {\n return (\n <div key={msg} className=\"adyen-checkout-sr-panel__msg\" {...(process.env.NODE_ENV !== 'production' && { 'data-testid': msg })}>\n {msg}\n </div>\n );\n })}\n </Fragment>\n ) : null;\n}\n"],"names":["SRMessages","setComponentRef","messagesRef","useRef","Object","keys","current","length","messages","setMessages","useState","msgs","h","Fragment","map","msg","div","key","className"],"mappings":"oKASO,SAASA,GAAWC,gBAAEA,IACzB,MAAMC,EAAcC,EAAsB,CAAA,GAErCC,OAAOC,KAAKH,EAAYI,SAASC,QAClCN,IAAkBC,EAAYI,SAGlC,MAAOE,EAAUC,GAAeC,EAAS,MAOzC,OAJAR,EAAYI,QAAQG,YAAeE,IAC/BF,EAAYE,EAAAA,EAGTH,EACHI,EAACC,EAAAA,KACIL,EAASM,KAAIC,GAENH,EAACI,MAAAA,CAAIC,IAAKF,EAAKG,UAAU,gCACpBH,MAKjB,IACR"}
@@ -1,2 +1,2 @@
1
- import{createElement as e}from"../../external/preact/dist/preact.js";import t from"../../components/internal/BaseElement/BaseElement.js";import{SRMessages as s}from"./SRMessages.js";class o extends t{static type="srPanel";static defaultProps={enabled:!0,node:"body",showPanel:!1,id:"ariaLiveSRPanel",ariaAttributes:{"aria-relevant":"all","aria-live":"polite","aria-atomic":"true"}};srPanelContainer=null;id;showPanel;_enabled;_moveFocus;componentRef;constructor(e,t){if(super(e,t),this.id=this.props.id,this.showPanel=!1,this._enabled=!1,this._moveFocus=this.props.moveFocus??!0,this.props.enabled){if(this._enabled=!0,!document.querySelector(this.props.node))throw new Error("Component could not mount. Root node was not found.");{const e=document.getElementById(this.id);e&&document.querySelector(this.props.node).removeChild(e),this.srPanelContainer=document.createElement("div"),this.srPanelContainer.className="sr-panel-holder",this.srPanelContainer.id=this.id,document.querySelector(this.props.node).appendChild(this.srPanelContainer),this.mount(this.srPanelContainer)}}}setComponentRef=e=>{this.componentRef=e};get enabled(){return this._enabled}get moveFocus(){return this._moveFocus}setAriaProps(e){const t=document.querySelector('[class^="adyen-checkout-sr-panel"]');for(const[s,o]of Object.entries(e))t.setAttribute(s,o);this.props={...this.props,ariaAttributes:{...this.props.ariaAttributes,...e}}}setMessages=e=>{if(!this.props.enabled)return;let t=null;e&&(t=Array.isArray(e)?e:[e]),this.componentRef.setMessages(t)};render(){return this.props.enabled?e("div",{className:this.showPanel?"adyen-checkout-sr-panel":"adyen-checkout-sr-panel--sr-only",role:"log",...this.props.ariaAttributes,...!1},e(s,{setComponentRef:this.setComponentRef})):null}}export{o as SRPanel};
1
+ import{createElement as e}from"../../external/preact/dist/preact.js";import t from"../../components/internal/BaseElement/BaseElement.js";import{SRMessages as s}from"./SRMessages.js";class o extends t{static type="srPanel";static defaultProps={enabled:!0,node:"body",showPanel:!1,id:"ariaLiveSRPanel",ariaAttributes:{"aria-relevant":"all","aria-live":"polite","aria-atomic":"true"}};srPanelContainer=null;id;showPanel;_enabled;_moveFocus;componentRef;constructor(e,t){if(super(e,t),this.id=this.props.id,this.showPanel=!1,this._enabled=!1,this._moveFocus=this.props.moveFocus??!0,this.props.enabled){if(this._enabled=!0,!document.querySelector(this.props.node))throw new Error("Component could not mount. Root node was not found.");{const e=document.getElementById(this.id);e&&document.querySelector(this.props.node).removeChild(e),this.srPanelContainer=document.createElement("div"),this.srPanelContainer.className="sr-panel-holder",this.srPanelContainer.id=this.id,document.querySelector(this.props.node).appendChild(this.srPanelContainer),this.mount(this.srPanelContainer)}}}setComponentRef=e=>{this.componentRef=e};get enabled(){return this._enabled}get moveFocus(){return this._moveFocus}setAriaProps(e){const t=document.querySelector('[class^="adyen-checkout-sr-panel"]');for(const[s,o]of Object.entries(e))t.setAttribute(s,o);this.props={...this.props,ariaAttributes:{...this.props.ariaAttributes,...e}}}setMessages=e=>{if(!this.props.enabled)return;let t=null;e&&(t=Array.isArray(e)?e:[e]),this.componentRef.setMessages(t)};render(){return this.props.enabled?e("div",{className:this.showPanel?"adyen-checkout-sr-panel":"adyen-checkout-sr-panel--sr-only",role:"log",...this.props.ariaAttributes},e(s,{setComponentRef:this.setComponentRef})):null}}export{o as SRPanel};
2
2
  //# sourceMappingURL=SRPanel.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"SRPanel.js","sources":["../../../../src/core/Errors/SRPanel.tsx"],"sourcesContent":["import { h } from 'preact';\nimport './SRPanel.scss';\nimport { AriaAttributes, SRPanelProps } from './types';\nimport BaseElement from '../../components/internal/BaseElement/BaseElement';\nimport { SRMessages, SRMessagesRef } from './SRMessages';\nimport type { ICore } from '../types';\n\n/**\n * A panel meant to hold messages that will be read out by ScreenReaders on an aria-live=\"polite\" basis\n * Expects a string or string array of message to add to the panel to be read out\n * For testing purposes can be made visible\n */\nexport class SRPanel extends BaseElement<SRPanelProps> {\n public static type = 'srPanel';\n\n public static defaultProps: Partial<SRPanelProps> = {\n enabled: true,\n node: 'body',\n showPanel: false,\n id: 'ariaLiveSRPanel',\n ariaAttributes: {\n 'aria-relevant': 'all',\n 'aria-live': 'polite',\n 'aria-atomic': 'true'\n }\n };\n\n private readonly srPanelContainer = null;\n\n private readonly id;\n private readonly showPanel;\n private readonly _enabled: boolean;\n private readonly _moveFocus: boolean;\n\n private componentRef: SRMessagesRef;\n\n constructor(checkout: ICore, props?: SRPanelProps) {\n super(checkout, props);\n this.id = this.props.id;\n this.showPanel = process.env.NODE_ENV !== 'production' ? this.props.showPanel : false;\n this._enabled = false;\n this._moveFocus = this.props.moveFocus ?? true;\n\n if (this.props.enabled) {\n this._enabled = true;\n if (document.querySelector(this.props.node)) {\n const preExistingSRPanel = document.getElementById(this.id);\n if (preExistingSRPanel) {\n document.querySelector(this.props.node).removeChild(preExistingSRPanel);\n }\n\n this.srPanelContainer = document.createElement('div');\n this.srPanelContainer.className = 'sr-panel-holder';\n this.srPanelContainer.id = this.id;\n\n document.querySelector(this.props.node).appendChild(this.srPanelContainer);\n this.mount(this.srPanelContainer);\n } else {\n throw new Error('Component could not mount. Root node was not found.');\n }\n }\n }\n\n public setComponentRef = ref => {\n this.componentRef = ref;\n };\n\n public get enabled() {\n return this._enabled;\n }\n\n public get moveFocus() {\n return this._moveFocus;\n }\n\n public setAriaProps(ariaAttributes: AriaAttributes): void {\n const firstPanel = document.querySelector('[class^=\"adyen-checkout-sr-panel\"]');\n for (const [key, value] of Object.entries(ariaAttributes)) {\n firstPanel.setAttribute(key, value);\n }\n this.props = { ...this.props, ariaAttributes: { ...this.props.ariaAttributes, ...ariaAttributes } };\n }\n\n // A method we can expose to allow comps to set messages in this panel\n public setMessages = (messages: string[] | string): void => {\n if (!this.props.enabled) return;\n\n let panelMessages = null;\n if (messages) {\n // Ensure panelMessages is an array\n panelMessages = Array.isArray(messages) ? messages : [messages];\n }\n\n this.componentRef.setMessages(panelMessages);\n };\n\n render() {\n if (!this.props.enabled) return null;\n return (\n <div\n className={this.showPanel ? 'adyen-checkout-sr-panel' : 'adyen-checkout-sr-panel--sr-only'}\n role={'log'}\n {...this.props.ariaAttributes}\n {...(process.env.NODE_ENV !== 'production' && { 'data-testid': this.id })}\n >\n <SRMessages setComponentRef={this.setComponentRef} />\n </div>\n );\n }\n}\n"],"names":["SRPanel","BaseElement","static","enabled","node","showPanel","id","ariaAttributes","srPanelContainer","_enabled","_moveFocus","componentRef","constructor","checkout","props","super","this","moveFocus","document","querySelector","Error","preExistingSRPanel","getElementById","removeChild","createElement","className","appendChild","mount","setComponentRef","ref","setAriaProps","firstPanel","key","value","Object","entries","setAttribute","setMessages","messages","panelMessages","Array","isArray","render","h","div","role","SRMessages"],"mappings":"sLAYO,MAAMA,UAAgBC,EACzBC,YAAqB,UAErBA,oBAAoD,CAChDC,SAAS,EACTC,KAAM,OACNC,WAAW,EACXC,GAAI,kBACJC,eAAgB,CACZ,gBAAiB,MACjB,YAAa,SACb,cAAe,SAINC,iBAAmB,KAEnBF,GACAD,UACAI,SACAC,WAETC,aAERC,WAAAA,CAAYC,EAAiBC,GAOzB,GANAC,MAAMF,EAAUC,GAChBE,KAAKV,GAAKU,KAAKF,MAAMR,GACrBU,KAAKX,WAA2E,EAChFW,KAAKP,UAAW,EAChBO,KAAKN,WAAaM,KAAKF,MAAMG,YAAa,EAEtCD,KAAKF,MAAMX,QAAS,CAEpB,GADAa,KAAKP,UAAW,GACZS,SAASC,cAAcH,KAAKF,MAAMV,MAalC,MAAM,IAAIgB,MAAM,uDAbyB,CACzC,MAAMC,EAAqBH,SAASI,eAAeN,KAAKV,IACpDe,GACAH,SAASC,cAAcH,KAAKF,MAAMV,MAAMmB,YAAYF,GAGxDL,KAAKR,iBAAmBU,SAASM,cAAc,OAC/CR,KAAKR,iBAAiBiB,UAAY,kBAClCT,KAAKR,iBAAiBF,GAAKU,KAAKV,GAEhCY,SAASC,cAAcH,KAAKF,MAAMV,MAAMsB,YAAYV,KAAKR,kBACzDQ,KAAKW,MAAMX,KAAKR,kBAIxB,CACJ,CAEOoB,gBAAkBC,IACrBb,KAAKL,aAAekB,CAAAA,EAGxB,WAAW1B,GACP,OAAOa,KAAKP,QAChB,CAEA,aAAWQ,GACP,OAAOD,KAAKN,UAChB,CAEOoB,YAAAA,CAAavB,GAChB,MAAMwB,EAAab,SAASC,cAAc,sCAC1C,IAAK,MAAOa,EAAKC,KAAUC,OAAOC,QAAQ5B,GACtCwB,EAAWK,aAAaJ,EAAKC,GAEjCjB,KAAKF,MAAQ,IAAKE,KAAKF,MAAOP,eAAgB,IAAKS,KAAKF,MAAMP,kBAAmBA,GACrF,CAGO8B,YAAeC,IAClB,IAAKtB,KAAKF,MAAMX,QAAS,OAEzB,IAAIoC,EAAgB,KAChBD,IAEAC,EAAgBC,MAAMC,QAAQH,GAAYA,EAAW,CAACA,IAG1DtB,KAAKL,aAAa0B,YAAYE,EAAAA,EAGlCG,MAAAA,GACI,OAAK1B,KAAKF,MAAMX,QAEZwC,EAACC,MAAAA,CACGnB,UAAWT,KAAKX,UAAY,0BAA4B,mCACxDwC,KAAM,SACF7B,KAAKF,MAAMP,mBACV,GAELoC,EAACG,EAAAA,CAAWlB,gBAAiBZ,KAAKY,mBARV,IAWpC"}
1
+ {"version":3,"file":"SRPanel.js","sources":["../../../../src/core/Errors/SRPanel.tsx"],"sourcesContent":["import { h } from 'preact';\nimport './SRPanel.scss';\nimport { AriaAttributes, SRPanelProps } from './types';\nimport BaseElement from '../../components/internal/BaseElement/BaseElement';\nimport { SRMessages, SRMessagesRef } from './SRMessages';\nimport type { ICore } from '../types';\n\n/**\n * A panel meant to hold messages that will be read out by ScreenReaders on an aria-live=\"polite\" basis\n * Expects a string or string array of message to add to the panel to be read out\n * For testing purposes can be made visible\n */\nexport class SRPanel extends BaseElement<SRPanelProps> {\n public static type = 'srPanel';\n\n public static defaultProps: Partial<SRPanelProps> = {\n enabled: true,\n node: 'body',\n showPanel: false,\n id: 'ariaLiveSRPanel',\n ariaAttributes: {\n 'aria-relevant': 'all',\n 'aria-live': 'polite',\n 'aria-atomic': 'true'\n }\n };\n\n private readonly srPanelContainer = null;\n\n private readonly id;\n private readonly showPanel;\n private readonly _enabled: boolean;\n private readonly _moveFocus: boolean;\n\n private componentRef: SRMessagesRef;\n\n constructor(checkout: ICore, props?: SRPanelProps) {\n super(checkout, props);\n this.id = this.props.id;\n this.showPanel = process.env.NODE_ENV !== 'production' ? this.props.showPanel : false;\n this._enabled = false;\n this._moveFocus = this.props.moveFocus ?? true;\n\n if (this.props.enabled) {\n this._enabled = true;\n if (document.querySelector(this.props.node)) {\n const preExistingSRPanel = document.getElementById(this.id);\n if (preExistingSRPanel) {\n document.querySelector(this.props.node).removeChild(preExistingSRPanel);\n }\n\n this.srPanelContainer = document.createElement('div');\n this.srPanelContainer.className = 'sr-panel-holder';\n this.srPanelContainer.id = this.id;\n\n document.querySelector(this.props.node).appendChild(this.srPanelContainer);\n this.mount(this.srPanelContainer);\n } else {\n throw new Error('Component could not mount. Root node was not found.');\n }\n }\n }\n\n public setComponentRef = ref => {\n this.componentRef = ref;\n };\n\n public get enabled() {\n return this._enabled;\n }\n\n public get moveFocus() {\n return this._moveFocus;\n }\n\n public setAriaProps(ariaAttributes: AriaAttributes): void {\n const firstPanel = document.querySelector('[class^=\"adyen-checkout-sr-panel\"]');\n for (const [key, value] of Object.entries(ariaAttributes)) {\n firstPanel.setAttribute(key, value);\n }\n this.props = { ...this.props, ariaAttributes: { ...this.props.ariaAttributes, ...ariaAttributes } };\n }\n\n // A method we can expose to allow comps to set messages in this panel\n public setMessages = (messages: string[] | string): void => {\n if (!this.props.enabled) return;\n\n let panelMessages = null;\n if (messages) {\n // Ensure panelMessages is an array\n panelMessages = Array.isArray(messages) ? messages : [messages];\n }\n\n this.componentRef.setMessages(panelMessages);\n };\n\n render() {\n if (!this.props.enabled) return null;\n return (\n <div\n className={this.showPanel ? 'adyen-checkout-sr-panel' : 'adyen-checkout-sr-panel--sr-only'}\n role={'log'}\n {...this.props.ariaAttributes}\n {...(process.env.NODE_ENV !== 'production' && { 'data-testid': this.id })}\n >\n <SRMessages setComponentRef={this.setComponentRef} />\n </div>\n );\n }\n}\n"],"names":["SRPanel","BaseElement","static","enabled","node","showPanel","id","ariaAttributes","srPanelContainer","_enabled","_moveFocus","componentRef","constructor","checkout","props","super","this","moveFocus","document","querySelector","Error","preExistingSRPanel","getElementById","removeChild","createElement","className","appendChild","mount","setComponentRef","ref","setAriaProps","firstPanel","key","value","Object","entries","setAttribute","setMessages","messages","panelMessages","Array","isArray","render","h","div","role","SRMessages"],"mappings":"sLAYO,MAAMA,UAAgBC,EACzBC,YAAqB,UAErBA,oBAAoD,CAChDC,SAAS,EACTC,KAAM,OACNC,WAAW,EACXC,GAAI,kBACJC,eAAgB,CACZ,gBAAiB,MACjB,YAAa,SACb,cAAe,SAINC,iBAAmB,KAEnBF,GACAD,UACAI,SACAC,WAETC,aAERC,WAAAA,CAAYC,EAAiBC,GAOzB,GANAC,MAAMF,EAAUC,GAChBE,KAAKV,GAAKU,KAAKF,MAAMR,GACrBU,KAAKX,WAA2E,EAChFW,KAAKP,UAAW,EAChBO,KAAKN,WAAaM,KAAKF,MAAMG,YAAa,EAEtCD,KAAKF,MAAMX,QAAS,CAEpB,GADAa,KAAKP,UAAW,GACZS,SAASC,cAAcH,KAAKF,MAAMV,MAalC,MAAM,IAAIgB,MAAM,uDAbyB,CACzC,MAAMC,EAAqBH,SAASI,eAAeN,KAAKV,IACpDe,GACAH,SAASC,cAAcH,KAAKF,MAAMV,MAAMmB,YAAYF,GAGxDL,KAAKR,iBAAmBU,SAASM,cAAc,OAC/CR,KAAKR,iBAAiBiB,UAAY,kBAClCT,KAAKR,iBAAiBF,GAAKU,KAAKV,GAEhCY,SAASC,cAAcH,KAAKF,MAAMV,MAAMsB,YAAYV,KAAKR,kBACzDQ,KAAKW,MAAMX,KAAKR,kBAIxB,CACJ,CAEOoB,gBAAkBC,IACrBb,KAAKL,aAAekB,CAAAA,EAGxB,WAAW1B,GACP,OAAOa,KAAKP,QAChB,CAEA,aAAWQ,GACP,OAAOD,KAAKN,UAChB,CAEOoB,YAAAA,CAAavB,GAChB,MAAMwB,EAAab,SAASC,cAAc,sCAC1C,IAAK,MAAOa,EAAKC,KAAUC,OAAOC,QAAQ5B,GACtCwB,EAAWK,aAAaJ,EAAKC,GAEjCjB,KAAKF,MAAQ,IAAKE,KAAKF,MAAOP,eAAgB,IAAKS,KAAKF,MAAMP,kBAAmBA,GACrF,CAGO8B,YAAeC,IAClB,IAAKtB,KAAKF,MAAMX,QAAS,OAEzB,IAAIoC,EAAgB,KAChBD,IAEAC,EAAgBC,MAAMC,QAAQH,GAAYA,EAAW,CAACA,IAG1DtB,KAAKL,aAAa0B,YAAYE,EAAAA,EAGlCG,MAAAA,GACI,OAAK1B,KAAKF,MAAMX,QAEZwC,EAACC,MAAAA,CACGnB,UAAWT,KAAKX,UAAY,0BAA4B,mCACxDwC,KAAM,SACF7B,KAAKF,MAAMP,gBAGfoC,EAACG,EAAAA,CAAWlB,gBAAiBZ,KAAKY,mBARV,IAWpC"}
@@ -1,2 +1,2 @@
1
- import{httpPost as e}from"../http.js";import t from"../../../utils/Storage.js";const o='WARNING: Failed to retrieve "checkoutAttemptId". Consequently, analytics will not be available for this payment. The payment process, however, will not be affected.';const n=({analyticsContext:n,clientKey:r,locale:i,analyticsPath:a,bundleType:c})=>{let l;const s={errorLevel:"fatal",loadingContext:n,path:`${a}?clientKey=${r}`};return n=>{const a={version:"6.0.0-alpha.5",channel:"Web",platform:"Web",buildType:c,locale:i,referrer:window.location.href,screenWidth:window.screen.width,...n};if(l)return l;if(!r)return Promise.reject("no-client-key");const m=new t("checkout-attempt-id","sessionStorage"),p=m.get();return function(e){if(!e?.id)return!1;const t=Date.now()-9e5;return e.timestamp>t}(p)?Promise.resolve(p.id):(l=e(s,a).then((e=>{if(e?.checkoutAttemptId)return m.set({id:e.checkoutAttemptId,timestamp:Date.now()}),e.checkoutAttemptId})).catch((()=>Promise.reject(o))),l)}};export{o as FAILURE_MSG,n as default};
1
+ import{httpPost as e}from"../http.js";import t from"../../../utils/Storage.js";const o='WARNING: Failed to retrieve "checkoutAttemptId". Consequently, analytics will not be available for this payment. The payment process, however, will not be affected.';const n=({analyticsContext:n,clientKey:r,locale:i,analyticsPath:a,bundleType:c})=>{let l;const s={errorLevel:"fatal",loadingContext:n,path:`${a}?clientKey=${r}`};return n=>{const a={version:"6.0.0-alpha.6",channel:"Web",platform:"Web",buildType:c,locale:i,referrer:window.location.href,screenWidth:window.screen.width,...n};if(l)return l;if(!r)return Promise.reject("no-client-key");const m=new t("checkout-attempt-id","sessionStorage"),p=m.get();return function(e){if(!e?.id)return!1;const t=Date.now()-9e5;return e.timestamp>t}(p)?Promise.resolve(p.id):(l=e(s,a).then((e=>{if(e?.checkoutAttemptId)return m.set({id:e.checkoutAttemptId,timestamp:Date.now()}),e.checkoutAttemptId})).catch((()=>Promise.reject(o))),l)}};export{o as FAILURE_MSG,n as default};
2
2
  //# sourceMappingURL=collect-id.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"collect-id.js","sources":["../../../../../src/core/Services/analytics/collect-id.ts"],"sourcesContent":["import { httpPost } from '../http';\nimport Storage from '../../../utils/Storage';\nimport { CheckoutAttemptIdSession, CollectIdProps, TelemetryEvent } from './types';\n\nexport const FAILURE_MSG =\n 'WARNING: Failed to retrieve \"checkoutAttemptId\". Consequently, analytics will not be available for this payment. The payment process, however, will not be affected.';\n\n/**\n * If the checkout attempt ID was stored more than fifteen minutes ago, then we should request a new ID.\n * More here: COWEB-1099\n */\nfunction confirmSessionDurationIsMaxFifteenMinutes(checkoutAttemptIdSession: CheckoutAttemptIdSession): boolean {\n if (!checkoutAttemptIdSession?.id) return false;\n\n const fifteenMinInMs = 1000 * 60 * 15;\n const fifteenMinAgoTimestamp = Date.now() - fifteenMinInMs;\n return checkoutAttemptIdSession.timestamp > fifteenMinAgoTimestamp;\n}\n\n/**\n * Send an event to Adyen with some basic telemetry info and receive a checkoutAttemptId in response\n * @param config - object containing values needed to calculate the url for the request; and also some that need to be serialized and included in the body of request\n * @returns a function returning a promise containing the response of the call (an object containing a checkoutAttemptId property)\n */\n// const collectId = ({ analyticsContext, clientKey, locale, amount }: CollectIdProps) => { // TODO - amount will be supported in the future\nconst collectId = ({ analyticsContext, clientKey, locale, analyticsPath, bundleType }: CollectIdProps) => {\n let promise;\n\n const options = {\n errorLevel: 'fatal' as const, // ensure our catch block is called\n loadingContext: analyticsContext,\n path: `${analyticsPath}?clientKey=${clientKey}`\n };\n\n return (event): Promise<string> => {\n const telemetryEvent: TelemetryEvent = {\n // amount, // TODO will be supported in the future\n version: process.env.VERSION,\n // The data team want both platform & channel properties:\n channel: 'Web',\n platform: 'Web',\n buildType: bundleType,\n locale,\n referrer: window.location.href,\n screenWidth: window.screen.width,\n ...event\n };\n\n if (promise) return promise; // Prevents multiple standalone components on the same page from making multiple calls to collect a checkoutAttemptId\n if (!clientKey) return Promise.reject('no-client-key');\n\n const storage = new Storage<CheckoutAttemptIdSession>('checkout-attempt-id', 'sessionStorage');\n const checkoutAttemptIdSession = storage.get();\n\n // In some cases, e.g. where the merchant has redirected the shopper and then returned them to checkout, we still have a valid checkoutAttemptId\n // so there is no need for the re-initialised Checkout to generate another one\n if (confirmSessionDurationIsMaxFifteenMinutes(checkoutAttemptIdSession)) {\n return Promise.resolve(checkoutAttemptIdSession.id);\n }\n\n promise = httpPost(options, telemetryEvent)\n .then(conversion => {\n if (conversion?.checkoutAttemptId) {\n storage.set({ id: conversion.checkoutAttemptId, timestamp: Date.now() });\n return conversion.checkoutAttemptId;\n }\n return undefined;\n })\n .catch(() => {\n return Promise.reject(FAILURE_MSG);\n });\n\n return promise;\n };\n};\n\nexport default collectId;\n"],"names":["FAILURE_MSG","collectId","analyticsContext","clientKey","locale","analyticsPath","bundleType","promise","options","errorLevel","loadingContext","path","event","telemetryEvent","version","channel","platform","buildType","referrer","window","location","href","screenWidth","screen","width","Promise","reject","storage","Storage","checkoutAttemptIdSession","get","id","fifteenMinAgoTimestamp","Date","now","timestamp","confirmSessionDurationIsMaxFifteenMinutes","resolve","httpPost","then","conversion","checkoutAttemptId","set","undefined","catch"],"mappings":"+EAIO,MAAMA,EACT,uKAoBJ,MAAMC,EAAY,EAAGC,mBAAkBC,YAAWC,SAAQC,gBAAeC,iBACrE,IAAIC,EAEJ,MAAMC,EAAU,CACZC,WAAY,QACZC,eAAgBR,EAChBS,KAAM,GAAGN,eAA2BF,KAGxC,OAAQS,IACJ,MAAMC,EAAiC,CAEnCC,QAAS,gBAETC,QAAS,MACTC,SAAU,MACVC,UAAWX,EACXF,SACAc,SAAUC,OAAOC,SAASC,KAC1BC,YAAaH,OAAOI,OAAOC,SACxBZ,GAGP,GAAIL,EAAS,OAAOA,EACpB,IAAKJ,EAAW,OAAOsB,QAAQC,OAAO,iBAEtC,MAAMC,EAAU,IAAIC,EAAkC,sBAAuB,kBACvEC,EAA2BF,EAAQG,MAIzC,OA7CR,SAAmDD,GAC/C,IAAKA,GAA0BE,GAAI,OAAO,EAE1C,MACMC,EAAyBC,KAAKC,MADb,IAEvB,OAAOL,EAAyBM,UAAYH,CAChD,CAuCYI,CAA0CP,GACnCJ,QAAQY,QAAQR,EAAyBE,KAGpDxB,EAAU+B,EAAS9B,EAASK,GACvB0B,MAAKC,IACF,GAAIA,GAAYC,kBAEZ,OADAd,EAAQe,IAAI,CAAEX,GAAIS,EAAWC,kBAAmBN,UAAWF,KAAKC,QACzDM,EAAWC,iBAEfE,IAEVC,OAAM,IACInB,QAAQC,OAAO1B,KAGvBO,EAAAA,CACX"}
1
+ {"version":3,"file":"collect-id.js","sources":["../../../../../src/core/Services/analytics/collect-id.ts"],"sourcesContent":["import { httpPost } from '../http';\nimport Storage from '../../../utils/Storage';\nimport { CheckoutAttemptIdSession, CollectIdEvent, CollectIdProps, TelemetryEvent } from './types';\n\nexport const FAILURE_MSG =\n 'WARNING: Failed to retrieve \"checkoutAttemptId\". Consequently, analytics will not be available for this payment. The payment process, however, will not be affected.';\n\n/**\n * If the checkout attempt ID was stored more than fifteen minutes ago, then we should request a new ID.\n * More here: COWEB-1099\n */\nfunction confirmSessionDurationIsMaxFifteenMinutes(checkoutAttemptIdSession: CheckoutAttemptIdSession): boolean {\n if (!checkoutAttemptIdSession?.id) return false;\n\n const fifteenMinInMs = 1000 * 60 * 15;\n const fifteenMinAgoTimestamp = Date.now() - fifteenMinInMs;\n return checkoutAttemptIdSession.timestamp > fifteenMinAgoTimestamp;\n}\n\n/**\n * Send an event to Adyen with some basic telemetry info and receive a checkoutAttemptId in response\n * @param config - object containing values needed to calculate the url for the request; and also some that need to be serialized and included in the body of request\n * @returns a function returning a promise containing the response of the call (an object containing a checkoutAttemptId property)\n */\n// const collectId = ({ analyticsContext, clientKey, locale, amount }: CollectIdProps) => { // TODO - amount will be supported in the future\nconst collectId = ({ analyticsContext, clientKey, locale, analyticsPath, bundleType }: CollectIdProps) => {\n let promise;\n\n const options = {\n errorLevel: 'fatal' as const, // ensure our catch block is called\n loadingContext: analyticsContext,\n path: `${analyticsPath}?clientKey=${clientKey}`\n };\n\n return (event: CollectIdEvent): Promise<string> => {\n const telemetryEvent: TelemetryEvent = {\n // amount, // TODO will be supported in the future\n version: process.env.VERSION,\n // The data team want both platform & channel properties:\n channel: 'Web',\n platform: 'Web',\n buildType: bundleType,\n locale,\n referrer: window.location.href,\n screenWidth: window.screen.width,\n ...event\n };\n\n if (promise) return promise; // Prevents multiple standalone components on the same page from making multiple calls to collect a checkoutAttemptId\n if (!clientKey) return Promise.reject('no-client-key');\n\n const storage = new Storage<CheckoutAttemptIdSession>('checkout-attempt-id', 'sessionStorage');\n const checkoutAttemptIdSession = storage.get();\n\n // In some cases, e.g. where the merchant has redirected the shopper and then returned them to checkout, we still have a valid checkoutAttemptId\n // so there is no need for the re-initialised Checkout to generate another one\n if (confirmSessionDurationIsMaxFifteenMinutes(checkoutAttemptIdSession)) {\n return Promise.resolve(checkoutAttemptIdSession.id);\n }\n\n promise = httpPost(options, telemetryEvent)\n .then(conversion => {\n if (conversion?.checkoutAttemptId) {\n storage.set({ id: conversion.checkoutAttemptId, timestamp: Date.now() });\n return conversion.checkoutAttemptId;\n }\n return undefined;\n })\n .catch(() => {\n return Promise.reject(FAILURE_MSG);\n });\n\n return promise;\n };\n};\n\nexport default collectId;\n"],"names":["FAILURE_MSG","collectId","analyticsContext","clientKey","locale","analyticsPath","bundleType","promise","options","errorLevel","loadingContext","path","event","telemetryEvent","version","channel","platform","buildType","referrer","window","location","href","screenWidth","screen","width","Promise","reject","storage","Storage","checkoutAttemptIdSession","get","id","fifteenMinAgoTimestamp","Date","now","timestamp","confirmSessionDurationIsMaxFifteenMinutes","resolve","httpPost","then","conversion","checkoutAttemptId","set","undefined","catch"],"mappings":"+EAIO,MAAMA,EACT,uKAoBJ,MAAMC,EAAY,EAAGC,mBAAkBC,YAAWC,SAAQC,gBAAeC,iBACrE,IAAIC,EAEJ,MAAMC,EAAU,CACZC,WAAY,QACZC,eAAgBR,EAChBS,KAAM,GAAGN,eAA2BF,KAGxC,OAAQS,IACJ,MAAMC,EAAiC,CAEnCC,QAAS,gBAETC,QAAS,MACTC,SAAU,MACVC,UAAWX,EACXF,SACAc,SAAUC,OAAOC,SAASC,KAC1BC,YAAaH,OAAOI,OAAOC,SACxBZ,GAGP,GAAIL,EAAS,OAAOA,EACpB,IAAKJ,EAAW,OAAOsB,QAAQC,OAAO,iBAEtC,MAAMC,EAAU,IAAIC,EAAkC,sBAAuB,kBACvEC,EAA2BF,EAAQG,MAIzC,OA7CR,SAAmDD,GAC/C,IAAKA,GAA0BE,GAAI,OAAO,EAE1C,MACMC,EAAyBC,KAAKC,MADb,IAEvB,OAAOL,EAAyBM,UAAYH,CAChD,CAuCYI,CAA0CP,GACnCJ,QAAQY,QAAQR,EAAyBE,KAGpDxB,EAAU+B,EAAS9B,EAASK,GACvB0B,MAAKC,IACF,GAAIA,GAAYC,kBAEZ,OADAd,EAAQe,IAAI,CAAEX,GAAIS,EAAWC,kBAAmBN,UAAWF,KAAKC,QACzDM,EAAWC,iBAEfE,IAEVC,OAAM,IACInB,QAAQC,OAAO1B,KAGvBO,EAAAA,CACX"}
@@ -1,2 +1,2 @@
1
- const e=e=>o=>{const n={version:"6.0.0-alpha.5",payload_version:1,platform:"web",locale:e.locale,...o},a=Object.keys(n).map((e=>`${encodeURIComponent(e)}=${encodeURIComponent(n[e])}`)).join("&");(new Image).src=`${e.loadingContext}images/analytics.png?${a}`};export{e as default};
1
+ const e=e=>o=>{const n={version:"6.0.0-alpha.6",payload_version:1,platform:"web",locale:e.locale,...o},a=Object.keys(n).map((e=>`${encodeURIComponent(e)}=${encodeURIComponent(n[e])}`)).join("&");(new Image).src=`${e.loadingContext}images/analytics.png?${a}`};export{e as default};
2
2
  //# sourceMappingURL=log-event.js.map
@@ -1,2 +1,2 @@
1
- import{httpGet as o}from"./http.js";import{SUPPORTED_LOCALES as r}from"../../language/constants.js";import t from"../Errors/AdyenCheckoutError.js";function n(n,e,s,a,l={}){if(!r.includes(s)&&Object.keys(l).includes(s))return Promise.resolve({});if(!r.includes(s))throw new t("IMPLEMENTATION_ERROR",`Translations: Locale '${s}' is not supported. You can provide your own locale/translations by configuring the 'translations' property"`);return o({loadingContext:"local"===a?"/":n,errorLevel:"fatal",errorMessage:`Translations: Couldn't fetch translation for the locale "${s}".`,path:`sdk/${e}/translations/${s}.json`})}export{n as default};
1
+ import{httpGet as o}from"./http.js";import{SUPPORTED_LOCALES as r}from"../../language/constants.js";import t from"../Errors/AdyenCheckoutError.js";function n(n,e,s,a={}){if(!r.includes(s)&&Object.keys(a).includes(s))return Promise.resolve({});if(!r.includes(s))throw new t("IMPLEMENTATION_ERROR",`Translations: Locale '${s}' is not supported. You can provide your own locale/translations by configuring the 'translations' property"`);return o({loadingContext:n,errorLevel:"fatal",errorMessage:`Translations: Couldn't fetch translation for the locale "${s}".`,path:`sdk/${e}/translations/${s}.json`})}export{n as default};
2
2
  //# sourceMappingURL=get-translations.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"get-translations.js","sources":["../../../../src/core/Services/get-translations.ts"],"sourcesContent":["import { httpGet, HttpOptions } from './http';\nimport type { CustomTranslations, Translations } from '../../language/types';\nimport { SUPPORTED_LOCALES } from '../../language/constants';\nimport AdyenCheckoutError from '../Errors/AdyenCheckoutError';\n\nexport default function getTranslations(\n cdnContext: string,\n adyenWebVersion: string,\n locale: string,\n translationEnvironment: 'local' | 'remote',\n customTranslation: CustomTranslations = {}\n): Promise<Translations> {\n const isUsingCustomLocaleNotSupportedByAdyen = !SUPPORTED_LOCALES.includes(locale) && Object.keys(customTranslation).includes(locale);\n\n if (isUsingCustomLocaleNotSupportedByAdyen) {\n return Promise.resolve({});\n }\n\n if (!SUPPORTED_LOCALES.includes(locale)) {\n throw new AdyenCheckoutError(\n 'IMPLEMENTATION_ERROR',\n `Translations: Locale '${locale}' is not supported. You can provide your own locale/translations by configuring the 'translations' property\"`\n );\n }\n\n const options: HttpOptions = {\n loadingContext: translationEnvironment === 'local' ? '/' : cdnContext,\n errorLevel: 'fatal',\n errorMessage: `Translations: Couldn't fetch translation for the locale \"${locale}\".`,\n path: `sdk/${adyenWebVersion}/translations/${locale}.json`\n };\n\n return httpGet(options);\n}\n"],"names":["getTranslations","cdnContext","adyenWebVersion","locale","translationEnvironment","customTranslation","SUPPORTED_LOCALES","includes","Object","keys","Promise","resolve","AdyenCheckoutError","httpGet","loadingContext","errorLevel","errorMessage","path"],"mappings":"mJAKe,SAASA,EACpBC,EACAC,EACAC,EACAC,EACAC,EAAwC,IAIxC,IAFgDC,EAAkBC,SAASJ,IAAWK,OAAOC,KAAKJ,GAAmBE,SAASJ,GAG1H,OAAOO,QAAQC,QAAQ,CAAA,GAG3B,IAAKL,EAAkBC,SAASJ,GAC5B,MAAM,IAAIS,EACN,uBACA,yBAAyBT,iHAWjC,OAAOU,EAPsB,CACzBC,eAA2C,UAA3BV,EAAqC,IAAMH,EAC3Dc,WAAY,QACZC,aAAc,4DAA4Db,MAC1Ec,KAAM,OAAOf,kBAAgCC,UAIrD"}
1
+ {"version":3,"file":"get-translations.js","sources":["../../../../src/core/Services/get-translations.ts"],"sourcesContent":["import { httpGet, HttpOptions } from './http';\nimport type { CustomTranslations, Translations } from '../../language/types';\nimport { SUPPORTED_LOCALES } from '../../language/constants';\nimport AdyenCheckoutError from '../Errors/AdyenCheckoutError';\n\nexport default function getTranslations(\n cdnTranslationsUrl: string,\n adyenWebVersion: string,\n locale: string,\n customTranslation: CustomTranslations = {}\n): Promise<Translations> {\n const isUsingCustomLocaleNotSupportedByAdyen = !SUPPORTED_LOCALES.includes(locale) && Object.keys(customTranslation).includes(locale);\n\n if (isUsingCustomLocaleNotSupportedByAdyen) {\n return Promise.resolve({});\n }\n\n if (!SUPPORTED_LOCALES.includes(locale)) {\n throw new AdyenCheckoutError(\n 'IMPLEMENTATION_ERROR',\n `Translations: Locale '${locale}' is not supported. You can provide your own locale/translations by configuring the 'translations' property\"`\n );\n }\n\n const options: HttpOptions = {\n loadingContext: cdnTranslationsUrl,\n errorLevel: 'fatal',\n errorMessage: `Translations: Couldn't fetch translation for the locale \"${locale}\".`,\n path: `sdk/${adyenWebVersion}/translations/${locale}.json`\n };\n\n return httpGet(options);\n}\n"],"names":["getTranslations","cdnTranslationsUrl","adyenWebVersion","locale","customTranslation","SUPPORTED_LOCALES","includes","Object","keys","Promise","resolve","AdyenCheckoutError","httpGet","loadingContext","errorLevel","errorMessage","path"],"mappings":"mJAKe,SAASA,EACpBC,EACAC,EACAC,EACAC,EAAwC,CAAA,GAIxC,IAFgDC,EAAkBC,SAASH,IAAWI,OAAOC,KAAKJ,GAAmBE,SAASH,GAG1H,OAAOM,QAAQC,QAAQ,CAAA,GAG3B,IAAKL,EAAkBC,SAASH,GAC5B,MAAM,IAAIQ,EACN,uBACA,yBAAyBR,iHAWjC,OAAOS,EAPsB,CACzBC,eAAgBZ,EAChBa,WAAY,QACZC,aAAc,4DAA4DZ,MAC1Ea,KAAM,OAAOd,kBAAgCC,UAIrD"}
@@ -1,2 +1,2 @@
1
- const t={exposeLibraryMetadata:!0,showPayButton:!0,_translationEnvironment:"remote"};export{t as defaultProps};
1
+ const t={exposeLibraryMetadata:!0,showPayButton:!0};export{t as defaultProps};
2
2
  //# sourceMappingURL=core.defaultProps.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"core.defaultProps.js","sources":["../../../src/core/core.defaultProps.ts"],"sourcesContent":["import type { CoreConfiguration } from './types';\n\nconst defaultProps: CoreConfiguration = {\n exposeLibraryMetadata: true,\n showPayButton: true,\n _translationEnvironment: process.env.NODE_ENV === 'development' ? 'local' : 'remote'\n};\n\nexport { defaultProps };\n"],"names":["defaultProps","exposeLibraryMetadata","showPayButton","_translationEnvironment"],"mappings":"AAEA,MAAMA,EAAkC,CACpCC,uBAAuB,EACvBC,eAAe,EACfC,wBAA4E"}
1
+ {"version":3,"file":"core.defaultProps.js","sources":["../../../src/core/core.defaultProps.ts"],"sourcesContent":["import type { CoreConfiguration } from './types';\n\nconst defaultProps: CoreConfiguration = {\n exposeLibraryMetadata: true,\n showPayButton: true\n};\n\nexport { defaultProps };\n"],"names":["defaultProps","exposeLibraryMetadata","showPayButton"],"mappings":"AAEA,MAAMA,EAAkC,CACpCC,uBAAuB,EACvBC,eAAe"}
@@ -1,2 +1,2 @@
1
- import{Language as t}from"../language/Language.js";import o from"./RiskModule/RiskModule.js";import s from"./ProcessResponse/PaymentMethods/PaymentMethods.js";import{getComponentForAction as e}from"./ProcessResponse/PaymentAction/PaymentAction.js";import{resolveEnvironment as i,resolveCDNEnvironment as n,resolveAnalyticsEnvironment as a}from"./Environment/Environment.js";import r from"./Analytics/Analytics.js";import{assertConfigurationPropertiesAreValid as h,processGlobalOptions as p}from"./utils.js";import c from"./CheckoutSession/CheckoutSession.js";import{hasOwnProperty as l}from"../utils/hasOwnProperty.js";import{Resources as m}from"./Context/Resources.js";import{SRPanel as d}from"./Errors/SRPanel.js";import u from"./core.registry.js";import{sanitizeResponse as y,verifyPaymentDidNotFail as C,cleanupFinalResult as f}from"../components/internal/UIElement/utils.js";import g,{IMPLEMENTATION_ERROR as w}from"./Errors/AdyenCheckoutError.js";import{ANALYTICS_ACTION_STR as v}from"./Analytics/constants.js";import{THREEDS2_FULL as j}from"../components/ThreeDS2/constants.js";import{DEFAULT_LOCALE as E}from"../language/constants.js";import x from"./Services/get-translations.js";import{defaultProps as A}from"./core.defaultProps.js";import{formatLocale as P,formatCustomTranslations as M}from"../language/utils.js";class b{session;paymentMethodsResponse;modules;options;loadingContext;cdnContext;analyticsContext;components=[];static metadata={version:"6.0.0-alpha.5",bundleType:"esm"};static registry=u;static setBundleType(t){b.metadata.bundleType=t}static register(...t){u.add(...t)}register(...t){u.add(...t)}getComponent(t){return u.getComponent(t)}constructor(t){h(t),this.createFromAction=this.createFromAction.bind(this),this.setOptions({...A,...t}),this.loadingContext=i(this.options.environment,this.options.environmentUrls?.api),this.cdnContext=n(this.options.resourceEnvironment||this.options.environment,this.options.environmentUrls?.api),this.analyticsContext=a(this.options.environment),this.session=this.options.session&&new c(this.options.session,this.options.clientKey,this.loadingContext);const o=this.options.clientKey?.substr(0,4);if(("test"===o||"live"===o)&&!this.loadingContext.includes(o))throw new g("IMPLEMENTATION_ERROR",`Error: you are using a ${o} clientKey against the ${this.options.environmentUrls?.api||this.options.environment} environment`);this.options.exposeLibraryMetadata&&(window.AdyenWebMetadata=b.metadata)}async initialize(){return await this.initializeCore(),this.validateCoreConfiguration(),await this.createCoreModules(),this}async initializeCore(){return this.session?this.session.setupSession(this.options).then((t=>{const{amount:o,shopperLocale:s,countryCode:e,paymentMethods:i,...n}=t;return this.setOptions({...n,amount:this.options.order?this.options.order.remainingAmount:o,locale:this.options.locale||s,countryCode:this.options.countryCode||e}),this.createPaymentMethodsList(i),this})).catch((t=>(this.options.onError&&this.options.onError(t),Promise.reject(t)))):(this.createPaymentMethodsList(),Promise.resolve(this))}async fetchLocaleTranslations(){try{return await x(this.cdnContext,b.metadata.version,this.options.locale,this.options._translationEnvironment,this.options.translations)}catch(t){this.options.onError?.(t)}}validateCoreConfiguration(){if(this.options.paymentMethodsConfiguration&&console.warn('WARNING: "paymentMethodsConfiguration" is supported only by Drop-in.'),!this.options.countryCode)throw new g(w,"You must specify a countryCode when initializing checkout. (If you are using a session then this session should be initialized with a countryCode.)");this.options.locale||this.setOptions({locale:E}),this.options.locale=P(this.options.locale),this.options.translations=M(this.options.translations)}submitDetails(t){let o=null;this.options.onAdditionalDetails&&(o=new Promise(((o,s)=>{this.options.onAdditionalDetails({data:t},void 0,{resolve:o,reject:s})}))),this.session&&(o=this.session.submitDetails(t).catch((t=>(this.options.onError?.(t),Promise.reject(t))))),o?o.then(y).then(C).then((t=>{f(t),this.options.onPaymentCompleted?.(t)})).catch((t=>{f(t),this.options.onPaymentFailed?.(t)})):this.options.onError?.(new g("IMPLEMENTATION_ERROR",'It can not submit the details. The callback "onAdditionalDetails" or the Session is not setup correctly.'))}createFromAction(t,o={}){if(!t||!t.type){if(l(t,"action")&&l(t,"resultCode"))throw new Error('createFromAction::Invalid Action - the passed action object itself has an "action" property and a "resultCode": have you passed in the whole response object by mistake?');throw new Error('createFromAction::Invalid Action - the passed action object does not have a "type" property')}if(t.type){const s=t.type===j?`${t.type}${t.subtype}`:t.paymentMethodType;this.modules.analytics.sendAnalytics(s,{type:v,subtype:t.type,message:`${s} action was handled by the SDK`});const i={...this.getCorePropsForComponent(),...o};return e(this,u,t,i)}return this.handleCreateError()}update=(t={})=>(this.setOptions(t),this.initialize().then((()=>(this.components.forEach((o=>o.update(t))),this))));remove=t=>(this.components=this.components.filter((o=>o._id!==t._id)),t.unmount(),this);setOptions=t=>{this.options={...this.options,...t,locale:t?.locale||this.options?.locale}};getCorePropsForComponent(){return{...p(this.options),core:this,i18n:this.modules.i18n,modules:this.modules,session:this.session,loadingContext:this.loadingContext,cdnContext:this.cdnContext,createFromAction:this.createFromAction}}storeElementReference(t){t&&this.components.push(t)}handleCreateError(t){const o=t?`${t?.name??"The passed payment method"} is not a valid Checkout Component. What was passed as a txVariant was: ${JSON.stringify(t)}. Check if this payment method is configured in the Backoffice or if the txVariant is a valid one`:"No Payment Method component was passed";throw new Error(o)}createPaymentMethodsList(t){this.paymentMethodsResponse=new s(this.options.paymentMethodsResponse||t,this.options)}async createCoreModules(){if(this.modules)return;const s=await this.fetchLocaleTranslations();this.modules=Object.freeze({risk:new o(this,{...this.options,loadingContext:this.loadingContext}),analytics:r({loadingContext:this.loadingContext,analyticsContext:this.analyticsContext,clientKey:this.options.clientKey,locale:this.options.locale,analytics:this.options.analytics,amount:this.options.amount,bundleType:b.metadata.bundleType}),resources:new m(this.cdnContext),i18n:new t({locale:this.options.locale,translations:s,customTranslations:this.options.translations}),srPanel:new d(this,{...this.options.srConfig})})}}export{b as default};
1
+ import{Language as t}from"../language/Language.js";import o from"./RiskModule/RiskModule.js";import s from"./ProcessResponse/PaymentMethods/PaymentMethods.js";import{getComponentForAction as e}from"./ProcessResponse/PaymentAction/PaymentAction.js";import n from"./Analytics/Analytics.js";import{assertConfigurationPropertiesAreValid as i,processGlobalOptions as a}from"./utils.js";import r from"./CheckoutSession/CheckoutSession.js";import{hasOwnProperty as h}from"../utils/hasOwnProperty.js";import{Resources as l}from"./Context/Resources.js";import{SRPanel as c}from"./Errors/SRPanel.js";import p from"./core.registry.js";import{sanitizeResponse as m,verifyPaymentDidNotFail as d,cleanupFinalResult as u}from"../components/internal/UIElement/utils.js";import y,{IMPLEMENTATION_ERROR as f}from"./Errors/AdyenCheckoutError.js";import{ANALYTICS_ACTION_STR as C}from"./Analytics/constants.js";import{THREEDS2_FULL as g}from"../components/ThreeDS2/constants.js";import{DEFAULT_LOCALE as w}from"../language/constants.js";import j from"./Services/get-translations.js";import{defaultProps as E}from"./core.defaultProps.js";import{formatLocale as A,formatCustomTranslations as P}from"../language/utils.js";import{resolveEnvironments as v}from"./Environment/Environment.js";class M{session;paymentMethodsResponse;modules;options;analyticsContext;loadingContext;cdnImagesUrl;cdnTranslationsUrl;components=[];static metadata={version:"6.0.0-alpha.6",bundleType:"esm"};static registry=p;static setBundleType(t){M.metadata.bundleType=t}static register(...t){p.add(...t)}register(...t){p.add(...t)}getComponent(t){return p.getComponent(t)}constructor(t){i(t),this.createFromAction=this.createFromAction.bind(this),this.setOptions({...E,...t});const{apiUrl:o,analyticsUrl:s,cdnImagesUrl:e,cdnTranslationsUrl:n}=v(this.options.environment,this.options._environmentUrls);this.loadingContext=o,this.analyticsContext=s,this.cdnImagesUrl=e,this.cdnTranslationsUrl=n,this.session=this.options.session&&new r(this.options.session,this.options.clientKey,this.loadingContext);const a=this.options.clientKey?.substr(0,4);if(("test"===a||"live"===a)&&!this.loadingContext.includes(a))throw new y("IMPLEMENTATION_ERROR",`Error: you are using a ${a} clientKey against the ${this.options._environmentUrls?.api||this.options.environment} environment`);this.options.exposeLibraryMetadata&&(window.AdyenWebMetadata=M.metadata)}async initialize(){return await this.initializeCore(),this.validateCoreConfiguration(),await this.createCoreModules(),this}async initializeCore(){return this.session?this.session.setupSession(this.options).then((t=>{const{amount:o,shopperLocale:s,countryCode:e,paymentMethods:n,...i}=t;return this.setOptions({...i,amount:this.options.order?this.options.order.remainingAmount:o,locale:this.options.locale||s,countryCode:this.options.countryCode||e}),this.createPaymentMethodsList(n),this})).catch((t=>(this.options.onError&&this.options.onError(t),Promise.reject(t)))):(this.createPaymentMethodsList(),Promise.resolve(this))}async fetchLocaleTranslations(){try{return await j(this.cdnTranslationsUrl,M.metadata.version,this.options.locale,this.options.translations)}catch(t){t instanceof y?this.options.onError?.(t):this.options.onError?.(new y("ERROR","Failed to fetch translation",{cause:t}))}}validateCoreConfiguration(){if(this.options.paymentMethodsConfiguration&&console.warn('WARNING: "paymentMethodsConfiguration" is supported only by Drop-in.'),!this.options.countryCode)throw new y(f,"You must specify a countryCode when initializing checkout.");this.options.locale||this.setOptions({locale:w}),this.options.locale=A(this.options.locale),this.options.translations=P(this.options.translations)}submitDetails(t){let o=null;this.options.onAdditionalDetails&&(o=new Promise(((o,s)=>{this.options.onAdditionalDetails({data:t},void 0,{resolve:o,reject:s})}))),this.session&&(o=this.session.submitDetails(t).catch((t=>(this.options.onError?.(t),Promise.reject(t))))),o?o.then(m).then(d).then((t=>{u(t),this.options.onPaymentCompleted?.(t)})).catch((t=>{u(t),this.options.onPaymentFailed?.(t)})):this.options.onError?.(new y("IMPLEMENTATION_ERROR",'It can not submit the details. The callback "onAdditionalDetails" or the Session is not setup correctly.'))}createFromAction(t,o={}){if(!t||!t.type){if(h(t,"action")&&h(t,"resultCode"))throw new Error('createFromAction::Invalid Action - the passed action object itself has an "action" property and a "resultCode": have you passed in the whole response object by mistake?');throw new Error('createFromAction::Invalid Action - the passed action object does not have a "type" property')}if(t.type){const s=t.type===g?`${t.type}${t.subtype}`:t.paymentMethodType;this.modules.analytics.sendAnalytics(s,{type:C,subtype:t.type,message:`${s} action was handled by the SDK`});const n={...this.getCorePropsForComponent(),...o};return e(this,p,t,n)}return this.handleCreateError()}update=(t={})=>(this.setOptions(t),this.initialize().then((()=>(this.components.forEach((o=>o.update(t))),this))));remove=t=>(this.components=this.components.filter((o=>o._id!==t._id)),t.unmount(),this);setOptions=t=>{this.options={...this.options,...t,locale:t?.locale||this.options?.locale}};getCorePropsForComponent(){return{...a(this.options),core:this,i18n:this.modules.i18n,modules:this.modules,session:this.session,loadingContext:this.loadingContext,cdnContext:this.cdnImagesUrl,createFromAction:this.createFromAction}}storeElementReference(t){t&&this.components.push(t)}handleCreateError(t){const o=t?`${t?.name??"The passed payment method"} is not a valid Checkout Component. What was passed as a txVariant was: ${JSON.stringify(t)}. Check if this payment method is configured in the Backoffice or if the txVariant is a valid one`:"No Payment Method component was passed";throw new Error(o)}createPaymentMethodsList(t){this.paymentMethodsResponse=new s(this.options.paymentMethodsResponse||t,this.options)}async createCoreModules(){if(this.modules)return;const s=await this.fetchLocaleTranslations();this.modules=Object.freeze({risk:new o(this,{...this.options,loadingContext:this.loadingContext}),analytics:n({loadingContext:this.loadingContext,analyticsContext:this.analyticsContext,clientKey:this.options.clientKey,locale:this.options.locale,analytics:this.options.analytics,amount:this.options.amount,bundleType:M.metadata.bundleType}),resources:new l(this.cdnImagesUrl),i18n:new t({locale:this.options.locale,translations:s,customTranslations:this.options.translations}),srPanel:new c(this,{...this.options.srConfig})})}}export{M as default};
2
2
  //# sourceMappingURL=core.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"core.js","sources":["../../../src/core/core.ts"],"sourcesContent":["import Language from '../language';\nimport UIElement from '../components/internal/UIElement/UIElement';\nimport RiskModule from './RiskModule';\nimport PaymentMethods from './ProcessResponse/PaymentMethods';\nimport getComponentForAction from './ProcessResponse/PaymentAction';\nimport { resolveEnvironment, resolveCDNEnvironment, resolveAnalyticsEnvironment } from './Environment';\nimport Analytics from './Analytics';\nimport { assertConfigurationPropertiesAreValid, processGlobalOptions } from './utils';\nimport Session from './CheckoutSession';\nimport { hasOwnProperty } from '../utils/hasOwnProperty';\nimport { Resources } from './Context/Resources';\nimport { SRPanel } from './Errors/SRPanel';\nimport registry, { NewableComponent } from './core.registry';\nimport { cleanupFinalResult, sanitizeResponse, verifyPaymentDidNotFail } from '../components/internal/UIElement/utils';\nimport AdyenCheckoutError, { IMPLEMENTATION_ERROR } from './Errors/AdyenCheckoutError';\nimport { ANALYTICS_ACTION_STR } from './Analytics/constants';\nimport { THREEDS2_FULL } from '../components/ThreeDS2/constants';\nimport { DEFAULT_LOCALE } from '../language/constants';\nimport getTranslations from './Services/get-translations';\nimport { defaultProps } from './core.defaultProps';\nimport { formatCustomTranslations, formatLocale } from '../language/utils';\n\nimport type { AdditionalDetailsStateData, PaymentAction, PaymentResponseData } from '../types/global-types';\nimport type { CoreConfiguration, ICore } from './types';\nimport type { Translations } from '../language/types';\n\nclass Core implements ICore {\n public session?: Session;\n public paymentMethodsResponse: PaymentMethods;\n public modules: any;\n public options: CoreConfiguration;\n public loadingContext?: string;\n public cdnContext?: string;\n public analyticsContext?: string;\n\n private components: UIElement[] = [];\n\n public static readonly metadata = {\n version: process.env.VERSION,\n bundleType: process.env.BUNDLE_TYPE\n };\n\n public static registry = registry;\n\n public static setBundleType(type: string): void {\n Core.metadata.bundleType = type;\n }\n\n public static register(...items: NewableComponent[]) {\n registry.add(...items);\n }\n\n /**\n * Used internally by the PaymentMethod components to auto-register themselves\n * @internal\n */\n public register(...items: NewableComponent[]) {\n registry.add(...items);\n }\n\n public getComponent(txVariant: string) {\n return registry.getComponent(txVariant);\n }\n\n constructor(props: CoreConfiguration) {\n assertConfigurationPropertiesAreValid(props);\n\n this.createFromAction = this.createFromAction.bind(this);\n\n this.setOptions({ ...defaultProps, ...props });\n\n this.loadingContext = resolveEnvironment(this.options.environment, this.options.environmentUrls?.api);\n this.cdnContext = resolveCDNEnvironment(this.options.resourceEnvironment || this.options.environment, this.options.environmentUrls?.api);\n\n this.analyticsContext = resolveAnalyticsEnvironment(this.options.environment);\n this.session = this.options.session && new Session(this.options.session, this.options.clientKey, this.loadingContext);\n\n const clientKeyType = this.options.clientKey?.substr(0, 4);\n if ((clientKeyType === 'test' || clientKeyType === 'live') && !this.loadingContext.includes(clientKeyType)) {\n throw new AdyenCheckoutError(\n 'IMPLEMENTATION_ERROR',\n `Error: you are using a ${clientKeyType} clientKey against the ${this.options.environmentUrls?.api || this.options.environment} environment`\n );\n }\n\n if (this.options.exposeLibraryMetadata) {\n window['AdyenWebMetadata'] = Core.metadata;\n }\n }\n\n public async initialize(): Promise<this> {\n await this.initializeCore();\n this.validateCoreConfiguration();\n await this.createCoreModules();\n return this;\n }\n\n private async initializeCore(): Promise<this> {\n if (this.session) {\n return this.session\n .setupSession(this.options)\n .then(sessionResponse => {\n const { amount, shopperLocale, countryCode, paymentMethods, ...rest } = sessionResponse;\n\n this.setOptions({\n ...rest,\n amount: this.options.order ? this.options.order.remainingAmount : amount,\n locale: this.options.locale || shopperLocale,\n countryCode: this.options.countryCode || countryCode\n });\n\n this.createPaymentMethodsList(paymentMethods);\n\n return this;\n })\n .catch(error => {\n if (this.options.onError) this.options.onError(error);\n return Promise.reject(error);\n });\n }\n\n this.createPaymentMethodsList();\n return Promise.resolve(this);\n }\n\n private async fetchLocaleTranslations(): Promise<Translations> {\n try {\n const translation = await getTranslations(\n this.cdnContext,\n Core.metadata.version,\n this.options.locale,\n this.options._translationEnvironment,\n this.options.translations\n );\n return translation;\n } catch (error) {\n this.options.onError?.(error);\n }\n }\n\n private validateCoreConfiguration(): void {\n // @ts-ignore This property does not exist, although merchants might be using when migrating from v5 to v6\n if (this.options.paymentMethodsConfiguration) {\n console.warn('WARNING: \"paymentMethodsConfiguration\" is supported only by Drop-in.');\n }\n\n if (!this.options.countryCode) {\n throw new AdyenCheckoutError(\n IMPLEMENTATION_ERROR,\n 'You must specify a countryCode when initializing checkout. (If you are using a session then this session should be initialized with a countryCode.)'\n );\n }\n\n if (!this.options.locale) {\n this.setOptions({ locale: DEFAULT_LOCALE });\n }\n\n this.options.locale = formatLocale(this.options.locale);\n this.options.translations = formatCustomTranslations(this.options.translations);\n }\n\n /**\n * Method used when handling redirects. It submits details using 'onAdditionalDetails' or the Sessions flow if available.\n *\n * @public\n * @see {https://docs.adyen.com/online-payments/build-your-integration/?platform=Web&integration=Components&version=5.55.1#handle-the-redirect}\n * @param details - Details object containing the redirectResult\n */\n public submitDetails(details: AdditionalDetailsStateData['data']): void {\n let promise = null;\n\n if (this.options.onAdditionalDetails) {\n promise = new Promise((resolve, reject) => {\n this.options.onAdditionalDetails({ data: details }, undefined, { resolve, reject });\n });\n }\n\n if (this.session) {\n promise = this.session.submitDetails(details).catch(error => {\n this.options.onError?.(error);\n return Promise.reject(error);\n });\n }\n\n if (!promise) {\n this.options.onError?.(\n new AdyenCheckoutError(\n 'IMPLEMENTATION_ERROR',\n 'It can not submit the details. The callback \"onAdditionalDetails\" or the Session is not setup correctly.'\n )\n );\n return;\n }\n\n promise\n .then(sanitizeResponse)\n .then(verifyPaymentDidNotFail)\n .then((response: PaymentResponseData) => {\n cleanupFinalResult(response);\n this.options.onPaymentCompleted?.(response);\n })\n .catch((response: PaymentResponseData) => {\n cleanupFinalResult(response);\n this.options.onPaymentFailed?.(response);\n });\n }\n\n /**\n * Instantiates a new element component ready to be mounted from an action object\n *\n * @param action - action defining the component with the component data\n * @param options - options that will be merged to the global Checkout props\n * @returns new UIElement\n */\n public createFromAction(action: PaymentAction, options = {}): any {\n if (!action || !action.type) {\n if (hasOwnProperty(action, 'action') && hasOwnProperty(action, 'resultCode')) {\n throw new Error(\n 'createFromAction::Invalid Action - the passed action object itself has an \"action\" property and ' +\n 'a \"resultCode\": have you passed in the whole response object by mistake?'\n );\n }\n throw new Error('createFromAction::Invalid Action - the passed action object does not have a \"type\" property');\n }\n\n if (action.type) {\n // 'threeDS2' OR 'qrCode', 'voucher', 'redirect', 'await', 'bankTransfer`\n const component = action.type === THREEDS2_FULL ? `${action.type}${action.subtype}` : action.paymentMethodType;\n\n this.modules.analytics.sendAnalytics(component, {\n type: ANALYTICS_ACTION_STR,\n subtype: action.type,\n message: `${component} action was handled by the SDK`\n });\n\n const props = {\n ...this.getCorePropsForComponent(),\n ...options\n };\n\n return getComponentForAction(this, registry, action, props);\n }\n\n return this.handleCreateError();\n }\n\n /**\n * Updates global configurations, resets the internal state and remounts each element.\n *\n * @param options - props to update\n * @returns this - the element instance\n */\n public update = (options: Partial<CoreConfiguration> = {}): Promise<this> => {\n this.setOptions(options);\n\n return this.initialize().then(() => {\n // Update each component under this instance\n // here we should update only the new options that have been received from core\n this.components.forEach(c => c.update(options));\n return this;\n });\n };\n\n /**\n * Remove the reference of a component\n * @param component - reference to the component to be removed\n * @returns this - the element instance\n * // TODO: Do we need this?\n */\n public remove = (component): this => {\n this.components = this.components.filter(c => c._id !== component._id);\n component.unmount();\n\n return this;\n };\n\n /**\n * @internal\n * Create or update the config object passed when AdyenCheckout is initialised (environment, clientKey, etc...)\n */\n private setOptions = (options: CoreConfiguration): void => {\n this.options = {\n ...this.options,\n ...options,\n locale: options?.locale || this.options?.locale\n };\n };\n\n /**\n * @internal\n * @returns props for a new UIElement\n */\n public getCorePropsForComponent(): any {\n const globalOptions = processGlobalOptions(this.options);\n\n return {\n ...globalOptions,\n core: this,\n i18n: this.modules.i18n,\n modules: this.modules,\n session: this.session,\n loadingContext: this.loadingContext,\n cdnContext: this.cdnContext,\n createFromAction: this.createFromAction\n };\n }\n\n public storeElementReference(element: UIElement) {\n if (element) {\n this.components.push(element);\n }\n }\n\n /**\n * @internal\n */\n private handleCreateError(paymentMethod?): never {\n const paymentMethodName = paymentMethod?.name ?? 'The passed payment method';\n const errorMessage = paymentMethod\n ? `${paymentMethodName} is not a valid Checkout Component. What was passed as a txVariant was: ${JSON.stringify(\n paymentMethod\n )}. Check if this payment method is configured in the Backoffice or if the txVariant is a valid one`\n : 'No Payment Method component was passed';\n\n throw new Error(errorMessage);\n }\n\n private createPaymentMethodsList(paymentMethodsResponse?: PaymentMethods): void {\n this.paymentMethodsResponse = new PaymentMethods(this.options.paymentMethodsResponse || paymentMethodsResponse, this.options);\n }\n\n private async createCoreModules(): Promise<void> {\n if (this.modules) {\n if (process.env.NODE_ENV === 'development') {\n console.warn('Core: Core modules are already created.');\n }\n return;\n }\n\n const translations = await this.fetchLocaleTranslations();\n\n this.modules = Object.freeze({\n risk: new RiskModule(this, { ...this.options, loadingContext: this.loadingContext }),\n analytics: Analytics({\n loadingContext: this.loadingContext,\n analyticsContext: this.analyticsContext,\n clientKey: this.options.clientKey,\n locale: this.options.locale,\n analytics: this.options.analytics,\n amount: this.options.amount,\n bundleType: Core.metadata.bundleType\n }),\n resources: new Resources(this.cdnContext),\n i18n: new Language({\n locale: this.options.locale,\n translations,\n customTranslations: this.options.translations\n }),\n srPanel: new SRPanel(this, { ...this.options.srConfig })\n });\n }\n}\n\nexport default Core;\n"],"names":["Core","session","paymentMethodsResponse","modules","options","loadingContext","cdnContext","analyticsContext","components","static","version","bundleType","registry","setBundleType","type","metadata","register","items","add","getComponent","txVariant","constructor","props","assertConfigurationPropertiesAreValid","this","createFromAction","bind","setOptions","defaultProps","resolveEnvironment","environment","environmentUrls","api","resolveCDNEnvironment","resourceEnvironment","resolveAnalyticsEnvironment","Session","clientKey","clientKeyType","substr","includes","AdyenCheckoutError","exposeLibraryMetadata","window","initialize","initializeCore","validateCoreConfiguration","createCoreModules","setupSession","then","sessionResponse","amount","shopperLocale","countryCode","paymentMethods","rest","order","remainingAmount","locale","createPaymentMethodsList","catch","error","onError","Promise","reject","resolve","fetchLocaleTranslations","getTranslations","_translationEnvironment","translations","paymentMethodsConfiguration","console","warn","IMPLEMENTATION_ERROR","DEFAULT_LOCALE","formatLocale","formatCustomTranslations","submitDetails","details","promise","onAdditionalDetails","data","undefined","sanitizeResponse","verifyPaymentDidNotFail","response","cleanupFinalResult","onPaymentCompleted","onPaymentFailed","action","hasOwnProperty","Error","component","THREEDS2_FULL","subtype","paymentMethodType","analytics","sendAnalytics","ANALYTICS_ACTION_STR","message","getCorePropsForComponent","getComponentForAction","handleCreateError","update","forEach","c","remove","filter","_id","unmount","processGlobalOptions","core","i18n","storeElementReference","element","push","paymentMethod","errorMessage","name","JSON","stringify","PaymentMethods","Object","freeze","risk","RiskModule","Analytics","resources","Resources","Language","customTranslations","srPanel","SRPanel","srConfig"],"mappings":"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"}
1
+ {"version":3,"file":"core.js","sources":["../../../src/core/core.ts"],"sourcesContent":["import Language from '../language';\nimport UIElement from '../components/internal/UIElement/UIElement';\nimport RiskModule from './RiskModule';\nimport PaymentMethods from './ProcessResponse/PaymentMethods';\nimport getComponentForAction from './ProcessResponse/PaymentAction';\nimport Analytics from './Analytics';\nimport { assertConfigurationPropertiesAreValid, processGlobalOptions } from './utils';\nimport Session from './CheckoutSession';\nimport { hasOwnProperty } from '../utils/hasOwnProperty';\nimport { Resources } from './Context/Resources';\nimport { SRPanel } from './Errors/SRPanel';\nimport registry, { NewableComponent } from './core.registry';\nimport { cleanupFinalResult, sanitizeResponse, verifyPaymentDidNotFail } from '../components/internal/UIElement/utils';\nimport AdyenCheckoutError, { IMPLEMENTATION_ERROR } from './Errors/AdyenCheckoutError';\nimport { ANALYTICS_ACTION_STR } from './Analytics/constants';\nimport { THREEDS2_FULL } from '../components/ThreeDS2/constants';\nimport { DEFAULT_LOCALE } from '../language/constants';\nimport getTranslations from './Services/get-translations';\nimport { defaultProps } from './core.defaultProps';\nimport { formatCustomTranslations, formatLocale } from '../language/utils';\nimport { resolveEnvironments } from './Environment';\n\nimport type { AdditionalDetailsStateData, PaymentAction, PaymentResponseData } from '../types/global-types';\nimport type { CoreConfiguration, ICore } from './types';\nimport type { Translations } from '../language/types';\n\nclass Core implements ICore {\n public session?: Session;\n public paymentMethodsResponse: PaymentMethods;\n public modules: any;\n public options: CoreConfiguration;\n\n public analyticsContext: string;\n public loadingContext: string;\n public cdnImagesUrl: string;\n public cdnTranslationsUrl: string;\n\n private components: UIElement[] = [];\n\n public static readonly metadata = {\n version: process.env.VERSION,\n bundleType: process.env.BUNDLE_TYPE\n };\n\n public static registry = registry;\n\n public static setBundleType(type: string): void {\n Core.metadata.bundleType = type;\n }\n\n public static register(...items: NewableComponent[]) {\n registry.add(...items);\n }\n\n /**\n * Used internally by the PaymentMethod components to auto-register themselves\n * @internal\n */\n public register(...items: NewableComponent[]) {\n registry.add(...items);\n }\n\n public getComponent(txVariant: string) {\n return registry.getComponent(txVariant);\n }\n\n constructor(props: CoreConfiguration) {\n assertConfigurationPropertiesAreValid(props);\n\n this.createFromAction = this.createFromAction.bind(this);\n\n this.setOptions({ ...defaultProps, ...props });\n\n const { apiUrl, analyticsUrl, cdnImagesUrl, cdnTranslationsUrl } = resolveEnvironments(\n this.options.environment,\n this.options._environmentUrls\n );\n\n this.loadingContext = apiUrl;\n this.analyticsContext = analyticsUrl;\n this.cdnImagesUrl = cdnImagesUrl;\n this.cdnTranslationsUrl = cdnTranslationsUrl;\n\n this.session = this.options.session && new Session(this.options.session, this.options.clientKey, this.loadingContext);\n\n const clientKeyType = this.options.clientKey?.substr(0, 4);\n if ((clientKeyType === 'test' || clientKeyType === 'live') && !this.loadingContext.includes(clientKeyType)) {\n throw new AdyenCheckoutError(\n 'IMPLEMENTATION_ERROR',\n `Error: you are using a ${clientKeyType} clientKey against the ${this.options._environmentUrls?.api || this.options.environment} environment`\n );\n }\n\n if (this.options.exposeLibraryMetadata) {\n window['AdyenWebMetadata'] = Core.metadata;\n }\n }\n\n public async initialize(): Promise<this> {\n await this.initializeCore();\n this.validateCoreConfiguration();\n await this.createCoreModules();\n return this;\n }\n\n private async initializeCore(): Promise<this> {\n if (this.session) {\n return this.session\n .setupSession(this.options)\n .then(sessionResponse => {\n const { amount, shopperLocale, countryCode, paymentMethods, ...rest } = sessionResponse;\n\n this.setOptions({\n ...rest,\n amount: this.options.order ? this.options.order.remainingAmount : amount,\n locale: this.options.locale || shopperLocale,\n countryCode: this.options.countryCode || countryCode\n });\n\n this.createPaymentMethodsList(paymentMethods);\n\n return this;\n })\n .catch(error => {\n if (this.options.onError) this.options.onError(error);\n return Promise.reject(error);\n });\n }\n\n this.createPaymentMethodsList();\n return Promise.resolve(this);\n }\n\n private async fetchLocaleTranslations(): Promise<Translations> {\n try {\n const translation = await getTranslations(this.cdnTranslationsUrl, Core.metadata.version, this.options.locale, this.options.translations);\n return translation;\n } catch (error: unknown) {\n if (error instanceof AdyenCheckoutError) this.options.onError?.(error);\n else this.options.onError?.(new AdyenCheckoutError('ERROR', 'Failed to fetch translation', { cause: error }));\n }\n }\n\n private validateCoreConfiguration(): void {\n // @ts-ignore This property does not exist, although merchants might be using when migrating from v5 to v6\n if (this.options.paymentMethodsConfiguration) {\n console.warn('WARNING: \"paymentMethodsConfiguration\" is supported only by Drop-in.');\n }\n\n if (!this.options.countryCode) {\n throw new AdyenCheckoutError(IMPLEMENTATION_ERROR, 'You must specify a countryCode when initializing checkout.');\n }\n\n if (!this.options.locale) {\n this.setOptions({ locale: DEFAULT_LOCALE });\n }\n\n this.options.locale = formatLocale(this.options.locale);\n this.options.translations = formatCustomTranslations(this.options.translations);\n }\n\n /**\n * Method used when handling redirects. It submits details using 'onAdditionalDetails' or the Sessions flow if available.\n *\n * @public\n * @see {https://docs.adyen.com/online-payments/build-your-integration/?platform=Web&integration=Components&version=5.55.1#handle-the-redirect}\n * @param details - Details object containing the redirectResult\n */\n public submitDetails(details: AdditionalDetailsStateData['data']): void {\n let promise = null;\n\n if (this.options.onAdditionalDetails) {\n promise = new Promise((resolve, reject) => {\n this.options.onAdditionalDetails({ data: details }, undefined, { resolve, reject });\n });\n }\n\n if (this.session) {\n promise = this.session.submitDetails(details).catch(error => {\n this.options.onError?.(error);\n return Promise.reject(error);\n });\n }\n\n if (!promise) {\n this.options.onError?.(\n new AdyenCheckoutError(\n 'IMPLEMENTATION_ERROR',\n 'It can not submit the details. The callback \"onAdditionalDetails\" or the Session is not setup correctly.'\n )\n );\n return;\n }\n\n promise\n .then(sanitizeResponse)\n .then(verifyPaymentDidNotFail)\n .then((response: PaymentResponseData) => {\n cleanupFinalResult(response);\n this.options.onPaymentCompleted?.(response);\n })\n .catch((response: PaymentResponseData) => {\n cleanupFinalResult(response);\n this.options.onPaymentFailed?.(response);\n });\n }\n\n /**\n * Instantiates a new element component ready to be mounted from an action object\n *\n * @param action - action defining the component with the component data\n * @param options - options that will be merged to the global Checkout props\n * @returns new UIElement\n */\n public createFromAction(action: PaymentAction, options = {}): any {\n if (!action || !action.type) {\n if (hasOwnProperty(action, 'action') && hasOwnProperty(action, 'resultCode')) {\n throw new Error(\n 'createFromAction::Invalid Action - the passed action object itself has an \"action\" property and ' +\n 'a \"resultCode\": have you passed in the whole response object by mistake?'\n );\n }\n throw new Error('createFromAction::Invalid Action - the passed action object does not have a \"type\" property');\n }\n\n if (action.type) {\n // 'threeDS2' OR 'qrCode', 'voucher', 'redirect', 'await', 'bankTransfer`\n const component = action.type === THREEDS2_FULL ? `${action.type}${action.subtype}` : action.paymentMethodType;\n\n this.modules.analytics.sendAnalytics(component, {\n type: ANALYTICS_ACTION_STR,\n subtype: action.type,\n message: `${component} action was handled by the SDK`\n });\n\n const props = {\n ...this.getCorePropsForComponent(),\n ...options\n };\n\n return getComponentForAction(this, registry, action, props);\n }\n\n return this.handleCreateError();\n }\n\n /**\n * Updates global configurations, resets the internal state and remounts each element.\n *\n * @param options - props to update\n * @returns this - the element instance\n */\n public update = (options: Partial<CoreConfiguration> = {}): Promise<this> => {\n this.setOptions(options);\n\n return this.initialize().then(() => {\n // Update each component under this instance\n // here we should update only the new options that have been received from core\n this.components.forEach(c => c.update(options));\n return this;\n });\n };\n\n /**\n * Remove the reference of a component\n * @param component - reference to the component to be removed\n * @returns this - the element instance\n * // TODO: Do we need this?\n */\n public remove = (component): this => {\n this.components = this.components.filter(c => c._id !== component._id);\n component.unmount();\n\n return this;\n };\n\n /**\n * @internal\n * Create or update the config object passed when AdyenCheckout is initialised (environment, clientKey, etc...)\n */\n private setOptions = (options: CoreConfiguration): void => {\n this.options = {\n ...this.options,\n ...options,\n locale: options?.locale || this.options?.locale\n };\n };\n\n /**\n * @internal\n * @returns props for a new UIElement\n */\n public getCorePropsForComponent(): any {\n const globalOptions = processGlobalOptions(this.options);\n\n return {\n ...globalOptions,\n core: this,\n i18n: this.modules.i18n,\n modules: this.modules,\n session: this.session,\n loadingContext: this.loadingContext,\n cdnContext: this.cdnImagesUrl,\n createFromAction: this.createFromAction\n };\n }\n\n public storeElementReference(element: UIElement) {\n if (element) {\n this.components.push(element);\n }\n }\n\n /**\n * @internal\n */\n private handleCreateError(paymentMethod?): never {\n const paymentMethodName = paymentMethod?.name ?? 'The passed payment method';\n const errorMessage = paymentMethod\n ? `${paymentMethodName} is not a valid Checkout Component. What was passed as a txVariant was: ${JSON.stringify(\n paymentMethod\n )}. Check if this payment method is configured in the Backoffice or if the txVariant is a valid one`\n : 'No Payment Method component was passed';\n\n throw new Error(errorMessage);\n }\n\n private createPaymentMethodsList(paymentMethodsResponse?: PaymentMethods): void {\n this.paymentMethodsResponse = new PaymentMethods(this.options.paymentMethodsResponse || paymentMethodsResponse, this.options);\n }\n\n private async createCoreModules(): Promise<void> {\n if (this.modules) {\n if (process.env.NODE_ENV === 'development') {\n console.warn('Core: Core modules are already created.');\n }\n return;\n }\n\n const translations = await this.fetchLocaleTranslations();\n\n this.modules = Object.freeze({\n risk: new RiskModule(this, { ...this.options, loadingContext: this.loadingContext }),\n analytics: Analytics({\n loadingContext: this.loadingContext,\n analyticsContext: this.analyticsContext,\n clientKey: this.options.clientKey,\n locale: this.options.locale,\n analytics: this.options.analytics,\n amount: this.options.amount,\n bundleType: Core.metadata.bundleType\n }),\n resources: new Resources(this.cdnImagesUrl),\n i18n: new Language({\n locale: this.options.locale,\n translations,\n customTranslations: this.options.translations\n }),\n srPanel: new SRPanel(this, { ...this.options.srConfig })\n });\n }\n}\n\nexport default Core;\n"],"names":["Core","session","paymentMethodsResponse","modules","options","analyticsContext","loadingContext","cdnImagesUrl","cdnTranslationsUrl","components","static","version","bundleType","registry","setBundleType","type","metadata","register","items","add","getComponent","txVariant","constructor","props","assertConfigurationPropertiesAreValid","this","createFromAction","bind","setOptions","defaultProps","apiUrl","analyticsUrl","resolveEnvironments","environment","_environmentUrls","Session","clientKey","clientKeyType","substr","includes","AdyenCheckoutError","api","exposeLibraryMetadata","window","initialize","initializeCore","validateCoreConfiguration","createCoreModules","setupSession","then","sessionResponse","amount","shopperLocale","countryCode","paymentMethods","rest","order","remainingAmount","locale","createPaymentMethodsList","catch","error","onError","Promise","reject","resolve","fetchLocaleTranslations","getTranslations","translations","cause","paymentMethodsConfiguration","console","warn","IMPLEMENTATION_ERROR","DEFAULT_LOCALE","formatLocale","formatCustomTranslations","submitDetails","details","promise","onAdditionalDetails","data","undefined","sanitizeResponse","verifyPaymentDidNotFail","response","cleanupFinalResult","onPaymentCompleted","onPaymentFailed","action","hasOwnProperty","Error","component","THREEDS2_FULL","subtype","paymentMethodType","analytics","sendAnalytics","ANALYTICS_ACTION_STR","message","getCorePropsForComponent","getComponentForAction","handleCreateError","update","forEach","c","remove","filter","_id","unmount","processGlobalOptions","core","i18n","cdnContext","storeElementReference","element","push","paymentMethod","errorMessage","name","JSON","stringify","PaymentMethods","Object","freeze","risk","RiskModule","Analytics","resources","Resources","Language","customTranslations","srPanel","SRPanel","srConfig"],"mappings":"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"}
@@ -1,2 +1,2 @@
1
- import{GENERIC_OPTIONS as e}from"./config.js";function n(n){return Object.keys(n).reduce(((o,t)=>(e.includes(t)&&(o[t]=n[t]),o)),{})}function o(e){const n=(e=>e)(["session","environment","environmentUrls","showPayButton","clientKey","locale","translations","paymentMethodsResponse","_translationEnvironment","amount","secondaryAmount","countryCode","allowPaymentMethods","removePaymentMethods","srConfig","cdnContext","resourceEnvironment","analytics","risk","order","exposeLibraryMetadata","beforeRedirect","beforeSubmit","onPaymentCompleted","onPaymentFailed","onSubmit","onAdditionalDetails","onActionHandled","onChange","onError","onBalanceCheck","onOrderRequest","onPaymentMethodsRequest","onOrderCancel","onOrderUpdated","loadingContext"]);Object.keys(e).forEach((e=>{n.includes(e)||console.warn(`AdyenCheckout - Configuration property "${e}" is not a valid AdyenCheckout property. If it is a payment method configuration, make sure to pass it directly to the Component. If you are using Drop-in, make sure to pass it to "paymentMethodsConfiguration" object`)}))}export{o as assertConfigurationPropertiesAreValid,n as processGlobalOptions};
1
+ import{GENERIC_OPTIONS as e}from"./config.js";function o(o){return Object.keys(o).reduce(((n,t)=>(e.includes(t)&&(n[t]=o[t]),n)),{})}function n(e){const o=(e=>e)(["session","environment","_environmentUrls","showPayButton","clientKey","locale","translations","paymentMethodsResponse","amount","secondaryAmount","countryCode","allowPaymentMethods","removePaymentMethods","srConfig","analytics","risk","order","exposeLibraryMetadata","beforeRedirect","beforeSubmit","onPaymentCompleted","onPaymentFailed","onSubmit","onAdditionalDetails","onActionHandled","onChange","onError","onBalanceCheck","onOrderRequest","onPaymentMethodsRequest","onOrderCancel","onOrderUpdated","loadingContext"]);Object.keys(e).forEach((e=>{o.includes(e)||console.warn(`AdyenCheckout - Configuration property "${e}" is not a valid AdyenCheckout property. If it is a payment method configuration, make sure to pass it directly to the Component. If you are using Drop-in, make sure to pass it to "paymentMethodsConfiguration" object`)}))}export{n as assertConfigurationPropertiesAreValid,o as processGlobalOptions};
2
2
  //# sourceMappingURL=utils.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"utils.js","sources":["../../../src/core/utils.ts"],"sourcesContent":["import { GENERIC_OPTIONS } from './config';\nimport type { CoreConfiguration } from './types';\n\n/**\n * Filter properties in a global configuration object from an allow list (GENERIC_OPTIONS)\n * @param globalOptions -\n * @returns any\n */\nexport function processGlobalOptions(globalOptions) {\n return Object.keys(globalOptions).reduce((r, e) => {\n if (GENERIC_OPTIONS.includes(e)) r[e] = globalOptions[e];\n return r;\n }, {});\n}\n\n/**\n * Validates that there is no unknown property as part of the CoreConfiguration.\n * The validator makes sure to throw a lint error in case a property is added to CoreConfiguration, but it is not added here\n *\n * @param props - AdyenCheckout props\n */\nexport function assertConfigurationPropertiesAreValid(propsSetByMerchant: CoreConfiguration): void {\n /** Helper that creates a function that validates the array contain ALL CoreConfiguration properties in it */\n function createConfigurationKeysValidator<T>() {\n const arrayOfAll =\n <T>() =>\n <U extends T[]>(array: U & ([T] extends [U[number]] ? unknown : 'Invalid')) =>\n array;\n const arrayWithAllKeys = arrayOfAll<T>();\n return arrayWithAllKeys;\n }\n\n const validator = createConfigurationKeysValidator<keyof CoreConfiguration>();\n const possibleFields = validator([\n 'session',\n 'environment',\n 'environmentUrls',\n 'showPayButton',\n 'clientKey',\n 'locale',\n 'translations',\n 'paymentMethodsResponse',\n '_translationEnvironment',\n 'amount',\n 'secondaryAmount',\n 'countryCode',\n 'allowPaymentMethods',\n 'removePaymentMethods',\n 'srConfig',\n 'cdnContext',\n 'resourceEnvironment',\n 'analytics',\n 'risk',\n 'order',\n 'exposeLibraryMetadata',\n 'beforeRedirect',\n 'beforeSubmit',\n 'onPaymentCompleted',\n 'onPaymentFailed',\n 'onSubmit',\n 'onAdditionalDetails',\n 'onActionHandled',\n 'onChange',\n 'onError',\n 'onBalanceCheck',\n 'onOrderRequest',\n 'onPaymentMethodsRequest',\n 'onOrderCancel',\n 'onOrderUpdated',\n 'loadingContext'\n ]);\n\n Object.keys(propsSetByMerchant).forEach((prop: keyof CoreConfiguration) => {\n if (!possibleFields.includes(prop)) {\n console.warn(\n `AdyenCheckout - Configuration property \"${prop}\" is not a valid AdyenCheckout property. If it is a payment method configuration, make sure to pass it directly to the Component. If you are using Drop-in, make sure to pass it to \"paymentMethodsConfiguration\" object`\n );\n }\n });\n}\n"],"names":["processGlobalOptions","globalOptions","Object","keys","reduce","r","e","GENERIC_OPTIONS","includes","assertConfigurationPropertiesAreValid","propsSetByMerchant","possibleFields","array","validator","forEach","prop","console","warn"],"mappings":"8CAQO,SAASA,EAAqBC,GACjC,OAAOC,OAAOC,KAAKF,GAAeG,QAAO,CAACC,EAAGC,KACrCC,EAAgBC,SAASF,KAAID,EAAEC,GAAKL,EAAcK,IAC/CD,IACR,CAAC,EACR,CAQO,SAASI,EAAsCC,GAWlD,MACMC,EAPE,CAAgBC,GACZA,EAMWC,CAAU,CAC7B,UACA,cACA,kBACA,gBACA,YACA,SACA,eACA,yBACA,0BACA,SACA,kBACA,cACA,sBACA,uBACA,WACA,aACA,sBACA,YACA,OACA,QACA,wBACA,iBACA,eACA,qBACA,kBACA,WACA,sBACA,kBACA,WACA,UACA,iBACA,iBACA,0BACA,gBACA,iBACA,mBAGJX,OAAOC,KAAKO,GAAoBI,SAASC,IAChCJ,EAAeH,SAASO,IACzBC,QAAQC,KACJ,2CAA2CF,4NAEnD,GAER"}
1
+ {"version":3,"file":"utils.js","sources":["../../../src/core/utils.ts"],"sourcesContent":["import { GENERIC_OPTIONS } from './config';\nimport type { CoreConfiguration } from './types';\n\n/**\n * Filter properties in a global configuration object from an allow list (GENERIC_OPTIONS)\n * @param globalOptions -\n * @returns any\n */\nexport function processGlobalOptions(globalOptions) {\n return Object.keys(globalOptions).reduce((r, e) => {\n if (GENERIC_OPTIONS.includes(e)) r[e] = globalOptions[e];\n return r;\n }, {});\n}\n\n/**\n * Validates that there is no unknown property as part of the CoreConfiguration.\n * The validator makes sure to throw a lint error in case a property is added to CoreConfiguration, but it is not added here\n *\n * @param props - AdyenCheckout props\n */\nexport function assertConfigurationPropertiesAreValid(propsSetByMerchant: CoreConfiguration): void {\n /** Helper that creates a function that validates the array contain ALL CoreConfiguration properties in it */\n function createConfigurationKeysValidator<T>() {\n const arrayOfAll =\n <T>() =>\n <U extends T[]>(array: U & ([T] extends [U[number]] ? unknown : 'Invalid')) =>\n array;\n const arrayWithAllKeys = arrayOfAll<T>();\n return arrayWithAllKeys;\n }\n\n const validator = createConfigurationKeysValidator<keyof CoreConfiguration>();\n const possibleFields = validator([\n 'session',\n 'environment',\n '_environmentUrls',\n 'showPayButton',\n 'clientKey',\n 'locale',\n 'translations',\n 'paymentMethodsResponse',\n 'amount',\n 'secondaryAmount',\n 'countryCode',\n 'allowPaymentMethods',\n 'removePaymentMethods',\n 'srConfig',\n 'analytics',\n 'risk',\n 'order',\n 'exposeLibraryMetadata',\n 'beforeRedirect',\n 'beforeSubmit',\n 'onPaymentCompleted',\n 'onPaymentFailed',\n 'onSubmit',\n 'onAdditionalDetails',\n 'onActionHandled',\n 'onChange',\n 'onError',\n 'onBalanceCheck',\n 'onOrderRequest',\n 'onPaymentMethodsRequest',\n 'onOrderCancel',\n 'onOrderUpdated',\n 'loadingContext'\n ]);\n\n Object.keys(propsSetByMerchant).forEach((prop: keyof CoreConfiguration) => {\n if (!possibleFields.includes(prop)) {\n console.warn(\n `AdyenCheckout - Configuration property \"${prop}\" is not a valid AdyenCheckout property. If it is a payment method configuration, make sure to pass it directly to the Component. If you are using Drop-in, make sure to pass it to \"paymentMethodsConfiguration\" object`\n );\n }\n });\n}\n"],"names":["processGlobalOptions","globalOptions","Object","keys","reduce","r","e","GENERIC_OPTIONS","includes","assertConfigurationPropertiesAreValid","propsSetByMerchant","possibleFields","array","validator","forEach","prop","console","warn"],"mappings":"8CAQO,SAASA,EAAqBC,GACjC,OAAOC,OAAOC,KAAKF,GAAeG,QAAO,CAACC,EAAGC,KACrCC,EAAgBC,SAASF,KAAID,EAAEC,GAAKL,EAAcK,IAC/CD,IACR,CAAC,EACR,CAQO,SAASI,EAAsCC,GAWlD,MACMC,EAPE,CAAgBC,GACZA,EAMWC,CAAU,CAC7B,UACA,cACA,mBACA,gBACA,YACA,SACA,eACA,yBACA,SACA,kBACA,cACA,sBACA,uBACA,WACA,YACA,OACA,QACA,wBACA,iBACA,eACA,qBACA,kBACA,WACA,sBACA,kBACA,WACA,UACA,iBACA,iBACA,0BACA,gBACA,iBACA,mBAGJX,OAAOC,KAAKO,GAAoBI,SAASC,IAChCJ,EAAeH,SAASO,IACzBC,QAAQC,KACJ,2CAA2CF,4NAEnD,GAER"}
@@ -1,2 +1,2 @@
1
- var e,n,t,_,l,o,r,i,u={},s=[],c=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function f(e,n){for(var t in n)e[t]=n[t];return e}function p(e){var n=e.parentNode;n&&n.removeChild(e)}function a(n,t,_){var l,o,r,i={};for(r in t)"key"==r?l=t[r]:"ref"==r?o=t[r]:i[r]=t[r];if(arguments.length>2&&(i.children=arguments.length>3?e.call(arguments,2):_),"function"==typeof n&&null!=n.defaultProps)for(r in n.defaultProps)void 0===i[r]&&(i[r]=n.defaultProps[r]);return d(n,i,l,o,null)}function d(e,_,l,o,r){var i={type:e,props:_,key:l,ref:o,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==r?++t:r};return null==r&&null!=n.vnode&&n.vnode(i),i}function h(e){return e.children}function v(e,n){this.props=e,this.context=n}function y(e,n){if(null==n)return e.__?y(e.__,e.__.__k.indexOf(e)+1):null;for(var t;n<e.__k.length;n++)if(null!=(t=e.__k[n])&&null!=t.__e)return t.__e;return"function"==typeof e.type?y(e):null}function m(e){var n,t;if(null!=(e=e.__)&&null!=e.__c){for(e.__e=e.__c.base=null,n=0;n<e.__k.length;n++)if(null!=(t=e.__k[n])&&null!=t.__e){e.__e=e.__c.base=t.__e;break}return m(e)}}function g(e){(!e.__d&&(e.__d=!0)&&_.push(e)&&!k.__r++||l!==n.debounceRendering)&&((l=n.debounceRendering)||o)(k)}function k(){var e,n,t,l,o,i,u,s;for(_.sort(r);e=_.shift();)e.__d&&(n=_.length,l=void 0,o=void 0,u=(i=(t=e).__v).__e,(s=t.__P)&&(l=[],(o=f({},i)).__v=i.__v+1,D(s,i,o,t.__n,void 0!==s.ownerSVGElement,null!=i.__h?[u]:null,l,null==u?y(i):u,i.__h),T(l,i),i.__e!=u&&m(i)),_.length>n&&_.sort(r));k.__r=0}function b(e,n,t,_,l,o,r,i,c,f){var p,a,v,m,g,k,b,C=_&&_.__k||s,w=C.length;for(t.__k=[],p=0;p<n.length;p++)if(null!=(m=t.__k[p]=null==(m=n[p])||"boolean"==typeof m||"function"==typeof m?null:"string"==typeof m||"number"==typeof m||"bigint"==typeof m?d(null,m,null,null,m):Array.isArray(m)?d(h,{children:m},null,null,null):m.__b>0?d(m.type,m.props,m.key,m.ref?m.ref:null,m.__v):m)){if(m.__=t,m.__b=t.__b+1,null===(v=C[p])||v&&m.key==v.key&&m.type===v.type)C[p]=void 0;else for(a=0;a<w;a++){if((v=C[a])&&m.key==v.key&&m.type===v.type){C[a]=void 0;break}v=null}D(e,m,v=v||u,l,o,r,i,c,f),g=m.__e,(a=m.ref)&&v.ref!=a&&(b||(b=[]),v.ref&&b.push(v.ref,null,m),b.push(a,m.__c||g,m)),null!=g?(null==k&&(k=g),"function"==typeof m.type&&m.__k===v.__k?m.__d=c=x(m,c,e):c=S(e,m,v,C,g,c),"function"==typeof t.type&&(t.__d=c)):c&&v.__e==c&&c.parentNode!=e&&(c=y(v))}for(t.__e=k,p=w;p--;)null!=C[p]&&("function"==typeof t.type&&null!=C[p].__e&&C[p].__e==t.__d&&(t.__d=P(_).nextSibling),L(C[p],C[p]));if(b)for(p=0;p<b.length;p++)W(b[p],b[++p],b[++p])}function x(e,n,t){for(var _,l=e.__k,o=0;l&&o<l.length;o++)(_=l[o])&&(_.__=e,n="function"==typeof _.type?x(_,n,t):S(t,_,_,l,_.__e,n));return n}function C(e,n){return n=n||[],null==e||"boolean"==typeof e||(Array.isArray(e)?e.some((function(e){C(e,n)})):n.push(e)),n}function S(e,n,t,_,l,o){var r,i,u;if(void 0!==n.__d)r=n.__d,n.__d=void 0;else if(null==t||l!=o||null==l.parentNode)e:if(null==o||o.parentNode!==e)e.appendChild(l),r=null;else{for(i=o,u=0;(i=i.nextSibling)&&u<_.length;u+=1)if(i==l)break e;e.insertBefore(l,o),r=o}return void 0!==r?r:l.nextSibling}function P(e){var n,t,_;if(null==e.type||"string"==typeof e.type)return e.__e;if(e.__k)for(n=e.__k.length-1;n>=0;n--)if((t=e.__k[n])&&(_=P(t)))return _;return null}function w(e,n,t){"-"===n[0]?e.setProperty(n,null==t?"":t):e[n]=null==t?"":"number"!=typeof t||c.test(n)?t:t+"px"}function E(e,n,t,_,l){var o;e:if("style"===n)if("string"==typeof t)e.style.cssText=t;else{if("string"==typeof _&&(e.style.cssText=_=""),_)for(n in _)t&&n in t||w(e.style,n,"");if(t)for(n in t)_&&t[n]===_[n]||w(e.style,n,t[n])}else if("o"===n[0]&&"n"===n[1])o=n!==(n=n.replace(/Capture$/,"")),n=n.toLowerCase()in e?n.toLowerCase().slice(2):n.slice(2),e.l||(e.l={}),e.l[n+o]=t,t?_||e.addEventListener(n,o?A:U,o):e.removeEventListener(n,o?A:U,o);else if("dangerouslySetInnerHTML"!==n){if(l)n=n.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!==n&&"height"!==n&&"href"!==n&&"list"!==n&&"form"!==n&&"tabIndex"!==n&&"download"!==n&&n in e)try{e[n]=null==t?"":t;break e}catch(e){}"function"==typeof t||(null==t||!1===t&&"-"!==n[4]?e.removeAttribute(n):e.setAttribute(n,t))}}function U(e){return this.l[e.type+!1](n.event?n.event(e):e)}function A(e){return this.l[e.type+!0](n.event?n.event(e):e)}function D(e,t,_,l,o,r,i,u,s){var c,p,a,d,y,m,g,k,x,C,S,P,w,E,U,A=t.type;if(void 0!==t.constructor)return null;null!=_.__h&&(s=_.__h,u=t.__e=_.__e,t.__h=null,r=[u]),(c=n.__b)&&c(t);try{e:if("function"==typeof A){if(k=t.props,x=(c=A.contextType)&&l[c.__c],C=c?x?x.props.value:c.__:l,_.__c?g=(p=t.__c=_.__c).__=p.__E:("prototype"in A&&A.prototype.render?t.__c=p=new A(k,C):(t.__c=p=new v(k,C),p.constructor=A,p.render=M),x&&x.sub(p),p.props=k,p.state||(p.state={}),p.context=C,p.__n=l,a=p.__d=!0,p.__h=[],p._sb=[]),null==p.__s&&(p.__s=p.state),null!=A.getDerivedStateFromProps&&(p.__s==p.state&&(p.__s=f({},p.__s)),f(p.__s,A.getDerivedStateFromProps(k,p.__s))),d=p.props,y=p.state,p.__v=t,a)null==A.getDerivedStateFromProps&&null!=p.componentWillMount&&p.componentWillMount(),null!=p.componentDidMount&&p.__h.push(p.componentDidMount);else{if(null==A.getDerivedStateFromProps&&k!==d&&null!=p.componentWillReceiveProps&&p.componentWillReceiveProps(k,C),!p.__e&&null!=p.shouldComponentUpdate&&!1===p.shouldComponentUpdate(k,p.__s,C)||t.__v===_.__v){for(t.__v!==_.__v&&(p.props=k,p.state=p.__s,p.__d=!1),p.__e=!1,t.__e=_.__e,t.__k=_.__k,t.__k.forEach((function(e){e&&(e.__=t)})),S=0;S<p._sb.length;S++)p.__h.push(p._sb[S]);p._sb=[],p.__h.length&&i.push(p);break e}null!=p.componentWillUpdate&&p.componentWillUpdate(k,p.__s,C),null!=p.componentDidUpdate&&p.__h.push((function(){p.componentDidUpdate(d,y,m)}))}if(p.context=C,p.props=k,p.__P=e,P=n.__r,w=0,"prototype"in A&&A.prototype.render){for(p.state=p.__s,p.__d=!1,P&&P(t),c=p.render(p.props,p.state,p.context),E=0;E<p._sb.length;E++)p.__h.push(p._sb[E]);p._sb=[]}else do{p.__d=!1,P&&P(t),c=p.render(p.props,p.state,p.context),p.state=p.__s}while(p.__d&&++w<25);p.state=p.__s,null!=p.getChildContext&&(l=f(f({},l),p.getChildContext())),a||null==p.getSnapshotBeforeUpdate||(m=p.getSnapshotBeforeUpdate(d,y)),U=null!=c&&c.type===h&&null==c.key?c.props.children:c,b(e,Array.isArray(U)?U:[U],t,_,l,o,r,i,u,s),p.base=t.__e,t.__h=null,p.__h.length&&i.push(p),g&&(p.__E=p.__=null),p.__e=!1}else null==r&&t.__v===_.__v?(t.__k=_.__k,t.__e=_.__e):t.__e=N(_.__e,t,_,l,o,r,i,s);(c=n.diffed)&&c(t)}catch(e){t.__v=null,(s||null!=r)&&(t.__e=u,t.__h=!!s,r[r.indexOf(u)]=null),n.__e(e,t,_)}}function T(e,t){n.__c&&n.__c(t,e),e.some((function(t){try{e=t.__h,t.__h=[],e.some((function(e){e.call(t)}))}catch(e){n.__e(e,t.__v)}}))}function N(n,t,_,l,o,r,i,s){var c,f,a,d=_.props,h=t.props,v=t.type,m=0;if("svg"===v&&(o=!0),null!=r)for(;m<r.length;m++)if((c=r[m])&&"setAttribute"in c==!!v&&(v?c.localName===v:3===c.nodeType)){n=c,r[m]=null;break}if(null==n){if(null===v)return document.createTextNode(h);n=o?document.createElementNS("http://www.w3.org/2000/svg",v):document.createElement(v,h.is&&h),r=null,s=!1}if(null===v)d===h||s&&n.data===h||(n.data=h);else{if(r=r&&e.call(n.childNodes),f=(d=_.props||u).dangerouslySetInnerHTML,a=h.dangerouslySetInnerHTML,!s){if(null!=r)for(d={},m=0;m<n.attributes.length;m++)d[n.attributes[m].name]=n.attributes[m].value;(a||f)&&(a&&(f&&a.__html==f.__html||a.__html===n.innerHTML)||(n.innerHTML=a&&a.__html||""))}if(function(e,n,t,_,l){var o;for(o in t)"children"===o||"key"===o||o in n||E(e,o,null,t[o],_);for(o in n)l&&"function"!=typeof n[o]||"children"===o||"key"===o||"value"===o||"checked"===o||t[o]===n[o]||E(e,o,n[o],t[o],_)}(n,h,d,o,s),a)t.__k=[];else if(m=t.props.children,b(n,Array.isArray(m)?m:[m],t,_,l,o&&"foreignObject"!==v,r,i,r?r[0]:_.__k&&y(_,0),s),null!=r)for(m=r.length;m--;)null!=r[m]&&p(r[m]);s||("value"in h&&void 0!==(m=h.value)&&(m!==n.value||"progress"===v&&!m||"option"===v&&m!==d.value)&&E(n,"value",m,d.value,!1),"checked"in h&&void 0!==(m=h.checked)&&m!==n.checked&&E(n,"checked",m,d.checked,!1))}return n}function W(e,t,_){try{"function"==typeof e?e(t):e.current=t}catch(e){n.__e(e,_)}}function L(e,t,_){var l,o;if(n.unmount&&n.unmount(e),(l=e.ref)&&(l.current&&l.current!==e.__e||W(l,null,t)),null!=(l=e.__c)){if(l.componentWillUnmount)try{l.componentWillUnmount()}catch(e){n.__e(e,t)}l.base=l.__P=null,e.__c=void 0}if(l=e.__k)for(o=0;o<l.length;o++)l[o]&&L(l[o],t,_||"function"!=typeof e.type);_||null==e.__e||p(e.__e),e.__=e.__e=e.__d=void 0}function M(e,n,t){return this.constructor(e,t)}function F(t,_,l){var o,r,i;n.__&&n.__(t,_),r=(o="function"==typeof l)?null:l&&l.__k||_.__k,i=[],D(_,t=(!o&&l||_).__k=a(h,null,[t]),r||u,u,void 0!==_.ownerSVGElement,!o&&l?[l]:r?null:_.firstChild?e.call(_.childNodes):null,i,!o&&l?l:r?r.__e:_.firstChild,o),T(i,t)}function H(n,t,_){var l,o,r,i=f({},n.props);for(r in t)"key"==r?l=t[r]:"ref"==r?o=t[r]:i[r]=t[r];return arguments.length>2&&(i.children=arguments.length>3?e.call(arguments,2):_),d(n.type,i,l||n.key,o||n.ref,null)}function I(e,n){var t={__c:n="__cC"+i++,__:e,Consumer:function(e,n){return e.children(n)},Provider:function(e){var t,_;return this.getChildContext||(t=[],(_={})[n]=this,this.getChildContext=function(){return _},this.shouldComponentUpdate=function(e){this.props.value!==e.value&&t.some((function(e){e.__e=!0,g(e)}))},this.sub=function(e){t.push(e);var n=e.componentWillUnmount;e.componentWillUnmount=function(){t.splice(t.indexOf(e),1),n&&n.call(e)}}),e.children}};return t.Provider.__=t.Consumer.contextType=t}e=s.slice,n={__e:function(e,n,t,_){for(var l,o,r;n=n.__;)if((l=n.__c)&&!l.__)try{if((o=l.constructor)&&null!=o.getDerivedStateFromError&&(l.setState(o.getDerivedStateFromError(e)),r=l.__d),null!=l.componentDidCatch&&(l.componentDidCatch(e,_||{}),r=l.__d),r)return l.__E=l}catch(n){e=n}throw e}},t=0,v.prototype.setState=function(e,n){var t;t=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=f({},this.state),"function"==typeof e&&(e=e(f({},t),this.props)),e&&f(t,e),null!=e&&this.__v&&(n&&this._sb.push(n),g(this))},v.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),g(this))},v.prototype.render=h,_=[],o="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,r=function(e,n){return e.__v.__b-n.__v.__b},k.__r=0,i=0;export{v as Component,h as Fragment,H as cloneElement,I as createContext,a as createElement,a as h,n as options,F as render,C as toChildArray};
1
+ var e,n,_,t,o,l,r,u,i,s,c,f={},p=[],a=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,d=Array.isArray;function h(e,n){for(var _ in n)e[_]=n[_];return e}function v(e){var n=e.parentNode;n&&n.removeChild(e)}function y(n,_,t){var o,l,r,u={};for(r in _)"key"==r?o=_[r]:"ref"==r?l=_[r]:u[r]=_[r];if(arguments.length>2&&(u.children=arguments.length>3?e.call(arguments,2):t),"function"==typeof n&&null!=n.defaultProps)for(r in n.defaultProps)void 0===u[r]&&(u[r]=n.defaultProps[r]);return m(n,u,o,l,null)}function m(e,t,o,l,r){var u={type:e,props:t,key:o,ref:l,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:null==r?++_:r,__i:-1,__u:0};return null==r&&null!=n.vnode&&n.vnode(u),u}function g(e){return e.children}function k(e,n){this.props=e,this.context=n}function b(e,n){if(null==n)return e.__?b(e.__,e.__i+1):null;for(var _;n<e.__k.length;n++)if(null!=(_=e.__k[n])&&null!=_.__e)return _.__e;return"function"==typeof e.type?b(e):null}function C(e){var n,_;if(null!=(e=e.__)&&null!=e.__c){for(e.__e=e.__c.base=null,n=0;n<e.__k.length;n++)if(null!=(_=e.__k[n])&&null!=_.__e){e.__e=e.__c.base=_.__e;break}return C(e)}}function x(e){(!e.__d&&(e.__d=!0)&&t.push(e)&&!P.__r++||o!==n.debounceRendering)&&((o=n.debounceRendering)||l)(P)}function P(){var e,_,o,l,u,i,s,c;for(t.sort(r);e=t.shift();)e.__d&&(_=t.length,l=void 0,i=(u=(o=e).__v).__e,s=[],c=[],o.__P&&((l=h({},u)).__v=u.__v+1,n.vnode&&n.vnode(l),L(o.__P,l,u,o.__n,void 0!==o.__P.ownerSVGElement,32&u.__u?[i]:null,s,null==i?b(u):i,!!(32&u.__u),c),l.__v=u.__v,l.__.__k[l.__i]=l,M(s,l,c),l.__e!=i&&C(l)),t.length>_&&t.sort(r));P.__r=0}function S(e,n,_,t,o,l,r,u,i,s,c){var a,d,h,v,y,m=t&&t.__k||p,g=n.length;for(_.__d=i,w(_,n,m),i=_.__d,a=0;a<g;a++)null!=(h=_.__k[a])&&"boolean"!=typeof h&&"function"!=typeof h&&(d=-1===h.__i?f:m[h.__i]||f,h.__i=a,L(e,h,d,o,l,r,u,i,s,c),v=h.__e,h.ref&&d.ref!=h.ref&&(d.ref&&A(d.ref,null,h),c.push(h.ref,h.__c||v,h)),null==y&&null!=v&&(y=v),65536&h.__u||d.__k===h.__k?(i&&!i.isConnected&&(i=b(d)),i=E(h,i,e)):"function"==typeof h.type&&void 0!==h.__d?i=h.__d:v&&(i=v.nextSibling),h.__d=void 0,h.__u&=-196609);_.__d=i,_.__e=y}function w(e,n,_){var t,o,l,r,u,i=n.length,s=_.length,c=s,f=0;for(e.__k=[],t=0;t<i;t++)r=t+f,null!=(o=e.__k[t]=null==(o=n[t])||"boolean"==typeof o||"function"==typeof o?null:"string"==typeof o||"number"==typeof o||"bigint"==typeof o||o.constructor==String?m(null,o,null,null,null):d(o)?m(g,{children:o},null,null,null):void 0===o.constructor&&o.__b>0?m(o.type,o.props,o.key,o.ref?o.ref:null,o.__v):o)?(o.__=e,o.__b=e.__b+1,u=T(o,_,r,c),o.__i=u,l=null,-1!==u&&(c--,(l=_[u])&&(l.__u|=131072)),null==l||null===l.__v?(-1==u&&f--,"function"!=typeof o.type&&(o.__u|=65536)):u!==r&&(u===r+1?f++:u>r?c>i-r?f+=u-r:f--:u<r?u==r-1&&(f=u-r):f=0,u!==t+f&&(o.__u|=65536))):(l=_[r])&&null==l.key&&l.__e&&!(131072&l.__u)&&(l.__e==e.__d&&(e.__d=b(l)),H(l,l,!1),_[r]=null,c--);if(c)for(t=0;t<s;t++)null!=(l=_[t])&&!(131072&l.__u)&&(l.__e==e.__d&&(e.__d=b(l)),H(l,l))}function E(e,n,_){var t,o;if("function"==typeof e.type){for(t=e.__k,o=0;t&&o<t.length;o++)t[o]&&(t[o].__=e,n=E(t[o],n,_));return n}e.__e!=n&&(_.insertBefore(e.__e,n||null),n=e.__e);do{n=n&&n.nextSibling}while(null!=n&&8===n.nodeType);return n}function U(e,n){return n=n||[],null==e||"boolean"==typeof e||(d(e)?e.some((function(e){U(e,n)})):n.push(e)),n}function T(e,n,_,t){var o=e.key,l=e.type,r=_-1,u=_+1,i=n[_];if(null===i||i&&o==i.key&&l===i.type&&!(131072&i.__u))return _;if(t>(null==i||131072&i.__u?0:1))for(;r>=0||u<n.length;){if(r>=0){if((i=n[r])&&!(131072&i.__u)&&o==i.key&&l===i.type)return r;r--}if(u<n.length){if((i=n[u])&&!(131072&i.__u)&&o==i.key&&l===i.type)return u;u++}}return-1}function D(e,n,_){"-"===n[0]?e.setProperty(n,null==_?"":_):e[n]=null==_?"":"number"!=typeof _||a.test(n)?_:_+"px"}function W(e,n,_,t,o){var l;e:if("style"===n)if("string"==typeof _)e.style.cssText=_;else{if("string"==typeof t&&(e.style.cssText=t=""),t)for(n in t)_&&n in _||D(e.style,n,"");if(_)for(n in _)t&&_[n]===t[n]||D(e.style,n,_[n])}else if("o"===n[0]&&"n"===n[1])l=n!==(n=n.replace(/(PointerCapture)$|Capture$/i,"$1")),n=n.toLowerCase()in e||"onFocusOut"===n||"onFocusIn"===n?n.toLowerCase().slice(2):n.slice(2),e.l||(e.l={}),e.l[n+l]=_,_?t?_.u=t.u:(_.u=u,e.addEventListener(n,l?s:i,l)):e.removeEventListener(n,l?s:i,l);else{if(o)n=n.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!=n&&"height"!=n&&"href"!=n&&"list"!=n&&"form"!=n&&"tabIndex"!=n&&"download"!=n&&"rowSpan"!=n&&"colSpan"!=n&&"role"!=n&&n in e)try{e[n]=null==_?"":_;break e}catch(e){}"function"==typeof _||(null==_||!1===_&&"-"!==n[4]?e.removeAttribute(n):e.setAttribute(n,_))}}function F(e){return function(_){if(this.l){var t=this.l[_.type+e];if(null==_.t)_.t=u++;else if(_.t<t.u)return;return t(n.event?n.event(_):_)}}}function L(e,_,t,o,l,r,u,i,s,c){var f,p,a,v,y,m,b,C,x,P,w,E,U,T,D,W=_.type;if(void 0!==_.constructor)return null;128&t.__u&&(s=!!(32&t.__u),r=[i=_.__e=t.__e]),(f=n.__b)&&f(_);e:if("function"==typeof W)try{if(C=_.props,x=(f=W.contextType)&&o[f.__c],P=f?x?x.props.value:f.__:o,t.__c?b=(p=_.__c=t.__c).__=p.__E:("prototype"in W&&W.prototype.render?_.__c=p=new W(C,P):(_.__c=p=new k(C,P),p.constructor=W,p.render=$),x&&x.sub(p),p.props=C,p.state||(p.state={}),p.context=P,p.__n=o,a=p.__d=!0,p.__h=[],p._sb=[]),null==p.__s&&(p.__s=p.state),null!=W.getDerivedStateFromProps&&(p.__s==p.state&&(p.__s=h({},p.__s)),h(p.__s,W.getDerivedStateFromProps(C,p.__s))),v=p.props,y=p.state,p.__v=_,a)null==W.getDerivedStateFromProps&&null!=p.componentWillMount&&p.componentWillMount(),null!=p.componentDidMount&&p.__h.push(p.componentDidMount);else{if(null==W.getDerivedStateFromProps&&C!==v&&null!=p.componentWillReceiveProps&&p.componentWillReceiveProps(C,P),!p.__e&&(null!=p.shouldComponentUpdate&&!1===p.shouldComponentUpdate(C,p.__s,P)||_.__v===t.__v)){for(_.__v!==t.__v&&(p.props=C,p.state=p.__s,p.__d=!1),_.__e=t.__e,_.__k=t.__k,_.__k.forEach((function(e){e&&(e.__=_)})),w=0;w<p._sb.length;w++)p.__h.push(p._sb[w]);p._sb=[],p.__h.length&&u.push(p);break e}null!=p.componentWillUpdate&&p.componentWillUpdate(C,p.__s,P),null!=p.componentDidUpdate&&p.__h.push((function(){p.componentDidUpdate(v,y,m)}))}if(p.context=P,p.props=C,p.__P=e,p.__e=!1,E=n.__r,U=0,"prototype"in W&&W.prototype.render){for(p.state=p.__s,p.__d=!1,E&&E(_),f=p.render(p.props,p.state,p.context),T=0;T<p._sb.length;T++)p.__h.push(p._sb[T]);p._sb=[]}else do{p.__d=!1,E&&E(_),f=p.render(p.props,p.state,p.context),p.state=p.__s}while(p.__d&&++U<25);p.state=p.__s,null!=p.getChildContext&&(o=h(h({},o),p.getChildContext())),a||null==p.getSnapshotBeforeUpdate||(m=p.getSnapshotBeforeUpdate(v,y)),S(e,d(D=null!=f&&f.type===g&&null==f.key?f.props.children:f)?D:[D],_,t,o,l,r,u,i,s,c),p.base=_.__e,_.__u&=-161,p.__h.length&&u.push(p),b&&(p.__E=p.__=null)}catch(e){_.__v=null,s||null!=r?(_.__e=i,_.__u|=s?160:32,r[r.indexOf(i)]=null):(_.__e=t.__e,_.__k=t.__k),n.__e(e,_,t)}else null==r&&_.__v===t.__v?(_.__k=t.__k,_.__e=t.__e):_.__e=N(t.__e,_,t,o,l,r,u,s,c);(f=n.diffed)&&f(_)}function M(e,_,t){_.__d=void 0;for(var o=0;o<t.length;o++)A(t[o],t[++o],t[++o]);n.__c&&n.__c(_,e),e.some((function(_){try{e=_.__h,_.__h=[],e.some((function(e){e.call(_)}))}catch(e){n.__e(e,_.__v)}}))}function N(n,_,t,o,l,r,u,i,s){var c,p,a,h,y,m,g,k=t.props,C=_.props,x=_.type;if("svg"===x&&(l=!0),null!=r)for(c=0;c<r.length;c++)if((y=r[c])&&"setAttribute"in y==!!x&&(x?y.localName===x:3===y.nodeType)){n=y,r[c]=null;break}if(null==n){if(null===x)return document.createTextNode(C);n=l?document.createElementNS("http://www.w3.org/2000/svg",x):document.createElement(x,C.is&&C),r=null,i=!1}if(null===x)k===C||i&&n.data===C||(n.data=C);else{if(r=r&&e.call(n.childNodes),k=t.props||f,!i&&null!=r)for(k={},c=0;c<n.attributes.length;c++)k[(y=n.attributes[c]).name]=y.value;for(c in k)y=k[c],"children"==c||("dangerouslySetInnerHTML"==c?a=y:"key"===c||c in C||W(n,c,null,y,l));for(c in C)y=C[c],"children"==c?h=y:"dangerouslySetInnerHTML"==c?p=y:"value"==c?m=y:"checked"==c?g=y:"key"===c||i&&"function"!=typeof y||k[c]===y||W(n,c,y,k[c],l);if(p)i||a&&(p.__html===a.__html||p.__html===n.innerHTML)||(n.innerHTML=p.__html),_.__k=[];else if(a&&(n.innerHTML=""),S(n,d(h)?h:[h],_,t,o,l&&"foreignObject"!==x,r,u,r?r[0]:t.__k&&b(t,0),i,s),null!=r)for(c=r.length;c--;)null!=r[c]&&v(r[c]);i||(c="value",void 0!==m&&(m!==n[c]||"progress"===x&&!m||"option"===x&&m!==k[c])&&W(n,c,m,k[c],!1),c="checked",void 0!==g&&g!==n[c]&&W(n,c,g,k[c],!1))}return n}function A(e,_,t){try{"function"==typeof e?e(_):e.current=_}catch(e){n.__e(e,t)}}function H(e,_,t){var o,l;if(n.unmount&&n.unmount(e),(o=e.ref)&&(o.current&&o.current!==e.__e||A(o,null,_)),null!=(o=e.__c)){if(o.componentWillUnmount)try{o.componentWillUnmount()}catch(e){n.__e(e,_)}o.base=o.__P=null}if(o=e.__k)for(l=0;l<o.length;l++)o[l]&&H(o[l],_,t||"function"!=typeof e.type);t||null==e.__e||v(e.__e),e.__c=e.__=e.__e=e.__d=void 0}function $(e,n,_){return this.constructor(e,_)}function I(_,t,o){var l,r,u,i;n.__&&n.__(_,t),r=(l="function"==typeof o)?null:t.__k,u=[],i=[],L(t,_=(!l&&o||t).__k=y(g,null,[_]),r||f,f,void 0!==t.ownerSVGElement,!l&&o?[o]:r?null:t.firstChild?e.call(t.childNodes):null,u,!l&&o?o:r?r.__e:t.firstChild,l,i),M(u,_,i)}function O(n,_,t){var o,l,r,u,i=h({},n.props);for(r in n.type&&n.type.defaultProps&&(u=n.type.defaultProps),_)"key"==r?o=_[r]:"ref"==r?l=_[r]:i[r]=void 0===_[r]&&void 0!==u?u[r]:_[r];return arguments.length>2&&(i.children=arguments.length>3?e.call(arguments,2):t),m(n.type,i,o||n.key,l||n.ref,null)}function R(e,n){var _={__c:n="__cC"+c++,__:e,Consumer:function(e,n){return e.children(n)},Provider:function(e){var _,t;return this.getChildContext||(_=[],(t={})[n]=this,this.getChildContext=function(){return t},this.shouldComponentUpdate=function(e){this.props.value!==e.value&&_.some((function(e){e.__e=!0,x(e)}))},this.sub=function(e){_.push(e);var n=e.componentWillUnmount;e.componentWillUnmount=function(){_.splice(_.indexOf(e),1),n&&n.call(e)}}),e.children}};return _.Provider.__=_.Consumer.contextType=_}e=p.slice,n={__e:function(e,n,_,t){for(var o,l,r;n=n.__;)if((o=n.__c)&&!o.__)try{if((l=o.constructor)&&null!=l.getDerivedStateFromError&&(o.setState(l.getDerivedStateFromError(e)),r=o.__d),null!=o.componentDidCatch&&(o.componentDidCatch(e,t||{}),r=o.__d),r)return o.__E=o}catch(n){e=n}throw e}},_=0,k.prototype.setState=function(e,n){var _;_=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=h({},this.state),"function"==typeof e&&(e=e(h({},_),this.props)),e&&h(_,e),null!=e&&this.__v&&(n&&this._sb.push(n),x(this))},k.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),x(this))},k.prototype.render=g,t=[],l="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,r=function(e,n){return e.__v.__b-n.__v.__b},P.__r=0,u=0,i=F(!1),s=F(!0),c=0;export{k as Component,g as Fragment,O as cloneElement,R as createContext,y as createElement,y as h,n as options,I as render,U as toChildArray};
2
2
  //# sourceMappingURL=preact.js.map