{"version":3,"file":"BookACallModalV2.BzAB5Wpm.mjs","names":["useState","React.Fragment"],"sources":["https:/framer.com/m/LeadQualificationForm-ENW3XE.js@0tej5CzObAXfV5X5PVm7","https:/framerusercontent.com/modules/roHUXvB5Ork0Z1INeu9V/lpfmkN7OyUYehqe7qbwq/BookACallModalV2.js"],"sourcesContent":["/*\n * LeadQualificationForm\n *\n * Learn More: https://www.framer.com/asset-urls\n */\n\nexport * from \"https://framerusercontent.com/modules/bOqQkwMlUXsrpFea4MWT/0tej5CzObAXfV5X5PVm7/LeadQualificationForm.js\"\nexport { default } from \"https://framerusercontent.com/modules/bOqQkwMlUXsrpFea4MWT/0tej5CzObAXfV5X5PVm7/LeadQualificationForm.js\"\n","import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import*as React from\"react\";import{useEffect,useState}from\"react\";import{createPortal}from\"react-dom\";import LeadQualificationForm from\"https://framer.com/m/LeadQualificationForm-ENW3XE.js@0tej5CzObAXfV5X5PVm7\";// Reuses the same focus-ring styling already applied to every other button on\n// the site (see FocusRing.tsx) so this button doesn't lose its keyboard focus\n// indicator when swapped over to open a modal instead of navigating, plus the\n// backdrop/container styles for the modal itself.\nlet stylesInjected=false;function ensureModalStyles(){if(typeof document===\"undefined\")return;if(stylesInjected)return;stylesInjected=true;const style=document.createElement(\"style\");style.textContent=`\n        .bags-focus-ring-lime:focus-visible {\n            outline: 2px solid #BEF264;\n            outline-offset: 2px;\n        }\n        .bags-focus-ring-dark:focus-visible {\n            outline: 2px solid #022c22;\n            outline-offset: 2px;\n        }\n        .bqf-modal-backdrop {\n            position: fixed;\n            top: 0;\n            left: 0;\n            width: 100vw;\n            height: 100vh;\n            background: rgba(0, 0, 0, 0.6);\n            z-index: 9999;\n        }\n        .bqf-modal-container {\n            position: fixed;\n            top: 50%;\n            left: 50%;\n            transform: translate(-50%, -50%);\n            max-width: 600px;\n            width: 90vw;\n            max-height: 90vh;\n            overflow: hidden;\n            overflow-y: auto;\n            z-index: 10000;\n            background: transparent;\n            border-radius: 12px;\n        }\n        @media (max-width: 430px) {\n            .bqf-modal-container {\n                position: fixed;\n                top: 50%;\n                left: 50%;\n                transform: translate(-50%, -50%);\n                width: 90vw;\n                max-width: 90vw;\n                max-height: 85vh;\n                height: auto;\n                overflow-y: auto;\n                border-radius: 12px;\n            }\n        }\n    `;document.head.appendChild(style);}// Exported (not just used internally by the HOCs below) so components that\n// need to open the booking modal from their own custom click logic — e.g.\n// BagsPricingCalculator.tsx, which decides per-click whether a button means\n// \"Book a Call\" or something else entirely — can render it directly instead\n// of going through a wrapped-Component HOC.\nexport function BookACallModal({onClose}){useEffect(()=>{ensureModalStyles();},[]);useEffect(()=>{const original=document.body.style.overflow;document.body.style.overflow=\"hidden\";return()=>{document.body.style.overflow=original;};},[]);if(typeof document===\"undefined\")return null;// Mounted directly on document.body via a portal so the modal escapes the\n// nav's own DOM tree entirely — otherwise the nav's stacking context /\n// overflow clips it instead of rendering as a full-page overlay.\nreturn /*#__PURE__*/createPortal(/*#__PURE__*/_jsx(\"div\",{className:\"bqf-modal-backdrop\",onClick:onClose,children:/*#__PURE__*/_jsx(\"div\",{className:\"bqf-modal-container\",onClick:e=>e.stopPropagation(),children:/*#__PURE__*/_jsx(LeadQualificationForm,{onClose:onClose})})}),document.body);}export function withBookACallModal(Component){return props=>{const[isOpen,setIsOpen]=useState(false);useEffect(()=>{ensureModalStyles();},[]);return /*#__PURE__*/_jsxs(React.Fragment,{children:[/*#__PURE__*/_jsx(Component,{...props,className:[props.className,\"bags-focus-ring-lime\"].filter(Boolean).join(\" \"),target:\"_blank\",rel:\"noopener noreferrer\",onClick:e=>{e.preventDefault();setIsOpen(true);}}),isOpen&&/*#__PURE__*/_jsx(BookACallModal,{onClose:()=>setIsOpen(false)})]});};}// Site-wide (non-nav) Book a Call buttons: unlike the nav's fallback (real\n// href, opens in a new tab if JS fails), these must never reveal or navigate\n// to the HubSpot URL. href uses \"javascript:void(0)\" rather than \"#\" — a bare\n// \"#\" is a same-page fragment link, which the browser jumps to (scrolling to\n// top) before React's onClick even runs; void(0) fully neutralizes the\n// anchor's navigation behavior with no scroll/fragment jump, and still hides\n// the HubSpot URL from the status bar. stopPropagation is added alongside\n// preventDefault as a second guard against that default fragment behavior.\nexport function withBookACallModalNoFallback(Component){return props=>{const[isOpen,setIsOpen]=useState(false);useEffect(()=>{ensureModalStyles();},[]);return /*#__PURE__*/_jsxs(React.Fragment,{children:[/*#__PURE__*/_jsx(Component,{...props,href:\"javascript:void(0)\",onClick:e=>{e.preventDefault();e.stopPropagation();setIsOpen(true);}}),isOpen&&/*#__PURE__*/_jsx(BookACallModal,{onClose:()=>setIsOpen(false)})]});};}// Same as withBookACallModalNoFallback, but preserves the dark focus-ring\n// styling (see FocusRing.tsx's withFocusRingDark) already applied to some of\n// these buttons, which a plain codeOverride swap would otherwise drop.\nexport function withBookACallModalNoFallbackDark(Component){return props=>{const[isOpen,setIsOpen]=useState(false);useEffect(()=>{ensureModalStyles();},[]);return /*#__PURE__*/_jsxs(React.Fragment,{children:[/*#__PURE__*/_jsx(Component,{...props,href:\"javascript:void(0)\",className:[props.className,\"bags-focus-ring-dark\"].filter(Boolean).join(\" \"),onClick:e=>{e.preventDefault();e.stopPropagation();setIsOpen(true);}}),isOpen&&/*#__PURE__*/_jsx(BookACallModal,{onClose:()=>setIsOpen(false)})]});};}\nexport const __FramerMetadata__ = {\"exports\":{\"BookACallModal\":{\"type\":\"reactComponent\",\"name\":\"BookACallModal\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"withBookACallModalNoFallback\":{\"type\":\"reactHoc\",\"name\":\"withBookACallModalNoFallback\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withBookACallModalNoFallbackDark\":{\"type\":\"reactHoc\",\"name\":\"withBookACallModalNoFallbackDark\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withBookACallModal\":{\"type\":\"reactHoc\",\"name\":\"withBookACallModal\",\"annotations\":{\"framerContractVersion\":\"1\"}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