@zonos/elements 1.3.219 → 1.3.220

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 (274) hide show
  1. package/dist/cjs/{cart-9a2b32e4.js → cart-9a9ae4b9.js} +2 -2
  2. package/dist/cjs/index.cjs.js +7 -7
  3. package/dist/cjs/{isCollectMobileTablet-7e57fd90.js → isCollectMobileTablet-7a9413e3.js} +12 -9
  4. package/dist/cjs/{localization-b12edb2a.js → localization-0169b27d.js} +1 -1
  5. package/dist/cjs/{paypal-e80871d0.js → paypal-9ee374a0.js} +3 -3
  6. package/dist/cjs/{placeTestOrder-8222fe95.js → placeTestOrder-0dfff170.js} +2 -2
  7. package/dist/cjs/{translationStore-20a6d8bf.js → translationStore-0c67178f.js} +60 -0
  8. package/dist/cjs/zonos-address_11.cjs.entry.js +40 -28
  9. package/dist/cjs/zonos-badge.cjs.entry.js +3 -3
  10. package/dist/cjs/zonos-banner_2.cjs.entry.js +4 -4
  11. package/dist/cjs/zonos-button_3.cjs.entry.js +3 -3
  12. package/dist/cjs/zonos-cart-items_12.cjs.entry.js +11 -14
  13. package/dist/cjs/zonos-checkout.cjs.entry.js +4 -4
  14. package/dist/cjs/zonos-collapse.cjs.entry.js +2 -2
  15. package/dist/cjs/zonos-collect-cart-items_3.cjs.entry.js +6 -6
  16. package/dist/cjs/zonos-collect-finish_6.cjs.entry.js +44 -43
  17. package/dist/cjs/zonos-collect.cjs.entry.js +5 -5
  18. package/dist/cjs/zonos-component.cjs.entry.js +1 -1
  19. package/dist/cjs/zonos-confirm-dialog_2.cjs.entry.js +5 -5
  20. package/dist/cjs/zonos-controller.cjs.entry.js +4 -4
  21. package/dist/cjs/zonos-country-flag.cjs.entry.js +2 -2
  22. package/dist/cjs/zonos-country-select_4.cjs.entry.js +11 -11
  23. package/dist/cjs/zonos-empty-state-payment_4.cjs.entry.js +14 -6
  24. package/dist/cjs/zonos-hello-dialog.cjs.entry.js +6 -6
  25. package/dist/cjs/zonos-hello.cjs.entry.js +2 -2
  26. package/dist/cjs/zonos-input.cjs.entry.js +4 -4
  27. package/dist/cjs/zonos-language-select_2.cjs.entry.js +6 -6
  28. package/dist/cjs/zonos-link.cjs.entry.js +1 -1
  29. package/dist/cjs/zonos-logo.cjs.entry.js +2 -2
  30. package/dist/cjs/zonos-stripe-input.cjs.entry.js +4 -4
  31. package/dist/cjs/zonos-toggle.cjs.entry.js +2 -2
  32. package/dist/cjs/zonos-tooltip.cjs.entry.js +2 -2
  33. package/dist/cjs/zonos-v-stack.cjs.entry.js +2 -2
  34. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-payment/zonos-checkout-payment.js +0 -3
  35. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.js +1 -1
  36. package/dist/collection/components/checkout/zonos-collect/zonos-collect-finish/zonos-collect-finish.css +6 -0
  37. package/dist/collection/components/checkout/zonos-collect/zonos-collect-finish/zonos-collect-finish.js +23 -21
  38. package/dist/collection/components/checkout/zonos-collect/zonos-collect-footer/zonos-collect-footer.js +3 -3
  39. package/dist/collection/components/checkout/zonos-collect/zonos-collect-review/zonos-collect-review.css +3 -0
  40. package/dist/collection/components/checkout/zonos-collect/zonos-collect-review/zonos-collect-review.js +3 -3
  41. package/dist/collection/components/checkout/zonos-collect/zonos-collect-subtotal/zonos-collect-subtotal.js +7 -7
  42. package/dist/collection/components/common/zonos-badge/zonos-badge.js +3 -3
  43. package/dist/collection/components/common/zonos-button/zonos-button.js +3 -3
  44. package/dist/collection/components/common/zonos-card/zonos-card.js +4 -4
  45. package/dist/collection/components/common/zonos-checkbox/zonos-checkbox.js +3 -3
  46. package/dist/collection/components/common/zonos-checkout-progress-tabs/zonos-checkout-progress-tabs.js +3 -3
  47. package/dist/collection/components/common/zonos-collapse/zonos-collapse.js +2 -2
  48. package/dist/collection/components/common/zonos-confirm-dialog/zonos-confirm-dialog.js +3 -3
  49. package/dist/collection/components/common/zonos-country-select/zonos-country-select.js +3 -3
  50. package/dist/collection/components/common/zonos-custom-message/zonos-custom-message.js +2 -2
  51. package/dist/collection/components/common/zonos-dialog/zonos-dialog.js +3 -3
  52. package/dist/collection/components/common/zonos-h-stack/zonos-h-stack.js +2 -2
  53. package/dist/collection/components/common/zonos-input/zonos-input.js +4 -4
  54. package/dist/collection/components/common/zonos-language-select/zonos-language-select.js +2 -2
  55. package/dist/collection/components/common/zonos-link/zonos-link.js +1 -1
  56. package/dist/collection/components/common/zonos-loading-overlay/zonos-loading-overlay.js +1 -1
  57. package/dist/collection/components/common/zonos-logo/zonos-logo.js +2 -2
  58. package/dist/collection/components/common/zonos-rest-state/zonos-rest-state.js +3 -3
  59. package/dist/collection/components/common/zonos-select-dialog-header/zonos-select-dialog-header.js +2 -2
  60. package/dist/collection/components/common/zonos-skeleton/zonos-skeleton.js +1 -1
  61. package/dist/collection/components/common/zonos-stripe-input/zonos-stripe-input.js +4 -4
  62. package/dist/collection/components/common/zonos-stripe-phone-input/zonos-stripe-phone-input.js +5 -5
  63. package/dist/collection/components/common/zonos-stripe-select/zonos-stripe-select.js +5 -5
  64. package/dist/collection/components/common/zonos-toggle/zonos-toggle.js +2 -2
  65. package/dist/collection/components/common/zonos-tooltip/zonos-tooltip.js +2 -2
  66. package/dist/collection/components/common/zonos-v-stack/zonos-v-stack.js +2 -2
  67. package/dist/collection/components/common/zonos-virtual-scroll/zonos-virtual-scroll.js +2 -2
  68. package/dist/collection/components/component-template/zonos-component/zonos-component.js +1 -1
  69. package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog-footer/zonos-hello-dialog-footer.js +2 -2
  70. package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog.js +4 -4
  71. package/dist/collection/components/main/zonos-controller.js +1 -1
  72. package/dist/collection/components/paypal/zonos-paypal-payment.js +1 -1
  73. package/dist/collection/components/store/checkout/collect.js +10 -7
  74. package/dist/collection/components/store/translationStore/strings.arabic.js +3 -0
  75. package/dist/collection/components/store/translationStore/strings.base.js +3 -0
  76. package/dist/collection/components/store/translationStore/strings.chinese.js +3 -0
  77. package/dist/collection/components/store/translationStore/strings.danish.js +3 -0
  78. package/dist/collection/components/store/translationStore/strings.dutch.js +3 -0
  79. package/dist/collection/components/store/translationStore/strings.french.js +3 -0
  80. package/dist/collection/components/store/translationStore/strings.german.js +3 -0
  81. package/dist/collection/components/store/translationStore/strings.hebrew.js +3 -0
  82. package/dist/collection/components/store/translationStore/strings.indonesian.js +3 -0
  83. package/dist/collection/components/store/translationStore/strings.italian.js +3 -0
  84. package/dist/collection/components/store/translationStore/strings.japanese.js +3 -0
  85. package/dist/collection/components/store/translationStore/strings.korean.js +3 -0
  86. package/dist/collection/components/store/translationStore/strings.norwegian.js +3 -0
  87. package/dist/collection/components/store/translationStore/strings.polish.js +3 -0
  88. package/dist/collection/components/store/translationStore/strings.portuguese.js +3 -0
  89. package/dist/collection/components/store/translationStore/strings.russian.js +3 -0
  90. package/dist/collection/components/store/translationStore/strings.spanish.js +3 -0
  91. package/dist/collection/components/store/translationStore/strings.swedish.js +3 -0
  92. package/dist/collection/components/store/translationStore/strings.turkish.js +3 -0
  93. package/dist/collection/components/store/translationStore/strings.vietnamese.js +3 -0
  94. package/dist/collection/components/stripe/zonos-address/zonos-address.js +2 -2
  95. package/dist/collection/components/stripe/zonos-custom-address/zonos-address-suggestions/zonos-address-suggestions.js +2 -2
  96. package/dist/collection/components/stripe/zonos-custom-address/zonos-custom-address.js +2 -2
  97. package/dist/collection/components/stripe/zonos-link-authentication/zonos-link-authentication.js +15 -3
  98. package/dist/collection/components/stripe/zonos-payment/zonos-payment.js +9 -1
  99. package/dist/collection/types/generated/graphql.internal.types.js +10 -0
  100. package/dist/esm/{cart-acf4ebf5.js → cart-b2dd578c.js} +2 -2
  101. package/dist/esm/index.js +7 -7
  102. package/dist/esm/{isCollectMobileTablet-b72b81c5.js → isCollectMobileTablet-7f9a5e2b.js} +12 -9
  103. package/dist/esm/{localization-8646f526.js → localization-d7125e4e.js} +1 -1
  104. package/dist/esm/{paypal-2fa930eb.js → paypal-555bbf1e.js} +3 -3
  105. package/dist/esm/{placeTestOrder-d1ad9cf6.js → placeTestOrder-2d67c1a9.js} +2 -2
  106. package/dist/esm/{translationStore-c9743292.js → translationStore-13502f49.js} +60 -0
  107. package/dist/esm/zonos-address_11.entry.js +40 -28
  108. package/dist/esm/zonos-badge.entry.js +3 -3
  109. package/dist/esm/zonos-banner_2.entry.js +4 -4
  110. package/dist/esm/zonos-button_3.entry.js +3 -3
  111. package/dist/esm/zonos-cart-items_12.entry.js +11 -14
  112. package/dist/esm/zonos-checkout.entry.js +4 -4
  113. package/dist/esm/zonos-collapse.entry.js +2 -2
  114. package/dist/esm/zonos-collect-cart-items_3.entry.js +6 -6
  115. package/dist/esm/zonos-collect-finish_6.entry.js +44 -43
  116. package/dist/esm/zonos-collect.entry.js +5 -5
  117. package/dist/esm/zonos-component.entry.js +1 -1
  118. package/dist/esm/zonos-confirm-dialog_2.entry.js +5 -5
  119. package/dist/esm/zonos-controller.entry.js +4 -4
  120. package/dist/esm/zonos-country-flag.entry.js +2 -2
  121. package/dist/esm/zonos-country-select_4.entry.js +11 -11
  122. package/dist/esm/zonos-empty-state-payment_4.entry.js +14 -6
  123. package/dist/esm/zonos-hello-dialog.entry.js +6 -6
  124. package/dist/esm/zonos-hello.entry.js +2 -2
  125. package/dist/esm/zonos-input.entry.js +4 -4
  126. package/dist/esm/zonos-language-select_2.entry.js +6 -6
  127. package/dist/esm/zonos-link.entry.js +1 -1
  128. package/dist/esm/zonos-logo.entry.js +2 -2
  129. package/dist/esm/zonos-stripe-input.entry.js +4 -4
  130. package/dist/esm/zonos-toggle.entry.js +2 -2
  131. package/dist/esm/zonos-tooltip.entry.js +2 -2
  132. package/dist/esm/zonos-v-stack.entry.js +2 -2
  133. package/dist/esm-es5/{cart-acf4ebf5.js → cart-b2dd578c.js} +1 -1
  134. package/dist/esm-es5/index.js +1 -1
  135. package/dist/esm-es5/isCollectMobileTablet-7f9a5e2b.js +1 -0
  136. package/dist/esm-es5/{localization-8646f526.js → localization-d7125e4e.js} +1 -1
  137. package/dist/esm-es5/{paypal-2fa930eb.js → paypal-555bbf1e.js} +2 -2
  138. package/dist/esm-es5/{placeTestOrder-d1ad9cf6.js → placeTestOrder-2d67c1a9.js} +1 -1
  139. package/dist/esm-es5/translationStore-13502f49.js +1 -0
  140. package/dist/esm-es5/zonos-address_11.entry.js +1 -1
  141. package/dist/esm-es5/zonos-badge.entry.js +1 -1
  142. package/dist/esm-es5/zonos-banner_2.entry.js +1 -1
  143. package/dist/esm-es5/zonos-button_3.entry.js +1 -1
  144. package/dist/esm-es5/zonos-cart-items_12.entry.js +1 -1
  145. package/dist/esm-es5/zonos-checkout.entry.js +1 -1
  146. package/dist/esm-es5/zonos-collapse.entry.js +1 -1
  147. package/dist/esm-es5/zonos-collect-cart-items_3.entry.js +1 -1
  148. package/dist/esm-es5/zonos-collect-finish_6.entry.js +1 -1
  149. package/dist/esm-es5/zonos-collect.entry.js +1 -1
  150. package/dist/esm-es5/zonos-component.entry.js +1 -1
  151. package/dist/esm-es5/zonos-confirm-dialog_2.entry.js +1 -1
  152. package/dist/esm-es5/zonos-controller.entry.js +1 -1
  153. package/dist/esm-es5/zonos-country-flag.entry.js +1 -1
  154. package/dist/esm-es5/zonos-country-select_4.entry.js +1 -1
  155. package/dist/esm-es5/zonos-empty-state-payment_4.entry.js +1 -1
  156. package/dist/esm-es5/zonos-hello-dialog.entry.js +1 -1
  157. package/dist/esm-es5/zonos-hello.entry.js +1 -1
  158. package/dist/esm-es5/zonos-input.entry.js +1 -1
  159. package/dist/esm-es5/zonos-language-select_2.entry.js +1 -1
  160. package/dist/esm-es5/zonos-link.entry.js +1 -1
  161. package/dist/esm-es5/zonos-logo.entry.js +1 -1
  162. package/dist/esm-es5/zonos-stripe-input.entry.js +1 -1
  163. package/dist/esm-es5/zonos-toggle.entry.js +1 -1
  164. package/dist/esm-es5/zonos-tooltip.entry.js +1 -1
  165. package/dist/esm-es5/zonos-v-stack.entry.js +1 -1
  166. package/dist/scripts/index.d.ts +5 -4
  167. package/dist/scripts/index.js +1 -1
  168. package/dist/scripts/loadZonos.js +1 -1
  169. package/dist/scripts/zonos.js +1 -1
  170. package/dist/types/components/checkout/zonos-collect/zonos-collect-finish/zonos-collect-finish.d.ts +1 -0
  171. package/dist/types/components/store/translationStore/strings.arabic.d.ts +3 -0
  172. package/dist/types/components/store/translationStore/strings.base.d.ts +3 -0
  173. package/dist/types/components/store/translationStore/strings.chinese.d.ts +3 -0
  174. package/dist/types/components/store/translationStore/strings.danish.d.ts +3 -0
  175. package/dist/types/components/store/translationStore/strings.dutch.d.ts +3 -0
  176. package/dist/types/components/store/translationStore/strings.french.d.ts +3 -0
  177. package/dist/types/components/store/translationStore/strings.german.d.ts +3 -0
  178. package/dist/types/components/store/translationStore/strings.hebrew.d.ts +3 -0
  179. package/dist/types/components/store/translationStore/strings.indonesian.d.ts +3 -0
  180. package/dist/types/components/store/translationStore/strings.italian.d.ts +3 -0
  181. package/dist/types/components/store/translationStore/strings.japanese.d.ts +3 -0
  182. package/dist/types/components/store/translationStore/strings.korean.d.ts +3 -0
  183. package/dist/types/components/store/translationStore/strings.norwegian.d.ts +3 -0
  184. package/dist/types/components/store/translationStore/strings.polish.d.ts +3 -0
  185. package/dist/types/components/store/translationStore/strings.portuguese.d.ts +3 -0
  186. package/dist/types/components/store/translationStore/strings.russian.d.ts +3 -0
  187. package/dist/types/components/store/translationStore/strings.spanish.d.ts +3 -0
  188. package/dist/types/components/store/translationStore/strings.swedish.d.ts +3 -0
  189. package/dist/types/components/store/translationStore/strings.turkish.d.ts +3 -0
  190. package/dist/types/components/store/translationStore/strings.vietnamese.d.ts +3 -0
  191. package/dist/types/components/stripe/zonos-link-authentication/zonos-link-authentication.d.ts +1 -1
  192. package/dist/types/types/generated/graphql.internal.types.d.ts +205 -16
  193. package/dist/types/types/generated/graphql.internal.types.ts +218 -16
  194. package/dist/zonos-elements/index.esm.js +1 -1
  195. package/dist/zonos-elements/{p-d045e2e5.entry.js → p-02667a58.entry.js} +1 -1
  196. package/dist/zonos-elements/{p-c0a54cf6.system.js → p-031d646e.system.js} +1 -1
  197. package/dist/zonos-elements/{p-c3c9b089.entry.js → p-0e07e1d6.entry.js} +1 -1
  198. package/dist/zonos-elements/p-126087a2.system.entry.js +1 -0
  199. package/dist/zonos-elements/{p-03980f76.entry.js → p-14f9bc8c.entry.js} +1 -1
  200. package/dist/zonos-elements/p-27d9abab.js +1 -0
  201. package/dist/zonos-elements/p-2813d72e.system.js +1 -0
  202. package/dist/zonos-elements/{p-10797d2b.system.entry.js → p-295d9c07.system.entry.js} +1 -1
  203. package/dist/zonos-elements/{p-485416ec.js → p-2a6c964d.js} +1 -1
  204. package/dist/zonos-elements/{p-b12ec9f2.system.entry.js → p-2b3c7c77.system.entry.js} +1 -1
  205. package/dist/zonos-elements/{p-6696617a.system.entry.js → p-2b8897d1.system.entry.js} +1 -1
  206. package/dist/zonos-elements/{p-d351ece6.system.entry.js → p-30432622.system.entry.js} +1 -1
  207. package/dist/zonos-elements/{p-9c0b78bf.system.entry.js → p-3462e9e4.system.entry.js} +1 -1
  208. package/dist/zonos-elements/{p-23293a0b.entry.js → p-372c2fc5.entry.js} +1 -1
  209. package/dist/zonos-elements/{p-195b33b6.system.entry.js → p-3c1b1be1.system.entry.js} +1 -1
  210. package/dist/zonos-elements/{p-69fd1b88.js → p-40a4266f.js} +1 -1
  211. package/dist/zonos-elements/{p-f74a6b78.system.entry.js → p-421dfb66.system.entry.js} +1 -1
  212. package/dist/zonos-elements/{p-009c3ac5.system.entry.js → p-4f8563ad.system.entry.js} +1 -1
  213. package/dist/zonos-elements/{p-3c9714a8.system.entry.js → p-52d35358.system.entry.js} +1 -1
  214. package/dist/zonos-elements/{p-d26cffba.entry.js → p-567f7de7.entry.js} +1 -1
  215. package/dist/zonos-elements/p-5d9410da.entry.js +1 -0
  216. package/dist/zonos-elements/{p-f129a83b.system.entry.js → p-637b22ee.system.entry.js} +1 -1
  217. package/dist/zonos-elements/{p-61c2c336.entry.js → p-63a42823.entry.js} +1 -1
  218. package/dist/zonos-elements/{p-8ca25e6c.entry.js → p-6b3a0874.entry.js} +1 -1
  219. package/dist/zonos-elements/p-73c1e91f.js +1 -0
  220. package/dist/zonos-elements/{p-909d36bf.entry.js → p-759ef3ca.entry.js} +1 -1
  221. package/dist/zonos-elements/{p-c8784a01.system.entry.js → p-79d8c3f3.system.entry.js} +1 -1
  222. package/dist/zonos-elements/{p-2c9381be.entry.js → p-7c4e7651.entry.js} +1 -1
  223. package/dist/zonos-elements/{p-70b81bbc.entry.js → p-7d2d2c94.entry.js} +1 -1
  224. package/dist/zonos-elements/{p-e455f060.system.entry.js → p-7e5bd9af.system.entry.js} +1 -1
  225. package/dist/zonos-elements/p-7ecbb2cb.entry.js +1 -0
  226. package/dist/zonos-elements/p-81b357f7.system.js +1 -1
  227. package/dist/zonos-elements/{p-f17fde5f.system.js → p-82e88a33.system.js} +1 -1
  228. package/dist/zonos-elements/{p-873b698a.entry.js → p-849b47aa.entry.js} +1 -1
  229. package/dist/zonos-elements/{p-0cec2dd2.system.entry.js → p-8dd47520.system.entry.js} +1 -1
  230. package/dist/zonos-elements/{p-772ac0b7.js → p-932600b7.js} +1 -1
  231. package/dist/zonos-elements/{p-b1bd9fe7.system.entry.js → p-960e0ab1.system.entry.js} +1 -1
  232. package/dist/zonos-elements/p-9c5b8239.system.js +1 -0
  233. package/dist/zonos-elements/p-9fdd3264.system.entry.js +1 -0
  234. package/dist/zonos-elements/{p-58afbe2b.entry.js → p-a08a005d.entry.js} +1 -1
  235. package/dist/zonos-elements/p-a10de7fb.entry.js +1 -0
  236. package/dist/zonos-elements/p-a49b5e7f.system.entry.js +1 -0
  237. package/dist/zonos-elements/{p-23735db6.entry.js → p-a5b0a636.entry.js} +1 -1
  238. package/dist/zonos-elements/{p-dfb92907.entry.js → p-a77ed1b9.entry.js} +1 -1
  239. package/dist/zonos-elements/{p-750b7f32.system.entry.js → p-a800965d.system.entry.js} +1 -1
  240. package/dist/zonos-elements/{p-aca272ea.entry.js → p-b3d5bcf9.entry.js} +1 -1
  241. package/dist/zonos-elements/{p-2323ff0f.system.entry.js → p-b669050d.system.entry.js} +1 -1
  242. package/dist/zonos-elements/{p-95461a1b.system.entry.js → p-b9e9b82f.system.entry.js} +1 -1
  243. package/dist/zonos-elements/{p-e2a45188.system.entry.js → p-ba18c5f5.system.entry.js} +1 -1
  244. package/dist/zonos-elements/{p-106ae0f1.entry.js → p-bbf48b31.entry.js} +1 -1
  245. package/dist/zonos-elements/{p-b5406d26.entry.js → p-c4b3c878.entry.js} +1 -1
  246. package/dist/zonos-elements/{p-2cc031b3.js → p-c7b57886.js} +2 -2
  247. package/dist/zonos-elements/{p-a7204d41.entry.js → p-c803753e.entry.js} +1 -1
  248. package/dist/zonos-elements/{p-29499a5f.entry.js → p-cbb01de9.entry.js} +1 -1
  249. package/dist/zonos-elements/{p-6dd63754.system.js → p-ce15d62d.system.js} +1 -1
  250. package/dist/zonos-elements/{p-1fe5d4da.system.entry.js → p-d291e964.system.entry.js} +1 -1
  251. package/dist/zonos-elements/{p-07bea979.system.js → p-d3485a03.system.js} +1 -1
  252. package/dist/zonos-elements/{p-f0be0ca9.system.entry.js → p-de626806.system.entry.js} +1 -1
  253. package/dist/zonos-elements/{p-56ee6d4b.system.entry.js → p-e5388438.system.entry.js} +1 -1
  254. package/dist/zonos-elements/{p-0d6c6a38.entry.js → p-e77b6e42.entry.js} +1 -1
  255. package/dist/zonos-elements/{p-d63696ac.system.js → p-ea8aff21.system.js} +1 -1
  256. package/dist/zonos-elements/{p-34a37ce7.system.entry.js → p-eb6a35ce.system.entry.js} +1 -1
  257. package/dist/zonos-elements/{p-60c61982.system.entry.js → p-ee6f8c02.system.entry.js} +1 -1
  258. package/dist/zonos-elements/{p-2a9681b4.entry.js → p-f4fa8720.entry.js} +1 -1
  259. package/dist/zonos-elements/{p-26573347.entry.js → p-fa90adb8.entry.js} +1 -1
  260. package/dist/zonos-elements/{p-bfbc081f.entry.js → p-fe7e2dc4.entry.js} +1 -1
  261. package/dist/zonos-elements/zonos-elements.esm.js +1 -1
  262. package/package.json +1 -1
  263. package/dist/esm-es5/isCollectMobileTablet-b72b81c5.js +0 -1
  264. package/dist/esm-es5/translationStore-c9743292.js +0 -1
  265. package/dist/zonos-elements/p-5e372fb9.entry.js +0 -1
  266. package/dist/zonos-elements/p-5ff4f9df.system.js +0 -1
  267. package/dist/zonos-elements/p-6761091e.entry.js +0 -1
  268. package/dist/zonos-elements/p-6761286d.js +0 -1
  269. package/dist/zonos-elements/p-6e8aae27.system.entry.js +0 -1
  270. package/dist/zonos-elements/p-81e23f30.system.js +0 -1
  271. package/dist/zonos-elements/p-87e2a777.entry.js +0 -1
  272. package/dist/zonos-elements/p-986ebccc.js +0 -1
  273. package/dist/zonos-elements/p-ddb29c2a.system.entry.js +0 -1
  274. package/dist/zonos-elements/p-eb54ece4.system.entry.js +0 -1
@@ -1 +1 @@
1
- var __awaiter=this&&this.__awaiter||function(e,o,t,r){function n(e){return e instanceof t?e:new t((function(o){o(e)}))}return new(t||(t=Promise))((function(t,s){function i(e){try{c(r.next(e))}catch(e){s(e)}}function a(e){try{c(r["throw"](e))}catch(e){s(e)}}function c(e){e.done?t(e.value):n(e.value).then(i,a)}c((r=r.apply(e,o||[])).next())}))};var __generator=this&&this.__generator||function(e,o){var t={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},r,n,s,i;return i={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(i[Symbol.iterator]=function(){return this}),i;function a(e){return function(o){return c([e,o])}}function c(a){if(r)throw new TypeError("Generator is already executing.");while(i&&(i=0,a[0]&&(t=0)),t)try{if(r=1,n&&(s=a[0]&2?n["return"]:a[0]?n["throw"]||((s=n["return"])&&s.call(n),0):n.next)&&!(s=s.call(n,a[1])).done)return s;if(n=0,s)a=[a[0]&2,s.value];switch(a[0]){case 0:case 1:s=a;break;case 4:t.label++;return{value:a[1],done:false};case 5:t.label++;n=a[1];a=[0];continue;case 7:a=t.ops.pop();t.trys.pop();continue;default:if(!(s=t.trys,s=s.length>0&&s[s.length-1])&&(a[0]===6||a[0]===2)){t=0;continue}if(a[0]===3&&(!s||a[1]>s[0]&&a[1]<s[3])){t.label=a[1];break}if(a[0]===6&&t.label<s[1]){t.label=s[1];s=a;break}if(s&&t.label<s[2]){t.label=s[2];t.ops.push(a);break}if(s[2])t.ops.pop();t.trys.pop();continue}a=o.call(e,t)}catch(e){a=[6,e];n=0}finally{r=s=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(e,o,t){if(t||arguments.length===2)for(var r=0,n=o.length,s;r<n;r++){if(s||!(r in o)){if(!s)s=Array.prototype.slice.call(o,0,r);s[r]=o[r]}}return e.concat(s||Array.prototype.slice.call(o))};import{r as registerInstance,h,H as Host,F as Fragment}from"./index-55a03023.js";import{s as stripeStoreGetDomesticShippingSession,a as stripeStoreCleanupDomesticShippingSession,b as stripeStoreSaveDomesticShippingSession,c as stripeStore,i as initStripeElements,d as stripeStoreRetrievePayment,e as cartStore,f as cartStoreUpdateItems,g as cartStoreReset,h as cartStoreResetTabItems,j as cartStoreClearCheckoutInterval,k as stripeStoreInitCheckoutSession,l as stripeStoreGetPaymentIntent,m as cartStoreStartCheckoutInterval,t as trackConversionEvent,n as getCheckoutSessionBody,o as cartStoreUpdateToErrorState,p as cartStoreSetCheckoutSession,q as stripeStorePrefetchLandedCost,r as cartStoreNextStep,u as stripeStoreUpdateCheckoutSessionBaseCurrency,v as stripeStoreHandleInventoryCheck,w as stripeStoreConfirmPayment,x as stripeStoreHandleInventoryRefund,y as stripeStoreReset}from"./cart-acf4ebf5.js";import{p as paypalStoreHasPaypalEnabled,s as submitGtag,a as paypalStore,b as paypalInitScript}from"./paypal-2fa930eb.js";import{f as filterValidTests,l as localizationStore,a as localizationStoreUpdateSelectedCountryCode,g as getZCountryUrlParam,s as storageStore,V as VARIANT_TEST_KEY_EXPIRATION,b as storageStoreSetEnabledVariantTestKeys,c as localizationStoreOnChange,d as currencyFormat}from"./localization-8646f526.js";import{t as translate}from"./translationStore-c9743292.js";import{z as zonosStore,g as getZonosStoreTheme,m as mergeConfig}from"./zonosStore-c456b933.js";import{b as buildCartItemsByTempCart}from"./buildCartItemsByTempCart-c4488f73.js";import{h as handleFetch,l as log,b as logError,s as sendErrorLog,c as getElapsedTime,d as allLogs,e as getAdditionalLogMetadata,g as getIsTestMode,j as jsonParse,a as getIsStagingMode,i as isCheckoutMobile}from"./handleFetch-99218189.js";import{u as updateCheckoutSessionAttributes}from"./updateCheckoutSessionAttributes-92f42882.js";import{_ as _getIsValidCartId,c as checkoutHiddenBtnSelector,a as checkoutHiddenInternationalBtnSelector,d as domesticRedirectedBtnSelector,g as getAbandonedCartRenewTokenValue}from"./CheckoutConfig-724d7bae.js";import{c as classes}from"./classes-0d95c529.js";import{c as createCustomEvent}from"./createCustomEvent-58159025.js";import{g as getBorderRadius}from"./getBorderRadius-87593ff4.js";import{i as isDarkColor}from"./isDarkColor-1f58b6be.js";import{s as styles}from"./styles-6fc2fad9.js";import{R as RemoveIcon}from"./RemoveIcon-9dc5dd1a.js";import"./VarianceTest-fef2d958.js";import"./debounce-c34d1270.js";var isStoreDiscountEnabled=function(){return __awaiter(void 0,void 0,void 0,(function(){var e,o,t;return __generator(this,(function(r){switch(r.label){case 0:return[4,handleFetch("/api/zonos-elements/get-store-discount-enabled-status")];case 1:e=r.sent(),o=e.errors,t=e.json;if(o.length||!(t===null||t===void 0?void 0:t.enabled)){return[2,{enabled:false}]}return[2,{enabled:true}]}}))}))};var selectVarianceTest=function(e){return __awaiter(void 0,[e],void 0,(function(e){var o,t,r,n;var s=e.testKeys;return __generator(this,(function(e){switch(e.label){case 0:if(s.length===0){return[2,null]}return[4,handleFetch("/api/zonos-elements/select-variance-test",{body:{testKeys:s},method:"POST"})];case 1:o=e.sent(),t=o.errors,r=o.json;if(t.length||!r){return[2,null]}n=filterValidTests(r);return[2,n]}}))}))};var buildCartUrl=function(e){var o=e.cartId,t=e.checkoutSessionId,r=e.customerAddress1,n=e.customerAddress2,s=e.customerCity,i=e.customerCountry,a=e.customerEmail,c=e.customerFirstName,u=e.customerLastName,d=e.customerPhone,l=e.customerState,h=e.customerZip,f=e.hostedCheckoutUrl,m=e.isTestMode,v=e.isVariantTest;var g=new URLSearchParams;g.set("tempCartUUID",o);if(c){g.set("customerFirstName",c)}if(u){g.set("customerLastName",u)}if(a){g.set("customerEmail",a)}if(d){g.set("customerPhone",d)}if(h){g.set("customerZip",h)}if(s){g.set("customerCity",s)}if(l){g.set("customerState",l)}if(i){g.set("zCountry",i)}if(r){g.set("customerAddress1",r)}if(n){g.set("customerAddress2",n)}if(m){g.set("zonosTestMode","1")}if(t){g.set("zonosCheckoutSessionId",t)}if(v){g.set("zonosVariantTest","1")}return"".concat(f,"?").concat(g.toString())};var isDisabledCountry=function(e){if(e===void 0){e=true}if(!localizationStore.localizationLoaded){return true}if(localizationStore.isDisabledCountry){if(e){log("Checkout: disabled country")}return true}return false};var isShippableCountry=function(e){if(e===void 0){e=true}if(!localizationStore.localizationLoaded){return false}if(!localizationStore.isShippableCountry){if(e){log("Checkout: not shippable country")}return false}return true};var watchBigcommerceDomesticCheckout=function(e){var o=e.domesticRedirectedBtnSelector,t=e.onShippingAddressSessionFound;if(!window.Zonos.isBigCommerce){return}var r=new MutationObserver((function(){return __awaiter(void 0,void 0,void 0,(function(){var e,n,s,i,a;return __generator(this,(function(c){e=document.querySelector(o);n=stripeStoreGetDomesticShippingSession();if(!e&&n){s=document.createElement("button");s.style.display="none";s.id="zonos--domestic-redirected-checkout-button";document.body.appendChild(s);t===null||t===void 0?void 0:t(n);r.disconnect();return[2]}i=document.querySelector('select[name="shippingAddress.countryCode"]');a=document.querySelector("#checkout-shipping-continue");if(!i||!a){return[2]}r.disconnect();a.addEventListener("click",(function(e){return __awaiter(void 0,void 0,void 0,(function(){var o,t,r,n,s,a,c;return __generator(this,(function(u){r=i.value;if(!r){return[2]}localizationStoreUpdateSelectedCountryCode(r);if(!isShippableCountry(false)){stripeStoreCleanupDomesticShippingSession();return[2]}n=document.querySelector("form");if(!n){return[2]}s=new FormData(n);a=document.querySelector("input#addressLine1Input");c={address1:(o=s.get("shippingAddress.address1"))!==null&&o!==void 0?o:a&&a.value,address2:s.get("shippingAddress.address2"),city:s.get("shippingAddress.city"),countryCode:s.get("shippingAddress.countryCode"),firstName:s.get("shippingAddress.firstName"),lastName:s.get("shippingAddress.lastName"),phone:s.get("shippingAddress.phone"),postalCode:s.get("shippingAddress.postalCode"),stateOrProvince:(t=s.get("shippingAddress.stateOrProvince"))!==null&&t!==void 0?t:s.get("shippingAddress.stateOrProvinceCode")};if(Object.values(c).some((function(e){return e===undefined||e===null}))){logError("One or more shipping address field is missing",Object.entries(c));void sendErrorLog({endpoint:"No endpoint, domestic checkout form missing fields",errors:["Bigcommerce: One or more shipping address field is missing in the domestic checkout form",JSON.stringify(Object.entries(c))],metadata:{storeId:zonosStore.storeId}});return[2]}stripeStoreSaveDomesticShippingSession({address1:c.address1,address2:c.address2,city:c.city,countryCode:c.countryCode,firstName:c.firstName,lastName:c.lastName,phone:c.phone,postalCode:c.postalCode,state:c.stateOrProvince});e.preventDefault();e.stopPropagation();window.location.href="/";return[2]}))}))}));return[2]}))}))}));r.observe(document.body,{childList:true,subtree:true})};var getLegacyQueryParams=function(){var e=new URLSearchParams(window.location.search);log("legacy urlParams","info",Object.fromEntries(e.entries()));var o=function(o){var t=e.get(o);if(!t||t==="undefined"){return""}return t};var t=getZCountryUrlParam(e)||localizationStore.selectedCountryCode||"US";var r=o("customerCity");var n=o("customerEmail");var s=o("customerAddress1");var i=o("customerAddress2");var a=o("customerName");var c=o("customerPhone");var u=o("customerZip");var d=o("customerState");var l=o("customerFirstName");var h=o("customerLastName");return{customerAddress1:s,customerAddress2:i,customerCity:r,customerCountry:t,customerEmail:n,customerFirstName:l,customerLastName:h,customerName:a,customerPhone:c,customerState:d,customerZip:u}};var numberOfFailures=0;var sendBulkLoadTimeApiLog=function(){return __awaiter(void 0,void 0,void 0,(function(){var e,o;var t;return __generator(this,(function(r){switch(r.label){case 0:if(window.Zonos.loadTimeApiInfoList.length===0){return[2]}log("Sending bulk load time api log","info",{loadTimeApiInfoList:window.Zonos.loadTimeApiInfoList});e={data:__spreadArray([],window.Zonos.loadTimeApiInfoList,true),storeId:window.Zonos.storeId||0};window.Zonos.loadTimeApiInfoList.length=0;return[4,handleFetch("/api/zonos-elements/log-bulk-load-data",{body:e,method:"POST"})];case 1:o=r.sent().errors;if(o.length){(t=window.Zonos.loadTimeApiInfoList).push.apply(t,e.data);numberOfFailures++;if(numberOfFailures>5&&window.Zonos.logIntervalId){clearInterval(window.Zonos.logIntervalId)}}return[2]}}))}))};var sendLoadCheckoutFacadeLog=function(){return __awaiter(void 0,void 0,void 0,(function(){var e,o;return __generator(this,(function(t){e=getElapsedTime().elapsedTime;o={cache:"miss",eventName:"jsdelivr",flag:"LOG_CHECKOUT_FACADE_LOAD",href:window.location.href,loadTime:e,metadata:Object.assign({allLogs:allLogs},getAdditionalLogMetadata()),scriptLoadUrl:"checkoutFacade",storeId:window.Zonos.storeId};void handleFetch("/api/zonos-elements/log-script-load",{body:o,method:"POST"});return[2]}))}))};var sendLoadNativeCheckoutLog=function(e){return __awaiter(void 0,[e],void 0,(function(e){var o;var t=e.loadTime;return __generator(this,(function(e){o={cache:"miss",eventName:"jsdelivr",flag:"LOG_NATIVE_CHECKOUT_LOAD",href:window.location.href,loadTime:t,metadata:Object.assign({allLogs:allLogs},getAdditionalLogMetadata()),scriptLoadUrl:"nativeCheckout",storeId:window.Zonos.storeId};void handleFetch("/api/zonos-elements/log-script-load",{body:o,method:"POST"});return[2]}))}))};var filterExpiredTests=function(e){return(e===null||e===void 0?void 0:e.filter((function(e){if(e.expiresAt&&e.expiresAt<Date.now()||!e.expiresAt){return false}return true})))||[]};var getSelectedTestVariant=function(e){var o;var t=(o=storageStore.enabledVariantTestKeys)===null||o===void 0?void 0:o.find((function(o){return o.testKey===e}));return(t===null||t===void 0?void 0:t.selectedVariantKey)||null};var isTestEnabled=function(e){return zonosStore.enabledVariantTestKeys.includes(e)};var mergeTest=function(e){var o=e.baseTestObj,t=e.mergeTestObj;return o.map((function(e){var o=e.testKey;var r=t.find((function(e){var t=e.testKey;return t===o}));return{expiresAt:(r===null||r===void 0?void 0:r.expiresAt)||Date.now()+VARIANT_TEST_KEY_EXPIRATION,selectedVariantKey:(r===null||r===void 0?void 0:r.selectedVariantKey)||null,testKey:o}}))};var getTempCartById=function(e){return __awaiter(void 0,[e],void 0,(function(e){var o,t,r,n,s;var i=e.cartId,a=e.retries;return __generator(this,(function(e){switch(e.label){case 0:o=getIsTestMode();return[4,handleFetch("/api/zonos-elements/get-temp-cart",{body:{isTestMode:o,options:{noOnlineStoreSettings:true},tempCartUUID:i},headers:{"Content-Type":"application/json"},method:"POST"})];case 1:t=e.sent(),r=t.errors,n=t.json;s=!n||r.length;if(!(s&&a))return[3,3];log("[ZONOS - loadZonos] temp cart not ready, retrying in 1 second","info",{retries:a});return[4,new Promise((function(e){return setTimeout(e,500)}))];case 2:e.sent();return[2,getTempCartById({cartId:i,retries:a-1})];case 3:if(s){return[2,null]}return[2,n]}}))}))};var setupCartData=function(e){return __awaiter(void 0,void 0,void 0,(function(){var o,t,r,n;return __generator(this,(function(s){switch(s.label){case 0:o=_getIsValidCartId(e),t=o.isDgsCartId,r=o.isLegacyCartId;if(!r&&!t){logError("[ZONOS - loadZonos] invalid cart id");return[2,null]}return[4,getTempCartById({cartId:e,retries:5})];case 1:n=s.sent();log("[ZONOS - loadZonos] getting temp cart data","info",n);if(!n){logError("[ZONOS - loadZonos] Error getting temp cart data, stop checkout process.");return[2,null]}window.Zonos.storeId=n.cartData.storeId;window.Zonos.zonosApiKey=n.cartData.credentialToken;return[2,{cartData:n.cartData,storeFavicon:n.storeFaviconUrl,storeId:n.cartData.storeId,storeLogo:n.storeLogoUrl,zonosApiKey:n.cartData.credentialToken}]}}))}))};var MessageIcon='<svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="https://www.w3.org/2000/svg">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M2.25 4.5C2.25 3.25736 3.25736 2.25 4.5 2.25H13.5C14.7426 2.25 15.75 3.25736 15.75 4.5V10.5C15.75 11.7426 14.7426 12.75 13.5 12.75H8.25C8.01393 12.75 7.79164 12.8611 7.65 13.05L6.3 14.85C5.87508 15.4166 5.2082 15.75 4.5 15.75C3.25736 15.75 2.25 14.7426 2.25 13.5V4.5ZM4.5 3.75C4.08579 3.75 3.75 4.08579 3.75 4.5V13.5C3.75 13.9142 4.08579 14.25 4.5 14.25C4.73607 14.25 4.95836 14.1389 5.1 13.95L6.45 12.15C6.87492 11.5834 7.5418 11.25 8.25 11.25H13.5C13.9142 11.25 14.25 10.9142 14.25 10.5V4.5C14.25 4.08579 13.9142 3.75 13.5 3.75H4.5ZM5.25 6C5.25 5.58579 5.58579 5.25 6 5.25H12C12.4142 5.25 12.75 5.58579 12.75 6C12.75 6.41421 12.4142 6.75 12 6.75H6C5.58579 6.75 5.25 6.41421 5.25 6ZM5.25 9C5.25 8.58579 5.58579 8.25 6 8.25H8.25C8.66421 8.25 9 8.58579 9 9C9 9.41421 8.66421 9.75 8.25 9.75H6C5.58579 9.75 5.25 9.41421 5.25 9Z" fill="#4D505A"/>\n</svg>\n';var zonosCheckoutCss=".sc-zonos-checkout-h{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-checkout-h *.sc-zonos-checkout{font-family:var(--zonos--font-family, Inter), Inter}.sc-zonos-checkout-h img.sc-zonos-checkout{max-width:100%}.sc-zonos-checkout-h dl.sc-zonos-checkout,.sc-zonos-checkout-h dd.sc-zonos-checkout,.sc-zonos-checkout-h h1.sc-zonos-checkout,.sc-zonos-checkout-h h2.sc-zonos-checkout,.sc-zonos-checkout-h h3.sc-zonos-checkout,.sc-zonos-checkout-h h4.sc-zonos-checkout,.sc-zonos-checkout-h h5.sc-zonos-checkout,.sc-zonos-checkout-h h6.sc-zonos-checkout,.sc-zonos-checkout-h hr.sc-zonos-checkout,.sc-zonos-checkout-h figure.sc-zonos-checkout,.sc-zonos-checkout-h p.sc-zonos-checkout,.sc-zonos-checkout-h pre.sc-zonos-checkout{margin:0}.sc-zonos-checkout-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-checkout-h{z-index:2147483647;position:fixed}.sc-zonos-checkout-h *.sc-zonos-checkout{-ms-scroll-chaining:none;overscroll-behavior:contain}.sc-zonos-checkout-h *.sc-zonos-checkout::-webkit-scrollbar{width:10px}.sc-zonos-checkout-h *.sc-zonos-checkout::-webkit-scrollbar-track{background:var(--zonos-elements-gray-50)}.sc-zonos-checkout-h *.sc-zonos-checkout::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}.sc-zonos-checkout-h *.sc-zonos-checkout::-webkit-scrollbar-thumb:hover{background:#d6d6d6}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout{display:-ms-flexbox;display:flex;height:100%;overflow:hidden;border-radius:var(--zonos--border-radius, var(--zonos-elements-radius-10))}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--left.sc-zonos-checkout,.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout{-ms-flex:1;flex:1;padding:32px}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--left.sc-zonos-checkout{background-color:var(--zonos--primary-color, var(--zonos-elements-gray-0));border-right:1px solid var(--zonos-elements-gray-200)}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout{background-color:var(--zonos-elements-gray-0)}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout{width:100%;max-height:100%;height:100%;overflow:auto;-ms-flex-direction:column;flex-direction:column;background-color:var(--zonos-elements-gray-0);-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;padding:24px;padding-bottom:50px}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout .zonos--header.sc-zonos-checkout{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:center;align-items:center;width:100%}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout .zonos--logo.sc-zonos-checkout{margin-bottom:0}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout zonos-checkout-finish.sc-zonos-checkout{-ms-flex:1;flex:1}.sc-zonos-checkout-h .zonos--left.sc-zonos-checkout{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;position:relative}.sc-zonos-checkout-h .zonos--left.sc-zonos-checkout .zonos--wrapper.sc-zonos-checkout{padding:0 8px 8px}.sc-zonos-checkout-h .zonos--left.sc-zonos-checkout .zonos--payment-error-banner.sc-zonos-checkout{margin-top:24px}.sc-zonos-checkout-h .zonos--right.sc-zonos-checkout{position:relative}.sc-zonos-checkout-h .zonos--right.sc-zonos-checkout .zonos--right-actions.sc-zonos-checkout{position:absolute;right:24px;top:24px;z-index:2;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.sc-zonos-checkout-h .zonos--wrapper.sc-zonos-checkout{overflow:auto;max-height:100%;position:relative}.sc-zonos-checkout-h .flex--wrapper.sc-zonos-checkout{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;max-height:100%}.sc-zonos-checkout-h .zonos--logo-wrapper.sc-zonos-checkout{display:-ms-flexbox;display:flex;gap:16px;-ms-flex-align:center;align-items:center}.sc-zonos-checkout-h .zonos--logo-wrapper.sc-zonos-checkout>*.sc-zonos-checkout{height:-webkit-fit-content;height:-moz-fit-content;height:fit-content}.sc-zonos-checkout-h .zonos--logo.sc-zonos-checkout{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.sc-zonos-checkout-h .zonos--logo.sc-zonos-checkout img.sc-zonos-checkout{max-height:72px}.sc-zonos-checkout-h .zonos--checkout-default-message.sc-zonos-checkout{margin-left:76px;margin-bottom:8px}.zonos--close-button.sc-zonos-checkout{-ms-flex-item-align:start;align-self:flex-start}.preview.sc-zonos-checkout-h{min-width:500px;margin:auto;position:relative}.preview.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout{border:var(--zonos-elements-border)}.preview.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout{padding:32px}.hidden-mode.sc-zonos-checkout-h{height:0;opacity:0;pointer-events:none;position:absolute;visibility:hidden;width:0;z-index:-1}.mobile.sc-zonos-checkout-h{min-width:auto}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;overflow:auto;border-radius:0;max-height:100%;height:100%;border:0}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--left.sc-zonos-checkout,.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout{padding:12px;padding-bottom:76px}@media (max-width: 768px){.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--left.sc-zonos-checkout,.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout{padding-bottom:0}}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--left.sc-zonos-checkout{-ms-flex-order:2;order:2;border-right:none}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout{-ms-flex-order:1;order:1;padding-top:16px}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout .zonos--wrapper.sc-zonos-checkout{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;border:var(--zonos-elements-border);border-radius:var(--zonos--border-radius, var(--zonos-elements-radius-10));background-color:var(--zonos-elements-gray-50);padding:12px;margin-top:32px}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout .zonos--review.sc-zonos-checkout{margin-bottom:0}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout .zonos--cart-items.sc-zonos-checkout{margin-top:8px}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout zonos-checkout-footer.sc-zonos-checkout{-ms-flex-order:3;order:3}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--wrapper.sc-zonos-checkout{max-height:100%}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--footer.sc-zonos-checkout{-ms-flex-order:3;order:3}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout{width:auto}.mobile.sc-zonos-checkout-h .zonos--cart-subtotal.sc-zonos-checkout{margin:0}.iframed.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout{-ms-scroll-chaining:chained;overscroll-behavior:auto}";var ZonosCheckoutStyle0=zonosCheckoutCss;var CHECKOUT_SESSION_TIMEOUT=90*60*1e3;var ORDER_DUPLICATION_NOTIFICATION_EXPIRATION=6*60*60*1e3;var ZonosCheckout=function(){function e(e){var o=this;registerInstance(this,e);this.onChangeLocaleListener=function(){};this.isRedirectAfterOrder=false;this.preview=false;this.hiddenMode=false;this.mobile=false;this.defaultAddress=[];this.forceDialogOpen=false;this.defaultAddressParams=[];this.defaultCustomerProfileAddress=[];this.customerProfile=null;this.open=this.forceDialogOpen;this.isOverlayLoading=false;this.stripe=window.Zonos.stripe;this.submitLoading=false;this.collapseReviewMobile=true;this.isAttachError=false;this.isMobile=false;this.isIframed=false;this.isLegacyCheckout=window.Zonos.isLegacyCheckout;this.confirmDialogOpen=false;this.isCartExpired=false;this.payInUsdConfirmDialogOpen=false;this.inventoryCheckErrorMessage=null;this.placedOrderInfo=null;this.clientSecret=stripeStore.clientSecret;this.stripeCustomerSessionClientSecret=stripeStore.stripeCustomerSessionClientSecret;this.applyStripeTheme=function(){return __awaiter(o,void 0,void 0,(function(){var e,o,t,r,n;return __generator(this,(function(s){switch(s.label){case 0:n=((e=this.appearanceSettingsOverride)===null||e===void 0?void 0:e.theme)||zonosStore.appearance.theme;return[4,initStripeElements({overrideBorderRadius:(o=this.appearanceSettingsOverride)===null||o===void 0?void 0:o.style,overridePrimaryColor:(t=this.appearanceSettingsOverride)===null||t===void 0?void 0:t.colorPrimary,overrideSecondaryColor:(r=this.appearanceSettingsOverride)===null||r===void 0?void 0:r.colorSecondary,overrideTheme:this.isMobile?n:undefined,paypalEnabled:paypalStoreHasPaypalEnabled()})];case 1:s.sent();return[2]}}))}))};this.checkStripePaymentIntentStatus=function(e){return __awaiter(o,[e],void 0,(function(e){var o,t,r,n,s,i,a,c,u;var d=e.triggeredButton;return __generator(this,(function(e){switch(e.label){case 0:o=d===null||d===void 0?void 0:d.matches("#".concat(checkoutHiddenBtnSelector));t=!!window.Zonos.cartData;r=new URL(window.location.href).searchParams;n=r.get("payment_intent_client_secret");s=r.get("zonosCheckoutSessionId");if(!o){log("Checkout is triggered by user, no need to check stripe payment intent status");return[2,{shouldAllowOrder:true}]}log("Payment intent exist, checking stripe payment intent status");if(!n){log("No stripe client secret found in the URL, proceed to order if cart data is available");return[2,{shouldAllowOrder:t}]}return[4,stripeStoreRetrievePayment({clientSecret:n})];case 1:i=e.sent(),a=i.error,c=i.status;u=new URLSearchParams(window.location.search).get("redirect_status");if(u){if(!a){log("Payment intent is succeeded or in a good state to move forward, show success screen")}else{log("Payment intent failed, show status from error")}this.open=true;storageStore.checkoutSessionId=s;stripeStore.clientSecret=n;void this.setToFinishStep(c);return[2,{shouldAllowOrder:false}]}if(!t){log("Cart data is not available, only check payment intent status, skip order.");return[2,{shouldAllowOrder:false}]}log("Payment intent is not succeeded, proceed to order");return[2,{shouldAllowOrder:true}]}}))}))};this.initializeTestKeys=function(){storageStore.enabledVariantTestKeys=filterExpiredTests(storageStore.enabledVariantTestKeys||[]);var e=zonosStore.enabledVariantTestKeys.map((function(e){var o;var t=(o=storageStore.enabledVariantTestKeys)===null||o===void 0?void 0:o.find((function(o){var t=o.testKey;return t===e}));return{expiresAt:(t===null||t===void 0?void 0:t.expiresAt)||Date.now()+VARIANT_TEST_KEY_EXPIRATION,selectedVariantKey:(t===null||t===void 0?void 0:t.selectedVariantKey)||null,testKey:e}}));storageStoreSetEnabledVariantTestKeys(e);return{allSelected:false}};this.shouldAllowHostedVsNativeTest=function(){if(typeof zonosStore.checkoutSettings.createCartId!=="function"){return false}var e=zonosStore.enabledVariantTestKeys.includes("hosted_vs_native");if(!e){return false}return true};this.registerTestHostedVsNative=function(){return __awaiter(o,void 0,void 0,(function(){var e,o,t,r;return __generator(this,(function(n){switch(n.label){case 0:e=this.shouldAllowHostedVsNativeTest();if(!e){return[2]}log("[TEST] - Registering hosted vs native test");o=getSelectedTestVariant("hosted_vs_native");if(o){log("[TEST] - Hosted vs native test already has variant selected: ".concat(o));return[2]}return[4,selectVarianceTest({testKeys:["hosted_vs_native"]})];case 1:t=n.sent();if(!t){log("[TEST] - Failed to get selection for hosted vs native test");return[2]}r=mergeTest({baseTestObj:storageStore.enabledVariantTestKeys||[],mergeTestObj:t});storageStoreSetEnabledVariantTestKeys(r);return[2]}}))}))};this.handleHostedVsNative=function(){return __awaiter(o,void 0,void 0,(function(){var e,o,t,r,n,s,i,a;return __generator(this,(function(c){switch(c.label){case 0:o=this.shouldAllowHostedVsNativeTest();if(!o){return[2,{redirected:false}]}t=getSelectedTestVariant("hosted_vs_native");log("[TEST] - hosted_vs_native: ".concat(t));if(typeof zonosStore.checkoutSettings.createCartId!=="function"){log("[TEST] - createCartId is not provided, skipping hosted vs native test");return[2,{redirected:false}]}if(t!=="hosted"){log("[TEST] - Hosted vs native test is enabled for native, skipping");return[2,{redirected:false}]}if(!((e=zonosStore.genericSettings)===null||e===void 0?void 0:e.hostedCheckoutUrl)){log("[TEST] - Hosted checkout URL is not provided");return[2,{redirected:false}]}log('"createCartId" is provided, start building cart');return[4,zonosStore.checkoutSettings.createCartId()];case 1:r=c.sent();s=null;if(typeof r==="object"){n=r.cartId;s=r.shippingData||null}else{n=r}i=getLegacyQueryParams();a=buildCartUrl(Object.assign(Object.assign({cartId:n,checkoutSessionId:storageStore.checkoutSessionId||undefined,hostedCheckoutUrl:zonosStore.genericSettings.hostedCheckoutUrl,isTestMode:getIsTestMode(),isVariantTest:true},i),s));log("[TEST] - Redirecting to: ".concat(a));window.open(a,"_blank");return[2,{redirected:true}]}}))}))};this.formatDate=function(e){if(!e){return""}var o=new Date(e);return o.toLocaleDateString()};this.formatTime=function(e){if(!e){return""}var o=new Date(e);return o.toLocaleTimeString()};this.getCurrentLocalePageEnum=function(){switch(cartStore.step){case"customer-info":return"checkout_customer_info";case"shipping":return"checkout_shipping_info";case"payment":return"checkout_payment_info";default:return null}};this.getBaseCurrencySettlementInfo=function(){var e=cartStore.selectedLandedCost;if(!e){return null}var o=e.landedCost.amountSubtotals;if(!o){return null}var t=(o.discounts||0)+o.items+o.landedCostTotal+o.shipping;return{settlementAmount:t}};this.getDefaultAddress=function(){if(o.defaultCustomerProfileAddress.length){return o.defaultCustomerProfileAddress}if(Array.isArray(o.defaultAddress)&&o.defaultAddress.length){return o.defaultAddress}if(!Array.isArray(o.defaultAddress)&&typeof o.defaultAddress==="object"){return[o.defaultAddress]}return o.defaultAddressParams};this.handleHostedOpenWindowCallback=function(e){var o;var t=(o=zonosStore.genericSettings)===null||o===void 0?void 0:o.hostedCheckoutUrl;if(!origin){return}var r=["dev.checkout.elements.zonos.com"].some((function(o){return e.origin.includes(o)}));if(e.origin!==t&&!r){return}switch(e.data.type){case"zonos-checkout-session-update":storageStore.checkoutSessionId=e.data.checkoutSessionId;break}};this.captureParamsRedirectedForVariantTest=function(){var e=new URL(window.location.href);var o=e.searchParams.get("zonosVariantTest")==="1";if(!o){return}var t=e.searchParams.get("zonosCheckoutSessionId");if(t){storageStore.checkoutSessionId=t}var r=storageStore.enabledVariantTestKeys||[];if(window.Zonos.isLegacyCheckout){var n=getSelectedTestVariant("hosted_vs_native");if(!n){r.push({expiresAt:Date.now()+VARIANT_TEST_KEY_EXPIRATION,selectedVariantKey:"hosted",testKey:"hosted_vs_native"});storageStoreSetEnabledVariantTestKeys(r)}else{storageStoreSetEnabledVariantTestKeys(r.map((function(e){if(e.testKey==="hosted_vs_native"){return Object.assign(Object.assign({},e),{selectedVariantKey:"hosted"})}return e})))}}e.searchParams.delete("zonosCheckoutSessionId");e.searchParams.delete("zonosVariantTest");window.history.replaceState({},"",e.toString())}}e.prototype.initCartInfoHandler=function(e){return __awaiter(this,void 0,void 0,(function(){var o;return __generator(this,(function(t){o=e.detail;void cartStoreUpdateItems({adjustments:cartStore.adjustments,cartItems:o});return[2]}))}))};e.prototype.handleKeyPress=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(o){if(e.key==="Escape"){void this.closeDialogHandler()}return[2]}))}))};e.prototype.closeDialogHandler=function(e){return __awaiter(this,void 0,void 0,(function(){var o,t;return __generator(this,(function(r){if(!this.open){return[2]}if(!(e===null||e===void 0?void 0:e.confirmed)){this.confirmDialogOpen=true;return[2]}this.confirmDialogOpen=false;submitGtag("zonos-checkout-close");this.open=this.forceDialogOpen||false;if(!this.preview&&cartStore.step==="finish"){cartStoreReset()}cartStore.step="customer-info";cartStoreResetTabItems();cartStoreClearCheckoutInterval();(t=(o=zonosStore.checkoutSettings).onClose)===null||t===void 0?void 0:t.call(o);return[2]}))}))};e.prototype.buildCartAndInit=function(){return __awaiter(this,void 0,void 0,(function(){var e,o,t,r,n,s,i,a,s,i,i,c,u,s,d;return __generator(this,(function(l){switch(l.label){case 0:if(!(typeof zonosStore.checkoutSettings.createCartId==="function"))return[3,4];log('"createCartId" is provided, start building cart');return[4,zonosStore.checkoutSettings.createCartId()];case 1:e=l.sent();o=void 0;if(typeof e==="object"){log("object detected, use cartId and prefill address from createCartId","info",e);o=e.cartId;this.useShippingDataFromCreateCartId(e.shippingData);cartStore.customerAuthenticationToken=e.customerAuthenticationToken||null}else{o=e}window.Zonos.cartId=o;return[4,setupCartData(o)];case 2:t=l.sent();r=t===null||t===void 0?void 0:t.cartData;if(!r){logError("Failed to build cart, please try again.");return[2,false]}window.Zonos.cartData=r;n=buildCartItemsByTempCart(r),s=n.adjustments,i=n.cartItems;return[4,cartStoreUpdateItems({adjustments:s,cartItems:i})];case 3:l.sent();return[3,9];case 4:if(!window.Zonos.cartData)return[3,6];log("tempCartUUID is provided, start building cart");a=buildCartItemsByTempCart(window.Zonos.cartData),s=a.adjustments,i=a.cartItems;return[4,cartStoreUpdateItems({adjustments:s,cartItems:i})];case 5:l.sent();return[3,9];case 6:if(!(zonosStore.checkoutSettings.buildCartDetail&&localizationStore.selectedCountryCode))return[3,9];log("build cart detail");return[4,zonosStore.checkoutSettings.buildCartDetail({countryCode:localizationStore.selectedCountryCode,currencyCode:localizationStore.targetCurrency})];case 7:i=l.sent();c=i.filter((function(e){return e.amount>=0}));u=i.filter((function(e){return e.amount<0}));log("cartItems","info",{cartItems:i});s=u.map((function(e){return{amount:e.amount,currencyCode:e.currencyCode,description:e.name||e.description||"",productId:e.productId||null,sku:e.sku||null,type:"CART_TOTAL"}}));return[4,cartStoreUpdateItems({adjustments:s,cartItems:c})];case 8:l.sent();l.label=9;case 9:if(!!storageStore.checkoutSessionId)return[3,11];return[4,stripeStoreInitCheckoutSession()];case 10:d=l.sent();log("stripeStoreInitCheckoutSession: ".concat(d));if(!d){return[2,false]}l.label=11;case 11:if(!cartStore.isStagingMode){void stripeStoreGetPaymentIntent()}return[4,this.applyStripeTheme()];case 12:l.sent();this.isRedirectAfterOrder=zonosStore.checkoutSettings.successBehavior==="REDIRECT_TO_SUCCESS_PAGE"||!!cartStore.externalConfirmationPageURL;return[2,true]}}))}))};e.prototype.reloadCheckoutSession=function(){window.location.reload()};e.prototype.handleOrderDuplication=function(){var e=jsonParse(localStorage.getItem("zonos--placed-order-info"));if(!e){localStorage.removeItem("zonos--placed-order-info");return}var o=Date.now()-e.time;log("=== Existing placed order info: ".concat(e.orderId," - ").concat(this.formatDate(e.time)," - elapsed in hh:ss format: ").concat(new Date(o).toISOString().substring(11,8)),"warn");var t=parseFloat(new URLSearchParams(window.location.search).get("zonosOverrideExpiredDuplication")||"0")||ORDER_DUPLICATION_NOTIFICATION_EXPIRATION;if(o>t){log("=== Existing placed order info is older than ".concat(t,"ms, cleaning localStorage"),"warn");localStorage.removeItem("zonos--placed-order-info");return}this.placedOrderInfo=e;log("=== Showing order duplication confirmation","warn")};e.prototype.recordCheckoutInfo=function(){if(!storageStore.checkoutSessionId){return}void updateCheckoutSessionAttributes({attributes:[{key:"APP_VERSION",value:window.Zonos.version},{key:"APP_VERSION_NPM_INTEGRATION",value:window.Zonos.isNpm?"1":"0"},{key:"LEGACY_CHECKOUT_FACADE",value:window.Zonos.isLegacyCheckout?"1":"0"}],checkoutSessionId:storageStore.checkoutSessionId})};e.prototype.confirmProceedWithOrderDuplication=function(){this.placedOrderInfo=null;if(!storageStore.checkoutSessionId){return}void updateCheckoutSessionAttributes({attributes:[{key:"ORDER_DUPLICATION_CONSENT",value:"1"}],checkoutSessionId:storageStore.checkoutSessionId})};e.prototype.markTheSessionAsAbandonedCart=function(){if(!storageStore.checkoutSessionId){return}void updateCheckoutSessionAttributes({attributes:[{key:"WITH_ABANDONED_CART_TOKEN",value:"1"}],checkoutSessionId:storageStore.checkoutSessionId})};e.prototype.handleCancelOrderDuplication=function(){var e;this.placedOrderInfo=null;if(this.isLegacyCheckout){var o=((e=window.Zonos.cartData)===null||e===void 0?void 0:e.storeBaseUrl)||zonosStore.onlineStoreSettings.url;if(!o){return}if(window.parent){window.parent.location.href=o}window.location.href=o;return}void this.closeDialogHandler({confirmed:true})};e.prototype.attachCheckout=function(){var e=this;var o=zonosStore.checkoutSettings.placeOrderButtonSelector;var t=zonosStore.checkoutSettings.alwaysTriggerInternationalCheckoutSelector;log("attach checkout ".concat(o));log("attach checkout to always trigger international checkout selector: ".concat(t));if(!o&&!t&&!window.Zonos.cartData){return}var r=[o,t,"#".concat(domesticRedirectedBtnSelector),"#".concat(checkoutHiddenBtnSelector),"#".concat(checkoutHiddenInternationalBtnSelector)].filter(Boolean);var n=document.querySelectorAll(r.join(","));n.forEach((function(r){var n=r.getAttribute("data-zonos-checkout-attached");if(n){return}log("attached event to button ".concat(o),"info",{button:r});r.addEventListener("click",(function(o){return __awaiter(e,void 0,void 0,(function(){var e,n,s,i,a,c,u,d,l,h,f,m,v,g,p,z;return __generator(this,(function(S){switch(S.label){case 0:s=performance.now();i=t&&r.matches(t);a=r.matches("#".concat(checkoutHiddenInternationalBtnSelector));c=r.matches("#".concat(domesticRedirectedBtnSelector))||r.matches("#".concat(checkoutHiddenBtnSelector));if(!window.Zonos.isLegacyCheckout&&(!isShippableCountry()||isDisabledCountry())&&!i&&!a&&!c){return[2]}o.preventDefault();o.stopPropagation();log("zonos checkout button clicked");return[4,this.checkStripePaymentIntentStatus({triggeredButton:o.target})];case 1:u=S.sent().shouldAllowOrder;if(!u){return[2]}if(!window.Zonos.logIntervalId){window.Zonos.logIntervalId=setInterval((function(){void sendBulkLoadTimeApiLog()}),2e3)}if(!isTestEnabled("hosted_vs_native"))return[3,4];this.isOverlayLoading=true;return[4,this.registerTestHostedVsNative()];case 2:S.sent();return[4,this.handleHostedVsNative()];case 3:d=S.sent().redirected;this.isOverlayLoading=false;if(d){return[2]}S.label=4;case 4:stripeStore.isFetchingSession=true;this.open=true;S.label=5;case 5:S.trys.push([5,8,,9]);return[4,this.buildCartAndInit()];case 6:l=S.sent();if(!l){throw new Error("Error building cart")}(e=window.opener)===null||e===void 0?void 0:e.postMessage({checkoutSessionId:storageStore.checkoutSessionId,type:"zonos-checkout-session-update"},"*");cartStoreStartCheckoutInterval({isPreview:this.preview,sessionTimeout:CHECKOUT_SESSION_TIMEOUT});submitGtag("zonos-checkout-start");h=storageStore.checkoutSessionId;void trackConversionEvent({checkoutSessionId:h,eventName:"checkout_open"});return[4,isStoreDiscountEnabled()];case 7:f=S.sent().enabled;cartStore.shouldHideDiscountInput=!f;this.handleOrderDuplication();if(window.Zonos.isLegacyCheckout){void sendLoadCheckoutFacadeLog()}else{m=performance.now();v=m-s;void sendLoadNativeCheckoutLog({loadTime:v})}this.recordCheckoutInfo();g=!!getAbandonedCartRenewTokenValue();if(g){this.markTheSessionAsAbandonedCart()}return[3,9];case 8:p=S.sent();if(p instanceof Error){z=p.message;if(z==="Cart is expired."){this.isCartExpired=true}}stripeStore.isFetchingSession=false;logError(p);if(this.isCartExpired){stripeStore.isFetchingSession=true;return[2]}void sendErrorLog({endpoint:"Error creating Checkout",errors:[p instanceof Error?p.toString():"Unknown error"],metadata:{allLogs:allLogs,cartId:window.Zonos.cartId,checkoutSessionBody:getCheckoutSessionBody(),href:window.location.href,storeBaseUrl:((n=window.Zonos.cartData)===null||n===void 0?void 0:n.storeBaseUrl)||zonosStore.onlineStoreSettings.url}});cartStoreUpdateToErrorState({messages:[translate("There's been an error creating your checkout session. Please reload and try again or contact support if the error persists")],title:translate("Error creating Checkout")});return[3,9];case 9:return[2]}}))}))}),{capture:true,passive:false});if(!zonosStore.checkoutSettings.disablePlaceOrderButtonActivation){r.removeAttribute("disabled")}r.setAttribute("data-zonos-checkout-attached","true");if(r.matches("#".concat(domesticRedirectedBtnSelector))){r.dispatchEvent(createCustomEvent("click"));stripeStoreCleanupDomesticShippingSession();r.remove()}if(r.matches("#".concat(checkoutHiddenBtnSelector))){r.dispatchEvent(createCustomEvent("click"));r.remove()}}))};e.prototype.appearanceSettingsOverrideChanged=function(){if(!this.appearanceSettingsOverride){return}void this.applyStripeTheme()};e.prototype.useShippingDataFromCreateCartId=function(e){if(!e){return}log("shipping data from createCartId result","info",Object.entries(e));var o=e.customerAddress1,t=e.customerAddress2,r=e.customerCity,n=e.customerCountry,s=e.customerEmail,i=e.customerFirstName,a=e.customerLastName,c=e.customerName,u=e.customerPhone,d=e.customerState,l=e.customerZip;var h=new URLSearchParams(window.location.search);var f=n||getZCountryUrlParam(h)||localizationStore.selectedCountryCode;this.applyPrefillAddress({customerAddress1:o,customerAddress2:t,customerCity:r,customerCountry:f,customerEmail:s,customerFirstName:i,customerLastName:a,customerName:c,customerPhone:u,customerState:d,customerZip:l})};e.prototype.useLegacyQueryParams=function(){var e=new URLSearchParams(window.location.search);log("legacy urlParams","info",Object.fromEntries(e.entries()));var o=function(o){var t=e.get(o);if(!t||t==="undefined"){return null}return t};var t=getZCountryUrlParam(e)||localizationStore.selectedCountryCode;var r=o("customerCity");var n=o("customerEmail");var s=o("customerAddress1");var i=o("customerAddress2");var a=o("customerName");var c=o("customerFirstName");var u=o("customerLastName");var d=o("customerPhone");var l=o("customerZip");var h=o("customerState");this.applyPrefillAddress({customerAddress1:s,customerAddress2:i,customerCity:r,customerCountry:t,customerEmail:n,customerFirstName:c,customerLastName:u,customerName:a,customerPhone:d,customerState:h,customerZip:l})};e.prototype.applyPrefillAddress=function(e){var o=e.customerAddress1||"";var t=e.customerCountry||"";var r=e.customerAddress2||"";var n=e.customerCity||"";var s=e.customerEmail||"";var i=e.customerFirstName&&e.customerLastName?"".concat(e.customerFirstName," ").concat(e.customerLastName):e.customerName||"";var a=e.customerPhone||"";var c=e.customerZip||"";var u=e.customerState||"";if(!o||!i||!a||!t){log("Missing required query params so it can not be prefilled","info",[!o&&"line1",!i&&"name",!a&&"phone",!t&&"country"].filter(Boolean).join(", "));return}if(t&&localizationStore.shippingZoneCountries&&!(t in localizationStore.shippingZoneCountries)){log('Country "'.concat(t,'" is not in the shipping zone, so it can not be prefilled'),"warn");return}this.defaultAddressParams=[{address:{city:n||"",country:t,line1:o,line2:r,postal_code:c,state:u},email:s,name:i,phone:a}];log("Prefill address applied","info",{prefillAddress:this.defaultAddressParams,providedAddress:e})};e.prototype.overrideStagingModeChanged=function(){cartStore.isStagingMode=!!this.overrideStagingMode};e.prototype.init=function(){return __awaiter(this,void 0,void 0,(function(){var e;var o=this;return __generator(this,(function(t){stripeStore.stripe=window.Zonos.stripe;this.stripe=window.Zonos.stripe;cartStore.isStagingMode=getIsStagingMode();if(typeof this.overrideStagingMode!=="undefined"){cartStore.isStagingMode=this.overrideStagingMode}watchBigcommerceDomesticCheckout({domesticRedirectedBtnSelector:domesticRedirectedBtnSelector,onShippingAddressSessionFound:function(e){o.defaultAddress=[{address:{city:e.city,country:e.countryCode,line1:e.address1,line2:e.address2,postal_code:e.postalCode,state:e.state},email:"",name:"".concat(e.firstName," ").concat(e.lastName),phone:e.phone}]}});if(window.Zonos){this.useLegacyQueryParams()}e=setInterval((function(){stripeStore.stripe=window.Zonos.stripe;o.stripe=window.Zonos.stripe;if(!o.stripe){log("waiting for stripe to be loaded");return}if(o.storybookPaymentStatusOverride){clearInterval(e);return}log("init checkout");if(o.preview||o.forceDialogOpen){void o.buildCartAndInit()}else if(window.Zonos.isLegacyCheckout){o.attachCheckout()}else if(window){o.attachCheckout();var t=new MutationObserver((function(){o.attachCheckout()}));t.observe(document.body,{childList:true,subtree:true})}clearInterval(e)}),50);setTimeout((function(){clearInterval(e)}),1e4);return[2]}))}))};e.prototype.setToFinishStep=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(o){cartStore.step="finish";this.storybookPaymentStatusOverride=e;return[2]}))}))};e.prototype.mockCheckoutSession=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(o){cartStoreSetCheckoutSession(e);return[2]}))}))};e.prototype.triggerCheckoutInternational=function(){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(o){e=document.querySelector("#".concat(checkoutHiddenInternationalBtnSelector));if(e){e.dispatchEvent(createCustomEvent("click"))}return[2]}))}))};e.prototype.handleCustomerInfoContinue=function(){return __awaiter(this,void 0,void 0,(function(){var e,o,t,r,n,s,i,a;var c=this;return __generator(this,(function(u){switch(u.label){case 0:submitGtag("zonos-checkout-customer-info");n=storageStore.checkoutSessionId;void trackConversionEvent({checkoutSessionId:n,eventName:"checkout_customerInfoCompleted"});this.submitLoading=true;return[4,stripeStorePrefetchLandedCost()];case 1:s=u.sent().isRequestNotReady;if(s&&cartStore.addressFormRenderType==="stripe"){void sendErrorLog({endpoint:"ADDRESS_NOT_READY_AT_CUSTOMER_INFO_CONTINUE",errors:["Address not ready at customer info continue"],metadata:{address:(o=(e=stripeStore.stripeAddressEventData)===null||e===void 0?void 0:e.value)===null||o===void 0?void 0:o.address,billingAddress:(r=(t=stripeStore.stripeBillingAddressEventData)===null||t===void 0?void 0:t.value)===null||r===void 0?void 0:r.address,cartId:window.Zonos.cartId}})}i=function(e){if(cartStore.step!=="customer-info"){clearInterval(e);return}if(!stripeStore.isFetchingLandedCost){if(cartStore.landedCostData){void paypalInitScript({currency:cartStore.currency});cartStoreNextStep()}c.submitLoading=false;if(e){clearInterval(e)}}};i();a=setInterval((function(){i(a)}),20);setTimeout((function(){clearInterval(a)}),1e4);return[2]}}))}))};e.prototype.handleShippingContinue=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){cartStoreNextStep();return[2]}))}))};e.prototype.handleInventoryCheckDialogConfirm=function(){cartStore.inventoryCheckErrorMessage=null;if(!this.isLegacyCheckout){void this.closeDialogHandler({confirmed:true})}};e.prototype.handleCartExpiredDialogConfirm=function(){var e;this.isCartExpired=false;if(this.isLegacyCheckout){var o=(e=window.Zonos.cartData)===null||e===void 0?void 0:e.storeBaseUrl;if(!o){return}if(window.parent){window.parent.location.href=o}window.location.href=o;return}if(window.parent){window.parent.location.href=window.location.href}window.location.reload()};e.prototype.handleStripePaymentContinue=function(){return __awaiter(this,void 0,void 0,(function(){var e,o,t,r,n;return __generator(this,(function(s){switch(s.label){case 0:e=stripeStore.checkoutSettlementCurrency==="USD";if(e&&stripeStore.shouldRenderPayInUsdButton&&!this.payInUsdConfirmDialogOpen){this.payInUsdConfirmDialogOpen=true;return[2]}this.payInUsdConfirmDialogOpen=false;paypalStore.paypalErrorMessage=null;stripeStore.hasPaymentError=false;this.submitLoading=true;cartStore.inventoryCheckErrorMessage=null;return[4,stripeStoreUpdateCheckoutSessionBaseCurrency()];case 1:o=s.sent();if(!o){stripeStore.hasPaymentError=true;stripeStore.customErrorMessage=translate("Unable to complete payment in [currency]. Please try again or select a different currency. If the issue persists, contact our support team for assistance.",{currency:stripeStore.checkoutSettlementCurrency});this.submitLoading=false;return[2]}s.label=2;case 2:s.trys.push([2,4,,5]);t=cartStore;return[4,stripeStoreHandleInventoryCheck()];case 3:t.inventoryCheckErrorMessage=s.sent();return[3,5];case 4:r=s.sent();cartStore.inventoryCheckErrorMessage=translate("Unable to check inventory. Please try again.");return[3,5];case 5:if(cartStore.inventoryCheckErrorMessage){this.submitLoading=false;return[2]}s.label=6;case 6:s.trys.push([6,8,,9]);return[4,stripeStoreConfirmPayment()];case 7:s.sent();cartStoreNextStep();cartStoreClearCheckoutInterval();return[3,9];case 8:n=s.sent();logError(n);submitGtag("zonos-checkout-payment-fail");stripeStore.hasPaymentError=true;if(stripeStore.shouldInventoryRefund){void stripeStoreHandleInventoryRefund();stripeStore.shouldInventoryRefund=false}return[3,9];case 9:this.submitLoading=false;return[2]}}))}))};e.prototype.handleFinishClick=function(){return __awaiter(this,void 0,void 0,(function(){var e,o,t,r;return __generator(this,(function(n){switch(n.label){case 0:stripeStoreReset();if(!this.preview)return[3,2];cartStore.step="customer-info";return[4,this.init()];case 1:n.sent();return[2];case 2:cartStoreReset();if(window.Zonos.isLegacyCheckout&&window.Zonos.cartData){e=window.Zonos.cartData.storeBaseUrl||zonosStore.onlineStoreSettings.url;if(window.parent){window.parent.location.href=e}window.location.href=e;return[2]}o=window.location.href;t=o.split("?")[0];this.open=false;r=window.location.hostname.includes("dashboard.zonos.com");if(!r){window.history.replaceState(window.history.state,document.title,t);window.location.reload()}return[2]}}))}))};e.prototype.handleWindowResize=function(){this.isMobile=isCheckoutMobile(this.mobile);void this.applyStripeTheme();log("mobile: ".concat(this.isMobile))};e.prototype.handleMobileChange=function(){this.isMobile=isCheckoutMobile(this.mobile);void this.applyStripeTheme();log("mobile: ".concat(this.isMobile))};e.prototype.handleAppearanceSettingsOverrideChange=function(){var e;if((e=this.appearanceSettingsOverride)===null||e===void 0?void 0:e.theme){this.appearanceSettingsOverride.theme=getZonosStoreTheme(this.appearanceSettingsOverride.theme)}};e.prototype.handleAddressChange=function(){stripeStoreReset()};e.prototype.handleCustomerProfileChange=function(){var e,o;if(!this.customerProfile){log("No customer profile","info");this.defaultCustomerProfileAddress=[];return}log("Customer profile found","info",{customerProfile:this.customerProfile});this.defaultCustomerProfileAddress=((o=(e=stripeStore.customerProfile)===null||e===void 0?void 0:e.locations)===null||o===void 0?void 0:o.map((function(e){var o;return{address:{city:e.locality,country:e.countryCode,line1:e.line1,line2:e.line2||"",postal_code:e.postalCode,state:e.administrativeArea},email:e.email||((o=stripeStore.customerProfile)===null||o===void 0?void 0:o.email)||"",name:e.name||"",phone:e.phone||""}})))||[]};e.prototype.handleClientSecretChange=function(){log("==== Client secret changed","info",{clientSecret:this.clientSecret,stripeCustomerSessionClientSecret:this.stripeCustomerSessionClientSecret});void this.applyStripeTheme()};e.prototype.handleOpenChange=function(){var e="data-zonos-overflow-origin";var o=document.body;var t=document.documentElement;if(this.open){window.Zonos.openHelloDialog(false);if(o.style.overflow){o.setAttribute(e,o.style.overflow)}o.style.overflow="hidden";if(t.style.overflow){t.setAttribute(e,t.style.overflow)}t.style.overflow="hidden"}else{this.stripeCustomerSessionClientSecret=null;var r=o.getAttribute(e);var n=t.getAttribute(e);if(r){o.removeAttribute(e);o.style.overflow=r}else{o.style.removeProperty("overflow")}if(n){t.removeAttribute(e);t.style.overflow=n}else{t.style.removeProperty("overflow")}}};e.prototype.componentWillLoad=function(){var e=this;void this.init();this.isMobile=isCheckoutMobile(this.mobile);this.isIframed=window.self!==window.top;log("iframed: ".concat(this.isIframed));if(window.Zonos.isLegacyCheckout){this.captureParamsRedirectedForVariantTest()}this.handleAppearanceSettingsOverrideChange();this.onChangeLocaleListener=localizationStoreOnChange("selectedLocale",(function(){void e.applyStripeTheme()}));this.initializeTestKeys();window.addEventListener("message",this.handleHostedOpenWindowCallback);log("mobile: ".concat(this.isMobile))};e.prototype.disconnectedCallback=function(){stripeStoreReset();cartStoreReset();this.onChangeLocaleListener();window.removeEventListener("message",this.handleHostedOpenWindowCallback)};e.prototype.render=function(){var e=this;var o,t,r,n;this.customerProfile=stripeStore.customerProfile;this.clientSecret=stripeStore.clientSecret;if(stripeStore.stripeCustomerSessionClientSecret){this.stripeCustomerSessionClientSecret=stripeStore.stripeCustomerSessionClientSecret}var s=cartStore.step!=="finish"&&cartStore.step!=="error"&&!stripeStore.stripeElements||stripeStore.isFetchingSession;var i=mergeConfig(zonosStore.appearance,this.appearanceSettingsOverride||null),a=i.colorPrimary,c=i.colorSecondary,u=i.logoUrl,d=i.style;var l=zonosStore.appearance.zonosAttribution==="ENABLED";var f=zonosStore.appearance.theme;var m=a&&isDarkColor(a)?"DARK":"LIGHT";var v=this.isMobile?f:m;var g=!this.isMobile?c:undefined;var p=localizationStore.customMessages;var z=(o=p.find((function(e){return e.pageName==="checkout_default"})))===null||o===void 0?void 0:o.message;var S=this.getCurrentLocalePageEnum();var k=p.filter((function(e){return e.pageName===S}));var w=this.getBaseCurrencySettlementInfo();var C=function(){var o=e.preview?"".concat(u,"?timestamp=").concat(Date.now()):u;return h("div",{class:"zonos--logo"},o&&h("img",{alt:"".concat(zonosStore.organizationName," logo"),src:o}))};var b=getIsTestMode();var y=function(){var o=new URLSearchParams(window.location.search);var t=o.get("zonosQaUrl");var r=o.get("zonosDebug");var n=o.get("zonosE2ETest");var s=e.overrideStagingMode||getIsStagingMode();return h("zonos-v-stack",null,h("div",{class:"zonos--logo-wrapper"},C(),b&&h("zonos-badge",{badgeColor:"orange",size:"small"},translate("Test mode")),s&&h("zonos-badge",{badgeColor:"red",size:"small"},translate("Staging mode")),r==="1"&&h("zonos-badge",{badgeColor:"cyan",size:"small"},"debug"),t&&h("zonos-badge",{badgeColor:"purple",size:"small"},t),n&&h("zonos-badge",{badgeColor:"gray",size:"small"},"E2E Test")),h("zonos-checkout-progress-tabs",{backgroundColor:e.isMobile?"--zonos-elements-gray-0":null}),k.map((function(e){return h("zonos-custom-message",{icon:MessageIcon,message:e.message})})))};var _=function(){if(cartStore.checkoutSessionTimeoutShow){return h("zonos-rest-state",{class:"zonos--session-timeout",restStateSubtitle:translate("Your checkout session has expired. Please reload the page to continue."),restStateTitle:translate("Session timed out"),restStateType:"Warning"},h("zonos-button",{onClick:function(){return e.reloadCheckoutSession()},variant:"primary"},translate("Reload")))}return h("div",{class:"zonos--content",style:{"--zonos--border-radius":getBorderRadius({overrideBorderStyle:d})}},cartStore.step!=="finish"&&cartStore.step!=="error"&&h(Fragment,null,h("div",{class:"zonos--left","data-theme":v,style:styles({"--zonos--primary-color":!e.isMobile?a:undefined})},!e.isMobile&&y(),cartStore.step==="customer-info"&&h("zonos-customer-info",{continueLoading:e.submitLoading,defaultAddress:e.getDefaultAddress(),isMobile:e.isMobile,onContinueClicked:function(){return e.handleCustomerInfoContinue()},submitBtnColor:g}),cartStore.step==="shipping"&&h("zonos-shipping",{continueLoading:e.submitLoading,onContinueClicked:function(){return e.handleShippingContinue()},submitBtnColor:g}),cartStore.step==="payment"&&h("zonos-checkout-payment",{continueLoading:e.submitLoading,isMobile:e.isMobile,onContinueClicked:function(){return __awaiter(e,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:return[4,this.handleStripePaymentContinue()];case 1:e.sent();return[2]}}))}))},submitBtnColor:g})),h("div",{class:"zonos--right","data-theme":f},e.isMobile&&y(),h("div",{class:"zonos--right-actions"},window.Zonos.showBaseForeign&&h("zonos-currency-toggle",null),!e.isLegacyCheckout&&h("zonos-button",{class:"zonos--close-button",icon:h("zonos-icon",{"aria-label":"Close checkout dialog",content:RemoveIcon}),noBackground:true,onClick:function(){return e.closeDialogHandler()}})),h("div",{class:"flex--wrapper"},h("div",{class:"zonos--wrapper"},h("zonos-review",{collapsed:e.collapseReviewMobile,mobile:e.isMobile,onClick:function(){if(!e.isMobile){return}e.collapseReviewMobile=!e.collapseReviewMobile}}),h("zonos-collapse",{collapsed:e.collapseReviewMobile&&e.isMobile},h("zonos-cart-items",null),e.isMobile&&h("zonos-v-stack",{spacing:16},h("zonos-cart-subtotal",{submitBtnColor:g}),h("zonos-custom-message",{class:"zonos--checkout-default-message",icon:MessageIcon,message:z})))),h("zonos-cart-restricted-items",null),!e.isMobile&&h("zonos-v-stack",{spacing:16},h("zonos-cart-subtotal",null),h("zonos-custom-message",{class:"zonos--checkout-default-message",icon:MessageIcon,message:z}))))),(cartStore.step==="finish"||cartStore.step==="error")&&h("div",{class:"zonos--done","data-theme":f},h("div",{class:"zonos--header"},C(),!e.isRedirectAfterOrder&&h("zonos-button",{class:"zonos--close-button",icon:h("zonos-icon",{"aria-label":"Close checkout dialog",content:RemoveIcon}),noBackground:true,onClick:function(){return e.handleFinishClick()},theme:f})),h("zonos-checkout-finish",{borderRadius:d,onCloseClick:function(){return e.handleFinishClick()},overrideNotification:cartStore.step==="error"&&!!cartStore.error?Object.assign(Object.assign({},cartStore.error),{type:"error"}):undefined,storybookForceStatus:e.storybookPaymentStatusOverride})),h("zonos-checkout-footer",{"data-theme":f,mobile:e.isMobile,slot:!e.isMobile?"dialog-footer":undefined}))};return h(Host,{class:classes(["zonos--checkout zonos--elements",l&&"has-footer",this.preview&&"preview",this.isMobile&&"mobile",this.isIframed&&"iframed",this.hiddenMode&&"hidden-mode"])},this.preview?_():h("zonos-dialog",{borderStyle:d,"data-theme":f,height:"980px",isLoading:s,mobile:this.isMobile,noBodyPadding:true,noBorder:true,noClickOutside:true,noCloseButton:true,onCloseDialog:function(){return e.closeDialogHandler()},open:this.open,width:"1200px"},_()),h("zonos-confirm-dialog",{class:"zonos--close-confirm-dialog",dialogCancelBtnText:translate("Don't close"),dialogConfirmBtnText:translate("Close"),dialogIntent:"warn",dialogOpen:this.confirmDialogOpen,dialogSubtitle:translate("Would you like to close checkout and return to the site?"),dialogTitle:translate("Are you sure?"),onCancelClicked:function(){e.confirmDialogOpen=false},onConfirmClicked:function(){return e.closeDialogHandler({confirmed:true})}}),h("zonos-confirm-dialog",{class:"zonos--order-duplication-dialog",dialogCancelBtnText:translate("Return to merchant site"),dialogConfirmBtnText:translate("Proceed with order"),dialogIntent:"warn",dialogOpen:!!this.placedOrderInfo,dialogSubtitle:((t=this.placedOrderInfo)===null||t===void 0?void 0:t.zonosOrderNumber)?translate("It looks like you placed an order recently ([date] at [time]) under order number #[orderNumber]. Check your email for the order confirmation. Are you sure you want to place another order?",{date:this.formatDate(this.placedOrderInfo.time),orderNumber:this.placedOrderInfo.zonosOrderNumber,time:this.formatTime(this.placedOrderInfo.time)}):translate("It looks like you placed an order recently ([date] at [time]). Check your email for the order confirmation. Are you sure you want to place another one?",{date:this.formatDate(((r=this.placedOrderInfo)===null||r===void 0?void 0:r.time)||null),time:this.formatTime(((n=this.placedOrderInfo)===null||n===void 0?void 0:n.time)||null)}),dialogTitle:translate("Are you sure?"),dialogWidth:530,onCancelClicked:function(){e.handleCancelOrderDuplication()},onConfirmClicked:function(){e.confirmProceedWithOrderDuplication()}}),h("zonos-confirm-dialog",{class:"zonos--inventory-check-failure-dialog",dialogConfirmBtnText:translate("Return to cart"),dialogIntent:"danger",dialogOpen:!!cartStore.inventoryCheckErrorMessage,dialogSubtitle:cartStore.inventoryCheckErrorMessage,dialogTitle:translate("Couldn't place order"),dialogType:"alert",onConfirmClicked:function(){return e.handleInventoryCheckDialogConfirm()}}),w&&h("zonos-confirm-dialog",{class:"zonos--pay-in-usd-dialog",dialogCancelBtnText:translate("Cancel"),dialogConfirmBtnText:translate("Pay [orderTotal]",{orderTotal:currencyFormat({amount:w.settlementAmount,currency:"USD"})}),dialogIntent:"warn",dialogOpen:this.payInUsdConfirmDialogOpen,dialogSubtitle:translate("By paying in USD, your card will be charged directly with no currency conversion. However, using a non-USD based card may result in additional currency conversion fees at the bank level."),dialogTitle:translate("Pay in USD (United States Dollar)?"),dialogType:"confirm",dialogWidth:480,onCancelClicked:function(){e.payInUsdConfirmDialogOpen=false},onConfirmClicked:function(){return e.handleStripePaymentContinue()}}),h("zonos-confirm-dialog",{class:"zonos--shopping-cart-expired-dialog",dialogConfirmBtnText:translate("OK"),dialogIntent:"danger",dialogOpen:this.isCartExpired,dialogSubtitle:translate("You are being sent back to the shop to re-add items to your cart."),dialogTitle:translate("Shopping cart expired"),dialogType:"alert",onConfirmClicked:function(){return e.handleCartExpiredDialogConfirm()}}),h("zonos-loading-overlay",{open:this.isOverlayLoading}))};Object.defineProperty(e,"assetsDirs",{get:function(){return["assets"]},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{appearanceSettingsOverride:["appearanceSettingsOverrideChanged","handleAppearanceSettingsOverrideChange"],overrideStagingMode:["overrideStagingModeChanged"],mobile:["handleMobileChange"],defaultAddress:["handleAddressChange"],customerProfile:["handleCustomerProfileChange"],clientSecret:["handleClientSecretChange"],stripeCustomerSessionClientSecret:["handleClientSecretChange"],open:["handleOpenChange"]}},enumerable:false,configurable:true});return e}();ZonosCheckout.style=ZonosCheckoutStyle0;export{ZonosCheckout as zonos_checkout};
1
+ var __awaiter=this&&this.__awaiter||function(e,o,t,r){function n(e){return e instanceof t?e:new t((function(o){o(e)}))}return new(t||(t=Promise))((function(t,s){function i(e){try{c(r.next(e))}catch(e){s(e)}}function a(e){try{c(r["throw"](e))}catch(e){s(e)}}function c(e){e.done?t(e.value):n(e.value).then(i,a)}c((r=r.apply(e,o||[])).next())}))};var __generator=this&&this.__generator||function(e,o){var t={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},r,n,s,i;return i={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(i[Symbol.iterator]=function(){return this}),i;function a(e){return function(o){return c([e,o])}}function c(a){if(r)throw new TypeError("Generator is already executing.");while(i&&(i=0,a[0]&&(t=0)),t)try{if(r=1,n&&(s=a[0]&2?n["return"]:a[0]?n["throw"]||((s=n["return"])&&s.call(n),0):n.next)&&!(s=s.call(n,a[1])).done)return s;if(n=0,s)a=[a[0]&2,s.value];switch(a[0]){case 0:case 1:s=a;break;case 4:t.label++;return{value:a[1],done:false};case 5:t.label++;n=a[1];a=[0];continue;case 7:a=t.ops.pop();t.trys.pop();continue;default:if(!(s=t.trys,s=s.length>0&&s[s.length-1])&&(a[0]===6||a[0]===2)){t=0;continue}if(a[0]===3&&(!s||a[1]>s[0]&&a[1]<s[3])){t.label=a[1];break}if(a[0]===6&&t.label<s[1]){t.label=s[1];s=a;break}if(s&&t.label<s[2]){t.label=s[2];t.ops.push(a);break}if(s[2])t.ops.pop();t.trys.pop();continue}a=o.call(e,t)}catch(e){a=[6,e];n=0}finally{r=s=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(e,o,t){if(t||arguments.length===2)for(var r=0,n=o.length,s;r<n;r++){if(s||!(r in o)){if(!s)s=Array.prototype.slice.call(o,0,r);s[r]=o[r]}}return e.concat(s||Array.prototype.slice.call(o))};import{r as registerInstance,h,H as Host,F as Fragment}from"./index-55a03023.js";import{s as stripeStoreGetDomesticShippingSession,a as stripeStoreCleanupDomesticShippingSession,b as stripeStoreSaveDomesticShippingSession,c as stripeStore,i as initStripeElements,d as stripeStoreRetrievePayment,e as cartStore,f as cartStoreUpdateItems,g as cartStoreReset,h as cartStoreResetTabItems,j as cartStoreClearCheckoutInterval,k as stripeStoreInitCheckoutSession,l as stripeStoreGetPaymentIntent,m as cartStoreStartCheckoutInterval,t as trackConversionEvent,n as getCheckoutSessionBody,o as cartStoreUpdateToErrorState,p as cartStoreSetCheckoutSession,q as stripeStorePrefetchLandedCost,r as cartStoreNextStep,u as stripeStoreUpdateCheckoutSessionBaseCurrency,v as stripeStoreHandleInventoryCheck,w as stripeStoreConfirmPayment,x as stripeStoreHandleInventoryRefund,y as stripeStoreReset}from"./cart-b2dd578c.js";import{p as paypalStoreHasPaypalEnabled,s as submitGtag,a as paypalStore,b as paypalInitScript}from"./paypal-555bbf1e.js";import{f as filterValidTests,l as localizationStore,a as localizationStoreUpdateSelectedCountryCode,g as getZCountryUrlParam,s as storageStore,V as VARIANT_TEST_KEY_EXPIRATION,b as storageStoreSetEnabledVariantTestKeys,c as localizationStoreOnChange,d as currencyFormat}from"./localization-d7125e4e.js";import{t as translate}from"./translationStore-13502f49.js";import{z as zonosStore,g as getZonosStoreTheme,m as mergeConfig}from"./zonosStore-c456b933.js";import{b as buildCartItemsByTempCart}from"./buildCartItemsByTempCart-c4488f73.js";import{h as handleFetch,l as log,b as logError,s as sendErrorLog,c as getElapsedTime,d as allLogs,e as getAdditionalLogMetadata,g as getIsTestMode,j as jsonParse,a as getIsStagingMode,i as isCheckoutMobile}from"./handleFetch-99218189.js";import{u as updateCheckoutSessionAttributes}from"./updateCheckoutSessionAttributes-92f42882.js";import{_ as _getIsValidCartId,c as checkoutHiddenBtnSelector,a as checkoutHiddenInternationalBtnSelector,d as domesticRedirectedBtnSelector,g as getAbandonedCartRenewTokenValue}from"./CheckoutConfig-724d7bae.js";import{c as classes}from"./classes-0d95c529.js";import{c as createCustomEvent}from"./createCustomEvent-58159025.js";import{g as getBorderRadius}from"./getBorderRadius-87593ff4.js";import{i as isDarkColor}from"./isDarkColor-1f58b6be.js";import{s as styles}from"./styles-6fc2fad9.js";import{R as RemoveIcon}from"./RemoveIcon-9dc5dd1a.js";import"./VarianceTest-fef2d958.js";import"./debounce-c34d1270.js";var isStoreDiscountEnabled=function(){return __awaiter(void 0,void 0,void 0,(function(){var e,o,t;return __generator(this,(function(r){switch(r.label){case 0:return[4,handleFetch("/api/zonos-elements/get-store-discount-enabled-status")];case 1:e=r.sent(),o=e.errors,t=e.json;if(o.length||!(t===null||t===void 0?void 0:t.enabled)){return[2,{enabled:false}]}return[2,{enabled:true}]}}))}))};var selectVarianceTest=function(e){return __awaiter(void 0,[e],void 0,(function(e){var o,t,r,n;var s=e.testKeys;return __generator(this,(function(e){switch(e.label){case 0:if(s.length===0){return[2,null]}return[4,handleFetch("/api/zonos-elements/select-variance-test",{body:{testKeys:s},method:"POST"})];case 1:o=e.sent(),t=o.errors,r=o.json;if(t.length||!r){return[2,null]}n=filterValidTests(r);return[2,n]}}))}))};var buildCartUrl=function(e){var o=e.cartId,t=e.checkoutSessionId,r=e.customerAddress1,n=e.customerAddress2,s=e.customerCity,i=e.customerCountry,a=e.customerEmail,c=e.customerFirstName,u=e.customerLastName,d=e.customerPhone,l=e.customerState,h=e.customerZip,f=e.hostedCheckoutUrl,m=e.isTestMode,v=e.isVariantTest;var g=new URLSearchParams;g.set("tempCartUUID",o);if(c){g.set("customerFirstName",c)}if(u){g.set("customerLastName",u)}if(a){g.set("customerEmail",a)}if(d){g.set("customerPhone",d)}if(h){g.set("customerZip",h)}if(s){g.set("customerCity",s)}if(l){g.set("customerState",l)}if(i){g.set("zCountry",i)}if(r){g.set("customerAddress1",r)}if(n){g.set("customerAddress2",n)}if(m){g.set("zonosTestMode","1")}if(t){g.set("zonosCheckoutSessionId",t)}if(v){g.set("zonosVariantTest","1")}return"".concat(f,"?").concat(g.toString())};var isDisabledCountry=function(e){if(e===void 0){e=true}if(!localizationStore.localizationLoaded){return true}if(localizationStore.isDisabledCountry){if(e){log("Checkout: disabled country")}return true}return false};var isShippableCountry=function(e){if(e===void 0){e=true}if(!localizationStore.localizationLoaded){return false}if(!localizationStore.isShippableCountry){if(e){log("Checkout: not shippable country")}return false}return true};var watchBigcommerceDomesticCheckout=function(e){var o=e.domesticRedirectedBtnSelector,t=e.onShippingAddressSessionFound;if(!window.Zonos.isBigCommerce){return}var r=new MutationObserver((function(){return __awaiter(void 0,void 0,void 0,(function(){var e,n,s,i,a;return __generator(this,(function(c){e=document.querySelector(o);n=stripeStoreGetDomesticShippingSession();if(!e&&n){s=document.createElement("button");s.style.display="none";s.id="zonos--domestic-redirected-checkout-button";document.body.appendChild(s);t===null||t===void 0?void 0:t(n);r.disconnect();return[2]}i=document.querySelector('select[name="shippingAddress.countryCode"]');a=document.querySelector("#checkout-shipping-continue");if(!i||!a){return[2]}r.disconnect();a.addEventListener("click",(function(e){return __awaiter(void 0,void 0,void 0,(function(){var o,t,r,n,s,a,c;return __generator(this,(function(u){r=i.value;if(!r){return[2]}localizationStoreUpdateSelectedCountryCode(r);if(!isShippableCountry(false)){stripeStoreCleanupDomesticShippingSession();return[2]}n=document.querySelector("form");if(!n){return[2]}s=new FormData(n);a=document.querySelector("input#addressLine1Input");c={address1:(o=s.get("shippingAddress.address1"))!==null&&o!==void 0?o:a&&a.value,address2:s.get("shippingAddress.address2"),city:s.get("shippingAddress.city"),countryCode:s.get("shippingAddress.countryCode"),firstName:s.get("shippingAddress.firstName"),lastName:s.get("shippingAddress.lastName"),phone:s.get("shippingAddress.phone"),postalCode:s.get("shippingAddress.postalCode"),stateOrProvince:(t=s.get("shippingAddress.stateOrProvince"))!==null&&t!==void 0?t:s.get("shippingAddress.stateOrProvinceCode")};if(Object.values(c).some((function(e){return e===undefined||e===null}))){logError("One or more shipping address field is missing",Object.entries(c));void sendErrorLog({endpoint:"No endpoint, domestic checkout form missing fields",errors:["Bigcommerce: One or more shipping address field is missing in the domestic checkout form",JSON.stringify(Object.entries(c))],metadata:{storeId:zonosStore.storeId}});return[2]}stripeStoreSaveDomesticShippingSession({address1:c.address1,address2:c.address2,city:c.city,countryCode:c.countryCode,firstName:c.firstName,lastName:c.lastName,phone:c.phone,postalCode:c.postalCode,state:c.stateOrProvince});e.preventDefault();e.stopPropagation();window.location.href="/";return[2]}))}))}));return[2]}))}))}));r.observe(document.body,{childList:true,subtree:true})};var getLegacyQueryParams=function(){var e=new URLSearchParams(window.location.search);log("legacy urlParams","info",Object.fromEntries(e.entries()));var o=function(o){var t=e.get(o);if(!t||t==="undefined"){return""}return t};var t=getZCountryUrlParam(e)||localizationStore.selectedCountryCode||"US";var r=o("customerCity");var n=o("customerEmail");var s=o("customerAddress1");var i=o("customerAddress2");var a=o("customerName");var c=o("customerPhone");var u=o("customerZip");var d=o("customerState");var l=o("customerFirstName");var h=o("customerLastName");return{customerAddress1:s,customerAddress2:i,customerCity:r,customerCountry:t,customerEmail:n,customerFirstName:l,customerLastName:h,customerName:a,customerPhone:c,customerState:d,customerZip:u}};var numberOfFailures=0;var sendBulkLoadTimeApiLog=function(){return __awaiter(void 0,void 0,void 0,(function(){var e,o;var t;return __generator(this,(function(r){switch(r.label){case 0:if(window.Zonos.loadTimeApiInfoList.length===0){return[2]}log("Sending bulk load time api log","info",{loadTimeApiInfoList:window.Zonos.loadTimeApiInfoList});e={data:__spreadArray([],window.Zonos.loadTimeApiInfoList,true),storeId:window.Zonos.storeId||0};window.Zonos.loadTimeApiInfoList.length=0;return[4,handleFetch("/api/zonos-elements/log-bulk-load-data",{body:e,method:"POST"})];case 1:o=r.sent().errors;if(o.length){(t=window.Zonos.loadTimeApiInfoList).push.apply(t,e.data);numberOfFailures++;if(numberOfFailures>5&&window.Zonos.logIntervalId){clearInterval(window.Zonos.logIntervalId)}}return[2]}}))}))};var sendLoadCheckoutFacadeLog=function(){return __awaiter(void 0,void 0,void 0,(function(){var e,o;return __generator(this,(function(t){e=getElapsedTime().elapsedTime;o={cache:"miss",eventName:"jsdelivr",flag:"LOG_CHECKOUT_FACADE_LOAD",href:window.location.href,loadTime:e,metadata:Object.assign({allLogs:allLogs},getAdditionalLogMetadata()),scriptLoadUrl:"checkoutFacade",storeId:window.Zonos.storeId};void handleFetch("/api/zonos-elements/log-script-load",{body:o,method:"POST"});return[2]}))}))};var sendLoadNativeCheckoutLog=function(e){return __awaiter(void 0,[e],void 0,(function(e){var o;var t=e.loadTime;return __generator(this,(function(e){o={cache:"miss",eventName:"jsdelivr",flag:"LOG_NATIVE_CHECKOUT_LOAD",href:window.location.href,loadTime:t,metadata:Object.assign({allLogs:allLogs},getAdditionalLogMetadata()),scriptLoadUrl:"nativeCheckout",storeId:window.Zonos.storeId};void handleFetch("/api/zonos-elements/log-script-load",{body:o,method:"POST"});return[2]}))}))};var filterExpiredTests=function(e){return(e===null||e===void 0?void 0:e.filter((function(e){if(e.expiresAt&&e.expiresAt<Date.now()||!e.expiresAt){return false}return true})))||[]};var getSelectedTestVariant=function(e){var o;var t=(o=storageStore.enabledVariantTestKeys)===null||o===void 0?void 0:o.find((function(o){return o.testKey===e}));return(t===null||t===void 0?void 0:t.selectedVariantKey)||null};var isTestEnabled=function(e){return zonosStore.enabledVariantTestKeys.includes(e)};var mergeTest=function(e){var o=e.baseTestObj,t=e.mergeTestObj;return o.map((function(e){var o=e.testKey;var r=t.find((function(e){var t=e.testKey;return t===o}));return{expiresAt:(r===null||r===void 0?void 0:r.expiresAt)||Date.now()+VARIANT_TEST_KEY_EXPIRATION,selectedVariantKey:(r===null||r===void 0?void 0:r.selectedVariantKey)||null,testKey:o}}))};var getTempCartById=function(e){return __awaiter(void 0,[e],void 0,(function(e){var o,t,r,n,s;var i=e.cartId,a=e.retries;return __generator(this,(function(e){switch(e.label){case 0:o=getIsTestMode();return[4,handleFetch("/api/zonos-elements/get-temp-cart",{body:{isTestMode:o,options:{noOnlineStoreSettings:true},tempCartUUID:i},headers:{"Content-Type":"application/json"},method:"POST"})];case 1:t=e.sent(),r=t.errors,n=t.json;s=!n||r.length;if(!(s&&a))return[3,3];log("[ZONOS - loadZonos] temp cart not ready, retrying in 1 second","info",{retries:a});return[4,new Promise((function(e){return setTimeout(e,500)}))];case 2:e.sent();return[2,getTempCartById({cartId:i,retries:a-1})];case 3:if(s){return[2,null]}return[2,n]}}))}))};var setupCartData=function(e){return __awaiter(void 0,void 0,void 0,(function(){var o,t,r,n;return __generator(this,(function(s){switch(s.label){case 0:o=_getIsValidCartId(e),t=o.isDgsCartId,r=o.isLegacyCartId;if(!r&&!t){logError("[ZONOS - loadZonos] invalid cart id");return[2,null]}return[4,getTempCartById({cartId:e,retries:5})];case 1:n=s.sent();log("[ZONOS - loadZonos] getting temp cart data","info",n);if(!n){logError("[ZONOS - loadZonos] Error getting temp cart data, stop checkout process.");return[2,null]}window.Zonos.storeId=n.cartData.storeId;window.Zonos.zonosApiKey=n.cartData.credentialToken;return[2,{cartData:n.cartData,storeFavicon:n.storeFaviconUrl,storeId:n.cartData.storeId,storeLogo:n.storeLogoUrl,zonosApiKey:n.cartData.credentialToken}]}}))}))};var MessageIcon='<svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="https://www.w3.org/2000/svg">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M2.25 4.5C2.25 3.25736 3.25736 2.25 4.5 2.25H13.5C14.7426 2.25 15.75 3.25736 15.75 4.5V10.5C15.75 11.7426 14.7426 12.75 13.5 12.75H8.25C8.01393 12.75 7.79164 12.8611 7.65 13.05L6.3 14.85C5.87508 15.4166 5.2082 15.75 4.5 15.75C3.25736 15.75 2.25 14.7426 2.25 13.5V4.5ZM4.5 3.75C4.08579 3.75 3.75 4.08579 3.75 4.5V13.5C3.75 13.9142 4.08579 14.25 4.5 14.25C4.73607 14.25 4.95836 14.1389 5.1 13.95L6.45 12.15C6.87492 11.5834 7.5418 11.25 8.25 11.25H13.5C13.9142 11.25 14.25 10.9142 14.25 10.5V4.5C14.25 4.08579 13.9142 3.75 13.5 3.75H4.5ZM5.25 6C5.25 5.58579 5.58579 5.25 6 5.25H12C12.4142 5.25 12.75 5.58579 12.75 6C12.75 6.41421 12.4142 6.75 12 6.75H6C5.58579 6.75 5.25 6.41421 5.25 6ZM5.25 9C5.25 8.58579 5.58579 8.25 6 8.25H8.25C8.66421 8.25 9 8.58579 9 9C9 9.41421 8.66421 9.75 8.25 9.75H6C5.58579 9.75 5.25 9.41421 5.25 9Z" fill="#4D505A"/>\n</svg>\n';var zonosCheckoutCss=".sc-zonos-checkout-h{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-checkout-h *.sc-zonos-checkout{font-family:var(--zonos--font-family, Inter), Inter}.sc-zonos-checkout-h img.sc-zonos-checkout{max-width:100%}.sc-zonos-checkout-h dl.sc-zonos-checkout,.sc-zonos-checkout-h dd.sc-zonos-checkout,.sc-zonos-checkout-h h1.sc-zonos-checkout,.sc-zonos-checkout-h h2.sc-zonos-checkout,.sc-zonos-checkout-h h3.sc-zonos-checkout,.sc-zonos-checkout-h h4.sc-zonos-checkout,.sc-zonos-checkout-h h5.sc-zonos-checkout,.sc-zonos-checkout-h h6.sc-zonos-checkout,.sc-zonos-checkout-h hr.sc-zonos-checkout,.sc-zonos-checkout-h figure.sc-zonos-checkout,.sc-zonos-checkout-h p.sc-zonos-checkout,.sc-zonos-checkout-h pre.sc-zonos-checkout{margin:0}.sc-zonos-checkout-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-checkout-h{z-index:2147483647;position:fixed}.sc-zonos-checkout-h *.sc-zonos-checkout{-ms-scroll-chaining:none;overscroll-behavior:contain}.sc-zonos-checkout-h *.sc-zonos-checkout::-webkit-scrollbar{width:10px}.sc-zonos-checkout-h *.sc-zonos-checkout::-webkit-scrollbar-track{background:var(--zonos-elements-gray-50)}.sc-zonos-checkout-h *.sc-zonos-checkout::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}.sc-zonos-checkout-h *.sc-zonos-checkout::-webkit-scrollbar-thumb:hover{background:#d6d6d6}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout{display:-ms-flexbox;display:flex;height:100%;overflow:hidden;border-radius:var(--zonos--border-radius, var(--zonos-elements-radius-10))}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--left.sc-zonos-checkout,.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout{-ms-flex:1;flex:1;padding:32px}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--left.sc-zonos-checkout{background-color:var(--zonos--primary-color, var(--zonos-elements-gray-0));border-right:1px solid var(--zonos-elements-gray-200)}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout{background-color:var(--zonos-elements-gray-0)}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout{width:100%;max-height:100%;height:100%;overflow:auto;-ms-flex-direction:column;flex-direction:column;background-color:var(--zonos-elements-gray-0);-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;padding:24px;padding-bottom:50px}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout .zonos--header.sc-zonos-checkout{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:center;align-items:center;width:100%}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout .zonos--logo.sc-zonos-checkout{margin-bottom:0}.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout zonos-checkout-finish.sc-zonos-checkout{-ms-flex:1;flex:1}.sc-zonos-checkout-h .zonos--left.sc-zonos-checkout{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;position:relative}.sc-zonos-checkout-h .zonos--left.sc-zonos-checkout .zonos--wrapper.sc-zonos-checkout{padding:0 8px 8px}.sc-zonos-checkout-h .zonos--left.sc-zonos-checkout .zonos--payment-error-banner.sc-zonos-checkout{margin-top:24px}.sc-zonos-checkout-h .zonos--right.sc-zonos-checkout{position:relative}.sc-zonos-checkout-h .zonos--right.sc-zonos-checkout .zonos--right-actions.sc-zonos-checkout{position:absolute;right:24px;top:24px;z-index:2;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.sc-zonos-checkout-h .zonos--wrapper.sc-zonos-checkout{overflow:auto;max-height:100%;position:relative}.sc-zonos-checkout-h .flex--wrapper.sc-zonos-checkout{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;max-height:100%}.sc-zonos-checkout-h .zonos--logo-wrapper.sc-zonos-checkout{display:-ms-flexbox;display:flex;gap:16px;-ms-flex-align:center;align-items:center}.sc-zonos-checkout-h .zonos--logo-wrapper.sc-zonos-checkout>*.sc-zonos-checkout{height:-webkit-fit-content;height:-moz-fit-content;height:fit-content}.sc-zonos-checkout-h .zonos--logo.sc-zonos-checkout{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.sc-zonos-checkout-h .zonos--logo.sc-zonos-checkout img.sc-zonos-checkout{max-height:72px}.sc-zonos-checkout-h .zonos--checkout-default-message.sc-zonos-checkout{margin-left:76px;margin-bottom:8px}.zonos--close-button.sc-zonos-checkout{-ms-flex-item-align:start;align-self:flex-start}.preview.sc-zonos-checkout-h{min-width:500px;margin:auto;position:relative}.preview.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout{border:var(--zonos-elements-border)}.preview.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout{padding:32px}.hidden-mode.sc-zonos-checkout-h{height:0;opacity:0;pointer-events:none;position:absolute;visibility:hidden;width:0;z-index:-1}.mobile.sc-zonos-checkout-h{min-width:auto}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;overflow:auto;border-radius:0;max-height:100%;height:100%;border:0}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--left.sc-zonos-checkout,.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout{padding:12px;padding-bottom:76px}@media (max-width: 768px){.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--left.sc-zonos-checkout,.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout{padding-bottom:0}}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--left.sc-zonos-checkout{-ms-flex-order:2;order:2;border-right:none}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout{-ms-flex-order:1;order:1;padding-top:16px}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout .zonos--wrapper.sc-zonos-checkout{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;border:var(--zonos-elements-border);border-radius:var(--zonos--border-radius, var(--zonos-elements-radius-10));background-color:var(--zonos-elements-gray-50);padding:12px;margin-top:32px}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout .zonos--review.sc-zonos-checkout{margin-bottom:0}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--right.sc-zonos-checkout .zonos--cart-items.sc-zonos-checkout{margin-top:8px}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout zonos-checkout-footer.sc-zonos-checkout{-ms-flex-order:3;order:3}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--wrapper.sc-zonos-checkout{max-height:100%}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--footer.sc-zonos-checkout{-ms-flex-order:3;order:3}.mobile.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout .zonos--done.sc-zonos-checkout{width:auto}.mobile.sc-zonos-checkout-h .zonos--cart-subtotal.sc-zonos-checkout{margin:0}.iframed.sc-zonos-checkout-h .zonos--content.sc-zonos-checkout{-ms-scroll-chaining:chained;overscroll-behavior:auto}";var ZonosCheckoutStyle0=zonosCheckoutCss;var CHECKOUT_SESSION_TIMEOUT=90*60*1e3;var ORDER_DUPLICATION_NOTIFICATION_EXPIRATION=6*60*60*1e3;var ZonosCheckout=function(){function e(e){var o=this;registerInstance(this,e);this.onChangeLocaleListener=function(){};this.isRedirectAfterOrder=false;this.preview=false;this.hiddenMode=false;this.mobile=false;this.defaultAddress=[];this.forceDialogOpen=false;this.defaultAddressParams=[];this.defaultCustomerProfileAddress=[];this.customerProfile=null;this.open=this.forceDialogOpen;this.isOverlayLoading=false;this.stripe=window.Zonos.stripe;this.submitLoading=false;this.collapseReviewMobile=true;this.isAttachError=false;this.isMobile=false;this.isIframed=false;this.isLegacyCheckout=window.Zonos.isLegacyCheckout;this.confirmDialogOpen=false;this.isCartExpired=false;this.payInUsdConfirmDialogOpen=false;this.inventoryCheckErrorMessage=null;this.placedOrderInfo=null;this.clientSecret=stripeStore.clientSecret;this.stripeCustomerSessionClientSecret=stripeStore.stripeCustomerSessionClientSecret;this.applyStripeTheme=function(){return __awaiter(o,void 0,void 0,(function(){var e,o,t,r,n;return __generator(this,(function(s){switch(s.label){case 0:n=((e=this.appearanceSettingsOverride)===null||e===void 0?void 0:e.theme)||zonosStore.appearance.theme;return[4,initStripeElements({overrideBorderRadius:(o=this.appearanceSettingsOverride)===null||o===void 0?void 0:o.style,overridePrimaryColor:(t=this.appearanceSettingsOverride)===null||t===void 0?void 0:t.colorPrimary,overrideSecondaryColor:(r=this.appearanceSettingsOverride)===null||r===void 0?void 0:r.colorSecondary,overrideTheme:this.isMobile?n:undefined,paypalEnabled:paypalStoreHasPaypalEnabled()})];case 1:s.sent();return[2]}}))}))};this.checkStripePaymentIntentStatus=function(e){return __awaiter(o,[e],void 0,(function(e){var o,t,r,n,s,i,a,c,u;var d=e.triggeredButton;return __generator(this,(function(e){switch(e.label){case 0:o=d===null||d===void 0?void 0:d.matches("#".concat(checkoutHiddenBtnSelector));t=!!window.Zonos.cartData;r=new URL(window.location.href).searchParams;n=r.get("payment_intent_client_secret");s=r.get("zonosCheckoutSessionId");if(!o){log("Checkout is triggered by user, no need to check stripe payment intent status");return[2,{shouldAllowOrder:true}]}log("Payment intent exist, checking stripe payment intent status");if(!n){log("No stripe client secret found in the URL, proceed to order if cart data is available");return[2,{shouldAllowOrder:t}]}return[4,stripeStoreRetrievePayment({clientSecret:n})];case 1:i=e.sent(),a=i.error,c=i.status;u=new URLSearchParams(window.location.search).get("redirect_status");if(u){if(!a){log("Payment intent is succeeded or in a good state to move forward, show success screen")}else{log("Payment intent failed, show status from error")}this.open=true;storageStore.checkoutSessionId=s;stripeStore.clientSecret=n;void this.setToFinishStep(c);return[2,{shouldAllowOrder:false}]}if(!t){log("Cart data is not available, only check payment intent status, skip order.");return[2,{shouldAllowOrder:false}]}log("Payment intent is not succeeded, proceed to order");return[2,{shouldAllowOrder:true}]}}))}))};this.initializeTestKeys=function(){storageStore.enabledVariantTestKeys=filterExpiredTests(storageStore.enabledVariantTestKeys||[]);var e=zonosStore.enabledVariantTestKeys.map((function(e){var o;var t=(o=storageStore.enabledVariantTestKeys)===null||o===void 0?void 0:o.find((function(o){var t=o.testKey;return t===e}));return{expiresAt:(t===null||t===void 0?void 0:t.expiresAt)||Date.now()+VARIANT_TEST_KEY_EXPIRATION,selectedVariantKey:(t===null||t===void 0?void 0:t.selectedVariantKey)||null,testKey:e}}));storageStoreSetEnabledVariantTestKeys(e);return{allSelected:false}};this.shouldAllowHostedVsNativeTest=function(){if(typeof zonosStore.checkoutSettings.createCartId!=="function"){return false}var e=zonosStore.enabledVariantTestKeys.includes("hosted_vs_native");if(!e){return false}return true};this.registerTestHostedVsNative=function(){return __awaiter(o,void 0,void 0,(function(){var e,o,t,r;return __generator(this,(function(n){switch(n.label){case 0:e=this.shouldAllowHostedVsNativeTest();if(!e){return[2]}log("[TEST] - Registering hosted vs native test");o=getSelectedTestVariant("hosted_vs_native");if(o){log("[TEST] - Hosted vs native test already has variant selected: ".concat(o));return[2]}return[4,selectVarianceTest({testKeys:["hosted_vs_native"]})];case 1:t=n.sent();if(!t){log("[TEST] - Failed to get selection for hosted vs native test");return[2]}r=mergeTest({baseTestObj:storageStore.enabledVariantTestKeys||[],mergeTestObj:t});storageStoreSetEnabledVariantTestKeys(r);return[2]}}))}))};this.handleHostedVsNative=function(){return __awaiter(o,void 0,void 0,(function(){var e,o,t,r,n,s,i,a;return __generator(this,(function(c){switch(c.label){case 0:o=this.shouldAllowHostedVsNativeTest();if(!o){return[2,{redirected:false}]}t=getSelectedTestVariant("hosted_vs_native");log("[TEST] - hosted_vs_native: ".concat(t));if(typeof zonosStore.checkoutSettings.createCartId!=="function"){log("[TEST] - createCartId is not provided, skipping hosted vs native test");return[2,{redirected:false}]}if(t!=="hosted"){log("[TEST] - Hosted vs native test is enabled for native, skipping");return[2,{redirected:false}]}if(!((e=zonosStore.genericSettings)===null||e===void 0?void 0:e.hostedCheckoutUrl)){log("[TEST] - Hosted checkout URL is not provided");return[2,{redirected:false}]}log('"createCartId" is provided, start building cart');return[4,zonosStore.checkoutSettings.createCartId()];case 1:r=c.sent();s=null;if(typeof r==="object"){n=r.cartId;s=r.shippingData||null}else{n=r}i=getLegacyQueryParams();a=buildCartUrl(Object.assign(Object.assign({cartId:n,checkoutSessionId:storageStore.checkoutSessionId||undefined,hostedCheckoutUrl:zonosStore.genericSettings.hostedCheckoutUrl,isTestMode:getIsTestMode(),isVariantTest:true},i),s));log("[TEST] - Redirecting to: ".concat(a));window.open(a,"_blank");return[2,{redirected:true}]}}))}))};this.formatDate=function(e){if(!e){return""}var o=new Date(e);return o.toLocaleDateString()};this.formatTime=function(e){if(!e){return""}var o=new Date(e);return o.toLocaleTimeString()};this.getCurrentLocalePageEnum=function(){switch(cartStore.step){case"customer-info":return"checkout_customer_info";case"shipping":return"checkout_shipping_info";case"payment":return"checkout_payment_info";default:return null}};this.getBaseCurrencySettlementInfo=function(){var e=cartStore.selectedLandedCost;if(!e){return null}var o=e.landedCost.amountSubtotals;if(!o){return null}var t=(o.discounts||0)+o.items+o.landedCostTotal+o.shipping;return{settlementAmount:t}};this.getDefaultAddress=function(){if(o.defaultCustomerProfileAddress.length){return o.defaultCustomerProfileAddress}if(Array.isArray(o.defaultAddress)&&o.defaultAddress.length){return o.defaultAddress}if(!Array.isArray(o.defaultAddress)&&typeof o.defaultAddress==="object"){return[o.defaultAddress]}return o.defaultAddressParams};this.handleHostedOpenWindowCallback=function(e){var o;var t=(o=zonosStore.genericSettings)===null||o===void 0?void 0:o.hostedCheckoutUrl;if(!origin){return}var r=["dev.checkout.elements.zonos.com"].some((function(o){return e.origin.includes(o)}));if(e.origin!==t&&!r){return}switch(e.data.type){case"zonos-checkout-session-update":storageStore.checkoutSessionId=e.data.checkoutSessionId;break}};this.captureParamsRedirectedForVariantTest=function(){var e=new URL(window.location.href);var o=e.searchParams.get("zonosVariantTest")==="1";if(!o){return}var t=e.searchParams.get("zonosCheckoutSessionId");if(t){storageStore.checkoutSessionId=t}var r=storageStore.enabledVariantTestKeys||[];if(window.Zonos.isLegacyCheckout){var n=getSelectedTestVariant("hosted_vs_native");if(!n){r.push({expiresAt:Date.now()+VARIANT_TEST_KEY_EXPIRATION,selectedVariantKey:"hosted",testKey:"hosted_vs_native"});storageStoreSetEnabledVariantTestKeys(r)}else{storageStoreSetEnabledVariantTestKeys(r.map((function(e){if(e.testKey==="hosted_vs_native"){return Object.assign(Object.assign({},e),{selectedVariantKey:"hosted"})}return e})))}}e.searchParams.delete("zonosCheckoutSessionId");e.searchParams.delete("zonosVariantTest");window.history.replaceState({},"",e.toString())}}e.prototype.initCartInfoHandler=function(e){return __awaiter(this,void 0,void 0,(function(){var o;return __generator(this,(function(t){o=e.detail;void cartStoreUpdateItems({adjustments:cartStore.adjustments,cartItems:o});return[2]}))}))};e.prototype.handleKeyPress=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(o){if(e.key==="Escape"){void this.closeDialogHandler()}return[2]}))}))};e.prototype.closeDialogHandler=function(e){return __awaiter(this,void 0,void 0,(function(){var o,t;return __generator(this,(function(r){if(!this.open){return[2]}if(!(e===null||e===void 0?void 0:e.confirmed)){this.confirmDialogOpen=true;return[2]}this.confirmDialogOpen=false;submitGtag("zonos-checkout-close");this.open=this.forceDialogOpen||false;if(!this.preview&&cartStore.step==="finish"){cartStoreReset()}cartStore.step="customer-info";cartStoreResetTabItems();cartStoreClearCheckoutInterval();(t=(o=zonosStore.checkoutSettings).onClose)===null||t===void 0?void 0:t.call(o);return[2]}))}))};e.prototype.buildCartAndInit=function(){return __awaiter(this,void 0,void 0,(function(){var e,o,t,r,n,s,i,a,s,i,i,c,u,s,d;return __generator(this,(function(l){switch(l.label){case 0:if(!(typeof zonosStore.checkoutSettings.createCartId==="function"))return[3,4];log('"createCartId" is provided, start building cart');return[4,zonosStore.checkoutSettings.createCartId()];case 1:e=l.sent();o=void 0;if(typeof e==="object"){log("object detected, use cartId and prefill address from createCartId","info",e);o=e.cartId;this.useShippingDataFromCreateCartId(e.shippingData);cartStore.customerAuthenticationToken=e.customerAuthenticationToken||null}else{o=e}window.Zonos.cartId=o;return[4,setupCartData(o)];case 2:t=l.sent();r=t===null||t===void 0?void 0:t.cartData;if(!r){logError("Failed to build cart, please try again.");return[2,false]}window.Zonos.cartData=r;n=buildCartItemsByTempCart(r),s=n.adjustments,i=n.cartItems;return[4,cartStoreUpdateItems({adjustments:s,cartItems:i})];case 3:l.sent();return[3,9];case 4:if(!window.Zonos.cartData)return[3,6];log("tempCartUUID is provided, start building cart");a=buildCartItemsByTempCart(window.Zonos.cartData),s=a.adjustments,i=a.cartItems;return[4,cartStoreUpdateItems({adjustments:s,cartItems:i})];case 5:l.sent();return[3,9];case 6:if(!(zonosStore.checkoutSettings.buildCartDetail&&localizationStore.selectedCountryCode))return[3,9];log("build cart detail");return[4,zonosStore.checkoutSettings.buildCartDetail({countryCode:localizationStore.selectedCountryCode,currencyCode:localizationStore.targetCurrency})];case 7:i=l.sent();c=i.filter((function(e){return e.amount>=0}));u=i.filter((function(e){return e.amount<0}));log("cartItems","info",{cartItems:i});s=u.map((function(e){return{amount:e.amount,currencyCode:e.currencyCode,description:e.name||e.description||"",productId:e.productId||null,sku:e.sku||null,type:"CART_TOTAL"}}));return[4,cartStoreUpdateItems({adjustments:s,cartItems:c})];case 8:l.sent();l.label=9;case 9:if(!!storageStore.checkoutSessionId)return[3,11];return[4,stripeStoreInitCheckoutSession()];case 10:d=l.sent();log("stripeStoreInitCheckoutSession: ".concat(d));if(!d){return[2,false]}l.label=11;case 11:if(!cartStore.isStagingMode){void stripeStoreGetPaymentIntent()}return[4,this.applyStripeTheme()];case 12:l.sent();this.isRedirectAfterOrder=zonosStore.checkoutSettings.successBehavior==="REDIRECT_TO_SUCCESS_PAGE"||!!cartStore.externalConfirmationPageURL;return[2,true]}}))}))};e.prototype.reloadCheckoutSession=function(){window.location.reload()};e.prototype.handleOrderDuplication=function(){var e=jsonParse(localStorage.getItem("zonos--placed-order-info"));if(!e){localStorage.removeItem("zonos--placed-order-info");return}var o=Date.now()-e.time;log("=== Existing placed order info: ".concat(e.orderId," - ").concat(this.formatDate(e.time)," - elapsed in hh:ss format: ").concat(new Date(o).toISOString().substring(11,8)),"warn");var t=parseFloat(new URLSearchParams(window.location.search).get("zonosOverrideExpiredDuplication")||"0")||ORDER_DUPLICATION_NOTIFICATION_EXPIRATION;if(o>t){log("=== Existing placed order info is older than ".concat(t,"ms, cleaning localStorage"),"warn");localStorage.removeItem("zonos--placed-order-info");return}this.placedOrderInfo=e;log("=== Showing order duplication confirmation","warn")};e.prototype.recordCheckoutInfo=function(){if(!storageStore.checkoutSessionId){return}void updateCheckoutSessionAttributes({attributes:[{key:"APP_VERSION",value:window.Zonos.version},{key:"APP_VERSION_NPM_INTEGRATION",value:window.Zonos.isNpm?"1":"0"},{key:"LEGACY_CHECKOUT_FACADE",value:window.Zonos.isLegacyCheckout?"1":"0"}],checkoutSessionId:storageStore.checkoutSessionId})};e.prototype.confirmProceedWithOrderDuplication=function(){this.placedOrderInfo=null;if(!storageStore.checkoutSessionId){return}void updateCheckoutSessionAttributes({attributes:[{key:"ORDER_DUPLICATION_CONSENT",value:"1"}],checkoutSessionId:storageStore.checkoutSessionId})};e.prototype.markTheSessionAsAbandonedCart=function(){if(!storageStore.checkoutSessionId){return}void updateCheckoutSessionAttributes({attributes:[{key:"WITH_ABANDONED_CART_TOKEN",value:"1"}],checkoutSessionId:storageStore.checkoutSessionId})};e.prototype.handleCancelOrderDuplication=function(){var e;this.placedOrderInfo=null;if(this.isLegacyCheckout){var o=((e=window.Zonos.cartData)===null||e===void 0?void 0:e.storeBaseUrl)||zonosStore.onlineStoreSettings.url;if(!o){return}if(window.parent){window.parent.location.href=o}window.location.href=o;return}void this.closeDialogHandler({confirmed:true})};e.prototype.attachCheckout=function(){var e=this;var o=zonosStore.checkoutSettings.placeOrderButtonSelector;var t=zonosStore.checkoutSettings.alwaysTriggerInternationalCheckoutSelector;log("attach checkout ".concat(o));log("attach checkout to always trigger international checkout selector: ".concat(t));if(!o&&!t&&!window.Zonos.cartData){return}var r=[o,t,"#".concat(domesticRedirectedBtnSelector),"#".concat(checkoutHiddenBtnSelector),"#".concat(checkoutHiddenInternationalBtnSelector)].filter(Boolean);var n=document.querySelectorAll(r.join(","));n.forEach((function(r){var n=r.getAttribute("data-zonos-checkout-attached");if(n){return}log("attached event to button ".concat(o),"info",{button:r});r.addEventListener("click",(function(o){return __awaiter(e,void 0,void 0,(function(){var e,n,s,i,a,c,u,d,l,h,f,m,v,g,p,z;return __generator(this,(function(S){switch(S.label){case 0:s=performance.now();i=t&&r.matches(t);a=r.matches("#".concat(checkoutHiddenInternationalBtnSelector));c=r.matches("#".concat(domesticRedirectedBtnSelector))||r.matches("#".concat(checkoutHiddenBtnSelector));if(!window.Zonos.isLegacyCheckout&&(!isShippableCountry()||isDisabledCountry())&&!i&&!a&&!c){return[2]}o.preventDefault();o.stopPropagation();log("zonos checkout button clicked");return[4,this.checkStripePaymentIntentStatus({triggeredButton:o.target})];case 1:u=S.sent().shouldAllowOrder;if(!u){return[2]}if(!window.Zonos.logIntervalId){window.Zonos.logIntervalId=setInterval((function(){void sendBulkLoadTimeApiLog()}),2e3)}if(!isTestEnabled("hosted_vs_native"))return[3,4];this.isOverlayLoading=true;return[4,this.registerTestHostedVsNative()];case 2:S.sent();return[4,this.handleHostedVsNative()];case 3:d=S.sent().redirected;this.isOverlayLoading=false;if(d){return[2]}S.label=4;case 4:stripeStore.isFetchingSession=true;this.open=true;S.label=5;case 5:S.trys.push([5,8,,9]);return[4,this.buildCartAndInit()];case 6:l=S.sent();if(!l){throw new Error("Error building cart")}(e=window.opener)===null||e===void 0?void 0:e.postMessage({checkoutSessionId:storageStore.checkoutSessionId,type:"zonos-checkout-session-update"},"*");cartStoreStartCheckoutInterval({isPreview:this.preview,sessionTimeout:CHECKOUT_SESSION_TIMEOUT});submitGtag("zonos-checkout-start");h=storageStore.checkoutSessionId;void trackConversionEvent({checkoutSessionId:h,eventName:"checkout_open"});return[4,isStoreDiscountEnabled()];case 7:f=S.sent().enabled;cartStore.shouldHideDiscountInput=!f;this.handleOrderDuplication();if(window.Zonos.isLegacyCheckout){void sendLoadCheckoutFacadeLog()}else{m=performance.now();v=m-s;void sendLoadNativeCheckoutLog({loadTime:v})}this.recordCheckoutInfo();g=!!getAbandonedCartRenewTokenValue();if(g){this.markTheSessionAsAbandonedCart()}return[3,9];case 8:p=S.sent();if(p instanceof Error){z=p.message;if(z==="Cart is expired."){this.isCartExpired=true}}stripeStore.isFetchingSession=false;logError(p);if(this.isCartExpired){stripeStore.isFetchingSession=true;return[2]}void sendErrorLog({endpoint:"Error creating Checkout",errors:[p instanceof Error?p.toString():"Unknown error"],metadata:{allLogs:allLogs,cartId:window.Zonos.cartId,checkoutSessionBody:getCheckoutSessionBody(),href:window.location.href,storeBaseUrl:((n=window.Zonos.cartData)===null||n===void 0?void 0:n.storeBaseUrl)||zonosStore.onlineStoreSettings.url}});cartStoreUpdateToErrorState({messages:[translate("There's been an error creating your checkout session. Please reload and try again or contact support if the error persists")],title:translate("Error creating Checkout")});return[3,9];case 9:return[2]}}))}))}),{capture:true,passive:false});if(!zonosStore.checkoutSettings.disablePlaceOrderButtonActivation){r.removeAttribute("disabled")}r.setAttribute("data-zonos-checkout-attached","true");if(r.matches("#".concat(domesticRedirectedBtnSelector))){r.dispatchEvent(createCustomEvent("click"));stripeStoreCleanupDomesticShippingSession();r.remove()}if(r.matches("#".concat(checkoutHiddenBtnSelector))){r.dispatchEvent(createCustomEvent("click"));r.remove()}}))};e.prototype.appearanceSettingsOverrideChanged=function(){if(!this.appearanceSettingsOverride){return}void this.applyStripeTheme()};e.prototype.useShippingDataFromCreateCartId=function(e){if(!e){return}log("shipping data from createCartId result","info",Object.entries(e));var o=e.customerAddress1,t=e.customerAddress2,r=e.customerCity,n=e.customerCountry,s=e.customerEmail,i=e.customerFirstName,a=e.customerLastName,c=e.customerName,u=e.customerPhone,d=e.customerState,l=e.customerZip;var h=new URLSearchParams(window.location.search);var f=n||getZCountryUrlParam(h)||localizationStore.selectedCountryCode;this.applyPrefillAddress({customerAddress1:o,customerAddress2:t,customerCity:r,customerCountry:f,customerEmail:s,customerFirstName:i,customerLastName:a,customerName:c,customerPhone:u,customerState:d,customerZip:l})};e.prototype.useLegacyQueryParams=function(){var e=new URLSearchParams(window.location.search);log("legacy urlParams","info",Object.fromEntries(e.entries()));var o=function(o){var t=e.get(o);if(!t||t==="undefined"){return null}return t};var t=getZCountryUrlParam(e)||localizationStore.selectedCountryCode;var r=o("customerCity");var n=o("customerEmail");var s=o("customerAddress1");var i=o("customerAddress2");var a=o("customerName");var c=o("customerFirstName");var u=o("customerLastName");var d=o("customerPhone");var l=o("customerZip");var h=o("customerState");this.applyPrefillAddress({customerAddress1:s,customerAddress2:i,customerCity:r,customerCountry:t,customerEmail:n,customerFirstName:c,customerLastName:u,customerName:a,customerPhone:d,customerState:h,customerZip:l})};e.prototype.applyPrefillAddress=function(e){var o=e.customerAddress1||"";var t=e.customerCountry||"";var r=e.customerAddress2||"";var n=e.customerCity||"";var s=e.customerEmail||"";var i=e.customerFirstName&&e.customerLastName?"".concat(e.customerFirstName," ").concat(e.customerLastName):e.customerName||"";var a=e.customerPhone||"";var c=e.customerZip||"";var u=e.customerState||"";if(!o||!i||!a||!t){log("Missing required query params so it can not be prefilled","info",[!o&&"line1",!i&&"name",!a&&"phone",!t&&"country"].filter(Boolean).join(", "));return}if(t&&localizationStore.shippingZoneCountries&&!(t in localizationStore.shippingZoneCountries)){log('Country "'.concat(t,'" is not in the shipping zone, so it can not be prefilled'),"warn");return}this.defaultAddressParams=[{address:{city:n||"",country:t,line1:o,line2:r,postal_code:c,state:u},email:s,name:i,phone:a}];log("Prefill address applied","info",{prefillAddress:this.defaultAddressParams,providedAddress:e})};e.prototype.overrideStagingModeChanged=function(){cartStore.isStagingMode=!!this.overrideStagingMode};e.prototype.init=function(){return __awaiter(this,void 0,void 0,(function(){var e;var o=this;return __generator(this,(function(t){stripeStore.stripe=window.Zonos.stripe;this.stripe=window.Zonos.stripe;cartStore.isStagingMode=getIsStagingMode();if(typeof this.overrideStagingMode!=="undefined"){cartStore.isStagingMode=this.overrideStagingMode}watchBigcommerceDomesticCheckout({domesticRedirectedBtnSelector:domesticRedirectedBtnSelector,onShippingAddressSessionFound:function(e){o.defaultAddress=[{address:{city:e.city,country:e.countryCode,line1:e.address1,line2:e.address2,postal_code:e.postalCode,state:e.state},email:"",name:"".concat(e.firstName," ").concat(e.lastName),phone:e.phone}]}});if(window.Zonos){this.useLegacyQueryParams()}e=setInterval((function(){stripeStore.stripe=window.Zonos.stripe;o.stripe=window.Zonos.stripe;if(!o.stripe){log("waiting for stripe to be loaded");return}if(o.storybookPaymentStatusOverride){clearInterval(e);return}log("init checkout");if(o.preview||o.forceDialogOpen){void o.buildCartAndInit()}else if(window.Zonos.isLegacyCheckout){o.attachCheckout()}else if(window){o.attachCheckout();var t=new MutationObserver((function(){o.attachCheckout()}));t.observe(document.body,{childList:true,subtree:true})}clearInterval(e)}),50);setTimeout((function(){clearInterval(e)}),1e4);return[2]}))}))};e.prototype.setToFinishStep=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(o){cartStore.step="finish";this.storybookPaymentStatusOverride=e;return[2]}))}))};e.prototype.mockCheckoutSession=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(o){cartStoreSetCheckoutSession(e);return[2]}))}))};e.prototype.triggerCheckoutInternational=function(){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(o){e=document.querySelector("#".concat(checkoutHiddenInternationalBtnSelector));if(e){e.dispatchEvent(createCustomEvent("click"))}return[2]}))}))};e.prototype.handleCustomerInfoContinue=function(){return __awaiter(this,void 0,void 0,(function(){var e,o,t,r,n,s,i,a;var c=this;return __generator(this,(function(u){switch(u.label){case 0:submitGtag("zonos-checkout-customer-info");n=storageStore.checkoutSessionId;void trackConversionEvent({checkoutSessionId:n,eventName:"checkout_customerInfoCompleted"});this.submitLoading=true;return[4,stripeStorePrefetchLandedCost()];case 1:s=u.sent().isRequestNotReady;if(s&&cartStore.addressFormRenderType==="stripe"){void sendErrorLog({endpoint:"ADDRESS_NOT_READY_AT_CUSTOMER_INFO_CONTINUE",errors:["Address not ready at customer info continue"],metadata:{address:(o=(e=stripeStore.stripeAddressEventData)===null||e===void 0?void 0:e.value)===null||o===void 0?void 0:o.address,billingAddress:(r=(t=stripeStore.stripeBillingAddressEventData)===null||t===void 0?void 0:t.value)===null||r===void 0?void 0:r.address,cartId:window.Zonos.cartId}})}i=function(e){if(cartStore.step!=="customer-info"){clearInterval(e);return}if(!stripeStore.isFetchingLandedCost){if(cartStore.landedCostData){void paypalInitScript({currency:cartStore.currency});cartStoreNextStep()}c.submitLoading=false;if(e){clearInterval(e)}}};i();a=setInterval((function(){i(a)}),20);setTimeout((function(){clearInterval(a)}),1e4);return[2]}}))}))};e.prototype.handleShippingContinue=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){cartStoreNextStep();return[2]}))}))};e.prototype.handleInventoryCheckDialogConfirm=function(){cartStore.inventoryCheckErrorMessage=null;if(!this.isLegacyCheckout){void this.closeDialogHandler({confirmed:true})}};e.prototype.handleCartExpiredDialogConfirm=function(){var e;this.isCartExpired=false;if(this.isLegacyCheckout){var o=(e=window.Zonos.cartData)===null||e===void 0?void 0:e.storeBaseUrl;if(!o){return}if(window.parent){window.parent.location.href=o}window.location.href=o;return}if(window.parent){window.parent.location.href=window.location.href}window.location.reload()};e.prototype.handleStripePaymentContinue=function(){return __awaiter(this,void 0,void 0,(function(){var e,o,t,r,n;return __generator(this,(function(s){switch(s.label){case 0:e=stripeStore.checkoutSettlementCurrency==="USD";if(e&&stripeStore.shouldRenderPayInUsdButton&&!this.payInUsdConfirmDialogOpen){this.payInUsdConfirmDialogOpen=true;return[2]}this.payInUsdConfirmDialogOpen=false;paypalStore.paypalErrorMessage=null;stripeStore.hasPaymentError=false;this.submitLoading=true;cartStore.inventoryCheckErrorMessage=null;return[4,stripeStoreUpdateCheckoutSessionBaseCurrency()];case 1:o=s.sent();if(!o){stripeStore.hasPaymentError=true;stripeStore.customErrorMessage=translate("Unable to complete payment in [currency]. Please try again or select a different currency. If the issue persists, contact our support team for assistance.",{currency:stripeStore.checkoutSettlementCurrency});this.submitLoading=false;return[2]}s.label=2;case 2:s.trys.push([2,4,,5]);t=cartStore;return[4,stripeStoreHandleInventoryCheck()];case 3:t.inventoryCheckErrorMessage=s.sent();return[3,5];case 4:r=s.sent();cartStore.inventoryCheckErrorMessage=translate("Unable to check inventory. Please try again.");return[3,5];case 5:if(cartStore.inventoryCheckErrorMessage){this.submitLoading=false;return[2]}s.label=6;case 6:s.trys.push([6,8,,9]);return[4,stripeStoreConfirmPayment()];case 7:s.sent();cartStoreNextStep();cartStoreClearCheckoutInterval();return[3,9];case 8:n=s.sent();logError(n);submitGtag("zonos-checkout-payment-fail");stripeStore.hasPaymentError=true;if(stripeStore.shouldInventoryRefund){void stripeStoreHandleInventoryRefund();stripeStore.shouldInventoryRefund=false}return[3,9];case 9:this.submitLoading=false;return[2]}}))}))};e.prototype.handleFinishClick=function(){return __awaiter(this,void 0,void 0,(function(){var e,o,t,r;return __generator(this,(function(n){switch(n.label){case 0:stripeStoreReset();if(!this.preview)return[3,2];cartStore.step="customer-info";return[4,this.init()];case 1:n.sent();return[2];case 2:cartStoreReset();if(window.Zonos.isLegacyCheckout&&window.Zonos.cartData){e=window.Zonos.cartData.storeBaseUrl||zonosStore.onlineStoreSettings.url;if(window.parent){window.parent.location.href=e}window.location.href=e;return[2]}o=window.location.href;t=o.split("?")[0];this.open=false;r=window.location.hostname.includes("dashboard.zonos.com");if(!r){window.history.replaceState(window.history.state,document.title,t);window.location.reload()}return[2]}}))}))};e.prototype.handleWindowResize=function(){this.isMobile=isCheckoutMobile(this.mobile);void this.applyStripeTheme();log("mobile: ".concat(this.isMobile))};e.prototype.handleMobileChange=function(){this.isMobile=isCheckoutMobile(this.mobile);void this.applyStripeTheme();log("mobile: ".concat(this.isMobile))};e.prototype.handleAppearanceSettingsOverrideChange=function(){var e;if((e=this.appearanceSettingsOverride)===null||e===void 0?void 0:e.theme){this.appearanceSettingsOverride.theme=getZonosStoreTheme(this.appearanceSettingsOverride.theme)}};e.prototype.handleAddressChange=function(){stripeStoreReset()};e.prototype.handleCustomerProfileChange=function(){var e,o;if(!this.customerProfile){log("No customer profile","info");this.defaultCustomerProfileAddress=[];return}log("Customer profile found","info",{customerProfile:this.customerProfile});this.defaultCustomerProfileAddress=((o=(e=stripeStore.customerProfile)===null||e===void 0?void 0:e.locations)===null||o===void 0?void 0:o.map((function(e){var o;return{address:{city:e.locality,country:e.countryCode,line1:e.line1,line2:e.line2||"",postal_code:e.postalCode,state:e.administrativeArea},email:e.email||((o=stripeStore.customerProfile)===null||o===void 0?void 0:o.email)||"",name:e.name||"",phone:e.phone||""}})))||[]};e.prototype.handleClientSecretChange=function(){log("==== Client secret changed","info",{clientSecret:this.clientSecret,stripeCustomerSessionClientSecret:this.stripeCustomerSessionClientSecret});void this.applyStripeTheme()};e.prototype.handleOpenChange=function(){var e="data-zonos-overflow-origin";var o=document.body;var t=document.documentElement;if(this.open){window.Zonos.openHelloDialog(false);if(o.style.overflow){o.setAttribute(e,o.style.overflow)}o.style.overflow="hidden";if(t.style.overflow){t.setAttribute(e,t.style.overflow)}t.style.overflow="hidden"}else{this.stripeCustomerSessionClientSecret=null;var r=o.getAttribute(e);var n=t.getAttribute(e);if(r){o.removeAttribute(e);o.style.overflow=r}else{o.style.removeProperty("overflow")}if(n){t.removeAttribute(e);t.style.overflow=n}else{t.style.removeProperty("overflow")}}};e.prototype.componentWillLoad=function(){var e=this;void this.init();this.isMobile=isCheckoutMobile(this.mobile);this.isIframed=window.self!==window.top;log("iframed: ".concat(this.isIframed));if(window.Zonos.isLegacyCheckout){this.captureParamsRedirectedForVariantTest()}this.handleAppearanceSettingsOverrideChange();this.onChangeLocaleListener=localizationStoreOnChange("selectedLocale",(function(){void e.applyStripeTheme()}));this.initializeTestKeys();window.addEventListener("message",this.handleHostedOpenWindowCallback);log("mobile: ".concat(this.isMobile))};e.prototype.disconnectedCallback=function(){stripeStoreReset();cartStoreReset();this.onChangeLocaleListener();window.removeEventListener("message",this.handleHostedOpenWindowCallback)};e.prototype.render=function(){var e=this;var o,t,r,n;this.customerProfile=stripeStore.customerProfile;this.clientSecret=stripeStore.clientSecret;if(stripeStore.stripeCustomerSessionClientSecret){this.stripeCustomerSessionClientSecret=stripeStore.stripeCustomerSessionClientSecret}var s=cartStore.step!=="finish"&&cartStore.step!=="error"&&!stripeStore.stripeElements||stripeStore.isFetchingSession;var i=mergeConfig(zonosStore.appearance,this.appearanceSettingsOverride||null),a=i.colorPrimary,c=i.colorSecondary,u=i.logoUrl,d=i.style;var l=zonosStore.appearance.zonosAttribution==="ENABLED";var f=zonosStore.appearance.theme;var m=a&&isDarkColor(a)?"DARK":"LIGHT";var v=this.isMobile?f:m;var g=!this.isMobile?c:undefined;var p=localizationStore.customMessages;var z=(o=p.find((function(e){return e.pageName==="checkout_default"})))===null||o===void 0?void 0:o.message;var S=this.getCurrentLocalePageEnum();var k=p.filter((function(e){return e.pageName===S}));var w=this.getBaseCurrencySettlementInfo();var b=function(){var o=e.preview?"".concat(u,"?timestamp=").concat(Date.now()):u;return h("div",{class:"zonos--logo"},o&&h("img",{alt:"".concat(zonosStore.organizationName," logo"),src:o}))};var C=getIsTestMode();var y=function(){var o=new URLSearchParams(window.location.search);var t=o.get("zonosQaUrl");var r=o.get("zonosDebug");var n=o.get("zonosE2ETest");var s=e.overrideStagingMode||getIsStagingMode();return h("zonos-v-stack",null,h("div",{class:"zonos--logo-wrapper"},b(),C&&h("zonos-badge",{badgeColor:"orange",size:"small"},translate("Test mode")),s&&h("zonos-badge",{badgeColor:"red",size:"small"},translate("Staging mode")),r==="1"&&h("zonos-badge",{badgeColor:"cyan",size:"small"},"debug"),t&&h("zonos-badge",{badgeColor:"purple",size:"small"},t),n&&h("zonos-badge",{badgeColor:"gray",size:"small"},"E2E Test")),h("zonos-checkout-progress-tabs",{backgroundColor:e.isMobile?"--zonos-elements-gray-0":null}),k.map((function(e){return h("zonos-custom-message",{icon:MessageIcon,message:e.message})})))};var _=function(){if(cartStore.checkoutSessionTimeoutShow){return h("zonos-rest-state",{class:"zonos--session-timeout",restStateSubtitle:translate("Your checkout session has expired. Please reload the page to continue."),restStateTitle:translate("Session timed out"),restStateType:"Warning"},h("zonos-button",{onClick:function(){return e.reloadCheckoutSession()},variant:"primary"},translate("Reload")))}return h("div",{class:"zonos--content",style:{"--zonos--border-radius":getBorderRadius({overrideBorderStyle:d})}},cartStore.step!=="finish"&&cartStore.step!=="error"&&h(Fragment,null,h("div",{class:"zonos--left","data-theme":v,style:styles({"--zonos--primary-color":!e.isMobile?a:undefined})},!e.isMobile&&y(),cartStore.step==="customer-info"&&h("zonos-customer-info",{continueLoading:e.submitLoading,defaultAddress:e.getDefaultAddress(),isMobile:e.isMobile,onContinueClicked:function(){return e.handleCustomerInfoContinue()},submitBtnColor:g}),cartStore.step==="shipping"&&h("zonos-shipping",{continueLoading:e.submitLoading,onContinueClicked:function(){return e.handleShippingContinue()},submitBtnColor:g}),cartStore.step==="payment"&&h("zonos-checkout-payment",{continueLoading:e.submitLoading,isMobile:e.isMobile,onContinueClicked:function(){return __awaiter(e,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:return[4,this.handleStripePaymentContinue()];case 1:e.sent();return[2]}}))}))},submitBtnColor:g})),h("div",{class:"zonos--right","data-theme":f},e.isMobile&&y(),h("div",{class:"zonos--right-actions"},window.Zonos.showBaseForeign&&h("zonos-currency-toggle",null),!e.isLegacyCheckout&&h("zonos-button",{class:"zonos--close-button",icon:h("zonos-icon",{"aria-label":"Close checkout dialog",content:RemoveIcon}),noBackground:true,onClick:function(){return e.closeDialogHandler()}})),h("div",{class:"flex--wrapper"},h("div",{class:"zonos--wrapper"},h("zonos-review",{collapsed:e.collapseReviewMobile,mobile:e.isMobile,onClick:function(){if(!e.isMobile){return}e.collapseReviewMobile=!e.collapseReviewMobile}}),h("zonos-collapse",{collapsed:e.collapseReviewMobile&&e.isMobile},h("zonos-cart-items",null),e.isMobile&&h("zonos-v-stack",{spacing:16},h("zonos-cart-subtotal",{submitBtnColor:g}),h("zonos-custom-message",{class:"zonos--checkout-default-message",icon:MessageIcon,message:z})))),h("zonos-cart-restricted-items",null),!e.isMobile&&h("zonos-v-stack",{spacing:16},h("zonos-cart-subtotal",null),h("zonos-custom-message",{class:"zonos--checkout-default-message",icon:MessageIcon,message:z}))))),(cartStore.step==="finish"||cartStore.step==="error")&&h("div",{class:"zonos--done","data-theme":f},h("div",{class:"zonos--header"},b(),!e.isRedirectAfterOrder&&h("zonos-button",{class:"zonos--close-button",icon:h("zonos-icon",{"aria-label":"Close checkout dialog",content:RemoveIcon}),noBackground:true,onClick:function(){return e.handleFinishClick()},theme:f})),h("zonos-checkout-finish",{borderRadius:d,onCloseClick:function(){return e.handleFinishClick()},overrideNotification:cartStore.step==="error"&&!!cartStore.error?Object.assign(Object.assign({},cartStore.error),{type:"error"}):undefined,storybookForceStatus:e.storybookPaymentStatusOverride})),h("zonos-checkout-footer",{"data-theme":f,mobile:e.isMobile,slot:!e.isMobile?"dialog-footer":undefined}))};return h(Host,{class:classes(["zonos--checkout zonos--elements",l&&"has-footer",this.preview&&"preview",this.isMobile&&"mobile",this.isIframed&&"iframed",this.hiddenMode&&"hidden-mode"])},this.preview?_():h("zonos-dialog",{borderStyle:d,"data-theme":f,height:"980px",isLoading:s,mobile:this.isMobile,noBodyPadding:true,noBorder:true,noClickOutside:true,noCloseButton:true,onCloseDialog:function(){return e.closeDialogHandler()},open:this.open,width:"1200px"},_()),h("zonos-confirm-dialog",{class:"zonos--close-confirm-dialog",dialogCancelBtnText:translate("Don't close"),dialogConfirmBtnText:translate("Close"),dialogIntent:"warn",dialogOpen:this.confirmDialogOpen,dialogSubtitle:translate("Would you like to close checkout and return to the site?"),dialogTitle:translate("Are you sure?"),onCancelClicked:function(){e.confirmDialogOpen=false},onConfirmClicked:function(){return e.closeDialogHandler({confirmed:true})}}),h("zonos-confirm-dialog",{class:"zonos--order-duplication-dialog",dialogCancelBtnText:translate("Return to merchant site"),dialogConfirmBtnText:translate("Proceed with order"),dialogIntent:"warn",dialogOpen:!!this.placedOrderInfo,dialogSubtitle:((t=this.placedOrderInfo)===null||t===void 0?void 0:t.zonosOrderNumber)?translate("It looks like you placed an order recently ([date] at [time]) under order number #[orderNumber]. Check your email for the order confirmation. Are you sure you want to place another order?",{date:this.formatDate(this.placedOrderInfo.time),orderNumber:this.placedOrderInfo.zonosOrderNumber,time:this.formatTime(this.placedOrderInfo.time)}):translate("It looks like you placed an order recently ([date] at [time]). Check your email for the order confirmation. Are you sure you want to place another one?",{date:this.formatDate(((r=this.placedOrderInfo)===null||r===void 0?void 0:r.time)||null),time:this.formatTime(((n=this.placedOrderInfo)===null||n===void 0?void 0:n.time)||null)}),dialogTitle:translate("Are you sure?"),dialogWidth:530,onCancelClicked:function(){e.handleCancelOrderDuplication()},onConfirmClicked:function(){e.confirmProceedWithOrderDuplication()}}),h("zonos-confirm-dialog",{class:"zonos--inventory-check-failure-dialog",dialogConfirmBtnText:translate("Return to cart"),dialogIntent:"danger",dialogOpen:!!cartStore.inventoryCheckErrorMessage,dialogSubtitle:cartStore.inventoryCheckErrorMessage,dialogTitle:translate("Couldn't place order"),dialogType:"alert",onConfirmClicked:function(){return e.handleInventoryCheckDialogConfirm()}}),w&&h("zonos-confirm-dialog",{class:"zonos--pay-in-usd-dialog",dialogCancelBtnText:translate("Cancel"),dialogConfirmBtnText:translate("Pay [orderTotal]",{orderTotal:currencyFormat({amount:w.settlementAmount,currency:"USD"})}),dialogIntent:"warn",dialogOpen:this.payInUsdConfirmDialogOpen,dialogSubtitle:translate("By paying in USD, your card will be charged directly with no currency conversion. However, using a non-USD based card may result in additional currency conversion fees at the bank level."),dialogTitle:translate("Pay in USD (United States Dollar)?"),dialogType:"confirm",dialogWidth:480,onCancelClicked:function(){e.payInUsdConfirmDialogOpen=false},onConfirmClicked:function(){return e.handleStripePaymentContinue()}}),h("zonos-confirm-dialog",{class:"zonos--shopping-cart-expired-dialog",dialogConfirmBtnText:translate("OK"),dialogIntent:"danger",dialogOpen:this.isCartExpired,dialogSubtitle:translate("You are being sent back to the shop to re-add items to your cart."),dialogTitle:translate("Shopping cart expired"),dialogType:"alert",onConfirmClicked:function(){return e.handleCartExpiredDialogConfirm()}}),h("zonos-loading-overlay",{open:this.isOverlayLoading}))};Object.defineProperty(e,"assetsDirs",{get:function(){return["assets"]},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{appearanceSettingsOverride:["appearanceSettingsOverrideChanged","handleAppearanceSettingsOverrideChange"],overrideStagingMode:["overrideStagingModeChanged"],mobile:["handleMobileChange"],defaultAddress:["handleAddressChange"],customerProfile:["handleCustomerProfileChange"],clientSecret:["handleClientSecretChange"],stripeCustomerSessionClientSecret:["handleClientSecretChange"],open:["handleOpenChange"]}},enumerable:false,configurable:true});return e}();ZonosCheckout.style=ZonosCheckoutStyle0;export{ZonosCheckout as zonos_checkout};
@@ -1 +1 @@
1
- import{r as registerInstance,h,H as Host,a as getElement}from"./index-55a03023.js";import{f as zonosStoreFontFamily}from"./zonosStore-c456b933.js";import"./VarianceTest-fef2d958.js";var zonosCollapseCss=":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{-webkit-transition:all 0.3s ease-in-out;transition:all 0.3s ease-in-out;overflow:hidden}:host div{position:relative}:host iframe{width:0;height:100%;position:absolute;top:0;border:0}";var ZonosCollapseStyle0=zonosCollapseCss;var ZonosCollapse=function(){function t(t){registerInstance(this,t);this.collapsed=false;this.collapseSize=0;this.height=this.el.scrollHeight;this.iframe=null}t.prototype.getElementHeight=function(){var t="".concat(this.height,"px");var o="".concat(this.collapseSize,"px");return this.collapsed?o:t};t.prototype.componentDidLoad=function(){this.height=this.el.scrollHeight};t.prototype.componentDidRender=function(){var t=this;var o,s,e;this.iframe=((o=this.el.shadowRoot)===null||o===void 0?void 0:o.querySelector("iframe"))||null;(e=(s=this.iframe)===null||s===void 0?void 0:s.contentWindow)===null||e===void 0?void 0:e.addEventListener("resize",(function(){if(!t.iframe){return}t.height=parseFloat(getComputedStyle(t.iframe).height)}))};t.prototype.render=function(){var t=this;if(!this.collapsed){setTimeout((function(){if(!t.collapsed){t.el.style.overflow="visible"}}),300)}else{this.el.style.overflow="hidden"}return h(Host,{key:"617e4c1a39bae3c5765ba05c6c7d3585c1822aea",class:"zonos--elements zonos--collapse",style:{"--zonos--font-family":zonosStoreFontFamily(),height:this.getElementHeight()}},h("div",{key:"a4ef3763a3b2d802faacd4cc12dc84cfe9ad55a5"},h("iframe",{key:"f44ea760cb5c088241a737bd9b82ae0eac22f426",class:"height-change-listener",tabindex:"-1",title:"collapse-height-change-listener"}),h("slot",{key:"c01b886c941c6c50753d50cec244701c9854e589"})))};Object.defineProperty(t.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});return t}();ZonosCollapse.style=ZonosCollapseStyle0;export{ZonosCollapse as zonos_collapse};
1
+ import{r as registerInstance,h,H as Host,a as getElement}from"./index-55a03023.js";import{f as zonosStoreFontFamily}from"./zonosStore-c456b933.js";import"./VarianceTest-fef2d958.js";var zonosCollapseCss=":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{-webkit-transition:all 0.3s ease-in-out;transition:all 0.3s ease-in-out;overflow:hidden}:host div{position:relative}:host iframe{width:0;height:100%;position:absolute;top:0;border:0}";var ZonosCollapseStyle0=zonosCollapseCss;var ZonosCollapse=function(){function t(t){registerInstance(this,t);this.collapsed=false;this.collapseSize=0;this.height=this.el.scrollHeight;this.iframe=null}t.prototype.getElementHeight=function(){var t="".concat(this.height,"px");var o="".concat(this.collapseSize,"px");return this.collapsed?o:t};t.prototype.componentDidLoad=function(){this.height=this.el.scrollHeight};t.prototype.componentDidRender=function(){var t=this;var o,s,e;this.iframe=((o=this.el.shadowRoot)===null||o===void 0?void 0:o.querySelector("iframe"))||null;(e=(s=this.iframe)===null||s===void 0?void 0:s.contentWindow)===null||e===void 0?void 0:e.addEventListener("resize",(function(){if(!t.iframe){return}t.height=parseFloat(getComputedStyle(t.iframe).height)}))};t.prototype.render=function(){var t=this;if(!this.collapsed){setTimeout((function(){if(!t.collapsed){t.el.style.overflow="visible"}}),300)}else{this.el.style.overflow="hidden"}return h(Host,{key:"c63b825021f8aaf17727e37072c3701e4a55b992",class:"zonos--elements zonos--collapse",style:{"--zonos--font-family":zonosStoreFontFamily(),height:this.getElementHeight()}},h("div",{key:"bc51b1a1318b0934c752ae74dfeae8d5f43f1a63"},h("iframe",{key:"0bb69f8aaa5c095bc90f2210fab3770491867754",class:"height-change-listener",tabindex:"-1",title:"collapse-height-change-listener"}),h("slot",{key:"64fdc09e82d28f57fd081578ebd2a3523760c7c7"})))};Object.defineProperty(t.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});return t}();ZonosCollapse.style=ZonosCollapseStyle0;export{ZonosCollapse as zonos_collapse};
@@ -1 +1 @@
1
- var __spreadArray=this&&this.__spreadArray||function(o,t,s){if(s||arguments.length===2)for(var e=0,a=t.length,n;e<a;e++){if(n||!(e in t)){if(!n)n=Array.prototype.slice.call(t,0,e);n[e]=t[e]}}return o.concat(n||Array.prototype.slice.call(t))};import{r as registerInstance,d as getAssetPath,h,H as Host}from"./index-55a03023.js";import{e as cartStore}from"./cart-acf4ebf5.js";import{c as cleanHtmlMarkdown}from"./cleanHtmlMarkdown-b5b18743.js";import{f as zonosStoreFontFamily}from"./zonosStore-c456b933.js";import{c as classes}from"./classes-0d95c529.js";import{s as styles}from"./styles-6fc2fad9.js";import"./localization-8646f526.js";import"./handleFetch-99218189.js";import"./VarianceTest-fef2d958.js";import"./translationStore-c9743292.js";import"./isDarkColor-1f58b6be.js";import"./getBorderRadius-87593ff4.js";var 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}";var ZonosCollectCartItemsStyle0=zonosCollectCartItemsCss;var ZonosCollectCartItems=function(){function o(o){registerInstance(this,o);this.errorImages=[]}o.prototype.render=function(){var o=this;var t=getAssetPath("./assets/empty-item.jpeg");var s=cartStore.items.filter((function(o){return!o.isRestricted}));return h(Host,{key:"2f5507537492851b67a5204ab68ce2f938899f23",class:"zonos--collect-cart-items zonos--elements"},h("table",{key:"e648cda9d4c111ecde60291f420178e4e4230b50",class:"zonos--cart-table"},h("tbody",{key:"b266291e61d0df5c0ea3ae8240a3bfb6147edbb4"},s.map((function(s){var e=s.imageUrl;var a=cleanHtmlMarkdown(s.name);return h("tr",{class:"zonos--collect-cart-item"},h("td",{class:"zonos--column zonos--cart-item-image"},e&&!o.errorImages.includes(e)?h("img",{alt:s.name,onError:function(){o.errorImages=__spreadArray(__spreadArray([],o.errorImages,true),[e],false)},src:s.imageUrl,style:{"min-width":"40px"},width:40}):h("img",{alt:s.name,src:t,width:40})),h("td",{class:"zonos--column zonos--cart-item-name"},h("div",null,a.map((function(o){return h("zonos-text",{type:"semiBoldLabel"},o)})))))})))))};Object.defineProperty(o,"assetsDirs",{get:function(){return["assets"]},enumerable:false,configurable:true});return o}();ZonosCollectCartItems.style=ZonosCollectCartItemsStyle0;var zonosHStackCss=":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{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;gap:var(--spacing, 24px)}";var ZonosHStackStyle0=zonosHStackCss;var HStack=function(){function o(o){registerInstance(this,o);this.spacing=24}o.prototype.render=function(){return h(Host,{key:"e78dcb23a7c91df7f7a2533dc65412f27dd6e969",style:{"--spacing":"".concat(this.spacing,"px"),"--zonos--font-family":zonosStoreFontFamily()}},h("slot",{key:"cd668b443c01aea20c589fd4ef30636fb4178d3b"}))};return o}();HStack.style=ZonosHStackStyle0;var zonosSkeletonCss=":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{display:inline-block;background:var(--zonos-elements-gray-200);border-radius:var(--zonos-elements-radius-12);width:var(--zonos--skeleton-width);height:var(--zonos--skeleton-height)}";var ZonosSkeletonStyle0=zonosSkeletonCss;var ZonosSkeleton=function(){function o(o){registerInstance(this,o);this.skeletonWidth="100%";this.skeletonHeight="14px"}o.prototype.render=function(){return h(Host,{key:"e6a000d9ef38aa8ee1c08743830d0b2b0230b4f1",class:classes(["zonos--elements zonos--skeleton"]),style:styles({"--zonos--skeleton-height":this.skeletonHeight,"--zonos--skeleton-width":this.skeletonWidth})})};return o}();ZonosSkeleton.style=ZonosSkeletonStyle0;export{ZonosCollectCartItems as zonos_collect_cart_items,HStack as zonos_h_stack,ZonosSkeleton as zonos_skeleton};
1
+ var __spreadArray=this&&this.__spreadArray||function(o,t,s){if(s||arguments.length===2)for(var e=0,a=t.length,n;e<a;e++){if(n||!(e in t)){if(!n)n=Array.prototype.slice.call(t,0,e);n[e]=t[e]}}return o.concat(n||Array.prototype.slice.call(t))};import{r as registerInstance,d as getAssetPath,h,H as Host}from"./index-55a03023.js";import{e as cartStore}from"./cart-b2dd578c.js";import{c as cleanHtmlMarkdown}from"./cleanHtmlMarkdown-b5b18743.js";import{f as zonosStoreFontFamily}from"./zonosStore-c456b933.js";import{c as classes}from"./classes-0d95c529.js";import{s as styles}from"./styles-6fc2fad9.js";import"./localization-d7125e4e.js";import"./handleFetch-99218189.js";import"./VarianceTest-fef2d958.js";import"./translationStore-13502f49.js";import"./isDarkColor-1f58b6be.js";import"./getBorderRadius-87593ff4.js";var 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}";var ZonosCollectCartItemsStyle0=zonosCollectCartItemsCss;var ZonosCollectCartItems=function(){function o(o){registerInstance(this,o);this.errorImages=[]}o.prototype.render=function(){var o=this;var t=getAssetPath("./assets/empty-item.jpeg");var s=cartStore.items.filter((function(o){return!o.isRestricted}));return h(Host,{key:"2f5507537492851b67a5204ab68ce2f938899f23",class:"zonos--collect-cart-items zonos--elements"},h("table",{key:"e648cda9d4c111ecde60291f420178e4e4230b50",class:"zonos--cart-table"},h("tbody",{key:"b266291e61d0df5c0ea3ae8240a3bfb6147edbb4"},s.map((function(s){var e=s.imageUrl;var a=cleanHtmlMarkdown(s.name);return h("tr",{class:"zonos--collect-cart-item"},h("td",{class:"zonos--column zonos--cart-item-image"},e&&!o.errorImages.includes(e)?h("img",{alt:s.name,onError:function(){o.errorImages=__spreadArray(__spreadArray([],o.errorImages,true),[e],false)},src:s.imageUrl,style:{"min-width":"40px"},width:40}):h("img",{alt:s.name,src:t,width:40})),h("td",{class:"zonos--column zonos--cart-item-name"},h("div",null,a.map((function(o){return h("zonos-text",{type:"semiBoldLabel"},o)})))))})))))};Object.defineProperty(o,"assetsDirs",{get:function(){return["assets"]},enumerable:false,configurable:true});return o}();ZonosCollectCartItems.style=ZonosCollectCartItemsStyle0;var zonosHStackCss=":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{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;gap:var(--spacing, 24px)}";var ZonosHStackStyle0=zonosHStackCss;var HStack=function(){function o(o){registerInstance(this,o);this.spacing=24}o.prototype.render=function(){return h(Host,{key:"92689fdc45c9e980d61f9b96c378ca52ed37a608",style:{"--spacing":"".concat(this.spacing,"px"),"--zonos--font-family":zonosStoreFontFamily()}},h("slot",{key:"b94e0bcd372d0194ba2a86b570914fe33af427cd"}))};return o}();HStack.style=ZonosHStackStyle0;var zonosSkeletonCss=":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{display:inline-block;background:var(--zonos-elements-gray-200);border-radius:var(--zonos-elements-radius-12);width:var(--zonos--skeleton-width);height:var(--zonos--skeleton-height)}";var ZonosSkeletonStyle0=zonosSkeletonCss;var ZonosSkeleton=function(){function o(o){registerInstance(this,o);this.skeletonWidth="100%";this.skeletonHeight="14px"}o.prototype.render=function(){return h(Host,{key:"4ffa2b8c03f0c8d3bd08521d950903cba9685109",class:classes(["zonos--elements zonos--skeleton"]),style:styles({"--zonos--skeleton-height":this.skeletonHeight,"--zonos--skeleton-width":this.skeletonWidth})})};return o}();ZonosSkeleton.style=ZonosSkeletonStyle0;export{ZonosCollectCartItems as zonos_collect_cart_items,HStack as zonos_h_stack,ZonosSkeleton as zonos_skeleton};