@zonos/elements 1.3.286 → 1.3.287

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 (656) hide show
  1. package/README.md +9 -1
  2. package/dist/cjs/RemoveIcon-CuM1YmjP.js +5 -0
  3. package/dist/cjs/{cart-0cf8897b.js → cart-CV4buPlT.js} +17 -27
  4. package/dist/cjs/{collect-79131e52.js → collect-jzWKzrV7.js} +17 -113
  5. package/dist/cjs/debounce-5sZmmlCI.js +9 -0
  6. package/dist/cjs/debounce-Nu2lJW4A.js +405 -0
  7. package/dist/cjs/{formatStringWithLinks-c25b4018.js → formatStringWithLinks-vOVkAjlu.js} +1 -1
  8. package/dist/cjs/{getBorderRadius-97fd5e02.js → getBorderRadius-DGZiQu09.js} +1 -1
  9. package/dist/cjs/{getContrastColor-956dfaf7.js → getContrastColor-B2Kn8XHA.js} +2 -2
  10. package/dist/cjs/{getMissingRequiredShippingFields-a8f04267.js → getMissingRequiredShippingFields-r5vYIqoX.js} +1 -1
  11. package/dist/cjs/{handleFetch-954f30e1.js → handleFetch-DQLhurnE.js} +4 -3
  12. package/dist/cjs/{hasInclusivePrice-d0cd2007.js → hasInclusivePrice-BZMQohG9.js} +1 -1
  13. package/dist/cjs/{helpers-5bdbb68c.js → helpers-ClOZ11A9.js} +0 -3
  14. package/dist/cjs/{index-b1f95d96.js → index-DAAr465v.js} +1252 -580
  15. package/dist/cjs/index.cjs.js +17 -21
  16. package/dist/cjs/{invoice-254ae23b.js → invoice-CHw-mJdS.js} +6 -6
  17. package/dist/cjs/{isContrastColor-30f84a91.js → isContrastColor-B9ldIdpa.js} +1 -1
  18. package/dist/cjs/isDarkColor-f-fD9c2l.js +1187 -0
  19. package/dist/cjs/loader.cjs.js +3 -5
  20. package/dist/cjs/{localization-fb2ece37.js → localization-CxXsmxs5.js} +4 -4
  21. package/dist/cjs/{paypal-8ca67278.js → paypal-BLuHeOJH.js} +10 -9
  22. package/dist/cjs/{placeTestOrder-12b63822.js → placeTestOrder-VK_CMeq0.js} +3 -3
  23. package/dist/cjs/{renderCheckoutCurrency-a1f71587.js → renderCheckoutCurrency-CC4CAy-a.js} +2 -2
  24. package/dist/cjs/{renderFallback-bc20ee20.js → renderFallback-Bme86uk8.js} +1 -1
  25. package/dist/cjs/{shouldRenderTaxIdInput-7d19556c.js → shouldRenderTaxIdInput-TxekHCp7.js} +2 -2
  26. package/dist/cjs/{shouldShowLanguageSelect-82985128.js → shouldShowLanguageSelect-Bj_jKWPK.js} +1 -1
  27. package/dist/cjs/{submitGtag-8a25f001.js → submitGtag-CcEL-w5D.js} +3 -3
  28. package/dist/cjs/throttle-BcxGntLr.js +87 -0
  29. package/dist/cjs/{updateCheckoutSessionAttributes-de7b1466.js → updateCheckoutSessionAttributes-Dltl5RBx.js} +3 -3
  30. package/dist/cjs/zonos-address-completion-dialog_7.cjs.entry.js +644 -692
  31. package/dist/cjs/zonos-address-display_2.cjs.entry.js +13 -17
  32. package/dist/cjs/zonos-address_4.cjs.entry.js +50 -40
  33. package/dist/cjs/zonos-airwallex-payment.cjs.entry.js +15 -16
  34. package/dist/cjs/zonos-badge.cjs.entry.js +7 -10
  35. package/dist/cjs/zonos-banner.cjs.entry.js +6 -9
  36. package/dist/cjs/zonos-button_3.cjs.entry.js +18 -21
  37. package/dist/cjs/zonos-card_5.cjs.entry.js +34 -35
  38. package/dist/cjs/zonos-cart-items_12.cjs.entry.js +85 -83
  39. package/dist/cjs/zonos-checkbox_2.cjs.entry.js +10 -14
  40. package/dist/cjs/zonos-checkout.cjs.entry.js +50 -34
  41. package/dist/cjs/zonos-collapse.cjs.entry.js +5 -8
  42. package/dist/cjs/zonos-collect-cart-items_3.cjs.entry.js +18 -23
  43. package/dist/cjs/zonos-collect-finish_6.cjs.entry.js +59 -55
  44. package/dist/cjs/zonos-collect.cjs.entry.js +20 -23
  45. package/dist/cjs/zonos-component.cjs.entry.js +3 -6
  46. package/dist/cjs/zonos-controller.cjs.entry.js +13 -16
  47. package/dist/cjs/zonos-country-flag.cjs.entry.js +8 -11
  48. package/dist/cjs/zonos-country-select_4.cjs.entry.js +68 -57
  49. package/dist/cjs/zonos-elements.cjs.js +7 -7
  50. package/dist/cjs/zonos-hello-dialog.cjs.entry.js +22 -23
  51. package/dist/cjs/zonos-hello.cjs.entry.js +19 -17
  52. package/dist/cjs/zonos-input.cjs.entry.js +10 -11
  53. package/dist/cjs/zonos-invoice-cart-items_2.cjs.entry.js +17 -21
  54. package/dist/cjs/zonos-invoice-finish_5.cjs.entry.js +57 -52
  55. package/dist/cjs/zonos-invoice.cjs.entry.js +19 -22
  56. package/dist/cjs/zonos-language-select_2.cjs.entry.js +11 -15
  57. package/dist/cjs/zonos-link.cjs.entry.js +3 -6
  58. package/dist/cjs/zonos-logo.cjs.entry.js +6 -9
  59. package/dist/cjs/zonos-policy-consent_2.cjs.entry.js +15 -19
  60. package/dist/cjs/zonos-shipping-rich-radio.cjs.entry.js +11 -14
  61. package/dist/cjs/zonos-stripe-input.cjs.entry.js +15 -14
  62. package/dist/cjs/zonos-text.cjs.entry.js +8 -11
  63. package/dist/cjs/zonos-tooltip.cjs.entry.js +4 -7
  64. package/dist/cjs/zonos-v-stack.cjs.entry.js +6 -9
  65. package/dist/cjs/zonosStore-BCNYr6Tk.js +3808 -0
  66. package/dist/collection/__tests__/jsxWithChildren.types.js +13 -0
  67. package/dist/collection/collection-manifest.json +3 -2
  68. package/dist/collection/components/checkout/zonos-checkout/zonos-address-completion-dialog/zonos-address-completion-dialog.js +13 -10
  69. package/dist/collection/components/checkout/zonos-checkout/zonos-address-update-dialog/zonos-address-display/zonos-address-display.js +4 -3
  70. package/dist/collection/components/checkout/zonos-checkout/zonos-address-update-dialog/zonos-address-form/zonos-address-form.js +8 -5
  71. package/dist/collection/components/checkout/zonos-checkout/zonos-address-update-dialog/zonos-address-update-dialog.js +17 -13
  72. package/dist/collection/components/checkout/zonos-checkout/zonos-cart-restricted-items/zonos-cart-restricted-items.js +1 -1
  73. package/dist/collection/components/checkout/zonos-checkout/zonos-cart-subtotal/zonos-cart-subtotal.js +4 -4
  74. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-finish/zonos-checkout-finish.js +7 -5
  75. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-footer/zonos-checkout-footer.js +5 -4
  76. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-payment/zonos-checkout-payment.js +8 -8
  77. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-payment/zonos-empty-state-payment/zonos-empty-state-payment.js +5 -4
  78. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-payment/zonos-store-credit/zonos-store-credit.js +1 -1
  79. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.js +18 -14
  80. package/dist/collection/components/checkout/zonos-checkout/zonos-customer-info/zonos-customer-info.js +13 -10
  81. package/dist/collection/components/checkout/zonos-checkout/zonos-review/zonos-review.js +2 -2
  82. package/dist/collection/components/checkout/zonos-checkout/zonos-shipping/zonos-shipping.js +7 -7
  83. package/dist/collection/components/checkout/zonos-collect/zonos-collect-finish/zonos-collect-finish.js +8 -6
  84. package/dist/collection/components/checkout/zonos-collect/zonos-collect-footer/zonos-collect-footer.js +6 -5
  85. package/dist/collection/components/checkout/zonos-collect/zonos-collect-order-details/zonos-collect-order-details.js +4 -4
  86. package/dist/collection/components/checkout/zonos-collect/zonos-collect-payment/zonos-collect-payment.js +7 -7
  87. package/dist/collection/components/checkout/zonos-collect/zonos-collect-review/zonos-collect-review.js +3 -3
  88. package/dist/collection/components/checkout/zonos-collect/zonos-collect.js +2 -2
  89. package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-cart-items/zonos-invoice-cart-items.js +1 -1
  90. package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-finish/zonos-invoice-finish.js +8 -6
  91. package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-footer/zonos-invoice-footer.js +6 -5
  92. package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-order-details/zonos-invoice-order-details.js +4 -4
  93. package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-payment/zonos-invoice-payment.js +7 -7
  94. package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-review/zonos-invoice-review.js +3 -3
  95. package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-subtotal/zonos-invoice-subtotal.js +1 -1
  96. package/dist/collection/components/checkout/zonos-invoice/zonos-invoice.js +2 -2
  97. package/dist/collection/components/common/zonos-badge/zonos-badge.js +8 -7
  98. package/dist/collection/components/common/zonos-banner/zonos-banner.js +4 -4
  99. package/dist/collection/components/common/zonos-button/zonos-button.js +29 -25
  100. package/dist/collection/components/common/zonos-card/zonos-card.js +9 -8
  101. package/dist/collection/components/common/zonos-checkbox/zonos-checkbox.js +15 -12
  102. package/dist/collection/components/common/zonos-checkout-progress-tabs/zonos-checkout-progress-tabs.js +9 -6
  103. package/dist/collection/components/common/zonos-collapse/zonos-collapse.js +2 -2
  104. package/dist/collection/components/common/zonos-confirm-dialog/zonos-confirm-dialog.js +15 -15
  105. package/dist/collection/components/common/zonos-country-flag/zonos-country-flag.js +6 -5
  106. package/dist/collection/components/common/zonos-custom-message/zonos-custom-message.js +2 -2
  107. package/dist/collection/components/common/zonos-dialog/zonos-dialog.js +22 -21
  108. package/dist/collection/components/common/zonos-h-stack/zonos-h-stack.js +3 -2
  109. package/dist/collection/components/common/zonos-icon/zonos-icon.js +8 -7
  110. package/dist/collection/components/common/zonos-input/zonos-input.js +7 -7
  111. package/dist/collection/components/common/zonos-link/zonos-link.js +7 -7
  112. package/dist/collection/components/common/zonos-loading-overlay/zonos-loading-overlay.js +4 -4
  113. package/dist/collection/components/common/zonos-logo/zonos-logo.js +4 -3
  114. package/dist/collection/components/common/zonos-rest-state/zonos-rest-state.js +8 -7
  115. package/dist/collection/components/common/zonos-select-dialog-header/zonos-select-dialog-header.js +1 -1
  116. package/dist/collection/components/common/zonos-shipping-rich-radio/zonos-shipping-rich-radio.js +15 -12
  117. package/dist/collection/components/common/zonos-skeleton/zonos-skeleton.js +2 -2
  118. package/dist/collection/components/common/zonos-spinner/zonos-spinner.js +3 -3
  119. package/dist/collection/components/common/zonos-stripe-input/zonos-stripe-input.js +17 -17
  120. package/dist/collection/components/common/zonos-stripe-phone-input/zonos-stripe-phone-input.js +23 -20
  121. package/dist/collection/components/common/zonos-stripe-select/zonos-stripe-select.js +19 -19
  122. package/dist/collection/components/common/zonos-text/zonos-text.js +15 -11
  123. package/dist/collection/components/common/zonos-toggle/zonos-toggle.js +4 -3
  124. package/dist/collection/components/common/zonos-tooltip/zonos-tooltip.js +2 -2
  125. package/dist/collection/components/common/zonos-v-stack/zonos-v-stack.js +3 -2
  126. package/dist/collection/components/common/zonos-virtual-scroll/zonos-virtual-scroll.js +7 -6
  127. package/dist/collection/components/component-template/zonos-component/zonos-component.js +3 -3
  128. package/dist/collection/components/hello/zonos-hello/zonos-hello.js +16 -12
  129. package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog-footer/zonos-hello-dialog-footer.js +3 -2
  130. package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog.js +14 -11
  131. package/dist/collection/components/main/zonos-controller.js +18 -10
  132. package/dist/collection/components/store/checkout/stripe.js +1 -1
  133. package/dist/collection/components/stripe/zonos-address/zonos-address.js +9 -8
  134. package/dist/collection/components/stripe/zonos-custom-address/zonos-address-suggestions/zonos-address-suggestions.js +6 -4
  135. package/dist/collection/components/stripe/zonos-custom-address/zonos-custom-address.js +13 -10
  136. package/dist/collection/components/stripe/zonos-link-authentication/zonos-link-authentication.js +4 -4
  137. package/dist/collection/components/stripe/zonos-payment/zonos-payment.js +2 -2
  138. package/dist/collection/components/utils/checkout/isEuDapRemittance.js +1 -1
  139. package/dist/collection/components/utils/checkout/shouldRenderTaxIdInput.js +1 -1
  140. package/dist/collection/scripts/cart/_setupCartData.js +2 -2
  141. package/dist/collection/scripts/cart/_setupCartDataWithSettings.js +2 -2
  142. package/dist/collection/types/generated/graphql.internal.types.js +5 -0
  143. package/dist/esm/RemoveIcon-C2QMVeWW.js +3 -0
  144. package/dist/esm/{cart-d04742f5.js → cart-ekBk_gxV.js} +18 -28
  145. package/dist/esm/{collect-4c310a16.js → collect-33rMINDo.js} +17 -113
  146. package/dist/esm/debounce-D4ko2kvZ.js +403 -0
  147. package/dist/esm/debounce-DWPsxJsW.js +7 -0
  148. package/dist/esm/{formatStringWithLinks-0d48f183.js → formatStringWithLinks-BcMPqGl0.js} +1 -1
  149. package/dist/esm/{getBorderRadius-1f7be586.js → getBorderRadius-HwG64EKM.js} +1 -1
  150. package/dist/esm/{getContrastColor-4c0ae8c1.js → getContrastColor-CfCPlW9U.js} +2 -2
  151. package/dist/esm/{getMissingRequiredShippingFields-f0878e32.js → getMissingRequiredShippingFields-u1nhQzJ1.js} +1 -1
  152. package/dist/esm/{handleFetch-a844cac1.js → handleFetch-D5GYDF-O.js} +4 -3
  153. package/dist/esm/{hasInclusivePrice-d801be22.js → hasInclusivePrice-CAVXi310.js} +1 -1
  154. package/dist/esm/{helpers-2f6955b1.js → helpers-DJIdCwJ5.js} +0 -3
  155. package/dist/esm/{index-cfd394c8.js → index-_lt63o7c.js} +1253 -561
  156. package/dist/esm/index.js +20 -22
  157. package/dist/esm/{invoice-86487dac.js → invoice-BNDWuVsD.js} +6 -6
  158. package/dist/esm/{isContrastColor-9fa0d013.js → isContrastColor-CWLU13s9.js} +1 -1
  159. package/dist/esm/isDarkColor-YdrG78th.js +1184 -0
  160. package/dist/esm/loader.js +4 -4
  161. package/dist/esm/{localization-36a4dc22.js → localization-AOqYXGdP.js} +5 -5
  162. package/dist/esm/{paypal-997935ab.js → paypal-CW1D2XqZ.js} +10 -9
  163. package/dist/esm/{placeTestOrder-a53f2056.js → placeTestOrder-nhmsLLOA.js} +3 -3
  164. package/dist/esm/{renderCheckoutCurrency-e0e16eb7.js → renderCheckoutCurrency-BQANmZyM.js} +2 -2
  165. package/dist/esm/{renderFallback-b250f4e9.js → renderFallback-Cy03ZcWE.js} +1 -1
  166. package/dist/esm/{shouldRenderTaxIdInput-ef7b5860.js → shouldRenderTaxIdInput-CKyZ6Zni.js} +2 -2
  167. package/dist/esm/{shouldShowLanguageSelect-328f50e2.js → shouldShowLanguageSelect-BQFCXouB.js} +1 -1
  168. package/dist/esm/{submitGtag-71c450b6.js → submitGtag-CCGQS060.js} +4 -4
  169. package/dist/esm/throttle-D5GyA3yr.js +85 -0
  170. package/dist/esm/{updateCheckoutSessionAttributes-23b222de.js → updateCheckoutSessionAttributes-eRSqdC74.js} +3 -3
  171. package/dist/esm/zonos-address-completion-dialog_7.entry.js +644 -690
  172. package/dist/esm/zonos-address-display_2.entry.js +13 -15
  173. package/dist/esm/zonos-address_4.entry.js +50 -38
  174. package/dist/esm/zonos-airwallex-payment.entry.js +15 -14
  175. package/dist/esm/zonos-badge.entry.js +7 -8
  176. package/dist/esm/zonos-banner.entry.js +6 -7
  177. package/dist/esm/zonos-button_3.entry.js +18 -19
  178. package/dist/esm/zonos-card_5.entry.js +34 -33
  179. package/dist/esm/zonos-cart-items_12.entry.js +85 -81
  180. package/dist/esm/zonos-checkbox_2.entry.js +10 -12
  181. package/dist/esm/zonos-checkout.entry.js +50 -32
  182. package/dist/esm/zonos-collapse.entry.js +5 -6
  183. package/dist/esm/zonos-collect-cart-items_3.entry.js +18 -21
  184. package/dist/esm/zonos-collect-finish_6.entry.js +59 -53
  185. package/dist/esm/zonos-collect.entry.js +20 -21
  186. package/dist/esm/zonos-component.entry.js +3 -4
  187. package/dist/esm/zonos-controller.entry.js +13 -14
  188. package/dist/esm/zonos-country-flag.entry.js +8 -9
  189. package/dist/esm/zonos-country-select_4.entry.js +68 -55
  190. package/dist/esm/zonos-elements.js +6 -5
  191. package/dist/esm/zonos-hello-dialog.entry.js +22 -21
  192. package/dist/esm/zonos-hello.entry.js +19 -15
  193. package/dist/esm/zonos-input.entry.js +10 -9
  194. package/dist/esm/zonos-invoice-cart-items_2.entry.js +17 -19
  195. package/dist/esm/zonos-invoice-finish_5.entry.js +57 -50
  196. package/dist/esm/zonos-invoice.entry.js +19 -20
  197. package/dist/esm/zonos-language-select_2.entry.js +11 -13
  198. package/dist/esm/zonos-link.entry.js +3 -4
  199. package/dist/esm/zonos-logo.entry.js +6 -7
  200. package/dist/esm/zonos-policy-consent_2.entry.js +15 -17
  201. package/dist/esm/zonos-shipping-rich-radio.entry.js +11 -12
  202. package/dist/esm/zonos-stripe-input.entry.js +15 -12
  203. package/dist/esm/zonos-text.entry.js +8 -9
  204. package/dist/esm/zonos-tooltip.entry.js +4 -5
  205. package/dist/esm/zonos-v-stack.entry.js +6 -7
  206. package/dist/esm/zonosStore-DrIOAz4M.js +3795 -0
  207. package/dist/esm-es5/{CheckoutConfig-724d7bae.js → CheckoutConfig-D5SpFsQJ.js} +5 -1
  208. package/dist/esm-es5/VarianceTest-BJmZPrZl.js +9 -0
  209. package/dist/esm-es5/{buildCartItemsByTempCart-a117f75d.js → buildCartItemsByTempCart-BycjkdlE.js} +4 -0
  210. package/dist/esm-es5/cart-ekBk_gxV.js +517 -0
  211. package/dist/esm-es5/classes-BJHSB96f.js +10 -0
  212. package/dist/esm-es5/cleanHtmlMarkdown-ByGDytaN.js +191 -0
  213. package/dist/esm-es5/collect-33rMINDo.js +241 -0
  214. package/dist/esm-es5/containsNonLatinChars-C04AWRC2.js +11 -0
  215. package/dist/esm-es5/createCustomEvent-XQfWgQLB.js +6 -0
  216. package/dist/esm-es5/debounce-D4ko2kvZ.js +153 -0
  217. package/dist/esm-es5/debounce-DWPsxJsW.js +1 -0
  218. package/dist/esm-es5/formatStringWithLinks-BcMPqGl0.js +8 -0
  219. package/dist/esm-es5/getBorderRadius-HwG64EKM.js +8 -0
  220. package/dist/esm-es5/getContrastColor-CfCPlW9U.js +14 -0
  221. package/dist/esm-es5/getGenericSettingsOverride-HeAZDwVW.js +4 -0
  222. package/dist/esm-es5/getMissingRequiredShippingFields-u1nhQzJ1.js +20 -0
  223. package/dist/esm-es5/handleFetch-D5GYDF-O.js +60 -0
  224. package/dist/esm-es5/hasInclusivePrice-CAVXi310.js +6 -0
  225. package/dist/esm-es5/helpers-DJIdCwJ5.js +23 -0
  226. package/dist/esm-es5/index-_lt63o7c.js +162 -0
  227. package/dist/esm-es5/index.js +227 -1
  228. package/dist/esm-es5/invoice-BNDWuVsD.js +13 -0
  229. package/dist/esm-es5/isColorVariable-DXXUq2Lv.js +11 -0
  230. package/dist/esm-es5/isContrastColor-CWLU13s9.js +5 -0
  231. package/dist/esm-es5/isDarkColor-YdrG78th.js +204 -0
  232. package/dist/esm-es5/isSameHostCheckoutLink-BxAHnL5J.js +16 -0
  233. package/dist/esm-es5/loader.js +1 -1
  234. package/dist/esm-es5/localization-AOqYXGdP.js +332 -0
  235. package/dist/esm-es5/paypal-CW1D2XqZ.js +192 -0
  236. package/dist/esm-es5/placeTestOrder-nhmsLLOA.js +1 -0
  237. package/dist/esm-es5/renderCheckoutCurrency-BQANmZyM.js +13 -0
  238. package/dist/esm-es5/{renderFallback-b250f4e9.js → renderFallback-Cy03ZcWE.js} +1 -1
  239. package/dist/esm-es5/shouldRenderTaxIdInput-CKyZ6Zni.js +17 -0
  240. package/dist/esm-es5/shouldShowLanguageSelect-BQFCXouB.js +7 -0
  241. package/dist/esm-es5/styles-BTIeCf3T.js +6 -0
  242. package/dist/esm-es5/submitGtag-CCGQS060.js +45 -0
  243. package/dist/esm-es5/throttle-D5GyA3yr.js +46 -0
  244. package/dist/esm-es5/updateCheckoutSessionAttributes-eRSqdC74.js +8 -0
  245. package/dist/esm-es5/zonos-address-completion-dialog_7.entry.js +2966 -1
  246. package/dist/esm-es5/zonos-address-display_2.entry.js +46 -1
  247. package/dist/esm-es5/zonos-address_4.entry.js +179 -1
  248. package/dist/esm-es5/zonos-airwallex-payment.entry.js +49 -1
  249. package/dist/esm-es5/zonos-badge.entry.js +25 -1
  250. package/dist/esm-es5/zonos-banner.entry.js +7 -1
  251. package/dist/esm-es5/zonos-button_3.entry.js +116 -1
  252. package/dist/esm-es5/zonos-card_5.entry.js +33 -1
  253. package/dist/esm-es5/zonos-cart-items_12.entry.js +666 -1
  254. package/dist/esm-es5/zonos-checkbox_2.entry.js +21 -1
  255. package/dist/esm-es5/zonos-checkout.entry.js +1043 -1
  256. package/dist/esm-es5/zonos-collapse.entry.js +15 -1
  257. package/dist/esm-es5/zonos-collect-cart-items_3.entry.js +13 -1
  258. package/dist/esm-es5/zonos-collect-finish_6.entry.js +157 -1
  259. package/dist/esm-es5/zonos-collect.entry.js +171 -1
  260. package/dist/esm-es5/zonos-component.entry.js +10 -1
  261. package/dist/esm-es5/zonos-controller.entry.js +198 -1
  262. package/dist/esm-es5/zonos-country-flag.entry.js +6 -1
  263. package/dist/esm-es5/zonos-country-select_4.entry.js +152 -1
  264. package/dist/esm-es5/zonos-elements.js +4 -1
  265. package/dist/esm-es5/zonos-hello-dialog.entry.js +63 -1
  266. package/dist/esm-es5/zonos-hello.entry.js +121 -1
  267. package/dist/esm-es5/zonos-input.entry.js +16 -1
  268. package/dist/esm-es5/zonos-invoice-cart-items_2.entry.js +7 -1
  269. package/dist/esm-es5/zonos-invoice-finish_5.entry.js +133 -1
  270. package/dist/esm-es5/zonos-invoice.entry.js +115 -1
  271. package/dist/esm-es5/zonos-language-select_2.entry.js +14 -1
  272. package/dist/esm-es5/zonos-link.entry.js +4 -1
  273. package/dist/esm-es5/zonos-logo.entry.js +7 -1
  274. package/dist/esm-es5/zonos-policy-consent_2.entry.js +31 -1
  275. package/dist/esm-es5/zonos-shipping-rich-radio.entry.js +5 -1
  276. package/dist/esm-es5/zonos-stripe-input.entry.js +27 -1
  277. package/dist/esm-es5/zonos-text.entry.js +24 -1
  278. package/dist/esm-es5/zonos-tooltip.entry.js +7 -1
  279. package/dist/esm-es5/zonos-v-stack.entry.js +5 -1
  280. package/dist/esm-es5/zonosStore-DrIOAz4M.js +1153 -0
  281. package/dist/scripts/index.d.ts +1171 -521
  282. package/dist/scripts/index.js +1 -1
  283. package/dist/scripts/loadZonos.js +1 -1
  284. package/dist/scripts/zonos.js +1 -1
  285. package/dist/types/__tests__/jsxWithChildren.types.d.ts +14 -0
  286. package/dist/types/__tests__/vitest-globals.d.ts +1 -0
  287. package/dist/types/components/store/checkout/cart.d.ts +9 -9
  288. package/dist/types/components/utils/api/checkItemRestrictions.d.ts +2 -2
  289. package/dist/types/components/utils/api/getLocaleMessages.d.ts +5 -5
  290. package/dist/types/components/utils/checkout/isShippableCountry.d.ts +5 -1
  291. package/dist/types/components/utils/hello/detectItemRestrictions.d.ts +2 -2
  292. package/dist/types/components.d.ts +797 -147
  293. package/dist/types/scripts/cart/_setupCartDataWithSettings.d.ts +127 -127
  294. package/dist/types/stencil-public-runtime.d.ts +205 -12
  295. package/dist/types/types/generated/graphql.frontend.types.d.ts +60 -60
  296. package/dist/types/types/generated/graphql.frontend.types.ts +55 -55
  297. package/dist/types/types/generated/graphql.internal.types.d.ts +1290 -1285
  298. package/dist/types/types/generated/graphql.internal.types.ts +1113 -1108
  299. package/dist/zonos-elements/index.esm.js +1 -1
  300. package/dist/zonos-elements/p-02ef0f99.system.entry.js +6 -0
  301. package/dist/zonos-elements/{p-1be53c82.entry.js → p-0466650f.entry.js} +1 -1
  302. package/dist/zonos-elements/p-04bfcd72.system.entry.js +152 -0
  303. package/dist/zonos-elements/p-04cc0dac.system.entry.js +198 -0
  304. package/dist/zonos-elements/p-058f07aa.system.entry.js +7 -0
  305. package/dist/zonos-elements/p-0f603278.system.entry.js +5 -0
  306. package/dist/zonos-elements/{p-bb09ee50.entry.js → p-128485dc.entry.js} +1 -1
  307. package/dist/zonos-elements/p-1568ab06.system.entry.js +117 -0
  308. package/dist/zonos-elements/p-2ba738ec.entry.js +1 -0
  309. package/dist/zonos-elements/{p-6afd5fab.entry.js → p-31ac495f.entry.js} +1 -1
  310. package/dist/zonos-elements/p-34d1545a.entry.js +1 -0
  311. package/dist/zonos-elements/p-39c8a898.entry.js +1 -0
  312. package/dist/zonos-elements/p-3ERbuo5a.js +1 -0
  313. package/dist/zonos-elements/p-450ed170.system.entry.js +46 -0
  314. package/dist/zonos-elements/p-4973f8d8.system.entry.js +180 -0
  315. package/dist/zonos-elements/p-49e7bb1e.system.entry.js +7 -0
  316. package/dist/zonos-elements/p-4a54f664.entry.js +1 -0
  317. package/dist/zonos-elements/p-4ab1c533.system.entry.js +4 -0
  318. package/dist/zonos-elements/p-5024df2d.system.entry.js +666 -0
  319. package/dist/zonos-elements/p-5562a955.system.entry.js +7 -0
  320. package/dist/zonos-elements/p-5836d426.system.entry.js +49 -0
  321. package/dist/zonos-elements/p-5a631080.system.entry.js +13 -0
  322. package/dist/zonos-elements/{p-2ce039e5.entry.js → p-5c08d36b.entry.js} +1 -1
  323. package/dist/zonos-elements/{p-aed4ffb2.entry.js → p-5d3079e8.entry.js} +1 -1
  324. package/dist/zonos-elements/p-629f09dc.system.entry.js +171 -0
  325. package/dist/zonos-elements/p-64e7bc5b.entry.js +1 -0
  326. package/dist/zonos-elements/p-6b0afaa7.entry.js +1 -0
  327. package/dist/zonos-elements/p-6f742021.entry.js +1 -0
  328. package/dist/zonos-elements/p-7681798d.entry.js +1 -0
  329. package/dist/zonos-elements/p-7a5d2211.system.entry.js +115 -0
  330. package/dist/zonos-elements/{p-6de2f9c9.entry.js → p-7ae48e31.entry.js} +1 -1
  331. package/dist/zonos-elements/{p-f37150e8.entry.js → p-8328f44d.entry.js} +1 -1
  332. package/dist/zonos-elements/{p-171a7e1e.entry.js → p-844a743a.entry.js} +1 -1
  333. package/dist/zonos-elements/p-891b47d7.entry.js +1 -0
  334. package/dist/zonos-elements/p-89ddab88.entry.js +1 -0
  335. package/dist/zonos-elements/p-8cd3f1e2.entry.js +1 -0
  336. package/dist/zonos-elements/p-9818f823.entry.js +1 -0
  337. package/dist/zonos-elements/p-9b399685.system.entry.js +10 -0
  338. package/dist/zonos-elements/p-9b6482ef.entry.js +1 -0
  339. package/dist/zonos-elements/{p-2c44e013.entry.js → p-9ebe9a36.entry.js} +1 -1
  340. package/dist/zonos-elements/p-B2EZRfoq.system.js +193 -0
  341. package/dist/zonos-elements/p-B3GRrRtL.system.js +5 -0
  342. package/dist/zonos-elements/p-BANhKkF2.system.js +1 -0
  343. package/dist/zonos-elements/p-BDopxBpR.system.js +6 -0
  344. package/dist/zonos-elements/p-BJufDgh3.js +1 -0
  345. package/dist/zonos-elements/p-BLQFeIez.system.js +191 -0
  346. package/dist/zonos-elements/p-BNtWsPPP.system.js +7 -0
  347. package/dist/zonos-elements/p-BSgVcCxT.system.js +9 -0
  348. package/dist/zonos-elements/p-BXjdMMUy.js +1 -0
  349. package/dist/zonos-elements/p-BbgqQIHv.system.js +9 -0
  350. package/dist/zonos-elements/p-BgSx82zO.system.js +11 -0
  351. package/dist/zonos-elements/p-Bi-s0fp_.system.js +17 -0
  352. package/dist/zonos-elements/p-Bu9WCfUC.system.js +5 -0
  353. package/dist/zonos-elements/p-C19J2XSh.js +1 -0
  354. package/dist/zonos-elements/p-C2QMVeWW.js +1 -0
  355. package/dist/zonos-elements/p-C2j7R11h.system.js +11 -0
  356. package/dist/zonos-elements/p-CEl4pzNq.js +1 -0
  357. package/dist/zonos-elements/p-CICjAi70.js +1 -0
  358. package/dist/zonos-elements/p-CIevpRv_.system.js +162 -0
  359. package/dist/zonos-elements/{p-344a6278.js → p-CJCoACvU.js} +2 -2
  360. package/dist/zonos-elements/p-CKBbIU4b.system.js +14 -0
  361. package/dist/zonos-elements/p-CKTIJ2Gr.js +1 -0
  362. package/dist/zonos-elements/p-CKhl__Kc.system.js +4 -0
  363. package/dist/zonos-elements/p-CPnR_T0a.system.js +1153 -0
  364. package/dist/zonos-elements/p-CQqNJo0D.system.js +13 -0
  365. package/dist/zonos-elements/p-CYdt69j5.system.js +241 -0
  366. package/dist/zonos-elements/p-CZl1nwqv.system.js +46 -0
  367. package/dist/zonos-elements/p-CaAod213.system.js +8 -0
  368. package/dist/zonos-elements/p-CaUXHglQ.system.js +153 -0
  369. package/dist/zonos-elements/{p-45bd8072.system.js → p-CeLaK0Ff.system.js} +1 -1
  370. package/dist/zonos-elements/p-CtEsvWI6.js +1 -0
  371. package/dist/zonos-elements/p-D-DawUYF.system.js +1 -0
  372. package/dist/zonos-elements/p-D0erXw7p.js +1 -0
  373. package/dist/zonos-elements/p-D31lQiWo.system.js +21 -0
  374. package/dist/zonos-elements/p-D5AtAlJx.system.js +13 -0
  375. package/dist/zonos-elements/p-DBOI98r5.system.js +7 -0
  376. package/dist/zonos-elements/{p-41dd1cb8.js → p-DE4a-QD5.js} +1 -1
  377. package/dist/zonos-elements/p-DGsEWFDU.system.js +8 -0
  378. package/dist/zonos-elements/{p-a4c7ee17.js → p-DHwpNxG9.js} +1 -1
  379. package/dist/zonos-elements/p-DIJaXkiE.system.js +332 -0
  380. package/dist/zonos-elements/{p-eef5b0cc.js → p-DJIdCwJ5.js} +1 -1
  381. package/dist/zonos-elements/p-DPW1yXt9.system.js +517 -0
  382. package/dist/zonos-elements/{p-6bdc5c96.js → p-DTgv0QpG.js} +1 -1
  383. package/dist/zonos-elements/p-DW-fW8yR.system.js +205 -0
  384. package/dist/zonos-elements/p-Dj-O6VfM.system.js +7 -0
  385. package/dist/zonos-elements/p-DjuFsKLG.js +1 -0
  386. package/dist/zonos-elements/p-DkpYo2Fs.js +1 -0
  387. package/dist/zonos-elements/p-DnjGkbEy.js +1 -0
  388. package/dist/zonos-elements/p-Dw-5yD9y.system.js +227 -0
  389. package/dist/zonos-elements/p-LypTHRUC.js +1 -0
  390. package/dist/zonos-elements/p-MfsSJh_D.system.js +8 -0
  391. package/dist/zonos-elements/p-YdrG78th.js +1 -0
  392. package/dist/zonos-elements/p-_lt63o7c.js +3 -0
  393. package/dist/zonos-elements/p-a38e62cc.entry.js +1 -0
  394. package/dist/zonos-elements/p-a6faab6a.entry.js +1 -0
  395. package/dist/zonos-elements/p-adfee3a3.entry.js +1 -0
  396. package/dist/zonos-elements/p-b14819ab.system.entry.js +14 -0
  397. package/dist/zonos-elements/{p-0c972ddf.entry.js → p-b68ca96f.entry.js} +1 -1
  398. package/dist/zonos-elements/p-b6deae2b.system.entry.js +5 -0
  399. package/dist/zonos-elements/p-bdba7d9e.system.entry.js +25 -0
  400. package/dist/zonos-elements/p-be64d823.system.entry.js +16 -0
  401. package/dist/zonos-elements/p-beeb9d36.system.entry.js +21 -0
  402. package/dist/zonos-elements/p-cadf6b63.system.entry.js +33 -0
  403. package/dist/zonos-elements/p-cc5306fe.system.entry.js +24 -0
  404. package/dist/zonos-elements/p-cc949df1.system.entry.js +7 -0
  405. package/dist/zonos-elements/{p-5d110c2b.entry.js → p-cdffc9b6.entry.js} +1 -1
  406. package/dist/zonos-elements/p-cf5688f7.entry.js +1 -0
  407. package/dist/zonos-elements/p-d05Ku7gM.system.js +24 -0
  408. package/dist/zonos-elements/p-d33dfc78.system.entry.js +2966 -0
  409. package/dist/zonos-elements/p-d55b9664.system.entry.js +157 -0
  410. package/dist/zonos-elements/p-daf9fa07.system.entry.js +133 -0
  411. package/dist/zonos-elements/p-dcdbc610.system.entry.js +27 -0
  412. package/dist/zonos-elements/p-e101d722.system.entry.js +63 -0
  413. package/dist/zonos-elements/{p-9639a8ed.entry.js → p-e284d329.entry.js} +1 -1
  414. package/dist/zonos-elements/{p-5227aa69.entry.js → p-e9320825.entry.js} +1 -1
  415. package/dist/zonos-elements/p-ea8790aa.entry.js +1 -0
  416. package/dist/zonos-elements/{p-6ee4e027.entry.js → p-eadaefdc.entry.js} +1 -1
  417. package/dist/zonos-elements/p-f27317d3.system.entry.js +31 -0
  418. package/dist/zonos-elements/p-f2cedbcd.system.entry.js +121 -0
  419. package/dist/zonos-elements/p-f57495dc.entry.js +1 -0
  420. package/dist/zonos-elements/p-f6e0aeba.system.entry.js +1043 -0
  421. package/dist/zonos-elements/p-f8fd756a.system.entry.js +15 -0
  422. package/dist/zonos-elements/{p-7ada039e.entry.js → p-fe778437.entry.js} +1 -1
  423. package/dist/zonos-elements/{p-adfbf57b.js → p-i1iCWKdv.js} +1 -1
  424. package/dist/zonos-elements/p-lGLcGvEA.js +1 -0
  425. package/dist/zonos-elements/p-nOb4xPLF.system.js +17 -0
  426. package/dist/zonos-elements/p-nU86HJ5w.js +1 -0
  427. package/dist/zonos-elements/p-pfIceXbY.js +1 -0
  428. package/dist/zonos-elements/p-smUku7Ku.system.js +5 -0
  429. package/dist/zonos-elements/p-t_ClFAJR.js +1 -0
  430. package/dist/zonos-elements/p-uV7m6KrY.system.js +46 -0
  431. package/dist/zonos-elements/p-vN6p_rO1.system.js +11 -0
  432. package/dist/zonos-elements/p-zRjRcLMp.js +1 -0
  433. package/dist/zonos-elements/p-zVLAvre1.system.js +60 -0
  434. package/dist/zonos-elements/zonos-elements.esm.js +1 -1
  435. package/dist/zonos-elements/zonos-elements.js +1 -1
  436. package/loader/index.d.ts +1 -1
  437. package/package.json +28 -32
  438. package/dist/cjs/RemoveIcon-081ac073.js +0 -5
  439. package/dist/cjs/debounce-7ca3c878.js +0 -357
  440. package/dist/cjs/isDarkColor-a6e6fd5e.js +0 -1202
  441. package/dist/cjs/throttle-366c204b.js +0 -76
  442. package/dist/cjs/zonosStore-0af0b937.js +0 -3030
  443. package/dist/esm/RemoveIcon-9dc5dd1a.js +0 -3
  444. package/dist/esm/debounce-84ade9c2.js +0 -355
  445. package/dist/esm/isDarkColor-939d8e9c.js +0 -1199
  446. package/dist/esm/throttle-c4c24e86.js +0 -74
  447. package/dist/esm/zonosStore-eca1e364.js +0 -3017
  448. package/dist/esm-es5/VarianceTest-572cecf5.js +0 -1
  449. package/dist/esm-es5/cart-d04742f5.js +0 -1
  450. package/dist/esm-es5/classes-0d95c529.js +0 -1
  451. package/dist/esm-es5/cleanHtmlMarkdown-87d195f6.js +0 -1
  452. package/dist/esm-es5/collect-4c310a16.js +0 -1
  453. package/dist/esm-es5/containsNonLatinChars-2d8810c3.js +0 -1
  454. package/dist/esm-es5/createCustomEvent-58159025.js +0 -1
  455. package/dist/esm-es5/debounce-84ade9c2.js +0 -1
  456. package/dist/esm-es5/formatStringWithLinks-0d48f183.js +0 -1
  457. package/dist/esm-es5/getBorderRadius-1f7be586.js +0 -1
  458. package/dist/esm-es5/getContrastColor-4c0ae8c1.js +0 -1
  459. package/dist/esm-es5/getGenericSettingsOverride-0bc3e118.js +0 -1
  460. package/dist/esm-es5/getMissingRequiredShippingFields-f0878e32.js +0 -1
  461. package/dist/esm-es5/handleFetch-a844cac1.js +0 -1
  462. package/dist/esm-es5/hasInclusivePrice-d801be22.js +0 -1
  463. package/dist/esm-es5/helpers-2f6955b1.js +0 -1
  464. package/dist/esm-es5/index-cfd394c8.js +0 -13
  465. package/dist/esm-es5/invoice-86487dac.js +0 -1
  466. package/dist/esm-es5/isColorVariable-0a94004f.js +0 -1
  467. package/dist/esm-es5/isContrastColor-9fa0d013.js +0 -1
  468. package/dist/esm-es5/isDarkColor-939d8e9c.js +0 -1
  469. package/dist/esm-es5/isSameHostCheckoutLink-c1b88ab7.js +0 -1
  470. package/dist/esm-es5/localization-36a4dc22.js +0 -1
  471. package/dist/esm-es5/paypal-997935ab.js +0 -17
  472. package/dist/esm-es5/placeTestOrder-a53f2056.js +0 -1
  473. package/dist/esm-es5/renderCheckoutCurrency-e0e16eb7.js +0 -1
  474. package/dist/esm-es5/shouldRenderTaxIdInput-ef7b5860.js +0 -1
  475. package/dist/esm-es5/shouldShowLanguageSelect-328f50e2.js +0 -1
  476. package/dist/esm-es5/styles-6fc2fad9.js +0 -1
  477. package/dist/esm-es5/submitGtag-71c450b6.js +0 -1
  478. package/dist/esm-es5/throttle-c4c24e86.js +0 -1
  479. package/dist/esm-es5/updateCheckoutSessionAttributes-23b222de.js +0 -1
  480. package/dist/esm-es5/zonosStore-eca1e364.js +0 -1
  481. package/dist/zonos-elements/p-01174496.system.js +0 -1
  482. package/dist/zonos-elements/p-06f798ee.system.js +0 -1
  483. package/dist/zonos-elements/p-083a11cd.system.entry.js +0 -1
  484. package/dist/zonos-elements/p-08e7107d.js +0 -1
  485. package/dist/zonos-elements/p-0b29169b.js +0 -1
  486. package/dist/zonos-elements/p-0c327a57.system.entry.js +0 -1
  487. package/dist/zonos-elements/p-0d2f81ce.system.js +0 -1
  488. package/dist/zonos-elements/p-0e199a6c.system.entry.js +0 -1
  489. package/dist/zonos-elements/p-0ff845ec.js +0 -1
  490. package/dist/zonos-elements/p-117953db.system.entry.js +0 -1
  491. package/dist/zonos-elements/p-14afffa8.system.js +0 -1
  492. package/dist/zonos-elements/p-1834f486.js +0 -1
  493. package/dist/zonos-elements/p-1aa93d1e.system.js +0 -1
  494. package/dist/zonos-elements/p-1ac0c631.system.js +0 -1
  495. package/dist/zonos-elements/p-1b8771bb.js +0 -1
  496. package/dist/zonos-elements/p-1cdd27ec.js +0 -1
  497. package/dist/zonos-elements/p-1cfb5c2a.system.entry.js +0 -1
  498. package/dist/zonos-elements/p-1f8648c8.system.entry.js +0 -1
  499. package/dist/zonos-elements/p-23e7c655.system.js +0 -1
  500. package/dist/zonos-elements/p-2670438c.system.js +0 -1
  501. package/dist/zonos-elements/p-27660512.js +0 -1
  502. package/dist/zonos-elements/p-277b77e3.js +0 -1
  503. package/dist/zonos-elements/p-278abdcf.entry.js +0 -1
  504. package/dist/zonos-elements/p-29b60bf3.system.js +0 -1
  505. package/dist/zonos-elements/p-2b97f7ed.js +0 -1
  506. package/dist/zonos-elements/p-2bbe9d91.js +0 -1
  507. package/dist/zonos-elements/p-2c7a425d.entry.js +0 -1
  508. package/dist/zonos-elements/p-2cab1746.system.entry.js +0 -1
  509. package/dist/zonos-elements/p-3490b6d0.entry.js +0 -1
  510. package/dist/zonos-elements/p-398d9022.system.js +0 -1
  511. package/dist/zonos-elements/p-3a26e5e7.system.entry.js +0 -1
  512. package/dist/zonos-elements/p-40a4c8a2.system.js +0 -1
  513. package/dist/zonos-elements/p-40af92a1.system.entry.js +0 -1
  514. package/dist/zonos-elements/p-4160bbc2.system.js +0 -1
  515. package/dist/zonos-elements/p-41f1697a.system.entry.js +0 -1
  516. package/dist/zonos-elements/p-4671fde7.entry.js +0 -1
  517. package/dist/zonos-elements/p-490d7fec.system.entry.js +0 -1
  518. package/dist/zonos-elements/p-4941c096.system.entry.js +0 -1
  519. package/dist/zonos-elements/p-4b159ff3.system.js +0 -1
  520. package/dist/zonos-elements/p-502d6eeb.js +0 -1
  521. package/dist/zonos-elements/p-50d088f7.system.entry.js +0 -1
  522. package/dist/zonos-elements/p-51e4e61a.system.entry.js +0 -1
  523. package/dist/zonos-elements/p-551fa762.system.js +0 -1
  524. package/dist/zonos-elements/p-5b990c91.entry.js +0 -1
  525. package/dist/zonos-elements/p-60832726.system.js +0 -1
  526. package/dist/zonos-elements/p-67426156.system.js +0 -1
  527. package/dist/zonos-elements/p-6890e060.system.js +0 -1
  528. package/dist/zonos-elements/p-6eaf7c9e.system.entry.js +0 -1
  529. package/dist/zonos-elements/p-7176f582.entry.js +0 -1
  530. package/dist/zonos-elements/p-7261e245.system.js +0 -13
  531. package/dist/zonos-elements/p-7352abe9.js +0 -1
  532. package/dist/zonos-elements/p-74230da8.system.js +0 -1
  533. package/dist/zonos-elements/p-76834a0a.system.entry.js +0 -1
  534. package/dist/zonos-elements/p-77993ba1.entry.js +0 -1
  535. package/dist/zonos-elements/p-78f8e594.entry.js +0 -1
  536. package/dist/zonos-elements/p-7ac8846c.system.js +0 -1
  537. package/dist/zonos-elements/p-7b525c75.system.js +0 -1
  538. package/dist/zonos-elements/p-7f688485.system.entry.js +0 -1
  539. package/dist/zonos-elements/p-7fbbdb0f.system.js +0 -1
  540. package/dist/zonos-elements/p-8861d47e.js +0 -1
  541. package/dist/zonos-elements/p-8a0b8175.system.entry.js +0 -1
  542. package/dist/zonos-elements/p-8a6c4017.js +0 -1
  543. package/dist/zonos-elements/p-8be02f3a.system.js +0 -1
  544. package/dist/zonos-elements/p-8d14cb66.entry.js +0 -1
  545. package/dist/zonos-elements/p-8e6338b9.entry.js +0 -1
  546. package/dist/zonos-elements/p-916228fb.system.js +0 -1
  547. package/dist/zonos-elements/p-944c1fb3.entry.js +0 -1
  548. package/dist/zonos-elements/p-947e4402.system.entry.js +0 -1
  549. package/dist/zonos-elements/p-96ab529e.entry.js +0 -1
  550. package/dist/zonos-elements/p-998975a3.system.js +0 -18
  551. package/dist/zonos-elements/p-9ad640b2.system.entry.js +0 -1
  552. package/dist/zonos-elements/p-9ecb9afc.system.entry.js +0 -1
  553. package/dist/zonos-elements/p-a04e2750.system.entry.js +0 -1
  554. package/dist/zonos-elements/p-a1bd3a53.system.js +0 -1
  555. package/dist/zonos-elements/p-a553e132.js +0 -1
  556. package/dist/zonos-elements/p-acb7dee1.system.entry.js +0 -1
  557. package/dist/zonos-elements/p-af19722c.system.js +0 -1
  558. package/dist/zonos-elements/p-b4ae66cb.system.entry.js +0 -1
  559. package/dist/zonos-elements/p-bcaffb85.system.entry.js +0 -1
  560. package/dist/zonos-elements/p-be6cd28c.system.entry.js +0 -1
  561. package/dist/zonos-elements/p-bf37ccc7.system.js +0 -1
  562. package/dist/zonos-elements/p-c0af11fe.system.js +0 -1
  563. package/dist/zonos-elements/p-c112fa12.system.entry.js +0 -1
  564. package/dist/zonos-elements/p-c4321a1a.system.js +0 -1
  565. package/dist/zonos-elements/p-c5d1217f.system.js +0 -1
  566. package/dist/zonos-elements/p-c7329333.entry.js +0 -1
  567. package/dist/zonos-elements/p-c756a59d.system.js +0 -1
  568. package/dist/zonos-elements/p-c77b049c.entry.js +0 -1
  569. package/dist/zonos-elements/p-ca87ada5.system.entry.js +0 -1
  570. package/dist/zonos-elements/p-ce75b047.js +0 -2
  571. package/dist/zonos-elements/p-d1a51fac.js +0 -1
  572. package/dist/zonos-elements/p-d6a73125.system.entry.js +0 -1
  573. package/dist/zonos-elements/p-d75726e5.system.entry.js +0 -1
  574. package/dist/zonos-elements/p-d938f42f.system.js +0 -1
  575. package/dist/zonos-elements/p-dd866ca3.system.entry.js +0 -1
  576. package/dist/zonos-elements/p-dd8a7bf4.entry.js +0 -1
  577. package/dist/zonos-elements/p-de58684b.system.js +0 -1
  578. package/dist/zonos-elements/p-e160b75f.js +0 -1
  579. package/dist/zonos-elements/p-e1ef3984.system.entry.js +0 -1
  580. package/dist/zonos-elements/p-e27b8e18.entry.js +0 -1
  581. package/dist/zonos-elements/p-e4b07f7d.system.entry.js +0 -1
  582. package/dist/zonos-elements/p-e4dc24e1.system.js +0 -1
  583. package/dist/zonos-elements/p-e5865ad9.system.js +0 -1
  584. package/dist/zonos-elements/p-e7d7afda.entry.js +0 -1
  585. package/dist/zonos-elements/p-ebbda085.system.js +0 -1
  586. package/dist/zonos-elements/p-f4720b0a.js +0 -1
  587. package/dist/zonos-elements/p-f8356934.system.entry.js +0 -1
  588. package/dist/zonos-elements/p-f9346f1c.entry.js +0 -1
  589. package/dist/zonos-elements/p-fc5f6113.js +0 -1
  590. package/dist/zonos-elements/p-fe28dbe6.entry.js +0 -1
  591. package/loader/package.json +0 -11
  592. /package/dist/cjs/{CheckoutConfig-27c82f94.js → CheckoutConfig-B7JRM7yr.js} +0 -0
  593. /package/dist/cjs/{ShortAddressCode-bec338b0.js → ShortAddressCode-C5l520-F.js} +0 -0
  594. /package/dist/cjs/{TaxId-cd9d490e.js → TaxId-Q6aDqqWv.js} +0 -0
  595. /package/dist/cjs/{VarianceTest-bec00ea8.js → VarianceTest-C98whVgO.js} +0 -0
  596. /package/dist/cjs/{app-globals-3a1e7e63.js → app-globals-V2Kpy_OQ.js} +0 -0
  597. /package/dist/cjs/{buildCartItemsByTempCart-edddbf4b.js → buildCartItemsByTempCart-ILzonEjb.js} +0 -0
  598. /package/dist/cjs/{classes-b7918f56.js → classes-D_DL168u.js} +0 -0
  599. /package/dist/cjs/{cleanHtmlMarkdown-57147de7.js → cleanHtmlMarkdown-DpT-nZLH.js} +0 -0
  600. /package/dist/cjs/{containsNonLatinChars-2be5129b.js → containsNonLatinChars-D_OggJN6.js} +0 -0
  601. /package/dist/cjs/{createCustomEvent-7b6fad95.js → createCustomEvent-Cs5zGImL.js} +0 -0
  602. /package/dist/cjs/{getGenericSettingsOverride-c0ca32b9.js → getGenericSettingsOverride-CL6l6wvX.js} +0 -0
  603. /package/dist/cjs/{getHasMoreSpaceOnRight-4c94667f.js → getHasMoreSpaceOnRight-Cl50u1mb.js} +0 -0
  604. /package/dist/cjs/{isCollectMobileTablet-884d4280.js → isCollectMobileTablet-Cx2nZ15_.js} +0 -0
  605. /package/dist/cjs/{isColorVariable-525dbfa7.js → isColorVariable-CKoJdu9G.js} +0 -0
  606. /package/dist/cjs/{isInvoiceMobileTablet-dde41e4e.js → isInvoiceMobileTablet-CCqFYV6m.js} +0 -0
  607. /package/dist/cjs/{isSameHostCheckoutLink-6148cabb.js → isSameHostCheckoutLink-DbmQ7Ha4.js} +0 -0
  608. /package/dist/cjs/{styles-d1e64fb9.js → styles-nowYls3K.js} +0 -0
  609. /package/dist/esm/{CheckoutConfig-724d7bae.js → CheckoutConfig-D5SpFsQJ.js} +0 -0
  610. /package/dist/esm/{ShortAddressCode-7620e622.js → ShortAddressCode-nJ6oI8-n.js} +0 -0
  611. /package/dist/esm/{TaxId-63a14057.js → TaxId-Cye-evFK.js} +0 -0
  612. /package/dist/esm/{VarianceTest-572cecf5.js → VarianceTest-BJmZPrZl.js} +0 -0
  613. /package/dist/esm/{app-globals-0f993ce5.js → app-globals-DQuL1Twl.js} +0 -0
  614. /package/dist/esm/{buildCartItemsByTempCart-a117f75d.js → buildCartItemsByTempCart-BycjkdlE.js} +0 -0
  615. /package/dist/esm/{classes-0d95c529.js → classes-BJHSB96f.js} +0 -0
  616. /package/dist/esm/{cleanHtmlMarkdown-87d195f6.js → cleanHtmlMarkdown-ByGDytaN.js} +0 -0
  617. /package/dist/esm/{containsNonLatinChars-2d8810c3.js → containsNonLatinChars-C04AWRC2.js} +0 -0
  618. /package/dist/esm/{createCustomEvent-58159025.js → createCustomEvent-XQfWgQLB.js} +0 -0
  619. /package/dist/esm/{getGenericSettingsOverride-0bc3e118.js → getGenericSettingsOverride-HeAZDwVW.js} +0 -0
  620. /package/dist/esm/{getHasMoreSpaceOnRight-70eb913a.js → getHasMoreSpaceOnRight-DAscqB23.js} +0 -0
  621. /package/dist/esm/{isCollectMobileTablet-111b0dd7.js → isCollectMobileTablet-DGlnuxEX.js} +0 -0
  622. /package/dist/esm/{isColorVariable-0a94004f.js → isColorVariable-DXXUq2Lv.js} +0 -0
  623. /package/dist/esm/{isInvoiceMobileTablet-1f7b614e.js → isInvoiceMobileTablet-Clej0Ffe.js} +0 -0
  624. /package/dist/esm/{isSameHostCheckoutLink-c1b88ab7.js → isSameHostCheckoutLink-BxAHnL5J.js} +0 -0
  625. /package/dist/esm/{styles-6fc2fad9.js → styles-BTIeCf3T.js} +0 -0
  626. /package/dist/esm-es5/{RemoveIcon-9dc5dd1a.js → RemoveIcon-C2QMVeWW.js} +0 -0
  627. /package/dist/esm-es5/{ShortAddressCode-7620e622.js → ShortAddressCode-nJ6oI8-n.js} +0 -0
  628. /package/dist/esm-es5/{TaxId-63a14057.js → TaxId-Cye-evFK.js} +0 -0
  629. /package/dist/esm-es5/{app-globals-0f993ce5.js → app-globals-DQuL1Twl.js} +0 -0
  630. /package/dist/esm-es5/{getHasMoreSpaceOnRight-70eb913a.js → getHasMoreSpaceOnRight-DAscqB23.js} +0 -0
  631. /package/dist/esm-es5/{isCollectMobileTablet-111b0dd7.js → isCollectMobileTablet-DGlnuxEX.js} +0 -0
  632. /package/dist/esm-es5/{isInvoiceMobileTablet-1f7b614e.js → isInvoiceMobileTablet-Clej0Ffe.js} +0 -0
  633. /package/dist/zonos-elements/{p-2770ba48.system.js → p-0D0aCMu6.system.js} +0 -0
  634. /package/dist/zonos-elements/{p-b4b7f705.js → p-BJHSB96f.js} +0 -0
  635. /package/dist/zonos-elements/{p-0a377722.js → p-BJmZPrZl.js} +0 -0
  636. /package/dist/zonos-elements/{p-96d77739.js → p-BTIeCf3T.js} +0 -0
  637. /package/dist/zonos-elements/{p-56ba5cbf.system.js → p-BbPAtVJG.system.js} +0 -0
  638. /package/dist/zonos-elements/{p-11206fe2.js → p-BxAHnL5J.js} +0 -0
  639. /package/dist/zonos-elements/{p-cc6ad18a.js → p-ByGDytaN.js} +0 -0
  640. /package/dist/zonos-elements/{p-83666056.js → p-BycjkdlE.js} +0 -0
  641. /package/dist/zonos-elements/{p-0c64dbbb.js → p-C04AWRC2.js} +0 -0
  642. /package/dist/zonos-elements/{p-655ec440.system.js → p-C29tlYn0.system.js} +0 -0
  643. /package/dist/zonos-elements/{p-2adbbce7.system.js → p-CLDnjFm5.system.js} +0 -0
  644. /package/dist/zonos-elements/{p-989cb22b.system.js → p-Cby4EkFu.system.js} +0 -0
  645. /package/dist/zonos-elements/{p-1f3549c6.js → p-Clej0Ffe.js} +0 -0
  646. /package/dist/zonos-elements/{p-bcf5cffb.js → p-Cye-evFK.js} +0 -0
  647. /package/dist/zonos-elements/{p-b2d81c98.js → p-D5SpFsQJ.js} +0 -0
  648. /package/dist/zonos-elements/{p-5883217a.js → p-DAscqB23.js} +0 -0
  649. /package/dist/zonos-elements/{p-579932a7.js → p-DGlnuxEX.js} +0 -0
  650. /package/dist/zonos-elements/{p-e1255160.js → p-DQuL1Twl.js} +0 -0
  651. /package/dist/zonos-elements/{p-ae393255.js → p-DXXUq2Lv.js} +0 -0
  652. /package/dist/zonos-elements/{p-e7b0c156.js → p-HeAZDwVW.js} +0 -0
  653. /package/dist/zonos-elements/{p-595f5dd2.js → p-XQfWgQLB.js} +0 -0
  654. /package/dist/zonos-elements/{p-bc7bf53e.system.js → p-Z99tSPFR.system.js} +0 -0
  655. /package/dist/zonos-elements/{p-6f23a26a.system.js → p-_GDmY2H7.system.js} +0 -0
  656. /package/dist/zonos-elements/{p-1d42cd20.js → p-nJ6oI8-n.js} +0 -0
@@ -1 +1,115 @@
1
- var __awaiter=this&&this.__awaiter||function(o,e,n,i){function s(o){return o instanceof n?o:new n((function(e){e(o)}))}return new(n||(n=Promise))((function(n,t){function c(o){try{a(i.next(o))}catch(o){t(o)}}function r(o){try{a(i["throw"](o))}catch(o){t(o)}}function a(o){o.done?n(o.value):s(o.value).then(c,r)}a((i=i.apply(o,e||[])).next())}))};var __generator=this&&this.__generator||function(o,e){var n={label:0,sent:function(){if(t[0]&1)throw t[1];return t[1]},trys:[],ops:[]},i,s,t,c;return c={next:r(0),throw:r(1),return:r(2)},typeof Symbol==="function"&&(c[Symbol.iterator]=function(){return this}),c;function r(o){return function(e){return a([o,e])}}function a(r){if(i)throw new TypeError("Generator is already executing.");while(c&&(c=0,r[0]&&(n=0)),n)try{if(i=1,s&&(t=r[0]&2?s["return"]:r[0]?s["throw"]||((t=s["return"])&&t.call(s),0):s.next)&&!(t=t.call(s,r[1])).done)return t;if(s=0,t)r=[r[0]&2,t.value];switch(r[0]){case 0:case 1:t=r;break;case 4:n.label++;return{value:r[1],done:false};case 5:n.label++;s=r[1];r=[0];continue;case 7:r=n.ops.pop();n.trys.pop();continue;default:if(!(t=n.trys,t=t.length>0&&t[t.length-1])&&(r[0]===6||r[0]===2)){n=0;continue}if(r[0]===3&&(!t||r[1]>t[0]&&r[1]<t[3])){n.label=r[1];break}if(r[0]===6&&n.label<t[1]){n.label=t[1];t=r;break}if(t&&n.label<t[2]){n.label=t[2];n.ops.push(r);break}if(t[2])n.ops.pop();n.trys.pop();continue}r=e.call(o,n)}catch(o){r=[6,o];s=0}finally{i=t=0}if(r[0]&5)throw r[1];return{value:r[0]?r[1]:void 0,done:true}}};import{r as registerInstance,h,a as Host,F as Fragment}from"./index-cfd394c8.js";import{b as stripeStore,i as initStripeElements,c as stripeStoreRetrievePayment,d as cartStore,r as cartStoreUpdateToErrorState,e as cartStoreUpdateItems,k as stripeStoreInitCheckoutSession,l as stripeStoreGetPaymentIntent,z as stripeStoreUpdateCheckoutSessionBaseCurrency,E as stripeStoreConfirmPayment,J as stripeStoreOnChange,H as stripeStoreReset,f as cartStoreReset}from"./cart-d04742f5.js";import{i as invoiceStoreUpdateSelectedShippingOption,a as invoiceStoreInitShippingInfo,b as invoiceStoreAsyncAddressUpdate,c as invoiceStore}from"./invoice-86487dac.js";import{p as paypalStoreHasPaypalEnabled,a as paypalStore}from"./paypal-997935ab.js";import{s as storageStore,t as translate,e as localizationStoreOnChange,h as currencyFormat,k as languages,l as localizationStore}from"./localization-36a4dc22.js";import{z as zonosStore}from"./zonosStore-eca1e364.js";import{b as buildCartItemsByTempCart}from"./buildCartItemsByTempCart-a117f75d.js";import{h as handleFetch,s as sendErrorLog,l as logError,g as getIsTestMode}from"./handleFetch-a844cac1.js";import{i as isInvoiceMobile,a as isInvoiceTablet}from"./isInvoiceMobileTablet-1f7b614e.js";import{c as classes}from"./classes-0d95c529.js";import{l as log}from"./VarianceTest-572cecf5.js";import"./isDarkColor-939d8e9c.js";import"./getBorderRadius-1f7be586.js";import"./TaxId-63a14057.js";import"./isContrastColor-9fa0d013.js";import"./submitGtag-71c450b6.js";var ChevronDownIcon='<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>';var zonosInvoiceCss=".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}";var ZonosInvoiceStyle0=zonosInvoiceCss;var ZonosInvoice=function(){function o(o){var e=this;registerInstance(this,o);this.storeUnsubscribeList=[];this.onChangeLocaleListener=function(){};this.mobile=false;this.tablet=false;this.stripe=window.Zonos.stripe;this.showLanguageDialogMobile=false;this.submitLoading=false;this.collapseReviewMobile=true;this.isMobile=false;this.isTablet=false;this.isOverlayLoading=true;this.isCartCollected=false;this.isCartExpired=false;this.payInUsdConfirmDialogOpen=false;this.inventoryCheckErrorMessage=null;this.confirmationId=null;this.clientSecret=stripeStore.clientSecret;this.stripeCustomerSessionClientSecret=stripeStore.stripeCustomerSessionClientSecret;this.getBaseCurrencySettlementInfo=function(){var o=cartStore.selectedLandedCost;if(!o){return null}var e=o.landedCost.amountSubtotals;if(!e){return null}var n=(e.discounts||0)+e.items+e.landedCostTotal+e.shipping;return{settlementAmount:n}};this.applyStripeTheme=function(){return __awaiter(e,void 0,void 0,(function(){var o;return __generator(this,(function(e){switch(e.label){case 0:o=zonosStore.appearance.theme;return[4,initStripeElements({overrideTheme:this.isMobile?o:undefined,paypalEnabled:paypalStoreHasPaypalEnabled()})];case 1:e.sent();return[2]}}))}))};this.fetchCheckoutSession=function(o){return __awaiter(e,void 0,void 0,(function(){var e;return __generator(this,(function(n){switch(n.label){case 0:return[4,handleFetch("/api/zonos-elements/collect/get-checkout-session",{body:{checkoutSessionId:o},method:"POST"})];case 1:e=n.sent().json;return[2,e]}}))}))};this.checkStripePaymentIntentStatus=function(){return __awaiter(e,void 0,void 0,(function(){var o,e,n,i,s,t,c,r,a,l;return __generator(this,(function(v){switch(v.label){case 0:e=!!window.Zonos.cartData;n=new URL(window.location.href).searchParams;i=n.get("payment_intent_client_secret");s=n.get("zonosCheckoutSessionId");log("Payment intent exist, checking stripe payment intent status");if(!i){log("No stripe client secret found in the URL, proceed to order if cart data is available");return[2,{shouldAllowOrder:e}]}return[4,stripeStoreRetrievePayment({clientSecret:i})];case 1:t=v.sent(),c=t.error,r=t.status;a=new URLSearchParams(window.location.search).get("redirect_status");if(!(a&&s))return[3,3];if(!c){log("Payment intent is succeeded or in a good state to move forward, show success screen")}else{log("Payment intent failed, show status from error")}return[4,this.fetchCheckoutSession(s)];case 2:l=v.sent();this.confirmationId=((o=l===null||l===void 0?void 0:l.checkoutSession.landedCost)===null||o===void 0?void 0:o.shortId)||null;storageStore.checkoutSessionId=s;stripeStore.clientSecret=i;void this.setToFinishStep(r);return[2,{shouldAllowOrder:false}];case 3:if(!e){log("Cart data is not available, only check payment intent status, skip order.");return[2,{shouldAllowOrder:false}]}log("Payment intent is not succeeded, proceed to order");return[2,{shouldAllowOrder:true}]}}))}))}}o.prototype.resizeListener=function(){this.isMobile=isInvoiceMobile(this.mobile);this.isTablet=isInvoiceTablet(this.tablet)};o.prototype.setToFinishStep=function(o){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){stripeStore.stripe=window.Zonos.stripe;cartStore.step="finish";this.storybookPaymentStatusOverride=o;this.isOverlayLoading=false;return[2]}))}))};o.prototype.initInvoiceCart=function(){return __awaiter(this,void 0,void 0,(function(){var o,e,n,i,s,t,c,r,a,l,v,d,z,h,u,f,p,m,g,b,w,x,S;return __generator(this,(function(y){switch(y.label){case 0:if(!window.Zonos.cartData){return[2]}d=(e=(o=window.Zonos.cartData)===null||o===void 0?void 0:o.items[0])===null||e===void 0?void 0:e.currencyCode;if(d){cartStore.currency=d}z=(i=(n=window.Zonos.cartData)===null||n===void 0?void 0:n.references)===null||i===void 0?void 0:i.checkoutSessionId;h=(t=(s=window.Zonos.cartData)===null||s===void 0?void 0:s.references)===null||t===void 0?void 0:t.landedCostId;if(!h){cartStoreUpdateToErrorState({messages:[translate("Session does not have valid landed cost. Please contact [organizationName] for assistance.",{organizationName:zonosStore.organizationName})],title:translate("Invalid session")});return[2]}if(z){log("Setting checkout session id from cart reference","info",z);storageStore.checkoutSessionId=z}else{log("Clear checkout session id from storage so we start from a fresh session for the invoice cart");storageStore.checkoutSessionId=null}return[4,this.checkStripePaymentIntentStatus()];case 1:u=y.sent().shouldAllowOrder;if(!u){return[2]}y.label=2;case 2:y.trys.push([2,11,,12]);f=buildCartItemsByTempCart(window.Zonos.cartData),p=f.adjustments,m=f.cartItems;return[4,cartStoreUpdateItems({adjustments:p,cartItems:m,landedCostId:h,shouldInitSessionOnFailure:false})];case 3:y.sent();if(!(!storageStore.checkoutSessionId&&!z))return[3,5];return[4,stripeStoreInitCheckoutSession()];case 4:g=y.sent();log("stripeStoreInitCheckoutSession: ".concat(g));if(!g){throw new Error("Failed to initialize checkout session! The cart might be created with LIVE Invoice quote but being used with sandbox credential")}y.label=5;case 5:if(!((!cartStore.checkoutSession||((c=cartStore.checkoutSession)===null||c===void 0?void 0:c.completedAt))&&z))return[3,9];return[4,this.fetchCheckoutSession(z)];case 6:b=y.sent();this.confirmationId=((r=b===null||b===void 0?void 0:b.checkoutSession.landedCost)===null||r===void 0?void 0:r.shortId)||null;if(!!(b===null||b===void 0?void 0:b.checkoutSession.completedAt)&&!!b.checkoutSession.order){void this.setToFinishStep("succeeded");return[2]}if(!(b===null||b===void 0?void 0:b.checkoutSession.clientSecret))return[3,8];return[4,stripeStoreRetrievePayment({clientSecret:b.checkoutSession.clientSecret})];case 7:w=y.sent().status;if(w==="processing"||w==="succeeded"){void this.setToFinishStep(w);return[2]}y.label=8;case 8:void sendErrorLog({endpoint:"INVALID_INVOICE_CHECKOUT_SESSION",errors:["Invalid checkout session, can not retrieve the checkout session after failing to update it"],metadata:{cartCheckoutSessionId:z,cartId:(a=window.Zonos.cartData)===null||a===void 0?void 0:a.id,cartLandedCostId:h}});throw new Error("Invalid checkout session, can not retrieve the checkout session after failing to update it");case 9:if(!cartStore.checkoutSession){void sendErrorLog({endpoint:"FAIL_TO_UPDATE_CREATE_INVOICE_CHECKOUT_SESSION",errors:["Could not update/create checkout session for this invoice cart"],metadata:{cartCheckoutSessionId:z||"N/A",cartId:(l=window.Zonos.cartData)===null||l===void 0?void 0:l.id,cartLandedCostId:h||"N/A"}});throw new Error("Could not update/create checkout session for this invoice cart")}void stripeStoreGetPaymentIntent();x=(v=cartStore.checkoutSession)===null||v===void 0?void 0:v.landedCost;if(!x){throw new Error("Landed cost could not be found in checkout session after creating/updating them")}return[4,invoiceStoreUpdateSelectedShippingOption(Object.assign(Object.assign({},cartStore.checkoutSession),{id:storageStore.checkoutSessionId||""}))];case 10:y.sent();void invoiceStoreInitShippingInfo({landedCostId:x.id});void this.applyStripeTheme();return[3,12];case 11:S=y.sent();logError(S);cartStoreUpdateToErrorState({messages:[translate("Session does not have valid landed cost. Please contact [organizationName] for assistance.",{organizationName:zonosStore.organizationName})],title:translate("Invalid session")});return[3,12];case 12:this.isOverlayLoading=false;return[2]}}))}))};o.prototype.toggleLanguageDialog=function(){this.showLanguageDialogMobile=!this.showLanguageDialogMobile};o.prototype.handleStripePaymentContinue=function(){return __awaiter(this,void 0,void 0,(function(){var o,e,n,i,s,t,c,r,a;return __generator(this,(function(l){switch(l.label){case 0:void((o=stripeStore.stripeBillingAddressElement)===null||o===void 0?void 0:o.getValue());if(!((e=stripeStore.stripeLinkEventData)===null||e===void 0?void 0:e.complete)){s=document.querySelector("zonos-link-authentication");s===null||s===void 0?void 0:s.scrollIntoView({behavior:"smooth"});return[2]}if(!((n=stripeStore.stripeBillingAddressEventData)===null||n===void 0?void 0:n.complete)){t=document.querySelector(".zonos--billing-address");t===null||t===void 0?void 0:t.scrollIntoView({behavior:"smooth"});return[2]}c=stripeStore.checkoutSettlementCurrency==="USD";if(c&&stripeStore.shouldRenderPayInUsdButton&&!this.payInUsdConfirmDialogOpen){this.payInUsdConfirmDialogOpen=true;return[2]}this.payInUsdConfirmDialogOpen=false;paypalStore.paypalErrorMessage=null;stripeStore.hasPaymentError=false;this.submitLoading=true;cartStore.inventoryCheckErrorMessage=null;return[4,stripeStoreUpdateCheckoutSessionBaseCurrency()];case 1:r=l.sent();if(!r){stripeStore.hasPaymentError=true;stripeStore.customErrorMessage=translate("Unable to complete payment in [currency]. Please try again or select a different currency. If the issue persists, contact our support team for assistance.",{currency:stripeStore.checkoutSettlementCurrency});this.submitLoading=false;return[2]}return[4,invoiceStoreAsyncAddressUpdate()];case 2:l.sent();l.label=3;case 3:l.trys.push([3,5,,6]);return[4,stripeStoreConfirmPayment({noLandedCostCheck:true})];case 4:l.sent();cartStore.step="finish";this.confirmationId=invoiceStore.landedCostShortId||((i=cartStore.selectedLandedCost)===null||i===void 0?void 0:i.landedCostId)||null;return[2];case 5:a=l.sent();logError(a);stripeStore.hasPaymentError=true;return[3,6];case 6:this.submitLoading=false;return[2]}}))}))};o.prototype.componentWillLoad=function(){var o=this;stripeStore.stripe=window.Zonos.stripe;cartStore.step="payment";void this.initInvoiceCart();this.resizeListener();this.storeUnsubscribeList=[stripeStoreOnChange("clientSecret",(function(){void o.applyStripeTheme()})),localizationStoreOnChange("selectedLocale",(function(){void o.applyStripeTheme()}))];log("mobile: ".concat(this.isMobile))};o.prototype.disconnectedCallback=function(){stripeStoreReset();cartStoreReset();this.onChangeLocaleListener();this.storeUnsubscribeList.forEach((function(o){return o()}))};o.prototype.render=function(){var o=this;this.clientSecret=stripeStore.clientSecret;if(stripeStore.stripeCustomerSessionClientSecret){this.stripeCustomerSessionClientSecret=stripeStore.stripeCustomerSessionClientSecret}var e=this.getBaseCurrencySettlementInfo();var n=zonosStore.appearance,i=n.logoUrl,s=n.theme;var t=function(){var o="".concat(i,"?timestamp=").concat(Date.now());return h("div",{class:"zonos--logo"},o&&h("img",{alt:"".concat(zonosStore.organizationName," logo"),src:o}))};var c=getIsTestMode();var r=function(){var e;var n=new URLSearchParams(window.location.search);var i=n.get("zonosQaUrl");var s=n.get("zonosDebug");var r=(e=languages.find((function(o){return o.code===localizationStore.selectedLocale})))===null||e===void 0?void 0:e.label;return h(Fragment,null,h("zonos-h-stack",{class:"zonos--header-wrapper",spacing:16},h("div",{class:"zonos--logo-wrapper"},t(),c&&h("zonos-badge",{badgeColor:"orange",size:"small"},translate("Test mode")),s==="1"&&h("zonos-badge",{badgeColor:"cyan",size:"small"},"debug"),i&&h("zonos-badge",{badgeColor:"purple",size:"small"},i)),h("div",{class:"zonos--header-right"},h("zonos-button",{backgroundColor:"gray-0",class:"zonos--header-right-button",onClick:function(){return o.toggleLanguageDialog()},variant:"outline"},r,h("zonos-icon",{"aria-label":"Language select",content:ChevronDownIcon,iconColor:"gray-1200"})),h("div",{class:classes(["zonos--invoice-language-dialog",o.showLanguageDialogMobile&&"zonos--invoice-language-dialog-open"])},h("zonos-language-select",{handleOnClose:function(){return o.toggleLanguageDialog()}})))))};var a=function(){if(o.isOverlayLoading||stripeStore.isFetchingSession){return null}return h("div",{class:"zonos--content"},cartStore.step!=="finish"&&cartStore.step!=="error"&&h(Fragment,null,(o.isMobile||o.isTablet)&&r(),h("div",{class:"zonos--left","data-theme":s},!o.isMobile&&!o.isTablet&&r(),h("zonos-text",{class:"zonos--title",type:"semiBoldSubheader"},translate("Billing info")),h("zonos-v-stack",{spacing:16},h("zonos-link-authentication",{titleText:""}),h("zonos-address",{titleText:"",type:"billing"})),h("zonos-invoice-payment",{class:classes(["zonos--invoice-container"]),continueLoading:o.submitLoading,onContinueClicked:function(){return __awaiter(o,void 0,void 0,(function(){return __generator(this,(function(o){switch(o.label){case 0:return[4,this.handleStripePaymentContinue()];case 1:o.sent();return[2]}}))}))}})),h("div",{class:"zonos--right","data-theme":s},!o.isMobile&&h("zonos-invoice-review",{mobile:o.isMobile,tablet:o.isTablet}),h("div",{class:"zonos--order-details-container"},!o.isMobile&&h("zonos-invoice-cart-items",null),o.isMobile&&h("zonos-invoice-order-details",{collapsed:o.collapseReviewMobile,mobile:o.isMobile,onCollapseClicked:function(){o.collapseReviewMobile=!o.collapseReviewMobile}})),h("div",{class:"flex--wrapper"},!o.isMobile&&h("zonos-v-stack",{spacing:16},h("zonos-invoice-subtotal",null)),!o.isMobile&&!o.isTablet&&h("zonos-invoice-footer",{"data-theme":s,mobile:o.isMobile,tablet:o.isTablet})))),(cartStore.step==="finish"||cartStore.step==="error")&&h("div",{class:"zonos--done","data-theme":s},h("div",{class:"zonos--header"},t()),h("zonos-invoice-finish",{confirmationId:o.confirmationId,overrideNotification:cartStore.step==="error"&&!!cartStore.error?Object.assign(Object.assign({},cartStore.error),{type:"error"}):undefined,storybookForceStatus:o.storybookPaymentStatusOverride})),(o.isMobile||o.isTablet||cartStore.step==="finish"||cartStore.step==="error")&&h("zonos-invoice-footer",{"data-theme":s,mobile:o.isMobile,tablet:o.isTablet}))};return h(Host,{class:classes(["zonos--invoice zonos--elements",this.isMobile&&"mobile",this.isTablet&&"tablet"]),"data-theme":s},a(),e&&h("zonos-confirm-dialog",{class:"zonos--pay-in-usd-dialog",dialogCancelBtnText:translate("Cancel"),dialogConfirmBtnText:translate("Pay [orderTotal]",{orderTotal:currencyFormat({amount:e.settlementAmount,currency:"USD"})}),dialogIntent:"warn",dialogOpen:this.payInUsdConfirmDialogOpen,dialogSubtitle:translate("By paying in USD, your card will be charged directly with no currency conversion. However, using a non-USD based card may result in additional currency conversion fees at the bank level."),dialogTitle:translate("Pay in USD (United States Dollar)?"),dialogType:"confirm",dialogWidth:480,onCancelClicked:function(){o.payInUsdConfirmDialogOpen=false},onConfirmClicked:function(){return o.handleStripePaymentContinue()}}),h("zonos-loading-overlay",{open:this.isOverlayLoading}))};Object.defineProperty(o,"assetsDirs",{get:function(){return["assets"]},enumerable:false,configurable:true});return o}();ZonosInvoice.style=ZonosInvoiceStyle0;export{ZonosInvoice as zonos_invoice};
1
+ var __awaiter=this&&this.__awaiter||function(o,e,n,i){function s(o){return o instanceof n?o:new n((function(e){e(o)}))}return new(n||(n=Promise))((function(n,t){function c(o){try{a(i.next(o))}catch(o){t(o)}}function r(o){try{a(i["throw"](o))}catch(o){t(o)}}function a(o){o.done?n(o.value):s(o.value).then(c,r)}a((i=i.apply(o,e||[])).next())}))};var __generator=this&&this.__generator||function(o,e){var n={label:0,sent:function(){if(t[0]&1)throw t[1];return t[1]},trys:[],ops:[]},i,s,t,c=Object.create((typeof Iterator==="function"?Iterator:Object).prototype);return c.next=r(0),c["throw"]=r(1),c["return"]=r(2),typeof Symbol==="function"&&(c[Symbol.iterator]=function(){return this}),c;function r(o){return function(e){return a([o,e])}}function a(r){if(i)throw new TypeError("Generator is already executing.");while(c&&(c=0,r[0]&&(n=0)),n)try{if(i=1,s&&(t=r[0]&2?s["return"]:r[0]?s["throw"]||((t=s["return"])&&t.call(s),0):s.next)&&!(t=t.call(s,r[1])).done)return t;if(s=0,t)r=[r[0]&2,t.value];switch(r[0]){case 0:case 1:t=r;break;case 4:n.label++;return{value:r[1],done:false};case 5:n.label++;s=r[1];r=[0];continue;case 7:r=n.ops.pop();n.trys.pop();continue;default:if(!(t=n.trys,t=t.length>0&&t[t.length-1])&&(r[0]===6||r[0]===2)){n=0;continue}if(r[0]===3&&(!t||r[1]>t[0]&&r[1]<t[3])){n.label=r[1];break}if(r[0]===6&&n.label<t[1]){n.label=t[1];t=r;break}if(t&&n.label<t[2]){n.label=t[2];n.ops.push(r);break}if(t[2])n.ops.pop();n.trys.pop();continue}r=e.call(o,n)}catch(o){r=[6,o];s=0}finally{i=t=0}if(r[0]&5)throw r[1];return{value:r[0]?r[1]:void 0,done:true}}};import{r as registerInstance,h,a as Host,F as Fragment}from"./index-_lt63o7c.js";import{b as stripeStore,i as initStripeElements,c as stripeStoreRetrievePayment,d as cartStore,r as cartStoreUpdateToErrorState,e as cartStoreUpdateItems,k as stripeStoreInitCheckoutSession,l as stripeStoreGetPaymentIntent,z as stripeStoreUpdateCheckoutSessionBaseCurrency,E as stripeStoreConfirmPayment,J as stripeStoreOnChange,H as stripeStoreReset,f as cartStoreReset}from"./cart-ekBk_gxV.js";import{i as invoiceStoreUpdateSelectedShippingOption,a as invoiceStoreInitShippingInfo,b as invoiceStoreAsyncAddressUpdate,c as invoiceStore}from"./invoice-BNDWuVsD.js";import{p as paypalStoreHasPaypalEnabled,a as paypalStore}from"./paypal-CW1D2XqZ.js";import{s as storageStore,t as translate,e as localizationStoreOnChange,h as currencyFormat,j as languages,l as localizationStore}from"./localization-AOqYXGdP.js";import{z as zonosStore}from"./zonosStore-DrIOAz4M.js";import{b as buildCartItemsByTempCart}from"./buildCartItemsByTempCart-BycjkdlE.js";import{h as handleFetch,s as sendErrorLog,l as logError,g as getIsTestMode}from"./handleFetch-D5GYDF-O.js";import{i as isInvoiceMobile,a as isInvoiceTablet}from"./isInvoiceMobileTablet-Clej0Ffe.js";import{c as classes}from"./classes-BJHSB96f.js";import{l as log}from"./VarianceTest-BJmZPrZl.js";import"./isDarkColor-YdrG78th.js";import"./getBorderRadius-HwG64EKM.js";import"./TaxId-Cye-evFK.js";import"./isContrastColor-CWLU13s9.js";import"./submitGtag-CCGQS060.js";var ChevronDownIcon='<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>';var zonosInvoiceCss=function(){return".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}"};var ZonosInvoice=/** @class */function(){function o(o){var e=this;registerInstance(this,o);this.storeUnsubscribeList=[];
2
+ /**
3
+ * Listener for locale change in localization store
4
+ */this.onChangeLocaleListener=function(){};
5
+ /**
6
+ * Flag to determine if the checkout is on mobile
7
+ */this.mobile=false;
8
+ /**
9
+ * Whether or not the component is being rendered with tablet styles
10
+ */this.tablet=false;
11
+ /**
12
+ * The stripe instance
13
+ */this.stripe=window.Zonos.stripe;
14
+ /**
15
+ * Whether or not the language dialog is open
16
+ */this.showLanguageDialogMobile=false;
17
+ /**
18
+ * Whether or not the submit button is loading in `step` component
19
+ */this.submitLoading=false;
20
+ // default to collapse the review
21
+ this.collapseReviewMobile=true;this.isMobile=false;this.isTablet=false;
22
+ // @State() isCollect = window.Zonos.isCollect;
23
+ this.isOverlayLoading=true;
24
+ /**
25
+ * Confirm dialog open state
26
+ */this.isCartCollected=false;
27
+ /**
28
+ * Cart expired state to show the cart expired dialog
29
+ */this.isCartExpired=false;
30
+ /**
31
+ * Pay in USD confirm dialog open state
32
+ */this.payInUsdConfirmDialogOpen=false;
33
+ /**
34
+ * Error message from onInventoryCheck callback
35
+ */this.inventoryCheckErrorMessage=null;
36
+ /**
37
+ * Confirmation id for invoice finish component
38
+ */this.confirmationId=null;
39
+ /**
40
+ * Client secret value
41
+ */this.clientSecret=stripeStore.clientSecret;
42
+ /**
43
+ * Client secret value of customer session (use to load saved payment method and render saved consent)
44
+ */this.stripeCustomerSessionClientSecret=stripeStore.stripeCustomerSessionClientSecret;this.getBaseCurrencySettlementInfo=function(){var o=cartStore.selectedLandedCost;if(!o){return null}var e=o.landedCost.amountSubtotals;if(!e){return null}var n=(e.discounts||0)+e.items+e.landedCostTotal+e.shipping;return{settlementAmount:n}};this.applyStripeTheme=function(){return __awaiter(e,void 0,void 0,(function(){var o;return __generator(this,(function(e){switch(e.label){case 0:o=zonosStore.appearance.theme;return[4/*yield*/,initStripeElements({
45
+ // only override theme or theme from appearance if it's mobile
46
+ overrideTheme:this.isMobile?o:undefined,paypalEnabled:paypalStoreHasPaypalEnabled()})];case 1:e.sent();return[2/*return*/]}}))}))};this.fetchCheckoutSession=function(o){return __awaiter(e,void 0,void 0,(function(){var e;return __generator(this,(function(n){switch(n.label){case 0:return[4/*yield*/,handleFetch("/api/zonos-elements/collect/get-checkout-session",{body:{checkoutSessionId:o},method:"POST"})];case 1:e=n.sent().json;return[2/*return*/,e]}}))}))};
47
+ /**
48
+ * Check if stripe payment intent is succeeded or in a good state to move forward
49
+ */this.checkStripePaymentIntentStatus=function(){return __awaiter(e,void 0,void 0,(function(){var o,e,n,i,s,t,c,r,a,l;return __generator(this,(function(v){switch(v.label){case 0:e=!!window.Zonos.cartData;n=new URL(window.location.href).searchParams;i=n.get("payment_intent_client_secret");s=n.get("zonosCheckoutSessionId");log("Payment intent exist, checking stripe payment intent status");
50
+ // Allow to proceed to order if there's no stripe client secret and cart data is available
51
+ if(!i){log("No stripe client secret found in the URL, proceed to order if cart data is available");return[2/*return*/,{shouldAllowOrder:e}]}return[4/*yield*/,stripeStoreRetrievePayment({clientSecret:i})];case 1:t=v.sent(),c=t.error,r=t.status;a=new URLSearchParams(window.location.search).get("redirect_status");if(!(a&&s))return[3/*break*/,3];if(!c){log("Payment intent is succeeded or in a good state to move forward, show success screen")}else{log("Payment intent failed, show status from error")}return[4/*yield*/,this.fetchCheckoutSession(s)];case 2:l=v.sent();this.confirmationId=((o=l===null||l===void 0?void 0:l.checkoutSession.landedCost)===null||o===void 0?void 0:o.shortId)||null;storageStore.checkoutSessionId=s;stripeStore.clientSecret=i;void this.setToFinishStep(r);return[2/*return*/,{shouldAllowOrder:false}];case 3:if(!e){log("Cart data is not available, only check payment intent status, skip order.");return[2/*return*/,{shouldAllowOrder:false}]}log("Payment intent is not succeeded, proceed to order");return[2/*return*/,{shouldAllowOrder:true}]}}))}))}}
52
+ /**
53
+ * Listen to resize event to update the isMobile state
54
+ */o.prototype.resizeListener=function(){this.isMobile=isInvoiceMobile(this.mobile);this.isTablet=isInvoiceTablet(this.tablet)};
55
+ /**
56
+ * For storybook to set to finish step, this is to trigger in the story for zonos-checkout-finish
57
+ */o.prototype.setToFinishStep=function(o){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){stripeStore.stripe=window.Zonos.stripe;cartStore.step="finish";this.storybookPaymentStatusOverride=o;this.isOverlayLoading=false;return[2/*return*/]}))}))};o.prototype.initInvoiceCart=function(){return __awaiter(this,void 0,void 0,(function(){var o,e,n,i,s,t,c,r,a,l,v,d,z,h,u,f,p,m,g,b,w,x,S;return __generator(this,(function(y){switch(y.label){case 0:
58
+ // Should not happen since we will throw error way earlier if cartData is not available
59
+ if(!window.Zonos.cartData){return[2/*return*/]}d=(e=(o=window.Zonos.cartData)===null||o===void 0?void 0:o.items[0])===null||e===void 0?void 0:e.currencyCode;if(d){cartStore.currency=d}z=(i=(n=window.Zonos.cartData)===null||n===void 0?void 0:n.references)===null||i===void 0?void 0:i.checkoutSessionId;h=(t=(s=window.Zonos.cartData)===null||s===void 0?void 0:s.references)===null||t===void 0?void 0:t.landedCostId;if(!h){cartStoreUpdateToErrorState({messages:[translate("Session does not have valid landed cost. Please contact [organizationName] for assistance.",{organizationName:zonosStore.organizationName})],title:translate("Invalid session")});return[2/*return*/]}
60
+ // Override checkout session id for invoice if we found one in the cart reference
61
+ if(z){log("Setting checkout session id from cart reference","info",z);storageStore.checkoutSessionId=z}else{log("Clear checkout session id from storage so we start from a fresh session for the invoice cart");storageStore.checkoutSessionId=null}return[4/*yield*/,this.checkStripePaymentIntentStatus()];case 1:u=y.sent().shouldAllowOrder;if(!u){return[2/*return*/]}y.label=2;case 2:y.trys.push([2,11,,12]);f=buildCartItemsByTempCart(window.Zonos.cartData),p=f.adjustments,m=f.cartItems;return[4/*yield*/,cartStoreUpdateItems({adjustments:p,cartItems:m,landedCostId:h,
62
+ // No need to init session on failure since we will always create a new one if there is no checkout session id in the cart references
63
+ shouldInitSessionOnFailure:false})];case 3:y.sent();if(!(!storageStore.checkoutSessionId&&!z))return[3/*break*/,5];return[4/*yield*/,stripeStoreInitCheckoutSession()];case 4:g=y.sent();log("stripeStoreInitCheckoutSession: ".concat(g));if(!g){throw new Error("Failed to initialize checkout session! The cart might be created with LIVE Invoice quote but being used with sandbox credential")}y.label=5;case 5:if(!((!cartStore.checkoutSession||((c=cartStore.checkoutSession)===null||c===void 0?void 0:c.completedAt))&&z))return[3/*break*/,9];return[4/*yield*/,this.fetchCheckoutSession(z)];case 6:b=y.sent();
64
+ // Some merchants use landed cost id as the confirmation id
65
+ this.confirmationId=((r=b===null||b===void 0?void 0:b.checkoutSession.landedCost)===null||r===void 0?void 0:r.shortId)||null;
66
+ // If checkout session is already completed, set to finish step
67
+ if(!!(b===null||b===void 0?void 0:b.checkoutSession.completedAt)&&
68
+ // For invoice that's set to expired, we set completedAt but no order attached. In that case should not set to finish step
69
+ !!b.checkoutSession.order){void this.setToFinishStep("succeeded");return[2/*return*/]}if(!(b===null||b===void 0?void 0:b.checkoutSession.clientSecret))return[3/*break*/,8];return[4/*yield*/,stripeStoreRetrievePayment({clientSecret:b.checkoutSession.clientSecret})];case 7:w=y.sent().status;
70
+ // If payment intent is still processing or succeeded, set to finish step
71
+ if(w==="processing"||w==="succeeded"){void this.setToFinishStep(w);return[2/*return*/]}y.label=8;case 8:void sendErrorLog({endpoint:"INVALID_INVOICE_CHECKOUT_SESSION",errors:["Invalid checkout session, can not retrieve the checkout session after failing to update it"],metadata:{cartCheckoutSessionId:z,cartId:(a=window.Zonos.cartData)===null||a===void 0?void 0:a.id,cartLandedCostId:h}});throw new Error("Invalid checkout session, can not retrieve the checkout session after failing to update it");case 9:if(!cartStore.checkoutSession){void sendErrorLog({endpoint:"FAIL_TO_UPDATE_CREATE_INVOICE_CHECKOUT_SESSION",errors:["Could not update/create checkout session for this invoice cart"],metadata:{cartCheckoutSessionId:z||"N/A",cartId:(l=window.Zonos.cartData)===null||l===void 0?void 0:l.id,cartLandedCostId:h||"N/A"}});throw new Error("Could not update/create checkout session for this invoice cart")}
72
+ // const checkoutSessionId = storageStore.checkoutSessionId;
73
+ void stripeStoreGetPaymentIntent();x=(v=cartStore.checkoutSession)===null||v===void 0?void 0:v.landedCost;if(!x){throw new Error("Landed cost could not be found in checkout session after creating/updating them")}return[4/*yield*/,invoiceStoreUpdateSelectedShippingOption(Object.assign(Object.assign({},cartStore.checkoutSession),{id:storageStore.checkoutSessionId||""}))];case 10:y.sent();void invoiceStoreInitShippingInfo({landedCostId:x.id});void this.applyStripeTheme();return[3/*break*/,12];case 11:S=y.sent();logError(S);cartStoreUpdateToErrorState({messages:[translate("Session does not have valid landed cost. Please contact [organizationName] for assistance.",{organizationName:zonosStore.organizationName})],title:translate("Invalid session")});return[3/*break*/,12];case 12:this.isOverlayLoading=false;return[2/*return*/]}}))}))};o.prototype.toggleLanguageDialog=function(){this.showLanguageDialogMobile=!this.showLanguageDialogMobile};o.prototype.handleStripePaymentContinue=function(){return __awaiter(this,void 0,void 0,(function(){var o,e,n,i,s,t,c,r,a;return __generator(this,(function(l){switch(l.label){case 0:
74
+ // Attempt to get the value of the billing address element to validate the form
75
+ void((o=stripeStore.stripeBillingAddressElement)===null||o===void 0?void 0:o.getValue());
76
+ // If the email is not complete, scroll to the link authentication section
77
+ if(!((e=stripeStore.stripeLinkEventData)===null||e===void 0?void 0:e.complete)){s=document.querySelector("zonos-link-authentication");s===null||s===void 0?void 0:s.scrollIntoView({behavior:"smooth"});return[2/*return*/]}if(!((n=stripeStore.stripeBillingAddressEventData)===null||n===void 0?void 0:n.complete)){t=document.querySelector(".zonos--billing-address");t===null||t===void 0?void 0:t.scrollIntoView({behavior:"smooth"});return[2/*return*/]}c=stripeStore.checkoutSettlementCurrency==="USD";
78
+ // open the confirm dialog if the settlement currency is in USD, and if call this method again, proceed and confirm with Stripe.
79
+ if(c&&stripeStore.shouldRenderPayInUsdButton&&!this.payInUsdConfirmDialogOpen){this.payInUsdConfirmDialogOpen=true;return[2/*return*/]}
80
+ // Close the dialog after the user confirms to proceed with the payment in USD
81
+ this.payInUsdConfirmDialogOpen=false;
82
+ // reset paypal error message
83
+ paypalStore.paypalErrorMessage=null;
84
+ // reset error state
85
+ stripeStore.hasPaymentError=false;this.submitLoading=true;
86
+ // reset inventory check message
87
+ cartStore.inventoryCheckErrorMessage=null;return[4/*yield*/,stripeStoreUpdateCheckoutSessionBaseCurrency()];case 1:r=l.sent();
88
+ // Should not proceed to confirm payment if base currency update failed
89
+ if(!r){stripeStore.hasPaymentError=true;stripeStore.customErrorMessage=translate("Unable to complete payment in [currency]. Please try again or select a different currency. If the issue persists, contact our support team for assistance.",{currency:stripeStore.checkoutSettlementCurrency});this.submitLoading=false;return[2/*return*/]}
90
+ // Update the billing party id to the checkout session
91
+ return[4/*yield*/,invoiceStoreAsyncAddressUpdate()];case 2:
92
+ // Update the billing party id to the checkout session
93
+ l.sent();l.label=3;case 3:l.trys.push([3,5,,6]);return[4/*yield*/,stripeStoreConfirmPayment({noLandedCostCheck:true})];case 4:l.sent();cartStore.step="finish";
94
+ // Some merchants use landed cost id as the confirmation id
95
+ this.confirmationId=invoiceStore.landedCostShortId||((i=cartStore.selectedLandedCost)===null||i===void 0?void 0:i.landedCostId)||null;return[2/*return*/];case 5:a=l.sent();logError(a);stripeStore.hasPaymentError=true;return[3/*break*/,6];case 6:this.submitLoading=false;return[2/*return*/]}}))}))};o.prototype.componentWillLoad=function(){var o=this;stripeStore.stripe=window.Zonos.stripe;
96
+ // Set the step to payment
97
+ cartStore.step="payment";void this.initInvoiceCart();this.resizeListener();this.storeUnsubscribeList=[stripeStoreOnChange("clientSecret",(function(){void o.applyStripeTheme()})),localizationStoreOnChange("selectedLocale",(function(){void o.applyStripeTheme()}))];log("mobile: ".concat(this.isMobile))};
98
+ // do clean up when component is unmounted
99
+ o.prototype.disconnectedCallback=function(){
100
+ // reset stripe store
101
+ stripeStoreReset();
102
+ // reset cart store
103
+ cartStoreReset();
104
+ // cleanup onChange listener
105
+ this.onChangeLocaleListener();this.storeUnsubscribeList.forEach((function(o){return o()}))};o.prototype.render=function(){var o=this;
106
+ // Set client secret so that we can add this to @Watch listener
107
+ this.clientSecret=stripeStore.clientSecret;
108
+ // Only set and update stripeCustomerSession state if it's available, since it would only be available at the time checkout session is created, afterward access checkout session the value would be `null`.
109
+ if(stripeStore.stripeCustomerSessionClientSecret){
110
+ // Set stripe customer session client secret so that we can add this to @Watch listener
111
+ this.stripeCustomerSessionClientSecret=stripeStore.stripeCustomerSessionClientSecret}var e=this.getBaseCurrencySettlementInfo();var n=zonosStore.appearance,i=n.logoUrl,s=n.theme;var t=function(){
112
+ // add timestamp to logo url so browser won't cache it on the dashboard setting
113
+ var o="".concat(i,"?timestamp=").concat(Date.now());return h("div",{class:"zonos--logo"},o&&h("img",{alt:"".concat(zonosStore.organizationName," logo"),src:o}))};var c=getIsTestMode();var r=function(){var e;var n=new URLSearchParams(window.location.search);var i=n.get("zonosQaUrl");var s=n.get("zonosDebug");var r=(e=languages.find((function(o){return o.code===localizationStore.selectedLocale})))===null||e===void 0?void 0:e.label;return h(Fragment,null,h("zonos-h-stack",{class:"zonos--header-wrapper",spacing:16},h("div",{class:"zonos--logo-wrapper"},t(),c&&h("zonos-badge",{badgeColor:"orange",size:"small"},translate("Test mode")),s==="1"&&h("zonos-badge",{badgeColor:"cyan",size:"small"},"debug"),i&&h("zonos-badge",{badgeColor:"purple",size:"small"},i)),h("div",{class:"zonos--header-right"},h("zonos-button",{backgroundColor:"gray-0",class:"zonos--header-right-button",onClick:function(){return o.toggleLanguageDialog()},variant:"outline"},r,h("zonos-icon",{"aria-label":"Language select",content:ChevronDownIcon,iconColor:"gray-1200"})),h("div",{class:classes(["zonos--invoice-language-dialog",o.showLanguageDialogMobile&&"zonos--invoice-language-dialog-open"])},h("zonos-language-select",{handleOnClose:function(){return o.toggleLanguageDialog()}})))))};var a=function(){if(o.isOverlayLoading||stripeStore.isFetchingSession){return null}return h("div",{class:"zonos--content"},cartStore.step!=="finish"&&cartStore.step!=="error"&&h(Fragment,null,(o.isMobile||o.isTablet)&&r(),h("div",{class:"zonos--left","data-theme":s},!o.isMobile&&!o.isTablet&&r(),h("zonos-text",{class:"zonos--title",type:"semiBoldSubheader"},translate("Billing info")),h("zonos-v-stack",{spacing:16},h("zonos-link-authentication",{titleText:""}),h("zonos-address",{titleText:"",type:"billing"})),h("zonos-invoice-payment",{class:classes(["zonos--invoice-container"]),continueLoading:o.submitLoading,onContinueClicked:function(){return __awaiter(o,void 0,void 0,(function(){return __generator(this,(function(o){switch(o.label){case 0:return[4/*yield*/,this.handleStripePaymentContinue()];case 1:o.sent();return[2/*return*/]}}))}))}})),h("div",{class:"zonos--right","data-theme":s},!o.isMobile&&h("zonos-invoice-review",{mobile:o.isMobile,tablet:o.isTablet}),h("div",{class:"zonos--order-details-container"},!o.isMobile&&h("zonos-invoice-cart-items",null),o.isMobile&&h("zonos-invoice-order-details",{collapsed:o.collapseReviewMobile,mobile:o.isMobile,onCollapseClicked:function(){o.collapseReviewMobile=!o.collapseReviewMobile}})),h("div",{class:"flex--wrapper"},!o.isMobile&&h("zonos-v-stack",{spacing:16},h("zonos-invoice-subtotal",null)),!o.isMobile&&!o.isTablet&&h("zonos-invoice-footer",{"data-theme":s,mobile:o.isMobile,tablet:o.isTablet})))),(cartStore.step==="finish"||cartStore.step==="error")&&h("div",{class:"zonos--done","data-theme":s},h("div",{class:"zonos--header"},t()),h("zonos-invoice-finish",{confirmationId:o.confirmationId,overrideNotification:cartStore.step==="error"&&!!cartStore.error?Object.assign(Object.assign({},cartStore.error),{type:"error"}):undefined,storybookForceStatus:o.storybookPaymentStatusOverride})),(o.isMobile||o.isTablet||cartStore.step==="finish"||cartStore.step==="error")&&h("zonos-invoice-footer",{"data-theme":s,mobile:o.isMobile,tablet:o.isTablet}))};return h(Host,{class:classes(["zonos--invoice zonos--elements",this.isMobile&&"mobile",this.isTablet&&"tablet"]),"data-theme":s},a(),e&&h("zonos-confirm-dialog",{class:"zonos--pay-in-usd-dialog",dialogCancelBtnText:translate("Cancel"),dialogConfirmBtnText:translate("Pay [orderTotal]",{orderTotal:currencyFormat({amount:e.settlementAmount,currency:"USD"})}),dialogIntent:"warn",dialogOpen:this.payInUsdConfirmDialogOpen,dialogSubtitle:translate("By paying in USD, your card will be charged directly with no currency conversion. However, using a non-USD based card may result in additional currency conversion fees at the bank level."),dialogTitle:translate("Pay in USD (United States Dollar)?"),dialogType:"confirm",dialogWidth:480,onCancelClicked:function(){o.payInUsdConfirmDialogOpen=false},
114
+ // Mark user selected confirm to continue with payment
115
+ onConfirmClicked:function(){return o.handleStripePaymentContinue()}}),h("zonos-loading-overlay",{open:this.isOverlayLoading}))};Object.defineProperty(o,"assetsDirs",{get:function(){return["assets"]},enumerable:false,configurable:true});return o}();ZonosInvoice.style=zonosInvoiceCss();export{ZonosInvoice as zonos_invoice};
@@ -1 +1,14 @@
1
- import{r as registerInstance,h,a as Host}from"./index-cfd394c8.js";import{C as localizationStoreUpdateSelectedLocale,t as translate,y as getSupportedLanguages,l as localizationStore}from"./localization-36a4dc22.js";import{f as zonosStoreFontFamily}from"./zonosStore-eca1e364.js";import"./handleFetch-a844cac1.js";import"./VarianceTest-572cecf5.js";var GreenCheckDuotoneIcon='<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M7.99996 2.6665C5.05444 2.6665 2.66663 5.05432 2.66663 7.99984C2.66663 10.9454 5.05444 13.3332 7.99996 13.3332C10.9455 13.3332 13.3333 10.9454 13.3333 7.99984C13.3333 5.05432 10.9455 2.6665 7.99996 2.6665Z" fill="#AFF8C3"/>\n<path fill-rule="evenodd" clip-rule="evenodd" d="M10.1403 6.10535C10.3582 6.27488 10.3975 6.58902 10.228 6.80699L8.01055 9.65797C7.76436 9.97449 7.29646 10.0036 7.01291 9.72008L5.81307 8.52024C5.61781 8.32498 5.61781 8.0084 5.81307 7.81314C6.00833 7.61787 6.32492 7.61787 6.52018 7.81314L7.45301 8.74597L9.43862 6.19305C9.60815 5.97508 9.92229 5.93581 10.1403 6.10535Z" fill="#246627"/>\n</svg>\n';var zonosLanguageSelectCss=":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host .zonos--language-select{width:100%}:host .zonos--language-select .zonos--language-select-content{display:grid;grid-template-columns:repeat(3, minmax(-webkit-max-content, 1fr));grid-template-columns:repeat(3, minmax(max-content, 1fr));padding:16px;padding-top:0px}:host .zonos--language-select .zonos--language-select-content .zonos--language-select-button{display:-ms-flexbox;display:flex;padding:8px;gap:4px;-ms-flex-align:center;align-items:center;border-radius:var(--zonos-elements-radius-4);cursor:pointer;width:100%;border:none;background:none}:host .zonos--language-select .zonos--language-select-content .zonos--language-select-button:hover{background:var(--zonos-elements-gray-100)}@media (max-width: 400px){:host .zonos--language-select .zonos--language-select-content{grid-template-columns:1fr 1fr}}";var ZonosLanguageSelectStyle0=zonosLanguageSelectCss;var ZonosLanguageSelect=function(){function e(e){var o=this;registerInstance(this,e);this.handleOnClose=function(){};this.languageSelected=function(e){void localizationStoreUpdateSelectedLocale(e);o.handleOnClose()}}e.prototype.render=function(){var e=this;var o=localizationStore.selectedLocale;return h(Host,{key:"b557082e699209af33ab25715d5cb23fb8a20f56",class:"zonos--elements",style:{"--zonos--font-family":zonosStoreFontFamily()}},h("div",{key:"f5fa8a8163aa46589d67df8d7b69a9b60c7c3994",class:"zonos--language-select"},h("zonos-select-dialog-header",{key:"7ffc14b7fab4014352361424de6ea6e2fc8d7f6c",handleOnClose:function(){return e.handleOnClose()},label:translate("Select a language")}),h("div",{key:"ab06dd27d199ef7223ce4421ab4d4e7a5816e402",class:"zonos--language-select-content"},getSupportedLanguages().map((function(t){return h("button",{class:"zonos--language-select-button",onClick:function(){return e.languageSelected(t.code)}},h("zonos-text",{textColor:"gray-800"},t.translatedLabel),t.code===o&&h("zonos-icon",{content:GreenCheckDuotoneIcon,size:16}))})))))};return e}();ZonosLanguageSelect.style=ZonosLanguageSelectStyle0;var RemoveIcon='<svg xmlns="https://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path fill="#C5C6CA" fill-rule="evenodd" d="M22 12c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10Z" clip-rule="evenodd"/><path fill="#4D505A" fill-rule="evenodd" d="M8.293 8.293a1 1 0 0 1 1.414 0L12 10.586l2.293-2.293a1 1 0 1 1 1.414 1.414L13.414 12l2.293 2.293a1 1 0 0 1-1.414 1.414L12 13.414l-2.293 2.293a1 1 0 0 1-1.414-1.414L10.586 12 8.293 9.707a1 1 0 0 1 0-1.414Z" clip-rule="evenodd"/></svg>';var zonosSelectDialogHeaderCss=":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host .zonos--select-dialog-header-wrapper{position:-webkit-sticky;position:sticky;top:0;background:var(--zonos-elements-surface-color);padding:16px}:host .zonos--select-dialog-header-wrapper .zonos--select-dialog-header{position:relative;-ms-flex-pack:justify;justify-content:space-between;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}";var ZonosSelectDialogHeaderStyle0=zonosSelectDialogHeaderCss;var ZonosSelectDialogHeader=function(){function e(e){registerInstance(this,e);this.handleOnClose=function(){};this.label=""}e.prototype.render=function(){var e=this;return h(Host,{key:"2c3fe65b8226875d1e543d87d622a2356c975bae",class:"zonos--elements",style:{"--zonos--font-family":zonosStoreFontFamily()}},h("zonos-v-stack",{key:"7e065cce508376405350d8cf0b90437c5bbbd6e9",class:"zonos--select-dialog-header-wrapper",spacing:8},h("div",{key:"363ff8e4b18b50497b904af45bcf62ae374f90de",class:"zonos--select-dialog-header"},h("zonos-text",{key:"5b3833d7186579859d067c205ab3cb70bf01ed99",type:"boldLabel"},this.label),h("zonos-button",{key:"7dd27337e33c3d97544696a8d850204296474f5e",class:"zonos--close-button",icon:h("zonos-icon",{"aria-label":"Close select dialog",content:RemoveIcon,size:20}),noBackground:true,onClick:function(){return e.handleOnClose()}})),h("slot",{key:"a5f6b16ecc6a1fb8c24bd783f0384d3506656f01"})))};return e}();ZonosSelectDialogHeader.style=ZonosSelectDialogHeaderStyle0;export{ZonosLanguageSelect as zonos_language_select,ZonosSelectDialogHeader as zonos_select_dialog_header};
1
+ import{r as registerInstance,h,a as Host}from"./index-_lt63o7c.js";import{C as localizationStoreUpdateSelectedLocale,t as translate,z as getSupportedLanguages,l as localizationStore}from"./localization-AOqYXGdP.js";import{a as zonosStoreFontFamily}from"./zonosStore-DrIOAz4M.js";import"./handleFetch-D5GYDF-O.js";import"./VarianceTest-BJmZPrZl.js";var GreenCheckDuotoneIcon='<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M7.99996 2.6665C5.05444 2.6665 2.66663 5.05432 2.66663 7.99984C2.66663 10.9454 5.05444 13.3332 7.99996 13.3332C10.9455 13.3332 13.3333 10.9454 13.3333 7.99984C13.3333 5.05432 10.9455 2.6665 7.99996 2.6665Z" fill="#AFF8C3"/>\n<path fill-rule="evenodd" clip-rule="evenodd" d="M10.1403 6.10535C10.3582 6.27488 10.3975 6.58902 10.228 6.80699L8.01055 9.65797C7.76436 9.97449 7.29646 10.0036 7.01291 9.72008L5.81307 8.52024C5.61781 8.32498 5.61781 8.0084 5.81307 7.81314C6.00833 7.61787 6.32492 7.61787 6.52018 7.81314L7.45301 8.74597L9.43862 6.19305C9.60815 5.97508 9.92229 5.93581 10.1403 6.10535Z" fill="#246627"/>\n</svg>\n';var zonosLanguageSelectCss=function(){return":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host .zonos--language-select{width:100%}:host .zonos--language-select .zonos--language-select-content{display:grid;grid-template-columns:repeat(3, minmax(-webkit-max-content, 1fr));grid-template-columns:repeat(3, minmax(max-content, 1fr));padding:16px;padding-top:0px}:host .zonos--language-select .zonos--language-select-content .zonos--language-select-button{display:-ms-flexbox;display:flex;padding:8px;gap:4px;-ms-flex-align:center;align-items:center;border-radius:var(--zonos-elements-radius-4);cursor:pointer;width:100%;border:none;background:none}:host .zonos--language-select .zonos--language-select-content .zonos--language-select-button:hover{background:var(--zonos-elements-gray-100)}@media (max-width: 400px){:host .zonos--language-select .zonos--language-select-content{grid-template-columns:1fr 1fr}}"};var ZonosLanguageSelect=/** @class */function(){function e(e){var o=this;registerInstance(this,e);
2
+ /**
3
+ * Function to close the language select
4
+ * @default () => {}
5
+ */this.handleOnClose=function(){};this.languageSelected=function(e){
6
+ // mutate the selected language code in store
7
+ void localizationStoreUpdateSelectedLocale(e);o.handleOnClose()}}e.prototype.render=function(){var e=this;var o=localizationStore.selectedLocale;return h(Host,{key:"b557082e699209af33ab25715d5cb23fb8a20f56",class:"zonos--elements",style:{"--zonos--font-family":zonosStoreFontFamily()}},h("div",{key:"f5fa8a8163aa46589d67df8d7b69a9b60c7c3994",class:"zonos--language-select"},h("zonos-select-dialog-header",{key:"7ffc14b7fab4014352361424de6ea6e2fc8d7f6c",handleOnClose:function(){return e.handleOnClose()},label:translate("Select a language")}),h("div",{key:"ab06dd27d199ef7223ce4421ab4d4e7a5816e402",class:"zonos--language-select-content"},getSupportedLanguages().map((function(t){return h("button",{class:"zonos--language-select-button",onClick:function(){return e.languageSelected(t.code)}},h("zonos-text",{textColor:"gray-800"},t.translatedLabel),t.code===o&&h("zonos-icon",{content:GreenCheckDuotoneIcon,size:16}))})))))};return e}();ZonosLanguageSelect.style=zonosLanguageSelectCss();var RemoveIcon='<svg xmlns="https://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path fill="#C5C6CA" fill-rule="evenodd" d="M22 12c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10Z" clip-rule="evenodd"/><path fill="#4D505A" fill-rule="evenodd" d="M8.293 8.293a1 1 0 0 1 1.414 0L12 10.586l2.293-2.293a1 1 0 1 1 1.414 1.414L13.414 12l2.293 2.293a1 1 0 0 1-1.414 1.414L12 13.414l-2.293 2.293a1 1 0 0 1-1.414-1.414L10.586 12 8.293 9.707a1 1 0 0 1 0-1.414Z" clip-rule="evenodd"/></svg>';var zonosSelectDialogHeaderCss=function(){return":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host .zonos--select-dialog-header-wrapper{position:-webkit-sticky;position:sticky;top:0;background:var(--zonos-elements-surface-color);padding:16px}:host .zonos--select-dialog-header-wrapper .zonos--select-dialog-header{position:relative;-ms-flex-pack:justify;justify-content:space-between;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}"};var ZonosSelectDialogHeader=/** @class */function(){function e(e){registerInstance(this,e);
8
+ /**
9
+ * Callback to do something on close
10
+ * @default () => {}
11
+ */this.handleOnClose=function(){};
12
+ /**
13
+ * The label for the select dialog
14
+ */this.label=""}e.prototype.render=function(){var e=this;return h(Host,{key:"2c3fe65b8226875d1e543d87d622a2356c975bae",class:"zonos--elements",style:{"--zonos--font-family":zonosStoreFontFamily()}},h("zonos-v-stack",{key:"7e065cce508376405350d8cf0b90437c5bbbd6e9",class:"zonos--select-dialog-header-wrapper",spacing:8},h("div",{key:"363ff8e4b18b50497b904af45bcf62ae374f90de",class:"zonos--select-dialog-header"},h("zonos-text",{key:"5b3833d7186579859d067c205ab3cb70bf01ed99",type:"boldLabel"},this.label),h("zonos-button",{key:"7dd27337e33c3d97544696a8d850204296474f5e",class:"zonos--close-button",icon:h("zonos-icon",{"aria-label":"Close select dialog",content:RemoveIcon,size:20}),noBackground:true,onClick:function(){return e.handleOnClose()}})),h("slot",{key:"a5f6b16ecc6a1fb8c24bd783f0384d3506656f01"})))};return e}();ZonosSelectDialogHeader.style=zonosSelectDialogHeaderCss();export{ZonosLanguageSelect as zonos_language_select,ZonosSelectDialogHeader as zonos_select_dialog_header};
@@ -1 +1,4 @@
1
- import{r as registerInstance,h,a as Host}from"./index-cfd394c8.js";var zonosLinkCss=":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 a{padding-bottom:2px;color:var(--zonos-elements-primary);-webkit-box-shadow:none;box-shadow:none;text-decoration:none;word-break:break-word;-webkit-hyphens:auto;-ms-hyphens:auto;hyphens:auto;overflow-wrap:break-word}:host a:link,:host a:visited{color:var(--zonos-elements-primary);-webkit-transition:all 150ms ease-in-out;transition:all 150ms ease-in-out}:host a:hover,:host a:active{color:var(--zonos-elements-primary);-webkit-box-shadow:0 1px 0 var(--zonos-elements-primary);box-shadow:0 1px 0 var(--zonos-elements-primary)}";var ZonosLinkStyle0=zonosLinkCss;var ZonosLink=function(){function o(o){registerInstance(this,o);this.href=""}o.prototype.render=function(){return h(Host,{key:"a8f6a7e96c5da6d98554ca6e40999596f7d4ead8",class:"zonos--elements"},h("a",{key:"1df6e963d3e2e2dd5fadd97e39d3a05981458170",href:this.href,rel:this.rel,target:this.target,title:this.linkTitle},h("slot",{key:"515048e9395bf523b29efaad40d60509ef0d767f"})))};return o}();ZonosLink.style=ZonosLinkStyle0;export{ZonosLink as zonos_link};
1
+ import{r as registerInstance,h,a as Host}from"./index-_lt63o7c.js";var zonosLinkCss=function(){return":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 a{padding-bottom:2px;color:var(--zonos-elements-primary);-webkit-box-shadow:none;box-shadow:none;text-decoration:none;word-break:break-word;-webkit-hyphens:auto;-ms-hyphens:auto;hyphens:auto;overflow-wrap:break-word}:host a:link,:host a:visited{color:var(--zonos-elements-primary);-webkit-transition:all 150ms ease-in-out;transition:all 150ms ease-in-out}:host a:hover,:host a:active{color:var(--zonos-elements-primary);-webkit-box-shadow:0 1px 0 var(--zonos-elements-primary);box-shadow:0 1px 0 var(--zonos-elements-primary)}"};var ZonosLink=/** @class */function(){function o(o){registerInstance(this,o);
2
+ /**
3
+ * The href for the link
4
+ */this.href=""}o.prototype.render=function(){return h(Host,{key:"a8f6a7e96c5da6d98554ca6e40999596f7d4ead8",class:"zonos--elements"},h("a",{key:"1df6e963d3e2e2dd5fadd97e39d3a05981458170",href:this.href,rel:this.rel,target:this.target,title:this.linkTitle},h("slot",{key:"515048e9395bf523b29efaad40d60509ef0d767f"})))};return o}();ZonosLink.style=zonosLinkCss();export{ZonosLink as zonos_link};
@@ -1 +1,7 @@
1
- import{r as registerInstance,h,e as getAssetPath,a as Host}from"./index-cfd394c8.js";import{f as zonosStoreFontFamily}from"./zonosStore-eca1e364.js";import{c as classes}from"./classes-0d95c529.js";import"./VarianceTest-572cecf5.js";var zonosLogoCss=":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{display:-ms-inline-flexbox;display:inline-flex}:host img{-webkit-filter:var(--zonos--filter-color);filter:var(--zonos--filter-color);width:var(--zonos--width)}";var ZonosLogoStyle0=zonosLogoCss;var ZonosLogo=function(){function o(o){registerInstance(this,o);this.theme="LIGHT";this.width="auto"}o.prototype.render=function(){var o=this.theme==="DARK"?"invert(100%) sepia(100%) saturate(0%) hue-rotate(288deg) brightness(102%) contrast(102%)":"whiteinvert(0%) sepia(100%) saturate(32%) hue-rotate(92deg) brightness(107%) contrast(107%)";return h(Host,{key:"89d856c28d227afbe76656ce217544faad91715e",class:classes(["zonos--elements zonos--logo"]),style:{"--zonos--filter-color":o,"--zonos--font-family":zonosStoreFontFamily(),"--zonos--width":this.width}},h("img",{key:"025c97e65f2666028391f6ca2d548bf905528133",alt:"Zonos Logo",src:getAssetPath("./assets/ZonosLogo.png")}))};Object.defineProperty(o,"assetsDirs",{get:function(){return["assets"]},enumerable:false,configurable:true});return o}();ZonosLogo.style=ZonosLogoStyle0;export{ZonosLogo as zonos_logo};
1
+ import{r as registerInstance,h,e as getAssetPath,a as Host}from"./index-_lt63o7c.js";import{a as zonosStoreFontFamily}from"./zonosStore-DrIOAz4M.js";import{c as classes}from"./classes-BJHSB96f.js";import"./VarianceTest-BJmZPrZl.js";var zonosLogoCss=function(){return":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{display:-ms-inline-flexbox;display:inline-flex}:host img{-webkit-filter:var(--zonos--filter-color);filter:var(--zonos--filter-color);width:var(--zonos--width)}"};var ZonosLogo=/** @class */function(){function o(o){registerInstance(this,o);
2
+ /**
3
+ * Theme to change the color of the logo
4
+ */this.theme="LIGHT";
5
+ /**
6
+ * The width of the logo
7
+ */this.width="auto"}o.prototype.render=function(){var o=this.theme==="DARK"?"invert(100%) sepia(100%) saturate(0%) hue-rotate(288deg) brightness(102%) contrast(102%)":"whiteinvert(0%) sepia(100%) saturate(32%) hue-rotate(92deg) brightness(107%) contrast(107%)";return h(Host,{key:"89d856c28d227afbe76656ce217544faad91715e",class:classes(["zonos--elements zonos--logo"]),style:{"--zonos--filter-color":o,"--zonos--font-family":zonosStoreFontFamily(),"--zonos--width":this.width}},h("img",{key:"025c97e65f2666028391f6ca2d548bf905528133",alt:"Zonos Logo",src:getAssetPath("./assets/ZonosLogo.png")}))};Object.defineProperty(o,"assetsDirs",{get:function(){return["assets"]},enumerable:false,configurable:true});return o}();ZonosLogo.style=zonosLogoCss();export{ZonosLogo as zonos_logo};
@@ -1 +1,31 @@
1
- var __awaiter=this&&this.__awaiter||function(e,o,t,r){function n(e){return e instanceof t?e:new t((function(o){o(e)}))}return new(t||(t=Promise))((function(t,s){function i(e){try{l(r.next(e))}catch(e){s(e)}}function a(e){try{l(r["throw"](e))}catch(e){s(e)}}function l(e){e.done?t(e.value):n(e.value).then(i,a)}l((r=r.apply(e,o||[])).next())}))};var __generator=this&&this.__generator||function(e,o){var t={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},r,n,s,i;return i={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(i[Symbol.iterator]=function(){return this}),i;function a(e){return function(o){return l([e,o])}}function l(a){if(r)throw new TypeError("Generator is already executing.");while(i&&(i=0,a[0]&&(t=0)),t)try{if(r=1,n&&(s=a[0]&2?n["return"]:a[0]?n["throw"]||((s=n["return"])&&s.call(n),0):n.next)&&!(s=s.call(n,a[1])).done)return s;if(n=0,s)a=[a[0]&2,s.value];switch(a[0]){case 0:case 1:s=a;break;case 4:t.label++;return{value:a[1],done:false};case 5:t.label++;n=a[1];a=[0];continue;case 7:a=t.ops.pop();t.trys.pop();continue;default:if(!(s=t.trys,s=s.length>0&&s[s.length-1])&&(a[0]===6||a[0]===2)){t=0;continue}if(a[0]===3&&(!s||a[1]>s[0]&&a[1]<s[3])){t.label=a[1];break}if(a[0]===6&&t.label<s[1]){t.label=s[1];s=a;break}if(s&&t.label<s[2]){t.label=s[2];t.ops.push(a);break}if(s[2])t.ops.pop();t.trys.pop();continue}a=o.call(e,t)}catch(e){a=[6,e];n=0}finally{r=s=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};import{r as registerInstance,h,F as Fragment,a as Host,g as getElement}from"./index-cfd394c8.js";import{a1 as getEnabledPolicies,G as policyConsentStore,a2 as storeCreditStoreSetEnabled,a3 as storeCreditStoreSetUseFullBalance,a4 as cartStoreUpdateStoreCredit,U as storeCreditStore,a5 as storeCreditStoreSetAmount,a6 as storeCreditStoreRefreshBalance,K as storeCreditStoreGetEffectiveAmount}from"./cart-d04742f5.js";import{l as localizationStore,t as translate}from"./localization-36a4dc22.js";import{z as zonosStore,f as zonosStoreFontFamily}from"./zonosStore-eca1e364.js";import{r as renderCheckoutCurrency}from"./renderCheckoutCurrency-e0e16eb7.js";import{g as getBorderRadius}from"./getBorderRadius-1f7be586.js";import"./VarianceTest-572cecf5.js";import"./handleFetch-a844cac1.js";import"./isDarkColor-939d8e9c.js";import"./TaxId-63a14057.js";var zonosPolicyConsentCss=":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:block;margin-top:20px}.zonos--policy-consent{background-color:var(--zonos-elements-gray-50);border:1px solid var(--zonos-elements-gray-200);border-radius:8px;padding:12px 14px;-webkit-transition:border-color 0.15s ease, background-color 0.15s ease;transition:border-color 0.15s ease, background-color 0.15s ease}.zonos--policy-consent:hover{border-color:var(--zonos-elements-gray-300)}.zonos--policy-consent--error{background-color:var(--zonos-elements-red-50);border-color:var(--zonos-elements-red-400)}.zonos--policy-consent-label{-ms-flex-align:center;align-items:center;cursor:pointer;display:-ms-flexbox;display:flex;gap:10px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.zonos--policy-consent-checkbox{accent-color:var(--zonos-elements-blue-600);cursor:pointer;-ms-flex-negative:0;flex-shrink:0;height:18px;margin:0;width:18px}.zonos--policy-consent-text{color:var(--zonos-elements-gray-800);font-size:14px;line-height:1.45}.zonos--policy-consent-text a{color:var(--zonos-elements-blue-600);text-decoration:underline;text-underline-offset:2px}.zonos--policy-consent-text a:hover{color:var(--zonos-elements-blue-700)}.zonos--policy-consent-error{color:var(--zonos-elements-red-600);font-size:13px;line-height:1.4;margin-top:8px;padding:0 4px}";var ZonosPolicyConsentStyle0=zonosPolicyConsentCss;var POLICIES_SENTINEL="POLICIES";var ZonosPolicyConsent=function(){function e(e){registerInstance(this,e)}e.prototype.render=function(){var e=getEnabledPolicies();if(!e.length){return null}var o=Intl.ListFormat;var t=o?new o(localizationStore.selectedLocale,{style:"long",type:"conjunction"}).formatToParts(e.map((function(e){return e.name}))):e.flatMap((function(e,o){return o===0?[{type:"element",value:e.name}]:[{type:"literal",value:", "},{type:"element",value:e.name}]}));var r=t.map((function(o){if(o.type==="literal"){return o.value}var t=e.find((function(e){return e.name===o.value}));if(!t){return o.value}return h("a",{href:t.url,onClick:function(e){e.preventDefault();e.stopPropagation();window.open(t.url,"_blank","noopener,noreferrer")},rel:"noopener noreferrer",target:"_blank"},o.value)}));var n=zonosStore.organizationName;var s=n?translate("I agree to [merchantName]'s [policies]",{merchantName:n,policies:POLICIES_SENTINEL}):translate("I agree to the [policies]",{policies:POLICIES_SENTINEL});var i=s.split(POLICIES_SENTINEL),a=i[0],l=a===void 0?"":a,c=i[1],d=c===void 0?"":c;var u=policyConsentStore.showError;var m="zonos--policy-consent-error";return h(Host,{class:"zonos--policy-consent-host"},h("div",{class:"zonos--policy-consent".concat(u?" zonos--policy-consent--error":"")},h("label",{class:"zonos--policy-consent-label"},h("input",{"aria-describedby":u?m:undefined,"aria-invalid":u?"true":"false",checked:policyConsentStore.accepted,class:"zonos--policy-consent-checkbox",disabled:policyConsentStore.locked,onChange:function(e){var o=e.target.checked;policyConsentStore.accepted=o;if(o){if(!policyConsentStore.acceptedAt){policyConsentStore.acceptedAt=(new Date).toISOString()}policyConsentStore.showError=false}else{policyConsentStore.acceptedAt=null}},type:"checkbox"}),h("span",{class:"zonos--policy-consent-text"},l,h(Fragment,null,r),d))),u&&h("div",{class:"zonos--policy-consent-error",id:m,role:"alert"},translate("You must accept the policies to place this order")))};return e}();ZonosPolicyConsent.style=ZonosPolicyConsentStyle0;var StoreCreditIcon='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" aria-hidden="true">\n <path fill="currentColor" fill-rule="evenodd" d="M4 5a3 3 0 0 0-3 3v8a3 3 0 0 0 3 3h16a3 3 0 0 0 3-3V8a3 3 0 0 0-3-3H4Zm16 2H4a1 1 0 0 0-1 1v1h18V8a1 1 0 0 0-1-1ZM2 11h20v3a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1v-3Zm6 4.5a1 1 0 0 1 1-1h2a1 1 0 0 1 0 2H9a1 1 0 0 1-1-1Z" clip-rule="evenodd"/>\n</svg>\n';var zonosStoreCreditCss=':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:block;margin-bottom:var(--zonos-elements-font-size-xl)}:host .zonos--store-credit-container{background:-webkit-gradient(linear, left top, left bottom, from(var(--zonos-elements-gray-0)), to(var(--zonos-elements-gray-50)));background:linear-gradient(180deg, var(--zonos-elements-gray-0) 0%, var(--zonos-elements-gray-50) 100%);border:1px solid var(--zonos-elements-gray-200);border-radius:var(--zonos--border-radius, var(--zonos-elements-radius-8));-webkit-box-shadow:var(--zonos-elements-v3-shadow-base);box-shadow:var(--zonos-elements-v3-shadow-base);overflow:hidden;padding:0;position:relative}:host .zonos--store-credit-container::before{background:var(--zonos--primary-color, var(--zonos-elements-gray-400));content:"";height:3px;left:0;position:absolute;right:0;top:0}:host .zonos--store-credit-header{padding:var(--zonos-elements-radius-12) var(--zonos-elements-font-size-l) 0}:host .zonos--store-credit-title-row{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between}:host .zonos--store-credit-title-left{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;gap:var(--zonos-elements-font-size-s)}:host .zonos--store-credit-title-icon{-ms-flex-align:center;align-items:center;background:color-mix(in srgb, var(--zonos--primary-color, var(--zonos-elements-gray-400)) 14%, transparent);border-radius:calc(var(--zonos--border-radius, var(--zonos-elements-radius-8)) * 0.75);display:-ms-flexbox;display:flex;-ms-flex-negative:0;flex-shrink:0;height:22px;-ms-flex-pack:center;justify-content:center;width:22px}:host .zonos--store-credit-balance-badge{background:color-mix(in srgb, var(--zonos--primary-color, var(--zonos-elements-gray-400)) 8%, var(--zonos-elements-gray-50));border:1px solid color-mix(in srgb, var(--zonos--primary-color, var(--zonos-elements-gray-400)) 22%, var(--zonos-elements-gray-200));border-radius:calc(var(--zonos--border-radius, var(--zonos-elements-radius-8)) * 0.65);padding:2px var(--zonos-elements-font-size-s)}:host .zonos--store-credit-content{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:var(--zonos-elements-font-size-s);padding:var(--zonos-elements-font-size-s) var(--zonos-elements-font-size-l) var(--zonos-elements-radius-12)}:host .zonos--store-credit-checkbox{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex}:host .zonos--store-credit-options{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:var(--zonos-elements-font-size-s)}:host .zonos--store-credit-toggle-row{display:-ms-flexbox;display:flex}:host .zonos--store-credit-custom-amount{max-width:240px}:host .zonos--store-credit-custom-amount-row{-ms-flex-align:end;align-items:flex-end;display:-ms-flexbox;display:flex;gap:var(--zonos-elements-font-size-s)}:host .zonos--store-credit-custom-amount-row zonos-input{-ms-flex:1;flex:1}:host .zonos--store-credit-error{margin-top:2px}:host .zonos--store-credit-summary{background:color-mix(in srgb, var(--zonos--primary-color, var(--zonos-elements-gray-400)) 6%, var(--zonos-elements-gray-50));border-radius:calc(var(--zonos--border-radius, var(--zonos-elements-radius-8)) * 0.65);padding:var(--zonos-elements-radius-10) var(--zonos-elements-font-size-s)}:host .zonos--store-credit-empty{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:var(--zonos-elements-font-size-s);padding:var(--zonos-elements-font-size-xl) var(--zonos-elements-font-size-l) 22px;text-align:center}:host .zonos--store-credit-empty-icon{-ms-flex-align:center;align-items:center;background:var(--zonos-elements-gray-100);border-radius:50%;display:-ms-flexbox;display:flex;height:52px;-ms-flex-pack:center;justify-content:center;opacity:0.95;width:52px}';var ZonosStoreCreditStyle0=zonosStoreCreditCss;var AMOUNT_MODE_FULL="full";var AMOUNT_MODE_CUSTOM="custom";var ZonosStoreCredit=function(){function e(e){var o=this;registerInstance(this,e);this.enabled=true;this.customAmountInput="";this.handleUseStoreCreditChange=function(e){storeCreditStoreSetEnabled(e);if(e){storeCreditStoreSetUseFullBalance(true)}void cartStoreUpdateStoreCredit()};this.handleAmountModeChange=function(e){var t=e===AMOUNT_MODE_FULL;storeCreditStoreSetUseFullBalance(t);if(!t){o.customAmountInput=""}void cartStoreUpdateStoreCredit()};this.handleCustomAmountChange=function(e){o.customAmountInput=e;storeCreditStore.error=null};this.handleApplyCustomAmount=function(){var e=parseFloat(o.customAmountInput);if(!isNaN(e)&&e>0){storeCreditStoreSetAmount(e)}else{storeCreditStoreSetAmount(null)}if(!storeCreditStore.error){void cartStoreUpdateStoreCredit()}}}e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:return[4,storeCreditStoreRefreshBalance()];case 1:e.sent();return[2]}}))}))};e.prototype.render=function(){var e=this;if(!this.enabled){return null}var o=zonosStore.appearance.colorPrimary;var t=getBorderRadius({});var r=storeCreditStore.availableBalance;var n=r!==null&&r>0;var s=storeCreditStore.isEnabled;var i=storeCreditStore.useFullBalance;var a=storeCreditStore.error;var l=storeCreditStoreGetEffectiveAmount();var c=renderCheckoutCurrency({amount:r!==null&&r!==void 0?r:0,isForeign:true});return h(Host,{class:"zonos--elements zonos--store-credit",style:{"--zonos--border-radius":t,"--zonos--font-family":zonosStoreFontFamily(),"--zonos--primary-color":o}},h("div",{class:"zonos--store-credit-container"},h("div",{class:"zonos--store-credit-header"},h("div",{class:"zonos--store-credit-title-row"},h("div",{class:"zonos--store-credit-title-left"},h("div",{"aria-hidden":"true",class:"zonos--store-credit-title-icon"},h("zonos-icon",{content:StoreCreditIcon,iconColor:"gray-500",size:22})),h("zonos-text",{type:"semiBoldLabel"},translate("Store credit"))),n&&h("div",{class:"zonos--store-credit-balance-badge"},h("zonos-text",{textColor:"gray-600",type:"caption"},c)))),h(Fragment,null,n?h("div",{class:"zonos--store-credit-content"},h("div",{class:"zonos--store-credit-checkbox"},h("zonos-checkbox",{isChecked:s,label:translate("Use store credit"),onCheckboxSelected:function(o){return e.handleUseStoreCreditChange(o.detail)},size:16})),s&&h("div",{class:"zonos--store-credit-options"},h("div",{class:"zonos--store-credit-toggle-row"},h("zonos-toggle",{onToggleChanged:function(o){return e.handleAmountModeChange(o.detail)},options:[{label:translate("Apply full balance"),value:AMOUNT_MODE_FULL},{label:translate("Enter amount"),value:AMOUNT_MODE_CUSTOM}],value:i?AMOUNT_MODE_FULL:AMOUNT_MODE_CUSTOM})),!i&&h("div",{class:"zonos--store-credit-custom-amount"},h("div",{class:"zonos--store-credit-custom-amount-row"},h("zonos-input",{inputLabel:translate("Enter amount"),inputValue:this.customAmountInput,isError:!!a,onInputChange:function(o){return e.handleCustomAmountChange(o.detail)}}),h("zonos-button",{onClick:this.handleApplyCustomAmount,size:"sm",variant:"primary"},translate("Apply")))),a&&h("div",{class:"zonos--store-credit-error"},h("zonos-text",{textColor:"red-600",type:"caption"},a)),h("div",{class:"zonos--store-credit-summary"},h("zonos-text",{textColor:"gray-800",type:"semiBoldLabel"},translate("Amount to apply: [amount]",{amount:renderCheckoutCurrency({amount:l,isForeign:true})}))))):h("div",{class:"zonos--store-credit-empty"},h("div",{"aria-hidden":"true",class:"zonos--store-credit-empty-icon"},h("zonos-icon",{content:StoreCreditIcon,iconColor:"gray-500",size:28})),h("zonos-text",{textColor:"gray-600",type:"caption"},translate("No store credit available"))))))};Object.defineProperty(e.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});return e}();ZonosStoreCredit.style=ZonosStoreCreditStyle0;export{ZonosPolicyConsent as zonos_policy_consent,ZonosStoreCredit as zonos_store_credit};
1
+ var __awaiter=this&&this.__awaiter||function(e,o,t,r){function n(e){return e instanceof t?e:new t((function(o){o(e)}))}return new(t||(t=Promise))((function(t,s){function i(e){try{l(r.next(e))}catch(e){s(e)}}function a(e){try{l(r["throw"](e))}catch(e){s(e)}}function l(e){e.done?t(e.value):n(e.value).then(i,a)}l((r=r.apply(e,o||[])).next())}))};var __generator=this&&this.__generator||function(e,o){var t={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},r,n,s,i=Object.create((typeof Iterator==="function"?Iterator:Object).prototype);return i.next=a(0),i["throw"]=a(1),i["return"]=a(2),typeof Symbol==="function"&&(i[Symbol.iterator]=function(){return this}),i;function a(e){return function(o){return l([e,o])}}function l(a){if(r)throw new TypeError("Generator is already executing.");while(i&&(i=0,a[0]&&(t=0)),t)try{if(r=1,n&&(s=a[0]&2?n["return"]:a[0]?n["throw"]||((s=n["return"])&&s.call(n),0):n.next)&&!(s=s.call(n,a[1])).done)return s;if(n=0,s)a=[a[0]&2,s.value];switch(a[0]){case 0:case 1:s=a;break;case 4:t.label++;return{value:a[1],done:false};case 5:t.label++;n=a[1];a=[0];continue;case 7:a=t.ops.pop();t.trys.pop();continue;default:if(!(s=t.trys,s=s.length>0&&s[s.length-1])&&(a[0]===6||a[0]===2)){t=0;continue}if(a[0]===3&&(!s||a[1]>s[0]&&a[1]<s[3])){t.label=a[1];break}if(a[0]===6&&t.label<s[1]){t.label=s[1];s=a;break}if(s&&t.label<s[2]){t.label=s[2];t.ops.push(a);break}if(s[2])t.ops.pop();t.trys.pop();continue}a=o.call(e,t)}catch(e){a=[6,e];n=0}finally{r=s=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};import{r as registerInstance,h,F as Fragment,a as Host,g as getElement}from"./index-_lt63o7c.js";import{a1 as getEnabledPolicies,G as policyConsentStore,a2 as storeCreditStoreSetEnabled,a3 as storeCreditStoreSetUseFullBalance,a4 as cartStoreUpdateStoreCredit,R as storeCreditStore,a5 as storeCreditStoreSetAmount,a6 as storeCreditStoreRefreshBalance,K as storeCreditStoreGetEffectiveAmount}from"./cart-ekBk_gxV.js";import{l as localizationStore,t as translate}from"./localization-AOqYXGdP.js";import{z as zonosStore,a as zonosStoreFontFamily}from"./zonosStore-DrIOAz4M.js";import{r as renderCheckoutCurrency}from"./renderCheckoutCurrency-BQANmZyM.js";import{g as getBorderRadius}from"./getBorderRadius-HwG64EKM.js";import"./VarianceTest-BJmZPrZl.js";import"./handleFetch-D5GYDF-O.js";import"./isDarkColor-YdrG78th.js";import"./TaxId-Cye-evFK.js";var zonosPolicyConsentCss=function(){return":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:block;margin-top:20px}.zonos--policy-consent{background-color:var(--zonos-elements-gray-50);border:1px solid var(--zonos-elements-gray-200);border-radius:8px;padding:12px 14px;-webkit-transition:border-color 0.15s ease, background-color 0.15s ease;transition:border-color 0.15s ease, background-color 0.15s ease}.zonos--policy-consent:hover{border-color:var(--zonos-elements-gray-300)}.zonos--policy-consent--error{background-color:var(--zonos-elements-red-50);border-color:var(--zonos-elements-red-400)}.zonos--policy-consent-label{-ms-flex-align:center;align-items:center;cursor:pointer;display:-ms-flexbox;display:flex;gap:10px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.zonos--policy-consent-checkbox{accent-color:var(--zonos-elements-blue-600);cursor:pointer;-ms-flex-negative:0;flex-shrink:0;height:18px;margin:0;width:18px}.zonos--policy-consent-text{color:var(--zonos-elements-gray-800);font-size:14px;line-height:1.45}.zonos--policy-consent-text a{color:var(--zonos-elements-blue-600);text-decoration:underline;text-underline-offset:2px}.zonos--policy-consent-text a:hover{color:var(--zonos-elements-blue-700)}.zonos--policy-consent-error{color:var(--zonos-elements-red-600);font-size:13px;line-height:1.4;margin-top:8px;padding:0 4px}"};var POLICIES_SENTINEL="POLICIES";var ZonosPolicyConsent=/** @class */function(){function e(e){registerInstance(this,e)}e.prototype.render=function(){var e=getEnabledPolicies();if(!e.length){return null}
2
+ // Build the locale-aware joined list ("X, Y, and Z" in English, equivalent in other locales).
3
+ var o=Intl.ListFormat;var t=o?new o(localizationStore.selectedLocale,{style:"long",type:"conjunction"}).formatToParts(e.map((function(e){return e.name}))):// Fallback for environments without Intl.ListFormat: simple ", "-joined list.
4
+ e.flatMap((function(e,o){return o===0?[{type:"element",value:e.name}]:[{type:"literal",value:", "},{type:"element",value:e.name}]}));var r=t.map((function(o){if(o.type==="literal"){return o.value}
5
+ // 'element' part — match back to the policy by name to recover its URL.
6
+ var t=e.find((function(e){return e.name===o.value}));if(!t){return o.value}return h("a",{href:t.url,
7
+ // Prevent the surrounding <label> from also activating the checkbox
8
+ // when the link is clicked — `stopPropagation` alone doesn't suppress
9
+ // the label's default behavior in every browser. We explicitly open
10
+ // the URL ourselves and call `preventDefault` to swallow the click.
11
+ onClick:function(e){e.preventDefault();e.stopPropagation();window.open(t.url,"_blank","noopener,noreferrer")},rel:"noopener noreferrer",target:"_blank"},o.value)}));
12
+ // Use the merchant-name template when an org name is available, falling back to the generic
13
+ // phrasing otherwise so we never render a stray apostrophe (e.g. " 's Terms...").
14
+ // Reads from `zonosStore` so this works when consumed via the npm package
15
+ // (where `window.Zonos.cartSettings` may not be populated).
16
+ var n=zonosStore.organizationName;var s=n?translate("I agree to [merchantName]'s [policies]",{merchantName:n,policies:POLICIES_SENTINEL}):translate("I agree to the [policies]",{policies:POLICIES_SENTINEL});var i=s.split(POLICIES_SENTINEL),a=i[0],l=a===void 0?"":a,c=i[1],d=c===void 0?"":c;var u=policyConsentStore.showError;var m="zonos--policy-consent-error";return h(Host,{class:"zonos--policy-consent-host"},h("div",{class:"zonos--policy-consent".concat(u?" zonos--policy-consent--error":"")},h("label",{class:"zonos--policy-consent-label"},h("input",{"aria-describedby":u?m:undefined,"aria-invalid":u?"true":"false",checked:policyConsentStore.accepted,class:"zonos--policy-consent-checkbox",disabled:policyConsentStore.locked,onChange:function(e){var o=e.target.checked;policyConsentStore.accepted=o;if(o){
17
+ // Snapshot the timestamp at the moment of acceptance so later
18
+ // session-metadata updates don't drift it forward.
19
+ if(!policyConsentStore.acceptedAt){policyConsentStore.acceptedAt=(new Date).toISOString()}policyConsentStore.showError=false}else{
20
+ // If the buyer un-checks, the prior acceptance is no longer valid.
21
+ policyConsentStore.acceptedAt=null}},type:"checkbox"}),h("span",{class:"zonos--policy-consent-text"},l,h(Fragment,null,r),d))),u&&h("div",{class:"zonos--policy-consent-error",id:m,role:"alert"},translate("You must accept the policies to place this order")))};return e}();ZonosPolicyConsent.style=zonosPolicyConsentCss();var StoreCreditIcon='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" aria-hidden="true">\n <path fill="currentColor" fill-rule="evenodd" d="M4 5a3 3 0 0 0-3 3v8a3 3 0 0 0 3 3h16a3 3 0 0 0 3-3V8a3 3 0 0 0-3-3H4Zm16 2H4a1 1 0 0 0-1 1v1h18V8a1 1 0 0 0-1-1ZM2 11h20v3a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1v-3Zm6 4.5a1 1 0 0 1 1-1h2a1 1 0 0 1 0 2H9a1 1 0 0 1-1-1Z" clip-rule="evenodd"/>\n</svg>\n';var zonosStoreCreditCss=function(){return':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:block;margin-bottom:var(--zonos-elements-font-size-xl)}:host .zonos--store-credit-container{background:-webkit-gradient(linear, left top, left bottom, from(var(--zonos-elements-gray-0)), to(var(--zonos-elements-gray-50)));background:linear-gradient(180deg, var(--zonos-elements-gray-0) 0%, var(--zonos-elements-gray-50) 100%);border:1px solid var(--zonos-elements-gray-200);border-radius:var(--zonos--border-radius, var(--zonos-elements-radius-8));-webkit-box-shadow:var(--zonos-elements-v3-shadow-base);box-shadow:var(--zonos-elements-v3-shadow-base);overflow:hidden;padding:0;position:relative}:host .zonos--store-credit-container::before{background:var(--zonos--primary-color, var(--zonos-elements-gray-400));content:"";height:3px;left:0;position:absolute;right:0;top:0}:host .zonos--store-credit-header{padding:var(--zonos-elements-radius-12) var(--zonos-elements-font-size-l) 0}:host .zonos--store-credit-title-row{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between}:host .zonos--store-credit-title-left{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;gap:var(--zonos-elements-font-size-s)}:host .zonos--store-credit-title-icon{-ms-flex-align:center;align-items:center;background:color-mix(in srgb, var(--zonos--primary-color, var(--zonos-elements-gray-400)) 14%, transparent);border-radius:calc(var(--zonos--border-radius, var(--zonos-elements-radius-8)) * 0.75);display:-ms-flexbox;display:flex;-ms-flex-negative:0;flex-shrink:0;height:22px;-ms-flex-pack:center;justify-content:center;width:22px}:host .zonos--store-credit-balance-badge{background:color-mix(in srgb, var(--zonos--primary-color, var(--zonos-elements-gray-400)) 8%, var(--zonos-elements-gray-50));border:1px solid color-mix(in srgb, var(--zonos--primary-color, var(--zonos-elements-gray-400)) 22%, var(--zonos-elements-gray-200));border-radius:calc(var(--zonos--border-radius, var(--zonos-elements-radius-8)) * 0.65);padding:2px var(--zonos-elements-font-size-s)}:host .zonos--store-credit-content{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:var(--zonos-elements-font-size-s);padding:var(--zonos-elements-font-size-s) var(--zonos-elements-font-size-l) var(--zonos-elements-radius-12)}:host .zonos--store-credit-checkbox{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex}:host .zonos--store-credit-options{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:var(--zonos-elements-font-size-s)}:host .zonos--store-credit-toggle-row{display:-ms-flexbox;display:flex}:host .zonos--store-credit-custom-amount{max-width:240px}:host .zonos--store-credit-custom-amount-row{-ms-flex-align:end;align-items:flex-end;display:-ms-flexbox;display:flex;gap:var(--zonos-elements-font-size-s)}:host .zonos--store-credit-custom-amount-row zonos-input{-ms-flex:1;flex:1}:host .zonos--store-credit-error{margin-top:2px}:host .zonos--store-credit-summary{background:color-mix(in srgb, var(--zonos--primary-color, var(--zonos-elements-gray-400)) 6%, var(--zonos-elements-gray-50));border-radius:calc(var(--zonos--border-radius, var(--zonos-elements-radius-8)) * 0.65);padding:var(--zonos-elements-radius-10) var(--zonos-elements-font-size-s)}:host .zonos--store-credit-empty{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:var(--zonos-elements-font-size-s);padding:var(--zonos-elements-font-size-xl) var(--zonos-elements-font-size-l) 22px;text-align:center}:host .zonos--store-credit-empty-icon{-ms-flex-align:center;align-items:center;background:var(--zonos-elements-gray-100);border-radius:50%;display:-ms-flexbox;display:flex;height:52px;-ms-flex-pack:center;justify-content:center;opacity:0.95;width:52px}'};var AMOUNT_MODE_FULL="full";var AMOUNT_MODE_CUSTOM="custom";var ZonosStoreCredit=/** @class */function(){function e(e){var o=this;registerInstance(this,e);
22
+ /**
23
+ * Whether the component is enabled
24
+ */this.enabled=true;
25
+ /**
26
+ * Local state for custom amount input
27
+ */this.customAmountInput="";this.handleUseStoreCreditChange=function(e){storeCreditStoreSetEnabled(e);if(e){
28
+ // Enable store credit usage with full balance by default
29
+ storeCreditStoreSetUseFullBalance(true)}void cartStoreUpdateStoreCredit()};this.handleAmountModeChange=function(e){var t=e===AMOUNT_MODE_FULL;storeCreditStoreSetUseFullBalance(t);if(!t){o.customAmountInput=""}void cartStoreUpdateStoreCredit()};this.handleCustomAmountChange=function(e){o.customAmountInput=e;
30
+ // Clear error when user types
31
+ storeCreditStore.error=null};this.handleApplyCustomAmount=function(){var e=parseFloat(o.customAmountInput);if(!isNaN(e)&&e>0){storeCreditStoreSetAmount(e)}else{storeCreditStoreSetAmount(null)}if(!storeCreditStore.error){void cartStoreUpdateStoreCredit()}}}e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:return[4/*yield*/,storeCreditStoreRefreshBalance()];case 1:e.sent();return[2/*return*/]}}))}))};e.prototype.render=function(){var e=this;if(!this.enabled){return null}var o=zonosStore.appearance.colorPrimary;var t=getBorderRadius({});var r=storeCreditStore.availableBalance;var n=r!==null&&r>0;var s=storeCreditStore.isEnabled;var i=storeCreditStore.useFullBalance;var a=storeCreditStore.error;var l=storeCreditStoreGetEffectiveAmount();var c=renderCheckoutCurrency({amount:r!==null&&r!==void 0?r:0,isForeign:true});return h(Host,{class:"zonos--elements zonos--store-credit",style:{"--zonos--border-radius":t,"--zonos--font-family":zonosStoreFontFamily(),"--zonos--primary-color":o}},h("div",{class:"zonos--store-credit-container"},h("div",{class:"zonos--store-credit-header"},h("div",{class:"zonos--store-credit-title-row"},h("div",{class:"zonos--store-credit-title-left"},h("div",{"aria-hidden":"true",class:"zonos--store-credit-title-icon"},h("zonos-icon",{content:StoreCreditIcon,iconColor:"gray-500",size:22})),h("zonos-text",{type:"semiBoldLabel"},translate("Store credit"))),n&&h("div",{class:"zonos--store-credit-balance-badge"},h("zonos-text",{textColor:"gray-600",type:"caption"},c)))),h(Fragment,null,n?h("div",{class:"zonos--store-credit-content"},h("div",{class:"zonos--store-credit-checkbox"},h("zonos-checkbox",{isChecked:s,label:translate("Use store credit"),onCheckboxSelected:function(o){return e.handleUseStoreCreditChange(o.detail)},size:16})),s&&h("div",{class:"zonos--store-credit-options"},h("div",{class:"zonos--store-credit-toggle-row"},h("zonos-toggle",{onToggleChanged:function(o){return e.handleAmountModeChange(o.detail)},options:[{label:translate("Apply full balance"),value:AMOUNT_MODE_FULL},{label:translate("Enter amount"),value:AMOUNT_MODE_CUSTOM}],value:i?AMOUNT_MODE_FULL:AMOUNT_MODE_CUSTOM})),!i&&h("div",{class:"zonos--store-credit-custom-amount"},h("div",{class:"zonos--store-credit-custom-amount-row"},h("zonos-input",{inputLabel:translate("Enter amount"),inputValue:this.customAmountInput,isError:!!a,onInputChange:function(o){return e.handleCustomAmountChange(o.detail)}}),h("zonos-button",{onClick:this.handleApplyCustomAmount,size:"sm",variant:"primary"},translate("Apply")))),a&&h("div",{class:"zonos--store-credit-error"},h("zonos-text",{textColor:"red-600",type:"caption"},a)),h("div",{class:"zonos--store-credit-summary"},h("zonos-text",{textColor:"gray-800",type:"semiBoldLabel"},translate("Amount to apply: [amount]",{amount:renderCheckoutCurrency({amount:l,isForeign:true})}))))):h("div",{class:"zonos--store-credit-empty"},h("div",{"aria-hidden":"true",class:"zonos--store-credit-empty-icon"},h("zonos-icon",{content:StoreCreditIcon,iconColor:"gray-500",size:28})),h("zonos-text",{textColor:"gray-600",type:"caption"},translate("No store credit available"))))))};Object.defineProperty(e.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});return e}();ZonosStoreCredit.style=zonosStoreCreditCss();export{ZonosPolicyConsent as zonos_policy_consent,ZonosStoreCredit as zonos_store_credit};
@@ -1 +1,5 @@
1
- import{r as registerInstance,d as createEvent,h,a as Host,g as getElement}from"./index-cfd394c8.js";import{f as zonosStoreFontFamily,z as zonosStore}from"./zonosStore-eca1e364.js";import{c as classes}from"./classes-0d95c529.js";import{g as getBorderRadius}from"./getBorderRadius-1f7be586.js";import{g as getContrastColor}from"./getContrastColor-4c0ae8c1.js";import{i as isColorVariable}from"./isColorVariable-0a94004f.js";import"./VarianceTest-572cecf5.js";import"./isDarkColor-939d8e9c.js";import"./isContrastColor-9fa0d013.js";var zonosShippingRichRadioCss=":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}:host input{margin:0;accent-color:var(--zonos--selected-border-color, var(--zonos-elements-blue-600))}:host .zonos--shipping-rich-radio-item{display:-ms-flexbox;display:flex;-ms-flex:1;flex:1;padding:16px;-ms-flex-align:center;align-items:center;gap:16px;cursor:pointer;border:1px solid var(--zonos-elements-gray-200)}:host .zonos--shipping-rich-radio-item:first-child{border-top-left-radius:var(--zonos--border-radius, var(--zonos-elements-radius-10));border-top-right-radius:var(--zonos--border-radius, var(--zonos-elements-radius-10))}:host .zonos--shipping-rich-radio-item:last-child{border-bottom-right-radius:var(--zonos--border-radius, var(--zonos-elements-radius-10));border-bottom-left-radius:var(--zonos--border-radius, var(--zonos-elements-radius-10))}:host .zonos--shipping-rich-radio-item:not(:last-child){border-bottom:none}:host .zonos--shipping-rich-radio-item.selected{outline:1px solid var(--zonos--selected-border-color, var(--zonos-elements-blue-600));outline-offset:-1px}:host .zonos--shipping-info{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex:1;flex:1}:host .zonos--shipping-detail{-ms-flex:1;flex:1}:host .zonos--sub-detail{display:-ms-inline-flexbox;display:inline-flex;gap:8px;-ms-flex-wrap:wrap;flex-wrap:wrap}";var ZonosShippingRichRadioStyle0=zonosShippingRichRadioCss;var ZonosShippingRichRadio=function(){function o(o){var s=this;registerInstance(this,o);this.radioSelected=createEvent(this,"radioSelected",7);this.selectedItem=null;this.handleRichRadioSelect=function(o){var e;(e=s.radioSelected)===null||e===void 0?void 0:e.emit(o)};this.getRadioItemStyleVariables=function(){var o=s.borderColor||zonosStore.appearance.colorSecondary;var e=!s.isMobile?zonosStore.appearance.colorPrimary:"--zonos-elements-gray-0";var i=e&&o?getContrastColor({backgroundColor:isColorVariable(e)?window.getComputedStyle(s.ele).getPropertyValue("--zonos-elements-".concat(e.replace("--zonos-elements-",""))):e,color:o}):o;return{"--zonos--border-radius":getBorderRadius({overrideBorderStyle:s.borderStyle}),"--zonos--selected-border-color":i||"unset"}}}o.prototype.render=function(){var o=this;var s;return h(Host,{key:"8d77a01ba101899adb41904a820ba5f4985bc52d",class:"zonos--shipping-rich-radio zonos--elements","data-theme":this.theme,style:Object.assign(Object.assign({},this.getRadioItemStyleVariables()),{"--zonos--font-family":zonosStoreFontFamily()})},(s=this.items)===null||s===void 0?void 0:s.map((function(s){var e;var i=((e=o.selectedItem)===null||e===void 0?void 0:e.value)===s.value;return h("div",{"aria-hidden":"true",class:classes(["zonos--shipping-rich-radio-item",i&&"selected"]),onClick:function(){return o.handleRichRadioSelect(s)}},h("input",{checked:i,class:"zonos--shipping-rich-radio-input",name:"zonos--shipping-rich-radio",type:"radio",value:s.value}),h("div",{class:"zonos--shipping-info"},h("div",{class:"zonos--shipping-detail"},h("zonos-text",{class:"zonos--shipping-label",type:"label"},s.label),(s.sublabel||s.caption)&&h("div",{class:"zonos--sub-detail"},s.sublabel&&h("zonos-text",{textColor:"gray-800"},s.sublabel),s.caption&&h("zonos-text",{textColor:"gray-600"},s.caption))),h("zonos-text",{type:"semiBoldLabel"},s.price)))})))};Object.defineProperty(o.prototype,"ele",{get:function(){return getElement(this)},enumerable:false,configurable:true});return o}();ZonosShippingRichRadio.style=ZonosShippingRichRadioStyle0;export{ZonosShippingRichRadio as zonos_shipping_rich_radio};
1
+ import{r as registerInstance,d as createEvent,h,a as Host,g as getElement}from"./index-_lt63o7c.js";import{z as zonosStore,a as zonosStoreFontFamily}from"./zonosStore-DrIOAz4M.js";import{c as classes}from"./classes-BJHSB96f.js";import{g as getBorderRadius}from"./getBorderRadius-HwG64EKM.js";import{g as getContrastColor}from"./getContrastColor-CfCPlW9U.js";import{i as isColorVariable}from"./isColorVariable-DXXUq2Lv.js";import"./VarianceTest-BJmZPrZl.js";import"./isDarkColor-YdrG78th.js";import"./isContrastColor-CWLU13s9.js";var zonosShippingRichRadioCss=function(){return":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}:host input{margin:0;accent-color:var(--zonos--selected-border-color, var(--zonos-elements-blue-600))}:host .zonos--shipping-rich-radio-item{display:-ms-flexbox;display:flex;-ms-flex:1;flex:1;padding:16px;-ms-flex-align:center;align-items:center;gap:16px;cursor:pointer;border:1px solid var(--zonos-elements-gray-200)}:host .zonos--shipping-rich-radio-item:first-child{border-top-left-radius:var(--zonos--border-radius, var(--zonos-elements-radius-10));border-top-right-radius:var(--zonos--border-radius, var(--zonos-elements-radius-10))}:host .zonos--shipping-rich-radio-item:last-child{border-bottom-right-radius:var(--zonos--border-radius, var(--zonos-elements-radius-10));border-bottom-left-radius:var(--zonos--border-radius, var(--zonos-elements-radius-10))}:host .zonos--shipping-rich-radio-item:not(:last-child){border-bottom:none}:host .zonos--shipping-rich-radio-item.selected{outline:1px solid var(--zonos--selected-border-color, var(--zonos-elements-blue-600));outline-offset:-1px}:host .zonos--shipping-info{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex:1;flex:1}:host .zonos--shipping-detail{-ms-flex:1;flex:1}:host .zonos--sub-detail{display:-ms-inline-flexbox;display:inline-flex;gap:8px;-ms-flex-wrap:wrap;flex-wrap:wrap}"};var ZonosShippingRichRadio=/** @class */function(){function o(o){var s=this;registerInstance(this,o);this.radioSelected=createEvent(this,"radioSelected",7);
2
+ /**
3
+ * Selected item
4
+ * @default {null|firstItem}
5
+ */this.selectedItem=null;this.handleRichRadioSelect=function(o){var e;(e=s.radioSelected)===null||e===void 0?void 0:e.emit(o)};this.getRadioItemStyleVariables=function(){var o=s.borderColor||zonosStore.appearance.colorSecondary;var e=!s.isMobile?zonosStore.appearance.colorPrimary:"--zonos-elements-gray-0";var i=e&&o?getContrastColor({backgroundColor:isColorVariable(e)?window.getComputedStyle(s.ele).getPropertyValue("--zonos-elements-".concat(e.replace("--zonos-elements-",""))):e,color:o}):o;return{"--zonos--border-radius":getBorderRadius({overrideBorderStyle:s.borderStyle}),"--zonos--selected-border-color":i||"unset"}}}o.prototype.render=function(){var o=this;var s;return h(Host,{key:"8d77a01ba101899adb41904a820ba5f4985bc52d",class:"zonos--shipping-rich-radio zonos--elements","data-theme":this.theme,style:Object.assign(Object.assign({},this.getRadioItemStyleVariables()),{"--zonos--font-family":zonosStoreFontFamily()})},(s=this.items)===null||s===void 0?void 0:s.map((function(s){var e;var i=((e=o.selectedItem)===null||e===void 0?void 0:e.value)===s.value;return h("div",{"aria-hidden":"true",class:classes(["zonos--shipping-rich-radio-item",i&&"selected"]),onClick:function(){return o.handleRichRadioSelect(s)}},h("input",{checked:i,class:"zonos--shipping-rich-radio-input",name:"zonos--shipping-rich-radio",type:"radio",value:s.value}),h("div",{class:"zonos--shipping-info"},h("div",{class:"zonos--shipping-detail"},h("zonos-text",{class:"zonos--shipping-label",type:"label"},s.label),(s.sublabel||s.caption)&&h("div",{class:"zonos--sub-detail"},s.sublabel&&h("zonos-text",{textColor:"gray-800"},s.sublabel),s.caption&&h("zonos-text",{textColor:"gray-600"},s.caption))),h("zonos-text",{type:"semiBoldLabel"},s.price)))})))};Object.defineProperty(o.prototype,"ele",{get:function(){return getElement(this)},enumerable:false,configurable:true});return o}();ZonosShippingRichRadio.style=zonosShippingRichRadioCss();export{ZonosShippingRichRadio as zonos_shipping_rich_radio};
@@ -1 +1,27 @@
1
- import{r as registerInstance,d as createEvent,h,a as Host,g as getElement}from"./index-cfd394c8.js";import{z as zonosStore,f as zonosStoreFontFamily}from"./zonosStore-eca1e364.js";import{i as inheritAriaAttributes,a as inheritAttributes}from"./helpers-2f6955b1.js";import{c as classes}from"./classes-0d95c529.js";import{g as getBorderRadius}from"./getBorderRadius-1f7be586.js";import{i as isDarkColor}from"./isDarkColor-939d8e9c.js";import"./VarianceTest-572cecf5.js";var zonosStripeInputCss='.sc-zonos-stripe-input-h{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-stripe-input-h *.sc-zonos-stripe-input{font-family:var(--zonos--font-family, Inter), Inter}.sc-zonos-stripe-input-h img.sc-zonos-stripe-input{max-width:100%}.sc-zonos-stripe-input-h dl.sc-zonos-stripe-input,.sc-zonos-stripe-input-h dd.sc-zonos-stripe-input,.sc-zonos-stripe-input-h h1.sc-zonos-stripe-input,.sc-zonos-stripe-input-h h2.sc-zonos-stripe-input,.sc-zonos-stripe-input-h h3.sc-zonos-stripe-input,.sc-zonos-stripe-input-h h4.sc-zonos-stripe-input,.sc-zonos-stripe-input-h h5.sc-zonos-stripe-input,.sc-zonos-stripe-input-h h6.sc-zonos-stripe-input,.sc-zonos-stripe-input-h hr.sc-zonos-stripe-input,.sc-zonos-stripe-input-h figure.sc-zonos-stripe-input,.sc-zonos-stripe-input-h p.sc-zonos-stripe-input,.sc-zonos-stripe-input-h pre.sc-zonos-stripe-input{margin:0}.sc-zonos-stripe-input-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-stripe-input-h{--zonos--background-color:#f1f1f1;--zonos--local-glowing-color:0 0 0 3px hsla(0, 0%, 100%, 25%),\n 0 0 0 1px var(--zonos--primary-color);--zonos--border:1px solid #e8e8e8}.dark.sc-zonos-stripe-input-h{color-scheme:dark;--zonos--background-color:#30313d;--zonos--local-glowing-color:0px 2px 4px rgba(0, 0, 0, 0.5),\n 0px 1px 6px rgba(0, 0, 0, 0.25), 0 0 0 3px hsla(0, 0%, 100%, 25%),\n 0 1px 1px 0 rgba(255, 255, 255, 0.12);--zonos--border:1px solid var(--zonos--primary-color)}.sc-zonos-stripe-input-h{margin:1px}.sc-zonos-stripe-input-h .zonos--label-wrapper.sc-zonos-stripe-input{position:relative;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;width:100%;background:var(--zonos--background-color);border-radius:var(--zonos--border-radius);border:var(--zonos--border);outline-offset:0;outline-width:2px;height:calc(var(--zonos-elements-size-xl) - 2px)}.sc-zonos-stripe-input-h .zonos--floated-input.sc-zonos-stripe-input{-webkit-box-sizing:border-box;box-sizing:border-box;position:relative;padding:0 16px;outline:none;-webkit-transition:var(--zonos-elements-transition);transition:var(--zonos-elements-transition);width:100%;border-radius:var(--zonos--border-radius);background:var(--zonos--background-color);border:var(--zonos--border);-ms-flex-order:2;order:2;font-weight:400;font-size:var(--zonos--font-size);color:var(--zonos-elements-text-color);height:auto}.sc-zonos-stripe-input-h .zonos--floated-input.sc-zonos-stripe-input .sc-zonos-stripe-input:-internal-autofill-selected{border-radius:var(--zonos-elements-radius-6) 0 0 var(--zonos-elements-radius-6)}.sc-zonos-stripe-input-h .zonos--floated-input.sc-zonos-stripe-input .sc-zonos-stripe-input:-internal-autofill-selected+label.sc-zonos-stripe-input+div.sc-zonos-stripe-input{background-color:#e8f0fe}.sc-zonos-stripe-input-h .zonos--floated-input.has-label.sc-zonos-stripe-input{padding:24px 4px 2px 16px}.sc-zonos-stripe-input-h .zonos--floated-input.has-label.has-input-prefix.sc-zonos-stripe-input{padding-left:0}.sc-zonos-stripe-input-h .zonos--floated-input.has-label.has-input-prefix.sc-zonos-stripe-input~.zonos--floated-label.sc-zonos-stripe-input label.sc-zonos-stripe-input{margin-left:0}.sc-zonos-stripe-input-h .zonos--floated-input.sc-zonos-stripe-input:not(.has-label)::-webkit-input-placeholder{opacity:var(--zonos-elements-opacity-disabled)}.sc-zonos-stripe-input-h .zonos--floated-input.sc-zonos-stripe-input:not(.has-label)::-moz-placeholder{opacity:var(--zonos-elements-opacity-disabled)}.sc-zonos-stripe-input-h .zonos--floated-input.sc-zonos-stripe-input:not(.has-label):-ms-input-placeholder{opacity:var(--zonos-elements-opacity-disabled)}.sc-zonos-stripe-input-h .zonos--floated-input.sc-zonos-stripe-input:not(.has-label)::-ms-input-placeholder{opacity:var(--zonos-elements-opacity-disabled)}.sc-zonos-stripe-input-h .zonos--floated-input.sc-zonos-stripe-input:not(.has-label)::placeholder{opacity:var(--zonos-elements-opacity-disabled)}.sc-zonos-stripe-input-h .zonos--floated-input.sc-zonos-stripe-input::-webkit-input-placeholder{-webkit-transition:var(--zonos-elements-transition);transition:var(--zonos-elements-transition);opacity:0}.sc-zonos-stripe-input-h .zonos--floated-input.sc-zonos-stripe-input::-moz-placeholder{-moz-transition:var(--zonos-elements-transition);transition:var(--zonos-elements-transition);opacity:0}.sc-zonos-stripe-input-h .zonos--floated-input.sc-zonos-stripe-input:-ms-input-placeholder{-ms-transition:var(--zonos-elements-transition);transition:var(--zonos-elements-transition);opacity:0}.sc-zonos-stripe-input-h .zonos--floated-input.sc-zonos-stripe-input::-ms-input-placeholder{-ms-transition:var(--zonos-elements-transition);transition:var(--zonos-elements-transition);opacity:0}.sc-zonos-stripe-input-h .zonos--floated-input.sc-zonos-stripe-input::placeholder{-webkit-transition:var(--zonos-elements-transition);transition:var(--zonos-elements-transition);opacity:0}.sc-zonos-stripe-input-h .zonos--floated-input.sc-zonos-stripe-input:focus{outline:none;border:var(--zonos--border)}.sc-zonos-stripe-input-h .zonos--floated-input.sc-zonos-stripe-input:focus~.zonos--floated-label.sc-zonos-stripe-input::after{-webkit-box-shadow:var(--zonos--glowing-color, var(--zonos--local-glowing-color));box-shadow:var(--zonos--glowing-color, var(--zonos--local-glowing-color))}.sc-zonos-stripe-input-h .zonos--floated-input.has-error.sc-zonos-stripe-input~.zonos--floated-label.sc-zonos-stripe-input::after{-webkit-box-shadow:0 0 0 2px #df1b41;box-shadow:0 0 0 2px #df1b41}.sc-zonos-stripe-input-h .zonos--floated-input.has-content.sc-zonos-stripe-input::-webkit-input-placeholder,.sc-zonos-stripe-input-h .zonos--floated-input.sc-zonos-stripe-input:focus::-webkit-input-placeholder{opacity:var(--zonos-elements-opacity-disabled)}.sc-zonos-stripe-input-h .zonos--floated-input.has-content.sc-zonos-stripe-input::-moz-placeholder,.sc-zonos-stripe-input-h .zonos--floated-input.sc-zonos-stripe-input:focus::-moz-placeholder{opacity:var(--zonos-elements-opacity-disabled)}.sc-zonos-stripe-input-h .zonos--floated-input.has-content.sc-zonos-stripe-input:-ms-input-placeholder,.sc-zonos-stripe-input-h .zonos--floated-input.sc-zonos-stripe-input:focus:-ms-input-placeholder{opacity:var(--zonos-elements-opacity-disabled)}.sc-zonos-stripe-input-h .zonos--floated-input.has-content.sc-zonos-stripe-input::-ms-input-placeholder,.sc-zonos-stripe-input-h .zonos--floated-input.sc-zonos-stripe-input:focus::-ms-input-placeholder{opacity:var(--zonos-elements-opacity-disabled)}.sc-zonos-stripe-input-h .zonos--floated-input.has-content.sc-zonos-stripe-input::placeholder,.sc-zonos-stripe-input-h .zonos--floated-input.sc-zonos-stripe-input:focus::placeholder{opacity:var(--zonos-elements-opacity-disabled)}.sc-zonos-stripe-input-h .zonos--floated-input.has-content.sc-zonos-stripe-input~.zonos--floated-label.sc-zonos-stripe-input label.sc-zonos-stripe-input,.sc-zonos-stripe-input-h .zonos--floated-input.sc-zonos-stripe-input:focus~.zonos--floated-label.sc-zonos-stripe-input label.sc-zonos-stripe-input{top:11px;-webkit-transform:scale(0.8);transform:scale(0.8)}.sc-zonos-stripe-input-h .zonos--floated-input.sc-zonos-stripe-input:-webkit-autofill,.sc-zonos-stripe-input-h .zonos--floated-input.sc-zonos-stripe-input:-moz-autofill{background-color:var(--zonos-elements-input-background);color:var(--zonos-elements-text-color)}.sc-zonos-stripe-input-h .zonos--floated-label.sc-zonos-stripe-input{display:block;max-height:0;pointer-events:none;-ms-flex-order:1;order:1}.sc-zonos-stripe-input-h .zonos--floated-label.sc-zonos-stripe-input label.sc-zonos-stripe-input{color:var(--zonos-elements-gray-800);position:absolute;font-size:16px;line-height:16px;display:inline-block;-webkit-filter:blur(0);filter:blur(0);-webkit-transform-origin:left top;transform-origin:left top;-webkit-transition:var(--zonos-elements-transition);transition:var(--zonos-elements-transition);margin-left:16px;top:calc(50% - 8px);z-index:1}.sc-zonos-stripe-input-h .zonos--floated-label.sc-zonos-stripe-input::after{content:"";position:absolute;left:0;right:0;top:0;bottom:0;border-radius:var(--zonos--border-radius)}.sc-zonos-stripe-input-h .disabled.sc-zonos-stripe-input .zonos--floated-label.sc-zonos-stripe-input{pointer-events:inherit}.sc-zonos-stripe-input-h .disabled.sc-zonos-stripe-input .zonos--floated-label.sc-zonos-stripe-input::after{cursor:not-allowed;z-index:1}.dark.sc-zonos-stripe-input-h .zonos--label-wrapper.sc-zonos-stripe-input{background:#30313d}';var ZonosStripeInputStyle0=zonosStripeInputCss;var inputId=0;var ZonosStripeInput=function(){function o(o){registerInstance(this,o);this.inputChange=createEvent(this,"inputChange",7);this.inheritedAttributes={};this.inputId="zonos--input-".concat(++inputId);this.inputValue="";this.isDisabled=false;this.isError=false;this.error="";this.inputPlaceholder="";this.value="";this.required=false;this.internalValue=this.inputValue}o.prototype.onInputValueChange=function(o){this.internalValue=o;this.inputChange.emit(o);this.value=o};o.prototype.onValueChange=function(o){this.internalValue=o};o.prototype.componentWillLoad=function(){this.inheritedAttributes=Object.assign(Object.assign({},inheritAriaAttributes(this.el)),inheritAttributes(this.el,["tabindex","title","data-form-type","dir"]))};o.prototype.render=function(){var o=this;var s=this.overridePrimaryColor||zonosStore.appearance.colorPrimary;var t=this.overrideSecondaryColor||zonosStore.appearance.colorSecondary;var n=window.Zonos.isCollect||window.Zonos.isInvoice?zonosStore.appearance.theme==="DARK":s&&isDarkColor(s);var i=zonosStore.appearance.fontSizeInputValue||16;return h(Host,{key:"b527df7c911ed1d090805f89793b1db0d2e60935",class:classes(["zonos--input zonos--elements",n&&"dark",(this.isError||!!this.error)&&"has-error"]),"data-theme":n?"DARK":"LIGHT",style:{"--zonos--border-radius":getBorderRadius(),"--zonos--font-family":zonosStoreFontFamily(),"--zonos--font-size":"".concat(i,"px"),"--zonos--primary-color":t}},h("div",{key:"34638283e1cc53399e0c06939698ab565cb45898",class:classes(["zonos--label-wrapper",this.isDisabled&&"disabled"])},h("input",Object.assign({key:"3c6786e238870a22df24226b849df8c50285066f"},this.inheritedAttributes,{autoComplete:this.autoComplete,class:classes(["zonos--floated-input",!!this.inputLabel&&"has-label",this.internalValue&&"has-content",(this.isError||!!this.error)&&"has-error"]),disabled:this.isDisabled,id:this.inputId,name:this.name,onInput:function(s){var t=s.target;o.inputChange.emit(t.value);o.el.inputValue=t.value;o.el.dispatchEvent(new Event("change"))},placeholder:this.inputPlaceholder||"",required:this.required,type:"text",value:this.internalValue})),h("div",{key:"32ef73f611becbc961b594a22976651eeb2547cd",class:"zonos--floated-label"},h("label",{key:"7ef5e3be28b12f1d17f20cd6698ccb877b74a28b",htmlFor:this.inputId},this.inputLabel))),this.error&&h("zonos-text",{key:"5d0e354d1ff22b9d0d9ab92a571029ce3b06be9b",textColor:"red-600",type:"caption"},this.error))};Object.defineProperty(o.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(o,"watchers",{get:function(){return{inputValue:["onInputValueChange"],value:["onValueChange"]}},enumerable:false,configurable:true});return o}();ZonosStripeInput.style=ZonosStripeInputStyle0;export{ZonosStripeInput as zonos_stripe_input};
1
+ import{r as registerInstance,d as createEvent,h,a as Host,g as getElement}from"./index-_lt63o7c.js";import{z as zonosStore,a as zonosStoreFontFamily}from"./zonosStore-DrIOAz4M.js";import{i as inheritAriaAttributes,a as inheritAttributes}from"./helpers-DJIdCwJ5.js";import{c as classes}from"./classes-BJHSB96f.js";import{g as getBorderRadius}from"./getBorderRadius-HwG64EKM.js";import{i as isDarkColor}from"./isDarkColor-YdrG78th.js";import"./VarianceTest-BJmZPrZl.js";var zonosStripeInputCss=function(){return'.sc-zonos-stripe-input-h{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-stripe-input-h *.sc-zonos-stripe-input{font-family:var(--zonos--font-family, Inter), Inter}.sc-zonos-stripe-input-h img.sc-zonos-stripe-input{max-width:100%}.sc-zonos-stripe-input-h dl.sc-zonos-stripe-input,.sc-zonos-stripe-input-h dd.sc-zonos-stripe-input,.sc-zonos-stripe-input-h h1.sc-zonos-stripe-input,.sc-zonos-stripe-input-h h2.sc-zonos-stripe-input,.sc-zonos-stripe-input-h h3.sc-zonos-stripe-input,.sc-zonos-stripe-input-h h4.sc-zonos-stripe-input,.sc-zonos-stripe-input-h h5.sc-zonos-stripe-input,.sc-zonos-stripe-input-h h6.sc-zonos-stripe-input,.sc-zonos-stripe-input-h hr.sc-zonos-stripe-input,.sc-zonos-stripe-input-h figure.sc-zonos-stripe-input,.sc-zonos-stripe-input-h p.sc-zonos-stripe-input,.sc-zonos-stripe-input-h pre.sc-zonos-stripe-input{margin:0}.sc-zonos-stripe-input-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-stripe-input-h{--zonos--background-color:#f1f1f1;--zonos--local-glowing-color:0 0 0 3px hsla(0, 0%, 100%, 25%), 0 0 0 1px var(--zonos--primary-color);--zonos--border:1px solid #e8e8e8}.dark.sc-zonos-stripe-input-h{color-scheme:dark;--zonos--background-color:#30313d;--zonos--local-glowing-color:0px 2px 4px rgba(0, 0, 0, 0.5), 0px 1px 6px rgba(0, 0, 0, 0.25), 0 0 0 3px hsla(0, 0%, 100%, 25%), 0 1px 1px 0 rgba(255, 255, 255, 0.12);--zonos--border:1px solid var(--zonos--primary-color)}.sc-zonos-stripe-input-h{margin:1px}.sc-zonos-stripe-input-h .zonos--label-wrapper.sc-zonos-stripe-input{position:relative;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;width:100%;background:var(--zonos--background-color);border-radius:var(--zonos--border-radius);border:var(--zonos--border);outline-offset:0;outline-width:2px;height:calc(var(--zonos-elements-size-xl) - 2px)}.sc-zonos-stripe-input-h .zonos--floated-input.sc-zonos-stripe-input{-webkit-box-sizing:border-box;box-sizing:border-box;position:relative;padding:0 16px;outline:none;-webkit-transition:var(--zonos-elements-transition);transition:var(--zonos-elements-transition);width:100%;border-radius:var(--zonos--border-radius);background:var(--zonos--background-color);border:var(--zonos--border);-ms-flex-order:2;order:2;font-weight:400;font-size:var(--zonos--font-size);color:var(--zonos-elements-text-color);height:auto}.sc-zonos-stripe-input-h .zonos--floated-input.sc-zonos-stripe-input .sc-zonos-stripe-input:-internal-autofill-selected{border-radius:var(--zonos-elements-radius-6) 0 0 var(--zonos-elements-radius-6)}.sc-zonos-stripe-input-h .zonos--floated-input.sc-zonos-stripe-input .sc-zonos-stripe-input:-internal-autofill-selected+label.sc-zonos-stripe-input+div.sc-zonos-stripe-input{background-color:#e8f0fe}.sc-zonos-stripe-input-h .zonos--floated-input.has-label.sc-zonos-stripe-input{padding:24px 4px 2px 16px}.sc-zonos-stripe-input-h .zonos--floated-input.has-label.has-input-prefix.sc-zonos-stripe-input{padding-left:0}.sc-zonos-stripe-input-h .zonos--floated-input.has-label.has-input-prefix.sc-zonos-stripe-input~.zonos--floated-label.sc-zonos-stripe-input label.sc-zonos-stripe-input{margin-left:0}.sc-zonos-stripe-input-h .zonos--floated-input.sc-zonos-stripe-input:not(.has-label)::-webkit-input-placeholder{opacity:var(--zonos-elements-opacity-disabled)}.sc-zonos-stripe-input-h .zonos--floated-input.sc-zonos-stripe-input:not(.has-label)::-moz-placeholder{opacity:var(--zonos-elements-opacity-disabled)}.sc-zonos-stripe-input-h .zonos--floated-input.sc-zonos-stripe-input:not(.has-label):-ms-input-placeholder{opacity:var(--zonos-elements-opacity-disabled)}.sc-zonos-stripe-input-h .zonos--floated-input.sc-zonos-stripe-input:not(.has-label)::-ms-input-placeholder{opacity:var(--zonos-elements-opacity-disabled)}.sc-zonos-stripe-input-h .zonos--floated-input.sc-zonos-stripe-input:not(.has-label)::placeholder{opacity:var(--zonos-elements-opacity-disabled)}.sc-zonos-stripe-input-h .zonos--floated-input.sc-zonos-stripe-input::-webkit-input-placeholder{-webkit-transition:var(--zonos-elements-transition);transition:var(--zonos-elements-transition);opacity:0}.sc-zonos-stripe-input-h .zonos--floated-input.sc-zonos-stripe-input::-moz-placeholder{-moz-transition:var(--zonos-elements-transition);transition:var(--zonos-elements-transition);opacity:0}.sc-zonos-stripe-input-h .zonos--floated-input.sc-zonos-stripe-input:-ms-input-placeholder{-ms-transition:var(--zonos-elements-transition);transition:var(--zonos-elements-transition);opacity:0}.sc-zonos-stripe-input-h .zonos--floated-input.sc-zonos-stripe-input::-ms-input-placeholder{-ms-transition:var(--zonos-elements-transition);transition:var(--zonos-elements-transition);opacity:0}.sc-zonos-stripe-input-h .zonos--floated-input.sc-zonos-stripe-input::placeholder{-webkit-transition:var(--zonos-elements-transition);transition:var(--zonos-elements-transition);opacity:0}.sc-zonos-stripe-input-h .zonos--floated-input.sc-zonos-stripe-input:focus{outline:none;border:var(--zonos--border)}.sc-zonos-stripe-input-h .zonos--floated-input.sc-zonos-stripe-input:focus~.zonos--floated-label.sc-zonos-stripe-input::after{-webkit-box-shadow:var(--zonos--glowing-color, var(--zonos--local-glowing-color));box-shadow:var(--zonos--glowing-color, var(--zonos--local-glowing-color))}.sc-zonos-stripe-input-h .zonos--floated-input.has-error.sc-zonos-stripe-input~.zonos--floated-label.sc-zonos-stripe-input::after{-webkit-box-shadow:0 0 0 2px #df1b41;box-shadow:0 0 0 2px #df1b41}.sc-zonos-stripe-input-h .zonos--floated-input.has-content.sc-zonos-stripe-input::-webkit-input-placeholder,.sc-zonos-stripe-input-h .zonos--floated-input.sc-zonos-stripe-input:focus::-webkit-input-placeholder{opacity:var(--zonos-elements-opacity-disabled)}.sc-zonos-stripe-input-h .zonos--floated-input.has-content.sc-zonos-stripe-input::-moz-placeholder,.sc-zonos-stripe-input-h .zonos--floated-input.sc-zonos-stripe-input:focus::-moz-placeholder{opacity:var(--zonos-elements-opacity-disabled)}.sc-zonos-stripe-input-h .zonos--floated-input.has-content.sc-zonos-stripe-input:-ms-input-placeholder,.sc-zonos-stripe-input-h .zonos--floated-input.sc-zonos-stripe-input:focus:-ms-input-placeholder{opacity:var(--zonos-elements-opacity-disabled)}.sc-zonos-stripe-input-h .zonos--floated-input.has-content.sc-zonos-stripe-input::-ms-input-placeholder,.sc-zonos-stripe-input-h .zonos--floated-input.sc-zonos-stripe-input:focus::-ms-input-placeholder{opacity:var(--zonos-elements-opacity-disabled)}.sc-zonos-stripe-input-h .zonos--floated-input.has-content.sc-zonos-stripe-input::placeholder,.sc-zonos-stripe-input-h .zonos--floated-input.sc-zonos-stripe-input:focus::placeholder{opacity:var(--zonos-elements-opacity-disabled)}.sc-zonos-stripe-input-h .zonos--floated-input.has-content.sc-zonos-stripe-input~.zonos--floated-label.sc-zonos-stripe-input label.sc-zonos-stripe-input,.sc-zonos-stripe-input-h .zonos--floated-input.sc-zonos-stripe-input:focus~.zonos--floated-label.sc-zonos-stripe-input label.sc-zonos-stripe-input{top:11px;-webkit-transform:scale(0.8);transform:scale(0.8)}.sc-zonos-stripe-input-h .zonos--floated-input.sc-zonos-stripe-input:-webkit-autofill,.sc-zonos-stripe-input-h .zonos--floated-input.sc-zonos-stripe-input:-moz-autofill{background-color:var(--zonos-elements-input-background);color:var(--zonos-elements-text-color)}.sc-zonos-stripe-input-h .zonos--floated-label.sc-zonos-stripe-input{display:block;max-height:0;pointer-events:none;-ms-flex-order:1;order:1}.sc-zonos-stripe-input-h .zonos--floated-label.sc-zonos-stripe-input label.sc-zonos-stripe-input{color:var(--zonos-elements-gray-800);position:absolute;font-size:16px;line-height:16px;display:inline-block;-webkit-filter:blur(0);filter:blur(0);-webkit-transform-origin:left top;transform-origin:left top;-webkit-transition:var(--zonos-elements-transition);transition:var(--zonos-elements-transition);margin-left:16px;top:calc(50% - 8px);z-index:1}.sc-zonos-stripe-input-h .zonos--floated-label.sc-zonos-stripe-input::after{content:"";position:absolute;left:0;right:0;top:0;bottom:0;border-radius:var(--zonos--border-radius)}.sc-zonos-stripe-input-h .disabled.sc-zonos-stripe-input .zonos--floated-label.sc-zonos-stripe-input{pointer-events:inherit}.sc-zonos-stripe-input-h .disabled.sc-zonos-stripe-input .zonos--floated-label.sc-zonos-stripe-input::after{cursor:not-allowed;z-index:1}.dark.sc-zonos-stripe-input-h .zonos--label-wrapper.sc-zonos-stripe-input{background:#30313d}'};var inputId=0;var ZonosStripeInput=/** @class */function(){function o(o){registerInstance(this,o);this.inputChange=createEvent(this,"inputChange",7);
2
+ /**
3
+ * Inherited attributes from the host element
4
+ */this.inheritedAttributes={};this.inputId="zonos--input-".concat(++inputId);
5
+ /**
6
+ * Value of the stripeInput
7
+ */this.inputValue="";
8
+ /**
9
+ * Disables the input
10
+ */this.isDisabled=false;
11
+ /**
12
+ * Error state of the input
13
+ */this.isError=false;
14
+ /**
15
+ * Error message of the input
16
+ */this.error="";
17
+ /**
18
+ * Placeholder for the input
19
+ */this.inputPlaceholder="";
20
+ /**
21
+ * The value of the input.
22
+ */this.value="";
23
+ /**
24
+ * Whether the input is required
25
+ */this.required=false;this.internalValue=this.inputValue}o.prototype.onInputValueChange=function(o){this.internalValue=o;this.inputChange.emit(o);this.value=o};o.prototype.onValueChange=function(o){this.internalValue=o};o.prototype.componentWillLoad=function(){this.inheritedAttributes=Object.assign(Object.assign({},inheritAriaAttributes(this.el)),inheritAttributes(this.el,["tabindex","title","data-form-type","dir"]))};o.prototype.render=function(){var o=this;var s=this.overridePrimaryColor||zonosStore.appearance.colorPrimary;var t=this.overrideSecondaryColor||zonosStore.appearance.colorSecondary;
26
+ // Always use theme from appearance settings if it's collect
27
+ var n=window.Zonos.isCollect||window.Zonos.isInvoice?zonosStore.appearance.theme==="DARK":s&&isDarkColor(s);var i=zonosStore.appearance.fontSizeInputValue||16;return h(Host,{key:"b527df7c911ed1d090805f89793b1db0d2e60935",class:classes(["zonos--input zonos--elements",n&&"dark",(this.isError||!!this.error)&&"has-error"]),"data-theme":n?"DARK":"LIGHT",style:{"--zonos--border-radius":getBorderRadius(),"--zonos--font-family":zonosStoreFontFamily(),"--zonos--font-size":"".concat(i,"px"),"--zonos--primary-color":t}},h("div",{key:"34638283e1cc53399e0c06939698ab565cb45898",class:classes(["zonos--label-wrapper",this.isDisabled&&"disabled"])},h("input",Object.assign({key:"3c6786e238870a22df24226b849df8c50285066f"},this.inheritedAttributes,{autoComplete:this.autoComplete,class:classes(["zonos--floated-input",!!this.inputLabel&&"has-label",this.internalValue&&"has-content",(this.isError||!!this.error)&&"has-error"]),disabled:this.isDisabled,id:this.inputId,name:this.name,onInput:function(s){var t=s.target;o.inputChange.emit(t.value);o.el.inputValue=t.value;o.el.dispatchEvent(new Event("change"))},placeholder:this.inputPlaceholder||"",required:this.required,type:"text",value:this.internalValue})),h("div",{key:"32ef73f611becbc961b594a22976651eeb2547cd",class:"zonos--floated-label"},h("label",{key:"7ef5e3be28b12f1d17f20cd6698ccb877b74a28b",htmlFor:this.inputId},this.inputLabel))),this.error&&h("zonos-text",{key:"5d0e354d1ff22b9d0d9ab92a571029ce3b06be9b",textColor:"red-600",type:"caption"},this.error))};Object.defineProperty(o.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(o,"watchers",{get:function(){return{inputValue:[{onInputValueChange:0}],value:[{onValueChange:0}]}},enumerable:false,configurable:true});return o}();ZonosStripeInput.style=zonosStripeInputCss();export{ZonosStripeInput as zonos_stripe_input};