@commversion/libs 0.18.1 → 0.18.2

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.
@@ -1,4 +1,4 @@
1
- var lcChannelWidgets=function(m){"use strict";var Fe=Object.defineProperty,je=Object.defineProperties;var Ge=Object.getOwnPropertyDescriptors;var de=Object.getOwnPropertySymbols;var Xe=Object.prototype.hasOwnProperty,Ye=Object.prototype.propertyIsEnumerable;var ue=(m,g,v)=>g in m?Fe(m,g,{enumerable:!0,configurable:!0,writable:!0,value:v}):m[g]=v,L=(m,g)=>{for(var v in g||(g={}))Xe.call(g,v)&&ue(m,v,g[v]);if(de)for(var v of de(g))Ye.call(g,v)&&ue(m,v,g[v]);return m},he=(m,g)=>je(m,Ge(g));const fe={whatsapp:{label:"WhatsApp",icon:'<?xml version="1.0" encoding="utf-8"?><svg xmlns="http://www.w3.org/2000/svg" shape-rendering="geometricPrecision" text-rendering="geometricPrecision" image-rendering="optimizeQuality" fill-rule="evenodd" clip-rule="evenodd" viewBox="0 0 509 511.514"><path fill="#fff" d="M434.762 74.334C387.553 26.81 323.245 0 256.236 0h-.768C115.795.001 2.121 113.696 2.121 253.456l.001.015a253.516 253.516 0 0033.942 126.671L0 511.514l134.373-35.269a253.416 253.416 0 00121.052 30.9h.003.053C395.472 507.145 509 393.616 509 253.626c0-67.225-26.742-131.727-74.252-179.237l.014-.055zM255.555 464.453c-37.753 0-74.861-10.22-107.293-29.479l-7.72-4.602-79.741 20.889 21.207-77.726-4.984-7.975c-21.147-33.606-32.415-72.584-32.415-112.308 0-116.371 94.372-210.743 210.741-210.743 56.011 0 109.758 22.307 149.277 61.98a210.93 210.93 0 0161.744 149.095c0 116.44-94.403 210.869-210.844 210.869h.028zm115.583-157.914c-6.363-3.202-37.474-18.472-43.243-20.593-5.769-2.121-10.01-3.202-14.315 3.203-4.305 6.404-16.373 20.593-20.063 24.855-3.69 4.263-7.401 4.815-13.679 1.612-6.278-3.202-26.786-9.883-50.899-31.472a192.748 192.748 0 01-35.411-43.867c-3.712-6.363-.404-9.777 2.82-12.873 3.224-3.096 6.363-7.381 9.48-11.092a41.58 41.58 0 006.357-10.597 11.678 11.678 0 00-.508-11.09c-1.718-3.18-14.444-34.357-19.534-47.06-5.09-12.703-10.37-10.603-14.272-10.901-3.902-.297-7.911-.19-12.089-.19a23.322 23.322 0 00-16.964 7.911c-5.707 6.298-22.1 21.673-22.1 52.849s22.671 61.249 25.852 65.532c3.182 4.284 44.663 68.227 108.288 95.649 15.099 6.489 26.891 10.392 36.053 13.403a87.504 87.504 0 0025.216 3.718c4.905 0 9.82-.416 14.65-1.237 12.174-1.782 37.453-15.291 42.776-30.073s5.303-27.57 3.711-30.093c-1.591-2.524-5.704-4.369-12.088-7.615l-.038.021z"/></svg>',backgroundColor:"#25D366",prefilledmessage:"Hi, I'd like to learn more.",mobile:{enabled:!1,url:"https://wa.me/{number}[?text={prefilledmessage}]"},desktop:{enabled:!1,url:"https://web.whatsapp.com/send?phone={number}[&text={prefilledmessage}]"}},sms:{label:"SMS",icon:'<?xml version="1.0" encoding="utf-8"?><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="#fff"><path d="M20 2H4c-1.1 0-1.99.9-1.99 2L2 22l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zM8 13H6v-2h2v2zm5 0h-2v-2h2v2zm5 0h-2v-2h2v2z"/></svg>',backgroundColor:"#3478F6",prefilledmessage:"Hi, I'd like to learn more.",mobile:{enabled:!1,url:"sms:{number}[?body={prefilledmessage}]"},desktop:{enabled:!1,url:"sms:{number}[?body={prefilledmessage}]"},popover:{title:"Text us \u2014 we're available 24/7",description:"US numbers only. Msg & carrier rates may apply. Reply STOP to opt out.",buttonLabel:"Start Conversation"}}},pe=new Set(["prefilledmessage"]);function me(e,n){return e.replace(/\[([^\]]*)\]/g,(l,o)=>{for(const[,c]of o.matchAll(/\{(\w+)\}/g)){const a=n[c];if(a==null||a==="")return""}return o}).replace(/\{(\w+)\}/g,(l,o)=>{const c=n[o];if(c==null)return"";const a=String(c);return pe.has(o)?encodeURIComponent(a):a})}const j=e=>e&&typeof e.enabled=="boolean"?{enabled:e.enabled}:{},ge=e=>e===!0?!0:e&&typeof e=="object"?e.enabled===!0:!1,G={title:60,description:140,buttonLabel:24},be=(e,n)=>{if(!e||e===!0||typeof e!="object")return{};const t={},l=o=>{if(typeof e[o]!="string")return;const c=G[o];if(c!=null&&e[o].length>c){console.warn(`[lc-channel-widgets] ${n} popover.${o} exceeds ${c} chars (got ${e[o].length}); using registry default`);return}t[o]=e[o]};return Object.keys(G).forEach(l),t};function _e(e,n){if(!e||typeof e.type!="string")return null;const t=fe[e.type];if(!t)return null;const l=t[n]||{},o=he(L({},e),{prefilledmessage:typeof e.prefilledmessage=="string"?e.prefilledmessage:t.prefilledmessage||""});return{type:e.type,label:t.label,icon:t.icon,backgroundColor:t.backgroundColor,mobile:L(L({},t.mobile),j(e.mobile)),desktop:L(L({},t.desktop),j(e.desktop)),popover:t.popover&&ge(e.popover)?L(L({},t.popover),be(e.popover,e.type)):void 0,href:l.url?me(l.url,o):""}}const we="screen and (max-width: 992px) and (pointer: coarse)",ye=()=>window.matchMedia(we).matches?"mobile":"desktop",C=[];function X(){for(let e=C.length-1;e>=0;e--){const n=C[e];n&&n.parentNode&&n.parentNode.removeChild(n),C.splice(e,1)}}let Y=!1;function ve(){Y||(Y=!0,document.addEventListener("click",e=>{for(let n=0;n<C.length;n++){const t=C[n];t.__isOpen&&!t.contains(e.target)&&O(t)}}))}function Ce(){if(window.__lcHistoryPatched)return;window.__lcHistoryPatched=!0,window.__lcLastUrl=window.__lcLastUrl||location.href;const e=l=>{const o=window.__lcLastUrl,c=location.href,a=o!==c;window.__lcLastUrl=c,!(!a&&l!=="popstate")&&window.dispatchEvent(new Event("lc:locationchange"))},n=history.pushState;typeof n=="function"&&(history.pushState=function(...l){const o=n.apply(this,l);return e("pushState"),o});const t=history.replaceState;typeof t=="function"&&(history.replaceState=function(...l){const o=t.apply(this,l);return e("replaceState"),o}),window.addEventListener("popstate",()=>e("popstate")),window.addEventListener("hashchange",()=>e("hashchange"))}function Q(e){var l;if(document.__lcVisibilityBound&&!e)return!0;if(typeof((l=window.LiveChatWidget)==null?void 0:l.on)!="function")return!1;const n=document.__lcVisibilityCb;if(n&&typeof window.LiveChatWidget.off=="function")try{window.LiveChatWidget.off("visibility_changed",n)}catch(o){}const t=o=>{var a,s;const c=document.__lcStack;!c||!c.isConnected||(o&&typeof o.visibility=="string"&&(c.__lcVisibility=o.visibility),(a=document.__lcCurrentRebind)==null||a.call(document),(s=document.__lcCurrentSync)==null||s.call(document))};return window.LiveChatWidget.on("visibility_changed",t),document.__lcVisibilityCb=t,document.__lcVisibilityBound=!0,!0}function xe(e){if(Q(e)||document.__lcVisibilityPolling)return;document.__lcVisibilityPolling=!0;let n=0;const t=setInterval(()=>{(Q(e)||++n>=200)&&(clearInterval(t),document.__lcVisibilityPolling=!1)},200)}function Se(){document.__lcBodyMutationObs||typeof MutationObserver!="undefined"&&(document.__lcBodyMutationObs=new MutationObserver(e=>{const n=document.__lcStack;if(!!n)for(let t=0;t<e.length;t++){const l=e[t].removedNodes;if(!(!l||l.length===0))for(let o=0;o<l.length;o++){const c=l[o];if(c.nodeType===1&&(c===n||c.contains&&c.contains(n))){const a=document.__lcChannelWidgetsConfig;a&&Z(a);return}}}}),document.__lcBodyMutationObs.observe(document.body,{childList:!0,subtree:!0}))}let I=null,V=null;function Z(e){V=e,!I&&(I=setTimeout(()=>{I=null;const n=V;V=null,H(n)},100))}const Be=["#chat-widget-minimized","#chat-overlay-container"],Ee=15,J=100,Le=150;function Oe(e){return{width:e.width,height:e.height,fromLeft:e.left,fromRight:window.innerWidth-e.right,fromTop:e.top,fromBottom:window.innerHeight-e.bottom}}function ke(e){const n=e.fromLeft<=e.fromRight,t=e.fromTop<=e.fromBottom,l=n?e.fromLeft:window.innerWidth-e.fromRight-e.width,o=t?e.fromTop:window.innerHeight-e.fromBottom-e.height;return{left:l,top:o,right:l+e.width,bottom:o+e.height,width:e.width,height:e.height}}const k=60;function Ae(e){const n=window.innerWidth-e.right<=e.left,t=e.bottom,l=t-k,o=n?e.right:e.left+k;return{left:o-k,right:o,top:l,bottom:t,width:k,height:k}}const ze=200,Te=150;function K(e,n,{interval:t=ze,maxRetries:l=Te}={}){let o=0;const c=setInterval(()=>{const a=document.querySelector(e);if(a){clearInterval(c),n(a);return}++o>=l&&clearInterval(c)},t)}function We(){if(document.getElementById("lc-channel-widgets-style"))return;const e=document.createElement("style");e.id="lc-channel-widgets-style",e.textContent=`
1
+ var lcChannelWidgets=function(m){"use strict";var Qe=Object.defineProperty,Je=Object.defineProperties;var Ke=Object.getOwnPropertyDescriptors;var be=Object.getOwnPropertySymbols;var et=Object.prototype.hasOwnProperty,tt=Object.prototype.propertyIsEnumerable;var _e=(m,g,C)=>g in m?Qe(m,g,{enumerable:!0,configurable:!0,writable:!0,value:C}):m[g]=C,P=(m,g)=>{for(var C in g||(g={}))et.call(g,C)&&_e(m,C,g[C]);if(be)for(var C of be(g))tt.call(g,C)&&_e(m,C,g[C]);return m},we=(m,g)=>Je(m,Ke(g));const ye={whatsapp:{label:"WhatsApp",icon:'<?xml version="1.0" encoding="utf-8"?><svg xmlns="http://www.w3.org/2000/svg" shape-rendering="geometricPrecision" text-rendering="geometricPrecision" image-rendering="optimizeQuality" fill-rule="evenodd" clip-rule="evenodd" viewBox="0 0 509 511.514"><path fill="#fff" d="M434.762 74.334C387.553 26.81 323.245 0 256.236 0h-.768C115.795.001 2.121 113.696 2.121 253.456l.001.015a253.516 253.516 0 0033.942 126.671L0 511.514l134.373-35.269a253.416 253.416 0 00121.052 30.9h.003.053C395.472 507.145 509 393.616 509 253.626c0-67.225-26.742-131.727-74.252-179.237l.014-.055zM255.555 464.453c-37.753 0-74.861-10.22-107.293-29.479l-7.72-4.602-79.741 20.889 21.207-77.726-4.984-7.975c-21.147-33.606-32.415-72.584-32.415-112.308 0-116.371 94.372-210.743 210.741-210.743 56.011 0 109.758 22.307 149.277 61.98a210.93 210.93 0 0161.744 149.095c0 116.44-94.403 210.869-210.844 210.869h.028zm115.583-157.914c-6.363-3.202-37.474-18.472-43.243-20.593-5.769-2.121-10.01-3.202-14.315 3.203-4.305 6.404-16.373 20.593-20.063 24.855-3.69 4.263-7.401 4.815-13.679 1.612-6.278-3.202-26.786-9.883-50.899-31.472a192.748 192.748 0 01-35.411-43.867c-3.712-6.363-.404-9.777 2.82-12.873 3.224-3.096 6.363-7.381 9.48-11.092a41.58 41.58 0 006.357-10.597 11.678 11.678 0 00-.508-11.09c-1.718-3.18-14.444-34.357-19.534-47.06-5.09-12.703-10.37-10.603-14.272-10.901-3.902-.297-7.911-.19-12.089-.19a23.322 23.322 0 00-16.964 7.911c-5.707 6.298-22.1 21.673-22.1 52.849s22.671 61.249 25.852 65.532c3.182 4.284 44.663 68.227 108.288 95.649 15.099 6.489 26.891 10.392 36.053 13.403a87.504 87.504 0 0025.216 3.718c4.905 0 9.82-.416 14.65-1.237 12.174-1.782 37.453-15.291 42.776-30.073s5.303-27.57 3.711-30.093c-1.591-2.524-5.704-4.369-12.088-7.615l-.038.021z"/></svg>',backgroundColor:"#25D366",prefilledmessage:"Hi, I'd like to learn more.",mobile:{enabled:!1,url:"https://wa.me/{number}[?text={prefilledmessage}]"},desktop:{enabled:!1,url:"https://web.whatsapp.com/send?phone={number}[&text={prefilledmessage}]"}},sms:{label:"SMS",icon:'<?xml version="1.0" encoding="utf-8"?><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="#fff"><path d="M20 2H4c-1.1 0-1.99.9-1.99 2L2 22l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zM8 13H6v-2h2v2zm5 0h-2v-2h2v2zm5 0h-2v-2h2v2z"/></svg>',backgroundColor:"#3478F6",prefilledmessage:"Hi, I'd like to learn more.",mobile:{enabled:!1,url:"sms:{number}[?body={prefilledmessage}]"},desktop:{enabled:!1,url:"sms:{number}[?body={prefilledmessage}]"},popover:{title:"Text us \u2014 we're available 24/7",description:"US numbers only. Msg & carrier rates may apply. Reply STOP to opt out.",buttonLabel:"Start Conversation"}}},ve=new Set(["prefilledmessage"]);function Ce(e,t){return e.replace(/\[([^\]]*)\]/g,(i,o)=>{for(const[,s]of o.matchAll(/\{(\w+)\}/g)){const a=t[s];if(a==null||a==="")return""}return o}).replace(/\{(\w+)\}/g,(i,o)=>{const s=t[o];if(s==null)return"";const a=String(s);return ve.has(o)?encodeURIComponent(a):a})}const Q=e=>e&&typeof e.enabled=="boolean"?{enabled:e.enabled}:{},Se=e=>e===!0?!0:e&&typeof e=="object"?e.enabled===!0:!1,J={title:60,description:140,buttonLabel:24},xe=(e,t)=>{if(!e||e===!0||typeof e!="object")return{};const n={},i=o=>{if(typeof e[o]!="string")return;const s=J[o];if(s!=null&&e[o].length>s){console.warn(`[lc-channel-widgets] ${t} popover.${o} exceeds ${s} chars (got ${e[o].length}); using registry default`);return}n[o]=e[o]};return Object.keys(J).forEach(i),n};function Be(e,t){if(!e||typeof e.type!="string")return null;const n=ye[e.type];if(!n)return null;const i=n[t]||{},o=we(P({},e),{prefilledmessage:typeof e.prefilledmessage=="string"?e.prefilledmessage:n.prefilledmessage||""});return{type:e.type,label:n.label,icon:n.icon,backgroundColor:n.backgroundColor,mobile:P(P({},n.mobile),Q(e.mobile)),desktop:P(P({},n.desktop),Q(e.desktop)),popover:n.popover&&Se(e.popover)?P(P({},n.popover),xe(e.popover,e.type)):void 0,href:i.url?Ce(i.url,o):""}}const Ee="screen and (max-width: 992px) and (pointer: coarse)",Le=()=>window.matchMedia(Ee).matches?"mobile":"desktop",_=[];function K(){for(let e=_.length-1;e>=0;e--){const t=_[e];t&&t.parentNode&&t.parentNode.removeChild(t),_.splice(e,1)}}let ee=!1;function Oe(){ee||(ee=!0,document.addEventListener("click",e=>{for(let t=0;t<_.length;t++){const n=_[t];n.__isOpen&&!n.contains(e.target)&&W(n)}}))}function ze(){if(window.__lcHistoryPatched)return;window.__lcHistoryPatched=!0,window.__lcLastUrl=window.__lcLastUrl||location.href;const e=i=>{const o=window.__lcLastUrl,s=location.href,a=o!==s;window.__lcLastUrl=s,!(!a&&i!=="popstate")&&window.dispatchEvent(new Event("lc:locationchange"))},t=history.pushState;typeof t=="function"&&(history.pushState=function(...i){const o=t.apply(this,i);return e("pushState"),o});const n=history.replaceState;typeof n=="function"&&(history.replaceState=function(...i){const o=n.apply(this,i);return e("replaceState"),o}),window.addEventListener("popstate",()=>e("popstate")),window.addEventListener("hashchange",()=>e("hashchange"))}function te(e){var i;if(document.__lcVisibilityBound&&!e)return!0;if(typeof((i=window.LiveChatWidget)==null?void 0:i.on)!="function")return!1;const t=document.__lcVisibilityCb;if(t&&typeof window.LiveChatWidget.off=="function")try{window.LiveChatWidget.off("visibility_changed",t)}catch(o){}const n=o=>{var a,c;const s=document.__lcStack;!s||!s.isConnected||(o&&typeof o.visibility=="string"&&(s.__lcVisibility=o.visibility),(a=document.__lcCurrentRebind)==null||a.call(document),(c=document.__lcCurrentSync)==null||c.call(document))};return window.LiveChatWidget.on("visibility_changed",n),document.__lcVisibilityCb=n,document.__lcVisibilityBound=!0,!0}function ke(e){if(te(e)||document.__lcVisibilityPolling)return;document.__lcVisibilityPolling=!0;let t=0;const n=setInterval(()=>{(te(e)||++t>=200)&&(clearInterval(n),document.__lcVisibilityPolling=!1)},200)}function Ae(){document.__lcBodyMutationObs||typeof MutationObserver!="undefined"&&(document.__lcBodyMutationObs=new MutationObserver(e=>{const t=document.__lcStack;if(!!t)for(let n=0;n<e.length;n++){const i=e[n].removedNodes;if(!(!i||i.length===0))for(let o=0;o<i.length;o++){const s=i[o];if(s.nodeType===1&&(s===t||s.contains&&s.contains(t))){const a=document.__lcChannelWidgetsConfig;a&&ne(a);return}}}}),document.__lcBodyMutationObs.observe(document.body,{childList:!0,subtree:!0}))}let F=null,j=null;function ne(e){j=e,!F&&(F=setTimeout(()=>{F=null;const t=j;j=null,Y(t)},100))}const ie="#chat-widget-minimized",oe="#chat-overlay-container",Pe="#chat-overlay-button",Te=[ie,oe],Re=15,re=100,We=150;function Ie(e){return{width:e.width,height:e.height,fromLeft:e.left,fromRight:window.innerWidth-e.right,fromTop:e.top,fromBottom:window.innerHeight-e.bottom}}function Me(e){const t=e.fromLeft<=e.fromRight,n=e.fromTop<=e.fromBottom,i=t?e.fromLeft:window.innerWidth-e.fromRight-e.width,o=n?e.fromTop:window.innerHeight-e.fromBottom-e.height;return{left:i,top:o,right:i+e.width,bottom:o+e.height,width:e.width,height:e.height}}const V=60;function Ve(e){const t=window.innerWidth-e.right<=e.left,n=e.bottom,i=n-V,o=t?e.right:e.left+V;return{left:o-V,right:o,top:i,bottom:n,width:V,height:V}}const He=200,Ne=150;function N(e,t,{interval:n=He,maxRetries:i=Ne}={}){let o=0;const s=setInterval(()=>{const a=document.querySelector(e);if(a){clearInterval(s),t(a);return}++o>=i&&clearInterval(s)},n)}function le(){if(document.getElementById("lc-channel-widgets-style"))return;const e=document.createElement("style");e.id="lc-channel-widgets-style",e.textContent=`
2
2
  .lc-channel-stack {
3
3
  position: fixed;
4
4
  top: 0;
@@ -31,12 +31,23 @@ var lcChannelWidgets=function(m){"use strict";var Fe=Object.defineProperty,je=Ob
31
31
  transition: transform 220ms cubic-bezier(0.22, 0.61, 0.36, 1),
32
32
  opacity 120ms ease-out;
33
33
  }
34
- /* Mobile = vertical column below the bubble. Desktop = horizontal row
35
- next to the chat button. Exact transform (left- vs right-of-button)
36
- is set inline by syncPosition. */
34
+ /* Both mobile (in-LC) and desktop (body-mounted) lay out as a row.
35
+ Exact placement on desktop is set inline by syncPosition; on mobile
36
+ it's set via static left/right by injectChannelStackInContainer. */
37
37
  .lc-channel-stack--horizontal {
38
38
  flex-direction: row;
39
39
  }
40
+ /* In-LC mount (mobile). Absolute child of LC's container, so movement
41
+ is inherited in the same paint frame \u2014 no JS positioning, no
42
+ scroll listeners, no transitions on movement. top/left/right are
43
+ set inline by injectChannelStackInContainer. */
44
+ .lc-channel-stack--in-lc {
45
+ position: absolute;
46
+ transform: none;
47
+ will-change: auto;
48
+ transition: none;
49
+ opacity: 1;
50
+ }
40
51
 
41
52
  .lc-channel-button {
42
53
  cursor: pointer;
@@ -131,4 +142,4 @@ var lcChannelWidgets=function(m){"use strict";var Fe=Object.defineProperty,je=Ob
131
142
  top: -6px;
132
143
  box-shadow: -3px -3px 6px rgba(0, 0, 0, 0.06);
133
144
  }
134
- `,document.head.appendChild(e)}function Pe(e,n){if(typeof e!="string"||e.length===0)return null;if(/^(data:|https?:\/\/)/.test(e)){const o=document.createElement("img");return o.className="lc-channel-icon",o.alt=n||"",o.src=e,o}const t=document.createElement("span");t.className="lc-channel-icon",t.setAttribute("aria-hidden","true"),t.innerHTML=e;const l=t.querySelector("svg");return l&&(l.setAttribute("width","100%"),l.setAttribute("height","100%"),l.style.display="block"),t}function Me(e,n,t){const a=e.left+e.width/2;let s=e.top-t-12,A="bottom";s<8&&(s=e.bottom+12,A="top"),s+t>window.innerHeight-8&&(s=window.innerHeight-t-8),s<8&&(s=8);let S=a-n/2;S<8&&(S=8),S+n>window.innerWidth-8&&(S=window.innerWidth-n-8);const r=18,z=Math.max(r,n-18),N=Math.max(r,Math.min(z,a-S));return{tx:S,ty:s,arrowSide:A,arrowOffset:N}}function ee(e,n,t){e.__appliedArrowSide!==n&&(e.classList.remove("lc-channel-popover--arrow-top","lc-channel-popover--arrow-bottom"),e.classList.add(`lc-channel-popover--arrow-${n}`),e.__appliedArrowSide=n),e.__arrowEl.style.left=`${t-6}px`}function O(e){e.__isOpen=!1,e.style.opacity="0",e.style.pointerEvents="none",requestAnimationFrame(()=>{e.setAttribute("aria-hidden","true")})}function Re(e){C.forEach(n=>{n!==e&&n.__isOpen&&O(n)}),e.__cachedTransform&&(e.style.transform=e.__cachedTransform),e.__arrowSide&&e.__arrowEl&&ee(e,e.__arrowSide,e.__arrowOffset),e.style.opacity="1",e.style.pointerEvents="auto",requestAnimationFrame(()=>{e.removeAttribute("aria-hidden")}),e.__isOpen=!0}function Ie(e){const n=e.popover,t=document.createElement("div");if(t.className="lc-channel-popover",t.setAttribute("data-popover-channel-id",e.type),n.title){const s=document.createElement("h3");s.className="lc-channel-popover-title",s.textContent=n.title,t.appendChild(s)}if(n.description){const s=document.createElement("p");s.className="lc-channel-popover-description",s.textContent=n.description,t.appendChild(s)}const l=document.createElement("button");l.type="button",l.className="lc-channel-popover-button",l.textContent=n.buttonLabel||"Start Conversation",l.style.backgroundColor=e.backgroundColor||"#1a1a1a",l.onclick=s=>{s.stopPropagation(),typeof e.href=="string"&&e.href.length>0&&window.open(e.href,"_blank","noopener,noreferrer"),O(t)},t.appendChild(l);const o=document.createElement("button");o.type="button",o.className="lc-channel-popover-close",o.setAttribute("aria-label","Close"),o.textContent="\xD7",o.onclick=s=>{s.stopPropagation(),O(t)},t.appendChild(o);const c=document.createElement("div");c.className="lc-channel-popover-arrow",t.appendChild(c),t.__arrowEl=c,t.__isOpen=!1,t.style.opacity="0",t.style.pointerEvents="none",t.setAttribute("aria-hidden","true"),t.style.transform="translate3d(0,0,0)",document.body.appendChild(t);const a=t.getBoundingClientRect();return t.__cachedWidth=a.width>0?a.width:280,t.__cachedHeight=a.height,C.push(t),ve(),t}function Ve(e){const n=document.createElement("div");n.className="lc-channel-button",n.setAttribute("data-channel-id",e.type),e.label&&n.setAttribute("aria-label",e.label),e.backgroundColor&&(n.style.backgroundColor=e.backgroundColor);const t=e.popover?Ie(e):null;n.__popoverEl=t,n.onclick=o=>{if(t){o.stopPropagation(),t.__isOpen?O(t):Re(t);return}typeof e.href=="string"&&e.href.length>0&&window.open(e.href,"_blank","noopener,noreferrer")};const l=Pe(e.icon,e.label||e.type);return l&&n.appendChild(l),n}function He(e,n){const t=e==null?void 0:e[n];return t&&typeof t.enabled=="boolean"?t.enabled:n==="mobile"}function Ne(e){var W,ne,oe;const{deviceType:n,chatWidgetSelector:t,channels:l,bubbleSelector:o}=e,c=e[n];if(!document.querySelector(t))return;const s=()=>document.querySelector(t),A=[];l.forEach(i=>{const u=_e(i,n);if(!u){console.warn("[lc-channel-widgets] unknown or invalid channel \u2014 skipping:",i);return}A.push(u)});const S=A.filter(i=>He(i,n));if(S.length===0)return;We();let r=document.body.querySelector(":scope > .lc-channel-stack");if(!r){X(),r=document.createElement("div");const i=n==="mobile"?"vertical":"horizontal";r.className=`lc-channel-stack lc-channel-stack--${i}`,r.style.gap=c.gap,r.setAttribute("role","group"),r.setAttribute("aria-label","Contact channels"),document.body.appendChild(r)}document.__lcStack=r,S.forEach(i=>{r.querySelector(`[data-channel-id="${CSS.escape(i.type)}"]`)||r.appendChild(Ve(i))});const z=parseInt(c.gapBelow,10)||8,N=()=>{const i=s();for(let u=0;u<o.length;u++){const f=o[u],b=i&&i.querySelector(f)||document.querySelector(f);if(!b)continue;const _=b.getBoundingClientRect();if(_.width>0&&_.height>0)return _}return null},De=()=>{const i=s(),u=[];for(let f=0;f<o.length;f++){const b=o[f],_=i?i.querySelector(b):null,T=document.querySelector(b);_&&u.indexOf(_)===-1&&u.push(_),T&&T!==_&&u.indexOf(T)===-1&&u.push(T)}return i&&u.indexOf(i)===-1&&u.push(i),u};let te="minimized";try{const i=(oe=(ne=(W=window.LiveChatWidget)==null?void 0:W.get)==null?void 0:ne.call(W,"state"))==null?void 0:oe.visibility;typeof i=="string"&&(te=i)}catch(i){}r.__lcVisibility=te;const D=()=>{const i=N();i&&r.__lcVisibility==="minimized"&&i.width<=J&&i.height<=J&&window.innerHeight-i.bottom<=Le&&(document.__lcBubbleAnchor=Oe(i));let u=null,f=null;if(r.__lcVisibility==="minimized")i&&(u=i,f=i);else if(r.__lcVisibility==="maximized"&&n!=="mobile"){const d=s();if(d){const h=d.getBoundingClientRect();h.width>0&&h.height>0&&(u=h,f=document.__lcBubbleAnchor?ke(document.__lcBubbleAnchor):Ae(h))}}if(!u||!f){for(let d=0;d<C.length;d++)C[d].__isOpen&&O(C[d]);r.style.display="none";return}r.style.display="flex";const b=f,_=Math.max(b.width,b.height),P=Math.min(_,n==="mobile"?60:40),Ue=Math.round(P*.5),ie=r.__lcLastButtonSize!==P;ie&&(r.style.setProperty("--lc-channel-size",`${P}px`),r.style.setProperty("--lc-channel-icon-size",`${Ue}px`),r.__lcCachedDims=null,r.__lcLastButtonSize=P);const w=8,re=r.children.length,le=r.__lcLastButtonCount!==re;le&&(r.__lcCachedDims=null);const B=r.__lcCachedDims||r.getBoundingClientRect();r.__lcCachedDims=B,r.__lcLastButtonCount=re;let M,R;if(n==="mobile"){const d=f,h=Math.min(d.height,d.width,80);let x=d.left<window.innerWidth-d.right?d.left+h/2:d.right-h/2;const p=B.width/2;x-p<w&&(x=p+w),x+p>window.innerWidth-w&&(x=window.innerWidth-p-w),M=x-B.width/2,R=d.bottom+z-Ee}else{const d=u.left+u.width/2<window.innerWidth/2,h=B.height/2;let E=f.top+f.height/2;E-h<w&&(E=h+w),E+h>window.innerHeight-w&&(E=window.innerHeight-h-w);const x=-h;let p,y;d?(p=u.right+z,p+B.width>window.innerWidth-w&&(p=window.innerWidth-B.width-w),y=0):(p=u.left-z,p-B.width<w&&(p=B.width+w),y=-B.width),M=p+y,R=E+x}const F=`translate(${M}px, ${R}px)`;!(F!==r.__lcLastTransform)&&!ie&&!le||(r.style.transform=F,r.__lcLastTransform=F,r.__lcTransitionActivated||requestAnimationFrame(()=>{r.classList.add("lc-stack-ready"),r.__lcTransitionActivated=!0}),r.querySelectorAll(".lc-channel-button").forEach(d=>{const h=M+d.offsetLeft,E=R+d.offsetTop,x=d.offsetWidth,p=d.offsetHeight;if(d.__cachedRect={left:h,top:E,right:h+x,bottom:E+p,width:x,height:p},d.__popoverEl){const y=d.__popoverEl,{tx:qe,ty:$e,arrowSide:ce,arrowOffset:se}=Me(d.__cachedRect,y.__cachedWidth,y.__cachedHeight),ae=`translate3d(${qe}px,${$e}px,0)`;y.__cachedTransform=ae,y.__arrowSide=ce,y.__arrowOffset=se,y.__isOpen&&(y.style.transform=ae,ee(y,ce,se))}}))};let U=0;const q=()=>{U||(U=requestAnimationFrame(()=>{U=0,D()}))};D(),document.__lcCurrentSync=q,document.__lcWindowListenersBound||(window.addEventListener("resize",()=>{var i;return(i=document.__lcCurrentSync)==null?void 0:i.call(document)}),window.addEventListener("orientationchange",()=>{var i;document.__lcBubbleAnchor=null,(i=document.__lcCurrentSync)==null||i.call(document)}),window.visualViewport&&(window.visualViewport.addEventListener("resize",()=>{var i;return(i=document.__lcCurrentSync)==null?void 0:i.call(document)}),window.visualViewport.addEventListener("scroll",()=>{var i;return(i=document.__lcCurrentSync)==null?void 0:i.call(document)})),window.addEventListener("scroll",()=>{var i;return(i=document.__lcCurrentSync)==null?void 0:i.call(document)},!0),document.__lcWindowListenersBound=!0),typeof ResizeObserver!="undefined"&&!r.__lcResizeObserved&&(new ResizeObserver(q).observe(r),r.__lcResizeObserved=!0);const $=()=>{const i=De();if(i.length===0)return;const u=r.__lcObservedBubbles||[];i.length===u.length&&i.every((b,_)=>b===u[_])||(r.__lcBubbleObserver&&r.__lcBubbleObserver.disconnect(),r.__lcObservedBubbles=i,typeof ResizeObserver!="undefined"&&(r.__lcBubbleObserver=new ResizeObserver(q),i.forEach(b=>r.__lcBubbleObserver.observe(b))))};$(),(!r.__lcObservedBubbles||r.__lcObservedBubbles.length===0)&&o.forEach(i=>{K(i,()=>{$(),D()})}),document.__lcCurrentRebind=$,document.__lcVisibilityBound=!1,xe(!0)}function H(e={}){const n=e.channelWidgetsConfig||{},t={gap:"8px",gapBelow:"8px"},l={gap:"8px",gapBelow:"8px"},o={chatWidgetSelector:n.chatWidgetSelector||"#chat-widget-container",bubbleSelector:Be,channels:Array.isArray(n.channels)?n.channels:[],mobile:Object.assign({},t,n.mobile),desktop:Object.assign({},l,n.desktop)},c=ye();if(o.deviceType=c,o.channels.length===0)return;document.__lcChannelWidgetsConfig=e,K(o.chatWidgetSelector,()=>{Ne(o),Se()});const a=()=>{document.__lcBubbleAnchor=null,document.__lcVisibilityBound=!1,X();const s=document.__lcChannelWidgetsConfig;s&&Z(s)};document.__lcChannelWidgetsSpaBound||(Ce(),window.addEventListener("lc:locationchange",a),document.__lcChannelWidgetsSpaBound=!0),document.__lcChannelWidgetsTurbolinksBound||(document.addEventListener("turbolinks:load",a),document.__lcChannelWidgetsTurbolinksBound=!0)}return window.commversion=window.commversion||{},window.LiveChatWidget.on("ready",()=>H(window.commversion)),m.lcAddChannelWidgets=H,Object.defineProperties(m,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}}),m}({});
145
+ `,document.head.appendChild(e)}function $e(e,t){if(typeof e!="string"||e.length===0)return null;if(/^(data:|https?:\/\/)/.test(e)){const o=document.createElement("img");return o.className="lc-channel-icon",o.alt=t||"",o.src=e,o}const n=document.createElement("span");n.className="lc-channel-icon",n.setAttribute("aria-hidden","true"),n.innerHTML=e;const i=n.querySelector("svg");return i&&(i.setAttribute("width","100%"),i.setAttribute("height","100%"),i.style.display="block"),n}function se(e,t,n){const a=e.left+e.width/2;let c=e.top-n-12,O="bottom";c<8&&(c=e.bottom+12,O="top"),c+n>window.innerHeight-8&&(c=window.innerHeight-n-8),c<8&&(c=8);let r=a-t/2;r<8&&(r=8),r+t>window.innerWidth-8&&(r=window.innerWidth-t-8);const B=18,I=Math.max(B,t-18),T=Math.max(B,Math.min(I,a-r));return{tx:r,ty:c,arrowSide:O,arrowOffset:T}}function G(e,t,n){e.__appliedArrowSide!==t&&(e.classList.remove("lc-channel-popover--arrow-top","lc-channel-popover--arrow-bottom"),e.classList.add(`lc-channel-popover--arrow-${t}`),e.__appliedArrowSide=t),e.__arrowEl.style.left=`${n-6}px`}function ce(e){const t=e.getBoundingClientRect(),n=t.width>0?t.width:e.__cachedWidth,i=t.height>0?t.height:e.__cachedHeight,o=e.__trigger.getBoundingClientRect(),s=se(o,n,i);e.style.transform=`translate3d(${s.tx}px,${s.ty}px,0)`,G(e,s.arrowSide,s.arrowOffset)}function W(e){e.__isOpen=!1,e.style.opacity="0",e.style.pointerEvents="none",requestAnimationFrame(()=>{e.setAttribute("aria-hidden","true")})}function qe(e){_.forEach(t=>{t!==e&&t.__isOpen&&W(t)}),e.__cachedTransform?(e.style.transform=e.__cachedTransform,e.__arrowSide&&e.__arrowEl&&G(e,e.__arrowSide,e.__arrowOffset)):e.__trigger&&ce(e),e.style.opacity="1",e.style.pointerEvents="auto",requestAnimationFrame(()=>{e.removeAttribute("aria-hidden")}),e.__isOpen=!0}function Ue(e){const t=e.popover,n=document.createElement("div");if(n.className="lc-channel-popover",n.setAttribute("data-popover-channel-id",e.type),t.title){const c=document.createElement("h3");c.className="lc-channel-popover-title",c.textContent=t.title,n.appendChild(c)}if(t.description){const c=document.createElement("p");c.className="lc-channel-popover-description",c.textContent=t.description,n.appendChild(c)}const i=document.createElement("button");i.type="button",i.className="lc-channel-popover-button",i.textContent=t.buttonLabel||"Start Conversation",i.style.backgroundColor=e.backgroundColor||"#1a1a1a",i.onclick=c=>{c.stopPropagation(),typeof e.href=="string"&&e.href.length>0&&window.open(e.href,"_blank","noopener,noreferrer"),W(n)},n.appendChild(i);const o=document.createElement("button");o.type="button",o.className="lc-channel-popover-close",o.setAttribute("aria-label","Close"),o.textContent="\xD7",o.onclick=c=>{c.stopPropagation(),W(n)},n.appendChild(o);const s=document.createElement("div");s.className="lc-channel-popover-arrow",n.appendChild(s),n.__arrowEl=s,n.__isOpen=!1,n.style.opacity="0",n.style.pointerEvents="none",n.setAttribute("aria-hidden","true"),n.style.transform="translate3d(0,0,0)",document.body.appendChild(n);const a=n.getBoundingClientRect();return n.__cachedWidth=a.width>0?a.width:280,n.__cachedHeight=a.height,_.push(n),Oe(),n}function ae(e){const t=document.createElement("div");t.className="lc-channel-button",t.setAttribute("data-channel-id",e.type),e.label&&t.setAttribute("aria-label",e.label),e.backgroundColor&&(t.style.backgroundColor=e.backgroundColor);const n=e.popover?Ue(e):null;t.__popoverEl=n,n&&(n.__trigger=t),t.onclick=o=>{if(n){o.stopPropagation(),n.__isOpen?W(n):qe(n);return}typeof e.href=="string"&&e.href.length>0&&window.open(e.href,"_blank","noopener,noreferrer")};const i=$e(e.icon,e.label||e.type);return i&&t.appendChild(i),t}function De(e,t){const n=e==null?void 0:e[t];return n&&typeof n.enabled=="boolean"?n.enabled:t==="mobile"}function X(e,t){const n=Math.max(e.width,e.height),i=Math.min(n,t),o=Math.round(i*.5);return{measured:n,buttonSize:i,iconSize:o}}function de(e,t){const n=[];return e.forEach(i=>{const o=Be(i,t);if(!o){console.warn("[lc-channel-widgets] unknown or invalid channel \u2014 skipping:",i);return}De(o,t)&&n.push(o)}),n}function Fe(e){var A,$,q;const{deviceType:t,chatWidgetSelector:n,channels:i,bubbleSelector:o}=e,s=e[t];if(!document.querySelector(n))return;const c=()=>document.querySelector(n),O=de(i,t);if(O.length===0)return;le();let r=document.body.querySelector(":scope > .lc-channel-stack");r||(K(),r=document.createElement("div"),r.className="lc-channel-stack lc-channel-stack--horizontal",r.style.gap=s.gap,r.setAttribute("role","group"),r.setAttribute("aria-label","Contact channels"),document.body.appendChild(r)),document.__lcStack=r,O.forEach(l=>{r.querySelector(`[data-channel-id="${CSS.escape(l.type)}"]`)||r.appendChild(ae(l))});const B=parseInt(s.gapBelow,10)||8,I=()=>{const l=c();for(let u=0;u<o.length;u++){const h=o[u],b=l&&l.querySelector(h)||document.querySelector(h);if(!b)continue;const w=b.getBoundingClientRect();if(w.width>0&&w.height>0)return w}return null},T=()=>{const l=c(),u=[];for(let h=0;h<o.length;h++){const b=o[h],w=l?l.querySelector(b):null,R=document.querySelector(b);w&&u.indexOf(w)===-1&&u.push(w),R&&R!==w&&u.indexOf(R)===-1&&u.push(R)}return l&&u.indexOf(l)===-1&&u.push(l),u};let H="minimized";try{const l=(q=($=(A=window.LiveChatWidget)==null?void 0:A.get)==null?void 0:$.call(A,"state"))==null?void 0:q.visibility;typeof l=="string"&&(H=l)}catch(l){}r.__lcVisibility=H;const M=()=>{const l=I();l&&r.__lcVisibility==="minimized"&&l.width<=re&&l.height<=re&&window.innerHeight-l.bottom<=We&&(document.__lcBubbleAnchor=Ie(l));let u=null,h=null;if(r.__lcVisibility==="minimized")l&&(u=l,h=l);else if(r.__lcVisibility==="maximized"&&t!=="mobile"){const d=c();if(d){const p=d.getBoundingClientRect();p.width>0&&p.height>0&&(u=p,h=document.__lcBubbleAnchor?Me(document.__lcBubbleAnchor):Ve(p))}}if(!u||!h){for(let d=0;d<_.length;d++)_[d].__isOpen&&W(_[d]);r.style.display="none";return}r.style.display="flex";const{buttonSize:b,iconSize:w}=X(h,t==="mobile"?60:40),R=r.__lcLastButtonSize!==b;R&&(r.style.setProperty("--lc-channel-size",`${b}px`),r.style.setProperty("--lc-channel-icon-size",`${w}px`),r.__lcCachedDims=null,r.__lcLastButtonSize=b);const y=8,pe=r.children.length,he=r.__lcLastButtonCount!==pe;he&&(r.__lcCachedDims=null);const E=r.__lcCachedDims||r.getBoundingClientRect();r.__lcCachedDims=E,r.__lcLastButtonCount=pe;let U,D;if(t==="mobile"){const d=h,p=Math.min(d.height,d.width,80);let x=d.left<window.innerWidth-d.right?d.left+p/2:d.right-p/2;const f=E.width/2;x-f<y&&(x=f+y),x+f>window.innerWidth-y&&(x=window.innerWidth-f-y),U=x-E.width/2,D=d.bottom+B-Re}else{const d=u.left+u.width/2<window.innerWidth/2,p=E.height/2;let L=h.top+h.height/2;L-p<y&&(L=p+y),L+p>window.innerHeight-y&&(L=window.innerHeight-p-y);const x=-p;let f,v;d?(f=u.right+B,f+E.width>window.innerWidth-y&&(f=window.innerWidth-E.width-y),v=0):(f=u.left-B,f-E.width<y&&(f=E.width+y),v=-E.width),U=f+v,D=L+x}const Z=`translate(${U}px, ${D}px)`;!(Z!==r.__lcLastTransform)&&!R&&!he||(r.style.transform=Z,r.__lcLastTransform=Z,r.__lcTransitionActivated||requestAnimationFrame(()=>{r.classList.add("lc-stack-ready"),r.__lcTransitionActivated=!0}),r.querySelectorAll(".lc-channel-button").forEach(d=>{const p=U+d.offsetLeft,L=D+d.offsetTop,x=d.offsetWidth,f=d.offsetHeight;if(d.__cachedRect={left:p,top:L,right:p+x,bottom:L+f,width:x,height:f},d.__popoverEl){const v=d.__popoverEl,{tx:Ye,ty:Ze,arrowSide:fe,arrowOffset:me}=se(d.__cachedRect,v.__cachedWidth,v.__cachedHeight),ge=`translate3d(${Ye}px,${Ze}px,0)`;v.__cachedTransform=ge,v.__arrowSide=fe,v.__arrowOffset=me,v.__isOpen&&(v.style.transform=ge,G(v,fe,me))}}))};let S=0;const z=()=>{S||(S=requestAnimationFrame(()=>{S=0,M()}))};M(),document.__lcCurrentSync=z,document.__lcWindowListenersBound||(window.addEventListener("resize",()=>{var l;return(l=document.__lcCurrentSync)==null?void 0:l.call(document)}),window.addEventListener("orientationchange",()=>{var l;document.__lcBubbleAnchor=null,(l=document.__lcCurrentSync)==null||l.call(document)}),window.visualViewport&&(window.visualViewport.addEventListener("resize",()=>{var l;return(l=document.__lcCurrentSync)==null?void 0:l.call(document)}),window.visualViewport.addEventListener("scroll",()=>{var l;return(l=document.__lcCurrentSync)==null?void 0:l.call(document)})),window.addEventListener("scroll",()=>{var l;return(l=document.__lcCurrentSync)==null?void 0:l.call(document)},!0),document.__lcWindowListenersBound=!0),typeof ResizeObserver!="undefined"&&!r.__lcResizeObserved&&(new ResizeObserver(z).observe(r),r.__lcResizeObserved=!0);const k=()=>{const l=T();if(l.length===0)return;const u=r.__lcObservedBubbles||[];l.length===u.length&&l.every((b,w)=>b===u[w])||(r.__lcBubbleObserver&&r.__lcBubbleObserver.disconnect(),r.__lcObservedBubbles=l,typeof ResizeObserver!="undefined"&&(r.__lcBubbleObserver=new ResizeObserver(z),l.forEach(b=>r.__lcBubbleObserver.observe(b))))};k(),(!r.__lcObservedBubbles||r.__lcObservedBubbles.length===0)&&o.forEach(l=>{N(l,()=>{k(),M()})}),document.__lcCurrentRebind=k,document.__lcVisibilityBound=!1,ke(!0)}function je(e){if(e.style.right&&e.style.right!=="auto")return"right";if(e.style.left&&e.style.left!=="auto")return"left";const t=window.getComputedStyle(e);return t.right!=="auto"?"right":t.left!=="auto"?"left":"right"}function Ge(){document.__lcPopoverVvBound||!window.visualViewport||(document.__lcPopoverVvBound=!0,window.visualViewport.addEventListener("resize",()=>{for(let e=0;e<_.length;e++){const t=_[e];t.__isOpen&&t.__trigger&&ce(t)}}))}function ue(e,t,n){if(!e||e.querySelector(":scope > .lc-channel-stack--in-lc"))return;e.style.overflow="unset";const i=document.createElement("div");i.className="lc-channel-stack lc-channel-stack--horizontal lc-channel-stack--in-lc",i.setAttribute("role","group"),i.setAttribute("aria-label","Contact channels"),i.style.gap=n.mobile.gap;const o=je(e),s=parseInt(n.mobile.gapBelow,10),a=Number.isFinite(s)?s:0,c=parseInt(n.mobile.gapSide,10),O=Number.isFinite(c)?c:8;if(o==="left"?(i.style.left=`${O}px`,i.style.right="auto"):(i.style.right=`${O}px`,i.style.left="auto"),t.forEach(S=>{i.appendChild(ae(S))}),e.appendChild(i),typeof ResizeObserver=="undefined")return;const r=()=>e.querySelector(ie)||e.querySelector(Pe),B=S=>{i.style.marginTop="";const z=()=>{const k=S.getBoundingClientRect(),{measured:A,buttonSize:$,iconSize:q}=X(k,60);if(A===0){i.style.display="none";return}i.style.display="flex",i.style.setProperty("--lc-channel-size",`${$}px`),i.style.setProperty("--lc-channel-icon-size",`${q}px`);const l=e.getBoundingClientRect();i.style.top=`${k.bottom-l.top+a}px`};z(),new ResizeObserver(z).observe(S)},I=r();if(I){B(I);return}i.style.top="100%",i.style.marginTop=`${a}px`;let T=!1;const H=()=>{if(T)return;const S=r();if(S){T=!0,M.disconnect(),B(S);return}const{measured:z,buttonSize:k,iconSize:A}=X(e.getBoundingClientRect(),60);z!==0&&(i.style.setProperty("--lc-channel-size",`${k}px`),i.style.setProperty("--lc-channel-icon-size",`${A}px`))},M=new ResizeObserver(H);H(),T||M.observe(e)}function Xe(e){const t=de(e.channels,"mobile");t.length!==0&&(le(),Ge(),N(e.chatWidgetSelector,n=>{ue(n,t,e),N(oe,i=>ue(i,t,e),{interval:200,maxRetries:15})}))}function Y(e={}){const t=e.channelWidgetsConfig||{},n={gap:"4px",gapBelow:"0px",gapSide:"8px"},i={gap:"8px",gapBelow:"8px"},o={chatWidgetSelector:t.chatWidgetSelector||"#chat-widget-container",bubbleSelector:Te,channels:Array.isArray(t.channels)?t.channels:[],mobile:Object.assign({},n,t.mobile),desktop:Object.assign({},i,t.desktop)},s=Le();if(o.deviceType=s,o.channels.length===0)return;document.__lcChannelWidgetsConfig=e,s==="mobile"?Xe(o):N(o.chatWidgetSelector,()=>{Fe(o),Ae()});const a=()=>{document.__lcBubbleAnchor=null,document.__lcVisibilityBound=!1,K();const c=document.__lcChannelWidgetsConfig;c&&ne(c)};document.__lcChannelWidgetsSpaBound||(ze(),window.addEventListener("lc:locationchange",a),document.__lcChannelWidgetsSpaBound=!0),document.__lcChannelWidgetsTurbolinksBound||(document.addEventListener("turbolinks:load",a),document.__lcChannelWidgetsTurbolinksBound=!0)}return window.commversion=window.commversion||{},window.LiveChatWidget.on("ready",()=>Y(window.commversion)),m.lcAddChannelWidgets=Y,Object.defineProperties(m,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}}),m}({});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@commversion/libs",
3
- "version": "0.18.1",
3
+ "version": "0.18.2",
4
4
  "author": "Commversion",
5
5
  "license": "UNLICENSED",
6
6
  "scripts": {