@zonos/elements 1.3.270 → 1.3.273

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 (356) hide show
  1. package/dist/cjs/{cart-3ff48a0e.js → cart-660e115c.js} +32 -2
  2. package/dist/cjs/collect-286a9d04.js +3107 -0
  3. package/dist/cjs/{hasInclusivePrice-aec06153.js → hasInclusivePrice-b35e81aa.js} +1 -1
  4. package/dist/cjs/index.cjs.js +7 -7
  5. package/dist/cjs/{invoice-ff716652.js → invoice-f032089f.js} +2 -2
  6. package/dist/cjs/isCollectMobileTablet-884d4280.js +15 -0
  7. package/dist/cjs/loader.cjs.js +1 -1
  8. package/dist/cjs/{localization-5c1c9c6a.js → localization-f4a64f6f.js} +245 -1
  9. package/dist/cjs/{paypal-c55b6c45.js → paypal-125259ab.js} +2 -2
  10. package/dist/cjs/{placeTestOrder-230f534b.js → placeTestOrder-02001a99.js} +2 -2
  11. package/dist/cjs/{renderCheckoutCurrency-e9d8efa8.js → renderCheckoutCurrency-cad156a7.js} +2 -2
  12. package/dist/cjs/zonos-address-display_8.cjs.entry.js +18 -18
  13. package/dist/cjs/zonos-address_4.cjs.entry.js +8 -8
  14. package/dist/cjs/zonos-airwallex-payment.cjs.entry.js +170 -0
  15. package/dist/cjs/zonos-badge.cjs.entry.js +3 -3
  16. package/dist/cjs/zonos-button_3.cjs.entry.js +3 -3
  17. package/dist/cjs/zonos-card_5.cjs.entry.js +9 -9
  18. package/dist/cjs/zonos-cart-items_12.cjs.entry.js +130 -20
  19. package/dist/cjs/zonos-checkbox_2.cjs.entry.js +5 -5
  20. package/dist/cjs/zonos-checkout.cjs.entry.js +3 -3
  21. package/dist/cjs/zonos-collapse.cjs.entry.js +2 -2
  22. package/dist/cjs/zonos-collect-cart-items_3.cjs.entry.js +6 -6
  23. package/dist/cjs/zonos-collect-finish_6.cjs.entry.js +150 -36
  24. package/dist/cjs/zonos-collect.cjs.entry.js +176 -38
  25. package/dist/cjs/zonos-component.cjs.entry.js +1 -1
  26. package/dist/cjs/zonos-controller.cjs.entry.js +3 -3
  27. package/dist/cjs/zonos-country-flag.cjs.entry.js +1 -1
  28. package/dist/cjs/zonos-country-select_4.cjs.entry.js +10 -10
  29. package/dist/cjs/zonos-elements.cjs.js +1 -1
  30. package/dist/cjs/zonos-hello-dialog.cjs.entry.js +6 -6
  31. package/dist/cjs/zonos-hello.cjs.entry.js +1 -1
  32. package/dist/cjs/zonos-input.cjs.entry.js +4 -4
  33. package/dist/cjs/zonos-invoice-cart-items_2.cjs.entry.js +8 -8
  34. package/dist/cjs/zonos-invoice-finish_5.cjs.entry.js +14 -14
  35. package/dist/cjs/zonos-invoice.cjs.entry.js +4 -4
  36. package/dist/cjs/zonos-language-select_2.cjs.entry.js +5 -5
  37. package/dist/cjs/zonos-link.cjs.entry.js +1 -1
  38. package/dist/cjs/zonos-logo.cjs.entry.js +2 -2
  39. package/dist/cjs/zonos-policy-consent_2.cjs.entry.js +3 -3
  40. package/dist/cjs/zonos-stripe-input.cjs.entry.js +4 -4
  41. package/dist/cjs/zonos-tooltip.cjs.entry.js +2 -2
  42. package/dist/cjs/zonos-v-stack.cjs.entry.js +2 -2
  43. package/dist/collection/collection-manifest.json +1 -0
  44. package/dist/collection/components/airwallex/zonos-airwallex-payment/zonos-airwallex-payment.css +43 -0
  45. package/dist/collection/components/airwallex/zonos-airwallex-payment/zonos-airwallex-payment.js +215 -0
  46. package/dist/collection/components/checkout/zonos-checkout/zonos-address-update-dialog/zonos-address-form/zonos-address-form.js +4 -4
  47. package/dist/collection/components/checkout/zonos-checkout/zonos-cart-items/zonos-cart-items.js +1 -1
  48. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-finish/zonos-checkout-finish.js +4 -4
  49. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-footer/zonos-checkout-footer.js +2 -2
  50. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-payment/zonos-checkout-payment.js +4 -1
  51. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.js +1 -1
  52. package/dist/collection/components/checkout/zonos-collect/zonos-collect-cart-items/zonos-collect-cart-items.js +1 -1
  53. package/dist/collection/components/checkout/zonos-collect/zonos-collect-finish/zonos-collect-finish.js +110 -2
  54. package/dist/collection/components/checkout/zonos-collect/zonos-collect-footer/zonos-collect-footer.js +3 -3
  55. package/dist/collection/components/checkout/zonos-collect/zonos-collect-order-details/zonos-collect-order-details.js +1 -1
  56. package/dist/collection/components/checkout/zonos-collect/zonos-collect-payment/zonos-collect-payment.css +1 -17
  57. package/dist/collection/components/checkout/zonos-collect/zonos-collect-payment/zonos-collect-payment.js +21 -0
  58. package/dist/collection/components/checkout/zonos-collect/zonos-collect-review/zonos-collect-review.js +3 -3
  59. package/dist/collection/components/checkout/zonos-collect/zonos-collect-subtotal/zonos-collect-subtotal.js +5 -5
  60. package/dist/collection/components/checkout/zonos-collect/zonos-collect.js +167 -29
  61. package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-cart-items/zonos-invoice-cart-items.js +2 -2
  62. package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-finish/zonos-invoice-finish.js +2 -2
  63. package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-footer/zonos-invoice-footer.js +3 -3
  64. package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-review/zonos-invoice-review.js +3 -3
  65. package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-subtotal/zonos-invoice-subtotal.js +2 -2
  66. package/dist/collection/components/common/zonos-badge/zonos-badge.js +3 -3
  67. package/dist/collection/components/common/zonos-button/zonos-button.js +3 -3
  68. package/dist/collection/components/common/zonos-card/zonos-card.js +4 -4
  69. package/dist/collection/components/common/zonos-checkbox/zonos-checkbox.js +3 -3
  70. package/dist/collection/components/common/zonos-checkout-progress-tabs/zonos-checkout-progress-tabs.js +3 -3
  71. package/dist/collection/components/common/zonos-collapse/zonos-collapse.js +2 -2
  72. package/dist/collection/components/common/zonos-confirm-dialog/zonos-confirm-dialog.js +3 -3
  73. package/dist/collection/components/common/zonos-country-select/zonos-country-select.js +3 -3
  74. package/dist/collection/components/common/zonos-custom-message/zonos-custom-message.js +2 -2
  75. package/dist/collection/components/common/zonos-dialog/zonos-dialog.js +3 -3
  76. package/dist/collection/components/common/zonos-h-stack/zonos-h-stack.js +2 -2
  77. package/dist/collection/components/common/zonos-input/zonos-input.js +4 -4
  78. package/dist/collection/components/common/zonos-language-select/zonos-language-select.js +2 -2
  79. package/dist/collection/components/common/zonos-link/zonos-link.js +1 -1
  80. package/dist/collection/components/common/zonos-loading-overlay/zonos-loading-overlay.js +1 -1
  81. package/dist/collection/components/common/zonos-logo/zonos-logo.js +2 -2
  82. package/dist/collection/components/common/zonos-rest-state/zonos-rest-state.js +3 -3
  83. package/dist/collection/components/common/zonos-select-dialog-header/zonos-select-dialog-header.js +2 -2
  84. package/dist/collection/components/common/zonos-skeleton/zonos-skeleton.js +1 -1
  85. package/dist/collection/components/common/zonos-stripe-input/zonos-stripe-input.js +4 -4
  86. package/dist/collection/components/common/zonos-stripe-phone-input/zonos-stripe-phone-input.js +6 -6
  87. package/dist/collection/components/common/zonos-toggle/zonos-toggle.js +2 -2
  88. package/dist/collection/components/common/zonos-tooltip/zonos-tooltip.js +2 -2
  89. package/dist/collection/components/common/zonos-v-stack/zonos-v-stack.js +2 -2
  90. package/dist/collection/components/common/zonos-virtual-scroll/zonos-virtual-scroll.js +2 -2
  91. package/dist/collection/components/component-template/zonos-component/zonos-component.js +1 -1
  92. package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog-footer/zonos-hello-dialog-footer.js +2 -2
  93. package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog.js +4 -4
  94. package/dist/collection/components/main/zonos-controller.js +2 -2
  95. package/dist/collection/components/paypal/zonos-paypal-payment.js +1 -1
  96. package/dist/collection/components/store/checkout/airwallex.js +195 -0
  97. package/dist/collection/components/store/checkout/collect.js +4 -1
  98. package/dist/collection/components/store/checkout/euWithdrawalRate.js +40 -0
  99. package/dist/collection/components/store/checkout/stripe.js +26 -1
  100. package/dist/collection/components/store/hello/localization.js +3 -1
  101. package/dist/collection/components/store/translationStore/strings.arabic.js +12 -0
  102. package/dist/collection/components/store/translationStore/strings.base.js +12 -0
  103. package/dist/collection/components/store/translationStore/strings.chinese.js +12 -0
  104. package/dist/collection/components/store/translationStore/strings.danish.js +12 -0
  105. package/dist/collection/components/store/translationStore/strings.dutch.js +12 -0
  106. package/dist/collection/components/store/translationStore/strings.french.js +12 -0
  107. package/dist/collection/components/store/translationStore/strings.german.js +12 -0
  108. package/dist/collection/components/store/translationStore/strings.hebrew.js +12 -0
  109. package/dist/collection/components/store/translationStore/strings.indonesian.js +12 -0
  110. package/dist/collection/components/store/translationStore/strings.italian.js +12 -0
  111. package/dist/collection/components/store/translationStore/strings.japanese.js +12 -0
  112. package/dist/collection/components/store/translationStore/strings.korean.js +12 -0
  113. package/dist/collection/components/store/translationStore/strings.norwegian.js +12 -0
  114. package/dist/collection/components/store/translationStore/strings.polish.js +12 -0
  115. package/dist/collection/components/store/translationStore/strings.portuguese.js +12 -0
  116. package/dist/collection/components/store/translationStore/strings.russian.js +12 -0
  117. package/dist/collection/components/store/translationStore/strings.spanish.js +12 -0
  118. package/dist/collection/components/store/translationStore/strings.swedish.js +12 -0
  119. package/dist/collection/components/store/translationStore/strings.turkish.js +12 -0
  120. package/dist/collection/components/store/translationStore/strings.vietnamese.js +12 -0
  121. package/dist/collection/components/stripe/zonos-address/zonos-address.js +2 -2
  122. package/dist/collection/components/stripe/zonos-custom-address/zonos-address-suggestions/zonos-address-suggestions.js +2 -2
  123. package/dist/collection/components/stripe/zonos-custom-address/zonos-custom-address.js +2 -2
  124. package/dist/collection/components/stripe/zonos-payment/zonos-payment.js +1 -1
  125. package/dist/collection/components/utils/checkout/euWithdrawalNotice.js +74 -0
  126. package/dist/collection/types/generated/graphql.internal.types.js +318 -182
  127. package/dist/esm/{cart-44fa77ef.js → cart-23e29950.js} +32 -2
  128. package/dist/esm/collect-a235299d.js +3092 -0
  129. package/dist/esm/{hasInclusivePrice-f0440925.js → hasInclusivePrice-5e106f84.js} +1 -1
  130. package/dist/esm/index.js +7 -7
  131. package/dist/esm/{invoice-89e71796.js → invoice-78f069c7.js} +2 -2
  132. package/dist/esm/isCollectMobileTablet-111b0dd7.js +12 -0
  133. package/dist/esm/loader.js +1 -1
  134. package/dist/esm/{localization-066586b6.js → localization-17546792.js} +244 -2
  135. package/dist/esm/{paypal-8725008c.js → paypal-5bc6b0d0.js} +2 -2
  136. package/dist/esm/{placeTestOrder-38be871e.js → placeTestOrder-e842854a.js} +2 -2
  137. package/dist/esm/{renderCheckoutCurrency-802f4481.js → renderCheckoutCurrency-e3953f67.js} +2 -2
  138. package/dist/esm/zonos-address-display_8.entry.js +18 -18
  139. package/dist/esm/zonos-address_4.entry.js +8 -8
  140. package/dist/esm/zonos-airwallex-payment.entry.js +166 -0
  141. package/dist/esm/zonos-badge.entry.js +3 -3
  142. package/dist/esm/zonos-button_3.entry.js +3 -3
  143. package/dist/esm/zonos-card_5.entry.js +9 -9
  144. package/dist/esm/zonos-cart-items_12.entry.js +131 -21
  145. package/dist/esm/zonos-checkbox_2.entry.js +5 -5
  146. package/dist/esm/zonos-checkout.entry.js +3 -3
  147. package/dist/esm/zonos-collapse.entry.js +2 -2
  148. package/dist/esm/zonos-collect-cart-items_3.entry.js +6 -6
  149. package/dist/esm/zonos-collect-finish_6.entry.js +135 -21
  150. package/dist/esm/zonos-collect.entry.js +171 -33
  151. package/dist/esm/zonos-component.entry.js +1 -1
  152. package/dist/esm/zonos-controller.entry.js +3 -3
  153. package/dist/esm/zonos-country-flag.entry.js +1 -1
  154. package/dist/esm/zonos-country-select_4.entry.js +10 -10
  155. package/dist/esm/zonos-elements.js +1 -1
  156. package/dist/esm/zonos-hello-dialog.entry.js +6 -6
  157. package/dist/esm/zonos-hello.entry.js +1 -1
  158. package/dist/esm/zonos-input.entry.js +4 -4
  159. package/dist/esm/zonos-invoice-cart-items_2.entry.js +8 -8
  160. package/dist/esm/zonos-invoice-finish_5.entry.js +14 -14
  161. package/dist/esm/zonos-invoice.entry.js +4 -4
  162. package/dist/esm/zonos-language-select_2.entry.js +5 -5
  163. package/dist/esm/zonos-link.entry.js +1 -1
  164. package/dist/esm/zonos-logo.entry.js +2 -2
  165. package/dist/esm/zonos-policy-consent_2.entry.js +3 -3
  166. package/dist/esm/zonos-stripe-input.entry.js +4 -4
  167. package/dist/esm/zonos-tooltip.entry.js +2 -2
  168. package/dist/esm/zonos-v-stack.entry.js +2 -2
  169. package/dist/esm-es5/cart-23e29950.js +1 -0
  170. package/dist/esm-es5/collect-a235299d.js +1 -0
  171. package/dist/esm-es5/{hasInclusivePrice-f0440925.js → hasInclusivePrice-5e106f84.js} +1 -1
  172. package/dist/esm-es5/index.js +1 -1
  173. package/dist/esm-es5/{invoice-89e71796.js → invoice-78f069c7.js} +1 -1
  174. package/dist/esm-es5/isCollectMobileTablet-111b0dd7.js +1 -0
  175. package/dist/esm-es5/loader.js +1 -1
  176. package/dist/esm-es5/localization-17546792.js +1 -0
  177. package/dist/esm-es5/{paypal-8725008c.js → paypal-5bc6b0d0.js} +1 -1
  178. package/dist/esm-es5/{placeTestOrder-38be871e.js → placeTestOrder-e842854a.js} +1 -1
  179. package/dist/esm-es5/{renderCheckoutCurrency-802f4481.js → renderCheckoutCurrency-e3953f67.js} +1 -1
  180. package/dist/esm-es5/zonos-address-display_8.entry.js +1 -1
  181. package/dist/esm-es5/zonos-address_4.entry.js +1 -1
  182. package/dist/esm-es5/zonos-airwallex-payment.entry.js +1 -0
  183. package/dist/esm-es5/zonos-badge.entry.js +1 -1
  184. package/dist/esm-es5/zonos-button_3.entry.js +1 -1
  185. package/dist/esm-es5/zonos-card_5.entry.js +1 -1
  186. package/dist/esm-es5/zonos-cart-items_12.entry.js +1 -1
  187. package/dist/esm-es5/zonos-checkbox_2.entry.js +1 -1
  188. package/dist/esm-es5/zonos-checkout.entry.js +1 -1
  189. package/dist/esm-es5/zonos-collapse.entry.js +1 -1
  190. package/dist/esm-es5/zonos-collect-cart-items_3.entry.js +1 -1
  191. package/dist/esm-es5/zonos-collect-finish_6.entry.js +1 -1
  192. package/dist/esm-es5/zonos-collect.entry.js +1 -1
  193. package/dist/esm-es5/zonos-component.entry.js +1 -1
  194. package/dist/esm-es5/zonos-controller.entry.js +1 -1
  195. package/dist/esm-es5/zonos-country-flag.entry.js +1 -1
  196. package/dist/esm-es5/zonos-country-select_4.entry.js +1 -1
  197. package/dist/esm-es5/zonos-elements.js +1 -1
  198. package/dist/esm-es5/zonos-hello-dialog.entry.js +1 -1
  199. package/dist/esm-es5/zonos-hello.entry.js +1 -1
  200. package/dist/esm-es5/zonos-input.entry.js +1 -1
  201. package/dist/esm-es5/zonos-invoice-cart-items_2.entry.js +1 -1
  202. package/dist/esm-es5/zonos-invoice-finish_5.entry.js +1 -1
  203. package/dist/esm-es5/zonos-invoice.entry.js +1 -1
  204. package/dist/esm-es5/zonos-language-select_2.entry.js +1 -1
  205. package/dist/esm-es5/zonos-link.entry.js +1 -1
  206. package/dist/esm-es5/zonos-logo.entry.js +1 -1
  207. package/dist/esm-es5/zonos-policy-consent_2.entry.js +1 -1
  208. package/dist/esm-es5/zonos-stripe-input.entry.js +1 -1
  209. package/dist/esm-es5/zonos-tooltip.entry.js +1 -1
  210. package/dist/esm-es5/zonos-v-stack.entry.js +1 -1
  211. package/dist/scripts/index.d.ts +99 -3
  212. package/dist/scripts/index.js +1 -1
  213. package/dist/scripts/loadZonos.js +1 -1
  214. package/dist/scripts/zonos.js +1 -1
  215. package/dist/types/components/airwallex/zonos-airwallex-payment/zonos-airwallex-payment.d.ts +46 -0
  216. package/dist/types/components/checkout/zonos-collect/zonos-collect-finish/zonos-collect-finish.d.ts +7 -0
  217. package/dist/types/components/checkout/zonos-collect/zonos-collect-payment/zonos-collect-payment.d.ts +4 -0
  218. package/dist/types/components/checkout/zonos-collect/zonos-collect.d.ts +29 -0
  219. package/dist/types/components/store/checkout/airwallex.d.ts +83 -0
  220. package/dist/types/components/store/checkout/collect.d.ts +12 -1
  221. package/dist/types/components/store/checkout/euWithdrawalRate.d.ts +19 -0
  222. package/dist/types/components/store/checkout/stripe.d.ts +1 -1
  223. package/dist/types/components/store/translationStore/strings.arabic.d.ts +12 -0
  224. package/dist/types/components/store/translationStore/strings.base.d.ts +12 -0
  225. package/dist/types/components/store/translationStore/strings.chinese.d.ts +12 -0
  226. package/dist/types/components/store/translationStore/strings.danish.d.ts +12 -0
  227. package/dist/types/components/store/translationStore/strings.dutch.d.ts +12 -0
  228. package/dist/types/components/store/translationStore/strings.french.d.ts +12 -0
  229. package/dist/types/components/store/translationStore/strings.german.d.ts +12 -0
  230. package/dist/types/components/store/translationStore/strings.hebrew.d.ts +12 -0
  231. package/dist/types/components/store/translationStore/strings.indonesian.d.ts +12 -0
  232. package/dist/types/components/store/translationStore/strings.italian.d.ts +12 -0
  233. package/dist/types/components/store/translationStore/strings.japanese.d.ts +12 -0
  234. package/dist/types/components/store/translationStore/strings.korean.d.ts +12 -0
  235. package/dist/types/components/store/translationStore/strings.norwegian.d.ts +12 -0
  236. package/dist/types/components/store/translationStore/strings.polish.d.ts +12 -0
  237. package/dist/types/components/store/translationStore/strings.portuguese.d.ts +12 -0
  238. package/dist/types/components/store/translationStore/strings.russian.d.ts +12 -0
  239. package/dist/types/components/store/translationStore/strings.spanish.d.ts +12 -0
  240. package/dist/types/components/store/translationStore/strings.swedish.d.ts +12 -0
  241. package/dist/types/components/store/translationStore/strings.turkish.d.ts +12 -0
  242. package/dist/types/components/store/translationStore/strings.vietnamese.d.ts +12 -0
  243. package/dist/types/components/utils/checkout/euWithdrawalNotice.d.ts +9 -0
  244. package/dist/types/components.d.ts +42 -0
  245. package/dist/types/scripts/cart/_setupCartDataWithSettings.d.ts +8 -3
  246. package/dist/types/types/checkout/CheckoutConfig.d.ts +10 -0
  247. package/dist/types/types/checkout/api/CheckoutSession.d.ts +11 -1
  248. package/dist/types/types/checkout/api/PartyInfo.d.ts +6 -0
  249. package/dist/types/types/generated/graphql.internal.types.d.ts +416 -218
  250. package/dist/types/types/generated/graphql.internal.types.ts +537 -258
  251. package/dist/types/types/utils/ZonosSettings.d.ts +15 -0
  252. package/dist/zonos-elements/index.esm.js +1 -1
  253. package/dist/zonos-elements/p-013575f2.entry.js +1 -0
  254. package/dist/zonos-elements/{p-344a1fee.entry.js → p-055ef910.entry.js} +1 -1
  255. package/dist/zonos-elements/{p-d29dbeb3.entry.js → p-08b48608.entry.js} +1 -1
  256. package/dist/zonos-elements/{p-26ae4ee7.system.entry.js → p-0a54dae6.system.entry.js} +1 -1
  257. package/dist/zonos-elements/{p-6ac77d9f.system.entry.js → p-0b59076d.system.entry.js} +1 -1
  258. package/dist/zonos-elements/{p-c92a5ae5.system.entry.js → p-10571f94.system.entry.js} +1 -1
  259. package/dist/zonos-elements/{p-658ab5e2.entry.js → p-12a05647.entry.js} +1 -1
  260. package/dist/zonos-elements/{p-703f2737.system.js → p-14018649.system.js} +2 -2
  261. package/dist/zonos-elements/{p-acd7009a.system.entry.js → p-1678d8b4.system.entry.js} +1 -1
  262. package/dist/zonos-elements/p-171d0f9f.system.js +1 -0
  263. package/dist/zonos-elements/{p-7e03bd33.system.entry.js → p-1a105d6e.system.entry.js} +1 -1
  264. package/dist/zonos-elements/p-1a4083be.system.js +1 -0
  265. package/dist/zonos-elements/{p-72666536.system.entry.js → p-1f31f5a0.system.entry.js} +1 -1
  266. package/dist/zonos-elements/p-2197d6ab.js +1 -0
  267. package/dist/zonos-elements/{p-536cbab5.system.entry.js → p-27e50593.system.entry.js} +1 -1
  268. package/dist/zonos-elements/{p-0b4ba025.entry.js → p-2825431d.entry.js} +1 -1
  269. package/dist/zonos-elements/p-29b60bf3.system.js +1 -1
  270. package/dist/zonos-elements/{p-ccd0fa8f.system.entry.js → p-2a1247f4.system.entry.js} +1 -1
  271. package/dist/zonos-elements/p-2adbbce7.system.js +1 -0
  272. package/dist/zonos-elements/{p-553ca694.system.entry.js → p-306e5499.system.entry.js} +1 -1
  273. package/dist/zonos-elements/{p-b15ceaff.entry.js → p-31577ebd.entry.js} +1 -1
  274. package/dist/zonos-elements/{p-889a44fc.entry.js → p-328fd90e.entry.js} +1 -1
  275. package/dist/zonos-elements/p-33910e8b.js +1 -0
  276. package/dist/zonos-elements/{p-fb684748.system.entry.js → p-36b311f9.system.entry.js} +1 -1
  277. package/dist/zonos-elements/{p-5b4e5608.system.entry.js → p-3eba657b.system.entry.js} +1 -1
  278. package/dist/zonos-elements/p-41619f29.js +1 -0
  279. package/dist/zonos-elements/{p-7792f4c2.js → p-42948a52.js} +1 -1
  280. package/dist/zonos-elements/p-46e72a90.entry.js +1 -0
  281. package/dist/zonos-elements/p-49d8a10f.entry.js +1 -0
  282. package/dist/zonos-elements/{p-fc651784.system.entry.js → p-4a960329.system.entry.js} +1 -1
  283. package/dist/zonos-elements/p-4b371b65.entry.js +1 -0
  284. package/dist/zonos-elements/p-539bc46c.js +1 -0
  285. package/dist/zonos-elements/p-579932a7.js +1 -0
  286. package/dist/zonos-elements/{p-2afecda7.entry.js → p-59b10526.entry.js} +1 -1
  287. package/dist/zonos-elements/{p-98bea13e.system.entry.js → p-5aa35d1c.system.entry.js} +1 -1
  288. package/dist/zonos-elements/{p-238370ad.system.js → p-62c68aee.system.js} +1 -1
  289. package/dist/zonos-elements/{p-5df77315.system.entry.js → p-6c19310e.system.entry.js} +1 -1
  290. package/dist/zonos-elements/{p-16948eea.system.entry.js → p-732e7373.system.entry.js} +1 -1
  291. package/dist/zonos-elements/{p-0e8c4a29.entry.js → p-734d646b.entry.js} +1 -1
  292. package/dist/zonos-elements/{p-2f61dc3c.entry.js → p-7eb47eb0.entry.js} +1 -1
  293. package/dist/zonos-elements/{p-a2885536.system.entry.js → p-86a9f048.system.entry.js} +1 -1
  294. package/dist/zonos-elements/p-8af57c2a.js +1 -0
  295. package/dist/zonos-elements/{p-fb83134b.system.entry.js → p-8c4761d1.system.entry.js} +1 -1
  296. package/dist/zonos-elements/{p-5812b323.system.entry.js → p-8e77a3cd.system.entry.js} +1 -1
  297. package/dist/zonos-elements/p-919c5500.entry.js +1 -0
  298. package/dist/zonos-elements/{p-c76ec587.system.js → p-91b921a4.system.js} +1 -1
  299. package/dist/zonos-elements/p-9574695a.system.js +1 -0
  300. package/dist/zonos-elements/p-97917371.system.entry.js +1 -0
  301. package/dist/zonos-elements/p-9b003a15.system.entry.js +1 -0
  302. package/dist/zonos-elements/{p-e11c3410.entry.js → p-9c3276c8.entry.js} +1 -1
  303. package/dist/zonos-elements/p-9cd41234.system.entry.js +1 -0
  304. package/dist/zonos-elements/{p-5f92db80.system.entry.js → p-a1a05de4.system.entry.js} +1 -1
  305. package/dist/zonos-elements/{p-6704b83e.entry.js → p-a968ccba.entry.js} +1 -1
  306. package/dist/zonos-elements/{p-91702715.entry.js → p-abd485df.entry.js} +1 -1
  307. package/dist/zonos-elements/{p-69ad7325.entry.js → p-ad961f5d.entry.js} +1 -1
  308. package/dist/zonos-elements/{p-ad4c8167.system.entry.js → p-b5c01288.system.entry.js} +1 -1
  309. package/dist/zonos-elements/p-bf8c98ab.system.js +1 -0
  310. package/dist/zonos-elements/{p-eb96d62f.entry.js → p-c13d2e3f.entry.js} +1 -1
  311. package/dist/zonos-elements/{p-0b46f3bd.system.entry.js → p-c15476a1.system.entry.js} +1 -1
  312. package/dist/zonos-elements/{p-0e36a7cf.system.entry.js → p-c6823974.system.entry.js} +1 -1
  313. package/dist/zonos-elements/{p-dae881f2.entry.js → p-c83bc4b3.entry.js} +1 -1
  314. package/dist/zonos-elements/{p-134c5010.system.entry.js → p-c846a5f3.system.entry.js} +1 -1
  315. package/dist/zonos-elements/{p-7aca66cd.entry.js → p-cc508de8.entry.js} +1 -1
  316. package/dist/zonos-elements/{p-d4c966cb.entry.js → p-ccd14aa5.entry.js} +1 -1
  317. package/dist/zonos-elements/{p-801dd8d8.system.js → p-d25759fb.system.js} +1 -1
  318. package/dist/zonos-elements/{p-fcf3ed5c.entry.js → p-d5e66ea6.entry.js} +1 -1
  319. package/dist/zonos-elements/{p-2df84888.system.entry.js → p-daf57db3.system.entry.js} +1 -1
  320. package/dist/zonos-elements/{p-b35a0b1e.entry.js → p-dcef2202.entry.js} +1 -1
  321. package/dist/zonos-elements/{p-283ffaad.entry.js → p-dd6da3de.entry.js} +1 -1
  322. package/dist/zonos-elements/{p-30e819ed.entry.js → p-df6fbf3f.entry.js} +1 -1
  323. package/dist/zonos-elements/{p-0d251428.entry.js → p-e643346a.entry.js} +1 -1
  324. package/dist/zonos-elements/{p-a977cddd.entry.js → p-e8cb382e.entry.js} +1 -1
  325. package/dist/zonos-elements/{p-2651ca93.system.entry.js → p-e8ec88a9.system.entry.js} +1 -1
  326. package/dist/zonos-elements/p-e9afd736.system.entry.js +1 -0
  327. package/dist/zonos-elements/{p-208b270a.js → p-e9c8a235.js} +1 -1
  328. package/dist/zonos-elements/{p-b1a4f385.system.entry.js → p-f0eb6317.system.entry.js} +1 -1
  329. package/dist/zonos-elements/p-f1cc659c.js +1 -0
  330. package/dist/zonos-elements/{p-9abfb6b0.entry.js → p-f53c8a9f.entry.js} +1 -1
  331. package/dist/zonos-elements/{p-777d396e.entry.js → p-f72642de.entry.js} +1 -1
  332. package/dist/zonos-elements/{p-0d2d7fc4.system.js → p-fcaec700.system.js} +1 -1
  333. package/dist/zonos-elements/zonos-elements.esm.js +1 -1
  334. package/package.json +2 -1
  335. package/dist/cjs/isCollectMobileTablet-3ac53cab.js +0 -176
  336. package/dist/esm/isCollectMobileTablet-323d2ba1.js +0 -169
  337. package/dist/esm-es5/cart-44fa77ef.js +0 -1
  338. package/dist/esm-es5/isCollectMobileTablet-323d2ba1.js +0 -1
  339. package/dist/esm-es5/localization-066586b6.js +0 -1
  340. package/dist/zonos-elements/p-08c7dc07.system.entry.js +0 -1
  341. package/dist/zonos-elements/p-0e9c0eff.entry.js +0 -1
  342. package/dist/zonos-elements/p-0fb8b711.system.entry.js +0 -1
  343. package/dist/zonos-elements/p-225f19b6.entry.js +0 -1
  344. package/dist/zonos-elements/p-260a5b57.js +0 -1
  345. package/dist/zonos-elements/p-27beefda.system.js +0 -1
  346. package/dist/zonos-elements/p-31a3b070.system.js +0 -1
  347. package/dist/zonos-elements/p-5ab4bc26.system.entry.js +0 -1
  348. package/dist/zonos-elements/p-9e414000.js +0 -1
  349. package/dist/zonos-elements/p-b1125711.system.js +0 -1
  350. package/dist/zonos-elements/p-bea9d128.js +0 -1
  351. package/dist/zonos-elements/p-bfcc1432.js +0 -1
  352. package/dist/zonos-elements/p-c049c527.js +0 -1
  353. package/dist/zonos-elements/p-d659153c.entry.js +0 -1
  354. package/dist/zonos-elements/p-debd2e30.js +0 -1
  355. package/dist/zonos-elements/p-ebc966d8.entry.js +0 -1
  356. package/dist/zonos-elements/p-f5d4775a.system.js +0 -1
@@ -1,17 +1,18 @@
1
1
  import { r as registerInstance, d as createEvent, h, F as Fragment, a as Host, g as getElement } from './index-cfd394c8.js';
2
- import { b as stripeStore, c as stripeStoreRetrievePayment, t as trackConversionEvent, P as stripeStoreResetPromoCode, F as stripeStoreReset, Q as stripeStoreMessageBasedOnStatus, d as cartStore, u as cartStoreNextStep, G as cartStoreOnChange } from './cart-44fa77ef.js';
3
- import { s as submitAnalytics, c as paypalStoreReset, a as paypalStore, b as paypalInitScript } from './paypal-8725008c.js';
4
- import { t as translate, s as storageStore, l as localizationStore, v as translationStoreOnChange } from './localization-066586b6.js';
2
+ import { b as airwallexStore, d as airwallexStoreRetrievePaymentIntent, j as airwallexStoreMessageBasedOnStatus, k as airwallexStoreReset, c as collectStore, e as airwallexStoreIsPaidStatus } from './collect-a235299d.js';
3
+ import { b as stripeStore, c as stripeStoreRetrievePayment, t as trackConversionEvent, P as stripeStoreResetPromoCode, F as stripeStoreReset, Q as stripeStoreMessageBasedOnStatus, d as cartStore, u as cartStoreNextStep, G as cartStoreOnChange } from './cart-23e29950.js';
4
+ import { s as submitAnalytics, c as paypalStoreReset, a as paypalStore, b as paypalInitScript } from './paypal-5bc6b0d0.js';
5
+ import { t as translate, s as storageStore, l as localizationStore, x as translationStoreOnChange } from './localization-17546792.js';
5
6
  import { z as zonosStore } from './zonosStore-8e19daff.js';
6
7
  import { h as handleFetch, s as sendErrorLog, g as getIsTestMode, i as isCheckoutMobile, a as getIsStagingMode } from './handleFetch-a844cac1.js';
7
8
  import { c as createCustomEvent } from './createCustomEvent-58159025.js';
8
9
  import { g as getBorderRadius } from './getBorderRadius-d23f47a6.js';
9
10
  import { l as log, b as allLogs } from './VarianceTest-572cecf5.js';
10
- import { i as isCollectMobile, a as isCollectTablet, e as collectStore } from './isCollectMobileTablet-323d2ba1.js';
11
+ import { i as isCollectMobile, a as isCollectTablet } from './isCollectMobileTablet-111b0dd7.js';
11
12
  import { c as classes } from './classes-0d95c529.js';
12
13
  import { l as languages } from './ILanguage-cd6acb72.js';
13
- import { r as renderCheckoutCurrency } from './renderCheckoutCurrency-802f4481.js';
14
- import { p as placeTestOrder } from './placeTestOrder-38be871e.js';
14
+ import { r as renderCheckoutCurrency } from './renderCheckoutCurrency-e3953f67.js';
15
+ import { p as placeTestOrder } from './placeTestOrder-e842854a.js';
15
16
  import { r as renderFallback } from './renderFallback-b250f4e9.js';
16
17
  import './isDarkColor-566f04c5.js';
17
18
  import './isContrastColor-fbddacb6.js';
@@ -188,6 +189,109 @@ const ZonosCollectFinish = class {
188
189
  stripeStoreReset();
189
190
  storageStore.checkoutSessionId = null;
190
191
  };
192
+ /**
193
+ * Resolve the Airwallex payment intent id, preferring the value already in the
194
+ * store and falling back to re-fetching the collect checkout session (e.g. when
195
+ * the page was reloaded after a redirect).
196
+ */
197
+ this.getAirwallexSessionInfo = async () => {
198
+ // When the payment intent id is already in the store (e.g. the drop-in just
199
+ // succeeded this session), there's no completed session to re-fetch.
200
+ if (airwallexStore.paymentIntentId) {
201
+ return {
202
+ isCompleted: false,
203
+ paymentIntentId: airwallexStore.paymentIntentId,
204
+ };
205
+ }
206
+ const checkoutSessionId = storageStore.checkoutSessionId;
207
+ if (!checkoutSessionId) {
208
+ return { isCompleted: false, paymentIntentId: null };
209
+ }
210
+ const { json } = await handleFetch('/api/zonos-elements/collect/get-checkout-session', {
211
+ body: {
212
+ checkoutSessionId,
213
+ },
214
+ method: 'POST',
215
+ });
216
+ const checkoutSession = json === null || json === void 0 ? void 0 : json.checkoutSession;
217
+ return {
218
+ // A completed session (or one with an order attached) is already paid.
219
+ isCompleted: !!((checkoutSession === null || checkoutSession === void 0 ? void 0 : checkoutSession.completedAt) || (checkoutSession === null || checkoutSession === void 0 ? void 0 : checkoutSession.order)),
220
+ paymentIntentId: (checkoutSession === null || checkoutSession === void 0 ? void 0 : checkoutSession.paymentIntentId) || null,
221
+ };
222
+ };
223
+ this.checkAirwallexPaymentStatus = async () => {
224
+ // If the drop-in already confirmed the payment in-widget this session, trust
225
+ // that result. A status lookup that fails or hasn't propagated yet must not
226
+ // show a payment failure after the shopper already completed payment.
227
+ const sdkConfirmed = airwallexStore.paymentConfirmed;
228
+ // A forced success status is set when recovery routes an already-completed /
229
+ // paid session to the finish step (mirrors the Stripe finish flow).
230
+ const forcedSuccess = this.storybookForceStatus === 'succeeded';
231
+ const { isCompleted, paymentIntentId } = await this.getAirwallexSessionInfo();
232
+ const { status } = paymentIntentId
233
+ ? await airwallexStoreRetrievePaymentIntent(paymentIntentId)
234
+ : { status: null };
235
+ // Treat the payment as complete when the drop-in confirmed it in-widget, the
236
+ // session is already completed/paid (incl. the forced-success recovery path),
237
+ // or the payment intent reports a paid/authorized status. Pending states such
238
+ // as REQUIRES_CUSTOMER_ACTION (3DS not yet done) are not complete, so we must
239
+ // not show success or poll for an order.
240
+ const isPaid = sdkConfirmed ||
241
+ forcedSuccess ||
242
+ isCompleted ||
243
+ airwallexStoreIsPaidStatus(status);
244
+ const { messages } = sdkConfirmed || forcedSuccess || isCompleted
245
+ ? airwallexStoreMessageBasedOnStatus('SUCCEEDED')
246
+ : airwallexStoreMessageBasedOnStatus(status);
247
+ log('=== Airwallex payment intent retrieve status', 'info', {
248
+ forcedSuccess,
249
+ isCompleted,
250
+ isPaid,
251
+ paymentIntentId,
252
+ sdkConfirmed,
253
+ status,
254
+ });
255
+ this.notificationType = isPaid ? 'success' : 'error';
256
+ this.notificationTitle = isPaid
257
+ ? translate("You're all set!")
258
+ : translate('Payment failed');
259
+ this.notificationMessages = messages;
260
+ if (isPaid) {
261
+ submitAnalytics({ event: 'zonos-checkout-success' });
262
+ const checkoutSessionId = storageStore.checkoutSessionId;
263
+ void trackConversionEvent({
264
+ checkoutSessionId,
265
+ eventName: 'checkout_orderCompleted',
266
+ });
267
+ const successEvent = createCustomEvent('zonos-checkout-success', {
268
+ message: 'Zonos Checkout successfully processed order',
269
+ });
270
+ document.dispatchEvent(successEvent);
271
+ // wait this to finish before resetting store and checkout session id
272
+ await this.handleSuccessBehavior();
273
+ }
274
+ else {
275
+ submitAnalytics({ event: 'zonos-checkout-payment-fail' });
276
+ void sendErrorLog({
277
+ endpoint: 'Airwallex payment failed',
278
+ errors: [
279
+ `Payment intent "${paymentIntentId}" status: ${status} - checkout session: ${storageStore.checkoutSessionId}`,
280
+ ],
281
+ metadata: {
282
+ allLogs,
283
+ credentialToken: window.Zonos.zonosApiKey,
284
+ },
285
+ });
286
+ }
287
+ // Make sure to stop the loading spinner even when there's an error
288
+ this.isLoading = false;
289
+ // reset promo when checkout is finished
290
+ stripeStoreResetPromoCode();
291
+ stripeStoreReset();
292
+ airwallexStoreReset();
293
+ storageStore.checkoutSessionId = null;
294
+ };
191
295
  this.checkStagingOrderStatus = async () => {
192
296
  this.notificationType = 'success';
193
297
  this.notificationTitle = translate("You're all set!");
@@ -259,6 +363,9 @@ const ZonosCollectFinish = class {
259
363
  if (cartStore.isStagingMode) {
260
364
  void this.checkStagingOrderStatus();
261
365
  }
366
+ else if (collectStore.paymentProcessor === 'AIRWALLEX') {
367
+ void this.checkAirwallexPaymentStatus();
368
+ }
262
369
  else if (paypalStore.orderIdCreated) {
263
370
  void this.checkPaypalPaymentStatus();
264
371
  }
@@ -268,11 +375,11 @@ const ZonosCollectFinish = class {
268
375
  }
269
376
  render() {
270
377
  const cartId = window.Zonos.cartId;
271
- return (h(Host, { key: '3de21586bf8e0f31e698e2b1a51d3344aae94af1', class: "zonos--checkout-finish zonos--elements", style: {
378
+ return (h(Host, { key: 'fe3107670230caeaacc834983d9215422a7828ae', class: "zonos--checkout-finish zonos--elements", style: {
272
379
  '--zonos--border-radius': getBorderRadius({
273
380
  overrideBorderStyle: this.borderRadius,
274
381
  }),
275
- } }, !this.isLoading && (h("div", { key: '66f93432802d63e1fab59de19c1fd930cfddacbe', class: "zonos--finish-details" }, h("div", { key: '0857460a375bff54492dd7fe64baddf2af1e966a', class: "zonos--group" }, this.notificationType === 'success' ? (h("zonos-icon", { "aria-label": "Order success", content: SuccessIcon, iconColor: 'blue-800', size: 50 })) : (h("zonos-icon", { "aria-label": "Order failed", content: RemoveIcon, iconColor: 'red-800', size: 50 })), h("zonos-text", { key: '008c4971516d110e1c2d0a348b09fa6ca0a0b1a6', class: "zonos--title", type: "semiBoldSubheader" }, this.notificationTitle), this.confirmationId && (h("zonos-badge", { key: '3e86105dbdae6cb696b0c4be81d9fcc30576ae4b', badgeColor: "gray" }, this.confirmationId)), h("zonos-text", { key: 'b372ae467ccb62b5c03aba28635135c350473986', class: "zonos--subtitle", textColor: "gray-600" }, this.notificationMessages.map(message => (h(Fragment, null, message, h("br", null))))), this.order && cartId && (h("div", { key: 'bbf5885fe6e52135e3a2d7a82f0e85fd26e6aa74', class: "zonos--button-container" }, h("zonos-button", { key: '74dd846361072721bb3c511d675f7e42b7c063e9', onClick: () => {
382
+ } }, !this.isLoading && (h("div", { key: 'fefefedc7ec022318cbc6da23b327079afec981b', class: "zonos--finish-details" }, h("div", { key: '4428271e11c3a96db732726719c5747364a18097', class: "zonos--group" }, this.notificationType === 'success' ? (h("zonos-icon", { "aria-label": "Order success", content: SuccessIcon, iconColor: 'blue-800', size: 50 })) : (h("zonos-icon", { "aria-label": "Order failed", content: RemoveIcon, iconColor: 'red-800', size: 50 })), h("zonos-text", { key: '0c3371b3bed8fd83e437075f1c35179fbb7e5e09', class: "zonos--title", type: "semiBoldSubheader" }, this.notificationTitle), this.confirmationId && (h("zonos-badge", { key: 'dbb263f0f95a62d93ae3c5ac455625512eb1f63e', badgeColor: "gray" }, this.confirmationId)), h("zonos-text", { key: '07e2733ad91ced8e5260e0f8fea627610b864ebf', class: "zonos--subtitle", textColor: "gray-600" }, this.notificationMessages.map(message => (h(Fragment, null, message, h("br", null))))), this.order && cartId && (h("div", { key: 'ecb7332cb4b7c28d398f2957d3b521c6328163eb', class: "zonos--button-container" }, h("zonos-button", { key: 'c8303e2a61d573b6e028ab38df2427fa98471e9f', onClick: () => {
276
383
  window.open(this.getReceiptUrl({ cartId }), '_blank');
277
384
  }, size: "lg", variant: "primary" }, translate('View receipt')))))))));
278
385
  }
@@ -337,15 +444,15 @@ const ZonosCollectFooter = class {
337
444
  const languageLabel = (_a = languages.find(x => x.code === localizationStore.selectedLocale)) === null || _a === void 0 ? void 0 : _a.label;
338
445
  // reverse color when on desktop. With the coversheet backdrop, the color should be white
339
446
  const colorDesktop = 'gray-1000';
340
- return (h(Host, { key: '5ec7e478c6b2b4fc21634ed70261dce3b095a8a0', class: classes([
447
+ return (h(Host, { key: '52908f4538918641b708887436e1cfe3b643376f', class: classes([
341
448
  'zonos--elements',
342
449
  this.isMobile && 'mobile',
343
450
  this.isTablet && 'tablet',
344
- ]) }, h("div", { key: 'c16c9d6e73dbfbd416137c6bf697cbb92d2bf706', class: "zonos--collect-footer" }, h("div", { key: '7df1dde2ef014d5f1b7093e034d0ccf0e795ac61', class: "zonos--collect-locale-wrapper" }, h("zonos-button", { key: 'fcbc9ddc94b68e353b2f8f064c99abf1cc2900a9', buttonColor: colorDesktop, class: "zonos--collect-footer-language-button", icon: h("zonos-icon", { "aria-label": "Language select", content: Globe, iconColor: colorDesktop }), onClick: () => this.toggleLanguageDialog(), variant: "subtle" }, h("span", { key: 'bf58b98ed61dbc6c6cba358c34f40a15301c8c9a', class: "zonos--collect-locale-label" }, languageLabel, h("zonos-icon", { key: '2cda7ba7b226accb3f42281a0dc94d8227330193', "aria-hidden": "true", class: "zonos--collect-locale-chevron", content: ChevronDownIcon$1, iconColor: colorDesktop, size: 18 }))), h("div", { key: '963404ac73580e236740343fec11447b9ee22ca4', class: classes([
451
+ ]) }, h("div", { key: '46a1c762d78396a7f993bad323c93f8e6bc71f1b', class: "zonos--collect-footer" }, h("div", { key: 'a6a98539cdb901ecd162f5e5b98591c9b8b7321a', class: "zonos--collect-locale-wrapper" }, h("zonos-button", { key: '8a5c4a18bc1030c3e74e412ff14a59c299f59e9a', buttonColor: colorDesktop, class: "zonos--collect-footer-language-button", icon: h("zonos-icon", { "aria-label": "Language select", content: Globe, iconColor: colorDesktop }), onClick: () => this.toggleLanguageDialog(), variant: "subtle" }, h("span", { key: '03bc4235862d1382cd8f0cdb007fd708bf2bfe87', class: "zonos--collect-locale-label" }, languageLabel, h("zonos-icon", { key: '4b3bbcd5bcd4039f3cb1f1c4c12698cba1894308', "aria-hidden": "true", class: "zonos--collect-locale-chevron", content: ChevronDownIcon$1, iconColor: colorDesktop, size: 18 }))), h("div", { key: '5508629b0cdc334b81ad4d4d5a034ced133d6744', class: classes([
345
452
  'zonos--collect-language-dialog',
346
453
  this.showLanguageDialog &&
347
454
  'zonos--collect-language-dialog-open',
348
- ]) }, h("zonos-language-select", { key: '8b41a062040737a68d3c9b00839fa65b412cf7c4', handleOnClose: () => this.toggleLanguageDialog() }))), h("div", { key: '16c4a6476916227d6310c48fb4d0cc732ba8fd52', class: "zonos--collect-footer-icon-wrapper" }, h("div", { key: '220c6d0bb23e3d43f3a21ed2cf94f4eff016e8f5', class: "zonos--collect-footer-logo" }, h("zonos-text", { key: '6c6e2cab741612e4e75a2840dc36571e49aad40d', textColor: colorDesktop }, "Powered by"), h("a", { key: '60aa25c0951f8307974c4a892fddbb0626cc76d2', href: "https://zonos.com", target: "_blank", title: "Zonos website" }, h("zonos-icon", { key: '7f913799ae95ee9ed30aea2e6144d36c89ebd7f8', autoHeight: true, content: ZonosWordmark, size: 42 }))), h("div", { key: 'd74339c34ecebcbdeb60e08f8de4b83d07a93a71', class: "dot" }), h("a", { key: '8e9917e5ef37bedc593774bd7e0cab85fb7a99b4', href: "https://zonos.com/docs/legal/zonos-privacy-policy", target: "_blank" }, h("zonos-text", { key: '2cc37adc0b69dfbb7ea7ee6b6727ad173c2cae6e', textColor: colorDesktop }, "Privacy policy"))))));
455
+ ]) }, h("zonos-language-select", { key: 'ca4b77d72dfd9db8743290d333b7fcde15d090d6', handleOnClose: () => this.toggleLanguageDialog() }))), h("div", { key: '98f0d0c35e3c6b4fde833e4b9ae334549fe46f1f', class: "zonos--collect-footer-icon-wrapper" }, h("div", { key: 'b3039948472d797bf04a23d3aca839472f6c6946', class: "zonos--collect-footer-logo" }, h("zonos-text", { key: '75123a6fb2bcdce07e0ebe433a28d81eefaec9ea', textColor: colorDesktop }, "Powered by"), h("a", { key: '2a0f4e2bc5df9d383ac4b91c589d2ce7149c6b3d', href: "https://zonos.com", target: "_blank", title: "Zonos website" }, h("zonos-icon", { key: '436005434f2a9d2ff1228cd36d873b8de7d339f2', autoHeight: true, content: ZonosWordmark, size: 42 }))), h("div", { key: 'c488b5eefba54424a0e66af61415d78d8f3d46fa', class: "dot" }), h("a", { key: 'd98fc7646d4877179b94bee6d3f8a7a283bbc756', href: "https://zonos.com/docs/legal/zonos-privacy-policy", target: "_blank" }, h("zonos-text", { key: '54fe3d9316ee5b22f5620b7acde145627b66cbe3', textColor: colorDesktop }, "Privacy policy"))))));
349
456
  }
350
457
  get el() { return getElement(this); }
351
458
  static get watchers() { return {
@@ -423,7 +530,7 @@ const ZonosCollectOrderDetails = class {
423
530
  this.isMobile && 'mobile',
424
531
  ]) }, h("div", { class: "zonos--wrapper" }, h("button", { class: "zonos--order-details-header", onClick: () => {
425
532
  this.collapseState = !this.collapseState;
426
- }, type: "button" }, h("zonos-text", { type: "semiBoldLabel" }, translate('Order details')), renderCollapseIcon()), h("div", { class: "zonos--order-details-wrapper" }, h("zonos-collapse", { collapsed: this.collapseState }, h("div", { class: "zonos--collect-order-details-content" }, h("zonos-collect-cart-items", null), h("div", { class: "zonos--collect-order-info" }, h("div", { class: "zonos--collect-order-details-row" }, collectStore.amountTotalPaid !== null && (h("div", { class: "zonos--collect-order-details-column" }, h("zonos-text", { type: "smallHeader" }, translate('Total paid')), h("zonos-text", null, renderCheckoutCurrency({
533
+ }, type: "button" }, h("zonos-text", { type: "semiBoldLabel" }, translate('Shipment details')), renderCollapseIcon()), h("div", { class: "zonos--order-details-wrapper" }, h("zonos-collapse", { collapsed: this.collapseState }, h("div", { class: "zonos--collect-order-details-content" }, h("zonos-collect-cart-items", null), h("div", { class: "zonos--collect-order-info" }, h("div", { class: "zonos--collect-order-details-row" }, collectStore.amountTotalPaid !== null && (h("div", { class: "zonos--collect-order-details-column" }, h("zonos-text", { type: "smallHeader" }, translate('Total paid')), h("zonos-text", null, renderCheckoutCurrency({
427
534
  amount: collectStore.amountTotalPaid || 0,
428
535
  isForeign: true,
429
536
  })))), collectStore.originCompanyName && (h("div", { class: "zonos--collect-order-details-column" }, h("zonos-text", { type: "smallHeader" }, translate('Ordered from')), h("zonos-text", null, collectStore.originCompanyName || '')))), this.renderShippingAddress())))))));
@@ -440,7 +547,7 @@ const CheckmarkLineIcon = `<svg color="var(--zonos-elements-gray-1000)" xmlns="h
440
547
 
441
548
  const RemoveLineIcon = `<svg color="var(--zonos-elements-gray-1000)" xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path fill="var(--zonos-elements-gray-1000)" d="M14.475 10.586a.75.75 0 1 0-1.06-1.06L12 10.938l-1.414-1.414a.75.75 0 0 0-1.06 1.06L10.938 12l-1.414 1.414a.75.75 0 1 0 1.06 1.06L12 13.062l1.414 1.414a.75.75 0 0 0 1.06-1.06L13.062 12l1.414-1.414Z"/><path fill="var(--zonos-elements-gray-1000)" fill-rule="evenodd" d="M12 4a8 8 0 1 0 0 16 8 8 0 0 0 0-16Zm-6.5 8a6.5 6.5 0 1 1 13 0 6.5 6.5 0 0 1-13 0Z" clip-rule="evenodd"/></svg>`;
442
549
 
443
- const zonosCollectPaymentCss = ".sc-zonos-collect-payment-h{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-collect-payment-h *.sc-zonos-collect-payment{font-family:var(--zonos--font-family, Inter), Inter}.sc-zonos-collect-payment-h img.sc-zonos-collect-payment{max-width:100%}.sc-zonos-collect-payment-h dl.sc-zonos-collect-payment,.sc-zonos-collect-payment-h dd.sc-zonos-collect-payment,.sc-zonos-collect-payment-h h1.sc-zonos-collect-payment,.sc-zonos-collect-payment-h h2.sc-zonos-collect-payment,.sc-zonos-collect-payment-h h3.sc-zonos-collect-payment,.sc-zonos-collect-payment-h h4.sc-zonos-collect-payment,.sc-zonos-collect-payment-h h5.sc-zonos-collect-payment,.sc-zonos-collect-payment-h h6.sc-zonos-collect-payment,.sc-zonos-collect-payment-h hr.sc-zonos-collect-payment,.sc-zonos-collect-payment-h figure.sc-zonos-collect-payment,.sc-zonos-collect-payment-h p.sc-zonos-collect-payment,.sc-zonos-collect-payment-h pre.sc-zonos-collect-payment{margin:0}.sc-zonos-collect-payment-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-collect-payment-h{overflow:hidden;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex:1;flex:1}.sc-zonos-collect-payment-h .zonos--title.sc-zonos-collect-payment{margin-bottom:24px}.sc-zonos-collect-payment-h .zonos--group.sc-zonos-collect-payment{margin-bottom:20px;overflow:auto;padding:5px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex:1;flex:1;-ms-scroll-chaining:none;overscroll-behavior:contain}.sc-zonos-collect-payment-h .zonos--group.sc-zonos-collect-payment::-webkit-scrollbar{width:10px}.sc-zonos-collect-payment-h .zonos--group.sc-zonos-collect-payment::-webkit-scrollbar-track{background:var(--zonos-elements-gray-50)}.sc-zonos-collect-payment-h .zonos--group.sc-zonos-collect-payment::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}.sc-zonos-collect-payment-h .zonos--group.sc-zonos-collect-payment::-webkit-scrollbar-thumb:hover{background:#d6d6d6}.sc-zonos-collect-payment-h .zonos--payment-error-banner.sc-zonos-collect-payment{margin-bottom:8px}.sc-zonos-collect-payment-h .zonos--error-banner.sc-zonos-collect-payment{margin-bottom:16px}.sc-zonos-collect-payment-h zonos-button.sc-zonos-collect-payment{-webkit-box-shadow:0 0 1px 0 var(--zonos-elements-gray-600);box-shadow:0 0 1px 0 var(--zonos-elements-gray-600)}.sc-zonos-collect-payment-h .zonos--pay-in-base-currency-btn.sc-zonos-collect-payment{-webkit-box-shadow:none;box-shadow:none}.sc-zonos-collect-payment-h .zonos--group-btn.sc-zonos-collect-payment{position:-webkit-sticky;position:sticky;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-direction:column;flex-direction:column;gap:12px;bottom:-4px;padding-top:12px;background:var(--zonos--primary-color, var(--zonos-elements-gray-0))}.sc-zonos-collect-payment-h .zonos--group-btn.sc-zonos-collect-payment zonos-text.sc-zonos-collect-payment{text-align:center}.sc-zonos-collect-payment-h .zonos--group-btn.sc-zonos-collect-payment zonos-button.sc-zonos-collect-payment{width:100%}.sc-zonos-collect-payment-h .zonos--test-cards.sc-zonos-collect-payment{margin-top:auto;padding-top:16px}";
550
+ const zonosCollectPaymentCss = ".sc-zonos-collect-payment-h{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-collect-payment-h *.sc-zonos-collect-payment{font-family:var(--zonos--font-family, Inter), Inter}.sc-zonos-collect-payment-h img.sc-zonos-collect-payment{max-width:100%}.sc-zonos-collect-payment-h dl.sc-zonos-collect-payment,.sc-zonos-collect-payment-h dd.sc-zonos-collect-payment,.sc-zonos-collect-payment-h h1.sc-zonos-collect-payment,.sc-zonos-collect-payment-h h2.sc-zonos-collect-payment,.sc-zonos-collect-payment-h h3.sc-zonos-collect-payment,.sc-zonos-collect-payment-h h4.sc-zonos-collect-payment,.sc-zonos-collect-payment-h h5.sc-zonos-collect-payment,.sc-zonos-collect-payment-h h6.sc-zonos-collect-payment,.sc-zonos-collect-payment-h hr.sc-zonos-collect-payment,.sc-zonos-collect-payment-h figure.sc-zonos-collect-payment,.sc-zonos-collect-payment-h p.sc-zonos-collect-payment,.sc-zonos-collect-payment-h pre.sc-zonos-collect-payment{margin:0}.sc-zonos-collect-payment-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-collect-payment-h{overflow:hidden;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex:1;flex:1}.sc-zonos-collect-payment-h .zonos--title.sc-zonos-collect-payment{margin-bottom:24px}.sc-zonos-collect-payment-h .zonos--group.sc-zonos-collect-payment{margin-bottom:20px;overflow:visible;padding:5px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex:1;flex:1}.sc-zonos-collect-payment-h .zonos--payment-error-banner.sc-zonos-collect-payment{margin-bottom:8px}.sc-zonos-collect-payment-h .zonos--error-banner.sc-zonos-collect-payment{margin-bottom:16px}.sc-zonos-collect-payment-h zonos-button.sc-zonos-collect-payment{-webkit-box-shadow:0 0 1px 0 var(--zonos-elements-gray-600);box-shadow:0 0 1px 0 var(--zonos-elements-gray-600)}.sc-zonos-collect-payment-h .zonos--pay-in-base-currency-btn.sc-zonos-collect-payment{-webkit-box-shadow:none;box-shadow:none}.sc-zonos-collect-payment-h .zonos--group-btn.sc-zonos-collect-payment{position:-webkit-sticky;position:sticky;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-direction:column;flex-direction:column;gap:12px;bottom:-4px;padding-top:12px;background:var(--zonos--primary-color, var(--zonos-elements-gray-0))}.sc-zonos-collect-payment-h .zonos--group-btn.sc-zonos-collect-payment zonos-text.sc-zonos-collect-payment{text-align:center}.sc-zonos-collect-payment-h .zonos--group-btn.sc-zonos-collect-payment zonos-button.sc-zonos-collect-payment{width:100%}.sc-zonos-collect-payment-h .zonos--test-cards.sc-zonos-collect-payment{margin-top:auto;padding-top:16px}";
444
551
  const ZonosCollectPaymentStyle0 = zonosCollectPaymentCss;
445
552
 
446
553
  const ZonosCollectPayment = class {
@@ -449,6 +556,7 @@ const ZonosCollectPayment = class {
449
556
  this.continueClicked = createEvent(this, "continueClicked", 7);
450
557
  this.paypalSessionFailed = createEvent(this, "paypalSessionFailed", 7);
451
558
  this.paypalSessionDone = createEvent(this, "paypalSessionDone", 7);
559
+ this.airwallexPaymentDone = createEvent(this, "airwallexPaymentDone", 7);
452
560
  this.storeUnsubscribeList = [];
453
561
  /**
454
562
  * Whether or not the continue button is loading
@@ -573,6 +681,12 @@ const ZonosCollectPayment = class {
573
681
  }
574
682
  render() {
575
683
  var _a;
684
+ // Airwallex (05CHECK-860) renders its own drop-in element which collects the
685
+ // payment details and exposes its own pay button, so it bypasses the Stripe
686
+ // elements/client-secret guards and the Stripe continue buttons below.
687
+ if (collectStore.paymentProcessor === 'AIRWALLEX') {
688
+ return (h(Host, { class: "zonos--checkout-payment zonos--elements" }, h("div", { class: "zonos--group" }, h("zonos-text", { class: "zonos--title", type: "semiBoldSubheader" }, translate('Payment method')), h("zonos-airwallex-payment", { onAirwallexPaymentSuccess: () => this.airwallexPaymentDone.emit() }))));
689
+ }
576
690
  this.hasStripePaymentError = stripeStore.hasPaymentError;
577
691
  if (!stripeStore.stripeElements) {
578
692
  return null;
@@ -679,13 +793,13 @@ const ZonosCollectReview = class {
679
793
  }
680
794
  render() {
681
795
  const titleTextColor = this.isMobile ? 'gray-1000' : 'gray-800';
682
- return (h(Host, { key: 'e80b802a45d3d6395ead284a218ed1053d2e05a7', class: classes([
796
+ return (h(Host, { key: '7f1709df3a42ae9917e26a86e9c90703b2243ab7', class: classes([
683
797
  'zonos--collect-review zonos--elements',
684
798
  this.isMobile && 'mobile',
685
799
  this.isTablet && 'tablet',
686
- ]) }, h("div", { key: 'febeea7c348a5279ddf97bdd48e3d28fa07d6f22', class: "zonos--title" }, h("zonos-text", { key: '1ed640de9e3e6d87064a727ecca208368e1a1e81', textColor: titleTextColor, type: 'semiBoldLabel' }, translate('Pay [organizationName]', {
800
+ ]) }, h("div", { key: '5ed5f5c7da922a9393501b5e31da9a20b9724d9c', class: "zonos--title" }, h("zonos-text", { key: 'd54511663bb32405e16349b20807b9ccddb5fd03', textColor: titleTextColor, type: 'semiBoldLabel' }, translate('Pay [organizationName] duties, taxes and fees for your shipment', {
687
801
  organizationName: zonosStore.organizationName,
688
- }))), h("div", { key: '0a61b9f3a8ba33e83b50b8c53edfa3b784d47051', class: "zonos--total-pay" }, renderFallback({
802
+ }))), h("div", { key: '82967c3614ee91cf95955372bb013837f93822d1', class: "zonos--total-pay" }, renderFallback({
689
803
  content: (h("zonos-text", { type: 'secondaryPageHeader' }, renderCheckoutCurrency({
690
804
  amount: collectStore.amountDutyTaxFeeTotal || 0,
691
805
  isForeign: true,
@@ -751,7 +865,7 @@ const ZonosCollectSubtotal = class {
751
865
  }
752
866
  render() {
753
867
  this.initSubtotalData();
754
- return (h(Host, { key: '6df77785504d4076a3b675a9ef62171105fa22b5', class: "zonos--collect-subtotal zonos--elements" }, h("table", { key: '5a0917d3828ff18b5ad67d6e168e67b5646a6425', class: "zonos--collect-table" }, !!this.subtotals[translate('Duties')] && (h("tr", { key: 'b51069b800459d0aa64cebb98c0bae99d05bde8a', class: "zonos--row zonos--collect-duty" }, h("td", { key: 'b7bd45e0256a852ec363ffed7022d95079a8282c', class: "zonos--column zonos--collect-subtotal-title" }, h("zonos-text", { key: '47db47e87c83c4e5361e363d8c48cbef675a1eb7', type: "semiBoldLabel" }, translate('Duties'))), h("td", { key: 'd3b083c586c04fdca1a9410992cba6350050fd75', class: "zonos--column" }), h("td", { key: '6aedc27105ffe3a15744482025e3c711de22709a', class: "zonos--column zonos--collect-subtotal-price" }, renderFallback({
868
+ return (h(Host, { key: 'fea37a2a4dd32592b88703c37d901fee65408bed', class: "zonos--collect-subtotal zonos--elements" }, h("table", { key: 'be501438b0101c4b13421450dad99ec12f7c5a0b', class: "zonos--collect-table" }, !!this.subtotals[translate('Duties')] && (h("tr", { key: '2c61bf6e958a199d4b8ae3aff00b74a9889ab491', class: "zonos--row zonos--collect-duty" }, h("td", { key: 'd6fc30c58fcc42c282b7dfb03c83b0b7feb0dd82', class: "zonos--column zonos--collect-subtotal-title" }, h("zonos-text", { key: '5909abeeed4a5f90df5a79be09383842137a175c', type: "semiBoldLabel" }, translate('Duties'))), h("td", { key: '68d06c4e8732363e0e5e36d77f9d4b363c0adc3c', class: "zonos--column" }), h("td", { key: 'fd23e46a4ed44fadc31472e38a15f7579ebed160', class: "zonos--column zonos--collect-subtotal-price" }, renderFallback({
755
869
  content: (h("zonos-text", { type: "label" }, renderCheckoutCurrency({
756
870
  amount: this.subtotals[translate('Duties')] || 0,
757
871
  isForeign: true,
@@ -759,7 +873,7 @@ const ZonosCollectSubtotal = class {
759
873
  isLoading: collectStore.isFetchingShippingInfo,
760
874
  skeletonHeight: '14px',
761
875
  skeletonWidth: '150px',
762
- })))), !!this.subtotals[translate('Taxes')] && (h("tr", { key: 'ee934191b6d95c2bdebf40c5a8d6e9a8dcc4716b', class: "zonos--row zonos--collect-tax" }, h("td", { key: 'd9966df4b307915d69e99ddca307afb3b1dac57d', class: "zonos--column zonos--collect-subtotal-title" }, h("zonos-text", { key: '0b074f206a3746e9428a1f7f4df95a7035770535', type: "semiBoldLabel" }, translate('Taxes'))), h("td", { key: '4cd818d7d7db3bbb1b044f09420f3c0de9c2654f', class: "zonos--column" }), h("td", { key: '885a3b0d243f9687af99018c94e6f7990ab94ae4', class: "zonos--column zonos--collect-subtotal-price" }, renderFallback({
876
+ })))), !!this.subtotals[translate('Taxes')] && (h("tr", { key: '3960ae24df8093e1bb7e904bba82b774dc32103c', class: "zonos--row zonos--collect-tax" }, h("td", { key: 'cdfb4bd23f8b3f0545170a05a3b060533db22f26', class: "zonos--column zonos--collect-subtotal-title" }, h("zonos-text", { key: 'bbbdaade160358cc94a9347f835d2e8bc759866d', type: "semiBoldLabel" }, translate('Taxes'))), h("td", { key: '032c233f3301289c89791d78a5624d9409292041', class: "zonos--column" }), h("td", { key: 'b96dc16ecbff5add3adb0236c794c7a71c48800b', class: "zonos--column zonos--collect-subtotal-price" }, renderFallback({
763
877
  content: (h("zonos-text", { type: "label" }, renderCheckoutCurrency({
764
878
  amount: this.subtotals[translate('Taxes')] || 0,
765
879
  isForeign: true,
@@ -767,7 +881,7 @@ const ZonosCollectSubtotal = class {
767
881
  isLoading: collectStore.isFetchingShippingInfo,
768
882
  skeletonHeight: '14px',
769
883
  skeletonWidth: '150px',
770
- })))), !!this.subtotals[translate('Fees')] && (h("tr", { key: '840cdf461bd3cb0780c517be7900a4db7522da6d', class: "zonos--row zonos--collect-fee" }, h("td", { key: '57edb0642163a4fb580c538334f77fba2f15efe1', class: "zonos--column zonos--collect-subtotal-title" }, h("zonos-text", { key: 'daa9e1ab156a2a5b26aec744014c2501948872e8', type: "semiBoldLabel" }, translate('Fees'))), h("td", { key: '90cc11dda267840a4d4559aed5cfa5d61e13a986', class: "zonos--column" }), h("td", { key: '3716f79ab7323f5d6ebca7ece57bfd7b78f62b20', class: "zonos--column zonos--collect-subtotal-price" }, renderFallback({
884
+ })))), !!this.subtotals[translate('Fees')] && (h("tr", { key: '056890bb4d5394aea10f618c97c6d22d0ed63d3b', class: "zonos--row zonos--collect-fee" }, h("td", { key: '920bbbc49538bf61a4b3a180454a904996448b22', class: "zonos--column zonos--collect-subtotal-title" }, h("zonos-text", { key: '3609ef98b6fe12f11d16a9176321321fa450c482', type: "semiBoldLabel" }, translate('Fees'))), h("td", { key: 'c7393e334a5d229f879094aa10356740676a412a', class: "zonos--column" }), h("td", { key: '799e621fbeda831fd2181a362d9ace49a39b69e4', class: "zonos--column zonos--collect-subtotal-price" }, renderFallback({
771
885
  content: (h("zonos-text", { type: "label" }, renderCheckoutCurrency({
772
886
  amount: this.subtotals[translate('Fees')] || 0,
773
887
  isForeign: true,
@@ -775,7 +889,7 @@ const ZonosCollectSubtotal = class {
775
889
  isLoading: collectStore.isFetchingShippingInfo,
776
890
  skeletonHeight: '14px',
777
891
  skeletonWidth: '150px',
778
- })))), h("tr", { key: '2ac89b5b3f76c2991b88ce163ca571380d91ae8b', class: "zonos--row zonos--collect-spacing" }, h("td", { key: 'fc073ec87ac579ad5af8fb2dd08fe47112e21717', class: "zonos--column", colSpan: 3 })), h("tr", { key: '87c32f3ee0ffb3c347c495ec853ebf92b6a08a0f', class: "zonos--row zonos--collect-total zonos--collect-total-subtotal" }, h("td", { key: '664d161448aec51324f0d177d20fa0ef765a17bb', class: "zonos--column" }), h("td", { key: 'c14949595986be080c502ad175529883f2c789cc', class: "zonos--column zonos--collect-subtotal-title" }, h("zonos-text", { key: 'cf141dd8e58e73b981cdb5f51c111d83099222ae', type: "label" }, translate('Subtotal'))), h("td", { key: '3cba5203e563ec1f4c591d6c42cf7b9a7c8c2045', class: "zonos--column zonos--collect-subtotal-price" }, renderFallback({
892
+ })))), h("tr", { key: 'b9cc1a5aa049ccefb48dc5d1627bdb8093ffe29f', class: "zonos--row zonos--collect-spacing" }, h("td", { key: '439b7508f723ed01efd63e499de979a84e136b21', class: "zonos--column", colSpan: 3 })), h("tr", { key: '6c3db4c263f849b9f1ad25a1ce1cfb23dcf03b10', class: "zonos--row zonos--collect-total zonos--collect-total-subtotal" }, h("td", { key: '3fac71f137d3d5af8a40d7aaa0ad36c31a827a5b', class: "zonos--column" }), h("td", { key: '45084572c966e849b69dd4f10d065fd3f0aa5544', class: "zonos--column zonos--collect-subtotal-title" }, h("zonos-text", { key: '5c09a882998169f59baa30a59574d1ca919ab1c6', type: "label" }, translate('Subtotal'))), h("td", { key: 'd8debe70bbc2394f95581409a1db5cb8055383eb', class: "zonos--column zonos--collect-subtotal-price" }, renderFallback({
779
893
  content: (h("zonos-text", { type: "label" }, renderCheckoutCurrency({
780
894
  amount: collectStore.amountDutyTaxFeeTotal || 0,
781
895
  isForeign: true,
@@ -783,7 +897,7 @@ const ZonosCollectSubtotal = class {
783
897
  isLoading: collectStore.isFetchingShippingInfo,
784
898
  skeletonHeight: '14px',
785
899
  skeletonWidth: '150px',
786
- }))), h("tr", { key: '14065db117fef4acbb0f459a624fee28ea127205', class: "zonos--row zonos--collect-total" }, h("td", { key: '0bc154f6d48ddb0bdc829233a66f0e486ed9df4f', class: "zonos--column" }), h("td", { key: '1f2997cebc3250152b1ecd207066ffc44af7f124', class: "zonos--column zonos--collect-subtotal-title" }, h("zonos-text", { key: 'd50cc0977380fc1bf858fbe26201d919000a74b5', type: "semiBoldLabel" }, translate('Customs fees total'))), h("td", { key: '2fcd30a868708f5abea04230c1407fff62fb011d', class: "zonos--column zonos--collect-subtotal-price" }, renderFallback({
900
+ }))), h("tr", { key: 'db55f0a9600bff78e582609f17ac561fb30ec85f', class: "zonos--row zonos--collect-total" }, h("td", { key: '8b77eb9db155a44591bce58fd24ee46110b9a407', class: "zonos--column" }), h("td", { key: '5c1b6df053e202f60d1d3fa4ff5d8c53fb1762ce', class: "zonos--column zonos--collect-subtotal-title" }, h("zonos-text", { key: '393f436b62e9b49d52598896b2913f08e953987b', type: "semiBoldLabel" }, translate('Customs fees total'))), h("td", { key: 'c2bc51d66b8490652c6f6df8fac0194544785706', class: "zonos--column zonos--collect-subtotal-price" }, renderFallback({
787
901
  content: (h("zonos-text", { type: "semiBoldLabel" }, renderCheckoutCurrency({
788
902
  amount: collectStore.amountDutyTaxFeeTotal || 0,
789
903
  isForeign: true,
@@ -1,11 +1,12 @@
1
1
  import { r as registerInstance, h, a as Host, F as Fragment } from './index-cfd394c8.js';
2
- import { b as stripeStore, i as initStripeElements, c as stripeStoreRetrievePayment, d as cartStore, n as cartStoreUpdateToErrorState, e as cartStoreUpdateItems, j as stripeStoreInitCheckoutSession, k as stripeStoreGetPaymentIntent, w as stripeStoreUpdateCheckoutSessionBaseCurrency, C as stripeStoreConfirmPayment, H as stripeStoreOnChange, F as stripeStoreReset, f as cartStoreReset } from './cart-44fa77ef.js';
3
- import { i as isCollectMobile, a as isCollectTablet, c as collectStoreUpdateSelectedShippingOption, b as collectStoreInitShippingInfo, d as collectStoreAsyncAddressUpdate, e as collectStore } from './isCollectMobileTablet-323d2ba1.js';
4
- import { p as paypalStoreHasPaypalEnabled, a as paypalStore } from './paypal-8725008c.js';
5
- import { s as storageStore, t as translate, e as localizationStoreOnChange, h as currencyFormat, l as localizationStore } from './localization-066586b6.js';
2
+ import { c as collectStore, a as airwallexStoreSetFromSession, b as airwallexStore, d as airwallexStoreRetrievePaymentIntent, e as airwallexStoreIsPaidStatus, f as airwallexStoreInitSdk, g as collectStoreUpdateSelectedShippingOption, h as collectStoreInitShippingInfo, i as collectStoreAsyncAddressUpdate } from './collect-a235299d.js';
3
+ import { b as stripeStore, i as initStripeElements, d as cartStore, c as stripeStoreRetrievePayment, n as cartStoreUpdateToErrorState, e as cartStoreUpdateItems, j as stripeStoreInitCheckoutSession, k as stripeStoreGetPaymentIntent, w as stripeStoreUpdateCheckoutSessionBaseCurrency, C as stripeStoreConfirmPayment, H as stripeStoreOnChange, F as stripeStoreReset, f as cartStoreReset } from './cart-23e29950.js';
4
+ import { p as paypalStoreHasPaypalEnabled, a as paypalStore } from './paypal-5bc6b0d0.js';
5
+ import { s as storageStore, t as translate, e as localizationStoreOnChange, h as currencyFormat, l as localizationStore } from './localization-17546792.js';
6
6
  import { z as zonosStore } from './zonosStore-8e19daff.js';
7
7
  import { b as buildCartItemsByTempCart } from './buildCartItemsByTempCart-a117f75d.js';
8
8
  import { h as handleFetch, s as sendErrorLog, l as logError, g as getIsTestMode } from './handleFetch-a844cac1.js';
9
+ import { i as isCollectMobile, a as isCollectTablet } from './isCollectMobileTablet-111b0dd7.js';
9
10
  import { c as classes } from './classes-0d95c529.js';
10
11
  import { l as log } from './VarianceTest-572cecf5.js';
11
12
  import { r as renderFallback } from './renderFallback-b250f4e9.js';
@@ -116,6 +117,56 @@ const ZonosCollect = class {
116
117
  });
117
118
  return json;
118
119
  };
120
+ /**
121
+ * Determine which payment processor the collect session uses and initialize it.
122
+ *
123
+ * The checkout session returns the `paymentProcessor` (05CHECK-860). When it is
124
+ * `AIRWALLEX` we initialize the Airwallex SDK and render only the Airwallex
125
+ * payment element. Otherwise we fall back to the Stripe flow, which renders the
126
+ * Stripe billing info section + payment.
127
+ *
128
+ * If the Airwallex session already has a client secret but is not yet completed
129
+ * and has no order attached, we verify the live payment intent status first — if
130
+ * the payment already went through (e.g. the customer returned after a redirect)
131
+ * we jump straight to the finish step instead of rendering the payment form.
132
+ */
133
+ this.initPaymentProcessor = async () => {
134
+ var _a;
135
+ const checkoutSessionId = storageStore.checkoutSessionId;
136
+ if (checkoutSessionId) {
137
+ const json = await this.fetchCheckoutSession(checkoutSessionId);
138
+ collectStore.paymentProcessor =
139
+ (json === null || json === void 0 ? void 0 : json.checkoutSession.paymentProcessor) || null;
140
+ if (collectStore.paymentProcessor === 'AIRWALLEX') {
141
+ // An Airwallex session must have a usable client secret (from the session
142
+ // or seeded from the payment-intent create response). If it doesn't, we
143
+ // can't mount the payment element — surface an error instead of rendering
144
+ // a blank/broken Airwallex UI.
145
+ if (!json || !airwallexStoreSetFromSession(json.checkoutSession)) {
146
+ throw new Error('Airwallex checkout session is missing a client secret');
147
+ }
148
+ const { checkoutSession } = json;
149
+ airwallexStore.currency = cartStore.currency;
150
+ this.confirmationId = ((_a = checkoutSession.landedCost) === null || _a === void 0 ? void 0 : _a.shortId) || null;
151
+ let alreadyPaid = !!checkoutSession.completedAt || !!checkoutSession.order;
152
+ if (!alreadyPaid &&
153
+ checkoutSession.clientSecret &&
154
+ checkoutSession.paymentIntentId) {
155
+ const { status } = await airwallexStoreRetrievePaymentIntent(checkoutSession.paymentIntentId);
156
+ alreadyPaid = airwallexStoreIsPaidStatus(status);
157
+ }
158
+ if (alreadyPaid) {
159
+ void this.setToFinishStep();
160
+ return;
161
+ }
162
+ void airwallexStoreInitSdk();
163
+ // Airwallex renders its own payment UI, so the Stripe elements
164
+ // (billing info section) are not needed.
165
+ return;
166
+ }
167
+ }
168
+ void this.applyStripeTheme();
169
+ };
119
170
  /**
120
171
  * Check if stripe payment intent is succeeded or in a good state to move forward
121
172
  */
@@ -159,6 +210,67 @@ const ZonosCollect = class {
159
210
  log('Payment intent is not succeeded, proceed to order');
160
211
  return { shouldAllowOrder: true };
161
212
  };
213
+ /**
214
+ * Recover the collect flow when updating the checkout session failed — which
215
+ * happens once the session is already completed/paid (e.g. the customer already
216
+ * submitted payment, so the update request is rejected). Without this we would
217
+ * drop straight to the error screen even though the payment went through.
218
+ *
219
+ * Fetches the session and, if it is completed or already has an order attached,
220
+ * jumps to the finish step. Otherwise it verifies the live payment intent status
221
+ * for the session's processor (Stripe or Airwallex) and routes to finish when
222
+ * the payment has gone through.
223
+ *
224
+ * @returns `true` when it routed to the finish step, `false` when the caller
225
+ * should treat the session as invalid.
226
+ */
227
+ this.recoverCompletedCollectSession = async (checkoutSessionId) => {
228
+ var _a;
229
+ const json = await this.fetchCheckoutSession(checkoutSessionId);
230
+ if (!json) {
231
+ return false;
232
+ }
233
+ const { checkoutSession } = json;
234
+ // Some merchants use landed cost id as the confirmation id
235
+ this.confirmationId = ((_a = checkoutSession.landedCost) === null || _a === void 0 ? void 0 : _a.shortId) || null;
236
+ collectStore.paymentProcessor = checkoutSession.paymentProcessor || null;
237
+ const isAirwallex = checkoutSession.paymentProcessor === 'AIRWALLEX';
238
+ if (isAirwallex && checkoutSession.clientSecret) {
239
+ // Populate the store so the finish step has the payment intent data.
240
+ airwallexStoreSetFromSession(checkoutSession);
241
+ airwallexStore.currency = cartStore.currency;
242
+ }
243
+ // Session already finalized → straight to finish. This must run before the
244
+ // Airwallex client-secret check below, because a paid/completed session may
245
+ // no longer expose a client secret and should still reach the finish step.
246
+ if (checkoutSession.completedAt || checkoutSession.order) {
247
+ void this.setToFinishStep('succeeded');
248
+ return true;
249
+ }
250
+ // Not completed and no order yet — verify the live payment intent status for
251
+ // the session's processor.
252
+ if (isAirwallex) {
253
+ if (checkoutSession.clientSecret && checkoutSession.paymentIntentId) {
254
+ const { status } = await airwallexStoreRetrievePaymentIntent(checkoutSession.paymentIntentId);
255
+ if (airwallexStoreIsPaidStatus(status)) {
256
+ void this.setToFinishStep();
257
+ return true;
258
+ }
259
+ }
260
+ }
261
+ else if (checkoutSession.clientSecret) {
262
+ const { status } = await stripeStoreRetrievePayment({
263
+ clientSecret: checkoutSession.clientSecret,
264
+ });
265
+ // If payment intent is still processing or succeeded, set to finish step
266
+ if (status === 'processing' || status === 'succeeded') {
267
+ stripeStore.clientSecret = checkoutSession.clientSecret;
268
+ void this.setToFinishStep(status);
269
+ return true;
270
+ }
271
+ }
272
+ return false;
273
+ };
162
274
  }
163
275
  /**
164
276
  * Listen to resize event to update the isMobile state
@@ -230,29 +342,16 @@ const ZonosCollect = class {
230
342
  throw new Error('Failed to initialize checkout session! The cart might be created with LIVE Collect quote but being used with sandbox credential');
231
343
  }
232
344
  }
233
- // If there is checkout session in collect cart references and we failed to retrieve it from `update-checkout-session`, it most likely means the cart is already completed / invalid landed cost
345
+ // If there is checkout session in collect cart references and we failed to retrieve it from `update-checkout-session`, it most likely means the cart is already completed / paid (the update request is rejected) or has an invalid landed cost.
234
346
  if ((!cartStore.checkoutSession ||
235
347
  ((_g = cartStore.checkoutSession) === null || _g === void 0 ? void 0 : _g.completedAt)) &&
236
348
  cartCheckoutSessionId) {
237
- // Attempt to retrieve the checkout session
238
- const json = await this.fetchCheckoutSession(cartCheckoutSessionId);
239
- // Some merchants use landed cost id as the confirmation id
240
- this.confirmationId = ((_h = json === null || json === void 0 ? void 0 : json.checkoutSession.landedCost) === null || _h === void 0 ? void 0 : _h.shortId) || null;
241
- // If checkout session is already completed, set to finish step
242
- if (!!(json === null || json === void 0 ? void 0 : json.checkoutSession.completedAt)) {
243
- void this.setToFinishStep('succeeded');
349
+ // Attempt to recover by checking the completed session / payment intent
350
+ // status for the session's processor before treating it as invalid.
351
+ const handled = await this.recoverCompletedCollectSession(cartCheckoutSessionId);
352
+ if (handled) {
244
353
  return;
245
354
  }
246
- if (json === null || json === void 0 ? void 0 : json.checkoutSession.clientSecret) {
247
- const { status } = await stripeStoreRetrievePayment({
248
- clientSecret: json.checkoutSession.clientSecret,
249
- });
250
- // If payment intent is still processing or succeeded, set to finish step
251
- if (status === 'processing' || status === 'succeeded') {
252
- void this.setToFinishStep(status);
253
- return;
254
- }
255
- }
256
355
  void sendErrorLog({
257
356
  endpoint: 'INVALID_COLLECT_CHECKOUT_SESSION',
258
357
  errors: [
@@ -260,7 +359,7 @@ const ZonosCollect = class {
260
359
  ],
261
360
  metadata: {
262
361
  cartCheckoutSessionId,
263
- cartId: (_j = window.Zonos.cartData) === null || _j === void 0 ? void 0 : _j.id,
362
+ cartId: (_h = window.Zonos.cartData) === null || _h === void 0 ? void 0 : _h.id,
264
363
  cartLandedCostId,
265
364
  },
266
365
  });
@@ -274,14 +373,31 @@ const ZonosCollect = class {
274
373
  ],
275
374
  metadata: {
276
375
  cartCheckoutSessionId: cartCheckoutSessionId || 'N/A',
277
- cartId: (_k = window.Zonos.cartData) === null || _k === void 0 ? void 0 : _k.id,
376
+ cartId: (_j = window.Zonos.cartData) === null || _j === void 0 ? void 0 : _j.id,
278
377
  cartLandedCostId: cartLandedCostId || 'N/A',
279
378
  },
280
379
  });
281
380
  throw new Error('Could not update/create checkout session for this collect cart');
282
381
  }
283
- // const checkoutSessionId = storageStore.checkoutSessionId;
284
- void stripeStoreGetPaymentIntent();
382
+ collectStore.paymentProcessor =
383
+ cartStore.checkoutSession.paymentProcessor;
384
+ if (collectStore.paymentProcessor === 'AIRWALLEX') {
385
+ // Airwallex needs the payment intent (client secret) created before we
386
+ // fetch the session and render its element.
387
+ await stripeStoreGetPaymentIntent();
388
+ // Seed the Airwallex store from the payment-intent create response (the
389
+ // reliable source of the client secret) so the drop-in can mount even if
390
+ // the follow-up get-checkout-session fetch is missing it.
391
+ if ((_k = cartStore.checkoutSession) === null || _k === void 0 ? void 0 : _k.clientSecret) {
392
+ airwallexStore.clientSecret = cartStore.checkoutSession.clientSecret;
393
+ airwallexStore.currency = cartStore.currency;
394
+ }
395
+ }
396
+ else {
397
+ // Stripe, PayPal, and legacy sessions without a processor still need a
398
+ // payment intent so the payment UI loads with a client secret.
399
+ void stripeStoreGetPaymentIntent();
400
+ }
285
401
  const landedCost = (_l = cartStore.checkoutSession) === null || _l === void 0 ? void 0 : _l.landedCost;
286
402
  if (!landedCost) {
287
403
  throw new Error('Landed cost could not be found in checkout session after creating/updating them');
@@ -290,7 +406,7 @@ const ZonosCollect = class {
290
406
  void collectStoreInitShippingInfo({
291
407
  landedCostId: landedCost.id,
292
408
  });
293
- void this.applyStripeTheme();
409
+ await this.initPaymentProcessor();
294
410
  }
295
411
  catch (err) {
296
412
  logError(err);
@@ -410,10 +526,24 @@ const ZonosCollect = class {
410
526
  }
411
527
  const baseCurrencySettlementInfo = this.getBaseCurrencySettlementInfo();
412
528
  const { logoUrl, theme } = zonosStore.appearance;
529
+ // The company name comes from the origin party.
530
+ const collectCompanyName = collectStore.originCompanyName;
413
531
  const renderLogo = () => {
414
- // add timestamp to logo url so browser won't cache it on the dashboard setting
415
- const logo = `${logoUrl}?timestamp=${Date.now()}`;
416
- return (h("div", { class: "zonos--logo" }, logo && (h("img", { alt: `${zonosStore.organizationName} logo`, src: logo }))));
532
+ var _a;
533
+ // The carrier's Collect logo (from landed cost metadata) takes priority.
534
+ // When it isn't provided, only fall back to the organization's appearance
535
+ // logo if the `shouldFallbackToOrganizationLogoForCollect` generic setting
536
+ // is enabled; otherwise no logo is shown.
537
+ const logo = collectStore.collectLogoUrl
538
+ ? collectStore.collectLogoUrl
539
+ : ((_a = zonosStore.genericSettings) === null || _a === void 0 ? void 0 : _a.shouldFallbackToOrganizationLogoForCollect) && logoUrl
540
+ ? // Timestamped so the browser won't cache a stale dashboard logo.
541
+ `${logoUrl}?timestamp=${Date.now()}`
542
+ : '';
543
+ if (!logo) {
544
+ return null;
545
+ }
546
+ return (h("div", { class: "zonos--logo" }, h("img", { alt: `${collectCompanyName || zonosStore.organizationName} logo`, src: logo })));
417
547
  };
418
548
  const isTestMode = getIsTestMode();
419
549
  const renderTopHeader = () => {
@@ -427,9 +557,9 @@ const ZonosCollect = class {
427
557
  this.showLanguageDialogMobile &&
428
558
  'zonos--collect-language-dialog-open',
429
559
  ]) }, h("zonos-language-select", { handleOnClose: () => this.toggleLanguageDialog() })))), renderFallback({
430
- content: (h("zonos-text", { class: "zonos--header-title", type: "header" }, collectStore.originCompanyName
560
+ content: (h("zonos-text", { class: "zonos--header-title", type: "header" }, collectCompanyName
431
561
  ? translate('Customs charges for your recent purchase from [companyName] are available for payment', {
432
- companyName: collectStore.originCompanyName,
562
+ companyName: collectCompanyName,
433
563
  })
434
564
  : translate('Customs charges from your recent purchase are available for payment'))),
435
565
  isLoading: collectStore.isFetchingShippingInfo,
@@ -437,11 +567,19 @@ const ZonosCollect = class {
437
567
  skeletonWidth: '600px',
438
568
  })));
439
569
  };
570
+ // const isAirwallex = collectStore.paymentProcessor === 'AIRWALLEX';
440
571
  const renderContent = () => {
441
572
  if (this.isOverlayLoading || stripeStore.isFetchingSession) {
442
573
  return null;
443
574
  }
444
- return (h("div", { class: 'zonos--content' }, cartStore.step !== 'finish' && cartStore.step !== 'error' && (h(Fragment, null, (this.isMobile || this.isTablet) && renderTopHeader(), h("div", { class: "zonos--left", "data-theme": theme }, !this.isMobile && !this.isTablet && renderTopHeader(), h("zonos-text", { class: "zonos--title", type: "semiBoldSubheader" }, translate('Billing info')), h("zonos-v-stack", { spacing: 16 }, h("zonos-link-authentication", { titleText: "" }), h("zonos-address", { titleText: "", type: "billing" })), h("zonos-collect-payment", { class: classes(['zonos--collect-container']), continueLoading: this.submitLoading, onContinueClicked: async () => {
575
+ return (h("div", { class: 'zonos--content' }, cartStore.step !== 'finish' && cartStore.step !== 'error' && (h(Fragment, null, (this.isMobile || this.isTablet) && renderTopHeader(), h("div", { class: "zonos--left", "data-theme": theme }, !this.isMobile && !this.isTablet && renderTopHeader(), collectStore.paymentProcessor !== 'AIRWALLEX' && (h(Fragment, null, h("zonos-text", { class: "zonos--title", type: "semiBoldSubheader" }, translate('Billing info')), h("zonos-v-stack", { spacing: 16 }, h("zonos-link-authentication", { titleText: "" }), h("zonos-address", { titleText: "", type: "billing" })))), h("zonos-collect-payment", { class: classes(['zonos--collect-container']), continueLoading: this.submitLoading, onAirwallexPaymentDone: () => {
576
+ var _a;
577
+ cartStore.step = 'finish';
578
+ this.confirmationId =
579
+ collectStore.landedCostShortId ||
580
+ ((_a = cartStore.selectedLandedCost) === null || _a === void 0 ? void 0 : _a.landedCostId) ||
581
+ null;
582
+ }, onContinueClicked: async () => {
445
583
  await this.handleStripePaymentContinue();
446
584
  } })), h("div", { class: "zonos--right", "data-theme": theme }, h("zonos-collect-review", { mobile: this.isMobile, tablet: this.isTablet }), h("div", { class: "zonos--order-details-container" }, h("zonos-collect-order-details", { collapsed: this.collapseReview, mobile: this.isMobile, onCollapseClicked: () => {
447
585
  this.collapseReview = !this.collapseReview;
@@ -27,7 +27,7 @@ const ZonosComponent = class {
27
27
  return format(this.first, this.middle, this.last);
28
28
  }
29
29
  render() {
30
- return h("div", { key: 'f8ec6c765a31d6d9599003523128ef4f5c8d3078' }, "Hello, World! I'm ", this.getText());
30
+ return h("div", { key: '27751801e26bb6bc488e28911f5c685332b879c7' }, "Hello, World! I'm ", this.getText());
31
31
  }
32
32
  };
33
33
  ZonosComponent.style = ZonosComponentStyle0;