{"version":3,"file":"StudioPrecision.BTkzmMfE.mjs","names":["useRef","useEffect","useLayoutEffect"],"sources":["https:/framerusercontent.com/modules/zxYvgPPDn7vqoEBpTqvz/rTb2dBwnHtyiK2aN40vV/StudioPrecision.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{forwardRef,useEffect,useLayoutEffect,useRef}from\"react\";import{useIsStaticRenderer}from\"framer\";// Matches the page's 1280px outer content container, including its native gutters.\nconst CONTENT_WIDTH=1280;const useClientLayoutEffect=typeof window===\"undefined\"?useEffect:useLayoutEffect;/** Container-aligned, full-bleed native scrolling with keyboard navigation. */export function withStudioCarousel(Component){return /*#__PURE__*/forwardRef(function StudioCarousel(props,forwardedRef){const elementRef=useRef(null);const isStatic=useIsStaticRenderer();useClientLayoutEffect(()=>{const el=elementRef.current;if(!el)return;const previous={left:el.style.paddingLeft,right:el.style.paddingRight,scroll:el.style.scrollPaddingInline};let lastWidth=-1;const align=()=>{// clientWidth is independent of the Framer editor's canvas zoom.\nconst width=el.clientWidth;if(!width||width===lastWidth)return;lastWidth=width;// Read the native breakpoint gutter, before adding the outer margin.\nel.style.paddingLeft=previous.left;el.style.paddingRight=previous.right;const native=getComputedStyle(el);const outer=Math.max(0,(width-CONTENT_WIDTH)/2);const left=parseFloat(native.paddingLeft)+outer;const right=parseFloat(native.paddingRight)+outer;el.style.paddingLeft=`${left}px`;el.style.paddingRight=`${right}px`;el.style.scrollPaddingInline=`${left}px ${right}px`;};align();const observer=new ResizeObserver(align);observer.observe(el,{box:\"border-box\"});return()=>{observer.disconnect();el.style.paddingLeft=previous.left;el.style.paddingRight=previous.right;el.style.scrollPaddingInline=previous.scroll;};},[]);useEffect(()=>{const el=elementRef.current;if(!el||isStatic)return;const previous={tabIndex:el.getAttribute(\"tabindex\"),role:el.getAttribute(\"role\"),label:el.getAttribute(\"aria-label\"),snap:el.style.scrollSnapType,overflowY:el.style.overflowY};el.tabIndex=0;el.setAttribute(\"role\",\"region\");el.setAttribute(\"aria-label\",\"Design Studio features. Use the arrow keys to explore.\");el.style.scrollSnapType=\"x proximity\";// Framer uses overflow: auto for horizontal sliders. Stop the cards from moving vertically.\nel.style.overflowY=\"hidden\";el.scrollTop=0;const children=Array.from(el.children);const previousAlign=children.map(child=>child.style.scrollSnapAlign);children.forEach(child=>{child.style.scrollSnapAlign=\"start\";});const key=event=>{if(event.target!==el||![\"ArrowLeft\",\"ArrowRight\",\"Home\",\"End\"].includes(event.key))return;event.preventDefault();const reduced=window.matchMedia(\"(prefers-reduced-motion: reduce)\").matches;const behaviour=reduced?\"auto\":\"smooth\";const distance=(children[0]?.getBoundingClientRect().width||el.clientWidth*.8)+parseFloat(getComputedStyle(el).columnGap||\"0\");if(event.key===\"Home\"||event.key===\"End\")el.scrollTo({left:event.key===\"Home\"?0:el.scrollWidth,behavior:behaviour});else el.scrollBy({left:event.key===\"ArrowRight\"?distance:-distance,behavior:behaviour});};const focus=()=>{if(el.matches(\":focus-visible\")){el.style.outline=\"2px solid var(--token-1756daa2-c3a8-4f68-94af-4b98a6371e5c, #007aff)\";el.style.outlineOffset=\"-3px\";}};const blur=()=>{el.style.outline=\"\";el.style.outlineOffset=\"\";};el.addEventListener(\"keydown\",key);el.addEventListener(\"focus\",focus);el.addEventListener(\"blur\",blur);return()=>{el.removeEventListener(\"keydown\",key);el.removeEventListener(\"focus\",focus);el.removeEventListener(\"blur\",blur);el.style.scrollSnapType=previous.snap;el.style.overflowY=previous.overflowY;children.forEach((child,i)=>{child.style.scrollSnapAlign=previousAlign[i];});for(const[name,value]of[[\"tabindex\",previous.tabIndex],[\"role\",previous.role],[\"aria-label\",previous.label]])if(value===null)el.removeAttribute(name);else el.setAttribute(name,value);blur();};},[isStatic]);return /*#__PURE__*/_jsx(Component,{...props,ref:el=>{elementRef.current=el;if(typeof forwardedRef===\"function\")forwardedRef(el);else if(forwardedRef)forwardedRef.current=el;}});});}\nexport const __FramerMetadata__ = {\"exports\":{\"withStudioCarousel\":{\"type\":\"reactHoc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