{"version":3,"file":"SectionButton.-E6CBuFg.mjs","names":["useState"],"sources":["https:/framerusercontent.com/modules/Y3QUcPdRtTs6mkO5uOQ4/LH9MJB46wYzPCwGSFfOa/PageAnchors.js","https:/framerusercontent.com/modules/pCXID3fBj2pSR6YR3xWD/8dhcZUlVwJAZNxiY3VlC/SectionButton.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{useEffect}from\"react\";// Space above the section: small when scrolling down (the nav hides), larger when scrolling up (the nav shows).\nconst GAP_DOWN=28;const GAP_UP=116;function scrollToSection(id){const target=document.getElementById(id);if(!target)return false;const rect=target.getBoundingClientRect();// scrollIntoView works whatever element does the scrolling; the margin keeps space above the section.\ntarget.style.scrollMarginTop=(rect.top>-2?GAP_DOWN:GAP_UP)+\"px\";const reduced=window.matchMedia(\"(prefers-reduced-motion: reduce)\").matches;target.scrollIntoView({block:\"start\",behavior:reduced?\"auto\":\"smooth\"});return true;}/**\n * Page anchors: while this page is open, a click on a link or button that points to one of the page's own\n * sections scrolls there smoothly instead of reloading. The section is found from the link's #hash, or,\n * if the link carries none, from the button's label (rules below).\n */function makeAnchors(rules){return function withAnchors(Component){return function Anchors(props){useEffect(()=>{if(typeof window===\"undefined\")return;const onClick=e=>{if(e.defaultPrevented||e.button>0||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey)return;const start=e.target;const el=start&&start.closest?start.closest(\"a, button, [role='button']\"):null;if(!el||el.target===\"_blank\")return;let id=\"\";const href=el.getAttribute(\"href\")||\"\";if(href.includes(\"#\")){try{const url=new URL(href,window.location.href);if(url.origin===window.location.origin&&url.pathname===window.location.pathname&&url.hash.length>1)id=decodeURIComponent(url.hash.slice(1));}catch{}}if(!id||!document.getElementById(id)){const label=(el.textContent||\"\").replace(/\\s+/g,\" \").trim();const rule=rules.find(([re])=>re.test(label));id=rule?rule[1]:\"\";}if(id&&scrollToSection(id)){e.preventDefault();e.stopPropagation();window.history.replaceState(null,\"\",\"#\"+id);}};document.addEventListener(\"click\",onClick,true);return()=>document.removeEventListener(\"click\",onClick,true);},[]);return /*#__PURE__*/_jsx(Component,{...props});};};}const PRICING=makeAnchors([[/^accounting team plans/i,\"plans\"],[/^marketing plans/i,\"marketing-plans\"],[/see marketing plans/i,\"marketing-plans\"],[/see accounting team plans/i,\"plans\"]]);const SERVICES=makeAnchors([[/^explore our services/i,\"all-services\"]]);export function withPricingAnchors(Component){return PRICING(Component);}export function withServicesAnchors(Component){return SERVICES(Component);}\nexport const __FramerMetadata__ = {\"exports\":{\"withServicesAnchors\":{\"type\":\"reactHoc\",\"name\":\"withServicesAnchors\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withPricingAnchors\":{\"type\":\"reactHoc\",\"name\":\"withPricingAnchors\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./PageAnchors.map","import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";import{motion,useMotionValue,useReducedMotion,useSpring}from\"framer-motion\";import{useState}from\"react\";const FONT='\"DM Sans\", \"DM Sans Placeholder\", sans-serif';/** Finds the section to scroll to: by its id, else by its layer name, else by a heading that contains the text. */function findSection(id,layerName,headingText){const byId=id?document.getElementById(id):null;if(byId)return byId;if(layerName){const byName=document.querySelector(`section[data-framer-name=\"${layerName}\"], [data-framer-name=\"${layerName}\"]`);if(byName)return byName;}if(headingText){const want=headingText.toLowerCase();const heads=Array.from(document.querySelectorAll(\"h1, h2, h3\"));const hit=heads.find(h=>(h.textContent||\"\").replace(/\\s+/g,\" \").toLowerCase().includes(want));if(hit)return hit.closest(\"section\")||hit;}return null;}/**\n * Section Button — a button that scrolls smoothly to a section of the same page.\n * Styled like the site's buttons (Light and Brand).\n *\n * @framerSupportedLayoutWidth auto\n * @framerSupportedLayoutHeight auto\n */export default function SectionButton(props){const{label=\"Accounting team plans\",targetId=\"plans\",layerName=\"\",headingText=\"\",variant=\"light\",arrow=false,size=\"regular\"}=props;const[hover,setHover]=useState(false);const reduce=useReducedMotion();const x=useMotionValue(0);const y=useMotionValue(0);const sx=useSpring(x,{stiffness:180,damping:20});const sy=useSpring(y,{stiffness:180,damping:20});const light=variant===\"light\";// Small: for phones, so two buttons fit side by side.\nconst small=size===\"small\";const color=light?\"rgb(16, 43, 67)\":\"#FFFFFF\";const onClick=()=>{if(typeof window===\"undefined\")return;const target=findSection(targetId,layerName,headingText);if(!target)return;const reduced=window.matchMedia(\"(prefers-reduced-motion: reduce)\").matches;// Works whatever element does the scrolling; the margin keeps a little space above the section.\ntarget.style.scrollMarginTop=\"28px\";target.scrollIntoView({behavior:reduced?\"auto\":\"smooth\",block:\"start\"});};// Same gentle \"magnetic\" follow as the site's other buttons (Magnetic.tsx).\nconst onPointerMove=e=>{if(reduce||e.pointerType===\"touch\")return;const r=e.currentTarget.getBoundingClientRect();x.set((e.clientX-r.left-r.width/2)*.12);y.set((e.clientY-r.top-r.height/2)*.16);};const onPointerLeave=()=>{setHover(false);x.set(0);y.set(0);};return /*#__PURE__*/_jsxs(motion.button,{type:\"button\",onClick:onClick,onPointerEnter:()=>setHover(true),onPointerMove:onPointerMove,onPointerLeave:onPointerLeave,style:{all:\"unset\",boxSizing:\"border-box\",display:\"inline-flex\",alignItems:\"center\",justifyContent:\"center\",gap:small?6:light?14:28,width:\"max-content\",whiteSpace:\"nowrap\",// Small: compact values, so two buttons fit side by side down to 320px phones.\npadding:small?\"10px 9px\":\"13px 21px\",borderRadius:10,cursor:\"pointer\",fontFamily:FONT,fontWeight:600,fontSize:small?11:14,lineHeight:1.5,color,border:light?\"1px solid rgba(157, 185, 208, 0.19)\":\"1px solid #385F89\",background:light?hover?\"linear-gradient(125deg, #CFE5F4 0%, #A9C8E3 100%)\":\"linear-gradient(125deg, #C1DCEF 0%, #9BBDDC 100%)\":hover?\"#20466F\":\"#132B47\",boxShadow:light?`inset 0px 1px 0px 0px rgba(255, 255, 255, 0.47), 0px ${hover?12:6}px ${hover?32:22}px 0px rgba(132, 196, 255, ${hover?.24:.1})`:hover?\"0px 0px 32px 0px rgba(56, 95, 137, 0.5)\":\"0px 0px 25px 0px rgba(19, 43, 71, 0.35)\",transition:\"background 0.3s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.3s cubic-bezier(0.22, 1, 0.36, 1)\",...props.style,x:sx,y:sy},children:[/*#__PURE__*/_jsx(\"span\",{children:label}),arrow&&/*#__PURE__*/_jsxs(\"svg\",{width:small?12:14,height:small?12:14,viewBox:\"0 0 24 24\",fill:\"none\",stroke:color,strokeWidth:\"1.8\",strokeLinecap:\"round\",strokeLinejoin:\"round\",\"aria-hidden\":\"true\",style:{flexShrink:0},children:[/*#__PURE__*/_jsx(\"path\",{d:\"M7 7h10v10\"}),/*#__PURE__*/_jsx(\"path\",{d:\"M7 17 17 7\"})]})]});}addPropertyControls(SectionButton,{label:{type:ControlType.String,title:\"Label\",defaultValue:\"Accounting team plans\"},targetId:{type:ControlType.String,title:\"Target Id\",defaultValue:\"plans\"},layerName:{type:ControlType.String,title:\"Layer Name\",defaultValue:\"\"},headingText:{type:ControlType.String,title:\"Heading Text\",defaultValue:\"\"},variant:{type:ControlType.Enum,title:\"Variant\",options:[\"light\",\"brand\"],optionTitles:[\"Light\",\"Brand\"],defaultValue:\"light\"},arrow:{type:ControlType.Boolean,title:\"Arrow\",defaultValue:false},size:{type:ControlType.Enum,title:\"Size\",options:[\"regular\",\"small\"],optionTitles:[\"Regular\",\"Small\"],defaultValue:\"regular\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"SectionButton\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerSupportedLayoutHeight\":\"auto\",\"framerSupportedLayoutWidth\":\"auto\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./SectionButton.map"],"mappings":"8QACmC,SAAS,EAAgB,EAAG,CAAC,IAAM,EAAO,SAAS,eAAe,CA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