{"version":3,"file":"Modal.D6eteM-e.mjs","names":["useState"],"sources":["https:/framerusercontent.com/modules/Dn7K3i8GbSlI8PN79btK/xiii7Qtd6QhIx5b9g2FY/Modal.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useState,useEffect}from\"react\";import{createPortal}from\"react-dom\";import{FaTimes}from\"react-icons/fa\";import{addPropertyControls,ControlType}from\"framer\";/**\n * These annotations control how your component sizes\n * Learn more: https://www.framer.com/developers/#code-components-auto-sizing\n *\n * @framerSupportedLayoutWidth auto\n * @framerSupportedLayoutHeight auto\n */export default function Modal(props){const[isOpen,setIsOpen]=useState(false);useEffect(()=>{const timer=setTimeout(()=>{setIsOpen(true);document.body.classList.add(\"modal-open\");},4e4);return()=>{clearTimeout(timer);document.body.classList.remove(\"modal-open\");};},[]);const closeModal=()=>{setIsOpen(false);document.body.classList.remove(\"modal-open\");};useEffect(()=>{if(isOpen){const queryParams=new URLSearchParams(window.location.search);const utm_meta=queryParams.get(\"utm_meta\")||\"noMeta\";const utm_medium=queryParams.get(\"utm_medium\")||\"noMeta\";const utm_source=queryParams.get(\"utm_source\")||\"noMeta\";const utm_campaign=queryParams.get(\"utm_campaign\")||\"noMeta\";const utm_adset=queryParams.get(\"utm_adset\")||\"noMeta\";const utm_content=queryParams.get(\"utm_content\")||\"noMeta\";const script=document.createElement(\"script\");script.src=\"//js.hsforms.net/forms/embed/v2.js\";script.type=\"text/javascript\";script.charset=\"utf-8\";script.onload=()=>{window.hbspt.forms.create({region:\"na1\",portalId:\"46242482\",formId:props.formId,target:\"#hubspot-form\",onFormReady:function($form){$form.find('input[name=\"utm_meta\"]').val(utm_meta);$form.find('input[name=\"utm_medium\"]').val(utm_medium);$form.find('input[name=\"utm_source\"]').val(utm_source);$form.find('input[name=\"utm_campaign\"]').val(utm_campaign);$form.find('input[name=\"utm_adset\"]').val(utm_adset);$form.find('input[name=\"utm_content\"]').val(utm_content);}});};document.body.appendChild(script);}},[isOpen,props.formId]);if(!isOpen)return null;return /*#__PURE__*/createPortal(/*#__PURE__*/_jsx(\"div\",{style:overlayStyle,children:/*#__PURE__*/_jsxs(\"div\",{style:modalStyle,children:[/*#__PURE__*/_jsx(\"button\",{style:closeButtonStyle,onClick:closeModal,children:/*#__PURE__*/_jsx(FaTimes,{})}),/*#__PURE__*/_jsx(\"div\",{style:contentStyle,children:/*#__PURE__*/_jsx(\"div\",{style:hubspotForm,id:\"hubspot-form\"})})]})}),document.body);}// Styles are written in object syntax\n// Learn more: https://reactjs.org/docs/dom-elements.html#style\nconst overlayStyle={position:\"fixed\",top:0,left:0,width:\"100%\",height:\"100%\",backgroundColor:\"rgba(0, 0, 0, 0.5)\",display:\"flex\",justifyContent:\"center\",alignItems:\"center\",zIndex:1e3};const modalStyle={background:\"#fff\",padding:\"20px\",borderRadius:\"8px\",position:\"relative\",width:\"90%\",maxWidth:\"500px\",maxHeight:\"80%\",boxSizing:\"border-box\",overflowY:\"auto\"};const closeButtonStyle={position:\"absolute\",top:\"10px\",right:\"10px\",background:\"none\",border:\"none\",cursor:\"pointer\",fontSize:\"16px\"};const contentStyle={display:\"flex\",width:\"100%\",flexDirection:\"column\",alignItems:\"center\",overflow:\"hidden\"};const hubspotForm={width:\"100%\"};// Add the following CSS to your global stylesheet or a <style> tag in your HTML\nconst globalStyles=`\n  .modal-open {\n    overflow: hidden;\n  }\n`;if(typeof document!==\"undefined\"){const styleSheet=document.createElement(\"style\");styleSheet.type=\"text/css\";styleSheet.innerText=globalStyles;document.head.appendChild(styleSheet);}// Define property controls for Framer\naddPropertyControls(Modal,{formId:{type:ControlType.String,title:\"Form ID\",defaultValue:\"f3c0f384-7b54-4a10-8772-e161aefd8e1f\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"Modal\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutHeight\":\"auto\",\"framerSupportedLayoutWidth\":\"auto\",\"framerContractVersion\":\"1\"}},\"__Framer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