!function(){let e=document.createElement("div");e.style.width="0px",e.style.height="0px",e.style.opacity="0",e.style.visibility="hidden",e.style.overflow="hidden",e.id="iframe-container",document.body.appendChild(e);let t=document.createElement("iframe");t.id="iframe-widget",t.src="javascript:void(0)",t.allow="autoplay",t.frameBorder="no",document.getElementById("iframe-container").appendChild(t);var n=null,i=null;if(document.currentScript){var a=document.currentScript.src.match(/(https?:\/\/.*?)\/.*id=(.*)\b/);n=a[1],i=a[2]}else try{throw new Error}catch(e){a=e.stack.match(/at (https?:\/\/.*?)\/.*id=(.*?):.*/),n=a[1],i=a[2]}window.onload=function(){Promise.all([fetch(n+"/site/iframe-bundle?id="+i,{method:"get",headers:{"Content-Type":"application/javascript"}}).then((e=>e.text())),fetch(n+"/site/chat-settings?id="+i,{method:"get",headers:{"Content-Type":"application/json"}}).then((e=>e.text()))]).then((e=>{if(e[0]&&e[1]){let i=e[0],a=e[1],c=document.createElement("script");c.innerHTML=i.replace("@@MAIN_URL@@",n).replace("@@MAIN_STYLES@@",a.replace(/"/g,'\\"')),t.contentWindow.document.head.appendChild(c)}})).finally((()=>{})).catch((e=>{}))}}();