{"version":3,"file":"HorizontalShift.CZfe89Px.mjs","names":["useState","useRef"],"sources":["https:/framerusercontent.com/modules/uhGmDRcmcssOulmY72Me/oWtYisLh2WM0xLSXBuSC/HorizontalShift.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{forwardRef,useRef,useState,useEffect}from\"react\";import{useTransform,useScroll}from\"framer-motion\";// Learn more: https://www.framer.com/developers/overrides/\n// Custom hook to check viewport width\nfunction useViewportWidth(){const[isWideViewport,setIsWideViewport]=useState(false);useEffect(()=>{const checkViewportWidth=()=>{setIsWideViewport(window.innerWidth>1199);};checkViewportWidth();window.addEventListener(\"resize\",checkViewportWidth);return()=>window.removeEventListener(\"resize\",checkViewportWidth);},[]);return isWideViewport;}export function withShiftMinus300(Component){return /*#__PURE__*/forwardRef((props,ref)=>{const elementRef=useRef(null);const isWideViewport=useViewportWidth();const{scrollXProgress}=useScroll({target:elementRef,axis:\"x\",offset:[\"start end\",\"end -300px start\"]});const x=useTransform(scrollXProgress,[0,1],[0,-300]);return /*#__PURE__*/_jsx(Component,{ref:node=>{if(typeof ref===\"function\")ref(node);else if(ref)ref.current=node;elementRef.current=node;},...props,style:{...props.style,x:isWideViewport?x:0}});});}export function withShiftMinus100(Component){return /*#__PURE__*/forwardRef((props,ref)=>{const elementRef=useRef(null);const isWideViewport=useViewportWidth();const{scrollXProgress}=useScroll({target:elementRef,axis:\"x\",offset:[\"start end\",\"end -100px start\"]});const x=useTransform(scrollXProgress,[0,1],[0,-100]);return /*#__PURE__*/_jsx(Component,{ref:node=>{if(typeof ref===\"function\")ref(node);else if(ref)ref.current=node;elementRef.current=node;},...props,style:{...props.style,x:isWideViewport?x:0}});});}export function withShiftMinus50(Component){return /*#__PURE__*/forwardRef((props,ref)=>{const elementRef=useRef(null);const isWideViewport=useViewportWidth();const{scrollXProgress}=useScroll({target:elementRef,axis:\"x\",offset:[\"start end\",\"end -50px start\"]});const x=useTransform(scrollXProgress,[0,1],[0,-50]);return /*#__PURE__*/_jsx(Component,{ref:node=>{if(typeof ref===\"function\")ref(node);else if(ref)ref.current=node;elementRef.current=node;},...props,style:{...props.style,x:isWideViewport?x:0}});});}export function withShift50(Component){return /*#__PURE__*/forwardRef((props,ref)=>{const elementRef=useRef(null);const isWideViewport=useViewportWidth();const{scrollXProgress}=useScroll({target:elementRef,axis:\"x\",offset:[\"start end\",\"end -50px start\"]});const x=useTransform(scrollXProgress,[0,1],[0,50]);return /*#__PURE__*/_jsx(Component,{ref:node=>{if(typeof ref===\"function\")ref(node);else if(ref)ref.current=node;elementRef.current=node;},...props,style:{...props.style,x:isWideViewport?x:0}});});}export function withShift100(Component){return /*#__PURE__*/forwardRef((props,ref)=>{const elementRef=useRef(null);const isWideViewport=useViewportWidth();const{scrollXProgress}=useScroll({target:elementRef,axis:\"x\",offset:[\"start end\",\"end -100px start\"]});const x=useTransform(scrollXProgress,[0,1],[0,100]);return /*#__PURE__*/_jsx(Component,{ref:node=>{if(typeof ref===\"function\")ref(node);else if(ref)ref.current=node;elementRef.current=node;},...props,style:{...props.style,x:isWideViewport?x:0}});});}export function withShift200(Component){return /*#__PURE__*/forwardRef((props,ref)=>{const elementRef=useRef(null);const isWideViewport=useViewportWidth();const{scrollXProgress}=useScroll({target:elementRef,axis:\"x\",offset:[\"start end\",\"end -200px start\"]});const x=useTransform(scrollXProgress,[0,1],[0,200]);return /*#__PURE__*/_jsx(Component,{ref:node=>{if(typeof ref===\"function\")ref(node);else if(ref)ref.current=node;elementRef.current=node;},...props,style:{...props.style,x:isWideViewport?x:0}});});}export function withShift300(Component){return /*#__PURE__*/forwardRef((props,ref)=>{const elementRef=useRef(null);const isWideViewport=useViewportWidth();const{scrollXProgress}=useScroll({target:elementRef,axis:\"x\",offset:[\"start end\",\"end -300px start\"]});const x=useTransform(scrollXProgress,[0,1],[0,300]);return /*#__PURE__*/_jsx(Component,{ref:node=>{if(typeof ref===\"function\")ref(node);else if(ref)ref.current=node;elementRef.current=node;},...props,style:{...props.style,x:isWideViewport?x:0}});});}export function withShift400(Component){return /*#__PURE__*/forwardRef((props,ref)=>{const elementRef=useRef(null);const isWideViewport=useViewportWidth();const{scrollXProgress}=useScroll({target:elementRef,axis:\"x\",offset:[\"start end\",\"end -400px start\"]});const x=useTransform(scrollXProgress,[0,1],[0,400]);return /*#__PURE__*/_jsx(Component,{ref:node=>{if(typeof ref===\"function\")ref(node);else if(ref)ref.current=node;elementRef.current=node;},...props,style:{...props.style,x:isWideViewport?x:0}});});}export function withShift500(Component){return /*#__PURE__*/forwardRef((props,ref)=>{const elementRef=useRef(null);const isWideViewport=useViewportWidth();const{scrollXProgress}=useScroll({target:elementRef,axis:\"x\",offset:[\"start end\",\"end -500px start\"]});const x=useTransform(scrollXProgress,[0,1],[0,500]);return /*#__PURE__*/_jsx(Component,{ref:node=>{if(typeof ref===\"function\")ref(node);else if(ref)ref.current=node;elementRef.current=node;},...props,style:{...props.style,x:isWideViewport?x:0}});});}\nexport const __FramerMetadata__ = {\"exports\":{\"withShift300\":{\"type\":\"reactHoc\",\"name\":\"withShift300\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withShiftMinus300\":{\"type\":\"reactHoc\",\"name\":\"withShiftMinus300\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withShift500\":{\"type\":\"reactHoc\",\"name\":\"withShift500\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withShift200\":{\"type\":\"reactHoc\",\"name\":\"withShift200\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withShift400\":{\"type\":\"reactHoc\",\"name\":\"withShift400\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withShift50\":{\"type\":\"reactHoc\",\"name\":\"withShift50\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withShiftMinus100\":{\"type\":\"reactHoc\",\"name\":\"withShiftMinus100\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withShift100\":{\"type\":\"reactHoc\",\"name\":\"withShift100\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withShi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