{"version":3,"file":"Slideable.MSaUD9WD.mjs","names":["useState","useRef"],"sources":["https:/framerusercontent.com/modules/mc1eNFwZups6YMPeLijX/KXjodJ5Pjm1hmxKEfnBl/Slideable.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{motion}from\"framer-motion\";import{useState,useEffect,useRef}from\"react\";export function withSliderOverride(Component){return props=>{const[width,setWidth]=useState(0);const carouselRef=useRef(null);useEffect(()=>{function updateStateOnResize(){if(!carouselRef.current)return;const{scrollWidth,offsetWidth}=carouselRef.current;setWidth(()=>scrollWidth-offsetWidth);}updateStateOnResize();window.addEventListener(\"resize\",updateStateOnResize);return()=>window.removeEventListener(\"resize\",updateStateOnResize);},[]);return /*#__PURE__*/_jsx(motion.div,{ref:carouselRef,initial:{opacity:0},animate:{opacity:1},transition:{duration:.4},whileTap:{cursor:\"grabbing\"},style:{cursor:\"grab\",touchAction:\"pan-y\"},children:/*#__PURE__*/_jsx(motion.div,{drag:\"x\",dragConstraints:{right:0,left:-width},dragTransition:{power:.2,timeConstant:100},dragElastic:.2,children:/*#__PURE__*/_jsx(Component,{...props})},width)});};}\nexport const __FramerMetadata__ = {\"exports\":{\"withSliderOverride\":{\"type\":\"reactHoc\",\"name\":\"withSliderOverride\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Slideable.map"],"mappings":"0LAA0H,SAAgB,EAAmB,EAAU,CAAC,MAAO,IAAO,CAAC,GAAK,CAAC,EAAM,GAAUA,EAAS,CAAC,EAAQ,EAAYC,EAAO,IAAI,EAA8T,OAA5T,MAAc,CAAC,SAAS,GAAqB,CAAC,GAAG,CAAC,EAAY,QAAQ,OAAO,GAAK,CAAC,cAAY,eAAa,EAAY,QAAQ,MAAa,EAAY,CAAW,CAAE,CAA6E,OAA5E,EAAoB,EAAE,EAAO,iBAAiB,SAAS,CAAmB,MAAY,EAAO,oBAAoB,SAAS,CAAmB,CAAE,EAAE,CAAC,CAAC,EAAsB,EAAK,EAAO,IAAI,CAAC,IAAI,EAAY,QAAQ,CAAC,QAAQ,CAAC,EAAE,QAAQ,CAAC,QAAQ,CAAC,EAAE,WAAW,CAAC,SAAS,EAAE,EAAE,SAAS,CAAC,OAAO,UAAU,EAAE,MAAM,CAAC,OAAO,OAAO,YAAY,OAAO,EAAE,SAAsB,EAAK,EAAO,IAAI,CAAC,KAAK,IAAI,gBAAgB,CAAC,MAAM,EAAE,KAAK,CAAC,CAAK,EAAE,eAAe,CAAC,MAAM,GAAG,aAAa,GAAG,EAAE,YAAY,GAAG,SAAsB,EAAK,EAAU,CAAC,GAAG,CAAK,CAAC,CAAC,EAAE,CAAK,CAAC,CAAC,CAAE,CAAE,qBAAp5B,IAAkC,IAA6C"}