@zonos/elements 1.3.163 → 1.3.165

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 (144) hide show
  1. package/dist/cjs/{cart-934a8aef.js → cart-dbeee1e9.js} +70 -1
  2. package/dist/cjs/index.cjs.js +7 -7
  3. package/dist/cjs/loader.cjs.js +1 -1
  4. package/dist/cjs/{paypal-dddeb76e.js → paypal-38ab2263.js} +1 -1
  5. package/dist/cjs/{zonos-address_8.cjs.entry.js → zonos-address_7.cjs.entry.js} +20 -67
  6. package/dist/cjs/zonos-cart-items_13.cjs.entry.js +2 -2
  7. package/dist/cjs/zonos-checkout.cjs.entry.js +4 -3
  8. package/dist/cjs/zonos-controller.cjs.entry.js +1 -1
  9. package/dist/cjs/zonos-country-flag.cjs.entry.js +1 -1
  10. package/dist/cjs/zonos-country-select_4.cjs.entry.js +1 -1
  11. package/dist/cjs/zonos-elements.cjs.js +1 -1
  12. package/dist/cjs/zonos-empty-state-payment_4.cjs.entry.js +2 -2
  13. package/dist/cjs/zonos-hello-dialog.cjs.entry.js +1 -1
  14. package/dist/cjs/zonos-hello.cjs.entry.js +1 -1
  15. package/dist/cjs/zonos-language-select_2.cjs.entry.js +1 -1
  16. package/dist/cjs/zonos-stripe-input.cjs.entry.js +73 -0
  17. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.js +2 -1
  18. package/dist/collection/components/store/checkout/stripe.js +1 -0
  19. package/dist/collection/components/store/hello/localization.js +7 -1
  20. package/dist/collection/components/store/translationStore/strings.arabic.js +3 -0
  21. package/dist/collection/components/store/translationStore/strings.base.js +3 -0
  22. package/dist/collection/components/store/translationStore/strings.chinese.js +3 -0
  23. package/dist/collection/components/store/translationStore/strings.danish.js +3 -0
  24. package/dist/collection/components/store/translationStore/strings.dutch.js +3 -0
  25. package/dist/collection/components/store/translationStore/strings.french.js +3 -0
  26. package/dist/collection/components/store/translationStore/strings.german.js +3 -0
  27. package/dist/collection/components/store/translationStore/strings.hebrew.js +3 -0
  28. package/dist/collection/components/store/translationStore/strings.indonesian.js +3 -0
  29. package/dist/collection/components/store/translationStore/strings.italian.js +3 -0
  30. package/dist/collection/components/store/translationStore/strings.japanese.js +3 -0
  31. package/dist/collection/components/store/translationStore/strings.korean.js +3 -0
  32. package/dist/collection/components/store/translationStore/strings.norwegian.js +3 -0
  33. package/dist/collection/components/store/translationStore/strings.polish.js +3 -0
  34. package/dist/collection/components/store/translationStore/strings.portuguese.js +3 -0
  35. package/dist/collection/components/store/translationStore/strings.russian.js +3 -0
  36. package/dist/collection/components/store/translationStore/strings.spanish.js +3 -0
  37. package/dist/collection/components/store/translationStore/strings.swedish.js +3 -0
  38. package/dist/collection/components/store/translationStore/strings.turkish.js +3 -0
  39. package/dist/collection/components/store/translationStore/strings.vietnamese.js +3 -0
  40. package/dist/collection/components/stripe/zonos-address/zonos-address.css +3 -0
  41. package/dist/collection/components/stripe/zonos-address/zonos-address.js +19 -1
  42. package/dist/collection/components/utils/api/prepCalculateLandedCost.js +2 -0
  43. package/dist/collection/types/generated/graphql.internal.types.js +10 -0
  44. package/dist/esm/{cart-41bdd9fb.js → cart-f2f5f13f.js} +70 -1
  45. package/dist/esm/index.js +7 -7
  46. package/dist/esm/loader.js +1 -1
  47. package/dist/esm/{paypal-c81fb5ee.js → paypal-7d253663.js} +1 -1
  48. package/dist/esm/{zonos-address_8.entry.js → zonos-address_7.entry.js} +21 -67
  49. package/dist/esm/zonos-cart-items_13.entry.js +2 -2
  50. package/dist/esm/zonos-checkout.entry.js +4 -3
  51. package/dist/esm/zonos-controller.entry.js +1 -1
  52. package/dist/esm/zonos-country-flag.entry.js +1 -1
  53. package/dist/esm/zonos-country-select_4.entry.js +1 -1
  54. package/dist/esm/zonos-elements.js +1 -1
  55. package/dist/esm/zonos-empty-state-payment_4.entry.js +2 -2
  56. package/dist/esm/zonos-hello-dialog.entry.js +1 -1
  57. package/dist/esm/zonos-hello.entry.js +1 -1
  58. package/dist/esm/zonos-language-select_2.entry.js +1 -1
  59. package/dist/esm/zonos-stripe-input.entry.js +69 -0
  60. package/dist/esm-es5/cart-f2f5f13f.js +1 -0
  61. package/dist/esm-es5/index.js +1 -1
  62. package/dist/esm-es5/loader.js +1 -1
  63. package/dist/esm-es5/{paypal-c81fb5ee.js → paypal-7d253663.js} +1 -1
  64. package/dist/esm-es5/zonos-address_7.entry.js +1 -0
  65. package/dist/esm-es5/zonos-cart-items_13.entry.js +1 -1
  66. package/dist/esm-es5/zonos-checkout.entry.js +1 -1
  67. package/dist/esm-es5/zonos-controller.entry.js +1 -1
  68. package/dist/esm-es5/zonos-country-flag.entry.js +1 -1
  69. package/dist/esm-es5/zonos-country-select_4.entry.js +1 -1
  70. package/dist/esm-es5/zonos-elements.js +1 -1
  71. package/dist/esm-es5/zonos-empty-state-payment_4.entry.js +1 -1
  72. package/dist/esm-es5/zonos-hello-dialog.entry.js +1 -1
  73. package/dist/esm-es5/zonos-hello.entry.js +1 -1
  74. package/dist/esm-es5/zonos-language-select_2.entry.js +1 -1
  75. package/dist/esm-es5/zonos-stripe-input.entry.js +1 -0
  76. package/dist/scripts/index.d.ts +1 -0
  77. package/dist/scripts/index.js +1 -1
  78. package/dist/scripts/loadZonos.js +1 -1
  79. package/dist/scripts/zonos.js +1 -1
  80. package/dist/types/components/store/checkout/stripe.d.ts +4 -0
  81. package/dist/types/components/store/translationStore/strings.arabic.d.ts +3 -0
  82. package/dist/types/components/store/translationStore/strings.base.d.ts +3 -0
  83. package/dist/types/components/store/translationStore/strings.chinese.d.ts +3 -0
  84. package/dist/types/components/store/translationStore/strings.danish.d.ts +3 -0
  85. package/dist/types/components/store/translationStore/strings.dutch.d.ts +3 -0
  86. package/dist/types/components/store/translationStore/strings.french.d.ts +3 -0
  87. package/dist/types/components/store/translationStore/strings.german.d.ts +3 -0
  88. package/dist/types/components/store/translationStore/strings.hebrew.d.ts +3 -0
  89. package/dist/types/components/store/translationStore/strings.indonesian.d.ts +3 -0
  90. package/dist/types/components/store/translationStore/strings.italian.d.ts +3 -0
  91. package/dist/types/components/store/translationStore/strings.japanese.d.ts +3 -0
  92. package/dist/types/components/store/translationStore/strings.korean.d.ts +3 -0
  93. package/dist/types/components/store/translationStore/strings.norwegian.d.ts +3 -0
  94. package/dist/types/components/store/translationStore/strings.polish.d.ts +3 -0
  95. package/dist/types/components/store/translationStore/strings.portuguese.d.ts +3 -0
  96. package/dist/types/components/store/translationStore/strings.russian.d.ts +3 -0
  97. package/dist/types/components/store/translationStore/strings.spanish.d.ts +3 -0
  98. package/dist/types/components/store/translationStore/strings.swedish.d.ts +3 -0
  99. package/dist/types/components/store/translationStore/strings.turkish.d.ts +3 -0
  100. package/dist/types/components/store/translationStore/strings.vietnamese.d.ts +3 -0
  101. package/dist/types/components/stripe/zonos-address/zonos-address.d.ts +1 -0
  102. package/dist/types/types/checkout/api/CalculateLandedCost.d.ts +2 -0
  103. package/dist/types/types/generated/graphql.internal.types.d.ts +13 -0
  104. package/dist/types/types/generated/graphql.internal.types.ts +20 -0
  105. package/dist/types/types/utils/ZonosSettings.d.ts +4 -0
  106. package/dist/zonos-elements/index.esm.js +1 -1
  107. package/dist/zonos-elements/{p-22e190af.entry.js → p-163425d9.entry.js} +1 -1
  108. package/dist/zonos-elements/{p-9cbe0e06.system.entry.js → p-16413274.system.entry.js} +1 -1
  109. package/dist/zonos-elements/p-18d23528.entry.js +1 -0
  110. package/dist/zonos-elements/{p-6bbdc759.system.entry.js → p-1c850630.system.entry.js} +1 -1
  111. package/dist/zonos-elements/{p-f06559c1.entry.js → p-20802055.entry.js} +1 -1
  112. package/dist/zonos-elements/{p-7c536f5a.system.entry.js → p-25ad92dc.system.entry.js} +1 -1
  113. package/dist/zonos-elements/p-3bff5a9f.system.js +1 -0
  114. package/dist/zonos-elements/{p-0cee00ae.system.js → p-3c865c53.system.js} +1 -1
  115. package/dist/zonos-elements/{p-d9940c47.system.entry.js → p-3edccfff.system.entry.js} +1 -1
  116. package/dist/zonos-elements/{p-983c8c5f.entry.js → p-405f70b1.entry.js} +1 -1
  117. package/dist/zonos-elements/{p-a23fb562.system.entry.js → p-41688151.system.entry.js} +1 -1
  118. package/dist/zonos-elements/{p-e6bbea1e.system.entry.js → p-466de014.system.entry.js} +1 -1
  119. package/dist/zonos-elements/p-46f6e5e9.system.js +1 -1
  120. package/dist/zonos-elements/{p-a9a29cf6.system.js → p-4a0d1e3c.system.js} +1 -1
  121. package/dist/zonos-elements/p-607a6750.entry.js +1 -0
  122. package/dist/zonos-elements/{p-daa0dcb4.system.entry.js → p-669a7b5d.system.entry.js} +1 -1
  123. package/dist/zonos-elements/{p-28a062f3.entry.js → p-6e864533.entry.js} +1 -1
  124. package/dist/zonos-elements/{p-bbc11b58.entry.js → p-7011d8e2.entry.js} +1 -1
  125. package/dist/zonos-elements/p-718c9603.system.entry.js +1 -0
  126. package/dist/zonos-elements/{p-e611b266.system.entry.js → p-735d4097.system.entry.js} +1 -1
  127. package/dist/zonos-elements/{p-2f6bbd3b.entry.js → p-93499c9b.entry.js} +1 -1
  128. package/dist/zonos-elements/{p-7b76c844.system.entry.js → p-9d53988d.system.entry.js} +1 -1
  129. package/dist/zonos-elements/{p-e300d1ed.entry.js → p-ab699c84.entry.js} +1 -1
  130. package/dist/zonos-elements/p-c371558a.system.entry.js +1 -0
  131. package/dist/zonos-elements/p-c556ff98.js +1 -0
  132. package/dist/zonos-elements/p-e4a52de7.entry.js +1 -0
  133. package/dist/zonos-elements/p-e97f9606.js +17 -0
  134. package/dist/zonos-elements/{p-7cb5e4b8.entry.js → p-f9c2ff4c.entry.js} +1 -1
  135. package/dist/zonos-elements/zonos-elements.esm.js +1 -1
  136. package/package.json +1 -1
  137. package/dist/esm-es5/cart-41bdd9fb.js +0 -1
  138. package/dist/esm-es5/zonos-address_8.entry.js +0 -1
  139. package/dist/zonos-elements/p-15d4d606.system.js +0 -1
  140. package/dist/zonos-elements/p-1921fe51.entry.js +0 -1
  141. package/dist/zonos-elements/p-23021792.js +0 -17
  142. package/dist/zonos-elements/p-52bfe2bc.system.entry.js +0 -1
  143. package/dist/zonos-elements/p-a0efb02e.js +0 -1
  144. package/dist/zonos-elements/p-fb7b12af.entry.js +0 -1
@@ -1 +1 @@
1
- import{r as o,h as e,H as t}from"./p-ab68ad11.js";import{_ as s,e as i,i as n,f as l,z as r,g as h,m as a}from"./p-dd999b44.js";import{l as d,G as c,r as m,u as f,I as p,J as g,K as u,L as w,E as z}from"./p-a0efb02e.js";import{c as b}from"./p-b4b7f705.js";import{h as v,b as x,l as y}from"./p-f0c8150e.js";import{g as k}from"./p-5883217a.js";import"./p-672707ce.js";import"./p-98e9c9cf.js";var L=s,T=/\s/,C=/^\s+/,O=i,E=n,S=function(o){return o?o.slice(0,function(o){for(var e=o.length;e--&&T.test(o.charAt(e)););return e}(o)+1).replace(C,""):o},D=l,I=/^[-+]0x[0-9a-f]+$/i,j=/^0b[01]+$/i,A=/^0o[0-7]+$/i,X=parseInt,B=l,F=function(){return L.Date.now()},H=function(o){if("number"==typeof o)return o;if(function(o){return"symbol"==typeof o||E(o)&&"[object Symbol]"==O(o)}(o))return NaN;if(D(o)){var e="function"==typeof o.valueOf?o.valueOf():o;o=D(e)?e+"":e}if("string"!=typeof o)return 0===o?o:+o;o=S(o);var t=j.test(o);return t||A.test(o)?X(o.slice(2),t?2:8):I.test(o)?NaN:+o},N=Math.max,M=Math.min;const P=o=>{const e=null==o?void 0:o.replace("www.","").replace("https://","");return e&&new RegExp(e).test(window.location.href)},R=()=>{var o,e;const{productAddToCartElementSelector:t,productDescriptionElementSelector:s,productTitleElementSelector:i,restrictionBehavior:n}=r.helloSettings;i&&s||x("Hello could not check item restrictions - must provide title and description selectors.");const l=i&&c(i)&&document.querySelectorAll(i)||[],h=s&&c(s)&&document.querySelectorAll(s)||[];if(l.length!==h.length)return x("Hello could not check item restrictions - Title and description selectors do not match"),[];const a="RESTRICT_AND_BLOCK"===n,d=a&&t&&c(t)&&document.querySelectorAll(t)||[];a&&d.length!==h.length&&x('Hello could not disable "Add to cart" buttons - Title and add to cart selectors do not match');const m=[];for(let t=0;t<l.length;t++){const s=l[t],i=h[t];if(s&&i){const n={cartButtonNode:d[t]||null,description:(null===(o=i.textContent)||void 0===o?void 0:o.trim())||"",title:(null===(e=s.textContent)||void 0===e?void 0:e.trim())||""};m.push(n)}}return m},$=class{constructor(e){o(this,e),this.getHelloPeekMessage=o=>{if(("productDetail"===r.currentHelloPage||"productList"===r.currentHelloPage)&&this.allRestrictedItems.length){const o=m("click to learn more");return`${m("productDetail"===r.currentHelloPage?"Restricted item":"Restricted items found")} - ${o}`}switch(r.currentHelloPage){case"cart":return m("Prepay duties and taxes at checkout");case"productList":case"productDetail":return m("See duty and tax thresholds");default:return m("Welcome to [storeName]",{storeName:o})}},this.enableShowPeekMessage=()=>{this.peekMessage&&(this.showPeekMessage=!0)},this.getNewItemRestrictions=async o=>"productDetail"!==r.currentHelloPage&&"productList"!==r.currentHelloPage||"DISABLED"===r.helloSettings.restrictionBehavior?[]:await(async o=>{if(!o.length)return[];const{selectedCountryCode:e}=d;if(!e)return x("Hello could not check item restrictions - No country code selected"),[];const t=o.map((o=>({description:o.description,name:o.title})));return(await(async({items:o,shipFrom:e,shipTo:t})=>{var s;const i={items:o,shipFrom:e,shipTo:t},{errors:n,json:l}=await v("/api/zonos-elements/check-item-restrictions",{body:i,method:"POST"});return n.length||!l?(x(`Error fetching item restrictions: ${null===(s=n.find(Boolean))||void 0===s?void 0:s.message}`),[]):l.filter(Boolean)})({items:t,shipFrom:"AD",shipTo:e})).map((o=>{var e;const s=(null===(e=t.filter((e=>e.description===o.itemDescription)).find(Boolean))||void 0===e?void 0:e.name)||"";return Object.assign(Object.assign({},o),{name:s})}))})(o),this.triggerShowPeekMessage=()=>{this.peekMessage=this.getHelloPeekMessage(r.organizationName);const{peekMessageBehavior:o,peekMessageDelay:e}=r.helloSettings;"ENABLED"===o&&setTimeout((()=>{this.enableShowPeekMessage(),this.allRestrictedItems.some((o=>this.productsOnPage.some((e=>e.description===o.itemDescription))))||setTimeout((()=>{this.showPeekMessage=!1}),3e3)}),1e3*e)},this.disableAddToCartButtons=()=>{this.productsOnPage.length&&this.productsOnPage.forEach((o=>{var e,t;this.allRestrictedItems.some((e=>e.itemDescription===o.description))?null===(e=o.cartButtonNode)||void 0===e||e.setAttribute("disabled","disabled"):null===(t=o.cartButtonNode)||void 0===t||t.removeAttribute("disabled")}))},this.handleItemRestrictions=async()=>{this.productsOnPage=R();const o=this.productsOnPage.filter((o=>!this.allFoundProducts.some((e=>e.title===o.title)))),e=await this.getNewItemRestrictions(o);this.allRestrictedItems.push(...e),this.allFoundProducts.push(...o),this.disableAddToCartButtons()},this.reloadHelloData=async()=>{await this.handleItemRestrictions(),this.triggerShowPeekMessage()},this.handleProductCountChange=function(o,e,t){var s,i,n,l,r,h,a=0,d=!1,c=!1,m=!0;if("function"!=typeof o)throw new TypeError("Expected a function");function f(e){var t=s,n=i;return s=i=void 0,a=e,l=o.apply(n,t)}function p(o){var t=o-h;return void 0===h||t>=e||t<0||c&&o-a>=n}function g(){var o=F();if(p(o))return u(o);r=setTimeout(g,function(o){var t=e-(o-h);return c?M(t,n-(o-a)):t}(o))}function u(o){return r=void 0,m&&s?f(o):(s=i=void 0,l)}function w(){var o=F(),t=p(o);if(s=arguments,i=this,h=o,t){if(void 0===r)return function(o){return a=o,r=setTimeout(g,e),d?f(o):l}(h);if(c)return clearTimeout(r),r=setTimeout(g,e),f(h)}return void 0===r&&(r=setTimeout(g,e)),l}return e=H(e)||0,B(t)&&(d=!!t.leading,n=(c="maxWait"in t)?N(H(t.maxWait)||0,e):n,m="trailing"in t?!!t.trailing:m),w.cancel=function(){void 0!==r&&clearTimeout(r),a=0,s=h=i=r=void 0},w.flush=function(){return void 0===r?l:u(F())},w}((()=>{const{productTitleElementSelector:o}=r.helloSettings;if(o){const o=R();if(this.allFoundProducts.length!==o.length&&window.location.href===this.initialUrl){if(!this.allFoundProducts.length)return;this.reloadHelloData()}}}),1e3),this.watchProductCountChange=()=>{new MutationObserver(this.handleProductCountChange).observe(document.body,{childList:!0,subtree:!0})},this.watchPriceChange=()=>{new MutationObserver((()=>{this.displayCurrency()})).observe(document.body,{attributes:!0,childList:!0,subtree:!0})},this.updateHelloOnPageChange=()=>{this.watchProductCountChange(),setInterval((()=>{if(window.location.href!==this.initialUrl){const o=this.initialUrl&&new URL(this.initialUrl);(o&&f(o.searchParams))!==d.selectedCountryCode&&(this.allFoundProducts=[],this.allRestrictedItems=[],this.productsOnPage=[]),this.initialUrl=window.location.href,r.currentHelloPage=(()=>{const{cartUrlPattern:o,homepageUrlPattern:e,productDetailUrlPattern:t,productListUrlPattern:s}=r.helloSettings;return P(o)?"cart":P(t)?"productDetail":P(s)?"productList":P(e)?"home":""})();const e=new URL(window.location.href);if(!f(e.searchParams))return void p(d.selectedCountryCode);this.reloadHelloData()}}),1e3)},this.changeShowDialog=o=>{this.showDialog=o},this.shouldAnimateLeftDesktop=()=>{const o=this.helloRef&&getComputedStyle(this.helloRef).position;if(this.helloRef&&"relative"===o)return k(this.helloRef)},this.shouldRenderHello=(o=!0)=>{if(!d.localizationLoaded)return!1;const{showForCountries:e}=r.helloSettings;return o&&(d.isShippableCountry||y(`Hello: not shippable country - Show for countries: ${e}`)),"ONLY_SHIPPABLE"===e?d.isShippableCountry:"ALL"===e||(null==e?void 0:e.includes(d.selectedCountryCode||""))},this.mobileLocationOverride=void 0,this.animateFromLeftOverride=void 0,this.appearanceSettingsOverride=void 0,this.showPeekMessage=!1,this.zonosStoreHelloSettings=r.helloSettings,this.showDialog=!1,this.peekMessage="",this.initialUrl="",this.allRestrictedItems=[],this.allFoundProducts=[],this.productsOnPage=[],this.isHelloWidgetRendered=!1,this.isMobile=!1}async getCountryList(){return d.helloCountryList}componentWillLoad(){const o=setInterval((async()=>{this.helloRef&&r.loadedConfig&&(this.helloRef.setAttribute("data-zonos-hello-loaded",""),this.updateHelloOnPageChange(),this.watchPriceChange(),this.handleAppearanceSettingsOverrideChange(),clearInterval(o))}),100)}async displayCurrency(){"DISABLED"!==r.helloSettings.currencyBehavior&&(d.exchangeRate?g():y("Could not display currency. Exchange rate and format data is not available.","warn"))}async convertAndFormat(o){return u(o)}async convert(o){return w(o)}async format(o){return z({amount:o})}async openHelloDialog(o){this.changeShowDialog(o)}handleResize(){this.isMobile=window.innerWidth<=768}handleHelloWidgetInitializedState({countryCode:o,currencyCode:e}){var t,s;this.isHelloWidgetRendered||d.selectedCountryCode&&"function"==typeof r.helloSettings.onInitSuccess&&(this.isHelloWidgetRendered=!0,null===(s=(t=r.helloSettings).onInitSuccess)||void 0===s||s.call(t,{countryCode:o,currencyCode:e}))}getHelloLocation(){const o=this.mobileLocationOverride||r.helloSettings.mobileLocation,e=r.helloSettings.desktopLocation,t=this.isMobile;if(!0===t)return{isMobileWindow:t,isOnLeft:this.animateFromLeftOverride||(null==o?void 0:o.includes("LEFT")),isOnTop:null==o?void 0:o.includes("TOP"),shouldFloat:!!o};{const o=!r.helloSettings.anchorElementSelector&&!!e;return{isMobileWindow:t,isOnLeft:this.animateFromLeftOverride||(null==e?void 0:e.includes("LEFT"))||this.shouldAnimateLeftDesktop(),isOnTop:null==e?void 0:e.includes("TOP"),shouldFloat:o}}}handleAppearanceSettingsOverrideChange(){var o;(null===(o=this.appearanceSettingsOverride)||void 0===o?void 0:o.theme)&&(this.appearanceSettingsOverride.theme=h(this.appearanceSettingsOverride.theme))}componentDidLoad(){this.isMobile=window.innerWidth<=768}render(){var o,s;if(null===(o=r.helloSettings.excludedUrlPatterns)||void 0===o?void 0:o.some((o=>o&&new RegExp(o).test(window.location.href))))return y("Hello is excluded on this url","warn"),null;const{selectedCountryCode:i,targetCurrency:n}=d,{isOnLeft:l,isOnTop:h,shouldFloat:c}=this.getHelloLocation(),m=a(r.appearance,this.appearanceSettingsOverride||null),{theme:f}=m,p=null===(s=this.allRestrictedItems)||void 0===s?void 0:s.filter((o=>this.productsOnPage.some((e=>e.description===o.itemDescription))));this.peekMessage=this.getHelloPeekMessage(r.organizationName);const g=this.shouldRenderHello()&&!!i;return g&&!this.isHelloWidgetRendered&&this.handleHelloWidgetInitializedState({countryCode:i,currencyCode:n}),e(t,{class:"zonos--hello zonos--elements","data-theme":f},g&&e("div",{class:b(["zonos--hello-wrapper",c&&"zonos--hello-widget-float"])},e("button",{class:b(["zonos--hello-widget",this.showPeekMessage&&"zonos--hello-show-peek-message",this.mobileLocationOverride&&"zonos--hello-mobile-override",l&&"zonos--hello-widget-left zonos--hello-widget-animate-from-left",h&&"zonos--hello-widget-top",!!this.allRestrictedItems.length&&"zonos--hello-has-restrictions",c&&"zonos--hello-widget-float"]),onClick:()=>{this.changeShowDialog(!this.showDialog)},onMouseEnter:()=>this.enableShowPeekMessage(),onMouseLeave:()=>this.showPeekMessage=!1,ref:o=>o&&(this.helloRef=o)},e("zonos-text",{class:"zonos--hello-message"},this.peekMessage),i&&e("div",{class:"zonos--hello-country-flag-wrapper"},e("zonos-country-flag",{class:"zonos--hello-country-flag",countryCode:i}))),e("div",{class:b(["zonos--hello-dialog-wrapper",this.mobileLocationOverride&&"zonos--hello-dialog-wrapper-mobile-override",c&&"zonos--hello-widget-float"]),style:{height:this.showDialog?"fit-content":"0px"}},e("zonos-hello-dialog",{animateFromLeftOverride:this.animateFromLeftOverride,appearanceSettings:m,isOpen:this.showDialog,mobileLocationOverride:this.mobileLocationOverride,restrictedItems:p,setIsOpen:this.changeShowDialog}))))}static get watchers(){return{appearanceSettingsOverride:["handleAppearanceSettingsOverrideChange"]}}};$.style=":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{display:inline-block}:host .zonos--hello-wrapper{position:relative}:host .zonos--hello-wrapper .zonos--hello-dialog-wrapper-mobile-override{position:fixed;bottom:0;left:0;width:100vw;z-index:1001;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content}@media (max-width: 768px){:host .zonos--hello-wrapper .zonos--hello-dialog-wrapper{position:fixed;bottom:0;left:0;width:100vw;z-index:1001;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content}}:host .zonos--hello-widget{-webkit-transition:all 0.7s cubic-bezier(0.31, -0.02, 0.06, 1.53);transition:all 0.7s cubic-bezier(0.31, -0.02, 0.06, 1.53);padding:6px;border-radius:30px;background:var(--zonos-elements-page-background);font-size:var(--zonos-elements-font-size-s);border:var(--zonos-elements-border);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;cursor:pointer;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;position:relative;z-index:1000}:host .zonos--hello-widget>.zonos--hello-message{-ms-flex-order:0;order:0;max-width:0;height:100%;white-space:nowrap;-webkit-transition:border 0.3s ease-in, all 0.7s cubic-bezier(0.31, -0.02, 0.06, 1.53);transition:border 0.3s ease-in, all 0.7s cubic-bezier(0.31, -0.02, 0.06, 1.53);overflow:hidden;color:var(--zonos-elements-text-color);position:absolute;background:var(--zonos-elements-page-background);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;border-top-left-radius:30px;border-bottom-left-radius:30px;left:0;-webkit-transform:translateX(calc(-100% + 16px));transform:translateX(calc(-100% + 16px));width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;border-top:var(--zonos-elements-border);border-bottom:var(--zonos-elements-border)}:host .zonos--hello-widget.zonos--hello-has-restrictions{background:var(--zonos-elements-red-100);border:1px solid var(--zonos-elements-red-200)}:host .zonos--hello-widget.zonos--hello-has-restrictions>.zonos--hello-message{background:var(--zonos-elements-red-100);color:var(--zonos-elements-red-800);font-weight:500}:host .zonos--hello-widget.zonos--hello-has-restrictions.zonos--hello-show-peek-message>.zonos--hello-message{border:1px solid var(--zonos-elements-red-200)}:host .zonos--hello-widget.zonos--hello-show-peek-message{max-width:100vw;width:100%}:host .zonos--hello-widget.zonos--hello-show-peek-message>.zonos--hello-message{max-width:100vw;padding:0 6px;padding-right:16px;border:var(--zonos-elements-border)}:host .zonos--hello-widget.zonos--hello-show-peek-message:not(.zonos--hello-widget-animate-from-left)>.zonos--hello-message{border-right:none}:host .zonos--hello-widget.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left>.zonos--hello-message{border-left:0}:host .zonos--hello-widget.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left>.zonos--hello-message{padding-left:16px;padding-right:6px;border-left:none}:host .zonos--hello-widget.zonos--hello-widget-animate-from-left>.zonos--hello-message{-ms-flex-order:1;order:1;-webkit-transform:translateX(calc(100% - 16px));transform:translateX(calc(100% - 16px));right:0;left:auto;border-top-right-radius:30px;border-bottom-right-radius:30px}:host .zonos--hello-widget .zonos--hello-country-flag-wrapper{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center}:host .zonos--hello-widget .zonos--hello-country-flag-wrapper .zonos--hello-country-flag{height:18px;width:18px;position:relative;overflow:hidden;border-radius:30px;-webkit-box-shadow:var(--zonos-elements-v3-shadow-medium);box-shadow:var(--zonos-elements-v3-shadow-medium);z-index:10;justify-self:center}:host .zonos--hello-widget.zonos--hello-widget-float{position:fixed;bottom:72px;right:32px}:host .zonos--hello-widget.zonos--hello-widget-float.zonos--hello-widget-left{left:32px;right:auto}:host .zonos--hello-widget.zonos--hello-widget-float.zonos--hello-widget-top{bottom:auto;top:32px}:host .zonos--hello-widget.zonos--hello-widget-float.zonos--hello-has-restrictions.zonos--hello-show-peek-message>.zonos--hello-message{border:none}:host .zonos--hello-widget.zonos--hello-widget-float>.zonos--hello-message{position:relative;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;border-radius:30px;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;top:0;bottom:0;left:0;-webkit-transform:translateX(0);transform:translateX(0);width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;border:none}:host .zonos--hello-widget.zonos--hello-widget-float.zonos--hello-widget-animate-from-left>.zonos--hello-message{-webkit-transform:translateX(0);transform:translateX(0)}:host .zonos--hello-widget.zonos--hello-widget-float.zonos--hello-show-peek-message{width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}:host .zonos--hello-widget.zonos--hello-widget-float.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left>.zonos--hello-message{padding-left:8px;padding-right:4px}:host .zonos--hello-widget.zonos--hello-widget-float.zonos--hello-show-peek-message>.zonos--hello-message{padding:0 var(--zonos-elements-radius-4);padding-right:6px;border:none}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float{position:fixed;bottom:72px;right:32px}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float.zonos--hello-widget-left{left:32px;right:auto}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float.zonos--hello-widget-top{bottom:auto;top:32px}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float.zonos--hello-has-restrictions.zonos--hello-show-peek-message>.zonos--hello-message{border:none}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float>.zonos--hello-message{position:relative;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;border-radius:30px;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;top:0;bottom:0;left:0;-webkit-transform:translateX(0);transform:translateX(0);width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;border:none}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float.zonos--hello-widget-animate-from-left>.zonos--hello-message{-webkit-transform:translateX(0);transform:translateX(0)}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float.zonos--hello-show-peek-message{width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left>.zonos--hello-message{padding-left:8px;padding-right:4px}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float.zonos--hello-show-peek-message>.zonos--hello-message{padding:0 var(--zonos-elements-radius-4);padding-right:6px;border:none}";export{$ as zonos_hello}
1
+ import{r as o,h as e,H as t}from"./p-ab68ad11.js";import{_ as s,e as i,i as n,f as l,z as r,g as h,m as a}from"./p-dd999b44.js";import{l as d,G as c,r as m,u as f,I as p,J as g,K as u,L as w,E as z}from"./p-c556ff98.js";import{c as b}from"./p-b4b7f705.js";import{h as v,b as x,l as y}from"./p-f0c8150e.js";import{g as k}from"./p-5883217a.js";import"./p-672707ce.js";import"./p-98e9c9cf.js";var L=s,T=/\s/,C=/^\s+/,O=i,E=n,S=function(o){return o?o.slice(0,function(o){for(var e=o.length;e--&&T.test(o.charAt(e)););return e}(o)+1).replace(C,""):o},D=l,I=/^[-+]0x[0-9a-f]+$/i,j=/^0b[01]+$/i,A=/^0o[0-7]+$/i,X=parseInt,B=l,F=function(){return L.Date.now()},H=function(o){if("number"==typeof o)return o;if(function(o){return"symbol"==typeof o||E(o)&&"[object Symbol]"==O(o)}(o))return NaN;if(D(o)){var e="function"==typeof o.valueOf?o.valueOf():o;o=D(e)?e+"":e}if("string"!=typeof o)return 0===o?o:+o;o=S(o);var t=j.test(o);return t||A.test(o)?X(o.slice(2),t?2:8):I.test(o)?NaN:+o},N=Math.max,M=Math.min;const P=o=>{const e=null==o?void 0:o.replace("www.","").replace("https://","");return e&&new RegExp(e).test(window.location.href)},R=()=>{var o,e;const{productAddToCartElementSelector:t,productDescriptionElementSelector:s,productTitleElementSelector:i,restrictionBehavior:n}=r.helloSettings;i&&s||x("Hello could not check item restrictions - must provide title and description selectors.");const l=i&&c(i)&&document.querySelectorAll(i)||[],h=s&&c(s)&&document.querySelectorAll(s)||[];if(l.length!==h.length)return x("Hello could not check item restrictions - Title and description selectors do not match"),[];const a="RESTRICT_AND_BLOCK"===n,d=a&&t&&c(t)&&document.querySelectorAll(t)||[];a&&d.length!==h.length&&x('Hello could not disable "Add to cart" buttons - Title and add to cart selectors do not match');const m=[];for(let t=0;t<l.length;t++){const s=l[t],i=h[t];if(s&&i){const n={cartButtonNode:d[t]||null,description:(null===(o=i.textContent)||void 0===o?void 0:o.trim())||"",title:(null===(e=s.textContent)||void 0===e?void 0:e.trim())||""};m.push(n)}}return m},$=class{constructor(e){o(this,e),this.getHelloPeekMessage=o=>{if(("productDetail"===r.currentHelloPage||"productList"===r.currentHelloPage)&&this.allRestrictedItems.length){const o=m("click to learn more");return`${m("productDetail"===r.currentHelloPage?"Restricted item":"Restricted items found")} - ${o}`}switch(r.currentHelloPage){case"cart":return m("Prepay duties and taxes at checkout");case"productList":case"productDetail":return m("See duty and tax thresholds");default:return m("Welcome to [storeName]",{storeName:o})}},this.enableShowPeekMessage=()=>{this.peekMessage&&(this.showPeekMessage=!0)},this.getNewItemRestrictions=async o=>"productDetail"!==r.currentHelloPage&&"productList"!==r.currentHelloPage||"DISABLED"===r.helloSettings.restrictionBehavior?[]:await(async o=>{if(!o.length)return[];const{selectedCountryCode:e}=d;if(!e)return x("Hello could not check item restrictions - No country code selected"),[];const t=o.map((o=>({description:o.description,name:o.title})));return(await(async({items:o,shipFrom:e,shipTo:t})=>{var s;const i={items:o,shipFrom:e,shipTo:t},{errors:n,json:l}=await v("/api/zonos-elements/check-item-restrictions",{body:i,method:"POST"});return n.length||!l?(x(`Error fetching item restrictions: ${null===(s=n.find(Boolean))||void 0===s?void 0:s.message}`),[]):l.filter(Boolean)})({items:t,shipFrom:"AD",shipTo:e})).map((o=>{var e;const s=(null===(e=t.filter((e=>e.description===o.itemDescription)).find(Boolean))||void 0===e?void 0:e.name)||"";return Object.assign(Object.assign({},o),{name:s})}))})(o),this.triggerShowPeekMessage=()=>{this.peekMessage=this.getHelloPeekMessage(r.organizationName);const{peekMessageBehavior:o,peekMessageDelay:e}=r.helloSettings;"ENABLED"===o&&setTimeout((()=>{this.enableShowPeekMessage(),this.allRestrictedItems.some((o=>this.productsOnPage.some((e=>e.description===o.itemDescription))))||setTimeout((()=>{this.showPeekMessage=!1}),3e3)}),1e3*e)},this.disableAddToCartButtons=()=>{this.productsOnPage.length&&this.productsOnPage.forEach((o=>{var e,t;this.allRestrictedItems.some((e=>e.itemDescription===o.description))?null===(e=o.cartButtonNode)||void 0===e||e.setAttribute("disabled","disabled"):null===(t=o.cartButtonNode)||void 0===t||t.removeAttribute("disabled")}))},this.handleItemRestrictions=async()=>{this.productsOnPage=R();const o=this.productsOnPage.filter((o=>!this.allFoundProducts.some((e=>e.title===o.title)))),e=await this.getNewItemRestrictions(o);this.allRestrictedItems.push(...e),this.allFoundProducts.push(...o),this.disableAddToCartButtons()},this.reloadHelloData=async()=>{await this.handleItemRestrictions(),this.triggerShowPeekMessage()},this.handleProductCountChange=function(o,e,t){var s,i,n,l,r,h,a=0,d=!1,c=!1,m=!0;if("function"!=typeof o)throw new TypeError("Expected a function");function f(e){var t=s,n=i;return s=i=void 0,a=e,l=o.apply(n,t)}function p(o){var t=o-h;return void 0===h||t>=e||t<0||c&&o-a>=n}function g(){var o=F();if(p(o))return u(o);r=setTimeout(g,function(o){var t=e-(o-h);return c?M(t,n-(o-a)):t}(o))}function u(o){return r=void 0,m&&s?f(o):(s=i=void 0,l)}function w(){var o=F(),t=p(o);if(s=arguments,i=this,h=o,t){if(void 0===r)return function(o){return a=o,r=setTimeout(g,e),d?f(o):l}(h);if(c)return clearTimeout(r),r=setTimeout(g,e),f(h)}return void 0===r&&(r=setTimeout(g,e)),l}return e=H(e)||0,B(t)&&(d=!!t.leading,n=(c="maxWait"in t)?N(H(t.maxWait)||0,e):n,m="trailing"in t?!!t.trailing:m),w.cancel=function(){void 0!==r&&clearTimeout(r),a=0,s=h=i=r=void 0},w.flush=function(){return void 0===r?l:u(F())},w}((()=>{const{productTitleElementSelector:o}=r.helloSettings;if(o){const o=R();if(this.allFoundProducts.length!==o.length&&window.location.href===this.initialUrl){if(!this.allFoundProducts.length)return;this.reloadHelloData()}}}),1e3),this.watchProductCountChange=()=>{new MutationObserver(this.handleProductCountChange).observe(document.body,{childList:!0,subtree:!0})},this.watchPriceChange=()=>{new MutationObserver((()=>{this.displayCurrency()})).observe(document.body,{attributes:!0,childList:!0,subtree:!0})},this.updateHelloOnPageChange=()=>{this.watchProductCountChange(),setInterval((()=>{if(window.location.href!==this.initialUrl){const o=this.initialUrl&&new URL(this.initialUrl);(o&&f(o.searchParams))!==d.selectedCountryCode&&(this.allFoundProducts=[],this.allRestrictedItems=[],this.productsOnPage=[]),this.initialUrl=window.location.href,r.currentHelloPage=(()=>{const{cartUrlPattern:o,homepageUrlPattern:e,productDetailUrlPattern:t,productListUrlPattern:s}=r.helloSettings;return P(o)?"cart":P(t)?"productDetail":P(s)?"productList":P(e)?"home":""})();const e=new URL(window.location.href);if(!f(e.searchParams))return void p(d.selectedCountryCode);this.reloadHelloData()}}),1e3)},this.changeShowDialog=o=>{this.showDialog=o},this.shouldAnimateLeftDesktop=()=>{const o=this.helloRef&&getComputedStyle(this.helloRef).position;if(this.helloRef&&"relative"===o)return k(this.helloRef)},this.shouldRenderHello=(o=!0)=>{if(!d.localizationLoaded)return!1;const{showForCountries:e}=r.helloSettings;return o&&(d.isShippableCountry||y(`Hello: not shippable country - Show for countries: ${e}`)),"ONLY_SHIPPABLE"===e?d.isShippableCountry:"ALL"===e||(null==e?void 0:e.includes(d.selectedCountryCode||""))},this.mobileLocationOverride=void 0,this.animateFromLeftOverride=void 0,this.appearanceSettingsOverride=void 0,this.showPeekMessage=!1,this.zonosStoreHelloSettings=r.helloSettings,this.showDialog=!1,this.peekMessage="",this.initialUrl="",this.allRestrictedItems=[],this.allFoundProducts=[],this.productsOnPage=[],this.isHelloWidgetRendered=!1,this.isMobile=!1}async getCountryList(){return d.helloCountryList}componentWillLoad(){const o=setInterval((async()=>{this.helloRef&&r.loadedConfig&&(this.helloRef.setAttribute("data-zonos-hello-loaded",""),this.updateHelloOnPageChange(),this.watchPriceChange(),this.handleAppearanceSettingsOverrideChange(),clearInterval(o))}),100)}async displayCurrency(){"DISABLED"!==r.helloSettings.currencyBehavior&&(d.exchangeRate?g():y("Could not display currency. Exchange rate and format data is not available.","warn"))}async convertAndFormat(o){return u(o)}async convert(o){return w(o)}async format(o){return z({amount:o})}async openHelloDialog(o){this.changeShowDialog(o)}handleResize(){this.isMobile=window.innerWidth<=768}handleHelloWidgetInitializedState({countryCode:o,currencyCode:e}){var t,s;this.isHelloWidgetRendered||d.selectedCountryCode&&"function"==typeof r.helloSettings.onInitSuccess&&(this.isHelloWidgetRendered=!0,null===(s=(t=r.helloSettings).onInitSuccess)||void 0===s||s.call(t,{countryCode:o,currencyCode:e}))}getHelloLocation(){const o=this.mobileLocationOverride||r.helloSettings.mobileLocation,e=r.helloSettings.desktopLocation,t=this.isMobile;if(!0===t)return{isMobileWindow:t,isOnLeft:this.animateFromLeftOverride||(null==o?void 0:o.includes("LEFT")),isOnTop:null==o?void 0:o.includes("TOP"),shouldFloat:!!o};{const o=!r.helloSettings.anchorElementSelector&&!!e;return{isMobileWindow:t,isOnLeft:this.animateFromLeftOverride||(null==e?void 0:e.includes("LEFT"))||this.shouldAnimateLeftDesktop(),isOnTop:null==e?void 0:e.includes("TOP"),shouldFloat:o}}}handleAppearanceSettingsOverrideChange(){var o;(null===(o=this.appearanceSettingsOverride)||void 0===o?void 0:o.theme)&&(this.appearanceSettingsOverride.theme=h(this.appearanceSettingsOverride.theme))}componentDidLoad(){this.isMobile=window.innerWidth<=768}render(){var o,s;if(null===(o=r.helloSettings.excludedUrlPatterns)||void 0===o?void 0:o.some((o=>o&&new RegExp(o).test(window.location.href))))return y("Hello is excluded on this url","warn"),null;const{selectedCountryCode:i,targetCurrency:n}=d,{isOnLeft:l,isOnTop:h,shouldFloat:c}=this.getHelloLocation(),m=a(r.appearance,this.appearanceSettingsOverride||null),{theme:f}=m,p=null===(s=this.allRestrictedItems)||void 0===s?void 0:s.filter((o=>this.productsOnPage.some((e=>e.description===o.itemDescription))));this.peekMessage=this.getHelloPeekMessage(r.organizationName);const g=this.shouldRenderHello()&&!!i;return g&&!this.isHelloWidgetRendered&&this.handleHelloWidgetInitializedState({countryCode:i,currencyCode:n}),e(t,{class:"zonos--hello zonos--elements","data-theme":f},g&&e("div",{class:b(["zonos--hello-wrapper",c&&"zonos--hello-widget-float"])},e("button",{class:b(["zonos--hello-widget",this.showPeekMessage&&"zonos--hello-show-peek-message",this.mobileLocationOverride&&"zonos--hello-mobile-override",l&&"zonos--hello-widget-left zonos--hello-widget-animate-from-left",h&&"zonos--hello-widget-top",!!this.allRestrictedItems.length&&"zonos--hello-has-restrictions",c&&"zonos--hello-widget-float"]),onClick:()=>{this.changeShowDialog(!this.showDialog)},onMouseEnter:()=>this.enableShowPeekMessage(),onMouseLeave:()=>this.showPeekMessage=!1,ref:o=>o&&(this.helloRef=o)},e("zonos-text",{class:"zonos--hello-message"},this.peekMessage),i&&e("div",{class:"zonos--hello-country-flag-wrapper"},e("zonos-country-flag",{class:"zonos--hello-country-flag",countryCode:i}))),e("div",{class:b(["zonos--hello-dialog-wrapper",this.mobileLocationOverride&&"zonos--hello-dialog-wrapper-mobile-override",c&&"zonos--hello-widget-float"]),style:{height:this.showDialog?"fit-content":"0px"}},e("zonos-hello-dialog",{animateFromLeftOverride:this.animateFromLeftOverride,appearanceSettings:m,isOpen:this.showDialog,mobileLocationOverride:this.mobileLocationOverride,restrictedItems:p,setIsOpen:this.changeShowDialog}))))}static get watchers(){return{appearanceSettingsOverride:["handleAppearanceSettingsOverrideChange"]}}};$.style=":host{font-family:var(--zonos--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--zonos--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{display:inline-block}:host .zonos--hello-wrapper{position:relative}:host .zonos--hello-wrapper .zonos--hello-dialog-wrapper-mobile-override{position:fixed;bottom:0;left:0;width:100vw;z-index:1001;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content}@media (max-width: 768px){:host .zonos--hello-wrapper .zonos--hello-dialog-wrapper{position:fixed;bottom:0;left:0;width:100vw;z-index:1001;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content}}:host .zonos--hello-widget{-webkit-transition:all 0.7s cubic-bezier(0.31, -0.02, 0.06, 1.53);transition:all 0.7s cubic-bezier(0.31, -0.02, 0.06, 1.53);padding:6px;border-radius:30px;background:var(--zonos-elements-page-background);font-size:var(--zonos-elements-font-size-s);border:var(--zonos-elements-border);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;cursor:pointer;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;position:relative;z-index:1000}:host .zonos--hello-widget>.zonos--hello-message{-ms-flex-order:0;order:0;max-width:0;height:100%;white-space:nowrap;-webkit-transition:border 0.3s ease-in, all 0.7s cubic-bezier(0.31, -0.02, 0.06, 1.53);transition:border 0.3s ease-in, all 0.7s cubic-bezier(0.31, -0.02, 0.06, 1.53);overflow:hidden;color:var(--zonos-elements-text-color);position:absolute;background:var(--zonos-elements-page-background);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;border-top-left-radius:30px;border-bottom-left-radius:30px;left:0;-webkit-transform:translateX(calc(-100% + 16px));transform:translateX(calc(-100% + 16px));width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;border-top:var(--zonos-elements-border);border-bottom:var(--zonos-elements-border)}:host .zonos--hello-widget.zonos--hello-has-restrictions{background:var(--zonos-elements-red-100);border:1px solid var(--zonos-elements-red-200)}:host .zonos--hello-widget.zonos--hello-has-restrictions>.zonos--hello-message{background:var(--zonos-elements-red-100);color:var(--zonos-elements-red-800);font-weight:500}:host .zonos--hello-widget.zonos--hello-has-restrictions.zonos--hello-show-peek-message>.zonos--hello-message{border:1px solid var(--zonos-elements-red-200)}:host .zonos--hello-widget.zonos--hello-show-peek-message{max-width:100vw;width:100%}:host .zonos--hello-widget.zonos--hello-show-peek-message>.zonos--hello-message{max-width:100vw;padding:0 6px;padding-right:16px;border:var(--zonos-elements-border)}:host .zonos--hello-widget.zonos--hello-show-peek-message:not(.zonos--hello-widget-animate-from-left)>.zonos--hello-message{border-right:none}:host .zonos--hello-widget.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left>.zonos--hello-message{border-left:0}:host .zonos--hello-widget.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left>.zonos--hello-message{padding-left:16px;padding-right:6px;border-left:none}:host .zonos--hello-widget.zonos--hello-widget-animate-from-left>.zonos--hello-message{-ms-flex-order:1;order:1;-webkit-transform:translateX(calc(100% - 16px));transform:translateX(calc(100% - 16px));right:0;left:auto;border-top-right-radius:30px;border-bottom-right-radius:30px}:host .zonos--hello-widget .zonos--hello-country-flag-wrapper{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center}:host .zonos--hello-widget .zonos--hello-country-flag-wrapper .zonos--hello-country-flag{height:18px;width:18px;position:relative;overflow:hidden;border-radius:30px;-webkit-box-shadow:var(--zonos-elements-v3-shadow-medium);box-shadow:var(--zonos-elements-v3-shadow-medium);z-index:10;justify-self:center}:host .zonos--hello-widget.zonos--hello-widget-float{position:fixed;bottom:72px;right:32px}:host .zonos--hello-widget.zonos--hello-widget-float.zonos--hello-widget-left{left:32px;right:auto}:host .zonos--hello-widget.zonos--hello-widget-float.zonos--hello-widget-top{bottom:auto;top:32px}:host .zonos--hello-widget.zonos--hello-widget-float.zonos--hello-has-restrictions.zonos--hello-show-peek-message>.zonos--hello-message{border:none}:host .zonos--hello-widget.zonos--hello-widget-float>.zonos--hello-message{position:relative;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;border-radius:30px;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;top:0;bottom:0;left:0;-webkit-transform:translateX(0);transform:translateX(0);width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;border:none}:host .zonos--hello-widget.zonos--hello-widget-float.zonos--hello-widget-animate-from-left>.zonos--hello-message{-webkit-transform:translateX(0);transform:translateX(0)}:host .zonos--hello-widget.zonos--hello-widget-float.zonos--hello-show-peek-message{width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}:host .zonos--hello-widget.zonos--hello-widget-float.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left>.zonos--hello-message{padding-left:8px;padding-right:4px}:host .zonos--hello-widget.zonos--hello-widget-float.zonos--hello-show-peek-message>.zonos--hello-message{padding:0 var(--zonos-elements-radius-4);padding-right:6px;border:none}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float{position:fixed;bottom:72px;right:32px}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float.zonos--hello-widget-left{left:32px;right:auto}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float.zonos--hello-widget-top{bottom:auto;top:32px}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float.zonos--hello-has-restrictions.zonos--hello-show-peek-message>.zonos--hello-message{border:none}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float>.zonos--hello-message{position:relative;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;border-radius:30px;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;top:0;bottom:0;left:0;-webkit-transform:translateX(0);transform:translateX(0);width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;border:none}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float.zonos--hello-widget-animate-from-left>.zonos--hello-message{-webkit-transform:translateX(0);transform:translateX(0)}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float.zonos--hello-show-peek-message{width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float.zonos--hello-show-peek-message.zonos--hello-widget-animate-from-left>.zonos--hello-message{padding-left:8px;padding-right:4px}:host .zonos--hello-mobile-override.zonos--hello-widget.zonos--hello-widget-float.zonos--hello-show-peek-message>.zonos--hello-message{padding:0 var(--zonos-elements-radius-4);padding-right:6px;border:none}";export{$ as zonos_hello}