@zonos/elements 1.3.255 → 1.3.257

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 (330) hide show
  1. package/dist/cjs/{cart-4ef52500.js → cart-cd0a054b.js} +4 -4
  2. package/dist/cjs/{debounce-0c75ba33.js → debounce-3e17b4e9.js} +1 -1
  3. package/dist/cjs/{getBorderRadius-27a74844.js → getBorderRadius-db55a464.js} +1 -1
  4. package/dist/cjs/{getContrastColor-cc087c53.js → getContrastColor-8ed1cb48.js} +2 -2
  5. package/dist/cjs/{hasInclusivePrice-4419d03e.js → hasInclusivePrice-3650109c.js} +1 -1
  6. package/dist/cjs/index.cjs.js +7 -7
  7. package/dist/cjs/{invoice-3494b21e.js → invoice-1cea739b.js} +3 -3
  8. package/dist/cjs/{isCollectMobileTablet-92955ce6.js → isCollectMobileTablet-65c71740.js} +3 -3
  9. package/dist/cjs/{isContrastColor-d1936a5c.js → isContrastColor-6a17f408.js} +1 -1
  10. package/dist/cjs/{isDarkColor-a68abf7a.js → isDarkColor-bfe6d1eb.js} +1 -1
  11. package/dist/cjs/loader.cjs.js +1 -1
  12. package/dist/cjs/{localization-75f4ec05.js → localization-adaab93f.js} +295 -20
  13. package/dist/cjs/{paypal-cc3a730b.js → paypal-326d7bc5.js} +5 -5
  14. package/dist/cjs/{placeTestOrder-13901275.js → placeTestOrder-53f2fe97.js} +2 -2
  15. package/dist/cjs/{renderCheckoutCurrency-0003992c.js → renderCheckoutCurrency-cf2e3b93.js} +2 -2
  16. package/dist/cjs/{submitGtag-cb4fb332.js → submitGtag-9ac5a42e.js} +1 -1
  17. package/dist/cjs/{throttle-ff483793.js → throttle-dac93461.js} +2 -2
  18. package/dist/cjs/{updateCheckoutSessionAttributes-8be63b63.js → updateCheckoutSessionAttributes-a3776bb0.js} +1 -1
  19. package/dist/cjs/zonos-address-display_8.cjs.entry.js +7 -7
  20. package/dist/cjs/zonos-address_4.cjs.entry.js +7 -7
  21. package/dist/cjs/zonos-badge.cjs.entry.js +1 -1
  22. package/dist/cjs/zonos-banner.cjs.entry.js +1 -1
  23. package/dist/cjs/zonos-button_3.cjs.entry.js +3 -3
  24. package/dist/cjs/zonos-card_5.cjs.entry.js +8 -8
  25. package/dist/cjs/zonos-cart-items_12.cjs.entry.js +14 -14
  26. package/dist/cjs/zonos-checkbox_2.cjs.entry.js +3 -3
  27. package/dist/cjs/zonos-checkout.cjs.entry.js +364 -85
  28. package/dist/cjs/zonos-collapse.cjs.entry.js +1 -1
  29. package/dist/cjs/zonos-collect-cart-items_3.cjs.entry.js +5 -5
  30. package/dist/cjs/zonos-collect-finish_6.cjs.entry.js +11 -11
  31. package/dist/cjs/zonos-collect.cjs.entry.js +9 -9
  32. package/dist/cjs/zonos-controller.cjs.entry.js +6 -6
  33. package/dist/cjs/zonos-country-flag.cjs.entry.js +2 -2
  34. package/dist/cjs/zonos-country-select_4.cjs.entry.js +3 -3
  35. package/dist/cjs/zonos-elements.cjs.js +1 -1
  36. package/dist/cjs/zonos-hello-dialog.cjs.entry.js +3 -3
  37. package/dist/cjs/zonos-hello.cjs.entry.js +38 -15
  38. package/dist/cjs/zonos-input.cjs.entry.js +2 -2
  39. package/dist/cjs/zonos-invoice-cart-items_2.cjs.entry.js +7 -7
  40. package/dist/cjs/zonos-invoice-finish_5.cjs.entry.js +11 -11
  41. package/dist/cjs/zonos-invoice.cjs.entry.js +9 -9
  42. package/dist/cjs/zonos-language-select_2.cjs.entry.js +2 -2
  43. package/dist/cjs/zonos-logo.cjs.entry.js +1 -1
  44. package/dist/cjs/zonos-shipping-rich-radio.cjs.entry.js +5 -5
  45. package/dist/cjs/zonos-store-credit.cjs.entry.js +6 -6
  46. package/dist/cjs/zonos-stripe-input.cjs.entry.js +3 -3
  47. package/dist/cjs/zonos-text.cjs.entry.js +1 -1
  48. package/dist/cjs/zonos-v-stack.cjs.entry.js +1 -1
  49. package/dist/cjs/{zonosStore-f5a61112.js → zonosStore-1c517e55.js} +0 -1
  50. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.js +60 -2
  51. package/dist/collection/components/hello/zonos-hello/zonos-hello.js +35 -12
  52. package/dist/collection/components/store/hello/localization.js +54 -19
  53. package/dist/collection/components/store/translationStore/strings.arabic.js +12 -0
  54. package/dist/collection/components/store/translationStore/strings.base.js +12 -0
  55. package/dist/collection/components/store/translationStore/strings.chinese.js +12 -0
  56. package/dist/collection/components/store/translationStore/strings.danish.js +12 -0
  57. package/dist/collection/components/store/translationStore/strings.dutch.js +12 -0
  58. package/dist/collection/components/store/translationStore/strings.french.js +12 -0
  59. package/dist/collection/components/store/translationStore/strings.german.js +12 -0
  60. package/dist/collection/components/store/translationStore/strings.hebrew.js +12 -0
  61. package/dist/collection/components/store/translationStore/strings.indonesian.js +12 -0
  62. package/dist/collection/components/store/translationStore/strings.italian.js +12 -0
  63. package/dist/collection/components/store/translationStore/strings.japanese.js +12 -0
  64. package/dist/collection/components/store/translationStore/strings.korean.js +12 -0
  65. package/dist/collection/components/store/translationStore/strings.norwegian.js +12 -0
  66. package/dist/collection/components/store/translationStore/strings.polish.js +12 -0
  67. package/dist/collection/components/store/translationStore/strings.portuguese.js +12 -0
  68. package/dist/collection/components/store/translationStore/strings.russian.js +12 -0
  69. package/dist/collection/components/store/translationStore/strings.spanish.js +12 -0
  70. package/dist/collection/components/store/translationStore/strings.swedish.js +12 -0
  71. package/dist/collection/components/store/translationStore/strings.turkish.js +12 -0
  72. package/dist/collection/components/store/translationStore/strings.vietnamese.js +12 -0
  73. package/dist/collection/components/store/zonosStore.js +0 -1
  74. package/dist/collection/components/utils/checkout/bigcommerceStorefrontApi.js +52 -0
  75. package/dist/collection/components/utils/checkout/buildBigcommerceRedirectUrl.js +22 -0
  76. package/dist/collection/components/utils/checkout/checkBigCommerceBypassCustomerGroup.js +122 -0
  77. package/dist/collection/components/utils/checkout/watchBigcommerceDomesticCheckout.js +5 -2
  78. package/dist/collection/components/utils/checkout/watchImmediateBigcommerceDomesticCheckoutRedirect.js +120 -86
  79. package/dist/collection/types/generated/graphql.internal.types.js +446 -0
  80. package/dist/esm/{cart-f4e43d1a.js → cart-4cd47a1b.js} +4 -4
  81. package/dist/esm/{debounce-efc0e473.js → debounce-8faafc9f.js} +1 -1
  82. package/dist/esm/{getBorderRadius-c21a42e5.js → getBorderRadius-66de1b16.js} +1 -1
  83. package/dist/esm/{getContrastColor-98f0d1d5.js → getContrastColor-e14f95a7.js} +2 -2
  84. package/dist/esm/{hasInclusivePrice-0439b7f4.js → hasInclusivePrice-7a3dc4c3.js} +1 -1
  85. package/dist/esm/index.js +7 -7
  86. package/dist/esm/{invoice-3d8f3fa8.js → invoice-03ff7bbb.js} +3 -3
  87. package/dist/esm/{isCollectMobileTablet-0402aa32.js → isCollectMobileTablet-9eb77c9a.js} +3 -3
  88. package/dist/esm/{isContrastColor-c17e83c9.js → isContrastColor-f9e65e70.js} +1 -1
  89. package/dist/esm/{isDarkColor-3537021b.js → isDarkColor-8092a9fb.js} +1 -1
  90. package/dist/esm/loader.js +1 -1
  91. package/dist/esm/{localization-026da80b.js → localization-79e08480.js} +295 -20
  92. package/dist/esm/{paypal-07bd6b7c.js → paypal-67c86683.js} +5 -5
  93. package/dist/esm/{placeTestOrder-39de11f4.js → placeTestOrder-e81fff15.js} +2 -2
  94. package/dist/esm/{renderCheckoutCurrency-743f7c77.js → renderCheckoutCurrency-1fc00db4.js} +2 -2
  95. package/dist/esm/{submitGtag-13de9f1f.js → submitGtag-543058f9.js} +1 -1
  96. package/dist/esm/{throttle-0504ba2c.js → throttle-5a66b4fd.js} +2 -2
  97. package/dist/esm/{updateCheckoutSessionAttributes-b9f7e982.js → updateCheckoutSessionAttributes-8f3f932e.js} +1 -1
  98. package/dist/esm/zonos-address-display_8.entry.js +7 -7
  99. package/dist/esm/zonos-address_4.entry.js +7 -7
  100. package/dist/esm/zonos-badge.entry.js +1 -1
  101. package/dist/esm/zonos-banner.entry.js +1 -1
  102. package/dist/esm/zonos-button_3.entry.js +3 -3
  103. package/dist/esm/zonos-card_5.entry.js +8 -8
  104. package/dist/esm/zonos-cart-items_12.entry.js +14 -14
  105. package/dist/esm/zonos-checkbox_2.entry.js +3 -3
  106. package/dist/esm/zonos-checkout.entry.js +365 -86
  107. package/dist/esm/zonos-collapse.entry.js +1 -1
  108. package/dist/esm/zonos-collect-cart-items_3.entry.js +5 -5
  109. package/dist/esm/zonos-collect-finish_6.entry.js +11 -11
  110. package/dist/esm/zonos-collect.entry.js +9 -9
  111. package/dist/esm/zonos-controller.entry.js +6 -6
  112. package/dist/esm/zonos-country-flag.entry.js +2 -2
  113. package/dist/esm/zonos-country-select_4.entry.js +3 -3
  114. package/dist/esm/zonos-elements.js +1 -1
  115. package/dist/esm/zonos-hello-dialog.entry.js +3 -3
  116. package/dist/esm/zonos-hello.entry.js +38 -15
  117. package/dist/esm/zonos-input.entry.js +2 -2
  118. package/dist/esm/zonos-invoice-cart-items_2.entry.js +7 -7
  119. package/dist/esm/zonos-invoice-finish_5.entry.js +11 -11
  120. package/dist/esm/zonos-invoice.entry.js +9 -9
  121. package/dist/esm/zonos-language-select_2.entry.js +2 -2
  122. package/dist/esm/zonos-logo.entry.js +1 -1
  123. package/dist/esm/zonos-shipping-rich-radio.entry.js +5 -5
  124. package/dist/esm/zonos-store-credit.entry.js +6 -6
  125. package/dist/esm/zonos-stripe-input.entry.js +3 -3
  126. package/dist/esm/zonos-text.entry.js +1 -1
  127. package/dist/esm/zonos-v-stack.entry.js +1 -1
  128. package/dist/esm/{zonosStore-5242a58d.js → zonosStore-f1d45eac.js} +0 -1
  129. package/dist/esm-es5/{cart-f4e43d1a.js → cart-4cd47a1b.js} +1 -1
  130. package/dist/esm-es5/{debounce-efc0e473.js → debounce-8faafc9f.js} +1 -1
  131. package/dist/esm-es5/{getBorderRadius-c21a42e5.js → getBorderRadius-66de1b16.js} +1 -1
  132. package/dist/esm-es5/{getContrastColor-98f0d1d5.js → getContrastColor-e14f95a7.js} +1 -1
  133. package/dist/esm-es5/{hasInclusivePrice-0439b7f4.js → hasInclusivePrice-7a3dc4c3.js} +1 -1
  134. package/dist/esm-es5/index.js +1 -1
  135. package/dist/esm-es5/{invoice-3d8f3fa8.js → invoice-03ff7bbb.js} +1 -1
  136. package/dist/esm-es5/{isCollectMobileTablet-0402aa32.js → isCollectMobileTablet-9eb77c9a.js} +1 -1
  137. package/dist/esm-es5/{isContrastColor-c17e83c9.js → isContrastColor-f9e65e70.js} +1 -1
  138. package/dist/esm-es5/{isDarkColor-3537021b.js → isDarkColor-8092a9fb.js} +1 -1
  139. package/dist/esm-es5/loader.js +1 -1
  140. package/dist/esm-es5/localization-79e08480.js +1 -0
  141. package/dist/esm-es5/{paypal-07bd6b7c.js → paypal-67c86683.js} +2 -2
  142. package/dist/esm-es5/{placeTestOrder-39de11f4.js → placeTestOrder-e81fff15.js} +1 -1
  143. package/dist/esm-es5/{renderCheckoutCurrency-743f7c77.js → renderCheckoutCurrency-1fc00db4.js} +1 -1
  144. package/dist/esm-es5/{submitGtag-13de9f1f.js → submitGtag-543058f9.js} +1 -1
  145. package/dist/esm-es5/{throttle-0504ba2c.js → throttle-5a66b4fd.js} +1 -1
  146. package/dist/esm-es5/{updateCheckoutSessionAttributes-b9f7e982.js → updateCheckoutSessionAttributes-8f3f932e.js} +1 -1
  147. package/dist/esm-es5/zonos-address-display_8.entry.js +1 -1
  148. package/dist/esm-es5/zonos-address_4.entry.js +1 -1
  149. package/dist/esm-es5/zonos-badge.entry.js +1 -1
  150. package/dist/esm-es5/zonos-banner.entry.js +1 -1
  151. package/dist/esm-es5/zonos-button_3.entry.js +1 -1
  152. package/dist/esm-es5/zonos-card_5.entry.js +1 -1
  153. package/dist/esm-es5/zonos-cart-items_12.entry.js +1 -1
  154. package/dist/esm-es5/zonos-checkbox_2.entry.js +1 -1
  155. package/dist/esm-es5/zonos-checkout.entry.js +1 -1
  156. package/dist/esm-es5/zonos-collapse.entry.js +1 -1
  157. package/dist/esm-es5/zonos-collect-cart-items_3.entry.js +1 -1
  158. package/dist/esm-es5/zonos-collect-finish_6.entry.js +1 -1
  159. package/dist/esm-es5/zonos-collect.entry.js +1 -1
  160. package/dist/esm-es5/zonos-controller.entry.js +1 -1
  161. package/dist/esm-es5/zonos-country-flag.entry.js +1 -1
  162. package/dist/esm-es5/zonos-country-select_4.entry.js +1 -1
  163. package/dist/esm-es5/zonos-elements.js +1 -1
  164. package/dist/esm-es5/zonos-hello-dialog.entry.js +1 -1
  165. package/dist/esm-es5/zonos-hello.entry.js +1 -1
  166. package/dist/esm-es5/zonos-input.entry.js +1 -1
  167. package/dist/esm-es5/zonos-invoice-cart-items_2.entry.js +1 -1
  168. package/dist/esm-es5/zonos-invoice-finish_5.entry.js +1 -1
  169. package/dist/esm-es5/zonos-invoice.entry.js +1 -1
  170. package/dist/esm-es5/zonos-language-select_2.entry.js +1 -1
  171. package/dist/esm-es5/zonos-logo.entry.js +1 -1
  172. package/dist/esm-es5/zonos-shipping-rich-radio.entry.js +1 -1
  173. package/dist/esm-es5/zonos-store-credit.entry.js +1 -1
  174. package/dist/esm-es5/zonos-stripe-input.entry.js +1 -1
  175. package/dist/esm-es5/zonos-text.entry.js +1 -1
  176. package/dist/esm-es5/zonos-v-stack.entry.js +1 -1
  177. package/dist/esm-es5/{zonosStore-5242a58d.js → zonosStore-f1d45eac.js} +1 -1
  178. package/dist/scripts/index.d.ts +107 -8
  179. package/dist/scripts/index.js +1 -1
  180. package/dist/scripts/loadZonos.js +1 -1
  181. package/dist/scripts/zonos.js +1 -1
  182. package/dist/types/components/checkout/zonos-checkout/zonos-checkout.d.ts +13 -0
  183. package/dist/types/components/store/translationStore/strings.arabic.d.ts +12 -0
  184. package/dist/types/components/store/translationStore/strings.base.d.ts +12 -0
  185. package/dist/types/components/store/translationStore/strings.chinese.d.ts +12 -0
  186. package/dist/types/components/store/translationStore/strings.danish.d.ts +12 -0
  187. package/dist/types/components/store/translationStore/strings.dutch.d.ts +12 -0
  188. package/dist/types/components/store/translationStore/strings.french.d.ts +12 -0
  189. package/dist/types/components/store/translationStore/strings.german.d.ts +12 -0
  190. package/dist/types/components/store/translationStore/strings.hebrew.d.ts +12 -0
  191. package/dist/types/components/store/translationStore/strings.indonesian.d.ts +12 -0
  192. package/dist/types/components/store/translationStore/strings.italian.d.ts +12 -0
  193. package/dist/types/components/store/translationStore/strings.japanese.d.ts +12 -0
  194. package/dist/types/components/store/translationStore/strings.korean.d.ts +12 -0
  195. package/dist/types/components/store/translationStore/strings.norwegian.d.ts +12 -0
  196. package/dist/types/components/store/translationStore/strings.polish.d.ts +12 -0
  197. package/dist/types/components/store/translationStore/strings.portuguese.d.ts +12 -0
  198. package/dist/types/components/store/translationStore/strings.russian.d.ts +12 -0
  199. package/dist/types/components/store/translationStore/strings.spanish.d.ts +12 -0
  200. package/dist/types/components/store/translationStore/strings.swedish.d.ts +12 -0
  201. package/dist/types/components/store/translationStore/strings.turkish.d.ts +12 -0
  202. package/dist/types/components/store/translationStore/strings.vietnamese.d.ts +12 -0
  203. package/dist/types/components/utils/api/getLocaleMessages.d.ts +1 -1
  204. package/dist/types/components/utils/checkout/bigcommerceStorefrontApi.d.ts +36 -0
  205. package/dist/types/components/utils/checkout/buildBigcommerceRedirectUrl.d.ts +11 -0
  206. package/dist/types/components/utils/checkout/checkBigCommerceBypassCustomerGroup.d.ts +30 -0
  207. package/dist/types/components/utils/checkout/watchImmediateBigcommerceDomesticCheckoutRedirect.d.ts +16 -1
  208. package/dist/types/scripts/cart/_setupCartDataWithSettings.d.ts +18 -6
  209. package/dist/types/types/generated/graphql.frontend.types.d.ts +1 -1
  210. package/dist/types/types/generated/graphql.frontend.types.ts +1 -1
  211. package/dist/types/types/generated/graphql.internal.types.d.ts +532 -11
  212. package/dist/types/types/generated/graphql.internal.types.ts +600 -11
  213. package/dist/types/types/hello/HelloConfig.d.ts +22 -3
  214. package/dist/types/types/utils/ZonosSettings.d.ts +7 -0
  215. package/dist/zonos-elements/index.esm.js +1 -1
  216. package/dist/zonos-elements/{p-568c5700.system.entry.js → p-0740f8a4.system.entry.js} +1 -1
  217. package/dist/zonos-elements/p-09307a03.js +1 -0
  218. package/dist/zonos-elements/{p-1bdac1d3.entry.js → p-0ca6ee9b.entry.js} +1 -1
  219. package/dist/zonos-elements/p-0e83d193.js +1 -0
  220. package/dist/zonos-elements/{p-9b12f023.system.entry.js → p-0f4822cc.system.entry.js} +1 -1
  221. package/dist/zonos-elements/{p-8d5f928c.system.entry.js → p-1368dce7.system.entry.js} +1 -1
  222. package/dist/zonos-elements/{p-ac30b7a8.system.js → p-15ef7644.system.js} +1 -1
  223. package/dist/zonos-elements/{p-ab25379f.system.js → p-17a8a514.system.js} +1 -1
  224. package/dist/zonos-elements/{p-0649737d.entry.js → p-21519ebe.entry.js} +1 -1
  225. package/dist/zonos-elements/{p-16a80e3c.system.js → p-22bb7836.system.js} +1 -1
  226. package/dist/zonos-elements/p-271eebd3.system.js +1 -0
  227. package/dist/zonos-elements/p-29b60bf3.system.js +1 -1
  228. package/dist/zonos-elements/{p-d397560e.system.entry.js → p-2c1c6d60.system.entry.js} +1 -1
  229. package/dist/zonos-elements/{p-908f13ae.js → p-2f924331.js} +1 -1
  230. package/dist/zonos-elements/{p-4aefd668.entry.js → p-2fa41e93.entry.js} +1 -1
  231. package/dist/zonos-elements/{p-9e98a256.system.entry.js → p-3092ec40.system.entry.js} +1 -1
  232. package/dist/zonos-elements/{p-dbb3db89.system.entry.js → p-313b87f3.system.entry.js} +1 -1
  233. package/dist/zonos-elements/{p-c9d4eb42.entry.js → p-3576d900.entry.js} +1 -1
  234. package/dist/zonos-elements/{p-a6cc56ba.entry.js → p-3675766a.entry.js} +1 -1
  235. package/dist/zonos-elements/p-380143db.entry.js +1 -0
  236. package/dist/zonos-elements/{p-4f7d64f6.js → p-387f6a4d.js} +1 -1
  237. package/dist/zonos-elements/{p-d168be79.system.entry.js → p-3fc43187.system.entry.js} +1 -1
  238. package/dist/zonos-elements/{p-a1c476d6.system.entry.js → p-3ff736f7.system.entry.js} +1 -1
  239. package/dist/zonos-elements/{p-d938fb86.entry.js → p-429c1d0c.entry.js} +1 -1
  240. package/dist/zonos-elements/{p-8c6624b6.system.js → p-43a6e469.system.js} +1 -1
  241. package/dist/zonos-elements/{p-5678c5b5.system.entry.js → p-4a84387a.system.entry.js} +1 -1
  242. package/dist/zonos-elements/{p-af83f0c2.js → p-4e2262e8.js} +1 -1
  243. package/dist/zonos-elements/p-53fe581b.system.js +1 -0
  244. package/dist/zonos-elements/{p-3e03b2e8.entry.js → p-5818f4a7.entry.js} +1 -1
  245. package/dist/zonos-elements/{p-f830f800.js → p-5beab541.js} +1 -1
  246. package/dist/zonos-elements/{p-d18a2b2c.system.js → p-61be7d98.system.js} +1 -1
  247. package/dist/zonos-elements/{p-70c8a47d.system.entry.js → p-62dbc5f8.system.entry.js} +1 -1
  248. package/dist/zonos-elements/{p-6ce8374e.entry.js → p-6b83ac7f.entry.js} +1 -1
  249. package/dist/zonos-elements/p-6bcbe651.js +1 -0
  250. package/dist/zonos-elements/{p-835c0bd4.js → p-7559c494.js} +1 -1
  251. package/dist/zonos-elements/{p-8f1ab25c.system.entry.js → p-770d414a.system.entry.js} +1 -1
  252. package/dist/zonos-elements/{p-7427dd1e.entry.js → p-7a379538.entry.js} +1 -1
  253. package/dist/zonos-elements/{p-fbe22363.entry.js → p-7aeb496e.entry.js} +1 -1
  254. package/dist/zonos-elements/p-7caa75bb.js +1 -0
  255. package/dist/zonos-elements/p-7cbbf483.system.js +1 -0
  256. package/dist/zonos-elements/p-7d9bbdc8.js +1 -0
  257. package/dist/zonos-elements/{p-e12f7a97.entry.js → p-80ba5f70.entry.js} +1 -1
  258. package/dist/zonos-elements/{p-2b10f633.system.js → p-8adc0a13.system.js} +1 -1
  259. package/dist/zonos-elements/{p-b45538a7.system.entry.js → p-8b35e475.system.entry.js} +1 -1
  260. package/dist/zonos-elements/p-8bce79f4.system.js +1 -0
  261. package/dist/zonos-elements/{p-c398711f.js → p-8ed0fad5.js} +2 -2
  262. package/dist/zonos-elements/{p-18d411c3.system.entry.js → p-9161f10d.system.entry.js} +1 -1
  263. package/dist/zonos-elements/{p-f888db89.entry.js → p-91eeccaa.entry.js} +1 -1
  264. package/dist/zonos-elements/p-944bf0e7.js +1 -0
  265. package/dist/zonos-elements/{p-3730d555.system.entry.js → p-9d435f12.system.entry.js} +1 -1
  266. package/dist/zonos-elements/{p-db0b35a2.system.entry.js → p-9f3aab4e.system.entry.js} +1 -1
  267. package/dist/zonos-elements/{p-231edcca.entry.js → p-a60544cc.entry.js} +1 -1
  268. package/dist/zonos-elements/{p-33fc0c8f.entry.js → p-a7b0345b.entry.js} +1 -1
  269. package/dist/zonos-elements/{p-aabb921f.system.js → p-a90c977a.system.js} +1 -1
  270. package/dist/zonos-elements/{p-a1835bae.system.entry.js → p-aa3e3438.system.entry.js} +1 -1
  271. package/dist/zonos-elements/p-ac7b93c9.js +1 -0
  272. package/dist/zonos-elements/{p-5359ba71.entry.js → p-b3824361.entry.js} +1 -1
  273. package/dist/zonos-elements/{p-9d9792b9.system.entry.js → p-b414b484.system.entry.js} +1 -1
  274. package/dist/zonos-elements/{p-50aac43c.system.js → p-b53856bf.system.js} +1 -1
  275. package/dist/zonos-elements/{p-2aa44601.entry.js → p-bb6e7e9e.entry.js} +1 -1
  276. package/dist/zonos-elements/{p-939ba2a5.entry.js → p-bb785f33.entry.js} +1 -1
  277. package/dist/zonos-elements/{p-5f628e57.entry.js → p-bcbbe867.entry.js} +1 -1
  278. package/dist/zonos-elements/p-c2139758.entry.js +1 -0
  279. package/dist/zonos-elements/{p-3814aac3.system.entry.js → p-c23e2501.system.entry.js} +1 -1
  280. package/dist/zonos-elements/{p-2baa21b1.entry.js → p-c585d169.entry.js} +1 -1
  281. package/dist/zonos-elements/{p-ed61dedd.system.entry.js → p-c7ecef98.system.entry.js} +1 -1
  282. package/dist/zonos-elements/{p-ee217693.entry.js → p-c908a7a3.entry.js} +1 -1
  283. package/dist/zonos-elements/p-cd563d65.system.js +1 -0
  284. package/dist/zonos-elements/{p-ddcbea81.entry.js → p-cdbb50cf.entry.js} +1 -1
  285. package/dist/zonos-elements/{p-2affd4e6.entry.js → p-ce2fd652.entry.js} +1 -1
  286. package/dist/zonos-elements/{p-4e4fa1fb.system.entry.js → p-d004565d.system.entry.js} +1 -1
  287. package/dist/zonos-elements/{p-5e3e5e3e.system.js → p-d0690cdc.system.js} +1 -1
  288. package/dist/zonos-elements/{p-fe6cc354.entry.js → p-d30e8c3a.entry.js} +1 -1
  289. package/dist/zonos-elements/p-da7e1143.system.entry.js +1 -0
  290. package/dist/zonos-elements/p-ddb27b4a.entry.js +1 -0
  291. package/dist/zonos-elements/{p-234f0339.system.entry.js → p-dfb4360d.system.entry.js} +1 -1
  292. package/dist/zonos-elements/{p-66758e30.system.entry.js → p-e173fbd1.system.entry.js} +1 -1
  293. package/dist/zonos-elements/{p-3fbd9cc0.system.js → p-e25e0b4b.system.js} +1 -1
  294. package/dist/zonos-elements/{p-cc364b26.system.entry.js → p-e3f9779a.system.entry.js} +1 -1
  295. package/dist/zonos-elements/{p-0d18d94b.entry.js → p-e55bc187.entry.js} +1 -1
  296. package/dist/zonos-elements/{p-0aa1c8c2.system.js → p-e56f5954.system.js} +1 -1
  297. package/dist/zonos-elements/{p-06b4aa32.system.js → p-e5f5b086.system.js} +1 -1
  298. package/dist/zonos-elements/{p-dafafa07.js → p-e62342c3.js} +1 -1
  299. package/dist/zonos-elements/p-e6726a50.system.js +1 -0
  300. package/dist/zonos-elements/{p-274a5d11.system.entry.js → p-e6feafc1.system.entry.js} +1 -1
  301. package/dist/zonos-elements/{p-b004146f.entry.js → p-e749fb81.entry.js} +1 -1
  302. package/dist/zonos-elements/{p-27e41b44.system.entry.js → p-e80832cb.system.entry.js} +1 -1
  303. package/dist/zonos-elements/{p-12f480c9.system.entry.js → p-e9f36d6b.system.entry.js} +1 -1
  304. package/dist/zonos-elements/{p-058f6124.js → p-ed9385f4.js} +1 -1
  305. package/dist/zonos-elements/p-f68ce554.js +1 -0
  306. package/dist/zonos-elements/{p-67897a0d.js → p-f6922df5.js} +1 -1
  307. package/dist/zonos-elements/{p-f0938b51.system.entry.js → p-f7ddd288.system.entry.js} +1 -1
  308. package/dist/zonos-elements/{p-38881641.system.entry.js → p-fbc274a8.system.entry.js} +1 -1
  309. package/dist/zonos-elements/{p-d2bba4dc.entry.js → p-fed19033.entry.js} +1 -1
  310. package/dist/zonos-elements/zonos-elements.esm.js +1 -1
  311. package/package.json +1 -1
  312. package/dist/esm-es5/localization-026da80b.js +0 -1
  313. package/dist/zonos-elements/p-0d4af7e9.system.entry.js +0 -1
  314. package/dist/zonos-elements/p-1ed9ef0b.js +0 -1
  315. package/dist/zonos-elements/p-31d1b874.system.js +0 -1
  316. package/dist/zonos-elements/p-34d10122.js +0 -1
  317. package/dist/zonos-elements/p-3ac97c01.js +0 -1
  318. package/dist/zonos-elements/p-53db5f85.system.js +0 -1
  319. package/dist/zonos-elements/p-7501c637.system.js +0 -1
  320. package/dist/zonos-elements/p-768430fe.js +0 -1
  321. package/dist/zonos-elements/p-7d7ffb42.js +0 -1
  322. package/dist/zonos-elements/p-959918fe.system.js +0 -1
  323. package/dist/zonos-elements/p-9d44fef6.system.js +0 -1
  324. package/dist/zonos-elements/p-b20c7f8c.entry.js +0 -1
  325. package/dist/zonos-elements/p-b6c78f82.entry.js +0 -1
  326. package/dist/zonos-elements/p-b84be447.js +0 -1
  327. package/dist/zonos-elements/p-db993fdb.entry.js +0 -1
  328. package/dist/zonos-elements/p-def2d465.js +0 -1
  329. package/dist/zonos-elements/p-e219d011.js +0 -1
  330. package/dist/zonos-elements/p-f9705736.system.js +0 -1
@@ -1 +0,0 @@
1
- System.register(["./p-d18a2b2c.system.js","./p-8c6624b6.system.js"],(function(r){"use strict";var n,t,o;return{setters:[function(r){n=r.i;t=r.t},function(r){o=r.i}],execute:function(){var u=r("g",(function(r){var u=r.backgroundColor,e=r.color;if(u===e){if(n(e)){var f=t(e).lighten(40).toHexString();return f}var a=t(e).darken(40).toHexString();return a}var c=o({backgroundColor1:u,backgroundColor2:e});if(c){return e}if(n(e)){return"#ffffff"}var s=t(e).darken(25).toHexString();var i=t(e).lighten(25).toHexString();var v=o({backgroundColor1:u,backgroundColor2:s});return v?s:i}))}}}));
@@ -1 +0,0 @@
1
- System.register(["./p-ac30b7a8.system.js"],(function(t){"use strict";var n;return{setters:[function(t){n=t.z}],execute:function(){var r=t("g",(function(t){var r=(t===null||t===void 0?void 0:t.customRoundRadius)||"10px";var e=t===null||t===void 0?void 0:t.overrideBorderStyle;if(e){return e==="SHARP"?"0px":r}return n.appearance.style==="SHARP"?"0px":r}))}}}));
@@ -1 +0,0 @@
1
- import{d as o}from"./p-dafafa07.js";import{o as r,d as n}from"./p-3ac97c01.js";const a=({amount:a,isForeign:u})=>{var i,t;const c=(null===(i=o.exchangeRate)||void 0===i?void 0:i.rate)||1,d=u?a:r(a),s=o.currency;if((null===(t=o.items[0])||void 0===t?void 0:t.currencyCode)===s)return n({amount:d,currency:s});const v=o.displayBaseCurrency,e=(()=>{var r,n;return o.displayBaseCurrency&&(null===(r=o.exchangeRate)||void 0===r?void 0:r.sourceCurrencyCode)?null===(n=o.exchangeRate)||void 0===n?void 0:n.sourceCurrencyCode:o.currency})();return n(u?{amount:v?d/c:d,currency:e}:{amount:v?d:d*c,currency:e})};export{a as r}
@@ -1 +0,0 @@
1
- import{d as i}from"./p-908f13ae.js";import{d as r}from"./p-058f6124.js";var n=i,t=r,a=function(i,r,a){var o=!0,e=!0;if("function"!=typeof i)throw new TypeError("Expected a function");return t(a)&&(o="leading"in a?!!a.leading:o,e="trailing"in a?!!a.trailing:e),n(i,r,{leading:o,maxWait:r,trailing:e})};export{a as t}
@@ -1 +0,0 @@
1
- System.register(["./p-3fbd9cc0.system.js","./p-ac30b7a8.system.js"],(function(t){"use strict";var n,e;return{setters:[function(t){n=t.d},function(t){e=t.d}],execute:function(){var i=n,r=e;var a="Expected a function";function c(t,n,e){var c=true,u=true;if(typeof t!="function"){throw new TypeError(a)}if(r(e)){c="leading"in e?!!e.leading:c;u="trailing"in e?!!e.trailing:u}return i(t,n,{leading:c,maxWait:n,trailing:u})}var u=t("t",c)}}}));
@@ -1 +0,0 @@
1
- var __awaiter=this&&this.__awaiter||function(t,n,e,r){function i(t){return t instanceof e?t:new e((function(n){n(t)}))}return new(e||(e=Promise))((function(e,u){function o(t){try{a(r.next(t))}catch(t){u(t)}}function c(t){try{a(r["throw"](t))}catch(t){u(t)}}function a(t){t.done?e(t.value):i(t.value).then(o,c)}a((r=r.apply(t,n||[])).next())}))};var __generator=this&&this.__generator||function(t,n){var e={label:0,sent:function(){if(u[0]&1)throw u[1];return u[1]},trys:[],ops:[]},r,i,u,o;return o={next:c(0),throw:c(1),return:c(2)},typeof Symbol==="function"&&(o[Symbol.iterator]=function(){return this}),o;function c(t){return function(n){return a([t,n])}}function a(c){if(r)throw new TypeError("Generator is already executing.");while(o&&(o=0,c[0]&&(e=0)),e)try{if(r=1,i&&(u=c[0]&2?i["return"]:c[0]?i["throw"]||((u=i["return"])&&u.call(i),0):i.next)&&!(u=u.call(i,c[1])).done)return u;if(i=0,u)c=[c[0]&2,u.value];switch(c[0]){case 0:case 1:u=c;break;case 4:e.label++;return{value:c[1],done:false};case 5:e.label++;i=c[1];c=[0];continue;case 7:c=e.ops.pop();e.trys.pop();continue;default:if(!(u=e.trys,u=u.length>0&&u[u.length-1])&&(c[0]===6||c[0]===2)){e=0;continue}if(c[0]===3&&(!u||c[1]>u[0]&&c[1]<u[3])){e.label=c[1];break}if(c[0]===6&&e.label<u[1]){e.label=u[1];u=c;break}if(u&&e.label<u[2]){e.label=u[2];e.ops.push(c);break}if(u[2])e.ops.pop();e.trys.pop();continue}c=n.call(t,e)}catch(t){c=[6,t];i=0}finally{r=u=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:true}}};System.register(["./p-3fbd9cc0.system.js","./p-01174496.system.js"],(function(t){"use strict";var n,e,r;return{setters:[function(t){n=t.d},function(t){e=t.h;r=t.l}],execute:function(){var i=this;var u={};var o={};var c=function(t){return n((function(){return __awaiter(i,void 0,void 0,(function(){var n,i,o,c,a,s;return __generator(this,(function(f){switch(f.label){case 0:o=Array.from(((n=u[t])===null||n===void 0?void 0:n.entries())||[]).map((function(t){var n=t[0],e=t[1];return{key:n,value:e}}));return[4,e("/api/zonos-elements/update-checkout-session-attributes",{body:{attributes:o,id:t},method:"POST"})];case 1:c=f.sent(),a=c.errors,s=c.json;if(a.length){r("Error updating checkout session attributes",a);return[2,{success:false}]}(i=u[t])===null||i===void 0?void 0:i.clear();return[2,{success:!!(s===null||s===void 0?void 0:s.success)}]}}))}))}),1e3,{maxWait:5e3})};var a=t("u",(function(t){return __awaiter(i,[t],void 0,(function(t){var n=t.attributes,e=t.checkoutSessionId;return __generator(this,(function(t){u[e]||(u[e]=new Map);n.forEach((function(t){var n;if(t.value){(n=u[e])===null||n===void 0?void 0:n.set(t.key,t.value)}}));if(!n.length){return[2]}if(!o[e]){o[e]=c(e)}return[2,o[e]()]}))}))}))}}}));
@@ -1 +0,0 @@
1
- import{r as o,h as n,a as s,F as i}from"./p-ce75b047.js";import{b as e,i as c,c as t,d as a,n as r,e as l,j as z,k as d,u as v,A as h,E as m,C as p,f as u}from"./p-dafafa07.js";import{i as f,a as g,b,c as w}from"./p-af83f0c2.js";import{p as x,a as y}from"./p-c398711f.js";import{s as k,t as C,c as I,d as S,l as j}from"./p-3ac97c01.js";import{z as O}from"./p-058f6124.js";import{b as L}from"./p-83666056.js";import{h as T,s as E,l as U,g as P}from"./p-41dd1cb8.js";import{i as _,a as A}from"./p-1f3549c6.js";import{c as N}from"./p-b4b7f705.js";import{l as D}from"./p-0a377722.js";import{l as B}from"./p-97aceb11.js";import"./p-67897a0d.js";import"./p-f830f800.js";import"./p-def2d465.js";import"./p-4f7d64f6.js";const F=class{constructor(n){o(this,n),this.storeUnsubscribeList=[],this.onChangeLocaleListener=()=>{},this.mobile=!1,this.tablet=!1,this.stripe=window.Zonos.stripe,this.showLanguageDialogMobile=!1,this.submitLoading=!1,this.collapseReviewMobile=!0,this.isMobile=!1,this.isTablet=!1,this.isOverlayLoading=!0,this.isCartCollected=!1,this.isCartExpired=!1,this.payInUsdConfirmDialogOpen=!1,this.inventoryCheckErrorMessage=null,this.confirmationId=null,this.clientSecret=e.clientSecret,this.stripeCustomerSessionClientSecret=e.stripeCustomerSessionClientSecret,this.getBaseCurrencySettlementInfo=()=>{const o=a.selectedLandedCost;if(!o)return null;const{landedCost:{amountSubtotals:n}}=o;return n?{settlementAmount:(n.discounts||0)+n.items+n.landedCostTotal+n.shipping}:null},this.applyStripeTheme=async()=>{const o=O.appearance.theme;await c({overrideTheme:this.isMobile?o:void 0,paypalEnabled:x()})},this.fetchCheckoutSession=async o=>{const{json:n}=await T("/api/zonos-elements/collect/get-checkout-session",{body:{checkoutSessionId:o},method:"POST"});return n},this.checkStripePaymentIntentStatus=async()=>{var o;const n=!!window.Zonos.cartData,s=new URL(window.location.href).searchParams,i=s.get("payment_intent_client_secret"),c=s.get("zonosCheckoutSessionId");if(D("Payment intent exist, checking stripe payment intent status"),!i)return D("No stripe client secret found in the URL, proceed to order if cart data is available"),{shouldAllowOrder:n};const{error:a,status:r}=await t({clientSecret:i});if(new URLSearchParams(window.location.search).get("redirect_status")&&c){D(a?"Payment intent failed, show status from error":"Payment intent is succeeded or in a good state to move forward, show success screen");const n=await this.fetchCheckoutSession(c);return this.confirmationId=(null===(o=null==n?void 0:n.checkoutSession.landedCost)||void 0===o?void 0:o.shortId)||null,k.checkoutSessionId=c,e.clientSecret=i,this.setToFinishStep(r),{shouldAllowOrder:!1}}return n?(D("Payment intent is not succeeded, proceed to order"),{shouldAllowOrder:!0}):(D("Cart data is not available, only check payment intent status, skip order."),{shouldAllowOrder:!1})}}resizeListener(){this.isMobile=_(this.mobile),this.isTablet=A(this.tablet)}async setToFinishStep(o){e.stripe=window.Zonos.stripe,a.step="finish",this.storybookPaymentStatusOverride=o,this.isOverlayLoading=!1}async initInvoiceCart(){var o,n,s,i,e,c,v,h,m,p,u;if(!window.Zonos.cartData)return;const b=null===(n=null===(o=window.Zonos.cartData)||void 0===o?void 0:o.items[0])||void 0===n?void 0:n.currencyCode;b&&(a.currency=b);const w=null===(i=null===(s=window.Zonos.cartData)||void 0===s?void 0:s.references)||void 0===i?void 0:i.checkoutSessionId,x=null===(c=null===(e=window.Zonos.cartData)||void 0===e?void 0:e.references)||void 0===c?void 0:c.landedCostId;if(!x)return void r({messages:[C("Session does not have valid landed cost. Please contact [organizationName] for assistance.",{organizationName:O.organizationName})],title:C("Invalid session")});w?(D("Setting checkout session id from cart reference","info",w),k.checkoutSessionId=w):(D("Clear checkout session id from storage so we start from a fresh session for the invoice cart"),k.checkoutSessionId=null);const{shouldAllowOrder:y}=await this.checkStripePaymentIntentStatus();if(y){try{const{adjustments:o,cartItems:n}=L(window.Zonos.cartData);if(await l({adjustments:o,cartItems:n,landedCostId:x,shouldInitSessionOnFailure:!1}),!k.checkoutSessionId&&!w){const o=await z();if(D(`stripeStoreInitCheckoutSession: ${o}`),!o)throw new Error("Failed to initialize checkout session! The cart might be created with LIVE Invoice quote but being used with sandbox credential")}if((!a.checkoutSession||(null===(v=a.checkoutSession)||void 0===v?void 0:v.completedAt))&&w){const o=await this.fetchCheckoutSession(w);if(this.confirmationId=(null===(h=null==o?void 0:o.checkoutSession.landedCost)||void 0===h?void 0:h.shortId)||null,(null==o?void 0:o.checkoutSession.completedAt)&&o.checkoutSession.order)return void this.setToFinishStep("succeeded");if(null==o?void 0:o.checkoutSession.clientSecret){const{status:n}=await t({clientSecret:o.checkoutSession.clientSecret});if("processing"===n||"succeeded"===n)return void this.setToFinishStep(n)}throw E({endpoint:"INVALID_INVOICE_CHECKOUT_SESSION",errors:["Invalid checkout session, can not retrieve the checkout session after failing to update it"],metadata:{cartCheckoutSessionId:w,cartId:null===(m=window.Zonos.cartData)||void 0===m?void 0:m.id,cartLandedCostId:x}}),new Error("Invalid checkout session, can not retrieve the checkout session after failing to update it")}if(!a.checkoutSession)throw E({endpoint:"FAIL_TO_UPDATE_CREATE_INVOICE_CHECKOUT_SESSION",errors:["Could not update/create checkout session for this invoice cart"],metadata:{cartCheckoutSessionId:w||"N/A",cartId:null===(p=window.Zonos.cartData)||void 0===p?void 0:p.id,cartLandedCostId:x||"N/A"}}),new Error("Could not update/create checkout session for this invoice cart");d();const s=null===(u=a.checkoutSession)||void 0===u?void 0:u.landedCost;if(!s)throw new Error("Landed cost could not be found in checkout session after creating/updating them");await f(Object.assign(Object.assign({},a.checkoutSession),{id:k.checkoutSessionId||""})),g({landedCostId:s.id}),this.applyStripeTheme()}catch(o){U(o),r({messages:[C("Session does not have valid landed cost. Please contact [organizationName] for assistance.",{organizationName:O.organizationName})],title:C("Invalid session")})}this.isOverlayLoading=!1}}toggleLanguageDialog(){this.showLanguageDialogMobile=!this.showLanguageDialogMobile}async handleStripePaymentContinue(){var o,n,s,i;if(null===(o=e.stripeBillingAddressElement)||void 0===o||o.getValue(),null===(n=e.stripeLinkEventData)||void 0===n?void 0:n.complete)if(null===(s=e.stripeBillingAddressEventData)||void 0===s?void 0:s.complete)if("USD"!==e.checkoutSettlementCurrency||!e.shouldRenderPayInUsdButton||this.payInUsdConfirmDialogOpen){if(this.payInUsdConfirmDialogOpen=!1,y.paypalErrorMessage=null,e.hasPaymentError=!1,this.submitLoading=!0,a.inventoryCheckErrorMessage=null,!await v())return e.hasPaymentError=!0,e.customErrorMessage=C("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:e.checkoutSettlementCurrency}),void(this.submitLoading=!1);await b();try{return await h({noLandedCostCheck:!0}),a.step="finish",void(this.confirmationId=w.landedCostShortId||(null===(i=a.selectedLandedCost)||void 0===i?void 0:i.landedCostId)||null)}catch(o){U(o),e.hasPaymentError=!0}this.submitLoading=!1}else this.payInUsdConfirmDialogOpen=!0;else{const o=document.querySelector(".zonos--billing-address");null==o||o.scrollIntoView({behavior:"smooth"})}else{const o=document.querySelector("zonos-link-authentication");null==o||o.scrollIntoView({behavior:"smooth"})}}componentWillLoad(){e.stripe=window.Zonos.stripe,a.step="payment",this.initInvoiceCart(),this.resizeListener(),this.storeUnsubscribeList=[m("clientSecret",(()=>{this.applyStripeTheme()})),I("selectedLocale",(()=>{this.applyStripeTheme()}))],D(`mobile: ${this.isMobile}`)}disconnectedCallback(){p(),u(),this.onChangeLocaleListener(),this.storeUnsubscribeList.forEach((o=>o()))}render(){this.clientSecret=e.clientSecret,e.stripeCustomerSessionClientSecret&&(this.stripeCustomerSessionClientSecret=e.stripeCustomerSessionClientSecret);const o=this.getBaseCurrencySettlementInfo(),{logoUrl:c,theme:t}=O.appearance,r=()=>{const o=`${c}?timestamp=${Date.now()}`;return n("div",{class:"zonos--logo"},o&&n("img",{alt:`${O.organizationName} logo`,src:o}))},l=P(),z=()=>{var o;const s=new URLSearchParams(window.location.search),e=s.get("zonosQaUrl"),c=s.get("zonosDebug"),t=null===(o=B.find((o=>o.code===j.selectedLocale)))||void 0===o?void 0:o.label;return n(i,null,n("zonos-h-stack",{class:"zonos--header-wrapper",spacing:16},n("div",{class:"zonos--logo-wrapper"},r(),l&&n("zonos-badge",{badgeColor:"orange",size:"small"},C("Test mode")),"1"===c&&n("zonos-badge",{badgeColor:"cyan",size:"small"},"debug"),e&&n("zonos-badge",{badgeColor:"purple",size:"small"},e)),n("div",{class:"zonos--header-right"},n("zonos-button",{backgroundColor:"gray-0",class:"zonos--header-right-button",onClick:()=>this.toggleLanguageDialog(),variant:"outline"},t,n("zonos-icon",{"aria-label":"Language select",content:'<svg color="var(--zonos-elements-gray-400)" fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="https://www.w3.org/2000/svg"><path clip-rule="evenodd" d="M6.293 9.293a1 1 0 0 1 1.414 0L12 13.586l4.293-4.293a1 1 0 0 1 1.414 1.414l-4.93 4.93a1.1 1.1 0 0 1-1.555 0l-4.93-4.93a1 1 0 0 1 0-1.414Z" fill="currentColor" fill-rule="evenodd"></path></svg>',iconColor:"gray-1200"})),n("div",{class:N(["zonos--invoice-language-dialog",this.showLanguageDialogMobile&&"zonos--invoice-language-dialog-open"])},n("zonos-language-select",{handleOnClose:()=>this.toggleLanguageDialog()})))))};return n(s,{class:N(["zonos--invoice zonos--elements",this.isMobile&&"mobile",this.isTablet&&"tablet"]),"data-theme":t},(()=>this.isOverlayLoading||e.isFetchingSession?null:n("div",{class:"zonos--content"},"finish"!==a.step&&"error"!==a.step&&n(i,null,(this.isMobile||this.isTablet)&&z(),n("div",{class:"zonos--left","data-theme":t},!this.isMobile&&!this.isTablet&&z(),n("zonos-text",{class:"zonos--title",type:"semiBoldSubheader"},C("Billing info")),n("zonos-v-stack",{spacing:16},n("zonos-link-authentication",{titleText:""}),n("zonos-address",{titleText:"",type:"billing"})),n("zonos-invoice-payment",{class:N(["zonos--invoice-container"]),continueLoading:this.submitLoading,onContinueClicked:async()=>{await this.handleStripePaymentContinue()}})),n("div",{class:"zonos--right","data-theme":t},!this.isMobile&&n("zonos-invoice-review",{mobile:this.isMobile,tablet:this.isTablet}),n("div",{class:"zonos--order-details-container"},!this.isMobile&&n("zonos-invoice-cart-items",null),this.isMobile&&n("zonos-invoice-order-details",{collapsed:this.collapseReviewMobile,mobile:this.isMobile,onCollapseClicked:()=>{this.collapseReviewMobile=!this.collapseReviewMobile}})),n("div",{class:"flex--wrapper"},!this.isMobile&&n("zonos-v-stack",{spacing:16},n("zonos-invoice-subtotal",null)),!this.isMobile&&!this.isTablet&&n("zonos-invoice-footer",{"data-theme":t,mobile:this.isMobile,tablet:this.isTablet})))),("finish"===a.step||"error"===a.step)&&n("div",{class:"zonos--done","data-theme":t},n("div",{class:"zonos--header"},r()),n("zonos-invoice-finish",{confirmationId:this.confirmationId,overrideNotification:"error"===a.step&&a.error?Object.assign(Object.assign({},a.error),{type:"error"}):void 0,storybookForceStatus:this.storybookPaymentStatusOverride})),(this.isMobile||this.isTablet||"finish"===a.step||"error"===a.step)&&n("zonos-invoice-footer",{"data-theme":t,mobile:this.isMobile,tablet:this.isTablet})))(),o&&n("zonos-confirm-dialog",{class:"zonos--pay-in-usd-dialog",dialogCancelBtnText:C("Cancel"),dialogConfirmBtnText:C("Pay [orderTotal]",{orderTotal:S({amount:o.settlementAmount,currency:"USD"})}),dialogIntent:"warn",dialogOpen:this.payInUsdConfirmDialogOpen,dialogSubtitle:C("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:C("Pay in USD (United States Dollar)?"),dialogType:"confirm",dialogWidth:480,onCancelClicked:()=>{this.payInUsdConfirmDialogOpen=!1},onConfirmClicked:()=>this.handleStripePaymentContinue()}),n("zonos-loading-overlay",{open:this.isOverlayLoading}))}static get assetsDirs(){return["assets"]}};F.style=".sc-zonos-invoice-h{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-invoice-h *.sc-zonos-invoice{font-family:var(--zonos--font-family, Inter), Inter}.sc-zonos-invoice-h img.sc-zonos-invoice{max-width:100%}.sc-zonos-invoice-h dl.sc-zonos-invoice,.sc-zonos-invoice-h dd.sc-zonos-invoice,.sc-zonos-invoice-h h1.sc-zonos-invoice,.sc-zonos-invoice-h h2.sc-zonos-invoice,.sc-zonos-invoice-h h3.sc-zonos-invoice,.sc-zonos-invoice-h h4.sc-zonos-invoice,.sc-zonos-invoice-h h5.sc-zonos-invoice,.sc-zonos-invoice-h h6.sc-zonos-invoice,.sc-zonos-invoice-h hr.sc-zonos-invoice,.sc-zonos-invoice-h figure.sc-zonos-invoice,.sc-zonos-invoice-h p.sc-zonos-invoice,.sc-zonos-invoice-h pre.sc-zonos-invoice{margin:0}.sc-zonos-invoice-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-invoice-h{z-index:2147483647;position:fixed;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;top:0;left:0;width:100%;height:100%;-ms-flex-align:center;align-items:center;background-color:var(--zonos-elements-gray-0)}.sc-zonos-invoice-h *.sc-zonos-invoice{-ms-scroll-chaining:none;overscroll-behavior:contain}.sc-zonos-invoice-h *.sc-zonos-invoice::-webkit-scrollbar{width:10px}.sc-zonos-invoice-h *.sc-zonos-invoice::-webkit-scrollbar-track{background:var(--zonos-elements-gray-50)}.sc-zonos-invoice-h *.sc-zonos-invoice::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}.sc-zonos-invoice-h *.sc-zonos-invoice::-webkit-scrollbar-thumb:hover{background:#d6d6d6}.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice{display:-ms-flexbox;display:flex;height:100%;overflow:hidden;width:100%;-ms-flex-pack:center;justify-content:center}.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--left.sc-zonos-invoice,.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--right.sc-zonos-invoice{-ms-flex:1;flex:1;padding:56px 80px 60px;max-width:800px}.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--left.sc-zonos-invoice{background-color:var(--zonos--primary-color, var(--zonos-elements-gray-0));border-right:1px solid var(--zonos-elements-gray-200);overflow:auto;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:32px}.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--right.sc-zonos-invoice{background-color:var(--zonos-elements-gray-0)}.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--done.sc-zonos-invoice{width:100%;max-width:1400px;max-height:100%;height:calc(100% - 100px);overflow:hidden;-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-invoice-h .zonos--content.sc-zonos-invoice .zonos--done.sc-zonos-invoice .zonos--header.sc-zonos-invoice{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:center;align-items:center;width:100%}.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--done.sc-zonos-invoice .zonos--logo.sc-zonos-invoice{margin-bottom:0}.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--done.sc-zonos-invoice zonos-checkout-finish.sc-zonos-invoice{-ms-flex:1;flex:1}.sc-zonos-invoice-h .zonos--header-title.sc-zonos-invoice,.sc-zonos-invoice-h .zonos--header-wrapper.sc-zonos-invoice{max-width:800px}.sc-zonos-invoice-h .zonos--left.sc-zonos-invoice{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;position:relative}.sc-zonos-invoice-h .zonos--left.sc-zonos-invoice .zonos--wrapper.sc-zonos-invoice{padding:0 8px 8px}.sc-zonos-invoice-h .zonos--left.sc-zonos-invoice .zonos--payment-error-banner.sc-zonos-invoice{margin-top:24px}.sc-zonos-invoice-h .zonos--right.sc-zonos-invoice{position:relative;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}.sc-zonos-invoice-h .zonos--right.sc-zonos-invoice .zonos--order-details-container.sc-zonos-invoice{overflow:auto}.sc-zonos-invoice-h .zonos--wrapper.sc-zonos-invoice{overflow:auto;max-height:100%;position:relative}.sc-zonos-invoice-h .flex--wrapper.sc-zonos-invoice{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;max-height:100%}.sc-zonos-invoice-h .zonos--logo-wrapper.sc-zonos-invoice{display:-ms-flexbox;display:flex;gap:16px;-ms-flex-align:center;align-items:center;-ms-flex:1;flex:1}.sc-zonos-invoice-h .zonos--logo-wrapper.sc-zonos-invoice>*.sc-zonos-invoice{height:-webkit-fit-content;height:-moz-fit-content;height:fit-content}.sc-zonos-invoice-h .zonos--header-right.sc-zonos-invoice{display:none}.sc-zonos-invoice-h .zonos--logo.sc-zonos-invoice{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.sc-zonos-invoice-h .zonos--logo.sc-zonos-invoice img.sc-zonos-invoice{max-height:70px;-o-object-position:left center;object-position:left center;-o-object-fit:contain;object-fit:contain}.sc-zonos-invoice-h .zonos--invoice-container.sc-zonos-invoice{overflow:visible}.mobile.sc-zonos-invoice-h,.tablet.sc-zonos-invoice-h{min-width:auto}.mobile.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice,.tablet.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice{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-invoice-h .zonos--content.sc-zonos-invoice .zonos--left.sc-zonos-invoice,.mobile.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--right.sc-zonos-invoice,.tablet.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--left.sc-zonos-invoice,.tablet.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--right.sc-zonos-invoice{padding:12px;padding-bottom:76px}@media (max-width: 768px){.mobile.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--left.sc-zonos-invoice,.mobile.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--right.sc-zonos-invoice,.tablet.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--left.sc-zonos-invoice,.tablet.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--right.sc-zonos-invoice{padding-bottom:0}}.mobile.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--left.sc-zonos-invoice,.tablet.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--left.sc-zonos-invoice{-ms-flex-order:2;order:2;border-right:none}.mobile.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--right.sc-zonos-invoice,.tablet.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--right.sc-zonos-invoice{-ms-flex-order:1;order:1;padding-top:16px}.mobile.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--right.sc-zonos-invoice .zonos--wrapper.sc-zonos-invoice,.tablet.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--right.sc-zonos-invoice .zonos--wrapper.sc-zonos-invoice{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-invoice-h .zonos--content.sc-zonos-invoice .zonos--right.sc-zonos-invoice .zonos--review.sc-zonos-invoice,.tablet.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--right.sc-zonos-invoice .zonos--review.sc-zonos-invoice{margin-bottom:0}.mobile.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--right.sc-zonos-invoice .zonos--cart-items.sc-zonos-invoice,.tablet.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--right.sc-zonos-invoice .zonos--cart-items.sc-zonos-invoice{margin-top:8px}.mobile.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice zonos-checkout-footer.sc-zonos-invoice,.tablet.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice zonos-checkout-footer.sc-zonos-invoice{-ms-flex-order:3;order:3}.mobile.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--wrapper.sc-zonos-invoice,.tablet.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--wrapper.sc-zonos-invoice{max-height:100%}.mobile.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--footer.sc-zonos-invoice,.tablet.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--footer.sc-zonos-invoice{-ms-flex-order:3;order:3}.mobile.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--done.sc-zonos-invoice,.tablet.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--done.sc-zonos-invoice{width:auto}.mobile.sc-zonos-invoice-h .zonos--cart-subtotal.sc-zonos-invoice,.tablet.sc-zonos-invoice-h .zonos--cart-subtotal.sc-zonos-invoice{margin:0}.mobile.sc-zonos-invoice-h .zonos--header-wrapper.sc-zonos-invoice,.tablet.sc-zonos-invoice-h .zonos--header-wrapper.sc-zonos-invoice{position:-webkit-sticky;position:sticky;top:0;width:100%;padding:16px;background-color:var(--zonos-elements-gray-0);z-index:3}.mobile.sc-zonos-invoice-h .zonos--header-title.sc-zonos-invoice,.mobile.sc-zonos-invoice-h .zonos--header-wrapper.sc-zonos-invoice,.tablet.sc-zonos-invoice-h .zonos--header-title.sc-zonos-invoice,.tablet.sc-zonos-invoice-h .zonos--header-wrapper.sc-zonos-invoice{max-width:800px;padding:0 16px}.mobile.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice,.tablet.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice{overflow:auto;-ms-flex-pack:unset;justify-content:unset;-ms-flex-align:center;align-items:center;gap:24px}.mobile.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--left.sc-zonos-invoice,.mobile.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--right.sc-zonos-invoice,.tablet.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--left.sc-zonos-invoice,.tablet.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--right.sc-zonos-invoice{overflow:visible;width:100%}.mobile.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--right.sc-zonos-invoice,.tablet.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--right.sc-zonos-invoice{gap:32px}.mobile.sc-zonos-invoice-h .flex--wrapper.sc-zonos-invoice,.tablet.sc-zonos-invoice-h .flex--wrapper.sc-zonos-invoice{margin-top:0}.mobile.sc-zonos-invoice-h zonos-collect-footer.sc-zonos-invoice,.tablet.sc-zonos-invoice-h zonos-collect-footer.sc-zonos-invoice{-ms-flex-order:3;order:3;left:0}.tablet.sc-zonos-invoice-h .zonos--header-wrapper.sc-zonos-invoice{padding-top:56px;top:-56px}.mobile.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice .zonos--header-right.sc-zonos-invoice{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.mobile.sc-zonos-invoice-h .zonos--header-wrapper.sc-zonos-invoice{padding-top:28px;top:-28px}.mobile.sc-zonos-invoice-h .zonos--invoice-language-dialog.sc-zonos-invoice{position:fixed;left:0;right:0;bottom:0;-webkit-transform-origin:bottom center;transform-origin:bottom center;width:100vw;background:var(--zonos-elements-surface-color);-webkit-box-shadow:var(--zonos-elements-v3-shadow-xl);box-shadow:var(--zonos-elements-v3-shadow-xl);border-radius:var(--zonos-elements-radius-12);max-width:100vw;max-height:500px;z-index:2147483011;overflow:auto;-webkit-transform:scale(0);transform:scale(0);opacity:0;-webkit-transition:opacity 0.3s ease-out, -webkit-transform 0.3s ease-out;transition:opacity 0.3s ease-out, -webkit-transform 0.3s ease-out;transition:transform 0.3s ease-out, opacity 0.3s ease-out;transition:transform 0.3s ease-out, opacity 0.3s ease-out, -webkit-transform 0.3s ease-out;-ms-scroll-chaining:none;overscroll-behavior:contain}.mobile.sc-zonos-invoice-h .zonos--invoice-language-dialog.sc-zonos-invoice::-webkit-scrollbar{width:10px}.mobile.sc-zonos-invoice-h .zonos--invoice-language-dialog.sc-zonos-invoice::-webkit-scrollbar-track{background:var(--zonos-elements-gray-50)}.mobile.sc-zonos-invoice-h .zonos--invoice-language-dialog.sc-zonos-invoice::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}.mobile.sc-zonos-invoice-h .zonos--invoice-language-dialog.sc-zonos-invoice::-webkit-scrollbar-thumb:hover{background:#d6d6d6}.mobile.sc-zonos-invoice-h .zonos--invoice-language-dialog.sc-zonos-invoice::-webkit-scrollbar-track{border-top-right-radius:var(--zonos-elements-radius-12);border-bottom-right-radius:var(--zonos-elements-radius-12)}.mobile.sc-zonos-invoice-h .zonos--invoice-language-dialog.zonos--invoice-language-dialog-open.sc-zonos-invoice{opacity:1;-webkit-transform:scale(1);transform:scale(1)}.iframed.sc-zonos-invoice-h .zonos--content.sc-zonos-invoice{-ms-scroll-chaining:chained;overscroll-behavior:auto}";export{F as zonos_invoice}
@@ -1 +0,0 @@
1
- import{r as o,h as e,F as t,a as s}from"./p-ce75b047.js";import{s as n,a as i,b as c,i as r,c as a,d,e as l,f as h,g as u,h as m,j as p,k as g,l as z,t as f,m as w,n as k,o as v,p as y,q as b,r as C,u as S,v as x,w as T,x as I,y as A,z as O,A as _,B as E,C as P,D as N,E as j,F as D}from"./p-dafafa07.js";import{p as L,a as U,b as $}from"./p-c398711f.js";import{f as B,l as R,a as F,g as M,s as K,V as Z,b as H,t as V,c as G,d as W}from"./p-3ac97c01.js";import{z as Y,g as q,m as Q}from"./p-058f6124.js";import{b as J}from"./p-83666056.js";import{h as X,l as oo,b as eo,g as to,j as so,s as no,a as io,i as co}from"./p-41dd1cb8.js";import{u as ro}from"./p-34d10122.js";import{_ as ao,c as lo,a as ho,d as uo,g as mo}from"./p-b2d81c98.js";import{l as po,g as go,b as zo}from"./p-0a377722.js";import{c as fo}from"./p-b4b7f705.js";import{c as wo}from"./p-595f5dd2.js";import{g as ko}from"./p-f830f800.js";import{i as vo}from"./p-67897a0d.js";import{s as yo}from"./p-96d77739.js";import{s as bo}from"./p-4f7d64f6.js";import{R as Co}from"./p-08e7107d.js";import"./p-def2d465.js";import"./p-908f13ae.js";const So=(o=!0,e)=>{var t;if(!R.localizationLoaded)return!1;if(e){const s=!!(null===(t=R.shippingZoneCountries)||void 0===t?void 0:t[e])&&!Y.disabledCountries.includes(e);return o&&!s&&po(`Checkout: ${e} is not a shippable country: ${s}`),s}return!!R.isShippableCountry||(o&&po("Checkout: not shippable country"),!1)},xo='select[name="shippingAddress.countryCode"]';let To=0;const Io=o=>{var e;const t=null===(e=K.enabledVariantTestKeys)||void 0===e?void 0:e.find((e=>e.testKey===o));return(null==t?void 0:t.selectedVariantKey)||null},Ao=async({cartId:o,retries:e})=>{const t=to(),{errors:s,json:n}=await X("/api/zonos-elements/get-temp-cart",{body:{isTestMode:t,options:{noOnlineStoreSettings:!0},tempCartUUID:o},headers:{"Content-Type":"application/json"},method:"POST"}),i=!n||s.length;return i&&e?(po("[ZONOS - loadZonos] temp cart not ready, retrying in 1 second","info",{retries:e}),await new Promise((o=>setTimeout(o,500))),Ao({cartId:o,retries:e-1})):i?null:n},Oo='<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',_o=class{constructor(e){o(this,e),this.storeUnsubscribeList=[],this.isRedirectAfterOrder=!1,this.preview=!1,this.hiddenMode=!1,this.mobile=!1,this.defaultAddress=[],this.forceDialogOpen=!1,this.defaultAddressParams=[],this.defaultCustomerProfileAddress=[],this.customerProfile=null,this.open=this.forceDialogOpen,this.isOverlayLoading=!1,this.stripe=window.Zonos.stripe,this.submitLoading=!1,this.collapseReviewMobile=!0,this.isAttachError=!1,this.isMobile=!1,this.isIframed=!1,this.isLegacyCheckout=window.Zonos.isLegacyCheckout,this.confirmDialogOpen=!1,this.isCartExpired=!1,this.payInUsdConfirmDialogOpen=!1,this.inventoryCheckErrorMessage=null,this.placedOrderInfo=null,this.shouldShowFedexShippingConsentDialog=!1,this.detectedDomesticCheckoutDialogOpen=!1,this.redirectToDomesticCheckoutDialogOpen=!1,this.clientSecret=c.clientSecret,this.stripeCustomerSessionClientSecret=c.stripeCustomerSessionClientSecret,this.applyStripeTheme=async()=>{var o,e,t,s;const n=(null===(o=this.appearanceSettingsOverride)||void 0===o?void 0:o.theme)||Y.appearance.theme;await r({overrideBorderRadius:null===(e=this.appearanceSettingsOverride)||void 0===e?void 0:e.style,overridePrimaryColor:null===(t=this.appearanceSettingsOverride)||void 0===t?void 0:t.colorPrimary,overrideSecondaryColor:null===(s=this.appearanceSettingsOverride)||void 0===s?void 0:s.colorSecondary,overrideTheme:this.isMobile?n:void 0,paypalEnabled:L()})},this.checkStripePaymentIntentStatus=async({triggeredButton:o})=>{const e=null==o?void 0:o.matches(`#${lo}`),t=!!window.Zonos.cartData,s=new URL(window.location.href).searchParams,n=s.get("payment_intent_client_secret"),i=s.get("zonosCheckoutSessionId");if(!e)return po("Checkout is triggered by user, no need to check stripe payment intent status"),{shouldAllowOrder:!0};if(po("Payment intent exist, checking stripe payment intent status"),!n)return po("No stripe client secret found in the URL, proceed to order if cart data is available"),{shouldAllowOrder:t};const{error:r,status:d}=await a({clientSecret:n});return new URLSearchParams(window.location.search).get("redirect_status")?(po(r?"Payment intent failed, show status from error":"Payment intent is succeeded or in a good state to move forward, show success screen"),this.open=!0,K.checkoutSessionId=i,c.clientSecret=n,this.setToFinishStep(d),{shouldAllowOrder:!1}):t?(po("Payment intent is not succeeded, proceed to order"),{shouldAllowOrder:!0}):(po("Cart data is not available, only check payment intent status, skip order."),{shouldAllowOrder:!1})},this.initializeTestKeys=()=>{var o;K.enabledVariantTestKeys=(null==(o=K.enabledVariantTestKeys||[])?void 0:o.filter((o=>!(o.expiresAt&&o.expiresAt<Date.now()||!o.expiresAt))))||[];const e=Y.enabledVariantTestKeys.map((o=>{var e;const t=null===(e=K.enabledVariantTestKeys)||void 0===e?void 0:e.find((({testKey:e})=>e===o));return{expiresAt:(null==t?void 0:t.expiresAt)||Date.now()+Z,selectedVariantKey:(null==t?void 0:t.selectedVariantKey)||null,testKey:o}}));return H(e),{allSelected:!1}},this.shouldAllowHostedVsNativeTest=()=>"function"==typeof Y.checkoutSettings.createCartId&&!!Y.enabledVariantTestKeys.includes("hosted_vs_native"),this.registerTestHostedVsNative=async()=>{if(!this.shouldAllowHostedVsNativeTest())return;po("[TEST] - Registering hosted vs native test");const o=Io("hosted_vs_native");if(o)return void po(`[TEST] - Hosted vs native test already has variant selected: ${o}`);const e=await(async({testKeys:o})=>{if(0===o.length)return null;const{errors:e,json:t}=await X("/api/zonos-elements/select-variance-test",{body:{testKeys:o},method:"POST"});return e.length||!t?null:B(t)})({testKeys:["hosted_vs_native"]});if(!e)return void po("[TEST] - Failed to get selection for hosted vs native test");const t=(({baseTestObj:o,mergeTestObj:e})=>o.map((({testKey:o})=>{const t=e.find((({testKey:e})=>e===o));return{expiresAt:(null==t?void 0:t.expiresAt)||Date.now()+Z,selectedVariantKey:(null==t?void 0:t.selectedVariantKey)||null,testKey:o}})))({baseTestObj:K.enabledVariantTestKeys||[],mergeTestObj:e});H(t)},this.handleHostedVsNative=async()=>{var o;if(!this.shouldAllowHostedVsNativeTest())return{redirected:!1};const e=Io("hosted_vs_native");if(po(`[TEST] - hosted_vs_native: ${e}`),"function"!=typeof Y.checkoutSettings.createCartId)return po("[TEST] - createCartId is not provided, skipping hosted vs native test"),{redirected:!1};if("hosted"!==e)return po("[TEST] - Hosted vs native test is enabled for native, skipping"),{redirected:!1};if(!(null===(o=Y.genericSettings)||void 0===o?void 0:o.hostedCheckoutUrl))return po("[TEST] - Hosted checkout URL is not provided"),{redirected:!1};po('"createCartId" is provided, start building cart');const t=await Y.checkoutSettings.createCartId();let s,n=null;"object"==typeof t?(s=t.cartId,n=t.shippingData||null):s=t;const i=(()=>{const o=new URLSearchParams(window.location.search);po("legacy urlParams","info",Object.fromEntries(o.entries()));const e=e=>{const t=o.get(e);return t&&"undefined"!==t?t:""},t=M(o)||R.selectedCountryCode||"US",s=e("customerCity"),n=e("customerEmail"),i=e("customerAddress1"),c=e("customerAddress2"),r=e("customerName"),a=e("customerPhone"),d=e("customerZip"),l=e("customerState");return{customerAddress1:i,customerAddress2:c,customerCity:s,customerCountry:t,customerEmail:n,customerFirstName:e("customerFirstName"),customerLastName:e("customerLastName"),customerName:r,customerPhone:a,customerState:l,customerZip:d}})(),c=(({cartId:o,checkoutSessionId:e,customerAddress1:t,customerAddress2:s,customerCity:n,customerCountry:i,customerEmail:c,customerFirstName:r,customerLastName:a,customerPhone:d,customerState:l,customerZip:h,hostedCheckoutUrl:u,isTestMode:m,isVariantTest:p})=>{const g=new URLSearchParams;return g.set("tempCartUUID",o),r&&g.set("customerFirstName",r),a&&g.set("customerLastName",a),c&&g.set("customerEmail",c),d&&g.set("customerPhone",d),h&&g.set("customerZip",h),n&&g.set("customerCity",n),l&&g.set("customerState",l),i&&g.set("zCountry",i),t&&g.set("customerAddress1",t),s&&g.set("customerAddress2",s),m&&g.set("zonosTestMode","1"),e&&g.set("zonosCheckoutSessionId",e),p&&g.set("zonosVariantTest","1"),`${u}?${g.toString()}`})(Object.assign(Object.assign({cartId:s,checkoutSessionId:K.checkoutSessionId||void 0,hostedCheckoutUrl:Y.genericSettings.hostedCheckoutUrl,isTestMode:to(),isVariantTest:!0},i),n));return po(`[TEST] - Redirecting to: ${c}`),window.open(c,"_blank"),{redirected:!0}},this.formatDate=o=>o?new Date(o).toLocaleDateString():"",this.formatTime=o=>o?new Date(o).toLocaleTimeString():"",this.getCurrentLocalePageEnum=()=>{switch(d.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=()=>{const o=d.selectedLandedCost;if(!o)return null;const{landedCost:{amountSubtotals:e}}=o;return e?{settlementAmount:(e.discounts||0)+e.items+e.landedCostTotal+e.shipping}:null},this.getDefaultAddress=()=>this.defaultCustomerProfileAddress.length?this.defaultCustomerProfileAddress:Array.isArray(this.defaultAddress)&&this.defaultAddress.length?this.defaultAddress:Array.isArray(this.defaultAddress)||"object"!=typeof this.defaultAddress?this.defaultAddressParams:[this.defaultAddress],this.handleHostedOpenWindowCallback=o=>{var e;const t=null===(e=Y.genericSettings)||void 0===e?void 0:e.hostedCheckoutUrl;if(!origin)return;const s=["dev.checkout.elements.zonos.com"].some((e=>o.origin.includes(e)));o.origin!==t&&!s||"zonos-checkout-session-update"!==o.data.type||(K.checkoutSessionId=o.data.checkoutSessionId)},this.captureParamsRedirectedForVariantTest=()=>{const o=new URL(window.location.href);if("1"!==o.searchParams.get("zonosVariantTest"))return;const e=o.searchParams.get("zonosCheckoutSessionId");e&&(K.checkoutSessionId=e);const t=K.enabledVariantTestKeys||[];window.Zonos.isLegacyCheckout&&(Io("hosted_vs_native")?H(t.map((o=>"hosted_vs_native"===o.testKey?Object.assign(Object.assign({},o),{selectedVariantKey:"hosted"}):o))):(t.push({expiresAt:Date.now()+Z,selectedVariantKey:"hosted",testKey:"hosted_vs_native"}),H(t))),o.searchParams.delete("zonosCheckoutSessionId"),o.searchParams.delete("zonosVariantTest"),window.history.replaceState({},"",o.toString())}}async initCartInfoHandler(o){l({adjustments:d.adjustments,cartItems:o.detail})}async handleKeyPress(o){"Escape"===o.key&&this.closeDialogHandler()}async closeDialogHandler(o){var e,t;this.open&&((null==o?void 0:o.confirmed)?(this.confirmDialogOpen=!1,bo({event:"zonos-checkout-close",metadata:{checkoutSessionId:K.checkoutSessionId}}),this.open=this.forceDialogOpen||!1,this.preview||"finish"!==d.step||h(),d.step="customer-info",u(),m(),null===(t=(e=Y.checkoutSettings).onClose)||void 0===t||t.call(e)):this.confirmDialogOpen=!0)}async buildCartAndInit(){if("function"==typeof Y.checkoutSettings.createCartId){po('"createCartId" is provided, start building cart');const o=await Y.checkoutSettings.createCartId();let e;"object"==typeof o?(po("object detected, use cartId and prefill address from createCartId","info",o),e=o.cartId,this.useShippingDataFromCreateCartId(o.shippingData),d.customerAuthenticationToken=o.customerAuthenticationToken||null):e=o,window.Zonos.cartId=e;const t=await(async o=>{const{isDgsCartId:e,isLegacyCartId:t}=ao(o);if(!t&&!e)return oo("[ZONOS - loadZonos] invalid cart id"),null;const s=await Ao({cartId:o,retries:5});return po("[ZONOS - loadZonos] getting temp cart data","info",s),s?(window.Zonos.storeId=s.cartData.storeId,window.Zonos.zonosApiKey=s.cartData.credentialToken,{cartData:s.cartData,storeFavicon:s.storeFaviconUrl,storeId:s.cartData.storeId,storeLogo:s.storeLogoUrl,zonosApiKey:s.cartData.credentialToken}):(oo("[ZONOS - loadZonos] Error getting temp cart data, stop checkout process."),null)})(e),s=null==t?void 0:t.cartData;if(!s)return oo("Failed to build cart, please try again."),!1;window.Zonos.cartData=s;const{adjustments:n,cartItems:i}=J(s);await l({adjustments:n,cartItems:i})}else if(window.Zonos.cartData){po("tempCartUUID is provided, start building cart");const{adjustments:o,cartItems:e}=J(window.Zonos.cartData);await l({adjustments:o,cartItems:e})}else if(Y.checkoutSettings.buildCartDetail&&R.selectedCountryCode){po("build cart detail");const o=await Y.checkoutSettings.buildCartDetail({countryCode:R.selectedCountryCode,currencyCode:R.targetCurrency}),e=o.filter((o=>o.amount>=0)),t=o.filter((o=>o.amount<0));po("cartItems","info",{cartItems:o});const s=t.map((o=>({amount:o.amount,currencyCode:o.currencyCode,description:o.name||o.description||"",productId:o.productId||null,sku:o.sku||null,type:"CART_TOTAL"})));await l({adjustments:s,cartItems:e})}if(!K.checkoutSessionId){const o=await p();if(po(`stripeStoreInitCheckoutSession: ${o}`),!o)return!1}return d.isStagingMode||g(),await this.applyStripeTheme(),this.isRedirectAfterOrder="REDIRECT_TO_SUCCESS_PAGE"===Y.checkoutSettings.successBehavior||!!d.externalConfirmationPageURL,!0}reloadCheckoutSession(){window.location.reload()}handleOrderDuplication(){const o=so(localStorage.getItem("zonos--placed-order-info"));if(!o)return void localStorage.removeItem("zonos--placed-order-info");const e=Date.now()-o.time;po(`=== Existing placed order info: ${o.orderId} - ${this.formatDate(o.time)} - elapsed in hh:ss format: ${new Date(e).toISOString().substring(11,8)}`,"warn");const t=parseFloat(new URLSearchParams(window.location.search).get("zonosOverrideExpiredDuplication")||"0")||216e5;if(e>t)return po(`=== Existing placed order info is older than ${t}ms, cleaning localStorage`,"warn"),void localStorage.removeItem("zonos--placed-order-info");this.placedOrderInfo=o,po("=== Showing order duplication confirmation","warn")}recordCheckoutInfo(){K.checkoutSessionId&&ro({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:K.checkoutSessionId})}confirmProceedWithOrderDuplication(){this.placedOrderInfo=null,K.checkoutSessionId&&ro({attributes:[{key:"ORDER_DUPLICATION_CONSENT",value:"1"}],checkoutSessionId:K.checkoutSessionId})}markTheSessionAsAbandonedCart(){K.checkoutSessionId&&ro({attributes:[{key:"WITH_ABANDONED_CART_TOKEN",value:"1"}],checkoutSessionId:K.checkoutSessionId})}handleCancelOrderDuplication(){var o;if(this.placedOrderInfo=null,this.isLegacyCheckout){const e=(null===(o=window.Zonos.cartData)||void 0===o?void 0:o.storeBaseUrl)||Y.onlineStoreSettings.url;if(!e)return;return window.parent&&(window.parent.location.href=e),void(window.location.href=e)}this.closeDialogHandler({confirmed:!0})}attachCheckout(){const o=Y.checkoutSettings.placeOrderButtonSelector,e=Y.checkoutSettings.alwaysTriggerInternationalCheckoutSelector;if(po(`attach checkout ${o}`),po(`attach checkout to always trigger international checkout selector: ${e}`),!o&&!e&&!window.Zonos.cartData)return;const t=[o,e,`#${uo}`,`#${lo}`,`#${ho}`].filter(Boolean);document.querySelectorAll(t.join(",")).forEach((t=>{t.getAttribute("data-zonos-checkout-attached")||(po(`attached event to button ${o}`,"info",{button:t}),t.addEventListener("click",(async o=>{var s,n;const i=performance.now(),r=e&&t.matches(e),a=t.matches(`#${ho}`),l=t.matches(`#${uo}`)||t.matches(`#${lo}`);if(!window.Zonos.isLegacyCheckout&&(!So()||((o=!0)=>!R.localizationLoaded||!!R.isDisabledCountry&&(o&&po("Checkout: disabled country"),!0))())&&!r&&!a&&!l)return;o.preventDefault(),o.stopPropagation(),po("zonos checkout button clicked");const{shouldAllowOrder:h}=await this.checkStripePaymentIntentStatus({triggeredButton:o.target});if(h){if(window.Zonos.logIntervalId||(window.Zonos.logIntervalId=setInterval((()=>{(async()=>{if(0===window.Zonos.loadTimeApiInfoList.length)return;po("Sending bulk load time api log","info",{loadTimeApiInfoList:window.Zonos.loadTimeApiInfoList});const o={data:[...window.Zonos.loadTimeApiInfoList],storeId:window.Zonos.storeId||0};window.Zonos.loadTimeApiInfoList.length=0;const{errors:e}=await X("/api/zonos-elements/log-bulk-load-data",{body:o,method:"POST"});e.length&&(window.Zonos.loadTimeApiInfoList.push(...o.data),To++,To>5&&window.Zonos.logIntervalId&&clearInterval(window.Zonos.logIntervalId))})()}),2e3)),Y.enabledVariantTestKeys.includes("hosted_vs_native")){this.isOverlayLoading=!0,await this.registerTestHostedVsNative();const{redirected:o}=await this.handleHostedVsNative();if(this.isOverlayLoading=!1,o)return}c.isFetchingSession=!0,this.open=!0;try{if(!await this.buildCartAndInit())throw new Error("Error building cart");null===(s=window.opener)||void 0===s||s.postMessage({checkoutSessionId:K.checkoutSessionId,type:"zonos-checkout-session-update"},"*"),z({isPreview:this.preview,sessionTimeout:54e5}),bo({event:"zonos-checkout-start",metadata:{checkoutSessionId:K.checkoutSessionId}}),f({checkoutSessionId:K.checkoutSessionId,eventName:"checkout_open"});const{enabled:o}=await(async()=>{const{errors:o,json:e}=await X("/api/zonos-elements/get-store-discount-enabled-status");return o.length||!(null==e?void 0:e.enabled)?{enabled:!1}:{enabled:!0}})();if(d.shouldHideDiscountInput=!o,this.handleOrderDuplication(),window.Zonos.isLegacyCheckout)(async()=>{const{elapsedTime:o}=go(),e={cache:"miss",eventName:"jsdelivr",flag:"LOG_CHECKOUT_FACADE_LOAD",href:window.location.href,loadTime:o,metadata:Object.assign({allLogs:zo},eo()),scriptLoadUrl:"checkoutFacade",storeId:window.Zonos.storeId||0};X("/api/zonos-elements/log-script-load",{body:e,method:"POST"})})();else{(async({loadTime:o})=>{const e={cache:"miss",eventName:"jsdelivr",flag:"LOG_NATIVE_CHECKOUT_LOAD",href:window.location.href,loadTime:o,metadata:Object.assign({allLogs:zo},eo()),scriptLoadUrl:"nativeCheckout",storeId:window.Zonos.storeId||0};X("/api/zonos-elements/log-script-load",{body:e,method:"POST"})})({loadTime:performance.now()-i})}this.recordCheckoutInfo(),mo()&&this.markTheSessionAsAbandonedCart()}catch(o){if(o instanceof Error&&"Cart is expired."===o.message&&(this.isCartExpired=!0),c.isFetchingSession=!1,oo(o),this.isCartExpired)return void(c.isFetchingSession=!0);no({endpoint:"Error creating Checkout",errors:[o instanceof Error?o.toString():"Unknown error"],metadata:{allLogs:zo,cartId:window.Zonos.cartId,checkoutSessionBody:w(),href:window.location.href,storeBaseUrl:(null===(n=window.Zonos.cartData)||void 0===n?void 0:n.storeBaseUrl)||Y.onlineStoreSettings.url}}),k({messages:[V("There's been an error creating your checkout session. Please reload and try again or contact support if the error persists")],title:V("Error creating Checkout")})}}}),{capture:!0,passive:!1}),Y.checkoutSettings.disablePlaceOrderButtonActivation||t.removeAttribute("disabled"),t.setAttribute("data-zonos-checkout-attached","true"),t.matches(`#${uo}`)&&(t.dispatchEvent(wo("click")),v(),t.remove()),t.matches(`#${lo}`)&&(t.dispatchEvent(wo("click")),t.remove()))}))}appearanceSettingsOverrideChanged(){this.appearanceSettingsOverride&&this.applyStripeTheme()}useShippingDataFromCreateCartId(o){if(!o)return;po("shipping data from createCartId result","info",Object.entries(o));const{customerAddress1:e,customerAddress2:t,customerCity:s,customerCountry:n,customerEmail:i,customerFirstName:c,customerLastName:r,customerName:a,customerPhone:d,customerState:l,customerZip:h}=o,u=new URLSearchParams(window.location.search),m=n||M(u)||R.selectedCountryCode;this.applyPrefillAddress({customerAddress1:e,customerAddress2:t,customerCity:s,customerCountry:m,customerEmail:i,customerFirstName:c,customerLastName:r,customerName:a,customerPhone:d,customerState:l,customerZip:h})}useLegacyQueryParams(){const o=new URLSearchParams(window.location.search);po("legacy urlParams","info",Object.fromEntries(o.entries()));const e=e=>{const t=o.get(e);return t&&"undefined"!==t?t:null},t=M(o)||R.selectedCountryCode,s=e("customerCity"),n=e("customerEmail"),i=e("customerAddress1"),c=e("customerAddress2"),r=e("customerName"),a=e("customerFirstName"),d=e("customerLastName"),l=e("customerPhone"),h=e("customerZip"),u=e("customerState");this.applyPrefillAddress({customerAddress1:i,customerAddress2:c,customerCity:s,customerCountry:t,customerEmail:n,customerFirstName:a,customerLastName:d,customerName:r,customerPhone:l,customerState:u,customerZip:h})}applyPrefillAddress(o){const e=o.customerAddress1||"",t=o.customerCountry||"",s=o.customerAddress2||"",n=o.customerCity||"",i=o.customerEmail||"",c=o.customerFirstName&&o.customerLastName?`${o.customerFirstName} ${o.customerLastName}`:o.customerName||"",r=o.customerPhone||"",a=o.customerZip||"",d=o.customerState||"";e&&c&&r&&t?t&&R.shippingZoneCountries&&!(t in R.shippingZoneCountries)?po(`Country "${t}" is not in the shipping zone, so it can not be prefilled`,"warn"):(this.defaultAddressParams=[{address:{city:n||"",country:t,line1:e,line2:s,postal_code:a,state:d},email:i,name:c,phone:r}],po("Prefill address applied","info",{prefillAddress:this.defaultAddressParams,providedAddress:o})):po("Missing required query params so it can not be prefilled","info",[!e&&"line1",!c&&"name",!r&&"phone",!t&&"country"].filter(Boolean).join(", "))}overrideStagingModeChanged(){d.isStagingMode=!!this.overrideStagingMode}async init(){c.stripe=window.Zonos.stripe,this.stripe=window.Zonos.stripe,d.isStagingMode=io(),void 0!==this.overrideStagingMode&&(d.isStagingMode=this.overrideStagingMode),(({domesticRedirectedBtnSelector:o,onInternationalCheckoutSelected:e,onShippingAddressSessionFound:t})=>{if(!window.Zonos.isBigCommerce)return;const s=async o=>{var t;const s=document.querySelector((null===(t=Y.genericSettings)||void 0===t?void 0:t.bigcommerceDomesticCheckoutCountrySelector)||xo),n=(null==s?void 0:s.value)||o;if(!n)return!1;if(!So(!1,n))return!1;e&&await e(),F({isInitializing:!1,newSelectedCountryCode:n});const c={address1:"",address2:"",city:"",countryCode:n,firstName:"",lastName:"",phone:"",postalCode:"",stateOrProvince:""};return i({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}),window.location.href="/",!0};let c=!1,r=!1,a=!1;const d=new MutationObserver((async()=>{var l;const h=document.querySelector(o),u=n();if(!h&&u){const o=document.createElement("button");return o.style.display="none",o.id="zonos--domestic-redirected-checkout-button",document.body.appendChild(o),null==t||t(u),void d.disconnect()}if(!window.location.pathname.includes("/checkout")||!window.Zonos.isBigCommerce)return void d.disconnect();if(a)return;a=!0;try{if(await(async({onInternationalCheckoutSelected:o})=>{var e,t,s,n,c,r,a,d,l,h;const u=await(async()=>{var o,e;try{const t=await fetch("/api/storefront/cart",{credentials:"same-origin",headers:{Accept:"application/json"}});if(!t.ok)return po(`Failed to fetch BigCommerce cart: ${String(t.status)}`,"error"),null;const s=await t.json();return null!==(e=null===(o=null==s?void 0:s[0])||void 0===o?void 0:o.id)&&void 0!==e?e:null}catch(o){return oo("Error fetching BigCommerce cart data",o),null}})();if(!u)return!1;const m=await(async o=>{try{const e=await fetch(`/api/storefront/checkouts/${o}`,{credentials:"same-origin",headers:{Accept:"application/json","Content-Type":"application/json"}});return e.ok?await e.json():(po(`Failed to fetch BigCommerce checkout: ${String(e.status)}`,"error"),null)}catch(o){return oo("Error fetching BigCommerce checkout data",o),null}})(u),p=null===(t=null===(e=null==m?void 0:m.consignments)||void 0===e?void 0:e[0])||void 0===t?void 0:t.shippingAddress;if(!(null==p?void 0:p.countryCode))return!1;const g=p.countryCode;return!!So(!1,g)&&(po(`Logged-in user has international shipping address: ${g}, redirecting`,"info"),o&&await o(),F({isInitializing:!1,newSelectedCountryCode:g}),i({address1:null!==(s=p.address1)&&void 0!==s?s:"",address2:null!==(n=p.address2)&&void 0!==n?n:"",city:null!==(c=p.city)&&void 0!==c?c:"",countryCode:g,firstName:null!==(r=p.firstName)&&void 0!==r?r:"",lastName:null!==(a=p.lastName)&&void 0!==a?a:"",phone:null!==(d=p.phone)&&void 0!==d?d:"",postalCode:null!==(l=p.postalCode)&&void 0!==l?l:"",state:null!==(h=p.stateOrProvince)&&void 0!==h?h:""}),window.location.href="/",!0)})({onInternationalCheckoutSelected:e}))return void d.disconnect()}catch(o){oo("Error checking logged-in user shipping address",o)}finally{a=!1}const m=document.querySelector((null===(l=Y.genericSettings)||void 0===l?void 0:l.bigcommerceDomesticCheckoutCountrySelector)||xo);if(!m)return;if(po("Domestic checkout found - Listening for shipping country change","info",{value:m.value}),r)return;r=!0,d.disconnect();const p=setInterval((async()=>{if(!c){c=!0;try{if(await s())return void clearInterval(p);c=!1}catch(o){c=!1}}}),1e3),g=setInterval((()=>{var o;if(!window.bcStripeElements)return void clearInterval(g);const e=null===(o=window.bcStripeElements)||void 0===o?void 0:o.getElement("address");e&&(clearInterval(g),e.on("change",(o=>{const e=o.value.address.country;e&&s(e)})))}),500)}));d.observe(document.body,{childList:!0,subtree:!0})})({domesticRedirectedBtnSelector:uo,onInternationalCheckoutSelected:async()=>{this.detectedDomesticCheckoutDialogOpen=!0,await new Promise((o=>setTimeout(o,2e3)))},onShippingAddressSessionFound:o=>{this.defaultAddress=[{address:{city:o.city,country:o.countryCode,line1:o.address1,line2:o.address2,postal_code:o.postalCode,state:o.state},email:"",name:`${o.firstName} ${o.lastName}`,phone:o.phone}]}}),window.Zonos&&this.useLegacyQueryParams();const o=setInterval((()=>{c.stripe=window.Zonos.stripe,this.stripe=window.Zonos.stripe,this.stripe?(this.storybookPaymentStatusOverride||(po("init checkout"),this.preview||this.forceDialogOpen?this.buildCartAndInit():window.Zonos.isLegacyCheckout?this.attachCheckout():window&&(this.attachCheckout(),new MutationObserver((()=>{this.attachCheckout()})).observe(document.body,{childList:!0,subtree:!0}))),clearInterval(o)):po("waiting for stripe to be loaded")}),50);setTimeout((()=>{clearInterval(o)}),1e4)}async setToFinishStep(o){d.step="finish",this.storybookPaymentStatusOverride=o}async mockCheckoutSession(o){y(o)}async triggerCheckoutInternational(){const o=document.querySelector(`#${ho}`);o&&o.dispatchEvent(wo("click"))}async handleCustomerInfoContinue(){var o,e,t,s;bo({event:"zonos-checkout-customer-info",metadata:{checkoutSessionId:K.checkoutSessionId}}),f({checkoutSessionId:K.checkoutSessionId,eventName:"checkout_customerInfoCompleted"}),this.submitLoading=!0;const{isRequestNotReady:n}=await b();n&&"stripe"===d.addressFormRenderType&&no({endpoint:"ADDRESS_NOT_READY_AT_CUSTOMER_INFO_CONTINUE",errors:["Address not ready at customer info continue"],metadata:{address:null===(e=null===(o=c.stripeAddressEventData)||void 0===o?void 0:o.value)||void 0===e?void 0:e.address,billingAddress:null===(s=null===(t=c.stripeBillingAddressEventData)||void 0===t?void 0:t.value)||void 0===s?void 0:s.address,cartId:window.Zonos.cartId}});const i=o=>{"customer-info"===d.step?c.isFetchingLandedCost||(d.landedCostData&&($({currency:d.currency}),C()),this.submitLoading=!1,o&&clearInterval(o)):clearInterval(o)};i();const r=setInterval((()=>{i(r)}),20);setTimeout((()=>{clearInterval(r)}),1e4)}async handleShippingContinue(){C()}handleInventoryCheckDialogConfirm(){d.inventoryCheckErrorMessage=null,this.isLegacyCheckout||this.closeDialogHandler({confirmed:!0})}handleCartExpiredDialogConfirm(){var o;if(this.isCartExpired=!1,this.isLegacyCheckout){const e=null===(o=window.Zonos.cartData)||void 0===o?void 0:o.storeBaseUrl;if(!e)return;return window.parent&&(window.parent.location.href=e),void(window.location.href=e)}window.parent&&(window.parent.location.href=window.location.href),window.location.reload()}async handleStripePaymentContinue(){if("USD"!==c.checkoutSettlementCurrency||!c.shouldRenderPayInUsdButton||this.payInUsdConfirmDialogOpen){if(this.payInUsdConfirmDialogOpen=!1,U.paypalErrorMessage=null,c.hasPaymentError=!1,this.submitLoading=!0,d.inventoryCheckErrorMessage=null,!await S())return c.hasPaymentError=!0,c.customErrorMessage=V("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:c.checkoutSettlementCurrency}),void(this.submitLoading=!1);try{d.inventoryCheckErrorMessage=await x()}catch(o){d.inventoryCheckErrorMessage=V("Unable to check inventory. Please try again.")}if(d.inventoryCheckErrorMessage)this.submitLoading=!1;else{if(D()>0){const o=await T();if(!o.success)return c.hasPaymentError=!0,c.customErrorMessage=o.error||V("Unable to apply store credit. Please try again."),void(this.submitLoading=!1)}if(I()){try{const o=await A();if(!o.valid)return c.hasPaymentError=!0,c.customErrorMessage=o.errorMessage,void(this.submitLoading=!1);const e=await O();if(!e.success)return c.hasPaymentError=!0,c.customErrorMessage=e.error||V("Unable to place order with store credit. Please try again."),void(this.submitLoading=!1);C(),m()}catch(o){oo(o),bo({event:"zonos-checkout-payment-fail",metadata:{checkoutSessionId:K.checkoutSessionId}}),c.hasPaymentError=!0}this.submitLoading=!1}else{try{await _(),C(),m()}catch(o){oo(o),bo({event:"zonos-checkout-payment-fail",metadata:{checkoutSessionId:K.checkoutSessionId}}),c.hasPaymentError=!0,c.shouldInventoryRefund&&(E(),c.shouldInventoryRefund=!1)}this.submitLoading=!1}}}else this.payInUsdConfirmDialogOpen=!0}async handleFinishClick(){if(P(),this.preview)return d.step="customer-info",void await this.init();if(h(),window.Zonos.isLegacyCheckout&&window.Zonos.cartData){const o=window.Zonos.cartData.storeBaseUrl||Y.onlineStoreSettings.url;return window.parent&&(window.parent.location.href=o),void(window.location.href=o)}const o=window.location.href.split("?")[0];this.open=!1,window.location.hostname.includes("dashboard.zonos.com")||(window.history.replaceState(window.history.state,document.title,o),window.location.reload())}handleWindowResize(){this.isMobile=co(this.mobile),this.applyStripeTheme(),po(`mobile: ${this.isMobile}`)}handleMobileChange(){this.isMobile=co(this.mobile),this.applyStripeTheme(),po(`mobile: ${this.isMobile}`)}handleAppearanceSettingsOverrideChange(){var o;(null===(o=this.appearanceSettingsOverride)||void 0===o?void 0:o.theme)&&(this.appearanceSettingsOverride.theme=q(this.appearanceSettingsOverride.theme))}handleAddressChange(){P()}handleCustomerProfileChange(){var o,e;if(!this.customerProfile)return po("No customer profile","info"),void(this.defaultCustomerProfileAddress=[]);po("Customer profile found","info",{customerProfile:this.customerProfile}),this.defaultCustomerProfileAddress=(null===(e=null===(o=c.customerProfile)||void 0===o?void 0:o.locations)||void 0===e?void 0:e.map((o=>{var e;return{address:{city:o.locality,country:o.countryCode,line1:o.line1,line2:o.line2||"",postal_code:o.postalCode,state:o.administrativeArea},email:o.email||(null===(e=c.customerProfile)||void 0===e?void 0:e.email)||"",name:o.name||"",phone:o.phone||""}})))||[]}handleClientSecretChange(){po("==== Client secret changed","info",{clientSecret:this.clientSecret,stripeCustomerSessionClientSecret:this.stripeCustomerSessionClientSecret}),this.applyStripeTheme()}handleOpenChange(){const o="data-zonos-overflow-origin",e=document.body,t=document.documentElement;if(this.open)window.Zonos.openHelloDialog(!1),e.style.overflow&&e.setAttribute(o,e.style.overflow),e.style.overflow="hidden",t.style.overflow&&t.setAttribute(o,t.style.overflow),t.style.overflow="hidden";else{this.stripeCustomerSessionClientSecret=null;const s=e.getAttribute(o),n=t.getAttribute(o);s?(e.removeAttribute(o),e.style.overflow=s):e.style.removeProperty("overflow"),n?(t.removeAttribute(o),t.style.overflow=n):t.style.removeProperty("overflow")}}componentWillLoad(){this.init(),this.isMobile=co(this.mobile),this.isIframed=window.self!==window.top,po(`iframed: ${this.isIframed}`),window.Zonos.isLegacyCheckout&&this.captureParamsRedirectedForVariantTest(),this.handleAppearanceSettingsOverrideChange(),this.storeUnsubscribeList=[G("selectedLocale",(()=>{this.applyStripeTheme()})),N("selectedShippingOption",(()=>{var o,e,t,s;const n=d.selectedShippingOption;(null===(o=Y.genericSettings)||void 0===o?void 0:o.shouldFedExShippingConsentForCanadianShopper)&&(null===(t=null===(e=null==n?void 0:n.shippingProfile)||void 0===e?void 0:e.serviceLevel.code)||void 0===t?void 0:t.toLowerCase().startsWith("fedex."))&&"CA"===(null===(s=c.stripeAddressEventData)||void 0===s?void 0:s.value.address.country)&&(this.shouldShowFedexShippingConsentDialog=!0)})),j("stripeAddressEventData",(o=>{var e;if(!window.Zonos.isBigCommerce||!o||this.redirectToDomesticCheckoutDialogOpen||!(null===(e=Y.genericSettings)||void 0===e?void 0:e.isBigcommerceDomesticCheckoutRedirectEnabled)||"USD"!==Y.sourceCurrency)return;if(!this.open)return;if(window.location.pathname.includes("/checkout"))return;const t=o.value.address.country;t&&Y.disabledCountries.includes(t)&&(this.redirectToDomesticCheckoutDialogOpen=!0,po(`Domestic country ${t} selected in international checkout, redirecting to BigCommerce domestic checkout`,"info"),setTimeout((()=>{window.location.href="/checkout"}),2e3))}))],this.initializeTestKeys(),window.addEventListener("message",this.handleHostedOpenWindowCallback),po(`mobile: ${this.isMobile}`)}disconnectedCallback(){P(),h(),this.storeUnsubscribeList.forEach((o=>o())),window.removeEventListener("message",this.handleHostedOpenWindowCallback)}render(){var o,n,i,r;this.customerProfile=c.customerProfile,this.clientSecret=c.clientSecret,c.stripeCustomerSessionClientSecret&&(this.stripeCustomerSessionClientSecret=c.stripeCustomerSessionClientSecret);const a="finish"!==d.step&&"error"!==d.step&&!c.stripeElements||c.isFetchingSession,{colorPrimary:l,colorSecondary:h,logoUrl:u,style:m}=Q(Y.appearance,this.appearanceSettingsOverride||null),p="ENABLED"===Y.appearance.zonosAttribution,g=Y.appearance.theme,z=l&&vo(l)?"DARK":"LIGHT",f=this.isMobile?g:z,w=this.isMobile?void 0:h,{customMessages:k}=R,v=null===(o=k.find((o=>"checkout_default"===o.pageName)))||void 0===o?void 0:o.message,y=this.getCurrentLocalePageEnum(),b=k.filter((o=>o.pageName===y)),C=this.getBaseCurrencySettlementInfo(),S=()=>{const o=this.preview?`${u}?timestamp=${Date.now()}`:u;return e("div",{class:"zonos--logo"},o&&e("img",{alt:`${Y.organizationName} logo`,src:o}))},x=to(),T=()=>{const o=new URLSearchParams(window.location.search),t=o.get("zonosQaUrl"),s=o.get("zonosDebug"),n=o.get("zonosE2ETest"),i=this.overrideStagingMode||io();return e("zonos-v-stack",null,e("div",{class:"zonos--logo-wrapper"},S(),x&&e("zonos-badge",{badgeColor:"orange",size:"small"},V("Test mode")),i&&e("zonos-badge",{badgeColor:"red",size:"small"},V("Staging mode")),"1"===s&&e("zonos-badge",{badgeColor:"cyan",size:"small"},"debug"),t&&e("zonos-badge",{badgeColor:"purple",size:"small"},t),n&&e("zonos-badge",{badgeColor:"gray",size:"small"},"E2E Test")),e("zonos-checkout-progress-tabs",{backgroundColor:this.isMobile?"--zonos-elements-gray-0":null}),b.map((o=>e("zonos-custom-message",{icon:Oo,message:o.message}))))},I=()=>d.checkoutSessionTimeoutShow?e("zonos-rest-state",{class:"zonos--session-timeout",restStateSubtitle:V("Your checkout session has expired. Please reload the page to continue."),restStateTitle:V("Session timed out"),restStateType:"Warning"},e("zonos-button",{onClick:()=>this.reloadCheckoutSession(),variant:"primary"},V("Reload"))):e("div",{class:"zonos--content",style:{"--zonos--border-radius":ko({overrideBorderStyle:m})}},"finish"!==d.step&&"error"!==d.step&&e(t,null,e("div",{class:"zonos--left","data-theme":f,style:yo({"--zonos--primary-color":this.isMobile?void 0:l})},!this.isMobile&&T(),"customer-info"===d.step&&e("zonos-customer-info",{continueLoading:this.submitLoading,defaultAddress:this.getDefaultAddress(),isMobile:this.isMobile,onContinueClicked:()=>this.handleCustomerInfoContinue(),submitBtnColor:w}),"shipping"===d.step&&e("zonos-shipping",{continueLoading:this.submitLoading,isMobile:this.isMobile,onContinueClicked:()=>this.handleShippingContinue(),submitBtnColor:w}),"payment"===d.step&&e("zonos-checkout-payment",{continueLoading:this.submitLoading,isMobile:this.isMobile,onContinueClicked:async()=>{await this.handleStripePaymentContinue()},submitBtnColor:w})),e("div",{class:"zonos--right","data-theme":g},this.isMobile&&T(),e("div",{class:"zonos--right-actions"},window.Zonos.showBaseForeign&&e("zonos-currency-toggle",null),!this.isLegacyCheckout&&e("zonos-button",{class:"zonos--close-button",icon:e("zonos-icon",{"aria-label":"Close checkout dialog",content:Co}),noBackground:!0,onClick:()=>this.closeDialogHandler()})),e("div",{class:"flex--wrapper"},e("div",{class:"zonos--wrapper"},e("zonos-review",{collapsed:this.collapseReviewMobile,mobile:this.isMobile,onClick:()=>{this.isMobile&&(this.collapseReviewMobile=!this.collapseReviewMobile)}}),e("zonos-collapse",{collapsed:this.collapseReviewMobile&&this.isMobile},e("zonos-cart-items",null),this.isMobile&&e("zonos-v-stack",{spacing:16},e("zonos-cart-subtotal",{submitBtnColor:w}),e("zonos-custom-message",{class:"zonos--checkout-default-message",icon:Oo,message:v})))),e("zonos-cart-restricted-items",null),!this.isMobile&&e("zonos-v-stack",{spacing:16},e("zonos-cart-subtotal",null),e("zonos-custom-message",{class:"zonos--checkout-default-message",icon:Oo,message:v}))))),("finish"===d.step||"error"===d.step)&&e("div",{class:"zonos--done","data-theme":g},e("div",{class:"zonos--header"},S(),!this.isRedirectAfterOrder&&e("zonos-button",{class:"zonos--close-button",icon:e("zonos-icon",{"aria-label":"Close checkout dialog",content:Co}),noBackground:!0,onClick:()=>this.handleFinishClick(),theme:g})),e("zonos-checkout-finish",{borderRadius:m,onCloseClick:()=>this.handleFinishClick(),overrideNotification:"error"===d.step&&d.error?Object.assign(Object.assign({},d.error),{type:"error"}):void 0,storybookForceStatus:this.storybookPaymentStatusOverride})),e("zonos-checkout-footer",{"data-theme":g,mobile:this.isMobile,slot:this.isMobile?void 0:"dialog-footer"}));return e(s,{class:fo(["zonos--checkout zonos--elements","payment"===d.step&&"zonos--processing-payment",p&&"has-footer",this.preview&&"preview",this.isMobile&&"mobile",this.isIframed&&"iframed",this.hiddenMode&&"hidden-mode"])},this.preview?I():e("zonos-dialog",{borderStyle:m,class:"zonos--checkout-dialog","data-theme":g,height:"980px",isLoading:a,mobile:this.isMobile,noBodyPadding:!0,noBorder:!0,noClickOutside:!0,noCloseButton:!0,onCloseDialog:()=>this.closeDialogHandler(),open:this.open,width:"1200px"},I()),e("zonos-dialog",{isLoading:!0,loadingText:V("You will be redirected to international checkout shortly."),loadingTitle:V("We detected that you are shipping to an international address."),noClickOutside:!0,noCloseButton:!0,open:this.detectedDomesticCheckoutDialogOpen,width:"450px"}),e("zonos-dialog",{isLoading:!0,loadingText:V("You will be redirected to domestic checkout shortly."),loadingTitle:V("We detected that you are shipping to a domestic address."),noClickOutside:!0,noCloseButton:!0,open:this.redirectToDomesticCheckoutDialogOpen,width:"450px"}),e("zonos-confirm-dialog",{class:"zonos--close-confirm-dialog",dialogCancelBtnText:V("Don't close"),dialogConfirmBtnText:V("Close"),dialogIntent:"warn",dialogOpen:this.confirmDialogOpen,dialogSubtitle:V("Would you like to close checkout and return to the site?"),dialogTitle:V("Are you sure?"),onCancelClicked:()=>{this.confirmDialogOpen=!1},onConfirmClicked:()=>this.closeDialogHandler({confirmed:!0})}),e("zonos-confirm-dialog",{class:"zonos--order-duplication-dialog",dialogCancelBtnText:V("Return to merchant site"),dialogConfirmBtnText:V("Proceed with order"),dialogIntent:"warn",dialogOpen:!!this.placedOrderInfo,dialogSubtitle:(null===(n=this.placedOrderInfo)||void 0===n?void 0:n.zonosOrderNumber)?V("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)}):V("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((null===(i=this.placedOrderInfo)||void 0===i?void 0:i.time)||null),time:this.formatTime((null===(r=this.placedOrderInfo)||void 0===r?void 0:r.time)||null)}),dialogTitle:V("Are you sure?"),dialogWidth:530,onCancelClicked:()=>{this.handleCancelOrderDuplication()},onConfirmClicked:()=>{this.confirmProceedWithOrderDuplication()}}),e("zonos-confirm-dialog",{class:"zonos--fedex-shipping-dialog",dialogConfirmBtnText:V("Confirm"),dialogIntent:"info",dialogOpen:!!this.shouldShowFedexShippingConsentDialog,dialogSubtitle:e(t,null,V("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."),e("zonos-link",{href:"https://ftn.fedex.com/us/assets/docs/One-Time_GAA.pdf",target:"_blank"},V("View GAA Form."))),dialogTitle:V("Fedex Shipping Procedure"),dialogType:"alert",dialogWidth:500,onConfirmClicked:()=>this.shouldShowFedexShippingConsentDialog=!1}),e("zonos-confirm-dialog",{class:"zonos--inventory-check-failure-dialog",dialogConfirmBtnText:V("Return to cart"),dialogIntent:"danger",dialogOpen:!!d.inventoryCheckErrorMessage,dialogSubtitle:d.inventoryCheckErrorMessage,dialogTitle:V("Couldn't place order"),dialogType:"alert",onConfirmClicked:()=>this.handleInventoryCheckDialogConfirm()}),C&&e("zonos-confirm-dialog",{class:"zonos--pay-in-usd-dialog",dialogCancelBtnText:V("Cancel"),dialogConfirmBtnText:V("Pay [orderTotal]",{orderTotal:W({amount:C.settlementAmount,currency:"USD"})}),dialogIntent:"warn",dialogOpen:this.payInUsdConfirmDialogOpen,dialogSubtitle:V("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:V("Pay in USD (United States Dollar)?"),dialogType:"confirm",dialogWidth:480,onCancelClicked:()=>{this.payInUsdConfirmDialogOpen=!1},onConfirmClicked:()=>this.handleStripePaymentContinue()}),e("zonos-confirm-dialog",{class:"zonos--shopping-cart-expired-dialog",dialogConfirmBtnText:V("OK"),dialogIntent:"danger",dialogOpen:this.isCartExpired,dialogSubtitle:V("You are being sent back to the shop to re-add items to your cart."),dialogTitle:V("Shopping cart expired"),dialogType:"alert",onConfirmClicked:()=>this.handleCartExpiredDialogConfirm()}),e("zonos-loading-overlay",{open:this.isOverlayLoading}))}static get assetsDirs(){return["assets"]}static get watchers(){return{appearanceSettingsOverride:["appearanceSettingsOverrideChanged","handleAppearanceSettingsOverrideChange"],overrideStagingMode:["overrideStagingModeChanged"],mobile:["handleMobileChange"],defaultAddress:["handleAddressChange"],customerProfile:["handleCustomerProfileChange"],clientSecret:["handleClientSecretChange"],stripeCustomerSessionClientSecret:["handleClientSecretChange"],open:["handleOpenChange"]}}};_o.style=".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}";export{_o as zonos_checkout}
@@ -1 +0,0 @@
1
- import{d as r}from"./p-dafafa07.js";import{s as o}from"./p-3ac97c01.js";import{l as s,h as e}from"./p-41dd1cb8.js";const a=async()=>{var a,t;const i=null===(a=r.partiesData.find((r=>"DESTINATION"===r.type)))||void 0===a?void 0:a.id,d=null===(t=r.partiesData.find((r=>"PAYOR"===r.type)))||void 0===t?void 0:t.id,n=o.checkoutSessionId;if(!n||!d||!i)return s("Missing required data",{billToPartyId:d,checkoutSessionId:n,shipToPartyId:i}),{errors:["Missing required data"],json:null};const l={billToPartyId:d,checkoutSessionId:n,shipToPartyId:i},{errors:c,json:p}=await e("/api/zonos-elements/place-test-order",{body:l,method:"POST"});return c.length||!p?(s("Error occurs when placing test order",c),{errors:c.map((r=>r.message)),json:null}):{errors:[],json:p}};export{a as p}
@@ -1 +0,0 @@
1
- import{r as o,h as e,a as t,g as s}from"./p-ce75b047.js";import{d as i}from"./p-908f13ae.js";import{l,i as n,t as r,g as h,j as a,k as d,m as c,n as m,d as p}from"./p-3ac97c01.js";import{z as g,g as w,m as f}from"./p-058f6124.js";import{c as z}from"./p-b4b7f705.js";import{h as u,l as b}from"./p-41dd1cb8.js";import{g as v}from"./p-5883217a.js";import{l as x}from"./p-0a377722.js";const y=o=>{const e=null==o?void 0:o.replace("www.","").replace("https://","");return e&&new RegExp(e).test(window.location.href)},k=()=>{var o,e;const{productAddToCartElementSelector:t,productDescriptionElementSelector:s,productTitleElementSelector:i,restrictionBehavior:l}=g.helloSettings;i&&s||x("Hello could not check item restrictions - must provide title and description selectors.");const r=i&&n(i)&&document.querySelectorAll(i)||[],h=s&&n(s)&&document.querySelectorAll(s)||[];if(r.length!==h.length)return x("Hello could not check item restrictions - Title and description selectors do not match"),[];const a="RESTRICT_AND_BLOCK"===l,d=a&&t&&n(t)&&document.querySelectorAll(t)||[];a&&d.length!==h.length&&x('Hello could not disable "Add to cart" buttons - Title and add to cart selectors do not match');const c=[];for(let t=0;t<r.length;t++){const s=r[t],i=h[t];if(s&&i){const l={cartButtonNode:d[t]||null,description:(null===(o=i.textContent)||void 0===o?void 0:o.trim())||"",title:(null===(e=s.textContent)||void 0===e?void 0:e.trim())||""};c.push(l)}}return c},L=class{constructor(e){o(this,e),this.showPeekMessage=!1,this.zonosStoreHelloSettings=g.helloSettings,this.showDialog=!1,this.peekMessage="",this.initialUrl="",this.allRestrictedItems=[],this.allFoundProducts=[],this.productsOnPage=[],this.isHelloWidgetRendered=!1,this.isMobile=!1,this.getHelloPeekMessage=o=>{if(("productDetail"===g.currentHelloPage||"productList"===g.currentHelloPage)&&this.allRestrictedItems.length){const o=r("click to learn more");return`${r("productDetail"===g.currentHelloPage?"Restricted item":"Restricted items found")} - ${o}`}switch(g.currentHelloPage){case"cart":return r("Prepay duties and taxes at checkout");case"productList":case"productDetail":return r("See duty and tax thresholds");default:return r("Welcome to [storeName]",{storeName:o})}},this.enableShowPeekMessage=()=>{this.peekMessage&&(this.showPeekMessage=!0)},this.getNewItemRestrictions=async o=>"productDetail"!==g.currentHelloPage&&"productList"!==g.currentHelloPage||"DISABLED"===g.helloSettings.restrictionBehavior?[]:await(async o=>{if(!o.length)return[];const{selectedCountryCode:e}=l;if(!e)return b("Hello could not check item restrictions - No country code selected"),[];const t=o.map((o=>({description:o.description,name:o.title})));return(await(async({items:o,shipFrom:e,shipTo:t})=>{var s;const i={items:o,shipFrom:e,shipTo:t},{errors:l,json:n}=await u("/api/zonos-elements/check-item-restrictions",{body:i,method:"POST"});return l.length||!n?(b(`Error fetching item restrictions: ${null===(s=l.find(Boolean))||void 0===s?void 0:s.message}`),[]):n.filter(Boolean)})({items:t,shipFrom:"AD",shipTo:e})).map((o=>{var e;const s=(null===(e=t.filter((e=>e.description===o.itemDescription)).find(Boolean))||void 0===e?void 0:e.name)||"";return Object.assign(Object.assign({},o),{name:s})}))})(o),this.triggerShowPeekMessage=()=>{this.peekMessage=this.getHelloPeekMessage(g.organizationName);const{peekMessageBehavior:o,peekMessageDelay:e}=g.helloSettings;"ENABLED"===o&&setTimeout((()=>{this.enableShowPeekMessage(),this.allRestrictedItems.some((o=>this.productsOnPage.some((e=>e.description===o.itemDescription))))||setTimeout((()=>{this.showPeekMessage=!1}),3e3)}),1e3*e)},this.disableAddToCartButtons=()=>{this.productsOnPage.length&&this.productsOnPage.forEach((o=>{var e,t;this.allRestrictedItems.some((e=>e.itemDescription===o.description))?null===(e=o.cartButtonNode)||void 0===e||e.setAttribute("disabled","disabled"):null===(t=o.cartButtonNode)||void 0===t||t.removeAttribute("disabled")}))},this.handleItemRestrictions=async()=>{this.productsOnPage=k();const o=this.productsOnPage.filter((o=>!this.allFoundProducts.some((e=>e.title===o.title)))),e=await this.getNewItemRestrictions(o);this.allRestrictedItems.push(...e),this.allFoundProducts.push(...o),this.disableAddToCartButtons()},this.reloadHelloData=async()=>{await this.handleItemRestrictions(),this.triggerShowPeekMessage()},this.handleProductCountChange=i((()=>{const{productTitleElementSelector:o}=g.helloSettings;if(o){const o=k();if(this.allFoundProducts.length!==o.length&&window.location.href===this.initialUrl){if(!this.allFoundProducts.length)return;this.reloadHelloData()}}}),1e3),this.watchProductCountChange=()=>{var o;const e=new MutationObserver(this.handleProductCountChange);e.observe(document.body,{childList:!0,subtree:!0}),null===(o=this.observerWatcher)||void 0===o||o.push(e)},this.watchPriceChange=()=>{var o;const e=new MutationObserver((()=>{this.displayCurrency()}));e.observe(document.body,{attributes:!0,childList:!0,subtree:!0}),null===(o=this.observerWatcher)||void 0===o||o.push(e)},this.updateHelloOnPageChange=()=>{this.watchProductCountChange(),setInterval((()=>{if(window.location.href!==this.initialUrl){const o=this.initialUrl&&new URL(this.initialUrl);(o&&h(o.searchParams))!==l.selectedCountryCode&&(this.allFoundProducts=[],this.allRestrictedItems=[],this.productsOnPage=[]),this.initialUrl=window.location.href,g.currentHelloPage=(()=>{const{cartUrlPattern:o,homepageUrlPattern:e,productDetailUrlPattern:t,productListUrlPattern:s}=g.helloSettings;return y(o)?"cart":y(t)?"productDetail":y(s)?"productList":y(e)?"home":""})();const e=new URL(window.location.href);if(!h(e.searchParams))return void a(l.selectedCountryCode);this.reloadHelloData()}}),1e3)},this.changeShowDialog=o=>{this.showDialog=o},this.shouldAnimateLeftDesktop=()=>{const o=this.helloRef&&getComputedStyle(this.helloRef).position;if(this.helloRef&&"relative"===o)return v(this.helloRef)},this.shouldRenderHello=(o=!0)=>{if(!l.localizationLoaded)return!1;const{showForCountries:e}=g.helloSettings;return o&&(l.isShippableCountry||x(`Hello: not shippable country - Show for countries: ${e}`)),"ONLY_SHIPPABLE"===e?l.isShippableCountry:"ALL"===e||(null==e?void 0:e.includes(l.selectedCountryCode||""))}}showDialogHandler(o){var e;if(o){const o=null===(e=this.helloElement)||void 0===e?void 0:e.parentElement;o&&o.parentElement===document.body&&(o.style.zIndex="2147483647",document.body.appendChild(o))}}async getCountryList(){return l.helloCountryList}componentWillLoad(){const o=setInterval((async()=>{this.helloRef&&g.loadedConfig&&(this.helloRef.setAttribute("data-zonos-hello-loaded",""),this.updateHelloOnPageChange(),this.watchPriceChange(),this.handleAppearanceSettingsOverrideChange(),clearInterval(o))}),100)}disconnectedCallback(){var o;null===(o=this.observerWatcher)||void 0===o||o.forEach((o=>o.disconnect()))}async displayCurrency(){"DISABLED"!==g.helloSettings.currencyBehavior&&(l.exchangeRate?d():x("Could not display currency. Exchange rate and format data is not available.","warn"))}async convertAndFormat(o){return c(o)}async convert(o){return m(o)}async format(o){return p({amount:o})}async openHelloDialog(o){this.changeShowDialog(o)}handleResize(){this.isMobile=window.innerWidth<=768}handleHelloWidgetInitializedState({countryCode:o,currencyCode:e}){var t,s;this.isHelloWidgetRendered||l.selectedCountryCode&&"function"==typeof g.helloSettings.onInitSuccess&&(this.isHelloWidgetRendered=!0,null===(s=(t=g.helloSettings).onInitSuccess)||void 0===s||s.call(t,{countryCode:o,currencyCode:e}))}getHelloLocation(){const o=this.mobileLocationOverride||g.helloSettings.mobileLocation,e=g.helloSettings.desktopLocation,t=this.isMobile;if(!0===t)return{isMobileWindow:t,isOnLeft:this.animateFromLeftOverride||(null==o?void 0:o.includes("LEFT")),isOnTop:null==o?void 0:o.includes("TOP"),shouldFloat:!!o};{const o=!g.helloSettings.anchorElementSelector&&!!e;return{isMobileWindow:t,isOnLeft:this.animateFromLeftOverride||(null==e?void 0:e.includes("LEFT"))||this.shouldAnimateLeftDesktop(),isOnTop:null==e?void 0:e.includes("TOP"),shouldFloat:o}}}handleAppearanceSettingsOverrideChange(){var o;(null===(o=this.appearanceSettingsOverride)||void 0===o?void 0:o.theme)&&(this.appearanceSettingsOverride.theme=w(this.appearanceSettingsOverride.theme))}componentDidLoad(){this.isMobile=window.innerWidth<=768}render(){var o,s;if(null===(o=g.helloSettings.excludedUrlPatterns)||void 0===o?void 0:o.some((o=>o&&new RegExp(o).test(window.location.href))))return x("Hello is excluded on this url","warn"),null;const{selectedCountryCode:i,targetCurrency:n}=l,{isOnLeft:r,isOnTop:h,shouldFloat:a}=this.getHelloLocation(),d=f(g.appearance,this.appearanceSettingsOverride||null),{theme:c}=d,m=null===(s=this.allRestrictedItems)||void 0===s?void 0:s.filter((o=>this.productsOnPage.some((e=>e.description===o.itemDescription))));this.peekMessage=this.getHelloPeekMessage(g.organizationName);const p=this.shouldRenderHello()&&!!i;return p&&!this.isHelloWidgetRendered&&this.handleHelloWidgetInitializedState({countryCode:i,currencyCode:n}),e(t,{class:"zonos--hello zonos--elements","data-theme":c},p&&e("div",{class:z(["zonos--hello-wrapper",a&&"zonos--hello-widget-float"])},e("button",{class:z(["zonos--hello-widget",this.showPeekMessage&&"zonos--hello-show-peek-message",this.mobileLocationOverride&&"zonos--hello-mobile-override",r&&"zonos--hello-widget-left zonos--hello-widget-animate-from-left",h&&"zonos--hello-widget-top",!!this.allRestrictedItems.length&&"zonos--hello-has-restrictions",a&&"zonos--hello-widget-float"]),onClick:()=>{this.changeShowDialog(!this.showDialog)},onMouseEnter:()=>this.enableShowPeekMessage(),onMouseLeave:()=>this.showPeekMessage=!1,ref:o=>o&&(this.helloRef=o),type:"button"},e("zonos-text",{class:"zonos--hello-message"},this.peekMessage),i&&e("div",{class:"zonos--hello-country-flag-wrapper"},e("zonos-country-flag",{class:"zonos--hello-country-flag",countryCode:i}))),e("div",{class:z(["zonos--hello-dialog-wrapper",this.mobileLocationOverride&&"zonos--hello-dialog-wrapper-mobile-override",r&&"zonos--hello-widget-left zonos--hello-widget-animate-from-left",h&&"zonos--hello-widget-top",a&&"zonos--hello-widget-float"]),style:{height:this.showDialog?"fit-content":"0px"}},e("zonos-hello-dialog",{animateFromLeftOverride:this.animateFromLeftOverride,appearanceSettings:d,isOpen:this.showDialog,mobileLocationOverride:this.mobileLocationOverride,restrictedItems:m,setIsOpen:this.changeShowDialog}))))}get helloElement(){return s(this)}static get watchers(){return{showDialog:["showDialogHandler"],appearanceSettingsOverride:["handleAppearanceSettingsOverrideChange"]}}};L.style=":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}:host .zonos--hello-wrapper{position:relative}:host .zonos--hello-wrapper .zonos--hello-dialog-wrapper-mobile-override{position:fixed;bottom:0;left:0;width:100vw;z-index:1001;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content}@media (max-width: 768px){:host .zonos--hello-wrapper .zonos--hello-dialog-wrapper{position:fixed;bottom:0;left:0;width:100vw;z-index:1001;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content}}@media screen and (min-width: 769px){:host .zonos--hello-wrapper .zonos--hello-dialog-wrapper.zonos--hello-widget-float{position:fixed;bottom:72px;right:32px;width:auto;height:auto;z-index:1001}:host .zonos--hello-wrapper .zonos--hello-dialog-wrapper.zonos--hello-widget-float.zonos--hello-widget-left{left:32px;right:auto}:host .zonos--hello-wrapper .zonos--hello-dialog-wrapper.zonos--hello-widget-float.zonos--hello-widget-top{bottom:auto;top:32px}}:host .zonos--hello-widget{-webkit-transition:all 0.7s cubic-bezier(0.31, -0.02, 0.06, 1.53);transition:all 0.7s cubic-bezier(0.31, -0.02, 0.06, 1.53);padding:6px;border-radius:30px;background:var(--zonos-elements-page-background);font-size:var(--zonos-elements-font-size-s);border:var(--zonos-elements-border);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;cursor:pointer;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;position:relative;z-index:1000}:host .zonos--hello-widget>.zonos--hello-message{-ms-flex-order:0;order:0;max-width:0;height:100%;white-space:nowrap;-webkit-transition:border 0.3s ease-in, all 0.7s cubic-bezier(0.31, -0.02, 0.06, 1.53);transition:border 0.3s ease-in, all 0.7s cubic-bezier(0.31, -0.02, 0.06, 1.53);overflow:hidden;color:var(--zonos-elements-text-color);position:absolute;background:var(--zonos-elements-page-background);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;border-top-left-radius:30px;border-bottom-left-radius:30px;left:0;-webkit-transform:translateX(calc(-100% + 16px));transform:translateX(calc(-100% + 16px));width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;border-top:var(--zonos-elements-border);border-bottom:var(--zonos-elements-border)}:host .zonos--hello-widget.zonos--hello-has-restrictions{background:var(--zonos-elements-red-100);border:1px solid var(--zonos-elements-red-200)}:host .zonos--hello-widget.zonos--hello-has-restrictions>.zonos--hello-message{background:var(--zonos-elements-red-100);color:var(--zonos-elements-red-800);font-weight:500}:host .zonos--hello-widget.zonos--hello-has-restrictions.zonos--hello-show-peek-message>.zonos--hello-message{border:1px solid var(--zonos-elements-red-200)}:host .zonos--hello-widget.zonos--hello-show-peek-message{max-width:100vw;width:100%}:host .zonos--hello-widget.zonos--hello-show-peek-message>.zonos--hello-message{max-width:100vw;padding:0 6px;padding-right:16px;border:var(--zonos-elements-border)}:host .zonos--hello-widget.zonos--hello-show-peek-message:not(.zonos--hello-widget-animate-from-left)>.zonos--hello-message{border-right:none}:host .zonos--hello-widget.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left>.zonos--hello-message{border-left:0}:host .zonos--hello-widget.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left>.zonos--hello-message{padding-left:16px;padding-right:6px;border-left:none}:host .zonos--hello-widget.zonos--hello-widget-animate-from-left>.zonos--hello-message{-ms-flex-order:1;order:1;-webkit-transform:translateX(calc(100% - 16px));transform:translateX(calc(100% - 16px));right:0;left:auto;border-top-right-radius:30px;border-bottom-right-radius:30px}:host .zonos--hello-widget .zonos--hello-country-flag-wrapper{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center}:host .zonos--hello-widget .zonos--hello-country-flag-wrapper .zonos--hello-country-flag{height:18px;width:18px;position:relative;overflow:hidden;border-radius:30px;-webkit-box-shadow:var(--zonos-elements-v3-shadow-medium);box-shadow:var(--zonos-elements-v3-shadow-medium);z-index:10;justify-self:center}:host .zonos--hello-widget.zonos--hello-widget-float{position:fixed;bottom:72px;right:32px}:host .zonos--hello-widget.zonos--hello-widget-float.zonos--hello-widget-left{left:32px;right:auto}:host .zonos--hello-widget.zonos--hello-widget-float.zonos--hello-widget-top{bottom:auto;top:32px}:host .zonos--hello-widget.zonos--hello-widget-float.zonos--hello-has-restrictions.zonos--hello-show-peek-message>.zonos--hello-message{border:none}:host .zonos--hello-widget.zonos--hello-widget-float>.zonos--hello-message{position:relative;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;border-radius:30px;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;top:0;bottom:0;left:0;-webkit-transform:translateX(0);transform:translateX(0);width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;border:none}:host .zonos--hello-widget.zonos--hello-widget-float.zonos--hello-widget-animate-from-left>.zonos--hello-message{-webkit-transform:translateX(0);transform:translateX(0)}:host .zonos--hello-widget.zonos--hello-widget-float.zonos--hello-show-peek-message{width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}:host .zonos--hello-widget.zonos--hello-widget-float.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left>.zonos--hello-message{padding-left:8px;padding-right:4px}:host .zonos--hello-widget.zonos--hello-widget-float.zonos--hello-show-peek-message>.zonos--hello-message{padding:0 var(--zonos-elements-radius-4);padding-right:6px;border:none}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float{position:fixed;bottom:72px;right:32px}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float.zonos--hello-widget-left{left:32px;right:auto}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float.zonos--hello-widget-top{bottom:auto;top:32px}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float.zonos--hello-has-restrictions.zonos--hello-show-peek-message>.zonos--hello-message{border:none}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float>.zonos--hello-message{position:relative;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;border-radius:30px;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;top:0;bottom:0;left:0;-webkit-transform:translateX(0);transform:translateX(0);width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;border:none}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float.zonos--hello-widget-animate-from-left>.zonos--hello-message{-webkit-transform:translateX(0);transform:translateX(0)}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float.zonos--hello-show-peek-message{width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left>.zonos--hello-message{padding-left:8px;padding-right:4px}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float.zonos--hello-show-peek-message>.zonos--hello-message{padding:0 var(--zonos-elements-radius-4);padding-right:6px;border:none}";export{L as zonos_hello}
@@ -1 +0,0 @@
1
- import{t as o}from"./p-67897a0d.js";const r=({backgroundColor1:r,backgroundColor2:a})=>o.readability(r,a)>2.5;export{r as i}
@@ -1 +0,0 @@
1
- import{i as o,t as r}from"./p-67897a0d.js";import{i as f}from"./p-def2d465.js";const n=({backgroundColor:n,color:a})=>{if(n===a)return o(a)?r(a).lighten(40).toHexString():r(a).darken(40).toHexString();if(f({backgroundColor1:n,backgroundColor2:a}))return a;if(o(a))return"#ffffff";const t=r(a).darken(25).toHexString(),u=r(a).lighten(25).toHexString();return f({backgroundColor1:n,backgroundColor2:t})?t:u};export{n as g}
@@ -1 +0,0 @@
1
- System.register(["./p-31d1b874.system.js"],(function(n){"use strict";var t;return{setters:[function(n){t=n.l}],execute:function(){var r=n("D","gkjqw123");var u=n("T","Kq93wqw3");var i=n("h",(function(){var n;return(n=t.inclusivePricingConfigurations)===null||n===void 0?void 0:n.some((function(n){var t,i;return((t=n.configurations[r])===null||t===void 0?void 0:t.status)==="ENABLED"||((i=n.configurations[u])===null||i===void 0?void 0:i.status)==="ENABLED"}))}))}}}));