@zonos/elements 1.3.141 → 1.3.143

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 (309) hide show
  1. package/dist/cjs/{CheckoutConfig-165db6b6.js → CheckoutConfig-eaaf62a1.js} +1 -1
  2. package/dist/cjs/TaxId-4632639d.js +29 -0
  3. package/dist/cjs/{cart-e1b59d03.js → cart-6ac8dc06.js} +258 -8
  4. package/dist/cjs/{getBorderRadius-f72d8edf.js → getBorderRadius-f97c99ad.js} +1 -1
  5. package/dist/cjs/{handleFetch-4a90f091.js → handleFetch-864d3c53.js} +5 -5
  6. package/dist/cjs/{index-d56e0a8b.js → index-b678ce0c.js} +42 -8
  7. package/dist/cjs/index.cjs.js +12 -9
  8. package/dist/cjs/{isDarkColor-dd6d723b.js → isDarkColor-434d71dd.js} +1 -1
  9. package/dist/cjs/loader.cjs.js +2 -2
  10. package/dist/cjs/{paypal-86cc51e4.js → paypal-ea8b4ca0.js} +5 -5
  11. package/dist/cjs/{zonos-address_7.cjs.entry.js → zonos-address_8.cjs.entry.js} +64 -9
  12. package/dist/cjs/zonos-badge.cjs.entry.js +2 -2
  13. package/dist/cjs/zonos-banner.cjs.entry.js +2 -2
  14. package/dist/cjs/zonos-button_3.cjs.entry.js +4 -4
  15. package/dist/cjs/zonos-card.cjs.entry.js +3 -3
  16. package/dist/cjs/zonos-cart-items_13.cjs.entry.js +33 -12
  17. package/dist/cjs/zonos-checkout.cjs.entry.js +9 -9
  18. package/dist/cjs/zonos-collapse.cjs.entry.js +2 -2
  19. package/dist/cjs/zonos-component.cjs.entry.js +2 -2
  20. package/dist/cjs/zonos-controller.cjs.entry.js +7 -7
  21. package/dist/cjs/zonos-country-flag.cjs.entry.js +6 -6
  22. package/dist/cjs/zonos-country-select_4.cjs.entry.js +10 -10
  23. package/dist/cjs/zonos-elements.cjs.js +3 -3
  24. package/dist/cjs/zonos-hello-dialog.cjs.entry.js +10 -10
  25. package/dist/cjs/zonos-hello.cjs.entry.js +6 -6
  26. package/dist/cjs/zonos-input.cjs.entry.js +3 -3
  27. package/dist/cjs/zonos-language-select_2.cjs.entry.js +6 -6
  28. package/dist/cjs/zonos-link.cjs.entry.js +1 -1
  29. package/dist/cjs/zonos-logo.cjs.entry.js +2 -2
  30. package/dist/cjs/zonos-notification_3.cjs.entry.js +9 -9
  31. package/dist/cjs/zonos-shipping-rich-radio.cjs.entry.js +3 -3
  32. package/dist/cjs/zonos-text.cjs.entry.js +2 -2
  33. package/dist/cjs/zonos-toggle.cjs.entry.js +4 -4
  34. package/dist/cjs/zonos-tooltip.cjs.entry.js +3 -3
  35. package/dist/cjs/zonos-v-stack.cjs.entry.js +4 -4
  36. package/dist/cjs/{zonosStore-293bb3ba.js → zonosStore-8971eb65.js} +1 -1
  37. package/dist/collection/collection-manifest.json +3 -2
  38. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-finish/zonos-checkout-finish.js +1 -1
  39. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.js +2 -2
  40. package/dist/collection/components/checkout/zonos-checkout/zonos-currency-toggle/zonos-currency-toggle.js +2 -2
  41. package/dist/collection/components/checkout/zonos-checkout/zonos-customer-info/zonos-customer-info.css +3 -0
  42. package/dist/collection/components/checkout/zonos-checkout/zonos-customer-info/zonos-customer-info.js +22 -1
  43. package/dist/collection/components/common/zonos-checkout-progress-tabs/zonos-checkout-progress-tabs.js +1 -1
  44. package/dist/collection/components/common/zonos-stripe-input/zonos-stripe-input.css +162 -0
  45. package/dist/collection/components/common/zonos-stripe-input/zonos-stripe-input.js +220 -0
  46. package/dist/collection/components/common/zonos-toggle/zonos-toggle.js +2 -2
  47. package/dist/collection/components/common/zonos-tooltip/zonos-tooltip.js +2 -2
  48. package/dist/collection/components/common/zonos-v-stack/zonos-v-stack.js +2 -2
  49. package/dist/collection/components/common/zonos-virtual-scroll/zonos-virtual-scroll.js +2 -2
  50. package/dist/collection/components/component-template/zonos-component/zonos-component.js +1 -1
  51. package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog-footer/zonos-hello-dialog-footer.js +2 -2
  52. package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog.js +4 -4
  53. package/dist/collection/components/main/zonos-controller.js +1 -1
  54. package/dist/collection/components/paypal/zonos-paypal-payment.js +1 -1
  55. package/dist/collection/components/store/checkout/paypal.js +1 -1
  56. package/dist/collection/components/store/checkout/stripe.js +9 -1
  57. package/dist/collection/components/store/translationStore/strings.arabic.js +12 -0
  58. package/dist/collection/components/store/translationStore/strings.base.js +12 -0
  59. package/dist/collection/components/store/translationStore/strings.chinese.js +12 -0
  60. package/dist/collection/components/store/translationStore/strings.danish.js +12 -0
  61. package/dist/collection/components/store/translationStore/strings.dutch.js +12 -0
  62. package/dist/collection/components/store/translationStore/strings.french.js +12 -0
  63. package/dist/collection/components/store/translationStore/strings.german.js +12 -0
  64. package/dist/collection/components/store/translationStore/strings.hebrew.js +12 -0
  65. package/dist/collection/components/store/translationStore/strings.indonesian.js +12 -0
  66. package/dist/collection/components/store/translationStore/strings.italian.js +12 -0
  67. package/dist/collection/components/store/translationStore/strings.japanese.js +12 -0
  68. package/dist/collection/components/store/translationStore/strings.korean.js +12 -0
  69. package/dist/collection/components/store/translationStore/strings.norwegian.js +12 -0
  70. package/dist/collection/components/store/translationStore/strings.polish.js +12 -0
  71. package/dist/collection/components/store/translationStore/strings.portuguese.js +12 -0
  72. package/dist/collection/components/store/translationStore/strings.russian.js +12 -0
  73. package/dist/collection/components/store/translationStore/strings.spanish.js +12 -0
  74. package/dist/collection/components/store/translationStore/strings.swedish.js +12 -0
  75. package/dist/collection/components/store/translationStore/strings.turkish.js +12 -0
  76. package/dist/collection/components/store/translationStore/strings.vietnamese.js +12 -0
  77. package/dist/collection/components/stripe/zonos-address/zonos-address.js +1 -1
  78. package/dist/collection/components/stripe/zonos-link-authentication/zonos-link-authentication.js +2 -2
  79. package/dist/collection/components/stripe/zonos-payment/zonos-payment.js +1 -1
  80. package/dist/collection/components/utils/api/getCountries.js +1 -1
  81. package/dist/collection/components/utils/api/getLocalization.js +1 -1
  82. package/dist/collection/components/utils/api/prepCalculateLandedCost.js +2 -0
  83. package/dist/collection/components/utils/handleFetch.js +2 -2
  84. package/dist/collection/components/utils/isValidSelector.js +1 -1
  85. package/dist/collection/components/utils/jsonParse.js +1 -1
  86. package/dist/collection/components/utils/logging/log.js +1 -1
  87. package/dist/collection/components/utils/logging/sendErrorLog.js +1 -1
  88. package/dist/collection/environment.js +1 -1
  89. package/dist/collection/types/checkout/TaxId.js +24 -0
  90. package/dist/collection/types/generated/graphql.internal.types.js +52 -0
  91. package/dist/collection/types/index.js +1 -0
  92. package/dist/collection/types/stripe/Apperance.js +0 -58
  93. package/dist/esm/{CheckoutConfig-930107d4.js → CheckoutConfig-262008fe.js} +1 -1
  94. package/dist/esm/TaxId-915ef042.js +26 -0
  95. package/dist/esm/{cart-709f053f.js → cart-acba54d0.js} +258 -8
  96. package/dist/esm/{getBorderRadius-bdd709e7.js → getBorderRadius-4aca63d4.js} +1 -1
  97. package/dist/esm/{handleFetch-22cb914b.js → handleFetch-badf4543.js} +5 -5
  98. package/dist/esm/{index-86b8247e.js → index-986b5ff2.js} +42 -8
  99. package/dist/esm/index.js +11 -10
  100. package/dist/esm/{isDarkColor-c6924924.js → isDarkColor-4915739f.js} +1 -1
  101. package/dist/esm/loader.js +3 -3
  102. package/dist/esm/{paypal-77a60c44.js → paypal-3401f757.js} +5 -5
  103. package/dist/esm/{zonos-address_7.entry.js → zonos-address_8.entry.js} +64 -10
  104. package/dist/esm/zonos-badge.entry.js +2 -2
  105. package/dist/esm/zonos-banner.entry.js +2 -2
  106. package/dist/esm/zonos-button_3.entry.js +4 -4
  107. package/dist/esm/zonos-card.entry.js +3 -3
  108. package/dist/esm/zonos-cart-items_13.entry.js +33 -12
  109. package/dist/esm/zonos-checkout.entry.js +9 -9
  110. package/dist/esm/zonos-collapse.entry.js +2 -2
  111. package/dist/esm/zonos-component.entry.js +2 -2
  112. package/dist/esm/zonos-controller.entry.js +7 -7
  113. package/dist/esm/zonos-country-flag.entry.js +6 -6
  114. package/dist/esm/zonos-country-select_4.entry.js +10 -10
  115. package/dist/esm/zonos-elements.js +4 -4
  116. package/dist/esm/zonos-hello-dialog.entry.js +10 -10
  117. package/dist/esm/zonos-hello.entry.js +6 -6
  118. package/dist/esm/zonos-input.entry.js +3 -3
  119. package/dist/esm/zonos-language-select_2.entry.js +6 -6
  120. package/dist/esm/zonos-link.entry.js +1 -1
  121. package/dist/esm/zonos-logo.entry.js +2 -2
  122. package/dist/esm/zonos-notification_3.entry.js +9 -9
  123. package/dist/esm/zonos-shipping-rich-radio.entry.js +3 -3
  124. package/dist/esm/zonos-text.entry.js +2 -2
  125. package/dist/esm/zonos-toggle.entry.js +4 -4
  126. package/dist/esm/zonos-tooltip.entry.js +3 -3
  127. package/dist/esm/zonos-v-stack.entry.js +4 -4
  128. package/dist/esm/{zonosStore-c493c4fe.js → zonosStore-708637e7.js} +1 -1
  129. package/dist/esm-es5/{CheckoutConfig-930107d4.js → CheckoutConfig-262008fe.js} +1 -1
  130. package/dist/esm-es5/TaxId-915ef042.js +1 -0
  131. package/dist/esm-es5/cart-acba54d0.js +1 -0
  132. package/dist/esm-es5/{getBorderRadius-bdd709e7.js → getBorderRadius-4aca63d4.js} +1 -1
  133. package/dist/esm-es5/index-986b5ff2.js +2 -0
  134. package/dist/esm-es5/index.js +1 -1
  135. package/dist/esm-es5/{isDarkColor-c6924924.js → isDarkColor-4915739f.js} +1 -1
  136. package/dist/esm-es5/loader.js +1 -1
  137. package/dist/esm-es5/{paypal-77a60c44.js → paypal-3401f757.js} +1 -1
  138. package/dist/esm-es5/{zonos-address_7.entry.js → zonos-address_8.entry.js} +1 -1
  139. package/dist/esm-es5/zonos-badge.entry.js +1 -1
  140. package/dist/esm-es5/zonos-banner.entry.js +1 -1
  141. package/dist/esm-es5/zonos-button_3.entry.js +1 -1
  142. package/dist/esm-es5/zonos-card.entry.js +1 -1
  143. package/dist/esm-es5/zonos-cart-items_13.entry.js +1 -1
  144. package/dist/esm-es5/zonos-checkout.entry.js +1 -1
  145. package/dist/esm-es5/zonos-collapse.entry.js +1 -1
  146. package/dist/esm-es5/zonos-component.entry.js +1 -1
  147. package/dist/esm-es5/zonos-controller.entry.js +1 -1
  148. package/dist/esm-es5/zonos-country-flag.entry.js +1 -1
  149. package/dist/esm-es5/zonos-country-select_4.entry.js +1 -1
  150. package/dist/esm-es5/zonos-elements.js +1 -1
  151. package/dist/esm-es5/zonos-hello-dialog.entry.js +1 -1
  152. package/dist/esm-es5/zonos-hello.entry.js +1 -1
  153. package/dist/esm-es5/zonos-input.entry.js +1 -1
  154. package/dist/esm-es5/zonos-language-select_2.entry.js +1 -1
  155. package/dist/esm-es5/zonos-link.entry.js +1 -1
  156. package/dist/esm-es5/zonos-logo.entry.js +1 -1
  157. package/dist/esm-es5/zonos-notification_3.entry.js +1 -1
  158. package/dist/esm-es5/zonos-shipping-rich-radio.entry.js +1 -1
  159. package/dist/esm-es5/zonos-text.entry.js +1 -1
  160. package/dist/esm-es5/zonos-toggle.entry.js +1 -1
  161. package/dist/esm-es5/zonos-tooltip.entry.js +1 -1
  162. package/dist/esm-es5/zonos-v-stack.entry.js +1 -1
  163. package/dist/esm-es5/{zonosStore-c493c4fe.js → zonosStore-708637e7.js} +1 -1
  164. package/dist/scripts/index.d.ts +113 -9
  165. package/dist/scripts/index.js +1 -1
  166. package/dist/scripts/loadZonos.js +1 -1
  167. package/dist/scripts/zonos.js +1 -1
  168. package/dist/types/components/checkout/zonos-checkout/zonos-customer-info/zonos-customer-info.d.ts +5 -0
  169. package/dist/types/components/common/zonos-stripe-input/zonos-stripe-input.d.ts +42 -0
  170. package/dist/types/components/store/checkout/cart.d.ts +2 -3
  171. package/dist/types/components/store/checkout/stripe.d.ts +10 -2
  172. package/dist/types/components/store/hello/localization.d.ts +0 -1
  173. package/dist/types/components/store/translationStore/strings.arabic.d.ts +12 -0
  174. package/dist/types/components/store/translationStore/strings.base.d.ts +12 -0
  175. package/dist/types/components/store/translationStore/strings.chinese.d.ts +12 -0
  176. package/dist/types/components/store/translationStore/strings.danish.d.ts +12 -0
  177. package/dist/types/components/store/translationStore/strings.dutch.d.ts +12 -0
  178. package/dist/types/components/store/translationStore/strings.french.d.ts +12 -0
  179. package/dist/types/components/store/translationStore/strings.german.d.ts +12 -0
  180. package/dist/types/components/store/translationStore/strings.hebrew.d.ts +12 -0
  181. package/dist/types/components/store/translationStore/strings.indonesian.d.ts +12 -0
  182. package/dist/types/components/store/translationStore/strings.italian.d.ts +12 -0
  183. package/dist/types/components/store/translationStore/strings.japanese.d.ts +12 -0
  184. package/dist/types/components/store/translationStore/strings.korean.d.ts +12 -0
  185. package/dist/types/components/store/translationStore/strings.norwegian.d.ts +12 -0
  186. package/dist/types/components/store/translationStore/strings.polish.d.ts +12 -0
  187. package/dist/types/components/store/translationStore/strings.portuguese.d.ts +12 -0
  188. package/dist/types/components/store/translationStore/strings.russian.d.ts +12 -0
  189. package/dist/types/components/store/translationStore/strings.spanish.d.ts +12 -0
  190. package/dist/types/components/store/translationStore/strings.swedish.d.ts +12 -0
  191. package/dist/types/components/store/translationStore/strings.turkish.d.ts +12 -0
  192. package/dist/types/components/store/translationStore/strings.vietnamese.d.ts +12 -0
  193. package/dist/types/components/store/translationStore.d.ts +1 -1
  194. package/dist/types/components/store/zonosStore.d.ts +1 -1
  195. package/dist/types/components/utils/api/checkItemRestrictions.d.ts +3 -3
  196. package/dist/types/components/utils/api/getLocaleMessages.d.ts +3 -3
  197. package/dist/types/components/utils/changeDeepProperty.d.ts +2 -2
  198. package/dist/types/components/utils/changeDeepPropertyAtIndex.d.ts +2 -1
  199. package/dist/types/components/utils/createCustomEvent.d.ts +3 -3
  200. package/dist/types/components/utils/hello/detectItemRestrictions.d.ts +3 -3
  201. package/dist/types/components/utils/hello/getCurrentHelloLocalePage.d.ts +1 -1
  202. package/dist/types/components/utils/hello/initHello.d.ts +2 -2
  203. package/dist/types/components/utils/resetToSelectedTab.d.ts +1 -1
  204. package/dist/types/components.d.ts +102 -2
  205. package/dist/types/environment.d.ts +2 -2
  206. package/dist/types/scripts/_stripe.d.ts +1 -1
  207. package/dist/types/stencil-public-runtime.d.ts +6 -0
  208. package/dist/types/styles/stripe/defaultVariable.d.ts +1 -1
  209. package/dist/types/types/checkout/TaxId.d.ts +20 -0
  210. package/dist/types/types/checkout/api/CalculateLandedCost.d.ts +8 -0
  211. package/dist/types/types/generated/graphql.frontend.types.d.ts +1 -1
  212. package/dist/types/types/generated/graphql.frontend.types.ts +1 -1
  213. package/dist/types/types/generated/graphql.internal.types.d.ts +71 -109
  214. package/dist/types/types/generated/graphql.internal.types.ts +91 -98
  215. package/dist/types/types/global.d.ts +0 -5
  216. package/dist/types/types/index.d.ts +1 -0
  217. package/dist/types/types/stripe/Apperance.d.ts +1 -2
  218. package/dist/types/utils/formattedUrl.d.ts +1 -1
  219. package/dist/zonos-elements/assets/RemoveIcon.svg +1 -1
  220. package/dist/zonos-elements/index.esm.js +1 -1
  221. package/dist/zonos-elements/{p-e205ef1c.system.entry.js → p-0197a9bf.system.entry.js} +1 -1
  222. package/dist/zonos-elements/{p-b9efc660.entry.js → p-0ab29580.entry.js} +1 -1
  223. package/dist/zonos-elements/{p-6b0aa1bb.system.js → p-0b5c9f89.system.js} +1 -1
  224. package/dist/zonos-elements/{p-87ed2e17.system.entry.js → p-0b5f4ca7.system.entry.js} +1 -1
  225. package/dist/zonos-elements/{p-289ded20.system.entry.js → p-0db28495.system.entry.js} +1 -1
  226. package/dist/zonos-elements/{p-35b8dcde.entry.js → p-1198c874.entry.js} +1 -1
  227. package/dist/zonos-elements/p-12a6b7bd.system.js +1 -0
  228. package/dist/zonos-elements/{p-b7307c61.js → p-1460f917.js} +1 -1
  229. package/dist/zonos-elements/{p-9589bd08.entry.js → p-1e3ea4ae.entry.js} +1 -1
  230. package/dist/zonos-elements/p-21b538ea.system.js +1 -0
  231. package/dist/zonos-elements/{p-0fc96872.system.entry.js → p-2761ad55.system.entry.js} +1 -1
  232. package/dist/zonos-elements/{p-bc8b22ad.entry.js → p-28295342.entry.js} +1 -1
  233. package/dist/zonos-elements/{p-22d69480.system.entry.js → p-2ab5e362.system.entry.js} +1 -1
  234. package/dist/zonos-elements/{p-f07c01c5.system.entry.js → p-2cfc00b8.system.entry.js} +1 -1
  235. package/dist/zonos-elements/{p-f8ca3e71.entry.js → p-302f5d25.entry.js} +1 -1
  236. package/dist/zonos-elements/{p-4319600a.system.entry.js → p-33e1d25e.system.entry.js} +1 -1
  237. package/dist/zonos-elements/{p-10efff62.system.js → p-36dfc7ac.system.js} +1 -1
  238. package/dist/zonos-elements/{p-7a60deef.system.entry.js → p-381874b0.system.entry.js} +1 -1
  239. package/dist/zonos-elements/p-386325ae.system.js +1 -0
  240. package/dist/zonos-elements/{p-1c4ff7b2.system.entry.js → p-38d0c496.system.entry.js} +1 -1
  241. package/dist/zonos-elements/{p-00d4bff1.entry.js → p-39cac2c1.entry.js} +1 -1
  242. package/dist/zonos-elements/{p-5c32689e.entry.js → p-3f991022.entry.js} +1 -1
  243. package/dist/zonos-elements/{p-9b59704a.entry.js → p-44dd4269.entry.js} +1 -1
  244. package/dist/zonos-elements/{p-edc16f69.js → p-4b685549.js} +1 -1
  245. package/dist/zonos-elements/{p-ad1d6ea2.entry.js → p-4c7f0417.entry.js} +1 -1
  246. package/dist/zonos-elements/{p-d633ced9.entry.js → p-54058b57.entry.js} +1 -1
  247. package/dist/zonos-elements/{p-ad4bc6a2.entry.js → p-545c05ce.entry.js} +1 -1
  248. package/dist/zonos-elements/p-5bd927f2.js +1 -0
  249. package/dist/zonos-elements/{p-01ad5be8.system.entry.js → p-654fc23d.system.entry.js} +1 -1
  250. package/dist/zonos-elements/{p-5b90dd6d.entry.js → p-675f60b4.entry.js} +1 -1
  251. package/dist/zonos-elements/p-680d3694.js +2 -0
  252. package/dist/zonos-elements/{p-461624ce.system.entry.js → p-6a8862a6.system.entry.js} +1 -1
  253. package/dist/zonos-elements/{p-10d6fe23.js → p-766dd01f.js} +1 -1
  254. package/dist/zonos-elements/{p-3dd503fd.system.entry.js → p-78e4f877.system.entry.js} +1 -1
  255. package/dist/zonos-elements/{p-7ef573f0.entry.js → p-7c5c0a85.entry.js} +1 -1
  256. package/dist/zonos-elements/{p-bb418544.system.js → p-7c643376.system.js} +1 -1
  257. package/dist/zonos-elements/{p-ffe4a999.system.entry.js → p-8ac02349.system.entry.js} +1 -1
  258. package/dist/zonos-elements/{p-25c7e4fa.system.entry.js → p-8e30228d.system.entry.js} +1 -1
  259. package/dist/zonos-elements/{p-be2feba6.entry.js → p-8f26cc7e.entry.js} +1 -1
  260. package/dist/zonos-elements/{p-fce202ab.entry.js → p-9306a835.entry.js} +1 -1
  261. package/dist/zonos-elements/{p-04a6a167.entry.js → p-9d7a860c.entry.js} +1 -1
  262. package/dist/zonos-elements/p-9da2d116.entry.js +1 -0
  263. package/dist/zonos-elements/{p-cd1fd09e.entry.js → p-9dec2b74.entry.js} +1 -1
  264. package/dist/zonos-elements/{p-cf72603f.system.entry.js → p-9e84f647.system.entry.js} +1 -1
  265. package/dist/zonos-elements/p-a08ea336.js +1 -0
  266. package/dist/zonos-elements/{p-ee1e1d94.system.entry.js → p-a13d5957.system.entry.js} +1 -1
  267. package/dist/zonos-elements/{p-dc09df19.system.entry.js → p-a2bce31d.system.entry.js} +1 -1
  268. package/dist/zonos-elements/p-a4f045d4.js +17 -0
  269. package/dist/zonos-elements/{p-f2867195.entry.js → p-ab6973a5.entry.js} +1 -1
  270. package/dist/zonos-elements/{p-d10ffd69.js → p-b0174a8f.js} +1 -1
  271. package/dist/zonos-elements/{p-8368a79e.entry.js → p-b2ea7adb.entry.js} +1 -1
  272. package/dist/zonos-elements/{p-fd061229.system.js → p-b50667b6.system.js} +1 -1
  273. package/dist/zonos-elements/{p-46a5ec52.system.js → p-c0164a3c.system.js} +1 -1
  274. package/dist/zonos-elements/p-c437d76c.system.js +1 -0
  275. package/dist/zonos-elements/{p-64a04391.system.entry.js → p-d1afd314.system.entry.js} +1 -1
  276. package/dist/zonos-elements/{p-7acf6802.entry.js → p-d3867033.entry.js} +1 -1
  277. package/dist/zonos-elements/{p-896ab1ed.system.entry.js → p-d5a3851d.system.entry.js} +1 -1
  278. package/dist/zonos-elements/{p-0c027d2e.entry.js → p-d9511c4a.entry.js} +1 -1
  279. package/dist/zonos-elements/{p-010f5797.system.entry.js → p-dba6147b.system.entry.js} +1 -1
  280. package/dist/zonos-elements/{p-896d62a4.system.entry.js → p-df9c0bfa.system.entry.js} +1 -1
  281. package/dist/zonos-elements/{p-0aee2e4c.system.entry.js → p-e6554a6f.system.entry.js} +1 -1
  282. package/dist/zonos-elements/{p-c78dd680.system.js → p-e9964a5a.system.js} +1 -1
  283. package/dist/zonos-elements/{p-b832ec52.entry.js → p-f2d07062.entry.js} +1 -1
  284. package/dist/zonos-elements/{p-8f9affb3.system.entry.js → p-f9aef1fc.system.entry.js} +1 -1
  285. package/dist/zonos-elements/p-fa538a74.system.entry.js +1 -0
  286. package/dist/zonos-elements/{p-3a26cae5.entry.js → p-fc4658a6.entry.js} +1 -1
  287. package/dist/zonos-elements/zonos-elements.esm.js +1 -1
  288. package/dist/zonos-elements/zonos-elements.js +1 -1
  289. package/package.json +68 -67
  290. package/dist/collection/__mocks__/vercel-app/loadZonos.js +0 -492
  291. package/dist/collection/__mocks__/vercel-app/localization.js +0 -1
  292. package/dist/collection/__mocks__/vercel-app/zonos-hello.entry.js +0 -1
  293. package/dist/collection/__mocks__/zonos-url/index.js +0 -1
  294. package/dist/collection/__mocks__/zonos-url/loadZonos.js +0 -492
  295. package/dist/collection/__mocks__/zonos-url/localization.js +0 -2899
  296. package/dist/collection/__mocks__/zonos-url/zonos-hello.entry.js +0 -1
  297. package/dist/esm-es5/cart-709f053f.js +0 -1
  298. package/dist/esm-es5/index-86b8247e.js +0 -2
  299. package/dist/zonos-elements/p-49e4ca08.system.entry.js +0 -1
  300. package/dist/zonos-elements/p-5b7da777.js +0 -2
  301. package/dist/zonos-elements/p-6b6cd6c3.system.js +0 -1
  302. package/dist/zonos-elements/p-a58731ec.system.js +0 -1
  303. package/dist/zonos-elements/p-afffdfc2.js +0 -1
  304. package/dist/zonos-elements/p-d35376d3.js +0 -17
  305. package/dist/zonos-elements/p-e6c31531.entry.js +0 -1
  306. package/dist/zonos-elements/p-f8e8b50e.system.js +0 -1
  307. /package/dist/esm-es5/{handleFetch-22cb914b.js → handleFetch-badf4543.js} +0 -0
  308. /package/dist/zonos-elements/{p-860e46ab.js → p-a5b294d7.js} +0 -0
  309. /package/dist/zonos-elements/{p-febc72e7.system.js → p-bfcfd29b.system.js} +0 -0
@@ -1 +0,0 @@
1
- var __awaiter=this&&this.__awaiter||function(e,o,t,r){function n(e){return e instanceof t?e:new t((function(o){o(e)}))}return new(t||(t=Promise))((function(t,i){function s(e){try{l(r.next(e))}catch(e){i(e)}}function a(e){try{l(r["throw"](e))}catch(e){i(e)}}function l(e){e.done?t(e.value):n(e.value).then(s,a)}l((r=r.apply(e,o||[])).next())}))};var __generator=this&&this.__generator||function(e,o){var t={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},r,n,i,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(e){return function(o){return l([e,o])}}function l(a){if(r)throw new TypeError("Generator is already executing.");while(s&&(s=0,a[0]&&(t=0)),t)try{if(r=1,n&&(i=a[0]&2?n["return"]:a[0]?n["throw"]||((i=n["return"])&&i.call(n),0):n.next)&&!(i=i.call(n,a[1])).done)return i;if(n=0,i)a=[a[0]&2,i.value];switch(a[0]){case 0:case 1:i=a;break;case 4:t.label++;return{value:a[1],done:false};case 5:t.label++;n=a[1];a=[0];continue;case 7:a=t.ops.pop();t.trys.pop();continue;default:if(!(i=t.trys,i=i.length>0&&i[i.length-1])&&(a[0]===6||a[0]===2)){t=0;continue}if(a[0]===3&&(!i||a[1]>i[0]&&a[1]<i[3])){t.label=a[1];break}if(a[0]===6&&t.label<i[1]){t.label=i[1];i=a;break}if(i&&t.label<i[2]){t.label=i[2];t.ops.push(a);break}if(i[2])t.ops.pop();t.trys.pop();continue}a=o.call(e,t)}catch(e){a=[6,e];n=0}finally{r=i=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};import{r as registerInstance,h,H as Host}from"./index-d1aa9293.js";import{_ as _root,i as isObjectLike_1,f as _baseGetTag,g as isObject_1,z as zonosStore,m as mergeConfig}from"./zonosStore-591afa62.js";import{h as handleFetch,b as logError,a as localizationStore,i as isValidSelector,t as translate,g as getZCountryUrlParam,s as setZCountryUrlParam,l as log,e as currencyDisplay,f as currencyConvertAndFormat,j as currencyConvert,k as currencyFormat}from"./localization-dc469ca8.js";import{c as classes}from"./classes-0d95c529.js";import{g as getHasMoreSpaceOnRight}from"./getHasMoreSpaceOnRight-feba1ae2.js";var now=function(){return _root.Date.now()};var now_1=now;var reWhitespace=/\s/;function trimmedEndIndex(e){var o=e.length;while(o--&&reWhitespace.test(e.charAt(o))){}return o}var _trimmedEndIndex=trimmedEndIndex;var reTrimStart=/^\s+/;function baseTrim(e){return e?e.slice(0,_trimmedEndIndex(e)+1).replace(reTrimStart,""):e}var _baseTrim=baseTrim;var symbolTag="[object Symbol]";function isSymbol(e){return typeof e=="symbol"||isObjectLike_1(e)&&_baseGetTag(e)==symbolTag}var isSymbol_1=isSymbol;var NAN=0/0;var reIsBadHex=/^[-+]0x[0-9a-f]+$/i;var reIsBinary=/^0b[01]+$/i;var reIsOctal=/^0o[0-7]+$/i;var freeParseInt=parseInt;function toNumber(e){if(typeof e=="number"){return e}if(isSymbol_1(e)){return NAN}if(isObject_1(e)){var o=typeof e.valueOf=="function"?e.valueOf():e;e=isObject_1(o)?o+"":o}if(typeof e!="string"){return e===0?e:+e}e=_baseTrim(e);var t=reIsBinary.test(e);return t||reIsOctal.test(e)?freeParseInt(e.slice(2),t?2:8):reIsBadHex.test(e)?NAN:+e}var toNumber_1=toNumber;var FUNC_ERROR_TEXT="Expected a function";var nativeMax=Math.max,nativeMin=Math.min;function debounce(e,o,t){var r,n,i,s,a,l,d=0,h=false,c=false,u=true;if(typeof e!="function"){throw new TypeError(FUNC_ERROR_TEXT)}o=toNumber_1(o)||0;if(isObject_1(t)){h=!!t.leading;c="maxWait"in t;i=c?nativeMax(toNumber_1(t.maxWait)||0,o):i;u="trailing"in t?!!t.trailing:u}function f(o){var t=r,i=n;r=n=undefined;d=o;s=e.apply(i,t);return s}function m(e){d=e;a=setTimeout(v,o);return h?f(e):s}function g(e){var t=e-l,r=e-d,n=o-t;return c?nativeMin(n,i-r):n}function p(e){var t=e-l,r=e-d;return l===undefined||t>=o||t<0||c&&r>=i}function v(){var e=now_1();if(p(e)){return w(e)}a=setTimeout(v,g(e))}function w(e){a=undefined;if(u&&r){return f(e)}r=n=undefined;return s}function b(){if(a!==undefined){clearTimeout(a)}d=0;r=l=n=a=undefined}function z(){return a===undefined?s:w(now_1())}function y(){var e=now_1(),t=p(e);r=arguments;n=this;l=e;if(t){if(a===undefined){return m(l)}if(c){clearTimeout(a);a=setTimeout(v,o);return f(l)}}if(a===undefined){a=setTimeout(v,o)}return s}y.cancel=b;y.flush=z;return y}var debounce_1=debounce;var checkItemRestrictions=function(e){var o=e.items,t=e.shipFrom,r=e.shipTo;return __awaiter(void 0,void 0,void 0,(function(){var e,n,i,s,a,l;return __generator(this,(function(d){switch(d.label){case 0:n="".concat("https://v1.route.js.zonos.com","/api/check-item-restrictions");i={items:o,shipFrom:t,shipTo:r};return[4,handleFetch(n,{body:i,method:"POST"})];case 1:s=d.sent(),a=s.errors,l=s.json;if(a.length||!l){logError("Error fetching item restrictions: ".concat((e=a.find(Boolean))===null||e===void 0?void 0:e.message));return[2,[]]}return[2,l.filter(Boolean)]}}))}))};var detectItemRestrictions=function(e){return __awaiter(void 0,void 0,void 0,(function(){var o,t,r,n;return __generator(this,(function(i){switch(i.label){case 0:if(!e.length){return[2,[]]}o=localizationStore.selectedCountryCode;if(!o){logError("Hello Could not check item restrictions - No country code selected");return[2,[]]}t=e.map((function(e){return{description:e.description,name:e.title}}));return[4,checkItemRestrictions({items:t,shipFrom:"AD",shipTo:o})];case 1:r=i.sent();n=r.map((function(e){var o;var r=((o=t.filter((function(o){return o.description===e.itemDescription})).find(Boolean))===null||o===void 0?void 0:o.name)||"";return Object.assign(Object.assign({},e),{name:r})}));return[2,n]}}))}))};var getCurrentHelloLocalePage=function(){var e=window.location.href;var o=zonosStore.helloSettings,t=o.cartUrlPattern,r=o.homepageUrlPattern,n=o.productDetailUrlPattern,i=o.productListUrlPattern;if(t&&new RegExp(t).test(e)){return"cart"}if(n&&new RegExp(n).test(e)){return"productDetail"}if(i&&new RegExp(i).test(e)){return"productList"}if(r&&new RegExp(r).test(e)){return"home"}return""};var getProductsOnPage=function(){var e,o;var t=zonosStore.helloSettings,r=t.productAddToCartElementSelector,n=t.productDescriptionElementSelector,i=t.productTitleElementSelector,s=t.restrictionBehavior;if(!i||!n){logError("Hello Could not check item restrictions - must provide title and description selectors.")}var a=i&&isValidSelector(i)&&document.querySelectorAll(i)||[];var l=n&&isValidSelector(n)&&document.querySelectorAll(n)||[];if(a.length!==l.length){logError("Hello Could not check item restrictions - Title and description selectors do not match");return[]}var d=s==="RESTRICT_AND_BLOCK";var h=d&&r&&isValidSelector(r)&&document.querySelectorAll(r)||[];if(d&&h.length!==l.length){logError('Hello could not disable "Add to cart" buttons - Title and add to cart selectors do not match')}var c=[];for(var u=0;u<a.length;u++){var f=a[u];var m=l[u];var g=h[u];if(f&&m){var p={cartButtonNode:g||null,description:((e=m.textContent)===null||e===void 0?void 0:e.trim())||"",title:((o=f.textContent)===null||o===void 0?void 0:o.trim())||""};c.push(p)}}return c};var zonosHelloCss=":host{font-family:var(--font-family, var(--zonos-elements-font-sans));display:block}:host *{font-family:var(--font-family, var(--zonos-elements-font-sans))}: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% + var(--zonos-elements-space-16)));transform:translateX(calc(-100% + var(--zonos-elements-space-16)));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:var(--zonos-elements-space-16);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:var(--zonos-elements-space-16);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% - var(--zonos-elements-space-16)));transform:translateX(calc(100% - var(--zonos-elements-space-16)));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:var(--zonos-elements-space-32);right:var(--zonos-elements-space-32);border-radius:var(--zonos-elements-radius-4);padding:var(--zonos-elements-space-4);border:1px solid transparent}:host .zonos--hello-widget.zonos--hello-widget-left{left:var(--zonos-elements-space-32);right:auto}:host .zonos--hello-widget.zonos--hello-widget-top{bottom:auto;top:var(--zonos-elements-space-32)}: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;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:var(--zonos-elements-space-8);padding-right:var(--zonos-elements-space-4)}: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:var(--zonos-elements-space-32);right:var(--zonos-elements-space-32);border-radius:var(--zonos-elements-radius-4);padding:var(--zonos-elements-space-4);border:1px solid transparent}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-left{left:var(--zonos-elements-space-32);right:auto}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-top{bottom:auto;top:var(--zonos-elements-space-32)}: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;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:var(--zonos-elements-space-8);padding-right:var(--zonos-elements-space-4)}: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}";var PEEK_MESSAGE_CLOSE_DELAY_MS=3e3;var RESIZE_DEBOUNCE_DELAY_MS=500;var ZonosHello=function(){function e(e){var o=this;registerInstance(this,e);this.getHelloPeekMessage=function(){var e=zonosStore.currentHelloPage==="productDetail"||zonosStore.currentHelloPage==="productList";if(e&&o.allRestrictedItems.length){var t=translate("click to learn more");var r=zonosStore.currentHelloPage==="productDetail"?translate("Restricted item"):translate("Restricted items found");return"".concat(r," - ").concat(t)}switch(zonosStore.currentHelloPage){case"cart":return translate("Prepay duties and taxes at checkout");case"productList":case"productDetail":return translate("See duty and tax thresholds");default:return"".concat(translate("Welcome to")," ").concat(zonosStore.organizationName)}};this.enableShowPeekMessage=function(){if(o.peekMessage){o.showPeekMessage=true}};this.getNewItemRestrictions=function(e){return __awaiter(o,void 0,void 0,(function(){var o,t;return __generator(this,(function(r){switch(r.label){case 0:o=zonosStore.currentHelloPage==="productDetail"||zonosStore.currentHelloPage==="productList";if(!o||zonosStore.helloSettings.restrictionBehavior==="DISABLED"){return[2,[]]}return[4,detectItemRestrictions(e)];case 1:t=r.sent();return[2,t]}}))}))};this.triggerShowPeekMessage=function(){o.peekMessage=o.getHelloPeekMessage();var e=zonosStore.helloSettings,t=e.peekMessageBehavior,r=e.peekMessageDelay;var n=r*1e3;if(t==="ENABLED"){setTimeout((function(){o.enableShowPeekMessage();var e=o.allRestrictedItems.some((function(e){return o.productsOnPage.some((function(o){return o.description===e.itemDescription}))}));if(!e){setTimeout((function(){o.showPeekMessage=false}),PEEK_MESSAGE_CLOSE_DELAY_MS)}}),n)}};this.disableAddToCartButtons=function(){if(o.productsOnPage.length){o.productsOnPage.forEach((function(e){var t,r;var n=o.allRestrictedItems.some((function(o){return o.itemDescription===e.description}));if(n){(t=e.cartButtonNode)===null||t===void 0?void 0:t.setAttribute("disabled","disabled")}else{(r=e.cartButtonNode)===null||r===void 0?void 0:r.removeAttribute("disabled")}}))}};this.handleItemRestrictions=function(){return __awaiter(o,void 0,void 0,(function(){var e,o;var t,r;var n=this;return __generator(this,(function(i){switch(i.label){case 0:this.productsOnPage=getProductsOnPage();e=this.productsOnPage.filter((function(e){return!n.allFoundProducts.some((function(o){return o.title===e.title}))}));return[4,this.getNewItemRestrictions(e)];case 1:o=i.sent();(t=this.allRestrictedItems).push.apply(t,o);(r=this.allFoundProducts).push.apply(r,e);this.disableAddToCartButtons();return[2]}}))}))};this.reloadHelloData=function(){return __awaiter(o,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:return[4,this.handleItemRestrictions()];case 1:e.sent();this.triggerShowPeekMessage();void this.displayCurrency();return[2]}}))}))};this.handleProductCountChange=debounce_1((function(){var e=zonosStore.helloSettings.productTitleElementSelector;if(e){var t=getProductsOnPage();if(o.allFoundProducts.length!==t.length&&window.location.href===o.initialUrl){if(!o.allFoundProducts.length){return}void o.reloadHelloData()}}}),1e3);this.watchProductCountChange=function(){var e=new MutationObserver(o.handleProductCountChange);e.observe(document.body,{childList:true,subtree:true})};this.updateHelloOnPageChange=function(){o.watchProductCountChange();setInterval((function(){if(window.location.href!==o.initialUrl){var e=o.initialUrl&&new URL(o.initialUrl);var t=e&&getZCountryUrlParam(e.searchParams);if(t!==localizationStore.selectedCountryCode){o.allFoundProducts=[];o.allRestrictedItems=[];o.productsOnPage=[]}o.initialUrl=window.location.href;zonosStore.currentHelloPage=getCurrentHelloLocalePage();var r=new URL(window.location.href);var n=getZCountryUrlParam(r.searchParams);if(!n){setZCountryUrlParam(localizationStore.selectedCountryCode);return}void o.reloadHelloData()}}),1e3)};this.changeShowDialog=function(e){o.showDialog=e};this.shouldAnimateLeftDesktop=function(){var e=o.helloRef&&getComputedStyle(o.helloRef).position;if(o.helloRef&&e==="relative"){var t=getHasMoreSpaceOnRight(o.helloRef);return t}};this.isShippableCountry=function(e){if(e===void 0){e=true}if(!localizationStore.localizationLoaded){return false}if(!localizationStore.isShippableCountry){if(e){log("Hello: not shippable country")}return false}return true};this.mobileLocationOverride=undefined;this.animateFromLeftOverride=undefined;this.appearanceSettingsOverride=undefined;this.showPeekMessage=false;this.zonosStoreHelloSettings=zonosStore.helloSettings;this.showDialog=false;this.peekMessage="";this.initialUrl="";this.allRestrictedItems=[];this.allFoundProducts=[];this.productsOnPage=[]}e.prototype.componentWillLoad=function(){var e=this;var o=setInterval((function(){return __awaiter(e,void 0,void 0,(function(){return __generator(this,(function(e){if(!this.helloRef){return[2]}if(zonosStore.loadedConfig){this.helloRef.setAttribute("data-zonos-hello-loaded","");this.updateHelloOnPageChange();clearInterval(o)}return[2]}))}))}),100)};e.prototype.displayCurrency=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){if(!localizationStore.exchangeRate){console.error("Could not display currency. Exchange rate and format data is not available.");return[2]}currencyDisplay();return[2]}))}))};e.prototype.convertAndFormat=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(o){currencyConvertAndFormat(e);return[2]}))}))};e.prototype.convert=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(o){currencyConvert(e);return[2]}))}))};e.prototype.format=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(o){currencyFormat(e);return[2]}))}))};e.prototype.handleResize=function(){debounce_1(this.render.bind(this),RESIZE_DEBOUNCE_DELAY_MS)};e.prototype.render=function(){var e=this;var o,t;var r=(o=zonosStore.helloSettings.excludedUrlPatterns)===null||o===void 0?void 0:o.some((function(e){return new RegExp(e).test(window.location.href)}));if(r){log("Hello is excluded on this url","warn");return null}var n=localizationStore.selectedCountryCode;var i=this.mobileLocationOverride||zonosStore.helloSettings.mobileLocation;var s=window.innerWidth<768;var a=this.animateFromLeftOverride||s&&i.includes("LEFT")||this.shouldAnimateLeftDesktop()||false;var l=i.includes("TOP");var d=mergeConfig(zonosStore.appearance,this.appearanceSettingsOverride);var c=d.theme;var u=(t=this.allRestrictedItems)===null||t===void 0?void 0:t.filter((function(o){return e.productsOnPage.some((function(e){return e.description===o.itemDescription}))}));var f=this.isShippableCountry()&&!!n;return h(Host,{class:"zonos--hello zonos--elements","data-theme":c},f&&h("div",{class:"zonos--hello-wrapper"},h("button",{class:classes(["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",l&&"zonos--hello-widget-top",!!this.allRestrictedItems.length&&"zonos--hello-has-restrictions"]),onClick:function(){e.changeShowDialog(!e.showDialog)},onMouseEnter:function(){return e.enableShowPeekMessage()},onMouseLeave:function(){return e.showPeekMessage=false},ref:function(o){return o&&(e.helloRef=o)}},h("zonos-text",{class:"zonos--hello-message"},this.peekMessage),n&&h("div",{class:"zonos--hello-country-flag-wrapper"},h("zonos-country-flag",{class:"zonos--hello-country-flag",countryCode:n}))),h("div",{class:classes(["zonos--hello-dialog-wrapper",this.mobileLocationOverride&&"zonos--hello-dialog-wrapper-mobile-override"]),style:{height:this.showDialog?"fit-content":"0px"}},h("zonos-hello-dialog",{animateFromLeftOverride:this.animateFromLeftOverride,appearanceSettings:d,isOpen:this.showDialog,mobileLocationOverride:this.mobileLocationOverride,restrictedItems:u,setIsOpen:this.changeShowDialog}))))};return e}();ZonosHello.style=zonosHelloCss;export{ZonosHello as zonos_hello};