1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2607],{1958:(e,t,s)=>{"use strict";s.d(t,{A:()=>r});let r=(0,s(8340).A)("refresh-cw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]])},4315:(e,t,s)=>{"use strict";s.d(t,{FeedContainer:()=>o});var r=s(5155),a=s(2115),n=s(1958);let i=(0,s(8340).A)("chevron-up",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]),l={sm:"w-4 h-4 border-2",md:"w-6 h-6 border-2",lg:"w-8 h-8 border-3"};function c({size:e="md",className:t=""}){return(0,r.jsx)("div",{className:` 2 ${l[e]} 3 border-[#404040] border-t-[#4a9eff] 4 rounded-full animate-spin 5 ${t} 6 `,role:"status","aria-label":"Åadowanie",children:(0,r.jsx)("span",{className:"sr-only",children:"Åadowanie..."})})}function d(){return(0,r.jsx)("div",{className:"py-8 flex justify-center",children:(0,r.jsx)(c,{size:"md"})})}function o({children:e,onLoadMore:t,hasMore:s=!0,isLoading:l=!1,threshold:c=500,className:u=""}){let m=(0,a.useRef)(null),h=(0,a.useRef)(null),[f,x]=(0,a.useState)(!1),[p,w]=(0,a.useState)(!1),[v,j]=(0,a.useState)(!1),N=(0,a.useRef)(!1),b=(0,a.useCallback)(async()=>{if(!N.current&&s&&t){N.current=!0,j(!1),x(!0);try{await t()}catch{j(!0)}finally{N.current=!1,x(!1)}}},[s,t]),g=(0,a.useCallback)(()=>{window.scrollTo({top:0,behavior:"smooth"})},[]);return(0,a.useEffect)(()=>{let e=()=>{w(window.scrollY>2e3)};return window.addEventListener("scroll",e,{passive:!0}),()=>window.removeEventListener("scroll",e)},[]),(0,a.useEffect)(()=>{if(h.current&&t&&!v)return m.current=new IntersectionObserver(e=>{e[0].isIntersecting&&s&&!f&&b()},{rootMargin:`${c}px`}),m.current.observe(h.current),()=>{m.current&&m.current.disconnect()}},[b,s,f,t,c,v]),(0,r.jsxs)("div",{className:`lg:col-span-8 space-y-6 ${u}`,children:[e,(0,r.jsx)("div",{ref:h,className:"h-1"}),v&&s&&(0,r.jsxs)("div",{role:"status",className:"py-4 text-center text-sm text-[#a0a0a0]",children:[(0,r.jsx)("p",{children:"Nie udaÅo siÄ pobraÄ kolejnych wpis\xf3w."}),(0,r.jsxs)("button",{onClick:b,disabled:f,className:"mt-3 inline-flex items-center gap-2 text-[#4a9eff]",children:[(0,r.jsx)(n.A,{className:"h-4 w-4"})," Spr\xf3buj ponownie"]})]}),(l||f)&&s&&(0,r.jsx)(d,{}),!s&&!l&&(0,r.jsx)("div",{className:"py-8 text-center",children:(0,r.jsx)("p",{className:"text-sm text-[#666666]",children:"To juz wszystko!"})}),p&&(0,r.jsx)("button",{onClick:g,className:"fixed bottom-24 md:bottom-6 right-4 md:right-6 z-40 w-10 h-10 md:w-14 md:h-14 rounded-full bg-[#2563eb] hover:bg-[#1d4ed8] text-white shadow-lg shadow-black/30 flex items-center justify-center transition-all duration-200 hover:scale-105 active:scale-95","aria-label":"PrzewiÅ do g\xf3ry",children:(0,r.jsx)(i,{className:"w-5 h-5 md:w-7 md:h-7"})})]})}},4943:(e,t,s)=>{"use strict";s.d(t,{LiveMatchesWidgetServer:()=>o});var r=s(5155),a=s(2115),n=s(8500),i=s.n(n);function l(e){if(!e)return null;let t=new Date(e);return Number.isNaN(t.getTime())?null:t}function c(e){let t=e.metadata||{},s=t.homeTeam,r=t.awayTeam,a=t.league||"PiÅka nożna",n=t.kickoffTime,i=t.matchTime;if(!s||!r||!n)return null;let c=l(n);if(!c)return null;let d=c.getTime()>Date.now()?"upcoming":"finished";return{id:e.id,league:a,homeTeam:s,awayTeam:r,status:d,minute:i||function(e){let t=l(e);if(t)return t.toLocaleTimeString("pl-PL",{hour:"2-digit",minute:"2-digit",timeZone:"Europe/Warsaw"})}(n)||"â",startTime:n}}function d(e){if(!e)return 1/0;let t=e.match(/(\d{1,2}):(\d{2})/);if(t){let e=new Date,s=new Date;return s.setHours(parseInt(t[1]),parseInt(t[2]),0,0),Math.floor((s.getTime()-e.getTime())/6e4)}let s=e.match(/(\d+)\s*h/i);if(s)return 60*parseInt(s[1]);let r=e.match(/(\d+)\s*(min|')/i);return r?parseInt(r[1]):1/0}function o({initialMatches:e=[],showUpcoming:t=!0,maxMatches:s=5}){let[n,l]=(0,a.useState)(e),[h,f]=(0,a.useState)(0===e.length),x=(0,a.useCallback)(async()=>{try{let e=await fetch("/api/feed?type=tip&limit=50");if(!e.ok)return;let r=await e.json();if(r.success&&r.data?.items){let e=r.data.items.map(c).filter(e=>null!==e);e=t?[...e=e.filter(e=>"upcoming"===e.status)].sort((e,t)=>
6d(e.minute)-d(t.minute)):e.filter(e=>"live"===e.status),l(e.slice(0,s))}}catch(e){console.error("[LiveMatches] Error fetching:",e)}finally{f(!1)}},[t,s]);if((0,a.useEffect)(()=>{x();let e=setInterval(x,6e5);return()=>clearInterval(e)},[x]),h)return(0,r.jsx)(m,{});let p=t?"NadchodzÄ
ce mecze":"Na żywo",w=t?"Brak nadchodzÄ
cych mecz\xf3w":"Brak mecz\xf3w na żywo";return(0,r.jsxs)("div",{className:"bg-[#2d2d2d] border border-[#404040] rounded-xl p-4",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,r.jsxs)("h3",{className:"text-sm font-bold text-[#e5e5e5] flex items-center gap-2",children:[t?(0,r.jsx)("span",{className:"w-2 h-2 rounded-full bg-[#4a9eff]"}):(0,r.jsx)("span",{className:"w-2 h-2 rounded-full bg-[#ef4444] animate-pulse"}),p]}),(0,r.jsx)(i(),{href:"/mecze-na-zywo",className:"text-xs text-[#4a9eff] hover:underline",children:"Wszystkie"})]}),(0,r.jsx)("div",{className:"space-y-2",children:n.map(e=>(0,r.jsx)(u,{match:e},e.id))}),0===n.length&&(0,r.jsx)("p",{className:"text-sm text-[#666666] text-center py-4",children:w})]})}function u({match:e}){return(0,r.jsxs)("div",{className:"flex items-center gap-2 py-1.5 px-2 -mx-2 rounded hover:bg-[#242424] transition-colors",children:[(0,r.jsx)("div",{className:"flex-shrink-0 w-12 text-center",children:(0,r.jsx)("span",{className:"text-xs font-medium text-[#4a9eff] bg-[#4a9eff]/10 px-1.5 py-0.5 rounded",children:e.minute||"â"})}),(0,r.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,r.jsxs)("div",{className:"flex items-center gap-1 text-xs",children:[(0,r.jsx)("span",{className:"text-[#e5e5e5] truncate",children:e.homeTeam}),(0,r.jsx)("span",{className:"text-[#666666] flex-shrink-0",children:"vs"}),(0,r.jsx)("span",{className:"text-[#e5e5e5] truncate",children:e.awayTeam})]}),(0,r.jsx)("div",{className:"text-[10px] text-[#666666] truncate",children:e.league})]})]})}function m(){return(0,r.jsxs)("div",{className:"bg-[#2d2d2d] border border-[#404040] rounded-xl p-4",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,r.jsx)("div",{className:"skeleton h-4 w-28 rounded"}),(0,r.jsx)("div",{className:"skeleton h-3 w-14 rounded"})]}),(0,r.jsx)("div",{className:"space-y-2",children:[1,2,3,4,5].map(e=>(0,r.jsxs)("div",{className:"flex items-center gap-2 py-1.5",children:[(0,r.jsx)("div",{className:"skeleton h-5 w-12 rounded"}),(0,r.jsxs)("div",{className:"flex-1 space-y-1",children:[(0,r.jsx)("div",{className:"skeleton h-3 w-full rounded"}),(0,r.jsx)("div",{className:"skeleton h-2 w-20 rounded"})]})]},e))})]})}},5290:(e,t,s)=>{Promise.resolve().then(s.bind(s,4315)),Promise.resolve().then(s.bind(s,4943)),Promise.resolve().then(s.t.bind(s,8500,23))},8340:(e,t,s)=>{"use strict";s.d(t,{A:()=>c});var r=s(2115);let a=e=>{let t=e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,s)=>s?s.toUpperCase():t.toLowerCase());return t.charAt(0).toUpperCase()+t.slice(1)},n=(...e)=>e.filter((e,t,s)=>!!e&&""!==e.trim()&&s.indexOf(e)===t).join(" ").trim();var i={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};let l=(0,r.forwardRef)(({color:e="currentColor",size:t=24,strokeWidth:s=2,absoluteStrokeWidth:a,className:l="",children:c,iconNode:d,...o},u)=>(0,r.createElement)("svg",{ref:u,...i,width:t,height:t,stroke:e,strokeWidth:a?24*Number(s)/Number(t):s,className:n("lucide",l),...!c&&!(e=>{for(let t in e)if(t.startsWith("aria-")||"role"===t||"title"===t)return!0})(o)&&{"aria-hidden":"true"},...o},[...d.map(([e,t])=>(0,r.createElement)(e,t)),...Array.isArray(c)?c:[c]])),c=(e,t)=>{let s=(0,r.forwardRef)(({className:s,...i},c)=>(0,r.createElement)(l,{ref:c,iconNode:t,className:n(`lucide-${a(e).replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`,`lucide-${e}`,s),...i}));return s.displayName=a(e),s}}},e=>{e.O(0,[8500,8441,3794,7358],()=>e(e.s=5290)),_N_E=e.O()}]);
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.