{"version":3,"file":"CMS_Carousel.D4hJrbfE.mjs","names":["useState","__legacyOverrideHOC_DataObserverContext","_jsx"],"sources":["https:/framerusercontent.com/modules/DZvcHWRnv94pHMkexChj/sWgn85tKwdbXsHKZ67pc/CMS_Carousel.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{useState,useEffect}from\"react\";/**\n * ═══════════════════════════════════════════════════════════════\n *  SIMPLE HORIZONTAL SCROLL WITH TRIGGERS\n * ═══════════════════════════════════════════════════════════════\n *\n * SETUP (3 STEPS):\n *\n * 1. SELECT YOUR STACK → Apply \"Scroll\"\n * 2. SELECT LEFT ARROW → Apply \"TriggerLeft\"\n * 3. SELECT RIGHT ARROW → Apply \"TriggerRight\"\n *\n * Done! Your arrows will now control the scroll!\n */// Store reference to scroll container\nlet container=null;/**\n * STEP 1: Apply this to your STACK\n */export function Scroll(){return{ref:element=>{container=element;},style:{overflowX:\"scroll\",overflowY:\"hidden\",scrollbarWidth:\"none\",WebkitOverflowScrolling:\"touch\",msOverflowStyle:\"none\"}};}/**\n * STEP 2: Apply this to LEFT ARROW button/frame\n */export function TriggerLeft(){return{style:{cursor:\"pointer\",WebkitTapHighlightColor:\"transparent\"},onTap:()=>{if(container){const scrollAmount=container.clientWidth*.8;const newPosition=container.scrollLeft-scrollAmount;container.scrollTo({left:Math.max(0,newPosition),behavior:\"smooth\"});}},whileTap:{scale:.95}};}/**\n * STEP 3: Apply this to RIGHT ARROW button/frame\n */export function TriggerRight(){return{style:{cursor:\"pointer\",WebkitTapHighlightColor:\"transparent\"},onTap:()=>{if(container){const scrollAmount=container.clientWidth*.8;const newPosition=container.scrollLeft+scrollAmount;const maxScroll=container.scrollWidth-container.clientWidth;container.scrollTo({left:Math.min(maxScroll,newPosition),behavior:\"smooth\"});}},whileTap:{scale:.95}};}/**\n * ═══════════════════════════════════════════════════════════════\n *  BONUS: SNAP TO CARDS\n * ═══════════════════════════════════════════════════════════════\n *//**\n * Apply to STACK for snap-to-card behavior\n */export function ScrollSnap(){return{ref:element=>{container=element;},style:{overflowX:\"scroll\",overflowY:\"hidden\",scrollSnapType:\"x mandatory\",scrollbarWidth:\"none\",WebkitOverflowScrolling:\"touch\",msOverflowStyle:\"none\"}};}/**\n * Apply to EACH CARD for snap behavior\n */export function SnapItem(){return{style:{scrollSnapAlign:\"start\",scrollSnapStop:\"always\",flexShrink:0}};}/**\n * ═══════════════════════════════════════════════════════════════\n *  BONUS: ONE CARD AT A TIME\n * ═══════════════════════════════════════════════════════════════\n *//**\n * Scroll exactly ONE card left\n */export function OneCardLeft(){return{style:{cursor:\"pointer\",WebkitTapHighlightColor:\"transparent\"},onTap:()=>{if(!container||!container.children.length)return;const firstCard=container.children[0];const cardWidth=firstCard.offsetWidth;const gap=20;const newPosition=container.scrollLeft-(cardWidth+gap);container.scrollTo({left:Math.max(0,newPosition),behavior:\"smooth\"});},whileTap:{scale:.95}};}/**\n * Scroll exactly ONE card right\n */export function OneCardRight(){return{style:{cursor:\"pointer\",WebkitTapHighlightColor:\"transparent\"},onTap:()=>{if(!container||!container.children.length)return;const firstCard=container.children[0];const cardWidth=firstCard.offsetWidth;const gap=20;const newPosition=container.scrollLeft+(cardWidth+gap);const maxScroll=container.scrollWidth-container.clientWidth;container.scrollTo({left:Math.min(maxScroll,newPosition),behavior:\"smooth\"});},whileTap:{scale:.95}};}/**\n * ═══════════════════════════════════════════════════════════════\n *  BONUS: SMART ARROWS (hide when can't scroll)\n * ═══════════════════════════════════════════════════════════════\n *//**\n * Left arrow that hides at start\n */export function SmartLeft(){return Component=>{return props=>{const[show,setShow]=useState(false);useEffect(()=>{if(!container)return;const check=()=>{setShow(container.scrollLeft>10);};check();container.addEventListener(\"scroll\",check,{passive:true});return()=>container.removeEventListener(\"scroll\",check);},[]);return /*#__PURE__*/_jsx(Component,{...props,style:{...props.style,opacity:show?1:.3,pointerEvents:show?\"auto\":\"none\",WebkitTapHighlightColor:\"transparent\"},onTap:()=>{if(!container)return;const scrollAmount=container.clientWidth*.8;const newPosition=container.scrollLeft-scrollAmount;container.scrollTo({left:Math.max(0,newPosition),behavior:\"smooth\"});}});};};}/**\n * Right arrow that hides at end\n */export function SmartRight(){return Component=>{return props=>{const[show,setShow]=useState(true);useEffect(()=>{if(!container)return;const check=()=>{const atEnd=container.scrollLeft>=container.scrollWidth-container.clientWidth-10;setShow(!atEnd);};check();container.addEventListener(\"scroll\",check,{passive:true});return()=>container.removeEventListener(\"scroll\",check);},[]);return /*#__PURE__*/_jsx(Component,{...props,style:{...props.style,opacity:show?1:.3,pointerEvents:show?\"auto\":\"none\",WebkitTapHighlightColor:\"transparent\"},onTap:()=>{if(!container)return;const scrollAmount=container.clientWidth*.8;const newPosition=container.scrollLeft+scrollAmount;const maxScroll=container.scrollWidth-container.clientWidth;container.scrollTo({left:Math.min(maxScroll,newPosition),behavior:\"smooth\"});}});};};}/**\n * ═══════════════════════════════════════════════════════════════\n *  USAGE SUMMARY\n * ═══════════════════════════════════════════════════════════════\n *\n * BASIC SETUP:\n * Stack → Scroll\n * Left Arrow → TriggerLeft\n * Right Arrow → TriggerRight\n *\n * WITH SNAP:\n * Stack → ScrollSnap\n * Each Card → SnapItem\n * Left Arrow → TriggerLeft\n * Right Arrow → TriggerRight\n *\n * ONE CARD AT A TIME:\n * Stack → Scroll or ScrollSnap\n * Left Arrow → OneCardLeft\n * Right Arrow → OneCardRight\n *\n * SMART ARROWS (auto-hide):\n * Stack → Scroll or ScrollSnap\n * Left Arrow → SmartLeft\n * Right Arrow → SmartRight\n *\n * ═══════════════════════════════════════════════════════════════\n */import{useContext as __legacyOverrideHOC_useContext}from\"react\";import{DataObserverContext as __legacyOverrideHOC_DataObserverContext}from\"framer\";export function withScroll(C){return props=>{__legacyOverrideHOC_useContext(__legacyOverrideHOC_DataObserverContext);return _jsx(C,{...props,...Scroll(props)});};}withScroll.displayName=\"Scroll\";export function withTriggerLeft(C){return props=>{__legacyOverrideHOC_useContext(__legacyOverrideHOC_DataObserverContext);return _jsx(C,{...props,...TriggerLeft(props)});};}withTriggerLeft.displayName=\"TriggerLeft\";export function withTriggerRight(C){return props=>{__legacyOverrideHOC_useContext(__legacyOverrideHOC_DataObserverContext);return _jsx(C,{...props,...TriggerRight(props)});};}withTriggerRight.displayName=\"TriggerRight\";export function withScrollSnap(C){return props=>{__legacyOverrideHOC_useContext(__legacyOverrideHOC_DataObserverContext);return _jsx(C,{...props,...ScrollSnap(props)});};}withScrollSnap.displayName=\"ScrollSnap\";export function withSnapItem(C){return props=>{__legacyOverrideHOC_useContext(__legacyOverrideHOC_DataObserverContext);return _jsx(C,{...props,...SnapItem(props)});};}withSnapItem.displayName=\"SnapItem\";export function withOneCardLeft(C){return props=>{__legacyOverrideHOC_useContext(__legacyOverrideHOC_DataObserverContext);return _jsx(C,{...props,...OneCardLeft(props)});};}withOneCardLeft.displayName=\"OneCardLeft\";export function withOneCardRight(C){return props=>{__legacyOverrideHOC_useContext(__legacyOverrideHOC_DataObserverContext);return _jsx(C,{...props,...OneCardRight(props)});};}withOneCardRight.displayName=\"OneCardRight\";export function withSmartLeft(C){return props=>{__legacyOverrideHOC_useContext(__legacyOverrideHOC_DataObserverContext);return _jsx(C,{...props,...SmartLeft(props)});};}withSmartLeft.displayName=\"SmartLeft\";export function withSmartRight(C){return props=>{__legacyOverrideHOC_useContext(__legacyOverrideHOC_DataObserverContext);return _jsx(C,{...props,...SmartRight(props)});};}withSmartRight.displayName=\"SmartRight\";\nexport const __FramerMetadata__ = {\"exports\":{\"withOneCardLeft\":{\"type\":\"reactHoc\",\"name\":\"withOneCardLeft\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withSnapItem\":{\"type\":\"reactHoc\",\"name\":\"withSnapItem\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withScroll\":{\"type\":\"reactHoc\",\"name\":\"withScroll\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withSmartLeft\":{\"type\":\"reactHoc\",\"name\":\"withSmartLeft\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withTriggerRight\":{\"type\":\"reactHoc\",\"name\":\"withTriggerRight\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withSmartRight\":{\"type\":\"reactHoc\",\"name\":\"withSmartRight\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withScrollSnap\":{\"type\":\"reactHoc\",\"name\":\"withScrollSnap\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"SmartLeft\":{\"type\":\"override\",\"name\":\"SmartLeft\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"OneCardRight\":{\"type\":\"override\",\"name\":\"OneCardRight\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"OneCardLeft\":{\"type\":\"override\",\"name\":\"OneCardLeft\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"SnapItem\":{\"type\":\"override\",\"name\":\"SnapItem\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"Scroll\":{\"type\":\"override\",\"name\":\"Scroll\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withTriggerLeft\":{\"type\":\"reactHoc\",\"name\":\"withTriggerLeft\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withOneCardRight\":{\"type\":\"reactHoc\",\"name\":\"withOneCardRight\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"ScrollSnap\":{\"type\":\"override\",\"name\":\"ScrollSnap\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"SmartRight\":{\"type\":\"override\",\"name\":\"SmartRight\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"TriggerRight\":{\"type\":\"override\",\"name\":\"TriggerRight\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"TriggerLeft\":{\"type\":\"override\",\"name\":\"TriggerLeft\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./CMS_Carousel.map"],"mappings":"4KAeG,SAAgB,GAAQ,CAAC,MAAM,CAAC,IAAI,GAAS,CAAC,EAAU,GAAU,MAAM,CAA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