1import{r as o,j as r}from"./index-C3vONiXC.js";function y({children:m,columns:l,className:h=""}){const i=o.Children.toArray(m),c=o.useRef(null),[u,p]=o.useState(0);o.useEffect(()=>{const t=c.current;if(!t)return;const e=()=>{const s=t.scrollLeft+t.clientWidth/2;let n=0,d=1/0;Array.from(t.children).forEach((g,j)=>{const a=g,E=a.offsetLeft+a.offsetWidth/2,f=Math.abs(E-s);f<d&&(d=f,n=j)}),p(n)};return e(),t.addEventListener("scroll",e,{passive:!0}),window.addEventListener("resize",e),()=>{t.removeEventListener("scroll",e),window.removeEventListener("resize",e)}},[i.length]);const x=t=>{const e=c.current;if(!e)return;const s=e.children[t];if(!s)return;const n=s.offsetLeft-(e.clientWidth-s.offsetWidth)/2;e.scrollTo({left:n,behavior:"smooth"})},v=l===4?"md:grid-cols-4":"md:grid-cols-3",b=l===4?"w-[78%] sm:w-[55%]":"w-[80%] sm:w-[60%]",w=l===4?"px-[11%]":"px-[10%]";return r.jsxs("div",{className:h,children:[r.jsx("div",{ref:c,className:`-mx-6 flex gap-4 overflow-x-auto ${w} snap-x snap-mandatory [scrollbar-width:none] [&::-webkit-scrollbar]:hidden md:mx-0 md:grid ${v} md:gap-4 md:overflow-visible md:px-0 md:snap-none`,children:i.map((t,e)=>r.jsx("div",{className:`${b} shrink-0 snap-center md:w-auto md:h-full [&>*]:h-full`,children:t},e))}),r.jsx("div",{className:"mt-5 flex justify-center gap-2 md:hidden",children:i.map((t,e)=>r.jsx("button",{type:"button","aria-label":`Go to slide ${e+1}`,onClick:()=>x(e),className:`h-2 w-2 rounded-full transition-colors ${e===u?"bg-[var(--brand-green)]":"bg-white/25"}`},e))})]})}export{y as S};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.