@zonos/elements 1.3.279 → 1.3.281

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 (243) hide show
  1. package/dist/cjs/{TaxId-12acedde.js → TaxId-cd9d490e.js} +1 -1
  2. package/dist/cjs/{cart-e8bc11a3.js → cart-3313cb0c.js} +2 -2
  3. package/dist/cjs/{collect-e6485168.js → collect-2659c5af.js} +2 -2
  4. package/dist/cjs/formatStringWithLinks-c25b4018.js +24 -0
  5. package/dist/cjs/{hasInclusivePrice-798ce42d.js → hasInclusivePrice-d132daaa.js} +1 -1
  6. package/dist/cjs/index.cjs.js +8 -8
  7. package/dist/cjs/{invoice-dff7ec81.js → invoice-26f52c07.js} +2 -2
  8. package/dist/cjs/isSameHostCheckoutLink-6148cabb.js +28 -0
  9. package/dist/cjs/{localization-90650d7d.js → localization-6189080f.js} +120 -120
  10. package/dist/cjs/{paypal-77bd640c.js → paypal-f6a256b5.js} +2 -2
  11. package/dist/cjs/{placeTestOrder-7767d119.js → placeTestOrder-695f2b32.js} +2 -2
  12. package/dist/cjs/{renderCheckoutCurrency-66377cf5.js → renderCheckoutCurrency-fe56094f.js} +2 -2
  13. package/dist/cjs/{shouldRenderTaxIdInput-b8abf6de.js → shouldRenderTaxIdInput-7d19556c.js} +1 -1
  14. package/dist/cjs/zonos-address-display_8.cjs.entry.js +4 -4
  15. package/dist/cjs/zonos-address_4.cjs.entry.js +4 -4
  16. package/dist/cjs/zonos-airwallex-payment.cjs.entry.js +4 -4
  17. package/dist/cjs/zonos-card_5.cjs.entry.js +4 -4
  18. package/dist/cjs/zonos-cart-items_12.cjs.entry.js +27 -12
  19. package/dist/cjs/zonos-checkout.cjs.entry.js +190 -14
  20. package/dist/cjs/zonos-collect-cart-items_3.cjs.entry.js +3 -3
  21. package/dist/cjs/zonos-collect-finish_6.cjs.entry.js +7 -7
  22. package/dist/cjs/zonos-collect.cjs.entry.js +5 -5
  23. package/dist/cjs/zonos-controller.cjs.entry.js +3 -3
  24. package/dist/cjs/zonos-country-flag.cjs.entry.js +1 -1
  25. package/dist/cjs/zonos-country-select_4.cjs.entry.js +3 -2
  26. package/dist/cjs/zonos-hello-dialog.cjs.entry.js +5 -4
  27. package/dist/cjs/zonos-hello.cjs.entry.js +1 -1
  28. package/dist/cjs/zonos-invoice-cart-items_2.cjs.entry.js +5 -5
  29. package/dist/cjs/zonos-invoice-finish_5.cjs.entry.js +7 -7
  30. package/dist/cjs/zonos-invoice.cjs.entry.js +5 -5
  31. package/dist/cjs/zonos-language-select_2.cjs.entry.js +1 -1
  32. package/dist/cjs/zonos-policy-consent_2.cjs.entry.js +4 -4
  33. package/dist/collection/components/checkout/zonos-checkout/zonos-cart-subtotal/zonos-cart-subtotal.js +13 -1
  34. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.js +36 -2
  35. package/dist/collection/components/store/translationStore/strings.arabic.js +6 -6
  36. package/dist/collection/components/store/translationStore/strings.base.js +6 -6
  37. package/dist/collection/components/store/translationStore/strings.chinese.js +6 -6
  38. package/dist/collection/components/store/translationStore/strings.danish.js +6 -6
  39. package/dist/collection/components/store/translationStore/strings.dutch.js +6 -6
  40. package/dist/collection/components/store/translationStore/strings.french.js +6 -6
  41. package/dist/collection/components/store/translationStore/strings.german.js +6 -6
  42. package/dist/collection/components/store/translationStore/strings.hebrew.js +6 -6
  43. package/dist/collection/components/store/translationStore/strings.indonesian.js +6 -6
  44. package/dist/collection/components/store/translationStore/strings.italian.js +6 -6
  45. package/dist/collection/components/store/translationStore/strings.japanese.js +6 -6
  46. package/dist/collection/components/store/translationStore/strings.korean.js +6 -6
  47. package/dist/collection/components/store/translationStore/strings.norwegian.js +6 -6
  48. package/dist/collection/components/store/translationStore/strings.polish.js +6 -6
  49. package/dist/collection/components/store/translationStore/strings.portuguese.js +6 -6
  50. package/dist/collection/components/store/translationStore/strings.russian.js +6 -6
  51. package/dist/collection/components/store/translationStore/strings.spanish.js +6 -6
  52. package/dist/collection/components/store/translationStore/strings.swedish.js +6 -6
  53. package/dist/collection/components/store/translationStore/strings.turkish.js +6 -6
  54. package/dist/collection/components/store/translationStore/strings.vietnamese.js +6 -6
  55. package/dist/collection/components/utils/checkout/buildBigcommerceRedirectUrl.js +6 -1
  56. package/dist/collection/components/utils/checkout/watchImmediateBigcommerceDomesticCheckoutRedirect.js +144 -7
  57. package/dist/collection/components/utils/formatStringWithLinks.js +12 -6
  58. package/dist/collection/components/utils/isSameHostCheckoutLink.js +24 -0
  59. package/dist/collection/components/utils/taxIdValidationResult.js +6 -3
  60. package/dist/collection/types/checkout/TaxId.js +1 -1
  61. package/dist/collection/types/generated/graphql.internal.types.js +84 -0
  62. package/dist/esm/{TaxId-50d72254.js → TaxId-63a14057.js} +1 -1
  63. package/dist/esm/{cart-8b8dc79f.js → cart-c66ec17e.js} +3 -3
  64. package/dist/esm/{collect-f4965586.js → collect-915fd59d.js} +2 -2
  65. package/dist/esm/formatStringWithLinks-0d48f183.js +22 -0
  66. package/dist/esm/{hasInclusivePrice-1589fef9.js → hasInclusivePrice-6fd935f3.js} +1 -1
  67. package/dist/esm/index.js +8 -8
  68. package/dist/esm/{invoice-b7a1fb14.js → invoice-2a17c93c.js} +2 -2
  69. package/dist/esm/isSameHostCheckoutLink-c1b88ab7.js +26 -0
  70. package/dist/esm/{localization-d49867ed.js → localization-6d36209f.js} +120 -120
  71. package/dist/esm/{paypal-da551105.js → paypal-cae1d404.js} +2 -2
  72. package/dist/esm/{placeTestOrder-4309b170.js → placeTestOrder-955269d2.js} +2 -2
  73. package/dist/esm/{renderCheckoutCurrency-0ed221ac.js → renderCheckoutCurrency-951386a5.js} +2 -2
  74. package/dist/esm/{shouldRenderTaxIdInput-2572bf77.js → shouldRenderTaxIdInput-ef7b5860.js} +1 -1
  75. package/dist/esm/zonos-address-display_8.entry.js +4 -4
  76. package/dist/esm/zonos-address_4.entry.js +4 -4
  77. package/dist/esm/zonos-airwallex-payment.entry.js +4 -4
  78. package/dist/esm/zonos-card_5.entry.js +4 -4
  79. package/dist/esm/zonos-cart-items_12.entry.js +27 -12
  80. package/dist/esm/zonos-checkout.entry.js +190 -14
  81. package/dist/esm/zonos-collect-cart-items_3.entry.js +3 -3
  82. package/dist/esm/zonos-collect-finish_6.entry.js +7 -7
  83. package/dist/esm/zonos-collect.entry.js +5 -5
  84. package/dist/esm/zonos-controller.entry.js +3 -3
  85. package/dist/esm/zonos-country-flag.entry.js +1 -1
  86. package/dist/esm/zonos-country-select_4.entry.js +3 -2
  87. package/dist/esm/zonos-hello-dialog.entry.js +5 -4
  88. package/dist/esm/zonos-hello.entry.js +1 -1
  89. package/dist/esm/zonos-invoice-cart-items_2.entry.js +5 -5
  90. package/dist/esm/zonos-invoice-finish_5.entry.js +7 -7
  91. package/dist/esm/zonos-invoice.entry.js +5 -5
  92. package/dist/esm/zonos-language-select_2.entry.js +1 -1
  93. package/dist/esm/zonos-policy-consent_2.entry.js +4 -4
  94. package/dist/esm-es5/{TaxId-50d72254.js → TaxId-63a14057.js} +1 -1
  95. package/dist/esm-es5/{cart-8b8dc79f.js → cart-c66ec17e.js} +1 -1
  96. package/dist/esm-es5/{collect-f4965586.js → collect-915fd59d.js} +1 -1
  97. package/dist/esm-es5/formatStringWithLinks-0d48f183.js +1 -0
  98. package/dist/esm-es5/{hasInclusivePrice-1589fef9.js → hasInclusivePrice-6fd935f3.js} +1 -1
  99. package/dist/esm-es5/index.js +1 -1
  100. package/dist/esm-es5/{invoice-b7a1fb14.js → invoice-2a17c93c.js} +1 -1
  101. package/dist/esm-es5/isSameHostCheckoutLink-c1b88ab7.js +1 -0
  102. package/dist/esm-es5/localization-6d36209f.js +1 -0
  103. package/dist/esm-es5/{paypal-da551105.js → paypal-cae1d404.js} +1 -1
  104. package/dist/esm-es5/{placeTestOrder-4309b170.js → placeTestOrder-955269d2.js} +1 -1
  105. package/dist/esm-es5/{renderCheckoutCurrency-0ed221ac.js → renderCheckoutCurrency-951386a5.js} +1 -1
  106. package/dist/esm-es5/{shouldRenderTaxIdInput-2572bf77.js → shouldRenderTaxIdInput-ef7b5860.js} +1 -1
  107. package/dist/esm-es5/zonos-address-display_8.entry.js +1 -1
  108. package/dist/esm-es5/zonos-address_4.entry.js +1 -1
  109. package/dist/esm-es5/zonos-airwallex-payment.entry.js +1 -1
  110. package/dist/esm-es5/zonos-card_5.entry.js +1 -1
  111. package/dist/esm-es5/zonos-cart-items_12.entry.js +1 -1
  112. package/dist/esm-es5/zonos-checkout.entry.js +1 -1
  113. package/dist/esm-es5/zonos-collect-cart-items_3.entry.js +1 -1
  114. package/dist/esm-es5/zonos-collect-finish_6.entry.js +1 -1
  115. package/dist/esm-es5/zonos-collect.entry.js +1 -1
  116. package/dist/esm-es5/zonos-controller.entry.js +1 -1
  117. package/dist/esm-es5/zonos-country-flag.entry.js +1 -1
  118. package/dist/esm-es5/zonos-country-select_4.entry.js +1 -1
  119. package/dist/esm-es5/zonos-hello-dialog.entry.js +1 -1
  120. package/dist/esm-es5/zonos-hello.entry.js +1 -1
  121. package/dist/esm-es5/zonos-invoice-cart-items_2.entry.js +1 -1
  122. package/dist/esm-es5/zonos-invoice-finish_5.entry.js +1 -1
  123. package/dist/esm-es5/zonos-invoice.entry.js +1 -1
  124. package/dist/esm-es5/zonos-language-select_2.entry.js +1 -1
  125. package/dist/esm-es5/zonos-policy-consent_2.entry.js +1 -1
  126. package/dist/scripts/index.d.ts +3 -3
  127. package/dist/scripts/index.js +1 -1
  128. package/dist/scripts/loadZonos.js +1 -1
  129. package/dist/scripts/zonos.js +1 -1
  130. package/dist/types/components/store/translationStore/strings.arabic.d.ts +3 -3
  131. package/dist/types/components/store/translationStore/strings.base.d.ts +3 -3
  132. package/dist/types/components/store/translationStore/strings.chinese.d.ts +3 -3
  133. package/dist/types/components/store/translationStore/strings.danish.d.ts +3 -3
  134. package/dist/types/components/store/translationStore/strings.dutch.d.ts +3 -3
  135. package/dist/types/components/store/translationStore/strings.french.d.ts +3 -3
  136. package/dist/types/components/store/translationStore/strings.german.d.ts +3 -3
  137. package/dist/types/components/store/translationStore/strings.hebrew.d.ts +3 -3
  138. package/dist/types/components/store/translationStore/strings.indonesian.d.ts +3 -3
  139. package/dist/types/components/store/translationStore/strings.italian.d.ts +3 -3
  140. package/dist/types/components/store/translationStore/strings.japanese.d.ts +3 -3
  141. package/dist/types/components/store/translationStore/strings.korean.d.ts +3 -3
  142. package/dist/types/components/store/translationStore/strings.norwegian.d.ts +3 -3
  143. package/dist/types/components/store/translationStore/strings.polish.d.ts +3 -3
  144. package/dist/types/components/store/translationStore/strings.portuguese.d.ts +3 -3
  145. package/dist/types/components/store/translationStore/strings.russian.d.ts +3 -3
  146. package/dist/types/components/store/translationStore/strings.spanish.d.ts +3 -3
  147. package/dist/types/components/store/translationStore/strings.swedish.d.ts +3 -3
  148. package/dist/types/components/store/translationStore/strings.turkish.d.ts +3 -3
  149. package/dist/types/components/store/translationStore/strings.vietnamese.d.ts +3 -3
  150. package/dist/types/components/utils/isSameHostCheckoutLink.d.ts +14 -0
  151. package/dist/types/components/utils/taxIdValidationResult.d.ts +1 -1
  152. package/dist/types/types/checkout/TaxId.d.ts +1 -1
  153. package/dist/types/types/generated/graphql.internal.types.d.ts +84 -0
  154. package/dist/types/types/generated/graphql.internal.types.ts +85 -0
  155. package/dist/zonos-elements/index.esm.js +1 -1
  156. package/dist/zonos-elements/{p-d5945ddc.entry.js → p-03fda4a8.entry.js} +1 -1
  157. package/dist/zonos-elements/{p-43815edd.system.entry.js → p-060c521b.system.entry.js} +1 -1
  158. package/dist/zonos-elements/{p-8bd37d3b.entry.js → p-09da3c76.entry.js} +1 -1
  159. package/dist/zonos-elements/{p-5e09c22d.system.js → p-0ac1aa87.system.js} +1 -1
  160. package/dist/zonos-elements/p-0d2f81ce.system.js +1 -0
  161. package/dist/zonos-elements/p-11206fe2.js +1 -0
  162. package/dist/zonos-elements/{p-5c76ef2a.js → p-156891c5.js} +1 -1
  163. package/dist/zonos-elements/p-1577a739.js +1 -0
  164. package/dist/zonos-elements/{p-4e6e9a3c.system.entry.js → p-179caaea.system.entry.js} +1 -1
  165. package/dist/zonos-elements/{p-5827c868.entry.js → p-1ee5f392.entry.js} +1 -1
  166. package/dist/zonos-elements/p-26ca8ce7.js +1 -0
  167. package/dist/zonos-elements/p-29b60bf3.system.js +1 -1
  168. package/dist/zonos-elements/p-2b97f7ed.js +1 -0
  169. package/dist/zonos-elements/{p-b36205f4.entry.js → p-30067eed.entry.js} +1 -1
  170. package/dist/zonos-elements/{p-a8c79850.js → p-3246d120.js} +1 -1
  171. package/dist/zonos-elements/{p-2aecc055.entry.js → p-38879af9.entry.js} +1 -1
  172. package/dist/zonos-elements/{p-647438d6.system.js → p-39695a8b.system.js} +1 -1
  173. package/dist/zonos-elements/p-3e6bbf0b.system.entry.js +1 -0
  174. package/dist/zonos-elements/{p-12a08423.system.entry.js → p-3f6fe80a.system.entry.js} +1 -1
  175. package/dist/zonos-elements/{p-998f9df5.system.entry.js → p-40b96482.system.entry.js} +1 -1
  176. package/dist/zonos-elements/{p-8d87e748.entry.js → p-4441c451.entry.js} +1 -1
  177. package/dist/zonos-elements/{p-7614ea6f.system.entry.js → p-4c3f5fda.system.entry.js} +1 -1
  178. package/dist/zonos-elements/{p-5bc43687.system.entry.js → p-54a8d4cf.system.entry.js} +1 -1
  179. package/dist/zonos-elements/p-5677d31f.entry.js +1 -0
  180. package/dist/zonos-elements/p-56fc3210.js +1 -0
  181. package/dist/zonos-elements/{p-ed676ad1.system.entry.js → p-5a61c301.system.entry.js} +1 -1
  182. package/dist/zonos-elements/{p-73d3fa61.entry.js → p-5e1aad7d.entry.js} +1 -1
  183. package/dist/zonos-elements/p-67426156.system.js +1 -0
  184. package/dist/zonos-elements/{p-0402af0d.entry.js → p-683ec0bf.entry.js} +1 -1
  185. package/dist/zonos-elements/{p-8b42245d.entry.js → p-6df034d6.entry.js} +1 -1
  186. package/dist/zonos-elements/p-6df6cb8a.entry.js +1 -0
  187. package/dist/zonos-elements/{p-02065a08.system.js → p-717cbe90.system.js} +1 -1
  188. package/dist/zonos-elements/{p-7e8aba66.system.entry.js → p-71cb16da.system.entry.js} +1 -1
  189. package/dist/zonos-elements/{p-9beb2624.entry.js → p-727387ed.entry.js} +1 -1
  190. package/dist/zonos-elements/{p-77fa437c.entry.js → p-746bdebe.entry.js} +1 -1
  191. package/dist/zonos-elements/{p-48d55793.system.js → p-7ac8846c.system.js} +1 -1
  192. package/dist/zonos-elements/{p-32278945.system.js → p-8005e102.system.js} +1 -1
  193. package/dist/zonos-elements/{p-2654556b.js → p-8051403a.js} +1 -1
  194. package/dist/zonos-elements/{p-d7cb9ef6.system.entry.js → p-8308f7d6.system.entry.js} +1 -1
  195. package/dist/zonos-elements/{p-6fae9835.system.entry.js → p-86d6961c.system.entry.js} +1 -1
  196. package/dist/zonos-elements/p-9448d960.js +1 -0
  197. package/dist/zonos-elements/{p-2b8345d8.system.js → p-989cb22b.system.js} +1 -1
  198. package/dist/zonos-elements/{p-5afea02c.system.entry.js → p-a23d3b3f.system.entry.js} +1 -1
  199. package/dist/zonos-elements/p-a34269b1.system.entry.js +1 -0
  200. package/dist/zonos-elements/p-a553e132.js +1 -0
  201. package/dist/zonos-elements/{p-74ebd766.js → p-a5f8dc19.js} +1 -1
  202. package/dist/zonos-elements/p-a6535773.system.entry.js +1 -0
  203. package/dist/zonos-elements/{p-ee434a71.entry.js → p-a6773627.entry.js} +1 -1
  204. package/dist/zonos-elements/{p-cd41b16b.system.entry.js → p-ae30e6c0.system.entry.js} +1 -1
  205. package/dist/zonos-elements/{p-0745e440.entry.js → p-b406bb39.entry.js} +1 -1
  206. package/dist/zonos-elements/{p-6b361d2b.js → p-bcf5cffb.js} +1 -1
  207. package/dist/zonos-elements/{p-e6165cc2.system.js → p-bf942ef0.system.js} +1 -1
  208. package/dist/zonos-elements/p-c345d1f5.system.js +1 -0
  209. package/dist/zonos-elements/p-d4337686.entry.js +1 -0
  210. package/dist/zonos-elements/{p-1b963905.system.js → p-ddf68916.system.js} +1 -1
  211. package/dist/zonos-elements/p-df8b8827.entry.js +1 -0
  212. package/dist/zonos-elements/{p-abf61f6f.system.entry.js → p-e0ec0aa3.system.entry.js} +1 -1
  213. package/dist/zonos-elements/p-e210edd9.system.js +1 -0
  214. package/dist/zonos-elements/{p-f44a3338.entry.js → p-e7a45f6c.entry.js} +1 -1
  215. package/dist/zonos-elements/p-edf613ea.entry.js +1 -0
  216. package/dist/zonos-elements/p-ee3c7b11.system.entry.js +1 -0
  217. package/dist/zonos-elements/{p-293183c1.system.entry.js → p-f156e2e5.system.entry.js} +1 -1
  218. package/dist/zonos-elements/{p-3f380c8f.system.js → p-f314217a.system.js} +1 -1
  219. package/dist/zonos-elements/{p-ac59f5c1.system.entry.js → p-f3e1a6a7.system.entry.js} +1 -1
  220. package/dist/zonos-elements/zonos-elements.esm.js +1 -1
  221. package/package.json +3 -3
  222. package/dist/cjs/formatStringWithLinks-52341fc7.js +0 -17
  223. package/dist/esm/formatStringWithLinks-9e819405.js +0 -15
  224. package/dist/esm-es5/formatStringWithLinks-9e819405.js +0 -1
  225. package/dist/esm-es5/localization-d49867ed.js +0 -1
  226. package/dist/zonos-elements/p-21d925d7.entry.js +0 -1
  227. package/dist/zonos-elements/p-2d6557ee.system.js +0 -1
  228. package/dist/zonos-elements/p-32704baa.js +0 -1
  229. package/dist/zonos-elements/p-3cf22558.entry.js +0 -1
  230. package/dist/zonos-elements/p-45e1c33b.entry.js +0 -1
  231. package/dist/zonos-elements/p-5d3ea491.system.entry.js +0 -1
  232. package/dist/zonos-elements/p-63a383f4.js +0 -1
  233. package/dist/zonos-elements/p-6b4ef7e0.entry.js +0 -1
  234. package/dist/zonos-elements/p-7365e22c.system.js +0 -1
  235. package/dist/zonos-elements/p-7522ec43.js +0 -1
  236. package/dist/zonos-elements/p-9fab45aa.system.js +0 -1
  237. package/dist/zonos-elements/p-a87561b8.js +0 -1
  238. package/dist/zonos-elements/p-c209e36d.js +0 -1
  239. package/dist/zonos-elements/p-d7bda14d.js +0 -1
  240. package/dist/zonos-elements/p-d93991c3.system.entry.js +0 -1
  241. package/dist/zonos-elements/p-eb9369b9.system.entry.js +0 -1
  242. package/dist/zonos-elements/p-f3a73132.entry.js +0 -1
  243. package/dist/zonos-elements/p-ffbf87c8.system.entry.js +0 -1
@@ -1,8 +1,8 @@
1
1
  'use strict';
2
2
 
3
3
  const zonosStore = require('./zonosStore-fee716c9.js');
4
- const cart = require('./cart-e8bc11a3.js');
5
- const localization = require('./localization-90650d7d.js');
4
+ const cart = require('./cart-3313cb0c.js');
5
+ const localization = require('./localization-6189080f.js');
6
6
  const handleFetch = require('./handleFetch-954f30e1.js');
7
7
  const isContrastColor = require('./isContrastColor-ef24b7aa.js');
8
8
  const VarianceTest = require('./VarianceTest-bec00ea8.js');
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
- const cart = require('./cart-e8bc11a3.js');
4
- const localization = require('./localization-90650d7d.js');
3
+ const cart = require('./cart-3313cb0c.js');
4
+ const localization = require('./localization-6189080f.js');
5
5
  const handleFetch = require('./handleFetch-954f30e1.js');
6
6
 
7
7
  const placeTestOrder = async () => {
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
- const cart = require('./cart-e8bc11a3.js');
4
- const localization = require('./localization-90650d7d.js');
3
+ const cart = require('./cart-3313cb0c.js');
4
+ const localization = require('./localization-6189080f.js');
5
5
 
6
6
  const getDisplayCurrency = () => {
7
7
  var _a, _b;
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  const ShortAddressCode = require('./ShortAddressCode-bec338b0.js');
4
- const TaxId = require('./TaxId-12acedde.js');
4
+ const TaxId = require('./TaxId-cd9d490e.js');
5
5
 
6
6
  const isInShortAddressCodeCountry = (countryCode) => {
7
7
  return ShortAddressCode.countryRequireShortAddressCode.includes(countryCode);
@@ -3,18 +3,18 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-b1f95d96.js');
6
- const localization = require('./localization-90650d7d.js');
6
+ const localization = require('./localization-6189080f.js');
7
7
  const containsNonLatinChars = require('./containsNonLatinChars-2be5129b.js');
8
- const cart = require('./cart-e8bc11a3.js');
8
+ const cart = require('./cart-3313cb0c.js');
9
9
  const classes = require('./classes-b7918f56.js');
10
10
  const getBorderRadius = require('./getBorderRadius-4da24d7c.js');
11
11
  const zonosStore = require('./zonosStore-fee716c9.js');
12
12
  const RemoveIcon$2 = require('./RemoveIcon-081ac073.js');
13
13
  const throttle = require('./throttle-34f7abf1.js');
14
14
  const handleFetch = require('./handleFetch-954f30e1.js');
15
- const shouldRenderTaxIdInput = require('./shouldRenderTaxIdInput-b8abf6de.js');
15
+ const shouldRenderTaxIdInput = require('./shouldRenderTaxIdInput-7d19556c.js');
16
16
  const VarianceTest = require('./VarianceTest-bec00ea8.js');
17
- const TaxId = require('./TaxId-12acedde.js');
17
+ const TaxId = require('./TaxId-cd9d490e.js');
18
18
  const helpers = require('./helpers-5bdbb68c.js');
19
19
  const isDarkColor = require('./isDarkColor-ebc74b4d.js');
20
20
  require('./debounce-9a712c79.js');
@@ -4,14 +4,14 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-b1f95d96.js');
6
6
  const throttle = require('./throttle-34f7abf1.js');
7
- const cart = require('./cart-e8bc11a3.js');
8
- const localization = require('./localization-90650d7d.js');
7
+ const cart = require('./cart-3313cb0c.js');
8
+ const localization = require('./localization-6189080f.js');
9
9
  const zonosStore = require('./zonosStore-fee716c9.js');
10
10
  const handleFetch = require('./handleFetch-954f30e1.js');
11
- const shouldRenderTaxIdInput = require('./shouldRenderTaxIdInput-b8abf6de.js');
11
+ const shouldRenderTaxIdInput = require('./shouldRenderTaxIdInput-7d19556c.js');
12
12
  const classes = require('./classes-b7918f56.js');
13
13
  const VarianceTest = require('./VarianceTest-bec00ea8.js');
14
- const TaxId = require('./TaxId-12acedde.js');
14
+ const TaxId = require('./TaxId-cd9d490e.js');
15
15
  const getBorderRadius = require('./getBorderRadius-4da24d7c.js');
16
16
  require('./debounce-9a712c79.js');
17
17
  require('./isDarkColor-ebc74b4d.js');
@@ -3,15 +3,15 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-b1f95d96.js');
6
- const collect = require('./collect-e6485168.js');
7
- const cart = require('./cart-e8bc11a3.js');
8
- const localization = require('./localization-90650d7d.js');
6
+ const collect = require('./collect-2659c5af.js');
7
+ const cart = require('./cart-3313cb0c.js');
8
+ const localization = require('./localization-6189080f.js');
9
9
  const zonosStore = require('./zonosStore-fee716c9.js');
10
10
  const VarianceTest = require('./VarianceTest-bec00ea8.js');
11
11
  const handleFetch = require('./handleFetch-954f30e1.js');
12
12
  require('./isDarkColor-ebc74b4d.js');
13
13
  require('./getBorderRadius-4da24d7c.js');
14
- require('./TaxId-12acedde.js');
14
+ require('./TaxId-cd9d490e.js');
15
15
 
16
16
  const zonosAirwallexPaymentCss = ".sc-zonos-airwallex-payment-h{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-airwallex-payment-h *.sc-zonos-airwallex-payment{font-family:var(--zonos--font-family, Inter), Inter}.sc-zonos-airwallex-payment-h img.sc-zonos-airwallex-payment{max-width:100%}.sc-zonos-airwallex-payment-h dl.sc-zonos-airwallex-payment,.sc-zonos-airwallex-payment-h dd.sc-zonos-airwallex-payment,.sc-zonos-airwallex-payment-h h1.sc-zonos-airwallex-payment,.sc-zonos-airwallex-payment-h h2.sc-zonos-airwallex-payment,.sc-zonos-airwallex-payment-h h3.sc-zonos-airwallex-payment,.sc-zonos-airwallex-payment-h h4.sc-zonos-airwallex-payment,.sc-zonos-airwallex-payment-h h5.sc-zonos-airwallex-payment,.sc-zonos-airwallex-payment-h h6.sc-zonos-airwallex-payment,.sc-zonos-airwallex-payment-h hr.sc-zonos-airwallex-payment,.sc-zonos-airwallex-payment-h figure.sc-zonos-airwallex-payment,.sc-zonos-airwallex-payment-h p.sc-zonos-airwallex-payment,.sc-zonos-airwallex-payment-h pre.sc-zonos-airwallex-payment{margin:0}.sc-zonos-airwallex-payment-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-airwallex-payment-h{display:block}.sc-zonos-airwallex-payment-h .zonos--payment-error-banner.sc-zonos-airwallex-payment{margin-bottom:16px}.sc-zonos-airwallex-payment-h .zonos--airwallex-payment-component.sc-zonos-airwallex-payment{margin-bottom:4px;min-height:40px}";
17
17
  const ZonosAirwallexPaymentStyle0 = zonosAirwallexPaymentCss;
@@ -6,13 +6,13 @@ const index = require('./index-b1f95d96.js');
6
6
  const zonosStore = require('./zonosStore-fee716c9.js');
7
7
  const classes = require('./classes-b7918f56.js');
8
8
  const getBorderRadius = require('./getBorderRadius-4da24d7c.js');
9
- const cart = require('./cart-e8bc11a3.js');
10
- const localization = require('./localization-90650d7d.js');
9
+ const cart = require('./cart-3313cb0c.js');
10
+ const localization = require('./localization-6189080f.js');
11
11
  const handleFetch = require('./handleFetch-954f30e1.js');
12
- const paypal = require('./paypal-77bd640c.js');
12
+ const paypal = require('./paypal-f6a256b5.js');
13
13
  const VarianceTest = require('./VarianceTest-bec00ea8.js');
14
14
  require('./isDarkColor-ebc74b4d.js');
15
- require('./TaxId-12acedde.js');
15
+ require('./TaxId-cd9d490e.js');
16
16
  require('./isContrastColor-ef24b7aa.js');
17
17
  require('./submitGtag-74762255.js');
18
18
 
@@ -3,27 +3,28 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-b1f95d96.js');
6
- const cart = require('./cart-e8bc11a3.js');
7
- const localization = require('./localization-90650d7d.js');
8
- const renderCheckoutCurrency = require('./renderCheckoutCurrency-66377cf5.js');
6
+ const cart = require('./cart-3313cb0c.js');
7
+ const localization = require('./localization-6189080f.js');
8
+ const renderCheckoutCurrency = require('./renderCheckoutCurrency-fe56094f.js');
9
9
  const cleanHtmlMarkdown = require('./cleanHtmlMarkdown-57147de7.js');
10
10
  const classes = require('./classes-b7918f56.js');
11
11
  const zonosStore = require('./zonosStore-fee716c9.js');
12
- const hasInclusivePrice = require('./hasInclusivePrice-798ce42d.js');
13
- const paypal = require('./paypal-77bd640c.js');
12
+ const hasInclusivePrice = require('./hasInclusivePrice-d132daaa.js');
13
+ const isSameHostCheckoutLink = require('./isSameHostCheckoutLink-6148cabb.js');
14
+ const paypal = require('./paypal-f6a256b5.js');
14
15
  const handleFetch = require('./handleFetch-954f30e1.js');
15
16
  const createCustomEvent = require('./createCustomEvent-7b6fad95.js');
16
17
  const getBorderRadius = require('./getBorderRadius-4da24d7c.js');
17
18
  const VarianceTest = require('./VarianceTest-bec00ea8.js');
18
19
  const ILanguage = require('./ILanguage-98b04442.js');
19
- const placeTestOrder = require('./placeTestOrder-7767d119.js');
20
+ const placeTestOrder = require('./placeTestOrder-695f2b32.js');
20
21
  const isDarkColor = require('./isDarkColor-ebc74b4d.js');
21
22
  const getContrastColor = require('./getContrastColor-2fb235b8.js');
22
23
  const isColorVariable = require('./isColorVariable-525dbfa7.js');
23
24
  const updateCheckoutSessionAttributes = require('./updateCheckoutSessionAttributes-f595319d.js');
24
25
  const containsNonLatinChars = require('./containsNonLatinChars-2be5129b.js');
25
- const shouldRenderTaxIdInput = require('./shouldRenderTaxIdInput-b8abf6de.js');
26
- const TaxId = require('./TaxId-12acedde.js');
26
+ const shouldRenderTaxIdInput = require('./shouldRenderTaxIdInput-7d19556c.js');
27
+ const TaxId = require('./TaxId-cd9d490e.js');
27
28
  require('./isContrastColor-ef24b7aa.js');
28
29
  require('./submitGtag-74762255.js');
29
30
  require('./debounce-9a712c79.js');
@@ -248,7 +249,18 @@ const ZonosCartSubtotal = class {
248
249
  * [[parseLinkedText]] and are emitted as VNodes (never `innerHTML`) so
249
250
  * untrusted strings can't inject HTML.
250
251
  */
251
- this.renderMessageLine = (line) => parseLinkedText(line).map(segment => segment.type === 'link' ? (index.h("zonos-link", { href: segment.href, rel: "noopener noreferrer", target: "_blank" }, segment.text)) : (segment.value));
252
+ this.renderMessageLine = (line) => parseLinkedText(line).map(segment => {
253
+ var _a;
254
+ if (segment.type !== 'link') {
255
+ return segment.value;
256
+ }
257
+ // For BigCommerce, a same-host `/checkout` link should navigate the
258
+ // current tab (`_self`) instead of opening a new one — this unloads the
259
+ // Zonos checkout and opens the native checkout in its place rather than
260
+ // leaving two checkouts open at once (05CHECK-887).
261
+ const shouldRedirectInPlace = !!((_a = window.Zonos) === null || _a === void 0 ? void 0 : _a.isBigCommerce) && isSameHostCheckoutLink.isSameHostCheckoutLink(segment.href);
262
+ return (index.h("zonos-link", { href: segment.href, rel: "noopener noreferrer", target: shouldRedirectInPlace ? '_self' : '_blank' }, segment.text));
263
+ });
252
264
  this.renderCustomMessage = () => {
253
265
  const messageLines = cart.cartStore.customMessage.filter(line => !!line.trim());
254
266
  if (!messageLines.length) {
@@ -1739,10 +1751,13 @@ const taxIdValidationResult = ({ companyName, shippingCountry, taxId, }) => {
1739
1751
  }
1740
1752
  // validate tax id for mexico;
1741
1753
  if (shippingCountry === 'MX') {
1742
- const isValid = /^[A-ZÑ]{3,4}[0-9]{6}[A-Z0-9]{3}$/.test(taxId);
1743
- if (!isValid) {
1754
+ // RFC: 3-4 letters + 6 digit date + 3 character homoclave (12-13 total)
1755
+ const isValidRfc = /^[A-ZÑ]{3,4}[0-9]{6}[A-Z0-9]{3}$/.test(taxId);
1756
+ // CURP: 4 letters + 6 digit date + gender (H/M/X) + 5 letters + alphanumeric + digit (18 total)
1757
+ const isValidCurp = /^[A-Z]{4}[0-9]{6}[HMX][A-Z]{5}[A-Z0-9][0-9]$/.test(taxId);
1758
+ if (!isValidRfc && !isValidCurp) {
1744
1759
  return {
1745
- error: 'Invalid RFC format. Must be 12–13 uppercase letters and numbers only.',
1760
+ error: 'Invalid RFC or CURP format. Must be a 12–13 character RFC or an 18 character CURP, uppercase letters and numbers only.',
1746
1761
  valid: false,
1747
1762
  };
1748
1763
  }
@@ -3,9 +3,9 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-b1f95d96.js');
6
- const cart = require('./cart-e8bc11a3.js');
7
- const paypal = require('./paypal-77bd640c.js');
8
- const localization = require('./localization-90650d7d.js');
6
+ const cart = require('./cart-3313cb0c.js');
7
+ const paypal = require('./paypal-f6a256b5.js');
8
+ const localization = require('./localization-6189080f.js');
9
9
  const zonosStore = require('./zonosStore-fee716c9.js');
10
10
  const buildCartItemsByTempCart = require('./buildCartItemsByTempCart-edddbf4b.js');
11
11
  const handleFetch = require('./handleFetch-954f30e1.js');
@@ -18,7 +18,7 @@ const getBorderRadius = require('./getBorderRadius-4da24d7c.js');
18
18
  const isDarkColor = require('./isDarkColor-ebc74b4d.js');
19
19
  const styles = require('./styles-d1e64fb9.js');
20
20
  const RemoveIcon = require('./RemoveIcon-081ac073.js');
21
- require('./TaxId-12acedde.js');
21
+ require('./TaxId-cd9d490e.js');
22
22
  require('./isContrastColor-ef24b7aa.js');
23
23
  require('./submitGtag-74762255.js');
24
24
  require('./debounce-9a712c79.js');
@@ -175,10 +175,15 @@ const buildBigcommerceLoginUrl = ({ action } = {}) => {
175
175
  */
176
176
  const buildBigcommerceRedirectUrl = (pathname) => {
177
177
  const url = new URL(pathname, window.location.origin);
178
- const zonosQaUrl = new URLSearchParams(window.location.search).get('zonosQaUrl');
178
+ const searchParams = new URLSearchParams(window.location.search);
179
+ const zonosQaUrl = searchParams.get('zonosQaUrl');
179
180
  if (zonosQaUrl) {
180
181
  url.searchParams.set('zonosQaUrl', zonosQaUrl);
181
182
  }
183
+ // zonosDebug=1
184
+ if (searchParams.get('zonosDebug') === '1') {
185
+ url.searchParams.set('zonosDebug', '1');
186
+ }
182
187
  if (handleFetch.getIsTestMode()) {
183
188
  url.searchParams.set('zonosTestMode', '1');
184
189
  }
@@ -699,6 +704,11 @@ providedCountryCode) => {
699
704
  };
700
705
 
701
706
  const FALLBACK_SHIP_TO_COUNTRY_SELECTOR = 'select[name="shippingAddress.countryCode"]';
707
+ /**
708
+ * Native BigCommerce shipping-step "Continue" button. Clicking it commits the
709
+ * selected shipping address and advances to the payment step.
710
+ */
711
+ const BIGCOMMERCE_SHIPPING_CONTINUE_SELECTOR = '#checkout-shipping-continue, #checkout-billing-continue, #checkout-payment-continue';
702
712
  /**
703
713
  * Check if the logged-in user already has a shipping address on the checkout
704
714
  * that is internationally shippable. If so, optionally prompt the user to
@@ -806,11 +816,11 @@ const watchImmediateBigcommerceDomesticCheckoutRedirect = ({ domesticRedirectedB
806
816
  overrideShippingCountry);
807
817
  if (!shippingCountry) {
808
818
  // do nothing if shipping country is not found
809
- return false;
819
+ return 'noAction';
810
820
  }
811
821
  if (!isShippableCountry(false, shippingCountry)) {
812
822
  // do nothing if shipping country is not shippable
813
- return false;
823
+ return 'noAction';
814
824
  }
815
825
  // Only check bypass after confirming the country is shippable (i.e. user is
816
826
  // about to be redirected to Zonos international checkout). Force-refresh so
@@ -831,7 +841,7 @@ const watchImmediateBigcommerceDomesticCheckoutRedirect = ({ domesticRedirectedB
831
841
  // Logged-in customer is in a bypass group — keep them on BC native
832
842
  // checkout and stop polling / fetching further.
833
843
  VarianceTest.log('Bypass customer group detected on BC checkout, stopping interval', 'info');
834
- return true;
844
+ return 'bypass';
835
845
  }
836
846
  // Same force-login gate as the logged-in-default-address path — we run
837
847
  // it *after* the bypass check so reseller groups never see the login
@@ -839,7 +849,7 @@ const watchImmediateBigcommerceDomesticCheckoutRedirect = ({ domesticRedirectedB
839
849
  const forceLogin = await checkBigCommerceForceLogin({ preFetched });
840
850
  if (forceLogin.shouldForceLogin && forceLogin.redirectUrl) {
841
851
  window.location.href = forceLogin.redirectUrl;
842
- return true;
852
+ return 'redirected';
843
853
  }
844
854
  if (onInternationalCheckoutSelected) {
845
855
  await onInternationalCheckoutSelected();
@@ -876,7 +886,135 @@ const watchImmediateBigcommerceDomesticCheckoutRedirect = ({ domesticRedirectedB
876
886
  // having domestic shipping session. Carry over zonosQaUrl / zonosTestMode
877
887
  // so the destination page keeps using the same build/env.
878
888
  window.location.href = buildBigcommerceRedirectUrl('/');
879
- return true;
889
+ return 'redirected';
890
+ };
891
+ /**
892
+ * When `true`, the logged-in "Continue" hook re-dispatched the shopper's
893
+ * click so BigCommerce's own handler can run (domestic / bypass case). The
894
+ * hook's listener sees this flag and lets the event through untouched.
895
+ */
896
+ let isBypassingContinueHook = false;
897
+ /**
898
+ * Set to `true` once the document-level "Continue" click delegation has been
899
+ * attached, so opting out repeatedly doesn't bind it more than once.
900
+ */
901
+ let loggedInContinueDelegationAttached = false;
902
+ /**
903
+ * Resolve the shopper's currently-selected shipping country on the BC native
904
+ * checkout. Logged-in shoppers picking a saved address don't expose a
905
+ * country `<select>`, so read it from the active checkout consignment via the
906
+ * Storefront API; fall back to the `<select>` value when one is present.
907
+ */
908
+ const resolveSelectedShippingCountry = async () => {
909
+ var _a, _b, _c, _d;
910
+ const checkoutId = await localization.fetchCheckoutId();
911
+ if (checkoutId) {
912
+ const checkout = await localization.fetchBigCommerceCheckout(checkoutId);
913
+ const consignmentCountry = (_c = (_b = (_a = checkout === null || checkout === void 0 ? void 0 : checkout.consignments) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.shippingAddress) === null || _c === void 0 ? void 0 : _c.countryCode;
914
+ if (consignmentCountry) {
915
+ return consignmentCountry;
916
+ }
917
+ }
918
+ const shipToCountryElement = document.querySelector(((_d = zonosStore.zonosStore.genericSettings) === null || _d === void 0 ? void 0 : _d.bigcommerceDomesticCheckoutCountrySelector) ||
919
+ FALLBACK_SHIP_TO_COUNTRY_SELECTOR);
920
+ return (shipToCountryElement === null || shipToCountryElement === void 0 ? void 0 : shipToCountryElement.value) || null;
921
+ };
922
+ /**
923
+ * Req 2 (05CHECK-887): once a logged-in shopper with an international default
924
+ * address has chosen to "Stay on this page", we must still force them onto
925
+ * the Zonos international checkout if they end up committing an international
926
+ * shipping address. BC's saved-address flow exposes no country `<select>` to
927
+ * poll, so we hook the native shipping "Continue" button and re-check the
928
+ * selected consignment country when the shopper tries to advance.
929
+ */
930
+ /**
931
+ * Resolve the selected shipping country when the shopper clicks the native
932
+ * BC "Continue" button and, if it's international, redirect to the Zonos
933
+ * checkout. On any outcome other than a redirect — domestic, bypass group,
934
+ * or an unexpected error — replay the click so BigCommerce's own handler runs
935
+ * and the shopper is never left stuck on the shipping step.
936
+ */
937
+ const handleLoggedInInternationalContinue = async (continueButton, observer) => {
938
+ // Default to replaying the native click; only a confirmed international
939
+ // redirect (page navigating away) suppresses it.
940
+ let shouldReplayClick = true;
941
+ try {
942
+ let country = null;
943
+ try {
944
+ country = await resolveSelectedShippingCountry();
945
+ }
946
+ catch (error) {
947
+ handleFetch.logError('Error resolving selected shipping country on BC continue', error);
948
+ }
949
+ // When the shopper is committing an international address we're about to
950
+ // save the domestic shipping session and redirect to `/`. Disconnect this
951
+ // /checkout-page observer first: otherwise its own session-detection
952
+ // branch races the save — it would append the hidden redirect button and
953
+ // open checkout locally, consuming and clearing the session before the
954
+ // navigation to `/` lands, leaving the redirect a no-op. (The `/` page
955
+ // runs its own fresh watcher to open checkout.)
956
+ if (country && isShippableCountry(false, country)) {
957
+ observer.disconnect();
958
+ }
959
+ const decision = country
960
+ ? await handleInternationalCheckoutSelected(country)
961
+ : 'noAction';
962
+ // `redirected` → the page is navigating to the Zonos international
963
+ // checkout, so don't replay. `bypass` / `noAction` → the shopper stays on
964
+ // BC native checkout, so fall through and replay the click.
965
+ if (decision === 'redirected') {
966
+ shouldReplayClick = false;
967
+ }
968
+ }
969
+ catch (error) {
970
+ // We already blocked BC's native click; if resolving the country or the
971
+ // redirect helper throws, replay so BC can advance rather than leaving
972
+ // the shopper stuck on the shipping step.
973
+ handleFetch.logError('Error handling BC continue international redirect', error);
974
+ }
975
+ if (shouldReplayClick) {
976
+ isBypassingContinueHook = true;
977
+ continueButton.click();
978
+ isBypassingContinueHook = false;
979
+ }
980
+ };
981
+ /**
982
+ * Req 2 (05CHECK-887): attach the logged-in international-redirect hook via a
983
+ * single capture-phase listener on `document` (delegation) rather than
984
+ * binding the button node directly. Delegation is resilient to BC
985
+ * re-rendering the shipping step and — crucially — to the MutationObserver
986
+ * disconnecting once the country `<select>` path sets up its polling
987
+ * interval: the "Continue" button may only render after that point, so a
988
+ * node-bound listener attached from the observer could miss it entirely.
989
+ * Attached once, on opt-out.
990
+ */
991
+ const attachLoggedInInternationalContinueDelegation = (observer) => {
992
+ if (loggedInContinueDelegationAttached) {
993
+ return;
994
+ }
995
+ loggedInContinueDelegationAttached = true;
996
+ document.addEventListener('click', event => {
997
+ // Programmatic replay for the domestic / bypass case — let BC's own
998
+ // handler run without interference.
999
+ if (isBypassingContinueHook) {
1000
+ return;
1001
+ }
1002
+ const { target } = event;
1003
+ if (!(target instanceof Element)) {
1004
+ return;
1005
+ }
1006
+ const continueButton = target.closest(BIGCOMMERCE_SHIPPING_CONTINUE_SELECTOR);
1007
+ if (!continueButton) {
1008
+ return;
1009
+ }
1010
+ // Block BC's native advance until we know whether the selected shipping
1011
+ // country forces an international redirect. Capture phase +
1012
+ // stopImmediatePropagation (done synchronously here, before the async
1013
+ // handler) prevents BC's React click handler from firing.
1014
+ event.preventDefault();
1015
+ event.stopImmediatePropagation();
1016
+ void handleLoggedInInternationalContinue(continueButton, observer);
1017
+ }, true);
880
1018
  };
881
1019
  let isProcessing = false;
882
1020
  let intervalCreated = false;
@@ -952,6 +1090,10 @@ const watchImmediateBigcommerceDomesticCheckoutRedirect = ({ domesticRedirectedB
952
1090
  // observer logic so the country-change watcher still fires when
953
1091
  // the user manually picks an international country in BC's UI.
954
1092
  loggedInAddressCheckSkipped = true;
1093
+ // Attach the "Continue" redirect hook now (once). Delegation on
1094
+ // `document` keeps it working even after this observer disconnects
1095
+ // when the country <select> path sets up its interval below.
1096
+ attachLoggedInInternationalContinueDelegation(observer);
955
1097
  }
956
1098
  }
957
1099
  catch (error) {
@@ -987,11 +1129,11 @@ const watchImmediateBigcommerceDomesticCheckoutRedirect = ({ domesticRedirectedB
987
1129
  }
988
1130
  isProcessing = true;
989
1131
  try {
990
- const shouldStopPolling = await handleInternationalCheckoutSelected();
1132
+ const decision = await handleInternationalCheckoutSelected();
991
1133
  // Stop the interval once either:
992
1134
  // - the user is being redirected to Zonos international checkout
993
1135
  // - the logged-in customer is in a bypass group (stay on BC checkout)
994
- if (shouldStopPolling) {
1136
+ if (decision === 'redirected' || decision === 'bypass') {
995
1137
  clearInterval(interval);
996
1138
  return;
997
1139
  }
@@ -1931,7 +2073,9 @@ const ZonosCheckout = class {
1931
2073
  // selector configured yet) — otherwise the redirect-back never reopens
1932
2074
  // the checkout dialog to show the success/finish screen.
1933
2075
  const hasRedirectHiddenButton = !!document.querySelector(`#${CheckoutConfig.checkoutHiddenBtnSelector}`);
1934
- VarianceTest.log(`attach checkout ${buttonAnchorSelector}`);
2076
+ VarianceTest.log(`attach checkout ${buttonAnchorSelector}`, 'info', {
2077
+ href: window.location.href,
2078
+ });
1935
2079
  VarianceTest.log(`attach checkout to always trigger international checkout selector: ${alwaysTriggerInternationalCheckoutSelector}`);
1936
2080
  // allow to load checkout if cartData is ready (Checkout can be loaded right away if tempCartUUID is in the URL)
1937
2081
  if (!buttonAnchorSelector &&
@@ -2053,6 +2197,38 @@ const ZonosCheckout = class {
2053
2197
  if (!result) {
2054
2198
  throw new Error('Error building cart');
2055
2199
  }
2200
+ // Early inventory / stock check (05CHECK-887): mirror the native
2201
+ // cart, which blocks checkout when an item has sold out, instead of
2202
+ // only catching it at payment time (which abandons late). The cart
2203
+ // items are now built and the dialog is still in its loading state,
2204
+ // so run the merchant `onInventoryCheck` callback now. Skip legacy
2205
+ // checkout — its inventory check reserves stock, and reserving here
2206
+ // *and* at pay time would double-reserve; legacy keeps its
2207
+ // pay-time-only check. `stripeStoreHandleInventoryCheck` no-ops when
2208
+ // no `onInventoryCheck` callback is configured.
2209
+ if (!window.Zonos.isLegacyCheckout) {
2210
+ let earlyInventoryMessage = null;
2211
+ try {
2212
+ earlyInventoryMessage = await cart.stripeStoreHandleInventoryCheck();
2213
+ }
2214
+ catch (_c) {
2215
+ // A throwing merchant callback should stop checkout, not open it.
2216
+ earlyInventoryMessage = localization.translate('Unable to check inventory. Please try again.');
2217
+ }
2218
+ if (earlyInventoryMessage) {
2219
+ // Surface the same "Couldn't place order" dialog and stop
2220
+ // before the checkout is revealed. We return here before the
2221
+ // session/analytics setup below runs, so close the (still
2222
+ // loading) checkout dialog rather than leaving a
2223
+ // half-initialized checkout visible behind the alert. The
2224
+ // inventory-failure dialog renders independently of `this.open`,
2225
+ // and "Return to cart" resets the message + closes cleanly.
2226
+ cart.cartStore.inventoryCheckErrorMessage = earlyInventoryMessage;
2227
+ cart.stripeStore.isFetchingSession = false;
2228
+ this.open = false;
2229
+ return;
2230
+ }
2231
+ }
2056
2232
  (_a = window.opener) === null || _a === void 0 ? void 0 : _a.postMessage({
2057
2233
  checkoutSessionId: localization.storageStore.checkoutSessionId,
2058
2234
  type: 'zonos-checkout-session-update',
@@ -3001,7 +3177,7 @@ const ZonosCheckout = class {
3001
3177
  this.isMobile && 'mobile',
3002
3178
  this.isIframed && 'iframed',
3003
3179
  this.hiddenMode && 'hidden-mode',
3004
- ]) }, this.preview ? (renderContent()) : (index.h("zonos-dialog", { borderStyle: style, class: "zonos--checkout-dialog", "data-theme": rightSideTheme, height: "980px", isLoading: dialogLoading, mobile: this.isMobile, noBodyPadding: true, noBorder: true, noClickOutside: true, noCloseButton: true, onCloseDialog: () => this.closeDialogHandler(), open: this.open, width: "1200px" }, renderContent())), index.h("zonos-dialog", { isLoading: true, loadingText: localization.translate('You will be redirected to international checkout shortly.'), loadingTitle: localization.translate('We detected that you are shipping to an international address.'), noClickOutside: true, noCloseButton: true, open: this.detectedDomesticCheckoutDialogOpen, width: "450px" }), index.h("zonos-dialog", { isLoading: true, loadingText: localization.translate('You will be redirected to domestic checkout shortly.'), loadingTitle: localization.translate('We detected that you are shipping to a domestic address.'), noClickOutside: true, noCloseButton: true, open: this.redirectToDomesticCheckoutDialogOpen, width: "450px" }), index.h("zonos-confirm-dialog", { class: "zonos--logged-in-intl-address-dialog", dialogCancelBtnText: localization.translate('Stay on this page'), dialogConfirmBtnText: localization.translate('Continue to international checkout'), dialogIntent: "info", dialogOpen: this.loggedInIntlAddressConfirmDialogOpen, dialogSubtitle: localization.translate('Your saved default address ships internationally. Would you like to continue to international checkout, or stay here and select a domestic address?'), dialogTitle: localization.translate('International shipping address detected'), dialogWidth: 480, onCancelClicked: () => {
3180
+ ]) }, this.preview ? (renderContent()) : (index.h("zonos-dialog", { borderStyle: style, class: "zonos--checkout-dialog", "data-theme": rightSideTheme, height: "980px", isLoading: dialogLoading, mobile: this.isMobile, noBodyPadding: true, noBorder: true, noClickOutside: true, noCloseButton: true, onCloseDialog: () => this.closeDialogHandler(), open: this.open, width: "1200px" }, renderContent())), index.h("zonos-dialog", { isLoading: true, loadingText: localization.translate('You will be redirected to international checkout shortly.'), loadingTitle: localization.translate('We detected that you are shipping to an international address.'), noClickOutside: true, noCloseButton: true, open: this.detectedDomesticCheckoutDialogOpen, width: "450px" }), index.h("zonos-dialog", { isLoading: true, loadingText: localization.translate('You will be redirected to domestic checkout shortly.'), loadingTitle: localization.translate('We detected that you are shipping to a domestic address.'), noClickOutside: true, noCloseButton: true, open: this.redirectToDomesticCheckoutDialogOpen, width: "450px" }), index.h("zonos-confirm-dialog", { class: "zonos--logged-in-intl-address-dialog", dialogCancelBtnText: localization.translate('Stay on this page'), dialogConfirmBtnText: localization.translate('Continue to international checkout'), dialogIntent: "info", dialogOpen: this.loggedInIntlAddressConfirmDialogOpen, dialogSubtitle: localization.translate('Your selected address ships internationally. Would you like to continue to international checkout, or stay here and select a domestic address?'), dialogTitle: localization.translate('International shipping address detected'), dialogWidth: 480, onCancelClicked: () => {
3005
3181
  var _a;
3006
3182
  this.loggedInIntlAddressConfirmDialogOpen = false;
3007
3183
  (_a = this.loggedInIntlAddressResolver) === null || _a === void 0 ? void 0 : _a.call(this, 'stay');
@@ -3,17 +3,17 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-b1f95d96.js');
6
- const cart = require('./cart-e8bc11a3.js');
6
+ const cart = require('./cart-3313cb0c.js');
7
7
  const cleanHtmlMarkdown = require('./cleanHtmlMarkdown-57147de7.js');
8
8
  const zonosStore = require('./zonosStore-fee716c9.js');
9
9
  const classes = require('./classes-b7918f56.js');
10
10
  const styles = require('./styles-d1e64fb9.js');
11
- require('./localization-90650d7d.js');
11
+ require('./localization-6189080f.js');
12
12
  require('./handleFetch-954f30e1.js');
13
13
  require('./VarianceTest-bec00ea8.js');
14
14
  require('./isDarkColor-ebc74b4d.js');
15
15
  require('./getBorderRadius-4da24d7c.js');
16
- require('./TaxId-12acedde.js');
16
+ require('./TaxId-cd9d490e.js');
17
17
 
18
18
  const zonosCollectCartItemsCss = ":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host .zonos--cart-table{width:100%;border:none;border-collapse:collapse;overflow:auto;font-size:var(--zonos-elements-font-size-base)}:host .zonos--cart-table .zonos--column{padding:8px;padding-left:0;font-size:var(--zonos-elements-font-size-base)}:host .zonos--cart-table .zonos--column:first-child{width:48px}:host .zonos--cart-table td{vertical-align:middle}:host .zonos--cart-item-price zonos-text{white-space:nowrap}:host img{min-width:40px;margin-top:6px;-webkit-box-shadow:0 0 0 1px rgba(110, 110, 120, 0.1), 0 1px 2px 0 rgba(10, 10, 11, 0.06), 0 1px 3px 0 rgba(10, 10, 11, 0.1);box-shadow:0 0 0 1px rgba(110, 110, 120, 0.1), 0 1px 2px 0 rgba(10, 10, 11, 0.06), 0 1px 3px 0 rgba(10, 10, 11, 0.1);border-radius:10px}";
19
19
  const ZonosCollectCartItemsStyle0 = zonosCollectCartItemsCss;
@@ -3,10 +3,10 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-b1f95d96.js');
6
- const collect = require('./collect-e6485168.js');
7
- const cart = require('./cart-e8bc11a3.js');
8
- const paypal = require('./paypal-77bd640c.js');
9
- const localization = require('./localization-90650d7d.js');
6
+ const collect = require('./collect-2659c5af.js');
7
+ const cart = require('./cart-3313cb0c.js');
8
+ const paypal = require('./paypal-f6a256b5.js');
9
+ const localization = require('./localization-6189080f.js');
10
10
  const zonosStore = require('./zonosStore-fee716c9.js');
11
11
  const handleFetch = require('./handleFetch-954f30e1.js');
12
12
  const createCustomEvent = require('./createCustomEvent-7b6fad95.js');
@@ -15,11 +15,11 @@ const VarianceTest = require('./VarianceTest-bec00ea8.js');
15
15
  const isCollectMobileTablet = require('./isCollectMobileTablet-884d4280.js');
16
16
  const classes = require('./classes-b7918f56.js');
17
17
  const ILanguage = require('./ILanguage-98b04442.js');
18
- const renderCheckoutCurrency = require('./renderCheckoutCurrency-66377cf5.js');
19
- const placeTestOrder = require('./placeTestOrder-7767d119.js');
18
+ const renderCheckoutCurrency = require('./renderCheckoutCurrency-fe56094f.js');
19
+ const placeTestOrder = require('./placeTestOrder-695f2b32.js');
20
20
  const renderFallback = require('./renderFallback-bc20ee20.js');
21
21
  require('./isDarkColor-ebc74b4d.js');
22
- require('./TaxId-12acedde.js');
22
+ require('./TaxId-cd9d490e.js');
23
23
  require('./isContrastColor-ef24b7aa.js');
24
24
  require('./submitGtag-74762255.js');
25
25
 
@@ -3,10 +3,10 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-b1f95d96.js');
6
- const collect = require('./collect-e6485168.js');
7
- const cart = require('./cart-e8bc11a3.js');
8
- const paypal = require('./paypal-77bd640c.js');
9
- const localization = require('./localization-90650d7d.js');
6
+ const collect = require('./collect-2659c5af.js');
7
+ const cart = require('./cart-3313cb0c.js');
8
+ const paypal = require('./paypal-f6a256b5.js');
9
+ const localization = require('./localization-6189080f.js');
10
10
  const zonosStore = require('./zonosStore-fee716c9.js');
11
11
  const buildCartItemsByTempCart = require('./buildCartItemsByTempCart-edddbf4b.js');
12
12
  const handleFetch = require('./handleFetch-954f30e1.js');
@@ -17,7 +17,7 @@ const renderFallback = require('./renderFallback-bc20ee20.js');
17
17
  const ILanguage = require('./ILanguage-98b04442.js');
18
18
  require('./isDarkColor-ebc74b4d.js');
19
19
  require('./getBorderRadius-4da24d7c.js');
20
- require('./TaxId-12acedde.js');
20
+ require('./TaxId-cd9d490e.js');
21
21
  require('./isContrastColor-ef24b7aa.js');
22
22
  require('./submitGtag-74762255.js');
23
23
 
@@ -3,8 +3,8 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-b1f95d96.js');
6
- const cart = require('./cart-e8bc11a3.js');
7
- const localization = require('./localization-90650d7d.js');
6
+ const cart = require('./cart-3313cb0c.js');
7
+ const localization = require('./localization-6189080f.js');
8
8
  const zonosStore = require('./zonosStore-fee716c9.js');
9
9
  const getGenericSettingsOverride = require('./getGenericSettingsOverride-c0ca32b9.js');
10
10
  const handleFetch = require('./handleFetch-954f30e1.js');
@@ -12,7 +12,7 @@ const VarianceTest = require('./VarianceTest-bec00ea8.js');
12
12
  const submitGtag = require('./submitGtag-74762255.js');
13
13
  require('./isDarkColor-ebc74b4d.js');
14
14
  require('./getBorderRadius-4da24d7c.js');
15
- require('./TaxId-12acedde.js');
15
+ require('./TaxId-cd9d490e.js');
16
16
 
17
17
  const getZonosSettings = async () => {
18
18
  if (window.Zonos.cartSettings) {
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-b1f95d96.js');
6
- const localization = require('./localization-90650d7d.js');
6
+ const localization = require('./localization-6189080f.js');
7
7
  const zonosStore = require('./zonosStore-fee716c9.js');
8
8
  const classes = require('./classes-b7918f56.js');
9
9
  require('./handleFetch-954f30e1.js');