{"version":3,"file":"ImageSlideshow.BWO5T25Y.mjs","names":["useRef","useState","startTransition","_Fragment","__esmMin","init_ssg_sandbox_shims","te","window","_e","de","l","p","init_jsx_runtime","init_npm_react_18_3_1","ce","motion","init_framer_motion_DhsWWWsN","init_framer_BL9pqxmF","addPropertyControls","ControlType","useIsStaticRenderer","ImageSlideshow","props","items","slides","s","count","isStatic","rootRef","width","setWidth","ready","setReady","pos","setPos","instant","setInstant","el","timer","ro","w","entries","autoplay","id","interval","x","gap","active","step","dir","settle","arrowStyle","arrowInset","arrowSize","arrowBackground","arrowColor","draggable","threshold","info","i","radius","item","showArrows","arrowGap","init_ImageSlideshow"],"sources":["https:/framerusercontent.com/modules/2JuIdbXSo6GIXBzNasdE/6kxy2GJNq2bUMHf34zis/ImageSlideshow.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from\"react/jsx-runtime\";import{useEffect,useRef,useState,startTransition}from\"react\";import{addPropertyControls,ControlType,useIsStaticRenderer}from\"framer\";import{motion}from\"framer-motion\";/**\n * Image Slideshow\n *\n * A full-size, looping image slideshow. Images are added from the side panel.\n * Slots without an image are skipped.\n *\n * @framerIntrinsicWidth 960\n * @framerIntrinsicHeight 600\n *\n * @framerSupportedLayoutWidth any\n * @framerSupportedLayoutHeight any\n */export default function ImageSlideshow(props){const{slides,autoplay=true,interval=3,draggable=true,gap=0,radius=0,showArrows=true,arrowSize=50,arrowColor=\"#1b2425\",arrowBackground=\"#ece9dc\",arrowInset=30,arrowGap=10}=props;const items=(slides||[]).filter(s=>s&&s.image&&s.image.src).map(s=>({src:s.image.src,srcSet:s.image.srcSet,alt:s.alt||s.image.alt||\"\"}));const count=items.length;const isStatic=useIsStaticRenderer();const rootRef=useRef(null);const[width,setWidth]=useState(0);const[ready,setReady]=useState(false);const[pos,setPos]=useState(count);const[instant,setInstant]=useState(false);useEffect(()=>{const el=rootRef.current;if(!el||typeof ResizeObserver===\"undefined\")return;let timer=0;const ro=new ResizeObserver(entries=>{const w=entries[0].contentRect.width;if(w>0){setWidth(w);if(!timer)timer=window.setTimeout(()=>setReady(true),60);}});ro.observe(el);return()=>{ro.disconnect();window.clearTimeout(timer);};},[]);useEffect(()=>{if(!autoplay||isStatic||count<2)return;const id=window.setInterval(()=>{startTransition(()=>setPos(p=>p+1));},Math.max(1,interval)*1e3);return()=>window.clearInterval(id);},[autoplay,isStatic,count,interval]);if(count===0){return /*#__PURE__*/_jsx(\"div\",{ref:rootRef,style:{...props.style,overflow:\"hidden\"}});}const x=-pos*(width+gap);const active=(pos%count+count)%count;const step=dir=>startTransition(()=>setPos(p=>p+dir));const settle=()=>{if(pos<count||pos>=count*2){setInstant(true);setPos(count+active);window.setTimeout(()=>setInstant(false),50);}};const arrowStyle={position:\"absolute\",bottom:arrowInset,width:arrowSize,height:arrowSize,borderRadius:0,border:\"none\",background:arrowBackground,color:arrowColor,cursor:\"pointer\",display:\"flex\",alignItems:\"center\",justifyContent:\"center\",zIndex:2,padding:0};return /*#__PURE__*/_jsxs(\"div\",{ref:rootRef,role:\"region\",\"aria-roledescription\":\"carousel\",\"aria-label\":\"Image slideshow\",style:{...props.style,overflow:\"hidden\",userSelect:\"none\",visibility:ready||isStatic?\"visible\":\"hidden\"},children:[/*#__PURE__*/_jsx(motion.div,{drag:isStatic||!draggable?false:\"x\",dragConstraints:{left:x,right:x},dragElastic:.2,onDragEnd:(_,info)=>{const threshold=width*.15;if(info.offset.x<-threshold||info.velocity.x<-400)step(1);else if(info.offset.x>threshold||info.velocity.x>400)step(-1);},initial:false,animate:{x},transition:instant||!ready?{duration:0}:{type:\"spring\",stiffness:200,damping:40,mass:1},onAnimationComplete:settle,style:{display:\"flex\",gap,height:\"100%\",width:\"max-content\",cursor:draggable?\"grab\":\"default\"},children:[...items,...items,...items].map((item,i)=>/*#__PURE__*/_jsx(\"div\",{role:\"group\",\"aria-roledescription\":\"slide\",\"aria-label\":`${i%count+1} of ${count}`,style:{flex:\"0 0 auto\",width,height:\"100%\",borderRadius:radius,overflow:\"hidden\"},children:/*#__PURE__*/_jsx(\"img\",{src:item.src,srcSet:item.srcSet,alt:item.alt,draggable:false,style:{width:\"100%\",height:\"100%\",objectFit:\"cover\",display:\"block\",pointerEvents:\"none\"}})},i))}),showArrows&&count>1&&/*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx(motion.button,{type:\"button\",\"aria-label\":\"Previous image\",whileTap:{scale:.9},onClick:()=>step(-1),style:{...arrowStyle,right:arrowInset+arrowSize+arrowGap},children:/*#__PURE__*/_jsx(\"svg\",{width:\"18\",height:\"18\",viewBox:\"0 0 24 24\",fill:\"none\",stroke:\"currentColor\",strokeWidth:\"2.3\",strokeLinecap:\"round\",strokeLinejoin:\"round\",children:/*#__PURE__*/_jsx(\"path\",{d:\"M20 12H4M10 6l-6 6 6 6\"})})}),/*#__PURE__*/_jsx(motion.button,{type:\"button\",\"aria-label\":\"Next image\",whileTap:{scale:.9},onClick:()=>step(1),style:{...arrowStyle,right:arrowInset},children:/*#__PURE__*/_jsx(\"svg\",{width:\"18\",height:\"18\",viewBox:\"0 0 24 24\",fill:\"none\",stroke:\"currentColor\",strokeWidth:\"2.3\",strokeLinecap:\"round\",strokeLinejoin:\"round\",children:/*#__PURE__*/_jsx(\"path\",{d:\"M4 12h16M14 6l6 6-6 6\"})})})]})]});}addPropertyControls(ImageSlideshow,{slides:{type:ControlType.Array,title:\"Slides\",control:{type:ControlType.Object,controls:{image:{type:ControlType.ResponsiveImage,title:\"Image\"},alt:{type:ControlType.String,title:\"Alt text\",defaultValue:\"\"}}},defaultValue:[{alt:\"\"},{alt:\"\"},{alt:\"\"}]},autoplay:{type:ControlType.Boolean,title:\"Autoplay\",defaultValue:true},interval:{type:ControlType.Number,title:\"Interval\",defaultValue:3,min:1,max:12,step:.5,unit:\"s\",hidden:p=>!p.autoplay},draggable:{type:ControlType.Boolean,title:\"Draggable\",defaultValue:true},gap:{type:ControlType.Number,title:\"Gap\",defaultValue:0,min:0,max:80,step:1,unit:\"px\"},radius:{type:ControlType.Number,title:\"Radius\",defaultValue:0,min:0,max:40,step:1,unit:\"px\"},showArrows:{type:ControlType.Boolean,title:\"Arrows\",defaultValue:true},arrowSize:{type:ControlType.Number,title:\"Arrow Size\",defaultValue:50,min:30,max:80,step:1,unit:\"px\",hidden:p=>!p.showArrows},arrowColor:{type:ControlType.Color,title:\"Arrow\",defaultValue:\"#1b2425\",hidden:p=>!p.showArrows},arrowBackground:{type:ControlType.Color,title:\"Arrow BG\",defaultValue:\"#ece9dc\",hidden:p=>!p.showArrows},arrowInset:{type:ControlType.Number,title:\"Arrow Inset\",defaultValue:30,min:0,max:80,step:1,unit:\"px\",hidden:p=>!p.showArrows},arrowGap:{type:ControlType.Number,title:\"Arrow Gap\",defaultValue:10,min:0,max:40,step:1,unit:\"px\",hidden:p=>!p.showArrows}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"ImageSlideshow\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerSupportedLayoutHeight\":\"any\",\"framerSupportedLayoutWidth\":\"any\",\"framerIntrinsicHeight\":\"600\",\"framerIntrinsicWidth\":\"960\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./ImageSlideshow.map"],"mappings":"A,oRAWG,SAAwBqB,EAAe,EAAM,CAAC,GAAK,CAAC,SAAO,WAAS,GAAK,WAAS,EAAE,YAAU,GAAK,MAAI,EAAE,SAAO,EAAE,aAAW,GAAK,YAAU,GAAG,aAAW,UAAU,kBAAgB,UAAU,aAAW,GAAG,WAAS,IAAIC,EAAYC,GAAOC,GAAQ,CAAC,EAAA,CAAG,OAAO,GAAGC,GAAGA,EAAE,OAAOA,EAAE,MAAM,GAAG,CAAC,CAAC,IAAI,IAAI,CAAC,IAAIA,EAAE,MAAM,IAAI,OAAOA,EAAE,MAAM,OAAO,IAAIA,EAAE,KAAKA,EAAE,MAAM,KAAK,EAAE,EAAE,EA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