@zonos/elements 1.3.21 → 1.3.23

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 (248) hide show
  1. package/dist/cjs/{ILanguage-d247b45b.js → ILanguage-98b04442.js} +2 -2
  2. package/dist/cjs/{cart-921f0a47.js → cart-c734e909.js} +284 -246
  3. package/dist/cjs/{getBorderRadius-9ad763e1.js → getBorderRadius-ea0984bb.js} +1 -1
  4. package/dist/cjs/index.cjs.js +5 -4
  5. package/dist/cjs/{isDarkColor-3d021ecc.js → isDarkColor-b14d5752.js} +1 -1
  6. package/dist/cjs/loader.cjs.js +1 -1
  7. package/dist/cjs/{submitGtag-71790233.js → submitGtag-336b437c.js} +2 -2
  8. package/dist/cjs/zonos-address_8.cjs.entry.js +4 -4
  9. package/dist/cjs/zonos-badge_2.cjs.entry.js +1 -1
  10. package/dist/cjs/zonos-banner.cjs.entry.js +1 -1
  11. package/dist/cjs/zonos-button_3.cjs.entry.js +82 -43
  12. package/dist/cjs/zonos-card_2.cjs.entry.js +5 -5
  13. package/dist/cjs/zonos-cart-items_11.cjs.entry.js +20 -30
  14. package/dist/cjs/zonos-checkout.cjs.entry.js +11 -7
  15. package/dist/cjs/zonos-controller.cjs.entry.js +8 -6
  16. package/dist/cjs/zonos-country-flag.cjs.entry.js +4 -4
  17. package/dist/cjs/zonos-country-select_3.cjs.entry.js +12 -10
  18. package/dist/cjs/zonos-elements.cjs.js +1 -1
  19. package/dist/cjs/zonos-hello-dialog.cjs.entry.js +18 -16
  20. package/dist/cjs/zonos-hello.cjs.entry.js +13 -7
  21. package/dist/cjs/zonos-input.cjs.entry.js +2 -2
  22. package/dist/cjs/zonos-logo.cjs.entry.js +1 -1
  23. package/dist/cjs/zonos-notification.cjs.entry.js +1 -1
  24. package/dist/cjs/zonos-payment.cjs.entry.js +4 -4
  25. package/dist/cjs/zonos-select-dialog-header_2.cjs.entry.js +1 -1
  26. package/dist/cjs/zonos-shipping-rich-radio.cjs.entry.js +2 -2
  27. package/dist/cjs/zonos-text.cjs.entry.js +1 -2
  28. package/dist/cjs/{zonosStore-1063de5e.js → zonosStore-3958bbeb.js} +2 -3
  29. package/dist/collection/components/checkout/zonos-checkout/zonos-cart-items/zonos-cart-items.css +7 -0
  30. package/dist/collection/components/checkout/zonos-checkout/zonos-cart-items/zonos-cart-items.js +4 -4
  31. package/dist/collection/components/checkout/zonos-checkout/zonos-cart-restricted-items/zonos-cart-restricted-items.js +2 -2
  32. package/dist/collection/components/checkout/zonos-checkout/zonos-cart-subtotal/zonos-cart-subtotal.css +7 -0
  33. package/dist/collection/components/checkout/zonos-checkout/zonos-cart-subtotal/zonos-cart-subtotal.js +5 -5
  34. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-payment/zonos-checkout-payment.js +2 -2
  35. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.js +6 -2
  36. package/dist/collection/components/checkout/zonos-checkout/zonos-review/zonos-review.js +2 -2
  37. package/dist/collection/components/checkout/zonos-checkout/zonos-shipping/zonos-shipping.js +3 -3
  38. package/dist/collection/components/common/zonos-button/zonos-button.css +7 -2
  39. package/dist/collection/components/common/zonos-button/zonos-button.js +74 -39
  40. package/dist/collection/components/common/zonos-text/zonos-text.js +0 -18
  41. package/dist/collection/components/hello/zonos-hello/zonos-hello.js +9 -4
  42. package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog-footer/zonos-hello-dialog-footer.js +7 -5
  43. package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog.js +14 -12
  44. package/dist/collection/components/main/zonos-controller.js +2 -2
  45. package/dist/collection/components/store/hello/localization.js +3 -3
  46. package/dist/collection/components/store/translationStore/strings.arabic.js +10 -10
  47. package/dist/collection/components/store/translationStore/strings.base.js +10 -10
  48. package/dist/collection/components/store/translationStore/strings.chinese.js +10 -10
  49. package/dist/collection/components/store/translationStore/strings.danish.js +10 -10
  50. package/dist/collection/components/store/translationStore/strings.dutch.js +10 -10
  51. package/dist/collection/components/store/translationStore/strings.french.js +10 -10
  52. package/dist/collection/components/store/translationStore/strings.german.js +10 -10
  53. package/dist/collection/components/store/translationStore/strings.hebrew.js +10 -10
  54. package/dist/collection/components/store/translationStore/strings.indonesian.js +10 -10
  55. package/dist/collection/components/store/translationStore/strings.italian.js +10 -10
  56. package/dist/collection/components/store/translationStore/strings.japanese.js +10 -10
  57. package/dist/collection/components/store/translationStore/strings.korean.js +10 -10
  58. package/dist/collection/components/store/translationStore/strings.norwegian.js +10 -10
  59. package/dist/collection/components/store/translationStore/strings.polish.js +10 -10
  60. package/dist/collection/components/store/translationStore/strings.portuguese.js +10 -10
  61. package/dist/collection/components/store/translationStore/strings.russian.js +10 -10
  62. package/dist/collection/components/store/translationStore/strings.spanish.js +10 -10
  63. package/dist/collection/components/store/translationStore/strings.swedish.js +10 -10
  64. package/dist/collection/components/store/translationStore/strings.turkish.js +10 -10
  65. package/dist/collection/components/store/translationStore/strings.vietnamese.js +10 -10
  66. package/dist/collection/components/store/translationStore.js +2 -2
  67. package/dist/collection/components/store/zonosStore.js +3 -4
  68. package/dist/collection/components/utils/api/getExchangeRate.js +20 -5
  69. package/dist/collection/components/utils/hello/currencyConversion/currencyConvertAndFormat.js +1 -1
  70. package/dist/collection/components/utils/hello/currencyConversion/currencyDisplay.js +1 -15
  71. package/dist/collection/components/utils/hello/currencyConversion/currencyFormat.js +32 -17
  72. package/dist/collection/components/utils/hello/currencyConversion/defaultCurrencyConverter.js +26 -4
  73. package/dist/collection/components/utils/hello/initHello.js +4 -2
  74. package/dist/collection/components/utils/isElementUsingDarkTheme.js +5 -0
  75. package/dist/collection/scripts/_zonosBase.js +2 -1
  76. package/dist/collection/types/ILanguage.js +2 -2
  77. package/dist/esm/{ILanguage-97790bee.js → ILanguage-cd6acb72.js} +2 -2
  78. package/dist/esm/{cart-d3c98a81.js → cart-67471b37.js} +284 -246
  79. package/dist/esm/{getBorderRadius-393bf797.js → getBorderRadius-5e5a5800.js} +1 -1
  80. package/dist/esm/index.js +5 -4
  81. package/dist/esm/{isDarkColor-454ec221.js → isDarkColor-5185b62c.js} +1 -1
  82. package/dist/esm/loader.js +1 -1
  83. package/dist/esm/{submitGtag-acdb8bd7.js → submitGtag-1f42c748.js} +2 -2
  84. package/dist/esm/zonos-address_8.entry.js +4 -4
  85. package/dist/esm/zonos-badge_2.entry.js +1 -1
  86. package/dist/esm/zonos-banner.entry.js +1 -1
  87. package/dist/esm/zonos-button_3.entry.js +82 -43
  88. package/dist/esm/zonos-card_2.entry.js +5 -5
  89. package/dist/esm/zonos-cart-items_11.entry.js +20 -30
  90. package/dist/esm/zonos-checkout.entry.js +11 -7
  91. package/dist/esm/zonos-controller.entry.js +8 -6
  92. package/dist/esm/zonos-country-flag.entry.js +4 -4
  93. package/dist/esm/zonos-country-select_3.entry.js +12 -10
  94. package/dist/esm/zonos-elements.js +1 -1
  95. package/dist/esm/zonos-hello-dialog.entry.js +18 -16
  96. package/dist/esm/zonos-hello.entry.js +13 -7
  97. package/dist/esm/zonos-input.entry.js +2 -2
  98. package/dist/esm/zonos-logo.entry.js +1 -1
  99. package/dist/esm/zonos-notification.entry.js +1 -1
  100. package/dist/esm/zonos-payment.entry.js +4 -4
  101. package/dist/esm/zonos-select-dialog-header_2.entry.js +1 -1
  102. package/dist/esm/zonos-shipping-rich-radio.entry.js +2 -2
  103. package/dist/esm/zonos-text.entry.js +1 -2
  104. package/dist/esm/{zonosStore-0ce57f37.js → zonosStore-8b9ea19c.js} +2 -3
  105. package/dist/esm-es5/ILanguage-cd6acb72.js +1 -0
  106. package/dist/esm-es5/cart-67471b37.js +1 -0
  107. package/dist/esm-es5/{getBorderRadius-393bf797.js → getBorderRadius-5e5a5800.js} +1 -1
  108. package/dist/esm-es5/index.js +1 -1
  109. package/dist/esm-es5/{isDarkColor-454ec221.js → isDarkColor-5185b62c.js} +1 -1
  110. package/dist/esm-es5/loader.js +1 -1
  111. package/dist/esm-es5/{submitGtag-acdb8bd7.js → submitGtag-1f42c748.js} +1 -1
  112. package/dist/esm-es5/zonos-address_8.entry.js +1 -1
  113. package/dist/esm-es5/zonos-badge_2.entry.js +1 -1
  114. package/dist/esm-es5/zonos-banner.entry.js +1 -1
  115. package/dist/esm-es5/zonos-button_3.entry.js +1 -1
  116. package/dist/esm-es5/zonos-card_2.entry.js +1 -1
  117. package/dist/esm-es5/zonos-cart-items_11.entry.js +1 -1
  118. package/dist/esm-es5/zonos-checkout.entry.js +1 -1
  119. package/dist/esm-es5/zonos-controller.entry.js +1 -1
  120. package/dist/esm-es5/zonos-country-flag.entry.js +1 -1
  121. package/dist/esm-es5/zonos-country-select_3.entry.js +1 -1
  122. package/dist/esm-es5/zonos-elements.js +1 -1
  123. package/dist/esm-es5/zonos-hello-dialog.entry.js +1 -1
  124. package/dist/esm-es5/zonos-hello.entry.js +1 -1
  125. package/dist/esm-es5/zonos-input.entry.js +1 -1
  126. package/dist/esm-es5/zonos-logo.entry.js +1 -1
  127. package/dist/esm-es5/zonos-notification.entry.js +1 -1
  128. package/dist/esm-es5/zonos-payment.entry.js +1 -1
  129. package/dist/esm-es5/zonos-select-dialog-header_2.entry.js +1 -1
  130. package/dist/esm-es5/zonos-shipping-rich-radio.entry.js +1 -1
  131. package/dist/esm-es5/zonos-text.entry.js +1 -1
  132. package/dist/esm-es5/{zonosStore-0ce57f37.js → zonosStore-8b9ea19c.js} +1 -1
  133. package/dist/scripts/index.d.ts +47 -19
  134. package/dist/scripts/index.js +1 -1
  135. package/dist/scripts/loadZonos.js +1 -1
  136. package/dist/scripts/zonos.js +1 -1
  137. package/dist/types/components/common/zonos-button/zonos-button.d.ts +1 -0
  138. package/dist/types/components/common/zonos-text/zonos-text.d.ts +0 -4
  139. package/dist/types/components/hello/zonos-hello-dialog/zonos-hello-dialog-footer/zonos-hello-dialog-footer.d.ts +1 -0
  140. package/dist/types/components/store/hello/localization.d.ts +2 -2
  141. package/dist/types/components/store/translationStore/strings.arabic.d.ts +8 -8
  142. package/dist/types/components/store/translationStore/strings.base.d.ts +8 -8
  143. package/dist/types/components/store/translationStore/strings.chinese.d.ts +8 -8
  144. package/dist/types/components/store/translationStore/strings.danish.d.ts +8 -8
  145. package/dist/types/components/store/translationStore/strings.dutch.d.ts +8 -8
  146. package/dist/types/components/store/translationStore/strings.french.d.ts +8 -8
  147. package/dist/types/components/store/translationStore/strings.german.d.ts +8 -8
  148. package/dist/types/components/store/translationStore/strings.hebrew.d.ts +8 -8
  149. package/dist/types/components/store/translationStore/strings.indonesian.d.ts +8 -8
  150. package/dist/types/components/store/translationStore/strings.italian.d.ts +8 -8
  151. package/dist/types/components/store/translationStore/strings.japanese.d.ts +8 -8
  152. package/dist/types/components/store/translationStore/strings.korean.d.ts +8 -8
  153. package/dist/types/components/store/translationStore/strings.norwegian.d.ts +8 -8
  154. package/dist/types/components/store/translationStore/strings.polish.d.ts +8 -8
  155. package/dist/types/components/store/translationStore/strings.portuguese.d.ts +8 -8
  156. package/dist/types/components/store/translationStore/strings.russian.d.ts +8 -8
  157. package/dist/types/components/store/translationStore/strings.spanish.d.ts +8 -8
  158. package/dist/types/components/store/translationStore/strings.swedish.d.ts +8 -8
  159. package/dist/types/components/store/translationStore/strings.turkish.d.ts +8 -8
  160. package/dist/types/components/store/translationStore/strings.vietnamese.d.ts +8 -8
  161. package/dist/types/components/store/translationStore.d.ts +7 -7
  162. package/dist/types/components/store/zonosStore.d.ts +6 -2
  163. package/dist/types/components/utils/api/getExchangeRate.d.ts +9 -10
  164. package/dist/types/components/utils/hello/currencyConversion/currencyFormat.d.ts +5 -1
  165. package/dist/types/components/utils/hello/currencyConversion/getCurrencyElements.d.ts +1 -1
  166. package/dist/types/components/utils/isElementUsingDarkTheme.d.ts +1 -0
  167. package/dist/types/components.d.ts +0 -8
  168. package/dist/types/scripts/_zonosBase.d.ts +42 -3
  169. package/dist/types/types/ILanguage.d.ts +2 -2
  170. package/dist/types/types/checkout/CheckoutConfig.d.ts +6 -2
  171. package/dist/types/types/hello/HelloConfig.d.ts +1 -3
  172. package/dist/zonos-elements/index.esm.js +1 -1
  173. package/dist/zonos-elements/{p-72191005.system.entry.js → p-02a01106.system.entry.js} +1 -1
  174. package/dist/zonos-elements/p-065ada8a.system.js +1 -0
  175. package/dist/zonos-elements/{p-15c903ff.js → p-083850d3.js} +1 -1
  176. package/dist/zonos-elements/{p-c15b36c1.system.entry.js → p-088d6460.system.entry.js} +1 -1
  177. package/dist/zonos-elements/p-08d1cfc4.entry.js +1 -0
  178. package/dist/zonos-elements/{p-d03e101b.system.entry.js → p-0d30f36e.system.entry.js} +1 -1
  179. package/dist/zonos-elements/{p-3668f365.entry.js → p-0ea19a4d.entry.js} +1 -1
  180. package/dist/zonos-elements/{p-67373528.entry.js → p-1752853e.entry.js} +1 -1
  181. package/dist/zonos-elements/{p-d18990b0.entry.js → p-18464027.entry.js} +1 -1
  182. package/dist/zonos-elements/{p-d1b8dcd8.system.entry.js → p-1e2fbb1d.system.entry.js} +1 -1
  183. package/dist/zonos-elements/p-234f8729.system.js +1 -0
  184. package/dist/zonos-elements/p-33b054d9.system.js +1 -0
  185. package/dist/zonos-elements/p-440ac320.js +1 -0
  186. package/dist/zonos-elements/{p-0a4f341b.entry.js → p-44250644.entry.js} +1 -1
  187. package/dist/zonos-elements/p-4a3b5fc8.entry.js +1 -0
  188. package/dist/zonos-elements/p-52900b33.entry.js +1 -0
  189. package/dist/zonos-elements/{p-42a7a726.system.entry.js → p-5437dd24.system.entry.js} +1 -1
  190. package/dist/zonos-elements/{p-f03b33ec.system.entry.js → p-5992c6fb.system.entry.js} +1 -1
  191. package/dist/zonos-elements/{p-474cb030.entry.js → p-607b5560.entry.js} +1 -1
  192. package/dist/zonos-elements/{p-b925e897.system.entry.js → p-65671a64.system.entry.js} +1 -1
  193. package/dist/zonos-elements/{p-0e6fe6c8.system.entry.js → p-6f132cee.system.entry.js} +1 -1
  194. package/dist/zonos-elements/{p-9da3b3b3.system.entry.js → p-713bb92e.system.entry.js} +1 -1
  195. package/dist/zonos-elements/p-7d61e6e5.entry.js +1 -0
  196. package/dist/zonos-elements/{p-ce4c48f6.entry.js → p-7fa5a6ea.entry.js} +1 -1
  197. package/dist/zonos-elements/p-8473827d.system.entry.js +1 -0
  198. package/dist/zonos-elements/{p-3115e7a7.system.js → p-8853e051.system.js} +1 -1
  199. package/dist/zonos-elements/p-8ed0769e.entry.js +1 -0
  200. package/dist/zonos-elements/{p-fc2f3e2a.system.entry.js → p-92c64a9c.system.entry.js} +1 -1
  201. package/dist/zonos-elements/p-97aceb11.js +1 -0
  202. package/dist/zonos-elements/p-9c0859b5.entry.js +1 -0
  203. package/dist/zonos-elements/p-9c3a036e.system.js +1 -0
  204. package/dist/zonos-elements/{p-dd02f2eb.entry.js → p-9c8705ac.entry.js} +1 -1
  205. package/dist/zonos-elements/{p-f4c921f8.entry.js → p-a18555c8.entry.js} +1 -1
  206. package/dist/zonos-elements/{p-2d3e3735.js → p-a5e9d372.js} +1 -1
  207. package/dist/zonos-elements/{p-75d52d98.system.entry.js → p-af3ee45d.system.entry.js} +1 -1
  208. package/dist/zonos-elements/p-b1ee97d8.entry.js +1 -0
  209. package/dist/zonos-elements/{p-b9ed8a66.system.entry.js → p-b79753bb.system.entry.js} +1 -1
  210. package/dist/zonos-elements/{p-1406d696.system.entry.js → p-b9195764.system.entry.js} +1 -1
  211. package/dist/zonos-elements/{p-f0afca6c.system.js → p-be14323b.system.js} +1 -1
  212. package/dist/zonos-elements/{p-d5feef4c.js → p-bf9dca26.js} +1 -1
  213. package/dist/zonos-elements/p-bfc30599.entry.js +1 -0
  214. package/dist/zonos-elements/{p-2c57097c.entry.js → p-c0ddef11.entry.js} +1 -1
  215. package/dist/zonos-elements/{p-14bea5e6.system.entry.js → p-c1879326.system.entry.js} +1 -1
  216. package/dist/zonos-elements/{p-eb6ddb2f.js → p-c53cef11.js} +1 -1
  217. package/dist/zonos-elements/p-c9e433c0.system.js +1 -0
  218. package/dist/zonos-elements/{p-3c97c44d.entry.js → p-cbf13745.entry.js} +1 -1
  219. package/dist/zonos-elements/p-d6796b73.system.entry.js +1 -0
  220. package/dist/zonos-elements/{p-971e73c3.system.entry.js → p-d7e6cad0.system.entry.js} +1 -1
  221. package/dist/zonos-elements/{p-b202a015.entry.js → p-db9e87ec.entry.js} +1 -1
  222. package/dist/zonos-elements/p-e0bf9666.system.js +1 -1
  223. package/dist/zonos-elements/p-f7468131.system.entry.js +1 -0
  224. package/dist/zonos-elements/{p-23393abc.system.entry.js → p-fedafdd2.system.entry.js} +1 -1
  225. package/dist/zonos-elements/zonos-elements.esm.js +1 -1
  226. package/package.json +4 -1
  227. package/dist/collection/components/utils/formatCurrency.js +0 -9
  228. package/dist/esm-es5/ILanguage-97790bee.js +0 -1
  229. package/dist/esm-es5/cart-d3c98a81.js +0 -1
  230. package/dist/types/components/utils/formatCurrency.d.ts +0 -5
  231. package/dist/zonos-elements/p-14da9ed0.entry.js +0 -1
  232. package/dist/zonos-elements/p-16ad90ca.js +0 -1
  233. package/dist/zonos-elements/p-3edcbb56.entry.js +0 -1
  234. package/dist/zonos-elements/p-5968c6ad.entry.js +0 -1
  235. package/dist/zonos-elements/p-59913049.entry.js +0 -1
  236. package/dist/zonos-elements/p-824e1e83.system.js +0 -1
  237. package/dist/zonos-elements/p-8f3f1a1b.system.js +0 -1
  238. package/dist/zonos-elements/p-957301d0.system.entry.js +0 -1
  239. package/dist/zonos-elements/p-9e4b35d4.system.entry.js +0 -1
  240. package/dist/zonos-elements/p-abe7524f.system.js +0 -1
  241. package/dist/zonos-elements/p-b13e630b.js +0 -1
  242. package/dist/zonos-elements/p-bfe6f84f.system.entry.js +0 -1
  243. package/dist/zonos-elements/p-d79e83bd.entry.js +0 -1
  244. package/dist/zonos-elements/p-eb765228.entry.js +0 -1
  245. package/dist/zonos-elements/p-ebb36e4d.entry.js +0 -1
  246. package/dist/zonos-elements/p-f16b80a3.system.js +0 -1
  247. package/dist/zonos-elements/p-f3a6de62.entry.js +0 -1
  248. package/dist/zonos-elements/p-fc5df354.system.js +0 -1
@@ -1,10 +1,4 @@
1
1
  export declare const stringsTurkish: {
2
- '${percentage} GST due on any order above ${threshold} along with an import entry transaction fee and MPI levy.': {
3
- value: string;
4
- };
5
- '${percentage} GST due on any order above ${threshold}.': {
6
- value: string;
7
- };
8
2
  'Above de minimis threshold for': {
9
3
  value: string;
10
4
  };
@@ -131,7 +125,7 @@ export declare const stringsTurkish: {
131
125
  'Order total': {
132
126
  value: string;
133
127
  };
134
- 'Orders to ${countryName} must be over ${threshold} to ship.': {
128
+ 'Orders to [countryName] must be over [threshold] to ship.': {
135
129
  value: string;
136
130
  };
137
131
  Pay: {
@@ -239,7 +233,7 @@ export declare const stringsTurkish: {
239
233
  "We've sent an email confirmation of the order details for your review. And our team is carefully preparing your order so it arrives on time.": {
240
234
  value: string;
241
235
  };
242
- 'Welcome to': {
236
+ 'Welcome to [storeName]!': {
243
237
  value: string;
244
238
  };
245
239
  'Welcome!': {
@@ -257,6 +251,12 @@ export declare const stringsTurkish: {
257
251
  'Your payment went through successfully! Thank you for shopping with us! We hope you had an enjoyable experience and your support means the world to us.': {
258
252
  value: string;
259
253
  };
254
+ '[percentage] GST due on any order above [threshold] along with an import entry transaction fee and MPI levy.': {
255
+ value: string;
256
+ };
257
+ '[percentage] GST due on any order above [threshold].': {
258
+ value: string;
259
+ };
260
260
  'business days': {
261
261
  value: string;
262
262
  };
@@ -1,10 +1,4 @@
1
1
  export declare const stringsVietnamese: {
2
- '${percentage} GST due on any order above ${threshold} along with an import entry transaction fee and MPI levy.': {
3
- value: string;
4
- };
5
- '${percentage} GST due on any order above ${threshold}.': {
6
- value: string;
7
- };
8
2
  'Above de minimis threshold for': {
9
3
  value: string;
10
4
  };
@@ -131,7 +125,7 @@ export declare const stringsVietnamese: {
131
125
  'Order total': {
132
126
  value: string;
133
127
  };
134
- 'Orders to ${countryName} must be over ${threshold} to ship.': {
128
+ 'Orders to [countryName] must be over [threshold] to ship.': {
135
129
  value: string;
136
130
  };
137
131
  Pay: {
@@ -239,7 +233,7 @@ export declare const stringsVietnamese: {
239
233
  "We've sent an email confirmation of the order details for your review. And our team is carefully preparing your order so it arrives on time.": {
240
234
  value: string;
241
235
  };
242
- 'Welcome to': {
236
+ 'Welcome to [storeName]!': {
243
237
  value: string;
244
238
  };
245
239
  'Welcome!': {
@@ -257,6 +251,12 @@ export declare const stringsVietnamese: {
257
251
  'Your payment went through successfully! Thank you for shopping with us! We hope you had an enjoyable experience and your support means the world to us.': {
258
252
  value: string;
259
253
  };
254
+ '[percentage] GST due on any order above [threshold] along with an import entry transaction fee and MPI levy.': {
255
+ value: string;
256
+ };
257
+ '[percentage] GST due on any order above [threshold].': {
258
+ value: string;
259
+ };
260
260
  'business days': {
261
261
  value: string;
262
262
  };
@@ -8,27 +8,27 @@ declare const translationStoreUpdateLanguage: (language: Locale_ElementsSupporte
8
8
  _placeholder?: never;
9
9
  }) => void;
10
10
  /**
11
- * Extracts variables pattern "${pattern}" from a string
11
+ * Extracts variables pattern "[pattern]" from a string
12
12
  * @example
13
- * type Variables = ExtractVariables<'${percentage} GST due on any order above ${threshold}.'>
13
+ * type Variables = ExtractVariables<'[percentage] GST due on any order above [threshold].'>
14
14
  *
15
15
  * // Variables = 'percentage' | 'threshold'
16
16
  */
17
- type ExtractVariables<S extends string> = S extends `${infer _Start}\${${infer Var}}${infer End}` ? Var | ExtractVariables<End> : never;
17
+ type ExtractVariables<S extends string> = S extends `${infer _Start}[${infer Var}]${infer End}` ? Var | ExtractVariables<End> : never;
18
18
  /**
19
19
  * Require second argument to be an object with keys that match the variables in the string. If no variables are present, second argument is optional.
20
20
  * @example
21
- * type Params = TranslateParams<'${percentage} GST due on any order above ${threshold}.'>
22
- * // Params = ['${percentage} GST due on any order above ${threshold}.', variables: { percentage: string, threshold: string }]
21
+ * type Params = TranslateParams<'[percentage] GST due on any order above [threshold].'>
22
+ * // Params = ['[percentage] GST due on any order above [threshold].', variables: { percentage: string, threshold: string }]
23
23
  */
24
24
  type TranslateParams<T extends string> = ExtractVariables<T> extends never ? [T, variables?: never] : [T, variables: Record<ExtractVariables<T>, string>];
25
25
  /**
26
26
  * Translate a string with variables if variable pattern is present in the string
27
27
  * @example
28
28
  * // Require variables:
29
- * translate('${percentage} GST due on any order above ${threshold}.', { percentage: '5%', threshold: '$100' })
29
+ * translate('[percentage] GST due on any order above [threshold].', { percentage: '5%', threshold: '$100' })
30
30
  * // No variables:
31
31
  * translate('Above de minimis threshold for')
32
32
  */
33
- declare const translate: <T extends "Shipping" | "Email" | "Name" | "Guaranteed" | "Country" | "Customer" | "Hide" | "Delivery" | "Payment" | "${percentage} GST due on any order above ${threshold} along with an import entry transaction fee and MPI levy." | "${percentage} GST due on any order above ${threshold}." | "Above de minimis threshold for" | "Address" | "Address line 1" | "Address line 2" | "Are you sure?" | "Back" | "Billing" | "Billing address" | "Cancel" | "Cart subtotal" | "City" | "Close" | "Contact" | "Continue to shipping" | "Customer information" | "Delivery options" | "Don't close" | "Duties and taxes will be applied to items and shipping." | "Duties will apply to all orders" | "Duties, taxes, and fees" | "Error creating Checkout" | "Error updating Checkout" | "Expected delivery" | "First name" | "Go to payment" | "Keep shopping" | "Know about duties and taxes before you buy. Shop with confidence!" | "Last name" | "Missing required fields. Make sure all fields are completed." | "No shipping method selected" | "No shipping methods found - please review and update your address details by selecting the \"Customer\" tab above. If you continue to encounter issues, contact our support team for assistance." | "No shipping methods found - try editing your address or contacting support if the error persists" | "Nothing due at the door" | "Order is over the de minimis threshold for both duty and tax" | "Order total" | "Orders to ${countryName} must be over ${threshold} to ship." | "Pay" | "Payment failed" | "Payment failed. Please try another payment method." | "Payment method" | "Payment processing. We'll update you when payment is received." | "Phone number" | "Please ensure your text uses the Latin alphabet only (A-Z, a-z)." | "Postal code" | "Powered by" | "Prepay duties and taxes at checkout" | "Restricted item" | "Restricted items found" | "Search countries" | "See duty and tax thresholds" | "Select a country" | "Select a language" | "Shipping address same as billing" | "Shipping method" | "Show" | "Something went wrong." | "Spend" | "State" | "State/Province" | "Taxes will apply to all orders" | "The following items are unable to be shipped to your country and are not included in your cart total." | "There's been an error creating your checkout session. Please reload and try again or contact support if the error persists" | "There's been an error updating your checkout session. Please reload and try again or contact support if the error persists" | "To ensure delivery all address details must be in Latin characters." | "Translated address" | "Update address" | "Update your address" | "We couldn't complete your payment. Please verify the payment details and try again." | "We've sent an email confirmation of the order details for your review. And our team is carefully preparing your order so it arrives on time." | "Welcome to" | "Welcome!" | "What you entered" | "Would you like to close checkout and return to the site?" | "You're all set!" | "Your payment went through successfully! Thank you for shopping with us! We hope you had an enjoyable experience and your support means the world to us." | "business days" | "click to learn more" | "duty free" | "restricted items" | "tax free">(...[key, replacement]: TranslateParams<T>) => string;
33
+ declare const translate: <T extends "Shipping" | "Email" | "Name" | "Guaranteed" | "Country" | "Customer" | "Hide" | "Delivery" | "Payment" | "Above de minimis threshold for" | "Address" | "Address line 1" | "Address line 2" | "Are you sure?" | "Back" | "Billing" | "Billing address" | "Cancel" | "Cart subtotal" | "City" | "Close" | "Contact" | "Continue to shipping" | "Customer information" | "Delivery options" | "Don't close" | "Duties and taxes will be applied to items and shipping." | "Duties will apply to all orders" | "Duties, taxes, and fees" | "Error creating Checkout" | "Error updating Checkout" | "Expected delivery" | "First name" | "Go to payment" | "Keep shopping" | "Know about duties and taxes before you buy. Shop with confidence!" | "Last name" | "Missing required fields. Make sure all fields are completed." | "No shipping method selected" | "No shipping methods found - please review and update your address details by selecting the \"Customer\" tab above. If you continue to encounter issues, contact our support team for assistance." | "No shipping methods found - try editing your address or contacting support if the error persists" | "Nothing due at the door" | "Order is over the de minimis threshold for both duty and tax" | "Order total" | "Orders to [countryName] must be over [threshold] to ship." | "Pay" | "Payment failed" | "Payment failed. Please try another payment method." | "Payment method" | "Payment processing. We'll update you when payment is received." | "Phone number" | "Please ensure your text uses the Latin alphabet only (A-Z, a-z)." | "Postal code" | "Powered by" | "Prepay duties and taxes at checkout" | "Restricted item" | "Restricted items found" | "Search countries" | "See duty and tax thresholds" | "Select a country" | "Select a language" | "Shipping address same as billing" | "Shipping method" | "Show" | "Something went wrong." | "Spend" | "State" | "State/Province" | "Taxes will apply to all orders" | "The following items are unable to be shipped to your country and are not included in your cart total." | "There's been an error creating your checkout session. Please reload and try again or contact support if the error persists" | "There's been an error updating your checkout session. Please reload and try again or contact support if the error persists" | "To ensure delivery all address details must be in Latin characters." | "Translated address" | "Update address" | "Update your address" | "We couldn't complete your payment. Please verify the payment details and try again." | "We've sent an email confirmation of the order details for your review. And our team is carefully preparing your order so it arrives on time." | "Welcome to [storeName]!" | "Welcome!" | "What you entered" | "Would you like to close checkout and return to the site?" | "You're all set!" | "Your payment went through successfully! Thank you for shopping with us! We hope you had an enjoyable experience and your support means the world to us." | "[percentage] GST due on any order above [threshold] along with an import entry transaction fee and MPI levy." | "[percentage] GST due on any order above [threshold]." | "business days" | "click to learn more" | "duty free" | "restricted items" | "tax free">(...[key, replacement]: TranslateParams<T>) => string;
34
34
  export { translate, translationStore, translationStoreUpdateLanguage };
@@ -24,6 +24,10 @@ export type ZonosConfig = {
24
24
  onCountryChange?: LoadZonosParamsConfig['onCountryChange'];
25
25
  organizationId: string;
26
26
  organizationName: string;
27
+ /**
28
+ * Currency format to be used in whole app
29
+ */
30
+ overrideCurrencyFormat?: LoadZonosParamsConfig['overrideCurrencyFormat'];
27
31
  sourceCurrency: string;
28
32
  storeId: number | null;
29
33
  };
@@ -36,7 +40,7 @@ type ZonosStore = ZonosConfig & {
36
40
  */
37
41
  zonosApiKey: string;
38
42
  };
39
- declare const zonosStore: ZonosStore;
43
+ declare const zonosStoreDispose: () => void, zonosStore: ZonosStore;
40
44
  /**
41
45
  * Get theme from media query if theme is SYSTEM, otherwise return the theme
42
46
  */
@@ -49,4 +53,4 @@ declare const zonosStoreInitSetting: ({ overrideSettings, zonosSettings, }: {
49
53
  zonosSettings: ZonosSettingsQuery | null;
50
54
  }) => void;
51
55
  declare const zonosStoreFontFamily: () => string;
52
- export { getZonosStoreTheme, zonosStore, zonosStoreFontFamily, zonosStoreInitSetting, };
56
+ export { getZonosStoreTheme, zonosStore, zonosStoreDispose, zonosStoreFontFamily, zonosStoreInitSetting, };
@@ -6,18 +6,17 @@ export type TargetFormat = {
6
6
  symbolLocation: string;
7
7
  thousandsDelimiter: string;
8
8
  };
9
+ type ReturnType = {
10
+ exchangeRate: {
11
+ rate: number;
12
+ targetFormat: TargetFormat;
13
+ } | null;
14
+ maxAge: number | null;
15
+ };
9
16
  export declare const getExchangeRate: ({ country, isGuaranteed, sourceCurrency, targetCurrency, }: {
10
17
  country: string | null;
11
18
  isGuaranteed: boolean;
12
19
  sourceCurrency: string;
13
20
  targetCurrency: string;
14
- }) => Promise<{
15
- exchangeRate: null;
16
- maxAge: null;
17
- } | {
18
- exchangeRate: {
19
- rate: number;
20
- targetFormat: TargetFormat;
21
- };
22
- maxAge: number;
23
- }>;
21
+ }) => Promise<ReturnType>;
22
+ export {};
@@ -1 +1,5 @@
1
- export declare const currencyFormat: (value: number) => string;
1
+ import type { CurrencyCode } from "../../../../types/generated/graphql.customer.types";
2
+ export declare const currencyFormat: ({ amount, currency, }: {
3
+ amount: number;
4
+ currency?: CurrencyCode;
5
+ }) => string;
@@ -1 +1 @@
1
- export declare const getCurrencyElements: (selector: string) => Element[] | null;
1
+ export declare const getCurrencyElements: (selector: string) => HTMLElement[] | null;
@@ -0,0 +1 @@
1
+ export declare const isElementUsingDarkTheme: (element: HTMLElement) => boolean;
@@ -882,10 +882,6 @@ export namespace Components {
882
882
  "spinnerColor"?: SpinnerColor;
883
883
  }
884
884
  interface ZonosText {
885
- /**
886
- * The tag to use for the text
887
- */
888
- "content"?: string;
889
885
  /**
890
886
  * The size of the text
891
887
  */
@@ -2281,10 +2277,6 @@ declare namespace LocalJSX {
2281
2277
  "spinnerColor"?: SpinnerColor;
2282
2278
  }
2283
2279
  interface ZonosText {
2284
- /**
2285
- * The tag to use for the text
2286
- */
2287
- "content"?: string;
2288
2280
  /**
2289
2281
  * The size of the text
2290
2282
  */
@@ -5,8 +5,23 @@ import type { TempCart } from "../types/checkout/api/TempCart";
5
5
  import type { CheckoutConfig } from "../types/checkout/CheckoutConfig";
6
6
  import type { CountryCode, CurrencyCode } from "../types/generated/graphql.customer.types";
7
7
  import type { HelloConfig } from "../types/hello/HelloConfig";
8
+ /**
9
+ * Currency converter function to be used in Hello and Checkout
10
+ * @note don't modify the element directly in this function, otherwise it might cause unexpected behavior like an infinite loop
11
+ */
8
12
  export type CurrencyConverter = (props: {
9
- selector?: string;
13
+ /**
14
+ * Current currency code
15
+ */
16
+ currencyCode: CurrencyCode;
17
+ /**
18
+ * The original amount before conversion
19
+ */
20
+ originalAmount: number;
21
+ /**
22
+ * HTML element matching the selector specified in the helloSettings init
23
+ */
24
+ selector: HTMLElement;
10
25
  /**
11
26
  * Convert the amount to the target currency in Hello (no locale format)
12
27
  * @param convert amount
@@ -34,12 +49,36 @@ export type CurrencyConverter = (props: {
34
49
  * format(100) // return CA$100.00 when selected country in Hello is Canada
35
50
  */
36
51
  format: (amount: number) => string;
37
- }) => void;
52
+ }) => string;
38
53
  export type LoadZonosParamsConfig = {
39
54
  appearance?: Partial<AppearanceConfig>;
40
55
  checkoutSettings?: Partial<CheckoutConfig>;
56
+ /**
57
+ * Currency converter function to be used in Hello and Checkout
58
+ * @note don't modify element directly in this function, otherwise it might cause unexpected behavior like an infinite loop
59
+ */
41
60
  currencyConverter?: CurrencyConverter;
42
61
  helloSettings?: Partial<HelloConfig>;
62
+ /**
63
+ * Hello and Checkout are using using the Intl.NumberFormat API to format the currency. You can either use the default currency display or customize it.
64
+ */
65
+ overrideCurrencyFormat?: {
66
+ /**
67
+ * `currencyDisplay` option in Intl.NumberFormat
68
+ * @ref https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat#currencydisplay
69
+ * @default 'symbol'
70
+ *
71
+ * @note These options won't apply, and will use '{amount} {currencyCode}' if the browser is IE.
72
+ */
73
+ currencyDisplay?: 'symbol' | 'code' | 'name' | 'narrowSymbol';
74
+ }
75
+ /**
76
+ * Custom currency format function to be used in Hello and Checkout
77
+ */
78
+ | ((params: {
79
+ amount: number;
80
+ countryCode: CurrencyCode;
81
+ }) => string);
43
82
  /**
44
83
  * Callback to be called when the country is changed
45
84
  */
@@ -114,7 +153,7 @@ export declare abstract class Zonos {
114
153
  static tempCartData: TempCart | null;
115
154
  static getCurrentTimestamp: () => number;
116
155
  private static zonosController;
117
- static init: ({ appearance, checkoutSettings, currencyConverter, helloSettings, onCountryChange, storeId, zonosApiKey, }: LoadZonosParams) => Promise<void>;
156
+ static init: ({ appearance, checkoutSettings, currencyConverter, helloSettings, onCountryChange, overrideCurrencyFormat, storeId, zonosApiKey, }: LoadZonosParams) => Promise<void>;
118
157
  static displayCurrency: () => void;
119
158
  static openHelloDialog: (value?: boolean) => void;
120
159
  static showNotification: (notification: NotificationInit) => void;
@@ -33,7 +33,7 @@ export declare const languages: readonly [{
33
33
  }, {
34
34
  readonly code: "de";
35
35
  readonly label: "German";
36
- readonly translatedLabel: "Deutsche";
36
+ readonly translatedLabel: "Deutsch";
37
37
  }, {
38
38
  readonly code: "ja";
39
39
  readonly label: "Japanese";
@@ -49,7 +49,7 @@ export declare const languages: readonly [{
49
49
  }, {
50
50
  readonly code: "tr";
51
51
  readonly label: "Turkish";
52
- readonly translatedLabel: "Türk";
52
+ readonly translatedLabel: "Türkçe";
53
53
  }, {
54
54
  readonly code: "he";
55
55
  readonly label: "Hebrew";
@@ -1,8 +1,12 @@
1
1
  import type { CartItem } from "../../components/store/checkout/cart";
2
2
  import type { BuildLandedCostParams, BuildLandedCostResponse } from "../../components/utils/api/triggerBuildLandedCost";
3
- import type { AnalyticsProviderStatus, AnalyticsProviderType, CheckoutSubscriptionStatus, CheckoutSuccessBehavior, CheckoutVisibilityStatus, GetOrderQuery, NotificationActiveStatus } from "../generated/graphql.customer.types";
3
+ import type { AnalyticsProviderStatus, AnalyticsProviderType, CheckoutSubscriptionStatus, CheckoutSuccessBehavior, CheckoutVisibilityStatus, CountryCode, CurrencyCode, GetOrderQuery, NotificationActiveStatus } from "../generated/graphql.customer.types";
4
4
  export type ZonosOrder = GetOrderQuery['order'];
5
5
  export type { BuildLandedCostParams, BuildLandedCostResponse };
6
+ export type BuildCardDetailParams = {
7
+ countryCode: CountryCode;
8
+ currencyCode: CurrencyCode;
9
+ };
6
10
  export type CheckoutConfig = {
7
11
  /**
8
12
  * Validate address to allow specific character sets
@@ -66,7 +70,7 @@ export type CheckoutConfig = {
66
70
  * - productId?: string;
67
71
  * - quantity: number;
68
72
  */
69
- buildCartDetail?: () => Promise<CartItem[]>;
73
+ buildCartDetail?: (params: BuildCardDetailParams) => Promise<CartItem[]>;
70
74
  /**
71
75
  * Calculate landed cost callback for checkout (optional)
72
76
  * @note will use temp cart data if available
@@ -1,4 +1,4 @@
1
- import type { HelloCurrencyBehavior, HelloEstimateBehavior, HelloMobileLocation, HelloPeekMessageBehavior, HelloRestrictionBehavior, Mode } from "../generated/graphql.customer.types";
1
+ import type { HelloCurrencyBehavior, HelloMobileLocation, HelloPeekMessageBehavior, HelloRestrictionBehavior, Mode } from "../generated/graphql.customer.types";
2
2
  export type HelloConfig = {
3
3
  anchorElementSelector: string;
4
4
  cartUrlPattern: string | null;
@@ -9,7 +9,6 @@ export type HelloConfig = {
9
9
  countryOverrideBehavior?: 'URL_PARAM' | 'SESSION';
10
10
  currencyBehavior: HelloCurrencyBehavior;
11
11
  currencyElementSelector: string;
12
- dutyTaxEstimationBehavior: HelloEstimateBehavior;
13
12
  excludedUrlPatterns: Array<string>;
14
13
  homepageUrlPattern: string | null;
15
14
  mobileLocation: HelloMobileLocation;
@@ -21,7 +20,6 @@ export type HelloConfig = {
21
20
  productDescriptionElementSelector: string | null;
22
21
  productDetailUrlPattern: string | null;
23
22
  productListUrlPattern: string | null;
24
- productPriceElementSelector: string | null;
25
23
  productTitleElementSelector: string | null;
26
24
  restrictionBehavior: HelloRestrictionBehavior;
27
25
  };
@@ -1 +1 @@
1
- import{l as e,a as n}from"./p-eaa335e1.js";const o="https://js.stripe.com/v3",t=/^https:\/\/js\.stripe\.com\/v3\/?(\?.*)?$/,s="loadStripe.setLoadParameters was called but an existing Stripe.js script already exists in the document; existing script parameters will be used";let i=null;const l=Promise.resolve().then((()=>{return e=null,null!==i||(i=new Promise(((i,l)=>{if("undefined"!=typeof window&&"undefined"!=typeof document)if(window.Stripe&&e&&console.warn(s),window.Stripe)i(window.Stripe);else try{let r=(()=>{const e=document.querySelectorAll(`script[src^="${o}"]`);for(let n=0;n<e.length;n++){const o=e[n];if(o&&t.test(o.src))return o}return null})();r&&e?console.warn(s):r||(r=(e=>{const t=e&&!e.advancedFraudSignals?"?advancedFraudSignals=false":"",s=document.createElement("script");s.src=`${o}${t}`;const i=document.head||document.body;return i?(i.appendChild(s),s):(n("Expected document.body not to be null. Stripe.js requires a <body> element."),null)})(e)),null==r||r.addEventListener("load",(()=>{window.Stripe?i(window.Stripe):l(new Error("Stripe.js not available"))})),null==r||r.addEventListener("error",(()=>{l(new Error("Failed to load Stripe.js"))}))}catch(e){return void l(e)}else i(null)}))),i;var e}));let r=!1;var c;l.catch((e=>{r||console.warn(e)}));const d=(()=>{if("undefined"==typeof document)return null;const e=document.querySelector('script[src*="/zonos.js"]'),{currentLoadScriptUrl:n,isWhiteListed:o}=(({loadScriptSrc:e})=>{if(!e)return{currentLoadScriptUrl:"",isForceLoadVersionDomain:!1,isWhiteListed:!1};const n=new URL(e).origin,o=["dev.elements.zonos.com",".js.zonos.com","zonos-elements-test-git","zonos-elements-git"].some((e=>n.includes(e))),t=["qa.js.zonos.com"].some((e=>n.includes(e)));return{currentLoadScriptUrl:n,isForceLoadVersionDomain:t,isWhiteListed:o}})({loadScriptSrc:null==e?void 0:e.src});return o?n:null})()||"https://v1.3.21.js.zonos.com",a="https://cdn.jsdelivr.net/npm/@zonos/elements@1.3.21",u="https://rsms.me",m="https://fonts.googleapis.com",p=/^https:\/\/rsms\.me\/inter\/inter\.css(.*)$/;class w{}c=w,w.doneInit=!1,w.debug="undefined"!=typeof window&&!!window.location.search.match(/\?.*(&*)zonosDebug=1/),w.zonosConversionTest="undefined"!=typeof window&&!!window.location.search.match(/\?.*(&*)zonosConversionTest/),w.isBigCommerce=!1,w.isNpm=!0,w.internationalHideSelector="",w.zonosQaUrl=null,w.version="v1.3.21",w.modeAlerted=!1,w.tempCartData=null,w.getCurrentTimestamp=()=>(new Date).getTime(),w.zonosController=null,w.init=async({appearance:o,checkoutSettings:t,currencyConverter:s,helloSettings:i,onCountryChange:l,storeId:r,zonosApiKey:d})=>{c.doneInit||(e(`====== ZONOS DEBUG MODE: on (${c.version}) ======`),d?(c.zonosApiKey=d,c.storeId=r,e("init zonos"),c.injectSentryScript(),c.injectZonosCdn(),c.injectZonosCss(),c.injectFonts(),c.injectController({config:{appearance:o,checkoutSettings:t,currencyConverter:s,helloSettings:i,onCountryChange:l},zonosApiKey:d}),c.doneInit=!0):n("Missing Zonos API key"))},w.displayCurrency=()=>{const e=document.querySelector("zonos-hello");e&&e.displayCurrency()},w.openHelloDialog=e=>{const n=document.querySelector("zonos-hello");n&&n.openHelloDialog(null==e||e)},w.showNotification=e=>{var n;null===(n=c.zonosController)||void 0===n||n.showNotification(e)},w.updateOrganizationName=e=>{var n;null===(n=c.zonosController)||void 0===n||n.updateOrganizationName(e)},w.disablePlaceOrderButtons=({autoEnable:e=!0,disable:n,placeOrderButtonSelector:o})=>{if(o){const t=document.querySelectorAll(o),s=e=>{e.target.getAttribute("disabled")&&(e.preventDefault(),e.stopPropagation())};t.forEach((e=>{e.getAttribute("data-zonos-checkout-attached")||(n?(e.setAttribute("disabled","true"),e.addEventListener("click",s)):(e.removeAttribute("disabled"),e.removeEventListener("click",s)))})),e&&n&&setTimeout((()=>{t.forEach((e=>{e.removeAttribute("disabled"),e.removeEventListener("click",s)}))}),5e3)}},w.injectController=({config:o,zonosApiKey:t})=>{var s;if(document.querySelector("zonos-controller"))return;if(null===(s=o.checkoutSettings)||void 0===s?void 0:s.placeOrderButtonSelector){const e=o.checkoutSettings.placeOrderButtonSelector;c.disablePlaceOrderButtons({disable:!0,placeOrderButtonSelector:e}),new MutationObserver((()=>{c.disablePlaceOrderButtons({disable:!0,placeOrderButtonSelector:e})})).observe(document.body,{childList:!0,subtree:!0})}const i=document.createElement("zonos-controller");i.config=o,i.zonosApiKey=t,i.addEventListener("stripeInitEvent",(async o=>{const{detail:t}=o;e("loading Stripe");const s=await(async(...e)=>{r=!0;const n=Date.now();return l.then((o=>((e,n,o)=>{if(null===e)return null;const t=e.apply(void 0,n);return((e,n)=>{e&&e._registerWrapper&&e._registerWrapper({name:"stripe-js",startTime:n})})(t,o),t})(o,e,n)))})(t.publishableKey);s?(window.Zonos.stripe=s,i.initCheckoutElement(s)):n("API seems to be invalid or missing. Failed to load Stripe")})),document.body.appendChild(i),c.zonosController=i,e("Zonos controller injected!")},w.injectSentryScript=()=>{const o="https://browser.sentry-cdn.com/7.88.0/bundle.tracing.min.js";if(document.querySelector(`script[src="${o}"]`))return void e("Sentry script already exists in the document","warn");const t=document.head||document.body,s=document.createElement("script");s.crossOrigin="anonymous",s.src=o,s.integrity="sha384-z/aQww1Fr6Mes0MO/2wlzQd2nXBCdDcKPXDTsMDMNPgTGRPqii3a4bzH79I+Vo8l",s.setAttribute("data-lazy","no"),s.onerror=()=>{n(`Failed to load ${s.src}`)},s.onload=()=>{var e;null===(e=window.Sentry)||void 0===e||e.init({beforeSend(e){var n,o,t,s,i,l;const r=null===(l=null===(i=null===(s=null===(t=null===(o=null===(n=e.exception)||void 0===n?void 0:n.values)||void 0===o?void 0:o[0])||void 0===t?void 0:t.stacktrace)||void 0===s?void 0:s.frames)||void 0===i?void 0:i[0])||void 0===l?void 0:l.filename,c=(null==r?void 0:r.includes("js.zonos.com"))||(null==r?void 0:r.includes("@zonos/elements")),d=window.location.href.includes("dev.elements")||window.location.href.includes("route.js.zonos.com");return c&&!d?e:null},dsn:"https://19168bd05af0e2e0e7520ad58953e4f2@o446983.ingest.sentry.io/4506400622837760",ignoreErrors:["Failed to load Stripe.js"],release:`zonos-elements@${c.version}`,tracesSampler:()=>.01})},t.appendChild(s)},w.injectScript=({fallBackDomain:o,isModule:t,scriptDomain:s,theRestUrl:i})=>{const l=`${s}/${i}`;if(document.querySelector(`script[src="${l}"]`))return void e(`Zonos script "${l}" already exists in the document`,"warn");const r=document.head||document.body,d=document.createElement("script");t?d.type="module":d.noModule=!0,d.src=l,d.crossOrigin="anonymous",d.onerror=()=>{/\/\/v\d+\./g.test(s)?(o&&c.injectScript({isModule:t,scriptDomain:o,theRestUrl:i}),n(`Failed to load ${d.src}`)):e("No need to fallback since this is not a versioned domain","warn")},r.appendChild(d)},w.getZonosUrl=()=>c.isNpm&&(()=>{if("undefined"==typeof window)return null;const n=(e=>{if(!e)return null;const n=new URL(e).searchParams.get("zonosQaUrl");return n?/[^a-zA-Z0-9-_]+/.test(n)?null:n:null})(window.location.href);if(!n)return null;if("dev-elements"===n)return"https://dev.elements.zonos.com";const o=`https://${n}.preview.js.zonos.com`;return e(`[ZONOS-WARNING] using '${o}' for loading script`,"warn"),fetch(o).then((()=>{window.sessionStorage.removeItem("zonos--checkout-session-id"),window.sessionStorage.removeItem("zonos--client-secret")})).catch((()=>{alert(`[ZONOS-WARNING] '${o}' IS NO LONGER AVAILABLE. REMOVING zonosQaUrl PARAM AND RELOADING THE PAGE`);const e=new URLSearchParams(window.location.search);e.delete("zonosQaUrl");const{pathname:n}=window.location,t=`${n}?${e.toString()}`;return window.history.replaceState(window.history.state,"",t),window.location.reload(),null})),o})()||d,w.injectZonosCdn=()=>{const n=c.getZonosUrl();c.injectScript({fallBackDomain:a,isModule:!0,scriptDomain:n,theRestUrl:"dist/zonos-elements/zonos-elements.esm.js"}),c.injectScript({fallBackDomain:a,isModule:!1,scriptDomain:n,theRestUrl:"dist/zonos-elements/zonos-elements.js"}),e("Zonos cdn script injected!")},w.injectStylesheet=({fallBackDomain:o,stylesheetDomain:t,theRestUrl:s})=>{const i=document.head||document.body,l=document.createElement("link");l.rel="preconnect",l.href=`${d}/`,i.appendChild(l);const r=document.createElement("link");r.rel="stylesheet",r.href=`${t}/${s}`,r.onerror=()=>{const i=/\/\/v\d+\./g.test(t);i?(o&&i&&c.injectStylesheet({stylesheetDomain:o,theRestUrl:s}),n(`Failed to load ${r.href}`)):e("No need to fallback since this is not a versioned domain","warn")},i.appendChild(r)},w.injectZonosCss=()=>{document.querySelector('link[rel="stylesheet"][href*="/dist/zonos-elements/zonos-elements.css"]')?e("Zonos style links already injected","warn"):(c.injectStylesheet({fallBackDomain:a,stylesheetDomain:d,theRestUrl:"dist/zonos-elements/zonos-elements.css"}),e("Zonos style css injected!"))},w.injectFonts=()=>{if((()=>{const e=document.querySelectorAll(`link[rel="stylesheet"][href^="${u}"]`);for(let n=0;n<e.length;n++){const o=e[n];if(o&&!p.test(o.href))return o}return null})())return void e("Inter font already injected","warn");const n=document.head||document.body,o=document.createElement("link");o.rel="preconnect",o.href=u,n.appendChild(o);const t=document.createElement("link");t.rel="stylesheet",t.href=`${u}/inter/inter.css`,n.appendChild(t),e("Zonos font injected!")},w.setupGoogleFont=e=>{var n;null===(n=c.zonosController)||void 0===n||n.setupGoogleFont(e)},w.injectSupportGoogleFont=n=>{var o;e(`[FONT] injecting ${n}`);const t=null===(o=n.match(/family=(.*?):/))||void 0===o?void 0:o[1],s=document.head||document.body;if(!document.querySelector(`link[rel="preconnect"][href^="${m}"]`)){const e=document.createElement("link");e.rel="preconnect",e.href=m,s.appendChild(e)}if(document.querySelector(`link[rel="stylesheet"][href="${n}"]`))return void e(`[FONT] ${t} font already injected`,"warn");const i=document.createElement("link");i.rel="stylesheet",i.href=n,s.appendChild(i),e(`[FONT] ${t} font injected!`)};export{w as Zonos}
1
+ import{l as e,a as n}from"./p-eaa335e1.js";const o="https://js.stripe.com/v3",t=/^https:\/\/js\.stripe\.com\/v3\/?(\?.*)?$/,s="loadStripe.setLoadParameters was called but an existing Stripe.js script already exists in the document; existing script parameters will be used";let i=null;const r=Promise.resolve().then((()=>{return e=null,null!==i||(i=new Promise(((i,r)=>{if("undefined"!=typeof window&&"undefined"!=typeof document)if(window.Stripe&&e&&console.warn(s),window.Stripe)i(window.Stripe);else try{let l=(()=>{const e=document.querySelectorAll(`script[src^="${o}"]`);for(let n=0;n<e.length;n++){const o=e[n];if(o&&t.test(o.src))return o}return null})();l&&e?console.warn(s):l||(l=(e=>{const t=e&&!e.advancedFraudSignals?"?advancedFraudSignals=false":"",s=document.createElement("script");s.src=`${o}${t}`;const i=document.head||document.body;return i?(i.appendChild(s),s):(n("Expected document.body not to be null. Stripe.js requires a <body> element."),null)})(e)),null==l||l.addEventListener("load",(()=>{window.Stripe?i(window.Stripe):r(new Error("Stripe.js not available"))})),null==l||l.addEventListener("error",(()=>{r(new Error("Failed to load Stripe.js"))}))}catch(e){return void r(e)}else i(null)}))),i;var e}));let l=!1;var c;r.catch((e=>{l||console.warn(e)}));const d=(()=>{if("undefined"==typeof document)return null;const e=document.querySelector('script[src*="/zonos.js"]'),{currentLoadScriptUrl:n,isWhiteListed:o}=(({loadScriptSrc:e})=>{if(!e)return{currentLoadScriptUrl:"",isForceLoadVersionDomain:!1,isWhiteListed:!1};const n=new URL(e).origin,o=["dev.elements.zonos.com",".js.zonos.com","zonos-elements-test-git","zonos-elements-git"].some((e=>n.includes(e))),t=["qa.js.zonos.com"].some((e=>n.includes(e)));return{currentLoadScriptUrl:n,isForceLoadVersionDomain:t,isWhiteListed:o}})({loadScriptSrc:null==e?void 0:e.src});return o?n:null})()||"https://v1.3.23.js.zonos.com",a="https://cdn.jsdelivr.net/npm/@zonos/elements@1.3.23",u="https://rsms.me",m="https://fonts.googleapis.com",p=/^https:\/\/rsms\.me\/inter\/inter\.css(.*)$/;class w{}c=w,w.doneInit=!1,w.debug="undefined"!=typeof window&&!!window.location.search.match(/\?.*(&*)zonosDebug=1/),w.zonosConversionTest="undefined"!=typeof window&&!!window.location.search.match(/\?.*(&*)zonosConversionTest/),w.isBigCommerce=!1,w.isNpm=!0,w.internationalHideSelector="",w.zonosQaUrl=null,w.version="v1.3.23",w.modeAlerted=!1,w.tempCartData=null,w.getCurrentTimestamp=()=>(new Date).getTime(),w.zonosController=null,w.init=async({appearance:o,checkoutSettings:t,currencyConverter:s,helloSettings:i,onCountryChange:r,overrideCurrencyFormat:l,storeId:d,zonosApiKey:a})=>{c.doneInit||(e(`====== ZONOS DEBUG MODE: on (${c.version}) ======`),a?(c.zonosApiKey=a,c.storeId=d,e("init zonos"),c.injectSentryScript(),c.injectZonosCdn(),c.injectZonosCss(),c.injectFonts(),c.injectController({config:{appearance:o,checkoutSettings:t,currencyConverter:s,helloSettings:i,onCountryChange:r,overrideCurrencyFormat:l},zonosApiKey:a}),c.doneInit=!0):n("Missing Zonos API key"))},w.displayCurrency=()=>{const e=document.querySelector("zonos-hello");e&&e.displayCurrency()},w.openHelloDialog=e=>{const n=document.querySelector("zonos-hello");n&&n.openHelloDialog(null==e||e)},w.showNotification=e=>{var n;null===(n=c.zonosController)||void 0===n||n.showNotification(e)},w.updateOrganizationName=e=>{var n;null===(n=c.zonosController)||void 0===n||n.updateOrganizationName(e)},w.disablePlaceOrderButtons=({autoEnable:e=!0,disable:n,placeOrderButtonSelector:o})=>{if(o){const t=document.querySelectorAll(o),s=e=>{e.target.getAttribute("disabled")&&(e.preventDefault(),e.stopPropagation())};t.forEach((e=>{e.getAttribute("data-zonos-checkout-attached")||(n?(e.setAttribute("disabled","true"),e.addEventListener("click",s)):(e.removeAttribute("disabled"),e.removeEventListener("click",s)))})),e&&n&&setTimeout((()=>{t.forEach((e=>{e.removeAttribute("disabled"),e.removeEventListener("click",s)}))}),5e3)}},w.injectController=({config:o,zonosApiKey:t})=>{var s;if(document.querySelector("zonos-controller"))return;if(null===(s=o.checkoutSettings)||void 0===s?void 0:s.placeOrderButtonSelector){const e=o.checkoutSettings.placeOrderButtonSelector;c.disablePlaceOrderButtons({disable:!0,placeOrderButtonSelector:e}),new MutationObserver((()=>{c.disablePlaceOrderButtons({disable:!0,placeOrderButtonSelector:e})})).observe(document.body,{childList:!0,subtree:!0})}const i=document.createElement("zonos-controller");i.config=o,i.zonosApiKey=t,i.addEventListener("stripeInitEvent",(async o=>{const{detail:t}=o;e("loading Stripe");const s=await(async(...e)=>{l=!0;const n=Date.now();return r.then((o=>((e,n,o)=>{if(null===e)return null;const t=e.apply(void 0,n);return((e,n)=>{e&&e._registerWrapper&&e._registerWrapper({name:"stripe-js",startTime:n})})(t,o),t})(o,e,n)))})(t.publishableKey);s?(window.Zonos.stripe=s,i.initCheckoutElement(s)):n("API seems to be invalid or missing. Failed to load Stripe")})),document.body.appendChild(i),c.zonosController=i,e("Zonos controller injected!")},w.injectSentryScript=()=>{const o="https://browser.sentry-cdn.com/7.88.0/bundle.tracing.min.js";if(document.querySelector(`script[src="${o}"]`))return void e("Sentry script already exists in the document","warn");const t=document.head||document.body,s=document.createElement("script");s.crossOrigin="anonymous",s.src=o,s.integrity="sha384-z/aQww1Fr6Mes0MO/2wlzQd2nXBCdDcKPXDTsMDMNPgTGRPqii3a4bzH79I+Vo8l",s.setAttribute("data-lazy","no"),s.onerror=()=>{n(`Failed to load ${s.src}`)},s.onload=()=>{var e;null===(e=window.Sentry)||void 0===e||e.init({beforeSend(e){var n,o,t,s,i,r;const l=null===(r=null===(i=null===(s=null===(t=null===(o=null===(n=e.exception)||void 0===n?void 0:n.values)||void 0===o?void 0:o[0])||void 0===t?void 0:t.stacktrace)||void 0===s?void 0:s.frames)||void 0===i?void 0:i[0])||void 0===r?void 0:r.filename,c=(null==l?void 0:l.includes("js.zonos.com"))||(null==l?void 0:l.includes("@zonos/elements")),d=window.location.href.includes("dev.elements")||window.location.href.includes("route.js.zonos.com");return c&&!d?e:null},dsn:"https://19168bd05af0e2e0e7520ad58953e4f2@o446983.ingest.sentry.io/4506400622837760",ignoreErrors:["Failed to load Stripe.js"],release:`zonos-elements@${c.version}`,tracesSampler:()=>.01})},t.appendChild(s)},w.injectScript=({fallBackDomain:o,isModule:t,scriptDomain:s,theRestUrl:i})=>{const r=`${s}/${i}`;if(document.querySelector(`script[src="${r}"]`))return void e(`Zonos script "${r}" already exists in the document`,"warn");const l=document.head||document.body,d=document.createElement("script");t?d.type="module":d.noModule=!0,d.src=r,d.crossOrigin="anonymous",d.onerror=()=>{/\/\/v\d+\./g.test(s)?(o&&c.injectScript({isModule:t,scriptDomain:o,theRestUrl:i}),n(`Failed to load ${d.src}`)):e("No need to fallback since this is not a versioned domain","warn")},l.appendChild(d)},w.getZonosUrl=()=>c.isNpm&&(()=>{if("undefined"==typeof window)return null;const n=(e=>{if(!e)return null;const n=new URL(e).searchParams.get("zonosQaUrl");return n?/[^a-zA-Z0-9-_]+/.test(n)?null:n:null})(window.location.href);if(!n)return null;if("dev-elements"===n)return"https://dev.elements.zonos.com";const o=`https://${n}.preview.js.zonos.com`;return e(`[ZONOS-WARNING] using '${o}' for loading script`,"warn"),fetch(o).then((()=>{window.sessionStorage.removeItem("zonos--checkout-session-id"),window.sessionStorage.removeItem("zonos--client-secret")})).catch((()=>{alert(`[ZONOS-WARNING] '${o}' IS NO LONGER AVAILABLE. REMOVING zonosQaUrl PARAM AND RELOADING THE PAGE`);const e=new URLSearchParams(window.location.search);e.delete("zonosQaUrl");const{pathname:n}=window.location,t=`${n}?${e.toString()}`;return window.history.replaceState(window.history.state,"",t),window.location.reload(),null})),o})()||d,w.injectZonosCdn=()=>{const n=c.getZonosUrl();c.injectScript({fallBackDomain:a,isModule:!0,scriptDomain:n,theRestUrl:"dist/zonos-elements/zonos-elements.esm.js"}),c.injectScript({fallBackDomain:a,isModule:!1,scriptDomain:n,theRestUrl:"dist/zonos-elements/zonos-elements.js"}),e("Zonos cdn script injected!")},w.injectStylesheet=({fallBackDomain:o,stylesheetDomain:t,theRestUrl:s})=>{const i=document.head||document.body,r=document.createElement("link");r.rel="preconnect",r.href=`${d}/`,i.appendChild(r);const l=document.createElement("link");l.rel="stylesheet",l.href=`${t}/${s}`,l.onerror=()=>{const i=/\/\/v\d+\./g.test(t);i?(o&&i&&c.injectStylesheet({stylesheetDomain:o,theRestUrl:s}),n(`Failed to load ${l.href}`)):e("No need to fallback since this is not a versioned domain","warn")},i.appendChild(l)},w.injectZonosCss=()=>{document.querySelector('link[rel="stylesheet"][href*="/dist/zonos-elements/zonos-elements.css"]')?e("Zonos style links already injected","warn"):(c.injectStylesheet({fallBackDomain:a,stylesheetDomain:d,theRestUrl:"dist/zonos-elements/zonos-elements.css"}),e("Zonos style css injected!"))},w.injectFonts=()=>{if((()=>{const e=document.querySelectorAll(`link[rel="stylesheet"][href^="${u}"]`);for(let n=0;n<e.length;n++){const o=e[n];if(o&&!p.test(o.href))return o}return null})())return void e("Inter font already injected","warn");const n=document.head||document.body,o=document.createElement("link");o.rel="preconnect",o.href=u,n.appendChild(o);const t=document.createElement("link");t.rel="stylesheet",t.href=`${u}/inter/inter.css`,n.appendChild(t),e("Zonos font injected!")},w.setupGoogleFont=e=>{var n;null===(n=c.zonosController)||void 0===n||n.setupGoogleFont(e)},w.injectSupportGoogleFont=n=>{var o;e(`[FONT] injecting ${n}`);const t=null===(o=n.match(/family=(.*?):/))||void 0===o?void 0:o[1],s=document.head||document.body;if(!document.querySelector(`link[rel="preconnect"][href^="${m}"]`)){const e=document.createElement("link");e.rel="preconnect",e.href=m,s.appendChild(e)}if(document.querySelector(`link[rel="stylesheet"][href="${n}"]`))return void e(`[FONT] ${t} font already injected`,"warn");const i=document.createElement("link");i.rel="stylesheet",i.href=n,s.appendChild(i),e(`[FONT] ${t} font injected!`)};export{w as Zonos}
@@ -1 +1 @@
1
- System.register(["./p-d99232c5.system.js","./p-f0afca6c.system.js","./p-23e7c655.system.js"],(function(t){"use strict";var s,e,o,i,n,a;return{setters:[function(t){s=t.r;e=t.h;o=t.a;i=t.H},function(t){n=t.d},function(t){a=t.c}],execute:function(){var r=":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{display:-ms-inline-flexbox;display:inline-flex}:host img{-webkit-filter:var(--filter-color);filter:var(--filter-color);width:var(--width)}";var h=r;var f=t("zonos_logo",function(){function t(t){s(this,t);this.theme="LIGHT";this.width="auto"}t.prototype.render=function(){var t=this.theme==="DARK"?"invert(100%) sepia(100%) saturate(0%) hue-rotate(288deg) brightness(102%) contrast(102%)":"whiteinvert(0%) sepia(100%) saturate(32%) hue-rotate(92deg) brightness(107%) contrast(107%)";return e(i,{key:"c790c72d413c586a873c5046a1aee797c1f0af36",class:a(["zonos--elements zonos--logo"]),style:{"--filter-color":t,"--font-family":n(),"--width":this.width}},e("img",{key:"68efd2097a0d8488308de0b50bef30cc67deb6fa",alt:"Zonos Logo",src:o("./assets/ZonosLogo.png")}))};Object.defineProperty(t,"assetsDirs",{get:function(){return["assets"]},enumerable:false,configurable:true});return t}());f.style=h}}}));
1
+ System.register(["./p-d99232c5.system.js","./p-be14323b.system.js","./p-23e7c655.system.js"],(function(t){"use strict";var s,e,o,i,n,r;return{setters:[function(t){s=t.r;e=t.h;o=t.a;i=t.H},function(t){n=t.d},function(t){r=t.c}],execute:function(){var a=":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{display:-ms-inline-flexbox;display:inline-flex}:host img{-webkit-filter:var(--filter-color);filter:var(--filter-color);width:var(--width)}";var h=a;var f=t("zonos_logo",function(){function t(t){s(this,t);this.theme="LIGHT";this.width="auto"}t.prototype.render=function(){var t=this.theme==="DARK"?"invert(100%) sepia(100%) saturate(0%) hue-rotate(288deg) brightness(102%) contrast(102%)":"whiteinvert(0%) sepia(100%) saturate(32%) hue-rotate(92deg) brightness(107%) contrast(107%)";return e(i,{key:"c790c72d413c586a873c5046a1aee797c1f0af36",class:r(["zonos--elements zonos--logo"]),style:{"--filter-color":t,"--font-family":n(),"--width":this.width}},e("img",{key:"68efd2097a0d8488308de0b50bef30cc67deb6fa",alt:"Zonos Logo",src:o("./assets/ZonosLogo.png")}))};Object.defineProperty(t,"assetsDirs",{get:function(){return["assets"]},enumerable:false,configurable:true});return t}());f.style=h}}}));
@@ -0,0 +1 @@
1
+ var __awaiter=this&&this.__awaiter||function(n,t,e,o){function r(n){return n instanceof e?n:new e((function(t){t(n)}))}return new(e||(e=Promise))((function(e,i){function u(n){try{a(o.next(n))}catch(n){i(n)}}function c(n){try{a(o["throw"](n))}catch(n){i(n)}}function a(n){n.done?e(n.value):r(n.value).then(u,c)}a((o=o.apply(n,t||[])).next())}))};var __generator=this&&this.__generator||function(n,t){var e={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},o,r,i,u;return u={next:c(0),throw:c(1),return:c(2)},typeof Symbol==="function"&&(u[Symbol.iterator]=function(){return this}),u;function c(n){return function(t){return a([n,t])}}function a(c){if(o)throw new TypeError("Generator is already executing.");while(u&&(u=0,c[0]&&(e=0)),e)try{if(o=1,r&&(i=c[0]&2?r["return"]:c[0]?r["throw"]||((i=r["return"])&&i.call(r),0):r.next)&&!(i=i.call(r,c[1])).done)return i;if(r=0,i)c=[c[0]&2,i.value];switch(c[0]){case 0:case 1:i=c;break;case 4:e.label++;return{value:c[1],done:false};case 5:e.label++;r=c[1];c=[0];continue;case 7:c=e.ops.pop();e.trys.pop();continue;default:if(!(i=e.trys,i=i.length>0&&i[i.length-1])&&(c[0]===6||c[0]===2)){e=0;continue}if(c[0]===3&&(!i||c[1]>i[0]&&c[1]<i[3])){e.label=c[1];break}if(c[0]===6&&e.label<i[1]){e.label=i[1];i=c;break}if(i&&e.label<i[2]){e.label=i[2];e.ops.push(c);break}if(i[2])e.ops.pop();e.trys.pop();continue}c=t.call(n,e)}catch(n){c=[6,n];r=0}finally{o=i=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:true}}};System.register(["./p-9c3a036e.system.js","./p-be14323b.system.js","./p-63db40b9.system.js"],(function(n){"use strict";var t,e,o,r,i;return{setters:[function(n){t=n.r;e=n.d;o=n.l},function(n){r=n.z},function(n){i=n.l}],execute:function(){var u=this;var c=n("t",(function(n,i){return __awaiter(u,void 0,void 0,(function(){var u,c,a,s,f,d,w,v;return __generator(this,(function(l){switch(l.label){case 0:a=window.location.href.includes("zonos.com")||window.location.href.includes("checkout.iglobalstores.com")||!!((u=window.Zonos)===null||u===void 0?void 0:u.zonosQaUrl)||!!((c=window.Zonos)===null||c===void 0?void 0:c.debug);if(a&&!window.Zonos.zonosConversionTest){return[2]}s="".concat("https://v1.route.js.zonos.com","/api/zonos-elements/track-conversion-event");f=o.selectedCountryCode;d=r.organizationId;w=e.checkoutSessionId;if(!w){return[2]}v={checkoutSessionId:w,countryCode:f,eventName:n,metadata:i,organizationId:d};return[4,t(s,{body:v,method:"POST"})];case 1:l.sent();return[2]}}))}))}));var a=n("c",(function(n,t){return new CustomEvent(n,{detail:t})}));var s=n("s",(function(n){return __awaiter(u,[n],void 0,(function(n){var e,o;var r=n.endpoint,i=n.errors,u=n.metadata;return __generator(this,(function(n){e="userAgentData"in window.navigator?window.navigator.userAgentData:null;o={endpoint:r,errors:i,metadata:Object.assign({href:window.location.href,userAgent:e&&e.brands.length>0?e:window.navigator.userAgent},u)};void t("".concat("https://v1.route.js.zonos.com","/api/zonos-elements/log-error"),{body:o,method:"POST"});return[2]}))}))}));var f=n("a",(function(n){var t=r.checkoutSettings.analyticsProviders.find((function(n){return n.type==="GOOGLE_ANALYTICS"}));if(!t||(t===null||t===void 0?void 0:t.status)==="DISABLED"){return}if(typeof window.gtag==="function"){i("Zonos submits gtag event","log",n);window.gtag("event",n,{})}}))}}}));
@@ -1 +1 @@
1
- import{r as o,d as n,l as t}from"./p-b13e630b.js";import{z as e}from"./p-eb6ddb2f.js";import{l as s}from"./p-eaa335e1.js";const a=async(s,a)=>{var i,d;if((window.location.href.includes("zonos.com")||window.location.href.includes("checkout.iglobalstores.com")||(null===(i=window.Zonos)||void 0===i?void 0:i.zonosQaUrl)||(null===(d=window.Zonos)||void 0===d?void 0:d.debug))&&!window.Zonos.zonosConversionTest)return;const r=n.checkoutSessionId;if(!r)return;const w={checkoutSessionId:r,countryCode:t.selectedCountryCode,eventName:s,metadata:a,organizationId:e.organizationId};await o("https://v1.route.js.zonos.com/api/zonos-elements/track-conversion-event",{body:w,method:"POST"})},i=(o,n)=>new CustomEvent(o,{detail:n}),d=async({endpoint:n,errors:t,metadata:e})=>{const s="userAgentData"in window.navigator?window.navigator.userAgentData:null,a={endpoint:n,errors:t,metadata:Object.assign({href:window.location.href,userAgent:s&&s.brands.length>0?s:window.navigator.userAgent},e)};o("https://v1.route.js.zonos.com/api/zonos-elements/log-error",{body:a,method:"POST"})},r=o=>{const n=e.checkoutSettings.analyticsProviders.find((o=>"GOOGLE_ANALYTICS"===o.type));n&&"DISABLED"!==(null==n?void 0:n.status)&&"function"==typeof window.gtag&&(s("Zonos submits gtag event","log",o),window.gtag("event",o,{}))};export{r as a,i as c,d as s,a as t}
1
+ import{r as o,d as n,l as t}from"./p-440ac320.js";import{z as e}from"./p-c53cef11.js";import{l as s}from"./p-eaa335e1.js";const a=async(s,a)=>{var i,r;if((window.location.href.includes("zonos.com")||window.location.href.includes("checkout.iglobalstores.com")||(null===(i=window.Zonos)||void 0===i?void 0:i.zonosQaUrl)||(null===(r=window.Zonos)||void 0===r?void 0:r.debug))&&!window.Zonos.zonosConversionTest)return;const d=n.checkoutSessionId;if(!d)return;const c={checkoutSessionId:d,countryCode:t.selectedCountryCode,eventName:s,metadata:a,organizationId:e.organizationId};await o("https://v1.route.js.zonos.com/api/zonos-elements/track-conversion-event",{body:c,method:"POST"})},i=(o,n)=>new CustomEvent(o,{detail:n}),r=async({endpoint:n,errors:t,metadata:e})=>{const s="userAgentData"in window.navigator?window.navigator.userAgentData:null,a={endpoint:n,errors:t,metadata:Object.assign({href:window.location.href,userAgent:s&&s.brands.length>0?s:window.navigator.userAgent},e)};o("https://v1.route.js.zonos.com/api/zonos-elements/log-error",{body:a,method:"POST"})},d=o=>{const n=e.checkoutSettings.analyticsProviders.find((o=>"GOOGLE_ANALYTICS"===o.type));n&&"DISABLED"!==(null==n?void 0:n.status)&&"function"==typeof window.gtag&&(s("Zonos submits gtag event","log",o),window.gtag("event",o,{}))};export{d as a,i as c,r as s,a as t}
@@ -1 +1 @@
1
- System.register(["./p-d99232c5.system.js","./p-f0afca6c.system.js","./p-23e7c655.system.js","./p-4a107b6f.system.js"],(function(e){"use strict";var t,s,o,n,i,a;return{setters:[function(e){t=e.r;s=e.h;o=e.H},function(e){n=e.d},function(e){i=e.c},function(e){a=e.i}],execute:function(){var h={pageHeader:{label:"Page Header (3XL) · 34px (2.125rem)",size:"3xl",tag:"h2",weight:900},secondaryPageHeader:{label:'Secondary Page Header (3XL) • 34px, 500 "Medium"',size:"3xl",tag:"h2",weight:500},header:{label:"Header (2XL) · 28px (1.75rem)",size:"2xl",tag:"h3",weight:700},descriptionHeader:{label:"Description Header (2XL) · 28px (1.75rem)",size:"2xl",tag:"h3",weight:700},title:{label:"Title (XL) • 22px (1.375rem)",size:"xl",tag:"h4",weight:600},boldSubheader:{label:"Bold Subheader (L) • 18px (1.125rem)",size:"l",tag:"h5",weight:700},semiBoldSubheader:{label:"Semi Bold Subheader (L / H4) • 18px (1.125rem)",size:"l",tag:"h5",weight:600},subheader:{label:"Subheader (L) • 18px (1.125rem)",size:"l",tag:"h5",weight:500},boldLabel:{label:"Bold Label (Base) • 14px (.875rem)",size:"base",tag:"span",weight:700},semiBoldLabel:{label:"Semi Bold Label (Base) • 14px (.875rem)",size:"base",tag:"span",weight:600},label:{label:"Label (Base) • 14px (.875rem)",size:"base",tag:"span",weight:500},body:{label:"Body (Base) • 14px (.875rem)",size:"base",tag:"span",weight:400},smallHeader:{label:"Small header (S) • 12px (.75rem)",size:"s",tag:"span",weight:600},caption:{label:"Caption (S) • 12px (.75rem)",size:"s",tag:"span",weight:400},hintText:{label:"Hint text (XS) • 10px (.625rem)",size:"xs",tag:"span",weight:400}};var l=":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--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{color:var(--color)}:host(.zonos--text-size-3xl)>*,:host(.zonos--text-size-3xl){font-size:var(--zonos-elements-font-size-3xl)}:host(.zonos--text-size-2xl)>*,:host(.zonos--text-size-2xl){font-size:var(--zonos-elements-font-size-2xl)}:host(.zonos--text-size-xl)>*,:host(.zonos--text-size-xl){font-size:var(--zonos-elements-font-size-xl)}:host(.zonos--text-size-l)>*,:host(.zonos--text-size-l){font-size:var(--zonos-elements-font-size-l)}:host(.zonos--text-size-base)>*,:host(.zonos--text-size-base){font-size:var(--zonos-elements-font-size-base)}:host(.zonos--text-size-s)>*,:host(.zonos--text-size-s){font-size:var(--zonos-elements-font-size-s)}:host(.zonos--text-size-xs)>*,:host(.zonos--text-size-xs){font-size:var(--zonos-elements-font-size-xs)}:host(.zonos--text-weight-900)>*,:host(.zonos--text-weight-900){font-weight:900}:host(.zonos--text-weight-700)>*,:host(.zonos--text-weight-700){font-weight:700}:host(.zonos--text-weight-600)>*,:host(.zonos--text-weight-600){font-weight:600}:host(.zonos--text-weight-500)>*,:host(.zonos--text-weight-500){font-weight:500}:host(.zonos--text-weight-400)>*,:host(.zonos--text-weight-400){font-weight:400}";var r=l;var z=e("zonos_text",function(){function e(e){t(this,e);this.textColor="gray-1200";this.size=undefined;this.type="body";this.weight=undefined;this.content=undefined;this.ready=false}e.prototype.componentDidRender=function(){var e=this;setTimeout((function(){e.ready=true}),100)};e.prototype.render=function(){var e=h.body,t=e.size,l=e.tag,r=e.weight;var z=h[this.type],x=z.size,g=z.tag,f=z.weight;var m=this.size||x||t;var u=this.weight||f||r;var d=g||l;var b=a(this.textColor)?"var(--zonos-elements-".concat(this.textColor,")"):this.textColor;var p=function(){switch(d){case"h2":return s("h2",null,s("slot",null));case"h3":return s("h3",null,s("slot",null));case"h4":return s("h4",null,s("slot",null));case"h5":return s("h5",null,s("slot",null));case"span":default:return s("span",null,s("slot",null))}};return s(o,{class:i(["zonos--elements","zonos--text-size-".concat(m),"zonos--text-weight-".concat(u)]),style:{"--color":b,"--font-family":n()}},p())};return e}());z.style=r}}}));
1
+ System.register(["./p-d99232c5.system.js","./p-be14323b.system.js","./p-23e7c655.system.js","./p-4a107b6f.system.js"],(function(e){"use strict";var t,s,o,n,i,a;return{setters:[function(e){t=e.r;s=e.h;o=e.H},function(e){n=e.d},function(e){i=e.c},function(e){a=e.i}],execute:function(){var l={pageHeader:{label:"Page Header (3XL) · 34px (2.125rem)",size:"3xl",tag:"h2",weight:900},secondaryPageHeader:{label:'Secondary Page Header (3XL) • 34px, 500 "Medium"',size:"3xl",tag:"h2",weight:500},header:{label:"Header (2XL) · 28px (1.75rem)",size:"2xl",tag:"h3",weight:700},descriptionHeader:{label:"Description Header (2XL) · 28px (1.75rem)",size:"2xl",tag:"h3",weight:700},title:{label:"Title (XL) • 22px (1.375rem)",size:"xl",tag:"h4",weight:600},boldSubheader:{label:"Bold Subheader (L) • 18px (1.125rem)",size:"l",tag:"h5",weight:700},semiBoldSubheader:{label:"Semi Bold Subheader (L / H4) • 18px (1.125rem)",size:"l",tag:"h5",weight:600},subheader:{label:"Subheader (L) • 18px (1.125rem)",size:"l",tag:"h5",weight:500},boldLabel:{label:"Bold Label (Base) • 14px (.875rem)",size:"base",tag:"span",weight:700},semiBoldLabel:{label:"Semi Bold Label (Base) • 14px (.875rem)",size:"base",tag:"span",weight:600},label:{label:"Label (Base) • 14px (.875rem)",size:"base",tag:"span",weight:500},body:{label:"Body (Base) • 14px (.875rem)",size:"base",tag:"span",weight:400},smallHeader:{label:"Small header (S) • 12px (.75rem)",size:"s",tag:"span",weight:600},caption:{label:"Caption (S) • 12px (.75rem)",size:"s",tag:"span",weight:400},hintText:{label:"Hint text (XS) • 10px (.625rem)",size:"xs",tag:"span",weight:400}};var h=":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--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{color:var(--color)}:host(.zonos--text-size-3xl)>*,:host(.zonos--text-size-3xl){font-size:var(--zonos-elements-font-size-3xl)}:host(.zonos--text-size-2xl)>*,:host(.zonos--text-size-2xl){font-size:var(--zonos-elements-font-size-2xl)}:host(.zonos--text-size-xl)>*,:host(.zonos--text-size-xl){font-size:var(--zonos-elements-font-size-xl)}:host(.zonos--text-size-l)>*,:host(.zonos--text-size-l){font-size:var(--zonos-elements-font-size-l)}:host(.zonos--text-size-base)>*,:host(.zonos--text-size-base){font-size:var(--zonos-elements-font-size-base)}:host(.zonos--text-size-s)>*,:host(.zonos--text-size-s){font-size:var(--zonos-elements-font-size-s)}:host(.zonos--text-size-xs)>*,:host(.zonos--text-size-xs){font-size:var(--zonos-elements-font-size-xs)}:host(.zonos--text-weight-900)>*,:host(.zonos--text-weight-900){font-weight:900}:host(.zonos--text-weight-700)>*,:host(.zonos--text-weight-700){font-weight:700}:host(.zonos--text-weight-600)>*,:host(.zonos--text-weight-600){font-weight:600}:host(.zonos--text-weight-500)>*,:host(.zonos--text-weight-500){font-weight:500}:host(.zonos--text-weight-400)>*,:host(.zonos--text-weight-400){font-weight:400}";var r=h;var z=e("zonos_text",function(){function e(e){t(this,e);this.textColor="gray-1200";this.size=undefined;this.type="body";this.weight=undefined;this.ready=false}e.prototype.componentDidRender=function(){var e=this;setTimeout((function(){e.ready=true}),100)};e.prototype.render=function(){var e=l.body,t=e.size,h=e.tag,r=e.weight;var z=l[this.type],x=z.size,g=z.tag,f=z.weight;var m=this.size||x||t;var u=this.weight||f||r;var b=g||h;var d=a(this.textColor)?"var(--zonos-elements-".concat(this.textColor,")"):this.textColor;var p=function(){switch(b){case"h2":return s("h2",null,s("slot",null));case"h3":return s("h3",null,s("slot",null));case"h4":return s("h4",null,s("slot",null));case"h5":return s("h5",null,s("slot",null));case"span":default:return s("span",null,s("slot",null))}};return s(o,{class:i(["zonos--elements","zonos--text-size-".concat(m),"zonos--text-weight-".concat(u)]),style:{"--color":d,"--font-family":n()}},p())};return e}());z.style=r}}}));
@@ -0,0 +1 @@
1
+ import{r as o,h as e,H as t}from"./p-ce347974.js";import{_ as s,e as i,i as n,f as r,z as l,g as a,m as h}from"./p-c53cef11.js";import{r as d,l as m,u as c,t as p,w as f,x as g,y as u,z,A as w,B as b}from"./p-440ac320.js";import{c as v}from"./p-b4b7f705.js";import{a as x,l as y}from"./p-eaa335e1.js";import{g as k}from"./p-5883217a.js";import"./p-a5e9d372.js";import"./p-bf9dca26.js";var T=s,E=/\s/,L=/^\s+/,C=i,D=n,j=function(o){return o?o.slice(0,function(o){for(var e=o.length;e--&&E.test(o.charAt(e)););return e}(o)+1).replace(L,""):o},S=r,O=/^[-+]0x[0-9a-f]+$/i,I=/^0b[01]+$/i,R=/^0o[0-7]+$/i,X=parseInt,A=r,B=function(){return T.Date.now()},N=function(o){if("number"==typeof o)return o;if(function(o){return"symbol"==typeof o||D(o)&&"[object Symbol]"==C(o)}(o))return NaN;if(S(o)){var e="function"==typeof o.valueOf?o.valueOf():o;o=S(e)?e+"":e}if("string"!=typeof o)return 0===o?o:+o;o=j(o);var t=I.test(o);return t||R.test(o)?X(o.slice(2),t?2:8):O.test(o)?NaN:+o},H=Math.max,M=Math.min,P=function(o,e,t){var s,i,n,r,l,a,h=0,d=!1,m=!1,c=!0;if("function"!=typeof o)throw new TypeError("Expected a function");function p(e){var t=s,n=i;return s=i=void 0,h=e,r=o.apply(n,t)}function f(o){var t=o-a;return void 0===a||t>=e||t<0||m&&o-h>=n}function g(){var o=B();if(f(o))return u(o);l=setTimeout(g,function(o){var t=e-(o-a);return m?M(t,n-(o-h)):t}(o))}function u(o){return l=void 0,c&&s?p(o):(s=i=void 0,r)}function z(){var o=B(),t=f(o);if(s=arguments,i=this,a=o,t){if(void 0===l)return function(o){return h=o,l=setTimeout(g,e),d?p(o):r}(a);if(m)return clearTimeout(l),l=setTimeout(g,e),p(a)}return void 0===l&&(l=setTimeout(g,e)),r}return e=N(e)||0,A(t)&&(d=!!t.leading,n=(m="maxWait"in t)?H(N(t.maxWait)||0,e):n,c="trailing"in t?!!t.trailing:c),z.cancel=function(){void 0!==l&&clearTimeout(l),h=0,s=a=i=l=void 0},z.flush=function(){return void 0===l?r:u(B())},z};const F=()=>{var o,e;const{productAddToCartElementSelector:t,productDescriptionElementSelector:s,productTitleElementSelector:i,restrictionBehavior:n}=l.helloSettings;i&&s||x("Hello Could not check item restrictions - must provide title and description selectors.");const r=i&&c(i)&&document.querySelectorAll(i)||[],a=s&&c(s)&&document.querySelectorAll(s)||[];if(r.length!==a.length)return x("Hello Could not check item restrictions - Title and description selectors do not match"),[];const h="RESTRICT_AND_BLOCK"===n,d=h&&t&&c(t)&&document.querySelectorAll(t)||[];h&&d.length!==a.length&&x('Hello could not disable "Add to cart" buttons - Title and add to cart selectors do not match');const m=[];for(let t=0;t<r.length;t++){const s=r[t],i=a[t];if(s&&i){const n={cartButtonNode:d[t]||null,description:(null===(o=i.textContent)||void 0===o?void 0:o.trim())||"",title:(null===(e=s.textContent)||void 0===e?void 0:e.trim())||""};m.push(n)}}return m},U=class{constructor(e){o(this,e),this.getHelloPeekMessage=o=>{if(("productDetail"===l.currentHelloPage||"productList"===l.currentHelloPage)&&this.allRestrictedItems.length){const o=p("click to learn more");return`${p("productDetail"===l.currentHelloPage?"Restricted item":"Restricted items found")} - ${o}`}switch(l.currentHelloPage){case"cart":return p("Prepay duties and taxes at checkout");case"productList":case"productDetail":return p("See duty and tax thresholds");default:return p("Welcome to [storeName]!",{storeName:o})}},this.enableShowPeekMessage=()=>{this.peekMessage&&(this.showPeekMessage=!0)},this.getNewItemRestrictions=async o=>"productDetail"!==l.currentHelloPage&&"productList"!==l.currentHelloPage||"DISABLED"===l.helloSettings.restrictionBehavior?[]:await(async o=>{if(!o.length)return[];const{selectedCountryCode:e}=m;if(!e)return x("Hello Could not check item restrictions - No country code selected"),[];const t=o.map((o=>({description:o.description,name:o.title})));return(await(async({items:o,shipFrom:e,shipTo:t})=>{var s;const i={items:o,shipFrom:e,shipTo:t},{errors:n,json:r}=await d("https://v1.route.js.zonos.com/api/zonos-elements/check-item-restrictions",{body:i,method:"POST"});return n.length||!r?(x(`Error fetching item restrictions: ${null===(s=n.find(Boolean))||void 0===s?void 0:s.message}`),[]):r.filter(Boolean)})({items:t,shipFrom:"AD",shipTo:e})).map((o=>{var e;const s=(null===(e=t.filter((e=>e.description===o.itemDescription)).find(Boolean))||void 0===e?void 0:e.name)||"";return Object.assign(Object.assign({},o),{name:s})}))})(o),this.triggerShowPeekMessage=()=>{this.peekMessage=this.getHelloPeekMessage(l.organizationName);const{peekMessageBehavior:o,peekMessageDelay:e}=l.helloSettings;"ENABLED"===o&&setTimeout((()=>{this.enableShowPeekMessage(),this.allRestrictedItems.some((o=>this.productsOnPage.some((e=>e.description===o.itemDescription))))||setTimeout((()=>{this.showPeekMessage=!1}),3e3)}),1e3*e)},this.disableAddToCartButtons=()=>{this.productsOnPage.length&&this.productsOnPage.forEach((o=>{var e,t;this.allRestrictedItems.some((e=>e.itemDescription===o.description))?null===(e=o.cartButtonNode)||void 0===e||e.setAttribute("disabled","disabled"):null===(t=o.cartButtonNode)||void 0===t||t.removeAttribute("disabled")}))},this.handleItemRestrictions=async()=>{this.productsOnPage=F();const o=this.productsOnPage.filter((o=>!this.allFoundProducts.some((e=>e.title===o.title)))),e=await this.getNewItemRestrictions(o);this.allRestrictedItems.push(...e),this.allFoundProducts.push(...o),this.disableAddToCartButtons()},this.reloadHelloData=async()=>{await this.handleItemRestrictions(),this.triggerShowPeekMessage()},this.handleProductCountChange=P((()=>{const{productTitleElementSelector:o}=l.helloSettings;if(o){const o=F();if(this.allFoundProducts.length!==o.length&&window.location.href===this.initialUrl){if(!this.allFoundProducts.length)return;this.reloadHelloData()}}}),1e3),this.watchProductCountChange=()=>{new MutationObserver(this.handleProductCountChange).observe(document.body,{childList:!0,subtree:!0})},this.watchPriceChange=()=>{new MutationObserver((()=>{this.displayCurrency()})).observe(document.body,{attributes:!0,childList:!0,subtree:!0})},this.updateHelloOnPageChange=()=>{this.watchProductCountChange(),setInterval((()=>{if(window.location.href!==this.initialUrl){const o=this.initialUrl&&new URL(this.initialUrl);(o&&f(o.searchParams))!==m.selectedCountryCode&&(this.allFoundProducts=[],this.allRestrictedItems=[],this.productsOnPage=[]),this.initialUrl=window.location.href,l.currentHelloPage=(()=>{const{href:o}=window.location,{cartUrlPattern:e,homepageUrlPattern:t,productDetailUrlPattern:s,productListUrlPattern:i}=l.helloSettings;return e&&new RegExp(e).test(o)?"cart":s&&new RegExp(s).test(o)?"productDetail":i&&new RegExp(i).test(o)?"productList":t&&new RegExp(t).test(o)?"home":""})();const e=new URL(window.location.href);if(!f(e.searchParams))return void g(m.selectedCountryCode);this.reloadHelloData()}}),1e3)},this.changeShowDialog=o=>{this.showDialog=o},this.shouldAnimateLeftDesktop=()=>{const o=this.helloRef&&getComputedStyle(this.helloRef).position;if(this.helloRef&&"relative"===o)return k(this.helloRef)},this.isShippableCountry=(o=!0)=>!(!m.localizationLoaded||!m.isShippableCountry&&(o&&y("Hello: not shippable country"),1)),this.mobileLocationOverride=void 0,this.animateFromLeftOverride=void 0,this.appearanceSettingsOverride=void 0,this.showPeekMessage=!1,this.zonosStoreHelloSettings=l.helloSettings,this.showDialog=!1,this.peekMessage="",this.initialUrl="",this.allRestrictedItems=[],this.allFoundProducts=[],this.productsOnPage=[]}componentWillLoad(){const o=setInterval((async()=>{this.helloRef&&l.loadedConfig&&(this.helloRef.setAttribute("data-zonos-hello-loaded",""),this.updateHelloOnPageChange(),this.watchPriceChange(),this.handleAppearanceSettingsOverrideChange(),clearInterval(o))}),100)}async displayCurrency(){"DISABLED"!==l.helloSettings.currencyBehavior&&(m.exchangeRate?u():y("Could not display currency. Exchange rate and format data is not available.","warn"))}async convertAndFormat(o){return z(o)}async convert(o){return w(o)}async format(o){return b({amount:o})}async openHelloDialog(o){this.changeShowDialog(o)}handleResize(){P(this.render.bind(this),500)}handleAppearanceSettingsOverrideChange(){var o;(null===(o=this.appearanceSettingsOverride)||void 0===o?void 0:o.theme)&&(this.appearanceSettingsOverride.theme=a(this.appearanceSettingsOverride.theme))}render(){var o,s;if(null===(o=l.helloSettings.excludedUrlPatterns)||void 0===o?void 0:o.some((o=>new RegExp(o).test(window.location.href))))return y("Hello is excluded on this url","warn"),null;const{selectedCountryCode:i}=m,n=this.mobileLocationOverride||l.helloSettings.mobileLocation,r=window.innerWidth<768,a=this.animateFromLeftOverride||r&&n.includes("LEFT")||this.shouldAnimateLeftDesktop()||!1,d=n.includes("TOP"),c=h(l.appearance,this.appearanceSettingsOverride),{theme:p}=c,f=null===(s=this.allRestrictedItems)||void 0===s?void 0:s.filter((o=>this.productsOnPage.some((e=>e.description===o.itemDescription))));this.peekMessage=this.getHelloPeekMessage(l.organizationName);const g=this.isShippableCountry()&&!!i;return e(t,{class:"zonos--hello zonos--elements","data-theme":p},g&&e("div",{class:"zonos--hello-wrapper"},e("button",{class:v(["zonos--hello-widget",this.showPeekMessage&&"zonos--hello-show-peek-message",this.mobileLocationOverride&&"zonos--hello-mobile-override",a&&"zonos--hello-widget-left zonos--hello-widget-animate-from-left",d&&"zonos--hello-widget-top",!!this.allRestrictedItems.length&&"zonos--hello-has-restrictions"]),onClick:()=>{this.changeShowDialog(!this.showDialog)},onMouseEnter:()=>this.enableShowPeekMessage(),onMouseLeave:()=>this.showPeekMessage=!1,ref:o=>o&&(this.helloRef=o)},e("zonos-text",{class:"zonos--hello-message"},this.peekMessage),i&&e("div",{class:"zonos--hello-country-flag-wrapper"},e("zonos-country-flag",{class:"zonos--hello-country-flag",countryCode:i}))),e("div",{class:v(["zonos--hello-dialog-wrapper",this.mobileLocationOverride&&"zonos--hello-dialog-wrapper-mobile-override"]),style:{height:this.showDialog?"fit-content":"0px"}},e("zonos-hello-dialog",{animateFromLeftOverride:this.animateFromLeftOverride,appearanceSettings:c,isOpen:this.showDialog,mobileLocationOverride:this.mobileLocationOverride,restrictedItems:f,setIsOpen:this.changeShowDialog}))))}static get watchers(){return{appearanceSettingsOverride:["handleAppearanceSettingsOverrideChange"]}}};U.style=":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--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{position:fixed;bottom:0;left:0;width:100vw;z-index:1001;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content}}: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){border-top-left-radius:0;border-bottom-left-radius:0}: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{border-top-right-radius:0;border-bottom-right-radius:0}: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-left-radius:0;border-bottom-left-radius:0;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}@media (max-width: 768px){:host .zonos--hello-widget .zonos--hello-country-flag-wrapper .zonos--hello-country-flag{border-radius:var(--zonos-elements-radius-4);width:24px}}@media (max-width: 768px){:host .zonos--hello-widget{position:fixed;bottom:32px;right:32px;border-radius:var(--zonos-elements-radius-4);padding:4px;border:1px solid transparent}:host .zonos--hello-widget.zonos--hello-widget-left{left:32px;right:auto}:host .zonos--hello-widget.zonos--hello-widget-top{bottom:auto;top:32px}:host .zonos--hello-widget.zonos--hello-has-restrictions.zonos--hello-show-peek-message>.zonos--hello-message{border:none}:host .zonos--hello-widget>.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-animate-from-left>.zonos--hello-message{-webkit-transform:translateX(0);transform:translateX(0)}:host .zonos--hello-widget.zonos--hello-show-peek-message{width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}:host .zonos--hello-widget.zonos--hello-show-peek-message:not(.zonos--hello-widget-animate-from-left){border-top-left-radius:var(--zonos-elements-radius-4);border-bottom-left-radius:var(--zonos-elements-radius-4)}:host .zonos--hello-widget.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left{border-top-right-radius:var(--zonos-elements-radius-4);border-bottom-right-radius:var(--zonos-elements-radius-4)}:host .zonos--hello-widget.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-show-peek-message>.zonos--hello-message{padding:0 var(--zonos-elements-radius-4);padding-right:6px;border:none}:host .zonos--hello-widget .zonos--hello-country-flag-wrapper{border-radius:var(--zonos-elements-radius-4)}}:host .zonos--hello-mobile-override.zonos--hello-widget{position:fixed;bottom:32px;right:32px;border-radius:var(--zonos-elements-radius-4);padding:4px;border:1px solid transparent}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-left{left:32px;right:auto}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-top{bottom:auto;top:32px}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-has-restrictions.zonos--hello-show-peek-message>.zonos--hello-message{border:none}:host .zonos--hello-mobile-override.zonos--hello-widget>.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-animate-from-left>.zonos--hello-message{-webkit-transform:translateX(0);transform:translateX(0)}:host .zonos--hello-mobile-override.zonos--hello-widget.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-show-peek-message:not(.zonos--hello-widget-animate-from-left){border-top-left-radius:var(--zonos-elements-radius-4);border-bottom-left-radius:var(--zonos-elements-radius-4)}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left{border-top-right-radius:var(--zonos-elements-radius-4);border-bottom-right-radius:var(--zonos-elements-radius-4)}:host .zonos--hello-mobile-override.zonos--hello-widget.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-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-country-flag-wrapper{border-radius:var(--zonos-elements-radius-4)}:host .zonos--hello-mobile-override.zonos--hello-widget .zonos--hello-country-flag{border-radius:var(--zonos-elements-radius-4);width:24px}";export{U as zonos_hello}