@zonos/elements 1.3.231 → 1.3.232

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 (293) hide show
  1. package/dist/cjs/{cart-9b519566.js → cart-bc615014.js} +5 -5
  2. package/dist/cjs/{debounce-2c9f3f1e.js → debounce-815d1517.js} +1 -1
  3. package/dist/cjs/{getBorderRadius-c7d9f676.js → getBorderRadius-2ef1170d.js} +1 -1
  4. package/dist/cjs/{hasInclusivePrice-12605be9.js → hasInclusivePrice-84145546.js} +1 -1
  5. package/dist/cjs/{index-1c710d00.js → index-69fa8852.js} +352 -4
  6. package/dist/cjs/index.cjs.js +7 -7
  7. package/dist/cjs/{isDarkColor-994c38e4.js → isDarkColor-878e600e.js} +1 -1
  8. package/dist/cjs/loader.cjs.js +2 -2
  9. package/dist/cjs/{localization-38af974b.js → localization-39516612.js} +2 -2
  10. package/dist/cjs/{paypal-e8fa2302.js → paypal-1d6f1a71.js} +5 -5
  11. package/dist/cjs/{placeTestOrder-6388881f.js → placeTestOrder-a5469e40.js} +2 -2
  12. package/dist/cjs/{renderFallback-bb2c4bce.js → renderFallback-c2576fbe.js} +4 -4
  13. package/dist/cjs/{translationStore-f2d5eae9.js → translationStore-08d3ff9c.js} +182 -2
  14. package/dist/cjs/{updateCheckoutSessionAttributes-a4899e90.js → updateCheckoutSessionAttributes-3a1db9de.js} +1 -1
  15. package/dist/cjs/zonos-address_11.cjs.entry.js +14 -14
  16. package/dist/cjs/zonos-badge.cjs.entry.js +2 -2
  17. package/dist/cjs/zonos-banner_2.cjs.entry.js +3 -3
  18. package/dist/cjs/zonos-button_3.cjs.entry.js +4 -4
  19. package/dist/cjs/zonos-cart-items_13.cjs.entry.js +126 -18
  20. package/dist/cjs/zonos-checkout.cjs.entry.js +10 -10
  21. package/dist/cjs/zonos-collapse.cjs.entry.js +2 -2
  22. package/dist/cjs/zonos-collect-cart-items_3.cjs.entry.js +7 -7
  23. package/dist/cjs/zonos-collect-finish_6.cjs.entry.js +10 -10
  24. package/dist/cjs/zonos-collect.cjs.entry.js +9 -9
  25. package/dist/cjs/zonos-component.cjs.entry.js +1 -1
  26. package/dist/cjs/zonos-confirm-dialog_2.cjs.entry.js +4 -4
  27. package/dist/cjs/zonos-controller.cjs.entry.js +7 -7
  28. package/dist/cjs/zonos-country-flag.cjs.entry.js +4 -4
  29. package/dist/cjs/zonos-country-select_4.cjs.entry.js +5 -5
  30. package/dist/cjs/zonos-elements.cjs.js +2 -2
  31. package/dist/cjs/zonos-empty-state-payment_4.cjs.entry.js +9 -9
  32. package/dist/cjs/zonos-hello-dialog.cjs.entry.js +5 -5
  33. package/dist/cjs/zonos-hello.cjs.entry.js +5 -5
  34. package/dist/cjs/zonos-input.cjs.entry.js +3 -3
  35. package/dist/cjs/zonos-language-select_2.cjs.entry.js +4 -4
  36. package/dist/cjs/zonos-logo.cjs.entry.js +2 -2
  37. package/dist/cjs/zonos-shipping-rich-radio.cjs.entry.js +3 -3
  38. package/dist/cjs/zonos-stripe-input.cjs.entry.js +4 -4
  39. package/dist/cjs/zonos-text.cjs.entry.js +2 -2
  40. package/dist/cjs/zonos-toggle.cjs.entry.js +2 -2
  41. package/dist/cjs/zonos-tooltip.cjs.entry.js +1 -1
  42. package/dist/cjs/zonos-v-stack.cjs.entry.js +2 -2
  43. package/dist/cjs/{zonosStore-5d489c65.js → zonosStore-37a4b4f4.js} +1 -1
  44. package/dist/collection/components/checkout/zonos-checkout/zonos-customer-info/zonos-customer-info.css +4 -0
  45. package/dist/collection/components/checkout/zonos-checkout/zonos-customer-info/zonos-customer-info.js +115 -6
  46. package/dist/collection/components/store/translationStore/strings.arabic.js +9 -0
  47. package/dist/collection/components/store/translationStore/strings.base.js +9 -0
  48. package/dist/collection/components/store/translationStore/strings.chinese.js +9 -0
  49. package/dist/collection/components/store/translationStore/strings.danish.js +9 -0
  50. package/dist/collection/components/store/translationStore/strings.dutch.js +9 -0
  51. package/dist/collection/components/store/translationStore/strings.french.js +9 -0
  52. package/dist/collection/components/store/translationStore/strings.german.js +9 -0
  53. package/dist/collection/components/store/translationStore/strings.hebrew.js +9 -0
  54. package/dist/collection/components/store/translationStore/strings.indonesian.js +9 -0
  55. package/dist/collection/components/store/translationStore/strings.italian.js +9 -0
  56. package/dist/collection/components/store/translationStore/strings.japanese.js +9 -0
  57. package/dist/collection/components/store/translationStore/strings.korean.js +9 -0
  58. package/dist/collection/components/store/translationStore/strings.norwegian.js +9 -0
  59. package/dist/collection/components/store/translationStore/strings.polish.js +9 -0
  60. package/dist/collection/components/store/translationStore/strings.portuguese.js +9 -0
  61. package/dist/collection/components/store/translationStore/strings.russian.js +9 -0
  62. package/dist/collection/components/store/translationStore/strings.spanish.js +9 -0
  63. package/dist/collection/components/store/translationStore/strings.swedish.js +9 -0
  64. package/dist/collection/components/store/translationStore/strings.turkish.js +9 -0
  65. package/dist/collection/components/store/translationStore/strings.vietnamese.js +9 -0
  66. package/dist/collection/components/store/translationStore.js +1 -1
  67. package/dist/collection/components/stripe/zonos-address/zonos-address.js +1 -1
  68. package/dist/collection/components/stripe/zonos-custom-address/zonos-address-suggestions/zonos-address-suggestions.js +2 -2
  69. package/dist/collection/components/stripe/zonos-custom-address/zonos-custom-address.js +2 -2
  70. package/dist/collection/components/stripe/zonos-link-authentication/zonos-link-authentication.js +1 -1
  71. package/dist/collection/components/stripe/zonos-payment/zonos-payment.js +1 -1
  72. package/dist/collection/types/InputFieldLabel.js +1 -0
  73. package/dist/collection/types/generated/graphql.internal.types.js +488 -1
  74. package/dist/esm/{cart-bc0e1598.js → cart-14f305b3.js} +5 -5
  75. package/dist/esm/{debounce-f081e4d8.js → debounce-c4785346.js} +1 -1
  76. package/dist/esm/{getBorderRadius-6281d902.js → getBorderRadius-877f6389.js} +1 -1
  77. package/dist/esm/{hasInclusivePrice-706cc09d.js → hasInclusivePrice-0eda8ba9.js} +1 -1
  78. package/dist/esm/{index-55a03023.js → index-0bbe9693.js} +352 -4
  79. package/dist/esm/index.js +7 -7
  80. package/dist/esm/{isDarkColor-83e0c27e.js → isDarkColor-9ddd90cc.js} +1 -1
  81. package/dist/esm/loader.js +3 -3
  82. package/dist/esm/{localization-53f67640.js → localization-c5029ffc.js} +2 -2
  83. package/dist/esm/{paypal-3a6a048d.js → paypal-fded8844.js} +5 -5
  84. package/dist/esm/{placeTestOrder-917731cf.js → placeTestOrder-2250f719.js} +2 -2
  85. package/dist/esm/{renderFallback-cd0e40d9.js → renderFallback-dbf1e3ae.js} +4 -4
  86. package/dist/esm/{translationStore-d241dcf7.js → translationStore-690c4e04.js} +182 -2
  87. package/dist/esm/{updateCheckoutSessionAttributes-160720f6.js → updateCheckoutSessionAttributes-047a6cd4.js} +1 -1
  88. package/dist/esm/zonos-address_11.entry.js +14 -14
  89. package/dist/esm/zonos-badge.entry.js +2 -2
  90. package/dist/esm/zonos-banner_2.entry.js +3 -3
  91. package/dist/esm/zonos-button_3.entry.js +4 -4
  92. package/dist/esm/zonos-cart-items_13.entry.js +126 -18
  93. package/dist/esm/zonos-checkout.entry.js +10 -10
  94. package/dist/esm/zonos-collapse.entry.js +2 -2
  95. package/dist/esm/zonos-collect-cart-items_3.entry.js +7 -7
  96. package/dist/esm/zonos-collect-finish_6.entry.js +10 -10
  97. package/dist/esm/zonos-collect.entry.js +9 -9
  98. package/dist/esm/zonos-component.entry.js +1 -1
  99. package/dist/esm/zonos-confirm-dialog_2.entry.js +4 -4
  100. package/dist/esm/zonos-controller.entry.js +7 -7
  101. package/dist/esm/zonos-country-flag.entry.js +4 -4
  102. package/dist/esm/zonos-country-select_4.entry.js +5 -5
  103. package/dist/esm/zonos-elements.js +3 -3
  104. package/dist/esm/zonos-empty-state-payment_4.entry.js +9 -9
  105. package/dist/esm/zonos-hello-dialog.entry.js +5 -5
  106. package/dist/esm/zonos-hello.entry.js +5 -5
  107. package/dist/esm/zonos-input.entry.js +3 -3
  108. package/dist/esm/zonos-language-select_2.entry.js +4 -4
  109. package/dist/esm/zonos-logo.entry.js +2 -2
  110. package/dist/esm/zonos-shipping-rich-radio.entry.js +3 -3
  111. package/dist/esm/zonos-stripe-input.entry.js +4 -4
  112. package/dist/esm/zonos-text.entry.js +2 -2
  113. package/dist/esm/zonos-toggle.entry.js +2 -2
  114. package/dist/esm/zonos-tooltip.entry.js +1 -1
  115. package/dist/esm/zonos-v-stack.entry.js +2 -2
  116. package/dist/esm/{zonosStore-e3d0493a.js → zonosStore-b434e436.js} +1 -1
  117. package/dist/esm-es5/{cart-bc0e1598.js → cart-14f305b3.js} +1 -1
  118. package/dist/esm-es5/{debounce-f081e4d8.js → debounce-c4785346.js} +1 -1
  119. package/dist/esm-es5/{getBorderRadius-6281d902.js → getBorderRadius-877f6389.js} +1 -1
  120. package/dist/esm-es5/{hasInclusivePrice-706cc09d.js → hasInclusivePrice-0eda8ba9.js} +1 -1
  121. package/dist/esm-es5/index-0bbe9693.js +2 -0
  122. package/dist/esm-es5/index.js +1 -1
  123. package/dist/esm-es5/{isDarkColor-83e0c27e.js → isDarkColor-9ddd90cc.js} +1 -1
  124. package/dist/esm-es5/loader.js +1 -1
  125. package/dist/esm-es5/{localization-53f67640.js → localization-c5029ffc.js} +1 -1
  126. package/dist/esm-es5/{paypal-3a6a048d.js → paypal-fded8844.js} +1 -1
  127. package/dist/esm-es5/placeTestOrder-2250f719.js +1 -0
  128. package/dist/esm-es5/{renderFallback-cd0e40d9.js → renderFallback-dbf1e3ae.js} +1 -1
  129. package/dist/esm-es5/translationStore-690c4e04.js +1 -0
  130. package/dist/esm-es5/{updateCheckoutSessionAttributes-160720f6.js → updateCheckoutSessionAttributes-047a6cd4.js} +1 -1
  131. package/dist/esm-es5/zonos-address_11.entry.js +1 -1
  132. package/dist/esm-es5/zonos-badge.entry.js +1 -1
  133. package/dist/esm-es5/zonos-banner_2.entry.js +1 -1
  134. package/dist/esm-es5/zonos-button_3.entry.js +1 -1
  135. package/dist/esm-es5/zonos-cart-items_13.entry.js +1 -1
  136. package/dist/esm-es5/zonos-checkout.entry.js +1 -1
  137. package/dist/esm-es5/zonos-collapse.entry.js +1 -1
  138. package/dist/esm-es5/zonos-collect-cart-items_3.entry.js +1 -1
  139. package/dist/esm-es5/zonos-collect-finish_6.entry.js +1 -1
  140. package/dist/esm-es5/zonos-collect.entry.js +1 -1
  141. package/dist/esm-es5/zonos-component.entry.js +1 -1
  142. package/dist/esm-es5/zonos-confirm-dialog_2.entry.js +1 -1
  143. package/dist/esm-es5/zonos-controller.entry.js +1 -1
  144. package/dist/esm-es5/zonos-country-flag.entry.js +1 -1
  145. package/dist/esm-es5/zonos-country-select_4.entry.js +1 -1
  146. package/dist/esm-es5/zonos-elements.js +1 -1
  147. package/dist/esm-es5/zonos-empty-state-payment_4.entry.js +1 -1
  148. package/dist/esm-es5/zonos-hello-dialog.entry.js +1 -1
  149. package/dist/esm-es5/zonos-hello.entry.js +1 -1
  150. package/dist/esm-es5/zonos-input.entry.js +1 -1
  151. package/dist/esm-es5/zonos-language-select_2.entry.js +1 -1
  152. package/dist/esm-es5/zonos-logo.entry.js +1 -1
  153. package/dist/esm-es5/zonos-shipping-rich-radio.entry.js +1 -1
  154. package/dist/esm-es5/zonos-stripe-input.entry.js +1 -1
  155. package/dist/esm-es5/zonos-text.entry.js +1 -1
  156. package/dist/esm-es5/zonos-toggle.entry.js +1 -1
  157. package/dist/esm-es5/zonos-tooltip.entry.js +1 -1
  158. package/dist/esm-es5/zonos-v-stack.entry.js +1 -1
  159. package/dist/esm-es5/{zonosStore-e3d0493a.js → zonosStore-b434e436.js} +1 -1
  160. package/dist/scripts/index.d.ts +31 -2
  161. package/dist/scripts/index.js +1 -1
  162. package/dist/scripts/loadZonos.js +1 -1
  163. package/dist/scripts/zonos.js +1 -1
  164. package/dist/types/components/checkout/zonos-checkout/zonos-customer-info/zonos-customer-info.d.ts +11 -0
  165. package/dist/types/components/store/translationStore/strings.arabic.d.ts +9 -0
  166. package/dist/types/components/store/translationStore/strings.base.d.ts +9 -0
  167. package/dist/types/components/store/translationStore/strings.chinese.d.ts +9 -0
  168. package/dist/types/components/store/translationStore/strings.danish.d.ts +9 -0
  169. package/dist/types/components/store/translationStore/strings.dutch.d.ts +9 -0
  170. package/dist/types/components/store/translationStore/strings.french.d.ts +9 -0
  171. package/dist/types/components/store/translationStore/strings.german.d.ts +9 -0
  172. package/dist/types/components/store/translationStore/strings.hebrew.d.ts +9 -0
  173. package/dist/types/components/store/translationStore/strings.indonesian.d.ts +9 -0
  174. package/dist/types/components/store/translationStore/strings.italian.d.ts +9 -0
  175. package/dist/types/components/store/translationStore/strings.japanese.d.ts +9 -0
  176. package/dist/types/components/store/translationStore/strings.korean.d.ts +9 -0
  177. package/dist/types/components/store/translationStore/strings.norwegian.d.ts +9 -0
  178. package/dist/types/components/store/translationStore/strings.polish.d.ts +9 -0
  179. package/dist/types/components/store/translationStore/strings.portuguese.d.ts +9 -0
  180. package/dist/types/components/store/translationStore/strings.russian.d.ts +9 -0
  181. package/dist/types/components/store/translationStore/strings.spanish.d.ts +9 -0
  182. package/dist/types/components/store/translationStore/strings.swedish.d.ts +9 -0
  183. package/dist/types/components/store/translationStore/strings.turkish.d.ts +9 -0
  184. package/dist/types/components/store/translationStore/strings.vietnamese.d.ts +9 -0
  185. package/dist/types/components/store/translationStore.d.ts +1 -1
  186. package/dist/types/components/utils/api/getLocaleMessages.d.ts +1 -1
  187. package/dist/types/types/InputFieldLabel.d.ts +1 -0
  188. package/dist/types/types/generated/graphql.frontend.types.d.ts +1 -1
  189. package/dist/types/types/generated/graphql.frontend.types.ts +1 -1
  190. package/dist/types/types/generated/graphql.internal.types.d.ts +503 -3
  191. package/dist/types/types/generated/graphql.internal.types.ts +520 -3
  192. package/dist/zonos-elements/assets/RemoveIcon.svg +1 -1
  193. package/dist/zonos-elements/index.esm.js +1 -1
  194. package/dist/zonos-elements/{p-b91df44b.system.entry.js → p-00ac999f.system.entry.js} +1 -1
  195. package/dist/zonos-elements/{p-4523b982.entry.js → p-00ec22b2.entry.js} +1 -1
  196. package/dist/zonos-elements/{p-0bc8e55c.system.entry.js → p-03ff7b01.system.entry.js} +1 -1
  197. package/dist/zonos-elements/{p-5f7a9b69.system.entry.js → p-0a90dd80.system.entry.js} +1 -1
  198. package/dist/zonos-elements/{p-9a444a82.system.entry.js → p-100f6a88.system.entry.js} +1 -1
  199. package/dist/zonos-elements/{p-d15cd138.entry.js → p-143d706b.entry.js} +1 -1
  200. package/dist/zonos-elements/{p-ee8fcde6.js → p-14d7489d.js} +1 -1
  201. package/dist/zonos-elements/p-1d5aa016.system.js +1 -0
  202. package/dist/zonos-elements/{p-30981f80.entry.js → p-1eae4987.entry.js} +1 -1
  203. package/dist/zonos-elements/p-1f894984.js +1 -0
  204. package/dist/zonos-elements/{p-cb70de13.system.entry.js → p-23b45714.system.entry.js} +1 -1
  205. package/dist/zonos-elements/{p-433d76b4.system.js → p-23d497e3.system.js} +1 -1
  206. package/dist/zonos-elements/{p-7c96a585.js → p-2557b96b.js} +1 -1
  207. package/dist/zonos-elements/{p-f912e9c3.entry.js → p-27874c22.entry.js} +1 -1
  208. package/dist/zonos-elements/{p-ac26a931.entry.js → p-2ca8b037.entry.js} +1 -1
  209. package/dist/zonos-elements/{p-d9486c57.entry.js → p-2dbcecf4.entry.js} +1 -1
  210. package/dist/zonos-elements/{p-db73c11a.entry.js → p-30e835a8.entry.js} +1 -1
  211. package/dist/zonos-elements/{p-ff1722d0.system.entry.js → p-316f9052.system.entry.js} +1 -1
  212. package/dist/zonos-elements/{p-3eda5c2c.entry.js → p-3185968f.entry.js} +1 -1
  213. package/dist/zonos-elements/{p-fa90adb8.entry.js → p-31975752.entry.js} +1 -1
  214. package/dist/zonos-elements/{p-6bab9096.entry.js → p-31af91f0.entry.js} +1 -1
  215. package/dist/zonos-elements/{p-38f42f10.system.entry.js → p-452fb638.system.entry.js} +1 -1
  216. package/dist/zonos-elements/{p-c998e4ed.entry.js → p-4592ae49.entry.js} +1 -1
  217. package/dist/zonos-elements/{p-ff522088.system.entry.js → p-4e41143a.system.entry.js} +1 -1
  218. package/dist/zonos-elements/{p-f548807d.system.entry.js → p-52b87408.system.entry.js} +1 -1
  219. package/dist/zonos-elements/{p-cb11d11b.system.entry.js → p-540cec7e.system.entry.js} +1 -1
  220. package/dist/zonos-elements/{p-d2f7ea09.entry.js → p-55e2e4ed.entry.js} +1 -1
  221. package/dist/zonos-elements/{p-bb707dfd.system.js → p-561be3a2.system.js} +1 -1
  222. package/dist/zonos-elements/{p-a199bb13.js → p-5762e217.js} +1 -1
  223. package/dist/zonos-elements/{p-e688e493.js → p-57fa64d7.js} +1 -1
  224. package/dist/zonos-elements/{p-360d7101.system.entry.js → p-59ebb8c7.system.entry.js} +1 -1
  225. package/dist/zonos-elements/{p-abc0fb80.js → p-5c680f72.js} +1 -1
  226. package/dist/zonos-elements/{p-cbb01de9.entry.js → p-5f398c28.entry.js} +1 -1
  227. package/dist/zonos-elements/p-5f77d19e.js +1 -0
  228. package/dist/zonos-elements/{p-9bdad585.system.entry.js → p-60469388.system.entry.js} +1 -1
  229. package/dist/zonos-elements/{p-7730879e.system.js → p-652e80f0.system.js} +1 -1
  230. package/dist/zonos-elements/{p-4da7b6a8.system.entry.js → p-6adfb3af.system.entry.js} +1 -1
  231. package/dist/zonos-elements/{p-91fa43ef.entry.js → p-74ca7739.entry.js} +1 -1
  232. package/dist/zonos-elements/{p-419c292c.system.js → p-767a31a8.system.js} +1 -1
  233. package/dist/zonos-elements/{p-2eaa5013.system.entry.js → p-770852bf.system.entry.js} +1 -1
  234. package/dist/zonos-elements/{p-f688d7a4.system.js → p-7c705c76.system.js} +1 -1
  235. package/dist/zonos-elements/{p-22338b4a.system.entry.js → p-81ba2820.system.entry.js} +1 -1
  236. package/dist/zonos-elements/{p-2008df67.js → p-82739127.js} +2 -2
  237. package/dist/zonos-elements/p-88ea9f82.entry.js +1 -0
  238. package/dist/zonos-elements/p-8a23bbf5.js +1 -0
  239. package/dist/zonos-elements/{p-bc963b03.entry.js → p-905d2490.entry.js} +1 -1
  240. package/dist/zonos-elements/{p-24e26a2c.system.js → p-909e2bc3.system.js} +1 -1
  241. package/dist/zonos-elements/{p-b658c28a.entry.js → p-936b54c1.entry.js} +1 -1
  242. package/dist/zonos-elements/{p-304bdbc2.system.entry.js → p-93f2e1ee.system.entry.js} +1 -1
  243. package/dist/zonos-elements/p-989d3af9.system.js +2 -0
  244. package/dist/zonos-elements/{p-d96545ae.entry.js → p-9b8750f3.entry.js} +1 -1
  245. package/dist/zonos-elements/{p-55c6ff14.system.entry.js → p-a0a4e43d.system.entry.js} +1 -1
  246. package/dist/zonos-elements/{p-0047fecf.system.js → p-a25428eb.system.js} +1 -1
  247. package/dist/zonos-elements/{p-4697f061.system.entry.js → p-a2819807.system.entry.js} +1 -1
  248. package/dist/zonos-elements/{p-6d423364.entry.js → p-a6e74856.entry.js} +1 -1
  249. package/dist/zonos-elements/p-ab41bab5.js +2 -0
  250. package/dist/zonos-elements/p-ae940a99.js +1 -0
  251. package/dist/zonos-elements/{p-dc56b469.system.entry.js → p-b1fd1ec2.system.entry.js} +1 -1
  252. package/dist/zonos-elements/{p-7af39c98.js → p-b2a0ab4a.js} +1 -1
  253. package/dist/zonos-elements/{p-3f35b8b1.system.entry.js → p-b7ea5f4f.system.entry.js} +1 -1
  254. package/dist/zonos-elements/{p-c81f6387.entry.js → p-bf9d889f.entry.js} +1 -1
  255. package/dist/zonos-elements/p-c1ecab92.entry.js +1 -0
  256. package/dist/zonos-elements/{p-81b357f7.system.js → p-c2442878.system.js} +1 -1
  257. package/dist/zonos-elements/{p-7e5bd9af.system.entry.js → p-c288c6da.system.entry.js} +1 -1
  258. package/dist/zonos-elements/{p-b4bf2f03.entry.js → p-c50cc926.entry.js} +1 -1
  259. package/dist/zonos-elements/{p-b6ef4a5e.system.entry.js → p-c5cb2364.system.entry.js} +1 -1
  260. package/dist/zonos-elements/{p-57413c34.system.js → p-c6e3d747.system.js} +1 -1
  261. package/dist/zonos-elements/{p-2dc38ef3.entry.js → p-c7b658cb.entry.js} +1 -1
  262. package/dist/zonos-elements/p-cf765af3.system.js +1 -0
  263. package/dist/zonos-elements/{p-89c5164b.system.js → p-d45285aa.system.js} +1 -1
  264. package/dist/zonos-elements/{p-bccd49d7.system.entry.js → p-d556c6d1.system.entry.js} +1 -1
  265. package/dist/zonos-elements/{p-1a67ae71.system.entry.js → p-db628e49.system.entry.js} +1 -1
  266. package/dist/zonos-elements/{p-c28da00e.entry.js → p-e03e1a62.entry.js} +1 -1
  267. package/dist/zonos-elements/{p-d852d6da.system.entry.js → p-e7874318.system.entry.js} +1 -1
  268. package/dist/zonos-elements/{p-c20429ea.entry.js → p-e8949e7e.entry.js} +1 -1
  269. package/dist/zonos-elements/{p-3a242dfc.system.js → p-ea0b5d10.system.js} +1 -1
  270. package/dist/zonos-elements/{p-c9be03e0.entry.js → p-eae3462c.entry.js} +1 -1
  271. package/dist/zonos-elements/{p-b669050d.system.entry.js → p-eea0eb57.system.entry.js} +1 -1
  272. package/dist/zonos-elements/p-f892595d.system.entry.js +1 -0
  273. package/dist/zonos-elements/{p-23c46dfa.system.js → p-f8d56ba9.system.js} +1 -1
  274. package/dist/zonos-elements/p-fc776473.js +1 -0
  275. package/dist/zonos-elements/{p-cec35a21.entry.js → p-fd3b46ee.entry.js} +1 -1
  276. package/dist/zonos-elements/zonos-elements.esm.js +1 -1
  277. package/dist/zonos-elements/zonos-elements.js +1 -1
  278. package/package.json +1 -1
  279. package/dist/esm-es5/index-55a03023.js +0 -2
  280. package/dist/esm-es5/placeTestOrder-917731cf.js +0 -1
  281. package/dist/esm-es5/translationStore-d241dcf7.js +0 -1
  282. package/dist/zonos-elements/p-0ffd710e.js +0 -1
  283. package/dist/zonos-elements/p-3f0ca5f9.js +0 -1
  284. package/dist/zonos-elements/p-4f5be8f0.entry.js +0 -1
  285. package/dist/zonos-elements/p-516a9666.system.js +0 -1
  286. package/dist/zonos-elements/p-5fc34563.system.js +0 -2
  287. package/dist/zonos-elements/p-6d563f33.system.entry.js +0 -1
  288. package/dist/zonos-elements/p-7920d79c.system.js +0 -1
  289. package/dist/zonos-elements/p-b30c2ad9.js +0 -2
  290. package/dist/zonos-elements/p-bdeb20cb.js +0 -1
  291. package/dist/zonos-elements/p-c0e080e3.js +0 -1
  292. package/dist/zonos-elements/p-e27a9450.js +0 -1
  293. package/dist/zonos-elements/p-ede9e968.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,F as Fragment,H as Host}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,z as cartStoreOnChange}from"./cart-bc0e1598.js";import{p as paypalStoreHasPaypalEnabled,s as submitGtag,a as paypalStore,b as paypalInitScript}from"./paypal-3a6a048d.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-53f67640.js";import{t as translate}from"./translationStore-d241dcf7.js";import{z as zonosStore,g as getZonosStoreTheme,m as mergeConfig}from"./zonosStore-e3d0493a.js";import{b as buildCartItemsByTempCart}from"./buildCartItemsByTempCart-a117f75d.js";import{h as handleFetch,l as logError,s as sendErrorLog,b as getAdditionalLogMetadata,g as getIsTestMode,j as jsonParse,a as getIsStagingMode,i as isCheckoutMobile}from"./handleFetch-a844cac1.js";import{u as updateCheckoutSessionAttributes}from"./updateCheckoutSessionAttributes-160720f6.js";import{_ as _getIsValidCartId,c as checkoutHiddenBtnSelector,a as checkoutHiddenInternationalBtnSelector,d as domesticRedirectedBtnSelector,g as getAbandonedCartRenewTokenValue}from"./CheckoutConfig-724d7bae.js";import{l as log,g as getElapsedTime,b as allLogs}from"./VarianceTest-572cecf5.js";import{c as classes}from"./classes-0d95c529.js";import{c as createCustomEvent}from"./createCustomEvent-58159025.js";import{g as getBorderRadius}from"./getBorderRadius-6281d902.js";import{i as isDarkColor}from"./isDarkColor-83e0c27e.js";import{s as styles}from"./styles-6fc2fad9.js";import{R as RemoveIcon}from"./RemoveIcon-9dc5dd1a.js";import"./debounce-f081e4d8.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,g=e.isVariantTest;var v=new URLSearchParams;v.set("tempCartUUID",o);if(c){v.set("customerFirstName",c)}if(u){v.set("customerLastName",u)}if(a){v.set("customerEmail",a)}if(d){v.set("customerPhone",d)}if(h){v.set("customerZip",h)}if(s){v.set("customerCity",s)}if(l){v.set("customerState",l)}if(i){v.set("zCountry",i)}if(r){v.set("customerAddress1",r)}if(n){v.set("customerAddress2",n)}if(m){v.set("zonosTestMode","1")}if(t){v.set("zonosCheckoutSessionId",t)}if(g){v.set("zonosVariantTest","1")}return"".concat(f,"?").concat(v.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({isInitializing:false,newSelectedCountryCode: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||0};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||0};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}.zonos--processing-payment.sc-zonos-checkout-h{z-index:2147483646}";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.storeUnsubscribeList=[];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.shouldShowFedexShippingConsentDialog=false;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,g,v,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();g=m-s;void sendLoadNativeCheckoutLog({loadTime:g})}this.recordCheckoutInfo();v=!!getAbandonedCartRenewTokenValue();if(v){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.storeUnsubscribeList=[localizationStoreOnChange("selectedLocale",(function(){void e.applyStripeTheme()})),cartStoreOnChange("selectedShippingOption",(function(){var o,t,r,n;var s=cartStore.selectedShippingOption;if(((o=zonosStore.genericSettings)===null||o===void 0?void 0:o.shouldFedExShippingConsentForCanadianShopper)&&((r=(t=s===null||s===void 0?void 0:s.shippingProfile)===null||t===void 0?void 0:t.serviceLevel.code)===null||r===void 0?void 0:r.toLowerCase().startsWith("fedex."))&&((n=stripeStore.stripeAddressEventData)===null||n===void 0?void 0:n.value.address.country)==="CA"){e.shouldShowFedexShippingConsentDialog=true}}))];this.initializeTestKeys();window.addEventListener("message",this.handleHostedOpenWindowCallback);log("mobile: ".concat(this.isMobile))};e.prototype.disconnectedCallback=function(){stripeStoreReset();cartStoreReset();this.storeUnsubscribeList.forEach((function(e){return e()}));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 g=this.isMobile?f:m;var v=!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 y=getIsTestMode();var b=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(),y&&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":g,style:styles({"--zonos--primary-color":!e.isMobile?a:undefined})},!e.isMobile&&b(),cartStore.step==="customer-info"&&h("zonos-customer-info",{continueLoading:e.submitLoading,defaultAddress:e.getDefaultAddress(),isMobile:e.isMobile,onContinueClicked:function(){return e.handleCustomerInfoContinue()},submitBtnColor:v}),cartStore.step==="shipping"&&h("zonos-shipping",{continueLoading:e.submitLoading,onContinueClicked:function(){return e.handleShippingContinue()},submitBtnColor:v}),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:v})),h("div",{class:"zonos--right","data-theme":f},e.isMobile&&b(),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:v}),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",cartStore.step==="payment"&&"zonos--processing-payment",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--fedex-shipping-dialog",dialogConfirmBtnText:translate("Confirm"),dialogIntent:"info",dialogOpen:!!this.shouldShowFedexShippingConsentDialog,dialogSubtitle:h(Fragment,null,translate("If you select FedEx Ground as your shipping option, you'll need to complete a General Agency Agreement (GAA) after placing your order. This form allows FedEx to clear your package through Canadian customs on your behalf. FedEx will contact you directly—usually by email or phone—with instructions on how to complete the GAA. To avoid delays or the return of your package, please respond promptly to their request."),h("zonos-link",{href:"https://ftn.fedex.com/us/assets/docs/One-Time_GAA.pdf",target:"_blank"},translate("View GAA Form."))),dialogTitle:translate("Fedex Shipping Procedure"),dialogType:"alert",dialogWidth:500,onConfirmClicked:function(){return e.shouldShowFedexShippingConsentDialog=false}}),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,F as Fragment,H as Host}from"./index-0bbe9693.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,z as cartStoreOnChange}from"./cart-14f305b3.js";import{p as paypalStoreHasPaypalEnabled,s as submitGtag,a as paypalStore,b as paypalInitScript}from"./paypal-fded8844.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-c5029ffc.js";import{t as translate}from"./translationStore-690c4e04.js";import{z as zonosStore,g as getZonosStoreTheme,m as mergeConfig}from"./zonosStore-b434e436.js";import{b as buildCartItemsByTempCart}from"./buildCartItemsByTempCart-a117f75d.js";import{h as handleFetch,l as logError,s as sendErrorLog,b as getAdditionalLogMetadata,g as getIsTestMode,j as jsonParse,a as getIsStagingMode,i as isCheckoutMobile}from"./handleFetch-a844cac1.js";import{u as updateCheckoutSessionAttributes}from"./updateCheckoutSessionAttributes-047a6cd4.js";import{_ as _getIsValidCartId,c as checkoutHiddenBtnSelector,a as checkoutHiddenInternationalBtnSelector,d as domesticRedirectedBtnSelector,g as getAbandonedCartRenewTokenValue}from"./CheckoutConfig-724d7bae.js";import{l as log,g as getElapsedTime,b as allLogs}from"./VarianceTest-572cecf5.js";import{c as classes}from"./classes-0d95c529.js";import{c as createCustomEvent}from"./createCustomEvent-58159025.js";import{g as getBorderRadius}from"./getBorderRadius-877f6389.js";import{i as isDarkColor}from"./isDarkColor-9ddd90cc.js";import{s as styles}from"./styles-6fc2fad9.js";import{R as RemoveIcon}from"./RemoveIcon-9dc5dd1a.js";import"./debounce-c4785346.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,g=e.isVariantTest;var v=new URLSearchParams;v.set("tempCartUUID",o);if(c){v.set("customerFirstName",c)}if(u){v.set("customerLastName",u)}if(a){v.set("customerEmail",a)}if(d){v.set("customerPhone",d)}if(h){v.set("customerZip",h)}if(s){v.set("customerCity",s)}if(l){v.set("customerState",l)}if(i){v.set("zCountry",i)}if(r){v.set("customerAddress1",r)}if(n){v.set("customerAddress2",n)}if(m){v.set("zonosTestMode","1")}if(t){v.set("zonosCheckoutSessionId",t)}if(g){v.set("zonosVariantTest","1")}return"".concat(f,"?").concat(v.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({isInitializing:false,newSelectedCountryCode: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||0};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||0};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}.zonos--processing-payment.sc-zonos-checkout-h{z-index:2147483646}";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.storeUnsubscribeList=[];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.shouldShowFedexShippingConsentDialog=false;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,g,v,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();g=m-s;void sendLoadNativeCheckoutLog({loadTime:g})}this.recordCheckoutInfo();v=!!getAbandonedCartRenewTokenValue();if(v){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.storeUnsubscribeList=[localizationStoreOnChange("selectedLocale",(function(){void e.applyStripeTheme()})),cartStoreOnChange("selectedShippingOption",(function(){var o,t,r,n;var s=cartStore.selectedShippingOption;if(((o=zonosStore.genericSettings)===null||o===void 0?void 0:o.shouldFedExShippingConsentForCanadianShopper)&&((r=(t=s===null||s===void 0?void 0:s.shippingProfile)===null||t===void 0?void 0:t.serviceLevel.code)===null||r===void 0?void 0:r.toLowerCase().startsWith("fedex."))&&((n=stripeStore.stripeAddressEventData)===null||n===void 0?void 0:n.value.address.country)==="CA"){e.shouldShowFedexShippingConsentDialog=true}}))];this.initializeTestKeys();window.addEventListener("message",this.handleHostedOpenWindowCallback);log("mobile: ".concat(this.isMobile))};e.prototype.disconnectedCallback=function(){stripeStoreReset();cartStoreReset();this.storeUnsubscribeList.forEach((function(e){return e()}));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 g=this.isMobile?f:m;var v=!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 y=getIsTestMode();var b=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(),y&&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":g,style:styles({"--zonos--primary-color":!e.isMobile?a:undefined})},!e.isMobile&&b(),cartStore.step==="customer-info"&&h("zonos-customer-info",{continueLoading:e.submitLoading,defaultAddress:e.getDefaultAddress(),isMobile:e.isMobile,onContinueClicked:function(){return e.handleCustomerInfoContinue()},submitBtnColor:v}),cartStore.step==="shipping"&&h("zonos-shipping",{continueLoading:e.submitLoading,onContinueClicked:function(){return e.handleShippingContinue()},submitBtnColor:v}),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:v})),h("div",{class:"zonos--right","data-theme":f},e.isMobile&&b(),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:v}),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",cartStore.step==="payment"&&"zonos--processing-payment",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--fedex-shipping-dialog",dialogConfirmBtnText:translate("Confirm"),dialogIntent:"info",dialogOpen:!!this.shouldShowFedexShippingConsentDialog,dialogSubtitle:h(Fragment,null,translate("If you select FedEx Ground as your shipping option, you'll need to complete a General Agency Agreement (GAA) after placing your order. This form allows FedEx to clear your package through Canadian customs on your behalf. FedEx will contact you directly—usually by email or phone—with instructions on how to complete the GAA. To avoid delays or the return of your package, please respond promptly to their request."),h("zonos-link",{href:"https://ftn.fedex.com/us/assets/docs/One-Time_GAA.pdf",target:"_blank"},translate("View GAA Form."))),dialogTitle:translate("Fedex Shipping Procedure"),dialogType:"alert",dialogWidth:500,onConfirmClicked:function(){return e.shouldShowFedexShippingConsentDialog=false}}),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-e3d0493a.js";import"./VarianceTest-572cecf5.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
+ import{r as registerInstance,h,H as Host,a as getElement}from"./index-0bbe9693.js";import{f as zonosStoreFontFamily}from"./zonosStore-b434e436.js";import"./VarianceTest-572cecf5.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-bc0e1598.js";import{c as cleanHtmlMarkdown}from"./cleanHtmlMarkdown-b5b18743.js";import{f as zonosStoreFontFamily}from"./zonosStore-e3d0493a.js";import{c as classes}from"./classes-0d95c529.js";import{s as styles}from"./styles-6fc2fad9.js";import"./localization-53f67640.js";import"./handleFetch-a844cac1.js";import"./VarianceTest-572cecf5.js";import"./translationStore-d241dcf7.js";import"./isDarkColor-83e0c27e.js";import"./getBorderRadius-6281d902.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);min-height:var(--zonos--skeleton-height);max-width:100%}";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};
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-0bbe9693.js";import{e as cartStore}from"./cart-14f305b3.js";import{c as cleanHtmlMarkdown}from"./cleanHtmlMarkdown-b5b18743.js";import{f as zonosStoreFontFamily}from"./zonosStore-b434e436.js";import{c as classes}from"./classes-0d95c529.js";import{s as styles}from"./styles-6fc2fad9.js";import"./localization-c5029ffc.js";import"./handleFetch-a844cac1.js";import"./VarianceTest-572cecf5.js";import"./translationStore-690c4e04.js";import"./isDarkColor-9ddd90cc.js";import"./getBorderRadius-877f6389.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);min-height:var(--zonos--skeleton-height);max-width:100%}";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};