{"version":3,"file":"Hero_pointer.D4Lm4f4W.mjs","names":["React.useRef","React.useId","_Fragment"],"sources":["https:/framerusercontent.com/modules/1kdGm6zyZOMgE9SEMl08/oTadv8UPiUCiaCKt1INv/Hero_pointer.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from\"react/jsx-runtime\";import*as React from\"react\";import{addPropertyControls,ControlType,RenderTarget}from\"framer\";/**\n * Absolute layer: pin all four edges to zero inside your section.\n * Optional Section ID targets a named Scroll Section instead of layer bounds.\n * @framerSupportedLayoutWidth any\n * @framerSupportedLayoutHeight any\n * @framerIntrinsicWidth 800\n * @framerIntrinsicHeight 500\n */export default function CrosshairCursor({lineColor=\"rgba(0,0,0,0.2)\",pointerColor=\"#111111\",lineWidth=1,pointerSize=7.25,shape=\"square\",hideCursor=true,preview=true,sectionId=\"\",style}){const bounds=React.useRef(null);const canvas=RenderTarget.current()===RenderTarget.canvas;const id=`pb-aim-${React.useId().replace(/[^a-zA-Z0-9]/g,\"\")}`;React.useEffect(()=>{if(canvas)return;// Mount outside Framer's transformed/clipped instance wrappers.\nconst overlay=document.createElement(\"div\");overlay.setAttribute(\"aria-hidden\",\"true\");Object.assign(overlay.style,{position:\"fixed\",pointerEvents:\"none\",overflow:\"hidden\",zIndex:\"2147483646\",opacity:\"0\"});const make=styles=>{const el=document.createElement(\"div\");Object.assign(el.style,{position:\"absolute\",pointerEvents:\"none\"},styles);overlay.appendChild(el);return el;};const horizontal=make({left:\"0\",width:\"100%\",height:`${lineWidth}px`,background:lineColor,transform:\"translateY(-50%)\"});const vertical=make({top:\"0\",height:\"100%\",width:`${lineWidth}px`,background:lineColor,transform:\"translateX(-50%)\"});const mark=make({width:`${pointerSize}px`,height:`${pointerSize}px`,transform:\"translate(-50%, -50%)\"});if(shape===\"square\")mark.style.background=pointerColor;else{for(const axis of[0,1]){const arm=document.createElement(\"div\");Object.assign(arm.style,{position:\"absolute\",left:\"50%\",top:\"50%\",background:pointerColor,width:axis?`${lineWidth}px`:\"100%\",height:axis?\"100%\":`${lineWidth}px`,transform:\"translate(-50%, -50%)\"});mark.appendChild(arm);}}const css=document.createElement(\"style\");css.textContent=`.${id}{cursor:none!important}`;document.head.appendChild(css);document.body.appendChild(overlay);let marked=null;let point=null;let frame=0,pressed=false;const clearCursor=()=>{marked?.classList.remove(id);marked=null;};const hide=()=>{overlay.style.opacity=\"0\";clearCursor();};const draw=()=>{frame=0;let target=sectionId.trim()?document.getElementById(sectionId.trim().replace(/^#/,\"\")):bounds.current;// Framer may publish a code instance as a zero-size marker.\n// In that case, use the first ancestor with real section dimensions.\nif(!sectionId.trim()){while(target&&target!==document.body){const box=target.getBoundingClientRect();if(box.width>0&&box.height>0)break;target=target.parentElement;}if(target===document.body)target=null;}if(!point||!target||document.hidden){hide();return;}const r=target.getBoundingClientRect();const{x,y}=point;if(!r.width||!r.height||x<r.left||x>=r.right||y<r.top||y>=r.bottom){hide();return;}Object.assign(overlay.style,{left:`${r.left}px`,top:`${r.top}px`,width:`${r.width}px`,height:`${r.height}px`,opacity:\"1\"});horizontal.style.top=`${y-r.top}px`;vertical.style.left=`${x-r.left}px`;mark.style.left=`${x-r.left}px`;mark.style.top=`${y-r.top}px`;mark.style.transform=`translate(-50%, -50%) scale(${pressed&&shape===\"cross\"?2:1})`;const hit=document.elementFromPoint(x,y);if(marked!==hit){clearCursor();if(hideCursor&&hit){marked=hit;hit.classList.add(id);}}};const schedule=()=>{if(!frame)frame=requestAnimationFrame(draw);};const move=e=>{if(e.pointerType!==\"mouse\"){point=null;hide();return;}point={x:e.clientX,y:e.clientY};schedule();};const down=e=>{if(e.pointerType===\"mouse\"){pressed=true;move(e);}};const up=()=>{pressed=false;schedule();};const leave=()=>{point=null;pressed=false;hide();};const out=e=>{if(!e.relatedTarget)leave();};// Capture receives events even when nested components stop bubbling.\ndocument.addEventListener(\"pointermove\",move,{capture:true,passive:true});document.addEventListener(\"pointerdown\",down,{capture:true,passive:true});document.addEventListener(\"pointerup\",up,true);document.addEventListener(\"pointercancel\",leave,true);document.addEventListener(\"pointerout\",out,true);document.addEventListener(\"scroll\",schedule,{capture:true,passive:true});document.addEventListener(\"visibilitychange\",leave);window.addEventListener(\"resize\",schedule);window.addEventListener(\"blur\",leave);const observer=new ResizeObserver(schedule);if(bounds.current)observer.observe(bounds.current);return()=>{cancelAnimationFrame(frame);observer.disconnect();clearCursor();overlay.remove();css.remove();document.removeEventListener(\"pointermove\",move,true);document.removeEventListener(\"pointerdown\",down,true);document.removeEventListener(\"pointerup\",up,true);document.removeEventListener(\"pointercancel\",leave,true);document.removeEventListener(\"pointerout\",out,true);document.removeEventListener(\"scroll\",schedule,true);document.removeEventListener(\"visibilitychange\",leave);window.removeEventListener(\"resize\",schedule);window.removeEventListener(\"blur\",leave);};},[canvas,id,lineColor,pointerColor,lineWidth,pointerSize,shape,hideCursor,sectionId]);return /*#__PURE__*/_jsx(\"div\",{ref:bounds,\"aria-hidden\":\"true\",style:{...style,width:\"100%\",height:\"100%\",position:style?.position??\"relative\",pointerEvents:\"none\"},children:canvas&&preview&&/*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx(\"div\",{style:{position:\"absolute\",top:\"50%\",width:\"100%\",height:lineWidth,background:lineColor}}),/*#__PURE__*/_jsx(\"div\",{style:{position:\"absolute\",left:\"50%\",height:\"100%\",width:lineWidth,background:lineColor}}),/*#__PURE__*/_jsx(\"div\",{style:{position:\"absolute\",left:\"50%\",top:\"50%\",transform:\"translate(-50%, -50%)\",color:pointerColor,fontSize:pointerSize,width:pointerSize,height:pointerSize,background:shape===\"square\"?pointerColor:\"transparent\",display:\"flex\",alignItems:\"center\",justifyContent:\"center\"},children:shape===\"cross\"?\"+\":null})]})});}addPropertyControls(CrosshairCursor,{sectionId:{type:ControlType.String,title:\"Section ID\",defaultValue:\"\",description:\"Optional Scroll Section name, without #. Leave empty to use the layer bounds, or its containing section if the layer is zero-size.\"},lineColor:{type:ControlType.Color,title:\"Line Color\",defaultValue:\"rgba(0,0,0,0.2)\"},pointerColor:{type:ControlType.Color,title:\"Pointer Color\",defaultValue:\"#111111\"},lineWidth:{type:ControlType.Number,title:\"Line Width\",defaultValue:1,min:.5,max:6,step:.5},pointerSize:{type:ControlType.Number,title:\"Pointer Size\",defaultValue:7.25,min:2,max:40,step:.25},shape:{type:ControlType.Enum,title:\"Pointer\",options:[\"cross\",\"square\"],defaultValue:\"square\"},hideCursor:{type:ControlType.Boolean,title:\"Hide Cursor\",defaultValue:true},preview:{type:ControlType.Boolean,title:\"Canvas Preview\",defaultValue:true}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"CrosshairCursor\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutHeight\":\"any\",\"framerSupportedLayoutWidth\":\"any\",\"framerContractVersion\":\"1\",\"framerIntrinsicHeight\":\"500\",\"framerIntrinsicWidth\":\"800\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Hero_pointer.map"],"mappings":"2NAOG,SAAwB,EAAgB,CAAC,YAAU,kBAAkB,eAAa,UAAU,YAAU,EAAE,cAAY,KAAK,QAAM,SAAS,aAAW,GAAK,UAAQ,GAAK,YAAU,GAAG,SAAO,CAAC,IAAM,EAAOA,EAAa,IAAI,EAAQ,EAAO,EAAa,QAAQ,IAAI,EAAa,OAAa,EAAG,UAAUC,EAAY,CAAC,CAAC,QAAQ,gBAAgB,EAAE,IAIq5B,OAJj5B,MAAoB,CAAC,GAAG,EAAO,OACrX,IAAM,EAAQ,SAAS,cAAc,KAAK,EAAE,EAAQ,aAAa,cAAc,MAAM,EAAE,OAAO,OAAO,EAAQ,MAAM,CAAC,SAAS,QAAQ,cAAc,OAAO,SAAS,SAAS,OAAO,aAAa,QAAQ,GAAG,CAAC,EAAE,IAAM,EAAK,GAAQ,CAAC,IAAM,EAAG,SAAS,cAAc,KAAK,EAAoG,OAAlG,OAAO,OAAO,EAAG,MAAM,CAAC,SAAS,W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