{
  "version": 3,
  "sources": ["ssg:https://framerusercontent.com/modules/HycvNA3TNyZChUf9qQdu/JzE83Ih3aOiVYVEOZCQb/Chat_2.js"],
  "sourcesContent": ["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useEffect,useState}from\"react\";export default function BeaconButton(){const[isInitialized,setIsInitialized]=useState(false);const BEACON_ID=\"002aa4ef-b837-4bba-8124-a61dd5f103b7\"// Replace with your Beacon ID\n;useEffect(()=>{let initAttempts=0;const maxAttempts=10;const initializeBeacon=()=>{// Only initialize if it hasn't been initialized yet\nif(!window.Beacon){const script=document.createElement(\"script\");script.text=`\n          !function(e,t,n){function a(){var e=t.getElementsByTagName(\"script\")[0],n=t.createElement(\"script\");n.type=\"text/javascript\",n.async=!0,n.src=\"https://beacon-v2.helpscout.net\",e.parentNode.insertBefore(n,e)}if(e.Beacon=n=function(t,n,a){e.Beacon.readyQueue.push({method:t,options:n,data:a})},n.readyQueue=[],\"complete\"===t.readyState)return a();e.attachEvent?e.attachEvent(\"onload\",a):e.addEventListener(\"load\",a,!1)}(window,document,window.Beacon||function(){});\n          window.Beacon('init', '${BEACON_ID}')\n        `;document.head.appendChild(script);}};const checkBeaconReady=()=>{initAttempts++;if(window.Beacon&&typeof window.Beacon===\"function\"){// Force reinit if needed\nwindow.Beacon(\"destroy\");window.Beacon(\"init\",BEACON_ID);// Wait a bit to ensure everything is ready\nsetTimeout(()=>{setIsInitialized(true);},1e3);return true;}if(initAttempts<maxAttempts){setTimeout(checkBeaconReady,1e3);initializeBeacon();}return false;};// Start the initialization process\ninitializeBeacon();checkBeaconReady();// Cleanup\nreturn()=>{if(window.Beacon){window.Beacon(\"destroy\");}};},[]);const handleClick=e=>{e.preventDefault();e.stopPropagation();if(!isInitialized){console.log(\"Beacon not ready, reinitializing...\");// Try to reinitialize if not ready\nif(window.Beacon){window.Beacon(\"destroy\");}window.Beacon(\"init\",BEACON_ID);setTimeout(()=>{window.Beacon(\"open\");},500);return;}try{window.Beacon(\"open\");}catch(error){console.error(\"Error opening Beacon:\",error);// Fallback: try to reinitialize\nif(window.Beacon){window.Beacon(\"destroy\");window.Beacon(\"init\",BEACON_ID);setTimeout(()=>{window.Beacon(\"open\");},500);}}};return /*#__PURE__*/_jsxs(\"button\",{onClick:handleClick,style:{display:\"flex\",alignItems:\"center\",gap:\"8px\",backgroundColor:\"#000000\",color:\"white\",padding:\"20px 48px\",border:\"none\",borderRadius:\"8px\",cursor:\"pointer\",transition:\"background-color 0.2s\",fontFamily:\"sans-serif\",fontSize:\"16px\",WebkitTapHighlightColor:\"transparent\",outline:\"none\",touchAction:\"manipulation\",position:\"relative\",zIndex:999999},children:[/*#__PURE__*/_jsx(\"svg\",{width:\"20\",height:\"20\",viewBox:\"0 0 24 24\",fill:\"none\",stroke:\"currentColor\",strokeWidth:\"2\",strokeLinecap:\"round\",strokeLinejoin:\"round\",children:/*#__PURE__*/_jsx(\"path\",{d:\"M21 11.5a8.38 8.38 0 0 1-.9 3.8 8.5 8.5 0 0 1-7.6 4.7 8.38 8.38 0 0 1-3.8-.9L3 21l1.9-5.7a8.38 8.38 0 0 1-.9-3.8 8.5 8.5 0 0 1 4.7-7.6 8.38 8.38 0 0 1 3.8-.9h.5a8.48 8.48 0 0 1 8 8v.5z\"})}),\"Chat with us\"]});}\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"BeaconButton\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Chat_2.map"],
  "mappings": "uGAA8G,SAARA,GAA+B,CAAC,GAAK,CAACC,EAAcC,CAAgB,EAAEC,EAAS,EAAK,EAAQC,EAAU,uCAC3M,OAAAC,EAAU,IAAI,CAAC,IAAIC,EAAa,EAAQC,EAAY,GAASC,EAAiB,IAAI,CACnF,GAAG,CAACC,EAAO,OAAO,CAAC,IAAMC,EAAO,SAAS,cAAc,QAAQ,EAAEA,EA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