1import{j as e,r as t}from"./index-BYNP3g4A.js";import{S as b}from"./SportsCard-ytyAdn-V.js";import"./sportsApi-DKBaIQ4i.js";import"./SportsIcons-BLkBmyGO.js";const v=()=>e.jsxs("div",{className:"flex-none w-[200px] sm:w-[240px] md:w-[280px] lg:w-[320px] aspect-video bg-gray-800 rounded-xl overflow-hidden animate-pulse relative",children:[e.jsx("div",{className:"absolute top-2 left-2 w-12 h-4 bg-gray-700 rounded"}),e.jsx("div",{className:"absolute top-2 right-2 w-16 h-4 bg-gray-700 rounded"}),e.jsxs("div",{className:"absolute bottom-3 left-3 right-3 space-y-3",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("div",{className:"w-8 h-8 rounded-full bg-gray-700"}),e.jsx("div",{className:"w-6 h-4 bg-gray-700 rounded"}),e.jsx("div",{className:"w-8 h-8 rounded-full bg-gray-700"})]}),e.jsx("div",{className:"w-3/4 h-4 bg-gray-700 rounded"})]})]}),w=({title:l})=>e.jsx("section",{className:"bg-gray-950 p-2 sm:p-4 text-white",children:e.jsxs("div",{className:"max-w-8xl mx-auto",children:[e.jsx("div",{className:"w-48 h-6 sm:h-8 bg-gray-800 rounded mb-3 sm:mb-4 animate-pulse"}),e.jsx("div",{className:"flex gap-2 sm:gap-3 md:gap-4 overflow-hidden px-2 sm:px-3 md:px-5 -mx-2 sm:mx-0",children:[1,2,3,4,5].map(o=>e.jsx(v,{},o))})]})}),k=({title:l,fetchFunction:o,storeSelector:j,params:x={}})=>{const m=t.useRef(null),n=t.useRef(null),c=t.useRef(null),[i,h]=t.useState([]),[p,g]=t.useState(!0),[d,f]=t.useState(!1);t.useEffect(()=>{if(!d)return c.current=new IntersectionObserver(async([s])=>{var r;if(s.isIntersecting)try{const a=await o(x);h(a||[])}catch(a){console.error(`Error fetching row ${l}:`,a)}finally{g(!1),f(!0),(r=c.current)==null||r.disconnect()}},{rootMargin:"200px"}),n.current&&c.current.observe(n.current),()=>{var s;return(s=c.current)==null?void 0:s.disconnect()}},[o,x,d,l]);const u=s=>{const r=m.current;if(!r)return;const a=s*r.offsetWidth-250;r.scrollBy({left:a,behavior:"smooth"})};return p&&!d?e.jsxs(e.Fragment,{children:[e.jsx("span",{ref:n,className:"block h-1"}),e.jsx(w,{title:l})]}):!i||i.length===0?null:e.jsxs(e.Fragment,{children:[e.jsx("span",{ref:n,className:"block h-[1px] w-full"}),e.jsx("section",{className:"px-2 sm:px-4 text-white relative",children:e.jsxs("div",{className:"max-w-8xl mx-auto",children:[e.jsx("h2",{className:"text-lg sm:text-xl md:text-2xl font-bold mb-2 sm:mb-4 text-teal-400 capitalize px-0 sm:px-2",children:l}),e.jsxs("div",{className:"relative group/button",children:[e.jsx("button",{onClick:()=>u(-1),className:"hidden sm:flex absolute justify-center items-center left-0 top-1/2 -translate-y-1/2 z-10 bg-teal-500 bg-opacity-75 hover:bg-opacity-100 hover:scale-105 transition p-2 rounded-full opacity-0 group-hover/button:opacity-100","aria-label":"Scroll left",children:e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24",fill:"currentColor",children:e.jsx("path",{d:"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"})})}),e.jsx("button",{onClick:()=>u(1),className:"hidden sm:flex absolute justify-center items-center right-0 top-1/2 -translate-y-1/2 z-10 bg-teal-500 bg-opacity-75 hover:bg-opacity-100 hover:scale-105 transition p-2 rounded-full opacity-0 group-hover/button:opacity-100","aria-label":"Scroll right",children:e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24",fill:"currentColor",children:e.jsx("path",{d:"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"})})}),e.jsx("div",{ref:m,className:"flex gap-2 sm:gap-3 md:gap-4 overflow-x-auto scrollbar-hide scroll-smooth px-2 sm:px-3 md:px-5 -mx-2 sm:mx-0",children:i.map(s=>e.jsx(b,{match:s},s.id))})]})]})})]})};export{k as default};
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.