@zonos/elements 1.3.262 → 1.3.263

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 (275) hide show
  1. package/dist/cjs/{cart-d08c87e2.js → cart-02a93797.js} +4 -4
  2. package/dist/cjs/{debounce-3e17b4e9.js → debounce-606d1801.js} +1 -1
  3. package/dist/cjs/{getBorderRadius-db55a464.js → getBorderRadius-a91911e7.js} +1 -1
  4. package/dist/cjs/{getContrastColor-8ed1cb48.js → getContrastColor-68058615.js} +2 -2
  5. package/dist/cjs/{hasInclusivePrice-c781c336.js → hasInclusivePrice-751ef38b.js} +1 -1
  6. package/dist/cjs/index.cjs.js +7 -7
  7. package/dist/cjs/{invoice-e64f97c6.js → invoice-215b8d2b.js} +3 -3
  8. package/dist/cjs/{isCollectMobileTablet-9675485f.js → isCollectMobileTablet-0d909501.js} +3 -3
  9. package/dist/cjs/{isContrastColor-6a17f408.js → isContrastColor-a02c4889.js} +1 -1
  10. package/dist/cjs/{isDarkColor-bfe6d1eb.js → isDarkColor-e317bb06.js} +1 -1
  11. package/dist/cjs/loader.cjs.js +1 -1
  12. package/dist/cjs/{localization-a7fac4b4.js → localization-68ebf7c6.js} +1 -1
  13. package/dist/cjs/{paypal-e278f405.js → paypal-f8a0cca3.js} +5 -5
  14. package/dist/cjs/{placeTestOrder-aefd31e8.js → placeTestOrder-ce734b60.js} +2 -2
  15. package/dist/cjs/{renderCheckoutCurrency-a374741a.js → renderCheckoutCurrency-d163c1c4.js} +2 -2
  16. package/dist/cjs/{submitGtag-4241212b.js → submitGtag-07a3b09e.js} +1 -1
  17. package/dist/cjs/{throttle-dac93461.js → throttle-8aebac7d.js} +2 -2
  18. package/dist/cjs/{updateCheckoutSessionAttributes-a3776bb0.js → updateCheckoutSessionAttributes-a9a97194.js} +1 -1
  19. package/dist/cjs/zonos-address-display_8.cjs.entry.js +7 -7
  20. package/dist/cjs/zonos-address_4.cjs.entry.js +7 -7
  21. package/dist/cjs/zonos-badge.cjs.entry.js +1 -1
  22. package/dist/cjs/zonos-banner.cjs.entry.js +1 -1
  23. package/dist/cjs/zonos-button_3.cjs.entry.js +3 -3
  24. package/dist/cjs/zonos-card_5.cjs.entry.js +8 -8
  25. package/dist/cjs/zonos-cart-items_12.cjs.entry.js +14 -14
  26. package/dist/cjs/zonos-checkbox_2.cjs.entry.js +3 -3
  27. package/dist/cjs/zonos-checkout.cjs.entry.js +10 -10
  28. package/dist/cjs/zonos-collapse.cjs.entry.js +1 -1
  29. package/dist/cjs/zonos-collect-cart-items_3.cjs.entry.js +5 -5
  30. package/dist/cjs/zonos-collect-finish_6.cjs.entry.js +11 -11
  31. package/dist/cjs/zonos-collect.cjs.entry.js +9 -9
  32. package/dist/cjs/zonos-controller.cjs.entry.js +6 -6
  33. package/dist/cjs/zonos-country-flag.cjs.entry.js +2 -2
  34. package/dist/cjs/zonos-country-select_4.cjs.entry.js +3 -3
  35. package/dist/cjs/zonos-elements.cjs.js +1 -1
  36. package/dist/cjs/zonos-hello-dialog.cjs.entry.js +13 -11
  37. package/dist/cjs/zonos-hello.cjs.entry.js +46 -14
  38. package/dist/cjs/zonos-input.cjs.entry.js +2 -2
  39. package/dist/cjs/zonos-invoice-cart-items_2.cjs.entry.js +7 -7
  40. package/dist/cjs/zonos-invoice-finish_5.cjs.entry.js +11 -11
  41. package/dist/cjs/zonos-invoice.cjs.entry.js +9 -9
  42. package/dist/cjs/zonos-language-select_2.cjs.entry.js +2 -2
  43. package/dist/cjs/zonos-logo.cjs.entry.js +1 -1
  44. package/dist/cjs/zonos-shipping-rich-radio.cjs.entry.js +5 -5
  45. package/dist/cjs/zonos-store-credit.cjs.entry.js +6 -6
  46. package/dist/cjs/zonos-stripe-input.cjs.entry.js +3 -3
  47. package/dist/cjs/zonos-text.cjs.entry.js +1 -1
  48. package/dist/cjs/zonos-v-stack.cjs.entry.js +1 -1
  49. package/dist/cjs/{zonosStore-1c517e55.js → zonosStore-0662b95f.js} +1 -0
  50. package/dist/collection/components/hello/zonos-hello/zonos-hello.css +23 -15
  51. package/dist/collection/components/hello/zonos-hello/zonos-hello.js +45 -10
  52. package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog.js +10 -8
  53. package/dist/collection/components/store/zonosStore.js +1 -0
  54. package/dist/collection/components/utils/hello/getHelloWidgetSize.js +22 -0
  55. package/dist/collection/types/generated/graphql.internal.types.js +67 -1
  56. package/dist/esm/{cart-c490d252.js → cart-34b11708.js} +4 -4
  57. package/dist/esm/{debounce-8faafc9f.js → debounce-ab526ca0.js} +1 -1
  58. package/dist/esm/{getBorderRadius-66de1b16.js → getBorderRadius-98c64be8.js} +1 -1
  59. package/dist/esm/{getContrastColor-e14f95a7.js → getContrastColor-2340485f.js} +2 -2
  60. package/dist/esm/{hasInclusivePrice-7a0ce66a.js → hasInclusivePrice-dfb21fc9.js} +1 -1
  61. package/dist/esm/index.js +7 -7
  62. package/dist/esm/{invoice-3ea5715b.js → invoice-6d8bdf21.js} +3 -3
  63. package/dist/esm/{isCollectMobileTablet-0dcbd45a.js → isCollectMobileTablet-85403c93.js} +3 -3
  64. package/dist/esm/{isContrastColor-f9e65e70.js → isContrastColor-6bad285e.js} +1 -1
  65. package/dist/esm/{isDarkColor-8092a9fb.js → isDarkColor-0a8453e7.js} +1 -1
  66. package/dist/esm/loader.js +1 -1
  67. package/dist/esm/{localization-542dbe20.js → localization-2e523b35.js} +1 -1
  68. package/dist/esm/{paypal-d8804da5.js → paypal-d3b3d967.js} +5 -5
  69. package/dist/esm/{placeTestOrder-d7001709.js → placeTestOrder-e1d6dfcd.js} +2 -2
  70. package/dist/esm/{renderCheckoutCurrency-75f1bba3.js → renderCheckoutCurrency-cc72a6c2.js} +2 -2
  71. package/dist/esm/{submitGtag-7f5c5bb5.js → submitGtag-ae9d5d91.js} +1 -1
  72. package/dist/esm/{throttle-5a66b4fd.js → throttle-882b1f47.js} +2 -2
  73. package/dist/esm/{updateCheckoutSessionAttributes-8f3f932e.js → updateCheckoutSessionAttributes-da7fdd37.js} +1 -1
  74. package/dist/esm/zonos-address-display_8.entry.js +7 -7
  75. package/dist/esm/zonos-address_4.entry.js +7 -7
  76. package/dist/esm/zonos-badge.entry.js +1 -1
  77. package/dist/esm/zonos-banner.entry.js +1 -1
  78. package/dist/esm/zonos-button_3.entry.js +3 -3
  79. package/dist/esm/zonos-card_5.entry.js +8 -8
  80. package/dist/esm/zonos-cart-items_12.entry.js +14 -14
  81. package/dist/esm/zonos-checkbox_2.entry.js +3 -3
  82. package/dist/esm/zonos-checkout.entry.js +10 -10
  83. package/dist/esm/zonos-collapse.entry.js +1 -1
  84. package/dist/esm/zonos-collect-cart-items_3.entry.js +5 -5
  85. package/dist/esm/zonos-collect-finish_6.entry.js +11 -11
  86. package/dist/esm/zonos-collect.entry.js +9 -9
  87. package/dist/esm/zonos-controller.entry.js +6 -6
  88. package/dist/esm/zonos-country-flag.entry.js +2 -2
  89. package/dist/esm/zonos-country-select_4.entry.js +3 -3
  90. package/dist/esm/zonos-elements.js +1 -1
  91. package/dist/esm/zonos-hello-dialog.entry.js +13 -11
  92. package/dist/esm/zonos-hello.entry.js +46 -14
  93. package/dist/esm/zonos-input.entry.js +2 -2
  94. package/dist/esm/zonos-invoice-cart-items_2.entry.js +7 -7
  95. package/dist/esm/zonos-invoice-finish_5.entry.js +11 -11
  96. package/dist/esm/zonos-invoice.entry.js +9 -9
  97. package/dist/esm/zonos-language-select_2.entry.js +2 -2
  98. package/dist/esm/zonos-logo.entry.js +1 -1
  99. package/dist/esm/zonos-shipping-rich-radio.entry.js +5 -5
  100. package/dist/esm/zonos-store-credit.entry.js +6 -6
  101. package/dist/esm/zonos-stripe-input.entry.js +3 -3
  102. package/dist/esm/zonos-text.entry.js +1 -1
  103. package/dist/esm/zonos-v-stack.entry.js +1 -1
  104. package/dist/esm/{zonosStore-f1d45eac.js → zonosStore-9662b071.js} +1 -0
  105. package/dist/esm-es5/{cart-c490d252.js → cart-34b11708.js} +1 -1
  106. package/dist/esm-es5/{debounce-8faafc9f.js → debounce-ab526ca0.js} +1 -1
  107. package/dist/esm-es5/{getBorderRadius-66de1b16.js → getBorderRadius-98c64be8.js} +1 -1
  108. package/dist/esm-es5/{getContrastColor-e14f95a7.js → getContrastColor-2340485f.js} +1 -1
  109. package/dist/esm-es5/{hasInclusivePrice-7a0ce66a.js → hasInclusivePrice-dfb21fc9.js} +1 -1
  110. package/dist/esm-es5/index.js +1 -1
  111. package/dist/esm-es5/{invoice-3ea5715b.js → invoice-6d8bdf21.js} +1 -1
  112. package/dist/esm-es5/{isCollectMobileTablet-0dcbd45a.js → isCollectMobileTablet-85403c93.js} +1 -1
  113. package/dist/esm-es5/{isContrastColor-f9e65e70.js → isContrastColor-6bad285e.js} +1 -1
  114. package/dist/esm-es5/{isDarkColor-8092a9fb.js → isDarkColor-0a8453e7.js} +1 -1
  115. package/dist/esm-es5/loader.js +1 -1
  116. package/dist/esm-es5/{localization-542dbe20.js → localization-2e523b35.js} +1 -1
  117. package/dist/esm-es5/{paypal-d8804da5.js → paypal-d3b3d967.js} +2 -2
  118. package/dist/esm-es5/{placeTestOrder-d7001709.js → placeTestOrder-e1d6dfcd.js} +1 -1
  119. package/dist/esm-es5/{renderCheckoutCurrency-75f1bba3.js → renderCheckoutCurrency-cc72a6c2.js} +1 -1
  120. package/dist/esm-es5/{submitGtag-7f5c5bb5.js → submitGtag-ae9d5d91.js} +1 -1
  121. package/dist/esm-es5/{throttle-5a66b4fd.js → throttle-882b1f47.js} +1 -1
  122. package/dist/esm-es5/{updateCheckoutSessionAttributes-8f3f932e.js → updateCheckoutSessionAttributes-da7fdd37.js} +1 -1
  123. package/dist/esm-es5/zonos-address-display_8.entry.js +1 -1
  124. package/dist/esm-es5/zonos-address_4.entry.js +1 -1
  125. package/dist/esm-es5/zonos-badge.entry.js +1 -1
  126. package/dist/esm-es5/zonos-banner.entry.js +1 -1
  127. package/dist/esm-es5/zonos-button_3.entry.js +1 -1
  128. package/dist/esm-es5/zonos-card_5.entry.js +1 -1
  129. package/dist/esm-es5/zonos-cart-items_12.entry.js +1 -1
  130. package/dist/esm-es5/zonos-checkbox_2.entry.js +1 -1
  131. package/dist/esm-es5/zonos-checkout.entry.js +1 -1
  132. package/dist/esm-es5/zonos-collapse.entry.js +1 -1
  133. package/dist/esm-es5/zonos-collect-cart-items_3.entry.js +1 -1
  134. package/dist/esm-es5/zonos-collect-finish_6.entry.js +1 -1
  135. package/dist/esm-es5/zonos-collect.entry.js +1 -1
  136. package/dist/esm-es5/zonos-controller.entry.js +1 -1
  137. package/dist/esm-es5/zonos-country-flag.entry.js +1 -1
  138. package/dist/esm-es5/zonos-country-select_4.entry.js +1 -1
  139. package/dist/esm-es5/zonos-elements.js +1 -1
  140. package/dist/esm-es5/zonos-hello-dialog.entry.js +1 -1
  141. package/dist/esm-es5/zonos-hello.entry.js +1 -1
  142. package/dist/esm-es5/zonos-input.entry.js +1 -1
  143. package/dist/esm-es5/zonos-invoice-cart-items_2.entry.js +1 -1
  144. package/dist/esm-es5/zonos-invoice-finish_5.entry.js +1 -1
  145. package/dist/esm-es5/zonos-invoice.entry.js +1 -1
  146. package/dist/esm-es5/zonos-language-select_2.entry.js +1 -1
  147. package/dist/esm-es5/zonos-logo.entry.js +1 -1
  148. package/dist/esm-es5/zonos-shipping-rich-radio.entry.js +1 -1
  149. package/dist/esm-es5/zonos-store-credit.entry.js +1 -1
  150. package/dist/esm-es5/zonos-stripe-input.entry.js +1 -1
  151. package/dist/esm-es5/zonos-text.entry.js +1 -1
  152. package/dist/esm-es5/zonos-v-stack.entry.js +1 -1
  153. package/dist/esm-es5/{zonosStore-f1d45eac.js → zonosStore-9662b071.js} +1 -1
  154. package/dist/scripts/index.d.ts +31 -15
  155. package/dist/scripts/index.js +1 -1
  156. package/dist/scripts/loadZonos.js +1 -1
  157. package/dist/scripts/zonos.js +1 -1
  158. package/dist/types/components/hello/zonos-hello/zonos-hello.d.ts +8 -1
  159. package/dist/types/components/utils/hello/getHelloWidgetSize.d.ts +15 -0
  160. package/dist/types/components.d.ts +10 -2
  161. package/dist/types/scripts/cart/_setupCartDataWithSettings.d.ts +8 -7
  162. package/dist/types/types/generated/graphql.internal.types.d.ts +100 -20
  163. package/dist/types/types/generated/graphql.internal.types.ts +118 -20
  164. package/dist/types/types/hello/HelloConfig.d.ts +5 -0
  165. package/dist/zonos-elements/index.esm.js +1 -1
  166. package/dist/zonos-elements/{p-53fe581b.system.js → p-0207c91e.system.js} +1 -1
  167. package/dist/zonos-elements/{p-06ef4d79.entry.js → p-024a4af5.entry.js} +1 -1
  168. package/dist/zonos-elements/{p-72a181b5.entry.js → p-06d8f294.entry.js} +1 -1
  169. package/dist/zonos-elements/{p-a1142a95.entry.js → p-07c228a7.entry.js} +1 -1
  170. package/dist/zonos-elements/p-0f3b9ed7.entry.js +1 -0
  171. package/dist/zonos-elements/{p-ed827ca3.entry.js → p-15161658.entry.js} +1 -1
  172. package/dist/zonos-elements/{p-9262a57c.system.entry.js → p-17b6f9ff.system.entry.js} +1 -1
  173. package/dist/zonos-elements/{p-bf4d2299.system.entry.js → p-191661c6.system.entry.js} +1 -1
  174. package/dist/zonos-elements/{p-e36e724b.system.entry.js → p-1b5d90ee.system.entry.js} +1 -1
  175. package/dist/zonos-elements/{p-43a6e469.system.js → p-1bf9a1b9.system.js} +1 -1
  176. package/dist/zonos-elements/{p-a8bb461c.js → p-1c1149ff.js} +1 -1
  177. package/dist/zonos-elements/{p-e749fb81.entry.js → p-1cc651e8.entry.js} +1 -1
  178. package/dist/zonos-elements/{p-3deb91cb.entry.js → p-1f107c84.entry.js} +1 -1
  179. package/dist/zonos-elements/{p-34fc45e5.entry.js → p-1fb6b787.entry.js} +1 -1
  180. package/dist/zonos-elements/{p-4cee62fb.entry.js → p-20e1a5a0.entry.js} +1 -1
  181. package/dist/zonos-elements/{p-d7a9be55.system.js → p-227a1ecc.system.js} +1 -1
  182. package/dist/zonos-elements/{p-dee6adff.system.js → p-22a8b44b.system.js} +1 -1
  183. package/dist/zonos-elements/{p-55742c52.entry.js → p-235ee1d3.entry.js} +1 -1
  184. package/dist/zonos-elements/{p-ef12af4b.entry.js → p-2381985c.entry.js} +1 -1
  185. package/dist/zonos-elements/{p-aa74b61a.system.entry.js → p-25b5ac23.system.entry.js} +1 -1
  186. package/dist/zonos-elements/p-29b60bf3.system.js +1 -1
  187. package/dist/zonos-elements/{p-27f01d76.entry.js → p-2b40fab2.entry.js} +1 -1
  188. package/dist/zonos-elements/{p-f00a56be.system.entry.js → p-30b19a4e.system.entry.js} +1 -1
  189. package/dist/zonos-elements/{p-a75b8ad7.js → p-356b2068.js} +1 -1
  190. package/dist/zonos-elements/p-367a72bc.js +1 -0
  191. package/dist/zonos-elements/{p-15ef7644.system.js → p-3689821f.system.js} +1 -1
  192. package/dist/zonos-elements/{p-c263f95f.entry.js → p-3ae1a543.entry.js} +1 -1
  193. package/dist/zonos-elements/{p-022ddd4a.system.entry.js → p-3baf98a0.system.entry.js} +1 -1
  194. package/dist/zonos-elements/{p-a2b3c1ef.system.entry.js → p-4039b72d.system.entry.js} +1 -1
  195. package/dist/zonos-elements/{p-9de27162.system.entry.js → p-45ceb26f.system.entry.js} +1 -1
  196. package/dist/zonos-elements/{p-66934a78.system.entry.js → p-47a58a38.system.entry.js} +1 -1
  197. package/dist/zonos-elements/p-4980facb.js +1 -0
  198. package/dist/zonos-elements/{p-5dd78b4b.js → p-4c89d04a.js} +1 -1
  199. package/dist/zonos-elements/{p-a98b8b68.system.js → p-4d0b8897.system.js} +2 -2
  200. package/dist/zonos-elements/{p-14f156c6.system.entry.js → p-501d16ad.system.entry.js} +1 -1
  201. package/dist/zonos-elements/{p-a661dd45.system.entry.js → p-51c60875.system.entry.js} +1 -1
  202. package/dist/zonos-elements/{p-a3020bc9.entry.js → p-5290d104.entry.js} +1 -1
  203. package/dist/zonos-elements/{p-248bdea2.system.js → p-5496e9ae.system.js} +1 -1
  204. package/dist/zonos-elements/{p-947f5092.js → p-562fbdab.js} +1 -1
  205. package/dist/zonos-elements/{p-838e335c.entry.js → p-5834833a.entry.js} +1 -1
  206. package/dist/zonos-elements/{p-75a27c68.entry.js → p-5aa86f9c.entry.js} +1 -1
  207. package/dist/zonos-elements/{p-b2cd18b4.system.entry.js → p-5d32f10f.system.entry.js} +1 -1
  208. package/dist/zonos-elements/{p-e25e0b4b.system.js → p-5e6f85f0.system.js} +1 -1
  209. package/dist/zonos-elements/{p-20263609.system.js → p-60a391b8.system.js} +1 -1
  210. package/dist/zonos-elements/p-65ea8ae4.js +1 -0
  211. package/dist/zonos-elements/{p-cdbb50cf.entry.js → p-665bfd4f.entry.js} +1 -1
  212. package/dist/zonos-elements/{p-b47fcd8c.system.entry.js → p-6a11cccc.system.entry.js} +1 -1
  213. package/dist/zonos-elements/{p-cab6bd98.system.js → p-6a195559.system.js} +1 -1
  214. package/dist/zonos-elements/p-6d81901a.js +1 -0
  215. package/dist/zonos-elements/{p-3ff736f7.system.entry.js → p-7003d093.system.entry.js} +1 -1
  216. package/dist/zonos-elements/p-70c485df.js +1 -0
  217. package/dist/zonos-elements/{p-8d0bca3a.system.entry.js → p-7297f6bd.system.entry.js} +1 -1
  218. package/dist/zonos-elements/{p-d50fef06.system.entry.js → p-73765370.system.entry.js} +1 -1
  219. package/dist/zonos-elements/{p-dc4e867e.system.entry.js → p-79a7998f.system.entry.js} +1 -1
  220. package/dist/zonos-elements/{p-0699931c.system.js → p-7b6e65d6.system.js} +1 -1
  221. package/dist/zonos-elements/{p-9e761130.entry.js → p-7e313e45.entry.js} +1 -1
  222. package/dist/zonos-elements/{p-e76dc266.system.entry.js → p-8331aa21.system.entry.js} +1 -1
  223. package/dist/zonos-elements/{p-e55bc187.entry.js → p-8571f3ce.entry.js} +1 -1
  224. package/dist/zonos-elements/{p-7237f43b.system.entry.js → p-8603fb37.system.entry.js} +1 -1
  225. package/dist/zonos-elements/{p-072c5e07.system.entry.js → p-926c33b1.system.entry.js} +1 -1
  226. package/dist/zonos-elements/{p-f7d24382.system.entry.js → p-92f40018.system.entry.js} +1 -1
  227. package/dist/zonos-elements/{p-f2909fb8.entry.js → p-96f8cea8.entry.js} +1 -1
  228. package/dist/zonos-elements/p-97f0eda6.system.js +1 -0
  229. package/dist/zonos-elements/{p-4a227683.system.entry.js → p-9c5cce08.system.entry.js} +1 -1
  230. package/dist/zonos-elements/p-9f7e7148.system.js +1 -0
  231. package/dist/zonos-elements/{p-196423ad.system.js → p-a076cf7f.system.js} +1 -1
  232. package/dist/zonos-elements/{p-7df3e44b.system.entry.js → p-a3936c44.system.entry.js} +1 -1
  233. package/dist/zonos-elements/{p-b5223840.js → p-a50d095f.js} +1 -1
  234. package/dist/zonos-elements/{p-2f924331.js → p-ab0b23f2.js} +1 -1
  235. package/dist/zonos-elements/{p-80e7cab5.entry.js → p-adeaa7cf.entry.js} +1 -1
  236. package/dist/zonos-elements/{p-0ec4e307.system.js → p-b2d462f9.system.js} +1 -1
  237. package/dist/zonos-elements/p-b8710131.entry.js +1 -0
  238. package/dist/zonos-elements/{p-c7ecef98.system.entry.js → p-ba9e2612.system.entry.js} +1 -1
  239. package/dist/zonos-elements/{p-5a79e1f4.entry.js → p-bccae0df.entry.js} +1 -1
  240. package/dist/zonos-elements/{p-f0046c48.entry.js → p-bee55d71.entry.js} +1 -1
  241. package/dist/zonos-elements/{p-72adb40d.js → p-c2b86522.js} +1 -1
  242. package/dist/zonos-elements/{p-17476a30.system.entry.js → p-c361d520.system.entry.js} +1 -1
  243. package/dist/zonos-elements/p-c4d057b0.js +1 -0
  244. package/dist/zonos-elements/p-c9a1f774.js +1 -0
  245. package/dist/zonos-elements/{p-ca411d97.entry.js → p-cda0b441.entry.js} +1 -1
  246. package/dist/zonos-elements/{p-f6922df5.js → p-d28be518.js} +1 -1
  247. package/dist/zonos-elements/{p-5beab541.js → p-db3b101a.js} +1 -1
  248. package/dist/zonos-elements/{p-5db00bfa.system.entry.js → p-dc71be6f.system.entry.js} +1 -1
  249. package/dist/zonos-elements/p-de44cccd.system.entry.js +1 -0
  250. package/dist/zonos-elements/{p-00bd7e5d.entry.js → p-e06936f4.entry.js} +1 -1
  251. package/dist/zonos-elements/{p-d983d472.entry.js → p-e0ea6e24.entry.js} +1 -1
  252. package/dist/zonos-elements/p-e3292be8.system.js +1 -0
  253. package/dist/zonos-elements/{p-56c11359.system.entry.js → p-e4792f63.system.entry.js} +1 -1
  254. package/dist/zonos-elements/p-e5dfccd8.system.js +1 -0
  255. package/dist/zonos-elements/{p-313b87f3.system.entry.js → p-e98e4c0b.system.entry.js} +1 -1
  256. package/dist/zonos-elements/{p-61be7d98.system.js → p-eb99a625.system.js} +1 -1
  257. package/dist/zonos-elements/{p-ed9385f4.js → p-f3cfd8fa.js} +1 -1
  258. package/dist/zonos-elements/{p-ade15fd2.entry.js → p-f440cd53.entry.js} +1 -1
  259. package/dist/zonos-elements/{p-e673a4d9.entry.js → p-fe5303d1.entry.js} +1 -1
  260. package/dist/zonos-elements/zonos-elements.esm.js +1 -1
  261. package/package.json +1 -1
  262. package/dist/zonos-elements/p-09307a03.js +0 -1
  263. package/dist/zonos-elements/p-1916c2b0.entry.js +0 -1
  264. package/dist/zonos-elements/p-6b7beb44.system.js +0 -1
  265. package/dist/zonos-elements/p-7158a18b.js +0 -1
  266. package/dist/zonos-elements/p-721fadd5.js +0 -1
  267. package/dist/zonos-elements/p-7c5c5318.js +0 -1
  268. package/dist/zonos-elements/p-7d9bbdc8.js +0 -1
  269. package/dist/zonos-elements/p-8bce79f4.system.js +0 -1
  270. package/dist/zonos-elements/p-944bf0e7.js +0 -1
  271. package/dist/zonos-elements/p-b21cf539.system.entry.js +0 -1
  272. package/dist/zonos-elements/p-cd563d65.system.js +0 -1
  273. package/dist/zonos-elements/p-cdf99051.entry.js +0 -1
  274. package/dist/zonos-elements/p-e6726a50.system.js +0 -1
  275. package/dist/zonos-elements/p-f68ce554.js +0 -1
@@ -1 +1 @@
1
- var __awaiter=this&&this.__awaiter||function(o,e,t,n){function i(o){return o instanceof t?o:new t((function(e){e(o)}))}return new(t||(t=Promise))((function(t,r){function s(o){try{a(n.next(o))}catch(o){r(o)}}function l(o){try{a(n["throw"](o))}catch(o){r(o)}}function a(o){o.done?t(o.value):i(o.value).then(s,l)}a((n=n.apply(o,e||[])).next())}))};var __generator=this&&this.__generator||function(o,e){var t={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},n,i,r,s;return s={next:l(0),throw:l(1),return:l(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function l(o){return function(e){return a([o,e])}}function a(l){if(n)throw new TypeError("Generator is already executing.");while(s&&(s=0,l[0]&&(t=0)),t)try{if(n=1,i&&(r=l[0]&2?i["return"]:l[0]?i["throw"]||((r=i["return"])&&r.call(i),0):i.next)&&!(r=r.call(i,l[1])).done)return r;if(i=0,r)l=[l[0]&2,r.value];switch(l[0]){case 0:case 1:r=l;break;case 4:t.label++;return{value:l[1],done:false};case 5:t.label++;i=l[1];l=[0];continue;case 7:l=t.ops.pop();t.trys.pop();continue;default:if(!(r=t.trys,r=r.length>0&&r[r.length-1])&&(l[0]===6||l[0]===2)){t=0;continue}if(l[0]===3&&(!r||l[1]>r[0]&&l[1]<r[3])){t.label=l[1];break}if(l[0]===6&&t.label<r[1]){t.label=r[1];r=l;break}if(r&&t.label<r[2]){t.label=r[2];t.ops.push(l);break}if(r[2])t.ops.pop();t.trys.pop();continue}l=e.call(o,t)}catch(o){l=[6,o];i=0}finally{n=r=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:true}}};import{r as registerInstance,h,a as Host,g as getElement}from"./index-cfd394c8.js";import{d as debounce_1}from"./debounce-8faafc9f.js";import{l as localizationStore,i as isValidSelector,t as translate,g as getZCountryUrlParam,j as setZCountryUrlParam,k as currencyDisplay,m as currencyConvertAndFormat,n as currencyConvert,d as currencyFormat}from"./localization-542dbe20.js";import{z as zonosStore,g as getZonosStoreTheme,m as mergeConfig}from"./zonosStore-f1d45eac.js";import{c as classes}from"./classes-0d95c529.js";import{h as handleFetch,l as logError}from"./handleFetch-a844cac1.js";import{g as getHasMoreSpaceOnRight}from"./getHasMoreSpaceOnRight-70eb913a.js";import{l as log}from"./VarianceTest-572cecf5.js";var checkItemRestrictions=function(o){return __awaiter(void 0,[o],void 0,(function(o){var e,t,n,i,r;var s=o.items,l=o.shipFrom,a=o.shipTo;return __generator(this,(function(o){switch(o.label){case 0:t={items:s,shipFrom:l,shipTo:a};return[4,handleFetch("/api/zonos-elements/check-item-restrictions",{body:t,method:"POST"})];case 1:n=o.sent(),i=n.errors,r=n.json;if(i.length||!r){logError("Error fetching item restrictions: ".concat((e=i.find(Boolean))===null||e===void 0?void 0:e.message));return[2,[]]}return[2,r.filter(Boolean)]}}))}))};var detectItemRestrictions=function(o){return __awaiter(void 0,void 0,void 0,(function(){var e,t,n,i;return __generator(this,(function(r){switch(r.label){case 0:if(!o.length){return[2,[]]}e=localizationStore.selectedCountryCode;if(!e){logError("Hello could not check item restrictions - No country code selected");return[2,[]]}t=o.map((function(o){return{description:o.description,name:o.title}}));return[4,checkItemRestrictions({items:t,shipFrom:"AD",shipTo:e})];case 1:n=r.sent();i=n.map((function(o){var e;var n=((e=t.filter((function(e){return e.description===o.itemDescription})).find(Boolean))===null||e===void 0?void 0:e.name)||"";return Object.assign(Object.assign({},o),{name:n})}));return[2,i]}}))}))};var matchUrlPattern=function(o){var e=o===null||o===void 0?void 0:o.replace("www.","").replace("https://","");return e&&new RegExp(e).test(window.location.href)};var getCurrentHelloLocalePage=function(){var o=zonosStore.helloSettings,e=o.cartUrlPattern,t=o.homepageUrlPattern,n=o.productDetailUrlPattern,i=o.productListUrlPattern;if(matchUrlPattern(e)){return"cart"}if(matchUrlPattern(n)){return"productDetail"}if(matchUrlPattern(i)){return"productList"}if(matchUrlPattern(t)){return"home"}return""};var getProductsOnPage=function(){var o,e;var t=zonosStore.helloSettings,n=t.productAddToCartElementSelector,i=t.productDescriptionElementSelector,r=t.productTitleElementSelector,s=t.restrictionBehavior;if(!r||!i){log("Hello could not check item restrictions - must provide title and description selectors.")}var l=r&&isValidSelector(r)&&document.querySelectorAll(r)||[];var a=i&&isValidSelector(i)&&document.querySelectorAll(i)||[];if(l.length!==a.length){log("Hello could not check item restrictions - Title and description selectors do not match");return[]}var h=s==="RESTRICT_AND_BLOCK";var d=h&&n&&isValidSelector(n)&&document.querySelectorAll(n)||[];if(h&&d.length!==a.length){log('Hello could not disable "Add to cart" buttons - Title and add to cart selectors do not match')}var c=[];for(var u=0;u<l.length;u++){var f=l[u];var g=a[u];var m=d[u];if(f&&g){var z={cartButtonNode:m||null,description:((o=g.textContent)===null||o===void 0?void 0:o.trim())||"",title:((e=f.textContent)===null||e===void 0?void 0:e.trim())||""};c.push(z)}}return c};var zonosHelloCss=":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{display:inline-block}:host .zonos--hello-wrapper{position:relative}:host .zonos--hello-wrapper .zonos--hello-dialog-wrapper-mobile-override{position:fixed;bottom:0;left:0;width:100vw;z-index:1001;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content}@media (max-width: 768px){:host .zonos--hello-wrapper .zonos--hello-dialog-wrapper{position:fixed;bottom:0;left:0;width:100vw;z-index:1001;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content}}@media screen and (min-width: 769px){:host .zonos--hello-wrapper .zonos--hello-dialog-wrapper.zonos--hello-widget-float{position:fixed;bottom:72px;right:32px;width:auto;height:auto;z-index:1001}:host .zonos--hello-wrapper .zonos--hello-dialog-wrapper.zonos--hello-widget-float.zonos--hello-widget-left{left:32px;right:auto}:host .zonos--hello-wrapper .zonos--hello-dialog-wrapper.zonos--hello-widget-float.zonos--hello-widget-top{bottom:auto;top:32px}}:host .zonos--hello-widget{-webkit-transition:all 0.7s cubic-bezier(0.31, -0.02, 0.06, 1.53);transition:all 0.7s cubic-bezier(0.31, -0.02, 0.06, 1.53);padding:6px;border-radius:30px;background:var(--zonos-elements-page-background);font-size:var(--zonos-elements-font-size-s);border:var(--zonos-elements-border);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;cursor:pointer;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;position:relative;z-index:1000}:host .zonos--hello-widget>.zonos--hello-message{-ms-flex-order:0;order:0;max-width:0;height:100%;white-space:nowrap;-webkit-transition:border 0.3s ease-in, all 0.7s cubic-bezier(0.31, -0.02, 0.06, 1.53);transition:border 0.3s ease-in, all 0.7s cubic-bezier(0.31, -0.02, 0.06, 1.53);overflow:hidden;color:var(--zonos-elements-text-color);position:absolute;background:var(--zonos-elements-page-background);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;border-top-left-radius:30px;border-bottom-left-radius:30px;left:0;-webkit-transform:translateX(calc(-100% + 16px));transform:translateX(calc(-100% + 16px));width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;border-top:var(--zonos-elements-border);border-bottom:var(--zonos-elements-border)}:host .zonos--hello-widget.zonos--hello-has-restrictions{background:var(--zonos-elements-red-100);border:1px solid var(--zonos-elements-red-200)}:host .zonos--hello-widget.zonos--hello-has-restrictions>.zonos--hello-message{background:var(--zonos-elements-red-100);color:var(--zonos-elements-red-800);font-weight:500}:host .zonos--hello-widget.zonos--hello-has-restrictions.zonos--hello-show-peek-message>.zonos--hello-message{border:1px solid var(--zonos-elements-red-200)}:host .zonos--hello-widget.zonos--hello-show-peek-message{max-width:100vw;width:100%}:host .zonos--hello-widget.zonos--hello-show-peek-message>.zonos--hello-message{max-width:100vw;padding:0 6px;padding-right:16px;border:var(--zonos-elements-border)}:host .zonos--hello-widget.zonos--hello-show-peek-message:not(.zonos--hello-widget-animate-from-left)>.zonos--hello-message{border-right:none}:host .zonos--hello-widget.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left>.zonos--hello-message{border-left:0}:host .zonos--hello-widget.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left>.zonos--hello-message{padding-left:16px;padding-right:6px;border-left:none}:host .zonos--hello-widget.zonos--hello-widget-animate-from-left>.zonos--hello-message{-ms-flex-order:1;order:1;-webkit-transform:translateX(calc(100% - 16px));transform:translateX(calc(100% - 16px));right:0;left:auto;border-top-right-radius:30px;border-bottom-right-radius:30px}:host .zonos--hello-widget .zonos--hello-country-flag-wrapper{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center}:host .zonos--hello-widget .zonos--hello-country-flag-wrapper .zonos--hello-country-flag{height:18px;width:18px;position:relative;overflow:hidden;border-radius:30px;-webkit-box-shadow:var(--zonos-elements-v3-shadow-medium);box-shadow:var(--zonos-elements-v3-shadow-medium);z-index:10;justify-self:center}:host .zonos--hello-widget.zonos--hello-widget-float{position:fixed;bottom:72px;right:32px}:host .zonos--hello-widget.zonos--hello-widget-float.zonos--hello-widget-left{left:32px;right:auto}:host .zonos--hello-widget.zonos--hello-widget-float.zonos--hello-widget-top{bottom:auto;top:32px}:host .zonos--hello-widget.zonos--hello-widget-float.zonos--hello-has-restrictions.zonos--hello-show-peek-message>.zonos--hello-message{border:none}:host .zonos--hello-widget.zonos--hello-widget-float>.zonos--hello-message{position:relative;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;border-radius:30px;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;top:0;bottom:0;left:0;-webkit-transform:translateX(0);transform:translateX(0);width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;border:none}:host .zonos--hello-widget.zonos--hello-widget-float.zonos--hello-widget-animate-from-left>.zonos--hello-message{-webkit-transform:translateX(0);transform:translateX(0)}:host .zonos--hello-widget.zonos--hello-widget-float.zonos--hello-show-peek-message{width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}:host .zonos--hello-widget.zonos--hello-widget-float.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left>.zonos--hello-message{padding-left:8px;padding-right:4px}:host .zonos--hello-widget.zonos--hello-widget-float.zonos--hello-show-peek-message>.zonos--hello-message{padding:0 var(--zonos-elements-radius-4);padding-right:6px;border:none}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float{position:fixed;bottom:72px;right:32px}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float.zonos--hello-widget-left{left:32px;right:auto}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float.zonos--hello-widget-top{bottom:auto;top:32px}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float.zonos--hello-has-restrictions.zonos--hello-show-peek-message>.zonos--hello-message{border:none}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float>.zonos--hello-message{position:relative;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;border-radius:30px;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;top:0;bottom:0;left:0;-webkit-transform:translateX(0);transform:translateX(0);width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;border:none}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float.zonos--hello-widget-animate-from-left>.zonos--hello-message{-webkit-transform:translateX(0);transform:translateX(0)}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float.zonos--hello-show-peek-message{width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left>.zonos--hello-message{padding-left:8px;padding-right:4px}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float.zonos--hello-show-peek-message>.zonos--hello-message{padding:0 var(--zonos-elements-radius-4);padding-right:6px;border:none}";var ZonosHelloStyle0=zonosHelloCss;var PEEK_MESSAGE_CLOSE_DELAY_MS=3e3;var ZonosHello=function(){function o(o){var e=this;registerInstance(this,o);this.showPeekMessage=false;this.zonosStoreHelloSettings=zonosStore.helloSettings;this.showDialog=false;this.peekMessage="";this.initialUrl="";this.allRestrictedItems=[];this.allFoundProducts=[];this.productsOnPage=[];this.isHelloWidgetRendered=false;this.isMobile=false;this.getHelloPeekMessage=function(o){var t=zonosStore.currentHelloPage==="productDetail"||zonosStore.currentHelloPage==="productList";if(t&&e.allRestrictedItems.length){var n=translate("click to learn more");var i=zonosStore.currentHelloPage==="productDetail"?translate("Restricted item"):translate("Restricted items found");return"".concat(i," - ").concat(n)}switch(zonosStore.currentHelloPage){case"cart":return translate("Prepay duties and taxes at checkout");case"productList":case"productDetail":return translate("See duty and tax thresholds");default:return translate("Welcome to [storeName]",{storeName:o})}};this.enableShowPeekMessage=function(){if(e.peekMessage){e.showPeekMessage=true}};this.getNewItemRestrictions=function(o){return __awaiter(e,void 0,void 0,(function(){var e,t;return __generator(this,(function(n){switch(n.label){case 0:e=zonosStore.currentHelloPage==="productDetail"||zonosStore.currentHelloPage==="productList";if(!e||zonosStore.helloSettings.restrictionBehavior==="DISABLED"){return[2,[]]}return[4,detectItemRestrictions(o)];case 1:t=n.sent();return[2,t]}}))}))};this.triggerShowPeekMessage=function(){e.peekMessage=e.getHelloPeekMessage(zonosStore.organizationName);var o=zonosStore.helloSettings,t=o.peekMessageBehavior,n=o.peekMessageDelay;var i=n*1e3;if(t==="ENABLED"){setTimeout((function(){e.enableShowPeekMessage();var o=e.allRestrictedItems.some((function(o){return e.productsOnPage.some((function(e){return e.description===o.itemDescription}))}));if(!o){setTimeout((function(){e.showPeekMessage=false}),PEEK_MESSAGE_CLOSE_DELAY_MS)}}),i)}};this.disableAddToCartButtons=function(){if(e.productsOnPage.length){e.productsOnPage.forEach((function(o){var t,n;var i=e.allRestrictedItems.some((function(e){return e.itemDescription===o.description}));if(i){(t=o.cartButtonNode)===null||t===void 0?void 0:t.setAttribute("disabled","disabled")}else{(n=o.cartButtonNode)===null||n===void 0?void 0:n.removeAttribute("disabled")}}))}};this.handleItemRestrictions=function(){return __awaiter(e,void 0,void 0,(function(){var o,e;var t,n;var i=this;return __generator(this,(function(r){switch(r.label){case 0:this.productsOnPage=getProductsOnPage();o=this.productsOnPage.filter((function(o){return!i.allFoundProducts.some((function(e){return e.title===o.title}))}));return[4,this.getNewItemRestrictions(o)];case 1:e=r.sent();(t=this.allRestrictedItems).push.apply(t,e);(n=this.allFoundProducts).push.apply(n,o);this.disableAddToCartButtons();return[2]}}))}))};this.reloadHelloData=function(){return __awaiter(e,void 0,void 0,(function(){return __generator(this,(function(o){switch(o.label){case 0:return[4,this.handleItemRestrictions()];case 1:o.sent();this.triggerShowPeekMessage();return[2]}}))}))};this.handleProductCountChange=debounce_1((function(){var o=zonosStore.helloSettings.productTitleElementSelector;if(o){var t=getProductsOnPage();if(e.allFoundProducts.length!==t.length&&window.location.href===e.initialUrl){if(!e.allFoundProducts.length){return}void e.reloadHelloData()}}}),1e3);this.watchProductCountChange=function(){var o;var t=new MutationObserver(e.handleProductCountChange);t.observe(document.body,{childList:true,subtree:true});(o=e.observerWatcher)===null||o===void 0?void 0:o.push(t)};this.watchPriceChange=function(){var o;var t=new MutationObserver((function(){return void e.displayCurrency()}));t.observe(document.body,{attributes:true,childList:true,subtree:true});(o=e.observerWatcher)===null||o===void 0?void 0:o.push(t)};this.updateHelloOnPageChange=function(){e.watchProductCountChange();setInterval((function(){if(window.location.href!==e.initialUrl){var o=e.initialUrl&&new URL(e.initialUrl);var t=o&&getZCountryUrlParam(o.searchParams);if(t!==localizationStore.selectedCountryCode){e.allFoundProducts=[];e.allRestrictedItems=[];e.productsOnPage=[]}e.initialUrl=window.location.href;zonosStore.currentHelloPage=getCurrentHelloLocalePage();var n=new URL(window.location.href);var i=getZCountryUrlParam(n.searchParams);if(!i){setZCountryUrlParam(localizationStore.selectedCountryCode);return}void e.reloadHelloData()}}),1e3)};this.changeShowDialog=function(o){e.showDialog=o};this.shouldAnimateLeftDesktop=function(){var o=e.helloRef&&getComputedStyle(e.helloRef).position;if(e.helloRef&&o==="relative"){var t=getHasMoreSpaceOnRight(e.helloRef);return t}};this.shouldRenderHello=function(o){if(o===void 0){o=true}var e,t;if(!localizationStore.localizationLoaded){return false}var n=zonosStore.helloSettings,i=n.countryDisplayRules,r=n.showForCountries;var s=i===null||i===void 0?void 0:i.widgetVisibility;var l=localizationStore.selectedCountryCode;var a=Array.isArray(r)?r:r!==null&&r!==void 0?r:s===null||s===void 0?void 0:s.behavior;if(o&&!localizationStore.isShippableCountry){log("Hello: not shippable country - Show for countries: ".concat(a))}if(Array.isArray(a)){return!!l&&a.includes(l)}var h;if(a==="ALL"){h=true}else{h=localizationStore.isShippableCountry}if(!h&&l&&((e=s===null||s===void 0?void 0:s.includedCountries)===null||e===void 0?void 0:e.includes(l))){h=true}if(h&&l&&((t=s===null||s===void 0?void 0:s.excludedCountries)===null||t===void 0?void 0:t.includes(l))){h=false}return h}}o.prototype.showDialogHandler=function(o){var e;if(o){var t=(e=this.helloElement)===null||e===void 0?void 0:e.parentElement;if(t&&t.parentElement===document.body){t.style.zIndex="2147483647";document.body.appendChild(t)}}};o.prototype.getCountryList=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(o){return[2,localizationStore.helloCountryList]}))}))};o.prototype.componentWillLoad=function(){var o=this;var e=setInterval((function(){return __awaiter(o,void 0,void 0,(function(){return __generator(this,(function(o){if(!this.helloRef){return[2]}if(zonosStore.loadedConfig){this.helloRef.setAttribute("data-zonos-hello-loaded","");this.updateHelloOnPageChange();this.watchPriceChange();this.handleAppearanceSettingsOverrideChange();clearInterval(e)}return[2]}))}))}),100)};o.prototype.disconnectedCallback=function(){var o;(o=this.observerWatcher)===null||o===void 0?void 0:o.forEach((function(o){return o.disconnect()}))};o.prototype.displayCurrency=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(o){if(zonosStore.helloSettings.currencyBehavior==="DISABLED"){return[2]}if(!localizationStore.exchangeRate){log("Could not display currency. Exchange rate and format data is not available.","warn");return[2]}currencyDisplay();return[2]}))}))};o.prototype.convertAndFormat=function(o){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){return[2,currencyConvertAndFormat(o)]}))}))};o.prototype.convert=function(o){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){return[2,currencyConvert(o)]}))}))};o.prototype.format=function(o){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){return[2,currencyFormat({amount:o})]}))}))};o.prototype.openHelloDialog=function(o){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){this.changeShowDialog(o);return[2]}))}))};o.prototype.handleResize=function(){this.isMobile=window.innerWidth<=768};o.prototype.handleHelloWidgetInitializedState=function(o){var e=o.countryCode,t=o.currencyCode;var n,i;if(this.isHelloWidgetRendered){return}if(localizationStore.selectedCountryCode&&typeof zonosStore.helloSettings.onInitSuccess==="function"){this.isHelloWidgetRendered=true;void((i=(n=zonosStore.helloSettings).onInitSuccess)===null||i===void 0?void 0:i.call(n,{countryCode:e,currencyCode:t}))}};o.prototype.getHelloLocation=function(){var o=this.mobileLocationOverride||zonosStore.helloSettings.mobileLocation;var e=zonosStore.helloSettings.desktopLocation;var t=this.isMobile;switch(true){case t:{var n=this.animateFromLeftOverride||(o===null||o===void 0?void 0:o.includes("LEFT"));var i=o===null||o===void 0?void 0:o.includes("TOP");return{isMobileWindow:t,isOnLeft:n,isOnTop:i,shouldFloat:!!o}}default:case!t:{var r=!zonosStore.helloSettings.anchorElementSelector&&!!e;var n=this.animateFromLeftOverride||(e===null||e===void 0?void 0:e.includes("LEFT"))||this.shouldAnimateLeftDesktop();var i=e===null||e===void 0?void 0:e.includes("TOP");return{isMobileWindow:t,isOnLeft:n,isOnTop:i,shouldFloat:r}}}};o.prototype.handleAppearanceSettingsOverrideChange=function(){var o;if((o=this.appearanceSettingsOverride)===null||o===void 0?void 0:o.theme){this.appearanceSettingsOverride.theme=getZonosStoreTheme(this.appearanceSettingsOverride.theme)}};o.prototype.componentDidLoad=function(){this.isMobile=window.innerWidth<=768};o.prototype.render=function(){var o=this;var e,t;var n=(e=zonosStore.helloSettings.excludedUrlPatterns)===null||e===void 0?void 0:e.some((function(o){return o&&new RegExp(o).test(window.location.href)}));if(n){log("Hello is excluded on this url","warn");return null}var i=localizationStore.selectedCountryCode,r=localizationStore.targetCurrency;var s=this.getHelloLocation(),l=s.isOnLeft,a=s.isOnTop,d=s.shouldFloat;var c=mergeConfig(zonosStore.appearance,this.appearanceSettingsOverride||null);var u=c.theme;var f=(t=this.allRestrictedItems)===null||t===void 0?void 0:t.filter((function(e){return o.productsOnPage.some((function(o){return o.description===e.itemDescription}))}));this.peekMessage=this.getHelloPeekMessage(zonosStore.organizationName);var g=this.shouldRenderHello()&&!!i;if(g&&!this.isHelloWidgetRendered){this.handleHelloWidgetInitializedState({countryCode:i,currencyCode:r})}return h(Host,{class:"zonos--hello zonos--elements","data-theme":u},g&&h("div",{class:classes(["zonos--hello-wrapper",d&&"zonos--hello-widget-float"])},h("button",{class:classes(["zonos--hello-widget",this.showPeekMessage&&"zonos--hello-show-peek-message",this.mobileLocationOverride&&"zonos--hello-mobile-override",l&&"zonos--hello-widget-left zonos--hello-widget-animate-from-left",a&&"zonos--hello-widget-top",!!this.allRestrictedItems.length&&"zonos--hello-has-restrictions",d&&"zonos--hello-widget-float"]),onClick:function(){void o.changeShowDialog(!o.showDialog)},onMouseEnter:function(){return o.enableShowPeekMessage()},onMouseLeave:function(){return o.showPeekMessage=false},ref:function(e){return e&&(o.helloRef=e)},type:"button"},h("zonos-text",{class:"zonos--hello-message"},this.peekMessage),i&&h("div",{class:"zonos--hello-country-flag-wrapper"},h("zonos-country-flag",{class:"zonos--hello-country-flag",countryCode:i}))),h("div",{class:classes(["zonos--hello-dialog-wrapper",this.mobileLocationOverride&&"zonos--hello-dialog-wrapper-mobile-override",l&&"zonos--hello-widget-left zonos--hello-widget-animate-from-left",a&&"zonos--hello-widget-top",d&&"zonos--hello-widget-float"]),style:{height:this.showDialog?"fit-content":"0px"}},h("zonos-hello-dialog",{animateFromLeftOverride:this.animateFromLeftOverride,appearanceSettings:c,isOpen:this.showDialog,mobileLocationOverride:this.mobileLocationOverride,restrictedItems:f,setIsOpen:this.changeShowDialog}))))};Object.defineProperty(o.prototype,"helloElement",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(o,"watchers",{get:function(){return{showDialog:["showDialogHandler"],appearanceSettingsOverride:["handleAppearanceSettingsOverrideChange"]}},enumerable:false,configurable:true});return o}();ZonosHello.style=ZonosHelloStyle0;export{ZonosHello as zonos_hello};
1
+ var __awaiter=this&&this.__awaiter||function(o,e,t,n){function i(o){return o instanceof t?o:new t((function(e){e(o)}))}return new(t||(t=Promise))((function(t,r){function s(o){try{a(n.next(o))}catch(o){r(o)}}function l(o){try{a(n["throw"](o))}catch(o){r(o)}}function a(o){o.done?t(o.value):i(o.value).then(s,l)}a((n=n.apply(o,e||[])).next())}))};var __generator=this&&this.__generator||function(o,e){var t={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},n,i,r,s;return s={next:l(0),throw:l(1),return:l(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function l(o){return function(e){return a([o,e])}}function a(l){if(n)throw new TypeError("Generator is already executing.");while(s&&(s=0,l[0]&&(t=0)),t)try{if(n=1,i&&(r=l[0]&2?i["return"]:l[0]?i["throw"]||((r=i["return"])&&r.call(i),0):i.next)&&!(r=r.call(i,l[1])).done)return r;if(i=0,r)l=[l[0]&2,r.value];switch(l[0]){case 0:case 1:r=l;break;case 4:t.label++;return{value:l[1],done:false};case 5:t.label++;i=l[1];l=[0];continue;case 7:l=t.ops.pop();t.trys.pop();continue;default:if(!(r=t.trys,r=r.length>0&&r[r.length-1])&&(l[0]===6||l[0]===2)){t=0;continue}if(l[0]===3&&(!r||l[1]>r[0]&&l[1]<r[3])){t.label=l[1];break}if(l[0]===6&&t.label<r[1]){t.label=r[1];r=l;break}if(r&&t.label<r[2]){t.label=r[2];t.ops.push(l);break}if(r[2])t.ops.pop();t.trys.pop();continue}l=e.call(o,t)}catch(o){l=[6,o];i=0}finally{n=r=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:true}}};import{r as registerInstance,h,a as Host,g as getElement}from"./index-cfd394c8.js";import{d as debounce_1}from"./debounce-ab526ca0.js";import{l as localizationStore,i as isValidSelector,t as translate,g as getZCountryUrlParam,j as setZCountryUrlParam,k as currencyDisplay,m as currencyConvertAndFormat,n as currencyConvert,d as currencyFormat}from"./localization-2e523b35.js";import{z as zonosStore,g as getZonosStoreTheme,m as mergeConfig}from"./zonosStore-9662b071.js";import{c as classes}from"./classes-0d95c529.js";import{h as handleFetch,l as logError}from"./handleFetch-a844cac1.js";import{g as getHasMoreSpaceOnRight}from"./getHasMoreSpaceOnRight-70eb913a.js";import{l as log}from"./VarianceTest-572cecf5.js";var checkItemRestrictions=function(o){return __awaiter(void 0,[o],void 0,(function(o){var e,t,n,i,r;var s=o.items,l=o.shipFrom,a=o.shipTo;return __generator(this,(function(o){switch(o.label){case 0:t={items:s,shipFrom:l,shipTo:a};return[4,handleFetch("/api/zonos-elements/check-item-restrictions",{body:t,method:"POST"})];case 1:n=o.sent(),i=n.errors,r=n.json;if(i.length||!r){logError("Error fetching item restrictions: ".concat((e=i.find(Boolean))===null||e===void 0?void 0:e.message));return[2,[]]}return[2,r.filter(Boolean)]}}))}))};var detectItemRestrictions=function(o){return __awaiter(void 0,void 0,void 0,(function(){var e,t,n,i;return __generator(this,(function(r){switch(r.label){case 0:if(!o.length){return[2,[]]}e=localizationStore.selectedCountryCode;if(!e){logError("Hello could not check item restrictions - No country code selected");return[2,[]]}t=o.map((function(o){return{description:o.description,name:o.title}}));return[4,checkItemRestrictions({items:t,shipFrom:"AD",shipTo:e})];case 1:n=r.sent();i=n.map((function(o){var e;var n=((e=t.filter((function(e){return e.description===o.itemDescription})).find(Boolean))===null||e===void 0?void 0:e.name)||"";return Object.assign(Object.assign({},o),{name:n})}));return[2,i]}}))}))};var matchUrlPattern=function(o){var e=o===null||o===void 0?void 0:o.replace("www.","").replace("https://","");return e&&new RegExp(e).test(window.location.href)};var getCurrentHelloLocalePage=function(){var o=zonosStore.helloSettings,e=o.cartUrlPattern,t=o.homepageUrlPattern,n=o.productDetailUrlPattern,i=o.productListUrlPattern;if(matchUrlPattern(e)){return"cart"}if(matchUrlPattern(n)){return"productDetail"}if(matchUrlPattern(i)){return"productList"}if(matchUrlPattern(t)){return"home"}return""};var HELLO_WIDGET_DEFAULT_SIZE=18;var HELLO_WIDGET_MIN_SIZE=18;var HELLO_WIDGET_MAX_SIZE=64;var getHelloWidgetSize=function(o){if(o==null||!Number.isFinite(o)||o<=0){return HELLO_WIDGET_DEFAULT_SIZE}return Math.min(HELLO_WIDGET_MAX_SIZE,Math.max(HELLO_WIDGET_MIN_SIZE,o))};var getProductsOnPage=function(){var o,e;var t=zonosStore.helloSettings,n=t.productAddToCartElementSelector,i=t.productDescriptionElementSelector,r=t.productTitleElementSelector,s=t.restrictionBehavior;if(!r||!i){log("Hello could not check item restrictions - must provide title and description selectors.")}var l=r&&isValidSelector(r)&&document.querySelectorAll(r)||[];var a=i&&isValidSelector(i)&&document.querySelectorAll(i)||[];if(l.length!==a.length){log("Hello could not check item restrictions - Title and description selectors do not match");return[]}var h=s==="RESTRICT_AND_BLOCK";var d=h&&n&&isValidSelector(n)&&document.querySelectorAll(n)||[];if(h&&d.length!==a.length){log('Hello could not disable "Add to cart" buttons - Title and add to cart selectors do not match')}var c=[];for(var u=0;u<l.length;u++){var f=l[u];var z=a[u];var g=d[u];if(f&&z){var m={cartButtonNode:g||null,description:((o=z.textContent)===null||o===void 0?void 0:o.trim())||"",title:((e=f.textContent)===null||e===void 0?void 0:e.trim())||""};c.push(m)}}return c};var zonosHelloCss=":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{display:inline-block;--zonos-elements-hello-widget-size:18px;--zonos-elements-hello-bubble-padding:max(\n 6px,\n calc(var(--zonos-elements-hello-widget-size) * 0.22)\n );--zonos-elements-hello-bubble-size:calc(\n var(--zonos-elements-hello-widget-size) +\n var(--zonos-elements-hello-bubble-padding) * 2 + 2px\n )}:host .zonos--hello-wrapper{position:relative}:host .zonos--hello-wrapper .zonos--hello-dialog-wrapper-mobile-override{position:fixed;bottom:0;left:0;width:100vw;z-index:1001;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content}@media (max-width: 768px){:host .zonos--hello-wrapper .zonos--hello-dialog-wrapper{position:fixed;bottom:0;left:0;width:100vw;z-index:1001;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content}}@media screen and (min-width: 769px){:host .zonos--hello-wrapper .zonos--hello-dialog-wrapper.zonos--hello-widget-float{position:fixed;bottom:72px;right:32px;width:auto;height:auto;z-index:1001}:host .zonos--hello-wrapper .zonos--hello-dialog-wrapper.zonos--hello-widget-float.zonos--hello-widget-left{left:32px;right:auto}:host .zonos--hello-wrapper .zonos--hello-dialog-wrapper.zonos--hello-widget-float.zonos--hello-widget-top{bottom:auto;top:32px}}:host .zonos--hello-widget{-webkit-transition:all 0.7s cubic-bezier(0.31, -0.02, 0.06, 1.53);transition:all 0.7s cubic-bezier(0.31, -0.02, 0.06, 1.53);padding:var(--zonos-elements-hello-bubble-padding);border-radius:9999px;background:var(--zonos-elements-page-background);font-size:var(--zonos-elements-font-size-s);border:var(--zonos-elements-border);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;cursor:pointer;-webkit-box-sizing:border-box;box-sizing:border-box;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;position:relative;z-index:1000}:host .zonos--hello-widget>.zonos--hello-message{-ms-flex-order:0;order:0;max-width:0;height:100%;white-space:nowrap;-webkit-transition:border 0.3s ease-in, all 0.7s cubic-bezier(0.31, -0.02, 0.06, 1.53);transition:border 0.3s ease-in, all 0.7s cubic-bezier(0.31, -0.02, 0.06, 1.53);overflow:hidden;color:var(--zonos-elements-text-color);position:absolute;background:var(--zonos-elements-page-background);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;border-top-left-radius:calc(var(--zonos-elements-hello-bubble-size) / 2);border-bottom-left-radius:calc(var(--zonos-elements-hello-bubble-size) / 2);left:0;-webkit-transform:translateX(calc(-100% + var(--zonos-elements-hello-bubble-size) / 2));transform:translateX(calc(-100% + var(--zonos-elements-hello-bubble-size) / 2));width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;border-top:var(--zonos-elements-border);border-bottom:var(--zonos-elements-border)}:host .zonos--hello-widget.zonos--hello-has-restrictions{background:var(--zonos-elements-red-100);border:1px solid var(--zonos-elements-red-200)}:host .zonos--hello-widget.zonos--hello-has-restrictions>.zonos--hello-message{background:var(--zonos-elements-red-100);color:var(--zonos-elements-red-800);font-weight:500}:host .zonos--hello-widget.zonos--hello-has-restrictions.zonos--hello-show-peek-message>.zonos--hello-message{border:1px solid var(--zonos-elements-red-200)}:host .zonos--hello-widget.zonos--hello-show-peek-message{max-width:100vw;width:100%}:host .zonos--hello-widget.zonos--hello-show-peek-message>.zonos--hello-message{max-width:100vw;padding:0 calc(var(--zonos-elements-hello-bubble-size) / 2);border:var(--zonos-elements-border)}:host .zonos--hello-widget.zonos--hello-show-peek-message:not(.zonos--hello-widget-animate-from-left)>.zonos--hello-message{border-right:none}:host .zonos--hello-widget.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left>.zonos--hello-message{padding-left:calc(var(--zonos-elements-hello-bubble-size) / 2);border-left:none}:host .zonos--hello-widget.zonos--hello-widget-animate-from-left>.zonos--hello-message{-ms-flex-order:1;order:1;-webkit-transform:translateX(calc(100% - var(--zonos-elements-hello-bubble-size) / 2));transform:translateX(calc(100% - var(--zonos-elements-hello-bubble-size) / 2));right:0;left:auto;border-top-right-radius:calc(var(--zonos-elements-hello-bubble-size) / 2);border-bottom-right-radius:calc(var(--zonos-elements-hello-bubble-size) / 2)}:host .zonos--hello-widget .zonos--hello-country-flag-wrapper{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center}:host .zonos--hello-widget .zonos--hello-country-flag-wrapper .zonos--hello-country-flag{height:18px;width:18px;position:relative;overflow:hidden;border-radius:30px;-webkit-box-shadow:var(--zonos-elements-v3-shadow-medium);box-shadow:var(--zonos-elements-v3-shadow-medium);z-index:10;justify-self:center;height:var(--zonos-elements-hello-widget-size);width:var(--zonos-elements-hello-widget-size)}:host .zonos--hello-widget.zonos--hello-widget-float{position:fixed;bottom:72px;right:32px}:host .zonos--hello-widget.zonos--hello-widget-float.zonos--hello-widget-left{left:32px;right:auto}:host .zonos--hello-widget.zonos--hello-widget-float.zonos--hello-widget-top{bottom:auto;top:32px}:host .zonos--hello-widget.zonos--hello-widget-float.zonos--hello-has-restrictions.zonos--hello-show-peek-message>.zonos--hello-message{border:none}:host .zonos--hello-widget.zonos--hello-widget-float>.zonos--hello-message{position:relative;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;border-radius:30px;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;top:0;bottom:0;left:0;-webkit-transform:translateX(0);transform:translateX(0);width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;border:none}:host .zonos--hello-widget.zonos--hello-widget-float.zonos--hello-widget-animate-from-left>.zonos--hello-message{-webkit-transform:translateX(0);transform:translateX(0)}:host .zonos--hello-widget.zonos--hello-widget-float.zonos--hello-show-peek-message{width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}:host .zonos--hello-widget.zonos--hello-widget-float.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left>.zonos--hello-message{padding-left:8px;padding-right:4px}:host .zonos--hello-widget.zonos--hello-widget-float.zonos--hello-show-peek-message>.zonos--hello-message{padding:0 var(--zonos-elements-radius-4);padding-right:6px;border:none}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float{position:fixed;bottom:72px;right:32px}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float.zonos--hello-widget-left{left:32px;right:auto}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float.zonos--hello-widget-top{bottom:auto;top:32px}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float.zonos--hello-has-restrictions.zonos--hello-show-peek-message>.zonos--hello-message{border:none}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float>.zonos--hello-message{position:relative;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;border-radius:30px;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;top:0;bottom:0;left:0;-webkit-transform:translateX(0);transform:translateX(0);width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;border:none}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float.zonos--hello-widget-animate-from-left>.zonos--hello-message{-webkit-transform:translateX(0);transform:translateX(0)}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float.zonos--hello-show-peek-message{width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left>.zonos--hello-message{padding-left:8px;padding-right:4px}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float.zonos--hello-show-peek-message>.zonos--hello-message{padding:0 var(--zonos-elements-radius-4);padding-right:6px;border:none}";var ZonosHelloStyle0=zonosHelloCss;var PEEK_MESSAGE_CLOSE_DELAY_MS=3e3;var ZonosHello=function(){function o(o){var e=this;registerInstance(this,o);this.showPeekMessage=false;this.zonosStoreHelloSettings=zonosStore.helloSettings;this.showDialog=false;this.peekMessage="";this.initialUrl="";this.allRestrictedItems=[];this.allFoundProducts=[];this.productsOnPage=[];this.isHelloWidgetRendered=false;this.isMobile=false;this.getHelloPeekMessage=function(o){var t=zonosStore.currentHelloPage==="productDetail"||zonosStore.currentHelloPage==="productList";if(t&&e.allRestrictedItems.length){var n=translate("click to learn more");var i=zonosStore.currentHelloPage==="productDetail"?translate("Restricted item"):translate("Restricted items found");return"".concat(i," - ").concat(n)}switch(zonosStore.currentHelloPage){case"cart":return translate("Prepay duties and taxes at checkout");case"productList":case"productDetail":return translate("See duty and tax thresholds");default:return translate("Welcome to [storeName]",{storeName:o})}};this.enableShowPeekMessage=function(){if(e.peekMessage){e.showPeekMessage=true}};this.getNewItemRestrictions=function(o){return __awaiter(e,void 0,void 0,(function(){var e,t;return __generator(this,(function(n){switch(n.label){case 0:e=zonosStore.currentHelloPage==="productDetail"||zonosStore.currentHelloPage==="productList";if(!e||zonosStore.helloSettings.restrictionBehavior==="DISABLED"){return[2,[]]}return[4,detectItemRestrictions(o)];case 1:t=n.sent();return[2,t]}}))}))};this.triggerShowPeekMessage=function(){e.peekMessage=e.getHelloPeekMessage(zonosStore.organizationName);var o=zonosStore.helloSettings,t=o.peekMessageBehavior,n=o.peekMessageDelay;var i=n*1e3;if(t==="ENABLED"){setTimeout((function(){e.enableShowPeekMessage();var o=e.allRestrictedItems.some((function(o){return e.productsOnPage.some((function(e){return e.description===o.itemDescription}))}));if(!o){setTimeout((function(){e.showPeekMessage=false}),PEEK_MESSAGE_CLOSE_DELAY_MS)}}),i)}};this.disableAddToCartButtons=function(){if(e.productsOnPage.length){e.productsOnPage.forEach((function(o){var t,n;var i=e.allRestrictedItems.some((function(e){return e.itemDescription===o.description}));if(i){(t=o.cartButtonNode)===null||t===void 0?void 0:t.setAttribute("disabled","disabled")}else{(n=o.cartButtonNode)===null||n===void 0?void 0:n.removeAttribute("disabled")}}))}};this.handleItemRestrictions=function(){return __awaiter(e,void 0,void 0,(function(){var o,e;var t,n;var i=this;return __generator(this,(function(r){switch(r.label){case 0:this.productsOnPage=getProductsOnPage();o=this.productsOnPage.filter((function(o){return!i.allFoundProducts.some((function(e){return e.title===o.title}))}));return[4,this.getNewItemRestrictions(o)];case 1:e=r.sent();(t=this.allRestrictedItems).push.apply(t,e);(n=this.allFoundProducts).push.apply(n,o);this.disableAddToCartButtons();return[2]}}))}))};this.reloadHelloData=function(){return __awaiter(e,void 0,void 0,(function(){return __generator(this,(function(o){switch(o.label){case 0:return[4,this.handleItemRestrictions()];case 1:o.sent();this.triggerShowPeekMessage();return[2]}}))}))};this.handleProductCountChange=debounce_1((function(){var o=zonosStore.helloSettings.productTitleElementSelector;if(o){var t=getProductsOnPage();if(e.allFoundProducts.length!==t.length&&window.location.href===e.initialUrl){if(!e.allFoundProducts.length){return}void e.reloadHelloData()}}}),1e3);this.watchProductCountChange=function(){var o;var t=new MutationObserver(e.handleProductCountChange);t.observe(document.body,{childList:true,subtree:true});(o=e.observerWatcher)===null||o===void 0?void 0:o.push(t)};this.watchPriceChange=function(){var o;var t=new MutationObserver((function(){return void e.displayCurrency()}));t.observe(document.body,{attributes:true,childList:true,subtree:true});(o=e.observerWatcher)===null||o===void 0?void 0:o.push(t)};this.updateHelloOnPageChange=function(){e.watchProductCountChange();setInterval((function(){if(window.location.href!==e.initialUrl){var o=e.initialUrl&&new URL(e.initialUrl);var t=o&&getZCountryUrlParam(o.searchParams);if(t!==localizationStore.selectedCountryCode){e.allFoundProducts=[];e.allRestrictedItems=[];e.productsOnPage=[]}e.initialUrl=window.location.href;zonosStore.currentHelloPage=getCurrentHelloLocalePage();var n=new URL(window.location.href);var i=getZCountryUrlParam(n.searchParams);if(!i){setZCountryUrlParam(localizationStore.selectedCountryCode);return}void e.reloadHelloData()}}),1e3)};this.changeShowDialog=function(o){e.showDialog=o};this.shouldAnimateLeftDesktop=function(){var o=e.helloRef&&getComputedStyle(e.helloRef).position;if(e.helloRef&&o==="relative"){var t=getHasMoreSpaceOnRight(e.helloRef);return t}};this.shouldRenderHello=function(o){if(o===void 0){o=true}var e,t;if(!localizationStore.localizationLoaded){return false}var n=zonosStore.helloSettings,i=n.countryDisplayRules,r=n.showForCountries;var s=i===null||i===void 0?void 0:i.widgetVisibility;var l=localizationStore.selectedCountryCode;var a=Array.isArray(r)?r:r!==null&&r!==void 0?r:s===null||s===void 0?void 0:s.behavior;if(o&&!localizationStore.isShippableCountry){log("Hello: not shippable country - Show for countries: ".concat(a))}if(Array.isArray(a)){return!!l&&a.includes(l)}var h;if(a==="ALL"){h=true}else{h=localizationStore.isShippableCountry}if(!h&&l&&((e=s===null||s===void 0?void 0:s.includedCountries)===null||e===void 0?void 0:e.includes(l))){h=true}if(h&&l&&((t=s===null||s===void 0?void 0:s.excludedCountries)===null||t===void 0?void 0:t.includes(l))){h=false}return h}}o.prototype.showDialogHandler=function(o){var e;if(o){var t=(e=this.helloElement)===null||e===void 0?void 0:e.parentElement;if(t&&t.parentElement===document.body){t.style.zIndex="2147483647";document.body.appendChild(t)}}};o.prototype.getCountryList=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(o){return[2,localizationStore.helloCountryList]}))}))};o.prototype.componentWillLoad=function(){var o=this;var e=setInterval((function(){return __awaiter(o,void 0,void 0,(function(){return __generator(this,(function(o){if(!this.helloRef){return[2]}if(zonosStore.loadedConfig){this.helloRef.setAttribute("data-zonos-hello-loaded","");this.updateHelloOnPageChange();this.watchPriceChange();this.handleAppearanceSettingsOverrideChange();clearInterval(e)}return[2]}))}))}),100)};o.prototype.disconnectedCallback=function(){var o;(o=this.observerWatcher)===null||o===void 0?void 0:o.forEach((function(o){return o.disconnect()}))};o.prototype.displayCurrency=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(o){if(zonosStore.helloSettings.currencyBehavior==="DISABLED"){return[2]}if(!localizationStore.exchangeRate){log("Could not display currency. Exchange rate and format data is not available.","warn");return[2]}currencyDisplay();return[2]}))}))};o.prototype.convertAndFormat=function(o){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){return[2,currencyConvertAndFormat(o)]}))}))};o.prototype.convert=function(o){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){return[2,currencyConvert(o)]}))}))};o.prototype.format=function(o){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){return[2,currencyFormat({amount:o})]}))}))};o.prototype.openHelloDialog=function(o){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){this.changeShowDialog(o);return[2]}))}))};o.prototype.handleResize=function(){this.isMobile=window.innerWidth<=768};o.prototype.handleHelloWidgetInitializedState=function(o){var e=o.countryCode,t=o.currencyCode;var n,i;if(this.isHelloWidgetRendered){return}if(localizationStore.selectedCountryCode&&typeof zonosStore.helloSettings.onInitSuccess==="function"){this.isHelloWidgetRendered=true;void((i=(n=zonosStore.helloSettings).onInitSuccess)===null||i===void 0?void 0:i.call(n,{countryCode:e,currencyCode:t}))}};o.prototype.getHelloLocation=function(){var o=this.mobileLocationOverride||zonosStore.helloSettings.mobileLocation;var e=this.desktopLocationOverride||zonosStore.helloSettings.desktopLocation;var t=this.isMobile;switch(true){case t:{var n=this.animateFromLeftOverride||(o===null||o===void 0?void 0:o.includes("LEFT"));var i=o===null||o===void 0?void 0:o.includes("TOP");return{isMobileWindow:t,isOnLeft:n,isOnTop:i,shouldFloat:!!o}}default:case!t:{var r=!!this.desktopLocationOverride||!zonosStore.helloSettings.anchorElementSelector&&!!e;var n=this.animateFromLeftOverride||(e?e.includes("LEFT"):this.shouldAnimateLeftDesktop());var i=e===null||e===void 0?void 0:e.includes("TOP");return{isMobileWindow:t,isOnLeft:n,isOnTop:i,shouldFloat:r}}}};o.prototype.handleAppearanceSettingsOverrideChange=function(){var o;if((o=this.appearanceSettingsOverride)===null||o===void 0?void 0:o.theme){this.appearanceSettingsOverride.theme=getZonosStoreTheme(this.appearanceSettingsOverride.theme)}};o.prototype.componentDidLoad=function(){this.isMobile=window.innerWidth<=768};o.prototype.render=function(){var o=this;var e,t;var n=(e=zonosStore.helloSettings.excludedUrlPatterns)===null||e===void 0?void 0:e.some((function(o){return o&&new RegExp(o).test(window.location.href)}));if(n){log("Hello is excluded on this url","warn");return null}var i=localizationStore.selectedCountryCode,r=localizationStore.targetCurrency;var s=this.getHelloLocation(),l=s.isOnLeft,a=s.isOnTop,d=s.shouldFloat;var c=mergeConfig(zonosStore.appearance,this.appearanceSettingsOverride||null);var u=c.theme;var f=(t=this.allRestrictedItems)===null||t===void 0?void 0:t.filter((function(e){return o.productsOnPage.some((function(o){return o.description===e.itemDescription}))}));this.peekMessage=this.getHelloPeekMessage(zonosStore.organizationName);var z=this.shouldRenderHello()&&!!i;if(z&&!this.isHelloWidgetRendered){this.handleHelloWidgetInitializedState({countryCode:i,currencyCode:r})}var g=getHelloWidgetSize(zonosStore.helloSettings.widgetSize);return h(Host,{class:"zonos--hello zonos--elements","data-theme":u,style:{"--zonos-elements-hello-widget-size":"".concat(g,"px")}},z&&h("div",{class:classes(["zonos--hello-wrapper",d&&"zonos--hello-widget-float"])},h("button",{class:classes(["zonos--hello-widget",this.showPeekMessage&&"zonos--hello-show-peek-message",this.mobileLocationOverride&&"zonos--hello-mobile-override",l&&"zonos--hello-widget-left zonos--hello-widget-animate-from-left",a&&"zonos--hello-widget-top",!!this.allRestrictedItems.length&&"zonos--hello-has-restrictions",d&&"zonos--hello-widget-float"]),onClick:function(){void o.changeShowDialog(!o.showDialog)},onMouseEnter:function(){return o.enableShowPeekMessage()},onMouseLeave:function(){return o.showPeekMessage=false},ref:function(e){return e&&(o.helloRef=e)},type:"button"},h("zonos-text",{class:"zonos--hello-message"},this.peekMessage),i&&h("div",{class:"zonos--hello-country-flag-wrapper"},h("zonos-country-flag",{class:"zonos--hello-country-flag",countryCode:i}))),h("div",{class:classes(["zonos--hello-dialog-wrapper",this.mobileLocationOverride&&"zonos--hello-dialog-wrapper-mobile-override",l&&"zonos--hello-widget-left zonos--hello-widget-animate-from-left",a&&"zonos--hello-widget-top",d&&"zonos--hello-widget-float"]),style:{height:this.showDialog?"fit-content":"0px"}},h("zonos-hello-dialog",{animateFromLeftOverride:l,appearanceSettings:c,isOpen:this.showDialog,mobileLocationOverride:this.mobileLocationOverride,restrictedItems:f,setIsOpen:this.changeShowDialog}))))};Object.defineProperty(o.prototype,"helloElement",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(o,"watchers",{get:function(){return{showDialog:["showDialogHandler"],appearanceSettingsOverride:["handleAppearanceSettingsOverrideChange"]}},enumerable:false,configurable:true});return o}();ZonosHello.style=ZonosHelloStyle0;export{ZonosHello as zonos_hello};
@@ -1 +1 @@
1
- import{r as registerInstance,d as createEvent,h,a as Host,g as getElement}from"./index-cfd394c8.js";import{f as zonosStoreFontFamily}from"./zonosStore-f1d45eac.js";import{c as classes}from"./classes-0d95c529.js";import{g as getBorderRadius}from"./getBorderRadius-66de1b16.js";import"./VarianceTest-572cecf5.js";var zonosInputCss=':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{margin:1px}:host .zonos--label-wrapper{position:relative;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;height:100%;width:100%;background:var(--zonos-elements-input-background);border-radius:var(--zonos--border-radius);border:var(--zonos-elements-border)}:host .zonos--label-wrapper:hover{border:1px solid var(--zonos-elements-gray-300)}:host .zonos--floated-input{-webkit-box-sizing:border-box;box-sizing:border-box;position:relative;padding:0 16px;outline:none;-webkit-transition:var(--zonos-elements-transition);transition:var(--zonos-elements-transition);width:100%;border-radius:var(--zonos--border-radius);background:var(--zonos-elements-input-background);border:0;-ms-flex-order:2;order:2;font-weight:500}:host .zonos--floated-input :-internal-autofill-selected{border-radius:var(--zonos-elements-radius-6) 0 0 var(--zonos-elements-radius-6)}:host .zonos--floated-input :-internal-autofill-selected+label+div{background-color:#e8f0fe}:host .zonos--floated-input.has-label{padding:16px 4px 8px 16px}:host .zonos--floated-input.has-label.has-input-prefix{padding-left:0}:host .zonos--floated-input.has-label.has-input-prefix+.zonos--floated-label::before{margin-left:0}:host .zonos--floated-input:not(.has-label)::-webkit-input-placeholder{opacity:var(--zonos-elements-opacity-disabled)}:host .zonos--floated-input:not(.has-label)::-moz-placeholder{opacity:var(--zonos-elements-opacity-disabled)}:host .zonos--floated-input:not(.has-label):-ms-input-placeholder{opacity:var(--zonos-elements-opacity-disabled)}:host .zonos--floated-input:not(.has-label)::-ms-input-placeholder{opacity:var(--zonos-elements-opacity-disabled)}:host .zonos--floated-input:not(.has-label)::placeholder{opacity:var(--zonos-elements-opacity-disabled)}:host .zonos--floated-input::-webkit-input-placeholder{-webkit-transition:var(--zonos-elements-transition);transition:var(--zonos-elements-transition);opacity:0}:host .zonos--floated-input::-moz-placeholder{-moz-transition:var(--zonos-elements-transition);transition:var(--zonos-elements-transition);opacity:0}:host .zonos--floated-input:-ms-input-placeholder{-ms-transition:var(--zonos-elements-transition);transition:var(--zonos-elements-transition);opacity:0}:host .zonos--floated-input::-ms-input-placeholder{-ms-transition:var(--zonos-elements-transition);transition:var(--zonos-elements-transition);opacity:0}:host .zonos--floated-input::placeholder{-webkit-transition:var(--zonos-elements-transition);transition:var(--zonos-elements-transition);opacity:0}:host .zonos--floated-input:focus{outline:none}:host .zonos--floated-input:focus+.zonos--floated-label::after{-webkit-box-shadow:var(--zonos-elements-glow-blue);box-shadow:var(--zonos-elements-glow-blue)}:host .zonos--floated-input.has-error+.zonos--floated-label::after{-webkit-box-shadow:var(--zonos-elements-glow-error);box-shadow:var(--zonos-elements-glow-error)}:host .zonos--floated-input.has-content::-webkit-input-placeholder,:host .zonos--floated-input:focus::-webkit-input-placeholder{opacity:var(--zonos-elements-opacity-disabled)}:host .zonos--floated-input.has-content::-moz-placeholder,:host .zonos--floated-input:focus::-moz-placeholder{opacity:var(--zonos-elements-opacity-disabled)}:host .zonos--floated-input.has-content:-ms-input-placeholder,:host .zonos--floated-input:focus:-ms-input-placeholder{opacity:var(--zonos-elements-opacity-disabled)}:host .zonos--floated-input.has-content::-ms-input-placeholder,:host .zonos--floated-input:focus::-ms-input-placeholder{opacity:var(--zonos-elements-opacity-disabled)}:host .zonos--floated-input.has-content::placeholder,:host .zonos--floated-input:focus::placeholder{opacity:var(--zonos-elements-opacity-disabled)}:host .zonos--floated-input.has-content+.zonos--floated-label::before,:host .zonos--floated-input:focus+.zonos--floated-label::before{top:11px;-webkit-transform:scale(0.8);transform:scale(0.8)}:host .zonos--floated-input:-webkit-autofill,:host .zonos--floated-input:-moz-autofill{background-color:var(--zonos-elements-input-background);color:var(--zonos-elements-text-color)}:host .zonos--floated-label{display:block;max-height:0;pointer-events:none;-ms-flex-order:1;order:1}:host .zonos--floated-label::before{content:attr(data-label);color:var(--zonos-elements-gray-800);position:absolute;font-size:var(--zonos-elements-font-size-base);line-height:var(--zonos-elements-font-size-base);display:inline-block;-webkit-filter:blur(0);filter:blur(0);-webkit-transform-origin:left top;transform-origin:left top;-webkit-transition:var(--zonos-elements-transition);transition:var(--zonos-elements-transition);margin-left:16px;top:calc(50% - var(--zonos-elements-font-size-base) / 2);z-index:1}:host .zonos--floated-label::after{content:"";position:absolute;left:0;right:0;top:0;bottom:0;border-radius:var(--zonos--border-radius)}:host{}:host .disabled .zonos--floated-label{pointer-events:inherit}:host .disabled .zonos--floated-label::after{cursor:not-allowed;z-index:1}:host(.sm){height:calc(var(--zonos-elements-size-sm) - 2px)}:host(.sm) .zonos--floated-input.has-label{padding-top:13px;padding-bottom:0}:host(.sm) .zonos--floated-input.has-label:focus+.zonos--floated-label::before,:host(.sm) .zonos--floated-input.has-label.has-content+.zonos--floated-label::before{top:2px}:host(.md){height:calc(var(--zonos-elements-size-md) - 2px)}:host(.md) .zonos--floated-input.has-label{padding-top:20px}:host(.md) .zonos--floated-input.has-label:focus+.zonos--floated-label::before,:host(.md) .zonos--floated-input.has-label.has-content+.zonos--floated-label::before{top:6px}:host(.lg){height:calc(var(--zonos-elements-size-lg) - 2px)}:host(.lg) .zonos--floated-input.has-label:focus+.zonos--floated-label::before,:host(.lg) .zonos--floated-input.has-label.has-content+.zonos--floated-label::before{top:10px}:host(.xl){height:calc(var(--zonos-elements-size-xl) - 2px)}:host(.xl) .zonos--floated-input.has-label{padding-bottom:2px}';var ZonosInputStyle0=zonosInputCss;var ZonosInput=function(){function o(o){registerInstance(this,o);this.inputChange=createEvent(this,"inputChange",7);this.inputValue="";this.inputSize="md";this.isDisabled=false;this.isError=false;this.inputPlaceholder="";this.value=this.inputValue}o.prototype.onInputValueChange=function(o){this.value=o;this.inputChange.emit(o)};o.prototype.render=function(){var o=this;return h(Host,{key:"97f28cac82f273f95b6401f6b29ec35939cd3652",class:classes(["zonos--input zonos--elements",this.inputSize,this.isError&&"has-error"]),style:{"--zonos--border-radius":getBorderRadius(),"--zonos--font-family":zonosStoreFontFamily()}},h("div",{key:"374a3b102e1dc4c422f6f69eb235f940c0271aab",class:classes(["zonos--label-wrapper",this.isDisabled&&"disabled"])},h("input",{key:"fd0810fbbf21f53dfe890c76bd7b66b2afafeac1",class:classes(["zonos--floated-input",!!this.inputLabel&&"has-label",this.inputValue&&"has-content",this.isError&&"has-error"]),disabled:this.isDisabled,onInput:function(t){var e=t.target;o.inputChange.emit(e.value)},placeholder:this.inputPlaceholder,type:"text",value:this.value}),h("label",{key:"7a1e72620a76eb4507b9b4c79f8faf73657cb789",class:"zonos--floated-label","data-label":this.inputLabel})))};Object.defineProperty(o.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(o,"watchers",{get:function(){return{inputValue:["onInputValueChange"]}},enumerable:false,configurable:true});return o}();ZonosInput.style=ZonosInputStyle0;export{ZonosInput as zonos_input};
1
+ import{r as registerInstance,d as createEvent,h,a as Host,g as getElement}from"./index-cfd394c8.js";import{f as zonosStoreFontFamily}from"./zonosStore-9662b071.js";import{c as classes}from"./classes-0d95c529.js";import{g as getBorderRadius}from"./getBorderRadius-98c64be8.js";import"./VarianceTest-572cecf5.js";var zonosInputCss=':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{margin:1px}:host .zonos--label-wrapper{position:relative;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;height:100%;width:100%;background:var(--zonos-elements-input-background);border-radius:var(--zonos--border-radius);border:var(--zonos-elements-border)}:host .zonos--label-wrapper:hover{border:1px solid var(--zonos-elements-gray-300)}:host .zonos--floated-input{-webkit-box-sizing:border-box;box-sizing:border-box;position:relative;padding:0 16px;outline:none;-webkit-transition:var(--zonos-elements-transition);transition:var(--zonos-elements-transition);width:100%;border-radius:var(--zonos--border-radius);background:var(--zonos-elements-input-background);border:0;-ms-flex-order:2;order:2;font-weight:500}:host .zonos--floated-input :-internal-autofill-selected{border-radius:var(--zonos-elements-radius-6) 0 0 var(--zonos-elements-radius-6)}:host .zonos--floated-input :-internal-autofill-selected+label+div{background-color:#e8f0fe}:host .zonos--floated-input.has-label{padding:16px 4px 8px 16px}:host .zonos--floated-input.has-label.has-input-prefix{padding-left:0}:host .zonos--floated-input.has-label.has-input-prefix+.zonos--floated-label::before{margin-left:0}:host .zonos--floated-input:not(.has-label)::-webkit-input-placeholder{opacity:var(--zonos-elements-opacity-disabled)}:host .zonos--floated-input:not(.has-label)::-moz-placeholder{opacity:var(--zonos-elements-opacity-disabled)}:host .zonos--floated-input:not(.has-label):-ms-input-placeholder{opacity:var(--zonos-elements-opacity-disabled)}:host .zonos--floated-input:not(.has-label)::-ms-input-placeholder{opacity:var(--zonos-elements-opacity-disabled)}:host .zonos--floated-input:not(.has-label)::placeholder{opacity:var(--zonos-elements-opacity-disabled)}:host .zonos--floated-input::-webkit-input-placeholder{-webkit-transition:var(--zonos-elements-transition);transition:var(--zonos-elements-transition);opacity:0}:host .zonos--floated-input::-moz-placeholder{-moz-transition:var(--zonos-elements-transition);transition:var(--zonos-elements-transition);opacity:0}:host .zonos--floated-input:-ms-input-placeholder{-ms-transition:var(--zonos-elements-transition);transition:var(--zonos-elements-transition);opacity:0}:host .zonos--floated-input::-ms-input-placeholder{-ms-transition:var(--zonos-elements-transition);transition:var(--zonos-elements-transition);opacity:0}:host .zonos--floated-input::placeholder{-webkit-transition:var(--zonos-elements-transition);transition:var(--zonos-elements-transition);opacity:0}:host .zonos--floated-input:focus{outline:none}:host .zonos--floated-input:focus+.zonos--floated-label::after{-webkit-box-shadow:var(--zonos-elements-glow-blue);box-shadow:var(--zonos-elements-glow-blue)}:host .zonos--floated-input.has-error+.zonos--floated-label::after{-webkit-box-shadow:var(--zonos-elements-glow-error);box-shadow:var(--zonos-elements-glow-error)}:host .zonos--floated-input.has-content::-webkit-input-placeholder,:host .zonos--floated-input:focus::-webkit-input-placeholder{opacity:var(--zonos-elements-opacity-disabled)}:host .zonos--floated-input.has-content::-moz-placeholder,:host .zonos--floated-input:focus::-moz-placeholder{opacity:var(--zonos-elements-opacity-disabled)}:host .zonos--floated-input.has-content:-ms-input-placeholder,:host .zonos--floated-input:focus:-ms-input-placeholder{opacity:var(--zonos-elements-opacity-disabled)}:host .zonos--floated-input.has-content::-ms-input-placeholder,:host .zonos--floated-input:focus::-ms-input-placeholder{opacity:var(--zonos-elements-opacity-disabled)}:host .zonos--floated-input.has-content::placeholder,:host .zonos--floated-input:focus::placeholder{opacity:var(--zonos-elements-opacity-disabled)}:host .zonos--floated-input.has-content+.zonos--floated-label::before,:host .zonos--floated-input:focus+.zonos--floated-label::before{top:11px;-webkit-transform:scale(0.8);transform:scale(0.8)}:host .zonos--floated-input:-webkit-autofill,:host .zonos--floated-input:-moz-autofill{background-color:var(--zonos-elements-input-background);color:var(--zonos-elements-text-color)}:host .zonos--floated-label{display:block;max-height:0;pointer-events:none;-ms-flex-order:1;order:1}:host .zonos--floated-label::before{content:attr(data-label);color:var(--zonos-elements-gray-800);position:absolute;font-size:var(--zonos-elements-font-size-base);line-height:var(--zonos-elements-font-size-base);display:inline-block;-webkit-filter:blur(0);filter:blur(0);-webkit-transform-origin:left top;transform-origin:left top;-webkit-transition:var(--zonos-elements-transition);transition:var(--zonos-elements-transition);margin-left:16px;top:calc(50% - var(--zonos-elements-font-size-base) / 2);z-index:1}:host .zonos--floated-label::after{content:"";position:absolute;left:0;right:0;top:0;bottom:0;border-radius:var(--zonos--border-radius)}:host{}:host .disabled .zonos--floated-label{pointer-events:inherit}:host .disabled .zonos--floated-label::after{cursor:not-allowed;z-index:1}:host(.sm){height:calc(var(--zonos-elements-size-sm) - 2px)}:host(.sm) .zonos--floated-input.has-label{padding-top:13px;padding-bottom:0}:host(.sm) .zonos--floated-input.has-label:focus+.zonos--floated-label::before,:host(.sm) .zonos--floated-input.has-label.has-content+.zonos--floated-label::before{top:2px}:host(.md){height:calc(var(--zonos-elements-size-md) - 2px)}:host(.md) .zonos--floated-input.has-label{padding-top:20px}:host(.md) .zonos--floated-input.has-label:focus+.zonos--floated-label::before,:host(.md) .zonos--floated-input.has-label.has-content+.zonos--floated-label::before{top:6px}:host(.lg){height:calc(var(--zonos-elements-size-lg) - 2px)}:host(.lg) .zonos--floated-input.has-label:focus+.zonos--floated-label::before,:host(.lg) .zonos--floated-input.has-label.has-content+.zonos--floated-label::before{top:10px}:host(.xl){height:calc(var(--zonos-elements-size-xl) - 2px)}:host(.xl) .zonos--floated-input.has-label{padding-bottom:2px}';var ZonosInputStyle0=zonosInputCss;var ZonosInput=function(){function o(o){registerInstance(this,o);this.inputChange=createEvent(this,"inputChange",7);this.inputValue="";this.inputSize="md";this.isDisabled=false;this.isError=false;this.inputPlaceholder="";this.value=this.inputValue}o.prototype.onInputValueChange=function(o){this.value=o;this.inputChange.emit(o)};o.prototype.render=function(){var o=this;return h(Host,{key:"97f28cac82f273f95b6401f6b29ec35939cd3652",class:classes(["zonos--input zonos--elements",this.inputSize,this.isError&&"has-error"]),style:{"--zonos--border-radius":getBorderRadius(),"--zonos--font-family":zonosStoreFontFamily()}},h("div",{key:"374a3b102e1dc4c422f6f69eb235f940c0271aab",class:classes(["zonos--label-wrapper",this.isDisabled&&"disabled"])},h("input",{key:"fd0810fbbf21f53dfe890c76bd7b66b2afafeac1",class:classes(["zonos--floated-input",!!this.inputLabel&&"has-label",this.inputValue&&"has-content",this.isError&&"has-error"]),disabled:this.isDisabled,onInput:function(t){var e=t.target;o.inputChange.emit(e.value)},placeholder:this.inputPlaceholder,type:"text",value:this.value}),h("label",{key:"7a1e72620a76eb4507b9b4c79f8faf73657cb789",class:"zonos--floated-label","data-label":this.inputLabel})))};Object.defineProperty(o.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(o,"watchers",{get:function(){return{inputValue:["onInputValueChange"]}},enumerable:false,configurable:true});return o}();ZonosInput.style=ZonosInputStyle0;export{ZonosInput as zonos_input};
@@ -1 +1 @@
1
- import{r as registerInstance,h,a as Host}from"./index-cfd394c8.js";import{d as cartStore}from"./cart-c490d252.js";import{t as translate}from"./localization-542dbe20.js";import{r as renderCheckoutCurrency}from"./renderCheckoutCurrency-75f1bba3.js";import{c as classes}from"./classes-0d95c529.js";import{c as invoiceStore}from"./invoice-3ea5715b.js";import{r as renderFallback}from"./renderFallback-b250f4e9.js";import"./zonosStore-f1d45eac.js";import"./VarianceTest-572cecf5.js";import"./handleFetch-a844cac1.js";import"./isDarkColor-8092a9fb.js";import"./getBorderRadius-66de1b16.js";var zonosInvoiceCartItemsCss=":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host .zonos--cart-table{width:100%;border:none;border-collapse:collapse;overflow:auto;font-size:var(--zonos-elements-font-size-base)}:host .zonos--cart-table .zonos--column{padding:8px;padding-left:0;font-size:var(--zonos-elements-font-size-base)}:host .zonos--cart-table .zonos--column:last-child{text-align:right;padding-right:0}:host .zonos--cart-table .zonos--column:first-child{padding-left:0;width:50px}:host .zonos--cart-table .zonos--cart-item-link{text-align:left}:host .zonos--cart-table .zonos--cart-item-created-at{text-align:right}:host .zonos--cart-table td{vertical-align:middle}:host .zonos--cart-item-price zonos-text{white-space:nowrap}:host(.mobile) table{margin-top:16px}:host(.mobile) table td{vertical-align:top}";var ZonosInvoiceCartItemsStyle0=zonosInvoiceCartItemsCss;var ZonosInvoiceCartItems=function(){function o(o){registerInstance(this,o);this.isMobile=false;this.errorImages=[];this.locale=null}o.prototype.componentWillLoad=function(){var o=navigator.language;this.locale=o};o.prototype.render=function(){var o=this;var t=cartStore.items.filter((function(o){return!o.isRestricted}));return h(Host,{key:"421e05194d1b310d585764ebcbad662e55fa5f76",class:classes(["zonos--invoice-cart-items zonos--elements",this.isMobile&&"mobile"])},h("table",{key:"bf2c3ddcf823d4aebf3f0c8a96b74c2d1c6978af",class:"zonos--cart-table"},h("tbody",{key:"dbe7aab9d195e7ca9a50f4c29c7acffc69dd9cce"},t.map((function(t){var e,s,n,a;var i=(s=(e=t.attributes)===null||e===void 0?void 0:e.find((function(o){return o.key==="invoiceId"||o.key==="INVOICE_ID"})))===null||s===void 0?void 0:s.value;var r=(a=(n=t.attributes)===null||n===void 0?void 0:n.find((function(o){return o.key==="invoiceCreatedAt"})))===null||a===void 0?void 0:a.value;var c=r&&o.locale?new Date(r).toLocaleDateString(o.locale,{day:"numeric",month:"long",year:"numeric"}):null;var l=i?"https://dashboard.zonos.com/billing/invoices/".concat(i):null;return h("tr",{class:"zonos--invoice-cart-item"},h("td",{class:"zonos--column zonos--cart-item-title"},h("zonos-text",{type:"semiBoldLabel"},translate("Invoice:"))),h("td",{class:"zonos--column zonos--cart-item-link"},l&&i&&h("zonos-link",{href:l},i),o.isMobile&&h("zonos-text",{type:"caption"},c)),h("td",{class:"zonos--column zonos--cart-item-created-at"},!o.isMobile&&h("zonos-text",{type:"label"},c)),h("td",{class:"zonos--column zonos--cart-item-price"},h("zonos-text",{type:"label"},renderCheckoutCurrency({amount:t.amount,isForeign:false}))))})))))};Object.defineProperty(o,"assetsDirs",{get:function(){return["assets"]},enumerable:false,configurable:true});return o}();ZonosInvoiceCartItems.style=ZonosInvoiceCartItemsStyle0;var zonosInvoiceSubtotalCss=":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;bottom:60px}:host .zonos--invoice-table{width:100%;border:none;border-collapse:collapse;overflow:auto;font-size:var(--zonos-elements-font-size-base)}:host .zonos--invoice-table .zonos--column{padding:8px 8px;vertical-align:top}:host .zonos--invoice-table .zonos--column:last-child{text-align:right;padding-right:0}:host .zonos--invoice-table .zonos--column:first-child{width:60px;max-width:100px}:host .zonos--title-with-icon{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:8px}:host .zonos--invoice-subtotal-price{text-align:right}:host .zonos--invoice-subtotal-price zonos-text{white-space:nowrap}:host .zonos--invoice-total .zonos--column{padding:16px 0}:host .zonos--invoice-total .zonos--invoice-subtotal-title,:host .zonos--invoice-total .zonos--invoice-subtotal-price{border-top:1px solid var(--zonos-elements-gray-200)}:host .zonos--invoice-subtotal-price zonos-text,:host .zonos--invoice-pay-total zonos-text{white-space:nowrap}:host(.mobile){position:relative;bottom:0}";var ZonosInvoiceSubtotalStyle0=zonosInvoiceSubtotalCss;var ZonosInvoiceSubtotal=function(){function o(o){registerInstance(this,o);this.isMobile=false}o.prototype.render=function(){return h(Host,{key:"1c1ba16d9549f0ff1478984176d6b999d5aa1753",class:classes(["zonos--invoice-subtotal zonos--elements",this.isMobile&&"mobile"])},h("table",{key:"d1b72fcae100c896cf7d6e6a289d8165d2c75233",class:"zonos--invoice-table"},h("tr",{key:"c9ff3b5ff7385c60717d213dfe1e5059f1bf09e0",class:"zonos--row zonos--invoice-total"},h("td",{key:"cf14352c2f3cffacdfb78343c7fbf512222c79d4",class:"zonos--column"}),h("td",{key:"403d772e36bc819fac28487b779e3a9ae4858f73",class:"zonos--column zonos--invoice-subtotal-title"},h("zonos-text",{key:"bf8ced53263ba7e8a6093712bb97fd7a2e35c634",type:"semiBoldLabel"},translate("Payment total"))),h("td",{key:"e3832e0ccad66787e1023a073de9b8e9b732cb4e",class:"zonos--column zonos--invoice-subtotal-price"},renderFallback({content:h("zonos-text",{type:"semiBoldLabel"},renderCheckoutCurrency({amount:invoiceStore.amountTotalDue||0,isForeign:true})),isLoading:invoiceStore.isFetchingPayorInfo,skeletonHeight:"14px",skeletonWidth:"150px"})))))};Object.defineProperty(o,"assetsDirs",{get:function(){return["assets"]},enumerable:false,configurable:true});return o}();ZonosInvoiceSubtotal.style=ZonosInvoiceSubtotalStyle0;export{ZonosInvoiceCartItems as zonos_invoice_cart_items,ZonosInvoiceSubtotal as zonos_invoice_subtotal};
1
+ import{r as registerInstance,h,a as Host}from"./index-cfd394c8.js";import{d as cartStore}from"./cart-34b11708.js";import{t as translate}from"./localization-2e523b35.js";import{r as renderCheckoutCurrency}from"./renderCheckoutCurrency-cc72a6c2.js";import{c as classes}from"./classes-0d95c529.js";import{c as invoiceStore}from"./invoice-6d8bdf21.js";import{r as renderFallback}from"./renderFallback-b250f4e9.js";import"./zonosStore-9662b071.js";import"./VarianceTest-572cecf5.js";import"./handleFetch-a844cac1.js";import"./isDarkColor-0a8453e7.js";import"./getBorderRadius-98c64be8.js";var zonosInvoiceCartItemsCss=":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host .zonos--cart-table{width:100%;border:none;border-collapse:collapse;overflow:auto;font-size:var(--zonos-elements-font-size-base)}:host .zonos--cart-table .zonos--column{padding:8px;padding-left:0;font-size:var(--zonos-elements-font-size-base)}:host .zonos--cart-table .zonos--column:last-child{text-align:right;padding-right:0}:host .zonos--cart-table .zonos--column:first-child{padding-left:0;width:50px}:host .zonos--cart-table .zonos--cart-item-link{text-align:left}:host .zonos--cart-table .zonos--cart-item-created-at{text-align:right}:host .zonos--cart-table td{vertical-align:middle}:host .zonos--cart-item-price zonos-text{white-space:nowrap}:host(.mobile) table{margin-top:16px}:host(.mobile) table td{vertical-align:top}";var ZonosInvoiceCartItemsStyle0=zonosInvoiceCartItemsCss;var ZonosInvoiceCartItems=function(){function o(o){registerInstance(this,o);this.isMobile=false;this.errorImages=[];this.locale=null}o.prototype.componentWillLoad=function(){var o=navigator.language;this.locale=o};o.prototype.render=function(){var o=this;var t=cartStore.items.filter((function(o){return!o.isRestricted}));return h(Host,{key:"421e05194d1b310d585764ebcbad662e55fa5f76",class:classes(["zonos--invoice-cart-items zonos--elements",this.isMobile&&"mobile"])},h("table",{key:"bf2c3ddcf823d4aebf3f0c8a96b74c2d1c6978af",class:"zonos--cart-table"},h("tbody",{key:"dbe7aab9d195e7ca9a50f4c29c7acffc69dd9cce"},t.map((function(t){var e,s,n,a;var i=(s=(e=t.attributes)===null||e===void 0?void 0:e.find((function(o){return o.key==="invoiceId"||o.key==="INVOICE_ID"})))===null||s===void 0?void 0:s.value;var r=(a=(n=t.attributes)===null||n===void 0?void 0:n.find((function(o){return o.key==="invoiceCreatedAt"})))===null||a===void 0?void 0:a.value;var c=r&&o.locale?new Date(r).toLocaleDateString(o.locale,{day:"numeric",month:"long",year:"numeric"}):null;var l=i?"https://dashboard.zonos.com/billing/invoices/".concat(i):null;return h("tr",{class:"zonos--invoice-cart-item"},h("td",{class:"zonos--column zonos--cart-item-title"},h("zonos-text",{type:"semiBoldLabel"},translate("Invoice:"))),h("td",{class:"zonos--column zonos--cart-item-link"},l&&i&&h("zonos-link",{href:l},i),o.isMobile&&h("zonos-text",{type:"caption"},c)),h("td",{class:"zonos--column zonos--cart-item-created-at"},!o.isMobile&&h("zonos-text",{type:"label"},c)),h("td",{class:"zonos--column zonos--cart-item-price"},h("zonos-text",{type:"label"},renderCheckoutCurrency({amount:t.amount,isForeign:false}))))})))))};Object.defineProperty(o,"assetsDirs",{get:function(){return["assets"]},enumerable:false,configurable:true});return o}();ZonosInvoiceCartItems.style=ZonosInvoiceCartItemsStyle0;var zonosInvoiceSubtotalCss=":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;bottom:60px}:host .zonos--invoice-table{width:100%;border:none;border-collapse:collapse;overflow:auto;font-size:var(--zonos-elements-font-size-base)}:host .zonos--invoice-table .zonos--column{padding:8px 8px;vertical-align:top}:host .zonos--invoice-table .zonos--column:last-child{text-align:right;padding-right:0}:host .zonos--invoice-table .zonos--column:first-child{width:60px;max-width:100px}:host .zonos--title-with-icon{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:8px}:host .zonos--invoice-subtotal-price{text-align:right}:host .zonos--invoice-subtotal-price zonos-text{white-space:nowrap}:host .zonos--invoice-total .zonos--column{padding:16px 0}:host .zonos--invoice-total .zonos--invoice-subtotal-title,:host .zonos--invoice-total .zonos--invoice-subtotal-price{border-top:1px solid var(--zonos-elements-gray-200)}:host .zonos--invoice-subtotal-price zonos-text,:host .zonos--invoice-pay-total zonos-text{white-space:nowrap}:host(.mobile){position:relative;bottom:0}";var ZonosInvoiceSubtotalStyle0=zonosInvoiceSubtotalCss;var ZonosInvoiceSubtotal=function(){function o(o){registerInstance(this,o);this.isMobile=false}o.prototype.render=function(){return h(Host,{key:"1c1ba16d9549f0ff1478984176d6b999d5aa1753",class:classes(["zonos--invoice-subtotal zonos--elements",this.isMobile&&"mobile"])},h("table",{key:"d1b72fcae100c896cf7d6e6a289d8165d2c75233",class:"zonos--invoice-table"},h("tr",{key:"c9ff3b5ff7385c60717d213dfe1e5059f1bf09e0",class:"zonos--row zonos--invoice-total"},h("td",{key:"cf14352c2f3cffacdfb78343c7fbf512222c79d4",class:"zonos--column"}),h("td",{key:"403d772e36bc819fac28487b779e3a9ae4858f73",class:"zonos--column zonos--invoice-subtotal-title"},h("zonos-text",{key:"bf8ced53263ba7e8a6093712bb97fd7a2e35c634",type:"semiBoldLabel"},translate("Payment total"))),h("td",{key:"e3832e0ccad66787e1023a073de9b8e9b732cb4e",class:"zonos--column zonos--invoice-subtotal-price"},renderFallback({content:h("zonos-text",{type:"semiBoldLabel"},renderCheckoutCurrency({amount:invoiceStore.amountTotalDue||0,isForeign:true})),isLoading:invoiceStore.isFetchingPayorInfo,skeletonHeight:"14px",skeletonWidth:"150px"})))))};Object.defineProperty(o,"assetsDirs",{get:function(){return["assets"]},enumerable:false,configurable:true});return o}();ZonosInvoiceSubtotal.style=ZonosInvoiceSubtotalStyle0;export{ZonosInvoiceCartItems as zonos_invoice_cart_items,ZonosInvoiceSubtotal as zonos_invoice_subtotal};
@@ -1 +1 @@
1
- var __awaiter=this&&this.__awaiter||function(e,o,t,n){function s(e){return e instanceof t?e:new t((function(o){o(e)}))}return new(t||(t=Promise))((function(t,i){function r(e){try{c(n.next(e))}catch(e){i(e)}}function a(e){try{c(n["throw"](e))}catch(e){i(e)}}function c(e){e.done?t(e.value):s(e.value).then(r,a)}c((n=n.apply(e,o||[])).next())}))};var __generator=this&&this.__generator||function(e,o){var t={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,s,i,r;return r={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(r[Symbol.iterator]=function(){return this}),r;function a(e){return function(o){return c([e,o])}}function c(a){if(n)throw new TypeError("Generator is already executing.");while(r&&(r=0,a[0]&&(t=0)),t)try{if(n=1,s&&(i=a[0]&2?s["return"]:a[0]?s["throw"]||((i=s["return"])&&i.call(s),0):s.next)&&!(i=i.call(s,a[1])).done)return i;if(s=0,i)a=[a[0]&2,i.value];switch(a[0]){case 0:case 1:i=a;break;case 4:t.label++;return{value:a[1],done:false};case 5:t.label++;s=a[1];a=[0];continue;case 7:a=t.ops.pop();t.trys.pop();continue;default:if(!(i=t.trys,i=i.length>0&&i[i.length-1])&&(a[0]===6||a[0]===2)){t=0;continue}if(a[0]===3&&(!i||a[1]>i[0]&&a[1]<i[3])){t.label=a[1];break}if(a[0]===6&&t.label<i[1]){t.label=i[1];i=a;break}if(i&&t.label<i[2]){t.label=i[2];t.ops.push(a);break}if(i[2])t.ops.pop();t.trys.pop();continue}a=o.call(e,t)}catch(e){a=[6,e];s=0}finally{n=i=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(e,o,t){if(t||arguments.length===2)for(var n=0,s=o.length,i;n<s;n++){if(i||!(n in o)){if(!i)i=Array.prototype.slice.call(o,0,n);i[n]=o[n]}}return e.concat(i||Array.prototype.slice.call(o))};import{r as registerInstance,d as createEvent,h,F as Fragment,a as Host,g as getElement}from"./index-cfd394c8.js";import{b as stripeStore,c as stripeStoreRetrievePayment,t as trackConversionEvent,L as stripeStoreResetPromoCode,C as stripeStoreReset,M as stripeStoreMessageBasedOnStatus,d as cartStore,r as cartStoreNextStep,D as cartStoreOnChange}from"./cart-c490d252.js";import{s as submitAnalytics,c as paypalStoreReset,a as paypalStore,b as paypalInitScript}from"./paypal-d8804da5.js";import{t as translate,s as storageStore,l as localizationStore}from"./localization-542dbe20.js";import{z as zonosStore}from"./zonosStore-f1d45eac.js";import{h as handleFetch,s as sendErrorLog,g as getIsTestMode,i as isCheckoutMobile,a as getIsStagingMode}from"./handleFetch-a844cac1.js";import{c as createCustomEvent}from"./createCustomEvent-58159025.js";import{g as getBorderRadius}from"./getBorderRadius-66de1b16.js";import{l as log,b as allLogs}from"./VarianceTest-572cecf5.js";import{i as isInvoiceMobile,a as isInvoiceTablet}from"./isInvoiceMobileTablet-1f7b614e.js";import{c as classes}from"./classes-0d95c529.js";import{l as languages}from"./ILanguage-cd6acb72.js";import{c as invoiceStore}from"./invoice-3ea5715b.js";import{r as renderCheckoutCurrency}from"./renderCheckoutCurrency-75f1bba3.js";import{p as placeTestOrder}from"./placeTestOrder-d7001709.js";import{r as renderFallback}from"./renderFallback-b250f4e9.js";import"./isDarkColor-8092a9fb.js";import"./isContrastColor-f9e65e70.js";import"./submitGtag-7f5c5bb5.js";var RemoveIcon='<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>';var SuccessIcon='<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>';var zonosInvoiceFinishCss=":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}";var ZonosInvoiceFinishStyle0=zonosInvoiceFinishCss;var MAX_RETRIES=30;var ZonosInvoiceFinish=function(){function e(e){var o=this;registerInstance(this,e);this.closeClick=createEvent(this,"closeClick",7);this.borderRadius="ROUNDED";this.confirmationId=null;this.isLoading=true;this.notificationType="success";this.notificationTitle="";this.notificationMessages=[];this.notificationActionText=translate("Keep shopping");this.order=null;this.isWaitingToRedirect=true;this.pullOrder=function(){return __awaiter(o,void 0,void 0,(function(){var e,o,t,n,s,i,r,a;return __generator(this,(function(c){switch(c.label){case 0:t=storageStore.checkoutSessionId;n=new URLSearchParams;n.set("checkoutSessionId",t||"");return[4,handleFetch("/api/zonos-elements/get-order?".concat(n.toString()))];case 1:s=c.sent(),i=s.baseUrl,r=s.errors,a=s.json;if(r.length||!(a===null||a===void 0?void 0:a.id)){return[2,{baseUrl:i,order:null}]}return[4,(o=(e=zonosStore.checkoutSettings).onOrderSuccess)===null||o===void 0?void 0:o.call(e,{zonosApiRoute:i,zonosOrder:a})];case 2:c.sent();return[2,{baseUrl:i,order:a}]}}))}))};this.handleSuccessBehavior=function(){return __awaiter(o,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:this.isLoading=false;return[4,this.getPullOrder()];case 1:e.sent();return[2]}}))}))};this.getPullOrder=function(){var e=[];for(var t=0;t<arguments.length;t++){e[t]=arguments[t]}return __awaiter(o,__spreadArray([],e,true),void 0,(function(e){var o,t,n,s,i,r,a,c;if(e===void 0){e=0}return __generator(this,(function(l){switch(l.label){case 0:if(e===0){log("=== Start to poll for order info","info")}return[4,this.pullOrder()];case 1:n=l.sent(),s=n.baseUrl,i=n.order;r=!!((t=(o=i===null||i===void 0?void 0:i.references)===null||o===void 0?void 0:o.find((function(e){return(e===null||e===void 0?void 0:e.key)==="zonosOrderNumber"})))===null||t===void 0?void 0:t.value);a=storageStore.checkoutSessionId;c=parseFloat(new URLSearchParams(window.location.search).get("maxPollingRetries")||"0")||MAX_RETRIES;log("=== Polling order (".concat(e," attemps)"),"info");if(!i)return[3,2];log("=== InvoiceOrder info found","info");if(e>10){void sendErrorLog({endpoint:"".concat(s,"/api/zonos-elements/get-order?checkoutSessionId=").concat(a,"&orderId=").concat(i.id),errors:["Invoice order found after ".concat(e," attempts")],metadata:{allLogs:allLogs,checkoutSessionId:storageStore.checkoutSessionId||"",orderId:i.id,storeId:zonosStore.storeId}})}this.order=i;return[3,6];case 2:if(!((!i||!r)&&e<c))return[3,5];return[4,new Promise((function(e){return setTimeout(e,1e3)}))];case 3:l.sent();return[4,this.getPullOrder(e+1)];case 4:l.sent();return[3,6];case 5:void sendErrorLog({endpoint:"".concat(s,"/api/zonos-elements/get-order?checkoutSessionId=").concat(a),errors:["Invoice order not found after ".concat(c," attempts")],metadata:{allLogs:allLogs,checkoutSessionId:storageStore.checkoutSessionId||"",storeId:zonosStore.storeId}});l.label=6;case 6:return[2]}}))}))};this.checkStripePaymentStatus=function(){return __awaiter(o,void 0,void 0,(function(){var e,o,t,n,s,i,r,a,c;return __generator(this,(function(l){switch(l.label){case 0:e=new URLSearchParams(window.location.search).get("payment_intent_client_secret")||stripeStore.clientSecret;if(!(e||this.storybookForceStatus))return[3,4];return[4,stripeStoreRetrievePayment({clientSecret:e,storybookForceStatus:this.storybookForceStatus})];case 1:o=l.sent(),t=o.error,n=o.messages,s=o.status;i=s==="requires_action"||t;this.notificationType=i?"error":"success";this.notificationMessages=n||[];this.notificationTitle=i?translate("Payment failed"):translate("You're all set!");log("=== Payment intent retrieve status","info",{clientSecret:e,error:t,messages:n,status:s});r=new URL(window.location.href);r.searchParams.delete("payment_intent_client_secret");r.searchParams.delete("payment_intent");r.searchParams.delete("redirect_status");r.searchParams.delete("zonosCheckoutSessionId");window.history.replaceState({},"",r.toString());if(!(t&&(n===null||n===void 0?void 0:n.length)))return[3,2];submitAnalytics({event:"zonos-checkout-payment-fail"});void sendErrorLog({endpoint:"Stripe payment failed",errors:['Payment intent "'.concat(e.split("_secret_")[0]||e,'" status: ').concat(s," - checkout session: ").concat(storageStore.checkoutSessionId)],metadata:{allLogs:allLogs,credentialToken:window.Zonos.zonosApiKey}});return[3,4];case 2:submitAnalytics({event:"zonos-checkout-success"});a=storageStore.checkoutSessionId;void trackConversionEvent({checkoutSessionId:a,eventName:"checkout_orderCompleted"});c=createCustomEvent("zonos-checkout-success",{message:"Zonos Checkout successfully processed order"});document.dispatchEvent(c);return[4,this.handleSuccessBehavior()];case 3:l.sent();l.label=4;case 4:this.isLoading=false;stripeStoreResetPromoCode();stripeStoreReset();storageStore.checkoutSessionId=null;return[2]}}))}))};this.checkStagingOrderStatus=function(){return __awaiter(o,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:this.notificationType="success";this.notificationTitle=translate("You're all set!");this.notificationMessages=stripeStoreMessageBasedOnStatus("succeeded").messages;return[4,this.handleSuccessBehavior()];case 1:e.sent();stripeStoreResetPromoCode();stripeStoreReset();paypalStoreReset();storageStore.checkoutSessionId=null;return[2]}}))}))};this.checkPaypalPaymentStatus=function(){return __awaiter(o,void 0,void 0,(function(){var e;return __generator(this,(function(o){switch(o.label){case 0:if(paypalStore.paypalErrorMessage){this.notificationType="error";this.notificationTitle=translate("Payment failed");this.notificationMessages=[paypalStore.paypalErrorMessage];this.isLoading=false;return[2]}this.isLoading=false;if(!paypalStore.orderIdCreated)return[3,2];submitAnalytics({event:"zonos-checkout-success"});e=storageStore.checkoutSessionId;void trackConversionEvent({checkoutSessionId:e,eventName:"checkout_orderCompleted"});this.notificationType="success";this.notificationTitle=translate("You're all set!");this.notificationMessages=stripeStoreMessageBasedOnStatus("succeeded").messages;return[4,this.handleSuccessBehavior()];case 1:o.sent();o.label=2;case 2:stripeStoreResetPromoCode();stripeStoreReset();paypalStoreReset();storageStore.checkoutSessionId=null;return[2]}}))}))};this.getReceiptUrl=function(e){var o=e.cartId;var t=new URL("".concat(window.location.origin,"/receipt"));t.searchParams.set("referenceId",o);var n=getIsTestMode();if(n){t.searchParams.set("zonosTestMode","1")}var s=new URLSearchParams(window.location.search).get("zonosQaUrl");if(s){t.searchParams.set("zonosQaUrl",s)}return t.toString()}}e.prototype.componentDidLoad=function(){if(this.overrideNotification){this.notificationType=this.overrideNotification.type;this.notificationTitle=this.overrideNotification.title;this.notificationMessages=this.overrideNotification.messages;this.isLoading=false;return}if(cartStore.isStagingMode){void this.checkStagingOrderStatus()}else if(paypalStore.orderIdCreated){void this.checkPaypalPaymentStatus()}else{void this.checkStripePaymentStatus()}};e.prototype.render=function(){var e=this;var o=window.Zonos.cartId;return h(Host,{key:"6c0363334a9e6602b93e83a0dfeb733285db7683",class:"zonos--checkout-finish zonos--elements",style:{"--zonos--border-radius":getBorderRadius({overrideBorderStyle:this.borderRadius})}},!this.isLoading&&h("div",{key:"299a9afc37f5e1bbe828f2b68569a686b82baff1",class:"zonos--finish-details"},h("div",{key:"24a827b96c4a74066b7701c70f6cdf980ff060f5",class:"zonos--group"},this.notificationType==="success"?h("zonos-icon",{"aria-label":"Order success",content:SuccessIcon,iconColor:"blue-800",size:50}):h("zonos-icon",{"aria-label":"Order failed",content:RemoveIcon,iconColor:"red-800",size:50}),h("zonos-text",{key:"74bfa9e0126ea8b0a693fdc2e034cdd6ef352dcb",class:"zonos--title",type:"semiBoldSubheader"},this.notificationTitle),this.confirmationId&&h("zonos-badge",{key:"5cc0089225fac166cfa13cc11e72efeb34ad8567",badgeColor:"gray"},this.confirmationId),h("zonos-text",{key:"fb101b1058adeafe38a03d2a915b6b7f80c44061",class:"zonos--subtitle",textColor:"gray-600"},this.notificationMessages.map((function(e){return h(Fragment,null,e,h("br",null))}))),this.order&&o&&h("div",{key:"2ecc8d45967ccd720f0ec4d532aa266ac42acc14",class:"zonos--button-container"},h("zonos-button",{key:"3f04711341f273a767d5109274f92eec424b1675",onClick:function(){window.open(e.getReceiptUrl({cartId:o}),"_blank")},size:"lg",variant:"primary"},translate("View receipt"))))))};Object.defineProperty(e,"assetsDirs",{get:function(){return["assets"]},enumerable:false,configurable:true});return e}();ZonosInvoiceFinish.style=ZonosInvoiceFinishStyle0;var Globe='<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';var ZonosWordmark='<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';var zonosInvoiceFooterCss=":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-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}";var ZonosInvoiceFooterStyle0=zonosInvoiceFooterCss;var ZonosInvoiceFooter=function(){function e(e){registerInstance(this,e);this.mobile=false;this.tablet=false;this.showLanguageDialog=false;this.isMobile=false;this.isTablet=false}e.prototype.handleGlobalClick=function(e){if(!this.el.contains(e.target)&&this.showLanguageDialog){this.showLanguageDialog=false}};e.prototype.toggleLanguageDialog=function(){this.showLanguageDialog=!this.showLanguageDialog};e.prototype.handleMobileChange=function(){this.isMobile=isInvoiceMobile(this.mobile)};e.prototype.handleTabletChange=function(){this.isTablet=isInvoiceTablet(this.tablet)};e.prototype.componentWillLoad=function(){this.isMobile=isInvoiceMobile(this.mobile);this.isTablet=isInvoiceTablet(this.tablet)};e.prototype.render=function(){var e=this;var o;var t=(o=languages.find((function(e){return e.code===localizationStore.selectedLocale})))===null||o===void 0?void 0:o.label;var n="gray-1000";return h(Host,{key:"a48dfe3c11d200e085864ed513cfb647c9ef3b5c",class:classes(["zonos--elements",this.isMobile&&"mobile",this.isTablet&&"tablet"])},h("div",{key:"de1f450a548eabe7bb1da9c9f2e23837a55827fc",class:"zonos--invoice-footer"},h("div",{key:"b30d47a885beaca3ec0dbdeff8e8facae994ef88",class:"zonos--invoice-locale-wrapper"},h("zonos-button",{key:"a0bece32119cbc5eddd8f99298ba7274f286cb6f",buttonColor:n,class:"zonos--invoice-footer-language-button",icon:h("zonos-icon",{"aria-label":"Language select",content:Globe,iconColor:n}),onClick:function(){return e.toggleLanguageDialog()},variant:"subtle"},t),h("div",{key:"7ceb0c79d25f640bf23ac37a22c6c37292538d8f",class:classes(["zonos--invoice-language-dialog",this.showLanguageDialog&&"zonos--invoice-language-dialog-open"])},h("zonos-language-select",{key:"5c2d4164f38caecc7f3f99b98d1d504ee292b6bd",handleOnClose:function(){return e.toggleLanguageDialog()}}))),h("div",{key:"c255dabaf4a129b1d9074af3e7512a86859c4d81",class:"zonos--invoice-footer-icon-wrapper"},h("div",{key:"bc16e675a824ad6730e823226bdb872ad04d5b2e",class:"zonos--invoice-footer-logo"},h("zonos-text",{key:"6292e7f1fce3325c7d264a946e1d8a6a4ec768c4",textColor:n},translate("Powered by")),h("a",{key:"526f598cdb342f7816d78f7d1b24923d79be72fe",href:"https://zonos.com",target:"_blank",title:"Zonos website"},h("zonos-icon",{key:"8f96ac507a2250df8234dc9d0075dcac433b9630",autoHeight:true,content:ZonosWordmark,size:42}))),h("div",{key:"d3fa74852d4bc1e679af3fe141a885f833d3aaef",class:"dot"}),h("a",{key:"30b4825365c55a31a1140ababfe3d2c88faa3b04",href:"https://zonos.com/docs/legal/zonos-privacy-policy",target:"_blank"},h("zonos-text",{key:"42cbae5d1a6350844947210493f3945ee2085cd9",textColor:n},translate("Privacy policy"))))))};Object.defineProperty(e.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{mobile:["handleMobileChange"],tablet:["handleTabletChange"]}},enumerable:false,configurable:true});return e}();ZonosInvoiceFooter.style=ZonosInvoiceFooterStyle0;var ChevronDownIcon='<svg color="var(--zonos-elements-gray-400)" fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="https://www.w3.org/2000/svg"><path clip-rule="evenodd" d="M6.293 9.293a1 1 0 0 1 1.414 0L12 13.586l4.293-4.293a1 1 0 0 1 1.414 1.414l-4.93 4.93a1.1 1.1 0 0 1-1.555 0l-4.93-4.93a1 1 0 0 1 0-1.414Z" fill="currentColor" fill-rule="evenodd"></path></svg>';var ChevronUpIcon='<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>';var zonosInvoiceOrderDetailsCss=":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}";var ZonosInvoiceOrderDetailsStyle0=zonosInvoiceOrderDetailsCss;var ZonosInvoiceOrderDetails=function(){function e(e){registerInstance(this,e);this.collapseClicked=createEvent(this,"collapseClicked",7);this.mobile=true;this.landedCostId="";this.isMobile=false;this.collapseState=this.collapsed}e.prototype.handleCollapseChangeFromProp=function(e){this.collapseState=e};e.prototype.handleCollapseChange=function(e){this.collapseClicked.emit(e)};e.prototype.handleWindowResize=function(){this.isMobile=isCheckoutMobile(this.mobile)};e.prototype.componentWillLoad=function(){this.handleWindowResize()};e.prototype.render=function(){var e=this;var o=function(){if(e.collapseState){return h("zonos-icon",{"aria-label":"Collapse expanded section",content:ChevronDownIcon,iconColor:"gray-1200"})}return h("zonos-icon",{"aria-label":"Expand collapsed section",content:ChevronUpIcon,iconColor:"gray-1200"})};return h(Host,{class:classes(["zonos--invoice-order-details zonos--elements",this.isMobile&&"mobile"])},h("div",{class:"zonos--wrapper"},h("button",{class:"zonos--order-details-header",onClick:function(){e.collapseState=!e.collapseState},type:"button"},h("div",{class:"zonos--order-details-header-text"},h("zonos-text",{type:"boldSubheader"},translate("Pay [organizationName]",{organizationName:zonosStore.organizationName})),o()),h("zonos-text",{type:"boldSubheader"},renderCheckoutCurrency({amount:invoiceStore.amountTotalDue||0,isForeign:true}))),h("div",{class:"zonos--order-details-wrapper"},h("zonos-collapse",{collapsed:this.collapseState},h("div",{class:"zonos--invoice-order-details-content"},h("zonos-invoice-cart-items",{isMobile:this.isMobile}),h("zonos-invoice-subtotal",{isMobile:this.isMobile}))))))};Object.defineProperty(e,"assetsDirs",{get:function(){return["assets"]},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{collapsed:["handleCollapseChangeFromProp"],collapseState:["handleCollapseChange"]}},enumerable:false,configurable:true});return e}();ZonosInvoiceOrderDetails.style=ZonosInvoiceOrderDetailsStyle0;var CheckmarkLineIcon='<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>';var RemoveLineIcon='<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>';var zonosInvoicePaymentCss=".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}";var ZonosInvoicePaymentStyle0=zonosInvoicePaymentCss;var ZonosInvoicePayment=function(){function e(e){var o=this;registerInstance(this,e);this.continueClicked=createEvent(this,"continueClicked",7);this.paypalSessionFailed=createEvent(this,"paypalSessionFailed",7);this.paypalSessionDone=createEvent(this,"paypalSessionDone",7);this.storeUnsubscribeList=[];this.continueLoading=false;this.showErrorBanner=false;this.hasStripePaymentError=false;this.stagingOrderCreateErrorMessage="";this.internalContinueLoading=this.continueLoading;this.handleValidate=function(){var e;return!!((e=stripeStore.stripePaymentEventData)===null||e===void 0?void 0:e.complete)};this.continueClickHandler=function(e){return __awaiter(o,[e],void 0,(function(e){var o,t;var n=this;var s=e.currencyCode;return __generator(this,(function(e){if(!this.handleValidate()){void((o=stripeStore.stripeBillingAddressElement)===null||o===void 0?void 0:o.getValue());this.showErrorBanner=true;void((t=stripeStore.stripeElements)===null||t===void 0?void 0:t.submit());setTimeout((function(){var e;(e=n.ele.querySelector("zonos-banner"))===null||e===void 0?void 0:e.scrollIntoView({behavior:"smooth"})}),10);return[2]}stripeStore.checkoutSettlementCurrency=s;submitAnalytics({event:"zonos-checkout-payment-info"});this.continueClicked.emit();return[2]}))}))};this.copyCardToClipboard=function(e){return __awaiter(o,void 0,void 0,(function(){var o,t;return __generator(this,(function(n){switch(n.label){case 0:n.trys.push([0,2,,3]);return[4,navigator.clipboard.writeText(e)];case 1:n.sent();return[3,3];case 2:o=n.sent();t=document.createElement("textarea");t.style.position="fixed";t.style.left="-1000px";t.style.top="-1000px";t.style.width="1px";t.style.height="1px";t.value=e;t.id="zonos-copy-card-number";document.body.appendChild(t);t.select();document.execCommand("copy");document.body.removeChild(t);return[3,3];case 3:window.Zonos.showNotification({message:translate("Card number copied to clipboard"),timeout:4e3,type:"success"});return[2]}}))}))};this.placeTestOrder=function(){return __awaiter(o,void 0,void 0,(function(){var e;return __generator(this,(function(o){switch(o.label){case 0:this.internalContinueLoading=true;return[4,placeTestOrder()];case 1:e=o.sent().errors;if(e.length){this.stagingOrderCreateErrorMessage=e[0]||"Failed to create staging order. Please try again.";this.internalContinueLoading=false;return[2]}this.internalContinueLoading=false;cartStoreNextStep();return[2]}}))}))}}e.prototype.continueLoadingWatcher=function(){this.internalContinueLoading=this.continueLoading};e.prototype.stripePaymentErrorWatcher=function(){var e=this;if(this.hasStripePaymentError){setTimeout((function(){var o;(o=e.ele.querySelector("zonos-banner"))===null||o===void 0?void 0:o.scrollIntoView({behavior:"smooth"})}),50)}};e.prototype.componentWillLoad=function(){this.storeUnsubscribeList=[cartStoreOnChange("currency",(function(){void paypalInitScript({currency:cartStore.currency})}))];void paypalInitScript({currency:cartStore.currency})};e.prototype.disconnectedCallback=function(){this.storeUnsubscribeList.forEach((function(e){return e()}))};e.prototype.render=function(){var e=this;var o;this.hasStripePaymentError=stripeStore.hasPaymentError;if(!stripeStore.stripeElements){return null}if(!stripeStore.clientSecret){return null}if(this.showErrorBanner){this.showErrorBanner=!this.handleValidate()}var t=getIsTestMode();var n=cartStore.isStagingMode||getIsStagingMode();var s=((o=stripeStore.stripePaymentEventData)===null||o===void 0?void 0:o.value.type)==="external_paypal";var i=function(){if(n){var o=zonosStore.appearance.theme;return h(Fragment,null,e.stagingOrderCreateErrorMessage&&h("zonos-banner",{class:"zonos--error-banner",intent:"error"},e.stagingOrderCreateErrorMessage),h("zonos-empty-state-payment",{emptyStateText:translate("No payment method needed for staging"),theme:o}),h("div",{class:"zonos--group-btn"},h("zonos-button",{backgroundColor:e.submitBtnColor,loading:e.internalContinueLoading,onClick:function(){void e.placeTestOrder()},size:"lg",variant:e.submitBtnType},translate("Place test order"))))}if(stripeStore.isFetchingSession||invoiceStore.isFetchingPayorInfo){return null}return h(Fragment,null,e.showErrorBanner&&h("zonos-banner",{class:"zonos--error-banner",intent:"error"},translate("Missing required fields. Make sure all fields are completed.")),e.hasStripePaymentError&&h("zonos-banner",{class:"zonos--payment-error-banner",intent:"error"},stripeStore.customErrorMessage||translate("We couldn't complete your payment. Please verify the payment details and try again.")),paypalStore.paypalErrorMessage&&h("zonos-banner",{class:"zonos--payment-error-banner",intent:"error"},paypalStore.paypalErrorMessage),h("zonos-payment",null),h("div",{class:"zonos--group-btn"},!s&&h(Fragment,null,h("zonos-button",{backgroundColor:e.submitBtnColor,bold:true,isDisabled:e.continueLoading&&stripeStore.checkoutSettlementCurrency==="USD",loading:e.continueLoading&&stripeStore.checkoutSettlementCurrency!=="USD",onClick:function(){return __awaiter(e,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:if(!cartStore.checkoutSession){log("Checkout session is not found");return[2]}return[4,this.continueClickHandler({currencyCode:cartStore.checkoutSession.subtotals.presentmentCurrencyCode})];case 1:e.sent();return[2]}}))}))},size:"lg",variant:e.submitBtnType},translate("Pay [orderTotal]",{orderTotal:renderCheckoutCurrency({amount:invoiceStore.amountTotalDue||0,isForeign:true})})),stripeStore.shouldRenderPayInUsdButton&&h("zonos-button",{class:"zonos--pay-in-base-currency-btn",isDisabled:e.continueLoading&&stripeStore.checkoutSettlementCurrency!=="USD",loading:e.continueLoading&&stripeStore.checkoutSettlementCurrency==="USD",onClick:function(){return __awaiter(e,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:return[4,this.continueClickHandler({currencyCode:"USD"})];case 1:e.sent();return[2]}}))}))},size:"lg",variant:"subtle"},translate("Click to pay in USD"))),h("zonos-paypal-payment",{onPaypalSessionDone:function(o){var t=o.detail.orderId;e.paypalSessionDone.emit(t)},onPaypalSessionFail:function(){return e.paypalSessionFailed.emit()},style:{display:s?"block":"none"}})),t&&h("zonos-card",{backgroundColor:"gray-100",borderRadius:12,class:"zonos--test-cards"},h("zonos-v-stack",{spacing:16},h("div",null,h("zonos-text",{type:"semiBoldLabel"},translate("Test cards")),h("zonos-text",{textColor:"gray-700"},translate("Click to copy the card number. Use any future expiration date and three number CVC."))),h("zonos-button",{icon:h("zonos-icon",{content:CheckmarkLineIcon}),justifyContent:"flex-start",onClick:function(){return e.copyCardToClipboard("4242424242424242")}},translate("Success")," (****4242)"),h("zonos-button",{icon:h("zonos-icon",{content:RemoveLineIcon}),justifyContent:"flex-start",onClick:function(){return e.copyCardToClipboard("4000000000000002")}},translate("Failure")," (****0002)")),h("zonos-notification",null)))};return h(Host,{class:"zonos--checkout-payment zonos--elements"},h("div",{class:"zonos--group"},h("zonos-text",{class:"zonos--title",type:"semiBoldSubheader"},translate("Payment method")),i()))};Object.defineProperty(e.prototype,"ele",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{continueLoading:["continueLoadingWatcher"],hasStripePaymentError:["stripePaymentErrorWatcher"]}},enumerable:false,configurable:true});return e}();ZonosInvoicePayment.style=ZonosInvoicePaymentStyle0;var zonosInvoiceReviewCss=':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}';var ZonosInvoiceReviewStyle0=zonosInvoiceReviewCss;var ZonosInvoiceReview=function(){function e(e){registerInstance(this,e);this.mobile=false;this.tablet=false;this.collapsed=false;this.isMobile=false;this.isTablet=false;this.isLoading=true}e.prototype.handleWindowResize=function(){this.isMobile=isInvoiceMobile(this.mobile);this.isTablet=isInvoiceTablet(this.tablet)};e.prototype.componentWillLoad=function(){var e=this;this.handleWindowResize();setTimeout((function(){e.isLoading=false}),1e3)};e.prototype.render=function(){var e=this.isMobile?"gray-1000":"gray-800";return h(Host,{key:"dba979c1f8bb9f4ac5207eb2bc97296523c62fc1",class:classes(["zonos--invoice-review zonos--elements",this.isMobile&&"mobile",this.isTablet&&"tablet"])},h("div",{key:"d9bbd435775f58d3934b9cc5d8658acf781d5090",class:"zonos--title"},h("zonos-text",{key:"103859ee74d37fadd854d59cc852d71b8e23fe11",textColor:e,type:"semiBoldLabel"},translate("Pay [organizationName]",{organizationName:zonosStore.organizationName}))),h("div",{key:"fcc9ade2fc63e53307659134a1763909ad66cc30",class:"zonos--total-pay"},renderFallback({content:h("zonos-text",{type:"secondaryPageHeader"},renderCheckoutCurrency({amount:invoiceStore.amountTotalDue||0,isForeign:true})),isLoading:invoiceStore.isFetchingPayorInfo,skeletonHeight:"36px",skeletonWidth:"150px"})))};Object.defineProperty(e,"assetsDirs",{get:function(){return["assets"]},enumerable:false,configurable:true});return e}();ZonosInvoiceReview.style=ZonosInvoiceReviewStyle0;export{ZonosInvoiceFinish as zonos_invoice_finish,ZonosInvoiceFooter as zonos_invoice_footer,ZonosInvoiceOrderDetails as zonos_invoice_order_details,ZonosInvoicePayment as zonos_invoice_payment,ZonosInvoiceReview as zonos_invoice_review};
1
+ var __awaiter=this&&this.__awaiter||function(e,o,t,n){function s(e){return e instanceof t?e:new t((function(o){o(e)}))}return new(t||(t=Promise))((function(t,i){function r(e){try{c(n.next(e))}catch(e){i(e)}}function a(e){try{c(n["throw"](e))}catch(e){i(e)}}function c(e){e.done?t(e.value):s(e.value).then(r,a)}c((n=n.apply(e,o||[])).next())}))};var __generator=this&&this.__generator||function(e,o){var t={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,s,i,r;return r={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(r[Symbol.iterator]=function(){return this}),r;function a(e){return function(o){return c([e,o])}}function c(a){if(n)throw new TypeError("Generator is already executing.");while(r&&(r=0,a[0]&&(t=0)),t)try{if(n=1,s&&(i=a[0]&2?s["return"]:a[0]?s["throw"]||((i=s["return"])&&i.call(s),0):s.next)&&!(i=i.call(s,a[1])).done)return i;if(s=0,i)a=[a[0]&2,i.value];switch(a[0]){case 0:case 1:i=a;break;case 4:t.label++;return{value:a[1],done:false};case 5:t.label++;s=a[1];a=[0];continue;case 7:a=t.ops.pop();t.trys.pop();continue;default:if(!(i=t.trys,i=i.length>0&&i[i.length-1])&&(a[0]===6||a[0]===2)){t=0;continue}if(a[0]===3&&(!i||a[1]>i[0]&&a[1]<i[3])){t.label=a[1];break}if(a[0]===6&&t.label<i[1]){t.label=i[1];i=a;break}if(i&&t.label<i[2]){t.label=i[2];t.ops.push(a);break}if(i[2])t.ops.pop();t.trys.pop();continue}a=o.call(e,t)}catch(e){a=[6,e];s=0}finally{n=i=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(e,o,t){if(t||arguments.length===2)for(var n=0,s=o.length,i;n<s;n++){if(i||!(n in o)){if(!i)i=Array.prototype.slice.call(o,0,n);i[n]=o[n]}}return e.concat(i||Array.prototype.slice.call(o))};import{r as registerInstance,d as createEvent,h,F as Fragment,a as Host,g as getElement}from"./index-cfd394c8.js";import{b as stripeStore,c as stripeStoreRetrievePayment,t as trackConversionEvent,L as stripeStoreResetPromoCode,C as stripeStoreReset,M as stripeStoreMessageBasedOnStatus,d as cartStore,r as cartStoreNextStep,D as cartStoreOnChange}from"./cart-34b11708.js";import{s as submitAnalytics,c as paypalStoreReset,a as paypalStore,b as paypalInitScript}from"./paypal-d3b3d967.js";import{t as translate,s as storageStore,l as localizationStore}from"./localization-2e523b35.js";import{z as zonosStore}from"./zonosStore-9662b071.js";import{h as handleFetch,s as sendErrorLog,g as getIsTestMode,i as isCheckoutMobile,a as getIsStagingMode}from"./handleFetch-a844cac1.js";import{c as createCustomEvent}from"./createCustomEvent-58159025.js";import{g as getBorderRadius}from"./getBorderRadius-98c64be8.js";import{l as log,b as allLogs}from"./VarianceTest-572cecf5.js";import{i as isInvoiceMobile,a as isInvoiceTablet}from"./isInvoiceMobileTablet-1f7b614e.js";import{c as classes}from"./classes-0d95c529.js";import{l as languages}from"./ILanguage-cd6acb72.js";import{c as invoiceStore}from"./invoice-6d8bdf21.js";import{r as renderCheckoutCurrency}from"./renderCheckoutCurrency-cc72a6c2.js";import{p as placeTestOrder}from"./placeTestOrder-e1d6dfcd.js";import{r as renderFallback}from"./renderFallback-b250f4e9.js";import"./isDarkColor-0a8453e7.js";import"./isContrastColor-6bad285e.js";import"./submitGtag-ae9d5d91.js";var RemoveIcon='<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>';var SuccessIcon='<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>';var zonosInvoiceFinishCss=":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}";var ZonosInvoiceFinishStyle0=zonosInvoiceFinishCss;var MAX_RETRIES=30;var ZonosInvoiceFinish=function(){function e(e){var o=this;registerInstance(this,e);this.closeClick=createEvent(this,"closeClick",7);this.borderRadius="ROUNDED";this.confirmationId=null;this.isLoading=true;this.notificationType="success";this.notificationTitle="";this.notificationMessages=[];this.notificationActionText=translate("Keep shopping");this.order=null;this.isWaitingToRedirect=true;this.pullOrder=function(){return __awaiter(o,void 0,void 0,(function(){var e,o,t,n,s,i,r,a;return __generator(this,(function(c){switch(c.label){case 0:t=storageStore.checkoutSessionId;n=new URLSearchParams;n.set("checkoutSessionId",t||"");return[4,handleFetch("/api/zonos-elements/get-order?".concat(n.toString()))];case 1:s=c.sent(),i=s.baseUrl,r=s.errors,a=s.json;if(r.length||!(a===null||a===void 0?void 0:a.id)){return[2,{baseUrl:i,order:null}]}return[4,(o=(e=zonosStore.checkoutSettings).onOrderSuccess)===null||o===void 0?void 0:o.call(e,{zonosApiRoute:i,zonosOrder:a})];case 2:c.sent();return[2,{baseUrl:i,order:a}]}}))}))};this.handleSuccessBehavior=function(){return __awaiter(o,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:this.isLoading=false;return[4,this.getPullOrder()];case 1:e.sent();return[2]}}))}))};this.getPullOrder=function(){var e=[];for(var t=0;t<arguments.length;t++){e[t]=arguments[t]}return __awaiter(o,__spreadArray([],e,true),void 0,(function(e){var o,t,n,s,i,r,a,c;if(e===void 0){e=0}return __generator(this,(function(l){switch(l.label){case 0:if(e===0){log("=== Start to poll for order info","info")}return[4,this.pullOrder()];case 1:n=l.sent(),s=n.baseUrl,i=n.order;r=!!((t=(o=i===null||i===void 0?void 0:i.references)===null||o===void 0?void 0:o.find((function(e){return(e===null||e===void 0?void 0:e.key)==="zonosOrderNumber"})))===null||t===void 0?void 0:t.value);a=storageStore.checkoutSessionId;c=parseFloat(new URLSearchParams(window.location.search).get("maxPollingRetries")||"0")||MAX_RETRIES;log("=== Polling order (".concat(e," attemps)"),"info");if(!i)return[3,2];log("=== InvoiceOrder info found","info");if(e>10){void sendErrorLog({endpoint:"".concat(s,"/api/zonos-elements/get-order?checkoutSessionId=").concat(a,"&orderId=").concat(i.id),errors:["Invoice order found after ".concat(e," attempts")],metadata:{allLogs:allLogs,checkoutSessionId:storageStore.checkoutSessionId||"",orderId:i.id,storeId:zonosStore.storeId}})}this.order=i;return[3,6];case 2:if(!((!i||!r)&&e<c))return[3,5];return[4,new Promise((function(e){return setTimeout(e,1e3)}))];case 3:l.sent();return[4,this.getPullOrder(e+1)];case 4:l.sent();return[3,6];case 5:void sendErrorLog({endpoint:"".concat(s,"/api/zonos-elements/get-order?checkoutSessionId=").concat(a),errors:["Invoice order not found after ".concat(c," attempts")],metadata:{allLogs:allLogs,checkoutSessionId:storageStore.checkoutSessionId||"",storeId:zonosStore.storeId}});l.label=6;case 6:return[2]}}))}))};this.checkStripePaymentStatus=function(){return __awaiter(o,void 0,void 0,(function(){var e,o,t,n,s,i,r,a,c;return __generator(this,(function(l){switch(l.label){case 0:e=new URLSearchParams(window.location.search).get("payment_intent_client_secret")||stripeStore.clientSecret;if(!(e||this.storybookForceStatus))return[3,4];return[4,stripeStoreRetrievePayment({clientSecret:e,storybookForceStatus:this.storybookForceStatus})];case 1:o=l.sent(),t=o.error,n=o.messages,s=o.status;i=s==="requires_action"||t;this.notificationType=i?"error":"success";this.notificationMessages=n||[];this.notificationTitle=i?translate("Payment failed"):translate("You're all set!");log("=== Payment intent retrieve status","info",{clientSecret:e,error:t,messages:n,status:s});r=new URL(window.location.href);r.searchParams.delete("payment_intent_client_secret");r.searchParams.delete("payment_intent");r.searchParams.delete("redirect_status");r.searchParams.delete("zonosCheckoutSessionId");window.history.replaceState({},"",r.toString());if(!(t&&(n===null||n===void 0?void 0:n.length)))return[3,2];submitAnalytics({event:"zonos-checkout-payment-fail"});void sendErrorLog({endpoint:"Stripe payment failed",errors:['Payment intent "'.concat(e.split("_secret_")[0]||e,'" status: ').concat(s," - checkout session: ").concat(storageStore.checkoutSessionId)],metadata:{allLogs:allLogs,credentialToken:window.Zonos.zonosApiKey}});return[3,4];case 2:submitAnalytics({event:"zonos-checkout-success"});a=storageStore.checkoutSessionId;void trackConversionEvent({checkoutSessionId:a,eventName:"checkout_orderCompleted"});c=createCustomEvent("zonos-checkout-success",{message:"Zonos Checkout successfully processed order"});document.dispatchEvent(c);return[4,this.handleSuccessBehavior()];case 3:l.sent();l.label=4;case 4:this.isLoading=false;stripeStoreResetPromoCode();stripeStoreReset();storageStore.checkoutSessionId=null;return[2]}}))}))};this.checkStagingOrderStatus=function(){return __awaiter(o,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:this.notificationType="success";this.notificationTitle=translate("You're all set!");this.notificationMessages=stripeStoreMessageBasedOnStatus("succeeded").messages;return[4,this.handleSuccessBehavior()];case 1:e.sent();stripeStoreResetPromoCode();stripeStoreReset();paypalStoreReset();storageStore.checkoutSessionId=null;return[2]}}))}))};this.checkPaypalPaymentStatus=function(){return __awaiter(o,void 0,void 0,(function(){var e;return __generator(this,(function(o){switch(o.label){case 0:if(paypalStore.paypalErrorMessage){this.notificationType="error";this.notificationTitle=translate("Payment failed");this.notificationMessages=[paypalStore.paypalErrorMessage];this.isLoading=false;return[2]}this.isLoading=false;if(!paypalStore.orderIdCreated)return[3,2];submitAnalytics({event:"zonos-checkout-success"});e=storageStore.checkoutSessionId;void trackConversionEvent({checkoutSessionId:e,eventName:"checkout_orderCompleted"});this.notificationType="success";this.notificationTitle=translate("You're all set!");this.notificationMessages=stripeStoreMessageBasedOnStatus("succeeded").messages;return[4,this.handleSuccessBehavior()];case 1:o.sent();o.label=2;case 2:stripeStoreResetPromoCode();stripeStoreReset();paypalStoreReset();storageStore.checkoutSessionId=null;return[2]}}))}))};this.getReceiptUrl=function(e){var o=e.cartId;var t=new URL("".concat(window.location.origin,"/receipt"));t.searchParams.set("referenceId",o);var n=getIsTestMode();if(n){t.searchParams.set("zonosTestMode","1")}var s=new URLSearchParams(window.location.search).get("zonosQaUrl");if(s){t.searchParams.set("zonosQaUrl",s)}return t.toString()}}e.prototype.componentDidLoad=function(){if(this.overrideNotification){this.notificationType=this.overrideNotification.type;this.notificationTitle=this.overrideNotification.title;this.notificationMessages=this.overrideNotification.messages;this.isLoading=false;return}if(cartStore.isStagingMode){void this.checkStagingOrderStatus()}else if(paypalStore.orderIdCreated){void this.checkPaypalPaymentStatus()}else{void this.checkStripePaymentStatus()}};e.prototype.render=function(){var e=this;var o=window.Zonos.cartId;return h(Host,{key:"6c0363334a9e6602b93e83a0dfeb733285db7683",class:"zonos--checkout-finish zonos--elements",style:{"--zonos--border-radius":getBorderRadius({overrideBorderStyle:this.borderRadius})}},!this.isLoading&&h("div",{key:"299a9afc37f5e1bbe828f2b68569a686b82baff1",class:"zonos--finish-details"},h("div",{key:"24a827b96c4a74066b7701c70f6cdf980ff060f5",class:"zonos--group"},this.notificationType==="success"?h("zonos-icon",{"aria-label":"Order success",content:SuccessIcon,iconColor:"blue-800",size:50}):h("zonos-icon",{"aria-label":"Order failed",content:RemoveIcon,iconColor:"red-800",size:50}),h("zonos-text",{key:"74bfa9e0126ea8b0a693fdc2e034cdd6ef352dcb",class:"zonos--title",type:"semiBoldSubheader"},this.notificationTitle),this.confirmationId&&h("zonos-badge",{key:"5cc0089225fac166cfa13cc11e72efeb34ad8567",badgeColor:"gray"},this.confirmationId),h("zonos-text",{key:"fb101b1058adeafe38a03d2a915b6b7f80c44061",class:"zonos--subtitle",textColor:"gray-600"},this.notificationMessages.map((function(e){return h(Fragment,null,e,h("br",null))}))),this.order&&o&&h("div",{key:"2ecc8d45967ccd720f0ec4d532aa266ac42acc14",class:"zonos--button-container"},h("zonos-button",{key:"3f04711341f273a767d5109274f92eec424b1675",onClick:function(){window.open(e.getReceiptUrl({cartId:o}),"_blank")},size:"lg",variant:"primary"},translate("View receipt"))))))};Object.defineProperty(e,"assetsDirs",{get:function(){return["assets"]},enumerable:false,configurable:true});return e}();ZonosInvoiceFinish.style=ZonosInvoiceFinishStyle0;var Globe='<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';var ZonosWordmark='<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';var zonosInvoiceFooterCss=":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-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}";var ZonosInvoiceFooterStyle0=zonosInvoiceFooterCss;var ZonosInvoiceFooter=function(){function e(e){registerInstance(this,e);this.mobile=false;this.tablet=false;this.showLanguageDialog=false;this.isMobile=false;this.isTablet=false}e.prototype.handleGlobalClick=function(e){if(!this.el.contains(e.target)&&this.showLanguageDialog){this.showLanguageDialog=false}};e.prototype.toggleLanguageDialog=function(){this.showLanguageDialog=!this.showLanguageDialog};e.prototype.handleMobileChange=function(){this.isMobile=isInvoiceMobile(this.mobile)};e.prototype.handleTabletChange=function(){this.isTablet=isInvoiceTablet(this.tablet)};e.prototype.componentWillLoad=function(){this.isMobile=isInvoiceMobile(this.mobile);this.isTablet=isInvoiceTablet(this.tablet)};e.prototype.render=function(){var e=this;var o;var t=(o=languages.find((function(e){return e.code===localizationStore.selectedLocale})))===null||o===void 0?void 0:o.label;var n="gray-1000";return h(Host,{key:"a48dfe3c11d200e085864ed513cfb647c9ef3b5c",class:classes(["zonos--elements",this.isMobile&&"mobile",this.isTablet&&"tablet"])},h("div",{key:"de1f450a548eabe7bb1da9c9f2e23837a55827fc",class:"zonos--invoice-footer"},h("div",{key:"b30d47a885beaca3ec0dbdeff8e8facae994ef88",class:"zonos--invoice-locale-wrapper"},h("zonos-button",{key:"a0bece32119cbc5eddd8f99298ba7274f286cb6f",buttonColor:n,class:"zonos--invoice-footer-language-button",icon:h("zonos-icon",{"aria-label":"Language select",content:Globe,iconColor:n}),onClick:function(){return e.toggleLanguageDialog()},variant:"subtle"},t),h("div",{key:"7ceb0c79d25f640bf23ac37a22c6c37292538d8f",class:classes(["zonos--invoice-language-dialog",this.showLanguageDialog&&"zonos--invoice-language-dialog-open"])},h("zonos-language-select",{key:"5c2d4164f38caecc7f3f99b98d1d504ee292b6bd",handleOnClose:function(){return e.toggleLanguageDialog()}}))),h("div",{key:"c255dabaf4a129b1d9074af3e7512a86859c4d81",class:"zonos--invoice-footer-icon-wrapper"},h("div",{key:"bc16e675a824ad6730e823226bdb872ad04d5b2e",class:"zonos--invoice-footer-logo"},h("zonos-text",{key:"6292e7f1fce3325c7d264a946e1d8a6a4ec768c4",textColor:n},translate("Powered by")),h("a",{key:"526f598cdb342f7816d78f7d1b24923d79be72fe",href:"https://zonos.com",target:"_blank",title:"Zonos website"},h("zonos-icon",{key:"8f96ac507a2250df8234dc9d0075dcac433b9630",autoHeight:true,content:ZonosWordmark,size:42}))),h("div",{key:"d3fa74852d4bc1e679af3fe141a885f833d3aaef",class:"dot"}),h("a",{key:"30b4825365c55a31a1140ababfe3d2c88faa3b04",href:"https://zonos.com/docs/legal/zonos-privacy-policy",target:"_blank"},h("zonos-text",{key:"42cbae5d1a6350844947210493f3945ee2085cd9",textColor:n},translate("Privacy policy"))))))};Object.defineProperty(e.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{mobile:["handleMobileChange"],tablet:["handleTabletChange"]}},enumerable:false,configurable:true});return e}();ZonosInvoiceFooter.style=ZonosInvoiceFooterStyle0;var ChevronDownIcon='<svg color="var(--zonos-elements-gray-400)" fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="https://www.w3.org/2000/svg"><path clip-rule="evenodd" d="M6.293 9.293a1 1 0 0 1 1.414 0L12 13.586l4.293-4.293a1 1 0 0 1 1.414 1.414l-4.93 4.93a1.1 1.1 0 0 1-1.555 0l-4.93-4.93a1 1 0 0 1 0-1.414Z" fill="currentColor" fill-rule="evenodd"></path></svg>';var ChevronUpIcon='<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>';var zonosInvoiceOrderDetailsCss=":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}";var ZonosInvoiceOrderDetailsStyle0=zonosInvoiceOrderDetailsCss;var ZonosInvoiceOrderDetails=function(){function e(e){registerInstance(this,e);this.collapseClicked=createEvent(this,"collapseClicked",7);this.mobile=true;this.landedCostId="";this.isMobile=false;this.collapseState=this.collapsed}e.prototype.handleCollapseChangeFromProp=function(e){this.collapseState=e};e.prototype.handleCollapseChange=function(e){this.collapseClicked.emit(e)};e.prototype.handleWindowResize=function(){this.isMobile=isCheckoutMobile(this.mobile)};e.prototype.componentWillLoad=function(){this.handleWindowResize()};e.prototype.render=function(){var e=this;var o=function(){if(e.collapseState){return h("zonos-icon",{"aria-label":"Collapse expanded section",content:ChevronDownIcon,iconColor:"gray-1200"})}return h("zonos-icon",{"aria-label":"Expand collapsed section",content:ChevronUpIcon,iconColor:"gray-1200"})};return h(Host,{class:classes(["zonos--invoice-order-details zonos--elements",this.isMobile&&"mobile"])},h("div",{class:"zonos--wrapper"},h("button",{class:"zonos--order-details-header",onClick:function(){e.collapseState=!e.collapseState},type:"button"},h("div",{class:"zonos--order-details-header-text"},h("zonos-text",{type:"boldSubheader"},translate("Pay [organizationName]",{organizationName:zonosStore.organizationName})),o()),h("zonos-text",{type:"boldSubheader"},renderCheckoutCurrency({amount:invoiceStore.amountTotalDue||0,isForeign:true}))),h("div",{class:"zonos--order-details-wrapper"},h("zonos-collapse",{collapsed:this.collapseState},h("div",{class:"zonos--invoice-order-details-content"},h("zonos-invoice-cart-items",{isMobile:this.isMobile}),h("zonos-invoice-subtotal",{isMobile:this.isMobile}))))))};Object.defineProperty(e,"assetsDirs",{get:function(){return["assets"]},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{collapsed:["handleCollapseChangeFromProp"],collapseState:["handleCollapseChange"]}},enumerable:false,configurable:true});return e}();ZonosInvoiceOrderDetails.style=ZonosInvoiceOrderDetailsStyle0;var CheckmarkLineIcon='<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>';var RemoveLineIcon='<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>';var zonosInvoicePaymentCss=".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}";var ZonosInvoicePaymentStyle0=zonosInvoicePaymentCss;var ZonosInvoicePayment=function(){function e(e){var o=this;registerInstance(this,e);this.continueClicked=createEvent(this,"continueClicked",7);this.paypalSessionFailed=createEvent(this,"paypalSessionFailed",7);this.paypalSessionDone=createEvent(this,"paypalSessionDone",7);this.storeUnsubscribeList=[];this.continueLoading=false;this.showErrorBanner=false;this.hasStripePaymentError=false;this.stagingOrderCreateErrorMessage="";this.internalContinueLoading=this.continueLoading;this.handleValidate=function(){var e;return!!((e=stripeStore.stripePaymentEventData)===null||e===void 0?void 0:e.complete)};this.continueClickHandler=function(e){return __awaiter(o,[e],void 0,(function(e){var o,t;var n=this;var s=e.currencyCode;return __generator(this,(function(e){if(!this.handleValidate()){void((o=stripeStore.stripeBillingAddressElement)===null||o===void 0?void 0:o.getValue());this.showErrorBanner=true;void((t=stripeStore.stripeElements)===null||t===void 0?void 0:t.submit());setTimeout((function(){var e;(e=n.ele.querySelector("zonos-banner"))===null||e===void 0?void 0:e.scrollIntoView({behavior:"smooth"})}),10);return[2]}stripeStore.checkoutSettlementCurrency=s;submitAnalytics({event:"zonos-checkout-payment-info"});this.continueClicked.emit();return[2]}))}))};this.copyCardToClipboard=function(e){return __awaiter(o,void 0,void 0,(function(){var o,t;return __generator(this,(function(n){switch(n.label){case 0:n.trys.push([0,2,,3]);return[4,navigator.clipboard.writeText(e)];case 1:n.sent();return[3,3];case 2:o=n.sent();t=document.createElement("textarea");t.style.position="fixed";t.style.left="-1000px";t.style.top="-1000px";t.style.width="1px";t.style.height="1px";t.value=e;t.id="zonos-copy-card-number";document.body.appendChild(t);t.select();document.execCommand("copy");document.body.removeChild(t);return[3,3];case 3:window.Zonos.showNotification({message:translate("Card number copied to clipboard"),timeout:4e3,type:"success"});return[2]}}))}))};this.placeTestOrder=function(){return __awaiter(o,void 0,void 0,(function(){var e;return __generator(this,(function(o){switch(o.label){case 0:this.internalContinueLoading=true;return[4,placeTestOrder()];case 1:e=o.sent().errors;if(e.length){this.stagingOrderCreateErrorMessage=e[0]||"Failed to create staging order. Please try again.";this.internalContinueLoading=false;return[2]}this.internalContinueLoading=false;cartStoreNextStep();return[2]}}))}))}}e.prototype.continueLoadingWatcher=function(){this.internalContinueLoading=this.continueLoading};e.prototype.stripePaymentErrorWatcher=function(){var e=this;if(this.hasStripePaymentError){setTimeout((function(){var o;(o=e.ele.querySelector("zonos-banner"))===null||o===void 0?void 0:o.scrollIntoView({behavior:"smooth"})}),50)}};e.prototype.componentWillLoad=function(){this.storeUnsubscribeList=[cartStoreOnChange("currency",(function(){void paypalInitScript({currency:cartStore.currency})}))];void paypalInitScript({currency:cartStore.currency})};e.prototype.disconnectedCallback=function(){this.storeUnsubscribeList.forEach((function(e){return e()}))};e.prototype.render=function(){var e=this;var o;this.hasStripePaymentError=stripeStore.hasPaymentError;if(!stripeStore.stripeElements){return null}if(!stripeStore.clientSecret){return null}if(this.showErrorBanner){this.showErrorBanner=!this.handleValidate()}var t=getIsTestMode();var n=cartStore.isStagingMode||getIsStagingMode();var s=((o=stripeStore.stripePaymentEventData)===null||o===void 0?void 0:o.value.type)==="external_paypal";var i=function(){if(n){var o=zonosStore.appearance.theme;return h(Fragment,null,e.stagingOrderCreateErrorMessage&&h("zonos-banner",{class:"zonos--error-banner",intent:"error"},e.stagingOrderCreateErrorMessage),h("zonos-empty-state-payment",{emptyStateText:translate("No payment method needed for staging"),theme:o}),h("div",{class:"zonos--group-btn"},h("zonos-button",{backgroundColor:e.submitBtnColor,loading:e.internalContinueLoading,onClick:function(){void e.placeTestOrder()},size:"lg",variant:e.submitBtnType},translate("Place test order"))))}if(stripeStore.isFetchingSession||invoiceStore.isFetchingPayorInfo){return null}return h(Fragment,null,e.showErrorBanner&&h("zonos-banner",{class:"zonos--error-banner",intent:"error"},translate("Missing required fields. Make sure all fields are completed.")),e.hasStripePaymentError&&h("zonos-banner",{class:"zonos--payment-error-banner",intent:"error"},stripeStore.customErrorMessage||translate("We couldn't complete your payment. Please verify the payment details and try again.")),paypalStore.paypalErrorMessage&&h("zonos-banner",{class:"zonos--payment-error-banner",intent:"error"},paypalStore.paypalErrorMessage),h("zonos-payment",null),h("div",{class:"zonos--group-btn"},!s&&h(Fragment,null,h("zonos-button",{backgroundColor:e.submitBtnColor,bold:true,isDisabled:e.continueLoading&&stripeStore.checkoutSettlementCurrency==="USD",loading:e.continueLoading&&stripeStore.checkoutSettlementCurrency!=="USD",onClick:function(){return __awaiter(e,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:if(!cartStore.checkoutSession){log("Checkout session is not found");return[2]}return[4,this.continueClickHandler({currencyCode:cartStore.checkoutSession.subtotals.presentmentCurrencyCode})];case 1:e.sent();return[2]}}))}))},size:"lg",variant:e.submitBtnType},translate("Pay [orderTotal]",{orderTotal:renderCheckoutCurrency({amount:invoiceStore.amountTotalDue||0,isForeign:true})})),stripeStore.shouldRenderPayInUsdButton&&h("zonos-button",{class:"zonos--pay-in-base-currency-btn",isDisabled:e.continueLoading&&stripeStore.checkoutSettlementCurrency!=="USD",loading:e.continueLoading&&stripeStore.checkoutSettlementCurrency==="USD",onClick:function(){return __awaiter(e,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:return[4,this.continueClickHandler({currencyCode:"USD"})];case 1:e.sent();return[2]}}))}))},size:"lg",variant:"subtle"},translate("Click to pay in USD"))),h("zonos-paypal-payment",{onPaypalSessionDone:function(o){var t=o.detail.orderId;e.paypalSessionDone.emit(t)},onPaypalSessionFail:function(){return e.paypalSessionFailed.emit()},style:{display:s?"block":"none"}})),t&&h("zonos-card",{backgroundColor:"gray-100",borderRadius:12,class:"zonos--test-cards"},h("zonos-v-stack",{spacing:16},h("div",null,h("zonos-text",{type:"semiBoldLabel"},translate("Test cards")),h("zonos-text",{textColor:"gray-700"},translate("Click to copy the card number. Use any future expiration date and three number CVC."))),h("zonos-button",{icon:h("zonos-icon",{content:CheckmarkLineIcon}),justifyContent:"flex-start",onClick:function(){return e.copyCardToClipboard("4242424242424242")}},translate("Success")," (****4242)"),h("zonos-button",{icon:h("zonos-icon",{content:RemoveLineIcon}),justifyContent:"flex-start",onClick:function(){return e.copyCardToClipboard("4000000000000002")}},translate("Failure")," (****0002)")),h("zonos-notification",null)))};return h(Host,{class:"zonos--checkout-payment zonos--elements"},h("div",{class:"zonos--group"},h("zonos-text",{class:"zonos--title",type:"semiBoldSubheader"},translate("Payment method")),i()))};Object.defineProperty(e.prototype,"ele",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{continueLoading:["continueLoadingWatcher"],hasStripePaymentError:["stripePaymentErrorWatcher"]}},enumerable:false,configurable:true});return e}();ZonosInvoicePayment.style=ZonosInvoicePaymentStyle0;var zonosInvoiceReviewCss=':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}';var ZonosInvoiceReviewStyle0=zonosInvoiceReviewCss;var ZonosInvoiceReview=function(){function e(e){registerInstance(this,e);this.mobile=false;this.tablet=false;this.collapsed=false;this.isMobile=false;this.isTablet=false;this.isLoading=true}e.prototype.handleWindowResize=function(){this.isMobile=isInvoiceMobile(this.mobile);this.isTablet=isInvoiceTablet(this.tablet)};e.prototype.componentWillLoad=function(){var e=this;this.handleWindowResize();setTimeout((function(){e.isLoading=false}),1e3)};e.prototype.render=function(){var e=this.isMobile?"gray-1000":"gray-800";return h(Host,{key:"dba979c1f8bb9f4ac5207eb2bc97296523c62fc1",class:classes(["zonos--invoice-review zonos--elements",this.isMobile&&"mobile",this.isTablet&&"tablet"])},h("div",{key:"d9bbd435775f58d3934b9cc5d8658acf781d5090",class:"zonos--title"},h("zonos-text",{key:"103859ee74d37fadd854d59cc852d71b8e23fe11",textColor:e,type:"semiBoldLabel"},translate("Pay [organizationName]",{organizationName:zonosStore.organizationName}))),h("div",{key:"fcc9ade2fc63e53307659134a1763909ad66cc30",class:"zonos--total-pay"},renderFallback({content:h("zonos-text",{type:"secondaryPageHeader"},renderCheckoutCurrency({amount:invoiceStore.amountTotalDue||0,isForeign:true})),isLoading:invoiceStore.isFetchingPayorInfo,skeletonHeight:"36px",skeletonWidth:"150px"})))};Object.defineProperty(e,"assetsDirs",{get:function(){return["assets"]},enumerable:false,configurable:true});return e}();ZonosInvoiceReview.style=ZonosInvoiceReviewStyle0;export{ZonosInvoiceFinish as zonos_invoice_finish,ZonosInvoiceFooter as zonos_invoice_footer,ZonosInvoiceOrderDetails as zonos_invoice_order_details,ZonosInvoicePayment as zonos_invoice_payment,ZonosInvoiceReview as zonos_invoice_review};