@zonos/elements 1.3.230 → 1.3.232

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 (350) hide show
  1. package/dist/cjs/{cart-ad82a680.js → cart-bc615014.js} +9 -5
  2. package/dist/cjs/{debounce-2c9f3f1e.js → debounce-815d1517.js} +1 -1
  3. package/dist/cjs/{getBorderRadius-c7d9f676.js → getBorderRadius-2ef1170d.js} +1 -1
  4. package/dist/cjs/hasInclusivePrice-84145546.js +24 -0
  5. package/dist/cjs/{index-1c710d00.js → index-69fa8852.js} +352 -4
  6. package/dist/cjs/index.cjs.js +7 -7
  7. package/dist/cjs/{isDarkColor-994c38e4.js → isDarkColor-878e600e.js} +1 -1
  8. package/dist/cjs/loader.cjs.js +2 -2
  9. package/dist/cjs/{localization-31e3dfe3.js → localization-39516612.js} +119 -31
  10. package/dist/cjs/{paypal-88b5e878.js → paypal-1d6f1a71.js} +5 -5
  11. package/dist/cjs/{placeTestOrder-6aefbf9c.js → placeTestOrder-a5469e40.js} +11 -7
  12. package/dist/cjs/{renderFallback-87c908ad.js → renderFallback-c2576fbe.js} +4 -4
  13. package/dist/cjs/{translationStore-b8b25e9d.js → translationStore-08d3ff9c.js} +602 -362
  14. package/dist/cjs/{updateCheckoutSessionAttributes-a4899e90.js → updateCheckoutSessionAttributes-3a1db9de.js} +1 -1
  15. package/dist/cjs/zonos-address_11.cjs.entry.js +31 -15
  16. package/dist/cjs/zonos-badge.cjs.entry.js +2 -2
  17. package/dist/cjs/zonos-banner_2.cjs.entry.js +3 -3
  18. package/dist/cjs/zonos-button_3.cjs.entry.js +4 -4
  19. package/dist/cjs/zonos-cart-items_13.cjs.entry.js +193 -25
  20. package/dist/cjs/zonos-checkout.cjs.entry.js +14 -11
  21. package/dist/cjs/zonos-collapse.cjs.entry.js +2 -2
  22. package/dist/cjs/zonos-collect-cart-items_3.cjs.entry.js +7 -7
  23. package/dist/cjs/zonos-collect-finish_6.cjs.entry.js +10 -10
  24. package/dist/cjs/zonos-collect.cjs.entry.js +9 -9
  25. package/dist/cjs/zonos-component.cjs.entry.js +1 -1
  26. package/dist/cjs/zonos-confirm-dialog_2.cjs.entry.js +4 -4
  27. package/dist/cjs/zonos-controller.cjs.entry.js +16 -9
  28. package/dist/cjs/zonos-country-flag.cjs.entry.js +4 -4
  29. package/dist/cjs/zonos-country-select_4.cjs.entry.js +12 -9
  30. package/dist/cjs/zonos-elements.cjs.js +2 -2
  31. package/dist/cjs/zonos-empty-state-payment_4.cjs.entry.js +9 -9
  32. package/dist/cjs/zonos-hello-dialog.cjs.entry.js +57 -47
  33. package/dist/cjs/zonos-hello.cjs.entry.js +5 -5
  34. package/dist/cjs/zonos-input.cjs.entry.js +3 -3
  35. package/dist/cjs/zonos-language-select_2.cjs.entry.js +4 -4
  36. package/dist/cjs/zonos-logo.cjs.entry.js +2 -2
  37. package/dist/cjs/zonos-shipping-rich-radio.cjs.entry.js +3 -3
  38. package/dist/cjs/zonos-stripe-input.cjs.entry.js +4 -4
  39. package/dist/cjs/zonos-text.cjs.entry.js +2 -2
  40. package/dist/cjs/zonos-toggle.cjs.entry.js +2 -2
  41. package/dist/cjs/zonos-tooltip.cjs.entry.js +1 -1
  42. package/dist/cjs/zonos-v-stack.cjs.entry.js +2 -2
  43. package/dist/cjs/{zonosStore-5d489c65.js → zonosStore-37a4b4f4.js} +1 -1
  44. package/dist/collection/components/checkout/zonos-checkout/zonos-cart-subtotal/zonos-cart-subtotal.js +68 -7
  45. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.js +1 -1
  46. package/dist/collection/components/checkout/zonos-checkout/zonos-customer-info/zonos-customer-info.css +4 -0
  47. package/dist/collection/components/checkout/zonos-checkout/zonos-customer-info/zonos-customer-info.js +115 -6
  48. package/dist/collection/components/checkout/zonos-checkout/zonos-review/zonos-review.js +2 -1
  49. package/dist/collection/components/common/zonos-country-select/zonos-country-select.js +7 -4
  50. package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog.js +54 -43
  51. package/dist/collection/components/main/zonos-controller.js +5 -2
  52. package/dist/collection/components/store/hello/localization.js +47 -16
  53. package/dist/collection/components/store/translationStore/strings.arabic.js +30 -18
  54. package/dist/collection/components/store/translationStore/strings.base.js +30 -18
  55. package/dist/collection/components/store/translationStore/strings.chinese.js +30 -18
  56. package/dist/collection/components/store/translationStore/strings.danish.js +30 -18
  57. package/dist/collection/components/store/translationStore/strings.dutch.js +30 -18
  58. package/dist/collection/components/store/translationStore/strings.french.js +30 -18
  59. package/dist/collection/components/store/translationStore/strings.german.js +30 -18
  60. package/dist/collection/components/store/translationStore/strings.hebrew.js +30 -18
  61. package/dist/collection/components/store/translationStore/strings.indonesian.js +30 -18
  62. package/dist/collection/components/store/translationStore/strings.italian.js +30 -18
  63. package/dist/collection/components/store/translationStore/strings.japanese.js +30 -18
  64. package/dist/collection/components/store/translationStore/strings.korean.js +30 -18
  65. package/dist/collection/components/store/translationStore/strings.norwegian.js +30 -18
  66. package/dist/collection/components/store/translationStore/strings.polish.js +30 -18
  67. package/dist/collection/components/store/translationStore/strings.portuguese.js +30 -18
  68. package/dist/collection/components/store/translationStore/strings.russian.js +30 -18
  69. package/dist/collection/components/store/translationStore/strings.spanish.js +30 -18
  70. package/dist/collection/components/store/translationStore/strings.swedish.js +30 -18
  71. package/dist/collection/components/store/translationStore/strings.turkish.js +30 -18
  72. package/dist/collection/components/store/translationStore/strings.vietnamese.js +30 -18
  73. package/dist/collection/components/store/translationStore.js +1 -1
  74. package/dist/collection/components/stripe/zonos-address/zonos-address.js +1 -1
  75. package/dist/collection/components/stripe/zonos-custom-address/zonos-address-suggestions/zonos-address-suggestions.js +2 -2
  76. package/dist/collection/components/stripe/zonos-custom-address/zonos-custom-address.js +2 -2
  77. package/dist/collection/components/stripe/zonos-link-authentication/zonos-link-authentication.js +18 -2
  78. package/dist/collection/components/stripe/zonos-payment/zonos-payment.js +1 -1
  79. package/dist/collection/components/utils/api/{getInclusivePricing.js → getInclusivePriceConfigurations.js} +1 -1
  80. package/dist/collection/components/utils/api/getLocalization.js +2 -5
  81. package/dist/collection/components/utils/api/getZonosSettings.js +5 -0
  82. package/dist/collection/components/utils/api/prepCalculateLandedCost.js +6 -0
  83. package/dist/collection/components/utils/checkout/renderCheckoutCurrency.js +10 -5
  84. package/dist/collection/components/utils/checkout/watchBigcommerceDomesticCheckout.js +4 -1
  85. package/dist/collection/components/utils/getOverridenZCountry.js +11 -0
  86. package/dist/collection/components/utils/hasInclusivePrice.js +10 -0
  87. package/dist/collection/components/utils/hello/currencyConversion/applyInclusiveEffectiveRate.js +10 -0
  88. package/dist/collection/components/utils/hello/currencyConversion/applyInclusivePrice.js +39 -0
  89. package/dist/collection/components/utils/hello/currencyConversion/calculateInclusivePrice.js +32 -0
  90. package/dist/collection/components/utils/hello/currencyConversion/defaultCurrencyConverter.js +11 -6
  91. package/dist/collection/constants/key.js +9 -0
  92. package/dist/collection/types/InclusivePricing.js +1 -0
  93. package/dist/collection/types/InputFieldLabel.js +1 -0
  94. package/dist/collection/types/generated/graphql.internal.types.js +574 -3
  95. package/dist/collection/types/index.js +1 -0
  96. package/dist/collection/utils/performBlurCurrency.js +38 -5
  97. package/dist/esm/{cart-c74f9aaa.js → cart-14f305b3.js} +9 -5
  98. package/dist/esm/{debounce-f081e4d8.js → debounce-c4785346.js} +1 -1
  99. package/dist/esm/{getBorderRadius-6281d902.js → getBorderRadius-877f6389.js} +1 -1
  100. package/dist/esm/hasInclusivePrice-0eda8ba9.js +20 -0
  101. package/dist/esm/{index-55a03023.js → index-0bbe9693.js} +352 -4
  102. package/dist/esm/index.js +7 -7
  103. package/dist/esm/{isDarkColor-83e0c27e.js → isDarkColor-9ddd90cc.js} +1 -1
  104. package/dist/esm/loader.js +3 -3
  105. package/dist/esm/{localization-106476cb.js → localization-c5029ffc.js} +118 -32
  106. package/dist/esm/{paypal-bf3a2bdd.js → paypal-fded8844.js} +5 -5
  107. package/dist/esm/{placeTestOrder-891295e8.js → placeTestOrder-2250f719.js} +11 -7
  108. package/dist/esm/{renderFallback-ce0e238a.js → renderFallback-dbf1e3ae.js} +4 -4
  109. package/dist/esm/{translationStore-766b7521.js → translationStore-690c4e04.js} +602 -362
  110. package/dist/esm/{updateCheckoutSessionAttributes-160720f6.js → updateCheckoutSessionAttributes-047a6cd4.js} +1 -1
  111. package/dist/esm/zonos-address_11.entry.js +31 -15
  112. package/dist/esm/zonos-badge.entry.js +2 -2
  113. package/dist/esm/zonos-banner_2.entry.js +3 -3
  114. package/dist/esm/zonos-button_3.entry.js +4 -4
  115. package/dist/esm/zonos-cart-items_13.entry.js +193 -25
  116. package/dist/esm/zonos-checkout.entry.js +14 -11
  117. package/dist/esm/zonos-collapse.entry.js +2 -2
  118. package/dist/esm/zonos-collect-cart-items_3.entry.js +7 -7
  119. package/dist/esm/zonos-collect-finish_6.entry.js +10 -10
  120. package/dist/esm/zonos-collect.entry.js +9 -9
  121. package/dist/esm/zonos-component.entry.js +1 -1
  122. package/dist/esm/zonos-confirm-dialog_2.entry.js +4 -4
  123. package/dist/esm/zonos-controller.entry.js +16 -9
  124. package/dist/esm/zonos-country-flag.entry.js +4 -4
  125. package/dist/esm/zonos-country-select_4.entry.js +12 -9
  126. package/dist/esm/zonos-elements.js +3 -3
  127. package/dist/esm/zonos-empty-state-payment_4.entry.js +9 -9
  128. package/dist/esm/zonos-hello-dialog.entry.js +57 -47
  129. package/dist/esm/zonos-hello.entry.js +5 -5
  130. package/dist/esm/zonos-input.entry.js +3 -3
  131. package/dist/esm/zonos-language-select_2.entry.js +4 -4
  132. package/dist/esm/zonos-logo.entry.js +2 -2
  133. package/dist/esm/zonos-shipping-rich-radio.entry.js +3 -3
  134. package/dist/esm/zonos-stripe-input.entry.js +4 -4
  135. package/dist/esm/zonos-text.entry.js +2 -2
  136. package/dist/esm/zonos-toggle.entry.js +2 -2
  137. package/dist/esm/zonos-tooltip.entry.js +1 -1
  138. package/dist/esm/zonos-v-stack.entry.js +2 -2
  139. package/dist/esm/{zonosStore-e3d0493a.js → zonosStore-b434e436.js} +1 -1
  140. package/dist/esm-es5/cart-14f305b3.js +1 -0
  141. package/dist/esm-es5/{debounce-f081e4d8.js → debounce-c4785346.js} +1 -1
  142. package/dist/esm-es5/{getBorderRadius-6281d902.js → getBorderRadius-877f6389.js} +1 -1
  143. package/dist/esm-es5/hasInclusivePrice-0eda8ba9.js +1 -0
  144. package/dist/esm-es5/index-0bbe9693.js +2 -0
  145. package/dist/esm-es5/index.js +1 -1
  146. package/dist/esm-es5/{isDarkColor-83e0c27e.js → isDarkColor-9ddd90cc.js} +1 -1
  147. package/dist/esm-es5/loader.js +1 -1
  148. package/dist/esm-es5/localization-c5029ffc.js +1 -0
  149. package/dist/esm-es5/{paypal-bf3a2bdd.js → paypal-fded8844.js} +1 -1
  150. package/dist/esm-es5/placeTestOrder-2250f719.js +1 -0
  151. package/dist/esm-es5/{renderFallback-ce0e238a.js → renderFallback-dbf1e3ae.js} +1 -1
  152. package/dist/esm-es5/translationStore-690c4e04.js +1 -0
  153. package/dist/esm-es5/{updateCheckoutSessionAttributes-160720f6.js → updateCheckoutSessionAttributes-047a6cd4.js} +1 -1
  154. package/dist/esm-es5/zonos-address_11.entry.js +1 -1
  155. package/dist/esm-es5/zonos-badge.entry.js +1 -1
  156. package/dist/esm-es5/zonos-banner_2.entry.js +1 -1
  157. package/dist/esm-es5/zonos-button_3.entry.js +1 -1
  158. package/dist/esm-es5/zonos-cart-items_13.entry.js +1 -1
  159. package/dist/esm-es5/zonos-checkout.entry.js +1 -1
  160. package/dist/esm-es5/zonos-collapse.entry.js +1 -1
  161. package/dist/esm-es5/zonos-collect-cart-items_3.entry.js +1 -1
  162. package/dist/esm-es5/zonos-collect-finish_6.entry.js +1 -1
  163. package/dist/esm-es5/zonos-collect.entry.js +1 -1
  164. package/dist/esm-es5/zonos-component.entry.js +1 -1
  165. package/dist/esm-es5/zonos-confirm-dialog_2.entry.js +1 -1
  166. package/dist/esm-es5/zonos-controller.entry.js +1 -1
  167. package/dist/esm-es5/zonos-country-flag.entry.js +1 -1
  168. package/dist/esm-es5/zonos-country-select_4.entry.js +1 -1
  169. package/dist/esm-es5/zonos-elements.js +1 -1
  170. package/dist/esm-es5/zonos-empty-state-payment_4.entry.js +1 -1
  171. package/dist/esm-es5/zonos-hello-dialog.entry.js +1 -1
  172. package/dist/esm-es5/zonos-hello.entry.js +1 -1
  173. package/dist/esm-es5/zonos-input.entry.js +1 -1
  174. package/dist/esm-es5/zonos-language-select_2.entry.js +1 -1
  175. package/dist/esm-es5/zonos-logo.entry.js +1 -1
  176. package/dist/esm-es5/zonos-shipping-rich-radio.entry.js +1 -1
  177. package/dist/esm-es5/zonos-stripe-input.entry.js +1 -1
  178. package/dist/esm-es5/zonos-text.entry.js +1 -1
  179. package/dist/esm-es5/zonos-toggle.entry.js +1 -1
  180. package/dist/esm-es5/zonos-tooltip.entry.js +1 -1
  181. package/dist/esm-es5/zonos-v-stack.entry.js +1 -1
  182. package/dist/esm-es5/{zonosStore-e3d0493a.js → zonosStore-b434e436.js} +1 -1
  183. package/dist/scripts/blurCurrencyOnInit.js +1 -1
  184. package/dist/scripts/index.d.ts +62 -8
  185. package/dist/scripts/index.js +1 -1
  186. package/dist/scripts/loadZonos.js +1 -1
  187. package/dist/scripts/zonos.js +1 -1
  188. package/dist/types/components/checkout/zonos-checkout/zonos-cart-subtotal/zonos-cart-subtotal.d.ts +2 -0
  189. package/dist/types/components/checkout/zonos-checkout/zonos-customer-info/zonos-customer-info.d.ts +11 -0
  190. package/dist/types/components/hello/zonos-hello-dialog/zonos-hello-dialog.d.ts +1 -1
  191. package/dist/types/components/store/checkout/cart.d.ts +3 -0
  192. package/dist/types/components/store/hello/localization.d.ts +14 -3
  193. package/dist/types/components/store/translationStore/strings.arabic.d.ts +27 -15
  194. package/dist/types/components/store/translationStore/strings.base.d.ts +27 -15
  195. package/dist/types/components/store/translationStore/strings.chinese.d.ts +27 -15
  196. package/dist/types/components/store/translationStore/strings.danish.d.ts +27 -15
  197. package/dist/types/components/store/translationStore/strings.dutch.d.ts +27 -15
  198. package/dist/types/components/store/translationStore/strings.french.d.ts +27 -15
  199. package/dist/types/components/store/translationStore/strings.german.d.ts +27 -15
  200. package/dist/types/components/store/translationStore/strings.hebrew.d.ts +27 -15
  201. package/dist/types/components/store/translationStore/strings.indonesian.d.ts +27 -15
  202. package/dist/types/components/store/translationStore/strings.italian.d.ts +27 -15
  203. package/dist/types/components/store/translationStore/strings.japanese.d.ts +27 -15
  204. package/dist/types/components/store/translationStore/strings.korean.d.ts +27 -15
  205. package/dist/types/components/store/translationStore/strings.norwegian.d.ts +27 -15
  206. package/dist/types/components/store/translationStore/strings.polish.d.ts +27 -15
  207. package/dist/types/components/store/translationStore/strings.portuguese.d.ts +27 -15
  208. package/dist/types/components/store/translationStore/strings.russian.d.ts +27 -15
  209. package/dist/types/components/store/translationStore/strings.spanish.d.ts +27 -15
  210. package/dist/types/components/store/translationStore/strings.swedish.d.ts +27 -15
  211. package/dist/types/components/store/translationStore/strings.turkish.d.ts +27 -15
  212. package/dist/types/components/store/translationStore/strings.vietnamese.d.ts +27 -15
  213. package/dist/types/components/store/translationStore.d.ts +1 -1
  214. package/dist/types/components/utils/api/getInclusivePriceConfigurations.d.ts +2 -0
  215. package/dist/types/components/utils/getOverridenZCountry.d.ts +5 -0
  216. package/dist/types/components/utils/hasInclusivePrice.d.ts +1 -0
  217. package/dist/types/components/utils/hello/currencyConversion/applyInclusiveEffectiveRate.d.ts +1 -0
  218. package/dist/types/components/utils/hello/currencyConversion/applyInclusivePrice.d.ts +1 -0
  219. package/dist/types/components/utils/hello/currencyConversion/calculateInclusivePrice.d.ts +27 -0
  220. package/dist/types/constants/key.d.ts +9 -0
  221. package/dist/types/scripts/cart/_setupCartDataWithSettings.d.ts +1 -0
  222. package/dist/types/types/InclusivePricing.d.ts +13 -0
  223. package/dist/types/types/InputFieldLabel.d.ts +1 -0
  224. package/dist/types/types/checkout/api/CalculateLandedCost.d.ts +1 -0
  225. package/dist/types/types/checkout/api/NormalizedTempCart.d.ts +2 -0
  226. package/dist/types/types/generated/graphql.internal.types.d.ts +686 -53
  227. package/dist/types/types/generated/graphql.internal.types.ts +740 -52
  228. package/dist/types/types/index.d.ts +1 -0
  229. package/dist/types/types/utils/ZonosSettings.d.ts +2 -0
  230. package/dist/types/utils/performBlurCurrency.d.ts +12 -0
  231. package/dist/zonos-elements/assets/RemoveIcon.svg +1 -1
  232. package/dist/zonos-elements/index.esm.js +1 -1
  233. package/dist/zonos-elements/{p-b91df44b.system.entry.js → p-00ac999f.system.entry.js} +1 -1
  234. package/dist/zonos-elements/{p-4523b982.entry.js → p-00ec22b2.entry.js} +1 -1
  235. package/dist/zonos-elements/{p-bd373de0.system.entry.js → p-03ff7b01.system.entry.js} +1 -1
  236. package/dist/zonos-elements/{p-5f7a9b69.system.entry.js → p-0a90dd80.system.entry.js} +1 -1
  237. package/dist/zonos-elements/p-100f6a88.system.entry.js +1 -0
  238. package/dist/zonos-elements/{p-cf56b990.entry.js → p-143d706b.entry.js} +1 -1
  239. package/dist/zonos-elements/p-14d7489d.js +1 -0
  240. package/dist/zonos-elements/p-1d5aa016.system.js +1 -0
  241. package/dist/zonos-elements/p-1eae4987.entry.js +1 -0
  242. package/dist/zonos-elements/p-1f894984.js +1 -0
  243. package/dist/zonos-elements/{p-6c8e4f01.system.entry.js → p-23b45714.system.entry.js} +1 -1
  244. package/dist/zonos-elements/{p-433d76b4.system.js → p-23d497e3.system.js} +1 -1
  245. package/dist/zonos-elements/p-2557b96b.js +1 -0
  246. package/dist/zonos-elements/{p-f912e9c3.entry.js → p-27874c22.entry.js} +1 -1
  247. package/dist/zonos-elements/{p-b0a75761.entry.js → p-2ca8b037.entry.js} +1 -1
  248. package/dist/zonos-elements/p-2dbcecf4.entry.js +1 -0
  249. package/dist/zonos-elements/p-30e835a8.entry.js +1 -0
  250. package/dist/zonos-elements/{p-236e0144.system.entry.js → p-316f9052.system.entry.js} +1 -1
  251. package/dist/zonos-elements/{p-5608ac9d.entry.js → p-3185968f.entry.js} +1 -1
  252. package/dist/zonos-elements/{p-fa90adb8.entry.js → p-31975752.entry.js} +1 -1
  253. package/dist/zonos-elements/{p-6bab9096.entry.js → p-31af91f0.entry.js} +1 -1
  254. package/dist/zonos-elements/{p-38f42f10.system.entry.js → p-452fb638.system.entry.js} +1 -1
  255. package/dist/zonos-elements/{p-c998e4ed.entry.js → p-4592ae49.entry.js} +1 -1
  256. package/dist/zonos-elements/p-4e41143a.system.entry.js +1 -0
  257. package/dist/zonos-elements/{p-f548807d.system.entry.js → p-52b87408.system.entry.js} +1 -1
  258. package/dist/zonos-elements/{p-cb11d11b.system.entry.js → p-540cec7e.system.entry.js} +1 -1
  259. package/dist/zonos-elements/{p-d2f7ea09.entry.js → p-55e2e4ed.entry.js} +1 -1
  260. package/dist/zonos-elements/p-561be3a2.system.js +1 -0
  261. package/dist/zonos-elements/{p-a199bb13.js → p-5762e217.js} +1 -1
  262. package/dist/zonos-elements/{p-e688e493.js → p-57fa64d7.js} +1 -1
  263. package/dist/zonos-elements/{p-360d7101.system.entry.js → p-59ebb8c7.system.entry.js} +1 -1
  264. package/dist/zonos-elements/p-5c680f72.js +1 -0
  265. package/dist/zonos-elements/{p-cbb01de9.entry.js → p-5f398c28.entry.js} +1 -1
  266. package/dist/zonos-elements/p-5f77d19e.js +1 -0
  267. package/dist/zonos-elements/p-60469388.system.entry.js +1 -0
  268. package/dist/zonos-elements/{p-caebc1f8.system.js → p-652e80f0.system.js} +1 -1
  269. package/dist/zonos-elements/{p-4da7b6a8.system.entry.js → p-6adfb3af.system.entry.js} +1 -1
  270. package/dist/zonos-elements/{p-2b84039a.entry.js → p-74ca7739.entry.js} +1 -1
  271. package/dist/zonos-elements/{p-de984173.system.js → p-767a31a8.system.js} +1 -1
  272. package/dist/zonos-elements/{p-38f2f63f.system.entry.js → p-770852bf.system.entry.js} +1 -1
  273. package/dist/zonos-elements/p-7c705c76.system.js +1 -0
  274. package/dist/zonos-elements/{p-2db90c99.system.entry.js → p-81ba2820.system.entry.js} +1 -1
  275. package/dist/zonos-elements/{p-964a4d85.js → p-82739127.js} +2 -2
  276. package/dist/zonos-elements/p-88ea9f82.entry.js +1 -0
  277. package/dist/zonos-elements/p-8a23bbf5.js +1 -0
  278. package/dist/zonos-elements/{p-10894d36.entry.js → p-905d2490.entry.js} +1 -1
  279. package/dist/zonos-elements/{p-24e26a2c.system.js → p-909e2bc3.system.js} +1 -1
  280. package/dist/zonos-elements/{p-b658c28a.entry.js → p-936b54c1.entry.js} +1 -1
  281. package/dist/zonos-elements/{p-288f5a5b.system.entry.js → p-93f2e1ee.system.entry.js} +1 -1
  282. package/dist/zonos-elements/p-989d3af9.system.js +2 -0
  283. package/dist/zonos-elements/{p-d96545ae.entry.js → p-9b8750f3.entry.js} +1 -1
  284. package/dist/zonos-elements/p-a0a4e43d.system.entry.js +1 -0
  285. package/dist/zonos-elements/{p-c89e9d56.system.js → p-a25428eb.system.js} +1 -1
  286. package/dist/zonos-elements/{p-7a97e1cf.system.entry.js → p-a2819807.system.entry.js} +1 -1
  287. package/dist/zonos-elements/{p-6d423364.entry.js → p-a6e74856.entry.js} +1 -1
  288. package/dist/zonos-elements/p-ab41bab5.js +2 -0
  289. package/dist/zonos-elements/p-ae940a99.js +1 -0
  290. package/dist/zonos-elements/{p-dc56b469.system.entry.js → p-b1fd1ec2.system.entry.js} +1 -1
  291. package/dist/zonos-elements/{p-7af39c98.js → p-b2a0ab4a.js} +1 -1
  292. package/dist/zonos-elements/{p-23f6a2fb.system.entry.js → p-b7ea5f4f.system.entry.js} +1 -1
  293. package/dist/zonos-elements/{p-c81f6387.entry.js → p-bf9d889f.entry.js} +1 -1
  294. package/dist/zonos-elements/p-c1ecab92.entry.js +1 -0
  295. package/dist/zonos-elements/{p-81b357f7.system.js → p-c2442878.system.js} +1 -1
  296. package/dist/zonos-elements/{p-7e5bd9af.system.entry.js → p-c288c6da.system.entry.js} +1 -1
  297. package/dist/zonos-elements/{p-b4bf2f03.entry.js → p-c50cc926.entry.js} +1 -1
  298. package/dist/zonos-elements/{p-b6ef4a5e.system.entry.js → p-c5cb2364.system.entry.js} +1 -1
  299. package/dist/zonos-elements/{p-57413c34.system.js → p-c6e3d747.system.js} +1 -1
  300. package/dist/zonos-elements/{p-2dc38ef3.entry.js → p-c7b658cb.entry.js} +1 -1
  301. package/dist/zonos-elements/p-cf765af3.system.js +1 -0
  302. package/dist/zonos-elements/{p-89c5164b.system.js → p-d45285aa.system.js} +1 -1
  303. package/dist/zonos-elements/{p-bccd49d7.system.entry.js → p-d556c6d1.system.entry.js} +1 -1
  304. package/dist/zonos-elements/{p-1a67ae71.system.entry.js → p-db628e49.system.entry.js} +1 -1
  305. package/dist/zonos-elements/p-e03e1a62.entry.js +1 -0
  306. package/dist/zonos-elements/{p-6f1024de.system.entry.js → p-e7874318.system.entry.js} +1 -1
  307. package/dist/zonos-elements/p-e8949e7e.entry.js +1 -0
  308. package/dist/zonos-elements/p-ea0b5d10.system.js +1 -0
  309. package/dist/zonos-elements/p-eae3462c.entry.js +1 -0
  310. package/dist/zonos-elements/{p-b669050d.system.entry.js → p-eea0eb57.system.entry.js} +1 -1
  311. package/dist/zonos-elements/p-f892595d.system.entry.js +1 -0
  312. package/dist/zonos-elements/{p-23c46dfa.system.js → p-f8d56ba9.system.js} +1 -1
  313. package/dist/zonos-elements/p-fc776473.js +1 -0
  314. package/dist/zonos-elements/p-fd3b46ee.entry.js +1 -0
  315. package/dist/zonos-elements/zonos-elements.esm.js +1 -1
  316. package/dist/zonos-elements/zonos-elements.js +1 -1
  317. package/package.json +3 -3
  318. package/dist/esm-es5/cart-c74f9aaa.js +0 -1
  319. package/dist/esm-es5/index-55a03023.js +0 -2
  320. package/dist/esm-es5/localization-106476cb.js +0 -1
  321. package/dist/esm-es5/placeTestOrder-891295e8.js +0 -1
  322. package/dist/esm-es5/translationStore-766b7521.js +0 -1
  323. package/dist/types/components/utils/api/getInclusivePricing.d.ts +0 -6
  324. package/dist/zonos-elements/p-053a042e.entry.js +0 -1
  325. package/dist/zonos-elements/p-0ffd710e.js +0 -1
  326. package/dist/zonos-elements/p-1d15662c.js +0 -1
  327. package/dist/zonos-elements/p-203c7fda.js +0 -1
  328. package/dist/zonos-elements/p-21b251f0.system.entry.js +0 -1
  329. package/dist/zonos-elements/p-225a61c4.system.entry.js +0 -1
  330. package/dist/zonos-elements/p-258570ce.entry.js +0 -1
  331. package/dist/zonos-elements/p-462f8857.entry.js +0 -1
  332. package/dist/zonos-elements/p-57ee34aa.system.entry.js +0 -1
  333. package/dist/zonos-elements/p-595668d7.system.js +0 -1
  334. package/dist/zonos-elements/p-5fc34563.system.js +0 -2
  335. package/dist/zonos-elements/p-62803534.entry.js +0 -1
  336. package/dist/zonos-elements/p-6497ce22.entry.js +0 -1
  337. package/dist/zonos-elements/p-65db3219.entry.js +0 -1
  338. package/dist/zonos-elements/p-783e7fa7.entry.js +0 -1
  339. package/dist/zonos-elements/p-9972941a.entry.js +0 -1
  340. package/dist/zonos-elements/p-ad7be556.system.entry.js +0 -1
  341. package/dist/zonos-elements/p-b30c2ad9.js +0 -2
  342. package/dist/zonos-elements/p-b4fe3604.system.js +0 -1
  343. package/dist/zonos-elements/p-b8293509.js +0 -1
  344. package/dist/zonos-elements/p-bdeb20cb.js +0 -1
  345. package/dist/zonos-elements/p-c3c3cd98.js +0 -1
  346. package/dist/zonos-elements/p-c6d0e87d.system.entry.js +0 -1
  347. package/dist/zonos-elements/p-cdaf52f4.system.js +0 -1
  348. package/dist/zonos-elements/p-cef1e888.system.js +0 -1
  349. package/dist/zonos-elements/p-eea0d8af.js +0 -1
  350. package/dist/zonos-elements/p-f4085c23.entry.js +0 -1
@@ -1 +1 @@
1
- var __awaiter=this&&this.__awaiter||function(t,n,e,r){function i(t){return t instanceof e?t:new e((function(n){n(t)}))}return new(e||(e=Promise))((function(e,u){function o(t){try{a(r.next(t))}catch(t){u(t)}}function c(t){try{a(r["throw"](t))}catch(t){u(t)}}function a(t){t.done?e(t.value):i(t.value).then(o,c)}a((r=r.apply(t,n||[])).next())}))};var __generator=this&&this.__generator||function(t,n){var e={label:0,sent:function(){if(u[0]&1)throw u[1];return u[1]},trys:[],ops:[]},r,i,u,o;return o={next:c(0),throw:c(1),return:c(2)},typeof Symbol==="function"&&(o[Symbol.iterator]=function(){return this}),o;function c(t){return function(n){return a([t,n])}}function a(c){if(r)throw new TypeError("Generator is already executing.");while(o&&(o=0,c[0]&&(e=0)),e)try{if(r=1,i&&(u=c[0]&2?i["return"]:c[0]?i["throw"]||((u=i["return"])&&u.call(i),0):i.next)&&!(u=u.call(i,c[1])).done)return u;if(i=0,u)c=[c[0]&2,u.value];switch(c[0]){case 0:case 1:u=c;break;case 4:e.label++;return{value:c[1],done:false};case 5:e.label++;i=c[1];c=[0];continue;case 7:c=e.ops.pop();e.trys.pop();continue;default:if(!(u=e.trys,u=u.length>0&&u[u.length-1])&&(c[0]===6||c[0]===2)){e=0;continue}if(c[0]===3&&(!u||c[1]>u[0]&&c[1]<u[3])){e.label=c[1];break}if(c[0]===6&&e.label<u[1]){e.label=u[1];u=c;break}if(u&&e.label<u[2]){e.label=u[2];e.ops.push(c);break}if(u[2])e.ops.pop();e.trys.pop();continue}c=n.call(t,e)}catch(t){c=[6,t];i=0}finally{r=u=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:true}}};System.register(["./p-57413c34.system.js","./p-01174496.system.js"],(function(t){"use strict";var n,e,r;return{setters:[function(t){n=t.d},function(t){e=t.h;r=t.l}],execute:function(){var i=this;var u={};var o={};var c=function(t){return n((function(){return __awaiter(i,void 0,void 0,(function(){var n,i,o,c,a,s;return __generator(this,(function(f){switch(f.label){case 0:o=Array.from(((n=u[t])===null||n===void 0?void 0:n.entries())||[]).map((function(t){var n=t[0],e=t[1];return{key:n,value:e}}));return[4,e("/api/zonos-elements/update-checkout-session-attributes",{body:{attributes:o,id:t},method:"POST"})];case 1:c=f.sent(),a=c.errors,s=c.json;if(a.length){r("Error updating checkout session attributes",a);return[2,{success:false}]}(i=u[t])===null||i===void 0?void 0:i.clear();return[2,{success:!!(s===null||s===void 0?void 0:s.success)}]}}))}))}),1e3,{maxWait:5e3})};var a=t("u",(function(t){return __awaiter(i,[t],void 0,(function(t){var n=t.attributes,e=t.checkoutSessionId;return __generator(this,(function(t){u[e]||(u[e]=new Map);n.forEach((function(t){var n;if(t.value){(n=u[e])===null||n===void 0?void 0:n.set(t.key,t.value)}}));if(!n.length){return[2]}if(!o[e]){o[e]=c(e)}return[2,o[e]()]}))}))}))}}}));
1
+ var __awaiter=this&&this.__awaiter||function(t,n,e,r){function i(t){return t instanceof e?t:new e((function(n){n(t)}))}return new(e||(e=Promise))((function(e,u){function o(t){try{a(r.next(t))}catch(t){u(t)}}function c(t){try{a(r["throw"](t))}catch(t){u(t)}}function a(t){t.done?e(t.value):i(t.value).then(o,c)}a((r=r.apply(t,n||[])).next())}))};var __generator=this&&this.__generator||function(t,n){var e={label:0,sent:function(){if(u[0]&1)throw u[1];return u[1]},trys:[],ops:[]},r,i,u,o;return o={next:c(0),throw:c(1),return:c(2)},typeof Symbol==="function"&&(o[Symbol.iterator]=function(){return this}),o;function c(t){return function(n){return a([t,n])}}function a(c){if(r)throw new TypeError("Generator is already executing.");while(o&&(o=0,c[0]&&(e=0)),e)try{if(r=1,i&&(u=c[0]&2?i["return"]:c[0]?i["throw"]||((u=i["return"])&&u.call(i),0):i.next)&&!(u=u.call(i,c[1])).done)return u;if(i=0,u)c=[c[0]&2,u.value];switch(c[0]){case 0:case 1:u=c;break;case 4:e.label++;return{value:c[1],done:false};case 5:e.label++;i=c[1];c=[0];continue;case 7:c=e.ops.pop();e.trys.pop();continue;default:if(!(u=e.trys,u=u.length>0&&u[u.length-1])&&(c[0]===6||c[0]===2)){e=0;continue}if(c[0]===3&&(!u||c[1]>u[0]&&c[1]<u[3])){e.label=c[1];break}if(c[0]===6&&e.label<u[1]){e.label=u[1];u=c;break}if(u&&e.label<u[2]){e.label=u[2];e.ops.push(c);break}if(u[2])e.ops.pop();e.trys.pop();continue}c=n.call(t,e)}catch(t){c=[6,t];i=0}finally{r=u=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:true}}};System.register(["./p-c6e3d747.system.js","./p-01174496.system.js"],(function(t){"use strict";var n,e,r;return{setters:[function(t){n=t.d},function(t){e=t.h;r=t.l}],execute:function(){var i=this;var u={};var o={};var c=function(t){return n((function(){return __awaiter(i,void 0,void 0,(function(){var n,i,o,c,a,s;return __generator(this,(function(f){switch(f.label){case 0:o=Array.from(((n=u[t])===null||n===void 0?void 0:n.entries())||[]).map((function(t){var n=t[0],e=t[1];return{key:n,value:e}}));return[4,e("/api/zonos-elements/update-checkout-session-attributes",{body:{attributes:o,id:t},method:"POST"})];case 1:c=f.sent(),a=c.errors,s=c.json;if(a.length){r("Error updating checkout session attributes",a);return[2,{success:false}]}(i=u[t])===null||i===void 0?void 0:i.clear();return[2,{success:!!(s===null||s===void 0?void 0:s.success)}]}}))}))}),1e3,{maxWait:5e3})};var a=t("u",(function(t){return __awaiter(i,[t],void 0,(function(t){var n=t.attributes,e=t.checkoutSessionId;return __generator(this,(function(t){u[e]||(u[e]=new Map);n.forEach((function(t){var n;if(t.value){(n=u[e])===null||n===void 0?void 0:n.set(t.key,t.value)}}));if(!n.length){return[2]}if(!o[e]){o[e]=c(e)}return[2,o[e]()]}))}))}))}}}));
@@ -0,0 +1 @@
1
+ import{d as s}from"./p-5762e217.js";import{h as t,l as e}from"./p-41dd1cb8.js";const o={},r={},a=async({attributes:a,checkoutSessionId:i})=>{var u;if(o[i]||(o[i]=new Map),a.forEach((s=>{var t;s.value&&(null===(t=o[i])||void 0===t||t.set(s.key,s.value))})),a.length)return r[i]||(r[i]=(u=i,s((async()=>{var s,r;const a=Array.from((null===(s=o[u])||void 0===s?void 0:s.entries())||[]).map((([s,t])=>({key:s,value:t}))),{errors:i,json:n}=await t("/api/zonos-elements/update-checkout-session-attributes",{body:{attributes:a,id:u},method:"POST"});return i.length?(e("Error updating checkout session attributes",i),{success:!1}):(null===(r=o[u])||void 0===r||r.clear(),{success:!!(null==n?void 0:n.success)})}),1e3,{maxWait:5e3}))),r[i]()};export{a as u}
@@ -0,0 +1 @@
1
+ import{r as t,h as e,H as s,a as o}from"./p-ab41bab5.js";import{a as n,l as i}from"./p-2557b96b.js";import{t as r}from"./p-5f77d19e.js";import{f as c}from"./p-b2a0ab4a.js";import{f as u}from"./p-a87561b8.js";import{i as l}from"./p-57fa64d7.js";import{l as a}from"./p-97aceb11.js";import{c as h}from"./p-b4b7f705.js";import"./p-41dd1cb8.js";import"./p-0a377722.js";function d(t){return Array.isArray?Array.isArray(t):"[object Array]"===y(t)}function C(t){return"string"==typeof t}function f(t){return"number"==typeof t}function g(t){return"object"==typeof t}function p(t){return null!=t}function m(t){return!t.trim().length}function y(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":Object.prototype.toString.call(t)}const v=t=>`Missing ${t} property in key`,b=t=>`Property 'weight' in key '${t}' must be a positive integer`,A=Object.prototype.hasOwnProperty;class z{constructor(t){this._keys=[],this._keyMap={};let e=0;t.forEach((t=>{let s=x(t);this._keys.push(s),this._keyMap[s.id]=s,e+=s.weight})),this._keys.forEach((t=>{t.weight/=e}))}get(t){return this._keyMap[t]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}}function x(t){let e=null,s=null,o=null,n=1,i=null;if(C(t)||d(t))o=t,e=M(t),s=L(t);else{if(!A.call(t,"name"))throw new Error(v("name"));const r=t.name;if(o=r,A.call(t,"weight")&&(n=t.weight,n<=0))throw new Error(b(r));e=M(r),s=L(r),i=t.getFn}return{path:e,id:s,weight:n,src:o,getFn:i}}function M(t){return d(t)?t:t.split(".")}function L(t){return d(t)?t.join("."):t}var w={isCaseSensitive:!1,ignoreDiacritics:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:(t,e)=>t.score===e.score?t.idx<e.idx?-1:1:t.score<e.score?-1:1,includeMatches:!1,findAllMatches:!1,minMatchCharLength:1,location:0,threshold:.6,distance:100,useExtendedSearch:!1,getFn:function(t,e){let s=[],o=!1;const n=(t,e,i)=>{if(p(t))if(e[i]){const r=t[e[i]];if(!p(r))return;if(i===e.length-1&&(C(r)||f(r)||function(t){return!0===t||!1===t||function(t){return g(t)&&null!==t}(t)&&"[object Boolean]"==y(t)}(r)))s.push(function(t){return null==t?"":function(t){if("string"==typeof t)return t;let e=t+"";return"0"==e&&1/t==-1/0?"-0":e}(t)}(r));else if(d(r)){o=!0;for(let t=0,s=r.length;t<s;t+=1)n(r[t],e,i+1)}else e.length&&n(r,e,i+1)}else s.push(t)};return n(t,C(e)?e.split("."):e,0),o?s:s[0]},ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1};const F=/[^ ]+/g;class B{constructor({getFn:t=w.getFn,fieldNormWeight:e=w.fieldNormWeight}={}){this.norm=function(t=1,e=3){const s=new Map,o=Math.pow(10,e);return{get(e){const n=e.match(F).length;if(s.has(n))return s.get(n);const i=1/Math.pow(n,.5*t),r=parseFloat(Math.round(i*o)/o);return s.set(n,r),r},clear(){s.clear()}}}(e,3),this.getFn=t,this.isCreated=!1,this.setIndexRecords()}setSources(t=[]){this.docs=t}setIndexRecords(t=[]){this.records=t}setKeys(t=[]){this.keys=t,this._keysMap={},t.forEach(((t,e)=>{this._keysMap[t.id]=e}))}create(){!this.isCreated&&this.docs.length&&(this.isCreated=!0,C(this.docs[0])?this.docs.forEach(((t,e)=>{this._addString(t,e)})):this.docs.forEach(((t,e)=>{this._addObject(t,e)})),this.norm.clear())}add(t){const e=this.size();C(t)?this._addString(t,e):this._addObject(t,e)}removeAt(t){this.records.splice(t,1);for(let e=t,s=this.size();e<s;e+=1)this.records[e].i-=1}getValueForItemAtKeyId(t,e){return t[this._keysMap[e]]}size(){return this.records.length}_addString(t,e){if(!p(t)||m(t))return;let s={v:t,i:e,n:this.norm.get(t)};this.records.push(s)}_addObject(t,e){let s={i:e,$:{}};this.keys.forEach(((e,o)=>{let n=e.getFn?e.getFn(t):this.getFn(t,e.path);if(p(n))if(d(n)){let t=[];const e=[{nestedArrIndex:-1,value:n}];for(;e.length;){const{nestedArrIndex:s,value:o}=e.pop();if(p(o))if(C(o)&&!m(o)){let e={v:o,i:s,n:this.norm.get(o)};t.push(e)}else d(o)&&o.forEach(((t,s)=>{e.push({nestedArrIndex:s,value:t})}))}s.$[o]=t}else if(C(n)&&!m(n)){let t={v:n,n:this.norm.get(n)};s.$[o]=t}})),this.records.push(s)}toJSON(){return{keys:this.keys,records:this.records}}}function D(t,e,{getFn:s=w.getFn,fieldNormWeight:o=w.fieldNormWeight}={}){const n=new B({getFn:s,fieldNormWeight:o});return n.setKeys(t.map(x)),n.setSources(e),n.create(),n}function k(t,{errors:e=0,currentLocation:s=0,expectedLocation:o=0,distance:n=w.distance,ignoreLocation:i=w.ignoreLocation}={}){const r=e/t.length;if(i)return r;const c=Math.abs(o-s);return n?r+c/n:c?1:r}const E=32;function H(t){let e={};for(let s=0,o=t.length;s<o;s+=1){const n=t.charAt(s);e[n]=(e[n]||0)|1<<o-s-1}return e}const I=String.prototype.normalize?t=>t.normalize("NFD").replace(/[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C04\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u192B\u1930-\u193B\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ABE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F]/g,""):t=>t;class V{constructor(t,{location:e=w.location,threshold:s=w.threshold,distance:o=w.distance,includeMatches:n=w.includeMatches,findAllMatches:i=w.findAllMatches,minMatchCharLength:r=w.minMatchCharLength,isCaseSensitive:c=w.isCaseSensitive,ignoreDiacritics:u=w.ignoreDiacritics,ignoreLocation:l=w.ignoreLocation}={}){if(this.options={location:e,threshold:s,distance:o,includeMatches:n,findAllMatches:i,minMatchCharLength:r,isCaseSensitive:c,ignoreDiacritics:u,ignoreLocation:l},t=c?t:t.toLowerCase(),t=u?I(t):t,this.pattern=t,this.chunks=[],!this.pattern.length)return;const a=(t,e)=>{this.chunks.push({pattern:t,alphabet:H(t),startIndex:e})},h=this.pattern.length;if(h>E){let t=0;const e=h%E,s=h-e;for(;t<s;)a(this.pattern.substr(t,E),t),t+=E;if(e){const t=h-E;a(this.pattern.substr(t),t)}}else a(this.pattern,0)}searchIn(t){const{isCaseSensitive:e,ignoreDiacritics:s,includeMatches:o}=this.options;if(t=e?t:t.toLowerCase(),t=s?I(t):t,this.pattern===t){let e={isMatch:!0,score:0};return o&&(e.indices=[[0,t.length-1]]),e}const{location:n,distance:i,threshold:r,findAllMatches:c,minMatchCharLength:u,ignoreLocation:l}=this.options;let a=[],h=0,d=!1;this.chunks.forEach((({pattern:e,alphabet:s,startIndex:C})=>{const{isMatch:f,score:g,indices:p}=function(t,e,s,{location:o=w.location,distance:n=w.distance,threshold:i=w.threshold,findAllMatches:r=w.findAllMatches,minMatchCharLength:c=w.minMatchCharLength,includeMatches:u=w.includeMatches,ignoreLocation:l=w.ignoreLocation}={}){if(e.length>E)throw new Error("Pattern length exceeds max of 32.");const a=e.length,h=t.length,d=Math.max(0,Math.min(o,h));let C=i,f=d;const g=c>1||u,p=g?Array(h):[];let m;for(;(m=t.indexOf(e,f))>-1;){let t=k(e,{currentLocation:m,expectedLocation:d,distance:n,ignoreLocation:l});if(C=Math.min(t,C),f=m+a,g){let t=0;for(;t<a;)p[m+t]=1,t+=1}}f=-1;let y=[],v=1,b=a+h;const A=1<<a-1;for(let o=0;o<a;o+=1){let i=0,c=b;for(;i<c;)k(e,{errors:o,currentLocation:d+c,expectedLocation:d,distance:n,ignoreLocation:l})<=C?i=c:b=c,c=Math.floor((b-i)/2+i);b=c;let u=Math.max(1,d-c+1),m=r?h:Math.min(d+c,h)+a,z=Array(m+2);z[m+1]=(1<<o)-1;for(let i=m;i>=u;i-=1){let r=i-1,c=s[t.charAt(r)];if(g&&(p[r]=+!!c),z[i]=(z[i+1]<<1|1)&c,o&&(z[i]|=(y[i+1]|y[i])<<1|1|y[i+1]),z[i]&A&&(v=k(e,{errors:o,currentLocation:r,expectedLocation:d,distance:n,ignoreLocation:l}),v<=C)){if(C=v,f=r,f<=d)break;u=Math.max(1,2*d-f)}}if(k(e,{errors:o+1,currentLocation:d,expectedLocation:d,distance:n,ignoreLocation:l})>C)break;y=z}const z={isMatch:f>=0,score:Math.max(.001,v)};if(g){const t=function(t=[],e=w.minMatchCharLength){let s=[],o=-1,n=-1,i=0;for(let r=t.length;i<r;i+=1){let r=t[i];r&&-1===o?o=i:r||-1===o||(n=i-1,n-o+1>=e&&s.push([o,n]),o=-1)}return t[i-1]&&i-o>=e&&s.push([o,i-1]),s}(p,c);t.length?u&&(z.indices=t):z.isMatch=!1}return z}(t,e,s,{location:n+C,distance:i,threshold:r,findAllMatches:c,minMatchCharLength:u,includeMatches:o,ignoreLocation:l});f&&(d=!0),h+=g,f&&p&&(a=[...a,...p])}));let C={isMatch:d,score:d?h/this.chunks.length:1};return d&&o&&(C.indices=a),C}}class ${constructor(t){this.pattern=t}static isMultiMatch(t){return Z(t,this.multiRegex)}static isSingleMatch(t){return Z(t,this.singleRegex)}search(){}}function Z(t,e){const s=t.match(e);return s?s[1]:null}class S extends ${constructor(t,{location:e=w.location,threshold:s=w.threshold,distance:o=w.distance,includeMatches:n=w.includeMatches,findAllMatches:i=w.findAllMatches,minMatchCharLength:r=w.minMatchCharLength,isCaseSensitive:c=w.isCaseSensitive,ignoreDiacritics:u=w.ignoreDiacritics,ignoreLocation:l=w.ignoreLocation}={}){super(t),this._bitapSearch=new V(t,{location:e,threshold:s,distance:o,includeMatches:n,findAllMatches:i,minMatchCharLength:r,isCaseSensitive:c,ignoreDiacritics:u,ignoreLocation:l})}static get type(){return"fuzzy"}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(t){return this._bitapSearch.searchIn(t)}}class j extends ${constructor(t){super(t)}static get type(){return"include"}static get multiRegex(){return/^'"(.*)"$/}static get singleRegex(){return/^'(.*)$/}search(t){let e,s=0;const o=[],n=this.pattern.length;for(;(e=t.indexOf(this.pattern,s))>-1;)s=e+n,o.push([e,s-1]);const i=!!o.length;return{isMatch:i,score:i?0:1,indices:o}}}const N=[class extends ${constructor(t){super(t)}static get type(){return"exact"}static get multiRegex(){return/^="(.*)"$/}static get singleRegex(){return/^=(.*)$/}search(t){const e=t===this.pattern;return{isMatch:e,score:e?0:1,indices:[0,this.pattern.length-1]}}},j,class extends ${constructor(t){super(t)}static get type(){return"prefix-exact"}static get multiRegex(){return/^\^"(.*)"$/}static get singleRegex(){return/^\^(.*)$/}search(t){const e=t.startsWith(this.pattern);return{isMatch:e,score:e?0:1,indices:[0,this.pattern.length-1]}}},class extends ${constructor(t){super(t)}static get type(){return"inverse-prefix-exact"}static get multiRegex(){return/^!\^"(.*)"$/}static get singleRegex(){return/^!\^(.*)$/}search(t){const e=!t.startsWith(this.pattern);return{isMatch:e,score:e?0:1,indices:[0,t.length-1]}}},class extends ${constructor(t){super(t)}static get type(){return"inverse-suffix-exact"}static get multiRegex(){return/^!"(.*)"\$$/}static get singleRegex(){return/^!(.*)\$$/}search(t){const e=!t.endsWith(this.pattern);return{isMatch:e,score:e?0:1,indices:[0,t.length-1]}}},class extends ${constructor(t){super(t)}static get type(){return"suffix-exact"}static get multiRegex(){return/^"(.*)"\$$/}static get singleRegex(){return/^(.*)\$$/}search(t){const e=t.endsWith(this.pattern);return{isMatch:e,score:e?0:1,indices:[t.length-this.pattern.length,t.length-1]}}},class extends ${constructor(t){super(t)}static get type(){return"inverse-exact"}static get multiRegex(){return/^!"(.*)"$/}static get singleRegex(){return/^!(.*)$/}search(t){const e=-1===t.indexOf(this.pattern);return{isMatch:e,score:e?0:1,indices:[0,t.length-1]}}},S],R=N.length,_=/ +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/,O=new Set([S.type,j.type]);const W=[];function T(t,e){for(let s=0,o=W.length;s<o;s+=1){let o=W[s];if(o.condition(t,e))return new o(t,e)}return new V(t,e)}const J="$and",K="$path",P=t=>!(!t[J]&&!t.$or),U=t=>({[J]:Object.keys(t).map((e=>({[e]:t[e]})))});function Y(t,e,{auto:s=!0}={}){const o=t=>{let n=Object.keys(t);const i=(t=>!!t[K])(t);if(!i&&n.length>1&&!P(t))return o(U(t));if((t=>!d(t)&&g(t)&&!P(t))(t)){const o=i?t[K]:n[0],r=i?t.$val:t[o];if(!C(r))throw new Error((t=>`Invalid value for key ${t}`)(o));const c={keyId:L(o),pattern:r};return s&&(c.searcher=T(r,e)),c}let r={children:[],operator:n[0]};return n.forEach((e=>{const s=t[e];d(s)&&s.forEach((t=>{r.children.push(o(t))}))})),r};return P(t)||(t=U(t)),o(t)}function q(t,e){const s=t.matches;e.matches=[],p(s)&&s.forEach((t=>{if(!p(t.indices)||!t.indices.length)return;const{indices:s,value:o}=t;let n={indices:s,value:o};t.key&&(n.key=t.key.src),t.idx>-1&&(n.refIndex=t.idx),e.matches.push(n)}))}function G(t,e){e.score=t.score}class Q{constructor(t,e={},s){this.options={...w,...e},this._keyStore=new z(this.options.keys),this.setCollection(t,s)}setCollection(t,e){if(this._docs=t,e&&!(e instanceof B))throw new Error("Incorrect 'index' type");this._myIndex=e||D(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}add(t){p(t)&&(this._docs.push(t),this._myIndex.add(t))}remove(t=(()=>!1)){const e=[];for(let s=0,o=this._docs.length;s<o;s+=1){const n=this._docs[s];t(n,s)&&(this.removeAt(s),s-=1,o-=1,e.push(n))}return e}removeAt(t){this._docs.splice(t,1),this._myIndex.removeAt(t)}getIndex(){return this._myIndex}search(t,{limit:e=-1}={}){const{includeMatches:s,includeScore:o,shouldSort:n,sortFn:i,ignoreFieldNorm:r}=this.options;let c=C(t)?C(this._docs[0])?this._searchStringList(t):this._searchObjectList(t):this._searchLogical(t);return function(t,{ignoreFieldNorm:e=w.ignoreFieldNorm}){t.forEach((t=>{let s=1;t.matches.forEach((({key:t,norm:o,score:n})=>{const i=t?t.weight:null;s*=Math.pow(0===n&&i?Number.EPSILON:n,(i||1)*(e?1:o))})),t.score=s}))}(c,{ignoreFieldNorm:r}),n&&c.sort(i),f(e)&&e>-1&&(c=c.slice(0,e)),function(t,e,{includeMatches:s=w.includeMatches,includeScore:o=w.includeScore}={}){const n=[];return s&&n.push(q),o&&n.push(G),t.map((t=>{const{idx:s}=t,o={item:e[s],refIndex:s};return n.length&&n.forEach((e=>{e(t,o)})),o}))}(c,this._docs,{includeMatches:s,includeScore:o})}_searchStringList(t){const e=T(t,this.options),{records:s}=this._myIndex,o=[];return s.forEach((({v:t,i:s,n})=>{if(!p(t))return;const{isMatch:i,score:r,indices:c}=e.searchIn(t);i&&o.push({item:t,idx:s,matches:[{score:r,value:t,norm:n,indices:c}]})})),o}_searchLogical(t){const e=Y(t,this.options),s=(t,e,o)=>{if(!t.children){const{keyId:s,searcher:n}=t,i=this._findMatches({key:this._keyStore.get(s),value:this._myIndex.getValueForItemAtKeyId(e,s),searcher:n});return i&&i.length?[{idx:o,item:e,matches:i}]:[]}const n=[];for(let i=0,r=t.children.length;i<r;i+=1){const r=s(t.children[i],e,o);if(r.length)n.push(...r);else if(t.operator===J)return[]}return n},o={},n=[];return this._myIndex.records.forEach((({$:t,i})=>{if(p(t)){let r=s(e,t,i);r.length&&(o[i]||(o[i]={idx:i,item:t,matches:[]},n.push(o[i])),r.forEach((({matches:t})=>{o[i].matches.push(...t)})))}})),n}_searchObjectList(t){const e=T(t,this.options),{keys:s,records:o}=this._myIndex,n=[];return o.forEach((({$:t,i:o})=>{if(!p(t))return;let i=[];s.forEach(((s,o)=>{i.push(...this._findMatches({key:s,value:t[o],searcher:e}))})),i.length&&n.push({idx:o,item:t,matches:i})})),n}_findMatches({key:t,value:e,searcher:s}){if(!p(e))return[];let o=[];if(d(e))e.forEach((({v:e,i:n,n:i})=>{if(!p(e))return;const{isMatch:r,score:c,indices:u}=s.searchIn(e);r&&o.push({score:c,key:t,value:e,idx:n,norm:i,indices:u})}));else{const{v:n,n:i}=e,{isMatch:r,score:c,indices:u}=s.searchIn(n);r&&o.push({score:c,key:t,value:n,norm:i,indices:u})}return o}}Q.version="7.1.0",Q.createIndex=D,Q.parseIndex=function(t,{getFn:e=w.getFn,fieldNormWeight:s=w.fieldNormWeight}={}){const{keys:o,records:n}=t,i=new B({getFn:e,fieldNormWeight:s});return i.setKeys(o),i.setIndexRecords(n),i},Q.config=w,Q.parseQuery=Y,W.push(class{constructor(t,{isCaseSensitive:e=w.isCaseSensitive,ignoreDiacritics:s=w.ignoreDiacritics,includeMatches:o=w.includeMatches,minMatchCharLength:n=w.minMatchCharLength,ignoreLocation:i=w.ignoreLocation,findAllMatches:r=w.findAllMatches,location:c=w.location,threshold:u=w.threshold,distance:l=w.distance}={}){this.query=null,this.options={isCaseSensitive:e,ignoreDiacritics:s,includeMatches:o,minMatchCharLength:n,findAllMatches:r,ignoreLocation:i,location:c,threshold:u,distance:l},t=e?t:t.toLowerCase(),t=s?I(t):t,this.pattern=t,this.query=function(t,e={}){return t.split("|").map((t=>{let s=t.trim().split(_).filter((t=>t&&!!t.trim())),o=[];for(let t=0,n=s.length;t<n;t+=1){const n=s[t];let i=!1,r=-1;for(;!i&&++r<R;){const t=N[r];let s=t.isMultiMatch(n);s&&(o.push(new t(s,e)),i=!0)}if(!i)for(r=-1;++r<R;){const t=N[r];let s=t.isSingleMatch(n);if(s){o.push(new t(s,e));break}}}return o}))}(this.pattern,this.options)}static condition(t,e){return e.useExtendedSearch}searchIn(t){const e=this.query;if(!e)return{isMatch:!1,score:1};const{includeMatches:s,isCaseSensitive:o,ignoreDiacritics:n}=this.options;t=o?t:t.toLowerCase(),t=n?I(t):t;let i=0,r=[],c=0;for(let o=0,n=e.length;o<n;o+=1){const n=e[o];r.length=0,i=0;for(let e=0,o=n.length;e<o;e+=1){const o=n[e],{isMatch:u,indices:l,score:a}=o.search(t);if(!u){c=0,i=0,r.length=0;break}i+=1,c+=a,s&&(O.has(o.constructor.type)?r=[...r,...l]:r.push(l))}if(i){let t={isMatch:!0,score:c/i};return s&&(t.indices=r),t}}return{isMatch:!1,score:1}}});const X=class{constructor(e){t(this,e),this.handleOnClose=()=>{},this.inputValue="",this.countrySelected=t=>{n({isInitializing:!1,newSelectedCountryCode:t}),this.handleOnClose()},this.handleInputChange=t=>{var e;this.inputValue=t.target.value;const s=null===(e=this.ele.shadowRoot)||void 0===e?void 0:e.querySelector(".zonos--country-filter-content");s&&(s.scrollTop=0)}}componentDidRender(){var t;this.inputRef.autocomplete="off",null===(t=this.inputRef)||void 0===t||t.focus()}render(){const{helloCountryList:t}=i,o=t?Object.values(t):[],n=new Q(o,{includeScore:!0,keys:["displayName"],threshold:.3}).search(this.inputValue.toLowerCase()),u=this.inputValue?n.map((t=>t.item)):o.sort(((t,e)=>t.displayName.localeCompare(e.displayName))),l=!u.length;return e(s,{key:"4bdbe0a40e52745510cf5c51826375eb46d6c85a",class:"zonos--elements",style:{"--zonos--font-family":c()}},e("div",{key:"82492f3baa43f2691fa9457fdde52fcc6d6b153e",class:"zonos--country-select"},e("zonos-v-stack",{key:"56fa5efa199d1f83f8042b9280295d0e08c9d045",class:"zonos--country-select-header",spacing:8},e("zonos-select-dialog-header",{key:"3b84b57f1b80152fcb0c4049672796c87744517a",handleOnClose:()=>this.handleOnClose(),label:r("Select a country")},e("input",{key:"68b9b5af5dbdf20d47e39c45b3c64df772afb56f",autoComplete:"off",class:"zonos--country-select-input",onInput:this.handleInputChange,placeholder:r("Search countries"),ref:t=>{t&&(this.inputRef=t)},type:"text",value:this.inputValue}))),e("div",{key:"365e7ae9464070080182bb4b83f232d0952eb9c8",class:"zonos--country-select-content"},l&&e("zonos-text",{key:"025ae5379da4ef222c39544bee3b009bc3a3c7a4",class:"no-country",textColor:"gray-800"},r("No countries found")),e("zonos-virtual-scroll",{key:"3ae131cb44d63bd239e3c90cbfcaf8535817c663",class:"zonos--country-filter-content",fallbackItemHeight:34,itemHeights:u.map((()=>34)),renderItem:t=>{const s=u[t];return s?e("button",{class:"zonos--country-select-country",onClick:()=>this.countrySelected(s.code)},e("zonos-country-flag",{class:"zonos--country-flag",countryCode:s.code}),e("zonos-text",{textColor:"gray-800"},s.displayName),s.code===i.selectedCountryCode&&e("zonos-icon",{content:'<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M7.99996 2.6665C5.05444 2.6665 2.66663 5.05432 2.66663 7.99984C2.66663 10.9454 5.05444 13.3332 7.99996 13.3332C10.9455 13.3332 13.3333 10.9454 13.3333 7.99984C13.3333 5.05432 10.9455 2.6665 7.99996 2.6665Z" fill="#AFF8C3"/>\n<path fill-rule="evenodd" clip-rule="evenodd" d="M10.1403 6.10535C10.3582 6.27488 10.3975 6.58902 10.228 6.80699L8.01055 9.65797C7.76436 9.97449 7.29646 10.0036 7.01291 9.72008L5.81307 8.52024C5.61781 8.32498 5.61781 8.0084 5.81307 7.81314C6.00833 7.61787 6.32492 7.61787 6.52018 7.81314L7.45301 8.74597L9.43862 6.19305C9.60815 5.97508 9.92229 5.93581 10.1403 6.10535Z" fill="#246627"/>\n</svg>\n',size:20})):null}}))))}get ele(){return o(this)}};X.style=":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host .zonos--country-select{position:relative;max-height:500px;overflow-y:auto}:host .zonos--country-select .zonos--country-select-header{position:-webkit-sticky;position:sticky;top:0;background:var(--zonos-elements-surface-color);z-index:11}:host .zonos--country-select .zonos--country-select-input{padding:8px;border-radius:var(--zonos-elements-radius-4);border:var(--zonos-elements-border)}:host .zonos--country-select .zonos--country-select-content{padding:16px;padding-top:0px}:host .zonos--country-select .zonos--country-select-content .no-country{position:absolute;left:17px}:host .zonos--country-select .zonos--country-select-content .zonos--country-filter-content{height:300px;display:block}:host .zonos--country-select .zonos--country-select-country{display:-ms-flexbox;display:flex;gap:16px;padding:8px;-ms-flex-align:center;align-items:center;border-radius:var(--zonos-elements-radius-4);cursor:pointer;width:100%;border:none;background:none}:host .zonos--country-select .zonos--country-select-country:hover{background:var(--zonos-elements-gray-100)}:host .zonos--country-select .zonos--country-select-country .zonos--country-flag{border-radius:var(--zonos-elements-radius-4);width:24px;height:18px;position:relative;overflow:hidden;-webkit-box-shadow:var(--zonos-elements-v3-shadow-medium);box-shadow:var(--zonos-elements-v3-shadow-medium);z-index:10;justify-self:center}";const tt=class{constructor(e){t(this,e),this.icon="",this.message=""}render(){const t=u(this.message);return e(s,{key:"77dcb275cd99e2c1618a58e35d7b6aba07cff289",class:"zonos--elements",style:{"--zonos--font-family":c()}},this.message&&e("zonos-card",{key:"61f205819558dd9eb5c9181b8510da6b5304f3e5",class:"zonos--custom-message",spacing:"12px"},e("div",{key:"adc9891709eade8a8f8baf7cc3a840a0340dc834",class:"zonos--flex-message"},e("zonos-icon",{key:"f94f9d8e2717c36a12a5bd4bd3b1eb98b4c1d6a8","aria-label":"Custom message icon",content:this.icon}),e("zonos-text",{key:"e1defbb16081a5873f98f6f251e6acf57ea5ec25",innerHTML:t}))))}};tt.style=":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host .zonos--custom-message{background:var(--zonos-elements-gray-50);border-radius:var(--zonos-elements-radius-6)}:host .zonos--custom-message .zonos--flex-message{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:8px}";const et=class{constructor(e){t(this,e),this.setShowCountrySelect=()=>{},this.setShowLanguageSelect=()=>{}}render(){var t,o;const n=null===(t=this.appearanceSettings)||void 0===t?void 0:t.colorPrimary,r=null===(o=a.find((t=>t.code===i.selectedLocale)))||void 0===o?void 0:o.translatedLabel,c=n&&l(n)?"white":"black";return e(s,{key:"ff7ca3834fbd8febed2ad016add7832c84b3d067",class:"zonos--elements"},e("div",{key:"f3c28cb5afe06a98789e61ed233317402eb7deca",class:"zonos--hello-dialog-footer",style:{"--zonos--primary-color":n}},e("a",{key:"e229fcdcc64734e9ed762f5324c7c35ae88a8e17",href:"https://zonos.com",target:"_blank",title:"Zonos website"},e("zonos-icon",{key:"7eb45e7359e7c5d411801d29f06d7c700633c7f3","aria-label":"Zonos Logo",autoHeight:!0,content:"black"===c?'<svg width="408" height="112" viewBox="0 0 408 112" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M185.6 25.2H141.6C140.716 25.2 140 25.9164 140 26.8V36.4C140 37.2837 140.716 38 141.6 38H167.413C168.07 38 168.447 38.7478 168.056 39.2758L140.627 76.3519C140.22 76.9028 140 77.5699 140 78.2551V85.2001C140 86.0837 140.716 86.8 141.6 86.8H185.6C186.484 86.8 187.2 86.0837 187.2 85.2001V75.6C187.2 74.7164 186.484 74 185.6 74H159.787C159.13 74 158.753 73.2523 159.144 72.7243L186.573 35.6482C186.98 35.0973 187.2 34.4302 187.2 33.745V26.8C187.2 25.9164 186.484 25.2 185.6 25.2Z" fill="#0F1015"/>\n<path fill-rule="evenodd" clip-rule="evenodd" d="M212.8 24.8C203.08 24.8 195.2 32.6798 195.2 42.4V69.6C195.2 79.3203 203.08 87.2001 212.8 87.2001H224.8C234.52 87.2001 242.4 79.3203 242.4 69.6V42.4001C242.4 32.6798 234.52 24.8 224.8 24.8H212.8ZM212.8 37.6C210.149 37.6 208 39.7491 208 42.4001V69.6C208 72.251 210.149 74.4001 212.8 74.4001H224.8C227.451 74.4001 229.6 72.251 229.6 69.6V42.4C229.6 39.7491 227.451 37.6 224.8 37.6H212.8Z" fill="#0F1015"/>\n<path d="M250.4 27.5223V85.3983C250.4 86.282 251.116 86.9983 252 86.9983H261.6C262.484 86.9983 263.2 86.282 263.2 85.3983V48.1873C263.2 46.3171 264.286 44.6172 265.983 43.8314L277.983 38.2759C281.164 36.8032 284.8 39.1263 284.8 42.6317V85.3983C284.8 86.282 285.516 86.9983 286.4 86.9983H296C296.884 86.9983 297.6 86.282 297.6 85.3983V42.6209C297.6 29.7687 284.272 21.2506 272.608 26.6484L264.318 30.4847C263.659 30.7898 262.877 30.6125 262.414 30.053L259.954 27.0817C259.346 26.3474 258.443 25.9223 257.489 25.9223H252C251.116 25.9223 250.4 26.6387 250.4 27.5223Z" fill="#0F1015"/>\n<path fill-rule="evenodd" clip-rule="evenodd" d="M323.2 24.8C313.48 24.8 305.6 32.6798 305.6 42.4V69.6C305.6 79.3203 313.48 87.2001 323.2 87.2001H335.2C344.92 87.2001 352.8 79.3203 352.8 69.6V42.4001C352.8 32.6798 344.92 24.8 335.2 24.8H323.2ZM323.2 37.6C320.549 37.6 318.4 39.7491 318.4 42.4001V69.6C318.4 72.251 320.549 74.4001 323.2 74.4001H335.2C337.851 74.4001 340 72.251 340 69.6V42.4C340 39.7491 337.851 37.6 335.2 37.6H323.2Z" fill="#0F1015"/>\n<path d="M378.101 25.2H391.708C400.706 25.2 408 32.4944 408 41.4925C408 42.2395 407.444 42.8696 406.703 42.9622L396.602 44.2249C395.857 44.3179 395.2 43.7376 395.2 42.9876C395.2 40.2331 392.967 38 390.212 38H378.921C375.982 38 373.6 40.3822 373.6 43.3207C373.6 45.8196 375.339 47.9818 377.78 48.5176L394.22 52.1264C402.267 53.8928 408 61.021 408 69.2593C408 78.9468 400.147 86.8 390.459 86.8H377.092C368.094 86.8 360.8 79.5057 360.8 70.5076C360.8 69.7606 361.356 69.1305 362.097 69.0379L372.198 67.7752C372.943 67.6822 373.6 68.2625 373.6 69.0125C373.6 71.767 375.833 74 378.588 74H390.014C392.878 74 395.2 71.6783 395.2 68.8143C395.2 66.4508 393.602 64.3863 391.314 63.794L373.765 59.2508C366.132 57.2745 360.8 50.3868 360.8 42.5015C360.8 32.9462 368.546 25.2 378.101 25.2Z" fill="#0F1015"/>\n<path d="M8 58C8 31.4903 29.4903 10 56 10C82.5097 10 104 31.4903 104 58C104 75.468 94.6696 90.7597 80.7129 99.1582C80.3237 99.3924 79.8197 99.2468 79.6079 98.845L77.7391 95.2981C77.5396 94.9194 77.6741 94.4514 78.0396 94.2286C90.245 86.7878 98.4 73.3477 98.4 58C98.4 45.396 92.898 34.0746 84.1712 26.3112L83.8716 26.0447C83.2103 25.4564 82.197 25.5168 81.6102 26.1795L76.2698 32.2113C70.6911 27.8209 63.6496 25.2 56 25.2C37.8851 25.2 23.2 39.8851 23.2 58C23.2 70.6278 30.3366 81.5856 40.7873 87.0659L41.1415 87.2516C41.9239 87.6619 42.8909 87.3604 43.3013 86.578L46.7194 80.0634C46.9121 79.6961 47.353 79.5384 47.7406 79.6861C50.3082 80.6645 53.0932 81.2 56 81.2C68.813 81.2 79.2 70.813 79.2 58C79.2 45.187 68.813 34.8 56 34.8H55.6C54.7163 34.8 54 35.5163 54 36.4V43.8553C54 44.2521 53.7083 44.5864 53.3192 44.6641C47.092 45.909 42.4 51.4066 42.4 58C42.4 62.0871 44.2053 65.7548 47.0553 68.2449C49.4452 70.3329 52.5771 71.6 56 71.6C63.5111 71.6 69.6 65.5111 69.6 58C69.6 51.4066 64.908 45.909 58.6808 44.6641C58.2917 44.5864 58 44.2521 58 43.8553V39.79C58 39.3156 58.411 38.944 58.8801 39.0146C68.1177 40.4042 75.2 48.375 75.2 58C75.2 68.6039 66.6039 77.2 56 77.2C52.7862 77.2 49.7622 76.4119 47.1053 75.0203L46.7512 74.8348C45.9688 74.425 45.0023 74.7267 44.592 75.5088L41.3048 81.7738C41.0894 82.1844 40.5705 82.3272 40.1833 82.0723C32.3591 76.9208 27.2 68.0616 27.2 58C27.2 42.0942 40.0942 29.2 56 29.2C63.3526 29.2 70.0574 31.9526 75.1478 36.4867L75.4473 36.7535C76.1086 37.3425 77.1225 37.2824 77.7095 36.6194L82.416 31.3036C82.7202 30.96 83.251 30.9417 83.5705 31.2711C90.2759 38.1859 94.4 47.6103 94.4 58C94.4 72.7914 86.0375 85.6329 73.7731 92.0487C68.4609 94.8276 62.417 96.4 56 96.4C39.6557 96.4 25.6916 86.188 20.1496 71.7893L20.0065 71.4176C19.6901 70.5954 18.7685 70.1837 17.945 70.4967L11.2754 73.0313C10.8512 73.1925 10.3773 72.9691 10.24 72.5365C8.78535 67.9531 8 63.0699 8 58Z" fill="#0F1015"/>\n<path d="M46.4 58C46.4 52.6981 50.6981 48.4 56 48.4C61.3019 48.4 65.6 52.6981 65.6 58C65.6 63.3019 61.3019 67.6 56 67.6C53.5814 67.6 51.376 66.7082 49.6871 65.2326C47.6696 63.4699 46.4 60.8844 46.4 58Z" fill="#0F1015"/>\n<path fill-rule="evenodd" clip-rule="evenodd" d="M15.5314 80.7132C15.335 80.3641 14.9136 80.2069 14.5392 80.3492L7.33942 83.0853C6.51543 83.3984 5.59337 82.9861 5.27738 82.1632L3.70554 78.0698C1.30997 71.8314 0 65.0616 0 58C0 27.0721 25.0721 2 56 2C86.9279 2 112 27.0721 112 58C112 79.5691 99.8043 98.2795 81.9611 107.63L78.0725 109.668C77.291 110.078 76.3256 109.777 75.9143 108.997L72.3255 102.186C72.1387 101.831 71.7185 101.67 71.3402 101.803C66.5332 103.486 61.3687 104.4 56 104.4C38.6169 104.4 23.4779 94.8422 15.5314 80.7132ZM74.193 97.1488C73.9943 96.7717 73.5352 96.6173 73.1454 96.7898C67.9011 99.1111 62.0989 100.4 56 100.4C38.9222 100.4 24.2068 90.3041 17.4886 75.7611C17.3101 75.3745 16.8638 75.1867 16.4658 75.3379L9.64462 77.9301C8.82063 78.2433 7.89858 77.831 7.58258 77.008L7.43969 76.6359C5.21709 70.8479 4 64.5637 4 58C4 29.2812 27.2812 6 56 6C84.7188 6 108 29.2812 108 58C108 78.0231 96.6823 95.3996 80.1044 104.087L79.7509 104.273C78.9694 104.682 78.0039 104.382 77.5927 103.601L74.193 97.1488Z" fill="#0F1015"/>\n</svg>\n':'<svg width="408" height="112" viewBox="0 0 408 112" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M185.6 25.2H141.6C140.716 25.2 140 25.9164 140 26.8V36.4C140 37.2837 140.716 38 141.6 38H167.413C168.07 38 168.447 38.7478 168.056 39.2758L140.627 76.3519C140.22 76.9028 140 77.5699 140 78.2551V85.2001C140 86.0837 140.716 86.8 141.6 86.8H185.6C186.484 86.8 187.2 86.0837 187.2 85.2001V75.6C187.2 74.7164 186.484 74 185.6 74H159.787C159.13 74 158.753 73.2523 159.144 72.7243L186.573 35.6482C186.98 35.0973 187.2 34.4302 187.2 33.745V26.8C187.2 25.9164 186.484 25.2 185.6 25.2Z" fill="white"/>\n<path fill-rule="evenodd" clip-rule="evenodd" d="M212.8 24.8C203.08 24.8 195.2 32.6798 195.2 42.4V69.6C195.2 79.3203 203.08 87.2001 212.8 87.2001H224.8C234.52 87.2001 242.4 79.3203 242.4 69.6V42.4001C242.4 32.6798 234.52 24.8 224.8 24.8H212.8ZM212.8 37.6C210.149 37.6 208 39.7491 208 42.4001V69.6C208 72.251 210.149 74.4001 212.8 74.4001H224.8C227.451 74.4001 229.6 72.251 229.6 69.6V42.4C229.6 39.7491 227.451 37.6 224.8 37.6H212.8Z" fill="white"/>\n<path d="M250.4 27.5223V85.3983C250.4 86.282 251.116 86.9983 252 86.9983H261.6C262.484 86.9983 263.2 86.282 263.2 85.3983V48.1873C263.2 46.3171 264.286 44.6172 265.983 43.8314L277.983 38.2759C281.164 36.8032 284.8 39.1263 284.8 42.6317V85.3983C284.8 86.282 285.516 86.9983 286.4 86.9983H296C296.884 86.9983 297.6 86.282 297.6 85.3983V42.6209C297.6 29.7687 284.272 21.2506 272.608 26.6484L264.318 30.4847C263.659 30.7898 262.877 30.6125 262.414 30.053L259.954 27.0817C259.346 26.3474 258.443 25.9223 257.489 25.9223H252C251.116 25.9223 250.4 26.6387 250.4 27.5223Z" fill="white"/>\n<path fill-rule="evenodd" clip-rule="evenodd" d="M323.2 24.8C313.48 24.8 305.6 32.6798 305.6 42.4V69.6C305.6 79.3203 313.48 87.2001 323.2 87.2001H335.2C344.92 87.2001 352.8 79.3203 352.8 69.6V42.4001C352.8 32.6798 344.92 24.8 335.2 24.8H323.2ZM323.2 37.6C320.549 37.6 318.4 39.7491 318.4 42.4001V69.6C318.4 72.251 320.549 74.4001 323.2 74.4001H335.2C337.851 74.4001 340 72.251 340 69.6V42.4C340 39.7491 337.851 37.6 335.2 37.6H323.2Z" fill="white"/>\n<path d="M378.101 25.2H391.708C400.706 25.2 408 32.4944 408 41.4925C408 42.2395 407.444 42.8696 406.703 42.9622L396.602 44.2249C395.857 44.3179 395.2 43.7376 395.2 42.9876C395.2 40.2331 392.967 38 390.212 38H378.921C375.982 38 373.6 40.3822 373.6 43.3207C373.6 45.8196 375.339 47.9818 377.78 48.5176L394.22 52.1264C402.267 53.8928 408 61.021 408 69.2593C408 78.9468 400.147 86.8 390.459 86.8H377.092C368.094 86.8 360.8 79.5057 360.8 70.5076C360.8 69.7606 361.356 69.1305 362.097 69.0379L372.198 67.7752C372.943 67.6822 373.6 68.2625 373.6 69.0125C373.6 71.767 375.833 74 378.588 74H390.014C392.878 74 395.2 71.6783 395.2 68.8143C395.2 66.4508 393.602 64.3863 391.314 63.794L373.765 59.2508C366.132 57.2745 360.8 50.3868 360.8 42.5015C360.8 32.9462 368.546 25.2 378.101 25.2Z" fill="white"/>\n<path d="M8.8 58C8.8 31.9322 29.9322 10.8 56 10.8C82.0678 10.8 103.2 31.9322 103.2 58C103.2 74.868 94.3524 89.6734 81.0342 98.022C80.6447 98.2662 80.1318 98.123 79.9175 97.7162L78.7941 95.5842C78.5971 95.2104 78.7255 94.7484 79.0825 94.5224C91.1684 86.8682 99.2 73.374 99.2 58C99.2 45.1582 93.5931 33.6223 84.7029 25.7135L83.8042 24.914C83.1429 24.3257 82.1296 24.3861 81.5428 25.0488L76.655 30.5694C76.3787 30.8815 75.9095 30.9282 75.5707 30.6852C70.0598 26.7304 63.2996 24.4 56 24.4C37.4432 24.4 22.4 39.4432 22.4 58C22.4 70.9369 29.7121 82.1614 40.4157 87.7744L41.4783 88.3315C42.2607 88.7419 43.2277 88.4403 43.6381 87.6579L47.1029 81.0544C47.2912 80.6954 47.7178 80.5354 48.1006 80.6688C50.5764 81.5315 53.2355 82 56 82C69.2548 82 80 71.2548 80 58C80 44.7452 69.2548 34 56 34H54.8C53.9163 34 53.2 34.7163 53.2 35.6V43.2143C53.2 43.5965 52.9289 43.923 52.5577 44.014C46.267 45.5571 41.6 51.2335 41.6 58C41.6 62.3276 43.5125 66.2118 46.529 68.8473C49.059 71.0578 52.3762 72.4 56 72.4C63.9529 72.4 70.4 65.9529 70.4 58C70.4 51.2335 65.733 45.5571 59.4423 44.014C59.0711 43.923 58.8 43.5965 58.8 43.2143V40.7431C58.8 40.2532 59.2372 39.8772 59.7171 39.9756C68.0973 41.6948 74.4 49.1114 74.4 58C74.4 68.162 66.162 76.4 56 76.4C52.9185 76.4 50.0216 75.6447 47.4764 74.3116L46.4142 73.7552C45.6318 73.3454 44.6653 73.6471 44.255 74.4292L41.0133 80.6075C40.7934 81.0267 40.2589 81.165 39.8722 80.8921C32.6864 75.8202 28 67.4556 28 58C28 42.536 40.536 30 56 30C63.1489 30 69.6662 32.6755 74.6156 37.0841L75.5144 37.8846C76.1757 38.4736 77.1895 38.4135 77.7765 37.7505L82.4362 32.4876C82.745 32.1388 83.2861 32.1262 83.6026 32.4681C89.8104 39.1755 93.6 48.1438 93.6 58C93.6 72.4821 85.4133 85.0566 73.4023 91.3398C68.2018 94.0603 62.2848 95.6 56 95.6C39.9975 95.6 26.3233 85.602 20.8962 71.502L20.467 70.3868C20.1505 69.5646 19.229 69.1529 18.4054 69.4659L11.7892 71.9802C11.3597 72.1434 10.8807 71.9123 10.7497 71.4719C9.48157 67.2056 8.8 62.6844 8.8 58Z" fill="white"/>\n<path d="M47.2 58C47.2 53.1399 51.1399 49.2 56 49.2C60.8601 49.2 64.8 53.1399 64.8 58C64.8 62.8601 60.8601 66.8 56 66.8C53.7822 66.8 51.7621 65.9832 50.2135 64.6302C48.3624 63.0129 47.2 60.6439 47.2 58Z" fill="white"/>\n<path fill-rule="evenodd" clip-rule="evenodd" d="M15.5314 80.7132C15.335 80.3641 14.9136 80.2069 14.5392 80.3492L7.33942 83.0853C6.51543 83.3984 5.59337 82.9861 5.27738 82.1632L3.70554 78.0698C1.30997 71.8314 0 65.0616 0 58C0 27.0721 25.0721 2 56 2C86.9279 2 112 27.0721 112 58C112 79.5691 99.8043 98.2795 81.9611 107.63L78.0725 109.668C77.291 110.078 76.3256 109.777 75.9143 108.997L72.3255 102.186C72.1387 101.831 71.7185 101.67 71.3402 101.803C66.5332 103.486 61.3687 104.4 56 104.4C38.6169 104.4 23.4779 94.8422 15.5314 80.7132ZM73.8305 98.177C73.6343 97.8047 73.1837 97.6488 72.7961 97.8125C67.6303 99.9943 61.9532 101.2 56 101.2C38.8594 101.2 24.0562 91.2184 17.0752 76.7588C16.8924 76.3802 16.4515 76.1992 16.0585 76.3485L9.18358 78.9612C8.35959 79.2743 7.43754 78.862 7.12154 78.0391L6.69286 76.9227C4.43567 71.0446 3.2 64.6633 3.2 58C3.2 28.8394 26.8394 5.2 56 5.2C85.1606 5.2 108.8 28.8394 108.8 58C108.8 78.3323 97.3067 95.9756 80.4757 104.796L79.4152 105.352C78.6338 105.761 77.6683 105.461 77.257 104.68L73.8305 98.177Z" fill="white"/>\n</svg>\n',iconColor:c,size:108})),e("div",{key:"9dba0c118f8d7cac5c9aaae36d8270f2a8cb8360",class:"zonos--hello-locale-wrapper"},e("zonos-button",{key:"d40f08f0e1437290ed4fbbd6ad4dd6e61878804c",buttonColor:c,icon:e("zonos-icon",{"aria-label":"Open language select",content:'<svg width="24" height="24" viewBox="0 0 24 24" fill="none" color="var(--zonos-elements-gray-1000)" xmlns="http://www.w3.org/2000/svg">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M20 12C20 16.4183 16.4183 20 12 20C7.58172 20 4 16.4183 4 12C4 7.58172 7.58172 4 12 4C16.4183 4 20 7.58172 20 12ZM11.4709 5.80634C11.7686 5.53723 11.9541 5.5 12 5.5C12.0459 5.5 12.2314 5.53723 12.5291 5.80634C12.8115 6.06164 13.1289 6.46913 13.4271 7.03651C13.9505 8.03191 14.3838 9.46098 14.48 11.25H9.51996C9.61624 9.46098 10.0495 8.03191 10.5729 7.03651C10.8711 6.46913 11.1885 6.06164 11.4709 5.80634ZM8.01802 11.25C8.11591 9.23031 8.60319 7.55958 9.24516 6.33849C9.29983 6.23451 9.35585 6.13335 9.41312 6.03514C7.32916 6.94017 5.81218 8.90533 5.5428 11.25H8.01802ZM5.5428 12.75H8.01802C8.11591 14.7697 8.60319 16.4404 9.24516 17.6615C9.29983 17.7655 9.35585 17.8666 9.41312 17.9649C7.32916 17.0598 5.81218 15.0947 5.5428 12.75ZM9.51996 12.75H14.48C14.3838 14.539 13.9505 15.9681 13.4271 16.9635C13.1289 17.5309 12.8115 17.9384 12.5291 18.1937C12.2314 18.4628 12.0459 18.5 12 18.5C11.9541 18.5 11.7686 18.4628 11.4709 18.1937C11.1885 17.9384 10.8711 17.5309 10.5729 16.9635C10.0495 15.9681 9.61624 14.539 9.51996 12.75ZM15.982 12.75C15.8841 14.7697 15.3968 16.4404 14.7548 17.6615C14.7002 17.7655 14.6441 17.8666 14.5869 17.9649C16.6708 17.0598 18.1878 15.0947 18.4572 12.75H15.982ZM18.4572 11.25C18.1878 8.90533 16.6708 6.94017 14.5869 6.03514C14.6441 6.13335 14.7002 6.23451 14.7548 6.33849C15.3968 7.55958 15.8841 9.23031 15.982 11.25H18.4572Z" fill="currentColor"/>\n</svg>\n',iconColor:c}),onClick:()=>this.setShowLanguageSelect(!0),variant:"subtle"},r),e("zonos-button",{key:"6312ac59bc58142aee85702b3f4538949255cbb9",buttonColor:c,icon:e("zonos-country-flag",{"aria-label":"Open country select",class:"zonos--footer-country-flag",countryCode:i.selectedCountryCode}),onClick:()=>this.setShowCountrySelect(!0),variant:"subtle"},i.selectedCountryCode))))}get ele(){return o(this)}};et.style=":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host .zonos--hello-dialog-footer{text-align:left;display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;background:var(--zonos--primary-color, var(--zonos-elements-surface-color-secondary));border-top:var(--zonos-elements-border);padding:12px;-ms-flex-align:center;align-items:center}:host .zonos--hello-dialog-footer a{display:-ms-inline-flexbox;display:inline-flex}:host .zonos--hello-dialog-footer zonos-button button.outline{outline:1px solid var(--zonos-elements-gray-800)}:host .zonos--hello-dialog-footer .zonos--hello-locale-wrapper{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:8px}@media (max-width: 400px){:host .zonos--hello-dialog-footer .zonos--hello-locale-wrapper{gap:4px}}";const st=class{constructor(e){t(this,e),this.buffer=100,this.scrollTop=0,this.totalHeight=0,this.containerDimensions={height:0,width:0},this.updateContainerDimensions=()=>{this.containerDimensions={height:this.element.clientHeight,width:this.element.clientWidth}},this.handleScroll=()=>{this.scrollTop=this.element.scrollTop}}updateTotalHeight(){this.totalHeight=this.itemHeights.reduce(((t,e)=>t+(e||this.fallbackItemHeight)),0)}getVisibleItems(){const{width:t}=this.containerDimensions,s=[];let o=0;const n=this.itemHeights.length;for(let i=0;i<n;i++){const n=this.itemHeights[i]||this.fallbackItemHeight;if(this.scrollTop>o+n+this.buffer){o+=n;continue}if(this.scrollTop+this.containerDimensions.height<o-this.buffer)break;const r=e("div",{class:h(["item"]),key:`virtual-item-${i}`,style:{height:`${n}px`,transform:`translateY(${o}px)`,width:this.itemWidth?`${this.itemWidth}px`:`${t}px`}},this.renderItem(i));s.push({element:r,index:i}),o+=n}return s}connectedCallback(){this.element.addEventListener("scroll",this.handleScroll),window.addEventListener("resize",this.updateContainerDimensions),this.updateTotalHeight(),this.updateContainerDimensions()}disconnectedCallback(){this.element.removeEventListener("scroll",this.handleScroll),window.removeEventListener("resize",this.updateContainerDimensions)}render(){const{width:t}=this.containerDimensions,o=this.getVisibleItems();return e(s,{key:"931ec0dfcbb239d4e3f6f127acfffd22b4b9316f",class:h(["zonos--virtual-scroll"])},e("div",{key:"65b5823473b15304317e7a3ec51efd807b3215fa",class:h(["scroller"]),style:{height:`${this.totalHeight}px`,width:`${t}px`}}),e("div",{key:"ac8fae50951a3a03ff76ebcef744d739c03bbad8",class:h(["item-container"]),style:{height:`${this.totalHeight}px`}},o.map((({element:t})=>t))))}get element(){return o(this)}static get watchers(){return{itemHeights:["updateTotalHeight"],fallbackItemHeight:["updateTotalHeight"]}}};st.style=".sc-zonos-virtual-scroll-h{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-virtual-scroll-h *.sc-zonos-virtual-scroll{font-family:var(--zonos--font-family, Inter), Inter}.sc-zonos-virtual-scroll-h img.sc-zonos-virtual-scroll{max-width:100%}.sc-zonos-virtual-scroll-h dl.sc-zonos-virtual-scroll,.sc-zonos-virtual-scroll-h dd.sc-zonos-virtual-scroll,.sc-zonos-virtual-scroll-h h1.sc-zonos-virtual-scroll,.sc-zonos-virtual-scroll-h h2.sc-zonos-virtual-scroll,.sc-zonos-virtual-scroll-h h3.sc-zonos-virtual-scroll,.sc-zonos-virtual-scroll-h h4.sc-zonos-virtual-scroll,.sc-zonos-virtual-scroll-h h5.sc-zonos-virtual-scroll,.sc-zonos-virtual-scroll-h h6.sc-zonos-virtual-scroll,.sc-zonos-virtual-scroll-h hr.sc-zonos-virtual-scroll,.sc-zonos-virtual-scroll-h figure.sc-zonos-virtual-scroll,.sc-zonos-virtual-scroll-h p.sc-zonos-virtual-scroll,.sc-zonos-virtual-scroll-h pre.sc-zonos-virtual-scroll{margin:0}.sc-zonos-virtual-scroll-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-virtual-scroll-h{display:block;overflow:auto;position:relative}.sc-zonos-virtual-scroll-h .scroller.sc-zonos-virtual-scroll{display:inline-block;pointer-events:none}.sc-zonos-virtual-scroll-h .item-container.sc-zonos-virtual-scroll{display:inline-block;position:absolute;left:0;top:0}.sc-zonos-virtual-scroll-h .item-container.sc-zonos-virtual-scroll .item.sc-zonos-virtual-scroll{position:absolute;top:0;left:0}";export{X as zonos_country_select,tt as zonos_custom_message,et as zonos_hello_dialog_footer,st as zonos_virtual_scroll}
@@ -1 +1 @@
1
- import{p as e,b as o}from"./p-b30c2ad9.js";export{s as setNonce}from"./p-b30c2ad9.js";import{g as t}from"./p-e1255160.js";(()=>{const o=import.meta.url,t={};return""!==o&&(t.resourcesUrl=new URL(".",o).href),e(t)})().then((async e=>(await t(),o(JSON.parse('[["p-783e7fa7",[[2,"zonos-checkout",{"appearanceSettingsOverride":[16],"preview":[4],"hiddenMode":[4,"hidden-mode"],"mobile":[4],"overrideStagingMode":[4,"override-staging-mode"],"defaultAddress":[16],"forceDialogOpen":[4,"force-dialog-open"],"defaultAddressParams":[32],"defaultCustomerProfileAddress":[32],"customerProfile":[32],"open":[32],"isOverlayLoading":[32],"stripe":[32],"submitLoading":[32],"collapseReviewMobile":[32],"isAttachError":[32],"isMobile":[32],"isIframed":[32],"zonosReviewRef":[32],"storybookPaymentStatusOverride":[32],"isLegacyCheckout":[32],"confirmDialogOpen":[32],"isCartExpired":[32],"payInUsdConfirmDialogOpen":[32],"inventoryCheckErrorMessage":[32],"placedOrderInfo":[32],"shouldShowFedexShippingConsentDialog":[32],"clientSecret":[32],"stripeCustomerSessionClientSecret":[32],"closeDialogHandler":[64],"init":[64],"setToFinishStep":[64],"mockCheckoutSession":[64],"triggerCheckoutInternational":[64]},[[16,"zonos--init-cart-info","initCartInfoHandler"],[4,"keydown","handleKeyPress"],[9,"resize","handleWindowResize"]],{"appearanceSettingsOverride":["appearanceSettingsOverrideChanged","handleAppearanceSettingsOverrideChange"],"overrideStagingMode":["overrideStagingModeChanged"],"mobile":["handleMobileChange"],"defaultAddress":["handleAddressChange"],"customerProfile":["handleCustomerProfileChange"],"clientSecret":["handleClientSecretChange"],"stripeCustomerSessionClientSecret":["handleClientSecretChange"],"open":["handleOpenChange"]}]]],["p-258570ce",[[2,"zonos-collect",{"mobile":[4],"tablet":[4],"stripe":[32],"showLanguageDialogMobile":[32],"submitLoading":[32],"collapseReview":[32],"isMobile":[32],"isTablet":[32],"zonosReviewRef":[32],"storybookPaymentStatusOverride":[32],"isOverlayLoading":[32],"isCartCollected":[32],"isCartExpired":[32],"payInUsdConfirmDialogOpen":[32],"inventoryCheckErrorMessage":[32],"confirmationId":[32],"clientSecret":[32],"stripeCustomerSessionClientSecret":[32]},[[9,"resize","resizeListener"]]]]],["p-f4085c23",[[1,"zonos-hello",{"mobileLocationOverride":[1,"mobile-location-override"],"animateFromLeftOverride":[4,"animate-from-left-override"],"appearanceSettingsOverride":[16],"showPeekMessage":[32],"zonosStoreHelloSettings":[32],"showDialog":[32],"peekMessage":[32],"initialUrl":[32],"allRestrictedItems":[32],"allFoundProducts":[32],"productsOnPage":[32],"isHelloWidgetRendered":[32],"isMobile":[32],"getCountryList":[64],"displayCurrency":[64],"convertAndFormat":[64],"convert":[64],"format":[64],"openHelloDialog":[64]},[[9,"resize","handleResize"]],{"showDialog":["showDialogHandler"],"appearanceSettingsOverride":["handleAppearanceSettingsOverrideChange"]}]]],["p-65db3219",[[1,"zonos-controller",{"config":[16],"zonosApiKey":[1,"zonos-api-key"],"initCheckoutElement":[64],"initCollectElement":[64],"setupGoogleFont":[64],"showNotification":[64],"reset":[64],"overrideConfig":[64],"overrideCountry":[64],"getAppearanceSetting":[64],"updateOrganizationName":[64]},[[8,"locationchange","handleLocationChange"]]]]],["p-fa90adb8",[[1,"zonos-tooltip",{"label":[1],"subtitle":[1],"showTooltip":[32]}]]],["p-cbb01de9",[[1,"zonos-component",{"first":[1],"middle":[1],"last":[1]}]]],["p-6bab9096",[[1,"zonos-logo",{"theme":[1],"width":[1]}]]],["p-c998e4ed",[[1,"zonos-text",{"textColor":[1,"text-color"],"size":[1],"type":[1],"weight":[2],"ready":[32]}]]],["p-9972941a",[[1,"zonos-hello-dialog",{"isOpen":[4,"is-open"],"setIsOpen":[16],"mobileLocationOverride":[1,"mobile-location-override"],"animateFromLeftOverride":[4,"animate-from-left-override"],"appearanceSettings":[16],"restrictedItems":[16],"welcomeMessage":[32],"showCountrySelect":[32],"showLanguageSelect":[32]},[[4,"click","globalClickHandler"]],{"isOpen":["isOpenHandler"]}]]],["p-f912e9c3",[[1,"zonos-shipping-rich-radio",{"items":[16],"borderColor":[1,"border-color"],"borderStyle":[1,"border-style"],"theme":[1],"selectedItem":[16]}]]],["p-b658c28a",[[1,"zonos-toggle",{"options":[16],"value":[1]}]]],["p-10894d36",[[1,"zonos-confirm-dialog",{"dialogTitle":[1,"dialog-title"],"dialogIntent":[1,"dialog-intent"],"dialogSubtitle":[1,"dialog-subtitle"],"submitBtnColor":[1,"submit-btn-color"],"dialogConfirmBtnText":[1,"dialog-confirm-btn-text"],"dialogWidth":[2,"dialog-width"],"dialogCancelBtnText":[1,"dialog-cancel-btn-text"],"dialogType":[1,"dialog-type"],"isMobile":[4,"is-mobile"],"dialogOpen":[4,"dialog-open"],"noClickOutside":[4,"no-click-outside"]},[[4,"keydown","handleKeyDown"]]],[1,"zonos-loading-overlay",{"open":[4],"spinnerColor":[1,"spinner-color"],"size":[2]}]]],["p-2dc38ef3",[[1,"zonos-badge",{"bold":[4],"badgeColor":[1,"badge-color"],"icon":[16],"iconRight":[4,"icon-right"],"size":[1],"rounded":[4],"loading":[4],"dismissHandler":[16]}]]],["p-d2f7ea09",[[1,"zonos-input",{"inputValue":[1,"input-value"],"inputLabel":[1,"input-label"],"inputSize":[1,"input-size"],"isDisabled":[4,"is-disabled"],"isError":[4,"is-error"],"inputPlaceholder":[1,"input-placeholder"],"value":[32]},null,{"inputValue":["onInputValueChange"]}]]],["p-b0a75761",[[1,"zonos-collect-cart-items",{"errorImages":[32]}],[1,"zonos-h-stack",{"spacing":[2]}],[1,"zonos-skeleton",{"skeletonWidth":[1,"skeleton-width"],"skeletonHeight":[1,"skeleton-height"],"dismissHandler":[16]}]]],["p-6d423364",[[2,"zonos-stripe-input",{"name":[1],"autoComplete":[1,"auto-complete"],"inputValue":[1,"input-value"],"inputLabel":[1,"input-label"],"overridePrimaryColor":[1,"override-primary-color"],"overrideSecondaryColor":[1,"override-secondary-color"],"isDisabled":[4,"is-disabled"],"isError":[4,"is-error"],"error":[1],"inputPlaceholder":[1,"input-placeholder"],"value":[1025],"required":[4],"internalValue":[32]},null,{"inputValue":["onInputValueChange"],"value":["onValueChange"]}]]],["p-d96545ae",[[1,"zonos-collapse",{"collapsed":[4],"collapseSize":[2,"collapse-size"],"height":[32],"iframe":[32]}]]],["p-2b84039a",[[1,"zonos-country-flag",{"countryCode":[1,"country-code"],"size":[2]}]]],["p-c81f6387",[[1,"zonos-v-stack",{"spacing":[2]}]]],["p-cf56b990",[[1,"zonos-language-select",{"handleOnClose":[16]}],[1,"zonos-select-dialog-header",{"handleOnClose":[16],"label":[1]}]]],["p-b4bf2f03",[[1,"zonos-card",{"actions":[16],"backgroundColor":[1,"background-color"],"borderRadius":[2,"border-radius"],"footerActions":[16],"footerContent":[16],"footerHeight":[2,"footer-height"],"label":[16],"spacing":[1]}],[1,"zonos-banner",{"bannerTitle":[1,"banner-title"],"intent":[1],"hasContent":[32]}]]],["p-6497ce22",[[1,"zonos-empty-state-payment",{"emptyStateText":[1,"empty-state-text"],"theme":[1]}],[2,"zonos-payment",{"titleText":[1,"title-text"],"stripe":[32],"stripeElements":[32],"isPaymentInfoFilled":[32]},null,{"isPaymentInfoFilled":["watchIsPaymentInfoFilled"],"stripeElements":["watchInitStripe"],"stripe":["watchInitStripe"]}],[2,"zonos-paypal-payment"],[1,"zonos-notification",{"notificationArray":[32],"showNotification":[64]}]]],["p-4523b982",[[17,"zonos-button",{"buttonColor":[1,"button-color"],"backgroundColor":[1,"background-color"],"borderStyle":[1,"border-style"],"isDisabled":[4,"is-disabled"],"icon":[16],"iconRight":[4,"icon-right"],"size":[1],"variant":[1],"noBackground":[4,"no-background"],"withBoxShadow":[4,"with-box-shadow"],"noPaddingLeft":[4,"no-padding-left"],"noPaddingRight":[4,"no-padding-right"],"loading":[4],"justifyContent":[1,"justify-content"],"bold":[4],"theme":[1],"hasIcon":[32],"hasContent":[32]},[[2,"click","clickHandler"]],{"icon":["iconChangeHandler"]}],[1,"zonos-spinner",{"size":[2],"spinnerColor":[1,"spinner-color"]}],[1,"zonos-icon",{"autoHeight":[4,"auto-height"],"iconColor":[1,"icon-color"],"content":[1],"size":[2]}]]],["p-5608ac9d",[[2,"zonos-collect-payment",{"submitBtnType":[1,"submit-btn-type"],"continueLoading":[4,"continue-loading"],"submitBtnColor":[1,"submit-btn-color"],"overridePrimaryColor":[1,"override-primary-color"],"showErrorBanner":[32],"hasStripePaymentError":[32],"stagingOrderCreateErrorMessage":[32],"internalContinueLoading":[32]},null,{"continueLoading":["continueLoadingWatcher"],"hasStripePaymentError":["stripePaymentErrorWatcher"]}],[1,"zonos-collect-footer",{"mobile":[4],"tablet":[4],"dataTheme":[1,"data-theme"],"showLanguageDialog":[32],"isMobile":[32],"isTablet":[32]},[[4,"click","handleGlobalClick"]],{"mobile":["handleMobileChange"],"tablet":["handleTabletChange"]}],[1,"zonos-collect-order-details",{"mobile":[4],"collapsed":[4],"landedCostId":[1,"landed-cost-id"],"isMobile":[32],"collapseState":[32]},[[9,"resize","handleWindowResize"]],{"collapsed":["handleCollapseChangeFromProp"],"collapseState":["handleCollapseChange"]}],[1,"zonos-collect-finish",{"borderRadius":[1,"border-radius"],"storybookForceStatus":[1,"storybook-force-status"],"overrideNotification":[16],"confirmationId":[1,"confirmation-id"],"isLoading":[32],"notificationType":[32],"notificationTitle":[32],"notificationMessages":[32],"notificationActionText":[32],"order":[32],"isWaitingToRedirect":[32]}],[1,"zonos-collect-review",{"mobile":[4],"tablet":[4],"collapsed":[4],"isMobile":[32],"isTablet":[32],"isLoading":[32]},[[9,"resize","handleWindowResize"]]],[1,"zonos-collect-subtotal",{"subtotals":[32]}]]],["p-62803534",[[1,"zonos-country-select",{"handleOnClose":[16],"inputValue":[32]}],[1,"zonos-hello-dialog-footer",{"appearanceSettings":[16],"setShowCountrySelect":[16],"setShowLanguageSelect":[16]}],[1,"zonos-custom-message",{"icon":[1],"message":[1]}],[2,"zonos-virtual-scroll",{"renderItem":[16],"itemWidth":[2,"item-width"],"fallbackItemHeight":[2,"fallback-item-height"],"itemHeights":[16],"buffer":[2],"scrollTop":[32],"totalHeight":[32],"containerDimensions":[32]},null,{"itemHeights":["updateTotalHeight"],"fallbackItemHeight":["updateTotalHeight"]}]]],["p-053a042e",[[1,"zonos-address-update-dialog",{"continueLoading":[4,"continue-loading"],"dialogLoading":[4,"dialog-loading"],"dialogOpen":[4,"dialog-open"],"submitBtnType":[1,"submit-btn-type"],"submitBtnColor":[1,"submit-btn-color"],"isMobile":[4,"is-mobile"],"shippingAddress":[16],"billingAddress":[16],"translatedShippingAddress":[16],"translatedBillingAddress":[16],"showErrorBanner":[32],"translatedShippingAddressState":[32],"translatedBillingAddressState":[32]},null,{"translatedShippingAddress":["watchTranslatedShippingAddress"],"translatedBillingAddress":["watchTranslatedBillingAddress"]}],[2,"zonos-custom-address",{"type":[1],"titleText":[1,"title-text"],"defaultAddress":[16],"taxIdErrorMessage":[1,"tax-id-error-message"],"stripe":[32],"isDirtyAddress":[32],"isAddressFilled":[32],"isAddressLine1Entered":[32],"addressSuggestions":[32],"countryField":[32],"startGooglePlaceSuggestions":[32],"shipToCountries":[32],"shippingZones":[32],"city":[32],"country":[32],"firstName":[32],"lastName":[32],"line1":[32],"line2":[32],"phone":[32],"postalCode":[32],"state":[32],"cityError":[32],"stateError":[32],"postalCodeError":[32],"phoneError":[32],"firstNameError":[32],"lastNameError":[32],"isFirstInitialization":[32],"addressService":[32],"checkoutSessionId":[32]},null,{"checkoutSessionId":["isAddressFilledChanged"],"isAddressFilled":["isAddressFilledChanged"],"defaultAddress":["defaultAddressChanged"],"line1":["line1Changed"],"city":["formFieldsChanged"],"country":["formFieldsChanged","countryChanged"],"firstName":["formFieldsChanged"],"lastName":["formFieldsChanged"],"line2":["formFieldsChanged"],"phone":["formFieldsChanged"],"postalCode":["formFieldsChanged"],"state":["formFieldsChanged"],"addressService":["shouldEnabledCustomAddressChanged"],"shippingZones":["shippingZonesChanged"]}],[1,"zonos-checkbox",{"backgroundColor":[1,"background-color"],"label":[1],"isChecked":[4,"is-checked"],"isDisabled":[4,"is-disabled"],"size":[2],"fontSize":[1,"font-size"],"borderStyle":[1,"border-style"]},[[1,"click","onClick"]]],[1,"zonos-address-suggestions",{"type":[1],"suggestions":[16],"selectedSuggestionId":[32],"localSuggestions":[32],"lastHoveredSuggestionId":[32]},null,{"suggestions":["suggestionsChanged"]}],[1,"zonos-dialog",{"open":[4],"headerText":[1,"header-text"],"width":[1],"height":[1],"minHeight":[1,"min-height"],"noHeader":[4,"no-header"],"noBodyPadding":[4,"no-body-padding"],"noBorder":[4,"no-border"],"borderStyle":[1,"border-style"],"noCloseButton":[4,"no-close-button"],"noClickOutside":[4,"no-click-outside"],"mobile":[4],"isLoading":[4,"is-loading"],"isMobile":[32]},[[9,"resize","handleWindowResize"],[4,"keydown","handleKeyDown"]]],[2,"zonos-stripe-phone-input",{"autoComplete":[1,"auto-complete"],"countryOptions":[16],"disabled":[4],"error":[1],"inputLabel":[1,"input-label"],"overridePrimaryColor":[1,"override-primary-color"],"overrideSecondaryColor":[1,"override-secondary-color"],"inputValue":[1,"input-value"],"countryCode":[1,"country-code"],"minWidth":[1,"min-width"],"selectedCountry":[32],"phoneNumber":[32],"isFocused":[32],"isSelectOpen":[32]},null,{"countryOptions":["onCountryOptionsChange"],"selectedCountry":["onSelectedCountryChange"],"inputValue":["onPhoneNumberChange"]}],[2,"zonos-address",{"type":[1],"titleText":[1,"title-text"],"defaultAddress":[16],"taxIdErrorMessage":[1,"tax-id-error-message"],"stripe":[32],"isDirtyAddress":[32],"isAddressFilled":[32],"checkoutSessionId":[32],"prevCountry":[32],"prevPostalCode":[32]},null,{"checkoutSessionId":["isAddressFilledChanged"],"isAddressFilled":["isAddressFilledChanged"],"stripe":["watchInitStripe"],"defaultAddress":["defaultAddressChanged"]}],[1,"zonos-address-display",{"currentAddress":[16],"addressType":[1,"address-type"]}],[1,"zonos-address-form",{"currentAddress":[16],"translatedAddress":[16],"addressType":[1,"address-type"],"localAddress":[32]},null,{"translatedAddress":["watchCurrentAddress"]}],[2,"zonos-link-authentication",{"titleText":[1,"title-text"],"defaultEmail":[1,"default-email"],"isEmailError":[4,"is-email-error"],"stripe":[32],"isStagingMode":[32],"clientSecret":[32],"retriesInitializeLink":[32]},null,{"isStagingMode":["watchIsStagingMode"],"stripe":["watchInitStripe"],"clientSecret":["watchInitStripe"],"defaultEmail":["watchDefaultEmail"]}],[1,"zonos-stripe-select",{"name":[1],"selectedValue":[1,"selected-value"],"selectLabel":[1,"select-label"],"overridePrimaryColor":[1,"override-primary-color"],"overrideSecondaryColor":[1,"override-secondary-color"],"isDisabled":[4,"is-disabled"],"isError":[4,"is-error"],"error":[1],"selectPlaceholder":[1,"select-placeholder"],"options":[16],"autoComplete":[1,"auto-complete"],"value":[1025],"required":[4],"isClearable":[4,"is-clearable"],"minWidth":[1,"min-width"],"internalValue":[32],"internalOptions":[32]},null,{"options":["onOptionsChange"],"selectedValue":["onSelectedValueChange"],"value":["onValueChange"]}]]],["p-462f8857",[[2,"zonos-customer-info",{"continueLoading":[4,"continue-loading"],"submitBtnType":[1,"submit-btn-type"],"submitBtnColor":[1,"submit-btn-color"],"isMobile":[4,"is-mobile"],"defaultAddress":[16],"shouldUseCustomAddressFormOverride":[4,"should-use-custom-address-form-override"],"showErrorBanner":[32],"shippingCountry":[32],"isCheckingForRestrictedItems":[32],"isValidatingAddress":[32],"taxIdErrorMessage":[32],"invalidShippingCharacterList":[32],"invalidBillingCharacterList":[32],"openAddressValidationDialog":[32],"isEmailError":[32],"recordedFormTypeUsed":[32],"selectedCountryCode":[32],"genericSettings":[32],"addressFormRenderType":[32]},null,{"showErrorBanner":["watchShowErrorBanner"],"shouldUseCustomAddressFormOverride":["watchShouldEnabledCustomAddress"],"genericSettings":["watchShouldEnabledCustomAddress"],"selectedCountryCode":["watchShouldEnabledCustomAddress"]}],[2,"zonos-checkout-payment",{"submitBtnType":[1,"submit-btn-type"],"continueLoading":[4,"continue-loading"],"submitBtnColor":[1,"submit-btn-color"],"isMobile":[4,"is-mobile"],"overridePrimaryColor":[1,"override-primary-color"],"showErrorBanner":[32],"hasStripePaymentError":[32],"stagingOrderCreateErrorMessage":[32],"internalContinueLoading":[32]},null,{"continueLoading":["continueLoadingWatcher"],"hasStripePaymentError":["stripePaymentErrorWatcher"]}],[1,"zonos-checkout-footer",{"mobile":[4],"dataTheme":[1,"data-theme"],"showLanguageDialog":[32],"isMobile":[32]},[[4,"click","handleGlobalClick"]],{"mobile":["handleMobileChange"]}],[2,"zonos-shipping",{"continueLoading":[4,"continue-loading"],"submitBtnColor":[1,"submit-btn-color"],"submitBtnType":[1,"submit-btn-type"],"selectedShippingMethod":[32],"collapsedDAPOptions":[32],"isSelecting":[32],"showErrorBanner":[32],"serviceLevelsDDP":[32],"serviceLevelsDAP":[32],"serviceLevelsOther":[32],"serviceLevelsAll":[32],"displayBaseCurrency":[32],"shippingData":[32]}],[1,"zonos-cart-subtotal",{"submitBtnType":[1,"submit-btn-type"],"submitBtnColor":[1,"submit-btn-color"],"loading":[32]}],[1,"zonos-cart-restricted-items",{"hide":[4],"errorImages":[32],"internalCollapsed":[32],"firstRender":[32]}],[1,"zonos-checkout-finish",{"borderRadius":[1,"border-radius"],"storybookForceStatus":[1,"storybook-force-status"],"overrideNotification":[16],"isLoading":[32],"notificationType":[32],"notificationTitle":[32],"notificationMessages":[32],"notificationActionText":[32],"order":[32],"isWaitingToRedirect":[32]}],[1,"zonos-checkout-progress-tabs",{"tabColor":[1,"tab-color"],"backgroundColor":[1,"background-color"],"setTabItems":[64],"setTabSelected":[64]}],[1,"zonos-review",{"mobile":[4],"collapsed":[4],"isMobile":[32]},[[9,"resize","handleWindowResize"]]],[1,"zonos-cart-items",{"errorImages":[32]}],[1,"zonos-currency-toggle",{"errorImages":[32]}],[1,"zonos-rest-state",{"restStateSubtitle":[1,"rest-state-subtitle"],"restStateTitle":[1,"rest-state-title"],"restStateType":[1,"rest-state-type"],"isErrorImageLoad":[32]}],[1,"zonos-link",{"href":[1],"rel":[1],"target":[1],"linkTitle":[1,"link-title"]}]]]]'),e))));
1
+ import{p as e,b as o}from"./p-ab41bab5.js";export{s as setNonce}from"./p-ab41bab5.js";import{g as t}from"./p-e1255160.js";(()=>{const o=import.meta.url,t={};return""!==o&&(t.resourcesUrl=new URL(".",o).href),e(t)})().then((async e=>(await t(),o(JSON.parse('[["p-e03e1a62",[[2,"zonos-checkout",{"appearanceSettingsOverride":[16],"preview":[4],"hiddenMode":[4,"hidden-mode"],"mobile":[4],"overrideStagingMode":[4,"override-staging-mode"],"defaultAddress":[16],"forceDialogOpen":[4,"force-dialog-open"],"defaultAddressParams":[32],"defaultCustomerProfileAddress":[32],"customerProfile":[32],"open":[32],"isOverlayLoading":[32],"stripe":[32],"submitLoading":[32],"collapseReviewMobile":[32],"isAttachError":[32],"isMobile":[32],"isIframed":[32],"zonosReviewRef":[32],"storybookPaymentStatusOverride":[32],"isLegacyCheckout":[32],"confirmDialogOpen":[32],"isCartExpired":[32],"payInUsdConfirmDialogOpen":[32],"inventoryCheckErrorMessage":[32],"placedOrderInfo":[32],"shouldShowFedexShippingConsentDialog":[32],"clientSecret":[32],"stripeCustomerSessionClientSecret":[32],"closeDialogHandler":[64],"init":[64],"setToFinishStep":[64],"mockCheckoutSession":[64],"triggerCheckoutInternational":[64]},[[16,"zonos--init-cart-info","initCartInfoHandler"],[4,"keydown","handleKeyPress"],[9,"resize","handleWindowResize"]],{"appearanceSettingsOverride":["appearanceSettingsOverrideChanged","handleAppearanceSettingsOverrideChange"],"overrideStagingMode":["overrideStagingModeChanged"],"mobile":["handleMobileChange"],"defaultAddress":["handleAddressChange"],"customerProfile":["handleCustomerProfileChange"],"clientSecret":["handleClientSecretChange"],"stripeCustomerSessionClientSecret":["handleClientSecretChange"],"open":["handleOpenChange"]}]]],["p-88ea9f82",[[2,"zonos-collect",{"mobile":[4],"tablet":[4],"stripe":[32],"showLanguageDialogMobile":[32],"submitLoading":[32],"collapseReview":[32],"isMobile":[32],"isTablet":[32],"zonosReviewRef":[32],"storybookPaymentStatusOverride":[32],"isOverlayLoading":[32],"isCartCollected":[32],"isCartExpired":[32],"payInUsdConfirmDialogOpen":[32],"inventoryCheckErrorMessage":[32],"confirmationId":[32],"clientSecret":[32],"stripeCustomerSessionClientSecret":[32]},[[9,"resize","resizeListener"]]]]],["p-e8949e7e",[[1,"zonos-hello",{"mobileLocationOverride":[1,"mobile-location-override"],"animateFromLeftOverride":[4,"animate-from-left-override"],"appearanceSettingsOverride":[16],"showPeekMessage":[32],"zonosStoreHelloSettings":[32],"showDialog":[32],"peekMessage":[32],"initialUrl":[32],"allRestrictedItems":[32],"allFoundProducts":[32],"productsOnPage":[32],"isHelloWidgetRendered":[32],"isMobile":[32],"getCountryList":[64],"displayCurrency":[64],"convertAndFormat":[64],"convert":[64],"format":[64],"openHelloDialog":[64]},[[9,"resize","handleResize"]],{"showDialog":["showDialogHandler"],"appearanceSettingsOverride":["handleAppearanceSettingsOverrideChange"]}]]],["p-2dbcecf4",[[1,"zonos-controller",{"config":[16],"zonosApiKey":[1,"zonos-api-key"],"initCheckoutElement":[64],"initCollectElement":[64],"setupGoogleFont":[64],"showNotification":[64],"reset":[64],"overrideConfig":[64],"overrideCountry":[64],"getAppearanceSetting":[64],"updateOrganizationName":[64]},[[8,"locationchange","handleLocationChange"]]]]],["p-31975752",[[1,"zonos-tooltip",{"label":[1],"subtitle":[1],"showTooltip":[32]}]]],["p-5f398c28",[[1,"zonos-component",{"first":[1],"middle":[1],"last":[1]}]]],["p-31af91f0",[[1,"zonos-logo",{"theme":[1],"width":[1]}]]],["p-4592ae49",[[1,"zonos-text",{"textColor":[1,"text-color"],"size":[1],"type":[1],"weight":[2],"ready":[32]}]]],["p-eae3462c",[[1,"zonos-hello-dialog",{"isOpen":[4,"is-open"],"setIsOpen":[16],"mobileLocationOverride":[1,"mobile-location-override"],"animateFromLeftOverride":[4,"animate-from-left-override"],"appearanceSettings":[16],"restrictedItems":[16],"welcomeMessage":[32],"showCountrySelect":[32],"showLanguageSelect":[32]},[[4,"click","globalClickHandler"]],{"isOpen":["isOpenHandler"]}]]],["p-27874c22",[[1,"zonos-shipping-rich-radio",{"items":[16],"borderColor":[1,"border-color"],"borderStyle":[1,"border-style"],"theme":[1],"selectedItem":[16]}]]],["p-936b54c1",[[1,"zonos-toggle",{"options":[16],"value":[1]}]]],["p-905d2490",[[1,"zonos-confirm-dialog",{"dialogTitle":[1,"dialog-title"],"dialogIntent":[1,"dialog-intent"],"dialogSubtitle":[1,"dialog-subtitle"],"submitBtnColor":[1,"submit-btn-color"],"dialogConfirmBtnText":[1,"dialog-confirm-btn-text"],"dialogWidth":[2,"dialog-width"],"dialogCancelBtnText":[1,"dialog-cancel-btn-text"],"dialogType":[1,"dialog-type"],"isMobile":[4,"is-mobile"],"dialogOpen":[4,"dialog-open"],"noClickOutside":[4,"no-click-outside"]},[[4,"keydown","handleKeyDown"]]],[1,"zonos-loading-overlay",{"open":[4],"spinnerColor":[1,"spinner-color"],"size":[2]}]]],["p-c7b658cb",[[1,"zonos-badge",{"bold":[4],"badgeColor":[1,"badge-color"],"icon":[16],"iconRight":[4,"icon-right"],"size":[1],"rounded":[4],"loading":[4],"dismissHandler":[16]}]]],["p-55e2e4ed",[[1,"zonos-input",{"inputValue":[1,"input-value"],"inputLabel":[1,"input-label"],"inputSize":[1,"input-size"],"isDisabled":[4,"is-disabled"],"isError":[4,"is-error"],"inputPlaceholder":[1,"input-placeholder"],"value":[32]},null,{"inputValue":["onInputValueChange"]}]]],["p-2ca8b037",[[1,"zonos-collect-cart-items",{"errorImages":[32]}],[1,"zonos-h-stack",{"spacing":[2]}],[1,"zonos-skeleton",{"skeletonWidth":[1,"skeleton-width"],"skeletonHeight":[1,"skeleton-height"],"dismissHandler":[16]}]]],["p-a6e74856",[[2,"zonos-stripe-input",{"name":[1],"autoComplete":[1,"auto-complete"],"inputValue":[1,"input-value"],"inputLabel":[1,"input-label"],"overridePrimaryColor":[1,"override-primary-color"],"overrideSecondaryColor":[1,"override-secondary-color"],"isDisabled":[4,"is-disabled"],"isError":[4,"is-error"],"error":[1],"inputPlaceholder":[1,"input-placeholder"],"value":[1025],"required":[4],"internalValue":[32]},null,{"inputValue":["onInputValueChange"],"value":["onValueChange"]}]]],["p-9b8750f3",[[1,"zonos-collapse",{"collapsed":[4],"collapseSize":[2,"collapse-size"],"height":[32],"iframe":[32]}]]],["p-74ca7739",[[1,"zonos-country-flag",{"countryCode":[1,"country-code"],"size":[2]}]]],["p-bf9d889f",[[1,"zonos-v-stack",{"spacing":[2]}]]],["p-143d706b",[[1,"zonos-language-select",{"handleOnClose":[16]}],[1,"zonos-select-dialog-header",{"handleOnClose":[16],"label":[1]}]]],["p-c50cc926",[[1,"zonos-card",{"actions":[16],"backgroundColor":[1,"background-color"],"borderRadius":[2,"border-radius"],"footerActions":[16],"footerContent":[16],"footerHeight":[2,"footer-height"],"label":[16],"spacing":[1]}],[1,"zonos-banner",{"bannerTitle":[1,"banner-title"],"intent":[1],"hasContent":[32]}]]],["p-1eae4987",[[1,"zonos-empty-state-payment",{"emptyStateText":[1,"empty-state-text"],"theme":[1]}],[2,"zonos-payment",{"titleText":[1,"title-text"],"stripe":[32],"stripeElements":[32],"isPaymentInfoFilled":[32]},null,{"isPaymentInfoFilled":["watchIsPaymentInfoFilled"],"stripeElements":["watchInitStripe"],"stripe":["watchInitStripe"]}],[2,"zonos-paypal-payment"],[1,"zonos-notification",{"notificationArray":[32],"showNotification":[64]}]]],["p-00ec22b2",[[17,"zonos-button",{"buttonColor":[1,"button-color"],"backgroundColor":[1,"background-color"],"borderStyle":[1,"border-style"],"isDisabled":[4,"is-disabled"],"icon":[16],"iconRight":[4,"icon-right"],"size":[1],"variant":[1],"noBackground":[4,"no-background"],"withBoxShadow":[4,"with-box-shadow"],"noPaddingLeft":[4,"no-padding-left"],"noPaddingRight":[4,"no-padding-right"],"loading":[4],"justifyContent":[1,"justify-content"],"bold":[4],"theme":[1],"hasIcon":[32],"hasContent":[32]},[[2,"click","clickHandler"]],{"icon":["iconChangeHandler"]}],[1,"zonos-spinner",{"size":[2],"spinnerColor":[1,"spinner-color"]}],[1,"zonos-icon",{"autoHeight":[4,"auto-height"],"iconColor":[1,"icon-color"],"content":[1],"size":[2]}]]],["p-3185968f",[[2,"zonos-collect-payment",{"submitBtnType":[1,"submit-btn-type"],"continueLoading":[4,"continue-loading"],"submitBtnColor":[1,"submit-btn-color"],"overridePrimaryColor":[1,"override-primary-color"],"showErrorBanner":[32],"hasStripePaymentError":[32],"stagingOrderCreateErrorMessage":[32],"internalContinueLoading":[32]},null,{"continueLoading":["continueLoadingWatcher"],"hasStripePaymentError":["stripePaymentErrorWatcher"]}],[1,"zonos-collect-footer",{"mobile":[4],"tablet":[4],"dataTheme":[1,"data-theme"],"showLanguageDialog":[32],"isMobile":[32],"isTablet":[32]},[[4,"click","handleGlobalClick"]],{"mobile":["handleMobileChange"],"tablet":["handleTabletChange"]}],[1,"zonos-collect-order-details",{"mobile":[4],"collapsed":[4],"landedCostId":[1,"landed-cost-id"],"isMobile":[32],"collapseState":[32]},[[9,"resize","handleWindowResize"]],{"collapsed":["handleCollapseChangeFromProp"],"collapseState":["handleCollapseChange"]}],[1,"zonos-collect-finish",{"borderRadius":[1,"border-radius"],"storybookForceStatus":[1,"storybook-force-status"],"overrideNotification":[16],"confirmationId":[1,"confirmation-id"],"isLoading":[32],"notificationType":[32],"notificationTitle":[32],"notificationMessages":[32],"notificationActionText":[32],"order":[32],"isWaitingToRedirect":[32]}],[1,"zonos-collect-review",{"mobile":[4],"tablet":[4],"collapsed":[4],"isMobile":[32],"isTablet":[32],"isLoading":[32]},[[9,"resize","handleWindowResize"]]],[1,"zonos-collect-subtotal",{"subtotals":[32]}]]],["p-fd3b46ee",[[1,"zonos-country-select",{"handleOnClose":[16],"inputValue":[32]}],[1,"zonos-hello-dialog-footer",{"appearanceSettings":[16],"setShowCountrySelect":[16],"setShowLanguageSelect":[16]}],[1,"zonos-custom-message",{"icon":[1],"message":[1]}],[2,"zonos-virtual-scroll",{"renderItem":[16],"itemWidth":[2,"item-width"],"fallbackItemHeight":[2,"fallback-item-height"],"itemHeights":[16],"buffer":[2],"scrollTop":[32],"totalHeight":[32],"containerDimensions":[32]},null,{"itemHeights":["updateTotalHeight"],"fallbackItemHeight":["updateTotalHeight"]}]]],["p-c1ecab92",[[1,"zonos-address-update-dialog",{"continueLoading":[4,"continue-loading"],"dialogLoading":[4,"dialog-loading"],"dialogOpen":[4,"dialog-open"],"submitBtnType":[1,"submit-btn-type"],"submitBtnColor":[1,"submit-btn-color"],"isMobile":[4,"is-mobile"],"shippingAddress":[16],"billingAddress":[16],"translatedShippingAddress":[16],"translatedBillingAddress":[16],"showErrorBanner":[32],"translatedShippingAddressState":[32],"translatedBillingAddressState":[32]},null,{"translatedShippingAddress":["watchTranslatedShippingAddress"],"translatedBillingAddress":["watchTranslatedBillingAddress"]}],[6,"zonos-custom-address",{"type":[1],"titleText":[1,"title-text"],"defaultAddress":[16],"taxIdErrorMessage":[1,"tax-id-error-message"],"stripe":[32],"isDirtyAddress":[32],"isAddressFilled":[32],"isAddressLine1Entered":[32],"addressSuggestions":[32],"countryField":[32],"startGooglePlaceSuggestions":[32],"shipToCountries":[32],"shippingZones":[32],"city":[32],"country":[32],"firstName":[32],"lastName":[32],"line1":[32],"line2":[32],"phone":[32],"postalCode":[32],"state":[32],"cityError":[32],"stateError":[32],"postalCodeError":[32],"phoneError":[32],"firstNameError":[32],"lastNameError":[32],"isFirstInitialization":[32],"addressService":[32],"checkoutSessionId":[32]},null,{"checkoutSessionId":["isAddressFilledChanged"],"isAddressFilled":["isAddressFilledChanged"],"defaultAddress":["defaultAddressChanged"],"line1":["line1Changed"],"city":["formFieldsChanged"],"country":["formFieldsChanged","countryChanged"],"firstName":["formFieldsChanged"],"lastName":["formFieldsChanged"],"line2":["formFieldsChanged"],"phone":["formFieldsChanged"],"postalCode":["formFieldsChanged"],"state":["formFieldsChanged"],"addressService":["shouldEnabledCustomAddressChanged"],"shippingZones":["shippingZonesChanged"]}],[1,"zonos-checkbox",{"backgroundColor":[1,"background-color"],"label":[1],"isChecked":[4,"is-checked"],"isDisabled":[4,"is-disabled"],"size":[2],"fontSize":[1,"font-size"],"borderStyle":[1,"border-style"]},[[1,"click","onClick"]]],[1,"zonos-address-suggestions",{"type":[1],"suggestions":[16],"selectedSuggestionId":[32],"localSuggestions":[32],"lastHoveredSuggestionId":[32]},null,{"suggestions":["suggestionsChanged"]}],[1,"zonos-dialog",{"open":[4],"headerText":[1,"header-text"],"width":[1],"height":[1],"minHeight":[1,"min-height"],"noHeader":[4,"no-header"],"noBodyPadding":[4,"no-body-padding"],"noBorder":[4,"no-border"],"borderStyle":[1,"border-style"],"noCloseButton":[4,"no-close-button"],"noClickOutside":[4,"no-click-outside"],"mobile":[4],"isLoading":[4,"is-loading"],"isMobile":[32]},[[9,"resize","handleWindowResize"],[4,"keydown","handleKeyDown"]]],[2,"zonos-stripe-phone-input",{"autoComplete":[1,"auto-complete"],"countryOptions":[16],"disabled":[4],"error":[1],"inputLabel":[1,"input-label"],"overridePrimaryColor":[1,"override-primary-color"],"overrideSecondaryColor":[1,"override-secondary-color"],"inputValue":[1,"input-value"],"countryCode":[1,"country-code"],"minWidth":[1,"min-width"],"selectedCountry":[32],"phoneNumber":[32],"isFocused":[32],"isSelectOpen":[32]},null,{"countryOptions":["onCountryOptionsChange"],"selectedCountry":["onSelectedCountryChange"],"inputValue":["onPhoneNumberChange"]}],[6,"zonos-address",{"type":[1],"titleText":[1,"title-text"],"defaultAddress":[16],"taxIdErrorMessage":[1,"tax-id-error-message"],"stripe":[32],"isDirtyAddress":[32],"isAddressFilled":[32],"checkoutSessionId":[32],"prevCountry":[32],"prevPostalCode":[32]},null,{"checkoutSessionId":["isAddressFilledChanged"],"isAddressFilled":["isAddressFilledChanged"],"stripe":["watchInitStripe"],"defaultAddress":["defaultAddressChanged"]}],[1,"zonos-address-display",{"currentAddress":[16],"addressType":[1,"address-type"]}],[1,"zonos-address-form",{"currentAddress":[16],"translatedAddress":[16],"addressType":[1,"address-type"],"localAddress":[32]},null,{"translatedAddress":["watchCurrentAddress"]}],[2,"zonos-link-authentication",{"titleText":[1,"title-text"],"defaultEmail":[1,"default-email"],"isEmailError":[4,"is-email-error"],"stripe":[32],"isStagingMode":[32],"clientSecret":[32],"retriesInitializeLink":[32]},null,{"isStagingMode":["watchIsStagingMode"],"stripe":["watchInitStripe"],"clientSecret":["watchInitStripe"],"defaultEmail":["watchDefaultEmail"]}],[1,"zonos-stripe-select",{"name":[1],"selectedValue":[1,"selected-value"],"selectLabel":[1,"select-label"],"overridePrimaryColor":[1,"override-primary-color"],"overrideSecondaryColor":[1,"override-secondary-color"],"isDisabled":[4,"is-disabled"],"isError":[4,"is-error"],"error":[1],"selectPlaceholder":[1,"select-placeholder"],"options":[16],"autoComplete":[1,"auto-complete"],"value":[1025],"required":[4],"isClearable":[4,"is-clearable"],"minWidth":[1,"min-width"],"internalValue":[32],"internalOptions":[32]},null,{"options":["onOptionsChange"],"selectedValue":["onSelectedValueChange"],"value":["onValueChange"]}]]],["p-30e835a8",[[2,"zonos-customer-info",{"continueLoading":[4,"continue-loading"],"submitBtnType":[1,"submit-btn-type"],"submitBtnColor":[1,"submit-btn-color"],"isMobile":[4,"is-mobile"],"defaultAddress":[16],"shouldUseCustomAddressFormOverride":[4,"should-use-custom-address-form-override"],"showErrorBanner":[32],"shippingCountry":[32],"isCheckingForRestrictedItems":[32],"isValidatingAddress":[32],"taxIdErrorMessage":[32],"invalidShippingCharacterList":[32],"invalidBillingCharacterList":[32],"openAddressValidationDialog":[32],"isEmailError":[32],"recordedFormTypeUsed":[32],"selectedCountryCode":[32],"genericSettings":[32],"addressFormRenderType":[32],"exceededCharacterLimitErrorFieldList":[32]},null,{"showErrorBanner":["watchShowErrorBanner"],"shouldUseCustomAddressFormOverride":["watchShouldEnabledCustomAddress"],"genericSettings":["watchShouldEnabledCustomAddress"],"selectedCountryCode":["watchShouldEnabledCustomAddress"]}],[2,"zonos-checkout-payment",{"submitBtnType":[1,"submit-btn-type"],"continueLoading":[4,"continue-loading"],"submitBtnColor":[1,"submit-btn-color"],"isMobile":[4,"is-mobile"],"overridePrimaryColor":[1,"override-primary-color"],"showErrorBanner":[32],"hasStripePaymentError":[32],"stagingOrderCreateErrorMessage":[32],"internalContinueLoading":[32]},null,{"continueLoading":["continueLoadingWatcher"],"hasStripePaymentError":["stripePaymentErrorWatcher"]}],[1,"zonos-checkout-footer",{"mobile":[4],"dataTheme":[1,"data-theme"],"showLanguageDialog":[32],"isMobile":[32]},[[4,"click","handleGlobalClick"]],{"mobile":["handleMobileChange"]}],[2,"zonos-shipping",{"continueLoading":[4,"continue-loading"],"submitBtnColor":[1,"submit-btn-color"],"submitBtnType":[1,"submit-btn-type"],"selectedShippingMethod":[32],"collapsedDAPOptions":[32],"isSelecting":[32],"showErrorBanner":[32],"serviceLevelsDDP":[32],"serviceLevelsDAP":[32],"serviceLevelsOther":[32],"serviceLevelsAll":[32],"displayBaseCurrency":[32],"shippingData":[32]}],[1,"zonos-cart-subtotal",{"submitBtnType":[1,"submit-btn-type"],"submitBtnColor":[1,"submit-btn-color"],"loading":[32]}],[1,"zonos-cart-restricted-items",{"hide":[4],"errorImages":[32],"internalCollapsed":[32],"firstRender":[32]}],[1,"zonos-checkout-finish",{"borderRadius":[1,"border-radius"],"storybookForceStatus":[1,"storybook-force-status"],"overrideNotification":[16],"isLoading":[32],"notificationType":[32],"notificationTitle":[32],"notificationMessages":[32],"notificationActionText":[32],"order":[32],"isWaitingToRedirect":[32]}],[1,"zonos-checkout-progress-tabs",{"tabColor":[1,"tab-color"],"backgroundColor":[1,"background-color"],"setTabItems":[64],"setTabSelected":[64]}],[1,"zonos-review",{"mobile":[4],"collapsed":[4],"isMobile":[32]},[[9,"resize","handleWindowResize"]]],[1,"zonos-cart-items",{"errorImages":[32]}],[1,"zonos-currency-toggle",{"errorImages":[32]}],[1,"zonos-rest-state",{"restStateSubtitle":[1,"rest-state-subtitle"],"restStateTitle":[1,"rest-state-title"],"restStateType":[1,"rest-state-type"],"isErrorImageLoad":[32]}],[1,"zonos-link",{"href":[1],"rel":[1],"target":[1],"linkTitle":[1,"link-title"]}]]]]'),e))));
@@ -115,7 +115,7 @@ DOMTokenList
115
115
  var resourcesUrl = scriptElm ? scriptElm.getAttribute('data-resources-url') || scriptElm.src : '';
116
116
  var start = function() {
117
117
  // if src is not present then origin is "null", and new URL() throws TypeError: Failed to construct 'URL': Invalid base URL
118
- var url = new URL('./p-81b357f7.system.js', new URL(resourcesUrl, window.location.origin !== 'null' ? window.location.origin : undefined));
118
+ var url = new URL('./p-c2442878.system.js', new URL(resourcesUrl, window.location.origin !== 'null' ? window.location.origin : undefined));
119
119
  System.import(url.href);
120
120
  };
121
121
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zonos/elements",
3
- "version": "1.3.230",
3
+ "version": "1.3.232",
4
4
  "description": "Zonos component UI for Stripe elements",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.cjs.js",
@@ -56,7 +56,7 @@
56
56
  "storybook:open": "open https://dev.storybook.elements.zonos.com",
57
57
  "storybook": "storybook dev -p 7013 --no-open --quiet",
58
58
  "test": "stencil test --spec --detectOpenHandles --watchAll",
59
- "test:prod": "stencil test --spec --detectOpenHandles",
59
+ "test:prod": "stencil test --spec",
60
60
  "tsc": "tsc --noEmit",
61
61
  "tsc:prod": "pnpm tsc && pnpm demo:exec tsc",
62
62
  "version:major": "pnpm build && pnpm version major -m 'Bump version %s' && pnpm version:save && pnpm push:tags",
@@ -112,7 +112,7 @@
112
112
  "@types/tinycolor2": "^1.4.6",
113
113
  "@types/turndown": "^5.0.5",
114
114
  "@typescript-eslint/eslint-plugin": "^8.18.0",
115
- "@typescript-eslint/parser": "^8.18.0",
115
+ "@typescript-eslint/parser": "^8.38.0",
116
116
  "@vitejs/plugin-react": "^4.3.4",
117
117
  "caniuse-lite": "^1.0.30001689",
118
118
  "clean-css-cli": "^5.6.3",
@@ -1 +0,0 @@
1
- var __awaiter=this&&this.__awaiter||function(e,t,r,o){function n(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,i){function a(e){try{d(o.next(e))}catch(e){i(e)}}function s(e){try{d(o["throw"](e))}catch(e){i(e)}}function d(e){e.done?r(e.value):n(e.value).then(a,s)}d((o=o.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},o,n,i,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(e){return function(t){return d([e,t])}}function d(s){if(o)throw new TypeError("Generator is already executing.");while(a&&(a=0,s[0]&&(r=0)),r)try{if(o=1,n&&(i=s[0]&2?n["return"]:s[0]?n["throw"]||((i=n["return"])&&i.call(n),0):n.next)&&!(i=i.call(n,s[1])).done)return i;if(n=0,i)s=[s[0]&2,i.value];switch(s[0]){case 0:case 1:i=s;break;case 4:r.label++;return{value:s[1],done:false};case 5:r.label++;n=s[1];s=[0];continue;case 7:s=r.ops.pop();r.trys.pop();continue;default:if(!(i=r.trys,i=i.length>0&&i[i.length-1])&&(s[0]===6||s[0]===2)){r=0;continue}if(s[0]===3&&(!i||s[1]>i[0]&&s[1]<i[3])){r.label=s[1];break}if(s[0]===6&&r.label<i[1]){r.label=i[1];i=s;break}if(i&&r.label<i[2]){r.label=i[2];r.ops.push(s);break}if(i[2])r.ops.pop();r.trys.pop();continue}s=t.call(e,r)}catch(e){s=[6,e];n=0}finally{o=i=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(e,t,r){if(r||arguments.length===2)for(var o=0,n=t.length,i;o<n;o++){if(i||!(o in t)){if(!i)i=Array.prototype.slice.call(t,0,o);i[o]=t[o]}}return e.concat(i||Array.prototype.slice.call(t))};import{z as zonosStore,c as createStore}from"./zonosStore-e3d0493a.js";import{s as storageStore,l as localizationStore,f as filterValidTests,b as storageStoreSetEnabledVariantTestKeys}from"./localization-106476cb.js";import{t as translate}from"./translationStore-766b7521.js";import{f as fallbackApiList,h as handleFetch,g as getIsTestMode,a as getIsStagingMode,s as sendErrorLog,l as logError,j as jsonParse}from"./handleFetch-a844cac1.js";import{l as log,b as allLogs}from"./VarianceTest-572cecf5.js";import{i as isDarkColor}from"./isDarkColor-83e0c27e.js";import{g as getBorderRadius}from"./getBorderRadius-6281d902.js";var extractName=function(e){var t=e.firstName,r=e.lastName,o=e.name;var n;if(!o&&!t&&!r){return{firstName:"",lastName:""}}var i=(o===null||o===void 0?void 0:o.split(/\s+/))||[];var a=(t===null||t===void 0?void 0:t.trim())||((n=i[0])===null||n===void 0?void 0:n.trim())||"";var s=(r===null||r===void 0?void 0:r.trim())||i.slice(1).join(" ").trim()||"";return{firstName:a,lastName:s}};var getTranslatedAddress=function(e){var t=e.currentAddress,r=e.translatedAddress;var o,n,i,a,s,d;var c=t.value.address,l=c.city,u=c.country,v=c.line1,S=c.line2,p=c.postal_code,f=c.state;var h=t.value.name||[t.value.firstName,t.value.lastName].join(" ");return{city:((o=r.city)===null||o===void 0?void 0:o[l])||l,country:u,line1:((n=r.line1)===null||n===void 0?void 0:n[v])||v,line2:((i=r.line2)===null||i===void 0?void 0:i[S||""])||S||"",name:((a=r.name)===null||a===void 0?void 0:a[h])||h,phone:t.value.phone||"",postal_code:((s=r.postal_code)===null||s===void 0?void 0:s[p])||p,state:((d=r.state)===null||d===void 0?void 0:d[f])||f}};var prepCartCalculateLandedCost=function(e){var t;var r=new URLSearchParams(window.location.search).get("zonosE2ETest")==="1";var o=stripeStore.stripeLinkEventData;var n=stripeStore.stripeAddressEventData;var i=stripeStore.stripeShippingSameAsBilling?stripeStore.stripeAddressEventData:stripeStore.stripeBillingAddressEventData;if(!n||!i){throw new Error("Missing stripe address data")}var a=getTranslatedAddress({currentAddress:n,translatedAddress:stripeStore.translatedAddress.address});var s=extractName({name:a.name}),d=s.firstName,c=s.lastName;var l=getTranslatedAddress({currentAddress:i,translatedAddress:stripeStore.translatedAddress.address});var u=extractName({name:l.name}),v=u.firstName,S=u.lastName;return{billingAddress:{addressLine1:l.line1,addressLine2:l.line2||"",city:l.city,country:l.country,postalCode:l.postal_code,state:l.state},billingContact:{firstName:v,lastName:S,phone:l.phone},cartCurrencyCode:(t=cartStore.items[0])===null||t===void 0?void 0:t.currencyCode,cartId:e,checkoutSessionId:storageStore.checkoutSessionId||"",contact:{companyName:stripeStore.companyName,email:o===null||o===void 0?void 0:o.value.email,firstName:d,lastName:c,phone:a.phone},isTest:!!r,landedCostAdjustments:cartStore.promoCode?[{amount:0,productId:null,promoCode:cartStore.promoCode,sku:null,type:"PROMO_CODE"}]:[],shipToTaxId:stripeStore.taxId,shippingAddress:{addressLine1:a.line1,addressLine2:a.line2,city:a.city,country:a.country,postalCode:a.postal_code,state:a.state}}};var prepCalculateLandedCost=function(){var e=new URLSearchParams(window.location.search).get("zonosE2ETest")==="1";var t=stripeStore.stripeLinkEventData;var r=stripeStore.stripeAddressEventData;var o=stripeStore.stripeShippingSameAsBilling?stripeStore.stripeAddressEventData:stripeStore.stripeBillingAddressEventData;log({stripeAddressData:r,stripeBillingAddressData:o},"info");if(!r||!o){throw new Error("Missing stripe address data")}var n=getTranslatedAddress({currentAddress:r,translatedAddress:stripeStore.translatedAddress.address});var i=extractName({name:n.name}),a=i.firstName,s=i.lastName;var d=getTranslatedAddress({currentAddress:o,translatedAddress:stripeStore.translatedAddress.address});var c=extractName({name:d.name}),l=c.firstName,u=c.lastName;var v=cartStore.adjustments.map((function(e){return{amount:e.amount,name:e.description||null,productId:e.productId,sku:e.sku,type:e.type}}));var S=cartStore.promoCode?__spreadArray([{amount:0,productId:null,promoCode:cartStore.promoCode,sku:null,type:"PROMO_CODE"}],v,true):v;return{billingAddress:{addressLine1:d.line1,addressLine2:d.line2||"",city:d.city,country:d.country,postalCode:d.postal_code,state:d.state},billingContact:{firstName:l,lastName:u,phone:d.phone},checkoutSessionId:storageStore.checkoutSessionId||"",contact:{companyName:stripeStore.companyName,email:t===null||t===void 0?void 0:t.value.email,firstName:a,lastName:s,phone:n.phone},isTest:e,items:cartStore.items,landedCostAdjustments:S,shipToTaxId:stripeStore.taxId,shippingAddress:{addressLine1:n.line1,addressLine2:n.line2,city:n.city,country:n.country,postalCode:n.postal_code,state:n.state}}};var triggerBuildLandedCost=function(e){return __awaiter(void 0,void 0,void 0,(function(){var t,r,o,n,i,a,s,d,c,l;return __generator(this,(function(u){switch(u.label){case 0:a=prepCalculateLandedCost();return[4,e({billingAddress:a.billingAddress,billingContact:a.billingContact,checkoutSessionId:a.checkoutSessionId,contact:a.contact,landedCostAdjustments:a.landedCostAdjustments,publicCredential:window.Zonos.zonosApiKey||"",shippingAddress:a.shippingAddress,zonosApiRoute:fallbackApiList["vercel"]})];case 1:s=u.sent();if(!s||!((t=s.checkoutSessionWorkflow)===null||t===void 0?void 0:t.length)&&((r=s.errors)===null||r===void 0?void 0:r.length)){throw new Error("Failed to build landed cost: ".concat(((n=(o=s===null||s===void 0?void 0:s.errors)===null||o===void 0?void 0:o[0])===null||n===void 0?void 0:n.message)||"Unknown error"))}return[4,handleFetch("/api/zonos-elements/validate-landed-cost",{body:s,headers:{"Content-Type":"application/json"},method:"POST"})];case 2:d=u.sent(),c=d.errors,l=d.json;if(!l||c.length){throw new Error("Invalid landed cost object: ".concat(((i=c.find(Boolean))===null||i===void 0?void 0:i.message)||"Unknown error"))}return[2,s]}}))}))};var calculateLandedCost=function(e){return __awaiter(void 0,void 0,void 0,(function(){var t,r,o,n,i,a,s;return __generator(this,(function(d){switch(d.label){case 0:r=zonosStore.checkoutSettings.buildLandedCost;if(!r)return[3,2];return[4,triggerBuildLandedCost(r)];case 1:o=d.sent();return[2,o];case 2:return[4,handleFetch("/api/zonos-elements/calculate-landed-cost",{body:prepCalculateLandedCost(),method:"POST",signal:e===null||e===void 0?void 0:e.signal})];case 3:n=d.sent(),i=n.errors,a=n.json;if(i.length||!a){s=((t=i[0])===null||t===void 0?void 0:t.message)==="The user aborted a request.";if(s){throw new Error("The landed cost calculation request was aborted to initiate a new one.")}i.forEach((function(e){console.warn("Error calculating landed cost: ".concat(e.message))}));if(!a){throw new Error("Failed to calculate landed cost")}return[2,a]}return[2,a]}}))}))};var cartCalculateLandedCost=function(e){return __awaiter(void 0,[e],void 0,(function(e){var t,r,o,n,i,a,s,d,c,l;var u=e.abortController,v=e.cartId;return __generator(this,(function(e){switch(e.label){case 0:return[4,handleFetch("/api/zonos-elements/cart-calculate-landed-cost",{body:prepCartCalculateLandedCost(v),method:"POST",signal:u===null||u===void 0?void 0:u.signal})];case 1:a=e.sent(),s=a.errors,d=a.json;if(s.length||!d){c=typeof((t=s[0])===null||t===void 0?void 0:t.message)==="string"&&(((r=s[0])===null||r===void 0?void 0:r.message)==="The user aborted a request."||((o=s[0])===null||o===void 0?void 0:o.message.includes("signal is aborted"))||((n=s[0])===null||n===void 0?void 0:n.message.includes("The operation was aborted"))||((i=s[0])===null||i===void 0?void 0:i.message.includes("Fetch is aborted")));l=c?"The landed cost calculation request was aborted to initiate a new one.":"Failed to calculate landed cost";throw new Error(l)}return[2,d]}}))}))};var __rest=undefined&&undefined.__rest||function(e,t){var r={};for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0)r[o]=e[o];if(e!=null&&typeof Object.getOwnPropertySymbols==="function")for(var n=0,o=Object.getOwnPropertySymbols(e);n<o.length;n++){if(t.indexOf(o[n])<0&&Object.prototype.propertyIsEnumerable.call(e,o[n]))r[o[n]]=e[o[n]]}return r};var calculateLandedCostNormalized=function(e){return __awaiter(void 0,void 0,void 0,(function(){var t,r,o,n,i;return __generator(this,(function(a){switch(a.label){case 0:t=window.Zonos.cartId;if(!!t)return[3,2];return[4,calculateLandedCost(e)];case 1:r=a.sent();return[2,r];case 2:return[4,cartCalculateLandedCost({abortController:e,cartId:t})];case 3:o=a.sent(),n=o.cartWorkflow,i=__rest(o,["cartWorkflow"]);return[2,Object.assign(Object.assign({},i),{itemCreateWorkflow:n.items})]}}))}))};var trackConversionEvent=function(e){return __awaiter(void 0,[e],void 0,(function(e){var t,r,o,n,i,a,s,d,c;var l=e.checkoutSessionId,u=e.eventName,v=e.metadata;return __generator(this,(function(e){switch(e.label){case 0:o=Date.now();n=__spreadArray([],window.Zonos.trackEventLogs,true);window.Zonos.trackEventLogs.push({checkoutSessionId:l,eventCreated:o,eventName:u});i=window.location.href.includes("zonos.com")&&!window.location.href.includes("checkout.zonos.com")||!!((t=window.Zonos)===null||t===void 0?void 0:t.zonosQaUrl)||!!((r=window.Zonos)===null||r===void 0?void 0:r.debug);a=getIsTestMode()||getIsStagingMode();if((a||i)&&!window.Zonos.zonosConversionTest){return[2]}s=localizationStore.selectedCountryCode;d=zonosStore.organizationId;if(!l){void sendErrorLog({endpoint:"trackConversionEventMetric",errors:['Event "'.concat(u,'" - No checkout session id found')],metadata:{allLogs:allLogs,checkoutSessionId:l,eventName:u,metadata:v,organizationId:d,trackEventLogs:n}});return[2]}if(!d){void sendErrorLog({endpoint:"trackConversionEventMetric",errors:['Event "'.concat(u,'" - No organization id found')],metadata:{allLogs:allLogs,checkoutSessionId:l,eventName:u,metadata:v,organizationId:d,trackEventLogs:n}})}c={checkoutSessionId:l,countryCode:s,eventCreated:o,eventName:u,metadata:Object.assign(Object.assign({},v),{trackEventLogs:n}),organizationId:d};return[4,handleFetch("/api/zonos-elements/track-conversion-event",{body:c,method:"POST"})];case 1:e.sent();return[2]}}))}))};var getExcludeAddressFieldsObject=function(e){var t=e.address,r=e.invalidAdddressList;if(!t){return}if(!r){return}var o={};if(r.city){o.city=t.city}if(r.line1){o.line1=t.line1}if(r.line2){o.line2=t.line2}if(r.postal_code){o.postal_code=t.postal_code}if(r.state){o.state=t.state}if(r.name){o.name=t.name}return Object.keys(o).length?o:undefined};var buildTranslateRequest=function(e){var t=e.addressInvalidCharactersList,r=e.billingAddressInvalidCharactersList,o=e.stripeAddressEventData,n=e.stripeBillingAddressEventData,i=e.stripeShippingSameAsBilling;var a=!!(o===null||o===void 0?void 0:o.complete);var s=i?a:!!(n===null||n===void 0?void 0:n.complete);if(!a||!s){return null}if(!t&&!r){return null}var d=o.value;var c=(n===null||n===void 0?void 0:n.value)||null;var l=extractName({firstName:d.firstName,lastName:d.lastName,name:d.name}),u=l.firstName,v=l.lastName;var S="".concat(u," ").concat(v);var p=extractName({firstName:c===null||c===void 0?void 0:c.firstName,lastName:c===null||c===void 0?void 0:c.lastName,name:(c===null||c===void 0?void 0:c.name)||""}),f=p.firstName,h=p.lastName;var m=f&&h?"".concat(f," ").concat(h):"";var g=d.address;var y=c===null||c===void 0?void 0:c.address;return{address:getExcludeAddressFieldsObject({address:Object.assign(Object.assign({},g),{name:S}),invalidAdddressList:t}),billingAddress:!i?getExcludeAddressFieldsObject({address:y?Object.assign(Object.assign({},y),{name:m}):null,invalidAdddressList:r}):undefined,destinationCountry:g.country}};var sortServiceLevelOptionsByAmount=function(e){var t=e.sort((function(e,t){return e.amount-t.amount}));return t};var getCheckoutSession=function(){return __awaiter(void 0,void 0,void 0,(function(){var e,t,r,o;return __generator(this,(function(n){switch(n.label){case 0:if(!storageStore.checkoutSessionId){return[2,{errors:[{message:"No checkout session id found"}],json:null}]}e=new URLSearchParams;e.set("checkoutSessionId",storageStore.checkoutSessionId);return[4,handleFetch("/api/zonos-elements/get-checkout-session?".concat(e.toString()))];case 1:t=n.sent(),r=t.errors,o=t.json;return[2,{errors:r,json:o}]}}))}))};var validateCheckoutSession=function(){return __awaiter(void 0,void 0,void 0,(function(){var e,t,r,o;return __generator(this,(function(n){switch(n.label){case 0:return[4,getCheckoutSession()];case 1:t=n.sent(),r=t.errors,o=t.json;if(r.length||!o){logError("Failed to retrieve checkout session info before confirming payment ",r);void sendErrorLog({endpoint:"validateCheckoutSession",errors:r.map((function(e){return e.message})),metadata:{allLogs:allLogs}});return[2,{errorMessage:translate("Unable to retrieve the checkout session at the moment. Please try again or contact our support team."),valid:false}]}if(!((e=o.checkoutSession.landedCost)===null||e===void 0?void 0:e.id)){logError("Landed cost is not found in the checkout session before confirming payment.");void sendErrorLog({endpoint:"validateCheckoutSession",errors:["No landed cost found before confirming payment"],metadata:{allLogs:allLogs}});return[2,{errorMessage:translate('No shipment rating selected. Please go back to the "Shipping" step and select a shipment rating to proceed.'),valid:false}]}return[2,{errorMessage:"",valid:true}]}}))}))};var addressRuleStyle=function(e){var t=e.theme;var r={".AccordionItem":{color:"var(--colorText)"},".AccordionItem--selected":{color:"var(--colorText)"},".Action":{color:"var(--colorText)"},".Input":{boxShadow:"none",fontSize:zonosStore.appearance.fontSizeInputValue?"".concat(zonosStore.appearance.fontSizeInputValue,"px"):undefined,padding:"0",paddingBottom:"8px",paddingLeft:"16px",paddingRight:"8px",paddingTop:"6px"},".Label--resting":{fontSize:zonosStore.appearance.fontSizeInputLabel?"".concat(zonosStore.appearance.fontSizeInputLabel,"px"):undefined},".PickerItem--highlight":{boxShadow:"0 0 0 2px var(--colorBackground)"},".PickerItem--highlight:hover":{backgroundColor:"var(--colorBackground)",boxShadow:"none"},".PickerItem--new":{color:"var(--colorText)"},".Tab--selected":{borderStyle:"solid",borderWidth:"1px"}};switch(t){case"DARK":{return Object.assign(Object.assign({},r),{".Action":Object.assign(Object.assign({},r[".Action"]),{color:"white"}),".PickerItem--new":Object.assign(Object.assign({},r[".PickerItem--new"]),{color:"white"})})}default:return r}};var defaultVariable=function(e){var t=e.borderStyle,r=e.theme;switch(r){case"DARK":return{borderRadius:getBorderRadius({overrideBorderStyle:t}),colorBackground:"#101117",colorBackgroundText:"#C5C6CA",colorText:"#C5C6CA",colorTextPlaceholder:"#C5C6CA"};default:return{borderRadius:getBorderRadius({overrideBorderStyle:t}),iconMenuColor:"var(--colorText)",iconMenuHoverColor:"var(--colorText)"}}};var _m=createStore((function(){return{checkoutSettlementCurrency:"USD",clientSecret:sessionStorage.getItem("zonos--client-secret")||"",companyName:"",companyNameUsedWhenAsyncAddressUpdate:"",customAddressErrors:{city:"",firstName:"",lastName:"",line1:"",phone:"",postalCode:"",showError:false,state:""},customBillingAddressErrors:{city:"",firstName:"",lastName:"",line1:"",phone:"",postalCode:"",showError:false,state:""},customErrorMessage:null,customerProfile:null,fetchingLandedCostAbortController:null,hasPaymentError:false,isFetchingLandedCost:false,isFetchingSession:false,partyBillingId:null,partyShippingId:null,shouldInventoryRefund:false,shouldRenderPayInUsdButton:false,skipPaymentIntent:new URLSearchParams(window.location.search).get("skipPaymentIntent")==="0"?false:true,stripe:null,stripeAddressElement:null,stripeAddressEventData:null,stripeAddressUsedWhenAsyncAddressUpdate:null,stripeAddressUsedWhenFetchingLC:null,stripeAddressUsedWhenValidatingAddress:null,stripeBillingAddressElement:null,stripeBillingAddressEventData:null,stripeBillingAddressUsedWhenAsyncAddressUpdate:null,stripeBillingAddressUsedWhenFetchingLC:null,stripeBillingAddressUsedWhenValidatingAddress:null,stripeCustomerSessionClientSecret:null,stripeElements:null,stripeElementsForBillingAddress:null,stripeElementsOptions:null,stripeLinkElement:null,stripeLinkEventData:null,stripeLinkUsedWhenFetchingLC:null,stripePaymentElement:null,stripePaymentEventData:null,stripeShippingSameAsBilling:true,taxId:"",taxIdUsedWhenAsyncAddressUpdate:"",translatedAddress:{address:{},billingAddress:{},firstName:{},lastName:{},name:{}}}})),stripeStoreOnChange=_m.onChange,reset$1=_m.reset,stripeStore=_m.state;var getStripeOptions=function(e){var t=e.clientSecret,r=e.overrideBorderRadius,o=e.overridePrimaryColor,n=e.overrideSecondaryColor,i=e.overrideTheme,a=e.paypalEnabled;var s=o||zonosStore.appearance.colorPrimary;var d=n||zonosStore.appearance.colorSecondary;var c=s&&isDarkColor(s)?"night":"flat";var l=i==="DARK"?"night":"flat";var u=a?["external_paypal"]:[];return{appearance:{labels:"floating",rules:Object.assign({},addressRuleStyle({theme:i||"LIGHT"})),theme:i?l:c,variables:Object.assign(Object.assign({},defaultVariable({borderStyle:r,theme:"LIGHT"})),{colorPrimary:d})},clientSecret:t||undefined,customerSessionClientSecret:stripeStore.stripeCustomerSessionClientSecret||undefined,externalPaymentMethodTypes:__spreadArray([],u,true),locale:localizationStore.selectedLocale}};var stripeStoreCleanupDomesticShippingSession=function(){window.sessionStorage.removeItem("zonos--bigcommerce-domestic-checkout-shipping")};var stripeStoreSaveDomesticShippingSession=function(e){window.sessionStorage.setItem("zonos--bigcommerce-domestic-checkout-shipping",JSON.stringify(e))};var stripeStoreGetDomesticShippingSession=function(){var e=window.sessionStorage.getItem("zonos--bigcommerce-domestic-checkout-shipping");return jsonParse(e)};var initStripeElements=function(e){return __awaiter(void 0,void 0,void 0,(function(){var t,r,o,n,i;return __generator(this,(function(a){o=stripeStore.clientSecret;if(!stripeStore.stripe){log("Skip. Stripe is not initialized");return[2]}n=getStripeOptions({clientSecret:o,overrideBorderRadius:e===null||e===void 0?void 0:e.overrideBorderRadius,overridePrimaryColor:e===null||e===void 0?void 0:e.overridePrimaryColor,overrideSecondaryColor:e===null||e===void 0?void 0:e.overrideSecondaryColor,overrideTheme:e===null||e===void 0?void 0:e.overrideTheme,paypalEnabled:e===null||e===void 0?void 0:e.paypalEnabled});i=JSON.stringify(n)===JSON.stringify(stripeStore.stripeElementsOptions);if(!stripeStore.stripeElements||!stripeStore.stripeElementsForBillingAddress){stripeStore.stripeElementsForBillingAddress=(t=stripeStore.stripe)===null||t===void 0?void 0:t.elements(n);log("Stripe elements for billing address initialized");stripeStore.stripeElements=(r=stripeStore.stripe)===null||r===void 0?void 0:r.elements(n);stripeStore.stripeElementsOptions=n;log("Stripe elements initialized");return[2]}if(!i){stripeStore.stripeElements.update(n);stripeStore.stripeElementsForBillingAddress.update(n);stripeStore.stripeElementsOptions=n;void stripeStore.stripeElements.fetchUpdates()}log("Stripe elements updated");return[2]}))}))};var stripeStoreReset=function(){sessionStorage.removeItem("zonos--client-secret");reset$1();stripeStore.stripe=window.Zonos.stripe};var checkIsAddressOutdatedForValidation=function(){var e,t,r,o;var n=JSON.stringify((e=stripeStore.stripeAddressUsedWhenValidatingAddress)===null||e===void 0?void 0:e.value)!==JSON.stringify((t=stripeStore.stripeAddressEventData)===null||t===void 0?void 0:t.value);var i=!stripeStore.stripeShippingSameAsBilling&&JSON.stringify((r=stripeStore.stripeBillingAddressEventData)===null||r===void 0?void 0:r.value)!==JSON.stringify((o=stripeStore.stripeBillingAddressUsedWhenValidatingAddress)===null||o===void 0?void 0:o.value);return n||i};var checkIsAddressOutdatedForAsyncAddressUpdate=function(){var e,t,r,o,n,i;var a=JSON.stringify((e=stripeStore.stripeLinkUsedWhenFetchingLC)===null||e===void 0?void 0:e.value)!==JSON.stringify((t=stripeStore.stripeLinkEventData)===null||t===void 0?void 0:t.value);var s=JSON.stringify((r=stripeStore.stripeAddressUsedWhenAsyncAddressUpdate)===null||r===void 0?void 0:r.value)!==JSON.stringify((o=stripeStore.stripeAddressEventData)===null||o===void 0?void 0:o.value);var d=!stripeStore.stripeShippingSameAsBilling&&JSON.stringify((n=stripeStore.stripeBillingAddressUsedWhenAsyncAddressUpdate)===null||n===void 0?void 0:n.value)!==JSON.stringify((i=stripeStore.stripeBillingAddressEventData)===null||i===void 0?void 0:i.value);var c=stripeStore.taxIdUsedWhenAsyncAddressUpdate!==stripeStore.taxId;var l=stripeStore.companyNameUsedWhenAsyncAddressUpdate!==stripeStore.companyName;return a||s||d||c||l};var stripeStoreBuildAddressForPartyCreate=function(e){var t=e.address,r=e.firstName,o=e.lastName,n=e.name,i=e.phone;var a=extractName({firstName:r,lastName:o,name:n}),s=a.firstName,d=a.lastName;if(!s||!d){void sendErrorLog({endpoint:"PARTY_CREATE_NO_NAME_FOUND",errors:["No name found"],metadata:{allLogs:allLogs,cartId:window.Zonos.cartId,checkoutSessionId:storageStore.checkoutSessionId,firstName:r,lastName:o,name:n}})}if(!i){void sendErrorLog({endpoint:"PARTY_CREATE_NO_PHONE_FOUND",errors:["No phone found"],metadata:{allLogs:allLogs,cartId:window.Zonos.cartId,checkoutSessionId:storageStore.checkoutSessionId,phone:i}})}return{city:t.city,country:t.country,firstName:s,lastName:d,line1:t.line1,line2:t.line2,phone:i||"",postal_code:t.postal_code,state:t.state}};var stripeStoreAsyncAddressUpdate=function(){return __awaiter(void 0,void 0,void 0,(function(){var e,t,r,o,n,i,a,s,d,c,l,u;return __generator(this,(function(v){switch(v.label){case 0:if(!((e=stripeStore.stripeAddressEventData)===null||e===void 0?void 0:e.complete)||!stripeStore.stripeShippingSameAsBilling&&!((t=stripeStore.stripeBillingAddressEventData)===null||t===void 0?void 0:t.complete)||!stripeStore.stripeBillingAddressEventData){return[2,{partiesCreated:false}]}if(!cartStore.landedCostData){return[2,{partiesCreated:false}]}n=(r=cartStore.landedCostData.find(Boolean))===null||r===void 0?void 0:r.landedCost.rootId;if(!n){void sendErrorLog({endpoint:"PF_NO_SELECTED_LANDED_COST",errors:["No selected landed cost"],metadata:{allLogs:allLogs,cartId:window.Zonos.cartId,checkoutSessionId:storageStore.checkoutSessionId}});return[2,{partiesCreated:false}]}i=checkIsAddressOutdatedForAsyncAddressUpdate();if(!i){return[2,{partiesCreated:false}]}a=stripeStoreBuildAddressForPartyCreate({address:stripeStore.stripeAddressEventData.value.address,firstName:stripeStore.stripeAddressEventData.value.firstName,lastName:stripeStore.stripeAddressEventData.value.lastName,name:stripeStore.stripeAddressEventData.value.name,phone:stripeStore.stripeAddressEventData.value.phone});s=stripeStore.stripeShippingSameAsBilling?a:stripeStoreBuildAddressForPartyCreate({address:stripeStore.stripeBillingAddressEventData.value.address,firstName:stripeStore.stripeBillingAddressEventData.value.firstName,lastName:stripeStore.stripeBillingAddressEventData.value.lastName,name:stripeStore.stripeBillingAddressEventData.value.name,phone:stripeStore.stripeBillingAddressEventData.value.phone});d=new URLSearchParams(window.location.search).get("zonosE2ETest")==="1";return[4,handleFetch("/api/zonos-elements/create-parties",{body:{address:a,billingAddress:s,companyName:stripeStore.companyName,email:((o=stripeStore.stripeLinkEventData)===null||o===void 0?void 0:o.value.email)||"",isTest:d,rootId:n,taxId:stripeStore.taxId},method:"POST"})];case 1:c=v.sent(),l=c.errors,u=c.json;if(l.length||!u){logError("Error occurs when creating parties",JSON.stringify(l,null,2));void sendErrorLog({endpoint:"PF_PARTY_CREATE_FAILED",errors:["Failed to create parties"],metadata:{allLogs:allLogs,cartId:window.Zonos.cartId,checkoutSessionId:storageStore.checkoutSessionId,errors:l,json:u}});return[2,{partiesCreated:false}]}stripeStore.companyNameUsedWhenAsyncAddressUpdate=stripeStore.companyName;stripeStore.stripeAddressUsedWhenAsyncAddressUpdate=stripeStore.stripeAddressEventData;stripeStore.stripeBillingAddressUsedWhenAsyncAddressUpdate=stripeStore.stripeBillingAddressEventData;stripeStore.taxIdUsedWhenAsyncAddressUpdate=stripeStore.taxId;stripeStore.partyBillingId=u.billToPartyId;stripeStore.partyShippingId=u.shipToPartyId;return[2,{partiesCreated:true}]}}))}))};var buildAddressForLCPrefetch=function(e){return{countryCode:e.address.country,postalCode:e.address.postal_code,state:e.address.state}};var checkIsAddressOutdatedForLCPrefetch=function(){var e,t;var r=JSON.stringify((e=stripeStore.stripeLinkUsedWhenFetchingLC)===null||e===void 0?void 0:e.value)!==JSON.stringify((t=stripeStore.stripeLinkEventData)===null||t===void 0?void 0:t.value);var o=stripeStore.stripeAddressEventData&&JSON.stringify(buildAddressForLCPrefetch(stripeStore.stripeAddressEventData.value))!==JSON.stringify(stripeStore.stripeAddressUsedWhenFetchingLC);var n=!stripeStore.stripeShippingSameAsBilling&&stripeStore.stripeBillingAddressEventData&&JSON.stringify(buildAddressForLCPrefetch(stripeStore.stripeBillingAddressEventData.value))!==JSON.stringify(stripeStore.stripeBillingAddressUsedWhenFetchingLC);return r||o||n};var isPrefetchInfoOutdated=function(){var e;var t=cartStore.landedCostData&&((e=cartStore.landedCostData.find(Boolean))===null||e===void 0?void 0:e.subtotals.items)!==cartStore.subtotal;var r=checkIsAddressOutdatedForLCPrefetch();log("isPrefetchInfoOutdated","info",{isAddressOutdated:r});return!cartStore.landedCostData&&!stripeStore.isFetchingLandedCost||r||t};var getCountryField=function(e){var t,r;var o=(t=zonosStore.genericSettings)===null||t===void 0?void 0:t.countryFields;var n=(r=zonosStore.genericSettings)===null||r===void 0?void 0:r.stripeCountryFieldLabels;var i=n&&e in n?n[e]:null;var a=o&&e in o?o[e]:null;if(cartStore.addressFormRenderType==="stripe"){return i||a}return a};var isAddressReadyToRequestLandedCost=function(){var e,t,r,o;var n=!!((e=stripeStore.stripeLinkEventData)===null||e===void 0?void 0:e.complete);var i=!!((t=stripeStore.stripeAddressEventData)===null||t===void 0?void 0:t.complete);var a=stripeStore.stripeShippingSameAsBilling?i:!!((r=stripeStore.stripeBillingAddressEventData)===null||r===void 0?void 0:r.complete);var s=((o=stripeStore.stripeAddressEventData)===null||o===void 0?void 0:o.value.address.country)||"US";var d=getCountryField(s);if(i&&a&&n){return true}if(!d||!stripeStore.stripeAddressEventData){return i&&a&&n}var c=stripeStore.stripeAddressEventData.value.address.line1.length>0;var l=stripeStore.stripeAddressEventData.value.firstName&&stripeStore.stripeAddressEventData.value.lastName;var u=!d.stateRequired||d.stateRequired&&stripeStore.stripeAddressEventData.value.address.state.length>0;var v=!d.zipRequired||d.zipRequired&&stripeStore.stripeAddressEventData.value.address.postal_code.length>=3;var S=stripeStore.stripeAddressEventData.value.phone&&stripeStore.stripeAddressEventData.value.phone.length>0;return n&&l&&c&&u&&v&&S};var stripeCalculateLandedCost=function(){return __awaiter(void 0,void 0,void 0,(function(){var e,t,r,o,n,i,a,s,d,c,l;return __generator(this,(function(u){switch(u.label){case 0:t=new AbortController;stripeStore.fetchingLandedCostAbortController=t;cartStoreResetCartItems();return[4,calculateLandedCostNormalized(t)];case 1:r=u.sent(),o=r.checkoutSessionWorkflow,n=r.errors,i=r.itemCreateWorkflow,a=r.landedCostCalculateWorkflow,s=r.partyCreateWorkflow,d=r.shipmentRatingCalculateWorkflow;cartStore.customQuotingError=((e=n===null||n===void 0?void 0:n.find((function(e){var t;return((t=e.extensions)===null||t===void 0?void 0:t.ruleMessageType)==="CUSTOM"})))===null||e===void 0?void 0:e.message)||null;cartStore.shippingData=sortServiceLevelOptionsByAmount((d===null||d===void 0?void 0:d.filter(Boolean))||[]);cartStoreCheckItemRestrictions(i);stripeStore.fetchingLandedCostAbortController=null;cartStore.partiesData=(s===null||s===void 0?void 0:s.filter(Boolean))||[];cartStore.landedCostData=(o===null||o===void 0?void 0:o.map((function(e){var t=a===null||a===void 0?void 0:a.find((function(t){return(t===null||t===void 0?void 0:t.id)===e.landedCostId}));if(!t){return null}return Object.assign(Object.assign({},e),{landedCost:t})})).filter(Boolean))||[];c=storageStore.checkoutSessionId;if(o===null||o===void 0?void 0:o.length){void trackConversionEvent({checkoutSessionId:c,eventName:"checkout_quoteReceived"})}l=cartStore.promoCodeApplied&&!cartStore.landedCostData.find((function(e){var t;return(t=e.landedCost.appliedAdjustments)===null||t===void 0?void 0:t.find((function(e){return e.type==="PROMO_CODE"}))}));cartStore.promoCodeError=l;if(!l){sessionStorage.setItem("zonos--promo-code",cartStore.promoCode)}return[2]}}))}))};var stripeStorePrefetchLandedCost=function(e){return __awaiter(void 0,void 0,void 0,(function(){var t,r,o,n,i,a,s,d,c,l,u,v,S,p;return __generator(this,(function(f){switch(f.label){case 0:i=(e===null||e===void 0?void 0:e.retries)||0;a=!!(e===null||e===void 0?void 0:e.applyingPromocode);s=isPrefetchInfoOutdated();d=isAddressReadyToRequestLandedCost();if(!d){return[2,{isRequestNotReady:true}]}if(s){(t=stripeStore.fetchingLandedCostAbortController)===null||t===void 0?void 0:t.abort();stripeStore.fetchingLandedCostAbortController=null}if(!s&&!a){return[2,{isRequestNotReady:false}]}if(i){stripeStore.isFetchingLandedCost=false;setTimeout((function(){stripeStore.isFetchingLandedCost=true}),300)}else{stripeStore.isFetchingLandedCost=true}if(stripeStore.stripeAddressEventData){stripeStore.stripeAddressUsedWhenFetchingLC={countryCode:stripeStore.stripeAddressEventData.value.address.country,postalCode:stripeStore.stripeAddressEventData.value.address.postal_code,state:stripeStore.stripeAddressEventData.value.address.state}}if(stripeStore.stripeBillingAddressEventData){stripeStore.stripeBillingAddressUsedWhenFetchingLC={countryCode:stripeStore.stripeBillingAddressEventData.value.address.country,postalCode:stripeStore.stripeBillingAddressEventData.value.address.postal_code,state:stripeStore.stripeBillingAddressEventData.value.address.state}}if(stripeStore.stripeLinkEventData){stripeStore.stripeLinkUsedWhenFetchingLC=Object.assign({},stripeStore.stripeLinkEventData)}f.label=1;case 1:f.trys.push([1,3,,7]);cartStoreResetCartItems();return[4,stripeCalculateLandedCost()];case 2:f.sent();c=(r=cartStore.shippingData)===null||r===void 0?void 0:r.find(Boolean);l=(o=cartStore.landedCostData)===null||o===void 0?void 0:o.find((function(e){return e.landedCost.shipmentRating.id===(c===null||c===void 0?void 0:c.id)}));u=!!l?l.subtotals:null;if(u){cartStoreApplySubtotals({method:(l===null||l===void 0?void 0:l.landedCost.method)||"DDP",subtotals:u})}return[3,7];case 3:v=f.sent();cartStore.landedCostData=[];cartStore.shippingData=[];S=["The landed cost calculation request was aborted to initiate a new one."];if(!(v instanceof Error&&v.message&&!S.includes(v.message)))return[3,6];if(!(i<1))return[3,5];return[4,stripeStorePrefetchLandedCost(Object.assign(Object.assign({},e),{retries:(i||0)+1}))];case 4:f.sent();return[2,{isRequestNotReady:false}];case 5:p=(n=stripeStore.stripeAddressEventData)===null||n===void 0?void 0:n.value;void sendErrorLog({endpoint:"Failed to fetch landed cost (".concat(i," retries)"),errors:[v.message],metadata:{cartId:window.Zonos.cartId,shipToAddress:p}});f.label=6;case 6:logError(v);return[3,7];case 7:stripeStore.isFetchingLandedCost=false;return[2,{isRequestNotReady:false}]}}))}))};var stripeStoreApplyPromoCode=function(){return __awaiter(void 0,void 0,void 0,(function(){var e,t,r,o;return __generator(this,(function(n){switch(n.label){case 0:return[4,stripeStorePrefetchLandedCost({applyingPromocode:true})];case 1:n.sent();if(cartStore.step==="payment"){cartStorePreviousStep()}return[4,stripeStoreAsyncAddressUpdate()];case 2:n.sent();r=(e=cartStore.shippingData)===null||e===void 0?void 0:e.find(Boolean);o=(t=cartStore.landedCostData)===null||t===void 0?void 0:t.find((function(e){return e.landedCost.id===(r===null||r===void 0?void 0:r.id)}));if(!r||!o){return[2]}return[4,cartStoreUpdateSelectedShippingOption({applySubtotalsOnly:false,landedCostId:o.landedCostId,selectedShippingOption:r})];case 3:n.sent();return[2]}}))}))};var stripeStoreResetPromoCode=function(){cartStore.promoCode="";sessionStorage.removeItem("zonos--promo-code");cartStore.promoCodeError=false;cartStore.promoCodeApplied=false};var stripeStoreRemovePromoCode=function(){return __awaiter(void 0,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:if(cartStore.step==="payment"){cartStorePreviousStep()}stripeStoreResetPromoCode();return[4,stripeStoreApplyPromoCode()];case 1:e.sent();return[2]}}))}))};var stripeStoreMessageBasedOnStatus=function(e){var t=[];var r=true;var o=window.Zonos.isCollect;switch(e){case"succeeded":{t=[translate("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."),"",translate("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.")];if(o){t=[translate("Thank you for submitting your payment. We appreciate your prompt attention."),"",translate("A confirmation email with your payment details has been sent for your records. If you have any questions or need support, our team is here to help.")]}r=false;break}case"requires_capture":case"processing":{t=[translate("Payment processing. We'll update you when payment is received.")];r=false;break}case"requires_payment_method":{t=[translate("Payment failed. Please try another payment method.")];if(o){t=[translate("Payment failed. Please reload the page and try another payment method.")]}break}case"requires_action":{r=false;t=[translate("Your selected payment method requires additional verification. Please follow the instructions provided by your payment provider to complete the transaction.")]}default:{t=[translate("Something went wrong.")];break}}return{isError:r,messages:t}};var stripeStoreHandleInventoryCheck=function(){return __awaiter(void 0,void 0,void 0,(function(){var e,t,r,o,n,i,a,s,d,s;return __generator(this,(function(c){switch(c.label){case 0:r=zonosStore.checkoutSettings.onInventoryCheck;o=!!((t=(e=window.Zonos.cartData)===null||e===void 0?void 0:e.metadata.find((function(e){return e.key==="referenceId"})))===null||t===void 0?void 0:t.value);if(!(window.Zonos.isLegacyCheckout&&window.Zonos.cartData&&o))return[3,2];return[4,handleFetch("/api/zonos-elements/legacy/inventory-check",{body:{cartData:window.Zonos.cartData},method:"POST"})];case 1:n=c.sent(),i=n.errors,a=n.json;if(i.length||!a){logError("Error occurs when handling inventory refund","warn",JSON.stringify(i));return[2,null]}if(!a.available||a.status===204){return[2,translate("The item you're looking for is currently unavailable in our inventory. Please check back later or contact support for assistance with availability.")]}if(a.available||a.status===200){stripeStore.shouldInventoryRefund=true;return[2,null]}return[2,null];case 2:if(typeof r!=="function"){return[2,null]}c.label=3;case 3:c.trys.push([3,5,,6]);return[4,r({items:cartStore.items})];case 4:s=c.sent();return[2,s];case 5:d=c.sent();s=d instanceof Error?d.message:"Unknown error";void sendErrorLog({endpoint:"onInventoryCheck",errors:["cartId: ".concat(window.Zonos.cartId," - ").concat(s)],metadata:{cartId:window.Zonos.cartId,href:window.location.href,items:cartStore.items}});throw d;case 6:return[2]}}))}))};var stripeStoreHandleInventoryRefund=function(){return __awaiter(void 0,void 0,void 0,(function(){var e,t,r;return __generator(this,(function(o){switch(o.label){case 0:r=!!((t=(e=window.Zonos.cartData)===null||e===void 0?void 0:e.metadata.find((function(e){return e.key==="referenceId"})))===null||t===void 0?void 0:t.value);if(!window.Zonos.isLegacyCheckout||!window.Zonos.cartData||!r){return[2]}return[4,handleFetch("/api/zonos-elements/legacy/inventory-refund",{body:{cartData:window.Zonos.cartData},method:"POST"})];case 1:o.sent();return[2]}}))}))};var stripeStoreRetrievePayment=function(e){return __awaiter(void 0,[e],void 0,(function(e){var t,r,o,n,i,a,s,d,c;var l=e.clientSecret,u=e.storybookForceStatus;return __generator(this,(function(e){switch(e.label){case 0:if(u){t=stripeStoreMessageBasedOnStatus(u),r=t.isError,o=t.messages;return[2,{error:r,messages:o}]}n=l||stripeStore.clientSecret;if(!stripeStore.stripe||!n){logError("Failed to retrieve payment intent. Stripe is not initialized");return[2,{error:true,message:[translate("Something went wrong.")]}]}return[4,stripeStore.stripe.retrievePaymentIntent(n)];case 1:i=e.sent().paymentIntent;a=i===null||i===void 0?void 0:i.status;s=stripeStoreMessageBasedOnStatus(a),d=s.isError,c=s.messages;return[2,{error:d,messages:c,paymentIntentId:i===null||i===void 0?void 0:i.id,paymentMethod:i===null||i===void 0?void 0:i.payment_method,status:a}]}}))}))};var stripeStoreConfirmPayment=function(e){return __awaiter(void 0,void 0,void 0,(function(){var t,r,o,n,i,a,s,d,c,l,u,v;return __generator(this,(function(S){switch(S.label){case 0:o=!!((t=stripeStore.stripePaymentEventData)===null||t===void 0?void 0:t.complete);n=stripeStore.stripeElements;i=stripeStore.stripe;a=stripeStore.clientSecret;stripeStore.customErrorMessage=null;if(!((r=cartStore.selectedLandedCost)===null||r===void 0?void 0:r.landedCost.id)&&!(e===null||e===void 0?void 0:e.noLandedCostCheck)){throw new Error("Attempted to confirm the payment when no landed cost is found in store")}return[4,validateCheckoutSession()];case 1:s=S.sent();if(!s.valid){stripeStore.customErrorMessage=s.errorMessage;throw new Error(s.errorMessage)}d=storageStore.checkoutSessionId;if(!(i&&n&&o&&a&&d))return[3,3];c=new URL(window.location.href);c.searchParams.set("payment_intent_client_secret",a);c.searchParams.set("zonosCheckoutSessionId",d);void trackConversionEvent({checkoutSessionId:d,eventName:"checkout_paymentInfoCompleted"});return[4,i.confirmPayment({confirmParams:{return_url:c.toString()},elements:n,redirect:"if_required"})];case 2:l=S.sent(),u=l.error,v=l.paymentIntent;log("Payment intent confirmed","info",{error:u,paymentIntent:v});if((v===null||v===void 0?void 0:v.status)==="requires_action"){throw new Error(translate("Your selected payment method requires additional verification. Please follow the instructions provided by your payment provider to complete the transaction."))}if(u){if(u.type==="card_error"||u.type==="validation_error"){throw new Error(u.message)}if(u.type==="invalid_request_error"){if(u.code==="payment_intent_unexpected_state"){return[2]}}throw new Error("An unexpected error occurred.")}if(v.status==="requires_payment_method"){throw new Error(translate("Payment failed. Please try another payment method."))}S.label=3;case 3:return[2]}}))}))};var getCheckoutSessionBody=function(){var e;var t=cartStore.items.reduce((function(e,t){return e+t.amount*t.quantity}),0);var r=storageStore.enabledVariantTestKeys||[];var o={adjustmentsAmount:cartStore.adjustments.reduce((function(e,t){return e+t.amount}),0),cartId:window.Zonos.cartId,currency:((e=cartStore.items.find(Boolean))===null||e===void 0?void 0:e.currencyCode)||"",customerAuthenticationToken:cartStore.customerAuthenticationToken||undefined,isCollect:window.Zonos.isCollect,itemsAmount:t,metadata:[{key:"language",value:localizationStore.selectedLocale}],presentmentCountryCode:localizationStore.selectedCountryCode,skipPaymentIntent:stripeStore.skipPaymentIntent,varianceTestInput:r};return o};var stripeStoreGetPaymentIntent=function(){return __awaiter(void 0,void 0,void 0,(function(){var e,t,r,o,n;return __generator(this,(function(i){switch(i.label){case 0:if(!storageStore.checkoutSessionId){void sendErrorLog({endpoint:"Error creating payment intent",errors:["No checkout session id found when retrieving payment intent"],metadata:{allLogs:allLogs,cartId:window.Zonos.cartId}});cartStoreUpdateToErrorState({messages:[translate("There's been an error creating your checkout session. Please reload and try again or contact support if the error persists")],title:translate("Error creating Checkout")});return[2]}return[4,handleFetch("/api/zonos-elements/create-payment-intent",{body:{checkoutSessionId:storageStore.checkoutSessionId},method:"POST"})];case 1:t=i.sent(),r=t.errors,o=t.json;n=(e=o===null||o===void 0?void 0:o.checkoutSessionPaymentIntentCreate)===null||e===void 0?void 0:e.clientSecret;if(r.length||!n){logError("Error occurs when getting payment intent",JSON.stringify(r,null,2));void sendErrorLog({endpoint:"Error creating payment intent",errors:r.map((function(e){return e.message})),metadata:{allLogs:allLogs,cartId:window.Zonos.cartId,checkoutSessionId:storageStore.checkoutSessionId,clientSecret:n}});cartStoreUpdateToErrorState({messages:[translate("There's been an error creating your checkout session. Please reload and try again or contact support if the error persists")],title:translate("Error creating Checkout")});return[2]}cartStoreSetCheckoutSession(o.checkoutSessionPaymentIntentCreate);return[2]}}))}))};var stripeStoreInitCheckoutSession=function(){return __awaiter(void 0,void 0,void 0,(function(){var e,t,r,o,n,i,a,s;return __generator(this,(function(d){switch(d.label){case 0:if(!localizationStore.targetCurrency){logError("Failed to create checkout session - missing localizationStore.targetCurrency");return[2,false]}stripeStore.isFetchingSession=true;r=getCheckoutSessionBody();log("Checkout session body","info",r);return[4,handleFetch("/api/zonos-elements/create-checkout-session",{body:r,method:"POST"})];case 1:o=d.sent(),n=o.errors,i=o.json;stripeStore.isFetchingSession=false;if(n.length||!i){a=(e=n.find((function(e){return e.message})))===null||e===void 0?void 0:e.message;if(Array.isArray(a)&&a.some((function(e){return e.message==="Cart is expired."}))){throw new Error("Cart is expired.")}logError("Error occurred when creating checkout session",JSON.stringify(n,null,2));return[2,false]}s=i.checkoutSessionCreate;cartStoreSetCheckoutSession(s);cartStoreApplySubtotals({method:((t=s.landedCost)===null||t===void 0?void 0:t.method)||"DDP",subtotals:s.subtotals});log("Exchange rate updated for cart items (checkout session create)","info",cartStore.exchangeRate);log("done-init-checkout-session");return[2,true]}}))}))};var stripeStoreUpdateCheckoutSessionBaseCurrency=function(){return __awaiter(void 0,void 0,void 0,(function(){var e,t,r;return __generator(this,(function(o){switch(o.label){case 0:e=storageStore.checkoutSessionId;if(!e){logError("Failed to update checkout session base currency");return[2,false]}if(zonosStore.checkoutSettings.allowedSettlementCurrencies==="LOCAL"){log('allowedSettlementCurrencies: "LOCAL". Skip updating checkout session base currency');return[2,true]}return[4,handleFetch("/api/zonos-elements/update-checkout-session-base-currency",{body:{checkoutSessionId:e,currencyCode:stripeStore.checkoutSettlementCurrency},method:"POST"})];case 1:t=o.sent().json;r=t===null||t===void 0?void 0:t.checkoutSessionBaseCurrencyUpdate.subtotals.presentmentCurrencyCode;if(!t||r!==stripeStore.checkoutSettlementCurrency){logError("Failed to update checkout session base currency");return[2,false]}log('Updated checkout session to settlement currency "'.concat(r,'".'));return[2,true]}}))}))};var stripeStoreUpdateCheckoutSession=function(e){return __awaiter(void 0,[e],void 0,(function(e){var t,r,o,n;var i=e.adjustmentsAmount,a=e.cartId,s=e.currency,d=e.id,c=e.itemsAmount,l=e.landedCostId,u=e.presentmentCountryCode;return __generator(this,(function(e){switch(e.label){case 0:t=storageStore.enabledVariantTestKeys||[];return[4,handleFetch("/api/zonos-elements/update-checkout-session",{body:{adjustmentsAmount:i,billToPartyId:stripeStore.partyBillingId,cartId:a,currency:s,customerAuthenticationToken:cartStore.customerAuthenticationToken||undefined,id:d,itemsAmount:c,landedCostId:l,metadata:[{key:"language",value:localizationStore.selectedLocale}],presentmentCountryCode:u,shipToPartyId:stripeStore.partyShippingId,skipPaymentIntent:stripeStore.skipPaymentIntent,varianceTestInput:t},method:"POST"})];case 1:r=e.sent(),o=r.errors,n=r.json;if(o.length||!n){logError("Error occurs when updating checkout session",JSON.stringify(o,null,2));return[2,{errors:o,json:n}]}return[2,{errors:[],json:n}]}}))}))};var buildTranslatedAddress=function(e){var t,r,o,n,i,a;var s=e.currentAddress,d=e.translatedAddressResult;var c={};if(!d){return c}var l=d.city,u=d.line1,v=d.line2,S=d.name,p=d.postal_code,f=d.state;if(s.city&&l){c.city=(t={},t[s.city]=l,t)}if(s.line1&&u){c.line1=(r={},r[s.line1]=u,r)}if(s.line2&&v){c.line2=(o={},o[s.line2]=v,o)}if(s.postal_code&&p){c.postal_code=(n={},n[s.postal_code]=p,n)}if(s.state&&f){c.state=(i={},i[s.state]=f,i)}if(s.name&&S){c.name=(a={},a[s.name]=S,a)}return c};var stripeStoreTranslateAddressToLatin=function(e){return __awaiter(void 0,[e],void 0,(function(e){var t,r,o,n,i,a,s,d,c,l,u;var v=e.addressInvalidCharactersList,S=e.billingAddressInvalidCharactersList;return __generator(this,(function(e){switch(e.label){case 0:i=buildTranslateRequest({addressInvalidCharactersList:v,billingAddressInvalidCharactersList:S,stripeAddressEventData:stripeStore.stripeAddressEventData,stripeBillingAddressEventData:stripeStore.stripeBillingAddressEventData,stripeShippingSameAsBilling:stripeStore.stripeShippingSameAsBilling});if(!i){stripeStore.translatedAddress={address:{},billingAddress:{}};return[2]}a=checkIsAddressOutdatedForValidation();if(!a){return[2]}return[4,handleFetch("/api/zonos-elements/validate-address",{body:i,method:"POST"})];case 1:s=e.sent(),d=s.errors,c=s.json;if(d.length||!c){logError("Error occurs when translating address to latin",JSON.stringify(d,null,2));stripeStore.translatedAddress={address:{},billingAddress:{}};return[2]}stripeStore.stripeAddressUsedWhenValidatingAddress=stripeStore.stripeAddressEventData;stripeStore.stripeBillingAddressUsedWhenValidatingAddress=stripeStore.stripeBillingAddressEventData;l=(t=stripeStore.stripeAddressEventData)===null||t===void 0?void 0:t.value.address;u=(r=stripeStore.stripeBillingAddressEventData)===null||r===void 0?void 0:r.value.address;stripeStore.translatedAddress={address:l?buildTranslatedAddress({currentAddress:Object.assign(Object.assign({},l),{name:(o=stripeStore.stripeAddressEventData)===null||o===void 0?void 0:o.value.name}),translatedAddressResult:c.address||null}):{},billingAddress:!stripeStore.stripeShippingSameAsBilling?buildTranslatedAddress({currentAddress:Object.assign(Object.assign({},u),{name:(n=stripeStore.stripeBillingAddressEventData)===null||n===void 0?void 0:n.value.name}),translatedAddressResult:c.billingAddress||null}):{}};return[2]}}))}))};stripeStoreOnChange("clientSecret",(function(e){if(e&&stripeStore.stripe){sessionStorage.setItem("zonos--client-secret",e)}if(!e){sessionStorage.removeItem("zonos--client-secret")}}));var _o=createStore((function(){return{addressFormRenderType:"stripe",adjustmentTotal:0,adjustments:[],checkoutSession:null,checkoutSessionTimeoutShow:false,checkoutTimeoutInterval:null,currency:"USD",customQuotingError:null,customerAuthenticationToken:null,displayBaseCurrency:false,dutiesTaxesFees:null,dutiesTaxesFeesEstimate:null,error:null,exchangeRate:null,externalConfirmationPageURL:null,inventoryCheckErrorMessage:null,isSelectedShippingAboveDeminimis:false,isSelectedShippingGuarantee:false,isStagingMode:getIsStagingMode(),items:[],landedCostData:null,landedCostMethod:"DDP",partiesData:[],promoCode:sessionStorage.getItem("zonos--promo-code")||"",promoCodeApplied:!!sessionStorage.getItem("zonos--promo-code"),promoCodeError:false,restrictedItems:[],selectedLandedCost:null,selectedShippingOption:null,selectedShippingOptionExpectedDate:"",selectedShippingOptionTransitTime:"",shipping:0,shippingData:null,shouldHideDiscountInput:false,step:"customer-info",subtotal:0,tabItems:{"customer-info":{index:1,isDone:false,label:"Customer",value:"customer-info"},shipping:{index:2,isDone:false,label:"Shipping",value:"shipping"},payment:{index:3,isDone:false,label:"Payment",value:"payment"}},total:0}})),cartStoreOnChange=_o.onChange,reset=_o.reset,cartStore=_o.state;var getTransitUnit=function(e){switch(e){case"DAYS":return translate("days");case"WEEKS":return translate("weeks");case"BUSINESS_DAYS":default:return translate("business days")}};var cartStoreGetShippingTransitInfo=function(e){var t;var r=(t=e.shippingProfile)===null||t===void 0?void 0:t.transitTime;if(!(r===null||r===void 0?void 0:r.min)||!(r===null||r===void 0?void 0:r.max)||!(r===null||r===void 0?void 0:r.type)){return null}return{maxTransit:r.max,minTransit:r.min,unit:getTransitUnit(r.type)}};var getMatchItem=function(e){var t=e.item1,r=e.item2;if(!t||!r){return false}return r.sku&&t.sku&&t.sku===r.sku||r.description&&t.description&&t.description===r.description||t.name&&r.name&&t.name===r.name};var cartStoreCheckItemRestrictions=function(e){log("Checking item restrictions");var t=e.map((function(e){if(!e.restriction){return null}var t=e.restriction;var r=cartStore.items.find((function(t){return getMatchItem({item1:t,item2:e})}));return Object.assign(Object.assign({matchedItem:r},e),{restriction:t})})).filter(Boolean);cartStore.restrictedItems=t;cartStore.items=cartStore.items.map((function(e){return Object.assign(Object.assign({},e),{isRestricted:!!t.find((function(t){return getMatchItem({item1:t,item2:e})}))})}));return{cartItems:cartStore.items,restrictedItems:t}};var cartStoreReset=function(){storageStore.checkoutSessionId=null;reset()};var cartStoreUpdateToErrorState=function(e){var t=e.messages,r=e.title;cartStoreReset();stripeStoreReset();cartStore.step="error";cartStore.error={messages:t,title:r}};var cartStoreApplySubtotals=function(e){var t=e.dutiesTaxesFeesEstimate,r=e.method,o=e.subtotals;cartStore.exchangeRate=o.exchangeRate;cartStore.adjustmentTotal=o.adjustments;cartStore.dutiesTaxesFees=r==="DAP"?null:o.landedCostTotal;cartStore.subtotal=o.items;cartStore.total=o.total;cartStore.currency=o.presentmentCurrencyCode;cartStore.dutiesTaxesFeesEstimate=t||null};var cartStoreHasOneEligibleItem=function(){var e=cartStore.items.filter((function(e){return e.amount>0}));return!!e.find((function(e){return!e.isRestricted}))};var cartStoreSetCheckoutSession=function(e){var t,r,o,n,i;stripeStore.clientSecret=e.clientSecret;stripeStore.stripeCustomerSessionClientSecret=e.customerSessionClientSecret;stripeStore.customerProfile=e.customerProfile;cartStore.checkoutSession=e;if(!e.id){void sendErrorLog({endpoint:"cartStoreSetCheckoutSession",errors:["Missing checkout session id in checkout session"],metadata:{allLogs:allLogs,checkoutSession:e}})}if(e.id){storageStore.checkoutSessionId=e.id}var a=filterValidTests(e.varianceTestResults||[]);storageStoreSetEnabledVariantTestKeys(a);var s=((o=(r=(t=cartStore.checkoutSession)===null||t===void 0?void 0:t.metadata)===null||r===void 0?void 0:r.find((function(e){return(e===null||e===void 0?void 0:e.key)==="externalConfirmationPageURL"})))===null||o===void 0?void 0:o.value)||((i=(n=window.Zonos.cartData)===null||n===void 0?void 0:n.metadata.find((function(e){return(e===null||e===void 0?void 0:e.key)==="externalConfirmationPageURL"})))===null||i===void 0?void 0:i.value)||null;if(s){log("Found externalConfirmationPageURL: ".concat(s));cartStore.externalConfirmationPageURL=s}};var cartStoreReCalculateTotal=function(e){return __awaiter(void 0,[e],void 0,(function(e){var t,r,o,n,i,a;var s=e.adjustmentsAmount,d=e.cartId,c=e.currency,l=e.dutiesTaxesFeesEstimate,u=e.itemsAmount,v=e.landedCostId,S=e.shouldInitSessionOnFailure;return __generator(this,(function(e){switch(e.label){case 0:if(v&&cartStore.selectedLandedCost){r=cartStore.selectedLandedCost.subtotals;cartStoreApplySubtotals({dutiesTaxesFeesEstimate:l,method:cartStore.landedCostMethod,subtotals:r});log("Exchange rate updated for cart items (landed cost subtotal)","info",cartStore.exchangeRate)}if(!storageStore.checkoutSessionId){log("Could not update cart total without checkout session id","info");return[2,false]}return[4,stripeStoreUpdateCheckoutSession({adjustmentsAmount:s,billToPartyId:stripeStore.partyBillingId,cartId:d,currency:c,id:storageStore.checkoutSessionId,itemsAmount:u,landedCostId:v,presentmentCountryCode:localizationStore.selectedCountryCode,shipToPartyId:stripeStore.partyShippingId,varianceTestInput:storageStore.enabledVariantTestKeys||[]})];case 1:o=e.sent(),n=o.errors,i=o.json;if(!(n.length>0||!i))return[3,4];logError("Error occurs when updating checkout session.");if(!S)return[3,3];log("Initiating checkout session on failure","info");return[4,stripeStoreInitCheckoutSession()];case 2:a=e.sent();log("stripeStoreInitCheckoutSession: ".concat(a));if(!a){cartStoreUpdateToErrorState({messages:[translate("There's been an error creating your checkout session. Please reload and try again or contact support if the error persists")],title:translate("Error creating Checkout")});return[2,false]}return[2,true];case 3:return[2,false];case 4:if(!v){cartStoreApplySubtotals({method:((t=i.checkoutSessionUpdate.landedCost)===null||t===void 0?void 0:t.method)||"DDP",subtotals:i.checkoutSessionUpdate.subtotals});log("Exchange rate updated for cart items (checkout session update)","info",cartStore.exchangeRate)}cartStoreSetCheckoutSession(i.checkoutSessionUpdate);return[2,true]}}))}))};var cartStoreGetMethod=function(e){var t,r,o;if(e.method==="DAP"&&((r=(t=zonosStore.genericSettings)===null||t===void 0?void 0:t.domesticCountries)===null||r===void 0?void 0:r.includes(((o=stripeStore.stripeAddressEventData)===null||o===void 0?void 0:o.value.address.country)||"US"))){return"DDP"}if(e.method==="DAP"&&e.remittance.length&&e.landedCostGuaranteeCode==="ZONOS"){return"DDP"}return e.method};var cartStoreUpdateSelectedShippingOption=function(e){return __awaiter(void 0,[e],void 0,(function(e){var t,r,o,n,i,a,s,d,c,l,u,v,S,p,f,h,m,g,y,w,C,b,A,O,_;var k=e.applySubtotalsOnly,I=e.landedCostId,E=e.selectedShippingOption;return __generator(this,(function(e){switch(e.label){case 0:log("Updating selected shipping option","info",{landedCostId:I,selectedShippingOption:E});cartStore.selectedShippingOption=E;v=cartStoreGetShippingTransitInfo(cartStore.selectedShippingOption);if(v){S=v.maxTransit,p=v.minTransit,f=v.unit;cartStore.selectedShippingOptionTransitTime="".concat(p,"-").concat(S," ").concat(f)}else{cartStore.selectedShippingOptionTransitTime=""}h=(t=cartStore.landedCostData)===null||t===void 0?void 0:t.find((function(e){return e.landedCostId===I}));cartStore.selectedLandedCost=h||null;if(!h){return[2,false]}m=((r=h.landedCost.amountSubtotals)===null||r===void 0?void 0:r.landedCostTotal)||0;g=h.subtotals.exchangeRate.rate;y=m*g;if(y){log("DAP quote, using estimate: ".concat(y),"info")}cartStore.landedCostMethod=cartStoreGetMethod(h.landedCost);cartStore.shipping=h.subtotals.shipping;w=((o=h===null||h===void 0?void 0:h.landedCost)===null||o===void 0?void 0:o.landedCostGuaranteeCode)==="ZONOS";C=!!((i=(n=h===null||h===void 0?void 0:h.landedCost)===null||n===void 0?void 0:n.deMinimis)===null||i===void 0?void 0:i.find((function(e){return["DUTY","TAX"].includes(e.type)&&e.threshold==="ABOVE"})));cartStore.isSelectedShippingAboveDeminimis=C;cartStore.isSelectedShippingGuarantee=w;b=false;if(!k)return[3,1];A=h.subtotals;cartStoreApplySubtotals({dutiesTaxesFeesEstimate:y,method:cartStore.landedCostMethod,subtotals:A});log("Exchange rate updated for cart items (landed cost subtotal)","info",cartStore.exchangeRate);b=true;return[3,3];case 1:return[4,cartStoreReCalculateTotal({adjustmentsAmount:cartStore.adjustmentTotal,billToPartyId:stripeStore.partyBillingId,cartId:window.Zonos.cartId,dutiesTaxesFeesEstimate:y,landedCostId:(a=h.landedCost)===null||a===void 0?void 0:a.id,shipToPartyId:stripeStore.partyShippingId,varianceTestInput:storageStore.enabledVariantTestKeys||[]})];case 2:b=e.sent();e.label=3;case 3:O=(s=cartStore.items.find(Boolean))===null||s===void 0?void 0:s.currencyCode;_=((d=stripeStore.stripeAddressEventData)===null||d===void 0?void 0:d.value.address.country)||"US";stripeStore.shouldRenderPayInUsdButton=O==="USD"&&zonosStore.checkoutSettings.allowedSettlementCurrencies==="LOCAL_AND_USD"&&((c=cartStore.checkoutSession)===null||c===void 0?void 0:c.subtotals.presentmentCurrencyCode)!=="USD"&&!!((u=(l=zonosStore.genericSettings)===null||l===void 0?void 0:l.usdSettlementCountryEnabled)===null||u===void 0?void 0:u.includes(_));return[2,b]}}))}))};var cartStoreStartCheckoutInterval=function(e){var t=e.isPreview,r=e.sessionTimeout;if(t){return}var o=new URLSearchParams(window.location.search).get("zonosCheckoutTimeout");var n=o&&!isNaN(parseInt(o,10))?parseInt(o,10):r;log("==START CHECKOUT TIMEOUT - ".concat(n,"=="));cartStore.checkoutTimeoutInterval=setTimeout((function(){cartStore.checkoutSessionTimeoutShow=true}),n)};var cartStoreClearCheckoutInterval=function(){if(cartStore.checkoutTimeoutInterval){clearTimeout(cartStore.checkoutTimeoutInterval);cartStore.checkoutTimeoutInterval=null}};var getCartItemToUse=function(e){return e.map((function(e){return Object.assign(Object.assign({},e),{isRestricted:false})}))};var cartStoreResetCartItems=function(){cartStore.items=cartStore.items.map((function(e){return Object.assign(Object.assign({},e),{isRestricted:false})}));cartStore.restrictedItems=[]};var cartStoreUpdateItems=function(e){return __awaiter(void 0,[e],void 0,(function(e){var t,r,o,n;var i=e.adjustments,a=e.cartItems,s=e.landedCostId,d=e.shouldInitSessionOnFailure,c=d===void 0?true:d;return __generator(this,(function(e){switch(e.label){case 0:cartStore.adjustments=i;cartStore.items=getCartItemToUse(a);r=(t=a.find(Boolean))===null||t===void 0?void 0:t.currencyCode;o=a.reduce((function(e,t){return e+t.amount*t.quantity}),0);n=i.reduce((function(e,t){return e+t.amount}),0);if(!r||!o){return[2]}cartStore.currency=r;stripeStore.isFetchingSession=true;return[4,cartStoreReCalculateTotal({adjustmentsAmount:n,billToPartyId:stripeStore.partyBillingId,cartId:window.Zonos.cartId,currency:r,dutiesTaxesFeesEstimate:0,itemsAmount:o,landedCostId:s,shipToPartyId:stripeStore.partyShippingId,shouldInitSessionOnFailure:c,varianceTestInput:storageStore.enabledVariantTestKeys||[]})];case 1:e.sent();stripeStore.isFetchingSession=false;return[2]}}))}))};var cartStoreResetSelectedShippingOption=function(){cartStore.selectedShippingOption=null;cartStore.isSelectedShippingAboveDeminimis=false;cartStore.isSelectedShippingGuarantee=false;cartStore.selectedShippingOptionTransitTime="";cartStore.dutiesTaxesFees=0;cartStore.dutiesTaxesFeesEstimate=0;cartStore.shipping=0;cartStore.total=cartStore.subtotal};var cartStorePreviousStep=function(){if(cartStore.step==="shipping"){cartStore.step="customer-info";cartStore.tabItems=Object.assign(Object.assign({},cartStore.tabItems),{"customer-info":Object.assign(Object.assign({},cartStore.tabItems.shipping),{isDone:false})})}else if(cartStore.step==="payment"){cartStore.step="shipping";cartStore.tabItems=Object.assign(Object.assign({},cartStore.tabItems),{shipping:Object.assign(Object.assign({},cartStore.tabItems.shipping),{isDone:false})})}else if(cartStore.step==="finish"){cartStore.step="payment";cartStore.tabItems=Object.assign(Object.assign({},cartStore.tabItems),{payment:Object.assign(Object.assign({},cartStore.tabItems.payment),{isDone:false})})}};var cartStoreNextStep=function(){if(cartStore.step==="customer-info"){cartStore.step="shipping";cartStore.tabItems=Object.assign(Object.assign({},cartStore.tabItems),{"customer-info":Object.assign(Object.assign({},cartStore.tabItems["customer-info"]),{isDone:true})})}else if(cartStore.step==="shipping"){cartStore.step="payment";cartStore.tabItems=Object.assign(Object.assign({},cartStore.tabItems),{shipping:Object.assign(Object.assign({},cartStore.tabItems.shipping),{isDone:true})})}else if(cartStore.step==="payment"){cartStore.step="finish"}};var cartStoreResetTabItems=function(){cartStore.step="customer-info";cartStore.tabItems=Object.assign(Object.assign({},cartStore.tabItems),{"customer-info":Object.assign(Object.assign({},cartStore.tabItems["customer-info"]),{isDone:false}),payment:Object.assign(Object.assign({},cartStore.tabItems.payment),{isDone:false}),shipping:Object.assign(Object.assign({},cartStore.tabItems.shipping),{isDone:false})});cartStoreResetSelectedShippingOption()};export{validateCheckoutSession as A,stripeStoreOnChange as B,stripeStoreBuildAddressForPartyCreate as C,cartStoreUpdateSelectedShippingOption as D,cartStoreHasOneEligibleItem as E,stripeStoreApplyPromoCode as F,stripeStoreRemovePromoCode as G,stripeStoreResetPromoCode as H,stripeStoreMessageBasedOnStatus as I,stripeStoreTranslateAddressToLatin as J,extractName as K,stripeStoreAsyncAddressUpdate as L,cartStoreGetShippingTransitInfo as M,cartStoreGetMethod as N,sortServiceLevelOptionsByAmount as O,stripeStoreCleanupDomesticShippingSession as a,stripeStoreSaveDomesticShippingSession as b,stripeStore as c,stripeStoreRetrievePayment as d,cartStore as e,cartStoreUpdateItems as f,cartStoreReset as g,cartStoreResetTabItems as h,initStripeElements as i,cartStoreClearCheckoutInterval as j,stripeStoreInitCheckoutSession as k,stripeStoreGetPaymentIntent as l,cartStoreStartCheckoutInterval as m,getCheckoutSessionBody as n,cartStoreUpdateToErrorState as o,cartStoreSetCheckoutSession as p,stripeStorePrefetchLandedCost as q,cartStoreNextStep as r,stripeStoreGetDomesticShippingSession as s,trackConversionEvent as t,stripeStoreUpdateCheckoutSessionBaseCurrency as u,stripeStoreHandleInventoryCheck as v,stripeStoreConfirmPayment as w,stripeStoreHandleInventoryRefund as x,stripeStoreReset as y,cartStoreOnChange as z};
@@ -1,2 +0,0 @@
1
- var __extends=this&&this.__extends||function(){var e=function(r,t){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var t in r)if(Object.prototype.hasOwnProperty.call(r,t))e[t]=r[t]};return e(r,t)};return function(r,t){if(typeof t!=="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");e(r,t);function n(){this.constructor=r}r.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}();var __assign=this&&this.__assign||function(){__assign=Object.assign||function(e){for(var r,t=1,n=arguments.length;t<n;t++){r=arguments[t];for(var i in r)if(Object.prototype.hasOwnProperty.call(r,i))e[i]=r[i]}return e};return __assign.apply(this,arguments)};var __awaiter=this&&this.__awaiter||function(e,r,t,n){function i(e){return e instanceof t?e:new t((function(r){r(e)}))}return new(t||(t=Promise))((function(t,a){function o(e){try{u(n.next(e))}catch(e){a(e)}}function s(e){try{u(n["throw"](e))}catch(e){a(e)}}function u(e){e.done?t(e.value):i(e.value).then(o,s)}u((n=n.apply(e,r||[])).next())}))};var __generator=this&&this.__generator||function(e,r){var t={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},n,i,a,o;return o={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(o[Symbol.iterator]=function(){return this}),o;function s(e){return function(r){return u([e,r])}}function u(s){if(n)throw new TypeError("Generator is already executing.");while(o&&(o=0,s[0]&&(t=0)),t)try{if(n=1,i&&(a=s[0]&2?i["return"]:s[0]?i["throw"]||((a=i["return"])&&a.call(i),0):i.next)&&!(a=a.call(i,s[1])).done)return a;if(i=0,a)s=[s[0]&2,a.value];switch(s[0]){case 0:case 1:a=s;break;case 4:t.label++;return{value:s[1],done:false};case 5:t.label++;i=s[1];s=[0];continue;case 7:s=t.ops.pop();t.trys.pop();continue;default:if(!(a=t.trys,a=a.length>0&&a[a.length-1])&&(s[0]===6||s[0]===2)){t=0;continue}if(s[0]===3&&(!a||s[1]>a[0]&&s[1]<a[3])){t.label=s[1];break}if(s[0]===6&&t.label<a[1]){t.label=a[1];a=s;break}if(a&&t.label<a[2]){t.label=a[2];t.ops.push(s);break}if(a[2])t.ops.pop();t.trys.pop();continue}s=r.call(e,t)}catch(e){s=[6,e];i=0}finally{n=a=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(e,r,t){if(t||arguments.length===2)for(var n=0,i=r.length,a;n<i;n++){if(a||!(n in r)){if(!a)a=Array.prototype.slice.call(r,0,n);a[n]=r[n]}}return e.concat(a||Array.prototype.slice.call(r))};var NAMESPACE="zonos-elements";var BUILD={allRenderFn:true,appendChildSlotFix:false,asyncLoading:true,asyncQueue:false,attachStyles:true,cloneNodeFix:false,constructableCSS:true,cssAnnotations:true,devTools:false,element:false,event:true,experimentalScopedSlotChanges:false,experimentalSlotFixes:false,formAssociated:false,hasRenderFn:true,hostListener:true,hostListenerTarget:true,hostListenerTargetBody:true,hostListenerTargetDocument:true,hostListenerTargetParent:false,hostListenerTargetWindow:true,hotModuleReplacement:false,hydrateClientSide:false,hydrateServerSide:false,hydratedAttribute:false,hydratedClass:true,hydratedSelectorName:"hydrated",initializeNextTick:false,invisiblePrehydration:true,isDebug:false,isDev:false,isTesting:false,lazyLoad:true,lifecycle:true,lifecycleDOMEvents:false,member:true,method:true,mode:false,modernPropertyDecls:false,observeAttribute:true,profile:false,prop:true,propBoolean:true,propMutable:true,propNumber:true,propString:true,reflect:false,scoped:true,scopedSlotTextContentFix:false,scriptDataOpts:false,shadowDelegatesFocus:true,shadowDom:true,slot:true,slotChildNodesFix:false,slotRelocation:false,state:true,style:true,svg:true,taskQueue:true,transformTagName:false,updatable:true,vdomAttribute:true,vdomClass:true,vdomFunctional:true,vdomKey:true,vdomListener:true,vdomPropOrAttr:true,vdomRef:true,vdomRender:true,vdomStyle:true,vdomText:true,vdomXlink:true,watchCallback:true};var __defProp=Object.defineProperty;var __export=function(e,r){for(var t in r)__defProp(e,t,{get:r[t],enumerable:true})};var SVG_NS="http://www.w3.org/2000/svg";var HTML_NS="http://www.w3.org/1999/xhtml";var getHostRef=function(e){if(e.__stencil__getHostRef){return e.__stencil__getHostRef()}return void 0};var registerInstance=function(e,r){e.__stencil__getHostRef=function(){return r};r.t=e};var registerHost=function(e,r){var t={i:0,$hostElement$:e,o:r,u:new Map};{t.l=new Promise((function(e){return t.v=e}))}{t.p=new Promise((function(e){return t.m=e}));e["s-p"]=[];e["s-rc"]=[]}var n=t;e.__stencil__getHostRef=function(){return n};return n};var isMemberInElement=function(e,r){return r in e};var consoleError=function(e,r){return(0,console.error)(e,r)};var cmpModules=new Map;var loadModule=function(e,r,t){var n=e.h.replace(/-/g,"_");var i=e.S;if(!i){return void 0}var a=cmpModules.get(i);if(a){return a[n]}
2
- /*!__STENCIL_STATIC_IMPORT_SWITCH__*/return import("./".concat(i,".entry.js").concat("")).then((function(e){{cmpModules.set(i,e)}return e[n]}),(function(e){consoleError(e,r.$hostElement$)}))};var styles=new Map;var HYDRATED_STYLE_ID="sty-id";var HYDRATED_CSS="{visibility:hidden}.hydrated{visibility:inherit}";var SLOT_FB_CSS="slot-fb{display:contents}slot-fb[hidden]{display:none}";var XLINK_NS="http://www.w3.org/1999/xlink";var win=typeof window!=="undefined"?window:{};var plt={i:0,_:"",jmp:function(e){return e()},raf:function(e){return requestAnimationFrame(e)},ael:function(e,r,t,n){return e.addEventListener(r,t,n)},rel:function(e,r,t,n){return e.removeEventListener(r,t,n)},ce:function(e,r){return new CustomEvent(e,r)}};var supportsListenerOptions=function(){var e;var r=false;try{(e=win.document)==null?void 0:e.addEventListener("e",null,Object.defineProperty({},"passive",{get:function(){r=true}}))}catch(e){}return r}();var promiseResolve=function(e){return Promise.resolve(e)};var supportsConstructableStylesheets=function(){try{new CSSStyleSheet;return typeof(new CSSStyleSheet).replaceSync==="function"}catch(e){}return false}();var queuePending=false;var queueDomReads=[];var queueDomWrites=[];var queueTask=function(e,r){return function(t){e.push(t);if(!queuePending){queuePending=true;if(r&&plt.i&4){nextTick(flush)}else{plt.raf(flush)}}}};var consume=function(e){for(var r=0;r<e.length;r++){try{e[r](performance.now())}catch(e){consoleError(e)}}e.length=0};var flush=function(){consume(queueDomReads);{consume(queueDomWrites);if(queuePending=queueDomReads.length>0){plt.raf(flush)}}};var nextTick=function(e){return promiseResolve().then(e)};var writeTask=queueTask(queueDomWrites,true);var getAssetPath=function(e){var r=new URL(e,plt._);return r.origin!==win.location.origin?r.href:r.pathname};var isDef=function(e){return e!=null&&e!==void 0};var isComplexType=function(e){e=typeof e;return e==="object"||e==="function"};function queryNonceMetaTagContent(e){var r,t,n;return(n=(t=(r=e.head)==null?void 0:r.querySelector('meta[name="csp-nonce"]'))==null?void 0:t.getAttribute("content"))!=null?n:void 0}var result_exports={};__export(result_exports,{err:function(){return err},map:function(){return map},ok:function(){return ok},unwrap:function(){return unwrap},unwrapErr:function(){return unwrapErr}});var ok=function(e){return{isOk:true,isErr:false,value:e}};var err=function(e){return{isOk:false,isErr:true,value:e}};function map(e,r){if(e.isOk){var t=r(e.value);if(t instanceof Promise){return t.then((function(e){return ok(e)}))}else{return ok(t)}}if(e.isErr){var n=e.value;return err(n)}throw"should never get here"}var unwrap=function(e){if(e.isOk){return e.value}else{throw e.value}};var unwrapErr=function(e){if(e.isErr){return e.value}else{throw e.value}};var createTime=function(e,r){if(r===void 0){r=""}{return function(){return}}};var uniqueTime=function(e,r){{return function(){return}}};var h=function(e,r){var t=[];for(var n=2;n<arguments.length;n++){t[n-2]=arguments[n]}var i=null;var a=null;var o=false;var s=false;var u=[];var l=function(r){for(var t=0;t<r.length;t++){i=r[t];if(Array.isArray(i)){l(i)}else if(i!=null&&typeof i!=="boolean"){if(o=typeof e!=="function"&&!isComplexType(i)){i=String(i)}if(o&&s){u[u.length-1].C+=i}else{u.push(o?newVNode(null,i):i)}s=o}}};l(t);if(r){if(r.key){a=r.key}{var f=r.className||r.class;if(f){r.class=typeof f!=="object"?f:Object.keys(f).filter((function(e){return f[e]})).join(" ")}}}if(typeof e==="function"){return e(r===null?{}:r,u,vdomFnUtils)}var c=newVNode(e,null);c.T=r;if(u.length>0){c.R=u}{c.A=a}return c};var newVNode=function(e,r){var t={i:0,N:e,C:r,k:null,R:null};{t.T=null}{t.A=null}return t};var Host={};var isHost=function(e){return e&&e.N===Host};var vdomFnUtils={forEach:function(e,r){return e.map(convertToPublic).forEach(r)},map:function(e,r){return e.map(convertToPublic).map(r).map(convertToPrivate)}};var convertToPublic=function(e){return{vattrs:e.T,vchildren:e.R,vkey:e.A,vname:e.L,vtag:e.N,vtext:e.C}};var convertToPrivate=function(e){if(typeof e.vtag==="function"){var r=__assign({},e.vattrs);if(e.vkey){r.key=e.vkey}if(e.vname){r.name=e.vname}return h.apply(void 0,__spreadArray([e.vtag,r],e.vchildren||[],false))}var t=newVNode(e.vtag,e.vtext);t.T=e.vattrs;t.R=e.vchildren;t.A=e.vkey;t.L=e.vname;return t};var parsePropertyValue=function(e,r){if(e!=null&&!isComplexType(e)){if(r&4){return e==="false"?false:e===""||!!e}if(r&2){return parseFloat(e)}if(r&1){return String(e)}return e}return e};var getElement=function(e){return getHostRef(e).$hostElement$};var createEvent=function(e,r,t){var n=getElement(e);return{emit:function(e){return emitEvent(n,r,{bubbles:!!(t&4),composed:!!(t&2),cancelable:!!(t&1),detail:e})}}};var emitEvent=function(e,r,t){var n=plt.ce(r,t);e.dispatchEvent(n);return n};var rootAppliedStyles=new WeakMap;var registerStyle=function(e,r,t){var n=styles.get(e);if(supportsConstructableStylesheets&&t){n=n||new CSSStyleSheet;if(typeof n==="string"){n=r}else{n.replaceSync(r)}}else{n=r}styles.set(e,n)};var addStyle=function(e,r,t){var n;var i=getScopeId(r);var a=styles.get(i);if(!win.document){return i}e=e.nodeType===11?e:win.document;if(a){if(typeof a==="string"){e=e.head||e;var o=rootAppliedStyles.get(e);var s=void 0;if(!o){rootAppliedStyles.set(e,o=new Set)}if(!o.has(i)){{s=document.querySelector("[".concat(HYDRATED_STYLE_ID,'="').concat(i,'"]'))||win.document.createElement("style");s.innerHTML=a;var u=(n=plt.D)!=null?n:queryNonceMetaTagContent(win.document);if(u!=null){s.setAttribute("nonce",u)}if(!(r.i&1)){if(e.nodeName==="HEAD"){var l=e.querySelectorAll("link[rel=preconnect]");var f=l.length>0?l[l.length-1].nextSibling:e.querySelector("style");e.insertBefore(s,(f==null?void 0:f.parentNode)===e?f:null)}else if("host"in e){if(supportsConstructableStylesheets){var c=new CSSStyleSheet;c.replaceSync(a);e.adoptedStyleSheets=__spreadArray([c],e.adoptedStyleSheets,true)}else{var v=e.querySelector("style");if(v){v.innerHTML=a+v.innerHTML}else{e.prepend(s)}}}else{e.append(s)}}if(r.i&1){e.insertBefore(s,null)}}if(r.i&4){s.innerHTML+=SLOT_FB_CSS}if(o){o.add(i)}}}else if(!e.adoptedStyleSheets.includes(a)){e.adoptedStyleSheets=__spreadArray(__spreadArray([],e.adoptedStyleSheets,true),[a],false)}}return i};var attachStyles=function(e){var r=e.o;var t=e.$hostElement$;var n=r.i;var i=createTime("attachStyles",r.h);var a=addStyle(t.shadowRoot?t.shadowRoot:t.getRootNode(),r);if(n&10&&n&2||n&128){t["s-sc"]=a;t.classList.add(a+"-h")}i()};var getScopeId=function(e,r){return"sc-"+e.h};var setAccessor=function(e,r,t,n,i,a,o){if(t===n){return}var s=isMemberInElement(e,r);var u=r.toLowerCase();if(r==="class"){var l=e.classList;var f=parseClassList(t);var c=parseClassList(n);{l.remove.apply(l,f.filter((function(e){return e&&!c.includes(e)})));l.add.apply(l,c.filter((function(e){return e&&!f.includes(e)})))}}else if(r==="style"){{for(var v in t){if(!n||n[v]==null){if(v.includes("-")){e.style.removeProperty(v)}else{e.style[v]=""}}}}for(var v in n){if(!t||n[v]!==t[v]){if(v.includes("-")){e.style.setProperty(v,n[v])}else{e.style[v]=n[v]}}}}else if(r==="key");else if(r==="ref"){if(n){n(e)}}else if(!s&&r[0]==="o"&&r[1]==="n"){if(r[2]==="-"){r=r.slice(3)}else if(isMemberInElement(win,u)){r=u.slice(2)}else{r=u[2]+r.slice(3)}if(t||n){var d=r.endsWith(CAPTURE_EVENT_SUFFIX);r=r.replace(CAPTURE_EVENT_REGEX,"");if(t){plt.rel(e,r,t,d)}if(n){plt.ael(e,r,n,d)}}}else{var p=isComplexType(n);if((s||p&&n!==null)&&!i){try{if(!e.tagName.includes("-")){var m=n==null?"":n;if(r==="list"){s=false}else if(t==null||e[r]!=m){if(typeof e.__lookupSetter__(r)==="function"){e[r]=m}else{e.setAttribute(r,m)}}}else if(e[r]!==n){e[r]=n}}catch(e){}}var h=false;{if(u!==(u=u.replace(/^xlink\:?/,""))){r=u;h=true}}if(n==null||n===false){if(n!==false||e.getAttribute(r)===""){if(h){e.removeAttributeNS(XLINK_NS,r)}else{e.removeAttribute(r)}}}else if((!s||a&4||i)&&!p&&e.nodeType===1){n=n===true?"":n;if(h){e.setAttributeNS(XLINK_NS,r,n)}else{e.setAttribute(r,n)}}}};var parseClassListRegex=/\s/;var parseClassList=function(e){if(typeof e==="object"&&e&&"baseVal"in e){e=e.baseVal}if(!e||typeof e!=="string"){return[]}return e.split(parseClassListRegex)};var CAPTURE_EVENT_SUFFIX="Capture";var CAPTURE_EVENT_REGEX=new RegExp(CAPTURE_EVENT_SUFFIX+"$");var updateElement=function(e,r,t,n){var i=r.k.nodeType===11&&r.k.host?r.k.host:r.k;var a=e&&e.T||{};var o=r.T||{};{for(var s=0,u=sortedAttrNames(Object.keys(a));s<u.length;s++){var l=u[s];if(!(l in o)){setAccessor(i,l,a[l],void 0,t,r.i)}}}for(var f=0,c=sortedAttrNames(Object.keys(o));f<c.length;f++){var l=c[f];setAccessor(i,l,a[l],o[l],t,r.i)}};function sortedAttrNames(e){return e.includes("ref")?__spreadArray(__spreadArray([],e.filter((function(e){return e!=="ref"})),true),["ref"],false):e}var scopeId;var hostTagName;var useNativeShadowDom=false;var isSvgMode=false;var createElm=function(e,r,t){var n=r.R[t];var i=0;var a;var o;if(n.C!==null){a=n.k=win.document.createTextNode(n.C)}else{if(!isSvgMode){isSvgMode=n.N==="svg"}if(!win.document){throw new Error("You are trying to render a Stencil component in an environment that doesn't support the DOM. Make sure to populate the [`window`](https://developer.mozilla.org/en-US/docs/Web/API/Window/window) object before rendering a component.")}a=n.k=win.document.createElementNS(isSvgMode?SVG_NS:HTML_NS,!useNativeShadowDom&&BUILD.slotRelocation&&n.i&2?"slot-fb":n.N);if(isSvgMode&&n.N==="foreignObject"){isSvgMode=false}{updateElement(null,n,isSvgMode)}if(isDef(scopeId)&&a["s-si"]!==scopeId){a.classList.add(a["s-si"]=scopeId)}if(n.R){for(i=0;i<n.R.length;++i){o=createElm(e,n,i);if(o){a.appendChild(o)}}}{if(n.N==="svg"){isSvgMode=false}else if(a.tagName==="foreignObject"){isSvgMode=true}}}a["s-hn"]=hostTagName;return a};var addVnodes=function(e,r,t,n,i,a){var o=e;var s;if(o.shadowRoot&&o.tagName===hostTagName){o=o.shadowRoot}for(;i<=a;++i){if(n[i]){s=createElm(null,t,i);if(s){n[i].k=s;insertBefore(o,s,r)}}}};var removeVnodes=function(e,r,t){for(var n=r;n<=t;++n){var i=e[n];if(i){var a=i.k;nullifyVNodeRefs(i);if(a){a.remove()}}}};var updateChildren=function(e,r,t,n,i){if(i===void 0){i=false}var a=0;var o=0;var s=0;var u=0;var l=r.length-1;var f=r[0];var c=r[l];var v=n.length-1;var d=n[0];var p=n[v];var m;var h;while(a<=l&&o<=v){if(f==null){f=r[++a]}else if(c==null){c=r[--l]}else if(d==null){d=n[++o]}else if(p==null){p=n[--v]}else if(isSameVnode(f,d,i)){patch(f,d,i);f=r[++a];d=n[++o]}else if(isSameVnode(c,p,i)){patch(c,p,i);c=r[--l];p=n[--v]}else if(isSameVnode(f,p,i)){patch(f,p,i);insertBefore(e,f.k,c.k.nextSibling);f=r[++a];p=n[--v]}else if(isSameVnode(c,d,i)){patch(c,d,i);insertBefore(e,c.k,f.k);c=r[--l];d=n[++o]}else{s=-1;{for(u=a;u<=l;++u){if(r[u]&&r[u].A!==null&&r[u].A===d.A){s=u;break}}}if(s>=0){h=r[s];if(h.N!==d.N){m=createElm(r&&r[o],t,s)}else{patch(h,d,i);r[s]=void 0;m=h.k}d=n[++o]}else{m=createElm(r&&r[o],t,o);d=n[++o]}if(m){{insertBefore(f.k.parentNode,m,f.k)}}}}if(a>l){addVnodes(e,n[v+1]==null?null:n[v+1].k,t,n,o,v)}else if(o>v){removeVnodes(r,a,l)}};var isSameVnode=function(e,r,t){if(t===void 0){t=false}if(e.N===r.N){if(!t){return e.A===r.A}if(t&&!e.A&&r.A){e.A=r.A}return true}return false};var patch=function(e,r,t){if(t===void 0){t=false}var n=r.k=e.k;var i=e.R;var a=r.R;var o=r.N;var s=r.C;if(s===null){{isSvgMode=o==="svg"?true:o==="foreignObject"?false:isSvgMode}{updateElement(e,r,isSvgMode)}if(i!==null&&a!==null){updateChildren(n,i,r,a,t)}else if(a!==null){if(e.C!==null){n.textContent=""}addVnodes(n,null,r,a,0,a.length-1)}else if(!t&&BUILD.updatable&&i!==null){removeVnodes(i,0,i.length-1)}if(isSvgMode&&o==="svg"){isSvgMode=false}}else if(e.C!==s){n.data=s}};var nullifyVNodeRefs=function(e){{e.T&&e.T.ref&&e.T.ref(null);e.R&&e.R.map(nullifyVNodeRefs)}};var insertBefore=function(e,r,t){if(typeof r["s-sn"]==="string"&&!!r["s-sr"]&&!!r["s-cr"]){addRemoveSlotScopedClass(r["s-cr"],r,e,r.parentElement)}{return e==null?void 0:e.insertBefore(r,t)}};function addRemoveSlotScopedClass(e,r,t,n){var i,a;var o;if(e&&typeof r["s-sn"]==="string"&&!!r["s-sr"]&&e.parentNode&&e.parentNode["s-sc"]&&(o=r["s-si"]||e.parentNode["s-sc"])){var s=r["s-sn"];var u=r["s-hn"];(i=t.classList)==null?void 0:i.add(o+"-s");if(n&&((a=n.classList)==null?void 0:a.contains(o+"-s"))){var l=(n.__childNodes||n.childNodes)[0];var f=false;while(l){if(l["s-sn"]!==s&&l["s-hn"]===u&&!!l["s-sr"]){f=true;break}l=l.nextSibling}if(!f)n.classList.remove(o+"-s")}}}var renderVdom=function(e,r,t){if(t===void 0){t=false}var n=e.$hostElement$;var i=e.o;var a=e.M||newVNode(null,null);var o=isHost(r)?r:h(null,null,r);hostTagName=n.tagName;if(t&&o.T){for(var s=0,u=Object.keys(o.T);s<u.length;s++){var l=u[s];if(n.hasAttribute(l)&&!["key","ref","style","class"].includes(l)){o.T[l]=n[l]}}}o.N=null;o.i|=4;e.M=o;o.k=a.k=n.shadowRoot||n;{scopeId=n["s-sc"]}useNativeShadowDom=!!(i.i&1)&&!(i.i&128);patch(a,o,t)};var attachToAncestor=function(e,r){if(r&&!e.P&&r["s-p"]){var t=r["s-p"].push(new Promise((function(n){return e.P=function(){r["s-p"].splice(t-1,1);n()}})))}};var scheduleUpdate=function(e,r){{e.i|=16}if(e.i&4){e.i|=512;return}attachToAncestor(e,e.H);var t=function(){return dispatchHooks(e,r)};return writeTask(t)};var dispatchHooks=function(e,r){var t=e.$hostElement$;var n=createTime("scheduleUpdate",e.o.h);var i=e.t;if(!i){throw new Error("Can't render component <".concat(t.tagName.toLowerCase()," /> with invalid Stencil runtime! Make sure this imported component is compiled with a `externalRuntime: true` flag. For more information, please refer to https://stenciljs.com/docs/custom-elements#externalruntime"))}var a;if(r){{e.i|=256;if(e.V){e.V.map((function(e){var r=e[0],n=e[1];return safeCall(i,r,n,t)}));e.V=void 0}}a=safeCall(i,"componentWillLoad",void 0,t)}else{a=safeCall(i,"componentWillUpdate",void 0,t)}a=enqueue(a,(function(){return safeCall(i,"componentWillRender",void 0,t)}));n();return enqueue(a,(function(){return updateComponent(e,i,r)}))};var enqueue=function(e,r){return isPromisey(e)?e.then(r).catch((function(e){console.error(e);r()})):r()};var isPromisey=function(e){return e instanceof Promise||e&&e.then&&typeof e.then==="function"};var updateComponent=function(e,r,t){return __awaiter(void 0,void 0,void 0,(function(){var n,i,a,o,s,u,l;return __generator(this,(function(f){i=e.$hostElement$;a=createTime("update",e.o.h);o=i["s-rc"];if(t){attachStyles(e)}s=createTime("render",e.o.h);{callRender(e,r,i,t)}if(o){o.map((function(e){return e()}));i["s-rc"]=void 0}s();a();{u=(n=i["s-p"])!=null?n:[];l=function(){return postUpdateComponent(e)};if(u.length===0){l()}else{Promise.all(u).then(l);e.i|=4;u.length=0}}return[2]}))}))};var renderingRef=null;var callRender=function(e,r,t,n){try{renderingRef=r;r=r.render();{e.i&=~16}{e.i|=2}{{{renderVdom(e,r,n)}}}}catch(r){consoleError(r,e.$hostElement$)}renderingRef=null;return null};var getRenderingRef=function(){return renderingRef};var postUpdateComponent=function(e){var r=e.o.h;var t=e.$hostElement$;var n=createTime("postUpdate",r);var i=e.t;var a=e.H;safeCall(i,"componentDidRender",void 0,t);if(!(e.i&64)){e.i|=64;{addHydratedFlag(t)}safeCall(i,"componentDidLoad",void 0,t);n();{e.m(t);if(!a){appDidLoad()}}}else{safeCall(i,"componentDidUpdate",void 0,t);n()}{e.v(t)}{if(e.P){e.P();e.P=void 0}if(e.i&512){nextTick((function(){return scheduleUpdate(e,false)}))}e.i&=~(4|512)}};var forceUpdate=function(e){{var r=getHostRef(e);var t=r.$hostElement$.isConnected;if(t&&(r.i&(2|16))===2){scheduleUpdate(r,false)}return t}};var appDidLoad=function(e){nextTick((function(){return emitEvent(win,"appload",{detail:{namespace:NAMESPACE}})}))};var safeCall=function(e,r,t,n){if(e&&e[r]){try{return e[r](t)}catch(e){consoleError(e,n)}}return void 0};var addHydratedFlag=function(e){var r;return e.classList.add((r=BUILD.hydratedSelectorName)!=null?r:"hydrated")};var getValue=function(e,r){return getHostRef(e).u.get(r)};var setValue=function(e,r,t,n){var i=getHostRef(e);if(!i){throw new Error("Couldn't find host element for \"".concat(n.h,'" as it is unknown to this Stencil runtime. This usually happens when integrating a 3rd party Stencil component with another Stencil component or application. Please reach out to the maintainers of the 3rd party Stencil component or report this on the Stencil Discord server (https://chat.stenciljs.com) or comment on this similar [GitHub issue](https://github.com/stenciljs/core/issues/5457).'))}var a=i.$hostElement$;var o=i.u.get(r);var s=i.i;var u=i.t;t=parsePropertyValue(t,n.O[r][0]);var l=Number.isNaN(o)&&Number.isNaN(t);var f=t!==o&&!l;if((!(s&8)||o===void 0)&&f){i.u.set(r,t);if(u){if(n.U&&s&128){var c=n.U[r];if(c){c.map((function(e){try{u[e](t,o,r)}catch(e){consoleError(e,a)}}))}}if((s&(2|16))===2){if(u.componentShouldUpdate){if(u.componentShouldUpdate(t,o,r)===false){return}}scheduleUpdate(i,false)}}}};var proxyComponent=function(e,r,t){var n,i;var a=e.prototype;if(r.O||(r.U||e.watchers)){if(e.watchers&&!r.U){r.U=e.watchers}var o=Object.entries((n=r.O)!=null?n:{});o.map((function(e){var n=e[0],i=e[1][0];if(i&31||t&2&&i&32){var o=Object.getOwnPropertyDescriptor(a,n)||{},s=o.get,u=o.set;if(s)r.O[n][0]|=2048;if(u)r.O[n][0]|=4096;if(t&1||!s){Object.defineProperty(a,n,{get:function(){{if((r.O[n][0]&2048)===0){return getValue(this,n)}var e=getHostRef(this);var t=e?e.t:a;if(!t)return;return t[n]}},configurable:true,enumerable:true})}Object.defineProperty(a,n,{set:function(e){var a=this;var o=getHostRef(this);if(u){var s=i&32?this[n]:o.$hostElement$[n];if(typeof s==="undefined"&&o.u.get(n)){e=o.u.get(n)}else if(!o.u.get(n)&&s){o.u.set(n,s)}u.apply(this,[parsePropertyValue(e,i)]);e=i&32?this[n]:o.$hostElement$[n];setValue(this,n,e,r);return}{if((t&1)===0||(r.O[n][0]&4096)===0){setValue(this,n,e,r);if(t&1&&!o.t){o.p.then((function(){if(r.O[n][0]&4096&&o.t[n]!==o.u.get(n)){o.t[n]=e}}))}return}var l=function(){var t=o.t[n];if(!o.u.get(n)&&t){o.u.set(n,t)}o.t[n]=parsePropertyValue(e,i);setValue(a,n,o.t[n],r)};if(o.t){l()}else{o.p.then((function(){return l()}))}}}})}else if(t&1&&i&64){Object.defineProperty(a,n,{value:function(){var e=[];for(var r=0;r<arguments.length;r++){e[r]=arguments[r]}var t;var i=getHostRef(this);return(t=i==null?void 0:i.l)==null?void 0:t.then((function(){var r;return(r=i.t)==null?void 0:r[n].apply(r,e)}))}})}}));if(t&1){var s=new Map;a.attributeChangedCallback=function(e,t,n){var i=this;plt.jmp((function(){var o;var u=s.get(e);if(i.hasOwnProperty(u)&&BUILD.lazyLoad){n=i[u];delete i[u]}else if(a.hasOwnProperty(u)&&typeof i[u]==="number"&&i[u]==n){return}else if(u==null){var l=getHostRef(i);var f=l==null?void 0:l.i;if(f&&!(f&8)&&f&128&&n!==t){var c=l.t;var v=(o=r.U)==null?void 0:o[e];v==null?void 0:v.forEach((function(r){if(c[r]!=null){c[r].call(c,n,t,e)}}))}return}var d=Object.getOwnPropertyDescriptor(a,u);n=n===null&&typeof i[u]==="boolean"?false:n;if(n!==i[u]&&(!d.get||!!d.set)){i[u]=n}}))};e.observedAttributes=Array.from(new Set(__spreadArray(__spreadArray([],Object.keys((i=r.U)!=null?i:{}),true),o.filter((function(e){var r=e[0],t=e[1];return t[0]&15})).map((function(e){var r=e[0],t=e[1];var n=t[1]||r;s.set(n,r);return n})),true)))}}return e};var initializeComponent=function(e,r,t,n){return __awaiter(void 0,void 0,void 0,(function(){var n,i,a,o,s,u,l,f,c,v,d;return __generator(this,(function(p){switch(p.label){case 0:if(!((r.i&32)===0))return[3,6];r.i|=32;i=t.S;if(!i)return[3,4];a=loadModule(t,r);if(!(a&&"then"in a))return[3,2];o=uniqueTime();return[4,a];case 1:n=p.sent();o();return[3,3];case 2:n=a;p.label=3;case 3:if(!n){throw new Error('Constructor for "'.concat(t.h,"#").concat(r.j,'" was not found'))}if(!n.isProxied){{t.U=n.watchers}proxyComponent(n,t,2);n.isProxied=true}s=createTime("createInstance",t.h);{r.i|=8}try{new n(r)}catch(r){consoleError(r,e)}{r.i&=~8}{r.i|=128}s();fireConnectedCallback(r.t,e);return[3,5];case 4:n=e.constructor;u=e.localName;customElements.whenDefined(u).then((function(){return r.i|=128}));p.label=5;case 5:if(n&&n.style){l=void 0;if(typeof n.style==="string"){l=n.style}f=getScopeId(t);if(!styles.has(f)){c=createTime("registerStyles",t.h);registerStyle(f,l,!!(t.i&1));c()}}p.label=6;case 6:v=r.H;d=function(){return scheduleUpdate(r,true)};if(v&&v["s-rc"]){v["s-rc"].push(d)}else{d()}return[2]}}))}))};var fireConnectedCallback=function(e,r){{safeCall(e,"connectedCallback",void 0,r)}};var connectedCallback=function(e){if((plt.i&1)===0){var r=getHostRef(e);var t=r.o;var n=createTime("connectedCallback",t.h);if(!(r.i&1)){r.i|=1;{var i=e;while(i=i.parentNode||i.host){if(i["s-p"]){attachToAncestor(r,r.H=i);break}}}if(t.O){Object.entries(t.O).map((function(r){var t=r[0],n=r[1][0];if(n&31&&e.hasOwnProperty(t)){var i=e[t];delete e[t];e[t]=i}}))}{initializeComponent(e,r,t)}}else{addHostEventListeners(e,r,t.I);if(r==null?void 0:r.t){fireConnectedCallback(r.t,e)}else if(r==null?void 0:r.p){r.p.then((function(){return fireConnectedCallback(r.t,e)}))}}n()}};var disconnectInstance=function(e,r){{safeCall(e,"disconnectedCallback",void 0,r||e)}};var disconnectedCallback=function(e){return __awaiter(void 0,void 0,void 0,(function(){var r;return __generator(this,(function(t){if((plt.i&1)===0){r=getHostRef(e);{if(r.$){r.$.map((function(e){return e()}));r.$=void 0}}if(r==null?void 0:r.t){disconnectInstance(r.t,e)}else if(r==null?void 0:r.p){r.p.then((function(){return disconnectInstance(r.t,e)}))}}if(rootAppliedStyles.has(e)){rootAppliedStyles.delete(e)}if(e.shadowRoot&&rootAppliedStyles.has(e.shadowRoot)){rootAppliedStyles.delete(e.shadowRoot)}return[2]}))}))};var bootstrapLazy=function(e,r){if(r===void 0){r={}}var t;if(!win.document){console.warn("Stencil: No document found. Skipping bootstrapping lazy components.");return}var n=createTime();var i=[];var a=r.exclude||[];var o=win.customElements;var s=win.document.head;var u=s.querySelector("meta[charset]");var l=win.document.createElement("style");var f=[];var c;var v=true;Object.assign(plt,r);plt._=new URL(r.resourcesUrl||"./",win.document.baseURI).href;var d=false;e.map((function(e){e[1].map((function(r){var t;var n={i:r[0],h:r[1],O:r[2],I:r[3]};if(n.i&4){d=true}{n.O=r[2]}{n.I=r[3]}{n.U=(t=r[4])!=null?t:{}}var s=n.h;var u=function(e){__extends(r,e);function r(r){var t=e.call(this,r)||this;t.hasRegisteredEventListeners=false;r=t;registerHost(r,n);if(n.i&1){{if(!r.shadowRoot){{r.attachShadow({mode:"open",delegatesFocus:!!(n.i&16)})}}else{if(r.shadowRoot.mode!=="open"){throw new Error("Unable to re-use existing shadow root for ".concat(n.h,"! Mode is set to ").concat(r.shadowRoot.mode," but Stencil only supports open shadow roots."))}}}}return t}r.prototype.connectedCallback=function(){var e=this;var r=getHostRef(this);if(!this.hasRegisteredEventListeners){this.hasRegisteredEventListeners=true;addHostEventListeners(this,r,n.I)}if(c){clearTimeout(c);c=null}if(v){f.push(this)}else{plt.jmp((function(){return connectedCallback(e)}))}};r.prototype.disconnectedCallback=function(){var e=this;plt.jmp((function(){return disconnectedCallback(e)}));plt.raf((function(){var r;var t=getHostRef(e);var n=f.findIndex((function(r){return r===e}));if(n>-1){f.splice(n,1)}if(((r=t==null?void 0:t.M)==null?void 0:r.k)instanceof Node&&!t.M.k.isConnected){delete t.M.k}}))};r.prototype.componentOnReady=function(){return getHostRef(this).p};return r}(HTMLElement);n.S=e[0];if(!a.includes(s)&&!o.get(s)){i.push(s);o.define(s,proxyComponent(u,n,1))}}))}));if(i.length>0){if(d){l.textContent+=SLOT_FB_CSS}{l.textContent+=i.sort()+HYDRATED_CSS}if(l.innerHTML.length){l.setAttribute("data-styles","");var p=(t=plt.D)!=null?t:queryNonceMetaTagContent(win.document);if(p!=null){l.setAttribute("nonce",p)}s.insertBefore(l,u?u.nextSibling:s.firstChild)}}v=false;if(f.length){f.map((function(e){return e.connectedCallback()}))}else{{plt.jmp((function(){return c=setTimeout(appDidLoad,30)}))}}n()};var Fragment=function(e,r){return r};var addHostEventListeners=function(e,r,t,n){if(t&&win.document){t.map((function(t){var n=t[0],i=t[1],a=t[2];var o=getHostListenerTarget(win.document,e,n);var s=hostListenerProxy(r,a);var u=hostListenerOpts(n);plt.ael(o,i,s,u);(r.$=r.$||[]).push((function(){return plt.rel(o,i,s,u)}))}))}};var hostListenerProxy=function(e,r){return function(t){var n;try{{if(e.i&256){(n=e.t)==null?void 0:n[r](t)}else{(e.V=e.V||[]).push([r,t])}}}catch(r){consoleError(r,e.$hostElement$)}}};var getHostListenerTarget=function(e,r,t){if(t&4){return e}if(t&8){return win}if(t&16){return e.body}return r};var hostListenerOpts=function(e){return supportsListenerOptions?{passive:(e&1)!==0,capture:(e&2)!==0}:(e&2)!==0};var setNonce=function(e){return plt.D=e};export{Fragment as F,Host as H,getElement as a,bootstrapLazy as b,createEvent as c,getAssetPath as d,forceUpdate as f,getRenderingRef as g,h,promiseResolve as p,registerInstance as r,setNonce as s};
@@ -1 +0,0 @@
1
- var __awaiter=this&&this.__awaiter||function(e,r,t,o){function n(e){return e instanceof t?e:new t((function(r){r(e)}))}return new(t||(t=Promise))((function(t,a){function i(e){try{u(o.next(e))}catch(e){a(e)}}function l(e){try{u(o["throw"](e))}catch(e){a(e)}}function u(e){e.done?t(e.value):n(e.value).then(i,l)}u((o=o.apply(e,r||[])).next())}))};var __generator=this&&this.__generator||function(e,r){var t={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},o,n,a,i;return i={next:l(0),throw:l(1),return:l(2)},typeof Symbol==="function"&&(i[Symbol.iterator]=function(){return this}),i;function l(e){return function(r){return u([e,r])}}function u(l){if(o)throw new TypeError("Generator is already executing.");while(i&&(i=0,l[0]&&(t=0)),t)try{if(o=1,n&&(a=l[0]&2?n["return"]:l[0]?n["throw"]||((a=n["return"])&&a.call(n),0):n.next)&&!(a=a.call(n,l[1])).done)return a;if(n=0,a)l=[l[0]&2,a.value];switch(l[0]){case 0:case 1:a=l;break;case 4:t.label++;return{value:l[1],done:false};case 5:t.label++;n=l[1];l=[0];continue;case 7:l=t.ops.pop();t.trys.pop();continue;default:if(!(a=t.trys,a=a.length>0&&a[a.length-1])&&(l[0]===6||l[0]===2)){t=0;continue}if(l[0]===3&&(!a||l[1]>a[0]&&l[1]<a[3])){t.label=l[1];break}if(l[0]===6&&t.label<a[1]){t.label=a[1];a=l;break}if(a&&t.label<a[2]){t.label=a[2];t.ops.push(l);break}if(a[2])t.ops.pop();t.trys.pop();continue}l=r.call(e,t)}catch(e){l=[6,e];n=0}finally{o=a=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:true}}};import{c as createStore,z as zonosStore}from"./zonosStore-e3d0493a.js";import{j as jsonParse,h as handleFetch,l as logError}from"./handleFetch-a844cac1.js";import{a as availableTestKeys,l as log}from"./VarianceTest-572cecf5.js";import{a as translationStoreUpdateLanguage}from"./translationStore-766b7521.js";var hasAtLeastOneAvailableTestKey=function(e){var r=!!e.find((function(e){return e.testKey in availableTestKeys}));if(!r){log("No available test key found in response","info",{response:e})}return!!e.find((function(e){return e.testKey in availableTestKeys}))};var filterValidTests=function(e){if(!hasAtLeastOneAvailableTestKey(e)){return[]}return e.filter((function(e){var r;var t=availableTestKeys[e.testKey]&&!e.selectedVariantKey;var o=e.selectedVariantKey&&!!((r=availableTestKeys[e.testKey])===null||r===void 0?void 0:r["availableVariants"].includes(e.selectedVariantKey));return t||o})).map((function(e){return Object.assign(Object.assign({},e),{expiresAt:e.expiresAt||Date.now()+VARIANT_TEST_KEY_EXPIRATION,selectedVariantKey:e.selectedVariantKey||null})}))};var VARIANT_TEST_KEY_EXPIRATION=60*60*24*1e3;var _d=createStore({checkoutSessionId:sessionStorage.getItem("zonos--checkout-session-id"),enabledVariantTestKeys:jsonParse(localStorage.getItem("zonos--enabled-variant-test-keys"))}),storageStoreOnChange=_d.onChange,storageStore=_d.state;storageStoreOnChange("enabledVariantTestKeys",(function(){var e;if(!((e=storageStore.enabledVariantTestKeys)===null||e===void 0?void 0:e.length)){localStorage.removeItem("zonos--enabled-variant-test-keys");return}localStorage.setItem("zonos--enabled-variant-test-keys",JSON.stringify(storageStore.enabledVariantTestKeys))}));storageStoreOnChange("checkoutSessionId",(function(){if(!storageStore.checkoutSessionId){sessionStorage.removeItem("zonos--checkout-session-id");return}sessionStorage.setItem("zonos--checkout-session-id",storageStore.checkoutSessionId)}));var storageStoreSetEnabledVariantTestKeys=function(e){storageStore.enabledVariantTestKeys=filterValidTests(e)};var getCountries=function(){return __awaiter(void 0,void 0,void 0,(function(){var e,r,t,o;return __generator(this,(function(n){switch(n.label){case 0:n.trys.push([0,2,,3]);return[4,handleFetch("/api/zonos-elements/get-countries",{method:"GET"})];case 1:e=n.sent(),r=e.errors,t=e.json;if(r.length||!t){return[2,null]}return[2,t];case 2:o=n.sent();return[2,null];case 3:return[2]}}))}))};var getCountryLandedCost=function(e){return __awaiter(void 0,void 0,void 0,(function(){var r,t,o,n,a;return __generator(this,(function(i){switch(i.label){case 0:if(!e){return[2,null]}t="/api/zonos-elements/country-landed-cost/".concat(e);return[4,handleFetch(t)];case 1:o=i.sent(),n=o.errors,a=o.json;if(n.length||!a){logError("Error fetching country landed cost: ".concat((r=n.find(Boolean))===null||r===void 0?void 0:r.message));return[2,null]}return[2,a||null]}}))}))};var defaultUsExchangeRate={exchangeRate:{rate:1,targetFormat:{currencyCode:"USD",decimalDelimiter:".",scale:2,symbol:"$",symbolLocation:"before",thousandsDelimiter:","}},maxAge:null};var getExchangeRate=function(e){return __awaiter(void 0,[e],void 0,(function(e){var r,t,o,n,a,i,l,u,c,s;var d=e.country,v=e.isGuaranteed,f=e.sourceCurrency,g=e.targetCurrency;return __generator(this,(function(e){switch(e.label){case 0:if(f===g&&!v){return[2,defaultUsExchangeRate]}t=new URLSearchParams;t.set("sourceCurrency",f);t.set("targetCurrency",g);t.set("isGuaranteed",String(v));t.set("country",d||"");return[4,handleFetch("/api/zonos-elements/exchange-rates?".concat(t.toString()))];case 1:o=e.sent(),n=o.errors,a=o.json;if(n.length||!a){logError("Error fetching country landed cost: ".concat((r=n.find(Boolean))===null||r===void 0?void 0:r.message));return[2,defaultUsExchangeRate]}i=a.exchangeRateCreate,l=i.rate,u=i.targetFormat;c=a.maxAge;if(l){sessionStorage.setItem(d+"_rate",JSON.stringify(l));s={rate:l,targetFormat:u};return[2,{exchangeRate:s,maxAge:c}]}return[2,defaultUsExchangeRate]}}))}))};var getInclusivePricing=function(e){return __awaiter(void 0,void 0,void 0,(function(){var r,t,o,n;return __generator(this,(function(a){switch(a.label){case 0:if(!e){return[2,null]}return[4,handleFetch("/api/zonos-elements/inclusive-prices/".concat(e))];case 1:t=a.sent(),o=t.errors,n=t.json;if(o.length||!n){logError("Error fetching country inclusive price setting: ".concat((r=o.find(Boolean))===null||r===void 0?void 0:r.message));return[2,null]}return[2,n||null]}}))}))};var getLocaleMessages=function(e){return __awaiter(void 0,[e],void 0,(function(e){var r,t,o,n,a;var i=e.countryCode,l=e.localeTo,u=e.storeId;return __generator(this,(function(e){switch(e.label){case 0:t=new URLSearchParams;t.set("countryCode",i);t.set("storeId",u.toString());if(l){t.set("localeTo",l)}return[4,handleFetch("/api/zonos-elements/locale-messages?".concat(t.toString()))];case 1:o=e.sent(),n=o.errors,a=o.json;if(n.length||!a){logError("Error fetching exchange rate",(r=n.find(Boolean))===null||r===void 0?void 0:r.message);return[2,[]]}return[2,a.locale_countryCodesPage]}}))}))};var validateCountryCode=function(e){if(e&&/^[A-Z]{2}$/.test(e)){return e}return null};var getZCountryUrlParam=function(e){var r=new URLSearchParams(e||window.location.search);var t=function(e){var t=r.get(e);return validateCountryCode(t)};var o=t("zCountry");var n=t("country");var a=t("customerCountry");return o||n||a};var getLocalization=function(){return __awaiter(void 0,void 0,void 0,(function(){var e,r,t,o,n,a,i,l;return __generator(this,(function(u){switch(u.label){case 0:u.trys.push([0,2,,3]);e=new URL(window.location.href);r=window.sessionStorage.getItem("zonos--country");t=getZCountryUrlParam(e.searchParams)||r;o=new URLSearchParams;if(t){o.set("zCountry",t)}return[4,handleFetch("/api/zonos-elements/localization?".concat(o.toString()))];case 1:n=u.sent(),a=n.errors,i=n.json;if(a.length||!i){return[2,{country:null,locale:null}]}return[2,{country:i.country,locale:i.locale}];case 2:l=u.sent();return[2,{country:null,locale:null}];case 3:return[2]}}))}))};var getShippingZones=function(){return __awaiter(void 0,void 0,void 0,(function(){var e,r,t,o,n,a,i;return __generator(this,(function(l){switch(l.label){case 0:if((e=window.Zonos.cartSettings)===null||e===void 0?void 0:e.shippingZones){return[2,window.Zonos.cartSettings.shippingZones.flatMap((function(e){return e===null||e===void 0?void 0:e.countryCodes})).filter(Boolean)]}return[4,handleFetch("/api/zonos-elements/shipping-zones")];case 1:o=l.sent(),n=o.errors,a=o.json;if(n.length||!a){logError("Error fetching shipping zones: ".concat((r=n.find(Boolean))===null||r===void 0?void 0:r.message));return[2,null]}i=(t=a===null||a===void 0?void 0:a.shippingZones)===null||t===void 0?void 0:t.flatMap((function(e){return e===null||e===void 0?void 0:e.countryCodes})).filter(Boolean);return[2,i||null]}}))}))};var currencyConvert=function(e){var r=localizationStore.exchangeRate;if(!r||!e||isNaN(e)){return e}var t=(r===null||r===void 0?void 0:r.targetFormat.scale)||2;var o=e*r.rate;var n=o.toFixed(t);return Number(n)};var numberFormat=function(e){var r=e.amount,t=e.currency,o=e.targetFormat;var n=t||localizationStore.targetCurrency;var a=(o===null||o===void 0?void 0:o.scale)||2;var i=window.navigator.userAgent.indexOf("MSIE ")!==-1;var l=typeof Intl==="object"&&Intl&&typeof Intl.NumberFormat==="function";if(i||!l){var u=Number(r).toFixed(a).replace(".","|dec|").replace(",",(o===null||o===void 0?void 0:o.thousandsDelimiter)||"").replace("|dec|",(o===null||o===void 0?void 0:o.decimalDelimiter)||"");return u}var c=new Intl.NumberFormat(window.navigator.language,{currency:n,currencyDisplay:"code",minimumFractionDigits:a,style:"currency"}).format(r);return c.replace(new RegExp("".concat(n,"\\s+")),"")};var currencyFormat=function(e){var r=e.amount,t=e.currency;if(isNaN(r)||r!==0&&!r){return""}var o=zonosStore.overrideCurrencyFormat;var n=localizationStore.exchangeRate;var a=t||localizationStore.targetCurrency;if(typeof o==="function"){return o({amount:r,currencyCode:a,numberFormat:function(e){var r=e.amount;return numberFormat({amount:r,currency:a,targetFormat:(n===null||n===void 0?void 0:n.targetFormat)||null})}})}var i=(n||{}).targetFormat;if(!i||!n){return"".concat(r.toFixed(2)," ").concat(a)}var l=i.scale||2;var u=window.navigator.userAgent.indexOf("MSIE ")!==-1;var c=typeof Intl==="object"&&Intl&&typeof Intl.NumberFormat==="function";if(u||!c){var s=Number(r).toFixed(l).replace(".","|dec|").replace(",",i.thousandsDelimiter||"").replace("|dec|",i.decimalDelimiter||"");var d="".concat(s).concat(i.currencyCode!=="USD"?" ".concat(i.currencyCode):"");return d}var v=(o===null||o===void 0?void 0:o.currencyDisplay)||"symbol";var f=new Intl.NumberFormat(window.navigator.language,{currency:a,currencyDisplay:v,minimumFractionDigits:l,style:"currency"}).format(r);var g=v==="code"?"".concat(f.replace(new RegExp("".concat(a,"\\s+")),"")," ").concat(a):f;return g};var currencyConvertAndFormat=function(e){var r=currencyConvert(e);var t=currencyFormat({amount:r});return t};var isValidSelector=function(e){try{document.createDocumentFragment().querySelector(e)}catch(e){return false}return true};var getCurrencyElements=function(e){var r=e||".money";if(!isValidSelector(r)){logError('Currency element selector "'.concat(r,'" is not valid.'));return null}var t=document.querySelectorAll(r);if(!t.length){log('No currency elements found with selector "'.concat(r,'"'),"warn");return null}return Array.from(t)};var getInitialElementAmount=function(e){var r;var t=e.getAttribute("data-domestic");var o=e.getAttribute("data-zintl");var n=(r=e.textContent)===null||r===void 0?void 0:r.replace(/[^\d.-]/g,"");if(!n){return null}if(!t||e.textContent!==o&&o){e.setAttribute("data-domestic",n);return parseFloat(n)}return parseFloat(t)};var BLUR_CURRENCY_DURATION=7e3;var BLUR_CURRENCY_CLASSNAME="z--blur";var removeBlurCurrency=function(){return __awaiter(void 0,void 0,void 0,(function(){var e,r;return __generator(this,(function(t){switch(t.label){case 0:e=window.zonosBlurCurrencyOnInitIntervalId;if(!e){return[2]}return[4,new Promise((function(e){return setTimeout(e,500)}))];case 1:t.sent();clearInterval(e);r=document.querySelectorAll(".".concat(BLUR_CURRENCY_CLASSNAME));r.forEach((function(e){e.classList.remove(BLUR_CURRENCY_CLASSNAME)}));window.zonosBlurCurrencyOnInitIntervalId=undefined;return[2]}}))}))};var blurCurrencyElements=function(e){var r=e.currencySelector;if(!r){return}var t=document.querySelectorAll([r].filter(Boolean).join(","));t.forEach((function(e){e.classList.add(BLUR_CURRENCY_CLASSNAME)}))};var performBlurCurrency=function(){if(typeof window==="undefined"){return}if(window.zonosBlurCurrencyOnInitIntervalId){return}blurCurrencyElements({currencySelector:window.zonosBlurCurrencyOnInitCurrencySelector});var e=setInterval((function(){blurCurrencyElements({currencySelector:window.zonosBlurCurrencyOnInitCurrencySelector})}),10);window.zonosBlurCurrencyOnInitIntervalId=e;setTimeout((function(){void removeBlurCurrency()}),BLUR_CURRENCY_DURATION)};var convertCurrency=function(e){var r;var t=getInitialElementAmount(e);if(!t||isNaN(t)){return}var o=e.getAttribute("data-zintl");var n=parseFloat(e.getAttribute("data-zrate")||"1");var a=e.getAttribute("data-zcountry-code");var i=localizationStore.exchangeRate&&localizationStore.targetCurrency===localizationStore.exchangeRate.targetFormat.currencyCode;var l=((r=localizationStore.exchangeRate)===null||r===void 0?void 0:r.rate)||1;if(i&&(e.textContent!==o||l!==n||a!==localizationStore.selectedCountryCode)){performBlurCurrency();var u=typeof zonosStore.currencyConverter==="function"&&zonosStore.currencyConverter({convert:currencyConvert,convertAndFormat:currencyConvertAndFormat,currencyCode:localizationStore.targetCurrency,format:function(e){return currencyFormat({amount:e})},originalAmount:t,selector:e});var c=u||currencyConvertAndFormat(t);if(c!==e.textContent){e.textContent=c}e.setAttribute("data-zrate",l.toString());e.setAttribute("data-zintl",c);e.setAttribute("data-zcountry-code",localizationStore.selectedCountryCode||"")}void removeBlurCurrency()};var defaultCurrencyConverter=function(){var e=zonosStore.helloSettings.currencyElementSelector;var r=getCurrencyElements(e);if(!(r===null||r===void 0?void 0:r.length)){return}if(!localizationStore.exchangeRate){logError("Could not display currency. Exchange rate and format data is not available.");return}r.forEach((function(e){convertCurrency(e)}))};var currencyDisplay=function(){if(zonosStore.helloSettings.currencyBehavior==="DISABLED"||window.Zonos.isLegacyCheckout){void removeBlurCurrency();return}defaultCurrencyConverter()};var getCurrencyCode=function(e){var r;var t=(r=localizationStore.shippingZoneCountries)===null||r===void 0?void 0:r[e];if(t){return t.currencyCode}return null};var setZCountryUrlParam=function(e){if(!e){return}var r=new URLSearchParams(window.location.search);var t=r.has("zCountry")||zonosStore.helloSettings.countryOverrideBehavior==="URL_PARAM";if(t){r.set("zCountry",e);var o="".concat(window.location.pathname,"?").concat(r.toString());window.history.replaceState(window.history.state,document.title,o)}};var _e=createStore({countryLandedCost:null,customMessages:[],exchangeRate:null,helloCountryList:null,inclusivePricing:null,isDisabledCountry:true,isShippableCountry:false,localizationLoaded:false,selectedCountryCode:null,selectedLocale:"en",shippingZoneCountries:null,targetCurrency:"USD"}),localizationDispose=_e.dispose,localizationStoreOnChange=_e.onChange,localizationStore=_e.state;var triggerGetExchangeRate=function(e){return __awaiter(void 0,void 0,void 0,(function(){var r,t,o;return __generator(this,(function(n){switch(n.label){case 0:return[4,getExchangeRate({country:localizationStore.selectedCountryCode,isGuaranteed:e,sourceCurrency:zonosStore.sourceCurrency,targetCurrency:localizationStore.targetCurrency})];case 1:r=n.sent(),t=r.exchangeRate,o=r.maxAge;if(t){localizationStore.exchangeRate=t;currencyDisplay()}return[2,{maxAge:o}]}}))}))};var DEFAULT_COUNTRY_CODE_LEGACY_CHECKOUT="CA";var getFallbackDefaultCountryCode=function(e){if(localizationStore.selectedCountryCode&&e.includes(localizationStore.selectedCountryCode)){return localizationStore.selectedCountryCode}return DEFAULT_COUNTRY_CODE_LEGACY_CHECKOUT};var startExchangeRateTimeout=function(e){var r=e.isGuaranteed,t=e.maxAge;if(localizationStore.exchangeRateTimeout){clearTimeout(localizationStore.exchangeRateTimeout)}var o=5*60;var n=t||o;localizationStore.exchangeRateTimeout=setTimeout((function(){return __awaiter(void 0,void 0,void 0,(function(){var e;return __generator(this,(function(t){switch(t.label){case 0:return[4,triggerGetExchangeRate(r)];case 1:e=t.sent().maxAge;startExchangeRateTimeout({isGuaranteed:r,maxAge:e});return[2]}}))}))}),n*1e3)};var getNewLocalization=function(){return __awaiter(void 0,void 0,void 0,(function(){var e,r,t,o,n,a,i,l;return __generator(this,(function(u){switch(u.label){case 0:log("get new localization store");r=localizationStore.isDisabledCountry,t=localizationStore.isShippableCountry,o=localizationStore.selectedCountryCode;if(zonosStore.helloSettings.currencyBehavior==="DISABLED"||!t||r||!o){return[2]}n=zonosStore.checkoutSettings.visibilityStatus==="ENABLED";performBlurCurrency();return[4,triggerGetExchangeRate(n)];case 1:a=u.sent().maxAge;startExchangeRateTimeout({isGuaranteed:n,maxAge:a});if(!!window.Zonos.isLegacyCheckout)return[3,4];i=localizationStore;return[4,getCountryLandedCost(localizationStore.selectedCountryCode)];case 2:i.countryLandedCost=u.sent();l=localizationStore;return[4,getInclusivePricing(o)];case 3:l.inclusivePricing=((e=u.sent())===null||e===void 0?void 0:e.setting)||null;if(localizationStore.inclusivePricing){log("Inclusive price setting found for this country (".concat(o,") ").concat(JSON.stringify(localizationStore.inclusivePricing,null,2)))}return[3,5];case 4:log("Skipping country landed cost and inclusive pricing requests, because this is a legacy checkout");u.label=5;case 5:return[2]}}))}))};var getCustomMessages=function(){return __awaiter(void 0,void 0,void 0,(function(){var e,r;return __generator(this,(function(t){switch(t.label){case 0:log("Getting custom messages for ".concat(localizationStore.selectedCountryCode));if(!localizationStore.selectedCountryCode||!zonosStore.storeId){return[2]}return[4,getLocaleMessages({countryCode:localizationStore.selectedCountryCode,localeTo:localizationStore.selectedLocale,storeId:zonosStore.storeId})];case 1:e=t.sent();r=e.flatMap((function(e){var r;return{countryCode:localizationStore.selectedCountryCode,message:(r=e.countryCodesPageMessageLinks.find(Boolean))===null||r===void 0?void 0:r.message.textTo,pageName:e.pageName}}));localizationStore.customMessages=r;return[2]}}))}))};var getOverrideLocale=function(){var e=new URL(window.location.href);var r=e.searchParams.get("zonosLocale");return r};var addInternationalHideClass=function(){if(localizationStore.isShippableCountry){document.body.classList.add("z-intl")}else{document.body.classList.remove("z-intl")}};var getValidCountryCode=function(e){if(e==="UK"){return"GB"}return e};var localizationStoreUpdateSelectedCountryCode=function(e){var r,t;log("Updating selected country code to ".concat(e));var o=!localizationStore.selectedCountryCode;localizationStore.selectedCountryCode=getValidCountryCode(e);var n=localizationStore.selectedCountryCode,a=localizationStore.shippingZoneCountries;var i=!!a&&!!n&&!!a[n]&&!zonosStore.disabledCountries.includes(n);localizationStore.isShippableCountry=i;log("".concat(localizationStore.selectedCountryCode," is a shippable country: ").concat(localizationStore.isShippableCountry));var l=!!n&&zonosStore.disabledCountries.includes(n);localizationStore.isDisabledCountry=l;log("".concat(localizationStore.selectedCountryCode," is a disabled country: ").concat(localizationStore.isDisabledCountry));addInternationalHideClass();if(!n){return}var u=getCurrencyCode(n);if(!o){(r=zonosStore.onCountryChange)===null||r===void 0?void 0:r.call(zonosStore,{countryCode:n,currencyCode:u,isShippableCountry:i})}if(!u){return}localizationStore.targetCurrency=u;void getNewLocalization();window.sessionStorage.setItem("zonos--country",n);setZCountryUrlParam(n);(t=document.querySelector("zonos-hello"))===null||t===void 0?void 0:t.setAttribute("z-country",n)};var initHelloCountryList=function(e){var r=zonosStore.helloSettings.showCountryList;var t=localizationStore.shippingZoneCountries;if(!r||r==="ONLY_SHIPPABLE"){localizationStore.helloCountryList=t;return}if(r==="ALL"){localizationStore.helloCountryList=e;return}localizationStore.helloCountryList=r.reduce((function(r,t){var o;var n=e===null||e===void 0?void 0:e[t];return n?Object.assign(Object.assign({},r),(o={},o[t]=n,o)):r}),{})};var updateCheckoutSessionLanguage=function(){return __awaiter(void 0,void 0,void 0,(function(){var e,r,t;return __generator(this,(function(o){switch(o.label){case 0:if(!storageStore.checkoutSessionId){return[2,null]}return[4,handleFetch("/api/zonos-elements/update-checkout-session-metadata",{body:{id:storageStore.checkoutSessionId,metadata:[{key:"language",value:localizationStore.selectedLocale}]},method:"POST"})];case 1:e=o.sent(),r=e.errors,t=e.json;if(r.length||!t){logError("Error occurs when updating checkout session",JSON.stringify(r,null,2));return[2,{errors:r,json:t}]}return[2,{errors:[],json:t}]}}))}))};var localizationStoreUpdateSelectedLocale=function(e){localizationStore.selectedLocale=e;translationStoreUpdateLanguage(e);void updateCheckoutSessionLanguage();void getCustomMessages()};var initLocalizationStore=function(){return __awaiter(void 0,void 0,void 0,(function(){var e,r,t,o,n,a,i,l,u;return __generator(this,(function(c){switch(c.label){case 0:return[4,Promise.all([getCountries(),getShippingZones(),getLocalization()])];case 1:e=c.sent(),r=e[0],t=e[1],o=e[2];n=t===null||t===void 0?void 0:t.reduce((function(e,t){var o;var n=r===null||r===void 0?void 0:r[t];return n?Object.assign(Object.assign({},e),(o={},o[t]=n,o)):e}),{});localizationStore.shippingZoneCountries=n||null;initHelloCountryList(r||{});a=o.country,i=o.locale;log("Country code from localization: ".concat(a));log("Locale from localization: ".concat(i));localizationStoreUpdateSelectedCountryCode(a);l=getOverrideLocale();localizationStoreUpdateSelectedLocale(l||i||"en");u=["dev.storybook.elements","dev.elements","dev.demo.elements","dev.dashboard"];if(!localizationStore.selectedCountryCode&&u.some((function(e){return window.location.origin.includes(e)}))){localizationStoreUpdateSelectedCountryCode("CA")}localizationStore.localizationLoaded=true;return[2]}}))}))};export{VARIANT_TEST_KEY_EXPIRATION as V,localizationStoreUpdateSelectedCountryCode as a,storageStoreSetEnabledVariantTestKeys as b,localizationStoreOnChange as c,currencyFormat as d,initLocalizationStore as e,filterValidTests as f,getZCountryUrlParam as g,setZCountryUrlParam as h,isValidSelector as i,currencyDisplay as j,currencyConvertAndFormat as k,localizationStore as l,currencyConvert as m,getFallbackDefaultCountryCode as n,storageStoreOnChange as o,localizationStoreUpdateSelectedLocale as p,storageStore as s};