{"version":3,"file":"Lightbox.wuOkTWXW.mjs","names":["useState","_Fragment","useRef"],"sources":["https:/framerusercontent.com/modules/B0JfxNKCxhQ6IXTCkmVI/Zl1lVCqyJq5Dprcp5AMw/Lightbox.js"],"sourcesContent":["/*\n * Lightbox for Framer (Modified)\n * ✅ White background\n * ✅ No hover overlay on gallery images\n * ✅ Keeps arrows and full functionality\n * ✅ Light grey icons with no circle background\n */import{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from\"react/jsx-runtime\";import{useState,useEffect,useRef}from\"react\";import{motion,AnimatePresence}from\"framer-motion\";import{createPortal}from\"react-dom\";const arrowSizeMobile=30;const arrowSizeDesktop=40;const arrowColor=\"#ccc\";const arrowHoverColor=\"#aaa\";const closeButtonSize=30;const closeColor=\"#ccc\";const closeHoverColor=\"#aaa\";const lightboxBackground=\"#ffffff\";const galleryStore={images:[],currentIndex:0,registerImage(image){if(!this.images.includes(image)){this.images.push(image);}},getCurrentImage(){return this.images[this.currentIndex];},goNext(){this.currentIndex=(this.currentIndex+1)%this.images.length;},goPrevious(){this.currentIndex=(this.currentIndex-1+this.images.length)%this.images.length;},reset(){this.images=[];this.currentIndex=0;}};const useScrollLock=()=>{const scrollYRef=useRef(0);const lockScroll=()=>{scrollYRef.current=window.scrollY;document.body.style.position=\"fixed\";document.body.style.top=`-${scrollYRef.current}px`;document.body.style.width=\"100%\";document.body.style.overflow=\"hidden\";};const unlockScroll=()=>{document.body.style.position=\"\";document.body.style.top=\"\";document.body.style.width=\"\";document.body.style.overflow=\"unset\";window.scrollTo(0,scrollYRef.current);};return{lockScroll,unlockScroll};};export function withGallery(Component){return props=>{const[hasMounted,setHasMounted]=useState(false);const[isMobile,setIsMobile]=useState(false);const[isOpen,setIsOpen]=useState(false);const[currentImage,setCurrentImage]=useState(null);const[swipeStartX,setSwipeStartX]=useState(0);const{lockScroll,unlockScroll}=useScrollLock();const dragConstraintsRef=useRef(null);const[isDragging,setIsDragging]=useState(false);const src=props.background?.src;if(src&&!galleryStore.images.includes(src)){galleryStore.registerImage(src);}const openGallery=event=>{event.stopPropagation();event.preventDefault();if(!src)return;lockScroll();setCurrentImage(src);galleryStore.currentIndex=galleryStore.images.indexOf(src);setIsOpen(true);};const closeGallery=()=>{setIsOpen(false);setCurrentImage(null);unlockScroll();};const showNextImage=()=>{galleryStore.goNext();setCurrentImage(galleryStore.getCurrentImage());};const showPreviousImage=()=>{galleryStore.goPrevious();setCurrentImage(galleryStore.getCurrentImage());};const handleKeyDown=event=>{if(!isOpen)return;if(event.key===\"ArrowRight\")showNextImage();if(event.key===\"ArrowLeft\")showPreviousImage();if(event.key===\"Escape\")closeGallery();};const handleTouchStart=e=>{setSwipeStartX(e.touches[0].clientX);};const handleTouchEnd=e=>{const swipeEndX=e.changedTouches[0].clientX;const deltaX=swipeStartX-swipeEndX;if(Math.abs(deltaX)>50){if(deltaX>0)showNextImage();else showPreviousImage();}};const handleDrag=(_,info)=>{if(!isMobile)return{y:0};return{y:Math.min(Math.max(info.offset.y,-100),100)};};useEffect(()=>{setHasMounted(true);return()=>galleryStore.reset();},[]);useEffect(()=>{const handleResize=()=>{const isMobile=window.matchMedia(\"(pointer: coarse)\").matches||window.innerWidth<=768;setIsMobile(isMobile);};handleResize();window.addEventListener(\"resize\",handleResize);return()=>window.removeEventListener(\"resize\",handleResize);},[]);useEffect(()=>{if(isOpen)window.addEventListener(\"keydown\",handleKeyDown);return()=>window.removeEventListener(\"keydown\",handleKeyDown);},[isOpen]);const portalTarget=hasMounted?document.body:null;return /*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx(Component,{...props,onClick:openGallery,style:{...props.style,position:\"relative\",cursor:\"pointer\",userSelect:\"none\"}}),hasMounted&&portalTarget&&/*#__PURE__*/createPortal(/*#__PURE__*/_jsx(AnimatePresence,{children:isOpen&&currentImage&&/*#__PURE__*/_jsxs(motion.div,{onClick:event=>{if(!isDragging&&event.target===event.currentTarget)closeGallery();},style:{position:\"fixed\",top:0,left:0,width:\"100vw\",height:\"100vh\",background:lightboxBackground,display:\"flex\",justifyContent:\"center\",alignItems:\"center\",zIndex:1e5},initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},children:[/*#__PURE__*/_jsx(motion.img,{src:currentImage,loading:\"lazy\",style:{maxWidth:isMobile?\"95vw\":\"calc(90vw - 100px)\",maxHeight:\"85vh\",touchAction:\"none\",objectFit:\"contain\",borderRadius:\"0\",cursor:isMobile?\"grab\":\"auto\"},initial:{scale:.8},animate:{scale:1},drag:isMobile?\"y\":false,dragConstraints:{top:0,bottom:0},dragElastic:.2,whileTap:{cursor:\"grabbing\"},onDrag:handleDrag,onTouchStart:handleTouchStart,onTouchEnd:handleTouchEnd,onDragStart:()=>setIsDragging(true),onDragEnd:()=>setIsDragging(false)}),!isMobile&&galleryStore.images.length>1&&/*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx(motion.div,{onClick:e=>{e.stopPropagation();showPreviousImage();},style:{position:\"absolute\",top:\"50%\",left:\"30px\",transform:\"translateY(-50%)\",cursor:\"pointer\",zIndex:100001},children:/*#__PURE__*/_jsx(\"svg\",{width:\"20\",height:\"20\",viewBox:\"0 0 24 24\",fill:\"none\",xmlns:\"http://www.w3.org/2000/svg\",children:/*#__PURE__*/_jsx(\"path\",{d:\"M15 6L9 12L15 18\",stroke:arrowColor,strokeWidth:\"2\",strokeLinecap:\"round\",strokeLinejoin:\"round\"})})}),/*#__PURE__*/_jsx(motion.div,{onClick:e=>{e.stopPropagation();showNextImage();},style:{position:\"absolute\",top:\"50%\",right:\"30px\",transform:\"translateY(-50%)\",cursor:\"pointer\",zIndex:100001},children:/*#__PURE__*/_jsx(\"svg\",{width:\"20\",height:\"20\",viewBox:\"0 0 24 24\",fill:\"none\",xmlns:\"http://www.w3.org/2000/svg\",children:/*#__PURE__*/_jsx(\"path\",{d:\"M9 6L15 12L9 18\",stroke:arrowColor,strokeWidth:\"2\",strokeLinecap:\"round\",strokeLinejoin:\"round\"})})})]}),/*#__PURE__*/_jsx(motion.div,{onClick:closeGallery,style:{position:\"absolute\",top:\"20px\",right:\"20px\",cursor:\"pointer\",zIndex:100001},children:/*#__PURE__*/_jsx(\"svg\",{width:\"16\",height:\"16\",viewBox:\"0 0 24 24\",fill:\"none\",xmlns:\"http://www.w3.org/2000/svg\",children:/*#__PURE__*/_jsx(\"path\",{d:\"M6 6L18 18M6 18L18 6\",stroke:closeColor,strokeWidth:\"2\",strokeLinecap:\"round\",strokeLinejoin:\"round\"})})})]})}),portalTarget)]});};}\nexport const __FramerMetadata__ = {\"exports\":{\"withGallery\":{\"type\":\"reactHoc\",\"name\":\"withGallery\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Lightbox.map"],"mappings":"6NAMmyC,SAAgB,EAAY,EAAU,CAAC,MAAO,IAAO,CAAC,GAAK,CAAC,EAAW,GAAeA,EAAS,GAAM,CAAM,CAAC,EAAS,GAAaA,EAAS,GAAM,CAAM,CAAC,EAAO,GAAWA,EAAS,GAAM,CAAM,CAAC,EAAa,GAAiBA,EAAS,KAAK,CAAM,CAAC,EAAY,GAAgBA,EAAS,EAAE,CAAM,CAAC,aAAW,gBAAc,GAAe,CAA0B,EAAO,KAAK,CAAC,GAAK,CAAC,EAAW,GAAeA,EAAS,GAAM,CAAO,EAAI,EAAM,YAAY,IAAO,GAAK,CAAC,EAAa,OAAO,SAAS,EAAI,EAAE,EAAa,cAAc,EAAI,CAAE,IAAM,EAAY,GAAO,CAAC,EAAM,iBAAiB,CAAC,EAAM,gBAAgB,CAAK,IAAW,GAAY,CAAC,EAAgB,EAAI,CAAC,EAAa,aAAa,EAAa,OAAO,QAAQ,EAAI,CAAC,EAAU,GAAK,GAAS,MAAiB,CAAC,EAAU,GAAM,CAAC,EAAgB,KAAK,CAAC,GAAc,EAAS,MAAkB,CAAC,EAAa,QAAQ,CAAC,EAAgB,EAAa,iBAAiB,CAAC,EAAS,MAAsB,C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