{"version":3,"file":"SvgAnimator.YuA8mLmr.mjs","names":["useRef"],"sources":["https:/framerusercontent.com/modules/ADTBkyMrFttRMkR1xnRt/GUgHFZOsV6PL6xVrdmEH/SvgAnimator.js"],"sourcesContent":["// Animated SVG Block\n// Small block that animates an uploaded SVG up and down with a satisfying motion\nimport{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useRef,useEffect}from\"react\";import{addPropertyControls,ControlType,RenderTarget}from\"framer\";import{motion,useAnimation}from\"framer-motion\";/**\n * SvgAnimator\n *\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight any-prefer-fixed\n */export default function SvgAnimator(props){const{svgFile=\"https://framerusercontent.com/images/GfGkADagM4KEibNcIiRUWlfrR0.jpg\",speed,amplitude,background,borderRadius,style}=props;const controls=useAnimation();const blockRef=useRef(null);const isStatic=[\"canvas\",\"thumbnail\",\"export\"].includes(RenderTarget.current());useEffect(()=>{if(!isStatic){controls.start({y:[0,amplitude,0],transition:{duration:speed,repeat:Infinity,ease:\"easeInOut\"}});}else{controls.set({y:0});}},[isStatic,amplitude,speed,controls]);return /*#__PURE__*/_jsxs(motion.div,{ref:blockRef,style:{width:\"100%\",height:\"100%\",display:\"flex\",alignItems:\"center\",justifyContent:\"center\",background,borderRadius,overflow:\"visible\",position:\"relative\",...style},animate:controls,children:[props.children&&/*#__PURE__*/_jsx(\"div\",{style:{position:\"absolute\",top:0,left:0,width:\"100%\",height:\"100%\",zIndex:0,display:\"flex\",alignItems:\"center\",justifyContent:\"center\",pointerEvents:\"auto\"},children:props.children}),svgFile&&svgFile.endsWith(\".svg\")?/*#__PURE__*/_jsx(\"img\",{src:svgFile,alt:\"Animated SVG\",style:{width:\"60%\",height:\"60%\",objectFit:\"contain\",display:\"block\",pointerEvents:\"none\",userSelect:\"none\",zIndex:1,position:\"relative\"},draggable:false}):/*#__PURE__*/_jsx(\"span\",{style:{color:\"#888\",fontSize:12,zIndex:1,position:\"relative\"},children:\"Upload SVG\"})]});}addPropertyControls(SvgAnimator,{svgFile:{type:ControlType.File,allowedFileTypes:[\"svg\"]},speed:{type:ControlType.Number,title:\"Speed (s)\",defaultValue:2,min:.5,max:10,step:.1},amplitude:{type:ControlType.Number,title:\"Amplitude (px)\",defaultValue:20,min:5,max:100,step:1},background:{type:ControlType.Color,title:\"Background\",defaultValue:\"#FFFFFF\"},borderRadius:{type:ControlType.BorderRadius,defaultValue:\"8px\",title:\"Radius\"},children:{type:ControlType.Slot,title:\"Underneath Frame\",maxCount:1}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"SvgAnimator\",\"slots\":[\"children\"],\"annotations\":{\"framerSupportedLayoutHeight\":\"any-prefer-fixed\",\"framerContractVersion\":\"1\",\"framerSupportedLayoutWidth\":\"any-prefer-fixed\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./SvgAnimator.map"],"mappings":"uPAOG,SAAwB,EAAY,EAAM,CAAC,GAAK,CAAC,UAAQ,sEAAsE,QAAM,YAAU,aAAW,eAAa,SAAO,EAAY,EAAS,GAAc,CAAO,EAASA,EAAO,KAAK,CAAO,EAAS,CAAC,SAAS,YAAY,SAAS,CAAC,SAAS,EAAa,SAAS,CAAC,CAAiM,OAAhM,MAAc,CAAK,EAAiH,EAAS,IAAI,CAAC,EAAE,EAAE,CAAC,CAA1H,EAAS,MAAM,CAAC,EAAE,CAAC,EAAE,EAAU,EAAE,CAAC,WAAW,CAAC,SAAS,EAAM,OAAO,IAAS,KAAK,YAAY,CAAC,CAAC,EAA8B,CAAC,EAAS,EAAU,EAAM,EAAS,CAAC,CAAqB,EAAM,EAAO,IAAI,CAAC,IAAI,EAAS,MAAM,CAAC,MAAM,OAAO,OAAO,OAAO,QAAQ,OAAO,WAAW,SAAS,eAAe,SAAS,aAAW,eAAa,SAAS,UAAU,SAAS,WAAW,GAAG,EAAM,CAAC,QAAQ,EAAS,SAAS,CAAC,EAAM,UAAu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