@zonos/elements 1.3.265 → 1.3.267

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 (264) hide show
  1. package/dist/cjs/{cart-c325b9e4.js → cart-ed2de167.js} +1 -1
  2. package/dist/cjs/getContrastColor-ce80dbe7.js +54 -0
  3. package/dist/cjs/{hasInclusivePrice-40358cb1.js → hasInclusivePrice-bf31fbdb.js} +1 -1
  4. package/dist/cjs/index.cjs.js +7 -7
  5. package/dist/cjs/{invoice-ac9414df.js → invoice-542c23e7.js} +2 -2
  6. package/dist/cjs/{isCollectMobileTablet-92fa5e8f.js → isCollectMobileTablet-fe8149a5.js} +2 -2
  7. package/dist/cjs/{localization-06cc0379.js → localization-66d378ab.js} +52 -1
  8. package/dist/cjs/{paypal-b52e1f24.js → paypal-d8282578.js} +2 -2
  9. package/dist/cjs/{placeTestOrder-d93a6f2b.js → placeTestOrder-0a4b9dd7.js} +2 -2
  10. package/dist/cjs/{renderCheckoutCurrency-1f521ea7.js → renderCheckoutCurrency-ac9083d9.js} +2 -2
  11. package/dist/cjs/zonos-address-display_8.cjs.entry.js +19 -19
  12. package/dist/cjs/zonos-address_4.cjs.entry.js +6 -6
  13. package/dist/cjs/zonos-badge.cjs.entry.js +3 -3
  14. package/dist/cjs/zonos-button_3.cjs.entry.js +3 -3
  15. package/dist/cjs/zonos-card_5.cjs.entry.js +7 -7
  16. package/dist/cjs/zonos-cart-items_12.cjs.entry.js +20 -20
  17. package/dist/cjs/zonos-checkbox_2.cjs.entry.js +3 -3
  18. package/dist/cjs/zonos-checkout.cjs.entry.js +3 -3
  19. package/dist/cjs/zonos-collapse.cjs.entry.js +2 -2
  20. package/dist/cjs/zonos-collect-cart-items_3.cjs.entry.js +6 -6
  21. package/dist/cjs/zonos-collect-finish_6.cjs.entry.js +19 -19
  22. package/dist/cjs/zonos-collect.cjs.entry.js +4 -4
  23. package/dist/cjs/zonos-controller.cjs.entry.js +122 -3
  24. package/dist/cjs/zonos-country-flag.cjs.entry.js +1 -1
  25. package/dist/cjs/zonos-country-select_4.cjs.entry.js +6 -6
  26. package/dist/cjs/zonos-hello-dialog.cjs.entry.js +2 -2
  27. package/dist/cjs/zonos-hello.cjs.entry.js +2 -2
  28. package/dist/cjs/zonos-input.cjs.entry.js +4 -4
  29. package/dist/cjs/zonos-invoice-cart-items_2.cjs.entry.js +8 -8
  30. package/dist/cjs/zonos-invoice-finish_5.cjs.entry.js +14 -14
  31. package/dist/cjs/zonos-invoice.cjs.entry.js +4 -4
  32. package/dist/cjs/zonos-language-select_2.cjs.entry.js +5 -5
  33. package/dist/cjs/zonos-link.cjs.entry.js +1 -1
  34. package/dist/cjs/zonos-logo.cjs.entry.js +2 -2
  35. package/dist/cjs/zonos-shipping-rich-radio.cjs.entry.js +1 -1
  36. package/dist/cjs/zonos-store-credit.cjs.entry.js +3 -3
  37. package/dist/cjs/zonos-stripe-input.cjs.entry.js +4 -4
  38. package/dist/collection/collection-manifest.json +1 -1
  39. package/dist/collection/components/checkout/zonos-checkout/zonos-address-update-dialog/zonos-address-form/zonos-address-form.js +4 -4
  40. package/dist/collection/components/checkout/zonos-checkout/zonos-cart-items/zonos-cart-items.js +1 -1
  41. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-finish/zonos-checkout-finish.js +4 -4
  42. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-footer/zonos-checkout-footer.js +2 -2
  43. package/dist/collection/components/checkout/zonos-collect/zonos-collect-cart-items/zonos-collect-cart-items.js +1 -1
  44. package/dist/collection/components/checkout/zonos-collect/zonos-collect-finish/zonos-collect-finish.js +2 -2
  45. package/dist/collection/components/checkout/zonos-collect/zonos-collect-footer/zonos-collect-footer.js +3 -3
  46. package/dist/collection/components/checkout/zonos-collect/zonos-collect-review/zonos-collect-review.js +3 -3
  47. package/dist/collection/components/checkout/zonos-collect/zonos-collect-subtotal/zonos-collect-subtotal.js +5 -5
  48. package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-cart-items/zonos-invoice-cart-items.js +2 -2
  49. package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-finish/zonos-invoice-finish.js +2 -2
  50. package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-footer/zonos-invoice-footer.js +3 -3
  51. package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-review/zonos-invoice-review.js +3 -3
  52. package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-subtotal/zonos-invoice-subtotal.js +2 -2
  53. package/dist/collection/components/common/zonos-badge/zonos-badge.js +3 -3
  54. package/dist/collection/components/common/zonos-button/zonos-button.js +3 -3
  55. package/dist/collection/components/common/zonos-card/zonos-card.js +4 -4
  56. package/dist/collection/components/common/zonos-checkbox/zonos-checkbox.js +3 -3
  57. package/dist/collection/components/common/zonos-checkout-progress-tabs/zonos-checkout-progress-tabs.js +3 -3
  58. package/dist/collection/components/common/zonos-collapse/zonos-collapse.js +2 -2
  59. package/dist/collection/components/common/zonos-confirm-dialog/zonos-confirm-dialog.js +3 -3
  60. package/dist/collection/components/common/zonos-country-select/zonos-country-select.js +3 -3
  61. package/dist/collection/components/common/zonos-custom-message/zonos-custom-message.js +2 -2
  62. package/dist/collection/components/common/zonos-dialog/zonos-dialog.js +3 -3
  63. package/dist/collection/components/common/zonos-h-stack/zonos-h-stack.js +2 -2
  64. package/dist/collection/components/common/zonos-input/zonos-input.js +4 -4
  65. package/dist/collection/components/common/zonos-language-select/zonos-language-select.js +2 -2
  66. package/dist/collection/components/common/zonos-link/zonos-link.js +1 -1
  67. package/dist/collection/components/common/zonos-loading-overlay/zonos-loading-overlay.js +1 -1
  68. package/dist/collection/components/common/zonos-logo/zonos-logo.js +2 -2
  69. package/dist/collection/components/common/zonos-rest-state/zonos-rest-state.js +3 -3
  70. package/dist/collection/components/common/zonos-select-dialog-header/zonos-select-dialog-header.js +2 -2
  71. package/dist/collection/components/common/zonos-skeleton/zonos-skeleton.js +1 -1
  72. package/dist/collection/components/common/zonos-stripe-input/zonos-stripe-input.js +4 -4
  73. package/dist/collection/components/common/zonos-stripe-phone-input/zonos-stripe-phone-input.js +6 -6
  74. package/dist/collection/components/common/zonos-stripe-select/zonos-stripe-select.js +8 -7
  75. package/dist/collection/components/hello/zonos-hello/zonos-hello.css +2 -0
  76. package/dist/collection/components/main/zonos-controller.js +6 -2
  77. package/dist/collection/components/store/hello/localization.js +6 -0
  78. package/dist/collection/components/utils/checkout/injectDomesticElementHideStyle.js +116 -0
  79. package/dist/collection/components/utils/getContrastColor.js +27 -10
  80. package/dist/collection/components/utils/hello/currencyConversion/defaultCurrencyConverter.js +1 -1
  81. package/dist/collection/types/generated/graphql.internal.types.js +287 -73
  82. package/dist/collection/utils/toggleBigcommerceNativeCurrencySelector.js +48 -0
  83. package/dist/esm/{cart-0625a766.js → cart-49082718.js} +1 -1
  84. package/dist/esm/getContrastColor-0aa643c1.js +52 -0
  85. package/dist/esm/{hasInclusivePrice-afc0dd6e.js → hasInclusivePrice-2323d514.js} +1 -1
  86. package/dist/esm/index.js +7 -7
  87. package/dist/esm/{invoice-0daa7f74.js → invoice-16c688e7.js} +2 -2
  88. package/dist/esm/{isCollectMobileTablet-8d3fb5f4.js → isCollectMobileTablet-910aea2e.js} +2 -2
  89. package/dist/esm/{localization-ee06df70.js → localization-33a9f7ff.js} +52 -1
  90. package/dist/esm/{paypal-78c3572c.js → paypal-2e9aa4ba.js} +2 -2
  91. package/dist/esm/{placeTestOrder-18de7b6f.js → placeTestOrder-35c9b460.js} +2 -2
  92. package/dist/esm/{renderCheckoutCurrency-ba1702db.js → renderCheckoutCurrency-b84a6da7.js} +2 -2
  93. package/dist/esm/zonos-address-display_8.entry.js +19 -19
  94. package/dist/esm/zonos-address_4.entry.js +6 -6
  95. package/dist/esm/zonos-badge.entry.js +3 -3
  96. package/dist/esm/zonos-button_3.entry.js +3 -3
  97. package/dist/esm/zonos-card_5.entry.js +7 -7
  98. package/dist/esm/zonos-cart-items_12.entry.js +20 -20
  99. package/dist/esm/zonos-checkbox_2.entry.js +3 -3
  100. package/dist/esm/zonos-checkout.entry.js +3 -3
  101. package/dist/esm/zonos-collapse.entry.js +2 -2
  102. package/dist/esm/zonos-collect-cart-items_3.entry.js +6 -6
  103. package/dist/esm/zonos-collect-finish_6.entry.js +19 -19
  104. package/dist/esm/zonos-collect.entry.js +4 -4
  105. package/dist/esm/zonos-controller.entry.js +122 -3
  106. package/dist/esm/zonos-country-flag.entry.js +1 -1
  107. package/dist/esm/zonos-country-select_4.entry.js +6 -6
  108. package/dist/esm/zonos-hello-dialog.entry.js +2 -2
  109. package/dist/esm/zonos-hello.entry.js +2 -2
  110. package/dist/esm/zonos-input.entry.js +4 -4
  111. package/dist/esm/zonos-invoice-cart-items_2.entry.js +8 -8
  112. package/dist/esm/zonos-invoice-finish_5.entry.js +14 -14
  113. package/dist/esm/zonos-invoice.entry.js +4 -4
  114. package/dist/esm/zonos-language-select_2.entry.js +5 -5
  115. package/dist/esm/zonos-link.entry.js +1 -1
  116. package/dist/esm/zonos-logo.entry.js +2 -2
  117. package/dist/esm/zonos-shipping-rich-radio.entry.js +1 -1
  118. package/dist/esm/zonos-store-credit.entry.js +3 -3
  119. package/dist/esm/zonos-stripe-input.entry.js +4 -4
  120. package/dist/esm-es5/{cart-0625a766.js → cart-49082718.js} +1 -1
  121. package/dist/esm-es5/getContrastColor-0aa643c1.js +1 -0
  122. package/dist/esm-es5/{hasInclusivePrice-afc0dd6e.js → hasInclusivePrice-2323d514.js} +1 -1
  123. package/dist/esm-es5/index.js +1 -1
  124. package/dist/esm-es5/{invoice-0daa7f74.js → invoice-16c688e7.js} +1 -1
  125. package/dist/esm-es5/{isCollectMobileTablet-8d3fb5f4.js → isCollectMobileTablet-910aea2e.js} +1 -1
  126. package/dist/esm-es5/{localization-ee06df70.js → localization-33a9f7ff.js} +1 -1
  127. package/dist/esm-es5/{paypal-78c3572c.js → paypal-2e9aa4ba.js} +1 -1
  128. package/dist/esm-es5/{placeTestOrder-18de7b6f.js → placeTestOrder-35c9b460.js} +1 -1
  129. package/dist/esm-es5/{renderCheckoutCurrency-ba1702db.js → renderCheckoutCurrency-b84a6da7.js} +1 -1
  130. package/dist/esm-es5/zonos-address-display_8.entry.js +1 -1
  131. package/dist/esm-es5/zonos-address_4.entry.js +1 -1
  132. package/dist/esm-es5/zonos-badge.entry.js +1 -1
  133. package/dist/esm-es5/zonos-button_3.entry.js +1 -1
  134. package/dist/esm-es5/zonos-card_5.entry.js +1 -1
  135. package/dist/esm-es5/zonos-cart-items_12.entry.js +1 -1
  136. package/dist/esm-es5/zonos-checkbox_2.entry.js +1 -1
  137. package/dist/esm-es5/zonos-checkout.entry.js +1 -1
  138. package/dist/esm-es5/zonos-collapse.entry.js +1 -1
  139. package/dist/esm-es5/zonos-collect-cart-items_3.entry.js +1 -1
  140. package/dist/esm-es5/zonos-collect-finish_6.entry.js +1 -1
  141. package/dist/esm-es5/zonos-collect.entry.js +1 -1
  142. package/dist/esm-es5/zonos-controller.entry.js +1 -1
  143. package/dist/esm-es5/zonos-country-flag.entry.js +1 -1
  144. package/dist/esm-es5/zonos-country-select_4.entry.js +1 -1
  145. package/dist/esm-es5/zonos-hello-dialog.entry.js +1 -1
  146. package/dist/esm-es5/zonos-hello.entry.js +1 -1
  147. package/dist/esm-es5/zonos-input.entry.js +1 -1
  148. package/dist/esm-es5/zonos-invoice-cart-items_2.entry.js +1 -1
  149. package/dist/esm-es5/zonos-invoice-finish_5.entry.js +1 -1
  150. package/dist/esm-es5/zonos-invoice.entry.js +1 -1
  151. package/dist/esm-es5/zonos-language-select_2.entry.js +1 -1
  152. package/dist/esm-es5/zonos-link.entry.js +1 -1
  153. package/dist/esm-es5/zonos-logo.entry.js +1 -1
  154. package/dist/esm-es5/zonos-shipping-rich-radio.entry.js +1 -1
  155. package/dist/esm-es5/zonos-store-credit.entry.js +1 -1
  156. package/dist/esm-es5/zonos-stripe-input.entry.js +1 -1
  157. package/dist/scripts/index.d.ts +38 -13
  158. package/dist/scripts/index.js +1 -1
  159. package/dist/scripts/loadZonos.js +1 -1
  160. package/dist/scripts/zonos.js +1 -1
  161. package/dist/types/components/common/zonos-stripe-select/zonos-stripe-select.d.ts +1 -2
  162. package/dist/types/components/utils/api/getLocaleMessages.d.ts +1 -1
  163. package/dist/types/components/utils/checkout/injectDomesticElementHideStyle.d.ts +18 -0
  164. package/dist/types/components.d.ts +2 -0
  165. package/dist/types/scripts/cart/_setupCartDataWithSettings.d.ts +14 -13
  166. package/dist/types/types/checkout/CheckoutConfig.d.ts +9 -0
  167. package/dist/types/types/generated/graphql.frontend.types.d.ts +1 -1
  168. package/dist/types/types/generated/graphql.frontend.types.ts +1 -1
  169. package/dist/types/types/generated/graphql.internal.types.d.ts +341 -106
  170. package/dist/types/types/generated/graphql.internal.types.ts +419 -141
  171. package/dist/types/types/utils/ZonosSettings.d.ts +9 -0
  172. package/dist/types/utils/toggleBigcommerceNativeCurrencySelector.d.ts +17 -0
  173. package/dist/zonos-elements/index.esm.js +1 -1
  174. package/dist/zonos-elements/{p-41f2e301.entry.js → p-01497a20.entry.js} +1 -1
  175. package/dist/zonos-elements/p-029be4a8.entry.js +1 -0
  176. package/dist/zonos-elements/{p-72058aac.system.entry.js → p-034ab928.system.entry.js} +1 -1
  177. package/dist/zonos-elements/{p-b32cd0c5.system.js → p-07a76716.system.js} +1 -1
  178. package/dist/zonos-elements/{p-e89a411c.system.entry.js → p-087520f2.system.entry.js} +1 -1
  179. package/dist/zonos-elements/{p-e6cc5a25.system.entry.js → p-0b46f3bd.system.entry.js} +1 -1
  180. package/dist/zonos-elements/{p-d1ff24f5.entry.js → p-0e8c4a29.entry.js} +1 -1
  181. package/dist/zonos-elements/{p-eaa79ed8.entry.js → p-0ed70279.entry.js} +1 -1
  182. package/dist/zonos-elements/{p-407b49f1.system.entry.js → p-1325bbd6.system.entry.js} +1 -1
  183. package/dist/zonos-elements/{p-f4f71ae4.system.js → p-175c04a4.system.js} +1 -1
  184. package/dist/zonos-elements/{p-34dc7755.entry.js → p-180d3e3d.entry.js} +1 -1
  185. package/dist/zonos-elements/{p-0529a06b.system.entry.js → p-1957af5a.system.entry.js} +1 -1
  186. package/dist/zonos-elements/{p-ac54de99.entry.js → p-1ec9b3b0.entry.js} +1 -1
  187. package/dist/zonos-elements/{p-d2b91bb9.entry.js → p-1f256673.entry.js} +1 -1
  188. package/dist/zonos-elements/{p-4477556a.system.entry.js → p-22ba60f6.system.entry.js} +1 -1
  189. package/dist/zonos-elements/{p-32ecece3.entry.js → p-26c85188.entry.js} +1 -1
  190. package/dist/zonos-elements/{p-cc481c69.entry.js → p-27061873.entry.js} +1 -1
  191. package/dist/zonos-elements/{p-59aa5785.entry.js → p-28e2ac3b.entry.js} +1 -1
  192. package/dist/zonos-elements/p-29b60bf3.system.js +1 -1
  193. package/dist/zonos-elements/{p-8a21ed2d.entry.js → p-2a6be4a5.entry.js} +1 -1
  194. package/dist/zonos-elements/{p-26374593.system.entry.js → p-2a8fcb71.system.entry.js} +1 -1
  195. package/dist/zonos-elements/p-2c854197.system.entry.js +1 -0
  196. package/dist/zonos-elements/{p-a054c5eb.system.js → p-311ba000.system.js} +1 -1
  197. package/dist/zonos-elements/{p-aaf9d8a4.system.entry.js → p-3516340a.system.entry.js} +1 -1
  198. package/dist/zonos-elements/{p-8753cb36.system.js → p-3b1b3598.system.js} +1 -1
  199. package/dist/zonos-elements/p-40284821.system.js +1 -0
  200. package/dist/zonos-elements/p-458df669.js +1 -0
  201. package/dist/zonos-elements/{p-66edcaa4.entry.js → p-46071125.entry.js} +1 -1
  202. package/dist/zonos-elements/{p-59e16c6f.system.js → p-4f718ef9.system.js} +1 -1
  203. package/dist/zonos-elements/{p-3a23ec5f.system.entry.js → p-55fb4ea3.system.entry.js} +1 -1
  204. package/dist/zonos-elements/p-5d823ea7.system.js +1 -0
  205. package/dist/zonos-elements/{p-4baa51ef.entry.js → p-5e1799bc.entry.js} +1 -1
  206. package/dist/zonos-elements/{p-86ed51fd.entry.js → p-601bb27e.entry.js} +1 -1
  207. package/dist/zonos-elements/{p-f9c715ad.entry.js → p-648f3ada.entry.js} +1 -1
  208. package/dist/zonos-elements/{p-dfe45cfd.js → p-6987f9c9.js} +1 -1
  209. package/dist/zonos-elements/{p-5678c044.system.entry.js → p-6b6cfc59.system.entry.js} +1 -1
  210. package/dist/zonos-elements/{p-6b9ad020.entry.js → p-703fc360.entry.js} +1 -1
  211. package/dist/zonos-elements/p-71c7a1ff.entry.js +1 -0
  212. package/dist/zonos-elements/{p-e5582c35.entry.js → p-71fb6126.entry.js} +1 -1
  213. package/dist/zonos-elements/{p-24aae506.system.js → p-77c2e465.system.js} +1 -1
  214. package/dist/zonos-elements/{p-0f9a04fe.system.entry.js → p-79e5a629.system.entry.js} +1 -1
  215. package/dist/zonos-elements/{p-3686190f.js → p-843ced6c.js} +1 -1
  216. package/dist/zonos-elements/{p-3d6ce58a.js → p-84dbf474.js} +1 -1
  217. package/dist/zonos-elements/{p-9bd63d7a.system.js → p-8570e88a.system.js} +1 -1
  218. package/dist/zonos-elements/{p-4a4c3af1.system.entry.js → p-8d5f413c.system.entry.js} +1 -1
  219. package/dist/zonos-elements/p-8f9e95c2.entry.js +1 -0
  220. package/dist/zonos-elements/{p-c3ee352b.entry.js → p-90c932fd.entry.js} +1 -1
  221. package/dist/zonos-elements/{p-1cc651e8.entry.js → p-928291e5.entry.js} +1 -1
  222. package/dist/zonos-elements/{p-a52ddeb5.js → p-9a5a2043.js} +1 -1
  223. package/dist/zonos-elements/{p-85cc83e5.system.entry.js → p-9b0a6fe5.system.entry.js} +1 -1
  224. package/dist/zonos-elements/{p-19a1cc70.system.entry.js → p-9e0cb5b3.system.entry.js} +1 -1
  225. package/dist/zonos-elements/{p-8a01157e.system.entry.js → p-a1bad0c3.system.entry.js} +1 -1
  226. package/dist/zonos-elements/{p-72833da8.system.entry.js → p-a49ba3ae.system.entry.js} +1 -1
  227. package/dist/zonos-elements/{p-3fbdb83f.entry.js → p-a6db8883.entry.js} +1 -1
  228. package/dist/zonos-elements/{p-30a0aed1.entry.js → p-a78bc004.entry.js} +1 -1
  229. package/dist/zonos-elements/{p-37f47658.js → p-adb9827c.js} +1 -1
  230. package/dist/zonos-elements/p-b2d276e1.js +1 -0
  231. package/dist/zonos-elements/p-b5a26334.system.entry.js +1 -0
  232. package/dist/zonos-elements/{p-62db5d7c.system.js → p-b6a36c25.system.js} +1 -1
  233. package/dist/zonos-elements/{p-274a7c0e.system.entry.js → p-b6df4cc2.system.entry.js} +1 -1
  234. package/dist/zonos-elements/{p-90a19f4c.system.entry.js → p-b7e4a020.system.entry.js} +1 -1
  235. package/dist/zonos-elements/{p-ec6472c9.system.entry.js → p-baf0b24c.system.entry.js} +1 -1
  236. package/dist/zonos-elements/p-becac995.js +1 -0
  237. package/dist/zonos-elements/{p-e98e4c0b.system.entry.js → p-bf5c3dd7.system.entry.js} +1 -1
  238. package/dist/zonos-elements/{p-6ef88d96.system.entry.js → p-c9c17d08.system.entry.js} +1 -1
  239. package/dist/zonos-elements/{p-42518502.system.entry.js → p-cb966d16.system.entry.js} +1 -1
  240. package/dist/zonos-elements/{p-a5f5993f.system.entry.js → p-ce103c66.system.entry.js} +1 -1
  241. package/dist/zonos-elements/p-cfb0059f.js +1 -0
  242. package/dist/zonos-elements/{p-7c312bc2.entry.js → p-d950b0b4.entry.js} +1 -1
  243. package/dist/zonos-elements/{p-1ed2827f.entry.js → p-db5f6b8c.entry.js} +1 -1
  244. package/dist/zonos-elements/{p-2555ba6b.system.entry.js → p-deaf0e38.system.entry.js} +1 -1
  245. package/dist/zonos-elements/{p-bb0ce525.entry.js → p-e056ae6b.entry.js} +1 -1
  246. package/dist/zonos-elements/{p-281063f4.system.entry.js → p-e850e6e7.system.entry.js} +1 -1
  247. package/dist/zonos-elements/{p-105b7ebe.entry.js → p-fb712719.entry.js} +1 -1
  248. package/dist/zonos-elements/zonos-elements.css +1 -1
  249. package/dist/zonos-elements/zonos-elements.esm.js +1 -1
  250. package/package.json +1 -1
  251. package/dist/cjs/getContrastColor-68058615.js +0 -37
  252. package/dist/esm/getContrastColor-2340485f.js +0 -35
  253. package/dist/esm-es5/getContrastColor-2340485f.js +0 -1
  254. package/dist/zonos-elements/p-1ce71a7d.entry.js +0 -1
  255. package/dist/zonos-elements/p-349bdc03.system.entry.js +0 -1
  256. package/dist/zonos-elements/p-5353cfa4.entry.js +0 -1
  257. package/dist/zonos-elements/p-595e2a7d.system.entry.js +0 -1
  258. package/dist/zonos-elements/p-69e2a7dd.js +0 -1
  259. package/dist/zonos-elements/p-6f8abf4f.js +0 -1
  260. package/dist/zonos-elements/p-9b2d6f06.entry.js +0 -1
  261. package/dist/zonos-elements/p-9f7e7148.system.js +0 -1
  262. package/dist/zonos-elements/p-a901d002.js +0 -1
  263. package/dist/zonos-elements/p-c9a1f774.js +0 -1
  264. package/dist/zonos-elements/p-e755ab57.system.js +0 -1
@@ -1 +1 @@
1
- import{r as o,d as e,h as s,F as t,a as n,g as i}from"./p-ce75b047.js";import{b as a,c as r,t as l,L as c,C as d,M as h,d as p,r as m,D as f}from"./p-dfe45cfd.js";import{s as g,c as b,a as u,b as v}from"./p-3d6ce58a.js";import{t as y,s as z,l as x}from"./p-37f47658.js";import{z as w}from"./p-f3cfd8fa.js";import{h as k,s as C,g as L,i as I,a as S}from"./p-41dd1cb8.js";import{c as j}from"./p-595f5dd2.js";import{g as M}from"./p-db3b101a.js";import{l as Z,b as H}from"./p-0a377722.js";import{i as P,a as _}from"./p-1f3549c6.js";import{c as U}from"./p-b4b7f705.js";import{l as V}from"./p-97aceb11.js";import{c as D}from"./p-3686190f.js";import{r as B}from"./p-69e2a7dd.js";import{p as $}from"./p-6f8abf4f.js";import{r as F}from"./p-1b8771bb.js";import"./p-d28be518.js";import"./p-6d81901a.js";import"./p-4c89d04a.js";const R=class{constructor(s){o(this,s),this.closeClick=e(this,"closeClick",7),this.borderRadius="ROUNDED",this.confirmationId=null,this.isLoading=!0,this.notificationType="success",this.notificationTitle="",this.notificationMessages=[],this.notificationActionText=y("Keep shopping"),this.order=null,this.isWaitingToRedirect=!0,this.pullOrder=async()=>{var o,e;const s=z.checkoutSessionId,t=new URLSearchParams;t.set("checkoutSessionId",s||"");const{baseUrl:n,errors:i,json:a}=await k(`/api/zonos-elements/get-order?${t.toString()}`);return i.length||!(null==a?void 0:a.id)?{baseUrl:n,order:null}:(await(null===(e=(o=w.checkoutSettings).onOrderSuccess)||void 0===e?void 0:e.call(o,{zonosApiRoute:n,zonosOrder:a})),{baseUrl:n,order:a})},this.handleSuccessBehavior=async()=>{this.isLoading=!1,await this.getPullOrder()},this.getPullOrder=async(o=0)=>{var e,s;0===o&&Z("=== Start to poll for order info","info");const{baseUrl:t,order:n}=await this.pullOrder(),i=!!(null===(s=null===(e=null==n?void 0:n.references)||void 0===e?void 0:e.find((o=>"zonosOrderNumber"===(null==o?void 0:o.key))))||void 0===s?void 0:s.value),a=z.checkoutSessionId,r=parseFloat(new URLSearchParams(window.location.search).get("maxPollingRetries")||"0")||30;Z(`=== Polling order (${o} attemps)`,"info"),n?(Z("=== InvoiceOrder info found","info"),o>10&&C({endpoint:`${t}/api/zonos-elements/get-order?checkoutSessionId=${a}&orderId=${n.id}`,errors:[`Invoice order found after ${o} attempts`],metadata:{allLogs:H,checkoutSessionId:z.checkoutSessionId||"",orderId:n.id,storeId:w.storeId}}),this.order=n):n&&i||!(o<r)?C({endpoint:`${t}/api/zonos-elements/get-order?checkoutSessionId=${a}`,errors:[`Invoice order not found after ${r} attempts`],metadata:{allLogs:H,checkoutSessionId:z.checkoutSessionId||"",storeId:w.storeId}}):(await new Promise((o=>setTimeout(o,1e3))),await this.getPullOrder(o+1))},this.checkStripePaymentStatus=async()=>{const o=new URLSearchParams(window.location.search).get("payment_intent_client_secret")||a.clientSecret;if(o||this.storybookForceStatus){const{error:e,messages:s,status:t}=await r({clientSecret:o,storybookForceStatus:this.storybookForceStatus}),n="requires_action"===t||e;this.notificationType=n?"error":"success",this.notificationMessages=s||[],this.notificationTitle=y(n?"Payment failed":"You're all set!"),Z("=== Payment intent retrieve status","info",{clientSecret:o,error:e,messages:s,status:t});const i=new URL(window.location.href);if(i.searchParams.delete("payment_intent_client_secret"),i.searchParams.delete("payment_intent"),i.searchParams.delete("redirect_status"),i.searchParams.delete("zonosCheckoutSessionId"),window.history.replaceState({},"",i.toString()),e&&(null==s?void 0:s.length))g({event:"zonos-checkout-payment-fail"}),C({endpoint:"Stripe payment failed",errors:[`Payment intent "${o.split("_secret_")[0]||o}" status: ${t} - checkout session: ${z.checkoutSessionId}`],metadata:{allLogs:H,credentialToken:window.Zonos.zonosApiKey}});else{g({event:"zonos-checkout-success"}),l({checkoutSessionId:z.checkoutSessionId,eventName:"checkout_orderCompleted"});const o=j("zonos-checkout-success",{message:"Zonos Checkout successfully processed order"});document.dispatchEvent(o),await this.handleSuccessBehavior()}}this.isLoading=!1,c(),d(),z.checkoutSessionId=null},this.checkStagingOrderStatus=async()=>{this.notificationType="success",this.notificationTitle=y("You're all set!"),this.notificationMessages=h("succeeded").messages,await this.handleSuccessBehavior(),c(),d(),b(),z.checkoutSessionId=null},this.checkPaypalPaymentStatus=async()=>{if(u.paypalErrorMessage)return this.notificationType="error",this.notificationTitle=y("Payment failed"),this.notificationMessages=[u.paypalErrorMessage],void(this.isLoading=!1);this.isLoading=!1,u.orderIdCreated&&(g({event:"zonos-checkout-success"}),l({checkoutSessionId:z.checkoutSessionId,eventName:"checkout_orderCompleted"}),this.notificationType="success",this.notificationTitle=y("You're all set!"),this.notificationMessages=h("succeeded").messages,await this.handleSuccessBehavior()),c(),d(),b(),z.checkoutSessionId=null},this.getReceiptUrl=({cartId:o})=>{const e=new URL(`${window.location.origin}/receipt`);e.searchParams.set("referenceId",o),L()&&e.searchParams.set("zonosTestMode","1");const s=new URLSearchParams(window.location.search).get("zonosQaUrl");return s&&e.searchParams.set("zonosQaUrl",s),e.toString()}}componentDidLoad(){if(this.overrideNotification)return this.notificationType=this.overrideNotification.type,this.notificationTitle=this.overrideNotification.title,this.notificationMessages=this.overrideNotification.messages,void(this.isLoading=!1);p.isStagingMode?this.checkStagingOrderStatus():u.orderIdCreated?this.checkPaypalPaymentStatus():this.checkStripePaymentStatus()}render(){const o=window.Zonos.cartId;return s(n,{key:"0e85f53a2195cb775590ca7cf815fe5ff555a5a7",class:"zonos--checkout-finish zonos--elements",style:{"--zonos--border-radius":M({overrideBorderStyle:this.borderRadius})}},!this.isLoading&&s("div",{key:"a72982af4d9e1ccd015486185841bdfb8100de4f",class:"zonos--finish-details"},s("div",{key:"905c39d1f8d0c4db69fe69af86b5d2fd27e6c6bc",class:"zonos--group"},s("zonos-icon","success"===this.notificationType?{"aria-label":"Order success",content:'<svg color="var(--zonos-elements-blue-800)" fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="https://www.w3.org/2000/svg"><path clip-rule="evenodd" d="M2 12C2 6.477 6.477 2 12 2s10 4.477 10 10-4.477 10-10 10S2 17.523 2 12Z" data-is-secondary-color="true" fill="var(--zonos-elements-blue-100)" fill-rule="evenodd"></path><path clip-rule="evenodd" d="M15.707 9.293a1 1 0 0 1 0 1.414l-3.646 3.647a1.5 1.5 0 0 1-2.122 0l-1.646-1.647a1 1 0 1 1 1.414-1.414L11 12.586l3.293-3.293a1 1 0 0 1 1.414 0Z" fill="currentColor" fill-rule="evenodd"></path></svg>',iconColor:"blue-800",size:50}:{"aria-label":"Order failed",content:'<svg color="var(--zonos-elements-red-800)" fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="https://www.w3.org/2000/svg"><path clip-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" data-is-secondary-color="true" fill="var(--zonos-elements-red-200)" fill-rule="evenodd"></path><path clip-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" fill="currentColor" fill-rule="evenodd"></path></svg>',iconColor:"red-800",size:50}),s("zonos-text",{key:"4b4aac452d596888d9a2a132e4909cb96985e3e1",class:"zonos--title",type:"semiBoldSubheader"},this.notificationTitle),this.confirmationId&&s("zonos-badge",{key:"df0281e69b04b3f2ad238cbfb4a8a142e6c08447",badgeColor:"gray"},this.confirmationId),s("zonos-text",{key:"f92416cc2024dc6e58c3886f0d8990a3753c82f4",class:"zonos--subtitle",textColor:"gray-600"},this.notificationMessages.map((o=>s(t,null,o,s("br",null))))),this.order&&o&&s("div",{key:"cbd8a00f6ee518a62cab4edb8c29167a108710c0",class:"zonos--button-container"},s("zonos-button",{key:"bcc697820cfbab42417626c2bf1d887bee67fa5f",onClick:()=>{window.open(this.getReceiptUrl({cartId:o}),"_blank")},size:"lg",variant:"primary"},y("View receipt"))))))}static get assetsDirs(){return["assets"]}};R.style=":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;height:100%}:host .zonos--group{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;margin-bottom:24px;border-radius:var(--zonos--border-radius, 10px);gap:24px;margin-top:24px;background-color:var(--zonos-elements-gray-50);padding:48px}:host .zonos--finish-details{max-width:640px;min-width:300px;line-height:24px;width:0 auto;margin:auto}:host zonos-button{width:100%}:host .loading-wrapper{min-height:300px;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center}:host .zonos--finish-button-wrapper{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;gap:16px;margin:0 auto;margin-top:48px;max-width:300px}:host .zonos--button-container{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;gap:16px;margin:0 auto}:host .zonos--subtitle{text-align:center}:host .zonos--order-number{background-color:var(--zonos-elements-gray-0);border:1px solid var(--zonos-elements-gray-200);color:var(--zonos-elements-gray-800);border-radius:var(--zonos-elements-radius-6);padding:4px 8px}";const T=class{constructor(e){o(this,e),this.mobile=!1,this.tablet=!1,this.showLanguageDialog=!1,this.isMobile=!1,this.isTablet=!1}handleGlobalClick(o){!this.el.contains(o.target)&&this.showLanguageDialog&&(this.showLanguageDialog=!1)}toggleLanguageDialog(){this.showLanguageDialog=!this.showLanguageDialog}handleMobileChange(){this.isMobile=P(this.mobile)}handleTabletChange(){this.isTablet=_(this.tablet)}componentWillLoad(){this.isMobile=P(this.mobile),this.isTablet=_(this.tablet)}render(){var o;const e=null===(o=V.find((o=>o.code===x.selectedLocale)))||void 0===o?void 0:o.label,t="gray-1000";return s(n,{key:"f1df2afbf4312c216d2b0776b08bdf18a99918fa",class:U(["zonos--elements",this.isMobile&&"mobile",this.isTablet&&"tablet"])},s("div",{key:"15ec928ff1686fab2644fdad65b528e16f887c3d",class:"zonos--invoice-footer"},s("div",{key:"b3a81689dca77c65837366168b4cc512e873ebe6",class:"zonos--invoice-locale-wrapper"},s("zonos-button",{key:"f599ee52720855f47f1775f16b4beb5d673bc1fa",buttonColor:t,class:"zonos--invoice-footer-language-button",icon:s("zonos-icon",{"aria-label":"Language select",content:'<svg width="24" height="24" viewBox="0 0 24 24" fill="none" color="var(--zonos-elements-gray-1000)" xmlns="http://www.w3.org/2000/svg">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M20 12C20 16.4183 16.4183 20 12 20C7.58172 20 4 16.4183 4 12C4 7.58172 7.58172 4 12 4C16.4183 4 20 7.58172 20 12ZM11.4709 5.80634C11.7686 5.53723 11.9541 5.5 12 5.5C12.0459 5.5 12.2314 5.53723 12.5291 5.80634C12.8115 6.06164 13.1289 6.46913 13.4271 7.03651C13.9505 8.03191 14.3838 9.46098 14.48 11.25H9.51996C9.61624 9.46098 10.0495 8.03191 10.5729 7.03651C10.8711 6.46913 11.1885 6.06164 11.4709 5.80634ZM8.01802 11.25C8.11591 9.23031 8.60319 7.55958 9.24516 6.33849C9.29983 6.23451 9.35585 6.13335 9.41312 6.03514C7.32916 6.94017 5.81218 8.90533 5.5428 11.25H8.01802ZM5.5428 12.75H8.01802C8.11591 14.7697 8.60319 16.4404 9.24516 17.6615C9.29983 17.7655 9.35585 17.8666 9.41312 17.9649C7.32916 17.0598 5.81218 15.0947 5.5428 12.75ZM9.51996 12.75H14.48C14.3838 14.539 13.9505 15.9681 13.4271 16.9635C13.1289 17.5309 12.8115 17.9384 12.5291 18.1937C12.2314 18.4628 12.0459 18.5 12 18.5C11.9541 18.5 11.7686 18.4628 11.4709 18.1937C11.1885 17.9384 10.8711 17.5309 10.5729 16.9635C10.0495 15.9681 9.61624 14.539 9.51996 12.75ZM15.982 12.75C15.8841 14.7697 15.3968 16.4404 14.7548 17.6615C14.7002 17.7655 14.6441 17.8666 14.5869 17.9649C16.6708 17.0598 18.1878 15.0947 18.4572 12.75H15.982ZM18.4572 11.25C18.1878 8.90533 16.6708 6.94017 14.5869 6.03514C14.6441 6.13335 14.7002 6.23451 14.7548 6.33849C15.3968 7.55958 15.8841 9.23031 15.982 11.25H18.4572Z" fill="currentColor"/>\n</svg>\n',iconColor:t}),onClick:()=>this.toggleLanguageDialog(),variant:"subtle"},s("span",{key:"b5ac314d22571b01be5d7ddea7012b6431fde634",class:"zonos--invoice-locale-label"},e,s("zonos-icon",{key:"fa150a4e7d75327510e2bfc07e9911a8adb9a3ba","aria-hidden":"true",class:"zonos--invoice-locale-chevron",content:'<svg color="var(--zonos-elements-gray-400)" fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="https://www.w3.org/2000/svg"><path clip-rule="evenodd" d="M6.293 9.293a1 1 0 0 1 1.414 0L12 13.586l4.293-4.293a1 1 0 0 1 1.414 1.414l-4.93 4.93a1.1 1.1 0 0 1-1.555 0l-4.93-4.93a1 1 0 0 1 0-1.414Z" fill="currentColor" fill-rule="evenodd"></path></svg>',iconColor:t,size:18}))),s("div",{key:"673eed561dace62416822df5e7948fdfb423e6c3",class:U(["zonos--invoice-language-dialog",this.showLanguageDialog&&"zonos--invoice-language-dialog-open"])},s("zonos-language-select",{key:"6d1a6ae828bf8701fe08605ab5952528e74ad92f",handleOnClose:()=>this.toggleLanguageDialog()}))),s("div",{key:"3b2484d4a4a0899b746a81e055cd9a4a4fcf6db9",class:"zonos--invoice-footer-icon-wrapper"},s("div",{key:"3b4a8431e9cbd3133c69356c1bba186f7cec2fdf",class:"zonos--invoice-footer-logo"},s("zonos-text",{key:"73f8f0b9978b715d611c72beded88862e27c8473",textColor:t},y("Powered by")),s("a",{key:"e9a9a63c0c042f40c76d1293c05d2c23165c7af1",href:"https://zonos.com",target:"_blank",title:"Zonos website"},s("zonos-icon",{key:"5bd7ac7cd01581ba40a258f491417b04ab71c250",autoHeight:!0,content:'<svg width="43" height="10" viewBox="0 0 43 10" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M7.35896 0.0640869H0.30768C0.166068 0.0640869 0.0512695 0.178886 0.0512695 0.320497V1.85896C0.0512695 2.00057 0.166068 2.11537 0.30768 2.11537H4.44439C4.54964 2.11537 4.61005 2.2352 4.54745 2.31982L0.151823 8.2615C0.0865163 8.34978 0.0512695 8.45669 0.0512695 8.56649V9.67947C0.0512695 9.82108 0.166068 9.93588 0.30768 9.93588H7.35896C7.50057 9.93588 7.61537 9.82108 7.61537 9.67947V8.14101C7.61537 7.9994 7.50057 7.8846 7.35896 7.8846H3.22226C3.117 7.8846 3.05659 7.76477 3.11919 7.68015L7.51482 1.73847C7.58013 1.65019 7.61537 1.54328 7.61537 1.43348V0.320497C7.61537 0.178886 7.50057 0.0640869 7.35896 0.0640869Z" fill="var(--zonos-elements-gray-800)"/>\n<path fill-rule="evenodd" clip-rule="evenodd" d="M11.718 0C10.1602 0 8.89746 1.26279 8.89746 2.82051V7.17949C8.89746 8.73721 10.1602 10 11.718 10H13.6411C15.1988 10 16.4616 8.73721 16.4616 7.17949V2.82051C16.4616 1.26279 15.1988 0 13.6411 0H11.718ZM11.718 2.05128C11.2931 2.05128 10.9487 2.39568 10.9487 2.82051V7.17949C10.9487 7.60432 11.2931 7.94872 11.718 7.94872H13.6411C14.0659 7.94872 14.4103 7.60432 14.4103 7.17949V5V2.82051C14.4103 2.39568 14.0659 2.05128 13.6411 2.05128H11.718Z" fill="var(--zonos-elements-gray-800)"/>\n<path d="M17.7437 0.436316V9.71132C17.7437 9.85293 17.8585 9.96773 18.0001 9.96773H19.5385C19.6801 9.96773 19.7949 9.85293 19.7949 9.71132V3.74801C19.7949 3.44829 19.969 3.17587 20.241 3.04996L22.1641 2.15964C22.6739 1.92363 23.2565 2.29592 23.2565 2.85769V9.71132C23.2565 9.85293 23.3713 9.96773 23.5129 9.96773H25.0513C25.193 9.96773 25.3078 9.85293 25.3078 9.71132V2.85595C25.3078 0.79631 23.1718 -0.568775 21.3027 0.296257L19.9742 0.911055C19.8685 0.959946 19.7432 0.931536 19.669 0.84187L19.2748 0.365697C19.1773 0.248019 19.0325 0.179905 18.8797 0.179905H18.0001C17.8585 0.179905 17.7437 0.294704 17.7437 0.436316Z" fill="var(--zonos-elements-gray-800)"/>\n<path fill-rule="evenodd" clip-rule="evenodd" d="M29.4104 0C27.8526 0 26.5898 1.26279 26.5898 2.82051V7.17949C26.5898 8.73721 27.8526 10 29.4104 10H31.3334C32.8912 10 34.1539 8.73721 34.1539 7.17949V2.82051C34.1539 1.26279 32.8912 0 31.3334 0H29.4104ZM29.4104 2.05128C28.9855 2.05128 28.6411 2.39568 28.6411 2.82051V7.17949C28.6411 7.60432 28.9855 7.94872 29.4104 7.94872H31.3334C31.7583 7.94872 32.1027 7.60432 32.1027 7.17949V2.82051C32.1027 2.39568 31.7583 2.05128 31.3334 2.05128H29.4104Z" fill="var(--zonos-elements-gray-800)"/>\n<path d="M38.2085 0.0640869H40.3889C41.8309 0.0640869 42.9999 1.23306 42.9999 2.67506C42.9999 2.79477 42.9108 2.89574 42.792 2.91059L41.1732 3.11293C41.054 3.12784 40.9486 3.03485 40.9486 2.91466C40.9486 2.47322 40.5908 2.11537 40.1493 2.11537H38.3397C37.8688 2.11537 37.4871 2.49712 37.4871 2.96803C37.4871 3.3685 37.7658 3.71501 38.1569 3.80087L40.7916 4.37922C42.0811 4.66229 42.9999 5.80462 42.9999 7.12486C42.9999 8.67735 41.7414 9.93588 40.1889 9.93588H38.0468C36.6048 9.93588 35.4358 8.76691 35.4358 7.32491C35.4358 7.2052 35.5249 7.10423 35.6437 7.08938L37.2625 6.88703C37.3817 6.87213 37.4871 6.96512 37.4871 7.08531C37.4871 7.52675 37.8449 7.8846 38.2864 7.8846H40.1176C40.5765 7.8846 40.9486 7.51252 40.9486 7.05354C40.9486 6.67478 40.6925 6.34394 40.3258 6.24901L37.5136 5.52093C36.2902 5.20422 35.4358 4.10042 35.4358 2.83676C35.4358 1.30545 36.6772 0.0640869 38.2085 0.0640869Z" fill="var(--zonos-elements-gray-700)"/>\n</svg>\n',size:42}))),s("div",{key:"cf86cea8570caac18fbe1532478141e64e6cfd70",class:"dot"}),s("a",{key:"12b5cfa380ae7c2fbc2d3e7501c415761a1f199a",href:"https://zonos.com/docs/legal/zonos-privacy-policy",target:"_blank"},s("zonos-text",{key:"9588bdc785c892a39d3c37d034d1f874c8492fa2",textColor:t},y("Privacy policy"))))))}get el(){return i(this)}static get watchers(){return{mobile:["handleMobileChange"],tablet:["handleTabletChange"]}}};T.style=":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{position:absolute;bottom:0;left:32px;right:32px;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;z-index:2}:host .zonos--invoice-footer{gap:16px;display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;padding:12px;padding-left:0;-ms-flex-align:center;align-items:center;width:100%}:host .zonos--invoice-footer .zonos--invoice-footer-icon-wrapper{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:16px}:host .zonos--invoice-footer .zonos--invoice-footer-icon-wrapper .zonos--invoice-footer-logo{display:-ms-inline-flexbox;display:inline-flex;gap:8px;-ms-flex-align:center;align-items:center}:host .zonos--invoice-footer .zonos--invoice-footer-icon-wrapper .zonos--invoice-footer-logo a{line-height:0}:host .zonos--invoice-footer .zonos--invoice-footer-icon-wrapper a{text-decoration:none}:host .zonos--invoice-footer zonos-button button.outline{outline:1px solid var(--zonos-elements-gray-800)}:host .zonos--invoice-footer .zonos--invoice-locale-wrapper{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:8px;position:relative}@media (max-width: 400px){:host .zonos--invoice-footer .zonos--invoice-locale-wrapper{gap:4px}}:host .zonos--invoice-footer .zonos--invoice-locale-wrapper .zonos--invoice-locale-label{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;gap:4px}:host .zonos--invoice-footer .zonos--invoice-language-dialog{position:absolute;bottom:36px;left:var(--language-dialog-left);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);width:360px;max-width:100vw;max-height:500px;z-index:2147483011;overflow:auto;-webkit-transform:scale(0);transform:scale(0);-webkit-transform-origin:bottom left;transform-origin:bottom left;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}:host .zonos--invoice-footer .zonos--invoice-language-dialog::-webkit-scrollbar{width:10px}:host .zonos--invoice-footer .zonos--invoice-language-dialog::-webkit-scrollbar-track{background:var(--zonos-elements-gray-50)}:host .zonos--invoice-footer .zonos--invoice-language-dialog::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}:host .zonos--invoice-footer .zonos--invoice-language-dialog::-webkit-scrollbar-thumb:hover{background:#d6d6d6}:host .zonos--invoice-footer .zonos--invoice-language-dialog::-webkit-scrollbar-track{border-top-right-radius:var(--zonos-elements-radius-12);border-bottom-right-radius:var(--zonos-elements-radius-12)}:host .zonos--invoice-footer .zonos--invoice-language-dialog.zonos--invoice-language-dialog-open{opacity:1;-webkit-transform:scale(1);transform:scale(1)}:host .dot{display:-ms-inline-flexbox;display:inline-flex;background:var(--zonos-elements-gray-400);width:6px;height:6px;border-radius:50%}:host(.mobile),:host(.tablet){background-color:var(--zonos-elements-gray-0);width:100%;position:-webkit-sticky;position:sticky;bottom:0}:host(.tablet) .zonos--invoice-footer{width:100%;max-width:800px;-ms-flex-pack:justify;justify-content:space-between;display:-ms-flexbox;display:flex}:host(.mobile){-ms-flex-order:3;order:3}:host(.mobile) .zonos--invoice-locale-wrapper{display:none}:host(.mobile) .zonos--invoice-footer{-ms-flex-pack:center;justify-content:center}";const W=class{constructor(s){o(this,s),this.collapseClicked=e(this,"collapseClicked",7),this.mobile=!0,this.landedCostId="",this.isMobile=!1,this.collapseState=this.collapsed}handleCollapseChangeFromProp(o){this.collapseState=o}handleCollapseChange(o){this.collapseClicked.emit(o)}handleWindowResize(){this.isMobile=I(this.mobile)}componentWillLoad(){this.handleWindowResize()}render(){return s(n,{class:U(["zonos--invoice-order-details zonos--elements",this.isMobile&&"mobile"])},s("div",{class:"zonos--wrapper"},s("button",{class:"zonos--order-details-header",onClick:()=>{this.collapseState=!this.collapseState},type:"button"},s("div",{class:"zonos--order-details-header-text"},s("zonos-text",{type:"boldSubheader"},y("Pay [organizationName]",{organizationName:w.organizationName})),(()=>s("zonos-icon",this.collapseState?{"aria-label":"Collapse expanded section",content:'<svg color="var(--zonos-elements-gray-400)" fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="https://www.w3.org/2000/svg"><path clip-rule="evenodd" d="M6.293 9.293a1 1 0 0 1 1.414 0L12 13.586l4.293-4.293a1 1 0 0 1 1.414 1.414l-4.93 4.93a1.1 1.1 0 0 1-1.555 0l-4.93-4.93a1 1 0 0 1 0-1.414Z" fill="currentColor" fill-rule="evenodd"></path></svg>',iconColor:"gray-1200"}:{"aria-label":"Expand collapsed section",content:'<svg color="var(--zonos-elements-gray-400)" fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="https://www.w3.org/2000/svg"><path clip-rule="evenodd" d="M17.707 14.707a1 1 0 0 1-1.414 0L12 10.414l-4.293 4.293a1 1 0 0 1-1.414-1.414l4.93-4.93a1.1 1.1 0 0 1 1.555 0l4.93 4.93a1 1 0 0 1 0 1.414Z" fill="currentColor" fill-rule="evenodd"></path></svg>',iconColor:"gray-1200"}))()),s("zonos-text",{type:"boldSubheader"},B({amount:D.amountTotalDue||0,isForeign:!0}))),s("div",{class:"zonos--order-details-wrapper"},s("zonos-collapse",{collapsed:this.collapseState},s("div",{class:"zonos--invoice-order-details-content"},s("zonos-invoice-cart-items",{isMobile:this.isMobile}),s("zonos-invoice-subtotal",{isMobile:this.isMobile}))))))}static get assetsDirs(){return["assets"]}static get watchers(){return{collapsed:["handleCollapseChangeFromProp"],collapseState:["handleCollapseChange"]}}};W.style=":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{height:100%}:host *{-ms-scroll-chaining:none;overscroll-behavior:contain}:host *::-webkit-scrollbar{width:10px}:host *::-webkit-scrollbar-track{background:var(--zonos-elements-gray-50)}:host *::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}:host *::-webkit-scrollbar-thumb:hover{background:#d6d6d6}:host .zonos--order-details-header-text{display:-ms-flexbox;display:flex}:host .zonos--wrapper{overflow:auto;background-color:var(--zonos-elements-gray-50);border-radius:16px;height:100%;min-height:56px}:host .zonos--order-details-header-text{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:8px}:host .zonos--order-details-header{position:-webkit-sticky;position:sticky;top:0;z-index:1;-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:var(--zonos-elements-gray-50);border:none;display:-ms-flexbox;display:flex;padding:16px 16px 0 16px;width:100%;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:center;align-items:center}:host .zonos--order-details-header:focus-visible{outline:none}:host .zonos--order-details-wrapper{position:relative;padding:0 16px 16px 16px}:host .zonos--invoice-order-details-content{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:16px}:host .zonos--invoice-order-info{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:32px}:host .zonos--invoice-order-info .zonos--invoice-order-details-row{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:16px}:host .zonos--invoice-order-info .zonos--invoice-order-details-row>*{-ms-flex:1 1 150px;flex:1 1 150px}:host .zonos--invoice-order-info .zonos--invoice-order-details-column{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:8px}:host .zonos--invoice-order-info .zonos--invoice-order-shipping-info{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:0}";const N=class{constructor(s){o(this,s),this.continueClicked=e(this,"continueClicked",7),this.paypalSessionFailed=e(this,"paypalSessionFailed",7),this.paypalSessionDone=e(this,"paypalSessionDone",7),this.storeUnsubscribeList=[],this.continueLoading=!1,this.showErrorBanner=!1,this.hasStripePaymentError=!1,this.stagingOrderCreateErrorMessage="",this.internalContinueLoading=this.continueLoading,this.handleValidate=()=>{var o;return!!(null===(o=a.stripePaymentEventData)||void 0===o?void 0:o.complete)},this.continueClickHandler=async({currencyCode:o})=>{var e,s;if(!this.handleValidate())return null===(e=a.stripeBillingAddressElement)||void 0===e||e.getValue(),this.showErrorBanner=!0,null===(s=a.stripeElements)||void 0===s||s.submit(),void setTimeout((()=>{var o;null===(o=this.ele.querySelector("zonos-banner"))||void 0===o||o.scrollIntoView({behavior:"smooth"})}),10);a.checkoutSettlementCurrency=o,g({event:"zonos-checkout-payment-info"}),this.continueClicked.emit()},this.copyCardToClipboard=async o=>{try{await navigator.clipboard.writeText(o)}catch(e){const s=document.createElement("textarea");s.style.position="fixed",s.style.left="-1000px",s.style.top="-1000px",s.style.width="1px",s.style.height="1px",s.value=o,s.id="zonos-copy-card-number",document.body.appendChild(s),s.select(),document.execCommand("copy"),document.body.removeChild(s)}window.Zonos.showNotification({message:y("Card number copied to clipboard"),timeout:4e3,type:"success"})},this.placeTestOrder=async()=>{this.internalContinueLoading=!0;const{errors:o}=await $();if(o.length)return this.stagingOrderCreateErrorMessage=o[0]||"Failed to create staging order. Please try again.",void(this.internalContinueLoading=!1);this.internalContinueLoading=!1,m()}}continueLoadingWatcher(){this.internalContinueLoading=this.continueLoading}stripePaymentErrorWatcher(){this.hasStripePaymentError&&setTimeout((()=>{var o;null===(o=this.ele.querySelector("zonos-banner"))||void 0===o||o.scrollIntoView({behavior:"smooth"})}),50)}componentWillLoad(){this.storeUnsubscribeList=[f("currency",(()=>{v({currency:p.currency})}))],v({currency:p.currency})}disconnectedCallback(){this.storeUnsubscribeList.forEach((o=>o()))}render(){var o;if(this.hasStripePaymentError=a.hasPaymentError,!a.stripeElements)return null;if(!a.clientSecret)return null;this.showErrorBanner&&(this.showErrorBanner=!this.handleValidate());const e=L(),i=p.isStagingMode||S(),r="external_paypal"===(null===(o=a.stripePaymentEventData)||void 0===o?void 0:o.value.type);return s(n,{class:"zonos--checkout-payment zonos--elements"},s("div",{class:"zonos--group"},s("zonos-text",{class:"zonos--title",type:"semiBoldSubheader"},y("Payment method")),(()=>{if(i){const o=w.appearance.theme;return s(t,null,this.stagingOrderCreateErrorMessage&&s("zonos-banner",{class:"zonos--error-banner",intent:"error"},this.stagingOrderCreateErrorMessage),s("zonos-empty-state-payment",{emptyStateText:y("No payment method needed for staging"),theme:o}),s("div",{class:"zonos--group-btn"},s("zonos-button",{backgroundColor:this.submitBtnColor,loading:this.internalContinueLoading,onClick:()=>{this.placeTestOrder()},size:"lg",variant:this.submitBtnType},y("Place test order"))))}return a.isFetchingSession||D.isFetchingPayorInfo?null:s(t,null,this.showErrorBanner&&s("zonos-banner",{class:"zonos--error-banner",intent:"error"},y("Missing required fields. Make sure all fields are completed.")),this.hasStripePaymentError&&s("zonos-banner",{class:"zonos--payment-error-banner",intent:"error"},a.customErrorMessage||y("We couldn't complete your payment. Please verify the payment details and try again.")),u.paypalErrorMessage&&s("zonos-banner",{class:"zonos--payment-error-banner",intent:"error"},u.paypalErrorMessage),s("zonos-payment",null),s("div",{class:"zonos--group-btn"},!r&&s(t,null,s("zonos-button",{backgroundColor:this.submitBtnColor,bold:!0,isDisabled:this.continueLoading&&"USD"===a.checkoutSettlementCurrency,loading:this.continueLoading&&"USD"!==a.checkoutSettlementCurrency,onClick:async()=>{p.checkoutSession?await this.continueClickHandler({currencyCode:p.checkoutSession.subtotals.presentmentCurrencyCode}):Z("Checkout session is not found")},size:"lg",variant:this.submitBtnType},y("Pay [orderTotal]",{orderTotal:B({amount:D.amountTotalDue||0,isForeign:!0})})),a.shouldRenderPayInUsdButton&&s("zonos-button",{class:"zonos--pay-in-base-currency-btn",isDisabled:this.continueLoading&&"USD"!==a.checkoutSettlementCurrency,loading:this.continueLoading&&"USD"===a.checkoutSettlementCurrency,onClick:async()=>{await this.continueClickHandler({currencyCode:"USD"})},size:"lg",variant:"subtle"},y("Click to pay in USD"))),s("zonos-paypal-payment",{onPaypalSessionDone:({detail:{orderId:o}})=>{this.paypalSessionDone.emit(o)},onPaypalSessionFail:()=>this.paypalSessionFailed.emit(),style:{display:r?"block":"none"}})),e&&s("zonos-card",{backgroundColor:"gray-100",borderRadius:12,class:"zonos--test-cards"},s("zonos-v-stack",{spacing:16},s("div",null,s("zonos-text",{type:"semiBoldLabel"},y("Test cards")),s("zonos-text",{textColor:"gray-700"},y("Click to copy the card number. Use any future expiration date and three number CVC."))),s("zonos-button",{icon:s("zonos-icon",{content:'<svg color="var(--zonos-elements-gray-1000)" xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path fill="var(--zonos-elements-gray-1000)" d="M15.342 10.21a.75.75 0 0 0-1.184-.92l-2.978 3.829-1.4-1.4a.75.75 0 1 0-1.06 1.061l1.8 1.8a1 1 0 0 0 1.496-.093l3.326-4.277Z"/><path fill="var(--zonos-elements-gray-1000)" fill-rule="evenodd" d="M12 4a8 8 0 1 0 0 16 8 8 0 0 0 0-16Zm-6.5 8a6.5 6.5 0 1 1 13 0 6.5 6.5 0 0 1-13 0Z" clip-rule="evenodd"/></svg>'}),justifyContent:"flex-start",onClick:()=>this.copyCardToClipboard("4242424242424242")},y("Success")," (****4242)"),s("zonos-button",{icon:s("zonos-icon",{content:'<svg color="var(--zonos-elements-gray-1000)" xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path fill="var(--zonos-elements-gray-1000)" d="M14.475 10.586a.75.75 0 1 0-1.06-1.06L12 10.938l-1.414-1.414a.75.75 0 0 0-1.06 1.06L10.938 12l-1.414 1.414a.75.75 0 1 0 1.06 1.06L12 13.062l1.414 1.414a.75.75 0 0 0 1.06-1.06L13.062 12l1.414-1.414Z"/><path fill="var(--zonos-elements-gray-1000)" fill-rule="evenodd" d="M12 4a8 8 0 1 0 0 16 8 8 0 0 0 0-16Zm-6.5 8a6.5 6.5 0 1 1 13 0 6.5 6.5 0 0 1-13 0Z" clip-rule="evenodd"/></svg>'}),justifyContent:"flex-start",onClick:()=>this.copyCardToClipboard("4000000000000002")},y("Failure")," (****0002)")),s("zonos-notification",null)))})()))}get ele(){return i(this)}static get watchers(){return{continueLoading:["continueLoadingWatcher"],hasStripePaymentError:["stripePaymentErrorWatcher"]}}};N.style=".sc-zonos-invoice-payment-h{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-invoice-payment-h *.sc-zonos-invoice-payment{font-family:var(--zonos--font-family, Inter), Inter}.sc-zonos-invoice-payment-h img.sc-zonos-invoice-payment{max-width:100%}.sc-zonos-invoice-payment-h dl.sc-zonos-invoice-payment,.sc-zonos-invoice-payment-h dd.sc-zonos-invoice-payment,.sc-zonos-invoice-payment-h h1.sc-zonos-invoice-payment,.sc-zonos-invoice-payment-h h2.sc-zonos-invoice-payment,.sc-zonos-invoice-payment-h h3.sc-zonos-invoice-payment,.sc-zonos-invoice-payment-h h4.sc-zonos-invoice-payment,.sc-zonos-invoice-payment-h h5.sc-zonos-invoice-payment,.sc-zonos-invoice-payment-h h6.sc-zonos-invoice-payment,.sc-zonos-invoice-payment-h hr.sc-zonos-invoice-payment,.sc-zonos-invoice-payment-h figure.sc-zonos-invoice-payment,.sc-zonos-invoice-payment-h p.sc-zonos-invoice-payment,.sc-zonos-invoice-payment-h pre.sc-zonos-invoice-payment{margin:0}.sc-zonos-invoice-payment-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-invoice-payment-h{overflow:hidden;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex:1;flex:1}.sc-zonos-invoice-payment-h .zonos--title.sc-zonos-invoice-payment{margin-bottom:24px}.sc-zonos-invoice-payment-h .zonos--group.sc-zonos-invoice-payment{margin-bottom:20px;overflow:auto;padding:5px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex:1;flex:1;-ms-scroll-chaining:none;overscroll-behavior:contain}.sc-zonos-invoice-payment-h .zonos--group.sc-zonos-invoice-payment::-webkit-scrollbar{width:10px}.sc-zonos-invoice-payment-h .zonos--group.sc-zonos-invoice-payment::-webkit-scrollbar-track{background:var(--zonos-elements-gray-50)}.sc-zonos-invoice-payment-h .zonos--group.sc-zonos-invoice-payment::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}.sc-zonos-invoice-payment-h .zonos--group.sc-zonos-invoice-payment::-webkit-scrollbar-thumb:hover{background:#d6d6d6}.sc-zonos-invoice-payment-h .zonos--payment-error-banner.sc-zonos-invoice-payment{margin-bottom:8px}.sc-zonos-invoice-payment-h .zonos--error-banner.sc-zonos-invoice-payment{margin-bottom:16px}.sc-zonos-invoice-payment-h zonos-button.sc-zonos-invoice-payment{-webkit-box-shadow:0 0 1px 0 var(--zonos-elements-gray-600);box-shadow:0 0 1px 0 var(--zonos-elements-gray-600)}.sc-zonos-invoice-payment-h .zonos--pay-in-base-currency-btn.sc-zonos-invoice-payment{-webkit-box-shadow:none;box-shadow:none}.sc-zonos-invoice-payment-h .zonos--group-btn.sc-zonos-invoice-payment{position:-webkit-sticky;position:sticky;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-direction:column;flex-direction:column;gap:12px;bottom:-4px;padding-top:12px;background:var(--zonos--primary-color, var(--zonos-elements-gray-0))}.sc-zonos-invoice-payment-h .zonos--group-btn.sc-zonos-invoice-payment zonos-text.sc-zonos-invoice-payment{text-align:center}.sc-zonos-invoice-payment-h .zonos--group-btn.sc-zonos-invoice-payment zonos-button.sc-zonos-invoice-payment{width:100%}.sc-zonos-invoice-payment-h .zonos--test-cards.sc-zonos-invoice-payment{margin-top:auto;padding-top:16px}";const O=class{constructor(e){o(this,e),this.mobile=!1,this.tablet=!1,this.collapsed=!1,this.isMobile=!1,this.isTablet=!1,this.isLoading=!0}handleWindowResize(){this.isMobile=P(this.mobile),this.isTablet=_(this.tablet)}componentWillLoad(){this.handleWindowResize(),setTimeout((()=>{this.isLoading=!1}),1e3)}render(){const o=this.isMobile?"gray-1000":"gray-800";return s(n,{key:"be8d8f1688a86ccaa9431cae2885c57a08f3ee9b",class:U(["zonos--invoice-review zonos--elements",this.isMobile&&"mobile",this.isTablet&&"tablet"])},s("div",{key:"74dce7ae0a90490d95852c789d8e27ee51846ed5",class:"zonos--title"},s("zonos-text",{key:"3539a1110abdac4b1dc909f37a4845d8a0ad8fa0",textColor:o,type:"semiBoldLabel"},y("Pay [organizationName]",{organizationName:w.organizationName}))),s("div",{key:"d6feffd7216357889bbe9fba177feb8f24ad9222",class:"zonos--total-pay"},F({content:s("zonos-text",{type:"secondaryPageHeader"},B({amount:D.amountTotalDue||0,isForeign:!0})),isLoading:D.isFetchingPayorInfo,skeletonHeight:"36px",skeletonWidth:"150px"})))}static get assetsDirs(){return["assets"]}};O.style=':host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{position:-webkit-sticky;position:sticky;top:0;background-color:var(--zonos-elements-gray-0);z-index:1}:host .zonos--total-pay{margin:8px 0 24px;display:-ms-flexbox;display:flex;-ms-flex-positive:1;flex-grow:1;-ms-flex-negative:0;flex-shrink:0;-ms-flex-align:center;align-items:center;gap:48px}:host .zonos--total-pay zonos-text{-ms-flex-negative:0;flex-shrink:0}:host .zonos--total-pay::after{content:"";position:relative;height:1px;width:100%;background:var(--zonos-elements-gray-200)}:host(.mobile),:host(.tablet){display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:8px;padding:4px 0;background-color:transparent;position:relative}:host(.mobile) .zonos--total-pay,:host(.tablet) .zonos--total-pay{margin:0}';export{R as zonos_invoice_finish,T as zonos_invoice_footer,W as zonos_invoice_order_details,N as zonos_invoice_payment,O as zonos_invoice_review}
1
+ import{r as o,d as e,h as s,F as t,a as n,g as i}from"./p-ce75b047.js";import{b as a,c as r,t as l,L as c,C as d,M as h,d as p,r as m,D as f}from"./p-6987f9c9.js";import{s as b,c as g,a as u,b as v}from"./p-84dbf474.js";import{t as y,s as z,l as x}from"./p-adb9827c.js";import{z as w}from"./p-f3cfd8fa.js";import{h as k,s as C,g as L,i as I,a as S}from"./p-41dd1cb8.js";import{c as j}from"./p-595f5dd2.js";import{g as M}from"./p-db3b101a.js";import{l as Z,b as H}from"./p-0a377722.js";import{i as P,a as _}from"./p-1f3549c6.js";import{c as U}from"./p-b4b7f705.js";import{l as V}from"./p-97aceb11.js";import{c as D}from"./p-843ced6c.js";import{r as B}from"./p-cfb0059f.js";import{p as $}from"./p-458df669.js";import{r as F}from"./p-1b8771bb.js";import"./p-d28be518.js";import"./p-6d81901a.js";import"./p-4c89d04a.js";const R=class{constructor(s){o(this,s),this.closeClick=e(this,"closeClick",7),this.borderRadius="ROUNDED",this.confirmationId=null,this.isLoading=!0,this.notificationType="success",this.notificationTitle="",this.notificationMessages=[],this.notificationActionText=y("Keep shopping"),this.order=null,this.isWaitingToRedirect=!0,this.pullOrder=async()=>{var o,e;const s=z.checkoutSessionId,t=new URLSearchParams;t.set("checkoutSessionId",s||"");const{baseUrl:n,errors:i,json:a}=await k(`/api/zonos-elements/get-order?${t.toString()}`);return i.length||!(null==a?void 0:a.id)?{baseUrl:n,order:null}:(await(null===(e=(o=w.checkoutSettings).onOrderSuccess)||void 0===e?void 0:e.call(o,{zonosApiRoute:n,zonosOrder:a})),{baseUrl:n,order:a})},this.handleSuccessBehavior=async()=>{this.isLoading=!1,await this.getPullOrder()},this.getPullOrder=async(o=0)=>{var e,s;0===o&&Z("=== Start to poll for order info","info");const{baseUrl:t,order:n}=await this.pullOrder(),i=!!(null===(s=null===(e=null==n?void 0:n.references)||void 0===e?void 0:e.find((o=>"zonosOrderNumber"===(null==o?void 0:o.key))))||void 0===s?void 0:s.value),a=z.checkoutSessionId,r=parseFloat(new URLSearchParams(window.location.search).get("maxPollingRetries")||"0")||30;Z(`=== Polling order (${o} attemps)`,"info"),n?(Z("=== InvoiceOrder info found","info"),o>10&&C({endpoint:`${t}/api/zonos-elements/get-order?checkoutSessionId=${a}&orderId=${n.id}`,errors:[`Invoice order found after ${o} attempts`],metadata:{allLogs:H,checkoutSessionId:z.checkoutSessionId||"",orderId:n.id,storeId:w.storeId}}),this.order=n):n&&i||!(o<r)?C({endpoint:`${t}/api/zonos-elements/get-order?checkoutSessionId=${a}`,errors:[`Invoice order not found after ${r} attempts`],metadata:{allLogs:H,checkoutSessionId:z.checkoutSessionId||"",storeId:w.storeId}}):(await new Promise((o=>setTimeout(o,1e3))),await this.getPullOrder(o+1))},this.checkStripePaymentStatus=async()=>{const o=new URLSearchParams(window.location.search).get("payment_intent_client_secret")||a.clientSecret;if(o||this.storybookForceStatus){const{error:e,messages:s,status:t}=await r({clientSecret:o,storybookForceStatus:this.storybookForceStatus}),n="requires_action"===t||e;this.notificationType=n?"error":"success",this.notificationMessages=s||[],this.notificationTitle=y(n?"Payment failed":"You're all set!"),Z("=== Payment intent retrieve status","info",{clientSecret:o,error:e,messages:s,status:t});const i=new URL(window.location.href);if(i.searchParams.delete("payment_intent_client_secret"),i.searchParams.delete("payment_intent"),i.searchParams.delete("redirect_status"),i.searchParams.delete("zonosCheckoutSessionId"),window.history.replaceState({},"",i.toString()),e&&(null==s?void 0:s.length))b({event:"zonos-checkout-payment-fail"}),C({endpoint:"Stripe payment failed",errors:[`Payment intent "${o.split("_secret_")[0]||o}" status: ${t} - checkout session: ${z.checkoutSessionId}`],metadata:{allLogs:H,credentialToken:window.Zonos.zonosApiKey}});else{b({event:"zonos-checkout-success"}),l({checkoutSessionId:z.checkoutSessionId,eventName:"checkout_orderCompleted"});const o=j("zonos-checkout-success",{message:"Zonos Checkout successfully processed order"});document.dispatchEvent(o),await this.handleSuccessBehavior()}}this.isLoading=!1,c(),d(),z.checkoutSessionId=null},this.checkStagingOrderStatus=async()=>{this.notificationType="success",this.notificationTitle=y("You're all set!"),this.notificationMessages=h("succeeded").messages,await this.handleSuccessBehavior(),c(),d(),g(),z.checkoutSessionId=null},this.checkPaypalPaymentStatus=async()=>{if(u.paypalErrorMessage)return this.notificationType="error",this.notificationTitle=y("Payment failed"),this.notificationMessages=[u.paypalErrorMessage],void(this.isLoading=!1);this.isLoading=!1,u.orderIdCreated&&(b({event:"zonos-checkout-success"}),l({checkoutSessionId:z.checkoutSessionId,eventName:"checkout_orderCompleted"}),this.notificationType="success",this.notificationTitle=y("You're all set!"),this.notificationMessages=h("succeeded").messages,await this.handleSuccessBehavior()),c(),d(),g(),z.checkoutSessionId=null},this.getReceiptUrl=({cartId:o})=>{const e=new URL(`${window.location.origin}/receipt`);e.searchParams.set("referenceId",o),L()&&e.searchParams.set("zonosTestMode","1");const s=new URLSearchParams(window.location.search).get("zonosQaUrl");return s&&e.searchParams.set("zonosQaUrl",s),e.toString()}}componentDidLoad(){if(this.overrideNotification)return this.notificationType=this.overrideNotification.type,this.notificationTitle=this.overrideNotification.title,this.notificationMessages=this.overrideNotification.messages,void(this.isLoading=!1);p.isStagingMode?this.checkStagingOrderStatus():u.orderIdCreated?this.checkPaypalPaymentStatus():this.checkStripePaymentStatus()}render(){const o=window.Zonos.cartId;return s(n,{key:"5f563128da4ccbf30f9f09446760a83666be0987",class:"zonos--checkout-finish zonos--elements",style:{"--zonos--border-radius":M({overrideBorderStyle:this.borderRadius})}},!this.isLoading&&s("div",{key:"276f35404f91ae34b310e1f006770a8885a9751d",class:"zonos--finish-details"},s("div",{key:"e6f73be5adced5c4d7598a7c41827414a41b75fc",class:"zonos--group"},s("zonos-icon","success"===this.notificationType?{"aria-label":"Order success",content:'<svg color="var(--zonos-elements-blue-800)" fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="https://www.w3.org/2000/svg"><path clip-rule="evenodd" d="M2 12C2 6.477 6.477 2 12 2s10 4.477 10 10-4.477 10-10 10S2 17.523 2 12Z" data-is-secondary-color="true" fill="var(--zonos-elements-blue-100)" fill-rule="evenodd"></path><path clip-rule="evenodd" d="M15.707 9.293a1 1 0 0 1 0 1.414l-3.646 3.647a1.5 1.5 0 0 1-2.122 0l-1.646-1.647a1 1 0 1 1 1.414-1.414L11 12.586l3.293-3.293a1 1 0 0 1 1.414 0Z" fill="currentColor" fill-rule="evenodd"></path></svg>',iconColor:"blue-800",size:50}:{"aria-label":"Order failed",content:'<svg color="var(--zonos-elements-red-800)" fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="https://www.w3.org/2000/svg"><path clip-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" data-is-secondary-color="true" fill="var(--zonos-elements-red-200)" fill-rule="evenodd"></path><path clip-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" fill="currentColor" fill-rule="evenodd"></path></svg>',iconColor:"red-800",size:50}),s("zonos-text",{key:"5c010a8bc22853ceb669b64cb0ac608dbd01f78c",class:"zonos--title",type:"semiBoldSubheader"},this.notificationTitle),this.confirmationId&&s("zonos-badge",{key:"c20d9274ef2d3824e581a172b416451f8ed0f4fb",badgeColor:"gray"},this.confirmationId),s("zonos-text",{key:"eab62f7ca2bb6f9a610179a9c3a345844bf99d5b",class:"zonos--subtitle",textColor:"gray-600"},this.notificationMessages.map((o=>s(t,null,o,s("br",null))))),this.order&&o&&s("div",{key:"5a870802ce9b2b34769ac1fa2920e17eed0d1c91",class:"zonos--button-container"},s("zonos-button",{key:"09784e7c0a421a304987d84c1d81f0ee2995c0eb",onClick:()=>{window.open(this.getReceiptUrl({cartId:o}),"_blank")},size:"lg",variant:"primary"},y("View receipt"))))))}static get assetsDirs(){return["assets"]}};R.style=":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;height:100%}:host .zonos--group{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;margin-bottom:24px;border-radius:var(--zonos--border-radius, 10px);gap:24px;margin-top:24px;background-color:var(--zonos-elements-gray-50);padding:48px}:host .zonos--finish-details{max-width:640px;min-width:300px;line-height:24px;width:0 auto;margin:auto}:host zonos-button{width:100%}:host .loading-wrapper{min-height:300px;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center}:host .zonos--finish-button-wrapper{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;gap:16px;margin:0 auto;margin-top:48px;max-width:300px}:host .zonos--button-container{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;gap:16px;margin:0 auto}:host .zonos--subtitle{text-align:center}:host .zonos--order-number{background-color:var(--zonos-elements-gray-0);border:1px solid var(--zonos-elements-gray-200);color:var(--zonos-elements-gray-800);border-radius:var(--zonos-elements-radius-6);padding:4px 8px}";const T=class{constructor(e){o(this,e),this.mobile=!1,this.tablet=!1,this.showLanguageDialog=!1,this.isMobile=!1,this.isTablet=!1}handleGlobalClick(o){!this.el.contains(o.target)&&this.showLanguageDialog&&(this.showLanguageDialog=!1)}toggleLanguageDialog(){this.showLanguageDialog=!this.showLanguageDialog}handleMobileChange(){this.isMobile=P(this.mobile)}handleTabletChange(){this.isTablet=_(this.tablet)}componentWillLoad(){this.isMobile=P(this.mobile),this.isTablet=_(this.tablet)}render(){var o;const e=null===(o=V.find((o=>o.code===x.selectedLocale)))||void 0===o?void 0:o.label,t="gray-1000";return s(n,{key:"01fce97d4d724d4bca4973a426e131da5a01dc16",class:U(["zonos--elements",this.isMobile&&"mobile",this.isTablet&&"tablet"])},s("div",{key:"99e579f6903c96c8540d5010fc128173e34e0997",class:"zonos--invoice-footer"},s("div",{key:"fa45f5e6fbb2ff06265f252fd3c3acf74b265e1e",class:"zonos--invoice-locale-wrapper"},s("zonos-button",{key:"3496814c51949ff1f1d727bd5c9fabeb4b86372f",buttonColor:t,class:"zonos--invoice-footer-language-button",icon:s("zonos-icon",{"aria-label":"Language select",content:'<svg width="24" height="24" viewBox="0 0 24 24" fill="none" color="var(--zonos-elements-gray-1000)" xmlns="http://www.w3.org/2000/svg">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M20 12C20 16.4183 16.4183 20 12 20C7.58172 20 4 16.4183 4 12C4 7.58172 7.58172 4 12 4C16.4183 4 20 7.58172 20 12ZM11.4709 5.80634C11.7686 5.53723 11.9541 5.5 12 5.5C12.0459 5.5 12.2314 5.53723 12.5291 5.80634C12.8115 6.06164 13.1289 6.46913 13.4271 7.03651C13.9505 8.03191 14.3838 9.46098 14.48 11.25H9.51996C9.61624 9.46098 10.0495 8.03191 10.5729 7.03651C10.8711 6.46913 11.1885 6.06164 11.4709 5.80634ZM8.01802 11.25C8.11591 9.23031 8.60319 7.55958 9.24516 6.33849C9.29983 6.23451 9.35585 6.13335 9.41312 6.03514C7.32916 6.94017 5.81218 8.90533 5.5428 11.25H8.01802ZM5.5428 12.75H8.01802C8.11591 14.7697 8.60319 16.4404 9.24516 17.6615C9.29983 17.7655 9.35585 17.8666 9.41312 17.9649C7.32916 17.0598 5.81218 15.0947 5.5428 12.75ZM9.51996 12.75H14.48C14.3838 14.539 13.9505 15.9681 13.4271 16.9635C13.1289 17.5309 12.8115 17.9384 12.5291 18.1937C12.2314 18.4628 12.0459 18.5 12 18.5C11.9541 18.5 11.7686 18.4628 11.4709 18.1937C11.1885 17.9384 10.8711 17.5309 10.5729 16.9635C10.0495 15.9681 9.61624 14.539 9.51996 12.75ZM15.982 12.75C15.8841 14.7697 15.3968 16.4404 14.7548 17.6615C14.7002 17.7655 14.6441 17.8666 14.5869 17.9649C16.6708 17.0598 18.1878 15.0947 18.4572 12.75H15.982ZM18.4572 11.25C18.1878 8.90533 16.6708 6.94017 14.5869 6.03514C14.6441 6.13335 14.7002 6.23451 14.7548 6.33849C15.3968 7.55958 15.8841 9.23031 15.982 11.25H18.4572Z" fill="currentColor"/>\n</svg>\n',iconColor:t}),onClick:()=>this.toggleLanguageDialog(),variant:"subtle"},s("span",{key:"c669df5b12bce8be322fca8d0cb76a29b088fd25",class:"zonos--invoice-locale-label"},e,s("zonos-icon",{key:"748444a42af6feef4378b418341927c15e9dc293","aria-hidden":"true",class:"zonos--invoice-locale-chevron",content:'<svg color="var(--zonos-elements-gray-400)" fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="https://www.w3.org/2000/svg"><path clip-rule="evenodd" d="M6.293 9.293a1 1 0 0 1 1.414 0L12 13.586l4.293-4.293a1 1 0 0 1 1.414 1.414l-4.93 4.93a1.1 1.1 0 0 1-1.555 0l-4.93-4.93a1 1 0 0 1 0-1.414Z" fill="currentColor" fill-rule="evenodd"></path></svg>',iconColor:t,size:18}))),s("div",{key:"80943da0cc442ff525c7fd8f5d3f0159933b1950",class:U(["zonos--invoice-language-dialog",this.showLanguageDialog&&"zonos--invoice-language-dialog-open"])},s("zonos-language-select",{key:"5f72d992de939c0159979b7b054f50e803499d64",handleOnClose:()=>this.toggleLanguageDialog()}))),s("div",{key:"5f751d324bea65a722d60643f7a55a83648dbff9",class:"zonos--invoice-footer-icon-wrapper"},s("div",{key:"041e633d638437535b04029bcc0173f69dc8861c",class:"zonos--invoice-footer-logo"},s("zonos-text",{key:"57adb6eb396406aa2e1bf01e404fd53bc2c9c2cf",textColor:t},y("Powered by")),s("a",{key:"6e87d992ab4d97d2edf7be4ee3d2a07d77dd93ea",href:"https://zonos.com",target:"_blank",title:"Zonos website"},s("zonos-icon",{key:"f13be4e13b4991b65f052587feba6e0b08382332",autoHeight:!0,content:'<svg width="43" height="10" viewBox="0 0 43 10" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M7.35896 0.0640869H0.30768C0.166068 0.0640869 0.0512695 0.178886 0.0512695 0.320497V1.85896C0.0512695 2.00057 0.166068 2.11537 0.30768 2.11537H4.44439C4.54964 2.11537 4.61005 2.2352 4.54745 2.31982L0.151823 8.2615C0.0865163 8.34978 0.0512695 8.45669 0.0512695 8.56649V9.67947C0.0512695 9.82108 0.166068 9.93588 0.30768 9.93588H7.35896C7.50057 9.93588 7.61537 9.82108 7.61537 9.67947V8.14101C7.61537 7.9994 7.50057 7.8846 7.35896 7.8846H3.22226C3.117 7.8846 3.05659 7.76477 3.11919 7.68015L7.51482 1.73847C7.58013 1.65019 7.61537 1.54328 7.61537 1.43348V0.320497C7.61537 0.178886 7.50057 0.0640869 7.35896 0.0640869Z" fill="var(--zonos-elements-gray-800)"/>\n<path fill-rule="evenodd" clip-rule="evenodd" d="M11.718 0C10.1602 0 8.89746 1.26279 8.89746 2.82051V7.17949C8.89746 8.73721 10.1602 10 11.718 10H13.6411C15.1988 10 16.4616 8.73721 16.4616 7.17949V2.82051C16.4616 1.26279 15.1988 0 13.6411 0H11.718ZM11.718 2.05128C11.2931 2.05128 10.9487 2.39568 10.9487 2.82051V7.17949C10.9487 7.60432 11.2931 7.94872 11.718 7.94872H13.6411C14.0659 7.94872 14.4103 7.60432 14.4103 7.17949V5V2.82051C14.4103 2.39568 14.0659 2.05128 13.6411 2.05128H11.718Z" fill="var(--zonos-elements-gray-800)"/>\n<path d="M17.7437 0.436316V9.71132C17.7437 9.85293 17.8585 9.96773 18.0001 9.96773H19.5385C19.6801 9.96773 19.7949 9.85293 19.7949 9.71132V3.74801C19.7949 3.44829 19.969 3.17587 20.241 3.04996L22.1641 2.15964C22.6739 1.92363 23.2565 2.29592 23.2565 2.85769V9.71132C23.2565 9.85293 23.3713 9.96773 23.5129 9.96773H25.0513C25.193 9.96773 25.3078 9.85293 25.3078 9.71132V2.85595C25.3078 0.79631 23.1718 -0.568775 21.3027 0.296257L19.9742 0.911055C19.8685 0.959946 19.7432 0.931536 19.669 0.84187L19.2748 0.365697C19.1773 0.248019 19.0325 0.179905 18.8797 0.179905H18.0001C17.8585 0.179905 17.7437 0.294704 17.7437 0.436316Z" fill="var(--zonos-elements-gray-800)"/>\n<path fill-rule="evenodd" clip-rule="evenodd" d="M29.4104 0C27.8526 0 26.5898 1.26279 26.5898 2.82051V7.17949C26.5898 8.73721 27.8526 10 29.4104 10H31.3334C32.8912 10 34.1539 8.73721 34.1539 7.17949V2.82051C34.1539 1.26279 32.8912 0 31.3334 0H29.4104ZM29.4104 2.05128C28.9855 2.05128 28.6411 2.39568 28.6411 2.82051V7.17949C28.6411 7.60432 28.9855 7.94872 29.4104 7.94872H31.3334C31.7583 7.94872 32.1027 7.60432 32.1027 7.17949V2.82051C32.1027 2.39568 31.7583 2.05128 31.3334 2.05128H29.4104Z" fill="var(--zonos-elements-gray-800)"/>\n<path d="M38.2085 0.0640869H40.3889C41.8309 0.0640869 42.9999 1.23306 42.9999 2.67506C42.9999 2.79477 42.9108 2.89574 42.792 2.91059L41.1732 3.11293C41.054 3.12784 40.9486 3.03485 40.9486 2.91466C40.9486 2.47322 40.5908 2.11537 40.1493 2.11537H38.3397C37.8688 2.11537 37.4871 2.49712 37.4871 2.96803C37.4871 3.3685 37.7658 3.71501 38.1569 3.80087L40.7916 4.37922C42.0811 4.66229 42.9999 5.80462 42.9999 7.12486C42.9999 8.67735 41.7414 9.93588 40.1889 9.93588H38.0468C36.6048 9.93588 35.4358 8.76691 35.4358 7.32491C35.4358 7.2052 35.5249 7.10423 35.6437 7.08938L37.2625 6.88703C37.3817 6.87213 37.4871 6.96512 37.4871 7.08531C37.4871 7.52675 37.8449 7.8846 38.2864 7.8846H40.1176C40.5765 7.8846 40.9486 7.51252 40.9486 7.05354C40.9486 6.67478 40.6925 6.34394 40.3258 6.24901L37.5136 5.52093C36.2902 5.20422 35.4358 4.10042 35.4358 2.83676C35.4358 1.30545 36.6772 0.0640869 38.2085 0.0640869Z" fill="var(--zonos-elements-gray-700)"/>\n</svg>\n',size:42}))),s("div",{key:"44dbef690ef8088bfc30f2fc7dc83f693cd530f4",class:"dot"}),s("a",{key:"341ceb26c07e9d0aa1f273fc8ba0e92a7ddfb93b",href:"https://zonos.com/docs/legal/zonos-privacy-policy",target:"_blank"},s("zonos-text",{key:"47b7c26113144d942fc98f1dd87883f818e2ef2a",textColor:t},y("Privacy policy"))))))}get el(){return i(this)}static get watchers(){return{mobile:["handleMobileChange"],tablet:["handleTabletChange"]}}};T.style=":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{position:absolute;bottom:0;left:32px;right:32px;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;z-index:2}:host .zonos--invoice-footer{gap:16px;display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;padding:12px;padding-left:0;-ms-flex-align:center;align-items:center;width:100%}:host .zonos--invoice-footer .zonos--invoice-footer-icon-wrapper{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:16px}:host .zonos--invoice-footer .zonos--invoice-footer-icon-wrapper .zonos--invoice-footer-logo{display:-ms-inline-flexbox;display:inline-flex;gap:8px;-ms-flex-align:center;align-items:center}:host .zonos--invoice-footer .zonos--invoice-footer-icon-wrapper .zonos--invoice-footer-logo a{line-height:0}:host .zonos--invoice-footer .zonos--invoice-footer-icon-wrapper a{text-decoration:none}:host .zonos--invoice-footer zonos-button button.outline{outline:1px solid var(--zonos-elements-gray-800)}:host .zonos--invoice-footer .zonos--invoice-locale-wrapper{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:8px;position:relative}@media (max-width: 400px){:host .zonos--invoice-footer .zonos--invoice-locale-wrapper{gap:4px}}:host .zonos--invoice-footer .zonos--invoice-locale-wrapper .zonos--invoice-locale-label{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;gap:4px}:host .zonos--invoice-footer .zonos--invoice-language-dialog{position:absolute;bottom:36px;left:var(--language-dialog-left);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);width:360px;max-width:100vw;max-height:500px;z-index:2147483011;overflow:auto;-webkit-transform:scale(0);transform:scale(0);-webkit-transform-origin:bottom left;transform-origin:bottom left;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}:host .zonos--invoice-footer .zonos--invoice-language-dialog::-webkit-scrollbar{width:10px}:host .zonos--invoice-footer .zonos--invoice-language-dialog::-webkit-scrollbar-track{background:var(--zonos-elements-gray-50)}:host .zonos--invoice-footer .zonos--invoice-language-dialog::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}:host .zonos--invoice-footer .zonos--invoice-language-dialog::-webkit-scrollbar-thumb:hover{background:#d6d6d6}:host .zonos--invoice-footer .zonos--invoice-language-dialog::-webkit-scrollbar-track{border-top-right-radius:var(--zonos-elements-radius-12);border-bottom-right-radius:var(--zonos-elements-radius-12)}:host .zonos--invoice-footer .zonos--invoice-language-dialog.zonos--invoice-language-dialog-open{opacity:1;-webkit-transform:scale(1);transform:scale(1)}:host .dot{display:-ms-inline-flexbox;display:inline-flex;background:var(--zonos-elements-gray-400);width:6px;height:6px;border-radius:50%}:host(.mobile),:host(.tablet){background-color:var(--zonos-elements-gray-0);width:100%;position:-webkit-sticky;position:sticky;bottom:0}:host(.tablet) .zonos--invoice-footer{width:100%;max-width:800px;-ms-flex-pack:justify;justify-content:space-between;display:-ms-flexbox;display:flex}:host(.mobile){-ms-flex-order:3;order:3}:host(.mobile) .zonos--invoice-locale-wrapper{display:none}:host(.mobile) .zonos--invoice-footer{-ms-flex-pack:center;justify-content:center}";const W=class{constructor(s){o(this,s),this.collapseClicked=e(this,"collapseClicked",7),this.mobile=!0,this.landedCostId="",this.isMobile=!1,this.collapseState=this.collapsed}handleCollapseChangeFromProp(o){this.collapseState=o}handleCollapseChange(o){this.collapseClicked.emit(o)}handleWindowResize(){this.isMobile=I(this.mobile)}componentWillLoad(){this.handleWindowResize()}render(){return s(n,{class:U(["zonos--invoice-order-details zonos--elements",this.isMobile&&"mobile"])},s("div",{class:"zonos--wrapper"},s("button",{class:"zonos--order-details-header",onClick:()=>{this.collapseState=!this.collapseState},type:"button"},s("div",{class:"zonos--order-details-header-text"},s("zonos-text",{type:"boldSubheader"},y("Pay [organizationName]",{organizationName:w.organizationName})),(()=>s("zonos-icon",this.collapseState?{"aria-label":"Collapse expanded section",content:'<svg color="var(--zonos-elements-gray-400)" fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="https://www.w3.org/2000/svg"><path clip-rule="evenodd" d="M6.293 9.293a1 1 0 0 1 1.414 0L12 13.586l4.293-4.293a1 1 0 0 1 1.414 1.414l-4.93 4.93a1.1 1.1 0 0 1-1.555 0l-4.93-4.93a1 1 0 0 1 0-1.414Z" fill="currentColor" fill-rule="evenodd"></path></svg>',iconColor:"gray-1200"}:{"aria-label":"Expand collapsed section",content:'<svg color="var(--zonos-elements-gray-400)" fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="https://www.w3.org/2000/svg"><path clip-rule="evenodd" d="M17.707 14.707a1 1 0 0 1-1.414 0L12 10.414l-4.293 4.293a1 1 0 0 1-1.414-1.414l4.93-4.93a1.1 1.1 0 0 1 1.555 0l4.93 4.93a1 1 0 0 1 0 1.414Z" fill="currentColor" fill-rule="evenodd"></path></svg>',iconColor:"gray-1200"}))()),s("zonos-text",{type:"boldSubheader"},B({amount:D.amountTotalDue||0,isForeign:!0}))),s("div",{class:"zonos--order-details-wrapper"},s("zonos-collapse",{collapsed:this.collapseState},s("div",{class:"zonos--invoice-order-details-content"},s("zonos-invoice-cart-items",{isMobile:this.isMobile}),s("zonos-invoice-subtotal",{isMobile:this.isMobile}))))))}static get assetsDirs(){return["assets"]}static get watchers(){return{collapsed:["handleCollapseChangeFromProp"],collapseState:["handleCollapseChange"]}}};W.style=":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{height:100%}:host *{-ms-scroll-chaining:none;overscroll-behavior:contain}:host *::-webkit-scrollbar{width:10px}:host *::-webkit-scrollbar-track{background:var(--zonos-elements-gray-50)}:host *::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}:host *::-webkit-scrollbar-thumb:hover{background:#d6d6d6}:host .zonos--order-details-header-text{display:-ms-flexbox;display:flex}:host .zonos--wrapper{overflow:auto;background-color:var(--zonos-elements-gray-50);border-radius:16px;height:100%;min-height:56px}:host .zonos--order-details-header-text{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:8px}:host .zonos--order-details-header{position:-webkit-sticky;position:sticky;top:0;z-index:1;-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:var(--zonos-elements-gray-50);border:none;display:-ms-flexbox;display:flex;padding:16px 16px 0 16px;width:100%;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:center;align-items:center}:host .zonos--order-details-header:focus-visible{outline:none}:host .zonos--order-details-wrapper{position:relative;padding:0 16px 16px 16px}:host .zonos--invoice-order-details-content{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:16px}:host .zonos--invoice-order-info{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:32px}:host .zonos--invoice-order-info .zonos--invoice-order-details-row{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:16px}:host .zonos--invoice-order-info .zonos--invoice-order-details-row>*{-ms-flex:1 1 150px;flex:1 1 150px}:host .zonos--invoice-order-info .zonos--invoice-order-details-column{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:8px}:host .zonos--invoice-order-info .zonos--invoice-order-shipping-info{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:0}";const N=class{constructor(s){o(this,s),this.continueClicked=e(this,"continueClicked",7),this.paypalSessionFailed=e(this,"paypalSessionFailed",7),this.paypalSessionDone=e(this,"paypalSessionDone",7),this.storeUnsubscribeList=[],this.continueLoading=!1,this.showErrorBanner=!1,this.hasStripePaymentError=!1,this.stagingOrderCreateErrorMessage="",this.internalContinueLoading=this.continueLoading,this.handleValidate=()=>{var o;return!!(null===(o=a.stripePaymentEventData)||void 0===o?void 0:o.complete)},this.continueClickHandler=async({currencyCode:o})=>{var e,s;if(!this.handleValidate())return null===(e=a.stripeBillingAddressElement)||void 0===e||e.getValue(),this.showErrorBanner=!0,null===(s=a.stripeElements)||void 0===s||s.submit(),void setTimeout((()=>{var o;null===(o=this.ele.querySelector("zonos-banner"))||void 0===o||o.scrollIntoView({behavior:"smooth"})}),10);a.checkoutSettlementCurrency=o,b({event:"zonos-checkout-payment-info"}),this.continueClicked.emit()},this.copyCardToClipboard=async o=>{try{await navigator.clipboard.writeText(o)}catch(e){const s=document.createElement("textarea");s.style.position="fixed",s.style.left="-1000px",s.style.top="-1000px",s.style.width="1px",s.style.height="1px",s.value=o,s.id="zonos-copy-card-number",document.body.appendChild(s),s.select(),document.execCommand("copy"),document.body.removeChild(s)}window.Zonos.showNotification({message:y("Card number copied to clipboard"),timeout:4e3,type:"success"})},this.placeTestOrder=async()=>{this.internalContinueLoading=!0;const{errors:o}=await $();if(o.length)return this.stagingOrderCreateErrorMessage=o[0]||"Failed to create staging order. Please try again.",void(this.internalContinueLoading=!1);this.internalContinueLoading=!1,m()}}continueLoadingWatcher(){this.internalContinueLoading=this.continueLoading}stripePaymentErrorWatcher(){this.hasStripePaymentError&&setTimeout((()=>{var o;null===(o=this.ele.querySelector("zonos-banner"))||void 0===o||o.scrollIntoView({behavior:"smooth"})}),50)}componentWillLoad(){this.storeUnsubscribeList=[f("currency",(()=>{v({currency:p.currency})}))],v({currency:p.currency})}disconnectedCallback(){this.storeUnsubscribeList.forEach((o=>o()))}render(){var o;if(this.hasStripePaymentError=a.hasPaymentError,!a.stripeElements)return null;if(!a.clientSecret)return null;this.showErrorBanner&&(this.showErrorBanner=!this.handleValidate());const e=L(),i=p.isStagingMode||S(),r="external_paypal"===(null===(o=a.stripePaymentEventData)||void 0===o?void 0:o.value.type);return s(n,{class:"zonos--checkout-payment zonos--elements"},s("div",{class:"zonos--group"},s("zonos-text",{class:"zonos--title",type:"semiBoldSubheader"},y("Payment method")),(()=>{if(i){const o=w.appearance.theme;return s(t,null,this.stagingOrderCreateErrorMessage&&s("zonos-banner",{class:"zonos--error-banner",intent:"error"},this.stagingOrderCreateErrorMessage),s("zonos-empty-state-payment",{emptyStateText:y("No payment method needed for staging"),theme:o}),s("div",{class:"zonos--group-btn"},s("zonos-button",{backgroundColor:this.submitBtnColor,loading:this.internalContinueLoading,onClick:()=>{this.placeTestOrder()},size:"lg",variant:this.submitBtnType},y("Place test order"))))}return a.isFetchingSession||D.isFetchingPayorInfo?null:s(t,null,this.showErrorBanner&&s("zonos-banner",{class:"zonos--error-banner",intent:"error"},y("Missing required fields. Make sure all fields are completed.")),this.hasStripePaymentError&&s("zonos-banner",{class:"zonos--payment-error-banner",intent:"error"},a.customErrorMessage||y("We couldn't complete your payment. Please verify the payment details and try again.")),u.paypalErrorMessage&&s("zonos-banner",{class:"zonos--payment-error-banner",intent:"error"},u.paypalErrorMessage),s("zonos-payment",null),s("div",{class:"zonos--group-btn"},!r&&s(t,null,s("zonos-button",{backgroundColor:this.submitBtnColor,bold:!0,isDisabled:this.continueLoading&&"USD"===a.checkoutSettlementCurrency,loading:this.continueLoading&&"USD"!==a.checkoutSettlementCurrency,onClick:async()=>{p.checkoutSession?await this.continueClickHandler({currencyCode:p.checkoutSession.subtotals.presentmentCurrencyCode}):Z("Checkout session is not found")},size:"lg",variant:this.submitBtnType},y("Pay [orderTotal]",{orderTotal:B({amount:D.amountTotalDue||0,isForeign:!0})})),a.shouldRenderPayInUsdButton&&s("zonos-button",{class:"zonos--pay-in-base-currency-btn",isDisabled:this.continueLoading&&"USD"!==a.checkoutSettlementCurrency,loading:this.continueLoading&&"USD"===a.checkoutSettlementCurrency,onClick:async()=>{await this.continueClickHandler({currencyCode:"USD"})},size:"lg",variant:"subtle"},y("Click to pay in USD"))),s("zonos-paypal-payment",{onPaypalSessionDone:({detail:{orderId:o}})=>{this.paypalSessionDone.emit(o)},onPaypalSessionFail:()=>this.paypalSessionFailed.emit(),style:{display:r?"block":"none"}})),e&&s("zonos-card",{backgroundColor:"gray-100",borderRadius:12,class:"zonos--test-cards"},s("zonos-v-stack",{spacing:16},s("div",null,s("zonos-text",{type:"semiBoldLabel"},y("Test cards")),s("zonos-text",{textColor:"gray-700"},y("Click to copy the card number. Use any future expiration date and three number CVC."))),s("zonos-button",{icon:s("zonos-icon",{content:'<svg color="var(--zonos-elements-gray-1000)" xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path fill="var(--zonos-elements-gray-1000)" d="M15.342 10.21a.75.75 0 0 0-1.184-.92l-2.978 3.829-1.4-1.4a.75.75 0 1 0-1.06 1.061l1.8 1.8a1 1 0 0 0 1.496-.093l3.326-4.277Z"/><path fill="var(--zonos-elements-gray-1000)" fill-rule="evenodd" d="M12 4a8 8 0 1 0 0 16 8 8 0 0 0 0-16Zm-6.5 8a6.5 6.5 0 1 1 13 0 6.5 6.5 0 0 1-13 0Z" clip-rule="evenodd"/></svg>'}),justifyContent:"flex-start",onClick:()=>this.copyCardToClipboard("4242424242424242")},y("Success")," (****4242)"),s("zonos-button",{icon:s("zonos-icon",{content:'<svg color="var(--zonos-elements-gray-1000)" xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path fill="var(--zonos-elements-gray-1000)" d="M14.475 10.586a.75.75 0 1 0-1.06-1.06L12 10.938l-1.414-1.414a.75.75 0 0 0-1.06 1.06L10.938 12l-1.414 1.414a.75.75 0 1 0 1.06 1.06L12 13.062l1.414 1.414a.75.75 0 0 0 1.06-1.06L13.062 12l1.414-1.414Z"/><path fill="var(--zonos-elements-gray-1000)" fill-rule="evenodd" d="M12 4a8 8 0 1 0 0 16 8 8 0 0 0 0-16Zm-6.5 8a6.5 6.5 0 1 1 13 0 6.5 6.5 0 0 1-13 0Z" clip-rule="evenodd"/></svg>'}),justifyContent:"flex-start",onClick:()=>this.copyCardToClipboard("4000000000000002")},y("Failure")," (****0002)")),s("zonos-notification",null)))})()))}get ele(){return i(this)}static get watchers(){return{continueLoading:["continueLoadingWatcher"],hasStripePaymentError:["stripePaymentErrorWatcher"]}}};N.style=".sc-zonos-invoice-payment-h{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-invoice-payment-h *.sc-zonos-invoice-payment{font-family:var(--zonos--font-family, Inter), Inter}.sc-zonos-invoice-payment-h img.sc-zonos-invoice-payment{max-width:100%}.sc-zonos-invoice-payment-h dl.sc-zonos-invoice-payment,.sc-zonos-invoice-payment-h dd.sc-zonos-invoice-payment,.sc-zonos-invoice-payment-h h1.sc-zonos-invoice-payment,.sc-zonos-invoice-payment-h h2.sc-zonos-invoice-payment,.sc-zonos-invoice-payment-h h3.sc-zonos-invoice-payment,.sc-zonos-invoice-payment-h h4.sc-zonos-invoice-payment,.sc-zonos-invoice-payment-h h5.sc-zonos-invoice-payment,.sc-zonos-invoice-payment-h h6.sc-zonos-invoice-payment,.sc-zonos-invoice-payment-h hr.sc-zonos-invoice-payment,.sc-zonos-invoice-payment-h figure.sc-zonos-invoice-payment,.sc-zonos-invoice-payment-h p.sc-zonos-invoice-payment,.sc-zonos-invoice-payment-h pre.sc-zonos-invoice-payment{margin:0}.sc-zonos-invoice-payment-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-invoice-payment-h{overflow:hidden;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex:1;flex:1}.sc-zonos-invoice-payment-h .zonos--title.sc-zonos-invoice-payment{margin-bottom:24px}.sc-zonos-invoice-payment-h .zonos--group.sc-zonos-invoice-payment{margin-bottom:20px;overflow:auto;padding:5px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex:1;flex:1;-ms-scroll-chaining:none;overscroll-behavior:contain}.sc-zonos-invoice-payment-h .zonos--group.sc-zonos-invoice-payment::-webkit-scrollbar{width:10px}.sc-zonos-invoice-payment-h .zonos--group.sc-zonos-invoice-payment::-webkit-scrollbar-track{background:var(--zonos-elements-gray-50)}.sc-zonos-invoice-payment-h .zonos--group.sc-zonos-invoice-payment::-webkit-scrollbar-thumb{border-radius:10px;background:#cccccc;border:3px solid transparent;background-clip:content-box}.sc-zonos-invoice-payment-h .zonos--group.sc-zonos-invoice-payment::-webkit-scrollbar-thumb:hover{background:#d6d6d6}.sc-zonos-invoice-payment-h .zonos--payment-error-banner.sc-zonos-invoice-payment{margin-bottom:8px}.sc-zonos-invoice-payment-h .zonos--error-banner.sc-zonos-invoice-payment{margin-bottom:16px}.sc-zonos-invoice-payment-h zonos-button.sc-zonos-invoice-payment{-webkit-box-shadow:0 0 1px 0 var(--zonos-elements-gray-600);box-shadow:0 0 1px 0 var(--zonos-elements-gray-600)}.sc-zonos-invoice-payment-h .zonos--pay-in-base-currency-btn.sc-zonos-invoice-payment{-webkit-box-shadow:none;box-shadow:none}.sc-zonos-invoice-payment-h .zonos--group-btn.sc-zonos-invoice-payment{position:-webkit-sticky;position:sticky;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-direction:column;flex-direction:column;gap:12px;bottom:-4px;padding-top:12px;background:var(--zonos--primary-color, var(--zonos-elements-gray-0))}.sc-zonos-invoice-payment-h .zonos--group-btn.sc-zonos-invoice-payment zonos-text.sc-zonos-invoice-payment{text-align:center}.sc-zonos-invoice-payment-h .zonos--group-btn.sc-zonos-invoice-payment zonos-button.sc-zonos-invoice-payment{width:100%}.sc-zonos-invoice-payment-h .zonos--test-cards.sc-zonos-invoice-payment{margin-top:auto;padding-top:16px}";const O=class{constructor(e){o(this,e),this.mobile=!1,this.tablet=!1,this.collapsed=!1,this.isMobile=!1,this.isTablet=!1,this.isLoading=!0}handleWindowResize(){this.isMobile=P(this.mobile),this.isTablet=_(this.tablet)}componentWillLoad(){this.handleWindowResize(),setTimeout((()=>{this.isLoading=!1}),1e3)}render(){const o=this.isMobile?"gray-1000":"gray-800";return s(n,{key:"52bdf36710017e5fa9edc0c138639a06cb5d05c5",class:U(["zonos--invoice-review zonos--elements",this.isMobile&&"mobile",this.isTablet&&"tablet"])},s("div",{key:"3511c440fbf6ae155eca4d3a492f149dbfdef4c6",class:"zonos--title"},s("zonos-text",{key:"8760547d3874af10a3b7e91e294ac6e68348db4f",textColor:o,type:"semiBoldLabel"},y("Pay [organizationName]",{organizationName:w.organizationName}))),s("div",{key:"09cd06a131b0e429e4797cea8eaf41b05cb7b676",class:"zonos--total-pay"},F({content:s("zonos-text",{type:"secondaryPageHeader"},B({amount:D.amountTotalDue||0,isForeign:!0})),isLoading:D.isFetchingPayorInfo,skeletonHeight:"36px",skeletonWidth:"150px"})))}static get assetsDirs(){return["assets"]}};O.style=':host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{position:-webkit-sticky;position:sticky;top:0;background-color:var(--zonos-elements-gray-0);z-index:1}:host .zonos--total-pay{margin:8px 0 24px;display:-ms-flexbox;display:flex;-ms-flex-positive:1;flex-grow:1;-ms-flex-negative:0;flex-shrink:0;-ms-flex-align:center;align-items:center;gap:48px}:host .zonos--total-pay zonos-text{-ms-flex-negative:0;flex-shrink:0}:host .zonos--total-pay::after{content:"";position:relative;height:1px;width:100%;background:var(--zonos-elements-gray-200)}:host(.mobile),:host(.tablet){display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:8px;padding:4px 0;background-color:transparent;position:relative}:host(.mobile) .zonos--total-pay,:host(.tablet) .zonos--total-pay{margin:0}';export{R as zonos_invoice_finish,T as zonos_invoice_footer,W as zonos_invoice_order_details,N as zonos_invoice_payment,O as zonos_invoice_review}
@@ -1 +1 @@
1
- import{r as o,d as s,h as e,a as i,g as t}from"./p-ce75b047.js";import{f as r,z as n}from"./p-f3cfd8fa.js";import{c as a}from"./p-b4b7f705.js";import{g as l}from"./p-db3b101a.js";import{g as d}from"./p-c9a1f774.js";import{i as h}from"./p-ae393255.js";import"./p-0a377722.js";import"./p-d28be518.js";import"./p-6d81901a.js";const p=class{constructor(e){o(this,e),this.radioSelected=s(this,"radioSelected",7),this.selectedItem=null,this.handleRichRadioSelect=o=>{var s;null===(s=this.radioSelected)||void 0===s||s.emit(o)},this.getRadioItemStyleVariables=()=>{const o=this.borderColor||n.appearance.colorSecondary,s=this.isMobile?"--zonos-elements-gray-0":n.appearance.colorPrimary,e=s&&o?d({backgroundColor:h(s)?window.getComputedStyle(this.ele).getPropertyValue(`--zonos-elements-${s.replace("--zonos-elements-","")}`):s,color:o}):o;return{"--zonos--border-radius":l({overrideBorderStyle:this.borderStyle}),"--zonos--selected-border-color":e||"unset"}}}render(){var o;return e(i,{key:"8d77a01ba101899adb41904a820ba5f4985bc52d",class:"zonos--shipping-rich-radio zonos--elements","data-theme":this.theme,style:Object.assign(Object.assign({},this.getRadioItemStyleVariables()),{"--zonos--font-family":r()})},null===(o=this.items)||void 0===o?void 0:o.map((o=>{var s;const i=(null===(s=this.selectedItem)||void 0===s?void 0:s.value)===o.value;return e("div",{"aria-hidden":"true",class:a(["zonos--shipping-rich-radio-item",i&&"selected"]),onClick:()=>this.handleRichRadioSelect(o)},e("input",{checked:i,class:"zonos--shipping-rich-radio-input",name:"zonos--shipping-rich-radio",type:"radio",value:o.value}),e("div",{class:"zonos--shipping-info"},e("div",{class:"zonos--shipping-detail"},e("zonos-text",{class:"zonos--shipping-label",type:"label"},o.label),(o.sublabel||o.caption)&&e("div",{class:"zonos--sub-detail"},o.sublabel&&e("zonos-text",{textColor:"gray-800"},o.sublabel),o.caption&&e("zonos-text",{textColor:"gray-600"},o.caption))),e("zonos-text",{type:"semiBoldLabel"},o.price)))})))}get ele(){return t(this)}};p.style=":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{display:-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}";export{p as zonos_shipping_rich_radio}
1
+ import{r as o,d as s,h as e,a as i,g as t}from"./p-ce75b047.js";import{f as r,z as n}from"./p-f3cfd8fa.js";import{c as a}from"./p-b4b7f705.js";import{g as l}from"./p-db3b101a.js";import{g as d}from"./p-b2d276e1.js";import{i as h}from"./p-ae393255.js";import"./p-0a377722.js";import"./p-d28be518.js";import"./p-6d81901a.js";const p=class{constructor(e){o(this,e),this.radioSelected=s(this,"radioSelected",7),this.selectedItem=null,this.handleRichRadioSelect=o=>{var s;null===(s=this.radioSelected)||void 0===s||s.emit(o)},this.getRadioItemStyleVariables=()=>{const o=this.borderColor||n.appearance.colorSecondary,s=this.isMobile?"--zonos-elements-gray-0":n.appearance.colorPrimary,e=s&&o?d({backgroundColor:h(s)?window.getComputedStyle(this.ele).getPropertyValue(`--zonos-elements-${s.replace("--zonos-elements-","")}`):s,color:o}):o;return{"--zonos--border-radius":l({overrideBorderStyle:this.borderStyle}),"--zonos--selected-border-color":e||"unset"}}}render(){var o;return e(i,{key:"8d77a01ba101899adb41904a820ba5f4985bc52d",class:"zonos--shipping-rich-radio zonos--elements","data-theme":this.theme,style:Object.assign(Object.assign({},this.getRadioItemStyleVariables()),{"--zonos--font-family":r()})},null===(o=this.items)||void 0===o?void 0:o.map((o=>{var s;const i=(null===(s=this.selectedItem)||void 0===s?void 0:s.value)===o.value;return e("div",{"aria-hidden":"true",class:a(["zonos--shipping-rich-radio-item",i&&"selected"]),onClick:()=>this.handleRichRadioSelect(o)},e("input",{checked:i,class:"zonos--shipping-rich-radio-input",name:"zonos--shipping-rich-radio",type:"radio",value:o.value}),e("div",{class:"zonos--shipping-info"},e("div",{class:"zonos--shipping-detail"},e("zonos-text",{class:"zonos--shipping-label",type:"label"},o.label),(o.sublabel||o.caption)&&e("div",{class:"zonos--sub-detail"},o.sublabel&&e("zonos-text",{textColor:"gray-800"},o.sublabel),o.caption&&e("zonos-text",{textColor:"gray-600"},o.caption))),e("zonos-text",{type:"semiBoldLabel"},o.price)))})))}get ele(){return t(this)}};p.style=":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{display:-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}";export{p as zonos_shipping_rich_radio}
@@ -1 +1 @@
1
- import{c as o,z as d}from"./p-f3cfd8fa.js";import{b as e,G as n,d as i,H as a}from"./p-dfe45cfd.js";import{s as l}from"./p-37f47658.js";import{h as t,s,l as r}from"./p-41dd1cb8.js";import{b as u}from"./p-0a377722.js";const{state:c}=o((()=>({amountDutyTaxFeeTotal:null,amountTotalPaid:null,isFetchingShippingInfo:!0,landedCostShortId:null,originCompanyName:null,partyBillingId:null,shippingAddress:null}))),p=async({landedCostId:o,retries:e=5})=>{var n,a,l,r,u,v,m,C,I;c.isFetchingShippingInfo=!0;const w=await t("/api/zonos-elements/collect/get-shipping-info-by-lc-id",{body:{landedCostId:o},method:"POST"});if(w.errors.length)return e>0?(await new Promise((o=>setTimeout(o,1e3))),p({landedCostId:o,retries:e-1})):null;c.landedCostShortId=(null===(n=w.json)||void 0===n?void 0:n.landedCostShortId)||null,c.isFetchingShippingInfo=!1,c.shippingAddress=(null===(a=w.json)||void 0===a?void 0:a.shipping)||null;const O=null===(l=i.checkoutSession)||void 0===l?void 0:l.landedCost,T=null===(r=i.checkoutSession)||void 0===r?void 0:r.subtotals,f=((null===(u=null==O?void 0:O.amountSubtotals)||void 0===u?void 0:u.shipping)||0)+((null===(v=null==O?void 0:O.amountSubtotals)||void 0===v?void 0:v.items)||0);c.amountTotalPaid=f*((null===(m=null==T?void 0:T.exchangeRate)||void 0===m?void 0:m.rate)||1),c.amountDutyTaxFeeTotal=((null==T?void 0:T.duties)||0)+((null==T?void 0:T.taxes)||0)+((null==T?void 0:T.fees)||0),c.originCompanyName=(null===(I=null===(C=w.json)||void 0===C?void 0:C.origin)||void 0===I?void 0:I.companyName)||null,0===c.amountTotalPaid&&s({endpoint:"COLLECT_NO_TOTAL_PAID",errors:[],metadata:{landedCostId:o,organizationId:d.organizationId}})},v=async()=>{var o,d,a,p;if(!(null===(o=e.stripeBillingAddressEventData)||void 0===o?void 0:o.complete))return{partiesCreated:!1};const v=null===(a=null===(d=i.checkoutSession)||void 0===d?void 0:d.landedCost)||void 0===a?void 0:a.rootId;if(!v)return s({endpoint:"PF_NO_SELECTED_LANDED_COST",errors:["No selected landed cost"],metadata:{allLogs:u,cartId:window.Zonos.cartId,checkoutSessionId:l.checkoutSessionId}}),{partiesCreated:!1};if(!l.checkoutSessionId)return s({endpoint:"COLLECT_NO_CHECKOUT_SESSION_ID",errors:["No checkout session id"],metadata:{allLogs:u,cartId:window.Zonos.cartId,landedCostRootId:v}}),{partiesCreated:!1};const m=n({address:e.stripeBillingAddressEventData.value.address,firstName:e.stripeBillingAddressEventData.value.firstName,lastName:e.stripeBillingAddressEventData.value.lastName,name:e.stripeBillingAddressEventData.value.name,phone:e.stripeBillingAddressEventData.value.phone}),C="1"===new URLSearchParams(window.location.search).get("zonosE2ETest"),{errors:I,json:w}=await t("/api/zonos-elements/create-billing-party",{body:{billingAddress:m,checkoutSessionId:l.checkoutSessionId,companyName:e.companyName,email:(null===(p=e.stripeLinkEventData)||void 0===p?void 0:p.value.email)||"",isTest:C,rootId:v},method:"POST"});return I.length||!w?(r("Error occurs when creating billing party",JSON.stringify(I,null,2)),s({endpoint:"COLLECT_BILLING_PARTY_CREATE_FAILED",errors:["[COLLECT] Failed to create billing party"],metadata:{allLogs:u,cartId:window.Zonos.cartId,checkoutSessionId:l.checkoutSessionId,errors:I,json:w}}),{partiesCreated:!1}):(c.partyBillingId=w.billToPartyId,{partiesCreated:!0})},m=async o=>{const d=o.landedCost;return!!d&&(i.landedCostData=[Object.assign(Object.assign({},o),{landedCost:Object.assign({},d),landedCostId:d.id})],a({applySubtotalsOnly:!0,landedCostId:d.id,selectedShippingOption:d.shipmentRating}))},C=o=>o||window.innerWidth<1024&&window.innerWidth>=768,I=o=>o||window.innerWidth<768;export{C as a,p as b,m as c,v as d,c as e,I as i}
1
+ import{c as o,z as d}from"./p-f3cfd8fa.js";import{b as e,G as n,d as i,H as a}from"./p-6987f9c9.js";import{s as l}from"./p-adb9827c.js";import{h as t,s,l as r}from"./p-41dd1cb8.js";import{b as u}from"./p-0a377722.js";const{state:c}=o((()=>({amountDutyTaxFeeTotal:null,amountTotalPaid:null,isFetchingShippingInfo:!0,landedCostShortId:null,originCompanyName:null,partyBillingId:null,shippingAddress:null}))),p=async({landedCostId:o,retries:e=5})=>{var n,a,l,r,u,v,m,C,I;c.isFetchingShippingInfo=!0;const w=await t("/api/zonos-elements/collect/get-shipping-info-by-lc-id",{body:{landedCostId:o},method:"POST"});if(w.errors.length)return e>0?(await new Promise((o=>setTimeout(o,1e3))),p({landedCostId:o,retries:e-1})):null;c.landedCostShortId=(null===(n=w.json)||void 0===n?void 0:n.landedCostShortId)||null,c.isFetchingShippingInfo=!1,c.shippingAddress=(null===(a=w.json)||void 0===a?void 0:a.shipping)||null;const O=null===(l=i.checkoutSession)||void 0===l?void 0:l.landedCost,T=null===(r=i.checkoutSession)||void 0===r?void 0:r.subtotals,L=((null===(u=null==O?void 0:O.amountSubtotals)||void 0===u?void 0:u.shipping)||0)+((null===(v=null==O?void 0:O.amountSubtotals)||void 0===v?void 0:v.items)||0);c.amountTotalPaid=L*((null===(m=null==T?void 0:T.exchangeRate)||void 0===m?void 0:m.rate)||1),c.amountDutyTaxFeeTotal=((null==T?void 0:T.duties)||0)+((null==T?void 0:T.taxes)||0)+((null==T?void 0:T.fees)||0),c.originCompanyName=(null===(I=null===(C=w.json)||void 0===C?void 0:C.origin)||void 0===I?void 0:I.companyName)||null,0===c.amountTotalPaid&&s({endpoint:"COLLECT_NO_TOTAL_PAID",errors:[],metadata:{landedCostId:o,organizationId:d.organizationId}})},v=async()=>{var o,d,a,p;if(!(null===(o=e.stripeBillingAddressEventData)||void 0===o?void 0:o.complete))return{partiesCreated:!1};const v=null===(a=null===(d=i.checkoutSession)||void 0===d?void 0:d.landedCost)||void 0===a?void 0:a.rootId;if(!v)return s({endpoint:"PF_NO_SELECTED_LANDED_COST",errors:["No selected landed cost"],metadata:{allLogs:u,cartId:window.Zonos.cartId,checkoutSessionId:l.checkoutSessionId}}),{partiesCreated:!1};if(!l.checkoutSessionId)return s({endpoint:"COLLECT_NO_CHECKOUT_SESSION_ID",errors:["No checkout session id"],metadata:{allLogs:u,cartId:window.Zonos.cartId,landedCostRootId:v}}),{partiesCreated:!1};const m=n({address:e.stripeBillingAddressEventData.value.address,firstName:e.stripeBillingAddressEventData.value.firstName,lastName:e.stripeBillingAddressEventData.value.lastName,name:e.stripeBillingAddressEventData.value.name,phone:e.stripeBillingAddressEventData.value.phone}),C="1"===new URLSearchParams(window.location.search).get("zonosE2ETest"),{errors:I,json:w}=await t("/api/zonos-elements/create-billing-party",{body:{billingAddress:m,checkoutSessionId:l.checkoutSessionId,companyName:e.companyName,email:(null===(p=e.stripeLinkEventData)||void 0===p?void 0:p.value.email)||"",isTest:C,rootId:v},method:"POST"});return I.length||!w?(r("Error occurs when creating billing party",JSON.stringify(I,null,2)),s({endpoint:"COLLECT_BILLING_PARTY_CREATE_FAILED",errors:["[COLLECT] Failed to create billing party"],metadata:{allLogs:u,cartId:window.Zonos.cartId,checkoutSessionId:l.checkoutSessionId,errors:I,json:w}}),{partiesCreated:!1}):(c.partyBillingId=w.billToPartyId,{partiesCreated:!0})},m=async o=>{const d=o.landedCost;return!!d&&(i.landedCostData=[Object.assign(Object.assign({},o),{landedCost:Object.assign({},d),landedCostId:d.id})],a({applySubtotalsOnly:!0,landedCostId:d.id,selectedShippingOption:d.shipmentRating}))},C=o=>o||window.innerWidth<1024&&window.innerWidth>=768,I=o=>o||window.innerWidth<768;export{C as a,p as b,m as c,v as d,c as e,I as i}