{"version":3,"file":"PawsAnimation.CN6duBHW.mjs","names":["useState","useRef","useMemo"],"sources":["https:/framerusercontent.com/modules/9rGvkWk2oJN9Ei9hWcMz/PLvQBsliiUZUKwr8P7Ti/PawsAnimation.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useEffect,useState,useMemo,startTransition,useRef}from\"react\";import{motion,AnimatePresence}from\"framer-motion\";import{addPropertyControls,ControlType}from\"framer\";/**\n * Paws Animation\n *\n * Animated paw prints walking across the screen.\n *\n * @framerIntrinsicWidth 500\n * @framerIntrinsicHeight 200\n *\n * @framerSupportedLayoutWidth any\n * @framerSupportedLayoutHeight any\n */export default function PawsAnimation(props){const{pawColor=\"#000000\",pawSize=40,spacing=60,stepDistance=30,animationDuration=.5,fadeOutDuration=.5,trailLength=10,totalPaws=20,loop=true,useCustomImage=false,customImage=\"\"}=props;const[activePaws,setActivePaws]=useState([]);const[currentIndex,setCurrentIndex]=useState(0);const containerRef=useRef(null);const[containerSize,setContainerSize]=useState({width:500,height:200});const[pathId,setPathId]=useState(0);useEffect(()=>{if(typeof window===\"undefined\")return;const updateSize=()=>{if(containerRef.current){const rect=containerRef.current.getBoundingClientRect();startTransition(()=>{setContainerSize({width:rect.width,height:rect.height});});}};updateSize();window.addEventListener(\"resize\",updateSize);return()=>window.removeEventListener(\"resize\",updateSize);},[]);const pawPath=useMemo(()=>{const paws=[];const steps=totalPaws*2;// Random starting Y position (0-100% of container height)\nconst startYPercent=.2+Math.random()*.6// Keep within 20-80% to stay visible\n;const startY=startYPercent*(containerSize.height-pawSize);// Random walking direction: 1 = left to right, -1 = right to left\nconst walkDirection=Math.random()>.5?1:-1;const startX=walkDirection===1?-pawSize:containerSize.width+pawSize;// Slight vertical variation for natural feel\nconst verticalVariation=20;for(let i=0;i<steps;i++){const isLeft=i%2===0;const stepIndex=Math.floor(i/2);// Horizontal movement with configurable step distance\nconst x=walkDirection===1?startX+stepIndex*stepDistance:startX-stepIndex*stepDistance;// Slight vertical wobble for natural walk feel\nconst yOffset=isLeft?-20:20;const wobble=Math.sin(stepIndex*.3)*verticalVariation;const y=startY+yOffset+wobble;// Rotation: 0 for left-to-right, 180 for right-to-left\nconst rotation=walkDirection===1?0:180;paws.push({id:i,x,y,rotation,side:isLeft?\"left\":\"right\",uniqueId:`${i}-${currentIndex}`});}return paws;},[trailLength,containerSize.width,containerSize.height,totalPaws,pawSize,pathId]);useEffect(()=>{let interval;const animate=()=>{if(currentIndex<pawPath.length){startTransition(()=>{setActivePaws(prev=>{const newPaws=[...prev,pawPath[currentIndex]];if(newPaws.length>trailLength){newPaws.shift();}return newPaws;});setCurrentIndex(prev=>prev+1);});}else if(loop){// Generate new random path\nstartTransition(()=>{setActivePaws([]);setCurrentIndex(0);setPathId(prev=>prev+1);});}};interval=window.setInterval(animate,spacing*10);return()=>clearInterval(interval);},[currentIndex,pawPath,spacing,trailLength,loop]);return /*#__PURE__*/_jsx(\"div\",{ref:containerRef,style:{width:\"100%\",height:\"100%\",position:\"relative\",overflow:\"hidden\"},children:/*#__PURE__*/_jsx(AnimatePresence,{children:activePaws.map(paw=>/*#__PURE__*/_jsx(motion.div,{initial:{opacity:0,scale:1,rotate:paw.rotation},animate:{opacity:1,scale:1,rotate:paw.rotation},exit:{opacity:0,scale:1,transition:{duration:fadeOutDuration}},transition:{duration:animationDuration,ease:\"easeOut\"},style:{position:\"absolute\",left:paw.x,top:paw.y,width:pawSize,height:pawSize,opacity:.8},children:useCustomImage&&customImage?/*#__PURE__*/_jsx(\"img\",{src:customImage,alt:\"Custom paw\",style:{width:\"100%\",height:\"100%\",objectFit:\"contain\"}}):/*#__PURE__*/_jsxs(\"svg\",{viewBox:\"0 0 100 100\",width:\"100%\",height:\"100%\",fill:pawColor,children:[/*#__PURE__*/_jsx(\"ellipse\",{cx:\"50\",cy:\"65\",rx:\"25\",ry:\"30\"}),/*#__PURE__*/_jsx(\"circle\",{cx:\"25\",cy:\"35\",r:\"12\"}),/*#__PURE__*/_jsx(\"circle\",{cx:\"45\",cy:\"20\",r:\"12\"}),/*#__PURE__*/_jsx(\"circle\",{cx:\"65\",cy:\"20\",r:\"12\"}),/*#__PURE__*/_jsx(\"circle\",{cx:\"85\",cy:\"35\",r:\"12\"})]})},`${paw.id}-${currentIndex}`))})});}addPropertyControls(PawsAnimation,{pawColor:{type:ControlType.Color,title:\"Paw Color\",defaultValue:\"#000000\",hidden:({useCustomImage})=>useCustomImage},pawSize:{type:ControlType.Number,title:\"Paw Size\",defaultValue:40,min:20,max:100,step:5,unit:\"px\"},spacing:{type:ControlType.Number,title:\"Spacing\",defaultValue:60,min:20,max:200,step:10,unit:\"ms\"},stepDistance:{type:ControlType.Number,title:\"Step Distance\",defaultValue:30,min:10,max:80,step:5,unit:\"px\"},animationDuration:{type:ControlType.Number,title:\"Fade Duration\",defaultValue:.5,min:.1,max:2,step:.1,unit:\"s\"},trailLength:{type:ControlType.Number,title:\"Trail Length\",defaultValue:10,min:3,max:20,step:1},loop:{type:ControlType.Boolean,title:\"Loop\",defaultValue:true,enabledTitle:\"On\",disabledTitle:\"Off\"},fadeOutDuration:{type:ControlType.Number,title:\"Fade Out Duration\",defaultValue:.5,min:.1,max:3,step:.1,unit:\"s\"},totalPaws:{type:ControlType.Number,title:\"Total Paws\",defaultValue:20,min:5,max:50,step:1},useCustomImage:{type:ControlType.Boolean,title:\"Custom Image\",defaultValue:false,enabledTitle:\"Custom\",disabledTitle:\"Default\"},customImage:{type:ControlType.File,title:\"Upload Image\",allowedFileTypes:[\"jpg\",\"jpeg\",\"png\",\"gif\",\"webp\",\"svg\"],hidden:({useCustomImage})=>!useCustomImage}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"PawsAnimation\",\"slots\":[],\"annotations\":{\"framerIntrinsicWidth\":\"500\",\"framerSupportedLayoutWidth\":\"any\",\"framerIntrinsicHeight\":\"200\",\"framerContractVersion\":\"1\",\"framerSupportedLayoutHeight\":\"any\"}},\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