{"version":3,"file":"ClientSectionNavigation.DFCdNm2S.mjs","names":["React.useRef","__esmMin","de","init_npm_react_18_3_1","ce","init_jsx_runtime","c","init_framer_CKT6jEEQ","addPropertyControls","RenderTarget","ControlType","ClientSectionNavigation","ref","key","media","marker","host","destination","win","remember","event","frame","stamp","reduced","style","init_ClientSectionNavigation"],"sources":["https:/framerusercontent.com/modules/WtX5gBB1T41nm2dcyKLT/iWufsFELoECzu2qHt7OT/ClientSectionNavigation.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import*as React from\"react\";import{addPropertyControls,ControlType,RenderTarget}from\"framer\";// @framerSupportedLayoutWidth fixed\n// @framerSupportedLayoutHeight fixed\nexport default function ClientSectionNavigation({destination=false,media=false,style}){const ref=React.useRef(null);React.useEffect(()=>{const key=media?\"commly.media.scrollIntent\":\"commly.clients.scrollIntent\";const marker=ref.current;if(!marker||RenderTarget.current()===RenderTarget.canvas)return;const host=destination?marker.parentElement:marker.closest('[data-framer-name=\"text-block\"]');const win=marker.ownerDocument.defaultView;if(!host||!win)return;if(!destination){const remember=event=>{if(event.button!==0||event.metaKey||event.ctrlKey||event.altKey||event.shiftKey)return;if(!event.target?.closest?.(\"a[href]\"))return;try{win.sessionStorage.setItem(key,String(Date.now()));}catch{}};host.addEventListener(\"click\",remember,true);return()=>host.removeEventListener(\"click\",remember,true);}let frame=win.requestAnimationFrame(()=>{if(!marker.getClientRects().length)return;try{const stamp=Number(win.sessionStorage.getItem(key));if(!stamp||Date.now()-stamp>2e4)return;win.sessionStorage.removeItem(key);}catch{return;}const reduced=win.matchMedia(\"(prefers-reduced-motion: reduce)\").matches;if(!reduced)win.scrollTo({top:0,behavior:\"instant\"});frame=win.requestAnimationFrame(()=>marker.scrollIntoView({block:\"start\",behavior:reduced?\"instant\":\"smooth\"}));});return()=>win.cancelAnimationFrame(frame);},[destination,media]);return /*#__PURE__*/_jsx(\"span\",{\"aria-hidden\":\"true\",ref:ref,style:{...style,display:\"block\",width:1,height:1,pointerEvents:\"none\",scrollMarginTop:76}});}addPropertyControls(ClientSectionNavigation,{media:{type:ControlType.Boolean,title:\"Media section\",defaultValue:false},destination:{type:ControlType.Boolean,title:\"Destination\",defaultValue:false}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"ClientSectionNavigation\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutWidth\":\"\",\"framerContractVersion\":\"1\",\"framerSupportedLayoutHeight\":\"\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./ClientSectionNavigation.map"],"mappings":"A,yLAEA,SAAwBW,EAAwB,CAAC,cAAY,GAAM,QAAM,GAAM,SAAO,CAAC,IAAMC,EAAIZ,EAAa,IAAI,EAAqsC,OAAnsCI,MAAoB,CAAC,IAAMS,EAAIC,EAAM,4BAA4B,8BAAoCC,EAAOH,EAAI,QAAQ,GAAG,CAACG,GAAQN,EAAa,QAAQ,IAAIA,EAAa,OAAO,OAAO,IAAMO,EAAKC,EAAYF,EAAO,cAAcA,EAAO,QAAQ,iCAAiC,EAAQG,EAAIH,EAAO,cAAc,YAAY,GAAG,CAACC,GAAM,CAACE,EAAI,OAAO,GAAG,CAACD,EAAY,CAAC,IAAME,EAAS,GAAO,CAAC,GAAG,IAAM,SAAS,GAAGC,EAAM,SAASA,EAAM,SAASA,EAAM,QAAQA,EAAM,WAAoBA,EAAM,QAAQ,UAAU,SAAS,EAAS,GAAG,CAACF,EAAI,eAAe,QAAQL,EAAI,OAAO,KAAK,IAAI,CAAC,CAAC,CAAE,MAAM,CAAC,CAAC,EAA+C,OAA7CG,EAAK,iBAAiB,QAAQG,EAAS,EAAI,MAAYH,EAAK,oBAAoB,QAAQG,EAAS,EAAI,CAAE,CAAC,IAAIE,EAAMH,EAAI,0BAA0B,CAAC,GAAG,CAACH,EAAO,eAAe,CAAC,CAAC,OAAO,OAAO,GAAG,CAAC,IAAMO,EAAM,OAAOJ,EAAI,eAAe,QAAQL,C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