{
  "version": 3,
  "sources": ["ssg:https://framerusercontent.com/modules/iIO36q5lEpYQECZvTCmk/FQVYRCwiukySG2tOkG6I/Parallax_img_1.js"],
  "sourcesContent": ["import{jsx as _jsx}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";import{useEffect,useRef,useState}from\"react\";export function ParallaxImage({image,intensity,borderRadius,uniqueKey,altText}){const containerRef=useRef(null);const imageRef=useRef(null);let animationFrame=useRef(null);// Generate a unique key dynamically (prevents Framer key conflicts)\nconst[componentKey]=useState(uniqueKey||`parallax-${Math.random()}`);useEffect(()=>{const handleScroll=()=>{if(!containerRef.current||!imageRef.current)return;const rect=containerRef.current.getBoundingClientRect();const viewportHeight=window.innerHeight;const progress=rect.top/viewportHeight;// Apply a slower parallax movement\nconst moveY=progress*intensity*-5;// Smooth animation using requestAnimationFrame\ncancelAnimationFrame(animationFrame.current);animationFrame.current=requestAnimationFrame(()=>{imageRef.current.style.transform=`translateY(${moveY}px)`;});};window.addEventListener(\"scroll\",handleScroll);return()=>{window.removeEventListener(\"scroll\",handleScroll);cancelAnimationFrame(animationFrame.current);};},[intensity]);// Get image source (CMS image or direct URL)\nconst isCMSImage=typeof image===\"object\"&&image!==null&&\"url\"in image;const imageSrc=isCMSImage?image.url:image;return /*#__PURE__*/_jsx(\"div\",{ref:containerRef,style:{...containerStyle,borderRadius},children:/*#__PURE__*/_jsx(\"img\",{ref:imageRef,src:imageSrc,alt:altText,style:{...imageStyle,borderRadius}})},componentKey);}// Styles\nconst containerStyle={overflow:\"hidden\",position:\"relative\",width:\"100%\",height:\"100%\"};const imageStyle={position:\"absolute\",top:\"0%\",left:\"0\",height:\"105%\",width:\"100%\",objectFit:\"cover\",willChange:\"transform\"};// Framer Property Controls\naddPropertyControls(ParallaxImage,{image:{type:ControlType.Image,title:\"Select Image\"},altText:{type:ControlType.String,title:\"Alt Text\",defaultValue:\"Parallax Image\"},intensity:{type:ControlType.Number,title:\"Parallax Intensity\",min:5,max:100,step:1,defaultValue:20},borderRadius:{type:ControlType.Number,title:\"Border Radius\",min:0,max:100,step:1,defaultValue:0,displayStepper:true}});\nexport const __FramerMetadata__ = {\"exports\":{\"ParallaxImage\":{\"type\":\"reactComponent\",\"name\":\"ParallaxImage\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Parallax_img_1.map"],
  "mappings": "uJAAmJ,SAASA,EAAc,CAAC,MAAAC,EAAM,UAAAC,EAAU,aAAAC,EAAa,UAAAC,EAAU,QAAAC,CAAO,EAAE,CAAC,IAAMC,EAAaC,EAAO,IAAI,EAAQC,EAASD,EAAO,IAAI,EAAME,EAAeF,EAAO,IAAI,EACjT,CAACG,CAAY,EAAEC,EAASP,GAAW,YAAY,KAAK,OAAO,CAAC,EAAE,EAAEQ,EAAU,IAAI,CAAC,IAAMC,EAAa,IAAI,CAAC,GAAG,CAACP,EAAa,SAAS,CAACE,EAAS,QAAQ,OAAO,IAAMM,EAAKR,EAAa,QAAQ,sBAAsB,EAAQS,EAAeC,EAAO,YAC7OC,EADwQH,EAAK,IAAIC,EAClQb,EAAU,GAC/B,qBAAqBO,EAAe,OAAO,EAAEA,EAAe,QAAQ,sBAAsB,IAAI,CAACD,EAAS,QAAQ,MAAM,UAAU,cAAcS,CAAK,KAAM,CAAC,CAAE,EAAE,OAAAD,EAAO,iBAAiB,SAASH,CAAY,EAAQ,IAAI,CAACG,EAAO,oBAAoB,SAASH,CAAY,EAAE,qBAAqBJ,EAAe,OAAO,CAAE,CAAE,EAAE,CAACP,CAAS,CAAC,EAChQ,IAAMgB,EAA3D,OAAOjB,GAAQ,UAAUA,IAAQ,MAAM,QAAQA,EAAgCA,EAAM,IAAIA,EAAM,OAAoBkB,EAAK,MAAM,CAAC,IAAIb,EAAa,MAAM,CAAC,GAAGc,EAAe,aAAAjB,CAAY,EAAE,SAAsBgB,EAAK,MAAM,CAAC,IAAIX,EAAS,IAAIU,EAAS,IAAIb,EAAQ,MAAM,CAAC,GAAGgB,EAAW,aAAAlB,CAAY,CAAC,CAAC,CAAC,EAAEO,CAAY,CAAE,CACpU,IAAMU,EAAe,CAAC,SAAS,SAAS,SAAS,WAAW,MAAM,OAAO,OAAO,MAAM,EAAQC,EAAW,CAAC,SAAS,WAAW,IAAI,KAAK,KAAK,IAAI,OAAO,OAAO,MAAM,OAAO,UAAU,QAAQ,WAAW,WAAW,EACnNC,EAAoBtB,EAAc,CAAC,MAAM,CAAC,KAAKuB,EAAY,MAAM,MAAM,cAAc,EAAE,QAAQ,CAAC,KAAKA,EAAY,OAAO,MAAM,WAAW,aAAa,gBAAgB,EAAE,UAAU,CAAC,KAAKA,EAAY,OAAO,MAAM,qBAAqB,IAAI,EAAE,IAAI,IAAI,KAAK,EAAE,aAAa,EAAE,EAAE,aAAa,CAAC,KAAKA,EAAY,OAAO,MAAM,gBAAgB,IAAI,EAAE,IAAI,IAAI,KAAK,EAAE,aAAa,EAAE,eAAe,EAAI,CAAC,CAAC",
  "names": ["ParallaxImage", "image", "intensity", "borderRadius", "uniqueKey", "altText", "containerRef", "pe", "imageRef", "animationFrame", "componentKey", "ye", "ue", "handleScroll", "rect", "viewportHeight", "window", "moveY", "imageSrc", "p", "containerStyle", "imageStyle", "addPropertyControls", "ControlType"]
}
