{"version":3,"file":"ScrollSnap.CVM7X8zf.mjs","names":["__esmMin","init_ssg_sandbox_shims","c","J","init_jsx_runtime","init_npm_react_18_3_1","window","withScrollSnapRow","Component","props","withScrollSnapItem","findRow","node","el","row","scrollRow","first","gap","step","direction","withScrollPrev","event","withScrollNext","init_ScrollSnap"],"sources":["https:/framerusercontent.com/modules/O1hbmPVlvor5llh95ZOf/4b2SRGM5fhM8bRTEjmVv/ScrollSnap.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{forwardRef}from\"react\";export function withScrollSnapRow(Component){return /*#__PURE__*/forwardRef((props,ref)=>/*#__PURE__*/_jsx(Component,{ref:ref,...props,\"data-scroll-snap-row\":\"\",style:{...props.style,overflowX:\"auto\",overflowY:\"hidden\",scrollSnapType:\"x mandatory\",overscrollBehaviorX:\"contain\",WebkitOverflowScrolling:\"touch\"}}));}export function withScrollSnapItem(Component){return /*#__PURE__*/forwardRef((props,ref)=>/*#__PURE__*/_jsx(Component,{ref:ref,...props,style:{...props.style,scrollSnapAlign:\"start\",flexShrink:0}}));}function findRow(el){let node=el?el.parentElement:null;while(node){const row=node.querySelector('[data-scroll-snap-row], [style*=\"scroll-snap-type\"]');if(row)return row;node=node.parentElement;}return null;}function scrollRow(el,direction){if(typeof window===\"undefined\")return;const row=findRow(el);if(!row)return;const first=row.firstElementChild;const gap=parseFloat(window.getComputedStyle(row).columnGap)||0;const step=first?first.getBoundingClientRect().width+gap:row.clientWidth;row.scrollBy({left:direction*step,behavior:\"smooth\"});}export function withScrollPrev(Component){return /*#__PURE__*/forwardRef((props,ref)=>/*#__PURE__*/_jsx(Component,{ref:ref,...props,\"aria-label\":\"Previous\",role:\"button\",onClick:event=>{props.onClick?.(event);scrollRow(event.currentTarget,-1);}}));}export function withScrollNext(Component){return /*#__PURE__*/forwardRef((props,ref)=>/*#__PURE__*/_jsx(Component,{ref:ref,...props,\"aria-label\":\"Next\",role:\"button\",onClick:event=>{props.onClick?.(event);scrollRow(event.currentTarget,1);}}));}\nexport const __FramerMetadata__ = {\"exports\":{\"withScrollSnapRow\":{\"type\":\"reactHoc\",\"name\":\"withScrollSnapRow\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withScrollPrev\":{\"type\":\"reactHoc\",\"name\":\"withScrollPrev\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withScrollSnapItem\":{\"type\":\"reactHoc\",\"name\":\"withScrollSnapItem\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withScrollNext\":{\"type\":\"reactHoc\",\"name\":\"withScrollNext\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./ScrollSnap.map"],"mappings":"A,gIAAyE,SAAgBO,EAAkB,EAAU,CAAC,MAAoB,iBAAY,EAAM,IAAmB,gBAAKC,EAAU,CAAK,MAAI,GAAGC,EAAM,uBAAuB,GAAG,MAAM,CAAC,GAAGA,EAAM,MAAM,UAAU,OAAO,UAAU,SAAS,eAAe,cAAc,oBAAoB,UAAU,wBAAwB,OAAO,CAAC,CAAC,CAAC,CAAE,CAAC,SAAgBC,EAAmB,EAAU,CAAC,MAAoB,iBAAY,EAAM,IAAmB,gBAAKF,EAAU,CAAK,MAAI,GAAGC,EAAM,MAAM,CAAC,GAAGA,EAAM,MAAM,gBAAgB,QAAQ,WAAW,CAAC,CAAC,CAAC,CAAC,CAAE,CAAC,SAASE,EAAQ,EAAG,CAAC,IAAIC,EAAKC,EAAGA,EAAG,cAAc,KAAK,KAAMD,GAAK,CAAC,IAAME,EAAIF,EAAK,cAAc,qDAAqD,EAAE,GAAGE,EAAI,OAAOA,EAAI,EAAKF,EAAK,aAAc,CAAC,OAAO,IAAK,CAAC,SAASG,EAAU,EAAG,EAAU,CAAC,GAAUT,IAAS,OAAY,OAAO,IAAMQ,EAAIH,EAAQE,CAAE,EAAE,GAAG,CAACC,EAAI,OAAO,IAAME,EAAMF,EAAI,kBAAwBG,EAAI,WAAWX,EAAO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