{"version":3,"file":"HeroSlideshow.CAePj8iS.mjs","names":["useState","__esmMin","init_npm_react_18_3_1","init_ssg_sandbox_shims","window","te","_e","p","c","init_jsx_runtime","ce","init_framer_DKtAEkcX","useIsStaticRenderer","ControlType","addPropertyControls","HeroSlideshow","props","custom","i","images","PLACEHOLDERS","isStatic","index","setIndex","reduce","setReduce","id","interval","fadeSec","fade","fadeMs","zoomOn","zoom","active","img","overlay","init_HeroSlideshow"],"sources":["https:/framerusercontent.com/modules/rx9dIYcDy79GeT3C5NyI/6jsAu5Dqzp3k2eLVjFSU/HeroSlideshow.js"],"sourcesContent":["// User request: the About page hero should auto-scroll through 6 images. Placeholder\n// photos of residential houses and commercial buildings for now (swap them in the\n// Images control later). Place absolutely behind the hero content, filling the hero.\nimport{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useEffect,useState,startTransition}from\"react\";import{addPropertyControls,ControlType,useIsStaticRenderer}from\"framer\";// Placeholder photos (Unsplash License): alternating residential / commercial\nconst PLACEHOLDERS=[{src:\"https://images.unsplash.com/photo-1660134725903-f8c0fc3c9412?fm=jpg&q=75&w=2400&fit=crop\",alt:\"Modern residential house exterior\"},{src:\"https://images.unsplash.com/photo-1745576355427-d61fe9454ac1?fm=jpg&q=75&w=2400&fit=crop\",alt:\"Commercial building with angular facade\"},{src:\"https://images.unsplash.com/photo-1564013799919-ab600027ffc6?fm=jpg&q=75&w=2400&fit=crop\",alt:\"White house with a garden and pool\"},{src:\"https://images.unsplash.com/photo-1762890515866-3b1b34e13133?fm=jpg&q=75&w=2400&fit=crop\",alt:\"Commercial building with large glass windows\"},{src:\"https://images.unsplash.com/photo-1568605114967-8130f3a36994?fm=jpg&q=75&w=2400&fit=crop\",alt:\"Residential house with timber siding\"},{src:\"https://images.unsplash.com/photo-1763887427912-18fc57f4cb88?fm=jpg&q=75&w=2400&fit=crop\",alt:\"Modern office building with trees\"}];/**\n * Hero Slideshow\n *\n * @framerIntrinsicWidth 1200\n * @framerIntrinsicHeight 400\n *\n * @framerSupportedLayoutWidth any\n * @framerSupportedLayoutHeight any\n */export default function HeroSlideshow(props){const{interval,fade,zoom,overlay}=props;const custom=(props.images||[]).filter(i=>i&&i.src);const images=custom.length>0?custom:PLACEHOLDERS;const isStatic=useIsStaticRenderer();const[index,setIndex]=useState(0);const[reduce,setReduce]=useState(false);useEffect(()=>{if(typeof window===\"undefined\")return;setReduce(!!window.matchMedia?.(\"(prefers-reduced-motion: reduce)\").matches);},[]);useEffect(()=>{if(isStatic||images.length<2)return;const id=window.setInterval(()=>{startTransition(()=>setIndex(i=>(i+1)%images.length));},Math.max(.3,interval)*1e3);return()=>window.clearInterval(id);},[isStatic,images.length,interval]);// Keep the fade shorter than the time each photo is shown\nconst fadeSec=Math.min(fade,Math.max(.1,interval*.6));const fadeMs=reduce?0:fadeSec*1e3;const zoomOn=zoom&&!reduce&&!isStatic;return /*#__PURE__*/_jsxs(\"div\",{style:{...props.style,position:\"relative\",width:\"100%\",height:\"100%\",overflow:\"hidden\",background:\"#111822\"},children:[images.map((img,i)=>{const active=i===index;return /*#__PURE__*/_jsx(\"img\",{src:img.src,srcSet:img.srcSet,alt:img.alt||\"\",loading:\"eager\",\"aria-hidden\":!active,style:{position:\"absolute\",inset:0,width:\"100%\",height:\"100%\",objectFit:\"cover\",opacity:active?1:0,transform:zoomOn&&active?\"scale(1.08)\":\"scale(1)\",transition:`opacity ${fadeMs}ms ease, transform ${zoomOn?interval+fadeSec:0}s linear`}},img.src+i);}),/*#__PURE__*/_jsx(\"div\",{style:{position:\"absolute\",inset:0,background:overlay,pointerEvents:\"none\"}})]});}addPropertyControls(HeroSlideshow,{images:{type:ControlType.Array,title:\"Images\",control:{type:ControlType.ResponsiveImage},maxCount:12,description:\"Leave empty to use the 6 placeholder photos.\"},interval:{type:ControlType.Number,title:\"Seconds Each\",defaultValue:5,min:.5,max:20,step:.5,unit:\"s\"},fade:{type:ControlType.Number,title:\"Fade\",defaultValue:1.2,min:0,max:4,step:.1,unit:\"s\"},zoom:{type:ControlType.Boolean,title:\"Slow Zoom\",defaultValue:true},overlay:{type:ControlType.Color,title:\"Overlay\",defaultValue:\"rgba(17, 24, 34, 0.5)\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"HeroSlideshow\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerIntrinsicWidth\":\"1200\",\"framerSupportedLayoutWidth\":\"any\",\"framerIntrinsicHeight\":\"400\",\"framerSupportedLayoutHeight\":\"any\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./HeroSlideshow.map"],"mappings":"A,qNAYG,SAAwBe,EAAc,EAAM,CAAC,GAAK,CAAC,WAAS,OAAK,OAAK,WAASC,EAAYC,GAAQD,EAAM,QAAQ,CAAC,EAAA,CAAG,OAAO,GAAGE,GAAGA,EAAE,GAAG,EAAQC,EAAOF,EAAO,OAAO,EAAEA,EAAOG,EAAmBC,EAAST,EAAoB,EAAO,CAACU,EAAMC,GAAUvB,EAAS,CAAC,EAAO,CAACwB,EAAOC,GAAWzB,EAAS,EAAK,EAAEU,MAAc,CAAWN,IAAS,QAAmBqB,EAAU,CAAC,CAACrB,EAAO,aAAa,kCAAkC,CAAC,CAAC,OAAO,CAAE,EAAE,CAAC,CAAC,EAAEM,MAAc,CAAC,GAAGW,GAAUF,EAAO,OAAO,EAAE,OAAO,IAAMO,EAAGtB,EAAO,gBAAgB,CAACC,MAAoBkB,EAAS,IAAIL,EAAE,GAAGC,EAAO,MAAM,CAAC,CAAE,EAAE,KAAK,IAAI,GAAGQ,CAAQ,EAAE,GAAG,EAAE,UAAUvB,EAAO,cAAcsB,CAAE,CAAE,EAAE,CAACL,EAASF,EAAO,OAAOQ,CAAQ,CAAC,EACjqB,IAAMC,EAAQ,KAAK,IAAIC,EAAK,KAAK,IAAI,GAAGF,EAAS,EAAE,CAAC,EAAQG,EAAON,EAAO,EAAEI,EAAQ,IAAUG,EAAOC,G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