{"version":3,"file":"Floating_Stars.CUmBMCSM.mjs","names":["React"],"sources":["https:/framerusercontent.com/modules/XLifWq7WS0egZGhbTwq0/fPDBVMc2my5JEKjLdnsX/Floating_Stars.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import React from\"react\";import{motion}from\"framer-motion\";import{addPropertyControls,ControlType}from\"framer\";export default function FloatingStars(props){const{size,color,speed,count,swayAmount,speedRandomness,sizeRandomness,swayRandomness}=props;const generateStar=index=>({id:`star-${index}`,left:`${Math.random()*100}%`,speed:speed*(1+(Math.random()-.5)*2*speedRandomness),size:size*(1+(Math.random()-.5)*2*sizeRandomness),sway:swayAmount*(1+(Math.random()-.5)*2*swayRandomness),startPosition:Math.random()*100,swayOffset:Math.random()*Math.PI*2});const stars=React.useMemo(()=>Array.from({length:count},(_,i)=>generateStar(i)),[count,size,speed,speedRandomness,sizeRandomness,swayAmount,swayRandomness]);return /*#__PURE__*/_jsx(\"div\",{style:{width:\"100%\",height:\"100%\",overflow:\"hidden\",position:\"relative\"},children:stars.map(star=>/*#__PURE__*/_jsx(motion.div,{style:{width:star.size,height:star.size,borderRadius:\"50%\",backgroundColor:color,position:\"absolute\",left:star.left,bottom:`${-star.size}px`},animate:{bottom:[\"0%\",\"100%\"],x:[`-${star.sway}px`,`${star.sway}px`,`-${star.sway}px`]},transition:{bottom:{repeat:Infinity,repeatType:\"loop\",duration:10/star.speed,ease:\"linear\",delay:-(10/star.speed*(star.startPosition/100))},x:{repeat:Infinity,duration:3+Math.random()*2,ease:\"easeInOut\"}}},star.id))});}FloatingStars.defaultProps={size:5,color:\"#FFFFFF\",speed:1,count:20,swayAmount:10,speedRandomness:.5,sizeRandomness:.5,swayRandomness:.5};addPropertyControls(FloatingStars,{size:{type:ControlType.Number,title:\"Size\",min:1,max:50,defaultValue:FloatingStars.defaultProps.size},color:{type:ControlType.Color,title:\"Color\",defaultValue:FloatingStars.defaultProps.color},speed:{type:ControlType.Number,title:\"Speed\",min:.1,max:5,step:.1,defaultValue:FloatingStars.defaultProps.speed},count:{type:ControlType.Number,title:\"Count\",min:1,max:100,step:1,defaultValue:FloatingStars.defaultProps.count},swayAmount:{type:ControlType.Number,title:\"Sway Amount\",min:0,max:50,step:1,defaultValue:FloatingStars.defaultProps.swayAmount},speedRandomness:{type:ControlType.Number,title:\"Speed Randomness\",min:0,max:1,step:.1,defaultValue:FloatingStars.defaultProps.speedRandomness},sizeRandomness:{type:ControlType.Number,title:\"Size Randomness\",min:0,max:1,step:.1,defaultValue:FloatingStars.defaultProps.sizeRandomness},swayRandomness:{type:ControlType.Number,title:\"Sway Randomness\",min:0,max:1,step:.1,defaultValue:FloatingStars.defaultProps.swayRandomness}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"FloatingStars\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Floating_Stars.map"],"mappings":"2NAA0J,SAAwB,EAAc,EAAM,CAAC,GAAK,CAAC,OAAK,QAAM,QAAM,QAAM,aAAW,kBAAgB,iBAAe,kBAAgB,EAAY,EAAa,IAAQ,CAAC,GAAG,QAAQ,IAAQ,KAAK,GAAG,KAAK,QAAQ,CAAC,IAAI,GAAG,MAAM,GAAO,GAAG,KAAK,QAAQ,CAAC,IAAI,EAAE,GAAiB,KAAK,GAAM,GAAG,KAAK,QAAQ,CAAC,IAAI,EAAE,GAAgB,KAAK,GAAY,GAAG,KAAK,QAAQ,CAAC,IAAI,EAAE,GAAgB,cAAc,KAAK,QAAQ,CAAC,IAAI,WAAW,KAAK,QAAQ,CAAC,KAAK,GAAG,EAAE,EAA+J,OAAoB,EAAK,MAAM,CAAC,MAAM,CAAC,MAAM,OAAO,OAAO,OAAO,SAAS,SAAS,SAAS,WAAW,CAAC,SAA1PA,EAAM,YAAY,MAAM,KAAK,CAAC,OAAO,EAAM,EAAE,EAAE,IAAI,EAAa,EAAE,CAAC,C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