{"version":3,"file":"Custom_Code_v2.ugt2UObs.mjs","names":["useRef","useState","__legacyOverrideHOC_DataObserverContext","_jsx","__esmMin","de","oe","window","ce","init_ssg_sandbox_shims","_e","init_jsx_runtime","init_npm_react_18_3_1","c","init_framer_DxfB3JJo","DataObserverContext","ScrollToForm","target","rect","scrollTop","withLazyLoad","containerRef","shouldLoad","setShouldLoad","el","observer","entry","Component","props","TruncateBlogTitle","withScrollToForm","C","withTruncateBlogTitle","init_Custom_Code_v2"],"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":"A,sMAAmG,SAAgBgB,GAAc,CAAC,MAAM,CAAC,SA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