{"version":3,"file":"Examples.pVITCHdj.mjs","names":["useState","useRef","useCallback","__esmMin","init_npm_react_18_3_1","ne","init_ssg_sandbox_shims","window","_e","J","init_jsx_runtime","ce","de","init_framer_DcGZRLrs","Data","useObserveData","createStore","dataStore","state1","setDataStore","newState","storeState","storeSetters","setStoreState","setter","useStore","state","setState","init_createStore","init_store_js__1_0","centerContent","init_Utils","init_utils_js__0_9","isTypingTarget","target","tag","parseGalleryPhotoIndex","label","match","parsed","isVisibleElement","element","style","isEnabledElement","buttonCandidate","getGalleryPhotoElement","candidates","root","index","ensureGalleryArrowListener","galleryArrowListenerAttached","onKeyDown","event","activeGalleryPhotoIndex","activeGalleryRoot","nextIndex","nextPhoto","releaseGalleryArrowListener","galleryArrowListenerCount","removeGalleryArrowListener","withGalleryArrowNavigation","containerRef","setRefs","node","ref","onContainerClickCapture","rawTarget","matched","nearest","descendant","parsedIndex","Component","props","init_Examples"],"sources":["https:/framerusercontent.com/modules/vj7bFUjvEQFgEzNBkdoG/vf3CKm378wlVcBk7IhSU/createStore.js","https:/framer.com/m/framer/store.js@^1.0.0","https:/framerusercontent.com/modules/28rXvpPsrum7FH6cMELS/1jCAazZw1EGHjrG5Nu5D/Utils.js","https:/framer.com/m/framer/utils.js@^0.9.0","https:/framerusercontent.com/modules/dgQXt0KFZK6allfFS2D8/R8DzvMcvx79p2ty0yNWM/Examples.js"],"sourcesContent":["import{useState,useEffect}from\"react\";import{Data,useObserveData}from\"framer\";export function createStore(state1){// Use Data so that a Preview reload resets the state\nconst dataStore=Data({state:Object.freeze({...state1})});// Create a set function that updates the state\nconst setDataStore=newState=>{// If the state is an object, make sure we copy it\nif(typeof newState===\"function\"){newState=newState(dataStore.state);}dataStore.state=Object.freeze({...dataStore.state,...newState});};// Store the initial state, copy the object if it's an object\nlet storeState=typeof state1===\"object\"?Object.freeze({...state1}):state1;// Keep a list of all the listeners, in the form of React hook setters\nconst storeSetters=new Set();// Create a set function that updates all the listeners / setters\nconst setStoreState=newState=>{// If the state is an object, make sure we copy it\nif(typeof newState===\"function\"){newState=newState(storeState);}storeState=typeof newState===\"object\"?Object.freeze({...storeState,...newState}):newState;// Update all the listeners / setters with the new value\nstoreSetters.forEach(setter=>setter(storeState));};// Create the actual hook based on everything above\nfunction useStore(){// Create the hook we are going to use as a listener\nconst[state,setState]=useState(storeState);// If we unmount the component using this hook, we need to remove the listener\n// @ts-ignore\nuseEffect(()=>{// But right now, we need to add the listener\nstoreSetters.add(setState);return()=>storeSetters.delete(setState);},[]);// If Data context exists, use Data, otherwise use vanilla React state\nif(useObserveData()===true){useObserveData();return[dataStore.state,setDataStore];}else{// Return the state and a function to update the central store\nreturn[state,setStoreState];}}return useStore;}\nexport const __FramerMetadata__ = {\"exports\":{\"createStore\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./createStore.map","/*\n * createStore (framer/store@1.0.1)\n *\n * Learn More: https://www.framer.com/asset-urls\n */\n\nexport * from \"https://framerusercontent.com/modules/vj7bFUjvEQFgEzNBkdoG/vf3CKm378wlVcBk7IhSU/createStore.js\"\n","export const centerContent = {\n    display: \"flex\",\n    justifyContent: \"center\",\n    alignItems: \"center\"\n};\nexport const autoSizingText = {\n    width: \"max-content\",\n    wordBreak: \"break-word\",\n    overflowWrap: \"break-word\",\n    overflow: \"hidden\",\n    whiteSpace: \"pre-wrap\",\n    flexShrink: 0\n};\nexport const defaultContainerStyles = {\n    ...centerContent,\n    overflow: \"hidden\"\n};\nexport const containerStyles = defaultContainerStyles;\nexport const randomColor = ()=>\"#\" + Math.floor(Math.random() * 16777215).toString(16)\n;\n\nexport const __FramerMetadata__ = {\"exports\":{\"centerContent\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"containerStyles\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"autoSizingText\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"defaultContainerStyles\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"randomColor\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}}}}\n//# sourceMappingURL=./Utils.map","/*\n * Utils (framer/utils@0.9.0)\n *\n * Learn More: https://www.framer.com/asset-urls\n */\n\nexport * from \"https://framerusercontent.com/modules/28rXvpPsrum7FH6cMELS/1jCAazZw1EGHjrG5Nu5D/Utils.js\"\n","import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{Fragment,forwardRef,startTransition,useCallback,useEffect,useRef,useState}from\"react\";import{createStore}from\"https://framer.com/m/framer/store.js@^1.0.0\";import{randomColor}from\"https://framer.com/m/framer/utils.js@^0.9.0\";// Learn more: https://www.framer.com/developers/overrides/\nconst useStore=createStore({background:\"#0099FF\"});let activeGalleryPhotoIndex=null;let activeGalleryRoot=null;let galleryArrowListenerCount=0;let galleryArrowListenerAttached=false;let removeGalleryArrowListener=null;function isTypingTarget(target){if(typeof window===\"undefined\")return false;if(!(target instanceof window.HTMLElement))return false;const tag=target.tagName;if(tag===\"INPUT\"||tag===\"TEXTAREA\"||tag===\"SELECT\")return true;if(target.isContentEditable)return true;if(target.closest('[contenteditable=\"true\"]'))return true;return false;}function parseGalleryPhotoIndex(label){if(!label)return null;const match=label.match(/^Gallery photo (\\d+)$/);if(!match)return null;const parsed=Number(match[1]);return Number.isFinite(parsed)?parsed:null;}function isVisibleElement(element){if(typeof window===\"undefined\")return false;if(element.getClientRects().length===0)return false;const style=window.getComputedStyle(element);return style.display!==\"none\"&&style.visibility!==\"hidden\";}function isEnabledElement(element){const buttonCandidate=element;if(\"disabled\"in buttonCandidate&&buttonCandidate.disabled)return false;return element.getAttribute(\"aria-disabled\")!==\"true\";}function getGalleryPhotoElement(root,index){const candidates=root.querySelectorAll(`[aria-label=\"Gallery photo ${index}\"]`);return Array.from(candidates).find(element=>isVisibleElement(element)&&isEnabledElement(element))??null;}function ensureGalleryArrowListener(){if(typeof window===\"undefined\")return;if(galleryArrowListenerAttached)return;const onKeyDown=event=>{if(event.key!==\"ArrowRight\"&&event.key!==\"ArrowLeft\")return;if(isTypingTarget(event.target))return;if(activeGalleryPhotoIndex===null)return;if(!activeGalleryRoot)return;const nextIndex=event.key===\"ArrowRight\"?activeGalleryPhotoIndex+1:activeGalleryPhotoIndex-1;if(nextIndex<1)return;const nextPhoto=getGalleryPhotoElement(activeGalleryRoot,nextIndex);if(!nextPhoto)return;nextPhoto.click();activeGalleryPhotoIndex=nextIndex;event.preventDefault();};window.addEventListener(\"keydown\",onKeyDown);removeGalleryArrowListener=()=>{window.removeEventListener(\"keydown\",onKeyDown);};galleryArrowListenerAttached=true;}function releaseGalleryArrowListener(){if(galleryArrowListenerCount>0)return;if(!galleryArrowListenerAttached)return;removeGalleryArrowListener?.();removeGalleryArrowListener=null;galleryArrowListenerAttached=false;}export function withRotate(Component){return /*#__PURE__*/forwardRef((props,ref)=>{return /*#__PURE__*/_jsx(Component,{ref:ref,...props,animate:{rotate:90},transition:{duration:2}});});}export function withHover(Component){return /*#__PURE__*/forwardRef((props,ref)=>{return /*#__PURE__*/_jsx(Component,{ref:ref,...props,whileHover:{scale:1.05}});});}export function withRandomColor(Component){return /*#__PURE__*/forwardRef((props,ref)=>{const[store,setStore]=useStore();return /*#__PURE__*/_jsx(Component,{ref:ref,...props,animate:{background:store.background},onClick:()=>{setStore({background:randomColor()});}});});}export function withGalleryKeyboardNext(Component){return /*#__PURE__*/forwardRef((props,ref)=>{const rootRef=useRef(null);const setRefs=useCallback(node=>{rootRef.current=node;if(typeof ref===\"function\"){ref(node);}else if(ref){ref.current=node;}},[ref]);useEffect(()=>{if(typeof window===\"undefined\")return;const isTypingTarget=target=>{if(!(target instanceof HTMLElement))return false;const tag=target.tagName;if(tag===\"INPUT\"||tag===\"TEXTAREA\"||tag===\"SELECT\"){return true;}if(target.isContentEditable)return true;if(target.closest('[contenteditable=\"true\"]'))return true;if(target.closest('[role=\"textbox\"]'))return true;return false;};const isVisible=element=>{if(element.getClientRects().length===0)return false;const style=window.getComputedStyle(element);if(style.display===\"none\"||style.visibility===\"hidden\"){return false;}return true;};const isEnabled=element=>{const disabledElement=element;if(\"disabled\"in disabledElement&&disabledElement.disabled){return false;}return element.getAttribute(\"aria-disabled\")!==\"true\";};const onKeyDown=event=>{if(event.key!==\"ArrowRight\")return;if(isTypingTarget(event.target))return;const root=rootRef.current;if(!root)return;const candidates=root.querySelectorAll('[aria-label=\"Next photo\"]');const nextControl=Array.from(candidates).find(element=>isVisible(element)&&isEnabled(element));if(!nextControl)return;nextControl.click();event.preventDefault();};window.addEventListener(\"keydown\",onKeyDown);return()=>{window.removeEventListener(\"keydown\",onKeyDown);};},[]);return /*#__PURE__*/_jsx(Component,{ref:setRefs,...props});});}export function withGalleryArrowNavigation(Component){return /*#__PURE__*/forwardRef((props,ref)=>{const containerRef=useRef(null);const setRefs=useCallback(node=>{containerRef.current=node;if(typeof ref===\"function\"){ref(node);}else if(ref){ref.current=node;}},[ref]);useEffect(()=>{if(typeof window===\"undefined\")return;galleryArrowListenerCount+=1;ensureGalleryArrowListener();return()=>{galleryArrowListenerCount=Math.max(0,galleryArrowListenerCount-1);releaseGalleryArrowListener();};},[]);useEffect(()=>{if(typeof window===\"undefined\")return;const node=containerRef.current;if(!node)return;const onContainerClickCapture=event=>{const rawTarget=event.target;if(!(rawTarget instanceof window.Element))return;let matched=null;const nearest=rawTarget.closest('[aria-label^=\"Gallery photo \"]');if(nearest&&node.contains(nearest)){matched=nearest;}else{const descendant=rawTarget.querySelector?.('[aria-label^=\"Gallery photo \"]');if(descendant&&node.contains(descendant)){matched=descendant;}}if(!matched)return;const parsedIndex=parseGalleryPhotoIndex(matched.getAttribute(\"aria-label\"));if(parsedIndex!==null){activeGalleryPhotoIndex=parsedIndex;activeGalleryRoot=node;}};node.addEventListener(\"click\",onContainerClickCapture,true);return()=>{node.removeEventListener(\"click\",onContainerClickCapture,true);if(activeGalleryRoot===node){activeGalleryRoot=null;activeGalleryPhotoIndex=null;}};},[]);return /*#__PURE__*/_jsx(Component,{ref:setRefs,...props});});}export function withFullGalleryLightbox(Component){return /*#__PURE__*/forwardRef((props,ref)=>{const containerRef=useRef(null);const overlayRef=useRef(null);const imageRef=useRef(null);const prevButtonRef=useRef(null);const nextButtonRef=useRef(null);const photosRef=useRef([]);const activeIndexRef=useRef(null);const openRef=useRef(false);const ignoreBackdropClickUntilRef=useRef(0);const touchStartRef=useRef(null);const touchLastRef=useRef(null);const setRefs=useCallback(node=>{containerRef.current=node;if(typeof ref===\"function\"){ref(node);}else if(ref){ref.current=node;}},[ref]);const parseBackgroundImageUrl=useCallback(value=>{const trimmed=value.trim();const match=trimmed.match(/^url\\((.*)\\)$/i);if(!match)return null;let raw=match[1].trim();if(raw.startsWith('\"')&&raw.endsWith('\"')||raw.startsWith(\"'\")&&raw.endsWith(\"'\")){raw=raw.slice(1,-1);}return raw.length>0?raw:null;},[]);const collectPhotos=useCallback(()=>{const node=containerRef.current;if(!node||typeof window===\"undefined\")return[];const elements=node.querySelectorAll('[aria-label^=\"Gallery photo \"]');const items=Array.from(elements).map(element=>{const parsedIndex=parseGalleryPhotoIndex(element.getAttribute(\"aria-label\"));if(parsedIndex===null)return null;const src=parseBackgroundImageUrl(window.getComputedStyle(element).backgroundImage);if(!src)return null;return{index:parsedIndex,src};}).filter(item=>item!==null).sort((a,b)=>a.index-b.index);const uniqueByIndex=[];const seen=new Set;for(const item of items){if(seen.has(item.index))continue;seen.add(item.index);uniqueByIndex.push(item);}return uniqueByIndex;},[parseBackgroundImageUrl]);const syncOverlay=useCallback(()=>{if(!overlayRef.current||!imageRef.current)return;const activeIndex=activeIndexRef.current;if(activeIndex===null)return;const photos=photosRef.current;const activePosition=photos.findIndex(photo=>photo.index===activeIndex);if(activePosition<0)return;imageRef.current.src=photos[activePosition].src;if(prevButtonRef.current){const disabled=activePosition<=0;prevButtonRef.current.disabled=disabled;prevButtonRef.current.setAttribute(\"aria-disabled\",String(disabled));prevButtonRef.current.style.opacity=disabled?\"0.45\":\"1\";prevButtonRef.current.style.cursor=disabled?\"not-allowed\":\"pointer\";}if(nextButtonRef.current){const disabled=activePosition>=photos.length-1;nextButtonRef.current.disabled=disabled;nextButtonRef.current.setAttribute(\"aria-disabled\",String(disabled));nextButtonRef.current.style.opacity=disabled?\"0.45\":\"1\";nextButtonRef.current.style.cursor=disabled?\"not-allowed\":\"pointer\";}},[]);const navigateByDelta=useCallback(delta=>{const activeIndex=activeIndexRef.current;if(activeIndex===null)return false;const photos=photosRef.current;const currentPosition=photos.findIndex(photo=>photo.index===activeIndex);if(currentPosition<0)return false;const nextPosition=currentPosition+delta;if(nextPosition<0||nextPosition>=photos.length)return false;activeIndexRef.current=photos[nextPosition].index;syncOverlay();return true;},[syncOverlay]);const closeLightboxRef=useRef(()=>{});const openLightbox=useCallback(clickedIndex=>{if(typeof window===\"undefined\"||typeof document===\"undefined\"){return;}photosRef.current=collectPhotos();if(photosRef.current.length===0)return;const activeExists=photosRef.current.some(photo=>photo.index===clickedIndex);if(!activeExists)return;activeIndexRef.current=clickedIndex;if(overlayRef.current){openRef.current=true;syncOverlay();return;}const overlay=document.createElement(\"div\");overlay.setAttribute(\"role\",\"dialog\");overlay.setAttribute(\"aria-modal\",\"true\");overlay.setAttribute(\"aria-label\",\"Gallery lightbox\");overlay.style.position=\"fixed\";overlay.style.inset=\"0\";overlay.style.background=\"rgba(0, 0, 0, 0.92)\";overlay.style.display=\"flex\";overlay.style.alignItems=\"center\";overlay.style.justifyContent=\"center\";overlay.style.zIndex=\"2147483647\";overlay.style.padding=\"24px\";overlay.style.boxSizing=\"border-box\";overlay.style.touchAction=\"pan-y\";const content=document.createElement(\"div\");content.style.position=\"relative\";content.style.width=\"100%\";content.style.height=\"100%\";content.style.display=\"flex\";content.style.alignItems=\"center\";content.style.justifyContent=\"center\";const image=document.createElement(\"img\");image.alt=\"\";image.style.maxWidth=\"100%\";image.style.maxHeight=\"100%\";image.style.width=\"100%\";image.style.height=\"100%\";image.style.objectFit=\"contain\";image.style.userSelect=\"none\";image.style.pointerEvents=\"none\";const sharedButtonStyle={position:\"absolute\",top:\"50%\",transform:\"translateY(-50%)\",width:\"44px\",height:\"44px\",borderRadius:\"999px\",border:\"1px solid rgba(255,255,255,0.25)\",background:\"rgba(0,0,0,0.5)\",color:\"#FFFFFF\",display:\"flex\",alignItems:\"center\",justifyContent:\"center\",fontSize:\"26px\",lineHeight:\"1\",zIndex:\"2\"};const prevButton=document.createElement(\"button\");prevButton.type=\"button\";prevButton.setAttribute(\"aria-label\",\"Previous photo\");prevButton.textContent=\"‹\";Object.assign(prevButton.style,sharedButtonStyle,{left:\"12px\"});const nextButton=document.createElement(\"button\");nextButton.type=\"button\";nextButton.setAttribute(\"aria-label\",\"Next photo\");nextButton.textContent=\"›\";Object.assign(nextButton.style,sharedButtonStyle,{right:\"12px\"});content.appendChild(image);content.appendChild(prevButton);content.appendChild(nextButton);overlay.appendChild(content);document.body.appendChild(overlay);overlayRef.current=overlay;imageRef.current=image;prevButtonRef.current=prevButton;nextButtonRef.current=nextButton;openRef.current=true;const onPrevClick=event=>{event.preventDefault();event.stopPropagation();navigateByDelta(-1);};const onNextClick=event=>{event.preventDefault();event.stopPropagation();navigateByDelta(1);};const onOverlayClick=event=>{if(event.target!==overlay)return;if(Date.now()<ignoreBackdropClickUntilRef.current)return;closeLightboxRef.current();};const onKeyDown=event=>{if(!openRef.current)return;if(isTypingTarget(event.target))return;if(event.key===\"Escape\"){event.preventDefault();closeLightboxRef.current();return;}if(event.key===\"ArrowRight\"){if(navigateByDelta(1)){event.preventDefault();}return;}if(event.key===\"ArrowLeft\"){if(navigateByDelta(-1)){event.preventDefault();}}};const swipeThreshold=60;const onTouchStart=event=>{const point=event.changedTouches[0];if(!point)return;touchStartRef.current={x:point.clientX,y:point.clientY};touchLastRef.current={x:point.clientX,y:point.clientY};};const onTouchMove=event=>{const point=event.changedTouches[0];if(!point)return;touchLastRef.current={x:point.clientX,y:point.clientY};};const onTouchEnd=()=>{if(!touchStartRef.current||!touchLastRef.current){touchStartRef.current=null;touchLastRef.current=null;return;}const dx=touchLastRef.current.x-touchStartRef.current.x;const dy=touchLastRef.current.y-touchStartRef.current.y;touchStartRef.current=null;touchLastRef.current=null;if(Math.abs(dx)<swipeThreshold)return;if(Math.abs(dx)<=Math.abs(dy))return;const didNavigate=dx<0?navigateByDelta(1):navigateByDelta(-1);if(didNavigate){ignoreBackdropClickUntilRef.current=Date.now()+350;}};closeLightboxRef.current=()=>{if(!overlayRef.current)return;openRef.current=false;window.removeEventListener(\"keydown\",onKeyDown);overlay.removeEventListener(\"click\",onOverlayClick);overlay.removeEventListener(\"touchstart\",onTouchStart);overlay.removeEventListener(\"touchmove\",onTouchMove);overlay.removeEventListener(\"touchend\",onTouchEnd);prevButton.removeEventListener(\"click\",onPrevClick);nextButton.removeEventListener(\"click\",onNextClick);if(overlay.parentNode){overlay.parentNode.removeChild(overlay);}overlayRef.current=null;imageRef.current=null;prevButtonRef.current=null;nextButtonRef.current=null;activeIndexRef.current=null;};prevButton.addEventListener(\"click\",onPrevClick);nextButton.addEventListener(\"click\",onNextClick);overlay.addEventListener(\"click\",onOverlayClick);overlay.addEventListener(\"touchstart\",onTouchStart,{passive:true});overlay.addEventListener(\"touchmove\",onTouchMove,{passive:true});overlay.addEventListener(\"touchend\",onTouchEnd,{passive:true});window.addEventListener(\"keydown\",onKeyDown);syncOverlay();},[collectPhotos,navigateByDelta,syncOverlay]);useEffect(()=>{if(typeof window===\"undefined\")return;const node=containerRef.current;if(!node)return;const onContainerClickCapture=event=>{const rawTarget=event.target;if(!(rawTarget instanceof window.Element))return;const matched=rawTarget.closest('[aria-label^=\"Gallery photo \"]');if(!matched||!node.contains(matched))return;const parsedIndex=parseGalleryPhotoIndex(matched.getAttribute(\"aria-label\"));if(parsedIndex===null)return;event.preventDefault();event.stopPropagation();openLightbox(parsedIndex);};node.addEventListener(\"click\",onContainerClickCapture,true);return()=>{node.removeEventListener(\"click\",onContainerClickCapture,true);closeLightboxRef.current();};},[openLightbox]);return /*#__PURE__*/_jsx(Component,{ref:setRefs,...props});});}function parseClientGalleryLabelIndex(label){if(!label)return null;const match=label.match(/^Client gallery photo (\\d+)$/);if(!match)return null;const parsed=Number(match[1]);return Number.isFinite(parsed)?parsed:null;}function parseBackgroundImageFromComputed(value){const trimmed=value.trim();if(!trimmed||trimmed===\"none\")return null;const match=trimmed.match(/url\\((['\"]?)(.*?)\\1\\)/i);if(!match)return null;const src=match[2]?.trim();return src?src:null;}function collectClientGalleryImagesFromPage(){if(typeof window===\"undefined\"||typeof document===\"undefined\")return[];const elements=document.querySelectorAll('[aria-label^=\"Client gallery photo \"]');return Array.from(elements).map(element=>{const index=parseClientGalleryLabelIndex(element.getAttribute(\"aria-label\"));if(index===null)return null;const src=parseBackgroundImageFromComputed(window.getComputedStyle(element).backgroundImage);if(!src)return null;return{index,src};}).filter(item=>item!==null).sort((a,b)=>a.index-b.index);}export function withClientGalleryLightboxController(Component){return /*#__PURE__*/forwardRef((props,ref)=>{const[currentImageIndex,setCurrentImageIndex]=useState(0);const[isLightboxOpen,setIsLightboxOpen]=useState(false);const[galleryImages,setGalleryImages]=useState([]);const touchStartRef=useRef(null);const touchLastRef=useRef(null);const openLightboxAtLabelIndex=useCallback(labelIndex=>{if(typeof window===\"undefined\")return;const nextImages=collectClientGalleryImagesFromPage();if(nextImages.length===0)return;const nextPosition=nextImages.findIndex(image=>image.index===labelIndex);if(nextPosition<0)return;startTransition(()=>{setGalleryImages(nextImages);setCurrentImageIndex(nextPosition);setIsLightboxOpen(true);});},[]);useEffect(()=>{if(typeof document===\"undefined\"||typeof window===\"undefined\")return;const onDocumentClickCapture=event=>{const rawTarget=event.target;if(!(rawTarget instanceof window.Element))return;const matched=rawTarget.closest('[aria-label^=\"Client gallery photo \"]');if(!matched)return;event.preventDefault();event.stopPropagation();if(\"stopImmediatePropagation\"in event){event.stopImmediatePropagation();}const labelIndex=parseClientGalleryLabelIndex(matched.getAttribute(\"aria-label\"));if(labelIndex===null)return;openLightboxAtLabelIndex(labelIndex);};document.addEventListener(\"click\",onDocumentClickCapture,true);return()=>{document.removeEventListener(\"click\",onDocumentClickCapture,true);};},[openLightboxAtLabelIndex]);const closeLightbox=useCallback(()=>{startTransition(()=>{setIsLightboxOpen(false);});},[]);const goPrevious=useCallback(()=>{if(galleryImages.length===0)return;startTransition(()=>{setCurrentImageIndex(prev=>(prev-1+galleryImages.length)%galleryImages.length);});},[galleryImages.length]);const goNext=useCallback(()=>{if(galleryImages.length===0)return;startTransition(()=>{setCurrentImageIndex(prev=>(prev+1)%galleryImages.length);});},[galleryImages.length]);useEffect(()=>{if(!isLightboxOpen||typeof document===\"undefined\")return;const onKeyDown=event=>{if(event.key===\"Escape\"){event.preventDefault();closeLightbox();return;}if(event.key===\"ArrowLeft\"){event.preventDefault();goPrevious();return;}if(event.key===\"ArrowRight\"){event.preventDefault();goNext();}};document.addEventListener(\"keydown\",onKeyDown);return()=>{document.removeEventListener(\"keydown\",onKeyDown);};},[closeLightbox,goNext,goPrevious,isLightboxOpen]);const onOverlayTouchStart=useCallback(event=>{const touch=event?.changedTouches?.[0];if(!touch)return;touchStartRef.current={x:touch.clientX,y:touch.clientY};touchLastRef.current={x:touch.clientX,y:touch.clientY};},[]);const onOverlayTouchMove=useCallback(event=>{const touch=event?.changedTouches?.[0];if(!touch)return;touchLastRef.current={x:touch.clientX,y:touch.clientY};},[]);const onOverlayTouchEnd=useCallback(()=>{const start=touchStartRef.current;const end=touchLastRef.current;touchStartRef.current=null;touchLastRef.current=null;if(!start||!end)return;const dx=end.x-start.x;const dy=end.y-start.y;const swipeThreshold=56;if(Math.abs(dx)<swipeThreshold)return;if(Math.abs(dx)<=Math.abs(dy))return;if(dx<0){goNext();}else{goPrevious();}},[goNext,goPrevious]);const currentImage=isLightboxOpen&&galleryImages[currentImageIndex]?galleryImages[currentImageIndex]:null;return /*#__PURE__*/_jsxs(Fragment,{children:[/*#__PURE__*/_jsx(Component,{ref:ref,...props}),currentImage?/*#__PURE__*/_jsx(\"div\",{role:\"dialog\",\"aria-modal\":\"true\",\"aria-label\":\"Client gallery lightbox\",onClick:closeLightbox,onTouchStart:onOverlayTouchStart,onTouchMove:onOverlayTouchMove,onTouchEnd:onOverlayTouchEnd,style:{position:\"fixed\",inset:0,background:\"rgba(0, 0, 0, 0.92)\",display:\"flex\",alignItems:\"center\",justifyContent:\"center\",padding:\"24px\",boxSizing:\"border-box\",zIndex:2147483647,touchAction:\"pan-y\"},children:/*#__PURE__*/_jsxs(\"div\",{onClick:event=>event.stopPropagation(),style:{position:\"relative\",width:\"100%\",height:\"100%\",display:\"flex\",alignItems:\"center\",justifyContent:\"center\"},children:[/*#__PURE__*/_jsx(\"button\",{type:\"button\",\"aria-label\":\"Previous client gallery image\",onClick:event=>{event.preventDefault();event.stopPropagation();goPrevious();},style:{position:\"absolute\",left:\"12px\",top:\"50%\",transform:\"translateY(-50%)\",width:\"48px\",height:\"48px\",borderRadius:\"999px\",border:\"1px solid rgba(255,255,255,0.28)\",background:\"rgba(0,0,0,0.55)\",color:\"#FFFFFF\",display:\"flex\",alignItems:\"center\",justifyContent:\"center\",fontSize:\"28px\",lineHeight:\"1\",zIndex:3,pointerEvents:\"auto\",cursor:\"pointer\"},children:\"‹\"}),/*#__PURE__*/_jsx(\"img\",{src:currentImage.src,alt:\"\",style:{width:\"100%\",height:\"100%\",maxWidth:\"100%\",maxHeight:\"100%\",objectFit:\"contain\",userSelect:\"none\"}}),/*#__PURE__*/_jsx(\"button\",{type:\"button\",\"aria-label\":\"Next client gallery image\",onClick:event=>{event.preventDefault();event.stopPropagation();goNext();},style:{position:\"absolute\",right:\"12px\",top:\"50%\",transform:\"translateY(-50%)\",width:\"48px\",height:\"48px\",borderRadius:\"999px\",border:\"1px solid rgba(255,255,255,0.28)\",background:\"rgba(0,0,0,0.55)\",color:\"#FFFFFF\",display:\"flex\",alignItems:\"center\",justifyContent:\"center\",fontSize:\"28px\",lineHeight:\"1\",zIndex:3,pointerEvents:\"auto\",cursor:\"pointer\"},children:\"›\"})]})}):null]});});}\nexport const __FramerMetadata__ = {\"exports\":{\"withClientGalleryLightboxController\":{\"type\":\"reactHoc\",\"name\":\"withClientGalleryLightboxController\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withRandomColor\":{\"type\":\"reactHoc\",\"name\":\"withRandomColor\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withHover\":{\"type\":\"reactHoc\",\"name\":\"withHover\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withRotate\":{\"type\":\"reactHoc\",\"name\":\"withRotate\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withGalleryKeyboardNext\":{\"type\":\"reactHoc\",\"name\":\"withGalleryKeyboardNext\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withFullGalleryLightbox\":{\"type\":\"reactHoc\",\"name\":\"withFullGalleryLightbox\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withGalleryArrowNavigation\":{\"type\":\"reactHoc\",\"name\":\"withGalleryArrowNavigation\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Examples.map"],"mappings":"A,gNAA8E,SAAgBgB,EAAY,EAAO,CACjH,IAAMC,EAAUH,EAAK,CAAC,MAAM,OAAO,OAAO,CAAC,GAAGI,CAAM,CAAC,CAAC,CAAC,EACjDC,EAAa,GAAU,CAC1B,OAAOC,GAAW,aAAY,EAASA,EAASH,EAAU,KAAK,GAAG,EAAU,MAAM,OAAO,OAAO,CAAC,GAAGA,EAAU,MAAM,GAAGG,CAAQ,CAAC,CAAE,EACjIC,EAAW,OAAOH,GAAS,SAAS,OAAO,OAAO,CAAC,GAAGA,CAAM,CAAC,EAAEA,EAC7DI,kBAAa,IAAI,IACjBC,EAAc,GAAU,CAC3B,OAAOH,GAAW,aAAY,EAASA,EAASC,CAAU,GAAG,EAAW,OAAOD,GAAW,SAA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