{"version":3,"file":"ElfsightWidget.1noBgxWd.mjs","names":["React.useRef","__esmMin","init_npm_react_18_3_1","de","init_jsx_runtime","c","ce","addPropertyControls","init_framer_DKtAEkcX","ControlType","ElfsightWidget","props","root","observer","load","platform","lazyLoad","entries","entry","style","widgetId","init_ElfsightWidget"],"sources":["https:/framerusercontent.com/modules/KfiGvTrNdvM6AwG5rDKq/WNFwwpS4c5mps3uRewUP/ElfsightWidget.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import*as React from\"react\";import{addPropertyControls,ControlType}from\"framer\";/**\n * @framerSupportedLayoutWidth any\n * @framerSupportedLayoutHeight auto\n */export default function ElfsightWidget(props){const{widgetId,lazyLoad=false,style}=props;const root=React.useRef(null);React.useEffect(()=>{let observer;const load=()=>{if(document.querySelector('script[src=\"https://elfsightcdn.com/platform.js\"]'))return;const platform=document.createElement(\"script\");platform.src=\"https://elfsightcdn.com/platform.js\";platform.async=true;platform.setAttribute(\"data-use-service-core\",\"\");document.body.append(platform);};if(lazyLoad&&root.current&&typeof IntersectionObserver!==\"undefined\"){observer=new IntersectionObserver(entries=>{if(entries.some(entry=>entry.isIntersecting)){load();observer?.disconnect();}},{rootMargin:\"600px 0px\"});observer.observe(root.current);}else{load();}return()=>observer?.disconnect();},[lazyLoad]);return /*#__PURE__*/_jsx(\"div\",{ref:root,style:{...style},children:/*#__PURE__*/_jsx(\"div\",{className:widgetId})});}addPropertyControls(ElfsightWidget,{widgetId:{type:ControlType.String,title:\"Widget ID\"},lazyLoad:{type:ControlType.Boolean,title:\"Lazy Load\",defaultValue:false}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"ElfsightWidget\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutHeight\":\"auto\",\"framerSupportedLayoutWidth\":\"any\",\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./ElfsightWidget.map"],"mappings":"A,iLAGG,SAAwBU,EAAe,EAAM,CAAC,GAAK,CAAC,WAAS,WAAS,GAAM,SAAOC,EAAYC,EAAKZ,EAAa,IAAI,EAA2oB,OAAzoBM,MAAoB,CAAC,IAAIO,EAAeC,MAAS,CAAC,GAAG,SAAS,cAAc,mDAAmD,EAAE,OAAO,IAAMC,EAAS,SAAS,cAAc,QAAQ,EAAE,EAAS,IAAI,sCAAsC,EAAS,MAAM,GAAKA,EAAS,aAAa,wBAAwB,EAAE,EAAE,SAAS,KAAK,OAAOA,CAAQ,CAAE,EAA0Q,OAArQC,GAAUJ,EAAK,SAAS,OAAO,qBAAuB,KAAa,EAAS,IAAI,qBAAqB,GAAS,CAAIK,EAAQ,KAAK,GAAOC,EAAM,cAAc,IAAGJ,EAAK,EAAED,GAAU,WAAW,EAAG,EAAE,CAAC,WAAW,WAAW,CAAC,EAAEA,EAAS,QAAQD,EAAK,OAAO,GAAQE,EAAK,MAAaD,GAAU,WAAW,CAAE,EAAE,CAACG,CAAQ,CAAC,EAAsB,gBAAK,MAAM,CAAC,IAAIJ,EAAK,MAAM,CAAC,GAAGO,CAAK,EAAE,SAAsB,gBAAK,MAAM,CAAC,UAAUC,CAAQ,CAAC,CAAC,CAAC,CAAE,C,0CAACb,EAAoBG,EAAe,CAAC,SAAS,CAAC,KAAKD,EAAY,OAAO,MAAM,WAAW,EAAE,SAAS,CAAC,KAAKA,EAAY,QAAQ,MAAM,YAAY,aAAa,EAAK,CAAC,CAAC,C"}