1import{a as e}from"./rolldown-runtime-B0Z9INg1.js";import{t}from"./react-BQVaxoBa.js";import{t as n}from"./jsx-runtime-Brbx3b_0.js";import{C as r}from"./AppSetting-DDJKMSqZ.js";var i=e(t()),a=3e3;function o(){let e=(0,i.useRef)(0);return{handleRetry:t=>{e.current=e.current<=2?e.current+1:e.current,setTimeout(t,a*e.current)}}}var s=async()=>r().get(`/public/cms/live-chat/active/`),c=n(),l=new Set,u=new Set,d={className:`class`,htmlFor:`for`,crossOrigin:`crossorigin`,referrerPolicy:`referrerpolicy`,noModule:`nomodule`},f=(e,t)=>{for(let[r,i]of Object.entries(t)){var n;if(i==null||i===!1||r===`children`||typeof i==`function`)continue;let t=(n=d[r])==null?r.toLowerCase():n;e.setAttribute(t,i===!0?``:String(i))}};function p({strategy:e=`afterInteractive`,onLoad:t,onReady:n,onError:r,dangerouslySetInnerHTML:a,src:o,children:s,...d}){var p;let m=(0,i.useRef)({onLoad:t,onReady:n,onError:r});m.current={onLoad:t,onReady:n,onError:r};let h=(0,i.useRef)(!1),g=a!=null&&a.__html?String(a.__html):typeof s==`string`?s:``,_=(p=d.id)==null?o:p;return(0,i.useEffect)(()=>{if(e===`beforeInteractive`||h.current||!o&&!g)return;if(h.current=!0,_&&l.has(_)){var t,n;o&&u.has(o)&&((t=(n=m.current).onReady)==null||t.call(n));return}let r=()=>{_&&l.add(_);let t=document.createElement(`script`);if(f(t,e===`lazyOnload`?{...d,defer:!0}:{async:!0,...d}),o?(t.addEventListener(`load`,()=>{var e,t,n,r;u.add(o),(e=(t=m.current).onLoad)==null||e.call(t),(n=(r=m.current).onReady)==null||n.call(r)}),t.addEventListener(`error`,()=>{var e,t;return(e=(t=m.current).onError)==null?void 0:e.call(t)}),t.src=o):t.textContent=g,document.body.appendChild(t),!o){var n,r,i,a;(n=(r=m.current).onLoad)==null||n.call(r),(i=(a=m.current).onReady)==null||i.call(a)}};if(e===`lazyOnload`&&document.readyState!==`complete`){window.addEventListener(`load`,r,{once:!0});return}r()},[o,g]),e===`beforeInteractive`?a?(0,c.jsx)(`script`,{src:o,onLoad:t,onError:r,dangerouslySetInnerHTML:a,...d}):(0,c.jsx)(`script`,{src:o,onLoad:t,onError:r,...d,children:s}):null}export{s as n,o as r,p as t};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.