{"version":3,"file":"Magnet.jn_JKw1B.mjs","names":["Children","useRef"],"sources":["https:/framerusercontent.com/modules/FdwNdTy6aDDIW7d5h1R8/lGE5j2he2aiGj4Xh6AFk/guZQOz05G.js","https:/framerusercontent.com/modules/rGhBB70PTMGfpQtkjJfz/3brPVRMZwORtupktYg4i/Magnet.js"],"sourcesContent":["// Generated by Framer (6ca5d98)\nimport{jsx as _jsx}from\"react/jsx-runtime\";import{addPropertyControls,ControlType,cx,motion,useSVGTemplate,withCSS}from\"framer\";import*as React from\"react\";import{forwardRef}from\"react\";const mask=\"var(--framer-icon-mask)\";const Base=/*#__PURE__*/forwardRef(function(props,ref){return /*#__PURE__*/_jsx(\"svg\",{...props,ref:ref,children:props.children});});const MotionSVG=motion.create(Base);const SVG=/*#__PURE__*/forwardRef((props,ref)=>{const{animated,layoutId,children,...rest}=props;return animated?/*#__PURE__*/_jsx(MotionSVG,{...rest,layoutId:layoutId,ref:ref,children:children}):/*#__PURE__*/_jsx(\"svg\",{...rest,ref:ref,children:children});});const svg='<svg display=\"block\" role=\"presentation\" viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M 10.5 0 C 3 0 0 6.75 0 6.75 C 0 6.75 3 13.5 10.5 13.5 C 18 13.5 21 6.75 21 6.75 C 21 6.75 18 0 10.5 0 Z M 10.5 10.5 C 8.429 10.5 6.75 8.821 6.75 6.75 C 6.75 4.679 8.429 3 10.5 3 C 12.571 3 14.25 4.679 14.25 6.75 C 14.25 8.821 12.571 10.5 10.5 10.5 Z\" fill-opacity=\"var(--1m6trwb, 0)\" fill=\"var(--21h8s6, rgb(0, 0, 0))\" height=\"13.5px\" id=\"WtEjxLeUV\" transform=\"translate(1.5 5.25)\" width=\"21px\"/><path d=\"M 10.5 0 C 3 0 0 6.75 0 6.75 C 0 6.75 3 13.5 10.5 13.5 C 18 13.5 21 6.75 21 6.75 C 21 6.75 18 0 10.5 0 Z\" fill=\"transparent\" height=\"13.5px\" id=\"kBKX7Uy8u\" stroke-dasharray=\"\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"var(--pgex8v, 1.5)\" stroke=\"var(--21h8s6, rgb(0, 0, 0))\" transform=\"translate(1.5 5.25)\" width=\"21px\"/><path d=\"M 0 3.75 C 0 1.679 1.679 0 3.75 0 C 5.821 0 7.5 1.679 7.5 3.75 C 7.5 5.821 5.821 7.5 3.75 7.5 C 1.679 7.5 0 5.821 0 3.75 Z\" fill=\"transparent\" height=\"7.5px\" id=\"EI7JXN_Ew\" stroke-dasharray=\"\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"var(--pgex8v, 1.5)\" stroke=\"var(--21h8s6, rgb(0, 0, 0))\" transform=\"translate(8.25 8.25)\" width=\"7.5px\"/></svg>';const getProps=({alpha,color,height,id,width,width1,...props})=>{return{...props,ezTt3ayMo:color??props.ezTt3ayMo??\"rgb(0, 0, 0)\",lschgej4H:width1??props.lschgej4H??1.5,qxTvv_EBh:alpha??props.qxTvv_EBh};};const Component=/*#__PURE__*/React.forwardRef(function(props,ref){const{style,className,layoutId,variant,ezTt3ayMo,lschgej4H,qxTvv_EBh,...restProps}=getProps(props);const href=useSVGTemplate(\"726767363\",svg);return /*#__PURE__*/_jsx(SVG,{...restProps,className:cx(\"framer-VTL13\",className),layoutId:layoutId,ref:ref,role:\"presentation\",style:{\"--1m6trwb\":qxTvv_EBh,\"--21h8s6\":ezTt3ayMo,\"--pgex8v\":lschgej4H,...style},viewBox:\"0 0 24 24\",children:/*#__PURE__*/_jsx(\"use\",{href:href})});});const css=[`.framer-VTL13 { -webkit-mask: ${mask}; aspect-ratio: 1; display: block; mask: ${mask}; width: 24px; }`];/**\n * This is a generated Framer component.\n * @framerIntrinsicWidth 24\n * @framerIntrinsicHeight 24\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight any-prefer-fixed\n * @framerVariables {\"ezTt3ayMo\":\"color\",\"lschgej4H\":\"width1\",\"qxTvv_EBh\":\"alpha\"}\n * @framerImmutableVariables true\n * @framerVector {\"name\":\"Eye\",\"color\":{\"type\":\"variable\",\"value\":\"21h8s6\"},\"set\":{\"localId\":\"vectorSet/NGVKdicsm\",\"id\":\"NGVKdicsm\",\"moduleId\":\"omX0gWFPqDwhaiWwf6ab\"}}\n * @framerDisableUnlink true\n */const Icon=withCSS(Component,css,\"framer-VTL13\");Icon.displayName=\"Eye\";export default Icon;addPropertyControls(Icon,{ezTt3ayMo:{defaultValue:\"rgb(0, 0, 0)\",hidden:false,title:\"Color\",type:ControlType.Color},lschgej4H:{defaultValue:1.5,displayStepper:true,hidden:false,max:6,min:0,step:.5,title:\"Width\",type:ControlType.Number},qxTvv_EBh:{defaultValue:0,displayStepper:true,hidden:false,max:1,min:0,step:.1,title:\"Alpha\",type:ControlType.Number}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"Icon\",\"slots\":[],\"annotations\":{\"framerIntrinsicWidth\":\"24\",\"framerVector\":\"{\\\"name\\\":\\\"Eye\\\",\\\"color\\\":{\\\"type\\\":\\\"variable\\\",\\\"value\\\":\\\"21h8s6\\\"},\\\"set\\\":{\\\"localId\\\":\\\"vectorSet/NGVKdicsm\\\",\\\"id\\\":\\\"NGVKdicsm\\\",\\\"moduleId\\\":\\\"omX0gWFPqDwhaiWwf6ab\\\"}}\",\"framerImmutableVariables\":\"true\",\"framerSupportedLayoutHeight\":\"any-prefer-fixed\",\"framerVariables\":\"{\\\"ezTt3ayMo\\\":\\\"color\\\",\\\"lschgej4H\\\":\\\"width1\\\",\\\"qxTvv_EBh\\\":\\\"alpha\\\"}\",\"framerIntrinsicHeight\":\"24\",\"framerSupportedLayoutWidth\":\"any-prefer-fixed\",\"framerContractVersion\":\"1\",\"framerDisableUnlink\":\"true\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}","// Get Started: https://www.framer.com/developers\nimport{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useRef,Children}from\"react\";import{addPropertyControls,ControlType}from\"framer\";import{motion,animate,useMotionValue,useAnimationFrame}from\"framer-motion\";/**\n * @framerDisableUnlink\n * @framerSupportedLayoutWidth any\n * @framerSupportedLayoutHeight any\n */export default function Magnet({transition,children,intensity}){const hasChild=Children.count(children)>0;const isHoveringRef=useRef(false);const lastEvent=useRef(null);const x=useMotionValue(0);const y=useMotionValue(0);useAnimationFrame(()=>{const e=lastEvent.current;if(isHoveringRef.current&&e){const rect=e.target.getBoundingClientRect();const _x=(e.clientX-rect.left-rect.width/2)*intensity;const _y=(e.clientY-rect.top-rect.height/2)*intensity;animate(x,_x,transition.frame);animate(y,_y,transition.frame);}});return /*#__PURE__*/_jsx(motion.div,{style:{x,y},onHoverStart:()=>{isHoveringRef.current=true;},onHoverEnd:()=>{isHoveringRef.current=false;lastEvent.current=null;animate(x,0,transition.end);animate(y,0,transition.end);},onPointerMove:e=>{lastEvent.current=e;},children:hasChild?children:/*#__PURE__*/_jsx(Placeholder,{})});}function Placeholder(){return /*#__PURE__*/_jsx(\"div\",{style:{backgroundColor:\"rgba(0,0,0,0.9)\",width:320,height:120,display:\"flex\",alignItems:\"center\",justifyContent:\"center\",color:\"white\",lineHeight:1,textAlign:\"center\",fontSize:12},children:/*#__PURE__*/_jsxs(\"div\",{children:[/*#__PURE__*/_jsx(\"p\",{children:\"🧲\"}),/*#__PURE__*/_jsx(\"strong\",{children:\"Connect to Content\"}),/*#__PURE__*/_jsx(\"p\",{children:\"Add children to use the Magnet effect\"})]})});}addPropertyControls(Magnet,{children:{title:\"Content\",type:ControlType.ComponentInstance},transition:{type:ControlType.Object,controls:{frame:{type:ControlType.Transition,defaultValue:{type:\"tween\",duration:.4,ease:[0,0,1,1]}},end:{type:ControlType.Transition,defaultValue:{type:\"spring\",stiffness:400,damping:20,mass:3}}}},intensity:{type:ControlType.Number,defaultValue:1,min:0,max:2,step:.01}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"Magnet\",\"slots\":[\"children\"],\"annotations\":{\"framerDisableUnlink\":\"* @framerSupportedLayoutWidth any\",\"framerContractVersion\":\"1\",\"framerSupportedLayoutHeight\":\"any\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Magnet.map"],"mappings":"6TAC2C,IAAqF,IAA4B,CAAoC,EAAK,0BAAgC,EAAkB,EAAW,SAAS,EAAM,EAAI,CAAC,OAAoB,EAAK,MAAM,CAAC,GAAG,EAAU,MAAI,SAAS,EAAM,SAAS,CAAC,EAAG,CAAO,EAAU,EAAO,OAAO,EAAK,CAAO,EAAiB,GAAY,EAAM,IAAM,CAAC,GAAK,CAAC,WAAS,WAAS,WAAS,GAAG,GAAM,EAAM,OAAO,EAAsB,EAAK,EAAU,CAAC,GAAG,EAAc,WAAa,MAAa,WAAS,CAAC,CAAc,EAAK,MAAM,CAAC,GAAG,EAAS,MAAa,WAAS,CAAC,EAAG,CAAO,EAAI,4sCAAktC,GAAU,CAAC,QAAM,QAAM,SAAO,KAAG,QAAM,SAAO,GAAG,MAAgB,CAAC,GAAG,EAAM,UAAU,GAAO,EAAM,WAAW,eAAe,UAAU,GAAQ,EAAM,WAAW,IAAI,UAAU,GAAO,EAAM,UAAU,EAUliE,EAAK,EAV6jE,EAAiB,SAAS,EAAM,EAAI,CAAC,GAAK,CAAC,QAAM,YAAU,WAAS,UAAQ,YAAU,YAAU,YAAU,GAAG,GAAW,EAAS,EAAM,CAAO,EAAK,EAAe,YAAY,EAAI,CAAC,OAAoB,EAAK,EAAI,CAAC,GAAG,EAAU,UAAU,EAAG,eAAe,EAAU,CAAU,WAAa,MAAI,KAAK,eAAe,MAAM,CAAC,YAAY,EAAU,WAAW,EAAU,WAAW,EAAU,GAAG,EAAM,CAAC,QAAQ,YAAY,SAAsB,EAAK,MAAM,CAAM,OAAK,CAAC,CAAC,CAAC,EAAG,CAAW,CAAC,iCAAiC,EAAK,2CAA2C,EAAK,kBAAkB,CAUrmF,eAA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