{"version":3,"file":"Custom_Code_v2.DoeTaVbl.mjs","names":["useRef","useState","__legacyOverrideHOC_DataObserverContext","_jsx"],"sources":["https:/framerusercontent.com/modules/Albcjh8Byq8Jyr8oRMAe/sZMDZzToiI556BeUleFq/Custom_Code_v2.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{useRef,useState,useEffect,forwardRef}from\"react\";export function ScrollToForm(){return{onClick(){const target=document.getElementById(\"form\");if(target){const rect=target.getBoundingClientRect();const scrollTop=window.scrollY+rect.top-window.innerHeight/2+rect.height/2;window.scrollTo({top:scrollTop,behavior:\"smooth\"});}}};}export function withLazyLoad(Component){return function LazyLoadedVideo(props){const containerRef=useRef(null);const[shouldLoad,setShouldLoad]=useState(false);useEffect(()=>{const el=containerRef.current;if(!el)return;const observer=new IntersectionObserver(([entry])=>{if(entry.isIntersecting){setShouldLoad(true);observer.disconnect();}},{rootMargin:\"200px\"});observer.observe(el);return()=>observer.disconnect();},[]);return /*#__PURE__*/_jsx(\"div\",{ref:containerRef,style:{width:\"100%\",height:\"100%\"},children:shouldLoad?/*#__PURE__*/_jsx(Component,{...props}):/*#__PURE__*/_jsx(\"div\",{style:{width:\"100%\",height:\"100%\",background:\"#1a1a1a\",borderRadius:\"inherit\"}})});};}export function TruncateBlogTitle(){return{style:{display:\"-webkit-box\",WebkitLineClamp:2,WebkitBoxOrient:\"vertical\",overflow:\"hidden\",textOverflow:\"ellipsis\"}};}export function withProfitAuditThankYouRedirect(Component){return /*#__PURE__*/forwardRef(function ProfitAuditThankYouRedirect(props,ref){const handleSubmit=event=>{if(typeof props.onSubmit===\"function\"){props.onSubmit(event);}if(typeof window===\"undefined\")return;const formElement=event?.currentTarget;const formData=formElement?new FormData(formElement):null;const email=String(formData?.get(\"email\")??\"\");const encodedEmail=encodeURIComponent(email);window.setTimeout(()=>{window.location.assign(`/profit-audit-thank-you?email=${encodedEmail}`);},120);};return /*#__PURE__*/_jsx(Component,{ref:ref,...props,onSubmit:handleSubmit});});}import{useContext as __legacyOverrideHOC_useContext}from\"react\";import{DataObserverContext as __legacyOverrideHOC_DataObserverContext}from\"framer\";export function withScrollToForm(C){return props=>{__legacyOverrideHOC_useContext(__legacyOverrideHOC_DataObserverContext);return _jsx(C,{...props,...ScrollToForm(props)});};}withScrollToForm.displayName=\"ScrollToForm\";export function withTruncateBlogTitle(C){return props=>{__legacyOverrideHOC_useContext(__legacyOverrideHOC_DataObserverContext);return _jsx(C,{...props,...TruncateBlogTitle(props)});};}withTruncateBlogTitle.displayName=\"TruncateBlogTitle\";\nexport const __FramerMetadata__ = {\"exports\":{\"withProfitAuditThankYouRedirect\":{\"type\":\"reactHoc\",\"name\":\"withProfitAuditThankYouRedirect\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"TruncateBlogTitle\":{\"type\":\"override\",\"name\":\"TruncateBlogTitle\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withTruncateBlogTitle\":{\"type\":\"reactHoc\",\"name\":\"withTruncateBlogTitle\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"ScrollToForm\":{\"type\":\"override\",\"name\":\"ScrollToForm\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withLazyLoad\":{\"type\":\"reactHoc\",\"name\":\"withLazyLoad\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withScrollToForm\":{\"type\":\"reactHoc\",\"name\":\"withScrollToForm\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Custom_Code_v2.map"],"mappings":"uMAAmG,SAAgB,GAAc,CAAC,MAAM,CAAC,SAAS,CAAC,IAAM,EAAO,SAAS,eAAe,MAAM,EAAE,GAAG,EAAO,CAAC,IAAM,EAAK,EAAO,sBAAsB,EAAQ,EAAU,EAAO,QAAQ,EAAK,IAAI,EAAO,YAAY,EAAE,EAAK,OAAO,EAAE,EAAO,SAAS,CAAC,IAAI,EAAU,SAAS,QAAQ,CAAC,CAAE,CAAC,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