PageSourceSearch

https://macspeedzone.com/_next/static/chunks/4531-163646b51b83b2bb.js

js macspeedzone.com collected 2026-10-02 19:12:02 UTC 2,496,161 bytes, 990 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4531],{81:(e,t,s)=>{"use strict";s.d(t,{StandingsClient:()=>h});var a=s(68019),l=s(10707),r=s(46914),n=s(31307);function i(e){return"W"===e?"border border-emerald-500/45 bg-emerald-500/25 text-emerald-300 shadow-[0_0_0_1px_rgba(16,185,129,0.08)_inset]":"L"===e?"border border-red-500/45 bg-red-500/25 text-red-300 shadow-[0_0_0_1px_rgba(239,68,68,0.08)_inset]":"D"===e?"border border-amber-400/45 bg-amber-400/22 text-amber-200 shadow-[0_0_0_1px_rgba(251,191,36,0.08)_inset]":"border border-slate-500/40 bg-slate-500/18 text-slate-700"}function o(e,t){return 1===e?{bar:"bg-[linear-gradient(180deg,#facc15,#f97316)]",badge:"border-emerald-600/60 bg-slate-100 text-yellow-700 shadow-[0_0_18px_rgba(250,204,21,0.14)]",row:"from-[#32230d]/70 via-transparent to-transparent"}:e<=4?{bar:"bg-[linear-gradient(180deg,#fb7185,#f97316)]",badge:"border-[#fb7185]/45 bg-slate-100 text-rose-700",row:"from-[#241318]/55 via-transparent to-transparent"}:e<=6?{bar:"bg-[linear-gradient(180deg,#f59e0b,#facc15)]",badge:"border-[#f59e0b]/45 bg-slate-100 text-yellow-700",row:"from-[#24190b]/45 via-transparent to-transparent"}:e<=10?{bar:"bg-[linear-gradient(180deg,#38bdf8,#2563eb)]",badge:"border-sky-400/40 bg-white text-sky-700",row:"from-[#101725]/32 via-transparent to-transparent"}:e>=Math.max(t-2,1)?{bar:"bg-[linear-gradient(180deg,#ef4444,#7f1d1d)]",badge:"border-red-500/40 bg-slate-100 text-red-700",row:"from-[#220f14]/45 via-transparent to-transparent"}:{bar:"bg-[linear-gradient(180deg,#64748b,#334155)]",badge:"border-slate-500/35 bg-white text-slate-700",row:"from-[#12161d]/24 via-transparent to-transparent"}}function c({detail:e}){let[t,s]=(0,l.useState)(!1),n=(0,l.useRef)(null),[o,d]=(0,l.useState)({top:0,left:0}),x=i(e.result),h=(0,l.useCallback)(()=>{if(n.current){let e=n.current.getBoundingClientRect();d({top:e.top+window.scrollY-8,left:e.left+e.width/2+window.scrollX})}s(!0)},[]);return(0,a.jsxs)("div",{ref:n,className:"relative inline-flex",onMouseEnter:h,onMouseLeave:()=>s(!1),children:[(0,a.jsx)("span",{className:`inline-flex h-7 w-7 items-center justify-center rounded-[8px] text-[11px] font-black cursor-pointer transition-transform hover:-translate-y-0.5 ${x}`,children:e.result}),t&&e.match_time&&"u">typeof document&&(0,r.createPortal)((0,a.jsxs)("div",{className:"fixed z-[9999] w-[220px] pointer-events-none",style:{top:`${o.top}px`,left:`${o.left}px`,transform:"translate(-50%, -100%)",position:"absolute"},children:[(0,a.jsxs)("div",{className:"overflow-hidden rounded-xl border border-[#cbd5e1] bg-white shadow-2xl",children:[(0,a.jsx)("div",{className:"bg-slate-100 px-3 py-1.5 text-[10px] text-slate-600 font-mono text-center border-b border-[#cbd5e1]",children:e.match_time}),(0,a.jsxs)("div",{className:"px-3 py-2.5 flex items-center justify-between gap-2",children:[(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5 flex-1 min-w-0",children:[e.home_logo?(0,a.jsx)("img",{src:e.home_logo,alt:e.home_team,className:"w-7 h-7 object-contain",loading:"lazy",decoding:"async"}):(0,a.jsx)("div",{className:"w-7 h-7 rounded-full bg-gray-700 flex items-center justify-center text-[8px] text-slate-600 font-bold",children:"?"}),(0,a.jsx)("span",{className:"text-[9px] text-slate-600 font-bold text-center leading-tight line-clamp-2 max-w-[70px]",children:e.home_team})]}),(0,a.jsx)("div",{className:"text-slate-900 font-black text-sm whitespace-nowrap px-1",children:e.score||"? - ?"}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5 flex-1 min-w-0",children:[e.away_logo?(0,a.jsx)("img",{src:e.away_logo,alt:e.away_team,className:"w-7 h-7 object-contain",loading:"lazy",decoding:"async"}):(0,a.jsx)("div",{className:"w-7 h-7 rounded-full bg-gray-700 flex items-center justify-center text-[8px] text-slate-600 font-bold",children:"?"}),(0,a.jsx)("span",{className:"text-[9px] text-slate-600 font-bold text-center leading-tight line-clamp-2 max-w-[70px]",children:e.away_team})]})]})]}),(0,a.jsx)("div",{className:"absolute left-1/2 -translate-x-1/2 -bottom-1 w-2 h-2 bg-white border-r border-b border-[#cbd5e1] rotate-45"})]}),document.body)]})}function d({result:e}){let t=i(e);return(0,a.jsx)("span",{className:`inline-flex h-7 w-7 items-center justify-center rounded-[8px] text-[11px] font-black ${t}`,children:e})}function x({value:e,totalTeams:t}){let s=Number(e);if(!Number.isFinite(s))return(0,a.jsx)("td",{className:"px-4 py-4 text-center font-mono font-black text-slate-400",children:e});let l=o(s,t);return(0,a.jsxs)("td",{className:"relative px-4 py-4 text-center font-mono",children:[(0,a.jsx)("span",{className:`absolute left-0 top-1/2 h-7 w-1 -translate-y-1/2 roun
1ded-r-full ${l.bar}`}),(0,a.jsx)("span",{className:`inline-flex h-8 w-8 items-center justify-center rounded-[10px] border text-[13px] font-black ${l.badge}`,children:s})]})}function h({initialData:e}){let[t]=(0,l.useState)(!1),[s,r]=(0,l.useState)(!1),[i,p]=(0,l.useState)(""),u=(0,l.useRef)(null);if((0,l.useEffect)(()=>{function e(e){u.current&&!u.current.contains(e.target)&&r(!1)}return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[]),!e)return(0,a.jsx)("div",{className:"text-center py-20 text-slate-600",children:"Đang tải dữ liệu..."});let g=e.available_leagues||[],b=g.filter(e=>e.name.toLowerCase().includes(i.toLowerCase())),f=e.teams&&e.teams.length>0&&Array.isArray(e.teams[0]?.form),j=!f&&e.rankings;return(0,a.jsxs)("div",{className:"mx-auto max-w-[1440px] px-4 py-8",children:[(0,a.jsx)(n.D,{eyebrow:"Bảng xếp hạng",title:"BẢNG XẾP HẠNG",rightSlot:(0,a.jsx)("div",{className:"text-[12px] text-slate-600",children:(0,a.jsx)("span",{className:"text-slate-900/80 font-bold",children:e.league_name})})}),g.length>0&&(0,a.jsxs)("div",{className:"mb-6",ref:u,children:[(0,a.jsxs)("div",{className:"relative inline-flex min-w-[320px] items-center gap-3 rounded-2xl border border-slate-200 bg-white backdrop-blur-md px-5 py-3.5 cursor-pointer shadow-[0_8px_30px_rgba(0,0,0,0.06)] transition-colors hover:border-[#4681E8]/50 hover:shadow-[0_8px_30px_rgba(70,129,232,0.1)]",onClick:()=>r(!s),children:[e.league_icon&&(0,a.jsx)("img",{src:e.league_icon,alt:e.league_name||"League icon",className:"w-6 h-6 object-contain",loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-slate-800 font-bold text-sm flex-1",children:e.league_name||"Chọn giải đấu"}),(0,a.jsx)("svg",{className:`w-4 h-4 text-[#4681E8] transition-transform ${s?"rotate-180":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),s&&(0,a.jsxs)("div",{className:"absolute z-50 mt-2 w-[360px] overflow-hidden rounded-2xl border border-slate-200 bg-white backdrop-blur-xl shadow-[0_24px_80px_rgba(0,0,0,0.15)]",children:[(0,a.jsx)("div",{className:"p-2 border-b border-slate-100",children:(0,a.jsx)("input",{type:"text",placeholder:"T\xecm kiếm giải đấu...",value:i,onChange:e=>p(e.target.value),className:"w-full bg-slate-50 text-slate-800 text-sm px-4 py-2.5 rounded-xl border border-transparent outline-none focus:border-[#4681E8]/50 placeholder-slate-400 transition-colors",autoFocus:!0})}),(0,a.jsxs)("div",{className:"max-h-[340px] overflow-y-auto",children:[b.map(t=>(0,a.jsxs)("a",{href:`/standings?league=${encodeURIComponent(t.id)}`,className:`flex items-center gap-3 px-4 py-3 cursor-pointer transition-colors hover:bg-slate-50 ${t.id===e.league_id?"bg-[#4681E8]/10 border-l-4 border-[#4681E8]":""}`,children:[t.icon?(0,a.jsx)("img",{src:t.icon,alt:t.name||"League",className:"w-5 h-5 object-contain flex-shrink-0",loading:"lazy",decoding:"async"}):(0,a.jsx)("div",{className:"w-5 h-5 rounded bg-gray-700 flex-shrink-0"}),(0,a.jsx)("span",{className:"text-sm text-slate-900 truncate",children:t.name})]},t.id)),0===b.length&&(0,a.jsx)("div",{className:"px-4 py-8 text-center text-gray-500 text-sm",children:"Kh\xf4ng t\xecm thấy giải đấu"})]})]})]}),t&&(0,a.jsxs)("div",{className:"flex items-center justify-center py-12",children:[(0,a.jsx)("div",{className:"animate-spin w-8 h-8 border-2 border-emerald-600 border-t-transparent rounded-full"}),(0,a.jsx)("span",{className:"ml-3 text-slate-600 text-sm",children:"Đang tải bảng xếp hạng từ server..."})]}),!t&&f&&(0,a.jsxs)("div",{className:"overflow-hidden rounded-[24px] border border-slate-200 bg-white shadow-[0_8px_30px_rgba(0,0,0,0.08)]",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between gap-3 border-b border-[#4681E8]/20 bg-gradient-to-r from-[#4681E8] to-[#2563eb] px-6 py-4 text-white shadow-[0_4px_25px_rgba(70,129,232,0.3)]",children:[(0,a.jsx)("div",{className:"text-[13px] font-black uppercase tracking-[0.2em] drop-shadow-sm text-white/80",children:"League"}),(0,a.jsx)("div",{className:"truncate text-sm font-black sm:text-base drop-shadow-md",children:e.league_name})]}),(0,a.jsx)("div",{className:"overflow-x-auto",children:(0,a.jsxs)("table",{className:"w-full text-left border-collapse",children:[(0,a.jsx)("thead",{children:(0,a.jsx)("tr",{className:"bg-slate-50 text-[11px] uppercase tracking-[0.2em] text-slate-500",children:e.header.map((t,s)=>{let l=e.teams.some(e=>e.form&&e.form.length>0);return t.toLowerCase().includes("phong độ")&&!l?null:(0,a.jsx)("th",{colSpan:s===e.header.length-1&&l?5:1,className:`p-4 font-semibold ${1===s?"w-1/3 text-left":"text-center"}`,children:t},s)})})}),(0,a.jsx)("tbody",{className:"text-sm",children:e.teams.map((t,s)=>(o(Number(t.data[0]||s+1),e.teams.length),(0,a.jsxs)("tr",{className:"group border-b border-slate-100 bg-white transition-colors hover:bg-slate-50 cursor-pointer",children:[t.data.map((s,l)=>0===l?(0,a.jsx)(x,{value:s,totalTeams:e.teams.length},l):1===l?(0,a.jsx)("td",{className:"p-4",children:(0,a.jsxs)("div",{className:"flex items-center gap-3 rounded-2xl border border-slate-100 bg-slate-50 px-4 py-2.5 transition-colors group-hover:border-[#4681E8]/30 group-hover:bg-[#4681E8]/5",children:[t.team_logo?(0,a.jsx)("img",{src:t.team_logo,alt:s,className:"h-8 w-8 rounded-full bg-white object-contain p-0.5 filter drop-shadow-[0_2px_4px_rgba(0,0,0,0.1)]",loading:"lazy"}):(0,a.jsx)("div",{className:"flex h-8 w-8 items-center justify-center rounded-full border border-slate-200 bg-white text-[10px] font-bold text-slate-400",children:"?"}),(0,a.jsx)("span",{className:"font-bold text-slate-800 transition-colors group-hover:text-[#4681E8]",children:s})]})},l):(0,a.jsx)("td",{className:"p-4 text-center font-mono text-slate-600",children:s},l)),t.form&&t.form.length>0&&(0,a.jsxs)(a.Fragment,{children:[t.form.map((e,t)=>(0,a.jsx)("td",{className:"p-2 text-center",children:e.match_time?(0,a.jsx)(c,{detail:e}):(0,a.jsx)(d,{result:e.result})},`form-${t}`)),t.form.length<5&&Array.from({length:5-t.form.length}).map((e,t)=>(0,a.jsx)("td",{className:"p-2"},`pad-${t}`))]})]},s)))})]})})]}),!t&&!f&&j&&(0,a.jsx)(m,{rankings:e.rankings}),!t&&!f&&!j&&e.header&&e.teams&&(0,a.jsx)("div",{className:"text-center py-20 text-slate-600",children:"Dữ liệu đang được cập nhật..."}),!t&&(f||j)&&(0,a.jsxs)("div",{className:"mt-6 flex flex-wrap items-center gap-5 px-5 py-4 bg-slate-50 rounded-2xl border border-slate-200",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,a.jsx)("span",{className:"w-2.5 h-2.5 rounded-full bg-emerald-500"}),(0,a.jsx)("span",{className:"text-[11px] text-slate-600 font-bold uppercase tracking-wider",children:"Đội trưởng bảng"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,a.jsx)("span",{className:"w-2.5 h-2.5 rounded-full bg-sky-4
100"}),(0,a.jsx)("span",{className:"text-[11px] text-slate-600 font-bold uppercase tracking-wider",children:"Champions League"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,a.jsx)("span",{className:"w-2.5 h-2.5 rounded-full bg-amber-500"}),(0,a.jsx)("span",{className:"text-[11px] text-slate-600 font-bold uppercase tracking-wider",children:"Europa League"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,a.jsx)("span",{className:"w-2.5 h-2.5 rounded-full bg-[#f97316]"}),(0,a.jsx)("span",{className:"text-[11px] text-slate-600 font-bold uppercase tracking-wider",children:"Europa Conference"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,a.jsx)("span",{className:"w-2.5 h-2.5 rounded-full bg-[#E11D48]"}),(0,a.jsx)("span",{className:"text-[11px] text-slate-600 font-bold uppercase tracking-wider",children:"Xuống hạng"})]})]})]})}function m({rankings:e}){if(!e||0===e.length)return null;let t=e[0].data,s=e.slice(1);return(0,a.jsx)("div",{className:"overflow-hidden rounded-[22px] border border-[#cbd5e1] bg-[linear-gradient(180deg,#191a20,#111218)] shadow-[0_24px_80px_rgba(0,0,0,0.4)]",children:(0,a.jsx)("div",{className:"overflow-x-auto",children:(0,a.jsxs)("table",{className:"w-full text-left border-collapse",children:[(0,a.jsx)("thead",{children:(0,a.jsx)("tr",{className:"bg-white text-[11px] uppercase tracking-[0.18em] text-slate-600",children:t.map((e,l)=>{let r=l===t.length-1,n=s[0]&&s[0].data.length>t.length?s[0].data.length-t.length+1:1;return(0,a.jsx)("th",{colSpan:r?n:1,className:`p-4 font-semibold ${1===l?"w-1/3 text-left":"text-center"}`,children:e},l)})})}),(0,a.jsx)("tbody",{className:"text-sm",children:s.map((e,t)=>(0,a.jsx)("tr",{className:"group border-b border-[#cbd5e1] transition-colors hover:bg-white",children:e.data.map((t,l)=>0===l?(0,a.jsx)(x,{value:t,totalTeams:s.length},l):1===l?(0,a.jsx)("td",{className:"p-4",children:(0,a.jsxs)("div",{className:"flex items-center gap-3 rounded-2xl border border-white/6 bg-[linear-gradient(180deg,rgba(255,255,255,0.03),rgba(255,255,255,0.01))] px-3 py-2 transition-colors group-hover:border-emerald-600/22",children:[e.team_logo?(0,a.jsx)("img",{src:e.team_logo,alt:t,className:"h-8 w-8 rounded-full bg-white/5 object-contain ring-1 ring-white/8",loading:"lazy"}):(0,a.jsx)("div",{className:"flex h-8 w-8 items-center justify-center rounded-full border border-gray-700 bg-gray-800 text-xs font-bold text-gray-500",children:"?"}),(0,a.jsx)("span",{className:"font-bold text-slate-900 transition-colors group-hover:text-emerald-600",children:t})]})},l):["W","D","L"].includes(t)?(0,a.jsx)("td",{className:"p-2 text-center",children:(0,a.jsx)("span",{className:`inline-flex h-7 w-7 items-center justify-center rounded-[8px] text-[11px] font-black ${i(t)}`,children:t})},l):(0,a.jsx)("td",{className:"p-4 text-center font-mono text-slate-600",children:t},l))},t))})]})})})}},707:(e,t,s)=>{"use strict";s.d(t,{Klivevip16ResultsPage:()=>o});var a=s(68019),l=s(10707),r=s(78637),n=s(81443),i=s(38790);function o({initialData:e,selectedLeague:t}){let s=(0,r.useRouter)(),c=(0,r.usePathname)(),d=(0,r.useSearchParams)(),[x,h]=(0,l.useTransition)(),[m,p]=(0,l.useState)(!1),[u,g]=(0,l.useState)(""),{availableLeagues:b,dateGroups:f}=(0,l.useMemo)(()=>(0,i.o8)(e),[e]),j=(0,l.useMemo)(()=>Array.from(new Set(f.map(e=>e.date_header))),[f]),w=d.get("date")||"",v=e=>{let t=new URLSearchParams(d.toString());e&&e!==w?t.set("date",e):t.delete("date"),h(()=>{let e=t.toString();s.push(e?`${c}?${e}`:c,{scroll:!1})})},N=(0,l.useMemo)(()=>{let e=f;return w&&(e=e.filter(e=>e.date_header===w)),(0,i.kK)(e,t)},[f,w,t]),y=(0,l.useMemo)(()=>{if(!u)return b;let e=u.toLowerCase();return b.filter(t=>t.name.toLowerCase().includes(e))},[b,u]),_=N.reduce((e,t)=>e+t.matches.length,0);if(0===f.length)return(0,a.jsxs)("div",{className:"max-w-[1440px] mx-auto px-4 py-8",children:[(0,a.jsx)(n._,{eyebrow:"Kết quả",title:"KẾT QUẢ B\xd3NG Đ\xc1"}),(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center py-16 gap-4",children:[(0,a.jsx)("div",{className:"w-12 h-12 rounded-full border-2 border-[#
1E11D48]/30 border-t-[#E11D48] animate-spin"}),(0,a.jsx)("span",{className:"text-slate-500 text-sm font-medium tracking-wide",children:"Đang tải kết quả..."})]})]});let k=e=>{let t=new URLSearchParams(d.toString());e?t.set("league",e):t.delete("league"),p(!1),g(""),h(()=>{let e=t.toString();s.push(e?`${c}?${e}`:c,{scroll:!1})})};return(0,a.jsxs)("div",{className:"max-w-[1440px] mx-auto px-4 py-8",children:[(0,a.jsx)(n._,{eyebrow:"Kết quả",title:"KẾT QUẢ B\xd3NG Đ\xc1",rightSlot:(0,a.jsx)("div",{className:"text-[12px] text-slate-600",children:(0,a.jsx)("span",{className:"text-slate-900/80 font-bold",children:t||"Tất cả giải đấu"})})}),(0,a.jsxs)("div",{className:"flex flex-col md:flex-row gap-4 mb-4 items-start md:items-center justify-between",children:[j.length>0&&(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,a.jsx)("button",{type:"button",onClick:()=>v(""),className:`px-4 py-2 rounded-xl text-sm font-bold transition-all duration-300 ${!w?"bg-gradient-to-r from-[#4681E8] to-[#2563eb] text-white shadow-[0_4px_15px_rgba(70,129,232,0.4)] border border-[#4681E8]/50":"bg-white text-[#64748B] border border-slate-200 hover:bg-slate-50 hover:text-slate-800"}`,children:"Tất cả ng\xe0y"}),j.slice(0,5).map(e=>(0,a.jsx)("button",{type:"button",onClick:()=>v(e),className:`px-4 py-2 rounded-xl text-sm font-bold transition-all duration-300 ${w===e?"bg-gradient-to-r from-[#4681E8] to-[#2563eb] text-white shadow-[0_4px_15px_rgba(70,129,232,0.4)] border border-[#4681E8]/50":"bg-white text-[#64748B] border border-slate-200 hover:bg-slate-50 hover:text-slate-800"}`,children:e},e))]}),(0,a.jsxs)("div",{className:"relative w-full md:w-[320px]",children:[(0,a.jsxs)("button",{onClick:()=>p(!m),className:"w-full flex items-center gap-3 bg-white hover:bg-slate-50 px-4 py-2.5 rounded-xl border border-slate-200 shadow-inner transition-all text-sm",children:[(0,a.jsx)("svg",{className:"w-5 h-5 text-[#4681E8]",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 4a1 1 0 011-1h16a1 1 0 011 1v2.586a1 1 0 01-.293.707l-6.414 6.414a1 1 0 00-.293.707V17l-4 4v-6.586a1 1 0 00-.293-.707L3.293 7.293A1 1 0 013 6.586V4z"})}),(0,a.jsx)("span",{className:"text-slate-700 font-bold flex-1 text-left truncate",children:t||"Chọn giải đấu..."}),(0,a.jsx)("svg",{className:`w-4 h-4 text-slate-400 transition-transform ${m?"rotate-180":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),m&&(0,a.jsxs)("div",{className:"absolute top-full left-0 right-0 mt-2 bg-white border border-slate-200 rounded-2xl shadow-xl z-50 max-h-[300px] overflow-hidden flex flex-col",children:[(0,a.jsx)("div",{className:"p-2 border-b border-slate-100",children:(0,a.jsx)("input",{type:"text",placeholder:"T\xecm giải đấu...",value:u,onChange:e=>g(e.target.value),className:"w-full bg-slate-50 border border-transparent rounded-xl px-4 py-2.5 text-sm text-slate-800 placeholder-slate-400 outline-none focus:border-[#4681E8]/50 transition-colors"})}),(0,a.jsxs)("div",{className:"overflow-y-auto flex-1 pb-2",children:[(0,a.jsx)("button",{type:"button",onClick:()=>k(),className:`block w-full text-left px-4 py-3 text-sm transition-colors ${!t?"bg-[#4681E8]/10 text-[#4681E8] border-l-4 border-[#4681E8]":"text-slate-600 hover:bg-slate-50 hover:text-slate-800"}`,children:"Tất cả giải đấu"}),y.map((e,s)=>(0,a.jsxs)("button",{type:"button",onClick:()=>k(e.name),className:`flex items-center gap-3 px-4 py-3 text-sm transition-colors cursor-pointer ${t===e.name?"bg-[#4681E8]/10 text-[#4681E8] border-l-4 border-[#4681E8]":"text-slate-600 hover:bg-slate-50 hover:text-slate-800"}`,children:[e.icon?(0,a.jsx)("img",{src:e.icon,alt:e.name||"League",className:"w-5 h-5 object-contain shrink-0",loading:"lazy",decoding:"async"}):(0,a.jsx)("div",{className:"w-5 h-5 rounded-md bg-slate-200 shrink-0"}),(0,a.jsx)("span",{className:"truncate",children:e.name})]},s))]})]})]})]}),x&&(0,a.jsxs)("div",{className:"mb-4 inline-flex items-center gap-2 rounded-full border border-slate-200 bg-white px-4 py-2 text-xs text-slate-500 shadow-sm",children:[(0,a.jsx)("span",{className:"h-2 w-2 rounded-full bg-[#E11D48] animate-pulse shadow-[0_0_8px_rgba(225,29,72,0.8)]"}),(0,a.jsx)("span",{className:"font-bold tracking-wide",children:"Đang tải kết quả từ server..."})]}),(0,a.jsx)("div",{className:"space-y-4",children:0===N.length?(0,a.jsx)("div",{className:"text-center py-16 text-[#64748B] font-medium tracking-wide",children:"Kh\xf4ng c\xf3 kết quả n\xe0o"}):N.map((e,t)=>(0,a.jsxs)("div",{className:"overflow-hidden rounded-2xl border border-slate-200 bg-white shadow-[0_8px_30px_rgba(0,0,0,0.06)]",children:[(0,a.jsx)("div",{className:"bg-slate-50 px-5 py-3 border-b border-slate-100 flex items-center justify-between",children:(0,a.jsxs)("span",{className:"text-[12px] text-slate-500 font-bold uppercase tracking-widest",children:[e.league_round?e.league_round:"V\xf2ng đấu",(0,a.jsx)("span",{className:"text-[#E11D48] ml-2 font-mono text-[11px] bg-[#E11D48]/10 px-2 py-0.5 rounded-full border border-[#
1E11D48]/20",children:e.date_header})]})}),e.matches.map((e,t)=>{var s;return(0,a.jsx)("div",{className:"bg-transparent hover:bg-slate-50 border-b border-slate-100 last:border-0 transition-colors group cursor-default",children:(0,a.jsxs)("div",{className:"flex items-center py-4 px-5 gap-4",children:[(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center min-w-[56px] shrink-0 border-r border-slate-100 pr-4",children:[(0,a.jsx)("span",{className:"text-[9px] text-slate-400 uppercase tracking-widest mb-1 font-bold",children:"L\xfac"}),(0,a.jsx)("span",{className:"text-[13px] text-slate-700 font-mono font-black",children:e.time})]}),(0,a.jsxs)("div",{className:"flex-1 flex items-center justify-end gap-3 min-w-0",children:[(0,a.jsx)("span",{className:"text-[14px] text-slate-800 font-bold truncate text-right group-hover:text-slate-900 transition-colors",children:e.home_team}),e.home_logo?(0,a.jsx)("div",{className:"w-8 h-8 rounded-full bg-slate-100 border border-slate-200 p-1 flex items-center justify-center shadow-sm",children:(0,a.jsx)("img",{src:e.home_logo,alt:e.home_team||"Home team",className:"w-full h-full object-contain",loading:"lazy"})}):(0,a.jsx)("div",{className:"w-8 h-8 rounded-full bg-slate-100 shrink-0 border border-slate-200 flex items-center justify-center text-[10px] font-bold text-slate-400",children:"?"})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center min-w-[90px] shrink-0 bg-slate-50 rounded-xl py-2 px-2 border border-slate-200 shadow-inner group-hover:border-[#4681E8]/40 transition-colors",children:[(0,a.jsx)("span",{className:`text-[22px] leading-none font-black tracking-widest drop-shadow-[0_2px_4px_rgba(0,0,0,0.8)] ${!(s=e.score)||"-"===s?"text-slate-400":"text-slate-800"}`,children:e.score}),e.ht_score&&(0,a.jsxs)("span",{className:"text-[10px] text-slate-500 font-mono mt-1 font-bold",children:["HT: ",e.ht_score]})]}),(0,a.jsxs)("div",{className:"flex-1 flex items-center gap-3 min-w-0",children:[e.away_logo?(0,a.jsx)("div",{className:"w-8 h-8 rounded-full bg-slate-100 border border-slate-200 p-1 flex items-center justify-center shadow-sm",children:(0,a.jsx)("img",{src:e.away_logo,alt:e.away_team||"Away team",className:"w-full h-full object-contain",loading:"lazy"})}):(0,a.jsx)("div",{className:"w-8 h-8 rounded-full bg-slate-100 shrink-0 border border-slate-200 flex items-center justify-center text-[10px] font-bold text-slate-400",children:"?"}),(0,a.jsx)("span",{className:"text-[14px] text-slate-800 font-bold truncate text-left group-hover:text-slate-900 transition-colors",children:e.away_team})]})]})},t)})]},t))}),(0,a.jsxs)("div",{className:"mt-6 text-center text-xs text-[#64748B] font-bold uppercase tracking-widest drop-shadow-sm",children:["Hiển thị ",_," kết quả trận đấu"]})]})}},2047:(e,t,s)=>{"use strict";function a(e){let t=e?.fixtures_v2||null,s=e?.fixtures||e?.schedules||[],a=t?.date_tabs?.length?t.date_tabs:function(e=new Date){let t=["Chủ Nhật","Thứ Hai","Thứ Ba","Thứ Tư","Thứ Năm","Thứ S\xe1u","Thứ Bảy"],s=[];for(let a=0;a<14;a+=1){let l=new Date(e);l.setDate(l.getDate()+a);let r=String(l.getDate()).padStart(2,"0"),n=String(l.getMonth()+1).padStart(2,"0"),i=`${l.getFullYear()}-${l.getMonth()+1}-${l.getDate()}`;s.push({label:0===a?"H\xf4m Nay":t[l.getDay()],date:`${r}.${n}`,dataValue:i,active:0===a})}return s}(),l=e?.selected_date||a.find(e=>e.active)?.dataValue||a[0]?.dataValue||null;if(t?.leagues?.length)return{dateTabs:a,selectedDate:l,leagues:t.leagues,totalMatches:t.leagues.reduce((e,t)=>e+t.matches.length,0)};let r=[],n=new Set;return s.forEach(e=>{let t=e.data;if(!(t.length<3))for(let s=0;s+2<t.length;s+=16){let a=t[s]||"",l=t[s+1]||"",i=t[s+2]||"",o=`${a}-${l}-${i}`;if(!n.has(o)&&l&&(n.add(o),r.push({time:a,home_team:l,away_team:i,home_logo:e.team_logos?.[2*Math.floor(s/16)]||"",away_logo:e.team_logos?.[2*Math.floor(s/16)+1]||"",score:t[s+3]||"-",ht_score:t[s+4]||"",handicap:t.length>s+9?[t[s+7]||"",t[s+8]||"",t[s+9]||""]:[],over_under:t.length>s+12?[t[s+10]||"",t[s+11]||"",t[s+12]||""]:[],one_x_two:t.length>s+15?[t[s+13]||"",t[s+14]||"",t[s+15]||""]:[]}),s+16>=t.length))break}}),{dateTabs:a,selectedDate:l,leagues:r.length>0?[{league_name:"Tất cả trận đấu",league_icon:"",match_count:r.length,matches:r}]:[],totalMatches:r.length}}function l(e){let t=e?.results_v2||null,s=e?.results||[];if(t?.date_groups?.length)return{availableLeagues:t.available_leagues||[],dateGroups:t.date_groups,totalMatches:t.date_groups.reduce((e,t)=>
1e+t.matches.length,0)};let a=[];return s.forEach(e=>{let t=e.data;if(t.length<6)return;let s=t[0],l=s.split(" - "),r=[],n=1,i=0;for(;n<t.length;){if(t[n]?.startsWith("L\xfac")){let s=t[n].replace("L\xfac","").trim();r.push({time:s,home_team:t[n+1]||"",away_team:t[n+4]||"",home_logo:e.team_logos?.[i]||"",away_logo:e.team_logos?.[i+1]||"",score:t[n+2]||"",ht_score:(t[n+3]||"").replace("H1:","").replace("HT:","").trim()}),i+=2,n+=5;continue}n+=1}r.length>0&&a.push({date_header:l[0]?.trim()||s,league_round:l.slice(1).join(" - ").trim(),matches:r})}),{availableLeagues:[],dateGroups:a,totalMatches:a.reduce((e,t)=>e+t.matches.length,0)}}function r(e,t){if(!t)return e;let s=t.toLowerCase();return e.filter(e=>e.league_round.toLowerCase().includes(s))}s.d(t,{kK:()=>r,o8:()=>l,p_:()=>a})},2707:(e,t,s)=>{"use strict";s.d(t,{Klivevip08MatchDetailPage:()=>m});var a=s(68019),l=s(10707),r=s(58420);function n({src:e,poster:t,autoPlay:s=!0,onError:i,className:o=""}){let c=(0,l.useRef)(null),d=(0,l.useRef)(i);d.current=i;let[x,h]=(0,l.useState)(!1),[m,p]=(0,l.useState)(!1);return((0,l.useEffect)(()=>{let t=c.current;if(!t)return;let a=null;h(!1);let l=()=>p(!0),n=()=>p(!1);t.addEventListener("play",l),t.addEventListener("pause",n);let i=()=>{s&&(t.muted=!0,t.play().catch(()=>{}))};if(t.addEventListener("canplay",i),r.Ay.isSupported()){(a=new r.Ay({maxBufferLength:30,maxMaxBufferLength:60,lowLatencyMode:!0,enableWorker:!0})).loadSource(e),a.attachMedia(t),a.on(r.Ay.Events.MANIFEST_PARSED,()=>{s&&(t.muted=!0,t.play().catch(e=>{console.warn("AutoPlay failed:",e),t.muted=!1}))});let l=0,n=0;a.on(r.Ay.Events.ERROR,(e,t)=>{if(t.type===r.Ay.ErrorTypes.NETWORK_ERROR&&(++l>2||t.response&&t.response.code>=400)){console.error("HLS Network Error threshold reached (CORS/404), triggering fallback.",t),h(!0),d.current&&d.current(t),a?.destroy();return}if(t.fatal)switch(t.type){case r.Ay.ErrorTypes.NETWORK_ERROR:console.error("HLS Fatal Network Error, recovering...",t),a?.startLoad();break;case r.Ay.ErrorTypes.MEDIA_ERROR:console.error("HLS Media Error, recovering...",t),++n>3?(console.error("HLS Media Error threshold reached, triggering fallback."),h(!0),d.current&&d.current(t),a?.destroy()):a?.recoverMediaError();break;default:console.error("HLS Fatal Error:",t),h(!0),d.current&&d.current(t),a?.destroy()}})}else t.canPlayType("application/vnd.apple.mpegurl")&&(t.src=e,t.addEventListener("loadedmetadata",()=>{s&&t.play().catch(e=>{console.warn("AutoPlay failed:",e)})}),t.addEventListener("error",e=>{h(!0),d.current&&d.current(e)}));return()=>{t.removeEventListener("play",l),t.removeEventListener("pause",n),t.removeEventListener("canplay",i),a&&a.destroy()}},[e,s]),x)?i?null:(0,a.jsxs)("div",{className:`w-full h-full flex flex-col items-center justify-center bg-white/80 backdrop-blur ${o}`,children:[(0,a.jsx)("svg",{className:"w-12 h-12 text-red-500 mb-4 opacity-80",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"})}),(0,a.jsx)("div",{className:"text-slate-600 text-sm font-medium",children:"Video/Stream kh\xf4ng khả dụng hoặc bị lỗi mạng"}),(0,a.jsx)("div",{className:"text-gray-500 text-xs mt-1",children:"Vui l\xf2ng thử lại sau hoặc chọn nguồn kh\xe1c"})]}):(0,a.jsx)("div",{className:`relative group w-full h-full bg-white flex items-center justify-center overflow-hidden ${o}`,children:(0,a.jsx)("video",{ref:c,className:"w-full h-full object-contain",controls:!0,playsInline:!0,muted:s,poster:t,referrerPolicy:"no-referrer"})})}function i(e){let t=(e||"").split(/[\s-]+/).slice(0,2).map(e=>e[0]||"").join("").toUpperCase()||"??";return`data:image/svg+xml,${encodeURIComponent(`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 80 80"><rect width="80" height="80" rx="20" fill="#1a1c25"/><text x="40" y="47" font-size="20" font-family="Arial" font-weight="700" text-anchor="middle" fill="#666">${t}</text></svg>`)}`}function o({homeName:e,awayName:t,homeLogo:s,awayLogo:l,homeScore:r="0",awayScore:n="0",statusText:c="LIVE",timeText:d="",isLive:x=!0,sportId:h="1",matchId:m}){let p=s||i(e),u=l||i(t),g="5"===String(h),b="2"===String(h),f="bg-slate-200 border-slate-200",j="repeating-linear-gradient(90deg, transparent, transparent 10%, #000 10%, #000 20%)";return g?(f="bg-slate-100 border-slate-200",j="none"):b&&(f="bg-[#bc7a46] border-[#8a4e21]",j="repeating-linear-gradient(90deg, transparent, transparent 5%, #000 5%, #000 10%)"),(0,a.jsxs)("div",{className:"relative w-full aspect-video min-h-[300px] max-h-[600px] bg-slate-50 overflow-hidden flex flex-col justify-center",children:[(0,a.jsx)("div",{className:"absolute inset-0 flex items-center justify-center pointer-events-none mt-16 md:mt-24",children:(0,a.jsx)("div",{className:"relative w-[120%] h-[120%] sm:w-[90%] sm:h-[120%] max-w-[900px] flex-shrink-0 transition-transform duration-1000",style:{transform:"perspective(900px) rotateX(60deg) scale(0.9)",transformOrigin:"center center"},children:(0,a.jsxs)("div",{className:`absolute inset-0 ${f} shadow-[0_30px_60px_rgba(0,0,0,0.8)] border-4 rounded-xl overflow-hidden flex transition-colors duration-500`,children:[(0,a.jsx)("div",{className:"absolute inset-0 opacity-15 pointer-events-none",style:{backgroundImage:j}}),(0,a.jsxs)("div",{className:"absolute inset-[4%] pointer-events-none shadow-sm flex items-center justify-center",children:["1"===String(h)&&(0,a.jsxs)("div",{className:"absolute inset-0 w-full h-full border-2 border-white/60",children:[(0,a.jsx)("div",{className:"absolute left-1/2 top-0 bottom-0 w-0 border-l-2 border-white/60 -translate-x-1/2"}),(0,a.jsx)("div",{className:"absolute left-1/2 top-1/2 w-[18%] aspect-square rounded-full border-2 border-white/60 -translate-x-1/2 -translate-y-1/2"}),(0,a.jsx)("div",{className:"absolute left-1/2 top-1/2 w-2 h-2 rounded-full bg-white/80 -translate-x-1/2 -translate-y-1/2"}),(0,a.jsx)("div",{className:"absolute left-0 top-1/2 w-[16%] h-[46%] border-2 border-l-0 border-white/60 -translate-y-1/2 bg-slate-200"}),(0,a.jsx)("div",{className:"absolute left-0 top-1/2 w-[6%] h-[20%] border-2 border-l-0 border-white/60 -translate-y-1/2 bg-slate-200"}),(0,a.jsx)("div",{className:"absolute left-[16%] top-1/2 w-[8%] aspect-square border-2 border-l-0 border-white/60 rounded-r-full -translate-y-1/2 clip-path-half",style:{clipPath:"inset(0 0 0 50%)"}}),(0,a.jsx)("div",{className:"absolute right-0 top-1/2 w-[16%] h-[46%] border-2 border-r-0 border-white/60 -translate-y-1/2 bg-slate-200"}),(0,a.jsx)("div",{className:"absolute right-0 top-1/2 w-[6%] h-[20%] border-2 border-r-0 border-white/60 -translate-y-1/2 bg-slate-200"}),(0,a.jsx)("div",{className:"absolute right-[16%] top-1/2 w-[8%] aspect-square border-2 border-r-0 border-white/60 rounded-l-full -translate-y-1/2 clip-path-half",style:{clipPath:"inset(0 50% 0 0)"}})]}),g&&(0,a.jsxs)("div",{className:"absolute inset-[10%] w-[80%] h-[80%
1] border-2 border-white/80 bg-white",children:[(0,a.jsx)("div",{className:"absolute top-[10%] bottom-[10%] left-0 right-0 border-y-2 border-white/80"}),(0,a.jsx)("div",{className:"absolute left-1/2 top-[-2%] bottom-[-2%] w-1 bg-white/40 shadow-xl -translate-x-1/2 z-10"}),(0,a.jsx)("div",{className:"absolute left-[25%] right-[25%] top-[10%] bottom-[10%] border-x-2 border-white/80"}),(0,a.jsx)("div",{className:"absolute left-[25%] right-[25%] top-1/2 w-[50%] border-t-2 border-white/80 -translate-y-1/2"}),(0,a.jsx)("div",{className:"absolute left-0 top-1/2 w-[2%] border-t-2 border-white/80 -translate-y-1/2"}),(0,a.jsx)("div",{className:"absolute right-0 top-1/2 w-[2%] border-t-2 border-white/80 -translate-y-1/2"})]}),b&&(0,a.jsxs)("div",{className:"absolute inset-0 w-full h-full border-2 border-white/50",children:[(0,a.jsx)("div",{className:"absolute left-1/2 top-0 bottom-0 w-0 border-l-2 border-white/50 -translate-x-1/2"}),(0,a.jsx)("div",{className:"absolute left-1/2 top-1/2 w-[15%] aspect-square rounded-full border-2 border-white/50 -translate-x-1/2 -translate-y-1/2"}),(0,a.jsx)("div",{className:"absolute left-0 top-1/2 w-[18%] h-[35%] border-2 border-l-0 border-white/50 -translate-y-1/2 bg-[#bc7a46]"}),(0,a.jsx)("div",{className:"absolute left-[18%] top-1/2 w-[10%] aspect-square rounded-full border-2 border-white/50 -translate-y-1/2"}),(0,a.jsx)("div",{className:"absolute left-0 top-1/2 w-[30%] h-[70%] border-2 border-l-0 border-white/50 rounded-r-full -translate-y-1/2 opacity-60"}),(0,a.jsx)("div",{className:"absolute right-0 top-1/2 w-[18%] h-[35%] border-2 border-r-0 border-white/50 -translate-y-1/2 bg-[#bc7a46]"}),(0,a.jsx)("div",{className:"absolute right-0 top-1/2 w-[30%] h-[70%] border-2 border-r-0 border-white/50 rounded-l-full -translate-y-1/2 opacity-60"})]})]}),x&&(0,a.jsx)("div",{className:`absolute left-1/2 top-1/2 shadow-[0_8px_16px_rgba(0,0,0,0.8)] z-10 transition-all duration-[3000ms] border-2 border-white/20 rounded-full
2                                ${g?"w-2 h-2 sm:w-3 sm:h-3 bg-[#ccff00]":b?"w-4 h-4 sm:w-6 sm:h-6 bg-[#d95d16]":"w-4 h-4 sm:w-5 sm:h-5 bg-white"}`,style:{animation:"ballMove 8s infinite alternate ease-in-out",transform:"translate(-50%, -50%)"},children:(0,a.jsx)("div",{className:"absolute -bottom-4 left-1/2 w-4 h-2 bg-white/40 rounded-full blur-sm -translate-x-1/2"})}),x&&(0,a.jsxs)("div",{className:"absolute left-[65%] top-[60%] flex flex-col items-center animate-bounce-slow",style:{animation:"floatBubble 4s infinite alternate ease-in-out"},children:[(0,a.jsxs)("div",{className:"bg-white/95 backdrop-blur border border-white/10 rounded-2xl p-2 shadow-2xl flex items-center gap-3 w-max max-w-[200px]",children:[(0,a.jsx)("div",{className:"w-6 h-6 rounded-full flex items-center justify-center p-0.5 bg-white/5 shrink-0",children:(0,a.jsx)("img",{src:p,alt:e||"Home team",className:"max-w-full max-h-full object-contain",onError:t=>t.target.src=i(e),loading:"lazy",decoding:"async"})}),(0,a.jsx)("div",{className:"flex flex-col pr-1 overflow-hidden",children:(0,a.jsx)("span",{className:"text-slate-900 font-bold text-[10px] sm:text-xs tracking-wide truncate",children:g?"Serve / Return":"Tấn c\xf4ng nguy hiểm"})})]}),(0,a.jsx)("div",{className:"w-0 h-0 border-l-[6px] border-r-[6px] border-t-[6px] border-l-transparent border-r-transparent border-t-[#1a1c28]/95 mt-[-1px]"})]})]})})}),(0,a.jsx)("div",{className:"relative z-20 flex-1 flex flex-col items-center justify-start p-4 md:p-6 pointer-events-none w-full",children:(0,a.jsxs)("div",{className:"w-full max-w-[800px] flex items-center justify-between px-4 sm:px-6 py-3 rounded-xl bg-gradient-to-r from-[#0d0f14]/90 via-[#151821]/95 to-[#0d0f14]/90 backdrop-blur-xl border border-white/10 shadow-[0_10px_40px_rgba(0,0,0,0.8)] pointer-events-auto",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 flex-1 min-w-0 pr-2",children:[(0,a.jsx)("img",{src:p,alt:e,className:"w-8 h-8 md:w-12 md:h-12 object-contain drop-shadow-lg shrink-0",onError:t=>t.target.src=i(e),loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-slate-900 text-xs sm:text-sm md:text-base font-bold truncate tracking-wide",children:e})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1 shrink-0 px-2 sm:px-6 min-w-[100px]",children:[(0,a.jsxs)("span",{className:`inline-flex items-center gap-1.5 px-2.5 py-0.5 rounded-full text-[10px] sm:text-xs font-bold shadow-inner ${x?"bg-green-500/10 text-green-400 border border-green-500/20":"bg-white/5 text-slate-900/40"}`,children:[x&&(0,a.jsx)("span",{className:"w-1.5 h-1.5 rounded-full bg-green-500 animate-pulse shadow-[0_0_8px_#22c55e]"}),d||c]}),(0,a.jsxs)("div",{className:"flex gap-3 sm:gap-5 items-center justify-center",children:[(0,a.jsx)("span",{className:"text-slate-900 text-2xl sm:text-4xl font-black drop-shadow-md",children:r}),(0,a.jsx)("span",{className:"text-slate-900/30 text-xl font-light",children:"-"}),(0,a.jsx)("span",{className:"text-slate-900 text-2xl sm:text-4xl font-black drop-shadow-md",children:n})]})]}),(0,a.jsxs)("div",{className:"flex items-center justify-end gap-3 flex-1 min-w-0 pl-2 text-right",children:[(0,a.jsx)("span",{className:"text-slate-900 text-xs sm:text-sm md:text-base font-bold truncate tracking-wide",children:t}),(0,a.jsx)("img",{src:u,alt:t,className:"w-8 h-8 md:w-12 md:h-12 object-contain drop-shadow-lg shrink-0",onError:e=>e.target.src=i(t),loading:"lazy",decoding:"async"})]})]})}),(0,a.jsx)("div",{className:"relative z-20 mt-auto w-full p-4 flex justify-center pointer-events-none",children:(0,a.jsx)("div",{className:"w-full max-w-[600px] h-6 bg-white/40 backdrop-blur-md rounded-full border border-white/5 flex items-center px-4",children:(0,a.jsxs)("div",{className:"flex-1 h-0.5 bg-white/10 relative rounded-full",children:[x&&(0,a.jsx)("div",{className:"absolute left-0 top-0 bottom-0 bg-gradient-to-r from-[#b38b22] to-[#ffda6a] w-[65%] rounded-full opacity-90 shadow-[0_0_12px_#daa520]"}),(0,a.jsx)("span",{className:"absolute left-[65%] top-1/2 -translate-y-1/2 -translate-x-1/2 w-1.5 h-1.5 rounded-full bg-white shadow-md"})]})})}),(0,a.jsx)("style",{children:`
3                @keyframes ballMove {
4                    0% { transform: translate(-30%, -20%) scale(1); }
5                    25% { transform: translate(40%, -10%) scale(1.1); }
6                    50% { transform: translate(20%, 30%) scale(0.9); }
7                    75% { transform: translate(-10%, 15%) scale(1.2); }
8                    100% { transform: translate(-45%, 0%) scale(1); }
9                }
10                @keyframes floatBubble {
11                    0% { transform: translateY(0px) translateX(0px); }
12                    50% { transform: translateY(-8px) translateX(4px); }
13                    100% { transform: translateY(4px) translateX(-4px); }
14                }
15            `})]})}function c(e,t){if("1"===t||"2"===t)switch(e){case"2":return{t:"HT 1",live:!0,sc:!0};case"3":return{t:"Giữa giờ",live:!0,sc:!0};case"4":return{t:"HT 2",live:!0,sc:!0};case"5":return{t:"Hiệp phụ",live:!0,sc:!0};case"7":return{t:"Penalty",live:!0,sc:!0};case"8":case"9":return{t:"Kết th\xfac",live:!1,sc:!0};default:return{t:"Chưa bắt đầu",live:!1,sc:!1}}
15return["51","52","53","54","55"].includes(e)?{t:`Set ${e-50}`,live:!0,sc:!0}:["100","90","110"].includes(e)?{t:"KT",live:!1,sc:!0}:"0"===e||"1"===e?{t:"Chưa bắt đầu",live:!1,sc:!1}:{t:"LIVE",live:!0,sc:!0}}function d(e){let t=(e||"").split(/[\s-]+/).slice(0,2).map(e=>e[0]||"").join("").toUpperCase()||"??";return`data:image/svg+xml,${encodeURIComponent(`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 80 80"><rect width="80" height="80" rx="20" fill="#1a1c25"/><text x="40" y="47" font-size="20" font-family="Arial" font-weight="700" text-anchor="middle" fill="#666">${t}</text></svg>`)}`}function x(e){let t=new Date(1e3*parseInt(e||"0",10));return{hm:t.toLocaleTimeString("vi-VN",{hour:"2-digit",minute:"2-digit",timeZone:"Asia/Ho_Chi_Minh"}),dm:t.toLocaleDateString("vi-VN",{day:"2-digit",month:"2-digit",timeZone:"Asia/Ho_Chi_Minh"}),full:t.toLocaleDateString("vi-VN",{day:"2-digit",month:"2-digit",year:"numeric",timeZone:"Asia/Ho_Chi_Minh"})}}let h="max-w-[1200px]";function m({matchData:e,relatedMatches:t,matchDetails:s,standings:r,brandingNameUpper:i}){let p,u,g,j,v,y,[C,S]=(0,l.useState)("odds"),L=e?.match_data?.anchors||[],[$,F]=(0,l.useState)(!1),[T,A]=(0,l.useState)(!1),[M,H]=(0,l.useState)(null),[D,B]=(0,l.useState)(!1),z=(0,l.useRef)(0);(0,l.useEffect)(()=>{if(!e?.has_live||"1"!==e.has_live||0===L.length)return;let t=!1;B(!0);let s=async t=>{let s=t?.uid,a=`/api/socolive/proxy-stream?url=${encodeURIComponent(`https://live.inplyr.com/${s?`room/${s}`:`default/${e.id}`}.m3u8`)}`;try{let e=await fetch(a,{method:"GET",cache:"no-store"});if(!e.ok)return null;let s=(await e.text()).split("\n").filter(e=>e.trim()&&!e.startsWith("#"));if(0===s.length)return null;return(await fetch(s[0],{method:"HEAD",cache:"no-store"})).ok?t:null}catch{return null}};return Promise.all(L.map(e=>s(e))).then(e=>{if(t)return;let s=e.find(e=>null!==e);s?(H(s),F(!0),A(!1)):(H(L[0]),A(!0)),B(!1)}),()=>{t=!0}},[e?.has_live,L.length]),(0,l.useEffect)(()=>{if(!T||D||z.current>=20)return;let t=setTimeout(()=>{z.current++,A(!1),B(!0);let t=async t=>{let s=t?.uid,a=`/api/socolive/proxy-stream?url=${encodeURIComponent(`https://live.inplyr.com/${s?`room/${s}`:`default/${e.id}`}.m3u8`)}`;try{let e=await fetch(a,{method:"GET",cache:"no-store"});if(!e.ok)return null;let s=(await e.text()).split("\n").filter(e=>e.trim()&&!e.startsWith("#"));if(0===s.length)return null;return(await fetch(s[0],{method:"HEAD",cache:"no-store"})).ok?t:null}catch{return null}};Promise.all(L.map(e=>t(e))).then(e=>{let t=e.find(e=>null!==e);t?(H(t),F(!0),A(!1)):A(!0),B(!1)})},15e3);return()=>clearTimeout(t)},[T,D]);let[I,R]=(0,l.useState)(null),U=e?.post_name||e?.ls_id||e?.id;if(window.location.origin,(0,l.useEffect)(()=>{if(!U)return;let e=setInterval(async()=>{try{let e=await fetch(`/api/klivevip/match/${U}`,{cache:"no-store"});if(e.ok){let t=await e.json();R(t?.match??null)}}catch{}},1e4);return()=>clearInterval(e)},[U]),!e)return(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center py-32 gap-4",children:[(0,a.jsx)("span",{className:"text-[#64748B] text-lg",children:"Kh\xf4ng t\xecm thấy trận đấu"}),(0,a.jsx)("a",{href:"/",className:"text-[#4681E8] hover:underline text-sm",children:"← Quay lại"})]});let G=I?{...e,...I}:e,P=G?.has_live==="1"&&L.length>0,K=c(G.status_id,G.sport_id),V=$&&M&&!T&&!D,W=P&&(D||T&&K.live&&z.current<20),O=!P||T&&!W&&!D,q=!K.live&&"8"!==String(G.status_id)&&"9"!==String(G.status_id),{hm:X,full:Y}=x(G.time),Z=G.source_card_meta?.league_label||G.match_data?.competition_vi||G.match_data?.competition_full||"",Q=G.match_data?.stage_label||G.source_card_meta?.stage_label||"",J=G.home_logo||d(G.home_name),ee=G.away_logo||d(G.away_name),et=e=>t=>{t.target.src=d(e)};return(0,a.jsxs)("div",{className:"w-full bg-white min-h-screen text-slate-600 font-sans pb-16",children:[(0,a.jsx)("div",{className:"w-full border-b border-slate-200 bg-white",children:(0,a.jsxs)("div",{className:`${h} mx-auto px-4 py-3 flex items-center justify-between`,children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 text-[13px] font-bold",children:[(0,a.jsx)("span",{className:"text-[#4681E8] uppercase tracking-wide",children:Z}),Q&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"text-slate-300",children:"•"}),(0,a.jsx)("span",{className:"text-slate-600",children:Q})]})]}),(0,a.jsx)("div",{className:"text-[12px] font-mono text-slate-400 hidden sm:block",children:Y})]})}),(0,a.jsxs)("div",{className:`${h} mx-auto px-0 md:px-4 py-0 md:py-6 flex flex-col lg:flex-row gap-4 lg:gap-6`,children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0 flex flex-col gap-4 lg:gap-6",children:[(0,a.jsxs)("div",{className:"w-full relative bg-[#000000] rounded-none md:rounded-2xl overflow-hidden shadow-[0_10px_40px_rgba(0,0,0,0.5)] border-y md:border border-slate-200",children:[(0,a.jsx)("div",{className:"relative w-full aspect-video bg-[#000000] group z-10",children:V?(0,a.jsx)(n,{src:`/api/klivevip/proxy-stream?url=${encodeURIComponent(`https://live.inplyr.com/${M?.uid&&"default"!==M.uid?`room/${M.uid}`:`default/${G.id}`}.m3u8`)}`,autoPlay:!0,onError:()=>A(!0)}):O?(0,a.jsx)(o,{homeName:G.home_name,awayName:G.away_name,homeLogo:G.home_logo,awayLogo:G.away_logo,homeScore:K.sc?G.home_score:"0",awayScore:K.sc?G.away_score:"0",statusText:K.t,timeText:G.time_text||X,isLive:K.live,sportId:G.sport_id,matchId:G.ls_id||G.id,kickoffMs:1e3*Number(G?.time||0),isPreMatch:q}):(0,a.jsxs)("div",{className:"absolute inset-0 z-10 flex flex-col items-center justify-center p-4 lg:p-10",children:[(0,a.jsxs)("div",{className:"absolute inset-0 flex justify-between items-center opacity-[0.03] pointer-events-none px-4 lg:px-20 overflow-hidden",children:[(0,a.jsx)("img",{src:J,alt:"",className:"w-1/2 max-w-[400px] blur-[10px]",loading:"lazy",decoding:"async"}),(0,a.jsx)("img",{src:ee,alt:"",className:"w-1/2 max-w-[400px] blur-[10px]",loading:"lazy",decoding:"async"})]}),P&&!T&&(0,a.jsx)("button",{onClick:()=>F(!0),className:"group mb-4 sm:mb-8 w-16 h-16 md:w-20 md:h-20 rounded-full bg-[#4681E8] flex items-center justify-center hover:bg-[#55CAF1] transition-all shadow-[0_0_30px_rgba(70,129,232,0.5)] curs
15or-pointer z-20",children:(0,a.jsx)("svg",{className:"w-8 h-8 md:w-10 md:h-10 text-white ml-1.5 md:ml-2 group-hover:scale-110 transition-transform",viewBox:"0 0 24 24",fill:"currentColor",children:(0,a.jsx)("path",{d:"M8 5v14l11-7z"})})}),(0,a.jsxs)("div",{className:"grid grid-cols-[1fr_auto_1fr] items-center w-full max-w-[800px] gap-2 lg:gap-8 z-20",children:[(0,a.jsxs)("div",{className:"flex flex-col items-center gap-2 lg:gap-4",children:[(0,a.jsx)("img",{src:J,alt:G.home_name,className:"w-16 h-16 sm:w-24 sm:h-24 lg:w-32 lg:h-32 object-contain drop-shadow-[0_10px_20px_rgba(0,0,0,0.8)]",onError:et(G.home_name),loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-[#FFFFFF] text-xs sm:text-base lg:text-lg font-black text-center line-clamp-2 uppercase tracking-wide",children:G.home_name})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-2 lg:gap-3",children:[K.sc?(0,a.jsxs)("div",{className:"flex items-center gap-3 lg:gap-6 bg-white/90 backdrop-blur-md px-4 py-2 lg:px-8 lg:py-4 rounded-2xl border border-slate-200 shadow-2xl",children:[(0,a.jsx)("span",{className:"text-[#4681E8] text-[32px] sm:text-[48px] lg:text-[64px] font-black leading-none",children:G.home_score}),(0,a.jsx)("span",{className:"text-slate-300 text-[20px] lg:text-[28px] font-light",children:":"}),(0,a.jsx)("span",{className:"text-[#4681E8] text-[32px] sm:text-[48px] lg:text-[64px] font-black leading-none",children:G.away_score})]}):(0,a.jsx)("div",{className:"text-[#FFFFFF] text-[32px] sm:text-[48px] lg:text-[56px] font-black tracking-widest leading-none drop-shadow-xl",children:X}),(0,a.jsxs)("span",{className:`inline-flex items-center gap-2 rounded-full px-3 py-1 lg:px-5 lg:py-1.5 text-[10px] lg:text-[12px] font-bold tracking-widest uppercase ${K.live?"bg-[#4681E8] text-white shadow-[0_0_20px_rgba(70,129,232,0.6)]":"bg-white text-slate-600 border border-slate-200"}`,children:[K.live&&(0,a.jsx)("span",{className:"w-2 h-2 rounded-full bg-white animate-pulse"}),K.t,G.time_text?` : ${G.time_text}`:""]})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-2 lg:gap-4",children:[(0,a.jsx)("img",{src:ee,alt:G.away_name,className:"w-16 h-16 sm:w-24 sm:h-24 lg:w-32 lg:h-32 object-contain drop-shadow-[0_10px_20px_rgba(0,0,0,0.8)]",onError:et(G.away_name),loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-[#FFFFFF] text-xs sm:text-base lg:text-lg font-black text-center line-clamp-2 uppercase tracking-wide",children:G.away_name})]})]})]})}),L.length>0&&(0,a.jsxs)("div",{className:"w-full bg-white border-t border-slate-200 px-3 lg:px-6 py-2.5 lg:py-4 flex items-center gap-2 lg:gap-4 overflow-x-auto z-20",children:[(0,a.jsx)("span",{className:"text-[10px] lg:text-[11px] text-slate-600 uppercase font-bold tracking-widest shrink-0 mr-1 lg:mr-2",children:"CHỌN K\xcaNH TRUYỀN:"}),L.map((e,t)=>(0,a.jsxs)("button",{onClick:()=>{H(e),F(!0),A(!1)},className:`shrink-0 flex items-center gap-1.5 lg:gap-2 rounded-full px-3 py-1.5 lg:px-5 lg:py-2 text-[11px] lg:text-[13px] font-bold transition-all ${M?.uid===e.uid&&!T?"bg-[#4681E8]/10 border border-[#4681E8] text-[#4681E8] shadow-[0_0_15px_rgba(70,129,232,0.2)]":"bg-white border border-slate-200 text-slate-600 hover:text-[#4681E8] hover:border-[#4681E8]/50"}`,children:[(0,a.jsx)("span",{className:`w-1.5 h-1.5 lg:w-2 lg:h-2 rounded-full ${M?.uid===e.uid&&!T?"bg-[#4681E8] animate-pulse":"bg-transparent"}`}),"BLV ",e.nickName||`K\xeanh ${t+1}`]},e.uid||t))]})]}),(p=(()=>{let e=s?.stats;if(!e)return!1;let t=null;return Array.isArray(e)&&e.length>0?t=e[0]:e?.results?.[0]?t=e.results[0]:e?.stats_full_time&&(t=e),!!t&&!!(t.stats_full_time?.length>0||t.stats_haft_time?.length>0||t.stats_half_time?.length>0||t.stats?.length>0)})(),u=!!(s?.lineup&&(Array.isArray(s.lineup)?s.lineup.length>0:s.lineup.home||s.lineup.away)),g=!!(s?.events&&(Array.isArray(s.events)?s.events.length>0:s.events.incidents?.length>0||s.events.data?.length>0)),j=!!(r&&(Array.isArray(r)?r.length>0:r.data?.length>0)),(y=(v=[{id:"stats",label:"THỐNG K\xca",show:p},{id:"lineup",label:"ĐỘI H\xccNH",show:u},{id:"events",label:"DIỄN BIẾN",show:g},{id:"standings",label:"BẢNG XH",show:j},{id:"odds",label:"TỶ LỆ K\xc8O",show:!!(s?.odds&&Array.isArray(s.odds)&&s.odds.length>0)}].filter(e=>e.show)).find(e=>e.id===C)?C:v[0]?.id||"odds")!==C&&setTimeout(()=>S(y),0),v.length>0?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"bg-white rounded-2xl p-2 border border-slate-200 flex overflow-x-auto gap-2 shadow-[0_4px_15px_rgba(0,0,0,0.08)] mx-4 md:mx-0",children:v.map(({id:e,label:t})=>(0,a.jsx)("button",{onClick:()=>S(e),className:`flex-1 min-w-[100px] py-2.5 sm:py-3 text-[10px] sm:text-[12px] font-black uppercase tracking-widest rounded-xl transition-all ${y===e?"bg-[#4681E8]/10 text-[#4681E8] border border-[#4681E8]/30 shadow-inner":"text-slate-500 hover:text-[#4681E8] hover:bg-[#4681E8]/5 border border-transparent"}`,children:t},e))}),(0,a.jsxs)("div",{className:"bg-white rounded-2xl border border-slate-200 overflow-hidden shadow-[0_4px_15px_rgba(0,0,0,0.08)] min-h-[400px] mx-4 md:mx-0",children:["stats"===y&&(0,a.jsx)(b,{matchDetails:s}),"lineup"===y&&(0,a.jsx)(f,{matchDetails:s}),"events"===y&&(0,a.jsx)(_,{events:s?.events}),"standings"===y&&(0,a.jsx)(k,{standings:r}),"odds"===y&&(0,a.jsx)(E,{odds:s?.odds})]})]}):null),t.length>0&&(0,a.jsxs)("div",{className:"mt-4 mx-4 md:mx-0",children:[(0,a.jsxs)("h2",{className:"px-1 py-4 text-sm sm:text-base font-black text-slate-800 uppercase flex items-center gap-3 tracking-widest border-b border-slate-100 mb-4",children:[(0,a.jsx)("span",{className:"w-1 h-5 bg-[#4681E8] rounded-sm shadow-[0_0_8px_#4681E8]"}),"TRẬN ĐẤU C\xd9NG GIẢI"]}),(0,a.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3 sm:gap-4",children:t.slice(0,4).map(e=>(0,a.jsx)(w,{m:e},e.id))})]})]}),(0,a.jsx)("div",{className:"w-full lg:w-[350px] xl:w-[400px] shrink-0 px-4 md:px-0",children:(0,a.jsxs)("div",{className:"bg-white border border-slate-200 rounded-2xl overflow-hidden flex flex-col shadow-[0_10px_30px_rgba(0,0,0,0.1)] lg:sticky lg:top-8 h-[600px] lg:h-[c
15alc(100vh-100px)] lg:max-h-[850px]",children:[(0,a.jsxs)("div",{className:"px-5 py-4 border-b border-slate-200 flex items-center justify-between bg-white",children:[(0,a.jsxs)("h3",{className:"text-slate-800 text-sm font-black uppercase tracking-widest flex items-center gap-2",children:[(0,a.jsx)("span",{className:"w-2.5 h-2.5 rounded-full bg-[#4681E8] shadow-[0_0_10px_rgba(70,129,232,0.4)]"}),"PH\xd2NG CHAT"]}),(0,a.jsxs)("span",{className:"text-[10px] bg-white px-3 py-1.5 rounded-full text-[#4681E8] font-mono border border-[#4681E8]/30 shadow-inner tracking-widest flex items-center gap-1.5",children:[(0,a.jsx)("svg",{className:"w-3 h-3",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 10l4.553-2.276A1 1 0 0121 8.618v6.764a1 1 0 01-1.447.894L15 14M5 18h8a2 2 0 002-2V8a2 2 0 00-2-2H5a2 2 0 00-2 2v8a2 2 0 002 2z"})}),L.length," BLV"]})]}),(0,a.jsx)("div",{className:"flex-1 bg-[#FFFFFF]/40 min-h-0 chat-container-wrapper",children:(0,a.jsx)(N,{anchors:L,selectedAnchor:M})})]})})]})]})}let p={25:"KIỂM SO\xc1T B\xd3NG",24:"CHUYỀN CH\xcdNH X\xc1C",23:"TỔNG SỐ ĐƯỜNG CHUYỀN",22:"TẤN C\xd4NG",21:"T.C\xd4NG NGUY HIỂM",2:"S\xdaT TR\xdaNG Đ\xcdCH",37:"PHẠT G\xd3C",28:"N\xc9M BI\xcaN",8:"VIỆT VỊ",3:"THẺ V\xc0NG",4:"THẺ ĐỎ",5:"S\xdaT PENALTY",29:"PHẠM LỖI",26:"Đ\xc1NH ĐẦU",27:"CỨU THUA",1:"B\xc0N THẮNG",7:"PHẢN LƯỚI"},u=[25,21,22,24,2,23,4,3,37,28,8,5,29],g="https://cdn.sportdb.live/upload/team/";function b({matchDetails:e}){let[t,s]=(0,l.useState)("full"),r=e?.stats,n=e?.lineup,i=n?.match?.home_team,o=n?.match?.away_team,c=null;Array.isArray(r)&&r.length>0?c=r[0]:r?.results?.[0]?c=r.results[0]:r?.stats_full_time&&(c=r);let d={full:c?.stats_full_time||[],h1:c?.stats_haft_time||c?.stats_half_time||[],h2:c?.stats_haft_time_2nd_half||[]}[t]||[];if(!c||0===d.length)return(0,a.jsx)(j,{text:"Thống k\xea sẽ được cập nhật khi trận đấu bắt đầu"});let x=[...d].sort((e,t)=>{let s=u.indexOf(e.type),a=u.indexOf(t.type);return(-1===s?999:s)-(-1===a?999:a)});return(0,a.jsxs)("div",{className:"flex flex-col",children:[(i||o)&&(0,a.jsxs)("div",{className:"flex items-center justify-between px-4 py-3 border-b border-slate-100",children:[(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5 w-20",children:[i?.logo&&(0,a.jsx)("img",{src:g+i.logo,alt:i?.name||"Home team",className:"w-8 h-8 object-contain",onError:e=>e.target.style.display="none",loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-slate-600 text-[10px] font-medium text-center leading-tight",children:i?.name||""})]}),(0,a.jsx)("div",{className:"flex gap-1",children:[{k:"h1",l:"Hiệp 1"},{k:"h2",l:"Hiệp 2"},{k:"full",l:"Cả trận"}].map(({k:e,l})=>(0,a.jsx)("button",{onClick:()=>s(e),className:`px-2.5 py-1 text-[10px] font-bold rounded transition-all ${t===e?"bg-[#E11D48] text-white":"text-slate-400 hover:text-slate-600 bg-slate-100"}`,children:l},e))}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5 w-20",children:[o?.logo&&(0,a.jsx)("img",{src:g+o.logo,alt:o?.name||"Away team",className:"w-8 h-8 object-contain",onError:e=>e.target.style.display="none",loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-slate-600 text-[10px] font-medium text-center leading-tight",children:o?.name||""})]})]}),(0,a.jsx)("div",{className:"px-4 py-3 space-y-3",children:x.map(e=>{let t=p[e.type]||`Stat ${e.type}`,s=e.home,l=e.away,r=24===e.type||25===e.type,n=s+l,i=0===n?50:s/n*100,o=s>l,c=l>s;return(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"flex justify-between items-center mb-1.5",children:[(0,a.jsxs)("span",{className:`text-xs font-bold w-10 tabular-nums ${o?"text-slate-800":"text-slate-400"}`,children:[s,r?"%":""]}),(0,a.jsx)("span",{className:"text-slate-400 text-[10px] font-semibold tracking-wide uppercase",children:t}),(0,a.jsxs)("span",{className:`text-xs font-bold w-10 text-right tabular-nums ${c?"text-slate-800":"text-slate-400"}`,children:[l,r?"%":""]})]}),(0,a.jsxs)("div",{className:"flex gap-0.5 h-[5px]",children:[(0,a.jsx)("div",{className:"flex-1 rounded-l-full bg-white/[0.06] overflow-hidden flex justify-end",children:(0,a.jsx)("div",{className:`rounded-l-full transition-all duration-500 ${o?"bg-gradient-to-r from-[#E11D48]/60 to-[#E11D48]":"bg-gradient-to-r from-white/10 to-white/20"}`,style:{width:`${i}%`}})}),(0,a.jsx)("div",{className:"flex-1 rounded-r-full bg-white/[0.06] overflow-hidden",children:(0,a.jsx)("div",{className:`rounded-r-full transition-all duration-500 ${c?"bg-gradient-to-l from-[#E11D48]/60 to-[#E11D48]":"bg-gradient-to-l from-white/10 to-white/20"}`,style:{width:`${100-i}%`}})})]})]},e.type)})})]})}
15function f({matchDetails:e}){let[t,s]=(0,l.useState)("pitch"),r=e?.lineup,n=r?.lineup||r,i=n?.home||[],o=n?.away||[],c=r?.home_formation||"",d=r?.away_formation||"",x=r?.match?.home_team,h=r?.match?.away_team;if(0===i.length&&0===o.length)return(0,a.jsx)(j,{text:"Đội h\xecnh sẽ được c\xf4ng bố trước trận đấu 30 ph\xfat"});let m=e=>e.filter(e=>1===e.first),p=e=>e.filter(e=>1!==e.first),u=m(i),g=m(o),b=p(i),w=p(o);return(0,a.jsxs)("div",{className:"flex flex-col",children:[(0,a.jsxs)("div",{className:"flex items-center justify-center gap-1 px-3 py-2 border-b border-slate-100",children:[(0,a.jsx)("button",{onClick:()=>s("pitch"),className:`px-3 py-1.5 text-[10px] font-bold rounded transition-all ${"pitch"===t?"bg-[#E11D48] text-white":"text-slate-400 bg-slate-100"}`,children:"Đội h\xecnh xuất ph\xe1t"}),(0,a.jsx)("button",{onClick:()=>s("list"),className:`px-3 py-1.5 text-[10px] font-bold rounded transition-all ${"list"===t?"bg-[#E11D48] text-white":"text-slate-400 bg-slate-100"}`,children:"Đội h\xecnh dá»± bị"})]}),"pitch"===t?(0,a.jsx)("div",{className:"relative w-full",style:{aspectRatio:"68/105"},children:(0,a.jsxs)("div",{className:"absolute inset-0 bg-gradient-to-b from-[#1a5c2a] via-[#1e6b31] to-[#1a5c2a] rounded-2xl overflow-hidden",children:[(0,a.jsxs)("div",{className:"absolute inset-[3%] border border-white/20 rounded-lg",children:[(0,a.jsx)("div",{className:"absolute left-0 right-0 top-1/2 h-px bg-white/20"}),(0,a.jsx)("div",{className:"absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 w-[22%] aspect-square rounded-full border border-white/20"}),(0,a.jsx)("div",{className:"absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 w-1.5 h-1.5 bg-white/30 rounded-full"}),(0,a.jsx)("div",{className:"absolute top-0 left-1/2 -translate-x-1/2 w-[55%] h-[16%] border-l border-r border-white/20"}),(0,a.jsx)("div",{className:"absolute top-0 left-1/2 -translate-x-1/2 w-[25%] h-[6%] border-l border-r border-white/20"}),(0,a.jsx)("div",{className:"absolute bottom-0 left-1/2 -translate-x-1/2 w-[55%] h-[16%] border-t border-l border-r border-white/20"}),(0,a.jsx)("div",{className:"absolute bottom-0 left-1/2 -translate-x-1/2 w-[25%] h-[6%] border-t border-l border-r border-white/20"})]}),(0,a.jsx)("div",{className:"absolute top-1 left-2 text-[9px] text-[#F8FAFC]/50 font-bold z-10",children:x?.name||""}),(0,a.jsx)("div",{className:"absolute top-1 right-2 text-[9px] text-[#E11D48]/70 font-bold z-10",children:c}),(0,a.jsx)("div",{className:"absolute bottom-1 left-2 text-[9px] text-[#F8FAFC]/50 font-bold z-10",children:h?.name||""}),(0,a.jsx)("div",{className:"absolute bottom-1 right-2 text-[9px] text-[#E11D48]/70 font-bold z-10",children:d}),u.map((e,t)=>{let s=`${e.x||50}%`,l=`${(e.y||10)/2}%`,r="G"===e.position;return(0,a.jsxs)("div",{className:"absolute flex flex-col items-center z-10 -translate-x-1/2 -translate-y-1/2",style:{left:s,top:l},children:[(0,a.jsx)("div",{className:`w-6 h-6 rounded-full flex items-center justify-center text-[9px] font-black ${r?"bg-yellow-400 text-black":"bg-blue-600 text-[#F8FAFC]"} shadow-md border border-white/20`,children:e.shirt_number||""}),(0,a.jsx)("span",{className:"text-[7px] text-[#F8FAFC] font-semibold mt-0.5 text-center max-w-[48px] truncate drop-shadow-[0_1px_2px_rgba(0,0,0,0.8)]",children:(e.name||"").split(" ").slice(-2).join(" ")}),1===e.captain&&(0,a.jsx)("span",{className:"absolute -top-1 -right-1 text-[6px] text-yellow-400",children:"C"})]},`h-${t}`)}),g.map((e,t)=>{let s=`${100-(e.x||50)}%`,l=`${100-(e.y||10)/2}%`,r="G"===e.position;return(0,a.jsxs)("div",{className:"absolute flex flex-col items-center z-10 -translate-x-1/2 -translate-y-1/2",style:{left:s,top:l},children:[(0,a.jsx)("div",{className:`w-6 h-6 rounded-full flex items-center justify-center text-[9px] font-black ${r?"bg-yellow-400 text-black":"bg-orange-500 text-[#F8FAFC]"} shadow-md border border-white/20`,children:e.shirt_number||""}),(0,a.jsx)("span",{className:"text-[7px] text-[#F8FAFC] font-semibold mt-0.5 text-center max-w-[48px] truncate drop-shadow-[0_1px_2px_rgba(0,0,0,0.8)]",children:(e.name||"").split(" ").slice(-2).join(" ")}),1===e.captain&&(0,a.jsx)("span",{className:"absolute -top-1 -right-1 text-[6px] text-yellow-400",children:"C"})]},`a-${t}`)})]})}):(0,a.jsxs)("div",{className:"px-3 py-2 text-xs",children:[(0,a.jsxs)("div",{className:"flex justify-between font-bold text-slate-400 mb-1 uppercase tracking-wider text-[9px] px-1",children:[(0,a.jsx)("span",{children:"Đội chá»
15§ nh\xe0"}),(0,a.jsx)("span",{children:"Đội kh\xe1ch"})]}),Array.from({length:Math.max(b.length,w.length)}).map((e,t)=>{let s=b[t],l=w[t];return(0,a.jsxs)("div",{className:"flex justify-between items-center border-b border-slate-50 py-1.5",children:[(0,a.jsx)("div",{className:"flex items-center gap-1.5 w-1/2 min-w-0",children:s&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"text-[#E11D48] font-bold w-5 text-center shrink-0 text-[10px]",children:s.shirt_number||""}),(0,a.jsx)("span",{className:"text-slate-700 truncate text-[11px]",children:s.name||""})]})}),(0,a.jsx)("div",{className:"flex items-center gap-1.5 w-1/2 justify-end min-w-0",children:l&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"text-slate-700 truncate text-[11px] text-right",children:l.name||""}),(0,a.jsx)("span",{className:"text-[#E11D48] font-bold w-5 text-center shrink-0 text-[10px]",children:l.shirt_number||""})]})})]},t)})]})]})}function j({text:e}){return(0,a.jsx)("div",{className:"flex items-center justify-center py-10 text-slate-400 text-sm text-center",children:e})}function w({m:e}){let t=c(e.status_id,e.sport_id),{hm:s,dm:l}=x(e.time),r=e.source_card_meta?.league_label||e.match_data?.competition_vi||"";return(0,a.jsxs)("a",{href:`/match/${encodeURIComponent(e.post_name||e.id)}`,className:"flex items-center gap-3 rounded-2xl bg-white hover:bg-slate-50 border border-slate-100 hover:border-[#4681E8]/30 p-3 transition-all group",children:[(0,a.jsxs)("div",{className:"shrink-0 w-14 text-center",children:[(0,a.jsx)("div",{className:"text-[#E11D48] text-[11px] font-bold",children:s}),(0,a.jsx)("div",{className:"text-slate-400 text-[9px]",children:l})]}),(0,a.jsx)("div",{className:"w-px h-9 bg-slate-200 shrink-0"}),(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("div",{className:"text-slate-400 text-[9px] truncate mb-1",children:r}),(0,a.jsxs)("div",{className:"flex items-center gap-2 mb-0.5",children:[(0,a.jsx)("img",{src:e.home_logo||d(e.home_name),alt:e.home_name,className:"w-4 h-4 object-contain shrink-0",onError:t=>t.target.src=d(e.home_name),loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-slate-600 text-[12px] font-medium truncate",children:e.home_name})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("img",{src:e.away_logo||d(e.away_name),alt:e.away_name,className:"w-4 h-4 object-contain shrink-0",onError:t=>t.target.src=d(e.away_name),loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-slate-600 text-[12px] font-medium truncate",children:e.away_name})]})]}),t.sc?(0,a.jsxs)("span",{className:"text-slate-800 font-bold text-[14px] tabular-nums shrink-0",children:[e.home_score,"-",e.away_score]}):(0,a.jsx)("span",{className:"text-[10px] font-bold text-[#E11D48] bg-[#E11D48]/10 rounded px-2.5 py-1 group-hover:bg-[#E11D48]/15 transition shrink-0",children:"XEM NGAY"})]})}let v={0:{bg:"bg-white/10",text:"text-[#F8FAFC]/40",nameCls:"text-[#94A3B8]"},1:{bg:"bg-white/10",text:"text-[#F8FAFC]/50",nameCls:"text-[#94A3B8]"},2:{bg:"bg-green-900/50",text:"text-green-400",nameCls:"text-green-400"},3:{bg:"bg-yellow-900/40",text:"text-yellow-400",nameCls:"text-emerald-600 font-bold"},4:{bg:"bg-blue-900/40",text:"text-blue-400",nameCls:"text-blue-400 font-bold"},5:{bg:"bg-red-900/40",text:"text-red-400",nameCls:"text-red-400 font-bold"}};function N({anchors:e,selectedAnchor:t}){let[s,r]=(0,l.useState)([]),[n,i]=(0,l.useState)(!1),o=(0,l.useRef)(null),c=(0,l.useRef)(null),d=t?.roomNum;return(0,l.useEffect)(()=>{if(!d)return;r([]),i(!1);let e=new EventSource(`/api/chat/${d}`);return e.onopen=()=>i(!0),e.onmessage=e=>{try{let t=JSON.parse(e.data);if("connected"===t.type)return void i(!0);if("history"===t.type&&Array.isArray(t.messages))return void r(e=>[...t.messages,...e].slice(-200));t.user&&t.text&&r(e=>[...e,t].slice(-200))}catch{}},e.onerror=()=>i(!1),()=>{e.close(),i(!1)}},[d]),(0,l.useEffect)(()=>{requestAnimationFrame(()=>{let e=c.current;e&&(e.scrollTop=e.scrollHeight)})},[s.length]),(0,a.jsxs)("div",{className:"flex flex-col h-full bg-[#0F0F23]",children:[(0,a.jsxs)("div",{ref:c,className:"flex-1 min-h-0 px-3 py-2 flex flex-col gap-[3px] overflow-y-auto",style:{scrollbarWidth:"thin",scrollbarColor:"#444 transparent"},children:[(0,a.jsx)("div",{className:"text-center text-[10px] text-[#F8FAFC]/30 bg-slate-50/60 py-1.5 rounded-xl mb-1 sticky top-0 z-10 backdrop-blur-sm",children:n?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"inline-block h-1.5 w-1.5 rounded-full bg-green-400 animate-pulse mr-1"}),"Đang kết nối ph\xf2ng chat trá»±c tiếp"]}):d?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"inline-block h-1.5 w-1.5 rounded-full bg-yellow-400 animate-pulse mr-1"}),"Đang kết nối..."]}
15):"Ch\xe0o mừng bạn đến với ph\xf2ng chat"}),0===s.length&&n&&(0,a.jsx)("div",{className:"text-center text-[10px] text-[#F8FAFC]/20 py-4",children:"Chờ tin nhắn mới..."}),s.map((e,t)=>{var s;let l=(s=e.level)>=5?v[5]:v[s]||v[0];return 2===e.type||e.text?.includes("v\xe0o ph\xf2ng tr\xf2 chuyện")?(0,a.jsxs)("div",{className:"flex items-start gap-1.5 text-[11px] leading-relaxed py-[1px] opacity-60",children:[(0,a.jsx)("span",{className:"text-green-500/70 font-medium",children:"Hi"}),(0,a.jsxs)("span",{className:`shrink-0 inline-flex items-center px-1 py-[0.5px] rounded text-[8px] font-bold ${l.bg} ${l.text}`,children:["Lv",e.level]}),(0,a.jsxs)("span",{className:`font-bold ${l.nameCls}`,children:[e.user,":"]}),(0,a.jsx)("span",{className:"text-[#F8FAFC]/40",children:e.text})]},`${e.ts}-${t}`):(0,a.jsxs)("div",{className:"flex items-start gap-1.5 text-[11px] leading-relaxed py-[1px]",children:[(0,a.jsxs)("span",{className:`shrink-0 inline-flex items-center px-1 py-[0.5px] rounded text-[8px] font-bold ${l.bg} ${l.text}`,children:["Lv.",e.level]}),(0,a.jsxs)("span",{className:`font-bold shrink-0 ${l.nameCls}`,children:[e.user,":"]}),(0,a.jsx)("span",{className:"text-[#F8FAFC]/80 break-words min-w-0",children:e.text})]},`${e.ts}-${t}`)}),(0,a.jsx)("div",{ref:o})]}),(0,a.jsxs)("div",{className:"shrink-0 px-3 py-2 bg-[#0F0F23] border-t border-white/[0.04] space-y-2",children:[(0,a.jsx)("div",{className:"flex items-center justify-center gap-3 text-[#F8FAFC]/20 text-[10px]",children:(0,a.jsx)("span",{className:"flex items-center gap-1",children:(0,a.jsx)("svg",{className:"w-3 h-3",viewBox:"0 0 24 24",fill:"currentColor",children:(0,a.jsx)("path",{d:"M12 4.5C7 4.5 2.7 7.6 1 12c1.7 4.4 6 7.5 11 7.5s9.3-3.1 11-7.5c-1.7-4.4-6-7.5-11-7.5zm0 12.5c-2.8 0-5-2.2-5-5s2.2-5 5-5 5 2.2 5 5-2.2 5-5 5zm0-8c-1.7 0-3 1.3-3 3s1.3 3 3 3 3-1.3 3-3-1.3-3-3-3z"})})})}),(0,a.jsxs)("div",{className:"flex bg-[#0F0F23] rounded-2xl overflow-hidden border border-white/[0.08]",children:[(0,a.jsx)("input",{type:"text",placeholder:"Đăng nhập để c\xf9ng chat nh\xe9",disabled:!0,className:"flex-1 bg-transparent px-3 py-2 text-[11px] text-[#F8FAFC] outline-none placeholder:text-[#F8FAFC]/30 disabled:opacity-50"}),(0,a.jsx)("button",{disabled:!0,className:"px-4 text-[11px] font-bold bg-[#E11D48] text-black disabled:bg-white/10 disabled:text-[#F8FAFC]/20 transition-colors",children:"Gửi"})]})]})]})}let y={1:{icon:"⚽",label:"B\xe0n thắng",color:"text-green-400"},2:{icon:"\uD83C\uDD7F️",label:"Phạt đền",color:"text-green-400"},3:{icon:"\uD83D\uDFE1",label:"Thẻ v\xe0ng",color:"text-yellow-400"},4:{icon:"\uD83D\uDFE1\uD83D\uDFE1",label:"Thẻ v\xe0ng 2",color:"text-emerald-600"},5:{icon:"\uD83D\uDD34",label:"Thẻ đỏ",color:"text-red-500"},7:{icon:"\uD83D\uDD04",label:"Phản lưới",color:"text-orange-400"},8:{icon:"\uD83C\uDFE5",label:"Chấn thương",color:"text-[#94A3B8]"},9:{icon:"\uD83D\uDD04",label:"Thay người",color:"text-blue-400"},11:{icon:"⏱️",label:"Hiệp 2",color:"text-[#F8FAFC]/40"},15:{icon:"\uD83E\uDD45",label:"Pen trượt",color:"text-red-400"},19:{icon:"⏱️",label:"Kết th\xfac hiệp",color:"text-[#F8FAFC]/30"},21:{icon:"\uD83C\uDFC6",label:"VAR",color:"text-purple-400"}};function _({events:e}){let t=e?.incidents||e?.events||[];return t&&0!==t.length?(0,a.jsx)("div",{className:"flex flex-col",children:t.map((e,t)=>{let s=y[e.type]||{icon:"•",label:`Event ${e.type}`,color:"text-[#F8FAFC]/50"},l=1===e.position,r=2===e.position,n=e.add_time?`+${e.add_time}`:"",i=`${e.time}'${n}`;return l||r||11!==e.type&&19!==e.type?9===e.type?(0,a.jsxs)("div",{className:`flex items-center gap-2 border-b border-slate-50 p-3 text-xs ${l?"":"flex-row-reverse"}`,children:[(0,a.jsx)("span",{className:"text-slate-400 w-10 text-center shrink-0 text-[10px]",children:i}),(0,a.jsxs)("div",{className:`flex-1 flex flex-col gap-0.5 ${l?"items-start":"items-end"}`,children:[(0,a.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,a.jsx)("span",{className:"text-green-400 text-[10px]",children:"▲"}),(0,a.jsx)("span",{className:"text-[#F8FAFC]/80 text-[11px]",children:e.in_player_name||""})]}),(0,a.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,a.jsx)("span",{className:"text-red-400 text-[10px]",children:"▼"}),(0,a.jsx)("span",{className:"text-[#F8FAFC]/40 text-[11px]",children:e.out_player_name||""})]})]})]},t):(0,a.jsxs)("div",{className:`flex items-center gap-2 border-b border-slate-50 p-3 text-xs ${l?"":"flex-row-reverse"}`,children:[(0,a.jsx)("span",{className:"text-slate-400 w-10 text-center shrink-0 text-[10px]",children:i}),(0,a.jsx)("span",{className:`shrink-0 text-sm ${s.color}`,children:s.icon}),(0,a.jsxs)("div",{className:`flex-1 min-w-0 ${l?"text-left":"text-right"}`,children:[(0,a.jsx)("span",{className:"text-slate-700 text-[11px]",children:e.player_name||""}),e.assist1_name&&(0,a.jsxs)("span",{className:"text-slate-400 text-[10px] ml-1",children:["(kiến tạo: ",e.assist1_name,")"]}),1===e.type&&void 0!==e.home_score&&(0,a.jsxs)("span",{className:"text-[#E11D48] font-bold text-[11px] ml-2",children:[e.home_score," - ",e.away_score]})]})]},t):(0,a.jsx)("div",{className:"flex items-center justify-center py-2 border-b border-slate-50 bg-slate-50",children:(0,a.jsxs)("span",{className:"text-slate-400 text-[10px] uppercase tracking-wider",children:[s.icon," ",s.label," — ",i]})},t)})}):(0,a.jsx)(j,{text:"Diễn biến trận đấu sẽ được cập nhật trực tiếp tại đ\xe2y"})}function k({standings:e}
15){return e&&e.teams&&0!==e.teams.length?(0,a.jsxs)("div",{className:"w-full text-[10px]",children:[(0,a.jsxs)("div",{className:"grid grid-cols-[20px_1fr_24px_24px_32px] bg-slate-50 p-2 text-slate-400 uppercase font-bold sticky top-0",children:[(0,a.jsx)("span",{className:"text-center",children:"#"}),(0,a.jsx)("span",{children:"Team"}),(0,a.jsx)("span",{className:"text-center",children:"T"}),(0,a.jsx)("span",{className:"text-center",children:"B"}),(0,a.jsx)("span",{className:"text-center whitespace-nowrap",children:"Đ"})]}),e.teams.slice(0,15).map((e,t)=>{let s=!!e.data,l=s?parseFloat(e.data[0]):e.rank||t+1,r=s?e.data[1]:e.target_name,n=s?e.data[7]:e.points,i=s?e.data[3]:e.won,o=s?e.data[5]:e.loss;return(0,a.jsxs)("div",{className:"grid grid-cols-[20px_1fr_24px_24px_32px] items-center p-2 border-b border-slate-50 hover:bg-slate-50 transition-colors",children:[(0,a.jsx)("span",{className:"text-center text-slate-500",children:l}),(0,a.jsxs)("div",{className:"flex items-center gap-1.5 min-w-0 pr-2",children:[e.team_logo&&(0,a.jsx)("img",{src:e.team_logo,className:"w-3.5 h-3.5 object-contain",alt:r||"Team logo",loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-slate-700 font-medium truncate",children:r})]}),(0,a.jsx)("span",{className:"text-center text-slate-500",children:i}),(0,a.jsx)("span",{className:"text-center text-slate-500",children:o}),(0,a.jsx)("span",{className:"text-center text-[#E11D48] font-bold",children:n})]},r)})]}):(0,a.jsx)(j,{text:"Bảng xếp hạng sẽ được cập nhật"})}function E({odds:e}){let t=Array.isArray(e)?e:[],s=["2","4","3","16"];function l(e){for(let a of s){let s=t.find(t=>t.odds_type===e&&String(t.company_id)===a);if(s?.odds_info?.length)return s}return t.find(t=>t.odds_type===e&&t.odds_info?.length>0)}function r(e,t){let s=e?.odds_info;if(!s?.length)return["-","-","-"];let a="opening"===t?s.length-1:0;if(!s?.length||!s[a])return["-","-","-"];let l=s[a][2];if("string"!=typeof l)return["-","-","-"];let r=l.split(",");return[r[0]||"-",r[1]||"-",r[2]||"-"]}let n=l("asia"),i=l("eu"),o=l("bs"),c=l("cr"),d=r(n,"opening"),x=r(n,"latest"),h=r(i,"opening"),m=r(i,"latest"),p=r(o,"opening"),u=r(o,"latest"),g=r(c,"opening"),b=r(c,"latest"),f=({children:e})=>(0,a.jsx)("th",{className:"px-2 py-2 text-[9px] sm:text-[10px] font-bold uppercase tracking-wider text-slate-500 border-b border-slate-100 text-center",children:e}),j=({children:e,color:t})=>(0,a.jsx)("td",{className:`px-2 py-2.5 text-center text-[11px] sm:text-xs font-bold ${t||"text-slate-600"} border-b border-slate-50`,children:e});return(0,a.jsxs)("div",{className:"overflow-x-auto",children:[(0,a.jsxs)("table",{className:"w-full min-w-[600px]",children:[(0,a.jsxs)("thead",{children:[(0,a.jsxs)("tr",{className:"bg-slate-50",children:[(0,a.jsx)("th",{className:"px-4 py-2 text-left border-b border-slate-100",rowSpan:2,children:(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("div",{className:"w-7 h-7 rounded bg-gradient-to-br from-[#1d4ed8] to-[#3b82f6] flex items-center justify-center text-white text-[9px] font-black shadow-sm",children:"B"}),(0,a.jsx)("span",{className:"text-slate-600 text-[11px] font-bold tracking-wider",children:"SPORT"})]})}),(0,a.jsx)("th",{colSpan:3,className:"px-1 py-1.5 text-center text-[9px] sm:text-[10px] font-bold uppercase tracking-wider text-[#4681E8] border-b border-l border-slate-100",children:"CƯỢC CH\xc2U \xc1"}),(0,a.jsx)("th",{colSpan:3,className:"px-1 py-1.5 text-center text-[9px] sm:text-[10px] font-bold uppercase tracking-wider text-[#4681E8] border-b border-l border-slate-100",children:"CƯỢC CH\xc2U \xc2U"}),(0,a.jsx)("th",{colSpan:3,className:"px-1 py-1.5 text-center text-[9px] sm:text-[10px] font-bold uppercase tracking-wider text-[#4681E8] border-b border-l border-slate-100",children:"T\xc0I XỈU"}),(0,a.jsx)("th",{colSpan:3,className:"px-1 py-1.5 text-center text-[9px] sm:text-[10px] font-bold uppercase tracking-wider text-[#4681E8] border-b border-l border-slate-100",children:"K\xc8O G\xd3C"})]}),(0,a.jsxs)("tr",{className:"bg-slate-50",children:[(0,a.jsx)(f,{children:"CHỦ"}),(0,a.jsx)(f,{children:"CHẤP"}),(0,a.jsx)(f,{children:"KH\xc1CH"}),(0,a.jsx)(f,{children:"CHỦ"}),(0,a.jsx)(f,{children:"H\xd2A"}),(0,a.jsx)(f,{children:"KH\xc1CH"}),(0,a.jsx)(f,{children:"T\xc0I"}),(0,a.jsx)(f,{children:"TỶ LỆ"}),(0,a.jsx)(f,{children:"XỈU"}),(0,a.jsx)(f,{children:"T\xc0I"}),(0,a.jsx)(f,{children:"TỶ LỆ"}),(0,a.jsx)(f,{children:"XỈU"})]})]}),(0,a.jsxs)("tbody",{children:[(0,a.jsxs)("tr",{className:"hover:bg-slate-50 transition-colors",children:[(0,a.jsx)("td",{className:"px-4 py-2.5 text-[11px] sm:text-xs text-slate-500 font-medium border-b border-slate-50",children:"Tỷ Lệ Mở Cược"}),(0,a.jsx)(j,{children:d[0]}),(0,a.jsx)(j,{color:"text-red-400",children:d[1]}),(0,a.jsx)(j,{children:d[2]}),(0,a.jsx)(j,{children:h[0]}),(0,a.jsx)(j,{children:h[1]}),(0,a.jsx)(j,{children:h[2]}),(0,a.jsx)(j,{children:p[0]}),(0,a.jsx)(j,{children:p[1]}),(0,a.jsx)(j,{children:p[2]}),(0,a.jsx)(j,{children:g[0]}),(0,a.jsx)(j,{children:g[1]}),(0,a.jsx)(j,{children:g[2]})]}),(0,a.jsxs)("tr",{className:"hover:bg-slate-50 transition-colors",children:[(0,a.jsx)("td",{className:"px-4 py-2.5 text-[11px] sm:text-xs text-slate-500 font-medium border-b border-slate-50",children:"Tỷ Lệ Trước Trận"}),(0,a.jsx)(j,{children:x[0]}),(0,a.jsx)(j,{color:"text-red-400",children:x[1]}),(0,a.jsx)(j,{children:x[2]}),(0,a.jsx)(j,{children:m[0]}),(0,a.jsx)(j,{children:m[1]}),(0,a.jsx)(j,{children:m[2]}),(0,a.jsx)(j,{children:u[0]}),(0,a.jsx)(j,{children:u[1]}),(0,a.jsx)(j,{children:u[2]}),(0,a.jsx)(j,{children:b[0]}),(0,a.jsx)(j,{children:b[1]}),(0,a.jsx)(j,{children:b[2]})]}),(0,a.jsxs)("tr",{className:"hover:bg-slate-50 transition-colors bg-white",children:[(0,a.jsxs)("td",{className:"px-4 py-2.5 text-[11px] sm:text-xs text-slate-700 font-bold flex items-center gap-1.5 border-b border-slate-50",children:["Live ",(0,a.jsx)("span",{className:"w-1.5 h-1.5 rounded-full bg-red-500 animate-pulse"})]}),(0,a.jsx)(j,{color:"text-green-400",children:x[0]}),(0,a.jsx)(j,{color:"text-red-400",children:x[1]}),(0,a.jsx)(j,{color:"text-green-400",children:x[2]}),(0,a.jsx)(j,{color:"text-green-400",children:m[0]}),(0,a.jsx)(j,{color:"text-green-400",children:m[1]}),(0,a.jsx)(j,{color:"text-green-400",children:m[2]}),(0,a.jsx)(j,{color:"text-green-400",children:u[0]}),(0,a.jsx)(j,{children:u[1]}),(0,a.jsx)(j,{color:"text-green-400",children:u[2]}),(0,a.jsx)(j,{color:"text-green-400",children:b[0]}),(0,a.jsx)(j,{children:b[1]}),(0,a.jsx)(j,{color:"text-green-400",children:b[2]})]})]})]}),(0,a.jsx)("p",{className:"text-center text-slate-400 text-[10px] py-2.5 border-t border-slate-100",children:"Tỷ lệ k\xe8o sẽ được cập nhật gần giờ thi đấu"})]})}},4555:(e,t,s)=>{"use strict";s.d(t,{Klivevip13MatchDetailPage:()=>m});var a=s(68019),l=s(10707),r=s(58420);function n({src:e,poster:t,autoPlay:s=!0,onError:i,className:o=""}){let c=(0,l.useRef)(null),d=(0,l.useRef)(i);d.current=i;let[x,h]=(0,l.useState)(!1),[m,p]=(0,l.useState)(!1);return((0,l.useEffect)(()=>{let t=c.current;if(!t)return;let a=null;h(!1);let l=()=>p(!0),n=()=>p(!1);t.addEventListener("play",l),t.addEventListener("pause",n);let i=()=>{s&&(t.muted=!0,t.play().catch(()=>{}))};if(t.addEventListener("canplay",i),r.Ay.isSupported()){(a=new r.Ay({maxBufferLength:30,maxMaxBufferLength:60,lowLatencyMode:!0,enableWorker:!0})).loadSource(e),a.attachMedia(t),a.on(r.Ay.Events.MANIFEST_PARSED,()=>{s&&(t.muted=!0,t.play().catch(e=>{console.warn("AutoPlay failed:",e),t.muted=!1}))});let l=0,n=0;a.on(r.Ay.Events.ERROR,(e,t)=>
15{if(t.type===r.Ay.ErrorTypes.NETWORK_ERROR&&(++l>2||t.response&&t.response.code>=400)){console.error("HLS Network Error threshold reached (CORS/404), triggering fallback.",t),h(!0),d.current&&d.current(t),a?.destroy();return}if(t.fatal)switch(t.type){case r.Ay.ErrorTypes.NETWORK_ERROR:console.error("HLS Fatal Network Error, recovering...",t),a?.startLoad();break;case r.Ay.ErrorTypes.MEDIA_ERROR:console.error("HLS Media Error, recovering...",t),++n>3?(console.error("HLS Media Error threshold reached, triggering fallback."),h(!0),d.current&&d.current(t),a?.destroy()):a?.recoverMediaError();break;default:console.error("HLS Fatal Error:",t),h(!0),d.current&&d.current(t),a?.destroy()}})}else t.canPlayType("application/vnd.apple.mpegurl")&&(t.src=e,t.addEventListener("loadedmetadata",()=>{s&&t.play().catch(e=>{console.warn("AutoPlay failed:",e)})}),t.addEventListener("error",e=>{h(!0),d.current&&d.current(e)}));return()=>{t.removeEventListener("play",l),t.removeEventListener("pause",n),t.removeEventListener("canplay",i),a&&a.destroy()}},[e,s]),x)?i?null:(0,a.jsxs)("div",{className:`w-full h-full flex flex-col items-center justify-center bg-white/80 backdrop-blur ${o}`,children:[(0,a.jsx)("svg",{className:"w-12 h-12 text-red-500 mb-4 opacity-80",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"})}),(0,a.jsx)("div",{className:"text-slate-600 text-sm font-medium",children:"Video/Stream kh\xf4ng khả dụng hoặc bị lỗi mạng"}),(0,a.jsx)("div",{className:"text-gray-500 text-xs mt-1",children:"Vui l\xf2ng thử lại sau hoặc chọn nguồn kh\xe1c"})]}):(0,a.jsx)("div",{className:`relative group w-full h-full bg-white flex items-center justify-center overflow-hidden ${o}`,children:(0,a.jsx)("video",{ref:c,className:"w-full h-full object-contain",controls:!0,playsInline:!0,muted:s,poster:t,referrerPolicy:"no-referrer"})})}function i(e){let t=(e||"").split(/[\s-]+/).slice(0,2).map(e=>e[0]||"").join("").toUpperCase()||"??";return`data:image/svg+xml,${encodeURIComponent(`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 80 80"><rect width="80" height="80" rx="20" fill="#1a1c25"/><text x="40" y="47" font-size="20" font-family="Arial" font-weight="700" text-anchor="middle" fill="#666">${t}</text></svg>`)}`}function o({homeName:e,awayName:t,homeLogo:s,awayLogo:l,homeScore:r="0",awayScore:n="0",statusText:c="LIVE",timeText:d="",isLive:x=!0,sportId:h="1",matchId:m}){let p=s||i(e),u=l||i(t),g="5"===String(h),b="2"===String(h),f="bg-slate-200 border-slate-200",j="repeating-linear-gradient(90deg, transparent, transparent 10%, #000 10%, #000 20%)";return g?(f="bg-slate-100 border-slate-200",j="none"):b&&(f="bg-[#bc7a46] border-[#8a4e21]",j="repeating-linear-gradient(90deg, transparent, transparent 5%, #000 5%, #000 10%)"),(0,a.jsxs)("div",{className:"relative w-full aspect-video min-h-[300px] max-h-[600px] bg-slate-50 overflow-hidden flex flex-col justify-center",children:[(0,a.jsx)("div",{className:"absolute inset-0 flex items-center justify-center pointer-events-none mt-16 md:mt-24",children:(0,a.jsx)("div",{className:"relative w-[120%] h-[120%] sm:w-[90%] sm:h-[120%] max-w-[900px] flex-shrink-0 transition-transform duration-1000",style:{transform:"perspective(900px) rotateX(60deg) scale(0.9)",transformOrigin:"center center"},children:(0,a.jsxs)("div",{className:`absolute inset-0 ${f} shadow-[0_30px_60px_rgba(0,0,0,0.8)] border-4 rounded-xl overflow-hidden flex transition-colors duration-500`,children:[(0,a.jsx)("div",{className:"absolute inset-0 opacity-15 pointer-events-none",style:{backgroundImage:j}}),(0,a.jsxs)("div",{className:"absolute inset-[4%] pointer-events-none shadow-sm flex items-center justify-center",children:["1"===String(h)&&(0,a.jsxs)("div",{className:"absolute inset-0 w-full h-full border-2 border-white/60",children:[(0,a.jsx)("div",{className:"absolute left-1/2 top-0 bottom-0 w-0 border-l-2 border-white/60 -translate-x-1/2"}),(0,a.jsx)("div",{className:"absolute left-1/2 top-1/2 w-[18%] aspect-square rounded-full border-2 border-white/60 -translate-x-1/2 -translate-y-1/2"}),(0,a.jsx)("div",{className:"absolute left-1/2 top-1/2 w-2 h-2 rounded-full bg-white/80 -translate-x-1/2 -translate-y-1/2"}),(0,a.jsx)("div",{className:"absolute left-0 top-1/2 w-[16%] h-[46%] border-2 border-l-0 border-white/60 -translate-y-1/2 bg-slate-200"}),(0,a.jsx)("div",{className:"absolute left-0 top-1/2 w-[6%] h-[20%] border-2 border-l-0 border-white/60 -translate-y-1/2 bg-slate-200"}),(0,a.jsx)("div",{className:"absolute left-[16%] top-1/2 w-[8%] aspect-square border-2 border-l-0 border-white/60 rounded-r-full -translate-y-1/2 clip-path-half",style:{clipPath:"inset(0 0 0 50%)"}}),(0,a.jsx)("div",{className:"absolute right-0 top-1/2 w-[16%] h-[46%] border-2 border-r-0 border-white/60 -translate-y-1/2 bg-slate-200"}),(0,a.jsx)("div",{className:"absolute right-0 top-1/2 w-[6%] h-[20%] border-2 border-r-0 border-white/60 -translate-y-1/2 bg-slate-200"}),(0,a.jsx)("div",{className:"absolute right-[16%] top-1/2 w-[8%] aspect-square border-2 border-r-0 border-white/60 rounded-l-full -translate-y-1/2 clip-path-half",style:{clipPath:"inset(0 50% 0 0)"}})]}),g&&(0,a.jsxs)("div",{className:"absolute inset-[10%] w-[80%] h-[80%
15] border-2 border-white/80 bg-white",children:[(0,a.jsx)("div",{className:"absolute top-[10%] bottom-[10%] left-0 right-0 border-y-2 border-white/80"}),(0,a.jsx)("div",{className:"absolute left-1/2 top-[-2%] bottom-[-2%] w-1 bg-white/40 shadow-xl -translate-x-1/2 z-10"}),(0,a.jsx)("div",{className:"absolute left-[25%] right-[25%] top-[10%] bottom-[10%] border-x-2 border-white/80"}),(0,a.jsx)("div",{className:"absolute left-[25%] right-[25%] top-1/2 w-[50%] border-t-2 border-white/80 -translate-y-1/2"}),(0,a.jsx)("div",{className:"absolute left-0 top-1/2 w-[2%] border-t-2 border-white/80 -translate-y-1/2"}),(0,a.jsx)("div",{className:"absolute right-0 top-1/2 w-[2%] border-t-2 border-white/80 -translate-y-1/2"})]}),b&&(0,a.jsxs)("div",{className:"absolute inset-0 w-full h-full border-2 border-white/50",children:[(0,a.jsx)("div",{className:"absolute left-1/2 top-0 bottom-0 w-0 border-l-2 border-white/50 -translate-x-1/2"}),(0,a.jsx)("div",{className:"absolute left-1/2 top-1/2 w-[15%] aspect-square rounded-full border-2 border-white/50 -translate-x-1/2 -translate-y-1/2"}),(0,a.jsx)("div",{className:"absolute left-0 top-1/2 w-[18%] h-[35%] border-2 border-l-0 border-white/50 -translate-y-1/2 bg-[#bc7a46]"}),(0,a.jsx)("div",{className:"absolute left-[18%] top-1/2 w-[10%] aspect-square rounded-full border-2 border-white/50 -translate-y-1/2"}),(0,a.jsx)("div",{className:"absolute left-0 top-1/2 w-[30%] h-[70%] border-2 border-l-0 border-white/50 rounded-r-full -translate-y-1/2 opacity-60"}),(0,a.jsx)("div",{className:"absolute right-0 top-1/2 w-[18%] h-[35%] border-2 border-r-0 border-white/50 -translate-y-1/2 bg-[#bc7a46]"}),(0,a.jsx)("div",{className:"absolute right-0 top-1/2 w-[30%] h-[70%] border-2 border-r-0 border-white/50 rounded-l-full -translate-y-1/2 opacity-60"})]})]}),x&&(0,a.jsx)("div",{className:`absolute left-1/2 top-1/2 shadow-[0_8px_16px_rgba(0,0,0,0.8)] z-10 transition-all duration-[3000ms] border-2 border-white/20 rounded-full
16                                ${g?"w-2 h-2 sm:w-3 sm:h-3 bg-[#ccff00]":b?"w-4 h-4 sm:w-6 sm:h-6 bg-[#d95d16]":"w-4 h-4 sm:w-5 sm:h-5 bg-white"}`,style:{animation:"ballMove 8s infinite alternate ease-in-out",transform:"translate(-50%, -50%)"},children:(0,a.jsx)("div",{className:"absolute -bottom-4 left-1/2 w-4 h-2 bg-white/40 rounded-full blur-sm -translate-x-1/2"})}),x&&(0,a.jsxs)("div",{className:"absolute left-[65%] top-[60%] flex flex-col items-center animate-bounce-slow",style:{animation:"floatBubble 4s infinite alternate ease-in-out"},children:[(0,a.jsxs)("div",{className:"bg-white/95 backdrop-blur border border-white/10 rounded-2xl p-2 shadow-2xl flex items-center gap-3 w-max max-w-[200px]",children:[(0,a.jsx)("div",{className:"w-6 h-6 rounded-full flex items-center justify-center p-0.5 bg-white/5 shrink-0",children:(0,a.jsx)("img",{src:p,alt:e||"Home team",className:"max-w-full max-h-full object-contain",onError:t=>t.target.src=i(e),loading:"lazy",decoding:"async"})}),(0,a.jsx)("div",{className:"flex flex-col pr-1 overflow-hidden",children:(0,a.jsx)("span",{className:"text-slate-900 font-bold text-[10px] sm:text-xs tracking-wide truncate",children:g?"Serve / Return":"Tấn c\xf4ng nguy hiểm"})})]}),(0,a.jsx)("div",{className:"w-0 h-0 border-l-[6px] border-r-[6px] border-t-[6px] border-l-transparent border-r-transparent border-t-[#1a1c28]/95 mt-[-1px]"})]})]})})}),(0,a.jsx)("div",{className:"relative z-20 flex-1 flex flex-col items-center justify-start p-4 md:p-6 pointer-events-none w-full",children:(0,a.jsxs)("div",{className:"w-full max-w-[800px] flex items-center justify-between px-4 sm:px-6 py-3 rounded-xl bg-gradient-to-r from-[#0d0f14]/90 via-[#151821]/95 to-[#0d0f14]/90 backdrop-blur-xl border border-white/10 shadow-[0_10px_40px_rgba(0,0,0,0.8)] pointer-events-auto",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 flex-1 min-w-0 pr-2",children:[(0,a.jsx)("img",{src:p,alt:e,className:"w-8 h-8 md:w-12 md:h-12 object-contain drop-shadow-lg shrink-0",onError:t=>t.target.src=i(e),loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-slate-900 text-xs sm:text-sm md:text-base font-bold truncate tracking-wide",children:e})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1 shrink-0 px-2 sm:px-6 min-w-[100px]",children:[(0,a.jsxs)("span",{className:`inline-flex items-center gap-1.5 px-2.5 py-0.5 rounded-full text-[10px] sm:text-xs font-bold shadow-inner ${x?"bg-green-500/10 text-green-400 border border-green-500/20":"bg-white/5 text-slate-900/40"}`,children:[x&&(0,a.jsx)("span",{className:"w-1.5 h-1.5 rounded-full bg-green-500 animate-pulse shadow-[0_0_8px_#22c55e]"}),d||c]}),(0,a.jsxs)("div",{className:"flex gap-3 sm:gap-5 items-center justify-center",children:[(0,a.jsx)("span",{className:"text-slate-900 text-2xl sm:text-4xl font-black drop-shadow-md",children:r}),(0,a.jsx)("span",{className:"text-slate-900/30 text-xl font-light",children:"-"}),(0,a.jsx)("span",{className:"text-slate-900 text-2xl sm:text-4xl font-black drop-shadow-md",children:n})]})]}),(0,a.jsxs)("div",{className:"flex items-center justify-end gap-3 flex-1 min-w-0 pl-2 text-right",children:[(0,a.jsx)("span",{className:"text-slate-900 text-xs sm:text-sm md:text-base font-bold truncate tracking-wide",children:t}),(0,a.jsx)("img",{src:u,alt:t,className:"w-8 h-8 md:w-12 md:h-12 object-contain drop-shadow-lg shrink-0",onError:e=>e.target.src=i(t),loading:"lazy",decoding:"async"})]})]})}),(0,a.jsx)("div",{className:"relative z-20 mt-auto w-full p-4 flex justify-center pointer-events-none",children:(0,a.jsx)("div",{className:"w-full max-w-[600px] h-6 bg-white/40 backdrop-blur-md rounded-full border border-white/5 flex items-center px-4",children:(0,a.jsxs)("div",{className:"flex-1 h-0.5 bg-white/10 relative rounded-full",children:[x&&(0,a.jsx)("div",{className:"absolute left-0 top-0 bottom-0 bg-gradient-to-r from-[#b38b22] to-[#ffda6a] w-[65%] rounded-full opacity-90 shadow-[0_0_12px_#daa520]"}),(0,a.jsx)("span",{className:"absolute left-[65%] top-1/2 -translate-y-1/2 -translate-x-1/2 w-1.5 h-1.5 rounded-full bg-white shadow-md"})]})})}),(0,a.jsx)("style",{children:`
17                @keyframes ballMove {
18                    0% { transform: translate(-30%, -20%) scale(1); }
19                    25% { transform: translate(40%, -10%) scale(1.1); }
20                    50% { transform: translate(20%, 30%) scale(0.9); }
21                    75% { transform: translate(-10%, 15%) scale(1.2); }
22                    100% { transform: translate(-45%, 0%) scale(1); }
23                }
24                @keyframes floatBubble {
25                    0% { transform: translateY(0px) translateX(0px); }
26                    50% { transform: translateY(-8px) translateX(4px); }
27                    100% { transform: translateY(4px) translateX(-4px); }
28                }
29            `})]})}function c(e,t){if("1"===t||"2"===t)switch(e){case"2":return{t:"HT 1",live:!0,sc:!0};case"3":return{t:"Giữa giờ",live:!0,sc:!0};case"4":return{t:"HT 2",live:!0,sc:!0};case"5":return{t:"Hiệp phụ",live:!0,sc:!0};case"7":return{t:"Penalty",live:!0,sc:!0};case"8":case"9":return{t:"Kết th\xfac",live:!1,sc:!0};default:return{t:"Chưa bắt đầu",live:!1,sc:!1}}
29return["51","52","53","54","55"].includes(e)?{t:`Set ${e-50}`,live:!0,sc:!0}:["100","90","110"].includes(e)?{t:"KT",live:!1,sc:!0}:"0"===e||"1"===e?{t:"Chưa bắt đầu",live:!1,sc:!1}:{t:"LIVE",live:!0,sc:!0}}function d(e){let t=(e||"").split(/[\s-]+/).slice(0,2).map(e=>e[0]||"").join("").toUpperCase()||"??";return`data:image/svg+xml,${encodeURIComponent(`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 80 80"><rect width="80" height="80" rx="20" fill="#1a1c25"/><text x="40" y="47" font-size="20" font-family="Arial" font-weight="700" text-anchor="middle" fill="#666">${t}</text></svg>`)}`}function x(e){let t=new Date(1e3*parseInt(e||"0",10));return{hm:t.toLocaleTimeString("vi-VN",{hour:"2-digit",minute:"2-digit",timeZone:"Asia/Ho_Chi_Minh"}),dm:t.toLocaleDateString("vi-VN",{day:"2-digit",month:"2-digit",timeZone:"Asia/Ho_Chi_Minh"}),full:t.toLocaleDateString("vi-VN",{day:"2-digit",month:"2-digit",year:"numeric",timeZone:"Asia/Ho_Chi_Minh"})}}let h="max-w-[1200px]";function m({matchData:e,relatedMatches:t,matchDetails:s,standings:r,brandingNameUpper:i}){let p,u,g,j,v,y,[C,S]=(0,l.useState)("odds"),L=e?.match_data?.anchors||[],[$,F]=(0,l.useState)(!1),[T,A]=(0,l.useState)(!1),[M,H]=(0,l.useState)(null),[D,B]=(0,l.useState)(!1),z=(0,l.useRef)(0);(0,l.useEffect)(()=>{if(!e?.has_live||"1"!==e.has_live||0===L.length)return;let t=!1;B(!0);let s=async t=>{let s=t?.uid,a=`/api/socolive/proxy-stream?url=${encodeURIComponent(`https://live.inplyr.com/${s?`room/${s}`:`default/${e.id}`}.m3u8`)}`;try{let e=await fetch(a,{method:"GET",cache:"no-store"});if(!e.ok)return null;let s=(await e.text()).split("\n").filter(e=>e.trim()&&!e.startsWith("#"));if(0===s.length)return null;return(await fetch(s[0],{method:"HEAD",cache:"no-store"})).ok?t:null}catch{return null}};return Promise.all(L.map(e=>s(e))).then(e=>{if(t)return;let s=e.find(e=>null!==e);s?(H(s),F(!0),A(!1)):(H(L[0]),A(!0)),B(!1)}),()=>{t=!0}},[e?.has_live,L.length]),(0,l.useEffect)(()=>{if(!T||D||z.current>=20)return;let t=setTimeout(()=>{z.current++,A(!1),B(!0);let t=async t=>{let s=t?.uid,a=`/api/socolive/proxy-stream?url=${encodeURIComponent(`https://live.inplyr.com/${s?`room/${s}`:`default/${e.id}`}.m3u8`)}`;try{let e=await fetch(a,{method:"GET",cache:"no-store"});if(!e.ok)return null;let s=(await e.text()).split("\n").filter(e=>e.trim()&&!e.startsWith("#"));if(0===s.length)return null;return(await fetch(s[0],{method:"HEAD",cache:"no-store"})).ok?t:null}catch{return null}};Promise.all(L.map(e=>t(e))).then(e=>{let t=e.find(e=>null!==e);t?(H(t),F(!0),A(!1)):A(!0),B(!1)})},15e3);return()=>clearTimeout(t)},[T,D]);let[I,R]=(0,l.useState)(null),U=e?.post_name||e?.ls_id||e?.id;if(window.location.origin,(0,l.useEffect)(()=>{if(!U)return;let e=setInterval(async()=>{try{let e=await fetch(`/api/klivevip/match/${U}`,{cache:"no-store"});if(e.ok){let t=await e.json();R(t?.match??null)}}catch{}},1e4);return()=>clearInterval(e)},[U]),!e)return(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center py-32 gap-4",children:[(0,a.jsx)("span",{className:"text-[#64748B] text-lg",children:"Kh\xf4ng t\xecm thấy trận đấu"}),(0,a.jsx)("a",{href:"/",className:"text-[#4681E8] hover:underline text-sm",children:"← Quay lại"})]});let G=I?{...e,...I}:e,P=G?.has_live==="1"&&L.length>0,K=c(G.status_id,G.sport_id),V=$&&M&&!T&&!D,W=P&&(D||T&&K.live&&z.current<20),O=!P||T&&!W&&!D,q=!K.live&&"8"!==String(G.status_id)&&"9"!==String(G.status_id),{hm:X,full:Y}=x(G.time),Z=G.source_card_meta?.league_label||G.match_data?.competition_vi||G.match_data?.competition_full||"",Q=G.match_data?.stage_label||G.source_card_meta?.stage_label||"",J=G.home_logo||d(G.home_name),ee=G.away_logo||d(G.away_name),et=e=>t=>{t.target.src=d(e)};return(0,a.jsxs)("div",{className:"w-full bg-white min-h-screen text-slate-600 font-sans pb-16",children:[(0,a.jsx)("div",{className:"w-full border-b border-slate-200 bg-white",children:(0,a.jsxs)("div",{className:`${h} mx-auto px-4 py-3 flex items-center justify-between`,children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 text-[13px] font-bold",children:[(0,a.jsx)("span",{className:"text-[#4681E8] uppercase tracking-wide",children:Z}),Q&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"text-slate-300",children:"•"}),(0,a.jsx)("span",{className:"text-slate-600",children:Q})]})]}),(0,a.jsx)("div",{className:"text-[12px] font-mono text-slate-400 hidden sm:block",children:Y})]})}),(0,a.jsxs)("div",{className:`${h} mx-auto px-0 md:px-4 py-0 md:py-6 flex flex-col lg:flex-row gap-4 lg:gap-6`,children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0 flex flex-col gap-4 lg:gap-6",children:[(0,a.jsxs)("div",{className:"w-full relative bg-[#000000] rounded-none md:rounded-2xl overflow-hidden shadow-[0_10px_40px_rgba(0,0,0,0.5)] border-y md:border border-slate-200",children:[(0,a.jsx)("div",{className:"relative w-full aspect-video bg-[#000000] group z-10",children:V?(0,a.jsx)(n,{src:`/api/klivevip/proxy-stream?url=${encodeURIComponent(`https://live.inplyr.com/${M?.uid&&"default"!==M.uid?`room/${M.uid}`:`default/${G.id}`}.m3u8`)}`,autoPlay:!0,onError:()=>A(!0)}):O?(0,a.jsx)(o,{homeName:G.home_name,awayName:G.away_name,homeLogo:G.home_logo,awayLogo:G.away_logo,homeScore:K.sc?G.home_score:"0",awayScore:K.sc?G.away_score:"0",statusText:K.t,timeText:G.time_text||X,isLive:K.live,sportId:G.sport_id,matchId:G.ls_id||G.id,kickoffMs:1e3*Number(G?.time||0),isPreMatch:q}):(0,a.jsxs)("div",{className:"absolute inset-0 z-10 flex flex-col items-center justify-center p-4 lg:p-10",children:[(0,a.jsxs)("div",{className:"absolute inset-0 flex justify-between items-center opacity-[0.03] pointer-events-none px-4 lg:px-20 overflow-hidden",children:[(0,a.jsx)("img",{src:J,alt:"",className:"w-1/2 max-w-[400px] blur-[10px]",loading:"lazy",decoding:"async"}),(0,a.jsx)("img",{src:ee,alt:"",className:"w-1/2 max-w-[400px] blur-[10px]",loading:"lazy",decoding:"async"})]}),P&&!T&&(0,a.jsx)("button",{onClick:()=>F(!0),className:"group mb-4 sm:mb-8 w-16 h-16 md:w-20 md:h-20 rounded-full bg-[#4681E8] flex items-center justify-center hover:bg-[#55CAF1] transition-all shadow-[0_0_30px_rgba(70,129,232,0.5)] curs
29or-pointer z-20",children:(0,a.jsx)("svg",{className:"w-8 h-8 md:w-10 md:h-10 text-white ml-1.5 md:ml-2 group-hover:scale-110 transition-transform",viewBox:"0 0 24 24",fill:"currentColor",children:(0,a.jsx)("path",{d:"M8 5v14l11-7z"})})}),(0,a.jsxs)("div",{className:"grid grid-cols-[1fr_auto_1fr] items-center w-full max-w-[800px] gap-2 lg:gap-8 z-20",children:[(0,a.jsxs)("div",{className:"flex flex-col items-center gap-2 lg:gap-4",children:[(0,a.jsx)("img",{src:J,alt:G.home_name,className:"w-16 h-16 sm:w-24 sm:h-24 lg:w-32 lg:h-32 object-contain drop-shadow-[0_10px_20px_rgba(0,0,0,0.8)]",onError:et(G.home_name),loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-[#FFFFFF] text-xs sm:text-base lg:text-lg font-black text-center line-clamp-2 uppercase tracking-wide",children:G.home_name})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-2 lg:gap-3",children:[K.sc?(0,a.jsxs)("div",{className:"flex items-center gap-3 lg:gap-6 bg-white/90 backdrop-blur-md px-4 py-2 lg:px-8 lg:py-4 rounded-2xl border border-slate-200 shadow-2xl",children:[(0,a.jsx)("span",{className:"text-[#4681E8] text-[32px] sm:text-[48px] lg:text-[64px] font-black leading-none",children:G.home_score}),(0,a.jsx)("span",{className:"text-slate-300 text-[20px] lg:text-[28px] font-light",children:":"}),(0,a.jsx)("span",{className:"text-[#4681E8] text-[32px] sm:text-[48px] lg:text-[64px] font-black leading-none",children:G.away_score})]}):(0,a.jsx)("div",{className:"text-[#FFFFFF] text-[32px] sm:text-[48px] lg:text-[56px] font-black tracking-widest leading-none drop-shadow-xl",children:X}),(0,a.jsxs)("span",{className:`inline-flex items-center gap-2 rounded-full px-3 py-1 lg:px-5 lg:py-1.5 text-[10px] lg:text-[12px] font-bold tracking-widest uppercase ${K.live?"bg-[#4681E8] text-white shadow-[0_0_20px_rgba(70,129,232,0.6)]":"bg-white text-slate-600 border border-slate-200"}`,children:[K.live&&(0,a.jsx)("span",{className:"w-2 h-2 rounded-full bg-white animate-pulse"}),K.t,G.time_text?` : ${G.time_text}`:""]})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-2 lg:gap-4",children:[(0,a.jsx)("img",{src:ee,alt:G.away_name,className:"w-16 h-16 sm:w-24 sm:h-24 lg:w-32 lg:h-32 object-contain drop-shadow-[0_10px_20px_rgba(0,0,0,0.8)]",onError:et(G.away_name),loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-[#FFFFFF] text-xs sm:text-base lg:text-lg font-black text-center line-clamp-2 uppercase tracking-wide",children:G.away_name})]})]})]})}),L.length>0&&(0,a.jsxs)("div",{className:"w-full bg-white border-t border-slate-200 px-3 lg:px-6 py-2.5 lg:py-4 flex items-center gap-2 lg:gap-4 overflow-x-auto z-20",children:[(0,a.jsx)("span",{className:"text-[10px] lg:text-[11px] text-slate-600 uppercase font-bold tracking-widest shrink-0 mr-1 lg:mr-2",children:"CHỌN K\xcaNH TRUYỀN:"}),L.map((e,t)=>(0,a.jsxs)("button",{onClick:()=>{H(e),F(!0),A(!1)},className:`shrink-0 flex items-center gap-1.5 lg:gap-2 rounded-full px-3 py-1.5 lg:px-5 lg:py-2 text-[11px] lg:text-[13px] font-bold transition-all ${M?.uid===e.uid&&!T?"bg-[#4681E8]/10 border border-[#4681E8] text-[#4681E8] shadow-[0_0_15px_rgba(70,129,232,0.2)]":"bg-white border border-slate-200 text-slate-600 hover:text-[#4681E8] hover:border-[#4681E8]/50"}`,children:[(0,a.jsx)("span",{className:`w-1.5 h-1.5 lg:w-2 lg:h-2 rounded-full ${M?.uid===e.uid&&!T?"bg-[#4681E8] animate-pulse":"bg-transparent"}`}),"BLV ",e.nickName||`K\xeanh ${t+1}`]},e.uid||t))]})]}),(p=(()=>{let e=s?.stats;if(!e)return!1;let t=null;return Array.isArray(e)&&e.length>0?t=e[0]:e?.results?.[0]?t=e.results[0]:e?.stats_full_time&&(t=e),!!t&&!!(t.stats_full_time?.length>0||t.stats_haft_time?.length>0||t.stats_half_time?.length>0||t.stats?.length>0)})(),u=!!(s?.lineup&&(Array.isArray(s.lineup)?s.lineup.length>0:s.lineup.home||s.lineup.away)),g=!!(s?.events&&(Array.isArray(s.events)?s.events.length>0:s.events.incidents?.length>0||s.events.data?.length>0)),j=!!(r&&(Array.isArray(r)?r.length>0:r.data?.length>0)),(y=(v=[{id:"stats",label:"THỐNG K\xca",show:p},{id:"lineup",label:"ĐỘI H\xccNH",show:u},{id:"events",label:"DIỄN BIẾN",show:g},{id:"standings",label:"BẢNG XH",show:j},{id:"odds",label:"TỶ LỆ K\xc8O",show:!!(s?.odds&&Array.isArray(s.odds)&&s.odds.length>0)}].filter(e=>e.show)).find(e=>e.id===C)?C:v[0]?.id||"odds")!==C&&setTimeout(()=>S(y),0),v.length>0?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"bg-white rounded-2xl p-2 border border-slate-200 flex overflow-x-auto gap-2 shadow-[0_4px_15px_rgba(0,0,0,0.08)] mx-4 md:mx-0",children:v.map(({id:e,label:t})=>(0,a.jsx)("button",{onClick:()=>S(e),className:`flex-1 min-w-[100px] py-2.5 sm:py-3 text-[10px] sm:text-[12px] font-black uppercase tracking-widest rounded-xl transition-all ${y===e?"bg-[#4681E8]/10 text-[#4681E8] border border-[#4681E8]/30 shadow-inner":"text-slate-500 hover:text-[#4681E8] hover:bg-[#4681E8]/5 border border-transparent"}`,children:t},e))}),(0,a.jsxs)("div",{className:"bg-white rounded-2xl border border-slate-200 overflow-hidden shadow-[0_4px_15px_rgba(0,0,0,0.08)] min-h-[400px] mx-4 md:mx-0",children:["stats"===y&&(0,a.jsx)(b,{matchDetails:s}),"lineup"===y&&(0,a.jsx)(f,{matchDetails:s}),"events"===y&&(0,a.jsx)(_,{events:s?.events}),"standings"===y&&(0,a.jsx)(k,{standings:r}),"odds"===y&&(0,a.jsx)(E,{odds:s?.odds})]})]}):null),t.length>0&&(0,a.jsxs)("div",{className:"mt-4 mx-4 md:mx-0",children:[(0,a.jsxs)("h2",{className:"px-1 py-4 text-sm sm:text-base font-black text-slate-800 uppercase flex items-center gap-3 tracking-widest border-b border-slate-100 mb-4",children:[(0,a.jsx)("span",{className:"w-1 h-5 bg-[#4681E8] rounded-sm shadow-[0_0_8px_#4681E8]"}),"TRẬN ĐẤU C\xd9NG GIẢI"]}),(0,a.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3 sm:gap-4",children:t.slice(0,4).map(e=>(0,a.jsx)(w,{m:e},e.id))})]})]}),(0,a.jsx)("div",{className:"w-full lg:w-[350px] xl:w-[400px] shrink-0 px-4 md:px-0",children:(0,a.jsxs)("div",{className:"bg-white border border-slate-200 rounded-2xl overflow-hidden flex flex-col shadow-[0_10px_30px_rgba(0,0,0,0.1)] lg:sticky lg:top-8 h-[600px] lg:h-[c
29alc(100vh-100px)] lg:max-h-[850px]",children:[(0,a.jsxs)("div",{className:"px-5 py-4 border-b border-slate-200 flex items-center justify-between bg-white",children:[(0,a.jsxs)("h3",{className:"text-slate-800 text-sm font-black uppercase tracking-widest flex items-center gap-2",children:[(0,a.jsx)("span",{className:"w-2.5 h-2.5 rounded-full bg-[#4681E8] shadow-[0_0_10px_rgba(70,129,232,0.4)]"}),"PH\xd2NG CHAT"]}),(0,a.jsxs)("span",{className:"text-[10px] bg-white px-3 py-1.5 rounded-full text-[#4681E8] font-mono border border-[#4681E8]/30 shadow-inner tracking-widest flex items-center gap-1.5",children:[(0,a.jsx)("svg",{className:"w-3 h-3",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 10l4.553-2.276A1 1 0 0121 8.618v6.764a1 1 0 01-1.447.894L15 14M5 18h8a2 2 0 002-2V8a2 2 0 00-2-2H5a2 2 0 00-2 2v8a2 2 0 002 2z"})}),L.length," BLV"]})]}),(0,a.jsx)("div",{className:"flex-1 bg-[#FFFFFF]/40 min-h-0 chat-container-wrapper",children:(0,a.jsx)(N,{anchors:L,selectedAnchor:M})})]})})]})]})}let p={25:"KIỂM SO\xc1T B\xd3NG",24:"CHUYỀN CH\xcdNH X\xc1C",23:"TỔNG SỐ ĐƯỜNG CHUYỀN",22:"TẤN C\xd4NG",21:"T.C\xd4NG NGUY HIỂM",2:"S\xdaT TR\xdaNG Đ\xcdCH",37:"PHẠT G\xd3C",28:"N\xc9M BI\xcaN",8:"VIỆT VỊ",3:"THẺ V\xc0NG",4:"THẺ ĐỎ",5:"S\xdaT PENALTY",29:"PHẠM LỖI",26:"Đ\xc1NH ĐẦU",27:"CỨU THUA",1:"B\xc0N THẮNG",7:"PHẢN LƯỚI"},u=[25,21,22,24,2,23,4,3,37,28,8,5,29],g="https://cdn.sportdb.live/upload/team/";function b({matchDetails:e}){let[t,s]=(0,l.useState)("full"),r=e?.stats,n=e?.lineup,i=n?.match?.home_team,o=n?.match?.away_team,c=null;Array.isArray(r)&&r.length>0?c=r[0]:r?.results?.[0]?c=r.results[0]:r?.stats_full_time&&(c=r);let d={full:c?.stats_full_time||[],h1:c?.stats_haft_time||c?.stats_half_time||[],h2:c?.stats_haft_time_2nd_half||[]}[t]||[];if(!c||0===d.length)return(0,a.jsx)(j,{text:"Thống k\xea sẽ được cập nhật khi trận đấu bắt đầu"});let x=[...d].sort((e,t)=>{let s=u.indexOf(e.type),a=u.indexOf(t.type);return(-1===s?999:s)-(-1===a?999:a)});return(0,a.jsxs)("div",{className:"flex flex-col",children:[(i||o)&&(0,a.jsxs)("div",{className:"flex items-center justify-between px-4 py-3 border-b border-slate-100",children:[(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5 w-20",children:[i?.logo&&(0,a.jsx)("img",{src:g+i.logo,alt:i?.name||"Home team",className:"w-8 h-8 object-contain",onError:e=>e.target.style.display="none",loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-slate-600 text-[10px] font-medium text-center leading-tight",children:i?.name||""})]}),(0,a.jsx)("div",{className:"flex gap-1",children:[{k:"h1",l:"Hiệp 1"},{k:"h2",l:"Hiệp 2"},{k:"full",l:"Cả trận"}].map(({k:e,l})=>(0,a.jsx)("button",{onClick:()=>s(e),className:`px-2.5 py-1 text-[10px] font-bold rounded transition-all ${t===e?"bg-[#E11D48] text-white":"text-slate-400 hover:text-slate-600 bg-slate-100"}`,children:l},e))}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5 w-20",children:[o?.logo&&(0,a.jsx)("img",{src:g+o.logo,alt:o?.name||"Away team",className:"w-8 h-8 object-contain",onError:e=>e.target.style.display="none",loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-slate-600 text-[10px] font-medium text-center leading-tight",children:o?.name||""})]})]}),(0,a.jsx)("div",{className:"px-4 py-3 space-y-3",children:x.map(e=>{let t=p[e.type]||`Stat ${e.type}`,s=e.home,l=e.away,r=24===e.type||25===e.type,n=s+l,i=0===n?50:s/n*100,o=s>l,c=l>s;return(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"flex justify-between items-center mb-1.5",children:[(0,a.jsxs)("span",{className:`text-xs font-bold w-10 tabular-nums ${o?"text-slate-800":"text-slate-400"}`,children:[s,r?"%":""]}),(0,a.jsx)("span",{className:"text-slate-400 text-[10px] font-semibold tracking-wide uppercase",children:t}),(0,a.jsxs)("span",{className:`text-xs font-bold w-10 text-right tabular-nums ${c?"text-slate-800":"text-slate-400"}`,children:[l,r?"%":""]})]}),(0,a.jsxs)("div",{className:"flex gap-0.5 h-[5px]",children:[(0,a.jsx)("div",{className:"flex-1 rounded-l-full bg-white/[0.06] overflow-hidden flex justify-end",children:(0,a.jsx)("div",{className:`rounded-l-full transition-all duration-500 ${o?"bg-gradient-to-r from-[#E11D48]/60 to-[#E11D48]":"bg-gradient-to-r from-white/10 to-white/20"}`,style:{width:`${i}%`}})}),(0,a.jsx)("div",{className:"flex-1 rounded-r-full bg-white/[0.06] overflow-hidden",children:(0,a.jsx)("div",{className:`rounded-r-full transition-all duration-500 ${c?"bg-gradient-to-l from-[#E11D48]/60 to-[#E11D48]":"bg-gradient-to-l from-white/10 to-white/20"}`,style:{width:`${100-i}%`}})})]})]},e.type)})})]})}
29function f({matchDetails:e}){let[t,s]=(0,l.useState)("pitch"),r=e?.lineup,n=r?.lineup||r,i=n?.home||[],o=n?.away||[],c=r?.home_formation||"",d=r?.away_formation||"",x=r?.match?.home_team,h=r?.match?.away_team;if(0===i.length&&0===o.length)return(0,a.jsx)(j,{text:"Đội h\xecnh sẽ được c\xf4ng bố trước trận đấu 30 ph\xfat"});let m=e=>e.filter(e=>1===e.first),p=e=>e.filter(e=>1!==e.first),u=m(i),g=m(o),b=p(i),w=p(o);return(0,a.jsxs)("div",{className:"flex flex-col",children:[(0,a.jsxs)("div",{className:"flex items-center justify-center gap-1 px-3 py-2 border-b border-slate-100",children:[(0,a.jsx)("button",{onClick:()=>s("pitch"),className:`px-3 py-1.5 text-[10px] font-bold rounded transition-all ${"pitch"===t?"bg-[#E11D48] text-white":"text-slate-400 bg-slate-100"}`,children:"Đội h\xecnh xuất ph\xe1t"}),(0,a.jsx)("button",{onClick:()=>s("list"),className:`px-3 py-1.5 text-[10px] font-bold rounded transition-all ${"list"===t?"bg-[#E11D48] text-white":"text-slate-400 bg-slate-100"}`,children:"Đội h\xecnh dá»± bị"})]}),"pitch"===t?(0,a.jsx)("div",{className:"relative w-full",style:{aspectRatio:"68/105"},children:(0,a.jsxs)("div",{className:"absolute inset-0 bg-gradient-to-b from-[#1a5c2a] via-[#1e6b31] to-[#1a5c2a] rounded-2xl overflow-hidden",children:[(0,a.jsxs)("div",{className:"absolute inset-[3%] border border-white/20 rounded-lg",children:[(0,a.jsx)("div",{className:"absolute left-0 right-0 top-1/2 h-px bg-white/20"}),(0,a.jsx)("div",{className:"absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 w-[22%] aspect-square rounded-full border border-white/20"}),(0,a.jsx)("div",{className:"absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 w-1.5 h-1.5 bg-white/30 rounded-full"}),(0,a.jsx)("div",{className:"absolute top-0 left-1/2 -translate-x-1/2 w-[55%] h-[16%] border-l border-r border-white/20"}),(0,a.jsx)("div",{className:"absolute top-0 left-1/2 -translate-x-1/2 w-[25%] h-[6%] border-l border-r border-white/20"}),(0,a.jsx)("div",{className:"absolute bottom-0 left-1/2 -translate-x-1/2 w-[55%] h-[16%] border-t border-l border-r border-white/20"}),(0,a.jsx)("div",{className:"absolute bottom-0 left-1/2 -translate-x-1/2 w-[25%] h-[6%] border-t border-l border-r border-white/20"})]}),(0,a.jsx)("div",{className:"absolute top-1 left-2 text-[9px] text-[#F8FAFC]/50 font-bold z-10",children:x?.name||""}),(0,a.jsx)("div",{className:"absolute top-1 right-2 text-[9px] text-[#E11D48]/70 font-bold z-10",children:c}),(0,a.jsx)("div",{className:"absolute bottom-1 left-2 text-[9px] text-[#F8FAFC]/50 font-bold z-10",children:h?.name||""}),(0,a.jsx)("div",{className:"absolute bottom-1 right-2 text-[9px] text-[#E11D48]/70 font-bold z-10",children:d}),u.map((e,t)=>{let s=`${e.x||50}%`,l=`${(e.y||10)/2}%`,r="G"===e.position;return(0,a.jsxs)("div",{className:"absolute flex flex-col items-center z-10 -translate-x-1/2 -translate-y-1/2",style:{left:s,top:l},children:[(0,a.jsx)("div",{className:`w-6 h-6 rounded-full flex items-center justify-center text-[9px] font-black ${r?"bg-yellow-400 text-black":"bg-blue-600 text-[#F8FAFC]"} shadow-md border border-white/20`,children:e.shirt_number||""}),(0,a.jsx)("span",{className:"text-[7px] text-[#F8FAFC] font-semibold mt-0.5 text-center max-w-[48px] truncate drop-shadow-[0_1px_2px_rgba(0,0,0,0.8)]",children:(e.name||"").split(" ").slice(-2).join(" ")}),1===e.captain&&(0,a.jsx)("span",{className:"absolute -top-1 -right-1 text-[6px] text-yellow-400",children:"C"})]},`h-${t}`)}),g.map((e,t)=>{let s=`${100-(e.x||50)}%`,l=`${100-(e.y||10)/2}%`,r="G"===e.position;return(0,a.jsxs)("div",{className:"absolute flex flex-col items-center z-10 -translate-x-1/2 -translate-y-1/2",style:{left:s,top:l},children:[(0,a.jsx)("div",{className:`w-6 h-6 rounded-full flex items-center justify-center text-[9px] font-black ${r?"bg-yellow-400 text-black":"bg-orange-500 text-[#F8FAFC]"} shadow-md border border-white/20`,children:e.shirt_number||""}),(0,a.jsx)("span",{className:"text-[7px] text-[#F8FAFC] font-semibold mt-0.5 text-center max-w-[48px] truncate drop-shadow-[0_1px_2px_rgba(0,0,0,0.8)]",children:(e.name||"").split(" ").slice(-2).join(" ")}),1===e.captain&&(0,a.jsx)("span",{className:"absolute -top-1 -right-1 text-[6px] text-yellow-400",children:"C"})]},`a-${t}`)})]})}):(0,a.jsxs)("div",{className:"px-3 py-2 text-xs",children:[(0,a.jsxs)("div",{className:"flex justify-between font-bold text-slate-400 mb-1 uppercase tracking-wider text-[9px] px-1",children:[(0,a.jsx)("span",{children:"Đội chá»
29§ nh\xe0"}),(0,a.jsx)("span",{children:"Đội kh\xe1ch"})]}),Array.from({length:Math.max(b.length,w.length)}).map((e,t)=>{let s=b[t],l=w[t];return(0,a.jsxs)("div",{className:"flex justify-between items-center border-b border-slate-50 py-1.5",children:[(0,a.jsx)("div",{className:"flex items-center gap-1.5 w-1/2 min-w-0",children:s&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"text-[#E11D48] font-bold w-5 text-center shrink-0 text-[10px]",children:s.shirt_number||""}),(0,a.jsx)("span",{className:"text-slate-700 truncate text-[11px]",children:s.name||""})]})}),(0,a.jsx)("div",{className:"flex items-center gap-1.5 w-1/2 justify-end min-w-0",children:l&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"text-slate-700 truncate text-[11px] text-right",children:l.name||""}),(0,a.jsx)("span",{className:"text-[#E11D48] font-bold w-5 text-center shrink-0 text-[10px]",children:l.shirt_number||""})]})})]},t)})]})]})}function j({text:e}){return(0,a.jsx)("div",{className:"flex items-center justify-center py-10 text-slate-400 text-sm text-center",children:e})}function w({m:e}){let t=c(e.status_id,e.sport_id),{hm:s,dm:l}=x(e.time),r=e.source_card_meta?.league_label||e.match_data?.competition_vi||"";return(0,a.jsxs)("a",{href:`/match/${encodeURIComponent(e.post_name||e.id)}`,className:"flex items-center gap-3 rounded-2xl bg-white hover:bg-slate-50 border border-slate-100 hover:border-[#4681E8]/30 p-3 transition-all group",children:[(0,a.jsxs)("div",{className:"shrink-0 w-14 text-center",children:[(0,a.jsx)("div",{className:"text-[#E11D48] text-[11px] font-bold",children:s}),(0,a.jsx)("div",{className:"text-slate-400 text-[9px]",children:l})]}),(0,a.jsx)("div",{className:"w-px h-9 bg-slate-200 shrink-0"}),(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("div",{className:"text-slate-400 text-[9px] truncate mb-1",children:r}),(0,a.jsxs)("div",{className:"flex items-center gap-2 mb-0.5",children:[(0,a.jsx)("img",{src:e.home_logo||d(e.home_name),alt:e.home_name,className:"w-4 h-4 object-contain shrink-0",onError:t=>t.target.src=d(e.home_name),loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-slate-600 text-[12px] font-medium truncate",children:e.home_name})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("img",{src:e.away_logo||d(e.away_name),alt:e.away_name,className:"w-4 h-4 object-contain shrink-0",onError:t=>t.target.src=d(e.away_name),loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-slate-600 text-[12px] font-medium truncate",children:e.away_name})]})]}),t.sc?(0,a.jsxs)("span",{className:"text-slate-800 font-bold text-[14px] tabular-nums shrink-0",children:[e.home_score,"-",e.away_score]}):(0,a.jsx)("span",{className:"text-[10px] font-bold text-[#E11D48] bg-[#E11D48]/10 rounded px-2.5 py-1 group-hover:bg-[#E11D48]/15 transition shrink-0",children:"XEM NGAY"})]})}let v={0:{bg:"bg-white/10",text:"text-[#F8FAFC]/40",nameCls:"text-[#94A3B8]"},1:{bg:"bg-white/10",text:"text-[#F8FAFC]/50",nameCls:"text-[#94A3B8]"},2:{bg:"bg-green-900/50",text:"text-green-400",nameCls:"text-green-400"},3:{bg:"bg-yellow-900/40",text:"text-yellow-400",nameCls:"text-emerald-600 font-bold"},4:{bg:"bg-blue-900/40",text:"text-blue-400",nameCls:"text-blue-400 font-bold"},5:{bg:"bg-red-900/40",text:"text-red-400",nameCls:"text-red-400 font-bold"}};function N({anchors:e,selectedAnchor:t}){let[s,r]=(0,l.useState)([]),[n,i]=(0,l.useState)(!1),o=(0,l.useRef)(null),c=(0,l.useRef)(null),d=t?.roomNum;return(0,l.useEffect)(()=>{if(!d)return;r([]),i(!1);let e=new EventSource(`/api/chat/${d}`);return e.onopen=()=>i(!0),e.onmessage=e=>{try{let t=JSON.parse(e.data);if("connected"===t.type)return void i(!0);if("history"===t.type&&Array.isArray(t.messages))return void r(e=>[...t.messages,...e].slice(-200));t.user&&t.text&&r(e=>[...e,t].slice(-200))}catch{}},e.onerror=()=>i(!1),()=>{e.close(),i(!1)}},[d]),(0,l.useEffect)(()=>{requestAnimationFrame(()=>{let e=c.current;e&&(e.scrollTop=e.scrollHeight)})},[s.length]),(0,a.jsxs)("div",{className:"flex flex-col h-full bg-[#0F0F23]",children:[(0,a.jsxs)("div",{ref:c,className:"flex-1 min-h-0 px-3 py-2 flex flex-col gap-[3px] overflow-y-auto",style:{scrollbarWidth:"thin",scrollbarColor:"#444 transparent"},children:[(0,a.jsx)("div",{className:"text-center text-[10px] text-[#F8FAFC]/30 bg-slate-50/60 py-1.5 rounded-xl mb-1 sticky top-0 z-10 backdrop-blur-sm",children:n?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"inline-block h-1.5 w-1.5 rounded-full bg-green-400 animate-pulse mr-1"}),"Đang kết nối ph\xf2ng chat trá»±c tiếp"]}):d?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"inline-block h-1.5 w-1.5 rounded-full bg-yellow-400 animate-pulse mr-1"}),"Đang kết nối..."]}
29):"Ch\xe0o mừng bạn đến với ph\xf2ng chat"}),0===s.length&&n&&(0,a.jsx)("div",{className:"text-center text-[10px] text-[#F8FAFC]/20 py-4",children:"Chờ tin nhắn mới..."}),s.map((e,t)=>{var s;let l=(s=e.level)>=5?v[5]:v[s]||v[0];return 2===e.type||e.text?.includes("v\xe0o ph\xf2ng tr\xf2 chuyện")?(0,a.jsxs)("div",{className:"flex items-start gap-1.5 text-[11px] leading-relaxed py-[1px] opacity-60",children:[(0,a.jsx)("span",{className:"text-green-500/70 font-medium",children:"Hi"}),(0,a.jsxs)("span",{className:`shrink-0 inline-flex items-center px-1 py-[0.5px] rounded text-[8px] font-bold ${l.bg} ${l.text}`,children:["Lv",e.level]}),(0,a.jsxs)("span",{className:`font-bold ${l.nameCls}`,children:[e.user,":"]}),(0,a.jsx)("span",{className:"text-[#F8FAFC]/40",children:e.text})]},`${e.ts}-${t}`):(0,a.jsxs)("div",{className:"flex items-start gap-1.5 text-[11px] leading-relaxed py-[1px]",children:[(0,a.jsxs)("span",{className:`shrink-0 inline-flex items-center px-1 py-[0.5px] rounded text-[8px] font-bold ${l.bg} ${l.text}`,children:["Lv.",e.level]}),(0,a.jsxs)("span",{className:`font-bold shrink-0 ${l.nameCls}`,children:[e.user,":"]}),(0,a.jsx)("span",{className:"text-[#F8FAFC]/80 break-words min-w-0",children:e.text})]},`${e.ts}-${t}`)}),(0,a.jsx)("div",{ref:o})]}),(0,a.jsxs)("div",{className:"shrink-0 px-3 py-2 bg-[#0F0F23] border-t border-white/[0.04] space-y-2",children:[(0,a.jsx)("div",{className:"flex items-center justify-center gap-3 text-[#F8FAFC]/20 text-[10px]",children:(0,a.jsx)("span",{className:"flex items-center gap-1",children:(0,a.jsx)("svg",{className:"w-3 h-3",viewBox:"0 0 24 24",fill:"currentColor",children:(0,a.jsx)("path",{d:"M12 4.5C7 4.5 2.7 7.6 1 12c1.7 4.4 6 7.5 11 7.5s9.3-3.1 11-7.5c-1.7-4.4-6-7.5-11-7.5zm0 12.5c-2.8 0-5-2.2-5-5s2.2-5 5-5 5 2.2 5 5-2.2 5-5 5zm0-8c-1.7 0-3 1.3-3 3s1.3 3 3 3 3-1.3 3-3-1.3-3-3-3z"})})})}),(0,a.jsxs)("div",{className:"flex bg-[#0F0F23] rounded-2xl overflow-hidden border border-white/[0.08]",children:[(0,a.jsx)("input",{type:"text",placeholder:"Đăng nhập để c\xf9ng chat nh\xe9",disabled:!0,className:"flex-1 bg-transparent px-3 py-2 text-[11px] text-[#F8FAFC] outline-none placeholder:text-[#F8FAFC]/30 disabled:opacity-50"}),(0,a.jsx)("button",{disabled:!0,className:"px-4 text-[11px] font-bold bg-[#E11D48] text-black disabled:bg-white/10 disabled:text-[#F8FAFC]/20 transition-colors",children:"Gửi"})]})]})]})}let y={1:{icon:"⚽",label:"B\xe0n thắng",color:"text-green-400"},2:{icon:"\uD83C\uDD7F️",label:"Phạt đền",color:"text-green-400"},3:{icon:"\uD83D\uDFE1",label:"Thẻ v\xe0ng",color:"text-yellow-400"},4:{icon:"\uD83D\uDFE1\uD83D\uDFE1",label:"Thẻ v\xe0ng 2",color:"text-emerald-600"},5:{icon:"\uD83D\uDD34",label:"Thẻ đỏ",color:"text-red-500"},7:{icon:"\uD83D\uDD04",label:"Phản lưới",color:"text-orange-400"},8:{icon:"\uD83C\uDFE5",label:"Chấn thương",color:"text-[#94A3B8]"},9:{icon:"\uD83D\uDD04",label:"Thay người",color:"text-blue-400"},11:{icon:"⏱️",label:"Hiệp 2",color:"text-[#F8FAFC]/40"},15:{icon:"\uD83E\uDD45",label:"Pen trượt",color:"text-red-400"},19:{icon:"⏱️",label:"Kết th\xfac hiệp",color:"text-[#F8FAFC]/30"},21:{icon:"\uD83C\uDFC6",label:"VAR",color:"text-purple-400"}};function _({events:e}){let t=e?.incidents||e?.events||[];return t&&0!==t.length?(0,a.jsx)("div",{className:"flex flex-col",children:t.map((e,t)=>{let s=y[e.type]||{icon:"•",label:`Event ${e.type}`,color:"text-[#F8FAFC]/50"},l=1===e.position,r=2===e.position,n=e.add_time?`+${e.add_time}`:"",i=`${e.time}'${n}`;return l||r||11!==e.type&&19!==e.type?9===e.type?(0,a.jsxs)("div",{className:`flex items-center gap-2 border-b border-slate-50 p-3 text-xs ${l?"":"flex-row-reverse"}`,children:[(0,a.jsx)("span",{className:"text-slate-400 w-10 text-center shrink-0 text-[10px]",children:i}),(0,a.jsxs)("div",{className:`flex-1 flex flex-col gap-0.5 ${l?"items-start":"items-end"}`,children:[(0,a.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,a.jsx)("span",{className:"text-green-400 text-[10px]",children:"▲"}),(0,a.jsx)("span",{className:"text-[#F8FAFC]/80 text-[11px]",children:e.in_player_name||""})]}),(0,a.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,a.jsx)("span",{className:"text-red-400 text-[10px]",children:"▼"}),(0,a.jsx)("span",{className:"text-[#F8FAFC]/40 text-[11px]",children:e.out_player_name||""})]})]})]},t):(0,a.jsxs)("div",{className:`flex items-center gap-2 border-b border-slate-50 p-3 text-xs ${l?"":"flex-row-reverse"}`,children:[(0,a.jsx)("span",{className:"text-slate-400 w-10 text-center shrink-0 text-[10px]",children:i}),(0,a.jsx)("span",{className:`shrink-0 text-sm ${s.color}`,children:s.icon}),(0,a.jsxs)("div",{className:`flex-1 min-w-0 ${l?"text-left":"text-right"}`,children:[(0,a.jsx)("span",{className:"text-slate-700 text-[11px]",children:e.player_name||""}),e.assist1_name&&(0,a.jsxs)("span",{className:"text-slate-400 text-[10px] ml-1",children:["(kiến tạo: ",e.assist1_name,")"]}),1===e.type&&void 0!==e.home_score&&(0,a.jsxs)("span",{className:"text-[#E11D48] font-bold text-[11px] ml-2",children:[e.home_score," - ",e.away_score]})]})]},t):(0,a.jsx)("div",{className:"flex items-center justify-center py-2 border-b border-slate-50 bg-slate-50",children:(0,a.jsxs)("span",{className:"text-slate-400 text-[10px] uppercase tracking-wider",children:[s.icon," ",s.label," — ",i]})},t)})}):(0,a.jsx)(j,{text:"Diễn biến trận đấu sẽ được cập nhật trực tiếp tại đ\xe2y"})}function k({standings:e}
29){return e&&e.teams&&0!==e.teams.length?(0,a.jsxs)("div",{className:"w-full text-[10px]",children:[(0,a.jsxs)("div",{className:"grid grid-cols-[20px_1fr_24px_24px_32px] bg-slate-50 p-2 text-slate-400 uppercase font-bold sticky top-0",children:[(0,a.jsx)("span",{className:"text-center",children:"#"}),(0,a.jsx)("span",{children:"Team"}),(0,a.jsx)("span",{className:"text-center",children:"T"}),(0,a.jsx)("span",{className:"text-center",children:"B"}),(0,a.jsx)("span",{className:"text-center whitespace-nowrap",children:"Đ"})]}),e.teams.slice(0,15).map((e,t)=>{let s=!!e.data,l=s?parseFloat(e.data[0]):e.rank||t+1,r=s?e.data[1]:e.target_name,n=s?e.data[7]:e.points,i=s?e.data[3]:e.won,o=s?e.data[5]:e.loss;return(0,a.jsxs)("div",{className:"grid grid-cols-[20px_1fr_24px_24px_32px] items-center p-2 border-b border-slate-50 hover:bg-slate-50 transition-colors",children:[(0,a.jsx)("span",{className:"text-center text-slate-500",children:l}),(0,a.jsxs)("div",{className:"flex items-center gap-1.5 min-w-0 pr-2",children:[e.team_logo&&(0,a.jsx)("img",{src:e.team_logo,className:"w-3.5 h-3.5 object-contain",alt:r||"Team logo",loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-slate-700 font-medium truncate",children:r})]}),(0,a.jsx)("span",{className:"text-center text-slate-500",children:i}),(0,a.jsx)("span",{className:"text-center text-slate-500",children:o}),(0,a.jsx)("span",{className:"text-center text-[#E11D48] font-bold",children:n})]},r)})]}):(0,a.jsx)(j,{text:"Bảng xếp hạng sẽ được cập nhật"})}function E({odds:e}){let t=Array.isArray(e)?e:[],s=["2","4","3","16"];function l(e){for(let a of s){let s=t.find(t=>t.odds_type===e&&String(t.company_id)===a);if(s?.odds_info?.length)return s}return t.find(t=>t.odds_type===e&&t.odds_info?.length>0)}function r(e,t){let s=e?.odds_info;if(!s?.length)return["-","-","-"];let a="opening"===t?s.length-1:0;if(!s?.length||!s[a])return["-","-","-"];let l=s[a][2];if("string"!=typeof l)return["-","-","-"];let r=l.split(",");return[r[0]||"-",r[1]||"-",r[2]||"-"]}let n=l("asia"),i=l("eu"),o=l("bs"),c=l("cr"),d=r(n,"opening"),x=r(n,"latest"),h=r(i,"opening"),m=r(i,"latest"),p=r(o,"opening"),u=r(o,"latest"),g=r(c,"opening"),b=r(c,"latest"),f=({children:e})=>(0,a.jsx)("th",{className:"px-2 py-2 text-[9px] sm:text-[10px] font-bold uppercase tracking-wider text-slate-500 border-b border-slate-100 text-center",children:e}),j=({children:e,color:t})=>(0,a.jsx)("td",{className:`px-2 py-2.5 text-center text-[11px] sm:text-xs font-bold ${t||"text-slate-600"} border-b border-slate-50`,children:e});return(0,a.jsxs)("div",{className:"overflow-x-auto",children:[(0,a.jsxs)("table",{className:"w-full min-w-[600px]",children:[(0,a.jsxs)("thead",{children:[(0,a.jsxs)("tr",{className:"bg-slate-50",children:[(0,a.jsx)("th",{className:"px-4 py-2 text-left border-b border-slate-100",rowSpan:2,children:(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("div",{className:"w-7 h-7 rounded bg-gradient-to-br from-[#1d4ed8] to-[#3b82f6] flex items-center justify-center text-white text-[9px] font-black shadow-sm",children:"B"}),(0,a.jsx)("span",{className:"text-slate-600 text-[11px] font-bold tracking-wider",children:"SPORT"})]})}),(0,a.jsx)("th",{colSpan:3,className:"px-1 py-1.5 text-center text-[9px] sm:text-[10px] font-bold uppercase tracking-wider text-[#4681E8] border-b border-l border-slate-100",children:"CƯỢC CH\xc2U \xc1"}),(0,a.jsx)("th",{colSpan:3,className:"px-1 py-1.5 text-center text-[9px] sm:text-[10px] font-bold uppercase tracking-wider text-[#4681E8] border-b border-l border-slate-100",children:"CƯỢC CH\xc2U \xc2U"}),(0,a.jsx)("th",{colSpan:3,className:"px-1 py-1.5 text-center text-[9px] sm:text-[10px] font-bold uppercase tracking-wider text-[#4681E8] border-b border-l border-slate-100",children:"T\xc0I XỈU"}),(0,a.jsx)("th",{colSpan:3,className:"px-1 py-1.5 text-center text-[9px] sm:text-[10px] font-bold uppercase tracking-wider text-[#4681E8] border-b border-l border-slate-100",children:"K\xc8O G\xd3C"})]}),(0,a.jsxs)("tr",{className:"bg-slate-50",children:[(0,a.jsx)(f,{children:"CHỦ"}),(0,a.jsx)(f,{children:"CHẤP"}),(0,a.jsx)(f,{children:"KH\xc1CH"}),(0,a.jsx)(f,{children:"CHỦ"}),(0,a.jsx)(f,{children:"H\xd2A"}),(0,a.jsx)(f,{children:"KH\xc1CH"}),(0,a.jsx)(f,{children:"T\xc0I"}),(0,a.jsx)(f,{children:"TỶ LỆ"}),(0,a.jsx)(f,{children:"XỈU"}),(0,a.jsx)(f,{children:"T\xc0I"}),(0,a.jsx)(f,{children:"TỶ LỆ"}),(0,a.jsx)(f,{children:"XỈU"})]})]}),(0,a.jsxs)("tbody",{children:[(0,a.jsxs)("tr",{className:"hover:bg-slate-50 transition-colors",children:[(0,a.jsx)("td",{className:"px-4 py-2.5 text-[11px] sm:text-xs text-slate-500 font-medium border-b border-slate-50",children:"Tỷ Lệ Mở Cược"}),(0,a.jsx)(j,{children:d[0]}),(0,a.jsx)(j,{color:"text-red-400",children:d[1]}),(0,a.jsx)(j,{children:d[2]}),(0,a.jsx)(j,{children:h[0]}),(0,a.jsx)(j,{children:h[1]}),(0,a.jsx)(j,{children:h[2]}),(0,a.jsx)(j,{children:p[0]}),(0,a.jsx)(j,{children:p[1]}),(0,a.jsx)(j,{children:p[2]}),(0,a.jsx)(j,{children:g[0]}),(0,a.jsx)(j,{children:g[1]}),(0,a.jsx)(j,{children:g[2]})]}),(0,a.jsxs)("tr",{className:"hover:bg-slate-50 transition-colors",children:[(0,a.jsx)("td",{className:"px-4 py-2.5 text-[11px] sm:text-xs text-slate-500 font-medium border-b border-slate-50",children:"Tỷ Lệ Trước Trận"}),(0,a.jsx)(j,{children:x[0]}),(0,a.jsx)(j,{color:"text-red-400",children:x[1]}),(0,a.jsx)(j,{children:x[2]}),(0,a.jsx)(j,{children:m[0]}),(0,a.jsx)(j,{children:m[1]}),(0,a.jsx)(j,{children:m[2]}),(0,a.jsx)(j,{children:u[0]}),(0,a.jsx)(j,{children:u[1]}),(0,a.jsx)(j,{children:u[2]}),(0,a.jsx)(j,{children:b[0]}),(0,a.jsx)(j,{children:b[1]}),(0,a.jsx)(j,{children:b[2]})]}),(0,a.jsxs)("tr",{className:"hover:bg-slate-50 transition-colors bg-white",children:[(0,a.jsxs)("td",{className:"px-4 py-2.5 text-[11px] sm:text-xs text-slate-700 font-bold flex items-center gap-1.5 border-b border-slate-50",children:["Live ",(0,a.jsx)("span",{className:"w-1.5 h-1.5 rounded-full bg-red-500 animate-pulse"})]}),(0,a.jsx)(j,{color:"text-green-400",children:x[0]}),(0,a.jsx)(j,{color:"text-red-400",children:x[1]}),(0,a.jsx)(j,{color:"text-green-400",children:x[2]}),(0,a.jsx)(j,{color:"text-green-400",children:m[0]}),(0,a.jsx)(j,{color:"text-green-400",children:m[1]}),(0,a.jsx)(j,{color:"text-green-400",children:m[2]}),(0,a.jsx)(j,{color:"text-green-400",children:u[0]}),(0,a.jsx)(j,{children:u[1]}),(0,a.jsx)(j,{color:"text-green-400",children:u[2]}),(0,a.jsx)(j,{color:"text-green-400",children:b[0]}),(0,a.jsx)(j,{children:b[1]}),(0,a.jsx)(j,{color:"text-green-400",children:b[2]})]})]})]}),(0,a.jsx)("p",{className:"text-center text-slate-400 text-[10px] py-2.5 border-t border-slate-100",children:"Tỷ lệ k\xe8o sẽ được cập nhật gần giờ thi đấu"})]})}},6035:(e,t,s)=>{"use strict";s.d(t,{j:()=>r});var a=s(68019),l=s(70508);
29function r({eyebrow:e,title:t,titleAddon:s,rightSlot:n,className:i}){return(0,a.jsx)("div",{className:(0,l.cn)("relative mb-5 overflow-hidden border-b border-slate-200",i),children:(0,a.jsxs)("div",{className:"flex items-center justify-between px-1 py-4 min-h-[56px]",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 min-w-0",children:[(0,a.jsx)("span",{className:"h-8 w-1 shrink-0 rounded-sm bg-gradient-to-b from-[#4681E8] to-[#55CAF1] shadow-[0_0_10px_rgba(70,129,232,0.5)]"}),(0,a.jsxs)("div",{className:"min-w-0",children:[e&&(0,a.jsx)("div",{className:"text-[10px] font-bold uppercase tracking-[0.2em] text-[#4681E8]/60 mb-0.5",children:e}),(0,a.jsxs)("div",{className:"flex items-center gap-2.5 flex-wrap",children:[(0,a.jsx)("h1",{className:"text-[18px] sm:text-[22px] font-black uppercase tracking-tight text-slate-800 leading-none",children:t}),s]})]})]}),n&&(0,a.jsx)("div",{className:"hidden sm:flex items-center gap-2 text-right shrink-0 ml-4",children:n})]})})}},6500:(e,t,s)=>{"use strict";function a(e){let t=e?.fixtures_v2||null,s=e?.fixtures||e?.schedules||[],a=t?.date_tabs?.length?t.date_tabs:function(e=new Date){let t=["Chủ Nhật","Thứ Hai","Thứ Ba","Thứ Tư","Thứ Năm","Thứ S\xe1u","Thứ Bảy"],s=[];for(let a=0;a<14;a+=1){let l=new Date(e);l.setDate(l.getDate()+a);let r=String(l.getDate()).padStart(2,"0"),n=String(l.getMonth()+1).padStart(2,"0"),i=`${l.getFullYear()}-${l.getMonth()+1}-${l.getDate()}`;s.push({label:0===a?"H\xf4m Nay":t[l.getDay()],date:`${r}.${n}`,dataValue:i,active:0===a})}return s}(),l=e?.selected_date||a.find(e=>e.active)?.dataValue||a[0]?.dataValue||null;if(t?.leagues?.length)return{dateTabs:a,selectedDate:l,leagues:t.leagues,totalMatches:t.leagues.reduce((e,t)=>e+t.matches.length,0)};let r=[],n=new Set;return s.forEach(e=>{let t=e.data;if(!(t.length<3))for(let s=0;s+2<t.length;s+=16){let a=t[s]||"",l=t[s+1]||"",i=t[s+2]||"",o=`${a}-${l}-${i}`;if(!n.has(o)&&l&&(n.add(o),r.push({time:a,home_team:l,away_team:i,home_logo:e.team_logos?.[2*Math.floor(s/16)]||"",away_logo:e.team_logos?.[2*Math.floor(s/16)+1]||"",score:t[s+3]||"-",ht_score:t[s+4]||"",handicap:t.length>s+9?[t[s+7]||"",t[s+8]||"",t[s+9]||""]:[],over_under:t.length>s+12?[t[s+10]||"",t[s+11]||"",t[s+12]||""]:[],one_x_two:t.length>s+15?[t[s+13]||"",t[s+14]||"",t[s+15]||""]:[]}),s+16>=t.length))break}}),{dateTabs:a,selectedDate:l,leagues:r.length>0?[{league_name:"Tất cả trận đấu",league_icon:"",match_count:r.length,matches:r}]:[],totalMatches:r.length}}function l(e){let t=e?.results_v2||null,s=e?.results||[];if(t?.date_groups?.length)return{availableLeagues:t.available_leagues||[],dateGroups:t.date_groups,totalMatches:t.date_groups.reduce((e,t)=>e+t.matches.length,0)};let a=[];return s.forEach(e=>{let t=e.data;if(t.length<6)return;let s=t[0],l=s.split(" - "),r=[],n=1,i=0;for(;n<t.length;){if(t[n]?.startsWith("L\xfac")){let s=t[n].replace("L\xfac","").trim();r.push({time:s,home_team:t[n+1]||"",away_team:t[n+4]||"",home_logo:e.team_logos?.[i]||"",away_logo:e.team_logos?.[i+1]||"",score:t[n+2]||"",ht_score:(t[n+3]||"").replace("H1:","").replace("HT:","").trim()}),i+=2,n+=5;continue}n+=1}r.length>0&&a.push({date_header:l[0]?.trim()||s,league_round:l.slice(1).join(" - ").trim(),matches:r})}),{availableLeagues:[],dateGroups:a,totalMatches:a.reduce((e,t)=>e+t.matches.length,0)}}function r(e,t){if(!t)return e;let s=t.toLowerCase();return e.filter(e=>e.league_round.toLowerCase().includes(s))}s.d(t,{kK:()=>r,o8:()=>l,p_:()=>a})},7396:(e,t,s)=>{"use strict";s.d(t,{LiveMatchesClient:()=>m});var a=s(68019),l=s(10707);function r({activeSport:e,onSportChange:t,activeStatus:s,onStatusChange:l,matchesCount:n}){return(0,a.jsxs)("div",{className:"mb-5 flex flex-col gap-3",children:[(0,a.jsx)("div",{className:"flex items-center gap-2 overflow-x-auto pb-1 scrollbar-hide",children:[{id:"1",label:"B\xd3NG Đ\xc1",icon:"⚽"},{id:"2",label:"B\xd3NG RỔ",icon:"\uD83C\uDFC0"},{id:"5",label:"TENNIS",icon:"\uD83C\uDFBE"},{id:"4",label:"CẦU L\xd4NG",icon:"\uD83C\uDFF8"},{id:"3",label:"B\xd3NG CHUYỀN",icon:"\uD83C\uDFD0"},{id:"6",label:"B\xd3NG B\xc0N",icon:"\uD83C\uDFD3"}].map(s=>{let l=e===s.id;return(0,a.jsxs)("button",{type:"button",onClick:()=>t(s.id),className:`flex items-center gap-2 px-4 py-2.5 rounded-xl font-bold text-[12px] whitespace-nowrap transition-all duration-200 border cursor-pointer ${l?"bg-[#4681E8]/10 text-[#4681E8] border-[#4681E8]/40 shadow-[0_0_15px_rgba(70,129,232,0.1)]":"bg-white text-slate-500 border-slate-200 hover:text-slate-700 hover:border-[#4681E8]/30"}`,children:[(0,a.jsx)("span",{className:"text-[14px]",children:s.icon}
29),(0,a.jsx)("span",{className:"tracking-wider uppercase",children:s.label})]},s.id)})}),(0,a.jsx)("div",{className:"flex items-center gap-1 overflow-x-auto pb-1 scrollbar-hide bg-white rounded-xl p-1.5 border border-slate-200",children:[{id:"all",label:"TẤT CẢ",keyCount:"all"},{id:"live",label:"TRỰC TIẾP",keyCount:"live"},{id:"hot",label:"HOT",keyCount:"hot"},{id:"today",label:"H\xd4M NAY",keyCount:"today"},{id:"tomorrow",label:"NG\xc0Y MAI",keyCount:"tomorrow"}].map(e=>{let t=s===e.id,r=n[e.keyCount]||0;return(0,a.jsxs)("button",{type:"button",onClick:()=>l(e.id),className:`relative px-4 py-2 font-bold text-[12px] whitespace-nowrap transition-all duration-200 uppercase tracking-wider flex items-center gap-2 rounded-lg cursor-pointer ${t?"bg-[#4681E8]/10 text-[#4681E8] shadow-inner":"text-slate-500 hover:text-slate-700 hover:bg-[#4681E8]/5"}`,children:["live"===e.id&&t&&(0,a.jsx)("span",{className:"w-1.5 h-1.5 rounded-full bg-[#4681E8] animate-pulse shadow-[0_0_6px_rgba(70,129,232,0.8)]"}),(0,a.jsx)("span",{children:e.label}),(0,a.jsx)("span",{className:`px-1.5 py-0.5 rounded text-[10px] font-black ${t?"bg-[#4681E8]/20 text-[#4681E8]":"text-slate-400"}`,children:r})]},e.id)})})]})}function n(){return"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='10' fill='%2364748B' fill-opacity='0.18'/%3E%3C/svg%3E"}function i({match:e,isLoading:t=!1}){if(t||!e)return(0,a.jsx)("div",{className:"animate-pulse bg-white h-[64px] w-full border-b border-slate-100"});let s=new Date(1e3*parseInt(e.time||0,10)).toLocaleTimeString("vi-VN",{hour:"2-digit",minute:"2-digit",timeZone:"Asia/Ho_Chi_Minh"}),l=function(e,t){if("1"===t||"2"===t)switch(e){case"1":default:return{text:"Sắp diễn",isLive:!1,showScore:!1};case"2":return{text:"H1",isLive:!0,showScore:!0};case"3":return{text:"HT",isLive:!0,showScore:!0};case"4":return{text:"H2",isLive:!0,showScore:!0};case"5":return{text:"Phụ",isLive:!0,showScore:!0};case"7":return{text:"Pen",isLive:!0,showScore:!0};case"8":case"9":return{text:"FT",isLive:!1,showScore:!0}}switch(e){case"0":case"1":return{text:"Sắp diễn",isLive:!1,showScore:!1};case"51":return{text:"S1",isLive:!0,showScore:!0};case"52":return{text:"S2",isLive:!0,showScore:!0};case"53":return{text:"S3",isLive:!0,showScore:!0};case"54":return{text:"S4",isLive:!0,showScore:!0};case"55":return{text:"S5",isLive:!0,showScore:!0};case"100":case"90":case"91":case"110":return{text:"FT",isLive:!1,showScore:!0};default:return{text:"LIVE",isLive:!0,showScore:!0}}}(String(e.status_id),String(e.sport_id)),r=e.time_text||e.source_card_meta?.time_text||"",o=l.isLive,c=e.home_score??"-",d=e.away_score??"-",x=e.home_logo||n(),h=e.away_logo||n();return(0,a.jsxs)("a",{href:`/match/${encodeURIComponent(e.post_name||e.id)}`,className:"flex items-center w-full group border-b border-slate-100 bg-white hover:bg-[#4681E8]/5 transition-colors min-h-[64px]",children:[(0,a.jsx)("div",{className:`w-[60px] flex flex-col items-center justify-center shrink-0 h-full border-r ${o?"border-[#4681E8]/30 bg-[#4681E8]/5":"border-slate-100"}`,children:o?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"text-[#4681E8] font-bold text-[11px] uppercase tracking-wider tabular-nums leading-none",children:r||l.text}),(0,a.jsx)("span",{className:"w-1.5 h-1.5 rounded-full bg-[#4681E8] animate-pulse mt-1"})]}):(0,a.jsx)("span",{className:"text-slate-500 font-medium text-[12px]",children:s})}),(0,a.jsxs)("div",{className:"flex-1 flex flex-col justify-center px-3 py-2 gap-1.5 min-w-0",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between w-full",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2.5 min-w-0 overflow-hidden",children:[(0,a.jsx)("img",{src:x,alt:e.home_name,className:"w-4 h-4 shrink-0 object-contain",onError:e=>e.currentTarget.src=n(),loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-[13px] font-semibold truncate text-slate-800",children:e.home_name})]}),l.showScore&&(0,a.jsx)("span",{className:`text-[15px] font-black tabular-nums shrink-0 ml-2 ${o?"text-[#4681E8]":"text-slate-700"}`,children:c})]}),(0,a.jsxs)("div",{className:"flex items-center justify-between w-full",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2.5 min-w-0 overflow-hidden",children:[(0,a.jsx)("img",{src:h,alt:e.away_name,className:"w-4 h-4 shrink-0 object-contain",onError:e=>e.currentTarget.src=n(),loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-[13px] font-semibold truncate text-slate-800",children:e.away_name})]}),l.showScore&&(0,a.jsx)("span",{className:`text-[15px] font-black tabular-nums shrink-0 ml-2 ${o?"text-[#4681E8]":"text-slate-700"}`,children:d})]})]}),(0,a.jsx)("div",{className:"w-[48px] h-full flex items-center justify-center shrink-0 text-slate-300 group-hover:text-[#4681E8] transition-colors border-l border-slate-100",children:(0,a.jsx)("svg",{className:"w-5 h-5 fill-current",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{d:"M8 5v14l11-7z"})})})]})}let o=new Set(["1","2","3","4","5","7"]),c=new Set(["8","9","15"]),d=new Set(["51","52","53","54","5
295","56","57","58","59"]),x=new Set(["100","90","91","92","93","110"]);function h(e){let t=String(e.status_id);return 2>=parseInt(e.sport_id)?o.has(t):d.has(t)}function m({matches:e,matchIndex:t}){let[s,n]=(0,l.useState)("1"),[o,d]=(0,l.useState)("all"),[p,u]=(0,l.useState)(1);(0,l.useEffect)(()=>{u(1)},[s,o]);let{todayStart:g,tomorrowStart:b,dayAfterStart:f}=(0,l.useMemo)(()=>{let e,t,s,{vnTodayStartUTC:a,vnTomorrowStartUTC:l,vnDayAfterStartUTC:r}=(s=(t=Math.floor(Date.UTC((e=new Date(Date.now()+252e5)).getUTCFullYear(),e.getUTCMonth(),e.getUTCDate())/1e3)-25200)+86400,{vnTodayStartUTC:t,vnTomorrowStartUTC:s,vnDayAfterStartUTC:s+86400});return{todayStart:a,tomorrowStart:l,dayAfterStart:r}},[]),j=(0,l.useMemo)(()=>new Map(e.map(e=>[e?.match_key?String(e.match_key):e?.ls_id?String(e.ls_id):e?.id?`${String(e.sport_id||"0")}:${String(e.id)}`:e?.scheduleId?`${String(e.sport_id||"0")}:schedule:${String(e.scheduleId)}`:[String(e?.sport_id||"0"),String(e?.time||"0"),String(e?.home_name||""),String(e?.away_name||"")].join(":"),e])),[e]),w=t?.summary_by_sport?.[s],v=t?.bucket_keys_by_sport?.[s],N=t?.bucket_pages_by_sport?.[s],y=e.filter(e=>{let t;return String(e.sport_id)===s&&(t=String(e.status_id),2>=parseInt(e.sport_id)?!c.has(t):!x.has(t))}),_=y.filter(e=>{let t=parseInt(e.time);return t>=g&&t<b}),k=y.filter(e=>{let t=parseInt(e.time);return t>=b&&t<f}),E={all:y.length,live:y.filter(e=>h(e)).length,hot:y.filter(e=>"1"===String(e.hot)).length,today:_.length,tomorrow:k.length},C=(0,l.useMemo)(()=>{if(v){if("all"===o&&Array.isArray(N?.all)&&N.all.length>0)return N.all.slice(0,p).flat().map(e=>j.get(e)).filter(Boolean);let e=v[o];if(Array.isArray(e))return e.map(e=>j.get(e)).filter(Boolean)}return"all"===o?y:"live"===o?y.filter(e=>h(e)):"hot"===o?y.filter(e=>"1"===String(e.hot)):"today"===o?_:"tomorrow"===o?k:y},[o,y,j,N,v,_,k,p]),S="all"===o&&Array.isArray(N?.all)&&p<N.all.length,L=(0,l.useMemo)(()=>"all"!==o&&"live"!==o&&"hot"!==o?[]:C.filter(e=>"1"===String(e.hot)||h(e)).slice(0,4),[C,o]),$=(0,l.useMemo)(()=>{let e=new Map;
29return C.forEach(t=>{let s=t.source_card_meta?.league_label||t.match_data?.competition_vi||t.match_data?.competition_name||t.match_data?.competition_full||"Giải đấu kh\xe1c";e.has(s)||e.set(s,[]),e.get(s).push(t)}),Array.from(e.entries())},[C]);return(0,a.jsxs)("div",{className:"w-full min-h-[500px]",children:[(0,a.jsx)(r,{activeSport:s,onSportChange:n,activeStatus:o,onStatusChange:d,matchesCount:w||E}),0===C.length?(0,a.jsx)("div",{className:"py-20 text-center",children:(0,a.jsx)("div",{className:"text-slate-400 text-base font-medium",children:"Kh\xf4ng c\xf3 trận đấu n\xe0o."})}):(0,a.jsxs)("div",{className:"flex flex-col gap-6",children:[L.length>0&&"all"===o&&(0,a.jsxs)("div",{className:"mb-4",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 mb-3 px-1",children:[(0,a.jsx)("span",{className:"w-2 h-4 rounded-full bg-[#4681E8]"}),(0,a.jsx)("h2",{className:"text-slate-800 font-black text-sm uppercase tracking-wider",children:"Trận đấu t\xe2m điểm"})]}),(0,a.jsx)("div",{className:"grid grid-cols-1 xl:grid-cols-2 gap-2",children:L.map((e,t)=>(0,a.jsx)(i,{match:e},`featured-${e.ls_id||e.id}-${t}`))})]}),(0,a.jsx)("div",{className:"flex flex-col gap-5",children:$.map(([e,t])=>{let s=t[0]?.match_data?.competition_logo;return(0,a.jsxs)("div",{className:"rounded-xl overflow-hidden border border-slate-200 bg-white shadow-sm",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2.5 bg-[#0E1B33] px-4 py-2.5 border-b border-[#0E1B33]",children:[s&&(0,a.jsx)("img",{src:s,alt:"league",className:"w-4 h-4 object-contain brightness-200 opacity-80",loading:"lazy",decoding:"async"}),(0,a.jsx)("h3",{className:"text-white text-[12px] font-bold uppercase tracking-wider truncate",children:e})]}),(0,a.jsx)("div",{className:"flex flex-col",children:t.map((e,t)=>(0,a.jsx)(i,{match:e},e.ls_id||`${e.id}-${t}`))})]},e)})}),S&&(0,a.jsx)("div",{className:"flex justify-center mt-6",children:(0,a.jsx)("button",{type:"button",onClick:()=>u(e=>e+1),className:"inline-flex items-center justify-center rounded-xl border border-[#4681E8]/30 bg-white px-8 py-3 text-[12px] font-bold uppercase tracking-wider text-[#4681E8] transition-all duration-200 hover:bg-[#4681E8] hover:text-white hover:border-[#4681E8]",children:"Tải th\xeam"})})]})]})}},7860:(e,t,s)=>{"use strict";s.d(t,{LiveMatchesClient:()=>m});var a=s(68019),l=s(10707);function r({activeSport:e,onSportChange:t,activeStatus:s,onStatusChange:l,matchesCount:n}){return(0,a.jsxs)("div",{className:"mb-5 flex flex-col gap-3",children:[(0,a.jsx)("div",{className:"flex items-center gap-2 overflow-x-auto pb-1 scrollbar-hide",children:[{id:"1",label:"B\xd3NG Đ\xc1",icon:"⚽"},{id:"2",label:"B\xd3NG RỔ",icon:"\uD83C\uDFC0"},{id:"5",label:"TENNIS",icon:"\uD83C\uDFBE"},{id:"4",label:"CẦU L\xd4NG",icon:"\uD83C\uDFF8"},{id:"3",label:"B\xd3NG CHUYỀN",icon:"\uD83C\uDFD0"},{id:"6",label:"B\xd3NG B\xc0N",icon:"\uD83C\uDFD3"}].map(s=>{let l=e===s.id;return(0,a.jsxs)("button",{type:"button",onClick:()=>t(s.id),className:`flex items-center gap-2 px-4 py-2.5 rounded-xl font-bold text-[12px] whitespace-nowrap transition-all duration-200 border cursor-pointer ${l?"bg-[#4681E8]/10 text-[#4681E8] border-[#4681E8]/40 shadow-[0_0_15px_rgba(70,129,232,0.1)]":"bg-white text-slate-500 border-slate-200 hover:text-slate-700 hover:border-[#4681E8]/30"}`,children:[(0,a.jsx)("span",{className:"text-[14px]",children:s.icon}),(0,a.jsx)("span",{className:"tracking-wider uppercase",children:s.label})]},s.id)})}),(0,a.jsx)("div",{className:"flex items-center gap-1 overflow-x-auto pb-1 scrollbar-hide bg-white rounded-xl p-1.5 border border-slate-200",children:[{id:"all",label:"TẤT CẢ",keyCount:"all"},{id:"live",label:"TRỰC TIẾP",keyCount:"live"},{id:"hot",label:"HOT",keyCount:"hot"},{id:"today",label:"H\xd4M NAY",keyCount:"today"},{id:"tomorrow",label:"NG\xc0Y MAI",keyCount:"tomorrow"}].map(e=>{let t=s===e.id,r=n[e.keyCount]||0;return(0,a.jsxs)("button",{type:"button",onClick:()=>l(e.id),className:`relative px-4 py-2 font-bold text-[12px] whitespace-nowrap transition-all duration-200 uppercase tracking-wider flex items-center gap-2 rounded-lg cursor-pointer ${t?"bg-[#4681E8]/10 text-[#4681E8] shadow-inner":"text-slate-500 hover:text-slate-700 hover:bg-[#4681E8]/5"}`,children:["live"===e.id&&t&&(0,a.jsx)("span",{className:"w-1.5 h-1.5 rounded-full bg-[#4681E8] animate-pulse shadow-[0_0_6px_rgba(70,129,232,0.8)]"}),(0,a.jsx)("span",{children:e.label}),(0,a.jsx)("span",{className:`px-1.5 py-0.5 rounded text-[10px] font-black ${t?"bg-[#4681E8]/20 text-[#4681E8]":"text-slate-400"}`,children:r})]},e.id)})})]})}function n(){return"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='10' fill='%2364748B' fill-opacity='0.18'/%3
29E%3C/svg%3E"}function i({match:e,isLoading:t=!1}){if(t||!e)return(0,a.jsx)("div",{className:"animate-pulse bg-white h-[64px] w-full border-b border-slate-100"});let s=new Date(1e3*parseInt(e.time||0,10)).toLocaleTimeString("vi-VN",{hour:"2-digit",minute:"2-digit",timeZone:"Asia/Ho_Chi_Minh"}),l=function(e,t){if("1"===t||"2"===t)switch(e){case"1":default:return{text:"Sắp diễn",isLive:!1,showScore:!1};case"2":return{text:"H1",isLive:!0,showScore:!0};case"3":return{text:"HT",isLive:!0,showScore:!0};case"4":return{text:"H2",isLive:!0,showScore:!0};case"5":return{text:"Phụ",isLive:!0,showScore:!0};case"7":return{text:"Pen",isLive:!0,showScore:!0};case"8":case"9":return{text:"FT",isLive:!1,showScore:!0}}switch(e){case"0":case"1":return{text:"Sắp diễn",isLive:!1,showScore:!1};case"51":return{text:"S1",isLive:!0,showScore:!0};case"52":return{text:"S2",isLive:!0,showScore:!0};case"53":return{text:"S3",isLive:!0,showScore:!0};case"54":return{text:"S4",isLive:!0,showScore:!0};case"55":return{text:"S5",isLive:!0,showScore:!0};case"100":case"90":case"91":case"110":return{text:"FT",isLive:!1,showScore:!0};default:return{text:"LIVE",isLive:!0,showScore:!0}}}(String(e.status_id),String(e.sport_id)),r=e.time_text||e.source_card_meta?.time_text||"",o=l.isLive,c=e.home_score??"-",d=e.away_score??"-",x=e.home_logo||n(),h=e.away_logo||n();return(0,a.jsxs)("a",{href:`/match/${encodeURIComponent(e.post_name||e.id)}`,className:"flex items-center w-full group border-b border-slate-100 bg-white hover:bg-[#4681E8]/5 transition-colors min-h-[64px]",children:[(0,a.jsx)("div",{className:`w-[60px] flex flex-col items-center justify-center shrink-0 h-full border-r ${o?"border-[#4681E8]/30 bg-[#4681E8]/5":"border-slate-100"}`,children:o?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"text-[#4681E8] font-bold text-[11px] uppercase tracking-wider tabular-nums leading-none",children:r||l.text}),(0,a.jsx)("span",{className:"w-1.5 h-1.5 rounded-full bg-[#4681E8] animate-pulse mt-1"})]}):(0,a.jsx)("span",{className:"text-slate-500 font-medium text-[12px]",children:s})}),(0,a.jsxs)("div",{className:"flex-1 flex flex-col justify-center px-3 py-2 gap-1.5 min-w-0",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between w-full",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2.5 min-w-0 overflow-hidden",children:[(0,a.jsx)("img",{src:x,alt:e.home_name,className:"w-4 h-4 shrink-0 object-contain",onError:e=>e.currentTarget.src=n(),loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-[13px] font-semibold truncate text-slate-800",children:e.home_name})]}),l.showScore&&(0,a.jsx)("span",{className:`text-[15px] font-black tabular-nums shrink-0 ml-2 ${o?"text-[#4681E8]":"text-slate-700"}`,children:c})]}),(0,a.jsxs)("div",{className:"flex items-center justify-between w-full",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2.5 min-w-0 overflow-hidden",children:[(0,a.jsx)("img",{src:h,alt:e.away_name,className:"w-4 h-4 shrink-0 object-contain",onError:e=>e.currentTarget.src=n(),loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-[13px] font-semibold truncate text-slate-800",children:e.away_name})]}),l.showScore&&(0,a.jsx)("span",{className:`text-[15px] font-black tabular-nums shrink-0 ml-2 ${o?"text-[#4681E8]":"text-slate-700"}`,children:d})]})]}),(0,a.jsx)("div",{className:"w-[48px] h-full flex items-center justify-center shrink-0 text-slate-300 group-hover:text-[#4681E8] transition-colors border-l border-slate-100",children:(0,a.jsx)("svg",{className:"w-5 h-5 fill-current",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{d:"M8 5v14l11-7z"})})})]})}let o=new Set(["1","2","3","4","5","7"]),c=new Set(["8","9","15"]),d=new Set(["51","52","53","54","55","56","57","58","59"]),x=new Set(["100","90","91","92","93","110"]);function h(e){let t=String(e.status_id);return 2>=parseInt(e.sport_id)?o.has(t):d.has(t)}function m({matches:e,matchIndex:t}){let[s,n]=(0,l.useState)("1"),[o,d]=(0,l.useState)("all"),[p,u]=(0,l.useState)(1);(0,l.useEffect)(()=>{u(1)},[s,o]);let{todayStart:g,tomorrowStart:b,dayAfterStart:f}=(0,l.useMemo)(()=>{let e,t,s,{vnTodayStartUTC:a,vnTomorrowStartUTC:l,vnDayAfterStartUTC:r}=(s=(t=Math.floor(Date.UTC((e=new Date(Date.now()+252e5)).getUTCFullYear(),e.getUTCMonth(),e.getUTCDate())/1e3)-25200)+86400,{vnTodayStartUTC:t,vnTomorrowStartUTC:s,vnDayAfterStartUTC:s+86400});return{todayStart:a,tomorrowStart:l,dayAfterStart:r}},[]),j=(0,l.useMemo)(()=>new Map(e.map(e=>[e?.match_key?String(e.match_key):e?.ls_id?String(e.ls_id):e?.id?`${String(e.sport_id||"0")}
29:${String(e.id)}`:e?.scheduleId?`${String(e.sport_id||"0")}:schedule:${String(e.scheduleId)}`:[String(e?.sport_id||"0"),String(e?.time||"0"),String(e?.home_name||""),String(e?.away_name||"")].join(":"),e])),[e]),w=t?.summary_by_sport?.[s],v=t?.bucket_keys_by_sport?.[s],N=t?.bucket_pages_by_sport?.[s],y=e.filter(e=>{let t;return String(e.sport_id)===s&&(t=String(e.status_id),2>=parseInt(e.sport_id)?!c.has(t):!x.has(t))}),_=y.filter(e=>{let t=parseInt(e.time);return t>=g&&t<b}),k=y.filter(e=>{let t=parseInt(e.time);return t>=b&&t<f}),E={all:y.length,live:y.filter(e=>h(e)).length,hot:y.filter(e=>"1"===String(e.hot)).length,today:_.length,tomorrow:k.length},C=(0,l.useMemo)(()=>{if(v){if("all"===o&&Array.isArray(N?.all)&&N.all.length>0)return N.all.slice(0,p).flat().map(e=>j.get(e)).filter(Boolean);let e=v[o];if(Array.isArray(e))return e.map(e=>j.get(e)).filter(Boolean)}return"all"===o?y:"live"===o?y.filter(e=>h(e)):"hot"===o?y.filter(e=>"1"===String(e.hot)):"today"===o?_:"tomorrow"===o?k:y},[o,y,j,N,v,_,k,p]),S="all"===o&&Array.isArray(N?.all)&&p<N.all.length,L=(0,l.useMemo)(()=>"all"!==o&&"live"!==o&&"hot"!==o?[]:C.filter(e=>"1"===String(e.hot)||h(e)).slice(0,4),[C,o]),$=(0,l.useMemo)(()=>{let e=new Map;
29return C.forEach(t=>{let s=t.source_card_meta?.league_label||t.match_data?.competition_vi||t.match_data?.competition_name||t.match_data?.competition_full||"Giải đấu kh\xe1c";e.has(s)||e.set(s,[]),e.get(s).push(t)}),Array.from(e.entries())},[C]);return(0,a.jsxs)("div",{className:"w-full min-h-[500px]",children:[(0,a.jsx)(r,{activeSport:s,onSportChange:n,activeStatus:o,onStatusChange:d,matchesCount:w||E}),0===C.length?(0,a.jsx)("div",{className:"py-20 text-center",children:(0,a.jsx)("div",{className:"text-slate-400 text-base font-medium",children:"Kh\xf4ng c\xf3 trận đấu n\xe0o."})}):(0,a.jsxs)("div",{className:"flex flex-col gap-6",children:[L.length>0&&"all"===o&&(0,a.jsxs)("div",{className:"mb-4",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 mb-3 px-1",children:[(0,a.jsx)("span",{className:"w-2 h-4 rounded-full bg-[#4681E8]"}),(0,a.jsx)("h2",{className:"text-slate-800 font-black text-sm uppercase tracking-wider",children:"Trận đấu t\xe2m điểm"})]}),(0,a.jsx)("div",{className:"grid grid-cols-1 xl:grid-cols-2 gap-2",children:L.map((e,t)=>(0,a.jsx)(i,{match:e},`featured-${e.ls_id||e.id}-${t}`))})]}),(0,a.jsx)("div",{className:"flex flex-col gap-5",children:$.map(([e,t])=>{let s=t[0]?.match_data?.competition_logo;return(0,a.jsxs)("div",{className:"rounded-xl overflow-hidden border border-slate-200 bg-white shadow-sm",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2.5 bg-[#0E1B33] px-4 py-2.5 border-b border-[#0E1B33]",children:[s&&(0,a.jsx)("img",{src:s,alt:"league",className:"w-4 h-4 object-contain brightness-200 opacity-80",loading:"lazy",decoding:"async"}),(0,a.jsx)("h3",{className:"text-white text-[12px] font-bold uppercase tracking-wider truncate",children:e})]}),(0,a.jsx)("div",{className:"flex flex-col",children:t.map((e,t)=>(0,a.jsx)(i,{match:e},e.ls_id||`${e.id}-${t}`))})]},e)})}),S&&(0,a.jsx)("div",{className:"flex justify-center mt-6",children:(0,a.jsx)("button",{type:"button",onClick:()=>u(e=>e+1),className:"inline-flex items-center justify-center rounded-xl border border-[#4681E8]/30 bg-white px-8 py-3 text-[12px] font-bold uppercase tracking-wider text-[#4681E8] transition-all duration-200 hover:bg-[#4681E8] hover:text-white hover:border-[#4681E8]",children:"Tải th\xeam"})})]})]})}},8406:(e,t,s)=>{"use strict";s.d(t,{Klivevip24SchedulePage:()=>d});var a=s(68019),l=s(10707),r=s(78637),n=s(26895);function i({html:e}){return e?.trim()?(0,a.jsx)("section",{className:"relative mt-10 mb-6",children:(0,a.jsx)("div",{className:"seo-prose relative",children:(0,a.jsx)("div",{dangerouslySetInnerHTML:{__html:e},className:"text-slate-600 text-[14px] leading-[1.85] px-1 [&_strong]:text-slate-900 [&_a]:text-[#4681E8]"})})}):null}s(78686);let o=`
30<h2>Lịch thi đấu b\xf3ng đ\xe1 - Cập nhật lịch b\xf3ng đ\xe1 h\xf4m nay nhanh v\xe0 ch\xednh x\xe1c</h2>
31
32<p>Để <strong>xem lịch thi đấu b\xf3ng đ\xe1</strong> nhanh, ch\xednh x\xe1c v\xe0 đầy đủ nhất, Klive ch\xednh l\xe0 nơi bạn n\xean chọn. Ch\xfang t\xf4i cập nhật lịch thi đấu cho to\xe0n bộ c\xe1c giải đấu trong nước v\xe0 quốc tế, gi\xfap bạn kh\xf4ng bỏ lỡ bất kỳ trận cầu hấp dẫn n\xe0o.</p>
33
34<img src="/images/seo/schedule-football.png" alt="Lịch thi đấu b\xf3ng đ\xe1 h\xf4m nay tại Klive" loading="lazy" />
35
36<div class="toc-box">
37  <h3>Nội dung ch\xednh</h3>
38  <ol>
39    <li>Lịch thi đấu b\xf3ng đ\xe1 trực tuyến h\xe0ng đầu</li>
40    <li>Lịch b\xf3ng đ\xe1 nhanh v\xe0 ch\xednh x\xe1c</li>
41    <li>Cập nhật lịch Ngoại Hạng Anh v\xe0 Champions League</li>
42    <li>C\xe1ch xem lịch thi đấu hiệu quả nhất</li>
43  </ol>
44</div>
45
46<h2>Lịch thi đấu b\xf3ng đ\xe1 trực tuyến h\xe0ng đầu</h2>
47<p>Trong thời đại số, kh\xf4ng ai c\xf2n xem lịch b\xf3ng đ\xe1 tr\xean TV hay b\xe1o giấy nữa. Tất cả đ\xe3 chuyển sang theo d\xf5i online, v\xe0 Klive ch\xednh l\xe0 nền tảng cập nhật lịch b\xf3ng đ\xe1 được đ\xe1nh gi\xe1 cao nhất.</p>
48
49<p>Khi truy cập Klive, bạn c\xf3 thể xem lịch thi đấu của bất kỳ giải đấu b\xf3ng đ\xe1 n\xe0o tr\xean thế giới một c\xe1ch ho\xe0n to\xe0n miễn ph\xed. Th\xf4ng tin lịch đấu được cập nhật sớm nhất v\xe0 chi tiết đến từng ph\xfat.</p>
50
51<h2>Lịch b\xf3ng đ\xe1 nhanh v\xe0 ch\xednh x\xe1c</h2>
52<p>Klive kh\xf4ng chỉ cung cấp lịch thi đấu c\xe1c giải đấu h\xe0ng đầu m\xe0 c\xf2n cập nhật lịch ph\xe1t s\xf3ng tr\xean c\xe1c k\xeanh truyền h\xecnh Việt Nam như K+, FPT Play, VTV Sports. Gi\xfap bạn biết trận n\xe0o được chiếu trực tiếp tr\xean TV v\xe0 sắp xếp thời gian hợp l\xfd.</p>
53
54<h2>Cập nhật lịch Ngoại Hạng Anh v\xe0 Champions League</h2>
55<p>Ngoại Hạng Anh v\xe0 Champions League l\xe0 hai giải đấu được quan t\xe2m nhất. Tại Klive, bạn lu\xf4n nắm được lịch đấu đầy đủ từ v\xf2ng bảng đến chung kết, k\xe8m theo th\xf4ng tin về đội h\xecnh dá»± kiến, phong độ v\xe0 lịch sá»­ đối đầu để chuẩn bị tốt nhất cho má
55»—i trận cầu.</p>
56
57<p>Kết hợp lịch thi đấu với trang trực tiếp b\xf3ng đ\xe1, bạn sẽ c\xf3 trải nghiệm theo d\xf5i b\xf3ng đ\xe1 ho\xe0n hảo nhất - biết trước, xem ngay, kh\xf4ng bỏ lỡ!</p>
58`;var c=s(48011);function d({initialData:e}){let t=(0,r.usePathname)(),[s,h]=(0,l.useState)(!1),[m,p]=(0,l.useState)(new Set),[u,g]=(0,l.useState)(""),[b,f]=(0,l.useState)(!1),[j,w]=(0,l.useState)(0),v=(0,l.useMemo)(()=>(0,c.p_)(e),[e]),N=v.dateTabs,y=(0,l.useMemo)(()=>{if(!v.selectedDate)return 0;let e=N.findIndex(e=>(e.dataValue||e.date)===v.selectedDate);return e>=0?e:0},[N,v.selectedDate]),[_,k]=(0,l.useState)(y),[E,C]=(0,l.useState)(v.leagues||[]),S=(0,l.useMemo)(()=>{if(!u)return E;let e=u.toLowerCase();return E.filter(t=>t.league_name.toLowerCase().includes(e)||t.matches.some(t=>t.home_team.toLowerCase().includes(e)||t.away_team.toLowerCase().includes(e)))},[E,u]),L=Math.max(0,N.length-7),$=N.slice(j,j+7),F=j>0,T=j<L,A=S.reduce((e,t)=>e+t.matches.length,0);return((0,l.useEffect)(()=>{if(!v.selectedDate||!N.length)return;let e=N.findIndex(e=>(e.dataValue||e.date)===v.selectedDate);e>=0&&k(e)},[N,v.selectedDate]),(0,l.useEffect)(()=>{_<j?w(Math.max(0,_)):_>=j+7&&w(Math.min(L,_-7+1))},[_,L,j]),e)?(0,a.jsxs)("div",{className:"max-w-[1440px] mx-auto px-4 py-8",children:[(0,a.jsx)(n.x,{eyebrow:"Lịch thi đấu",title:"LỊCH THI ĐẤU",rightSlot:(0,a.jsxs)("div",{className:"text-[12px] text-slate-500 font-bold uppercase tracking-wider",children:[(0,a.jsx)("span",{className:"text-[#E11D48] font-black",children:S.reduce((e,t)=>e+t.matches.length,0)})," trận đấu"]})}),(0,a.jsxs)("div",{className:"flex items-center mb-4 rounded-xl overflow-hidden border border-slate-200 bg-white shadow-sm",children:[(0,a.jsx)("button",{type:"button",disabled:!F,onClick:()=>w(e=>Math.max(0,e-1)),className:`flex items-center justify-center w-8 h-[52px] bg-slate-100 border-r border-slate-200 text-slate-600 hover:text-slate-800 hover:bg-slate-200 transition-all shrink-0 ${!F?"opacity-30":"cursor-pointer"}`,children:(0,a.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2.5,d:"M15 19l-7-7 7-7"})})}),(0,a.jsx)("div",{className:"flex flex-1",children:$.map((e,s)=>{let l=j+s;return(0,a.jsxs)("button",{type:"button",onClick:()=>(e=>{let s=N[e];if(!s||e===_)return;let a=s.dataValue||s.date;a&&(k(e),p(new Set),h(!0),window.history.replaceState(null,"",`${t}?date=${encodeURIComponent(a)}`),fetch(`/api/socolive/fixtures?date=${encodeURIComponent(a)}`,{cache:"no-store"}).then(e=>e.ok?e.json():null).then(e=>{e&&C((0,c.p_)(e).leagues||[])}).finally(()=>h(!1)))})(l),className:`flex-1 flex flex-col items-center justify-center h-[52px] border-b-[3px] transition-all duration-300 ${_===l?"border-[#4681E8] text-[#4681E8] bg-[#4681E8]/5":"border-transparent text-[#64748B] hover:text-[#94A3B8] hover:bg-slate-100"}`,children:[(0,a.jsx)("span",{className:`text-[11px] font-bold uppercase tracking-widest ${_===l?"text-[#4681E8]":""}`,children:e.label}),(0,a.jsx)("span",{className:`text-[12px] font-mono mt-0.5 ${_===l?"text-slate-800 font-black":""}`,children:e.date})]},`tab-${l}`)})}),(0,a.jsx)("button",{type:"button",disabled:!T,onClick:()=>w(e=>Math.min(L,e+1)),className:`flex items-center justify-center w-8 h-[52px] bg-slate-100 border-l border-slate-200 text-slate-600 hover:text-slate-800 hover:bg-slate-200 transition-all shrink-0 ${!T?"opacity-30":"cursor-pointer"}`,children:(0,a.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2.5,d:"M9 5l7 7-7 7"})})})]}),(0,a.jsxs)("div",{className:"relative mb-4",children:[(0,a.jsxs)("button",{onClick:()=>f(!b),className:"flex items-center gap-3 bg-white hover:bg-slate-50 px-4 py-2.5 rounded-xl border border-slate-200 shadow-sm transition-all text-sm group",children:[(0,a.jsx)("svg",{className:"w-5 h-5 text-[#E11D48] transition-colors group-hover:text-[#F43F5E]",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 6h16M4 12h16M4 18h16"})}),(0,a.jsx)("span",{className:"text-slate-700 font-bold text-[13px] uppercase tracking-wide",children:"Danh s\xe1ch giải đấu"}),(0,a.jsx)("svg",{className:`w-4 h-4 text-slate-500 transition-transform duration-300 ${b?"rotate-180":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),b&&(0,a.jsxs)("div",{className:"absolute top-full left-0 mt-2 w-[360px] bg-white border border-slate-200 rounded-2xl shadow-[0_24px_80px_rgba(0,0,0,0.12)] z-50 max-h-[320px] overflow-hidden flex flex-col",children:[(0,a.jsx)("div",{className:"p-2 border-b border-slate-100",children:(0,a.jsx)("input",{type:"text",placeholder:"T\xecm giải đấu...",value:u,onChange:e=>g(e.target.value),className:"w-full bg-slate-50 border border-transparent roun
58ded-xl px-4 py-2.5 text-sm text-slate-800 placeholder-slate-400 outline-none focus:border-[#4681E8]/50 transition-colors"})}),(0,a.jsx)("div",{className:"overflow-y-auto flex-1 py-2",children:E.map((e,t)=>(0,a.jsxs)("button",{type:"button",onClick:()=>{g(e.league_name),f(!1)},className:"w-full flex items-center gap-3 px-4 py-2.5 hover:bg-slate-50 text-left text-[13px] transition-colors",children:[e.league_icon?(0,a.jsx)("img",{src:e.league_icon,alt:e.league_name||"League",className:"w-5 h-5 object-contain shrink-0",loading:"lazy",decoding:"async"}):(0,a.jsx)("div",{className:"w-5 h-5 rounded-md bg-slate-200 shrink-0"}),(0,a.jsx)("span",{className:"text-slate-600 truncate flex-1 font-medium",children:e.league_name}),(0,a.jsx)("span",{className:"text-[11px] text-[#E11D48] font-bold shrink-0 px-2 py-0.5 bg-[#E11D48]/10 rounded-md border border-[#E11D48]/20",children:e.matches.length})]},t))})]})]}),(0,a.jsxs)("div",{className:"grid grid-cols-[1fr_60px_55px_100px_100px_90px] bg-slate-50 border border-slate-200 rounded-t-xl px-4 py-3 text-[11px] text-slate-500 font-black uppercase tracking-widest shadow-inner",children:[(0,a.jsx)("span",{children:"Trận đấu"}),(0,a.jsx)("span",{className:"text-center",children:"Tỷ số"}),(0,a.jsx)("span",{className:"text-center",children:"Hiệp 1"}),(0,a.jsx)("span",{className:"text-center",children:"Cược chấp"}),(0,a.jsx)("span",{className:"text-center",children:"T\xe0i/Xỉu"}),(0,a.jsx)("span",{className:"text-center",children:"1 X 2"})]}),(0,a.jsxs)("div",{className:"border border-slate-200 border-t-0 rounded-b-xl overflow-hidden relative shadow-[0_8px_30px_rgba(0,0,0,0.06)]",children:[s&&(0,a.jsx)("div",{className:"absolute inset-0 z-10 bg-white/80 backdrop-blur-[2px]",children:(0,a.jsx)("div",{className:"space-y-0",children:[...Array(6)].map((e,t)=>(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 px-4 py-3.5 bg-slate-100 border-b border-slate-200",children:[(0,a.jsx)("div",{className:"w-4 h-4 rounded bg-slate-300 animate-pulse"}),(0,a.jsx)("div",{className:"h-3.5 rounded bg-slate-200 animate-pulse",style:{width:`${120+30*t}px`}})]}),[void 0,void 0].map((e,t)=>(0,a.jsxs)("div",{className:"grid grid-cols-[1fr_60px_55px_100px_100px_90px] items-center px-4 py-3 border-b border-slate-100",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)("div",{className:"w-10 h-3.5 rounded bg-slate-200 animate-pulse"}),(0,a.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,a.jsx)("div",{className:"h-3 w-24 rounded bg-slate-100 animate-pulse"}),(0,a.jsx)("div",{className:"h-3 w-20 rounded bg-slate-100 animate-pulse"})]})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5",children:[(0,a.jsx)("div",{className:"h-3 w-5 rounded bg-slate-100 animate-pulse"}),(0,a.jsx)("div",{className:"h-3 w-5 rounded bg-slate-100 animate-pulse"})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5",children:[(0,a.jsx)("div",{className:"h-3 w-5 rounded bg-slate-100 animate-pulse"}),(0,a.jsx)("div",{className:"h-3 w-5 rounded bg-slate-100 animate-pulse"})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5",children:[(0,a.jsx)("div",{className:"h-3 w-14 rounded bg-slate-100 animate-pulse"}),(0,a.jsx)("div",{className:"h-3 w-10 rounded bg-slate-100 animate-pulse"})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5",children:[(0,a.jsx)("div",{className:"h-3 w-14 rounded bg-slate-100 animate-pulse"}),(0,a.jsx)("div",{className:"h-3 w-10 rounded bg-slate-100 animate-pulse"})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5",children:[(0,a.jsx)("div",{className:"h-3 w-10 rounded bg-slate-100 animate-pulse"}),(0,a.jsx)("div",{className:"h-3 w-10 rounded bg-slate-100 animate-pulse"}),(0,a.jsx)("div",{className:"h-3 w-10 rounded bg-slate-100 animate-pulse"})]})]},t))]},t))})}),0!==S.length||s?S.map((e,t)=>(0,a.jsxs)("div",{id:`league-${t}`,children:[(0,a.jsxs)("button",{onClick:()=>{p(e=>{let s=new Set(e);return s.has(t)?s.delete(t):s.add(t),s})},className:"w-full flex items-center gap-3 px-4 py-3 bg-slate-50 hover:bg-slate-100 border-b border-slate-100 transition-colors text-left group",children:[(0,a.jsx)("svg",{className:`w-4 h-4 text-[#E11D48] transition-transform duration-300 shrink-0 ${m.has(t)?"-rotate-90":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2.5,d:"M19 9l-7 7-7-7"})}),e.league_icon&&(0,a.jsx)("div",{className:"w-6 h-6 rounded-full bg-slate-100 p-0.5 border border-slate-200 flex items-center justify-center shadow-sm",children:(0,a.jsx)("img",{src:e.league_icon,alt:e.league_name||"League",className:"w-4 h-4 object-contain shrink-0",loading:"lazy",decoding:"async"})}),(0,a.jsx)("span",{className:"text-[13px] font-bold text-slate-700 flex-1 truncate uppercase tracking-widest",children:e.league_name}),(0,a.jsxs)("span",{className:"text-[11px] text-[#E11D48] font-bold shrink-0 ml-1 px-2 py-0.5 bg-[#E11D48]/10 rounded border border-[#
58E11D48]/20 group-hover:bg-[#E11D48]/20 transition-colors",children:["BXH ",(0,a.jsx)("svg",{className:"inline w-3 h-3 ml-0.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 6h16M4 10h16M4 14h16M4 18h16"})})]})]}),!m.has(t)&&e.matches.map((e,t)=>(0,a.jsxs)("div",{className:"grid grid-cols-[1fr_60px_55px_100px_100px_90px] items-center px-4 py-3 bg-transparent hover:bg-slate-50 border-b border-slate-100 last:border-0 transition-colors group cursor-default",children:[(0,a.jsxs)("div",{className:"flex items-center gap-4 min-w-0",children:[(0,a.jsx)("span",{className:"text-[#E11D48] font-mono text-[13px] font-black min-w-[42px] shrink-0 drop-shadow-[0_0_4px_rgba(225,29,72,0.4)]",children:e.time}),(0,a.jsxs)("div",{className:"flex flex-col gap-1 min-w-0 flex-1",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[e.home_logo&&(0,a.jsx)("img",{src:e.home_logo,alt:e.home_team||"Home team",className:"w-4 h-4 object-contain shrink-0 filter drop-shadow-[0_2px_2px_rgba(0,0,0,0.8)]",loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-[13px] text-slate-700 font-medium truncate group-hover:text-slate-900 transition-colors",children:e.home_team})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[e.away_logo&&(0,a.jsx)("img",{src:e.away_logo,alt:e.away_team||"Away team",className:"w-4 h-4 object-contain shrink-0",loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-[13px] text-slate-700 font-medium truncate group-hover:text-slate-900 transition-colors",children:e.away_team})]})]})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center",children:[(0,a.jsx)("span",{className:"text-[12px] text-[var(--accent-cyan)] font-mono font-bold",children:"-"!==e.score?e.score:"-"}),(0,a.jsx)("span",{className:"text-[12px] text-[#64748B]",children:"-"})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center",children:[(0,a.jsx)("span",{className:"text-[12px] text-[#64748B]",children:"-"}),(0,a.jsx)("span",{className:"text-[12px] text-[#64748B]",children:"-"})]}),(0,a.jsx)(x,{values:e.handicap,hasLine:!0}),(0,a.jsx)(x,{values:e.over_under,hasLine:!0}),(0,a.jsx)("div",{className:"flex flex-col items-center gap-0",children:e.one_x_two?.length>0?e.one_x_two.map((e,t)=>(0,a.jsx)("span",{className:"text-[11px] text-slate-500 leading-[18px]",children:e||"-"},t)):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"text-[11px] text-[#64748B] leading-[18px]",children:"-"}),(0,a.jsx)("span",{className:"text-[11px] text-[#64748B] leading-[18px]",children:"-"}),(0,a.jsx)("span",{className:"text-[11px] text-[#64748B] leading-[18px]",children:"-"})]})})]},t))]},t)):(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center py-20 gap-3 bg-slate-50",children:[(0,a.jsx)("svg",{className:"w-12 h-12 text-slate-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",strokeWidth:1.5,children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6.75 3v2.25M17.25 3v2.25M3 18.75V7.5a2.25 2.25 0 012.25-2.25h13.5A2.25 2.25 0 0121 7.5v11.25m-18 0A2.25 2.25 0 005.25 21h13.5A2.25 2.25 0 0021 18.75m-18 0v-7.5A2.25 2.25 0 015.25 9h13.5A2.25 2.25 0 0121 11.25v7.5"})}),(0,a.jsx)("span",{className:"text-slate-500 font-medium tracking-wide",children:"Kh\xf4ng c\xf3 trận đấu n\xe0o cho ng\xe0y n\xe0y"}),(0,a.jsx)("span",{className:"text-slate-400 text-[12px]",children:"H\xe3y thử chọn một ng\xe0y kh\xe1c"})]})]}),(0,a.jsxs)("div",{className:"mt-6 text-center text-[11px] text-[#64748B] uppercase tracking-widest font-bold drop-shadow-sm",children:["Tổng cộng ",A," trận đấu trong ",S.length," giải"]}),(0,a.jsx)(i,{html:o})]}):(0,a.jsxs)("div",{className:"max-w-[1440px] mx-auto px-4 py-8",children:[(0,a.jsx)(n.x,{eyebrow:"Lịch thi đấu",title:"LỊCH THI ĐẤU"}),(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center py-16 gap-4",children:[(0,a.jsx)("div",{className:"w-12 h-12 rounded-full border-2 border-[#E11D48]/30 border-t-[#E11D48] animate-spin"}),(0,a.jsx)("span",{className:"text-slate-500 text-sm font-medium tracking-wide",children:"Đang tải lịch thi đấu..."})]})]})}function x({values:e,hasLine:t}){return e&&0!==e.length?t&&e.length>=3?(0,a.jsxs)("div",{className:"flex flex-col items-center gap-0",children:[(0,a.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,a.jsx)("span",{className:"text-[11px] text-[#E11D48] leading-[18px] font-bold",children:e[0]}),(0,a.jsx)("span",{className:"text-[11px] text-slate-500 leading-[18px]",children:e[1]})]}),(0,a.jsx)("span",{className:"text-[11px] text-slate-500 leading-[18px]",children:e[2]})]}):(0,a.jsx)("div",{className:"flex flex-col items-center gap-0",children:e.map((e,t)=>(0,a.jsx)("span",{className:"text-[11px] text-slate-500 leading-[18px]",children:e||"-"},t))}):(0,a.jsxs)("div",{className:"flex flex-col items-center",children:[(0,a.jsx)("span",{className:"text-[11px] text-[#64748B] leading-[18px]",children:"-"}),(0,a.jsx)("span",{className:"text-[11px] text-[#64748B] leading-[18px]",children:"-"})]})}},9968:(e,t,s)=>{"use strict";s.d(t,{Klivevip16MatchDetailPage:()=>m});var a=s(68019),l=s(10707),r=s(58420);function n({src:e,poster:t,autoPlay:s=!0,onError:i,className:o=""}){let c=(0,l.useRef)(null),d=(0,l.useRef)(i);d.current=i;let[x,h]=(0,l.useState)(!1),[m,p]=(0,l.useState)(!1);return((0,l.useEffect)(()=>{let t=c.current;if(!t)return;let a=null;h(!1);let l=()=>p(!0),n=()=>p(!1);t.addEventListener("play",l),t.addEventListener("pause",n);let i=()=>{s&&(t.muted=!0,t.play().catch(()=>{}))};if(t.addEventListener("canplay",i),r.Ay.isSupported()){(a=new r.Ay({maxBufferLength:30,maxMaxBufferLength:60,lowLatencyMode:!0,enableWorker:!0})).loadSource(e),a.attachMedia(t),a.on(r.Ay.Events.MANIFEST_PARSED,()=>{s&&(t.muted=!0,t.play().catch(e=>{console.warn("AutoPlay failed:",e),t.muted=!1}))});let l=0,n=0;a.on(r.Ay.Events.ERROR,(e,t)=>
58{if(t.type===r.Ay.ErrorTypes.NETWORK_ERROR&&(++l>2||t.response&&t.response.code>=400)){console.error("HLS Network Error threshold reached (CORS/404), triggering fallback.",t),h(!0),d.current&&d.current(t),a?.destroy();return}if(t.fatal)switch(t.type){case r.Ay.ErrorTypes.NETWORK_ERROR:console.error("HLS Fatal Network Error, recovering...",t),a?.startLoad();break;case r.Ay.ErrorTypes.MEDIA_ERROR:console.error("HLS Media Error, recovering...",t),++n>3?(console.error("HLS Media Error threshold reached, triggering fallback."),h(!0),d.current&&d.current(t),a?.destroy()):a?.recoverMediaError();break;default:console.error("HLS Fatal Error:",t),h(!0),d.current&&d.current(t),a?.destroy()}})}else t.canPlayType("application/vnd.apple.mpegurl")&&(t.src=e,t.addEventListener("loadedmetadata",()=>{s&&t.play().catch(e=>{console.warn("AutoPlay failed:",e)})}),t.addEventListener("error",e=>{h(!0),d.current&&d.current(e)}));return()=>{t.removeEventListener("play",l),t.removeEventListener("pause",n),t.removeEventListener("canplay",i),a&&a.destroy()}},[e,s]),x)?i?null:(0,a.jsxs)("div",{className:`w-full h-full flex flex-col items-center justify-center bg-white/80 backdrop-blur ${o}`,children:[(0,a.jsx)("svg",{className:"w-12 h-12 text-red-500 mb-4 opacity-80",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"})}),(0,a.jsx)("div",{className:"text-slate-600 text-sm font-medium",children:"Video/Stream kh\xf4ng khả dụng hoặc bị lỗi mạng"}),(0,a.jsx)("div",{className:"text-gray-500 text-xs mt-1",children:"Vui l\xf2ng thử lại sau hoặc chọn nguồn kh\xe1c"})]}):(0,a.jsx)("div",{className:`relative group w-full h-full bg-white flex items-center justify-center overflow-hidden ${o}`,children:(0,a.jsx)("video",{ref:c,className:"w-full h-full object-contain",controls:!0,playsInline:!0,muted:s,poster:t,referrerPolicy:"no-referrer"})})}function i(e){let t=(e||"").split(/[\s-]+/).slice(0,2).map(e=>e[0]||"").join("").toUpperCase()||"??";return`data:image/svg+xml,${encodeURIComponent(`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 80 80"><rect width="80" height="80" rx="20" fill="#1a1c25"/><text x="40" y="47" font-size="20" font-family="Arial" font-weight="700" text-anchor="middle" fill="#666">${t}</text></svg>`)}`}function o({homeName:e,awayName:t,homeLogo:s,awayLogo:l,homeScore:r="0",awayScore:n="0",statusText:c="LIVE",timeText:d="",isLive:x=!0,sportId:h="1",matchId:m}){let p=s||i(e),u=l||i(t),g="5"===String(h),b="2"===String(h),f="bg-slate-200 border-slate-200",j="repeating-linear-gradient(90deg, transparent, transparent 10%, #000 10%, #000 20%)";return g?(f="bg-slate-100 border-slate-200",j="none"):b&&(f="bg-[#bc7a46] border-[#8a4e21]",j="repeating-linear-gradient(90deg, transparent, transparent 5%, #000 5%, #000 10%)"),(0,a.jsxs)("div",{className:"relative w-full aspect-video min-h-[300px] max-h-[600px] bg-slate-50 overflow-hidden flex flex-col justify-center",children:[(0,a.jsx)("div",{className:"absolute inset-0 flex items-center justify-center pointer-events-none mt-16 md:mt-24",children:(0,a.jsx)("div",{className:"relative w-[120%] h-[120%] sm:w-[90%] sm:h-[120%] max-w-[900px] flex-shrink-0 transition-transform duration-1000",style:{transform:"perspective(900px) rotateX(60deg) scale(0.9)",transformOrigin:"center center"},children:(0,a.jsxs)("div",{className:`absolute inset-0 ${f} shadow-[0_30px_60px_rgba(0,0,0,0.8)] border-4 rounded-xl overflow-hidden flex transition-colors duration-500`,children:[(0,a.jsx)("div",{className:"absolute inset-0 opacity-15 pointer-events-none",style:{backgroundImage:j}}),(0,a.jsxs)("div",{className:"absolute inset-[4%] pointer-events-none shadow-sm flex items-center justify-center",children:["1"===String(h)&&(0,a.jsxs)("div",{className:"absolute inset-0 w-full h-full border-2 border-white/60",children:[(0,a.jsx)("div",{className:"absolute left-1/2 top-0 bottom-0 w-0 border-l-2 border-white/60 -translate-x-1/2"}),(0,a.jsx)("div",{className:"absolute left-1/2 top-1/2 w-[18%] aspect-square rounded-full border-2 border-white/60 -translate-x-1/2 -translate-y-1/2"}),(0,a.jsx)("div",{className:"absolute left-1/2 top-1/2 w-2 h-2 rounded-full bg-white/80 -translate-x-1/2 -translate-y-1/2"}),(0,a.jsx)("div",{className:"absolute left-0 top-1/2 w-[16%] h-[46%] border-2 border-l-0 border-white/60 -translate-y-1/2 bg-slate-200"}),(0,a.jsx)("div",{className:"absolute left-0 top-1/2 w-[6%] h-[20%] border-2 border-l-0 border-white/60 -translate-y-1/2 bg-slate-200"}),(0,a.jsx)("div",{className:"absolute left-[16%] top-1/2 w-[8%] aspect-square border-2 border-l-0 border-white/60 rounded-r-full -translate-y-1/2 clip-path-half",style:{clipPath:"inset(0 0 0 50%)"}}),(0,a.jsx)("div",{className:"absolute right-0 top-1/2 w-[16%] h-[46%] border-2 border-r-0 border-white/60 -translate-y-1/2 bg-slate-200"}),(0,a.jsx)("div",{className:"absolute right-0 top-1/2 w-[6%] h-[20%] border-2 border-r-0 border-white/60 -translate-y-1/2 bg-slate-200"}),(0,a.jsx)("div",{className:"absolute right-[16%] top-1/2 w-[8%] aspect-square border-2 border-r-0 border-white/60 rounded-l-full -translate-y-1/2 clip-path-half",style:{clipPath:"inset(0 50% 0 0)"}})]}),g&&(0,a.jsxs)("div",{className:"absolute inset-[10%] w-[80%] h-[80%
58] border-2 border-white/80 bg-white",children:[(0,a.jsx)("div",{className:"absolute top-[10%] bottom-[10%] left-0 right-0 border-y-2 border-white/80"}),(0,a.jsx)("div",{className:"absolute left-1/2 top-[-2%] bottom-[-2%] w-1 bg-white/40 shadow-xl -translate-x-1/2 z-10"}),(0,a.jsx)("div",{className:"absolute left-[25%] right-[25%] top-[10%] bottom-[10%] border-x-2 border-white/80"}),(0,a.jsx)("div",{className:"absolute left-[25%] right-[25%] top-1/2 w-[50%] border-t-2 border-white/80 -translate-y-1/2"}),(0,a.jsx)("div",{className:"absolute left-0 top-1/2 w-[2%] border-t-2 border-white/80 -translate-y-1/2"}),(0,a.jsx)("div",{className:"absolute right-0 top-1/2 w-[2%] border-t-2 border-white/80 -translate-y-1/2"})]}),b&&(0,a.jsxs)("div",{className:"absolute inset-0 w-full h-full border-2 border-white/50",children:[(0,a.jsx)("div",{className:"absolute left-1/2 top-0 bottom-0 w-0 border-l-2 border-white/50 -translate-x-1/2"}),(0,a.jsx)("div",{className:"absolute left-1/2 top-1/2 w-[15%] aspect-square rounded-full border-2 border-white/50 -translate-x-1/2 -translate-y-1/2"}),(0,a.jsx)("div",{className:"absolute left-0 top-1/2 w-[18%] h-[35%] border-2 border-l-0 border-white/50 -translate-y-1/2 bg-[#bc7a46]"}),(0,a.jsx)("div",{className:"absolute left-[18%] top-1/2 w-[10%] aspect-square rounded-full border-2 border-white/50 -translate-y-1/2"}),(0,a.jsx)("div",{className:"absolute left-0 top-1/2 w-[30%] h-[70%] border-2 border-l-0 border-white/50 rounded-r-full -translate-y-1/2 opacity-60"}),(0,a.jsx)("div",{className:"absolute right-0 top-1/2 w-[18%] h-[35%] border-2 border-r-0 border-white/50 -translate-y-1/2 bg-[#bc7a46]"}),(0,a.jsx)("div",{className:"absolute right-0 top-1/2 w-[30%] h-[70%] border-2 border-r-0 border-white/50 rounded-l-full -translate-y-1/2 opacity-60"})]})]}),x&&(0,a.jsx)("div",{className:`absolute left-1/2 top-1/2 shadow-[0_8px_16px_rgba(0,0,0,0.8)] z-10 transition-all duration-[3000ms] border-2 border-white/20 rounded-full
59                                ${g?"w-2 h-2 sm:w-3 sm:h-3 bg-[#ccff00]":b?"w-4 h-4 sm:w-6 sm:h-6 bg-[#d95d16]":"w-4 h-4 sm:w-5 sm:h-5 bg-white"}`,style:{animation:"ballMove 8s infinite alternate ease-in-out",transform:"translate(-50%, -50%)"},children:(0,a.jsx)("div",{className:"absolute -bottom-4 left-1/2 w-4 h-2 bg-white/40 rounded-full blur-sm -translate-x-1/2"})}),x&&(0,a.jsxs)("div",{className:"absolute left-[65%] top-[60%] flex flex-col items-center animate-bounce-slow",style:{animation:"floatBubble 4s infinite alternate ease-in-out"},children:[(0,a.jsxs)("div",{className:"bg-white/95 backdrop-blur border border-white/10 rounded-2xl p-2 shadow-2xl flex items-center gap-3 w-max max-w-[200px]",children:[(0,a.jsx)("div",{className:"w-6 h-6 rounded-full flex items-center justify-center p-0.5 bg-white/5 shrink-0",children:(0,a.jsx)("img",{src:p,alt:e||"Home team",className:"max-w-full max-h-full object-contain",onError:t=>t.target.src=i(e),loading:"lazy",decoding:"async"})}),(0,a.jsx)("div",{className:"flex flex-col pr-1 overflow-hidden",children:(0,a.jsx)("span",{className:"text-slate-900 font-bold text-[10px] sm:text-xs tracking-wide truncate",children:g?"Serve / Return":"Tấn c\xf4ng nguy hiểm"})})]}),(0,a.jsx)("div",{className:"w-0 h-0 border-l-[6px] border-r-[6px] border-t-[6px] border-l-transparent border-r-transparent border-t-[#1a1c28]/95 mt-[-1px]"})]})]})})}),(0,a.jsx)("div",{className:"relative z-20 flex-1 flex flex-col items-center justify-start p-4 md:p-6 pointer-events-none w-full",children:(0,a.jsxs)("div",{className:"w-full max-w-[800px] flex items-center justify-between px-4 sm:px-6 py-3 rounded-xl bg-gradient-to-r from-[#0d0f14]/90 via-[#151821]/95 to-[#0d0f14]/90 backdrop-blur-xl border border-white/10 shadow-[0_10px_40px_rgba(0,0,0,0.8)] pointer-events-auto",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 flex-1 min-w-0 pr-2",children:[(0,a.jsx)("img",{src:p,alt:e,className:"w-8 h-8 md:w-12 md:h-12 object-contain drop-shadow-lg shrink-0",onError:t=>t.target.src=i(e),loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-slate-900 text-xs sm:text-sm md:text-base font-bold truncate tracking-wide",children:e})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1 shrink-0 px-2 sm:px-6 min-w-[100px]",children:[(0,a.jsxs)("span",{className:`inline-flex items-center gap-1.5 px-2.5 py-0.5 rounded-full text-[10px] sm:text-xs font-bold shadow-inner ${x?"bg-green-500/10 text-green-400 border border-green-500/20":"bg-white/5 text-slate-900/40"}`,children:[x&&(0,a.jsx)("span",{className:"w-1.5 h-1.5 rounded-full bg-green-500 animate-pulse shadow-[0_0_8px_#22c55e]"}),d||c]}),(0,a.jsxs)("div",{className:"flex gap-3 sm:gap-5 items-center justify-center",children:[(0,a.jsx)("span",{className:"text-slate-900 text-2xl sm:text-4xl font-black drop-shadow-md",children:r}),(0,a.jsx)("span",{className:"text-slate-900/30 text-xl font-light",children:"-"}),(0,a.jsx)("span",{className:"text-slate-900 text-2xl sm:text-4xl font-black drop-shadow-md",children:n})]})]}),(0,a.jsxs)("div",{className:"flex items-center justify-end gap-3 flex-1 min-w-0 pl-2 text-right",children:[(0,a.jsx)("span",{className:"text-slate-900 text-xs sm:text-sm md:text-base font-bold truncate tracking-wide",children:t}),(0,a.jsx)("img",{src:u,alt:t,className:"w-8 h-8 md:w-12 md:h-12 object-contain drop-shadow-lg shrink-0",onError:e=>e.target.src=i(t),loading:"lazy",decoding:"async"})]})]})}),(0,a.jsx)("div",{className:"relative z-20 mt-auto w-full p-4 flex justify-center pointer-events-none",children:(0,a.jsx)("div",{className:"w-full max-w-[600px] h-6 bg-white/40 backdrop-blur-md rounded-full border border-white/5 flex items-center px-4",children:(0,a.jsxs)("div",{className:"flex-1 h-0.5 bg-white/10 relative rounded-full",children:[x&&(0,a.jsx)("div",{className:"absolute left-0 top-0 bottom-0 bg-gradient-to-r from-[#b38b22] to-[#ffda6a] w-[65%] rounded-full opacity-90 shadow-[0_0_12px_#daa520]"}),(0,a.jsx)("span",{className:"absolute left-[65%] top-1/2 -translate-y-1/2 -translate-x-1/2 w-1.5 h-1.5 rounded-full bg-white shadow-md"})]})})}),(0,a.jsx)("style",{children:`
60                @keyframes ballMove {
61                    0% { transform: translate(-30%, -20%) scale(1); }
62                    25% { transform: translate(40%, -10%) scale(1.1); }
63                    50% { transform: translate(20%, 30%) scale(0.9); }
64                    75% { transform: translate(-10%, 15%) scale(1.2); }
65                    100% { transform: translate(-45%, 0%) scale(1); }
66                }
67                @keyframes floatBubble {
68                    0% { transform: translateY(0px) translateX(0px); }
69                    50% { transform: translateY(-8px) translateX(4px); }
70                    100% { transform: translateY(4px) translateX(-4px); }
71                }
72            `})]})}function c(e,t){if("1"===t||"2"===t)switch(e){case"2":return{t:"HT 1",live:!0,sc:!0};case"3":return{t:"Giữa giờ",live:!0,sc:!0};case"4":return{t:"HT 2",live:!0,sc:!0};case"5":return{t:"Hiệp phụ",live:!0,sc:!0};case"7":return{t:"Penalty",live:!0,sc:!0};case"8":case"9":return{t:"Kết th\xfac",live:!1,sc:!0};default:return{t:"Chưa bắt đầu",live:!1,sc:!1}}
72return["51","52","53","54","55"].includes(e)?{t:`Set ${e-50}`,live:!0,sc:!0}:["100","90","110"].includes(e)?{t:"KT",live:!1,sc:!0}:"0"===e||"1"===e?{t:"Chưa bắt đầu",live:!1,sc:!1}:{t:"LIVE",live:!0,sc:!0}}function d(e){let t=(e||"").split(/[\s-]+/).slice(0,2).map(e=>e[0]||"").join("").toUpperCase()||"??";return`data:image/svg+xml,${encodeURIComponent(`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 80 80"><rect width="80" height="80" rx="20" fill="#1a1c25"/><text x="40" y="47" font-size="20" font-family="Arial" font-weight="700" text-anchor="middle" fill="#666">${t}</text></svg>`)}`}function x(e){let t=new Date(1e3*parseInt(e||"0",10));return{hm:t.toLocaleTimeString("vi-VN",{hour:"2-digit",minute:"2-digit",timeZone:"Asia/Ho_Chi_Minh"}),dm:t.toLocaleDateString("vi-VN",{day:"2-digit",month:"2-digit",timeZone:"Asia/Ho_Chi_Minh"}),full:t.toLocaleDateString("vi-VN",{day:"2-digit",month:"2-digit",year:"numeric",timeZone:"Asia/Ho_Chi_Minh"})}}let h="max-w-[1200px]";function m({matchData:e,relatedMatches:t,matchDetails:s,standings:r,brandingNameUpper:i}){let p,u,g,j,v,y,[C,S]=(0,l.useState)("odds"),L=e?.match_data?.anchors||[],[$,F]=(0,l.useState)(!1),[T,A]=(0,l.useState)(!1),[M,H]=(0,l.useState)(null),[D,B]=(0,l.useState)(!1),z=(0,l.useRef)(0);(0,l.useEffect)(()=>{if(!e?.has_live||"1"!==e.has_live||0===L.length)return;let t=!1;B(!0);let s=async t=>{let s=t?.uid,a=`/api/socolive/proxy-stream?url=${encodeURIComponent(`https://live.inplyr.com/${s?`room/${s}`:`default/${e.id}`}.m3u8`)}`;try{let e=await fetch(a,{method:"GET",cache:"no-store"});if(!e.ok)return null;let s=(await e.text()).split("\n").filter(e=>e.trim()&&!e.startsWith("#"));if(0===s.length)return null;return(await fetch(s[0],{method:"HEAD",cache:"no-store"})).ok?t:null}catch{return null}};return Promise.all(L.map(e=>s(e))).then(e=>{if(t)return;let s=e.find(e=>null!==e);s?(H(s),F(!0),A(!1)):(H(L[0]),A(!0)),B(!1)}),()=>{t=!0}},[e?.has_live,L.length]),(0,l.useEffect)(()=>{if(!T||D||z.current>=20)return;let t=setTimeout(()=>{z.current++,A(!1),B(!0);let t=async t=>{let s=t?.uid,a=`/api/socolive/proxy-stream?url=${encodeURIComponent(`https://live.inplyr.com/${s?`room/${s}`:`default/${e.id}`}.m3u8`)}`;try{let e=await fetch(a,{method:"GET",cache:"no-store"});if(!e.ok)return null;let s=(await e.text()).split("\n").filter(e=>e.trim()&&!e.startsWith("#"));if(0===s.length)return null;return(await fetch(s[0],{method:"HEAD",cache:"no-store"})).ok?t:null}catch{return null}};Promise.all(L.map(e=>t(e))).then(e=>{let t=e.find(e=>null!==e);t?(H(t),F(!0),A(!1)):A(!0),B(!1)})},15e3);return()=>clearTimeout(t)},[T,D]);let[I,R]=(0,l.useState)(null),U=e?.post_name||e?.ls_id||e?.id;if(window.location.origin,(0,l.useEffect)(()=>{if(!U)return;let e=setInterval(async()=>{try{let e=await fetch(`/api/klivevip/match/${U}`,{cache:"no-store"});if(e.ok){let t=await e.json();R(t?.match??null)}}catch{}},1e4);return()=>clearInterval(e)},[U]),!e)return(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center py-32 gap-4",children:[(0,a.jsx)("span",{className:"text-[#64748B] text-lg",children:"Kh\xf4ng t\xecm thấy trận đấu"}),(0,a.jsx)("a",{href:"/",className:"text-[#4681E8] hover:underline text-sm",children:"← Quay lại"})]});let G=I?{...e,...I}:e,P=G?.has_live==="1"&&L.length>0,K=c(G.status_id,G.sport_id),V=$&&M&&!T&&!D,W=P&&(D||T&&K.live&&z.current<20),O=!P||T&&!W&&!D,q=!K.live&&"8"!==String(G.status_id)&&"9"!==String(G.status_id),{hm:X,full:Y}=x(G.time),Z=G.source_card_meta?.league_label||G.match_data?.competition_vi||G.match_data?.competition_full||"",Q=G.match_data?.stage_label||G.source_card_meta?.stage_label||"",J=G.home_logo||d(G.home_name),ee=G.away_logo||d(G.away_name),et=e=>t=>{t.target.src=d(e)};return(0,a.jsxs)("div",{className:"w-full bg-white min-h-screen text-slate-600 font-sans pb-16",children:[(0,a.jsx)("div",{className:"w-full border-b border-slate-200 bg-white",children:(0,a.jsxs)("div",{className:`${h} mx-auto px-4 py-3 flex items-center justify-between`,children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 text-[13px] font-bold",children:[(0,a.jsx)("span",{className:"text-[#4681E8] uppercase tracking-wide",children:Z}),Q&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"text-slate-300",children:"•"}),(0,a.jsx)("span",{className:"text-slate-600",children:Q})]})]}),(0,a.jsx)("div",{className:"text-[12px] font-mono text-slate-400 hidden sm:block",children:Y})]})}),(0,a.jsxs)("div",{className:`${h} mx-auto px-0 md:px-4 py-0 md:py-6 flex flex-col lg:flex-row gap-4 lg:gap-6`,children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0 flex flex-col gap-4 lg:gap-6",children:[(0,a.jsxs)("div",{className:"w-full relative bg-[#000000] rounded-none md:rounded-2xl overflow-hidden shadow-[0_10px_40px_rgba(0,0,0,0.5)] border-y md:border border-slate-200",children:[(0,a.jsx)("div",{className:"relative w-full aspect-video bg-[#000000] group z-10",children:V?(0,a.jsx)(n,{src:`/api/klivevip/proxy-stream?url=${encodeURIComponent(`https://live.inplyr.com/${M?.uid&&"default"!==M.uid?`room/${M.uid}`:`default/${G.id}`}.m3u8`)}`,autoPlay:!0,onError:()=>A(!0)}):O?(0,a.jsx)(o,{homeName:G.home_name,awayName:G.away_name,homeLogo:G.home_logo,awayLogo:G.away_logo,homeScore:K.sc?G.home_score:"0",awayScore:K.sc?G.away_score:"0",statusText:K.t,timeText:G.time_text||X,isLive:K.live,sportId:G.sport_id,matchId:G.ls_id||G.id,kickoffMs:1e3*Number(G?.time||0),isPreMatch:q}):(0,a.jsxs)("div",{className:"absolute inset-0 z-10 flex flex-col items-center justify-center p-4 lg:p-10",children:[(0,a.jsxs)("div",{className:"absolute inset-0 flex justify-between items-center opacity-[0.03] pointer-events-none px-4 lg:px-20 overflow-hidden",children:[(0,a.jsx)("img",{src:J,alt:"",className:"w-1/2 max-w-[400px] blur-[10px]",loading:"lazy",decoding:"async"}),(0,a.jsx)("img",{src:ee,alt:"",className:"w-1/2 max-w-[400px] blur-[10px]",loading:"lazy",decoding:"async"})]}),P&&!T&&(0,a.jsx)("button",{onClick:()=>F(!0),className:"group mb-4 sm:mb-8 w-16 h-16 md:w-20 md:h-20 rounded-full bg-[#4681E8] flex items-center justify-center hover:bg-[#55CAF1] transition-all shadow-[0_0_30px_rgba(70,129,232,0.5)] curs
72or-pointer z-20",children:(0,a.jsx)("svg",{className:"w-8 h-8 md:w-10 md:h-10 text-white ml-1.5 md:ml-2 group-hover:scale-110 transition-transform",viewBox:"0 0 24 24",fill:"currentColor",children:(0,a.jsx)("path",{d:"M8 5v14l11-7z"})})}),(0,a.jsxs)("div",{className:"grid grid-cols-[1fr_auto_1fr] items-center w-full max-w-[800px] gap-2 lg:gap-8 z-20",children:[(0,a.jsxs)("div",{className:"flex flex-col items-center gap-2 lg:gap-4",children:[(0,a.jsx)("img",{src:J,alt:G.home_name,className:"w-16 h-16 sm:w-24 sm:h-24 lg:w-32 lg:h-32 object-contain drop-shadow-[0_10px_20px_rgba(0,0,0,0.8)]",onError:et(G.home_name),loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-[#FFFFFF] text-xs sm:text-base lg:text-lg font-black text-center line-clamp-2 uppercase tracking-wide",children:G.home_name})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-2 lg:gap-3",children:[K.sc?(0,a.jsxs)("div",{className:"flex items-center gap-3 lg:gap-6 bg-white/90 backdrop-blur-md px-4 py-2 lg:px-8 lg:py-4 rounded-2xl border border-slate-200 shadow-2xl",children:[(0,a.jsx)("span",{className:"text-[#4681E8] text-[32px] sm:text-[48px] lg:text-[64px] font-black leading-none",children:G.home_score}),(0,a.jsx)("span",{className:"text-slate-300 text-[20px] lg:text-[28px] font-light",children:":"}),(0,a.jsx)("span",{className:"text-[#4681E8] text-[32px] sm:text-[48px] lg:text-[64px] font-black leading-none",children:G.away_score})]}):(0,a.jsx)("div",{className:"text-[#FFFFFF] text-[32px] sm:text-[48px] lg:text-[56px] font-black tracking-widest leading-none drop-shadow-xl",children:X}),(0,a.jsxs)("span",{className:`inline-flex items-center gap-2 rounded-full px-3 py-1 lg:px-5 lg:py-1.5 text-[10px] lg:text-[12px] font-bold tracking-widest uppercase ${K.live?"bg-[#4681E8] text-white shadow-[0_0_20px_rgba(70,129,232,0.6)]":"bg-white text-slate-600 border border-slate-200"}`,children:[K.live&&(0,a.jsx)("span",{className:"w-2 h-2 rounded-full bg-white animate-pulse"}),K.t,G.time_text?` : ${G.time_text}`:""]})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-2 lg:gap-4",children:[(0,a.jsx)("img",{src:ee,alt:G.away_name,className:"w-16 h-16 sm:w-24 sm:h-24 lg:w-32 lg:h-32 object-contain drop-shadow-[0_10px_20px_rgba(0,0,0,0.8)]",onError:et(G.away_name),loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-[#FFFFFF] text-xs sm:text-base lg:text-lg font-black text-center line-clamp-2 uppercase tracking-wide",children:G.away_name})]})]})]})}),L.length>0&&(0,a.jsxs)("div",{className:"w-full bg-white border-t border-slate-200 px-3 lg:px-6 py-2.5 lg:py-4 flex items-center gap-2 lg:gap-4 overflow-x-auto z-20",children:[(0,a.jsx)("span",{className:"text-[10px] lg:text-[11px] text-slate-600 uppercase font-bold tracking-widest shrink-0 mr-1 lg:mr-2",children:"CHỌN K\xcaNH TRUYỀN:"}),L.map((e,t)=>(0,a.jsxs)("button",{onClick:()=>{H(e),F(!0),A(!1)},className:`shrink-0 flex items-center gap-1.5 lg:gap-2 rounded-full px-3 py-1.5 lg:px-5 lg:py-2 text-[11px] lg:text-[13px] font-bold transition-all ${M?.uid===e.uid&&!T?"bg-[#4681E8]/10 border border-[#4681E8] text-[#4681E8] shadow-[0_0_15px_rgba(70,129,232,0.2)]":"bg-white border border-slate-200 text-slate-600 hover:text-[#4681E8] hover:border-[#4681E8]/50"}`,children:[(0,a.jsx)("span",{className:`w-1.5 h-1.5 lg:w-2 lg:h-2 rounded-full ${M?.uid===e.uid&&!T?"bg-[#4681E8] animate-pulse":"bg-transparent"}`}),"BLV ",e.nickName||`K\xeanh ${t+1}`]},e.uid||t))]})]}),(p=(()=>{let e=s?.stats;if(!e)return!1;let t=null;return Array.isArray(e)&&e.length>0?t=e[0]:e?.results?.[0]?t=e.results[0]:e?.stats_full_time&&(t=e),!!t&&!!(t.stats_full_time?.length>0||t.stats_haft_time?.length>0||t.stats_half_time?.length>0||t.stats?.length>0)})(),u=!!(s?.lineup&&(Array.isArray(s.lineup)?s.lineup.length>0:s.lineup.home||s.lineup.away)),g=!!(s?.events&&(Array.isArray(s.events)?s.events.length>0:s.events.incidents?.length>0||s.events.data?.length>0)),j=!!(r&&(Array.isArray(r)?r.length>0:r.data?.length>0)),(y=(v=[{id:"stats",label:"THỐNG K\xca",show:p},{id:"lineup",label:"ĐỘI H\xccNH",show:u},{id:"events",label:"DIỄN BIẾN",show:g},{id:"standings",label:"BẢNG XH",show:j},{id:"odds",label:"TỶ LỆ K\xc8O",show:!!(s?.odds&&Array.isArray(s.odds)&&s.odds.length>0)}].filter(e=>e.show)).find(e=>e.id===C)?C:v[0]?.id||"odds")!==C&&setTimeout(()=>S(y),0),v.length>0?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"bg-white rounded-2xl p-2 border border-slate-200 flex overflow-x-auto gap-2 shadow-[0_4px_15px_rgba(0,0,0,0.08)] mx-4 md:mx-0",children:v.map(({id:e,label:t})=>(0,a.jsx)("button",{onClick:()=>S(e),className:`flex-1 min-w-[100px] py-2.5 sm:py-3 text-[10px] sm:text-[12px] font-black uppercase tracking-widest rounded-xl transition-all ${y===e?"bg-[#4681E8]/10 text-[#4681E8] border border-[#4681E8]/30 shadow-inner":"text-slate-500 hover:text-[#4681E8] hover:bg-[#4681E8]/5 border border-transparent"}`,children:t},e))}),(0,a.jsxs)("div",{className:"bg-white rounded-2xl border border-slate-200 overflow-hidden shadow-[0_4px_15px_rgba(0,0,0,0.08)] min-h-[400px] mx-4 md:mx-0",children:["stats"===y&&(0,a.jsx)(b,{matchDetails:s}),"lineup"===y&&(0,a.jsx)(f,{matchDetails:s}),"events"===y&&(0,a.jsx)(_,{events:s?.events}),"standings"===y&&(0,a.jsx)(k,{standings:r}),"odds"===y&&(0,a.jsx)(E,{odds:s?.odds})]})]}):null),t.length>0&&(0,a.jsxs)("div",{className:"mt-4 mx-4 md:mx-0",children:[(0,a.jsxs)("h2",{className:"px-1 py-4 text-sm sm:text-base font-black text-slate-800 uppercase flex items-center gap-3 tracking-widest border-b border-slate-100 mb-4",children:[(0,a.jsx)("span",{className:"w-1 h-5 bg-[#4681E8] rounded-sm shadow-[0_0_8px_#4681E8]"}),"TRẬN ĐẤU C\xd9NG GIẢI"]}),(0,a.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3 sm:gap-4",children:t.slice(0,4).map(e=>(0,a.jsx)(w,{m:e},e.id))})]})]}),(0,a.jsx)("div",{className:"w-full lg:w-[350px] xl:w-[400px] shrink-0 px-4 md:px-0",children:(0,a.jsxs)("div",{className:"bg-white border border-slate-200 rounded-2xl overflow-hidden flex flex-col shadow-[0_10px_30px_rgba(0,0,0,0.1)] lg:sticky lg:top-8 h-[600px] lg:h-[c
72alc(100vh-100px)] lg:max-h-[850px]",children:[(0,a.jsxs)("div",{className:"px-5 py-4 border-b border-slate-200 flex items-center justify-between bg-white",children:[(0,a.jsxs)("h3",{className:"text-slate-800 text-sm font-black uppercase tracking-widest flex items-center gap-2",children:[(0,a.jsx)("span",{className:"w-2.5 h-2.5 rounded-full bg-[#4681E8] shadow-[0_0_10px_rgba(70,129,232,0.4)]"}),"PH\xd2NG CHAT"]}),(0,a.jsxs)("span",{className:"text-[10px] bg-white px-3 py-1.5 rounded-full text-[#4681E8] font-mono border border-[#4681E8]/30 shadow-inner tracking-widest flex items-center gap-1.5",children:[(0,a.jsx)("svg",{className:"w-3 h-3",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 10l4.553-2.276A1 1 0 0121 8.618v6.764a1 1 0 01-1.447.894L15 14M5 18h8a2 2 0 002-2V8a2 2 0 00-2-2H5a2 2 0 00-2 2v8a2 2 0 002 2z"})}),L.length," BLV"]})]}),(0,a.jsx)("div",{className:"flex-1 bg-[#FFFFFF]/40 min-h-0 chat-container-wrapper",children:(0,a.jsx)(N,{anchors:L,selectedAnchor:M})})]})})]})]})}let p={25:"KIỂM SO\xc1T B\xd3NG",24:"CHUYỀN CH\xcdNH X\xc1C",23:"TỔNG SỐ ĐƯỜNG CHUYỀN",22:"TẤN C\xd4NG",21:"T.C\xd4NG NGUY HIỂM",2:"S\xdaT TR\xdaNG Đ\xcdCH",37:"PHẠT G\xd3C",28:"N\xc9M BI\xcaN",8:"VIỆT VỊ",3:"THẺ V\xc0NG",4:"THẺ ĐỎ",5:"S\xdaT PENALTY",29:"PHẠM LỖI",26:"Đ\xc1NH ĐẦU",27:"CỨU THUA",1:"B\xc0N THẮNG",7:"PHẢN LƯỚI"},u=[25,21,22,24,2,23,4,3,37,28,8,5,29],g="https://cdn.sportdb.live/upload/team/";function b({matchDetails:e}){let[t,s]=(0,l.useState)("full"),r=e?.stats,n=e?.lineup,i=n?.match?.home_team,o=n?.match?.away_team,c=null;Array.isArray(r)&&r.length>0?c=r[0]:r?.results?.[0]?c=r.results[0]:r?.stats_full_time&&(c=r);let d={full:c?.stats_full_time||[],h1:c?.stats_haft_time||c?.stats_half_time||[],h2:c?.stats_haft_time_2nd_half||[]}[t]||[];if(!c||0===d.length)return(0,a.jsx)(j,{text:"Thống k\xea sẽ được cập nhật khi trận đấu bắt đầu"});let x=[...d].sort((e,t)=>{let s=u.indexOf(e.type),a=u.indexOf(t.type);return(-1===s?999:s)-(-1===a?999:a)});return(0,a.jsxs)("div",{className:"flex flex-col",children:[(i||o)&&(0,a.jsxs)("div",{className:"flex items-center justify-between px-4 py-3 border-b border-slate-100",children:[(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5 w-20",children:[i?.logo&&(0,a.jsx)("img",{src:g+i.logo,alt:i?.name||"Home team",className:"w-8 h-8 object-contain",onError:e=>e.target.style.display="none",loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-slate-600 text-[10px] font-medium text-center leading-tight",children:i?.name||""})]}),(0,a.jsx)("div",{className:"flex gap-1",children:[{k:"h1",l:"Hiệp 1"},{k:"h2",l:"Hiệp 2"},{k:"full",l:"Cả trận"}].map(({k:e,l})=>(0,a.jsx)("button",{onClick:()=>s(e),className:`px-2.5 py-1 text-[10px] font-bold rounded transition-all ${t===e?"bg-[#E11D48] text-white":"text-slate-400 hover:text-slate-600 bg-slate-100"}`,children:l},e))}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5 w-20",children:[o?.logo&&(0,a.jsx)("img",{src:g+o.logo,alt:o?.name||"Away team",className:"w-8 h-8 object-contain",onError:e=>e.target.style.display="none",loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-slate-600 text-[10px] font-medium text-center leading-tight",children:o?.name||""})]})]}),(0,a.jsx)("div",{className:"px-4 py-3 space-y-3",children:x.map(e=>{let t=p[e.type]||`Stat ${e.type}`,s=e.home,l=e.away,r=24===e.type||25===e.type,n=s+l,i=0===n?50:s/n*100,o=s>l,c=l>s;return(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"flex justify-between items-center mb-1.5",children:[(0,a.jsxs)("span",{className:`text-xs font-bold w-10 tabular-nums ${o?"text-slate-800":"text-slate-400"}`,children:[s,r?"%":""]}),(0,a.jsx)("span",{className:"text-slate-400 text-[10px] font-semibold tracking-wide uppercase",children:t}),(0,a.jsxs)("span",{className:`text-xs font-bold w-10 text-right tabular-nums ${c?"text-slate-800":"text-slate-400"}`,children:[l,r?"%":""]})]}),(0,a.jsxs)("div",{className:"flex gap-0.5 h-[5px]",children:[(0,a.jsx)("div",{className:"flex-1 rounded-l-full bg-white/[0.06] overflow-hidden flex justify-end",children:(0,a.jsx)("div",{className:`rounded-l-full transition-all duration-500 ${o?"bg-gradient-to-r from-[#E11D48]/60 to-[#E11D48]":"bg-gradient-to-r from-white/10 to-white/20"}`,style:{width:`${i}%`}})}),(0,a.jsx)("div",{className:"flex-1 rounded-r-full bg-white/[0.06] overflow-hidden",children:(0,a.jsx)("div",{className:`rounded-r-full transition-all duration-500 ${c?"bg-gradient-to-l from-[#E11D48]/60 to-[#E11D48]":"bg-gradient-to-l from-white/10 to-white/20"}`,style:{width:`${100-i}%`}})})]})]},e.type)})})]})}
72function f({matchDetails:e}){let[t,s]=(0,l.useState)("pitch"),r=e?.lineup,n=r?.lineup||r,i=n?.home||[],o=n?.away||[],c=r?.home_formation||"",d=r?.away_formation||"",x=r?.match?.home_team,h=r?.match?.away_team;if(0===i.length&&0===o.length)return(0,a.jsx)(j,{text:"Đội h\xecnh sẽ được c\xf4ng bố trước trận đấu 30 ph\xfat"});let m=e=>e.filter(e=>1===e.first),p=e=>e.filter(e=>1!==e.first),u=m(i),g=m(o),b=p(i),w=p(o);return(0,a.jsxs)("div",{className:"flex flex-col",children:[(0,a.jsxs)("div",{className:"flex items-center justify-center gap-1 px-3 py-2 border-b border-slate-100",children:[(0,a.jsx)("button",{onClick:()=>s("pitch"),className:`px-3 py-1.5 text-[10px] font-bold rounded transition-all ${"pitch"===t?"bg-[#E11D48] text-white":"text-slate-400 bg-slate-100"}`,children:"Đội h\xecnh xuất ph\xe1t"}),(0,a.jsx)("button",{onClick:()=>s("list"),className:`px-3 py-1.5 text-[10px] font-bold rounded transition-all ${"list"===t?"bg-[#E11D48] text-white":"text-slate-400 bg-slate-100"}`,children:"Đội h\xecnh dá»± bị"})]}),"pitch"===t?(0,a.jsx)("div",{className:"relative w-full",style:{aspectRatio:"68/105"},children:(0,a.jsxs)("div",{className:"absolute inset-0 bg-gradient-to-b from-[#1a5c2a] via-[#1e6b31] to-[#1a5c2a] rounded-2xl overflow-hidden",children:[(0,a.jsxs)("div",{className:"absolute inset-[3%] border border-white/20 rounded-lg",children:[(0,a.jsx)("div",{className:"absolute left-0 right-0 top-1/2 h-px bg-white/20"}),(0,a.jsx)("div",{className:"absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 w-[22%] aspect-square rounded-full border border-white/20"}),(0,a.jsx)("div",{className:"absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 w-1.5 h-1.5 bg-white/30 rounded-full"}),(0,a.jsx)("div",{className:"absolute top-0 left-1/2 -translate-x-1/2 w-[55%] h-[16%] border-l border-r border-white/20"}),(0,a.jsx)("div",{className:"absolute top-0 left-1/2 -translate-x-1/2 w-[25%] h-[6%] border-l border-r border-white/20"}),(0,a.jsx)("div",{className:"absolute bottom-0 left-1/2 -translate-x-1/2 w-[55%] h-[16%] border-t border-l border-r border-white/20"}),(0,a.jsx)("div",{className:"absolute bottom-0 left-1/2 -translate-x-1/2 w-[25%] h-[6%] border-t border-l border-r border-white/20"})]}),(0,a.jsx)("div",{className:"absolute top-1 left-2 text-[9px] text-[#F8FAFC]/50 font-bold z-10",children:x?.name||""}),(0,a.jsx)("div",{className:"absolute top-1 right-2 text-[9px] text-[#E11D48]/70 font-bold z-10",children:c}),(0,a.jsx)("div",{className:"absolute bottom-1 left-2 text-[9px] text-[#F8FAFC]/50 font-bold z-10",children:h?.name||""}),(0,a.jsx)("div",{className:"absolute bottom-1 right-2 text-[9px] text-[#E11D48]/70 font-bold z-10",children:d}),u.map((e,t)=>{let s=`${e.x||50}%`,l=`${(e.y||10)/2}%`,r="G"===e.position;return(0,a.jsxs)("div",{className:"absolute flex flex-col items-center z-10 -translate-x-1/2 -translate-y-1/2",style:{left:s,top:l},children:[(0,a.jsx)("div",{className:`w-6 h-6 rounded-full flex items-center justify-center text-[9px] font-black ${r?"bg-yellow-400 text-black":"bg-blue-600 text-[#F8FAFC]"} shadow-md border border-white/20`,children:e.shirt_number||""}),(0,a.jsx)("span",{className:"text-[7px] text-[#F8FAFC] font-semibold mt-0.5 text-center max-w-[48px] truncate drop-shadow-[0_1px_2px_rgba(0,0,0,0.8)]",children:(e.name||"").split(" ").slice(-2).join(" ")}),1===e.captain&&(0,a.jsx)("span",{className:"absolute -top-1 -right-1 text-[6px] text-yellow-400",children:"C"})]},`h-${t}`)}),g.map((e,t)=>{let s=`${100-(e.x||50)}%`,l=`${100-(e.y||10)/2}%`,r="G"===e.position;return(0,a.jsxs)("div",{className:"absolute flex flex-col items-center z-10 -translate-x-1/2 -translate-y-1/2",style:{left:s,top:l},children:[(0,a.jsx)("div",{className:`w-6 h-6 rounded-full flex items-center justify-center text-[9px] font-black ${r?"bg-yellow-400 text-black":"bg-orange-500 text-[#F8FAFC]"} shadow-md border border-white/20`,children:e.shirt_number||""}),(0,a.jsx)("span",{className:"text-[7px] text-[#F8FAFC] font-semibold mt-0.5 text-center max-w-[48px] truncate drop-shadow-[0_1px_2px_rgba(0,0,0,0.8)]",children:(e.name||"").split(" ").slice(-2).join(" ")}),1===e.captain&&(0,a.jsx)("span",{className:"absolute -top-1 -right-1 text-[6px] text-yellow-400",children:"C"})]},`a-${t}`)})]})}):(0,a.jsxs)("div",{className:"px-3 py-2 text-xs",children:[(0,a.jsxs)("div",{className:"flex justify-between font-bold text-slate-400 mb-1 uppercase tracking-wider text-[9px] px-1",children:[(0,a.jsx)("span",{children:"Đội chá»
72§ nh\xe0"}),(0,a.jsx)("span",{children:"Đội kh\xe1ch"})]}),Array.from({length:Math.max(b.length,w.length)}).map((e,t)=>{let s=b[t],l=w[t];return(0,a.jsxs)("div",{className:"flex justify-between items-center border-b border-slate-50 py-1.5",children:[(0,a.jsx)("div",{className:"flex items-center gap-1.5 w-1/2 min-w-0",children:s&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"text-[#E11D48] font-bold w-5 text-center shrink-0 text-[10px]",children:s.shirt_number||""}),(0,a.jsx)("span",{className:"text-slate-700 truncate text-[11px]",children:s.name||""})]})}),(0,a.jsx)("div",{className:"flex items-center gap-1.5 w-1/2 justify-end min-w-0",children:l&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"text-slate-700 truncate text-[11px] text-right",children:l.name||""}),(0,a.jsx)("span",{className:"text-[#E11D48] font-bold w-5 text-center shrink-0 text-[10px]",children:l.shirt_number||""})]})})]},t)})]})]})}function j({text:e}){return(0,a.jsx)("div",{className:"flex items-center justify-center py-10 text-slate-400 text-sm text-center",children:e})}function w({m:e}){let t=c(e.status_id,e.sport_id),{hm:s,dm:l}=x(e.time),r=e.source_card_meta?.league_label||e.match_data?.competition_vi||"";return(0,a.jsxs)("a",{href:`/match/${encodeURIComponent(e.post_name||e.id)}`,className:"flex items-center gap-3 rounded-2xl bg-white hover:bg-slate-50 border border-slate-100 hover:border-[#4681E8]/30 p-3 transition-all group",children:[(0,a.jsxs)("div",{className:"shrink-0 w-14 text-center",children:[(0,a.jsx)("div",{className:"text-[#E11D48] text-[11px] font-bold",children:s}),(0,a.jsx)("div",{className:"text-slate-400 text-[9px]",children:l})]}),(0,a.jsx)("div",{className:"w-px h-9 bg-slate-200 shrink-0"}),(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("div",{className:"text-slate-400 text-[9px] truncate mb-1",children:r}),(0,a.jsxs)("div",{className:"flex items-center gap-2 mb-0.5",children:[(0,a.jsx)("img",{src:e.home_logo||d(e.home_name),alt:e.home_name,className:"w-4 h-4 object-contain shrink-0",onError:t=>t.target.src=d(e.home_name),loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-slate-600 text-[12px] font-medium truncate",children:e.home_name})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("img",{src:e.away_logo||d(e.away_name),alt:e.away_name,className:"w-4 h-4 object-contain shrink-0",onError:t=>t.target.src=d(e.away_name),loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-slate-600 text-[12px] font-medium truncate",children:e.away_name})]})]}),t.sc?(0,a.jsxs)("span",{className:"text-slate-800 font-bold text-[14px] tabular-nums shrink-0",children:[e.home_score,"-",e.away_score]}):(0,a.jsx)("span",{className:"text-[10px] font-bold text-[#E11D48] bg-[#E11D48]/10 rounded px-2.5 py-1 group-hover:bg-[#E11D48]/15 transition shrink-0",children:"XEM NGAY"})]})}let v={0:{bg:"bg-white/10",text:"text-[#F8FAFC]/40",nameCls:"text-[#94A3B8]"},1:{bg:"bg-white/10",text:"text-[#F8FAFC]/50",nameCls:"text-[#94A3B8]"},2:{bg:"bg-green-900/50",text:"text-green-400",nameCls:"text-green-400"},3:{bg:"bg-yellow-900/40",text:"text-yellow-400",nameCls:"text-emerald-600 font-bold"},4:{bg:"bg-blue-900/40",text:"text-blue-400",nameCls:"text-blue-400 font-bold"},5:{bg:"bg-red-900/40",text:"text-red-400",nameCls:"text-red-400 font-bold"}};function N({anchors:e,selectedAnchor:t}){let[s,r]=(0,l.useState)([]),[n,i]=(0,l.useState)(!1),o=(0,l.useRef)(null),c=(0,l.useRef)(null),d=t?.roomNum;return(0,l.useEffect)(()=>{if(!d)return;r([]),i(!1);let e=new EventSource(`/api/chat/${d}`);return e.onopen=()=>i(!0),e.onmessage=e=>{try{let t=JSON.parse(e.data);if("connected"===t.type)return void i(!0);if("history"===t.type&&Array.isArray(t.messages))return void r(e=>[...t.messages,...e].slice(-200));t.user&&t.text&&r(e=>[...e,t].slice(-200))}catch{}},e.onerror=()=>i(!1),()=>{e.close(),i(!1)}},[d]),(0,l.useEffect)(()=>{requestAnimationFrame(()=>{let e=c.current;e&&(e.scrollTop=e.scrollHeight)})},[s.length]),(0,a.jsxs)("div",{className:"flex flex-col h-full bg-[#0F0F23]",children:[(0,a.jsxs)("div",{ref:c,className:"flex-1 min-h-0 px-3 py-2 flex flex-col gap-[3px] overflow-y-auto",style:{scrollbarWidth:"thin",scrollbarColor:"#444 transparent"},children:[(0,a.jsx)("div",{className:"text-center text-[10px] text-[#F8FAFC]/30 bg-slate-50/60 py-1.5 rounded-xl mb-1 sticky top-0 z-10 backdrop-blur-sm",children:n?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"inline-block h-1.5 w-1.5 rounded-full bg-green-400 animate-pulse mr-1"}),"Đang kết nối ph\xf2ng chat trá»±c tiếp"]}):d?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"inline-block h-1.5 w-1.5 rounded-full bg-yellow-400 animate-pulse mr-1"}),"Đang kết nối..."]}
72):"Ch\xe0o mừng bạn đến với ph\xf2ng chat"}),0===s.length&&n&&(0,a.jsx)("div",{className:"text-center text-[10px] text-[#F8FAFC]/20 py-4",children:"Chờ tin nhắn mới..."}),s.map((e,t)=>{var s;let l=(s=e.level)>=5?v[5]:v[s]||v[0];return 2===e.type||e.text?.includes("v\xe0o ph\xf2ng tr\xf2 chuyện")?(0,a.jsxs)("div",{className:"flex items-start gap-1.5 text-[11px] leading-relaxed py-[1px] opacity-60",children:[(0,a.jsx)("span",{className:"text-green-500/70 font-medium",children:"Hi"}),(0,a.jsxs)("span",{className:`shrink-0 inline-flex items-center px-1 py-[0.5px] rounded text-[8px] font-bold ${l.bg} ${l.text}`,children:["Lv",e.level]}),(0,a.jsxs)("span",{className:`font-bold ${l.nameCls}`,children:[e.user,":"]}),(0,a.jsx)("span",{className:"text-[#F8FAFC]/40",children:e.text})]},`${e.ts}-${t}`):(0,a.jsxs)("div",{className:"flex items-start gap-1.5 text-[11px] leading-relaxed py-[1px]",children:[(0,a.jsxs)("span",{className:`shrink-0 inline-flex items-center px-1 py-[0.5px] rounded text-[8px] font-bold ${l.bg} ${l.text}`,children:["Lv.",e.level]}),(0,a.jsxs)("span",{className:`font-bold shrink-0 ${l.nameCls}`,children:[e.user,":"]}),(0,a.jsx)("span",{className:"text-[#F8FAFC]/80 break-words min-w-0",children:e.text})]},`${e.ts}-${t}`)}),(0,a.jsx)("div",{ref:o})]}),(0,a.jsxs)("div",{className:"shrink-0 px-3 py-2 bg-[#0F0F23] border-t border-white/[0.04] space-y-2",children:[(0,a.jsx)("div",{className:"flex items-center justify-center gap-3 text-[#F8FAFC]/20 text-[10px]",children:(0,a.jsx)("span",{className:"flex items-center gap-1",children:(0,a.jsx)("svg",{className:"w-3 h-3",viewBox:"0 0 24 24",fill:"currentColor",children:(0,a.jsx)("path",{d:"M12 4.5C7 4.5 2.7 7.6 1 12c1.7 4.4 6 7.5 11 7.5s9.3-3.1 11-7.5c-1.7-4.4-6-7.5-11-7.5zm0 12.5c-2.8 0-5-2.2-5-5s2.2-5 5-5 5 2.2 5 5-2.2 5-5 5zm0-8c-1.7 0-3 1.3-3 3s1.3 3 3 3 3-1.3 3-3-1.3-3-3-3z"})})})}),(0,a.jsxs)("div",{className:"flex bg-[#0F0F23] rounded-2xl overflow-hidden border border-white/[0.08]",children:[(0,a.jsx)("input",{type:"text",placeholder:"Đăng nhập để c\xf9ng chat nh\xe9",disabled:!0,className:"flex-1 bg-transparent px-3 py-2 text-[11px] text-[#F8FAFC] outline-none placeholder:text-[#F8FAFC]/30 disabled:opacity-50"}),(0,a.jsx)("button",{disabled:!0,className:"px-4 text-[11px] font-bold bg-[#E11D48] text-black disabled:bg-white/10 disabled:text-[#F8FAFC]/20 transition-colors",children:"Gửi"})]})]})]})}let y={1:{icon:"⚽",label:"B\xe0n thắng",color:"text-green-400"},2:{icon:"\uD83C\uDD7F️",label:"Phạt đền",color:"text-green-400"},3:{icon:"\uD83D\uDFE1",label:"Thẻ v\xe0ng",color:"text-yellow-400"},4:{icon:"\uD83D\uDFE1\uD83D\uDFE1",label:"Thẻ v\xe0ng 2",color:"text-emerald-600"},5:{icon:"\uD83D\uDD34",label:"Thẻ đỏ",color:"text-red-500"},7:{icon:"\uD83D\uDD04",label:"Phản lưới",color:"text-orange-400"},8:{icon:"\uD83C\uDFE5",label:"Chấn thương",color:"text-[#94A3B8]"},9:{icon:"\uD83D\uDD04",label:"Thay người",color:"text-blue-400"},11:{icon:"⏱️",label:"Hiệp 2",color:"text-[#F8FAFC]/40"},15:{icon:"\uD83E\uDD45",label:"Pen trượt",color:"text-red-400"},19:{icon:"⏱️",label:"Kết th\xfac hiệp",color:"text-[#F8FAFC]/30"},21:{icon:"\uD83C\uDFC6",label:"VAR",color:"text-purple-400"}};function _({events:e}){let t=e?.incidents||e?.events||[];return t&&0!==t.length?(0,a.jsx)("div",{className:"flex flex-col",children:t.map((e,t)=>{let s=y[e.type]||{icon:"•",label:`Event ${e.type}`,color:"text-[#F8FAFC]/50"},l=1===e.position,r=2===e.position,n=e.add_time?`+${e.add_time}`:"",i=`${e.time}'${n}`;return l||r||11!==e.type&&19!==e.type?9===e.type?(0,a.jsxs)("div",{className:`flex items-center gap-2 border-b border-slate-50 p-3 text-xs ${l?"":"flex-row-reverse"}`,children:[(0,a.jsx)("span",{className:"text-slate-400 w-10 text-center shrink-0 text-[10px]",children:i}),(0,a.jsxs)("div",{className:`flex-1 flex flex-col gap-0.5 ${l?"items-start":"items-end"}`,children:[(0,a.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,a.jsx)("span",{className:"text-green-400 text-[10px]",children:"▲"}),(0,a.jsx)("span",{className:"text-[#F8FAFC]/80 text-[11px]",children:e.in_player_name||""})]}),(0,a.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,a.jsx)("span",{className:"text-red-400 text-[10px]",children:"▼"}),(0,a.jsx)("span",{className:"text-[#F8FAFC]/40 text-[11px]",children:e.out_player_name||""})]})]})]},t):(0,a.jsxs)("div",{className:`flex items-center gap-2 border-b border-slate-50 p-3 text-xs ${l?"":"flex-row-reverse"}`,children:[(0,a.jsx)("span",{className:"text-slate-400 w-10 text-center shrink-0 text-[10px]",children:i}),(0,a.jsx)("span",{className:`shrink-0 text-sm ${s.color}`,children:s.icon}),(0,a.jsxs)("div",{className:`flex-1 min-w-0 ${l?"text-left":"text-right"}`,children:[(0,a.jsx)("span",{className:"text-slate-700 text-[11px]",children:e.player_name||""}),e.assist1_name&&(0,a.jsxs)("span",{className:"text-slate-400 text-[10px] ml-1",children:["(kiến tạo: ",e.assist1_name,")"]}),1===e.type&&void 0!==e.home_score&&(0,a.jsxs)("span",{className:"text-[#E11D48] font-bold text-[11px] ml-2",children:[e.home_score," - ",e.away_score]})]})]},t):(0,a.jsx)("div",{className:"flex items-center justify-center py-2 border-b border-slate-50 bg-slate-50",children:(0,a.jsxs)("span",{className:"text-slate-400 text-[10px] uppercase tracking-wider",children:[s.icon," ",s.label," — ",i]})},t)})}):(0,a.jsx)(j,{text:"Diễn biến trận đấu sẽ được cập nhật trực tiếp tại đ\xe2y"})}function k({standings:e}
72){return e&&e.teams&&0!==e.teams.length?(0,a.jsxs)("div",{className:"w-full text-[10px]",children:[(0,a.jsxs)("div",{className:"grid grid-cols-[20px_1fr_24px_24px_32px] bg-slate-50 p-2 text-slate-400 uppercase font-bold sticky top-0",children:[(0,a.jsx)("span",{className:"text-center",children:"#"}),(0,a.jsx)("span",{children:"Team"}),(0,a.jsx)("span",{className:"text-center",children:"T"}),(0,a.jsx)("span",{className:"text-center",children:"B"}),(0,a.jsx)("span",{className:"text-center whitespace-nowrap",children:"Đ"})]}),e.teams.slice(0,15).map((e,t)=>{let s=!!e.data,l=s?parseFloat(e.data[0]):e.rank||t+1,r=s?e.data[1]:e.target_name,n=s?e.data[7]:e.points,i=s?e.data[3]:e.won,o=s?e.data[5]:e.loss;return(0,a.jsxs)("div",{className:"grid grid-cols-[20px_1fr_24px_24px_32px] items-center p-2 border-b border-slate-50 hover:bg-slate-50 transition-colors",children:[(0,a.jsx)("span",{className:"text-center text-slate-500",children:l}),(0,a.jsxs)("div",{className:"flex items-center gap-1.5 min-w-0 pr-2",children:[e.team_logo&&(0,a.jsx)("img",{src:e.team_logo,className:"w-3.5 h-3.5 object-contain",alt:r||"Team logo",loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-slate-700 font-medium truncate",children:r})]}),(0,a.jsx)("span",{className:"text-center text-slate-500",children:i}),(0,a.jsx)("span",{className:"text-center text-slate-500",children:o}),(0,a.jsx)("span",{className:"text-center text-[#E11D48] font-bold",children:n})]},r)})]}):(0,a.jsx)(j,{text:"Bảng xếp hạng sẽ được cập nhật"})}function E({odds:e}){let t=Array.isArray(e)?e:[],s=["2","4","3","16"];function l(e){for(let a of s){let s=t.find(t=>t.odds_type===e&&String(t.company_id)===a);if(s?.odds_info?.length)return s}return t.find(t=>t.odds_type===e&&t.odds_info?.length>0)}function r(e,t){let s=e?.odds_info;if(!s?.length)return["-","-","-"];let a="opening"===t?s.length-1:0;if(!s?.length||!s[a])return["-","-","-"];let l=s[a][2];if("string"!=typeof l)return["-","-","-"];let r=l.split(",");return[r[0]||"-",r[1]||"-",r[2]||"-"]}let n=l("asia"),i=l("eu"),o=l("bs"),c=l("cr"),d=r(n,"opening"),x=r(n,"latest"),h=r(i,"opening"),m=r(i,"latest"),p=r(o,"opening"),u=r(o,"latest"),g=r(c,"opening"),b=r(c,"latest"),f=({children:e})=>(0,a.jsx)("th",{className:"px-2 py-2 text-[9px] sm:text-[10px] font-bold uppercase tracking-wider text-slate-500 border-b border-slate-100 text-center",children:e}),j=({children:e,color:t})=>(0,a.jsx)("td",{className:`px-2 py-2.5 text-center text-[11px] sm:text-xs font-bold ${t||"text-slate-600"} border-b border-slate-50`,children:e});return(0,a.jsxs)("div",{className:"overflow-x-auto",children:[(0,a.jsxs)("table",{className:"w-full min-w-[600px]",children:[(0,a.jsxs)("thead",{children:[(0,a.jsxs)("tr",{className:"bg-slate-50",children:[(0,a.jsx)("th",{className:"px-4 py-2 text-left border-b border-slate-100",rowSpan:2,children:(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("div",{className:"w-7 h-7 rounded bg-gradient-to-br from-[#1d4ed8] to-[#3b82f6] flex items-center justify-center text-white text-[9px] font-black shadow-sm",children:"B"}),(0,a.jsx)("span",{className:"text-slate-600 text-[11px] font-bold tracking-wider",children:"SPORT"})]})}),(0,a.jsx)("th",{colSpan:3,className:"px-1 py-1.5 text-center text-[9px] sm:text-[10px] font-bold uppercase tracking-wider text-[#4681E8] border-b border-l border-slate-100",children:"CƯỢC CH\xc2U \xc1"}),(0,a.jsx)("th",{colSpan:3,className:"px-1 py-1.5 text-center text-[9px] sm:text-[10px] font-bold uppercase tracking-wider text-[#4681E8] border-b border-l border-slate-100",children:"CƯỢC CH\xc2U \xc2U"}),(0,a.jsx)("th",{colSpan:3,className:"px-1 py-1.5 text-center text-[9px] sm:text-[10px] font-bold uppercase tracking-wider text-[#4681E8] border-b border-l border-slate-100",children:"T\xc0I XỈU"}),(0,a.jsx)("th",{colSpan:3,className:"px-1 py-1.5 text-center text-[9px] sm:text-[10px] font-bold uppercase tracking-wider text-[#4681E8] border-b border-l border-slate-100",children:"K\xc8O G\xd3C"})]}),(0,a.jsxs)("tr",{className:"bg-slate-50",children:[(0,a.jsx)(f,{children:"CHỦ"}),(0,a.jsx)(f,{children:"CHẤP"}),(0,a.jsx)(f,{children:"KH\xc1CH"}),(0,a.jsx)(f,{children:"CHỦ"}),(0,a.jsx)(f,{children:"H\xd2A"}),(0,a.jsx)(f,{children:"KH\xc1CH"}),(0,a.jsx)(f,{children:"T\xc0I"}),(0,a.jsx)(f,{children:"TỶ LỆ"}),(0,a.jsx)(f,{children:"XỈU"}),(0,a.jsx)(f,{children:"T\xc0I"}),(0,a.jsx)(f,{children:"TỶ LỆ"}),(0,a.jsx)(f,{children:"XỈU"})]})]}),(0,a.jsxs)("tbody",{children:[(0,a.jsxs)("tr",{className:"hover:bg-slate-50 transition-colors",children:[(0,a.jsx)("td",{className:"px-4 py-2.5 text-[11px] sm:text-xs text-slate-500 font-medium border-b border-slate-50",children:"Tỷ Lệ Mở Cược"}),(0,a.jsx)(j,{children:d[0]}),(0,a.jsx)(j,{color:"text-red-400",children:d[1]}),(0,a.jsx)(j,{children:d[2]}),(0,a.jsx)(j,{children:h[0]}),(0,a.jsx)(j,{children:h[1]}),(0,a.jsx)(j,{children:h[2]}),(0,a.jsx)(j,{children:p[0]}),(0,a.jsx)(j,{children:p[1]}),(0,a.jsx)(j,{children:p[2]}),(0,a.jsx)(j,{children:g[0]}),(0,a.jsx)(j,{children:g[1]}),(0,a.jsx)(j,{children:g[2]})]}),(0,a.jsxs)("tr",{className:"hover:bg-slate-50 transition-colors",children:[(0,a.jsx)("td",{className:"px-4 py-2.5 text-[11px] sm:text-xs text-slate-500 font-medium border-b border-slate-50",children:"Tỷ Lệ Trước Trận"}),(0,a.jsx)(j,{children:x[0]}),(0,a.jsx)(j,{color:"text-red-400",children:x[1]}),(0,a.jsx)(j,{children:x[2]}),(0,a.jsx)(j,{children:m[0]}),(0,a.jsx)(j,{children:m[1]}),(0,a.jsx)(j,{children:m[2]}),(0,a.jsx)(j,{children:u[0]}),(0,a.jsx)(j,{children:u[1]}),(0,a.jsx)(j,{children:u[2]}),(0,a.jsx)(j,{children:b[0]}),(0,a.jsx)(j,{children:b[1]}),(0,a.jsx)(j,{children:b[2]})]}),(0,a.jsxs)("tr",{className:"hover:bg-slate-50 transition-colors bg-white",children:[(0,a.jsxs)("td",{className:"px-4 py-2.5 text-[11px] sm:text-xs text-slate-700 font-bold flex items-center gap-1.5 border-b border-slate-50",children:["Live ",(0,a.jsx)("span",{className:"w-1.5 h-1.5 rounded-full bg-red-500 animate-pulse"})]}),(0,a.jsx)(j,{color:"text-green-400",children:x[0]}),(0,a.jsx)(j,{color:"text-red-400",children:x[1]}),(0,a.jsx)(j,{color:"text-green-400",children:x[2]}),(0,a.jsx)(j,{color:"text-green-400",children:m[0]}),(0,a.jsx)(j,{color:"text-green-400",children:m[1]}),(0,a.jsx)(j,{color:"text-green-400",children:m[2]}),(0,a.jsx)(j,{color:"text-green-400",children:u[0]}),(0,a.jsx)(j,{children:u[1]}),(0,a.jsx)(j,{color:"text-green-400",children:u[2]}),(0,a.jsx)(j,{color:"text-green-400",children:b[0]}),(0,a.jsx)(j,{children:b[1]}),(0,a.jsx)(j,{color:"text-green-400",children:b[2]})]})]})]}),(0,a.jsx)("p",{className:"text-center text-slate-400 text-[10px] py-2.5 border-t border-slate-100",children:"Tỷ lệ k\xe8o sẽ được cập nhật gần giờ thi đấu"})]})}},10122:()=>{},10231:(e,t,s)=>{"use strict";s.d(t,{Klivevip17MatchDetailPage:()=>m});var a=s(68019),l=s(10707),r=s(58420);function n({src:e,poster:t,autoPlay:s=!0,onError:i,className:o=""}){let c=(0,l.useRef)(null),d=(0,l.useRef)(i);d.current=i;let[x,h]=(0,l.useState)(!1),[m,p]=(0,l.useState)(!1);return((0,l.useEffect)(()=>{let t=c.current;if(!t)return;let a=null;h(!1);let l=()=>p(!0),n=()=>p(!1);t.addEventListener("play",l),t.addEventListener("pause",n);let i=()=>{s&&(t.muted=!0,t.play().catch(()=>{}))};if(t.addEventListener("canplay",i),r.Ay.isSupported()){(a=new r.Ay({maxBufferLength:30,maxMaxBufferLength:60,lowLatencyMode:!0,enableWorker:!0})).loadSource(e),a.attachMedia(t),a.on(r.Ay.Events.MANIFEST_PARSED,()=>{s&&(t.muted=!0,t.play().catch(e=>{console.warn("AutoPlay failed:",e),t.muted=!1}))});let l=0,n=0;a.on(r.Ay.Events.ERROR,(e,t)=>
72{if(t.type===r.Ay.ErrorTypes.NETWORK_ERROR&&(++l>2||t.response&&t.response.code>=400)){console.error("HLS Network Error threshold reached (CORS/404), triggering fallback.",t),h(!0),d.current&&d.current(t),a?.destroy();return}if(t.fatal)switch(t.type){case r.Ay.ErrorTypes.NETWORK_ERROR:console.error("HLS Fatal Network Error, recovering...",t),a?.startLoad();break;case r.Ay.ErrorTypes.MEDIA_ERROR:console.error("HLS Media Error, recovering...",t),++n>3?(console.error("HLS Media Error threshold reached, triggering fallback."),h(!0),d.current&&d.current(t),a?.destroy()):a?.recoverMediaError();break;default:console.error("HLS Fatal Error:",t),h(!0),d.current&&d.current(t),a?.destroy()}})}else t.canPlayType("application/vnd.apple.mpegurl")&&(t.src=e,t.addEventListener("loadedmetadata",()=>{s&&t.play().catch(e=>{console.warn("AutoPlay failed:",e)})}),t.addEventListener("error",e=>{h(!0),d.current&&d.current(e)}));return()=>{t.removeEventListener("play",l),t.removeEventListener("pause",n),t.removeEventListener("canplay",i),a&&a.destroy()}},[e,s]),x)?i?null:(0,a.jsxs)("div",{className:`w-full h-full flex flex-col items-center justify-center bg-white/80 backdrop-blur ${o}`,children:[(0,a.jsx)("svg",{className:"w-12 h-12 text-red-500 mb-4 opacity-80",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"})}),(0,a.jsx)("div",{className:"text-slate-600 text-sm font-medium",children:"Video/Stream kh\xf4ng khả dụng hoặc bị lỗi mạng"}),(0,a.jsx)("div",{className:"text-gray-500 text-xs mt-1",children:"Vui l\xf2ng thử lại sau hoặc chọn nguồn kh\xe1c"})]}):(0,a.jsx)("div",{className:`relative group w-full h-full bg-white flex items-center justify-center overflow-hidden ${o}`,children:(0,a.jsx)("video",{ref:c,className:"w-full h-full object-contain",controls:!0,playsInline:!0,muted:s,poster:t,referrerPolicy:"no-referrer"})})}function i(e){let t=(e||"").split(/[\s-]+/).slice(0,2).map(e=>e[0]||"").join("").toUpperCase()||"??";return`data:image/svg+xml,${encodeURIComponent(`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 80 80"><rect width="80" height="80" rx="20" fill="#1a1c25"/><text x="40" y="47" font-size="20" font-family="Arial" font-weight="700" text-anchor="middle" fill="#666">${t}</text></svg>`)}`}function o({homeName:e,awayName:t,homeLogo:s,awayLogo:l,homeScore:r="0",awayScore:n="0",statusText:c="LIVE",timeText:d="",isLive:x=!0,sportId:h="1",matchId:m}){let p=s||i(e),u=l||i(t),g="5"===String(h),b="2"===String(h),f="bg-slate-200 border-slate-200",j="repeating-linear-gradient(90deg, transparent, transparent 10%, #000 10%, #000 20%)";return g?(f="bg-slate-100 border-slate-200",j="none"):b&&(f="bg-[#bc7a46] border-[#8a4e21]",j="repeating-linear-gradient(90deg, transparent, transparent 5%, #000 5%, #000 10%)"),(0,a.jsxs)("div",{className:"relative w-full aspect-video min-h-[300px] max-h-[600px] bg-slate-50 overflow-hidden flex flex-col justify-center",children:[(0,a.jsx)("div",{className:"absolute inset-0 flex items-center justify-center pointer-events-none mt-16 md:mt-24",children:(0,a.jsx)("div",{className:"relative w-[120%] h-[120%] sm:w-[90%] sm:h-[120%] max-w-[900px] flex-shrink-0 transition-transform duration-1000",style:{transform:"perspective(900px) rotateX(60deg) scale(0.9)",transformOrigin:"center center"},children:(0,a.jsxs)("div",{className:`absolute inset-0 ${f} shadow-[0_30px_60px_rgba(0,0,0,0.8)] border-4 rounded-xl overflow-hidden flex transition-colors duration-500`,children:[(0,a.jsx)("div",{className:"absolute inset-0 opacity-15 pointer-events-none",style:{backgroundImage:j}}),(0,a.jsxs)("div",{className:"absolute inset-[4%] pointer-events-none shadow-sm flex items-center justify-center",children:["1"===String(h)&&(0,a.jsxs)("div",{className:"absolute inset-0 w-full h-full border-2 border-white/60",children:[(0,a.jsx)("div",{className:"absolute left-1/2 top-0 bottom-0 w-0 border-l-2 border-white/60 -translate-x-1/2"}),(0,a.jsx)("div",{className:"absolute left-1/2 top-1/2 w-[18%] aspect-square rounded-full border-2 border-white/60 -translate-x-1/2 -translate-y-1/2"}),(0,a.jsx)("div",{className:"absolute left-1/2 top-1/2 w-2 h-2 rounded-full bg-white/80 -translate-x-1/2 -translate-y-1/2"}),(0,a.jsx)("div",{className:"absolute left-0 top-1/2 w-[16%] h-[46%] border-2 border-l-0 border-white/60 -translate-y-1/2 bg-slate-200"}),(0,a.jsx)("div",{className:"absolute left-0 top-1/2 w-[6%] h-[20%] border-2 border-l-0 border-white/60 -translate-y-1/2 bg-slate-200"}),(0,a.jsx)("div",{className:"absolute left-[16%] top-1/2 w-[8%] aspect-square border-2 border-l-0 border-white/60 rounded-r-full -translate-y-1/2 clip-path-half",style:{clipPath:"inset(0 0 0 50%)"}}),(0,a.jsx)("div",{className:"absolute right-0 top-1/2 w-[16%] h-[46%] border-2 border-r-0 border-white/60 -translate-y-1/2 bg-slate-200"}),(0,a.jsx)("div",{className:"absolute right-0 top-1/2 w-[6%] h-[20%] border-2 border-r-0 border-white/60 -translate-y-1/2 bg-slate-200"}),(0,a.jsx)("div",{className:"absolute right-[16%] top-1/2 w-[8%] aspect-square border-2 border-r-0 border-white/60 rounded-l-full -translate-y-1/2 clip-path-half",style:{clipPath:"inset(0 50% 0 0)"}})]}),g&&(0,a.jsxs)("div",{className:"absolute inset-[10%] w-[80%] h-[80%
72] border-2 border-white/80 bg-white",children:[(0,a.jsx)("div",{className:"absolute top-[10%] bottom-[10%] left-0 right-0 border-y-2 border-white/80"}),(0,a.jsx)("div",{className:"absolute left-1/2 top-[-2%] bottom-[-2%] w-1 bg-white/40 shadow-xl -translate-x-1/2 z-10"}),(0,a.jsx)("div",{className:"absolute left-[25%] right-[25%] top-[10%] bottom-[10%] border-x-2 border-white/80"}),(0,a.jsx)("div",{className:"absolute left-[25%] right-[25%] top-1/2 w-[50%] border-t-2 border-white/80 -translate-y-1/2"}),(0,a.jsx)("div",{className:"absolute left-0 top-1/2 w-[2%] border-t-2 border-white/80 -translate-y-1/2"}),(0,a.jsx)("div",{className:"absolute right-0 top-1/2 w-[2%] border-t-2 border-white/80 -translate-y-1/2"})]}),b&&(0,a.jsxs)("div",{className:"absolute inset-0 w-full h-full border-2 border-white/50",children:[(0,a.jsx)("div",{className:"absolute left-1/2 top-0 bottom-0 w-0 border-l-2 border-white/50 -translate-x-1/2"}),(0,a.jsx)("div",{className:"absolute left-1/2 top-1/2 w-[15%] aspect-square rounded-full border-2 border-white/50 -translate-x-1/2 -translate-y-1/2"}),(0,a.jsx)("div",{className:"absolute left-0 top-1/2 w-[18%] h-[35%] border-2 border-l-0 border-white/50 -translate-y-1/2 bg-[#bc7a46]"}),(0,a.jsx)("div",{className:"absolute left-[18%] top-1/2 w-[10%] aspect-square rounded-full border-2 border-white/50 -translate-y-1/2"}),(0,a.jsx)("div",{className:"absolute left-0 top-1/2 w-[30%] h-[70%] border-2 border-l-0 border-white/50 rounded-r-full -translate-y-1/2 opacity-60"}),(0,a.jsx)("div",{className:"absolute right-0 top-1/2 w-[18%] h-[35%] border-2 border-r-0 border-white/50 -translate-y-1/2 bg-[#bc7a46]"}),(0,a.jsx)("div",{className:"absolute right-0 top-1/2 w-[30%] h-[70%] border-2 border-r-0 border-white/50 rounded-l-full -translate-y-1/2 opacity-60"})]})]}),x&&(0,a.jsx)("div",{className:`absolute left-1/2 top-1/2 shadow-[0_8px_16px_rgba(0,0,0,0.8)] z-10 transition-all duration-[3000ms] border-2 border-white/20 rounded-full
73                                ${g?"w-2 h-2 sm:w-3 sm:h-3 bg-[#ccff00]":b?"w-4 h-4 sm:w-6 sm:h-6 bg-[#d95d16]":"w-4 h-4 sm:w-5 sm:h-5 bg-white"}`,style:{animation:"ballMove 8s infinite alternate ease-in-out",transform:"translate(-50%, -50%)"},children:(0,a.jsx)("div",{className:"absolute -bottom-4 left-1/2 w-4 h-2 bg-white/40 rounded-full blur-sm -translate-x-1/2"})}),x&&(0,a.jsxs)("div",{className:"absolute left-[65%] top-[60%] flex flex-col items-center animate-bounce-slow",style:{animation:"floatBubble 4s infinite alternate ease-in-out"},children:[(0,a.jsxs)("div",{className:"bg-white/95 backdrop-blur border border-white/10 rounded-2xl p-2 shadow-2xl flex items-center gap-3 w-max max-w-[200px]",children:[(0,a.jsx)("div",{className:"w-6 h-6 rounded-full flex items-center justify-center p-0.5 bg-white/5 shrink-0",children:(0,a.jsx)("img",{src:p,alt:e||"Home team",className:"max-w-full max-h-full object-contain",onError:t=>t.target.src=i(e),loading:"lazy",decoding:"async"})}),(0,a.jsx)("div",{className:"flex flex-col pr-1 overflow-hidden",children:(0,a.jsx)("span",{className:"text-slate-900 font-bold text-[10px] sm:text-xs tracking-wide truncate",children:g?"Serve / Return":"Tấn c\xf4ng nguy hiểm"})})]}),(0,a.jsx)("div",{className:"w-0 h-0 border-l-[6px] border-r-[6px] border-t-[6px] border-l-transparent border-r-transparent border-t-[#1a1c28]/95 mt-[-1px]"})]})]})})}),(0,a.jsx)("div",{className:"relative z-20 flex-1 flex flex-col items-center justify-start p-4 md:p-6 pointer-events-none w-full",children:(0,a.jsxs)("div",{className:"w-full max-w-[800px] flex items-center justify-between px-4 sm:px-6 py-3 rounded-xl bg-gradient-to-r from-[#0d0f14]/90 via-[#151821]/95 to-[#0d0f14]/90 backdrop-blur-xl border border-white/10 shadow-[0_10px_40px_rgba(0,0,0,0.8)] pointer-events-auto",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 flex-1 min-w-0 pr-2",children:[(0,a.jsx)("img",{src:p,alt:e,className:"w-8 h-8 md:w-12 md:h-12 object-contain drop-shadow-lg shrink-0",onError:t=>t.target.src=i(e),loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-slate-900 text-xs sm:text-sm md:text-base font-bold truncate tracking-wide",children:e})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1 shrink-0 px-2 sm:px-6 min-w-[100px]",children:[(0,a.jsxs)("span",{className:`inline-flex items-center gap-1.5 px-2.5 py-0.5 rounded-full text-[10px] sm:text-xs font-bold shadow-inner ${x?"bg-green-500/10 text-green-400 border border-green-500/20":"bg-white/5 text-slate-900/40"}`,children:[x&&(0,a.jsx)("span",{className:"w-1.5 h-1.5 rounded-full bg-green-500 animate-pulse shadow-[0_0_8px_#22c55e]"}),d||c]}),(0,a.jsxs)("div",{className:"flex gap-3 sm:gap-5 items-center justify-center",children:[(0,a.jsx)("span",{className:"text-slate-900 text-2xl sm:text-4xl font-black drop-shadow-md",children:r}),(0,a.jsx)("span",{className:"text-slate-900/30 text-xl font-light",children:"-"}),(0,a.jsx)("span",{className:"text-slate-900 text-2xl sm:text-4xl font-black drop-shadow-md",children:n})]})]}),(0,a.jsxs)("div",{className:"flex items-center justify-end gap-3 flex-1 min-w-0 pl-2 text-right",children:[(0,a.jsx)("span",{className:"text-slate-900 text-xs sm:text-sm md:text-base font-bold truncate tracking-wide",children:t}),(0,a.jsx)("img",{src:u,alt:t,className:"w-8 h-8 md:w-12 md:h-12 object-contain drop-shadow-lg shrink-0",onError:e=>e.target.src=i(t),loading:"lazy",decoding:"async"})]})]})}),(0,a.jsx)("div",{className:"relative z-20 mt-auto w-full p-4 flex justify-center pointer-events-none",children:(0,a.jsx)("div",{className:"w-full max-w-[600px] h-6 bg-white/40 backdrop-blur-md rounded-full border border-white/5 flex items-center px-4",children:(0,a.jsxs)("div",{className:"flex-1 h-0.5 bg-white/10 relative rounded-full",children:[x&&(0,a.jsx)("div",{className:"absolute left-0 top-0 bottom-0 bg-gradient-to-r from-[#b38b22] to-[#ffda6a] w-[65%] rounded-full opacity-90 shadow-[0_0_12px_#daa520]"}),(0,a.jsx)("span",{className:"absolute left-[65%] top-1/2 -translate-y-1/2 -translate-x-1/2 w-1.5 h-1.5 rounded-full bg-white shadow-md"})]})})}),(0,a.jsx)("style",{children:`
74                @keyframes ballMove {
75                    0% { transform: translate(-30%, -20%) scale(1); }
76                    25% { transform: translate(40%, -10%) scale(1.1); }
77                    50% { transform: translate(20%, 30%) scale(0.9); }
78                    75% { transform: translate(-10%, 15%) scale(1.2); }
79                    100% { transform: translate(-45%, 0%) scale(1); }
80                }
81                @keyframes floatBubble {
82                    0% { transform: translateY(0px) translateX(0px); }
83                    50% { transform: translateY(-8px) translateX(4px); }
84                    100% { transform: translateY(4px) translateX(-4px); }
85                }
86            `})]})}function c(e,t){if("1"===t||"2"===t)switch(e){case"2":return{t:"HT 1",live:!0,sc:!0};case"3":return{t:"Giữa giờ",live:!0,sc:!0};case"4":return{t:"HT 2",live:!0,sc:!0};case"5":return{t:"Hiệp phụ",live:!0,sc:!0};case"7":return{t:"Penalty",live:!0,sc:!0};case"8":case"9":return{t:"Kết th\xfac",live:!1,sc:!0};default:return{t:"Chưa bắt đầu",live:!1,sc:!1}}
86return["51","52","53","54","55"].includes(e)?{t:`Set ${e-50}`,live:!0,sc:!0}:["100","90","110"].includes(e)?{t:"KT",live:!1,sc:!0}:"0"===e||"1"===e?{t:"Chưa bắt đầu",live:!1,sc:!1}:{t:"LIVE",live:!0,sc:!0}}function d(e){let t=(e||"").split(/[\s-]+/).slice(0,2).map(e=>e[0]||"").join("").toUpperCase()||"??";return`data:image/svg+xml,${encodeURIComponent(`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 80 80"><rect width="80" height="80" rx="20" fill="#1a1c25"/><text x="40" y="47" font-size="20" font-family="Arial" font-weight="700" text-anchor="middle" fill="#666">${t}</text></svg>`)}`}function x(e){let t=new Date(1e3*parseInt(e||"0",10));return{hm:t.toLocaleTimeString("vi-VN",{hour:"2-digit",minute:"2-digit",timeZone:"Asia/Ho_Chi_Minh"}),dm:t.toLocaleDateString("vi-VN",{day:"2-digit",month:"2-digit",timeZone:"Asia/Ho_Chi_Minh"}),full:t.toLocaleDateString("vi-VN",{day:"2-digit",month:"2-digit",year:"numeric",timeZone:"Asia/Ho_Chi_Minh"})}}let h="max-w-[1200px]";function m({matchData:e,relatedMatches:t,matchDetails:s,standings:r,brandingNameUpper:i}){let p,u,g,j,v,y,[C,S]=(0,l.useState)("odds"),L=e?.match_data?.anchors||[],[$,F]=(0,l.useState)(!1),[T,A]=(0,l.useState)(!1),[M,H]=(0,l.useState)(null),[D,B]=(0,l.useState)(!1),z=(0,l.useRef)(0);(0,l.useEffect)(()=>{if(!e?.has_live||"1"!==e.has_live||0===L.length)return;let t=!1;B(!0);let s=async t=>{let s=t?.uid,a=`/api/socolive/proxy-stream?url=${encodeURIComponent(`https://live.inplyr.com/${s?`room/${s}`:`default/${e.id}`}.m3u8`)}`;try{let e=await fetch(a,{method:"GET",cache:"no-store"});if(!e.ok)return null;let s=(await e.text()).split("\n").filter(e=>e.trim()&&!e.startsWith("#"));if(0===s.length)return null;return(await fetch(s[0],{method:"HEAD",cache:"no-store"})).ok?t:null}catch{return null}};return Promise.all(L.map(e=>s(e))).then(e=>{if(t)return;let s=e.find(e=>null!==e);s?(H(s),F(!0),A(!1)):(H(L[0]),A(!0)),B(!1)}),()=>{t=!0}},[e?.has_live,L.length]),(0,l.useEffect)(()=>{if(!T||D||z.current>=20)return;let t=setTimeout(()=>{z.current++,A(!1),B(!0);let t=async t=>{let s=t?.uid,a=`/api/socolive/proxy-stream?url=${encodeURIComponent(`https://live.inplyr.com/${s?`room/${s}`:`default/${e.id}`}.m3u8`)}`;try{let e=await fetch(a,{method:"GET",cache:"no-store"});if(!e.ok)return null;let s=(await e.text()).split("\n").filter(e=>e.trim()&&!e.startsWith("#"));if(0===s.length)return null;return(await fetch(s[0],{method:"HEAD",cache:"no-store"})).ok?t:null}catch{return null}};Promise.all(L.map(e=>t(e))).then(e=>{let t=e.find(e=>null!==e);t?(H(t),F(!0),A(!1)):A(!0),B(!1)})},15e3);return()=>clearTimeout(t)},[T,D]);let[I,R]=(0,l.useState)(null),U=e?.post_name||e?.ls_id||e?.id;if(window.location.origin,(0,l.useEffect)(()=>{if(!U)return;let e=setInterval(async()=>{try{let e=await fetch(`/api/klivevip/match/${U}`,{cache:"no-store"});if(e.ok){let t=await e.json();R(t?.match??null)}}catch{}},1e4);return()=>clearInterval(e)},[U]),!e)return(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center py-32 gap-4",children:[(0,a.jsx)("span",{className:"text-[#64748B] text-lg",children:"Kh\xf4ng t\xecm thấy trận đấu"}),(0,a.jsx)("a",{href:"/",className:"text-[#4681E8] hover:underline text-sm",children:"← Quay lại"})]});let G=I?{...e,...I}:e,P=G?.has_live==="1"&&L.length>0,K=c(G.status_id,G.sport_id),V=$&&M&&!T&&!D,W=P&&(D||T&&K.live&&z.current<20),O=!P||T&&!W&&!D,q=!K.live&&"8"!==String(G.status_id)&&"9"!==String(G.status_id),{hm:X,full:Y}=x(G.time),Z=G.source_card_meta?.league_label||G.match_data?.competition_vi||G.match_data?.competition_full||"",Q=G.match_data?.stage_label||G.source_card_meta?.stage_label||"",J=G.home_logo||d(G.home_name),ee=G.away_logo||d(G.away_name),et=e=>t=>{t.target.src=d(e)};return(0,a.jsxs)("div",{className:"w-full bg-white min-h-screen text-slate-600 font-sans pb-16",children:[(0,a.jsx)("div",{className:"w-full border-b border-slate-200 bg-white",children:(0,a.jsxs)("div",{className:`${h} mx-auto px-4 py-3 flex items-center justify-between`,children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 text-[13px] font-bold",children:[(0,a.jsx)("span",{className:"text-[#4681E8] uppercase tracking-wide",children:Z}),Q&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"text-slate-300",children:"•"}),(0,a.jsx)("span",{className:"text-slate-600",children:Q})]})]}),(0,a.jsx)("div",{className:"text-[12px] font-mono text-slate-400 hidden sm:block",children:Y})]})}),(0,a.jsxs)("div",{className:`${h} mx-auto px-0 md:px-4 py-0 md:py-6 flex flex-col lg:flex-row gap-4 lg:gap-6`,children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0 flex flex-col gap-4 lg:gap-6",children:[(0,a.jsxs)("div",{className:"w-full relative bg-[#000000] rounded-none md:rounded-2xl overflow-hidden shadow-[0_10px_40px_rgba(0,0,0,0.5)] border-y md:border border-slate-200",children:[(0,a.jsx)("div",{className:"relative w-full aspect-video bg-[#000000] group z-10",children:V?(0,a.jsx)(n,{src:`/api/klivevip/proxy-stream?url=${encodeURIComponent(`https://live.inplyr.com/${M?.uid&&"default"!==M.uid?`room/${M.uid}`:`default/${G.id}`}.m3u8`)}`,autoPlay:!0,onError:()=>A(!0)}):O?(0,a.jsx)(o,{homeName:G.home_name,awayName:G.away_name,homeLogo:G.home_logo,awayLogo:G.away_logo,homeScore:K.sc?G.home_score:"0",awayScore:K.sc?G.away_score:"0",statusText:K.t,timeText:G.time_text||X,isLive:K.live,sportId:G.sport_id,matchId:G.ls_id||G.id,kickoffMs:1e3*Number(G?.time||0),isPreMatch:q}):(0,a.jsxs)("div",{className:"absolute inset-0 z-10 flex flex-col items-center justify-center p-4 lg:p-10",children:[(0,a.jsxs)("div",{className:"absolute inset-0 flex justify-between items-center opacity-[0.03] pointer-events-none px-4 lg:px-20 overflow-hidden",children:[(0,a.jsx)("img",{src:J,alt:"",className:"w-1/2 max-w-[400px] blur-[10px]",loading:"lazy",decoding:"async"}),(0,a.jsx)("img",{src:ee,alt:"",className:"w-1/2 max-w-[400px] blur-[10px]",loading:"lazy",decoding:"async"})]}),P&&!T&&(0,a.jsx)("button",{onClick:()=>F(!0),className:"group mb-4 sm:mb-8 w-16 h-16 md:w-20 md:h-20 rounded-full bg-[#4681E8] flex items-center justify-center hover:bg-[#55CAF1] transition-all shadow-[0_0_30px_rgba(70,129,232,0.5)] curs
86or-pointer z-20",children:(0,a.jsx)("svg",{className:"w-8 h-8 md:w-10 md:h-10 text-white ml-1.5 md:ml-2 group-hover:scale-110 transition-transform",viewBox:"0 0 24 24",fill:"currentColor",children:(0,a.jsx)("path",{d:"M8 5v14l11-7z"})})}),(0,a.jsxs)("div",{className:"grid grid-cols-[1fr_auto_1fr] items-center w-full max-w-[800px] gap-2 lg:gap-8 z-20",children:[(0,a.jsxs)("div",{className:"flex flex-col items-center gap-2 lg:gap-4",children:[(0,a.jsx)("img",{src:J,alt:G.home_name,className:"w-16 h-16 sm:w-24 sm:h-24 lg:w-32 lg:h-32 object-contain drop-shadow-[0_10px_20px_rgba(0,0,0,0.8)]",onError:et(G.home_name),loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-[#FFFFFF] text-xs sm:text-base lg:text-lg font-black text-center line-clamp-2 uppercase tracking-wide",children:G.home_name})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-2 lg:gap-3",children:[K.sc?(0,a.jsxs)("div",{className:"flex items-center gap-3 lg:gap-6 bg-white/90 backdrop-blur-md px-4 py-2 lg:px-8 lg:py-4 rounded-2xl border border-slate-200 shadow-2xl",children:[(0,a.jsx)("span",{className:"text-[#4681E8] text-[32px] sm:text-[48px] lg:text-[64px] font-black leading-none",children:G.home_score}),(0,a.jsx)("span",{className:"text-slate-300 text-[20px] lg:text-[28px] font-light",children:":"}),(0,a.jsx)("span",{className:"text-[#4681E8] text-[32px] sm:text-[48px] lg:text-[64px] font-black leading-none",children:G.away_score})]}):(0,a.jsx)("div",{className:"text-[#FFFFFF] text-[32px] sm:text-[48px] lg:text-[56px] font-black tracking-widest leading-none drop-shadow-xl",children:X}),(0,a.jsxs)("span",{className:`inline-flex items-center gap-2 rounded-full px-3 py-1 lg:px-5 lg:py-1.5 text-[10px] lg:text-[12px] font-bold tracking-widest uppercase ${K.live?"bg-[#4681E8] text-white shadow-[0_0_20px_rgba(70,129,232,0.6)]":"bg-white text-slate-600 border border-slate-200"}`,children:[K.live&&(0,a.jsx)("span",{className:"w-2 h-2 rounded-full bg-white animate-pulse"}),K.t,G.time_text?` : ${G.time_text}`:""]})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-2 lg:gap-4",children:[(0,a.jsx)("img",{src:ee,alt:G.away_name,className:"w-16 h-16 sm:w-24 sm:h-24 lg:w-32 lg:h-32 object-contain drop-shadow-[0_10px_20px_rgba(0,0,0,0.8)]",onError:et(G.away_name),loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-[#FFFFFF] text-xs sm:text-base lg:text-lg font-black text-center line-clamp-2 uppercase tracking-wide",children:G.away_name})]})]})]})}),L.length>0&&(0,a.jsxs)("div",{className:"w-full bg-white border-t border-slate-200 px-3 lg:px-6 py-2.5 lg:py-4 flex items-center gap-2 lg:gap-4 overflow-x-auto z-20",children:[(0,a.jsx)("span",{className:"text-[10px] lg:text-[11px] text-slate-600 uppercase font-bold tracking-widest shrink-0 mr-1 lg:mr-2",children:"CHỌN K\xcaNH TRUYỀN:"}),L.map((e,t)=>(0,a.jsxs)("button",{onClick:()=>{H(e),F(!0),A(!1)},className:`shrink-0 flex items-center gap-1.5 lg:gap-2 rounded-full px-3 py-1.5 lg:px-5 lg:py-2 text-[11px] lg:text-[13px] font-bold transition-all ${M?.uid===e.uid&&!T?"bg-[#4681E8]/10 border border-[#4681E8] text-[#4681E8] shadow-[0_0_15px_rgba(70,129,232,0.2)]":"bg-white border border-slate-200 text-slate-600 hover:text-[#4681E8] hover:border-[#4681E8]/50"}`,children:[(0,a.jsx)("span",{className:`w-1.5 h-1.5 lg:w-2 lg:h-2 rounded-full ${M?.uid===e.uid&&!T?"bg-[#4681E8] animate-pulse":"bg-transparent"}`}),"BLV ",e.nickName||`K\xeanh ${t+1}`]},e.uid||t))]})]}),(p=(()=>{let e=s?.stats;if(!e)return!1;let t=null;return Array.isArray(e)&&e.length>0?t=e[0]:e?.results?.[0]?t=e.results[0]:e?.stats_full_time&&(t=e),!!t&&!!(t.stats_full_time?.length>0||t.stats_haft_time?.length>0||t.stats_half_time?.length>0||t.stats?.length>0)})(),u=!!(s?.lineup&&(Array.isArray(s.lineup)?s.lineup.length>0:s.lineup.home||s.lineup.away)),g=!!(s?.events&&(Array.isArray(s.events)?s.events.length>0:s.events.incidents?.length>0||s.events.data?.length>0)),j=!!(r&&(Array.isArray(r)?r.length>0:r.data?.length>0)),(y=(v=[{id:"stats",label:"THỐNG K\xca",show:p},{id:"lineup",label:"ĐỘI H\xccNH",show:u},{id:"events",label:"DIỄN BIẾN",show:g},{id:"standings",label:"BẢNG XH",show:j},{id:"odds",label:"TỶ LỆ K\xc8O",show:!!(s?.odds&&Array.isArray(s.odds)&&s.odds.length>0)}].filter(e=>e.show)).find(e=>e.id===C)?C:v[0]?.id||"odds")!==C&&setTimeout(()=>S(y),0),v.length>0?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"bg-white rounded-2xl p-2 border border-slate-200 flex overflow-x-auto gap-2 shadow-[0_4px_15px_rgba(0,0,0,0.08)] mx-4 md:mx-0",children:v.map(({id:e,label:t})=>(0,a.jsx)("button",{onClick:()=>S(e),className:`flex-1 min-w-[100px] py-2.5 sm:py-3 text-[10px] sm:text-[12px] font-black uppercase tracking-widest rounded-xl transition-all ${y===e?"bg-[#4681E8]/10 text-[#4681E8] border border-[#4681E8]/30 shadow-inner":"text-slate-500 hover:text-[#4681E8] hover:bg-[#4681E8]/5 border border-transparent"}`,children:t},e))}),(0,a.jsxs)("div",{className:"bg-white rounded-2xl border border-slate-200 overflow-hidden shadow-[0_4px_15px_rgba(0,0,0,0.08)] min-h-[400px] mx-4 md:mx-0",children:["stats"===y&&(0,a.jsx)(b,{matchDetails:s}),"lineup"===y&&(0,a.jsx)(f,{matchDetails:s}),"events"===y&&(0,a.jsx)(_,{events:s?.events}),"standings"===y&&(0,a.jsx)(k,{standings:r}),"odds"===y&&(0,a.jsx)(E,{odds:s?.odds})]})]}):null),t.length>0&&(0,a.jsxs)("div",{className:"mt-4 mx-4 md:mx-0",children:[(0,a.jsxs)("h2",{className:"px-1 py-4 text-sm sm:text-base font-black text-slate-800 uppercase flex items-center gap-3 tracking-widest border-b border-slate-100 mb-4",children:[(0,a.jsx)("span",{className:"w-1 h-5 bg-[#4681E8] rounded-sm shadow-[0_0_8px_#4681E8]"}),"TRẬN ĐẤU C\xd9NG GIẢI"]}),(0,a.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3 sm:gap-4",children:t.slice(0,4).map(e=>(0,a.jsx)(w,{m:e},e.id))})]})]}),(0,a.jsx)("div",{className:"w-full lg:w-[350px] xl:w-[400px] shrink-0 px-4 md:px-0",children:(0,a.jsxs)("div",{className:"bg-white border border-slate-200 rounded-2xl overflow-hidden flex flex-col shadow-[0_10px_30px_rgba(0,0,0,0.1)] lg:sticky lg:top-8 h-[600px] lg:h-[c
86alc(100vh-100px)] lg:max-h-[850px]",children:[(0,a.jsxs)("div",{className:"px-5 py-4 border-b border-slate-200 flex items-center justify-between bg-white",children:[(0,a.jsxs)("h3",{className:"text-slate-800 text-sm font-black uppercase tracking-widest flex items-center gap-2",children:[(0,a.jsx)("span",{className:"w-2.5 h-2.5 rounded-full bg-[#4681E8] shadow-[0_0_10px_rgba(70,129,232,0.4)]"}),"PH\xd2NG CHAT"]}),(0,a.jsxs)("span",{className:"text-[10px] bg-white px-3 py-1.5 rounded-full text-[#4681E8] font-mono border border-[#4681E8]/30 shadow-inner tracking-widest flex items-center gap-1.5",children:[(0,a.jsx)("svg",{className:"w-3 h-3",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 10l4.553-2.276A1 1 0 0121 8.618v6.764a1 1 0 01-1.447.894L15 14M5 18h8a2 2 0 002-2V8a2 2 0 00-2-2H5a2 2 0 00-2 2v8a2 2 0 002 2z"})}),L.length," BLV"]})]}),(0,a.jsx)("div",{className:"flex-1 bg-[#FFFFFF]/40 min-h-0 chat-container-wrapper",children:(0,a.jsx)(N,{anchors:L,selectedAnchor:M})})]})})]})]})}let p={25:"KIỂM SO\xc1T B\xd3NG",24:"CHUYỀN CH\xcdNH X\xc1C",23:"TỔNG SỐ ĐƯỜNG CHUYỀN",22:"TẤN C\xd4NG",21:"T.C\xd4NG NGUY HIỂM",2:"S\xdaT TR\xdaNG Đ\xcdCH",37:"PHẠT G\xd3C",28:"N\xc9M BI\xcaN",8:"VIỆT VỊ",3:"THẺ V\xc0NG",4:"THẺ ĐỎ",5:"S\xdaT PENALTY",29:"PHẠM LỖI",26:"Đ\xc1NH ĐẦU",27:"CỨU THUA",1:"B\xc0N THẮNG",7:"PHẢN LƯỚI"},u=[25,21,22,24,2,23,4,3,37,28,8,5,29],g="https://cdn.sportdb.live/upload/team/";function b({matchDetails:e}){let[t,s]=(0,l.useState)("full"),r=e?.stats,n=e?.lineup,i=n?.match?.home_team,o=n?.match?.away_team,c=null;Array.isArray(r)&&r.length>0?c=r[0]:r?.results?.[0]?c=r.results[0]:r?.stats_full_time&&(c=r);let d={full:c?.stats_full_time||[],h1:c?.stats_haft_time||c?.stats_half_time||[],h2:c?.stats_haft_time_2nd_half||[]}[t]||[];if(!c||0===d.length)return(0,a.jsx)(j,{text:"Thống k\xea sẽ được cập nhật khi trận đấu bắt đầu"});let x=[...d].sort((e,t)=>{let s=u.indexOf(e.type),a=u.indexOf(t.type);return(-1===s?999:s)-(-1===a?999:a)});return(0,a.jsxs)("div",{className:"flex flex-col",children:[(i||o)&&(0,a.jsxs)("div",{className:"flex items-center justify-between px-4 py-3 border-b border-slate-100",children:[(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5 w-20",children:[i?.logo&&(0,a.jsx)("img",{src:g+i.logo,alt:i?.name||"Home team",className:"w-8 h-8 object-contain",onError:e=>e.target.style.display="none",loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-slate-600 text-[10px] font-medium text-center leading-tight",children:i?.name||""})]}),(0,a.jsx)("div",{className:"flex gap-1",children:[{k:"h1",l:"Hiệp 1"},{k:"h2",l:"Hiệp 2"},{k:"full",l:"Cả trận"}].map(({k:e,l})=>(0,a.jsx)("button",{onClick:()=>s(e),className:`px-2.5 py-1 text-[10px] font-bold rounded transition-all ${t===e?"bg-[#E11D48] text-white":"text-slate-400 hover:text-slate-600 bg-slate-100"}`,children:l},e))}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5 w-20",children:[o?.logo&&(0,a.jsx)("img",{src:g+o.logo,alt:o?.name||"Away team",className:"w-8 h-8 object-contain",onError:e=>e.target.style.display="none",loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-slate-600 text-[10px] font-medium text-center leading-tight",children:o?.name||""})]})]}),(0,a.jsx)("div",{className:"px-4 py-3 space-y-3",children:x.map(e=>{let t=p[e.type]||`Stat ${e.type}`,s=e.home,l=e.away,r=24===e.type||25===e.type,n=s+l,i=0===n?50:s/n*100,o=s>l,c=l>s;return(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"flex justify-between items-center mb-1.5",children:[(0,a.jsxs)("span",{className:`text-xs font-bold w-10 tabular-nums ${o?"text-slate-800":"text-slate-400"}`,children:[s,r?"%":""]}),(0,a.jsx)("span",{className:"text-slate-400 text-[10px] font-semibold tracking-wide uppercase",children:t}),(0,a.jsxs)("span",{className:`text-xs font-bold w-10 text-right tabular-nums ${c?"text-slate-800":"text-slate-400"}`,children:[l,r?"%":""]})]}),(0,a.jsxs)("div",{className:"flex gap-0.5 h-[5px]",children:[(0,a.jsx)("div",{className:"flex-1 rounded-l-full bg-white/[0.06] overflow-hidden flex justify-end",children:(0,a.jsx)("div",{className:`rounded-l-full transition-all duration-500 ${o?"bg-gradient-to-r from-[#E11D48]/60 to-[#E11D48]":"bg-gradient-to-r from-white/10 to-white/20"}`,style:{width:`${i}%`}})}),(0,a.jsx)("div",{className:"flex-1 rounded-r-full bg-white/[0.06] overflow-hidden",children:(0,a.jsx)("div",{className:`rounded-r-full transition-all duration-500 ${c?"bg-gradient-to-l from-[#E11D48]/60 to-[#E11D48]":"bg-gradient-to-l from-white/10 to-white/20"}`,style:{width:`${100-i}%`}})})]})]},e.type)})})]})}
86function f({matchDetails:e}){let[t,s]=(0,l.useState)("pitch"),r=e?.lineup,n=r?.lineup||r,i=n?.home||[],o=n?.away||[],c=r?.home_formation||"",d=r?.away_formation||"",x=r?.match?.home_team,h=r?.match?.away_team;if(0===i.length&&0===o.length)return(0,a.jsx)(j,{text:"Đội h\xecnh sẽ được c\xf4ng bố trước trận đấu 30 ph\xfat"});let m=e=>e.filter(e=>1===e.first),p=e=>e.filter(e=>1!==e.first),u=m(i),g=m(o),b=p(i),w=p(o);return(0,a.jsxs)("div",{className:"flex flex-col",children:[(0,a.jsxs)("div",{className:"flex items-center justify-center gap-1 px-3 py-2 border-b border-slate-100",children:[(0,a.jsx)("button",{onClick:()=>s("pitch"),className:`px-3 py-1.5 text-[10px] font-bold rounded transition-all ${"pitch"===t?"bg-[#E11D48] text-white":"text-slate-400 bg-slate-100"}`,children:"Đội h\xecnh xuất ph\xe1t"}),(0,a.jsx)("button",{onClick:()=>s("list"),className:`px-3 py-1.5 text-[10px] font-bold rounded transition-all ${"list"===t?"bg-[#E11D48] text-white":"text-slate-400 bg-slate-100"}`,children:"Đội h\xecnh dá»± bị"})]}),"pitch"===t?(0,a.jsx)("div",{className:"relative w-full",style:{aspectRatio:"68/105"},children:(0,a.jsxs)("div",{className:"absolute inset-0 bg-gradient-to-b from-[#1a5c2a] via-[#1e6b31] to-[#1a5c2a] rounded-2xl overflow-hidden",children:[(0,a.jsxs)("div",{className:"absolute inset-[3%] border border-white/20 rounded-lg",children:[(0,a.jsx)("div",{className:"absolute left-0 right-0 top-1/2 h-px bg-white/20"}),(0,a.jsx)("div",{className:"absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 w-[22%] aspect-square rounded-full border border-white/20"}),(0,a.jsx)("div",{className:"absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 w-1.5 h-1.5 bg-white/30 rounded-full"}),(0,a.jsx)("div",{className:"absolute top-0 left-1/2 -translate-x-1/2 w-[55%] h-[16%] border-l border-r border-white/20"}),(0,a.jsx)("div",{className:"absolute top-0 left-1/2 -translate-x-1/2 w-[25%] h-[6%] border-l border-r border-white/20"}),(0,a.jsx)("div",{className:"absolute bottom-0 left-1/2 -translate-x-1/2 w-[55%] h-[16%] border-t border-l border-r border-white/20"}),(0,a.jsx)("div",{className:"absolute bottom-0 left-1/2 -translate-x-1/2 w-[25%] h-[6%] border-t border-l border-r border-white/20"})]}),(0,a.jsx)("div",{className:"absolute top-1 left-2 text-[9px] text-[#F8FAFC]/50 font-bold z-10",children:x?.name||""}),(0,a.jsx)("div",{className:"absolute top-1 right-2 text-[9px] text-[#E11D48]/70 font-bold z-10",children:c}),(0,a.jsx)("div",{className:"absolute bottom-1 left-2 text-[9px] text-[#F8FAFC]/50 font-bold z-10",children:h?.name||""}),(0,a.jsx)("div",{className:"absolute bottom-1 right-2 text-[9px] text-[#E11D48]/70 font-bold z-10",children:d}),u.map((e,t)=>{let s=`${e.x||50}%`,l=`${(e.y||10)/2}%`,r="G"===e.position;return(0,a.jsxs)("div",{className:"absolute flex flex-col items-center z-10 -translate-x-1/2 -translate-y-1/2",style:{left:s,top:l},children:[(0,a.jsx)("div",{className:`w-6 h-6 rounded-full flex items-center justify-center text-[9px] font-black ${r?"bg-yellow-400 text-black":"bg-blue-600 text-[#F8FAFC]"} shadow-md border border-white/20`,children:e.shirt_number||""}),(0,a.jsx)("span",{className:"text-[7px] text-[#F8FAFC] font-semibold mt-0.5 text-center max-w-[48px] truncate drop-shadow-[0_1px_2px_rgba(0,0,0,0.8)]",children:(e.name||"").split(" ").slice(-2).join(" ")}),1===e.captain&&(0,a.jsx)("span",{className:"absolute -top-1 -right-1 text-[6px] text-yellow-400",children:"C"})]},`h-${t}`)}),g.map((e,t)=>{let s=`${100-(e.x||50)}%`,l=`${100-(e.y||10)/2}%`,r="G"===e.position;return(0,a.jsxs)("div",{className:"absolute flex flex-col items-center z-10 -translate-x-1/2 -translate-y-1/2",style:{left:s,top:l},children:[(0,a.jsx)("div",{className:`w-6 h-6 rounded-full flex items-center justify-center text-[9px] font-black ${r?"bg-yellow-400 text-black":"bg-orange-500 text-[#F8FAFC]"} shadow-md border border-white/20`,children:e.shirt_number||""}),(0,a.jsx)("span",{className:"text-[7px] text-[#F8FAFC] font-semibold mt-0.5 text-center max-w-[48px] truncate drop-shadow-[0_1px_2px_rgba(0,0,0,0.8)]",children:(e.name||"").split(" ").slice(-2).join(" ")}),1===e.captain&&(0,a.jsx)("span",{className:"absolute -top-1 -right-1 text-[6px] text-yellow-400",children:"C"})]},`a-${t}`)})]})}):(0,a.jsxs)("div",{className:"px-3 py-2 text-xs",children:[(0,a.jsxs)("div",{className:"flex justify-between font-bold text-slate-400 mb-1 uppercase tracking-wider text-[9px] px-1",children:[(0,a.jsx)("span",{children:"Đội chá»
86§ nh\xe0"}),(0,a.jsx)("span",{children:"Đội kh\xe1ch"})]}),Array.from({length:Math.max(b.length,w.length)}).map((e,t)=>{let s=b[t],l=w[t];return(0,a.jsxs)("div",{className:"flex justify-between items-center border-b border-slate-50 py-1.5",children:[(0,a.jsx)("div",{className:"flex items-center gap-1.5 w-1/2 min-w-0",children:s&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"text-[#E11D48] font-bold w-5 text-center shrink-0 text-[10px]",children:s.shirt_number||""}),(0,a.jsx)("span",{className:"text-slate-700 truncate text-[11px]",children:s.name||""})]})}),(0,a.jsx)("div",{className:"flex items-center gap-1.5 w-1/2 justify-end min-w-0",children:l&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"text-slate-700 truncate text-[11px] text-right",children:l.name||""}),(0,a.jsx)("span",{className:"text-[#E11D48] font-bold w-5 text-center shrink-0 text-[10px]",children:l.shirt_number||""})]})})]},t)})]})]})}function j({text:e}){return(0,a.jsx)("div",{className:"flex items-center justify-center py-10 text-slate-400 text-sm text-center",children:e})}function w({m:e}){let t=c(e.status_id,e.sport_id),{hm:s,dm:l}=x(e.time),r=e.source_card_meta?.league_label||e.match_data?.competition_vi||"";return(0,a.jsxs)("a",{href:`/match/${encodeURIComponent(e.post_name||e.id)}`,className:"flex items-center gap-3 rounded-2xl bg-white hover:bg-slate-50 border border-slate-100 hover:border-[#4681E8]/30 p-3 transition-all group",children:[(0,a.jsxs)("div",{className:"shrink-0 w-14 text-center",children:[(0,a.jsx)("div",{className:"text-[#E11D48] text-[11px] font-bold",children:s}),(0,a.jsx)("div",{className:"text-slate-400 text-[9px]",children:l})]}),(0,a.jsx)("div",{className:"w-px h-9 bg-slate-200 shrink-0"}),(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("div",{className:"text-slate-400 text-[9px] truncate mb-1",children:r}),(0,a.jsxs)("div",{className:"flex items-center gap-2 mb-0.5",children:[(0,a.jsx)("img",{src:e.home_logo||d(e.home_name),alt:e.home_name,className:"w-4 h-4 object-contain shrink-0",onError:t=>t.target.src=d(e.home_name),loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-slate-600 text-[12px] font-medium truncate",children:e.home_name})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("img",{src:e.away_logo||d(e.away_name),alt:e.away_name,className:"w-4 h-4 object-contain shrink-0",onError:t=>t.target.src=d(e.away_name),loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-slate-600 text-[12px] font-medium truncate",children:e.away_name})]})]}),t.sc?(0,a.jsxs)("span",{className:"text-slate-800 font-bold text-[14px] tabular-nums shrink-0",children:[e.home_score,"-",e.away_score]}):(0,a.jsx)("span",{className:"text-[10px] font-bold text-[#E11D48] bg-[#E11D48]/10 rounded px-2.5 py-1 group-hover:bg-[#E11D48]/15 transition shrink-0",children:"XEM NGAY"})]})}let v={0:{bg:"bg-white/10",text:"text-[#F8FAFC]/40",nameCls:"text-[#94A3B8]"},1:{bg:"bg-white/10",text:"text-[#F8FAFC]/50",nameCls:"text-[#94A3B8]"},2:{bg:"bg-green-900/50",text:"text-green-400",nameCls:"text-green-400"},3:{bg:"bg-yellow-900/40",text:"text-yellow-400",nameCls:"text-emerald-600 font-bold"},4:{bg:"bg-blue-900/40",text:"text-blue-400",nameCls:"text-blue-400 font-bold"},5:{bg:"bg-red-900/40",text:"text-red-400",nameCls:"text-red-400 font-bold"}};function N({anchors:e,selectedAnchor:t}){let[s,r]=(0,l.useState)([]),[n,i]=(0,l.useState)(!1),o=(0,l.useRef)(null),c=(0,l.useRef)(null),d=t?.roomNum;return(0,l.useEffect)(()=>{if(!d)return;r([]),i(!1);let e=new EventSource(`/api/chat/${d}`);return e.onopen=()=>i(!0),e.onmessage=e=>{try{let t=JSON.parse(e.data);if("connected"===t.type)return void i(!0);if("history"===t.type&&Array.isArray(t.messages))return void r(e=>[...t.messages,...e].slice(-200));t.user&&t.text&&r(e=>[...e,t].slice(-200))}catch{}},e.onerror=()=>i(!1),()=>{e.close(),i(!1)}},[d]),(0,l.useEffect)(()=>{requestAnimationFrame(()=>{let e=c.current;e&&(e.scrollTop=e.scrollHeight)})},[s.length]),(0,a.jsxs)("div",{className:"flex flex-col h-full bg-[#0F0F23]",children:[(0,a.jsxs)("div",{ref:c,className:"flex-1 min-h-0 px-3 py-2 flex flex-col gap-[3px] overflow-y-auto",style:{scrollbarWidth:"thin",scrollbarColor:"#444 transparent"},children:[(0,a.jsx)("div",{className:"text-center text-[10px] text-[#F8FAFC]/30 bg-slate-50/60 py-1.5 rounded-xl mb-1 sticky top-0 z-10 backdrop-blur-sm",children:n?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"inline-block h-1.5 w-1.5 rounded-full bg-green-400 animate-pulse mr-1"}),"Đang kết nối ph\xf2ng chat trá»±c tiếp"]}):d?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"inline-block h-1.5 w-1.5 rounded-full bg-yellow-400 animate-pulse mr-1"}),"Đang kết nối..."]}
86):"Ch\xe0o mừng bạn đến với ph\xf2ng chat"}),0===s.length&&n&&(0,a.jsx)("div",{className:"text-center text-[10px] text-[#F8FAFC]/20 py-4",children:"Chờ tin nhắn mới..."}),s.map((e,t)=>{var s;let l=(s=e.level)>=5?v[5]:v[s]||v[0];return 2===e.type||e.text?.includes("v\xe0o ph\xf2ng tr\xf2 chuyện")?(0,a.jsxs)("div",{className:"flex items-start gap-1.5 text-[11px] leading-relaxed py-[1px] opacity-60",children:[(0,a.jsx)("span",{className:"text-green-500/70 font-medium",children:"Hi"}),(0,a.jsxs)("span",{className:`shrink-0 inline-flex items-center px-1 py-[0.5px] rounded text-[8px] font-bold ${l.bg} ${l.text}`,children:["Lv",e.level]}),(0,a.jsxs)("span",{className:`font-bold ${l.nameCls}`,children:[e.user,":"]}),(0,a.jsx)("span",{className:"text-[#F8FAFC]/40",children:e.text})]},`${e.ts}-${t}`):(0,a.jsxs)("div",{className:"flex items-start gap-1.5 text-[11px] leading-relaxed py-[1px]",children:[(0,a.jsxs)("span",{className:`shrink-0 inline-flex items-center px-1 py-[0.5px] rounded text-[8px] font-bold ${l.bg} ${l.text}`,children:["Lv.",e.level]}),(0,a.jsxs)("span",{className:`font-bold shrink-0 ${l.nameCls}`,children:[e.user,":"]}),(0,a.jsx)("span",{className:"text-[#F8FAFC]/80 break-words min-w-0",children:e.text})]},`${e.ts}-${t}`)}),(0,a.jsx)("div",{ref:o})]}),(0,a.jsxs)("div",{className:"shrink-0 px-3 py-2 bg-[#0F0F23] border-t border-white/[0.04] space-y-2",children:[(0,a.jsx)("div",{className:"flex items-center justify-center gap-3 text-[#F8FAFC]/20 text-[10px]",children:(0,a.jsx)("span",{className:"flex items-center gap-1",children:(0,a.jsx)("svg",{className:"w-3 h-3",viewBox:"0 0 24 24",fill:"currentColor",children:(0,a.jsx)("path",{d:"M12 4.5C7 4.5 2.7 7.6 1 12c1.7 4.4 6 7.5 11 7.5s9.3-3.1 11-7.5c-1.7-4.4-6-7.5-11-7.5zm0 12.5c-2.8 0-5-2.2-5-5s2.2-5 5-5 5 2.2 5 5-2.2 5-5 5zm0-8c-1.7 0-3 1.3-3 3s1.3 3 3 3 3-1.3 3-3-1.3-3-3-3z"})})})}),(0,a.jsxs)("div",{className:"flex bg-[#0F0F23] rounded-2xl overflow-hidden border border-white/[0.08]",children:[(0,a.jsx)("input",{type:"text",placeholder:"Đăng nhập để c\xf9ng chat nh\xe9",disabled:!0,className:"flex-1 bg-transparent px-3 py-2 text-[11px] text-[#F8FAFC] outline-none placeholder:text-[#F8FAFC]/30 disabled:opacity-50"}),(0,a.jsx)("button",{disabled:!0,className:"px-4 text-[11px] font-bold bg-[#E11D48] text-black disabled:bg-white/10 disabled:text-[#F8FAFC]/20 transition-colors",children:"Gửi"})]})]})]})}let y={1:{icon:"⚽",label:"B\xe0n thắng",color:"text-green-400"},2:{icon:"\uD83C\uDD7F️",label:"Phạt đền",color:"text-green-400"},3:{icon:"\uD83D\uDFE1",label:"Thẻ v\xe0ng",color:"text-yellow-400"},4:{icon:"\uD83D\uDFE1\uD83D\uDFE1",label:"Thẻ v\xe0ng 2",color:"text-emerald-600"},5:{icon:"\uD83D\uDD34",label:"Thẻ đỏ",color:"text-red-500"},7:{icon:"\uD83D\uDD04",label:"Phản lưới",color:"text-orange-400"},8:{icon:"\uD83C\uDFE5",label:"Chấn thương",color:"text-[#94A3B8]"},9:{icon:"\uD83D\uDD04",label:"Thay người",color:"text-blue-400"},11:{icon:"⏱️",label:"Hiệp 2",color:"text-[#F8FAFC]/40"},15:{icon:"\uD83E\uDD45",label:"Pen trượt",color:"text-red-400"},19:{icon:"⏱️",label:"Kết th\xfac hiệp",color:"text-[#F8FAFC]/30"},21:{icon:"\uD83C\uDFC6",label:"VAR",color:"text-purple-400"}};function _({events:e}){let t=e?.incidents||e?.events||[];return t&&0!==t.length?(0,a.jsx)("div",{className:"flex flex-col",children:t.map((e,t)=>{let s=y[e.type]||{icon:"•",label:`Event ${e.type}`,color:"text-[#F8FAFC]/50"},l=1===e.position,r=2===e.position,n=e.add_time?`+${e.add_time}`:"",i=`${e.time}'${n}`;return l||r||11!==e.type&&19!==e.type?9===e.type?(0,a.jsxs)("div",{className:`flex items-center gap-2 border-b border-slate-50 p-3 text-xs ${l?"":"flex-row-reverse"}`,children:[(0,a.jsx)("span",{className:"text-slate-400 w-10 text-center shrink-0 text-[10px]",children:i}),(0,a.jsxs)("div",{className:`flex-1 flex flex-col gap-0.5 ${l?"items-start":"items-end"}`,children:[(0,a.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,a.jsx)("span",{className:"text-green-400 text-[10px]",children:"▲"}),(0,a.jsx)("span",{className:"text-[#F8FAFC]/80 text-[11px]",children:e.in_player_name||""})]}),(0,a.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,a.jsx)("span",{className:"text-red-400 text-[10px]",children:"▼"}),(0,a.jsx)("span",{className:"text-[#F8FAFC]/40 text-[11px]",children:e.out_player_name||""})]})]})]},t):(0,a.jsxs)("div",{className:`flex items-center gap-2 border-b border-slate-50 p-3 text-xs ${l?"":"flex-row-reverse"}`,children:[(0,a.jsx)("span",{className:"text-slate-400 w-10 text-center shrink-0 text-[10px]",children:i}),(0,a.jsx)("span",{className:`shrink-0 text-sm ${s.color}`,children:s.icon}),(0,a.jsxs)("div",{className:`flex-1 min-w-0 ${l?"text-left":"text-right"}`,children:[(0,a.jsx)("span",{className:"text-slate-700 text-[11px]",children:e.player_name||""}),e.assist1_name&&(0,a.jsxs)("span",{className:"text-slate-400 text-[10px] ml-1",children:["(kiến tạo: ",e.assist1_name,")"]}),1===e.type&&void 0!==e.home_score&&(0,a.jsxs)("span",{className:"text-[#E11D48] font-bold text-[11px] ml-2",children:[e.home_score," - ",e.away_score]})]})]},t):(0,a.jsx)("div",{className:"flex items-center justify-center py-2 border-b border-slate-50 bg-slate-50",children:(0,a.jsxs)("span",{className:"text-slate-400 text-[10px] uppercase tracking-wider",children:[s.icon," ",s.label," — ",i]})},t)})}):(0,a.jsx)(j,{text:"Diễn biến trận đấu sẽ được cập nhật trực tiếp tại đ\xe2y"})}function k({standings:e}
86){return e&&e.teams&&0!==e.teams.length?(0,a.jsxs)("div",{className:"w-full text-[10px]",children:[(0,a.jsxs)("div",{className:"grid grid-cols-[20px_1fr_24px_24px_32px] bg-slate-50 p-2 text-slate-400 uppercase font-bold sticky top-0",children:[(0,a.jsx)("span",{className:"text-center",children:"#"}),(0,a.jsx)("span",{children:"Team"}),(0,a.jsx)("span",{className:"text-center",children:"T"}),(0,a.jsx)("span",{className:"text-center",children:"B"}),(0,a.jsx)("span",{className:"text-center whitespace-nowrap",children:"Đ"})]}),e.teams.slice(0,15).map((e,t)=>{let s=!!e.data,l=s?parseFloat(e.data[0]):e.rank||t+1,r=s?e.data[1]:e.target_name,n=s?e.data[7]:e.points,i=s?e.data[3]:e.won,o=s?e.data[5]:e.loss;return(0,a.jsxs)("div",{className:"grid grid-cols-[20px_1fr_24px_24px_32px] items-center p-2 border-b border-slate-50 hover:bg-slate-50 transition-colors",children:[(0,a.jsx)("span",{className:"text-center text-slate-500",children:l}),(0,a.jsxs)("div",{className:"flex items-center gap-1.5 min-w-0 pr-2",children:[e.team_logo&&(0,a.jsx)("img",{src:e.team_logo,className:"w-3.5 h-3.5 object-contain",alt:r||"Team logo",loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-slate-700 font-medium truncate",children:r})]}),(0,a.jsx)("span",{className:"text-center text-slate-500",children:i}),(0,a.jsx)("span",{className:"text-center text-slate-500",children:o}),(0,a.jsx)("span",{className:"text-center text-[#E11D48] font-bold",children:n})]},r)})]}):(0,a.jsx)(j,{text:"Bảng xếp hạng sẽ được cập nhật"})}function E({odds:e}){let t=Array.isArray(e)?e:[],s=["2","4","3","16"];function l(e){for(let a of s){let s=t.find(t=>t.odds_type===e&&String(t.company_id)===a);if(s?.odds_info?.length)return s}return t.find(t=>t.odds_type===e&&t.odds_info?.length>0)}function r(e,t){let s=e?.odds_info;if(!s?.length)return["-","-","-"];let a="opening"===t?s.length-1:0;if(!s?.length||!s[a])return["-","-","-"];let l=s[a][2];if("string"!=typeof l)return["-","-","-"];let r=l.split(",");return[r[0]||"-",r[1]||"-",r[2]||"-"]}let n=l("asia"),i=l("eu"),o=l("bs"),c=l("cr"),d=r(n,"opening"),x=r(n,"latest"),h=r(i,"opening"),m=r(i,"latest"),p=r(o,"opening"),u=r(o,"latest"),g=r(c,"opening"),b=r(c,"latest"),f=({children:e})=>(0,a.jsx)("th",{className:"px-2 py-2 text-[9px] sm:text-[10px] font-bold uppercase tracking-wider text-slate-500 border-b border-slate-100 text-center",children:e}),j=({children:e,color:t})=>(0,a.jsx)("td",{className:`px-2 py-2.5 text-center text-[11px] sm:text-xs font-bold ${t||"text-slate-600"} border-b border-slate-50`,children:e});return(0,a.jsxs)("div",{className:"overflow-x-auto",children:[(0,a.jsxs)("table",{className:"w-full min-w-[600px]",children:[(0,a.jsxs)("thead",{children:[(0,a.jsxs)("tr",{className:"bg-slate-50",children:[(0,a.jsx)("th",{className:"px-4 py-2 text-left border-b border-slate-100",rowSpan:2,children:(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("div",{className:"w-7 h-7 rounded bg-gradient-to-br from-[#1d4ed8] to-[#3b82f6] flex items-center justify-center text-white text-[9px] font-black shadow-sm",children:"B"}),(0,a.jsx)("span",{className:"text-slate-600 text-[11px] font-bold tracking-wider",children:"SPORT"})]})}),(0,a.jsx)("th",{colSpan:3,className:"px-1 py-1.5 text-center text-[9px] sm:text-[10px] font-bold uppercase tracking-wider text-[#4681E8] border-b border-l border-slate-100",children:"CƯỢC CH\xc2U \xc1"}),(0,a.jsx)("th",{colSpan:3,className:"px-1 py-1.5 text-center text-[9px] sm:text-[10px] font-bold uppercase tracking-wider text-[#4681E8] border-b border-l border-slate-100",children:"CƯỢC CH\xc2U \xc2U"}),(0,a.jsx)("th",{colSpan:3,className:"px-1 py-1.5 text-center text-[9px] sm:text-[10px] font-bold uppercase tracking-wider text-[#4681E8] border-b border-l border-slate-100",children:"T\xc0I XỈU"}),(0,a.jsx)("th",{colSpan:3,className:"px-1 py-1.5 text-center text-[9px] sm:text-[10px] font-bold uppercase tracking-wider text-[#4681E8] border-b border-l border-slate-100",children:"K\xc8O G\xd3C"})]}),(0,a.jsxs)("tr",{className:"bg-slate-50",children:[(0,a.jsx)(f,{children:"CHỦ"}),(0,a.jsx)(f,{children:"CHẤP"}),(0,a.jsx)(f,{children:"KH\xc1CH"}),(0,a.jsx)(f,{children:"CHỦ"}),(0,a.jsx)(f,{children:"H\xd2A"}),(0,a.jsx)(f,{children:"KH\xc1CH"}),(0,a.jsx)(f,{children:"T\xc0I"}),(0,a.jsx)(f,{children:"TỶ LỆ"}),(0,a.jsx)(f,{children:"XỈU"}),(0,a.jsx)(f,{children:"T\xc0I"}),(0,a.jsx)(f,{children:"TỶ LỆ"}),(0,a.jsx)(f,{children:"XỈU"})]})]}),(0,a.jsxs)("tbody",{children:[(0,a.jsxs)("tr",{className:"hover:bg-slate-50 transition-colors",children:[(0,a.jsx)("td",{className:"px-4 py-2.5 text-[11px] sm:text-xs text-slate-500 font-medium border-b border-slate-50",children:"Tỷ Lệ Mở Cược"}),(0,a.jsx)(j,{children:d[0]}),(0,a.jsx)(j,{color:"text-red-400",children:d[1]}),(0,a.jsx)(j,{children:d[2]}),(0,a.jsx)(j,{children:h[0]}),(0,a.jsx)(j,{children:h[1]}),(0,a.jsx)(j,{children:h[2]}),(0,a.jsx)(j,{children:p[0]}),(0,a.jsx)(j,{children:p[1]}),(0,a.jsx)(j,{children:p[2]}),(0,a.jsx)(j,{children:g[0]}),(0,a.jsx)(j,{children:g[1]}),(0,a.jsx)(j,{children:g[2]})]}),(0,a.jsxs)("tr",{className:"hover:bg-slate-50 transition-colors",children:[(0,a.jsx)("td",{className:"px-4 py-2.5 text-[11px] sm:text-xs text-slate-500 font-medium border-b border-slate-50",children:"Tỷ Lệ Trước Trận"}),(0,a.jsx)(j,{children:x[0]}),(0,a.jsx)(j,{color:"text-red-400",children:x[1]}),(0,a.jsx)(j,{children:x[2]}),(0,a.jsx)(j,{children:m[0]}),(0,a.jsx)(j,{children:m[1]}),(0,a.jsx)(j,{children:m[2]}),(0,a.jsx)(j,{children:u[0]}),(0,a.jsx)(j,{children:u[1]}),(0,a.jsx)(j,{children:u[2]}),(0,a.jsx)(j,{children:b[0]}),(0,a.jsx)(j,{children:b[1]}),(0,a.jsx)(j,{children:b[2]})]}),(0,a.jsxs)("tr",{className:"hover:bg-slate-50 transition-colors bg-white",children:[(0,a.jsxs)("td",{className:"px-4 py-2.5 text-[11px] sm:text-xs text-slate-700 font-bold flex items-center gap-1.5 border-b border-slate-50",children:["Live ",(0,a.jsx)("span",{className:"w-1.5 h-1.5 rounded-full bg-red-500 animate-pulse"})]}),(0,a.jsx)(j,{color:"text-green-400",children:x[0]}),(0,a.jsx)(j,{color:"text-red-400",children:x[1]}),(0,a.jsx)(j,{color:"text-green-400",children:x[2]}),(0,a.jsx)(j,{color:"text-green-400",children:m[0]}),(0,a.jsx)(j,{color:"text-green-400",children:m[1]}),(0,a.jsx)(j,{color:"text-green-400",children:m[2]}),(0,a.jsx)(j,{color:"text-green-400",children:u[0]}),(0,a.jsx)(j,{children:u[1]}),(0,a.jsx)(j,{color:"text-green-400",children:u[2]}),(0,a.jsx)(j,{color:"text-green-400",children:b[0]}),(0,a.jsx)(j,{children:b[1]}),(0,a.jsx)(j,{color:"text-green-400",children:b[2]})]})]})]}),(0,a.jsx)("p",{className:"text-center text-slate-400 text-[10px] py-2.5 border-t border-slate-100",children:"Tỷ lệ k\xe8o sẽ được cập nhật gần giờ thi đấu"})]})}},10327:(e,t,s)=>{"use strict";s.d(t,{T:()=>r});var a=s(68019),l=s(70508);
86function r({eyebrow:e,title:t,titleAddon:s,rightSlot:n,className:i}){return(0,a.jsx)("div",{className:(0,l.cn)("relative mb-5 overflow-hidden border-b border-slate-200",i),children:(0,a.jsxs)("div",{className:"flex items-center justify-between px-1 py-4 min-h-[56px]",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 min-w-0",children:[(0,a.jsx)("span",{className:"h-8 w-1 shrink-0 rounded-sm bg-gradient-to-b from-[#4681E8] to-[#55CAF1] shadow-[0_0_10px_rgba(70,129,232,0.5)]"}),(0,a.jsxs)("div",{className:"min-w-0",children:[e&&(0,a.jsx)("div",{className:"text-[10px] font-bold uppercase tracking-[0.2em] text-[#4681E8]/60 mb-0.5",children:e}),(0,a.jsxs)("div",{className:"flex items-center gap-2.5 flex-wrap",children:[(0,a.jsx)("h1",{className:"text-[18px] sm:text-[22px] font-black uppercase tracking-tight text-slate-800 leading-none",children:t}),s]})]})]}),n&&(0,a.jsx)("div",{className:"hidden sm:flex items-center gap-2 text-right shrink-0 ml-4",children:n})]})})}},10793:(e,t,s)=>{"use strict";s.d(t,{StandingsClient:()=>h});var a=s(68019),l=s(10707),r=s(46914),n=s(75627);function i(e){return"W"===e?"border border-emerald-500/45 bg-emerald-500/25 text-emerald-300 shadow-[0_0_0_1px_rgba(16,185,129,0.08)_inset]":"L"===e?"border border-red-500/45 bg-red-500/25 text-red-300 shadow-[0_0_0_1px_rgba(239,68,68,0.08)_inset]":"D"===e?"border border-amber-400/45 bg-amber-400/22 text-amber-200 shadow-[0_0_0_1px_rgba(251,191,36,0.08)_inset]":"border border-slate-500/40 bg-slate-500/18 text-slate-700"}function o(e,t){return 1===e?{bar:"bg-[linear-gradient(180deg,#facc15,#f97316)]",badge:"border-emerald-600/60 bg-slate-100 text-yellow-700 shadow-[0_0_18px_rgba(250,204,21,0.14)]",row:"from-[#32230d]/70 via-transparent to-transparent"}:e<=4?{bar:"bg-[linear-gradient(180deg,#fb7185,#f97316)]",badge:"border-[#fb7185]/45 bg-slate-100 text-rose-700",row:"from-[#241318]/55 via-transparent to-transparent"}:e<=6?{bar:"bg-[linear-gradient(180deg,#f59e0b,#facc15)]",badge:"border-[#f59e0b]/45 bg-slate-100 text-yellow-700",row:"from-[#24190b]/45 via-transparent to-transparent"}:e<=10?{bar:"bg-[linear-gradient(180deg,#38bdf8,#2563eb)]",badge:"border-sky-400/40 bg-white text-sky-700",row:"from-[#101725]/32 via-transparent to-transparent"}:e>=Math.max(t-2,1)?{bar:"bg-[linear-gradient(180deg,#ef4444,#7f1d1d)]",badge:"border-red-500/40 bg-slate-100 text-red-700",row:"from-[#220f14]/45 via-transparent to-transparent"}:{bar:"bg-[linear-gradient(180deg,#64748b,#334155)]",badge:"border-slate-500/35 bg-white text-slate-700",row:"from-[#12161d]/24 via-transparent to-transparent"}}function c({detail:e}){let[t,s]=(0,l.useState)(!1),n=(0,l.useRef)(null),[o,d]=(0,l.useState)({top:0,left:0}),x=i(e.result),h=(0,l.useCallback)(()=>{if(n.current){let e=n.current.getBoundingClientRect();d({top:e.top+window.scrollY-8,left:e.left+e.width/2+window.scrollX})}s(!0)},[]);return(0,a.jsxs)("div",{ref:n,className:"relative inline-flex",onMouseEnter:h,onMouseLeave:()=>s(!1),children:[(0,a.jsx)("span",{className:`inline-flex h-7 w-7 items-center justify-center rounded-[8px] text-[11px] font-black cursor-pointer transition-transform hover:-translate-y-0.5 ${x}`,children:e.result}),t&&e.match_time&&"u">typeof document&&(0,r.createPortal)((0,a.jsxs)("div",{className:"fixed z-[9999] w-[220px] pointer-events-none",style:{top:`${o.top}px`,left:`${o.left}px`,transform:"translate(-50%, -100%)",position:"absolute"},children:[(0,a.jsxs)("div",{className:"overflow-hidden rounded-xl border border-[#cbd5e1] bg-white shadow-2xl",children:[(0,a.jsx)("div",{className:"bg-slate-100 px-3 py-1.5 text-[10px] text-slate-600 font-mono text-center border-b border-[#cbd5e1]",children:e.match_time}),(0,a.jsxs)("div",{className:"px-3 py-2.5 flex items-center justify-between gap-2",children:[(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5 flex-1 min-w-0",children:[e.home_logo?(0,a.jsx)("img",{src:e.home_logo,alt:e.home_team,className:"w-7 h-7 object-contain",loading:"lazy",decoding:"async"}):(0,a.jsx)("div",{className:"w-7 h-7 rounded-full bg-gray-700 flex items-center justify-center text-[8px] text-slate-600 font-bold",children:"?"}),(0,a.jsx)("span",{className:"text-[9px] text-slate-600 font-bold text-center leading-tight line-clamp-2 max-w-[70px]",children:e.home_team})]}),(0,a.jsx)("div",{className:"text-slate-900 font-black text-sm whitespace-nowrap px-1",children:e.score||"? - ?"}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5 flex-1 min-w-0",children:[e.away_logo?(0,a.jsx)("img",{src:e.away_logo,alt:e.away_team,className:"w-7 h-7 object-contain",loading:"lazy",decoding:"async"}):(0,a.jsx)("div",{className:"w-7 h-7 rounded-full bg-gray-700 flex items-center justify-center text-[8px] text-slate-600 font-bold",children:"?"}),(0,a.jsx)("span",{className:"text-[9px] text-slate-600 font-bold text-center leading-tight line-clamp-2 max-w-[70px]",children:e.away_team})]})]})]}),(0,a.jsx)("div",{className:"absolute left-1/2 -translate-x-1/2 -bottom-1 w-2 h-2 bg-white border-r border-b border-[#cbd5e1] rotate-45"})]}),document.body)]})}function d({result:e}){let t=i(e);return(0,a.jsx)("span",{className:`inline-flex h-7 w-7 items-center justify-center rounded-[8px] text-[11px] font-black ${t}`,children:e})}function x({value:e,totalTeams:t}){let s=Number(e);if(!Number.isFinite(s))return(0,a.jsx)("td",{className:"px-4 py-4 text-center font-mono font-black text-slate-400",children:e});let l=o(s,t);return(0,a.jsxs)("td",{className:"relative px-4 py-4 text-center font-mono",children:[(0,a.jsx)("span",{className:`absolute left-0 top-1/2 h-7 w-1 -translate-y-1/2 roun
86ded-r-full ${l.bar}`}),(0,a.jsx)("span",{className:`inline-flex h-8 w-8 items-center justify-center rounded-[10px] border text-[13px] font-black ${l.badge}`,children:s})]})}function h({initialData:e}){let[t]=(0,l.useState)(!1),[s,r]=(0,l.useState)(!1),[i,p]=(0,l.useState)(""),u=(0,l.useRef)(null);if((0,l.useEffect)(()=>{function e(e){u.current&&!u.current.contains(e.target)&&r(!1)}return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[]),!e)return(0,a.jsx)("div",{className:"text-center py-20 text-slate-600",children:"Đang tải dữ liệu..."});let g=e.available_leagues||[],b=g.filter(e=>e.name.toLowerCase().includes(i.toLowerCase())),f=e.teams&&e.teams.length>0&&Array.isArray(e.teams[0]?.form),j=!f&&e.rankings;return(0,a.jsxs)("div",{className:"mx-auto max-w-[1440px] px-4 py-8",children:[(0,a.jsx)(n.R,{eyebrow:"Bảng xếp hạng",title:"BẢNG XẾP HẠNG",rightSlot:(0,a.jsx)("div",{className:"text-[12px] text-slate-600",children:(0,a.jsx)("span",{className:"text-slate-900/80 font-bold",children:e.league_name})})}),g.length>0&&(0,a.jsxs)("div",{className:"mb-6",ref:u,children:[(0,a.jsxs)("div",{className:"relative inline-flex min-w-[320px] items-center gap-3 rounded-2xl border border-slate-200 bg-white backdrop-blur-md px-5 py-3.5 cursor-pointer shadow-[0_8px_30px_rgba(0,0,0,0.06)] transition-colors hover:border-[#4681E8]/50 hover:shadow-[0_8px_30px_rgba(70,129,232,0.1)]",onClick:()=>r(!s),children:[e.league_icon&&(0,a.jsx)("img",{src:e.league_icon,alt:e.league_name||"League icon",className:"w-6 h-6 object-contain",loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-slate-800 font-bold text-sm flex-1",children:e.league_name||"Chọn giải đấu"}),(0,a.jsx)("svg",{className:`w-4 h-4 text-[#4681E8] transition-transform ${s?"rotate-180":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),s&&(0,a.jsxs)("div",{className:"absolute z-50 mt-2 w-[360px] overflow-hidden rounded-2xl border border-slate-200 bg-white backdrop-blur-xl shadow-[0_24px_80px_rgba(0,0,0,0.15)]",children:[(0,a.jsx)("div",{className:"p-2 border-b border-slate-100",children:(0,a.jsx)("input",{type:"text",placeholder:"T\xecm kiếm giải đấu...",value:i,onChange:e=>p(e.target.value),className:"w-full bg-slate-50 text-slate-800 text-sm px-4 py-2.5 rounded-xl border border-transparent outline-none focus:border-[#4681E8]/50 placeholder-slate-400 transition-colors",autoFocus:!0})}),(0,a.jsxs)("div",{className:"max-h-[340px] overflow-y-auto",children:[b.map(t=>(0,a.jsxs)("a",{href:`/standings?league=${encodeURIComponent(t.id)}`,className:`flex items-center gap-3 px-4 py-3 cursor-pointer transition-colors hover:bg-slate-50 ${t.id===e.league_id?"bg-[#4681E8]/10 border-l-4 border-[#4681E8]":""}`,children:[t.icon?(0,a.jsx)("img",{src:t.icon,alt:t.name||"League",className:"w-5 h-5 object-contain flex-shrink-0",loading:"lazy",decoding:"async"}):(0,a.jsx)("div",{className:"w-5 h-5 rounded bg-gray-700 flex-shrink-0"}),(0,a.jsx)("span",{className:"text-sm text-slate-900 truncate",children:t.name})]},t.id)),0===b.length&&(0,a.jsx)("div",{className:"px-4 py-8 text-center text-gray-500 text-sm",children:"Kh\xf4ng t\xecm thấy giải đấu"})]})]})]}),t&&(0,a.jsxs)("div",{className:"flex items-center justify-center py-12",children:[(0,a.jsx)("div",{className:"animate-spin w-8 h-8 border-2 border-emerald-600 border-t-transparent rounded-full"}),(0,a.jsx)("span",{className:"ml-3 text-slate-600 text-sm",children:"Đang tải bảng xếp hạng từ server..."})]}),!t&&f&&(0,a.jsxs)("div",{className:"overflow-hidden rounded-[24px] border border-slate-200 bg-white shadow-[0_8px_30px_rgba(0,0,0,0.08)]",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between gap-3 border-b border-[#4681E8]/20 bg-gradient-to-r from-[#4681E8] to-[#2563eb] px-6 py-4 text-white shadow-[0_4px_25px_rgba(70,129,232,0.3)]",children:[(0,a.jsx)("div",{className:"text-[13px] font-black uppercase tracking-[0.2em] drop-shadow-sm text-white/80",children:"League"}),(0,a.jsx)("div",{className:"truncate text-sm font-black sm:text-base drop-shadow-md",children:e.league_name})]}),(0,a.jsx)("div",{className:"overflow-x-auto",children:(0,a.jsxs)("table",{className:"w-full text-left border-collapse",children:[(0,a.jsx)("thead",{children:(0,a.jsx)("tr",{className:"bg-slate-50 text-[11px] uppercase tracking-[0.2em] text-slate-500",children:e.header.map((t,s)=>{let l=e.teams.some(e=>e.form&&e.form.length>0);return t.toLowerCase().includes("phong độ")&&!l?null:(0,a.jsx)("th",{colSpan:s===e.header.length-1&&l?5:1,className:`p-4 font-semibold ${1===s?"w-1/3 text-left":"text-center"}`,children:t},s)})})}),(0,a.jsx)("tbody",{className:"text-sm",children:e.teams.map((t,s)=>(o(Number(t.data[0]||s+1),e.teams.length),(0,a.jsxs)("tr",{className:"group border-b border-slate-100 bg-white transition-colors hover:bg-slate-50 cursor-pointer",children:[t.data.map((s,l)=>0===l?(0,a.jsx)(x,{value:s,totalTeams:e.teams.length},l):1===l?(0,a.jsx)("td",{className:"p-4",children:(0,a.jsxs)("div",{className:"flex items-center gap-3 rounded-2xl border border-slate-100 bg-slate-50 px-4 py-2.5 transition-colors group-hover:border-[#4681E8]/30 group-hover:bg-[#4681E8]/5",children:[t.team_logo?(0,a.jsx)("img",{src:t.team_logo,alt:s,className:"h-8 w-8 rounded-full bg-white object-contain p-0.5 filter drop-shadow-[0_2px_4px_rgba(0,0,0,0.1)]",loading:"lazy"}):(0,a.jsx)("div",{className:"flex h-8 w-8 items-center justify-center rounded-full border border-slate-200 bg-white text-[10px] font-bold text-slate-400",children:"?"}),(0,a.jsx)("span",{className:"font-bold text-slate-800 transition-colors group-hover:text-[#4681E8]",children:s})]})},l):(0,a.jsx)("td",{className:"p-4 text-center font-mono text-slate-600",children:s},l)),t.form&&t.form.length>0&&(0,a.jsxs)(a.Fragment,{children:[t.form.map((e,t)=>(0,a.jsx)("td",{className:"p-2 text-center",children:e.match_time?(0,a.jsx)(c,{detail:e}):(0,a.jsx)(d,{result:e.result})},`form-${t}`)),t.form.length<5&&Array.from({length:5-t.form.length}).map((e,t)=>(0,a.jsx)("td",{className:"p-2"},`pad-${t}`))]})]},s)))})]})})]}),!t&&!f&&j&&(0,a.jsx)(m,{rankings:e.rankings}),!t&&!f&&!j&&e.header&&e.teams&&(0,a.jsx)("div",{className:"text-center py-20 text-slate-600",children:"Dữ liệu đang được cập nhật..."}),!t&&(f||j)&&(0,a.jsxs)("div",{className:"mt-6 flex flex-wrap items-center gap-5 px-5 py-4 bg-slate-50 rounded-2xl border border-slate-200",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,a.jsx)("span",{className:"w-2.5 h-2.5 rounded-full bg-emerald-500"}),(0,a.jsx)("span",{className:"text-[11px] text-slate-600 font-bold uppercase tracking-wider",children:"Đội trưởng bảng"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,a.jsx)("span",{className:"w-2.5 h-2.5 rounded-full bg-sky-4
8600"}),(0,a.jsx)("span",{className:"text-[11px] text-slate-600 font-bold uppercase tracking-wider",children:"Champions League"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,a.jsx)("span",{className:"w-2.5 h-2.5 rounded-full bg-amber-500"}),(0,a.jsx)("span",{className:"text-[11px] text-slate-600 font-bold uppercase tracking-wider",children:"Europa League"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,a.jsx)("span",{className:"w-2.5 h-2.5 rounded-full bg-[#f97316]"}),(0,a.jsx)("span",{className:"text-[11px] text-slate-600 font-bold uppercase tracking-wider",children:"Europa Conference"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,a.jsx)("span",{className:"w-2.5 h-2.5 rounded-full bg-[#E11D48]"}),(0,a.jsx)("span",{className:"text-[11px] text-slate-600 font-bold uppercase tracking-wider",children:"Xuống hạng"})]})]})]})}function m({rankings:e}){if(!e||0===e.length)return null;let t=e[0].data,s=e.slice(1);return(0,a.jsx)("div",{className:"overflow-hidden rounded-[22px] border border-[#cbd5e1] bg-[linear-gradient(180deg,#191a20,#111218)] shadow-[0_24px_80px_rgba(0,0,0,0.4)]",children:(0,a.jsx)("div",{className:"overflow-x-auto",children:(0,a.jsxs)("table",{className:"w-full text-left border-collapse",children:[(0,a.jsx)("thead",{children:(0,a.jsx)("tr",{className:"bg-white text-[11px] uppercase tracking-[0.18em] text-slate-600",children:t.map((e,l)=>{let r=l===t.length-1,n=s[0]&&s[0].data.length>t.length?s[0].data.length-t.length+1:1;return(0,a.jsx)("th",{colSpan:r?n:1,className:`p-4 font-semibold ${1===l?"w-1/3 text-left":"text-center"}`,children:e},l)})})}),(0,a.jsx)("tbody",{className:"text-sm",children:s.map((e,t)=>(0,a.jsx)("tr",{className:"group border-b border-[#cbd5e1] transition-colors hover:bg-white",children:e.data.map((t,l)=>0===l?(0,a.jsx)(x,{value:t,totalTeams:s.length},l):1===l?(0,a.jsx)("td",{className:"p-4",children:(0,a.jsxs)("div",{className:"flex items-center gap-3 rounded-2xl border border-white/6 bg-[linear-gradient(180deg,rgba(255,255,255,0.03),rgba(255,255,255,0.01))] px-3 py-2 transition-colors group-hover:border-emerald-600/22",children:[e.team_logo?(0,a.jsx)("img",{src:e.team_logo,alt:t,className:"h-8 w-8 rounded-full bg-white/5 object-contain ring-1 ring-white/8",loading:"lazy"}):(0,a.jsx)("div",{className:"flex h-8 w-8 items-center justify-center rounded-full border border-gray-700 bg-gray-800 text-xs font-bold text-gray-500",children:"?"}),(0,a.jsx)("span",{className:"font-bold text-slate-900 transition-colors group-hover:text-emerald-600",children:t})]})},l):["W","D","L"].includes(t)?(0,a.jsx)("td",{className:"p-2 text-center",children:(0,a.jsx)("span",{className:`inline-flex h-7 w-7 items-center justify-center rounded-[8px] text-[11px] font-black ${i(t)}`,children:t})},l):(0,a.jsx)("td",{className:"p-4 text-center font-mono text-slate-600",children:t},l))},t))})]})})})}},11231:(e,t,s)=>{"use strict";s.d(t,{StandingsClient:()=>h});var a=s(68019),l=s(10707),r=s(46914),n=s(30675);function i(e){return"W"===e?"border border-emerald-500/45 bg-emerald-500/25 text-emerald-300 shadow-[0_0_0_1px_rgba(16,185,129,0.08)_inset]":"L"===e?"border border-red-500/45 bg-red-500/25 text-red-300 shadow-[0_0_0_1px_rgba(239,68,68,0.08)_inset]":"D"===e?"border border-amber-400/45 bg-amber-400/22 text-amber-200 shadow-[0_0_0_1px_rgba(251,191,36,0.08)_inset]":"border border-slate-500/40 bg-slate-500/18 text-slate-700"}function o(e,t){return 1===e?{bar:"bg-[linear-gradient(180deg,#facc15,#f97316)]",badge:"border-emerald-600/60 bg-slate-100 text-yellow-700 shadow-[0_0_18px_rgba(250,204,21,0.14)]",row:"from-[#32230d]/70 via-transparent to-transparent"}:e<=4?{bar:"bg-[linear-gradient(180deg,#fb7185,#f97316)]",badge:"border-[#fb7185]/45 bg-slate-100 text-rose-700",row:"from-[#241318]/55 via-transparent to-transparent"}:e<=6?{bar:"bg-[linear-gradient(180deg,#f59e0b,#facc15)]",badge:"border-[#f59e0b]/45 bg-slate-100 text-yellow-700",row:"from-[#24190b]/45 via-transparent to-transparent"}
86:e<=10?{bar:"bg-[linear-gradient(180deg,#38bdf8,#2563eb)]",badge:"border-sky-400/40 bg-white text-sky-700",row:"from-[#101725]/32 via-transparent to-transparent"}:e>=Math.max(t-2,1)?{bar:"bg-[linear-gradient(180deg,#ef4444,#7f1d1d)]",badge:"border-red-500/40 bg-slate-100 text-red-700",row:"from-[#220f14]/45 via-transparent to-transparent"}:{bar:"bg-[linear-gradient(180deg,#64748b,#334155)]",badge:"border-slate-500/35 bg-white text-slate-700",row:"from-[#12161d]/24 via-transparent to-transparent"}}function c({detail:e}){let[t,s]=(0,l.useState)(!1),n=(0,l.useRef)(null),[o,d]=(0,l.useState)({top:0,left:0}),x=i(e.result),h=(0,l.useCallback)(()=>{if(n.current){let e=n.current.getBoundingClientRect();d({top:e.top+window.scrollY-8,left:e.left+e.width/2+window.scrollX})}s(!0)},[]);return(0,a.jsxs)("div",{ref:n,className:"relative inline-flex",onMouseEnter:h,onMouseLeave:()=>s(!1),children:[(0,a.jsx)("span",{className:`inline-flex h-7 w-7 items-center justify-center rounded-[8px] text-[11px] font-black cursor-pointer transition-transform hover:-translate-y-0.5 ${x}`,children:e.result}),t&&e.match_time&&"u">typeof document&&(0,r.createPortal)((0,a.jsxs)("div",{className:"fixed z-[9999] w-[220px] pointer-events-none",style:{top:`${o.top}px`,left:`${o.left}px`,transform:"translate(-50%, -100%)",position:"absolute"},children:[(0,a.jsxs)("div",{className:"overflow-hidden rounded-xl border border-[#cbd5e1] bg-white shadow-2xl",children:[(0,a.jsx)("div",{className:"bg-slate-100 px-3 py-1.5 text-[10px] text-slate-600 font-mono text-center border-b border-[#cbd5e1]",children:e.match_time}),(0,a.jsxs)("div",{className:"px-3 py-2.5 flex items-center justify-between gap-2",children:[(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5 flex-1 min-w-0",children:[e.home_logo?(0,a.jsx)("img",{src:e.home_logo,alt:e.home_team,className:"w-7 h-7 object-contain",loading:"lazy",decoding:"async"}):(0,a.jsx)("div",{className:"w-7 h-7 rounded-full bg-gray-700 flex items-center justify-center text-[8px] text-slate-600 font-bold",children:"?"}),(0,a.jsx)("span",{className:"text-[9px] text-slate-600 font-bold text-center leading-tight line-clamp-2 max-w-[70px]",children:e.home_team})]}),(0,a.jsx)("div",{className:"text-slate-900 font-black text-sm whitespace-nowrap px-1",children:e.score||"? - ?"}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5 flex-1 min-w-0",children:[e.away_logo?(0,a.jsx)("img",{src:e.away_logo,alt:e.away_team,className:"w-7 h-7 object-contain",loading:"lazy",decoding:"async"}):(0,a.jsx)("div",{className:"w-7 h-7 rounded-full bg-gray-700 flex items-center justify-center text-[8px] text-slate-600 font-bold",children:"?"}),(0,a.jsx)("span",{className:"text-[9px] text-slate-600 font-bold text-center leading-tight line-clamp-2 max-w-[70px]",children:e.away_team})]})]})]}),(0,a.jsx)("div",{className:"absolute left-1/2 -translate-x-1/2 -bottom-1 w-2 h-2 bg-white border-r border-b border-[#cbd5e1] rotate-45"})]}),document.body)]})}function d({result:e}){let t=i(e);return(0,a.jsx)("span",{className:`inline-flex h-7 w-7 items-center justify-center rounded-[8px] text-[11px] font-black ${t}`,children:e})}function x({value:e,totalTeams:t}){let s=Number(e);if(!Number.isFinite(s))return(0,a.jsx)("td",{className:"px-4 py-4 text-center font-mono font-black text-slate-400",children:e});let l=o(s,t);return(0,a.jsxs)("td",{className:"relative px-4 py-4 text-center font-mono",children:[(0,a.jsx)("span",{className:`absolute left-0 top-1/2 h-7 w-1 -translate-y-1/2 rounded-r-full ${l.bar}`}),(0,a.jsx)("span",{className:`inline-flex h-8 w-8 items-center justify-center rounded-[10px] border text-[13px] font-black ${l.badge}`,children:s})]})}function h({initialData:e}){let[t]=(0,l.useState)(!1),[s,r]=(0,l.useState)(!1),[i,p]=(0,l.useState)(""),u=(0,l.useRef)(null);if((0,l.useEffect)(()=>{function e(e){u.current&&!u.current.contains(e.target)&&r(!1)}return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[]),!e)return(0,a.jsx)("div",{className:"text-center py-20 text-slate-600",children:"Đang tải dữ liệu..."});let g=e.available_leagues||[],b=g.filter(e=>e.name.toLowerCase().includes(i.toLowerCase())),f=e.teams&&e.teams.length>0&&Array.isArray(e.teams[0]?.form),j=!f&&e.rankings;return(0,a.jsxs)("div",{className:"mx-auto max-w-[1440px] px-4 py-8",children:[(0,a.jsx)(n.D,{eyebrow:"Bảng xếp hạng",title:"BẢNG XẾP HẠNG",rightSlot:(0,a.jsx)("div",{className:"text-[12px] text-slate-600",children:(0,a.jsx)("span",{className:"text-slate-900/80 font-bold",children:e.league_name})})}),g.length>0&&(0,a.jsxs)("div",{className:"mb-6",ref:u,children:[(0,a.jsxs)("div",{className:"relative inline-flex min-w-[320px] items-center gap-3 rounded-2xl border border-slate-200 bg-white backdrop-blur-md px-5 py-3.5 cursor-pointer shadow-[0_8px_30px_rgba(0,0,0,0.06)] transition-colors hover:border-[#4681E8]/50 hover:shadow-[0_8px_30px_rgba(70,129,232,0.1)]",onClick:()=>r(!s),children:[e.league_icon&&(0,a.jsx)("img",{src:e.league_icon,alt:e.league_name||"League icon",className:"w-6 h-6 object-contain",loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-slate-800 font-bold text-sm flex-1",children:e.league_name||"Chọn giải đấu"}),(0,a.jsx)("svg",{className:`w-4 h-4 text-[#4681E8] transition-transform ${s?"rotate-180":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),s&&(0,a.jsxs)("div",{className:"absolute z-50 mt-2 w-[360px] overflow-hidden rounded-2xl border border-slate-200 bg-white backdrop-blur-xl shadow-[0_24px_80px_rgba(0,0,0,0.15)]",children:[(0,a.jsx)("div",{className:"p-2 border-b border-slate-100",children:(0,a.jsx)("input",{type:"text",placeholder:"T\xecm kiếm giải đấu...",value:i,onChange:e=>p(e.target.value),className:"w-full bg-slate-50 text-slate-800 text-sm px-4 py-2.5 rounded-xl border border-transparent outline-none focus:border-[#4681E8]/50 placeholder-slate-400 transition-colors",autoF
86ocus:!0})}),(0,a.jsxs)("div",{className:"max-h-[340px] overflow-y-auto",children:[b.map(t=>(0,a.jsxs)("a",{href:`/standings?league=${encodeURIComponent(t.id)}`,className:`flex items-center gap-3 px-4 py-3 cursor-pointer transition-colors hover:bg-slate-50 ${t.id===e.league_id?"bg-[#4681E8]/10 border-l-4 border-[#4681E8]":""}`,children:[t.icon?(0,a.jsx)("img",{src:t.icon,alt:t.name||"League",className:"w-5 h-5 object-contain flex-shrink-0",loading:"lazy",decoding:"async"}):(0,a.jsx)("div",{className:"w-5 h-5 rounded bg-gray-700 flex-shrink-0"}),(0,a.jsx)("span",{className:"text-sm text-slate-900 truncate",children:t.name})]},t.id)),0===b.length&&(0,a.jsx)("div",{className:"px-4 py-8 text-center text-gray-500 text-sm",children:"Kh\xf4ng t\xecm thấy giải đấu"})]})]})]}),t&&(0,a.jsxs)("div",{className:"flex items-center justify-center py-12",children:[(0,a.jsx)("div",{className:"animate-spin w-8 h-8 border-2 border-emerald-600 border-t-transparent rounded-full"}),(0,a.jsx)("span",{className:"ml-3 text-slate-600 text-sm",children:"Đang tải bảng xếp hạng từ server..."})]}),!t&&f&&(0,a.jsxs)("div",{className:"overflow-hidden rounded-[24px] border border-slate-200 bg-white shadow-[0_8px_30px_rgba(0,0,0,0.08)]",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between gap-3 border-b border-[#4681E8]/20 bg-gradient-to-r from-[#4681E8] to-[#2563eb] px-6 py-4 text-white shadow-[0_4px_25px_rgba(70,129,232,0.3)]",children:[(0,a.jsx)("div",{className:"text-[13px] font-black uppercase tracking-[0.2em] drop-shadow-sm text-white/80",children:"League"}),(0,a.jsx)("div",{className:"truncate text-sm font-black sm:text-base drop-shadow-md",children:e.league_name})]}),(0,a.jsx)("div",{className:"overflow-x-auto",children:(0,a.jsxs)("table",{className:"w-full text-left border-collapse",children:[(0,a.jsx)("thead",{children:(0,a.jsx)("tr",{className:"bg-slate-50 text-[11px] uppercase tracking-[0.2em] text-slate-500",children:e.header.map((t,s)=>{let l=e.teams.some(e=>e.form&&e.form.length>0);return t.toLowerCase().includes("phong độ")&&!l?null:(0,a.jsx)("th",{colSpan:s===e.header.length-1&&l?5:1,className:`p-4 font-semibold ${1===s?"w-1/3 text-left":"text-center"}`,children:t},s)})})}),(0,a.jsx)("tbody",{className:"text-sm",children:e.teams.map((t,s)=>(o(Number(t.data[0]||s+1),e.teams.length),(0,a.jsxs)("tr",{className:"group border-b border-slate-100 bg-white transition-colors hover:bg-slate-50 cursor-pointer",children:[t.data.map((s,l)=>0===l?(0,a.jsx)(x,{value:s,totalTeams:e.teams.length},l):1===l?(0,a.jsx)("td",{className:"p-4",children:(0,a.jsxs)("div",{className:"flex items-center gap-3 rounded-2xl border border-slate-100 bg-slate-50 px-4 py-2.5 transition-colors group-hover:border-[#4681E8]/30 group-hover:bg-[#4681E8]/5",children:[t.team_logo?(0,a.jsx)("img",{src:t.team_logo,alt:s,className:"h-8 w-8 rounded-full bg-white object-contain p-0.5 filter drop-shadow-[0_2px_4px_rgba(0,0,0,0.1)]",loading:"lazy"}):(0,a.jsx)("div",{className:"flex h-8 w-8 items-center justify-center rounded-full border border-slate-200 bg-white text-[10px] font-bold text-slate-400",children:"?"}),(0,a.jsx)("span",{className:"font-bold text-slate-800 transition-colors group-hover:text-[#4681E8]",children:s})]})},l):(0,a.jsx)("td",{className:"p-4 text-center font-mono text-slate-600",children:s},l)),t.form&&t.form.length>0&&(0,a.jsxs)(a.Fragment,{children:[t.form.map((e,t)=>(0,a.jsx)("td",{className:"p-2 text-center",children:e.match_time?(0,a.jsx)(c,{detail:e}):(0,a.jsx)(d,{result:e.result})},`form-${t}`)),t.form.length<5&&Array.from({length:5-t.form.length}).map((e,t)=>(0,a.jsx)("td",{className:"p-2"},`pad-${t}`))]})]},s)))})]})})]}),!t&&!f&&j&&(0,a.jsx)(m,{rankings:e.rankings}),!t&&!f&&!j&&e.header&&e.teams&&(0,a.jsx)("div",{className:"text-center py-20 text-slate-600",children:"Dữ liệu đang được cập nhật..."}),!t&&(f||j)&&(0,a.jsxs)("div",{className:"mt-6 flex flex-wrap items-center gap-5 px-5 py-4 bg-slate-50 rounded-2xl border border-slate-200",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,a.jsx)("span",{className:"w-2.5 h-2.5 rounded-full bg-emerald-500"}),(0,a.jsx)("span",{className:"text-[11px] text-slate-600 font-bold uppercase tracking-wider",children:"Đội trưởng bảng"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,a.jsx)("span",{className:"w-2.5 h-2.5 rounded-full bg-sky-4
8600"}),(0,a.jsx)("span",{className:"text-[11px] text-slate-600 font-bold uppercase tracking-wider",children:"Champions League"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,a.jsx)("span",{className:"w-2.5 h-2.5 rounded-full bg-amber-500"}),(0,a.jsx)("span",{className:"text-[11px] text-slate-600 font-bold uppercase tracking-wider",children:"Europa League"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,a.jsx)("span",{className:"w-2.5 h-2.5 rounded-full bg-[#f97316]"}),(0,a.jsx)("span",{className:"text-[11px] text-slate-600 font-bold uppercase tracking-wider",children:"Europa Conference"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,a.jsx)("span",{className:"w-2.5 h-2.5 rounded-full bg-[#E11D48]"}),(0,a.jsx)("span",{className:"text-[11px] text-slate-600 font-bold uppercase tracking-wider",children:"Xuống hạng"})]})]})]})}function m({rankings:e}){if(!e||0===e.length)return null;let t=e[0].data,s=e.slice(1);return(0,a.jsx)("div",{className:"overflow-hidden rounded-[22px] border border-[#cbd5e1] bg-[linear-gradient(180deg,#191a20,#111218)] shadow-[0_24px_80px_rgba(0,0,0,0.4)]",children:(0,a.jsx)("div",{className:"overflow-x-auto",children:(0,a.jsxs)("table",{className:"w-full text-left border-collapse",children:[(0,a.jsx)("thead",{children:(0,a.jsx)("tr",{className:"bg-white text-[11px] uppercase tracking-[0.18em] text-slate-600",children:t.map((e,l)=>{let r=l===t.length-1,n=s[0]&&s[0].data.length>t.length?s[0].data.length-t.length+1:1;return(0,a.jsx)("th",{colSpan:r?n:1,className:`p-4 font-semibold ${1===l?"w-1/3 text-left":"text-center"}`,children:e},l)})})}),(0,a.jsx)("tbody",{className:"text-sm",children:s.map((e,t)=>(0,a.jsx)("tr",{className:"group border-b border-[#cbd5e1] transition-colors hover:bg-white",children:e.data.map((t,l)=>0===l?(0,a.jsx)(x,{value:t,totalTeams:s.length},l):1===l?(0,a.jsx)("td",{className:"p-4",children:(0,a.jsxs)("div",{className:"flex items-center gap-3 rounded-2xl border border-white/6 bg-[linear-gradient(180deg,rgba(255,255,255,0.03),rgba(255,255,255,0.01))] px-3 py-2 transition-colors group-hover:border-emerald-600/22",children:[e.team_logo?(0,a.jsx)("img",{src:e.team_logo,alt:t,className:"h-8 w-8 rounded-full bg-white/5 object-contain ring-1 ring-white/8",loading:"lazy"}):(0,a.jsx)("div",{className:"flex h-8 w-8 items-center justify-center rounded-full border border-gray-700 bg-gray-800 text-xs font-bold text-gray-500",children:"?"}),(0,a.jsx)("span",{className:"font-bold text-slate-900 transition-colors group-hover:text-emerald-600",children:t})]})},l):["W","D","L"].includes(t)?(0,a.jsx)("td",{className:"p-2 text-center",children:(0,a.jsx)("span",{className:`inline-flex h-7 w-7 items-center justify-center rounded-[8px] text-[11px] font-black ${i(t)}`,children:t})},l):(0,a.jsx)("td",{className:"p-4 text-center font-mono text-slate-600",children:t},l))},t))})]})})})}},11774:(e,t,s)=>{"use strict";s.d(t,{Klivevip10MatchDetailPage:()=>m});var a=s(68019),l=s(10707),r=s(58420);function n({src:e,poster:t,autoPlay:s=!0,onError:i,className:o=""}){let c=(0,l.useRef)(null),d=(0,l.useRef)(i);d.current=i;let[x,h]=(0,l.useState)(!1),[m,p]=(0,l.useState)(!1);return((0,l.useEffect)(()=>{let t=c.current;if(!t)return;let a=null;h(!1);let l=()=>p(!0),n=()=>p(!1);t.addEventListener("play",l),t.addEventListener("pause",n);let i=()=>{s&&(t.muted=!0,t.play().catch(()=>{}))};if(t.addEventListener("canplay",i),r.Ay.isSupported()){(a=new r.Ay({maxBufferLength:30,maxMaxBufferLength:60,lowLatencyMode:!0,enableWorker:!0})).loadSource(e),a.attachMedia(t),a.on(r.Ay.Events.MANIFEST_PARSED,()=>{s&&(t.muted=!0,t.play().catch(e=>{console.warn("AutoPlay failed:",e),t.muted=!1}))});let l=0,n=0;a.on(r.Ay.Events.ERROR,(e,t)=>{if(t.type===r.Ay.ErrorTypes.NETWORK_ERROR&&(++l>2||t.response&&t.response.code>=400)){console.error("HLS Network Error threshold reached (CORS/404), triggering fallback.",t),h(!0),d.current&&d.current(t),a?.destroy();return}if(t.fatal)switch(t.type){case r.Ay.ErrorTypes.NETWORK_ERROR:console.error("HLS Fatal Network Error, recovering...",t),a?.startLoad();break;case r.Ay.ErrorTypes.MEDIA_ERROR:console.error("HLS Media Error, recovering...",t),++n>3?(console.error("HLS Media Error threshold reached, triggering fallback."),h(!0),d.current&&d.current(t),a?.destroy()):a?.recoverMediaError();break;default:console.error("HLS Fatal Error:",t),h(!0),d.current&&d.current(t),a?.destroy()}})}else t.canPlayType("application/vnd.apple.mpegurl")&&(t.src=e,t.addEventListener("loadedmetadata",()=>{s&&t.play().catch(e=>{console.warn("AutoPlay failed:",e)})}),t.addEventListener("error",e=>{h(!0),d.current&&d.current(e)}));return()=>{t.removeEventListener("play",l),t.removeEventListener("pause",n),t.removeEventListener("canplay",i),a&&a.destroy()}},[e,s]),x)?i?null:(0,a.jsxs)("div",{className:`w-full h-full flex flex-col items-center justify-center bg-white/80 backdrop-blur ${o}`,children:[(0,a.jsx)("svg",{className:"w-12 h-12 text-red-500 mb-4 opacity-80",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"})}),(0,a.jsx)("div",{className:"text-slate-600 text-sm font-medium",children:"Video/Stream kh\xf4ng khả dụng hoặc bị lá
86»—i mạng"}),(0,a.jsx)("div",{className:"text-gray-500 text-xs mt-1",children:"Vui l\xf2ng thá»­ lại sau hoặc chọn nguồn kh\xe1c"})]}):(0,a.jsx)("div",{className:`relative group w-full h-full bg-white flex items-center justify-center overflow-hidden ${o}`,children:(0,a.jsx)("video",{ref:c,className:"w-full h-full object-contain",controls:!0,playsInline:!0,muted:s,poster:t,referrerPolicy:"no-referrer"})})}function i(e){let t=(e||"").split(/[\s-]+/).slice(0,2).map(e=>e[0]||"").join("").toUpperCase()||"??";return`data:image/svg+xml,${encodeURIComponent(`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 80 80"><rect width="80" height="80" rx="20" fill="#1a1c25"/><text x="40" y="47" font-size="20" font-family="Arial" font-weight="700" text-anchor="middle" fill="#666">${t}</text></svg>`)}`}function o({homeName:e,awayName:t,homeLogo:s,awayLogo:l,homeScore:r="0",awayScore:n="0",statusText:c="LIVE",timeText:d="",isLive:x=!0,sportId:h="1",matchId:m}){let p=s||i(e),u=l||i(t),g="5"===String(h),b="2"===String(h),f="bg-slate-200 border-slate-200",j="repeating-linear-gradient(90deg, transparent, transparent 10%, #000 10%, #000 20%)";return g?(f="bg-slate-100 border-slate-200",j="none"):b&&(f="bg-[#bc7a46] border-[#8a4e21]",j="repeating-linear-gradient(90deg, transparent, transparent 5%, #000 5%, #000 10%)"),(0,a.jsxs)("div",{className:"relative w-full aspect-video min-h-[300px] max-h-[600px] bg-slate-50 overflow-hidden flex flex-col justify-center",children:[(0,a.jsx)("div",{className:"absolute inset-0 flex items-center justify-center pointer-events-none mt-16 md:mt-24",children:(0,a.jsx)("div",{className:"relative w-[120%] h-[120%] sm:w-[90%] sm:h-[120%] max-w-[900px] flex-shrink-0 transition-transform duration-1000",style:{transform:"perspective(900px) rotateX(60deg) scale(0.9)",transformOrigin:"center center"},children:(0,a.jsxs)("div",{className:`absolute inset-0 ${f} shadow-[0_30px_60px_rgba(0,0,0,0.8)] border-4 rounded-xl overflow-hidden flex transition-colors duration-500`,children:[(0,a.jsx)("div",{className:"absolute inset-0 opacity-15 pointer-events-none",style:{backgroundImage:j}}),(0,a.jsxs)("div",{className:"absolute inset-[4%] pointer-events-none shadow-sm flex items-center justify-center",children:["1"===String(h)&&(0,a.jsxs)("div",{className:"absolute inset-0 w-full h-full border-2 border-white/60",children:[(0,a.jsx)("div",{className:"absolute left-1/2 top-0 bottom-0 w-0 border-l-2 border-white/60 -translate-x-1/2"}),(0,a.jsx)("div",{className:"absolute left-1/2 top-1/2 w-[18%] aspect-square rounded-full border-2 border-white/60 -translate-x-1/2 -translate-y-1/2"}),(0,a.jsx)("div",{className:"absolute left-1/2 top-1/2 w-2 h-2 rounded-full bg-white/80 -translate-x-1/2 -translate-y-1/2"}),(0,a.jsx)("div",{className:"absolute left-0 top-1/2 w-[16%] h-[46%] border-2 border-l-0 border-white/60 -translate-y-1/2 bg-slate-200"}),(0,a.jsx)("div",{className:"absolute left-0 top-1/2 w-[6%] h-[20%] border-2 border-l-0 border-white/60 -translate-y-1/2 bg-slate-200"}),(0,a.jsx)("div",{className:"absolute left-[16%] top-1/2 w-[8%] aspect-square border-2 border-l-0 border-white/60 rounded-r-full -translate-y-1/2 clip-path-half",style:{clipPath:"inset(0 0 0 50%)"}}),(0,a.jsx)("div",{className:"absolute right-0 top-1/2 w-[16%] h-[46%] border-2 border-r-0 border-white/60 -translate-y-1/2 bg-slate-200"}),(0,a.jsx)("div",{className:"absolute right-0 top-1/2 w-[6%] h-[20%] border-2 border-r-0 border-white/60 -translate-y-1/2 bg-slate-200"}),(0,a.jsx)("div",{className:"absolute right-[16%] top-1/2 w-[8%] aspect-square border-2 border-r-0 border-white/60 rounded-l-full -translate-y-1/2 clip-path-half",style:{clipPath:"inset(0 50% 0 0)"}})]}),g&&(0,a.jsxs)("div",{className:"absolute inset-[10%] w-[80%] h-[80%] border-2 border-white/80 bg-white",children:[(0,a.jsx)("div",{className:"absolute top-[10%] bottom-[10%] left-0 right-0 border-y-2 border-white/80"}),(0,a.jsx)("div",{className:"absolute left-1/2 top-[-2%] bottom-[-2%] w-1 bg-white/40 shadow-xl -translate-x-1/2 z-10"}),(0,a.jsx)("div",{className:"absolute left-[25%] right-[25%] top-[10%] bottom-[
8610%] border-x-2 border-white/80"}),(0,a.jsx)("div",{className:"absolute left-[25%] right-[25%] top-1/2 w-[50%] border-t-2 border-white/80 -translate-y-1/2"}),(0,a.jsx)("div",{className:"absolute left-0 top-1/2 w-[2%] border-t-2 border-white/80 -translate-y-1/2"}),(0,a.jsx)("div",{className:"absolute right-0 top-1/2 w-[2%] border-t-2 border-white/80 -translate-y-1/2"})]}),b&&(0,a.jsxs)("div",{className:"absolute inset-0 w-full h-full border-2 border-white/50",children:[(0,a.jsx)("div",{className:"absolute left-1/2 top-0 bottom-0 w-0 border-l-2 border-white/50 -translate-x-1/2"}),(0,a.jsx)("div",{className:"absolute left-1/2 top-1/2 w-[15%] aspect-square rounded-full border-2 border-white/50 -translate-x-1/2 -translate-y-1/2"}),(0,a.jsx)("div",{className:"absolute left-0 top-1/2 w-[18%] h-[35%] border-2 border-l-0 border-white/50 -translate-y-1/2 bg-[#bc7a46]"}),(0,a.jsx)("div",{className:"absolute left-[18%] top-1/2 w-[10%] aspect-square rounded-full border-2 border-white/50 -translate-y-1/2"}),(0,a.jsx)("div",{className:"absolute left-0 top-1/2 w-[30%] h-[70%] border-2 border-l-0 border-white/50 rounded-r-full -translate-y-1/2 opacity-60"}),(0,a.jsx)("div",{className:"absolute right-0 top-1/2 w-[18%] h-[35%] border-2 border-r-0 border-white/50 -translate-y-1/2 bg-[#bc7a46]"}),(0,a.jsx)("div",{className:"absolute right-0 top-1/2 w-[30%] h-[70%] border-2 border-r-0 border-white/50 rounded-l-full -translate-y-1/2 opacity-60"})]})]}),x&&(0,a.jsx)("div",{className:`absolute left-1/2 top-1/2 shadow-[0_8px_16px_rgba(0,0,0,0.8)] z-10 transition-all duration-[3000ms] border-2 border-white/20 rounded-full
87                                ${g?"w-2 h-2 sm:w-3 sm:h-3 bg-[#ccff00]":b?"w-4 h-4 sm:w-6 sm:h-6 bg-[#d95d16]":"w-4 h-4 sm:w-5 sm:h-5 bg-white"}`,style:{animation:"ballMove 8s infinite alternate ease-in-out",transform:"translate(-50%, -50%)"},children:(0,a.jsx)("div",{className:"absolute -bottom-4 left-1/2 w-4 h-2 bg-white/40 rounded-full blur-sm -translate-x-1/2"})}),x&&(0,a.jsxs)("div",{className:"absolute left-[65%] top-[60%] flex flex-col items-center animate-bounce-slow",style:{animation:"floatBubble 4s infinite alternate ease-in-out"},children:[(0,a.jsxs)("div",{className:"bg-white/95 backdrop-blur border border-white/10 rounded-2xl p-2 shadow-2xl flex items-center gap-3 w-max max-w-[200px]",children:[(0,a.jsx)("div",{className:"w-6 h-6 rounded-full flex items-center justify-center p-0.5 bg-white/5 shrink-0",children:(0,a.jsx)("img",{src:p,alt:e||"Home team",className:"max-w-full max-h-full object-contain",onError:t=>t.target.src=i(e),loading:"lazy",decoding:"async"})}),(0,a.jsx)("div",{className:"flex flex-col pr-1 overflow-hidden",children:(0,a.jsx)("span",{className:"text-slate-900 font-bold text-[10px] sm:text-xs tracking-wide truncate",children:g?"Serve / Return":"Tấn c\xf4ng nguy hiểm"})})]}),(0,a.jsx)("div",{className:"w-0 h-0 border-l-[6px] border-r-[6px] border-t-[6px] border-l-transparent border-r-transparent border-t-[#1a1c28]/95 mt-[-1px]"})]})]})})}),(0,a.jsx)("div",{className:"relative z-20 flex-1 flex flex-col items-center justify-start p-4 md:p-6 pointer-events-none w-full",children:(0,a.jsxs)("div",{className:"w-full max-w-[800px] flex items-center justify-between px-4 sm:px-6 py-3 rounded-xl bg-gradient-to-r from-[#0d0f14]/90 via-[#151821]/95 to-[#0d0f14]/90 backdrop-blur-xl border border-white/10 shadow-[0_10px_40px_rgba(0,0,0,0.8)] pointer-events-auto",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 flex-1 min-w-0 pr-2",children:[(0,a.jsx)("img",{src:p,alt:e,className:"w-8 h-8 md:w-12 md:h-12 object-contain drop-shadow-lg shrink-0",onError:t=>t.target.src=i(e),loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-slate-900 text-xs sm:text-sm md:text-base font-bold truncate tracking-wide",children:e})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1 shrink-0 px-2 sm:px-6 min-w-[100px]",children:[(0,a.jsxs)("span",{className:`inline-flex items-center gap-1.5 px-2.5 py-0.5 rounded-full text-[10px] sm:text-xs font-bold shadow-inner ${x?"bg-green-500/10 text-green-400 border border-green-500/20":"bg-white/5 text-slate-900/40"}`,children:[x&&(0,a.jsx)("span",{className:"w-1.5 h-1.5 rounded-full bg-green-500 animate-pulse shadow-[0_0_8px_#22c55e]"}),d||c]}),(0,a.jsxs)("div",{className:"flex gap-3 sm:gap-5 items-center justify-center",children:[(0,a.jsx)("span",{className:"text-slate-900 text-2xl sm:text-4xl font-black drop-shadow-md",children:r}),(0,a.jsx)("span",{className:"text-slate-900/30 text-xl font-light",children:"-"}),(0,a.jsx)("span",{className:"text-slate-900 text-2xl sm:text-4xl font-black drop-shadow-md",children:n})]})]}),(0,a.jsxs)("div",{className:"flex items-center justify-end gap-3 flex-1 min-w-0 pl-2 text-right",children:[(0,a.jsx)("span",{className:"text-slate-900 text-xs sm:text-sm md:text-base font-bold truncate tracking-wide",children:t}),(0,a.jsx)("img",{src:u,alt:t,className:"w-8 h-8 md:w-12 md:h-12 object-contain drop-shadow-lg shrink-0",onError:e=>e.target.src=i(t),loading:"lazy",decoding:"async"})]})]})}),(0,a.jsx)("div",{className:"relative z-20 mt-auto w-full p-4 flex justify-center pointer-events-none",children:(0,a.jsx)("div",{className:"w-full max-w-[600px] h-6 bg-white/40 backdrop-blur-md rounded-full border border-white/5 flex items-center px-4",children:(0,a.jsxs)("div",{className:"flex-1 h-0.5 bg-white/10 relative rounded-full",children:[x&&(0,a.jsx)("div",{className:"absolute left-0 top-0 bottom-0 bg-gradient-to-r from-[#b38b22] to-[#ffda6a] w-[65%] rounded-full opacity-90 shadow-[0_0_12px_#daa520]"}),(0,a.jsx)("span",{className:"absolute left-[65%] top-1/2 -translate-y-1/2 -translate-x-1/2 w-1.5 h-1.5 rounded-full bg-white shadow-md"})]})})}),(0,a.jsx)("style",{children:`
88                @keyframes ballMove {
89                    0% { transform: translate(-30%, -20%) scale(1); }
90                    25% { transform: translate(40%, -10%) scale(1.1); }
91                    50% { transform: translate(20%, 30%) scale(0.9); }
92                    75% { transform: translate(-10%, 15%) scale(1.2); }
93                    100% { transform: translate(-45%, 0%) scale(1); }
94                }
95                @keyframes floatBubble {
96                    0% { transform: translateY(0px) translateX(0px); }
97                    50% { transform: translateY(-8px) translateX(4px); }
98                    100% { transform: translateY(4px) translateX(-4px); }
99                }
100            `})]})}function c(e,t){if("1"===t||"2"===t)switch(e){case"2":return{t:"HT 1",live:!0,sc:!0};case"3":return{t:"Giữa giờ",live:!0,sc:!0};case"4":return{t:"HT 2",live:!0,sc:!0};case"5":return{t:"Hiệp phụ",live:!0,sc:!0};case"7":return{t:"Penalty",live:!0,sc:!0};case"8":case"9":return{t:"Kết th\xfac",live:!1,sc:!0};default:return{t:"Chưa bắt đầu",live:!1,sc:!1}}
100return["51","52","53","54","55"].includes(e)?{t:`Set ${e-50}`,live:!0,sc:!0}:["100","90","110"].includes(e)?{t:"KT",live:!1,sc:!0}:"0"===e||"1"===e?{t:"Chưa bắt đầu",live:!1,sc:!1}:{t:"LIVE",live:!0,sc:!0}}function d(e){let t=(e||"").split(/[\s-]+/).slice(0,2).map(e=>e[0]||"").join("").toUpperCase()||"??";return`data:image/svg+xml,${encodeURIComponent(`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 80 80"><rect width="80" height="80" rx="20" fill="#1a1c25"/><text x="40" y="47" font-size="20" font-family="Arial" font-weight="700" text-anchor="middle" fill="#666">${t}</text></svg>`)}`}function x(e){let t=new Date(1e3*parseInt(e||"0",10));return{hm:t.toLocaleTimeString("vi-VN",{hour:"2-digit",minute:"2-digit",timeZone:"Asia/Ho_Chi_Minh"}),dm:t.toLocaleDateString("vi-VN",{day:"2-digit",month:"2-digit",timeZone:"Asia/Ho_Chi_Minh"}),full:t.toLocaleDateString("vi-VN",{day:"2-digit",month:"2-digit",year:"numeric",timeZone:"Asia/Ho_Chi_Minh"})}}let h="max-w-[1200px]";function m({matchData:e,relatedMatches:t,matchDetails:s,standings:r,brandingNameUpper:i}){let p,u,g,j,v,y,[C,S]=(0,l.useState)("odds"),L=e?.match_data?.anchors||[],[$,F]=(0,l.useState)(!1),[T,A]=(0,l.useState)(!1),[M,H]=(0,l.useState)(null),[D,B]=(0,l.useState)(!1),z=(0,l.useRef)(0);(0,l.useEffect)(()=>{if(!e?.has_live||"1"!==e.has_live||0===L.length)return;let t=!1;B(!0);let s=async t=>{let s=t?.uid,a=`/api/socolive/proxy-stream?url=${encodeURIComponent(`https://live.inplyr.com/${s?`room/${s}`:`default/${e.id}`}.m3u8`)}`;try{let e=await fetch(a,{method:"GET",cache:"no-store"});if(!e.ok)return null;let s=(await e.text()).split("\n").filter(e=>e.trim()&&!e.startsWith("#"));if(0===s.length)return null;return(await fetch(s[0],{method:"HEAD",cache:"no-store"})).ok?t:null}catch{return null}};return Promise.all(L.map(e=>s(e))).then(e=>{if(t)return;let s=e.find(e=>null!==e);s?(H(s),F(!0),A(!1)):(H(L[0]),A(!0)),B(!1)}),()=>{t=!0}},[e?.has_live,L.length]),(0,l.useEffect)(()=>{if(!T||D||z.current>=20)return;let t=setTimeout(()=>{z.current++,A(!1),B(!0);let t=async t=>{let s=t?.uid,a=`/api/socolive/proxy-stream?url=${encodeURIComponent(`https://live.inplyr.com/${s?`room/${s}`:`default/${e.id}`}.m3u8`)}`;try{let e=await fetch(a,{method:"GET",cache:"no-store"});if(!e.ok)return null;let s=(await e.text()).split("\n").filter(e=>e.trim()&&!e.startsWith("#"));if(0===s.length)return null;return(await fetch(s[0],{method:"HEAD",cache:"no-store"})).ok?t:null}catch{return null}};Promise.all(L.map(e=>t(e))).then(e=>{let t=e.find(e=>null!==e);t?(H(t),F(!0),A(!1)):A(!0),B(!1)})},15e3);return()=>clearTimeout(t)},[T,D]);let[I,R]=(0,l.useState)(null),U=e?.post_name||e?.ls_id||e?.id;if(window.location.origin,(0,l.useEffect)(()=>{if(!U)return;let e=setInterval(async()=>{try{let e=await fetch(`/api/klivevip/match/${U}`,{cache:"no-store"});if(e.ok){let t=await e.json();R(t?.match??null)}}catch{}},1e4);return()=>clearInterval(e)},[U]),!e)return(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center py-32 gap-4",children:[(0,a.jsx)("span",{className:"text-[#64748B] text-lg",children:"Kh\xf4ng t\xecm thấy trận đấu"}),(0,a.jsx)("a",{href:"/",className:"text-[#4681E8] hover:underline text-sm",children:"← Quay lại"})]});let G=I?{...e,...I}:e,P=G?.has_live==="1"&&L.length>0,K=c(G.status_id,G.sport_id),V=$&&M&&!T&&!D,W=P&&(D||T&&K.live&&z.current<20),O=!P||T&&!W&&!D,q=!K.live&&"8"!==String(G.status_id)&&"9"!==String(G.status_id),{hm:X,full:Y}=x(G.time),Z=G.source_card_meta?.league_label||G.match_data?.competition_vi||G.match_data?.competition_full||"",Q=G.match_data?.stage_label||G.source_card_meta?.stage_label||"",J=G.home_logo||d(G.home_name),ee=G.away_logo||d(G.away_name),et=e=>t=>{t.target.src=d(e)};return(0,a.jsxs)("div",{className:"w-full bg-white min-h-screen text-slate-600 font-sans pb-16",children:[(0,a.jsx)("div",{className:"w-full border-b border-slate-200 bg-white",children:(0,a.jsxs)("div",{className:`${h} mx-auto px-4 py-3 flex items-center justify-between`,children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 text-[13px] font-bold",children:[(0,a.jsx)("span",{className:"text-[#4681E8] uppercase tracking-wide",children:Z}),Q&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"text-slate-300",children:"•"}),(0,a.jsx)("span",{className:"text-slate-600",children:Q})]})]}),(0,a.jsx)("div",{className:"text-[12px] font-mono text-slate-400 hidden sm:block",children:Y})]})}),(0,a.jsxs)("div",{className:`${h} mx-auto px-0 md:px-4 py-0 md:py-6 flex flex-col lg:flex-row gap-4 lg:gap-6`,children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0 flex flex-col gap-4 lg:gap-6",children:[(0,a.jsxs)("div",{className:"w-full relative bg-[#000000] rounded-none md:rounded-2xl overflow-hidden shadow-[0_10px_40px_rgba(0,0,0,0.5)] border-y md:border border-slate-200",children:[(0,a.jsx)("div",{className:"relative w-full aspect-video bg-[#000000] group z-10",children:V?(0,a.jsx)(n,{src:`/api/klivevip/proxy-stream?url=${encodeURIComponent(`https://live.inplyr.com/${M?.uid&&"default"!==M.uid?`room/${M.uid}`:`default/${G.id}`}.m3u8`)}`,autoPlay:!0,onError:()=>A(!0)}):O?(0,a.jsx)(o,{homeName:G.home_name,awayName:G.away_name,homeLogo:G.home_logo,awayLogo:G.away_logo,homeScore:K.sc?G.home_score:"0",awayScore:K.sc?G.away_score:"0",statusText:K.t,timeText:G.time_text||X,isLive:K.live,sportId:G.sport_id,matchId:G.ls_id||G.id,kickoffMs:1e3*Number(G?.time||0),isPreMatch:q}):(0,a.jsxs)("div",{className:"absolute inset-0 z-10 flex flex-col items-center justify-center p-4 lg:p-10",children:[(0,a.jsxs)("div",{className:"absolute inset-0 flex justify-between items-center opacity-[0.03] pointer-events-none px-4 lg:px-20 overflow-hidden",children:[(0,a.jsx)("img",{src:J,alt:"",className:"w-1/2 max-w-[400px] blur-[10px]",loading:"lazy",decoding:"async"}),(0,a.jsx)("img",{src:ee,alt:"",className:"w-1/2 max-w-[400px] blur-[10px]",loading:"lazy",decoding:"async"})]}),P&&!T&&(0,a.jsx)("button",{onClick:()=>F(!0),className:"group mb-4 sm:mb-8 w-16 h-16 md:w-20 md:h-20 rounded-full bg-[#4681E8] flex items-center justify-center hover:bg-[#55CAF1] transition-all shadow-[0_0_30px_rgba(70,129,232,0.5)] curs
100or-pointer z-20",children:(0,a.jsx)("svg",{className:"w-8 h-8 md:w-10 md:h-10 text-white ml-1.5 md:ml-2 group-hover:scale-110 transition-transform",viewBox:"0 0 24 24",fill:"currentColor",children:(0,a.jsx)("path",{d:"M8 5v14l11-7z"})})}),(0,a.jsxs)("div",{className:"grid grid-cols-[1fr_auto_1fr] items-center w-full max-w-[800px] gap-2 lg:gap-8 z-20",children:[(0,a.jsxs)("div",{className:"flex flex-col items-center gap-2 lg:gap-4",children:[(0,a.jsx)("img",{src:J,alt:G.home_name,className:"w-16 h-16 sm:w-24 sm:h-24 lg:w-32 lg:h-32 object-contain drop-shadow-[0_10px_20px_rgba(0,0,0,0.8)]",onError:et(G.home_name),loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-[#FFFFFF] text-xs sm:text-base lg:text-lg font-black text-center line-clamp-2 uppercase tracking-wide",children:G.home_name})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-2 lg:gap-3",children:[K.sc?(0,a.jsxs)("div",{className:"flex items-center gap-3 lg:gap-6 bg-white/90 backdrop-blur-md px-4 py-2 lg:px-8 lg:py-4 rounded-2xl border border-slate-200 shadow-2xl",children:[(0,a.jsx)("span",{className:"text-[#4681E8] text-[32px] sm:text-[48px] lg:text-[64px] font-black leading-none",children:G.home_score}),(0,a.jsx)("span",{className:"text-slate-300 text-[20px] lg:text-[28px] font-light",children:":"}),(0,a.jsx)("span",{className:"text-[#4681E8] text-[32px] sm:text-[48px] lg:text-[64px] font-black leading-none",children:G.away_score})]}):(0,a.jsx)("div",{className:"text-[#FFFFFF] text-[32px] sm:text-[48px] lg:text-[56px] font-black tracking-widest leading-none drop-shadow-xl",children:X}),(0,a.jsxs)("span",{className:`inline-flex items-center gap-2 rounded-full px-3 py-1 lg:px-5 lg:py-1.5 text-[10px] lg:text-[12px] font-bold tracking-widest uppercase ${K.live?"bg-[#4681E8] text-white shadow-[0_0_20px_rgba(70,129,232,0.6)]":"bg-white text-slate-600 border border-slate-200"}`,children:[K.live&&(0,a.jsx)("span",{className:"w-2 h-2 rounded-full bg-white animate-pulse"}),K.t,G.time_text?` : ${G.time_text}`:""]})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-2 lg:gap-4",children:[(0,a.jsx)("img",{src:ee,alt:G.away_name,className:"w-16 h-16 sm:w-24 sm:h-24 lg:w-32 lg:h-32 object-contain drop-shadow-[0_10px_20px_rgba(0,0,0,0.8)]",onError:et(G.away_name),loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-[#FFFFFF] text-xs sm:text-base lg:text-lg font-black text-center line-clamp-2 uppercase tracking-wide",children:G.away_name})]})]})]})}),L.length>0&&(0,a.jsxs)("div",{className:"w-full bg-white border-t border-slate-200 px-3 lg:px-6 py-2.5 lg:py-4 flex items-center gap-2 lg:gap-4 overflow-x-auto z-20",children:[(0,a.jsx)("span",{className:"text-[10px] lg:text-[11px] text-slate-600 uppercase font-bold tracking-widest shrink-0 mr-1 lg:mr-2",children:"CHỌN K\xcaNH TRUYỀN:"}),L.map((e,t)=>(0,a.jsxs)("button",{onClick:()=>{H(e),F(!0),A(!1)},className:`shrink-0 flex items-center gap-1.5 lg:gap-2 rounded-full px-3 py-1.5 lg:px-5 lg:py-2 text-[11px] lg:text-[13px] font-bold transition-all ${M?.uid===e.uid&&!T?"bg-[#4681E8]/10 border border-[#4681E8] text-[#4681E8] shadow-[0_0_15px_rgba(70,129,232,0.2)]":"bg-white border border-slate-200 text-slate-600 hover:text-[#4681E8] hover:border-[#4681E8]/50"}`,children:[(0,a.jsx)("span",{className:`w-1.5 h-1.5 lg:w-2 lg:h-2 rounded-full ${M?.uid===e.uid&&!T?"bg-[#4681E8] animate-pulse":"bg-transparent"}`}),"BLV ",e.nickName||`K\xeanh ${t+1}`]},e.uid||t))]})]}),(p=(()=>{let e=s?.stats;if(!e)return!1;let t=null;return Array.isArray(e)&&e.length>0?t=e[0]:e?.results?.[0]?t=e.results[0]:e?.stats_full_time&&(t=e),!!t&&!!(t.stats_full_time?.length>0||t.stats_haft_time?.length>0||t.stats_half_time?.length>0||t.stats?.length>0)})(),u=!!(s?.lineup&&(Array.isArray(s.lineup)?s.lineup.length>0:s.lineup.home||s.lineup.away)),g=!!(s?.events&&(Array.isArray(s.events)?s.events.length>0:s.events.incidents?.length>0||s.events.data?.length>0)),j=!!(r&&(Array.isArray(r)?r.length>0:r.data?.length>0)),(y=(v=[{id:"stats",label:"THỐNG K\xca",show:p},{id:"lineup",label:"ĐỘI H\xccNH",show:u},{id:"events",label:"DIỄN BIẾN",show:g},{id:"standings",label:"BẢNG XH",show:j},{id:"odds",label:"TỶ LỆ K\xc8O",show:!!(s?.odds&&Array.isArray(s.odds)&&s.odds.length>0)}].filter(e=>e.show)).find(e=>e.id===C)?C:v[0]?.id||"odds")!==C&&setTimeout(()=>S(y),0),v.length>0?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"bg-white rounded-2xl p-2 border border-slate-200 flex overflow-x-auto gap-2 shadow-[0_4px_15px_rgba(0,0,0,0.08)] mx-4 md:mx-0",children:v.map(({id:e,label:t})=>(0,a.jsx)("button",{onClick:()=>S(e),className:`flex-1 min-w-[100px] py-2.5 sm:py-3 text-[10px] sm:text-[12px] font-black uppercase tracking-widest rounded-xl transition-all ${y===e?"bg-[#4681E8]/10 text-[#4681E8] border border-[#4681E8]/30 shadow-inner":"text-slate-500 hover:text-[#4681E8] hover:bg-[#4681E8]/5 border border-transparent"}`,children:t},e))}),(0,a.jsxs)("div",{className:"bg-white rounded-2xl border border-slate-200 overflow-hidden shadow-[0_4px_15px_rgba(0,0,0,0.08)] min-h-[400px] mx-4 md:mx-0",children:["stats"===y&&(0,a.jsx)(b,{matchDetails:s}),"lineup"===y&&(0,a.jsx)(f,{matchDetails:s}),"events"===y&&(0,a.jsx)(_,{events:s?.events}),"standings"===y&&(0,a.jsx)(k,{standings:r}),"odds"===y&&(0,a.jsx)(E,{odds:s?.odds})]})]}):null),t.length>0&&(0,a.jsxs)("div",{className:"mt-4 mx-4 md:mx-0",children:[(0,a.jsxs)("h2",{className:"px-1 py-4 text-sm sm:text-base font-black text-slate-800 uppercase flex items-center gap-3 tracking-widest border-b border-slate-100 mb-4",children:[(0,a.jsx)("span",{className:"w-1 h-5 bg-[#4681E8] rounded-sm shadow-[0_0_8px_#4681E8]"}),"TRẬN ĐẤU C\xd9NG GIẢI"]}),(0,a.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3 sm:gap-4",children:t.slice(0,4).map(e=>(0,a.jsx)(w,{m:e},e.id))})]})]}),(0,a.jsx)("div",{className:"w-full lg:w-[350px] xl:w-[400px] shrink-0 px-4 md:px-0",children:(0,a.jsxs)("div",{className:"bg-white border border-slate-200 rounded-2xl overflow-hidden flex flex-col shadow-[0_10px_30px_rgba(0,0,0,0.1)] lg:sticky lg:top-8 h-[600px] lg:h-[c
100alc(100vh-100px)] lg:max-h-[850px]",children:[(0,a.jsxs)("div",{className:"px-5 py-4 border-b border-slate-200 flex items-center justify-between bg-white",children:[(0,a.jsxs)("h3",{className:"text-slate-800 text-sm font-black uppercase tracking-widest flex items-center gap-2",children:[(0,a.jsx)("span",{className:"w-2.5 h-2.5 rounded-full bg-[#4681E8] shadow-[0_0_10px_rgba(70,129,232,0.4)]"}),"PH\xd2NG CHAT"]}),(0,a.jsxs)("span",{className:"text-[10px] bg-white px-3 py-1.5 rounded-full text-[#4681E8] font-mono border border-[#4681E8]/30 shadow-inner tracking-widest flex items-center gap-1.5",children:[(0,a.jsx)("svg",{className:"w-3 h-3",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 10l4.553-2.276A1 1 0 0121 8.618v6.764a1 1 0 01-1.447.894L15 14M5 18h8a2 2 0 002-2V8a2 2 0 00-2-2H5a2 2 0 00-2 2v8a2 2 0 002 2z"})}),L.length," BLV"]})]}),(0,a.jsx)("div",{className:"flex-1 bg-[#FFFFFF]/40 min-h-0 chat-container-wrapper",children:(0,a.jsx)(N,{anchors:L,selectedAnchor:M})})]})})]})]})}let p={25:"KIỂM SO\xc1T B\xd3NG",24:"CHUYỀN CH\xcdNH X\xc1C",23:"TỔNG SỐ ĐƯỜNG CHUYỀN",22:"TẤN C\xd4NG",21:"T.C\xd4NG NGUY HIỂM",2:"S\xdaT TR\xdaNG Đ\xcdCH",37:"PHẠT G\xd3C",28:"N\xc9M BI\xcaN",8:"VIỆT VỊ",3:"THẺ V\xc0NG",4:"THẺ ĐỎ",5:"S\xdaT PENALTY",29:"PHẠM LỖI",26:"Đ\xc1NH ĐẦU",27:"CỨU THUA",1:"B\xc0N THẮNG",7:"PHẢN LƯỚI"},u=[25,21,22,24,2,23,4,3,37,28,8,5,29],g="https://cdn.sportdb.live/upload/team/";function b({matchDetails:e}){let[t,s]=(0,l.useState)("full"),r=e?.stats,n=e?.lineup,i=n?.match?.home_team,o=n?.match?.away_team,c=null;Array.isArray(r)&&r.length>0?c=r[0]:r?.results?.[0]?c=r.results[0]:r?.stats_full_time&&(c=r);let d={full:c?.stats_full_time||[],h1:c?.stats_haft_time||c?.stats_half_time||[],h2:c?.stats_haft_time_2nd_half||[]}[t]||[];if(!c||0===d.length)return(0,a.jsx)(j,{text:"Thống k\xea sẽ được cập nhật khi trận đấu bắt đầu"});let x=[...d].sort((e,t)=>{let s=u.indexOf(e.type),a=u.indexOf(t.type);return(-1===s?999:s)-(-1===a?999:a)});return(0,a.jsxs)("div",{className:"flex flex-col",children:[(i||o)&&(0,a.jsxs)("div",{className:"flex items-center justify-between px-4 py-3 border-b border-slate-100",children:[(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5 w-20",children:[i?.logo&&(0,a.jsx)("img",{src:g+i.logo,alt:i?.name||"Home team",className:"w-8 h-8 object-contain",onError:e=>e.target.style.display="none",loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-slate-600 text-[10px] font-medium text-center leading-tight",children:i?.name||""})]}),(0,a.jsx)("div",{className:"flex gap-1",children:[{k:"h1",l:"Hiệp 1"},{k:"h2",l:"Hiệp 2"},{k:"full",l:"Cả trận"}].map(({k:e,l})=>(0,a.jsx)("button",{onClick:()=>s(e),className:`px-2.5 py-1 text-[10px] font-bold rounded transition-all ${t===e?"bg-[#E11D48] text-white":"text-slate-400 hover:text-slate-600 bg-slate-100"}`,children:l},e))}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5 w-20",children:[o?.logo&&(0,a.jsx)("img",{src:g+o.logo,alt:o?.name||"Away team",className:"w-8 h-8 object-contain",onError:e=>e.target.style.display="none",loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-slate-600 text-[10px] font-medium text-center leading-tight",children:o?.name||""})]})]}),(0,a.jsx)("div",{className:"px-4 py-3 space-y-3",children:x.map(e=>{let t=p[e.type]||`Stat ${e.type}`,s=e.home,l=e.away,r=24===e.type||25===e.type,n=s+l,i=0===n?50:s/n*100,o=s>l,c=l>s;return(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"flex justify-between items-center mb-1.5",children:[(0,a.jsxs)("span",{className:`text-xs font-bold w-10 tabular-nums ${o?"text-slate-800":"text-slate-400"}`,children:[s,r?"%":""]}),(0,a.jsx)("span",{className:"text-slate-400 text-[10px] font-semibold tracking-wide uppercase",children:t}),(0,a.jsxs)("span",{className:`text-xs font-bold w-10 text-right tabular-nums ${c?"text-slate-800":"text-slate-400"}`,children:[l,r?"%":""]})]}),(0,a.jsxs)("div",{className:"flex gap-0.5 h-[5px]",children:[(0,a.jsx)("div",{className:"flex-1 rounded-l-full bg-white/[0.06] overflow-hidden flex justify-end",children:(0,a.jsx)("div",{className:`rounded-l-full transition-all duration-500 ${o?"bg-gradient-to-r from-[#E11D48]/60 to-[#E11D48]":"bg-gradient-to-r from-white/10 to-white/20"}`,style:{width:`${i}%`}})}),(0,a.jsx)("div",{className:"flex-1 rounded-r-full bg-white/[0.06] overflow-hidden",children:(0,a.jsx)("div",{className:`rounded-r-full transition-all duration-500 ${c?"bg-gradient-to-l from-[#E11D48]/60 to-[#E11D48]":"bg-gradient-to-l from-white/10 to-white/20"}`,style:{width:`${100-i}%`}})})]})]},e.type)})})]})}
100function f({matchDetails:e}){let[t,s]=(0,l.useState)("pitch"),r=e?.lineup,n=r?.lineup||r,i=n?.home||[],o=n?.away||[],c=r?.home_formation||"",d=r?.away_formation||"",x=r?.match?.home_team,h=r?.match?.away_team;if(0===i.length&&0===o.length)return(0,a.jsx)(j,{text:"Đội h\xecnh sẽ được c\xf4ng bố trước trận đấu 30 ph\xfat"});let m=e=>e.filter(e=>1===e.first),p=e=>e.filter(e=>1!==e.first),u=m(i),g=m(o),b=p(i),w=p(o);return(0,a.jsxs)("div",{className:"flex flex-col",children:[(0,a.jsxs)("div",{className:"flex items-center justify-center gap-1 px-3 py-2 border-b border-slate-100",children:[(0,a.jsx)("button",{onClick:()=>s("pitch"),className:`px-3 py-1.5 text-[10px] font-bold rounded transition-all ${"pitch"===t?"bg-[#E11D48] text-white":"text-slate-400 bg-slate-100"}`,children:"Đội h\xecnh xuất ph\xe1t"}),(0,a.jsx)("button",{onClick:()=>s("list"),className:`px-3 py-1.5 text-[10px] font-bold rounded transition-all ${"list"===t?"bg-[#E11D48] text-white":"text-slate-400 bg-slate-100"}`,children:"Đội h\xecnh dá»± bị"})]}),"pitch"===t?(0,a.jsx)("div",{className:"relative w-full",style:{aspectRatio:"68/105"},children:(0,a.jsxs)("div",{className:"absolute inset-0 bg-gradient-to-b from-[#1a5c2a] via-[#1e6b31] to-[#1a5c2a] rounded-2xl overflow-hidden",children:[(0,a.jsxs)("div",{className:"absolute inset-[3%] border border-white/20 rounded-lg",children:[(0,a.jsx)("div",{className:"absolute left-0 right-0 top-1/2 h-px bg-white/20"}),(0,a.jsx)("div",{className:"absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 w-[22%] aspect-square rounded-full border border-white/20"}),(0,a.jsx)("div",{className:"absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 w-1.5 h-1.5 bg-white/30 rounded-full"}),(0,a.jsx)("div",{className:"absolute top-0 left-1/2 -translate-x-1/2 w-[55%] h-[16%] border-l border-r border-white/20"}),(0,a.jsx)("div",{className:"absolute top-0 left-1/2 -translate-x-1/2 w-[25%] h-[6%] border-l border-r border-white/20"}),(0,a.jsx)("div",{className:"absolute bottom-0 left-1/2 -translate-x-1/2 w-[55%] h-[16%] border-t border-l border-r border-white/20"}),(0,a.jsx)("div",{className:"absolute bottom-0 left-1/2 -translate-x-1/2 w-[25%] h-[6%] border-t border-l border-r border-white/20"})]}),(0,a.jsx)("div",{className:"absolute top-1 left-2 text-[9px] text-[#F8FAFC]/50 font-bold z-10",children:x?.name||""}),(0,a.jsx)("div",{className:"absolute top-1 right-2 text-[9px] text-[#E11D48]/70 font-bold z-10",children:c}),(0,a.jsx)("div",{className:"absolute bottom-1 left-2 text-[9px] text-[#F8FAFC]/50 font-bold z-10",children:h?.name||""}),(0,a.jsx)("div",{className:"absolute bottom-1 right-2 text-[9px] text-[#E11D48]/70 font-bold z-10",children:d}),u.map((e,t)=>{let s=`${e.x||50}%`,l=`${(e.y||10)/2}%`,r="G"===e.position;return(0,a.jsxs)("div",{className:"absolute flex flex-col items-center z-10 -translate-x-1/2 -translate-y-1/2",style:{left:s,top:l},children:[(0,a.jsx)("div",{className:`w-6 h-6 rounded-full flex items-center justify-center text-[9px] font-black ${r?"bg-yellow-400 text-black":"bg-blue-600 text-[#F8FAFC]"} shadow-md border border-white/20`,children:e.shirt_number||""}),(0,a.jsx)("span",{className:"text-[7px] text-[#F8FAFC] font-semibold mt-0.5 text-center max-w-[48px] truncate drop-shadow-[0_1px_2px_rgba(0,0,0,0.8)]",children:(e.name||"").split(" ").slice(-2).join(" ")}),1===e.captain&&(0,a.jsx)("span",{className:"absolute -top-1 -right-1 text-[6px] text-yellow-400",children:"C"})]},`h-${t}`)}),g.map((e,t)=>{let s=`${100-(e.x||50)}%`,l=`${100-(e.y||10)/2}%`,r="G"===e.position;return(0,a.jsxs)("div",{className:"absolute flex flex-col items-center z-10 -translate-x-1/2 -translate-y-1/2",style:{left:s,top:l},children:[(0,a.jsx)("div",{className:`w-6 h-6 rounded-full flex items-center justify-center text-[9px] font-black ${r?"bg-yellow-400 text-black":"bg-orange-500 text-[#F8FAFC]"} shadow-md border border-white/20`,children:e.shirt_number||""}),(0,a.jsx)("span",{className:"text-[7px] text-[#F8FAFC] font-semibold mt-0.5 text-center max-w-[48px] truncate drop-shadow-[0_1px_2px_rgba(0,0,0,0.8)]",children:(e.name||"").split(" ").slice(-2).join(" ")}),1===e.captain&&(0,a.jsx)("span",{className:"absolute -top-1 -right-1 text-[6px] text-yellow-400",children:"C"})]},`a-${t}`)})]})}):(0,a.jsxs)("div",{className:"px-3 py-2 text-xs",children:[(0,a.jsxs)("div",{className:"flex justify-between font-bold text-slate-400 mb-1 uppercase tracking-wider text-[9px] px-1",children:[(0,a.jsx)("span",{children:"Đội chá»
100§ nh\xe0"}),(0,a.jsx)("span",{children:"Đội kh\xe1ch"})]}),Array.from({length:Math.max(b.length,w.length)}).map((e,t)=>{let s=b[t],l=w[t];return(0,a.jsxs)("div",{className:"flex justify-between items-center border-b border-slate-50 py-1.5",children:[(0,a.jsx)("div",{className:"flex items-center gap-1.5 w-1/2 min-w-0",children:s&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"text-[#E11D48] font-bold w-5 text-center shrink-0 text-[10px]",children:s.shirt_number||""}),(0,a.jsx)("span",{className:"text-slate-700 truncate text-[11px]",children:s.name||""})]})}),(0,a.jsx)("div",{className:"flex items-center gap-1.5 w-1/2 justify-end min-w-0",children:l&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"text-slate-700 truncate text-[11px] text-right",children:l.name||""}),(0,a.jsx)("span",{className:"text-[#E11D48] font-bold w-5 text-center shrink-0 text-[10px]",children:l.shirt_number||""})]})})]},t)})]})]})}function j({text:e}){return(0,a.jsx)("div",{className:"flex items-center justify-center py-10 text-slate-400 text-sm text-center",children:e})}function w({m:e}){let t=c(e.status_id,e.sport_id),{hm:s,dm:l}=x(e.time),r=e.source_card_meta?.league_label||e.match_data?.competition_vi||"";return(0,a.jsxs)("a",{href:`/match/${encodeURIComponent(e.post_name||e.id)}`,className:"flex items-center gap-3 rounded-2xl bg-white hover:bg-slate-50 border border-slate-100 hover:border-[#4681E8]/30 p-3 transition-all group",children:[(0,a.jsxs)("div",{className:"shrink-0 w-14 text-center",children:[(0,a.jsx)("div",{className:"text-[#E11D48] text-[11px] font-bold",children:s}),(0,a.jsx)("div",{className:"text-slate-400 text-[9px]",children:l})]}),(0,a.jsx)("div",{className:"w-px h-9 bg-slate-200 shrink-0"}),(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("div",{className:"text-slate-400 text-[9px] truncate mb-1",children:r}),(0,a.jsxs)("div",{className:"flex items-center gap-2 mb-0.5",children:[(0,a.jsx)("img",{src:e.home_logo||d(e.home_name),alt:e.home_name,className:"w-4 h-4 object-contain shrink-0",onError:t=>t.target.src=d(e.home_name),loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-slate-600 text-[12px] font-medium truncate",children:e.home_name})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("img",{src:e.away_logo||d(e.away_name),alt:e.away_name,className:"w-4 h-4 object-contain shrink-0",onError:t=>t.target.src=d(e.away_name),loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-slate-600 text-[12px] font-medium truncate",children:e.away_name})]})]}),t.sc?(0,a.jsxs)("span",{className:"text-slate-800 font-bold text-[14px] tabular-nums shrink-0",children:[e.home_score,"-",e.away_score]}):(0,a.jsx)("span",{className:"text-[10px] font-bold text-[#E11D48] bg-[#E11D48]/10 rounded px-2.5 py-1 group-hover:bg-[#E11D48]/15 transition shrink-0",children:"XEM NGAY"})]})}let v={0:{bg:"bg-white/10",text:"text-[#F8FAFC]/40",nameCls:"text-[#94A3B8]"},1:{bg:"bg-white/10",text:"text-[#F8FAFC]/50",nameCls:"text-[#94A3B8]"},2:{bg:"bg-green-900/50",text:"text-green-400",nameCls:"text-green-400"},3:{bg:"bg-yellow-900/40",text:"text-yellow-400",nameCls:"text-emerald-600 font-bold"},4:{bg:"bg-blue-900/40",text:"text-blue-400",nameCls:"text-blue-400 font-bold"},5:{bg:"bg-red-900/40",text:"text-red-400",nameCls:"text-red-400 font-bold"}};function N({anchors:e,selectedAnchor:t}){let[s,r]=(0,l.useState)([]),[n,i]=(0,l.useState)(!1),o=(0,l.useRef)(null),c=(0,l.useRef)(null),d=t?.roomNum;return(0,l.useEffect)(()=>{if(!d)return;r([]),i(!1);let e=new EventSource(`/api/chat/${d}`);return e.onopen=()=>i(!0),e.onmessage=e=>{try{let t=JSON.parse(e.data);if("connected"===t.type)return void i(!0);if("history"===t.type&&Array.isArray(t.messages))return void r(e=>[...t.messages,...e].slice(-200));t.user&&t.text&&r(e=>[...e,t].slice(-200))}catch{}},e.onerror=()=>i(!1),()=>{e.close(),i(!1)}},[d]),(0,l.useEffect)(()=>{requestAnimationFrame(()=>{let e=c.current;e&&(e.scrollTop=e.scrollHeight)})},[s.length]),(0,a.jsxs)("div",{className:"flex flex-col h-full bg-[#0F0F23]",children:[(0,a.jsxs)("div",{ref:c,className:"flex-1 min-h-0 px-3 py-2 flex flex-col gap-[3px] overflow-y-auto",style:{scrollbarWidth:"thin",scrollbarColor:"#444 transparent"},children:[(0,a.jsx)("div",{className:"text-center text-[10px] text-[#F8FAFC]/30 bg-slate-50/60 py-1.5 rounded-xl mb-1 sticky top-0 z-10 backdrop-blur-sm",children:n?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"inline-block h-1.5 w-1.5 rounded-full bg-green-400 animate-pulse mr-1"}),"Đang kết nối ph\xf2ng chat trá»±c tiếp"]}):d?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"inline-block h-1.5 w-1.5 rounded-full bg-yellow-400 animate-pulse mr-1"}),"Đang kết nối..."]}
100):"Ch\xe0o mừng bạn đến với ph\xf2ng chat"}),0===s.length&&n&&(0,a.jsx)("div",{className:"text-center text-[10px] text-[#F8FAFC]/20 py-4",children:"Chờ tin nhắn mới..."}),s.map((e,t)=>{var s;let l=(s=e.level)>=5?v[5]:v[s]||v[0];return 2===e.type||e.text?.includes("v\xe0o ph\xf2ng tr\xf2 chuyện")?(0,a.jsxs)("div",{className:"flex items-start gap-1.5 text-[11px] leading-relaxed py-[1px] opacity-60",children:[(0,a.jsx)("span",{className:"text-green-500/70 font-medium",children:"Hi"}),(0,a.jsxs)("span",{className:`shrink-0 inline-flex items-center px-1 py-[0.5px] rounded text-[8px] font-bold ${l.bg} ${l.text}`,children:["Lv",e.level]}),(0,a.jsxs)("span",{className:`font-bold ${l.nameCls}`,children:[e.user,":"]}),(0,a.jsx)("span",{className:"text-[#F8FAFC]/40",children:e.text})]},`${e.ts}-${t}`):(0,a.jsxs)("div",{className:"flex items-start gap-1.5 text-[11px] leading-relaxed py-[1px]",children:[(0,a.jsxs)("span",{className:`shrink-0 inline-flex items-center px-1 py-[0.5px] rounded text-[8px] font-bold ${l.bg} ${l.text}`,children:["Lv.",e.level]}),(0,a.jsxs)("span",{className:`font-bold shrink-0 ${l.nameCls}`,children:[e.user,":"]}),(0,a.jsx)("span",{className:"text-[#F8FAFC]/80 break-words min-w-0",children:e.text})]},`${e.ts}-${t}`)}),(0,a.jsx)("div",{ref:o})]}),(0,a.jsxs)("div",{className:"shrink-0 px-3 py-2 bg-[#0F0F23] border-t border-white/[0.04] space-y-2",children:[(0,a.jsx)("div",{className:"flex items-center justify-center gap-3 text-[#F8FAFC]/20 text-[10px]",children:(0,a.jsx)("span",{className:"flex items-center gap-1",children:(0,a.jsx)("svg",{className:"w-3 h-3",viewBox:"0 0 24 24",fill:"currentColor",children:(0,a.jsx)("path",{d:"M12 4.5C7 4.5 2.7 7.6 1 12c1.7 4.4 6 7.5 11 7.5s9.3-3.1 11-7.5c-1.7-4.4-6-7.5-11-7.5zm0 12.5c-2.8 0-5-2.2-5-5s2.2-5 5-5 5 2.2 5 5-2.2 5-5 5zm0-8c-1.7 0-3 1.3-3 3s1.3 3 3 3 3-1.3 3-3-1.3-3-3-3z"})})})}),(0,a.jsxs)("div",{className:"flex bg-[#0F0F23] rounded-2xl overflow-hidden border border-white/[0.08]",children:[(0,a.jsx)("input",{type:"text",placeholder:"Đăng nhập để c\xf9ng chat nh\xe9",disabled:!0,className:"flex-1 bg-transparent px-3 py-2 text-[11px] text-[#F8FAFC] outline-none placeholder:text-[#F8FAFC]/30 disabled:opacity-50"}),(0,a.jsx)("button",{disabled:!0,className:"px-4 text-[11px] font-bold bg-[#E11D48] text-black disabled:bg-white/10 disabled:text-[#F8FAFC]/20 transition-colors",children:"Gửi"})]})]})]})}let y={1:{icon:"⚽",label:"B\xe0n thắng",color:"text-green-400"},2:{icon:"\uD83C\uDD7F️",label:"Phạt đền",color:"text-green-400"},3:{icon:"\uD83D\uDFE1",label:"Thẻ v\xe0ng",color:"text-yellow-400"},4:{icon:"\uD83D\uDFE1\uD83D\uDFE1",label:"Thẻ v\xe0ng 2",color:"text-emerald-600"},5:{icon:"\uD83D\uDD34",label:"Thẻ đỏ",color:"text-red-500"},7:{icon:"\uD83D\uDD04",label:"Phản lưới",color:"text-orange-400"},8:{icon:"\uD83C\uDFE5",label:"Chấn thương",color:"text-[#94A3B8]"},9:{icon:"\uD83D\uDD04",label:"Thay người",color:"text-blue-400"},11:{icon:"⏱️",label:"Hiệp 2",color:"text-[#F8FAFC]/40"},15:{icon:"\uD83E\uDD45",label:"Pen trượt",color:"text-red-400"},19:{icon:"⏱️",label:"Kết th\xfac hiệp",color:"text-[#F8FAFC]/30"},21:{icon:"\uD83C\uDFC6",label:"VAR",color:"text-purple-400"}};function _({events:e}){let t=e?.incidents||e?.events||[];return t&&0!==t.length?(0,a.jsx)("div",{className:"flex flex-col",children:t.map((e,t)=>{let s=y[e.type]||{icon:"•",label:`Event ${e.type}`,color:"text-[#F8FAFC]/50"},l=1===e.position,r=2===e.position,n=e.add_time?`+${e.add_time}`:"",i=`${e.time}'${n}`;return l||r||11!==e.type&&19!==e.type?9===e.type?(0,a.jsxs)("div",{className:`flex items-center gap-2 border-b border-slate-50 p-3 text-xs ${l?"":"flex-row-reverse"}`,children:[(0,a.jsx)("span",{className:"text-slate-400 w-10 text-center shrink-0 text-[10px]",children:i}),(0,a.jsxs)("div",{className:`flex-1 flex flex-col gap-0.5 ${l?"items-start":"items-end"}`,children:[(0,a.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,a.jsx)("span",{className:"text-green-400 text-[10px]",children:"▲"}),(0,a.jsx)("span",{className:"text-[#F8FAFC]/80 text-[11px]",children:e.in_player_name||""})]}),(0,a.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,a.jsx)("span",{className:"text-red-400 text-[10px]",children:"▼"}),(0,a.jsx)("span",{className:"text-[#F8FAFC]/40 text-[11px]",children:e.out_player_name||""})]})]})]},t):(0,a.jsxs)("div",{className:`flex items-center gap-2 border-b border-slate-50 p-3 text-xs ${l?"":"flex-row-reverse"}`,children:[(0,a.jsx)("span",{className:"text-slate-400 w-10 text-center shrink-0 text-[10px]",children:i}),(0,a.jsx)("span",{className:`shrink-0 text-sm ${s.color}`,children:s.icon}),(0,a.jsxs)("div",{className:`flex-1 min-w-0 ${l?"text-left":"text-right"}`,children:[(0,a.jsx)("span",{className:"text-slate-700 text-[11px]",children:e.player_name||""}),e.assist1_name&&(0,a.jsxs)("span",{className:"text-slate-400 text-[10px] ml-1",children:["(kiến tạo: ",e.assist1_name,")"]}),1===e.type&&void 0!==e.home_score&&(0,a.jsxs)("span",{className:"text-[#E11D48] font-bold text-[11px] ml-2",children:[e.home_score," - ",e.away_score]})]})]},t):(0,a.jsx)("div",{className:"flex items-center justify-center py-2 border-b border-slate-50 bg-slate-50",children:(0,a.jsxs)("span",{className:"text-slate-400 text-[10px] uppercase tracking-wider",children:[s.icon," ",s.label," — ",i]})},t)})}):(0,a.jsx)(j,{text:"Diễn biến trận đấu sẽ được cập nhật trực tiếp tại đ\xe2y"})}function k({standings:e}
100){return e&&e.teams&&0!==e.teams.length?(0,a.jsxs)("div",{className:"w-full text-[10px]",children:[(0,a.jsxs)("div",{className:"grid grid-cols-[20px_1fr_24px_24px_32px] bg-slate-50 p-2 text-slate-400 uppercase font-bold sticky top-0",children:[(0,a.jsx)("span",{className:"text-center",children:"#"}),(0,a.jsx)("span",{children:"Team"}),(0,a.jsx)("span",{className:"text-center",children:"T"}),(0,a.jsx)("span",{className:"text-center",children:"B"}),(0,a.jsx)("span",{className:"text-center whitespace-nowrap",children:"Đ"})]}),e.teams.slice(0,15).map((e,t)=>{let s=!!e.data,l=s?parseFloat(e.data[0]):e.rank||t+1,r=s?e.data[1]:e.target_name,n=s?e.data[7]:e.points,i=s?e.data[3]:e.won,o=s?e.data[5]:e.loss;return(0,a.jsxs)("div",{className:"grid grid-cols-[20px_1fr_24px_24px_32px] items-center p-2 border-b border-slate-50 hover:bg-slate-50 transition-colors",children:[(0,a.jsx)("span",{className:"text-center text-slate-500",children:l}),(0,a.jsxs)("div",{className:"flex items-center gap-1.5 min-w-0 pr-2",children:[e.team_logo&&(0,a.jsx)("img",{src:e.team_logo,className:"w-3.5 h-3.5 object-contain",alt:r||"Team logo",loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-slate-700 font-medium truncate",children:r})]}),(0,a.jsx)("span",{className:"text-center text-slate-500",children:i}),(0,a.jsx)("span",{className:"text-center text-slate-500",children:o}),(0,a.jsx)("span",{className:"text-center text-[#E11D48] font-bold",children:n})]},r)})]}):(0,a.jsx)(j,{text:"Bảng xếp hạng sẽ được cập nhật"})}function E({odds:e}){let t=Array.isArray(e)?e:[],s=["2","4","3","16"];function l(e){for(let a of s){let s=t.find(t=>t.odds_type===e&&String(t.company_id)===a);if(s?.odds_info?.length)return s}return t.find(t=>t.odds_type===e&&t.odds_info?.length>0)}function r(e,t){let s=e?.odds_info;if(!s?.length)return["-","-","-"];let a="opening"===t?s.length-1:0;if(!s?.length||!s[a])return["-","-","-"];let l=s[a][2];if("string"!=typeof l)return["-","-","-"];let r=l.split(",");return[r[0]||"-",r[1]||"-",r[2]||"-"]}let n=l("asia"),i=l("eu"),o=l("bs"),c=l("cr"),d=r(n,"opening"),x=r(n,"latest"),h=r(i,"opening"),m=r(i,"latest"),p=r(o,"opening"),u=r(o,"latest"),g=r(c,"opening"),b=r(c,"latest"),f=({children:e})=>(0,a.jsx)("th",{className:"px-2 py-2 text-[9px] sm:text-[10px] font-bold uppercase tracking-wider text-slate-500 border-b border-slate-100 text-center",children:e}),j=({children:e,color:t})=>(0,a.jsx)("td",{className:`px-2 py-2.5 text-center text-[11px] sm:text-xs font-bold ${t||"text-slate-600"} border-b border-slate-50`,children:e});return(0,a.jsxs)("div",{className:"overflow-x-auto",children:[(0,a.jsxs)("table",{className:"w-full min-w-[600px]",children:[(0,a.jsxs)("thead",{children:[(0,a.jsxs)("tr",{className:"bg-slate-50",children:[(0,a.jsx)("th",{className:"px-4 py-2 text-left border-b border-slate-100",rowSpan:2,children:(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("div",{className:"w-7 h-7 rounded bg-gradient-to-br from-[#1d4ed8] to-[#3b82f6] flex items-center justify-center text-white text-[9px] font-black shadow-sm",children:"B"}),(0,a.jsx)("span",{className:"text-slate-600 text-[11px] font-bold tracking-wider",children:"SPORT"})]})}),(0,a.jsx)("th",{colSpan:3,className:"px-1 py-1.5 text-center text-[9px] sm:text-[10px] font-bold uppercase tracking-wider text-[#4681E8] border-b border-l border-slate-100",children:"CƯỢC CH\xc2U \xc1"}),(0,a.jsx)("th",{colSpan:3,className:"px-1 py-1.5 text-center text-[9px] sm:text-[10px] font-bold uppercase tracking-wider text-[#4681E8] border-b border-l border-slate-100",children:"CƯỢC CH\xc2U \xc2U"}),(0,a.jsx)("th",{colSpan:3,className:"px-1 py-1.5 text-center text-[9px] sm:text-[10px] font-bold uppercase tracking-wider text-[#4681E8] border-b border-l border-slate-100",children:"T\xc0I XỈU"}),(0,a.jsx)("th",{colSpan:3,className:"px-1 py-1.5 text-center text-[9px] sm:text-[10px] font-bold uppercase tracking-wider text-[#4681E8] border-b border-l border-slate-100",children:"K\xc8O G\xd3C"})]}),(0,a.jsxs)("tr",{className:"bg-slate-50",children:[(0,a.jsx)(f,{children:"CHỦ"}),(0,a.jsx)(f,{children:"CHẤP"}),(0,a.jsx)(f,{children:"KH\xc1CH"}),(0,a.jsx)(f,{children:"CHỦ"}),(0,a.jsx)(f,{children:"H\xd2A"}),(0,a.jsx)(f,{children:"KH\xc1CH"}),(0,a.jsx)(f,{children:"T\xc0I"}),(0,a.jsx)(f,{children:"TỶ LỆ"}),(0,a.jsx)(f,{children:"XỈU"}),(0,a.jsx)(f,{children:"T\xc0I"}),(0,a.jsx)(f,{children:"TỶ LỆ"}),(0,a.jsx)(f,{children:"XỈU"})]})]}),(0,a.jsxs)("tbody",{children:[(0,a.jsxs)("tr",{className:"hover:bg-slate-50 transition-colors",children:[(0,a.jsx)("td",{className:"px-4 py-2.5 text-[11px] sm:text-xs text-slate-500 font-medium border-b border-slate-50",children:"Tỷ Lệ Mở Cược"}),(0,a.jsx)(j,{children:d[0]}),(0,a.jsx)(j,{color:"text-red-400",children:d[1]}),(0,a.jsx)(j,{children:d[2]}),(0,a.jsx)(j,{children:h[0]}),(0,a.jsx)(j,{children:h[1]}),(0,a.jsx)(j,{children:h[2]}),(0,a.jsx)(j,{children:p[0]}),(0,a.jsx)(j,{children:p[1]}),(0,a.jsx)(j,{children:p[2]}),(0,a.jsx)(j,{children:g[0]}),(0,a.jsx)(j,{children:g[1]}),(0,a.jsx)(j,{children:g[2]})]}),(0,a.jsxs)("tr",{className:"hover:bg-slate-50 transition-colors",children:[(0,a.jsx)("td",{className:"px-4 py-2.5 text-[11px] sm:text-xs text-slate-500 font-medium border-b border-slate-50",children:"Tỷ Lệ Trước Trận"}),(0,a.jsx)(j,{children:x[0]}),(0,a.jsx)(j,{color:"text-red-400",children:x[1]}),(0,a.jsx)(j,{children:x[2]}),(0,a.jsx)(j,{children:m[0]}),(0,a.jsx)(j,{children:m[1]}),(0,a.jsx)(j,{children:m[2]}),(0,a.jsx)(j,{children:u[0]}),(0,a.jsx)(j,{children:u[1]}),(0,a.jsx)(j,{children:u[2]}),(0,a.jsx)(j,{children:b[0]}),(0,a.jsx)(j,{children:b[1]}),(0,a.jsx)(j,{children:b[2]})]}),(0,a.jsxs)("tr",{className:"hover:bg-slate-50 transition-colors bg-white",children:[(0,a.jsxs)("td",{className:"px-4 py-2.5 text-[11px] sm:text-xs text-slate-700 font-bold flex items-center gap-1.5 border-b border-slate-50",children:["Live ",(0,a.jsx)("span",{className:"w-1.5 h-1.5 rounded-full bg-red-500 animate-pulse"})]}),(0,a.jsx)(j,{color:"text-green-400",children:x[0]}),(0,a.jsx)(j,{color:"text-red-400",children:x[1]}),(0,a.jsx)(j,{color:"text-green-400",children:x[2]}),(0,a.jsx)(j,{color:"text-green-400",children:m[0]}),(0,a.jsx)(j,{color:"text-green-400",children:m[1]}),(0,a.jsx)(j,{color:"text-green-400",children:m[2]}),(0,a.jsx)(j,{color:"text-green-400",children:u[0]}),(0,a.jsx)(j,{children:u[1]}),(0,a.jsx)(j,{color:"text-green-400",children:u[2]}),(0,a.jsx)(j,{color:"text-green-400",children:b[0]}),(0,a.jsx)(j,{children:b[1]}),(0,a.jsx)(j,{color:"text-green-400",children:b[2]})]})]})]}),(0,a.jsx)("p",{className:"text-center text-slate-400 text-[10px] py-2.5 border-t border-slate-100",children:"Tỷ lệ k\xe8o sẽ được cập nhật gần giờ thi đấu"})]})}},12174:(e,t,s)=>{"use strict";s.d(t,{Klivevip26ResultsPage:()=>o});var a=s(68019),l=s(10707),r=s(78637),n=s(88435),i=s(58653);function o({initialData:e,selectedLeague:t}){let s=(0,r.useRouter)(),c=(0,r.usePathname)(),d=(0,r.useSearchParams)(),[x,h]=(0,l.useTransition)(),[m,p]=(0,l.useState)(!1),[u,g]=(0,l.useState)(""),{availableLeagues:b,dateGroups:f}=(0,l.useMemo)(()=>(0,i.o8)(e),[e]),j=(0,l.useMemo)(()=>Array.from(new Set(f.map(e=>e.date_header))),[f]),w=d.get("date")||"",v=e=>{let t=new URLSearchParams(d.toString());e&&e!==w?t.set("date",e):t.delete("date"),h(()=>{let e=t.toString();s.push(e?`${c}?${e}`:c,{scroll:!1})})},N=(0,l.useMemo)(()=>{let e=f;return w&&(e=e.filter(e=>e.date_header===w)),(0,i.kK)(e,t)},[f,w,t]),y=(0,l.useMemo)(()=>
100{if(!u)return b;let e=u.toLowerCase();return b.filter(t=>t.name.toLowerCase().includes(e))},[b,u]),_=N.reduce((e,t)=>e+t.matches.length,0);if(0===f.length)return(0,a.jsxs)("div",{className:"max-w-[1440px] mx-auto px-4 py-8",children:[(0,a.jsx)(n.H,{eyebrow:"Kết quả",title:"KẾT QUẢ B\xd3NG Đ\xc1"}),(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center py-16 gap-4",children:[(0,a.jsx)("div",{className:"w-12 h-12 rounded-full border-2 border-[#E11D48]/30 border-t-[#E11D48] animate-spin"}),(0,a.jsx)("span",{className:"text-slate-500 text-sm font-medium tracking-wide",children:"Đang tải kết quả..."})]})]});let k=e=>{let t=new URLSearchParams(d.toString());e?t.set("league",e):t.delete("league"),p(!1),g(""),h(()=>{let e=t.toString();s.push(e?`${c}?${e}`:c,{scroll:!1})})};return(0,a.jsxs)("div",{className:"max-w-[1440px] mx-auto px-4 py-8",children:[(0,a.jsx)(n.H,{eyebrow:"Kết quả",title:"KẾT QUẢ B\xd3NG Đ\xc1",rightSlot:(0,a.jsx)("div",{className:"text-[12px] text-slate-600",children:(0,a.jsx)("span",{className:"text-slate-900/80 font-bold",children:t||"Tất cả giải đấu"})})}),(0,a.jsxs)("div",{className:"flex flex-col md:flex-row gap-4 mb-4 items-start md:items-center justify-between",children:[j.length>0&&(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,a.jsx)("button",{type:"button",onClick:()=>v(""),className:`px-4 py-2 rounded-xl text-sm font-bold transition-all duration-300 ${!w?"bg-gradient-to-r from-[#4681E8] to-[#2563eb] text-white shadow-[0_4px_15px_rgba(70,129,232,0.4)] border border-[#4681E8]/50":"bg-white text-[#64748B] border border-slate-200 hover:bg-slate-50 hover:text-slate-800"}`,children:"Tất cả ng\xe0y"}),j.slice(0,5).map(e=>(0,a.jsx)("button",{type:"button",onClick:()=>v(e),className:`px-4 py-2 rounded-xl text-sm font-bold transition-all duration-300 ${w===e?"bg-gradient-to-r from-[#4681E8] to-[#2563eb] text-white shadow-[0_4px_15px_rgba(70,129,232,0.4)] border border-[#4681E8]/50":"bg-white text-[#64748B] border border-slate-200 hover:bg-slate-50 hover:text-slate-800"}`,children:e},e))]}),(0,a.jsxs)("div",{className:"relative w-full md:w-[320px]",children:[(0,a.jsxs)("button",{onClick:()=>p(!m),className:"w-full flex items-center gap-3 bg-white hover:bg-slate-50 px-4 py-2.5 rounded-xl border border-slate-200 shadow-inner transition-all text-sm",children:[(0,a.jsx)("svg",{className:"w-5 h-5 text-[#4681E8]",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 4a1 1 0 011-1h16a1 1 0 011 1v2.586a1 1 0 01-.293.707l-6.414 6.414a1 1 0 00-.293.707V17l-4 4v-6.586a1 1 0 00-.293-.707L3.293 7.293A1 1 0 013 6.586V4z"})}),(0,a.jsx)("span",{className:"text-slate-700 font-bold flex-1 text-left truncate",children:t||"Chọn giải đấu..."}),(0,a.jsx)("svg",{className:`w-4 h-4 text-slate-400 transition-transform ${m?"rotate-180":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),m&&(0,a.jsxs)("div",{className:"absolute top-full left-0 right-0 mt-2 bg-white border border-slate-200 rounded-2xl shadow-xl z-50 max-h-[300px] overflow-hidden flex flex-col",children:[(0,a.jsx)("div",{className:"p-2 border-b border-slate-100",children:(0,a.jsx)("input",{type:"text",placeholder:"T\xecm giải đấu...",value:u,onChange:e=>g(e.target.value),className:"w-full bg-slate-50 border border-transparent rounded-xl px-4 py-2.5 text-sm text-slate-800 placeholder-slate-400 outline-none focus:border-[#4681E8]/50 transition-colors"})}),(0,a.jsxs)("div",{className:"overflow-y-auto flex-1 pb-2",children:[(0,a.jsx)("button",{type:"button",onClick:()=>k(),className:`block w-full text-left px-4 py-3 text-sm transition-colors ${!t?"bg-[#4681E8]/10 text-[#4681E8] border-l-4 border-[#4681E8]":"text-slate-600 hover:bg-slate-50 hover:text-slate-800"}`,children:"Tất cả giải đấu"}),y.map((e,s)=>(0,a.jsxs)("button",{type:"button",onClick:()=>k(e.name),className:`flex items-center gap-3 px-4 py-3 text-sm transition-colors cursor-pointer ${t===e.name?"bg-[#4681E8]/10 text-[#4681E8] border-l-4 border-[#4681E8]":"text-slate-600 hover:bg-slate-50 hover:text-slate-800"}`,children:[e.icon?(0,a.jsx)("img",{src:e.icon,alt:e.name||"League",className:"w-5 h-5 object-contain shrink-0",loading:"lazy",decoding:"async"}):(0,a.jsx)("div",{className:"w-5 h-5 rounded-md bg-slate-200 shrink-0"}),(0,a.jsx)("span",{className:"truncate",children:e.name})]},s))]})]})]})]}),x&&(0,a.jsxs)("div",{className:"mb-4 inline-flex items-center gap-2 rounded-full border border-slate-200 bg-white px-4 py-2 text-xs text-slate-500 shadow-sm",children:[(0,a.jsx)("span",{className:"h-2 w-2 rounded-full bg-[#E11D48] animate-pulse shadow-[0_0_8px_rgba(225,29,72,0.8)]"}),(0,a.jsx)("span",{className:"font-bold tracking-wide",children:"Đang tải kết quả từ server..."})]}),(0,a.jsx)("div",{className:"space-y-4",children:0===N.length?(0,a.jsx)("div",{className:"text-center py-16 text-[#64748B] font-medium tracking-wide",children:"Kh\xf4ng c\xf3 kết quả n\xe0o"}):N.map((e,t)=>(0,a.jsxs)("div",{className:"overflow-hidden rounded-2xl border border-slate-200 bg-white shadow-[0_8px_30px_rgba(0,0,0,0.06)]",children:[(0,a.jsx)("div",{className:"bg-slate-50 px-5 py-3 border-b border-slate-100 flex items-center justify-between",children:(0,a.jsxs)("span",{className:"text-[12px] text-slate-500 font-bold uppercase tracking-widest",children:[e.league_round?e.league_round:"V\xf2ng đấu",(0,a.jsx)("span",{className:"text-[#E11D48] ml-2 font-mono text-[11px] bg-[#E11D48]/10 px-2 py-0.5 rounded-full border border-[#
100E11D48]/20",children:e.date_header})]})}),e.matches.map((e,t)=>{var s;return(0,a.jsx)("div",{className:"bg-transparent hover:bg-slate-50 border-b border-slate-100 last:border-0 transition-colors group cursor-default",children:(0,a.jsxs)("div",{className:"flex items-center py-4 px-5 gap-4",children:[(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center min-w-[56px] shrink-0 border-r border-slate-100 pr-4",children:[(0,a.jsx)("span",{className:"text-[9px] text-slate-400 uppercase tracking-widest mb-1 font-bold",children:"L\xfac"}),(0,a.jsx)("span",{className:"text-[13px] text-slate-700 font-mono font-black",children:e.time})]}),(0,a.jsxs)("div",{className:"flex-1 flex items-center justify-end gap-3 min-w-0",children:[(0,a.jsx)("span",{className:"text-[14px] text-slate-800 font-bold truncate text-right group-hover:text-slate-900 transition-colors",children:e.home_team}),e.home_logo?(0,a.jsx)("div",{className:"w-8 h-8 rounded-full bg-slate-100 border border-slate-200 p-1 flex items-center justify-center shadow-sm",children:(0,a.jsx)("img",{src:e.home_logo,alt:e.home_team||"Home team",className:"w-full h-full object-contain",loading:"lazy"})}):(0,a.jsx)("div",{className:"w-8 h-8 rounded-full bg-slate-100 shrink-0 border border-slate-200 flex items-center justify-center text-[10px] font-bold text-slate-400",children:"?"})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center min-w-[90px] shrink-0 bg-slate-50 rounded-xl py-2 px-2 border border-slate-200 shadow-inner group-hover:border-[#4681E8]/40 transition-colors",children:[(0,a.jsx)("span",{className:`text-[22px] leading-none font-black tracking-widest drop-shadow-[0_2px_4px_rgba(0,0,0,0.8)] ${!(s=e.score)||"-"===s?"text-slate-400":"text-slate-800"}`,children:e.score}),e.ht_score&&(0,a.jsxs)("span",{className:"text-[10px] text-slate-500 font-mono mt-1 font-bold",children:["HT: ",e.ht_score]})]}),(0,a.jsxs)("div",{className:"flex-1 flex items-center gap-3 min-w-0",children:[e.away_logo?(0,a.jsx)("div",{className:"w-8 h-8 rounded-full bg-slate-100 border border-slate-200 p-1 flex items-center justify-center shadow-sm",children:(0,a.jsx)("img",{src:e.away_logo,alt:e.away_team||"Away team",className:"w-full h-full object-contain",loading:"lazy"})}):(0,a.jsx)("div",{className:"w-8 h-8 rounded-full bg-slate-100 shrink-0 border border-slate-200 flex items-center justify-center text-[10px] font-bold text-slate-400",children:"?"}),(0,a.jsx)("span",{className:"text-[14px] text-slate-800 font-bold truncate text-left group-hover:text-slate-900 transition-colors",children:e.away_team})]})]})},t)})]},t))}),(0,a.jsxs)("div",{className:"mt-6 text-center text-xs text-[#64748B] font-bold uppercase tracking-widest drop-shadow-sm",children:["Hiển thị ",_," kết quả trận đấu"]})]})}},13045:(e,t,s)=>{"use strict";s.d(t,{Klivevip10ResultsPage:()=>o});var a=s(68019),l=s(10707),r=s(78637),n=s(34003),i=s(49344);function o({initialData:e,selectedLeague:t}){let s=(0,r.useRouter)(),c=(0,r.usePathname)(),d=(0,r.useSearchParams)(),[x,h]=(0,l.useTransition)(),[m,p]=(0,l.useState)(!1),[u,g]=(0,l.useState)(""),{availableLeagues:b,dateGroups:f}=(0,l.useMemo)(()=>(0,i.o8)(e),[e]),j=(0,l.useMemo)(()=>Array.from(new Set(f.map(e=>e.date_header))),[f]),w=d.get("date")||"",v=e=>{let t=new URLSearchParams(d.toString());e&&e!==w?t.set("date",e):t.delete("date"),h(()=>{let e=t.toString();s.push(e?`${c}?${e}`:c,{scroll:!1})})},N=(0,l.useMemo)(()=>{let e=f;return w&&(e=e.filter(e=>e.date_header===w)),(0,i.kK)(e,t)},[f,w,t]),y=(0,l.useMemo)(()=>{if(!u)return b;let e=u.toLowerCase();return b.filter(t=>t.name.toLowerCase().includes(e))},[b,u]),_=N.reduce((e,t)=>e+t.matches.length,0);if(0===f.length)return(0,a.jsxs)("div",{className:"max-w-[1440px] mx-auto px-4 py-8",children:[(0,a.jsx)(n.G,{eyebrow:"Kết quả",title:"KẾT QUẢ B\xd3NG Đ\xc1"}),(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center py-16 gap-4",children:[(0,a.jsx)("div",{className:"w-12 h-12 rounded-full border-2 border-[#E11D48]/30 border-t-[#E11D48] animate-spin"}),(0,a.jsx)("span",{className:"text-slate-500 text-sm font-medium tracking-wide",children:"Đang tải kết quả..."})]})]});let k=e=>{let t=new URLSearchParams(d.toString());e?t.set("league",e):t.delete("league"),p(!1),g(""),h(()=>{let e=t.toString();s.push(e?`${c}?${e}`:c,{scroll:!1})})};return(0,a.jsxs)("div",{className:"max-w-[1440px] mx-auto px-4 py-8",children:[(0,a.jsx)(n.G,{eyebrow:"Kết quả",title:"KẾT QUẢ B\xd3NG Đ\xc1",rightSlot:(0,a.jsx)("div",{className:"text-[12px] text-slate-600",children:(0,a.jsx)("span",{className:"text-slate-900/80 font-bold",children:t||"Tất cả giải đấu"})})}),(0,a.jsxs)("div",{className:"flex flex-col md:flex-row gap-4 mb-4 items-start md:items-center justify-between",children:[j.length>0&&(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,a.jsx)("button",{type:"button",onClick:()=>v(""),className:`px-4 py-2 rounded-xl text-sm font-bold transition-all duration-300 ${!w?"bg-gradient-to-r from-[#4681E8] to-[#2563eb] text-white shadow-[0_4px_15px_rgba(70,129,232,0.4)] border border-[#4681E8]/50":"bg-white text-[#64748B] border border-slate-200 hover:bg-slate-50 hover:text-slate-800"}`,children:"Tất cả ng\xe0y"}),j.slice(0,5).map(e=>(0,a.jsx)("button",{type:"button",onClick:()=>v(e),className:`px-4 py-2 rounded-xl text-sm font-bold transition-all duration-300 ${w===e?"bg-gradient-to-r from-[#4681E8] to-[#2563eb] text-white shadow-[0_4px_15px_rgba(70,129,232,0.4)] border border-[#4681E8]/50":"bg-white text-[#64748B] border border-slate-200 hover:bg-slate-50 hover:text-slate-800"}`,children:e},e))]}),(0,a.jsxs)("div",{className:"relative w-full md:w-[320px]",children:[(0,a.jsxs)("button",{onClick:()=>p(!m),className:"w-full flex items-center gap-3 bg-white hover:bg-slate-50 px-4 py-2.5 rounded-xl border border-slate-200 shadow-inner transition-all text-sm",children:[(0,a.jsx)("svg",{className:"w-5 h-5 text-[#4681E8]",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 4a1 1 0 011-1h16a1 1 0 011 1v2.586a1 1 0 01-.293.707l-6.414 6.414a1 1 0 00-.293.707V17l-4 4v-6.586a1 1 0 00-.293-.707L3.293 7.293A1 1 0 013 6.586V4z"})}),(0,a.jsx)("span",{className:"text-slate-700 font-bold flex-1 text-left truncate",children:t||"Chọn giải đấu..."}),(0,a.jsx)("svg",{className:`w-4 h-4 text-slate-400 transition-transform ${m?"rotate-180":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),m&&(0,a.jsxs)("div",{className:"absolute top-full left-0 right-0 mt-2 bg-white border border-slate-200 rounded-2xl shadow-xl z-50 max-h-[300px] overflow-hidden flex flex-col",children:[(0,a.jsx)("div",{className:"p-2 border-b border-slate-100",children:(0,a.jsx)("input",{type:"text",placeholder:"T\xecm giải đấu...",value:u,onChange:e=>g(e.target.value),className:"w-full bg-slate-50 border border-transparent roun
100ded-xl px-4 py-2.5 text-sm text-slate-800 placeholder-slate-400 outline-none focus:border-[#4681E8]/50 transition-colors"})}),(0,a.jsxs)("div",{className:"overflow-y-auto flex-1 pb-2",children:[(0,a.jsx)("button",{type:"button",onClick:()=>k(),className:`block w-full text-left px-4 py-3 text-sm transition-colors ${!t?"bg-[#4681E8]/10 text-[#4681E8] border-l-4 border-[#4681E8]":"text-slate-600 hover:bg-slate-50 hover:text-slate-800"}`,children:"Tất cả giải đấu"}),y.map((e,s)=>(0,a.jsxs)("button",{type:"button",onClick:()=>k(e.name),className:`flex items-center gap-3 px-4 py-3 text-sm transition-colors cursor-pointer ${t===e.name?"bg-[#4681E8]/10 text-[#4681E8] border-l-4 border-[#4681E8]":"text-slate-600 hover:bg-slate-50 hover:text-slate-800"}`,children:[e.icon?(0,a.jsx)("img",{src:e.icon,alt:e.name||"League",className:"w-5 h-5 object-contain shrink-0",loading:"lazy",decoding:"async"}):(0,a.jsx)("div",{className:"w-5 h-5 rounded-md bg-slate-200 shrink-0"}),(0,a.jsx)("span",{className:"truncate",children:e.name})]},s))]})]})]})]}),x&&(0,a.jsxs)("div",{className:"mb-4 inline-flex items-center gap-2 rounded-full border border-slate-200 bg-white px-4 py-2 text-xs text-slate-500 shadow-sm",children:[(0,a.jsx)("span",{className:"h-2 w-2 rounded-full bg-[#E11D48] animate-pulse shadow-[0_0_8px_rgba(225,29,72,0.8)]"}),(0,a.jsx)("span",{className:"font-bold tracking-wide",children:"Đang tải kết quả từ server..."})]}),(0,a.jsx)("div",{className:"space-y-4",children:0===N.length?(0,a.jsx)("div",{className:"text-center py-16 text-[#64748B] font-medium tracking-wide",children:"Kh\xf4ng c\xf3 kết quả n\xe0o"}):N.map((e,t)=>(0,a.jsxs)("div",{className:"overflow-hidden rounded-2xl border border-slate-200 bg-white shadow-[0_8px_30px_rgba(0,0,0,0.06)]",children:[(0,a.jsx)("div",{className:"bg-slate-50 px-5 py-3 border-b border-slate-100 flex items-center justify-between",children:(0,a.jsxs)("span",{className:"text-[12px] text-slate-500 font-bold uppercase tracking-widest",children:[e.league_round?e.league_round:"V\xf2ng đấu",(0,a.jsx)("span",{className:"text-[#E11D48] ml-2 font-mono text-[11px] bg-[#E11D48]/10 px-2 py-0.5 rounded-full border border-[#E11D48]/20",children:e.date_header})]})}),e.matches.map((e,t)=>{var s;return(0,a.jsx)("div",{className:"bg-transparent hover:bg-slate-50 border-b border-slate-100 last:border-0 transition-colors group cursor-default",children:(0,a.jsxs)("div",{className:"flex items-center py-4 px-5 gap-4",children:[(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center min-w-[56px] shrink-0 border-r border-slate-100 pr-4",children:[(0,a.jsx)("span",{className:"text-[9px] text-slate-400 uppercase tracking-widest mb-1 font-bold",children:"L\xfac"}),(0,a.jsx)("span",{className:"text-[13px] text-slate-700 font-mono font-black",children:e.time})]}),(0,a.jsxs)("div",{className:"flex-1 flex items-center justify-end gap-3 min-w-0",children:[(0,a.jsx)("span",{className:"text-[14px] text-slate-800 font-bold truncate text-right group-hover:text-slate-900 transition-colors",children:e.home_team}),e.home_logo?(0,a.jsx)("div",{className:"w-8 h-8 rounded-full bg-slate-100 border border-slate-200 p-1 flex items-center justify-center shadow-sm",children:(0,a.jsx)("img",{src:e.home_logo,alt:e.home_team||"Home team",className:"w-full h-full object-contain",loading:"lazy"})}):(0,a.jsx)("div",{className:"w-8 h-8 rounded-full bg-slate-100 shrink-0 border border-slate-200 flex items-center justify-center text-[10px] font-bold text-slate-400",children:"?"})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center min-w-[90px] shrink-0 bg-slate-50 rounded-xl py-2 px-2 border border-slate-200 shadow-inner group-hover:border-[#4681E8]/40 transition-colors",children:[(0,a.jsx)("span",{className:`text-[22px] leading-none font-black tracking-widest drop-shadow-[0_2px_4px_rgba(0,0,0,0.8)] ${!(s=e.score)||"-"===s?"text-slate-400":"text-slate-800"}`,children:e.score}),e.ht_score&&(0,a.jsxs)("span",{className:"text-[10px] text-slate-500 font-mono mt-1 font-bold",children:["HT: ",e.ht_score]})]}),(0,a.jsxs)("div",{className:"flex-1 flex items-center gap-3 min-w-0",children:[e.away_logo?(0,a.jsx)("div",{className:"w-8 h-8 rounded-full bg-slate-100 border border-slate-200 p-1 flex items-center justify-center shadow-sm",children:(0,a.jsx)("img",{src:e.away_logo,alt:e.away_team||"Away team",className:"w-full h-full object-contain",loading:"lazy"})}):(0,a.jsx)("div",{className:"w-8 h-8 rounded-full bg-slate-100 shrink-0 border border-slate-200 flex items-center justify-center text-[10px] font-bold text-slate-400",children:"?"}),(0,a.jsx)("span",{className:"text-[14px] text-slate-800 font-bold truncate text-left group-hover:text-slate-900 transition-colors",children:e.away_team})]})]})},t)})]},t))}),(0,a.jsxs)("div",{className:"mt-6 text-center text-xs text-[#64748B] font-bold uppercase tracking-widest drop-shadow-sm",children:["Hiển thị ",_," kết quả trận đấu"]})]})}},13685:(e,t,s)=>{"use strict";s.d(t,{Klivevip11MatchDetailPage:()=>m});var a=s(68019),l=s(10707),r=s(58420);function n({src:e,poster:t,autoPlay:s=!0,onError:i,className:o=""}){let c=(0,l.useRef)(null),d=(0,l.useRef)(i);d.current=i;let[x,h]=(0,l.useState)(!1),[m,p]=(0,l.useState)(!1);return((0,l.useEffect)(()=>{let t=c.current;if(!t)return;let a=null;h(!1);let l=()=>p(!0),n=()=>p(!1);t.addEventListener("play",l),t.addEventListener("pause",n);let i=()=>{s&&(t.muted=!0,t.play().catch(()=>{}))};if(t.addEventListener("canplay",i),r.Ay.isSupported()){(a=new r.Ay({maxBufferLength:30,maxMaxBufferLength:60,lowLatencyMode:!0,enableWorker:!0})).loadSource(e),a.attachMedia(t),a.on(r.Ay.Events.MANIFEST_PARSED,()=>{s&&(t.muted=!0,t.play().catch(e=>{console.warn("AutoPlay failed:",e),t.muted=!1}))});let l=0,n=0;a.on(r.Ay.Events.ERROR,(e,t)=>
100{if(t.type===r.Ay.ErrorTypes.NETWORK_ERROR&&(++l>2||t.response&&t.response.code>=400)){console.error("HLS Network Error threshold reached (CORS/404), triggering fallback.",t),h(!0),d.current&&d.current(t),a?.destroy();return}if(t.fatal)switch(t.type){case r.Ay.ErrorTypes.NETWORK_ERROR:console.error("HLS Fatal Network Error, recovering...",t),a?.startLoad();break;case r.Ay.ErrorTypes.MEDIA_ERROR:console.error("HLS Media Error, recovering...",t),++n>3?(console.error("HLS Media Error threshold reached, triggering fallback."),h(!0),d.current&&d.current(t),a?.destroy()):a?.recoverMediaError();break;default:console.error("HLS Fatal Error:",t),h(!0),d.current&&d.current(t),a?.destroy()}})}else t.canPlayType("application/vnd.apple.mpegurl")&&(t.src=e,t.addEventListener("loadedmetadata",()=>{s&&t.play().catch(e=>{console.warn("AutoPlay failed:",e)})}),t.addEventListener("error",e=>{h(!0),d.current&&d.current(e)}));return()=>{t.removeEventListener("play",l),t.removeEventListener("pause",n),t.removeEventListener("canplay",i),a&&a.destroy()}},[e,s]),x)?i?null:(0,a.jsxs)("div",{className:`w-full h-full flex flex-col items-center justify-center bg-white/80 backdrop-blur ${o}`,children:[(0,a.jsx)("svg",{className:"w-12 h-12 text-red-500 mb-4 opacity-80",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"})}),(0,a.jsx)("div",{className:"text-slate-600 text-sm font-medium",children:"Video/Stream kh\xf4ng khả dụng hoặc bị lỗi mạng"}),(0,a.jsx)("div",{className:"text-gray-500 text-xs mt-1",children:"Vui l\xf2ng thử lại sau hoặc chọn nguồn kh\xe1c"})]}):(0,a.jsx)("div",{className:`relative group w-full h-full bg-white flex items-center justify-center overflow-hidden ${o}`,children:(0,a.jsx)("video",{ref:c,className:"w-full h-full object-contain",controls:!0,playsInline:!0,muted:s,poster:t,referrerPolicy:"no-referrer"})})}function i(e){let t=(e||"").split(/[\s-]+/).slice(0,2).map(e=>e[0]||"").join("").toUpperCase()||"??";return`data:image/svg+xml,${encodeURIComponent(`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 80 80"><rect width="80" height="80" rx="20" fill="#1a1c25"/><text x="40" y="47" font-size="20" font-family="Arial" font-weight="700" text-anchor="middle" fill="#666">${t}</text></svg>`)}`}function o({homeName:e,awayName:t,homeLogo:s,awayLogo:l,homeScore:r="0",awayScore:n="0",statusText:c="LIVE",timeText:d="",isLive:x=!0,sportId:h="1",matchId:m}){let p=s||i(e),u=l||i(t),g="5"===String(h),b="2"===String(h),f="bg-slate-200 border-slate-200",j="repeating-linear-gradient(90deg, transparent, transparent 10%, #000 10%, #000 20%)";return g?(f="bg-slate-100 border-slate-200",j="none"):b&&(f="bg-[#bc7a46] border-[#8a4e21]",j="repeating-linear-gradient(90deg, transparent, transparent 5%, #000 5%, #000 10%)"),(0,a.jsxs)("div",{className:"relative w-full aspect-video min-h-[300px] max-h-[600px] bg-slate-50 overflow-hidden flex flex-col justify-center",children:[(0,a.jsx)("div",{className:"absolute inset-0 flex items-center justify-center pointer-events-none mt-16 md:mt-24",children:(0,a.jsx)("div",{className:"relative w-[120%] h-[120%] sm:w-[90%] sm:h-[120%] max-w-[900px] flex-shrink-0 transition-transform duration-1000",style:{transform:"perspective(900px) rotateX(60deg) scale(0.9)",transformOrigin:"center center"},children:(0,a.jsxs)("div",{className:`absolute inset-0 ${f} shadow-[0_30px_60px_rgba(0,0,0,0.8)] border-4 rounded-xl overflow-hidden flex transition-colors duration-500`,children:[(0,a.jsx)("div",{className:"absolute inset-0 opacity-15 pointer-events-none",style:{backgroundImage:j}}),(0,a.jsxs)("div",{className:"absolute inset-[4%] pointer-events-none shadow-sm flex items-center justify-center",children:["1"===String(h)&&(0,a.jsxs)("div",{className:"absolute inset-0 w-full h-full border-2 border-white/60",children:[(0,a.jsx)("div",{className:"absolute left-1/2 top-0 bottom-0 w-0 border-l-2 border-white/60 -translate-x-1/2"}),(0,a.jsx)("div",{className:"absolute left-1/2 top-1/2 w-[18%] aspect-square rounded-full border-2 border-white/60 -translate-x-1/2 -translate-y-1/2"}),(0,a.jsx)("div",{className:"absolute left-1/2 top-1/2 w-2 h-2 rounded-full bg-white/80 -translate-x-1/2 -translate-y-1/2"}),(0,a.jsx)("div",{className:"absolute left-0 top-1/2 w-[16%] h-[46%] border-2 border-l-0 border-white/60 -translate-y-1/2 bg-slate-200"}),(0,a.jsx)("div",{className:"absolute left-0 top-1/2 w-[6%] h-[20%] border-2 border-l-0 border-white/60 -translate-y-1/2 bg-slate-200"}),(0,a.jsx)("div",{className:"absolute left-[16%] top-1/2 w-[8%] aspect-square border-2 border-l-0 border-white/60 rounded-r-full -translate-y-1/2 clip-path-half",style:{clipPath:"inset(0 0 0 50%)"}}),(0,a.jsx)("div",{className:"absolute right-0 top-1/2 w-[16%] h-[46%] border-2 border-r-0 border-white/60 -translate-y-1/2 bg-slate-200"}),(0,a.jsx)("div",{className:"absolute right-0 top-1/2 w-[6%] h-[20%] border-2 border-r-0 border-white/60 -translate-y-1/2 bg-slate-200"}),(0,a.jsx)("div",{className:"absolute right-[16%] top-1/2 w-[8%] aspect-square border-2 border-r-0 border-white/60 rounded-l-full -translate-y-1/2 clip-path-half",style:{clipPath:"inset(0 50% 0 0)"}})]}),g&&(0,a.jsxs)("div",{className:"absolute inset-[10%] w-[80%] h-[80%
100] border-2 border-white/80 bg-white",children:[(0,a.jsx)("div",{className:"absolute top-[10%] bottom-[10%] left-0 right-0 border-y-2 border-white/80"}),(0,a.jsx)("div",{className:"absolute left-1/2 top-[-2%] bottom-[-2%] w-1 bg-white/40 shadow-xl -translate-x-1/2 z-10"}),(0,a.jsx)("div",{className:"absolute left-[25%] right-[25%] top-[10%] bottom-[10%] border-x-2 border-white/80"}),(0,a.jsx)("div",{className:"absolute left-[25%] right-[25%] top-1/2 w-[50%] border-t-2 border-white/80 -translate-y-1/2"}),(0,a.jsx)("div",{className:"absolute left-0 top-1/2 w-[2%] border-t-2 border-white/80 -translate-y-1/2"}),(0,a.jsx)("div",{className:"absolute right-0 top-1/2 w-[2%] border-t-2 border-white/80 -translate-y-1/2"})]}),b&&(0,a.jsxs)("div",{className:"absolute inset-0 w-full h-full border-2 border-white/50",children:[(0,a.jsx)("div",{className:"absolute left-1/2 top-0 bottom-0 w-0 border-l-2 border-white/50 -translate-x-1/2"}),(0,a.jsx)("div",{className:"absolute left-1/2 top-1/2 w-[15%] aspect-square rounded-full border-2 border-white/50 -translate-x-1/2 -translate-y-1/2"}),(0,a.jsx)("div",{className:"absolute left-0 top-1/2 w-[18%] h-[35%] border-2 border-l-0 border-white/50 -translate-y-1/2 bg-[#bc7a46]"}),(0,a.jsx)("div",{className:"absolute left-[18%] top-1/2 w-[10%] aspect-square rounded-full border-2 border-white/50 -translate-y-1/2"}),(0,a.jsx)("div",{className:"absolute left-0 top-1/2 w-[30%] h-[70%] border-2 border-l-0 border-white/50 rounded-r-full -translate-y-1/2 opacity-60"}),(0,a.jsx)("div",{className:"absolute right-0 top-1/2 w-[18%] h-[35%] border-2 border-r-0 border-white/50 -translate-y-1/2 bg-[#bc7a46]"}),(0,a.jsx)("div",{className:"absolute right-0 top-1/2 w-[30%] h-[70%] border-2 border-r-0 border-white/50 rounded-l-full -translate-y-1/2 opacity-60"})]})]}),x&&(0,a.jsx)("div",{className:`absolute left-1/2 top-1/2 shadow-[0_8px_16px_rgba(0,0,0,0.8)] z-10 transition-all duration-[3000ms] border-2 border-white/20 rounded-full
101                                ${g?"w-2 h-2 sm:w-3 sm:h-3 bg-[#ccff00]":b?"w-4 h-4 sm:w-6 sm:h-6 bg-[#d95d16]":"w-4 h-4 sm:w-5 sm:h-5 bg-white"}`,style:{animation:"ballMove 8s infinite alternate ease-in-out",transform:"translate(-50%, -50%)"},children:(0,a.jsx)("div",{className:"absolute -bottom-4 left-1/2 w-4 h-2 bg-white/40 rounded-full blur-sm -translate-x-1/2"})}),x&&(0,a.jsxs)("div",{className:"absolute left-[65%] top-[60%] flex flex-col items-center animate-bounce-slow",style:{animation:"floatBubble 4s infinite alternate ease-in-out"},children:[(0,a.jsxs)("div",{className:"bg-white/95 backdrop-blur border border-white/10 rounded-2xl p-2 shadow-2xl flex items-center gap-3 w-max max-w-[200px]",children:[(0,a.jsx)("div",{className:"w-6 h-6 rounded-full flex items-center justify-center p-0.5 bg-white/5 shrink-0",children:(0,a.jsx)("img",{src:p,alt:e||"Home team",className:"max-w-full max-h-full object-contain",onError:t=>t.target.src=i(e),loading:"lazy",decoding:"async"})}),(0,a.jsx)("div",{className:"flex flex-col pr-1 overflow-hidden",children:(0,a.jsx)("span",{className:"text-slate-900 font-bold text-[10px] sm:text-xs tracking-wide truncate",children:g?"Serve / Return":"Tấn c\xf4ng nguy hiểm"})})]}),(0,a.jsx)("div",{className:"w-0 h-0 border-l-[6px] border-r-[6px] border-t-[6px] border-l-transparent border-r-transparent border-t-[#1a1c28]/95 mt-[-1px]"})]})]})})}),(0,a.jsx)("div",{className:"relative z-20 flex-1 flex flex-col items-center justify-start p-4 md:p-6 pointer-events-none w-full",children:(0,a.jsxs)("div",{className:"w-full max-w-[800px] flex items-center justify-between px-4 sm:px-6 py-3 rounded-xl bg-gradient-to-r from-[#0d0f14]/90 via-[#151821]/95 to-[#0d0f14]/90 backdrop-blur-xl border border-white/10 shadow-[0_10px_40px_rgba(0,0,0,0.8)] pointer-events-auto",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 flex-1 min-w-0 pr-2",children:[(0,a.jsx)("img",{src:p,alt:e,className:"w-8 h-8 md:w-12 md:h-12 object-contain drop-shadow-lg shrink-0",onError:t=>t.target.src=i(e),loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-slate-900 text-xs sm:text-sm md:text-base font-bold truncate tracking-wide",children:e})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1 shrink-0 px-2 sm:px-6 min-w-[100px]",children:[(0,a.jsxs)("span",{className:`inline-flex items-center gap-1.5 px-2.5 py-0.5 rounded-full text-[10px] sm:text-xs font-bold shadow-inner ${x?"bg-green-500/10 text-green-400 border border-green-500/20":"bg-white/5 text-slate-900/40"}`,children:[x&&(0,a.jsx)("span",{className:"w-1.5 h-1.5 rounded-full bg-green-500 animate-pulse shadow-[0_0_8px_#22c55e]"}),d||c]}),(0,a.jsxs)("div",{className:"flex gap-3 sm:gap-5 items-center justify-center",children:[(0,a.jsx)("span",{className:"text-slate-900 text-2xl sm:text-4xl font-black drop-shadow-md",children:r}),(0,a.jsx)("span",{className:"text-slate-900/30 text-xl font-light",children:"-"}),(0,a.jsx)("span",{className:"text-slate-900 text-2xl sm:text-4xl font-black drop-shadow-md",children:n})]})]}),(0,a.jsxs)("div",{className:"flex items-center justify-end gap-3 flex-1 min-w-0 pl-2 text-right",children:[(0,a.jsx)("span",{className:"text-slate-900 text-xs sm:text-sm md:text-base font-bold truncate tracking-wide",children:t}),(0,a.jsx)("img",{src:u,alt:t,className:"w-8 h-8 md:w-12 md:h-12 object-contain drop-shadow-lg shrink-0",onError:e=>e.target.src=i(t),loading:"lazy",decoding:"async"})]})]})}),(0,a.jsx)("div",{className:"relative z-20 mt-auto w-full p-4 flex justify-center pointer-events-none",children:(0,a.jsx)("div",{className:"w-full max-w-[600px] h-6 bg-white/40 backdrop-blur-md rounded-full border border-white/5 flex items-center px-4",children:(0,a.jsxs)("div",{className:"flex-1 h-0.5 bg-white/10 relative rounded-full",children:[x&&(0,a.jsx)("div",{className:"absolute left-0 top-0 bottom-0 bg-gradient-to-r from-[#b38b22] to-[#ffda6a] w-[65%] rounded-full opacity-90 shadow-[0_0_12px_#daa520]"}),(0,a.jsx)("span",{className:"absolute left-[65%] top-1/2 -translate-y-1/2 -translate-x-1/2 w-1.5 h-1.5 rounded-full bg-white shadow-md"})]})})}),(0,a.jsx)("style",{children:`
102                @keyframes ballMove {
103                    0% { transform: translate(-30%, -20%) scale(1); }
104                    25% { transform: translate(40%, -10%) scale(1.1); }
105                    50% { transform: translate(20%, 30%) scale(0.9); }
106                    75% { transform: translate(-10%, 15%) scale(1.2); }
107                    100% { transform: translate(-45%, 0%) scale(1); }
108                }
109                @keyframes floatBubble {
110                    0% { transform: translateY(0px) translateX(0px); }
111                    50% { transform: translateY(-8px) translateX(4px); }
112                    100% { transform: translateY(4px) translateX(-4px); }
113                }
114            `})]})}function c(e,t){if("1"===t||"2"===t)switch(e){case"2":return{t:"HT 1",live:!0,sc:!0};case"3":return{t:"Giữa giờ",live:!0,sc:!0};case"4":return{t:"HT 2",live:!0,sc:!0};case"5":return{t:"Hiệp phụ",live:!0,sc:!0};case"7":return{t:"Penalty",live:!0,sc:!0};case"8":case"9":return{t:"Kết th\xfac",live:!1,sc:!0};default:return{t:"Chưa bắt đầu",live:!1,sc:!1}}
114return["51","52","53","54","55"].includes(e)?{t:`Set ${e-50}`,live:!0,sc:!0}:["100","90","110"].includes(e)?{t:"KT",live:!1,sc:!0}:"0"===e||"1"===e?{t:"Chưa bắt đầu",live:!1,sc:!1}:{t:"LIVE",live:!0,sc:!0}}function d(e){let t=(e||"").split(/[\s-]+/).slice(0,2).map(e=>e[0]||"").join("").toUpperCase()||"??";return`data:image/svg+xml,${encodeURIComponent(`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 80 80"><rect width="80" height="80" rx="20" fill="#1a1c25"/><text x="40" y="47" font-size="20" font-family="Arial" font-weight="700" text-anchor="middle" fill="#666">${t}</text></svg>`)}`}function x(e){let t=new Date(1e3*parseInt(e||"0",10));return{hm:t.toLocaleTimeString("vi-VN",{hour:"2-digit",minute:"2-digit",timeZone:"Asia/Ho_Chi_Minh"}),dm:t.toLocaleDateString("vi-VN",{day:"2-digit",month:"2-digit",timeZone:"Asia/Ho_Chi_Minh"}),full:t.toLocaleDateString("vi-VN",{day:"2-digit",month:"2-digit",year:"numeric",timeZone:"Asia/Ho_Chi_Minh"})}}let h="max-w-[1200px]";function m({matchData:e,relatedMatches:t,matchDetails:s,standings:r,brandingNameUpper:i}){let p,u,g,j,v,y,[C,S]=(0,l.useState)("odds"),L=e?.match_data?.anchors||[],[$,F]=(0,l.useState)(!1),[T,A]=(0,l.useState)(!1),[M,H]=(0,l.useState)(null),[D,B]=(0,l.useState)(!1),z=(0,l.useRef)(0);(0,l.useEffect)(()=>{if(!e?.has_live||"1"!==e.has_live||0===L.length)return;let t=!1;B(!0);let s=async t=>{let s=t?.uid,a=`/api/socolive/proxy-stream?url=${encodeURIComponent(`https://live.inplyr.com/${s?`room/${s}`:`default/${e.id}`}.m3u8`)}`;try{let e=await fetch(a,{method:"GET",cache:"no-store"});if(!e.ok)return null;let s=(await e.text()).split("\n").filter(e=>e.trim()&&!e.startsWith("#"));if(0===s.length)return null;return(await fetch(s[0],{method:"HEAD",cache:"no-store"})).ok?t:null}catch{return null}};return Promise.all(L.map(e=>s(e))).then(e=>{if(t)return;let s=e.find(e=>null!==e);s?(H(s),F(!0),A(!1)):(H(L[0]),A(!0)),B(!1)}),()=>{t=!0}},[e?.has_live,L.length]),(0,l.useEffect)(()=>{if(!T||D||z.current>=20)return;let t=setTimeout(()=>{z.current++,A(!1),B(!0);let t=async t=>{let s=t?.uid,a=`/api/socolive/proxy-stream?url=${encodeURIComponent(`https://live.inplyr.com/${s?`room/${s}`:`default/${e.id}`}.m3u8`)}`;try{let e=await fetch(a,{method:"GET",cache:"no-store"});if(!e.ok)return null;let s=(await e.text()).split("\n").filter(e=>e.trim()&&!e.startsWith("#"));if(0===s.length)return null;return(await fetch(s[0],{method:"HEAD",cache:"no-store"})).ok?t:null}catch{return null}};Promise.all(L.map(e=>t(e))).then(e=>{let t=e.find(e=>null!==e);t?(H(t),F(!0),A(!1)):A(!0),B(!1)})},15e3);return()=>clearTimeout(t)},[T,D]);let[I,R]=(0,l.useState)(null),U=e?.post_name||e?.ls_id||e?.id;if(window.location.origin,(0,l.useEffect)(()=>{if(!U)return;let e=setInterval(async()=>{try{let e=await fetch(`/api/klivevip/match/${U}`,{cache:"no-store"});if(e.ok){let t=await e.json();R(t?.match??null)}}catch{}},1e4);return()=>clearInterval(e)},[U]),!e)return(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center py-32 gap-4",children:[(0,a.jsx)("span",{className:"text-[#64748B] text-lg",children:"Kh\xf4ng t\xecm thấy trận đấu"}),(0,a.jsx)("a",{href:"/",className:"text-[#4681E8] hover:underline text-sm",children:"← Quay lại"})]});let G=I?{...e,...I}:e,P=G?.has_live==="1"&&L.length>0,K=c(G.status_id,G.sport_id),V=$&&M&&!T&&!D,W=P&&(D||T&&K.live&&z.current<20),O=!P||T&&!W&&!D,q=!K.live&&"8"!==String(G.status_id)&&"9"!==String(G.status_id),{hm:X,full:Y}=x(G.time),Z=G.source_card_meta?.league_label||G.match_data?.competition_vi||G.match_data?.competition_full||"",Q=G.match_data?.stage_label||G.source_card_meta?.stage_label||"",J=G.home_logo||d(G.home_name),ee=G.away_logo||d(G.away_name),et=e=>t=>{t.target.src=d(e)};return(0,a.jsxs)("div",{className:"w-full bg-white min-h-screen text-slate-600 font-sans pb-16",children:[(0,a.jsx)("div",{className:"w-full border-b border-slate-200 bg-white",children:(0,a.jsxs)("div",{className:`${h} mx-auto px-4 py-3 flex items-center justify-between`,children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 text-[13px] font-bold",children:[(0,a.jsx)("span",{className:"text-[#4681E8] uppercase tracking-wide",children:Z}),Q&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"text-slate-300",children:"•"}),(0,a.jsx)("span",{className:"text-slate-600",children:Q})]})]}),(0,a.jsx)("div",{className:"text-[12px] font-mono text-slate-400 hidden sm:block",children:Y})]})}),(0,a.jsxs)("div",{className:`${h} mx-auto px-0 md:px-4 py-0 md:py-6 flex flex-col lg:flex-row gap-4 lg:gap-6`,children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0 flex flex-col gap-4 lg:gap-6",children:[(0,a.jsxs)("div",{className:"w-full relative bg-[#000000] rounded-none md:rounded-2xl overflow-hidden shadow-[0_10px_40px_rgba(0,0,0,0.5)] border-y md:border border-slate-200",children:[(0,a.jsx)("div",{className:"relative w-full aspect-video bg-[#000000] group z-10",children:V?(0,a.jsx)(n,{src:`/api/klivevip/proxy-stream?url=${encodeURIComponent(`https://live.inplyr.com/${M?.uid&&"default"!==M.uid?`room/${M.uid}`:`default/${G.id}`}.m3u8`)}`,autoPlay:!0,onError:()=>A(!0)}):O?(0,a.jsx)(o,{homeName:G.home_name,awayName:G.away_name,homeLogo:G.home_logo,awayLogo:G.away_logo,homeScore:K.sc?G.home_score:"0",awayScore:K.sc?G.away_score:"0",statusText:K.t,timeText:G.time_text||X,isLive:K.live,sportId:G.sport_id,matchId:G.ls_id||G.id,kickoffMs:1e3*Number(G?.time||0),isPreMatch:q}):(0,a.jsxs)("div",{className:"absolute inset-0 z-10 flex flex-col items-center justify-center p-4 lg:p-10",children:[(0,a.jsxs)("div",{className:"absolute inset-0 flex justify-between items-center opacity-[0.03] pointer-events-none px-4 lg:px-20 overflow-hidden",children:[(0,a.jsx)("img",{src:J,alt:"",className:"w-1/2 max-w-[400px] blur-[10px]",loading:"lazy",decoding:"async"}),(0,a.jsx)("img",{src:ee,alt:"",className:"w-1/2 max-w-[400px] blur-[10px]",loading:"lazy",decoding:"async"})]}),P&&!T&&(0,a.jsx)("button",{onClick:()=>F(!0),className:"group mb-4 sm:mb-8 w-16 h-16 md:w-20 md:h-20 rounded-full bg-[#4681E8] flex items-center justify-center hover:bg-[#55CAF1] transition-all shadow-[0_0_30px_rgba(70,129,232,0.5)] curs
114or-pointer z-20",children:(0,a.jsx)("svg",{className:"w-8 h-8 md:w-10 md:h-10 text-white ml-1.5 md:ml-2 group-hover:scale-110 transition-transform",viewBox:"0 0 24 24",fill:"currentColor",children:(0,a.jsx)("path",{d:"M8 5v14l11-7z"})})}),(0,a.jsxs)("div",{className:"grid grid-cols-[1fr_auto_1fr] items-center w-full max-w-[800px] gap-2 lg:gap-8 z-20",children:[(0,a.jsxs)("div",{className:"flex flex-col items-center gap-2 lg:gap-4",children:[(0,a.jsx)("img",{src:J,alt:G.home_name,className:"w-16 h-16 sm:w-24 sm:h-24 lg:w-32 lg:h-32 object-contain drop-shadow-[0_10px_20px_rgba(0,0,0,0.8)]",onError:et(G.home_name),loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-[#FFFFFF] text-xs sm:text-base lg:text-lg font-black text-center line-clamp-2 uppercase tracking-wide",children:G.home_name})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-2 lg:gap-3",children:[K.sc?(0,a.jsxs)("div",{className:"flex items-center gap-3 lg:gap-6 bg-white/90 backdrop-blur-md px-4 py-2 lg:px-8 lg:py-4 rounded-2xl border border-slate-200 shadow-2xl",children:[(0,a.jsx)("span",{className:"text-[#4681E8] text-[32px] sm:text-[48px] lg:text-[64px] font-black leading-none",children:G.home_score}),(0,a.jsx)("span",{className:"text-slate-300 text-[20px] lg:text-[28px] font-light",children:":"}),(0,a.jsx)("span",{className:"text-[#4681E8] text-[32px] sm:text-[48px] lg:text-[64px] font-black leading-none",children:G.away_score})]}):(0,a.jsx)("div",{className:"text-[#FFFFFF] text-[32px] sm:text-[48px] lg:text-[56px] font-black tracking-widest leading-none drop-shadow-xl",children:X}),(0,a.jsxs)("span",{className:`inline-flex items-center gap-2 rounded-full px-3 py-1 lg:px-5 lg:py-1.5 text-[10px] lg:text-[12px] font-bold tracking-widest uppercase ${K.live?"bg-[#4681E8] text-white shadow-[0_0_20px_rgba(70,129,232,0.6)]":"bg-white text-slate-600 border border-slate-200"}`,children:[K.live&&(0,a.jsx)("span",{className:"w-2 h-2 rounded-full bg-white animate-pulse"}),K.t,G.time_text?` : ${G.time_text}`:""]})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-2 lg:gap-4",children:[(0,a.jsx)("img",{src:ee,alt:G.away_name,className:"w-16 h-16 sm:w-24 sm:h-24 lg:w-32 lg:h-32 object-contain drop-shadow-[0_10px_20px_rgba(0,0,0,0.8)]",onError:et(G.away_name),loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-[#FFFFFF] text-xs sm:text-base lg:text-lg font-black text-center line-clamp-2 uppercase tracking-wide",children:G.away_name})]})]})]})}),L.length>0&&(0,a.jsxs)("div",{className:"w-full bg-white border-t border-slate-200 px-3 lg:px-6 py-2.5 lg:py-4 flex items-center gap-2 lg:gap-4 overflow-x-auto z-20",children:[(0,a.jsx)("span",{className:"text-[10px] lg:text-[11px] text-slate-600 uppercase font-bold tracking-widest shrink-0 mr-1 lg:mr-2",children:"CHỌN K\xcaNH TRUYỀN:"}),L.map((e,t)=>(0,a.jsxs)("button",{onClick:()=>{H(e),F(!0),A(!1)},className:`shrink-0 flex items-center gap-1.5 lg:gap-2 rounded-full px-3 py-1.5 lg:px-5 lg:py-2 text-[11px] lg:text-[13px] font-bold transition-all ${M?.uid===e.uid&&!T?"bg-[#4681E8]/10 border border-[#4681E8] text-[#4681E8] shadow-[0_0_15px_rgba(70,129,232,0.2)]":"bg-white border border-slate-200 text-slate-600 hover:text-[#4681E8] hover:border-[#4681E8]/50"}`,children:[(0,a.jsx)("span",{className:`w-1.5 h-1.5 lg:w-2 lg:h-2 rounded-full ${M?.uid===e.uid&&!T?"bg-[#4681E8] animate-pulse":"bg-transparent"}`}),"BLV ",e.nickName||`K\xeanh ${t+1}`]},e.uid||t))]})]}),(p=(()=>{let e=s?.stats;if(!e)return!1;let t=null;return Array.isArray(e)&&e.length>0?t=e[0]:e?.results?.[0]?t=e.results[0]:e?.stats_full_time&&(t=e),!!t&&!!(t.stats_full_time?.length>0||t.stats_haft_time?.length>0||t.stats_half_time?.length>0||t.stats?.length>0)})(),u=!!(s?.lineup&&(Array.isArray(s.lineup)?s.lineup.length>0:s.lineup.home||s.lineup.away)),g=!!(s?.events&&(Array.isArray(s.events)?s.events.length>0:s.events.incidents?.length>0||s.events.data?.length>0)),j=!!(r&&(Array.isArray(r)?r.length>0:r.data?.length>0)),(y=(v=[{id:"stats",label:"THỐNG K\xca",show:p},{id:"lineup",label:"ĐỘI H\xccNH",show:u},{id:"events",label:"DIỄN BIẾN",show:g},{id:"standings",label:"BẢNG XH",show:j},{id:"odds",label:"TỶ LỆ K\xc8O",show:!!(s?.odds&&Array.isArray(s.odds)&&s.odds.length>0)}].filter(e=>e.show)).find(e=>e.id===C)?C:v[0]?.id||"odds")!==C&&setTimeout(()=>S(y),0),v.length>0?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"bg-white rounded-2xl p-2 border border-slate-200 flex overflow-x-auto gap-2 shadow-[0_4px_15px_rgba(0,0,0,0.08)] mx-4 md:mx-0",children:v.map(({id:e,label:t})=>(0,a.jsx)("button",{onClick:()=>S(e),className:`flex-1 min-w-[100px] py-2.5 sm:py-3 text-[10px] sm:text-[12px] font-black uppercase tracking-widest rounded-xl transition-all ${y===e?"bg-[#4681E8]/10 text-[#4681E8] border border-[#4681E8]/30 shadow-inner":"text-slate-500 hover:text-[#4681E8] hover:bg-[#4681E8]/5 border border-transparent"}`,children:t},e))}),(0,a.jsxs)("div",{className:"bg-white rounded-2xl border border-slate-200 overflow-hidden shadow-[0_4px_15px_rgba(0,0,0,0.08)] min-h-[400px] mx-4 md:mx-0",children:["stats"===y&&(0,a.jsx)(b,{matchDetails:s}),"lineup"===y&&(0,a.jsx)(f,{matchDetails:s}),"events"===y&&(0,a.jsx)(_,{events:s?.events}),"standings"===y&&(0,a.jsx)(k,{standings:r}),"odds"===y&&(0,a.jsx)(E,{odds:s?.odds})]})]}):null),t.length>0&&(0,a.jsxs)("div",{className:"mt-4 mx-4 md:mx-0",children:[(0,a.jsxs)("h2",{className:"px-1 py-4 text-sm sm:text-base font-black text-slate-800 uppercase flex items-center gap-3 tracking-widest border-b border-slate-100 mb-4",children:[(0,a.jsx)("span",{className:"w-1 h-5 bg-[#4681E8] rounded-sm shadow-[0_0_8px_#4681E8]"}),"TRẬN ĐẤU C\xd9NG GIẢI"]}),(0,a.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3 sm:gap-4",children:t.slice(0,4).map(e=>(0,a.jsx)(w,{m:e},e.id))})]})]}),(0,a.jsx)("div",{className:"w-full lg:w-[350px] xl:w-[400px] shrink-0 px-4 md:px-0",children:(0,a.jsxs)("div",{className:"bg-white border border-slate-200 rounded-2xl overflow-hidden flex flex-col shadow-[0_10px_30px_rgba(0,0,0,0.1)] lg:sticky lg:top-8 h-[600px] lg:h-[c
114alc(100vh-100px)] lg:max-h-[850px]",children:[(0,a.jsxs)("div",{className:"px-5 py-4 border-b border-slate-200 flex items-center justify-between bg-white",children:[(0,a.jsxs)("h3",{className:"text-slate-800 text-sm font-black uppercase tracking-widest flex items-center gap-2",children:[(0,a.jsx)("span",{className:"w-2.5 h-2.5 rounded-full bg-[#4681E8] shadow-[0_0_10px_rgba(70,129,232,0.4)]"}),"PH\xd2NG CHAT"]}),(0,a.jsxs)("span",{className:"text-[10px] bg-white px-3 py-1.5 rounded-full text-[#4681E8] font-mono border border-[#4681E8]/30 shadow-inner tracking-widest flex items-center gap-1.5",children:[(0,a.jsx)("svg",{className:"w-3 h-3",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 10l4.553-2.276A1 1 0 0121 8.618v6.764a1 1 0 01-1.447.894L15 14M5 18h8a2 2 0 002-2V8a2 2 0 00-2-2H5a2 2 0 00-2 2v8a2 2 0 002 2z"})}),L.length," BLV"]})]}),(0,a.jsx)("div",{className:"flex-1 bg-[#FFFFFF]/40 min-h-0 chat-container-wrapper",children:(0,a.jsx)(N,{anchors:L,selectedAnchor:M})})]})})]})]})}let p={25:"KIỂM SO\xc1T B\xd3NG",24:"CHUYỀN CH\xcdNH X\xc1C",23:"TỔNG SỐ ĐƯỜNG CHUYỀN",22:"TẤN C\xd4NG",21:"T.C\xd4NG NGUY HIỂM",2:"S\xdaT TR\xdaNG Đ\xcdCH",37:"PHẠT G\xd3C",28:"N\xc9M BI\xcaN",8:"VIỆT VỊ",3:"THẺ V\xc0NG",4:"THẺ ĐỎ",5:"S\xdaT PENALTY",29:"PHẠM LỖI",26:"Đ\xc1NH ĐẦU",27:"CỨU THUA",1:"B\xc0N THẮNG",7:"PHẢN LƯỚI"},u=[25,21,22,24,2,23,4,3,37,28,8,5,29],g="https://cdn.sportdb.live/upload/team/";function b({matchDetails:e}){let[t,s]=(0,l.useState)("full"),r=e?.stats,n=e?.lineup,i=n?.match?.home_team,o=n?.match?.away_team,c=null;Array.isArray(r)&&r.length>0?c=r[0]:r?.results?.[0]?c=r.results[0]:r?.stats_full_time&&(c=r);let d={full:c?.stats_full_time||[],h1:c?.stats_haft_time||c?.stats_half_time||[],h2:c?.stats_haft_time_2nd_half||[]}[t]||[];if(!c||0===d.length)return(0,a.jsx)(j,{text:"Thống k\xea sẽ được cập nhật khi trận đấu bắt đầu"});let x=[...d].sort((e,t)=>{let s=u.indexOf(e.type),a=u.indexOf(t.type);return(-1===s?999:s)-(-1===a?999:a)});return(0,a.jsxs)("div",{className:"flex flex-col",children:[(i||o)&&(0,a.jsxs)("div",{className:"flex items-center justify-between px-4 py-3 border-b border-slate-100",children:[(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5 w-20",children:[i?.logo&&(0,a.jsx)("img",{src:g+i.logo,alt:i?.name||"Home team",className:"w-8 h-8 object-contain",onError:e=>e.target.style.display="none",loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-slate-600 text-[10px] font-medium text-center leading-tight",children:i?.name||""})]}),(0,a.jsx)("div",{className:"flex gap-1",children:[{k:"h1",l:"Hiệp 1"},{k:"h2",l:"Hiệp 2"},{k:"full",l:"Cả trận"}].map(({k:e,l})=>(0,a.jsx)("button",{onClick:()=>s(e),className:`px-2.5 py-1 text-[10px] font-bold rounded transition-all ${t===e?"bg-[#E11D48] text-white":"text-slate-400 hover:text-slate-600 bg-slate-100"}`,children:l},e))}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5 w-20",children:[o?.logo&&(0,a.jsx)("img",{src:g+o.logo,alt:o?.name||"Away team",className:"w-8 h-8 object-contain",onError:e=>e.target.style.display="none",loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-slate-600 text-[10px] font-medium text-center leading-tight",children:o?.name||""})]})]}),(0,a.jsx)("div",{className:"px-4 py-3 space-y-3",children:x.map(e=>{let t=p[e.type]||`Stat ${e.type}`,s=e.home,l=e.away,r=24===e.type||25===e.type,n=s+l,i=0===n?50:s/n*100,o=s>l,c=l>s;return(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"flex justify-between items-center mb-1.5",children:[(0,a.jsxs)("span",{className:`text-xs font-bold w-10 tabular-nums ${o?"text-slate-800":"text-slate-400"}`,children:[s,r?"%":""]}),(0,a.jsx)("span",{className:"text-slate-400 text-[10px] font-semibold tracking-wide uppercase",children:t}),(0,a.jsxs)("span",{className:`text-xs font-bold w-10 text-right tabular-nums ${c?"text-slate-800":"text-slate-400"}`,children:[l,r?"%":""]})]}),(0,a.jsxs)("div",{className:"flex gap-0.5 h-[5px]",children:[(0,a.jsx)("div",{className:"flex-1 rounded-l-full bg-white/[0.06] overflow-hidden flex justify-end",children:(0,a.jsx)("div",{className:`rounded-l-full transition-all duration-500 ${o?"bg-gradient-to-r from-[#E11D48]/60 to-[#E11D48]":"bg-gradient-to-r from-white/10 to-white/20"}`,style:{width:`${i}%`}})}),(0,a.jsx)("div",{className:"flex-1 rounded-r-full bg-white/[0.06] overflow-hidden",children:(0,a.jsx)("div",{className:`rounded-r-full transition-all duration-500 ${c?"bg-gradient-to-l from-[#E11D48]/60 to-[#E11D48]":"bg-gradient-to-l from-white/10 to-white/20"}`,style:{width:`${100-i}%`}})})]})]},e.type)})})]})}
114function f({matchDetails:e}){let[t,s]=(0,l.useState)("pitch"),r=e?.lineup,n=r?.lineup||r,i=n?.home||[],o=n?.away||[],c=r?.home_formation||"",d=r?.away_formation||"",x=r?.match?.home_team,h=r?.match?.away_team;if(0===i.length&&0===o.length)return(0,a.jsx)(j,{text:"Đội h\xecnh sẽ được c\xf4ng bố trước trận đấu 30 ph\xfat"});let m=e=>e.filter(e=>1===e.first),p=e=>e.filter(e=>1!==e.first),u=m(i),g=m(o),b=p(i),w=p(o);return(0,a.jsxs)("div",{className:"flex flex-col",children:[(0,a.jsxs)("div",{className:"flex items-center justify-center gap-1 px-3 py-2 border-b border-slate-100",children:[(0,a.jsx)("button",{onClick:()=>s("pitch"),className:`px-3 py-1.5 text-[10px] font-bold rounded transition-all ${"pitch"===t?"bg-[#E11D48] text-white":"text-slate-400 bg-slate-100"}`,children:"Đội h\xecnh xuất ph\xe1t"}),(0,a.jsx)("button",{onClick:()=>s("list"),className:`px-3 py-1.5 text-[10px] font-bold rounded transition-all ${"list"===t?"bg-[#E11D48] text-white":"text-slate-400 bg-slate-100"}`,children:"Đội h\xecnh dá»± bị"})]}),"pitch"===t?(0,a.jsx)("div",{className:"relative w-full",style:{aspectRatio:"68/105"},children:(0,a.jsxs)("div",{className:"absolute inset-0 bg-gradient-to-b from-[#1a5c2a] via-[#1e6b31] to-[#1a5c2a] rounded-2xl overflow-hidden",children:[(0,a.jsxs)("div",{className:"absolute inset-[3%] border border-white/20 rounded-lg",children:[(0,a.jsx)("div",{className:"absolute left-0 right-0 top-1/2 h-px bg-white/20"}),(0,a.jsx)("div",{className:"absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 w-[22%] aspect-square rounded-full border border-white/20"}),(0,a.jsx)("div",{className:"absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 w-1.5 h-1.5 bg-white/30 rounded-full"}),(0,a.jsx)("div",{className:"absolute top-0 left-1/2 -translate-x-1/2 w-[55%] h-[16%] border-l border-r border-white/20"}),(0,a.jsx)("div",{className:"absolute top-0 left-1/2 -translate-x-1/2 w-[25%] h-[6%] border-l border-r border-white/20"}),(0,a.jsx)("div",{className:"absolute bottom-0 left-1/2 -translate-x-1/2 w-[55%] h-[16%] border-t border-l border-r border-white/20"}),(0,a.jsx)("div",{className:"absolute bottom-0 left-1/2 -translate-x-1/2 w-[25%] h-[6%] border-t border-l border-r border-white/20"})]}),(0,a.jsx)("div",{className:"absolute top-1 left-2 text-[9px] text-[#F8FAFC]/50 font-bold z-10",children:x?.name||""}),(0,a.jsx)("div",{className:"absolute top-1 right-2 text-[9px] text-[#E11D48]/70 font-bold z-10",children:c}),(0,a.jsx)("div",{className:"absolute bottom-1 left-2 text-[9px] text-[#F8FAFC]/50 font-bold z-10",children:h?.name||""}),(0,a.jsx)("div",{className:"absolute bottom-1 right-2 text-[9px] text-[#E11D48]/70 font-bold z-10",children:d}),u.map((e,t)=>{let s=`${e.x||50}%`,l=`${(e.y||10)/2}%`,r="G"===e.position;return(0,a.jsxs)("div",{className:"absolute flex flex-col items-center z-10 -translate-x-1/2 -translate-y-1/2",style:{left:s,top:l},children:[(0,a.jsx)("div",{className:`w-6 h-6 rounded-full flex items-center justify-center text-[9px] font-black ${r?"bg-yellow-400 text-black":"bg-blue-600 text-[#F8FAFC]"} shadow-md border border-white/20`,children:e.shirt_number||""}),(0,a.jsx)("span",{className:"text-[7px] text-[#F8FAFC] font-semibold mt-0.5 text-center max-w-[48px] truncate drop-shadow-[0_1px_2px_rgba(0,0,0,0.8)]",children:(e.name||"").split(" ").slice(-2).join(" ")}),1===e.captain&&(0,a.jsx)("span",{className:"absolute -top-1 -right-1 text-[6px] text-yellow-400",children:"C"})]},`h-${t}`)}),g.map((e,t)=>{let s=`${100-(e.x||50)}%`,l=`${100-(e.y||10)/2}%`,r="G"===e.position;return(0,a.jsxs)("div",{className:"absolute flex flex-col items-center z-10 -translate-x-1/2 -translate-y-1/2",style:{left:s,top:l},children:[(0,a.jsx)("div",{className:`w-6 h-6 rounded-full flex items-center justify-center text-[9px] font-black ${r?"bg-yellow-400 text-black":"bg-orange-500 text-[#F8FAFC]"} shadow-md border border-white/20`,children:e.shirt_number||""}),(0,a.jsx)("span",{className:"text-[7px] text-[#F8FAFC] font-semibold mt-0.5 text-center max-w-[48px] truncate drop-shadow-[0_1px_2px_rgba(0,0,0,0.8)]",children:(e.name||"").split(" ").slice(-2).join(" ")}),1===e.captain&&(0,a.jsx)("span",{className:"absolute -top-1 -right-1 text-[6px] text-yellow-400",children:"C"})]},`a-${t}`)})]})}):(0,a.jsxs)("div",{className:"px-3 py-2 text-xs",children:[(0,a.jsxs)("div",{className:"flex justify-between font-bold text-slate-400 mb-1 uppercase tracking-wider text-[9px] px-1",children:[(0,a.jsx)("span",{children:"Đội chá»
114§ nh\xe0"}),(0,a.jsx)("span",{children:"Đội kh\xe1ch"})]}),Array.from({length:Math.max(b.length,w.length)}).map((e,t)=>{let s=b[t],l=w[t];return(0,a.jsxs)("div",{className:"flex justify-between items-center border-b border-slate-50 py-1.5",children:[(0,a.jsx)("div",{className:"flex items-center gap-1.5 w-1/2 min-w-0",children:s&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"text-[#E11D48] font-bold w-5 text-center shrink-0 text-[10px]",children:s.shirt_number||""}),(0,a.jsx)("span",{className:"text-slate-700 truncate text-[11px]",children:s.name||""})]})}),(0,a.jsx)("div",{className:"flex items-center gap-1.5 w-1/2 justify-end min-w-0",children:l&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"text-slate-700 truncate text-[11px] text-right",children:l.name||""}),(0,a.jsx)("span",{className:"text-[#E11D48] font-bold w-5 text-center shrink-0 text-[10px]",children:l.shirt_number||""})]})})]},t)})]})]})}function j({text:e}){return(0,a.jsx)("div",{className:"flex items-center justify-center py-10 text-slate-400 text-sm text-center",children:e})}function w({m:e}){let t=c(e.status_id,e.sport_id),{hm:s,dm:l}=x(e.time),r=e.source_card_meta?.league_label||e.match_data?.competition_vi||"";return(0,a.jsxs)("a",{href:`/match/${encodeURIComponent(e.post_name||e.id)}`,className:"flex items-center gap-3 rounded-2xl bg-white hover:bg-slate-50 border border-slate-100 hover:border-[#4681E8]/30 p-3 transition-all group",children:[(0,a.jsxs)("div",{className:"shrink-0 w-14 text-center",children:[(0,a.jsx)("div",{className:"text-[#E11D48] text-[11px] font-bold",children:s}),(0,a.jsx)("div",{className:"text-slate-400 text-[9px]",children:l})]}),(0,a.jsx)("div",{className:"w-px h-9 bg-slate-200 shrink-0"}),(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("div",{className:"text-slate-400 text-[9px] truncate mb-1",children:r}),(0,a.jsxs)("div",{className:"flex items-center gap-2 mb-0.5",children:[(0,a.jsx)("img",{src:e.home_logo||d(e.home_name),alt:e.home_name,className:"w-4 h-4 object-contain shrink-0",onError:t=>t.target.src=d(e.home_name),loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-slate-600 text-[12px] font-medium truncate",children:e.home_name})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("img",{src:e.away_logo||d(e.away_name),alt:e.away_name,className:"w-4 h-4 object-contain shrink-0",onError:t=>t.target.src=d(e.away_name),loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-slate-600 text-[12px] font-medium truncate",children:e.away_name})]})]}),t.sc?(0,a.jsxs)("span",{className:"text-slate-800 font-bold text-[14px] tabular-nums shrink-0",children:[e.home_score,"-",e.away_score]}):(0,a.jsx)("span",{className:"text-[10px] font-bold text-[#E11D48] bg-[#E11D48]/10 rounded px-2.5 py-1 group-hover:bg-[#E11D48]/15 transition shrink-0",children:"XEM NGAY"})]})}let v={0:{bg:"bg-white/10",text:"text-[#F8FAFC]/40",nameCls:"text-[#94A3B8]"},1:{bg:"bg-white/10",text:"text-[#F8FAFC]/50",nameCls:"text-[#94A3B8]"},2:{bg:"bg-green-900/50",text:"text-green-400",nameCls:"text-green-400"},3:{bg:"bg-yellow-900/40",text:"text-yellow-400",nameCls:"text-emerald-600 font-bold"},4:{bg:"bg-blue-900/40",text:"text-blue-400",nameCls:"text-blue-400 font-bold"},5:{bg:"bg-red-900/40",text:"text-red-400",nameCls:"text-red-400 font-bold"}};function N({anchors:e,selectedAnchor:t}){let[s,r]=(0,l.useState)([]),[n,i]=(0,l.useState)(!1),o=(0,l.useRef)(null),c=(0,l.useRef)(null),d=t?.roomNum;return(0,l.useEffect)(()=>{if(!d)return;r([]),i(!1);let e=new EventSource(`/api/chat/${d}`);return e.onopen=()=>i(!0),e.onmessage=e=>{try{let t=JSON.parse(e.data);if("connected"===t.type)return void i(!0);if("history"===t.type&&Array.isArray(t.messages))return void r(e=>[...t.messages,...e].slice(-200));t.user&&t.text&&r(e=>[...e,t].slice(-200))}catch{}},e.onerror=()=>i(!1),()=>{e.close(),i(!1)}},[d]),(0,l.useEffect)(()=>{requestAnimationFrame(()=>{let e=c.current;e&&(e.scrollTop=e.scrollHeight)})},[s.length]),(0,a.jsxs)("div",{className:"flex flex-col h-full bg-[#0F0F23]",children:[(0,a.jsxs)("div",{ref:c,className:"flex-1 min-h-0 px-3 py-2 flex flex-col gap-[3px] overflow-y-auto",style:{scrollbarWidth:"thin",scrollbarColor:"#444 transparent"},children:[(0,a.jsx)("div",{className:"text-center text-[10px] text-[#F8FAFC]/30 bg-slate-50/60 py-1.5 rounded-xl mb-1 sticky top-0 z-10 backdrop-blur-sm",children:n?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"inline-block h-1.5 w-1.5 rounded-full bg-green-400 animate-pulse mr-1"}),"Đang kết nối ph\xf2ng chat trá»±c tiếp"]}):d?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"inline-block h-1.5 w-1.5 rounded-full bg-yellow-400 animate-pulse mr-1"}),"Đang kết nối..."]}
114):"Ch\xe0o mừng bạn đến với ph\xf2ng chat"}),0===s.length&&n&&(0,a.jsx)("div",{className:"text-center text-[10px] text-[#F8FAFC]/20 py-4",children:"Chờ tin nhắn mới..."}),s.map((e,t)=>{var s;let l=(s=e.level)>=5?v[5]:v[s]||v[0];return 2===e.type||e.text?.includes("v\xe0o ph\xf2ng tr\xf2 chuyện")?(0,a.jsxs)("div",{className:"flex items-start gap-1.5 text-[11px] leading-relaxed py-[1px] opacity-60",children:[(0,a.jsx)("span",{className:"text-green-500/70 font-medium",children:"Hi"}),(0,a.jsxs)("span",{className:`shrink-0 inline-flex items-center px-1 py-[0.5px] rounded text-[8px] font-bold ${l.bg} ${l.text}`,children:["Lv",e.level]}),(0,a.jsxs)("span",{className:`font-bold ${l.nameCls}`,children:[e.user,":"]}),(0,a.jsx)("span",{className:"text-[#F8FAFC]/40",children:e.text})]},`${e.ts}-${t}`):(0,a.jsxs)("div",{className:"flex items-start gap-1.5 text-[11px] leading-relaxed py-[1px]",children:[(0,a.jsxs)("span",{className:`shrink-0 inline-flex items-center px-1 py-[0.5px] rounded text-[8px] font-bold ${l.bg} ${l.text}`,children:["Lv.",e.level]}),(0,a.jsxs)("span",{className:`font-bold shrink-0 ${l.nameCls}`,children:[e.user,":"]}),(0,a.jsx)("span",{className:"text-[#F8FAFC]/80 break-words min-w-0",children:e.text})]},`${e.ts}-${t}`)}),(0,a.jsx)("div",{ref:o})]}),(0,a.jsxs)("div",{className:"shrink-0 px-3 py-2 bg-[#0F0F23] border-t border-white/[0.04] space-y-2",children:[(0,a.jsx)("div",{className:"flex items-center justify-center gap-3 text-[#F8FAFC]/20 text-[10px]",children:(0,a.jsx)("span",{className:"flex items-center gap-1",children:(0,a.jsx)("svg",{className:"w-3 h-3",viewBox:"0 0 24 24",fill:"currentColor",children:(0,a.jsx)("path",{d:"M12 4.5C7 4.5 2.7 7.6 1 12c1.7 4.4 6 7.5 11 7.5s9.3-3.1 11-7.5c-1.7-4.4-6-7.5-11-7.5zm0 12.5c-2.8 0-5-2.2-5-5s2.2-5 5-5 5 2.2 5 5-2.2 5-5 5zm0-8c-1.7 0-3 1.3-3 3s1.3 3 3 3 3-1.3 3-3-1.3-3-3-3z"})})})}),(0,a.jsxs)("div",{className:"flex bg-[#0F0F23] rounded-2xl overflow-hidden border border-white/[0.08]",children:[(0,a.jsx)("input",{type:"text",placeholder:"Đăng nhập để c\xf9ng chat nh\xe9",disabled:!0,className:"flex-1 bg-transparent px-3 py-2 text-[11px] text-[#F8FAFC] outline-none placeholder:text-[#F8FAFC]/30 disabled:opacity-50"}),(0,a.jsx)("button",{disabled:!0,className:"px-4 text-[11px] font-bold bg-[#E11D48] text-black disabled:bg-white/10 disabled:text-[#F8FAFC]/20 transition-colors",children:"Gửi"})]})]})]})}let y={1:{icon:"⚽",label:"B\xe0n thắng",color:"text-green-400"},2:{icon:"\uD83C\uDD7F️",label:"Phạt đền",color:"text-green-400"},3:{icon:"\uD83D\uDFE1",label:"Thẻ v\xe0ng",color:"text-yellow-400"},4:{icon:"\uD83D\uDFE1\uD83D\uDFE1",label:"Thẻ v\xe0ng 2",color:"text-emerald-600"},5:{icon:"\uD83D\uDD34",label:"Thẻ đỏ",color:"text-red-500"},7:{icon:"\uD83D\uDD04",label:"Phản lưới",color:"text-orange-400"},8:{icon:"\uD83C\uDFE5",label:"Chấn thương",color:"text-[#94A3B8]"},9:{icon:"\uD83D\uDD04",label:"Thay người",color:"text-blue-400"},11:{icon:"⏱️",label:"Hiệp 2",color:"text-[#F8FAFC]/40"},15:{icon:"\uD83E\uDD45",label:"Pen trượt",color:"text-red-400"},19:{icon:"⏱️",label:"Kết th\xfac hiệp",color:"text-[#F8FAFC]/30"},21:{icon:"\uD83C\uDFC6",label:"VAR",color:"text-purple-400"}};function _({events:e}){let t=e?.incidents||e?.events||[];return t&&0!==t.length?(0,a.jsx)("div",{className:"flex flex-col",children:t.map((e,t)=>{let s=y[e.type]||{icon:"•",label:`Event ${e.type}`,color:"text-[#F8FAFC]/50"},l=1===e.position,r=2===e.position,n=e.add_time?`+${e.add_time}`:"",i=`${e.time}'${n}`;return l||r||11!==e.type&&19!==e.type?9===e.type?(0,a.jsxs)("div",{className:`flex items-center gap-2 border-b border-slate-50 p-3 text-xs ${l?"":"flex-row-reverse"}`,children:[(0,a.jsx)("span",{className:"text-slate-400 w-10 text-center shrink-0 text-[10px]",children:i}),(0,a.jsxs)("div",{className:`flex-1 flex flex-col gap-0.5 ${l?"items-start":"items-end"}`,children:[(0,a.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,a.jsx)("span",{className:"text-green-400 text-[10px]",children:"▲"}),(0,a.jsx)("span",{className:"text-[#F8FAFC]/80 text-[11px]",children:e.in_player_name||""})]}),(0,a.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,a.jsx)("span",{className:"text-red-400 text-[10px]",children:"▼"}),(0,a.jsx)("span",{className:"text-[#F8FAFC]/40 text-[11px]",children:e.out_player_name||""})]})]})]},t):(0,a.jsxs)("div",{className:`flex items-center gap-2 border-b border-slate-50 p-3 text-xs ${l?"":"flex-row-reverse"}`,children:[(0,a.jsx)("span",{className:"text-slate-400 w-10 text-center shrink-0 text-[10px]",children:i}),(0,a.jsx)("span",{className:`shrink-0 text-sm ${s.color}`,children:s.icon}),(0,a.jsxs)("div",{className:`flex-1 min-w-0 ${l?"text-left":"text-right"}`,children:[(0,a.jsx)("span",{className:"text-slate-700 text-[11px]",children:e.player_name||""}),e.assist1_name&&(0,a.jsxs)("span",{className:"text-slate-400 text-[10px] ml-1",children:["(kiến tạo: ",e.assist1_name,")"]}),1===e.type&&void 0!==e.home_score&&(0,a.jsxs)("span",{className:"text-[#E11D48] font-bold text-[11px] ml-2",children:[e.home_score," - ",e.away_score]})]})]},t):(0,a.jsx)("div",{className:"flex items-center justify-center py-2 border-b border-slate-50 bg-slate-50",children:(0,a.jsxs)("span",{className:"text-slate-400 text-[10px] uppercase tracking-wider",children:[s.icon," ",s.label," — ",i]})},t)})}):(0,a.jsx)(j,{text:"Diễn biến trận đấu sẽ được cập nhật trực tiếp tại đ\xe2y"})}function k({standings:e}
114){return e&&e.teams&&0!==e.teams.length?(0,a.jsxs)("div",{className:"w-full text-[10px]",children:[(0,a.jsxs)("div",{className:"grid grid-cols-[20px_1fr_24px_24px_32px] bg-slate-50 p-2 text-slate-400 uppercase font-bold sticky top-0",children:[(0,a.jsx)("span",{className:"text-center",children:"#"}),(0,a.jsx)("span",{children:"Team"}),(0,a.jsx)("span",{className:"text-center",children:"T"}),(0,a.jsx)("span",{className:"text-center",children:"B"}),(0,a.jsx)("span",{className:"text-center whitespace-nowrap",children:"Đ"})]}),e.teams.slice(0,15).map((e,t)=>{let s=!!e.data,l=s?parseFloat(e.data[0]):e.rank||t+1,r=s?e.data[1]:e.target_name,n=s?e.data[7]:e.points,i=s?e.data[3]:e.won,o=s?e.data[5]:e.loss;return(0,a.jsxs)("div",{className:"grid grid-cols-[20px_1fr_24px_24px_32px] items-center p-2 border-b border-slate-50 hover:bg-slate-50 transition-colors",children:[(0,a.jsx)("span",{className:"text-center text-slate-500",children:l}),(0,a.jsxs)("div",{className:"flex items-center gap-1.5 min-w-0 pr-2",children:[e.team_logo&&(0,a.jsx)("img",{src:e.team_logo,className:"w-3.5 h-3.5 object-contain",alt:r||"Team logo",loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-slate-700 font-medium truncate",children:r})]}),(0,a.jsx)("span",{className:"text-center text-slate-500",children:i}),(0,a.jsx)("span",{className:"text-center text-slate-500",children:o}),(0,a.jsx)("span",{className:"text-center text-[#E11D48] font-bold",children:n})]},r)})]}):(0,a.jsx)(j,{text:"Bảng xếp hạng sẽ được cập nhật"})}function E({odds:e}){let t=Array.isArray(e)?e:[],s=["2","4","3","16"];function l(e){for(let a of s){let s=t.find(t=>t.odds_type===e&&String(t.company_id)===a);if(s?.odds_info?.length)return s}return t.find(t=>t.odds_type===e&&t.odds_info?.length>0)}function r(e,t){let s=e?.odds_info;if(!s?.length)return["-","-","-"];let a="opening"===t?s.length-1:0;if(!s?.length||!s[a])return["-","-","-"];let l=s[a][2];if("string"!=typeof l)return["-","-","-"];let r=l.split(",");return[r[0]||"-",r[1]||"-",r[2]||"-"]}let n=l("asia"),i=l("eu"),o=l("bs"),c=l("cr"),d=r(n,"opening"),x=r(n,"latest"),h=r(i,"opening"),m=r(i,"latest"),p=r(o,"opening"),u=r(o,"latest"),g=r(c,"opening"),b=r(c,"latest"),f=({children:e})=>(0,a.jsx)("th",{className:"px-2 py-2 text-[9px] sm:text-[10px] font-bold uppercase tracking-wider text-slate-500 border-b border-slate-100 text-center",children:e}),j=({children:e,color:t})=>(0,a.jsx)("td",{className:`px-2 py-2.5 text-center text-[11px] sm:text-xs font-bold ${t||"text-slate-600"} border-b border-slate-50`,children:e});return(0,a.jsxs)("div",{className:"overflow-x-auto",children:[(0,a.jsxs)("table",{className:"w-full min-w-[600px]",children:[(0,a.jsxs)("thead",{children:[(0,a.jsxs)("tr",{className:"bg-slate-50",children:[(0,a.jsx)("th",{className:"px-4 py-2 text-left border-b border-slate-100",rowSpan:2,children:(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("div",{className:"w-7 h-7 rounded bg-gradient-to-br from-[#1d4ed8] to-[#3b82f6] flex items-center justify-center text-white text-[9px] font-black shadow-sm",children:"B"}),(0,a.jsx)("span",{className:"text-slate-600 text-[11px] font-bold tracking-wider",children:"SPORT"})]})}),(0,a.jsx)("th",{colSpan:3,className:"px-1 py-1.5 text-center text-[9px] sm:text-[10px] font-bold uppercase tracking-wider text-[#4681E8] border-b border-l border-slate-100",children:"CƯỢC CH\xc2U \xc1"}),(0,a.jsx)("th",{colSpan:3,className:"px-1 py-1.5 text-center text-[9px] sm:text-[10px] font-bold uppercase tracking-wider text-[#4681E8] border-b border-l border-slate-100",children:"CƯỢC CH\xc2U \xc2U"}),(0,a.jsx)("th",{colSpan:3,className:"px-1 py-1.5 text-center text-[9px] sm:text-[10px] font-bold uppercase tracking-wider text-[#4681E8] border-b border-l border-slate-100",children:"T\xc0I XỈU"}),(0,a.jsx)("th",{colSpan:3,className:"px-1 py-1.5 text-center text-[9px] sm:text-[10px] font-bold uppercase tracking-wider text-[#4681E8] border-b border-l border-slate-100",children:"K\xc8O G\xd3C"})]}),(0,a.jsxs)("tr",{className:"bg-slate-50",children:[(0,a.jsx)(f,{children:"CHỦ"}),(0,a.jsx)(f,{children:"CHẤP"}),(0,a.jsx)(f,{children:"KH\xc1CH"}),(0,a.jsx)(f,{children:"CHỦ"}),(0,a.jsx)(f,{children:"H\xd2A"}),(0,a.jsx)(f,{children:"KH\xc1CH"}),(0,a.jsx)(f,{children:"T\xc0I"}),(0,a.jsx)(f,{children:"TỶ LỆ"}),(0,a.jsx)(f,{children:"XỈU"}),(0,a.jsx)(f,{children:"T\xc0I"}),(0,a.jsx)(f,{children:"TỶ LỆ"}),(0,a.jsx)(f,{children:"XỈU"})]})]}),(0,a.jsxs)("tbody",{children:[(0,a.jsxs)("tr",{className:"hover:bg-slate-50 transition-colors",children:[(0,a.jsx)("td",{className:"px-4 py-2.5 text-[11px] sm:text-xs text-slate-500 font-medium border-b border-slate-50",children:"Tỷ Lệ Mở Cược"}),(0,a.jsx)(j,{children:d[0]}),(0,a.jsx)(j,{color:"text-red-400",children:d[1]}),(0,a.jsx)(j,{children:d[2]}),(0,a.jsx)(j,{children:h[0]}),(0,a.jsx)(j,{children:h[1]}),(0,a.jsx)(j,{children:h[2]}),(0,a.jsx)(j,{children:p[0]}),(0,a.jsx)(j,{children:p[1]}),(0,a.jsx)(j,{children:p[2]}),(0,a.jsx)(j,{children:g[0]}),(0,a.jsx)(j,{children:g[1]}),(0,a.jsx)(j,{children:g[2]})]}),(0,a.jsxs)("tr",{className:"hover:bg-slate-50 transition-colors",children:[(0,a.jsx)("td",{className:"px-4 py-2.5 text-[11px] sm:text-xs text-slate-500 font-medium border-b border-slate-50",children:"Tỷ Lệ Trước Trận"}),(0,a.jsx)(j,{children:x[0]}),(0,a.jsx)(j,{color:"text-red-400",children:x[1]}),(0,a.jsx)(j,{children:x[2]}),(0,a.jsx)(j,{children:m[0]}),(0,a.jsx)(j,{children:m[1]}),(0,a.jsx)(j,{children:m[2]}),(0,a.jsx)(j,{children:u[0]}),(0,a.jsx)(j,{children:u[1]}),(0,a.jsx)(j,{children:u[2]}),(0,a.jsx)(j,{children:b[0]}),(0,a.jsx)(j,{children:b[1]}),(0,a.jsx)(j,{children:b[2]})]}),(0,a.jsxs)("tr",{className:"hover:bg-slate-50 transition-colors bg-white",children:[(0,a.jsxs)("td",{className:"px-4 py-2.5 text-[11px] sm:text-xs text-slate-700 font-bold flex items-center gap-1.5 border-b border-slate-50",children:["Live ",(0,a.jsx)("span",{className:"w-1.5 h-1.5 rounded-full bg-red-500 animate-pulse"})]}),(0,a.jsx)(j,{color:"text-green-400",children:x[0]}),(0,a.jsx)(j,{color:"text-red-400",children:x[1]}),(0,a.jsx)(j,{color:"text-green-400",children:x[2]}),(0,a.jsx)(j,{color:"text-green-400",children:m[0]}),(0,a.jsx)(j,{color:"text-green-400",children:m[1]}),(0,a.jsx)(j,{color:"text-green-400",children:m[2]}),(0,a.jsx)(j,{color:"text-green-400",children:u[0]}),(0,a.jsx)(j,{children:u[1]}),(0,a.jsx)(j,{color:"text-green-400",children:u[2]}),(0,a.jsx)(j,{color:"text-green-400",children:b[0]}),(0,a.jsx)(j,{children:b[1]}),(0,a.jsx)(j,{color:"text-green-400",children:b[2]})]})]})]}),(0,a.jsx)("p",{className:"text-center text-slate-400 text-[10px] py-2.5 border-t border-slate-100",children:"Tỷ lệ k\xe8o sẽ được cập nhật gần giờ thi đấu"})]})}},13849:(e,t,s)=>{"use strict";s.d(t,{Klivevip24MatchDetailPage:()=>m});var a=s(68019),l=s(10707),r=s(58420);function n({src:e,poster:t,autoPlay:s=!0,onError:i,className:o=""}){let c=(0,l.useRef)(null),d=(0,l.useRef)(i);d.current=i;let[x,h]=(0,l.useState)(!1),[m,p]=(0,l.useState)(!1);return((0,l.useEffect)(()=>{let t=c.current;if(!t)return;let a=null;h(!1);let l=()=>p(!0),n=()=>p(!1);t.addEventListener("play",l),t.addEventListener("pause",n);let i=()=>{s&&(t.muted=!0,t.play().catch(()=>{}))};if(t.addEventListener("canplay",i),r.Ay.isSupported()){(a=new r.Ay({maxBufferLength:30,maxMaxBufferLength:60,lowLatencyMode:!0,enableWorker:!0})).loadSource(e),a.attachMedia(t),a.on(r.Ay.Events.MANIFEST_PARSED,()=>{s&&(t.muted=!0,t.play().catch(e=>{console.warn("AutoPlay failed:",e),t.muted=!1}))});let l=0,n=0;a.on(r.Ay.Events.ERROR,(e,t)=>
114{if(t.type===r.Ay.ErrorTypes.NETWORK_ERROR&&(++l>2||t.response&&t.response.code>=400)){console.error("HLS Network Error threshold reached (CORS/404), triggering fallback.",t),h(!0),d.current&&d.current(t),a?.destroy();return}if(t.fatal)switch(t.type){case r.Ay.ErrorTypes.NETWORK_ERROR:console.error("HLS Fatal Network Error, recovering...",t),a?.startLoad();break;case r.Ay.ErrorTypes.MEDIA_ERROR:console.error("HLS Media Error, recovering...",t),++n>3?(console.error("HLS Media Error threshold reached, triggering fallback."),h(!0),d.current&&d.current(t),a?.destroy()):a?.recoverMediaError();break;default:console.error("HLS Fatal Error:",t),h(!0),d.current&&d.current(t),a?.destroy()}})}else t.canPlayType("application/vnd.apple.mpegurl")&&(t.src=e,t.addEventListener("loadedmetadata",()=>{s&&t.play().catch(e=>{console.warn("AutoPlay failed:",e)})}),t.addEventListener("error",e=>{h(!0),d.current&&d.current(e)}));return()=>{t.removeEventListener("play",l),t.removeEventListener("pause",n),t.removeEventListener("canplay",i),a&&a.destroy()}},[e,s]),x)?i?null:(0,a.jsxs)("div",{className:`w-full h-full flex flex-col items-center justify-center bg-white/80 backdrop-blur ${o}`,children:[(0,a.jsx)("svg",{className:"w-12 h-12 text-red-500 mb-4 opacity-80",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"})}),(0,a.jsx)("div",{className:"text-slate-600 text-sm font-medium",children:"Video/Stream kh\xf4ng khả dụng hoặc bị lỗi mạng"}),(0,a.jsx)("div",{className:"text-gray-500 text-xs mt-1",children:"Vui l\xf2ng thử lại sau hoặc chọn nguồn kh\xe1c"})]}):(0,a.jsx)("div",{className:`relative group w-full h-full bg-white flex items-center justify-center overflow-hidden ${o}`,children:(0,a.jsx)("video",{ref:c,className:"w-full h-full object-contain",controls:!0,playsInline:!0,muted:s,poster:t,referrerPolicy:"no-referrer"})})}function i(e){let t=(e||"").split(/[\s-]+/).slice(0,2).map(e=>e[0]||"").join("").toUpperCase()||"??";return`data:image/svg+xml,${encodeURIComponent(`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 80 80"><rect width="80" height="80" rx="20" fill="#1a1c25"/><text x="40" y="47" font-size="20" font-family="Arial" font-weight="700" text-anchor="middle" fill="#666">${t}</text></svg>`)}`}function o({homeName:e,awayName:t,homeLogo:s,awayLogo:l,homeScore:r="0",awayScore:n="0",statusText:c="LIVE",timeText:d="",isLive:x=!0,sportId:h="1",matchId:m}){let p=s||i(e),u=l||i(t),g="5"===String(h),b="2"===String(h),f="bg-slate-200 border-slate-200",j="repeating-linear-gradient(90deg, transparent, transparent 10%, #000 10%, #000 20%)";return g?(f="bg-slate-100 border-slate-200",j="none"):b&&(f="bg-[#bc7a46] border-[#8a4e21]",j="repeating-linear-gradient(90deg, transparent, transparent 5%, #000 5%, #000 10%)"),(0,a.jsxs)("div",{className:"relative w-full aspect-video min-h-[300px] max-h-[600px] bg-slate-50 overflow-hidden flex flex-col justify-center",children:[(0,a.jsx)("div",{className:"absolute inset-0 flex items-center justify-center pointer-events-none mt-16 md:mt-24",children:(0,a.jsx)("div",{className:"relative w-[120%] h-[120%] sm:w-[90%] sm:h-[120%] max-w-[900px] flex-shrink-0 transition-transform duration-1000",style:{transform:"perspective(900px) rotateX(60deg) scale(0.9)",transformOrigin:"center center"},children:(0,a.jsxs)("div",{className:`absolute inset-0 ${f} shadow-[0_30px_60px_rgba(0,0,0,0.8)] border-4 rounded-xl overflow-hidden flex transition-colors duration-500`,children:[(0,a.jsx)("div",{className:"absolute inset-0 opacity-15 pointer-events-none",style:{backgroundImage:j}}),(0,a.jsxs)("div",{className:"absolute inset-[4%] pointer-events-none shadow-sm flex items-center justify-center",children:["1"===String(h)&&(0,a.jsxs)("div",{className:"absolute inset-0 w-full h-full border-2 border-white/60",children:[(0,a.jsx)("div",{className:"absolute left-1/2 top-0 bottom-0 w-0 border-l-2 border-white/60 -translate-x-1/2"}),(0,a.jsx)("div",{className:"absolute left-1/2 top-1/2 w-[18%] aspect-square rounded-full border-2 border-white/60 -translate-x-1/2 -translate-y-1/2"}),(0,a.jsx)("div",{className:"absolute left-1/2 top-1/2 w-2 h-2 rounded-full bg-white/80 -translate-x-1/2 -translate-y-1/2"}),(0,a.jsx)("div",{className:"absolute left-0 top-1/2 w-[16%] h-[46%] border-2 border-l-0 border-white/60 -translate-y-1/2 bg-slate-200"}),(0,a.jsx)("div",{className:"absolute left-0 top-1/2 w-[6%] h-[20%] border-2 border-l-0 border-white/60 -translate-y-1/2 bg-slate-200"}),(0,a.jsx)("div",{className:"absolute left-[16%] top-1/2 w-[8%] aspect-square border-2 border-l-0 border-white/60 rounded-r-full -translate-y-1/2 clip-path-half",style:{clipPath:"inset(0 0 0 50%)"}}),(0,a.jsx)("div",{className:"absolute right-0 top-1/2 w-[16%] h-[46%] border-2 border-r-0 border-white/60 -translate-y-1/2 bg-slate-200"}),(0,a.jsx)("div",{className:"absolute right-0 top-1/2 w-[6%] h-[20%] border-2 border-r-0 border-white/60 -translate-y-1/2 bg-slate-200"}),(0,a.jsx)("div",{className:"absolute right-[16%] top-1/2 w-[8%] aspect-square border-2 border-r-0 border-white/60 rounded-l-full -translate-y-1/2 clip-path-half",style:{clipPath:"inset(0 50% 0 0)"}})]}),g&&(0,a.jsxs)("div",{className:"absolute inset-[10%] w-[80%] h-[80%
114] border-2 border-white/80 bg-white",children:[(0,a.jsx)("div",{className:"absolute top-[10%] bottom-[10%] left-0 right-0 border-y-2 border-white/80"}),(0,a.jsx)("div",{className:"absolute left-1/2 top-[-2%] bottom-[-2%] w-1 bg-white/40 shadow-xl -translate-x-1/2 z-10"}),(0,a.jsx)("div",{className:"absolute left-[25%] right-[25%] top-[10%] bottom-[10%] border-x-2 border-white/80"}),(0,a.jsx)("div",{className:"absolute left-[25%] right-[25%] top-1/2 w-[50%] border-t-2 border-white/80 -translate-y-1/2"}),(0,a.jsx)("div",{className:"absolute left-0 top-1/2 w-[2%] border-t-2 border-white/80 -translate-y-1/2"}),(0,a.jsx)("div",{className:"absolute right-0 top-1/2 w-[2%] border-t-2 border-white/80 -translate-y-1/2"})]}),b&&(0,a.jsxs)("div",{className:"absolute inset-0 w-full h-full border-2 border-white/50",children:[(0,a.jsx)("div",{className:"absolute left-1/2 top-0 bottom-0 w-0 border-l-2 border-white/50 -translate-x-1/2"}),(0,a.jsx)("div",{className:"absolute left-1/2 top-1/2 w-[15%] aspect-square rounded-full border-2 border-white/50 -translate-x-1/2 -translate-y-1/2"}),(0,a.jsx)("div",{className:"absolute left-0 top-1/2 w-[18%] h-[35%] border-2 border-l-0 border-white/50 -translate-y-1/2 bg-[#bc7a46]"}),(0,a.jsx)("div",{className:"absolute left-[18%] top-1/2 w-[10%] aspect-square rounded-full border-2 border-white/50 -translate-y-1/2"}),(0,a.jsx)("div",{className:"absolute left-0 top-1/2 w-[30%] h-[70%] border-2 border-l-0 border-white/50 rounded-r-full -translate-y-1/2 opacity-60"}),(0,a.jsx)("div",{className:"absolute right-0 top-1/2 w-[18%] h-[35%] border-2 border-r-0 border-white/50 -translate-y-1/2 bg-[#bc7a46]"}),(0,a.jsx)("div",{className:"absolute right-0 top-1/2 w-[30%] h-[70%] border-2 border-r-0 border-white/50 rounded-l-full -translate-y-1/2 opacity-60"})]})]}),x&&(0,a.jsx)("div",{className:`absolute left-1/2 top-1/2 shadow-[0_8px_16px_rgba(0,0,0,0.8)] z-10 transition-all duration-[3000ms] border-2 border-white/20 rounded-full
115                                ${g?"w-2 h-2 sm:w-3 sm:h-3 bg-[#ccff00]":b?"w-4 h-4 sm:w-6 sm:h-6 bg-[#d95d16]":"w-4 h-4 sm:w-5 sm:h-5 bg-white"}`,style:{animation:"ballMove 8s infinite alternate ease-in-out",transform:"translate(-50%, -50%)"},children:(0,a.jsx)("div",{className:"absolute -bottom-4 left-1/2 w-4 h-2 bg-white/40 rounded-full blur-sm -translate-x-1/2"})}),x&&(0,a.jsxs)("div",{className:"absolute left-[65%] top-[60%] flex flex-col items-center animate-bounce-slow",style:{animation:"floatBubble 4s infinite alternate ease-in-out"},children:[(0,a.jsxs)("div",{className:"bg-white/95 backdrop-blur border border-white/10 rounded-2xl p-2 shadow-2xl flex items-center gap-3 w-max max-w-[200px]",children:[(0,a.jsx)("div",{className:"w-6 h-6 rounded-full flex items-center justify-center p-0.5 bg-white/5 shrink-0",children:(0,a.jsx)("img",{src:p,alt:e||"Home team",className:"max-w-full max-h-full object-contain",onError:t=>t.target.src=i(e),loading:"lazy",decoding:"async"})}),(0,a.jsx)("div",{className:"flex flex-col pr-1 overflow-hidden",children:(0,a.jsx)("span",{className:"text-slate-900 font-bold text-[10px] sm:text-xs tracking-wide truncate",children:g?"Serve / Return":"Tấn c\xf4ng nguy hiểm"})})]}),(0,a.jsx)("div",{className:"w-0 h-0 border-l-[6px] border-r-[6px] border-t-[6px] border-l-transparent border-r-transparent border-t-[#1a1c28]/95 mt-[-1px]"})]})]})})}),(0,a.jsx)("div",{className:"relative z-20 flex-1 flex flex-col items-center justify-start p-4 md:p-6 pointer-events-none w-full",children:(0,a.jsxs)("div",{className:"w-full max-w-[800px] flex items-center justify-between px-4 sm:px-6 py-3 rounded-xl bg-gradient-to-r from-[#0d0f14]/90 via-[#151821]/95 to-[#0d0f14]/90 backdrop-blur-xl border border-white/10 shadow-[0_10px_40px_rgba(0,0,0,0.8)] pointer-events-auto",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 flex-1 min-w-0 pr-2",children:[(0,a.jsx)("img",{src:p,alt:e,className:"w-8 h-8 md:w-12 md:h-12 object-contain drop-shadow-lg shrink-0",onError:t=>t.target.src=i(e),loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-slate-900 text-xs sm:text-sm md:text-base font-bold truncate tracking-wide",children:e})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1 shrink-0 px-2 sm:px-6 min-w-[100px]",children:[(0,a.jsxs)("span",{className:`inline-flex items-center gap-1.5 px-2.5 py-0.5 rounded-full text-[10px] sm:text-xs font-bold shadow-inner ${x?"bg-green-500/10 text-green-400 border border-green-500/20":"bg-white/5 text-slate-900/40"}`,children:[x&&(0,a.jsx)("span",{className:"w-1.5 h-1.5 rounded-full bg-green-500 animate-pulse shadow-[0_0_8px_#22c55e]"}),d||c]}),(0,a.jsxs)("div",{className:"flex gap-3 sm:gap-5 items-center justify-center",children:[(0,a.jsx)("span",{className:"text-slate-900 text-2xl sm:text-4xl font-black drop-shadow-md",children:r}),(0,a.jsx)("span",{className:"text-slate-900/30 text-xl font-light",children:"-"}),(0,a.jsx)("span",{className:"text-slate-900 text-2xl sm:text-4xl font-black drop-shadow-md",children:n})]})]}),(0,a.jsxs)("div",{className:"flex items-center justify-end gap-3 flex-1 min-w-0 pl-2 text-right",children:[(0,a.jsx)("span",{className:"text-slate-900 text-xs sm:text-sm md:text-base font-bold truncate tracking-wide",children:t}),(0,a.jsx)("img",{src:u,alt:t,className:"w-8 h-8 md:w-12 md:h-12 object-contain drop-shadow-lg shrink-0",onError:e=>e.target.src=i(t),loading:"lazy",decoding:"async"})]})]})}),(0,a.jsx)("div",{className:"relative z-20 mt-auto w-full p-4 flex justify-center pointer-events-none",children:(0,a.jsx)("div",{className:"w-full max-w-[600px] h-6 bg-white/40 backdrop-blur-md rounded-full border border-white/5 flex items-center px-4",children:(0,a.jsxs)("div",{className:"flex-1 h-0.5 bg-white/10 relative rounded-full",children:[x&&(0,a.jsx)("div",{className:"absolute left-0 top-0 bottom-0 bg-gradient-to-r from-[#b38b22] to-[#ffda6a] w-[65%] rounded-full opacity-90 shadow-[0_0_12px_#daa520]"}),(0,a.jsx)("span",{className:"absolute left-[65%] top-1/2 -translate-y-1/2 -translate-x-1/2 w-1.5 h-1.5 rounded-full bg-white shadow-md"})]})})}),(0,a.jsx)("style",{children:`
116                @keyframes ballMove {
117                    0% { transform: translate(-30%, -20%) scale(1); }
118                    25% { transform: translate(40%, -10%) scale(1.1); }
119                    50% { transform: translate(20%, 30%) scale(0.9); }
120                    75% { transform: translate(-10%, 15%) scale(1.2); }
121                    100% { transform: translate(-45%, 0%) scale(1); }
122                }
123                @keyframes floatBubble {
124                    0% { transform: translateY(0px) translateX(0px); }
125                    50% { transform: translateY(-8px) translateX(4px); }
126                    100% { transform: translateY(4px) translateX(-4px); }
127                }
128            `})]})}function c(e,t){if("1"===t||"2"===t)switch(e){case"2":return{t:"HT 1",live:!0,sc:!0};case"3":return{t:"Giữa giờ",live:!0,sc:!0};case"4":return{t:"HT 2",live:!0,sc:!0};case"5":return{t:"Hiệp phụ",live:!0,sc:!0};case"7":return{t:"Penalty",live:!0,sc:!0};case"8":case"9":return{t:"Kết th\xfac",live:!1,sc:!0};default:return{t:"Chưa bắt đầu",live:!1,sc:!1}}
128return["51","52","53","54","55"].includes(e)?{t:`Set ${e-50}`,live:!0,sc:!0}:["100","90","110"].includes(e)?{t:"KT",live:!1,sc:!0}:"0"===e||"1"===e?{t:"Chưa bắt đầu",live:!1,sc:!1}:{t:"LIVE",live:!0,sc:!0}}function d(e){let t=(e||"").split(/[\s-]+/).slice(0,2).map(e=>e[0]||"").join("").toUpperCase()||"??";return`data:image/svg+xml,${encodeURIComponent(`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 80 80"><rect width="80" height="80" rx="20" fill="#1a1c25"/><text x="40" y="47" font-size="20" font-family="Arial" font-weight="700" text-anchor="middle" fill="#666">${t}</text></svg>`)}`}function x(e){let t=new Date(1e3*parseInt(e||"0",10));return{hm:t.toLocaleTimeString("vi-VN",{hour:"2-digit",minute:"2-digit",timeZone:"Asia/Ho_Chi_Minh"}),dm:t.toLocaleDateString("vi-VN",{day:"2-digit",month:"2-digit",timeZone:"Asia/Ho_Chi_Minh"}),full:t.toLocaleDateString("vi-VN",{day:"2-digit",month:"2-digit",year:"numeric",timeZone:"Asia/Ho_Chi_Minh"})}}let h="max-w-[1200px]";function m({matchData:e,relatedMatches:t,matchDetails:s,standings:r,brandingNameUpper:i}){let p,u,g,j,v,y,[C,S]=(0,l.useState)("odds"),L=e?.match_data?.anchors||[],[$,F]=(0,l.useState)(!1),[T,A]=(0,l.useState)(!1),[M,H]=(0,l.useState)(null),[D,B]=(0,l.useState)(!1),z=(0,l.useRef)(0);(0,l.useEffect)(()=>{if(!e?.has_live||"1"!==e.has_live||0===L.length)return;let t=!1;B(!0);let s=async t=>{let s=t?.uid,a=`/api/socolive/proxy-stream?url=${encodeURIComponent(`https://live.inplyr.com/${s?`room/${s}`:`default/${e.id}`}.m3u8`)}`;try{let e=await fetch(a,{method:"GET",cache:"no-store"});if(!e.ok)return null;let s=(await e.text()).split("\n").filter(e=>e.trim()&&!e.startsWith("#"));if(0===s.length)return null;return(await fetch(s[0],{method:"HEAD",cache:"no-store"})).ok?t:null}catch{return null}};return Promise.all(L.map(e=>s(e))).then(e=>{if(t)return;let s=e.find(e=>null!==e);s?(H(s),F(!0),A(!1)):(H(L[0]),A(!0)),B(!1)}),()=>{t=!0}},[e?.has_live,L.length]),(0,l.useEffect)(()=>{if(!T||D||z.current>=20)return;let t=setTimeout(()=>{z.current++,A(!1),B(!0);let t=async t=>{let s=t?.uid,a=`/api/socolive/proxy-stream?url=${encodeURIComponent(`https://live.inplyr.com/${s?`room/${s}`:`default/${e.id}`}.m3u8`)}`;try{let e=await fetch(a,{method:"GET",cache:"no-store"});if(!e.ok)return null;let s=(await e.text()).split("\n").filter(e=>e.trim()&&!e.startsWith("#"));if(0===s.length)return null;return(await fetch(s[0],{method:"HEAD",cache:"no-store"})).ok?t:null}catch{return null}};Promise.all(L.map(e=>t(e))).then(e=>{let t=e.find(e=>null!==e);t?(H(t),F(!0),A(!1)):A(!0),B(!1)})},15e3);return()=>clearTimeout(t)},[T,D]);let[I,R]=(0,l.useState)(null),U=e?.post_name||e?.ls_id||e?.id;if(window.location.origin,(0,l.useEffect)(()=>{if(!U)return;let e=setInterval(async()=>{try{let e=await fetch(`/api/klivevip/match/${U}`,{cache:"no-store"});if(e.ok){let t=await e.json();R(t?.match??null)}}catch{}},1e4);return()=>clearInterval(e)},[U]),!e)return(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center py-32 gap-4",children:[(0,a.jsx)("span",{className:"text-[#64748B] text-lg",children:"Kh\xf4ng t\xecm thấy trận đấu"}),(0,a.jsx)("a",{href:"/",className:"text-[#4681E8] hover:underline text-sm",children:"← Quay lại"})]});let G=I?{...e,...I}:e,P=G?.has_live==="1"&&L.length>0,K=c(G.status_id,G.sport_id),V=$&&M&&!T&&!D,W=P&&(D||T&&K.live&&z.current<20),O=!P||T&&!W&&!D,q=!K.live&&"8"!==String(G.status_id)&&"9"!==String(G.status_id),{hm:X,full:Y}=x(G.time),Z=G.source_card_meta?.league_label||G.match_data?.competition_vi||G.match_data?.competition_full||"",Q=G.match_data?.stage_label||G.source_card_meta?.stage_label||"",J=G.home_logo||d(G.home_name),ee=G.away_logo||d(G.away_name),et=e=>t=>{t.target.src=d(e)};return(0,a.jsxs)("div",{className:"w-full bg-white min-h-screen text-slate-600 font-sans pb-16",children:[(0,a.jsx)("div",{className:"w-full border-b border-slate-200 bg-white",children:(0,a.jsxs)("div",{className:`${h} mx-auto px-4 py-3 flex items-center justify-between`,children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 text-[13px] font-bold",children:[(0,a.jsx)("span",{className:"text-[#4681E8] uppercase tracking-wide",children:Z}),Q&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"text-slate-300",children:"•"}),(0,a.jsx)("span",{className:"text-slate-600",children:Q})]})]}),(0,a.jsx)("div",{className:"text-[12px] font-mono text-slate-400 hidden sm:block",children:Y})]})}),(0,a.jsxs)("div",{className:`${h} mx-auto px-0 md:px-4 py-0 md:py-6 flex flex-col lg:flex-row gap-4 lg:gap-6`,children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0 flex flex-col gap-4 lg:gap-6",children:[(0,a.jsxs)("div",{className:"w-full relative bg-[#000000] rounded-none md:rounded-2xl overflow-hidden shadow-[0_10px_40px_rgba(0,0,0,0.5)] border-y md:border border-slate-200",children:[(0,a.jsx)("div",{className:"relative w-full aspect-video bg-[#000000] group z-10",children:V?(0,a.jsx)(n,{src:`/api/klivevip/proxy-stream?url=${encodeURIComponent(`https://live.inplyr.com/${M?.uid&&"default"!==M.uid?`room/${M.uid}`:`default/${G.id}`}.m3u8`)}`,autoPlay:!0,onError:()=>A(!0)}):O?(0,a.jsx)(o,{homeName:G.home_name,awayName:G.away_name,homeLogo:G.home_logo,awayLogo:G.away_logo,homeScore:K.sc?G.home_score:"0",awayScore:K.sc?G.away_score:"0",statusText:K.t,timeText:G.time_text||X,isLive:K.live,sportId:G.sport_id,matchId:G.ls_id||G.id,kickoffMs:1e3*Number(G?.time||0),isPreMatch:q}):(0,a.jsxs)("div",{className:"absolute inset-0 z-10 flex flex-col items-center justify-center p-4 lg:p-10",children:[(0,a.jsxs)("div",{className:"absolute inset-0 flex justify-between items-center opacity-[0.03] pointer-events-none px-4 lg:px-20 overflow-hidden",children:[(0,a.jsx)("img",{src:J,alt:"",className:"w-1/2 max-w-[400px] blur-[10px]",loading:"lazy",decoding:"async"}),(0,a.jsx)("img",{src:ee,alt:"",className:"w-1/2 max-w-[400px] blur-[10px]",loading:"lazy",decoding:"async"})]}),P&&!T&&(0,a.jsx)("button",{onClick:()=>F(!0),className:"group mb-4 sm:mb-8 w-16 h-16 md:w-20 md:h-20 rounded-full bg-[#4681E8] flex items-center justify-center hover:bg-[#55CAF1] transition-all shadow-[0_0_30px_rgba(70,129,232,0.5)] curs
128or-pointer z-20",children:(0,a.jsx)("svg",{className:"w-8 h-8 md:w-10 md:h-10 text-white ml-1.5 md:ml-2 group-hover:scale-110 transition-transform",viewBox:"0 0 24 24",fill:"currentColor",children:(0,a.jsx)("path",{d:"M8 5v14l11-7z"})})}),(0,a.jsxs)("div",{className:"grid grid-cols-[1fr_auto_1fr] items-center w-full max-w-[800px] gap-2 lg:gap-8 z-20",children:[(0,a.jsxs)("div",{className:"flex flex-col items-center gap-2 lg:gap-4",children:[(0,a.jsx)("img",{src:J,alt:G.home_name,className:"w-16 h-16 sm:w-24 sm:h-24 lg:w-32 lg:h-32 object-contain drop-shadow-[0_10px_20px_rgba(0,0,0,0.8)]",onError:et(G.home_name),loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-[#FFFFFF] text-xs sm:text-base lg:text-lg font-black text-center line-clamp-2 uppercase tracking-wide",children:G.home_name})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-2 lg:gap-3",children:[K.sc?(0,a.jsxs)("div",{className:"flex items-center gap-3 lg:gap-6 bg-white/90 backdrop-blur-md px-4 py-2 lg:px-8 lg:py-4 rounded-2xl border border-slate-200 shadow-2xl",children:[(0,a.jsx)("span",{className:"text-[#4681E8] text-[32px] sm:text-[48px] lg:text-[64px] font-black leading-none",children:G.home_score}),(0,a.jsx)("span",{className:"text-slate-300 text-[20px] lg:text-[28px] font-light",children:":"}),(0,a.jsx)("span",{className:"text-[#4681E8] text-[32px] sm:text-[48px] lg:text-[64px] font-black leading-none",children:G.away_score})]}):(0,a.jsx)("div",{className:"text-[#FFFFFF] text-[32px] sm:text-[48px] lg:text-[56px] font-black tracking-widest leading-none drop-shadow-xl",children:X}),(0,a.jsxs)("span",{className:`inline-flex items-center gap-2 rounded-full px-3 py-1 lg:px-5 lg:py-1.5 text-[10px] lg:text-[12px] font-bold tracking-widest uppercase ${K.live?"bg-[#4681E8] text-white shadow-[0_0_20px_rgba(70,129,232,0.6)]":"bg-white text-slate-600 border border-slate-200"}`,children:[K.live&&(0,a.jsx)("span",{className:"w-2 h-2 rounded-full bg-white animate-pulse"}),K.t,G.time_text?` : ${G.time_text}`:""]})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-2 lg:gap-4",children:[(0,a.jsx)("img",{src:ee,alt:G.away_name,className:"w-16 h-16 sm:w-24 sm:h-24 lg:w-32 lg:h-32 object-contain drop-shadow-[0_10px_20px_rgba(0,0,0,0.8)]",onError:et(G.away_name),loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-[#FFFFFF] text-xs sm:text-base lg:text-lg font-black text-center line-clamp-2 uppercase tracking-wide",children:G.away_name})]})]})]})}),L.length>0&&(0,a.jsxs)("div",{className:"w-full bg-white border-t border-slate-200 px-3 lg:px-6 py-2.5 lg:py-4 flex items-center gap-2 lg:gap-4 overflow-x-auto z-20",children:[(0,a.jsx)("span",{className:"text-[10px] lg:text-[11px] text-slate-600 uppercase font-bold tracking-widest shrink-0 mr-1 lg:mr-2",children:"CHỌN K\xcaNH TRUYỀN:"}),L.map((e,t)=>(0,a.jsxs)("button",{onClick:()=>{H(e),F(!0),A(!1)},className:`shrink-0 flex items-center gap-1.5 lg:gap-2 rounded-full px-3 py-1.5 lg:px-5 lg:py-2 text-[11px] lg:text-[13px] font-bold transition-all ${M?.uid===e.uid&&!T?"bg-[#4681E8]/10 border border-[#4681E8] text-[#4681E8] shadow-[0_0_15px_rgba(70,129,232,0.2)]":"bg-white border border-slate-200 text-slate-600 hover:text-[#4681E8] hover:border-[#4681E8]/50"}`,children:[(0,a.jsx)("span",{className:`w-1.5 h-1.5 lg:w-2 lg:h-2 rounded-full ${M?.uid===e.uid&&!T?"bg-[#4681E8] animate-pulse":"bg-transparent"}`}),"BLV ",e.nickName||`K\xeanh ${t+1}`]},e.uid||t))]})]}),(p=(()=>{let e=s?.stats;if(!e)return!1;let t=null;return Array.isArray(e)&&e.length>0?t=e[0]:e?.results?.[0]?t=e.results[0]:e?.stats_full_time&&(t=e),!!t&&!!(t.stats_full_time?.length>0||t.stats_haft_time?.length>0||t.stats_half_time?.length>0||t.stats?.length>0)})(),u=!!(s?.lineup&&(Array.isArray(s.lineup)?s.lineup.length>0:s.lineup.home||s.lineup.away)),g=!!(s?.events&&(Array.isArray(s.events)?s.events.length>0:s.events.incidents?.length>0||s.events.data?.length>0)),j=!!(r&&(Array.isArray(r)?r.length>0:r.data?.length>0)),(y=(v=[{id:"stats",label:"THỐNG K\xca",show:p},{id:"lineup",label:"ĐỘI H\xccNH",show:u},{id:"events",label:"DIỄN BIẾN",show:g},{id:"standings",label:"BẢNG XH",show:j},{id:"odds",label:"TỶ LỆ K\xc8O",show:!!(s?.odds&&Array.isArray(s.odds)&&s.odds.length>0)}].filter(e=>e.show)).find(e=>e.id===C)?C:v[0]?.id||"odds")!==C&&setTimeout(()=>S(y),0),v.length>0?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"bg-white rounded-2xl p-2 border border-slate-200 flex overflow-x-auto gap-2 shadow-[0_4px_15px_rgba(0,0,0,0.08)] mx-4 md:mx-0",children:v.map(({id:e,label:t})=>(0,a.jsx)("button",{onClick:()=>S(e),className:`flex-1 min-w-[100px] py-2.5 sm:py-3 text-[10px] sm:text-[12px] font-black uppercase tracking-widest rounded-xl transition-all ${y===e?"bg-[#4681E8]/10 text-[#4681E8] border border-[#4681E8]/30 shadow-inner":"text-slate-500 hover:text-[#4681E8] hover:bg-[#4681E8]/5 border border-transparent"}`,children:t},e))}),(0,a.jsxs)("div",{className:"bg-white rounded-2xl border border-slate-200 overflow-hidden shadow-[0_4px_15px_rgba(0,0,0,0.08)] min-h-[400px] mx-4 md:mx-0",children:["stats"===y&&(0,a.jsx)(b,{matchDetails:s}),"lineup"===y&&(0,a.jsx)(f,{matchDetails:s}),"events"===y&&(0,a.jsx)(_,{events:s?.events}),"standings"===y&&(0,a.jsx)(k,{standings:r}),"odds"===y&&(0,a.jsx)(E,{odds:s?.odds})]})]}):null),t.length>0&&(0,a.jsxs)("div",{className:"mt-4 mx-4 md:mx-0",children:[(0,a.jsxs)("h2",{className:"px-1 py-4 text-sm sm:text-base font-black text-slate-800 uppercase flex items-center gap-3 tracking-widest border-b border-slate-100 mb-4",children:[(0,a.jsx)("span",{className:"w-1 h-5 bg-[#4681E8] rounded-sm shadow-[0_0_8px_#4681E8]"}),"TRẬN ĐẤU C\xd9NG GIẢI"]}),(0,a.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3 sm:gap-4",children:t.slice(0,4).map(e=>(0,a.jsx)(w,{m:e},e.id))})]})]}),(0,a.jsx)("div",{className:"w-full lg:w-[350px] xl:w-[400px] shrink-0 px-4 md:px-0",children:(0,a.jsxs)("div",{className:"bg-white border border-slate-200 rounded-2xl overflow-hidden flex flex-col shadow-[0_10px_30px_rgba(0,0,0,0.1)] lg:sticky lg:top-8 h-[600px] lg:h-[c
128alc(100vh-100px)] lg:max-h-[850px]",children:[(0,a.jsxs)("div",{className:"px-5 py-4 border-b border-slate-200 flex items-center justify-between bg-white",children:[(0,a.jsxs)("h3",{className:"text-slate-800 text-sm font-black uppercase tracking-widest flex items-center gap-2",children:[(0,a.jsx)("span",{className:"w-2.5 h-2.5 rounded-full bg-[#4681E8] shadow-[0_0_10px_rgba(70,129,232,0.4)]"}),"PH\xd2NG CHAT"]}),(0,a.jsxs)("span",{className:"text-[10px] bg-white px-3 py-1.5 rounded-full text-[#4681E8] font-mono border border-[#4681E8]/30 shadow-inner tracking-widest flex items-center gap-1.5",children:[(0,a.jsx)("svg",{className:"w-3 h-3",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 10l4.553-2.276A1 1 0 0121 8.618v6.764a1 1 0 01-1.447.894L15 14M5 18h8a2 2 0 002-2V8a2 2 0 00-2-2H5a2 2 0 00-2 2v8a2 2 0 002 2z"})}),L.length," BLV"]})]}),(0,a.jsx)("div",{className:"flex-1 bg-[#FFFFFF]/40 min-h-0 chat-container-wrapper",children:(0,a.jsx)(N,{anchors:L,selectedAnchor:M})})]})})]})]})}let p={25:"KIỂM SO\xc1T B\xd3NG",24:"CHUYỀN CH\xcdNH X\xc1C",23:"TỔNG SỐ ĐƯỜNG CHUYỀN",22:"TẤN C\xd4NG",21:"T.C\xd4NG NGUY HIỂM",2:"S\xdaT TR\xdaNG Đ\xcdCH",37:"PHẠT G\xd3C",28:"N\xc9M BI\xcaN",8:"VIỆT VỊ",3:"THẺ V\xc0NG",4:"THẺ ĐỎ",5:"S\xdaT PENALTY",29:"PHẠM LỖI",26:"Đ\xc1NH ĐẦU",27:"CỨU THUA",1:"B\xc0N THẮNG",7:"PHẢN LƯỚI"},u=[25,21,22,24,2,23,4,3,37,28,8,5,29],g="https://cdn.sportdb.live/upload/team/";function b({matchDetails:e}){let[t,s]=(0,l.useState)("full"),r=e?.stats,n=e?.lineup,i=n?.match?.home_team,o=n?.match?.away_team,c=null;Array.isArray(r)&&r.length>0?c=r[0]:r?.results?.[0]?c=r.results[0]:r?.stats_full_time&&(c=r);let d={full:c?.stats_full_time||[],h1:c?.stats_haft_time||c?.stats_half_time||[],h2:c?.stats_haft_time_2nd_half||[]}[t]||[];if(!c||0===d.length)return(0,a.jsx)(j,{text:"Thống k\xea sẽ được cập nhật khi trận đấu bắt đầu"});let x=[...d].sort((e,t)=>{let s=u.indexOf(e.type),a=u.indexOf(t.type);return(-1===s?999:s)-(-1===a?999:a)});return(0,a.jsxs)("div",{className:"flex flex-col",children:[(i||o)&&(0,a.jsxs)("div",{className:"flex items-center justify-between px-4 py-3 border-b border-slate-100",children:[(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5 w-20",children:[i?.logo&&(0,a.jsx)("img",{src:g+i.logo,alt:i?.name||"Home team",className:"w-8 h-8 object-contain",onError:e=>e.target.style.display="none",loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-slate-600 text-[10px] font-medium text-center leading-tight",children:i?.name||""})]}),(0,a.jsx)("div",{className:"flex gap-1",children:[{k:"h1",l:"Hiệp 1"},{k:"h2",l:"Hiệp 2"},{k:"full",l:"Cả trận"}].map(({k:e,l})=>(0,a.jsx)("button",{onClick:()=>s(e),className:`px-2.5 py-1 text-[10px] font-bold rounded transition-all ${t===e?"bg-[#E11D48] text-white":"text-slate-400 hover:text-slate-600 bg-slate-100"}`,children:l},e))}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5 w-20",children:[o?.logo&&(0,a.jsx)("img",{src:g+o.logo,alt:o?.name||"Away team",className:"w-8 h-8 object-contain",onError:e=>e.target.style.display="none",loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-slate-600 text-[10px] font-medium text-center leading-tight",children:o?.name||""})]})]}),(0,a.jsx)("div",{className:"px-4 py-3 space-y-3",children:x.map(e=>{let t=p[e.type]||`Stat ${e.type}`,s=e.home,l=e.away,r=24===e.type||25===e.type,n=s+l,i=0===n?50:s/n*100,o=s>l,c=l>s;return(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"flex justify-between items-center mb-1.5",children:[(0,a.jsxs)("span",{className:`text-xs font-bold w-10 tabular-nums ${o?"text-slate-800":"text-slate-400"}`,children:[s,r?"%":""]}),(0,a.jsx)("span",{className:"text-slate-400 text-[10px] font-semibold tracking-wide uppercase",children:t}),(0,a.jsxs)("span",{className:`text-xs font-bold w-10 text-right tabular-nums ${c?"text-slate-800":"text-slate-400"}`,children:[l,r?"%":""]})]}),(0,a.jsxs)("div",{className:"flex gap-0.5 h-[5px]",children:[(0,a.jsx)("div",{className:"flex-1 rounded-l-full bg-white/[0.06] overflow-hidden flex justify-end",children:(0,a.jsx)("div",{className:`rounded-l-full transition-all duration-500 ${o?"bg-gradient-to-r from-[#E11D48]/60 to-[#E11D48]":"bg-gradient-to-r from-white/10 to-white/20"}`,style:{width:`${i}%`}})}),(0,a.jsx)("div",{className:"flex-1 rounded-r-full bg-white/[0.06] overflow-hidden",children:(0,a.jsx)("div",{className:`rounded-r-full transition-all duration-500 ${c?"bg-gradient-to-l from-[#E11D48]/60 to-[#E11D48]":"bg-gradient-to-l from-white/10 to-white/20"}`,style:{width:`${100-i}%`}})})]})]},e.type)})})]})}
128function f({matchDetails:e}){let[t,s]=(0,l.useState)("pitch"),r=e?.lineup,n=r?.lineup||r,i=n?.home||[],o=n?.away||[],c=r?.home_formation||"",d=r?.away_formation||"",x=r?.match?.home_team,h=r?.match?.away_team;if(0===i.length&&0===o.length)return(0,a.jsx)(j,{text:"Đội h\xecnh sẽ được c\xf4ng bố trước trận đấu 30 ph\xfat"});let m=e=>e.filter(e=>1===e.first),p=e=>e.filter(e=>1!==e.first),u=m(i),g=m(o),b=p(i),w=p(o);return(0,a.jsxs)("div",{className:"flex flex-col",children:[(0,a.jsxs)("div",{className:"flex items-center justify-center gap-1 px-3 py-2 border-b border-slate-100",children:[(0,a.jsx)("button",{onClick:()=>s("pitch"),className:`px-3 py-1.5 text-[10px] font-bold rounded transition-all ${"pitch"===t?"bg-[#E11D48] text-white":"text-slate-400 bg-slate-100"}`,children:"Đội h\xecnh xuất ph\xe1t"}),(0,a.jsx)("button",{onClick:()=>s("list"),className:`px-3 py-1.5 text-[10px] font-bold rounded transition-all ${"list"===t?"bg-[#E11D48] text-white":"text-slate-400 bg-slate-100"}`,children:"Đội h\xecnh dá»± bị"})]}),"pitch"===t?(0,a.jsx)("div",{className:"relative w-full",style:{aspectRatio:"68/105"},children:(0,a.jsxs)("div",{className:"absolute inset-0 bg-gradient-to-b from-[#1a5c2a] via-[#1e6b31] to-[#1a5c2a] rounded-2xl overflow-hidden",children:[(0,a.jsxs)("div",{className:"absolute inset-[3%] border border-white/20 rounded-lg",children:[(0,a.jsx)("div",{className:"absolute left-0 right-0 top-1/2 h-px bg-white/20"}),(0,a.jsx)("div",{className:"absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 w-[22%] aspect-square rounded-full border border-white/20"}),(0,a.jsx)("div",{className:"absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 w-1.5 h-1.5 bg-white/30 rounded-full"}),(0,a.jsx)("div",{className:"absolute top-0 left-1/2 -translate-x-1/2 w-[55%] h-[16%] border-l border-r border-white/20"}),(0,a.jsx)("div",{className:"absolute top-0 left-1/2 -translate-x-1/2 w-[25%] h-[6%] border-l border-r border-white/20"}),(0,a.jsx)("div",{className:"absolute bottom-0 left-1/2 -translate-x-1/2 w-[55%] h-[16%] border-t border-l border-r border-white/20"}),(0,a.jsx)("div",{className:"absolute bottom-0 left-1/2 -translate-x-1/2 w-[25%] h-[6%] border-t border-l border-r border-white/20"})]}),(0,a.jsx)("div",{className:"absolute top-1 left-2 text-[9px] text-[#F8FAFC]/50 font-bold z-10",children:x?.name||""}),(0,a.jsx)("div",{className:"absolute top-1 right-2 text-[9px] text-[#E11D48]/70 font-bold z-10",children:c}),(0,a.jsx)("div",{className:"absolute bottom-1 left-2 text-[9px] text-[#F8FAFC]/50 font-bold z-10",children:h?.name||""}),(0,a.jsx)("div",{className:"absolute bottom-1 right-2 text-[9px] text-[#E11D48]/70 font-bold z-10",children:d}),u.map((e,t)=>{let s=`${e.x||50}%`,l=`${(e.y||10)/2}%`,r="G"===e.position;return(0,a.jsxs)("div",{className:"absolute flex flex-col items-center z-10 -translate-x-1/2 -translate-y-1/2",style:{left:s,top:l},children:[(0,a.jsx)("div",{className:`w-6 h-6 rounded-full flex items-center justify-center text-[9px] font-black ${r?"bg-yellow-400 text-black":"bg-blue-600 text-[#F8FAFC]"} shadow-md border border-white/20`,children:e.shirt_number||""}),(0,a.jsx)("span",{className:"text-[7px] text-[#F8FAFC] font-semibold mt-0.5 text-center max-w-[48px] truncate drop-shadow-[0_1px_2px_rgba(0,0,0,0.8)]",children:(e.name||"").split(" ").slice(-2).join(" ")}),1===e.captain&&(0,a.jsx)("span",{className:"absolute -top-1 -right-1 text-[6px] text-yellow-400",children:"C"})]},`h-${t}`)}),g.map((e,t)=>{let s=`${100-(e.x||50)}%`,l=`${100-(e.y||10)/2}%`,r="G"===e.position;return(0,a.jsxs)("div",{className:"absolute flex flex-col items-center z-10 -translate-x-1/2 -translate-y-1/2",style:{left:s,top:l},children:[(0,a.jsx)("div",{className:`w-6 h-6 rounded-full flex items-center justify-center text-[9px] font-black ${r?"bg-yellow-400 text-black":"bg-orange-500 text-[#F8FAFC]"} shadow-md border border-white/20`,children:e.shirt_number||""}),(0,a.jsx)("span",{className:"text-[7px] text-[#F8FAFC] font-semibold mt-0.5 text-center max-w-[48px] truncate drop-shadow-[0_1px_2px_rgba(0,0,0,0.8)]",children:(e.name||"").split(" ").slice(-2).join(" ")}),1===e.captain&&(0,a.jsx)("span",{className:"absolute -top-1 -right-1 text-[6px] text-yellow-400",children:"C"})]},`a-${t}`)})]})}):(0,a.jsxs)("div",{className:"px-3 py-2 text-xs",children:[(0,a.jsxs)("div",{className:"flex justify-between font-bold text-slate-400 mb-1 uppercase tracking-wider text-[9px] px-1",children:[(0,a.jsx)("span",{children:"Đội chá»
128§ nh\xe0"}),(0,a.jsx)("span",{children:"Đội kh\xe1ch"})]}),Array.from({length:Math.max(b.length,w.length)}).map((e,t)=>{let s=b[t],l=w[t];return(0,a.jsxs)("div",{className:"flex justify-between items-center border-b border-slate-50 py-1.5",children:[(0,a.jsx)("div",{className:"flex items-center gap-1.5 w-1/2 min-w-0",children:s&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"text-[#E11D48] font-bold w-5 text-center shrink-0 text-[10px]",children:s.shirt_number||""}),(0,a.jsx)("span",{className:"text-slate-700 truncate text-[11px]",children:s.name||""})]})}),(0,a.jsx)("div",{className:"flex items-center gap-1.5 w-1/2 justify-end min-w-0",children:l&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"text-slate-700 truncate text-[11px] text-right",children:l.name||""}),(0,a.jsx)("span",{className:"text-[#E11D48] font-bold w-5 text-center shrink-0 text-[10px]",children:l.shirt_number||""})]})})]},t)})]})]})}function j({text:e}){return(0,a.jsx)("div",{className:"flex items-center justify-center py-10 text-slate-400 text-sm text-center",children:e})}function w({m:e}){let t=c(e.status_id,e.sport_id),{hm:s,dm:l}=x(e.time),r=e.source_card_meta?.league_label||e.match_data?.competition_vi||"";return(0,a.jsxs)("a",{href:`/match/${encodeURIComponent(e.post_name||e.id)}`,className:"flex items-center gap-3 rounded-2xl bg-white hover:bg-slate-50 border border-slate-100 hover:border-[#4681E8]/30 p-3 transition-all group",children:[(0,a.jsxs)("div",{className:"shrink-0 w-14 text-center",children:[(0,a.jsx)("div",{className:"text-[#E11D48] text-[11px] font-bold",children:s}),(0,a.jsx)("div",{className:"text-slate-400 text-[9px]",children:l})]}),(0,a.jsx)("div",{className:"w-px h-9 bg-slate-200 shrink-0"}),(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("div",{className:"text-slate-400 text-[9px] truncate mb-1",children:r}),(0,a.jsxs)("div",{className:"flex items-center gap-2 mb-0.5",children:[(0,a.jsx)("img",{src:e.home_logo||d(e.home_name),alt:e.home_name,className:"w-4 h-4 object-contain shrink-0",onError:t=>t.target.src=d(e.home_name),loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-slate-600 text-[12px] font-medium truncate",children:e.home_name})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("img",{src:e.away_logo||d(e.away_name),alt:e.away_name,className:"w-4 h-4 object-contain shrink-0",onError:t=>t.target.src=d(e.away_name),loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-slate-600 text-[12px] font-medium truncate",children:e.away_name})]})]}),t.sc?(0,a.jsxs)("span",{className:"text-slate-800 font-bold text-[14px] tabular-nums shrink-0",children:[e.home_score,"-",e.away_score]}):(0,a.jsx)("span",{className:"text-[10px] font-bold text-[#E11D48] bg-[#E11D48]/10 rounded px-2.5 py-1 group-hover:bg-[#E11D48]/15 transition shrink-0",children:"XEM NGAY"})]})}let v={0:{bg:"bg-white/10",text:"text-[#F8FAFC]/40",nameCls:"text-[#94A3B8]"},1:{bg:"bg-white/10",text:"text-[#F8FAFC]/50",nameCls:"text-[#94A3B8]"},2:{bg:"bg-green-900/50",text:"text-green-400",nameCls:"text-green-400"},3:{bg:"bg-yellow-900/40",text:"text-yellow-400",nameCls:"text-emerald-600 font-bold"},4:{bg:"bg-blue-900/40",text:"text-blue-400",nameCls:"text-blue-400 font-bold"},5:{bg:"bg-red-900/40",text:"text-red-400",nameCls:"text-red-400 font-bold"}};function N({anchors:e,selectedAnchor:t}){let[s,r]=(0,l.useState)([]),[n,i]=(0,l.useState)(!1),o=(0,l.useRef)(null),c=(0,l.useRef)(null),d=t?.roomNum;return(0,l.useEffect)(()=>{if(!d)return;r([]),i(!1);let e=new EventSource(`/api/chat/${d}`);return e.onopen=()=>i(!0),e.onmessage=e=>{try{let t=JSON.parse(e.data);if("connected"===t.type)return void i(!0);if("history"===t.type&&Array.isArray(t.messages))return void r(e=>[...t.messages,...e].slice(-200));t.user&&t.text&&r(e=>[...e,t].slice(-200))}catch{}},e.onerror=()=>i(!1),()=>{e.close(),i(!1)}},[d]),(0,l.useEffect)(()=>{requestAnimationFrame(()=>{let e=c.current;e&&(e.scrollTop=e.scrollHeight)})},[s.length]),(0,a.jsxs)("div",{className:"flex flex-col h-full bg-[#0F0F23]",children:[(0,a.jsxs)("div",{ref:c,className:"flex-1 min-h-0 px-3 py-2 flex flex-col gap-[3px] overflow-y-auto",style:{scrollbarWidth:"thin",scrollbarColor:"#444 transparent"},children:[(0,a.jsx)("div",{className:"text-center text-[10px] text-[#F8FAFC]/30 bg-slate-50/60 py-1.5 rounded-xl mb-1 sticky top-0 z-10 backdrop-blur-sm",children:n?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"inline-block h-1.5 w-1.5 rounded-full bg-green-400 animate-pulse mr-1"}),"Đang kết nối ph\xf2ng chat trá»±c tiếp"]}):d?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"inline-block h-1.5 w-1.5 rounded-full bg-yellow-400 animate-pulse mr-1"}),"Đang kết nối..."]}
128):"Ch\xe0o mừng bạn đến với ph\xf2ng chat"}),0===s.length&&n&&(0,a.jsx)("div",{className:"text-center text-[10px] text-[#F8FAFC]/20 py-4",children:"Chờ tin nhắn mới..."}),s.map((e,t)=>{var s;let l=(s=e.level)>=5?v[5]:v[s]||v[0];return 2===e.type||e.text?.includes("v\xe0o ph\xf2ng tr\xf2 chuyện")?(0,a.jsxs)("div",{className:"flex items-start gap-1.5 text-[11px] leading-relaxed py-[1px] opacity-60",children:[(0,a.jsx)("span",{className:"text-green-500/70 font-medium",children:"Hi"}),(0,a.jsxs)("span",{className:`shrink-0 inline-flex items-center px-1 py-[0.5px] rounded text-[8px] font-bold ${l.bg} ${l.text}`,children:["Lv",e.level]}),(0,a.jsxs)("span",{className:`font-bold ${l.nameCls}`,children:[e.user,":"]}),(0,a.jsx)("span",{className:"text-[#F8FAFC]/40",children:e.text})]},`${e.ts}-${t}`):(0,a.jsxs)("div",{className:"flex items-start gap-1.5 text-[11px] leading-relaxed py-[1px]",children:[(0,a.jsxs)("span",{className:`shrink-0 inline-flex items-center px-1 py-[0.5px] rounded text-[8px] font-bold ${l.bg} ${l.text}`,children:["Lv.",e.level]}),(0,a.jsxs)("span",{className:`font-bold shrink-0 ${l.nameCls}`,children:[e.user,":"]}),(0,a.jsx)("span",{className:"text-[#F8FAFC]/80 break-words min-w-0",children:e.text})]},`${e.ts}-${t}`)}),(0,a.jsx)("div",{ref:o})]}),(0,a.jsxs)("div",{className:"shrink-0 px-3 py-2 bg-[#0F0F23] border-t border-white/[0.04] space-y-2",children:[(0,a.jsx)("div",{className:"flex items-center justify-center gap-3 text-[#F8FAFC]/20 text-[10px]",children:(0,a.jsx)("span",{className:"flex items-center gap-1",children:(0,a.jsx)("svg",{className:"w-3 h-3",viewBox:"0 0 24 24",fill:"currentColor",children:(0,a.jsx)("path",{d:"M12 4.5C7 4.5 2.7 7.6 1 12c1.7 4.4 6 7.5 11 7.5s9.3-3.1 11-7.5c-1.7-4.4-6-7.5-11-7.5zm0 12.5c-2.8 0-5-2.2-5-5s2.2-5 5-5 5 2.2 5 5-2.2 5-5 5zm0-8c-1.7 0-3 1.3-3 3s1.3 3 3 3 3-1.3 3-3-1.3-3-3-3z"})})})}),(0,a.jsxs)("div",{className:"flex bg-[#0F0F23] rounded-2xl overflow-hidden border border-white/[0.08]",children:[(0,a.jsx)("input",{type:"text",placeholder:"Đăng nhập để c\xf9ng chat nh\xe9",disabled:!0,className:"flex-1 bg-transparent px-3 py-2 text-[11px] text-[#F8FAFC] outline-none placeholder:text-[#F8FAFC]/30 disabled:opacity-50"}),(0,a.jsx)("button",{disabled:!0,className:"px-4 text-[11px] font-bold bg-[#E11D48] text-black disabled:bg-white/10 disabled:text-[#F8FAFC]/20 transition-colors",children:"Gửi"})]})]})]})}let y={1:{icon:"⚽",label:"B\xe0n thắng",color:"text-green-400"},2:{icon:"\uD83C\uDD7F️",label:"Phạt đền",color:"text-green-400"},3:{icon:"\uD83D\uDFE1",label:"Thẻ v\xe0ng",color:"text-yellow-400"},4:{icon:"\uD83D\uDFE1\uD83D\uDFE1",label:"Thẻ v\xe0ng 2",color:"text-emerald-600"},5:{icon:"\uD83D\uDD34",label:"Thẻ đỏ",color:"text-red-500"},7:{icon:"\uD83D\uDD04",label:"Phản lưới",color:"text-orange-400"},8:{icon:"\uD83C\uDFE5",label:"Chấn thương",color:"text-[#94A3B8]"},9:{icon:"\uD83D\uDD04",label:"Thay người",color:"text-blue-400"},11:{icon:"⏱️",label:"Hiệp 2",color:"text-[#F8FAFC]/40"},15:{icon:"\uD83E\uDD45",label:"Pen trượt",color:"text-red-400"},19:{icon:"⏱️",label:"Kết th\xfac hiệp",color:"text-[#F8FAFC]/30"},21:{icon:"\uD83C\uDFC6",label:"VAR",color:"text-purple-400"}};function _({events:e}){let t=e?.incidents||e?.events||[];return t&&0!==t.length?(0,a.jsx)("div",{className:"flex flex-col",children:t.map((e,t)=>{let s=y[e.type]||{icon:"•",label:`Event ${e.type}`,color:"text-[#F8FAFC]/50"},l=1===e.position,r=2===e.position,n=e.add_time?`+${e.add_time}`:"",i=`${e.time}'${n}`;return l||r||11!==e.type&&19!==e.type?9===e.type?(0,a.jsxs)("div",{className:`flex items-center gap-2 border-b border-slate-50 p-3 text-xs ${l?"":"flex-row-reverse"}`,children:[(0,a.jsx)("span",{className:"text-slate-400 w-10 text-center shrink-0 text-[10px]",children:i}),(0,a.jsxs)("div",{className:`flex-1 flex flex-col gap-0.5 ${l?"items-start":"items-end"}`,children:[(0,a.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,a.jsx)("span",{className:"text-green-400 text-[10px]",children:"▲"}),(0,a.jsx)("span",{className:"text-[#F8FAFC]/80 text-[11px]",children:e.in_player_name||""})]}),(0,a.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,a.jsx)("span",{className:"text-red-400 text-[10px]",children:"▼"}),(0,a.jsx)("span",{className:"text-[#F8FAFC]/40 text-[11px]",children:e.out_player_name||""})]})]})]},t):(0,a.jsxs)("div",{className:`flex items-center gap-2 border-b border-slate-50 p-3 text-xs ${l?"":"flex-row-reverse"}`,children:[(0,a.jsx)("span",{className:"text-slate-400 w-10 text-center shrink-0 text-[10px]",children:i}),(0,a.jsx)("span",{className:`shrink-0 text-sm ${s.color}`,children:s.icon}),(0,a.jsxs)("div",{className:`flex-1 min-w-0 ${l?"text-left":"text-right"}`,children:[(0,a.jsx)("span",{className:"text-slate-700 text-[11px]",children:e.player_name||""}),e.assist1_name&&(0,a.jsxs)("span",{className:"text-slate-400 text-[10px] ml-1",children:["(kiến tạo: ",e.assist1_name,")"]}),1===e.type&&void 0!==e.home_score&&(0,a.jsxs)("span",{className:"text-[#E11D48] font-bold text-[11px] ml-2",children:[e.home_score," - ",e.away_score]})]})]},t):(0,a.jsx)("div",{className:"flex items-center justify-center py-2 border-b border-slate-50 bg-slate-50",children:(0,a.jsxs)("span",{className:"text-slate-400 text-[10px] uppercase tracking-wider",children:[s.icon," ",s.label," — ",i]})},t)})}):(0,a.jsx)(j,{text:"Diễn biến trận đấu sẽ được cập nhật trực tiếp tại đ\xe2y"})}function k({standings:e}
128){return e&&e.teams&&0!==e.teams.length?(0,a.jsxs)("div",{className:"w-full text-[10px]",children:[(0,a.jsxs)("div",{className:"grid grid-cols-[20px_1fr_24px_24px_32px] bg-slate-50 p-2 text-slate-400 uppercase font-bold sticky top-0",children:[(0,a.jsx)("span",{className:"text-center",children:"#"}),(0,a.jsx)("span",{children:"Team"}),(0,a.jsx)("span",{className:"text-center",children:"T"}),(0,a.jsx)("span",{className:"text-center",children:"B"}),(0,a.jsx)("span",{className:"text-center whitespace-nowrap",children:"Đ"})]}),e.teams.slice(0,15).map((e,t)=>{let s=!!e.data,l=s?parseFloat(e.data[0]):e.rank||t+1,r=s?e.data[1]:e.target_name,n=s?e.data[7]:e.points,i=s?e.data[3]:e.won,o=s?e.data[5]:e.loss;return(0,a.jsxs)("div",{className:"grid grid-cols-[20px_1fr_24px_24px_32px] items-center p-2 border-b border-slate-50 hover:bg-slate-50 transition-colors",children:[(0,a.jsx)("span",{className:"text-center text-slate-500",children:l}),(0,a.jsxs)("div",{className:"flex items-center gap-1.5 min-w-0 pr-2",children:[e.team_logo&&(0,a.jsx)("img",{src:e.team_logo,className:"w-3.5 h-3.5 object-contain",alt:r||"Team logo",loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-slate-700 font-medium truncate",children:r})]}),(0,a.jsx)("span",{className:"text-center text-slate-500",children:i}),(0,a.jsx)("span",{className:"text-center text-slate-500",children:o}),(0,a.jsx)("span",{className:"text-center text-[#E11D48] font-bold",children:n})]},r)})]}):(0,a.jsx)(j,{text:"Bảng xếp hạng sẽ được cập nhật"})}function E({odds:e}){let t=Array.isArray(e)?e:[],s=["2","4","3","16"];function l(e){for(let a of s){let s=t.find(t=>t.odds_type===e&&String(t.company_id)===a);if(s?.odds_info?.length)return s}return t.find(t=>t.odds_type===e&&t.odds_info?.length>0)}function r(e,t){let s=e?.odds_info;if(!s?.length)return["-","-","-"];let a="opening"===t?s.length-1:0;if(!s?.length||!s[a])return["-","-","-"];let l=s[a][2];if("string"!=typeof l)return["-","-","-"];let r=l.split(",");return[r[0]||"-",r[1]||"-",r[2]||"-"]}let n=l("asia"),i=l("eu"),o=l("bs"),c=l("cr"),d=r(n,"opening"),x=r(n,"latest"),h=r(i,"opening"),m=r(i,"latest"),p=r(o,"opening"),u=r(o,"latest"),g=r(c,"opening"),b=r(c,"latest"),f=({children:e})=>(0,a.jsx)("th",{className:"px-2 py-2 text-[9px] sm:text-[10px] font-bold uppercase tracking-wider text-slate-500 border-b border-slate-100 text-center",children:e}),j=({children:e,color:t})=>(0,a.jsx)("td",{className:`px-2 py-2.5 text-center text-[11px] sm:text-xs font-bold ${t||"text-slate-600"} border-b border-slate-50`,children:e});return(0,a.jsxs)("div",{className:"overflow-x-auto",children:[(0,a.jsxs)("table",{className:"w-full min-w-[600px]",children:[(0,a.jsxs)("thead",{children:[(0,a.jsxs)("tr",{className:"bg-slate-50",children:[(0,a.jsx)("th",{className:"px-4 py-2 text-left border-b border-slate-100",rowSpan:2,children:(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("div",{className:"w-7 h-7 rounded bg-gradient-to-br from-[#1d4ed8] to-[#3b82f6] flex items-center justify-center text-white text-[9px] font-black shadow-sm",children:"B"}),(0,a.jsx)("span",{className:"text-slate-600 text-[11px] font-bold tracking-wider",children:"SPORT"})]})}),(0,a.jsx)("th",{colSpan:3,className:"px-1 py-1.5 text-center text-[9px] sm:text-[10px] font-bold uppercase tracking-wider text-[#4681E8] border-b border-l border-slate-100",children:"CƯỢC CH\xc2U \xc1"}),(0,a.jsx)("th",{colSpan:3,className:"px-1 py-1.5 text-center text-[9px] sm:text-[10px] font-bold uppercase tracking-wider text-[#4681E8] border-b border-l border-slate-100",children:"CƯỢC CH\xc2U \xc2U"}),(0,a.jsx)("th",{colSpan:3,className:"px-1 py-1.5 text-center text-[9px] sm:text-[10px] font-bold uppercase tracking-wider text-[#4681E8] border-b border-l border-slate-100",children:"T\xc0I XỈU"}),(0,a.jsx)("th",{colSpan:3,className:"px-1 py-1.5 text-center text-[9px] sm:text-[10px] font-bold uppercase tracking-wider text-[#4681E8] border-b border-l border-slate-100",children:"K\xc8O G\xd3C"})]}),(0,a.jsxs)("tr",{className:"bg-slate-50",children:[(0,a.jsx)(f,{children:"CHỦ"}),(0,a.jsx)(f,{children:"CHẤP"}),(0,a.jsx)(f,{children:"KH\xc1CH"}),(0,a.jsx)(f,{children:"CHỦ"}),(0,a.jsx)(f,{children:"H\xd2A"}),(0,a.jsx)(f,{children:"KH\xc1CH"}),(0,a.jsx)(f,{children:"T\xc0I"}),(0,a.jsx)(f,{children:"Tá»¶ LỆ"}),(0,a.jsx)(f,{children:"XỈU"}),(0,a.jsx)(f,{children:"T\xc0I"}),(0,a.jsx)(f,{children:"Tá»¶ LỆ"}),(0,a.jsx)(f,{children:"XỈU"})]})]}),(0,a.jsxs)("tbody",{children:[(0,a.jsxs)("tr",{className:"hover:bg-slate-50 transition-colors",children:[(0,a.jsx)("td",{className:"px-4 py-2.5 text-[11px] sm:text-xs text-slate-500 font-medium border-b border-slate-50",children:"Tá»· Lệ Mở Cược"}),(0,a.jsx)(j,{children:d[0]}),(0,a.jsx)(j,{color:"text-red-400",children:d[1]}),(0,a.jsx)(j,{children:d[2]}),(0,a.jsx)(j,{children:h[0]}),(0,a.jsx)(j,{children:h[1]}),(0,a.jsx)(j,{children:h[2]}),(0,a.jsx)(j,{children:p[0]}),(0,a.jsx)(j,{children:p[1]}),(0,a.jsx)(j,{children:p[2]}),(0,a.jsx)(j,{children:g[0]}),(0,a.jsx)(j,{children:g[1]}),(0,a.jsx)(j,{children:g[2]})]}),(0,a.jsxs)("tr",{className:"hover:bg-slate-50 transition-colors",children:[(0,a.jsx)("td",{className:"px-4 py-2.5 text-[11px] sm:text-xs text-slate-500 font-medium border-b border-slate-50",children:"Tá»· Lệ Trước Trận"}),(0,a.jsx)(j,{children:x[0]}),(0,a.jsx)(j,{color:"text-red-400",children:x[1]}),(0,a.jsx)(j,{children:x[2]}),(0,a.jsx)(j,{children:m[0]}),(0,a.jsx)(j,{children:m[1]}),(0,a.jsx)(j,{children:m[2]}),(0,a.jsx)(j,{children:u[0]}),(0,a.jsx)(j,{children:u[1]}),(0,a.jsx)(j,{children:u[2]}),(0,a.jsx)(j,{children:b[0]}),(0,a.jsx)(j,{children:b[1]}),(0,a.jsx)(j,{children:b[2]})]}),(0,a.jsxs)("tr",{className:"hover:bg-slate-50 transition-colors bg-white",children:[(0,a.jsxs)("td",{className:"px-4 py-2.5 text-[11px] sm:text-xs text-slate-700 font-bold flex items-center gap-1.5 border-b border-slate-50",children:["Live ",(0,a.jsx)("span",{className:"w-1.5 h-1.5 rounded-full bg-red-500 animate-pulse"})]}),(0,a.jsx)(j,{color:"text-green-400",children:x[0]}),(0,a.jsx)(j,{color:"text-red-400",children:x[1]}),(0,a.jsx)(j,{color:"text-green-400",children:x[2]}),(0,a.jsx)(j,{color:"text-green-400",children:m[0]}),(0,a.jsx)(j,{color:"text-green-400",children:m[1]}),(0,a.jsx)(j,{color:"text-green-400",children:m[2]}),(0,a.jsx)(j,{color:"text-green-400",children:u[0]}),(0,a.jsx)(j,{children:u[1]}),(0,a.jsx)(j,{color:"text-green-400",children:u[2]}),(0,a.jsx)(j,{color:"text-green-400",children:b[0]}),(0,a.jsx)(j,{children:b[1]}),(0,a.jsx)(j,{color:"text-green-400",children:b[2]})]})]})]}),(0,a.jsx)("p",{className:"text-center text-slate-400 text-[10px] py-2.5 border-t border-slate-100",children:"Tá»· lệ k\xe8o sẽ được cập nhật gần giờ thi đấu"})]})}},13878:()=>{},13881:(e,t,s)=>{"use strict";function a(e){let t=e?.fixtures_v2||null,s=e?.fixtures||e?.schedules||[],a=t?.date_tabs?.length?t.date_tabs:function(e=new Date){let t=["Chá»
128§ Nhật","Thứ Hai","Thứ Ba","Thứ Tư","Thứ Năm","Thứ S\xe1u","Thứ Bảy"],s=[];for(let a=0;a<14;a+=1){let l=new Date(e);l.setDate(l.getDate()+a);let r=String(l.getDate()).padStart(2,"0"),n=String(l.getMonth()+1).padStart(2,"0"),i=`${l.getFullYear()}-${l.getMonth()+1}-${l.getDate()}`;s.push({label:0===a?"H\xf4m Nay":t[l.getDay()],date:`${r}.${n}`,dataValue:i,active:0===a})}return s}(),l=e?.selected_date||a.find(e=>e.active)?.dataValue||a[0]?.dataValue||null;if(t?.leagues?.length)return{dateTabs:a,selectedDate:l,leagues:t.leagues,totalMatches:t.leagues.reduce((e,t)=>e+t.matches.length,0)};let r=[],n=new Set;return s.forEach(e=>{let t=e.data;if(!(t.length<3))for(let s=0;s+2<t.length;s+=16){let a=t[s]||"",l=t[s+1]||"",i=t[s+2]||"",o=`${a}-${l}-${i}`;if(!n.has(o)&&l&&(n.add(o),r.push({time:a,home_team:l,away_team:i,home_logo:e.team_logos?.[2*Math.floor(s/16)]||"",away_logo:e.team_logos?.[2*Math.floor(s/16)+1]||"",score:t[s+3]||"-",ht_score:t[s+4]||"",handicap:t.length>s+9?[t[s+7]||"",t[s+8]||"",t[s+9]||""]:[],over_under:t.length>s+12?[t[s+10]||"",t[s+11]||"",t[s+12]||""]:[],one_x_two:t.length>s+15?[t[s+13]||"",t[s+14]||"",t[s+15]||""]:[]}),s+16>=t.length))break}}),{dateTabs:a,selectedDate:l,leagues:r.length>0?[{league_name:"Tất cả trận đấu",league_icon:"",match_count:r.length,matches:r}]:[],totalMatches:r.length}}function l(e){let t=e?.results_v2||null,s=e?.results||[];if(t?.date_groups?.length)return{availableLeagues:t.available_leagues||[],dateGroups:t.date_groups,totalMatches:t.date_groups.reduce((e,t)=>e+t.matches.length,0)};let a=[];return s.forEach(e=>{let t=e.data;if(t.length<6)return;let s=t[0],l=s.split(" - "),r=[],n=1,i=0;for(;n<t.length;){if(t[n]?.startsWith("L\xfac")){let s=t[n].replace("L\xfac","").trim();r.push({time:s,home_team:t[n+1]||"",away_team:t[n+4]||"",home_logo:e.team_logos?.[i]||"",away_logo:e.team_logos?.[i+1]||"",score:t[n+2]||"",ht_score:(t[n+3]||"").replace("H1:","").replace("HT:","").trim()}),i+=2,n+=5;continue}n+=1}r.length>0&&a.push({date_header:l[0]?.trim()||s,league_round:l.slice(1).join(" - ").trim(),matches:r})}),{availableLeagues:[],dateGroups:a,totalMatches:a.reduce((e,t)=>e+t.matches.length,0)}}function r(e,t){if(!t)return e;let s=t.toLowerCase();return e.filter(e=>e.league_round.toLowerCase().includes(s))}s.d(t,{kK:()=>r,o8:()=>l,p_:()=>a})},14163:(e,t,s)=>{"use strict";s.d(t,{Klivevip05ResultsPage:()=>o});var a=s(68019),l=s(10707),r=s(78637),n=s(29231),i=s(84054);function o({initialData:e,selectedLeague:t}){let s=(0,r.useRouter)(),c=(0,r.usePathname)(),d=(0,r.useSearchParams)(),[x,h]=(0,l.useTransition)(),[m,p]=(0,l.useState)(!1),[u,g]=(0,l.useState)(""),{availableLeagues:b,dateGroups:f}=(0,l.useMemo)(()=>(0,i.o8)(e),[e]),j=(0,l.useMemo)(()=>Array.from(new Set(f.map(e=>e.date_header))),[f]),w=d.get("date")||"",v=e=>{let t=new URLSearchParams(d.toString());e&&e!==w?t.set("date",e):t.delete("date"),h(()=>{let e=t.toString();s.push(e?`${c}?${e}`:c,{scroll:!1})})},N=(0,l.useMemo)(()=>{let e=f;return w&&(e=e.filter(e=>e.date_header===w)),(0,i.kK)(e,t)},[f,w,t]),y=(0,l.useMemo)(()=>{if(!u)return b;let e=u.toLowerCase();return b.filter(t=>t.name.toLowerCase().includes(e))},[b,u]),_=N.reduce((e,t)=>e+t.matches.length,0);if(0===f.length)return(0,a.jsxs)("div",{className:"max-w-[1440px] mx-auto px-4 py-8",children:[(0,a.jsx)(n.G,{eyebrow:"Kết quả",title:"KẾT QUẢ B\xd3NG Đ\xc1"}),(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center py-16 gap-4",children:[(0,a.jsx)("div",{className:"w-12 h-12 rounded-full border-2 border-[#E11D48]/30 border-t-[#E11D48] animate-spin"}),(0,a.jsx)("span",{className:"text-slate-500 text-sm font-medium tracking-wide",children:"Đang tải kết quả..."})]})]});let k=e=>{let t=new URLSearchParams(d.toString());e?t.set("league",e):t.delete("league"),p(!1),g(""),h(()=>{let e=t.toString();s.push(e?`${c}?${e}`:c,{scroll:!1})})};return(0,a.jsxs)("div",{className:"max-w-[1440px] mx-auto px-4 py-8",children:[(0,a.jsx)(n.G,{eyebrow:"Kết quả",title:"KẾT QUẢ B\xd3NG Đ\xc1",rightSlot:(0,a.jsx)("div",{className:"text-[12px] text-slate-600",children:(0,a.jsx)("span",{className:"text-slate-900/80 font-bold",children:t||"Tất cả giải đấu"})})}),(0,a.jsxs)("div",{className:"flex flex-col md:flex-row gap-4 mb-4 items-start md:items-center justify-between",children:[j.length>0&&(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,a.jsx)("button",{type:"button",onClick:()=>v(""),className:`px-4 py-2 rounded-xl text-sm font-bold transition-all duration-300 ${!w?"bg-gradient-to-r from-[#4681E8] to-[#2563eb] text-white shadow-[0_4px_15px_rgba(70,129,232,0.4)] border border-[#4681E8]/50":"bg-white text-[#64748B] border border-slate-200 hover:bg-slate-50 hover:text-slate-800"}`,children:"Tất cả ng\xe0y"}),j.slice(0,5).map(e=>(0,a.jsx)("button",{type:"button",onClick:()=>v(e),className:`px-4 py-2 rounded-xl text-sm font-bold transition-all duration-300 ${w===e?"bg-gradient-to-r from-[#4681E8] to-[#2563eb] text-white shadow-[0_4px_15px_rgba(70,129,232,0.4)] border border-[#4681E8]/50":"bg-white text-[#64748B] border border-slate-200 hover:bg-slate-50 hover:text-slate-800"}`,children:e},e))]}),(0,a.jsxs)("div",{className:"relative w-full md:w-[320px]",children:[(0,a.jsxs)("button",{onClick:()=>p(!m),className:"w-full flex items-center gap-3 bg-white hover:bg-slate-50 px-4 py-2.5 rounded-xl border border-slate-200 shadow-inner transition-all text-sm",children:[(0,a.jsx)("svg",{className:"w-5 h-5 text-[#4681E8]",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 4a1 1 0 011-1h16a1 1 0 011 1v2.586a1 1 0 01-.293.707l-6.414 6.414a1 1 0 00-.293.707V17l-4 4v-6.586a1 1 0 00-.293-.707L3.293 7.293A1 1 0 013 6.586V4z"})}),(0,a.jsx)("span",{className:"text-slate-700 font-bold flex-1 text-left truncate",children:t||"Chọn giải đấu..."}),(0,a.jsx)("svg",{className:`w-4 h-4 text-slate-400 transition-transform ${m?"rotate-180":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),m&&(0,a.jsxs)("div",{className:"absolute top-full left-0 right-0 mt-2 bg-white border border-slate-200 rounded-2xl shadow-xl z-50 max-h-[300px] overflow-hidden flex flex-col",children:[(0,a.jsx)("div",{className:"p-2 border-b border-slate-100",children:(0,a.jsx)("input",{type:"text",placeholder:"T\xecm giải đấu...",value:u,onChange:e=>g(e.target.value),className:"w-full bg-slate-50 border border-transparent roun
128ded-xl px-4 py-2.5 text-sm text-slate-800 placeholder-slate-400 outline-none focus:border-[#4681E8]/50 transition-colors"})}),(0,a.jsxs)("div",{className:"overflow-y-auto flex-1 pb-2",children:[(0,a.jsx)("button",{type:"button",onClick:()=>k(),className:`block w-full text-left px-4 py-3 text-sm transition-colors ${!t?"bg-[#4681E8]/10 text-[#4681E8] border-l-4 border-[#4681E8]":"text-slate-600 hover:bg-slate-50 hover:text-slate-800"}`,children:"Tất cả giải đấu"}),y.map((e,s)=>(0,a.jsxs)("button",{type:"button",onClick:()=>k(e.name),className:`flex items-center gap-3 px-4 py-3 text-sm transition-colors cursor-pointer ${t===e.name?"bg-[#4681E8]/10 text-[#4681E8] border-l-4 border-[#4681E8]":"text-slate-600 hover:bg-slate-50 hover:text-slate-800"}`,children:[e.icon?(0,a.jsx)("img",{src:e.icon,alt:e.name||"League",className:"w-5 h-5 object-contain shrink-0",loading:"lazy",decoding:"async"}):(0,a.jsx)("div",{className:"w-5 h-5 rounded-md bg-slate-200 shrink-0"}),(0,a.jsx)("span",{className:"truncate",children:e.name})]},s))]})]})]})]}),x&&(0,a.jsxs)("div",{className:"mb-4 inline-flex items-center gap-2 rounded-full border border-slate-200 bg-white px-4 py-2 text-xs text-slate-500 shadow-sm",children:[(0,a.jsx)("span",{className:"h-2 w-2 rounded-full bg-[#E11D48] animate-pulse shadow-[0_0_8px_rgba(225,29,72,0.8)]"}),(0,a.jsx)("span",{className:"font-bold tracking-wide",children:"Đang tải kết quả từ server..."})]}),(0,a.jsx)("div",{className:"space-y-4",children:0===N.length?(0,a.jsx)("div",{className:"text-center py-16 text-[#64748B] font-medium tracking-wide",children:"Kh\xf4ng c\xf3 kết quả n\xe0o"}):N.map((e,t)=>(0,a.jsxs)("div",{className:"overflow-hidden rounded-2xl border border-slate-200 bg-white shadow-[0_8px_30px_rgba(0,0,0,0.06)]",children:[(0,a.jsx)("div",{className:"bg-slate-50 px-5 py-3 border-b border-slate-100 flex items-center justify-between",children:(0,a.jsxs)("span",{className:"text-[12px] text-slate-500 font-bold uppercase tracking-widest",children:[e.league_round?e.league_round:"V\xf2ng đấu",(0,a.jsx)("span",{className:"text-[#E11D48] ml-2 font-mono text-[11px] bg-[#E11D48]/10 px-2 py-0.5 rounded-full border border-[#E11D48]/20",children:e.date_header})]})}),e.matches.map((e,t)=>{var s;return(0,a.jsx)("div",{className:"bg-transparent hover:bg-slate-50 border-b border-slate-100 last:border-0 transition-colors group cursor-default",children:(0,a.jsxs)("div",{className:"flex items-center py-4 px-5 gap-4",children:[(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center min-w-[56px] shrink-0 border-r border-slate-100 pr-4",children:[(0,a.jsx)("span",{className:"text-[9px] text-slate-400 uppercase tracking-widest mb-1 font-bold",children:"L\xfac"}),(0,a.jsx)("span",{className:"text-[13px] text-slate-700 font-mono font-black",children:e.time})]}),(0,a.jsxs)("div",{className:"flex-1 flex items-center justify-end gap-3 min-w-0",children:[(0,a.jsx)("span",{className:"text-[14px] text-slate-800 font-bold truncate text-right group-hover:text-slate-900 transition-colors",children:e.home_team}),e.home_logo?(0,a.jsx)("div",{className:"w-8 h-8 rounded-full bg-slate-100 border border-slate-200 p-1 flex items-center justify-center shadow-sm",children:(0,a.jsx)("img",{src:e.home_logo,alt:e.home_team||"Home team",className:"w-full h-full object-contain",loading:"lazy"})}):(0,a.jsx)("div",{className:"w-8 h-8 rounded-full bg-slate-100 shrink-0 border border-slate-200 flex items-center justify-center text-[10px] font-bold text-slate-400",children:"?"})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center min-w-[90px] shrink-0 bg-slate-50 rounded-xl py-2 px-2 border border-slate-200 shadow-inner group-hover:border-[#4681E8]/40 transition-colors",children:[(0,a.jsx)("span",{className:`text-[22px] leading-none font-black tracking-widest drop-shadow-[0_2px_4px_rgba(0,0,0,0.8)] ${!(s=e.score)||"-"===s?"text-slate-400":"text-slate-800"}`,children:e.score}),e.ht_score&&(0,a.jsxs)("span",{className:"text-[10px] text-slate-500 font-mono mt-1 font-bold",children:["HT: ",e.ht_score]})]}),(0,a.jsxs)("div",{className:"flex-1 flex items-center gap-3 min-w-0",children:[e.away_logo?(0,a.jsx)("div",{className:"w-8 h-8 rounded-full bg-slate-100 border border-slate-200 p-1 flex items-center justify-center shadow-sm",children:(0,a.jsx)("img",{src:e.away_logo,alt:e.away_team||"Away team",className:"w-full h-full object-contain",loading:"lazy"})}):(0,a.jsx)("div",{className:"w-8 h-8 rounded-full bg-slate-100 shrink-0 border border-slate-200 flex items-center justify-center text-[10px] font-bold text-slate-400",children:"?"}),(0,a.jsx)("span",{className:"text-[14px] text-slate-800 font-bold truncate text-left group-hover:text-slate-900 transition-colors",children:e.away_team})]})]})},t)})]},t))}),(0,a.jsxs)("div",{className:"mt-6 text-center text-xs text-[#64748B] font-bold uppercase tracking-widest drop-shadow-sm",children:["Hiển thị ",_," kết quả trận đấu"]})]})}},14614:(e,t,s)=>{"use strict";s.d(t,{Klivevip18MatchDetailPage:()=>m});var a=s(68019),l=s(10707),r=s(58420);function n({src:e,poster:t,autoPlay:s=!0,onError:i,className:o=""}){let c=(0,l.useRef)(null),d=(0,l.useRef)(i);d.current=i;let[x,h]=(0,l.useState)(!1),[m,p]=(0,l.useState)(!1);return((0,l.useEffect)(()=>{let t=c.current;if(!t)return;let a=null;h(!1);let l=()=>p(!0),n=()=>p(!1);t.addEventListener("play",l),t.addEventListener("pause",n);let i=()=>{s&&(t.muted=!0,t.play().catch(()=>{}))};if(t.addEventListener("canplay",i),r.Ay.isSupported()){(a=new r.Ay({maxBufferLength:30,maxMaxBufferLength:60,lowLatencyMode:!0,enableWorker:!0})).loadSource(e),a.attachMedia(t),a.on(r.Ay.Events.MANIFEST_PARSED,()=>{s&&(t.muted=!0,t.play().catch(e=>{console.warn("AutoPlay failed:",e),t.muted=!1}))});let l=0,n=0;a.on(r.Ay.Events.ERROR,(e,t)=>
128{if(t.type===r.Ay.ErrorTypes.NETWORK_ERROR&&(++l>2||t.response&&t.response.code>=400)){console.error("HLS Network Error threshold reached (CORS/404), triggering fallback.",t),h(!0),d.current&&d.current(t),a?.destroy();return}if(t.fatal)switch(t.type){case r.Ay.ErrorTypes.NETWORK_ERROR:console.error("HLS Fatal Network Error, recovering...",t),a?.startLoad();break;case r.Ay.ErrorTypes.MEDIA_ERROR:console.error("HLS Media Error, recovering...",t),++n>3?(console.error("HLS Media Error threshold reached, triggering fallback."),h(!0),d.current&&d.current(t),a?.destroy()):a?.recoverMediaError();break;default:console.error("HLS Fatal Error:",t),h(!0),d.current&&d.current(t),a?.destroy()}})}else t.canPlayType("application/vnd.apple.mpegurl")&&(t.src=e,t.addEventListener("loadedmetadata",()=>{s&&t.play().catch(e=>{console.warn("AutoPlay failed:",e)})}),t.addEventListener("error",e=>{h(!0),d.current&&d.current(e)}));return()=>{t.removeEventListener("play",l),t.removeEventListener("pause",n),t.removeEventListener("canplay",i),a&&a.destroy()}},[e,s]),x)?i?null:(0,a.jsxs)("div",{className:`w-full h-full flex flex-col items-center justify-center bg-white/80 backdrop-blur ${o}`,children:[(0,a.jsx)("svg",{className:"w-12 h-12 text-red-500 mb-4 opacity-80",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"})}),(0,a.jsx)("div",{className:"text-slate-600 text-sm font-medium",children:"Video/Stream kh\xf4ng khả dụng hoặc bị lỗi mạng"}),(0,a.jsx)("div",{className:"text-gray-500 text-xs mt-1",children:"Vui l\xf2ng thử lại sau hoặc chọn nguồn kh\xe1c"})]}):(0,a.jsx)("div",{className:`relative group w-full h-full bg-white flex items-center justify-center overflow-hidden ${o}`,children:(0,a.jsx)("video",{ref:c,className:"w-full h-full object-contain",controls:!0,playsInline:!0,muted:s,poster:t,referrerPolicy:"no-referrer"})})}function i(e){let t=(e||"").split(/[\s-]+/).slice(0,2).map(e=>e[0]||"").join("").toUpperCase()||"??";return`data:image/svg+xml,${encodeURIComponent(`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 80 80"><rect width="80" height="80" rx="20" fill="#1a1c25"/><text x="40" y="47" font-size="20" font-family="Arial" font-weight="700" text-anchor="middle" fill="#666">${t}</text></svg>`)}`}function o({homeName:e,awayName:t,homeLogo:s,awayLogo:l,homeScore:r="0",awayScore:n="0",statusText:c="LIVE",timeText:d="",isLive:x=!0,sportId:h="1",matchId:m}){let p=s||i(e),u=l||i(t),g="5"===String(h),b="2"===String(h),f="bg-slate-200 border-slate-200",j="repeating-linear-gradient(90deg, transparent, transparent 10%, #000 10%, #000 20%)";return g?(f="bg-slate-100 border-slate-200",j="none"):b&&(f="bg-[#bc7a46] border-[#8a4e21]",j="repeating-linear-gradient(90deg, transparent, transparent 5%, #000 5%, #000 10%)"),(0,a.jsxs)("div",{className:"relative w-full aspect-video min-h-[300px] max-h-[600px] bg-slate-50 overflow-hidden flex flex-col justify-center",children:[(0,a.jsx)("div",{className:"absolute inset-0 flex items-center justify-center pointer-events-none mt-16 md:mt-24",children:(0,a.jsx)("div",{className:"relative w-[120%] h-[120%] sm:w-[90%] sm:h-[120%] max-w-[900px] flex-shrink-0 transition-transform duration-1000",style:{transform:"perspective(900px) rotateX(60deg) scale(0.9)",transformOrigin:"center center"},children:(0,a.jsxs)("div",{className:`absolute inset-0 ${f} shadow-[0_30px_60px_rgba(0,0,0,0.8)] border-4 rounded-xl overflow-hidden flex transition-colors duration-500`,children:[(0,a.jsx)("div",{className:"absolute inset-0 opacity-15 pointer-events-none",style:{backgroundImage:j}}),(0,a.jsxs)("div",{className:"absolute inset-[4%] pointer-events-none shadow-sm flex items-center justify-center",children:["1"===String(h)&&(0,a.jsxs)("div",{className:"absolute inset-0 w-full h-full border-2 border-white/60",children:[(0,a.jsx)("div",{className:"absolute left-1/2 top-0 bottom-0 w-0 border-l-2 border-white/60 -translate-x-1/2"}),(0,a.jsx)("div",{className:"absolute left-1/2 top-1/2 w-[18%] aspect-square rounded-full border-2 border-white/60 -translate-x-1/2 -translate-y-1/2"}),(0,a.jsx)("div",{className:"absolute left-1/2 top-1/2 w-2 h-2 rounded-full bg-white/80 -translate-x-1/2 -translate-y-1/2"}),(0,a.jsx)("div",{className:"absolute left-0 top-1/2 w-[16%] h-[46%] border-2 border-l-0 border-white/60 -translate-y-1/2 bg-slate-200"}),(0,a.jsx)("div",{className:"absolute left-0 top-1/2 w-[6%] h-[20%] border-2 border-l-0 border-white/60 -translate-y-1/2 bg-slate-200"}),(0,a.jsx)("div",{className:"absolute left-[16%] top-1/2 w-[8%] aspect-square border-2 border-l-0 border-white/60 rounded-r-full -translate-y-1/2 clip-path-half",style:{clipPath:"inset(0 0 0 50%)"}}),(0,a.jsx)("div",{className:"absolute right-0 top-1/2 w-[16%] h-[46%] border-2 border-r-0 border-white/60 -translate-y-1/2 bg-slate-200"}),(0,a.jsx)("div",{className:"absolute right-0 top-1/2 w-[6%] h-[20%] border-2 border-r-0 border-white/60 -translate-y-1/2 bg-slate-200"}),(0,a.jsx)("div",{className:"absolute right-[16%] top-1/2 w-[8%] aspect-square border-2 border-r-0 border-white/60 rounded-l-full -translate-y-1/2 clip-path-half",style:{clipPath:"inset(0 50% 0 0)"}})]}),g&&(0,a.jsxs)("div",{className:"absolute inset-[10%] w-[80%] h-[80%
128] border-2 border-white/80 bg-white",children:[(0,a.jsx)("div",{className:"absolute top-[10%] bottom-[10%] left-0 right-0 border-y-2 border-white/80"}),(0,a.jsx)("div",{className:"absolute left-1/2 top-[-2%] bottom-[-2%] w-1 bg-white/40 shadow-xl -translate-x-1/2 z-10"}),(0,a.jsx)("div",{className:"absolute left-[25%] right-[25%] top-[10%] bottom-[10%] border-x-2 border-white/80"}),(0,a.jsx)("div",{className:"absolute left-[25%] right-[25%] top-1/2 w-[50%] border-t-2 border-white/80 -translate-y-1/2"}),(0,a.jsx)("div",{className:"absolute left-0 top-1/2 w-[2%] border-t-2 border-white/80 -translate-y-1/2"}),(0,a.jsx)("div",{className:"absolute right-0 top-1/2 w-[2%] border-t-2 border-white/80 -translate-y-1/2"})]}),b&&(0,a.jsxs)("div",{className:"absolute inset-0 w-full h-full border-2 border-white/50",children:[(0,a.jsx)("div",{className:"absolute left-1/2 top-0 bottom-0 w-0 border-l-2 border-white/50 -translate-x-1/2"}),(0,a.jsx)("div",{className:"absolute left-1/2 top-1/2 w-[15%] aspect-square rounded-full border-2 border-white/50 -translate-x-1/2 -translate-y-1/2"}),(0,a.jsx)("div",{className:"absolute left-0 top-1/2 w-[18%] h-[35%] border-2 border-l-0 border-white/50 -translate-y-1/2 bg-[#bc7a46]"}),(0,a.jsx)("div",{className:"absolute left-[18%] top-1/2 w-[10%] aspect-square rounded-full border-2 border-white/50 -translate-y-1/2"}),(0,a.jsx)("div",{className:"absolute left-0 top-1/2 w-[30%] h-[70%] border-2 border-l-0 border-white/50 rounded-r-full -translate-y-1/2 opacity-60"}),(0,a.jsx)("div",{className:"absolute right-0 top-1/2 w-[18%] h-[35%] border-2 border-r-0 border-white/50 -translate-y-1/2 bg-[#bc7a46]"}),(0,a.jsx)("div",{className:"absolute right-0 top-1/2 w-[30%] h-[70%] border-2 border-r-0 border-white/50 rounded-l-full -translate-y-1/2 opacity-60"})]})]}),x&&(0,a.jsx)("div",{className:`absolute left-1/2 top-1/2 shadow-[0_8px_16px_rgba(0,0,0,0.8)] z-10 transition-all duration-[3000ms] border-2 border-white/20 rounded-full
129                                ${g?"w-2 h-2 sm:w-3 sm:h-3 bg-[#ccff00]":b?"w-4 h-4 sm:w-6 sm:h-6 bg-[#d95d16]":"w-4 h-4 sm:w-5 sm:h-5 bg-white"}`,style:{animation:"ballMove 8s infinite alternate ease-in-out",transform:"translate(-50%, -50%)"},children:(0,a.jsx)("div",{className:"absolute -bottom-4 left-1/2 w-4 h-2 bg-white/40 rounded-full blur-sm -translate-x-1/2"})}),x&&(0,a.jsxs)("div",{className:"absolute left-[65%] top-[60%] flex flex-col items-center animate-bounce-slow",style:{animation:"floatBubble 4s infinite alternate ease-in-out"},children:[(0,a.jsxs)("div",{className:"bg-white/95 backdrop-blur border border-white/10 rounded-2xl p-2 shadow-2xl flex items-center gap-3 w-max max-w-[200px]",children:[(0,a.jsx)("div",{className:"w-6 h-6 rounded-full flex items-center justify-center p-0.5 bg-white/5 shrink-0",children:(0,a.jsx)("img",{src:p,alt:e||"Home team",className:"max-w-full max-h-full object-contain",onError:t=>t.target.src=i(e),loading:"lazy",decoding:"async"})}),(0,a.jsx)("div",{className:"flex flex-col pr-1 overflow-hidden",children:(0,a.jsx)("span",{className:"text-slate-900 font-bold text-[10px] sm:text-xs tracking-wide truncate",children:g?"Serve / Return":"Tấn c\xf4ng nguy hiểm"})})]}),(0,a.jsx)("div",{className:"w-0 h-0 border-l-[6px] border-r-[6px] border-t-[6px] border-l-transparent border-r-transparent border-t-[#1a1c28]/95 mt-[-1px]"})]})]})})}),(0,a.jsx)("div",{className:"relative z-20 flex-1 flex flex-col items-center justify-start p-4 md:p-6 pointer-events-none w-full",children:(0,a.jsxs)("div",{className:"w-full max-w-[800px] flex items-center justify-between px-4 sm:px-6 py-3 rounded-xl bg-gradient-to-r from-[#0d0f14]/90 via-[#151821]/95 to-[#0d0f14]/90 backdrop-blur-xl border border-white/10 shadow-[0_10px_40px_rgba(0,0,0,0.8)] pointer-events-auto",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 flex-1 min-w-0 pr-2",children:[(0,a.jsx)("img",{src:p,alt:e,className:"w-8 h-8 md:w-12 md:h-12 object-contain drop-shadow-lg shrink-0",onError:t=>t.target.src=i(e),loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-slate-900 text-xs sm:text-sm md:text-base font-bold truncate tracking-wide",children:e})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1 shrink-0 px-2 sm:px-6 min-w-[100px]",children:[(0,a.jsxs)("span",{className:`inline-flex items-center gap-1.5 px-2.5 py-0.5 rounded-full text-[10px] sm:text-xs font-bold shadow-inner ${x?"bg-green-500/10 text-green-400 border border-green-500/20":"bg-white/5 text-slate-900/40"}`,children:[x&&(0,a.jsx)("span",{className:"w-1.5 h-1.5 rounded-full bg-green-500 animate-pulse shadow-[0_0_8px_#22c55e]"}),d||c]}),(0,a.jsxs)("div",{className:"flex gap-3 sm:gap-5 items-center justify-center",children:[(0,a.jsx)("span",{className:"text-slate-900 text-2xl sm:text-4xl font-black drop-shadow-md",children:r}),(0,a.jsx)("span",{className:"text-slate-900/30 text-xl font-light",children:"-"}),(0,a.jsx)("span",{className:"text-slate-900 text-2xl sm:text-4xl font-black drop-shadow-md",children:n})]})]}),(0,a.jsxs)("div",{className:"flex items-center justify-end gap-3 flex-1 min-w-0 pl-2 text-right",children:[(0,a.jsx)("span",{className:"text-slate-900 text-xs sm:text-sm md:text-base font-bold truncate tracking-wide",children:t}),(0,a.jsx)("img",{src:u,alt:t,className:"w-8 h-8 md:w-12 md:h-12 object-contain drop-shadow-lg shrink-0",onError:e=>e.target.src=i(t),loading:"lazy",decoding:"async"})]})]})}),(0,a.jsx)("div",{className:"relative z-20 mt-auto w-full p-4 flex justify-center pointer-events-none",children:(0,a.jsx)("div",{className:"w-full max-w-[600px] h-6 bg-white/40 backdrop-blur-md rounded-full border border-white/5 flex items-center px-4",children:(0,a.jsxs)("div",{className:"flex-1 h-0.5 bg-white/10 relative rounded-full",children:[x&&(0,a.jsx)("div",{className:"absolute left-0 top-0 bottom-0 bg-gradient-to-r from-[#b38b22] to-[#ffda6a] w-[65%] rounded-full opacity-90 shadow-[0_0_12px_#daa520]"}),(0,a.jsx)("span",{className:"absolute left-[65%] top-1/2 -translate-y-1/2 -translate-x-1/2 w-1.5 h-1.5 rounded-full bg-white shadow-md"})]})})}),(0,a.jsx)("style",{children:`
130                @keyframes ballMove {
131                    0% { transform: translate(-30%, -20%) scale(1); }
132                    25% { transform: translate(40%, -10%) scale(1.1); }
133                    50% { transform: translate(20%, 30%) scale(0.9); }
134                    75% { transform: translate(-10%, 15%) scale(1.2); }
135                    100% { transform: translate(-45%, 0%) scale(1); }
136                }
137                @keyframes floatBubble {
138                    0% { transform: translateY(0px) translateX(0px); }
139                    50% { transform: translateY(-8px) translateX(4px); }
140                    100% { transform: translateY(4px) translateX(-4px); }
141                }
142            `})]})}function c(e,t){if("1"===t||"2"===t)switch(e){case"2":return{t:"HT 1",live:!0,sc:!0};case"3":return{t:"Giữa giờ",live:!0,sc:!0};case"4":return{t:"HT 2",live:!0,sc:!0};case"5":return{t:"Hiệp phụ",live:!0,sc:!0};case"7":return{t:"Penalty",live:!0,sc:!0};case"8":case"9":return{t:"Kết th\xfac",live:!1,sc:!0};default:return{t:"Chưa bắt đầu",live:!1,sc:!1}}
142return["51","52","53","54","55"].includes(e)?{t:`Set ${e-50}`,live:!0,sc:!0}:["100","90","110"].includes(e)?{t:"KT",live:!1,sc:!0}:"0"===e||"1"===e?{t:"Chưa bắt đầu",live:!1,sc:!1}:{t:"LIVE",live:!0,sc:!0}}function d(e){let t=(e||"").split(/[\s-]+/).slice(0,2).map(e=>e[0]||"").join("").toUpperCase()||"??";return`data:image/svg+xml,${encodeURIComponent(`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 80 80"><rect width="80" height="80" rx="20" fill="#1a1c25"/><text x="40" y="47" font-size="20" font-family="Arial" font-weight="700" text-anchor="middle" fill="#666">${t}</text></svg>`)}`}function x(e){let t=new Date(1e3*parseInt(e||"0",10));return{hm:t.toLocaleTimeString("vi-VN",{hour:"2-digit",minute:"2-digit",timeZone:"Asia/Ho_Chi_Minh"}),dm:t.toLocaleDateString("vi-VN",{day:"2-digit",month:"2-digit",timeZone:"Asia/Ho_Chi_Minh"}),full:t.toLocaleDateString("vi-VN",{day:"2-digit",month:"2-digit",year:"numeric",timeZone:"Asia/Ho_Chi_Minh"})}}let h="max-w-[1200px]";function m({matchData:e,relatedMatches:t,matchDetails:s,standings:r,brandingNameUpper:i}){let p,u,g,j,v,y,[C,S]=(0,l.useState)("odds"),L=e?.match_data?.anchors||[],[$,F]=(0,l.useState)(!1),[T,A]=(0,l.useState)(!1),[M,H]=(0,l.useState)(null),[D,B]=(0,l.useState)(!1),z=(0,l.useRef)(0);(0,l.useEffect)(()=>{if(!e?.has_live||"1"!==e.has_live||0===L.length)return;let t=!1;B(!0);let s=async t=>{let s=t?.uid,a=`/api/socolive/proxy-stream?url=${encodeURIComponent(`https://live.inplyr.com/${s?`room/${s}`:`default/${e.id}`}.m3u8`)}`;try{let e=await fetch(a,{method:"GET",cache:"no-store"});if(!e.ok)return null;let s=(await e.text()).split("\n").filter(e=>e.trim()&&!e.startsWith("#"));if(0===s.length)return null;return(await fetch(s[0],{method:"HEAD",cache:"no-store"})).ok?t:null}catch{return null}};return Promise.all(L.map(e=>s(e))).then(e=>{if(t)return;let s=e.find(e=>null!==e);s?(H(s),F(!0),A(!1)):(H(L[0]),A(!0)),B(!1)}),()=>{t=!0}},[e?.has_live,L.length]),(0,l.useEffect)(()=>{if(!T||D||z.current>=20)return;let t=setTimeout(()=>{z.current++,A(!1),B(!0);let t=async t=>{let s=t?.uid,a=`/api/socolive/proxy-stream?url=${encodeURIComponent(`https://live.inplyr.com/${s?`room/${s}`:`default/${e.id}`}.m3u8`)}`;try{let e=await fetch(a,{method:"GET",cache:"no-store"});if(!e.ok)return null;let s=(await e.text()).split("\n").filter(e=>e.trim()&&!e.startsWith("#"));if(0===s.length)return null;return(await fetch(s[0],{method:"HEAD",cache:"no-store"})).ok?t:null}catch{return null}};Promise.all(L.map(e=>t(e))).then(e=>{let t=e.find(e=>null!==e);t?(H(t),F(!0),A(!1)):A(!0),B(!1)})},15e3);return()=>clearTimeout(t)},[T,D]);let[I,R]=(0,l.useState)(null),U=e?.post_name||e?.ls_id||e?.id;if(window.location.origin,(0,l.useEffect)(()=>{if(!U)return;let e=setInterval(async()=>{try{let e=await fetch(`/api/klivevip/match/${U}`,{cache:"no-store"});if(e.ok){let t=await e.json();R(t?.match??null)}}catch{}},1e4);return()=>clearInterval(e)},[U]),!e)return(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center py-32 gap-4",children:[(0,a.jsx)("span",{className:"text-[#64748B] text-lg",children:"Kh\xf4ng t\xecm thấy trận đấu"}),(0,a.jsx)("a",{href:"/",className:"text-[#4681E8] hover:underline text-sm",children:"← Quay lại"})]});let G=I?{...e,...I}:e,P=G?.has_live==="1"&&L.length>0,K=c(G.status_id,G.sport_id),V=$&&M&&!T&&!D,W=P&&(D||T&&K.live&&z.current<20),O=!P||T&&!W&&!D,q=!K.live&&"8"!==String(G.status_id)&&"9"!==String(G.status_id),{hm:X,full:Y}=x(G.time),Z=G.source_card_meta?.league_label||G.match_data?.competition_vi||G.match_data?.competition_full||"",Q=G.match_data?.stage_label||G.source_card_meta?.stage_label||"",J=G.home_logo||d(G.home_name),ee=G.away_logo||d(G.away_name),et=e=>t=>{t.target.src=d(e)};return(0,a.jsxs)("div",{className:"w-full bg-white min-h-screen text-slate-600 font-sans pb-16",children:[(0,a.jsx)("div",{className:"w-full border-b border-slate-200 bg-white",children:(0,a.jsxs)("div",{className:`${h} mx-auto px-4 py-3 flex items-center justify-between`,children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 text-[13px] font-bold",children:[(0,a.jsx)("span",{className:"text-[#4681E8] uppercase tracking-wide",children:Z}),Q&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"text-slate-300",children:"•"}),(0,a.jsx)("span",{className:"text-slate-600",children:Q})]})]}),(0,a.jsx)("div",{className:"text-[12px] font-mono text-slate-400 hidden sm:block",children:Y})]})}),(0,a.jsxs)("div",{className:`${h} mx-auto px-0 md:px-4 py-0 md:py-6 flex flex-col lg:flex-row gap-4 lg:gap-6`,children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0 flex flex-col gap-4 lg:gap-6",children:[(0,a.jsxs)("div",{className:"w-full relative bg-[#000000] rounded-none md:rounded-2xl overflow-hidden shadow-[0_10px_40px_rgba(0,0,0,0.5)] border-y md:border border-slate-200",children:[(0,a.jsx)("div",{className:"relative w-full aspect-video bg-[#000000] group z-10",children:V?(0,a.jsx)(n,{src:`/api/klivevip/proxy-stream?url=${encodeURIComponent(`https://live.inplyr.com/${M?.uid&&"default"!==M.uid?`room/${M.uid}`:`default/${G.id}`}.m3u8`)}`,autoPlay:!0,onError:()=>A(!0)}):O?(0,a.jsx)(o,{homeName:G.home_name,awayName:G.away_name,homeLogo:G.home_logo,awayLogo:G.away_logo,homeScore:K.sc?G.home_score:"0",awayScore:K.sc?G.away_score:"0",statusText:K.t,timeText:G.time_text||X,isLive:K.live,sportId:G.sport_id,matchId:G.ls_id||G.id,kickoffMs:1e3*Number(G?.time||0),isPreMatch:q}):(0,a.jsxs)("div",{className:"absolute inset-0 z-10 flex flex-col items-center justify-center p-4 lg:p-10",children:[(0,a.jsxs)("div",{className:"absolute inset-0 flex justify-between items-center opacity-[0.03] pointer-events-none px-4 lg:px-20 overflow-hidden",children:[(0,a.jsx)("img",{src:J,alt:"",className:"w-1/2 max-w-[400px] blur-[10px]",loading:"lazy",decoding:"async"}),(0,a.jsx)("img",{src:ee,alt:"",className:"w-1/2 max-w-[400px] blur-[10px]",loading:"lazy",decoding:"async"})]}),P&&!T&&(0,a.jsx)("button",{onClick:()=>F(!0),className:"group mb-4 sm:mb-8 w-16 h-16 md:w-20 md:h-20 rounded-full bg-[#4681E8] flex items-center justify-center hover:bg-[#55CAF1] transition-all shadow-[0_0_30px_rgba(70,129,232,0.5)] curs
142or-pointer z-20",children:(0,a.jsx)("svg",{className:"w-8 h-8 md:w-10 md:h-10 text-white ml-1.5 md:ml-2 group-hover:scale-110 transition-transform",viewBox:"0 0 24 24",fill:"currentColor",children:(0,a.jsx)("path",{d:"M8 5v14l11-7z"})})}),(0,a.jsxs)("div",{className:"grid grid-cols-[1fr_auto_1fr] items-center w-full max-w-[800px] gap-2 lg:gap-8 z-20",children:[(0,a.jsxs)("div",{className:"flex flex-col items-center gap-2 lg:gap-4",children:[(0,a.jsx)("img",{src:J,alt:G.home_name,className:"w-16 h-16 sm:w-24 sm:h-24 lg:w-32 lg:h-32 object-contain drop-shadow-[0_10px_20px_rgba(0,0,0,0.8)]",onError:et(G.home_name),loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-[#FFFFFF] text-xs sm:text-base lg:text-lg font-black text-center line-clamp-2 uppercase tracking-wide",children:G.home_name})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-2 lg:gap-3",children:[K.sc?(0,a.jsxs)("div",{className:"flex items-center gap-3 lg:gap-6 bg-white/90 backdrop-blur-md px-4 py-2 lg:px-8 lg:py-4 rounded-2xl border border-slate-200 shadow-2xl",children:[(0,a.jsx)("span",{className:"text-[#4681E8] text-[32px] sm:text-[48px] lg:text-[64px] font-black leading-none",children:G.home_score}),(0,a.jsx)("span",{className:"text-slate-300 text-[20px] lg:text-[28px] font-light",children:":"}),(0,a.jsx)("span",{className:"text-[#4681E8] text-[32px] sm:text-[48px] lg:text-[64px] font-black leading-none",children:G.away_score})]}):(0,a.jsx)("div",{className:"text-[#FFFFFF] text-[32px] sm:text-[48px] lg:text-[56px] font-black tracking-widest leading-none drop-shadow-xl",children:X}),(0,a.jsxs)("span",{className:`inline-flex items-center gap-2 rounded-full px-3 py-1 lg:px-5 lg:py-1.5 text-[10px] lg:text-[12px] font-bold tracking-widest uppercase ${K.live?"bg-[#4681E8] text-white shadow-[0_0_20px_rgba(70,129,232,0.6)]":"bg-white text-slate-600 border border-slate-200"}`,children:[K.live&&(0,a.jsx)("span",{className:"w-2 h-2 rounded-full bg-white animate-pulse"}),K.t,G.time_text?` : ${G.time_text}`:""]})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-2 lg:gap-4",children:[(0,a.jsx)("img",{src:ee,alt:G.away_name,className:"w-16 h-16 sm:w-24 sm:h-24 lg:w-32 lg:h-32 object-contain drop-shadow-[0_10px_20px_rgba(0,0,0,0.8)]",onError:et(G.away_name),loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-[#FFFFFF] text-xs sm:text-base lg:text-lg font-black text-center line-clamp-2 uppercase tracking-wide",children:G.away_name})]})]})]})}),L.length>0&&(0,a.jsxs)("div",{className:"w-full bg-white border-t border-slate-200 px-3 lg:px-6 py-2.5 lg:py-4 flex items-center gap-2 lg:gap-4 overflow-x-auto z-20",children:[(0,a.jsx)("span",{className:"text-[10px] lg:text-[11px] text-slate-600 uppercase font-bold tracking-widest shrink-0 mr-1 lg:mr-2",children:"CHỌN K\xcaNH TRUYỀN:"}),L.map((e,t)=>(0,a.jsxs)("button",{onClick:()=>{H(e),F(!0),A(!1)},className:`shrink-0 flex items-center gap-1.5 lg:gap-2 rounded-full px-3 py-1.5 lg:px-5 lg:py-2 text-[11px] lg:text-[13px] font-bold transition-all ${M?.uid===e.uid&&!T?"bg-[#4681E8]/10 border border-[#4681E8] text-[#4681E8] shadow-[0_0_15px_rgba(70,129,232,0.2)]":"bg-white border border-slate-200 text-slate-600 hover:text-[#4681E8] hover:border-[#4681E8]/50"}`,children:[(0,a.jsx)("span",{className:`w-1.5 h-1.5 lg:w-2 lg:h-2 rounded-full ${M?.uid===e.uid&&!T?"bg-[#4681E8] animate-pulse":"bg-transparent"}`}),"BLV ",e.nickName||`K\xeanh ${t+1}`]},e.uid||t))]})]}),(p=(()=>{let e=s?.stats;if(!e)return!1;let t=null;return Array.isArray(e)&&e.length>0?t=e[0]:e?.results?.[0]?t=e.results[0]:e?.stats_full_time&&(t=e),!!t&&!!(t.stats_full_time?.length>0||t.stats_haft_time?.length>0||t.stats_half_time?.length>0||t.stats?.length>0)})(),u=!!(s?.lineup&&(Array.isArray(s.lineup)?s.lineup.length>0:s.lineup.home||s.lineup.away)),g=!!(s?.events&&(Array.isArray(s.events)?s.events.length>0:s.events.incidents?.length>0||s.events.data?.length>0)),j=!!(r&&(Array.isArray(r)?r.length>0:r.data?.length>0)),(y=(v=[{id:"stats",label:"THỐNG K\xca",show:p},{id:"lineup",label:"ĐỘI H\xccNH",show:u},{id:"events",label:"DIỄN BIẾN",show:g},{id:"standings",label:"BẢNG XH",show:j},{id:"odds",label:"TỶ LỆ K\xc8O",show:!!(s?.odds&&Array.isArray(s.odds)&&s.odds.length>0)}].filter(e=>e.show)).find(e=>e.id===C)?C:v[0]?.id||"odds")!==C&&setTimeout(()=>S(y),0),v.length>0?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"bg-white rounded-2xl p-2 border border-slate-200 flex overflow-x-auto gap-2 shadow-[0_4px_15px_rgba(0,0,0,0.08)] mx-4 md:mx-0",children:v.map(({id:e,label:t})=>(0,a.jsx)("button",{onClick:()=>S(e),className:`flex-1 min-w-[100px] py-2.5 sm:py-3 text-[10px] sm:text-[12px] font-black uppercase tracking-widest rounded-xl transition-all ${y===e?"bg-[#4681E8]/10 text-[#4681E8] border border-[#4681E8]/30 shadow-inner":"text-slate-500 hover:text-[#4681E8] hover:bg-[#4681E8]/5 border border-transparent"}`,children:t},e))}),(0,a.jsxs)("div",{className:"bg-white rounded-2xl border border-slate-200 overflow-hidden shadow-[0_4px_15px_rgba(0,0,0,0.08)] min-h-[400px] mx-4 md:mx-0",children:["stats"===y&&(0,a.jsx)(b,{matchDetails:s}),"lineup"===y&&(0,a.jsx)(f,{matchDetails:s}),"events"===y&&(0,a.jsx)(_,{events:s?.events}),"standings"===y&&(0,a.jsx)(k,{standings:r}),"odds"===y&&(0,a.jsx)(E,{odds:s?.odds})]})]}):null),t.length>0&&(0,a.jsxs)("div",{className:"mt-4 mx-4 md:mx-0",children:[(0,a.jsxs)("h2",{className:"px-1 py-4 text-sm sm:text-base font-black text-slate-800 uppercase flex items-center gap-3 tracking-widest border-b border-slate-100 mb-4",children:[(0,a.jsx)("span",{className:"w-1 h-5 bg-[#4681E8] rounded-sm shadow-[0_0_8px_#4681E8]"}),"TRẬN ĐẤU C\xd9NG GIẢI"]}),(0,a.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3 sm:gap-4",children:t.slice(0,4).map(e=>(0,a.jsx)(w,{m:e},e.id))})]})]}),(0,a.jsx)("div",{className:"w-full lg:w-[350px] xl:w-[400px] shrink-0 px-4 md:px-0",children:(0,a.jsxs)("div",{className:"bg-white border border-slate-200 rounded-2xl overflow-hidden flex flex-col shadow-[0_10px_30px_rgba(0,0,0,0.1)] lg:sticky lg:top-8 h-[600px] lg:h-[c
142alc(100vh-100px)] lg:max-h-[850px]",children:[(0,a.jsxs)("div",{className:"px-5 py-4 border-b border-slate-200 flex items-center justify-between bg-white",children:[(0,a.jsxs)("h3",{className:"text-slate-800 text-sm font-black uppercase tracking-widest flex items-center gap-2",children:[(0,a.jsx)("span",{className:"w-2.5 h-2.5 rounded-full bg-[#4681E8] shadow-[0_0_10px_rgba(70,129,232,0.4)]"}),"PH\xd2NG CHAT"]}),(0,a.jsxs)("span",{className:"text-[10px] bg-white px-3 py-1.5 rounded-full text-[#4681E8] font-mono border border-[#4681E8]/30 shadow-inner tracking-widest flex items-center gap-1.5",children:[(0,a.jsx)("svg",{className:"w-3 h-3",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 10l4.553-2.276A1 1 0 0121 8.618v6.764a1 1 0 01-1.447.894L15 14M5 18h8a2 2 0 002-2V8a2 2 0 00-2-2H5a2 2 0 00-2 2v8a2 2 0 002 2z"})}),L.length," BLV"]})]}),(0,a.jsx)("div",{className:"flex-1 bg-[#FFFFFF]/40 min-h-0 chat-container-wrapper",children:(0,a.jsx)(N,{anchors:L,selectedAnchor:M})})]})})]})]})}let p={25:"KIỂM SO\xc1T B\xd3NG",24:"CHUYỀN CH\xcdNH X\xc1C",23:"TỔNG SỐ ĐƯỜNG CHUYỀN",22:"TẤN C\xd4NG",21:"T.C\xd4NG NGUY HIỂM",2:"S\xdaT TR\xdaNG Đ\xcdCH",37:"PHẠT G\xd3C",28:"N\xc9M BI\xcaN",8:"VIỆT VỊ",3:"THẺ V\xc0NG",4:"THẺ ĐỎ",5:"S\xdaT PENALTY",29:"PHẠM LỖI",26:"Đ\xc1NH ĐẦU",27:"CỨU THUA",1:"B\xc0N THẮNG",7:"PHẢN LƯỚI"},u=[25,21,22,24,2,23,4,3,37,28,8,5,29],g="https://cdn.sportdb.live/upload/team/";function b({matchDetails:e}){let[t,s]=(0,l.useState)("full"),r=e?.stats,n=e?.lineup,i=n?.match?.home_team,o=n?.match?.away_team,c=null;Array.isArray(r)&&r.length>0?c=r[0]:r?.results?.[0]?c=r.results[0]:r?.stats_full_time&&(c=r);let d={full:c?.stats_full_time||[],h1:c?.stats_haft_time||c?.stats_half_time||[],h2:c?.stats_haft_time_2nd_half||[]}[t]||[];if(!c||0===d.length)return(0,a.jsx)(j,{text:"Thống k\xea sẽ được cập nhật khi trận đấu bắt đầu"});let x=[...d].sort((e,t)=>{let s=u.indexOf(e.type),a=u.indexOf(t.type);return(-1===s?999:s)-(-1===a?999:a)});return(0,a.jsxs)("div",{className:"flex flex-col",children:[(i||o)&&(0,a.jsxs)("div",{className:"flex items-center justify-between px-4 py-3 border-b border-slate-100",children:[(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5 w-20",children:[i?.logo&&(0,a.jsx)("img",{src:g+i.logo,alt:i?.name||"Home team",className:"w-8 h-8 object-contain",onError:e=>e.target.style.display="none",loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-slate-600 text-[10px] font-medium text-center leading-tight",children:i?.name||""})]}),(0,a.jsx)("div",{className:"flex gap-1",children:[{k:"h1",l:"Hiệp 1"},{k:"h2",l:"Hiệp 2"},{k:"full",l:"Cả trận"}].map(({k:e,l})=>(0,a.jsx)("button",{onClick:()=>s(e),className:`px-2.5 py-1 text-[10px] font-bold rounded transition-all ${t===e?"bg-[#E11D48] text-white":"text-slate-400 hover:text-slate-600 bg-slate-100"}`,children:l},e))}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5 w-20",children:[o?.logo&&(0,a.jsx)("img",{src:g+o.logo,alt:o?.name||"Away team",className:"w-8 h-8 object-contain",onError:e=>e.target.style.display="none",loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-slate-600 text-[10px] font-medium text-center leading-tight",children:o?.name||""})]})]}),(0,a.jsx)("div",{className:"px-4 py-3 space-y-3",children:x.map(e=>{let t=p[e.type]||`Stat ${e.type}`,s=e.home,l=e.away,r=24===e.type||25===e.type,n=s+l,i=0===n?50:s/n*100,o=s>l,c=l>s;return(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"flex justify-between items-center mb-1.5",children:[(0,a.jsxs)("span",{className:`text-xs font-bold w-10 tabular-nums ${o?"text-slate-800":"text-slate-400"}`,children:[s,r?"%":""]}),(0,a.jsx)("span",{className:"text-slate-400 text-[10px] font-semibold tracking-wide uppercase",children:t}),(0,a.jsxs)("span",{className:`text-xs font-bold w-10 text-right tabular-nums ${c?"text-slate-800":"text-slate-400"}`,children:[l,r?"%":""]})]}),(0,a.jsxs)("div",{className:"flex gap-0.5 h-[5px]",children:[(0,a.jsx)("div",{className:"flex-1 rounded-l-full bg-white/[0.06] overflow-hidden flex justify-end",children:(0,a.jsx)("div",{className:`rounded-l-full transition-all duration-500 ${o?"bg-gradient-to-r from-[#E11D48]/60 to-[#E11D48]":"bg-gradient-to-r from-white/10 to-white/20"}`,style:{width:`${i}%`}})}),(0,a.jsx)("div",{className:"flex-1 rounded-r-full bg-white/[0.06] overflow-hidden",children:(0,a.jsx)("div",{className:`rounded-r-full transition-all duration-500 ${c?"bg-gradient-to-l from-[#E11D48]/60 to-[#E11D48]":"bg-gradient-to-l from-white/10 to-white/20"}`,style:{width:`${100-i}%`}})})]})]},e.type)})})]})}
142function f({matchDetails:e}){let[t,s]=(0,l.useState)("pitch"),r=e?.lineup,n=r?.lineup||r,i=n?.home||[],o=n?.away||[],c=r?.home_formation||"",d=r?.away_formation||"",x=r?.match?.home_team,h=r?.match?.away_team;if(0===i.length&&0===o.length)return(0,a.jsx)(j,{text:"Đội h\xecnh sẽ được c\xf4ng bố trước trận đấu 30 ph\xfat"});let m=e=>e.filter(e=>1===e.first),p=e=>e.filter(e=>1!==e.first),u=m(i),g=m(o),b=p(i),w=p(o);return(0,a.jsxs)("div",{className:"flex flex-col",children:[(0,a.jsxs)("div",{className:"flex items-center justify-center gap-1 px-3 py-2 border-b border-slate-100",children:[(0,a.jsx)("button",{onClick:()=>s("pitch"),className:`px-3 py-1.5 text-[10px] font-bold rounded transition-all ${"pitch"===t?"bg-[#E11D48] text-white":"text-slate-400 bg-slate-100"}`,children:"Đội h\xecnh xuất ph\xe1t"}),(0,a.jsx)("button",{onClick:()=>s("list"),className:`px-3 py-1.5 text-[10px] font-bold rounded transition-all ${"list"===t?"bg-[#E11D48] text-white":"text-slate-400 bg-slate-100"}`,children:"Đội h\xecnh dá»± bị"})]}),"pitch"===t?(0,a.jsx)("div",{className:"relative w-full",style:{aspectRatio:"68/105"},children:(0,a.jsxs)("div",{className:"absolute inset-0 bg-gradient-to-b from-[#1a5c2a] via-[#1e6b31] to-[#1a5c2a] rounded-2xl overflow-hidden",children:[(0,a.jsxs)("div",{className:"absolute inset-[3%] border border-white/20 rounded-lg",children:[(0,a.jsx)("div",{className:"absolute left-0 right-0 top-1/2 h-px bg-white/20"}),(0,a.jsx)("div",{className:"absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 w-[22%] aspect-square rounded-full border border-white/20"}),(0,a.jsx)("div",{className:"absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 w-1.5 h-1.5 bg-white/30 rounded-full"}),(0,a.jsx)("div",{className:"absolute top-0 left-1/2 -translate-x-1/2 w-[55%] h-[16%] border-l border-r border-white/20"}),(0,a.jsx)("div",{className:"absolute top-0 left-1/2 -translate-x-1/2 w-[25%] h-[6%] border-l border-r border-white/20"}),(0,a.jsx)("div",{className:"absolute bottom-0 left-1/2 -translate-x-1/2 w-[55%] h-[16%] border-t border-l border-r border-white/20"}),(0,a.jsx)("div",{className:"absolute bottom-0 left-1/2 -translate-x-1/2 w-[25%] h-[6%] border-t border-l border-r border-white/20"})]}),(0,a.jsx)("div",{className:"absolute top-1 left-2 text-[9px] text-[#F8FAFC]/50 font-bold z-10",children:x?.name||""}),(0,a.jsx)("div",{className:"absolute top-1 right-2 text-[9px] text-[#E11D48]/70 font-bold z-10",children:c}),(0,a.jsx)("div",{className:"absolute bottom-1 left-2 text-[9px] text-[#F8FAFC]/50 font-bold z-10",children:h?.name||""}),(0,a.jsx)("div",{className:"absolute bottom-1 right-2 text-[9px] text-[#E11D48]/70 font-bold z-10",children:d}),u.map((e,t)=>{let s=`${e.x||50}%`,l=`${(e.y||10)/2}%`,r="G"===e.position;return(0,a.jsxs)("div",{className:"absolute flex flex-col items-center z-10 -translate-x-1/2 -translate-y-1/2",style:{left:s,top:l},children:[(0,a.jsx)("div",{className:`w-6 h-6 rounded-full flex items-center justify-center text-[9px] font-black ${r?"bg-yellow-400 text-black":"bg-blue-600 text-[#F8FAFC]"} shadow-md border border-white/20`,children:e.shirt_number||""}),(0,a.jsx)("span",{className:"text-[7px] text-[#F8FAFC] font-semibold mt-0.5 text-center max-w-[48px] truncate drop-shadow-[0_1px_2px_rgba(0,0,0,0.8)]",children:(e.name||"").split(" ").slice(-2).join(" ")}),1===e.captain&&(0,a.jsx)("span",{className:"absolute -top-1 -right-1 text-[6px] text-yellow-400",children:"C"})]},`h-${t}`)}),g.map((e,t)=>{let s=`${100-(e.x||50)}%`,l=`${100-(e.y||10)/2}%`,r="G"===e.position;return(0,a.jsxs)("div",{className:"absolute flex flex-col items-center z-10 -translate-x-1/2 -translate-y-1/2",style:{left:s,top:l},children:[(0,a.jsx)("div",{className:`w-6 h-6 rounded-full flex items-center justify-center text-[9px] font-black ${r?"bg-yellow-400 text-black":"bg-orange-500 text-[#F8FAFC]"} shadow-md border border-white/20`,children:e.shirt_number||""}),(0,a.jsx)("span",{className:"text-[7px] text-[#F8FAFC] font-semibold mt-0.5 text-center max-w-[48px] truncate drop-shadow-[0_1px_2px_rgba(0,0,0,0.8)]",children:(e.name||"").split(" ").slice(-2).join(" ")}),1===e.captain&&(0,a.jsx)("span",{className:"absolute -top-1 -right-1 text-[6px] text-yellow-400",children:"C"})]},`a-${t}`)})]})}):(0,a.jsxs)("div",{className:"px-3 py-2 text-xs",children:[(0,a.jsxs)("div",{className:"flex justify-between font-bold text-slate-400 mb-1 uppercase tracking-wider text-[9px] px-1",children:[(0,a.jsx)("span",{children:"Đội chá»
142§ nh\xe0"}),(0,a.jsx)("span",{children:"Đội kh\xe1ch"})]}),Array.from({length:Math.max(b.length,w.length)}).map((e,t)=>{let s=b[t],l=w[t];return(0,a.jsxs)("div",{className:"flex justify-between items-center border-b border-slate-50 py-1.5",children:[(0,a.jsx)("div",{className:"flex items-center gap-1.5 w-1/2 min-w-0",children:s&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"text-[#E11D48] font-bold w-5 text-center shrink-0 text-[10px]",children:s.shirt_number||""}),(0,a.jsx)("span",{className:"text-slate-700 truncate text-[11px]",children:s.name||""})]})}),(0,a.jsx)("div",{className:"flex items-center gap-1.5 w-1/2 justify-end min-w-0",children:l&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"text-slate-700 truncate text-[11px] text-right",children:l.name||""}),(0,a.jsx)("span",{className:"text-[#E11D48] font-bold w-5 text-center shrink-0 text-[10px]",children:l.shirt_number||""})]})})]},t)})]})]})}function j({text:e}){return(0,a.jsx)("div",{className:"flex items-center justify-center py-10 text-slate-400 text-sm text-center",children:e})}function w({m:e}){let t=c(e.status_id,e.sport_id),{hm:s,dm:l}=x(e.time),r=e.source_card_meta?.league_label||e.match_data?.competition_vi||"";return(0,a.jsxs)("a",{href:`/match/${encodeURIComponent(e.post_name||e.id)}`,className:"flex items-center gap-3 rounded-2xl bg-white hover:bg-slate-50 border border-slate-100 hover:border-[#4681E8]/30 p-3 transition-all group",children:[(0,a.jsxs)("div",{className:"shrink-0 w-14 text-center",children:[(0,a.jsx)("div",{className:"text-[#E11D48] text-[11px] font-bold",children:s}),(0,a.jsx)("div",{className:"text-slate-400 text-[9px]",children:l})]}),(0,a.jsx)("div",{className:"w-px h-9 bg-slate-200 shrink-0"}),(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("div",{className:"text-slate-400 text-[9px] truncate mb-1",children:r}),(0,a.jsxs)("div",{className:"flex items-center gap-2 mb-0.5",children:[(0,a.jsx)("img",{src:e.home_logo||d(e.home_name),alt:e.home_name,className:"w-4 h-4 object-contain shrink-0",onError:t=>t.target.src=d(e.home_name),loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-slate-600 text-[12px] font-medium truncate",children:e.home_name})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("img",{src:e.away_logo||d(e.away_name),alt:e.away_name,className:"w-4 h-4 object-contain shrink-0",onError:t=>t.target.src=d(e.away_name),loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-slate-600 text-[12px] font-medium truncate",children:e.away_name})]})]}),t.sc?(0,a.jsxs)("span",{className:"text-slate-800 font-bold text-[14px] tabular-nums shrink-0",children:[e.home_score,"-",e.away_score]}):(0,a.jsx)("span",{className:"text-[10px] font-bold text-[#E11D48] bg-[#E11D48]/10 rounded px-2.5 py-1 group-hover:bg-[#E11D48]/15 transition shrink-0",children:"XEM NGAY"})]})}let v={0:{bg:"bg-white/10",text:"text-[#F8FAFC]/40",nameCls:"text-[#94A3B8]"},1:{bg:"bg-white/10",text:"text-[#F8FAFC]/50",nameCls:"text-[#94A3B8]"},2:{bg:"bg-green-900/50",text:"text-green-400",nameCls:"text-green-400"},3:{bg:"bg-yellow-900/40",text:"text-yellow-400",nameCls:"text-emerald-600 font-bold"},4:{bg:"bg-blue-900/40",text:"text-blue-400",nameCls:"text-blue-400 font-bold"},5:{bg:"bg-red-900/40",text:"text-red-400",nameCls:"text-red-400 font-bold"}};function N({anchors:e,selectedAnchor:t}){let[s,r]=(0,l.useState)([]),[n,i]=(0,l.useState)(!1),o=(0,l.useRef)(null),c=(0,l.useRef)(null),d=t?.roomNum;return(0,l.useEffect)(()=>{if(!d)return;r([]),i(!1);let e=new EventSource(`/api/chat/${d}`);return e.onopen=()=>i(!0),e.onmessage=e=>{try{let t=JSON.parse(e.data);if("connected"===t.type)return void i(!0);if("history"===t.type&&Array.isArray(t.messages))return void r(e=>[...t.messages,...e].slice(-200));t.user&&t.text&&r(e=>[...e,t].slice(-200))}catch{}},e.onerror=()=>i(!1),()=>{e.close(),i(!1)}},[d]),(0,l.useEffect)(()=>{requestAnimationFrame(()=>{let e=c.current;e&&(e.scrollTop=e.scrollHeight)})},[s.length]),(0,a.jsxs)("div",{className:"flex flex-col h-full bg-[#0F0F23]",children:[(0,a.jsxs)("div",{ref:c,className:"flex-1 min-h-0 px-3 py-2 flex flex-col gap-[3px] overflow-y-auto",style:{scrollbarWidth:"thin",scrollbarColor:"#444 transparent"},children:[(0,a.jsx)("div",{className:"text-center text-[10px] text-[#F8FAFC]/30 bg-slate-50/60 py-1.5 rounded-xl mb-1 sticky top-0 z-10 backdrop-blur-sm",children:n?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"inline-block h-1.5 w-1.5 rounded-full bg-green-400 animate-pulse mr-1"}),"Đang kết nối ph\xf2ng chat trá»±c tiếp"]}):d?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"inline-block h-1.5 w-1.5 rounded-full bg-yellow-400 animate-pulse mr-1"}),"Đang kết nối..."]}
142):"Ch\xe0o mừng bạn đến với ph\xf2ng chat"}),0===s.length&&n&&(0,a.jsx)("div",{className:"text-center text-[10px] text-[#F8FAFC]/20 py-4",children:"Chờ tin nhắn mới..."}),s.map((e,t)=>{var s;let l=(s=e.level)>=5?v[5]:v[s]||v[0];return 2===e.type||e.text?.includes("v\xe0o ph\xf2ng tr\xf2 chuyện")?(0,a.jsxs)("div",{className:"flex items-start gap-1.5 text-[11px] leading-relaxed py-[1px] opacity-60",children:[(0,a.jsx)("span",{className:"text-green-500/70 font-medium",children:"Hi"}),(0,a.jsxs)("span",{className:`shrink-0 inline-flex items-center px-1 py-[0.5px] rounded text-[8px] font-bold ${l.bg} ${l.text}`,children:["Lv",e.level]}),(0,a.jsxs)("span",{className:`font-bold ${l.nameCls}`,children:[e.user,":"]}),(0,a.jsx)("span",{className:"text-[#F8FAFC]/40",children:e.text})]},`${e.ts}-${t}`):(0,a.jsxs)("div",{className:"flex items-start gap-1.5 text-[11px] leading-relaxed py-[1px]",children:[(0,a.jsxs)("span",{className:`shrink-0 inline-flex items-center px-1 py-[0.5px] rounded text-[8px] font-bold ${l.bg} ${l.text}`,children:["Lv.",e.level]}),(0,a.jsxs)("span",{className:`font-bold shrink-0 ${l.nameCls}`,children:[e.user,":"]}),(0,a.jsx)("span",{className:"text-[#F8FAFC]/80 break-words min-w-0",children:e.text})]},`${e.ts}-${t}`)}),(0,a.jsx)("div",{ref:o})]}),(0,a.jsxs)("div",{className:"shrink-0 px-3 py-2 bg-[#0F0F23] border-t border-white/[0.04] space-y-2",children:[(0,a.jsx)("div",{className:"flex items-center justify-center gap-3 text-[#F8FAFC]/20 text-[10px]",children:(0,a.jsx)("span",{className:"flex items-center gap-1",children:(0,a.jsx)("svg",{className:"w-3 h-3",viewBox:"0 0 24 24",fill:"currentColor",children:(0,a.jsx)("path",{d:"M12 4.5C7 4.5 2.7 7.6 1 12c1.7 4.4 6 7.5 11 7.5s9.3-3.1 11-7.5c-1.7-4.4-6-7.5-11-7.5zm0 12.5c-2.8 0-5-2.2-5-5s2.2-5 5-5 5 2.2 5 5-2.2 5-5 5zm0-8c-1.7 0-3 1.3-3 3s1.3 3 3 3 3-1.3 3-3-1.3-3-3-3z"})})})}),(0,a.jsxs)("div",{className:"flex bg-[#0F0F23] rounded-2xl overflow-hidden border border-white/[0.08]",children:[(0,a.jsx)("input",{type:"text",placeholder:"Đăng nhập để c\xf9ng chat nh\xe9",disabled:!0,className:"flex-1 bg-transparent px-3 py-2 text-[11px] text-[#F8FAFC] outline-none placeholder:text-[#F8FAFC]/30 disabled:opacity-50"}),(0,a.jsx)("button",{disabled:!0,className:"px-4 text-[11px] font-bold bg-[#E11D48] text-black disabled:bg-white/10 disabled:text-[#F8FAFC]/20 transition-colors",children:"Gửi"})]})]})]})}let y={1:{icon:"⚽",label:"B\xe0n thắng",color:"text-green-400"},2:{icon:"\uD83C\uDD7F️",label:"Phạt đền",color:"text-green-400"},3:{icon:"\uD83D\uDFE1",label:"Thẻ v\xe0ng",color:"text-yellow-400"},4:{icon:"\uD83D\uDFE1\uD83D\uDFE1",label:"Thẻ v\xe0ng 2",color:"text-emerald-600"},5:{icon:"\uD83D\uDD34",label:"Thẻ đỏ",color:"text-red-500"},7:{icon:"\uD83D\uDD04",label:"Phản lưới",color:"text-orange-400"},8:{icon:"\uD83C\uDFE5",label:"Chấn thương",color:"text-[#94A3B8]"},9:{icon:"\uD83D\uDD04",label:"Thay người",color:"text-blue-400"},11:{icon:"⏱️",label:"Hiệp 2",color:"text-[#F8FAFC]/40"},15:{icon:"\uD83E\uDD45",label:"Pen trượt",color:"text-red-400"},19:{icon:"⏱️",label:"Kết th\xfac hiệp",color:"text-[#F8FAFC]/30"},21:{icon:"\uD83C\uDFC6",label:"VAR",color:"text-purple-400"}};function _({events:e}){let t=e?.incidents||e?.events||[];return t&&0!==t.length?(0,a.jsx)("div",{className:"flex flex-col",children:t.map((e,t)=>{let s=y[e.type]||{icon:"•",label:`Event ${e.type}`,color:"text-[#F8FAFC]/50"},l=1===e.position,r=2===e.position,n=e.add_time?`+${e.add_time}`:"",i=`${e.time}'${n}`;return l||r||11!==e.type&&19!==e.type?9===e.type?(0,a.jsxs)("div",{className:`flex items-center gap-2 border-b border-slate-50 p-3 text-xs ${l?"":"flex-row-reverse"}`,children:[(0,a.jsx)("span",{className:"text-slate-400 w-10 text-center shrink-0 text-[10px]",children:i}),(0,a.jsxs)("div",{className:`flex-1 flex flex-col gap-0.5 ${l?"items-start":"items-end"}`,children:[(0,a.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,a.jsx)("span",{className:"text-green-400 text-[10px]",children:"▲"}),(0,a.jsx)("span",{className:"text-[#F8FAFC]/80 text-[11px]",children:e.in_player_name||""})]}),(0,a.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,a.jsx)("span",{className:"text-red-400 text-[10px]",children:"▼"}),(0,a.jsx)("span",{className:"text-[#F8FAFC]/40 text-[11px]",children:e.out_player_name||""})]})]})]},t):(0,a.jsxs)("div",{className:`flex items-center gap-2 border-b border-slate-50 p-3 text-xs ${l?"":"flex-row-reverse"}`,children:[(0,a.jsx)("span",{className:"text-slate-400 w-10 text-center shrink-0 text-[10px]",children:i}),(0,a.jsx)("span",{className:`shrink-0 text-sm ${s.color}`,children:s.icon}),(0,a.jsxs)("div",{className:`flex-1 min-w-0 ${l?"text-left":"text-right"}`,children:[(0,a.jsx)("span",{className:"text-slate-700 text-[11px]",children:e.player_name||""}),e.assist1_name&&(0,a.jsxs)("span",{className:"text-slate-400 text-[10px] ml-1",children:["(kiến tạo: ",e.assist1_name,")"]}),1===e.type&&void 0!==e.home_score&&(0,a.jsxs)("span",{className:"text-[#E11D48] font-bold text-[11px] ml-2",children:[e.home_score," - ",e.away_score]})]})]},t):(0,a.jsx)("div",{className:"flex items-center justify-center py-2 border-b border-slate-50 bg-slate-50",children:(0,a.jsxs)("span",{className:"text-slate-400 text-[10px] uppercase tracking-wider",children:[s.icon," ",s.label," — ",i]})},t)})}):(0,a.jsx)(j,{text:"Diễn biến trận đấu sẽ được cập nhật trực tiếp tại đ\xe2y"})}function k({standings:e}
142){return e&&e.teams&&0!==e.teams.length?(0,a.jsxs)("div",{className:"w-full text-[10px]",children:[(0,a.jsxs)("div",{className:"grid grid-cols-[20px_1fr_24px_24px_32px] bg-slate-50 p-2 text-slate-400 uppercase font-bold sticky top-0",children:[(0,a.jsx)("span",{className:"text-center",children:"#"}),(0,a.jsx)("span",{children:"Team"}),(0,a.jsx)("span",{className:"text-center",children:"T"}),(0,a.jsx)("span",{className:"text-center",children:"B"}),(0,a.jsx)("span",{className:"text-center whitespace-nowrap",children:"Đ"})]}),e.teams.slice(0,15).map((e,t)=>{let s=!!e.data,l=s?parseFloat(e.data[0]):e.rank||t+1,r=s?e.data[1]:e.target_name,n=s?e.data[7]:e.points,i=s?e.data[3]:e.won,o=s?e.data[5]:e.loss;return(0,a.jsxs)("div",{className:"grid grid-cols-[20px_1fr_24px_24px_32px] items-center p-2 border-b border-slate-50 hover:bg-slate-50 transition-colors",children:[(0,a.jsx)("span",{className:"text-center text-slate-500",children:l}),(0,a.jsxs)("div",{className:"flex items-center gap-1.5 min-w-0 pr-2",children:[e.team_logo&&(0,a.jsx)("img",{src:e.team_logo,className:"w-3.5 h-3.5 object-contain",alt:r||"Team logo",loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-slate-700 font-medium truncate",children:r})]}),(0,a.jsx)("span",{className:"text-center text-slate-500",children:i}),(0,a.jsx)("span",{className:"text-center text-slate-500",children:o}),(0,a.jsx)("span",{className:"text-center text-[#E11D48] font-bold",children:n})]},r)})]}):(0,a.jsx)(j,{text:"Bảng xếp hạng sẽ được cập nhật"})}function E({odds:e}){let t=Array.isArray(e)?e:[],s=["2","4","3","16"];function l(e){for(let a of s){let s=t.find(t=>t.odds_type===e&&String(t.company_id)===a);if(s?.odds_info?.length)return s}return t.find(t=>t.odds_type===e&&t.odds_info?.length>0)}function r(e,t){let s=e?.odds_info;if(!s?.length)return["-","-","-"];let a="opening"===t?s.length-1:0;if(!s?.length||!s[a])return["-","-","-"];let l=s[a][2];if("string"!=typeof l)return["-","-","-"];let r=l.split(",");return[r[0]||"-",r[1]||"-",r[2]||"-"]}let n=l("asia"),i=l("eu"),o=l("bs"),c=l("cr"),d=r(n,"opening"),x=r(n,"latest"),h=r(i,"opening"),m=r(i,"latest"),p=r(o,"opening"),u=r(o,"latest"),g=r(c,"opening"),b=r(c,"latest"),f=({children:e})=>(0,a.jsx)("th",{className:"px-2 py-2 text-[9px] sm:text-[10px] font-bold uppercase tracking-wider text-slate-500 border-b border-slate-100 text-center",children:e}),j=({children:e,color:t})=>(0,a.jsx)("td",{className:`px-2 py-2.5 text-center text-[11px] sm:text-xs font-bold ${t||"text-slate-600"} border-b border-slate-50`,children:e});return(0,a.jsxs)("div",{className:"overflow-x-auto",children:[(0,a.jsxs)("table",{className:"w-full min-w-[600px]",children:[(0,a.jsxs)("thead",{children:[(0,a.jsxs)("tr",{className:"bg-slate-50",children:[(0,a.jsx)("th",{className:"px-4 py-2 text-left border-b border-slate-100",rowSpan:2,children:(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("div",{className:"w-7 h-7 rounded bg-gradient-to-br from-[#1d4ed8] to-[#3b82f6] flex items-center justify-center text-white text-[9px] font-black shadow-sm",children:"B"}),(0,a.jsx)("span",{className:"text-slate-600 text-[11px] font-bold tracking-wider",children:"SPORT"})]})}),(0,a.jsx)("th",{colSpan:3,className:"px-1 py-1.5 text-center text-[9px] sm:text-[10px] font-bold uppercase tracking-wider text-[#4681E8] border-b border-l border-slate-100",children:"CƯỢC CH\xc2U \xc1"}),(0,a.jsx)("th",{colSpan:3,className:"px-1 py-1.5 text-center text-[9px] sm:text-[10px] font-bold uppercase tracking-wider text-[#4681E8] border-b border-l border-slate-100",children:"CƯỢC CH\xc2U \xc2U"}),(0,a.jsx)("th",{colSpan:3,className:"px-1 py-1.5 text-center text-[9px] sm:text-[10px] font-bold uppercase tracking-wider text-[#4681E8] border-b border-l border-slate-100",children:"T\xc0I XỈU"}),(0,a.jsx)("th",{colSpan:3,className:"px-1 py-1.5 text-center text-[9px] sm:text-[10px] font-bold uppercase tracking-wider text-[#4681E8] border-b border-l border-slate-100",children:"K\xc8O G\xd3C"})]}),(0,a.jsxs)("tr",{className:"bg-slate-50",children:[(0,a.jsx)(f,{children:"CHỦ"}),(0,a.jsx)(f,{children:"CHẤP"}),(0,a.jsx)(f,{children:"KH\xc1CH"}),(0,a.jsx)(f,{children:"CHỦ"}),(0,a.jsx)(f,{children:"H\xd2A"}),(0,a.jsx)(f,{children:"KH\xc1CH"}),(0,a.jsx)(f,{children:"T\xc0I"}),(0,a.jsx)(f,{children:"TỶ LỆ"}),(0,a.jsx)(f,{children:"XỈU"}),(0,a.jsx)(f,{children:"T\xc0I"}),(0,a.jsx)(f,{children:"TỶ LỆ"}),(0,a.jsx)(f,{children:"XỈU"})]})]}),(0,a.jsxs)("tbody",{children:[(0,a.jsxs)("tr",{className:"hover:bg-slate-50 transition-colors",children:[(0,a.jsx)("td",{className:"px-4 py-2.5 text-[11px] sm:text-xs text-slate-500 font-medium border-b border-slate-50",children:"Tỷ Lệ Mở Cược"}),(0,a.jsx)(j,{children:d[0]}),(0,a.jsx)(j,{color:"text-red-400",children:d[1]}),(0,a.jsx)(j,{children:d[2]}),(0,a.jsx)(j,{children:h[0]}),(0,a.jsx)(j,{children:h[1]}),(0,a.jsx)(j,{children:h[2]}),(0,a.jsx)(j,{children:p[0]}),(0,a.jsx)(j,{children:p[1]}),(0,a.jsx)(j,{children:p[2]}),(0,a.jsx)(j,{children:g[0]}),(0,a.jsx)(j,{children:g[1]}),(0,a.jsx)(j,{children:g[2]})]}),(0,a.jsxs)("tr",{className:"hover:bg-slate-50 transition-colors",children:[(0,a.jsx)("td",{className:"px-4 py-2.5 text-[11px] sm:text-xs text-slate-500 font-medium border-b border-slate-50",children:"Tỷ Lệ Trước Trận"}),(0,a.jsx)(j,{children:x[0]}),(0,a.jsx)(j,{color:"text-red-400",children:x[1]}),(0,a.jsx)(j,{children:x[2]}),(0,a.jsx)(j,{children:m[0]}),(0,a.jsx)(j,{children:m[1]}),(0,a.jsx)(j,{children:m[2]}),(0,a.jsx)(j,{children:u[0]}),(0,a.jsx)(j,{children:u[1]}),(0,a.jsx)(j,{children:u[2]}),(0,a.jsx)(j,{children:b[0]}),(0,a.jsx)(j,{children:b[1]}),(0,a.jsx)(j,{children:b[2]})]}),(0,a.jsxs)("tr",{className:"hover:bg-slate-50 transition-colors bg-white",children:[(0,a.jsxs)("td",{className:"px-4 py-2.5 text-[11px] sm:text-xs text-slate-700 font-bold flex items-center gap-1.5 border-b border-slate-50",children:["Live ",(0,a.jsx)("span",{className:"w-1.5 h-1.5 rounded-full bg-red-500 animate-pulse"})]}),(0,a.jsx)(j,{color:"text-green-400",children:x[0]}),(0,a.jsx)(j,{color:"text-red-400",children:x[1]}),(0,a.jsx)(j,{color:"text-green-400",children:x[2]}),(0,a.jsx)(j,{color:"text-green-400",children:m[0]}),(0,a.jsx)(j,{color:"text-green-400",children:m[1]}),(0,a.jsx)(j,{color:"text-green-400",children:m[2]}),(0,a.jsx)(j,{color:"text-green-400",children:u[0]}),(0,a.jsx)(j,{children:u[1]}),(0,a.jsx)(j,{color:"text-green-400",children:u[2]}),(0,a.jsx)(j,{color:"text-green-400",children:b[0]}),(0,a.jsx)(j,{children:b[1]}),(0,a.jsx)(j,{color:"text-green-400",children:b[2]})]})]})]}),(0,a.jsx)("p",{className:"text-center text-slate-400 text-[10px] py-2.5 border-t border-slate-100",children:"Tỷ lệ k\xe8o sẽ được cập nhật gần giờ thi đấu"})]})}},14776:()=>{},15790:()=>{},16562:(e,t,s)=>{"use strict";s.d(t,{StandingsClient:()=>h});var a=s(68019),l=s(10707),r=s(46914),n=s(41427);function i(e){return"W"===e?"border border-emerald-500/45 bg-emerald-500/25 text-emerald-300 shadow-[0_0_0_1px_rgba(16,185,129,0.08)_inset]":"L"===e?"border border-red-500/45 bg-red-500/25 text-red-300 shadow-[0_0_0_1px_rgba(239,68,68,0.08)_inset]":"D"===e?"border border-amber-400/45 bg-amber-400/22 text-amber-200 shadow-[0_0_0_1px_rgba(251,191,36,0.08)_inset]":"border border-slate-500/40 bg-slate-500/18 text-slate-700"}function o(e,t){return 1===e?{bar:"bg-[linear-gradient(180deg,#facc15,#f97316)]",badge:"border-emerald-600/60 bg-slate-100 text-yellow-700 shadow-[0_0_18px_rgba(250,204,21,0.14)]",row:"from-[#32230d]/70 via-trans
142parent to-transparent"}:e<=4?{bar:"bg-[linear-gradient(180deg,#fb7185,#f97316)]",badge:"border-[#fb7185]/45 bg-slate-100 text-rose-700",row:"from-[#241318]/55 via-transparent to-transparent"}:e<=6?{bar:"bg-[linear-gradient(180deg,#f59e0b,#facc15)]",badge:"border-[#f59e0b]/45 bg-slate-100 text-yellow-700",row:"from-[#24190b]/45 via-transparent to-transparent"}:e<=10?{bar:"bg-[linear-gradient(180deg,#38bdf8,#2563eb)]",badge:"border-sky-400/40 bg-white text-sky-700",row:"from-[#101725]/32 via-transparent to-transparent"}:e>=Math.max(t-2,1)?{bar:"bg-[linear-gradient(180deg,#ef4444,#7f1d1d)]",badge:"border-red-500/40 bg-slate-100 text-red-700",row:"from-[#220f14]/45 via-transparent to-transparent"}:{bar:"bg-[linear-gradient(180deg,#64748b,#334155)]",badge:"border-slate-500/35 bg-white text-slate-700",row:"from-[#12161d]/24 via-transparent to-transparent"}}function c({detail:e}){let[t,s]=(0,l.useState)(!1),n=(0,l.useRef)(null),[o,d]=(0,l.useState)({top:0,left:0}),x=i(e.result),h=(0,l.useCallback)(()=>{if(n.current){let e=n.current.getBoundingClientRect();d({top:e.top+window.scrollY-8,left:e.left+e.width/2+window.scrollX})}s(!0)},[]);return(0,a.jsxs)("div",{ref:n,className:"relative inline-flex",onMouseEnter:h,onMouseLeave:()=>s(!1),children:[(0,a.jsx)("span",{className:`inline-flex h-7 w-7 items-center justify-center rounded-[8px] text-[11px] font-black cursor-pointer transition-transform hover:-translate-y-0.5 ${x}`,children:e.result}),t&&e.match_time&&"u">typeof document&&(0,r.createPortal)((0,a.jsxs)("div",{className:"fixed z-[9999] w-[220px] pointer-events-none",style:{top:`${o.top}px`,left:`${o.left}px`,transform:"translate(-50%, -100%)",position:"absolute"},children:[(0,a.jsxs)("div",{className:"overflow-hidden rounded-xl border border-[#cbd5e1] bg-white shadow-2xl",children:[(0,a.jsx)("div",{className:"bg-slate-100 px-3 py-1.5 text-[10px] text-slate-600 font-mono text-center border-b border-[#cbd5e1]",children:e.match_time}),(0,a.jsxs)("div",{className:"px-3 py-2.5 flex items-center justify-between gap-2",children:[(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5 flex-1 min-w-0",children:[e.home_logo?(0,a.jsx)("img",{src:e.home_logo,alt:e.home_team,className:"w-7 h-7 object-contain",loading:"lazy",decoding:"async"}):(0,a.jsx)("div",{className:"w-7 h-7 rounded-full bg-gray-700 flex items-center justify-center text-[8px] text-slate-600 font-bold",children:"?"}),(0,a.jsx)("span",{className:"text-[9px] text-slate-600 font-bold text-center leading-tight line-clamp-2 max-w-[70px]",children:e.home_team})]}),(0,a.jsx)("div",{className:"text-slate-900 font-black text-sm whitespace-nowrap px-1",children:e.score||"? - ?"}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5 flex-1 min-w-0",children:[e.away_logo?(0,a.jsx)("img",{src:e.away_logo,alt:e.away_team,className:"w-7 h-7 object-contain",loading:"lazy",decoding:"async"}):(0,a.jsx)("div",{className:"w-7 h-7 rounded-full bg-gray-700 flex items-center justify-center text-[8px] text-slate-600 font-bold",children:"?"}),(0,a.jsx)("span",{className:"text-[9px] text-slate-600 font-bold text-center leading-tight line-clamp-2 max-w-[70px]",children:e.away_team})]})]})]}),(0,a.jsx)("div",{className:"absolute left-1/2 -translate-x-1/2 -bottom-1 w-2 h-2 bg-white border-r border-b border-[#cbd5e1] rotate-45"})]}),document.body)]})}function d({result:e}){let t=i(e);return(0,a.jsx)("span",{className:`inline-flex h-7 w-7 items-center justify-center rounded-[8px] text-[11px] font-black ${t}`,children:e})}function x({value:e,totalTeams:t}){let s=Number(e);if(!Number.isFinite(s))return(0,a.jsx)("td",{className:"px-4 py-4 text-center font-mono font-black text-slate-400",children:e});let l=o(s,t);return(0,a.jsxs)("td",{className:"relative px-4 py-4 text-center font-mono",children:[(0,a.jsx)("span",{className:`absolute left-0 top-1/2 h-7 w-1 -translate-y-1/2 rounded-r-full ${l.bar}`}),(0,a.jsx)("span",{className:`inline-flex h-8 w-8 items-center justify-center rounded-[10px] border text-[13px] font-black ${l.badge}`,children:s})]})}function h({initialData:e}){let[t]=(0,l.useState)(!1),[s,r]=(0,l.useState)(!1),[i,p]=(0,l.useState)(""),u=(0,l.useRef)(null);if((0,l.useEffect)(()=>{function e(e){u.current&&!u.current.contains(e.target)&&r(!1)}return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[]),!e)return(0,a.jsx)("div",{className:"text-center py-20 text-slate-600",children:"Đang tải dữ liệu..."});let g=e.available_leagues||[],b=g.filter(e=>e.name.toLowerCase().includes(i.toLowerCase())),f=e.teams&&e.teams.length>0&&Array.isArray(e.teams[0]?.form),j=!f&&e.rankings;return(0,a.jsxs)("div",{className:"mx-auto max-w-[1440px] px-4 py-8",children:[(0,a.jsx)(n.i,{eyebrow:"Bảng xếp hạng",title:"BẢNG XẾP HẠNG",rightSlot:(0,a.jsx)("div",{className:"text-[12px] text-slate-600",children:(0,a.jsx)("span",{className:"text-slate-900/80 font-bold",children:e.league_name})})}),g.length>0&&(0,a.jsxs)("div",{className:"mb-6",ref:u,children:[(0,a.jsxs)("div",{className:"relative inline-flex min-w-[320px] items-center gap-3 rounded-2xl border border-slate-200 bg-white backdrop-blur-md px-5 py-3.5 cursor-pointer shadow-[0_8px_30px_rgba(0,0,0,0.06)] transition-colors hover:border-[#4681E8]/50 hover:shadow-[0_8px_30px_rgba(70,129,232,0.1)]",onClick:()=>r(!s),children:[e.league_icon&&(0,a.jsx)("img",{src:e.league_icon,alt:e.league_name||"League icon",className:"w-6 h-6 object-contain",loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-slate-800 font-bold text-sm flex-1",children:e.league_name||"Chọn giải đấu"}),(0,a.jsx)("svg",{className:`w-4 h-4 text-[#4681E8] transition-transform ${s?"rotate-180":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),s&&(0,a.jsxs)("div",{className:"absolute z-50 mt-2 w-[360px] overflow-hidden rounded-2xl border border-slate-200 bg-white backdrop-blur-xl shadow-[0_24px_80px_rgba(0,0,0,0.15)]",children:[(0,a.jsx)("div",{className:"p-2 border-b border-slate-100",children:(0,a.jsx)("input",{type:"text",placeholder:"T\xecm kiếm giải đấu...",value:i,onChange:e=>p(e.target.value),className:"w-full bg-slate-50 text-slate-800 text-sm px-4 py-2.5 rounded-xl border border-transparent outline-none focus:border-[#4681E8]/50 placeholder-slate-400 transition-colors",autoF
142ocus:!0})}),(0,a.jsxs)("div",{className:"max-h-[340px] overflow-y-auto",children:[b.map(t=>(0,a.jsxs)("a",{href:`/standings?league=${encodeURIComponent(t.id)}`,className:`flex items-center gap-3 px-4 py-3 cursor-pointer transition-colors hover:bg-slate-50 ${t.id===e.league_id?"bg-[#4681E8]/10 border-l-4 border-[#4681E8]":""}`,children:[t.icon?(0,a.jsx)("img",{src:t.icon,alt:t.name||"League",className:"w-5 h-5 object-contain flex-shrink-0",loading:"lazy",decoding:"async"}):(0,a.jsx)("div",{className:"w-5 h-5 rounded bg-gray-700 flex-shrink-0"}),(0,a.jsx)("span",{className:"text-sm text-slate-900 truncate",children:t.name})]},t.id)),0===b.length&&(0,a.jsx)("div",{className:"px-4 py-8 text-center text-gray-500 text-sm",children:"Kh\xf4ng t\xecm thấy giải đấu"})]})]})]}),t&&(0,a.jsxs)("div",{className:"flex items-center justify-center py-12",children:[(0,a.jsx)("div",{className:"animate-spin w-8 h-8 border-2 border-emerald-600 border-t-transparent rounded-full"}),(0,a.jsx)("span",{className:"ml-3 text-slate-600 text-sm",children:"Đang tải bảng xếp hạng từ server..."})]}),!t&&f&&(0,a.jsxs)("div",{className:"overflow-hidden rounded-[24px] border border-slate-200 bg-white shadow-[0_8px_30px_rgba(0,0,0,0.08)]",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between gap-3 border-b border-[#4681E8]/20 bg-gradient-to-r from-[#4681E8] to-[#2563eb] px-6 py-4 text-white shadow-[0_4px_25px_rgba(70,129,232,0.3)]",children:[(0,a.jsx)("div",{className:"text-[13px] font-black uppercase tracking-[0.2em] drop-shadow-sm text-white/80",children:"League"}),(0,a.jsx)("div",{className:"truncate text-sm font-black sm:text-base drop-shadow-md",children:e.league_name})]}),(0,a.jsx)("div",{className:"overflow-x-auto",children:(0,a.jsxs)("table",{className:"w-full text-left border-collapse",children:[(0,a.jsx)("thead",{children:(0,a.jsx)("tr",{className:"bg-slate-50 text-[11px] uppercase tracking-[0.2em] text-slate-500",children:e.header.map((t,s)=>{let l=e.teams.some(e=>e.form&&e.form.length>0);return t.toLowerCase().includes("phong độ")&&!l?null:(0,a.jsx)("th",{colSpan:s===e.header.length-1&&l?5:1,className:`p-4 font-semibold ${1===s?"w-1/3 text-left":"text-center"}`,children:t},s)})})}),(0,a.jsx)("tbody",{className:"text-sm",children:e.teams.map((t,s)=>(o(Number(t.data[0]||s+1),e.teams.length),(0,a.jsxs)("tr",{className:"group border-b border-slate-100 bg-white transition-colors hover:bg-slate-50 cursor-pointer",children:[t.data.map((s,l)=>0===l?(0,a.jsx)(x,{value:s,totalTeams:e.teams.length},l):1===l?(0,a.jsx)("td",{className:"p-4",children:(0,a.jsxs)("div",{className:"flex items-center gap-3 rounded-2xl border border-slate-100 bg-slate-50 px-4 py-2.5 transition-colors group-hover:border-[#4681E8]/30 group-hover:bg-[#4681E8]/5",children:[t.team_logo?(0,a.jsx)("img",{src:t.team_logo,alt:s,className:"h-8 w-8 rounded-full bg-white object-contain p-0.5 filter drop-shadow-[0_2px_4px_rgba(0,0,0,0.1)]",loading:"lazy"}):(0,a.jsx)("div",{className:"flex h-8 w-8 items-center justify-center rounded-full border border-slate-200 bg-white text-[10px] font-bold text-slate-400",children:"?"}),(0,a.jsx)("span",{className:"font-bold text-slate-800 transition-colors group-hover:text-[#4681E8]",children:s})]})},l):(0,a.jsx)("td",{className:"p-4 text-center font-mono text-slate-600",children:s},l)),t.form&&t.form.length>0&&(0,a.jsxs)(a.Fragment,{children:[t.form.map((e,t)=>(0,a.jsx)("td",{className:"p-2 text-center",children:e.match_time?(0,a.jsx)(c,{detail:e}):(0,a.jsx)(d,{result:e.result})},`form-${t}`)),t.form.length<5&&Array.from({length:5-t.form.length}).map((e,t)=>(0,a.jsx)("td",{className:"p-2"},`pad-${t}`))]})]},s)))})]})})]}),!t&&!f&&j&&(0,a.jsx)(m,{rankings:e.rankings}),!t&&!f&&!j&&e.header&&e.teams&&(0,a.jsx)("div",{className:"text-center py-20 text-slate-600",children:"Dữ liệu đang được cập nhật..."}),!t&&(f||j)&&(0,a.jsxs)("div",{className:"mt-6 flex flex-wrap items-center gap-5 px-5 py-4 bg-slate-50 rounded-2xl border border-slate-200",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,a.jsx)("span",{className:"w-2.5 h-2.5 rounded-full bg-emerald-500"}),(0,a.jsx)("span",{className:"text-[11px] text-slate-600 font-bold uppercase tracking-wider",children:"Đội trưởng bảng"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,a.jsx)("span",{className:"w-2.5 h-2.5 rounded-full bg-sky-4
14200"}),(0,a.jsx)("span",{className:"text-[11px] text-slate-600 font-bold uppercase tracking-wider",children:"Champions League"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,a.jsx)("span",{className:"w-2.5 h-2.5 rounded-full bg-amber-500"}),(0,a.jsx)("span",{className:"text-[11px] text-slate-600 font-bold uppercase tracking-wider",children:"Europa League"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,a.jsx)("span",{className:"w-2.5 h-2.5 rounded-full bg-[#f97316]"}),(0,a.jsx)("span",{className:"text-[11px] text-slate-600 font-bold uppercase tracking-wider",children:"Europa Conference"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,a.jsx)("span",{className:"w-2.5 h-2.5 rounded-full bg-[#E11D48]"}),(0,a.jsx)("span",{className:"text-[11px] text-slate-600 font-bold uppercase tracking-wider",children:"Xuống hạng"})]})]})]})}function m({rankings:e}){if(!e||0===e.length)return null;let t=e[0].data,s=e.slice(1);return(0,a.jsx)("div",{className:"overflow-hidden rounded-[22px] border border-[#cbd5e1] bg-[linear-gradient(180deg,#191a20,#111218)] shadow-[0_24px_80px_rgba(0,0,0,0.4)]",children:(0,a.jsx)("div",{className:"overflow-x-auto",children:(0,a.jsxs)("table",{className:"w-full text-left border-collapse",children:[(0,a.jsx)("thead",{children:(0,a.jsx)("tr",{className:"bg-white text-[11px] uppercase tracking-[0.18em] text-slate-600",children:t.map((e,l)=>{let r=l===t.length-1,n=s[0]&&s[0].data.length>t.length?s[0].data.length-t.length+1:1;return(0,a.jsx)("th",{colSpan:r?n:1,className:`p-4 font-semibold ${1===l?"w-1/3 text-left":"text-center"}`,children:e},l)})})}),(0,a.jsx)("tbody",{className:"text-sm",children:s.map((e,t)=>(0,a.jsx)("tr",{className:"group border-b border-[#cbd5e1] transition-colors hover:bg-white",children:e.data.map((t,l)=>0===l?(0,a.jsx)(x,{value:t,totalTeams:s.length},l):1===l?(0,a.jsx)("td",{className:"p-4",children:(0,a.jsxs)("div",{className:"flex items-center gap-3 rounded-2xl border border-white/6 bg-[linear-gradient(180deg,rgba(255,255,255,0.03),rgba(255,255,255,0.01))] px-3 py-2 transition-colors group-hover:border-emerald-600/22",children:[e.team_logo?(0,a.jsx)("img",{src:e.team_logo,alt:t,className:"h-8 w-8 rounded-full bg-white/5 object-contain ring-1 ring-white/8",loading:"lazy"}):(0,a.jsx)("div",{className:"flex h-8 w-8 items-center justify-center rounded-full border border-gray-700 bg-gray-800 text-xs font-bold text-gray-500",children:"?"}),(0,a.jsx)("span",{className:"font-bold text-slate-900 transition-colors group-hover:text-emerald-600",children:t})]})},l):["W","D","L"].includes(t)?(0,a.jsx)("td",{className:"p-2 text-center",children:(0,a.jsx)("span",{className:`inline-flex h-7 w-7 items-center justify-center rounded-[8px] text-[11px] font-black ${i(t)}`,children:t})},l):(0,a.jsx)("td",{className:"p-4 text-center font-mono text-slate-600",children:t},l))},t))})]})})})}},18082:(e,t,s)=>{"use strict";s.d(t,{Klivevip11SchedulePage:()=>d});var a=s(68019),l=s(10707),r=s(78637),n=s(31307);function i({html:e}){return e?.trim()?(0,a.jsx)("section",{className:"relative mt-10 mb-6",children:(0,a.jsx)("div",{className:"seo-prose relative",children:(0,a.jsx)("div",{dangerouslySetInnerHTML:{__html:e},className:"text-slate-600 text-[14px] leading-[1.85] px-1 [&_strong]:text-slate-900 [&_a]:text-[#4681E8]"})})}):null}s(15790);let o=`
143<h2>Lịch thi đấu b\xf3ng đ\xe1 - Cập nhật lịch b\xf3ng đ\xe1 h\xf4m nay nhanh v\xe0 ch\xednh x\xe1c</h2>
144
145<p>Để <strong>xem lịch thi đấu b\xf3ng đ\xe1</strong> nhanh, ch\xednh x\xe1c v\xe0 đầy đủ nhất, Klive ch\xednh l\xe0 nơi bạn n\xean chọn. Ch\xfang t\xf4i cập nhật lịch thi đấu cho to\xe0n bộ c\xe1c giải đấu trong nước v\xe0 quốc tế, gi\xfap bạn kh\xf4ng bỏ lỡ bất kỳ trận cầu hấp dẫn n\xe0o.</p>
146
147<img src="/images/seo/schedule-football.png" alt="Lịch thi đấu b\xf3ng đ\xe1 h\xf4m nay tại Klive" loading="lazy" />
148
149<div class="toc-box">
150  <h3>Nội dung ch\xednh</h3>
151  <ol>
152    <li>Lịch thi đấu b\xf3ng đ\xe1 trực tuyến h\xe0ng đầu</li>
153    <li>Lịch b\xf3ng đ\xe1 nhanh v\xe0 ch\xednh x\xe1c</li>
154    <li>Cập nhật lịch Ngoại Hạng Anh v\xe0 Champions League</li>
155    <li>C\xe1ch xem lịch thi đấu hiệu quả nhất</li>
156  </ol>
157</div>
158
159<h2>Lịch thi đấu b\xf3ng đ\xe1 trực tuyến h\xe0ng đầu</h2>
160<p>Trong thời đại số, kh\xf4ng ai c\xf2n xem lịch b\xf3ng đ\xe1 tr\xean TV hay b\xe1o giấy nữa. Tất cả đ\xe3 chuyển sang theo d\xf5i online, v\xe0 Klive ch\xednh l\xe0 nền tảng cập nhật lịch b\xf3ng đ\xe1 được đ\xe1nh gi\xe1 cao nhất.</p>
161
162<p>Khi truy cập Klive, bạn c\xf3 thể xem lịch thi đấu của bất kỳ giải đấu b\xf3ng đ\xe1 n\xe0o tr\xean thế giới một c\xe1ch ho\xe0n to\xe0n miễn ph\xed. Th\xf4ng tin lịch đấu được cập nhật sớm nhất v\xe0 chi tiết đến từng ph\xfat.</p>
163
164<h2>Lịch b\xf3ng đ\xe1 nhanh v\xe0 ch\xednh x\xe1c</h2>
165<p>Klive kh\xf4ng chỉ cung cấp lịch thi đấu c\xe1c giải đấu h\xe0ng đầu m\xe0 c\xf2n cập nhật lịch ph\xe1t s\xf3ng tr\xean c\xe1c k\xeanh truyền h\xecnh Việt Nam như K+, FPT Play, VTV Sports. Gi\xfap bạn biết trận n\xe0o được chiếu trực tiếp tr\xean TV v\xe0 sắp xếp thời gian hợp l\xfd.</p>
166
167<h2>Cập nhật lịch Ngoại Hạng Anh v\xe0 Champions League</h2>
168<p>Ngoại Hạng Anh v\xe0 Champions League l\xe0 hai giải đấu được quan t\xe2m nhất. Tại Klive, bạn lu\xf4n nắm được lịch đấu đầy đủ từ v\xf2ng bảng đến chung kết, k\xe8m theo th\xf4ng tin về đội h\xecnh dá»± kiến, phong độ v\xe0 lịch sá»­ đối đầu để chuẩn bị tốt nhất cho má
168»—i trận cầu.</p>
169
170<p>Kết hợp lịch thi đấu với trang trực tiếp b\xf3ng đ\xe1, bạn sẽ c\xf3 trải nghiệm theo d\xf5i b\xf3ng đ\xe1 ho\xe0n hảo nhất - biết trước, xem ngay, kh\xf4ng bỏ lỡ!</p>
171`;var c=s(77935);function d({initialData:e}){let t=(0,r.usePathname)(),[s,h]=(0,l.useState)(!1),[m,p]=(0,l.useState)(new Set),[u,g]=(0,l.useState)(""),[b,f]=(0,l.useState)(!1),[j,w]=(0,l.useState)(0),v=(0,l.useMemo)(()=>(0,c.p_)(e),[e]),N=v.dateTabs,y=(0,l.useMemo)(()=>{if(!v.selectedDate)return 0;let e=N.findIndex(e=>(e.dataValue||e.date)===v.selectedDate);return e>=0?e:0},[N,v.selectedDate]),[_,k]=(0,l.useState)(y),[E,C]=(0,l.useState)(v.leagues||[]),S=(0,l.useMemo)(()=>{if(!u)return E;let e=u.toLowerCase();return E.filter(t=>t.league_name.toLowerCase().includes(e)||t.matches.some(t=>t.home_team.toLowerCase().includes(e)||t.away_team.toLowerCase().includes(e)))},[E,u]),L=Math.max(0,N.length-7),$=N.slice(j,j+7),F=j>0,T=j<L,A=S.reduce((e,t)=>e+t.matches.length,0);return((0,l.useEffect)(()=>{if(!v.selectedDate||!N.length)return;let e=N.findIndex(e=>(e.dataValue||e.date)===v.selectedDate);e>=0&&k(e)},[N,v.selectedDate]),(0,l.useEffect)(()=>{_<j?w(Math.max(0,_)):_>=j+7&&w(Math.min(L,_-7+1))},[_,L,j]),e)?(0,a.jsxs)("div",{className:"max-w-[1440px] mx-auto px-4 py-8",children:[(0,a.jsx)(n.D,{eyebrow:"Lịch thi đấu",title:"LỊCH THI ĐẤU",rightSlot:(0,a.jsxs)("div",{className:"text-[12px] text-slate-500 font-bold uppercase tracking-wider",children:[(0,a.jsx)("span",{className:"text-[#E11D48] font-black",children:S.reduce((e,t)=>e+t.matches.length,0)})," trận đấu"]})}),(0,a.jsxs)("div",{className:"flex items-center mb-4 rounded-xl overflow-hidden border border-slate-200 bg-white shadow-sm",children:[(0,a.jsx)("button",{type:"button",disabled:!F,onClick:()=>w(e=>Math.max(0,e-1)),className:`flex items-center justify-center w-8 h-[52px] bg-slate-100 border-r border-slate-200 text-slate-600 hover:text-slate-800 hover:bg-slate-200 transition-all shrink-0 ${!F?"opacity-30":"cursor-pointer"}`,children:(0,a.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2.5,d:"M15 19l-7-7 7-7"})})}),(0,a.jsx)("div",{className:"flex flex-1",children:$.map((e,s)=>{let l=j+s;return(0,a.jsxs)("button",{type:"button",onClick:()=>(e=>{let s=N[e];if(!s||e===_)return;let a=s.dataValue||s.date;a&&(k(e),p(new Set),h(!0),window.history.replaceState(null,"",`${t}?date=${encodeURIComponent(a)}`),fetch(`/api/socolive/fixtures?date=${encodeURIComponent(a)}`,{cache:"no-store"}).then(e=>e.ok?e.json():null).then(e=>{e&&C((0,c.p_)(e).leagues||[])}).finally(()=>h(!1)))})(l),className:`flex-1 flex flex-col items-center justify-center h-[52px] border-b-[3px] transition-all duration-300 ${_===l?"border-[#4681E8] text-[#4681E8] bg-[#4681E8]/5":"border-transparent text-[#64748B] hover:text-[#94A3B8] hover:bg-slate-100"}`,children:[(0,a.jsx)("span",{className:`text-[11px] font-bold uppercase tracking-widest ${_===l?"text-[#4681E8]":""}`,children:e.label}),(0,a.jsx)("span",{className:`text-[12px] font-mono mt-0.5 ${_===l?"text-slate-800 font-black":""}`,children:e.date})]},`tab-${l}`)})}),(0,a.jsx)("button",{type:"button",disabled:!T,onClick:()=>w(e=>Math.min(L,e+1)),className:`flex items-center justify-center w-8 h-[52px] bg-slate-100 border-l border-slate-200 text-slate-600 hover:text-slate-800 hover:bg-slate-200 transition-all shrink-0 ${!T?"opacity-30":"cursor-pointer"}`,children:(0,a.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2.5,d:"M9 5l7 7-7 7"})})})]}),(0,a.jsxs)("div",{className:"relative mb-4",children:[(0,a.jsxs)("button",{onClick:()=>f(!b),className:"flex items-center gap-3 bg-white hover:bg-slate-50 px-4 py-2.5 rounded-xl border border-slate-200 shadow-sm transition-all text-sm group",children:[(0,a.jsx)("svg",{className:"w-5 h-5 text-[#E11D48] transition-colors group-hover:text-[#F43F5E]",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 6h16M4 12h16M4 18h16"})}),(0,a.jsx)("span",{className:"text-slate-700 font-bold text-[13px] uppercase tracking-wide",children:"Danh s\xe1ch giải đấu"}),(0,a.jsx)("svg",{className:`w-4 h-4 text-slate-500 transition-transform duration-300 ${b?"rotate-180":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),b&&(0,a.jsxs)("div",{className:"absolute top-full left-0 mt-2 w-[360px] bg-white border border-slate-200 rounded-2xl shadow-[0_24px_80px_rgba(0,0,0,0.12)] z-50 max-h-[320px] overflow-hidden flex flex-col",children:[(0,a.jsx)("div",{className:"p-2 border-b border-slate-100",children:(0,a.jsx)("input",{type:"text",placeholder:"T\xecm giải đấu...",value:u,onChange:e=>g(e.target.value),className:"w-full bg-slate-50 border border-transparent roun
171ded-xl px-4 py-2.5 text-sm text-slate-800 placeholder-slate-400 outline-none focus:border-[#4681E8]/50 transition-colors"})}),(0,a.jsx)("div",{className:"overflow-y-auto flex-1 py-2",children:E.map((e,t)=>(0,a.jsxs)("button",{type:"button",onClick:()=>{g(e.league_name),f(!1)},className:"w-full flex items-center gap-3 px-4 py-2.5 hover:bg-slate-50 text-left text-[13px] transition-colors",children:[e.league_icon?(0,a.jsx)("img",{src:e.league_icon,alt:e.league_name||"League",className:"w-5 h-5 object-contain shrink-0",loading:"lazy",decoding:"async"}):(0,a.jsx)("div",{className:"w-5 h-5 rounded-md bg-slate-200 shrink-0"}),(0,a.jsx)("span",{className:"text-slate-600 truncate flex-1 font-medium",children:e.league_name}),(0,a.jsx)("span",{className:"text-[11px] text-[#E11D48] font-bold shrink-0 px-2 py-0.5 bg-[#E11D48]/10 rounded-md border border-[#E11D48]/20",children:e.matches.length})]},t))})]})]}),(0,a.jsxs)("div",{className:"grid grid-cols-[1fr_60px_55px_100px_100px_90px] bg-slate-50 border border-slate-200 rounded-t-xl px-4 py-3 text-[11px] text-slate-500 font-black uppercase tracking-widest shadow-inner",children:[(0,a.jsx)("span",{children:"Trận đấu"}),(0,a.jsx)("span",{className:"text-center",children:"Tỷ số"}),(0,a.jsx)("span",{className:"text-center",children:"Hiệp 1"}),(0,a.jsx)("span",{className:"text-center",children:"Cược chấp"}),(0,a.jsx)("span",{className:"text-center",children:"T\xe0i/Xỉu"}),(0,a.jsx)("span",{className:"text-center",children:"1 X 2"})]}),(0,a.jsxs)("div",{className:"border border-slate-200 border-t-0 rounded-b-xl overflow-hidden relative shadow-[0_8px_30px_rgba(0,0,0,0.06)]",children:[s&&(0,a.jsx)("div",{className:"absolute inset-0 z-10 bg-white/80 backdrop-blur-[2px]",children:(0,a.jsx)("div",{className:"space-y-0",children:[...Array(6)].map((e,t)=>(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 px-4 py-3.5 bg-slate-100 border-b border-slate-200",children:[(0,a.jsx)("div",{className:"w-4 h-4 rounded bg-slate-300 animate-pulse"}),(0,a.jsx)("div",{className:"h-3.5 rounded bg-slate-200 animate-pulse",style:{width:`${120+30*t}px`}})]}),[void 0,void 0].map((e,t)=>(0,a.jsxs)("div",{className:"grid grid-cols-[1fr_60px_55px_100px_100px_90px] items-center px-4 py-3 border-b border-slate-100",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)("div",{className:"w-10 h-3.5 rounded bg-slate-200 animate-pulse"}),(0,a.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,a.jsx)("div",{className:"h-3 w-24 rounded bg-slate-100 animate-pulse"}),(0,a.jsx)("div",{className:"h-3 w-20 rounded bg-slate-100 animate-pulse"})]})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5",children:[(0,a.jsx)("div",{className:"h-3 w-5 rounded bg-slate-100 animate-pulse"}),(0,a.jsx)("div",{className:"h-3 w-5 rounded bg-slate-100 animate-pulse"})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5",children:[(0,a.jsx)("div",{className:"h-3 w-5 rounded bg-slate-100 animate-pulse"}),(0,a.jsx)("div",{className:"h-3 w-5 rounded bg-slate-100 animate-pulse"})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5",children:[(0,a.jsx)("div",{className:"h-3 w-14 rounded bg-slate-100 animate-pulse"}),(0,a.jsx)("div",{className:"h-3 w-10 rounded bg-slate-100 animate-pulse"})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5",children:[(0,a.jsx)("div",{className:"h-3 w-14 rounded bg-slate-100 animate-pulse"}),(0,a.jsx)("div",{className:"h-3 w-10 rounded bg-slate-100 animate-pulse"})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5",children:[(0,a.jsx)("div",{className:"h-3 w-10 rounded bg-slate-100 animate-pulse"}),(0,a.jsx)("div",{className:"h-3 w-10 rounded bg-slate-100 animate-pulse"}),(0,a.jsx)("div",{className:"h-3 w-10 rounded bg-slate-100 animate-pulse"})]})]},t))]},t))})}),0!==S.length||s?S.map((e,t)=>(0,a.jsxs)("div",{id:`league-${t}`,children:[(0,a.jsxs)("button",{onClick:()=>{p(e=>{let s=new Set(e);return s.has(t)?s.delete(t):s.add(t),s})},className:"w-full flex items-center gap-3 px-4 py-3 bg-slate-50 hover:bg-slate-100 border-b border-slate-100 transition-colors text-left group",children:[(0,a.jsx)("svg",{className:`w-4 h-4 text-[#E11D48] transition-transform duration-300 shrink-0 ${m.has(t)?"-rotate-90":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2.5,d:"M19 9l-7 7-7-7"})}),e.league_icon&&(0,a.jsx)("div",{className:"w-6 h-6 rounded-full bg-slate-100 p-0.5 border border-slate-200 flex items-center justify-center shadow-sm",children:(0,a.jsx)("img",{src:e.league_icon,alt:e.league_name||"League",className:"w-4 h-4 object-contain shrink-0",loading:"lazy",decoding:"async"})}),(0,a.jsx)("span",{className:"text-[13px] font-bold text-slate-700 flex-1 truncate uppercase tracking-widest",children:e.league_name}),(0,a.jsxs)("span",{className:"text-[11px] text-[#E11D48] font-bold shrink-0 ml-1 px-2 py-0.5 bg-[#E11D48]/10 rounded border border-[#
171E11D48]/20 group-hover:bg-[#E11D48]/20 transition-colors",children:["BXH ",(0,a.jsx)("svg",{className:"inline w-3 h-3 ml-0.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 6h16M4 10h16M4 14h16M4 18h16"})})]})]}),!m.has(t)&&e.matches.map((e,t)=>(0,a.jsxs)("div",{className:"grid grid-cols-[1fr_60px_55px_100px_100px_90px] items-center px-4 py-3 bg-transparent hover:bg-slate-50 border-b border-slate-100 last:border-0 transition-colors group cursor-default",children:[(0,a.jsxs)("div",{className:"flex items-center gap-4 min-w-0",children:[(0,a.jsx)("span",{className:"text-[#E11D48] font-mono text-[13px] font-black min-w-[42px] shrink-0 drop-shadow-[0_0_4px_rgba(225,29,72,0.4)]",children:e.time}),(0,a.jsxs)("div",{className:"flex flex-col gap-1 min-w-0 flex-1",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[e.home_logo&&(0,a.jsx)("img",{src:e.home_logo,alt:e.home_team||"Home team",className:"w-4 h-4 object-contain shrink-0 filter drop-shadow-[0_2px_2px_rgba(0,0,0,0.8)]",loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-[13px] text-slate-700 font-medium truncate group-hover:text-slate-900 transition-colors",children:e.home_team})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[e.away_logo&&(0,a.jsx)("img",{src:e.away_logo,alt:e.away_team||"Away team",className:"w-4 h-4 object-contain shrink-0",loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-[13px] text-slate-700 font-medium truncate group-hover:text-slate-900 transition-colors",children:e.away_team})]})]})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center",children:[(0,a.jsx)("span",{className:"text-[12px] text-[var(--accent-cyan)] font-mono font-bold",children:"-"!==e.score?e.score:"-"}),(0,a.jsx)("span",{className:"text-[12px] text-[#64748B]",children:"-"})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center",children:[(0,a.jsx)("span",{className:"text-[12px] text-[#64748B]",children:"-"}),(0,a.jsx)("span",{className:"text-[12px] text-[#64748B]",children:"-"})]}),(0,a.jsx)(x,{values:e.handicap,hasLine:!0}),(0,a.jsx)(x,{values:e.over_under,hasLine:!0}),(0,a.jsx)("div",{className:"flex flex-col items-center gap-0",children:e.one_x_two?.length>0?e.one_x_two.map((e,t)=>(0,a.jsx)("span",{className:"text-[11px] text-slate-500 leading-[18px]",children:e||"-"},t)):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"text-[11px] text-[#64748B] leading-[18px]",children:"-"}),(0,a.jsx)("span",{className:"text-[11px] text-[#64748B] leading-[18px]",children:"-"}),(0,a.jsx)("span",{className:"text-[11px] text-[#64748B] leading-[18px]",children:"-"})]})})]},t))]},t)):(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center py-20 gap-3 bg-slate-50",children:[(0,a.jsx)("svg",{className:"w-12 h-12 text-slate-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",strokeWidth:1.5,children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6.75 3v2.25M17.25 3v2.25M3 18.75V7.5a2.25 2.25 0 012.25-2.25h13.5A2.25 2.25 0 0121 7.5v11.25m-18 0A2.25 2.25 0 005.25 21h13.5A2.25 2.25 0 0021 18.75m-18 0v-7.5A2.25 2.25 0 015.25 9h13.5A2.25 2.25 0 0121 11.25v7.5"})}),(0,a.jsx)("span",{className:"text-slate-500 font-medium tracking-wide",children:"Kh\xf4ng c\xf3 trận đấu n\xe0o cho ng\xe0y n\xe0y"}),(0,a.jsx)("span",{className:"text-slate-400 text-[12px]",children:"H\xe3y thá»­ chọn một ng\xe0y kh\xe1c"})]})]}),(0,a.jsxs)("div",{className:"mt-6 text-center text-[11px] text-[#64748B] uppercase tracking-widest font-bold drop-shadow-sm",children:["Tổng cộng ",A," trận đấu trong ",S.length," giải"]}),(0,a.jsx)(i,{html:o})]}):(0,a.jsxs)("div",{className:"max-w-[1440px] mx-auto px-4 py-8",children:[(0,a.jsx)(n.D,{eyebrow:"Lịch thi đấu",title:"LỊCH THI ĐẤU"}),(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center py-16 gap-4",children:[(0,a.jsx)("div",{className:"w-12 h-12 rounded-full border-2 border-[#E11D48]/30 border-t-[#E11D48] animate-spin"}),(0,a.jsx)("span",{className:"text-slate-500 text-sm font-medium tracking-wide",children:"Đang tải lịch thi đấu..."})]})]})}function x({values:e,hasLine:t}){return e&&0!==e.length?t&&e.length>=3?(0,a.jsxs)("div",{className:"flex flex-col items-center gap-0",children:[(0,a.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,a.jsx)("span",{className:"text-[11px] text-[#E11D48] leading-[18px] font-bold",children:e[0]}),(0,a.jsx)("span",{className:"text-[11px] text-slate-500 leading-[18px]",children:e[1]})]}),(0,a.jsx)("span",{className:"text-[11px] text-slate-500 leading-[18px]",children:e[2]})]}):(0,a.jsx)("div",{className:"flex flex-col items-center gap-0",children:e.map((e,t)=>(0,a.jsx)("span",{className:"text-[11px] text-slate-500 leading-[18px]",children:e||"-"},t))}):(0,a.jsxs)("div",{className:"flex flex-col items-center",children:[(0,a.jsx)("span",{className:"text-[11px] text-[#64748B] leading-[18px]",children:"-"}),(0,a.jsx)("span",{className:"text-[11px] text-[#64748B] leading-[18px]",children:"-"})]})}},18210:(e,t,s)=>{"use strict";function a(e){let t=e?.fixtures_v2||null,s=e?.fixtures||e?.schedules||[],a=t?.date_tabs?.length?t.date_tabs:function(e=new Date){let t=["Chá»
171§ Nhật","Thứ Hai","Thứ Ba","Thứ Tư","Thứ Năm","Thứ S\xe1u","Thứ Bảy"],s=[];for(let a=0;a<14;a+=1){let l=new Date(e);l.setDate(l.getDate()+a);let r=String(l.getDate()).padStart(2,"0"),n=String(l.getMonth()+1).padStart(2,"0"),i=`${l.getFullYear()}-${l.getMonth()+1}-${l.getDate()}`;s.push({label:0===a?"H\xf4m Nay":t[l.getDay()],date:`${r}.${n}`,dataValue:i,active:0===a})}return s}(),l=e?.selected_date||a.find(e=>e.active)?.dataValue||a[0]?.dataValue||null;if(t?.leagues?.length)return{dateTabs:a,selectedDate:l,leagues:t.leagues,totalMatches:t.leagues.reduce((e,t)=>e+t.matches.length,0)};let r=[],n=new Set;return s.forEach(e=>{let t=e.data;if(!(t.length<3))for(let s=0;s+2<t.length;s+=16){let a=t[s]||"",l=t[s+1]||"",i=t[s+2]||"",o=`${a}-${l}-${i}`;if(!n.has(o)&&l&&(n.add(o),r.push({time:a,home_team:l,away_team:i,home_logo:e.team_logos?.[2*Math.floor(s/16)]||"",away_logo:e.team_logos?.[2*Math.floor(s/16)+1]||"",score:t[s+3]||"-",ht_score:t[s+4]||"",handicap:t.length>s+9?[t[s+7]||"",t[s+8]||"",t[s+9]||""]:[],over_under:t.length>s+12?[t[s+10]||"",t[s+11]||"",t[s+12]||""]:[],one_x_two:t.length>s+15?[t[s+13]||"",t[s+14]||"",t[s+15]||""]:[]}),s+16>=t.length))break}}),{dateTabs:a,selectedDate:l,leagues:r.length>0?[{league_name:"Tất cả trận đấu",league_icon:"",match_count:r.length,matches:r}]:[],totalMatches:r.length}}function l(e){let t=e?.results_v2||null,s=e?.results||[];if(t?.date_groups?.length)return{availableLeagues:t.available_leagues||[],dateGroups:t.date_groups,totalMatches:t.date_groups.reduce((e,t)=>e+t.matches.length,0)};let a=[];return s.forEach(e=>{let t=e.data;if(t.length<6)return;let s=t[0],l=s.split(" - "),r=[],n=1,i=0;for(;n<t.length;){if(t[n]?.startsWith("L\xfac")){let s=t[n].replace("L\xfac","").trim();r.push({time:s,home_team:t[n+1]||"",away_team:t[n+4]||"",home_logo:e.team_logos?.[i]||"",away_logo:e.team_logos?.[i+1]||"",score:t[n+2]||"",ht_score:(t[n+3]||"").replace("H1:","").replace("HT:","").trim()}),i+=2,n+=5;continue}n+=1}r.length>0&&a.push({date_header:l[0]?.trim()||s,league_round:l.slice(1).join(" - ").trim(),matches:r})}),{availableLeagues:[],dateGroups:a,totalMatches:a.reduce((e,t)=>e+t.matches.length,0)}}function r(e,t){if(!t)return e;let s=t.toLowerCase();return e.filter(e=>e.league_round.toLowerCase().includes(s))}s.d(t,{kK:()=>r,o8:()=>l,p_:()=>a})},18443:(e,t,s)=>{"use strict";s.d(t,{Klivevip18SchedulePage:()=>d});var a=s(68019),l=s(10707),r=s(78637),n=s(38243);function i({html:e}){return e?.trim()?(0,a.jsx)("section",{className:"relative mt-10 mb-6",children:(0,a.jsx)("div",{className:"seo-prose relative",children:(0,a.jsx)("div",{dangerouslySetInnerHTML:{__html:e},className:"text-slate-600 text-[14px] leading-[1.85] px-1 [&_strong]:text-slate-900 [&_a]:text-[#4681E8]"})})}):null}s(73401);let o=`
172<h2>Lịch thi đấu b\xf3ng đ\xe1 - Cập nhật lịch b\xf3ng đ\xe1 h\xf4m nay nhanh v\xe0 ch\xednh x\xe1c</h2>
173
174<p>Để <strong>xem lịch thi đấu b\xf3ng đ\xe1</strong> nhanh, ch\xednh x\xe1c v\xe0 đầy đủ nhất, Klive ch\xednh l\xe0 nơi bạn n\xean chọn. Ch\xfang t\xf4i cập nhật lịch thi đấu cho to\xe0n bộ c\xe1c giải đấu trong nước v\xe0 quốc tế, gi\xfap bạn kh\xf4ng bỏ lỡ bất kỳ trận cầu hấp dẫn n\xe0o.</p>
175
176<img src="/images/seo/schedule-football.png" alt="Lịch thi đấu b\xf3ng đ\xe1 h\xf4m nay tại Klive" loading="lazy" />
177
178<div class="toc-box">
179  <h3>Nội dung ch\xednh</h3>
180  <ol>
181    <li>Lịch thi đấu b\xf3ng đ\xe1 trực tuyến h\xe0ng đầu</li>
182    <li>Lịch b\xf3ng đ\xe1 nhanh v\xe0 ch\xednh x\xe1c</li>
183    <li>Cập nhật lịch Ngoại Hạng Anh v\xe0 Champions League</li>
184    <li>C\xe1ch xem lịch thi đấu hiệu quả nhất</li>
185  </ol>
186</div>
187
188<h2>Lịch thi đấu b\xf3ng đ\xe1 trực tuyến h\xe0ng đầu</h2>
189<p>Trong thời đại số, kh\xf4ng ai c\xf2n xem lịch b\xf3ng đ\xe1 tr\xean TV hay b\xe1o giấy nữa. Tất cả đ\xe3 chuyển sang theo d\xf5i online, v\xe0 Klive ch\xednh l\xe0 nền tảng cập nhật lịch b\xf3ng đ\xe1 được đ\xe1nh gi\xe1 cao nhất.</p>
190
191<p>Khi truy cập Klive, bạn c\xf3 thể xem lịch thi đấu của bất kỳ giải đấu b\xf3ng đ\xe1 n\xe0o tr\xean thế giới một c\xe1ch ho\xe0n to\xe0n miễn ph\xed. Th\xf4ng tin lịch đấu được cập nhật sớm nhất v\xe0 chi tiết đến từng ph\xfat.</p>
192
193<h2>Lịch b\xf3ng đ\xe1 nhanh v\xe0 ch\xednh x\xe1c</h2>
194<p>Klive kh\xf4ng chỉ cung cấp lịch thi đấu c\xe1c giải đấu h\xe0ng đầu m\xe0 c\xf2n cập nhật lịch ph\xe1t s\xf3ng tr\xean c\xe1c k\xeanh truyền h\xecnh Việt Nam như K+, FPT Play, VTV Sports. Gi\xfap bạn biết trận n\xe0o được chiếu trực tiếp tr\xean TV v\xe0 sắp xếp thời gian hợp l\xfd.</p>
195
196<h2>Cập nhật lịch Ngoại Hạng Anh v\xe0 Champions League</h2>
197<p>Ngoại Hạng Anh v\xe0 Champions League l\xe0 hai giải đấu được quan t\xe2m nhất. Tại Klive, bạn lu\xf4n nắm được lịch đấu đầy đủ từ v\xf2ng bảng đến chung kết, k\xe8m theo th\xf4ng tin về đội h\xecnh dá»± kiến, phong độ v\xe0 lịch sá»­ đối đầu để chuẩn bị tốt nhất cho má
197»—i trận cầu.</p>
198
199<p>Kết hợp lịch thi đấu với trang trực tiếp b\xf3ng đ\xe1, bạn sẽ c\xf3 trải nghiệm theo d\xf5i b\xf3ng đ\xe1 ho\xe0n hảo nhất - biết trước, xem ngay, kh\xf4ng bỏ lỡ!</p>
200`;var c=s(32312);function d({initialData:e}){let t=(0,r.usePathname)(),[s,h]=(0,l.useState)(!1),[m,p]=(0,l.useState)(new Set),[u,g]=(0,l.useState)(""),[b,f]=(0,l.useState)(!1),[j,w]=(0,l.useState)(0),v=(0,l.useMemo)(()=>(0,c.p_)(e),[e]),N=v.dateTabs,y=(0,l.useMemo)(()=>{if(!v.selectedDate)return 0;let e=N.findIndex(e=>(e.dataValue||e.date)===v.selectedDate);return e>=0?e:0},[N,v.selectedDate]),[_,k]=(0,l.useState)(y),[E,C]=(0,l.useState)(v.leagues||[]),S=(0,l.useMemo)(()=>{if(!u)return E;let e=u.toLowerCase();return E.filter(t=>t.league_name.toLowerCase().includes(e)||t.matches.some(t=>t.home_team.toLowerCase().includes(e)||t.away_team.toLowerCase().includes(e)))},[E,u]),L=Math.max(0,N.length-7),$=N.slice(j,j+7),F=j>0,T=j<L,A=S.reduce((e,t)=>e+t.matches.length,0);return((0,l.useEffect)(()=>{if(!v.selectedDate||!N.length)return;let e=N.findIndex(e=>(e.dataValue||e.date)===v.selectedDate);e>=0&&k(e)},[N,v.selectedDate]),(0,l.useEffect)(()=>{_<j?w(Math.max(0,_)):_>=j+7&&w(Math.min(L,_-7+1))},[_,L,j]),e)?(0,a.jsxs)("div",{className:"max-w-[1440px] mx-auto px-4 py-8",children:[(0,a.jsx)(n.A,{eyebrow:"Lịch thi đấu",title:"LỊCH THI ĐẤU",rightSlot:(0,a.jsxs)("div",{className:"text-[12px] text-slate-500 font-bold uppercase tracking-wider",children:[(0,a.jsx)("span",{className:"text-[#E11D48] font-black",children:S.reduce((e,t)=>e+t.matches.length,0)})," trận đấu"]})}),(0,a.jsxs)("div",{className:"flex items-center mb-4 rounded-xl overflow-hidden border border-slate-200 bg-white shadow-sm",children:[(0,a.jsx)("button",{type:"button",disabled:!F,onClick:()=>w(e=>Math.max(0,e-1)),className:`flex items-center justify-center w-8 h-[52px] bg-slate-100 border-r border-slate-200 text-slate-600 hover:text-slate-800 hover:bg-slate-200 transition-all shrink-0 ${!F?"opacity-30":"cursor-pointer"}`,children:(0,a.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2.5,d:"M15 19l-7-7 7-7"})})}),(0,a.jsx)("div",{className:"flex flex-1",children:$.map((e,s)=>{let l=j+s;return(0,a.jsxs)("button",{type:"button",onClick:()=>(e=>{let s=N[e];if(!s||e===_)return;let a=s.dataValue||s.date;a&&(k(e),p(new Set),h(!0),window.history.replaceState(null,"",`${t}?date=${encodeURIComponent(a)}`),fetch(`/api/socolive/fixtures?date=${encodeURIComponent(a)}`,{cache:"no-store"}).then(e=>e.ok?e.json():null).then(e=>{e&&C((0,c.p_)(e).leagues||[])}).finally(()=>h(!1)))})(l),className:`flex-1 flex flex-col items-center justify-center h-[52px] border-b-[3px] transition-all duration-300 ${_===l?"border-[#4681E8] text-[#4681E8] bg-[#4681E8]/5":"border-transparent text-[#64748B] hover:text-[#94A3B8] hover:bg-slate-100"}`,children:[(0,a.jsx)("span",{className:`text-[11px] font-bold uppercase tracking-widest ${_===l?"text-[#4681E8]":""}`,children:e.label}),(0,a.jsx)("span",{className:`text-[12px] font-mono mt-0.5 ${_===l?"text-slate-800 font-black":""}`,children:e.date})]},`tab-${l}`)})}),(0,a.jsx)("button",{type:"button",disabled:!T,onClick:()=>w(e=>Math.min(L,e+1)),className:`flex items-center justify-center w-8 h-[52px] bg-slate-100 border-l border-slate-200 text-slate-600 hover:text-slate-800 hover:bg-slate-200 transition-all shrink-0 ${!T?"opacity-30":"cursor-pointer"}`,children:(0,a.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2.5,d:"M9 5l7 7-7 7"})})})]}),(0,a.jsxs)("div",{className:"relative mb-4",children:[(0,a.jsxs)("button",{onClick:()=>f(!b),className:"flex items-center gap-3 bg-white hover:bg-slate-50 px-4 py-2.5 rounded-xl border border-slate-200 shadow-sm transition-all text-sm group",children:[(0,a.jsx)("svg",{className:"w-5 h-5 text-[#E11D48] transition-colors group-hover:text-[#F43F5E]",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 6h16M4 12h16M4 18h16"})}),(0,a.jsx)("span",{className:"text-slate-700 font-bold text-[13px] uppercase tracking-wide",children:"Danh s\xe1ch giải đấu"}),(0,a.jsx)("svg",{className:`w-4 h-4 text-slate-500 transition-transform duration-300 ${b?"rotate-180":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),b&&(0,a.jsxs)("div",{className:"absolute top-full left-0 mt-2 w-[360px] bg-white border border-slate-200 rounded-2xl shadow-[0_24px_80px_rgba(0,0,0,0.12)] z-50 max-h-[320px] overflow-hidden flex flex-col",children:[(0,a.jsx)("div",{className:"p-2 border-b border-slate-100",children:(0,a.jsx)("input",{type:"text",placeholder:"T\xecm giải đấu...",value:u,onChange:e=>g(e.target.value),className:"w-full bg-slate-50 border border-transparent roun
200ded-xl px-4 py-2.5 text-sm text-slate-800 placeholder-slate-400 outline-none focus:border-[#4681E8]/50 transition-colors"})}),(0,a.jsx)("div",{className:"overflow-y-auto flex-1 py-2",children:E.map((e,t)=>(0,a.jsxs)("button",{type:"button",onClick:()=>{g(e.league_name),f(!1)},className:"w-full flex items-center gap-3 px-4 py-2.5 hover:bg-slate-50 text-left text-[13px] transition-colors",children:[e.league_icon?(0,a.jsx)("img",{src:e.league_icon,alt:e.league_name||"League",className:"w-5 h-5 object-contain shrink-0",loading:"lazy",decoding:"async"}):(0,a.jsx)("div",{className:"w-5 h-5 rounded-md bg-slate-200 shrink-0"}),(0,a.jsx)("span",{className:"text-slate-600 truncate flex-1 font-medium",children:e.league_name}),(0,a.jsx)("span",{className:"text-[11px] text-[#E11D48] font-bold shrink-0 px-2 py-0.5 bg-[#E11D48]/10 rounded-md border border-[#E11D48]/20",children:e.matches.length})]},t))})]})]}),(0,a.jsxs)("div",{className:"grid grid-cols-[1fr_60px_55px_100px_100px_90px] bg-slate-50 border border-slate-200 rounded-t-xl px-4 py-3 text-[11px] text-slate-500 font-black uppercase tracking-widest shadow-inner",children:[(0,a.jsx)("span",{children:"Trận đấu"}),(0,a.jsx)("span",{className:"text-center",children:"Tỷ số"}),(0,a.jsx)("span",{className:"text-center",children:"Hiệp 1"}),(0,a.jsx)("span",{className:"text-center",children:"Cược chấp"}),(0,a.jsx)("span",{className:"text-center",children:"T\xe0i/Xỉu"}),(0,a.jsx)("span",{className:"text-center",children:"1 X 2"})]}),(0,a.jsxs)("div",{className:"border border-slate-200 border-t-0 rounded-b-xl overflow-hidden relative shadow-[0_8px_30px_rgba(0,0,0,0.06)]",children:[s&&(0,a.jsx)("div",{className:"absolute inset-0 z-10 bg-white/80 backdrop-blur-[2px]",children:(0,a.jsx)("div",{className:"space-y-0",children:[...Array(6)].map((e,t)=>(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 px-4 py-3.5 bg-slate-100 border-b border-slate-200",children:[(0,a.jsx)("div",{className:"w-4 h-4 rounded bg-slate-300 animate-pulse"}),(0,a.jsx)("div",{className:"h-3.5 rounded bg-slate-200 animate-pulse",style:{width:`${120+30*t}px`}})]}),[void 0,void 0].map((e,t)=>(0,a.jsxs)("div",{className:"grid grid-cols-[1fr_60px_55px_100px_100px_90px] items-center px-4 py-3 border-b border-slate-100",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)("div",{className:"w-10 h-3.5 rounded bg-slate-200 animate-pulse"}),(0,a.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,a.jsx)("div",{className:"h-3 w-24 rounded bg-slate-100 animate-pulse"}),(0,a.jsx)("div",{className:"h-3 w-20 rounded bg-slate-100 animate-pulse"})]})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5",children:[(0,a.jsx)("div",{className:"h-3 w-5 rounded bg-slate-100 animate-pulse"}),(0,a.jsx)("div",{className:"h-3 w-5 rounded bg-slate-100 animate-pulse"})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5",children:[(0,a.jsx)("div",{className:"h-3 w-5 rounded bg-slate-100 animate-pulse"}),(0,a.jsx)("div",{className:"h-3 w-5 rounded bg-slate-100 animate-pulse"})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5",children:[(0,a.jsx)("div",{className:"h-3 w-14 rounded bg-slate-100 animate-pulse"}),(0,a.jsx)("div",{className:"h-3 w-10 rounded bg-slate-100 animate-pulse"})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5",children:[(0,a.jsx)("div",{className:"h-3 w-14 rounded bg-slate-100 animate-pulse"}),(0,a.jsx)("div",{className:"h-3 w-10 rounded bg-slate-100 animate-pulse"})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5",children:[(0,a.jsx)("div",{className:"h-3 w-10 rounded bg-slate-100 animate-pulse"}),(0,a.jsx)("div",{className:"h-3 w-10 rounded bg-slate-100 animate-pulse"}),(0,a.jsx)("div",{className:"h-3 w-10 rounded bg-slate-100 animate-pulse"})]})]},t))]},t))})}),0!==S.length||s?S.map((e,t)=>(0,a.jsxs)("div",{id:`league-${t}`,children:[(0,a.jsxs)("button",{onClick:()=>{p(e=>{let s=new Set(e);return s.has(t)?s.delete(t):s.add(t),s})},className:"w-full flex items-center gap-3 px-4 py-3 bg-slate-50 hover:bg-slate-100 border-b border-slate-100 transition-colors text-left group",children:[(0,a.jsx)("svg",{className:`w-4 h-4 text-[#E11D48] transition-transform duration-300 shrink-0 ${m.has(t)?"-rotate-90":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2.5,d:"M19 9l-7 7-7-7"})}),e.league_icon&&(0,a.jsx)("div",{className:"w-6 h-6 rounded-full bg-slate-100 p-0.5 border border-slate-200 flex items-center justify-center shadow-sm",children:(0,a.jsx)("img",{src:e.league_icon,alt:e.league_name||"League",className:"w-4 h-4 object-contain shrink-0",loading:"lazy",decoding:"async"})}),(0,a.jsx)("span",{className:"text-[13px] font-bold text-slate-700 flex-1 truncate uppercase tracking-widest",children:e.league_name}),(0,a.jsxs)("span",{className:"text-[11px] text-[#E11D48] font-bold shrink-0 ml-1 px-2 py-0.5 bg-[#E11D48]/10 rounded border border-[#
200E11D48]/20 group-hover:bg-[#E11D48]/20 transition-colors",children:["BXH ",(0,a.jsx)("svg",{className:"inline w-3 h-3 ml-0.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 6h16M4 10h16M4 14h16M4 18h16"})})]})]}),!m.has(t)&&e.matches.map((e,t)=>(0,a.jsxs)("div",{className:"grid grid-cols-[1fr_60px_55px_100px_100px_90px] items-center px-4 py-3 bg-transparent hover:bg-slate-50 border-b border-slate-100 last:border-0 transition-colors group cursor-default",children:[(0,a.jsxs)("div",{className:"flex items-center gap-4 min-w-0",children:[(0,a.jsx)("span",{className:"text-[#E11D48] font-mono text-[13px] font-black min-w-[42px] shrink-0 drop-shadow-[0_0_4px_rgba(225,29,72,0.4)]",children:e.time}),(0,a.jsxs)("div",{className:"flex flex-col gap-1 min-w-0 flex-1",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[e.home_logo&&(0,a.jsx)("img",{src:e.home_logo,alt:e.home_team||"Home team",className:"w-4 h-4 object-contain shrink-0 filter drop-shadow-[0_2px_2px_rgba(0,0,0,0.8)]",loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-[13px] text-slate-700 font-medium truncate group-hover:text-slate-900 transition-colors",children:e.home_team})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[e.away_logo&&(0,a.jsx)("img",{src:e.away_logo,alt:e.away_team||"Away team",className:"w-4 h-4 object-contain shrink-0",loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-[13px] text-slate-700 font-medium truncate group-hover:text-slate-900 transition-colors",children:e.away_team})]})]})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center",children:[(0,a.jsx)("span",{className:"text-[12px] text-[var(--accent-cyan)] font-mono font-bold",children:"-"!==e.score?e.score:"-"}),(0,a.jsx)("span",{className:"text-[12px] text-[#64748B]",children:"-"})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center",children:[(0,a.jsx)("span",{className:"text-[12px] text-[#64748B]",children:"-"}),(0,a.jsx)("span",{className:"text-[12px] text-[#64748B]",children:"-"})]}),(0,a.jsx)(x,{values:e.handicap,hasLine:!0}),(0,a.jsx)(x,{values:e.over_under,hasLine:!0}),(0,a.jsx)("div",{className:"flex flex-col items-center gap-0",children:e.one_x_two?.length>0?e.one_x_two.map((e,t)=>(0,a.jsx)("span",{className:"text-[11px] text-slate-500 leading-[18px]",children:e||"-"},t)):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"text-[11px] text-[#64748B] leading-[18px]",children:"-"}),(0,a.jsx)("span",{className:"text-[11px] text-[#64748B] leading-[18px]",children:"-"}),(0,a.jsx)("span",{className:"text-[11px] text-[#64748B] leading-[18px]",children:"-"})]})})]},t))]},t)):(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center py-20 gap-3 bg-slate-50",children:[(0,a.jsx)("svg",{className:"w-12 h-12 text-slate-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",strokeWidth:1.5,children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6.75 3v2.25M17.25 3v2.25M3 18.75V7.5a2.25 2.25 0 012.25-2.25h13.5A2.25 2.25 0 0121 7.5v11.25m-18 0A2.25 2.25 0 005.25 21h13.5A2.25 2.25 0 0021 18.75m-18 0v-7.5A2.25 2.25 0 015.25 9h13.5A2.25 2.25 0 0121 11.25v7.5"})}),(0,a.jsx)("span",{className:"text-slate-500 font-medium tracking-wide",children:"Kh\xf4ng c\xf3 trận đấu n\xe0o cho ng\xe0y n\xe0y"}),(0,a.jsx)("span",{className:"text-slate-400 text-[12px]",children:"H\xe3y thử chọn một ng\xe0y kh\xe1c"})]})]}),(0,a.jsxs)("div",{className:"mt-6 text-center text-[11px] text-[#64748B] uppercase tracking-widest font-bold drop-shadow-sm",children:["Tổng cộng ",A," trận đấu trong ",S.length," giải"]}),(0,a.jsx)(i,{html:o})]}):(0,a.jsxs)("div",{className:"max-w-[1440px] mx-auto px-4 py-8",children:[(0,a.jsx)(n.A,{eyebrow:"Lịch thi đấu",title:"LỊCH THI ĐẤU"}),(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center py-16 gap-4",children:[(0,a.jsx)("div",{className:"w-12 h-12 rounded-full border-2 border-[#E11D48]/30 border-t-[#E11D48] animate-spin"}),(0,a.jsx)("span",{className:"text-slate-500 text-sm font-medium tracking-wide",children:"Đang tải lịch thi đấu..."})]})]})}function x({values:e,hasLine:t}){return e&&0!==e.length?t&&e.length>=3?(0,a.jsxs)("div",{className:"flex flex-col items-center gap-0",children:[(0,a.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,a.jsx)("span",{className:"text-[11px] text-[#E11D48] leading-[18px] font-bold",children:e[0]}),(0,a.jsx)("span",{className:"text-[11px] text-slate-500 leading-[18px]",children:e[1]})]}),(0,a.jsx)("span",{className:"text-[11px] text-slate-500 leading-[18px]",children:e[2]})]}):(0,a.jsx)("div",{className:"flex flex-col items-center gap-0",children:e.map((e,t)=>(0,a.jsx)("span",{className:"text-[11px] text-slate-500 leading-[18px]",children:e||"-"},t))}):(0,a.jsxs)("div",{className:"flex flex-col items-center",children:[(0,a.jsx)("span",{className:"text-[11px] text-[#64748B] leading-[18px]",children:"-"}),(0,a.jsx)("span",{className:"text-[11px] text-[#64748B] leading-[18px]",children:"-"})]})}},18556:()=>{},18806:(e,t,s)=>{"use strict";s.d(t,{LiveMatchesClient:()=>m});var a=s(68019),l=s(10707);function r({activeSport:e,onSportChange:t,activeStatus:s,onStatusChange:l,matchesCount:n}){return(0,a.jsxs)("div",{className:"mb-5 flex flex-col gap-3",children:[(0,a.jsx)("div",{className:"flex items-center gap-2 overflow-x-auto pb-1 scrollbar-hide",children:[{id:"1",label:"B\xd3NG Đ\xc1",icon:"⚽"},{id:"2",label:"B\xd3NG RỔ",icon:"\uD83C\uDFC0"},{id:"5",label:"TENNIS",icon:"\uD83C\uDFBE"},{id:"4",label:"CẦU L\xd4NG",icon:"\uD83C\uDFF8"},{id:"3",label:"B\xd3NG CHUYỀN",icon:"\uD83C\uDFD0"},{id:"6",label:"B\xd3NG B\xc0N",icon:"\uD83C\uDFD3"}].map(s=>{let l=e===s.id;return(0,a.jsxs)("button",{type:"button",onClick:()=>t(s.id),className:`flex items-center gap-2 px-4 py-2.5 rounded-xl font-bold text-[12px] whitespace-nowrap transition-all duration-200 border cursor-pointer ${l?"bg-[#4681E8]/10 text-[#4681E8] border-[#4681E8]/40 shadow-[0_0_15px_rgba(70,129,232,0.1)]":"bg-white text-slate-500 border-slate-200 hover:text-slate-700 hover:border-[#4681E8]/30"}`,children:[(0,a.jsx)("span",{className:"text-[14px]",children:s.icon}
200),(0,a.jsx)("span",{className:"tracking-wider uppercase",children:s.label})]},s.id)})}),(0,a.jsx)("div",{className:"flex items-center gap-1 overflow-x-auto pb-1 scrollbar-hide bg-white rounded-xl p-1.5 border border-slate-200",children:[{id:"all",label:"TẤT CẢ",keyCount:"all"},{id:"live",label:"TRỰC TIẾP",keyCount:"live"},{id:"hot",label:"HOT",keyCount:"hot"},{id:"today",label:"H\xd4M NAY",keyCount:"today"},{id:"tomorrow",label:"NG\xc0Y MAI",keyCount:"tomorrow"}].map(e=>{let t=s===e.id,r=n[e.keyCount]||0;return(0,a.jsxs)("button",{type:"button",onClick:()=>l(e.id),className:`relative px-4 py-2 font-bold text-[12px] whitespace-nowrap transition-all duration-200 uppercase tracking-wider flex items-center gap-2 rounded-lg cursor-pointer ${t?"bg-[#4681E8]/10 text-[#4681E8] shadow-inner":"text-slate-500 hover:text-slate-700 hover:bg-[#4681E8]/5"}`,children:["live"===e.id&&t&&(0,a.jsx)("span",{className:"w-1.5 h-1.5 rounded-full bg-[#4681E8] animate-pulse shadow-[0_0_6px_rgba(70,129,232,0.8)]"}),(0,a.jsx)("span",{children:e.label}),(0,a.jsx)("span",{className:`px-1.5 py-0.5 rounded text-[10px] font-black ${t?"bg-[#4681E8]/20 text-[#4681E8]":"text-slate-400"}`,children:r})]},e.id)})})]})}function n(){return"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='10' fill='%2364748B' fill-opacity='0.18'/%3E%3C/svg%3E"}function i({match:e,isLoading:t=!1}){if(t||!e)return(0,a.jsx)("div",{className:"animate-pulse bg-white h-[64px] w-full border-b border-slate-100"});let s=new Date(1e3*parseInt(e.time||0,10)).toLocaleTimeString("vi-VN",{hour:"2-digit",minute:"2-digit",timeZone:"Asia/Ho_Chi_Minh"}),l=function(e,t){if("1"===t||"2"===t)switch(e){case"1":default:return{text:"Sắp diễn",isLive:!1,showScore:!1};case"2":return{text:"H1",isLive:!0,showScore:!0};case"3":return{text:"HT",isLive:!0,showScore:!0};case"4":return{text:"H2",isLive:!0,showScore:!0};case"5":return{text:"Phụ",isLive:!0,showScore:!0};case"7":return{text:"Pen",isLive:!0,showScore:!0};case"8":case"9":return{text:"FT",isLive:!1,showScore:!0}}switch(e){case"0":case"1":return{text:"Sắp diễn",isLive:!1,showScore:!1};case"51":return{text:"S1",isLive:!0,showScore:!0};case"52":return{text:"S2",isLive:!0,showScore:!0};case"53":return{text:"S3",isLive:!0,showScore:!0};case"54":return{text:"S4",isLive:!0,showScore:!0};case"55":return{text:"S5",isLive:!0,showScore:!0};case"100":case"90":case"91":case"110":return{text:"FT",isLive:!1,showScore:!0};default:return{text:"LIVE",isLive:!0,showScore:!0}}}(String(e.status_id),String(e.sport_id)),r=e.time_text||e.source_card_meta?.time_text||"",o=l.isLive,c=e.home_score??"-",d=e.away_score??"-",x=e.home_logo||n(),h=e.away_logo||n();return(0,a.jsxs)("a",{href:`/match/${encodeURIComponent(e.post_name||e.id)}`,className:"flex items-center w-full group border-b border-slate-100 bg-white hover:bg-[#4681E8]/5 transition-colors min-h-[64px]",children:[(0,a.jsx)("div",{className:`w-[60px] flex flex-col items-center justify-center shrink-0 h-full border-r ${o?"border-[#4681E8]/30 bg-[#4681E8]/5":"border-slate-100"}`,children:o?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"text-[#4681E8] font-bold text-[11px] uppercase tracking-wider tabular-nums leading-none",children:r||l.text}),(0,a.jsx)("span",{className:"w-1.5 h-1.5 rounded-full bg-[#4681E8] animate-pulse mt-1"})]}):(0,a.jsx)("span",{className:"text-slate-500 font-medium text-[12px]",children:s})}),(0,a.jsxs)("div",{className:"flex-1 flex flex-col justify-center px-3 py-2 gap-1.5 min-w-0",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between w-full",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2.5 min-w-0 overflow-hidden",children:[(0,a.jsx)("img",{src:x,alt:e.home_name,className:"w-4 h-4 shrink-0 object-contain",onError:e=>e.currentTarget.src=n(),loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-[13px] font-semibold truncate text-slate-800",children:e.home_name})]}),l.showScore&&(0,a.jsx)("span",{className:`text-[15px] font-black tabular-nums shrink-0 ml-2 ${o?"text-[#4681E8]":"text-slate-700"}`,children:c})]}),(0,a.jsxs)("div",{className:"flex items-center justify-between w-full",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2.5 min-w-0 overflow-hidden",children:[(0,a.jsx)("img",{src:h,alt:e.away_name,className:"w-4 h-4 shrink-0 object-contain",onError:e=>e.currentTarget.src=n(),loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-[13px] font-semibold truncate text-slate-800",children:e.away_name})]}),l.showScore&&(0,a.jsx)("span",{className:`text-[15px] font-black tabular-nums shrink-0 ml-2 ${o?"text-[#4681E8]":"text-slate-700"}`,children:d})]})]}),(0,a.jsx)("div",{className:"w-[48px] h-full flex items-center justify-center shrink-0 text-slate-300 group-hover:text-[#4681E8] transition-colors border-l border-slate-100",children:(0,a.jsx)("svg",{className:"w-5 h-5 fill-current",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{d:"M8 5v14l11-7z"})})})]})}let o=new Set(["1","2","3","4","5","7"]),c=new Set(["8","9","15"]),d=new Set(["51","52","53","54","5
2005","56","57","58","59"]),x=new Set(["100","90","91","92","93","110"]);function h(e){let t=String(e.status_id);return 2>=parseInt(e.sport_id)?o.has(t):d.has(t)}function m({matches:e,matchIndex:t}){let[s,n]=(0,l.useState)("1"),[o,d]=(0,l.useState)("all"),[p,u]=(0,l.useState)(1);(0,l.useEffect)(()=>{u(1)},[s,o]);let{todayStart:g,tomorrowStart:b,dayAfterStart:f}=(0,l.useMemo)(()=>{let e,t,s,{vnTodayStartUTC:a,vnTomorrowStartUTC:l,vnDayAfterStartUTC:r}=(s=(t=Math.floor(Date.UTC((e=new Date(Date.now()+252e5)).getUTCFullYear(),e.getUTCMonth(),e.getUTCDate())/1e3)-25200)+86400,{vnTodayStartUTC:t,vnTomorrowStartUTC:s,vnDayAfterStartUTC:s+86400});return{todayStart:a,tomorrowStart:l,dayAfterStart:r}},[]),j=(0,l.useMemo)(()=>new Map(e.map(e=>[e?.match_key?String(e.match_key):e?.ls_id?String(e.ls_id):e?.id?`${String(e.sport_id||"0")}:${String(e.id)}`:e?.scheduleId?`${String(e.sport_id||"0")}:schedule:${String(e.scheduleId)}`:[String(e?.sport_id||"0"),String(e?.time||"0"),String(e?.home_name||""),String(e?.away_name||"")].join(":"),e])),[e]),w=t?.summary_by_sport?.[s],v=t?.bucket_keys_by_sport?.[s],N=t?.bucket_pages_by_sport?.[s],y=e.filter(e=>{let t;return String(e.sport_id)===s&&(t=String(e.status_id),2>=parseInt(e.sport_id)?!c.has(t):!x.has(t))}),_=y.filter(e=>{let t=parseInt(e.time);return t>=g&&t<b}),k=y.filter(e=>{let t=parseInt(e.time);return t>=b&&t<f}),E={all:y.length,live:y.filter(e=>h(e)).length,hot:y.filter(e=>"1"===String(e.hot)).length,today:_.length,tomorrow:k.length},C=(0,l.useMemo)(()=>{if(v){if("all"===o&&Array.isArray(N?.all)&&N.all.length>0)return N.all.slice(0,p).flat().map(e=>j.get(e)).filter(Boolean);let e=v[o];if(Array.isArray(e))return e.map(e=>j.get(e)).filter(Boolean)}return"all"===o?y:"live"===o?y.filter(e=>h(e)):"hot"===o?y.filter(e=>"1"===String(e.hot)):"today"===o?_:"tomorrow"===o?k:y},[o,y,j,N,v,_,k,p]),S="all"===o&&Array.isArray(N?.all)&&p<N.all.length,L=(0,l.useMemo)(()=>"all"!==o&&"live"!==o&&"hot"!==o?[]:C.filter(e=>"1"===String(e.hot)||h(e)).slice(0,4),[C,o]),$=(0,l.useMemo)(()=>{let e=new Map;
200return C.forEach(t=>{let s=t.source_card_meta?.league_label||t.match_data?.competition_vi||t.match_data?.competition_name||t.match_data?.competition_full||"Giải đấu kh\xe1c";e.has(s)||e.set(s,[]),e.get(s).push(t)}),Array.from(e.entries())},[C]);return(0,a.jsxs)("div",{className:"w-full min-h-[500px]",children:[(0,a.jsx)(r,{activeSport:s,onSportChange:n,activeStatus:o,onStatusChange:d,matchesCount:w||E}),0===C.length?(0,a.jsx)("div",{className:"py-20 text-center",children:(0,a.jsx)("div",{className:"text-slate-400 text-base font-medium",children:"Kh\xf4ng c\xf3 trận đấu n\xe0o."})}):(0,a.jsxs)("div",{className:"flex flex-col gap-6",children:[L.length>0&&"all"===o&&(0,a.jsxs)("div",{className:"mb-4",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 mb-3 px-1",children:[(0,a.jsx)("span",{className:"w-2 h-4 rounded-full bg-[#4681E8]"}),(0,a.jsx)("h2",{className:"text-slate-800 font-black text-sm uppercase tracking-wider",children:"Trận đấu t\xe2m điểm"})]}),(0,a.jsx)("div",{className:"grid grid-cols-1 xl:grid-cols-2 gap-2",children:L.map((e,t)=>(0,a.jsx)(i,{match:e},`featured-${e.ls_id||e.id}-${t}`))})]}),(0,a.jsx)("div",{className:"flex flex-col gap-5",children:$.map(([e,t])=>{let s=t[0]?.match_data?.competition_logo;return(0,a.jsxs)("div",{className:"rounded-xl overflow-hidden border border-slate-200 bg-white shadow-sm",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2.5 bg-[#0E1B33] px-4 py-2.5 border-b border-[#0E1B33]",children:[s&&(0,a.jsx)("img",{src:s,alt:"league",className:"w-4 h-4 object-contain brightness-200 opacity-80",loading:"lazy",decoding:"async"}),(0,a.jsx)("h3",{className:"text-white text-[12px] font-bold uppercase tracking-wider truncate",children:e})]}),(0,a.jsx)("div",{className:"flex flex-col",children:t.map((e,t)=>(0,a.jsx)(i,{match:e},e.ls_id||`${e.id}-${t}`))})]},e)})}),S&&(0,a.jsx)("div",{className:"flex justify-center mt-6",children:(0,a.jsx)("button",{type:"button",onClick:()=>u(e=>e+1),className:"inline-flex items-center justify-center rounded-xl border border-[#4681E8]/30 bg-white px-8 py-3 text-[12px] font-bold uppercase tracking-wider text-[#4681E8] transition-all duration-200 hover:bg-[#4681E8] hover:text-white hover:border-[#4681E8]",children:"Tải th\xeam"})})]})]})}},18952:(e,t,s)=>{"use strict";s.d(t,{LiveMatchesClient:()=>m});var a=s(68019),l=s(10707);function r({activeSport:e,onSportChange:t,activeStatus:s,onStatusChange:l,matchesCount:n}){return(0,a.jsxs)("div",{className:"mb-5 flex flex-col gap-3",children:[(0,a.jsx)("div",{className:"flex items-center gap-2 overflow-x-auto pb-1 scrollbar-hide",children:[{id:"1",label:"B\xd3NG Đ\xc1",icon:"⚽"},{id:"2",label:"B\xd3NG RỔ",icon:"\uD83C\uDFC0"},{id:"5",label:"TENNIS",icon:"\uD83C\uDFBE"},{id:"4",label:"CẦU L\xd4NG",icon:"\uD83C\uDFF8"},{id:"3",label:"B\xd3NG CHUYỀN",icon:"\uD83C\uDFD0"},{id:"6",label:"B\xd3NG B\xc0N",icon:"\uD83C\uDFD3"}].map(s=>{let l=e===s.id;return(0,a.jsxs)("button",{type:"button",onClick:()=>t(s.id),className:`flex items-center gap-2 px-4 py-2.5 rounded-xl font-bold text-[12px] whitespace-nowrap transition-all duration-200 border cursor-pointer ${l?"bg-[#4681E8]/10 text-[#4681E8] border-[#4681E8]/40 shadow-[0_0_15px_rgba(70,129,232,0.1)]":"bg-white text-slate-500 border-slate-200 hover:text-slate-700 hover:border-[#4681E8]/30"}`,children:[(0,a.jsx)("span",{className:"text-[14px]",children:s.icon}),(0,a.jsx)("span",{className:"tracking-wider uppercase",children:s.label})]},s.id)})}),(0,a.jsx)("div",{className:"flex items-center gap-1 overflow-x-auto pb-1 scrollbar-hide bg-white rounded-xl p-1.5 border border-slate-200",children:[{id:"all",label:"TẤT CẢ",keyCount:"all"},{id:"live",label:"TRỰC TIẾP",keyCount:"live"},{id:"hot",label:"HOT",keyCount:"hot"},{id:"today",label:"H\xd4M NAY",keyCount:"today"},{id:"tomorrow",label:"NG\xc0Y MAI",keyCount:"tomorrow"}].map(e=>{let t=s===e.id,r=n[e.keyCount]||0;return(0,a.jsxs)("button",{type:"button",onClick:()=>l(e.id),className:`relative px-4 py-2 font-bold text-[12px] whitespace-nowrap transition-all duration-200 uppercase tracking-wider flex items-center gap-2 rounded-lg cursor-pointer ${t?"bg-[#4681E8]/10 text-[#4681E8] shadow-inner":"text-slate-500 hover:text-slate-700 hover:bg-[#4681E8]/5"}`,children:["live"===e.id&&t&&(0,a.jsx)("span",{className:"w-1.5 h-1.5 rounded-full bg-[#4681E8] animate-pulse shadow-[0_0_6px_rgba(70,129,232,0.8)]"}),(0,a.jsx)("span",{children:e.label}),(0,a.jsx)("span",{className:`px-1.5 py-0.5 rounded text-[10px] font-black ${t?"bg-[#4681E8]/20 text-[#4681E8]":"text-slate-400"}`,children:r})]},e.id)})})]})}function n(){return"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='10' fill='%2364748B' fill-opacity='0.18'/%3
200E%3C/svg%3E"}function i({match:e,isLoading:t=!1}){if(t||!e)return(0,a.jsx)("div",{className:"animate-pulse bg-white h-[64px] w-full border-b border-slate-100"});let s=new Date(1e3*parseInt(e.time||0,10)).toLocaleTimeString("vi-VN",{hour:"2-digit",minute:"2-digit",timeZone:"Asia/Ho_Chi_Minh"}),l=function(e,t){if("1"===t||"2"===t)switch(e){case"1":default:return{text:"Sắp diễn",isLive:!1,showScore:!1};case"2":return{text:"H1",isLive:!0,showScore:!0};case"3":return{text:"HT",isLive:!0,showScore:!0};case"4":return{text:"H2",isLive:!0,showScore:!0};case"5":return{text:"Phụ",isLive:!0,showScore:!0};case"7":return{text:"Pen",isLive:!0,showScore:!0};case"8":case"9":return{text:"FT",isLive:!1,showScore:!0}}switch(e){case"0":case"1":return{text:"Sắp diễn",isLive:!1,showScore:!1};case"51":return{text:"S1",isLive:!0,showScore:!0};case"52":return{text:"S2",isLive:!0,showScore:!0};case"53":return{text:"S3",isLive:!0,showScore:!0};case"54":return{text:"S4",isLive:!0,showScore:!0};case"55":return{text:"S5",isLive:!0,showScore:!0};case"100":case"90":case"91":case"110":return{text:"FT",isLive:!1,showScore:!0};default:return{text:"LIVE",isLive:!0,showScore:!0}}}(String(e.status_id),String(e.sport_id)),r=e.time_text||e.source_card_meta?.time_text||"",o=l.isLive,c=e.home_score??"-",d=e.away_score??"-",x=e.home_logo||n(),h=e.away_logo||n();return(0,a.jsxs)("a",{href:`/match/${encodeURIComponent(e.post_name||e.id)}`,className:"flex items-center w-full group border-b border-slate-100 bg-white hover:bg-[#4681E8]/5 transition-colors min-h-[64px]",children:[(0,a.jsx)("div",{className:`w-[60px] flex flex-col items-center justify-center shrink-0 h-full border-r ${o?"border-[#4681E8]/30 bg-[#4681E8]/5":"border-slate-100"}`,children:o?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"text-[#4681E8] font-bold text-[11px] uppercase tracking-wider tabular-nums leading-none",children:r||l.text}),(0,a.jsx)("span",{className:"w-1.5 h-1.5 rounded-full bg-[#4681E8] animate-pulse mt-1"})]}):(0,a.jsx)("span",{className:"text-slate-500 font-medium text-[12px]",children:s})}),(0,a.jsxs)("div",{className:"flex-1 flex flex-col justify-center px-3 py-2 gap-1.5 min-w-0",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between w-full",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2.5 min-w-0 overflow-hidden",children:[(0,a.jsx)("img",{src:x,alt:e.home_name,className:"w-4 h-4 shrink-0 object-contain",onError:e=>e.currentTarget.src=n(),loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-[13px] font-semibold truncate text-slate-800",children:e.home_name})]}),l.showScore&&(0,a.jsx)("span",{className:`text-[15px] font-black tabular-nums shrink-0 ml-2 ${o?"text-[#4681E8]":"text-slate-700"}`,children:c})]}),(0,a.jsxs)("div",{className:"flex items-center justify-between w-full",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2.5 min-w-0 overflow-hidden",children:[(0,a.jsx)("img",{src:h,alt:e.away_name,className:"w-4 h-4 shrink-0 object-contain",onError:e=>e.currentTarget.src=n(),loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-[13px] font-semibold truncate text-slate-800",children:e.away_name})]}),l.showScore&&(0,a.jsx)("span",{className:`text-[15px] font-black tabular-nums shrink-0 ml-2 ${o?"text-[#4681E8]":"text-slate-700"}`,children:d})]})]}),(0,a.jsx)("div",{className:"w-[48px] h-full flex items-center justify-center shrink-0 text-slate-300 group-hover:text-[#4681E8] transition-colors border-l border-slate-100",children:(0,a.jsx)("svg",{className:"w-5 h-5 fill-current",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{d:"M8 5v14l11-7z"})})})]})}let o=new Set(["1","2","3","4","5","7"]),c=new Set(["8","9","15"]),d=new Set(["51","52","53","54","55","56","57","58","59"]),x=new Set(["100","90","91","92","93","110"]);function h(e){let t=String(e.status_id);return 2>=parseInt(e.sport_id)?o.has(t):d.has(t)}function m({matches:e,matchIndex:t}){let[s,n]=(0,l.useState)("1"),[o,d]=(0,l.useState)("all"),[p,u]=(0,l.useState)(1);(0,l.useEffect)(()=>{u(1)},[s,o]);let{todayStart:g,tomorrowStart:b,dayAfterStart:f}=(0,l.useMemo)(()=>{let e,t,s,{vnTodayStartUTC:a,vnTomorrowStartUTC:l,vnDayAfterStartUTC:r}=(s=(t=Math.floor(Date.UTC((e=new Date(Date.now()+252e5)).getUTCFullYear(),e.getUTCMonth(),e.getUTCDate())/1e3)-25200)+86400,{vnTodayStartUTC:t,vnTomorrowStartUTC:s,vnDayAfterStartUTC:s+86400});return{todayStart:a,tomorrowStart:l,dayAfterStart:r}},[]),j=(0,l.useMemo)(()=>new Map(e.map(e=>[e?.match_key?String(e.match_key):e?.ls_id?String(e.ls_id):e?.id?`${String(e.sport_id||"0")}
200:${String(e.id)}`:e?.scheduleId?`${String(e.sport_id||"0")}:schedule:${String(e.scheduleId)}`:[String(e?.sport_id||"0"),String(e?.time||"0"),String(e?.home_name||""),String(e?.away_name||"")].join(":"),e])),[e]),w=t?.summary_by_sport?.[s],v=t?.bucket_keys_by_sport?.[s],N=t?.bucket_pages_by_sport?.[s],y=e.filter(e=>{let t;return String(e.sport_id)===s&&(t=String(e.status_id),2>=parseInt(e.sport_id)?!c.has(t):!x.has(t))}),_=y.filter(e=>{let t=parseInt(e.time);return t>=g&&t<b}),k=y.filter(e=>{let t=parseInt(e.time);return t>=b&&t<f}),E={all:y.length,live:y.filter(e=>h(e)).length,hot:y.filter(e=>"1"===String(e.hot)).length,today:_.length,tomorrow:k.length},C=(0,l.useMemo)(()=>{if(v){if("all"===o&&Array.isArray(N?.all)&&N.all.length>0)return N.all.slice(0,p).flat().map(e=>j.get(e)).filter(Boolean);let e=v[o];if(Array.isArray(e))return e.map(e=>j.get(e)).filter(Boolean)}return"all"===o?y:"live"===o?y.filter(e=>h(e)):"hot"===o?y.filter(e=>"1"===String(e.hot)):"today"===o?_:"tomorrow"===o?k:y},[o,y,j,N,v,_,k,p]),S="all"===o&&Array.isArray(N?.all)&&p<N.all.length,L=(0,l.useMemo)(()=>"all"!==o&&"live"!==o&&"hot"!==o?[]:C.filter(e=>"1"===String(e.hot)||h(e)).slice(0,4),[C,o]),$=(0,l.useMemo)(()=>{let e=new Map;
200return C.forEach(t=>{let s=t.source_card_meta?.league_label||t.match_data?.competition_vi||t.match_data?.competition_name||t.match_data?.competition_full||"Giải đấu kh\xe1c";e.has(s)||e.set(s,[]),e.get(s).push(t)}),Array.from(e.entries())},[C]);return(0,a.jsxs)("div",{className:"w-full min-h-[500px]",children:[(0,a.jsx)(r,{activeSport:s,onSportChange:n,activeStatus:o,onStatusChange:d,matchesCount:w||E}),0===C.length?(0,a.jsx)("div",{className:"py-20 text-center",children:(0,a.jsx)("div",{className:"text-slate-400 text-base font-medium",children:"Kh\xf4ng c\xf3 trận đấu n\xe0o."})}):(0,a.jsxs)("div",{className:"flex flex-col gap-6",children:[L.length>0&&"all"===o&&(0,a.jsxs)("div",{className:"mb-4",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 mb-3 px-1",children:[(0,a.jsx)("span",{className:"w-2 h-4 rounded-full bg-[#4681E8]"}),(0,a.jsx)("h2",{className:"text-slate-800 font-black text-sm uppercase tracking-wider",children:"Trận đấu t\xe2m điểm"})]}),(0,a.jsx)("div",{className:"grid grid-cols-1 xl:grid-cols-2 gap-2",children:L.map((e,t)=>(0,a.jsx)(i,{match:e},`featured-${e.ls_id||e.id}-${t}`))})]}),(0,a.jsx)("div",{className:"flex flex-col gap-5",children:$.map(([e,t])=>{let s=t[0]?.match_data?.competition_logo;return(0,a.jsxs)("div",{className:"rounded-xl overflow-hidden border border-slate-200 bg-white shadow-sm",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2.5 bg-[#0E1B33] px-4 py-2.5 border-b border-[#0E1B33]",children:[s&&(0,a.jsx)("img",{src:s,alt:"league",className:"w-4 h-4 object-contain brightness-200 opacity-80",loading:"lazy",decoding:"async"}),(0,a.jsx)("h3",{className:"text-white text-[12px] font-bold uppercase tracking-wider truncate",children:e})]}),(0,a.jsx)("div",{className:"flex flex-col",children:t.map((e,t)=>(0,a.jsx)(i,{match:e},e.ls_id||`${e.id}-${t}`))})]},e)})}),S&&(0,a.jsx)("div",{className:"flex justify-center mt-6",children:(0,a.jsx)("button",{type:"button",onClick:()=>u(e=>e+1),className:"inline-flex items-center justify-center rounded-xl border border-[#4681E8]/30 bg-white px-8 py-3 text-[12px] font-bold uppercase tracking-wider text-[#4681E8] transition-all duration-200 hover:bg-[#4681E8] hover:text-white hover:border-[#4681E8]",children:"Tải th\xeam"})})]})]})}},19789:(e,t,s)=>{"use strict";s.d(t,{Klivevip19MatchDetailPage:()=>m});var a=s(68019),l=s(10707),r=s(58420);function n({src:e,poster:t,autoPlay:s=!0,onError:i,className:o=""}){let c=(0,l.useRef)(null),d=(0,l.useRef)(i);d.current=i;let[x,h]=(0,l.useState)(!1),[m,p]=(0,l.useState)(!1);return((0,l.useEffect)(()=>{let t=c.current;if(!t)return;let a=null;h(!1);let l=()=>p(!0),n=()=>p(!1);t.addEventListener("play",l),t.addEventListener("pause",n);let i=()=>{s&&(t.muted=!0,t.play().catch(()=>{}))};if(t.addEventListener("canplay",i),r.Ay.isSupported()){(a=new r.Ay({maxBufferLength:30,maxMaxBufferLength:60,lowLatencyMode:!0,enableWorker:!0})).loadSource(e),a.attachMedia(t),a.on(r.Ay.Events.MANIFEST_PARSED,()=>{s&&(t.muted=!0,t.play().catch(e=>{console.warn("AutoPlay failed:",e),t.muted=!1}))});let l=0,n=0;a.on(r.Ay.Events.ERROR,(e,t)=>{if(t.type===r.Ay.ErrorTypes.NETWORK_ERROR&&(++l>2||t.response&&t.response.code>=400)){console.error("HLS Network Error threshold reached (CORS/404), triggering fallback.",t),h(!0),d.current&&d.current(t),a?.destroy();return}if(t.fatal)switch(t.type){case r.Ay.ErrorTypes.NETWORK_ERROR:console.error("HLS Fatal Network Error, recovering...",t),a?.startLoad();break;case r.Ay.ErrorTypes.MEDIA_ERROR:console.error("HLS Media Error, recovering...",t),++n>3?(console.error("HLS Media Error threshold reached, triggering fallback."),h(!0),d.current&&d.current(t),a?.destroy()):a?.recoverMediaError();break;default:console.error("HLS Fatal Error:",t),h(!0),d.current&&d.current(t),a?.destroy()}})}else t.canPlayType("application/vnd.apple.mpegurl")&&(t.src=e,t.addEventListener("loadedmetadata",()=>{s&&t.play().catch(e=>{console.warn("AutoPlay failed:",e)})}),t.addEventListener("error",e=>{h(!0),d.current&&d.current(e)}));return()=>{t.removeEventListener("play",l),t.removeEventListener("pause",n),t.removeEventListener("canplay",i),a&&a.destroy()}},[e,s]),x)?i?null:(0,a.jsxs)("div",{className:`w-full h-full flex flex-col items-center justify-center bg-white/80 backdrop-blur ${o}`,children:[(0,a.jsx)("svg",{className:"w-12 h-12 text-red-500 mb-4 opacity-80",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"})}),(0,a.jsx)("div",{className:"text-slate-600 text-sm font-medium",children:"Video/Stream kh\xf4ng khả dụng hoặc bị lá
200»—i mạng"}),(0,a.jsx)("div",{className:"text-gray-500 text-xs mt-1",children:"Vui l\xf2ng thá»­ lại sau hoặc chọn nguồn kh\xe1c"})]}):(0,a.jsx)("div",{className:`relative group w-full h-full bg-white flex items-center justify-center overflow-hidden ${o}`,children:(0,a.jsx)("video",{ref:c,className:"w-full h-full object-contain",controls:!0,playsInline:!0,muted:s,poster:t,referrerPolicy:"no-referrer"})})}function i(e){let t=(e||"").split(/[\s-]+/).slice(0,2).map(e=>e[0]||"").join("").toUpperCase()||"??";return`data:image/svg+xml,${encodeURIComponent(`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 80 80"><rect width="80" height="80" rx="20" fill="#1a1c25"/><text x="40" y="47" font-size="20" font-family="Arial" font-weight="700" text-anchor="middle" fill="#666">${t}</text></svg>`)}`}function o({homeName:e,awayName:t,homeLogo:s,awayLogo:l,homeScore:r="0",awayScore:n="0",statusText:c="LIVE",timeText:d="",isLive:x=!0,sportId:h="1",matchId:m}){let p=s||i(e),u=l||i(t),g="5"===String(h),b="2"===String(h),f="bg-slate-200 border-slate-200",j="repeating-linear-gradient(90deg, transparent, transparent 10%, #000 10%, #000 20%)";return g?(f="bg-slate-100 border-slate-200",j="none"):b&&(f="bg-[#bc7a46] border-[#8a4e21]",j="repeating-linear-gradient(90deg, transparent, transparent 5%, #000 5%, #000 10%)"),(0,a.jsxs)("div",{className:"relative w-full aspect-video min-h-[300px] max-h-[600px] bg-slate-50 overflow-hidden flex flex-col justify-center",children:[(0,a.jsx)("div",{className:"absolute inset-0 flex items-center justify-center pointer-events-none mt-16 md:mt-24",children:(0,a.jsx)("div",{className:"relative w-[120%] h-[120%] sm:w-[90%] sm:h-[120%] max-w-[900px] flex-shrink-0 transition-transform duration-1000",style:{transform:"perspective(900px) rotateX(60deg) scale(0.9)",transformOrigin:"center center"},children:(0,a.jsxs)("div",{className:`absolute inset-0 ${f} shadow-[0_30px_60px_rgba(0,0,0,0.8)] border-4 rounded-xl overflow-hidden flex transition-colors duration-500`,children:[(0,a.jsx)("div",{className:"absolute inset-0 opacity-15 pointer-events-none",style:{backgroundImage:j}}),(0,a.jsxs)("div",{className:"absolute inset-[4%] pointer-events-none shadow-sm flex items-center justify-center",children:["1"===String(h)&&(0,a.jsxs)("div",{className:"absolute inset-0 w-full h-full border-2 border-white/60",children:[(0,a.jsx)("div",{className:"absolute left-1/2 top-0 bottom-0 w-0 border-l-2 border-white/60 -translate-x-1/2"}),(0,a.jsx)("div",{className:"absolute left-1/2 top-1/2 w-[18%] aspect-square rounded-full border-2 border-white/60 -translate-x-1/2 -translate-y-1/2"}),(0,a.jsx)("div",{className:"absolute left-1/2 top-1/2 w-2 h-2 rounded-full bg-white/80 -translate-x-1/2 -translate-y-1/2"}),(0,a.jsx)("div",{className:"absolute left-0 top-1/2 w-[16%] h-[46%] border-2 border-l-0 border-white/60 -translate-y-1/2 bg-slate-200"}),(0,a.jsx)("div",{className:"absolute left-0 top-1/2 w-[6%] h-[20%] border-2 border-l-0 border-white/60 -translate-y-1/2 bg-slate-200"}),(0,a.jsx)("div",{className:"absolute left-[16%] top-1/2 w-[8%] aspect-square border-2 border-l-0 border-white/60 rounded-r-full -translate-y-1/2 clip-path-half",style:{clipPath:"inset(0 0 0 50%)"}}),(0,a.jsx)("div",{className:"absolute right-0 top-1/2 w-[16%] h-[46%] border-2 border-r-0 border-white/60 -translate-y-1/2 bg-slate-200"}),(0,a.jsx)("div",{className:"absolute right-0 top-1/2 w-[6%] h-[20%] border-2 border-r-0 border-white/60 -translate-y-1/2 bg-slate-200"}),(0,a.jsx)("div",{className:"absolute right-[16%] top-1/2 w-[8%] aspect-square border-2 border-r-0 border-white/60 rounded-l-full -translate-y-1/2 clip-path-half",style:{clipPath:"inset(0 50% 0 0)"}})]}),g&&(0,a.jsxs)("div",{className:"absolute inset-[10%] w-[80%] h-[80%] border-2 border-white/80 bg-white",children:[(0,a.jsx)("div",{className:"absolute top-[10%] bottom-[10%] left-0 right-0 border-y-2 border-white/80"}),(0,a.jsx)("div",{className:"absolute left-1/2 top-[-2%] bottom-[-2%] w-1 bg-white/40 shadow-xl -translate-x-1/2 z-10"}),(0,a.jsx)("div",{className:"absolute left-[25%] right-[25%] top-[10%] bottom-[
20010%] border-x-2 border-white/80"}),(0,a.jsx)("div",{className:"absolute left-[25%] right-[25%] top-1/2 w-[50%] border-t-2 border-white/80 -translate-y-1/2"}),(0,a.jsx)("div",{className:"absolute left-0 top-1/2 w-[2%] border-t-2 border-white/80 -translate-y-1/2"}),(0,a.jsx)("div",{className:"absolute right-0 top-1/2 w-[2%] border-t-2 border-white/80 -translate-y-1/2"})]}),b&&(0,a.jsxs)("div",{className:"absolute inset-0 w-full h-full border-2 border-white/50",children:[(0,a.jsx)("div",{className:"absolute left-1/2 top-0 bottom-0 w-0 border-l-2 border-white/50 -translate-x-1/2"}),(0,a.jsx)("div",{className:"absolute left-1/2 top-1/2 w-[15%] aspect-square rounded-full border-2 border-white/50 -translate-x-1/2 -translate-y-1/2"}),(0,a.jsx)("div",{className:"absolute left-0 top-1/2 w-[18%] h-[35%] border-2 border-l-0 border-white/50 -translate-y-1/2 bg-[#bc7a46]"}),(0,a.jsx)("div",{className:"absolute left-[18%] top-1/2 w-[10%] aspect-square rounded-full border-2 border-white/50 -translate-y-1/2"}),(0,a.jsx)("div",{className:"absolute left-0 top-1/2 w-[30%] h-[70%] border-2 border-l-0 border-white/50 rounded-r-full -translate-y-1/2 opacity-60"}),(0,a.jsx)("div",{className:"absolute right-0 top-1/2 w-[18%] h-[35%] border-2 border-r-0 border-white/50 -translate-y-1/2 bg-[#bc7a46]"}),(0,a.jsx)("div",{className:"absolute right-0 top-1/2 w-[30%] h-[70%] border-2 border-r-0 border-white/50 rounded-l-full -translate-y-1/2 opacity-60"})]})]}),x&&(0,a.jsx)("div",{className:`absolute left-1/2 top-1/2 shadow-[0_8px_16px_rgba(0,0,0,0.8)] z-10 transition-all duration-[3000ms] border-2 border-white/20 rounded-full
201                                ${g?"w-2 h-2 sm:w-3 sm:h-3 bg-[#ccff00]":b?"w-4 h-4 sm:w-6 sm:h-6 bg-[#d95d16]":"w-4 h-4 sm:w-5 sm:h-5 bg-white"}`,style:{animation:"ballMove 8s infinite alternate ease-in-out",transform:"translate(-50%, -50%)"},children:(0,a.jsx)("div",{className:"absolute -bottom-4 left-1/2 w-4 h-2 bg-white/40 rounded-full blur-sm -translate-x-1/2"})}),x&&(0,a.jsxs)("div",{className:"absolute left-[65%] top-[60%] flex flex-col items-center animate-bounce-slow",style:{animation:"floatBubble 4s infinite alternate ease-in-out"},children:[(0,a.jsxs)("div",{className:"bg-white/95 backdrop-blur border border-white/10 rounded-2xl p-2 shadow-2xl flex items-center gap-3 w-max max-w-[200px]",children:[(0,a.jsx)("div",{className:"w-6 h-6 rounded-full flex items-center justify-center p-0.5 bg-white/5 shrink-0",children:(0,a.jsx)("img",{src:p,alt:e||"Home team",className:"max-w-full max-h-full object-contain",onError:t=>t.target.src=i(e),loading:"lazy",decoding:"async"})}),(0,a.jsx)("div",{className:"flex flex-col pr-1 overflow-hidden",children:(0,a.jsx)("span",{className:"text-slate-900 font-bold text-[10px] sm:text-xs tracking-wide truncate",children:g?"Serve / Return":"Tấn c\xf4ng nguy hiểm"})})]}),(0,a.jsx)("div",{className:"w-0 h-0 border-l-[6px] border-r-[6px] border-t-[6px] border-l-transparent border-r-transparent border-t-[#1a1c28]/95 mt-[-1px]"})]})]})})}),(0,a.jsx)("div",{className:"relative z-20 flex-1 flex flex-col items-center justify-start p-4 md:p-6 pointer-events-none w-full",children:(0,a.jsxs)("div",{className:"w-full max-w-[800px] flex items-center justify-between px-4 sm:px-6 py-3 rounded-xl bg-gradient-to-r from-[#0d0f14]/90 via-[#151821]/95 to-[#0d0f14]/90 backdrop-blur-xl border border-white/10 shadow-[0_10px_40px_rgba(0,0,0,0.8)] pointer-events-auto",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 flex-1 min-w-0 pr-2",children:[(0,a.jsx)("img",{src:p,alt:e,className:"w-8 h-8 md:w-12 md:h-12 object-contain drop-shadow-lg shrink-0",onError:t=>t.target.src=i(e),loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-slate-900 text-xs sm:text-sm md:text-base font-bold truncate tracking-wide",children:e})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1 shrink-0 px-2 sm:px-6 min-w-[100px]",children:[(0,a.jsxs)("span",{className:`inline-flex items-center gap-1.5 px-2.5 py-0.5 rounded-full text-[10px] sm:text-xs font-bold shadow-inner ${x?"bg-green-500/10 text-green-400 border border-green-500/20":"bg-white/5 text-slate-900/40"}`,children:[x&&(0,a.jsx)("span",{className:"w-1.5 h-1.5 rounded-full bg-green-500 animate-pulse shadow-[0_0_8px_#22c55e]"}),d||c]}),(0,a.jsxs)("div",{className:"flex gap-3 sm:gap-5 items-center justify-center",children:[(0,a.jsx)("span",{className:"text-slate-900 text-2xl sm:text-4xl font-black drop-shadow-md",children:r}),(0,a.jsx)("span",{className:"text-slate-900/30 text-xl font-light",children:"-"}),(0,a.jsx)("span",{className:"text-slate-900 text-2xl sm:text-4xl font-black drop-shadow-md",children:n})]})]}),(0,a.jsxs)("div",{className:"flex items-center justify-end gap-3 flex-1 min-w-0 pl-2 text-right",children:[(0,a.jsx)("span",{className:"text-slate-900 text-xs sm:text-sm md:text-base font-bold truncate tracking-wide",children:t}),(0,a.jsx)("img",{src:u,alt:t,className:"w-8 h-8 md:w-12 md:h-12 object-contain drop-shadow-lg shrink-0",onError:e=>e.target.src=i(t),loading:"lazy",decoding:"async"})]})]})}),(0,a.jsx)("div",{className:"relative z-20 mt-auto w-full p-4 flex justify-center pointer-events-none",children:(0,a.jsx)("div",{className:"w-full max-w-[600px] h-6 bg-white/40 backdrop-blur-md rounded-full border border-white/5 flex items-center px-4",children:(0,a.jsxs)("div",{className:"flex-1 h-0.5 bg-white/10 relative rounded-full",children:[x&&(0,a.jsx)("div",{className:"absolute left-0 top-0 bottom-0 bg-gradient-to-r from-[#b38b22] to-[#ffda6a] w-[65%] rounded-full opacity-90 shadow-[0_0_12px_#daa520]"}),(0,a.jsx)("span",{className:"absolute left-[65%] top-1/2 -translate-y-1/2 -translate-x-1/2 w-1.5 h-1.5 rounded-full bg-white shadow-md"})]})})}),(0,a.jsx)("style",{children:`
202                @keyframes ballMove {
203                    0% { transform: translate(-30%, -20%) scale(1); }
204                    25% { transform: translate(40%, -10%) scale(1.1); }
205                    50% { transform: translate(20%, 30%) scale(0.9); }
206                    75% { transform: translate(-10%, 15%) scale(1.2); }
207                    100% { transform: translate(-45%, 0%) scale(1); }
208                }
209                @keyframes floatBubble {
210                    0% { transform: translateY(0px) translateX(0px); }
211                    50% { transform: translateY(-8px) translateX(4px); }
212                    100% { transform: translateY(4px) translateX(-4px); }
213                }
214            `})]})}function c(e,t){if("1"===t||"2"===t)switch(e){case"2":return{t:"HT 1",live:!0,sc:!0};case"3":return{t:"Giữa giờ",live:!0,sc:!0};case"4":return{t:"HT 2",live:!0,sc:!0};case"5":return{t:"Hiệp phụ",live:!0,sc:!0};case"7":return{t:"Penalty",live:!0,sc:!0};case"8":case"9":return{t:"Kết th\xfac",live:!1,sc:!0};default:return{t:"Chưa bắt đầu",live:!1,sc:!1}}
214return["51","52","53","54","55"].includes(e)?{t:`Set ${e-50}`,live:!0,sc:!0}:["100","90","110"].includes(e)?{t:"KT",live:!1,sc:!0}:"0"===e||"1"===e?{t:"Chưa bắt đầu",live:!1,sc:!1}:{t:"LIVE",live:!0,sc:!0}}function d(e){let t=(e||"").split(/[\s-]+/).slice(0,2).map(e=>e[0]||"").join("").toUpperCase()||"??";return`data:image/svg+xml,${encodeURIComponent(`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 80 80"><rect width="80" height="80" rx="20" fill="#1a1c25"/><text x="40" y="47" font-size="20" font-family="Arial" font-weight="700" text-anchor="middle" fill="#666">${t}</text></svg>`)}`}function x(e){let t=new Date(1e3*parseInt(e||"0",10));return{hm:t.toLocaleTimeString("vi-VN",{hour:"2-digit",minute:"2-digit",timeZone:"Asia/Ho_Chi_Minh"}),dm:t.toLocaleDateString("vi-VN",{day:"2-digit",month:"2-digit",timeZone:"Asia/Ho_Chi_Minh"}),full:t.toLocaleDateString("vi-VN",{day:"2-digit",month:"2-digit",year:"numeric",timeZone:"Asia/Ho_Chi_Minh"})}}let h="max-w-[1200px]";function m({matchData:e,relatedMatches:t,matchDetails:s,standings:r,brandingNameUpper:i}){let p,u,g,j,v,y,[C,S]=(0,l.useState)("odds"),L=e?.match_data?.anchors||[],[$,F]=(0,l.useState)(!1),[T,A]=(0,l.useState)(!1),[M,H]=(0,l.useState)(null),[D,B]=(0,l.useState)(!1),z=(0,l.useRef)(0);(0,l.useEffect)(()=>{if(!e?.has_live||"1"!==e.has_live||0===L.length)return;let t=!1;B(!0);let s=async t=>{let s=t?.uid,a=`/api/socolive/proxy-stream?url=${encodeURIComponent(`https://live.inplyr.com/${s?`room/${s}`:`default/${e.id}`}.m3u8`)}`;try{let e=await fetch(a,{method:"GET",cache:"no-store"});if(!e.ok)return null;let s=(await e.text()).split("\n").filter(e=>e.trim()&&!e.startsWith("#"));if(0===s.length)return null;return(await fetch(s[0],{method:"HEAD",cache:"no-store"})).ok?t:null}catch{return null}};return Promise.all(L.map(e=>s(e))).then(e=>{if(t)return;let s=e.find(e=>null!==e);s?(H(s),F(!0),A(!1)):(H(L[0]),A(!0)),B(!1)}),()=>{t=!0}},[e?.has_live,L.length]),(0,l.useEffect)(()=>{if(!T||D||z.current>=20)return;let t=setTimeout(()=>{z.current++,A(!1),B(!0);let t=async t=>{let s=t?.uid,a=`/api/socolive/proxy-stream?url=${encodeURIComponent(`https://live.inplyr.com/${s?`room/${s}`:`default/${e.id}`}.m3u8`)}`;try{let e=await fetch(a,{method:"GET",cache:"no-store"});if(!e.ok)return null;let s=(await e.text()).split("\n").filter(e=>e.trim()&&!e.startsWith("#"));if(0===s.length)return null;return(await fetch(s[0],{method:"HEAD",cache:"no-store"})).ok?t:null}catch{return null}};Promise.all(L.map(e=>t(e))).then(e=>{let t=e.find(e=>null!==e);t?(H(t),F(!0),A(!1)):A(!0),B(!1)})},15e3);return()=>clearTimeout(t)},[T,D]);let[I,R]=(0,l.useState)(null),U=e?.post_name||e?.ls_id||e?.id;if(window.location.origin,(0,l.useEffect)(()=>{if(!U)return;let e=setInterval(async()=>{try{let e=await fetch(`/api/klivevip/match/${U}`,{cache:"no-store"});if(e.ok){let t=await e.json();R(t?.match??null)}}catch{}},1e4);return()=>clearInterval(e)},[U]),!e)return(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center py-32 gap-4",children:[(0,a.jsx)("span",{className:"text-[#64748B] text-lg",children:"Kh\xf4ng t\xecm thấy trận đấu"}),(0,a.jsx)("a",{href:"/",className:"text-[#4681E8] hover:underline text-sm",children:"← Quay lại"})]});let G=I?{...e,...I}:e,P=G?.has_live==="1"&&L.length>0,K=c(G.status_id,G.sport_id),V=$&&M&&!T&&!D,W=P&&(D||T&&K.live&&z.current<20),O=!P||T&&!W&&!D,q=!K.live&&"8"!==String(G.status_id)&&"9"!==String(G.status_id),{hm:X,full:Y}=x(G.time),Z=G.source_card_meta?.league_label||G.match_data?.competition_vi||G.match_data?.competition_full||"",Q=G.match_data?.stage_label||G.source_card_meta?.stage_label||"",J=G.home_logo||d(G.home_name),ee=G.away_logo||d(G.away_name),et=e=>t=>{t.target.src=d(e)};return(0,a.jsxs)("div",{className:"w-full bg-white min-h-screen text-slate-600 font-sans pb-16",children:[(0,a.jsx)("div",{className:"w-full border-b border-slate-200 bg-white",children:(0,a.jsxs)("div",{className:`${h} mx-auto px-4 py-3 flex items-center justify-between`,children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 text-[13px] font-bold",children:[(0,a.jsx)("span",{className:"text-[#4681E8] uppercase tracking-wide",children:Z}),Q&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"text-slate-300",children:"•"}),(0,a.jsx)("span",{className:"text-slate-600",children:Q})]})]}),(0,a.jsx)("div",{className:"text-[12px] font-mono text-slate-400 hidden sm:block",children:Y})]})}),(0,a.jsxs)("div",{className:`${h} mx-auto px-0 md:px-4 py-0 md:py-6 flex flex-col lg:flex-row gap-4 lg:gap-6`,children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0 flex flex-col gap-4 lg:gap-6",children:[(0,a.jsxs)("div",{className:"w-full relative bg-[#000000] rounded-none md:rounded-2xl overflow-hidden shadow-[0_10px_40px_rgba(0,0,0,0.5)] border-y md:border border-slate-200",children:[(0,a.jsx)("div",{className:"relative w-full aspect-video bg-[#000000] group z-10",children:V?(0,a.jsx)(n,{src:`/api/klivevip/proxy-stream?url=${encodeURIComponent(`https://live.inplyr.com/${M?.uid&&"default"!==M.uid?`room/${M.uid}`:`default/${G.id}`}.m3u8`)}`,autoPlay:!0,onError:()=>A(!0)}):O?(0,a.jsx)(o,{homeName:G.home_name,awayName:G.away_name,homeLogo:G.home_logo,awayLogo:G.away_logo,homeScore:K.sc?G.home_score:"0",awayScore:K.sc?G.away_score:"0",statusText:K.t,timeText:G.time_text||X,isLive:K.live,sportId:G.sport_id,matchId:G.ls_id||G.id,kickoffMs:1e3*Number(G?.time||0),isPreMatch:q}):(0,a.jsxs)("div",{className:"absolute inset-0 z-10 flex flex-col items-center justify-center p-4 lg:p-10",children:[(0,a.jsxs)("div",{className:"absolute inset-0 flex justify-between items-center opacity-[0.03] pointer-events-none px-4 lg:px-20 overflow-hidden",children:[(0,a.jsx)("img",{src:J,alt:"",className:"w-1/2 max-w-[400px] blur-[10px]",loading:"lazy",decoding:"async"}),(0,a.jsx)("img",{src:ee,alt:"",className:"w-1/2 max-w-[400px] blur-[10px]",loading:"lazy",decoding:"async"})]}),P&&!T&&(0,a.jsx)("button",{onClick:()=>F(!0),className:"group mb-4 sm:mb-8 w-16 h-16 md:w-20 md:h-20 rounded-full bg-[#4681E8] flex items-center justify-center hover:bg-[#55CAF1] transition-all shadow-[0_0_30px_rgba(70,129,232,0.5)] curs
214or-pointer z-20",children:(0,a.jsx)("svg",{className:"w-8 h-8 md:w-10 md:h-10 text-white ml-1.5 md:ml-2 group-hover:scale-110 transition-transform",viewBox:"0 0 24 24",fill:"currentColor",children:(0,a.jsx)("path",{d:"M8 5v14l11-7z"})})}),(0,a.jsxs)("div",{className:"grid grid-cols-[1fr_auto_1fr] items-center w-full max-w-[800px] gap-2 lg:gap-8 z-20",children:[(0,a.jsxs)("div",{className:"flex flex-col items-center gap-2 lg:gap-4",children:[(0,a.jsx)("img",{src:J,alt:G.home_name,className:"w-16 h-16 sm:w-24 sm:h-24 lg:w-32 lg:h-32 object-contain drop-shadow-[0_10px_20px_rgba(0,0,0,0.8)]",onError:et(G.home_name),loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-[#FFFFFF] text-xs sm:text-base lg:text-lg font-black text-center line-clamp-2 uppercase tracking-wide",children:G.home_name})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-2 lg:gap-3",children:[K.sc?(0,a.jsxs)("div",{className:"flex items-center gap-3 lg:gap-6 bg-white/90 backdrop-blur-md px-4 py-2 lg:px-8 lg:py-4 rounded-2xl border border-slate-200 shadow-2xl",children:[(0,a.jsx)("span",{className:"text-[#4681E8] text-[32px] sm:text-[48px] lg:text-[64px] font-black leading-none",children:G.home_score}),(0,a.jsx)("span",{className:"text-slate-300 text-[20px] lg:text-[28px] font-light",children:":"}),(0,a.jsx)("span",{className:"text-[#4681E8] text-[32px] sm:text-[48px] lg:text-[64px] font-black leading-none",children:G.away_score})]}):(0,a.jsx)("div",{className:"text-[#FFFFFF] text-[32px] sm:text-[48px] lg:text-[56px] font-black tracking-widest leading-none drop-shadow-xl",children:X}),(0,a.jsxs)("span",{className:`inline-flex items-center gap-2 rounded-full px-3 py-1 lg:px-5 lg:py-1.5 text-[10px] lg:text-[12px] font-bold tracking-widest uppercase ${K.live?"bg-[#4681E8] text-white shadow-[0_0_20px_rgba(70,129,232,0.6)]":"bg-white text-slate-600 border border-slate-200"}`,children:[K.live&&(0,a.jsx)("span",{className:"w-2 h-2 rounded-full bg-white animate-pulse"}),K.t,G.time_text?` : ${G.time_text}`:""]})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-2 lg:gap-4",children:[(0,a.jsx)("img",{src:ee,alt:G.away_name,className:"w-16 h-16 sm:w-24 sm:h-24 lg:w-32 lg:h-32 object-contain drop-shadow-[0_10px_20px_rgba(0,0,0,0.8)]",onError:et(G.away_name),loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-[#FFFFFF] text-xs sm:text-base lg:text-lg font-black text-center line-clamp-2 uppercase tracking-wide",children:G.away_name})]})]})]})}),L.length>0&&(0,a.jsxs)("div",{className:"w-full bg-white border-t border-slate-200 px-3 lg:px-6 py-2.5 lg:py-4 flex items-center gap-2 lg:gap-4 overflow-x-auto z-20",children:[(0,a.jsx)("span",{className:"text-[10px] lg:text-[11px] text-slate-600 uppercase font-bold tracking-widest shrink-0 mr-1 lg:mr-2",children:"CHỌN K\xcaNH TRUYỀN:"}),L.map((e,t)=>(0,a.jsxs)("button",{onClick:()=>{H(e),F(!0),A(!1)},className:`shrink-0 flex items-center gap-1.5 lg:gap-2 rounded-full px-3 py-1.5 lg:px-5 lg:py-2 text-[11px] lg:text-[13px] font-bold transition-all ${M?.uid===e.uid&&!T?"bg-[#4681E8]/10 border border-[#4681E8] text-[#4681E8] shadow-[0_0_15px_rgba(70,129,232,0.2)]":"bg-white border border-slate-200 text-slate-600 hover:text-[#4681E8] hover:border-[#4681E8]/50"}`,children:[(0,a.jsx)("span",{className:`w-1.5 h-1.5 lg:w-2 lg:h-2 rounded-full ${M?.uid===e.uid&&!T?"bg-[#4681E8] animate-pulse":"bg-transparent"}`}),"BLV ",e.nickName||`K\xeanh ${t+1}`]},e.uid||t))]})]}),(p=(()=>{let e=s?.stats;if(!e)return!1;let t=null;return Array.isArray(e)&&e.length>0?t=e[0]:e?.results?.[0]?t=e.results[0]:e?.stats_full_time&&(t=e),!!t&&!!(t.stats_full_time?.length>0||t.stats_haft_time?.length>0||t.stats_half_time?.length>0||t.stats?.length>0)})(),u=!!(s?.lineup&&(Array.isArray(s.lineup)?s.lineup.length>0:s.lineup.home||s.lineup.away)),g=!!(s?.events&&(Array.isArray(s.events)?s.events.length>0:s.events.incidents?.length>0||s.events.data?.length>0)),j=!!(r&&(Array.isArray(r)?r.length>0:r.data?.length>0)),(y=(v=[{id:"stats",label:"THỐNG K\xca",show:p},{id:"lineup",label:"ĐỘI H\xccNH",show:u},{id:"events",label:"DIỄN BIẾN",show:g},{id:"standings",label:"BẢNG XH",show:j},{id:"odds",label:"TỶ LỆ K\xc8O",show:!!(s?.odds&&Array.isArray(s.odds)&&s.odds.length>0)}].filter(e=>e.show)).find(e=>e.id===C)?C:v[0]?.id||"odds")!==C&&setTimeout(()=>S(y),0),v.length>0?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"bg-white rounded-2xl p-2 border border-slate-200 flex overflow-x-auto gap-2 shadow-[0_4px_15px_rgba(0,0,0,0.08)] mx-4 md:mx-0",children:v.map(({id:e,label:t})=>(0,a.jsx)("button",{onClick:()=>S(e),className:`flex-1 min-w-[100px] py-2.5 sm:py-3 text-[10px] sm:text-[12px] font-black uppercase tracking-widest rounded-xl transition-all ${y===e?"bg-[#4681E8]/10 text-[#4681E8] border border-[#4681E8]/30 shadow-inner":"text-slate-500 hover:text-[#4681E8] hover:bg-[#4681E8]/5 border border-transparent"}`,children:t},e))}),(0,a.jsxs)("div",{className:"bg-white rounded-2xl border border-slate-200 overflow-hidden shadow-[0_4px_15px_rgba(0,0,0,0.08)] min-h-[400px] mx-4 md:mx-0",children:["stats"===y&&(0,a.jsx)(b,{matchDetails:s}),"lineup"===y&&(0,a.jsx)(f,{matchDetails:s}),"events"===y&&(0,a.jsx)(_,{events:s?.events}),"standings"===y&&(0,a.jsx)(k,{standings:r}),"odds"===y&&(0,a.jsx)(E,{odds:s?.odds})]})]}):null),t.length>0&&(0,a.jsxs)("div",{className:"mt-4 mx-4 md:mx-0",children:[(0,a.jsxs)("h2",{className:"px-1 py-4 text-sm sm:text-base font-black text-slate-800 uppercase flex items-center gap-3 tracking-widest border-b border-slate-100 mb-4",children:[(0,a.jsx)("span",{className:"w-1 h-5 bg-[#4681E8] rounded-sm shadow-[0_0_8px_#4681E8]"}),"TRẬN ĐẤU C\xd9NG GIẢI"]}),(0,a.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3 sm:gap-4",children:t.slice(0,4).map(e=>(0,a.jsx)(w,{m:e},e.id))})]})]}),(0,a.jsx)("div",{className:"w-full lg:w-[350px] xl:w-[400px] shrink-0 px-4 md:px-0",children:(0,a.jsxs)("div",{className:"bg-white border border-slate-200 rounded-2xl overflow-hidden flex flex-col shadow-[0_10px_30px_rgba(0,0,0,0.1)] lg:sticky lg:top-8 h-[600px] lg:h-[c
214alc(100vh-100px)] lg:max-h-[850px]",children:[(0,a.jsxs)("div",{className:"px-5 py-4 border-b border-slate-200 flex items-center justify-between bg-white",children:[(0,a.jsxs)("h3",{className:"text-slate-800 text-sm font-black uppercase tracking-widest flex items-center gap-2",children:[(0,a.jsx)("span",{className:"w-2.5 h-2.5 rounded-full bg-[#4681E8] shadow-[0_0_10px_rgba(70,129,232,0.4)]"}),"PH\xd2NG CHAT"]}),(0,a.jsxs)("span",{className:"text-[10px] bg-white px-3 py-1.5 rounded-full text-[#4681E8] font-mono border border-[#4681E8]/30 shadow-inner tracking-widest flex items-center gap-1.5",children:[(0,a.jsx)("svg",{className:"w-3 h-3",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 10l4.553-2.276A1 1 0 0121 8.618v6.764a1 1 0 01-1.447.894L15 14M5 18h8a2 2 0 002-2V8a2 2 0 00-2-2H5a2 2 0 00-2 2v8a2 2 0 002 2z"})}),L.length," BLV"]})]}),(0,a.jsx)("div",{className:"flex-1 bg-[#FFFFFF]/40 min-h-0 chat-container-wrapper",children:(0,a.jsx)(N,{anchors:L,selectedAnchor:M})})]})})]})]})}let p={25:"KIỂM SO\xc1T B\xd3NG",24:"CHUYỀN CH\xcdNH X\xc1C",23:"TỔNG SỐ ĐƯỜNG CHUYỀN",22:"TẤN C\xd4NG",21:"T.C\xd4NG NGUY HIỂM",2:"S\xdaT TR\xdaNG Đ\xcdCH",37:"PHẠT G\xd3C",28:"N\xc9M BI\xcaN",8:"VIỆT VỊ",3:"THẺ V\xc0NG",4:"THẺ ĐỎ",5:"S\xdaT PENALTY",29:"PHẠM LỖI",26:"Đ\xc1NH ĐẦU",27:"CỨU THUA",1:"B\xc0N THẮNG",7:"PHẢN LƯỚI"},u=[25,21,22,24,2,23,4,3,37,28,8,5,29],g="https://cdn.sportdb.live/upload/team/";function b({matchDetails:e}){let[t,s]=(0,l.useState)("full"),r=e?.stats,n=e?.lineup,i=n?.match?.home_team,o=n?.match?.away_team,c=null;Array.isArray(r)&&r.length>0?c=r[0]:r?.results?.[0]?c=r.results[0]:r?.stats_full_time&&(c=r);let d={full:c?.stats_full_time||[],h1:c?.stats_haft_time||c?.stats_half_time||[],h2:c?.stats_haft_time_2nd_half||[]}[t]||[];if(!c||0===d.length)return(0,a.jsx)(j,{text:"Thống k\xea sẽ được cập nhật khi trận đấu bắt đầu"});let x=[...d].sort((e,t)=>{let s=u.indexOf(e.type),a=u.indexOf(t.type);return(-1===s?999:s)-(-1===a?999:a)});return(0,a.jsxs)("div",{className:"flex flex-col",children:[(i||o)&&(0,a.jsxs)("div",{className:"flex items-center justify-between px-4 py-3 border-b border-slate-100",children:[(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5 w-20",children:[i?.logo&&(0,a.jsx)("img",{src:g+i.logo,alt:i?.name||"Home team",className:"w-8 h-8 object-contain",onError:e=>e.target.style.display="none",loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-slate-600 text-[10px] font-medium text-center leading-tight",children:i?.name||""})]}),(0,a.jsx)("div",{className:"flex gap-1",children:[{k:"h1",l:"Hiệp 1"},{k:"h2",l:"Hiệp 2"},{k:"full",l:"Cả trận"}].map(({k:e,l})=>(0,a.jsx)("button",{onClick:()=>s(e),className:`px-2.5 py-1 text-[10px] font-bold rounded transition-all ${t===e?"bg-[#E11D48] text-white":"text-slate-400 hover:text-slate-600 bg-slate-100"}`,children:l},e))}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5 w-20",children:[o?.logo&&(0,a.jsx)("img",{src:g+o.logo,alt:o?.name||"Away team",className:"w-8 h-8 object-contain",onError:e=>e.target.style.display="none",loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-slate-600 text-[10px] font-medium text-center leading-tight",children:o?.name||""})]})]}),(0,a.jsx)("div",{className:"px-4 py-3 space-y-3",children:x.map(e=>{let t=p[e.type]||`Stat ${e.type}`,s=e.home,l=e.away,r=24===e.type||25===e.type,n=s+l,i=0===n?50:s/n*100,o=s>l,c=l>s;return(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"flex justify-between items-center mb-1.5",children:[(0,a.jsxs)("span",{className:`text-xs font-bold w-10 tabular-nums ${o?"text-slate-800":"text-slate-400"}`,children:[s,r?"%":""]}),(0,a.jsx)("span",{className:"text-slate-400 text-[10px] font-semibold tracking-wide uppercase",children:t}),(0,a.jsxs)("span",{className:`text-xs font-bold w-10 text-right tabular-nums ${c?"text-slate-800":"text-slate-400"}`,children:[l,r?"%":""]})]}),(0,a.jsxs)("div",{className:"flex gap-0.5 h-[5px]",children:[(0,a.jsx)("div",{className:"flex-1 rounded-l-full bg-white/[0.06] overflow-hidden flex justify-end",children:(0,a.jsx)("div",{className:`rounded-l-full transition-all duration-500 ${o?"bg-gradient-to-r from-[#E11D48]/60 to-[#E11D48]":"bg-gradient-to-r from-white/10 to-white/20"}`,style:{width:`${i}%`}})}),(0,a.jsx)("div",{className:"flex-1 rounded-r-full bg-white/[0.06] overflow-hidden",children:(0,a.jsx)("div",{className:`rounded-r-full transition-all duration-500 ${c?"bg-gradient-to-l from-[#E11D48]/60 to-[#E11D48]":"bg-gradient-to-l from-white/10 to-white/20"}`,style:{width:`${100-i}%`}})})]})]},e.type)})})]})}
214function f({matchDetails:e}){let[t,s]=(0,l.useState)("pitch"),r=e?.lineup,n=r?.lineup||r,i=n?.home||[],o=n?.away||[],c=r?.home_formation||"",d=r?.away_formation||"",x=r?.match?.home_team,h=r?.match?.away_team;if(0===i.length&&0===o.length)return(0,a.jsx)(j,{text:"Đội h\xecnh sẽ được c\xf4ng bố trước trận đấu 30 ph\xfat"});let m=e=>e.filter(e=>1===e.first),p=e=>e.filter(e=>1!==e.first),u=m(i),g=m(o),b=p(i),w=p(o);return(0,a.jsxs)("div",{className:"flex flex-col",children:[(0,a.jsxs)("div",{className:"flex items-center justify-center gap-1 px-3 py-2 border-b border-slate-100",children:[(0,a.jsx)("button",{onClick:()=>s("pitch"),className:`px-3 py-1.5 text-[10px] font-bold rounded transition-all ${"pitch"===t?"bg-[#E11D48] text-white":"text-slate-400 bg-slate-100"}`,children:"Đội h\xecnh xuất ph\xe1t"}),(0,a.jsx)("button",{onClick:()=>s("list"),className:`px-3 py-1.5 text-[10px] font-bold rounded transition-all ${"list"===t?"bg-[#E11D48] text-white":"text-slate-400 bg-slate-100"}`,children:"Đội h\xecnh dá»± bị"})]}),"pitch"===t?(0,a.jsx)("div",{className:"relative w-full",style:{aspectRatio:"68/105"},children:(0,a.jsxs)("div",{className:"absolute inset-0 bg-gradient-to-b from-[#1a5c2a] via-[#1e6b31] to-[#1a5c2a] rounded-2xl overflow-hidden",children:[(0,a.jsxs)("div",{className:"absolute inset-[3%] border border-white/20 rounded-lg",children:[(0,a.jsx)("div",{className:"absolute left-0 right-0 top-1/2 h-px bg-white/20"}),(0,a.jsx)("div",{className:"absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 w-[22%] aspect-square rounded-full border border-white/20"}),(0,a.jsx)("div",{className:"absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 w-1.5 h-1.5 bg-white/30 rounded-full"}),(0,a.jsx)("div",{className:"absolute top-0 left-1/2 -translate-x-1/2 w-[55%] h-[16%] border-l border-r border-white/20"}),(0,a.jsx)("div",{className:"absolute top-0 left-1/2 -translate-x-1/2 w-[25%] h-[6%] border-l border-r border-white/20"}),(0,a.jsx)("div",{className:"absolute bottom-0 left-1/2 -translate-x-1/2 w-[55%] h-[16%] border-t border-l border-r border-white/20"}),(0,a.jsx)("div",{className:"absolute bottom-0 left-1/2 -translate-x-1/2 w-[25%] h-[6%] border-t border-l border-r border-white/20"})]}),(0,a.jsx)("div",{className:"absolute top-1 left-2 text-[9px] text-[#F8FAFC]/50 font-bold z-10",children:x?.name||""}),(0,a.jsx)("div",{className:"absolute top-1 right-2 text-[9px] text-[#E11D48]/70 font-bold z-10",children:c}),(0,a.jsx)("div",{className:"absolute bottom-1 left-2 text-[9px] text-[#F8FAFC]/50 font-bold z-10",children:h?.name||""}),(0,a.jsx)("div",{className:"absolute bottom-1 right-2 text-[9px] text-[#E11D48]/70 font-bold z-10",children:d}),u.map((e,t)=>{let s=`${e.x||50}%`,l=`${(e.y||10)/2}%`,r="G"===e.position;return(0,a.jsxs)("div",{className:"absolute flex flex-col items-center z-10 -translate-x-1/2 -translate-y-1/2",style:{left:s,top:l},children:[(0,a.jsx)("div",{className:`w-6 h-6 rounded-full flex items-center justify-center text-[9px] font-black ${r?"bg-yellow-400 text-black":"bg-blue-600 text-[#F8FAFC]"} shadow-md border border-white/20`,children:e.shirt_number||""}),(0,a.jsx)("span",{className:"text-[7px] text-[#F8FAFC] font-semibold mt-0.5 text-center max-w-[48px] truncate drop-shadow-[0_1px_2px_rgba(0,0,0,0.8)]",children:(e.name||"").split(" ").slice(-2).join(" ")}),1===e.captain&&(0,a.jsx)("span",{className:"absolute -top-1 -right-1 text-[6px] text-yellow-400",children:"C"})]},`h-${t}`)}),g.map((e,t)=>{let s=`${100-(e.x||50)}%`,l=`${100-(e.y||10)/2}%`,r="G"===e.position;return(0,a.jsxs)("div",{className:"absolute flex flex-col items-center z-10 -translate-x-1/2 -translate-y-1/2",style:{left:s,top:l},children:[(0,a.jsx)("div",{className:`w-6 h-6 rounded-full flex items-center justify-center text-[9px] font-black ${r?"bg-yellow-400 text-black":"bg-orange-500 text-[#F8FAFC]"} shadow-md border border-white/20`,children:e.shirt_number||""}),(0,a.jsx)("span",{className:"text-[7px] text-[#F8FAFC] font-semibold mt-0.5 text-center max-w-[48px] truncate drop-shadow-[0_1px_2px_rgba(0,0,0,0.8)]",children:(e.name||"").split(" ").slice(-2).join(" ")}),1===e.captain&&(0,a.jsx)("span",{className:"absolute -top-1 -right-1 text-[6px] text-yellow-400",children:"C"})]},`a-${t}`)})]})}):(0,a.jsxs)("div",{className:"px-3 py-2 text-xs",children:[(0,a.jsxs)("div",{className:"flex justify-between font-bold text-slate-400 mb-1 uppercase tracking-wider text-[9px] px-1",children:[(0,a.jsx)("span",{children:"Đội chá»
214§ nh\xe0"}),(0,a.jsx)("span",{children:"Đội kh\xe1ch"})]}),Array.from({length:Math.max(b.length,w.length)}).map((e,t)=>{let s=b[t],l=w[t];return(0,a.jsxs)("div",{className:"flex justify-between items-center border-b border-slate-50 py-1.5",children:[(0,a.jsx)("div",{className:"flex items-center gap-1.5 w-1/2 min-w-0",children:s&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"text-[#E11D48] font-bold w-5 text-center shrink-0 text-[10px]",children:s.shirt_number||""}),(0,a.jsx)("span",{className:"text-slate-700 truncate text-[11px]",children:s.name||""})]})}),(0,a.jsx)("div",{className:"flex items-center gap-1.5 w-1/2 justify-end min-w-0",children:l&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"text-slate-700 truncate text-[11px] text-right",children:l.name||""}),(0,a.jsx)("span",{className:"text-[#E11D48] font-bold w-5 text-center shrink-0 text-[10px]",children:l.shirt_number||""})]})})]},t)})]})]})}function j({text:e}){return(0,a.jsx)("div",{className:"flex items-center justify-center py-10 text-slate-400 text-sm text-center",children:e})}function w({m:e}){let t=c(e.status_id,e.sport_id),{hm:s,dm:l}=x(e.time),r=e.source_card_meta?.league_label||e.match_data?.competition_vi||"";return(0,a.jsxs)("a",{href:`/match/${encodeURIComponent(e.post_name||e.id)}`,className:"flex items-center gap-3 rounded-2xl bg-white hover:bg-slate-50 border border-slate-100 hover:border-[#4681E8]/30 p-3 transition-all group",children:[(0,a.jsxs)("div",{className:"shrink-0 w-14 text-center",children:[(0,a.jsx)("div",{className:"text-[#E11D48] text-[11px] font-bold",children:s}),(0,a.jsx)("div",{className:"text-slate-400 text-[9px]",children:l})]}),(0,a.jsx)("div",{className:"w-px h-9 bg-slate-200 shrink-0"}),(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("div",{className:"text-slate-400 text-[9px] truncate mb-1",children:r}),(0,a.jsxs)("div",{className:"flex items-center gap-2 mb-0.5",children:[(0,a.jsx)("img",{src:e.home_logo||d(e.home_name),alt:e.home_name,className:"w-4 h-4 object-contain shrink-0",onError:t=>t.target.src=d(e.home_name),loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-slate-600 text-[12px] font-medium truncate",children:e.home_name})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("img",{src:e.away_logo||d(e.away_name),alt:e.away_name,className:"w-4 h-4 object-contain shrink-0",onError:t=>t.target.src=d(e.away_name),loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-slate-600 text-[12px] font-medium truncate",children:e.away_name})]})]}),t.sc?(0,a.jsxs)("span",{className:"text-slate-800 font-bold text-[14px] tabular-nums shrink-0",children:[e.home_score,"-",e.away_score]}):(0,a.jsx)("span",{className:"text-[10px] font-bold text-[#E11D48] bg-[#E11D48]/10 rounded px-2.5 py-1 group-hover:bg-[#E11D48]/15 transition shrink-0",children:"XEM NGAY"})]})}let v={0:{bg:"bg-white/10",text:"text-[#F8FAFC]/40",nameCls:"text-[#94A3B8]"},1:{bg:"bg-white/10",text:"text-[#F8FAFC]/50",nameCls:"text-[#94A3B8]"},2:{bg:"bg-green-900/50",text:"text-green-400",nameCls:"text-green-400"},3:{bg:"bg-yellow-900/40",text:"text-yellow-400",nameCls:"text-emerald-600 font-bold"},4:{bg:"bg-blue-900/40",text:"text-blue-400",nameCls:"text-blue-400 font-bold"},5:{bg:"bg-red-900/40",text:"text-red-400",nameCls:"text-red-400 font-bold"}};function N({anchors:e,selectedAnchor:t}){let[s,r]=(0,l.useState)([]),[n,i]=(0,l.useState)(!1),o=(0,l.useRef)(null),c=(0,l.useRef)(null),d=t?.roomNum;return(0,l.useEffect)(()=>{if(!d)return;r([]),i(!1);let e=new EventSource(`/api/chat/${d}`);return e.onopen=()=>i(!0),e.onmessage=e=>{try{let t=JSON.parse(e.data);if("connected"===t.type)return void i(!0);if("history"===t.type&&Array.isArray(t.messages))return void r(e=>[...t.messages,...e].slice(-200));t.user&&t.text&&r(e=>[...e,t].slice(-200))}catch{}},e.onerror=()=>i(!1),()=>{e.close(),i(!1)}},[d]),(0,l.useEffect)(()=>{requestAnimationFrame(()=>{let e=c.current;e&&(e.scrollTop=e.scrollHeight)})},[s.length]),(0,a.jsxs)("div",{className:"flex flex-col h-full bg-[#0F0F23]",children:[(0,a.jsxs)("div",{ref:c,className:"flex-1 min-h-0 px-3 py-2 flex flex-col gap-[3px] overflow-y-auto",style:{scrollbarWidth:"thin",scrollbarColor:"#444 transparent"},children:[(0,a.jsx)("div",{className:"text-center text-[10px] text-[#F8FAFC]/30 bg-slate-50/60 py-1.5 rounded-xl mb-1 sticky top-0 z-10 backdrop-blur-sm",children:n?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"inline-block h-1.5 w-1.5 rounded-full bg-green-400 animate-pulse mr-1"}),"Đang kết nối ph\xf2ng chat trá»±c tiếp"]}):d?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"inline-block h-1.5 w-1.5 rounded-full bg-yellow-400 animate-pulse mr-1"}),"Đang kết nối..."]}
214):"Ch\xe0o mừng bạn đến với ph\xf2ng chat"}),0===s.length&&n&&(0,a.jsx)("div",{className:"text-center text-[10px] text-[#F8FAFC]/20 py-4",children:"Chờ tin nhắn mới..."}),s.map((e,t)=>{var s;let l=(s=e.level)>=5?v[5]:v[s]||v[0];return 2===e.type||e.text?.includes("v\xe0o ph\xf2ng tr\xf2 chuyện")?(0,a.jsxs)("div",{className:"flex items-start gap-1.5 text-[11px] leading-relaxed py-[1px] opacity-60",children:[(0,a.jsx)("span",{className:"text-green-500/70 font-medium",children:"Hi"}),(0,a.jsxs)("span",{className:`shrink-0 inline-flex items-center px-1 py-[0.5px] rounded text-[8px] font-bold ${l.bg} ${l.text}`,children:["Lv",e.level]}),(0,a.jsxs)("span",{className:`font-bold ${l.nameCls}`,children:[e.user,":"]}),(0,a.jsx)("span",{className:"text-[#F8FAFC]/40",children:e.text})]},`${e.ts}-${t}`):(0,a.jsxs)("div",{className:"flex items-start gap-1.5 text-[11px] leading-relaxed py-[1px]",children:[(0,a.jsxs)("span",{className:`shrink-0 inline-flex items-center px-1 py-[0.5px] rounded text-[8px] font-bold ${l.bg} ${l.text}`,children:["Lv.",e.level]}),(0,a.jsxs)("span",{className:`font-bold shrink-0 ${l.nameCls}`,children:[e.user,":"]}),(0,a.jsx)("span",{className:"text-[#F8FAFC]/80 break-words min-w-0",children:e.text})]},`${e.ts}-${t}`)}),(0,a.jsx)("div",{ref:o})]}),(0,a.jsxs)("div",{className:"shrink-0 px-3 py-2 bg-[#0F0F23] border-t border-white/[0.04] space-y-2",children:[(0,a.jsx)("div",{className:"flex items-center justify-center gap-3 text-[#F8FAFC]/20 text-[10px]",children:(0,a.jsx)("span",{className:"flex items-center gap-1",children:(0,a.jsx)("svg",{className:"w-3 h-3",viewBox:"0 0 24 24",fill:"currentColor",children:(0,a.jsx)("path",{d:"M12 4.5C7 4.5 2.7 7.6 1 12c1.7 4.4 6 7.5 11 7.5s9.3-3.1 11-7.5c-1.7-4.4-6-7.5-11-7.5zm0 12.5c-2.8 0-5-2.2-5-5s2.2-5 5-5 5 2.2 5 5-2.2 5-5 5zm0-8c-1.7 0-3 1.3-3 3s1.3 3 3 3 3-1.3 3-3-1.3-3-3-3z"})})})}),(0,a.jsxs)("div",{className:"flex bg-[#0F0F23] rounded-2xl overflow-hidden border border-white/[0.08]",children:[(0,a.jsx)("input",{type:"text",placeholder:"Đăng nhập để c\xf9ng chat nh\xe9",disabled:!0,className:"flex-1 bg-transparent px-3 py-2 text-[11px] text-[#F8FAFC] outline-none placeholder:text-[#F8FAFC]/30 disabled:opacity-50"}),(0,a.jsx)("button",{disabled:!0,className:"px-4 text-[11px] font-bold bg-[#E11D48] text-black disabled:bg-white/10 disabled:text-[#F8FAFC]/20 transition-colors",children:"Gửi"})]})]})]})}let y={1:{icon:"⚽",label:"B\xe0n thắng",color:"text-green-400"},2:{icon:"\uD83C\uDD7F️",label:"Phạt đền",color:"text-green-400"},3:{icon:"\uD83D\uDFE1",label:"Thẻ v\xe0ng",color:"text-yellow-400"},4:{icon:"\uD83D\uDFE1\uD83D\uDFE1",label:"Thẻ v\xe0ng 2",color:"text-emerald-600"},5:{icon:"\uD83D\uDD34",label:"Thẻ đỏ",color:"text-red-500"},7:{icon:"\uD83D\uDD04",label:"Phản lưới",color:"text-orange-400"},8:{icon:"\uD83C\uDFE5",label:"Chấn thương",color:"text-[#94A3B8]"},9:{icon:"\uD83D\uDD04",label:"Thay người",color:"text-blue-400"},11:{icon:"⏱️",label:"Hiệp 2",color:"text-[#F8FAFC]/40"},15:{icon:"\uD83E\uDD45",label:"Pen trượt",color:"text-red-400"},19:{icon:"⏱️",label:"Kết th\xfac hiệp",color:"text-[#F8FAFC]/30"},21:{icon:"\uD83C\uDFC6",label:"VAR",color:"text-purple-400"}};function _({events:e}){let t=e?.incidents||e?.events||[];return t&&0!==t.length?(0,a.jsx)("div",{className:"flex flex-col",children:t.map((e,t)=>{let s=y[e.type]||{icon:"•",label:`Event ${e.type}`,color:"text-[#F8FAFC]/50"},l=1===e.position,r=2===e.position,n=e.add_time?`+${e.add_time}`:"",i=`${e.time}'${n}`;return l||r||11!==e.type&&19!==e.type?9===e.type?(0,a.jsxs)("div",{className:`flex items-center gap-2 border-b border-slate-50 p-3 text-xs ${l?"":"flex-row-reverse"}`,children:[(0,a.jsx)("span",{className:"text-slate-400 w-10 text-center shrink-0 text-[10px]",children:i}),(0,a.jsxs)("div",{className:`flex-1 flex flex-col gap-0.5 ${l?"items-start":"items-end"}`,children:[(0,a.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,a.jsx)("span",{className:"text-green-400 text-[10px]",children:"▲"}),(0,a.jsx)("span",{className:"text-[#F8FAFC]/80 text-[11px]",children:e.in_player_name||""})]}),(0,a.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,a.jsx)("span",{className:"text-red-400 text-[10px]",children:"▼"}),(0,a.jsx)("span",{className:"text-[#F8FAFC]/40 text-[11px]",children:e.out_player_name||""})]})]})]},t):(0,a.jsxs)("div",{className:`flex items-center gap-2 border-b border-slate-50 p-3 text-xs ${l?"":"flex-row-reverse"}`,children:[(0,a.jsx)("span",{className:"text-slate-400 w-10 text-center shrink-0 text-[10px]",children:i}),(0,a.jsx)("span",{className:`shrink-0 text-sm ${s.color}`,children:s.icon}),(0,a.jsxs)("div",{className:`flex-1 min-w-0 ${l?"text-left":"text-right"}`,children:[(0,a.jsx)("span",{className:"text-slate-700 text-[11px]",children:e.player_name||""}),e.assist1_name&&(0,a.jsxs)("span",{className:"text-slate-400 text-[10px] ml-1",children:["(kiến tạo: ",e.assist1_name,")"]}),1===e.type&&void 0!==e.home_score&&(0,a.jsxs)("span",{className:"text-[#E11D48] font-bold text-[11px] ml-2",children:[e.home_score," - ",e.away_score]})]})]},t):(0,a.jsx)("div",{className:"flex items-center justify-center py-2 border-b border-slate-50 bg-slate-50",children:(0,a.jsxs)("span",{className:"text-slate-400 text-[10px] uppercase tracking-wider",children:[s.icon," ",s.label," — ",i]})},t)})}):(0,a.jsx)(j,{text:"Diễn biến trận đấu sẽ được cập nhật trực tiếp tại đ\xe2y"})}function k({standings:e}
214){return e&&e.teams&&0!==e.teams.length?(0,a.jsxs)("div",{className:"w-full text-[10px]",children:[(0,a.jsxs)("div",{className:"grid grid-cols-[20px_1fr_24px_24px_32px] bg-slate-50 p-2 text-slate-400 uppercase font-bold sticky top-0",children:[(0,a.jsx)("span",{className:"text-center",children:"#"}),(0,a.jsx)("span",{children:"Team"}),(0,a.jsx)("span",{className:"text-center",children:"T"}),(0,a.jsx)("span",{className:"text-center",children:"B"}),(0,a.jsx)("span",{className:"text-center whitespace-nowrap",children:"Đ"})]}),e.teams.slice(0,15).map((e,t)=>{let s=!!e.data,l=s?parseFloat(e.data[0]):e.rank||t+1,r=s?e.data[1]:e.target_name,n=s?e.data[7]:e.points,i=s?e.data[3]:e.won,o=s?e.data[5]:e.loss;return(0,a.jsxs)("div",{className:"grid grid-cols-[20px_1fr_24px_24px_32px] items-center p-2 border-b border-slate-50 hover:bg-slate-50 transition-colors",children:[(0,a.jsx)("span",{className:"text-center text-slate-500",children:l}),(0,a.jsxs)("div",{className:"flex items-center gap-1.5 min-w-0 pr-2",children:[e.team_logo&&(0,a.jsx)("img",{src:e.team_logo,className:"w-3.5 h-3.5 object-contain",alt:r||"Team logo",loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-slate-700 font-medium truncate",children:r})]}),(0,a.jsx)("span",{className:"text-center text-slate-500",children:i}),(0,a.jsx)("span",{className:"text-center text-slate-500",children:o}),(0,a.jsx)("span",{className:"text-center text-[#E11D48] font-bold",children:n})]},r)})]}):(0,a.jsx)(j,{text:"Bảng xếp hạng sẽ được cập nhật"})}function E({odds:e}){let t=Array.isArray(e)?e:[],s=["2","4","3","16"];function l(e){for(let a of s){let s=t.find(t=>t.odds_type===e&&String(t.company_id)===a);if(s?.odds_info?.length)return s}return t.find(t=>t.odds_type===e&&t.odds_info?.length>0)}function r(e,t){let s=e?.odds_info;if(!s?.length)return["-","-","-"];let a="opening"===t?s.length-1:0;if(!s?.length||!s[a])return["-","-","-"];let l=s[a][2];if("string"!=typeof l)return["-","-","-"];let r=l.split(",");return[r[0]||"-",r[1]||"-",r[2]||"-"]}let n=l("asia"),i=l("eu"),o=l("bs"),c=l("cr"),d=r(n,"opening"),x=r(n,"latest"),h=r(i,"opening"),m=r(i,"latest"),p=r(o,"opening"),u=r(o,"latest"),g=r(c,"opening"),b=r(c,"latest"),f=({children:e})=>(0,a.jsx)("th",{className:"px-2 py-2 text-[9px] sm:text-[10px] font-bold uppercase tracking-wider text-slate-500 border-b border-slate-100 text-center",children:e}),j=({children:e,color:t})=>(0,a.jsx)("td",{className:`px-2 py-2.5 text-center text-[11px] sm:text-xs font-bold ${t||"text-slate-600"} border-b border-slate-50`,children:e});return(0,a.jsxs)("div",{className:"overflow-x-auto",children:[(0,a.jsxs)("table",{className:"w-full min-w-[600px]",children:[(0,a.jsxs)("thead",{children:[(0,a.jsxs)("tr",{className:"bg-slate-50",children:[(0,a.jsx)("th",{className:"px-4 py-2 text-left border-b border-slate-100",rowSpan:2,children:(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("div",{className:"w-7 h-7 rounded bg-gradient-to-br from-[#1d4ed8] to-[#3b82f6] flex items-center justify-center text-white text-[9px] font-black shadow-sm",children:"B"}),(0,a.jsx)("span",{className:"text-slate-600 text-[11px] font-bold tracking-wider",children:"SPORT"})]})}),(0,a.jsx)("th",{colSpan:3,className:"px-1 py-1.5 text-center text-[9px] sm:text-[10px] font-bold uppercase tracking-wider text-[#4681E8] border-b border-l border-slate-100",children:"CƯỢC CH\xc2U \xc1"}),(0,a.jsx)("th",{colSpan:3,className:"px-1 py-1.5 text-center text-[9px] sm:text-[10px] font-bold uppercase tracking-wider text-[#4681E8] border-b border-l border-slate-100",children:"CƯỢC CH\xc2U \xc2U"}),(0,a.jsx)("th",{colSpan:3,className:"px-1 py-1.5 text-center text-[9px] sm:text-[10px] font-bold uppercase tracking-wider text-[#4681E8] border-b border-l border-slate-100",children:"T\xc0I XỈU"}),(0,a.jsx)("th",{colSpan:3,className:"px-1 py-1.5 text-center text-[9px] sm:text-[10px] font-bold uppercase tracking-wider text-[#4681E8] border-b border-l border-slate-100",children:"K\xc8O G\xd3C"})]}),(0,a.jsxs)("tr",{className:"bg-slate-50",children:[(0,a.jsx)(f,{children:"CHỦ"}),(0,a.jsx)(f,{children:"CHẤP"}),(0,a.jsx)(f,{children:"KH\xc1CH"}),(0,a.jsx)(f,{children:"CHỦ"}),(0,a.jsx)(f,{children:"H\xd2A"}),(0,a.jsx)(f,{children:"KH\xc1CH"}),(0,a.jsx)(f,{children:"T\xc0I"}),(0,a.jsx)(f,{children:"TỶ LỆ"}),(0,a.jsx)(f,{children:"XỈU"}),(0,a.jsx)(f,{children:"T\xc0I"}),(0,a.jsx)(f,{children:"TỶ LỆ"}),(0,a.jsx)(f,{children:"XỈU"})]})]}),(0,a.jsxs)("tbody",{children:[(0,a.jsxs)("tr",{className:"hover:bg-slate-50 transition-colors",children:[(0,a.jsx)("td",{className:"px-4 py-2.5 text-[11px] sm:text-xs text-slate-500 font-medium border-b border-slate-50",children:"Tỷ Lệ Mở Cược"}),(0,a.jsx)(j,{children:d[0]}),(0,a.jsx)(j,{color:"text-red-400",children:d[1]}),(0,a.jsx)(j,{children:d[2]}),(0,a.jsx)(j,{children:h[0]}),(0,a.jsx)(j,{children:h[1]}),(0,a.jsx)(j,{children:h[2]}),(0,a.jsx)(j,{children:p[0]}),(0,a.jsx)(j,{children:p[1]}),(0,a.jsx)(j,{children:p[2]}),(0,a.jsx)(j,{children:g[0]}),(0,a.jsx)(j,{children:g[1]}),(0,a.jsx)(j,{children:g[2]})]}),(0,a.jsxs)("tr",{className:"hover:bg-slate-50 transition-colors",children:[(0,a.jsx)("td",{className:"px-4 py-2.5 text-[11px] sm:text-xs text-slate-500 font-medium border-b border-slate-50",children:"Tỷ Lệ Trước Trận"}),(0,a.jsx)(j,{children:x[0]}),(0,a.jsx)(j,{color:"text-red-400",children:x[1]}),(0,a.jsx)(j,{children:x[2]}),(0,a.jsx)(j,{children:m[0]}),(0,a.jsx)(j,{children:m[1]}),(0,a.jsx)(j,{children:m[2]}),(0,a.jsx)(j,{children:u[0]}),(0,a.jsx)(j,{children:u[1]}),(0,a.jsx)(j,{children:u[2]}),(0,a.jsx)(j,{children:b[0]}),(0,a.jsx)(j,{children:b[1]}),(0,a.jsx)(j,{children:b[2]})]}),(0,a.jsxs)("tr",{className:"hover:bg-slate-50 transition-colors bg-white",children:[(0,a.jsxs)("td",{className:"px-4 py-2.5 text-[11px] sm:text-xs text-slate-700 font-bold flex items-center gap-1.5 border-b border-slate-50",children:["Live ",(0,a.jsx)("span",{className:"w-1.5 h-1.5 rounded-full bg-red-500 animate-pulse"})]}),(0,a.jsx)(j,{color:"text-green-400",children:x[0]}),(0,a.jsx)(j,{color:"text-red-400",children:x[1]}),(0,a.jsx)(j,{color:"text-green-400",children:x[2]}),(0,a.jsx)(j,{color:"text-green-400",children:m[0]}),(0,a.jsx)(j,{color:"text-green-400",children:m[1]}),(0,a.jsx)(j,{color:"text-green-400",children:m[2]}),(0,a.jsx)(j,{color:"text-green-400",children:u[0]}),(0,a.jsx)(j,{children:u[1]}),(0,a.jsx)(j,{color:"text-green-400",children:u[2]}),(0,a.jsx)(j,{color:"text-green-400",children:b[0]}),(0,a.jsx)(j,{children:b[1]}),(0,a.jsx)(j,{color:"text-green-400",children:b[2]})]})]})]}),(0,a.jsx)("p",{className:"text-center text-slate-400 text-[10px] py-2.5 border-t border-slate-100",children:"Tỷ lệ k\xe8o sẽ được cập nhật gần giờ thi đấu"})]})}},20935:()=>{},22012:(e,t,s)=>{"use strict";s.d(t,{Klivevip06ResultsPage:()=>o});var a=s(68019),l=s(10707),r=s(78637),n=s(42879),i=s(50179);function o({initialData:e,selectedLeague:t}){let s=(0,r.useRouter)(),c=(0,r.usePathname)(),d=(0,r.useSearchParams)(),[x,h]=(0,l.useTransition)(),[m,p]=(0,l.useState)(!1),[u,g]=(0,l.useState)(""),{availableLeagues:b,dateGroups:f}=(0,l.useMemo)(()=>(0,i.o8)(e),[e]),j=(0,l.useMemo)(()=>Array.from(new Set(f.map(e=>e.date_header))),[f]),w=d.get("date")||"",v=e=>{let t=new URLSearchParams(d.toString());e&&e!==w?t.set("date",e):t.delete("date"),h(()=>{let e=t.toString();s.push(e?`${c}?${e}`:c,{scroll:!1})})},N=(0,l.useMemo)(()=>{let e=f;return w&&(e=e.filter(e=>e.date_header===w)),(0,i.kK)(e,t)},[f,w,t]),y=(0,l.useMemo)(()=>
214{if(!u)return b;let e=u.toLowerCase();return b.filter(t=>t.name.toLowerCase().includes(e))},[b,u]),_=N.reduce((e,t)=>e+t.matches.length,0);if(0===f.length)return(0,a.jsxs)("div",{className:"max-w-[1440px] mx-auto px-4 py-8",children:[(0,a.jsx)(n.B,{eyebrow:"Kết quả",title:"KẾT QUẢ B\xd3NG Đ\xc1"}),(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center py-16 gap-4",children:[(0,a.jsx)("div",{className:"w-12 h-12 rounded-full border-2 border-[#E11D48]/30 border-t-[#E11D48] animate-spin"}),(0,a.jsx)("span",{className:"text-slate-500 text-sm font-medium tracking-wide",children:"Đang tải kết quả..."})]})]});let k=e=>{let t=new URLSearchParams(d.toString());e?t.set("league",e):t.delete("league"),p(!1),g(""),h(()=>{let e=t.toString();s.push(e?`${c}?${e}`:c,{scroll:!1})})};return(0,a.jsxs)("div",{className:"max-w-[1440px] mx-auto px-4 py-8",children:[(0,a.jsx)(n.B,{eyebrow:"Kết quả",title:"KẾT QUẢ B\xd3NG Đ\xc1",rightSlot:(0,a.jsx)("div",{className:"text-[12px] text-slate-600",children:(0,a.jsx)("span",{className:"text-slate-900/80 font-bold",children:t||"Tất cả giải đấu"})})}),(0,a.jsxs)("div",{className:"flex flex-col md:flex-row gap-4 mb-4 items-start md:items-center justify-between",children:[j.length>0&&(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,a.jsx)("button",{type:"button",onClick:()=>v(""),className:`px-4 py-2 rounded-xl text-sm font-bold transition-all duration-300 ${!w?"bg-gradient-to-r from-[#4681E8] to-[#2563eb] text-white shadow-[0_4px_15px_rgba(70,129,232,0.4)] border border-[#4681E8]/50":"bg-white text-[#64748B] border border-slate-200 hover:bg-slate-50 hover:text-slate-800"}`,children:"Tất cả ng\xe0y"}),j.slice(0,5).map(e=>(0,a.jsx)("button",{type:"button",onClick:()=>v(e),className:`px-4 py-2 rounded-xl text-sm font-bold transition-all duration-300 ${w===e?"bg-gradient-to-r from-[#4681E8] to-[#2563eb] text-white shadow-[0_4px_15px_rgba(70,129,232,0.4)] border border-[#4681E8]/50":"bg-white text-[#64748B] border border-slate-200 hover:bg-slate-50 hover:text-slate-800"}`,children:e},e))]}),(0,a.jsxs)("div",{className:"relative w-full md:w-[320px]",children:[(0,a.jsxs)("button",{onClick:()=>p(!m),className:"w-full flex items-center gap-3 bg-white hover:bg-slate-50 px-4 py-2.5 rounded-xl border border-slate-200 shadow-inner transition-all text-sm",children:[(0,a.jsx)("svg",{className:"w-5 h-5 text-[#4681E8]",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 4a1 1 0 011-1h16a1 1 0 011 1v2.586a1 1 0 01-.293.707l-6.414 6.414a1 1 0 00-.293.707V17l-4 4v-6.586a1 1 0 00-.293-.707L3.293 7.293A1 1 0 013 6.586V4z"})}),(0,a.jsx)("span",{className:"text-slate-700 font-bold flex-1 text-left truncate",children:t||"Chọn giải đấu..."}),(0,a.jsx)("svg",{className:`w-4 h-4 text-slate-400 transition-transform ${m?"rotate-180":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),m&&(0,a.jsxs)("div",{className:"absolute top-full left-0 right-0 mt-2 bg-white border border-slate-200 rounded-2xl shadow-xl z-50 max-h-[300px] overflow-hidden flex flex-col",children:[(0,a.jsx)("div",{className:"p-2 border-b border-slate-100",children:(0,a.jsx)("input",{type:"text",placeholder:"T\xecm giải đấu...",value:u,onChange:e=>g(e.target.value),className:"w-full bg-slate-50 border border-transparent rounded-xl px-4 py-2.5 text-sm text-slate-800 placeholder-slate-400 outline-none focus:border-[#4681E8]/50 transition-colors"})}),(0,a.jsxs)("div",{className:"overflow-y-auto flex-1 pb-2",children:[(0,a.jsx)("button",{type:"button",onClick:()=>k(),className:`block w-full text-left px-4 py-3 text-sm transition-colors ${!t?"bg-[#4681E8]/10 text-[#4681E8] border-l-4 border-[#4681E8]":"text-slate-600 hover:bg-slate-50 hover:text-slate-800"}`,children:"Tất cả giải đấu"}),y.map((e,s)=>(0,a.jsxs)("button",{type:"button",onClick:()=>k(e.name),className:`flex items-center gap-3 px-4 py-3 text-sm transition-colors cursor-pointer ${t===e.name?"bg-[#4681E8]/10 text-[#4681E8] border-l-4 border-[#4681E8]":"text-slate-600 hover:bg-slate-50 hover:text-slate-800"}`,children:[e.icon?(0,a.jsx)("img",{src:e.icon,alt:e.name||"League",className:"w-5 h-5 object-contain shrink-0",loading:"lazy",decoding:"async"}):(0,a.jsx)("div",{className:"w-5 h-5 rounded-md bg-slate-200 shrink-0"}),(0,a.jsx)("span",{className:"truncate",children:e.name})]},s))]})]})]})]}),x&&(0,a.jsxs)("div",{className:"mb-4 inline-flex items-center gap-2 rounded-full border border-slate-200 bg-white px-4 py-2 text-xs text-slate-500 shadow-sm",children:[(0,a.jsx)("span",{className:"h-2 w-2 rounded-full bg-[#E11D48] animate-pulse shadow-[0_0_8px_rgba(225,29,72,0.8)]"}),(0,a.jsx)("span",{className:"font-bold tracking-wide",children:"Đang tải kết quả từ server..."})]}),(0,a.jsx)("div",{className:"space-y-4",children:0===N.length?(0,a.jsx)("div",{className:"text-center py-16 text-[#64748B] font-medium tracking-wide",children:"Kh\xf4ng c\xf3 kết quả n\xe0o"}):N.map((e,t)=>(0,a.jsxs)("div",{className:"overflow-hidden rounded-2xl border border-slate-200 bg-white shadow-[0_8px_30px_rgba(0,0,0,0.06)]",children:[(0,a.jsx)("div",{className:"bg-slate-50 px-5 py-3 border-b border-slate-100 flex items-center justify-between",children:(0,a.jsxs)("span",{className:"text-[12px] text-slate-500 font-bold uppercase tracking-widest",children:[e.league_round?e.league_round:"V\xf2ng đấu",(0,a.jsx)("span",{className:"text-[#E11D48] ml-2 font-mono text-[11px] bg-[#E11D48]/10 px-2 py-0.5 rounded-full border border-[#
214E11D48]/20",children:e.date_header})]})}),e.matches.map((e,t)=>{var s;return(0,a.jsx)("div",{className:"bg-transparent hover:bg-slate-50 border-b border-slate-100 last:border-0 transition-colors group cursor-default",children:(0,a.jsxs)("div",{className:"flex items-center py-4 px-5 gap-4",children:[(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center min-w-[56px] shrink-0 border-r border-slate-100 pr-4",children:[(0,a.jsx)("span",{className:"text-[9px] text-slate-400 uppercase tracking-widest mb-1 font-bold",children:"L\xfac"}),(0,a.jsx)("span",{className:"text-[13px] text-slate-700 font-mono font-black",children:e.time})]}),(0,a.jsxs)("div",{className:"flex-1 flex items-center justify-end gap-3 min-w-0",children:[(0,a.jsx)("span",{className:"text-[14px] text-slate-800 font-bold truncate text-right group-hover:text-slate-900 transition-colors",children:e.home_team}),e.home_logo?(0,a.jsx)("div",{className:"w-8 h-8 rounded-full bg-slate-100 border border-slate-200 p-1 flex items-center justify-center shadow-sm",children:(0,a.jsx)("img",{src:e.home_logo,alt:e.home_team||"Home team",className:"w-full h-full object-contain",loading:"lazy"})}):(0,a.jsx)("div",{className:"w-8 h-8 rounded-full bg-slate-100 shrink-0 border border-slate-200 flex items-center justify-center text-[10px] font-bold text-slate-400",children:"?"})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center min-w-[90px] shrink-0 bg-slate-50 rounded-xl py-2 px-2 border border-slate-200 shadow-inner group-hover:border-[#4681E8]/40 transition-colors",children:[(0,a.jsx)("span",{className:`text-[22px] leading-none font-black tracking-widest drop-shadow-[0_2px_4px_rgba(0,0,0,0.8)] ${!(s=e.score)||"-"===s?"text-slate-400":"text-slate-800"}`,children:e.score}),e.ht_score&&(0,a.jsxs)("span",{className:"text-[10px] text-slate-500 font-mono mt-1 font-bold",children:["HT: ",e.ht_score]})]}),(0,a.jsxs)("div",{className:"flex-1 flex items-center gap-3 min-w-0",children:[e.away_logo?(0,a.jsx)("div",{className:"w-8 h-8 rounded-full bg-slate-100 border border-slate-200 p-1 flex items-center justify-center shadow-sm",children:(0,a.jsx)("img",{src:e.away_logo,alt:e.away_team||"Away team",className:"w-full h-full object-contain",loading:"lazy"})}):(0,a.jsx)("div",{className:"w-8 h-8 rounded-full bg-slate-100 shrink-0 border border-slate-200 flex items-center justify-center text-[10px] font-bold text-slate-400",children:"?"}),(0,a.jsx)("span",{className:"text-[14px] text-slate-800 font-bold truncate text-left group-hover:text-slate-900 transition-colors",children:e.away_team})]})]})},t)})]},t))}),(0,a.jsxs)("div",{className:"mt-6 text-center text-xs text-[#64748B] font-bold uppercase tracking-widest drop-shadow-sm",children:["Hiển thị ",_," kết quả trận đấu"]})]})}},22483:(e,t,s)=>{"use strict";s.d(t,{LiveMatchesClient:()=>m});var a=s(68019),l=s(10707);function r({activeSport:e,onSportChange:t,activeStatus:s,onStatusChange:l,matchesCount:n}){return(0,a.jsxs)("div",{className:"mb-5 flex flex-col gap-3",children:[(0,a.jsx)("div",{className:"flex items-center gap-2 overflow-x-auto pb-1 scrollbar-hide",children:[{id:"1",label:"B\xd3NG Đ\xc1",icon:"⚽"},{id:"2",label:"B\xd3NG RỔ",icon:"\uD83C\uDFC0"},{id:"5",label:"TENNIS",icon:"\uD83C\uDFBE"},{id:"4",label:"CẦU L\xd4NG",icon:"\uD83C\uDFF8"},{id:"3",label:"B\xd3NG CHUYỀN",icon:"\uD83C\uDFD0"},{id:"6",label:"B\xd3NG B\xc0N",icon:"\uD83C\uDFD3"}].map(s=>{let l=e===s.id;return(0,a.jsxs)("button",{type:"button",onClick:()=>t(s.id),className:`flex items-center gap-2 px-4 py-2.5 rounded-xl font-bold text-[12px] whitespace-nowrap transition-all duration-200 border cursor-pointer ${l?"bg-[#4681E8]/10 text-[#4681E8] border-[#4681E8]/40 shadow-[0_0_15px_rgba(70,129,232,0.1)]":"bg-white text-slate-500 border-slate-200 hover:text-slate-700 hover:border-[#4681E8]/30"}`,children:[(0,a.jsx)("span",{className:"text-[14px]",children:s.icon}),(0,a.jsx)("span",{className:"tracking-wider uppercase",children:s.label})]},s.id)})}),(0,a.jsx)("div",{className:"flex items-center gap-1 overflow-x-auto pb-1 scrollbar-hide bg-white rounded-xl p-1.5 border border-slate-200",children:[{id:"all",label:"TẤT CẢ",keyCount:"all"},{id:"live",label:"TRỰC TIẾP",keyCount:"live"},{id:"hot",label:"HOT",keyCount:"hot"},{id:"today",label:"H\xd4M NAY",keyCount:"today"},{id:"tomorrow",label:"NG\xc0Y MAI",keyCount:"tomorrow"}].map(e=>{let t=s===e.id,r=n[e.keyCount]||0;return(0,a.jsxs)("button",{type:"button",onClick:()=>l(e.id),className:`relative px-4 py-2 font-bold text-[12px] whitespace-nowrap transition-all duration-200 uppercase tracking-wider flex items-center gap-2 rounded-lg cursor-pointer ${t?"bg-[#4681E8]/10 text-[#4681E8] shadow-inner":"text-slate-500 hover:text-slate-700 hover:bg-[#4681E8]/5"}`,children:["live"===e.id&&t&&(0,a.jsx)("span",{className:"w-1.5 h-1.5 rounded-full bg-[#4681E8] animate-pulse shadow-[0_0_6px_rgba(70,129,232,0.8)]"}),(0,a.jsx)("span",{children:e.label}),(0,a.jsx)("span",{className:`px-1.5 py-0.5 rounded text-[10px] font-black ${t?"bg-[#4681E8]/20 text-[#4681E8]":"text-slate-400"}`,children:r})]},e.id)})})]})}function n(){return"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='10' fill='%2364748B' fill-opacity='0.18'/%3
214E%3C/svg%3E"}function i({match:e,isLoading:t=!1}){if(t||!e)return(0,a.jsx)("div",{className:"animate-pulse bg-white h-[64px] w-full border-b border-slate-100"});let s=new Date(1e3*parseInt(e.time||0,10)).toLocaleTimeString("vi-VN",{hour:"2-digit",minute:"2-digit",timeZone:"Asia/Ho_Chi_Minh"}),l=function(e,t){if("1"===t||"2"===t)switch(e){case"1":default:return{text:"Sắp diễn",isLive:!1,showScore:!1};case"2":return{text:"H1",isLive:!0,showScore:!0};case"3":return{text:"HT",isLive:!0,showScore:!0};case"4":return{text:"H2",isLive:!0,showScore:!0};case"5":return{text:"Phụ",isLive:!0,showScore:!0};case"7":return{text:"Pen",isLive:!0,showScore:!0};case"8":case"9":return{text:"FT",isLive:!1,showScore:!0}}switch(e){case"0":case"1":return{text:"Sắp diễn",isLive:!1,showScore:!1};case"51":return{text:"S1",isLive:!0,showScore:!0};case"52":return{text:"S2",isLive:!0,showScore:!0};case"53":return{text:"S3",isLive:!0,showScore:!0};case"54":return{text:"S4",isLive:!0,showScore:!0};case"55":return{text:"S5",isLive:!0,showScore:!0};case"100":case"90":case"91":case"110":return{text:"FT",isLive:!1,showScore:!0};default:return{text:"LIVE",isLive:!0,showScore:!0}}}(String(e.status_id),String(e.sport_id)),r=e.time_text||e.source_card_meta?.time_text||"",o=l.isLive,c=e.home_score??"-",d=e.away_score??"-",x=e.home_logo||n(),h=e.away_logo||n();return(0,a.jsxs)("a",{href:`/match/${encodeURIComponent(e.post_name||e.id)}`,className:"flex items-center w-full group border-b border-slate-100 bg-white hover:bg-[#4681E8]/5 transition-colors min-h-[64px]",children:[(0,a.jsx)("div",{className:`w-[60px] flex flex-col items-center justify-center shrink-0 h-full border-r ${o?"border-[#4681E8]/30 bg-[#4681E8]/5":"border-slate-100"}`,children:o?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"text-[#4681E8] font-bold text-[11px] uppercase tracking-wider tabular-nums leading-none",children:r||l.text}),(0,a.jsx)("span",{className:"w-1.5 h-1.5 rounded-full bg-[#4681E8] animate-pulse mt-1"})]}):(0,a.jsx)("span",{className:"text-slate-500 font-medium text-[12px]",children:s})}),(0,a.jsxs)("div",{className:"flex-1 flex flex-col justify-center px-3 py-2 gap-1.5 min-w-0",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between w-full",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2.5 min-w-0 overflow-hidden",children:[(0,a.jsx)("img",{src:x,alt:e.home_name,className:"w-4 h-4 shrink-0 object-contain",onError:e=>e.currentTarget.src=n(),loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-[13px] font-semibold truncate text-slate-800",children:e.home_name})]}),l.showScore&&(0,a.jsx)("span",{className:`text-[15px] font-black tabular-nums shrink-0 ml-2 ${o?"text-[#4681E8]":"text-slate-700"}`,children:c})]}),(0,a.jsxs)("div",{className:"flex items-center justify-between w-full",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2.5 min-w-0 overflow-hidden",children:[(0,a.jsx)("img",{src:h,alt:e.away_name,className:"w-4 h-4 shrink-0 object-contain",onError:e=>e.currentTarget.src=n(),loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-[13px] font-semibold truncate text-slate-800",children:e.away_name})]}),l.showScore&&(0,a.jsx)("span",{className:`text-[15px] font-black tabular-nums shrink-0 ml-2 ${o?"text-[#4681E8]":"text-slate-700"}`,children:d})]})]}),(0,a.jsx)("div",{className:"w-[48px] h-full flex items-center justify-center shrink-0 text-slate-300 group-hover:text-[#4681E8] transition-colors border-l border-slate-100",children:(0,a.jsx)("svg",{className:"w-5 h-5 fill-current",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{d:"M8 5v14l11-7z"})})})]})}let o=new Set(["1","2","3","4","5","7"]),c=new Set(["8","9","15"]),d=new Set(["51","52","53","54","55","56","57","58","59"]),x=new Set(["100","90","91","92","93","110"]);function h(e){let t=String(e.status_id);return 2>=parseInt(e.sport_id)?o.has(t):d.has(t)}function m({matches:e,matchIndex:t}){let[s,n]=(0,l.useState)("1"),[o,d]=(0,l.useState)("all"),[p,u]=(0,l.useState)(1);(0,l.useEffect)(()=>{u(1)},[s,o]);let{todayStart:g,tomorrowStart:b,dayAfterStart:f}=(0,l.useMemo)(()=>{let e,t,s,{vnTodayStartUTC:a,vnTomorrowStartUTC:l,vnDayAfterStartUTC:r}=(s=(t=Math.floor(Date.UTC((e=new Date(Date.now()+252e5)).getUTCFullYear(),e.getUTCMonth(),e.getUTCDate())/1e3)-25200)+86400,{vnTodayStartUTC:t,vnTomorrowStartUTC:s,vnDayAfterStartUTC:s+86400});return{todayStart:a,tomorrowStart:l,dayAfterStart:r}},[]),j=(0,l.useMemo)(()=>new Map(e.map(e=>[e?.match_key?String(e.match_key):e?.ls_id?String(e.ls_id):e?.id?`${String(e.sport_id||"0")}
214:${String(e.id)}`:e?.scheduleId?`${String(e.sport_id||"0")}:schedule:${String(e.scheduleId)}`:[String(e?.sport_id||"0"),String(e?.time||"0"),String(e?.home_name||""),String(e?.away_name||"")].join(":"),e])),[e]),w=t?.summary_by_sport?.[s],v=t?.bucket_keys_by_sport?.[s],N=t?.bucket_pages_by_sport?.[s],y=e.filter(e=>{let t;return String(e.sport_id)===s&&(t=String(e.status_id),2>=parseInt(e.sport_id)?!c.has(t):!x.has(t))}),_=y.filter(e=>{let t=parseInt(e.time);return t>=g&&t<b}),k=y.filter(e=>{let t=parseInt(e.time);return t>=b&&t<f}),E={all:y.length,live:y.filter(e=>h(e)).length,hot:y.filter(e=>"1"===String(e.hot)).length,today:_.length,tomorrow:k.length},C=(0,l.useMemo)(()=>{if(v){if("all"===o&&Array.isArray(N?.all)&&N.all.length>0)return N.all.slice(0,p).flat().map(e=>j.get(e)).filter(Boolean);let e=v[o];if(Array.isArray(e))return e.map(e=>j.get(e)).filter(Boolean)}return"all"===o?y:"live"===o?y.filter(e=>h(e)):"hot"===o?y.filter(e=>"1"===String(e.hot)):"today"===o?_:"tomorrow"===o?k:y},[o,y,j,N,v,_,k,p]),S="all"===o&&Array.isArray(N?.all)&&p<N.all.length,L=(0,l.useMemo)(()=>"all"!==o&&"live"!==o&&"hot"!==o?[]:C.filter(e=>"1"===String(e.hot)||h(e)).slice(0,4),[C,o]),$=(0,l.useMemo)(()=>{let e=new Map;
214return C.forEach(t=>{let s=t.source_card_meta?.league_label||t.match_data?.competition_vi||t.match_data?.competition_name||t.match_data?.competition_full||"Giải đấu kh\xe1c";e.has(s)||e.set(s,[]),e.get(s).push(t)}),Array.from(e.entries())},[C]);return(0,a.jsxs)("div",{className:"w-full min-h-[500px]",children:[(0,a.jsx)(r,{activeSport:s,onSportChange:n,activeStatus:o,onStatusChange:d,matchesCount:w||E}),0===C.length?(0,a.jsx)("div",{className:"py-20 text-center",children:(0,a.jsx)("div",{className:"text-slate-400 text-base font-medium",children:"Kh\xf4ng c\xf3 trận đấu n\xe0o."})}):(0,a.jsxs)("div",{className:"flex flex-col gap-6",children:[L.length>0&&"all"===o&&(0,a.jsxs)("div",{className:"mb-4",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 mb-3 px-1",children:[(0,a.jsx)("span",{className:"w-2 h-4 rounded-full bg-[#4681E8]"}),(0,a.jsx)("h2",{className:"text-slate-800 font-black text-sm uppercase tracking-wider",children:"Trận đấu t\xe2m điểm"})]}),(0,a.jsx)("div",{className:"grid grid-cols-1 xl:grid-cols-2 gap-2",children:L.map((e,t)=>(0,a.jsx)(i,{match:e},`featured-${e.ls_id||e.id}-${t}`))})]}),(0,a.jsx)("div",{className:"flex flex-col gap-5",children:$.map(([e,t])=>{let s=t[0]?.match_data?.competition_logo;return(0,a.jsxs)("div",{className:"rounded-xl overflow-hidden border border-slate-200 bg-white shadow-sm",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2.5 bg-[#0E1B33] px-4 py-2.5 border-b border-[#0E1B33]",children:[s&&(0,a.jsx)("img",{src:s,alt:"league",className:"w-4 h-4 object-contain brightness-200 opacity-80",loading:"lazy",decoding:"async"}),(0,a.jsx)("h3",{className:"text-white text-[12px] font-bold uppercase tracking-wider truncate",children:e})]}),(0,a.jsx)("div",{className:"flex flex-col",children:t.map((e,t)=>(0,a.jsx)(i,{match:e},e.ls_id||`${e.id}-${t}`))})]},e)})}),S&&(0,a.jsx)("div",{className:"flex justify-center mt-6",children:(0,a.jsx)("button",{type:"button",onClick:()=>u(e=>e+1),className:"inline-flex items-center justify-center rounded-xl border border-[#4681E8]/30 bg-white px-8 py-3 text-[12px] font-bold uppercase tracking-wider text-[#4681E8] transition-all duration-200 hover:bg-[#4681E8] hover:text-white hover:border-[#4681E8]",children:"Tải th\xeam"})})]})]})}},22678:(e,t,s)=>{"use strict";s.d(t,{LiveMatchesClient:()=>m});var a=s(68019),l=s(10707);function r({activeSport:e,onSportChange:t,activeStatus:s,onStatusChange:l,matchesCount:n}){return(0,a.jsxs)("div",{className:"mb-5 flex flex-col gap-3",children:[(0,a.jsx)("div",{className:"flex items-center gap-2 overflow-x-auto pb-1 scrollbar-hide",children:[{id:"1",label:"B\xd3NG Đ\xc1",icon:"⚽"},{id:"2",label:"B\xd3NG RỔ",icon:"\uD83C\uDFC0"},{id:"5",label:"TENNIS",icon:"\uD83C\uDFBE"},{id:"4",label:"CẦU L\xd4NG",icon:"\uD83C\uDFF8"},{id:"3",label:"B\xd3NG CHUYỀN",icon:"\uD83C\uDFD0"},{id:"6",label:"B\xd3NG B\xc0N",icon:"\uD83C\uDFD3"}].map(s=>{let l=e===s.id;return(0,a.jsxs)("button",{type:"button",onClick:()=>t(s.id),className:`flex items-center gap-2 px-4 py-2.5 rounded-xl font-bold text-[12px] whitespace-nowrap transition-all duration-200 border cursor-pointer ${l?"bg-[#4681E8]/10 text-[#4681E8] border-[#4681E8]/40 shadow-[0_0_15px_rgba(70,129,232,0.1)]":"bg-white text-slate-500 border-slate-200 hover:text-slate-700 hover:border-[#4681E8]/30"}`,children:[(0,a.jsx)("span",{className:"text-[14px]",children:s.icon}),(0,a.jsx)("span",{className:"tracking-wider uppercase",children:s.label})]},s.id)})}),(0,a.jsx)("div",{className:"flex items-center gap-1 overflow-x-auto pb-1 scrollbar-hide bg-white rounded-xl p-1.5 border border-slate-200",children:[{id:"all",label:"TẤT CẢ",keyCount:"all"},{id:"live",label:"TRỰC TIẾP",keyCount:"live"},{id:"hot",label:"HOT",keyCount:"hot"},{id:"today",label:"H\xd4M NAY",keyCount:"today"},{id:"tomorrow",label:"NG\xc0Y MAI",keyCount:"tomorrow"}].map(e=>{let t=s===e.id,r=n[e.keyCount]||0;return(0,a.jsxs)("button",{type:"button",onClick:()=>l(e.id),className:`relative px-4 py-2 font-bold text-[12px] whitespace-nowrap transition-all duration-200 uppercase tracking-wider flex items-center gap-2 rounded-lg cursor-pointer ${t?"bg-[#4681E8]/10 text-[#4681E8] shadow-inner":"text-slate-500 hover:text-slate-700 hover:bg-[#4681E8]/5"}`,children:["live"===e.id&&t&&(0,a.jsx)("span",{className:"w-1.5 h-1.5 rounded-full bg-[#4681E8] animate-pulse shadow-[0_0_6px_rgba(70,129,232,0.8)]"}),(0,a.jsx)("span",{children:e.label}),(0,a.jsx)("span",{className:`px-1.5 py-0.5 rounded text-[10px] font-black ${t?"bg-[#4681E8]/20 text-[#4681E8]":"text-slate-400"}`,children:r})]},e.id)})})]})}function n(){return"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='10' fill='%2364748B' fill-opacity='0.18'/%3
214E%3C/svg%3E"}function i({match:e,isLoading:t=!1}){if(t||!e)return(0,a.jsx)("div",{className:"animate-pulse bg-white h-[64px] w-full border-b border-slate-100"});let s=new Date(1e3*parseInt(e.time||0,10)).toLocaleTimeString("vi-VN",{hour:"2-digit",minute:"2-digit",timeZone:"Asia/Ho_Chi_Minh"}),l=function(e,t){if("1"===t||"2"===t)switch(e){case"1":default:return{text:"Sắp diễn",isLive:!1,showScore:!1};case"2":return{text:"H1",isLive:!0,showScore:!0};case"3":return{text:"HT",isLive:!0,showScore:!0};case"4":return{text:"H2",isLive:!0,showScore:!0};case"5":return{text:"Phụ",isLive:!0,showScore:!0};case"7":return{text:"Pen",isLive:!0,showScore:!0};case"8":case"9":return{text:"FT",isLive:!1,showScore:!0}}switch(e){case"0":case"1":return{text:"Sắp diễn",isLive:!1,showScore:!1};case"51":return{text:"S1",isLive:!0,showScore:!0};case"52":return{text:"S2",isLive:!0,showScore:!0};case"53":return{text:"S3",isLive:!0,showScore:!0};case"54":return{text:"S4",isLive:!0,showScore:!0};case"55":return{text:"S5",isLive:!0,showScore:!0};case"100":case"90":case"91":case"110":return{text:"FT",isLive:!1,showScore:!0};default:return{text:"LIVE",isLive:!0,showScore:!0}}}(String(e.status_id),String(e.sport_id)),r=e.time_text||e.source_card_meta?.time_text||"",o=l.isLive,c=e.home_score??"-",d=e.away_score??"-",x=e.home_logo||n(),h=e.away_logo||n();return(0,a.jsxs)("a",{href:`/match/${encodeURIComponent(e.post_name||e.id)}`,className:"flex items-center w-full group border-b border-slate-100 bg-white hover:bg-[#4681E8]/5 transition-colors min-h-[64px]",children:[(0,a.jsx)("div",{className:`w-[60px] flex flex-col items-center justify-center shrink-0 h-full border-r ${o?"border-[#4681E8]/30 bg-[#4681E8]/5":"border-slate-100"}`,children:o?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"text-[#4681E8] font-bold text-[11px] uppercase tracking-wider tabular-nums leading-none",children:r||l.text}),(0,a.jsx)("span",{className:"w-1.5 h-1.5 rounded-full bg-[#4681E8] animate-pulse mt-1"})]}):(0,a.jsx)("span",{className:"text-slate-500 font-medium text-[12px]",children:s})}),(0,a.jsxs)("div",{className:"flex-1 flex flex-col justify-center px-3 py-2 gap-1.5 min-w-0",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between w-full",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2.5 min-w-0 overflow-hidden",children:[(0,a.jsx)("img",{src:x,alt:e.home_name,className:"w-4 h-4 shrink-0 object-contain",onError:e=>e.currentTarget.src=n(),loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-[13px] font-semibold truncate text-slate-800",children:e.home_name})]}),l.showScore&&(0,a.jsx)("span",{className:`text-[15px] font-black tabular-nums shrink-0 ml-2 ${o?"text-[#4681E8]":"text-slate-700"}`,children:c})]}),(0,a.jsxs)("div",{className:"flex items-center justify-between w-full",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2.5 min-w-0 overflow-hidden",children:[(0,a.jsx)("img",{src:h,alt:e.away_name,className:"w-4 h-4 shrink-0 object-contain",onError:e=>e.currentTarget.src=n(),loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-[13px] font-semibold truncate text-slate-800",children:e.away_name})]}),l.showScore&&(0,a.jsx)("span",{className:`text-[15px] font-black tabular-nums shrink-0 ml-2 ${o?"text-[#4681E8]":"text-slate-700"}`,children:d})]})]}),(0,a.jsx)("div",{className:"w-[48px] h-full flex items-center justify-center shrink-0 text-slate-300 group-hover:text-[#4681E8] transition-colors border-l border-slate-100",children:(0,a.jsx)("svg",{className:"w-5 h-5 fill-current",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{d:"M8 5v14l11-7z"})})})]})}let o=new Set(["1","2","3","4","5","7"]),c=new Set(["8","9","15"]),d=new Set(["51","52","53","54","55","56","57","58","59"]),x=new Set(["100","90","91","92","93","110"]);function h(e){let t=String(e.status_id);return 2>=parseInt(e.sport_id)?o.has(t):d.has(t)}function m({matches:e,matchIndex:t}){let[s,n]=(0,l.useState)("1"),[o,d]=(0,l.useState)("all"),[p,u]=(0,l.useState)(1);(0,l.useEffect)(()=>{u(1)},[s,o]);let{todayStart:g,tomorrowStart:b,dayAfterStart:f}=(0,l.useMemo)(()=>{let e,t,s,{vnTodayStartUTC:a,vnTomorrowStartUTC:l,vnDayAfterStartUTC:r}=(s=(t=Math.floor(Date.UTC((e=new Date(Date.now()+252e5)).getUTCFullYear(),e.getUTCMonth(),e.getUTCDate())/1e3)-25200)+86400,{vnTodayStartUTC:t,vnTomorrowStartUTC:s,vnDayAfterStartUTC:s+86400});return{todayStart:a,tomorrowStart:l,dayAfterStart:r}},[]),j=(0,l.useMemo)(()=>new Map(e.map(e=>[e?.match_key?String(e.match_key):e?.ls_id?String(e.ls_id):e?.id?`${String(e.sport_id||"0")}
214:${String(e.id)}`:e?.scheduleId?`${String(e.sport_id||"0")}:schedule:${String(e.scheduleId)}`:[String(e?.sport_id||"0"),String(e?.time||"0"),String(e?.home_name||""),String(e?.away_name||"")].join(":"),e])),[e]),w=t?.summary_by_sport?.[s],v=t?.bucket_keys_by_sport?.[s],N=t?.bucket_pages_by_sport?.[s],y=e.filter(e=>{let t;return String(e.sport_id)===s&&(t=String(e.status_id),2>=parseInt(e.sport_id)?!c.has(t):!x.has(t))}),_=y.filter(e=>{let t=parseInt(e.time);return t>=g&&t<b}),k=y.filter(e=>{let t=parseInt(e.time);return t>=b&&t<f}),E={all:y.length,live:y.filter(e=>h(e)).length,hot:y.filter(e=>"1"===String(e.hot)).length,today:_.length,tomorrow:k.length},C=(0,l.useMemo)(()=>{if(v){if("all"===o&&Array.isArray(N?.all)&&N.all.length>0)return N.all.slice(0,p).flat().map(e=>j.get(e)).filter(Boolean);let e=v[o];if(Array.isArray(e))return e.map(e=>j.get(e)).filter(Boolean)}return"all"===o?y:"live"===o?y.filter(e=>h(e)):"hot"===o?y.filter(e=>"1"===String(e.hot)):"today"===o?_:"tomorrow"===o?k:y},[o,y,j,N,v,_,k,p]),S="all"===o&&Array.isArray(N?.all)&&p<N.all.length,L=(0,l.useMemo)(()=>"all"!==o&&"live"!==o&&"hot"!==o?[]:C.filter(e=>"1"===String(e.hot)||h(e)).slice(0,4),[C,o]),$=(0,l.useMemo)(()=>{let e=new Map;
214return C.forEach(t=>{let s=t.source_card_meta?.league_label||t.match_data?.competition_vi||t.match_data?.competition_name||t.match_data?.competition_full||"Giải đấu kh\xe1c";e.has(s)||e.set(s,[]),e.get(s).push(t)}),Array.from(e.entries())},[C]);return(0,a.jsxs)("div",{className:"w-full min-h-[500px]",children:[(0,a.jsx)(r,{activeSport:s,onSportChange:n,activeStatus:o,onStatusChange:d,matchesCount:w||E}),0===C.length?(0,a.jsx)("div",{className:"py-20 text-center",children:(0,a.jsx)("div",{className:"text-slate-400 text-base font-medium",children:"Kh\xf4ng c\xf3 trận đấu n\xe0o."})}):(0,a.jsxs)("div",{className:"flex flex-col gap-6",children:[L.length>0&&"all"===o&&(0,a.jsxs)("div",{className:"mb-4",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 mb-3 px-1",children:[(0,a.jsx)("span",{className:"w-2 h-4 rounded-full bg-[#4681E8]"}),(0,a.jsx)("h2",{className:"text-slate-800 font-black text-sm uppercase tracking-wider",children:"Trận đấu t\xe2m điểm"})]}),(0,a.jsx)("div",{className:"grid grid-cols-1 xl:grid-cols-2 gap-2",children:L.map((e,t)=>(0,a.jsx)(i,{match:e},`featured-${e.ls_id||e.id}-${t}`))})]}),(0,a.jsx)("div",{className:"flex flex-col gap-5",children:$.map(([e,t])=>{let s=t[0]?.match_data?.competition_logo;return(0,a.jsxs)("div",{className:"rounded-xl overflow-hidden border border-slate-200 bg-white shadow-sm",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2.5 bg-[#0E1B33] px-4 py-2.5 border-b border-[#0E1B33]",children:[s&&(0,a.jsx)("img",{src:s,alt:"league",className:"w-4 h-4 object-contain brightness-200 opacity-80",loading:"lazy",decoding:"async"}),(0,a.jsx)("h3",{className:"text-white text-[12px] font-bold uppercase tracking-wider truncate",children:e})]}),(0,a.jsx)("div",{className:"flex flex-col",children:t.map((e,t)=>(0,a.jsx)(i,{match:e},e.ls_id||`${e.id}-${t}`))})]},e)})}),S&&(0,a.jsx)("div",{className:"flex justify-center mt-6",children:(0,a.jsx)("button",{type:"button",onClick:()=>u(e=>e+1),className:"inline-flex items-center justify-center rounded-xl border border-[#4681E8]/30 bg-white px-8 py-3 text-[12px] font-bold uppercase tracking-wider text-[#4681E8] transition-all duration-200 hover:bg-[#4681E8] hover:text-white hover:border-[#4681E8]",children:"Tải th\xeam"})})]})]})}},22739:(e,t,s)=>{"use strict";s.d(t,{d:()=>r});var a=s(68019),l=s(70508);function r({eyebrow:e,title:t,titleAddon:s,rightSlot:n,className:i}){return(0,a.jsx)("div",{className:(0,l.cn)("relative mb-5 overflow-hidden border-b border-slate-200",i),children:(0,a.jsxs)("div",{className:"flex items-center justify-between px-1 py-4 min-h-[56px]",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 min-w-0",children:[(0,a.jsx)("span",{className:"h-8 w-1 shrink-0 rounded-sm bg-gradient-to-b from-[#4681E8] to-[#55CAF1] shadow-[0_0_10px_rgba(70,129,232,0.5)]"}),(0,a.jsxs)("div",{className:"min-w-0",children:[e&&(0,a.jsx)("div",{className:"text-[10px] font-bold uppercase tracking-[0.2em] text-[#4681E8]/60 mb-0.5",children:e}),(0,a.jsxs)("div",{className:"flex items-center gap-2.5 flex-wrap",children:[(0,a.jsx)("h1",{className:"text-[18px] sm:text-[22px] font-black uppercase tracking-tight text-slate-800 leading-none",children:t}),s]})]})]}),n&&(0,a.jsx)("div",{className:"hidden sm:flex items-center gap-2 text-right shrink-0 ml-4",children:n})]})})}},22999:(e,t,s)=>{"use strict";s.d(t,{Klivevip01ResultsPage:()=>o});var a=s(68019),l=s(10707),r=s(78637),n=s(99271),i=s(97426);function o({initialData:e,selectedLeague:t}){let s=(0,r.useRouter)(),c=(0,r.usePathname)(),d=(0,r.useSearchParams)(),[x,h]=(0,l.useTransition)(),[m,p]=(0,l.useState)(!1),[u,g]=(0,l.useState)(""),{availableLeagues:b,dateGroups:f}=(0,l.useMemo)(()=>(0,i.o8)(e),[e]),j=(0,l.useMemo)(()=>Array.from(new Set(f.map(e=>e.date_header))),[f]),w=d.get("date")||"",v=e=>{let t=new URLSearchParams(d.toString());e&&e!==w?t.set("date",e):t.delete("date"),h(()=>{let e=t.toString();s.push(e?`${c}?${e}`:c,{scroll:!1})})},N=(0,l.useMemo)(()=>{let e=f;return w&&(e=e.filter(e=>e.date_header===w)),(0,i.kK)(e,t)},[f,w,t]),y=(0,l.useMemo)(()=>
214{if(!u)return b;let e=u.toLowerCase();return b.filter(t=>t.name.toLowerCase().includes(e))},[b,u]),_=N.reduce((e,t)=>e+t.matches.length,0);if(0===f.length)return(0,a.jsxs)("div",{className:"max-w-[1440px] mx-auto px-4 py-8",children:[(0,a.jsx)(n.Q,{eyebrow:"Kết quả",title:"KẾT QUẢ B\xd3NG Đ\xc1"}),(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center py-16 gap-4",children:[(0,a.jsx)("div",{className:"w-12 h-12 rounded-full border-2 border-[#E11D48]/30 border-t-[#E11D48] animate-spin"}),(0,a.jsx)("span",{className:"text-slate-500 text-sm font-medium tracking-wide",children:"Đang tải kết quả..."})]})]});let k=e=>{let t=new URLSearchParams(d.toString());e?t.set("league",e):t.delete("league"),p(!1),g(""),h(()=>{let e=t.toString();s.push(e?`${c}?${e}`:c,{scroll:!1})})};return(0,a.jsxs)("div",{className:"max-w-[1440px] mx-auto px-4 py-8",children:[(0,a.jsx)(n.Q,{eyebrow:"Kết quả",title:"KẾT QUẢ B\xd3NG Đ\xc1",rightSlot:(0,a.jsx)("div",{className:"text-[12px] text-slate-600",children:(0,a.jsx)("span",{className:"text-slate-900/80 font-bold",children:t||"Tất cả giải đấu"})})}),(0,a.jsxs)("div",{className:"flex flex-col md:flex-row gap-4 mb-4 items-start md:items-center justify-between",children:[j.length>0&&(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,a.jsx)("button",{type:"button",onClick:()=>v(""),className:`px-4 py-2 rounded-xl text-sm font-bold transition-all duration-300 ${!w?"bg-gradient-to-r from-[#4681E8] to-[#2563eb] text-white shadow-[0_4px_15px_rgba(70,129,232,0.4)] border border-[#4681E8]/50":"bg-white text-[#64748B] border border-slate-200 hover:bg-slate-50 hover:text-slate-800"}`,children:"Tất cả ng\xe0y"}),j.slice(0,5).map(e=>(0,a.jsx)("button",{type:"button",onClick:()=>v(e),className:`px-4 py-2 rounded-xl text-sm font-bold transition-all duration-300 ${w===e?"bg-gradient-to-r from-[#4681E8] to-[#2563eb] text-white shadow-[0_4px_15px_rgba(70,129,232,0.4)] border border-[#4681E8]/50":"bg-white text-[#64748B] border border-slate-200 hover:bg-slate-50 hover:text-slate-800"}`,children:e},e))]}),(0,a.jsxs)("div",{className:"relative w-full md:w-[320px]",children:[(0,a.jsxs)("button",{onClick:()=>p(!m),className:"w-full flex items-center gap-3 bg-white hover:bg-slate-50 px-4 py-2.5 rounded-xl border border-slate-200 shadow-inner transition-all text-sm",children:[(0,a.jsx)("svg",{className:"w-5 h-5 text-[#4681E8]",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 4a1 1 0 011-1h16a1 1 0 011 1v2.586a1 1 0 01-.293.707l-6.414 6.414a1 1 0 00-.293.707V17l-4 4v-6.586a1 1 0 00-.293-.707L3.293 7.293A1 1 0 013 6.586V4z"})}),(0,a.jsx)("span",{className:"text-slate-700 font-bold flex-1 text-left truncate",children:t||"Chọn giải đấu..."}),(0,a.jsx)("svg",{className:`w-4 h-4 text-slate-400 transition-transform ${m?"rotate-180":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),m&&(0,a.jsxs)("div",{className:"absolute top-full left-0 right-0 mt-2 bg-white border border-slate-200 rounded-2xl shadow-xl z-50 max-h-[300px] overflow-hidden flex flex-col",children:[(0,a.jsx)("div",{className:"p-2 border-b border-slate-100",children:(0,a.jsx)("input",{type:"text",placeholder:"T\xecm giải đấu...",value:u,onChange:e=>g(e.target.value),className:"w-full bg-slate-50 border border-transparent rounded-xl px-4 py-2.5 text-sm text-slate-800 placeholder-slate-400 outline-none focus:border-[#4681E8]/50 transition-colors"})}),(0,a.jsxs)("div",{className:"overflow-y-auto flex-1 pb-2",children:[(0,a.jsx)("button",{type:"button",onClick:()=>k(),className:`block w-full text-left px-4 py-3 text-sm transition-colors ${!t?"bg-[#4681E8]/10 text-[#4681E8] border-l-4 border-[#4681E8]":"text-slate-600 hover:bg-slate-50 hover:text-slate-800"}`,children:"Tất cả giải đấu"}),y.map((e,s)=>(0,a.jsxs)("button",{type:"button",onClick:()=>k(e.name),className:`flex items-center gap-3 px-4 py-3 text-sm transition-colors cursor-pointer ${t===e.name?"bg-[#4681E8]/10 text-[#4681E8] border-l-4 border-[#4681E8]":"text-slate-600 hover:bg-slate-50 hover:text-slate-800"}`,children:[e.icon?(0,a.jsx)("img",{src:e.icon,alt:e.name||"League",className:"w-5 h-5 object-contain shrink-0",loading:"lazy",decoding:"async"}):(0,a.jsx)("div",{className:"w-5 h-5 rounded-md bg-slate-200 shrink-0"}),(0,a.jsx)("span",{className:"truncate",children:e.name})]},s))]})]})]})]}),x&&(0,a.jsxs)("div",{className:"mb-4 inline-flex items-center gap-2 rounded-full border border-slate-200 bg-white px-4 py-2 text-xs text-slate-500 shadow-sm",children:[(0,a.jsx)("span",{className:"h-2 w-2 rounded-full bg-[#E11D48] animate-pulse shadow-[0_0_8px_rgba(225,29,72,0.8)]"}),(0,a.jsx)("span",{className:"font-bold tracking-wide",children:"Đang tải kết quả từ server..."})]}),(0,a.jsx)("div",{className:"space-y-4",children:0===N.length?(0,a.jsx)("div",{className:"text-center py-16 text-[#64748B] font-medium tracking-wide",children:"Kh\xf4ng c\xf3 kết quả n\xe0o"}):N.map((e,t)=>(0,a.jsxs)("div",{className:"overflow-hidden rounded-2xl border border-slate-200 bg-white shadow-[0_8px_30px_rgba(0,0,0,0.06)]",children:[(0,a.jsx)("div",{className:"bg-slate-50 px-5 py-3 border-b border-slate-100 flex items-center justify-between",children:(0,a.jsxs)("span",{className:"text-[12px] text-slate-500 font-bold uppercase tracking-widest",children:[e.league_round?e.league_round:"V\xf2ng đấu",(0,a.jsx)("span",{className:"text-[#E11D48] ml-2 font-mono text-[11px] bg-[#E11D48]/10 px-2 py-0.5 rounded-full border border-[#
214E11D48]/20",children:e.date_header})]})}),e.matches.map((e,t)=>{var s;return(0,a.jsx)("div",{className:"bg-transparent hover:bg-slate-50 border-b border-slate-100 last:border-0 transition-colors group cursor-default",children:(0,a.jsxs)("div",{className:"flex items-center py-4 px-5 gap-4",children:[(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center min-w-[56px] shrink-0 border-r border-slate-100 pr-4",children:[(0,a.jsx)("span",{className:"text-[9px] text-slate-400 uppercase tracking-widest mb-1 font-bold",children:"L\xfac"}),(0,a.jsx)("span",{className:"text-[13px] text-slate-700 font-mono font-black",children:e.time})]}),(0,a.jsxs)("div",{className:"flex-1 flex items-center justify-end gap-3 min-w-0",children:[(0,a.jsx)("span",{className:"text-[14px] text-slate-800 font-bold truncate text-right group-hover:text-slate-900 transition-colors",children:e.home_team}),e.home_logo?(0,a.jsx)("div",{className:"w-8 h-8 rounded-full bg-slate-100 border border-slate-200 p-1 flex items-center justify-center shadow-sm",children:(0,a.jsx)("img",{src:e.home_logo,alt:e.home_team||"Home team",className:"w-full h-full object-contain",loading:"lazy"})}):(0,a.jsx)("div",{className:"w-8 h-8 rounded-full bg-slate-100 shrink-0 border border-slate-200 flex items-center justify-center text-[10px] font-bold text-slate-400",children:"?"})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center min-w-[90px] shrink-0 bg-slate-50 rounded-xl py-2 px-2 border border-slate-200 shadow-inner group-hover:border-[#4681E8]/40 transition-colors",children:[(0,a.jsx)("span",{className:`text-[22px] leading-none font-black tracking-widest drop-shadow-[0_2px_4px_rgba(0,0,0,0.8)] ${!(s=e.score)||"-"===s?"text-slate-400":"text-slate-800"}`,children:e.score}),e.ht_score&&(0,a.jsxs)("span",{className:"text-[10px] text-slate-500 font-mono mt-1 font-bold",children:["HT: ",e.ht_score]})]}),(0,a.jsxs)("div",{className:"flex-1 flex items-center gap-3 min-w-0",children:[e.away_logo?(0,a.jsx)("div",{className:"w-8 h-8 rounded-full bg-slate-100 border border-slate-200 p-1 flex items-center justify-center shadow-sm",children:(0,a.jsx)("img",{src:e.away_logo,alt:e.away_team||"Away team",className:"w-full h-full object-contain",loading:"lazy"})}):(0,a.jsx)("div",{className:"w-8 h-8 rounded-full bg-slate-100 shrink-0 border border-slate-200 flex items-center justify-center text-[10px] font-bold text-slate-400",children:"?"}),(0,a.jsx)("span",{className:"text-[14px] text-slate-800 font-bold truncate text-left group-hover:text-slate-900 transition-colors",children:e.away_team})]})]})},t)})]},t))}),(0,a.jsxs)("div",{className:"mt-6 text-center text-xs text-[#64748B] font-bold uppercase tracking-widest drop-shadow-sm",children:["Hiển thị ",_," kết quả trận đấu"]})]})}},23719:(e,t,s)=>{"use strict";function a(e){let t=e?.fixtures_v2||null,s=e?.fixtures||e?.schedules||[],a=t?.date_tabs?.length?t.date_tabs:function(e=new Date){let t=["Chủ Nhật","Thứ Hai","Thứ Ba","Thứ Tư","Thứ Năm","Thứ S\xe1u","Thứ Bảy"],s=[];for(let a=0;a<14;a+=1){let l=new Date(e);l.setDate(l.getDate()+a);let r=String(l.getDate()).padStart(2,"0"),n=String(l.getMonth()+1).padStart(2,"0"),i=`${l.getFullYear()}-${l.getMonth()+1}-${l.getDate()}`;s.push({label:0===a?"H\xf4m Nay":t[l.getDay()],date:`${r}.${n}`,dataValue:i,active:0===a})}return s}(),l=e?.selected_date||a.find(e=>e.active)?.dataValue||a[0]?.dataValue||null;if(t?.leagues?.length)return{dateTabs:a,selectedDate:l,leagues:t.leagues,totalMatches:t.leagues.reduce((e,t)=>e+t.matches.length,0)};let r=[],n=new Set;return s.forEach(e=>{let t=e.data;if(!(t.length<3))for(let s=0;s+2<t.length;s+=16){let a=t[s]||"",l=t[s+1]||"",i=t[s+2]||"",o=`${a}-${l}-${i}`;if(!n.has(o)&&l&&(n.add(o),r.push({time:a,home_team:l,away_team:i,home_logo:e.team_logos?.[2*Math.floor(s/16)]||"",away_logo:e.team_logos?.[2*Math.floor(s/16)+1]||"",score:t[s+3]||"-",ht_score:t[s+4]||"",handicap:t.length>s+9?[t[s+7]||"",t[s+8]||"",t[s+9]||""]:[],over_under:t.length>s+12?[t[s+10]||"",t[s+11]||"",t[s+12]||""]:[],one_x_two:t.length>s+15?[t[s+13]||"",t[s+14]||"",t[s+15]||""]:[]}),s+16>=t.length))break}}),{dateTabs:a,selectedDate:l,leagues:r.length>0?[{league_name:"Tất cả trận đấu",league_icon:"",match_count:r.length,matches:r}]:[],totalMatches:r.length}}function l(e){let t=e?.results_v2||null,s=e?.results||[];if(t?.date_groups?.length)return{availableLeagues:t.available_leagues||[],dateGroups:t.date_groups,totalMatches:t.date_groups.reduce((e,t)=>
214e+t.matches.length,0)};let a=[];return s.forEach(e=>{let t=e.data;if(t.length<6)return;let s=t[0],l=s.split(" - "),r=[],n=1,i=0;for(;n<t.length;){if(t[n]?.startsWith("L\xfac")){let s=t[n].replace("L\xfac","").trim();r.push({time:s,home_team:t[n+1]||"",away_team:t[n+4]||"",home_logo:e.team_logos?.[i]||"",away_logo:e.team_logos?.[i+1]||"",score:t[n+2]||"",ht_score:(t[n+3]||"").replace("H1:","").replace("HT:","").trim()}),i+=2,n+=5;continue}n+=1}r.length>0&&a.push({date_header:l[0]?.trim()||s,league_round:l.slice(1).join(" - ").trim(),matches:r})}),{availableLeagues:[],dateGroups:a,totalMatches:a.reduce((e,t)=>e+t.matches.length,0)}}function r(e,t){if(!t)return e;let s=t.toLowerCase();return e.filter(e=>e.league_round.toLowerCase().includes(s))}s.d(t,{kK:()=>r,o8:()=>l,p_:()=>a})},24090:(e,t,s)=>{"use strict";s.d(t,{LiveMatchesClient:()=>m});var a=s(68019),l=s(10707);function r({activeSport:e,onSportChange:t,activeStatus:s,onStatusChange:l,matchesCount:n}){return(0,a.jsxs)("div",{className:"mb-5 flex flex-col gap-3",children:[(0,a.jsx)("div",{className:"flex items-center gap-2 overflow-x-auto pb-1 scrollbar-hide",children:[{id:"1",label:"B\xd3NG Đ\xc1",icon:"⚽"},{id:"2",label:"B\xd3NG RỔ",icon:"\uD83C\uDFC0"},{id:"5",label:"TENNIS",icon:"\uD83C\uDFBE"},{id:"4",label:"CẦU L\xd4NG",icon:"\uD83C\uDFF8"},{id:"3",label:"B\xd3NG CHUYỀN",icon:"\uD83C\uDFD0"},{id:"6",label:"B\xd3NG B\xc0N",icon:"\uD83C\uDFD3"}].map(s=>{let l=e===s.id;return(0,a.jsxs)("button",{type:"button",onClick:()=>t(s.id),className:`flex items-center gap-2 px-4 py-2.5 rounded-xl font-bold text-[12px] whitespace-nowrap transition-all duration-200 border cursor-pointer ${l?"bg-[#4681E8]/10 text-[#4681E8] border-[#4681E8]/40 shadow-[0_0_15px_rgba(70,129,232,0.1)]":"bg-white text-slate-500 border-slate-200 hover:text-slate-700 hover:border-[#4681E8]/30"}`,children:[(0,a.jsx)("span",{className:"text-[14px]",children:s.icon}),(0,a.jsx)("span",{className:"tracking-wider uppercase",children:s.label})]},s.id)})}),(0,a.jsx)("div",{className:"flex items-center gap-1 overflow-x-auto pb-1 scrollbar-hide bg-white rounded-xl p-1.5 border border-slate-200",children:[{id:"all",label:"TẤT CẢ",keyCount:"all"},{id:"live",label:"TRỰC TIẾP",keyCount:"live"},{id:"hot",label:"HOT",keyCount:"hot"},{id:"today",label:"H\xd4M NAY",keyCount:"today"},{id:"tomorrow",label:"NG\xc0Y MAI",keyCount:"tomorrow"}].map(e=>{let t=s===e.id,r=n[e.keyCount]||0;return(0,a.jsxs)("button",{type:"button",onClick:()=>l(e.id),className:`relative px-4 py-2 font-bold text-[12px] whitespace-nowrap transition-all duration-200 uppercase tracking-wider flex items-center gap-2 rounded-lg cursor-pointer ${t?"bg-[#4681E8]/10 text-[#4681E8] shadow-inner":"text-slate-500 hover:text-slate-700 hover:bg-[#4681E8]/5"}`,children:["live"===e.id&&t&&(0,a.jsx)("span",{className:"w-1.5 h-1.5 rounded-full bg-[#4681E8] animate-pulse shadow-[0_0_6px_rgba(70,129,232,0.8)]"}),(0,a.jsx)("span",{children:e.label}),(0,a.jsx)("span",{className:`px-1.5 py-0.5 rounded text-[10px] font-black ${t?"bg-[#4681E8]/20 text-[#4681E8]":"text-slate-400"}`,children:r})]},e.id)})})]})}function n(){return"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='10' fill='%2364748B' fill-opacity='0.18'/%3E%3C/svg%3E"}function i({match:e,isLoading:t=!1}){if(t||!e)return(0,a.jsx)("div",{className:"animate-pulse bg-white h-[64px] w-full border-b border-slate-100"});let s=new Date(1e3*parseInt(e.time||0,10)).toLocaleTimeString("vi-VN",{hour:"2-digit",minute:"2-digit",timeZone:"Asia/Ho_Chi_Minh"}),l=function(e,t){if("1"===t||"2"===t)switch(e){case"1":default:return{text:"Sắp diễn",isLive:!1,showScore:!1};case"2":return{text:"H1",isLive:!0,showScore:!0};case"3":return{text:"HT",isLive:!0,showScore:!0};case"4":return{text:"H2",isLive:!0,showScore:!0};case"5":return{text:"Phụ",isLive:!0,showScore:!0};case"7":return{text:"Pen",isLive:!0,showScore:!0};case"8":case"9":return{text:"FT",isLive:!1,showScore:!0}}switch(e){case"0":case"1":return{text:"Sắp diễn",isLive:!1,showScore:!1};case"51":return{text:"S1",isLive:!0,showScore:!0};case"52":return{text:"S2",isLive:!0,showScore:!0};case"53":return{text:"S3",isLive:!0,showScore:!0};case"54":return{text:"S4",isLive:!0,showScore:!0};case"55":return{text:"S5",isLive:!0,showScore:!0};case"100":case"90":case"91":case"110":return{text:"FT",isLive:!1,showScore:!0};default:return{text:"LIVE",isLive:!0,showScore:!0}}}(String(e.status_id),String(e.sport_id)),r=e.time_text||e.source_card_meta?.time_text||"",o=l.isLive,c=e.home_score??"-",d=e.away_score??"-",x=e.home_logo||n(),h=e.away_logo||n();return(0,a.jsxs)("a",{href:`/match/${encodeURIComponent(e.post_name||e.
214id)}`,className:"flex items-center w-full group border-b border-slate-100 bg-white hover:bg-[#4681E8]/5 transition-colors min-h-[64px]",children:[(0,a.jsx)("div",{className:`w-[60px] flex flex-col items-center justify-center shrink-0 h-full border-r ${o?"border-[#4681E8]/30 bg-[#4681E8]/5":"border-slate-100"}`,children:o?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"text-[#4681E8] font-bold text-[11px] uppercase tracking-wider tabular-nums leading-none",children:r||l.text}),(0,a.jsx)("span",{className:"w-1.5 h-1.5 rounded-full bg-[#4681E8] animate-pulse mt-1"})]}):(0,a.jsx)("span",{className:"text-slate-500 font-medium text-[12px]",children:s})}),(0,a.jsxs)("div",{className:"flex-1 flex flex-col justify-center px-3 py-2 gap-1.5 min-w-0",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between w-full",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2.5 min-w-0 overflow-hidden",children:[(0,a.jsx)("img",{src:x,alt:e.home_name,className:"w-4 h-4 shrink-0 object-contain",onError:e=>e.currentTarget.src=n(),loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-[13px] font-semibold truncate text-slate-800",children:e.home_name})]}),l.showScore&&(0,a.jsx)("span",{className:`text-[15px] font-black tabular-nums shrink-0 ml-2 ${o?"text-[#4681E8]":"text-slate-700"}`,children:c})]}),(0,a.jsxs)("div",{className:"flex items-center justify-between w-full",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2.5 min-w-0 overflow-hidden",children:[(0,a.jsx)("img",{src:h,alt:e.away_name,className:"w-4 h-4 shrink-0 object-contain",onError:e=>e.currentTarget.src=n(),loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-[13px] font-semibold truncate text-slate-800",children:e.away_name})]}),l.showScore&&(0,a.jsx)("span",{className:`text-[15px] font-black tabular-nums shrink-0 ml-2 ${o?"text-[#4681E8]":"text-slate-700"}`,children:d})]})]}),(0,a.jsx)("div",{className:"w-[48px] h-full flex items-center justify-center shrink-0 text-slate-300 group-hover:text-[#4681E8] transition-colors border-l border-slate-100",children:(0,a.jsx)("svg",{className:"w-5 h-5 fill-current",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{d:"M8 5v14l11-7z"})})})]})}let o=new Set(["1","2","3","4","5","7"]),c=new Set(["8","9","15"]),d=new Set(["51","52","53","54","55","56","57","58","59"]),x=new Set(["100","90","91","92","93","110"]);function h(e){let t=String(e.status_id);return 2>=parseInt(e.sport_id)?o.has(t):d.has(t)}function m({matches:e,matchIndex:t}){let[s,n]=(0,l.useState)("1"),[o,d]=(0,l.useState)("all"),[p,u]=(0,l.useState)(1);(0,l.useEffect)(()=>{u(1)},[s,o]);let{todayStart:g,tomorrowStart:b,dayAfterStart:f}=(0,l.useMemo)(()=>{let e,t,s,{vnTodayStartUTC:a,vnTomorrowStartUTC:l,vnDayAfterStartUTC:r}=(s=(t=Math.floor(Date.UTC((e=new Date(Date.now()+252e5)).getUTCFullYear(),e.getUTCMonth(),e.getUTCDate())/1e3)-25200)+86400,{vnTodayStartUTC:t,vnTomorrowStartUTC:s,vnDayAfterStartUTC:s+86400});return{todayStart:a,tomorrowStart:l,dayAfterStart:r}},[]),j=(0,l.useMemo)(()=>new Map(e.map(e=>[e?.match_key?String(e.match_key):e?.ls_id?String(e.ls_id):e?.id?`${String(e.sport_id||"0")}:${String(e.id)}`:e?.scheduleId?`${String(e.sport_id||"0")}:schedule:${String(e.scheduleId)}`:[String(e?.sport_id||"0"),String(e?.time||"0"),String(e?.home_name||""),String(e?.away_name||"")].join(":"),e])),[e]),w=t?.summary_by_sport?.[s],v=t?.bucket_keys_by_sport?.[s],N=t?.bucket_pages_by_sport?.[s],y=e.filter(e=>{let t;return String(e.sport_id)===s&&(t=String(e.status_id),2>=parseInt(e.sport_id)?!c.has(t):!x.has(t))}),_=y.filter(e=>{let t=parseInt(e.time);return t>=g&&t<b}),k=y.filter(e=>{let t=parseInt(e.time);return t>=b&&t<f}),E={all:y.length,live:y.filter(e=>h(e)).length,hot:y.filter(e=>"1"===String(e.hot)).length,today:_.length,tomorrow:k.length},C=(0,l.useMemo)(()=>{if(v){if("all"===o&&Array.isArray(N?.all)&&N.all.length>0)return N.all.slice(0,p).flat().map(e=>j.get(e)).filter(Boolean);let e=v[o];if(Array.isArray(e))return e.map(e=>j.get(e)).filter(Boolean)}return"all"===o?y:"live"===o?y.filter(e=>h(e)):"hot"===o?y.filter(e=>"1"===String(e.hot)):"today"===o?_:"tomorrow"===o?k:y},[o,y,j,N,v,_,k,p]),S="all"===o&&Array.isArray(N?.all)&&p<N.all.length,L=(0,l.useMemo)(()=>"all"!==o&&"live"!==o&&"hot"!==o?[]:C.filter(e=>
214"1"===String(e.hot)||h(e)).slice(0,4),[C,o]),$=(0,l.useMemo)(()=>{let e=new Map;return C.forEach(t=>{let s=t.source_card_meta?.league_label||t.match_data?.competition_vi||t.match_data?.competition_name||t.match_data?.competition_full||"Giải đấu kh\xe1c";e.has(s)||e.set(s,[]),e.get(s).push(t)}),Array.from(e.entries())},[C]);return(0,a.jsxs)("div",{className:"w-full min-h-[500px]",children:[(0,a.jsx)(r,{activeSport:s,onSportChange:n,activeStatus:o,onStatusChange:d,matchesCount:w||E}),0===C.length?(0,a.jsx)("div",{className:"py-20 text-center",children:(0,a.jsx)("div",{className:"text-slate-400 text-base font-medium",children:"Kh\xf4ng c\xf3 trận đấu n\xe0o."})}):(0,a.jsxs)("div",{className:"flex flex-col gap-6",children:[L.length>0&&"all"===o&&(0,a.jsxs)("div",{className:"mb-4",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 mb-3 px-1",children:[(0,a.jsx)("span",{className:"w-2 h-4 rounded-full bg-[#4681E8]"}),(0,a.jsx)("h2",{className:"text-slate-800 font-black text-sm uppercase tracking-wider",children:"Trận đấu t\xe2m điểm"})]}),(0,a.jsx)("div",{className:"grid grid-cols-1 xl:grid-cols-2 gap-2",children:L.map((e,t)=>(0,a.jsx)(i,{match:e},`featured-${e.ls_id||e.id}-${t}`))})]}),(0,a.jsx)("div",{className:"flex flex-col gap-5",children:$.map(([e,t])=>{let s=t[0]?.match_data?.competition_logo;return(0,a.jsxs)("div",{className:"rounded-xl overflow-hidden border border-slate-200 bg-white shadow-sm",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2.5 bg-[#0E1B33] px-4 py-2.5 border-b border-[#0E1B33]",children:[s&&(0,a.jsx)("img",{src:s,alt:"league",className:"w-4 h-4 object-contain brightness-200 opacity-80",loading:"lazy",decoding:"async"}),(0,a.jsx)("h3",{className:"text-white text-[12px] font-bold uppercase tracking-wider truncate",children:e})]}),(0,a.jsx)("div",{className:"flex flex-col",children:t.map((e,t)=>(0,a.jsx)(i,{match:e},e.ls_id||`${e.id}-${t}`))})]},e)})}),S&&(0,a.jsx)("div",{className:"flex justify-center mt-6",children:(0,a.jsx)("button",{type:"button",onClick:()=>u(e=>e+1),className:"inline-flex items-center justify-center rounded-xl border border-[#4681E8]/30 bg-white px-8 py-3 text-[12px] font-bold uppercase tracking-wider text-[#4681E8] transition-all duration-200 hover:bg-[#4681E8] hover:text-white hover:border-[#4681E8]",children:"Tải th\xeam"})})]})]})}},24323:(e,t,s)=>{"use strict";s.d(t,{KlivevipMatchDetailPage:()=>m});var a=s(68019),l=s(10707),r=s(58420);function n({src:e,poster:t,autoPlay:s=!0,onError:i,className:o=""}){let c=(0,l.useRef)(null),d=(0,l.useRef)(i);d.current=i;let[x,h]=(0,l.useState)(!1),[m,p]=(0,l.useState)(!1);return((0,l.useEffect)(()=>{let t=c.current;if(!t)return;let a=null;h(!1);let l=()=>p(!0),n=()=>p(!1);t.addEventListener("play",l),t.addEventListener("pause",n);let i=()=>{s&&(t.muted=!0,t.play().catch(()=>{}))};if(t.addEventListener("canplay",i),r.Ay.isSupported()){(a=new r.Ay({maxBufferLength:30,maxMaxBufferLength:60,lowLatencyMode:!0,enableWorker:!0})).loadSource(e),a.attachMedia(t),a.on(r.Ay.Events.MANIFEST_PARSED,()=>{s&&(t.muted=!0,t.play().catch(e=>{console.warn("AutoPlay failed:",e),t.muted=!1}))});let l=0,n=0;a.on(r.Ay.Events.ERROR,(e,t)=>{if(t.type===r.Ay.ErrorTypes.NETWORK_ERROR&&(++l>2||t.response&&t.response.code>=400)){console.error("HLS Network Error threshold reached (CORS/404), triggering fallback.",t),h(!0),d.current&&d.current(t),a?.destroy();return}if(t.fatal)switch(t.type){case r.Ay.ErrorTypes.NETWORK_ERROR:console.error("HLS Fatal Network Error, recovering...",t),a?.startLoad();break;case r.Ay.ErrorTypes.MEDIA_ERROR:console.error("HLS Media Error, recovering...",t),++n>3?(console.error("HLS Media Error threshold reached, triggering fallback."),h(!0),d.current&&d.current(t),a?.destroy()):a?.recoverMediaError();break;default:console.error("HLS Fatal Error:",t),h(!0),d.current&&d.current(t),a?.destroy()}})}else t.canPlayType("application/vnd.apple.mpegurl")&&(t.src=e,t.addEventListener("loadedmetadata",()=>{s&&t.play().catch(e=>{console.warn("AutoPlay failed:",e)})}),t.addEventListener("error",e=>{h(!0),d.current&&d.current(e)}));return()=>{t.removeEventListener("play",l),t.removeEventListener("pause",n),t.removeEventListener("canplay",i),a&&a.destroy()}},[e,s]),x)?i?null:(0,a.jsxs)("div",{className:`w-full h-full flex flex-col items-center justify-center bg-white/80 backdrop-blur ${o}`,children:[(0,a.jsx)("svg",{className:"w-12 h-12 text-red-500 mb-4 opacity-80",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"})}),(0,a.jsx)("div",{className:"text-slate-600 text-sm font-medium",children:"Video/Stream kh\xf4ng khả dụng hoặc bị lá
214»—i mạng"}),(0,a.jsx)("div",{className:"text-gray-500 text-xs mt-1",children:"Vui l\xf2ng thá»­ lại sau hoặc chọn nguồn kh\xe1c"})]}):(0,a.jsx)("div",{className:`relative group w-full h-full bg-white flex items-center justify-center overflow-hidden ${o}`,children:(0,a.jsx)("video",{ref:c,className:"w-full h-full object-contain",controls:!0,playsInline:!0,muted:s,poster:t,referrerPolicy:"no-referrer"})})}function i(e){let t=(e||"").split(/[\s-]+/).slice(0,2).map(e=>e[0]||"").join("").toUpperCase()||"??";return`data:image/svg+xml,${encodeURIComponent(`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 80 80"><rect width="80" height="80" rx="20" fill="#1a1c25"/><text x="40" y="47" font-size="20" font-family="Arial" font-weight="700" text-anchor="middle" fill="#666">${t}</text></svg>`)}`}function o({homeName:e,awayName:t,homeLogo:s,awayLogo:l,homeScore:r="0",awayScore:n="0",statusText:c="LIVE",timeText:d="",isLive:x=!0,sportId:h="1",matchId:m}){let p=s||i(e),u=l||i(t),g="5"===String(h),b="2"===String(h),f="bg-slate-200 border-slate-200",j="repeating-linear-gradient(90deg, transparent, transparent 10%, #000 10%, #000 20%)";return g?(f="bg-slate-100 border-slate-200",j="none"):b&&(f="bg-[#bc7a46] border-[#8a4e21]",j="repeating-linear-gradient(90deg, transparent, transparent 5%, #000 5%, #000 10%)"),(0,a.jsxs)("div",{className:"relative w-full aspect-video min-h-[300px] max-h-[600px] bg-slate-50 overflow-hidden flex flex-col justify-center",children:[(0,a.jsx)("div",{className:"absolute inset-0 flex items-center justify-center pointer-events-none mt-16 md:mt-24",children:(0,a.jsx)("div",{className:"relative w-[120%] h-[120%] sm:w-[90%] sm:h-[120%] max-w-[900px] flex-shrink-0 transition-transform duration-1000",style:{transform:"perspective(900px) rotateX(60deg) scale(0.9)",transformOrigin:"center center"},children:(0,a.jsxs)("div",{className:`absolute inset-0 ${f} shadow-[0_30px_60px_rgba(0,0,0,0.8)] border-4 rounded-xl overflow-hidden flex transition-colors duration-500`,children:[(0,a.jsx)("div",{className:"absolute inset-0 opacity-15 pointer-events-none",style:{backgroundImage:j}}),(0,a.jsxs)("div",{className:"absolute inset-[4%] pointer-events-none shadow-sm flex items-center justify-center",children:["1"===String(h)&&(0,a.jsxs)("div",{className:"absolute inset-0 w-full h-full border-2 border-white/60",children:[(0,a.jsx)("div",{className:"absolute left-1/2 top-0 bottom-0 w-0 border-l-2 border-white/60 -translate-x-1/2"}),(0,a.jsx)("div",{className:"absolute left-1/2 top-1/2 w-[18%] aspect-square rounded-full border-2 border-white/60 -translate-x-1/2 -translate-y-1/2"}),(0,a.jsx)("div",{className:"absolute left-1/2 top-1/2 w-2 h-2 rounded-full bg-white/80 -translate-x-1/2 -translate-y-1/2"}),(0,a.jsx)("div",{className:"absolute left-0 top-1/2 w-[16%] h-[46%] border-2 border-l-0 border-white/60 -translate-y-1/2 bg-slate-200"}),(0,a.jsx)("div",{className:"absolute left-0 top-1/2 w-[6%] h-[20%] border-2 border-l-0 border-white/60 -translate-y-1/2 bg-slate-200"}),(0,a.jsx)("div",{className:"absolute left-[16%] top-1/2 w-[8%] aspect-square border-2 border-l-0 border-white/60 rounded-r-full -translate-y-1/2 clip-path-half",style:{clipPath:"inset(0 0 0 50%)"}}),(0,a.jsx)("div",{className:"absolute right-0 top-1/2 w-[16%] h-[46%] border-2 border-r-0 border-white/60 -translate-y-1/2 bg-slate-200"}),(0,a.jsx)("div",{className:"absolute right-0 top-1/2 w-[6%] h-[20%] border-2 border-r-0 border-white/60 -translate-y-1/2 bg-slate-200"}),(0,a.jsx)("div",{className:"absolute right-[16%] top-1/2 w-[8%] aspect-square border-2 border-r-0 border-white/60 rounded-l-full -translate-y-1/2 clip-path-half",style:{clipPath:"inset(0 50% 0 0)"}})]}),g&&(0,a.jsxs)("div",{className:"absolute inset-[10%] w-[80%] h-[80%] border-2 border-white/80 bg-white",children:[(0,a.jsx)("div",{className:"absolute top-[10%] bottom-[10%] left-0 right-0 border-y-2 border-white/80"}),(0,a.jsx)("div",{className:"absolute left-1/2 top-[-2%] bottom-[-2%] w-1 bg-white/40 shadow-xl -translate-x-1/2 z-10"}),(0,a.jsx)("div",{className:"absolute left-[25%] right-[25%] top-[10%] bottom-[
21410%] border-x-2 border-white/80"}),(0,a.jsx)("div",{className:"absolute left-[25%] right-[25%] top-1/2 w-[50%] border-t-2 border-white/80 -translate-y-1/2"}),(0,a.jsx)("div",{className:"absolute left-0 top-1/2 w-[2%] border-t-2 border-white/80 -translate-y-1/2"}),(0,a.jsx)("div",{className:"absolute right-0 top-1/2 w-[2%] border-t-2 border-white/80 -translate-y-1/2"})]}),b&&(0,a.jsxs)("div",{className:"absolute inset-0 w-full h-full border-2 border-white/50",children:[(0,a.jsx)("div",{className:"absolute left-1/2 top-0 bottom-0 w-0 border-l-2 border-white/50 -translate-x-1/2"}),(0,a.jsx)("div",{className:"absolute left-1/2 top-1/2 w-[15%] aspect-square rounded-full border-2 border-white/50 -translate-x-1/2 -translate-y-1/2"}),(0,a.jsx)("div",{className:"absolute left-0 top-1/2 w-[18%] h-[35%] border-2 border-l-0 border-white/50 -translate-y-1/2 bg-[#bc7a46]"}),(0,a.jsx)("div",{className:"absolute left-[18%] top-1/2 w-[10%] aspect-square rounded-full border-2 border-white/50 -translate-y-1/2"}),(0,a.jsx)("div",{className:"absolute left-0 top-1/2 w-[30%] h-[70%] border-2 border-l-0 border-white/50 rounded-r-full -translate-y-1/2 opacity-60"}),(0,a.jsx)("div",{className:"absolute right-0 top-1/2 w-[18%] h-[35%] border-2 border-r-0 border-white/50 -translate-y-1/2 bg-[#bc7a46]"}),(0,a.jsx)("div",{className:"absolute right-0 top-1/2 w-[30%] h-[70%] border-2 border-r-0 border-white/50 rounded-l-full -translate-y-1/2 opacity-60"})]})]}),x&&(0,a.jsx)("div",{className:`absolute left-1/2 top-1/2 shadow-[0_8px_16px_rgba(0,0,0,0.8)] z-10 transition-all duration-[3000ms] border-2 border-white/20 rounded-full
215                                ${g?"w-2 h-2 sm:w-3 sm:h-3 bg-[#ccff00]":b?"w-4 h-4 sm:w-6 sm:h-6 bg-[#d95d16]":"w-4 h-4 sm:w-5 sm:h-5 bg-white"}`,style:{animation:"ballMove 8s infinite alternate ease-in-out",transform:"translate(-50%, -50%)"},children:(0,a.jsx)("div",{className:"absolute -bottom-4 left-1/2 w-4 h-2 bg-white/40 rounded-full blur-sm -translate-x-1/2"})}),x&&(0,a.jsxs)("div",{className:"absolute left-[65%] top-[60%] flex flex-col items-center animate-bounce-slow",style:{animation:"floatBubble 4s infinite alternate ease-in-out"},children:[(0,a.jsxs)("div",{className:"bg-white/95 backdrop-blur border border-white/10 rounded-2xl p-2 shadow-2xl flex items-center gap-3 w-max max-w-[200px]",children:[(0,a.jsx)("div",{className:"w-6 h-6 rounded-full flex items-center justify-center p-0.5 bg-white/5 shrink-0",children:(0,a.jsx)("img",{src:p,alt:e||"Home team",className:"max-w-full max-h-full object-contain",onError:t=>t.target.src=i(e),loading:"lazy",decoding:"async"})}),(0,a.jsx)("div",{className:"flex flex-col pr-1 overflow-hidden",children:(0,a.jsx)("span",{className:"text-slate-900 font-bold text-[10px] sm:text-xs tracking-wide truncate",children:g?"Serve / Return":"Tấn c\xf4ng nguy hiểm"})})]}),(0,a.jsx)("div",{className:"w-0 h-0 border-l-[6px] border-r-[6px] border-t-[6px] border-l-transparent border-r-transparent border-t-[#1a1c28]/95 mt-[-1px]"})]})]})})}),(0,a.jsx)("div",{className:"relative z-20 flex-1 flex flex-col items-center justify-start p-4 md:p-6 pointer-events-none w-full",children:(0,a.jsxs)("div",{className:"w-full max-w-[800px] flex items-center justify-between px-4 sm:px-6 py-3 rounded-xl bg-gradient-to-r from-[#0d0f14]/90 via-[#151821]/95 to-[#0d0f14]/90 backdrop-blur-xl border border-white/10 shadow-[0_10px_40px_rgba(0,0,0,0.8)] pointer-events-auto",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 flex-1 min-w-0 pr-2",children:[(0,a.jsx)("img",{src:p,alt:e,className:"w-8 h-8 md:w-12 md:h-12 object-contain drop-shadow-lg shrink-0",onError:t=>t.target.src=i(e),loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-slate-900 text-xs sm:text-sm md:text-base font-bold truncate tracking-wide",children:e})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1 shrink-0 px-2 sm:px-6 min-w-[100px]",children:[(0,a.jsxs)("span",{className:`inline-flex items-center gap-1.5 px-2.5 py-0.5 rounded-full text-[10px] sm:text-xs font-bold shadow-inner ${x?"bg-green-500/10 text-green-400 border border-green-500/20":"bg-white/5 text-slate-900/40"}`,children:[x&&(0,a.jsx)("span",{className:"w-1.5 h-1.5 rounded-full bg-green-500 animate-pulse shadow-[0_0_8px_#22c55e]"}),d||c]}),(0,a.jsxs)("div",{className:"flex gap-3 sm:gap-5 items-center justify-center",children:[(0,a.jsx)("span",{className:"text-slate-900 text-2xl sm:text-4xl font-black drop-shadow-md",children:r}),(0,a.jsx)("span",{className:"text-slate-900/30 text-xl font-light",children:"-"}),(0,a.jsx)("span",{className:"text-slate-900 text-2xl sm:text-4xl font-black drop-shadow-md",children:n})]})]}),(0,a.jsxs)("div",{className:"flex items-center justify-end gap-3 flex-1 min-w-0 pl-2 text-right",children:[(0,a.jsx)("span",{className:"text-slate-900 text-xs sm:text-sm md:text-base font-bold truncate tracking-wide",children:t}),(0,a.jsx)("img",{src:u,alt:t,className:"w-8 h-8 md:w-12 md:h-12 object-contain drop-shadow-lg shrink-0",onError:e=>e.target.src=i(t),loading:"lazy",decoding:"async"})]})]})}),(0,a.jsx)("div",{className:"relative z-20 mt-auto w-full p-4 flex justify-center pointer-events-none",children:(0,a.jsx)("div",{className:"w-full max-w-[600px] h-6 bg-white/40 backdrop-blur-md rounded-full border border-white/5 flex items-center px-4",children:(0,a.jsxs)("div",{className:"flex-1 h-0.5 bg-white/10 relative rounded-full",children:[x&&(0,a.jsx)("div",{className:"absolute left-0 top-0 bottom-0 bg-gradient-to-r from-[#b38b22] to-[#ffda6a] w-[65%] rounded-full opacity-90 shadow-[0_0_12px_#daa520]"}),(0,a.jsx)("span",{className:"absolute left-[65%] top-1/2 -translate-y-1/2 -translate-x-1/2 w-1.5 h-1.5 rounded-full bg-white shadow-md"})]})})}),(0,a.jsx)("style",{children:`
216                @keyframes ballMove {
217                    0% { transform: translate(-30%, -20%) scale(1); }
218                    25% { transform: translate(40%, -10%) scale(1.1); }
219                    50% { transform: translate(20%, 30%) scale(0.9); }
220                    75% { transform: translate(-10%, 15%) scale(1.2); }
221                    100% { transform: translate(-45%, 0%) scale(1); }
222                }
223                @keyframes floatBubble {
224                    0% { transform: translateY(0px) translateX(0px); }
225                    50% { transform: translateY(-8px) translateX(4px); }
226                    100% { transform: translateY(4px) translateX(-4px); }
227                }
228            `})]})}function c(e,t){if("1"===t||"2"===t)switch(e){case"2":return{t:"HT 1",live:!0,sc:!0};case"3":return{t:"Giữa giờ",live:!0,sc:!0};case"4":return{t:"HT 2",live:!0,sc:!0};case"5":return{t:"Hiệp phụ",live:!0,sc:!0};case"7":return{t:"Penalty",live:!0,sc:!0};case"8":case"9":return{t:"Kết th\xfac",live:!1,sc:!0};default:return{t:"Chưa bắt đầu",live:!1,sc:!1}}
228return["51","52","53","54","55"].includes(e)?{t:`Set ${e-50}`,live:!0,sc:!0}:["100","90","110"].includes(e)?{t:"KT",live:!1,sc:!0}:"0"===e||"1"===e?{t:"Chưa bắt đầu",live:!1,sc:!1}:{t:"LIVE",live:!0,sc:!0}}function d(e){let t=(e||"").split(/[\s-]+/).slice(0,2).map(e=>e[0]||"").join("").toUpperCase()||"??";return`data:image/svg+xml,${encodeURIComponent(`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 80 80"><rect width="80" height="80" rx="20" fill="#1a1c25"/><text x="40" y="47" font-size="20" font-family="Arial" font-weight="700" text-anchor="middle" fill="#666">${t}</text></svg>`)}`}function x(e){let t=new Date(1e3*parseInt(e||"0",10));return{hm:t.toLocaleTimeString("vi-VN",{hour:"2-digit",minute:"2-digit",timeZone:"Asia/Ho_Chi_Minh"}),dm:t.toLocaleDateString("vi-VN",{day:"2-digit",month:"2-digit",timeZone:"Asia/Ho_Chi_Minh"}),full:t.toLocaleDateString("vi-VN",{day:"2-digit",month:"2-digit",year:"numeric",timeZone:"Asia/Ho_Chi_Minh"})}}let h="max-w-[1200px]";function m({matchData:e,relatedMatches:t,matchDetails:s,standings:r,brandingNameUpper:i}){let p,u,g,j,v,y,[C,S]=(0,l.useState)("odds"),L=e?.match_data?.anchors||[],[$,F]=(0,l.useState)(!1),[T,A]=(0,l.useState)(!1),[M,H]=(0,l.useState)(null),[D,B]=(0,l.useState)(!1),z=(0,l.useRef)(0);(0,l.useEffect)(()=>{if(!e?.has_live||"1"!==e.has_live||0===L.length)return;let t=!1;B(!0);let s=async t=>{let s=t?.uid,a=`/api/socolive/proxy-stream?url=${encodeURIComponent(`https://live.inplyr.com/${s?`room/${s}`:`default/${e.id}`}.m3u8`)}`;try{let e=await fetch(a,{method:"GET",cache:"no-store"});if(!e.ok)return null;let s=(await e.text()).split("\n").filter(e=>e.trim()&&!e.startsWith("#"));if(0===s.length)return null;return(await fetch(s[0],{method:"HEAD",cache:"no-store"})).ok?t:null}catch{return null}};return Promise.all(L.map(e=>s(e))).then(e=>{if(t)return;let s=e.find(e=>null!==e);s?(H(s),F(!0),A(!1)):(H(L[0]),A(!0)),B(!1)}),()=>{t=!0}},[e?.has_live,L.length]),(0,l.useEffect)(()=>{if(!T||D||z.current>=20)return;let t=setTimeout(()=>{z.current++,A(!1),B(!0);let t=async t=>{let s=t?.uid,a=`/api/socolive/proxy-stream?url=${encodeURIComponent(`https://live.inplyr.com/${s?`room/${s}`:`default/${e.id}`}.m3u8`)}`;try{let e=await fetch(a,{method:"GET",cache:"no-store"});if(!e.ok)return null;let s=(await e.text()).split("\n").filter(e=>e.trim()&&!e.startsWith("#"));if(0===s.length)return null;return(await fetch(s[0],{method:"HEAD",cache:"no-store"})).ok?t:null}catch{return null}};Promise.all(L.map(e=>t(e))).then(e=>{let t=e.find(e=>null!==e);t?(H(t),F(!0),A(!1)):A(!0),B(!1)})},15e3);return()=>clearTimeout(t)},[T,D]);let[I,R]=(0,l.useState)(null),U=e?.post_name||e?.ls_id||e?.id;if(window.location.origin,(0,l.useEffect)(()=>{if(!U)return;let e=setInterval(async()=>{try{let e=await fetch(`/api/klivevip/match/${U}`,{cache:"no-store"});if(e.ok){let t=await e.json();R(t?.match??null)}}catch{}},1e4);return()=>clearInterval(e)},[U]),!e)return(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center py-32 gap-4",children:[(0,a.jsx)("span",{className:"text-[#64748B] text-lg",children:"Kh\xf4ng t\xecm thấy trận đấu"}),(0,a.jsx)("a",{href:"/",className:"text-[#4681E8] hover:underline text-sm",children:"← Quay lại"})]});let G=I?{...e,...I}:e,P=G?.has_live==="1"&&L.length>0,K=c(G.status_id,G.sport_id),V=$&&M&&!T&&!D,W=P&&(D||T&&K.live&&z.current<20),O=!P||T&&!W&&!D,q=!K.live&&"8"!==String(G.status_id)&&"9"!==String(G.status_id),{hm:X,full:Y}=x(G.time),Z=G.source_card_meta?.league_label||G.match_data?.competition_vi||G.match_data?.competition_full||"",Q=G.match_data?.stage_label||G.source_card_meta?.stage_label||"",J=G.home_logo||d(G.home_name),ee=G.away_logo||d(G.away_name),et=e=>t=>{t.target.src=d(e)};return(0,a.jsxs)("div",{className:"w-full bg-white min-h-screen text-slate-600 font-sans pb-16",children:[(0,a.jsx)("div",{className:"w-full border-b border-slate-200 bg-white",children:(0,a.jsxs)("div",{className:`${h} mx-auto px-4 py-3 flex items-center justify-between`,children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 text-[13px] font-bold",children:[(0,a.jsx)("span",{className:"text-[#4681E8] uppercase tracking-wide",children:Z}),Q&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"text-slate-300",children:"•"}),(0,a.jsx)("span",{className:"text-slate-600",children:Q})]})]}),(0,a.jsx)("div",{className:"text-[12px] font-mono text-slate-400 hidden sm:block",children:Y})]})}),(0,a.jsxs)("div",{className:`${h} mx-auto px-0 md:px-4 py-0 md:py-6 flex flex-col lg:flex-row gap-4 lg:gap-6`,children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0 flex flex-col gap-4 lg:gap-6",children:[(0,a.jsxs)("div",{className:"w-full relative bg-[#000000] rounded-none md:rounded-2xl overflow-hidden shadow-[0_10px_40px_rgba(0,0,0,0.5)] border-y md:border border-slate-200",children:[(0,a.jsx)("div",{className:"relative w-full aspect-video bg-[#000000] group z-10",children:V?(0,a.jsx)(n,{src:`/api/klivevip/proxy-stream?url=${encodeURIComponent(`https://live.inplyr.com/${M?.uid&&"default"!==M.uid?`room/${M.uid}`:`default/${G.id}`}.m3u8`)}`,autoPlay:!0,onError:()=>A(!0)}):O?(0,a.jsx)(o,{homeName:G.home_name,awayName:G.away_name,homeLogo:G.home_logo,awayLogo:G.away_logo,homeScore:K.sc?G.home_score:"0",awayScore:K.sc?G.away_score:"0",statusText:K.t,timeText:G.time_text||X,isLive:K.live,sportId:G.sport_id,matchId:G.ls_id||G.id,kickoffMs:1e3*Number(G?.time||0),isPreMatch:q}):(0,a.jsxs)("div",{className:"absolute inset-0 z-10 flex flex-col items-center justify-center p-4 lg:p-10",children:[(0,a.jsxs)("div",{className:"absolute inset-0 flex justify-between items-center opacity-[0.03] pointer-events-none px-4 lg:px-20 overflow-hidden",children:[(0,a.jsx)("img",{src:J,alt:"",className:"w-1/2 max-w-[400px] blur-[10px]",loading:"lazy",decoding:"async"}),(0,a.jsx)("img",{src:ee,alt:"",className:"w-1/2 max-w-[400px] blur-[10px]",loading:"lazy",decoding:"async"})]}),P&&!T&&(0,a.jsx)("button",{onClick:()=>F(!0),className:"group mb-4 sm:mb-8 w-16 h-16 md:w-20 md:h-20 rounded-full bg-[#4681E8] flex items-center justify-center hover:bg-[#55CAF1] transition-all shadow-[0_0_30px_rgba(70,129,232,0.5)] curs
228or-pointer z-20",children:(0,a.jsx)("svg",{className:"w-8 h-8 md:w-10 md:h-10 text-white ml-1.5 md:ml-2 group-hover:scale-110 transition-transform",viewBox:"0 0 24 24",fill:"currentColor",children:(0,a.jsx)("path",{d:"M8 5v14l11-7z"})})}),(0,a.jsxs)("div",{className:"grid grid-cols-[1fr_auto_1fr] items-center w-full max-w-[800px] gap-2 lg:gap-8 z-20",children:[(0,a.jsxs)("div",{className:"flex flex-col items-center gap-2 lg:gap-4",children:[(0,a.jsx)("img",{src:J,alt:G.home_name,className:"w-16 h-16 sm:w-24 sm:h-24 lg:w-32 lg:h-32 object-contain drop-shadow-[0_10px_20px_rgba(0,0,0,0.8)]",onError:et(G.home_name),loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-[#FFFFFF] text-xs sm:text-base lg:text-lg font-black text-center line-clamp-2 uppercase tracking-wide",children:G.home_name})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-2 lg:gap-3",children:[K.sc?(0,a.jsxs)("div",{className:"flex items-center gap-3 lg:gap-6 bg-white/90 backdrop-blur-md px-4 py-2 lg:px-8 lg:py-4 rounded-2xl border border-slate-200 shadow-2xl",children:[(0,a.jsx)("span",{className:"text-[#4681E8] text-[32px] sm:text-[48px] lg:text-[64px] font-black leading-none",children:G.home_score}),(0,a.jsx)("span",{className:"text-slate-300 text-[20px] lg:text-[28px] font-light",children:":"}),(0,a.jsx)("span",{className:"text-[#4681E8] text-[32px] sm:text-[48px] lg:text-[64px] font-black leading-none",children:G.away_score})]}):(0,a.jsx)("div",{className:"text-[#FFFFFF] text-[32px] sm:text-[48px] lg:text-[56px] font-black tracking-widest leading-none drop-shadow-xl",children:X}),(0,a.jsxs)("span",{className:`inline-flex items-center gap-2 rounded-full px-3 py-1 lg:px-5 lg:py-1.5 text-[10px] lg:text-[12px] font-bold tracking-widest uppercase ${K.live?"bg-[#4681E8] text-white shadow-[0_0_20px_rgba(70,129,232,0.6)]":"bg-white text-slate-600 border border-slate-200"}`,children:[K.live&&(0,a.jsx)("span",{className:"w-2 h-2 rounded-full bg-white animate-pulse"}),K.t,G.time_text?` : ${G.time_text}`:""]})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-2 lg:gap-4",children:[(0,a.jsx)("img",{src:ee,alt:G.away_name,className:"w-16 h-16 sm:w-24 sm:h-24 lg:w-32 lg:h-32 object-contain drop-shadow-[0_10px_20px_rgba(0,0,0,0.8)]",onError:et(G.away_name),loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-[#FFFFFF] text-xs sm:text-base lg:text-lg font-black text-center line-clamp-2 uppercase tracking-wide",children:G.away_name})]})]})]})}),L.length>0&&(0,a.jsxs)("div",{className:"w-full bg-white border-t border-slate-200 px-3 lg:px-6 py-2.5 lg:py-4 flex items-center gap-2 lg:gap-4 overflow-x-auto z-20",children:[(0,a.jsx)("span",{className:"text-[10px] lg:text-[11px] text-slate-600 uppercase font-bold tracking-widest shrink-0 mr-1 lg:mr-2",children:"CHỌN K\xcaNH TRUYỀN:"}),L.map((e,t)=>(0,a.jsxs)("button",{onClick:()=>{H(e),F(!0),A(!1)},className:`shrink-0 flex items-center gap-1.5 lg:gap-2 rounded-full px-3 py-1.5 lg:px-5 lg:py-2 text-[11px] lg:text-[13px] font-bold transition-all ${M?.uid===e.uid&&!T?"bg-[#4681E8]/10 border border-[#4681E8] text-[#4681E8] shadow-[0_0_15px_rgba(70,129,232,0.2)]":"bg-white border border-slate-200 text-slate-600 hover:text-[#4681E8] hover:border-[#4681E8]/50"}`,children:[(0,a.jsx)("span",{className:`w-1.5 h-1.5 lg:w-2 lg:h-2 rounded-full ${M?.uid===e.uid&&!T?"bg-[#4681E8] animate-pulse":"bg-transparent"}`}),"BLV ",e.nickName||`K\xeanh ${t+1}`]},e.uid||t))]})]}),(p=(()=>{let e=s?.stats;if(!e)return!1;let t=null;return Array.isArray(e)&&e.length>0?t=e[0]:e?.results?.[0]?t=e.results[0]:e?.stats_full_time&&(t=e),!!t&&!!(t.stats_full_time?.length>0||t.stats_haft_time?.length>0||t.stats_half_time?.length>0||t.stats?.length>0)})(),u=!!(s?.lineup&&(Array.isArray(s.lineup)?s.lineup.length>0:s.lineup.home||s.lineup.away)),g=!!(s?.events&&(Array.isArray(s.events)?s.events.length>0:s.events.incidents?.length>0||s.events.data?.length>0)),j=!!(r&&(Array.isArray(r)?r.length>0:r.data?.length>0)),(y=(v=[{id:"stats",label:"THỐNG K\xca",show:p},{id:"lineup",label:"ĐỘI H\xccNH",show:u},{id:"events",label:"DIỄN BIẾN",show:g},{id:"standings",label:"BẢNG XH",show:j},{id:"odds",label:"TỶ LỆ K\xc8O",show:!!(s?.odds&&Array.isArray(s.odds)&&s.odds.length>0)}].filter(e=>e.show)).find(e=>e.id===C)?C:v[0]?.id||"odds")!==C&&setTimeout(()=>S(y),0),v.length>0?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"bg-white rounded-2xl p-2 border border-slate-200 flex overflow-x-auto gap-2 shadow-[0_4px_15px_rgba(0,0,0,0.08)] mx-4 md:mx-0",children:v.map(({id:e,label:t})=>(0,a.jsx)("button",{onClick:()=>S(e),className:`flex-1 min-w-[100px] py-2.5 sm:py-3 text-[10px] sm:text-[12px] font-black uppercase tracking-widest rounded-xl transition-all ${y===e?"bg-[#4681E8]/10 text-[#4681E8] border border-[#4681E8]/30 shadow-inner":"text-slate-500 hover:text-[#4681E8] hover:bg-[#4681E8]/5 border border-transparent"}`,children:t},e))}),(0,a.jsxs)("div",{className:"bg-white rounded-2xl border border-slate-200 overflow-hidden shadow-[0_4px_15px_rgba(0,0,0,0.08)] min-h-[400px] mx-4 md:mx-0",children:["stats"===y&&(0,a.jsx)(b,{matchDetails:s}),"lineup"===y&&(0,a.jsx)(f,{matchDetails:s}),"events"===y&&(0,a.jsx)(_,{events:s?.events}),"standings"===y&&(0,a.jsx)(k,{standings:r}),"odds"===y&&(0,a.jsx)(E,{odds:s?.odds})]})]}):null),t.length>0&&(0,a.jsxs)("div",{className:"mt-4 mx-4 md:mx-0",children:[(0,a.jsxs)("h2",{className:"px-1 py-4 text-sm sm:text-base font-black text-slate-800 uppercase flex items-center gap-3 tracking-widest border-b border-slate-100 mb-4",children:[(0,a.jsx)("span",{className:"w-1 h-5 bg-[#4681E8] rounded-sm shadow-[0_0_8px_#4681E8]"}),"TRẬN ĐẤU C\xd9NG GIẢI"]}),(0,a.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3 sm:gap-4",children:t.slice(0,4).map(e=>(0,a.jsx)(w,{m:e},e.id))})]})]}),(0,a.jsx)("div",{className:"w-full lg:w-[350px] xl:w-[400px] shrink-0 px-4 md:px-0",children:(0,a.jsxs)("div",{className:"bg-white border border-slate-200 rounded-2xl overflow-hidden flex flex-col shadow-[0_10px_30px_rgba(0,0,0,0.1)] lg:sticky lg:top-8 h-[600px] lg:h-[c
228alc(100vh-100px)] lg:max-h-[850px]",children:[(0,a.jsxs)("div",{className:"px-5 py-4 border-b border-slate-200 flex items-center justify-between bg-white",children:[(0,a.jsxs)("h3",{className:"text-slate-800 text-sm font-black uppercase tracking-widest flex items-center gap-2",children:[(0,a.jsx)("span",{className:"w-2.5 h-2.5 rounded-full bg-[#4681E8] shadow-[0_0_10px_rgba(70,129,232,0.4)]"}),"PH\xd2NG CHAT"]}),(0,a.jsxs)("span",{className:"text-[10px] bg-white px-3 py-1.5 rounded-full text-[#4681E8] font-mono border border-[#4681E8]/30 shadow-inner tracking-widest flex items-center gap-1.5",children:[(0,a.jsx)("svg",{className:"w-3 h-3",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 10l4.553-2.276A1 1 0 0121 8.618v6.764a1 1 0 01-1.447.894L15 14M5 18h8a2 2 0 002-2V8a2 2 0 00-2-2H5a2 2 0 00-2 2v8a2 2 0 002 2z"})}),L.length," BLV"]})]}),(0,a.jsx)("div",{className:"flex-1 bg-[#FFFFFF]/40 min-h-0 chat-container-wrapper",children:(0,a.jsx)(N,{anchors:L,selectedAnchor:M})})]})})]})]})}let p={25:"KIỂM SO\xc1T B\xd3NG",24:"CHUYỀN CH\xcdNH X\xc1C",23:"TỔNG SỐ ĐƯỜNG CHUYỀN",22:"TẤN C\xd4NG",21:"T.C\xd4NG NGUY HIỂM",2:"S\xdaT TR\xdaNG Đ\xcdCH",37:"PHẠT G\xd3C",28:"N\xc9M BI\xcaN",8:"VIỆT VỊ",3:"THẺ V\xc0NG",4:"THẺ ĐỎ",5:"S\xdaT PENALTY",29:"PHẠM LỖI",26:"Đ\xc1NH ĐẦU",27:"CỨU THUA",1:"B\xc0N THẮNG",7:"PHẢN LƯỚI"},u=[25,21,22,24,2,23,4,3,37,28,8,5,29],g="https://cdn.sportdb.live/upload/team/";function b({matchDetails:e}){let[t,s]=(0,l.useState)("full"),r=e?.stats,n=e?.lineup,i=n?.match?.home_team,o=n?.match?.away_team,c=null;Array.isArray(r)&&r.length>0?c=r[0]:r?.results?.[0]?c=r.results[0]:r?.stats_full_time&&(c=r);let d={full:c?.stats_full_time||[],h1:c?.stats_haft_time||c?.stats_half_time||[],h2:c?.stats_haft_time_2nd_half||[]}[t]||[];if(!c||0===d.length)return(0,a.jsx)(j,{text:"Thống k\xea sẽ được cập nhật khi trận đấu bắt đầu"});let x=[...d].sort((e,t)=>{let s=u.indexOf(e.type),a=u.indexOf(t.type);return(-1===s?999:s)-(-1===a?999:a)});return(0,a.jsxs)("div",{className:"flex flex-col",children:[(i||o)&&(0,a.jsxs)("div",{className:"flex items-center justify-between px-4 py-3 border-b border-slate-100",children:[(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5 w-20",children:[i?.logo&&(0,a.jsx)("img",{src:g+i.logo,alt:i?.name||"Home team",className:"w-8 h-8 object-contain",onError:e=>e.target.style.display="none",loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-slate-600 text-[10px] font-medium text-center leading-tight",children:i?.name||""})]}),(0,a.jsx)("div",{className:"flex gap-1",children:[{k:"h1",l:"Hiệp 1"},{k:"h2",l:"Hiệp 2"},{k:"full",l:"Cả trận"}].map(({k:e,l})=>(0,a.jsx)("button",{onClick:()=>s(e),className:`px-2.5 py-1 text-[10px] font-bold rounded transition-all ${t===e?"bg-[#E11D48] text-white":"text-slate-400 hover:text-slate-600 bg-slate-100"}`,children:l},e))}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5 w-20",children:[o?.logo&&(0,a.jsx)("img",{src:g+o.logo,alt:o?.name||"Away team",className:"w-8 h-8 object-contain",onError:e=>e.target.style.display="none",loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-slate-600 text-[10px] font-medium text-center leading-tight",children:o?.name||""})]})]}),(0,a.jsx)("div",{className:"px-4 py-3 space-y-3",children:x.map(e=>{let t=p[e.type]||`Stat ${e.type}`,s=e.home,l=e.away,r=24===e.type||25===e.type,n=s+l,i=0===n?50:s/n*100,o=s>l,c=l>s;return(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"flex justify-between items-center mb-1.5",children:[(0,a.jsxs)("span",{className:`text-xs font-bold w-10 tabular-nums ${o?"text-slate-800":"text-slate-400"}`,children:[s,r?"%":""]}),(0,a.jsx)("span",{className:"text-slate-400 text-[10px] font-semibold tracking-wide uppercase",children:t}),(0,a.jsxs)("span",{className:`text-xs font-bold w-10 text-right tabular-nums ${c?"text-slate-800":"text-slate-400"}`,children:[l,r?"%":""]})]}),(0,a.jsxs)("div",{className:"flex gap-0.5 h-[5px]",children:[(0,a.jsx)("div",{className:"flex-1 rounded-l-full bg-white/[0.06] overflow-hidden flex justify-end",children:(0,a.jsx)("div",{className:`rounded-l-full transition-all duration-500 ${o?"bg-gradient-to-r from-[#E11D48]/60 to-[#E11D48]":"bg-gradient-to-r from-white/10 to-white/20"}`,style:{width:`${i}%`}})}),(0,a.jsx)("div",{className:"flex-1 rounded-r-full bg-white/[0.06] overflow-hidden",children:(0,a.jsx)("div",{className:`rounded-r-full transition-all duration-500 ${c?"bg-gradient-to-l from-[#E11D48]/60 to-[#E11D48]":"bg-gradient-to-l from-white/10 to-white/20"}`,style:{width:`${100-i}%`}})})]})]},e.type)})})]})}
228function f({matchDetails:e}){let[t,s]=(0,l.useState)("pitch"),r=e?.lineup,n=r?.lineup||r,i=n?.home||[],o=n?.away||[],c=r?.home_formation||"",d=r?.away_formation||"",x=r?.match?.home_team,h=r?.match?.away_team;if(0===i.length&&0===o.length)return(0,a.jsx)(j,{text:"Đội h\xecnh sẽ được c\xf4ng bố trước trận đấu 30 ph\xfat"});let m=e=>e.filter(e=>1===e.first),p=e=>e.filter(e=>1!==e.first),u=m(i),g=m(o),b=p(i),w=p(o);return(0,a.jsxs)("div",{className:"flex flex-col",children:[(0,a.jsxs)("div",{className:"flex items-center justify-center gap-1 px-3 py-2 border-b border-slate-100",children:[(0,a.jsx)("button",{onClick:()=>s("pitch"),className:`px-3 py-1.5 text-[10px] font-bold rounded transition-all ${"pitch"===t?"bg-[#E11D48] text-white":"text-slate-400 bg-slate-100"}`,children:"Đội h\xecnh xuất ph\xe1t"}),(0,a.jsx)("button",{onClick:()=>s("list"),className:`px-3 py-1.5 text-[10px] font-bold rounded transition-all ${"list"===t?"bg-[#E11D48] text-white":"text-slate-400 bg-slate-100"}`,children:"Đội h\xecnh dá»± bị"})]}),"pitch"===t?(0,a.jsx)("div",{className:"relative w-full",style:{aspectRatio:"68/105"},children:(0,a.jsxs)("div",{className:"absolute inset-0 bg-gradient-to-b from-[#1a5c2a] via-[#1e6b31] to-[#1a5c2a] rounded-2xl overflow-hidden",children:[(0,a.jsxs)("div",{className:"absolute inset-[3%] border border-white/20 rounded-lg",children:[(0,a.jsx)("div",{className:"absolute left-0 right-0 top-1/2 h-px bg-white/20"}),(0,a.jsx)("div",{className:"absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 w-[22%] aspect-square rounded-full border border-white/20"}),(0,a.jsx)("div",{className:"absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 w-1.5 h-1.5 bg-white/30 rounded-full"}),(0,a.jsx)("div",{className:"absolute top-0 left-1/2 -translate-x-1/2 w-[55%] h-[16%] border-l border-r border-white/20"}),(0,a.jsx)("div",{className:"absolute top-0 left-1/2 -translate-x-1/2 w-[25%] h-[6%] border-l border-r border-white/20"}),(0,a.jsx)("div",{className:"absolute bottom-0 left-1/2 -translate-x-1/2 w-[55%] h-[16%] border-t border-l border-r border-white/20"}),(0,a.jsx)("div",{className:"absolute bottom-0 left-1/2 -translate-x-1/2 w-[25%] h-[6%] border-t border-l border-r border-white/20"})]}),(0,a.jsx)("div",{className:"absolute top-1 left-2 text-[9px] text-[#F8FAFC]/50 font-bold z-10",children:x?.name||""}),(0,a.jsx)("div",{className:"absolute top-1 right-2 text-[9px] text-[#E11D48]/70 font-bold z-10",children:c}),(0,a.jsx)("div",{className:"absolute bottom-1 left-2 text-[9px] text-[#F8FAFC]/50 font-bold z-10",children:h?.name||""}),(0,a.jsx)("div",{className:"absolute bottom-1 right-2 text-[9px] text-[#E11D48]/70 font-bold z-10",children:d}),u.map((e,t)=>{let s=`${e.x||50}%`,l=`${(e.y||10)/2}%`,r="G"===e.position;return(0,a.jsxs)("div",{className:"absolute flex flex-col items-center z-10 -translate-x-1/2 -translate-y-1/2",style:{left:s,top:l},children:[(0,a.jsx)("div",{className:`w-6 h-6 rounded-full flex items-center justify-center text-[9px] font-black ${r?"bg-yellow-400 text-black":"bg-blue-600 text-[#F8FAFC]"} shadow-md border border-white/20`,children:e.shirt_number||""}),(0,a.jsx)("span",{className:"text-[7px] text-[#F8FAFC] font-semibold mt-0.5 text-center max-w-[48px] truncate drop-shadow-[0_1px_2px_rgba(0,0,0,0.8)]",children:(e.name||"").split(" ").slice(-2).join(" ")}),1===e.captain&&(0,a.jsx)("span",{className:"absolute -top-1 -right-1 text-[6px] text-yellow-400",children:"C"})]},`h-${t}`)}),g.map((e,t)=>{let s=`${100-(e.x||50)}%`,l=`${100-(e.y||10)/2}%`,r="G"===e.position;return(0,a.jsxs)("div",{className:"absolute flex flex-col items-center z-10 -translate-x-1/2 -translate-y-1/2",style:{left:s,top:l},children:[(0,a.jsx)("div",{className:`w-6 h-6 rounded-full flex items-center justify-center text-[9px] font-black ${r?"bg-yellow-400 text-black":"bg-orange-500 text-[#F8FAFC]"} shadow-md border border-white/20`,children:e.shirt_number||""}),(0,a.jsx)("span",{className:"text-[7px] text-[#F8FAFC] font-semibold mt-0.5 text-center max-w-[48px] truncate drop-shadow-[0_1px_2px_rgba(0,0,0,0.8)]",children:(e.name||"").split(" ").slice(-2).join(" ")}),1===e.captain&&(0,a.jsx)("span",{className:"absolute -top-1 -right-1 text-[6px] text-yellow-400",children:"C"})]},`a-${t}`)})]})}):(0,a.jsxs)("div",{className:"px-3 py-2 text-xs",children:[(0,a.jsxs)("div",{className:"flex justify-between font-bold text-slate-400 mb-1 uppercase tracking-wider text-[9px] px-1",children:[(0,a.jsx)("span",{children:"Đội chá»
228§ nh\xe0"}),(0,a.jsx)("span",{children:"Đội kh\xe1ch"})]}),Array.from({length:Math.max(b.length,w.length)}).map((e,t)=>{let s=b[t],l=w[t];return(0,a.jsxs)("div",{className:"flex justify-between items-center border-b border-slate-50 py-1.5",children:[(0,a.jsx)("div",{className:"flex items-center gap-1.5 w-1/2 min-w-0",children:s&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"text-[#E11D48] font-bold w-5 text-center shrink-0 text-[10px]",children:s.shirt_number||""}),(0,a.jsx)("span",{className:"text-slate-700 truncate text-[11px]",children:s.name||""})]})}),(0,a.jsx)("div",{className:"flex items-center gap-1.5 w-1/2 justify-end min-w-0",children:l&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"text-slate-700 truncate text-[11px] text-right",children:l.name||""}),(0,a.jsx)("span",{className:"text-[#E11D48] font-bold w-5 text-center shrink-0 text-[10px]",children:l.shirt_number||""})]})})]},t)})]})]})}function j({text:e}){return(0,a.jsx)("div",{className:"flex items-center justify-center py-10 text-slate-400 text-sm text-center",children:e})}function w({m:e}){let t=c(e.status_id,e.sport_id),{hm:s,dm:l}=x(e.time),r=e.source_card_meta?.league_label||e.match_data?.competition_vi||"";return(0,a.jsxs)("a",{href:`/match/${encodeURIComponent(e.post_name||e.id)}`,className:"flex items-center gap-3 rounded-2xl bg-white hover:bg-slate-50 border border-slate-100 hover:border-[#4681E8]/30 p-3 transition-all group",children:[(0,a.jsxs)("div",{className:"shrink-0 w-14 text-center",children:[(0,a.jsx)("div",{className:"text-[#E11D48] text-[11px] font-bold",children:s}),(0,a.jsx)("div",{className:"text-slate-400 text-[9px]",children:l})]}),(0,a.jsx)("div",{className:"w-px h-9 bg-slate-200 shrink-0"}),(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("div",{className:"text-slate-400 text-[9px] truncate mb-1",children:r}),(0,a.jsxs)("div",{className:"flex items-center gap-2 mb-0.5",children:[(0,a.jsx)("img",{src:e.home_logo||d(e.home_name),alt:e.home_name,className:"w-4 h-4 object-contain shrink-0",onError:t=>t.target.src=d(e.home_name),loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-slate-600 text-[12px] font-medium truncate",children:e.home_name})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("img",{src:e.away_logo||d(e.away_name),alt:e.away_name,className:"w-4 h-4 object-contain shrink-0",onError:t=>t.target.src=d(e.away_name),loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-slate-600 text-[12px] font-medium truncate",children:e.away_name})]})]}),t.sc?(0,a.jsxs)("span",{className:"text-slate-800 font-bold text-[14px] tabular-nums shrink-0",children:[e.home_score,"-",e.away_score]}):(0,a.jsx)("span",{className:"text-[10px] font-bold text-[#E11D48] bg-[#E11D48]/10 rounded px-2.5 py-1 group-hover:bg-[#E11D48]/15 transition shrink-0",children:"XEM NGAY"})]})}let v={0:{bg:"bg-white/10",text:"text-[#F8FAFC]/40",nameCls:"text-[#94A3B8]"},1:{bg:"bg-white/10",text:"text-[#F8FAFC]/50",nameCls:"text-[#94A3B8]"},2:{bg:"bg-green-900/50",text:"text-green-400",nameCls:"text-green-400"},3:{bg:"bg-yellow-900/40",text:"text-yellow-400",nameCls:"text-emerald-600 font-bold"},4:{bg:"bg-blue-900/40",text:"text-blue-400",nameCls:"text-blue-400 font-bold"},5:{bg:"bg-red-900/40",text:"text-red-400",nameCls:"text-red-400 font-bold"}};function N({anchors:e,selectedAnchor:t}){let[s,r]=(0,l.useState)([]),[n,i]=(0,l.useState)(!1),o=(0,l.useRef)(null),c=(0,l.useRef)(null),d=t?.roomNum;return(0,l.useEffect)(()=>{if(!d)return;r([]),i(!1);let e=new EventSource(`/api/chat/${d}`);return e.onopen=()=>i(!0),e.onmessage=e=>{try{let t=JSON.parse(e.data);if("connected"===t.type)return void i(!0);if("history"===t.type&&Array.isArray(t.messages))return void r(e=>[...t.messages,...e].slice(-200));t.user&&t.text&&r(e=>[...e,t].slice(-200))}catch{}},e.onerror=()=>i(!1),()=>{e.close(),i(!1)}},[d]),(0,l.useEffect)(()=>{requestAnimationFrame(()=>{let e=c.current;e&&(e.scrollTop=e.scrollHeight)})},[s.length]),(0,a.jsxs)("div",{className:"flex flex-col h-full bg-[#0F0F23]",children:[(0,a.jsxs)("div",{ref:c,className:"flex-1 min-h-0 px-3 py-2 flex flex-col gap-[3px] overflow-y-auto",style:{scrollbarWidth:"thin",scrollbarColor:"#444 transparent"},children:[(0,a.jsx)("div",{className:"text-center text-[10px] text-[#F8FAFC]/30 bg-slate-50/60 py-1.5 rounded-xl mb-1 sticky top-0 z-10 backdrop-blur-sm",children:n?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"inline-block h-1.5 w-1.5 rounded-full bg-green-400 animate-pulse mr-1"}),"Đang kết nối ph\xf2ng chat trá»±c tiếp"]}):d?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"inline-block h-1.5 w-1.5 rounded-full bg-yellow-400 animate-pulse mr-1"}),"Đang kết nối..."]}
228):"Ch\xe0o mừng bạn đến với ph\xf2ng chat"}),0===s.length&&n&&(0,a.jsx)("div",{className:"text-center text-[10px] text-[#F8FAFC]/20 py-4",children:"Chờ tin nhắn mới..."}),s.map((e,t)=>{var s;let l=(s=e.level)>=5?v[5]:v[s]||v[0];return 2===e.type||e.text?.includes("v\xe0o ph\xf2ng tr\xf2 chuyện")?(0,a.jsxs)("div",{className:"flex items-start gap-1.5 text-[11px] leading-relaxed py-[1px] opacity-60",children:[(0,a.jsx)("span",{className:"text-green-500/70 font-medium",children:"Hi"}),(0,a.jsxs)("span",{className:`shrink-0 inline-flex items-center px-1 py-[0.5px] rounded text-[8px] font-bold ${l.bg} ${l.text}`,children:["Lv",e.level]}),(0,a.jsxs)("span",{className:`font-bold ${l.nameCls}`,children:[e.user,":"]}),(0,a.jsx)("span",{className:"text-[#F8FAFC]/40",children:e.text})]},`${e.ts}-${t}`):(0,a.jsxs)("div",{className:"flex items-start gap-1.5 text-[11px] leading-relaxed py-[1px]",children:[(0,a.jsxs)("span",{className:`shrink-0 inline-flex items-center px-1 py-[0.5px] rounded text-[8px] font-bold ${l.bg} ${l.text}`,children:["Lv.",e.level]}),(0,a.jsxs)("span",{className:`font-bold shrink-0 ${l.nameCls}`,children:[e.user,":"]}),(0,a.jsx)("span",{className:"text-[#F8FAFC]/80 break-words min-w-0",children:e.text})]},`${e.ts}-${t}`)}),(0,a.jsx)("div",{ref:o})]}),(0,a.jsxs)("div",{className:"shrink-0 px-3 py-2 bg-[#0F0F23] border-t border-white/[0.04] space-y-2",children:[(0,a.jsx)("div",{className:"flex items-center justify-center gap-3 text-[#F8FAFC]/20 text-[10px]",children:(0,a.jsx)("span",{className:"flex items-center gap-1",children:(0,a.jsx)("svg",{className:"w-3 h-3",viewBox:"0 0 24 24",fill:"currentColor",children:(0,a.jsx)("path",{d:"M12 4.5C7 4.5 2.7 7.6 1 12c1.7 4.4 6 7.5 11 7.5s9.3-3.1 11-7.5c-1.7-4.4-6-7.5-11-7.5zm0 12.5c-2.8 0-5-2.2-5-5s2.2-5 5-5 5 2.2 5 5-2.2 5-5 5zm0-8c-1.7 0-3 1.3-3 3s1.3 3 3 3 3-1.3 3-3-1.3-3-3-3z"})})})}),(0,a.jsxs)("div",{className:"flex bg-[#0F0F23] rounded-2xl overflow-hidden border border-white/[0.08]",children:[(0,a.jsx)("input",{type:"text",placeholder:"Đăng nhập để c\xf9ng chat nh\xe9",disabled:!0,className:"flex-1 bg-transparent px-3 py-2 text-[11px] text-[#F8FAFC] outline-none placeholder:text-[#F8FAFC]/30 disabled:opacity-50"}),(0,a.jsx)("button",{disabled:!0,className:"px-4 text-[11px] font-bold bg-[#E11D48] text-black disabled:bg-white/10 disabled:text-[#F8FAFC]/20 transition-colors",children:"Gửi"})]})]})]})}let y={1:{icon:"⚽",label:"B\xe0n thắng",color:"text-green-400"},2:{icon:"\uD83C\uDD7F️",label:"Phạt đền",color:"text-green-400"},3:{icon:"\uD83D\uDFE1",label:"Thẻ v\xe0ng",color:"text-yellow-400"},4:{icon:"\uD83D\uDFE1\uD83D\uDFE1",label:"Thẻ v\xe0ng 2",color:"text-emerald-600"},5:{icon:"\uD83D\uDD34",label:"Thẻ đỏ",color:"text-red-500"},7:{icon:"\uD83D\uDD04",label:"Phản lưới",color:"text-orange-400"},8:{icon:"\uD83C\uDFE5",label:"Chấn thương",color:"text-[#94A3B8]"},9:{icon:"\uD83D\uDD04",label:"Thay người",color:"text-blue-400"},11:{icon:"⏱️",label:"Hiệp 2",color:"text-[#F8FAFC]/40"},15:{icon:"\uD83E\uDD45",label:"Pen trượt",color:"text-red-400"},19:{icon:"⏱️",label:"Kết th\xfac hiệp",color:"text-[#F8FAFC]/30"},21:{icon:"\uD83C\uDFC6",label:"VAR",color:"text-purple-400"}};function _({events:e}){let t=e?.incidents||e?.events||[];return t&&0!==t.length?(0,a.jsx)("div",{className:"flex flex-col",children:t.map((e,t)=>{let s=y[e.type]||{icon:"•",label:`Event ${e.type}`,color:"text-[#F8FAFC]/50"},l=1===e.position,r=2===e.position,n=e.add_time?`+${e.add_time}`:"",i=`${e.time}'${n}`;return l||r||11!==e.type&&19!==e.type?9===e.type?(0,a.jsxs)("div",{className:`flex items-center gap-2 border-b border-slate-50 p-3 text-xs ${l?"":"flex-row-reverse"}`,children:[(0,a.jsx)("span",{className:"text-slate-400 w-10 text-center shrink-0 text-[10px]",children:i}),(0,a.jsxs)("div",{className:`flex-1 flex flex-col gap-0.5 ${l?"items-start":"items-end"}`,children:[(0,a.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,a.jsx)("span",{className:"text-green-400 text-[10px]",children:"▲"}),(0,a.jsx)("span",{className:"text-[#F8FAFC]/80 text-[11px]",children:e.in_player_name||""})]}),(0,a.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,a.jsx)("span",{className:"text-red-400 text-[10px]",children:"▼"}),(0,a.jsx)("span",{className:"text-[#F8FAFC]/40 text-[11px]",children:e.out_player_name||""})]})]})]},t):(0,a.jsxs)("div",{className:`flex items-center gap-2 border-b border-slate-50 p-3 text-xs ${l?"":"flex-row-reverse"}`,children:[(0,a.jsx)("span",{className:"text-slate-400 w-10 text-center shrink-0 text-[10px]",children:i}),(0,a.jsx)("span",{className:`shrink-0 text-sm ${s.color}`,children:s.icon}),(0,a.jsxs)("div",{className:`flex-1 min-w-0 ${l?"text-left":"text-right"}`,children:[(0,a.jsx)("span",{className:"text-slate-700 text-[11px]",children:e.player_name||""}),e.assist1_name&&(0,a.jsxs)("span",{className:"text-slate-400 text-[10px] ml-1",children:["(kiến tạo: ",e.assist1_name,")"]}),1===e.type&&void 0!==e.home_score&&(0,a.jsxs)("span",{className:"text-[#E11D48] font-bold text-[11px] ml-2",children:[e.home_score," - ",e.away_score]})]})]},t):(0,a.jsx)("div",{className:"flex items-center justify-center py-2 border-b border-slate-50 bg-slate-50",children:(0,a.jsxs)("span",{className:"text-slate-400 text-[10px] uppercase tracking-wider",children:[s.icon," ",s.label," — ",i]})},t)})}):(0,a.jsx)(j,{text:"Diễn biến trận đấu sẽ được cập nhật trực tiếp tại đ\xe2y"})}function k({standings:e}
228){return e&&e.teams&&0!==e.teams.length?(0,a.jsxs)("div",{className:"w-full text-[10px]",children:[(0,a.jsxs)("div",{className:"grid grid-cols-[20px_1fr_24px_24px_32px] bg-slate-50 p-2 text-slate-400 uppercase font-bold sticky top-0",children:[(0,a.jsx)("span",{className:"text-center",children:"#"}),(0,a.jsx)("span",{children:"Team"}),(0,a.jsx)("span",{className:"text-center",children:"T"}),(0,a.jsx)("span",{className:"text-center",children:"B"}),(0,a.jsx)("span",{className:"text-center whitespace-nowrap",children:"Đ"})]}),e.teams.slice(0,15).map((e,t)=>{let s=!!e.data,l=s?parseFloat(e.data[0]):e.rank||t+1,r=s?e.data[1]:e.target_name,n=s?e.data[7]:e.points,i=s?e.data[3]:e.won,o=s?e.data[5]:e.loss;return(0,a.jsxs)("div",{className:"grid grid-cols-[20px_1fr_24px_24px_32px] items-center p-2 border-b border-slate-50 hover:bg-slate-50 transition-colors",children:[(0,a.jsx)("span",{className:"text-center text-slate-500",children:l}),(0,a.jsxs)("div",{className:"flex items-center gap-1.5 min-w-0 pr-2",children:[e.team_logo&&(0,a.jsx)("img",{src:e.team_logo,className:"w-3.5 h-3.5 object-contain",alt:r||"Team logo",loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-slate-700 font-medium truncate",children:r})]}),(0,a.jsx)("span",{className:"text-center text-slate-500",children:i}),(0,a.jsx)("span",{className:"text-center text-slate-500",children:o}),(0,a.jsx)("span",{className:"text-center text-[#E11D48] font-bold",children:n})]},r)})]}):(0,a.jsx)(j,{text:"Bảng xếp hạng sẽ được cập nhật"})}function E({odds:e}){let t=Array.isArray(e)?e:[],s=["2","4","3","16"];function l(e){for(let a of s){let s=t.find(t=>t.odds_type===e&&String(t.company_id)===a);if(s?.odds_info?.length)return s}return t.find(t=>t.odds_type===e&&t.odds_info?.length>0)}function r(e,t){let s=e?.odds_info;if(!s?.length)return["-","-","-"];let a="opening"===t?s.length-1:0;if(!s?.length||!s[a])return["-","-","-"];let l=s[a][2];if("string"!=typeof l)return["-","-","-"];let r=l.split(",");return[r[0]||"-",r[1]||"-",r[2]||"-"]}let n=l("asia"),i=l("eu"),o=l("bs"),c=l("cr"),d=r(n,"opening"),x=r(n,"latest"),h=r(i,"opening"),m=r(i,"latest"),p=r(o,"opening"),u=r(o,"latest"),g=r(c,"opening"),b=r(c,"latest"),f=({children:e})=>(0,a.jsx)("th",{className:"px-2 py-2 text-[9px] sm:text-[10px] font-bold uppercase tracking-wider text-slate-500 border-b border-slate-100 text-center",children:e}),j=({children:e,color:t})=>(0,a.jsx)("td",{className:`px-2 py-2.5 text-center text-[11px] sm:text-xs font-bold ${t||"text-slate-600"} border-b border-slate-50`,children:e});return(0,a.jsxs)("div",{className:"overflow-x-auto",children:[(0,a.jsxs)("table",{className:"w-full min-w-[600px]",children:[(0,a.jsxs)("thead",{children:[(0,a.jsxs)("tr",{className:"bg-slate-50",children:[(0,a.jsx)("th",{className:"px-4 py-2 text-left border-b border-slate-100",rowSpan:2,children:(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("div",{className:"w-7 h-7 rounded bg-gradient-to-br from-[#1d4ed8] to-[#3b82f6] flex items-center justify-center text-white text-[9px] font-black shadow-sm",children:"B"}),(0,a.jsx)("span",{className:"text-slate-600 text-[11px] font-bold tracking-wider",children:"SPORT"})]})}),(0,a.jsx)("th",{colSpan:3,className:"px-1 py-1.5 text-center text-[9px] sm:text-[10px] font-bold uppercase tracking-wider text-[#4681E8] border-b border-l border-slate-100",children:"CƯỢC CH\xc2U \xc1"}),(0,a.jsx)("th",{colSpan:3,className:"px-1 py-1.5 text-center text-[9px] sm:text-[10px] font-bold uppercase tracking-wider text-[#4681E8] border-b border-l border-slate-100",children:"CƯỢC CH\xc2U \xc2U"}),(0,a.jsx)("th",{colSpan:3,className:"px-1 py-1.5 text-center text-[9px] sm:text-[10px] font-bold uppercase tracking-wider text-[#4681E8] border-b border-l border-slate-100",children:"T\xc0I XỈU"}),(0,a.jsx)("th",{colSpan:3,className:"px-1 py-1.5 text-center text-[9px] sm:text-[10px] font-bold uppercase tracking-wider text-[#4681E8] border-b border-l border-slate-100",children:"K\xc8O G\xd3C"})]}),(0,a.jsxs)("tr",{className:"bg-slate-50",children:[(0,a.jsx)(f,{children:"CHỦ"}),(0,a.jsx)(f,{children:"CHẤP"}),(0,a.jsx)(f,{children:"KH\xc1CH"}),(0,a.jsx)(f,{children:"CHỦ"}),(0,a.jsx)(f,{children:"H\xd2A"}),(0,a.jsx)(f,{children:"KH\xc1CH"}),(0,a.jsx)(f,{children:"T\xc0I"}),(0,a.jsx)(f,{children:"TỶ LỆ"}),(0,a.jsx)(f,{children:"XỈU"}),(0,a.jsx)(f,{children:"T\xc0I"}),(0,a.jsx)(f,{children:"TỶ LỆ"}),(0,a.jsx)(f,{children:"XỈU"})]})]}),(0,a.jsxs)("tbody",{children:[(0,a.jsxs)("tr",{className:"hover:bg-slate-50 transition-colors",children:[(0,a.jsx)("td",{className:"px-4 py-2.5 text-[11px] sm:text-xs text-slate-500 font-medium border-b border-slate-50",children:"Tỷ Lệ Mở Cược"}),(0,a.jsx)(j,{children:d[0]}),(0,a.jsx)(j,{color:"text-red-400",children:d[1]}),(0,a.jsx)(j,{children:d[2]}),(0,a.jsx)(j,{children:h[0]}),(0,a.jsx)(j,{children:h[1]}),(0,a.jsx)(j,{children:h[2]}),(0,a.jsx)(j,{children:p[0]}),(0,a.jsx)(j,{children:p[1]}),(0,a.jsx)(j,{children:p[2]}),(0,a.jsx)(j,{children:g[0]}),(0,a.jsx)(j,{children:g[1]}),(0,a.jsx)(j,{children:g[2]})]}),(0,a.jsxs)("tr",{className:"hover:bg-slate-50 transition-colors",children:[(0,a.jsx)("td",{className:"px-4 py-2.5 text-[11px] sm:text-xs text-slate-500 font-medium border-b border-slate-50",children:"Tỷ Lệ Trước Trận"}),(0,a.jsx)(j,{children:x[0]}),(0,a.jsx)(j,{color:"text-red-400",children:x[1]}),(0,a.jsx)(j,{children:x[2]}),(0,a.jsx)(j,{children:m[0]}),(0,a.jsx)(j,{children:m[1]}),(0,a.jsx)(j,{children:m[2]}),(0,a.jsx)(j,{children:u[0]}),(0,a.jsx)(j,{children:u[1]}),(0,a.jsx)(j,{children:u[2]}),(0,a.jsx)(j,{children:b[0]}),(0,a.jsx)(j,{children:b[1]}),(0,a.jsx)(j,{children:b[2]})]}),(0,a.jsxs)("tr",{className:"hover:bg-slate-50 transition-colors bg-white",children:[(0,a.jsxs)("td",{className:"px-4 py-2.5 text-[11px] sm:text-xs text-slate-700 font-bold flex items-center gap-1.5 border-b border-slate-50",children:["Live ",(0,a.jsx)("span",{className:"w-1.5 h-1.5 rounded-full bg-red-500 animate-pulse"})]}),(0,a.jsx)(j,{color:"text-green-400",children:x[0]}),(0,a.jsx)(j,{color:"text-red-400",children:x[1]}),(0,a.jsx)(j,{color:"text-green-400",children:x[2]}),(0,a.jsx)(j,{color:"text-green-400",children:m[0]}),(0,a.jsx)(j,{color:"text-green-400",children:m[1]}),(0,a.jsx)(j,{color:"text-green-400",children:m[2]}),(0,a.jsx)(j,{color:"text-green-400",children:u[0]}),(0,a.jsx)(j,{children:u[1]}),(0,a.jsx)(j,{color:"text-green-400",children:u[2]}),(0,a.jsx)(j,{color:"text-green-400",children:b[0]}),(0,a.jsx)(j,{children:b[1]}),(0,a.jsx)(j,{color:"text-green-400",children:b[2]})]})]})]}),(0,a.jsx)("p",{className:"text-center text-slate-400 text-[10px] py-2.5 border-t border-slate-100",children:"Tỷ lệ k\xe8o sẽ được cập nhật gần giờ thi đấu"})]})}},24772:(e,t,s)=>{"use strict";s.d(t,{Klivevip01MatchDetailPage:()=>m});var a=s(68019),l=s(10707),r=s(58420);function n({src:e,poster:t,autoPlay:s=!0,onError:i,className:o=""}){let c=(0,l.useRef)(null),d=(0,l.useRef)(i);d.current=i;let[x,h]=(0,l.useState)(!1),[m,p]=(0,l.useState)(!1);return((0,l.useEffect)(()=>{let t=c.current;if(!t)return;let a=null;h(!1);let l=()=>p(!0),n=()=>p(!1);t.addEventListener("play",l),t.addEventListener("pause",n);let i=()=>{s&&(t.muted=!0,t.play().catch(()=>{}))};if(t.addEventListener("canplay",i),r.Ay.isSupported()){(a=new r.Ay({maxBufferLength:30,maxMaxBufferLength:60,lowLatencyMode:!0,enableWorker:!0})).loadSource(e),a.attachMedia(t),a.on(r.Ay.Events.MANIFEST_PARSED,()=>{s&&(t.muted=!0,t.play().catch(e=>{console.warn("AutoPlay failed:",e),t.muted=!1}))});let l=0,n=0;a.on(r.Ay.Events.ERROR,(e,t)=>
228{if(t.type===r.Ay.ErrorTypes.NETWORK_ERROR&&(++l>2||t.response&&t.response.code>=400)){console.error("HLS Network Error threshold reached (CORS/404), triggering fallback.",t),h(!0),d.current&&d.current(t),a?.destroy();return}if(t.fatal)switch(t.type){case r.Ay.ErrorTypes.NETWORK_ERROR:console.error("HLS Fatal Network Error, recovering...",t),a?.startLoad();break;case r.Ay.ErrorTypes.MEDIA_ERROR:console.error("HLS Media Error, recovering...",t),++n>3?(console.error("HLS Media Error threshold reached, triggering fallback."),h(!0),d.current&&d.current(t),a?.destroy()):a?.recoverMediaError();break;default:console.error("HLS Fatal Error:",t),h(!0),d.current&&d.current(t),a?.destroy()}})}else t.canPlayType("application/vnd.apple.mpegurl")&&(t.src=e,t.addEventListener("loadedmetadata",()=>{s&&t.play().catch(e=>{console.warn("AutoPlay failed:",e)})}),t.addEventListener("error",e=>{h(!0),d.current&&d.current(e)}));return()=>{t.removeEventListener("play",l),t.removeEventListener("pause",n),t.removeEventListener("canplay",i),a&&a.destroy()}},[e,s]),x)?i?null:(0,a.jsxs)("div",{className:`w-full h-full flex flex-col items-center justify-center bg-white/80 backdrop-blur ${o}`,children:[(0,a.jsx)("svg",{className:"w-12 h-12 text-red-500 mb-4 opacity-80",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"})}),(0,a.jsx)("div",{className:"text-slate-600 text-sm font-medium",children:"Video/Stream kh\xf4ng khả dụng hoặc bị lỗi mạng"}),(0,a.jsx)("div",{className:"text-gray-500 text-xs mt-1",children:"Vui l\xf2ng thử lại sau hoặc chọn nguồn kh\xe1c"})]}):(0,a.jsx)("div",{className:`relative group w-full h-full bg-white flex items-center justify-center overflow-hidden ${o}`,children:(0,a.jsx)("video",{ref:c,className:"w-full h-full object-contain",controls:!0,playsInline:!0,muted:s,poster:t,referrerPolicy:"no-referrer"})})}function i(e){let t=(e||"").split(/[\s-]+/).slice(0,2).map(e=>e[0]||"").join("").toUpperCase()||"??";return`data:image/svg+xml,${encodeURIComponent(`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 80 80"><rect width="80" height="80" rx="20" fill="#1a1c25"/><text x="40" y="47" font-size="20" font-family="Arial" font-weight="700" text-anchor="middle" fill="#666">${t}</text></svg>`)}`}function o({homeName:e,awayName:t,homeLogo:s,awayLogo:l,homeScore:r="0",awayScore:n="0",statusText:c="LIVE",timeText:d="",isLive:x=!0,sportId:h="1",matchId:m}){let p=s||i(e),u=l||i(t),g="5"===String(h),b="2"===String(h),f="bg-slate-200 border-slate-200",j="repeating-linear-gradient(90deg, transparent, transparent 10%, #000 10%, #000 20%)";return g?(f="bg-slate-100 border-slate-200",j="none"):b&&(f="bg-[#bc7a46] border-[#8a4e21]",j="repeating-linear-gradient(90deg, transparent, transparent 5%, #000 5%, #000 10%)"),(0,a.jsxs)("div",{className:"relative w-full aspect-video min-h-[300px] max-h-[600px] bg-slate-50 overflow-hidden flex flex-col justify-center",children:[(0,a.jsx)("div",{className:"absolute inset-0 flex items-center justify-center pointer-events-none mt-16 md:mt-24",children:(0,a.jsx)("div",{className:"relative w-[120%] h-[120%] sm:w-[90%] sm:h-[120%] max-w-[900px] flex-shrink-0 transition-transform duration-1000",style:{transform:"perspective(900px) rotateX(60deg) scale(0.9)",transformOrigin:"center center"},children:(0,a.jsxs)("div",{className:`absolute inset-0 ${f} shadow-[0_30px_60px_rgba(0,0,0,0.8)] border-4 rounded-xl overflow-hidden flex transition-colors duration-500`,children:[(0,a.jsx)("div",{className:"absolute inset-0 opacity-15 pointer-events-none",style:{backgroundImage:j}}),(0,a.jsxs)("div",{className:"absolute inset-[4%] pointer-events-none shadow-sm flex items-center justify-center",children:["1"===String(h)&&(0,a.jsxs)("div",{className:"absolute inset-0 w-full h-full border-2 border-white/60",children:[(0,a.jsx)("div",{className:"absolute left-1/2 top-0 bottom-0 w-0 border-l-2 border-white/60 -translate-x-1/2"}),(0,a.jsx)("div",{className:"absolute left-1/2 top-1/2 w-[18%] aspect-square rounded-full border-2 border-white/60 -translate-x-1/2 -translate-y-1/2"}),(0,a.jsx)("div",{className:"absolute left-1/2 top-1/2 w-2 h-2 rounded-full bg-white/80 -translate-x-1/2 -translate-y-1/2"}),(0,a.jsx)("div",{className:"absolute left-0 top-1/2 w-[16%] h-[46%] border-2 border-l-0 border-white/60 -translate-y-1/2 bg-slate-200"}),(0,a.jsx)("div",{className:"absolute left-0 top-1/2 w-[6%] h-[20%] border-2 border-l-0 border-white/60 -translate-y-1/2 bg-slate-200"}),(0,a.jsx)("div",{className:"absolute left-[16%] top-1/2 w-[8%] aspect-square border-2 border-l-0 border-white/60 rounded-r-full -translate-y-1/2 clip-path-half",style:{clipPath:"inset(0 0 0 50%)"}}),(0,a.jsx)("div",{className:"absolute right-0 top-1/2 w-[16%] h-[46%] border-2 border-r-0 border-white/60 -translate-y-1/2 bg-slate-200"}),(0,a.jsx)("div",{className:"absolute right-0 top-1/2 w-[6%] h-[20%] border-2 border-r-0 border-white/60 -translate-y-1/2 bg-slate-200"}),(0,a.jsx)("div",{className:"absolute right-[16%] top-1/2 w-[8%] aspect-square border-2 border-r-0 border-white/60 rounded-l-full -translate-y-1/2 clip-path-half",style:{clipPath:"inset(0 50% 0 0)"}})]}),g&&(0,a.jsxs)("div",{className:"absolute inset-[10%] w-[80%] h-[80%
228] border-2 border-white/80 bg-white",children:[(0,a.jsx)("div",{className:"absolute top-[10%] bottom-[10%] left-0 right-0 border-y-2 border-white/80"}),(0,a.jsx)("div",{className:"absolute left-1/2 top-[-2%] bottom-[-2%] w-1 bg-white/40 shadow-xl -translate-x-1/2 z-10"}),(0,a.jsx)("div",{className:"absolute left-[25%] right-[25%] top-[10%] bottom-[10%] border-x-2 border-white/80"}),(0,a.jsx)("div",{className:"absolute left-[25%] right-[25%] top-1/2 w-[50%] border-t-2 border-white/80 -translate-y-1/2"}),(0,a.jsx)("div",{className:"absolute left-0 top-1/2 w-[2%] border-t-2 border-white/80 -translate-y-1/2"}),(0,a.jsx)("div",{className:"absolute right-0 top-1/2 w-[2%] border-t-2 border-white/80 -translate-y-1/2"})]}),b&&(0,a.jsxs)("div",{className:"absolute inset-0 w-full h-full border-2 border-white/50",children:[(0,a.jsx)("div",{className:"absolute left-1/2 top-0 bottom-0 w-0 border-l-2 border-white/50 -translate-x-1/2"}),(0,a.jsx)("div",{className:"absolute left-1/2 top-1/2 w-[15%] aspect-square rounded-full border-2 border-white/50 -translate-x-1/2 -translate-y-1/2"}),(0,a.jsx)("div",{className:"absolute left-0 top-1/2 w-[18%] h-[35%] border-2 border-l-0 border-white/50 -translate-y-1/2 bg-[#bc7a46]"}),(0,a.jsx)("div",{className:"absolute left-[18%] top-1/2 w-[10%] aspect-square rounded-full border-2 border-white/50 -translate-y-1/2"}),(0,a.jsx)("div",{className:"absolute left-0 top-1/2 w-[30%] h-[70%] border-2 border-l-0 border-white/50 rounded-r-full -translate-y-1/2 opacity-60"}),(0,a.jsx)("div",{className:"absolute right-0 top-1/2 w-[18%] h-[35%] border-2 border-r-0 border-white/50 -translate-y-1/2 bg-[#bc7a46]"}),(0,a.jsx)("div",{className:"absolute right-0 top-1/2 w-[30%] h-[70%] border-2 border-r-0 border-white/50 rounded-l-full -translate-y-1/2 opacity-60"})]})]}),x&&(0,a.jsx)("div",{className:`absolute left-1/2 top-1/2 shadow-[0_8px_16px_rgba(0,0,0,0.8)] z-10 transition-all duration-[3000ms] border-2 border-white/20 rounded-full
229                                ${g?"w-2 h-2 sm:w-3 sm:h-3 bg-[#ccff00]":b?"w-4 h-4 sm:w-6 sm:h-6 bg-[#d95d16]":"w-4 h-4 sm:w-5 sm:h-5 bg-white"}`,style:{animation:"ballMove 8s infinite alternate ease-in-out",transform:"translate(-50%, -50%)"},children:(0,a.jsx)("div",{className:"absolute -bottom-4 left-1/2 w-4 h-2 bg-white/40 rounded-full blur-sm -translate-x-1/2"})}),x&&(0,a.jsxs)("div",{className:"absolute left-[65%] top-[60%] flex flex-col items-center animate-bounce-slow",style:{animation:"floatBubble 4s infinite alternate ease-in-out"},children:[(0,a.jsxs)("div",{className:"bg-white/95 backdrop-blur border border-white/10 rounded-2xl p-2 shadow-2xl flex items-center gap-3 w-max max-w-[200px]",children:[(0,a.jsx)("div",{className:"w-6 h-6 rounded-full flex items-center justify-center p-0.5 bg-white/5 shrink-0",children:(0,a.jsx)("img",{src:p,alt:e||"Home team",className:"max-w-full max-h-full object-contain",onError:t=>t.target.src=i(e),loading:"lazy",decoding:"async"})}),(0,a.jsx)("div",{className:"flex flex-col pr-1 overflow-hidden",children:(0,a.jsx)("span",{className:"text-slate-900 font-bold text-[10px] sm:text-xs tracking-wide truncate",children:g?"Serve / Return":"Tấn c\xf4ng nguy hiểm"})})]}),(0,a.jsx)("div",{className:"w-0 h-0 border-l-[6px] border-r-[6px] border-t-[6px] border-l-transparent border-r-transparent border-t-[#1a1c28]/95 mt-[-1px]"})]})]})})}),(0,a.jsx)("div",{className:"relative z-20 flex-1 flex flex-col items-center justify-start p-4 md:p-6 pointer-events-none w-full",children:(0,a.jsxs)("div",{className:"w-full max-w-[800px] flex items-center justify-between px-4 sm:px-6 py-3 rounded-xl bg-gradient-to-r from-[#0d0f14]/90 via-[#151821]/95 to-[#0d0f14]/90 backdrop-blur-xl border border-white/10 shadow-[0_10px_40px_rgba(0,0,0,0.8)] pointer-events-auto",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 flex-1 min-w-0 pr-2",children:[(0,a.jsx)("img",{src:p,alt:e,className:"w-8 h-8 md:w-12 md:h-12 object-contain drop-shadow-lg shrink-0",onError:t=>t.target.src=i(e),loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-slate-900 text-xs sm:text-sm md:text-base font-bold truncate tracking-wide",children:e})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1 shrink-0 px-2 sm:px-6 min-w-[100px]",children:[(0,a.jsxs)("span",{className:`inline-flex items-center gap-1.5 px-2.5 py-0.5 rounded-full text-[10px] sm:text-xs font-bold shadow-inner ${x?"bg-green-500/10 text-green-400 border border-green-500/20":"bg-white/5 text-slate-900/40"}`,children:[x&&(0,a.jsx)("span",{className:"w-1.5 h-1.5 rounded-full bg-green-500 animate-pulse shadow-[0_0_8px_#22c55e]"}),d||c]}),(0,a.jsxs)("div",{className:"flex gap-3 sm:gap-5 items-center justify-center",children:[(0,a.jsx)("span",{className:"text-slate-900 text-2xl sm:text-4xl font-black drop-shadow-md",children:r}),(0,a.jsx)("span",{className:"text-slate-900/30 text-xl font-light",children:"-"}),(0,a.jsx)("span",{className:"text-slate-900 text-2xl sm:text-4xl font-black drop-shadow-md",children:n})]})]}),(0,a.jsxs)("div",{className:"flex items-center justify-end gap-3 flex-1 min-w-0 pl-2 text-right",children:[(0,a.jsx)("span",{className:"text-slate-900 text-xs sm:text-sm md:text-base font-bold truncate tracking-wide",children:t}),(0,a.jsx)("img",{src:u,alt:t,className:"w-8 h-8 md:w-12 md:h-12 object-contain drop-shadow-lg shrink-0",onError:e=>e.target.src=i(t),loading:"lazy",decoding:"async"})]})]})}),(0,a.jsx)("div",{className:"relative z-20 mt-auto w-full p-4 flex justify-center pointer-events-none",children:(0,a.jsx)("div",{className:"w-full max-w-[600px] h-6 bg-white/40 backdrop-blur-md rounded-full border border-white/5 flex items-center px-4",children:(0,a.jsxs)("div",{className:"flex-1 h-0.5 bg-white/10 relative rounded-full",children:[x&&(0,a.jsx)("div",{className:"absolute left-0 top-0 bottom-0 bg-gradient-to-r from-[#b38b22] to-[#ffda6a] w-[65%] rounded-full opacity-90 shadow-[0_0_12px_#daa520]"}),(0,a.jsx)("span",{className:"absolute left-[65%] top-1/2 -translate-y-1/2 -translate-x-1/2 w-1.5 h-1.5 rounded-full bg-white shadow-md"})]})})}),(0,a.jsx)("style",{children:`
230                @keyframes ballMove {
231                    0% { transform: translate(-30%, -20%) scale(1); }
232                    25% { transform: translate(40%, -10%) scale(1.1); }
233                    50% { transform: translate(20%, 30%) scale(0.9); }
234                    75% { transform: translate(-10%, 15%) scale(1.2); }
235                    100% { transform: translate(-45%, 0%) scale(1); }
236                }
237                @keyframes floatBubble {
238                    0% { transform: translateY(0px) translateX(0px); }
239                    50% { transform: translateY(-8px) translateX(4px); }
240                    100% { transform: translateY(4px) translateX(-4px); }
241                }
242            `})]})}function c(e,t){if("1"===t||"2"===t)switch(e){case"2":return{t:"HT 1",live:!0,sc:!0};case"3":return{t:"Giữa giờ",live:!0,sc:!0};case"4":return{t:"HT 2",live:!0,sc:!0};case"5":return{t:"Hiệp phụ",live:!0,sc:!0};case"7":return{t:"Penalty",live:!0,sc:!0};case"8":case"9":return{t:"Kết th\xfac",live:!1,sc:!0};default:return{t:"Chưa bắt đầu",live:!1,sc:!1}}
242return["51","52","53","54","55"].includes(e)?{t:`Set ${e-50}`,live:!0,sc:!0}:["100","90","110"].includes(e)?{t:"KT",live:!1,sc:!0}:"0"===e||"1"===e?{t:"Chưa bắt đầu",live:!1,sc:!1}:{t:"LIVE",live:!0,sc:!0}}function d(e){let t=(e||"").split(/[\s-]+/).slice(0,2).map(e=>e[0]||"").join("").toUpperCase()||"??";return`data:image/svg+xml,${encodeURIComponent(`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 80 80"><rect width="80" height="80" rx="20" fill="#1a1c25"/><text x="40" y="47" font-size="20" font-family="Arial" font-weight="700" text-anchor="middle" fill="#666">${t}</text></svg>`)}`}function x(e){let t=new Date(1e3*parseInt(e||"0",10));return{hm:t.toLocaleTimeString("vi-VN",{hour:"2-digit",minute:"2-digit",timeZone:"Asia/Ho_Chi_Minh"}),dm:t.toLocaleDateString("vi-VN",{day:"2-digit",month:"2-digit",timeZone:"Asia/Ho_Chi_Minh"}),full:t.toLocaleDateString("vi-VN",{day:"2-digit",month:"2-digit",year:"numeric",timeZone:"Asia/Ho_Chi_Minh"})}}let h="max-w-[1200px]";function m({matchData:e,relatedMatches:t,matchDetails:s,standings:r,brandingNameUpper:i}){let p,u,g,j,v,y,[C,S]=(0,l.useState)("odds"),L=e?.match_data?.anchors||[],[$,F]=(0,l.useState)(!1),[T,A]=(0,l.useState)(!1),[M,H]=(0,l.useState)(null),[D,B]=(0,l.useState)(!1),z=(0,l.useRef)(0);(0,l.useEffect)(()=>{if(!e?.has_live||"1"!==e.has_live||0===L.length)return;let t=!1;B(!0);let s=async t=>{let s=t?.uid,a=`/api/socolive/proxy-stream?url=${encodeURIComponent(`https://live.inplyr.com/${s?`room/${s}`:`default/${e.id}`}.m3u8`)}`;try{let e=await fetch(a,{method:"GET",cache:"no-store"});if(!e.ok)return null;let s=(await e.text()).split("\n").filter(e=>e.trim()&&!e.startsWith("#"));if(0===s.length)return null;return(await fetch(s[0],{method:"HEAD",cache:"no-store"})).ok?t:null}catch{return null}};return Promise.all(L.map(e=>s(e))).then(e=>{if(t)return;let s=e.find(e=>null!==e);s?(H(s),F(!0),A(!1)):(H(L[0]),A(!0)),B(!1)}),()=>{t=!0}},[e?.has_live,L.length]),(0,l.useEffect)(()=>{if(!T||D||z.current>=20)return;let t=setTimeout(()=>{z.current++,A(!1),B(!0);let t=async t=>{let s=t?.uid,a=`/api/socolive/proxy-stream?url=${encodeURIComponent(`https://live.inplyr.com/${s?`room/${s}`:`default/${e.id}`}.m3u8`)}`;try{let e=await fetch(a,{method:"GET",cache:"no-store"});if(!e.ok)return null;let s=(await e.text()).split("\n").filter(e=>e.trim()&&!e.startsWith("#"));if(0===s.length)return null;return(await fetch(s[0],{method:"HEAD",cache:"no-store"})).ok?t:null}catch{return null}};Promise.all(L.map(e=>t(e))).then(e=>{let t=e.find(e=>null!==e);t?(H(t),F(!0),A(!1)):A(!0),B(!1)})},15e3);return()=>clearTimeout(t)},[T,D]);let[I,R]=(0,l.useState)(null),U=e?.post_name||e?.ls_id||e?.id;if(window.location.origin,(0,l.useEffect)(()=>{if(!U)return;let e=setInterval(async()=>{try{let e=await fetch(`/api/klivevip/match/${U}`,{cache:"no-store"});if(e.ok){let t=await e.json();R(t?.match??null)}}catch{}},1e4);return()=>clearInterval(e)},[U]),!e)return(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center py-32 gap-4",children:[(0,a.jsx)("span",{className:"text-[#64748B] text-lg",children:"Kh\xf4ng t\xecm thấy trận đấu"}),(0,a.jsx)("a",{href:"/",className:"text-[#4681E8] hover:underline text-sm",children:"← Quay lại"})]});let G=I?{...e,...I}:e,P=G?.has_live==="1"&&L.length>0,K=c(G.status_id,G.sport_id),V=$&&M&&!T&&!D,W=P&&(D||T&&K.live&&z.current<20),O=!P||T&&!W&&!D,q=!K.live&&"8"!==String(G.status_id)&&"9"!==String(G.status_id),{hm:X,full:Y}=x(G.time),Z=G.source_card_meta?.league_label||G.match_data?.competition_vi||G.match_data?.competition_full||"",Q=G.match_data?.stage_label||G.source_card_meta?.stage_label||"",J=G.home_logo||d(G.home_name),ee=G.away_logo||d(G.away_name),et=e=>t=>{t.target.src=d(e)};return(0,a.jsxs)("div",{className:"w-full bg-white min-h-screen text-slate-600 font-sans pb-16",children:[(0,a.jsx)("div",{className:"w-full border-b border-slate-200 bg-white",children:(0,a.jsxs)("div",{className:`${h} mx-auto px-4 py-3 flex items-center justify-between`,children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 text-[13px] font-bold",children:[(0,a.jsx)("span",{className:"text-[#4681E8] uppercase tracking-wide",children:Z}),Q&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"text-slate-300",children:"•"}),(0,a.jsx)("span",{className:"text-slate-600",children:Q})]})]}),(0,a.jsx)("div",{className:"text-[12px] font-mono text-slate-400 hidden sm:block",children:Y})]})}),(0,a.jsxs)("div",{className:`${h} mx-auto px-0 md:px-4 py-0 md:py-6 flex flex-col lg:flex-row gap-4 lg:gap-6`,children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0 flex flex-col gap-4 lg:gap-6",children:[(0,a.jsxs)("div",{className:"w-full relative bg-[#000000] rounded-none md:rounded-2xl overflow-hidden shadow-[0_10px_40px_rgba(0,0,0,0.5)] border-y md:border border-slate-200",children:[(0,a.jsx)("div",{className:"relative w-full aspect-video bg-[#000000] group z-10",children:V?(0,a.jsx)(n,{src:`/api/klivevip/proxy-stream?url=${encodeURIComponent(`https://live.inplyr.com/${M?.uid&&"default"!==M.uid?`room/${M.uid}`:`default/${G.id}`}.m3u8`)}`,autoPlay:!0,onError:()=>A(!0)}):O?(0,a.jsx)(o,{homeName:G.home_name,awayName:G.away_name,homeLogo:G.home_logo,awayLogo:G.away_logo,homeScore:K.sc?G.home_score:"0",awayScore:K.sc?G.away_score:"0",statusText:K.t,timeText:G.time_text||X,isLive:K.live,sportId:G.sport_id,matchId:G.ls_id||G.id,kickoffMs:1e3*Number(G?.time||0),isPreMatch:q}):(0,a.jsxs)("div",{className:"absolute inset-0 z-10 flex flex-col items-center justify-center p-4 lg:p-10",children:[(0,a.jsxs)("div",{className:"absolute inset-0 flex justify-between items-center opacity-[0.03] pointer-events-none px-4 lg:px-20 overflow-hidden",children:[(0,a.jsx)("img",{src:J,alt:"",className:"w-1/2 max-w-[400px] blur-[10px]",loading:"lazy",decoding:"async"}),(0,a.jsx)("img",{src:ee,alt:"",className:"w-1/2 max-w-[400px] blur-[10px]",loading:"lazy",decoding:"async"})]}),P&&!T&&(0,a.jsx)("button",{onClick:()=>F(!0),className:"group mb-4 sm:mb-8 w-16 h-16 md:w-20 md:h-20 rounded-full bg-[#4681E8] flex items-center justify-center hover:bg-[#55CAF1] transition-all shadow-[0_0_30px_rgba(70,129,232,0.5)] curs
242or-pointer z-20",children:(0,a.jsx)("svg",{className:"w-8 h-8 md:w-10 md:h-10 text-white ml-1.5 md:ml-2 group-hover:scale-110 transition-transform",viewBox:"0 0 24 24",fill:"currentColor",children:(0,a.jsx)("path",{d:"M8 5v14l11-7z"})})}),(0,a.jsxs)("div",{className:"grid grid-cols-[1fr_auto_1fr] items-center w-full max-w-[800px] gap-2 lg:gap-8 z-20",children:[(0,a.jsxs)("div",{className:"flex flex-col items-center gap-2 lg:gap-4",children:[(0,a.jsx)("img",{src:J,alt:G.home_name,className:"w-16 h-16 sm:w-24 sm:h-24 lg:w-32 lg:h-32 object-contain drop-shadow-[0_10px_20px_rgba(0,0,0,0.8)]",onError:et(G.home_name),loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-[#FFFFFF] text-xs sm:text-base lg:text-lg font-black text-center line-clamp-2 uppercase tracking-wide",children:G.home_name})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-2 lg:gap-3",children:[K.sc?(0,a.jsxs)("div",{className:"flex items-center gap-3 lg:gap-6 bg-white/90 backdrop-blur-md px-4 py-2 lg:px-8 lg:py-4 rounded-2xl border border-slate-200 shadow-2xl",children:[(0,a.jsx)("span",{className:"text-[#4681E8] text-[32px] sm:text-[48px] lg:text-[64px] font-black leading-none",children:G.home_score}),(0,a.jsx)("span",{className:"text-slate-300 text-[20px] lg:text-[28px] font-light",children:":"}),(0,a.jsx)("span",{className:"text-[#4681E8] text-[32px] sm:text-[48px] lg:text-[64px] font-black leading-none",children:G.away_score})]}):(0,a.jsx)("div",{className:"text-[#FFFFFF] text-[32px] sm:text-[48px] lg:text-[56px] font-black tracking-widest leading-none drop-shadow-xl",children:X}),(0,a.jsxs)("span",{className:`inline-flex items-center gap-2 rounded-full px-3 py-1 lg:px-5 lg:py-1.5 text-[10px] lg:text-[12px] font-bold tracking-widest uppercase ${K.live?"bg-[#4681E8] text-white shadow-[0_0_20px_rgba(70,129,232,0.6)]":"bg-white text-slate-600 border border-slate-200"}`,children:[K.live&&(0,a.jsx)("span",{className:"w-2 h-2 rounded-full bg-white animate-pulse"}),K.t,G.time_text?` : ${G.time_text}`:""]})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-2 lg:gap-4",children:[(0,a.jsx)("img",{src:ee,alt:G.away_name,className:"w-16 h-16 sm:w-24 sm:h-24 lg:w-32 lg:h-32 object-contain drop-shadow-[0_10px_20px_rgba(0,0,0,0.8)]",onError:et(G.away_name),loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-[#FFFFFF] text-xs sm:text-base lg:text-lg font-black text-center line-clamp-2 uppercase tracking-wide",children:G.away_name})]})]})]})}),L.length>0&&(0,a.jsxs)("div",{className:"w-full bg-white border-t border-slate-200 px-3 lg:px-6 py-2.5 lg:py-4 flex items-center gap-2 lg:gap-4 overflow-x-auto z-20",children:[(0,a.jsx)("span",{className:"text-[10px] lg:text-[11px] text-slate-600 uppercase font-bold tracking-widest shrink-0 mr-1 lg:mr-2",children:"CHỌN K\xcaNH TRUYỀN:"}),L.map((e,t)=>(0,a.jsxs)("button",{onClick:()=>{H(e),F(!0),A(!1)},className:`shrink-0 flex items-center gap-1.5 lg:gap-2 rounded-full px-3 py-1.5 lg:px-5 lg:py-2 text-[11px] lg:text-[13px] font-bold transition-all ${M?.uid===e.uid&&!T?"bg-[#4681E8]/10 border border-[#4681E8] text-[#4681E8] shadow-[0_0_15px_rgba(70,129,232,0.2)]":"bg-white border border-slate-200 text-slate-600 hover:text-[#4681E8] hover:border-[#4681E8]/50"}`,children:[(0,a.jsx)("span",{className:`w-1.5 h-1.5 lg:w-2 lg:h-2 rounded-full ${M?.uid===e.uid&&!T?"bg-[#4681E8] animate-pulse":"bg-transparent"}`}),"BLV ",e.nickName||`K\xeanh ${t+1}`]},e.uid||t))]})]}),(p=(()=>{let e=s?.stats;if(!e)return!1;let t=null;return Array.isArray(e)&&e.length>0?t=e[0]:e?.results?.[0]?t=e.results[0]:e?.stats_full_time&&(t=e),!!t&&!!(t.stats_full_time?.length>0||t.stats_haft_time?.length>0||t.stats_half_time?.length>0||t.stats?.length>0)})(),u=!!(s?.lineup&&(Array.isArray(s.lineup)?s.lineup.length>0:s.lineup.home||s.lineup.away)),g=!!(s?.events&&(Array.isArray(s.events)?s.events.length>0:s.events.incidents?.length>0||s.events.data?.length>0)),j=!!(r&&(Array.isArray(r)?r.length>0:r.data?.length>0)),(y=(v=[{id:"stats",label:"THỐNG K\xca",show:p},{id:"lineup",label:"ĐỘI H\xccNH",show:u},{id:"events",label:"DIỄN BIẾN",show:g},{id:"standings",label:"BẢNG XH",show:j},{id:"odds",label:"TỶ LỆ K\xc8O",show:!!(s?.odds&&Array.isArray(s.odds)&&s.odds.length>0)}].filter(e=>e.show)).find(e=>e.id===C)?C:v[0]?.id||"odds")!==C&&setTimeout(()=>S(y),0),v.length>0?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"bg-white rounded-2xl p-2 border border-slate-200 flex overflow-x-auto gap-2 shadow-[0_4px_15px_rgba(0,0,0,0.08)] mx-4 md:mx-0",children:v.map(({id:e,label:t})=>(0,a.jsx)("button",{onClick:()=>S(e),className:`flex-1 min-w-[100px] py-2.5 sm:py-3 text-[10px] sm:text-[12px] font-black uppercase tracking-widest rounded-xl transition-all ${y===e?"bg-[#4681E8]/10 text-[#4681E8] border border-[#4681E8]/30 shadow-inner":"text-slate-500 hover:text-[#4681E8] hover:bg-[#4681E8]/5 border border-transparent"}`,children:t},e))}),(0,a.jsxs)("div",{className:"bg-white rounded-2xl border border-slate-200 overflow-hidden shadow-[0_4px_15px_rgba(0,0,0,0.08)] min-h-[400px] mx-4 md:mx-0",children:["stats"===y&&(0,a.jsx)(b,{matchDetails:s}),"lineup"===y&&(0,a.jsx)(f,{matchDetails:s}),"events"===y&&(0,a.jsx)(_,{events:s?.events}),"standings"===y&&(0,a.jsx)(k,{standings:r}),"odds"===y&&(0,a.jsx)(E,{odds:s?.odds})]})]}):null),t.length>0&&(0,a.jsxs)("div",{className:"mt-4 mx-4 md:mx-0",children:[(0,a.jsxs)("h2",{className:"px-1 py-4 text-sm sm:text-base font-black text-slate-800 uppercase flex items-center gap-3 tracking-widest border-b border-slate-100 mb-4",children:[(0,a.jsx)("span",{className:"w-1 h-5 bg-[#4681E8] rounded-sm shadow-[0_0_8px_#4681E8]"}),"TRẬN ĐẤU C\xd9NG GIẢI"]}),(0,a.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3 sm:gap-4",children:t.slice(0,4).map(e=>(0,a.jsx)(w,{m:e},e.id))})]})]}),(0,a.jsx)("div",{className:"w-full lg:w-[350px] xl:w-[400px] shrink-0 px-4 md:px-0",children:(0,a.jsxs)("div",{className:"bg-white border border-slate-200 rounded-2xl overflow-hidden flex flex-col shadow-[0_10px_30px_rgba(0,0,0,0.1)] lg:sticky lg:top-8 h-[600px] lg:h-[c
242alc(100vh-100px)] lg:max-h-[850px]",children:[(0,a.jsxs)("div",{className:"px-5 py-4 border-b border-slate-200 flex items-center justify-between bg-white",children:[(0,a.jsxs)("h3",{className:"text-slate-800 text-sm font-black uppercase tracking-widest flex items-center gap-2",children:[(0,a.jsx)("span",{className:"w-2.5 h-2.5 rounded-full bg-[#4681E8] shadow-[0_0_10px_rgba(70,129,232,0.4)]"}),"PH\xd2NG CHAT"]}),(0,a.jsxs)("span",{className:"text-[10px] bg-white px-3 py-1.5 rounded-full text-[#4681E8] font-mono border border-[#4681E8]/30 shadow-inner tracking-widest flex items-center gap-1.5",children:[(0,a.jsx)("svg",{className:"w-3 h-3",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 10l4.553-2.276A1 1 0 0121 8.618v6.764a1 1 0 01-1.447.894L15 14M5 18h8a2 2 0 002-2V8a2 2 0 00-2-2H5a2 2 0 00-2 2v8a2 2 0 002 2z"})}),L.length," BLV"]})]}),(0,a.jsx)("div",{className:"flex-1 bg-[#FFFFFF]/40 min-h-0 chat-container-wrapper",children:(0,a.jsx)(N,{anchors:L,selectedAnchor:M})})]})})]})]})}let p={25:"KIỂM SO\xc1T B\xd3NG",24:"CHUYỀN CH\xcdNH X\xc1C",23:"TỔNG SỐ ĐƯỜNG CHUYỀN",22:"TẤN C\xd4NG",21:"T.C\xd4NG NGUY HIỂM",2:"S\xdaT TR\xdaNG Đ\xcdCH",37:"PHẠT G\xd3C",28:"N\xc9M BI\xcaN",8:"VIỆT VỊ",3:"THẺ V\xc0NG",4:"THẺ ĐỎ",5:"S\xdaT PENALTY",29:"PHẠM LỖI",26:"Đ\xc1NH ĐẦU",27:"CỨU THUA",1:"B\xc0N THẮNG",7:"PHẢN LƯỚI"},u=[25,21,22,24,2,23,4,3,37,28,8,5,29],g="https://cdn.sportdb.live/upload/team/";function b({matchDetails:e}){let[t,s]=(0,l.useState)("full"),r=e?.stats,n=e?.lineup,i=n?.match?.home_team,o=n?.match?.away_team,c=null;Array.isArray(r)&&r.length>0?c=r[0]:r?.results?.[0]?c=r.results[0]:r?.stats_full_time&&(c=r);let d={full:c?.stats_full_time||[],h1:c?.stats_haft_time||c?.stats_half_time||[],h2:c?.stats_haft_time_2nd_half||[]}[t]||[];if(!c||0===d.length)return(0,a.jsx)(j,{text:"Thống k\xea sẽ được cập nhật khi trận đấu bắt đầu"});let x=[...d].sort((e,t)=>{let s=u.indexOf(e.type),a=u.indexOf(t.type);return(-1===s?999:s)-(-1===a?999:a)});return(0,a.jsxs)("div",{className:"flex flex-col",children:[(i||o)&&(0,a.jsxs)("div",{className:"flex items-center justify-between px-4 py-3 border-b border-slate-100",children:[(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5 w-20",children:[i?.logo&&(0,a.jsx)("img",{src:g+i.logo,alt:i?.name||"Home team",className:"w-8 h-8 object-contain",onError:e=>e.target.style.display="none",loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-slate-600 text-[10px] font-medium text-center leading-tight",children:i?.name||""})]}),(0,a.jsx)("div",{className:"flex gap-1",children:[{k:"h1",l:"Hiệp 1"},{k:"h2",l:"Hiệp 2"},{k:"full",l:"Cả trận"}].map(({k:e,l})=>(0,a.jsx)("button",{onClick:()=>s(e),className:`px-2.5 py-1 text-[10px] font-bold rounded transition-all ${t===e?"bg-[#E11D48] text-white":"text-slate-400 hover:text-slate-600 bg-slate-100"}`,children:l},e))}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5 w-20",children:[o?.logo&&(0,a.jsx)("img",{src:g+o.logo,alt:o?.name||"Away team",className:"w-8 h-8 object-contain",onError:e=>e.target.style.display="none",loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-slate-600 text-[10px] font-medium text-center leading-tight",children:o?.name||""})]})]}),(0,a.jsx)("div",{className:"px-4 py-3 space-y-3",children:x.map(e=>{let t=p[e.type]||`Stat ${e.type}`,s=e.home,l=e.away,r=24===e.type||25===e.type,n=s+l,i=0===n?50:s/n*100,o=s>l,c=l>s;return(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"flex justify-between items-center mb-1.5",children:[(0,a.jsxs)("span",{className:`text-xs font-bold w-10 tabular-nums ${o?"text-slate-800":"text-slate-400"}`,children:[s,r?"%":""]}),(0,a.jsx)("span",{className:"text-slate-400 text-[10px] font-semibold tracking-wide uppercase",children:t}),(0,a.jsxs)("span",{className:`text-xs font-bold w-10 text-right tabular-nums ${c?"text-slate-800":"text-slate-400"}`,children:[l,r?"%":""]})]}),(0,a.jsxs)("div",{className:"flex gap-0.5 h-[5px]",children:[(0,a.jsx)("div",{className:"flex-1 rounded-l-full bg-white/[0.06] overflow-hidden flex justify-end",children:(0,a.jsx)("div",{className:`rounded-l-full transition-all duration-500 ${o?"bg-gradient-to-r from-[#E11D48]/60 to-[#E11D48]":"bg-gradient-to-r from-white/10 to-white/20"}`,style:{width:`${i}%`}})}),(0,a.jsx)("div",{className:"flex-1 rounded-r-full bg-white/[0.06] overflow-hidden",children:(0,a.jsx)("div",{className:`rounded-r-full transition-all duration-500 ${c?"bg-gradient-to-l from-[#E11D48]/60 to-[#E11D48]":"bg-gradient-to-l from-white/10 to-white/20"}`,style:{width:`${100-i}%`}})})]})]},e.type)})})]})}
242function f({matchDetails:e}){let[t,s]=(0,l.useState)("pitch"),r=e?.lineup,n=r?.lineup||r,i=n?.home||[],o=n?.away||[],c=r?.home_formation||"",d=r?.away_formation||"",x=r?.match?.home_team,h=r?.match?.away_team;if(0===i.length&&0===o.length)return(0,a.jsx)(j,{text:"Đội h\xecnh sẽ được c\xf4ng bố trước trận đấu 30 ph\xfat"});let m=e=>e.filter(e=>1===e.first),p=e=>e.filter(e=>1!==e.first),u=m(i),g=m(o),b=p(i),w=p(o);return(0,a.jsxs)("div",{className:"flex flex-col",children:[(0,a.jsxs)("div",{className:"flex items-center justify-center gap-1 px-3 py-2 border-b border-slate-100",children:[(0,a.jsx)("button",{onClick:()=>s("pitch"),className:`px-3 py-1.5 text-[10px] font-bold rounded transition-all ${"pitch"===t?"bg-[#E11D48] text-white":"text-slate-400 bg-slate-100"}`,children:"Đội h\xecnh xuất ph\xe1t"}),(0,a.jsx)("button",{onClick:()=>s("list"),className:`px-3 py-1.5 text-[10px] font-bold rounded transition-all ${"list"===t?"bg-[#E11D48] text-white":"text-slate-400 bg-slate-100"}`,children:"Đội h\xecnh dá»± bị"})]}),"pitch"===t?(0,a.jsx)("div",{className:"relative w-full",style:{aspectRatio:"68/105"},children:(0,a.jsxs)("div",{className:"absolute inset-0 bg-gradient-to-b from-[#1a5c2a] via-[#1e6b31] to-[#1a5c2a] rounded-2xl overflow-hidden",children:[(0,a.jsxs)("div",{className:"absolute inset-[3%] border border-white/20 rounded-lg",children:[(0,a.jsx)("div",{className:"absolute left-0 right-0 top-1/2 h-px bg-white/20"}),(0,a.jsx)("div",{className:"absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 w-[22%] aspect-square rounded-full border border-white/20"}),(0,a.jsx)("div",{className:"absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 w-1.5 h-1.5 bg-white/30 rounded-full"}),(0,a.jsx)("div",{className:"absolute top-0 left-1/2 -translate-x-1/2 w-[55%] h-[16%] border-l border-r border-white/20"}),(0,a.jsx)("div",{className:"absolute top-0 left-1/2 -translate-x-1/2 w-[25%] h-[6%] border-l border-r border-white/20"}),(0,a.jsx)("div",{className:"absolute bottom-0 left-1/2 -translate-x-1/2 w-[55%] h-[16%] border-t border-l border-r border-white/20"}),(0,a.jsx)("div",{className:"absolute bottom-0 left-1/2 -translate-x-1/2 w-[25%] h-[6%] border-t border-l border-r border-white/20"})]}),(0,a.jsx)("div",{className:"absolute top-1 left-2 text-[9px] text-[#F8FAFC]/50 font-bold z-10",children:x?.name||""}),(0,a.jsx)("div",{className:"absolute top-1 right-2 text-[9px] text-[#E11D48]/70 font-bold z-10",children:c}),(0,a.jsx)("div",{className:"absolute bottom-1 left-2 text-[9px] text-[#F8FAFC]/50 font-bold z-10",children:h?.name||""}),(0,a.jsx)("div",{className:"absolute bottom-1 right-2 text-[9px] text-[#E11D48]/70 font-bold z-10",children:d}),u.map((e,t)=>{let s=`${e.x||50}%`,l=`${(e.y||10)/2}%`,r="G"===e.position;return(0,a.jsxs)("div",{className:"absolute flex flex-col items-center z-10 -translate-x-1/2 -translate-y-1/2",style:{left:s,top:l},children:[(0,a.jsx)("div",{className:`w-6 h-6 rounded-full flex items-center justify-center text-[9px] font-black ${r?"bg-yellow-400 text-black":"bg-blue-600 text-[#F8FAFC]"} shadow-md border border-white/20`,children:e.shirt_number||""}),(0,a.jsx)("span",{className:"text-[7px] text-[#F8FAFC] font-semibold mt-0.5 text-center max-w-[48px] truncate drop-shadow-[0_1px_2px_rgba(0,0,0,0.8)]",children:(e.name||"").split(" ").slice(-2).join(" ")}),1===e.captain&&(0,a.jsx)("span",{className:"absolute -top-1 -right-1 text-[6px] text-yellow-400",children:"C"})]},`h-${t}`)}),g.map((e,t)=>{let s=`${100-(e.x||50)}%`,l=`${100-(e.y||10)/2}%`,r="G"===e.position;return(0,a.jsxs)("div",{className:"absolute flex flex-col items-center z-10 -translate-x-1/2 -translate-y-1/2",style:{left:s,top:l},children:[(0,a.jsx)("div",{className:`w-6 h-6 rounded-full flex items-center justify-center text-[9px] font-black ${r?"bg-yellow-400 text-black":"bg-orange-500 text-[#F8FAFC]"} shadow-md border border-white/20`,children:e.shirt_number||""}),(0,a.jsx)("span",{className:"text-[7px] text-[#F8FAFC] font-semibold mt-0.5 text-center max-w-[48px] truncate drop-shadow-[0_1px_2px_rgba(0,0,0,0.8)]",children:(e.name||"").split(" ").slice(-2).join(" ")}),1===e.captain&&(0,a.jsx)("span",{className:"absolute -top-1 -right-1 text-[6px] text-yellow-400",children:"C"})]},`a-${t}`)})]})}):(0,a.jsxs)("div",{className:"px-3 py-2 text-xs",children:[(0,a.jsxs)("div",{className:"flex justify-between font-bold text-slate-400 mb-1 uppercase tracking-wider text-[9px] px-1",children:[(0,a.jsx)("span",{children:"Đội chá»
242§ nh\xe0"}),(0,a.jsx)("span",{children:"Đội kh\xe1ch"})]}),Array.from({length:Math.max(b.length,w.length)}).map((e,t)=>{let s=b[t],l=w[t];return(0,a.jsxs)("div",{className:"flex justify-between items-center border-b border-slate-50 py-1.5",children:[(0,a.jsx)("div",{className:"flex items-center gap-1.5 w-1/2 min-w-0",children:s&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"text-[#E11D48] font-bold w-5 text-center shrink-0 text-[10px]",children:s.shirt_number||""}),(0,a.jsx)("span",{className:"text-slate-700 truncate text-[11px]",children:s.name||""})]})}),(0,a.jsx)("div",{className:"flex items-center gap-1.5 w-1/2 justify-end min-w-0",children:l&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"text-slate-700 truncate text-[11px] text-right",children:l.name||""}),(0,a.jsx)("span",{className:"text-[#E11D48] font-bold w-5 text-center shrink-0 text-[10px]",children:l.shirt_number||""})]})})]},t)})]})]})}function j({text:e}){return(0,a.jsx)("div",{className:"flex items-center justify-center py-10 text-slate-400 text-sm text-center",children:e})}function w({m:e}){let t=c(e.status_id,e.sport_id),{hm:s,dm:l}=x(e.time),r=e.source_card_meta?.league_label||e.match_data?.competition_vi||"";return(0,a.jsxs)("a",{href:`/match/${encodeURIComponent(e.post_name||e.id)}`,className:"flex items-center gap-3 rounded-2xl bg-white hover:bg-slate-50 border border-slate-100 hover:border-[#4681E8]/30 p-3 transition-all group",children:[(0,a.jsxs)("div",{className:"shrink-0 w-14 text-center",children:[(0,a.jsx)("div",{className:"text-[#E11D48] text-[11px] font-bold",children:s}),(0,a.jsx)("div",{className:"text-slate-400 text-[9px]",children:l})]}),(0,a.jsx)("div",{className:"w-px h-9 bg-slate-200 shrink-0"}),(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("div",{className:"text-slate-400 text-[9px] truncate mb-1",children:r}),(0,a.jsxs)("div",{className:"flex items-center gap-2 mb-0.5",children:[(0,a.jsx)("img",{src:e.home_logo||d(e.home_name),alt:e.home_name,className:"w-4 h-4 object-contain shrink-0",onError:t=>t.target.src=d(e.home_name),loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-slate-600 text-[12px] font-medium truncate",children:e.home_name})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("img",{src:e.away_logo||d(e.away_name),alt:e.away_name,className:"w-4 h-4 object-contain shrink-0",onError:t=>t.target.src=d(e.away_name),loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-slate-600 text-[12px] font-medium truncate",children:e.away_name})]})]}),t.sc?(0,a.jsxs)("span",{className:"text-slate-800 font-bold text-[14px] tabular-nums shrink-0",children:[e.home_score,"-",e.away_score]}):(0,a.jsx)("span",{className:"text-[10px] font-bold text-[#E11D48] bg-[#E11D48]/10 rounded px-2.5 py-1 group-hover:bg-[#E11D48]/15 transition shrink-0",children:"XEM NGAY"})]})}let v={0:{bg:"bg-white/10",text:"text-[#F8FAFC]/40",nameCls:"text-[#94A3B8]"},1:{bg:"bg-white/10",text:"text-[#F8FAFC]/50",nameCls:"text-[#94A3B8]"},2:{bg:"bg-green-900/50",text:"text-green-400",nameCls:"text-green-400"},3:{bg:"bg-yellow-900/40",text:"text-yellow-400",nameCls:"text-emerald-600 font-bold"},4:{bg:"bg-blue-900/40",text:"text-blue-400",nameCls:"text-blue-400 font-bold"},5:{bg:"bg-red-900/40",text:"text-red-400",nameCls:"text-red-400 font-bold"}};function N({anchors:e,selectedAnchor:t}){let[s,r]=(0,l.useState)([]),[n,i]=(0,l.useState)(!1),o=(0,l.useRef)(null),c=(0,l.useRef)(null),d=t?.roomNum;return(0,l.useEffect)(()=>{if(!d)return;r([]),i(!1);let e=new EventSource(`/api/chat/${d}`);return e.onopen=()=>i(!0),e.onmessage=e=>{try{let t=JSON.parse(e.data);if("connected"===t.type)return void i(!0);if("history"===t.type&&Array.isArray(t.messages))return void r(e=>[...t.messages,...e].slice(-200));t.user&&t.text&&r(e=>[...e,t].slice(-200))}catch{}},e.onerror=()=>i(!1),()=>{e.close(),i(!1)}},[d]),(0,l.useEffect)(()=>{requestAnimationFrame(()=>{let e=c.current;e&&(e.scrollTop=e.scrollHeight)})},[s.length]),(0,a.jsxs)("div",{className:"flex flex-col h-full bg-[#0F0F23]",children:[(0,a.jsxs)("div",{ref:c,className:"flex-1 min-h-0 px-3 py-2 flex flex-col gap-[3px] overflow-y-auto",style:{scrollbarWidth:"thin",scrollbarColor:"#444 transparent"},children:[(0,a.jsx)("div",{className:"text-center text-[10px] text-[#F8FAFC]/30 bg-slate-50/60 py-1.5 rounded-xl mb-1 sticky top-0 z-10 backdrop-blur-sm",children:n?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"inline-block h-1.5 w-1.5 rounded-full bg-green-400 animate-pulse mr-1"}),"Đang kết nối ph\xf2ng chat trá»±c tiếp"]}):d?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"inline-block h-1.5 w-1.5 rounded-full bg-yellow-400 animate-pulse mr-1"}),"Đang kết nối..."]}
242):"Ch\xe0o mừng bạn đến với ph\xf2ng chat"}),0===s.length&&n&&(0,a.jsx)("div",{className:"text-center text-[10px] text-[#F8FAFC]/20 py-4",children:"Chờ tin nhắn mới..."}),s.map((e,t)=>{var s;let l=(s=e.level)>=5?v[5]:v[s]||v[0];return 2===e.type||e.text?.includes("v\xe0o ph\xf2ng tr\xf2 chuyện")?(0,a.jsxs)("div",{className:"flex items-start gap-1.5 text-[11px] leading-relaxed py-[1px] opacity-60",children:[(0,a.jsx)("span",{className:"text-green-500/70 font-medium",children:"Hi"}),(0,a.jsxs)("span",{className:`shrink-0 inline-flex items-center px-1 py-[0.5px] rounded text-[8px] font-bold ${l.bg} ${l.text}`,children:["Lv",e.level]}),(0,a.jsxs)("span",{className:`font-bold ${l.nameCls}`,children:[e.user,":"]}),(0,a.jsx)("span",{className:"text-[#F8FAFC]/40",children:e.text})]},`${e.ts}-${t}`):(0,a.jsxs)("div",{className:"flex items-start gap-1.5 text-[11px] leading-relaxed py-[1px]",children:[(0,a.jsxs)("span",{className:`shrink-0 inline-flex items-center px-1 py-[0.5px] rounded text-[8px] font-bold ${l.bg} ${l.text}`,children:["Lv.",e.level]}),(0,a.jsxs)("span",{className:`font-bold shrink-0 ${l.nameCls}`,children:[e.user,":"]}),(0,a.jsx)("span",{className:"text-[#F8FAFC]/80 break-words min-w-0",children:e.text})]},`${e.ts}-${t}`)}),(0,a.jsx)("div",{ref:o})]}),(0,a.jsxs)("div",{className:"shrink-0 px-3 py-2 bg-[#0F0F23] border-t border-white/[0.04] space-y-2",children:[(0,a.jsx)("div",{className:"flex items-center justify-center gap-3 text-[#F8FAFC]/20 text-[10px]",children:(0,a.jsx)("span",{className:"flex items-center gap-1",children:(0,a.jsx)("svg",{className:"w-3 h-3",viewBox:"0 0 24 24",fill:"currentColor",children:(0,a.jsx)("path",{d:"M12 4.5C7 4.5 2.7 7.6 1 12c1.7 4.4 6 7.5 11 7.5s9.3-3.1 11-7.5c-1.7-4.4-6-7.5-11-7.5zm0 12.5c-2.8 0-5-2.2-5-5s2.2-5 5-5 5 2.2 5 5-2.2 5-5 5zm0-8c-1.7 0-3 1.3-3 3s1.3 3 3 3 3-1.3 3-3-1.3-3-3-3z"})})})}),(0,a.jsxs)("div",{className:"flex bg-[#0F0F23] rounded-2xl overflow-hidden border border-white/[0.08]",children:[(0,a.jsx)("input",{type:"text",placeholder:"Đăng nhập để c\xf9ng chat nh\xe9",disabled:!0,className:"flex-1 bg-transparent px-3 py-2 text-[11px] text-[#F8FAFC] outline-none placeholder:text-[#F8FAFC]/30 disabled:opacity-50"}),(0,a.jsx)("button",{disabled:!0,className:"px-4 text-[11px] font-bold bg-[#E11D48] text-black disabled:bg-white/10 disabled:text-[#F8FAFC]/20 transition-colors",children:"Gửi"})]})]})]})}let y={1:{icon:"⚽",label:"B\xe0n thắng",color:"text-green-400"},2:{icon:"\uD83C\uDD7F️",label:"Phạt đền",color:"text-green-400"},3:{icon:"\uD83D\uDFE1",label:"Thẻ v\xe0ng",color:"text-yellow-400"},4:{icon:"\uD83D\uDFE1\uD83D\uDFE1",label:"Thẻ v\xe0ng 2",color:"text-emerald-600"},5:{icon:"\uD83D\uDD34",label:"Thẻ đỏ",color:"text-red-500"},7:{icon:"\uD83D\uDD04",label:"Phản lưới",color:"text-orange-400"},8:{icon:"\uD83C\uDFE5",label:"Chấn thương",color:"text-[#94A3B8]"},9:{icon:"\uD83D\uDD04",label:"Thay người",color:"text-blue-400"},11:{icon:"⏱️",label:"Hiệp 2",color:"text-[#F8FAFC]/40"},15:{icon:"\uD83E\uDD45",label:"Pen trượt",color:"text-red-400"},19:{icon:"⏱️",label:"Kết th\xfac hiệp",color:"text-[#F8FAFC]/30"},21:{icon:"\uD83C\uDFC6",label:"VAR",color:"text-purple-400"}};function _({events:e}){let t=e?.incidents||e?.events||[];return t&&0!==t.length?(0,a.jsx)("div",{className:"flex flex-col",children:t.map((e,t)=>{let s=y[e.type]||{icon:"•",label:`Event ${e.type}`,color:"text-[#F8FAFC]/50"},l=1===e.position,r=2===e.position,n=e.add_time?`+${e.add_time}`:"",i=`${e.time}'${n}`;return l||r||11!==e.type&&19!==e.type?9===e.type?(0,a.jsxs)("div",{className:`flex items-center gap-2 border-b border-slate-50 p-3 text-xs ${l?"":"flex-row-reverse"}`,children:[(0,a.jsx)("span",{className:"text-slate-400 w-10 text-center shrink-0 text-[10px]",children:i}),(0,a.jsxs)("div",{className:`flex-1 flex flex-col gap-0.5 ${l?"items-start":"items-end"}`,children:[(0,a.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,a.jsx)("span",{className:"text-green-400 text-[10px]",children:"▲"}),(0,a.jsx)("span",{className:"text-[#F8FAFC]/80 text-[11px]",children:e.in_player_name||""})]}),(0,a.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,a.jsx)("span",{className:"text-red-400 text-[10px]",children:"▼"}),(0,a.jsx)("span",{className:"text-[#F8FAFC]/40 text-[11px]",children:e.out_player_name||""})]})]})]},t):(0,a.jsxs)("div",{className:`flex items-center gap-2 border-b border-slate-50 p-3 text-xs ${l?"":"flex-row-reverse"}`,children:[(0,a.jsx)("span",{className:"text-slate-400 w-10 text-center shrink-0 text-[10px]",children:i}),(0,a.jsx)("span",{className:`shrink-0 text-sm ${s.color}`,children:s.icon}),(0,a.jsxs)("div",{className:`flex-1 min-w-0 ${l?"text-left":"text-right"}`,children:[(0,a.jsx)("span",{className:"text-slate-700 text-[11px]",children:e.player_name||""}),e.assist1_name&&(0,a.jsxs)("span",{className:"text-slate-400 text-[10px] ml-1",children:["(kiến tạo: ",e.assist1_name,")"]}),1===e.type&&void 0!==e.home_score&&(0,a.jsxs)("span",{className:"text-[#E11D48] font-bold text-[11px] ml-2",children:[e.home_score," - ",e.away_score]})]})]},t):(0,a.jsx)("div",{className:"flex items-center justify-center py-2 border-b border-slate-50 bg-slate-50",children:(0,a.jsxs)("span",{className:"text-slate-400 text-[10px] uppercase tracking-wider",children:[s.icon," ",s.label," — ",i]})},t)})}):(0,a.jsx)(j,{text:"Diễn biến trận đấu sẽ được cập nhật trực tiếp tại đ\xe2y"})}function k({standings:e}
242){return e&&e.teams&&0!==e.teams.length?(0,a.jsxs)("div",{className:"w-full text-[10px]",children:[(0,a.jsxs)("div",{className:"grid grid-cols-[20px_1fr_24px_24px_32px] bg-slate-50 p-2 text-slate-400 uppercase font-bold sticky top-0",children:[(0,a.jsx)("span",{className:"text-center",children:"#"}),(0,a.jsx)("span",{children:"Team"}),(0,a.jsx)("span",{className:"text-center",children:"T"}),(0,a.jsx)("span",{className:"text-center",children:"B"}),(0,a.jsx)("span",{className:"text-center whitespace-nowrap",children:"Đ"})]}),e.teams.slice(0,15).map((e,t)=>{let s=!!e.data,l=s?parseFloat(e.data[0]):e.rank||t+1,r=s?e.data[1]:e.target_name,n=s?e.data[7]:e.points,i=s?e.data[3]:e.won,o=s?e.data[5]:e.loss;return(0,a.jsxs)("div",{className:"grid grid-cols-[20px_1fr_24px_24px_32px] items-center p-2 border-b border-slate-50 hover:bg-slate-50 transition-colors",children:[(0,a.jsx)("span",{className:"text-center text-slate-500",children:l}),(0,a.jsxs)("div",{className:"flex items-center gap-1.5 min-w-0 pr-2",children:[e.team_logo&&(0,a.jsx)("img",{src:e.team_logo,className:"w-3.5 h-3.5 object-contain",alt:r||"Team logo",loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-slate-700 font-medium truncate",children:r})]}),(0,a.jsx)("span",{className:"text-center text-slate-500",children:i}),(0,a.jsx)("span",{className:"text-center text-slate-500",children:o}),(0,a.jsx)("span",{className:"text-center text-[#E11D48] font-bold",children:n})]},r)})]}):(0,a.jsx)(j,{text:"Bảng xếp hạng sẽ được cập nhật"})}function E({odds:e}){let t=Array.isArray(e)?e:[],s=["2","4","3","16"];function l(e){for(let a of s){let s=t.find(t=>t.odds_type===e&&String(t.company_id)===a);if(s?.odds_info?.length)return s}return t.find(t=>t.odds_type===e&&t.odds_info?.length>0)}function r(e,t){let s=e?.odds_info;if(!s?.length)return["-","-","-"];let a="opening"===t?s.length-1:0;if(!s?.length||!s[a])return["-","-","-"];let l=s[a][2];if("string"!=typeof l)return["-","-","-"];let r=l.split(",");return[r[0]||"-",r[1]||"-",r[2]||"-"]}let n=l("asia"),i=l("eu"),o=l("bs"),c=l("cr"),d=r(n,"opening"),x=r(n,"latest"),h=r(i,"opening"),m=r(i,"latest"),p=r(o,"opening"),u=r(o,"latest"),g=r(c,"opening"),b=r(c,"latest"),f=({children:e})=>(0,a.jsx)("th",{className:"px-2 py-2 text-[9px] sm:text-[10px] font-bold uppercase tracking-wider text-slate-500 border-b border-slate-100 text-center",children:e}),j=({children:e,color:t})=>(0,a.jsx)("td",{className:`px-2 py-2.5 text-center text-[11px] sm:text-xs font-bold ${t||"text-slate-600"} border-b border-slate-50`,children:e});return(0,a.jsxs)("div",{className:"overflow-x-auto",children:[(0,a.jsxs)("table",{className:"w-full min-w-[600px]",children:[(0,a.jsxs)("thead",{children:[(0,a.jsxs)("tr",{className:"bg-slate-50",children:[(0,a.jsx)("th",{className:"px-4 py-2 text-left border-b border-slate-100",rowSpan:2,children:(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("div",{className:"w-7 h-7 rounded bg-gradient-to-br from-[#1d4ed8] to-[#3b82f6] flex items-center justify-center text-white text-[9px] font-black shadow-sm",children:"B"}),(0,a.jsx)("span",{className:"text-slate-600 text-[11px] font-bold tracking-wider",children:"SPORT"})]})}),(0,a.jsx)("th",{colSpan:3,className:"px-1 py-1.5 text-center text-[9px] sm:text-[10px] font-bold uppercase tracking-wider text-[#4681E8] border-b border-l border-slate-100",children:"CƯỢC CH\xc2U \xc1"}),(0,a.jsx)("th",{colSpan:3,className:"px-1 py-1.5 text-center text-[9px] sm:text-[10px] font-bold uppercase tracking-wider text-[#4681E8] border-b border-l border-slate-100",children:"CƯỢC CH\xc2U \xc2U"}),(0,a.jsx)("th",{colSpan:3,className:"px-1 py-1.5 text-center text-[9px] sm:text-[10px] font-bold uppercase tracking-wider text-[#4681E8] border-b border-l border-slate-100",children:"T\xc0I XỈU"}),(0,a.jsx)("th",{colSpan:3,className:"px-1 py-1.5 text-center text-[9px] sm:text-[10px] font-bold uppercase tracking-wider text-[#4681E8] border-b border-l border-slate-100",children:"K\xc8O G\xd3C"})]}),(0,a.jsxs)("tr",{className:"bg-slate-50",children:[(0,a.jsx)(f,{children:"CHỦ"}),(0,a.jsx)(f,{children:"CHẤP"}),(0,a.jsx)(f,{children:"KH\xc1CH"}),(0,a.jsx)(f,{children:"CHỦ"}),(0,a.jsx)(f,{children:"H\xd2A"}),(0,a.jsx)(f,{children:"KH\xc1CH"}),(0,a.jsx)(f,{children:"T\xc0I"}),(0,a.jsx)(f,{children:"TỶ LỆ"}),(0,a.jsx)(f,{children:"XỈU"}),(0,a.jsx)(f,{children:"T\xc0I"}),(0,a.jsx)(f,{children:"TỶ LỆ"}),(0,a.jsx)(f,{children:"XỈU"})]})]}),(0,a.jsxs)("tbody",{children:[(0,a.jsxs)("tr",{className:"hover:bg-slate-50 transition-colors",children:[(0,a.jsx)("td",{className:"px-4 py-2.5 text-[11px] sm:text-xs text-slate-500 font-medium border-b border-slate-50",children:"Tỷ Lệ Mở Cược"}),(0,a.jsx)(j,{children:d[0]}),(0,a.jsx)(j,{color:"text-red-400",children:d[1]}),(0,a.jsx)(j,{children:d[2]}),(0,a.jsx)(j,{children:h[0]}),(0,a.jsx)(j,{children:h[1]}),(0,a.jsx)(j,{children:h[2]}),(0,a.jsx)(j,{children:p[0]}),(0,a.jsx)(j,{children:p[1]}),(0,a.jsx)(j,{children:p[2]}),(0,a.jsx)(j,{children:g[0]}),(0,a.jsx)(j,{children:g[1]}),(0,a.jsx)(j,{children:g[2]})]}),(0,a.jsxs)("tr",{className:"hover:bg-slate-50 transition-colors",children:[(0,a.jsx)("td",{className:"px-4 py-2.5 text-[11px] sm:text-xs text-slate-500 font-medium border-b border-slate-50",children:"Tỷ Lệ Trước Trận"}),(0,a.jsx)(j,{children:x[0]}),(0,a.jsx)(j,{color:"text-red-400",children:x[1]}),(0,a.jsx)(j,{children:x[2]}),(0,a.jsx)(j,{children:m[0]}),(0,a.jsx)(j,{children:m[1]}),(0,a.jsx)(j,{children:m[2]}),(0,a.jsx)(j,{children:u[0]}),(0,a.jsx)(j,{children:u[1]}),(0,a.jsx)(j,{children:u[2]}),(0,a.jsx)(j,{children:b[0]}),(0,a.jsx)(j,{children:b[1]}),(0,a.jsx)(j,{children:b[2]})]}),(0,a.jsxs)("tr",{className:"hover:bg-slate-50 transition-colors bg-white",children:[(0,a.jsxs)("td",{className:"px-4 py-2.5 text-[11px] sm:text-xs text-slate-700 font-bold flex items-center gap-1.5 border-b border-slate-50",children:["Live ",(0,a.jsx)("span",{className:"w-1.5 h-1.5 rounded-full bg-red-500 animate-pulse"})]}),(0,a.jsx)(j,{color:"text-green-400",children:x[0]}),(0,a.jsx)(j,{color:"text-red-400",children:x[1]}),(0,a.jsx)(j,{color:"text-green-400",children:x[2]}),(0,a.jsx)(j,{color:"text-green-400",children:m[0]}),(0,a.jsx)(j,{color:"text-green-400",children:m[1]}),(0,a.jsx)(j,{color:"text-green-400",children:m[2]}),(0,a.jsx)(j,{color:"text-green-400",children:u[0]}),(0,a.jsx)(j,{children:u[1]}),(0,a.jsx)(j,{color:"text-green-400",children:u[2]}),(0,a.jsx)(j,{color:"text-green-400",children:b[0]}),(0,a.jsx)(j,{children:b[1]}),(0,a.jsx)(j,{color:"text-green-400",children:b[2]})]})]})]}),(0,a.jsx)("p",{className:"text-center text-slate-400 text-[10px] py-2.5 border-t border-slate-100",children:"Tỷ lệ k\xe8o sẽ được cập nhật gần giờ thi đấu"})]})}},25059:(e,t,s)=>{"use strict";s.d(t,{x:()=>r});var a=s(68019),l=s(70508);
242function r({eyebrow:e,title:t,titleAddon:s,rightSlot:n,className:i}){return(0,a.jsx)("div",{className:(0,l.cn)("relative mb-5 overflow-hidden border-b border-slate-200",i),children:(0,a.jsxs)("div",{className:"flex items-center justify-between px-1 py-4 min-h-[56px]",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 min-w-0",children:[(0,a.jsx)("span",{className:"h-8 w-1 shrink-0 rounded-sm bg-gradient-to-b from-[#4681E8] to-[#55CAF1] shadow-[0_0_10px_rgba(70,129,232,0.5)]"}),(0,a.jsxs)("div",{className:"min-w-0",children:[e&&(0,a.jsx)("div",{className:"text-[10px] font-bold uppercase tracking-[0.2em] text-[#4681E8]/60 mb-0.5",children:e}),(0,a.jsxs)("div",{className:"flex items-center gap-2.5 flex-wrap",children:[(0,a.jsx)("h1",{className:"text-[18px] sm:text-[22px] font-black uppercase tracking-tight text-slate-800 leading-none",children:t}),s]})]})]}),n&&(0,a.jsx)("div",{className:"hidden sm:flex items-center gap-2 text-right shrink-0 ml-4",children:n})]})})}},25361:(e,t,s)=>{"use strict";s.d(t,{Klivevip15SchedulePage:()=>d});var a=s(68019),l=s(10707),r=s(78637),n=s(71099);function i({html:e}){return e?.trim()?(0,a.jsx)("section",{className:"relative mt-10 mb-6",children:(0,a.jsx)("div",{className:"seo-prose relative",children:(0,a.jsx)("div",{dangerouslySetInnerHTML:{__html:e},className:"text-slate-600 text-[14px] leading-[1.85] px-1 [&_strong]:text-slate-900 [&_a]:text-[#4681E8]"})})}):null}s(10122);let o=`
243<h2>Lịch thi đấu b\xf3ng đ\xe1 - Cập nhật lịch b\xf3ng đ\xe1 h\xf4m nay nhanh v\xe0 ch\xednh x\xe1c</h2>
244
245<p>Để <strong>xem lịch thi đấu b\xf3ng đ\xe1</strong> nhanh, ch\xednh x\xe1c v\xe0 đầy đủ nhất, Klive ch\xednh l\xe0 nơi bạn n\xean chọn. Ch\xfang t\xf4i cập nhật lịch thi đấu cho to\xe0n bộ c\xe1c giải đấu trong nước v\xe0 quốc tế, gi\xfap bạn kh\xf4ng bỏ lỡ bất kỳ trận cầu hấp dẫn n\xe0o.</p>
246
247<img src="/images/seo/schedule-football.png" alt="Lịch thi đấu b\xf3ng đ\xe1 h\xf4m nay tại Klive" loading="lazy" />
248
249<div class="toc-box">
250  <h3>Nội dung ch\xednh</h3>
251  <ol>
252    <li>Lịch thi đấu b\xf3ng đ\xe1 trực tuyến h\xe0ng đầu</li>
253    <li>Lịch b\xf3ng đ\xe1 nhanh v\xe0 ch\xednh x\xe1c</li>
254    <li>Cập nhật lịch Ngoại Hạng Anh v\xe0 Champions League</li>
255    <li>C\xe1ch xem lịch thi đấu hiệu quả nhất</li>
256  </ol>
257</div>
258
259<h2>Lịch thi đấu b\xf3ng đ\xe1 trực tuyến h\xe0ng đầu</h2>
260<p>Trong thời đại số, kh\xf4ng ai c\xf2n xem lịch b\xf3ng đ\xe1 tr\xean TV hay b\xe1o giấy nữa. Tất cả đ\xe3 chuyển sang theo d\xf5i online, v\xe0 Klive ch\xednh l\xe0 nền tảng cập nhật lịch b\xf3ng đ\xe1 được đ\xe1nh gi\xe1 cao nhất.</p>
261
262<p>Khi truy cập Klive, bạn c\xf3 thể xem lịch thi đấu của bất kỳ giải đấu b\xf3ng đ\xe1 n\xe0o tr\xean thế giới một c\xe1ch ho\xe0n to\xe0n miễn ph\xed. Th\xf4ng tin lịch đấu được cập nhật sớm nhất v\xe0 chi tiết đến từng ph\xfat.</p>
263
264<h2>Lịch b\xf3ng đ\xe1 nhanh v\xe0 ch\xednh x\xe1c</h2>
265<p>Klive kh\xf4ng chỉ cung cấp lịch thi đấu c\xe1c giải đấu h\xe0ng đầu m\xe0 c\xf2n cập nhật lịch ph\xe1t s\xf3ng tr\xean c\xe1c k\xeanh truyền h\xecnh Việt Nam như K+, FPT Play, VTV Sports. Gi\xfap bạn biết trận n\xe0o được chiếu trực tiếp tr\xean TV v\xe0 sắp xếp thời gian hợp l\xfd.</p>
266
267<h2>Cập nhật lịch Ngoại Hạng Anh v\xe0 Champions League</h2>
268<p>Ngoại Hạng Anh v\xe0 Champions League l\xe0 hai giải đấu được quan t\xe2m nhất. Tại Klive, bạn lu\xf4n nắm được lịch đấu đầy đủ từ v\xf2ng bảng đến chung kết, k\xe8m theo th\xf4ng tin về đội h\xecnh dự kiến, phong độ v\xe0 lịch sử đối đầu để chuẩn bị tốt nhất cho mỗi trận cầu.</p>
269
270<p>Kết hợp lịch thi đấu với trang trực tiếp b\xf3ng đ\xe1, bạn sẽ c\xf3 trải nghiệm theo d\xf5i b\xf3ng đ\xe1 ho\xe0n hảo nhất - biết trước, xem ngay, kh\xf4ng bỏ lỡ!</p>
271`;var c=s(25619);function d({initialData:e}){let t=(0,r.usePathname)(),[s,h]=(0,l.useState)(!1),[m,p]=(0,l.useState)(new Set),[u,g]=(0,l.useState)(""),[b,f]=(0,l.useState)(!1),[j,w]=(0,l.useState)(0),v=(0,l.useMemo)(()=>(0,c.p_)(e),[e]),N=v.dateTabs,y=(0,l.useMemo)(()=>
271{if(!v.selectedDate)return 0;let e=N.findIndex(e=>(e.dataValue||e.date)===v.selectedDate);return e>=0?e:0},[N,v.selectedDate]),[_,k]=(0,l.useState)(y),[E,C]=(0,l.useState)(v.leagues||[]),S=(0,l.useMemo)(()=>{if(!u)return E;let e=u.toLowerCase();return E.filter(t=>t.league_name.toLowerCase().includes(e)||t.matches.some(t=>t.home_team.toLowerCase().includes(e)||t.away_team.toLowerCase().includes(e)))},[E,u]),L=Math.max(0,N.length-7),$=N.slice(j,j+7),F=j>0,T=j<L,A=S.reduce((e,t)=>e+t.matches.length,0);return((0,l.useEffect)(()=>{if(!v.selectedDate||!N.length)return;let e=N.findIndex(e=>(e.dataValue||e.date)===v.selectedDate);e>=0&&k(e)},[N,v.selectedDate]),(0,l.useEffect)(()=>{_<j?w(Math.max(0,_)):_>=j+7&&w(Math.min(L,_-7+1))},[_,L,j]),e)?(0,a.jsxs)("div",{className:"max-w-[1440px] mx-auto px-4 py-8",children:[(0,a.jsx)(n.f,{eyebrow:"Lịch thi đấu",title:"LỊCH THI ĐẤU",rightSlot:(0,a.jsxs)("div",{className:"text-[12px] text-slate-500 font-bold uppercase tracking-wider",children:[(0,a.jsx)("span",{className:"text-[#E11D48] font-black",children:S.reduce((e,t)=>e+t.matches.length,0)})," trận đấu"]})}),(0,a.jsxs)("div",{className:"flex items-center mb-4 rounded-xl overflow-hidden border border-slate-200 bg-white shadow-sm",children:[(0,a.jsx)("button",{type:"button",disabled:!F,onClick:()=>w(e=>Math.max(0,e-1)),className:`flex items-center justify-center w-8 h-[52px] bg-slate-100 border-r border-slate-200 text-slate-600 hover:text-slate-800 hover:bg-slate-200 transition-all shrink-0 ${!F?"opacity-30":"cursor-pointer"}`,children:(0,a.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2.5,d:"M15 19l-7-7 7-7"})})}),(0,a.jsx)("div",{className:"flex flex-1",children:$.map((e,s)=>{let l=j+s;return(0,a.jsxs)("button",{type:"button",onClick:()=>(e=>{let s=N[e];if(!s||e===_)return;let a=s.dataValue||s.date;a&&(k(e),p(new Set),h(!0),window.history.replaceState(null,"",`${t}?date=${encodeURIComponent(a)}`),fetch(`/api/socolive/fixtures?date=${encodeURIComponent(a)}`,{cache:"no-store"}).then(e=>e.ok?e.json():null).then(e=>{e&&C((0,c.p_)(e).leagues||[])}).finally(()=>h(!1)))})(l),className:`flex-1 flex flex-col items-center justify-center h-[52px] border-b-[3px] transition-all duration-300 ${_===l?"border-[#4681E8] text-[#4681E8] bg-[#4681E8]/5":"border-transparent text-[#64748B] hover:text-[#94A3B8] hover:bg-slate-100"}`,children:[(0,a.jsx)("span",{className:`text-[11px] font-bold uppercase tracking-widest ${_===l?"text-[#4681E8]":""}`,children:e.label}),(0,a.jsx)("span",{className:`text-[12px] font-mono mt-0.5 ${_===l?"text-slate-800 font-black":""}`,children:e.date})]},`tab-${l}`)})}),(0,a.jsx)("button",{type:"button",disabled:!T,onClick:()=>w(e=>Math.min(L,e+1)),className:`flex items-center justify-center w-8 h-[52px] bg-slate-100 border-l border-slate-200 text-slate-600 hover:text-slate-800 hover:bg-slate-200 transition-all shrink-0 ${!T?"opacity-30":"cursor-pointer"}`,children:(0,a.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2.5,d:"M9 5l7 7-7 7"})})})]}),(0,a.jsxs)("div",{className:"relative mb-4",children:[(0,a.jsxs)("button",{onClick:()=>f(!b),className:"flex items-center gap-3 bg-white hover:bg-slate-50 px-4 py-2.5 rounded-xl border border-slate-200 shadow-sm transition-all text-sm group",children:[(0,a.jsx)("svg",{className:"w-5 h-5 text-[#E11D48] transition-colors group-hover:text-[#F43F5E]",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 6h16M4 12h16M4 18h16"})}),(0,a.jsx)("span",{className:"text-slate-700 font-bold text-[13px] uppercase tracking-wide",children:"Danh s\xe1ch giải đấu"}),(0,a.jsx)("svg",{className:`w-4 h-4 text-slate-500 transition-transform duration-300 ${b?"rotate-180":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),b&&(0,a.jsxs)("div",{className:"absolute top-full left-0 mt-2 w-[360px] bg-white border border-slate-200 rounded-2xl shadow-[0_24px_80px_rgba(0,0,0,0.12)] z-50 max-h-[320px] overflow-hidden flex flex-col",children:[(0,a.jsx)("div",{className:"p-2 border-b border-slate-100",children:(0,a.jsx)("input",{type:"text",placeholder:"T\xecm giải đấu...",value:u,onChange:e=>g(e.target.value),className:"w-full bg-slate-50 border border-transparent roun
271ded-xl px-4 py-2.5 text-sm text-slate-800 placeholder-slate-400 outline-none focus:border-[#4681E8]/50 transition-colors"})}),(0,a.jsx)("div",{className:"overflow-y-auto flex-1 py-2",children:E.map((e,t)=>(0,a.jsxs)("button",{type:"button",onClick:()=>{g(e.league_name),f(!1)},className:"w-full flex items-center gap-3 px-4 py-2.5 hover:bg-slate-50 text-left text-[13px] transition-colors",children:[e.league_icon?(0,a.jsx)("img",{src:e.league_icon,alt:e.league_name||"League",className:"w-5 h-5 object-contain shrink-0",loading:"lazy",decoding:"async"}):(0,a.jsx)("div",{className:"w-5 h-5 rounded-md bg-slate-200 shrink-0"}),(0,a.jsx)("span",{className:"text-slate-600 truncate flex-1 font-medium",children:e.league_name}),(0,a.jsx)("span",{className:"text-[11px] text-[#E11D48] font-bold shrink-0 px-2 py-0.5 bg-[#E11D48]/10 rounded-md border border-[#E11D48]/20",children:e.matches.length})]},t))})]})]}),(0,a.jsxs)("div",{className:"grid grid-cols-[1fr_60px_55px_100px_100px_90px] bg-slate-50 border border-slate-200 rounded-t-xl px-4 py-3 text-[11px] text-slate-500 font-black uppercase tracking-widest shadow-inner",children:[(0,a.jsx)("span",{children:"Trận đấu"}),(0,a.jsx)("span",{className:"text-center",children:"Tỷ số"}),(0,a.jsx)("span",{className:"text-center",children:"Hiệp 1"}),(0,a.jsx)("span",{className:"text-center",children:"Cược chấp"}),(0,a.jsx)("span",{className:"text-center",children:"T\xe0i/Xỉu"}),(0,a.jsx)("span",{className:"text-center",children:"1 X 2"})]}),(0,a.jsxs)("div",{className:"border border-slate-200 border-t-0 rounded-b-xl overflow-hidden relative shadow-[0_8px_30px_rgba(0,0,0,0.06)]",children:[s&&(0,a.jsx)("div",{className:"absolute inset-0 z-10 bg-white/80 backdrop-blur-[2px]",children:(0,a.jsx)("div",{className:"space-y-0",children:[...Array(6)].map((e,t)=>(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 px-4 py-3.5 bg-slate-100 border-b border-slate-200",children:[(0,a.jsx)("div",{className:"w-4 h-4 rounded bg-slate-300 animate-pulse"}),(0,a.jsx)("div",{className:"h-3.5 rounded bg-slate-200 animate-pulse",style:{width:`${120+30*t}px`}})]}),[void 0,void 0].map((e,t)=>(0,a.jsxs)("div",{className:"grid grid-cols-[1fr_60px_55px_100px_100px_90px] items-center px-4 py-3 border-b border-slate-100",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)("div",{className:"w-10 h-3.5 rounded bg-slate-200 animate-pulse"}),(0,a.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,a.jsx)("div",{className:"h-3 w-24 rounded bg-slate-100 animate-pulse"}),(0,a.jsx)("div",{className:"h-3 w-20 rounded bg-slate-100 animate-pulse"})]})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5",children:[(0,a.jsx)("div",{className:"h-3 w-5 rounded bg-slate-100 animate-pulse"}),(0,a.jsx)("div",{className:"h-3 w-5 rounded bg-slate-100 animate-pulse"})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5",children:[(0,a.jsx)("div",{className:"h-3 w-5 rounded bg-slate-100 animate-pulse"}),(0,a.jsx)("div",{className:"h-3 w-5 rounded bg-slate-100 animate-pulse"})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5",children:[(0,a.jsx)("div",{className:"h-3 w-14 rounded bg-slate-100 animate-pulse"}),(0,a.jsx)("div",{className:"h-3 w-10 rounded bg-slate-100 animate-pulse"})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5",children:[(0,a.jsx)("div",{className:"h-3 w-14 rounded bg-slate-100 animate-pulse"}),(0,a.jsx)("div",{className:"h-3 w-10 rounded bg-slate-100 animate-pulse"})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5",children:[(0,a.jsx)("div",{className:"h-3 w-10 rounded bg-slate-100 animate-pulse"}),(0,a.jsx)("div",{className:"h-3 w-10 rounded bg-slate-100 animate-pulse"}),(0,a.jsx)("div",{className:"h-3 w-10 rounded bg-slate-100 animate-pulse"})]})]},t))]},t))})}),0!==S.length||s?S.map((e,t)=>(0,a.jsxs)("div",{id:`league-${t}`,children:[(0,a.jsxs)("button",{onClick:()=>{p(e=>{let s=new Set(e);return s.has(t)?s.delete(t):s.add(t),s})},className:"w-full flex items-center gap-3 px-4 py-3 bg-slate-50 hover:bg-slate-100 border-b border-slate-100 transition-colors text-left group",children:[(0,a.jsx)("svg",{className:`w-4 h-4 text-[#E11D48] transition-transform duration-300 shrink-0 ${m.has(t)?"-rotate-90":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2.5,d:"M19 9l-7 7-7-7"})}),e.league_icon&&(0,a.jsx)("div",{className:"w-6 h-6 rounded-full bg-slate-100 p-0.5 border border-slate-200 flex items-center justify-center shadow-sm",children:(0,a.jsx)("img",{src:e.league_icon,alt:e.league_name||"League",className:"w-4 h-4 object-contain shrink-0",loading:"lazy",decoding:"async"})}),(0,a.jsx)("span",{className:"text-[13px] font-bold text-slate-700 flex-1 truncate uppercase tracking-widest",children:e.league_name}),(0,a.jsxs)("span",{className:"text-[11px] text-[#E11D48] font-bold shrink-0 ml-1 px-2 py-0.5 bg-[#E11D48]/10 rounded border border-[#
271E11D48]/20 group-hover:bg-[#E11D48]/20 transition-colors",children:["BXH ",(0,a.jsx)("svg",{className:"inline w-3 h-3 ml-0.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 6h16M4 10h16M4 14h16M4 18h16"})})]})]}),!m.has(t)&&e.matches.map((e,t)=>(0,a.jsxs)("div",{className:"grid grid-cols-[1fr_60px_55px_100px_100px_90px] items-center px-4 py-3 bg-transparent hover:bg-slate-50 border-b border-slate-100 last:border-0 transition-colors group cursor-default",children:[(0,a.jsxs)("div",{className:"flex items-center gap-4 min-w-0",children:[(0,a.jsx)("span",{className:"text-[#E11D48] font-mono text-[13px] font-black min-w-[42px] shrink-0 drop-shadow-[0_0_4px_rgba(225,29,72,0.4)]",children:e.time}),(0,a.jsxs)("div",{className:"flex flex-col gap-1 min-w-0 flex-1",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[e.home_logo&&(0,a.jsx)("img",{src:e.home_logo,alt:e.home_team||"Home team",className:"w-4 h-4 object-contain shrink-0 filter drop-shadow-[0_2px_2px_rgba(0,0,0,0.8)]",loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-[13px] text-slate-700 font-medium truncate group-hover:text-slate-900 transition-colors",children:e.home_team})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[e.away_logo&&(0,a.jsx)("img",{src:e.away_logo,alt:e.away_team||"Away team",className:"w-4 h-4 object-contain shrink-0",loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-[13px] text-slate-700 font-medium truncate group-hover:text-slate-900 transition-colors",children:e.away_team})]})]})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center",children:[(0,a.jsx)("span",{className:"text-[12px] text-[var(--accent-cyan)] font-mono font-bold",children:"-"!==e.score?e.score:"-"}),(0,a.jsx)("span",{className:"text-[12px] text-[#64748B]",children:"-"})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center",children:[(0,a.jsx)("span",{className:"text-[12px] text-[#64748B]",children:"-"}),(0,a.jsx)("span",{className:"text-[12px] text-[#64748B]",children:"-"})]}),(0,a.jsx)(x,{values:e.handicap,hasLine:!0}),(0,a.jsx)(x,{values:e.over_under,hasLine:!0}),(0,a.jsx)("div",{className:"flex flex-col items-center gap-0",children:e.one_x_two?.length>0?e.one_x_two.map((e,t)=>(0,a.jsx)("span",{className:"text-[11px] text-slate-500 leading-[18px]",children:e||"-"},t)):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"text-[11px] text-[#64748B] leading-[18px]",children:"-"}),(0,a.jsx)("span",{className:"text-[11px] text-[#64748B] leading-[18px]",children:"-"}),(0,a.jsx)("span",{className:"text-[11px] text-[#64748B] leading-[18px]",children:"-"})]})})]},t))]},t)):(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center py-20 gap-3 bg-slate-50",children:[(0,a.jsx)("svg",{className:"w-12 h-12 text-slate-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",strokeWidth:1.5,children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6.75 3v2.25M17.25 3v2.25M3 18.75V7.5a2.25 2.25 0 012.25-2.25h13.5A2.25 2.25 0 0121 7.5v11.25m-18 0A2.25 2.25 0 005.25 21h13.5A2.25 2.25 0 0021 18.75m-18 0v-7.5A2.25 2.25 0 015.25 9h13.5A2.25 2.25 0 0121 11.25v7.5"})}),(0,a.jsx)("span",{className:"text-slate-500 font-medium tracking-wide",children:"Kh\xf4ng c\xf3 trận đấu n\xe0o cho ng\xe0y n\xe0y"}),(0,a.jsx)("span",{className:"text-slate-400 text-[12px]",children:"H\xe3y thá»­ chọn một ng\xe0y kh\xe1c"})]})]}),(0,a.jsxs)("div",{className:"mt-6 text-center text-[11px] text-[#64748B] uppercase tracking-widest font-bold drop-shadow-sm",children:["Tổng cộng ",A," trận đấu trong ",S.length," giải"]}),(0,a.jsx)(i,{html:o})]}):(0,a.jsxs)("div",{className:"max-w-[1440px] mx-auto px-4 py-8",children:[(0,a.jsx)(n.f,{eyebrow:"Lịch thi đấu",title:"LỊCH THI ĐẤU"}),(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center py-16 gap-4",children:[(0,a.jsx)("div",{className:"w-12 h-12 rounded-full border-2 border-[#E11D48]/30 border-t-[#E11D48] animate-spin"}),(0,a.jsx)("span",{className:"text-slate-500 text-sm font-medium tracking-wide",children:"Đang tải lịch thi đấu..."})]})]})}function x({values:e,hasLine:t}){return e&&0!==e.length?t&&e.length>=3?(0,a.jsxs)("div",{className:"flex flex-col items-center gap-0",children:[(0,a.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,a.jsx)("span",{className:"text-[11px] text-[#E11D48] leading-[18px] font-bold",children:e[0]}),(0,a.jsx)("span",{className:"text-[11px] text-slate-500 leading-[18px]",children:e[1]})]}),(0,a.jsx)("span",{className:"text-[11px] text-slate-500 leading-[18px]",children:e[2]})]}):(0,a.jsx)("div",{className:"flex flex-col items-center gap-0",children:e.map((e,t)=>(0,a.jsx)("span",{className:"text-[11px] text-slate-500 leading-[18px]",children:e||"-"},t))}):(0,a.jsxs)("div",{className:"flex flex-col items-center",children:[(0,a.jsx)("span",{className:"text-[11px] text-[#64748B] leading-[18px]",children:"-"}),(0,a.jsx)("span",{className:"text-[11px] text-[#64748B] leading-[18px]",children:"-"})]})}},25619:(e,t,s)=>{"use strict";function a(e){let t=e?.fixtures_v2||null,s=e?.fixtures||e?.schedules||[],a=t?.date_tabs?.length?t.date_tabs:function(e=new Date){let t=["Chá»
271§ Nhật","Thứ Hai","Thứ Ba","Thứ Tư","Thứ Năm","Thứ S\xe1u","Thứ Bảy"],s=[];for(let a=0;a<14;a+=1){let l=new Date(e);l.setDate(l.getDate()+a);let r=String(l.getDate()).padStart(2,"0"),n=String(l.getMonth()+1).padStart(2,"0"),i=`${l.getFullYear()}-${l.getMonth()+1}-${l.getDate()}`;s.push({label:0===a?"H\xf4m Nay":t[l.getDay()],date:`${r}.${n}`,dataValue:i,active:0===a})}return s}(),l=e?.selected_date||a.find(e=>e.active)?.dataValue||a[0]?.dataValue||null;if(t?.leagues?.length)return{dateTabs:a,selectedDate:l,leagues:t.leagues,totalMatches:t.leagues.reduce((e,t)=>e+t.matches.length,0)};let r=[],n=new Set;return s.forEach(e=>{let t=e.data;if(!(t.length<3))for(let s=0;s+2<t.length;s+=16){let a=t[s]||"",l=t[s+1]||"",i=t[s+2]||"",o=`${a}-${l}-${i}`;if(!n.has(o)&&l&&(n.add(o),r.push({time:a,home_team:l,away_team:i,home_logo:e.team_logos?.[2*Math.floor(s/16)]||"",away_logo:e.team_logos?.[2*Math.floor(s/16)+1]||"",score:t[s+3]||"-",ht_score:t[s+4]||"",handicap:t.length>s+9?[t[s+7]||"",t[s+8]||"",t[s+9]||""]:[],over_under:t.length>s+12?[t[s+10]||"",t[s+11]||"",t[s+12]||""]:[],one_x_two:t.length>s+15?[t[s+13]||"",t[s+14]||"",t[s+15]||""]:[]}),s+16>=t.length))break}}),{dateTabs:a,selectedDate:l,leagues:r.length>0?[{league_name:"Tất cả trận đấu",league_icon:"",match_count:r.length,matches:r}]:[],totalMatches:r.length}}function l(e){let t=e?.results_v2||null,s=e?.results||[];if(t?.date_groups?.length)return{availableLeagues:t.available_leagues||[],dateGroups:t.date_groups,totalMatches:t.date_groups.reduce((e,t)=>e+t.matches.length,0)};let a=[];return s.forEach(e=>{let t=e.data;if(t.length<6)return;let s=t[0],l=s.split(" - "),r=[],n=1,i=0;for(;n<t.length;){if(t[n]?.startsWith("L\xfac")){let s=t[n].replace("L\xfac","").trim();r.push({time:s,home_team:t[n+1]||"",away_team:t[n+4]||"",home_logo:e.team_logos?.[i]||"",away_logo:e.team_logos?.[i+1]||"",score:t[n+2]||"",ht_score:(t[n+3]||"").replace("H1:","").replace("HT:","").trim()}),i+=2,n+=5;continue}n+=1}r.length>0&&a.push({date_header:l[0]?.trim()||s,league_round:l.slice(1).join(" - ").trim(),matches:r})}),{availableLeagues:[],dateGroups:a,totalMatches:a.reduce((e,t)=>e+t.matches.length,0)}}function r(e,t){if(!t)return e;let s=t.toLowerCase();return e.filter(e=>e.league_round.toLowerCase().includes(s))}s.d(t,{kK:()=>r,o8:()=>l,p_:()=>a})},26458:(e,t,s)=>{"use strict";s.d(t,{Klivevip14MatchDetailPage:()=>m});var a=s(68019),l=s(10707),r=s(58420);function n({src:e,poster:t,autoPlay:s=!0,onError:i,className:o=""}){let c=(0,l.useRef)(null),d=(0,l.useRef)(i);d.current=i;let[x,h]=(0,l.useState)(!1),[m,p]=(0,l.useState)(!1);return((0,l.useEffect)(()=>{let t=c.current;if(!t)return;let a=null;h(!1);let l=()=>p(!0),n=()=>p(!1);t.addEventListener("play",l),t.addEventListener("pause",n);let i=()=>{s&&(t.muted=!0,t.play().catch(()=>{}))};if(t.addEventListener("canplay",i),r.Ay.isSupported()){(a=new r.Ay({maxBufferLength:30,maxMaxBufferLength:60,lowLatencyMode:!0,enableWorker:!0})).loadSource(e),a.attachMedia(t),a.on(r.Ay.Events.MANIFEST_PARSED,()=>{s&&(t.muted=!0,t.play().catch(e=>{console.warn("AutoPlay failed:",e),t.muted=!1}))});let l=0,n=0;a.on(r.Ay.Events.ERROR,(e,t)=>{if(t.type===r.Ay.ErrorTypes.NETWORK_ERROR&&(++l>2||t.response&&t.response.code>=400)){console.error("HLS Network Error threshold reached (CORS/404), triggering fallback.",t),h(!0),d.current&&d.current(t),a?.destroy();return}if(t.fatal)switch(t.type){case r.Ay.ErrorTypes.NETWORK_ERROR:console.error("HLS Fatal Network Error, recovering...",t),a?.startLoad();break;case r.Ay.ErrorTypes.MEDIA_ERROR:console.error("HLS Media Error, recovering...",t),++n>3?(console.error("HLS Media Error threshold reached, triggering fallback."),h(!0),d.current&&d.current(t),a?.destroy()):a?.recoverMediaError();break;default:console.error("HLS Fatal Error:",t),h(!0),d.current&&d.current(t),a?.destroy()}})}else t.canPlayType("application/vnd.apple.mpegurl")&&(t.src=e,t.addEventListener("loadedmetadata",()=>{s&&t.play().catch(e=>{console.warn("AutoPlay failed:",e)})}),t.addEventListener("error",e=>{h(!0),d.current&&d.current(e)}));return()=>{t.removeEventListener("play",l),t.removeEventListener("pause",n),t.removeEventListener("canplay",i),a&&a.destroy()}},[e,s]),x)?i?null:(0,a.jsxs)("div",{className:`w-full h-full flex flex-col items-center justify-center bg-white/80 backdrop-blur ${o}`,children:[(0,a.jsx)("svg",{className:"w-12 h-12 text-red-500 mb-4 opacity-80",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"})}),(0,a.jsx)("div",{className:"text-slate-600 text-sm font-medium",children:"Video/Stream kh\xf4ng khả dụng hoặc bị lá
271»—i mạng"}),(0,a.jsx)("div",{className:"text-gray-500 text-xs mt-1",children:"Vui l\xf2ng thá»­ lại sau hoặc chọn nguồn kh\xe1c"})]}):(0,a.jsx)("div",{className:`relative group w-full h-full bg-white flex items-center justify-center overflow-hidden ${o}`,children:(0,a.jsx)("video",{ref:c,className:"w-full h-full object-contain",controls:!0,playsInline:!0,muted:s,poster:t,referrerPolicy:"no-referrer"})})}function i(e){let t=(e||"").split(/[\s-]+/).slice(0,2).map(e=>e[0]||"").join("").toUpperCase()||"??";return`data:image/svg+xml,${encodeURIComponent(`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 80 80"><rect width="80" height="80" rx="20" fill="#1a1c25"/><text x="40" y="47" font-size="20" font-family="Arial" font-weight="700" text-anchor="middle" fill="#666">${t}</text></svg>`)}`}function o({homeName:e,awayName:t,homeLogo:s,awayLogo:l,homeScore:r="0",awayScore:n="0",statusText:c="LIVE",timeText:d="",isLive:x=!0,sportId:h="1",matchId:m}){let p=s||i(e),u=l||i(t),g="5"===String(h),b="2"===String(h),f="bg-slate-200 border-slate-200",j="repeating-linear-gradient(90deg, transparent, transparent 10%, #000 10%, #000 20%)";return g?(f="bg-slate-100 border-slate-200",j="none"):b&&(f="bg-[#bc7a46] border-[#8a4e21]",j="repeating-linear-gradient(90deg, transparent, transparent 5%, #000 5%, #000 10%)"),(0,a.jsxs)("div",{className:"relative w-full aspect-video min-h-[300px] max-h-[600px] bg-slate-50 overflow-hidden flex flex-col justify-center",children:[(0,a.jsx)("div",{className:"absolute inset-0 flex items-center justify-center pointer-events-none mt-16 md:mt-24",children:(0,a.jsx)("div",{className:"relative w-[120%] h-[120%] sm:w-[90%] sm:h-[120%] max-w-[900px] flex-shrink-0 transition-transform duration-1000",style:{transform:"perspective(900px) rotateX(60deg) scale(0.9)",transformOrigin:"center center"},children:(0,a.jsxs)("div",{className:`absolute inset-0 ${f} shadow-[0_30px_60px_rgba(0,0,0,0.8)] border-4 rounded-xl overflow-hidden flex transition-colors duration-500`,children:[(0,a.jsx)("div",{className:"absolute inset-0 opacity-15 pointer-events-none",style:{backgroundImage:j}}),(0,a.jsxs)("div",{className:"absolute inset-[4%] pointer-events-none shadow-sm flex items-center justify-center",children:["1"===String(h)&&(0,a.jsxs)("div",{className:"absolute inset-0 w-full h-full border-2 border-white/60",children:[(0,a.jsx)("div",{className:"absolute left-1/2 top-0 bottom-0 w-0 border-l-2 border-white/60 -translate-x-1/2"}),(0,a.jsx)("div",{className:"absolute left-1/2 top-1/2 w-[18%] aspect-square rounded-full border-2 border-white/60 -translate-x-1/2 -translate-y-1/2"}),(0,a.jsx)("div",{className:"absolute left-1/2 top-1/2 w-2 h-2 rounded-full bg-white/80 -translate-x-1/2 -translate-y-1/2"}),(0,a.jsx)("div",{className:"absolute left-0 top-1/2 w-[16%] h-[46%] border-2 border-l-0 border-white/60 -translate-y-1/2 bg-slate-200"}),(0,a.jsx)("div",{className:"absolute left-0 top-1/2 w-[6%] h-[20%] border-2 border-l-0 border-white/60 -translate-y-1/2 bg-slate-200"}),(0,a.jsx)("div",{className:"absolute left-[16%] top-1/2 w-[8%] aspect-square border-2 border-l-0 border-white/60 rounded-r-full -translate-y-1/2 clip-path-half",style:{clipPath:"inset(0 0 0 50%)"}}),(0,a.jsx)("div",{className:"absolute right-0 top-1/2 w-[16%] h-[46%] border-2 border-r-0 border-white/60 -translate-y-1/2 bg-slate-200"}),(0,a.jsx)("div",{className:"absolute right-0 top-1/2 w-[6%] h-[20%] border-2 border-r-0 border-white/60 -translate-y-1/2 bg-slate-200"}),(0,a.jsx)("div",{className:"absolute right-[16%] top-1/2 w-[8%] aspect-square border-2 border-r-0 border-white/60 rounded-l-full -translate-y-1/2 clip-path-half",style:{clipPath:"inset(0 50% 0 0)"}})]}),g&&(0,a.jsxs)("div",{className:"absolute inset-[10%] w-[80%] h-[80%] border-2 border-white/80 bg-white",children:[(0,a.jsx)("div",{className:"absolute top-[10%] bottom-[10%] left-0 right-0 border-y-2 border-white/80"}),(0,a.jsx)("div",{className:"absolute left-1/2 top-[-2%] bottom-[-2%] w-1 bg-white/40 shadow-xl -translate-x-1/2 z-10"}),(0,a.jsx)("div",{className:"absolute left-[25%] right-[25%] top-[10%] bottom-[
27110%] border-x-2 border-white/80"}),(0,a.jsx)("div",{className:"absolute left-[25%] right-[25%] top-1/2 w-[50%] border-t-2 border-white/80 -translate-y-1/2"}),(0,a.jsx)("div",{className:"absolute left-0 top-1/2 w-[2%] border-t-2 border-white/80 -translate-y-1/2"}),(0,a.jsx)("div",{className:"absolute right-0 top-1/2 w-[2%] border-t-2 border-white/80 -translate-y-1/2"})]}),b&&(0,a.jsxs)("div",{className:"absolute inset-0 w-full h-full border-2 border-white/50",children:[(0,a.jsx)("div",{className:"absolute left-1/2 top-0 bottom-0 w-0 border-l-2 border-white/50 -translate-x-1/2"}),(0,a.jsx)("div",{className:"absolute left-1/2 top-1/2 w-[15%] aspect-square rounded-full border-2 border-white/50 -translate-x-1/2 -translate-y-1/2"}),(0,a.jsx)("div",{className:"absolute left-0 top-1/2 w-[18%] h-[35%] border-2 border-l-0 border-white/50 -translate-y-1/2 bg-[#bc7a46]"}),(0,a.jsx)("div",{className:"absolute left-[18%] top-1/2 w-[10%] aspect-square rounded-full border-2 border-white/50 -translate-y-1/2"}),(0,a.jsx)("div",{className:"absolute left-0 top-1/2 w-[30%] h-[70%] border-2 border-l-0 border-white/50 rounded-r-full -translate-y-1/2 opacity-60"}),(0,a.jsx)("div",{className:"absolute right-0 top-1/2 w-[18%] h-[35%] border-2 border-r-0 border-white/50 -translate-y-1/2 bg-[#bc7a46]"}),(0,a.jsx)("div",{className:"absolute right-0 top-1/2 w-[30%] h-[70%] border-2 border-r-0 border-white/50 rounded-l-full -translate-y-1/2 opacity-60"})]})]}),x&&(0,a.jsx)("div",{className:`absolute left-1/2 top-1/2 shadow-[0_8px_16px_rgba(0,0,0,0.8)] z-10 transition-all duration-[3000ms] border-2 border-white/20 rounded-full
272                                ${g?"w-2 h-2 sm:w-3 sm:h-3 bg-[#ccff00]":b?"w-4 h-4 sm:w-6 sm:h-6 bg-[#d95d16]":"w-4 h-4 sm:w-5 sm:h-5 bg-white"}`,style:{animation:"ballMove 8s infinite alternate ease-in-out",transform:"translate(-50%, -50%)"},children:(0,a.jsx)("div",{className:"absolute -bottom-4 left-1/2 w-4 h-2 bg-white/40 rounded-full blur-sm -translate-x-1/2"})}),x&&(0,a.jsxs)("div",{className:"absolute left-[65%] top-[60%] flex flex-col items-center animate-bounce-slow",style:{animation:"floatBubble 4s infinite alternate ease-in-out"},children:[(0,a.jsxs)("div",{className:"bg-white/95 backdrop-blur border border-white/10 rounded-2xl p-2 shadow-2xl flex items-center gap-3 w-max max-w-[200px]",children:[(0,a.jsx)("div",{className:"w-6 h-6 rounded-full flex items-center justify-center p-0.5 bg-white/5 shrink-0",children:(0,a.jsx)("img",{src:p,alt:e||"Home team",className:"max-w-full max-h-full object-contain",onError:t=>t.target.src=i(e),loading:"lazy",decoding:"async"})}),(0,a.jsx)("div",{className:"flex flex-col pr-1 overflow-hidden",children:(0,a.jsx)("span",{className:"text-slate-900 font-bold text-[10px] sm:text-xs tracking-wide truncate",children:g?"Serve / Return":"Tấn c\xf4ng nguy hiểm"})})]}),(0,a.jsx)("div",{className:"w-0 h-0 border-l-[6px] border-r-[6px] border-t-[6px] border-l-transparent border-r-transparent border-t-[#1a1c28]/95 mt-[-1px]"})]})]})})}),(0,a.jsx)("div",{className:"relative z-20 flex-1 flex flex-col items-center justify-start p-4 md:p-6 pointer-events-none w-full",children:(0,a.jsxs)("div",{className:"w-full max-w-[800px] flex items-center justify-between px-4 sm:px-6 py-3 rounded-xl bg-gradient-to-r from-[#0d0f14]/90 via-[#151821]/95 to-[#0d0f14]/90 backdrop-blur-xl border border-white/10 shadow-[0_10px_40px_rgba(0,0,0,0.8)] pointer-events-auto",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 flex-1 min-w-0 pr-2",children:[(0,a.jsx)("img",{src:p,alt:e,className:"w-8 h-8 md:w-12 md:h-12 object-contain drop-shadow-lg shrink-0",onError:t=>t.target.src=i(e),loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-slate-900 text-xs sm:text-sm md:text-base font-bold truncate tracking-wide",children:e})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1 shrink-0 px-2 sm:px-6 min-w-[100px]",children:[(0,a.jsxs)("span",{className:`inline-flex items-center gap-1.5 px-2.5 py-0.5 rounded-full text-[10px] sm:text-xs font-bold shadow-inner ${x?"bg-green-500/10 text-green-400 border border-green-500/20":"bg-white/5 text-slate-900/40"}`,children:[x&&(0,a.jsx)("span",{className:"w-1.5 h-1.5 rounded-full bg-green-500 animate-pulse shadow-[0_0_8px_#22c55e]"}),d||c]}),(0,a.jsxs)("div",{className:"flex gap-3 sm:gap-5 items-center justify-center",children:[(0,a.jsx)("span",{className:"text-slate-900 text-2xl sm:text-4xl font-black drop-shadow-md",children:r}),(0,a.jsx)("span",{className:"text-slate-900/30 text-xl font-light",children:"-"}),(0,a.jsx)("span",{className:"text-slate-900 text-2xl sm:text-4xl font-black drop-shadow-md",children:n})]})]}),(0,a.jsxs)("div",{className:"flex items-center justify-end gap-3 flex-1 min-w-0 pl-2 text-right",children:[(0,a.jsx)("span",{className:"text-slate-900 text-xs sm:text-sm md:text-base font-bold truncate tracking-wide",children:t}),(0,a.jsx)("img",{src:u,alt:t,className:"w-8 h-8 md:w-12 md:h-12 object-contain drop-shadow-lg shrink-0",onError:e=>e.target.src=i(t),loading:"lazy",decoding:"async"})]})]})}),(0,a.jsx)("div",{className:"relative z-20 mt-auto w-full p-4 flex justify-center pointer-events-none",children:(0,a.jsx)("div",{className:"w-full max-w-[600px] h-6 bg-white/40 backdrop-blur-md rounded-full border border-white/5 flex items-center px-4",children:(0,a.jsxs)("div",{className:"flex-1 h-0.5 bg-white/10 relative rounded-full",children:[x&&(0,a.jsx)("div",{className:"absolute left-0 top-0 bottom-0 bg-gradient-to-r from-[#b38b22] to-[#ffda6a] w-[65%] rounded-full opacity-90 shadow-[0_0_12px_#daa520]"}),(0,a.jsx)("span",{className:"absolute left-[65%] top-1/2 -translate-y-1/2 -translate-x-1/2 w-1.5 h-1.5 rounded-full bg-white shadow-md"})]})})}),(0,a.jsx)("style",{children:`
273                @keyframes ballMove {
274                    0% { transform: translate(-30%, -20%) scale(1); }
275                    25% { transform: translate(40%, -10%) scale(1.1); }
276                    50% { transform: translate(20%, 30%) scale(0.9); }
277                    75% { transform: translate(-10%, 15%) scale(1.2); }
278                    100% { transform: translate(-45%, 0%) scale(1); }
279                }
280                @keyframes floatBubble {
281                    0% { transform: translateY(0px) translateX(0px); }
282                    50% { transform: translateY(-8px) translateX(4px); }
283                    100% { transform: translateY(4px) translateX(-4px); }
284                }
285            `})]})}function c(e,t){if("1"===t||"2"===t)switch(e){case"2":return{t:"HT 1",live:!0,sc:!0};case"3":return{t:"Giữa giờ",live:!0,sc:!0};case"4":return{t:"HT 2",live:!0,sc:!0};case"5":return{t:"Hiệp phụ",live:!0,sc:!0};case"7":return{t:"Penalty",live:!0,sc:!0};case"8":case"9":return{t:"Kết th\xfac",live:!1,sc:!0};default:return{t:"Chưa bắt đầu",live:!1,sc:!1}}
285return["51","52","53","54","55"].includes(e)?{t:`Set ${e-50}`,live:!0,sc:!0}:["100","90","110"].includes(e)?{t:"KT",live:!1,sc:!0}:"0"===e||"1"===e?{t:"Chưa bắt đầu",live:!1,sc:!1}:{t:"LIVE",live:!0,sc:!0}}function d(e){let t=(e||"").split(/[\s-]+/).slice(0,2).map(e=>e[0]||"").join("").toUpperCase()||"??";return`data:image/svg+xml,${encodeURIComponent(`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 80 80"><rect width="80" height="80" rx="20" fill="#1a1c25"/><text x="40" y="47" font-size="20" font-family="Arial" font-weight="700" text-anchor="middle" fill="#666">${t}</text></svg>`)}`}function x(e){let t=new Date(1e3*parseInt(e||"0",10));return{hm:t.toLocaleTimeString("vi-VN",{hour:"2-digit",minute:"2-digit",timeZone:"Asia/Ho_Chi_Minh"}),dm:t.toLocaleDateString("vi-VN",{day:"2-digit",month:"2-digit",timeZone:"Asia/Ho_Chi_Minh"}),full:t.toLocaleDateString("vi-VN",{day:"2-digit",month:"2-digit",year:"numeric",timeZone:"Asia/Ho_Chi_Minh"})}}let h="max-w-[1200px]";function m({matchData:e,relatedMatches:t,matchDetails:s,standings:r,brandingNameUpper:i}){let p,u,g,j,v,y,[C,S]=(0,l.useState)("odds"),L=e?.match_data?.anchors||[],[$,F]=(0,l.useState)(!1),[T,A]=(0,l.useState)(!1),[M,H]=(0,l.useState)(null),[D,B]=(0,l.useState)(!1),z=(0,l.useRef)(0);(0,l.useEffect)(()=>{if(!e?.has_live||"1"!==e.has_live||0===L.length)return;let t=!1;B(!0);let s=async t=>{let s=t?.uid,a=`/api/socolive/proxy-stream?url=${encodeURIComponent(`https://live.inplyr.com/${s?`room/${s}`:`default/${e.id}`}.m3u8`)}`;try{let e=await fetch(a,{method:"GET",cache:"no-store"});if(!e.ok)return null;let s=(await e.text()).split("\n").filter(e=>e.trim()&&!e.startsWith("#"));if(0===s.length)return null;return(await fetch(s[0],{method:"HEAD",cache:"no-store"})).ok?t:null}catch{return null}};return Promise.all(L.map(e=>s(e))).then(e=>{if(t)return;let s=e.find(e=>null!==e);s?(H(s),F(!0),A(!1)):(H(L[0]),A(!0)),B(!1)}),()=>{t=!0}},[e?.has_live,L.length]),(0,l.useEffect)(()=>{if(!T||D||z.current>=20)return;let t=setTimeout(()=>{z.current++,A(!1),B(!0);let t=async t=>{let s=t?.uid,a=`/api/socolive/proxy-stream?url=${encodeURIComponent(`https://live.inplyr.com/${s?`room/${s}`:`default/${e.id}`}.m3u8`)}`;try{let e=await fetch(a,{method:"GET",cache:"no-store"});if(!e.ok)return null;let s=(await e.text()).split("\n").filter(e=>e.trim()&&!e.startsWith("#"));if(0===s.length)return null;return(await fetch(s[0],{method:"HEAD",cache:"no-store"})).ok?t:null}catch{return null}};Promise.all(L.map(e=>t(e))).then(e=>{let t=e.find(e=>null!==e);t?(H(t),F(!0),A(!1)):A(!0),B(!1)})},15e3);return()=>clearTimeout(t)},[T,D]);let[I,R]=(0,l.useState)(null),U=e?.post_name||e?.ls_id||e?.id;if(window.location.origin,(0,l.useEffect)(()=>{if(!U)return;let e=setInterval(async()=>{try{let e=await fetch(`/api/klivevip/match/${U}`,{cache:"no-store"});if(e.ok){let t=await e.json();R(t?.match??null)}}catch{}},1e4);return()=>clearInterval(e)},[U]),!e)return(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center py-32 gap-4",children:[(0,a.jsx)("span",{className:"text-[#64748B] text-lg",children:"Kh\xf4ng t\xecm thấy trận đấu"}),(0,a.jsx)("a",{href:"/",className:"text-[#4681E8] hover:underline text-sm",children:"← Quay lại"})]});let G=I?{...e,...I}:e,P=G?.has_live==="1"&&L.length>0,K=c(G.status_id,G.sport_id),V=$&&M&&!T&&!D,W=P&&(D||T&&K.live&&z.current<20),O=!P||T&&!W&&!D,q=!K.live&&"8"!==String(G.status_id)&&"9"!==String(G.status_id),{hm:X,full:Y}=x(G.time),Z=G.source_card_meta?.league_label||G.match_data?.competition_vi||G.match_data?.competition_full||"",Q=G.match_data?.stage_label||G.source_card_meta?.stage_label||"",J=G.home_logo||d(G.home_name),ee=G.away_logo||d(G.away_name),et=e=>t=>{t.target.src=d(e)};return(0,a.jsxs)("div",{className:"w-full bg-white min-h-screen text-slate-600 font-sans pb-16",children:[(0,a.jsx)("div",{className:"w-full border-b border-slate-200 bg-white",children:(0,a.jsxs)("div",{className:`${h} mx-auto px-4 py-3 flex items-center justify-between`,children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 text-[13px] font-bold",children:[(0,a.jsx)("span",{className:"text-[#4681E8] uppercase tracking-wide",children:Z}),Q&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"text-slate-300",children:"•"}),(0,a.jsx)("span",{className:"text-slate-600",children:Q})]})]}),(0,a.jsx)("div",{className:"text-[12px] font-mono text-slate-400 hidden sm:block",children:Y})]})}),(0,a.jsxs)("div",{className:`${h} mx-auto px-0 md:px-4 py-0 md:py-6 flex flex-col lg:flex-row gap-4 lg:gap-6`,children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0 flex flex-col gap-4 lg:gap-6",children:[(0,a.jsxs)("div",{className:"w-full relative bg-[#000000] rounded-none md:rounded-2xl overflow-hidden shadow-[0_10px_40px_rgba(0,0,0,0.5)] border-y md:border border-slate-200",children:[(0,a.jsx)("div",{className:"relative w-full aspect-video bg-[#000000] group z-10",children:V?(0,a.jsx)(n,{src:`/api/klivevip/proxy-stream?url=${encodeURIComponent(`https://live.inplyr.com/${M?.uid&&"default"!==M.uid?`room/${M.uid}`:`default/${G.id}`}.m3u8`)}`,autoPlay:!0,onError:()=>A(!0)}):O?(0,a.jsx)(o,{homeName:G.home_name,awayName:G.away_name,homeLogo:G.home_logo,awayLogo:G.away_logo,homeScore:K.sc?G.home_score:"0",awayScore:K.sc?G.away_score:"0",statusText:K.t,timeText:G.time_text||X,isLive:K.live,sportId:G.sport_id,matchId:G.ls_id||G.id,kickoffMs:1e3*Number(G?.time||0),isPreMatch:q}):(0,a.jsxs)("div",{className:"absolute inset-0 z-10 flex flex-col items-center justify-center p-4 lg:p-10",children:[(0,a.jsxs)("div",{className:"absolute inset-0 flex justify-between items-center opacity-[0.03] pointer-events-none px-4 lg:px-20 overflow-hidden",children:[(0,a.jsx)("img",{src:J,alt:"",className:"w-1/2 max-w-[400px] blur-[10px]",loading:"lazy",decoding:"async"}),(0,a.jsx)("img",{src:ee,alt:"",className:"w-1/2 max-w-[400px] blur-[10px]",loading:"lazy",decoding:"async"})]}),P&&!T&&(0,a.jsx)("button",{onClick:()=>F(!0),className:"group mb-4 sm:mb-8 w-16 h-16 md:w-20 md:h-20 rounded-full bg-[#4681E8] flex items-center justify-center hover:bg-[#55CAF1] transition-all shadow-[0_0_30px_rgba(70,129,232,0.5)] curs
285or-pointer z-20",children:(0,a.jsx)("svg",{className:"w-8 h-8 md:w-10 md:h-10 text-white ml-1.5 md:ml-2 group-hover:scale-110 transition-transform",viewBox:"0 0 24 24",fill:"currentColor",children:(0,a.jsx)("path",{d:"M8 5v14l11-7z"})})}),(0,a.jsxs)("div",{className:"grid grid-cols-[1fr_auto_1fr] items-center w-full max-w-[800px] gap-2 lg:gap-8 z-20",children:[(0,a.jsxs)("div",{className:"flex flex-col items-center gap-2 lg:gap-4",children:[(0,a.jsx)("img",{src:J,alt:G.home_name,className:"w-16 h-16 sm:w-24 sm:h-24 lg:w-32 lg:h-32 object-contain drop-shadow-[0_10px_20px_rgba(0,0,0,0.8)]",onError:et(G.home_name),loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-[#FFFFFF] text-xs sm:text-base lg:text-lg font-black text-center line-clamp-2 uppercase tracking-wide",children:G.home_name})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-2 lg:gap-3",children:[K.sc?(0,a.jsxs)("div",{className:"flex items-center gap-3 lg:gap-6 bg-white/90 backdrop-blur-md px-4 py-2 lg:px-8 lg:py-4 rounded-2xl border border-slate-200 shadow-2xl",children:[(0,a.jsx)("span",{className:"text-[#4681E8] text-[32px] sm:text-[48px] lg:text-[64px] font-black leading-none",children:G.home_score}),(0,a.jsx)("span",{className:"text-slate-300 text-[20px] lg:text-[28px] font-light",children:":"}),(0,a.jsx)("span",{className:"text-[#4681E8] text-[32px] sm:text-[48px] lg:text-[64px] font-black leading-none",children:G.away_score})]}):(0,a.jsx)("div",{className:"text-[#FFFFFF] text-[32px] sm:text-[48px] lg:text-[56px] font-black tracking-widest leading-none drop-shadow-xl",children:X}),(0,a.jsxs)("span",{className:`inline-flex items-center gap-2 rounded-full px-3 py-1 lg:px-5 lg:py-1.5 text-[10px] lg:text-[12px] font-bold tracking-widest uppercase ${K.live?"bg-[#4681E8] text-white shadow-[0_0_20px_rgba(70,129,232,0.6)]":"bg-white text-slate-600 border border-slate-200"}`,children:[K.live&&(0,a.jsx)("span",{className:"w-2 h-2 rounded-full bg-white animate-pulse"}),K.t,G.time_text?` : ${G.time_text}`:""]})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-2 lg:gap-4",children:[(0,a.jsx)("img",{src:ee,alt:G.away_name,className:"w-16 h-16 sm:w-24 sm:h-24 lg:w-32 lg:h-32 object-contain drop-shadow-[0_10px_20px_rgba(0,0,0,0.8)]",onError:et(G.away_name),loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-[#FFFFFF] text-xs sm:text-base lg:text-lg font-black text-center line-clamp-2 uppercase tracking-wide",children:G.away_name})]})]})]})}),L.length>0&&(0,a.jsxs)("div",{className:"w-full bg-white border-t border-slate-200 px-3 lg:px-6 py-2.5 lg:py-4 flex items-center gap-2 lg:gap-4 overflow-x-auto z-20",children:[(0,a.jsx)("span",{className:"text-[10px] lg:text-[11px] text-slate-600 uppercase font-bold tracking-widest shrink-0 mr-1 lg:mr-2",children:"CHỌN K\xcaNH TRUYỀN:"}),L.map((e,t)=>(0,a.jsxs)("button",{onClick:()=>{H(e),F(!0),A(!1)},className:`shrink-0 flex items-center gap-1.5 lg:gap-2 rounded-full px-3 py-1.5 lg:px-5 lg:py-2 text-[11px] lg:text-[13px] font-bold transition-all ${M?.uid===e.uid&&!T?"bg-[#4681E8]/10 border border-[#4681E8] text-[#4681E8] shadow-[0_0_15px_rgba(70,129,232,0.2)]":"bg-white border border-slate-200 text-slate-600 hover:text-[#4681E8] hover:border-[#4681E8]/50"}`,children:[(0,a.jsx)("span",{className:`w-1.5 h-1.5 lg:w-2 lg:h-2 rounded-full ${M?.uid===e.uid&&!T?"bg-[#4681E8] animate-pulse":"bg-transparent"}`}),"BLV ",e.nickName||`K\xeanh ${t+1}`]},e.uid||t))]})]}),(p=(()=>{let e=s?.stats;if(!e)return!1;let t=null;return Array.isArray(e)&&e.length>0?t=e[0]:e?.results?.[0]?t=e.results[0]:e?.stats_full_time&&(t=e),!!t&&!!(t.stats_full_time?.length>0||t.stats_haft_time?.length>0||t.stats_half_time?.length>0||t.stats?.length>0)})(),u=!!(s?.lineup&&(Array.isArray(s.lineup)?s.lineup.length>0:s.lineup.home||s.lineup.away)),g=!!(s?.events&&(Array.isArray(s.events)?s.events.length>0:s.events.incidents?.length>0||s.events.data?.length>0)),j=!!(r&&(Array.isArray(r)?r.length>0:r.data?.length>0)),(y=(v=[{id:"stats",label:"THỐNG K\xca",show:p},{id:"lineup",label:"ĐỘI H\xccNH",show:u},{id:"events",label:"DIỄN BIẾN",show:g},{id:"standings",label:"BẢNG XH",show:j},{id:"odds",label:"TỶ LỆ K\xc8O",show:!!(s?.odds&&Array.isArray(s.odds)&&s.odds.length>0)}].filter(e=>e.show)).find(e=>e.id===C)?C:v[0]?.id||"odds")!==C&&setTimeout(()=>S(y),0),v.length>0?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"bg-white rounded-2xl p-2 border border-slate-200 flex overflow-x-auto gap-2 shadow-[0_4px_15px_rgba(0,0,0,0.08)] mx-4 md:mx-0",children:v.map(({id:e,label:t})=>(0,a.jsx)("button",{onClick:()=>S(e),className:`flex-1 min-w-[100px] py-2.5 sm:py-3 text-[10px] sm:text-[12px] font-black uppercase tracking-widest rounded-xl transition-all ${y===e?"bg-[#4681E8]/10 text-[#4681E8] border border-[#4681E8]/30 shadow-inner":"text-slate-500 hover:text-[#4681E8] hover:bg-[#4681E8]/5 border border-transparent"}`,children:t},e))}),(0,a.jsxs)("div",{className:"bg-white rounded-2xl border border-slate-200 overflow-hidden shadow-[0_4px_15px_rgba(0,0,0,0.08)] min-h-[400px] mx-4 md:mx-0",children:["stats"===y&&(0,a.jsx)(b,{matchDetails:s}),"lineup"===y&&(0,a.jsx)(f,{matchDetails:s}),"events"===y&&(0,a.jsx)(_,{events:s?.events}),"standings"===y&&(0,a.jsx)(k,{standings:r}),"odds"===y&&(0,a.jsx)(E,{odds:s?.odds})]})]}):null),t.length>0&&(0,a.jsxs)("div",{className:"mt-4 mx-4 md:mx-0",children:[(0,a.jsxs)("h2",{className:"px-1 py-4 text-sm sm:text-base font-black text-slate-800 uppercase flex items-center gap-3 tracking-widest border-b border-slate-100 mb-4",children:[(0,a.jsx)("span",{className:"w-1 h-5 bg-[#4681E8] rounded-sm shadow-[0_0_8px_#4681E8]"}),"TRẬN ĐẤU C\xd9NG GIẢI"]}),(0,a.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3 sm:gap-4",children:t.slice(0,4).map(e=>(0,a.jsx)(w,{m:e},e.id))})]})]}),(0,a.jsx)("div",{className:"w-full lg:w-[350px] xl:w-[400px] shrink-0 px-4 md:px-0",children:(0,a.jsxs)("div",{className:"bg-white border border-slate-200 rounded-2xl overflow-hidden flex flex-col shadow-[0_10px_30px_rgba(0,0,0,0.1)] lg:sticky lg:top-8 h-[600px] lg:h-[c
285alc(100vh-100px)] lg:max-h-[850px]",children:[(0,a.jsxs)("div",{className:"px-5 py-4 border-b border-slate-200 flex items-center justify-between bg-white",children:[(0,a.jsxs)("h3",{className:"text-slate-800 text-sm font-black uppercase tracking-widest flex items-center gap-2",children:[(0,a.jsx)("span",{className:"w-2.5 h-2.5 rounded-full bg-[#4681E8] shadow-[0_0_10px_rgba(70,129,232,0.4)]"}),"PH\xd2NG CHAT"]}),(0,a.jsxs)("span",{className:"text-[10px] bg-white px-3 py-1.5 rounded-full text-[#4681E8] font-mono border border-[#4681E8]/30 shadow-inner tracking-widest flex items-center gap-1.5",children:[(0,a.jsx)("svg",{className:"w-3 h-3",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 10l4.553-2.276A1 1 0 0121 8.618v6.764a1 1 0 01-1.447.894L15 14M5 18h8a2 2 0 002-2V8a2 2 0 00-2-2H5a2 2 0 00-2 2v8a2 2 0 002 2z"})}),L.length," BLV"]})]}),(0,a.jsx)("div",{className:"flex-1 bg-[#FFFFFF]/40 min-h-0 chat-container-wrapper",children:(0,a.jsx)(N,{anchors:L,selectedAnchor:M})})]})})]})]})}let p={25:"KIỂM SO\xc1T B\xd3NG",24:"CHUYỀN CH\xcdNH X\xc1C",23:"TỔNG SỐ ĐƯỜNG CHUYỀN",22:"TẤN C\xd4NG",21:"T.C\xd4NG NGUY HIỂM",2:"S\xdaT TR\xdaNG Đ\xcdCH",37:"PHẠT G\xd3C",28:"N\xc9M BI\xcaN",8:"VIỆT VỊ",3:"THẺ V\xc0NG",4:"THẺ ĐỎ",5:"S\xdaT PENALTY",29:"PHẠM LỖI",26:"Đ\xc1NH ĐẦU",27:"CỨU THUA",1:"B\xc0N THẮNG",7:"PHẢN LƯỚI"},u=[25,21,22,24,2,23,4,3,37,28,8,5,29],g="https://cdn.sportdb.live/upload/team/";function b({matchDetails:e}){let[t,s]=(0,l.useState)("full"),r=e?.stats,n=e?.lineup,i=n?.match?.home_team,o=n?.match?.away_team,c=null;Array.isArray(r)&&r.length>0?c=r[0]:r?.results?.[0]?c=r.results[0]:r?.stats_full_time&&(c=r);let d={full:c?.stats_full_time||[],h1:c?.stats_haft_time||c?.stats_half_time||[],h2:c?.stats_haft_time_2nd_half||[]}[t]||[];if(!c||0===d.length)return(0,a.jsx)(j,{text:"Thống k\xea sẽ được cập nhật khi trận đấu bắt đầu"});let x=[...d].sort((e,t)=>{let s=u.indexOf(e.type),a=u.indexOf(t.type);return(-1===s?999:s)-(-1===a?999:a)});return(0,a.jsxs)("div",{className:"flex flex-col",children:[(i||o)&&(0,a.jsxs)("div",{className:"flex items-center justify-between px-4 py-3 border-b border-slate-100",children:[(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5 w-20",children:[i?.logo&&(0,a.jsx)("img",{src:g+i.logo,alt:i?.name||"Home team",className:"w-8 h-8 object-contain",onError:e=>e.target.style.display="none",loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-slate-600 text-[10px] font-medium text-center leading-tight",children:i?.name||""})]}),(0,a.jsx)("div",{className:"flex gap-1",children:[{k:"h1",l:"Hiệp 1"},{k:"h2",l:"Hiệp 2"},{k:"full",l:"Cả trận"}].map(({k:e,l})=>(0,a.jsx)("button",{onClick:()=>s(e),className:`px-2.5 py-1 text-[10px] font-bold rounded transition-all ${t===e?"bg-[#E11D48] text-white":"text-slate-400 hover:text-slate-600 bg-slate-100"}`,children:l},e))}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5 w-20",children:[o?.logo&&(0,a.jsx)("img",{src:g+o.logo,alt:o?.name||"Away team",className:"w-8 h-8 object-contain",onError:e=>e.target.style.display="none",loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-slate-600 text-[10px] font-medium text-center leading-tight",children:o?.name||""})]})]}),(0,a.jsx)("div",{className:"px-4 py-3 space-y-3",children:x.map(e=>{let t=p[e.type]||`Stat ${e.type}`,s=e.home,l=e.away,r=24===e.type||25===e.type,n=s+l,i=0===n?50:s/n*100,o=s>l,c=l>s;return(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"flex justify-between items-center mb-1.5",children:[(0,a.jsxs)("span",{className:`text-xs font-bold w-10 tabular-nums ${o?"text-slate-800":"text-slate-400"}`,children:[s,r?"%":""]}),(0,a.jsx)("span",{className:"text-slate-400 text-[10px] font-semibold tracking-wide uppercase",children:t}),(0,a.jsxs)("span",{className:`text-xs font-bold w-10 text-right tabular-nums ${c?"text-slate-800":"text-slate-400"}`,children:[l,r?"%":""]})]}),(0,a.jsxs)("div",{className:"flex gap-0.5 h-[5px]",children:[(0,a.jsx)("div",{className:"flex-1 rounded-l-full bg-white/[0.06] overflow-hidden flex justify-end",children:(0,a.jsx)("div",{className:`rounded-l-full transition-all duration-500 ${o?"bg-gradient-to-r from-[#E11D48]/60 to-[#E11D48]":"bg-gradient-to-r from-white/10 to-white/20"}`,style:{width:`${i}%`}})}),(0,a.jsx)("div",{className:"flex-1 rounded-r-full bg-white/[0.06] overflow-hidden",children:(0,a.jsx)("div",{className:`rounded-r-full transition-all duration-500 ${c?"bg-gradient-to-l from-[#E11D48]/60 to-[#E11D48]":"bg-gradient-to-l from-white/10 to-white/20"}`,style:{width:`${100-i}%`}})})]})]},e.type)})})]})}
285function f({matchDetails:e}){let[t,s]=(0,l.useState)("pitch"),r=e?.lineup,n=r?.lineup||r,i=n?.home||[],o=n?.away||[],c=r?.home_formation||"",d=r?.away_formation||"",x=r?.match?.home_team,h=r?.match?.away_team;if(0===i.length&&0===o.length)return(0,a.jsx)(j,{text:"Đội h\xecnh sẽ được c\xf4ng bố trước trận đấu 30 ph\xfat"});let m=e=>e.filter(e=>1===e.first),p=e=>e.filter(e=>1!==e.first),u=m(i),g=m(o),b=p(i),w=p(o);return(0,a.jsxs)("div",{className:"flex flex-col",children:[(0,a.jsxs)("div",{className:"flex items-center justify-center gap-1 px-3 py-2 border-b border-slate-100",children:[(0,a.jsx)("button",{onClick:()=>s("pitch"),className:`px-3 py-1.5 text-[10px] font-bold rounded transition-all ${"pitch"===t?"bg-[#E11D48] text-white":"text-slate-400 bg-slate-100"}`,children:"Đội h\xecnh xuất ph\xe1t"}),(0,a.jsx)("button",{onClick:()=>s("list"),className:`px-3 py-1.5 text-[10px] font-bold rounded transition-all ${"list"===t?"bg-[#E11D48] text-white":"text-slate-400 bg-slate-100"}`,children:"Đội h\xecnh dá»± bị"})]}),"pitch"===t?(0,a.jsx)("div",{className:"relative w-full",style:{aspectRatio:"68/105"},children:(0,a.jsxs)("div",{className:"absolute inset-0 bg-gradient-to-b from-[#1a5c2a] via-[#1e6b31] to-[#1a5c2a] rounded-2xl overflow-hidden",children:[(0,a.jsxs)("div",{className:"absolute inset-[3%] border border-white/20 rounded-lg",children:[(0,a.jsx)("div",{className:"absolute left-0 right-0 top-1/2 h-px bg-white/20"}),(0,a.jsx)("div",{className:"absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 w-[22%] aspect-square rounded-full border border-white/20"}),(0,a.jsx)("div",{className:"absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 w-1.5 h-1.5 bg-white/30 rounded-full"}),(0,a.jsx)("div",{className:"absolute top-0 left-1/2 -translate-x-1/2 w-[55%] h-[16%] border-l border-r border-white/20"}),(0,a.jsx)("div",{className:"absolute top-0 left-1/2 -translate-x-1/2 w-[25%] h-[6%] border-l border-r border-white/20"}),(0,a.jsx)("div",{className:"absolute bottom-0 left-1/2 -translate-x-1/2 w-[55%] h-[16%] border-t border-l border-r border-white/20"}),(0,a.jsx)("div",{className:"absolute bottom-0 left-1/2 -translate-x-1/2 w-[25%] h-[6%] border-t border-l border-r border-white/20"})]}),(0,a.jsx)("div",{className:"absolute top-1 left-2 text-[9px] text-[#F8FAFC]/50 font-bold z-10",children:x?.name||""}),(0,a.jsx)("div",{className:"absolute top-1 right-2 text-[9px] text-[#E11D48]/70 font-bold z-10",children:c}),(0,a.jsx)("div",{className:"absolute bottom-1 left-2 text-[9px] text-[#F8FAFC]/50 font-bold z-10",children:h?.name||""}),(0,a.jsx)("div",{className:"absolute bottom-1 right-2 text-[9px] text-[#E11D48]/70 font-bold z-10",children:d}),u.map((e,t)=>{let s=`${e.x||50}%`,l=`${(e.y||10)/2}%`,r="G"===e.position;return(0,a.jsxs)("div",{className:"absolute flex flex-col items-center z-10 -translate-x-1/2 -translate-y-1/2",style:{left:s,top:l},children:[(0,a.jsx)("div",{className:`w-6 h-6 rounded-full flex items-center justify-center text-[9px] font-black ${r?"bg-yellow-400 text-black":"bg-blue-600 text-[#F8FAFC]"} shadow-md border border-white/20`,children:e.shirt_number||""}),(0,a.jsx)("span",{className:"text-[7px] text-[#F8FAFC] font-semibold mt-0.5 text-center max-w-[48px] truncate drop-shadow-[0_1px_2px_rgba(0,0,0,0.8)]",children:(e.name||"").split(" ").slice(-2).join(" ")}),1===e.captain&&(0,a.jsx)("span",{className:"absolute -top-1 -right-1 text-[6px] text-yellow-400",children:"C"})]},`h-${t}`)}),g.map((e,t)=>{let s=`${100-(e.x||50)}%`,l=`${100-(e.y||10)/2}%`,r="G"===e.position;return(0,a.jsxs)("div",{className:"absolute flex flex-col items-center z-10 -translate-x-1/2 -translate-y-1/2",style:{left:s,top:l},children:[(0,a.jsx)("div",{className:`w-6 h-6 rounded-full flex items-center justify-center text-[9px] font-black ${r?"bg-yellow-400 text-black":"bg-orange-500 text-[#F8FAFC]"} shadow-md border border-white/20`,children:e.shirt_number||""}),(0,a.jsx)("span",{className:"text-[7px] text-[#F8FAFC] font-semibold mt-0.5 text-center max-w-[48px] truncate drop-shadow-[0_1px_2px_rgba(0,0,0,0.8)]",children:(e.name||"").split(" ").slice(-2).join(" ")}),1===e.captain&&(0,a.jsx)("span",{className:"absolute -top-1 -right-1 text-[6px] text-yellow-400",children:"C"})]},`a-${t}`)})]})}):(0,a.jsxs)("div",{className:"px-3 py-2 text-xs",children:[(0,a.jsxs)("div",{className:"flex justify-between font-bold text-slate-400 mb-1 uppercase tracking-wider text-[9px] px-1",children:[(0,a.jsx)("span",{children:"Đội chá»
285§ nh\xe0"}),(0,a.jsx)("span",{children:"Đội kh\xe1ch"})]}),Array.from({length:Math.max(b.length,w.length)}).map((e,t)=>{let s=b[t],l=w[t];return(0,a.jsxs)("div",{className:"flex justify-between items-center border-b border-slate-50 py-1.5",children:[(0,a.jsx)("div",{className:"flex items-center gap-1.5 w-1/2 min-w-0",children:s&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"text-[#E11D48] font-bold w-5 text-center shrink-0 text-[10px]",children:s.shirt_number||""}),(0,a.jsx)("span",{className:"text-slate-700 truncate text-[11px]",children:s.name||""})]})}),(0,a.jsx)("div",{className:"flex items-center gap-1.5 w-1/2 justify-end min-w-0",children:l&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"text-slate-700 truncate text-[11px] text-right",children:l.name||""}),(0,a.jsx)("span",{className:"text-[#E11D48] font-bold w-5 text-center shrink-0 text-[10px]",children:l.shirt_number||""})]})})]},t)})]})]})}function j({text:e}){return(0,a.jsx)("div",{className:"flex items-center justify-center py-10 text-slate-400 text-sm text-center",children:e})}function w({m:e}){let t=c(e.status_id,e.sport_id),{hm:s,dm:l}=x(e.time),r=e.source_card_meta?.league_label||e.match_data?.competition_vi||"";return(0,a.jsxs)("a",{href:`/match/${encodeURIComponent(e.post_name||e.id)}`,className:"flex items-center gap-3 rounded-2xl bg-white hover:bg-slate-50 border border-slate-100 hover:border-[#4681E8]/30 p-3 transition-all group",children:[(0,a.jsxs)("div",{className:"shrink-0 w-14 text-center",children:[(0,a.jsx)("div",{className:"text-[#E11D48] text-[11px] font-bold",children:s}),(0,a.jsx)("div",{className:"text-slate-400 text-[9px]",children:l})]}),(0,a.jsx)("div",{className:"w-px h-9 bg-slate-200 shrink-0"}),(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("div",{className:"text-slate-400 text-[9px] truncate mb-1",children:r}),(0,a.jsxs)("div",{className:"flex items-center gap-2 mb-0.5",children:[(0,a.jsx)("img",{src:e.home_logo||d(e.home_name),alt:e.home_name,className:"w-4 h-4 object-contain shrink-0",onError:t=>t.target.src=d(e.home_name),loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-slate-600 text-[12px] font-medium truncate",children:e.home_name})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("img",{src:e.away_logo||d(e.away_name),alt:e.away_name,className:"w-4 h-4 object-contain shrink-0",onError:t=>t.target.src=d(e.away_name),loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-slate-600 text-[12px] font-medium truncate",children:e.away_name})]})]}),t.sc?(0,a.jsxs)("span",{className:"text-slate-800 font-bold text-[14px] tabular-nums shrink-0",children:[e.home_score,"-",e.away_score]}):(0,a.jsx)("span",{className:"text-[10px] font-bold text-[#E11D48] bg-[#E11D48]/10 rounded px-2.5 py-1 group-hover:bg-[#E11D48]/15 transition shrink-0",children:"XEM NGAY"})]})}let v={0:{bg:"bg-white/10",text:"text-[#F8FAFC]/40",nameCls:"text-[#94A3B8]"},1:{bg:"bg-white/10",text:"text-[#F8FAFC]/50",nameCls:"text-[#94A3B8]"},2:{bg:"bg-green-900/50",text:"text-green-400",nameCls:"text-green-400"},3:{bg:"bg-yellow-900/40",text:"text-yellow-400",nameCls:"text-emerald-600 font-bold"},4:{bg:"bg-blue-900/40",text:"text-blue-400",nameCls:"text-blue-400 font-bold"},5:{bg:"bg-red-900/40",text:"text-red-400",nameCls:"text-red-400 font-bold"}};function N({anchors:e,selectedAnchor:t}){let[s,r]=(0,l.useState)([]),[n,i]=(0,l.useState)(!1),o=(0,l.useRef)(null),c=(0,l.useRef)(null),d=t?.roomNum;return(0,l.useEffect)(()=>{if(!d)return;r([]),i(!1);let e=new EventSource(`/api/chat/${d}`);return e.onopen=()=>i(!0),e.onmessage=e=>{try{let t=JSON.parse(e.data);if("connected"===t.type)return void i(!0);if("history"===t.type&&Array.isArray(t.messages))return void r(e=>[...t.messages,...e].slice(-200));t.user&&t.text&&r(e=>[...e,t].slice(-200))}catch{}},e.onerror=()=>i(!1),()=>{e.close(),i(!1)}},[d]),(0,l.useEffect)(()=>{requestAnimationFrame(()=>{let e=c.current;e&&(e.scrollTop=e.scrollHeight)})},[s.length]),(0,a.jsxs)("div",{className:"flex flex-col h-full bg-[#0F0F23]",children:[(0,a.jsxs)("div",{ref:c,className:"flex-1 min-h-0 px-3 py-2 flex flex-col gap-[3px] overflow-y-auto",style:{scrollbarWidth:"thin",scrollbarColor:"#444 transparent"},children:[(0,a.jsx)("div",{className:"text-center text-[10px] text-[#F8FAFC]/30 bg-slate-50/60 py-1.5 rounded-xl mb-1 sticky top-0 z-10 backdrop-blur-sm",children:n?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"inline-block h-1.5 w-1.5 rounded-full bg-green-400 animate-pulse mr-1"}),"Đang kết nối ph\xf2ng chat trá»±c tiếp"]}):d?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"inline-block h-1.5 w-1.5 rounded-full bg-yellow-400 animate-pulse mr-1"}),"Đang kết nối..."]}
285):"Ch\xe0o mừng bạn đến với ph\xf2ng chat"}),0===s.length&&n&&(0,a.jsx)("div",{className:"text-center text-[10px] text-[#F8FAFC]/20 py-4",children:"Chờ tin nhắn mới..."}),s.map((e,t)=>{var s;let l=(s=e.level)>=5?v[5]:v[s]||v[0];return 2===e.type||e.text?.includes("v\xe0o ph\xf2ng tr\xf2 chuyện")?(0,a.jsxs)("div",{className:"flex items-start gap-1.5 text-[11px] leading-relaxed py-[1px] opacity-60",children:[(0,a.jsx)("span",{className:"text-green-500/70 font-medium",children:"Hi"}),(0,a.jsxs)("span",{className:`shrink-0 inline-flex items-center px-1 py-[0.5px] rounded text-[8px] font-bold ${l.bg} ${l.text}`,children:["Lv",e.level]}),(0,a.jsxs)("span",{className:`font-bold ${l.nameCls}`,children:[e.user,":"]}),(0,a.jsx)("span",{className:"text-[#F8FAFC]/40",children:e.text})]},`${e.ts}-${t}`):(0,a.jsxs)("div",{className:"flex items-start gap-1.5 text-[11px] leading-relaxed py-[1px]",children:[(0,a.jsxs)("span",{className:`shrink-0 inline-flex items-center px-1 py-[0.5px] rounded text-[8px] font-bold ${l.bg} ${l.text}`,children:["Lv.",e.level]}),(0,a.jsxs)("span",{className:`font-bold shrink-0 ${l.nameCls}`,children:[e.user,":"]}),(0,a.jsx)("span",{className:"text-[#F8FAFC]/80 break-words min-w-0",children:e.text})]},`${e.ts}-${t}`)}),(0,a.jsx)("div",{ref:o})]}),(0,a.jsxs)("div",{className:"shrink-0 px-3 py-2 bg-[#0F0F23] border-t border-white/[0.04] space-y-2",children:[(0,a.jsx)("div",{className:"flex items-center justify-center gap-3 text-[#F8FAFC]/20 text-[10px]",children:(0,a.jsx)("span",{className:"flex items-center gap-1",children:(0,a.jsx)("svg",{className:"w-3 h-3",viewBox:"0 0 24 24",fill:"currentColor",children:(0,a.jsx)("path",{d:"M12 4.5C7 4.5 2.7 7.6 1 12c1.7 4.4 6 7.5 11 7.5s9.3-3.1 11-7.5c-1.7-4.4-6-7.5-11-7.5zm0 12.5c-2.8 0-5-2.2-5-5s2.2-5 5-5 5 2.2 5 5-2.2 5-5 5zm0-8c-1.7 0-3 1.3-3 3s1.3 3 3 3 3-1.3 3-3-1.3-3-3-3z"})})})}),(0,a.jsxs)("div",{className:"flex bg-[#0F0F23] rounded-2xl overflow-hidden border border-white/[0.08]",children:[(0,a.jsx)("input",{type:"text",placeholder:"Đăng nhập để c\xf9ng chat nh\xe9",disabled:!0,className:"flex-1 bg-transparent px-3 py-2 text-[11px] text-[#F8FAFC] outline-none placeholder:text-[#F8FAFC]/30 disabled:opacity-50"}),(0,a.jsx)("button",{disabled:!0,className:"px-4 text-[11px] font-bold bg-[#E11D48] text-black disabled:bg-white/10 disabled:text-[#F8FAFC]/20 transition-colors",children:"Gửi"})]})]})]})}let y={1:{icon:"⚽",label:"B\xe0n thắng",color:"text-green-400"},2:{icon:"\uD83C\uDD7F️",label:"Phạt đền",color:"text-green-400"},3:{icon:"\uD83D\uDFE1",label:"Thẻ v\xe0ng",color:"text-yellow-400"},4:{icon:"\uD83D\uDFE1\uD83D\uDFE1",label:"Thẻ v\xe0ng 2",color:"text-emerald-600"},5:{icon:"\uD83D\uDD34",label:"Thẻ đỏ",color:"text-red-500"},7:{icon:"\uD83D\uDD04",label:"Phản lưới",color:"text-orange-400"},8:{icon:"\uD83C\uDFE5",label:"Chấn thương",color:"text-[#94A3B8]"},9:{icon:"\uD83D\uDD04",label:"Thay người",color:"text-blue-400"},11:{icon:"⏱️",label:"Hiệp 2",color:"text-[#F8FAFC]/40"},15:{icon:"\uD83E\uDD45",label:"Pen trượt",color:"text-red-400"},19:{icon:"⏱️",label:"Kết th\xfac hiệp",color:"text-[#F8FAFC]/30"},21:{icon:"\uD83C\uDFC6",label:"VAR",color:"text-purple-400"}};function _({events:e}){let t=e?.incidents||e?.events||[];return t&&0!==t.length?(0,a.jsx)("div",{className:"flex flex-col",children:t.map((e,t)=>{let s=y[e.type]||{icon:"•",label:`Event ${e.type}`,color:"text-[#F8FAFC]/50"},l=1===e.position,r=2===e.position,n=e.add_time?`+${e.add_time}`:"",i=`${e.time}'${n}`;return l||r||11!==e.type&&19!==e.type?9===e.type?(0,a.jsxs)("div",{className:`flex items-center gap-2 border-b border-slate-50 p-3 text-xs ${l?"":"flex-row-reverse"}`,children:[(0,a.jsx)("span",{className:"text-slate-400 w-10 text-center shrink-0 text-[10px]",children:i}),(0,a.jsxs)("div",{className:`flex-1 flex flex-col gap-0.5 ${l?"items-start":"items-end"}`,children:[(0,a.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,a.jsx)("span",{className:"text-green-400 text-[10px]",children:"▲"}),(0,a.jsx)("span",{className:"text-[#F8FAFC]/80 text-[11px]",children:e.in_player_name||""})]}),(0,a.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,a.jsx)("span",{className:"text-red-400 text-[10px]",children:"▼"}),(0,a.jsx)("span",{className:"text-[#F8FAFC]/40 text-[11px]",children:e.out_player_name||""})]})]})]},t):(0,a.jsxs)("div",{className:`flex items-center gap-2 border-b border-slate-50 p-3 text-xs ${l?"":"flex-row-reverse"}`,children:[(0,a.jsx)("span",{className:"text-slate-400 w-10 text-center shrink-0 text-[10px]",children:i}),(0,a.jsx)("span",{className:`shrink-0 text-sm ${s.color}`,children:s.icon}),(0,a.jsxs)("div",{className:`flex-1 min-w-0 ${l?"text-left":"text-right"}`,children:[(0,a.jsx)("span",{className:"text-slate-700 text-[11px]",children:e.player_name||""}),e.assist1_name&&(0,a.jsxs)("span",{className:"text-slate-400 text-[10px] ml-1",children:["(kiến tạo: ",e.assist1_name,")"]}),1===e.type&&void 0!==e.home_score&&(0,a.jsxs)("span",{className:"text-[#E11D48] font-bold text-[11px] ml-2",children:[e.home_score," - ",e.away_score]})]})]},t):(0,a.jsx)("div",{className:"flex items-center justify-center py-2 border-b border-slate-50 bg-slate-50",children:(0,a.jsxs)("span",{className:"text-slate-400 text-[10px] uppercase tracking-wider",children:[s.icon," ",s.label," — ",i]})},t)})}):(0,a.jsx)(j,{text:"Diễn biến trận đấu sẽ được cập nhật trực tiếp tại đ\xe2y"})}function k({standings:e}
285){return e&&e.teams&&0!==e.teams.length?(0,a.jsxs)("div",{className:"w-full text-[10px]",children:[(0,a.jsxs)("div",{className:"grid grid-cols-[20px_1fr_24px_24px_32px] bg-slate-50 p-2 text-slate-400 uppercase font-bold sticky top-0",children:[(0,a.jsx)("span",{className:"text-center",children:"#"}),(0,a.jsx)("span",{children:"Team"}),(0,a.jsx)("span",{className:"text-center",children:"T"}),(0,a.jsx)("span",{className:"text-center",children:"B"}),(0,a.jsx)("span",{className:"text-center whitespace-nowrap",children:"Đ"})]}),e.teams.slice(0,15).map((e,t)=>{let s=!!e.data,l=s?parseFloat(e.data[0]):e.rank||t+1,r=s?e.data[1]:e.target_name,n=s?e.data[7]:e.points,i=s?e.data[3]:e.won,o=s?e.data[5]:e.loss;return(0,a.jsxs)("div",{className:"grid grid-cols-[20px_1fr_24px_24px_32px] items-center p-2 border-b border-slate-50 hover:bg-slate-50 transition-colors",children:[(0,a.jsx)("span",{className:"text-center text-slate-500",children:l}),(0,a.jsxs)("div",{className:"flex items-center gap-1.5 min-w-0 pr-2",children:[e.team_logo&&(0,a.jsx)("img",{src:e.team_logo,className:"w-3.5 h-3.5 object-contain",alt:r||"Team logo",loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-slate-700 font-medium truncate",children:r})]}),(0,a.jsx)("span",{className:"text-center text-slate-500",children:i}),(0,a.jsx)("span",{className:"text-center text-slate-500",children:o}),(0,a.jsx)("span",{className:"text-center text-[#E11D48] font-bold",children:n})]},r)})]}):(0,a.jsx)(j,{text:"Bảng xếp hạng sẽ được cập nhật"})}function E({odds:e}){let t=Array.isArray(e)?e:[],s=["2","4","3","16"];function l(e){for(let a of s){let s=t.find(t=>t.odds_type===e&&String(t.company_id)===a);if(s?.odds_info?.length)return s}return t.find(t=>t.odds_type===e&&t.odds_info?.length>0)}function r(e,t){let s=e?.odds_info;if(!s?.length)return["-","-","-"];let a="opening"===t?s.length-1:0;if(!s?.length||!s[a])return["-","-","-"];let l=s[a][2];if("string"!=typeof l)return["-","-","-"];let r=l.split(",");return[r[0]||"-",r[1]||"-",r[2]||"-"]}let n=l("asia"),i=l("eu"),o=l("bs"),c=l("cr"),d=r(n,"opening"),x=r(n,"latest"),h=r(i,"opening"),m=r(i,"latest"),p=r(o,"opening"),u=r(o,"latest"),g=r(c,"opening"),b=r(c,"latest"),f=({children:e})=>(0,a.jsx)("th",{className:"px-2 py-2 text-[9px] sm:text-[10px] font-bold uppercase tracking-wider text-slate-500 border-b border-slate-100 text-center",children:e}),j=({children:e,color:t})=>(0,a.jsx)("td",{className:`px-2 py-2.5 text-center text-[11px] sm:text-xs font-bold ${t||"text-slate-600"} border-b border-slate-50`,children:e});return(0,a.jsxs)("div",{className:"overflow-x-auto",children:[(0,a.jsxs)("table",{className:"w-full min-w-[600px]",children:[(0,a.jsxs)("thead",{children:[(0,a.jsxs)("tr",{className:"bg-slate-50",children:[(0,a.jsx)("th",{className:"px-4 py-2 text-left border-b border-slate-100",rowSpan:2,children:(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("div",{className:"w-7 h-7 rounded bg-gradient-to-br from-[#1d4ed8] to-[#3b82f6] flex items-center justify-center text-white text-[9px] font-black shadow-sm",children:"B"}),(0,a.jsx)("span",{className:"text-slate-600 text-[11px] font-bold tracking-wider",children:"SPORT"})]})}),(0,a.jsx)("th",{colSpan:3,className:"px-1 py-1.5 text-center text-[9px] sm:text-[10px] font-bold uppercase tracking-wider text-[#4681E8] border-b border-l border-slate-100",children:"CƯỢC CH\xc2U \xc1"}),(0,a.jsx)("th",{colSpan:3,className:"px-1 py-1.5 text-center text-[9px] sm:text-[10px] font-bold uppercase tracking-wider text-[#4681E8] border-b border-l border-slate-100",children:"CƯỢC CH\xc2U \xc2U"}),(0,a.jsx)("th",{colSpan:3,className:"px-1 py-1.5 text-center text-[9px] sm:text-[10px] font-bold uppercase tracking-wider text-[#4681E8] border-b border-l border-slate-100",children:"T\xc0I XỈU"}),(0,a.jsx)("th",{colSpan:3,className:"px-1 py-1.5 text-center text-[9px] sm:text-[10px] font-bold uppercase tracking-wider text-[#4681E8] border-b border-l border-slate-100",children:"K\xc8O G\xd3C"})]}),(0,a.jsxs)("tr",{className:"bg-slate-50",children:[(0,a.jsx)(f,{children:"CHỦ"}),(0,a.jsx)(f,{children:"CHẤP"}),(0,a.jsx)(f,{children:"KH\xc1CH"}),(0,a.jsx)(f,{children:"CHỦ"}),(0,a.jsx)(f,{children:"H\xd2A"}),(0,a.jsx)(f,{children:"KH\xc1CH"}),(0,a.jsx)(f,{children:"T\xc0I"}),(0,a.jsx)(f,{children:"TỶ LỆ"}),(0,a.jsx)(f,{children:"XỈU"}),(0,a.jsx)(f,{children:"T\xc0I"}),(0,a.jsx)(f,{children:"TỶ LỆ"}),(0,a.jsx)(f,{children:"XỈU"})]})]}),(0,a.jsxs)("tbody",{children:[(0,a.jsxs)("tr",{className:"hover:bg-slate-50 transition-colors",children:[(0,a.jsx)("td",{className:"px-4 py-2.5 text-[11px] sm:text-xs text-slate-500 font-medium border-b border-slate-50",children:"Tỷ Lệ Mở Cược"}),(0,a.jsx)(j,{children:d[0]}),(0,a.jsx)(j,{color:"text-red-400",children:d[1]}),(0,a.jsx)(j,{children:d[2]}),(0,a.jsx)(j,{children:h[0]}),(0,a.jsx)(j,{children:h[1]}),(0,a.jsx)(j,{children:h[2]}),(0,a.jsx)(j,{children:p[0]}),(0,a.jsx)(j,{children:p[1]}),(0,a.jsx)(j,{children:p[2]}),(0,a.jsx)(j,{children:g[0]}),(0,a.jsx)(j,{children:g[1]}),(0,a.jsx)(j,{children:g[2]})]}),(0,a.jsxs)("tr",{className:"hover:bg-slate-50 transition-colors",children:[(0,a.jsx)("td",{className:"px-4 py-2.5 text-[11px] sm:text-xs text-slate-500 font-medium border-b border-slate-50",children:"Tỷ Lệ Trước Trận"}),(0,a.jsx)(j,{children:x[0]}),(0,a.jsx)(j,{color:"text-red-400",children:x[1]}),(0,a.jsx)(j,{children:x[2]}),(0,a.jsx)(j,{children:m[0]}),(0,a.jsx)(j,{children:m[1]}),(0,a.jsx)(j,{children:m[2]}),(0,a.jsx)(j,{children:u[0]}),(0,a.jsx)(j,{children:u[1]}),(0,a.jsx)(j,{children:u[2]}),(0,a.jsx)(j,{children:b[0]}),(0,a.jsx)(j,{children:b[1]}),(0,a.jsx)(j,{children:b[2]})]}),(0,a.jsxs)("tr",{className:"hover:bg-slate-50 transition-colors bg-white",children:[(0,a.jsxs)("td",{className:"px-4 py-2.5 text-[11px] sm:text-xs text-slate-700 font-bold flex items-center gap-1.5 border-b border-slate-50",children:["Live ",(0,a.jsx)("span",{className:"w-1.5 h-1.5 rounded-full bg-red-500 animate-pulse"})]}),(0,a.jsx)(j,{color:"text-green-400",children:x[0]}),(0,a.jsx)(j,{color:"text-red-400",children:x[1]}),(0,a.jsx)(j,{color:"text-green-400",children:x[2]}),(0,a.jsx)(j,{color:"text-green-400",children:m[0]}),(0,a.jsx)(j,{color:"text-green-400",children:m[1]}),(0,a.jsx)(j,{color:"text-green-400",children:m[2]}),(0,a.jsx)(j,{color:"text-green-400",children:u[0]}),(0,a.jsx)(j,{children:u[1]}),(0,a.jsx)(j,{color:"text-green-400",children:u[2]}),(0,a.jsx)(j,{color:"text-green-400",children:b[0]}),(0,a.jsx)(j,{children:b[1]}),(0,a.jsx)(j,{color:"text-green-400",children:b[2]})]})]})]}),(0,a.jsx)("p",{className:"text-center text-slate-400 text-[10px] py-2.5 border-t border-slate-100",children:"Tỷ lệ k\xe8o sẽ được cập nhật gần giờ thi đấu"})]})}},26840:(e,t,s)=>{"use strict";s.d(t,{Klivevip08SchedulePage:()=>d});var a=s(68019),l=s(10707),r=s(78637),n=s(25059);function i({html:e}){return e?.trim()?(0,a.jsx)("section",{className:"relative mt-10 mb-6",children:(0,a.jsx)("div",{className:"seo-prose relative",children:(0,a.jsx)("div",{dangerouslySetInnerHTML:{__html:e},className:"text-slate-600 text-[14px] leading-[1.85] px-1 [&_strong]:text-slate-900 [&_a]:text-[#4681E8]"})})}):null}s(88344);let o=`
286<h2>Lịch thi đấu b\xf3ng đ\xe1 - Cập nhật lịch b\xf3ng đ\xe1 h\xf4m nay nhanh v\xe0 ch\xednh x\xe1c</h2>
287
288<p>Để <strong>xem lịch thi đấu b\xf3ng đ\xe1</strong> nhanh, ch\xednh x\xe1c v\xe0 đầy đủ nhất, Klive ch\xednh l\xe0 nơi bạn n\xean chọn. Ch\xfang t\xf4i cập nhật lịch thi đấu cho to\xe0n bộ c\xe1c giải đấu trong nước v\xe0 quốc tế, gi\xfap bạn kh\xf4ng bỏ lỡ bất kỳ trận cầu hấp dẫn n\xe0o.</p>
289
290<img src="/images/seo/schedule-football.png" alt="Lịch thi đấu b\xf3ng đ\xe1 h\xf4m nay tại Klive" loading="lazy" />
291
292<div class="toc-box">
293  <h3>Nội dung ch\xednh</h3>
294  <ol>
295    <li>Lịch thi đấu b\xf3ng đ\xe1 trực tuyến h\xe0ng đầu</li>
296    <li>Lịch b\xf3ng đ\xe1 nhanh v\xe0 ch\xednh x\xe1c</li>
297    <li>Cập nhật lịch Ngoại Hạng Anh v\xe0 Champions League</li>
298    <li>C\xe1ch xem lịch thi đấu hiệu quả nhất</li>
299  </ol>
300</div>
301
302<h2>Lịch thi đấu b\xf3ng đ\xe1 trực tuyến h\xe0ng đầu</h2>
303<p>Trong thời đại số, kh\xf4ng ai c\xf2n xem lịch b\xf3ng đ\xe1 tr\xean TV hay b\xe1o giấy nữa. Tất cả đ\xe3 chuyển sang theo d\xf5i online, v\xe0 Klive ch\xednh l\xe0 nền tảng cập nhật lịch b\xf3ng đ\xe1 được đ\xe1nh gi\xe1 cao nhất.</p>
304
305<p>Khi truy cập Klive, bạn c\xf3 thể xem lịch thi đấu của bất kỳ giải đấu b\xf3ng đ\xe1 n\xe0o tr\xean thế giới một c\xe1ch ho\xe0n to\xe0n miễn ph\xed. Th\xf4ng tin lịch đấu được cập nhật sớm nhất v\xe0 chi tiết đến từng ph\xfat.</p>
306
307<h2>Lịch b\xf3ng đ\xe1 nhanh v\xe0 ch\xednh x\xe1c</h2>
308<p>Klive kh\xf4ng chỉ cung cấp lịch thi đấu c\xe1c giải đấu h\xe0ng đầu m\xe0 c\xf2n cập nhật lịch ph\xe1t s\xf3ng tr\xean c\xe1c k\xeanh truyền h\xecnh Việt Nam như K+, FPT Play, VTV Sports. Gi\xfap bạn biết trận n\xe0o được chiếu trực tiếp tr\xean TV v\xe0 sắp xếp thời gian hợp l\xfd.</p>
309
310<h2>Cập nhật lịch Ngoại Hạng Anh v\xe0 Champions League</h2>
311<p>Ngoại Hạng Anh v\xe0 Champions League l\xe0 hai giải đấu được quan t\xe2m nhất. Tại Klive, bạn lu\xf4n nắm được lịch đấu đầy đủ từ v\xf2ng bảng đến chung kết, k\xe8m theo th\xf4ng tin về đội h\xecnh dá»± kiến, phong độ v\xe0 lịch sá»­ đối đầu để chuẩn bị tốt nhất cho má
311»—i trận cầu.</p>
312
313<p>Kết hợp lịch thi đấu với trang trực tiếp b\xf3ng đ\xe1, bạn sẽ c\xf3 trải nghiệm theo d\xf5i b\xf3ng đ\xe1 ho\xe0n hảo nhất - biết trước, xem ngay, kh\xf4ng bỏ lỡ!</p>
314`;var c=s(13881);function d({initialData:e}){let t=(0,r.usePathname)(),[s,h]=(0,l.useState)(!1),[m,p]=(0,l.useState)(new Set),[u,g]=(0,l.useState)(""),[b,f]=(0,l.useState)(!1),[j,w]=(0,l.useState)(0),v=(0,l.useMemo)(()=>(0,c.p_)(e),[e]),N=v.dateTabs,y=(0,l.useMemo)(()=>{if(!v.selectedDate)return 0;let e=N.findIndex(e=>(e.dataValue||e.date)===v.selectedDate);return e>=0?e:0},[N,v.selectedDate]),[_,k]=(0,l.useState)(y),[E,C]=(0,l.useState)(v.leagues||[]),S=(0,l.useMemo)(()=>{if(!u)return E;let e=u.toLowerCase();return E.filter(t=>t.league_name.toLowerCase().includes(e)||t.matches.some(t=>t.home_team.toLowerCase().includes(e)||t.away_team.toLowerCase().includes(e)))},[E,u]),L=Math.max(0,N.length-7),$=N.slice(j,j+7),F=j>0,T=j<L,A=S.reduce((e,t)=>e+t.matches.length,0);return((0,l.useEffect)(()=>{if(!v.selectedDate||!N.length)return;let e=N.findIndex(e=>(e.dataValue||e.date)===v.selectedDate);e>=0&&k(e)},[N,v.selectedDate]),(0,l.useEffect)(()=>{_<j?w(Math.max(0,_)):_>=j+7&&w(Math.min(L,_-7+1))},[_,L,j]),e)?(0,a.jsxs)("div",{className:"max-w-[1440px] mx-auto px-4 py-8",children:[(0,a.jsx)(n.x,{eyebrow:"Lịch thi đấu",title:"LỊCH THI ĐẤU",rightSlot:(0,a.jsxs)("div",{className:"text-[12px] text-slate-500 font-bold uppercase tracking-wider",children:[(0,a.jsx)("span",{className:"text-[#E11D48] font-black",children:S.reduce((e,t)=>e+t.matches.length,0)})," trận đấu"]})}),(0,a.jsxs)("div",{className:"flex items-center mb-4 rounded-xl overflow-hidden border border-slate-200 bg-white shadow-sm",children:[(0,a.jsx)("button",{type:"button",disabled:!F,onClick:()=>w(e=>Math.max(0,e-1)),className:`flex items-center justify-center w-8 h-[52px] bg-slate-100 border-r border-slate-200 text-slate-600 hover:text-slate-800 hover:bg-slate-200 transition-all shrink-0 ${!F?"opacity-30":"cursor-pointer"}`,children:(0,a.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2.5,d:"M15 19l-7-7 7-7"})})}),(0,a.jsx)("div",{className:"flex flex-1",children:$.map((e,s)=>{let l=j+s;return(0,a.jsxs)("button",{type:"button",onClick:()=>(e=>{let s=N[e];if(!s||e===_)return;let a=s.dataValue||s.date;a&&(k(e),p(new Set),h(!0),window.history.replaceState(null,"",`${t}?date=${encodeURIComponent(a)}`),fetch(`/api/socolive/fixtures?date=${encodeURIComponent(a)}`,{cache:"no-store"}).then(e=>e.ok?e.json():null).then(e=>{e&&C((0,c.p_)(e).leagues||[])}).finally(()=>h(!1)))})(l),className:`flex-1 flex flex-col items-center justify-center h-[52px] border-b-[3px] transition-all duration-300 ${_===l?"border-[#4681E8] text-[#4681E8] bg-[#4681E8]/5":"border-transparent text-[#64748B] hover:text-[#94A3B8] hover:bg-slate-100"}`,children:[(0,a.jsx)("span",{className:`text-[11px] font-bold uppercase tracking-widest ${_===l?"text-[#4681E8]":""}`,children:e.label}),(0,a.jsx)("span",{className:`text-[12px] font-mono mt-0.5 ${_===l?"text-slate-800 font-black":""}`,children:e.date})]},`tab-${l}`)})}),(0,a.jsx)("button",{type:"button",disabled:!T,onClick:()=>w(e=>Math.min(L,e+1)),className:`flex items-center justify-center w-8 h-[52px] bg-slate-100 border-l border-slate-200 text-slate-600 hover:text-slate-800 hover:bg-slate-200 transition-all shrink-0 ${!T?"opacity-30":"cursor-pointer"}`,children:(0,a.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2.5,d:"M9 5l7 7-7 7"})})})]}),(0,a.jsxs)("div",{className:"relative mb-4",children:[(0,a.jsxs)("button",{onClick:()=>f(!b),className:"flex items-center gap-3 bg-white hover:bg-slate-50 px-4 py-2.5 rounded-xl border border-slate-200 shadow-sm transition-all text-sm group",children:[(0,a.jsx)("svg",{className:"w-5 h-5 text-[#E11D48] transition-colors group-hover:text-[#F43F5E]",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 6h16M4 12h16M4 18h16"})}),(0,a.jsx)("span",{className:"text-slate-700 font-bold text-[13px] uppercase tracking-wide",children:"Danh s\xe1ch giải đấu"}),(0,a.jsx)("svg",{className:`w-4 h-4 text-slate-500 transition-transform duration-300 ${b?"rotate-180":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),b&&(0,a.jsxs)("div",{className:"absolute top-full left-0 mt-2 w-[360px] bg-white border border-slate-200 rounded-2xl shadow-[0_24px_80px_rgba(0,0,0,0.12)] z-50 max-h-[320px] overflow-hidden flex flex-col",children:[(0,a.jsx)("div",{className:"p-2 border-b border-slate-100",children:(0,a.jsx)("input",{type:"text",placeholder:"T\xecm giải đấu...",value:u,onChange:e=>g(e.target.value),className:"w-full bg-slate-50 border border-transparent roun
314ded-xl px-4 py-2.5 text-sm text-slate-800 placeholder-slate-400 outline-none focus:border-[#4681E8]/50 transition-colors"})}),(0,a.jsx)("div",{className:"overflow-y-auto flex-1 py-2",children:E.map((e,t)=>(0,a.jsxs)("button",{type:"button",onClick:()=>{g(e.league_name),f(!1)},className:"w-full flex items-center gap-3 px-4 py-2.5 hover:bg-slate-50 text-left text-[13px] transition-colors",children:[e.league_icon?(0,a.jsx)("img",{src:e.league_icon,alt:e.league_name||"League",className:"w-5 h-5 object-contain shrink-0",loading:"lazy",decoding:"async"}):(0,a.jsx)("div",{className:"w-5 h-5 rounded-md bg-slate-200 shrink-0"}),(0,a.jsx)("span",{className:"text-slate-600 truncate flex-1 font-medium",children:e.league_name}),(0,a.jsx)("span",{className:"text-[11px] text-[#E11D48] font-bold shrink-0 px-2 py-0.5 bg-[#E11D48]/10 rounded-md border border-[#E11D48]/20",children:e.matches.length})]},t))})]})]}),(0,a.jsxs)("div",{className:"grid grid-cols-[1fr_60px_55px_100px_100px_90px] bg-slate-50 border border-slate-200 rounded-t-xl px-4 py-3 text-[11px] text-slate-500 font-black uppercase tracking-widest shadow-inner",children:[(0,a.jsx)("span",{children:"Trận đấu"}),(0,a.jsx)("span",{className:"text-center",children:"Tỷ số"}),(0,a.jsx)("span",{className:"text-center",children:"Hiệp 1"}),(0,a.jsx)("span",{className:"text-center",children:"Cược chấp"}),(0,a.jsx)("span",{className:"text-center",children:"T\xe0i/Xỉu"}),(0,a.jsx)("span",{className:"text-center",children:"1 X 2"})]}),(0,a.jsxs)("div",{className:"border border-slate-200 border-t-0 rounded-b-xl overflow-hidden relative shadow-[0_8px_30px_rgba(0,0,0,0.06)]",children:[s&&(0,a.jsx)("div",{className:"absolute inset-0 z-10 bg-white/80 backdrop-blur-[2px]",children:(0,a.jsx)("div",{className:"space-y-0",children:[...Array(6)].map((e,t)=>(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 px-4 py-3.5 bg-slate-100 border-b border-slate-200",children:[(0,a.jsx)("div",{className:"w-4 h-4 rounded bg-slate-300 animate-pulse"}),(0,a.jsx)("div",{className:"h-3.5 rounded bg-slate-200 animate-pulse",style:{width:`${120+30*t}px`}})]}),[void 0,void 0].map((e,t)=>(0,a.jsxs)("div",{className:"grid grid-cols-[1fr_60px_55px_100px_100px_90px] items-center px-4 py-3 border-b border-slate-100",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)("div",{className:"w-10 h-3.5 rounded bg-slate-200 animate-pulse"}),(0,a.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,a.jsx)("div",{className:"h-3 w-24 rounded bg-slate-100 animate-pulse"}),(0,a.jsx)("div",{className:"h-3 w-20 rounded bg-slate-100 animate-pulse"})]})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5",children:[(0,a.jsx)("div",{className:"h-3 w-5 rounded bg-slate-100 animate-pulse"}),(0,a.jsx)("div",{className:"h-3 w-5 rounded bg-slate-100 animate-pulse"})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5",children:[(0,a.jsx)("div",{className:"h-3 w-5 rounded bg-slate-100 animate-pulse"}),(0,a.jsx)("div",{className:"h-3 w-5 rounded bg-slate-100 animate-pulse"})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5",children:[(0,a.jsx)("div",{className:"h-3 w-14 rounded bg-slate-100 animate-pulse"}),(0,a.jsx)("div",{className:"h-3 w-10 rounded bg-slate-100 animate-pulse"})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5",children:[(0,a.jsx)("div",{className:"h-3 w-14 rounded bg-slate-100 animate-pulse"}),(0,a.jsx)("div",{className:"h-3 w-10 rounded bg-slate-100 animate-pulse"})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5",children:[(0,a.jsx)("div",{className:"h-3 w-10 rounded bg-slate-100 animate-pulse"}),(0,a.jsx)("div",{className:"h-3 w-10 rounded bg-slate-100 animate-pulse"}),(0,a.jsx)("div",{className:"h-3 w-10 rounded bg-slate-100 animate-pulse"})]})]},t))]},t))})}),0!==S.length||s?S.map((e,t)=>(0,a.jsxs)("div",{id:`league-${t}`,children:[(0,a.jsxs)("button",{onClick:()=>{p(e=>{let s=new Set(e);return s.has(t)?s.delete(t):s.add(t),s})},className:"w-full flex items-center gap-3 px-4 py-3 bg-slate-50 hover:bg-slate-100 border-b border-slate-100 transition-colors text-left group",children:[(0,a.jsx)("svg",{className:`w-4 h-4 text-[#E11D48] transition-transform duration-300 shrink-0 ${m.has(t)?"-rotate-90":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2.5,d:"M19 9l-7 7-7-7"})}),e.league_icon&&(0,a.jsx)("div",{className:"w-6 h-6 rounded-full bg-slate-100 p-0.5 border border-slate-200 flex items-center justify-center shadow-sm",children:(0,a.jsx)("img",{src:e.league_icon,alt:e.league_name||"League",className:"w-4 h-4 object-contain shrink-0",loading:"lazy",decoding:"async"})}),(0,a.jsx)("span",{className:"text-[13px] font-bold text-slate-700 flex-1 truncate uppercase tracking-widest",children:e.league_name}),(0,a.jsxs)("span",{className:"text-[11px] text-[#E11D48] font-bold shrink-0 ml-1 px-2 py-0.5 bg-[#E11D48]/10 rounded border border-[#
314E11D48]/20 group-hover:bg-[#E11D48]/20 transition-colors",children:["BXH ",(0,a.jsx)("svg",{className:"inline w-3 h-3 ml-0.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 6h16M4 10h16M4 14h16M4 18h16"})})]})]}),!m.has(t)&&e.matches.map((e,t)=>(0,a.jsxs)("div",{className:"grid grid-cols-[1fr_60px_55px_100px_100px_90px] items-center px-4 py-3 bg-transparent hover:bg-slate-50 border-b border-slate-100 last:border-0 transition-colors group cursor-default",children:[(0,a.jsxs)("div",{className:"flex items-center gap-4 min-w-0",children:[(0,a.jsx)("span",{className:"text-[#E11D48] font-mono text-[13px] font-black min-w-[42px] shrink-0 drop-shadow-[0_0_4px_rgba(225,29,72,0.4)]",children:e.time}),(0,a.jsxs)("div",{className:"flex flex-col gap-1 min-w-0 flex-1",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[e.home_logo&&(0,a.jsx)("img",{src:e.home_logo,alt:e.home_team||"Home team",className:"w-4 h-4 object-contain shrink-0 filter drop-shadow-[0_2px_2px_rgba(0,0,0,0.8)]",loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-[13px] text-slate-700 font-medium truncate group-hover:text-slate-900 transition-colors",children:e.home_team})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[e.away_logo&&(0,a.jsx)("img",{src:e.away_logo,alt:e.away_team||"Away team",className:"w-4 h-4 object-contain shrink-0",loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-[13px] text-slate-700 font-medium truncate group-hover:text-slate-900 transition-colors",children:e.away_team})]})]})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center",children:[(0,a.jsx)("span",{className:"text-[12px] text-[var(--accent-cyan)] font-mono font-bold",children:"-"!==e.score?e.score:"-"}),(0,a.jsx)("span",{className:"text-[12px] text-[#64748B]",children:"-"})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center",children:[(0,a.jsx)("span",{className:"text-[12px] text-[#64748B]",children:"-"}),(0,a.jsx)("span",{className:"text-[12px] text-[#64748B]",children:"-"})]}),(0,a.jsx)(x,{values:e.handicap,hasLine:!0}),(0,a.jsx)(x,{values:e.over_under,hasLine:!0}),(0,a.jsx)("div",{className:"flex flex-col items-center gap-0",children:e.one_x_two?.length>0?e.one_x_two.map((e,t)=>(0,a.jsx)("span",{className:"text-[11px] text-slate-500 leading-[18px]",children:e||"-"},t)):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"text-[11px] text-[#64748B] leading-[18px]",children:"-"}),(0,a.jsx)("span",{className:"text-[11px] text-[#64748B] leading-[18px]",children:"-"}),(0,a.jsx)("span",{className:"text-[11px] text-[#64748B] leading-[18px]",children:"-"})]})})]},t))]},t)):(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center py-20 gap-3 bg-slate-50",children:[(0,a.jsx)("svg",{className:"w-12 h-12 text-slate-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",strokeWidth:1.5,children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6.75 3v2.25M17.25 3v2.25M3 18.75V7.5a2.25 2.25 0 012.25-2.25h13.5A2.25 2.25 0 0121 7.5v11.25m-18 0A2.25 2.25 0 005.25 21h13.5A2.25 2.25 0 0021 18.75m-18 0v-7.5A2.25 2.25 0 015.25 9h13.5A2.25 2.25 0 0121 11.25v7.5"})}),(0,a.jsx)("span",{className:"text-slate-500 font-medium tracking-wide",children:"Kh\xf4ng c\xf3 trận đấu n\xe0o cho ng\xe0y n\xe0y"}),(0,a.jsx)("span",{className:"text-slate-400 text-[12px]",children:"H\xe3y thử chọn một ng\xe0y kh\xe1c"})]})]}),(0,a.jsxs)("div",{className:"mt-6 text-center text-[11px] text-[#64748B] uppercase tracking-widest font-bold drop-shadow-sm",children:["Tổng cộng ",A," trận đấu trong ",S.length," giải"]}),(0,a.jsx)(i,{html:o})]}):(0,a.jsxs)("div",{className:"max-w-[1440px] mx-auto px-4 py-8",children:[(0,a.jsx)(n.x,{eyebrow:"Lịch thi đấu",title:"LỊCH THI ĐẤU"}),(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center py-16 gap-4",children:[(0,a.jsx)("div",{className:"w-12 h-12 rounded-full border-2 border-[#E11D48]/30 border-t-[#E11D48] animate-spin"}),(0,a.jsx)("span",{className:"text-slate-500 text-sm font-medium tracking-wide",children:"Đang tải lịch thi đấu..."})]})]})}function x({values:e,hasLine:t}){return e&&0!==e.length?t&&e.length>=3?(0,a.jsxs)("div",{className:"flex flex-col items-center gap-0",children:[(0,a.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,a.jsx)("span",{className:"text-[11px] text-[#E11D48] leading-[18px] font-bold",children:e[0]}),(0,a.jsx)("span",{className:"text-[11px] text-slate-500 leading-[18px]",children:e[1]})]}),(0,a.jsx)("span",{className:"text-[11px] text-slate-500 leading-[18px]",children:e[2]})]}):(0,a.jsx)("div",{className:"flex flex-col items-center gap-0",children:e.map((e,t)=>(0,a.jsx)("span",{className:"text-[11px] text-slate-500 leading-[18px]",children:e||"-"},t))}):(0,a.jsxs)("div",{className:"flex flex-col items-center",children:[(0,a.jsx)("span",{className:"text-[11px] text-[#64748B] leading-[18px]",children:"-"}),(0,a.jsx)("span",{className:"text-[11px] text-[#64748B] leading-[18px]",children:"-"})]})}},26895:(e,t,s)=>{"use strict";s.d(t,{x:()=>r});var a=s(68019),l=s(70508);
314function r({eyebrow:e,title:t,titleAddon:s,rightSlot:n,className:i}){return(0,a.jsx)("div",{className:(0,l.cn)("relative mb-5 overflow-hidden border-b border-slate-200",i),children:(0,a.jsxs)("div",{className:"flex items-center justify-between px-1 py-4 min-h-[56px]",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 min-w-0",children:[(0,a.jsx)("span",{className:"h-8 w-1 shrink-0 rounded-sm bg-gradient-to-b from-[#4681E8] to-[#55CAF1] shadow-[0_0_10px_rgba(70,129,232,0.5)]"}),(0,a.jsxs)("div",{className:"min-w-0",children:[e&&(0,a.jsx)("div",{className:"text-[10px] font-bold uppercase tracking-[0.2em] text-[#4681E8]/60 mb-0.5",children:e}),(0,a.jsxs)("div",{className:"flex items-center gap-2.5 flex-wrap",children:[(0,a.jsx)("h1",{className:"text-[18px] sm:text-[22px] font-black uppercase tracking-tight text-slate-800 leading-none",children:t}),s]})]})]}),n&&(0,a.jsx)("div",{className:"hidden sm:flex items-center gap-2 text-right shrink-0 ml-4",children:n})]})})}},27347:(e,t,s)=>{"use strict";s.d(t,{A:()=>r});var a=s(68019),l=s(70508);function r({eyebrow:e,title:t,titleAddon:s,rightSlot:n,className:i}){return(0,a.jsx)("div",{className:(0,l.cn)("relative mb-5 overflow-hidden border-b border-slate-200",i),children:(0,a.jsxs)("div",{className:"flex items-center justify-between px-1 py-4 min-h-[56px]",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 min-w-0",children:[(0,a.jsx)("span",{className:"h-8 w-1 shrink-0 rounded-sm bg-gradient-to-b from-[#4681E8] to-[#55CAF1] shadow-[0_0_10px_rgba(70,129,232,0.5)]"}),(0,a.jsxs)("div",{className:"min-w-0",children:[e&&(0,a.jsx)("div",{className:"text-[10px] font-bold uppercase tracking-[0.2em] text-[#4681E8]/60 mb-0.5",children:e}),(0,a.jsxs)("div",{className:"flex items-center gap-2.5 flex-wrap",children:[(0,a.jsx)("h1",{className:"text-[18px] sm:text-[22px] font-black uppercase tracking-tight text-slate-800 leading-none",children:t}),s]})]})]}),n&&(0,a.jsx)("div",{className:"hidden sm:flex items-center gap-2 text-right shrink-0 ml-4",children:n})]})})}},27682:(e,t,s)=>{"use strict";s.d(t,{StandingsClient:()=>h});var a=s(68019),l=s(10707),r=s(46914),n=s(27347);function i(e){return"W"===e?"border border-emerald-500/45 bg-emerald-500/25 text-emerald-300 shadow-[0_0_0_1px_rgba(16,185,129,0.08)_inset]":"L"===e?"border border-red-500/45 bg-red-500/25 text-red-300 shadow-[0_0_0_1px_rgba(239,68,68,0.08)_inset]":"D"===e?"border border-amber-400/45 bg-amber-400/22 text-amber-200 shadow-[0_0_0_1px_rgba(251,191,36,0.08)_inset]":"border border-slate-500/40 bg-slate-500/18 text-slate-700"}function o(e,t){return 1===e?{bar:"bg-[linear-gradient(180deg,#facc15,#f97316)]",badge:"border-emerald-600/60 bg-slate-100 text-yellow-700 shadow-[0_0_18px_rgba(250,204,21,0.14)]",row:"from-[#32230d]/70 via-transparent to-transparent"}:e<=4?{bar:"bg-[linear-gradient(180deg,#fb7185,#f97316)]",badge:"border-[#fb7185]/45 bg-slate-100 text-rose-700",row:"from-[#241318]/55 via-transparent to-transparent"}:e<=6?{bar:"bg-[linear-gradient(180deg,#f59e0b,#facc15)]",badge:"border-[#f59e0b]/45 bg-slate-100 text-yellow-700",row:"from-[#24190b]/45 via-transparent to-transparent"}:e<=10?{bar:"bg-[linear-gradient(180deg,#38bdf8,#2563eb)]",badge:"border-sky-400/40 bg-white text-sky-700",row:"from-[#101725]/32 via-transparent to-transparent"}:e>=Math.max(t-2,1)?{bar:"bg-[linear-gradient(180deg,#ef4444,#7f1d1d)]",badge:"border-red-500/40 bg-slate-100 text-red-700",row:"from-[#220f14]/45 via-transparent to-transparent"}:{bar:"bg-[linear-gradient(180deg,#64748b,#334155)]",badge:"border-slate-500/35 bg-white text-slate-700",row:"from-[#12161d]/24 via-transparent to-transparent"}}function c({detail:e}){let[t,s]=(0,l.useState)(!1),n=(0,l.useRef)(null),[o,d]=(0,l.useState)({top:0,left:0}),x=i(e.result),h=(0,l.useCallback)(()=>{if(n.current){let e=n.current.getBoundingClientRect();d({top:e.top+window.scrollY-8,left:e.left+e.width/2+window.scrollX})}s(!0)},[]);return(0,a.jsxs)("div",{ref:n,className:"relative inline-flex",onMouseEnter:h,onMouseLeave:()=>s(!1),children:[(0,a.jsx)("span",{className:`inline-flex h-7 w-7 items-center justify-center rounded-[8px] text-[11px] font-black cursor-pointer transition-transform hover:-translate-y-0.5 ${x}`,children:e.result}),t&&e.match_time&&"u">typeof document&&(0,r.createPortal)((0,a.jsxs)("div",{className:"fixed z-[9999] w-[220px] pointer-events-none",style:{to
314p:`${o.top}px`,left:`${o.left}px`,transform:"translate(-50%, -100%)",position:"absolute"},children:[(0,a.jsxs)("div",{className:"overflow-hidden rounded-xl border border-[#cbd5e1] bg-white shadow-2xl",children:[(0,a.jsx)("div",{className:"bg-slate-100 px-3 py-1.5 text-[10px] text-slate-600 font-mono text-center border-b border-[#cbd5e1]",children:e.match_time}),(0,a.jsxs)("div",{className:"px-3 py-2.5 flex items-center justify-between gap-2",children:[(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5 flex-1 min-w-0",children:[e.home_logo?(0,a.jsx)("img",{src:e.home_logo,alt:e.home_team,className:"w-7 h-7 object-contain",loading:"lazy",decoding:"async"}):(0,a.jsx)("div",{className:"w-7 h-7 rounded-full bg-gray-700 flex items-center justify-center text-[8px] text-slate-600 font-bold",children:"?"}),(0,a.jsx)("span",{className:"text-[9px] text-slate-600 font-bold text-center leading-tight line-clamp-2 max-w-[70px]",children:e.home_team})]}),(0,a.jsx)("div",{className:"text-slate-900 font-black text-sm whitespace-nowrap px-1",children:e.score||"? - ?"}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5 flex-1 min-w-0",children:[e.away_logo?(0,a.jsx)("img",{src:e.away_logo,alt:e.away_team,className:"w-7 h-7 object-contain",loading:"lazy",decoding:"async"}):(0,a.jsx)("div",{className:"w-7 h-7 rounded-full bg-gray-700 flex items-center justify-center text-[8px] text-slate-600 font-bold",children:"?"}),(0,a.jsx)("span",{className:"text-[9px] text-slate-600 font-bold text-center leading-tight line-clamp-2 max-w-[70px]",children:e.away_team})]})]})]}),(0,a.jsx)("div",{className:"absolute left-1/2 -translate-x-1/2 -bottom-1 w-2 h-2 bg-white border-r border-b border-[#cbd5e1] rotate-45"})]}),document.body)]})}function d({result:e}){let t=i(e);return(0,a.jsx)("span",{className:`inline-flex h-7 w-7 items-center justify-center rounded-[8px] text-[11px] font-black ${t}`,children:e})}function x({value:e,totalTeams:t}){let s=Number(e);if(!Number.isFinite(s))return(0,a.jsx)("td",{className:"px-4 py-4 text-center font-mono font-black text-slate-400",children:e});let l=o(s,t);return(0,a.jsxs)("td",{className:"relative px-4 py-4 text-center font-mono",children:[(0,a.jsx)("span",{className:`absolute left-0 top-1/2 h-7 w-1 -translate-y-1/2 rounded-r-full ${l.bar}`}),(0,a.jsx)("span",{className:`inline-flex h-8 w-8 items-center justify-center rounded-[10px] border text-[13px] font-black ${l.badge}`,children:s})]})}function h({initialData:e}){let[t]=(0,l.useState)(!1),[s,r]=(0,l.useState)(!1),[i,p]=(0,l.useState)(""),u=(0,l.useRef)(null);if((0,l.useEffect)(()=>{function e(e){u.current&&!u.current.contains(e.target)&&r(!1)}return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[]),!e)return(0,a.jsx)("div",{className:"text-center py-20 text-slate-600",children:"Đang tải dữ liệu..."});let g=e.available_leagues||[],b=g.filter(e=>e.name.toLowerCase().includes(i.toLowerCase())),f=e.teams&&e.teams.length>0&&Array.isArray(e.teams[0]?.form),j=!f&&e.rankings;return(0,a.jsxs)("div",{className:"mx-auto max-w-[1440px] px-4 py-8",children:[(0,a.jsx)(n.A,{eyebrow:"Bảng xếp hạng",title:"BẢNG XẾP HẠNG",rightSlot:(0,a.jsx)("div",{className:"text-[12px] text-slate-600",children:(0,a.jsx)("span",{className:"text-slate-900/80 font-bold",children:e.league_name})})}),g.length>0&&(0,a.jsxs)("div",{className:"mb-6",ref:u,children:[(0,a.jsxs)("div",{className:"relative inline-flex min-w-[320px] items-center gap-3 rounded-2xl border border-slate-200 bg-white backdrop-blur-md px-5 py-3.5 cursor-pointer shadow-[0_8px_30px_rgba(0,0,0,0.06)] transition-colors hover:border-[#4681E8]/50 hover:shadow-[0_8px_30px_rgba(70,129,232,0.1)]",onClick:()=>r(!s),children:[e.league_icon&&(0,a.jsx)("img",{src:e.league_icon,alt:e.league_name||"League icon",className:"w-6 h-6 object-contain",loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-slate-800 font-bold text-sm flex-1",children:e.league_name||"Chọn giải đấu"}),(0,a.jsx)("svg",{className:`w-4 h-4 text-[#4681E8] transition-transform ${s?"rotate-180":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),s&&(0,a.jsxs)("div",{className:"absolute z-50 mt-2 w-[360px] overflow-hidden rounded-2xl border border-slate-200 bg-white backdrop-blur-xl shadow-[0_24px_80px_rgba(0,0,0,0.15)]",children:[(0,a.jsx)("div",{className:"p-2 border-b border-slate-100",children:(0,a.jsx)("input",{type:"text",placeholder:"T\xecm kiếm giải đấu...",value:i,onChange:e=>p(e.target.value),className:"w-full bg-slate-50 text-slate-800 text-sm px-4 py-2.5 rounded-xl border border-transparent outline-none focus:border-[#4681E8]/50 placeholder-slate-400 transition-colors",autoF
314ocus:!0})}),(0,a.jsxs)("div",{className:"max-h-[340px] overflow-y-auto",children:[b.map(t=>(0,a.jsxs)("a",{href:`/standings?league=${encodeURIComponent(t.id)}`,className:`flex items-center gap-3 px-4 py-3 cursor-pointer transition-colors hover:bg-slate-50 ${t.id===e.league_id?"bg-[#4681E8]/10 border-l-4 border-[#4681E8]":""}`,children:[t.icon?(0,a.jsx)("img",{src:t.icon,alt:t.name||"League",className:"w-5 h-5 object-contain flex-shrink-0",loading:"lazy",decoding:"async"}):(0,a.jsx)("div",{className:"w-5 h-5 rounded bg-gray-700 flex-shrink-0"}),(0,a.jsx)("span",{className:"text-sm text-slate-900 truncate",children:t.name})]},t.id)),0===b.length&&(0,a.jsx)("div",{className:"px-4 py-8 text-center text-gray-500 text-sm",children:"Kh\xf4ng t\xecm thấy giải đấu"})]})]})]}),t&&(0,a.jsxs)("div",{className:"flex items-center justify-center py-12",children:[(0,a.jsx)("div",{className:"animate-spin w-8 h-8 border-2 border-emerald-600 border-t-transparent rounded-full"}),(0,a.jsx)("span",{className:"ml-3 text-slate-600 text-sm",children:"Đang tải bảng xếp hạng từ server..."})]}),!t&&f&&(0,a.jsxs)("div",{className:"overflow-hidden rounded-[24px] border border-slate-200 bg-white shadow-[0_8px_30px_rgba(0,0,0,0.08)]",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between gap-3 border-b border-[#4681E8]/20 bg-gradient-to-r from-[#4681E8] to-[#2563eb] px-6 py-4 text-white shadow-[0_4px_25px_rgba(70,129,232,0.3)]",children:[(0,a.jsx)("div",{className:"text-[13px] font-black uppercase tracking-[0.2em] drop-shadow-sm text-white/80",children:"League"}),(0,a.jsx)("div",{className:"truncate text-sm font-black sm:text-base drop-shadow-md",children:e.league_name})]}),(0,a.jsx)("div",{className:"overflow-x-auto",children:(0,a.jsxs)("table",{className:"w-full text-left border-collapse",children:[(0,a.jsx)("thead",{children:(0,a.jsx)("tr",{className:"bg-slate-50 text-[11px] uppercase tracking-[0.2em] text-slate-500",children:e.header.map((t,s)=>{let l=e.teams.some(e=>e.form&&e.form.length>0);return t.toLowerCase().includes("phong độ")&&!l?null:(0,a.jsx)("th",{colSpan:s===e.header.length-1&&l?5:1,className:`p-4 font-semibold ${1===s?"w-1/3 text-left":"text-center"}`,children:t},s)})})}),(0,a.jsx)("tbody",{className:"text-sm",children:e.teams.map((t,s)=>(o(Number(t.data[0]||s+1),e.teams.length),(0,a.jsxs)("tr",{className:"group border-b border-slate-100 bg-white transition-colors hover:bg-slate-50 cursor-pointer",children:[t.data.map((s,l)=>0===l?(0,a.jsx)(x,{value:s,totalTeams:e.teams.length},l):1===l?(0,a.jsx)("td",{className:"p-4",children:(0,a.jsxs)("div",{className:"flex items-center gap-3 rounded-2xl border border-slate-100 bg-slate-50 px-4 py-2.5 transition-colors group-hover:border-[#4681E8]/30 group-hover:bg-[#4681E8]/5",children:[t.team_logo?(0,a.jsx)("img",{src:t.team_logo,alt:s,className:"h-8 w-8 rounded-full bg-white object-contain p-0.5 filter drop-shadow-[0_2px_4px_rgba(0,0,0,0.1)]",loading:"lazy"}):(0,a.jsx)("div",{className:"flex h-8 w-8 items-center justify-center rounded-full border border-slate-200 bg-white text-[10px] font-bold text-slate-400",children:"?"}),(0,a.jsx)("span",{className:"font-bold text-slate-800 transition-colors group-hover:text-[#4681E8]",children:s})]})},l):(0,a.jsx)("td",{className:"p-4 text-center font-mono text-slate-600",children:s},l)),t.form&&t.form.length>0&&(0,a.jsxs)(a.Fragment,{children:[t.form.map((e,t)=>(0,a.jsx)("td",{className:"p-2 text-center",children:e.match_time?(0,a.jsx)(c,{detail:e}):(0,a.jsx)(d,{result:e.result})},`form-${t}`)),t.form.length<5&&Array.from({length:5-t.form.length}).map((e,t)=>(0,a.jsx)("td",{className:"p-2"},`pad-${t}`))]})]},s)))})]})})]}),!t&&!f&&j&&(0,a.jsx)(m,{rankings:e.rankings}),!t&&!f&&!j&&e.header&&e.teams&&(0,a.jsx)("div",{className:"text-center py-20 text-slate-600",children:"Dữ liệu đang được cập nhật..."}),!t&&(f||j)&&(0,a.jsxs)("div",{className:"mt-6 flex flex-wrap items-center gap-5 px-5 py-4 bg-slate-50 rounded-2xl border border-slate-200",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,a.jsx)("span",{className:"w-2.5 h-2.5 rounded-full bg-emerald-500"}),(0,a.jsx)("span",{className:"text-[11px] text-slate-600 font-bold uppercase tracking-wider",children:"Đội trưởng bảng"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,a.jsx)("span",{className:"w-2.5 h-2.5 rounded-full bg-sky-4
31400"}),(0,a.jsx)("span",{className:"text-[11px] text-slate-600 font-bold uppercase tracking-wider",children:"Champions League"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,a.jsx)("span",{className:"w-2.5 h-2.5 rounded-full bg-amber-500"}),(0,a.jsx)("span",{className:"text-[11px] text-slate-600 font-bold uppercase tracking-wider",children:"Europa League"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,a.jsx)("span",{className:"w-2.5 h-2.5 rounded-full bg-[#f97316]"}),(0,a.jsx)("span",{className:"text-[11px] text-slate-600 font-bold uppercase tracking-wider",children:"Europa Conference"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,a.jsx)("span",{className:"w-2.5 h-2.5 rounded-full bg-[#E11D48]"}),(0,a.jsx)("span",{className:"text-[11px] text-slate-600 font-bold uppercase tracking-wider",children:"Xuống hạng"})]})]})]})}function m({rankings:e}){if(!e||0===e.length)return null;let t=e[0].data,s=e.slice(1);return(0,a.jsx)("div",{className:"overflow-hidden rounded-[22px] border border-[#cbd5e1] bg-[linear-gradient(180deg,#191a20,#111218)] shadow-[0_24px_80px_rgba(0,0,0,0.4)]",children:(0,a.jsx)("div",{className:"overflow-x-auto",children:(0,a.jsxs)("table",{className:"w-full text-left border-collapse",children:[(0,a.jsx)("thead",{children:(0,a.jsx)("tr",{className:"bg-white text-[11px] uppercase tracking-[0.18em] text-slate-600",children:t.map((e,l)=>{let r=l===t.length-1,n=s[0]&&s[0].data.length>t.length?s[0].data.length-t.length+1:1;return(0,a.jsx)("th",{colSpan:r?n:1,className:`p-4 font-semibold ${1===l?"w-1/3 text-left":"text-center"}`,children:e},l)})})}),(0,a.jsx)("tbody",{className:"text-sm",children:s.map((e,t)=>(0,a.jsx)("tr",{className:"group border-b border-[#cbd5e1] transition-colors hover:bg-white",children:e.data.map((t,l)=>0===l?(0,a.jsx)(x,{value:t,totalTeams:s.length},l):1===l?(0,a.jsx)("td",{className:"p-4",children:(0,a.jsxs)("div",{className:"flex items-center gap-3 rounded-2xl border border-white/6 bg-[linear-gradient(180deg,rgba(255,255,255,0.03),rgba(255,255,255,0.01))] px-3 py-2 transition-colors group-hover:border-emerald-600/22",children:[e.team_logo?(0,a.jsx)("img",{src:e.team_logo,alt:t,className:"h-8 w-8 rounded-full bg-white/5 object-contain ring-1 ring-white/8",loading:"lazy"}):(0,a.jsx)("div",{className:"flex h-8 w-8 items-center justify-center rounded-full border border-gray-700 bg-gray-800 text-xs font-bold text-gray-500",children:"?"}),(0,a.jsx)("span",{className:"font-bold text-slate-900 transition-colors group-hover:text-emerald-600",children:t})]})},l):["W","D","L"].includes(t)?(0,a.jsx)("td",{className:"p-2 text-center",children:(0,a.jsx)("span",{className:`inline-flex h-7 w-7 items-center justify-center rounded-[8px] text-[11px] font-black ${i(t)}`,children:t})},l):(0,a.jsx)("td",{className:"p-4 text-center font-mono text-slate-600",children:t},l))},t))})]})})})}},28480:(e,t,s)=>{"use strict";s.d(t,{Klivevip11ResultsPage:()=>o});var a=s(68019),l=s(10707),r=s(78637),n=s(31307),i=s(77935);function o({initialData:e,selectedLeague:t}){let s=(0,r.useRouter)(),c=(0,r.usePathname)(),d=(0,r.useSearchParams)(),[x,h]=(0,l.useTransition)(),[m,p]=(0,l.useState)(!1),[u,g]=(0,l.useState)(""),{availableLeagues:b,dateGroups:f}=(0,l.useMemo)(()=>(0,i.o8)(e),[e]),j=(0,l.useMemo)(()=>Array.from(new Set(f.map(e=>e.date_header))),[f]),w=d.get("date")||"",v=e=>{let t=new URLSearchParams(d.toString());e&&e!==w?t.set("date",e):t.delete("date"),h(()=>{let e=t.toString();s.push(e?`${c}?${e}`:c,{scroll:!1})})},N=(0,l.useMemo)(()=>{let e=f;return w&&(e=e.filter(e=>e.date_header===w)),(0,i.kK)(e,t)},[f,w,t]),y=(0,l.useMemo)(()=>{if(!u)return b;let e=u.toLowerCase();return b.filter(t=>t.name.toLowerCase().includes(e))},[b,u]),_=N.reduce((e,t)=>e+t.matches.length,0);if(0===f.length)return(0,a.jsxs)("div",{className:"max-w-[1440px] mx-auto px-4 py-8",children:[(0,a.jsx)(n.D,{eyebrow:"Kết quả",title:"KẾT QUẢ B\xd3NG Đ\xc1"}),(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center py-16 gap-4",children:[(0,a.jsx)("div",{className:"w-12 h-12 rounded-full border-2 border-[#
314E11D48]/30 border-t-[#E11D48] animate-spin"}),(0,a.jsx)("span",{className:"text-slate-500 text-sm font-medium tracking-wide",children:"Đang tải kết quả..."})]})]});let k=e=>{let t=new URLSearchParams(d.toString());e?t.set("league",e):t.delete("league"),p(!1),g(""),h(()=>{let e=t.toString();s.push(e?`${c}?${e}`:c,{scroll:!1})})};return(0,a.jsxs)("div",{className:"max-w-[1440px] mx-auto px-4 py-8",children:[(0,a.jsx)(n.D,{eyebrow:"Kết quả",title:"KẾT QUẢ B\xd3NG Đ\xc1",rightSlot:(0,a.jsx)("div",{className:"text-[12px] text-slate-600",children:(0,a.jsx)("span",{className:"text-slate-900/80 font-bold",children:t||"Tất cả giải đấu"})})}),(0,a.jsxs)("div",{className:"flex flex-col md:flex-row gap-4 mb-4 items-start md:items-center justify-between",children:[j.length>0&&(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,a.jsx)("button",{type:"button",onClick:()=>v(""),className:`px-4 py-2 rounded-xl text-sm font-bold transition-all duration-300 ${!w?"bg-gradient-to-r from-[#4681E8] to-[#2563eb] text-white shadow-[0_4px_15px_rgba(70,129,232,0.4)] border border-[#4681E8]/50":"bg-white text-[#64748B] border border-slate-200 hover:bg-slate-50 hover:text-slate-800"}`,children:"Tất cả ng\xe0y"}),j.slice(0,5).map(e=>(0,a.jsx)("button",{type:"button",onClick:()=>v(e),className:`px-4 py-2 rounded-xl text-sm font-bold transition-all duration-300 ${w===e?"bg-gradient-to-r from-[#4681E8] to-[#2563eb] text-white shadow-[0_4px_15px_rgba(70,129,232,0.4)] border border-[#4681E8]/50":"bg-white text-[#64748B] border border-slate-200 hover:bg-slate-50 hover:text-slate-800"}`,children:e},e))]}),(0,a.jsxs)("div",{className:"relative w-full md:w-[320px]",children:[(0,a.jsxs)("button",{onClick:()=>p(!m),className:"w-full flex items-center gap-3 bg-white hover:bg-slate-50 px-4 py-2.5 rounded-xl border border-slate-200 shadow-inner transition-all text-sm",children:[(0,a.jsx)("svg",{className:"w-5 h-5 text-[#4681E8]",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 4a1 1 0 011-1h16a1 1 0 011 1v2.586a1 1 0 01-.293.707l-6.414 6.414a1 1 0 00-.293.707V17l-4 4v-6.586a1 1 0 00-.293-.707L3.293 7.293A1 1 0 013 6.586V4z"})}),(0,a.jsx)("span",{className:"text-slate-700 font-bold flex-1 text-left truncate",children:t||"Chọn giải đấu..."}),(0,a.jsx)("svg",{className:`w-4 h-4 text-slate-400 transition-transform ${m?"rotate-180":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),m&&(0,a.jsxs)("div",{className:"absolute top-full left-0 right-0 mt-2 bg-white border border-slate-200 rounded-2xl shadow-xl z-50 max-h-[300px] overflow-hidden flex flex-col",children:[(0,a.jsx)("div",{className:"p-2 border-b border-slate-100",children:(0,a.jsx)("input",{type:"text",placeholder:"T\xecm giải đấu...",value:u,onChange:e=>g(e.target.value),className:"w-full bg-slate-50 border border-transparent rounded-xl px-4 py-2.5 text-sm text-slate-800 placeholder-slate-400 outline-none focus:border-[#4681E8]/50 transition-colors"})}),(0,a.jsxs)("div",{className:"overflow-y-auto flex-1 pb-2",children:[(0,a.jsx)("button",{type:"button",onClick:()=>k(),className:`block w-full text-left px-4 py-3 text-sm transition-colors ${!t?"bg-[#4681E8]/10 text-[#4681E8] border-l-4 border-[#4681E8]":"text-slate-600 hover:bg-slate-50 hover:text-slate-800"}`,children:"Tất cả giải đấu"}),y.map((e,s)=>(0,a.jsxs)("button",{type:"button",onClick:()=>k(e.name),className:`flex items-center gap-3 px-4 py-3 text-sm transition-colors cursor-pointer ${t===e.name?"bg-[#4681E8]/10 text-[#4681E8] border-l-4 border-[#4681E8]":"text-slate-600 hover:bg-slate-50 hover:text-slate-800"}`,children:[e.icon?(0,a.jsx)("img",{src:e.icon,alt:e.name||"League",className:"w-5 h-5 object-contain shrink-0",loading:"lazy",decoding:"async"}):(0,a.jsx)("div",{className:"w-5 h-5 rounded-md bg-slate-200 shrink-0"}),(0,a.jsx)("span",{className:"truncate",children:e.name})]},s))]})]})]})]}),x&&(0,a.jsxs)("div",{className:"mb-4 inline-flex items-center gap-2 rounded-full border border-slate-200 bg-white px-4 py-2 text-xs text-slate-500 shadow-sm",children:[(0,a.jsx)("span",{className:"h-2 w-2 rounded-full bg-[#E11D48] animate-pulse shadow-[0_0_8px_rgba(225,29,72,0.8)]"}),(0,a.jsx)("span",{className:"font-bold tracking-wide",children:"Đang tải kết quả từ server..."})]}),(0,a.jsx)("div",{className:"space-y-4",children:0===N.length?(0,a.jsx)("div",{className:"text-center py-16 text-[#64748B] font-medium tracking-wide",children:"Kh\xf4ng c\xf3 kết quả n\xe0o"}):N.map((e,t)=>(0,a.jsxs)("div",{className:"overflow-hidden rounded-2xl border border-slate-200 bg-white shadow-[0_8px_30px_rgba(0,0,0,0.06)]",children:[(0,a.jsx)("div",{className:"bg-slate-50 px-5 py-3 border-b border-slate-100 flex items-center justify-between",children:(0,a.jsxs)("span",{className:"text-[12px] text-slate-500 font-bold uppercase tracking-widest",children:[e.league_round?e.league_round:"V\xf2ng đấu",(0,a.jsx)("span",{className:"text-[#E11D48] ml-2 font-mono text-[11px] bg-[#E11D48]/10 px-2 py-0.5 rounded-full border border-[#
314E11D48]/20",children:e.date_header})]})}),e.matches.map((e,t)=>{var s;return(0,a.jsx)("div",{className:"bg-transparent hover:bg-slate-50 border-b border-slate-100 last:border-0 transition-colors group cursor-default",children:(0,a.jsxs)("div",{className:"flex items-center py-4 px-5 gap-4",children:[(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center min-w-[56px] shrink-0 border-r border-slate-100 pr-4",children:[(0,a.jsx)("span",{className:"text-[9px] text-slate-400 uppercase tracking-widest mb-1 font-bold",children:"L\xfac"}),(0,a.jsx)("span",{className:"text-[13px] text-slate-700 font-mono font-black",children:e.time})]}),(0,a.jsxs)("div",{className:"flex-1 flex items-center justify-end gap-3 min-w-0",children:[(0,a.jsx)("span",{className:"text-[14px] text-slate-800 font-bold truncate text-right group-hover:text-slate-900 transition-colors",children:e.home_team}),e.home_logo?(0,a.jsx)("div",{className:"w-8 h-8 rounded-full bg-slate-100 border border-slate-200 p-1 flex items-center justify-center shadow-sm",children:(0,a.jsx)("img",{src:e.home_logo,alt:e.home_team||"Home team",className:"w-full h-full object-contain",loading:"lazy"})}):(0,a.jsx)("div",{className:"w-8 h-8 rounded-full bg-slate-100 shrink-0 border border-slate-200 flex items-center justify-center text-[10px] font-bold text-slate-400",children:"?"})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center min-w-[90px] shrink-0 bg-slate-50 rounded-xl py-2 px-2 border border-slate-200 shadow-inner group-hover:border-[#4681E8]/40 transition-colors",children:[(0,a.jsx)("span",{className:`text-[22px] leading-none font-black tracking-widest drop-shadow-[0_2px_4px_rgba(0,0,0,0.8)] ${!(s=e.score)||"-"===s?"text-slate-400":"text-slate-800"}`,children:e.score}),e.ht_score&&(0,a.jsxs)("span",{className:"text-[10px] text-slate-500 font-mono mt-1 font-bold",children:["HT: ",e.ht_score]})]}),(0,a.jsxs)("div",{className:"flex-1 flex items-center gap-3 min-w-0",children:[e.away_logo?(0,a.jsx)("div",{className:"w-8 h-8 rounded-full bg-slate-100 border border-slate-200 p-1 flex items-center justify-center shadow-sm",children:(0,a.jsx)("img",{src:e.away_logo,alt:e.away_team||"Away team",className:"w-full h-full object-contain",loading:"lazy"})}):(0,a.jsx)("div",{className:"w-8 h-8 rounded-full bg-slate-100 shrink-0 border border-slate-200 flex items-center justify-center text-[10px] font-bold text-slate-400",children:"?"}),(0,a.jsx)("span",{className:"text-[14px] text-slate-800 font-bold truncate text-left group-hover:text-slate-900 transition-colors",children:e.away_team})]})]})},t)})]},t))}),(0,a.jsxs)("div",{className:"mt-6 text-center text-xs text-[#64748B] font-bold uppercase tracking-widest drop-shadow-sm",children:["Hiển thị ",_," kết quả trận đấu"]})]})}},28964:(e,t,s)=>{"use strict";s.d(t,{Klivevip26SchedulePage:()=>d});var a=s(68019),l=s(10707),r=s(78637),n=s(88435);function i({html:e}){return e?.trim()?(0,a.jsx)("section",{className:"relative mt-10 mb-6",children:(0,a.jsx)("div",{className:"seo-prose relative",children:(0,a.jsx)("div",{dangerouslySetInnerHTML:{__html:e},className:"text-slate-600 text-[14px] leading-[1.85] px-1 [&_strong]:text-slate-900 [&_a]:text-[#4681E8]"})})}):null}s(44812);let o=`
315<h2>Lịch thi đấu b\xf3ng đ\xe1 - Cập nhật lịch b\xf3ng đ\xe1 h\xf4m nay nhanh v\xe0 ch\xednh x\xe1c</h2>
316
317<p>Để <strong>xem lịch thi đấu b\xf3ng đ\xe1</strong> nhanh, ch\xednh x\xe1c v\xe0 đầy đủ nhất, Klive ch\xednh l\xe0 nơi bạn n\xean chọn. Ch\xfang t\xf4i cập nhật lịch thi đấu cho to\xe0n bộ c\xe1c giải đấu trong nước v\xe0 quốc tế, gi\xfap bạn kh\xf4ng bỏ lỡ bất kỳ trận cầu hấp dẫn n\xe0o.</p>
318
319<img src="/images/seo/schedule-football.png" alt="Lịch thi đấu b\xf3ng đ\xe1 h\xf4m nay tại Klive" loading="lazy" />
320
321<div class="toc-box">
322  <h3>Nội dung ch\xednh</h3>
323  <ol>
324    <li>Lịch thi đấu b\xf3ng đ\xe1 trực tuyến h\xe0ng đầu</li>
325    <li>Lịch b\xf3ng đ\xe1 nhanh v\xe0 ch\xednh x\xe1c</li>
326    <li>Cập nhật lịch Ngoại Hạng Anh v\xe0 Champions League</li>
327    <li>C\xe1ch xem lịch thi đấu hiệu quả nhất</li>
328  </ol>
329</div>
330
331<h2>Lịch thi đấu b\xf3ng đ\xe1 trực tuyến h\xe0ng đầu</h2>
332<p>Trong thời đại số, kh\xf4ng ai c\xf2n xem lịch b\xf3ng đ\xe1 tr\xean TV hay b\xe1o giấy nữa. Tất cả đ\xe3 chuyển sang theo d\xf5i online, v\xe0 Klive ch\xednh l\xe0 nền tảng cập nhật lịch b\xf3ng đ\xe1 được đ\xe1nh gi\xe1 cao nhất.</p>
333
334<p>Khi truy cập Klive, bạn c\xf3 thể xem lịch thi đấu của bất kỳ giải đấu b\xf3ng đ\xe1 n\xe0o tr\xean thế giới một c\xe1ch ho\xe0n to\xe0n miễn ph\xed. Th\xf4ng tin lịch đấu được cập nhật sớm nhất v\xe0 chi tiết đến từng ph\xfat.</p>
335
336<h2>Lịch b\xf3ng đ\xe1 nhanh v\xe0 ch\xednh x\xe1c</h2>
337<p>Klive kh\xf4ng chỉ cung cấp lịch thi đấu c\xe1c giải đấu h\xe0ng đầu m\xe0 c\xf2n cập nhật lịch ph\xe1t s\xf3ng tr\xean c\xe1c k\xeanh truyền h\xecnh Việt Nam như K+, FPT Play, VTV Sports. Gi\xfap bạn biết trận n\xe0o được chiếu trực tiếp tr\xean TV v\xe0 sắp xếp thời gian hợp l\xfd.</p>
338
339<h2>Cập nhật lịch Ngoại Hạng Anh v\xe0 Champions League</h2>
340<p>Ngoại Hạng Anh v\xe0 Champions League l\xe0 hai giải đấu được quan t\xe2m nhất. Tại Klive, bạn lu\xf4n nắm được lịch đấu đầy đủ từ v\xf2ng bảng đến chung kết, k\xe8m theo th\xf4ng tin về đội h\xecnh dá»± kiến, phong độ v\xe0 lịch sá»­ đối đầu để chuẩn bị tốt nhất cho má
340»—i trận cầu.</p>
341
342<p>Kết hợp lịch thi đấu với trang trực tiếp b\xf3ng đ\xe1, bạn sẽ c\xf3 trải nghiệm theo d\xf5i b\xf3ng đ\xe1 ho\xe0n hảo nhất - biết trước, xem ngay, kh\xf4ng bỏ lỡ!</p>
343`;var c=s(58653);function d({initialData:e}){let t=(0,r.usePathname)(),[s,h]=(0,l.useState)(!1),[m,p]=(0,l.useState)(new Set),[u,g]=(0,l.useState)(""),[b,f]=(0,l.useState)(!1),[j,w]=(0,l.useState)(0),v=(0,l.useMemo)(()=>(0,c.p_)(e),[e]),N=v.dateTabs,y=(0,l.useMemo)(()=>{if(!v.selectedDate)return 0;let e=N.findIndex(e=>(e.dataValue||e.date)===v.selectedDate);return e>=0?e:0},[N,v.selectedDate]),[_,k]=(0,l.useState)(y),[E,C]=(0,l.useState)(v.leagues||[]),S=(0,l.useMemo)(()=>{if(!u)return E;let e=u.toLowerCase();return E.filter(t=>t.league_name.toLowerCase().includes(e)||t.matches.some(t=>t.home_team.toLowerCase().includes(e)||t.away_team.toLowerCase().includes(e)))},[E,u]),L=Math.max(0,N.length-7),$=N.slice(j,j+7),F=j>0,T=j<L,A=S.reduce((e,t)=>e+t.matches.length,0);return((0,l.useEffect)(()=>{if(!v.selectedDate||!N.length)return;let e=N.findIndex(e=>(e.dataValue||e.date)===v.selectedDate);e>=0&&k(e)},[N,v.selectedDate]),(0,l.useEffect)(()=>{_<j?w(Math.max(0,_)):_>=j+7&&w(Math.min(L,_-7+1))},[_,L,j]),e)?(0,a.jsxs)("div",{className:"max-w-[1440px] mx-auto px-4 py-8",children:[(0,a.jsx)(n.H,{eyebrow:"Lịch thi đấu",title:"LỊCH THI ĐẤU",rightSlot:(0,a.jsxs)("div",{className:"text-[12px] text-slate-500 font-bold uppercase tracking-wider",children:[(0,a.jsx)("span",{className:"text-[#E11D48] font-black",children:S.reduce((e,t)=>e+t.matches.length,0)})," trận đấu"]})}),(0,a.jsxs)("div",{className:"flex items-center mb-4 rounded-xl overflow-hidden border border-slate-200 bg-white shadow-sm",children:[(0,a.jsx)("button",{type:"button",disabled:!F,onClick:()=>w(e=>Math.max(0,e-1)),className:`flex items-center justify-center w-8 h-[52px] bg-slate-100 border-r border-slate-200 text-slate-600 hover:text-slate-800 hover:bg-slate-200 transition-all shrink-0 ${!F?"opacity-30":"cursor-pointer"}`,children:(0,a.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2.5,d:"M15 19l-7-7 7-7"})})}),(0,a.jsx)("div",{className:"flex flex-1",children:$.map((e,s)=>{let l=j+s;return(0,a.jsxs)("button",{type:"button",onClick:()=>(e=>{let s=N[e];if(!s||e===_)return;let a=s.dataValue||s.date;a&&(k(e),p(new Set),h(!0),window.history.replaceState(null,"",`${t}?date=${encodeURIComponent(a)}`),fetch(`/api/socolive/fixtures?date=${encodeURIComponent(a)}`,{cache:"no-store"}).then(e=>e.ok?e.json():null).then(e=>{e&&C((0,c.p_)(e).leagues||[])}).finally(()=>h(!1)))})(l),className:`flex-1 flex flex-col items-center justify-center h-[52px] border-b-[3px] transition-all duration-300 ${_===l?"border-[#4681E8] text-[#4681E8] bg-[#4681E8]/5":"border-transparent text-[#64748B] hover:text-[#94A3B8] hover:bg-slate-100"}`,children:[(0,a.jsx)("span",{className:`text-[11px] font-bold uppercase tracking-widest ${_===l?"text-[#4681E8]":""}`,children:e.label}),(0,a.jsx)("span",{className:`text-[12px] font-mono mt-0.5 ${_===l?"text-slate-800 font-black":""}`,children:e.date})]},`tab-${l}`)})}),(0,a.jsx)("button",{type:"button",disabled:!T,onClick:()=>w(e=>Math.min(L,e+1)),className:`flex items-center justify-center w-8 h-[52px] bg-slate-100 border-l border-slate-200 text-slate-600 hover:text-slate-800 hover:bg-slate-200 transition-all shrink-0 ${!T?"opacity-30":"cursor-pointer"}`,children:(0,a.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2.5,d:"M9 5l7 7-7 7"})})})]}),(0,a.jsxs)("div",{className:"relative mb-4",children:[(0,a.jsxs)("button",{onClick:()=>f(!b),className:"flex items-center gap-3 bg-white hover:bg-slate-50 px-4 py-2.5 rounded-xl border border-slate-200 shadow-sm transition-all text-sm group",children:[(0,a.jsx)("svg",{className:"w-5 h-5 text-[#E11D48] transition-colors group-hover:text-[#F43F5E]",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 6h16M4 12h16M4 18h16"})}),(0,a.jsx)("span",{className:"text-slate-700 font-bold text-[13px] uppercase tracking-wide",children:"Danh s\xe1ch giải đấu"}),(0,a.jsx)("svg",{className:`w-4 h-4 text-slate-500 transition-transform duration-300 ${b?"rotate-180":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),b&&(0,a.jsxs)("div",{className:"absolute top-full left-0 mt-2 w-[360px] bg-white border border-slate-200 rounded-2xl shadow-[0_24px_80px_rgba(0,0,0,0.12)] z-50 max-h-[320px] overflow-hidden flex flex-col",children:[(0,a.jsx)("div",{className:"p-2 border-b border-slate-100",children:(0,a.jsx)("input",{type:"text",placeholder:"T\xecm giải đấu...",value:u,onChange:e=>g(e.target.value),className:"w-full bg-slate-50 border border-transparent roun
343ded-xl px-4 py-2.5 text-sm text-slate-800 placeholder-slate-400 outline-none focus:border-[#4681E8]/50 transition-colors"})}),(0,a.jsx)("div",{className:"overflow-y-auto flex-1 py-2",children:E.map((e,t)=>(0,a.jsxs)("button",{type:"button",onClick:()=>{g(e.league_name),f(!1)},className:"w-full flex items-center gap-3 px-4 py-2.5 hover:bg-slate-50 text-left text-[13px] transition-colors",children:[e.league_icon?(0,a.jsx)("img",{src:e.league_icon,alt:e.league_name||"League",className:"w-5 h-5 object-contain shrink-0",loading:"lazy",decoding:"async"}):(0,a.jsx)("div",{className:"w-5 h-5 rounded-md bg-slate-200 shrink-0"}),(0,a.jsx)("span",{className:"text-slate-600 truncate flex-1 font-medium",children:e.league_name}),(0,a.jsx)("span",{className:"text-[11px] text-[#E11D48] font-bold shrink-0 px-2 py-0.5 bg-[#E11D48]/10 rounded-md border border-[#E11D48]/20",children:e.matches.length})]},t))})]})]}),(0,a.jsxs)("div",{className:"grid grid-cols-[1fr_60px_55px_100px_100px_90px] bg-slate-50 border border-slate-200 rounded-t-xl px-4 py-3 text-[11px] text-slate-500 font-black uppercase tracking-widest shadow-inner",children:[(0,a.jsx)("span",{children:"Trận đấu"}),(0,a.jsx)("span",{className:"text-center",children:"Tỷ số"}),(0,a.jsx)("span",{className:"text-center",children:"Hiệp 1"}),(0,a.jsx)("span",{className:"text-center",children:"Cược chấp"}),(0,a.jsx)("span",{className:"text-center",children:"T\xe0i/Xỉu"}),(0,a.jsx)("span",{className:"text-center",children:"1 X 2"})]}),(0,a.jsxs)("div",{className:"border border-slate-200 border-t-0 rounded-b-xl overflow-hidden relative shadow-[0_8px_30px_rgba(0,0,0,0.06)]",children:[s&&(0,a.jsx)("div",{className:"absolute inset-0 z-10 bg-white/80 backdrop-blur-[2px]",children:(0,a.jsx)("div",{className:"space-y-0",children:[...Array(6)].map((e,t)=>(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 px-4 py-3.5 bg-slate-100 border-b border-slate-200",children:[(0,a.jsx)("div",{className:"w-4 h-4 rounded bg-slate-300 animate-pulse"}),(0,a.jsx)("div",{className:"h-3.5 rounded bg-slate-200 animate-pulse",style:{width:`${120+30*t}px`}})]}),[void 0,void 0].map((e,t)=>(0,a.jsxs)("div",{className:"grid grid-cols-[1fr_60px_55px_100px_100px_90px] items-center px-4 py-3 border-b border-slate-100",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)("div",{className:"w-10 h-3.5 rounded bg-slate-200 animate-pulse"}),(0,a.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,a.jsx)("div",{className:"h-3 w-24 rounded bg-slate-100 animate-pulse"}),(0,a.jsx)("div",{className:"h-3 w-20 rounded bg-slate-100 animate-pulse"})]})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5",children:[(0,a.jsx)("div",{className:"h-3 w-5 rounded bg-slate-100 animate-pulse"}),(0,a.jsx)("div",{className:"h-3 w-5 rounded bg-slate-100 animate-pulse"})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5",children:[(0,a.jsx)("div",{className:"h-3 w-5 rounded bg-slate-100 animate-pulse"}),(0,a.jsx)("div",{className:"h-3 w-5 rounded bg-slate-100 animate-pulse"})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5",children:[(0,a.jsx)("div",{className:"h-3 w-14 rounded bg-slate-100 animate-pulse"}),(0,a.jsx)("div",{className:"h-3 w-10 rounded bg-slate-100 animate-pulse"})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5",children:[(0,a.jsx)("div",{className:"h-3 w-14 rounded bg-slate-100 animate-pulse"}),(0,a.jsx)("div",{className:"h-3 w-10 rounded bg-slate-100 animate-pulse"})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5",children:[(0,a.jsx)("div",{className:"h-3 w-10 rounded bg-slate-100 animate-pulse"}),(0,a.jsx)("div",{className:"h-3 w-10 rounded bg-slate-100 animate-pulse"}),(0,a.jsx)("div",{className:"h-3 w-10 rounded bg-slate-100 animate-pulse"})]})]},t))]},t))})}),0!==S.length||s?S.map((e,t)=>(0,a.jsxs)("div",{id:`league-${t}`,children:[(0,a.jsxs)("button",{onClick:()=>{p(e=>{let s=new Set(e);return s.has(t)?s.delete(t):s.add(t),s})},className:"w-full flex items-center gap-3 px-4 py-3 bg-slate-50 hover:bg-slate-100 border-b border-slate-100 transition-colors text-left group",children:[(0,a.jsx)("svg",{className:`w-4 h-4 text-[#E11D48] transition-transform duration-300 shrink-0 ${m.has(t)?"-rotate-90":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2.5,d:"M19 9l-7 7-7-7"})}),e.league_icon&&(0,a.jsx)("div",{className:"w-6 h-6 rounded-full bg-slate-100 p-0.5 border border-slate-200 flex items-center justify-center shadow-sm",children:(0,a.jsx)("img",{src:e.league_icon,alt:e.league_name||"League",className:"w-4 h-4 object-contain shrink-0",loading:"lazy",decoding:"async"})}),(0,a.jsx)("span",{className:"text-[13px] font-bold text-slate-700 flex-1 truncate uppercase tracking-widest",children:e.league_name}),(0,a.jsxs)("span",{className:"text-[11px] text-[#E11D48] font-bold shrink-0 ml-1 px-2 py-0.5 bg-[#E11D48]/10 rounded border border-[#
343E11D48]/20 group-hover:bg-[#E11D48]/20 transition-colors",children:["BXH ",(0,a.jsx)("svg",{className:"inline w-3 h-3 ml-0.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 6h16M4 10h16M4 14h16M4 18h16"})})]})]}),!m.has(t)&&e.matches.map((e,t)=>(0,a.jsxs)("div",{className:"grid grid-cols-[1fr_60px_55px_100px_100px_90px] items-center px-4 py-3 bg-transparent hover:bg-slate-50 border-b border-slate-100 last:border-0 transition-colors group cursor-default",children:[(0,a.jsxs)("div",{className:"flex items-center gap-4 min-w-0",children:[(0,a.jsx)("span",{className:"text-[#E11D48] font-mono text-[13px] font-black min-w-[42px] shrink-0 drop-shadow-[0_0_4px_rgba(225,29,72,0.4)]",children:e.time}),(0,a.jsxs)("div",{className:"flex flex-col gap-1 min-w-0 flex-1",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[e.home_logo&&(0,a.jsx)("img",{src:e.home_logo,alt:e.home_team||"Home team",className:"w-4 h-4 object-contain shrink-0 filter drop-shadow-[0_2px_2px_rgba(0,0,0,0.8)]",loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-[13px] text-slate-700 font-medium truncate group-hover:text-slate-900 transition-colors",children:e.home_team})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[e.away_logo&&(0,a.jsx)("img",{src:e.away_logo,alt:e.away_team||"Away team",className:"w-4 h-4 object-contain shrink-0",loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-[13px] text-slate-700 font-medium truncate group-hover:text-slate-900 transition-colors",children:e.away_team})]})]})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center",children:[(0,a.jsx)("span",{className:"text-[12px] text-[var(--accent-cyan)] font-mono font-bold",children:"-"!==e.score?e.score:"-"}),(0,a.jsx)("span",{className:"text-[12px] text-[#64748B]",children:"-"})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center",children:[(0,a.jsx)("span",{className:"text-[12px] text-[#64748B]",children:"-"}),(0,a.jsx)("span",{className:"text-[12px] text-[#64748B]",children:"-"})]}),(0,a.jsx)(x,{values:e.handicap,hasLine:!0}),(0,a.jsx)(x,{values:e.over_under,hasLine:!0}),(0,a.jsx)("div",{className:"flex flex-col items-center gap-0",children:e.one_x_two?.length>0?e.one_x_two.map((e,t)=>(0,a.jsx)("span",{className:"text-[11px] text-slate-500 leading-[18px]",children:e||"-"},t)):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"text-[11px] text-[#64748B] leading-[18px]",children:"-"}),(0,a.jsx)("span",{className:"text-[11px] text-[#64748B] leading-[18px]",children:"-"}),(0,a.jsx)("span",{className:"text-[11px] text-[#64748B] leading-[18px]",children:"-"})]})})]},t))]},t)):(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center py-20 gap-3 bg-slate-50",children:[(0,a.jsx)("svg",{className:"w-12 h-12 text-slate-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",strokeWidth:1.5,children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6.75 3v2.25M17.25 3v2.25M3 18.75V7.5a2.25 2.25 0 012.25-2.25h13.5A2.25 2.25 0 0121 7.5v11.25m-18 0A2.25 2.25 0 005.25 21h13.5A2.25 2.25 0 0021 18.75m-18 0v-7.5A2.25 2.25 0 015.25 9h13.5A2.25 2.25 0 0121 11.25v7.5"})}),(0,a.jsx)("span",{className:"text-slate-500 font-medium tracking-wide",children:"Kh\xf4ng c\xf3 trận đấu n\xe0o cho ng\xe0y n\xe0y"}),(0,a.jsx)("span",{className:"text-slate-400 text-[12px]",children:"H\xe3y thử chọn một ng\xe0y kh\xe1c"})]})]}),(0,a.jsxs)("div",{className:"mt-6 text-center text-[11px] text-[#64748B] uppercase tracking-widest font-bold drop-shadow-sm",children:["Tổng cộng ",A," trận đấu trong ",S.length," giải"]}),(0,a.jsx)(i,{html:o})]}):(0,a.jsxs)("div",{className:"max-w-[1440px] mx-auto px-4 py-8",children:[(0,a.jsx)(n.H,{eyebrow:"Lịch thi đấu",title:"LỊCH THI ĐẤU"}),(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center py-16 gap-4",children:[(0,a.jsx)("div",{className:"w-12 h-12 rounded-full border-2 border-[#E11D48]/30 border-t-[#E11D48] animate-spin"}),(0,a.jsx)("span",{className:"text-slate-500 text-sm font-medium tracking-wide",children:"Đang tải lịch thi đấu..."})]})]})}function x({values:e,hasLine:t}){return e&&0!==e.length?t&&e.length>=3?(0,a.jsxs)("div",{className:"flex flex-col items-center gap-0",children:[(0,a.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,a.jsx)("span",{className:"text-[11px] text-[#E11D48] leading-[18px] font-bold",children:e[0]}),(0,a.jsx)("span",{className:"text-[11px] text-slate-500 leading-[18px]",children:e[1]})]}),(0,a.jsx)("span",{className:"text-[11px] text-slate-500 leading-[18px]",children:e[2]})]}):(0,a.jsx)("div",{className:"flex flex-col items-center gap-0",children:e.map((e,t)=>(0,a.jsx)("span",{className:"text-[11px] text-slate-500 leading-[18px]",children:e||"-"},t))}):(0,a.jsxs)("div",{className:"flex flex-col items-center",children:[(0,a.jsx)("span",{className:"text-[11px] text-[#64748B] leading-[18px]",children:"-"}),(0,a.jsx)("span",{className:"text-[11px] text-[#64748B] leading-[18px]",children:"-"})]})}},29231:(e,t,s)=>{"use strict";s.d(t,{G:()=>r});var a=s(68019),l=s(70508);
343function r({eyebrow:e,title:t,titleAddon:s,rightSlot:n,className:i}){return(0,a.jsx)("div",{className:(0,l.cn)("relative mb-5 overflow-hidden border-b border-slate-200",i),children:(0,a.jsxs)("div",{className:"flex items-center justify-between px-1 py-4 min-h-[56px]",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 min-w-0",children:[(0,a.jsx)("span",{className:"h-8 w-1 shrink-0 rounded-sm bg-gradient-to-b from-[#4681E8] to-[#55CAF1] shadow-[0_0_10px_rgba(70,129,232,0.5)]"}),(0,a.jsxs)("div",{className:"min-w-0",children:[e&&(0,a.jsx)("div",{className:"text-[10px] font-bold uppercase tracking-[0.2em] text-[#4681E8]/60 mb-0.5",children:e}),(0,a.jsxs)("div",{className:"flex items-center gap-2.5 flex-wrap",children:[(0,a.jsx)("h1",{className:"text-[18px] sm:text-[22px] font-black uppercase tracking-tight text-slate-800 leading-none",children:t}),s]})]})]}),n&&(0,a.jsx)("div",{className:"hidden sm:flex items-center gap-2 text-right shrink-0 ml-4",children:n})]})})}},29499:(e,t,s)=>{"use strict";s.d(t,{LiveMatchesClient:()=>m});var a=s(68019),l=s(10707);function r({activeSport:e,onSportChange:t,activeStatus:s,onStatusChange:l,matchesCount:n}){return(0,a.jsxs)("div",{className:"mb-5 flex flex-col gap-3",children:[(0,a.jsx)("div",{className:"flex items-center gap-2 overflow-x-auto pb-1 scrollbar-hide",children:[{id:"1",label:"B\xd3NG Đ\xc1",icon:"⚽"},{id:"2",label:"B\xd3NG RỔ",icon:"\uD83C\uDFC0"},{id:"5",label:"TENNIS",icon:"\uD83C\uDFBE"},{id:"4",label:"CẦU L\xd4NG",icon:"\uD83C\uDFF8"},{id:"3",label:"B\xd3NG CHUYỀN",icon:"\uD83C\uDFD0"},{id:"6",label:"B\xd3NG B\xc0N",icon:"\uD83C\uDFD3"}].map(s=>{let l=e===s.id;return(0,a.jsxs)("button",{type:"button",onClick:()=>t(s.id),className:`flex items-center gap-2 px-4 py-2.5 rounded-xl font-bold text-[12px] whitespace-nowrap transition-all duration-200 border cursor-pointer ${l?"bg-[#4681E8]/10 text-[#4681E8] border-[#4681E8]/40 shadow-[0_0_15px_rgba(70,129,232,0.1)]":"bg-white text-slate-500 border-slate-200 hover:text-slate-700 hover:border-[#4681E8]/30"}`,children:[(0,a.jsx)("span",{className:"text-[14px]",children:s.icon}),(0,a.jsx)("span",{className:"tracking-wider uppercase",children:s.label})]},s.id)})}),(0,a.jsx)("div",{className:"flex items-center gap-1 overflow-x-auto pb-1 scrollbar-hide bg-white rounded-xl p-1.5 border border-slate-200",children:[{id:"all",label:"TẤT CẢ",keyCount:"all"},{id:"live",label:"TRỰC TIẾP",keyCount:"live"},{id:"hot",label:"HOT",keyCount:"hot"},{id:"today",label:"H\xd4M NAY",keyCount:"today"},{id:"tomorrow",label:"NG\xc0Y MAI",keyCount:"tomorrow"}].map(e=>{let t=s===e.id,r=n[e.keyCount]||0;return(0,a.jsxs)("button",{type:"button",onClick:()=>l(e.id),className:`relative px-4 py-2 font-bold text-[12px] whitespace-nowrap transition-all duration-200 uppercase tracking-wider flex items-center gap-2 rounded-lg cursor-pointer ${t?"bg-[#4681E8]/10 text-[#4681E8] shadow-inner":"text-slate-500 hover:text-slate-700 hover:bg-[#4681E8]/5"}`,children:["live"===e.id&&t&&(0,a.jsx)("span",{className:"w-1.5 h-1.5 rounded-full bg-[#4681E8] animate-pulse shadow-[0_0_6px_rgba(70,129,232,0.8)]"}),(0,a.jsx)("span",{children:e.label}),(0,a.jsx)("span",{className:`px-1.5 py-0.5 rounded text-[10px] font-black ${t?"bg-[#4681E8]/20 text-[#4681E8]":"text-slate-400"}`,children:r})]},e.id)})})]})}function n(){return"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='10' fill='%2364748B' fill-opacity='0.18'/%3E%3C/svg%3E"}function i({match:e,isLoading:t=!1}){if(t||!e)return(0,a.jsx)("div",{className:"animate-pulse bg-white h-[64px] w-full border-b border-slate-100"});let s=new Date(1e3*parseInt(e.time||0,10)).toLocaleTimeString("vi-VN",{hour:"2-digit",minute:"2-digit",timeZone:"Asia/Ho_Chi_Minh"}),l=function(e,t){if("1"===t||"2"===t)switch(e){case"1":default:return{text:"Sắp diễn",isLive:!1,showScore:!1};case"2":return{text:"H1",isLive:!0,showScore:!0};case"3":return{text:"HT",isLive:!0,showScore:!0};case"4":return{text:"H2",isLive:!0,showScore:!0};case"5":return{text:"Phụ",isLive:!0,showScore:!0};case"7":return{text:"Pen",isLive:!0,showScore:!0};case"8":case"9":return{text:"FT",isLive:!1,showScore:!0}}switch(e){case"0":case"1":return{text:"Sắp diễn",isLive:!1,showScore:!1};case"51":return{text:"S1",isLive:!0,showScore:!0};case"52":return{text:"S2",isLive:!0,showScore:!0};case"53":return{text:"S3",isLive:!0,showScore:!0};case"54":return{text:"S4",isLive:!0,showScore:!0};case"55":return{text:"S5",isLive:!0,showScore:!0};case"100":case"90":case"91":case"110":return{text:"FT",isLive:!1,showScore:!0};default:return{text:"LIVE",isLive:!0,showScore:!0}}}(String(e.status_id),String(e.sport_id)),r=e.time_text||e.source_card_meta?.time_text||"",o=l.isLive,c=e.home_score??"-",d=e.away_score??"-",x=e.home_logo||n(),h=e.away_logo||n();return(0,a.jsxs)("a",{href:`/match/${encodeURIComponent(e.post_name||e.
343id)}`,className:"flex items-center w-full group border-b border-slate-100 bg-white hover:bg-[#4681E8]/5 transition-colors min-h-[64px]",children:[(0,a.jsx)("div",{className:`w-[60px] flex flex-col items-center justify-center shrink-0 h-full border-r ${o?"border-[#4681E8]/30 bg-[#4681E8]/5":"border-slate-100"}`,children:o?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"text-[#4681E8] font-bold text-[11px] uppercase tracking-wider tabular-nums leading-none",children:r||l.text}),(0,a.jsx)("span",{className:"w-1.5 h-1.5 rounded-full bg-[#4681E8] animate-pulse mt-1"})]}):(0,a.jsx)("span",{className:"text-slate-500 font-medium text-[12px]",children:s})}),(0,a.jsxs)("div",{className:"flex-1 flex flex-col justify-center px-3 py-2 gap-1.5 min-w-0",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between w-full",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2.5 min-w-0 overflow-hidden",children:[(0,a.jsx)("img",{src:x,alt:e.home_name,className:"w-4 h-4 shrink-0 object-contain",onError:e=>e.currentTarget.src=n(),loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-[13px] font-semibold truncate text-slate-800",children:e.home_name})]}),l.showScore&&(0,a.jsx)("span",{className:`text-[15px] font-black tabular-nums shrink-0 ml-2 ${o?"text-[#4681E8]":"text-slate-700"}`,children:c})]}),(0,a.jsxs)("div",{className:"flex items-center justify-between w-full",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2.5 min-w-0 overflow-hidden",children:[(0,a.jsx)("img",{src:h,alt:e.away_name,className:"w-4 h-4 shrink-0 object-contain",onError:e=>e.currentTarget.src=n(),loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-[13px] font-semibold truncate text-slate-800",children:e.away_name})]}),l.showScore&&(0,a.jsx)("span",{className:`text-[15px] font-black tabular-nums shrink-0 ml-2 ${o?"text-[#4681E8]":"text-slate-700"}`,children:d})]})]}),(0,a.jsx)("div",{className:"w-[48px] h-full flex items-center justify-center shrink-0 text-slate-300 group-hover:text-[#4681E8] transition-colors border-l border-slate-100",children:(0,a.jsx)("svg",{className:"w-5 h-5 fill-current",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{d:"M8 5v14l11-7z"})})})]})}let o=new Set(["1","2","3","4","5","7"]),c=new Set(["8","9","15"]),d=new Set(["51","52","53","54","55","56","57","58","59"]),x=new Set(["100","90","91","92","93","110"]);function h(e){let t=String(e.status_id);return 2>=parseInt(e.sport_id)?o.has(t):d.has(t)}function m({matches:e,matchIndex:t}){let[s,n]=(0,l.useState)("1"),[o,d]=(0,l.useState)("all"),[p,u]=(0,l.useState)(1);(0,l.useEffect)(()=>{u(1)},[s,o]);let{todayStart:g,tomorrowStart:b,dayAfterStart:f}=(0,l.useMemo)(()=>{let e,t,s,{vnTodayStartUTC:a,vnTomorrowStartUTC:l,vnDayAfterStartUTC:r}=(s=(t=Math.floor(Date.UTC((e=new Date(Date.now()+252e5)).getUTCFullYear(),e.getUTCMonth(),e.getUTCDate())/1e3)-25200)+86400,{vnTodayStartUTC:t,vnTomorrowStartUTC:s,vnDayAfterStartUTC:s+86400});return{todayStart:a,tomorrowStart:l,dayAfterStart:r}},[]),j=(0,l.useMemo)(()=>new Map(e.map(e=>[e?.match_key?String(e.match_key):e?.ls_id?String(e.ls_id):e?.id?`${String(e.sport_id||"0")}:${String(e.id)}`:e?.scheduleId?`${String(e.sport_id||"0")}:schedule:${String(e.scheduleId)}`:[String(e?.sport_id||"0"),String(e?.time||"0"),String(e?.home_name||""),String(e?.away_name||"")].join(":"),e])),[e]),w=t?.summary_by_sport?.[s],v=t?.bucket_keys_by_sport?.[s],N=t?.bucket_pages_by_sport?.[s],y=e.filter(e=>{let t;return String(e.sport_id)===s&&(t=String(e.status_id),2>=parseInt(e.sport_id)?!c.has(t):!x.has(t))}),_=y.filter(e=>{let t=parseInt(e.time);return t>=g&&t<b}),k=y.filter(e=>{let t=parseInt(e.time);return t>=b&&t<f}),E={all:y.length,live:y.filter(e=>h(e)).length,hot:y.filter(e=>"1"===String(e.hot)).length,today:_.length,tomorrow:k.length},C=(0,l.useMemo)(()=>{if(v){if("all"===o&&Array.isArray(N?.all)&&N.all.length>0)return N.all.slice(0,p).flat().map(e=>j.get(e)).filter(Boolean);let e=v[o];if(Array.isArray(e))return e.map(e=>j.get(e)).filter(Boolean)}return"all"===o?y:"live"===o?y.filter(e=>h(e)):"hot"===o?y.filter(e=>"1"===String(e.hot)):"today"===o?_:"tomorrow"===o?k:y},[o,y,j,N,v,_,k,p]),S="all"===o&&Array.isArray(N?.all)&&p<N.all.length,L=(0,l.useMemo)(()=>"all"!==o&&"live"!==o&&"hot"!==o?[]:C.filter(e=>
343"1"===String(e.hot)||h(e)).slice(0,4),[C,o]),$=(0,l.useMemo)(()=>{let e=new Map;return C.forEach(t=>{let s=t.source_card_meta?.league_label||t.match_data?.competition_vi||t.match_data?.competition_name||t.match_data?.competition_full||"Giải đấu kh\xe1c";e.has(s)||e.set(s,[]),e.get(s).push(t)}),Array.from(e.entries())},[C]);return(0,a.jsxs)("div",{className:"w-full min-h-[500px]",children:[(0,a.jsx)(r,{activeSport:s,onSportChange:n,activeStatus:o,onStatusChange:d,matchesCount:w||E}),0===C.length?(0,a.jsx)("div",{className:"py-20 text-center",children:(0,a.jsx)("div",{className:"text-slate-400 text-base font-medium",children:"Kh\xf4ng c\xf3 trận đấu n\xe0o."})}):(0,a.jsxs)("div",{className:"flex flex-col gap-6",children:[L.length>0&&"all"===o&&(0,a.jsxs)("div",{className:"mb-4",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 mb-3 px-1",children:[(0,a.jsx)("span",{className:"w-2 h-4 rounded-full bg-[#4681E8]"}),(0,a.jsx)("h2",{className:"text-slate-800 font-black text-sm uppercase tracking-wider",children:"Trận đấu t\xe2m điểm"})]}),(0,a.jsx)("div",{className:"grid grid-cols-1 xl:grid-cols-2 gap-2",children:L.map((e,t)=>(0,a.jsx)(i,{match:e},`featured-${e.ls_id||e.id}-${t}`))})]}),(0,a.jsx)("div",{className:"flex flex-col gap-5",children:$.map(([e,t])=>{let s=t[0]?.match_data?.competition_logo;return(0,a.jsxs)("div",{className:"rounded-xl overflow-hidden border border-slate-200 bg-white shadow-sm",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2.5 bg-[#0E1B33] px-4 py-2.5 border-b border-[#0E1B33]",children:[s&&(0,a.jsx)("img",{src:s,alt:"league",className:"w-4 h-4 object-contain brightness-200 opacity-80",loading:"lazy",decoding:"async"}),(0,a.jsx)("h3",{className:"text-white text-[12px] font-bold uppercase tracking-wider truncate",children:e})]}),(0,a.jsx)("div",{className:"flex flex-col",children:t.map((e,t)=>(0,a.jsx)(i,{match:e},e.ls_id||`${e.id}-${t}`))})]},e)})}),S&&(0,a.jsx)("div",{className:"flex justify-center mt-6",children:(0,a.jsx)("button",{type:"button",onClick:()=>u(e=>e+1),className:"inline-flex items-center justify-center rounded-xl border border-[#4681E8]/30 bg-white px-8 py-3 text-[12px] font-bold uppercase tracking-wider text-[#4681E8] transition-all duration-200 hover:bg-[#4681E8] hover:text-white hover:border-[#4681E8]",children:"Tải th\xeam"})})]})]})}},30613:()=>{},30675:(e,t,s)=>{"use strict";s.d(t,{D:()=>r});var a=s(68019),l=s(70508);function r({eyebrow:e,title:t,titleAddon:s,rightSlot:n,className:i}){return(0,a.jsx)("div",{className:(0,l.cn)("relative mb-5 overflow-hidden border-b border-slate-200",i),children:(0,a.jsxs)("div",{className:"flex items-center justify-between px-1 py-4 min-h-[56px]",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 min-w-0",children:[(0,a.jsx)("span",{className:"h-8 w-1 shrink-0 rounded-sm bg-gradient-to-b from-[#4681E8] to-[#55CAF1] shadow-[0_0_10px_rgba(70,129,232,0.5)]"}),(0,a.jsxs)("div",{className:"min-w-0",children:[e&&(0,a.jsx)("div",{className:"text-[10px] font-bold uppercase tracking-[0.2em] text-[#4681E8]/60 mb-0.5",children:e}),(0,a.jsxs)("div",{className:"flex items-center gap-2.5 flex-wrap",children:[(0,a.jsx)("h1",{className:"text-[18px] sm:text-[22px] font-black uppercase tracking-tight text-slate-800 leading-none",children:t}),s]})]})]}),n&&(0,a.jsx)("div",{className:"hidden sm:flex items-center gap-2 text-right shrink-0 ml-4",children:n})]})})}},31219:()=>{},31307:(e,t,s)=>{"use strict";s.d(t,{D:()=>r});var a=s(68019),l=s(70508);function r({eyebrow:e,title:t,titleAddon:s,rightSlot:n,className:i}){return(0,a.jsx)("div",{className:(0,l.cn)("relative mb-5 overflow-hidden border-b border-slate-200",i),children:(0,a.jsxs)("div",{className:"flex items-center justify-between px-1 py-4 min-h-[56px]",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 min-w-0",children:[(0,a.jsx)("span",{className:"h-8 w-1 shrink-0 rounded-sm bg-gradient-to-b from-[#4681E8] to-[#55CAF1] shadow-[0_0_10px_rgba(70,129,232,0.5)]"}),(0,a.jsxs)("div",{className:"min-w-0",children:[e&&(0,a.jsx)("div",{className:"text-[10px] font-bold uppercase tracking-[0.2em] text-[#4681E8]/60 mb-0.5",children:e}),(0,a.jsxs)("div",{className:"flex items-center gap-2.5 flex-wrap",children:[(0,a.jsx)("h1",{className:"text-[18px] sm:text-[22px] font-black uppercase tracking-tight text-slate-800 leading-none",children:t}),s]})]})]}),n&&(0,a.jsx)("div",{className:"hidden sm:flex items-center gap-2 text-right shrink-0 ml-4",children:n})]})})}},31379:()=>{},32312:(e,t,s)=>{"use strict";function a(e){let t=e?.fixtures_v2||null,s=e?.fixtures||e?.schedules||[],a=t?.date_tabs?.length?t.date_tabs:function(e=new Date){let t=["Chá»
343§ Nhật","Thứ Hai","Thứ Ba","Thứ Tư","Thứ Năm","Thứ S\xe1u","Thứ Bảy"],s=[];for(let a=0;a<14;a+=1){let l=new Date(e);l.setDate(l.getDate()+a);let r=String(l.getDate()).padStart(2,"0"),n=String(l.getMonth()+1).padStart(2,"0"),i=`${l.getFullYear()}-${l.getMonth()+1}-${l.getDate()}`;s.push({label:0===a?"H\xf4m Nay":t[l.getDay()],date:`${r}.${n}`,dataValue:i,active:0===a})}return s}(),l=e?.selected_date||a.find(e=>e.active)?.dataValue||a[0]?.dataValue||null;if(t?.leagues?.length)return{dateTabs:a,selectedDate:l,leagues:t.leagues,totalMatches:t.leagues.reduce((e,t)=>e+t.matches.length,0)};let r=[],n=new Set;return s.forEach(e=>{let t=e.data;if(!(t.length<3))for(let s=0;s+2<t.length;s+=16){let a=t[s]||"",l=t[s+1]||"",i=t[s+2]||"",o=`${a}-${l}-${i}`;if(!n.has(o)&&l&&(n.add(o),r.push({time:a,home_team:l,away_team:i,home_logo:e.team_logos?.[2*Math.floor(s/16)]||"",away_logo:e.team_logos?.[2*Math.floor(s/16)+1]||"",score:t[s+3]||"-",ht_score:t[s+4]||"",handicap:t.length>s+9?[t[s+7]||"",t[s+8]||"",t[s+9]||""]:[],over_under:t.length>s+12?[t[s+10]||"",t[s+11]||"",t[s+12]||""]:[],one_x_two:t.length>s+15?[t[s+13]||"",t[s+14]||"",t[s+15]||""]:[]}),s+16>=t.length))break}}),{dateTabs:a,selectedDate:l,leagues:r.length>0?[{league_name:"Tất cả trận đấu",league_icon:"",match_count:r.length,matches:r}]:[],totalMatches:r.length}}function l(e){let t=e?.results_v2||null,s=e?.results||[];if(t?.date_groups?.length)return{availableLeagues:t.available_leagues||[],dateGroups:t.date_groups,totalMatches:t.date_groups.reduce((e,t)=>e+t.matches.length,0)};let a=[];return s.forEach(e=>{let t=e.data;if(t.length<6)return;let s=t[0],l=s.split(" - "),r=[],n=1,i=0;for(;n<t.length;){if(t[n]?.startsWith("L\xfac")){let s=t[n].replace("L\xfac","").trim();r.push({time:s,home_team:t[n+1]||"",away_team:t[n+4]||"",home_logo:e.team_logos?.[i]||"",away_logo:e.team_logos?.[i+1]||"",score:t[n+2]||"",ht_score:(t[n+3]||"").replace("H1:","").replace("HT:","").trim()}),i+=2,n+=5;continue}n+=1}r.length>0&&a.push({date_header:l[0]?.trim()||s,league_round:l.slice(1).join(" - ").trim(),matches:r})}),{availableLeagues:[],dateGroups:a,totalMatches:a.reduce((e,t)=>e+t.matches.length,0)}}function r(e,t){if(!t)return e;let s=t.toLowerCase();return e.filter(e=>e.league_round.toLowerCase().includes(s))}s.d(t,{kK:()=>r,o8:()=>l,p_:()=>a})},32456:(e,t,s)=>{"use strict";s.d(t,{Klivevip20ResultsPage:()=>o});var a=s(68019),l=s(10707),r=s(78637),n=s(96007),i=s(35559);function o({initialData:e,selectedLeague:t}){let s=(0,r.useRouter)(),c=(0,r.usePathname)(),d=(0,r.useSearchParams)(),[x,h]=(0,l.useTransition)(),[m,p]=(0,l.useState)(!1),[u,g]=(0,l.useState)(""),{availableLeagues:b,dateGroups:f}=(0,l.useMemo)(()=>(0,i.o8)(e),[e]),j=(0,l.useMemo)(()=>Array.from(new Set(f.map(e=>e.date_header))),[f]),w=d.get("date")||"",v=e=>{let t=new URLSearchParams(d.toString());e&&e!==w?t.set("date",e):t.delete("date"),h(()=>{let e=t.toString();s.push(e?`${c}?${e}`:c,{scroll:!1})})},N=(0,l.useMemo)(()=>{let e=f;return w&&(e=e.filter(e=>e.date_header===w)),(0,i.kK)(e,t)},[f,w,t]),y=(0,l.useMemo)(()=>{if(!u)return b;let e=u.toLowerCase();return b.filter(t=>t.name.toLowerCase().includes(e))},[b,u]),_=N.reduce((e,t)=>e+t.matches.length,0);if(0===f.length)return(0,a.jsxs)("div",{className:"max-w-[1440px] mx-auto px-4 py-8",children:[(0,a.jsx)(n.v,{eyebrow:"Kết quả",title:"KẾT QUẢ B\xd3NG Đ\xc1"}),(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center py-16 gap-4",children:[(0,a.jsx)("div",{className:"w-12 h-12 rounded-full border-2 border-[#E11D48]/30 border-t-[#E11D48] animate-spin"}),(0,a.jsx)("span",{className:"text-slate-500 text-sm font-medium tracking-wide",children:"Đang tải kết quả..."})]})]});let k=e=>{let t=new URLSearchParams(d.toString());e?t.set("league",e):t.delete("league"),p(!1),g(""),h(()=>{let e=t.toString();s.push(e?`${c}?${e}`:c,{scroll:!1})})};return(0,a.jsxs)("div",{className:"max-w-[1440px] mx-auto px-4 py-8",children:[(0,a.jsx)(n.v,{eyebrow:"Kết quả",title:"KẾT QUẢ B\xd3NG Đ\xc1",rightSlot:(0,a.jsx)("div",{className:"text-[12px] text-slate-600",children:(0,a.jsx)("span",{className:"text-slate-900/80 font-bold",children:t||"Tất cả giải đấu"})})}),(0,a.jsxs)("div",{className:"flex flex-col md:flex-row gap-4 mb-4 items-start md:items-center justify-between",children:[j.length>0&&(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,a.jsx)("button",{type:"button",onClick:()=>v(""),className:`px-4 py-2 rounded-xl text-sm font-bold transition-all duration-300 ${!w?"bg-gradient-to-r from-[#4681E8] to-[#2563eb] text-white shadow-[0_4px_15px_rgba(70,129,232,0.4)] border border-[#4681E8]/50":"bg-white text-[#64748B] border border-slate-200 hover:bg-slate-50 hover:text-slate-800"}`,children:"Tất cả ng\xe0y"}),j.slice(0,5).map(e=>(0,a.jsx)("button",{type:"button",onClick:()=>v(e),className:`px-4 py-2 rounded-xl text-sm font-bold transition-all duration-300 ${w===e?"bg-gradient-to-r from-[#4681E8] to-[#2563eb] text-white shadow-[0_4px_15px_rgba(70,129,232,0.4)] border border-[#4681E8]/50":"bg-white text-[#64748B] border border-slate-200 hover:bg-slate-50 hover:text-slate-800"}`,children:e},e))]}),(0,a.jsxs)("div",{className:"relative w-full md:w-[320px]",children:[(0,a.jsxs)("button",{onClick:()=>p(!m),className:"w-full flex items-center gap-3 bg-white hover:bg-slate-50 px-4 py-2.5 rounded-xl border border-slate-200 shadow-inner transition-all text-sm",children:[(0,a.jsx)("svg",{className:"w-5 h-5 text-[#4681E8]",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 4a1 1 0 011-1h16a1 1 0 011 1v2.586a1 1 0 01-.293.707l-6.414 6.414a1 1 0 00-.293.707V17l-4 4v-6.586a1 1 0 00-.293-.707L3.293 7.293A1 1 0 013 6.586V4z"})}),(0,a.jsx)("span",{className:"text-slate-700 font-bold flex-1 text-left truncate",children:t||"Chọn giải đấu..."}),(0,a.jsx)("svg",{className:`w-4 h-4 text-slate-400 transition-transform ${m?"rotate-180":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),m&&(0,a.jsxs)("div",{className:"absolute top-full left-0 right-0 mt-2 bg-white border border-slate-200 rounded-2xl shadow-xl z-50 max-h-[300px] overflow-hidden flex flex-col",children:[(0,a.jsx)("div",{className:"p-2 border-b border-slate-100",children:(0,a.jsx)("input",{type:"text",placeholder:"T\xecm giải đấu...",value:u,onChange:e=>g(e.target.value),className:"w-full bg-slate-50 border border-transparent roun
343ded-xl px-4 py-2.5 text-sm text-slate-800 placeholder-slate-400 outline-none focus:border-[#4681E8]/50 transition-colors"})}),(0,a.jsxs)("div",{className:"overflow-y-auto flex-1 pb-2",children:[(0,a.jsx)("button",{type:"button",onClick:()=>k(),className:`block w-full text-left px-4 py-3 text-sm transition-colors ${!t?"bg-[#4681E8]/10 text-[#4681E8] border-l-4 border-[#4681E8]":"text-slate-600 hover:bg-slate-50 hover:text-slate-800"}`,children:"Tất cả giải đấu"}),y.map((e,s)=>(0,a.jsxs)("button",{type:"button",onClick:()=>k(e.name),className:`flex items-center gap-3 px-4 py-3 text-sm transition-colors cursor-pointer ${t===e.name?"bg-[#4681E8]/10 text-[#4681E8] border-l-4 border-[#4681E8]":"text-slate-600 hover:bg-slate-50 hover:text-slate-800"}`,children:[e.icon?(0,a.jsx)("img",{src:e.icon,alt:e.name||"League",className:"w-5 h-5 object-contain shrink-0",loading:"lazy",decoding:"async"}):(0,a.jsx)("div",{className:"w-5 h-5 rounded-md bg-slate-200 shrink-0"}),(0,a.jsx)("span",{className:"truncate",children:e.name})]},s))]})]})]})]}),x&&(0,a.jsxs)("div",{className:"mb-4 inline-flex items-center gap-2 rounded-full border border-slate-200 bg-white px-4 py-2 text-xs text-slate-500 shadow-sm",children:[(0,a.jsx)("span",{className:"h-2 w-2 rounded-full bg-[#E11D48] animate-pulse shadow-[0_0_8px_rgba(225,29,72,0.8)]"}),(0,a.jsx)("span",{className:"font-bold tracking-wide",children:"Đang tải kết quả từ server..."})]}),(0,a.jsx)("div",{className:"space-y-4",children:0===N.length?(0,a.jsx)("div",{className:"text-center py-16 text-[#64748B] font-medium tracking-wide",children:"Kh\xf4ng c\xf3 kết quả n\xe0o"}):N.map((e,t)=>(0,a.jsxs)("div",{className:"overflow-hidden rounded-2xl border border-slate-200 bg-white shadow-[0_8px_30px_rgba(0,0,0,0.06)]",children:[(0,a.jsx)("div",{className:"bg-slate-50 px-5 py-3 border-b border-slate-100 flex items-center justify-between",children:(0,a.jsxs)("span",{className:"text-[12px] text-slate-500 font-bold uppercase tracking-widest",children:[e.league_round?e.league_round:"V\xf2ng đấu",(0,a.jsx)("span",{className:"text-[#E11D48] ml-2 font-mono text-[11px] bg-[#E11D48]/10 px-2 py-0.5 rounded-full border border-[#E11D48]/20",children:e.date_header})]})}),e.matches.map((e,t)=>{var s;return(0,a.jsx)("div",{className:"bg-transparent hover:bg-slate-50 border-b border-slate-100 last:border-0 transition-colors group cursor-default",children:(0,a.jsxs)("div",{className:"flex items-center py-4 px-5 gap-4",children:[(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center min-w-[56px] shrink-0 border-r border-slate-100 pr-4",children:[(0,a.jsx)("span",{className:"text-[9px] text-slate-400 uppercase tracking-widest mb-1 font-bold",children:"L\xfac"}),(0,a.jsx)("span",{className:"text-[13px] text-slate-700 font-mono font-black",children:e.time})]}),(0,a.jsxs)("div",{className:"flex-1 flex items-center justify-end gap-3 min-w-0",children:[(0,a.jsx)("span",{className:"text-[14px] text-slate-800 font-bold truncate text-right group-hover:text-slate-900 transition-colors",children:e.home_team}),e.home_logo?(0,a.jsx)("div",{className:"w-8 h-8 rounded-full bg-slate-100 border border-slate-200 p-1 flex items-center justify-center shadow-sm",children:(0,a.jsx)("img",{src:e.home_logo,alt:e.home_team||"Home team",className:"w-full h-full object-contain",loading:"lazy"})}):(0,a.jsx)("div",{className:"w-8 h-8 rounded-full bg-slate-100 shrink-0 border border-slate-200 flex items-center justify-center text-[10px] font-bold text-slate-400",children:"?"})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center min-w-[90px] shrink-0 bg-slate-50 rounded-xl py-2 px-2 border border-slate-200 shadow-inner group-hover:border-[#4681E8]/40 transition-colors",children:[(0,a.jsx)("span",{className:`text-[22px] leading-none font-black tracking-widest drop-shadow-[0_2px_4px_rgba(0,0,0,0.8)] ${!(s=e.score)||"-"===s?"text-slate-400":"text-slate-800"}`,children:e.score}),e.ht_score&&(0,a.jsxs)("span",{className:"text-[10px] text-slate-500 font-mono mt-1 font-bold",children:["HT: ",e.ht_score]})]}),(0,a.jsxs)("div",{className:"flex-1 flex items-center gap-3 min-w-0",children:[e.away_logo?(0,a.jsx)("div",{className:"w-8 h-8 rounded-full bg-slate-100 border border-slate-200 p-1 flex items-center justify-center shadow-sm",children:(0,a.jsx)("img",{src:e.away_logo,alt:e.away_team||"Away team",className:"w-full h-full object-contain",loading:"lazy"})}):(0,a.jsx)("div",{className:"w-8 h-8 rounded-full bg-slate-100 shrink-0 border border-slate-200 flex items-center justify-center text-[10px] font-bold text-slate-400",children:"?"}),(0,a.jsx)("span",{className:"text-[14px] text-slate-800 font-bold truncate text-left group-hover:text-slate-900 transition-colors",children:e.away_team})]})]})},t)})]},t))}),(0,a.jsxs)("div",{className:"mt-6 text-center text-xs text-[#64748B] font-bold uppercase tracking-widest drop-shadow-sm",children:["Hiển thị ",_," kết quả trận đấu"]})]})}},32849:(e,t,s)=>{"use strict";
343s.d(t,{Klivevip07ResultsPage:()=>o});var a=s(68019),l=s(10707),r=s(78637),n=s(27347),i=s(73268);function o({initialData:e,selectedLeague:t}){let s=(0,r.useRouter)(),c=(0,r.usePathname)(),d=(0,r.useSearchParams)(),[x,h]=(0,l.useTransition)(),[m,p]=(0,l.useState)(!1),[u,g]=(0,l.useState)(""),{availableLeagues:b,dateGroups:f}=(0,l.useMemo)(()=>(0,i.o8)(e),[e]),j=(0,l.useMemo)(()=>Array.from(new Set(f.map(e=>e.date_header))),[f]),w=d.get("date")||"",v=e=>{let t=new URLSearchParams(d.toString());e&&e!==w?t.set("date",e):t.delete("date"),h(()=>{let e=t.toString();s.push(e?`${c}?${e}`:c,{scroll:!1})})},N=(0,l.useMemo)(()=>{let e=f;return w&&(e=e.filter(e=>e.date_header===w)),(0,i.kK)(e,t)},[f,w,t]),y=(0,l.useMemo)(()=>{if(!u)return b;let e=u.toLowerCase();return b.filter(t=>t.name.toLowerCase().includes(e))},[b,u]),_=N.reduce((e,t)=>e+t.matches.length,0);if(0===f.length)return(0,a.jsxs)("div",{className:"max-w-[1440px] mx-auto px-4 py-8",children:[(0,a.jsx)(n.A,{eyebrow:"Kết quả",title:"KẾT QUẢ B\xd3NG Đ\xc1"}),(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center py-16 gap-4",children:[(0,a.jsx)("div",{className:"w-12 h-12 rounded-full border-2 border-[#E11D48]/30 border-t-[#E11D48] animate-spin"}),(0,a.jsx)("span",{className:"text-slate-500 text-sm font-medium tracking-wide",children:"Đang tải kết quả..."})]})]});let k=e=>{let t=new URLSearchParams(d.toString());e?t.set("league",e):t.delete("league"),p(!1),g(""),h(()=>{let e=t.toString();s.push(e?`${c}?${e}`:c,{scroll:!1})})};return(0,a.jsxs)("div",{className:"max-w-[1440px] mx-auto px-4 py-8",children:[(0,a.jsx)(n.A,{eyebrow:"Kết quả",title:"KẾT QUẢ B\xd3NG Đ\xc1",rightSlot:(0,a.jsx)("div",{className:"text-[12px] text-slate-600",children:(0,a.jsx)("span",{className:"text-slate-900/80 font-bold",children:t||"Tất cả giải đấu"})})}),(0,a.jsxs)("div",{className:"flex flex-col md:flex-row gap-4 mb-4 items-start md:items-center justify-between",children:[j.length>0&&(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,a.jsx)("button",{type:"button",onClick:()=>v(""),className:`px-4 py-2 rounded-xl text-sm font-bold transition-all duration-300 ${!w?"bg-gradient-to-r from-[#4681E8] to-[#2563eb] text-white shadow-[0_4px_15px_rgba(70,129,232,0.4)] border border-[#4681E8]/50":"bg-white text-[#64748B] border border-slate-200 hover:bg-slate-50 hover:text-slate-800"}`,children:"Tất cả ng\xe0y"}),j.slice(0,5).map(e=>(0,a.jsx)("button",{type:"button",onClick:()=>v(e),className:`px-4 py-2 rounded-xl text-sm font-bold transition-all duration-300 ${w===e?"bg-gradient-to-r from-[#4681E8] to-[#2563eb] text-white shadow-[0_4px_15px_rgba(70,129,232,0.4)] border border-[#4681E8]/50":"bg-white text-[#64748B] border border-slate-200 hover:bg-slate-50 hover:text-slate-800"}`,children:e},e))]}),(0,a.jsxs)("div",{className:"relative w-full md:w-[320px]",children:[(0,a.jsxs)("button",{onClick:()=>p(!m),className:"w-full flex items-center gap-3 bg-white hover:bg-slate-50 px-4 py-2.5 rounded-xl border border-slate-200 shadow-inner transition-all text-sm",children:[(0,a.jsx)("svg",{className:"w-5 h-5 text-[#4681E8]",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 4a1 1 0 011-1h16a1 1 0 011 1v2.586a1 1 0 01-.293.707l-6.414 6.414a1 1 0 00-.293.707V17l-4 4v-6.586a1 1 0 00-.293-.707L3.293 7.293A1 1 0 013 6.586V4z"})}),(0,a.jsx)("span",{className:"text-slate-700 font-bold flex-1 text-left truncate",children:t||"Chọn giải đấu..."}),(0,a.jsx)("svg",{className:`w-4 h-4 text-slate-400 transition-transform ${m?"rotate-180":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),m&&(0,a.jsxs)("div",{className:"absolute top-full left-0 right-0 mt-2 bg-white border border-slate-200 rounded-2xl shadow-xl z-50 max-h-[300px] overflow-hidden flex flex-col",children:[(0,a.jsx)("div",{className:"p-2 border-b border-slate-100",children:(0,a.jsx)("input",{type:"text",placeholder:"T\xecm giải đấu...",value:u,onChange:e=>g(e.target.value),className:"w-full bg-slate-50 border border-transparent roun
343ded-xl px-4 py-2.5 text-sm text-slate-800 placeholder-slate-400 outline-none focus:border-[#4681E8]/50 transition-colors"})}),(0,a.jsxs)("div",{className:"overflow-y-auto flex-1 pb-2",children:[(0,a.jsx)("button",{type:"button",onClick:()=>k(),className:`block w-full text-left px-4 py-3 text-sm transition-colors ${!t?"bg-[#4681E8]/10 text-[#4681E8] border-l-4 border-[#4681E8]":"text-slate-600 hover:bg-slate-50 hover:text-slate-800"}`,children:"Tất cả giải đấu"}),y.map((e,s)=>(0,a.jsxs)("button",{type:"button",onClick:()=>k(e.name),className:`flex items-center gap-3 px-4 py-3 text-sm transition-colors cursor-pointer ${t===e.name?"bg-[#4681E8]/10 text-[#4681E8] border-l-4 border-[#4681E8]":"text-slate-600 hover:bg-slate-50 hover:text-slate-800"}`,children:[e.icon?(0,a.jsx)("img",{src:e.icon,alt:e.name||"League",className:"w-5 h-5 object-contain shrink-0",loading:"lazy",decoding:"async"}):(0,a.jsx)("div",{className:"w-5 h-5 rounded-md bg-slate-200 shrink-0"}),(0,a.jsx)("span",{className:"truncate",children:e.name})]},s))]})]})]})]}),x&&(0,a.jsxs)("div",{className:"mb-4 inline-flex items-center gap-2 rounded-full border border-slate-200 bg-white px-4 py-2 text-xs text-slate-500 shadow-sm",children:[(0,a.jsx)("span",{className:"h-2 w-2 rounded-full bg-[#E11D48] animate-pulse shadow-[0_0_8px_rgba(225,29,72,0.8)]"}),(0,a.jsx)("span",{className:"font-bold tracking-wide",children:"Đang tải kết quả từ server..."})]}),(0,a.jsx)("div",{className:"space-y-4",children:0===N.length?(0,a.jsx)("div",{className:"text-center py-16 text-[#64748B] font-medium tracking-wide",children:"Kh\xf4ng c\xf3 kết quả n\xe0o"}):N.map((e,t)=>(0,a.jsxs)("div",{className:"overflow-hidden rounded-2xl border border-slate-200 bg-white shadow-[0_8px_30px_rgba(0,0,0,0.06)]",children:[(0,a.jsx)("div",{className:"bg-slate-50 px-5 py-3 border-b border-slate-100 flex items-center justify-between",children:(0,a.jsxs)("span",{className:"text-[12px] text-slate-500 font-bold uppercase tracking-widest",children:[e.league_round?e.league_round:"V\xf2ng đấu",(0,a.jsx)("span",{className:"text-[#E11D48] ml-2 font-mono text-[11px] bg-[#E11D48]/10 px-2 py-0.5 rounded-full border border-[#E11D48]/20",children:e.date_header})]})}),e.matches.map((e,t)=>{var s;return(0,a.jsx)("div",{className:"bg-transparent hover:bg-slate-50 border-b border-slate-100 last:border-0 transition-colors group cursor-default",children:(0,a.jsxs)("div",{className:"flex items-center py-4 px-5 gap-4",children:[(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center min-w-[56px] shrink-0 border-r border-slate-100 pr-4",children:[(0,a.jsx)("span",{className:"text-[9px] text-slate-400 uppercase tracking-widest mb-1 font-bold",children:"L\xfac"}),(0,a.jsx)("span",{className:"text-[13px] text-slate-700 font-mono font-black",children:e.time})]}),(0,a.jsxs)("div",{className:"flex-1 flex items-center justify-end gap-3 min-w-0",children:[(0,a.jsx)("span",{className:"text-[14px] text-slate-800 font-bold truncate text-right group-hover:text-slate-900 transition-colors",children:e.home_team}),e.home_logo?(0,a.jsx)("div",{className:"w-8 h-8 rounded-full bg-slate-100 border border-slate-200 p-1 flex items-center justify-center shadow-sm",children:(0,a.jsx)("img",{src:e.home_logo,alt:e.home_team||"Home team",className:"w-full h-full object-contain",loading:"lazy"})}):(0,a.jsx)("div",{className:"w-8 h-8 rounded-full bg-slate-100 shrink-0 border border-slate-200 flex items-center justify-center text-[10px] font-bold text-slate-400",children:"?"})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center min-w-[90px] shrink-0 bg-slate-50 rounded-xl py-2 px-2 border border-slate-200 shadow-inner group-hover:border-[#4681E8]/40 transition-colors",children:[(0,a.jsx)("span",{className:`text-[22px] leading-none font-black tracking-widest drop-shadow-[0_2px_4px_rgba(0,0,0,0.8)] ${!(s=e.score)||"-"===s?"text-slate-400":"text-slate-800"}`,children:e.score}),e.ht_score&&(0,a.jsxs)("span",{className:"text-[10px] text-slate-500 font-mono mt-1 font-bold",children:["HT: ",e.ht_score]})]}),(0,a.jsxs)("div",{className:"flex-1 flex items-center gap-3 min-w-0",children:[e.away_logo?(0,a.jsx)("div",{className:"w-8 h-8 rounded-full bg-slate-100 border border-slate-200 p-1 flex items-center justify-center shadow-sm",children:(0,a.jsx)("img",{src:e.away_logo,alt:e.away_team||"Away team",className:"w-full h-full object-contain",loading:"lazy"})}):(0,a.jsx)("div",{className:"w-8 h-8 rounded-full bg-slate-100 shrink-0 border border-slate-200 flex items-center justify-center text-[10px] font-bold text-slate-400",children:"?"}),(0,a.jsx)("span",{className:"text-[14px] text-slate-800 font-bold truncate text-left group-hover:text-slate-900 transition-colors",children:e.away_team})]})]})},t)})]},t))}),(0,a.jsxs)("div",{className:"mt-6 text-center text-xs text-[#64748B] font-bold uppercase tracking-widest drop-shadow-sm",children:["Hiển thị ",_," kết quả trận đấu"]})]})}},32877:(e,t,s)=>{"use strict";s.d(t,{StandingsClient:()=>h});var a=s(68019),l=s(10707),r=s(46914),n=s(26895);function i(e){return"W"===e?"border border-emerald-500/45 bg-emerald-500/25 text-emerald-300 shadow-[0_0_0_1px_rgba(16,185,129,0.08)_inset]":"L"===e?"border border-red-500/45 bg-red-500/25 text-red-300 shadow-[0_0_0_1px_rgba(239,68,68,0.08)_inset]":"D"===e?"border border-amber-400/45 bg-amber-400/22 text-amber-200 shadow-[0_0_0_1px_rgba(251,191,36,0.08)_inset]":"border border-slate-500/40 bg-slate-500/18 text-slate-700"}function o(e,t){return 1===e?{bar:"bg-[linear-gradient(180deg,#facc15,#f97316)]",badge:"border-emerald-600/60 bg-slate-100 text-yellow-700 shadow-[0_0_18px_rgba(250,204,21,0.14)]",row:"from-[#32230d]/70 via-trans
343parent to-transparent"}:e<=4?{bar:"bg-[linear-gradient(180deg,#fb7185,#f97316)]",badge:"border-[#fb7185]/45 bg-slate-100 text-rose-700",row:"from-[#241318]/55 via-transparent to-transparent"}:e<=6?{bar:"bg-[linear-gradient(180deg,#f59e0b,#facc15)]",badge:"border-[#f59e0b]/45 bg-slate-100 text-yellow-700",row:"from-[#24190b]/45 via-transparent to-transparent"}:e<=10?{bar:"bg-[linear-gradient(180deg,#38bdf8,#2563eb)]",badge:"border-sky-400/40 bg-white text-sky-700",row:"from-[#101725]/32 via-transparent to-transparent"}:e>=Math.max(t-2,1)?{bar:"bg-[linear-gradient(180deg,#ef4444,#7f1d1d)]",badge:"border-red-500/40 bg-slate-100 text-red-700",row:"from-[#220f14]/45 via-transparent to-transparent"}:{bar:"bg-[linear-gradient(180deg,#64748b,#334155)]",badge:"border-slate-500/35 bg-white text-slate-700",row:"from-[#12161d]/24 via-transparent to-transparent"}}function c({detail:e}){let[t,s]=(0,l.useState)(!1),n=(0,l.useRef)(null),[o,d]=(0,l.useState)({top:0,left:0}),x=i(e.result),h=(0,l.useCallback)(()=>{if(n.current){let e=n.current.getBoundingClientRect();d({top:e.top+window.scrollY-8,left:e.left+e.width/2+window.scrollX})}s(!0)},[]);return(0,a.jsxs)("div",{ref:n,className:"relative inline-flex",onMouseEnter:h,onMouseLeave:()=>s(!1),children:[(0,a.jsx)("span",{className:`inline-flex h-7 w-7 items-center justify-center rounded-[8px] text-[11px] font-black cursor-pointer transition-transform hover:-translate-y-0.5 ${x}`,children:e.result}),t&&e.match_time&&"u">typeof document&&(0,r.createPortal)((0,a.jsxs)("div",{className:"fixed z-[9999] w-[220px] pointer-events-none",style:{top:`${o.top}px`,left:`${o.left}px`,transform:"translate(-50%, -100%)",position:"absolute"},children:[(0,a.jsxs)("div",{className:"overflow-hidden rounded-xl border border-[#cbd5e1] bg-white shadow-2xl",children:[(0,a.jsx)("div",{className:"bg-slate-100 px-3 py-1.5 text-[10px] text-slate-600 font-mono text-center border-b border-[#cbd5e1]",children:e.match_time}),(0,a.jsxs)("div",{className:"px-3 py-2.5 flex items-center justify-between gap-2",children:[(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5 flex-1 min-w-0",children:[e.home_logo?(0,a.jsx)("img",{src:e.home_logo,alt:e.home_team,className:"w-7 h-7 object-contain",loading:"lazy",decoding:"async"}):(0,a.jsx)("div",{className:"w-7 h-7 rounded-full bg-gray-700 flex items-center justify-center text-[8px] text-slate-600 font-bold",children:"?"}),(0,a.jsx)("span",{className:"text-[9px] text-slate-600 font-bold text-center leading-tight line-clamp-2 max-w-[70px]",children:e.home_team})]}),(0,a.jsx)("div",{className:"text-slate-900 font-black text-sm whitespace-nowrap px-1",children:e.score||"? - ?"}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5 flex-1 min-w-0",children:[e.away_logo?(0,a.jsx)("img",{src:e.away_logo,alt:e.away_team,className:"w-7 h-7 object-contain",loading:"lazy",decoding:"async"}):(0,a.jsx)("div",{className:"w-7 h-7 rounded-full bg-gray-700 flex items-center justify-center text-[8px] text-slate-600 font-bold",children:"?"}),(0,a.jsx)("span",{className:"text-[9px] text-slate-600 font-bold text-center leading-tight line-clamp-2 max-w-[70px]",children:e.away_team})]})]})]}),(0,a.jsx)("div",{className:"absolute left-1/2 -translate-x-1/2 -bottom-1 w-2 h-2 bg-white border-r border-b border-[#cbd5e1] rotate-45"})]}),document.body)]})}function d({result:e}){let t=i(e);return(0,a.jsx)("span",{className:`inline-flex h-7 w-7 items-center justify-center rounded-[8px] text-[11px] font-black ${t}`,children:e})}function x({value:e,totalTeams:t}){let s=Number(e);if(!Number.isFinite(s))return(0,a.jsx)("td",{className:"px-4 py-4 text-center font-mono font-black text-slate-400",children:e});let l=o(s,t);return(0,a.jsxs)("td",{className:"relative px-4 py-4 text-center font-mono",children:[(0,a.jsx)("span",{className:`absolute left-0 top-1/2 h-7 w-1 -translate-y-1/2 rounded-r-full ${l.bar}`}),(0,a.jsx)("span",{className:`inline-flex h-8 w-8 items-center justify-center rounded-[10px] border text-[13px] font-black ${l.badge}`,children:s})]})}function h({initialData:e}){let[t]=(0,l.useState)(!1),[s,r]=(0,l.useState)(!1),[i,p]=(0,l.useState)(""),u=(0,l.useRef)(null);if((0,l.useEffect)(()=>{function e(e){u.current&&!u.current.contains(e.target)&&r(!1)}return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[]),!e)return(0,a.jsx)("div",{className:"text-center py-20 text-slate-600",children:"Đang tải dữ liệu..."});let g=e.available_leagues||[],b=g.filter(e=>e.name.toLowerCase().includes(i.toLowerCase())),f=e.teams&&e.teams.length>0&&Array.isArray(e.teams[0]?.form),j=!f&&e.rankings;return(0,a.jsxs)("div",{className:"mx-auto max-w-[1440px] px-4 py-8",children:[(0,a.jsx)(n.x,{eyebrow:"Bảng xếp hạng",title:"BẢNG XẾP HẠNG",rightSlot:(0,a.jsx)("div",{className:"text-[12px] text-slate-600",children:(0,a.jsx)("span",{className:"text-slate-900/80 font-bold",children:e.league_name})})}),g.length>0&&(0,a.jsxs)("div",{className:"mb-6",ref:u,children:[(0,a.jsxs)("div",{className:"relative inline-flex min-w-[320px] items-center gap-3 rounded-2xl border border-slate-200 bg-white backdrop-blur-md px-5 py-3.5 cursor-pointer shadow-[0_8px_30px_rgba(0,0,0,0.06)] transition-colors hover:border-[#4681E8]/50 hover:shadow-[0_8px_30px_rgba(70,129,232,0.1)]",onClick:()=>r(!s),children:[e.league_icon&&(0,a.jsx)("img",{src:e.league_icon,alt:e.league_name||"League icon",className:"w-6 h-6 object-contain",loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-slate-800 font-bold text-sm flex-1",children:e.league_name||"Chọn giải đấu"}),(0,a.jsx)("svg",{className:`w-4 h-4 text-[#4681E8] transition-transform ${s?"rotate-180":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),s&&(0,a.jsxs)("div",{className:"absolute z-50 mt-2 w-[360px] overflow-hidden rounded-2xl border border-slate-200 bg-white backdrop-blur-xl shadow-[0_24px_80px_rgba(0,0,0,0.15)]",children:[(0,a.jsx)("div",{className:"p-2 border-b border-slate-100",children:(0,a.jsx)("input",{type:"text",placeholder:"T\xecm kiếm giải đấu...",value:i,onChange:e=>p(e.target.value),className:"w-full bg-slate-50 text-slate-800 text-sm px-4 py-2.5 rounded-xl border border-transparent outline-none focus:border-[#4681E8]/50 placeholder-slate-400 transition-colors",autoF
343ocus:!0})}),(0,a.jsxs)("div",{className:"max-h-[340px] overflow-y-auto",children:[b.map(t=>(0,a.jsxs)("a",{href:`/standings?league=${encodeURIComponent(t.id)}`,className:`flex items-center gap-3 px-4 py-3 cursor-pointer transition-colors hover:bg-slate-50 ${t.id===e.league_id?"bg-[#4681E8]/10 border-l-4 border-[#4681E8]":""}`,children:[t.icon?(0,a.jsx)("img",{src:t.icon,alt:t.name||"League",className:"w-5 h-5 object-contain flex-shrink-0",loading:"lazy",decoding:"async"}):(0,a.jsx)("div",{className:"w-5 h-5 rounded bg-gray-700 flex-shrink-0"}),(0,a.jsx)("span",{className:"text-sm text-slate-900 truncate",children:t.name})]},t.id)),0===b.length&&(0,a.jsx)("div",{className:"px-4 py-8 text-center text-gray-500 text-sm",children:"Kh\xf4ng t\xecm thấy giải đấu"})]})]})]}),t&&(0,a.jsxs)("div",{className:"flex items-center justify-center py-12",children:[(0,a.jsx)("div",{className:"animate-spin w-8 h-8 border-2 border-emerald-600 border-t-transparent rounded-full"}),(0,a.jsx)("span",{className:"ml-3 text-slate-600 text-sm",children:"Đang tải bảng xếp hạng từ server..."})]}),!t&&f&&(0,a.jsxs)("div",{className:"overflow-hidden rounded-[24px] border border-slate-200 bg-white shadow-[0_8px_30px_rgba(0,0,0,0.08)]",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between gap-3 border-b border-[#4681E8]/20 bg-gradient-to-r from-[#4681E8] to-[#2563eb] px-6 py-4 text-white shadow-[0_4px_25px_rgba(70,129,232,0.3)]",children:[(0,a.jsx)("div",{className:"text-[13px] font-black uppercase tracking-[0.2em] drop-shadow-sm text-white/80",children:"League"}),(0,a.jsx)("div",{className:"truncate text-sm font-black sm:text-base drop-shadow-md",children:e.league_name})]}),(0,a.jsx)("div",{className:"overflow-x-auto",children:(0,a.jsxs)("table",{className:"w-full text-left border-collapse",children:[(0,a.jsx)("thead",{children:(0,a.jsx)("tr",{className:"bg-slate-50 text-[11px] uppercase tracking-[0.2em] text-slate-500",children:e.header.map((t,s)=>{let l=e.teams.some(e=>e.form&&e.form.length>0);return t.toLowerCase().includes("phong độ")&&!l?null:(0,a.jsx)("th",{colSpan:s===e.header.length-1&&l?5:1,className:`p-4 font-semibold ${1===s?"w-1/3 text-left":"text-center"}`,children:t},s)})})}),(0,a.jsx)("tbody",{className:"text-sm",children:e.teams.map((t,s)=>(o(Number(t.data[0]||s+1),e.teams.length),(0,a.jsxs)("tr",{className:"group border-b border-slate-100 bg-white transition-colors hover:bg-slate-50 cursor-pointer",children:[t.data.map((s,l)=>0===l?(0,a.jsx)(x,{value:s,totalTeams:e.teams.length},l):1===l?(0,a.jsx)("td",{className:"p-4",children:(0,a.jsxs)("div",{className:"flex items-center gap-3 rounded-2xl border border-slate-100 bg-slate-50 px-4 py-2.5 transition-colors group-hover:border-[#4681E8]/30 group-hover:bg-[#4681E8]/5",children:[t.team_logo?(0,a.jsx)("img",{src:t.team_logo,alt:s,className:"h-8 w-8 rounded-full bg-white object-contain p-0.5 filter drop-shadow-[0_2px_4px_rgba(0,0,0,0.1)]",loading:"lazy"}):(0,a.jsx)("div",{className:"flex h-8 w-8 items-center justify-center rounded-full border border-slate-200 bg-white text-[10px] font-bold text-slate-400",children:"?"}),(0,a.jsx)("span",{className:"font-bold text-slate-800 transition-colors group-hover:text-[#4681E8]",children:s})]})},l):(0,a.jsx)("td",{className:"p-4 text-center font-mono text-slate-600",children:s},l)),t.form&&t.form.length>0&&(0,a.jsxs)(a.Fragment,{children:[t.form.map((e,t)=>(0,a.jsx)("td",{className:"p-2 text-center",children:e.match_time?(0,a.jsx)(c,{detail:e}):(0,a.jsx)(d,{result:e.result})},`form-${t}`)),t.form.length<5&&Array.from({length:5-t.form.length}).map((e,t)=>(0,a.jsx)("td",{className:"p-2"},`pad-${t}`))]})]},s)))})]})})]}),!t&&!f&&j&&(0,a.jsx)(m,{rankings:e.rankings}),!t&&!f&&!j&&e.header&&e.teams&&(0,a.jsx)("div",{className:"text-center py-20 text-slate-600",children:"Dữ liệu đang được cập nhật..."}),!t&&(f||j)&&(0,a.jsxs)("div",{className:"mt-6 flex flex-wrap items-center gap-5 px-5 py-4 bg-slate-50 rounded-2xl border border-slate-200",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,a.jsx)("span",{className:"w-2.5 h-2.5 rounded-full bg-emerald-500"}),(0,a.jsx)("span",{className:"text-[11px] text-slate-600 font-bold uppercase tracking-wider",children:"Đội trưởng bảng"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,a.jsx)("span",{className:"w-2.5 h-2.5 rounded-full bg-sky-4
34300"}),(0,a.jsx)("span",{className:"text-[11px] text-slate-600 font-bold uppercase tracking-wider",children:"Champions League"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,a.jsx)("span",{className:"w-2.5 h-2.5 rounded-full bg-amber-500"}),(0,a.jsx)("span",{className:"text-[11px] text-slate-600 font-bold uppercase tracking-wider",children:"Europa League"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,a.jsx)("span",{className:"w-2.5 h-2.5 rounded-full bg-[#f97316]"}),(0,a.jsx)("span",{className:"text-[11px] text-slate-600 font-bold uppercase tracking-wider",children:"Europa Conference"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,a.jsx)("span",{className:"w-2.5 h-2.5 rounded-full bg-[#E11D48]"}),(0,a.jsx)("span",{className:"text-[11px] text-slate-600 font-bold uppercase tracking-wider",children:"Xuống hạng"})]})]})]})}function m({rankings:e}){if(!e||0===e.length)return null;let t=e[0].data,s=e.slice(1);return(0,a.jsx)("div",{className:"overflow-hidden rounded-[22px] border border-[#cbd5e1] bg-[linear-gradient(180deg,#191a20,#111218)] shadow-[0_24px_80px_rgba(0,0,0,0.4)]",children:(0,a.jsx)("div",{className:"overflow-x-auto",children:(0,a.jsxs)("table",{className:"w-full text-left border-collapse",children:[(0,a.jsx)("thead",{children:(0,a.jsx)("tr",{className:"bg-white text-[11px] uppercase tracking-[0.18em] text-slate-600",children:t.map((e,l)=>{let r=l===t.length-1,n=s[0]&&s[0].data.length>t.length?s[0].data.length-t.length+1:1;return(0,a.jsx)("th",{colSpan:r?n:1,className:`p-4 font-semibold ${1===l?"w-1/3 text-left":"text-center"}`,children:e},l)})})}),(0,a.jsx)("tbody",{className:"text-sm",children:s.map((e,t)=>(0,a.jsx)("tr",{className:"group border-b border-[#cbd5e1] transition-colors hover:bg-white",children:e.data.map((t,l)=>0===l?(0,a.jsx)(x,{value:t,totalTeams:s.length},l):1===l?(0,a.jsx)("td",{className:"p-4",children:(0,a.jsxs)("div",{className:"flex items-center gap-3 rounded-2xl border border-white/6 bg-[linear-gradient(180deg,rgba(255,255,255,0.03),rgba(255,255,255,0.01))] px-3 py-2 transition-colors group-hover:border-emerald-600/22",children:[e.team_logo?(0,a.jsx)("img",{src:e.team_logo,alt:t,className:"h-8 w-8 rounded-full bg-white/5 object-contain ring-1 ring-white/8",loading:"lazy"}):(0,a.jsx)("div",{className:"flex h-8 w-8 items-center justify-center rounded-full border border-gray-700 bg-gray-800 text-xs font-bold text-gray-500",children:"?"}),(0,a.jsx)("span",{className:"font-bold text-slate-900 transition-colors group-hover:text-emerald-600",children:t})]})},l):["W","D","L"].includes(t)?(0,a.jsx)("td",{className:"p-2 text-center",children:(0,a.jsx)("span",{className:`inline-flex h-7 w-7 items-center justify-center rounded-[8px] text-[11px] font-black ${i(t)}`,children:t})},l):(0,a.jsx)("td",{className:"p-4 text-center font-mono text-slate-600",children:t},l))},t))})]})})})}},33101:(e,t,s)=>{"use strict";s.d(t,{Klivevip20MatchDetailPage:()=>m});var a=s(68019),l=s(10707),r=s(58420);function n({src:e,poster:t,autoPlay:s=!0,onError:i,className:o=""}){let c=(0,l.useRef)(null),d=(0,l.useRef)(i);d.current=i;let[x,h]=(0,l.useState)(!1),[m,p]=(0,l.useState)(!1);return((0,l.useEffect)(()=>{let t=c.current;if(!t)return;let a=null;h(!1);let l=()=>p(!0),n=()=>p(!1);t.addEventListener("play",l),t.addEventListener("pause",n);let i=()=>{s&&(t.muted=!0,t.play().catch(()=>{}))};if(t.addEventListener("canplay",i),r.Ay.isSupported()){(a=new r.Ay({maxBufferLength:30,maxMaxBufferLength:60,lowLatencyMode:!0,enableWorker:!0})).loadSource(e),a.attachMedia(t),a.on(r.Ay.Events.MANIFEST_PARSED,()=>{s&&(t.muted=!0,t.play().catch(e=>{console.warn("AutoPlay failed:",e),t.muted=!1}))});let l=0,n=0;a.on(r.Ay.Events.ERROR,(e,t)=>{if(t.type===r.Ay.ErrorTypes.NETWORK_ERROR&&(++l>2||t.response&&t.response.code>=400)){console.error("HLS Network Error threshold reached (CORS/404), triggering fallback.",t),h(!0),d.current&&d.current(t),a?.destroy();return}if(t.fatal)switch(t.type){case r.Ay.ErrorTypes.NETWORK_ERROR:console.error("HLS Fatal Network Error, recovering...",t),a?.startLoad();break;case r.Ay.ErrorTypes.MEDIA_ERROR:console.error("HLS Media Error, recovering...",t),++n>3?(console.error("HLS Media Error threshold reached, triggering fallback."),h(!0),d.current&&d.current(t),a?.destroy()):a?.recoverMediaError();break;default:console.error("HLS Fatal Error:",t),h(!0),d.current&&d.current(t),a?.destroy()}})}else t.canPlayType("application/vnd.apple.mpegurl")&&(t.src=e,t.addEventListener("loadedmetadata",()=>{s&&t.play().catch(e=>{console.warn("AutoPlay failed:",e)})}),t.addEventListener("error",e=>{h(!0),d.current&&d.current(e)}));return()=>{t.removeEventListener("play",l),t.removeEventListener("pause",n),t.removeEventListener("canplay",i),a&&a.destroy()}},[e,s]),x)?i?null:(0,a.jsxs)("div",{className:`w-full h-full flex flex-col items-center justify-center bg-white/80 backdrop-blur ${o}`,children:[(0,a.jsx)("svg",{className:"w-12 h-12 text-red-500 mb-4 opacity-80",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"})}),(0,a.jsx)("div",{className:"text-slate-600 text-sm font-medium",children:"Video/Stream kh\xf4ng khả dụng hoặc bị lá
343»—i mạng"}),(0,a.jsx)("div",{className:"text-gray-500 text-xs mt-1",children:"Vui l\xf2ng thá»­ lại sau hoặc chọn nguồn kh\xe1c"})]}):(0,a.jsx)("div",{className:`relative group w-full h-full bg-white flex items-center justify-center overflow-hidden ${o}`,children:(0,a.jsx)("video",{ref:c,className:"w-full h-full object-contain",controls:!0,playsInline:!0,muted:s,poster:t,referrerPolicy:"no-referrer"})})}function i(e){let t=(e||"").split(/[\s-]+/).slice(0,2).map(e=>e[0]||"").join("").toUpperCase()||"??";return`data:image/svg+xml,${encodeURIComponent(`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 80 80"><rect width="80" height="80" rx="20" fill="#1a1c25"/><text x="40" y="47" font-size="20" font-family="Arial" font-weight="700" text-anchor="middle" fill="#666">${t}</text></svg>`)}`}function o({homeName:e,awayName:t,homeLogo:s,awayLogo:l,homeScore:r="0",awayScore:n="0",statusText:c="LIVE",timeText:d="",isLive:x=!0,sportId:h="1",matchId:m}){let p=s||i(e),u=l||i(t),g="5"===String(h),b="2"===String(h),f="bg-slate-200 border-slate-200",j="repeating-linear-gradient(90deg, transparent, transparent 10%, #000 10%, #000 20%)";return g?(f="bg-slate-100 border-slate-200",j="none"):b&&(f="bg-[#bc7a46] border-[#8a4e21]",j="repeating-linear-gradient(90deg, transparent, transparent 5%, #000 5%, #000 10%)"),(0,a.jsxs)("div",{className:"relative w-full aspect-video min-h-[300px] max-h-[600px] bg-slate-50 overflow-hidden flex flex-col justify-center",children:[(0,a.jsx)("div",{className:"absolute inset-0 flex items-center justify-center pointer-events-none mt-16 md:mt-24",children:(0,a.jsx)("div",{className:"relative w-[120%] h-[120%] sm:w-[90%] sm:h-[120%] max-w-[900px] flex-shrink-0 transition-transform duration-1000",style:{transform:"perspective(900px) rotateX(60deg) scale(0.9)",transformOrigin:"center center"},children:(0,a.jsxs)("div",{className:`absolute inset-0 ${f} shadow-[0_30px_60px_rgba(0,0,0,0.8)] border-4 rounded-xl overflow-hidden flex transition-colors duration-500`,children:[(0,a.jsx)("div",{className:"absolute inset-0 opacity-15 pointer-events-none",style:{backgroundImage:j}}),(0,a.jsxs)("div",{className:"absolute inset-[4%] pointer-events-none shadow-sm flex items-center justify-center",children:["1"===String(h)&&(0,a.jsxs)("div",{className:"absolute inset-0 w-full h-full border-2 border-white/60",children:[(0,a.jsx)("div",{className:"absolute left-1/2 top-0 bottom-0 w-0 border-l-2 border-white/60 -translate-x-1/2"}),(0,a.jsx)("div",{className:"absolute left-1/2 top-1/2 w-[18%] aspect-square rounded-full border-2 border-white/60 -translate-x-1/2 -translate-y-1/2"}),(0,a.jsx)("div",{className:"absolute left-1/2 top-1/2 w-2 h-2 rounded-full bg-white/80 -translate-x-1/2 -translate-y-1/2"}),(0,a.jsx)("div",{className:"absolute left-0 top-1/2 w-[16%] h-[46%] border-2 border-l-0 border-white/60 -translate-y-1/2 bg-slate-200"}),(0,a.jsx)("div",{className:"absolute left-0 top-1/2 w-[6%] h-[20%] border-2 border-l-0 border-white/60 -translate-y-1/2 bg-slate-200"}),(0,a.jsx)("div",{className:"absolute left-[16%] top-1/2 w-[8%] aspect-square border-2 border-l-0 border-white/60 rounded-r-full -translate-y-1/2 clip-path-half",style:{clipPath:"inset(0 0 0 50%)"}}),(0,a.jsx)("div",{className:"absolute right-0 top-1/2 w-[16%] h-[46%] border-2 border-r-0 border-white/60 -translate-y-1/2 bg-slate-200"}),(0,a.jsx)("div",{className:"absolute right-0 top-1/2 w-[6%] h-[20%] border-2 border-r-0 border-white/60 -translate-y-1/2 bg-slate-200"}),(0,a.jsx)("div",{className:"absolute right-[16%] top-1/2 w-[8%] aspect-square border-2 border-r-0 border-white/60 rounded-l-full -translate-y-1/2 clip-path-half",style:{clipPath:"inset(0 50% 0 0)"}})]}),g&&(0,a.jsxs)("div",{className:"absolute inset-[10%] w-[80%] h-[80%] border-2 border-white/80 bg-white",children:[(0,a.jsx)("div",{className:"absolute top-[10%] bottom-[10%] left-0 right-0 border-y-2 border-white/80"}),(0,a.jsx)("div",{className:"absolute left-1/2 top-[-2%] bottom-[-2%] w-1 bg-white/40 shadow-xl -translate-x-1/2 z-10"}),(0,a.jsx)("div",{className:"absolute left-[25%] right-[25%] top-[10%] bottom-[
34310%] border-x-2 border-white/80"}),(0,a.jsx)("div",{className:"absolute left-[25%] right-[25%] top-1/2 w-[50%] border-t-2 border-white/80 -translate-y-1/2"}),(0,a.jsx)("div",{className:"absolute left-0 top-1/2 w-[2%] border-t-2 border-white/80 -translate-y-1/2"}),(0,a.jsx)("div",{className:"absolute right-0 top-1/2 w-[2%] border-t-2 border-white/80 -translate-y-1/2"})]}),b&&(0,a.jsxs)("div",{className:"absolute inset-0 w-full h-full border-2 border-white/50",children:[(0,a.jsx)("div",{className:"absolute left-1/2 top-0 bottom-0 w-0 border-l-2 border-white/50 -translate-x-1/2"}),(0,a.jsx)("div",{className:"absolute left-1/2 top-1/2 w-[15%] aspect-square rounded-full border-2 border-white/50 -translate-x-1/2 -translate-y-1/2"}),(0,a.jsx)("div",{className:"absolute left-0 top-1/2 w-[18%] h-[35%] border-2 border-l-0 border-white/50 -translate-y-1/2 bg-[#bc7a46]"}),(0,a.jsx)("div",{className:"absolute left-[18%] top-1/2 w-[10%] aspect-square rounded-full border-2 border-white/50 -translate-y-1/2"}),(0,a.jsx)("div",{className:"absolute left-0 top-1/2 w-[30%] h-[70%] border-2 border-l-0 border-white/50 rounded-r-full -translate-y-1/2 opacity-60"}),(0,a.jsx)("div",{className:"absolute right-0 top-1/2 w-[18%] h-[35%] border-2 border-r-0 border-white/50 -translate-y-1/2 bg-[#bc7a46]"}),(0,a.jsx)("div",{className:"absolute right-0 top-1/2 w-[30%] h-[70%] border-2 border-r-0 border-white/50 rounded-l-full -translate-y-1/2 opacity-60"})]})]}),x&&(0,a.jsx)("div",{className:`absolute left-1/2 top-1/2 shadow-[0_8px_16px_rgba(0,0,0,0.8)] z-10 transition-all duration-[3000ms] border-2 border-white/20 rounded-full
344                                ${g?"w-2 h-2 sm:w-3 sm:h-3 bg-[#ccff00]":b?"w-4 h-4 sm:w-6 sm:h-6 bg-[#d95d16]":"w-4 h-4 sm:w-5 sm:h-5 bg-white"}`,style:{animation:"ballMove 8s infinite alternate ease-in-out",transform:"translate(-50%, -50%)"},children:(0,a.jsx)("div",{className:"absolute -bottom-4 left-1/2 w-4 h-2 bg-white/40 rounded-full blur-sm -translate-x-1/2"})}),x&&(0,a.jsxs)("div",{className:"absolute left-[65%] top-[60%] flex flex-col items-center animate-bounce-slow",style:{animation:"floatBubble 4s infinite alternate ease-in-out"},children:[(0,a.jsxs)("div",{className:"bg-white/95 backdrop-blur border border-white/10 rounded-2xl p-2 shadow-2xl flex items-center gap-3 w-max max-w-[200px]",children:[(0,a.jsx)("div",{className:"w-6 h-6 rounded-full flex items-center justify-center p-0.5 bg-white/5 shrink-0",children:(0,a.jsx)("img",{src:p,alt:e||"Home team",className:"max-w-full max-h-full object-contain",onError:t=>t.target.src=i(e),loading:"lazy",decoding:"async"})}),(0,a.jsx)("div",{className:"flex flex-col pr-1 overflow-hidden",children:(0,a.jsx)("span",{className:"text-slate-900 font-bold text-[10px] sm:text-xs tracking-wide truncate",children:g?"Serve / Return":"Tấn c\xf4ng nguy hiểm"})})]}),(0,a.jsx)("div",{className:"w-0 h-0 border-l-[6px] border-r-[6px] border-t-[6px] border-l-transparent border-r-transparent border-t-[#1a1c28]/95 mt-[-1px]"})]})]})})}),(0,a.jsx)("div",{className:"relative z-20 flex-1 flex flex-col items-center justify-start p-4 md:p-6 pointer-events-none w-full",children:(0,a.jsxs)("div",{className:"w-full max-w-[800px] flex items-center justify-between px-4 sm:px-6 py-3 rounded-xl bg-gradient-to-r from-[#0d0f14]/90 via-[#151821]/95 to-[#0d0f14]/90 backdrop-blur-xl border border-white/10 shadow-[0_10px_40px_rgba(0,0,0,0.8)] pointer-events-auto",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 flex-1 min-w-0 pr-2",children:[(0,a.jsx)("img",{src:p,alt:e,className:"w-8 h-8 md:w-12 md:h-12 object-contain drop-shadow-lg shrink-0",onError:t=>t.target.src=i(e),loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-slate-900 text-xs sm:text-sm md:text-base font-bold truncate tracking-wide",children:e})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1 shrink-0 px-2 sm:px-6 min-w-[100px]",children:[(0,a.jsxs)("span",{className:`inline-flex items-center gap-1.5 px-2.5 py-0.5 rounded-full text-[10px] sm:text-xs font-bold shadow-inner ${x?"bg-green-500/10 text-green-400 border border-green-500/20":"bg-white/5 text-slate-900/40"}`,children:[x&&(0,a.jsx)("span",{className:"w-1.5 h-1.5 rounded-full bg-green-500 animate-pulse shadow-[0_0_8px_#22c55e]"}),d||c]}),(0,a.jsxs)("div",{className:"flex gap-3 sm:gap-5 items-center justify-center",children:[(0,a.jsx)("span",{className:"text-slate-900 text-2xl sm:text-4xl font-black drop-shadow-md",children:r}),(0,a.jsx)("span",{className:"text-slate-900/30 text-xl font-light",children:"-"}),(0,a.jsx)("span",{className:"text-slate-900 text-2xl sm:text-4xl font-black drop-shadow-md",children:n})]})]}),(0,a.jsxs)("div",{className:"flex items-center justify-end gap-3 flex-1 min-w-0 pl-2 text-right",children:[(0,a.jsx)("span",{className:"text-slate-900 text-xs sm:text-sm md:text-base font-bold truncate tracking-wide",children:t}),(0,a.jsx)("img",{src:u,alt:t,className:"w-8 h-8 md:w-12 md:h-12 object-contain drop-shadow-lg shrink-0",onError:e=>e.target.src=i(t),loading:"lazy",decoding:"async"})]})]})}),(0,a.jsx)("div",{className:"relative z-20 mt-auto w-full p-4 flex justify-center pointer-events-none",children:(0,a.jsx)("div",{className:"w-full max-w-[600px] h-6 bg-white/40 backdrop-blur-md rounded-full border border-white/5 flex items-center px-4",children:(0,a.jsxs)("div",{className:"flex-1 h-0.5 bg-white/10 relative rounded-full",children:[x&&(0,a.jsx)("div",{className:"absolute left-0 top-0 bottom-0 bg-gradient-to-r from-[#b38b22] to-[#ffda6a] w-[65%] rounded-full opacity-90 shadow-[0_0_12px_#daa520]"}),(0,a.jsx)("span",{className:"absolute left-[65%] top-1/2 -translate-y-1/2 -translate-x-1/2 w-1.5 h-1.5 rounded-full bg-white shadow-md"})]})})}),(0,a.jsx)("style",{children:`
345                @keyframes ballMove {
346                    0% { transform: translate(-30%, -20%) scale(1); }
347                    25% { transform: translate(40%, -10%) scale(1.1); }
348                    50% { transform: translate(20%, 30%) scale(0.9); }
349                    75% { transform: translate(-10%, 15%) scale(1.2); }
350                    100% { transform: translate(-45%, 0%) scale(1); }
351                }
352                @keyframes floatBubble {
353                    0% { transform: translateY(0px) translateX(0px); }
354                    50% { transform: translateY(-8px) translateX(4px); }
355                    100% { transform: translateY(4px) translateX(-4px); }
356                }
357            `})]})}function c(e,t){if("1"===t||"2"===t)switch(e){case"2":return{t:"HT 1",live:!0,sc:!0};case"3":return{t:"Giữa giờ",live:!0,sc:!0};case"4":return{t:"HT 2",live:!0,sc:!0};case"5":return{t:"Hiệp phụ",live:!0,sc:!0};case"7":return{t:"Penalty",live:!0,sc:!0};case"8":case"9":return{t:"Kết th\xfac",live:!1,sc:!0};default:return{t:"Chưa bắt đầu",live:!1,sc:!1}}
357return["51","52","53","54","55"].includes(e)?{t:`Set ${e-50}`,live:!0,sc:!0}:["100","90","110"].includes(e)?{t:"KT",live:!1,sc:!0}:"0"===e||"1"===e?{t:"Chưa bắt đầu",live:!1,sc:!1}:{t:"LIVE",live:!0,sc:!0}}function d(e){let t=(e||"").split(/[\s-]+/).slice(0,2).map(e=>e[0]||"").join("").toUpperCase()||"??";return`data:image/svg+xml,${encodeURIComponent(`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 80 80"><rect width="80" height="80" rx="20" fill="#1a1c25"/><text x="40" y="47" font-size="20" font-family="Arial" font-weight="700" text-anchor="middle" fill="#666">${t}</text></svg>`)}`}function x(e){let t=new Date(1e3*parseInt(e||"0",10));return{hm:t.toLocaleTimeString("vi-VN",{hour:"2-digit",minute:"2-digit",timeZone:"Asia/Ho_Chi_Minh"}),dm:t.toLocaleDateString("vi-VN",{day:"2-digit",month:"2-digit",timeZone:"Asia/Ho_Chi_Minh"}),full:t.toLocaleDateString("vi-VN",{day:"2-digit",month:"2-digit",year:"numeric",timeZone:"Asia/Ho_Chi_Minh"})}}let h="max-w-[1200px]";function m({matchData:e,relatedMatches:t,matchDetails:s,standings:r,brandingNameUpper:i}){let p,u,g,j,v,y,[C,S]=(0,l.useState)("odds"),L=e?.match_data?.anchors||[],[$,F]=(0,l.useState)(!1),[T,A]=(0,l.useState)(!1),[M,H]=(0,l.useState)(null),[D,B]=(0,l.useState)(!1),z=(0,l.useRef)(0);(0,l.useEffect)(()=>{if(!e?.has_live||"1"!==e.has_live||0===L.length)return;let t=!1;B(!0);let s=async t=>{let s=t?.uid,a=`/api/socolive/proxy-stream?url=${encodeURIComponent(`https://live.inplyr.com/${s?`room/${s}`:`default/${e.id}`}.m3u8`)}`;try{let e=await fetch(a,{method:"GET",cache:"no-store"});if(!e.ok)return null;let s=(await e.text()).split("\n").filter(e=>e.trim()&&!e.startsWith("#"));if(0===s.length)return null;return(await fetch(s[0],{method:"HEAD",cache:"no-store"})).ok?t:null}catch{return null}};return Promise.all(L.map(e=>s(e))).then(e=>{if(t)return;let s=e.find(e=>null!==e);s?(H(s),F(!0),A(!1)):(H(L[0]),A(!0)),B(!1)}),()=>{t=!0}},[e?.has_live,L.length]),(0,l.useEffect)(()=>{if(!T||D||z.current>=20)return;let t=setTimeout(()=>{z.current++,A(!1),B(!0);let t=async t=>{let s=t?.uid,a=`/api/socolive/proxy-stream?url=${encodeURIComponent(`https://live.inplyr.com/${s?`room/${s}`:`default/${e.id}`}.m3u8`)}`;try{let e=await fetch(a,{method:"GET",cache:"no-store"});if(!e.ok)return null;let s=(await e.text()).split("\n").filter(e=>e.trim()&&!e.startsWith("#"));if(0===s.length)return null;return(await fetch(s[0],{method:"HEAD",cache:"no-store"})).ok?t:null}catch{return null}};Promise.all(L.map(e=>t(e))).then(e=>{let t=e.find(e=>null!==e);t?(H(t),F(!0),A(!1)):A(!0),B(!1)})},15e3);return()=>clearTimeout(t)},[T,D]);let[I,R]=(0,l.useState)(null),U=e?.post_name||e?.ls_id||e?.id;if(window.location.origin,(0,l.useEffect)(()=>{if(!U)return;let e=setInterval(async()=>{try{let e=await fetch(`/api/klivevip/match/${U}`,{cache:"no-store"});if(e.ok){let t=await e.json();R(t?.match??null)}}catch{}},1e4);return()=>clearInterval(e)},[U]),!e)return(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center py-32 gap-4",children:[(0,a.jsx)("span",{className:"text-[#64748B] text-lg",children:"Kh\xf4ng t\xecm thấy trận đấu"}),(0,a.jsx)("a",{href:"/",className:"text-[#4681E8] hover:underline text-sm",children:"← Quay lại"})]});let G=I?{...e,...I}:e,P=G?.has_live==="1"&&L.length>0,K=c(G.status_id,G.sport_id),V=$&&M&&!T&&!D,W=P&&(D||T&&K.live&&z.current<20),O=!P||T&&!W&&!D,q=!K.live&&"8"!==String(G.status_id)&&"9"!==String(G.status_id),{hm:X,full:Y}=x(G.time),Z=G.source_card_meta?.league_label||G.match_data?.competition_vi||G.match_data?.competition_full||"",Q=G.match_data?.stage_label||G.source_card_meta?.stage_label||"",J=G.home_logo||d(G.home_name),ee=G.away_logo||d(G.away_name),et=e=>t=>{t.target.src=d(e)};return(0,a.jsxs)("div",{className:"w-full bg-white min-h-screen text-slate-600 font-sans pb-16",children:[(0,a.jsx)("div",{className:"w-full border-b border-slate-200 bg-white",children:(0,a.jsxs)("div",{className:`${h} mx-auto px-4 py-3 flex items-center justify-between`,children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 text-[13px] font-bold",children:[(0,a.jsx)("span",{className:"text-[#4681E8] uppercase tracking-wide",children:Z}),Q&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"text-slate-300",children:"•"}),(0,a.jsx)("span",{className:"text-slate-600",children:Q})]})]}),(0,a.jsx)("div",{className:"text-[12px] font-mono text-slate-400 hidden sm:block",children:Y})]})}),(0,a.jsxs)("div",{className:`${h} mx-auto px-0 md:px-4 py-0 md:py-6 flex flex-col lg:flex-row gap-4 lg:gap-6`,children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0 flex flex-col gap-4 lg:gap-6",children:[(0,a.jsxs)("div",{className:"w-full relative bg-[#000000] rounded-none md:rounded-2xl overflow-hidden shadow-[0_10px_40px_rgba(0,0,0,0.5)] border-y md:border border-slate-200",children:[(0,a.jsx)("div",{className:"relative w-full aspect-video bg-[#000000] group z-10",children:V?(0,a.jsx)(n,{src:`/api/klivevip/proxy-stream?url=${encodeURIComponent(`https://live.inplyr.com/${M?.uid&&"default"!==M.uid?`room/${M.uid}`:`default/${G.id}`}.m3u8`)}`,autoPlay:!0,onError:()=>A(!0)}):O?(0,a.jsx)(o,{homeName:G.home_name,awayName:G.away_name,homeLogo:G.home_logo,awayLogo:G.away_logo,homeScore:K.sc?G.home_score:"0",awayScore:K.sc?G.away_score:"0",statusText:K.t,timeText:G.time_text||X,isLive:K.live,sportId:G.sport_id,matchId:G.ls_id||G.id,kickoffMs:1e3*Number(G?.time||0),isPreMatch:q}):(0,a.jsxs)("div",{className:"absolute inset-0 z-10 flex flex-col items-center justify-center p-4 lg:p-10",children:[(0,a.jsxs)("div",{className:"absolute inset-0 flex justify-between items-center opacity-[0.03] pointer-events-none px-4 lg:px-20 overflow-hidden",children:[(0,a.jsx)("img",{src:J,alt:"",className:"w-1/2 max-w-[400px] blur-[10px]",loading:"lazy",decoding:"async"}),(0,a.jsx)("img",{src:ee,alt:"",className:"w-1/2 max-w-[400px] blur-[10px]",loading:"lazy",decoding:"async"})]}),P&&!T&&(0,a.jsx)("button",{onClick:()=>F(!0),className:"group mb-4 sm:mb-8 w-16 h-16 md:w-20 md:h-20 rounded-full bg-[#4681E8] flex items-center justify-center hover:bg-[#55CAF1] transition-all shadow-[0_0_30px_rgba(70,129,232,0.5)] curs
357or-pointer z-20",children:(0,a.jsx)("svg",{className:"w-8 h-8 md:w-10 md:h-10 text-white ml-1.5 md:ml-2 group-hover:scale-110 transition-transform",viewBox:"0 0 24 24",fill:"currentColor",children:(0,a.jsx)("path",{d:"M8 5v14l11-7z"})})}),(0,a.jsxs)("div",{className:"grid grid-cols-[1fr_auto_1fr] items-center w-full max-w-[800px] gap-2 lg:gap-8 z-20",children:[(0,a.jsxs)("div",{className:"flex flex-col items-center gap-2 lg:gap-4",children:[(0,a.jsx)("img",{src:J,alt:G.home_name,className:"w-16 h-16 sm:w-24 sm:h-24 lg:w-32 lg:h-32 object-contain drop-shadow-[0_10px_20px_rgba(0,0,0,0.8)]",onError:et(G.home_name),loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-[#FFFFFF] text-xs sm:text-base lg:text-lg font-black text-center line-clamp-2 uppercase tracking-wide",children:G.home_name})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-2 lg:gap-3",children:[K.sc?(0,a.jsxs)("div",{className:"flex items-center gap-3 lg:gap-6 bg-white/90 backdrop-blur-md px-4 py-2 lg:px-8 lg:py-4 rounded-2xl border border-slate-200 shadow-2xl",children:[(0,a.jsx)("span",{className:"text-[#4681E8] text-[32px] sm:text-[48px] lg:text-[64px] font-black leading-none",children:G.home_score}),(0,a.jsx)("span",{className:"text-slate-300 text-[20px] lg:text-[28px] font-light",children:":"}),(0,a.jsx)("span",{className:"text-[#4681E8] text-[32px] sm:text-[48px] lg:text-[64px] font-black leading-none",children:G.away_score})]}):(0,a.jsx)("div",{className:"text-[#FFFFFF] text-[32px] sm:text-[48px] lg:text-[56px] font-black tracking-widest leading-none drop-shadow-xl",children:X}),(0,a.jsxs)("span",{className:`inline-flex items-center gap-2 rounded-full px-3 py-1 lg:px-5 lg:py-1.5 text-[10px] lg:text-[12px] font-bold tracking-widest uppercase ${K.live?"bg-[#4681E8] text-white shadow-[0_0_20px_rgba(70,129,232,0.6)]":"bg-white text-slate-600 border border-slate-200"}`,children:[K.live&&(0,a.jsx)("span",{className:"w-2 h-2 rounded-full bg-white animate-pulse"}),K.t,G.time_text?` : ${G.time_text}`:""]})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-2 lg:gap-4",children:[(0,a.jsx)("img",{src:ee,alt:G.away_name,className:"w-16 h-16 sm:w-24 sm:h-24 lg:w-32 lg:h-32 object-contain drop-shadow-[0_10px_20px_rgba(0,0,0,0.8)]",onError:et(G.away_name),loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-[#FFFFFF] text-xs sm:text-base lg:text-lg font-black text-center line-clamp-2 uppercase tracking-wide",children:G.away_name})]})]})]})}),L.length>0&&(0,a.jsxs)("div",{className:"w-full bg-white border-t border-slate-200 px-3 lg:px-6 py-2.5 lg:py-4 flex items-center gap-2 lg:gap-4 overflow-x-auto z-20",children:[(0,a.jsx)("span",{className:"text-[10px] lg:text-[11px] text-slate-600 uppercase font-bold tracking-widest shrink-0 mr-1 lg:mr-2",children:"CHỌN K\xcaNH TRUYỀN:"}),L.map((e,t)=>(0,a.jsxs)("button",{onClick:()=>{H(e),F(!0),A(!1)},className:`shrink-0 flex items-center gap-1.5 lg:gap-2 rounded-full px-3 py-1.5 lg:px-5 lg:py-2 text-[11px] lg:text-[13px] font-bold transition-all ${M?.uid===e.uid&&!T?"bg-[#4681E8]/10 border border-[#4681E8] text-[#4681E8] shadow-[0_0_15px_rgba(70,129,232,0.2)]":"bg-white border border-slate-200 text-slate-600 hover:text-[#4681E8] hover:border-[#4681E8]/50"}`,children:[(0,a.jsx)("span",{className:`w-1.5 h-1.5 lg:w-2 lg:h-2 rounded-full ${M?.uid===e.uid&&!T?"bg-[#4681E8] animate-pulse":"bg-transparent"}`}),"BLV ",e.nickName||`K\xeanh ${t+1}`]},e.uid||t))]})]}),(p=(()=>{let e=s?.stats;if(!e)return!1;let t=null;return Array.isArray(e)&&e.length>0?t=e[0]:e?.results?.[0]?t=e.results[0]:e?.stats_full_time&&(t=e),!!t&&!!(t.stats_full_time?.length>0||t.stats_haft_time?.length>0||t.stats_half_time?.length>0||t.stats?.length>0)})(),u=!!(s?.lineup&&(Array.isArray(s.lineup)?s.lineup.length>0:s.lineup.home||s.lineup.away)),g=!!(s?.events&&(Array.isArray(s.events)?s.events.length>0:s.events.incidents?.length>0||s.events.data?.length>0)),j=!!(r&&(Array.isArray(r)?r.length>0:r.data?.length>0)),(y=(v=[{id:"stats",label:"THỐNG K\xca",show:p},{id:"lineup",label:"ĐỘI H\xccNH",show:u},{id:"events",label:"DIỄN BIẾN",show:g},{id:"standings",label:"BẢNG XH",show:j},{id:"odds",label:"TỶ LỆ K\xc8O",show:!!(s?.odds&&Array.isArray(s.odds)&&s.odds.length>0)}].filter(e=>e.show)).find(e=>e.id===C)?C:v[0]?.id||"odds")!==C&&setTimeout(()=>S(y),0),v.length>0?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"bg-white rounded-2xl p-2 border border-slate-200 flex overflow-x-auto gap-2 shadow-[0_4px_15px_rgba(0,0,0,0.08)] mx-4 md:mx-0",children:v.map(({id:e,label:t})=>(0,a.jsx)("button",{onClick:()=>S(e),className:`flex-1 min-w-[100px] py-2.5 sm:py-3 text-[10px] sm:text-[12px] font-black uppercase tracking-widest rounded-xl transition-all ${y===e?"bg-[#4681E8]/10 text-[#4681E8] border border-[#4681E8]/30 shadow-inner":"text-slate-500 hover:text-[#4681E8] hover:bg-[#4681E8]/5 border border-transparent"}`,children:t},e))}),(0,a.jsxs)("div",{className:"bg-white rounded-2xl border border-slate-200 overflow-hidden shadow-[0_4px_15px_rgba(0,0,0,0.08)] min-h-[400px] mx-4 md:mx-0",children:["stats"===y&&(0,a.jsx)(b,{matchDetails:s}),"lineup"===y&&(0,a.jsx)(f,{matchDetails:s}),"events"===y&&(0,a.jsx)(_,{events:s?.events}),"standings"===y&&(0,a.jsx)(k,{standings:r}),"odds"===y&&(0,a.jsx)(E,{odds:s?.odds})]})]}):null),t.length>0&&(0,a.jsxs)("div",{className:"mt-4 mx-4 md:mx-0",children:[(0,a.jsxs)("h2",{className:"px-1 py-4 text-sm sm:text-base font-black text-slate-800 uppercase flex items-center gap-3 tracking-widest border-b border-slate-100 mb-4",children:[(0,a.jsx)("span",{className:"w-1 h-5 bg-[#4681E8] rounded-sm shadow-[0_0_8px_#4681E8]"}),"TRẬN ĐẤU C\xd9NG GIẢI"]}),(0,a.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3 sm:gap-4",children:t.slice(0,4).map(e=>(0,a.jsx)(w,{m:e},e.id))})]})]}),(0,a.jsx)("div",{className:"w-full lg:w-[350px] xl:w-[400px] shrink-0 px-4 md:px-0",children:(0,a.jsxs)("div",{className:"bg-white border border-slate-200 rounded-2xl overflow-hidden flex flex-col shadow-[0_10px_30px_rgba(0,0,0,0.1)] lg:sticky lg:top-8 h-[600px] lg:h-[c
357alc(100vh-100px)] lg:max-h-[850px]",children:[(0,a.jsxs)("div",{className:"px-5 py-4 border-b border-slate-200 flex items-center justify-between bg-white",children:[(0,a.jsxs)("h3",{className:"text-slate-800 text-sm font-black uppercase tracking-widest flex items-center gap-2",children:[(0,a.jsx)("span",{className:"w-2.5 h-2.5 rounded-full bg-[#4681E8] shadow-[0_0_10px_rgba(70,129,232,0.4)]"}),"PH\xd2NG CHAT"]}),(0,a.jsxs)("span",{className:"text-[10px] bg-white px-3 py-1.5 rounded-full text-[#4681E8] font-mono border border-[#4681E8]/30 shadow-inner tracking-widest flex items-center gap-1.5",children:[(0,a.jsx)("svg",{className:"w-3 h-3",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 10l4.553-2.276A1 1 0 0121 8.618v6.764a1 1 0 01-1.447.894L15 14M5 18h8a2 2 0 002-2V8a2 2 0 00-2-2H5a2 2 0 00-2 2v8a2 2 0 002 2z"})}),L.length," BLV"]})]}),(0,a.jsx)("div",{className:"flex-1 bg-[#FFFFFF]/40 min-h-0 chat-container-wrapper",children:(0,a.jsx)(N,{anchors:L,selectedAnchor:M})})]})})]})]})}let p={25:"KIỂM SO\xc1T B\xd3NG",24:"CHUYỀN CH\xcdNH X\xc1C",23:"TỔNG SỐ ĐƯỜNG CHUYỀN",22:"TẤN C\xd4NG",21:"T.C\xd4NG NGUY HIỂM",2:"S\xdaT TR\xdaNG Đ\xcdCH",37:"PHẠT G\xd3C",28:"N\xc9M BI\xcaN",8:"VIỆT VỊ",3:"THẺ V\xc0NG",4:"THẺ ĐỎ",5:"S\xdaT PENALTY",29:"PHẠM LỖI",26:"Đ\xc1NH ĐẦU",27:"CỨU THUA",1:"B\xc0N THẮNG",7:"PHẢN LƯỚI"},u=[25,21,22,24,2,23,4,3,37,28,8,5,29],g="https://cdn.sportdb.live/upload/team/";function b({matchDetails:e}){let[t,s]=(0,l.useState)("full"),r=e?.stats,n=e?.lineup,i=n?.match?.home_team,o=n?.match?.away_team,c=null;Array.isArray(r)&&r.length>0?c=r[0]:r?.results?.[0]?c=r.results[0]:r?.stats_full_time&&(c=r);let d={full:c?.stats_full_time||[],h1:c?.stats_haft_time||c?.stats_half_time||[],h2:c?.stats_haft_time_2nd_half||[]}[t]||[];if(!c||0===d.length)return(0,a.jsx)(j,{text:"Thống k\xea sẽ được cập nhật khi trận đấu bắt đầu"});let x=[...d].sort((e,t)=>{let s=u.indexOf(e.type),a=u.indexOf(t.type);return(-1===s?999:s)-(-1===a?999:a)});return(0,a.jsxs)("div",{className:"flex flex-col",children:[(i||o)&&(0,a.jsxs)("div",{className:"flex items-center justify-between px-4 py-3 border-b border-slate-100",children:[(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5 w-20",children:[i?.logo&&(0,a.jsx)("img",{src:g+i.logo,alt:i?.name||"Home team",className:"w-8 h-8 object-contain",onError:e=>e.target.style.display="none",loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-slate-600 text-[10px] font-medium text-center leading-tight",children:i?.name||""})]}),(0,a.jsx)("div",{className:"flex gap-1",children:[{k:"h1",l:"Hiệp 1"},{k:"h2",l:"Hiệp 2"},{k:"full",l:"Cả trận"}].map(({k:e,l})=>(0,a.jsx)("button",{onClick:()=>s(e),className:`px-2.5 py-1 text-[10px] font-bold rounded transition-all ${t===e?"bg-[#E11D48] text-white":"text-slate-400 hover:text-slate-600 bg-slate-100"}`,children:l},e))}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5 w-20",children:[o?.logo&&(0,a.jsx)("img",{src:g+o.logo,alt:o?.name||"Away team",className:"w-8 h-8 object-contain",onError:e=>e.target.style.display="none",loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-slate-600 text-[10px] font-medium text-center leading-tight",children:o?.name||""})]})]}),(0,a.jsx)("div",{className:"px-4 py-3 space-y-3",children:x.map(e=>{let t=p[e.type]||`Stat ${e.type}`,s=e.home,l=e.away,r=24===e.type||25===e.type,n=s+l,i=0===n?50:s/n*100,o=s>l,c=l>s;return(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"flex justify-between items-center mb-1.5",children:[(0,a.jsxs)("span",{className:`text-xs font-bold w-10 tabular-nums ${o?"text-slate-800":"text-slate-400"}`,children:[s,r?"%":""]}),(0,a.jsx)("span",{className:"text-slate-400 text-[10px] font-semibold tracking-wide uppercase",children:t}),(0,a.jsxs)("span",{className:`text-xs font-bold w-10 text-right tabular-nums ${c?"text-slate-800":"text-slate-400"}`,children:[l,r?"%":""]})]}),(0,a.jsxs)("div",{className:"flex gap-0.5 h-[5px]",children:[(0,a.jsx)("div",{className:"flex-1 rounded-l-full bg-white/[0.06] overflow-hidden flex justify-end",children:(0,a.jsx)("div",{className:`rounded-l-full transition-all duration-500 ${o?"bg-gradient-to-r from-[#E11D48]/60 to-[#E11D48]":"bg-gradient-to-r from-white/10 to-white/20"}`,style:{width:`${i}%`}})}),(0,a.jsx)("div",{className:"flex-1 rounded-r-full bg-white/[0.06] overflow-hidden",children:(0,a.jsx)("div",{className:`rounded-r-full transition-all duration-500 ${c?"bg-gradient-to-l from-[#E11D48]/60 to-[#E11D48]":"bg-gradient-to-l from-white/10 to-white/20"}`,style:{width:`${100-i}%`}})})]})]},e.type)})})]})}
357function f({matchDetails:e}){let[t,s]=(0,l.useState)("pitch"),r=e?.lineup,n=r?.lineup||r,i=n?.home||[],o=n?.away||[],c=r?.home_formation||"",d=r?.away_formation||"",x=r?.match?.home_team,h=r?.match?.away_team;if(0===i.length&&0===o.length)return(0,a.jsx)(j,{text:"Đội h\xecnh sẽ được c\xf4ng bố trước trận đấu 30 ph\xfat"});let m=e=>e.filter(e=>1===e.first),p=e=>e.filter(e=>1!==e.first),u=m(i),g=m(o),b=p(i),w=p(o);return(0,a.jsxs)("div",{className:"flex flex-col",children:[(0,a.jsxs)("div",{className:"flex items-center justify-center gap-1 px-3 py-2 border-b border-slate-100",children:[(0,a.jsx)("button",{onClick:()=>s("pitch"),className:`px-3 py-1.5 text-[10px] font-bold rounded transition-all ${"pitch"===t?"bg-[#E11D48] text-white":"text-slate-400 bg-slate-100"}`,children:"Đội h\xecnh xuất ph\xe1t"}),(0,a.jsx)("button",{onClick:()=>s("list"),className:`px-3 py-1.5 text-[10px] font-bold rounded transition-all ${"list"===t?"bg-[#E11D48] text-white":"text-slate-400 bg-slate-100"}`,children:"Đội h\xecnh dá»± bị"})]}),"pitch"===t?(0,a.jsx)("div",{className:"relative w-full",style:{aspectRatio:"68/105"},children:(0,a.jsxs)("div",{className:"absolute inset-0 bg-gradient-to-b from-[#1a5c2a] via-[#1e6b31] to-[#1a5c2a] rounded-2xl overflow-hidden",children:[(0,a.jsxs)("div",{className:"absolute inset-[3%] border border-white/20 rounded-lg",children:[(0,a.jsx)("div",{className:"absolute left-0 right-0 top-1/2 h-px bg-white/20"}),(0,a.jsx)("div",{className:"absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 w-[22%] aspect-square rounded-full border border-white/20"}),(0,a.jsx)("div",{className:"absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 w-1.5 h-1.5 bg-white/30 rounded-full"}),(0,a.jsx)("div",{className:"absolute top-0 left-1/2 -translate-x-1/2 w-[55%] h-[16%] border-l border-r border-white/20"}),(0,a.jsx)("div",{className:"absolute top-0 left-1/2 -translate-x-1/2 w-[25%] h-[6%] border-l border-r border-white/20"}),(0,a.jsx)("div",{className:"absolute bottom-0 left-1/2 -translate-x-1/2 w-[55%] h-[16%] border-t border-l border-r border-white/20"}),(0,a.jsx)("div",{className:"absolute bottom-0 left-1/2 -translate-x-1/2 w-[25%] h-[6%] border-t border-l border-r border-white/20"})]}),(0,a.jsx)("div",{className:"absolute top-1 left-2 text-[9px] text-[#F8FAFC]/50 font-bold z-10",children:x?.name||""}),(0,a.jsx)("div",{className:"absolute top-1 right-2 text-[9px] text-[#E11D48]/70 font-bold z-10",children:c}),(0,a.jsx)("div",{className:"absolute bottom-1 left-2 text-[9px] text-[#F8FAFC]/50 font-bold z-10",children:h?.name||""}),(0,a.jsx)("div",{className:"absolute bottom-1 right-2 text-[9px] text-[#E11D48]/70 font-bold z-10",children:d}),u.map((e,t)=>{let s=`${e.x||50}%`,l=`${(e.y||10)/2}%`,r="G"===e.position;return(0,a.jsxs)("div",{className:"absolute flex flex-col items-center z-10 -translate-x-1/2 -translate-y-1/2",style:{left:s,top:l},children:[(0,a.jsx)("div",{className:`w-6 h-6 rounded-full flex items-center justify-center text-[9px] font-black ${r?"bg-yellow-400 text-black":"bg-blue-600 text-[#F8FAFC]"} shadow-md border border-white/20`,children:e.shirt_number||""}),(0,a.jsx)("span",{className:"text-[7px] text-[#F8FAFC] font-semibold mt-0.5 text-center max-w-[48px] truncate drop-shadow-[0_1px_2px_rgba(0,0,0,0.8)]",children:(e.name||"").split(" ").slice(-2).join(" ")}),1===e.captain&&(0,a.jsx)("span",{className:"absolute -top-1 -right-1 text-[6px] text-yellow-400",children:"C"})]},`h-${t}`)}),g.map((e,t)=>{let s=`${100-(e.x||50)}%`,l=`${100-(e.y||10)/2}%`,r="G"===e.position;return(0,a.jsxs)("div",{className:"absolute flex flex-col items-center z-10 -translate-x-1/2 -translate-y-1/2",style:{left:s,top:l},children:[(0,a.jsx)("div",{className:`w-6 h-6 rounded-full flex items-center justify-center text-[9px] font-black ${r?"bg-yellow-400 text-black":"bg-orange-500 text-[#F8FAFC]"} shadow-md border border-white/20`,children:e.shirt_number||""}),(0,a.jsx)("span",{className:"text-[7px] text-[#F8FAFC] font-semibold mt-0.5 text-center max-w-[48px] truncate drop-shadow-[0_1px_2px_rgba(0,0,0,0.8)]",children:(e.name||"").split(" ").slice(-2).join(" ")}),1===e.captain&&(0,a.jsx)("span",{className:"absolute -top-1 -right-1 text-[6px] text-yellow-400",children:"C"})]},`a-${t}`)})]})}):(0,a.jsxs)("div",{className:"px-3 py-2 text-xs",children:[(0,a.jsxs)("div",{className:"flex justify-between font-bold text-slate-400 mb-1 uppercase tracking-wider text-[9px] px-1",children:[(0,a.jsx)("span",{children:"Đội chá»
357§ nh\xe0"}),(0,a.jsx)("span",{children:"Đội kh\xe1ch"})]}),Array.from({length:Math.max(b.length,w.length)}).map((e,t)=>{let s=b[t],l=w[t];return(0,a.jsxs)("div",{className:"flex justify-between items-center border-b border-slate-50 py-1.5",children:[(0,a.jsx)("div",{className:"flex items-center gap-1.5 w-1/2 min-w-0",children:s&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"text-[#E11D48] font-bold w-5 text-center shrink-0 text-[10px]",children:s.shirt_number||""}),(0,a.jsx)("span",{className:"text-slate-700 truncate text-[11px]",children:s.name||""})]})}),(0,a.jsx)("div",{className:"flex items-center gap-1.5 w-1/2 justify-end min-w-0",children:l&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"text-slate-700 truncate text-[11px] text-right",children:l.name||""}),(0,a.jsx)("span",{className:"text-[#E11D48] font-bold w-5 text-center shrink-0 text-[10px]",children:l.shirt_number||""})]})})]},t)})]})]})}function j({text:e}){return(0,a.jsx)("div",{className:"flex items-center justify-center py-10 text-slate-400 text-sm text-center",children:e})}function w({m:e}){let t=c(e.status_id,e.sport_id),{hm:s,dm:l}=x(e.time),r=e.source_card_meta?.league_label||e.match_data?.competition_vi||"";return(0,a.jsxs)("a",{href:`/match/${encodeURIComponent(e.post_name||e.id)}`,className:"flex items-center gap-3 rounded-2xl bg-white hover:bg-slate-50 border border-slate-100 hover:border-[#4681E8]/30 p-3 transition-all group",children:[(0,a.jsxs)("div",{className:"shrink-0 w-14 text-center",children:[(0,a.jsx)("div",{className:"text-[#E11D48] text-[11px] font-bold",children:s}),(0,a.jsx)("div",{className:"text-slate-400 text-[9px]",children:l})]}),(0,a.jsx)("div",{className:"w-px h-9 bg-slate-200 shrink-0"}),(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("div",{className:"text-slate-400 text-[9px] truncate mb-1",children:r}),(0,a.jsxs)("div",{className:"flex items-center gap-2 mb-0.5",children:[(0,a.jsx)("img",{src:e.home_logo||d(e.home_name),alt:e.home_name,className:"w-4 h-4 object-contain shrink-0",onError:t=>t.target.src=d(e.home_name),loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-slate-600 text-[12px] font-medium truncate",children:e.home_name})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("img",{src:e.away_logo||d(e.away_name),alt:e.away_name,className:"w-4 h-4 object-contain shrink-0",onError:t=>t.target.src=d(e.away_name),loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-slate-600 text-[12px] font-medium truncate",children:e.away_name})]})]}),t.sc?(0,a.jsxs)("span",{className:"text-slate-800 font-bold text-[14px] tabular-nums shrink-0",children:[e.home_score,"-",e.away_score]}):(0,a.jsx)("span",{className:"text-[10px] font-bold text-[#E11D48] bg-[#E11D48]/10 rounded px-2.5 py-1 group-hover:bg-[#E11D48]/15 transition shrink-0",children:"XEM NGAY"})]})}let v={0:{bg:"bg-white/10",text:"text-[#F8FAFC]/40",nameCls:"text-[#94A3B8]"},1:{bg:"bg-white/10",text:"text-[#F8FAFC]/50",nameCls:"text-[#94A3B8]"},2:{bg:"bg-green-900/50",text:"text-green-400",nameCls:"text-green-400"},3:{bg:"bg-yellow-900/40",text:"text-yellow-400",nameCls:"text-emerald-600 font-bold"},4:{bg:"bg-blue-900/40",text:"text-blue-400",nameCls:"text-blue-400 font-bold"},5:{bg:"bg-red-900/40",text:"text-red-400",nameCls:"text-red-400 font-bold"}};function N({anchors:e,selectedAnchor:t}){let[s,r]=(0,l.useState)([]),[n,i]=(0,l.useState)(!1),o=(0,l.useRef)(null),c=(0,l.useRef)(null),d=t?.roomNum;return(0,l.useEffect)(()=>{if(!d)return;r([]),i(!1);let e=new EventSource(`/api/chat/${d}`);return e.onopen=()=>i(!0),e.onmessage=e=>{try{let t=JSON.parse(e.data);if("connected"===t.type)return void i(!0);if("history"===t.type&&Array.isArray(t.messages))return void r(e=>[...t.messages,...e].slice(-200));t.user&&t.text&&r(e=>[...e,t].slice(-200))}catch{}},e.onerror=()=>i(!1),()=>{e.close(),i(!1)}},[d]),(0,l.useEffect)(()=>{requestAnimationFrame(()=>{let e=c.current;e&&(e.scrollTop=e.scrollHeight)})},[s.length]),(0,a.jsxs)("div",{className:"flex flex-col h-full bg-[#0F0F23]",children:[(0,a.jsxs)("div",{ref:c,className:"flex-1 min-h-0 px-3 py-2 flex flex-col gap-[3px] overflow-y-auto",style:{scrollbarWidth:"thin",scrollbarColor:"#444 transparent"},children:[(0,a.jsx)("div",{className:"text-center text-[10px] text-[#F8FAFC]/30 bg-slate-50/60 py-1.5 rounded-xl mb-1 sticky top-0 z-10 backdrop-blur-sm",children:n?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"inline-block h-1.5 w-1.5 rounded-full bg-green-400 animate-pulse mr-1"}),"Đang kết nối ph\xf2ng chat trá»±c tiếp"]}):d?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"inline-block h-1.5 w-1.5 rounded-full bg-yellow-400 animate-pulse mr-1"}),"Đang kết nối..."]}
357):"Ch\xe0o mừng bạn đến với ph\xf2ng chat"}),0===s.length&&n&&(0,a.jsx)("div",{className:"text-center text-[10px] text-[#F8FAFC]/20 py-4",children:"Chờ tin nhắn mới..."}),s.map((e,t)=>{var s;let l=(s=e.level)>=5?v[5]:v[s]||v[0];return 2===e.type||e.text?.includes("v\xe0o ph\xf2ng tr\xf2 chuyện")?(0,a.jsxs)("div",{className:"flex items-start gap-1.5 text-[11px] leading-relaxed py-[1px] opacity-60",children:[(0,a.jsx)("span",{className:"text-green-500/70 font-medium",children:"Hi"}),(0,a.jsxs)("span",{className:`shrink-0 inline-flex items-center px-1 py-[0.5px] rounded text-[8px] font-bold ${l.bg} ${l.text}`,children:["Lv",e.level]}),(0,a.jsxs)("span",{className:`font-bold ${l.nameCls}`,children:[e.user,":"]}),(0,a.jsx)("span",{className:"text-[#F8FAFC]/40",children:e.text})]},`${e.ts}-${t}`):(0,a.jsxs)("div",{className:"flex items-start gap-1.5 text-[11px] leading-relaxed py-[1px]",children:[(0,a.jsxs)("span",{className:`shrink-0 inline-flex items-center px-1 py-[0.5px] rounded text-[8px] font-bold ${l.bg} ${l.text}`,children:["Lv.",e.level]}),(0,a.jsxs)("span",{className:`font-bold shrink-0 ${l.nameCls}`,children:[e.user,":"]}),(0,a.jsx)("span",{className:"text-[#F8FAFC]/80 break-words min-w-0",children:e.text})]},`${e.ts}-${t}`)}),(0,a.jsx)("div",{ref:o})]}),(0,a.jsxs)("div",{className:"shrink-0 px-3 py-2 bg-[#0F0F23] border-t border-white/[0.04] space-y-2",children:[(0,a.jsx)("div",{className:"flex items-center justify-center gap-3 text-[#F8FAFC]/20 text-[10px]",children:(0,a.jsx)("span",{className:"flex items-center gap-1",children:(0,a.jsx)("svg",{className:"w-3 h-3",viewBox:"0 0 24 24",fill:"currentColor",children:(0,a.jsx)("path",{d:"M12 4.5C7 4.5 2.7 7.6 1 12c1.7 4.4 6 7.5 11 7.5s9.3-3.1 11-7.5c-1.7-4.4-6-7.5-11-7.5zm0 12.5c-2.8 0-5-2.2-5-5s2.2-5 5-5 5 2.2 5 5-2.2 5-5 5zm0-8c-1.7 0-3 1.3-3 3s1.3 3 3 3 3-1.3 3-3-1.3-3-3-3z"})})})}),(0,a.jsxs)("div",{className:"flex bg-[#0F0F23] rounded-2xl overflow-hidden border border-white/[0.08]",children:[(0,a.jsx)("input",{type:"text",placeholder:"Đăng nhập để c\xf9ng chat nh\xe9",disabled:!0,className:"flex-1 bg-transparent px-3 py-2 text-[11px] text-[#F8FAFC] outline-none placeholder:text-[#F8FAFC]/30 disabled:opacity-50"}),(0,a.jsx)("button",{disabled:!0,className:"px-4 text-[11px] font-bold bg-[#E11D48] text-black disabled:bg-white/10 disabled:text-[#F8FAFC]/20 transition-colors",children:"Gửi"})]})]})]})}let y={1:{icon:"⚽",label:"B\xe0n thắng",color:"text-green-400"},2:{icon:"\uD83C\uDD7F️",label:"Phạt đền",color:"text-green-400"},3:{icon:"\uD83D\uDFE1",label:"Thẻ v\xe0ng",color:"text-yellow-400"},4:{icon:"\uD83D\uDFE1\uD83D\uDFE1",label:"Thẻ v\xe0ng 2",color:"text-emerald-600"},5:{icon:"\uD83D\uDD34",label:"Thẻ đỏ",color:"text-red-500"},7:{icon:"\uD83D\uDD04",label:"Phản lưới",color:"text-orange-400"},8:{icon:"\uD83C\uDFE5",label:"Chấn thương",color:"text-[#94A3B8]"},9:{icon:"\uD83D\uDD04",label:"Thay người",color:"text-blue-400"},11:{icon:"⏱️",label:"Hiệp 2",color:"text-[#F8FAFC]/40"},15:{icon:"\uD83E\uDD45",label:"Pen trượt",color:"text-red-400"},19:{icon:"⏱️",label:"Kết th\xfac hiệp",color:"text-[#F8FAFC]/30"},21:{icon:"\uD83C\uDFC6",label:"VAR",color:"text-purple-400"}};function _({events:e}){let t=e?.incidents||e?.events||[];return t&&0!==t.length?(0,a.jsx)("div",{className:"flex flex-col",children:t.map((e,t)=>{let s=y[e.type]||{icon:"•",label:`Event ${e.type}`,color:"text-[#F8FAFC]/50"},l=1===e.position,r=2===e.position,n=e.add_time?`+${e.add_time}`:"",i=`${e.time}'${n}`;return l||r||11!==e.type&&19!==e.type?9===e.type?(0,a.jsxs)("div",{className:`flex items-center gap-2 border-b border-slate-50 p-3 text-xs ${l?"":"flex-row-reverse"}`,children:[(0,a.jsx)("span",{className:"text-slate-400 w-10 text-center shrink-0 text-[10px]",children:i}),(0,a.jsxs)("div",{className:`flex-1 flex flex-col gap-0.5 ${l?"items-start":"items-end"}`,children:[(0,a.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,a.jsx)("span",{className:"text-green-400 text-[10px]",children:"▲"}),(0,a.jsx)("span",{className:"text-[#F8FAFC]/80 text-[11px]",children:e.in_player_name||""})]}),(0,a.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,a.jsx)("span",{className:"text-red-400 text-[10px]",children:"▼"}),(0,a.jsx)("span",{className:"text-[#F8FAFC]/40 text-[11px]",children:e.out_player_name||""})]})]})]},t):(0,a.jsxs)("div",{className:`flex items-center gap-2 border-b border-slate-50 p-3 text-xs ${l?"":"flex-row-reverse"}`,children:[(0,a.jsx)("span",{className:"text-slate-400 w-10 text-center shrink-0 text-[10px]",children:i}),(0,a.jsx)("span",{className:`shrink-0 text-sm ${s.color}`,children:s.icon}),(0,a.jsxs)("div",{className:`flex-1 min-w-0 ${l?"text-left":"text-right"}`,children:[(0,a.jsx)("span",{className:"text-slate-700 text-[11px]",children:e.player_name||""}),e.assist1_name&&(0,a.jsxs)("span",{className:"text-slate-400 text-[10px] ml-1",children:["(kiến tạo: ",e.assist1_name,")"]}),1===e.type&&void 0!==e.home_score&&(0,a.jsxs)("span",{className:"text-[#E11D48] font-bold text-[11px] ml-2",children:[e.home_score," - ",e.away_score]})]})]},t):(0,a.jsx)("div",{className:"flex items-center justify-center py-2 border-b border-slate-50 bg-slate-50",children:(0,a.jsxs)("span",{className:"text-slate-400 text-[10px] uppercase tracking-wider",children:[s.icon," ",s.label," — ",i]})},t)})}):(0,a.jsx)(j,{text:"Diễn biến trận đấu sẽ được cập nhật trực tiếp tại đ\xe2y"})}function k({standings:e}
357){return e&&e.teams&&0!==e.teams.length?(0,a.jsxs)("div",{className:"w-full text-[10px]",children:[(0,a.jsxs)("div",{className:"grid grid-cols-[20px_1fr_24px_24px_32px] bg-slate-50 p-2 text-slate-400 uppercase font-bold sticky top-0",children:[(0,a.jsx)("span",{className:"text-center",children:"#"}),(0,a.jsx)("span",{children:"Team"}),(0,a.jsx)("span",{className:"text-center",children:"T"}),(0,a.jsx)("span",{className:"text-center",children:"B"}),(0,a.jsx)("span",{className:"text-center whitespace-nowrap",children:"Đ"})]}),e.teams.slice(0,15).map((e,t)=>{let s=!!e.data,l=s?parseFloat(e.data[0]):e.rank||t+1,r=s?e.data[1]:e.target_name,n=s?e.data[7]:e.points,i=s?e.data[3]:e.won,o=s?e.data[5]:e.loss;return(0,a.jsxs)("div",{className:"grid grid-cols-[20px_1fr_24px_24px_32px] items-center p-2 border-b border-slate-50 hover:bg-slate-50 transition-colors",children:[(0,a.jsx)("span",{className:"text-center text-slate-500",children:l}),(0,a.jsxs)("div",{className:"flex items-center gap-1.5 min-w-0 pr-2",children:[e.team_logo&&(0,a.jsx)("img",{src:e.team_logo,className:"w-3.5 h-3.5 object-contain",alt:r||"Team logo",loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-slate-700 font-medium truncate",children:r})]}),(0,a.jsx)("span",{className:"text-center text-slate-500",children:i}),(0,a.jsx)("span",{className:"text-center text-slate-500",children:o}),(0,a.jsx)("span",{className:"text-center text-[#E11D48] font-bold",children:n})]},r)})]}):(0,a.jsx)(j,{text:"Bảng xếp hạng sẽ được cập nhật"})}function E({odds:e}){let t=Array.isArray(e)?e:[],s=["2","4","3","16"];function l(e){for(let a of s){let s=t.find(t=>t.odds_type===e&&String(t.company_id)===a);if(s?.odds_info?.length)return s}return t.find(t=>t.odds_type===e&&t.odds_info?.length>0)}function r(e,t){let s=e?.odds_info;if(!s?.length)return["-","-","-"];let a="opening"===t?s.length-1:0;if(!s?.length||!s[a])return["-","-","-"];let l=s[a][2];if("string"!=typeof l)return["-","-","-"];let r=l.split(",");return[r[0]||"-",r[1]||"-",r[2]||"-"]}let n=l("asia"),i=l("eu"),o=l("bs"),c=l("cr"),d=r(n,"opening"),x=r(n,"latest"),h=r(i,"opening"),m=r(i,"latest"),p=r(o,"opening"),u=r(o,"latest"),g=r(c,"opening"),b=r(c,"latest"),f=({children:e})=>(0,a.jsx)("th",{className:"px-2 py-2 text-[9px] sm:text-[10px] font-bold uppercase tracking-wider text-slate-500 border-b border-slate-100 text-center",children:e}),j=({children:e,color:t})=>(0,a.jsx)("td",{className:`px-2 py-2.5 text-center text-[11px] sm:text-xs font-bold ${t||"text-slate-600"} border-b border-slate-50`,children:e});return(0,a.jsxs)("div",{className:"overflow-x-auto",children:[(0,a.jsxs)("table",{className:"w-full min-w-[600px]",children:[(0,a.jsxs)("thead",{children:[(0,a.jsxs)("tr",{className:"bg-slate-50",children:[(0,a.jsx)("th",{className:"px-4 py-2 text-left border-b border-slate-100",rowSpan:2,children:(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("div",{className:"w-7 h-7 rounded bg-gradient-to-br from-[#1d4ed8] to-[#3b82f6] flex items-center justify-center text-white text-[9px] font-black shadow-sm",children:"B"}),(0,a.jsx)("span",{className:"text-slate-600 text-[11px] font-bold tracking-wider",children:"SPORT"})]})}),(0,a.jsx)("th",{colSpan:3,className:"px-1 py-1.5 text-center text-[9px] sm:text-[10px] font-bold uppercase tracking-wider text-[#4681E8] border-b border-l border-slate-100",children:"CƯỢC CH\xc2U \xc1"}),(0,a.jsx)("th",{colSpan:3,className:"px-1 py-1.5 text-center text-[9px] sm:text-[10px] font-bold uppercase tracking-wider text-[#4681E8] border-b border-l border-slate-100",children:"CƯỢC CH\xc2U \xc2U"}),(0,a.jsx)("th",{colSpan:3,className:"px-1 py-1.5 text-center text-[9px] sm:text-[10px] font-bold uppercase tracking-wider text-[#4681E8] border-b border-l border-slate-100",children:"T\xc0I XỈU"}),(0,a.jsx)("th",{colSpan:3,className:"px-1 py-1.5 text-center text-[9px] sm:text-[10px] font-bold uppercase tracking-wider text-[#4681E8] border-b border-l border-slate-100",children:"K\xc8O G\xd3C"})]}),(0,a.jsxs)("tr",{className:"bg-slate-50",children:[(0,a.jsx)(f,{children:"CHỦ"}),(0,a.jsx)(f,{children:"CHẤP"}),(0,a.jsx)(f,{children:"KH\xc1CH"}),(0,a.jsx)(f,{children:"CHỦ"}),(0,a.jsx)(f,{children:"H\xd2A"}),(0,a.jsx)(f,{children:"KH\xc1CH"}),(0,a.jsx)(f,{children:"T\xc0I"}),(0,a.jsx)(f,{children:"TỶ LỆ"}),(0,a.jsx)(f,{children:"XỈU"}),(0,a.jsx)(f,{children:"T\xc0I"}),(0,a.jsx)(f,{children:"TỶ LỆ"}),(0,a.jsx)(f,{children:"XỈU"})]})]}),(0,a.jsxs)("tbody",{children:[(0,a.jsxs)("tr",{className:"hover:bg-slate-50 transition-colors",children:[(0,a.jsx)("td",{className:"px-4 py-2.5 text-[11px] sm:text-xs text-slate-500 font-medium border-b border-slate-50",children:"Tỷ Lệ Mở Cược"}),(0,a.jsx)(j,{children:d[0]}),(0,a.jsx)(j,{color:"text-red-400",children:d[1]}),(0,a.jsx)(j,{children:d[2]}),(0,a.jsx)(j,{children:h[0]}),(0,a.jsx)(j,{children:h[1]}),(0,a.jsx)(j,{children:h[2]}),(0,a.jsx)(j,{children:p[0]}),(0,a.jsx)(j,{children:p[1]}),(0,a.jsx)(j,{children:p[2]}),(0,a.jsx)(j,{children:g[0]}),(0,a.jsx)(j,{children:g[1]}),(0,a.jsx)(j,{children:g[2]})]}),(0,a.jsxs)("tr",{className:"hover:bg-slate-50 transition-colors",children:[(0,a.jsx)("td",{className:"px-4 py-2.5 text-[11px] sm:text-xs text-slate-500 font-medium border-b border-slate-50",children:"Tỷ Lệ Trước Trận"}),(0,a.jsx)(j,{children:x[0]}),(0,a.jsx)(j,{color:"text-red-400",children:x[1]}),(0,a.jsx)(j,{children:x[2]}),(0,a.jsx)(j,{children:m[0]}),(0,a.jsx)(j,{children:m[1]}),(0,a.jsx)(j,{children:m[2]}),(0,a.jsx)(j,{children:u[0]}),(0,a.jsx)(j,{children:u[1]}),(0,a.jsx)(j,{children:u[2]}),(0,a.jsx)(j,{children:b[0]}),(0,a.jsx)(j,{children:b[1]}),(0,a.jsx)(j,{children:b[2]})]}),(0,a.jsxs)("tr",{className:"hover:bg-slate-50 transition-colors bg-white",children:[(0,a.jsxs)("td",{className:"px-4 py-2.5 text-[11px] sm:text-xs text-slate-700 font-bold flex items-center gap-1.5 border-b border-slate-50",children:["Live ",(0,a.jsx)("span",{className:"w-1.5 h-1.5 rounded-full bg-red-500 animate-pulse"})]}),(0,a.jsx)(j,{color:"text-green-400",children:x[0]}),(0,a.jsx)(j,{color:"text-red-400",children:x[1]}),(0,a.jsx)(j,{color:"text-green-400",children:x[2]}),(0,a.jsx)(j,{color:"text-green-400",children:m[0]}),(0,a.jsx)(j,{color:"text-green-400",children:m[1]}),(0,a.jsx)(j,{color:"text-green-400",children:m[2]}),(0,a.jsx)(j,{color:"text-green-400",children:u[0]}),(0,a.jsx)(j,{children:u[1]}),(0,a.jsx)(j,{color:"text-green-400",children:u[2]}),(0,a.jsx)(j,{color:"text-green-400",children:b[0]}),(0,a.jsx)(j,{children:b[1]}),(0,a.jsx)(j,{color:"text-green-400",children:b[2]})]})]})]}),(0,a.jsx)("p",{className:"text-center text-slate-400 text-[10px] py-2.5 border-t border-slate-100",children:"Tỷ lệ k\xe8o sẽ được cập nhật gần giờ thi đấu"})]})}},33228:(e,t,s)=>{"use strict";s.d(t,{Klivevip17SchedulePage:()=>d});var a=s(68019),l=s(10707),r=s(78637),n=s(6035);function i({html:e}){return e?.trim()?(0,a.jsx)("section",{className:"relative mt-10 mb-6",children:(0,a.jsx)("div",{className:"seo-prose relative",children:(0,a.jsx)("div",{dangerouslySetInnerHTML:{__html:e},className:"text-slate-600 text-[14px] leading-[1.85] px-1 [&_strong]:text-slate-900 [&_a]:text-[#4681E8]"})})}):null}s(14776);let o=`
358<h2>Lịch thi đấu b\xf3ng đ\xe1 - Cập nhật lịch b\xf3ng đ\xe1 h\xf4m nay nhanh v\xe0 ch\xednh x\xe1c</h2>
359
360<p>Để <strong>xem lịch thi đấu b\xf3ng đ\xe1</strong> nhanh, ch\xednh x\xe1c v\xe0 đầy đủ nhất, Klive ch\xednh l\xe0 nơi bạn n\xean chọn. Ch\xfang t\xf4i cập nhật lịch thi đấu cho to\xe0n bộ c\xe1c giải đấu trong nước v\xe0 quốc tế, gi\xfap bạn kh\xf4ng bỏ lỡ bất kỳ trận cầu hấp dẫn n\xe0o.</p>
361
362<img src="/images/seo/schedule-football.png" alt="Lịch thi đấu b\xf3ng đ\xe1 h\xf4m nay tại Klive" loading="lazy" />
363
364<div class="toc-box">
365  <h3>Nội dung ch\xednh</h3>
366  <ol>
367    <li>Lịch thi đấu b\xf3ng đ\xe1 trực tuyến h\xe0ng đầu</li>
368    <li>Lịch b\xf3ng đ\xe1 nhanh v\xe0 ch\xednh x\xe1c</li>
369    <li>Cập nhật lịch Ngoại Hạng Anh v\xe0 Champions League</li>
370    <li>C\xe1ch xem lịch thi đấu hiệu quả nhất</li>
371  </ol>
372</div>
373
374<h2>Lịch thi đấu b\xf3ng đ\xe1 trực tuyến h\xe0ng đầu</h2>
375<p>Trong thời đại số, kh\xf4ng ai c\xf2n xem lịch b\xf3ng đ\xe1 tr\xean TV hay b\xe1o giấy nữa. Tất cả đ\xe3 chuyển sang theo d\xf5i online, v\xe0 Klive ch\xednh l\xe0 nền tảng cập nhật lịch b\xf3ng đ\xe1 được đ\xe1nh gi\xe1 cao nhất.</p>
376
377<p>Khi truy cập Klive, bạn c\xf3 thể xem lịch thi đấu của bất kỳ giải đấu b\xf3ng đ\xe1 n\xe0o tr\xean thế giới một c\xe1ch ho\xe0n to\xe0n miễn ph\xed. Th\xf4ng tin lịch đấu được cập nhật sớm nhất v\xe0 chi tiết đến từng ph\xfat.</p>
378
379<h2>Lịch b\xf3ng đ\xe1 nhanh v\xe0 ch\xednh x\xe1c</h2>
380<p>Klive kh\xf4ng chỉ cung cấp lịch thi đấu c\xe1c giải đấu h\xe0ng đầu m\xe0 c\xf2n cập nhật lịch ph\xe1t s\xf3ng tr\xean c\xe1c k\xeanh truyền h\xecnh Việt Nam như K+, FPT Play, VTV Sports. Gi\xfap bạn biết trận n\xe0o được chiếu trực tiếp tr\xean TV v\xe0 sắp xếp thời gian hợp l\xfd.</p>
381
382<h2>Cập nhật lịch Ngoại Hạng Anh v\xe0 Champions League</h2>
383<p>Ngoại Hạng Anh v\xe0 Champions League l\xe0 hai giải đấu được quan t\xe2m nhất. Tại Klive, bạn lu\xf4n nắm được lịch đấu đầy đủ từ v\xf2ng bảng đến chung kết, k\xe8m theo th\xf4ng tin về đội h\xecnh dá»± kiến, phong độ v\xe0 lịch sá»­ đối đầu để chuẩn bị tốt nhất cho má
383»—i trận cầu.</p>
384
385<p>Kết hợp lịch thi đấu với trang trực tiếp b\xf3ng đ\xe1, bạn sẽ c\xf3 trải nghiệm theo d\xf5i b\xf3ng đ\xe1 ho\xe0n hảo nhất - biết trước, xem ngay, kh\xf4ng bỏ lỡ!</p>
386`;var c=s(69797);function d({initialData:e}){let t=(0,r.usePathname)(),[s,h]=(0,l.useState)(!1),[m,p]=(0,l.useState)(new Set),[u,g]=(0,l.useState)(""),[b,f]=(0,l.useState)(!1),[j,w]=(0,l.useState)(0),v=(0,l.useMemo)(()=>(0,c.p_)(e),[e]),N=v.dateTabs,y=(0,l.useMemo)(()=>{if(!v.selectedDate)return 0;let e=N.findIndex(e=>(e.dataValue||e.date)===v.selectedDate);return e>=0?e:0},[N,v.selectedDate]),[_,k]=(0,l.useState)(y),[E,C]=(0,l.useState)(v.leagues||[]),S=(0,l.useMemo)(()=>{if(!u)return E;let e=u.toLowerCase();return E.filter(t=>t.league_name.toLowerCase().includes(e)||t.matches.some(t=>t.home_team.toLowerCase().includes(e)||t.away_team.toLowerCase().includes(e)))},[E,u]),L=Math.max(0,N.length-7),$=N.slice(j,j+7),F=j>0,T=j<L,A=S.reduce((e,t)=>e+t.matches.length,0);return((0,l.useEffect)(()=>{if(!v.selectedDate||!N.length)return;let e=N.findIndex(e=>(e.dataValue||e.date)===v.selectedDate);e>=0&&k(e)},[N,v.selectedDate]),(0,l.useEffect)(()=>{_<j?w(Math.max(0,_)):_>=j+7&&w(Math.min(L,_-7+1))},[_,L,j]),e)?(0,a.jsxs)("div",{className:"max-w-[1440px] mx-auto px-4 py-8",children:[(0,a.jsx)(n.j,{eyebrow:"Lịch thi đấu",title:"LỊCH THI ĐẤU",rightSlot:(0,a.jsxs)("div",{className:"text-[12px] text-slate-500 font-bold uppercase tracking-wider",children:[(0,a.jsx)("span",{className:"text-[#E11D48] font-black",children:S.reduce((e,t)=>e+t.matches.length,0)})," trận đấu"]})}),(0,a.jsxs)("div",{className:"flex items-center mb-4 rounded-xl overflow-hidden border border-slate-200 bg-white shadow-sm",children:[(0,a.jsx)("button",{type:"button",disabled:!F,onClick:()=>w(e=>Math.max(0,e-1)),className:`flex items-center justify-center w-8 h-[52px] bg-slate-100 border-r border-slate-200 text-slate-600 hover:text-slate-800 hover:bg-slate-200 transition-all shrink-0 ${!F?"opacity-30":"cursor-pointer"}`,children:(0,a.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2.5,d:"M15 19l-7-7 7-7"})})}),(0,a.jsx)("div",{className:"flex flex-1",children:$.map((e,s)=>{let l=j+s;return(0,a.jsxs)("button",{type:"button",onClick:()=>(e=>{let s=N[e];if(!s||e===_)return;let a=s.dataValue||s.date;a&&(k(e),p(new Set),h(!0),window.history.replaceState(null,"",`${t}?date=${encodeURIComponent(a)}`),fetch(`/api/socolive/fixtures?date=${encodeURIComponent(a)}`,{cache:"no-store"}).then(e=>e.ok?e.json():null).then(e=>{e&&C((0,c.p_)(e).leagues||[])}).finally(()=>h(!1)))})(l),className:`flex-1 flex flex-col items-center justify-center h-[52px] border-b-[3px] transition-all duration-300 ${_===l?"border-[#4681E8] text-[#4681E8] bg-[#4681E8]/5":"border-transparent text-[#64748B] hover:text-[#94A3B8] hover:bg-slate-100"}`,children:[(0,a.jsx)("span",{className:`text-[11px] font-bold uppercase tracking-widest ${_===l?"text-[#4681E8]":""}`,children:e.label}),(0,a.jsx)("span",{className:`text-[12px] font-mono mt-0.5 ${_===l?"text-slate-800 font-black":""}`,children:e.date})]},`tab-${l}`)})}),(0,a.jsx)("button",{type:"button",disabled:!T,onClick:()=>w(e=>Math.min(L,e+1)),className:`flex items-center justify-center w-8 h-[52px] bg-slate-100 border-l border-slate-200 text-slate-600 hover:text-slate-800 hover:bg-slate-200 transition-all shrink-0 ${!T?"opacity-30":"cursor-pointer"}`,children:(0,a.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2.5,d:"M9 5l7 7-7 7"})})})]}),(0,a.jsxs)("div",{className:"relative mb-4",children:[(0,a.jsxs)("button",{onClick:()=>f(!b),className:"flex items-center gap-3 bg-white hover:bg-slate-50 px-4 py-2.5 rounded-xl border border-slate-200 shadow-sm transition-all text-sm group",children:[(0,a.jsx)("svg",{className:"w-5 h-5 text-[#E11D48] transition-colors group-hover:text-[#F43F5E]",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 6h16M4 12h16M4 18h16"})}),(0,a.jsx)("span",{className:"text-slate-700 font-bold text-[13px] uppercase tracking-wide",children:"Danh s\xe1ch giải đấu"}),(0,a.jsx)("svg",{className:`w-4 h-4 text-slate-500 transition-transform duration-300 ${b?"rotate-180":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),b&&(0,a.jsxs)("div",{className:"absolute top-full left-0 mt-2 w-[360px] bg-white border border-slate-200 rounded-2xl shadow-[0_24px_80px_rgba(0,0,0,0.12)] z-50 max-h-[320px] overflow-hidden flex flex-col",children:[(0,a.jsx)("div",{className:"p-2 border-b border-slate-100",children:(0,a.jsx)("input",{type:"text",placeholder:"T\xecm giải đấu...",value:u,onChange:e=>g(e.target.value),className:"w-full bg-slate-50 border border-transparent roun
386ded-xl px-4 py-2.5 text-sm text-slate-800 placeholder-slate-400 outline-none focus:border-[#4681E8]/50 transition-colors"})}),(0,a.jsx)("div",{className:"overflow-y-auto flex-1 py-2",children:E.map((e,t)=>(0,a.jsxs)("button",{type:"button",onClick:()=>{g(e.league_name),f(!1)},className:"w-full flex items-center gap-3 px-4 py-2.5 hover:bg-slate-50 text-left text-[13px] transition-colors",children:[e.league_icon?(0,a.jsx)("img",{src:e.league_icon,alt:e.league_name||"League",className:"w-5 h-5 object-contain shrink-0",loading:"lazy",decoding:"async"}):(0,a.jsx)("div",{className:"w-5 h-5 rounded-md bg-slate-200 shrink-0"}),(0,a.jsx)("span",{className:"text-slate-600 truncate flex-1 font-medium",children:e.league_name}),(0,a.jsx)("span",{className:"text-[11px] text-[#E11D48] font-bold shrink-0 px-2 py-0.5 bg-[#E11D48]/10 rounded-md border border-[#E11D48]/20",children:e.matches.length})]},t))})]})]}),(0,a.jsxs)("div",{className:"grid grid-cols-[1fr_60px_55px_100px_100px_90px] bg-slate-50 border border-slate-200 rounded-t-xl px-4 py-3 text-[11px] text-slate-500 font-black uppercase tracking-widest shadow-inner",children:[(0,a.jsx)("span",{children:"Trận đấu"}),(0,a.jsx)("span",{className:"text-center",children:"Tỷ số"}),(0,a.jsx)("span",{className:"text-center",children:"Hiệp 1"}),(0,a.jsx)("span",{className:"text-center",children:"Cược chấp"}),(0,a.jsx)("span",{className:"text-center",children:"T\xe0i/Xỉu"}),(0,a.jsx)("span",{className:"text-center",children:"1 X 2"})]}),(0,a.jsxs)("div",{className:"border border-slate-200 border-t-0 rounded-b-xl overflow-hidden relative shadow-[0_8px_30px_rgba(0,0,0,0.06)]",children:[s&&(0,a.jsx)("div",{className:"absolute inset-0 z-10 bg-white/80 backdrop-blur-[2px]",children:(0,a.jsx)("div",{className:"space-y-0",children:[...Array(6)].map((e,t)=>(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 px-4 py-3.5 bg-slate-100 border-b border-slate-200",children:[(0,a.jsx)("div",{className:"w-4 h-4 rounded bg-slate-300 animate-pulse"}),(0,a.jsx)("div",{className:"h-3.5 rounded bg-slate-200 animate-pulse",style:{width:`${120+30*t}px`}})]}),[void 0,void 0].map((e,t)=>(0,a.jsxs)("div",{className:"grid grid-cols-[1fr_60px_55px_100px_100px_90px] items-center px-4 py-3 border-b border-slate-100",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)("div",{className:"w-10 h-3.5 rounded bg-slate-200 animate-pulse"}),(0,a.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,a.jsx)("div",{className:"h-3 w-24 rounded bg-slate-100 animate-pulse"}),(0,a.jsx)("div",{className:"h-3 w-20 rounded bg-slate-100 animate-pulse"})]})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5",children:[(0,a.jsx)("div",{className:"h-3 w-5 rounded bg-slate-100 animate-pulse"}),(0,a.jsx)("div",{className:"h-3 w-5 rounded bg-slate-100 animate-pulse"})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5",children:[(0,a.jsx)("div",{className:"h-3 w-5 rounded bg-slate-100 animate-pulse"}),(0,a.jsx)("div",{className:"h-3 w-5 rounded bg-slate-100 animate-pulse"})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5",children:[(0,a.jsx)("div",{className:"h-3 w-14 rounded bg-slate-100 animate-pulse"}),(0,a.jsx)("div",{className:"h-3 w-10 rounded bg-slate-100 animate-pulse"})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5",children:[(0,a.jsx)("div",{className:"h-3 w-14 rounded bg-slate-100 animate-pulse"}),(0,a.jsx)("div",{className:"h-3 w-10 rounded bg-slate-100 animate-pulse"})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5",children:[(0,a.jsx)("div",{className:"h-3 w-10 rounded bg-slate-100 animate-pulse"}),(0,a.jsx)("div",{className:"h-3 w-10 rounded bg-slate-100 animate-pulse"}),(0,a.jsx)("div",{className:"h-3 w-10 rounded bg-slate-100 animate-pulse"})]})]},t))]},t))})}),0!==S.length||s?S.map((e,t)=>(0,a.jsxs)("div",{id:`league-${t}`,children:[(0,a.jsxs)("button",{onClick:()=>{p(e=>{let s=new Set(e);return s.has(t)?s.delete(t):s.add(t),s})},className:"w-full flex items-center gap-3 px-4 py-3 bg-slate-50 hover:bg-slate-100 border-b border-slate-100 transition-colors text-left group",children:[(0,a.jsx)("svg",{className:`w-4 h-4 text-[#E11D48] transition-transform duration-300 shrink-0 ${m.has(t)?"-rotate-90":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2.5,d:"M19 9l-7 7-7-7"})}),e.league_icon&&(0,a.jsx)("div",{className:"w-6 h-6 rounded-full bg-slate-100 p-0.5 border border-slate-200 flex items-center justify-center shadow-sm",children:(0,a.jsx)("img",{src:e.league_icon,alt:e.league_name||"League",className:"w-4 h-4 object-contain shrink-0",loading:"lazy",decoding:"async"})}),(0,a.jsx)("span",{className:"text-[13px] font-bold text-slate-700 flex-1 truncate uppercase tracking-widest",children:e.league_name}),(0,a.jsxs)("span",{className:"text-[11px] text-[#E11D48] font-bold shrink-0 ml-1 px-2 py-0.5 bg-[#E11D48]/10 rounded border border-[#
386E11D48]/20 group-hover:bg-[#E11D48]/20 transition-colors",children:["BXH ",(0,a.jsx)("svg",{className:"inline w-3 h-3 ml-0.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 6h16M4 10h16M4 14h16M4 18h16"})})]})]}),!m.has(t)&&e.matches.map((e,t)=>(0,a.jsxs)("div",{className:"grid grid-cols-[1fr_60px_55px_100px_100px_90px] items-center px-4 py-3 bg-transparent hover:bg-slate-50 border-b border-slate-100 last:border-0 transition-colors group cursor-default",children:[(0,a.jsxs)("div",{className:"flex items-center gap-4 min-w-0",children:[(0,a.jsx)("span",{className:"text-[#E11D48] font-mono text-[13px] font-black min-w-[42px] shrink-0 drop-shadow-[0_0_4px_rgba(225,29,72,0.4)]",children:e.time}),(0,a.jsxs)("div",{className:"flex flex-col gap-1 min-w-0 flex-1",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[e.home_logo&&(0,a.jsx)("img",{src:e.home_logo,alt:e.home_team||"Home team",className:"w-4 h-4 object-contain shrink-0 filter drop-shadow-[0_2px_2px_rgba(0,0,0,0.8)]",loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-[13px] text-slate-700 font-medium truncate group-hover:text-slate-900 transition-colors",children:e.home_team})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[e.away_logo&&(0,a.jsx)("img",{src:e.away_logo,alt:e.away_team||"Away team",className:"w-4 h-4 object-contain shrink-0",loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-[13px] text-slate-700 font-medium truncate group-hover:text-slate-900 transition-colors",children:e.away_team})]})]})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center",children:[(0,a.jsx)("span",{className:"text-[12px] text-[var(--accent-cyan)] font-mono font-bold",children:"-"!==e.score?e.score:"-"}),(0,a.jsx)("span",{className:"text-[12px] text-[#64748B]",children:"-"})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center",children:[(0,a.jsx)("span",{className:"text-[12px] text-[#64748B]",children:"-"}),(0,a.jsx)("span",{className:"text-[12px] text-[#64748B]",children:"-"})]}),(0,a.jsx)(x,{values:e.handicap,hasLine:!0}),(0,a.jsx)(x,{values:e.over_under,hasLine:!0}),(0,a.jsx)("div",{className:"flex flex-col items-center gap-0",children:e.one_x_two?.length>0?e.one_x_two.map((e,t)=>(0,a.jsx)("span",{className:"text-[11px] text-slate-500 leading-[18px]",children:e||"-"},t)):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"text-[11px] text-[#64748B] leading-[18px]",children:"-"}),(0,a.jsx)("span",{className:"text-[11px] text-[#64748B] leading-[18px]",children:"-"}),(0,a.jsx)("span",{className:"text-[11px] text-[#64748B] leading-[18px]",children:"-"})]})})]},t))]},t)):(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center py-20 gap-3 bg-slate-50",children:[(0,a.jsx)("svg",{className:"w-12 h-12 text-slate-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",strokeWidth:1.5,children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6.75 3v2.25M17.25 3v2.25M3 18.75V7.5a2.25 2.25 0 012.25-2.25h13.5A2.25 2.25 0 0121 7.5v11.25m-18 0A2.25 2.25 0 005.25 21h13.5A2.25 2.25 0 0021 18.75m-18 0v-7.5A2.25 2.25 0 015.25 9h13.5A2.25 2.25 0 0121 11.25v7.5"})}),(0,a.jsx)("span",{className:"text-slate-500 font-medium tracking-wide",children:"Kh\xf4ng c\xf3 trận đấu n\xe0o cho ng\xe0y n\xe0y"}),(0,a.jsx)("span",{className:"text-slate-400 text-[12px]",children:"H\xe3y thử chọn một ng\xe0y kh\xe1c"})]})]}),(0,a.jsxs)("div",{className:"mt-6 text-center text-[11px] text-[#64748B] uppercase tracking-widest font-bold drop-shadow-sm",children:["Tổng cộng ",A," trận đấu trong ",S.length," giải"]}),(0,a.jsx)(i,{html:o})]}):(0,a.jsxs)("div",{className:"max-w-[1440px] mx-auto px-4 py-8",children:[(0,a.jsx)(n.j,{eyebrow:"Lịch thi đấu",title:"LỊCH THI ĐẤU"}),(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center py-16 gap-4",children:[(0,a.jsx)("div",{className:"w-12 h-12 rounded-full border-2 border-[#E11D48]/30 border-t-[#E11D48] animate-spin"}),(0,a.jsx)("span",{className:"text-slate-500 text-sm font-medium tracking-wide",children:"Đang tải lịch thi đấu..."})]})]})}function x({values:e,hasLine:t}){return e&&0!==e.length?t&&e.length>=3?(0,a.jsxs)("div",{className:"flex flex-col items-center gap-0",children:[(0,a.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,a.jsx)("span",{className:"text-[11px] text-[#E11D48] leading-[18px] font-bold",children:e[0]}),(0,a.jsx)("span",{className:"text-[11px] text-slate-500 leading-[18px]",children:e[1]})]}),(0,a.jsx)("span",{className:"text-[11px] text-slate-500 leading-[18px]",children:e[2]})]}):(0,a.jsx)("div",{className:"flex flex-col items-center gap-0",children:e.map((e,t)=>(0,a.jsx)("span",{className:"text-[11px] text-slate-500 leading-[18px]",children:e||"-"},t))}):(0,a.jsxs)("div",{className:"flex flex-col items-center",children:[(0,a.jsx)("span",{className:"text-[11px] text-[#64748B] leading-[18px]",children:"-"}),(0,a.jsx)("span",{className:"text-[11px] text-[#64748B] leading-[18px]",children:"-"})]})}},33557:(e,t,s)=>{"use strict";s.d(t,{Klivevip16SchedulePage:()=>d});var a=s(68019),l=s(10707),r=s(78637),n=s(81443);function i({html:e}){return e?.trim()?(0,a.jsx)("section",{className:"relative mt-10 mb-6",children:(0,a.jsx)("div",{className:"seo-prose relative",children:(0,a.jsx)("div",{dangerouslySetInnerHTML:{__html:e},className:"text-slate-600 text-[14px] leading-[1.85] px-1 [&_strong]:text-slate-900 [&_a]:text-[#4681E8]"})})}):null}s(31379);let o=`
387<h2>Lịch thi đấu b\xf3ng đ\xe1 - Cập nhật lịch b\xf3ng đ\xe1 h\xf4m nay nhanh v\xe0 ch\xednh x\xe1c</h2>
388
389<p>Để <strong>xem lịch thi đấu b\xf3ng đ\xe1</strong> nhanh, ch\xednh x\xe1c v\xe0 đầy đủ nhất, Klive ch\xednh l\xe0 nơi bạn n\xean chọn. Ch\xfang t\xf4i cập nhật lịch thi đấu cho to\xe0n bộ c\xe1c giải đấu trong nước v\xe0 quốc tế, gi\xfap bạn kh\xf4ng bỏ lỡ bất kỳ trận cầu hấp dẫn n\xe0o.</p>
390
391<img src="/images/seo/schedule-football.png" alt="Lịch thi đấu b\xf3ng đ\xe1 h\xf4m nay tại Klive" loading="lazy" />
392
393<div class="toc-box">
394  <h3>Nội dung ch\xednh</h3>
395  <ol>
396    <li>Lịch thi đấu b\xf3ng đ\xe1 trực tuyến h\xe0ng đầu</li>
397    <li>Lịch b\xf3ng đ\xe1 nhanh v\xe0 ch\xednh x\xe1c</li>
398    <li>Cập nhật lịch Ngoại Hạng Anh v\xe0 Champions League</li>
399    <li>C\xe1ch xem lịch thi đấu hiệu quả nhất</li>
400  </ol>
401</div>
402
403<h2>Lịch thi đấu b\xf3ng đ\xe1 trực tuyến h\xe0ng đầu</h2>
404<p>Trong thời đại số, kh\xf4ng ai c\xf2n xem lịch b\xf3ng đ\xe1 tr\xean TV hay b\xe1o giấy nữa. Tất cả đ\xe3 chuyển sang theo d\xf5i online, v\xe0 Klive ch\xednh l\xe0 nền tảng cập nhật lịch b\xf3ng đ\xe1 được đ\xe1nh gi\xe1 cao nhất.</p>
405
406<p>Khi truy cập Klive, bạn c\xf3 thể xem lịch thi đấu của bất kỳ giải đấu b\xf3ng đ\xe1 n\xe0o tr\xean thế giới một c\xe1ch ho\xe0n to\xe0n miễn ph\xed. Th\xf4ng tin lịch đấu được cập nhật sớm nhất v\xe0 chi tiết đến từng ph\xfat.</p>
407
408<h2>Lịch b\xf3ng đ\xe1 nhanh v\xe0 ch\xednh x\xe1c</h2>
409<p>Klive kh\xf4ng chỉ cung cấp lịch thi đấu c\xe1c giải đấu h\xe0ng đầu m\xe0 c\xf2n cập nhật lịch ph\xe1t s\xf3ng tr\xean c\xe1c k\xeanh truyền h\xecnh Việt Nam như K+, FPT Play, VTV Sports. Gi\xfap bạn biết trận n\xe0o được chiếu trực tiếp tr\xean TV v\xe0 sắp xếp thời gian hợp l\xfd.</p>
410
411<h2>Cập nhật lịch Ngoại Hạng Anh v\xe0 Champions League</h2>
412<p>Ngoại Hạng Anh v\xe0 Champions League l\xe0 hai giải đấu được quan t\xe2m nhất. Tại Klive, bạn lu\xf4n nắm được lịch đấu đầy đủ từ v\xf2ng bảng đến chung kết, k\xe8m theo th\xf4ng tin về đội h\xecnh dá»± kiến, phong độ v\xe0 lịch sá»­ đối đầu để chuẩn bị tốt nhất cho má
412»—i trận cầu.</p>
413
414<p>Kết hợp lịch thi đấu với trang trực tiếp b\xf3ng đ\xe1, bạn sẽ c\xf3 trải nghiệm theo d\xf5i b\xf3ng đ\xe1 ho\xe0n hảo nhất - biết trước, xem ngay, kh\xf4ng bỏ lỡ!</p>
415`;var c=s(38790);function d({initialData:e}){let t=(0,r.usePathname)(),[s,h]=(0,l.useState)(!1),[m,p]=(0,l.useState)(new Set),[u,g]=(0,l.useState)(""),[b,f]=(0,l.useState)(!1),[j,w]=(0,l.useState)(0),v=(0,l.useMemo)(()=>(0,c.p_)(e),[e]),N=v.dateTabs,y=(0,l.useMemo)(()=>{if(!v.selectedDate)return 0;let e=N.findIndex(e=>(e.dataValue||e.date)===v.selectedDate);return e>=0?e:0},[N,v.selectedDate]),[_,k]=(0,l.useState)(y),[E,C]=(0,l.useState)(v.leagues||[]),S=(0,l.useMemo)(()=>{if(!u)return E;let e=u.toLowerCase();return E.filter(t=>t.league_name.toLowerCase().includes(e)||t.matches.some(t=>t.home_team.toLowerCase().includes(e)||t.away_team.toLowerCase().includes(e)))},[E,u]),L=Math.max(0,N.length-7),$=N.slice(j,j+7),F=j>0,T=j<L,A=S.reduce((e,t)=>e+t.matches.length,0);return((0,l.useEffect)(()=>{if(!v.selectedDate||!N.length)return;let e=N.findIndex(e=>(e.dataValue||e.date)===v.selectedDate);e>=0&&k(e)},[N,v.selectedDate]),(0,l.useEffect)(()=>{_<j?w(Math.max(0,_)):_>=j+7&&w(Math.min(L,_-7+1))},[_,L,j]),e)?(0,a.jsxs)("div",{className:"max-w-[1440px] mx-auto px-4 py-8",children:[(0,a.jsx)(n._,{eyebrow:"Lịch thi đấu",title:"LỊCH THI ĐẤU",rightSlot:(0,a.jsxs)("div",{className:"text-[12px] text-slate-500 font-bold uppercase tracking-wider",children:[(0,a.jsx)("span",{className:"text-[#E11D48] font-black",children:S.reduce((e,t)=>e+t.matches.length,0)})," trận đấu"]})}),(0,a.jsxs)("div",{className:"flex items-center mb-4 rounded-xl overflow-hidden border border-slate-200 bg-white shadow-sm",children:[(0,a.jsx)("button",{type:"button",disabled:!F,onClick:()=>w(e=>Math.max(0,e-1)),className:`flex items-center justify-center w-8 h-[52px] bg-slate-100 border-r border-slate-200 text-slate-600 hover:text-slate-800 hover:bg-slate-200 transition-all shrink-0 ${!F?"opacity-30":"cursor-pointer"}`,children:(0,a.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2.5,d:"M15 19l-7-7 7-7"})})}),(0,a.jsx)("div",{className:"flex flex-1",children:$.map((e,s)=>{let l=j+s;return(0,a.jsxs)("button",{type:"button",onClick:()=>(e=>{let s=N[e];if(!s||e===_)return;let a=s.dataValue||s.date;a&&(k(e),p(new Set),h(!0),window.history.replaceState(null,"",`${t}?date=${encodeURIComponent(a)}`),fetch(`/api/socolive/fixtures?date=${encodeURIComponent(a)}`,{cache:"no-store"}).then(e=>e.ok?e.json():null).then(e=>{e&&C((0,c.p_)(e).leagues||[])}).finally(()=>h(!1)))})(l),className:`flex-1 flex flex-col items-center justify-center h-[52px] border-b-[3px] transition-all duration-300 ${_===l?"border-[#4681E8] text-[#4681E8] bg-[#4681E8]/5":"border-transparent text-[#64748B] hover:text-[#94A3B8] hover:bg-slate-100"}`,children:[(0,a.jsx)("span",{className:`text-[11px] font-bold uppercase tracking-widest ${_===l?"text-[#4681E8]":""}`,children:e.label}),(0,a.jsx)("span",{className:`text-[12px] font-mono mt-0.5 ${_===l?"text-slate-800 font-black":""}`,children:e.date})]},`tab-${l}`)})}),(0,a.jsx)("button",{type:"button",disabled:!T,onClick:()=>w(e=>Math.min(L,e+1)),className:`flex items-center justify-center w-8 h-[52px] bg-slate-100 border-l border-slate-200 text-slate-600 hover:text-slate-800 hover:bg-slate-200 transition-all shrink-0 ${!T?"opacity-30":"cursor-pointer"}`,children:(0,a.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2.5,d:"M9 5l7 7-7 7"})})})]}),(0,a.jsxs)("div",{className:"relative mb-4",children:[(0,a.jsxs)("button",{onClick:()=>f(!b),className:"flex items-center gap-3 bg-white hover:bg-slate-50 px-4 py-2.5 rounded-xl border border-slate-200 shadow-sm transition-all text-sm group",children:[(0,a.jsx)("svg",{className:"w-5 h-5 text-[#E11D48] transition-colors group-hover:text-[#F43F5E]",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 6h16M4 12h16M4 18h16"})}),(0,a.jsx)("span",{className:"text-slate-700 font-bold text-[13px] uppercase tracking-wide",children:"Danh s\xe1ch giải đấu"}),(0,a.jsx)("svg",{className:`w-4 h-4 text-slate-500 transition-transform duration-300 ${b?"rotate-180":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),b&&(0,a.jsxs)("div",{className:"absolute top-full left-0 mt-2 w-[360px] bg-white border border-slate-200 rounded-2xl shadow-[0_24px_80px_rgba(0,0,0,0.12)] z-50 max-h-[320px] overflow-hidden flex flex-col",children:[(0,a.jsx)("div",{className:"p-2 border-b border-slate-100",children:(0,a.jsx)("input",{type:"text",placeholder:"T\xecm giải đấu...",value:u,onChange:e=>g(e.target.value),className:"w-full bg-slate-50 border border-transparent roun
415ded-xl px-4 py-2.5 text-sm text-slate-800 placeholder-slate-400 outline-none focus:border-[#4681E8]/50 transition-colors"})}),(0,a.jsx)("div",{className:"overflow-y-auto flex-1 py-2",children:E.map((e,t)=>(0,a.jsxs)("button",{type:"button",onClick:()=>{g(e.league_name),f(!1)},className:"w-full flex items-center gap-3 px-4 py-2.5 hover:bg-slate-50 text-left text-[13px] transition-colors",children:[e.league_icon?(0,a.jsx)("img",{src:e.league_icon,alt:e.league_name||"League",className:"w-5 h-5 object-contain shrink-0",loading:"lazy",decoding:"async"}):(0,a.jsx)("div",{className:"w-5 h-5 rounded-md bg-slate-200 shrink-0"}),(0,a.jsx)("span",{className:"text-slate-600 truncate flex-1 font-medium",children:e.league_name}),(0,a.jsx)("span",{className:"text-[11px] text-[#E11D48] font-bold shrink-0 px-2 py-0.5 bg-[#E11D48]/10 rounded-md border border-[#E11D48]/20",children:e.matches.length})]},t))})]})]}),(0,a.jsxs)("div",{className:"grid grid-cols-[1fr_60px_55px_100px_100px_90px] bg-slate-50 border border-slate-200 rounded-t-xl px-4 py-3 text-[11px] text-slate-500 font-black uppercase tracking-widest shadow-inner",children:[(0,a.jsx)("span",{children:"Trận đấu"}),(0,a.jsx)("span",{className:"text-center",children:"Tỷ số"}),(0,a.jsx)("span",{className:"text-center",children:"Hiệp 1"}),(0,a.jsx)("span",{className:"text-center",children:"Cược chấp"}),(0,a.jsx)("span",{className:"text-center",children:"T\xe0i/Xỉu"}),(0,a.jsx)("span",{className:"text-center",children:"1 X 2"})]}),(0,a.jsxs)("div",{className:"border border-slate-200 border-t-0 rounded-b-xl overflow-hidden relative shadow-[0_8px_30px_rgba(0,0,0,0.06)]",children:[s&&(0,a.jsx)("div",{className:"absolute inset-0 z-10 bg-white/80 backdrop-blur-[2px]",children:(0,a.jsx)("div",{className:"space-y-0",children:[...Array(6)].map((e,t)=>(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 px-4 py-3.5 bg-slate-100 border-b border-slate-200",children:[(0,a.jsx)("div",{className:"w-4 h-4 rounded bg-slate-300 animate-pulse"}),(0,a.jsx)("div",{className:"h-3.5 rounded bg-slate-200 animate-pulse",style:{width:`${120+30*t}px`}})]}),[void 0,void 0].map((e,t)=>(0,a.jsxs)("div",{className:"grid grid-cols-[1fr_60px_55px_100px_100px_90px] items-center px-4 py-3 border-b border-slate-100",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)("div",{className:"w-10 h-3.5 rounded bg-slate-200 animate-pulse"}),(0,a.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,a.jsx)("div",{className:"h-3 w-24 rounded bg-slate-100 animate-pulse"}),(0,a.jsx)("div",{className:"h-3 w-20 rounded bg-slate-100 animate-pulse"})]})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5",children:[(0,a.jsx)("div",{className:"h-3 w-5 rounded bg-slate-100 animate-pulse"}),(0,a.jsx)("div",{className:"h-3 w-5 rounded bg-slate-100 animate-pulse"})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5",children:[(0,a.jsx)("div",{className:"h-3 w-5 rounded bg-slate-100 animate-pulse"}),(0,a.jsx)("div",{className:"h-3 w-5 rounded bg-slate-100 animate-pulse"})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5",children:[(0,a.jsx)("div",{className:"h-3 w-14 rounded bg-slate-100 animate-pulse"}),(0,a.jsx)("div",{className:"h-3 w-10 rounded bg-slate-100 animate-pulse"})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5",children:[(0,a.jsx)("div",{className:"h-3 w-14 rounded bg-slate-100 animate-pulse"}),(0,a.jsx)("div",{className:"h-3 w-10 rounded bg-slate-100 animate-pulse"})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5",children:[(0,a.jsx)("div",{className:"h-3 w-10 rounded bg-slate-100 animate-pulse"}),(0,a.jsx)("div",{className:"h-3 w-10 rounded bg-slate-100 animate-pulse"}),(0,a.jsx)("div",{className:"h-3 w-10 rounded bg-slate-100 animate-pulse"})]})]},t))]},t))})}),0!==S.length||s?S.map((e,t)=>(0,a.jsxs)("div",{id:`league-${t}`,children:[(0,a.jsxs)("button",{onClick:()=>{p(e=>{let s=new Set(e);return s.has(t)?s.delete(t):s.add(t),s})},className:"w-full flex items-center gap-3 px-4 py-3 bg-slate-50 hover:bg-slate-100 border-b border-slate-100 transition-colors text-left group",children:[(0,a.jsx)("svg",{className:`w-4 h-4 text-[#E11D48] transition-transform duration-300 shrink-0 ${m.has(t)?"-rotate-90":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2.5,d:"M19 9l-7 7-7-7"})}),e.league_icon&&(0,a.jsx)("div",{className:"w-6 h-6 rounded-full bg-slate-100 p-0.5 border border-slate-200 flex items-center justify-center shadow-sm",children:(0,a.jsx)("img",{src:e.league_icon,alt:e.league_name||"League",className:"w-4 h-4 object-contain shrink-0",loading:"lazy",decoding:"async"})}),(0,a.jsx)("span",{className:"text-[13px] font-bold text-slate-700 flex-1 truncate uppercase tracking-widest",children:e.league_name}),(0,a.jsxs)("span",{className:"text-[11px] text-[#E11D48] font-bold shrink-0 ml-1 px-2 py-0.5 bg-[#E11D48]/10 rounded border border-[#
415E11D48]/20 group-hover:bg-[#E11D48]/20 transition-colors",children:["BXH ",(0,a.jsx)("svg",{className:"inline w-3 h-3 ml-0.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 6h16M4 10h16M4 14h16M4 18h16"})})]})]}),!m.has(t)&&e.matches.map((e,t)=>(0,a.jsxs)("div",{className:"grid grid-cols-[1fr_60px_55px_100px_100px_90px] items-center px-4 py-3 bg-transparent hover:bg-slate-50 border-b border-slate-100 last:border-0 transition-colors group cursor-default",children:[(0,a.jsxs)("div",{className:"flex items-center gap-4 min-w-0",children:[(0,a.jsx)("span",{className:"text-[#E11D48] font-mono text-[13px] font-black min-w-[42px] shrink-0 drop-shadow-[0_0_4px_rgba(225,29,72,0.4)]",children:e.time}),(0,a.jsxs)("div",{className:"flex flex-col gap-1 min-w-0 flex-1",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[e.home_logo&&(0,a.jsx)("img",{src:e.home_logo,alt:e.home_team||"Home team",className:"w-4 h-4 object-contain shrink-0 filter drop-shadow-[0_2px_2px_rgba(0,0,0,0.8)]",loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-[13px] text-slate-700 font-medium truncate group-hover:text-slate-900 transition-colors",children:e.home_team})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[e.away_logo&&(0,a.jsx)("img",{src:e.away_logo,alt:e.away_team||"Away team",className:"w-4 h-4 object-contain shrink-0",loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-[13px] text-slate-700 font-medium truncate group-hover:text-slate-900 transition-colors",children:e.away_team})]})]})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center",children:[(0,a.jsx)("span",{className:"text-[12px] text-[var(--accent-cyan)] font-mono font-bold",children:"-"!==e.score?e.score:"-"}),(0,a.jsx)("span",{className:"text-[12px] text-[#64748B]",children:"-"})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center",children:[(0,a.jsx)("span",{className:"text-[12px] text-[#64748B]",children:"-"}),(0,a.jsx)("span",{className:"text-[12px] text-[#64748B]",children:"-"})]}),(0,a.jsx)(x,{values:e.handicap,hasLine:!0}),(0,a.jsx)(x,{values:e.over_under,hasLine:!0}),(0,a.jsx)("div",{className:"flex flex-col items-center gap-0",children:e.one_x_two?.length>0?e.one_x_two.map((e,t)=>(0,a.jsx)("span",{className:"text-[11px] text-slate-500 leading-[18px]",children:e||"-"},t)):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"text-[11px] text-[#64748B] leading-[18px]",children:"-"}),(0,a.jsx)("span",{className:"text-[11px] text-[#64748B] leading-[18px]",children:"-"}),(0,a.jsx)("span",{className:"text-[11px] text-[#64748B] leading-[18px]",children:"-"})]})})]},t))]},t)):(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center py-20 gap-3 bg-slate-50",children:[(0,a.jsx)("svg",{className:"w-12 h-12 text-slate-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",strokeWidth:1.5,children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6.75 3v2.25M17.25 3v2.25M3 18.75V7.5a2.25 2.25 0 012.25-2.25h13.5A2.25 2.25 0 0121 7.5v11.25m-18 0A2.25 2.25 0 005.25 21h13.5A2.25 2.25 0 0021 18.75m-18 0v-7.5A2.25 2.25 0 015.25 9h13.5A2.25 2.25 0 0121 11.25v7.5"})}),(0,a.jsx)("span",{className:"text-slate-500 font-medium tracking-wide",children:"Kh\xf4ng c\xf3 trận đấu n\xe0o cho ng\xe0y n\xe0y"}),(0,a.jsx)("span",{className:"text-slate-400 text-[12px]",children:"H\xe3y thử chọn một ng\xe0y kh\xe1c"})]})]}),(0,a.jsxs)("div",{className:"mt-6 text-center text-[11px] text-[#64748B] uppercase tracking-widest font-bold drop-shadow-sm",children:["Tổng cộng ",A," trận đấu trong ",S.length," giải"]}),(0,a.jsx)(i,{html:o})]}):(0,a.jsxs)("div",{className:"max-w-[1440px] mx-auto px-4 py-8",children:[(0,a.jsx)(n._,{eyebrow:"Lịch thi đấu",title:"LỊCH THI ĐẤU"}),(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center py-16 gap-4",children:[(0,a.jsx)("div",{className:"w-12 h-12 rounded-full border-2 border-[#E11D48]/30 border-t-[#E11D48] animate-spin"}),(0,a.jsx)("span",{className:"text-slate-500 text-sm font-medium tracking-wide",children:"Đang tải lịch thi đấu..."})]})]})}function x({values:e,hasLine:t}){return e&&0!==e.length?t&&e.length>=3?(0,a.jsxs)("div",{className:"flex flex-col items-center gap-0",children:[(0,a.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,a.jsx)("span",{className:"text-[11px] text-[#E11D48] leading-[18px] font-bold",children:e[0]}),(0,a.jsx)("span",{className:"text-[11px] text-slate-500 leading-[18px]",children:e[1]})]}),(0,a.jsx)("span",{className:"text-[11px] text-slate-500 leading-[18px]",children:e[2]})]}):(0,a.jsx)("div",{className:"flex flex-col items-center gap-0",children:e.map((e,t)=>(0,a.jsx)("span",{className:"text-[11px] text-slate-500 leading-[18px]",children:e||"-"},t))}):(0,a.jsxs)("div",{className:"flex flex-col items-center",children:[(0,a.jsx)("span",{className:"text-[11px] text-[#64748B] leading-[18px]",children:"-"}),(0,a.jsx)("span",{className:"text-[11px] text-[#64748B] leading-[18px]",children:"-"})]})}},33622:()=>{},34003:(e,t,s)=>{"use strict";s.d(t,{G:()=>r});var a=s(68019),l=s(70508);
415function r({eyebrow:e,title:t,titleAddon:s,rightSlot:n,className:i}){return(0,a.jsx)("div",{className:(0,l.cn)("relative mb-5 overflow-hidden border-b border-slate-200",i),children:(0,a.jsxs)("div",{className:"flex items-center justify-between px-1 py-4 min-h-[56px]",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 min-w-0",children:[(0,a.jsx)("span",{className:"h-8 w-1 shrink-0 rounded-sm bg-gradient-to-b from-[#4681E8] to-[#55CAF1] shadow-[0_0_10px_rgba(70,129,232,0.5)]"}),(0,a.jsxs)("div",{className:"min-w-0",children:[e&&(0,a.jsx)("div",{className:"text-[10px] font-bold uppercase tracking-[0.2em] text-[#4681E8]/60 mb-0.5",children:e}),(0,a.jsxs)("div",{className:"flex items-center gap-2.5 flex-wrap",children:[(0,a.jsx)("h1",{className:"text-[18px] sm:text-[22px] font-black uppercase tracking-tight text-slate-800 leading-none",children:t}),s]})]})]}),n&&(0,a.jsx)("div",{className:"hidden sm:flex items-center gap-2 text-right shrink-0 ml-4",children:n})]})})}},34467:(e,t,s)=>{"use strict";s.d(t,{StandingsClient:()=>h});var a=s(68019),l=s(10707),r=s(46914),n=s(22739);function i(e){return"W"===e?"border border-emerald-500/45 bg-emerald-500/25 text-emerald-300 shadow-[0_0_0_1px_rgba(16,185,129,0.08)_inset]":"L"===e?"border border-red-500/45 bg-red-500/25 text-red-300 shadow-[0_0_0_1px_rgba(239,68,68,0.08)_inset]":"D"===e?"border border-amber-400/45 bg-amber-400/22 text-amber-200 shadow-[0_0_0_1px_rgba(251,191,36,0.08)_inset]":"border border-slate-500/40 bg-slate-500/18 text-slate-700"}function o(e,t){return 1===e?{bar:"bg-[linear-gradient(180deg,#facc15,#f97316)]",badge:"border-emerald-600/60 bg-slate-100 text-yellow-700 shadow-[0_0_18px_rgba(250,204,21,0.14)]",row:"from-[#32230d]/70 via-transparent to-transparent"}:e<=4?{bar:"bg-[linear-gradient(180deg,#fb7185,#f97316)]",badge:"border-[#fb7185]/45 bg-slate-100 text-rose-700",row:"from-[#241318]/55 via-transparent to-transparent"}:e<=6?{bar:"bg-[linear-gradient(180deg,#f59e0b,#facc15)]",badge:"border-[#f59e0b]/45 bg-slate-100 text-yellow-700",row:"from-[#24190b]/45 via-transparent to-transparent"}:e<=10?{bar:"bg-[linear-gradient(180deg,#38bdf8,#2563eb)]",badge:"border-sky-400/40 bg-white text-sky-700",row:"from-[#101725]/32 via-transparent to-transparent"}:e>=Math.max(t-2,1)?{bar:"bg-[linear-gradient(180deg,#ef4444,#7f1d1d)]",badge:"border-red-500/40 bg-slate-100 text-red-700",row:"from-[#220f14]/45 via-transparent to-transparent"}:{bar:"bg-[linear-gradient(180deg,#64748b,#334155)]",badge:"border-slate-500/35 bg-white text-slate-700",row:"from-[#12161d]/24 via-transparent to-transparent"}}function c({detail:e}){let[t,s]=(0,l.useState)(!1),n=(0,l.useRef)(null),[o,d]=(0,l.useState)({top:0,left:0}),x=i(e.result),h=(0,l.useCallback)(()=>{if(n.current){let e=n.current.getBoundingClientRect();d({top:e.top+window.scrollY-8,left:e.left+e.width/2+window.scrollX})}s(!0)},[]);return(0,a.jsxs)("div",{ref:n,className:"relative inline-flex",onMouseEnter:h,onMouseLeave:()=>s(!1),children:[(0,a.jsx)("span",{className:`inline-flex h-7 w-7 items-center justify-center rounded-[8px] text-[11px] font-black cursor-pointer transition-transform hover:-translate-y-0.5 ${x}`,children:e.result}),t&&e.match_time&&"u">typeof document&&(0,r.createPortal)((0,a.jsxs)("div",{className:"fixed z-[9999] w-[220px] pointer-events-none",style:{top:`${o.top}px`,left:`${o.left}px`,transform:"translate(-50%, -100%)",position:"absolute"},children:[(0,a.jsxs)("div",{className:"overflow-hidden rounded-xl border border-[#cbd5e1] bg-white shadow-2xl",children:[(0,a.jsx)("div",{className:"bg-slate-100 px-3 py-1.5 text-[10px] text-slate-600 font-mono text-center border-b border-[#cbd5e1]",children:e.match_time}),(0,a.jsxs)("div",{className:"px-3 py-2.5 flex items-center justify-between gap-2",children:[(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5 flex-1 min-w-0",children:[e.home_logo?(0,a.jsx)("img",{src:e.home_logo,alt:e.home_team,className:"w-7 h-7 object-contain",loading:"lazy",decoding:"async"}):(0,a.jsx)("div",{className:"w-7 h-7 rounded-full bg-gray-700 flex items-center justify-center text-[8px] text-slate-600 font-bold",children:"?"}),(0,a.jsx)("span",{className:"text-[9px] text-slate-600 font-bold text-center leading-tight line-clamp-2 max-w-[70px]",children:e.home_team})]}),(0,a.jsx)("div",{className:"text-slate-900 font-black text-sm whitespace-nowrap px-1",children:e.score||"? - ?"}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5 flex-1 min-w-0",children:[e.away_logo?(0,a.jsx)("img",{src:e.away_logo,alt:e.away_team,className:"w-7 h-7 object-contain",loading:"lazy",decoding:"async"}):(0,a.jsx)("div",{className:"w-7 h-7 rounded-full bg-gray-700 flex items-center justify-center text-[8px] text-slate-600 font-bold",children:"?"}),(0,a.jsx)("span",{className:"text-[9px] text-slate-600 font-bold text-center leading-tight line-clamp-2 max-w-[70px]",children:e.away_team})]})]})]}),(0,a.jsx)("div",{className:"absolute left-1/2 -translate-x-1/2 -bottom-1 w-2 h-2 bg-white border-r border-b border-[#cbd5e1] rotate-45"})]}),document.body)]})}function d({result:e}){let t=i(e);return(0,a.jsx)("span",{className:`inline-flex h-7 w-7 items-center justify-center rounded-[8px] text-[11px] font-black ${t}`,children:e})}function x({value:e,totalTeams:t}){let s=Number(e);if(!Number.isFinite(s))return(0,a.jsx)("td",{className:"px-4 py-4 text-center font-mono font-black text-slate-400",children:e});let l=o(s,t);return(0,a.jsxs)("td",{className:"relative px-4 py-4 text-center font-mono",children:[(0,a.jsx)("span",{className:`absolute left-0 top-1/2 h-7 w-1 -translate-y-1/2 roun
415ded-r-full ${l.bar}`}),(0,a.jsx)("span",{className:`inline-flex h-8 w-8 items-center justify-center rounded-[10px] border text-[13px] font-black ${l.badge}`,children:s})]})}function h({initialData:e}){let[t]=(0,l.useState)(!1),[s,r]=(0,l.useState)(!1),[i,p]=(0,l.useState)(""),u=(0,l.useRef)(null);if((0,l.useEffect)(()=>{function e(e){u.current&&!u.current.contains(e.target)&&r(!1)}return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[]),!e)return(0,a.jsx)("div",{className:"text-center py-20 text-slate-600",children:"Đang tải dữ liệu..."});let g=e.available_leagues||[],b=g.filter(e=>e.name.toLowerCase().includes(i.toLowerCase())),f=e.teams&&e.teams.length>0&&Array.isArray(e.teams[0]?.form),j=!f&&e.rankings;return(0,a.jsxs)("div",{className:"mx-auto max-w-[1440px] px-4 py-8",children:[(0,a.jsx)(n.d,{eyebrow:"Bảng xếp hạng",title:"BẢNG XẾP HẠNG",rightSlot:(0,a.jsx)("div",{className:"text-[12px] text-slate-600",children:(0,a.jsx)("span",{className:"text-slate-900/80 font-bold",children:e.league_name})})}),g.length>0&&(0,a.jsxs)("div",{className:"mb-6",ref:u,children:[(0,a.jsxs)("div",{className:"relative inline-flex min-w-[320px] items-center gap-3 rounded-2xl border border-slate-200 bg-white backdrop-blur-md px-5 py-3.5 cursor-pointer shadow-[0_8px_30px_rgba(0,0,0,0.06)] transition-colors hover:border-[#4681E8]/50 hover:shadow-[0_8px_30px_rgba(70,129,232,0.1)]",onClick:()=>r(!s),children:[e.league_icon&&(0,a.jsx)("img",{src:e.league_icon,alt:e.league_name||"League icon",className:"w-6 h-6 object-contain",loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-slate-800 font-bold text-sm flex-1",children:e.league_name||"Chọn giải đấu"}),(0,a.jsx)("svg",{className:`w-4 h-4 text-[#4681E8] transition-transform ${s?"rotate-180":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),s&&(0,a.jsxs)("div",{className:"absolute z-50 mt-2 w-[360px] overflow-hidden rounded-2xl border border-slate-200 bg-white backdrop-blur-xl shadow-[0_24px_80px_rgba(0,0,0,0.15)]",children:[(0,a.jsx)("div",{className:"p-2 border-b border-slate-100",children:(0,a.jsx)("input",{type:"text",placeholder:"T\xecm kiếm giải đấu...",value:i,onChange:e=>p(e.target.value),className:"w-full bg-slate-50 text-slate-800 text-sm px-4 py-2.5 rounded-xl border border-transparent outline-none focus:border-[#4681E8]/50 placeholder-slate-400 transition-colors",autoFocus:!0})}),(0,a.jsxs)("div",{className:"max-h-[340px] overflow-y-auto",children:[b.map(t=>(0,a.jsxs)("a",{href:`/standings?league=${encodeURIComponent(t.id)}`,className:`flex items-center gap-3 px-4 py-3 cursor-pointer transition-colors hover:bg-slate-50 ${t.id===e.league_id?"bg-[#4681E8]/10 border-l-4 border-[#4681E8]":""}`,children:[t.icon?(0,a.jsx)("img",{src:t.icon,alt:t.name||"League",className:"w-5 h-5 object-contain flex-shrink-0",loading:"lazy",decoding:"async"}):(0,a.jsx)("div",{className:"w-5 h-5 rounded bg-gray-700 flex-shrink-0"}),(0,a.jsx)("span",{className:"text-sm text-slate-900 truncate",children:t.name})]},t.id)),0===b.length&&(0,a.jsx)("div",{className:"px-4 py-8 text-center text-gray-500 text-sm",children:"Kh\xf4ng t\xecm thấy giải đấu"})]})]})]}),t&&(0,a.jsxs)("div",{className:"flex items-center justify-center py-12",children:[(0,a.jsx)("div",{className:"animate-spin w-8 h-8 border-2 border-emerald-600 border-t-transparent rounded-full"}),(0,a.jsx)("span",{className:"ml-3 text-slate-600 text-sm",children:"Đang tải bảng xếp hạng từ server..."})]}),!t&&f&&(0,a.jsxs)("div",{className:"overflow-hidden rounded-[24px] border border-slate-200 bg-white shadow-[0_8px_30px_rgba(0,0,0,0.08)]",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between gap-3 border-b border-[#4681E8]/20 bg-gradient-to-r from-[#4681E8] to-[#2563eb] px-6 py-4 text-white shadow-[0_4px_25px_rgba(70,129,232,0.3)]",children:[(0,a.jsx)("div",{className:"text-[13px] font-black uppercase tracking-[0.2em] drop-shadow-sm text-white/80",children:"League"}),(0,a.jsx)("div",{className:"truncate text-sm font-black sm:text-base drop-shadow-md",children:e.league_name})]}),(0,a.jsx)("div",{className:"overflow-x-auto",children:(0,a.jsxs)("table",{className:"w-full text-left border-collapse",children:[(0,a.jsx)("thead",{children:(0,a.jsx)("tr",{className:"bg-slate-50 text-[11px] uppercase tracking-[0.2em] text-slate-500",children:e.header.map((t,s)=>{let l=e.teams.some(e=>e.form&&e.form.length>0);return t.toLowerCase().includes("phong độ")&&!l?null:(0,a.jsx)("th",{colSpan:s===e.header.length-1&&l?5:1,className:`p-4 font-semibold ${1===s?"w-1/3 text-left":"text-center"}`,children:t},s)})})}),(0,a.jsx)("tbody",{className:"text-sm",children:e.teams.map((t,s)=>(o(Number(t.data[0]||s+1),e.teams.length),(0,a.jsxs)("tr",{className:"group border-b border-slate-100 bg-white transition-colors hover:bg-slate-50 cursor-pointer",children:[t.data.map((s,l)=>0===l?(0,a.jsx)(x,{value:s,totalTeams:e.teams.length},l):1===l?(0,a.jsx)("td",{className:"p-4",children:(0,a.jsxs)("div",{className:"flex items-center gap-3 rounded-2xl border border-slate-100 bg-slate-50 px-4 py-2.5 transition-colors group-hover:border-[#4681E8]/30 group-hover:bg-[#4681E8]/5",children:[t.team_logo?(0,a.jsx)("img",{src:t.team_logo,alt:s,className:"h-8 w-8 rounded-full bg-white object-contain p-0.5 filter drop-shadow-[0_2px_4px_rgba(0,0,0,0.1)]",loading:"lazy"}):(0,a.jsx)("div",{className:"flex h-8 w-8 items-center justify-center rounded-full border border-slate-200 bg-white text-[10px] font-bold text-slate-400",children:"?"}),(0,a.jsx)("span",{className:"font-bold text-slate-800 transition-colors group-hover:text-[#4681E8]",children:s})]})},l):(0,a.jsx)("td",{className:"p-4 text-center font-mono text-slate-600",children:s},l)),t.form&&t.form.length>0&&(0,a.jsxs)(a.Fragment,{children:[t.form.map((e,t)=>(0,a.jsx)("td",{className:"p-2 text-center",children:e.match_time?(0,a.jsx)(c,{detail:e}):(0,a.jsx)(d,{result:e.result})},`form-${t}`)),t.form.length<5&&Array.from({length:5-t.form.length}).map((e,t)=>(0,a.jsx)("td",{className:"p-2"},`pad-${t}`))]})]},s)))})]})})]}),!t&&!f&&j&&(0,a.jsx)(m,{rankings:e.rankings}),!t&&!f&&!j&&e.header&&e.teams&&(0,a.jsx)("div",{className:"text-center py-20 text-slate-600",children:"Dữ liệu đang được cập nhật..."}),!t&&(f||j)&&(0,a.jsxs)("div",{className:"mt-6 flex flex-wrap items-center gap-5 px-5 py-4 bg-slate-50 rounded-2xl border border-slate-200",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,a.jsx)("span",{className:"w-2.5 h-2.5 rounded-full bg-emerald-500"}),(0,a.jsx)("span",{className:"text-[11px] text-slate-600 font-bold uppercase tracking-wider",children:"Đội trưởng bảng"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,a.jsx)("span",{className:"w-2.5 h-2.5 rounded-full bg-sky-4
41500"}),(0,a.jsx)("span",{className:"text-[11px] text-slate-600 font-bold uppercase tracking-wider",children:"Champions League"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,a.jsx)("span",{className:"w-2.5 h-2.5 rounded-full bg-amber-500"}),(0,a.jsx)("span",{className:"text-[11px] text-slate-600 font-bold uppercase tracking-wider",children:"Europa League"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,a.jsx)("span",{className:"w-2.5 h-2.5 rounded-full bg-[#f97316]"}),(0,a.jsx)("span",{className:"text-[11px] text-slate-600 font-bold uppercase tracking-wider",children:"Europa Conference"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,a.jsx)("span",{className:"w-2.5 h-2.5 rounded-full bg-[#E11D48]"}),(0,a.jsx)("span",{className:"text-[11px] text-slate-600 font-bold uppercase tracking-wider",children:"Xuống hạng"})]})]})]})}function m({rankings:e}){if(!e||0===e.length)return null;let t=e[0].data,s=e.slice(1);return(0,a.jsx)("div",{className:"overflow-hidden rounded-[22px] border border-[#cbd5e1] bg-[linear-gradient(180deg,#191a20,#111218)] shadow-[0_24px_80px_rgba(0,0,0,0.4)]",children:(0,a.jsx)("div",{className:"overflow-x-auto",children:(0,a.jsxs)("table",{className:"w-full text-left border-collapse",children:[(0,a.jsx)("thead",{children:(0,a.jsx)("tr",{className:"bg-white text-[11px] uppercase tracking-[0.18em] text-slate-600",children:t.map((e,l)=>{let r=l===t.length-1,n=s[0]&&s[0].data.length>t.length?s[0].data.length-t.length+1:1;return(0,a.jsx)("th",{colSpan:r?n:1,className:`p-4 font-semibold ${1===l?"w-1/3 text-left":"text-center"}`,children:e},l)})})}),(0,a.jsx)("tbody",{className:"text-sm",children:s.map((e,t)=>(0,a.jsx)("tr",{className:"group border-b border-[#cbd5e1] transition-colors hover:bg-white",children:e.data.map((t,l)=>0===l?(0,a.jsx)(x,{value:t,totalTeams:s.length},l):1===l?(0,a.jsx)("td",{className:"p-4",children:(0,a.jsxs)("div",{className:"flex items-center gap-3 rounded-2xl border border-white/6 bg-[linear-gradient(180deg,rgba(255,255,255,0.03),rgba(255,255,255,0.01))] px-3 py-2 transition-colors group-hover:border-emerald-600/22",children:[e.team_logo?(0,a.jsx)("img",{src:e.team_logo,alt:t,className:"h-8 w-8 rounded-full bg-white/5 object-contain ring-1 ring-white/8",loading:"lazy"}):(0,a.jsx)("div",{className:"flex h-8 w-8 items-center justify-center rounded-full border border-gray-700 bg-gray-800 text-xs font-bold text-gray-500",children:"?"}),(0,a.jsx)("span",{className:"font-bold text-slate-900 transition-colors group-hover:text-emerald-600",children:t})]})},l):["W","D","L"].includes(t)?(0,a.jsx)("td",{className:"p-2 text-center",children:(0,a.jsx)("span",{className:`inline-flex h-7 w-7 items-center justify-center rounded-[8px] text-[11px] font-black ${i(t)}`,children:t})},l):(0,a.jsx)("td",{className:"p-4 text-center font-mono text-slate-600",children:t},l))},t))})]})})})}},35041:(e,t,s)=>{"use strict";s.d(t,{Klivevip09SchedulePage:()=>d});var a=s(68019),l=s(10707),r=s(78637),n=s(79623);function i({html:e}){return e?.trim()?(0,a.jsx)("section",{className:"relative mt-10 mb-6",children:(0,a.jsx)("div",{className:"seo-prose relative",children:(0,a.jsx)("div",{dangerouslySetInnerHTML:{__html:e},className:"text-slate-600 text-[14px] leading-[1.85] px-1 [&_strong]:text-slate-900 [&_a]:text-[#4681E8]"})})}):null}s(31219);let o=`
416<h2>Lịch thi đấu b\xf3ng đ\xe1 - Cập nhật lịch b\xf3ng đ\xe1 h\xf4m nay nhanh v\xe0 ch\xednh x\xe1c</h2>
417
418<p>Để <strong>xem lịch thi đấu b\xf3ng đ\xe1</strong> nhanh, ch\xednh x\xe1c v\xe0 đầy đủ nhất, Klive ch\xednh l\xe0 nơi bạn n\xean chọn. Ch\xfang t\xf4i cập nhật lịch thi đấu cho to\xe0n bộ c\xe1c giải đấu trong nước v\xe0 quốc tế, gi\xfap bạn kh\xf4ng bỏ lỡ bất kỳ trận cầu hấp dẫn n\xe0o.</p>
419
420<img src="/images/seo/schedule-football.png" alt="Lịch thi đấu b\xf3ng đ\xe1 h\xf4m nay tại Klive" loading="lazy" />
421
422<div class="toc-box">
423  <h3>Nội dung ch\xednh</h3>
424  <ol>
425    <li>Lịch thi đấu b\xf3ng đ\xe1 trực tuyến h\xe0ng đầu</li>
426    <li>Lịch b\xf3ng đ\xe1 nhanh v\xe0 ch\xednh x\xe1c</li>
427    <li>Cập nhật lịch Ngoại Hạng Anh v\xe0 Champions League</li>
428    <li>C\xe1ch xem lịch thi đấu hiệu quả nhất</li>
429  </ol>
430</div>
431
432<h2>Lịch thi đấu b\xf3ng đ\xe1 trực tuyến h\xe0ng đầu</h2>
433<p>Trong thời đại số, kh\xf4ng ai c\xf2n xem lịch b\xf3ng đ\xe1 tr\xean TV hay b\xe1o giấy nữa. Tất cả đ\xe3 chuyển sang theo d\xf5i online, v\xe0 Klive ch\xednh l\xe0 nền tảng cập nhật lịch b\xf3ng đ\xe1 được đ\xe1nh gi\xe1 cao nhất.</p>
434
435<p>Khi truy cập Klive, bạn c\xf3 thể xem lịch thi đấu của bất kỳ giải đấu b\xf3ng đ\xe1 n\xe0o tr\xean thế giới một c\xe1ch ho\xe0n to\xe0n miễn ph\xed. Th\xf4ng tin lịch đấu được cập nhật sớm nhất v\xe0 chi tiết đến từng ph\xfat.</p>
436
437<h2>Lịch b\xf3ng đ\xe1 nhanh v\xe0 ch\xednh x\xe1c</h2>
438<p>Klive kh\xf4ng chỉ cung cấp lịch thi đấu c\xe1c giải đấu h\xe0ng đầu m\xe0 c\xf2n cập nhật lịch ph\xe1t s\xf3ng tr\xean c\xe1c k\xeanh truyền h\xecnh Việt Nam như K+, FPT Play, VTV Sports. Gi\xfap bạn biết trận n\xe0o được chiếu trực tiếp tr\xean TV v\xe0 sắp xếp thời gian hợp l\xfd.</p>
439
440<h2>Cập nhật lịch Ngoại Hạng Anh v\xe0 Champions League</h2>
441<p>Ngoại Hạng Anh v\xe0 Champions League l\xe0 hai giải đấu được quan t\xe2m nhất. Tại Klive, bạn lu\xf4n nắm được lịch đấu đầy đủ từ v\xf2ng bảng đến chung kết, k\xe8m theo th\xf4ng tin về đội h\xecnh dá»± kiến, phong độ v\xe0 lịch sá»­ đối đầu để chuẩn bị tốt nhất cho má
441»—i trận cầu.</p>
442
443<p>Kết hợp lịch thi đấu với trang trực tiếp b\xf3ng đ\xe1, bạn sẽ c\xf3 trải nghiệm theo d\xf5i b\xf3ng đ\xe1 ho\xe0n hảo nhất - biết trước, xem ngay, kh\xf4ng bỏ lỡ!</p>
444`;var c=s(50154);function d({initialData:e}){let t=(0,r.usePathname)(),[s,h]=(0,l.useState)(!1),[m,p]=(0,l.useState)(new Set),[u,g]=(0,l.useState)(""),[b,f]=(0,l.useState)(!1),[j,w]=(0,l.useState)(0),v=(0,l.useMemo)(()=>(0,c.p_)(e),[e]),N=v.dateTabs,y=(0,l.useMemo)(()=>{if(!v.selectedDate)return 0;let e=N.findIndex(e=>(e.dataValue||e.date)===v.selectedDate);return e>=0?e:0},[N,v.selectedDate]),[_,k]=(0,l.useState)(y),[E,C]=(0,l.useState)(v.leagues||[]),S=(0,l.useMemo)(()=>{if(!u)return E;let e=u.toLowerCase();return E.filter(t=>t.league_name.toLowerCase().includes(e)||t.matches.some(t=>t.home_team.toLowerCase().includes(e)||t.away_team.toLowerCase().includes(e)))},[E,u]),L=Math.max(0,N.length-7),$=N.slice(j,j+7),F=j>0,T=j<L,A=S.reduce((e,t)=>e+t.matches.length,0);return((0,l.useEffect)(()=>{if(!v.selectedDate||!N.length)return;let e=N.findIndex(e=>(e.dataValue||e.date)===v.selectedDate);e>=0&&k(e)},[N,v.selectedDate]),(0,l.useEffect)(()=>{_<j?w(Math.max(0,_)):_>=j+7&&w(Math.min(L,_-7+1))},[_,L,j]),e)?(0,a.jsxs)("div",{className:"max-w-[1440px] mx-auto px-4 py-8",children:[(0,a.jsx)(n.c,{eyebrow:"Lịch thi đấu",title:"LỊCH THI ĐẤU",rightSlot:(0,a.jsxs)("div",{className:"text-[12px] text-slate-500 font-bold uppercase tracking-wider",children:[(0,a.jsx)("span",{className:"text-[#E11D48] font-black",children:S.reduce((e,t)=>e+t.matches.length,0)})," trận đấu"]})}),(0,a.jsxs)("div",{className:"flex items-center mb-4 rounded-xl overflow-hidden border border-slate-200 bg-white shadow-sm",children:[(0,a.jsx)("button",{type:"button",disabled:!F,onClick:()=>w(e=>Math.max(0,e-1)),className:`flex items-center justify-center w-8 h-[52px] bg-slate-100 border-r border-slate-200 text-slate-600 hover:text-slate-800 hover:bg-slate-200 transition-all shrink-0 ${!F?"opacity-30":"cursor-pointer"}`,children:(0,a.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2.5,d:"M15 19l-7-7 7-7"})})}),(0,a.jsx)("div",{className:"flex flex-1",children:$.map((e,s)=>{let l=j+s;return(0,a.jsxs)("button",{type:"button",onClick:()=>(e=>{let s=N[e];if(!s||e===_)return;let a=s.dataValue||s.date;a&&(k(e),p(new Set),h(!0),window.history.replaceState(null,"",`${t}?date=${encodeURIComponent(a)}`),fetch(`/api/socolive/fixtures?date=${encodeURIComponent(a)}`,{cache:"no-store"}).then(e=>e.ok?e.json():null).then(e=>{e&&C((0,c.p_)(e).leagues||[])}).finally(()=>h(!1)))})(l),className:`flex-1 flex flex-col items-center justify-center h-[52px] border-b-[3px] transition-all duration-300 ${_===l?"border-[#4681E8] text-[#4681E8] bg-[#4681E8]/5":"border-transparent text-[#64748B] hover:text-[#94A3B8] hover:bg-slate-100"}`,children:[(0,a.jsx)("span",{className:`text-[11px] font-bold uppercase tracking-widest ${_===l?"text-[#4681E8]":""}`,children:e.label}),(0,a.jsx)("span",{className:`text-[12px] font-mono mt-0.5 ${_===l?"text-slate-800 font-black":""}`,children:e.date})]},`tab-${l}`)})}),(0,a.jsx)("button",{type:"button",disabled:!T,onClick:()=>w(e=>Math.min(L,e+1)),className:`flex items-center justify-center w-8 h-[52px] bg-slate-100 border-l border-slate-200 text-slate-600 hover:text-slate-800 hover:bg-slate-200 transition-all shrink-0 ${!T?"opacity-30":"cursor-pointer"}`,children:(0,a.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2.5,d:"M9 5l7 7-7 7"})})})]}),(0,a.jsxs)("div",{className:"relative mb-4",children:[(0,a.jsxs)("button",{onClick:()=>f(!b),className:"flex items-center gap-3 bg-white hover:bg-slate-50 px-4 py-2.5 rounded-xl border border-slate-200 shadow-sm transition-all text-sm group",children:[(0,a.jsx)("svg",{className:"w-5 h-5 text-[#E11D48] transition-colors group-hover:text-[#F43F5E]",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 6h16M4 12h16M4 18h16"})}),(0,a.jsx)("span",{className:"text-slate-700 font-bold text-[13px] uppercase tracking-wide",children:"Danh s\xe1ch giải đấu"}),(0,a.jsx)("svg",{className:`w-4 h-4 text-slate-500 transition-transform duration-300 ${b?"rotate-180":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),b&&(0,a.jsxs)("div",{className:"absolute top-full left-0 mt-2 w-[360px] bg-white border border-slate-200 rounded-2xl shadow-[0_24px_80px_rgba(0,0,0,0.12)] z-50 max-h-[320px] overflow-hidden flex flex-col",children:[(0,a.jsx)("div",{className:"p-2 border-b border-slate-100",children:(0,a.jsx)("input",{type:"text",placeholder:"T\xecm giải đấu...",value:u,onChange:e=>g(e.target.value),className:"w-full bg-slate-50 border border-transparent roun
444ded-xl px-4 py-2.5 text-sm text-slate-800 placeholder-slate-400 outline-none focus:border-[#4681E8]/50 transition-colors"})}),(0,a.jsx)("div",{className:"overflow-y-auto flex-1 py-2",children:E.map((e,t)=>(0,a.jsxs)("button",{type:"button",onClick:()=>{g(e.league_name),f(!1)},className:"w-full flex items-center gap-3 px-4 py-2.5 hover:bg-slate-50 text-left text-[13px] transition-colors",children:[e.league_icon?(0,a.jsx)("img",{src:e.league_icon,alt:e.league_name||"League",className:"w-5 h-5 object-contain shrink-0",loading:"lazy",decoding:"async"}):(0,a.jsx)("div",{className:"w-5 h-5 rounded-md bg-slate-200 shrink-0"}),(0,a.jsx)("span",{className:"text-slate-600 truncate flex-1 font-medium",children:e.league_name}),(0,a.jsx)("span",{className:"text-[11px] text-[#E11D48] font-bold shrink-0 px-2 py-0.5 bg-[#E11D48]/10 rounded-md border border-[#E11D48]/20",children:e.matches.length})]},t))})]})]}),(0,a.jsxs)("div",{className:"grid grid-cols-[1fr_60px_55px_100px_100px_90px] bg-slate-50 border border-slate-200 rounded-t-xl px-4 py-3 text-[11px] text-slate-500 font-black uppercase tracking-widest shadow-inner",children:[(0,a.jsx)("span",{children:"Trận đấu"}),(0,a.jsx)("span",{className:"text-center",children:"Tỷ số"}),(0,a.jsx)("span",{className:"text-center",children:"Hiệp 1"}),(0,a.jsx)("span",{className:"text-center",children:"Cược chấp"}),(0,a.jsx)("span",{className:"text-center",children:"T\xe0i/Xỉu"}),(0,a.jsx)("span",{className:"text-center",children:"1 X 2"})]}),(0,a.jsxs)("div",{className:"border border-slate-200 border-t-0 rounded-b-xl overflow-hidden relative shadow-[0_8px_30px_rgba(0,0,0,0.06)]",children:[s&&(0,a.jsx)("div",{className:"absolute inset-0 z-10 bg-white/80 backdrop-blur-[2px]",children:(0,a.jsx)("div",{className:"space-y-0",children:[...Array(6)].map((e,t)=>(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 px-4 py-3.5 bg-slate-100 border-b border-slate-200",children:[(0,a.jsx)("div",{className:"w-4 h-4 rounded bg-slate-300 animate-pulse"}),(0,a.jsx)("div",{className:"h-3.5 rounded bg-slate-200 animate-pulse",style:{width:`${120+30*t}px`}})]}),[void 0,void 0].map((e,t)=>(0,a.jsxs)("div",{className:"grid grid-cols-[1fr_60px_55px_100px_100px_90px] items-center px-4 py-3 border-b border-slate-100",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)("div",{className:"w-10 h-3.5 rounded bg-slate-200 animate-pulse"}),(0,a.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,a.jsx)("div",{className:"h-3 w-24 rounded bg-slate-100 animate-pulse"}),(0,a.jsx)("div",{className:"h-3 w-20 rounded bg-slate-100 animate-pulse"})]})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5",children:[(0,a.jsx)("div",{className:"h-3 w-5 rounded bg-slate-100 animate-pulse"}),(0,a.jsx)("div",{className:"h-3 w-5 rounded bg-slate-100 animate-pulse"})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5",children:[(0,a.jsx)("div",{className:"h-3 w-5 rounded bg-slate-100 animate-pulse"}),(0,a.jsx)("div",{className:"h-3 w-5 rounded bg-slate-100 animate-pulse"})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5",children:[(0,a.jsx)("div",{className:"h-3 w-14 rounded bg-slate-100 animate-pulse"}),(0,a.jsx)("div",{className:"h-3 w-10 rounded bg-slate-100 animate-pulse"})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5",children:[(0,a.jsx)("div",{className:"h-3 w-14 rounded bg-slate-100 animate-pulse"}),(0,a.jsx)("div",{className:"h-3 w-10 rounded bg-slate-100 animate-pulse"})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5",children:[(0,a.jsx)("div",{className:"h-3 w-10 rounded bg-slate-100 animate-pulse"}),(0,a.jsx)("div",{className:"h-3 w-10 rounded bg-slate-100 animate-pulse"}),(0,a.jsx)("div",{className:"h-3 w-10 rounded bg-slate-100 animate-pulse"})]})]},t))]},t))})}),0!==S.length||s?S.map((e,t)=>(0,a.jsxs)("div",{id:`league-${t}`,children:[(0,a.jsxs)("button",{onClick:()=>{p(e=>{let s=new Set(e);return s.has(t)?s.delete(t):s.add(t),s})},className:"w-full flex items-center gap-3 px-4 py-3 bg-slate-50 hover:bg-slate-100 border-b border-slate-100 transition-colors text-left group",children:[(0,a.jsx)("svg",{className:`w-4 h-4 text-[#E11D48] transition-transform duration-300 shrink-0 ${m.has(t)?"-rotate-90":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2.5,d:"M19 9l-7 7-7-7"})}),e.league_icon&&(0,a.jsx)("div",{className:"w-6 h-6 rounded-full bg-slate-100 p-0.5 border border-slate-200 flex items-center justify-center shadow-sm",children:(0,a.jsx)("img",{src:e.league_icon,alt:e.league_name||"League",className:"w-4 h-4 object-contain shrink-0",loading:"lazy",decoding:"async"})}),(0,a.jsx)("span",{className:"text-[13px] font-bold text-slate-700 flex-1 truncate uppercase tracking-widest",children:e.league_name}),(0,a.jsxs)("span",{className:"text-[11px] text-[#E11D48] font-bold shrink-0 ml-1 px-2 py-0.5 bg-[#E11D48]/10 rounded border border-[#
444E11D48]/20 group-hover:bg-[#E11D48]/20 transition-colors",children:["BXH ",(0,a.jsx)("svg",{className:"inline w-3 h-3 ml-0.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 6h16M4 10h16M4 14h16M4 18h16"})})]})]}),!m.has(t)&&e.matches.map((e,t)=>(0,a.jsxs)("div",{className:"grid grid-cols-[1fr_60px_55px_100px_100px_90px] items-center px-4 py-3 bg-transparent hover:bg-slate-50 border-b border-slate-100 last:border-0 transition-colors group cursor-default",children:[(0,a.jsxs)("div",{className:"flex items-center gap-4 min-w-0",children:[(0,a.jsx)("span",{className:"text-[#E11D48] font-mono text-[13px] font-black min-w-[42px] shrink-0 drop-shadow-[0_0_4px_rgba(225,29,72,0.4)]",children:e.time}),(0,a.jsxs)("div",{className:"flex flex-col gap-1 min-w-0 flex-1",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[e.home_logo&&(0,a.jsx)("img",{src:e.home_logo,alt:e.home_team||"Home team",className:"w-4 h-4 object-contain shrink-0 filter drop-shadow-[0_2px_2px_rgba(0,0,0,0.8)]",loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-[13px] text-slate-700 font-medium truncate group-hover:text-slate-900 transition-colors",children:e.home_team})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[e.away_logo&&(0,a.jsx)("img",{src:e.away_logo,alt:e.away_team||"Away team",className:"w-4 h-4 object-contain shrink-0",loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-[13px] text-slate-700 font-medium truncate group-hover:text-slate-900 transition-colors",children:e.away_team})]})]})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center",children:[(0,a.jsx)("span",{className:"text-[12px] text-[var(--accent-cyan)] font-mono font-bold",children:"-"!==e.score?e.score:"-"}),(0,a.jsx)("span",{className:"text-[12px] text-[#64748B]",children:"-"})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center",children:[(0,a.jsx)("span",{className:"text-[12px] text-[#64748B]",children:"-"}),(0,a.jsx)("span",{className:"text-[12px] text-[#64748B]",children:"-"})]}),(0,a.jsx)(x,{values:e.handicap,hasLine:!0}),(0,a.jsx)(x,{values:e.over_under,hasLine:!0}),(0,a.jsx)("div",{className:"flex flex-col items-center gap-0",children:e.one_x_two?.length>0?e.one_x_two.map((e,t)=>(0,a.jsx)("span",{className:"text-[11px] text-slate-500 leading-[18px]",children:e||"-"},t)):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"text-[11px] text-[#64748B] leading-[18px]",children:"-"}),(0,a.jsx)("span",{className:"text-[11px] text-[#64748B] leading-[18px]",children:"-"}),(0,a.jsx)("span",{className:"text-[11px] text-[#64748B] leading-[18px]",children:"-"})]})})]},t))]},t)):(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center py-20 gap-3 bg-slate-50",children:[(0,a.jsx)("svg",{className:"w-12 h-12 text-slate-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",strokeWidth:1.5,children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6.75 3v2.25M17.25 3v2.25M3 18.75V7.5a2.25 2.25 0 012.25-2.25h13.5A2.25 2.25 0 0121 7.5v11.25m-18 0A2.25 2.25 0 005.25 21h13.5A2.25 2.25 0 0021 18.75m-18 0v-7.5A2.25 2.25 0 015.25 9h13.5A2.25 2.25 0 0121 11.25v7.5"})}),(0,a.jsx)("span",{className:"text-slate-500 font-medium tracking-wide",children:"Kh\xf4ng c\xf3 trận đấu n\xe0o cho ng\xe0y n\xe0y"}),(0,a.jsx)("span",{className:"text-slate-400 text-[12px]",children:"H\xe3y thá»­ chọn một ng\xe0y kh\xe1c"})]})]}),(0,a.jsxs)("div",{className:"mt-6 text-center text-[11px] text-[#64748B] uppercase tracking-widest font-bold drop-shadow-sm",children:["Tổng cộng ",A," trận đấu trong ",S.length," giải"]}),(0,a.jsx)(i,{html:o})]}):(0,a.jsxs)("div",{className:"max-w-[1440px] mx-auto px-4 py-8",children:[(0,a.jsx)(n.c,{eyebrow:"Lịch thi đấu",title:"LỊCH THI ĐẤU"}),(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center py-16 gap-4",children:[(0,a.jsx)("div",{className:"w-12 h-12 rounded-full border-2 border-[#E11D48]/30 border-t-[#E11D48] animate-spin"}),(0,a.jsx)("span",{className:"text-slate-500 text-sm font-medium tracking-wide",children:"Đang tải lịch thi đấu..."})]})]})}function x({values:e,hasLine:t}){return e&&0!==e.length?t&&e.length>=3?(0,a.jsxs)("div",{className:"flex flex-col items-center gap-0",children:[(0,a.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,a.jsx)("span",{className:"text-[11px] text-[#E11D48] leading-[18px] font-bold",children:e[0]}),(0,a.jsx)("span",{className:"text-[11px] text-slate-500 leading-[18px]",children:e[1]})]}),(0,a.jsx)("span",{className:"text-[11px] text-slate-500 leading-[18px]",children:e[2]})]}):(0,a.jsx)("div",{className:"flex flex-col items-center gap-0",children:e.map((e,t)=>(0,a.jsx)("span",{className:"text-[11px] text-slate-500 leading-[18px]",children:e||"-"},t))}):(0,a.jsxs)("div",{className:"flex flex-col items-center",children:[(0,a.jsx)("span",{className:"text-[11px] text-[#64748B] leading-[18px]",children:"-"}),(0,a.jsx)("span",{className:"text-[11px] text-[#64748B] leading-[18px]",children:"-"})]})}},35559:(e,t,s)=>{"use strict";function a(e){let t=e?.fixtures_v2||null,s=e?.fixtures||e?.schedules||[],a=t?.date_tabs?.length?t.date_tabs:function(e=new Date){let t=["Chá»
444§ Nhật","Thứ Hai","Thứ Ba","Thứ Tư","Thứ Năm","Thứ S\xe1u","Thứ Bảy"],s=[];for(let a=0;a<14;a+=1){let l=new Date(e);l.setDate(l.getDate()+a);let r=String(l.getDate()).padStart(2,"0"),n=String(l.getMonth()+1).padStart(2,"0"),i=`${l.getFullYear()}-${l.getMonth()+1}-${l.getDate()}`;s.push({label:0===a?"H\xf4m Nay":t[l.getDay()],date:`${r}.${n}`,dataValue:i,active:0===a})}return s}(),l=e?.selected_date||a.find(e=>e.active)?.dataValue||a[0]?.dataValue||null;if(t?.leagues?.length)return{dateTabs:a,selectedDate:l,leagues:t.leagues,totalMatches:t.leagues.reduce((e,t)=>e+t.matches.length,0)};let r=[],n=new Set;return s.forEach(e=>{let t=e.data;if(!(t.length<3))for(let s=0;s+2<t.length;s+=16){let a=t[s]||"",l=t[s+1]||"",i=t[s+2]||"",o=`${a}-${l}-${i}`;if(!n.has(o)&&l&&(n.add(o),r.push({time:a,home_team:l,away_team:i,home_logo:e.team_logos?.[2*Math.floor(s/16)]||"",away_logo:e.team_logos?.[2*Math.floor(s/16)+1]||"",score:t[s+3]||"-",ht_score:t[s+4]||"",handicap:t.length>s+9?[t[s+7]||"",t[s+8]||"",t[s+9]||""]:[],over_under:t.length>s+12?[t[s+10]||"",t[s+11]||"",t[s+12]||""]:[],one_x_two:t.length>s+15?[t[s+13]||"",t[s+14]||"",t[s+15]||""]:[]}),s+16>=t.length))break}}),{dateTabs:a,selectedDate:l,leagues:r.length>0?[{league_name:"Tất cả trận đấu",league_icon:"",match_count:r.length,matches:r}]:[],totalMatches:r.length}}function l(e){let t=e?.results_v2||null,s=e?.results||[];if(t?.date_groups?.length)return{availableLeagues:t.available_leagues||[],dateGroups:t.date_groups,totalMatches:t.date_groups.reduce((e,t)=>e+t.matches.length,0)};let a=[];return s.forEach(e=>{let t=e.data;if(t.length<6)return;let s=t[0],l=s.split(" - "),r=[],n=1,i=0;for(;n<t.length;){if(t[n]?.startsWith("L\xfac")){let s=t[n].replace("L\xfac","").trim();r.push({time:s,home_team:t[n+1]||"",away_team:t[n+4]||"",home_logo:e.team_logos?.[i]||"",away_logo:e.team_logos?.[i+1]||"",score:t[n+2]||"",ht_score:(t[n+3]||"").replace("H1:","").replace("HT:","").trim()}),i+=2,n+=5;continue}n+=1}r.length>0&&a.push({date_header:l[0]?.trim()||s,league_round:l.slice(1).join(" - ").trim(),matches:r})}),{availableLeagues:[],dateGroups:a,totalMatches:a.reduce((e,t)=>e+t.matches.length,0)}}function r(e,t){if(!t)return e;let s=t.toLowerCase();return e.filter(e=>e.league_round.toLowerCase().includes(s))}s.d(t,{kK:()=>r,o8:()=>l,p_:()=>a})},35793:(e,t,s)=>{"use strict";function a(e){let t=e?.fixtures_v2||null,s=e?.fixtures||e?.schedules||[],a=t?.date_tabs?.length?t.date_tabs:function(e=new Date){let t=["Chá»§ Nhật","Thứ Hai","Thứ Ba","Thứ Tư","Thứ Năm","Thứ S\xe1u","Thứ Bảy"],s=[];for(let a=0;a<14;a+=1){let l=new Date(e);l.setDate(l.getDate()+a);let r=String(l.getDate()).padStart(2,"0"),n=String(l.getMonth()+1).padStart(2,"0"),i=`${l.getFullYear()}-${l.getMonth()+1}-${l.getDate()}`;s.push({label:0===a?"H\xf4m Nay":t[l.getDay()],date:`${r}.${n}`,dataValue:i,active:0===a})}return s}(),l=e?.selected_date||a.find(e=>e.active)?.dataValue||a[0]?.dataValue||null;if(t?.leagues?.length)return{dateTabs:a,selectedDate:l,leagues:t.leagues,totalMatches:t.leagues.reduce((e,t)=>e+t.matches.length,0)};let r=[],n=new Set;return s.forEach(e=>{let t=e.data;if(!(t.length<3))for(let s=0;s+2<t.length;s+=16){let a=t[s]||"",l=t[s+1]||"",i=t[s+2]||"",o=`${a}-${l}-${i}`;if(!n.has(o)&&l&&(n.add(o),r.push({time:a,home_team:l,away_team:i,home_logo:e.team_logos?.[2*Math.floor(s/16)]||"",away_logo:e.team_logos?.[2*Math.floor(s/16)+1]||"",score:t[s+3]||"-",ht_score:t[s+4]||"",handicap:t.length>s+9?[t[s+7]||"",t[s+8]||"",t[s+9]||""]:[],over_under:t.length>s+12?[t[s+10]||"",t[s+11]||"",t[s+12]||""]:[],one_x_two:t.length>s+15?[t[s+13]||"",t[s+14]||"",t[s+15]||""]:[]}),s+16>=t.length))break}}),{dateTabs:a,selectedDate:l,leagues:r.length>0?[{league_name:"Tất cả trận đấu",league_icon:"",match_count:r.length,matches:r}]:[],totalMatches:r.length}}function l(e){let t=e?.results_v2||null,s=e?.results||[];if(t?.date_groups?.length)return{availableLeagues:t.available_leagues||[],dateGroups:t.date_groups,totalMatches:t.date_groups.reduce((e,t)=>e+t.matches.length,0)};let a=[];
444return s.forEach(e=>{let t=e.data;if(t.length<6)return;let s=t[0],l=s.split(" - "),r=[],n=1,i=0;for(;n<t.length;){if(t[n]?.startsWith("L\xfac")){let s=t[n].replace("L\xfac","").trim();r.push({time:s,home_team:t[n+1]||"",away_team:t[n+4]||"",home_logo:e.team_logos?.[i]||"",away_logo:e.team_logos?.[i+1]||"",score:t[n+2]||"",ht_score:(t[n+3]||"").replace("H1:","").replace("HT:","").trim()}),i+=2,n+=5;continue}n+=1}r.length>0&&a.push({date_header:l[0]?.trim()||s,league_round:l.slice(1).join(" - ").trim(),matches:r})}),{availableLeagues:[],dateGroups:a,totalMatches:a.reduce((e,t)=>e+t.matches.length,0)}}function r(e,t){if(!t)return e;let s=t.toLowerCase();return e.filter(e=>e.league_round.toLowerCase().includes(s))}s.d(t,{kK:()=>r,o8:()=>l,p_:()=>a})},36220:(e,t,s)=>{"use strict";s.d(t,{Klivevip09MatchDetailPage:()=>m});var a=s(68019),l=s(10707),r=s(58420);function n({src:e,poster:t,autoPlay:s=!0,onError:i,className:o=""}){let c=(0,l.useRef)(null),d=(0,l.useRef)(i);d.current=i;let[x,h]=(0,l.useState)(!1),[m,p]=(0,l.useState)(!1);return((0,l.useEffect)(()=>{let t=c.current;if(!t)return;let a=null;h(!1);let l=()=>p(!0),n=()=>p(!1);t.addEventListener("play",l),t.addEventListener("pause",n);let i=()=>{s&&(t.muted=!0,t.play().catch(()=>{}))};if(t.addEventListener("canplay",i),r.Ay.isSupported()){(a=new r.Ay({maxBufferLength:30,maxMaxBufferLength:60,lowLatencyMode:!0,enableWorker:!0})).loadSource(e),a.attachMedia(t),a.on(r.Ay.Events.MANIFEST_PARSED,()=>{s&&(t.muted=!0,t.play().catch(e=>{console.warn("AutoPlay failed:",e),t.muted=!1}))});let l=0,n=0;a.on(r.Ay.Events.ERROR,(e,t)=>{if(t.type===r.Ay.ErrorTypes.NETWORK_ERROR&&(++l>2||t.response&&t.response.code>=400)){console.error("HLS Network Error threshold reached (CORS/404), triggering fallback.",t),h(!0),d.current&&d.current(t),a?.destroy();return}if(t.fatal)switch(t.type){case r.Ay.ErrorTypes.NETWORK_ERROR:console.error("HLS Fatal Network Error, recovering...",t),a?.startLoad();break;case r.Ay.ErrorTypes.MEDIA_ERROR:console.error("HLS Media Error, recovering...",t),++n>3?(console.error("HLS Media Error threshold reached, triggering fallback."),h(!0),d.current&&d.current(t),a?.destroy()):a?.recoverMediaError();break;default:console.error("HLS Fatal Error:",t),h(!0),d.current&&d.current(t),a?.destroy()}})}else t.canPlayType("application/vnd.apple.mpegurl")&&(t.src=e,t.addEventListener("loadedmetadata",()=>{s&&t.play().catch(e=>{console.warn("AutoPlay failed:",e)})}),t.addEventListener("error",e=>{h(!0),d.current&&d.current(e)}));return()=>{t.removeEventListener("play",l),t.removeEventListener("pause",n),t.removeEventListener("canplay",i),a&&a.destroy()}},[e,s]),x)?i?null:(0,a.jsxs)("div",{className:`w-full h-full flex flex-col items-center justify-center bg-white/80 backdrop-blur ${o}`,children:[(0,a.jsx)("svg",{className:"w-12 h-12 text-red-500 mb-4 opacity-80",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"})}),(0,a.jsx)("div",{className:"text-slate-600 text-sm font-medium",children:"Video/Stream kh\xf4ng khả dụng hoặc bị lỗi mạng"}),(0,a.jsx)("div",{className:"text-gray-500 text-xs mt-1",children:"Vui l\xf2ng thử lại sau hoặc chọn nguồn kh\xe1c"})]}):(0,a.jsx)("div",{className:`relative group w-full h-full bg-white flex items-center justify-center overflow-hidden ${o}`,children:(0,a.jsx)("video",{ref:c,className:"w-full h-full object-contain",controls:!0,playsInline:!0,muted:s,poster:t,referrerPolicy:"no-referrer"})})}function i(e){let t=(e||"").split(/[\s-]+/).slice(0,2).map(e=>e[0]||"").join("").toUpperCase()||"??";return`data:image/svg+xml,${encodeURIComponent(`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 80 80"><rect width="80" height="80" rx="20" fill="#1a1c25"/><text x="40" y="47" font-size="20" font-family="Arial" font-weight="700" text-anchor="middle" fill="#666">${t}</text></svg>`)}`}function o({homeName:e,awayName:t,homeLogo:s,awayLogo:l,homeScore:r="0",awayScore:n="0",statusText:c="LIVE",timeText:d="",isLive:x=!0,sportId:h="1",matchId:m}){let p=s||i(e),u=l||i(t),g="5"===String(h),b="2"===String(h),f="bg-slate-200 border-slate-200",j="repeating-linear-gradient(90deg, transparent, transparent 10%, #000 10%, #000 20%)";return g?(f="bg-slate-100 border-slate-200",j="none"):b&&(f="bg-[#bc7a46] border-[#8a4e21]",j="repeating-linear-gradient(90deg, transparent, transparent 5%, #000 5%, #000 10%)"),(0,a.jsxs)("div",{className:"relative w-full aspect-video min-h-[300px] max-h-[600px] bg-slate-50 overflow-hidden flex flex-col justify-center",children:[(0,a.jsx)("div",{className:"absolute inset-0 flex items-center justify-center pointer-events-none mt-16 md:mt-24",children:(0,a.jsx)("div",{className:"relative w-[120%] h-[120%] sm:w-[90%] sm:h-[120%] max-w-[900px] flex-shrink-0 transition-transform duration-1000",style:{transform:"perspective(900px) rotateX(60deg) scale(0.9)",transformOrigin:"center center"},children:(0,a.jsxs)("div",{className:`absolute inset-0 ${f} shadow-[0_30px_60px_rgba(0,0,0,0.8)] border-4 rounded-xl overflow-hidden flex transition-colors duration-500`,children:[(0,a.jsx)("div",{className:"absolute inset-0 opacity-15 pointer-events-none",style:{backgroundImage:j}}),(0,a.jsxs)("div",{className:"absolute inset-[4%] pointer-events-none shadow-sm flex items-center justify-center",children:["1"===String(h)&&(0,a.jsxs)("div",{className:"absolute inset-0 w-full h-full border-2 border-white/60",children:[(0,a.jsx)("div",{className:"absolute left-1/2 top-0 bottom-0 w-0 border-l-2 border-white/60 -translate-x-1/2"}),(0,a.jsx)("div",{className:"absolute left-1/2 top-1/2 w-[18%] aspect-square rounded-full border-2 border-white/60 -translate-x-1/2 -translate-y-1/2"}),(0,a.jsx)("div",{className:"absolute left-1/2 top-1/2 w-2 h-2 rounded-full bg-white/80 -translate-x-1/2 -translate-y-1/2"}),(0,a.jsx)("div",{className:"absolute left-0 top-1/2 w-[16%] h-[46%] border-2 border-l-0 border-white/60 -translate-y-1/2 bg-slate-200"}),(0,a.jsx)("div",{className:"absolute left-0 top-1/2 w-[6%] h-[20%] border-2 border-l-0 border-white/60 -translate-y-1/2 bg-slate-200"}),(0,a.jsx)("div",{className:"absolute left-[16%] top-1/2 w-[8%] aspect-square border-2 border-l-0 border-white/60 rounded-r-full -translate-y-1/2 clip-path-half",style:{clipPath:"inset(0 0 0 50%)"}}),(0,a.jsx)("div",{className:"absolute right-0 top-1/2 w-[16%] h-[46%] border-2 border-r-0 border-white/60 -translate-y-1/2 bg-slate-200"}),(0,a.jsx)("div",{className:"absolute right-0 top-1/2 w-[6%] h-[20%] border-2 border-r-0 border-white/60 -translate-y-1/2 bg-slate-200"}),(0,a.jsx)("div",{className:"absolute right-[16%] top-1/2 w-[8%] aspect-square border-2 border-r-0 border-white/60 rounded-l-full -translate-y-1/2 clip-path-half",style:{clipPath:"inset(0 50% 0 0)"}})]}),g&&(0,a.jsxs)("div",{className:"absolute inset-[10%] w-[80%] h-[80%
444] border-2 border-white/80 bg-white",children:[(0,a.jsx)("div",{className:"absolute top-[10%] bottom-[10%] left-0 right-0 border-y-2 border-white/80"}),(0,a.jsx)("div",{className:"absolute left-1/2 top-[-2%] bottom-[-2%] w-1 bg-white/40 shadow-xl -translate-x-1/2 z-10"}),(0,a.jsx)("div",{className:"absolute left-[25%] right-[25%] top-[10%] bottom-[10%] border-x-2 border-white/80"}),(0,a.jsx)("div",{className:"absolute left-[25%] right-[25%] top-1/2 w-[50%] border-t-2 border-white/80 -translate-y-1/2"}),(0,a.jsx)("div",{className:"absolute left-0 top-1/2 w-[2%] border-t-2 border-white/80 -translate-y-1/2"}),(0,a.jsx)("div",{className:"absolute right-0 top-1/2 w-[2%] border-t-2 border-white/80 -translate-y-1/2"})]}),b&&(0,a.jsxs)("div",{className:"absolute inset-0 w-full h-full border-2 border-white/50",children:[(0,a.jsx)("div",{className:"absolute left-1/2 top-0 bottom-0 w-0 border-l-2 border-white/50 -translate-x-1/2"}),(0,a.jsx)("div",{className:"absolute left-1/2 top-1/2 w-[15%] aspect-square rounded-full border-2 border-white/50 -translate-x-1/2 -translate-y-1/2"}),(0,a.jsx)("div",{className:"absolute left-0 top-1/2 w-[18%] h-[35%] border-2 border-l-0 border-white/50 -translate-y-1/2 bg-[#bc7a46]"}),(0,a.jsx)("div",{className:"absolute left-[18%] top-1/2 w-[10%] aspect-square rounded-full border-2 border-white/50 -translate-y-1/2"}),(0,a.jsx)("div",{className:"absolute left-0 top-1/2 w-[30%] h-[70%] border-2 border-l-0 border-white/50 rounded-r-full -translate-y-1/2 opacity-60"}),(0,a.jsx)("div",{className:"absolute right-0 top-1/2 w-[18%] h-[35%] border-2 border-r-0 border-white/50 -translate-y-1/2 bg-[#bc7a46]"}),(0,a.jsx)("div",{className:"absolute right-0 top-1/2 w-[30%] h-[70%] border-2 border-r-0 border-white/50 rounded-l-full -translate-y-1/2 opacity-60"})]})]}),x&&(0,a.jsx)("div",{className:`absolute left-1/2 top-1/2 shadow-[0_8px_16px_rgba(0,0,0,0.8)] z-10 transition-all duration-[3000ms] border-2 border-white/20 rounded-full
445                                ${g?"w-2 h-2 sm:w-3 sm:h-3 bg-[#ccff00]":b?"w-4 h-4 sm:w-6 sm:h-6 bg-[#d95d16]":"w-4 h-4 sm:w-5 sm:h-5 bg-white"}`,style:{animation:"ballMove 8s infinite alternate ease-in-out",transform:"translate(-50%, -50%)"},children:(0,a.jsx)("div",{className:"absolute -bottom-4 left-1/2 w-4 h-2 bg-white/40 rounded-full blur-sm -translate-x-1/2"})}),x&&(0,a.jsxs)("div",{className:"absolute left-[65%] top-[60%] flex flex-col items-center animate-bounce-slow",style:{animation:"floatBubble 4s infinite alternate ease-in-out"},children:[(0,a.jsxs)("div",{className:"bg-white/95 backdrop-blur border border-white/10 rounded-2xl p-2 shadow-2xl flex items-center gap-3 w-max max-w-[200px]",children:[(0,a.jsx)("div",{className:"w-6 h-6 rounded-full flex items-center justify-center p-0.5 bg-white/5 shrink-0",children:(0,a.jsx)("img",{src:p,alt:e||"Home team",className:"max-w-full max-h-full object-contain",onError:t=>t.target.src=i(e),loading:"lazy",decoding:"async"})}),(0,a.jsx)("div",{className:"flex flex-col pr-1 overflow-hidden",children:(0,a.jsx)("span",{className:"text-slate-900 font-bold text-[10px] sm:text-xs tracking-wide truncate",children:g?"Serve / Return":"Tấn c\xf4ng nguy hiểm"})})]}),(0,a.jsx)("div",{className:"w-0 h-0 border-l-[6px] border-r-[6px] border-t-[6px] border-l-transparent border-r-transparent border-t-[#1a1c28]/95 mt-[-1px]"})]})]})})}),(0,a.jsx)("div",{className:"relative z-20 flex-1 flex flex-col items-center justify-start p-4 md:p-6 pointer-events-none w-full",children:(0,a.jsxs)("div",{className:"w-full max-w-[800px] flex items-center justify-between px-4 sm:px-6 py-3 rounded-xl bg-gradient-to-r from-[#0d0f14]/90 via-[#151821]/95 to-[#0d0f14]/90 backdrop-blur-xl border border-white/10 shadow-[0_10px_40px_rgba(0,0,0,0.8)] pointer-events-auto",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 flex-1 min-w-0 pr-2",children:[(0,a.jsx)("img",{src:p,alt:e,className:"w-8 h-8 md:w-12 md:h-12 object-contain drop-shadow-lg shrink-0",onError:t=>t.target.src=i(e),loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-slate-900 text-xs sm:text-sm md:text-base font-bold truncate tracking-wide",children:e})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1 shrink-0 px-2 sm:px-6 min-w-[100px]",children:[(0,a.jsxs)("span",{className:`inline-flex items-center gap-1.5 px-2.5 py-0.5 rounded-full text-[10px] sm:text-xs font-bold shadow-inner ${x?"bg-green-500/10 text-green-400 border border-green-500/20":"bg-white/5 text-slate-900/40"}`,children:[x&&(0,a.jsx)("span",{className:"w-1.5 h-1.5 rounded-full bg-green-500 animate-pulse shadow-[0_0_8px_#22c55e]"}),d||c]}),(0,a.jsxs)("div",{className:"flex gap-3 sm:gap-5 items-center justify-center",children:[(0,a.jsx)("span",{className:"text-slate-900 text-2xl sm:text-4xl font-black drop-shadow-md",children:r}),(0,a.jsx)("span",{className:"text-slate-900/30 text-xl font-light",children:"-"}),(0,a.jsx)("span",{className:"text-slate-900 text-2xl sm:text-4xl font-black drop-shadow-md",children:n})]})]}),(0,a.jsxs)("div",{className:"flex items-center justify-end gap-3 flex-1 min-w-0 pl-2 text-right",children:[(0,a.jsx)("span",{className:"text-slate-900 text-xs sm:text-sm md:text-base font-bold truncate tracking-wide",children:t}),(0,a.jsx)("img",{src:u,alt:t,className:"w-8 h-8 md:w-12 md:h-12 object-contain drop-shadow-lg shrink-0",onError:e=>e.target.src=i(t),loading:"lazy",decoding:"async"})]})]})}),(0,a.jsx)("div",{className:"relative z-20 mt-auto w-full p-4 flex justify-center pointer-events-none",children:(0,a.jsx)("div",{className:"w-full max-w-[600px] h-6 bg-white/40 backdrop-blur-md rounded-full border border-white/5 flex items-center px-4",children:(0,a.jsxs)("div",{className:"flex-1 h-0.5 bg-white/10 relative rounded-full",children:[x&&(0,a.jsx)("div",{className:"absolute left-0 top-0 bottom-0 bg-gradient-to-r from-[#b38b22] to-[#ffda6a] w-[65%] rounded-full opacity-90 shadow-[0_0_12px_#daa520]"}),(0,a.jsx)("span",{className:"absolute left-[65%] top-1/2 -translate-y-1/2 -translate-x-1/2 w-1.5 h-1.5 rounded-full bg-white shadow-md"})]})})}),(0,a.jsx)("style",{children:`
446                @keyframes ballMove {
447                    0% { transform: translate(-30%, -20%) scale(1); }
448                    25% { transform: translate(40%, -10%) scale(1.1); }
449                    50% { transform: translate(20%, 30%) scale(0.9); }
450                    75% { transform: translate(-10%, 15%) scale(1.2); }
451                    100% { transform: translate(-45%, 0%) scale(1); }
452                }
453                @keyframes floatBubble {
454                    0% { transform: translateY(0px) translateX(0px); }
455                    50% { transform: translateY(-8px) translateX(4px); }
456                    100% { transform: translateY(4px) translateX(-4px); }
457                }
458            `})]})}function c(e,t){if("1"===t||"2"===t)switch(e){case"2":return{t:"HT 1",live:!0,sc:!0};case"3":return{t:"Giữa giờ",live:!0,sc:!0};case"4":return{t:"HT 2",live:!0,sc:!0};case"5":return{t:"Hiệp phụ",live:!0,sc:!0};case"7":return{t:"Penalty",live:!0,sc:!0};case"8":case"9":return{t:"Kết th\xfac",live:!1,sc:!0};default:return{t:"Chưa bắt đầu",live:!1,sc:!1}}
458return["51","52","53","54","55"].includes(e)?{t:`Set ${e-50}`,live:!0,sc:!0}:["100","90","110"].includes(e)?{t:"KT",live:!1,sc:!0}:"0"===e||"1"===e?{t:"Chưa bắt đầu",live:!1,sc:!1}:{t:"LIVE",live:!0,sc:!0}}function d(e){let t=(e||"").split(/[\s-]+/).slice(0,2).map(e=>e[0]||"").join("").toUpperCase()||"??";return`data:image/svg+xml,${encodeURIComponent(`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 80 80"><rect width="80" height="80" rx="20" fill="#1a1c25"/><text x="40" y="47" font-size="20" font-family="Arial" font-weight="700" text-anchor="middle" fill="#666">${t}</text></svg>`)}`}function x(e){let t=new Date(1e3*parseInt(e||"0",10));return{hm:t.toLocaleTimeString("vi-VN",{hour:"2-digit",minute:"2-digit",timeZone:"Asia/Ho_Chi_Minh"}),dm:t.toLocaleDateString("vi-VN",{day:"2-digit",month:"2-digit",timeZone:"Asia/Ho_Chi_Minh"}),full:t.toLocaleDateString("vi-VN",{day:"2-digit",month:"2-digit",year:"numeric",timeZone:"Asia/Ho_Chi_Minh"})}}let h="max-w-[1200px]";function m({matchData:e,relatedMatches:t,matchDetails:s,standings:r,brandingNameUpper:i}){let p,u,g,j,v,y,[C,S]=(0,l.useState)("odds"),L=e?.match_data?.anchors||[],[$,F]=(0,l.useState)(!1),[T,A]=(0,l.useState)(!1),[M,H]=(0,l.useState)(null),[D,B]=(0,l.useState)(!1),z=(0,l.useRef)(0);(0,l.useEffect)(()=>{if(!e?.has_live||"1"!==e.has_live||0===L.length)return;let t=!1;B(!0);let s=async t=>{let s=t?.uid,a=`/api/socolive/proxy-stream?url=${encodeURIComponent(`https://live.inplyr.com/${s?`room/${s}`:`default/${e.id}`}.m3u8`)}`;try{let e=await fetch(a,{method:"GET",cache:"no-store"});if(!e.ok)return null;let s=(await e.text()).split("\n").filter(e=>e.trim()&&!e.startsWith("#"));if(0===s.length)return null;return(await fetch(s[0],{method:"HEAD",cache:"no-store"})).ok?t:null}catch{return null}};return Promise.all(L.map(e=>s(e))).then(e=>{if(t)return;let s=e.find(e=>null!==e);s?(H(s),F(!0),A(!1)):(H(L[0]),A(!0)),B(!1)}),()=>{t=!0}},[e?.has_live,L.length]),(0,l.useEffect)(()=>{if(!T||D||z.current>=20)return;let t=setTimeout(()=>{z.current++,A(!1),B(!0);let t=async t=>{let s=t?.uid,a=`/api/socolive/proxy-stream?url=${encodeURIComponent(`https://live.inplyr.com/${s?`room/${s}`:`default/${e.id}`}.m3u8`)}`;try{let e=await fetch(a,{method:"GET",cache:"no-store"});if(!e.ok)return null;let s=(await e.text()).split("\n").filter(e=>e.trim()&&!e.startsWith("#"));if(0===s.length)return null;return(await fetch(s[0],{method:"HEAD",cache:"no-store"})).ok?t:null}catch{return null}};Promise.all(L.map(e=>t(e))).then(e=>{let t=e.find(e=>null!==e);t?(H(t),F(!0),A(!1)):A(!0),B(!1)})},15e3);return()=>clearTimeout(t)},[T,D]);let[I,R]=(0,l.useState)(null),U=e?.post_name||e?.ls_id||e?.id;if(window.location.origin,(0,l.useEffect)(()=>{if(!U)return;let e=setInterval(async()=>{try{let e=await fetch(`/api/klivevip/match/${U}`,{cache:"no-store"});if(e.ok){let t=await e.json();R(t?.match??null)}}catch{}},1e4);return()=>clearInterval(e)},[U]),!e)return(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center py-32 gap-4",children:[(0,a.jsx)("span",{className:"text-[#64748B] text-lg",children:"Kh\xf4ng t\xecm thấy trận đấu"}),(0,a.jsx)("a",{href:"/",className:"text-[#4681E8] hover:underline text-sm",children:"← Quay lại"})]});let G=I?{...e,...I}:e,P=G?.has_live==="1"&&L.length>0,K=c(G.status_id,G.sport_id),V=$&&M&&!T&&!D,W=P&&(D||T&&K.live&&z.current<20),O=!P||T&&!W&&!D,q=!K.live&&"8"!==String(G.status_id)&&"9"!==String(G.status_id),{hm:X,full:Y}=x(G.time),Z=G.source_card_meta?.league_label||G.match_data?.competition_vi||G.match_data?.competition_full||"",Q=G.match_data?.stage_label||G.source_card_meta?.stage_label||"",J=G.home_logo||d(G.home_name),ee=G.away_logo||d(G.away_name),et=e=>t=>{t.target.src=d(e)};return(0,a.jsxs)("div",{className:"w-full bg-white min-h-screen text-slate-600 font-sans pb-16",children:[(0,a.jsx)("div",{className:"w-full border-b border-slate-200 bg-white",children:(0,a.jsxs)("div",{className:`${h} mx-auto px-4 py-3 flex items-center justify-between`,children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 text-[13px] font-bold",children:[(0,a.jsx)("span",{className:"text-[#4681E8] uppercase tracking-wide",children:Z}),Q&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"text-slate-300",children:"•"}),(0,a.jsx)("span",{className:"text-slate-600",children:Q})]})]}),(0,a.jsx)("div",{className:"text-[12px] font-mono text-slate-400 hidden sm:block",children:Y})]})}),(0,a.jsxs)("div",{className:`${h} mx-auto px-0 md:px-4 py-0 md:py-6 flex flex-col lg:flex-row gap-4 lg:gap-6`,children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0 flex flex-col gap-4 lg:gap-6",children:[(0,a.jsxs)("div",{className:"w-full relative bg-[#000000] rounded-none md:rounded-2xl overflow-hidden shadow-[0_10px_40px_rgba(0,0,0,0.5)] border-y md:border border-slate-200",children:[(0,a.jsx)("div",{className:"relative w-full aspect-video bg-[#000000] group z-10",children:V?(0,a.jsx)(n,{src:`/api/klivevip/proxy-stream?url=${encodeURIComponent(`https://live.inplyr.com/${M?.uid&&"default"!==M.uid?`room/${M.uid}`:`default/${G.id}`}.m3u8`)}`,autoPlay:!0,onError:()=>A(!0)}):O?(0,a.jsx)(o,{homeName:G.home_name,awayName:G.away_name,homeLogo:G.home_logo,awayLogo:G.away_logo,homeScore:K.sc?G.home_score:"0",awayScore:K.sc?G.away_score:"0",statusText:K.t,timeText:G.time_text||X,isLive:K.live,sportId:G.sport_id,matchId:G.ls_id||G.id,kickoffMs:1e3*Number(G?.time||0),isPreMatch:q}):(0,a.jsxs)("div",{className:"absolute inset-0 z-10 flex flex-col items-center justify-center p-4 lg:p-10",children:[(0,a.jsxs)("div",{className:"absolute inset-0 flex justify-between items-center opacity-[0.03] pointer-events-none px-4 lg:px-20 overflow-hidden",children:[(0,a.jsx)("img",{src:J,alt:"",className:"w-1/2 max-w-[400px] blur-[10px]",loading:"lazy",decoding:"async"}),(0,a.jsx)("img",{src:ee,alt:"",className:"w-1/2 max-w-[400px] blur-[10px]",loading:"lazy",decoding:"async"})]}),P&&!T&&(0,a.jsx)("button",{onClick:()=>F(!0),className:"group mb-4 sm:mb-8 w-16 h-16 md:w-20 md:h-20 rounded-full bg-[#4681E8] flex items-center justify-center hover:bg-[#55CAF1] transition-all shadow-[0_0_30px_rgba(70,129,232,0.5)] curs
458or-pointer z-20",children:(0,a.jsx)("svg",{className:"w-8 h-8 md:w-10 md:h-10 text-white ml-1.5 md:ml-2 group-hover:scale-110 transition-transform",viewBox:"0 0 24 24",fill:"currentColor",children:(0,a.jsx)("path",{d:"M8 5v14l11-7z"})})}),(0,a.jsxs)("div",{className:"grid grid-cols-[1fr_auto_1fr] items-center w-full max-w-[800px] gap-2 lg:gap-8 z-20",children:[(0,a.jsxs)("div",{className:"flex flex-col items-center gap-2 lg:gap-4",children:[(0,a.jsx)("img",{src:J,alt:G.home_name,className:"w-16 h-16 sm:w-24 sm:h-24 lg:w-32 lg:h-32 object-contain drop-shadow-[0_10px_20px_rgba(0,0,0,0.8)]",onError:et(G.home_name),loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-[#FFFFFF] text-xs sm:text-base lg:text-lg font-black text-center line-clamp-2 uppercase tracking-wide",children:G.home_name})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-2 lg:gap-3",children:[K.sc?(0,a.jsxs)("div",{className:"flex items-center gap-3 lg:gap-6 bg-white/90 backdrop-blur-md px-4 py-2 lg:px-8 lg:py-4 rounded-2xl border border-slate-200 shadow-2xl",children:[(0,a.jsx)("span",{className:"text-[#4681E8] text-[32px] sm:text-[48px] lg:text-[64px] font-black leading-none",children:G.home_score}),(0,a.jsx)("span",{className:"text-slate-300 text-[20px] lg:text-[28px] font-light",children:":"}),(0,a.jsx)("span",{className:"text-[#4681E8] text-[32px] sm:text-[48px] lg:text-[64px] font-black leading-none",children:G.away_score})]}):(0,a.jsx)("div",{className:"text-[#FFFFFF] text-[32px] sm:text-[48px] lg:text-[56px] font-black tracking-widest leading-none drop-shadow-xl",children:X}),(0,a.jsxs)("span",{className:`inline-flex items-center gap-2 rounded-full px-3 py-1 lg:px-5 lg:py-1.5 text-[10px] lg:text-[12px] font-bold tracking-widest uppercase ${K.live?"bg-[#4681E8] text-white shadow-[0_0_20px_rgba(70,129,232,0.6)]":"bg-white text-slate-600 border border-slate-200"}`,children:[K.live&&(0,a.jsx)("span",{className:"w-2 h-2 rounded-full bg-white animate-pulse"}),K.t,G.time_text?` : ${G.time_text}`:""]})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-2 lg:gap-4",children:[(0,a.jsx)("img",{src:ee,alt:G.away_name,className:"w-16 h-16 sm:w-24 sm:h-24 lg:w-32 lg:h-32 object-contain drop-shadow-[0_10px_20px_rgba(0,0,0,0.8)]",onError:et(G.away_name),loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-[#FFFFFF] text-xs sm:text-base lg:text-lg font-black text-center line-clamp-2 uppercase tracking-wide",children:G.away_name})]})]})]})}),L.length>0&&(0,a.jsxs)("div",{className:"w-full bg-white border-t border-slate-200 px-3 lg:px-6 py-2.5 lg:py-4 flex items-center gap-2 lg:gap-4 overflow-x-auto z-20",children:[(0,a.jsx)("span",{className:"text-[10px] lg:text-[11px] text-slate-600 uppercase font-bold tracking-widest shrink-0 mr-1 lg:mr-2",children:"CHỌN K\xcaNH TRUYỀN:"}),L.map((e,t)=>(0,a.jsxs)("button",{onClick:()=>{H(e),F(!0),A(!1)},className:`shrink-0 flex items-center gap-1.5 lg:gap-2 rounded-full px-3 py-1.5 lg:px-5 lg:py-2 text-[11px] lg:text-[13px] font-bold transition-all ${M?.uid===e.uid&&!T?"bg-[#4681E8]/10 border border-[#4681E8] text-[#4681E8] shadow-[0_0_15px_rgba(70,129,232,0.2)]":"bg-white border border-slate-200 text-slate-600 hover:text-[#4681E8] hover:border-[#4681E8]/50"}`,children:[(0,a.jsx)("span",{className:`w-1.5 h-1.5 lg:w-2 lg:h-2 rounded-full ${M?.uid===e.uid&&!T?"bg-[#4681E8] animate-pulse":"bg-transparent"}`}),"BLV ",e.nickName||`K\xeanh ${t+1}`]},e.uid||t))]})]}),(p=(()=>{let e=s?.stats;if(!e)return!1;let t=null;return Array.isArray(e)&&e.length>0?t=e[0]:e?.results?.[0]?t=e.results[0]:e?.stats_full_time&&(t=e),!!t&&!!(t.stats_full_time?.length>0||t.stats_haft_time?.length>0||t.stats_half_time?.length>0||t.stats?.length>0)})(),u=!!(s?.lineup&&(Array.isArray(s.lineup)?s.lineup.length>0:s.lineup.home||s.lineup.away)),g=!!(s?.events&&(Array.isArray(s.events)?s.events.length>0:s.events.incidents?.length>0||s.events.data?.length>0)),j=!!(r&&(Array.isArray(r)?r.length>0:r.data?.length>0)),(y=(v=[{id:"stats",label:"THỐNG K\xca",show:p},{id:"lineup",label:"ĐỘI H\xccNH",show:u},{id:"events",label:"DIỄN BIẾN",show:g},{id:"standings",label:"BẢNG XH",show:j},{id:"odds",label:"TỶ LỆ K\xc8O",show:!!(s?.odds&&Array.isArray(s.odds)&&s.odds.length>0)}].filter(e=>e.show)).find(e=>e.id===C)?C:v[0]?.id||"odds")!==C&&setTimeout(()=>S(y),0),v.length>0?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"bg-white rounded-2xl p-2 border border-slate-200 flex overflow-x-auto gap-2 shadow-[0_4px_15px_rgba(0,0,0,0.08)] mx-4 md:mx-0",children:v.map(({id:e,label:t})=>(0,a.jsx)("button",{onClick:()=>S(e),className:`flex-1 min-w-[100px] py-2.5 sm:py-3 text-[10px] sm:text-[12px] font-black uppercase tracking-widest rounded-xl transition-all ${y===e?"bg-[#4681E8]/10 text-[#4681E8] border border-[#4681E8]/30 shadow-inner":"text-slate-500 hover:text-[#4681E8] hover:bg-[#4681E8]/5 border border-transparent"}`,children:t},e))}),(0,a.jsxs)("div",{className:"bg-white rounded-2xl border border-slate-200 overflow-hidden shadow-[0_4px_15px_rgba(0,0,0,0.08)] min-h-[400px] mx-4 md:mx-0",children:["stats"===y&&(0,a.jsx)(b,{matchDetails:s}),"lineup"===y&&(0,a.jsx)(f,{matchDetails:s}),"events"===y&&(0,a.jsx)(_,{events:s?.events}),"standings"===y&&(0,a.jsx)(k,{standings:r}),"odds"===y&&(0,a.jsx)(E,{odds:s?.odds})]})]}):null),t.length>0&&(0,a.jsxs)("div",{className:"mt-4 mx-4 md:mx-0",children:[(0,a.jsxs)("h2",{className:"px-1 py-4 text-sm sm:text-base font-black text-slate-800 uppercase flex items-center gap-3 tracking-widest border-b border-slate-100 mb-4",children:[(0,a.jsx)("span",{className:"w-1 h-5 bg-[#4681E8] rounded-sm shadow-[0_0_8px_#4681E8]"}),"TRẬN ĐẤU C\xd9NG GIẢI"]}),(0,a.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3 sm:gap-4",children:t.slice(0,4).map(e=>(0,a.jsx)(w,{m:e},e.id))})]})]}),(0,a.jsx)("div",{className:"w-full lg:w-[350px] xl:w-[400px] shrink-0 px-4 md:px-0",children:(0,a.jsxs)("div",{className:"bg-white border border-slate-200 rounded-2xl overflow-hidden flex flex-col shadow-[0_10px_30px_rgba(0,0,0,0.1)] lg:sticky lg:top-8 h-[600px] lg:h-[c
458alc(100vh-100px)] lg:max-h-[850px]",children:[(0,a.jsxs)("div",{className:"px-5 py-4 border-b border-slate-200 flex items-center justify-between bg-white",children:[(0,a.jsxs)("h3",{className:"text-slate-800 text-sm font-black uppercase tracking-widest flex items-center gap-2",children:[(0,a.jsx)("span",{className:"w-2.5 h-2.5 rounded-full bg-[#4681E8] shadow-[0_0_10px_rgba(70,129,232,0.4)]"}),"PH\xd2NG CHAT"]}),(0,a.jsxs)("span",{className:"text-[10px] bg-white px-3 py-1.5 rounded-full text-[#4681E8] font-mono border border-[#4681E8]/30 shadow-inner tracking-widest flex items-center gap-1.5",children:[(0,a.jsx)("svg",{className:"w-3 h-3",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 10l4.553-2.276A1 1 0 0121 8.618v6.764a1 1 0 01-1.447.894L15 14M5 18h8a2 2 0 002-2V8a2 2 0 00-2-2H5a2 2 0 00-2 2v8a2 2 0 002 2z"})}),L.length," BLV"]})]}),(0,a.jsx)("div",{className:"flex-1 bg-[#FFFFFF]/40 min-h-0 chat-container-wrapper",children:(0,a.jsx)(N,{anchors:L,selectedAnchor:M})})]})})]})]})}let p={25:"KIỂM SO\xc1T B\xd3NG",24:"CHUYỀN CH\xcdNH X\xc1C",23:"TỔNG SỐ ĐƯỜNG CHUYỀN",22:"TẤN C\xd4NG",21:"T.C\xd4NG NGUY HIỂM",2:"S\xdaT TR\xdaNG Đ\xcdCH",37:"PHẠT G\xd3C",28:"N\xc9M BI\xcaN",8:"VIỆT VỊ",3:"THẺ V\xc0NG",4:"THẺ ĐỎ",5:"S\xdaT PENALTY",29:"PHẠM LỖI",26:"Đ\xc1NH ĐẦU",27:"CỨU THUA",1:"B\xc0N THẮNG",7:"PHẢN LƯỚI"},u=[25,21,22,24,2,23,4,3,37,28,8,5,29],g="https://cdn.sportdb.live/upload/team/";function b({matchDetails:e}){let[t,s]=(0,l.useState)("full"),r=e?.stats,n=e?.lineup,i=n?.match?.home_team,o=n?.match?.away_team,c=null;Array.isArray(r)&&r.length>0?c=r[0]:r?.results?.[0]?c=r.results[0]:r?.stats_full_time&&(c=r);let d={full:c?.stats_full_time||[],h1:c?.stats_haft_time||c?.stats_half_time||[],h2:c?.stats_haft_time_2nd_half||[]}[t]||[];if(!c||0===d.length)return(0,a.jsx)(j,{text:"Thống k\xea sẽ được cập nhật khi trận đấu bắt đầu"});let x=[...d].sort((e,t)=>{let s=u.indexOf(e.type),a=u.indexOf(t.type);return(-1===s?999:s)-(-1===a?999:a)});return(0,a.jsxs)("div",{className:"flex flex-col",children:[(i||o)&&(0,a.jsxs)("div",{className:"flex items-center justify-between px-4 py-3 border-b border-slate-100",children:[(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5 w-20",children:[i?.logo&&(0,a.jsx)("img",{src:g+i.logo,alt:i?.name||"Home team",className:"w-8 h-8 object-contain",onError:e=>e.target.style.display="none",loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-slate-600 text-[10px] font-medium text-center leading-tight",children:i?.name||""})]}),(0,a.jsx)("div",{className:"flex gap-1",children:[{k:"h1",l:"Hiệp 1"},{k:"h2",l:"Hiệp 2"},{k:"full",l:"Cả trận"}].map(({k:e,l})=>(0,a.jsx)("button",{onClick:()=>s(e),className:`px-2.5 py-1 text-[10px] font-bold rounded transition-all ${t===e?"bg-[#E11D48] text-white":"text-slate-400 hover:text-slate-600 bg-slate-100"}`,children:l},e))}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5 w-20",children:[o?.logo&&(0,a.jsx)("img",{src:g+o.logo,alt:o?.name||"Away team",className:"w-8 h-8 object-contain",onError:e=>e.target.style.display="none",loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-slate-600 text-[10px] font-medium text-center leading-tight",children:o?.name||""})]})]}),(0,a.jsx)("div",{className:"px-4 py-3 space-y-3",children:x.map(e=>{let t=p[e.type]||`Stat ${e.type}`,s=e.home,l=e.away,r=24===e.type||25===e.type,n=s+l,i=0===n?50:s/n*100,o=s>l,c=l>s;return(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"flex justify-between items-center mb-1.5",children:[(0,a.jsxs)("span",{className:`text-xs font-bold w-10 tabular-nums ${o?"text-slate-800":"text-slate-400"}`,children:[s,r?"%":""]}),(0,a.jsx)("span",{className:"text-slate-400 text-[10px] font-semibold tracking-wide uppercase",children:t}),(0,a.jsxs)("span",{className:`text-xs font-bold w-10 text-right tabular-nums ${c?"text-slate-800":"text-slate-400"}`,children:[l,r?"%":""]})]}),(0,a.jsxs)("div",{className:"flex gap-0.5 h-[5px]",children:[(0,a.jsx)("div",{className:"flex-1 rounded-l-full bg-white/[0.06] overflow-hidden flex justify-end",children:(0,a.jsx)("div",{className:`rounded-l-full transition-all duration-500 ${o?"bg-gradient-to-r from-[#E11D48]/60 to-[#E11D48]":"bg-gradient-to-r from-white/10 to-white/20"}`,style:{width:`${i}%`}})}),(0,a.jsx)("div",{className:"flex-1 rounded-r-full bg-white/[0.06] overflow-hidden",children:(0,a.jsx)("div",{className:`rounded-r-full transition-all duration-500 ${c?"bg-gradient-to-l from-[#E11D48]/60 to-[#E11D48]":"bg-gradient-to-l from-white/10 to-white/20"}`,style:{width:`${100-i}%`}})})]})]},e.type)})})]})}
458function f({matchDetails:e}){let[t,s]=(0,l.useState)("pitch"),r=e?.lineup,n=r?.lineup||r,i=n?.home||[],o=n?.away||[],c=r?.home_formation||"",d=r?.away_formation||"",x=r?.match?.home_team,h=r?.match?.away_team;if(0===i.length&&0===o.length)return(0,a.jsx)(j,{text:"Đội h\xecnh sẽ được c\xf4ng bố trước trận đấu 30 ph\xfat"});let m=e=>e.filter(e=>1===e.first),p=e=>e.filter(e=>1!==e.first),u=m(i),g=m(o),b=p(i),w=p(o);return(0,a.jsxs)("div",{className:"flex flex-col",children:[(0,a.jsxs)("div",{className:"flex items-center justify-center gap-1 px-3 py-2 border-b border-slate-100",children:[(0,a.jsx)("button",{onClick:()=>s("pitch"),className:`px-3 py-1.5 text-[10px] font-bold rounded transition-all ${"pitch"===t?"bg-[#E11D48] text-white":"text-slate-400 bg-slate-100"}`,children:"Đội h\xecnh xuất ph\xe1t"}),(0,a.jsx)("button",{onClick:()=>s("list"),className:`px-3 py-1.5 text-[10px] font-bold rounded transition-all ${"list"===t?"bg-[#E11D48] text-white":"text-slate-400 bg-slate-100"}`,children:"Đội h\xecnh dá»± bị"})]}),"pitch"===t?(0,a.jsx)("div",{className:"relative w-full",style:{aspectRatio:"68/105"},children:(0,a.jsxs)("div",{className:"absolute inset-0 bg-gradient-to-b from-[#1a5c2a] via-[#1e6b31] to-[#1a5c2a] rounded-2xl overflow-hidden",children:[(0,a.jsxs)("div",{className:"absolute inset-[3%] border border-white/20 rounded-lg",children:[(0,a.jsx)("div",{className:"absolute left-0 right-0 top-1/2 h-px bg-white/20"}),(0,a.jsx)("div",{className:"absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 w-[22%] aspect-square rounded-full border border-white/20"}),(0,a.jsx)("div",{className:"absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 w-1.5 h-1.5 bg-white/30 rounded-full"}),(0,a.jsx)("div",{className:"absolute top-0 left-1/2 -translate-x-1/2 w-[55%] h-[16%] border-l border-r border-white/20"}),(0,a.jsx)("div",{className:"absolute top-0 left-1/2 -translate-x-1/2 w-[25%] h-[6%] border-l border-r border-white/20"}),(0,a.jsx)("div",{className:"absolute bottom-0 left-1/2 -translate-x-1/2 w-[55%] h-[16%] border-t border-l border-r border-white/20"}),(0,a.jsx)("div",{className:"absolute bottom-0 left-1/2 -translate-x-1/2 w-[25%] h-[6%] border-t border-l border-r border-white/20"})]}),(0,a.jsx)("div",{className:"absolute top-1 left-2 text-[9px] text-[#F8FAFC]/50 font-bold z-10",children:x?.name||""}),(0,a.jsx)("div",{className:"absolute top-1 right-2 text-[9px] text-[#E11D48]/70 font-bold z-10",children:c}),(0,a.jsx)("div",{className:"absolute bottom-1 left-2 text-[9px] text-[#F8FAFC]/50 font-bold z-10",children:h?.name||""}),(0,a.jsx)("div",{className:"absolute bottom-1 right-2 text-[9px] text-[#E11D48]/70 font-bold z-10",children:d}),u.map((e,t)=>{let s=`${e.x||50}%`,l=`${(e.y||10)/2}%`,r="G"===e.position;return(0,a.jsxs)("div",{className:"absolute flex flex-col items-center z-10 -translate-x-1/2 -translate-y-1/2",style:{left:s,top:l},children:[(0,a.jsx)("div",{className:`w-6 h-6 rounded-full flex items-center justify-center text-[9px] font-black ${r?"bg-yellow-400 text-black":"bg-blue-600 text-[#F8FAFC]"} shadow-md border border-white/20`,children:e.shirt_number||""}),(0,a.jsx)("span",{className:"text-[7px] text-[#F8FAFC] font-semibold mt-0.5 text-center max-w-[48px] truncate drop-shadow-[0_1px_2px_rgba(0,0,0,0.8)]",children:(e.name||"").split(" ").slice(-2).join(" ")}),1===e.captain&&(0,a.jsx)("span",{className:"absolute -top-1 -right-1 text-[6px] text-yellow-400",children:"C"})]},`h-${t}`)}),g.map((e,t)=>{let s=`${100-(e.x||50)}%`,l=`${100-(e.y||10)/2}%`,r="G"===e.position;return(0,a.jsxs)("div",{className:"absolute flex flex-col items-center z-10 -translate-x-1/2 -translate-y-1/2",style:{left:s,top:l},children:[(0,a.jsx)("div",{className:`w-6 h-6 rounded-full flex items-center justify-center text-[9px] font-black ${r?"bg-yellow-400 text-black":"bg-orange-500 text-[#F8FAFC]"} shadow-md border border-white/20`,children:e.shirt_number||""}),(0,a.jsx)("span",{className:"text-[7px] text-[#F8FAFC] font-semibold mt-0.5 text-center max-w-[48px] truncate drop-shadow-[0_1px_2px_rgba(0,0,0,0.8)]",children:(e.name||"").split(" ").slice(-2).join(" ")}),1===e.captain&&(0,a.jsx)("span",{className:"absolute -top-1 -right-1 text-[6px] text-yellow-400",children:"C"})]},`a-${t}`)})]})}):(0,a.jsxs)("div",{className:"px-3 py-2 text-xs",children:[(0,a.jsxs)("div",{className:"flex justify-between font-bold text-slate-400 mb-1 uppercase tracking-wider text-[9px] px-1",children:[(0,a.jsx)("span",{children:"Đội chá»
458§ nh\xe0"}),(0,a.jsx)("span",{children:"Đội kh\xe1ch"})]}),Array.from({length:Math.max(b.length,w.length)}).map((e,t)=>{let s=b[t],l=w[t];return(0,a.jsxs)("div",{className:"flex justify-between items-center border-b border-slate-50 py-1.5",children:[(0,a.jsx)("div",{className:"flex items-center gap-1.5 w-1/2 min-w-0",children:s&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"text-[#E11D48] font-bold w-5 text-center shrink-0 text-[10px]",children:s.shirt_number||""}),(0,a.jsx)("span",{className:"text-slate-700 truncate text-[11px]",children:s.name||""})]})}),(0,a.jsx)("div",{className:"flex items-center gap-1.5 w-1/2 justify-end min-w-0",children:l&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"text-slate-700 truncate text-[11px] text-right",children:l.name||""}),(0,a.jsx)("span",{className:"text-[#E11D48] font-bold w-5 text-center shrink-0 text-[10px]",children:l.shirt_number||""})]})})]},t)})]})]})}function j({text:e}){return(0,a.jsx)("div",{className:"flex items-center justify-center py-10 text-slate-400 text-sm text-center",children:e})}function w({m:e}){let t=c(e.status_id,e.sport_id),{hm:s,dm:l}=x(e.time),r=e.source_card_meta?.league_label||e.match_data?.competition_vi||"";return(0,a.jsxs)("a",{href:`/match/${encodeURIComponent(e.post_name||e.id)}`,className:"flex items-center gap-3 rounded-2xl bg-white hover:bg-slate-50 border border-slate-100 hover:border-[#4681E8]/30 p-3 transition-all group",children:[(0,a.jsxs)("div",{className:"shrink-0 w-14 text-center",children:[(0,a.jsx)("div",{className:"text-[#E11D48] text-[11px] font-bold",children:s}),(0,a.jsx)("div",{className:"text-slate-400 text-[9px]",children:l})]}),(0,a.jsx)("div",{className:"w-px h-9 bg-slate-200 shrink-0"}),(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("div",{className:"text-slate-400 text-[9px] truncate mb-1",children:r}),(0,a.jsxs)("div",{className:"flex items-center gap-2 mb-0.5",children:[(0,a.jsx)("img",{src:e.home_logo||d(e.home_name),alt:e.home_name,className:"w-4 h-4 object-contain shrink-0",onError:t=>t.target.src=d(e.home_name),loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-slate-600 text-[12px] font-medium truncate",children:e.home_name})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("img",{src:e.away_logo||d(e.away_name),alt:e.away_name,className:"w-4 h-4 object-contain shrink-0",onError:t=>t.target.src=d(e.away_name),loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-slate-600 text-[12px] font-medium truncate",children:e.away_name})]})]}),t.sc?(0,a.jsxs)("span",{className:"text-slate-800 font-bold text-[14px] tabular-nums shrink-0",children:[e.home_score,"-",e.away_score]}):(0,a.jsx)("span",{className:"text-[10px] font-bold text-[#E11D48] bg-[#E11D48]/10 rounded px-2.5 py-1 group-hover:bg-[#E11D48]/15 transition shrink-0",children:"XEM NGAY"})]})}let v={0:{bg:"bg-white/10",text:"text-[#F8FAFC]/40",nameCls:"text-[#94A3B8]"},1:{bg:"bg-white/10",text:"text-[#F8FAFC]/50",nameCls:"text-[#94A3B8]"},2:{bg:"bg-green-900/50",text:"text-green-400",nameCls:"text-green-400"},3:{bg:"bg-yellow-900/40",text:"text-yellow-400",nameCls:"text-emerald-600 font-bold"},4:{bg:"bg-blue-900/40",text:"text-blue-400",nameCls:"text-blue-400 font-bold"},5:{bg:"bg-red-900/40",text:"text-red-400",nameCls:"text-red-400 font-bold"}};function N({anchors:e,selectedAnchor:t}){let[s,r]=(0,l.useState)([]),[n,i]=(0,l.useState)(!1),o=(0,l.useRef)(null),c=(0,l.useRef)(null),d=t?.roomNum;return(0,l.useEffect)(()=>{if(!d)return;r([]),i(!1);let e=new EventSource(`/api/chat/${d}`);return e.onopen=()=>i(!0),e.onmessage=e=>{try{let t=JSON.parse(e.data);if("connected"===t.type)return void i(!0);if("history"===t.type&&Array.isArray(t.messages))return void r(e=>[...t.messages,...e].slice(-200));t.user&&t.text&&r(e=>[...e,t].slice(-200))}catch{}},e.onerror=()=>i(!1),()=>{e.close(),i(!1)}},[d]),(0,l.useEffect)(()=>{requestAnimationFrame(()=>{let e=c.current;e&&(e.scrollTop=e.scrollHeight)})},[s.length]),(0,a.jsxs)("div",{className:"flex flex-col h-full bg-[#0F0F23]",children:[(0,a.jsxs)("div",{ref:c,className:"flex-1 min-h-0 px-3 py-2 flex flex-col gap-[3px] overflow-y-auto",style:{scrollbarWidth:"thin",scrollbarColor:"#444 transparent"},children:[(0,a.jsx)("div",{className:"text-center text-[10px] text-[#F8FAFC]/30 bg-slate-50/60 py-1.5 rounded-xl mb-1 sticky top-0 z-10 backdrop-blur-sm",children:n?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"inline-block h-1.5 w-1.5 rounded-full bg-green-400 animate-pulse mr-1"}),"Đang kết nối ph\xf2ng chat trá»±c tiếp"]}):d?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"inline-block h-1.5 w-1.5 rounded-full bg-yellow-400 animate-pulse mr-1"}),"Đang kết nối..."]}
458):"Ch\xe0o mừng bạn đến với ph\xf2ng chat"}),0===s.length&&n&&(0,a.jsx)("div",{className:"text-center text-[10px] text-[#F8FAFC]/20 py-4",children:"Chờ tin nhắn mới..."}),s.map((e,t)=>{var s;let l=(s=e.level)>=5?v[5]:v[s]||v[0];return 2===e.type||e.text?.includes("v\xe0o ph\xf2ng tr\xf2 chuyện")?(0,a.jsxs)("div",{className:"flex items-start gap-1.5 text-[11px] leading-relaxed py-[1px] opacity-60",children:[(0,a.jsx)("span",{className:"text-green-500/70 font-medium",children:"Hi"}),(0,a.jsxs)("span",{className:`shrink-0 inline-flex items-center px-1 py-[0.5px] rounded text-[8px] font-bold ${l.bg} ${l.text}`,children:["Lv",e.level]}),(0,a.jsxs)("span",{className:`font-bold ${l.nameCls}`,children:[e.user,":"]}),(0,a.jsx)("span",{className:"text-[#F8FAFC]/40",children:e.text})]},`${e.ts}-${t}`):(0,a.jsxs)("div",{className:"flex items-start gap-1.5 text-[11px] leading-relaxed py-[1px]",children:[(0,a.jsxs)("span",{className:`shrink-0 inline-flex items-center px-1 py-[0.5px] rounded text-[8px] font-bold ${l.bg} ${l.text}`,children:["Lv.",e.level]}),(0,a.jsxs)("span",{className:`font-bold shrink-0 ${l.nameCls}`,children:[e.user,":"]}),(0,a.jsx)("span",{className:"text-[#F8FAFC]/80 break-words min-w-0",children:e.text})]},`${e.ts}-${t}`)}),(0,a.jsx)("div",{ref:o})]}),(0,a.jsxs)("div",{className:"shrink-0 px-3 py-2 bg-[#0F0F23] border-t border-white/[0.04] space-y-2",children:[(0,a.jsx)("div",{className:"flex items-center justify-center gap-3 text-[#F8FAFC]/20 text-[10px]",children:(0,a.jsx)("span",{className:"flex items-center gap-1",children:(0,a.jsx)("svg",{className:"w-3 h-3",viewBox:"0 0 24 24",fill:"currentColor",children:(0,a.jsx)("path",{d:"M12 4.5C7 4.5 2.7 7.6 1 12c1.7 4.4 6 7.5 11 7.5s9.3-3.1 11-7.5c-1.7-4.4-6-7.5-11-7.5zm0 12.5c-2.8 0-5-2.2-5-5s2.2-5 5-5 5 2.2 5 5-2.2 5-5 5zm0-8c-1.7 0-3 1.3-3 3s1.3 3 3 3 3-1.3 3-3-1.3-3-3-3z"})})})}),(0,a.jsxs)("div",{className:"flex bg-[#0F0F23] rounded-2xl overflow-hidden border border-white/[0.08]",children:[(0,a.jsx)("input",{type:"text",placeholder:"Đăng nhập để c\xf9ng chat nh\xe9",disabled:!0,className:"flex-1 bg-transparent px-3 py-2 text-[11px] text-[#F8FAFC] outline-none placeholder:text-[#F8FAFC]/30 disabled:opacity-50"}),(0,a.jsx)("button",{disabled:!0,className:"px-4 text-[11px] font-bold bg-[#E11D48] text-black disabled:bg-white/10 disabled:text-[#F8FAFC]/20 transition-colors",children:"Gửi"})]})]})]})}let y={1:{icon:"⚽",label:"B\xe0n thắng",color:"text-green-400"},2:{icon:"\uD83C\uDD7F️",label:"Phạt đền",color:"text-green-400"},3:{icon:"\uD83D\uDFE1",label:"Thẻ v\xe0ng",color:"text-yellow-400"},4:{icon:"\uD83D\uDFE1\uD83D\uDFE1",label:"Thẻ v\xe0ng 2",color:"text-emerald-600"},5:{icon:"\uD83D\uDD34",label:"Thẻ đỏ",color:"text-red-500"},7:{icon:"\uD83D\uDD04",label:"Phản lưới",color:"text-orange-400"},8:{icon:"\uD83C\uDFE5",label:"Chấn thương",color:"text-[#94A3B8]"},9:{icon:"\uD83D\uDD04",label:"Thay người",color:"text-blue-400"},11:{icon:"⏱️",label:"Hiệp 2",color:"text-[#F8FAFC]/40"},15:{icon:"\uD83E\uDD45",label:"Pen trượt",color:"text-red-400"},19:{icon:"⏱️",label:"Kết th\xfac hiệp",color:"text-[#F8FAFC]/30"},21:{icon:"\uD83C\uDFC6",label:"VAR",color:"text-purple-400"}};function _({events:e}){let t=e?.incidents||e?.events||[];return t&&0!==t.length?(0,a.jsx)("div",{className:"flex flex-col",children:t.map((e,t)=>{let s=y[e.type]||{icon:"•",label:`Event ${e.type}`,color:"text-[#F8FAFC]/50"},l=1===e.position,r=2===e.position,n=e.add_time?`+${e.add_time}`:"",i=`${e.time}'${n}`;return l||r||11!==e.type&&19!==e.type?9===e.type?(0,a.jsxs)("div",{className:`flex items-center gap-2 border-b border-slate-50 p-3 text-xs ${l?"":"flex-row-reverse"}`,children:[(0,a.jsx)("span",{className:"text-slate-400 w-10 text-center shrink-0 text-[10px]",children:i}),(0,a.jsxs)("div",{className:`flex-1 flex flex-col gap-0.5 ${l?"items-start":"items-end"}`,children:[(0,a.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,a.jsx)("span",{className:"text-green-400 text-[10px]",children:"▲"}),(0,a.jsx)("span",{className:"text-[#F8FAFC]/80 text-[11px]",children:e.in_player_name||""})]}),(0,a.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,a.jsx)("span",{className:"text-red-400 text-[10px]",children:"▼"}),(0,a.jsx)("span",{className:"text-[#F8FAFC]/40 text-[11px]",children:e.out_player_name||""})]})]})]},t):(0,a.jsxs)("div",{className:`flex items-center gap-2 border-b border-slate-50 p-3 text-xs ${l?"":"flex-row-reverse"}`,children:[(0,a.jsx)("span",{className:"text-slate-400 w-10 text-center shrink-0 text-[10px]",children:i}),(0,a.jsx)("span",{className:`shrink-0 text-sm ${s.color}`,children:s.icon}),(0,a.jsxs)("div",{className:`flex-1 min-w-0 ${l?"text-left":"text-right"}`,children:[(0,a.jsx)("span",{className:"text-slate-700 text-[11px]",children:e.player_name||""}),e.assist1_name&&(0,a.jsxs)("span",{className:"text-slate-400 text-[10px] ml-1",children:["(kiến tạo: ",e.assist1_name,")"]}),1===e.type&&void 0!==e.home_score&&(0,a.jsxs)("span",{className:"text-[#E11D48] font-bold text-[11px] ml-2",children:[e.home_score," - ",e.away_score]})]})]},t):(0,a.jsx)("div",{className:"flex items-center justify-center py-2 border-b border-slate-50 bg-slate-50",children:(0,a.jsxs)("span",{className:"text-slate-400 text-[10px] uppercase tracking-wider",children:[s.icon," ",s.label," — ",i]})},t)})}):(0,a.jsx)(j,{text:"Diễn biến trận đấu sẽ được cập nhật trực tiếp tại đ\xe2y"})}function k({standings:e}
458){return e&&e.teams&&0!==e.teams.length?(0,a.jsxs)("div",{className:"w-full text-[10px]",children:[(0,a.jsxs)("div",{className:"grid grid-cols-[20px_1fr_24px_24px_32px] bg-slate-50 p-2 text-slate-400 uppercase font-bold sticky top-0",children:[(0,a.jsx)("span",{className:"text-center",children:"#"}),(0,a.jsx)("span",{children:"Team"}),(0,a.jsx)("span",{className:"text-center",children:"T"}),(0,a.jsx)("span",{className:"text-center",children:"B"}),(0,a.jsx)("span",{className:"text-center whitespace-nowrap",children:"Đ"})]}),e.teams.slice(0,15).map((e,t)=>{let s=!!e.data,l=s?parseFloat(e.data[0]):e.rank||t+1,r=s?e.data[1]:e.target_name,n=s?e.data[7]:e.points,i=s?e.data[3]:e.won,o=s?e.data[5]:e.loss;return(0,a.jsxs)("div",{className:"grid grid-cols-[20px_1fr_24px_24px_32px] items-center p-2 border-b border-slate-50 hover:bg-slate-50 transition-colors",children:[(0,a.jsx)("span",{className:"text-center text-slate-500",children:l}),(0,a.jsxs)("div",{className:"flex items-center gap-1.5 min-w-0 pr-2",children:[e.team_logo&&(0,a.jsx)("img",{src:e.team_logo,className:"w-3.5 h-3.5 object-contain",alt:r||"Team logo",loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-slate-700 font-medium truncate",children:r})]}),(0,a.jsx)("span",{className:"text-center text-slate-500",children:i}),(0,a.jsx)("span",{className:"text-center text-slate-500",children:o}),(0,a.jsx)("span",{className:"text-center text-[#E11D48] font-bold",children:n})]},r)})]}):(0,a.jsx)(j,{text:"Bảng xếp hạng sẽ được cập nhật"})}function E({odds:e}){let t=Array.isArray(e)?e:[],s=["2","4","3","16"];function l(e){for(let a of s){let s=t.find(t=>t.odds_type===e&&String(t.company_id)===a);if(s?.odds_info?.length)return s}return t.find(t=>t.odds_type===e&&t.odds_info?.length>0)}function r(e,t){let s=e?.odds_info;if(!s?.length)return["-","-","-"];let a="opening"===t?s.length-1:0;if(!s?.length||!s[a])return["-","-","-"];let l=s[a][2];if("string"!=typeof l)return["-","-","-"];let r=l.split(",");return[r[0]||"-",r[1]||"-",r[2]||"-"]}let n=l("asia"),i=l("eu"),o=l("bs"),c=l("cr"),d=r(n,"opening"),x=r(n,"latest"),h=r(i,"opening"),m=r(i,"latest"),p=r(o,"opening"),u=r(o,"latest"),g=r(c,"opening"),b=r(c,"latest"),f=({children:e})=>(0,a.jsx)("th",{className:"px-2 py-2 text-[9px] sm:text-[10px] font-bold uppercase tracking-wider text-slate-500 border-b border-slate-100 text-center",children:e}),j=({children:e,color:t})=>(0,a.jsx)("td",{className:`px-2 py-2.5 text-center text-[11px] sm:text-xs font-bold ${t||"text-slate-600"} border-b border-slate-50`,children:e});return(0,a.jsxs)("div",{className:"overflow-x-auto",children:[(0,a.jsxs)("table",{className:"w-full min-w-[600px]",children:[(0,a.jsxs)("thead",{children:[(0,a.jsxs)("tr",{className:"bg-slate-50",children:[(0,a.jsx)("th",{className:"px-4 py-2 text-left border-b border-slate-100",rowSpan:2,children:(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("div",{className:"w-7 h-7 rounded bg-gradient-to-br from-[#1d4ed8] to-[#3b82f6] flex items-center justify-center text-white text-[9px] font-black shadow-sm",children:"B"}),(0,a.jsx)("span",{className:"text-slate-600 text-[11px] font-bold tracking-wider",children:"SPORT"})]})}),(0,a.jsx)("th",{colSpan:3,className:"px-1 py-1.5 text-center text-[9px] sm:text-[10px] font-bold uppercase tracking-wider text-[#4681E8] border-b border-l border-slate-100",children:"CƯỢC CH\xc2U \xc1"}),(0,a.jsx)("th",{colSpan:3,className:"px-1 py-1.5 text-center text-[9px] sm:text-[10px] font-bold uppercase tracking-wider text-[#4681E8] border-b border-l border-slate-100",children:"CƯỢC CH\xc2U \xc2U"}),(0,a.jsx)("th",{colSpan:3,className:"px-1 py-1.5 text-center text-[9px] sm:text-[10px] font-bold uppercase tracking-wider text-[#4681E8] border-b border-l border-slate-100",children:"T\xc0I XỈU"}),(0,a.jsx)("th",{colSpan:3,className:"px-1 py-1.5 text-center text-[9px] sm:text-[10px] font-bold uppercase tracking-wider text-[#4681E8] border-b border-l border-slate-100",children:"K\xc8O G\xd3C"})]}),(0,a.jsxs)("tr",{className:"bg-slate-50",children:[(0,a.jsx)(f,{children:"CHỦ"}),(0,a.jsx)(f,{children:"CHẤP"}),(0,a.jsx)(f,{children:"KH\xc1CH"}),(0,a.jsx)(f,{children:"CHỦ"}),(0,a.jsx)(f,{children:"H\xd2A"}),(0,a.jsx)(f,{children:"KH\xc1CH"}),(0,a.jsx)(f,{children:"T\xc0I"}),(0,a.jsx)(f,{children:"TỶ LỆ"}),(0,a.jsx)(f,{children:"XỈU"}),(0,a.jsx)(f,{children:"T\xc0I"}),(0,a.jsx)(f,{children:"TỶ LỆ"}),(0,a.jsx)(f,{children:"XỈU"})]})]}),(0,a.jsxs)("tbody",{children:[(0,a.jsxs)("tr",{className:"hover:bg-slate-50 transition-colors",children:[(0,a.jsx)("td",{className:"px-4 py-2.5 text-[11px] sm:text-xs text-slate-500 font-medium border-b border-slate-50",children:"Tỷ Lệ Mở Cược"}),(0,a.jsx)(j,{children:d[0]}),(0,a.jsx)(j,{color:"text-red-400",children:d[1]}),(0,a.jsx)(j,{children:d[2]}),(0,a.jsx)(j,{children:h[0]}),(0,a.jsx)(j,{children:h[1]}),(0,a.jsx)(j,{children:h[2]}),(0,a.jsx)(j,{children:p[0]}),(0,a.jsx)(j,{children:p[1]}),(0,a.jsx)(j,{children:p[2]}),(0,a.jsx)(j,{children:g[0]}),(0,a.jsx)(j,{children:g[1]}),(0,a.jsx)(j,{children:g[2]})]}),(0,a.jsxs)("tr",{className:"hover:bg-slate-50 transition-colors",children:[(0,a.jsx)("td",{className:"px-4 py-2.5 text-[11px] sm:text-xs text-slate-500 font-medium border-b border-slate-50",children:"Tỷ Lệ Trước Trận"}),(0,a.jsx)(j,{children:x[0]}),(0,a.jsx)(j,{color:"text-red-400",children:x[1]}),(0,a.jsx)(j,{children:x[2]}),(0,a.jsx)(j,{children:m[0]}),(0,a.jsx)(j,{children:m[1]}),(0,a.jsx)(j,{children:m[2]}),(0,a.jsx)(j,{children:u[0]}),(0,a.jsx)(j,{children:u[1]}),(0,a.jsx)(j,{children:u[2]}),(0,a.jsx)(j,{children:b[0]}),(0,a.jsx)(j,{children:b[1]}),(0,a.jsx)(j,{children:b[2]})]}),(0,a.jsxs)("tr",{className:"hover:bg-slate-50 transition-colors bg-white",children:[(0,a.jsxs)("td",{className:"px-4 py-2.5 text-[11px] sm:text-xs text-slate-700 font-bold flex items-center gap-1.5 border-b border-slate-50",children:["Live ",(0,a.jsx)("span",{className:"w-1.5 h-1.5 rounded-full bg-red-500 animate-pulse"})]}),(0,a.jsx)(j,{color:"text-green-400",children:x[0]}),(0,a.jsx)(j,{color:"text-red-400",children:x[1]}),(0,a.jsx)(j,{color:"text-green-400",children:x[2]}),(0,a.jsx)(j,{color:"text-green-400",children:m[0]}),(0,a.jsx)(j,{color:"text-green-400",children:m[1]}),(0,a.jsx)(j,{color:"text-green-400",children:m[2]}),(0,a.jsx)(j,{color:"text-green-400",children:u[0]}),(0,a.jsx)(j,{children:u[1]}),(0,a.jsx)(j,{color:"text-green-400",children:u[2]}),(0,a.jsx)(j,{color:"text-green-400",children:b[0]}),(0,a.jsx)(j,{children:b[1]}),(0,a.jsx)(j,{color:"text-green-400",children:b[2]})]})]})]}),(0,a.jsx)("p",{className:"text-center text-slate-400 text-[10px] py-2.5 border-t border-slate-100",children:"Tỷ lệ k\xe8o sẽ được cập nhật gần giờ thi đấu"})]})}},36493:()=>{},36627:(e,t,s)=>{"use strict";s.d(t,{M:()=>r});var a=s(68019),l=s(70508);
458function r({eyebrow:e,title:t,titleAddon:s,rightSlot:n,className:i}){return(0,a.jsx)("div",{className:(0,l.cn)("relative mb-5 overflow-hidden border-b border-slate-200",i),children:(0,a.jsxs)("div",{className:"flex items-center justify-between px-1 py-4 min-h-[56px]",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 min-w-0",children:[(0,a.jsx)("span",{className:"h-8 w-1 shrink-0 rounded-sm bg-gradient-to-b from-[#4681E8] to-[#55CAF1] shadow-[0_0_10px_rgba(70,129,232,0.5)]"}),(0,a.jsxs)("div",{className:"min-w-0",children:[e&&(0,a.jsx)("div",{className:"text-[10px] font-bold uppercase tracking-[0.2em] text-[#4681E8]/60 mb-0.5",children:e}),(0,a.jsxs)("div",{className:"flex items-center gap-2.5 flex-wrap",children:[(0,a.jsx)("h1",{className:"text-[18px] sm:text-[22px] font-black uppercase tracking-tight text-slate-800 leading-none",children:t}),s]})]})]}),n&&(0,a.jsx)("div",{className:"hidden sm:flex items-center gap-2 text-right shrink-0 ml-4",children:n})]})})}},36686:(e,t,s)=>{"use strict";s.d(t,{StandingsClient:()=>h});var a=s(68019),l=s(10707),r=s(46914),n=s(43539);function i(e){return"W"===e?"border border-emerald-500/45 bg-emerald-500/25 text-emerald-300 shadow-[0_0_0_1px_rgba(16,185,129,0.08)_inset]":"L"===e?"border border-red-500/45 bg-red-500/25 text-red-300 shadow-[0_0_0_1px_rgba(239,68,68,0.08)_inset]":"D"===e?"border border-amber-400/45 bg-amber-400/22 text-amber-200 shadow-[0_0_0_1px_rgba(251,191,36,0.08)_inset]":"border border-slate-500/40 bg-slate-500/18 text-slate-700"}function o(e,t){return 1===e?{bar:"bg-[linear-gradient(180deg,#facc15,#f97316)]",badge:"border-emerald-600/60 bg-slate-100 text-yellow-700 shadow-[0_0_18px_rgba(250,204,21,0.14)]",row:"from-[#32230d]/70 via-transparent to-transparent"}:e<=4?{bar:"bg-[linear-gradient(180deg,#fb7185,#f97316)]",badge:"border-[#fb7185]/45 bg-slate-100 text-rose-700",row:"from-[#241318]/55 via-transparent to-transparent"}:e<=6?{bar:"bg-[linear-gradient(180deg,#f59e0b,#facc15)]",badge:"border-[#f59e0b]/45 bg-slate-100 text-yellow-700",row:"from-[#24190b]/45 via-transparent to-transparent"}:e<=10?{bar:"bg-[linear-gradient(180deg,#38bdf8,#2563eb)]",badge:"border-sky-400/40 bg-white text-sky-700",row:"from-[#101725]/32 via-transparent to-transparent"}:e>=Math.max(t-2,1)?{bar:"bg-[linear-gradient(180deg,#ef4444,#7f1d1d)]",badge:"border-red-500/40 bg-slate-100 text-red-700",row:"from-[#220f14]/45 via-transparent to-transparent"}:{bar:"bg-[linear-gradient(180deg,#64748b,#334155)]",badge:"border-slate-500/35 bg-white text-slate-700",row:"from-[#12161d]/24 via-transparent to-transparent"}}function c({detail:e}){let[t,s]=(0,l.useState)(!1),n=(0,l.useRef)(null),[o,d]=(0,l.useState)({top:0,left:0}),x=i(e.result),h=(0,l.useCallback)(()=>{if(n.current){let e=n.current.getBoundingClientRect();d({top:e.top+window.scrollY-8,left:e.left+e.width/2+window.scrollX})}s(!0)},[]);return(0,a.jsxs)("div",{ref:n,className:"relative inline-flex",onMouseEnter:h,onMouseLeave:()=>s(!1),children:[(0,a.jsx)("span",{className:`inline-flex h-7 w-7 items-center justify-center rounded-[8px] text-[11px] font-black cursor-pointer transition-transform hover:-translate-y-0.5 ${x}`,children:e.result}),t&&e.match_time&&"u">typeof document&&(0,r.createPortal)((0,a.jsxs)("div",{className:"fixed z-[9999] w-[220px] pointer-events-none",style:{top:`${o.top}px`,left:`${o.left}px`,transform:"translate(-50%, -100%)",position:"absolute"},children:[(0,a.jsxs)("div",{className:"overflow-hidden rounded-xl border border-[#cbd5e1] bg-white shadow-2xl",children:[(0,a.jsx)("div",{className:"bg-slate-100 px-3 py-1.5 text-[10px] text-slate-600 font-mono text-center border-b border-[#cbd5e1]",children:e.match_time}),(0,a.jsxs)("div",{className:"px-3 py-2.5 flex items-center justify-between gap-2",children:[(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5 flex-1 min-w-0",children:[e.home_logo?(0,a.jsx)("img",{src:e.home_logo,alt:e.home_team,className:"w-7 h-7 object-contain",loading:"lazy",decoding:"async"}):(0,a.jsx)("div",{className:"w-7 h-7 rounded-full bg-gray-700 flex items-center justify-center text-[8px] text-slate-600 font-bold",children:"?"}),(0,a.jsx)("span",{className:"text-[9px] text-slate-600 font-bold text-center leading-tight line-clamp-2 max-w-[70px]",children:e.home_team})]}),(0,a.jsx)("div",{className:"text-slate-900 font-black text-sm whitespace-nowrap px-1",children:e.score||"? - ?"}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5 flex-1 min-w-0",children:[e.away_logo?(0,a.jsx)("img",{src:e.away_logo,alt:e.away_team,className:"w-7 h-7 object-contain",loading:"lazy",decoding:"async"}):(0,a.jsx)("div",{className:"w-7 h-7 rounded-full bg-gray-700 flex items-center justify-center text-[8px] text-slate-600 font-bold",children:"?"}),(0,a.jsx)("span",{className:"text-[9px] text-slate-600 font-bold text-center leading-tight line-clamp-2 max-w-[70px]",children:e.away_team})]})]})]}),(0,a.jsx)("div",{className:"absolute left-1/2 -translate-x-1/2 -bottom-1 w-2 h-2 bg-white border-r border-b border-[#cbd5e1] rotate-45"})]}),document.body)]})}function d({result:e}){let t=i(e);return(0,a.jsx)("span",{className:`inline-flex h-7 w-7 items-center justify-center rounded-[8px] text-[11px] font-black ${t}`,children:e})}function x({value:e,totalTeams:t}){let s=Number(e);if(!Number.isFinite(s))return(0,a.jsx)("td",{className:"px-4 py-4 text-center font-mono font-black text-slate-400",children:e});let l=o(s,t);return(0,a.jsxs)("td",{className:"relative px-4 py-4 text-center font-mono",children:[(0,a.jsx)("span",{className:`absolute left-0 top-1/2 h-7 w-1 -translate-y-1/2 roun
458ded-r-full ${l.bar}`}),(0,a.jsx)("span",{className:`inline-flex h-8 w-8 items-center justify-center rounded-[10px] border text-[13px] font-black ${l.badge}`,children:s})]})}function h({initialData:e}){let[t]=(0,l.useState)(!1),[s,r]=(0,l.useState)(!1),[i,p]=(0,l.useState)(""),u=(0,l.useRef)(null);if((0,l.useEffect)(()=>{function e(e){u.current&&!u.current.contains(e.target)&&r(!1)}return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[]),!e)return(0,a.jsx)("div",{className:"text-center py-20 text-slate-600",children:"Đang tải dữ liệu..."});let g=e.available_leagues||[],b=g.filter(e=>e.name.toLowerCase().includes(i.toLowerCase())),f=e.teams&&e.teams.length>0&&Array.isArray(e.teams[0]?.form),j=!f&&e.rankings;return(0,a.jsxs)("div",{className:"mx-auto max-w-[1440px] px-4 py-8",children:[(0,a.jsx)(n.O,{eyebrow:"Bảng xếp hạng",title:"BẢNG XẾP HẠNG",rightSlot:(0,a.jsx)("div",{className:"text-[12px] text-slate-600",children:(0,a.jsx)("span",{className:"text-slate-900/80 font-bold",children:e.league_name})})}),g.length>0&&(0,a.jsxs)("div",{className:"mb-6",ref:u,children:[(0,a.jsxs)("div",{className:"relative inline-flex min-w-[320px] items-center gap-3 rounded-2xl border border-slate-200 bg-white backdrop-blur-md px-5 py-3.5 cursor-pointer shadow-[0_8px_30px_rgba(0,0,0,0.06)] transition-colors hover:border-[#4681E8]/50 hover:shadow-[0_8px_30px_rgba(70,129,232,0.1)]",onClick:()=>r(!s),children:[e.league_icon&&(0,a.jsx)("img",{src:e.league_icon,alt:e.league_name||"League icon",className:"w-6 h-6 object-contain",loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-slate-800 font-bold text-sm flex-1",children:e.league_name||"Chọn giải đấu"}),(0,a.jsx)("svg",{className:`w-4 h-4 text-[#4681E8] transition-transform ${s?"rotate-180":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),s&&(0,a.jsxs)("div",{className:"absolute z-50 mt-2 w-[360px] overflow-hidden rounded-2xl border border-slate-200 bg-white backdrop-blur-xl shadow-[0_24px_80px_rgba(0,0,0,0.15)]",children:[(0,a.jsx)("div",{className:"p-2 border-b border-slate-100",children:(0,a.jsx)("input",{type:"text",placeholder:"T\xecm kiếm giải đấu...",value:i,onChange:e=>p(e.target.value),className:"w-full bg-slate-50 text-slate-800 text-sm px-4 py-2.5 rounded-xl border border-transparent outline-none focus:border-[#4681E8]/50 placeholder-slate-400 transition-colors",autoFocus:!0})}),(0,a.jsxs)("div",{className:"max-h-[340px] overflow-y-auto",children:[b.map(t=>(0,a.jsxs)("a",{href:`/standings?league=${encodeURIComponent(t.id)}`,className:`flex items-center gap-3 px-4 py-3 cursor-pointer transition-colors hover:bg-slate-50 ${t.id===e.league_id?"bg-[#4681E8]/10 border-l-4 border-[#4681E8]":""}`,children:[t.icon?(0,a.jsx)("img",{src:t.icon,alt:t.name||"League",className:"w-5 h-5 object-contain flex-shrink-0",loading:"lazy",decoding:"async"}):(0,a.jsx)("div",{className:"w-5 h-5 rounded bg-gray-700 flex-shrink-0"}),(0,a.jsx)("span",{className:"text-sm text-slate-900 truncate",children:t.name})]},t.id)),0===b.length&&(0,a.jsx)("div",{className:"px-4 py-8 text-center text-gray-500 text-sm",children:"Kh\xf4ng t\xecm thấy giải đấu"})]})]})]}),t&&(0,a.jsxs)("div",{className:"flex items-center justify-center py-12",children:[(0,a.jsx)("div",{className:"animate-spin w-8 h-8 border-2 border-emerald-600 border-t-transparent rounded-full"}),(0,a.jsx)("span",{className:"ml-3 text-slate-600 text-sm",children:"Đang tải bảng xếp hạng từ server..."})]}),!t&&f&&(0,a.jsxs)("div",{className:"overflow-hidden rounded-[24px] border border-slate-200 bg-white shadow-[0_8px_30px_rgba(0,0,0,0.08)]",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between gap-3 border-b border-[#4681E8]/20 bg-gradient-to-r from-[#4681E8] to-[#2563eb] px-6 py-4 text-white shadow-[0_4px_25px_rgba(70,129,232,0.3)]",children:[(0,a.jsx)("div",{className:"text-[13px] font-black uppercase tracking-[0.2em] drop-shadow-sm text-white/80",children:"League"}),(0,a.jsx)("div",{className:"truncate text-sm font-black sm:text-base drop-shadow-md",children:e.league_name})]}),(0,a.jsx)("div",{className:"overflow-x-auto",children:(0,a.jsxs)("table",{className:"w-full text-left border-collapse",children:[(0,a.jsx)("thead",{children:(0,a.jsx)("tr",{className:"bg-slate-50 text-[11px] uppercase tracking-[0.2em] text-slate-500",children:e.header.map((t,s)=>{let l=e.teams.some(e=>e.form&&e.form.length>0);return t.toLowerCase().includes("phong độ")&&!l?null:(0,a.jsx)("th",{colSpan:s===e.header.length-1&&l?5:1,className:`p-4 font-semibold ${1===s?"w-1/3 text-left":"text-center"}`,children:t},s)})})}),(0,a.jsx)("tbody",{className:"text-sm",children:e.teams.map((t,s)=>(o(Number(t.data[0]||s+1),e.teams.length),(0,a.jsxs)("tr",{className:"group border-b border-slate-100 bg-white transition-colors hover:bg-slate-50 cursor-pointer",children:[t.data.map((s,l)=>0===l?(0,a.jsx)(x,{value:s,totalTeams:e.teams.length},l):1===l?(0,a.jsx)("td",{className:"p-4",children:(0,a.jsxs)("div",{className:"flex items-center gap-3 rounded-2xl border border-slate-100 bg-slate-50 px-4 py-2.5 transition-colors group-hover:border-[#4681E8]/30 group-hover:bg-[#4681E8]/5",children:[t.team_logo?(0,a.jsx)("img",{src:t.team_logo,alt:s,className:"h-8 w-8 rounded-full bg-white object-contain p-0.5 filter drop-shadow-[0_2px_4px_rgba(0,0,0,0.1)]",loading:"lazy"}):(0,a.jsx)("div",{className:"flex h-8 w-8 items-center justify-center rounded-full border border-slate-200 bg-white text-[10px] font-bold text-slate-400",children:"?"}),(0,a.jsx)("span",{className:"font-bold text-slate-800 transition-colors group-hover:text-[#4681E8]",children:s})]})},l):(0,a.jsx)("td",{className:"p-4 text-center font-mono text-slate-600",children:s},l)),t.form&&t.form.length>0&&(0,a.jsxs)(a.Fragment,{children:[t.form.map((e,t)=>(0,a.jsx)("td",{className:"p-2 text-center",children:e.match_time?(0,a.jsx)(c,{detail:e}):(0,a.jsx)(d,{result:e.result})},`form-${t}`)),t.form.length<5&&Array.from({length:5-t.form.length}).map((e,t)=>(0,a.jsx)("td",{className:"p-2"},`pad-${t}`))]})]},s)))})]})})]}),!t&&!f&&j&&(0,a.jsx)(m,{rankings:e.rankings}),!t&&!f&&!j&&e.header&&e.teams&&(0,a.jsx)("div",{className:"text-center py-20 text-slate-600",children:"Dữ liệu đang được cập nhật..."}),!t&&(f||j)&&(0,a.jsxs)("div",{className:"mt-6 flex flex-wrap items-center gap-5 px-5 py-4 bg-slate-50 rounded-2xl border border-slate-200",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,a.jsx)("span",{className:"w-2.5 h-2.5 rounded-full bg-emerald-500"}),(0,a.jsx)("span",{className:"text-[11px] text-slate-600 font-bold uppercase tracking-wider",children:"Đội trưởng bảng"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,a.jsx)("span",{className:"w-2.5 h-2.5 rounded-full bg-sky-4
45800"}),(0,a.jsx)("span",{className:"text-[11px] text-slate-600 font-bold uppercase tracking-wider",children:"Champions League"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,a.jsx)("span",{className:"w-2.5 h-2.5 rounded-full bg-amber-500"}),(0,a.jsx)("span",{className:"text-[11px] text-slate-600 font-bold uppercase tracking-wider",children:"Europa League"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,a.jsx)("span",{className:"w-2.5 h-2.5 rounded-full bg-[#f97316]"}),(0,a.jsx)("span",{className:"text-[11px] text-slate-600 font-bold uppercase tracking-wider",children:"Europa Conference"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,a.jsx)("span",{className:"w-2.5 h-2.5 rounded-full bg-[#E11D48]"}),(0,a.jsx)("span",{className:"text-[11px] text-slate-600 font-bold uppercase tracking-wider",children:"Xuống hạng"})]})]})]})}function m({rankings:e}){if(!e||0===e.length)return null;let t=e[0].data,s=e.slice(1);return(0,a.jsx)("div",{className:"overflow-hidden rounded-[22px] border border-[#cbd5e1] bg-[linear-gradient(180deg,#191a20,#111218)] shadow-[0_24px_80px_rgba(0,0,0,0.4)]",children:(0,a.jsx)("div",{className:"overflow-x-auto",children:(0,a.jsxs)("table",{className:"w-full text-left border-collapse",children:[(0,a.jsx)("thead",{children:(0,a.jsx)("tr",{className:"bg-white text-[11px] uppercase tracking-[0.18em] text-slate-600",children:t.map((e,l)=>{let r=l===t.length-1,n=s[0]&&s[0].data.length>t.length?s[0].data.length-t.length+1:1;return(0,a.jsx)("th",{colSpan:r?n:1,className:`p-4 font-semibold ${1===l?"w-1/3 text-left":"text-center"}`,children:e},l)})})}),(0,a.jsx)("tbody",{className:"text-sm",children:s.map((e,t)=>(0,a.jsx)("tr",{className:"group border-b border-[#cbd5e1] transition-colors hover:bg-white",children:e.data.map((t,l)=>0===l?(0,a.jsx)(x,{value:t,totalTeams:s.length},l):1===l?(0,a.jsx)("td",{className:"p-4",children:(0,a.jsxs)("div",{className:"flex items-center gap-3 rounded-2xl border border-white/6 bg-[linear-gradient(180deg,rgba(255,255,255,0.03),rgba(255,255,255,0.01))] px-3 py-2 transition-colors group-hover:border-emerald-600/22",children:[e.team_logo?(0,a.jsx)("img",{src:e.team_logo,alt:t,className:"h-8 w-8 rounded-full bg-white/5 object-contain ring-1 ring-white/8",loading:"lazy"}):(0,a.jsx)("div",{className:"flex h-8 w-8 items-center justify-center rounded-full border border-gray-700 bg-gray-800 text-xs font-bold text-gray-500",children:"?"}),(0,a.jsx)("span",{className:"font-bold text-slate-900 transition-colors group-hover:text-emerald-600",children:t})]})},l):["W","D","L"].includes(t)?(0,a.jsx)("td",{className:"p-2 text-center",children:(0,a.jsx)("span",{className:`inline-flex h-7 w-7 items-center justify-center rounded-[8px] text-[11px] font-black ${i(t)}`,children:t})},l):(0,a.jsx)("td",{className:"p-4 text-center font-mono text-slate-600",children:t},l))},t))})]})})})}},38243:(e,t,s)=>{"use strict";s.d(t,{A:()=>r});var a=s(68019),l=s(70508);function r({eyebrow:e,title:t,titleAddon:s,rightSlot:n,className:i}){return(0,a.jsx)("div",{className:(0,l.cn)("relative mb-5 overflow-hidden border-b border-slate-200",i),children:(0,a.jsxs)("div",{className:"flex items-center justify-between px-1 py-4 min-h-[56px]",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 min-w-0",children:[(0,a.jsx)("span",{className:"h-8 w-1 shrink-0 rounded-sm bg-gradient-to-b from-[#4681E8] to-[#55CAF1] shadow-[0_0_10px_rgba(70,129,232,0.5)]"}),(0,a.jsxs)("div",{className:"min-w-0",children:[e&&(0,a.jsx)("div",{className:"text-[10px] font-bold uppercase tracking-[0.2em] text-[#4681E8]/60 mb-0.5",children:e}),(0,a.jsxs)("div",{className:"flex items-center gap-2.5 flex-wrap",children:[(0,a.jsx)("h1",{className:"text-[18px] sm:text-[22px] font-black uppercase tracking-tight text-slate-800 leading-none",children:t}),s]})]})]}),n&&(0,a.jsx)("div",{className:"hidden sm:flex items-center gap-2 text-right shrink-0 ml-4",children:n})]})})}},38790:(e,t,s)=>{"use strict";function a(e){let t=e?.fixtures_v2||null,s=e?.fixtures||e?.schedules||[],a=t?.date_tabs?.length?t.date_tabs:function(e=new Date){let t=["Chá»
458§ Nhật","Thứ Hai","Thứ Ba","Thứ Tư","Thứ Năm","Thứ S\xe1u","Thứ Bảy"],s=[];for(let a=0;a<14;a+=1){let l=new Date(e);l.setDate(l.getDate()+a);let r=String(l.getDate()).padStart(2,"0"),n=String(l.getMonth()+1).padStart(2,"0"),i=`${l.getFullYear()}-${l.getMonth()+1}-${l.getDate()}`;s.push({label:0===a?"H\xf4m Nay":t[l.getDay()],date:`${r}.${n}`,dataValue:i,active:0===a})}return s}(),l=e?.selected_date||a.find(e=>e.active)?.dataValue||a[0]?.dataValue||null;if(t?.leagues?.length)return{dateTabs:a,selectedDate:l,leagues:t.leagues,totalMatches:t.leagues.reduce((e,t)=>e+t.matches.length,0)};let r=[],n=new Set;return s.forEach(e=>{let t=e.data;if(!(t.length<3))for(let s=0;s+2<t.length;s+=16){let a=t[s]||"",l=t[s+1]||"",i=t[s+2]||"",o=`${a}-${l}-${i}`;if(!n.has(o)&&l&&(n.add(o),r.push({time:a,home_team:l,away_team:i,home_logo:e.team_logos?.[2*Math.floor(s/16)]||"",away_logo:e.team_logos?.[2*Math.floor(s/16)+1]||"",score:t[s+3]||"-",ht_score:t[s+4]||"",handicap:t.length>s+9?[t[s+7]||"",t[s+8]||"",t[s+9]||""]:[],over_under:t.length>s+12?[t[s+10]||"",t[s+11]||"",t[s+12]||""]:[],one_x_two:t.length>s+15?[t[s+13]||"",t[s+14]||"",t[s+15]||""]:[]}),s+16>=t.length))break}}),{dateTabs:a,selectedDate:l,leagues:r.length>0?[{league_name:"Tất cả trận đấu",league_icon:"",match_count:r.length,matches:r}]:[],totalMatches:r.length}}function l(e){let t=e?.results_v2||null,s=e?.results||[];if(t?.date_groups?.length)return{availableLeagues:t.available_leagues||[],dateGroups:t.date_groups,totalMatches:t.date_groups.reduce((e,t)=>e+t.matches.length,0)};let a=[];return s.forEach(e=>{let t=e.data;if(t.length<6)return;let s=t[0],l=s.split(" - "),r=[],n=1,i=0;for(;n<t.length;){if(t[n]?.startsWith("L\xfac")){let s=t[n].replace("L\xfac","").trim();r.push({time:s,home_team:t[n+1]||"",away_team:t[n+4]||"",home_logo:e.team_logos?.[i]||"",away_logo:e.team_logos?.[i+1]||"",score:t[n+2]||"",ht_score:(t[n+3]||"").replace("H1:","").replace("HT:","").trim()}),i+=2,n+=5;continue}n+=1}r.length>0&&a.push({date_header:l[0]?.trim()||s,league_round:l.slice(1).join(" - ").trim(),matches:r})}),{availableLeagues:[],dateGroups:a,totalMatches:a.reduce((e,t)=>e+t.matches.length,0)}}function r(e,t){if(!t)return e;let s=t.toLowerCase();return e.filter(e=>e.league_round.toLowerCase().includes(s))}s.d(t,{kK:()=>r,o8:()=>l,p_:()=>a})},39842:(e,t,s)=>{"use strict";s.d(t,{Klivevip08ResultsPage:()=>o});var a=s(68019),l=s(10707),r=s(78637),n=s(25059),i=s(13881);function o({initialData:e,selectedLeague:t}){let s=(0,r.useRouter)(),c=(0,r.usePathname)(),d=(0,r.useSearchParams)(),[x,h]=(0,l.useTransition)(),[m,p]=(0,l.useState)(!1),[u,g]=(0,l.useState)(""),{availableLeagues:b,dateGroups:f}=(0,l.useMemo)(()=>(0,i.o8)(e),[e]),j=(0,l.useMemo)(()=>Array.from(new Set(f.map(e=>e.date_header))),[f]),w=d.get("date")||"",v=e=>{let t=new URLSearchParams(d.toString());e&&e!==w?t.set("date",e):t.delete("date"),h(()=>{let e=t.toString();s.push(e?`${c}?${e}`:c,{scroll:!1})})},N=(0,l.useMemo)(()=>{let e=f;return w&&(e=e.filter(e=>e.date_header===w)),(0,i.kK)(e,t)},[f,w,t]),y=(0,l.useMemo)(()=>{if(!u)return b;let e=u.toLowerCase();return b.filter(t=>t.name.toLowerCase().includes(e))},[b,u]),_=N.reduce((e,t)=>e+t.matches.length,0);if(0===f.length)return(0,a.jsxs)("div",{className:"max-w-[1440px] mx-auto px-4 py-8",children:[(0,a.jsx)(n.x,{eyebrow:"Kết quả",title:"KẾT QUẢ B\xd3NG Đ\xc1"}),(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center py-16 gap-4",children:[(0,a.jsx)("div",{className:"w-12 h-12 rounded-full border-2 border-[#E11D48]/30 border-t-[#E11D48] animate-spin"}),(0,a.jsx)("span",{className:"text-slate-500 text-sm font-medium tracking-wide",children:"Đang tải kết quả..."})]})]});let k=e=>{let t=new URLSearchParams(d.toString());e?t.set("league",e):t.delete("league"),p(!1),g(""),h(()=>{let e=t.toString();s.push(e?`${c}?${e}`:c,{scroll:!1})})};return(0,a.jsxs)("div",{className:"max-w-[1440px] mx-auto px-4 py-8",children:[(0,a.jsx)(n.x,{eyebrow:"Kết quả",title:"KẾT QUẢ B\xd3NG Đ\xc1",rightSlot:(0,a.jsx)("div",{className:"text-[12px] text-slate-600",children:(0,a.jsx)("span",{className:"text-slate-900/80 font-bold",children:t||"Tất cả giải đấu"})})}),(0,a.jsxs)("div",{className:"flex flex-col md:flex-row gap-4 mb-4 items-start md:items-center justify-between",children:[j.length>0&&(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,a.jsx)("button",{type:"button",onClick:()=>v(""),className:`px-4 py-2 rounded-xl text-sm font-bold transition-all duration-300 ${!w?"bg-gradient-to-r from-[#4681E8] to-[#2563eb] text-white shadow-[0_4px_15px_rgba(70,129,232,0.4)] border border-[#4681E8]/50":"bg-white text-[#64748B] border border-slate-200 hover:bg-slate-50 hover:text-slate-800"}`,children:"Tất cả ng\xe0y"}),j.slice(0,5).map(e=>(0,a.jsx)("button",{type:"button",onClick:()=>v(e),className:`px-4 py-2 rounded-xl text-sm font-bold transition-all duration-300 ${w===e?"bg-gradient-to-r from-[#4681E8] to-[#2563eb] text-white shadow-[0_4px_15px_rgba(70,129,232,0.4)] border border-[#4681E8]/50":"bg-white text-[#64748B] border border-slate-200 hover:bg-slate-50 hover:text-slate-800"}`,children:e},e))]}),(0,a.jsxs)("div",{className:"relative w-full md:w-[320px]",children:[(0,a.jsxs)("button",{onClick:()=>p(!m),className:"w-full flex items-center gap-3 bg-white hover:bg-slate-50 px-4 py-2.5 rounded-xl border border-slate-200 shadow-inner transition-all text-sm",children:[(0,a.jsx)("svg",{className:"w-5 h-5 text-[#4681E8]",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 4a1 1 0 011-1h16a1 1 0 011 1v2.586a1 1 0 01-.293.707l-6.414 6.414a1 1 0 00-.293.707V17l-4 4v-6.586a1 1 0 00-.293-.707L3.293 7.293A1 1 0 013 6.586V4z"})}),(0,a.jsx)("span",{className:"text-slate-700 font-bold flex-1 text-left truncate",children:t||"Chọn giải đấu..."}),(0,a.jsx)("svg",{className:`w-4 h-4 text-slate-400 transition-transform ${m?"rotate-180":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),m&&(0,a.jsxs)("div",{className:"absolute top-full left-0 right-0 mt-2 bg-white border border-slate-200 rounded-2xl shadow-xl z-50 max-h-[300px] overflow-hidden flex flex-col",children:[(0,a.jsx)("div",{className:"p-2 border-b border-slate-100",children:(0,a.jsx)("input",{type:"text",placeholder:"T\xecm giải đấu...",value:u,onChange:e=>g(e.target.value),className:"w-full bg-slate-50 border border-transparent roun
458ded-xl px-4 py-2.5 text-sm text-slate-800 placeholder-slate-400 outline-none focus:border-[#4681E8]/50 transition-colors"})}),(0,a.jsxs)("div",{className:"overflow-y-auto flex-1 pb-2",children:[(0,a.jsx)("button",{type:"button",onClick:()=>k(),className:`block w-full text-left px-4 py-3 text-sm transition-colors ${!t?"bg-[#4681E8]/10 text-[#4681E8] border-l-4 border-[#4681E8]":"text-slate-600 hover:bg-slate-50 hover:text-slate-800"}`,children:"Tất cả giải đấu"}),y.map((e,s)=>(0,a.jsxs)("button",{type:"button",onClick:()=>k(e.name),className:`flex items-center gap-3 px-4 py-3 text-sm transition-colors cursor-pointer ${t===e.name?"bg-[#4681E8]/10 text-[#4681E8] border-l-4 border-[#4681E8]":"text-slate-600 hover:bg-slate-50 hover:text-slate-800"}`,children:[e.icon?(0,a.jsx)("img",{src:e.icon,alt:e.name||"League",className:"w-5 h-5 object-contain shrink-0",loading:"lazy",decoding:"async"}):(0,a.jsx)("div",{className:"w-5 h-5 rounded-md bg-slate-200 shrink-0"}),(0,a.jsx)("span",{className:"truncate",children:e.name})]},s))]})]})]})]}),x&&(0,a.jsxs)("div",{className:"mb-4 inline-flex items-center gap-2 rounded-full border border-slate-200 bg-white px-4 py-2 text-xs text-slate-500 shadow-sm",children:[(0,a.jsx)("span",{className:"h-2 w-2 rounded-full bg-[#E11D48] animate-pulse shadow-[0_0_8px_rgba(225,29,72,0.8)]"}),(0,a.jsx)("span",{className:"font-bold tracking-wide",children:"Đang tải kết quả từ server..."})]}),(0,a.jsx)("div",{className:"space-y-4",children:0===N.length?(0,a.jsx)("div",{className:"text-center py-16 text-[#64748B] font-medium tracking-wide",children:"Kh\xf4ng c\xf3 kết quả n\xe0o"}):N.map((e,t)=>(0,a.jsxs)("div",{className:"overflow-hidden rounded-2xl border border-slate-200 bg-white shadow-[0_8px_30px_rgba(0,0,0,0.06)]",children:[(0,a.jsx)("div",{className:"bg-slate-50 px-5 py-3 border-b border-slate-100 flex items-center justify-between",children:(0,a.jsxs)("span",{className:"text-[12px] text-slate-500 font-bold uppercase tracking-widest",children:[e.league_round?e.league_round:"V\xf2ng đấu",(0,a.jsx)("span",{className:"text-[#E11D48] ml-2 font-mono text-[11px] bg-[#E11D48]/10 px-2 py-0.5 rounded-full border border-[#E11D48]/20",children:e.date_header})]})}),e.matches.map((e,t)=>{var s;return(0,a.jsx)("div",{className:"bg-transparent hover:bg-slate-50 border-b border-slate-100 last:border-0 transition-colors group cursor-default",children:(0,a.jsxs)("div",{className:"flex items-center py-4 px-5 gap-4",children:[(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center min-w-[56px] shrink-0 border-r border-slate-100 pr-4",children:[(0,a.jsx)("span",{className:"text-[9px] text-slate-400 uppercase tracking-widest mb-1 font-bold",children:"L\xfac"}),(0,a.jsx)("span",{className:"text-[13px] text-slate-700 font-mono font-black",children:e.time})]}),(0,a.jsxs)("div",{className:"flex-1 flex items-center justify-end gap-3 min-w-0",children:[(0,a.jsx)("span",{className:"text-[14px] text-slate-800 font-bold truncate text-right group-hover:text-slate-900 transition-colors",children:e.home_team}),e.home_logo?(0,a.jsx)("div",{className:"w-8 h-8 rounded-full bg-slate-100 border border-slate-200 p-1 flex items-center justify-center shadow-sm",children:(0,a.jsx)("img",{src:e.home_logo,alt:e.home_team||"Home team",className:"w-full h-full object-contain",loading:"lazy"})}):(0,a.jsx)("div",{className:"w-8 h-8 rounded-full bg-slate-100 shrink-0 border border-slate-200 flex items-center justify-center text-[10px] font-bold text-slate-400",children:"?"})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center min-w-[90px] shrink-0 bg-slate-50 rounded-xl py-2 px-2 border border-slate-200 shadow-inner group-hover:border-[#4681E8]/40 transition-colors",children:[(0,a.jsx)("span",{className:`text-[22px] leading-none font-black tracking-widest drop-shadow-[0_2px_4px_rgba(0,0,0,0.8)] ${!(s=e.score)||"-"===s?"text-slate-400":"text-slate-800"}`,children:e.score}),e.ht_score&&(0,a.jsxs)("span",{className:"text-[10px] text-slate-500 font-mono mt-1 font-bold",children:["HT: ",e.ht_score]})]}),(0,a.jsxs)("div",{className:"flex-1 flex items-center gap-3 min-w-0",children:[e.away_logo?(0,a.jsx)("div",{className:"w-8 h-8 rounded-full bg-slate-100 border border-slate-200 p-1 flex items-center justify-center shadow-sm",children:(0,a.jsx)("img",{src:e.away_logo,alt:e.away_team||"Away team",className:"w-full h-full object-contain",loading:"lazy"})}):(0,a.jsx)("div",{className:"w-8 h-8 rounded-full bg-slate-100 shrink-0 border border-slate-200 flex items-center justify-center text-[10px] font-bold text-slate-400",children:"?"}),(0,a.jsx)("span",{className:"text-[14px] text-slate-800 font-bold truncate text-left group-hover:text-slate-900 transition-colors",children:e.away_team})]})]})},t)})]},t))}),(0,a.jsxs)("div",{className:"mt-6 text-center text-xs text-[#64748B] font-bold uppercase tracking-widest drop-shadow-sm",children:["Hiển thị ",_," kết quả trận đấu"]})]})}},41116:(e,t,s)=>{"use strict";s.d(t,{Klivevip04SchedulePage:()=>d});var a=s(68019),l=s(10707),r=s(78637),n=s(30675);function i({html:e}){return e?.trim()?(0,a.jsx)("section",{className:"relative mt-10 mb-6",children:(0,a.jsx)("div",{className:"seo-prose relative",children:(0,a.jsx)("div",{dangerouslySetInnerHTML:{__html:e},className:"text-slate-600 text-[14px] leading-[1.85] px-1 [&_strong]:text-slate-900 [&_a]:text-[#4681E8]"})})}):null}s(85188);let o=`
459<h2>Lịch thi đấu b\xf3ng đ\xe1 - Cập nhật lịch b\xf3ng đ\xe1 h\xf4m nay nhanh v\xe0 ch\xednh x\xe1c</h2>
460
461<p>Để <strong>xem lịch thi đấu b\xf3ng đ\xe1</strong> nhanh, ch\xednh x\xe1c v\xe0 đầy đủ nhất, Klive ch\xednh l\xe0 nơi bạn n\xean chọn. Ch\xfang t\xf4i cập nhật lịch thi đấu cho to\xe0n bộ c\xe1c giải đấu trong nước v\xe0 quốc tế, gi\xfap bạn kh\xf4ng bỏ lỡ bất kỳ trận cầu hấp dẫn n\xe0o.</p>
462
463<img src="/images/seo/schedule-football.png" alt="Lịch thi đấu b\xf3ng đ\xe1 h\xf4m nay tại Klive" loading="lazy" />
464
465<div class="toc-box">
466  <h3>Nội dung ch\xednh</h3>
467  <ol>
468    <li>Lịch thi đấu b\xf3ng đ\xe1 trực tuyến h\xe0ng đầu</li>
469    <li>Lịch b\xf3ng đ\xe1 nhanh v\xe0 ch\xednh x\xe1c</li>
470    <li>Cập nhật lịch Ngoại Hạng Anh v\xe0 Champions League</li>
471    <li>C\xe1ch xem lịch thi đấu hiệu quả nhất</li>
472  </ol>
473</div>
474
475<h2>Lịch thi đấu b\xf3ng đ\xe1 trực tuyến h\xe0ng đầu</h2>
476<p>Trong thời đại số, kh\xf4ng ai c\xf2n xem lịch b\xf3ng đ\xe1 tr\xean TV hay b\xe1o giấy nữa. Tất cả đ\xe3 chuyển sang theo d\xf5i online, v\xe0 Klive ch\xednh l\xe0 nền tảng cập nhật lịch b\xf3ng đ\xe1 được đ\xe1nh gi\xe1 cao nhất.</p>
477
478<p>Khi truy cập Klive, bạn c\xf3 thể xem lịch thi đấu của bất kỳ giải đấu b\xf3ng đ\xe1 n\xe0o tr\xean thế giới một c\xe1ch ho\xe0n to\xe0n miễn ph\xed. Th\xf4ng tin lịch đấu được cập nhật sớm nhất v\xe0 chi tiết đến từng ph\xfat.</p>
479
480<h2>Lịch b\xf3ng đ\xe1 nhanh v\xe0 ch\xednh x\xe1c</h2>
481<p>Klive kh\xf4ng chỉ cung cấp lịch thi đấu c\xe1c giải đấu h\xe0ng đầu m\xe0 c\xf2n cập nhật lịch ph\xe1t s\xf3ng tr\xean c\xe1c k\xeanh truyền h\xecnh Việt Nam như K+, FPT Play, VTV Sports. Gi\xfap bạn biết trận n\xe0o được chiếu trực tiếp tr\xean TV v\xe0 sắp xếp thời gian hợp l\xfd.</p>
482
483<h2>Cập nhật lịch Ngoại Hạng Anh v\xe0 Champions League</h2>
484<p>Ngoại Hạng Anh v\xe0 Champions League l\xe0 hai giải đấu được quan t\xe2m nhất. Tại Klive, bạn lu\xf4n nắm được lịch đấu đầy đủ từ v\xf2ng bảng đến chung kết, k\xe8m theo th\xf4ng tin về đội h\xecnh dá»± kiến, phong độ v\xe0 lịch sá»­ đối đầu để chuẩn bị tốt nhất cho má
484»—i trận cầu.</p>
485
486<p>Kết hợp lịch thi đấu với trang trực tiếp b\xf3ng đ\xe1, bạn sẽ c\xf3 trải nghiệm theo d\xf5i b\xf3ng đ\xe1 ho\xe0n hảo nhất - biết trước, xem ngay, kh\xf4ng bỏ lỡ!</p>
487`;var c=s(46933);function d({initialData:e}){let t=(0,r.usePathname)(),[s,h]=(0,l.useState)(!1),[m,p]=(0,l.useState)(new Set),[u,g]=(0,l.useState)(""),[b,f]=(0,l.useState)(!1),[j,w]=(0,l.useState)(0),v=(0,l.useMemo)(()=>(0,c.p_)(e),[e]),N=v.dateTabs,y=(0,l.useMemo)(()=>{if(!v.selectedDate)return 0;let e=N.findIndex(e=>(e.dataValue||e.date)===v.selectedDate);return e>=0?e:0},[N,v.selectedDate]),[_,k]=(0,l.useState)(y),[E,C]=(0,l.useState)(v.leagues||[]),S=(0,l.useMemo)(()=>{if(!u)return E;let e=u.toLowerCase();return E.filter(t=>t.league_name.toLowerCase().includes(e)||t.matches.some(t=>t.home_team.toLowerCase().includes(e)||t.away_team.toLowerCase().includes(e)))},[E,u]),L=Math.max(0,N.length-7),$=N.slice(j,j+7),F=j>0,T=j<L,A=S.reduce((e,t)=>e+t.matches.length,0);return((0,l.useEffect)(()=>{if(!v.selectedDate||!N.length)return;let e=N.findIndex(e=>(e.dataValue||e.date)===v.selectedDate);e>=0&&k(e)},[N,v.selectedDate]),(0,l.useEffect)(()=>{_<j?w(Math.max(0,_)):_>=j+7&&w(Math.min(L,_-7+1))},[_,L,j]),e)?(0,a.jsxs)("div",{className:"max-w-[1440px] mx-auto px-4 py-8",children:[(0,a.jsx)(n.D,{eyebrow:"Lịch thi đấu",title:"LỊCH THI ĐẤU",rightSlot:(0,a.jsxs)("div",{className:"text-[12px] text-slate-500 font-bold uppercase tracking-wider",children:[(0,a.jsx)("span",{className:"text-[#E11D48] font-black",children:S.reduce((e,t)=>e+t.matches.length,0)})," trận đấu"]})}),(0,a.jsxs)("div",{className:"flex items-center mb-4 rounded-xl overflow-hidden border border-slate-200 bg-white shadow-sm",children:[(0,a.jsx)("button",{type:"button",disabled:!F,onClick:()=>w(e=>Math.max(0,e-1)),className:`flex items-center justify-center w-8 h-[52px] bg-slate-100 border-r border-slate-200 text-slate-600 hover:text-slate-800 hover:bg-slate-200 transition-all shrink-0 ${!F?"opacity-30":"cursor-pointer"}`,children:(0,a.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2.5,d:"M15 19l-7-7 7-7"})})}),(0,a.jsx)("div",{className:"flex flex-1",children:$.map((e,s)=>{let l=j+s;return(0,a.jsxs)("button",{type:"button",onClick:()=>(e=>{let s=N[e];if(!s||e===_)return;let a=s.dataValue||s.date;a&&(k(e),p(new Set),h(!0),window.history.replaceState(null,"",`${t}?date=${encodeURIComponent(a)}`),fetch(`/api/socolive/fixtures?date=${encodeURIComponent(a)}`,{cache:"no-store"}).then(e=>e.ok?e.json():null).then(e=>{e&&C((0,c.p_)(e).leagues||[])}).finally(()=>h(!1)))})(l),className:`flex-1 flex flex-col items-center justify-center h-[52px] border-b-[3px] transition-all duration-300 ${_===l?"border-[#4681E8] text-[#4681E8] bg-[#4681E8]/5":"border-transparent text-[#64748B] hover:text-[#94A3B8] hover:bg-slate-100"}`,children:[(0,a.jsx)("span",{className:`text-[11px] font-bold uppercase tracking-widest ${_===l?"text-[#4681E8]":""}`,children:e.label}),(0,a.jsx)("span",{className:`text-[12px] font-mono mt-0.5 ${_===l?"text-slate-800 font-black":""}`,children:e.date})]},`tab-${l}`)})}),(0,a.jsx)("button",{type:"button",disabled:!T,onClick:()=>w(e=>Math.min(L,e+1)),className:`flex items-center justify-center w-8 h-[52px] bg-slate-100 border-l border-slate-200 text-slate-600 hover:text-slate-800 hover:bg-slate-200 transition-all shrink-0 ${!T?"opacity-30":"cursor-pointer"}`,children:(0,a.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2.5,d:"M9 5l7 7-7 7"})})})]}),(0,a.jsxs)("div",{className:"relative mb-4",children:[(0,a.jsxs)("button",{onClick:()=>f(!b),className:"flex items-center gap-3 bg-white hover:bg-slate-50 px-4 py-2.5 rounded-xl border border-slate-200 shadow-sm transition-all text-sm group",children:[(0,a.jsx)("svg",{className:"w-5 h-5 text-[#E11D48] transition-colors group-hover:text-[#F43F5E]",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 6h16M4 12h16M4 18h16"})}),(0,a.jsx)("span",{className:"text-slate-700 font-bold text-[13px] uppercase tracking-wide",children:"Danh s\xe1ch giải đấu"}),(0,a.jsx)("svg",{className:`w-4 h-4 text-slate-500 transition-transform duration-300 ${b?"rotate-180":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),b&&(0,a.jsxs)("div",{className:"absolute top-full left-0 mt-2 w-[360px] bg-white border border-slate-200 rounded-2xl shadow-[0_24px_80px_rgba(0,0,0,0.12)] z-50 max-h-[320px] overflow-hidden flex flex-col",children:[(0,a.jsx)("div",{className:"p-2 border-b border-slate-100",children:(0,a.jsx)("input",{type:"text",placeholder:"T\xecm giải đấu...",value:u,onChange:e=>g(e.target.value),className:"w-full bg-slate-50 border border-transparent roun
487ded-xl px-4 py-2.5 text-sm text-slate-800 placeholder-slate-400 outline-none focus:border-[#4681E8]/50 transition-colors"})}),(0,a.jsx)("div",{className:"overflow-y-auto flex-1 py-2",children:E.map((e,t)=>(0,a.jsxs)("button",{type:"button",onClick:()=>{g(e.league_name),f(!1)},className:"w-full flex items-center gap-3 px-4 py-2.5 hover:bg-slate-50 text-left text-[13px] transition-colors",children:[e.league_icon?(0,a.jsx)("img",{src:e.league_icon,alt:e.league_name||"League",className:"w-5 h-5 object-contain shrink-0",loading:"lazy",decoding:"async"}):(0,a.jsx)("div",{className:"w-5 h-5 rounded-md bg-slate-200 shrink-0"}),(0,a.jsx)("span",{className:"text-slate-600 truncate flex-1 font-medium",children:e.league_name}),(0,a.jsx)("span",{className:"text-[11px] text-[#E11D48] font-bold shrink-0 px-2 py-0.5 bg-[#E11D48]/10 rounded-md border border-[#E11D48]/20",children:e.matches.length})]},t))})]})]}),(0,a.jsxs)("div",{className:"grid grid-cols-[1fr_60px_55px_100px_100px_90px] bg-slate-50 border border-slate-200 rounded-t-xl px-4 py-3 text-[11px] text-slate-500 font-black uppercase tracking-widest shadow-inner",children:[(0,a.jsx)("span",{children:"Trận đấu"}),(0,a.jsx)("span",{className:"text-center",children:"Tỷ số"}),(0,a.jsx)("span",{className:"text-center",children:"Hiệp 1"}),(0,a.jsx)("span",{className:"text-center",children:"Cược chấp"}),(0,a.jsx)("span",{className:"text-center",children:"T\xe0i/Xỉu"}),(0,a.jsx)("span",{className:"text-center",children:"1 X 2"})]}),(0,a.jsxs)("div",{className:"border border-slate-200 border-t-0 rounded-b-xl overflow-hidden relative shadow-[0_8px_30px_rgba(0,0,0,0.06)]",children:[s&&(0,a.jsx)("div",{className:"absolute inset-0 z-10 bg-white/80 backdrop-blur-[2px]",children:(0,a.jsx)("div",{className:"space-y-0",children:[...Array(6)].map((e,t)=>(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 px-4 py-3.5 bg-slate-100 border-b border-slate-200",children:[(0,a.jsx)("div",{className:"w-4 h-4 rounded bg-slate-300 animate-pulse"}),(0,a.jsx)("div",{className:"h-3.5 rounded bg-slate-200 animate-pulse",style:{width:`${120+30*t}px`}})]}),[void 0,void 0].map((e,t)=>(0,a.jsxs)("div",{className:"grid grid-cols-[1fr_60px_55px_100px_100px_90px] items-center px-4 py-3 border-b border-slate-100",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)("div",{className:"w-10 h-3.5 rounded bg-slate-200 animate-pulse"}),(0,a.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,a.jsx)("div",{className:"h-3 w-24 rounded bg-slate-100 animate-pulse"}),(0,a.jsx)("div",{className:"h-3 w-20 rounded bg-slate-100 animate-pulse"})]})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5",children:[(0,a.jsx)("div",{className:"h-3 w-5 rounded bg-slate-100 animate-pulse"}),(0,a.jsx)("div",{className:"h-3 w-5 rounded bg-slate-100 animate-pulse"})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5",children:[(0,a.jsx)("div",{className:"h-3 w-5 rounded bg-slate-100 animate-pulse"}),(0,a.jsx)("div",{className:"h-3 w-5 rounded bg-slate-100 animate-pulse"})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5",children:[(0,a.jsx)("div",{className:"h-3 w-14 rounded bg-slate-100 animate-pulse"}),(0,a.jsx)("div",{className:"h-3 w-10 rounded bg-slate-100 animate-pulse"})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5",children:[(0,a.jsx)("div",{className:"h-3 w-14 rounded bg-slate-100 animate-pulse"}),(0,a.jsx)("div",{className:"h-3 w-10 rounded bg-slate-100 animate-pulse"})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5",children:[(0,a.jsx)("div",{className:"h-3 w-10 rounded bg-slate-100 animate-pulse"}),(0,a.jsx)("div",{className:"h-3 w-10 rounded bg-slate-100 animate-pulse"}),(0,a.jsx)("div",{className:"h-3 w-10 rounded bg-slate-100 animate-pulse"})]})]},t))]},t))})}),0!==S.length||s?S.map((e,t)=>(0,a.jsxs)("div",{id:`league-${t}`,children:[(0,a.jsxs)("button",{onClick:()=>{p(e=>{let s=new Set(e);return s.has(t)?s.delete(t):s.add(t),s})},className:"w-full flex items-center gap-3 px-4 py-3 bg-slate-50 hover:bg-slate-100 border-b border-slate-100 transition-colors text-left group",children:[(0,a.jsx)("svg",{className:`w-4 h-4 text-[#E11D48] transition-transform duration-300 shrink-0 ${m.has(t)?"-rotate-90":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2.5,d:"M19 9l-7 7-7-7"})}),e.league_icon&&(0,a.jsx)("div",{className:"w-6 h-6 rounded-full bg-slate-100 p-0.5 border border-slate-200 flex items-center justify-center shadow-sm",children:(0,a.jsx)("img",{src:e.league_icon,alt:e.league_name||"League",className:"w-4 h-4 object-contain shrink-0",loading:"lazy",decoding:"async"})}),(0,a.jsx)("span",{className:"text-[13px] font-bold text-slate-700 flex-1 truncate uppercase tracking-widest",children:e.league_name}),(0,a.jsxs)("span",{className:"text-[11px] text-[#E11D48] font-bold shrink-0 ml-1 px-2 py-0.5 bg-[#E11D48]/10 rounded border border-[#
487E11D48]/20 group-hover:bg-[#E11D48]/20 transition-colors",children:["BXH ",(0,a.jsx)("svg",{className:"inline w-3 h-3 ml-0.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 6h16M4 10h16M4 14h16M4 18h16"})})]})]}),!m.has(t)&&e.matches.map((e,t)=>(0,a.jsxs)("div",{className:"grid grid-cols-[1fr_60px_55px_100px_100px_90px] items-center px-4 py-3 bg-transparent hover:bg-slate-50 border-b border-slate-100 last:border-0 transition-colors group cursor-default",children:[(0,a.jsxs)("div",{className:"flex items-center gap-4 min-w-0",children:[(0,a.jsx)("span",{className:"text-[#E11D48] font-mono text-[13px] font-black min-w-[42px] shrink-0 drop-shadow-[0_0_4px_rgba(225,29,72,0.4)]",children:e.time}),(0,a.jsxs)("div",{className:"flex flex-col gap-1 min-w-0 flex-1",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[e.home_logo&&(0,a.jsx)("img",{src:e.home_logo,alt:e.home_team||"Home team",className:"w-4 h-4 object-contain shrink-0 filter drop-shadow-[0_2px_2px_rgba(0,0,0,0.8)]",loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-[13px] text-slate-700 font-medium truncate group-hover:text-slate-900 transition-colors",children:e.home_team})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[e.away_logo&&(0,a.jsx)("img",{src:e.away_logo,alt:e.away_team||"Away team",className:"w-4 h-4 object-contain shrink-0",loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-[13px] text-slate-700 font-medium truncate group-hover:text-slate-900 transition-colors",children:e.away_team})]})]})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center",children:[(0,a.jsx)("span",{className:"text-[12px] text-[var(--accent-cyan)] font-mono font-bold",children:"-"!==e.score?e.score:"-"}),(0,a.jsx)("span",{className:"text-[12px] text-[#64748B]",children:"-"})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center",children:[(0,a.jsx)("span",{className:"text-[12px] text-[#64748B]",children:"-"}),(0,a.jsx)("span",{className:"text-[12px] text-[#64748B]",children:"-"})]}),(0,a.jsx)(x,{values:e.handicap,hasLine:!0}),(0,a.jsx)(x,{values:e.over_under,hasLine:!0}),(0,a.jsx)("div",{className:"flex flex-col items-center gap-0",children:e.one_x_two?.length>0?e.one_x_two.map((e,t)=>(0,a.jsx)("span",{className:"text-[11px] text-slate-500 leading-[18px]",children:e||"-"},t)):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"text-[11px] text-[#64748B] leading-[18px]",children:"-"}),(0,a.jsx)("span",{className:"text-[11px] text-[#64748B] leading-[18px]",children:"-"}),(0,a.jsx)("span",{className:"text-[11px] text-[#64748B] leading-[18px]",children:"-"})]})})]},t))]},t)):(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center py-20 gap-3 bg-slate-50",children:[(0,a.jsx)("svg",{className:"w-12 h-12 text-slate-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",strokeWidth:1.5,children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6.75 3v2.25M17.25 3v2.25M3 18.75V7.5a2.25 2.25 0 012.25-2.25h13.5A2.25 2.25 0 0121 7.5v11.25m-18 0A2.25 2.25 0 005.25 21h13.5A2.25 2.25 0 0021 18.75m-18 0v-7.5A2.25 2.25 0 015.25 9h13.5A2.25 2.25 0 0121 11.25v7.5"})}),(0,a.jsx)("span",{className:"text-slate-500 font-medium tracking-wide",children:"Kh\xf4ng c\xf3 trận đấu n\xe0o cho ng\xe0y n\xe0y"}),(0,a.jsx)("span",{className:"text-slate-400 text-[12px]",children:"H\xe3y thử chọn một ng\xe0y kh\xe1c"})]})]}),(0,a.jsxs)("div",{className:"mt-6 text-center text-[11px] text-[#64748B] uppercase tracking-widest font-bold drop-shadow-sm",children:["Tổng cộng ",A," trận đấu trong ",S.length," giải"]}),(0,a.jsx)(i,{html:o})]}):(0,a.jsxs)("div",{className:"max-w-[1440px] mx-auto px-4 py-8",children:[(0,a.jsx)(n.D,{eyebrow:"Lịch thi đấu",title:"LỊCH THI ĐẤU"}),(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center py-16 gap-4",children:[(0,a.jsx)("div",{className:"w-12 h-12 rounded-full border-2 border-[#E11D48]/30 border-t-[#E11D48] animate-spin"}),(0,a.jsx)("span",{className:"text-slate-500 text-sm font-medium tracking-wide",children:"Đang tải lịch thi đấu..."})]})]})}function x({values:e,hasLine:t}){return e&&0!==e.length?t&&e.length>=3?(0,a.jsxs)("div",{className:"flex flex-col items-center gap-0",children:[(0,a.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,a.jsx)("span",{className:"text-[11px] text-[#E11D48] leading-[18px] font-bold",children:e[0]}),(0,a.jsx)("span",{className:"text-[11px] text-slate-500 leading-[18px]",children:e[1]})]}),(0,a.jsx)("span",{className:"text-[11px] text-slate-500 leading-[18px]",children:e[2]})]}):(0,a.jsx)("div",{className:"flex flex-col items-center gap-0",children:e.map((e,t)=>(0,a.jsx)("span",{className:"text-[11px] text-slate-500 leading-[18px]",children:e||"-"},t))}):(0,a.jsxs)("div",{className:"flex flex-col items-center",children:[(0,a.jsx)("span",{className:"text-[11px] text-[#64748B] leading-[18px]",children:"-"}),(0,a.jsx)("span",{className:"text-[11px] text-[#64748B] leading-[18px]",children:"-"})]})}},41427:(e,t,s)=>{"use strict";s.d(t,{i:()=>r});var a=s(68019),l=s(70508);
487function r({eyebrow:e,title:t,titleAddon:s,rightSlot:n,className:i}){return(0,a.jsx)("div",{className:(0,l.cn)("relative mb-5 overflow-hidden border-b border-slate-200",i),children:(0,a.jsxs)("div",{className:"flex items-center justify-between px-1 py-4 min-h-[56px]",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 min-w-0",children:[(0,a.jsx)("span",{className:"h-8 w-1 shrink-0 rounded-sm bg-gradient-to-b from-[#4681E8] to-[#55CAF1] shadow-[0_0_10px_rgba(70,129,232,0.5)]"}),(0,a.jsxs)("div",{className:"min-w-0",children:[e&&(0,a.jsx)("div",{className:"text-[10px] font-bold uppercase tracking-[0.2em] text-[#4681E8]/60 mb-0.5",children:e}),(0,a.jsxs)("div",{className:"flex items-center gap-2.5 flex-wrap",children:[(0,a.jsx)("h1",{className:"text-[18px] sm:text-[22px] font-black uppercase tracking-tight text-slate-800 leading-none",children:t}),s]})]})]}),n&&(0,a.jsx)("div",{className:"hidden sm:flex items-center gap-2 text-right shrink-0 ml-4",children:n})]})})}},41765:(e,t,s)=>{"use strict";s.d(t,{Klivevip05SchedulePage:()=>d});var a=s(68019),l=s(10707),r=s(78637),n=s(29231);function i({html:e}){return e?.trim()?(0,a.jsx)("section",{className:"relative mt-10 mb-6",children:(0,a.jsx)("div",{className:"seo-prose relative",children:(0,a.jsx)("div",{dangerouslySetInnerHTML:{__html:e},className:"text-slate-600 text-[14px] leading-[1.85] px-1 [&_strong]:text-slate-900 [&_a]:text-[#4681E8]"})})}):null}s(69839);let o=`
488<h2>Lịch thi đấu b\xf3ng đ\xe1 - Cập nhật lịch b\xf3ng đ\xe1 h\xf4m nay nhanh v\xe0 ch\xednh x\xe1c</h2>
489
490<p>Để <strong>xem lịch thi đấu b\xf3ng đ\xe1</strong> nhanh, ch\xednh x\xe1c v\xe0 đầy đủ nhất, Klive ch\xednh l\xe0 nơi bạn n\xean chọn. Ch\xfang t\xf4i cập nhật lịch thi đấu cho to\xe0n bộ c\xe1c giải đấu trong nước v\xe0 quốc tế, gi\xfap bạn kh\xf4ng bỏ lỡ bất kỳ trận cầu hấp dẫn n\xe0o.</p>
491
492<img src="/images/seo/schedule-football.png" alt="Lịch thi đấu b\xf3ng đ\xe1 h\xf4m nay tại Klive" loading="lazy" />
493
494<div class="toc-box">
495  <h3>Nội dung ch\xednh</h3>
496  <ol>
497    <li>Lịch thi đấu b\xf3ng đ\xe1 trực tuyến h\xe0ng đầu</li>
498    <li>Lịch b\xf3ng đ\xe1 nhanh v\xe0 ch\xednh x\xe1c</li>
499    <li>Cập nhật lịch Ngoại Hạng Anh v\xe0 Champions League</li>
500    <li>C\xe1ch xem lịch thi đấu hiệu quả nhất</li>
501  </ol>
502</div>
503
504<h2>Lịch thi đấu b\xf3ng đ\xe1 trực tuyến h\xe0ng đầu</h2>
505<p>Trong thời đại số, kh\xf4ng ai c\xf2n xem lịch b\xf3ng đ\xe1 tr\xean TV hay b\xe1o giấy nữa. Tất cả đ\xe3 chuyển sang theo d\xf5i online, v\xe0 Klive ch\xednh l\xe0 nền tảng cập nhật lịch b\xf3ng đ\xe1 được đ\xe1nh gi\xe1 cao nhất.</p>
506
507<p>Khi truy cập Klive, bạn c\xf3 thể xem lịch thi đấu của bất kỳ giải đấu b\xf3ng đ\xe1 n\xe0o tr\xean thế giới một c\xe1ch ho\xe0n to\xe0n miễn ph\xed. Th\xf4ng tin lịch đấu được cập nhật sớm nhất v\xe0 chi tiết đến từng ph\xfat.</p>
508
509<h2>Lịch b\xf3ng đ\xe1 nhanh v\xe0 ch\xednh x\xe1c</h2>
510<p>Klive kh\xf4ng chỉ cung cấp lịch thi đấu c\xe1c giải đấu h\xe0ng đầu m\xe0 c\xf2n cập nhật lịch ph\xe1t s\xf3ng tr\xean c\xe1c k\xeanh truyền h\xecnh Việt Nam như K+, FPT Play, VTV Sports. Gi\xfap bạn biết trận n\xe0o được chiếu trực tiếp tr\xean TV v\xe0 sắp xếp thời gian hợp l\xfd.</p>
511
512<h2>Cập nhật lịch Ngoại Hạng Anh v\xe0 Champions League</h2>
513<p>Ngoại Hạng Anh v\xe0 Champions League l\xe0 hai giải đấu được quan t\xe2m nhất. Tại Klive, bạn lu\xf4n nắm được lịch đấu đầy đủ từ v\xf2ng bảng đến chung kết, k\xe8m theo th\xf4ng tin về đội h\xecnh dự kiến, phong độ v\xe0 lịch sử đối đầu để chuẩn bị tốt nhất cho mỗi trận cầu.</p>
514
515<p>Kết hợp lịch thi đấu với trang trực tiếp b\xf3ng đ\xe1, bạn sẽ c\xf3 trải nghiệm theo d\xf5i b\xf3ng đ\xe1 ho\xe0n hảo nhất - biết trước, xem ngay, kh\xf4ng bỏ lỡ!</p>
516`;var c=s(84054);function d({initialData:e}){let t=(0,r.usePathname)(),[s,h]=(0,l.useState)(!1),[m,p]=(0,l.useState)(new Set),[u,g]=(0,l.useState)(""),[b,f]=(0,l.useState)(!1),[j,w]=(0,l.useState)(0),v=(0,l.useMemo)(()=>(0,c.p_)(e),[e]),N=v.dateTabs,y=(0,l.useMemo)(()=>
516{if(!v.selectedDate)return 0;let e=N.findIndex(e=>(e.dataValue||e.date)===v.selectedDate);return e>=0?e:0},[N,v.selectedDate]),[_,k]=(0,l.useState)(y),[E,C]=(0,l.useState)(v.leagues||[]),S=(0,l.useMemo)(()=>{if(!u)return E;let e=u.toLowerCase();return E.filter(t=>t.league_name.toLowerCase().includes(e)||t.matches.some(t=>t.home_team.toLowerCase().includes(e)||t.away_team.toLowerCase().includes(e)))},[E,u]),L=Math.max(0,N.length-7),$=N.slice(j,j+7),F=j>0,T=j<L,A=S.reduce((e,t)=>e+t.matches.length,0);return((0,l.useEffect)(()=>{if(!v.selectedDate||!N.length)return;let e=N.findIndex(e=>(e.dataValue||e.date)===v.selectedDate);e>=0&&k(e)},[N,v.selectedDate]),(0,l.useEffect)(()=>{_<j?w(Math.max(0,_)):_>=j+7&&w(Math.min(L,_-7+1))},[_,L,j]),e)?(0,a.jsxs)("div",{className:"max-w-[1440px] mx-auto px-4 py-8",children:[(0,a.jsx)(n.G,{eyebrow:"Lịch thi đấu",title:"LỊCH THI ĐẤU",rightSlot:(0,a.jsxs)("div",{className:"text-[12px] text-slate-500 font-bold uppercase tracking-wider",children:[(0,a.jsx)("span",{className:"text-[#E11D48] font-black",children:S.reduce((e,t)=>e+t.matches.length,0)})," trận đấu"]})}),(0,a.jsxs)("div",{className:"flex items-center mb-4 rounded-xl overflow-hidden border border-slate-200 bg-white shadow-sm",children:[(0,a.jsx)("button",{type:"button",disabled:!F,onClick:()=>w(e=>Math.max(0,e-1)),className:`flex items-center justify-center w-8 h-[52px] bg-slate-100 border-r border-slate-200 text-slate-600 hover:text-slate-800 hover:bg-slate-200 transition-all shrink-0 ${!F?"opacity-30":"cursor-pointer"}`,children:(0,a.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2.5,d:"M15 19l-7-7 7-7"})})}),(0,a.jsx)("div",{className:"flex flex-1",children:$.map((e,s)=>{let l=j+s;return(0,a.jsxs)("button",{type:"button",onClick:()=>(e=>{let s=N[e];if(!s||e===_)return;let a=s.dataValue||s.date;a&&(k(e),p(new Set),h(!0),window.history.replaceState(null,"",`${t}?date=${encodeURIComponent(a)}`),fetch(`/api/socolive/fixtures?date=${encodeURIComponent(a)}`,{cache:"no-store"}).then(e=>e.ok?e.json():null).then(e=>{e&&C((0,c.p_)(e).leagues||[])}).finally(()=>h(!1)))})(l),className:`flex-1 flex flex-col items-center justify-center h-[52px] border-b-[3px] transition-all duration-300 ${_===l?"border-[#4681E8] text-[#4681E8] bg-[#4681E8]/5":"border-transparent text-[#64748B] hover:text-[#94A3B8] hover:bg-slate-100"}`,children:[(0,a.jsx)("span",{className:`text-[11px] font-bold uppercase tracking-widest ${_===l?"text-[#4681E8]":""}`,children:e.label}),(0,a.jsx)("span",{className:`text-[12px] font-mono mt-0.5 ${_===l?"text-slate-800 font-black":""}`,children:e.date})]},`tab-${l}`)})}),(0,a.jsx)("button",{type:"button",disabled:!T,onClick:()=>w(e=>Math.min(L,e+1)),className:`flex items-center justify-center w-8 h-[52px] bg-slate-100 border-l border-slate-200 text-slate-600 hover:text-slate-800 hover:bg-slate-200 transition-all shrink-0 ${!T?"opacity-30":"cursor-pointer"}`,children:(0,a.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2.5,d:"M9 5l7 7-7 7"})})})]}),(0,a.jsxs)("div",{className:"relative mb-4",children:[(0,a.jsxs)("button",{onClick:()=>f(!b),className:"flex items-center gap-3 bg-white hover:bg-slate-50 px-4 py-2.5 rounded-xl border border-slate-200 shadow-sm transition-all text-sm group",children:[(0,a.jsx)("svg",{className:"w-5 h-5 text-[#E11D48] transition-colors group-hover:text-[#F43F5E]",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 6h16M4 12h16M4 18h16"})}),(0,a.jsx)("span",{className:"text-slate-700 font-bold text-[13px] uppercase tracking-wide",children:"Danh s\xe1ch giải đấu"}),(0,a.jsx)("svg",{className:`w-4 h-4 text-slate-500 transition-transform duration-300 ${b?"rotate-180":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),b&&(0,a.jsxs)("div",{className:"absolute top-full left-0 mt-2 w-[360px] bg-white border border-slate-200 rounded-2xl shadow-[0_24px_80px_rgba(0,0,0,0.12)] z-50 max-h-[320px] overflow-hidden flex flex-col",children:[(0,a.jsx)("div",{className:"p-2 border-b border-slate-100",children:(0,a.jsx)("input",{type:"text",placeholder:"T\xecm giải đấu...",value:u,onChange:e=>g(e.target.value),className:"w-full bg-slate-50 border border-transparent roun
516ded-xl px-4 py-2.5 text-sm text-slate-800 placeholder-slate-400 outline-none focus:border-[#4681E8]/50 transition-colors"})}),(0,a.jsx)("div",{className:"overflow-y-auto flex-1 py-2",children:E.map((e,t)=>(0,a.jsxs)("button",{type:"button",onClick:()=>{g(e.league_name),f(!1)},className:"w-full flex items-center gap-3 px-4 py-2.5 hover:bg-slate-50 text-left text-[13px] transition-colors",children:[e.league_icon?(0,a.jsx)("img",{src:e.league_icon,alt:e.league_name||"League",className:"w-5 h-5 object-contain shrink-0",loading:"lazy",decoding:"async"}):(0,a.jsx)("div",{className:"w-5 h-5 rounded-md bg-slate-200 shrink-0"}),(0,a.jsx)("span",{className:"text-slate-600 truncate flex-1 font-medium",children:e.league_name}),(0,a.jsx)("span",{className:"text-[11px] text-[#E11D48] font-bold shrink-0 px-2 py-0.5 bg-[#E11D48]/10 rounded-md border border-[#E11D48]/20",children:e.matches.length})]},t))})]})]}),(0,a.jsxs)("div",{className:"grid grid-cols-[1fr_60px_55px_100px_100px_90px] bg-slate-50 border border-slate-200 rounded-t-xl px-4 py-3 text-[11px] text-slate-500 font-black uppercase tracking-widest shadow-inner",children:[(0,a.jsx)("span",{children:"Trận đấu"}),(0,a.jsx)("span",{className:"text-center",children:"Tỷ số"}),(0,a.jsx)("span",{className:"text-center",children:"Hiệp 1"}),(0,a.jsx)("span",{className:"text-center",children:"Cược chấp"}),(0,a.jsx)("span",{className:"text-center",children:"T\xe0i/Xỉu"}),(0,a.jsx)("span",{className:"text-center",children:"1 X 2"})]}),(0,a.jsxs)("div",{className:"border border-slate-200 border-t-0 rounded-b-xl overflow-hidden relative shadow-[0_8px_30px_rgba(0,0,0,0.06)]",children:[s&&(0,a.jsx)("div",{className:"absolute inset-0 z-10 bg-white/80 backdrop-blur-[2px]",children:(0,a.jsx)("div",{className:"space-y-0",children:[...Array(6)].map((e,t)=>(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 px-4 py-3.5 bg-slate-100 border-b border-slate-200",children:[(0,a.jsx)("div",{className:"w-4 h-4 rounded bg-slate-300 animate-pulse"}),(0,a.jsx)("div",{className:"h-3.5 rounded bg-slate-200 animate-pulse",style:{width:`${120+30*t}px`}})]}),[void 0,void 0].map((e,t)=>(0,a.jsxs)("div",{className:"grid grid-cols-[1fr_60px_55px_100px_100px_90px] items-center px-4 py-3 border-b border-slate-100",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)("div",{className:"w-10 h-3.5 rounded bg-slate-200 animate-pulse"}),(0,a.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,a.jsx)("div",{className:"h-3 w-24 rounded bg-slate-100 animate-pulse"}),(0,a.jsx)("div",{className:"h-3 w-20 rounded bg-slate-100 animate-pulse"})]})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5",children:[(0,a.jsx)("div",{className:"h-3 w-5 rounded bg-slate-100 animate-pulse"}),(0,a.jsx)("div",{className:"h-3 w-5 rounded bg-slate-100 animate-pulse"})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5",children:[(0,a.jsx)("div",{className:"h-3 w-5 rounded bg-slate-100 animate-pulse"}),(0,a.jsx)("div",{className:"h-3 w-5 rounded bg-slate-100 animate-pulse"})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5",children:[(0,a.jsx)("div",{className:"h-3 w-14 rounded bg-slate-100 animate-pulse"}),(0,a.jsx)("div",{className:"h-3 w-10 rounded bg-slate-100 animate-pulse"})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5",children:[(0,a.jsx)("div",{className:"h-3 w-14 rounded bg-slate-100 animate-pulse"}),(0,a.jsx)("div",{className:"h-3 w-10 rounded bg-slate-100 animate-pulse"})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5",children:[(0,a.jsx)("div",{className:"h-3 w-10 rounded bg-slate-100 animate-pulse"}),(0,a.jsx)("div",{className:"h-3 w-10 rounded bg-slate-100 animate-pulse"}),(0,a.jsx)("div",{className:"h-3 w-10 rounded bg-slate-100 animate-pulse"})]})]},t))]},t))})}),0!==S.length||s?S.map((e,t)=>(0,a.jsxs)("div",{id:`league-${t}`,children:[(0,a.jsxs)("button",{onClick:()=>{p(e=>{let s=new Set(e);return s.has(t)?s.delete(t):s.add(t),s})},className:"w-full flex items-center gap-3 px-4 py-3 bg-slate-50 hover:bg-slate-100 border-b border-slate-100 transition-colors text-left group",children:[(0,a.jsx)("svg",{className:`w-4 h-4 text-[#E11D48] transition-transform duration-300 shrink-0 ${m.has(t)?"-rotate-90":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2.5,d:"M19 9l-7 7-7-7"})}),e.league_icon&&(0,a.jsx)("div",{className:"w-6 h-6 rounded-full bg-slate-100 p-0.5 border border-slate-200 flex items-center justify-center shadow-sm",children:(0,a.jsx)("img",{src:e.league_icon,alt:e.league_name||"League",className:"w-4 h-4 object-contain shrink-0",loading:"lazy",decoding:"async"})}),(0,a.jsx)("span",{className:"text-[13px] font-bold text-slate-700 flex-1 truncate uppercase tracking-widest",children:e.league_name}),(0,a.jsxs)("span",{className:"text-[11px] text-[#E11D48] font-bold shrink-0 ml-1 px-2 py-0.5 bg-[#E11D48]/10 rounded border border-[#
516E11D48]/20 group-hover:bg-[#E11D48]/20 transition-colors",children:["BXH ",(0,a.jsx)("svg",{className:"inline w-3 h-3 ml-0.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 6h16M4 10h16M4 14h16M4 18h16"})})]})]}),!m.has(t)&&e.matches.map((e,t)=>(0,a.jsxs)("div",{className:"grid grid-cols-[1fr_60px_55px_100px_100px_90px] items-center px-4 py-3 bg-transparent hover:bg-slate-50 border-b border-slate-100 last:border-0 transition-colors group cursor-default",children:[(0,a.jsxs)("div",{className:"flex items-center gap-4 min-w-0",children:[(0,a.jsx)("span",{className:"text-[#E11D48] font-mono text-[13px] font-black min-w-[42px] shrink-0 drop-shadow-[0_0_4px_rgba(225,29,72,0.4)]",children:e.time}),(0,a.jsxs)("div",{className:"flex flex-col gap-1 min-w-0 flex-1",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[e.home_logo&&(0,a.jsx)("img",{src:e.home_logo,alt:e.home_team||"Home team",className:"w-4 h-4 object-contain shrink-0 filter drop-shadow-[0_2px_2px_rgba(0,0,0,0.8)]",loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-[13px] text-slate-700 font-medium truncate group-hover:text-slate-900 transition-colors",children:e.home_team})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[e.away_logo&&(0,a.jsx)("img",{src:e.away_logo,alt:e.away_team||"Away team",className:"w-4 h-4 object-contain shrink-0",loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-[13px] text-slate-700 font-medium truncate group-hover:text-slate-900 transition-colors",children:e.away_team})]})]})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center",children:[(0,a.jsx)("span",{className:"text-[12px] text-[var(--accent-cyan)] font-mono font-bold",children:"-"!==e.score?e.score:"-"}),(0,a.jsx)("span",{className:"text-[12px] text-[#64748B]",children:"-"})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center",children:[(0,a.jsx)("span",{className:"text-[12px] text-[#64748B]",children:"-"}),(0,a.jsx)("span",{className:"text-[12px] text-[#64748B]",children:"-"})]}),(0,a.jsx)(x,{values:e.handicap,hasLine:!0}),(0,a.jsx)(x,{values:e.over_under,hasLine:!0}),(0,a.jsx)("div",{className:"flex flex-col items-center gap-0",children:e.one_x_two?.length>0?e.one_x_two.map((e,t)=>(0,a.jsx)("span",{className:"text-[11px] text-slate-500 leading-[18px]",children:e||"-"},t)):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"text-[11px] text-[#64748B] leading-[18px]",children:"-"}),(0,a.jsx)("span",{className:"text-[11px] text-[#64748B] leading-[18px]",children:"-"}),(0,a.jsx)("span",{className:"text-[11px] text-[#64748B] leading-[18px]",children:"-"})]})})]},t))]},t)):(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center py-20 gap-3 bg-slate-50",children:[(0,a.jsx)("svg",{className:"w-12 h-12 text-slate-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",strokeWidth:1.5,children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6.75 3v2.25M17.25 3v2.25M3 18.75V7.5a2.25 2.25 0 012.25-2.25h13.5A2.25 2.25 0 0121 7.5v11.25m-18 0A2.25 2.25 0 005.25 21h13.5A2.25 2.25 0 0021 18.75m-18 0v-7.5A2.25 2.25 0 015.25 9h13.5A2.25 2.25 0 0121 11.25v7.5"})}),(0,a.jsx)("span",{className:"text-slate-500 font-medium tracking-wide",children:"Kh\xf4ng c\xf3 trận đấu n\xe0o cho ng\xe0y n\xe0y"}),(0,a.jsx)("span",{className:"text-slate-400 text-[12px]",children:"H\xe3y thử chọn một ng\xe0y kh\xe1c"})]})]}),(0,a.jsxs)("div",{className:"mt-6 text-center text-[11px] text-[#64748B] uppercase tracking-widest font-bold drop-shadow-sm",children:["Tổng cộng ",A," trận đấu trong ",S.length," giải"]}),(0,a.jsx)(i,{html:o})]}):(0,a.jsxs)("div",{className:"max-w-[1440px] mx-auto px-4 py-8",children:[(0,a.jsx)(n.G,{eyebrow:"Lịch thi đấu",title:"LỊCH THI ĐẤU"}),(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center py-16 gap-4",children:[(0,a.jsx)("div",{className:"w-12 h-12 rounded-full border-2 border-[#E11D48]/30 border-t-[#E11D48] animate-spin"}),(0,a.jsx)("span",{className:"text-slate-500 text-sm font-medium tracking-wide",children:"Đang tải lịch thi đấu..."})]})]})}function x({values:e,hasLine:t}){return e&&0!==e.length?t&&e.length>=3?(0,a.jsxs)("div",{className:"flex flex-col items-center gap-0",children:[(0,a.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,a.jsx)("span",{className:"text-[11px] text-[#E11D48] leading-[18px] font-bold",children:e[0]}),(0,a.jsx)("span",{className:"text-[11px] text-slate-500 leading-[18px]",children:e[1]})]}),(0,a.jsx)("span",{className:"text-[11px] text-slate-500 leading-[18px]",children:e[2]})]}):(0,a.jsx)("div",{className:"flex flex-col items-center gap-0",children:e.map((e,t)=>(0,a.jsx)("span",{className:"text-[11px] text-slate-500 leading-[18px]",children:e||"-"},t))}):(0,a.jsxs)("div",{className:"flex flex-col items-center",children:[(0,a.jsx)("span",{className:"text-[11px] text-[#64748B] leading-[18px]",children:"-"}),(0,a.jsx)("span",{className:"text-[11px] text-[#64748B] leading-[18px]",children:"-"})]})}},42879:(e,t,s)=>{"use strict";s.d(t,{B:()=>r});var a=s(68019),l=s(70508);
516function r({eyebrow:e,title:t,titleAddon:s,rightSlot:n,className:i}){return(0,a.jsx)("div",{className:(0,l.cn)("relative mb-5 overflow-hidden border-b border-slate-200",i),children:(0,a.jsxs)("div",{className:"flex items-center justify-between px-1 py-4 min-h-[56px]",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 min-w-0",children:[(0,a.jsx)("span",{className:"h-8 w-1 shrink-0 rounded-sm bg-gradient-to-b from-[#4681E8] to-[#55CAF1] shadow-[0_0_10px_rgba(70,129,232,0.5)]"}),(0,a.jsxs)("div",{className:"min-w-0",children:[e&&(0,a.jsx)("div",{className:"text-[10px] font-bold uppercase tracking-[0.2em] text-[#4681E8]/60 mb-0.5",children:e}),(0,a.jsxs)("div",{className:"flex items-center gap-2.5 flex-wrap",children:[(0,a.jsx)("h1",{className:"text-[18px] sm:text-[22px] font-black uppercase tracking-tight text-slate-800 leading-none",children:t}),s]})]})]}),n&&(0,a.jsx)("div",{className:"hidden sm:flex items-center gap-2 text-right shrink-0 ml-4",children:n})]})})}},43539:(e,t,s)=>{"use strict";s.d(t,{O:()=>r});var a=s(68019),l=s(70508);function r({eyebrow:e,title:t,titleAddon:s,rightSlot:n,className:i}){return(0,a.jsx)("div",{className:(0,l.cn)("relative mb-5 overflow-hidden border-b border-slate-200",i),children:(0,a.jsxs)("div",{className:"flex items-center justify-between px-1 py-4 min-h-[56px]",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 min-w-0",children:[(0,a.jsx)("span",{className:"h-8 w-1 shrink-0 rounded-sm bg-gradient-to-b from-[#4681E8] to-[#55CAF1] shadow-[0_0_10px_rgba(70,129,232,0.5)]"}),(0,a.jsxs)("div",{className:"min-w-0",children:[e&&(0,a.jsx)("div",{className:"text-[10px] font-bold uppercase tracking-[0.2em] text-[#4681E8]/60 mb-0.5",children:e}),(0,a.jsxs)("div",{className:"flex items-center gap-2.5 flex-wrap",children:[(0,a.jsx)("h1",{className:"text-[18px] sm:text-[22px] font-black uppercase tracking-tight text-slate-800 leading-none",children:t}),s]})]})]}),n&&(0,a.jsx)("div",{className:"hidden sm:flex items-center gap-2 text-right shrink-0 ml-4",children:n})]})})}},44812:()=>{},44863:(e,t,s)=>{"use strict";s.d(t,{Klivevip09ResultsPage:()=>o});var a=s(68019),l=s(10707),r=s(78637),n=s(79623),i=s(50154);function o({initialData:e,selectedLeague:t}){let s=(0,r.useRouter)(),c=(0,r.usePathname)(),d=(0,r.useSearchParams)(),[x,h]=(0,l.useTransition)(),[m,p]=(0,l.useState)(!1),[u,g]=(0,l.useState)(""),{availableLeagues:b,dateGroups:f}=(0,l.useMemo)(()=>(0,i.o8)(e),[e]),j=(0,l.useMemo)(()=>Array.from(new Set(f.map(e=>e.date_header))),[f]),w=d.get("date")||"",v=e=>{let t=new URLSearchParams(d.toString());e&&e!==w?t.set("date",e):t.delete("date"),h(()=>{let e=t.toString();s.push(e?`${c}?${e}`:c,{scroll:!1})})},N=(0,l.useMemo)(()=>{let e=f;return w&&(e=e.filter(e=>e.date_header===w)),(0,i.kK)(e,t)},[f,w,t]),y=(0,l.useMemo)(()=>{if(!u)return b;let e=u.toLowerCase();return b.filter(t=>t.name.toLowerCase().includes(e))},[b,u]),_=N.reduce((e,t)=>e+t.matches.length,0);if(0===f.length)return(0,a.jsxs)("div",{className:"max-w-[1440px] mx-auto px-4 py-8",children:[(0,a.jsx)(n.c,{eyebrow:"Kết quả",title:"KẾT QUẢ B\xd3NG Đ\xc1"}),(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center py-16 gap-4",children:[(0,a.jsx)("div",{className:"w-12 h-12 rounded-full border-2 border-[#E11D48]/30 border-t-[#E11D48] animate-spin"}),(0,a.jsx)("span",{className:"text-slate-500 text-sm font-medium tracking-wide",children:"Đang tải kết quả..."})]})]});let k=e=>{let t=new URLSearchParams(d.toString());e?t.set("league",e):t.delete("league"),p(!1),g(""),h(()=>{let e=t.toString();s.push(e?`${c}?${e}`:c,{scroll:!1})})};return(0,a.jsxs)("div",{className:"max-w-[1440px] mx-auto px-4 py-8",children:[(0,a.jsx)(n.c,{eyebrow:"Kết quả",title:"KẾT QUẢ B\xd3NG Đ\xc1",rightSlot:(0,a.jsx)("div",{className:"text-[12px] text-slate-600",children:(0,a.jsx)("span",{className:"text-slate-900/80 font-bold",children:t||"Tất cả giải đấu"})})}),(0,a.jsxs)("div",{className:"flex flex-col md:flex-row gap-4 mb-4 items-start md:items-center justify-between",children:[j.length>0&&(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,a.jsx)("button",{type:"button",onClick:()=>v(""),className:`px-4 py-2 rounded-xl text-sm font-bold transition-all duration-300 ${!w?"bg-gradient-to-r from-[#4681E8] to-[#2563eb] text-white shadow-[0_4px_15px_rgba(70,129,232,0.4)] border border-[#4681E8]/50":"bg-white text-[#64748B] border border-slate-200 hover:bg-slate-50 hover:text-slate-800"}`,children:"Tất cả ng\xe0y"}),j.slice(0,5).map(e=>(0,a.jsx)("button",{type:"button",onClick:()=>v(e),className:`px-4 py-2 rounded-xl text-sm font-bold transition-all duration-300 ${w===e?"bg-gradient-to-r from-[#4681E8] to-[#2563eb] text-white shadow-[0_4px_15px_rgba(70,129,232,0.4)] border border-[#4681E8]/50":"bg-white text-[#64748B] border border-slate-200 hover:bg-slate-50 hover:text-slate-800"}`,children:e},e))]}),(0,a.jsxs)("div",{className:"relative w-full md:w-[320px]",children:[(0,a.jsxs)("button",{onClick:()=>p(!m),className:"w-full flex items-center gap-3 bg-white hover:bg-slate-50 px-4 py-2.5 rounded-xl border border-slate-200 shadow-inner transition-all text-sm",children:[(0,a.jsx)("svg",{className:"w-5 h-5 text-[#4681E8]",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 4a1 1 0 011-1h16a1 1 0 011 1v2.586a1 1 0 01-.293.707l-6.414 6.414a1 1 0 00-.293.707V17l-4 4v-6.586a1 1 0 00-.293-.707L3.293 7.293A1 1 0 013 6.586V4z"})}),(0,a.jsx)("span",{className:"text-slate-700 font-bold flex-1 text-left truncate",children:t||"Chọn giải đấu..."}),(0,a.jsx)("svg",{className:`w-4 h-4 text-slate-400 transition-transform ${m?"rotate-180":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),m&&(0,a.jsxs)("div",{className:"absolute top-full left-0 right-0 mt-2 bg-white border border-slate-200 rounded-2xl shadow-xl z-50 max-h-[300px] overflow-hidden flex flex-col",children:[(0,a.jsx)("div",{className:"p-2 border-b border-slate-100",children:(0,a.jsx)("input",{type:"text",placeholder:"T\xecm giải đấu...",value:u,onChange:e=>g(e.target.value),className:"w-full bg-slate-50 border border-transparent roun
516ded-xl px-4 py-2.5 text-sm text-slate-800 placeholder-slate-400 outline-none focus:border-[#4681E8]/50 transition-colors"})}),(0,a.jsxs)("div",{className:"overflow-y-auto flex-1 pb-2",children:[(0,a.jsx)("button",{type:"button",onClick:()=>k(),className:`block w-full text-left px-4 py-3 text-sm transition-colors ${!t?"bg-[#4681E8]/10 text-[#4681E8] border-l-4 border-[#4681E8]":"text-slate-600 hover:bg-slate-50 hover:text-slate-800"}`,children:"Tất cả giải đấu"}),y.map((e,s)=>(0,a.jsxs)("button",{type:"button",onClick:()=>k(e.name),className:`flex items-center gap-3 px-4 py-3 text-sm transition-colors cursor-pointer ${t===e.name?"bg-[#4681E8]/10 text-[#4681E8] border-l-4 border-[#4681E8]":"text-slate-600 hover:bg-slate-50 hover:text-slate-800"}`,children:[e.icon?(0,a.jsx)("img",{src:e.icon,alt:e.name||"League",className:"w-5 h-5 object-contain shrink-0",loading:"lazy",decoding:"async"}):(0,a.jsx)("div",{className:"w-5 h-5 rounded-md bg-slate-200 shrink-0"}),(0,a.jsx)("span",{className:"truncate",children:e.name})]},s))]})]})]})]}),x&&(0,a.jsxs)("div",{className:"mb-4 inline-flex items-center gap-2 rounded-full border border-slate-200 bg-white px-4 py-2 text-xs text-slate-500 shadow-sm",children:[(0,a.jsx)("span",{className:"h-2 w-2 rounded-full bg-[#E11D48] animate-pulse shadow-[0_0_8px_rgba(225,29,72,0.8)]"}),(0,a.jsx)("span",{className:"font-bold tracking-wide",children:"Đang tải kết quả từ server..."})]}),(0,a.jsx)("div",{className:"space-y-4",children:0===N.length?(0,a.jsx)("div",{className:"text-center py-16 text-[#64748B] font-medium tracking-wide",children:"Kh\xf4ng c\xf3 kết quả n\xe0o"}):N.map((e,t)=>(0,a.jsxs)("div",{className:"overflow-hidden rounded-2xl border border-slate-200 bg-white shadow-[0_8px_30px_rgba(0,0,0,0.06)]",children:[(0,a.jsx)("div",{className:"bg-slate-50 px-5 py-3 border-b border-slate-100 flex items-center justify-between",children:(0,a.jsxs)("span",{className:"text-[12px] text-slate-500 font-bold uppercase tracking-widest",children:[e.league_round?e.league_round:"V\xf2ng đấu",(0,a.jsx)("span",{className:"text-[#E11D48] ml-2 font-mono text-[11px] bg-[#E11D48]/10 px-2 py-0.5 rounded-full border border-[#E11D48]/20",children:e.date_header})]})}),e.matches.map((e,t)=>{var s;return(0,a.jsx)("div",{className:"bg-transparent hover:bg-slate-50 border-b border-slate-100 last:border-0 transition-colors group cursor-default",children:(0,a.jsxs)("div",{className:"flex items-center py-4 px-5 gap-4",children:[(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center min-w-[56px] shrink-0 border-r border-slate-100 pr-4",children:[(0,a.jsx)("span",{className:"text-[9px] text-slate-400 uppercase tracking-widest mb-1 font-bold",children:"L\xfac"}),(0,a.jsx)("span",{className:"text-[13px] text-slate-700 font-mono font-black",children:e.time})]}),(0,a.jsxs)("div",{className:"flex-1 flex items-center justify-end gap-3 min-w-0",children:[(0,a.jsx)("span",{className:"text-[14px] text-slate-800 font-bold truncate text-right group-hover:text-slate-900 transition-colors",children:e.home_team}),e.home_logo?(0,a.jsx)("div",{className:"w-8 h-8 rounded-full bg-slate-100 border border-slate-200 p-1 flex items-center justify-center shadow-sm",children:(0,a.jsx)("img",{src:e.home_logo,alt:e.home_team||"Home team",className:"w-full h-full object-contain",loading:"lazy"})}):(0,a.jsx)("div",{className:"w-8 h-8 rounded-full bg-slate-100 shrink-0 border border-slate-200 flex items-center justify-center text-[10px] font-bold text-slate-400",children:"?"})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center min-w-[90px] shrink-0 bg-slate-50 rounded-xl py-2 px-2 border border-slate-200 shadow-inner group-hover:border-[#4681E8]/40 transition-colors",children:[(0,a.jsx)("span",{className:`text-[22px] leading-none font-black tracking-widest drop-shadow-[0_2px_4px_rgba(0,0,0,0.8)] ${!(s=e.score)||"-"===s?"text-slate-400":"text-slate-800"}`,children:e.score}),e.ht_score&&(0,a.jsxs)("span",{className:"text-[10px] text-slate-500 font-mono mt-1 font-bold",children:["HT: ",e.ht_score]})]}),(0,a.jsxs)("div",{className:"flex-1 flex items-center gap-3 min-w-0",children:[e.away_logo?(0,a.jsx)("div",{className:"w-8 h-8 rounded-full bg-slate-100 border border-slate-200 p-1 flex items-center justify-center shadow-sm",children:(0,a.jsx)("img",{src:e.away_logo,alt:e.away_team||"Away team",className:"w-full h-full object-contain",loading:"lazy"})}):(0,a.jsx)("div",{className:"w-8 h-8 rounded-full bg-slate-100 shrink-0 border border-slate-200 flex items-center justify-center text-[10px] font-bold text-slate-400",children:"?"}),(0,a.jsx)("span",{className:"text-[14px] text-slate-800 font-bold truncate text-left group-hover:text-slate-900 transition-colors",children:e.away_team})]})]})},t)})]},t))}),(0,a.jsxs)("div",{className:"mt-6 text-center text-xs text-[#64748B] font-bold uppercase tracking-widest drop-shadow-sm",children:["Hiển thị ",_," kết quả trận đấu"]})]})}},45499:()=>{},46933:(e,t,s)=>{"use strict";function a(e){let t=e?.fixtures_v2||null,s=e?.fixtures||e?.schedules||[],a=t?.date_tabs?.length?t.date_tabs:function(e=new Date){let t=["Chá»
516§ Nhật","Thứ Hai","Thứ Ba","Thứ Tư","Thứ Năm","Thứ S\xe1u","Thứ Bảy"],s=[];for(let a=0;a<14;a+=1){let l=new Date(e);l.setDate(l.getDate()+a);let r=String(l.getDate()).padStart(2,"0"),n=String(l.getMonth()+1).padStart(2,"0"),i=`${l.getFullYear()}-${l.getMonth()+1}-${l.getDate()}`;s.push({label:0===a?"H\xf4m Nay":t[l.getDay()],date:`${r}.${n}`,dataValue:i,active:0===a})}return s}(),l=e?.selected_date||a.find(e=>e.active)?.dataValue||a[0]?.dataValue||null;if(t?.leagues?.length)return{dateTabs:a,selectedDate:l,leagues:t.leagues,totalMatches:t.leagues.reduce((e,t)=>e+t.matches.length,0)};let r=[],n=new Set;return s.forEach(e=>{let t=e.data;if(!(t.length<3))for(let s=0;s+2<t.length;s+=16){let a=t[s]||"",l=t[s+1]||"",i=t[s+2]||"",o=`${a}-${l}-${i}`;if(!n.has(o)&&l&&(n.add(o),r.push({time:a,home_team:l,away_team:i,home_logo:e.team_logos?.[2*Math.floor(s/16)]||"",away_logo:e.team_logos?.[2*Math.floor(s/16)+1]||"",score:t[s+3]||"-",ht_score:t[s+4]||"",handicap:t.length>s+9?[t[s+7]||"",t[s+8]||"",t[s+9]||""]:[],over_under:t.length>s+12?[t[s+10]||"",t[s+11]||"",t[s+12]||""]:[],one_x_two:t.length>s+15?[t[s+13]||"",t[s+14]||"",t[s+15]||""]:[]}),s+16>=t.length))break}}),{dateTabs:a,selectedDate:l,leagues:r.length>0?[{league_name:"Tất cả trận đấu",league_icon:"",match_count:r.length,matches:r}]:[],totalMatches:r.length}}function l(e){let t=e?.results_v2||null,s=e?.results||[];if(t?.date_groups?.length)return{availableLeagues:t.available_leagues||[],dateGroups:t.date_groups,totalMatches:t.date_groups.reduce((e,t)=>e+t.matches.length,0)};let a=[];return s.forEach(e=>{let t=e.data;if(t.length<6)return;let s=t[0],l=s.split(" - "),r=[],n=1,i=0;for(;n<t.length;){if(t[n]?.startsWith("L\xfac")){let s=t[n].replace("L\xfac","").trim();r.push({time:s,home_team:t[n+1]||"",away_team:t[n+4]||"",home_logo:e.team_logos?.[i]||"",away_logo:e.team_logos?.[i+1]||"",score:t[n+2]||"",ht_score:(t[n+3]||"").replace("H1:","").replace("HT:","").trim()}),i+=2,n+=5;continue}n+=1}r.length>0&&a.push({date_header:l[0]?.trim()||s,league_round:l.slice(1).join(" - ").trim(),matches:r})}),{availableLeagues:[],dateGroups:a,totalMatches:a.reduce((e,t)=>e+t.matches.length,0)}}function r(e,t){if(!t)return e;let s=t.toLowerCase();return e.filter(e=>e.league_round.toLowerCase().includes(s))}s.d(t,{kK:()=>r,o8:()=>l,p_:()=>a})},48011:(e,t,s)=>{"use strict";function a(e){let t=e?.fixtures_v2||null,s=e?.fixtures||e?.schedules||[],a=t?.date_tabs?.length?t.date_tabs:function(e=new Date){let t=["Chá»§ Nhật","Thứ Hai","Thứ Ba","Thứ Tư","Thứ Năm","Thứ S\xe1u","Thứ Bảy"],s=[];for(let a=0;a<14;a+=1){let l=new Date(e);l.setDate(l.getDate()+a);let r=String(l.getDate()).padStart(2,"0"),n=String(l.getMonth()+1).padStart(2,"0"),i=`${l.getFullYear()}-${l.getMonth()+1}-${l.getDate()}`;s.push({label:0===a?"H\xf4m Nay":t[l.getDay()],date:`${r}.${n}`,dataValue:i,active:0===a})}return s}(),l=e?.selected_date||a.find(e=>e.active)?.dataValue||a[0]?.dataValue||null;if(t?.leagues?.length)return{dateTabs:a,selectedDate:l,leagues:t.leagues,totalMatches:t.leagues.reduce((e,t)=>e+t.matches.length,0)};let r=[],n=new Set;return s.forEach(e=>{let t=e.data;if(!(t.length<3))for(let s=0;s+2<t.length;s+=16){let a=t[s]||"",l=t[s+1]||"",i=t[s+2]||"",o=`${a}-${l}-${i}`;if(!n.has(o)&&l&&(n.add(o),r.push({time:a,home_team:l,away_team:i,home_logo:e.team_logos?.[2*Math.floor(s/16)]||"",away_logo:e.team_logos?.[2*Math.floor(s/16)+1]||"",score:t[s+3]||"-",ht_score:t[s+4]||"",handicap:t.length>s+9?[t[s+7]||"",t[s+8]||"",t[s+9]||""]:[],over_under:t.length>s+12?[t[s+10]||"",t[s+11]||"",t[s+12]||""]:[],one_x_two:t.length>s+15?[t[s+13]||"",t[s+14]||"",t[s+15]||""]:[]}),s+16>=t.length))break}}),{dateTabs:a,selectedDate:l,leagues:r.length>0?[{league_name:"Tất cả trận đấu",league_icon:"",match_count:r.length,matches:r}]:[],totalMatches:r.length}}function l(e){let t=e?.results_v2||null,s=e?.results||[];if(t?.date_groups?.length)return{availableLeagues:t.available_leagues||[],dateGroups:t.date_groups,totalMatches:t.date_groups.reduce((e,t)=>e+t.matches.length,0)};let a=[];
516return s.forEach(e=>{let t=e.data;if(t.length<6)return;let s=t[0],l=s.split(" - "),r=[],n=1,i=0;for(;n<t.length;){if(t[n]?.startsWith("L\xfac")){let s=t[n].replace("L\xfac","").trim();r.push({time:s,home_team:t[n+1]||"",away_team:t[n+4]||"",home_logo:e.team_logos?.[i]||"",away_logo:e.team_logos?.[i+1]||"",score:t[n+2]||"",ht_score:(t[n+3]||"").replace("H1:","").replace("HT:","").trim()}),i+=2,n+=5;continue}n+=1}r.length>0&&a.push({date_header:l[0]?.trim()||s,league_round:l.slice(1).join(" - ").trim(),matches:r})}),{availableLeagues:[],dateGroups:a,totalMatches:a.reduce((e,t)=>e+t.matches.length,0)}}function r(e,t){if(!t)return e;let s=t.toLowerCase();return e.filter(e=>e.league_round.toLowerCase().includes(s))}s.d(t,{kK:()=>r,o8:()=>l,p_:()=>a})},48819:(e,t,s)=>{"use strict";s.d(t,{Klivevip10SchedulePage:()=>d});var a=s(68019),l=s(10707),r=s(78637),n=s(34003);function i({html:e}){return e?.trim()?(0,a.jsx)("section",{className:"relative mt-10 mb-6",children:(0,a.jsx)("div",{className:"seo-prose relative",children:(0,a.jsx)("div",{dangerouslySetInnerHTML:{__html:e},className:"text-slate-600 text-[14px] leading-[1.85] px-1 [&_strong]:text-slate-900 [&_a]:text-[#4681E8]"})})}):null}s(98769);let o=`
517<h2>Lịch thi đấu b\xf3ng đ\xe1 - Cập nhật lịch b\xf3ng đ\xe1 h\xf4m nay nhanh v\xe0 ch\xednh x\xe1c</h2>
518
519<p>Để <strong>xem lịch thi đấu b\xf3ng đ\xe1</strong> nhanh, ch\xednh x\xe1c v\xe0 đầy đủ nhất, Klive ch\xednh l\xe0 nơi bạn n\xean chọn. Ch\xfang t\xf4i cập nhật lịch thi đấu cho to\xe0n bộ c\xe1c giải đấu trong nước v\xe0 quốc tế, gi\xfap bạn kh\xf4ng bỏ lỡ bất kỳ trận cầu hấp dẫn n\xe0o.</p>
520
521<img src="/images/seo/schedule-football.png" alt="Lịch thi đấu b\xf3ng đ\xe1 h\xf4m nay tại Klive" loading="lazy" />
522
523<div class="toc-box">
524  <h3>Nội dung ch\xednh</h3>
525  <ol>
526    <li>Lịch thi đấu b\xf3ng đ\xe1 trực tuyến h\xe0ng đầu</li>
527    <li>Lịch b\xf3ng đ\xe1 nhanh v\xe0 ch\xednh x\xe1c</li>
528    <li>Cập nhật lịch Ngoại Hạng Anh v\xe0 Champions League</li>
529    <li>C\xe1ch xem lịch thi đấu hiệu quả nhất</li>
530  </ol>
531</div>
532
533<h2>Lịch thi đấu b\xf3ng đ\xe1 trực tuyến h\xe0ng đầu</h2>
534<p>Trong thời đại số, kh\xf4ng ai c\xf2n xem lịch b\xf3ng đ\xe1 tr\xean TV hay b\xe1o giấy nữa. Tất cả đ\xe3 chuyển sang theo d\xf5i online, v\xe0 Klive ch\xednh l\xe0 nền tảng cập nhật lịch b\xf3ng đ\xe1 được đ\xe1nh gi\xe1 cao nhất.</p>
535
536<p>Khi truy cập Klive, bạn c\xf3 thể xem lịch thi đấu của bất kỳ giải đấu b\xf3ng đ\xe1 n\xe0o tr\xean thế giới một c\xe1ch ho\xe0n to\xe0n miễn ph\xed. Th\xf4ng tin lịch đấu được cập nhật sớm nhất v\xe0 chi tiết đến từng ph\xfat.</p>
537
538<h2>Lịch b\xf3ng đ\xe1 nhanh v\xe0 ch\xednh x\xe1c</h2>
539<p>Klive kh\xf4ng chỉ cung cấp lịch thi đấu c\xe1c giải đấu h\xe0ng đầu m\xe0 c\xf2n cập nhật lịch ph\xe1t s\xf3ng tr\xean c\xe1c k\xeanh truyền h\xecnh Việt Nam như K+, FPT Play, VTV Sports. Gi\xfap bạn biết trận n\xe0o được chiếu trực tiếp tr\xean TV v\xe0 sắp xếp thời gian hợp l\xfd.</p>
540
541<h2>Cập nhật lịch Ngoại Hạng Anh v\xe0 Champions League</h2>
542<p>Ngoại Hạng Anh v\xe0 Champions League l\xe0 hai giải đấu được quan t\xe2m nhất. Tại Klive, bạn lu\xf4n nắm được lịch đấu đầy đủ từ v\xf2ng bảng đến chung kết, k\xe8m theo th\xf4ng tin về đội h\xecnh dự kiến, phong độ v\xe0 lịch sử đối đầu để chuẩn bị tốt nhất cho mỗi trận cầu.</p>
543
544<p>Kết hợp lịch thi đấu với trang trực tiếp b\xf3ng đ\xe1, bạn sẽ c\xf3 trải nghiệm theo d\xf5i b\xf3ng đ\xe1 ho\xe0n hảo nhất - biết trước, xem ngay, kh\xf4ng bỏ lỡ!</p>
545`;var c=s(49344);function d({initialData:e}){let t=(0,r.usePathname)(),[s,h]=(0,l.useState)(!1),[m,p]=(0,l.useState)(new Set),[u,g]=(0,l.useState)(""),[b,f]=(0,l.useState)(!1),[j,w]=(0,l.useState)(0),v=(0,l.useMemo)(()=>(0,c.p_)(e),[e]),N=v.dateTabs,y=(0,l.useMemo)(()=>
545{if(!v.selectedDate)return 0;let e=N.findIndex(e=>(e.dataValue||e.date)===v.selectedDate);return e>=0?e:0},[N,v.selectedDate]),[_,k]=(0,l.useState)(y),[E,C]=(0,l.useState)(v.leagues||[]),S=(0,l.useMemo)(()=>{if(!u)return E;let e=u.toLowerCase();return E.filter(t=>t.league_name.toLowerCase().includes(e)||t.matches.some(t=>t.home_team.toLowerCase().includes(e)||t.away_team.toLowerCase().includes(e)))},[E,u]),L=Math.max(0,N.length-7),$=N.slice(j,j+7),F=j>0,T=j<L,A=S.reduce((e,t)=>e+t.matches.length,0);return((0,l.useEffect)(()=>{if(!v.selectedDate||!N.length)return;let e=N.findIndex(e=>(e.dataValue||e.date)===v.selectedDate);e>=0&&k(e)},[N,v.selectedDate]),(0,l.useEffect)(()=>{_<j?w(Math.max(0,_)):_>=j+7&&w(Math.min(L,_-7+1))},[_,L,j]),e)?(0,a.jsxs)("div",{className:"max-w-[1440px] mx-auto px-4 py-8",children:[(0,a.jsx)(n.G,{eyebrow:"Lịch thi đấu",title:"LỊCH THI ĐẤU",rightSlot:(0,a.jsxs)("div",{className:"text-[12px] text-slate-500 font-bold uppercase tracking-wider",children:[(0,a.jsx)("span",{className:"text-[#E11D48] font-black",children:S.reduce((e,t)=>e+t.matches.length,0)})," trận đấu"]})}),(0,a.jsxs)("div",{className:"flex items-center mb-4 rounded-xl overflow-hidden border border-slate-200 bg-white shadow-sm",children:[(0,a.jsx)("button",{type:"button",disabled:!F,onClick:()=>w(e=>Math.max(0,e-1)),className:`flex items-center justify-center w-8 h-[52px] bg-slate-100 border-r border-slate-200 text-slate-600 hover:text-slate-800 hover:bg-slate-200 transition-all shrink-0 ${!F?"opacity-30":"cursor-pointer"}`,children:(0,a.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2.5,d:"M15 19l-7-7 7-7"})})}),(0,a.jsx)("div",{className:"flex flex-1",children:$.map((e,s)=>{let l=j+s;return(0,a.jsxs)("button",{type:"button",onClick:()=>(e=>{let s=N[e];if(!s||e===_)return;let a=s.dataValue||s.date;a&&(k(e),p(new Set),h(!0),window.history.replaceState(null,"",`${t}?date=${encodeURIComponent(a)}`),fetch(`/api/socolive/fixtures?date=${encodeURIComponent(a)}`,{cache:"no-store"}).then(e=>e.ok?e.json():null).then(e=>{e&&C((0,c.p_)(e).leagues||[])}).finally(()=>h(!1)))})(l),className:`flex-1 flex flex-col items-center justify-center h-[52px] border-b-[3px] transition-all duration-300 ${_===l?"border-[#4681E8] text-[#4681E8] bg-[#4681E8]/5":"border-transparent text-[#64748B] hover:text-[#94A3B8] hover:bg-slate-100"}`,children:[(0,a.jsx)("span",{className:`text-[11px] font-bold uppercase tracking-widest ${_===l?"text-[#4681E8]":""}`,children:e.label}),(0,a.jsx)("span",{className:`text-[12px] font-mono mt-0.5 ${_===l?"text-slate-800 font-black":""}`,children:e.date})]},`tab-${l}`)})}),(0,a.jsx)("button",{type:"button",disabled:!T,onClick:()=>w(e=>Math.min(L,e+1)),className:`flex items-center justify-center w-8 h-[52px] bg-slate-100 border-l border-slate-200 text-slate-600 hover:text-slate-800 hover:bg-slate-200 transition-all shrink-0 ${!T?"opacity-30":"cursor-pointer"}`,children:(0,a.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2.5,d:"M9 5l7 7-7 7"})})})]}),(0,a.jsxs)("div",{className:"relative mb-4",children:[(0,a.jsxs)("button",{onClick:()=>f(!b),className:"flex items-center gap-3 bg-white hover:bg-slate-50 px-4 py-2.5 rounded-xl border border-slate-200 shadow-sm transition-all text-sm group",children:[(0,a.jsx)("svg",{className:"w-5 h-5 text-[#E11D48] transition-colors group-hover:text-[#F43F5E]",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 6h16M4 12h16M4 18h16"})}),(0,a.jsx)("span",{className:"text-slate-700 font-bold text-[13px] uppercase tracking-wide",children:"Danh s\xe1ch giải đấu"}),(0,a.jsx)("svg",{className:`w-4 h-4 text-slate-500 transition-transform duration-300 ${b?"rotate-180":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),b&&(0,a.jsxs)("div",{className:"absolute top-full left-0 mt-2 w-[360px] bg-white border border-slate-200 rounded-2xl shadow-[0_24px_80px_rgba(0,0,0,0.12)] z-50 max-h-[320px] overflow-hidden flex flex-col",children:[(0,a.jsx)("div",{className:"p-2 border-b border-slate-100",children:(0,a.jsx)("input",{type:"text",placeholder:"T\xecm giải đấu...",value:u,onChange:e=>g(e.target.value),className:"w-full bg-slate-50 border border-transparent roun
545ded-xl px-4 py-2.5 text-sm text-slate-800 placeholder-slate-400 outline-none focus:border-[#4681E8]/50 transition-colors"})}),(0,a.jsx)("div",{className:"overflow-y-auto flex-1 py-2",children:E.map((e,t)=>(0,a.jsxs)("button",{type:"button",onClick:()=>{g(e.league_name),f(!1)},className:"w-full flex items-center gap-3 px-4 py-2.5 hover:bg-slate-50 text-left text-[13px] transition-colors",children:[e.league_icon?(0,a.jsx)("img",{src:e.league_icon,alt:e.league_name||"League",className:"w-5 h-5 object-contain shrink-0",loading:"lazy",decoding:"async"}):(0,a.jsx)("div",{className:"w-5 h-5 rounded-md bg-slate-200 shrink-0"}),(0,a.jsx)("span",{className:"text-slate-600 truncate flex-1 font-medium",children:e.league_name}),(0,a.jsx)("span",{className:"text-[11px] text-[#E11D48] font-bold shrink-0 px-2 py-0.5 bg-[#E11D48]/10 rounded-md border border-[#E11D48]/20",children:e.matches.length})]},t))})]})]}),(0,a.jsxs)("div",{className:"grid grid-cols-[1fr_60px_55px_100px_100px_90px] bg-slate-50 border border-slate-200 rounded-t-xl px-4 py-3 text-[11px] text-slate-500 font-black uppercase tracking-widest shadow-inner",children:[(0,a.jsx)("span",{children:"Trận đấu"}),(0,a.jsx)("span",{className:"text-center",children:"Tỷ số"}),(0,a.jsx)("span",{className:"text-center",children:"Hiệp 1"}),(0,a.jsx)("span",{className:"text-center",children:"Cược chấp"}),(0,a.jsx)("span",{className:"text-center",children:"T\xe0i/Xỉu"}),(0,a.jsx)("span",{className:"text-center",children:"1 X 2"})]}),(0,a.jsxs)("div",{className:"border border-slate-200 border-t-0 rounded-b-xl overflow-hidden relative shadow-[0_8px_30px_rgba(0,0,0,0.06)]",children:[s&&(0,a.jsx)("div",{className:"absolute inset-0 z-10 bg-white/80 backdrop-blur-[2px]",children:(0,a.jsx)("div",{className:"space-y-0",children:[...Array(6)].map((e,t)=>(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 px-4 py-3.5 bg-slate-100 border-b border-slate-200",children:[(0,a.jsx)("div",{className:"w-4 h-4 rounded bg-slate-300 animate-pulse"}),(0,a.jsx)("div",{className:"h-3.5 rounded bg-slate-200 animate-pulse",style:{width:`${120+30*t}px`}})]}),[void 0,void 0].map((e,t)=>(0,a.jsxs)("div",{className:"grid grid-cols-[1fr_60px_55px_100px_100px_90px] items-center px-4 py-3 border-b border-slate-100",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)("div",{className:"w-10 h-3.5 rounded bg-slate-200 animate-pulse"}),(0,a.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,a.jsx)("div",{className:"h-3 w-24 rounded bg-slate-100 animate-pulse"}),(0,a.jsx)("div",{className:"h-3 w-20 rounded bg-slate-100 animate-pulse"})]})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5",children:[(0,a.jsx)("div",{className:"h-3 w-5 rounded bg-slate-100 animate-pulse"}),(0,a.jsx)("div",{className:"h-3 w-5 rounded bg-slate-100 animate-pulse"})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5",children:[(0,a.jsx)("div",{className:"h-3 w-5 rounded bg-slate-100 animate-pulse"}),(0,a.jsx)("div",{className:"h-3 w-5 rounded bg-slate-100 animate-pulse"})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5",children:[(0,a.jsx)("div",{className:"h-3 w-14 rounded bg-slate-100 animate-pulse"}),(0,a.jsx)("div",{className:"h-3 w-10 rounded bg-slate-100 animate-pulse"})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5",children:[(0,a.jsx)("div",{className:"h-3 w-14 rounded bg-slate-100 animate-pulse"}),(0,a.jsx)("div",{className:"h-3 w-10 rounded bg-slate-100 animate-pulse"})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5",children:[(0,a.jsx)("div",{className:"h-3 w-10 rounded bg-slate-100 animate-pulse"}),(0,a.jsx)("div",{className:"h-3 w-10 rounded bg-slate-100 animate-pulse"}),(0,a.jsx)("div",{className:"h-3 w-10 rounded bg-slate-100 animate-pulse"})]})]},t))]},t))})}),0!==S.length||s?S.map((e,t)=>(0,a.jsxs)("div",{id:`league-${t}`,children:[(0,a.jsxs)("button",{onClick:()=>{p(e=>{let s=new Set(e);return s.has(t)?s.delete(t):s.add(t),s})},className:"w-full flex items-center gap-3 px-4 py-3 bg-slate-50 hover:bg-slate-100 border-b border-slate-100 transition-colors text-left group",children:[(0,a.jsx)("svg",{className:`w-4 h-4 text-[#E11D48] transition-transform duration-300 shrink-0 ${m.has(t)?"-rotate-90":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2.5,d:"M19 9l-7 7-7-7"})}),e.league_icon&&(0,a.jsx)("div",{className:"w-6 h-6 rounded-full bg-slate-100 p-0.5 border border-slate-200 flex items-center justify-center shadow-sm",children:(0,a.jsx)("img",{src:e.league_icon,alt:e.league_name||"League",className:"w-4 h-4 object-contain shrink-0",loading:"lazy",decoding:"async"})}),(0,a.jsx)("span",{className:"text-[13px] font-bold text-slate-700 flex-1 truncate uppercase tracking-widest",children:e.league_name}),(0,a.jsxs)("span",{className:"text-[11px] text-[#E11D48] font-bold shrink-0 ml-1 px-2 py-0.5 bg-[#E11D48]/10 rounded border border-[#
545E11D48]/20 group-hover:bg-[#E11D48]/20 transition-colors",children:["BXH ",(0,a.jsx)("svg",{className:"inline w-3 h-3 ml-0.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 6h16M4 10h16M4 14h16M4 18h16"})})]})]}),!m.has(t)&&e.matches.map((e,t)=>(0,a.jsxs)("div",{className:"grid grid-cols-[1fr_60px_55px_100px_100px_90px] items-center px-4 py-3 bg-transparent hover:bg-slate-50 border-b border-slate-100 last:border-0 transition-colors group cursor-default",children:[(0,a.jsxs)("div",{className:"flex items-center gap-4 min-w-0",children:[(0,a.jsx)("span",{className:"text-[#E11D48] font-mono text-[13px] font-black min-w-[42px] shrink-0 drop-shadow-[0_0_4px_rgba(225,29,72,0.4)]",children:e.time}),(0,a.jsxs)("div",{className:"flex flex-col gap-1 min-w-0 flex-1",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[e.home_logo&&(0,a.jsx)("img",{src:e.home_logo,alt:e.home_team||"Home team",className:"w-4 h-4 object-contain shrink-0 filter drop-shadow-[0_2px_2px_rgba(0,0,0,0.8)]",loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-[13px] text-slate-700 font-medium truncate group-hover:text-slate-900 transition-colors",children:e.home_team})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[e.away_logo&&(0,a.jsx)("img",{src:e.away_logo,alt:e.away_team||"Away team",className:"w-4 h-4 object-contain shrink-0",loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-[13px] text-slate-700 font-medium truncate group-hover:text-slate-900 transition-colors",children:e.away_team})]})]})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center",children:[(0,a.jsx)("span",{className:"text-[12px] text-[var(--accent-cyan)] font-mono font-bold",children:"-"!==e.score?e.score:"-"}),(0,a.jsx)("span",{className:"text-[12px] text-[#64748B]",children:"-"})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center",children:[(0,a.jsx)("span",{className:"text-[12px] text-[#64748B]",children:"-"}),(0,a.jsx)("span",{className:"text-[12px] text-[#64748B]",children:"-"})]}),(0,a.jsx)(x,{values:e.handicap,hasLine:!0}),(0,a.jsx)(x,{values:e.over_under,hasLine:!0}),(0,a.jsx)("div",{className:"flex flex-col items-center gap-0",children:e.one_x_two?.length>0?e.one_x_two.map((e,t)=>(0,a.jsx)("span",{className:"text-[11px] text-slate-500 leading-[18px]",children:e||"-"},t)):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"text-[11px] text-[#64748B] leading-[18px]",children:"-"}),(0,a.jsx)("span",{className:"text-[11px] text-[#64748B] leading-[18px]",children:"-"}),(0,a.jsx)("span",{className:"text-[11px] text-[#64748B] leading-[18px]",children:"-"})]})})]},t))]},t)):(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center py-20 gap-3 bg-slate-50",children:[(0,a.jsx)("svg",{className:"w-12 h-12 text-slate-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",strokeWidth:1.5,children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6.75 3v2.25M17.25 3v2.25M3 18.75V7.5a2.25 2.25 0 012.25-2.25h13.5A2.25 2.25 0 0121 7.5v11.25m-18 0A2.25 2.25 0 005.25 21h13.5A2.25 2.25 0 0021 18.75m-18 0v-7.5A2.25 2.25 0 015.25 9h13.5A2.25 2.25 0 0121 11.25v7.5"})}),(0,a.jsx)("span",{className:"text-slate-500 font-medium tracking-wide",children:"Kh\xf4ng c\xf3 trận đấu n\xe0o cho ng\xe0y n\xe0y"}),(0,a.jsx)("span",{className:"text-slate-400 text-[12px]",children:"H\xe3y thử chọn một ng\xe0y kh\xe1c"})]})]}),(0,a.jsxs)("div",{className:"mt-6 text-center text-[11px] text-[#64748B] uppercase tracking-widest font-bold drop-shadow-sm",children:["Tổng cộng ",A," trận đấu trong ",S.length," giải"]}),(0,a.jsx)(i,{html:o})]}):(0,a.jsxs)("div",{className:"max-w-[1440px] mx-auto px-4 py-8",children:[(0,a.jsx)(n.G,{eyebrow:"Lịch thi đấu",title:"LỊCH THI ĐẤU"}),(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center py-16 gap-4",children:[(0,a.jsx)("div",{className:"w-12 h-12 rounded-full border-2 border-[#E11D48]/30 border-t-[#E11D48] animate-spin"}),(0,a.jsx)("span",{className:"text-slate-500 text-sm font-medium tracking-wide",children:"Đang tải lịch thi đấu..."})]})]})}function x({values:e,hasLine:t}){return e&&0!==e.length?t&&e.length>=3?(0,a.jsxs)("div",{className:"flex flex-col items-center gap-0",children:[(0,a.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,a.jsx)("span",{className:"text-[11px] text-[#E11D48] leading-[18px] font-bold",children:e[0]}),(0,a.jsx)("span",{className:"text-[11px] text-slate-500 leading-[18px]",children:e[1]})]}),(0,a.jsx)("span",{className:"text-[11px] text-slate-500 leading-[18px]",children:e[2]})]}):(0,a.jsx)("div",{className:"flex flex-col items-center gap-0",children:e.map((e,t)=>(0,a.jsx)("span",{className:"text-[11px] text-slate-500 leading-[18px]",children:e||"-"},t))}):(0,a.jsxs)("div",{className:"flex flex-col items-center",children:[(0,a.jsx)("span",{className:"text-[11px] text-[#64748B] leading-[18px]",children:"-"}),(0,a.jsx)("span",{className:"text-[11px] text-[#64748B] leading-[18px]",children:"-"})]})}},49270:(e,t,s)=>{"use strict";s.d(t,{Klivevip04ResultsPage:()=>o});var a=s(68019),l=s(10707),r=s(78637),n=s(30675),i=s(46933);function o({initialData:e,selectedLeague:t}){let s=(0,r.useRouter)(),c=(0,r.usePathname)(),d=(0,r.useSearchParams)(),[x,h]=(0,l.useTransition)(),[m,p]=(0,l.useState)(!1),[u,g]=(0,l.useState)(""),{availableLeagues:b,dateGroups:f}=(0,l.useMemo)(()=>(0,i.o8)(e),[e]),j=(0,l.useMemo)(()=>Array.from(new Set(f.map(e=>e.date_header))),[f]),w=d.get("date")||"",v=e=>{let t=new URLSearchParams(d.toString());e&&e!==w?t.set("date",e):t.delete("date"),h(()=>{let e=t.toString();s.push(e?`${c}?${e}`:c,{scroll:!1})})},N=(0,l.useMemo)(()=>{let e=f;return w&&(e=e.filter(e=>e.date_header===w)),(0,i.kK)(e,t)},[f,w,t]),y=(0,l.useMemo)(()=>
545{if(!u)return b;let e=u.toLowerCase();return b.filter(t=>t.name.toLowerCase().includes(e))},[b,u]),_=N.reduce((e,t)=>e+t.matches.length,0);if(0===f.length)return(0,a.jsxs)("div",{className:"max-w-[1440px] mx-auto px-4 py-8",children:[(0,a.jsx)(n.D,{eyebrow:"Kết quả",title:"KẾT QUẢ B\xd3NG Đ\xc1"}),(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center py-16 gap-4",children:[(0,a.jsx)("div",{className:"w-12 h-12 rounded-full border-2 border-[#E11D48]/30 border-t-[#E11D48] animate-spin"}),(0,a.jsx)("span",{className:"text-slate-500 text-sm font-medium tracking-wide",children:"Đang tải kết quả..."})]})]});let k=e=>{let t=new URLSearchParams(d.toString());e?t.set("league",e):t.delete("league"),p(!1),g(""),h(()=>{let e=t.toString();s.push(e?`${c}?${e}`:c,{scroll:!1})})};return(0,a.jsxs)("div",{className:"max-w-[1440px] mx-auto px-4 py-8",children:[(0,a.jsx)(n.D,{eyebrow:"Kết quả",title:"KẾT QUẢ B\xd3NG Đ\xc1",rightSlot:(0,a.jsx)("div",{className:"text-[12px] text-slate-600",children:(0,a.jsx)("span",{className:"text-slate-900/80 font-bold",children:t||"Tất cả giải đấu"})})}),(0,a.jsxs)("div",{className:"flex flex-col md:flex-row gap-4 mb-4 items-start md:items-center justify-between",children:[j.length>0&&(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,a.jsx)("button",{type:"button",onClick:()=>v(""),className:`px-4 py-2 rounded-xl text-sm font-bold transition-all duration-300 ${!w?"bg-gradient-to-r from-[#4681E8] to-[#2563eb] text-white shadow-[0_4px_15px_rgba(70,129,232,0.4)] border border-[#4681E8]/50":"bg-white text-[#64748B] border border-slate-200 hover:bg-slate-50 hover:text-slate-800"}`,children:"Tất cả ng\xe0y"}),j.slice(0,5).map(e=>(0,a.jsx)("button",{type:"button",onClick:()=>v(e),className:`px-4 py-2 rounded-xl text-sm font-bold transition-all duration-300 ${w===e?"bg-gradient-to-r from-[#4681E8] to-[#2563eb] text-white shadow-[0_4px_15px_rgba(70,129,232,0.4)] border border-[#4681E8]/50":"bg-white text-[#64748B] border border-slate-200 hover:bg-slate-50 hover:text-slate-800"}`,children:e},e))]}),(0,a.jsxs)("div",{className:"relative w-full md:w-[320px]",children:[(0,a.jsxs)("button",{onClick:()=>p(!m),className:"w-full flex items-center gap-3 bg-white hover:bg-slate-50 px-4 py-2.5 rounded-xl border border-slate-200 shadow-inner transition-all text-sm",children:[(0,a.jsx)("svg",{className:"w-5 h-5 text-[#4681E8]",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 4a1 1 0 011-1h16a1 1 0 011 1v2.586a1 1 0 01-.293.707l-6.414 6.414a1 1 0 00-.293.707V17l-4 4v-6.586a1 1 0 00-.293-.707L3.293 7.293A1 1 0 013 6.586V4z"})}),(0,a.jsx)("span",{className:"text-slate-700 font-bold flex-1 text-left truncate",children:t||"Chọn giải đấu..."}),(0,a.jsx)("svg",{className:`w-4 h-4 text-slate-400 transition-transform ${m?"rotate-180":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),m&&(0,a.jsxs)("div",{className:"absolute top-full left-0 right-0 mt-2 bg-white border border-slate-200 rounded-2xl shadow-xl z-50 max-h-[300px] overflow-hidden flex flex-col",children:[(0,a.jsx)("div",{className:"p-2 border-b border-slate-100",children:(0,a.jsx)("input",{type:"text",placeholder:"T\xecm giải đấu...",value:u,onChange:e=>g(e.target.value),className:"w-full bg-slate-50 border border-transparent rounded-xl px-4 py-2.5 text-sm text-slate-800 placeholder-slate-400 outline-none focus:border-[#4681E8]/50 transition-colors"})}),(0,a.jsxs)("div",{className:"overflow-y-auto flex-1 pb-2",children:[(0,a.jsx)("button",{type:"button",onClick:()=>k(),className:`block w-full text-left px-4 py-3 text-sm transition-colors ${!t?"bg-[#4681E8]/10 text-[#4681E8] border-l-4 border-[#4681E8]":"text-slate-600 hover:bg-slate-50 hover:text-slate-800"}`,children:"Tất cả giải đấu"}),y.map((e,s)=>(0,a.jsxs)("button",{type:"button",onClick:()=>k(e.name),className:`flex items-center gap-3 px-4 py-3 text-sm transition-colors cursor-pointer ${t===e.name?"bg-[#4681E8]/10 text-[#4681E8] border-l-4 border-[#4681E8]":"text-slate-600 hover:bg-slate-50 hover:text-slate-800"}`,children:[e.icon?(0,a.jsx)("img",{src:e.icon,alt:e.name||"League",className:"w-5 h-5 object-contain shrink-0",loading:"lazy",decoding:"async"}):(0,a.jsx)("div",{className:"w-5 h-5 rounded-md bg-slate-200 shrink-0"}),(0,a.jsx)("span",{className:"truncate",children:e.name})]},s))]})]})]})]}),x&&(0,a.jsxs)("div",{className:"mb-4 inline-flex items-center gap-2 rounded-full border border-slate-200 bg-white px-4 py-2 text-xs text-slate-500 shadow-sm",children:[(0,a.jsx)("span",{className:"h-2 w-2 rounded-full bg-[#E11D48] animate-pulse shadow-[0_0_8px_rgba(225,29,72,0.8)]"}),(0,a.jsx)("span",{className:"font-bold tracking-wide",children:"Đang tải kết quả từ server..."})]}),(0,a.jsx)("div",{className:"space-y-4",children:0===N.length?(0,a.jsx)("div",{className:"text-center py-16 text-[#64748B] font-medium tracking-wide",children:"Kh\xf4ng c\xf3 kết quả n\xe0o"}):N.map((e,t)=>(0,a.jsxs)("div",{className:"overflow-hidden rounded-2xl border border-slate-200 bg-white shadow-[0_8px_30px_rgba(0,0,0,0.06)]",children:[(0,a.jsx)("div",{className:"bg-slate-50 px-5 py-3 border-b border-slate-100 flex items-center justify-between",children:(0,a.jsxs)("span",{className:"text-[12px] text-slate-500 font-bold uppercase tracking-widest",children:[e.league_round?e.league_round:"V\xf2ng đấu",(0,a.jsx)("span",{className:"text-[#E11D48] ml-2 font-mono text-[11px] bg-[#E11D48]/10 px-2 py-0.5 rounded-full border border-[#
545E11D48]/20",children:e.date_header})]})}),e.matches.map((e,t)=>{var s;return(0,a.jsx)("div",{className:"bg-transparent hover:bg-slate-50 border-b border-slate-100 last:border-0 transition-colors group cursor-default",children:(0,a.jsxs)("div",{className:"flex items-center py-4 px-5 gap-4",children:[(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center min-w-[56px] shrink-0 border-r border-slate-100 pr-4",children:[(0,a.jsx)("span",{className:"text-[9px] text-slate-400 uppercase tracking-widest mb-1 font-bold",children:"L\xfac"}),(0,a.jsx)("span",{className:"text-[13px] text-slate-700 font-mono font-black",children:e.time})]}),(0,a.jsxs)("div",{className:"flex-1 flex items-center justify-end gap-3 min-w-0",children:[(0,a.jsx)("span",{className:"text-[14px] text-slate-800 font-bold truncate text-right group-hover:text-slate-900 transition-colors",children:e.home_team}),e.home_logo?(0,a.jsx)("div",{className:"w-8 h-8 rounded-full bg-slate-100 border border-slate-200 p-1 flex items-center justify-center shadow-sm",children:(0,a.jsx)("img",{src:e.home_logo,alt:e.home_team||"Home team",className:"w-full h-full object-contain",loading:"lazy"})}):(0,a.jsx)("div",{className:"w-8 h-8 rounded-full bg-slate-100 shrink-0 border border-slate-200 flex items-center justify-center text-[10px] font-bold text-slate-400",children:"?"})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center min-w-[90px] shrink-0 bg-slate-50 rounded-xl py-2 px-2 border border-slate-200 shadow-inner group-hover:border-[#4681E8]/40 transition-colors",children:[(0,a.jsx)("span",{className:`text-[22px] leading-none font-black tracking-widest drop-shadow-[0_2px_4px_rgba(0,0,0,0.8)] ${!(s=e.score)||"-"===s?"text-slate-400":"text-slate-800"}`,children:e.score}),e.ht_score&&(0,a.jsxs)("span",{className:"text-[10px] text-slate-500 font-mono mt-1 font-bold",children:["HT: ",e.ht_score]})]}),(0,a.jsxs)("div",{className:"flex-1 flex items-center gap-3 min-w-0",children:[e.away_logo?(0,a.jsx)("div",{className:"w-8 h-8 rounded-full bg-slate-100 border border-slate-200 p-1 flex items-center justify-center shadow-sm",children:(0,a.jsx)("img",{src:e.away_logo,alt:e.away_team||"Away team",className:"w-full h-full object-contain",loading:"lazy"})}):(0,a.jsx)("div",{className:"w-8 h-8 rounded-full bg-slate-100 shrink-0 border border-slate-200 flex items-center justify-center text-[10px] font-bold text-slate-400",children:"?"}),(0,a.jsx)("span",{className:"text-[14px] text-slate-800 font-bold truncate text-left group-hover:text-slate-900 transition-colors",children:e.away_team})]})]})},t)})]},t))}),(0,a.jsxs)("div",{className:"mt-6 text-center text-xs text-[#64748B] font-bold uppercase tracking-widest drop-shadow-sm",children:["Hiển thị ",_," kết quả trận đấu"]})]})}},49344:(e,t,s)=>{"use strict";function a(e){let t=e?.fixtures_v2||null,s=e?.fixtures||e?.schedules||[],a=t?.date_tabs?.length?t.date_tabs:function(e=new Date){let t=["Chủ Nhật","Thứ Hai","Thứ Ba","Thứ Tư","Thứ Năm","Thứ S\xe1u","Thứ Bảy"],s=[];for(let a=0;a<14;a+=1){let l=new Date(e);l.setDate(l.getDate()+a);let r=String(l.getDate()).padStart(2,"0"),n=String(l.getMonth()+1).padStart(2,"0"),i=`${l.getFullYear()}-${l.getMonth()+1}-${l.getDate()}`;s.push({label:0===a?"H\xf4m Nay":t[l.getDay()],date:`${r}.${n}`,dataValue:i,active:0===a})}return s}(),l=e?.selected_date||a.find(e=>e.active)?.dataValue||a[0]?.dataValue||null;if(t?.leagues?.length)return{dateTabs:a,selectedDate:l,leagues:t.leagues,totalMatches:t.leagues.reduce((e,t)=>e+t.matches.length,0)};let r=[],n=new Set;return s.forEach(e=>{let t=e.data;if(!(t.length<3))for(let s=0;s+2<t.length;s+=16){let a=t[s]||"",l=t[s+1]||"",i=t[s+2]||"",o=`${a}-${l}-${i}`;if(!n.has(o)&&l&&(n.add(o),r.push({time:a,home_team:l,away_team:i,home_logo:e.team_logos?.[2*Math.floor(s/16)]||"",away_logo:e.team_logos?.[2*Math.floor(s/16)+1]||"",score:t[s+3]||"-",ht_score:t[s+4]||"",handicap:t.length>s+9?[t[s+7]||"",t[s+8]||"",t[s+9]||""]:[],over_under:t.length>s+12?[t[s+10]||"",t[s+11]||"",t[s+12]||""]:[],one_x_two:t.length>s+15?[t[s+13]||"",t[s+14]||"",t[s+15]||""]:[]}),s+16>=t.length))break}}),{dateTabs:a,selectedDate:l,leagues:r.length>0?[{league_name:"Tất cả trận đấu",league_icon:"",match_count:r.length,matches:r}]:[],totalMatches:r.length}}function l(e){let t=e?.results_v2||null,s=e?.results||[];if(t?.date_groups?.length)return{availableLeagues:t.available_leagues||[],dateGroups:t.date_groups,totalMatches:t.date_groups.reduce((e,t)=>
545e+t.matches.length,0)};let a=[];return s.forEach(e=>{let t=e.data;if(t.length<6)return;let s=t[0],l=s.split(" - "),r=[],n=1,i=0;for(;n<t.length;){if(t[n]?.startsWith("L\xfac")){let s=t[n].replace("L\xfac","").trim();r.push({time:s,home_team:t[n+1]||"",away_team:t[n+4]||"",home_logo:e.team_logos?.[i]||"",away_logo:e.team_logos?.[i+1]||"",score:t[n+2]||"",ht_score:(t[n+3]||"").replace("H1:","").replace("HT:","").trim()}),i+=2,n+=5;continue}n+=1}r.length>0&&a.push({date_header:l[0]?.trim()||s,league_round:l.slice(1).join(" - ").trim(),matches:r})}),{availableLeagues:[],dateGroups:a,totalMatches:a.reduce((e,t)=>e+t.matches.length,0)}}function r(e,t){if(!t)return e;let s=t.toLowerCase();return e.filter(e=>e.league_round.toLowerCase().includes(s))}s.d(t,{kK:()=>r,o8:()=>l,p_:()=>a})},50154:(e,t,s)=>{"use strict";function a(e){let t=e?.fixtures_v2||null,s=e?.fixtures||e?.schedules||[],a=t?.date_tabs?.length?t.date_tabs:function(e=new Date){let t=["Chủ Nhật","Thứ Hai","Thứ Ba","Thứ Tư","Thứ Năm","Thứ S\xe1u","Thứ Bảy"],s=[];for(let a=0;a<14;a+=1){let l=new Date(e);l.setDate(l.getDate()+a);let r=String(l.getDate()).padStart(2,"0"),n=String(l.getMonth()+1).padStart(2,"0"),i=`${l.getFullYear()}-${l.getMonth()+1}-${l.getDate()}`;s.push({label:0===a?"H\xf4m Nay":t[l.getDay()],date:`${r}.${n}`,dataValue:i,active:0===a})}return s}(),l=e?.selected_date||a.find(e=>e.active)?.dataValue||a[0]?.dataValue||null;if(t?.leagues?.length)return{dateTabs:a,selectedDate:l,leagues:t.leagues,totalMatches:t.leagues.reduce((e,t)=>e+t.matches.length,0)};let r=[],n=new Set;return s.forEach(e=>{let t=e.data;if(!(t.length<3))for(let s=0;s+2<t.length;s+=16){let a=t[s]||"",l=t[s+1]||"",i=t[s+2]||"",o=`${a}-${l}-${i}`;if(!n.has(o)&&l&&(n.add(o),r.push({time:a,home_team:l,away_team:i,home_logo:e.team_logos?.[2*Math.floor(s/16)]||"",away_logo:e.team_logos?.[2*Math.floor(s/16)+1]||"",score:t[s+3]||"-",ht_score:t[s+4]||"",handicap:t.length>s+9?[t[s+7]||"",t[s+8]||"",t[s+9]||""]:[],over_under:t.length>s+12?[t[s+10]||"",t[s+11]||"",t[s+12]||""]:[],one_x_two:t.length>s+15?[t[s+13]||"",t[s+14]||"",t[s+15]||""]:[]}),s+16>=t.length))break}}),{dateTabs:a,selectedDate:l,leagues:r.length>0?[{league_name:"Tất cả trận đấu",league_icon:"",match_count:r.length,matches:r}]:[],totalMatches:r.length}}function l(e){let t=e?.results_v2||null,s=e?.results||[];if(t?.date_groups?.length)return{availableLeagues:t.available_leagues||[],dateGroups:t.date_groups,totalMatches:t.date_groups.reduce((e,t)=>e+t.matches.length,0)};let a=[];return s.forEach(e=>{let t=e.data;if(t.length<6)return;let s=t[0],l=s.split(" - "),r=[],n=1,i=0;for(;n<t.length;){if(t[n]?.startsWith("L\xfac")){let s=t[n].replace("L\xfac","").trim();r.push({time:s,home_team:t[n+1]||"",away_team:t[n+4]||"",home_logo:e.team_logos?.[i]||"",away_logo:e.team_logos?.[i+1]||"",score:t[n+2]||"",ht_score:(t[n+3]||"").replace("H1:","").replace("HT:","").trim()}),i+=2,n+=5;continue}n+=1}r.length>0&&a.push({date_header:l[0]?.trim()||s,league_round:l.slice(1).join(" - ").trim(),matches:r})}),{availableLeagues:[],dateGroups:a,totalMatches:a.reduce((e,t)=>e+t.matches.length,0)}}function r(e,t){if(!t)return e;let s=t.toLowerCase();return e.filter(e=>e.league_round.toLowerCase().includes(s))}s.d(t,{kK:()=>r,o8:()=>l,p_:()=>a})},50179:(e,t,s)=>{"use strict";function a(e){let t=e?.fixtures_v2||null,s=e?.fixtures||e?.schedules||[],a=t?.date_tabs?.length?t.date_tabs:function(e=new Date){let t=["Chủ Nhật","Thứ Hai","Thứ Ba","Thứ Tư","Thứ Năm","Thứ S\xe1u","Thứ Bảy"],s=[];for(let a=0;a<14;a+=1){let l=new Date(e);l.setDate(l.getDate()+a);let r=String(l.getDate()).padStart(2,"0"),n=String(l.getMonth()+1).padStart(2,"0"),i=`${l.getFullYear()}-${l.getMonth()+1}-${l.getDate()}`;s.push({label:0===a?"H\xf4m Nay":t[l.getDay()],date:`${r}.${n}`,dataValue:i,active:0===a})}return s}(),l=e?.selected_date||a.find(e=>e.active)?.dataValue||a[0]?.dataValue||null;if(t?.leagues?.length)return{dateTabs:a,selectedDate:l,leagues:t.leagues,totalMatches:t.leagues.reduce((e,t)=>e+t.matches.length,0)};let r=[],n=new Set;
545return s.forEach(e=>{let t=e.data;if(!(t.length<3))for(let s=0;s+2<t.length;s+=16){let a=t[s]||"",l=t[s+1]||"",i=t[s+2]||"",o=`${a}-${l}-${i}`;if(!n.has(o)&&l&&(n.add(o),r.push({time:a,home_team:l,away_team:i,home_logo:e.team_logos?.[2*Math.floor(s/16)]||"",away_logo:e.team_logos?.[2*Math.floor(s/16)+1]||"",score:t[s+3]||"-",ht_score:t[s+4]||"",handicap:t.length>s+9?[t[s+7]||"",t[s+8]||"",t[s+9]||""]:[],over_under:t.length>s+12?[t[s+10]||"",t[s+11]||"",t[s+12]||""]:[],one_x_two:t.length>s+15?[t[s+13]||"",t[s+14]||"",t[s+15]||""]:[]}),s+16>=t.length))break}}),{dateTabs:a,selectedDate:l,leagues:r.length>0?[{league_name:"Tất cả trận đấu",league_icon:"",match_count:r.length,matches:r}]:[],totalMatches:r.length}}function l(e){let t=e?.results_v2||null,s=e?.results||[];if(t?.date_groups?.length)return{availableLeagues:t.available_leagues||[],dateGroups:t.date_groups,totalMatches:t.date_groups.reduce((e,t)=>e+t.matches.length,0)};let a=[];return s.forEach(e=>{let t=e.data;if(t.length<6)return;let s=t[0],l=s.split(" - "),r=[],n=1,i=0;for(;n<t.length;){if(t[n]?.startsWith("L\xfac")){let s=t[n].replace("L\xfac","").trim();r.push({time:s,home_team:t[n+1]||"",away_team:t[n+4]||"",home_logo:e.team_logos?.[i]||"",away_logo:e.team_logos?.[i+1]||"",score:t[n+2]||"",ht_score:(t[n+3]||"").replace("H1:","").replace("HT:","").trim()}),i+=2,n+=5;continue}n+=1}r.length>0&&a.push({date_header:l[0]?.trim()||s,league_round:l.slice(1).join(" - ").trim(),matches:r})}),{availableLeagues:[],dateGroups:a,totalMatches:a.reduce((e,t)=>e+t.matches.length,0)}}function r(e,t){if(!t)return e;let s=t.toLowerCase();return e.filter(e=>e.league_round.toLowerCase().includes(s))}s.d(t,{kK:()=>r,o8:()=>l,p_:()=>a})},52837:(e,t,s)=>{"use strict";s.d(t,{StandingsClient:()=>h});var a=s(68019),l=s(10707),r=s(46914),n=s(42879);function i(e){return"W"===e?"border border-emerald-500/45 bg-emerald-500/25 text-emerald-300 shadow-[0_0_0_1px_rgba(16,185,129,0.08)_inset]":"L"===e?"border border-red-500/45 bg-red-500/25 text-red-300 shadow-[0_0_0_1px_rgba(239,68,68,0.08)_inset]":"D"===e?"border border-amber-400/45 bg-amber-400/22 text-amber-200 shadow-[0_0_0_1px_rgba(251,191,36,0.08)_inset]":"border border-slate-500/40 bg-slate-500/18 text-slate-700"}function o(e,t){return 1===e?{bar:"bg-[linear-gradient(180deg,#facc15,#f97316)]",badge:"border-emerald-600/60 bg-slate-100 text-yellow-700 shadow-[0_0_18px_rgba(250,204,21,0.14)]",row:"from-[#32230d]/70 via-transparent to-transparent"}:e<=4?{bar:"bg-[linear-gradient(180deg,#fb7185,#f97316)]",badge:"border-[#fb7185]/45 bg-slate-100 text-rose-700",row:"from-[#241318]/55 via-transparent to-transparent"}:e<=6?{bar:"bg-[linear-gradient(180deg,#f59e0b,#facc15)]",badge:"border-[#f59e0b]/45 bg-slate-100 text-yellow-700",row:"from-[#24190b]/45 via-transparent to-transparent"}:e<=10?{bar:"bg-[linear-gradient(180deg,#38bdf8,#2563eb)]",badge:"border-sky-400/40 bg-white text-sky-700",row:"from-[#101725]/32 via-transparent to-transparent"}:e>=Math.max(t-2,1)?{bar:"bg-[linear-gradient(180deg,#ef4444,#7f1d1d)]",badge:"border-red-500/40 bg-slate-100 text-red-700",row:"from-[#220f14]/45 via-transparent to-transparent"}:{bar:"bg-[linear-gradient(180deg,#64748b,#334155)]",badge:"border-slate-500/35 bg-white text-slate-700",row:"from-[#12161d]/24 via-transparent to-transparent"}}function c({detail:e}){let[t,s]=(0,l.useState)(!1),n=(0,l.useRef)(null),[o,d]=(0,l.useState)({top:0,left:0}),x=i(e.result),h=(0,l.useCallback)(()=>{if(n.current){let e=n.current.getBoundingClientRect();d({top:e.top+window.scrollY-8,left:e.left+e.width/2+window.scrollX})}s(!0)},[]);return(0,a.jsxs)("div",{ref:n,className:"relative inline-flex",onMouseEnter:h,onMouseLeave:()=>s(!1),children:[(0,a.jsx)("span",{className:`inline-flex h-7 w-7 items-center justify-center rounded-[8px] text-[11px] font-black cursor-pointer transition-transform hover:-translate-y-0.5 ${x}`,children:e.result}),t&&e.match_time&&"u">typeof document&&(0,r.createPortal)((0,a.jsxs)("div",{className:"fixed z-[9999] w-[220px] pointer-events-none",style:{top:`${o.top}px`,left:`${o.left}px`,transform:"translate(-50%, -100%)",position:"absolute"},children:[(0,a.jsxs)("div",{className:"overflow-hidden rounded-xl border border-[#cbd5e1] bg-white shadow-2xl",children:[(0,a.jsx)("div",{className:"bg-slate-100 px-3 py-1.5 text-[10px] text-slate-600 font-mono text-center border-b border-[#cbd5e1]",children:e.match_time}),(0,a.jsxs)("div",{className:"px-3 py-2.5 flex items-center justify-between gap-2",children:[(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5 flex-1 min-w-0",children:[e.home_logo?(0,a.jsx)("img",{src:e.home_logo,alt:e.home_team,className:"w-7 h-7 object-contain",loading:"lazy",decoding:"async"}):(0,a.jsx)("div",{className:"w-7 h-7 rounded-full bg-gray-700 flex items-center justify-center text-[8px] text-slate-600 font-bold",children:"?"}),(0,a.jsx)("span",{className:"text-[9px] text-slate-600 font-bold text-center leading-tight line-clamp-2 max-w-[70px]",children:e.home_team})]}),(0,a.jsx)("div",{className:"text-slate-900 font-black text-sm whitespace-nowrap px-1",children:e.score||"? - ?"}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5 flex-1 min-w-0",children:[e.away_logo?(0,a.jsx)("img",{src:e.away_logo,alt:e.away_team,className:"w-7 h-7 object-contain",loading:"lazy",decoding:"async"}):(0,a.jsx)("div",{className:"w-7 h-7 rounded-full bg-gray-700 flex items-center justify-center text-[8px] text-slate-600 font-bold",children:"?"}),(0,a.jsx)("span",{className:"text-[9px] text-slate-600 font-bold text-center leading-tight line-clamp-2 max-w-[70px]",children:e.away_team})]})]})]}),(0,a.jsx)("div",{className:"absolute left-1/2 -translate-x-1/2 -bottom-1 w-2 h-2 bg-white border-r border-b border-[#cbd5e1] rotate-45"})]}),document.body)]})}function d({result:e}){let t=i(e);return(0,a.jsx)("span",{className:`inline-flex h-7 w-7 items-center justify-center rounded-[8px] text-[11px] font-black ${t}`,children:e})}function x({value:e,totalTeams:t}){let s=Number(e);if(!Number.isFinite(s))return(0,a.jsx)("td",{className:"px-4 py-4 text-center font-mono font-black text-slate-400",children:e});let l=o(s,t);return(0,a.jsxs)("td",{className:"relative px-4 py-4 text-center font-mono",children:[(0,a.jsx)("span",{className:`absolute left-0 top-1/2 h-7 w-1 -translate-y-1/2 roun
545ded-r-full ${l.bar}`}),(0,a.jsx)("span",{className:`inline-flex h-8 w-8 items-center justify-center rounded-[10px] border text-[13px] font-black ${l.badge}`,children:s})]})}function h({initialData:e}){let[t]=(0,l.useState)(!1),[s,r]=(0,l.useState)(!1),[i,p]=(0,l.useState)(""),u=(0,l.useRef)(null);if((0,l.useEffect)(()=>{function e(e){u.current&&!u.current.contains(e.target)&&r(!1)}return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[]),!e)return(0,a.jsx)("div",{className:"text-center py-20 text-slate-600",children:"Đang tải dữ liệu..."});let g=e.available_leagues||[],b=g.filter(e=>e.name.toLowerCase().includes(i.toLowerCase())),f=e.teams&&e.teams.length>0&&Array.isArray(e.teams[0]?.form),j=!f&&e.rankings;return(0,a.jsxs)("div",{className:"mx-auto max-w-[1440px] px-4 py-8",children:[(0,a.jsx)(n.B,{eyebrow:"Bảng xếp hạng",title:"BẢNG XẾP HẠNG",rightSlot:(0,a.jsx)("div",{className:"text-[12px] text-slate-600",children:(0,a.jsx)("span",{className:"text-slate-900/80 font-bold",children:e.league_name})})}),g.length>0&&(0,a.jsxs)("div",{className:"mb-6",ref:u,children:[(0,a.jsxs)("div",{className:"relative inline-flex min-w-[320px] items-center gap-3 rounded-2xl border border-slate-200 bg-white backdrop-blur-md px-5 py-3.5 cursor-pointer shadow-[0_8px_30px_rgba(0,0,0,0.06)] transition-colors hover:border-[#4681E8]/50 hover:shadow-[0_8px_30px_rgba(70,129,232,0.1)]",onClick:()=>r(!s),children:[e.league_icon&&(0,a.jsx)("img",{src:e.league_icon,alt:e.league_name||"League icon",className:"w-6 h-6 object-contain",loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-slate-800 font-bold text-sm flex-1",children:e.league_name||"Chọn giải đấu"}),(0,a.jsx)("svg",{className:`w-4 h-4 text-[#4681E8] transition-transform ${s?"rotate-180":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),s&&(0,a.jsxs)("div",{className:"absolute z-50 mt-2 w-[360px] overflow-hidden rounded-2xl border border-slate-200 bg-white backdrop-blur-xl shadow-[0_24px_80px_rgba(0,0,0,0.15)]",children:[(0,a.jsx)("div",{className:"p-2 border-b border-slate-100",children:(0,a.jsx)("input",{type:"text",placeholder:"T\xecm kiếm giải đấu...",value:i,onChange:e=>p(e.target.value),className:"w-full bg-slate-50 text-slate-800 text-sm px-4 py-2.5 rounded-xl border border-transparent outline-none focus:border-[#4681E8]/50 placeholder-slate-400 transition-colors",autoFocus:!0})}),(0,a.jsxs)("div",{className:"max-h-[340px] overflow-y-auto",children:[b.map(t=>(0,a.jsxs)("a",{href:`/standings?league=${encodeURIComponent(t.id)}`,className:`flex items-center gap-3 px-4 py-3 cursor-pointer transition-colors hover:bg-slate-50 ${t.id===e.league_id?"bg-[#4681E8]/10 border-l-4 border-[#4681E8]":""}`,children:[t.icon?(0,a.jsx)("img",{src:t.icon,alt:t.name||"League",className:"w-5 h-5 object-contain flex-shrink-0",loading:"lazy",decoding:"async"}):(0,a.jsx)("div",{className:"w-5 h-5 rounded bg-gray-700 flex-shrink-0"}),(0,a.jsx)("span",{className:"text-sm text-slate-900 truncate",children:t.name})]},t.id)),0===b.length&&(0,a.jsx)("div",{className:"px-4 py-8 text-center text-gray-500 text-sm",children:"Kh\xf4ng t\xecm thấy giải đấu"})]})]})]}),t&&(0,a.jsxs)("div",{className:"flex items-center justify-center py-12",children:[(0,a.jsx)("div",{className:"animate-spin w-8 h-8 border-2 border-emerald-600 border-t-transparent rounded-full"}),(0,a.jsx)("span",{className:"ml-3 text-slate-600 text-sm",children:"Đang tải bảng xếp hạng từ server..."})]}),!t&&f&&(0,a.jsxs)("div",{className:"overflow-hidden rounded-[24px] border border-slate-200 bg-white shadow-[0_8px_30px_rgba(0,0,0,0.08)]",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between gap-3 border-b border-[#4681E8]/20 bg-gradient-to-r from-[#4681E8] to-[#2563eb] px-6 py-4 text-white shadow-[0_4px_25px_rgba(70,129,232,0.3)]",children:[(0,a.jsx)("div",{className:"text-[13px] font-black uppercase tracking-[0.2em] drop-shadow-sm text-white/80",children:"League"}),(0,a.jsx)("div",{className:"truncate text-sm font-black sm:text-base drop-shadow-md",children:e.league_name})]}),(0,a.jsx)("div",{className:"overflow-x-auto",children:(0,a.jsxs)("table",{className:"w-full text-left border-collapse",children:[(0,a.jsx)("thead",{children:(0,a.jsx)("tr",{className:"bg-slate-50 text-[11px] uppercase tracking-[0.2em] text-slate-500",children:e.header.map((t,s)=>{let l=e.teams.some(e=>e.form&&e.form.length>0);return t.toLowerCase().includes("phong độ")&&!l?null:(0,a.jsx)("th",{colSpan:s===e.header.length-1&&l?5:1,className:`p-4 font-semibold ${1===s?"w-1/3 text-left":"text-center"}`,children:t},s)})})}),(0,a.jsx)("tbody",{className:"text-sm",children:e.teams.map((t,s)=>(o(Number(t.data[0]||s+1),e.teams.length),(0,a.jsxs)("tr",{className:"group border-b border-slate-100 bg-white transition-colors hover:bg-slate-50 cursor-pointer",children:[t.data.map((s,l)=>0===l?(0,a.jsx)(x,{value:s,totalTeams:e.teams.length},l):1===l?(0,a.jsx)("td",{className:"p-4",children:(0,a.jsxs)("div",{className:"flex items-center gap-3 rounded-2xl border border-slate-100 bg-slate-50 px-4 py-2.5 transition-colors group-hover:border-[#4681E8]/30 group-hover:bg-[#4681E8]/5",children:[t.team_logo?(0,a.jsx)("img",{src:t.team_logo,alt:s,className:"h-8 w-8 rounded-full bg-white object-contain p-0.5 filter drop-shadow-[0_2px_4px_rgba(0,0,0,0.1)]",loading:"lazy"}):(0,a.jsx)("div",{className:"flex h-8 w-8 items-center justify-center rounded-full border border-slate-200 bg-white text-[10px] font-bold text-slate-400",children:"?"}),(0,a.jsx)("span",{className:"font-bold text-slate-800 transition-colors group-hover:text-[#4681E8]",children:s})]})},l):(0,a.jsx)("td",{className:"p-4 text-center font-mono text-slate-600",children:s},l)),t.form&&t.form.length>0&&(0,a.jsxs)(a.Fragment,{children:[t.form.map((e,t)=>(0,a.jsx)("td",{className:"p-2 text-center",children:e.match_time?(0,a.jsx)(c,{detail:e}):(0,a.jsx)(d,{result:e.result})},`form-${t}`)),t.form.length<5&&Array.from({length:5-t.form.length}).map((e,t)=>(0,a.jsx)("td",{className:"p-2"},`pad-${t}`))]})]},s)))})]})})]}),!t&&!f&&j&&(0,a.jsx)(m,{rankings:e.rankings}),!t&&!f&&!j&&e.header&&e.teams&&(0,a.jsx)("div",{className:"text-center py-20 text-slate-600",children:"Dữ liệu đang được cập nhật..."}),!t&&(f||j)&&(0,a.jsxs)("div",{className:"mt-6 flex flex-wrap items-center gap-5 px-5 py-4 bg-slate-50 rounded-2xl border border-slate-200",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,a.jsx)("span",{className:"w-2.5 h-2.5 rounded-full bg-emerald-500"}),(0,a.jsx)("span",{className:"text-[11px] text-slate-600 font-bold uppercase tracking-wider",children:"Đội trưởng bảng"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,a.jsx)("span",{className:"w-2.5 h-2.5 rounded-full bg-sky-4
54500"}),(0,a.jsx)("span",{className:"text-[11px] text-slate-600 font-bold uppercase tracking-wider",children:"Champions League"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,a.jsx)("span",{className:"w-2.5 h-2.5 rounded-full bg-amber-500"}),(0,a.jsx)("span",{className:"text-[11px] text-slate-600 font-bold uppercase tracking-wider",children:"Europa League"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,a.jsx)("span",{className:"w-2.5 h-2.5 rounded-full bg-[#f97316]"}),(0,a.jsx)("span",{className:"text-[11px] text-slate-600 font-bold uppercase tracking-wider",children:"Europa Conference"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,a.jsx)("span",{className:"w-2.5 h-2.5 rounded-full bg-[#E11D48]"}),(0,a.jsx)("span",{className:"text-[11px] text-slate-600 font-bold uppercase tracking-wider",children:"Xuống hạng"})]})]})]})}function m({rankings:e}){if(!e||0===e.length)return null;let t=e[0].data,s=e.slice(1);return(0,a.jsx)("div",{className:"overflow-hidden rounded-[22px] border border-[#cbd5e1] bg-[linear-gradient(180deg,#191a20,#111218)] shadow-[0_24px_80px_rgba(0,0,0,0.4)]",children:(0,a.jsx)("div",{className:"overflow-x-auto",children:(0,a.jsxs)("table",{className:"w-full text-left border-collapse",children:[(0,a.jsx)("thead",{children:(0,a.jsx)("tr",{className:"bg-white text-[11px] uppercase tracking-[0.18em] text-slate-600",children:t.map((e,l)=>{let r=l===t.length-1,n=s[0]&&s[0].data.length>t.length?s[0].data.length-t.length+1:1;return(0,a.jsx)("th",{colSpan:r?n:1,className:`p-4 font-semibold ${1===l?"w-1/3 text-left":"text-center"}`,children:e},l)})})}),(0,a.jsx)("tbody",{className:"text-sm",children:s.map((e,t)=>(0,a.jsx)("tr",{className:"group border-b border-[#cbd5e1] transition-colors hover:bg-white",children:e.data.map((t,l)=>0===l?(0,a.jsx)(x,{value:t,totalTeams:s.length},l):1===l?(0,a.jsx)("td",{className:"p-4",children:(0,a.jsxs)("div",{className:"flex items-center gap-3 rounded-2xl border border-white/6 bg-[linear-gradient(180deg,rgba(255,255,255,0.03),rgba(255,255,255,0.01))] px-3 py-2 transition-colors group-hover:border-emerald-600/22",children:[e.team_logo?(0,a.jsx)("img",{src:e.team_logo,alt:t,className:"h-8 w-8 rounded-full bg-white/5 object-contain ring-1 ring-white/8",loading:"lazy"}):(0,a.jsx)("div",{className:"flex h-8 w-8 items-center justify-center rounded-full border border-gray-700 bg-gray-800 text-xs font-bold text-gray-500",children:"?"}),(0,a.jsx)("span",{className:"font-bold text-slate-900 transition-colors group-hover:text-emerald-600",children:t})]})},l):["W","D","L"].includes(t)?(0,a.jsx)("td",{className:"p-2 text-center",children:(0,a.jsx)("span",{className:`inline-flex h-7 w-7 items-center justify-center rounded-[8px] text-[11px] font-black ${i(t)}`,children:t})},l):(0,a.jsx)("td",{className:"p-4 text-center font-mono text-slate-600",children:t},l))},t))})]})})})}},52957:(e,t,s)=>{"use strict";s.d(t,{Klivevip18ResultsPage:()=>o});var a=s(68019),l=s(10707),r=s(78637),n=s(38243),i=s(32312);function o({initialData:e,selectedLeague:t}){let s=(0,r.useRouter)(),c=(0,r.usePathname)(),d=(0,r.useSearchParams)(),[x,h]=(0,l.useTransition)(),[m,p]=(0,l.useState)(!1),[u,g]=(0,l.useState)(""),{availableLeagues:b,dateGroups:f}=(0,l.useMemo)(()=>(0,i.o8)(e),[e]),j=(0,l.useMemo)(()=>Array.from(new Set(f.map(e=>e.date_header))),[f]),w=d.get("date")||"",v=e=>{let t=new URLSearchParams(d.toString());e&&e!==w?t.set("date",e):t.delete("date"),h(()=>{let e=t.toString();s.push(e?`${c}?${e}`:c,{scroll:!1})})},N=(0,l.useMemo)(()=>{let e=f;return w&&(e=e.filter(e=>e.date_header===w)),(0,i.kK)(e,t)},[f,w,t]),y=(0,l.useMemo)(()=>{if(!u)return b;let e=u.toLowerCase();return b.filter(t=>t.name.toLowerCase().includes(e))},[b,u]),_=N.reduce((e,t)=>e+t.matches.length,0);if(0===f.length)return(0,a.jsxs)("div",{className:"max-w-[1440px] mx-auto px-4 py-8",children:[(0,a.jsx)(n.A,{eyebrow:"Kết quả",title:"KẾT QUẢ B\xd3NG Đ\xc1"}),(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center py-16 gap-4",children:[(0,a.jsx)("div",{className:"w-12 h-12 rounded-full border-2 border-[#
545E11D48]/30 border-t-[#E11D48] animate-spin"}),(0,a.jsx)("span",{className:"text-slate-500 text-sm font-medium tracking-wide",children:"Đang tải kết quả..."})]})]});let k=e=>{let t=new URLSearchParams(d.toString());e?t.set("league",e):t.delete("league"),p(!1),g(""),h(()=>{let e=t.toString();s.push(e?`${c}?${e}`:c,{scroll:!1})})};return(0,a.jsxs)("div",{className:"max-w-[1440px] mx-auto px-4 py-8",children:[(0,a.jsx)(n.A,{eyebrow:"Kết quả",title:"KẾT QUẢ B\xd3NG Đ\xc1",rightSlot:(0,a.jsx)("div",{className:"text-[12px] text-slate-600",children:(0,a.jsx)("span",{className:"text-slate-900/80 font-bold",children:t||"Tất cả giải đấu"})})}),(0,a.jsxs)("div",{className:"flex flex-col md:flex-row gap-4 mb-4 items-start md:items-center justify-between",children:[j.length>0&&(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,a.jsx)("button",{type:"button",onClick:()=>v(""),className:`px-4 py-2 rounded-xl text-sm font-bold transition-all duration-300 ${!w?"bg-gradient-to-r from-[#4681E8] to-[#2563eb] text-white shadow-[0_4px_15px_rgba(70,129,232,0.4)] border border-[#4681E8]/50":"bg-white text-[#64748B] border border-slate-200 hover:bg-slate-50 hover:text-slate-800"}`,children:"Tất cả ng\xe0y"}),j.slice(0,5).map(e=>(0,a.jsx)("button",{type:"button",onClick:()=>v(e),className:`px-4 py-2 rounded-xl text-sm font-bold transition-all duration-300 ${w===e?"bg-gradient-to-r from-[#4681E8] to-[#2563eb] text-white shadow-[0_4px_15px_rgba(70,129,232,0.4)] border border-[#4681E8]/50":"bg-white text-[#64748B] border border-slate-200 hover:bg-slate-50 hover:text-slate-800"}`,children:e},e))]}),(0,a.jsxs)("div",{className:"relative w-full md:w-[320px]",children:[(0,a.jsxs)("button",{onClick:()=>p(!m),className:"w-full flex items-center gap-3 bg-white hover:bg-slate-50 px-4 py-2.5 rounded-xl border border-slate-200 shadow-inner transition-all text-sm",children:[(0,a.jsx)("svg",{className:"w-5 h-5 text-[#4681E8]",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 4a1 1 0 011-1h16a1 1 0 011 1v2.586a1 1 0 01-.293.707l-6.414 6.414a1 1 0 00-.293.707V17l-4 4v-6.586a1 1 0 00-.293-.707L3.293 7.293A1 1 0 013 6.586V4z"})}),(0,a.jsx)("span",{className:"text-slate-700 font-bold flex-1 text-left truncate",children:t||"Chọn giải đấu..."}),(0,a.jsx)("svg",{className:`w-4 h-4 text-slate-400 transition-transform ${m?"rotate-180":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),m&&(0,a.jsxs)("div",{className:"absolute top-full left-0 right-0 mt-2 bg-white border border-slate-200 rounded-2xl shadow-xl z-50 max-h-[300px] overflow-hidden flex flex-col",children:[(0,a.jsx)("div",{className:"p-2 border-b border-slate-100",children:(0,a.jsx)("input",{type:"text",placeholder:"T\xecm giải đấu...",value:u,onChange:e=>g(e.target.value),className:"w-full bg-slate-50 border border-transparent rounded-xl px-4 py-2.5 text-sm text-slate-800 placeholder-slate-400 outline-none focus:border-[#4681E8]/50 transition-colors"})}),(0,a.jsxs)("div",{className:"overflow-y-auto flex-1 pb-2",children:[(0,a.jsx)("button",{type:"button",onClick:()=>k(),className:`block w-full text-left px-4 py-3 text-sm transition-colors ${!t?"bg-[#4681E8]/10 text-[#4681E8] border-l-4 border-[#4681E8]":"text-slate-600 hover:bg-slate-50 hover:text-slate-800"}`,children:"Tất cả giải đấu"}),y.map((e,s)=>(0,a.jsxs)("button",{type:"button",onClick:()=>k(e.name),className:`flex items-center gap-3 px-4 py-3 text-sm transition-colors cursor-pointer ${t===e.name?"bg-[#4681E8]/10 text-[#4681E8] border-l-4 border-[#4681E8]":"text-slate-600 hover:bg-slate-50 hover:text-slate-800"}`,children:[e.icon?(0,a.jsx)("img",{src:e.icon,alt:e.name||"League",className:"w-5 h-5 object-contain shrink-0",loading:"lazy",decoding:"async"}):(0,a.jsx)("div",{className:"w-5 h-5 rounded-md bg-slate-200 shrink-0"}),(0,a.jsx)("span",{className:"truncate",children:e.name})]},s))]})]})]})]}),x&&(0,a.jsxs)("div",{className:"mb-4 inline-flex items-center gap-2 rounded-full border border-slate-200 bg-white px-4 py-2 text-xs text-slate-500 shadow-sm",children:[(0,a.jsx)("span",{className:"h-2 w-2 rounded-full bg-[#E11D48] animate-pulse shadow-[0_0_8px_rgba(225,29,72,0.8)]"}),(0,a.jsx)("span",{className:"font-bold tracking-wide",children:"Đang tải kết quả từ server..."})]}),(0,a.jsx)("div",{className:"space-y-4",children:0===N.length?(0,a.jsx)("div",{className:"text-center py-16 text-[#64748B] font-medium tracking-wide",children:"Kh\xf4ng c\xf3 kết quả n\xe0o"}):N.map((e,t)=>(0,a.jsxs)("div",{className:"overflow-hidden rounded-2xl border border-slate-200 bg-white shadow-[0_8px_30px_rgba(0,0,0,0.06)]",children:[(0,a.jsx)("div",{className:"bg-slate-50 px-5 py-3 border-b border-slate-100 flex items-center justify-between",children:(0,a.jsxs)("span",{className:"text-[12px] text-slate-500 font-bold uppercase tracking-widest",children:[e.league_round?e.league_round:"V\xf2ng đấu",(0,a.jsx)("span",{className:"text-[#E11D48] ml-2 font-mono text-[11px] bg-[#E11D48]/10 px-2 py-0.5 rounded-full border border-[#
545E11D48]/20",children:e.date_header})]})}),e.matches.map((e,t)=>{var s;return(0,a.jsx)("div",{className:"bg-transparent hover:bg-slate-50 border-b border-slate-100 last:border-0 transition-colors group cursor-default",children:(0,a.jsxs)("div",{className:"flex items-center py-4 px-5 gap-4",children:[(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center min-w-[56px] shrink-0 border-r border-slate-100 pr-4",children:[(0,a.jsx)("span",{className:"text-[9px] text-slate-400 uppercase tracking-widest mb-1 font-bold",children:"L\xfac"}),(0,a.jsx)("span",{className:"text-[13px] text-slate-700 font-mono font-black",children:e.time})]}),(0,a.jsxs)("div",{className:"flex-1 flex items-center justify-end gap-3 min-w-0",children:[(0,a.jsx)("span",{className:"text-[14px] text-slate-800 font-bold truncate text-right group-hover:text-slate-900 transition-colors",children:e.home_team}),e.home_logo?(0,a.jsx)("div",{className:"w-8 h-8 rounded-full bg-slate-100 border border-slate-200 p-1 flex items-center justify-center shadow-sm",children:(0,a.jsx)("img",{src:e.home_logo,alt:e.home_team||"Home team",className:"w-full h-full object-contain",loading:"lazy"})}):(0,a.jsx)("div",{className:"w-8 h-8 rounded-full bg-slate-100 shrink-0 border border-slate-200 flex items-center justify-center text-[10px] font-bold text-slate-400",children:"?"})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center min-w-[90px] shrink-0 bg-slate-50 rounded-xl py-2 px-2 border border-slate-200 shadow-inner group-hover:border-[#4681E8]/40 transition-colors",children:[(0,a.jsx)("span",{className:`text-[22px] leading-none font-black tracking-widest drop-shadow-[0_2px_4px_rgba(0,0,0,0.8)] ${!(s=e.score)||"-"===s?"text-slate-400":"text-slate-800"}`,children:e.score}),e.ht_score&&(0,a.jsxs)("span",{className:"text-[10px] text-slate-500 font-mono mt-1 font-bold",children:["HT: ",e.ht_score]})]}),(0,a.jsxs)("div",{className:"flex-1 flex items-center gap-3 min-w-0",children:[e.away_logo?(0,a.jsx)("div",{className:"w-8 h-8 rounded-full bg-slate-100 border border-slate-200 p-1 flex items-center justify-center shadow-sm",children:(0,a.jsx)("img",{src:e.away_logo,alt:e.away_team||"Away team",className:"w-full h-full object-contain",loading:"lazy"})}):(0,a.jsx)("div",{className:"w-8 h-8 rounded-full bg-slate-100 shrink-0 border border-slate-200 flex items-center justify-center text-[10px] font-bold text-slate-400",children:"?"}),(0,a.jsx)("span",{className:"text-[14px] text-slate-800 font-bold truncate text-left group-hover:text-slate-900 transition-colors",children:e.away_team})]})]})},t)})]},t))}),(0,a.jsxs)("div",{className:"mt-6 text-center text-xs text-[#64748B] font-bold uppercase tracking-widest drop-shadow-sm",children:["Hiển thị ",_," kết quả trận đấu"]})]})}},53873:(e,t,s)=>{"use strict";s.d(t,{Klivevip06MatchDetailPage:()=>m});var a=s(68019),l=s(10707),r=s(58420);function n({src:e,poster:t,autoPlay:s=!0,onError:i,className:o=""}){let c=(0,l.useRef)(null),d=(0,l.useRef)(i);d.current=i;let[x,h]=(0,l.useState)(!1),[m,p]=(0,l.useState)(!1);return((0,l.useEffect)(()=>{let t=c.current;if(!t)return;let a=null;h(!1);let l=()=>p(!0),n=()=>p(!1);t.addEventListener("play",l),t.addEventListener("pause",n);let i=()=>{s&&(t.muted=!0,t.play().catch(()=>{}))};if(t.addEventListener("canplay",i),r.Ay.isSupported()){(a=new r.Ay({maxBufferLength:30,maxMaxBufferLength:60,lowLatencyMode:!0,enableWorker:!0})).loadSource(e),a.attachMedia(t),a.on(r.Ay.Events.MANIFEST_PARSED,()=>{s&&(t.muted=!0,t.play().catch(e=>{console.warn("AutoPlay failed:",e),t.muted=!1}))});let l=0,n=0;a.on(r.Ay.Events.ERROR,(e,t)=>{if(t.type===r.Ay.ErrorTypes.NETWORK_ERROR&&(++l>2||t.response&&t.response.code>=400)){console.error("HLS Network Error threshold reached (CORS/404), triggering fallback.",t),h(!0),d.current&&d.current(t),a?.destroy();return}if(t.fatal)switch(t.type){case r.Ay.ErrorTypes.NETWORK_ERROR:console.error("HLS Fatal Network Error, recovering...",t),a?.startLoad();break;case r.Ay.ErrorTypes.MEDIA_ERROR:console.error("HLS Media Error, recovering...",t),++n>3?(console.error("HLS Media Error threshold reached, triggering fallback."),h(!0),d.current&&d.current(t),a?.destroy()):a?.recoverMediaError();break;default:console.error("HLS Fatal Error:",t),h(!0),d.current&&d.current(t),a?.destroy()}})}else t.canPlayType("application/vnd.apple.mpegurl")&&(t.src=e,t.addEventListener("loadedmetadata",()=>{s&&t.play().catch(e=>{console.warn("AutoPlay failed:",e)})}),t.addEventListener("error",e=>{h(!0),d.current&&d.current(e)}));return()=>{t.removeEventListener("play",l),t.removeEventListener("pause",n),t.removeEventListener("canplay",i),a&&a.destroy()}},[e,s]),x)?i?null:(0,a.jsxs)("div",{className:`w-full h-full flex flex-col items-center justify-center bg-white/80 backdrop-blur ${o}`,children:[(0,a.jsx)("svg",{className:"w-12 h-12 text-red-500 mb-4 opacity-80",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"})}),(0,a.jsx)("div",{className:"text-slate-600 text-sm font-medium",children:"Video/Stream kh\xf4ng khả dụng hoặc bị lá
545»—i mạng"}),(0,a.jsx)("div",{className:"text-gray-500 text-xs mt-1",children:"Vui l\xf2ng thá»­ lại sau hoặc chọn nguồn kh\xe1c"})]}):(0,a.jsx)("div",{className:`relative group w-full h-full bg-white flex items-center justify-center overflow-hidden ${o}`,children:(0,a.jsx)("video",{ref:c,className:"w-full h-full object-contain",controls:!0,playsInline:!0,muted:s,poster:t,referrerPolicy:"no-referrer"})})}function i(e){let t=(e||"").split(/[\s-]+/).slice(0,2).map(e=>e[0]||"").join("").toUpperCase()||"??";return`data:image/svg+xml,${encodeURIComponent(`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 80 80"><rect width="80" height="80" rx="20" fill="#1a1c25"/><text x="40" y="47" font-size="20" font-family="Arial" font-weight="700" text-anchor="middle" fill="#666">${t}</text></svg>`)}`}function o({homeName:e,awayName:t,homeLogo:s,awayLogo:l,homeScore:r="0",awayScore:n="0",statusText:c="LIVE",timeText:d="",isLive:x=!0,sportId:h="1",matchId:m}){let p=s||i(e),u=l||i(t),g="5"===String(h),b="2"===String(h),f="bg-slate-200 border-slate-200",j="repeating-linear-gradient(90deg, transparent, transparent 10%, #000 10%, #000 20%)";return g?(f="bg-slate-100 border-slate-200",j="none"):b&&(f="bg-[#bc7a46] border-[#8a4e21]",j="repeating-linear-gradient(90deg, transparent, transparent 5%, #000 5%, #000 10%)"),(0,a.jsxs)("div",{className:"relative w-full aspect-video min-h-[300px] max-h-[600px] bg-slate-50 overflow-hidden flex flex-col justify-center",children:[(0,a.jsx)("div",{className:"absolute inset-0 flex items-center justify-center pointer-events-none mt-16 md:mt-24",children:(0,a.jsx)("div",{className:"relative w-[120%] h-[120%] sm:w-[90%] sm:h-[120%] max-w-[900px] flex-shrink-0 transition-transform duration-1000",style:{transform:"perspective(900px) rotateX(60deg) scale(0.9)",transformOrigin:"center center"},children:(0,a.jsxs)("div",{className:`absolute inset-0 ${f} shadow-[0_30px_60px_rgba(0,0,0,0.8)] border-4 rounded-xl overflow-hidden flex transition-colors duration-500`,children:[(0,a.jsx)("div",{className:"absolute inset-0 opacity-15 pointer-events-none",style:{backgroundImage:j}}),(0,a.jsxs)("div",{className:"absolute inset-[4%] pointer-events-none shadow-sm flex items-center justify-center",children:["1"===String(h)&&(0,a.jsxs)("div",{className:"absolute inset-0 w-full h-full border-2 border-white/60",children:[(0,a.jsx)("div",{className:"absolute left-1/2 top-0 bottom-0 w-0 border-l-2 border-white/60 -translate-x-1/2"}),(0,a.jsx)("div",{className:"absolute left-1/2 top-1/2 w-[18%] aspect-square rounded-full border-2 border-white/60 -translate-x-1/2 -translate-y-1/2"}),(0,a.jsx)("div",{className:"absolute left-1/2 top-1/2 w-2 h-2 rounded-full bg-white/80 -translate-x-1/2 -translate-y-1/2"}),(0,a.jsx)("div",{className:"absolute left-0 top-1/2 w-[16%] h-[46%] border-2 border-l-0 border-white/60 -translate-y-1/2 bg-slate-200"}),(0,a.jsx)("div",{className:"absolute left-0 top-1/2 w-[6%] h-[20%] border-2 border-l-0 border-white/60 -translate-y-1/2 bg-slate-200"}),(0,a.jsx)("div",{className:"absolute left-[16%] top-1/2 w-[8%] aspect-square border-2 border-l-0 border-white/60 rounded-r-full -translate-y-1/2 clip-path-half",style:{clipPath:"inset(0 0 0 50%)"}}),(0,a.jsx)("div",{className:"absolute right-0 top-1/2 w-[16%] h-[46%] border-2 border-r-0 border-white/60 -translate-y-1/2 bg-slate-200"}),(0,a.jsx)("div",{className:"absolute right-0 top-1/2 w-[6%] h-[20%] border-2 border-r-0 border-white/60 -translate-y-1/2 bg-slate-200"}),(0,a.jsx)("div",{className:"absolute right-[16%] top-1/2 w-[8%] aspect-square border-2 border-r-0 border-white/60 rounded-l-full -translate-y-1/2 clip-path-half",style:{clipPath:"inset(0 50% 0 0)"}})]}),g&&(0,a.jsxs)("div",{className:"absolute inset-[10%] w-[80%] h-[80%] border-2 border-white/80 bg-white",children:[(0,a.jsx)("div",{className:"absolute top-[10%] bottom-[10%] left-0 right-0 border-y-2 border-white/80"}),(0,a.jsx)("div",{className:"absolute left-1/2 top-[-2%] bottom-[-2%] w-1 bg-white/40 shadow-xl -translate-x-1/2 z-10"}),(0,a.jsx)("div",{className:"absolute left-[25%] right-[25%] top-[10%] bottom-[
54510%] border-x-2 border-white/80"}),(0,a.jsx)("div",{className:"absolute left-[25%] right-[25%] top-1/2 w-[50%] border-t-2 border-white/80 -translate-y-1/2"}),(0,a.jsx)("div",{className:"absolute left-0 top-1/2 w-[2%] border-t-2 border-white/80 -translate-y-1/2"}),(0,a.jsx)("div",{className:"absolute right-0 top-1/2 w-[2%] border-t-2 border-white/80 -translate-y-1/2"})]}),b&&(0,a.jsxs)("div",{className:"absolute inset-0 w-full h-full border-2 border-white/50",children:[(0,a.jsx)("div",{className:"absolute left-1/2 top-0 bottom-0 w-0 border-l-2 border-white/50 -translate-x-1/2"}),(0,a.jsx)("div",{className:"absolute left-1/2 top-1/2 w-[15%] aspect-square rounded-full border-2 border-white/50 -translate-x-1/2 -translate-y-1/2"}),(0,a.jsx)("div",{className:"absolute left-0 top-1/2 w-[18%] h-[35%] border-2 border-l-0 border-white/50 -translate-y-1/2 bg-[#bc7a46]"}),(0,a.jsx)("div",{className:"absolute left-[18%] top-1/2 w-[10%] aspect-square rounded-full border-2 border-white/50 -translate-y-1/2"}),(0,a.jsx)("div",{className:"absolute left-0 top-1/2 w-[30%] h-[70%] border-2 border-l-0 border-white/50 rounded-r-full -translate-y-1/2 opacity-60"}),(0,a.jsx)("div",{className:"absolute right-0 top-1/2 w-[18%] h-[35%] border-2 border-r-0 border-white/50 -translate-y-1/2 bg-[#bc7a46]"}),(0,a.jsx)("div",{className:"absolute right-0 top-1/2 w-[30%] h-[70%] border-2 border-r-0 border-white/50 rounded-l-full -translate-y-1/2 opacity-60"})]})]}),x&&(0,a.jsx)("div",{className:`absolute left-1/2 top-1/2 shadow-[0_8px_16px_rgba(0,0,0,0.8)] z-10 transition-all duration-[3000ms] border-2 border-white/20 rounded-full
546                                ${g?"w-2 h-2 sm:w-3 sm:h-3 bg-[#ccff00]":b?"w-4 h-4 sm:w-6 sm:h-6 bg-[#d95d16]":"w-4 h-4 sm:w-5 sm:h-5 bg-white"}`,style:{animation:"ballMove 8s infinite alternate ease-in-out",transform:"translate(-50%, -50%)"},children:(0,a.jsx)("div",{className:"absolute -bottom-4 left-1/2 w-4 h-2 bg-white/40 rounded-full blur-sm -translate-x-1/2"})}),x&&(0,a.jsxs)("div",{className:"absolute left-[65%] top-[60%] flex flex-col items-center animate-bounce-slow",style:{animation:"floatBubble 4s infinite alternate ease-in-out"},children:[(0,a.jsxs)("div",{className:"bg-white/95 backdrop-blur border border-white/10 rounded-2xl p-2 shadow-2xl flex items-center gap-3 w-max max-w-[200px]",children:[(0,a.jsx)("div",{className:"w-6 h-6 rounded-full flex items-center justify-center p-0.5 bg-white/5 shrink-0",children:(0,a.jsx)("img",{src:p,alt:e||"Home team",className:"max-w-full max-h-full object-contain",onError:t=>t.target.src=i(e),loading:"lazy",decoding:"async"})}),(0,a.jsx)("div",{className:"flex flex-col pr-1 overflow-hidden",children:(0,a.jsx)("span",{className:"text-slate-900 font-bold text-[10px] sm:text-xs tracking-wide truncate",children:g?"Serve / Return":"Tấn c\xf4ng nguy hiểm"})})]}),(0,a.jsx)("div",{className:"w-0 h-0 border-l-[6px] border-r-[6px] border-t-[6px] border-l-transparent border-r-transparent border-t-[#1a1c28]/95 mt-[-1px]"})]})]})})}),(0,a.jsx)("div",{className:"relative z-20 flex-1 flex flex-col items-center justify-start p-4 md:p-6 pointer-events-none w-full",children:(0,a.jsxs)("div",{className:"w-full max-w-[800px] flex items-center justify-between px-4 sm:px-6 py-3 rounded-xl bg-gradient-to-r from-[#0d0f14]/90 via-[#151821]/95 to-[#0d0f14]/90 backdrop-blur-xl border border-white/10 shadow-[0_10px_40px_rgba(0,0,0,0.8)] pointer-events-auto",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 flex-1 min-w-0 pr-2",children:[(0,a.jsx)("img",{src:p,alt:e,className:"w-8 h-8 md:w-12 md:h-12 object-contain drop-shadow-lg shrink-0",onError:t=>t.target.src=i(e),loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-slate-900 text-xs sm:text-sm md:text-base font-bold truncate tracking-wide",children:e})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1 shrink-0 px-2 sm:px-6 min-w-[100px]",children:[(0,a.jsxs)("span",{className:`inline-flex items-center gap-1.5 px-2.5 py-0.5 rounded-full text-[10px] sm:text-xs font-bold shadow-inner ${x?"bg-green-500/10 text-green-400 border border-green-500/20":"bg-white/5 text-slate-900/40"}`,children:[x&&(0,a.jsx)("span",{className:"w-1.5 h-1.5 rounded-full bg-green-500 animate-pulse shadow-[0_0_8px_#22c55e]"}),d||c]}),(0,a.jsxs)("div",{className:"flex gap-3 sm:gap-5 items-center justify-center",children:[(0,a.jsx)("span",{className:"text-slate-900 text-2xl sm:text-4xl font-black drop-shadow-md",children:r}),(0,a.jsx)("span",{className:"text-slate-900/30 text-xl font-light",children:"-"}),(0,a.jsx)("span",{className:"text-slate-900 text-2xl sm:text-4xl font-black drop-shadow-md",children:n})]})]}),(0,a.jsxs)("div",{className:"flex items-center justify-end gap-3 flex-1 min-w-0 pl-2 text-right",children:[(0,a.jsx)("span",{className:"text-slate-900 text-xs sm:text-sm md:text-base font-bold truncate tracking-wide",children:t}),(0,a.jsx)("img",{src:u,alt:t,className:"w-8 h-8 md:w-12 md:h-12 object-contain drop-shadow-lg shrink-0",onError:e=>e.target.src=i(t),loading:"lazy",decoding:"async"})]})]})}),(0,a.jsx)("div",{className:"relative z-20 mt-auto w-full p-4 flex justify-center pointer-events-none",children:(0,a.jsx)("div",{className:"w-full max-w-[600px] h-6 bg-white/40 backdrop-blur-md rounded-full border border-white/5 flex items-center px-4",children:(0,a.jsxs)("div",{className:"flex-1 h-0.5 bg-white/10 relative rounded-full",children:[x&&(0,a.jsx)("div",{className:"absolute left-0 top-0 bottom-0 bg-gradient-to-r from-[#b38b22] to-[#ffda6a] w-[65%] rounded-full opacity-90 shadow-[0_0_12px_#daa520]"}),(0,a.jsx)("span",{className:"absolute left-[65%] top-1/2 -translate-y-1/2 -translate-x-1/2 w-1.5 h-1.5 rounded-full bg-white shadow-md"})]})})}),(0,a.jsx)("style",{children:`
547                @keyframes ballMove {
548                    0% { transform: translate(-30%, -20%) scale(1); }
549                    25% { transform: translate(40%, -10%) scale(1.1); }
550                    50% { transform: translate(20%, 30%) scale(0.9); }
551                    75% { transform: translate(-10%, 15%) scale(1.2); }
552                    100% { transform: translate(-45%, 0%) scale(1); }
553                }
554                @keyframes floatBubble {
555                    0% { transform: translateY(0px) translateX(0px); }
556                    50% { transform: translateY(-8px) translateX(4px); }
557                    100% { transform: translateY(4px) translateX(-4px); }
558                }
559            `})]})}function c(e,t){if("1"===t||"2"===t)switch(e){case"2":return{t:"HT 1",live:!0,sc:!0};case"3":return{t:"Giữa giờ",live:!0,sc:!0};case"4":return{t:"HT 2",live:!0,sc:!0};case"5":return{t:"Hiệp phụ",live:!0,sc:!0};case"7":return{t:"Penalty",live:!0,sc:!0};case"8":case"9":return{t:"Kết th\xfac",live:!1,sc:!0};default:return{t:"Chưa bắt đầu",live:!1,sc:!1}}
559return["51","52","53","54","55"].includes(e)?{t:`Set ${e-50}`,live:!0,sc:!0}:["100","90","110"].includes(e)?{t:"KT",live:!1,sc:!0}:"0"===e||"1"===e?{t:"Chưa bắt đầu",live:!1,sc:!1}:{t:"LIVE",live:!0,sc:!0}}function d(e){let t=(e||"").split(/[\s-]+/).slice(0,2).map(e=>e[0]||"").join("").toUpperCase()||"??";return`data:image/svg+xml,${encodeURIComponent(`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 80 80"><rect width="80" height="80" rx="20" fill="#1a1c25"/><text x="40" y="47" font-size="20" font-family="Arial" font-weight="700" text-anchor="middle" fill="#666">${t}</text></svg>`)}`}function x(e){let t=new Date(1e3*parseInt(e||"0",10));return{hm:t.toLocaleTimeString("vi-VN",{hour:"2-digit",minute:"2-digit",timeZone:"Asia/Ho_Chi_Minh"}),dm:t.toLocaleDateString("vi-VN",{day:"2-digit",month:"2-digit",timeZone:"Asia/Ho_Chi_Minh"}),full:t.toLocaleDateString("vi-VN",{day:"2-digit",month:"2-digit",year:"numeric",timeZone:"Asia/Ho_Chi_Minh"})}}let h="max-w-[1200px]";function m({matchData:e,relatedMatches:t,matchDetails:s,standings:r,brandingNameUpper:i}){let p,u,g,j,v,y,[C,S]=(0,l.useState)("odds"),L=e?.match_data?.anchors||[],[$,F]=(0,l.useState)(!1),[T,A]=(0,l.useState)(!1),[M,H]=(0,l.useState)(null),[D,B]=(0,l.useState)(!1),z=(0,l.useRef)(0);(0,l.useEffect)(()=>{if(!e?.has_live||"1"!==e.has_live||0===L.length)return;let t=!1;B(!0);let s=async t=>{let s=t?.uid,a=`/api/socolive/proxy-stream?url=${encodeURIComponent(`https://live.inplyr.com/${s?`room/${s}`:`default/${e.id}`}.m3u8`)}`;try{let e=await fetch(a,{method:"GET",cache:"no-store"});if(!e.ok)return null;let s=(await e.text()).split("\n").filter(e=>e.trim()&&!e.startsWith("#"));if(0===s.length)return null;return(await fetch(s[0],{method:"HEAD",cache:"no-store"})).ok?t:null}catch{return null}};return Promise.all(L.map(e=>s(e))).then(e=>{if(t)return;let s=e.find(e=>null!==e);s?(H(s),F(!0),A(!1)):(H(L[0]),A(!0)),B(!1)}),()=>{t=!0}},[e?.has_live,L.length]),(0,l.useEffect)(()=>{if(!T||D||z.current>=20)return;let t=setTimeout(()=>{z.current++,A(!1),B(!0);let t=async t=>{let s=t?.uid,a=`/api/socolive/proxy-stream?url=${encodeURIComponent(`https://live.inplyr.com/${s?`room/${s}`:`default/${e.id}`}.m3u8`)}`;try{let e=await fetch(a,{method:"GET",cache:"no-store"});if(!e.ok)return null;let s=(await e.text()).split("\n").filter(e=>e.trim()&&!e.startsWith("#"));if(0===s.length)return null;return(await fetch(s[0],{method:"HEAD",cache:"no-store"})).ok?t:null}catch{return null}};Promise.all(L.map(e=>t(e))).then(e=>{let t=e.find(e=>null!==e);t?(H(t),F(!0),A(!1)):A(!0),B(!1)})},15e3);return()=>clearTimeout(t)},[T,D]);let[I,R]=(0,l.useState)(null),U=e?.post_name||e?.ls_id||e?.id;if(window.location.origin,(0,l.useEffect)(()=>{if(!U)return;let e=setInterval(async()=>{try{let e=await fetch(`/api/klivevip/match/${U}`,{cache:"no-store"});if(e.ok){let t=await e.json();R(t?.match??null)}}catch{}},1e4);return()=>clearInterval(e)},[U]),!e)return(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center py-32 gap-4",children:[(0,a.jsx)("span",{className:"text-[#64748B] text-lg",children:"Kh\xf4ng t\xecm thấy trận đấu"}),(0,a.jsx)("a",{href:"/",className:"text-[#4681E8] hover:underline text-sm",children:"← Quay lại"})]});let G=I?{...e,...I}:e,P=G?.has_live==="1"&&L.length>0,K=c(G.status_id,G.sport_id),V=$&&M&&!T&&!D,W=P&&(D||T&&K.live&&z.current<20),O=!P||T&&!W&&!D,q=!K.live&&"8"!==String(G.status_id)&&"9"!==String(G.status_id),{hm:X,full:Y}=x(G.time),Z=G.source_card_meta?.league_label||G.match_data?.competition_vi||G.match_data?.competition_full||"",Q=G.match_data?.stage_label||G.source_card_meta?.stage_label||"",J=G.home_logo||d(G.home_name),ee=G.away_logo||d(G.away_name),et=e=>t=>{t.target.src=d(e)};return(0,a.jsxs)("div",{className:"w-full bg-white min-h-screen text-slate-600 font-sans pb-16",children:[(0,a.jsx)("div",{className:"w-full border-b border-slate-200 bg-white",children:(0,a.jsxs)("div",{className:`${h} mx-auto px-4 py-3 flex items-center justify-between`,children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 text-[13px] font-bold",children:[(0,a.jsx)("span",{className:"text-[#4681E8] uppercase tracking-wide",children:Z}),Q&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"text-slate-300",children:"•"}),(0,a.jsx)("span",{className:"text-slate-600",children:Q})]})]}),(0,a.jsx)("div",{className:"text-[12px] font-mono text-slate-400 hidden sm:block",children:Y})]})}),(0,a.jsxs)("div",{className:`${h} mx-auto px-0 md:px-4 py-0 md:py-6 flex flex-col lg:flex-row gap-4 lg:gap-6`,children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0 flex flex-col gap-4 lg:gap-6",children:[(0,a.jsxs)("div",{className:"w-full relative bg-[#000000] rounded-none md:rounded-2xl overflow-hidden shadow-[0_10px_40px_rgba(0,0,0,0.5)] border-y md:border border-slate-200",children:[(0,a.jsx)("div",{className:"relative w-full aspect-video bg-[#000000] group z-10",children:V?(0,a.jsx)(n,{src:`/api/klivevip/proxy-stream?url=${encodeURIComponent(`https://live.inplyr.com/${M?.uid&&"default"!==M.uid?`room/${M.uid}`:`default/${G.id}`}.m3u8`)}`,autoPlay:!0,onError:()=>A(!0)}):O?(0,a.jsx)(o,{homeName:G.home_name,awayName:G.away_name,homeLogo:G.home_logo,awayLogo:G.away_logo,homeScore:K.sc?G.home_score:"0",awayScore:K.sc?G.away_score:"0",statusText:K.t,timeText:G.time_text||X,isLive:K.live,sportId:G.sport_id,matchId:G.ls_id||G.id,kickoffMs:1e3*Number(G?.time||0),isPreMatch:q}):(0,a.jsxs)("div",{className:"absolute inset-0 z-10 flex flex-col items-center justify-center p-4 lg:p-10",children:[(0,a.jsxs)("div",{className:"absolute inset-0 flex justify-between items-center opacity-[0.03] pointer-events-none px-4 lg:px-20 overflow-hidden",children:[(0,a.jsx)("img",{src:J,alt:"",className:"w-1/2 max-w-[400px] blur-[10px]",loading:"lazy",decoding:"async"}),(0,a.jsx)("img",{src:ee,alt:"",className:"w-1/2 max-w-[400px] blur-[10px]",loading:"lazy",decoding:"async"})]}),P&&!T&&(0,a.jsx)("button",{onClick:()=>F(!0),className:"group mb-4 sm:mb-8 w-16 h-16 md:w-20 md:h-20 rounded-full bg-[#4681E8] flex items-center justify-center hover:bg-[#55CAF1] transition-all shadow-[0_0_30px_rgba(70,129,232,0.5)] curs
559or-pointer z-20",children:(0,a.jsx)("svg",{className:"w-8 h-8 md:w-10 md:h-10 text-white ml-1.5 md:ml-2 group-hover:scale-110 transition-transform",viewBox:"0 0 24 24",fill:"currentColor",children:(0,a.jsx)("path",{d:"M8 5v14l11-7z"})})}),(0,a.jsxs)("div",{className:"grid grid-cols-[1fr_auto_1fr] items-center w-full max-w-[800px] gap-2 lg:gap-8 z-20",children:[(0,a.jsxs)("div",{className:"flex flex-col items-center gap-2 lg:gap-4",children:[(0,a.jsx)("img",{src:J,alt:G.home_name,className:"w-16 h-16 sm:w-24 sm:h-24 lg:w-32 lg:h-32 object-contain drop-shadow-[0_10px_20px_rgba(0,0,0,0.8)]",onError:et(G.home_name),loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-[#FFFFFF] text-xs sm:text-base lg:text-lg font-black text-center line-clamp-2 uppercase tracking-wide",children:G.home_name})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-2 lg:gap-3",children:[K.sc?(0,a.jsxs)("div",{className:"flex items-center gap-3 lg:gap-6 bg-white/90 backdrop-blur-md px-4 py-2 lg:px-8 lg:py-4 rounded-2xl border border-slate-200 shadow-2xl",children:[(0,a.jsx)("span",{className:"text-[#4681E8] text-[32px] sm:text-[48px] lg:text-[64px] font-black leading-none",children:G.home_score}),(0,a.jsx)("span",{className:"text-slate-300 text-[20px] lg:text-[28px] font-light",children:":"}),(0,a.jsx)("span",{className:"text-[#4681E8] text-[32px] sm:text-[48px] lg:text-[64px] font-black leading-none",children:G.away_score})]}):(0,a.jsx)("div",{className:"text-[#FFFFFF] text-[32px] sm:text-[48px] lg:text-[56px] font-black tracking-widest leading-none drop-shadow-xl",children:X}),(0,a.jsxs)("span",{className:`inline-flex items-center gap-2 rounded-full px-3 py-1 lg:px-5 lg:py-1.5 text-[10px] lg:text-[12px] font-bold tracking-widest uppercase ${K.live?"bg-[#4681E8] text-white shadow-[0_0_20px_rgba(70,129,232,0.6)]":"bg-white text-slate-600 border border-slate-200"}`,children:[K.live&&(0,a.jsx)("span",{className:"w-2 h-2 rounded-full bg-white animate-pulse"}),K.t,G.time_text?` : ${G.time_text}`:""]})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-2 lg:gap-4",children:[(0,a.jsx)("img",{src:ee,alt:G.away_name,className:"w-16 h-16 sm:w-24 sm:h-24 lg:w-32 lg:h-32 object-contain drop-shadow-[0_10px_20px_rgba(0,0,0,0.8)]",onError:et(G.away_name),loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-[#FFFFFF] text-xs sm:text-base lg:text-lg font-black text-center line-clamp-2 uppercase tracking-wide",children:G.away_name})]})]})]})}),L.length>0&&(0,a.jsxs)("div",{className:"w-full bg-white border-t border-slate-200 px-3 lg:px-6 py-2.5 lg:py-4 flex items-center gap-2 lg:gap-4 overflow-x-auto z-20",children:[(0,a.jsx)("span",{className:"text-[10px] lg:text-[11px] text-slate-600 uppercase font-bold tracking-widest shrink-0 mr-1 lg:mr-2",children:"CHỌN K\xcaNH TRUYỀN:"}),L.map((e,t)=>(0,a.jsxs)("button",{onClick:()=>{H(e),F(!0),A(!1)},className:`shrink-0 flex items-center gap-1.5 lg:gap-2 rounded-full px-3 py-1.5 lg:px-5 lg:py-2 text-[11px] lg:text-[13px] font-bold transition-all ${M?.uid===e.uid&&!T?"bg-[#4681E8]/10 border border-[#4681E8] text-[#4681E8] shadow-[0_0_15px_rgba(70,129,232,0.2)]":"bg-white border border-slate-200 text-slate-600 hover:text-[#4681E8] hover:border-[#4681E8]/50"}`,children:[(0,a.jsx)("span",{className:`w-1.5 h-1.5 lg:w-2 lg:h-2 rounded-full ${M?.uid===e.uid&&!T?"bg-[#4681E8] animate-pulse":"bg-transparent"}`}),"BLV ",e.nickName||`K\xeanh ${t+1}`]},e.uid||t))]})]}),(p=(()=>{let e=s?.stats;if(!e)return!1;let t=null;return Array.isArray(e)&&e.length>0?t=e[0]:e?.results?.[0]?t=e.results[0]:e?.stats_full_time&&(t=e),!!t&&!!(t.stats_full_time?.length>0||t.stats_haft_time?.length>0||t.stats_half_time?.length>0||t.stats?.length>0)})(),u=!!(s?.lineup&&(Array.isArray(s.lineup)?s.lineup.length>0:s.lineup.home||s.lineup.away)),g=!!(s?.events&&(Array.isArray(s.events)?s.events.length>0:s.events.incidents?.length>0||s.events.data?.length>0)),j=!!(r&&(Array.isArray(r)?r.length>0:r.data?.length>0)),(y=(v=[{id:"stats",label:"THỐNG K\xca",show:p},{id:"lineup",label:"ĐỘI H\xccNH",show:u},{id:"events",label:"DIỄN BIẾN",show:g},{id:"standings",label:"BẢNG XH",show:j},{id:"odds",label:"TỶ LỆ K\xc8O",show:!!(s?.odds&&Array.isArray(s.odds)&&s.odds.length>0)}].filter(e=>e.show)).find(e=>e.id===C)?C:v[0]?.id||"odds")!==C&&setTimeout(()=>S(y),0),v.length>0?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"bg-white rounded-2xl p-2 border border-slate-200 flex overflow-x-auto gap-2 shadow-[0_4px_15px_rgba(0,0,0,0.08)] mx-4 md:mx-0",children:v.map(({id:e,label:t})=>(0,a.jsx)("button",{onClick:()=>S(e),className:`flex-1 min-w-[100px] py-2.5 sm:py-3 text-[10px] sm:text-[12px] font-black uppercase tracking-widest rounded-xl transition-all ${y===e?"bg-[#4681E8]/10 text-[#4681E8] border border-[#4681E8]/30 shadow-inner":"text-slate-500 hover:text-[#4681E8] hover:bg-[#4681E8]/5 border border-transparent"}`,children:t},e))}),(0,a.jsxs)("div",{className:"bg-white rounded-2xl border border-slate-200 overflow-hidden shadow-[0_4px_15px_rgba(0,0,0,0.08)] min-h-[400px] mx-4 md:mx-0",children:["stats"===y&&(0,a.jsx)(b,{matchDetails:s}),"lineup"===y&&(0,a.jsx)(f,{matchDetails:s}),"events"===y&&(0,a.jsx)(_,{events:s?.events}),"standings"===y&&(0,a.jsx)(k,{standings:r}),"odds"===y&&(0,a.jsx)(E,{odds:s?.odds})]})]}):null),t.length>0&&(0,a.jsxs)("div",{className:"mt-4 mx-4 md:mx-0",children:[(0,a.jsxs)("h2",{className:"px-1 py-4 text-sm sm:text-base font-black text-slate-800 uppercase flex items-center gap-3 tracking-widest border-b border-slate-100 mb-4",children:[(0,a.jsx)("span",{className:"w-1 h-5 bg-[#4681E8] rounded-sm shadow-[0_0_8px_#4681E8]"}),"TRẬN ĐẤU C\xd9NG GIẢI"]}),(0,a.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3 sm:gap-4",children:t.slice(0,4).map(e=>(0,a.jsx)(w,{m:e},e.id))})]})]}),(0,a.jsx)("div",{className:"w-full lg:w-[350px] xl:w-[400px] shrink-0 px-4 md:px-0",children:(0,a.jsxs)("div",{className:"bg-white border border-slate-200 rounded-2xl overflow-hidden flex flex-col shadow-[0_10px_30px_rgba(0,0,0,0.1)] lg:sticky lg:top-8 h-[600px] lg:h-[c
559alc(100vh-100px)] lg:max-h-[850px]",children:[(0,a.jsxs)("div",{className:"px-5 py-4 border-b border-slate-200 flex items-center justify-between bg-white",children:[(0,a.jsxs)("h3",{className:"text-slate-800 text-sm font-black uppercase tracking-widest flex items-center gap-2",children:[(0,a.jsx)("span",{className:"w-2.5 h-2.5 rounded-full bg-[#4681E8] shadow-[0_0_10px_rgba(70,129,232,0.4)]"}),"PH\xd2NG CHAT"]}),(0,a.jsxs)("span",{className:"text-[10px] bg-white px-3 py-1.5 rounded-full text-[#4681E8] font-mono border border-[#4681E8]/30 shadow-inner tracking-widest flex items-center gap-1.5",children:[(0,a.jsx)("svg",{className:"w-3 h-3",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 10l4.553-2.276A1 1 0 0121 8.618v6.764a1 1 0 01-1.447.894L15 14M5 18h8a2 2 0 002-2V8a2 2 0 00-2-2H5a2 2 0 00-2 2v8a2 2 0 002 2z"})}),L.length," BLV"]})]}),(0,a.jsx)("div",{className:"flex-1 bg-[#FFFFFF]/40 min-h-0 chat-container-wrapper",children:(0,a.jsx)(N,{anchors:L,selectedAnchor:M})})]})})]})]})}let p={25:"KIỂM SO\xc1T B\xd3NG",24:"CHUYỀN CH\xcdNH X\xc1C",23:"TỔNG SỐ ĐƯỜNG CHUYỀN",22:"TẤN C\xd4NG",21:"T.C\xd4NG NGUY HIỂM",2:"S\xdaT TR\xdaNG Đ\xcdCH",37:"PHẠT G\xd3C",28:"N\xc9M BI\xcaN",8:"VIỆT VỊ",3:"THẺ V\xc0NG",4:"THẺ ĐỎ",5:"S\xdaT PENALTY",29:"PHẠM LỖI",26:"Đ\xc1NH ĐẦU",27:"CỨU THUA",1:"B\xc0N THẮNG",7:"PHẢN LƯỚI"},u=[25,21,22,24,2,23,4,3,37,28,8,5,29],g="https://cdn.sportdb.live/upload/team/";function b({matchDetails:e}){let[t,s]=(0,l.useState)("full"),r=e?.stats,n=e?.lineup,i=n?.match?.home_team,o=n?.match?.away_team,c=null;Array.isArray(r)&&r.length>0?c=r[0]:r?.results?.[0]?c=r.results[0]:r?.stats_full_time&&(c=r);let d={full:c?.stats_full_time||[],h1:c?.stats_haft_time||c?.stats_half_time||[],h2:c?.stats_haft_time_2nd_half||[]}[t]||[];if(!c||0===d.length)return(0,a.jsx)(j,{text:"Thống k\xea sẽ được cập nhật khi trận đấu bắt đầu"});let x=[...d].sort((e,t)=>{let s=u.indexOf(e.type),a=u.indexOf(t.type);return(-1===s?999:s)-(-1===a?999:a)});return(0,a.jsxs)("div",{className:"flex flex-col",children:[(i||o)&&(0,a.jsxs)("div",{className:"flex items-center justify-between px-4 py-3 border-b border-slate-100",children:[(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5 w-20",children:[i?.logo&&(0,a.jsx)("img",{src:g+i.logo,alt:i?.name||"Home team",className:"w-8 h-8 object-contain",onError:e=>e.target.style.display="none",loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-slate-600 text-[10px] font-medium text-center leading-tight",children:i?.name||""})]}),(0,a.jsx)("div",{className:"flex gap-1",children:[{k:"h1",l:"Hiệp 1"},{k:"h2",l:"Hiệp 2"},{k:"full",l:"Cả trận"}].map(({k:e,l})=>(0,a.jsx)("button",{onClick:()=>s(e),className:`px-2.5 py-1 text-[10px] font-bold rounded transition-all ${t===e?"bg-[#E11D48] text-white":"text-slate-400 hover:text-slate-600 bg-slate-100"}`,children:l},e))}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5 w-20",children:[o?.logo&&(0,a.jsx)("img",{src:g+o.logo,alt:o?.name||"Away team",className:"w-8 h-8 object-contain",onError:e=>e.target.style.display="none",loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-slate-600 text-[10px] font-medium text-center leading-tight",children:o?.name||""})]})]}),(0,a.jsx)("div",{className:"px-4 py-3 space-y-3",children:x.map(e=>{let t=p[e.type]||`Stat ${e.type}`,s=e.home,l=e.away,r=24===e.type||25===e.type,n=s+l,i=0===n?50:s/n*100,o=s>l,c=l>s;return(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"flex justify-between items-center mb-1.5",children:[(0,a.jsxs)("span",{className:`text-xs font-bold w-10 tabular-nums ${o?"text-slate-800":"text-slate-400"}`,children:[s,r?"%":""]}),(0,a.jsx)("span",{className:"text-slate-400 text-[10px] font-semibold tracking-wide uppercase",children:t}),(0,a.jsxs)("span",{className:`text-xs font-bold w-10 text-right tabular-nums ${c?"text-slate-800":"text-slate-400"}`,children:[l,r?"%":""]})]}),(0,a.jsxs)("div",{className:"flex gap-0.5 h-[5px]",children:[(0,a.jsx)("div",{className:"flex-1 rounded-l-full bg-white/[0.06] overflow-hidden flex justify-end",children:(0,a.jsx)("div",{className:`rounded-l-full transition-all duration-500 ${o?"bg-gradient-to-r from-[#E11D48]/60 to-[#E11D48]":"bg-gradient-to-r from-white/10 to-white/20"}`,style:{width:`${i}%`}})}),(0,a.jsx)("div",{className:"flex-1 rounded-r-full bg-white/[0.06] overflow-hidden",children:(0,a.jsx)("div",{className:`rounded-r-full transition-all duration-500 ${c?"bg-gradient-to-l from-[#E11D48]/60 to-[#E11D48]":"bg-gradient-to-l from-white/10 to-white/20"}`,style:{width:`${100-i}%`}})})]})]},e.type)})})]})}
559function f({matchDetails:e}){let[t,s]=(0,l.useState)("pitch"),r=e?.lineup,n=r?.lineup||r,i=n?.home||[],o=n?.away||[],c=r?.home_formation||"",d=r?.away_formation||"",x=r?.match?.home_team,h=r?.match?.away_team;if(0===i.length&&0===o.length)return(0,a.jsx)(j,{text:"Đội h\xecnh sẽ được c\xf4ng bố trước trận đấu 30 ph\xfat"});let m=e=>e.filter(e=>1===e.first),p=e=>e.filter(e=>1!==e.first),u=m(i),g=m(o),b=p(i),w=p(o);return(0,a.jsxs)("div",{className:"flex flex-col",children:[(0,a.jsxs)("div",{className:"flex items-center justify-center gap-1 px-3 py-2 border-b border-slate-100",children:[(0,a.jsx)("button",{onClick:()=>s("pitch"),className:`px-3 py-1.5 text-[10px] font-bold rounded transition-all ${"pitch"===t?"bg-[#E11D48] text-white":"text-slate-400 bg-slate-100"}`,children:"Đội h\xecnh xuất ph\xe1t"}),(0,a.jsx)("button",{onClick:()=>s("list"),className:`px-3 py-1.5 text-[10px] font-bold rounded transition-all ${"list"===t?"bg-[#E11D48] text-white":"text-slate-400 bg-slate-100"}`,children:"Đội h\xecnh dá»± bị"})]}),"pitch"===t?(0,a.jsx)("div",{className:"relative w-full",style:{aspectRatio:"68/105"},children:(0,a.jsxs)("div",{className:"absolute inset-0 bg-gradient-to-b from-[#1a5c2a] via-[#1e6b31] to-[#1a5c2a] rounded-2xl overflow-hidden",children:[(0,a.jsxs)("div",{className:"absolute inset-[3%] border border-white/20 rounded-lg",children:[(0,a.jsx)("div",{className:"absolute left-0 right-0 top-1/2 h-px bg-white/20"}),(0,a.jsx)("div",{className:"absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 w-[22%] aspect-square rounded-full border border-white/20"}),(0,a.jsx)("div",{className:"absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 w-1.5 h-1.5 bg-white/30 rounded-full"}),(0,a.jsx)("div",{className:"absolute top-0 left-1/2 -translate-x-1/2 w-[55%] h-[16%] border-l border-r border-white/20"}),(0,a.jsx)("div",{className:"absolute top-0 left-1/2 -translate-x-1/2 w-[25%] h-[6%] border-l border-r border-white/20"}),(0,a.jsx)("div",{className:"absolute bottom-0 left-1/2 -translate-x-1/2 w-[55%] h-[16%] border-t border-l border-r border-white/20"}),(0,a.jsx)("div",{className:"absolute bottom-0 left-1/2 -translate-x-1/2 w-[25%] h-[6%] border-t border-l border-r border-white/20"})]}),(0,a.jsx)("div",{className:"absolute top-1 left-2 text-[9px] text-[#F8FAFC]/50 font-bold z-10",children:x?.name||""}),(0,a.jsx)("div",{className:"absolute top-1 right-2 text-[9px] text-[#E11D48]/70 font-bold z-10",children:c}),(0,a.jsx)("div",{className:"absolute bottom-1 left-2 text-[9px] text-[#F8FAFC]/50 font-bold z-10",children:h?.name||""}),(0,a.jsx)("div",{className:"absolute bottom-1 right-2 text-[9px] text-[#E11D48]/70 font-bold z-10",children:d}),u.map((e,t)=>{let s=`${e.x||50}%`,l=`${(e.y||10)/2}%`,r="G"===e.position;return(0,a.jsxs)("div",{className:"absolute flex flex-col items-center z-10 -translate-x-1/2 -translate-y-1/2",style:{left:s,top:l},children:[(0,a.jsx)("div",{className:`w-6 h-6 rounded-full flex items-center justify-center text-[9px] font-black ${r?"bg-yellow-400 text-black":"bg-blue-600 text-[#F8FAFC]"} shadow-md border border-white/20`,children:e.shirt_number||""}),(0,a.jsx)("span",{className:"text-[7px] text-[#F8FAFC] font-semibold mt-0.5 text-center max-w-[48px] truncate drop-shadow-[0_1px_2px_rgba(0,0,0,0.8)]",children:(e.name||"").split(" ").slice(-2).join(" ")}),1===e.captain&&(0,a.jsx)("span",{className:"absolute -top-1 -right-1 text-[6px] text-yellow-400",children:"C"})]},`h-${t}`)}),g.map((e,t)=>{let s=`${100-(e.x||50)}%`,l=`${100-(e.y||10)/2}%`,r="G"===e.position;return(0,a.jsxs)("div",{className:"absolute flex flex-col items-center z-10 -translate-x-1/2 -translate-y-1/2",style:{left:s,top:l},children:[(0,a.jsx)("div",{className:`w-6 h-6 rounded-full flex items-center justify-center text-[9px] font-black ${r?"bg-yellow-400 text-black":"bg-orange-500 text-[#F8FAFC]"} shadow-md border border-white/20`,children:e.shirt_number||""}),(0,a.jsx)("span",{className:"text-[7px] text-[#F8FAFC] font-semibold mt-0.5 text-center max-w-[48px] truncate drop-shadow-[0_1px_2px_rgba(0,0,0,0.8)]",children:(e.name||"").split(" ").slice(-2).join(" ")}),1===e.captain&&(0,a.jsx)("span",{className:"absolute -top-1 -right-1 text-[6px] text-yellow-400",children:"C"})]},`a-${t}`)})]})}):(0,a.jsxs)("div",{className:"px-3 py-2 text-xs",children:[(0,a.jsxs)("div",{className:"flex justify-between font-bold text-slate-400 mb-1 uppercase tracking-wider text-[9px] px-1",children:[(0,a.jsx)("span",{children:"Đội chá»
559§ nh\xe0"}),(0,a.jsx)("span",{children:"Đội kh\xe1ch"})]}),Array.from({length:Math.max(b.length,w.length)}).map((e,t)=>{let s=b[t],l=w[t];return(0,a.jsxs)("div",{className:"flex justify-between items-center border-b border-slate-50 py-1.5",children:[(0,a.jsx)("div",{className:"flex items-center gap-1.5 w-1/2 min-w-0",children:s&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"text-[#E11D48] font-bold w-5 text-center shrink-0 text-[10px]",children:s.shirt_number||""}),(0,a.jsx)("span",{className:"text-slate-700 truncate text-[11px]",children:s.name||""})]})}),(0,a.jsx)("div",{className:"flex items-center gap-1.5 w-1/2 justify-end min-w-0",children:l&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"text-slate-700 truncate text-[11px] text-right",children:l.name||""}),(0,a.jsx)("span",{className:"text-[#E11D48] font-bold w-5 text-center shrink-0 text-[10px]",children:l.shirt_number||""})]})})]},t)})]})]})}function j({text:e}){return(0,a.jsx)("div",{className:"flex items-center justify-center py-10 text-slate-400 text-sm text-center",children:e})}function w({m:e}){let t=c(e.status_id,e.sport_id),{hm:s,dm:l}=x(e.time),r=e.source_card_meta?.league_label||e.match_data?.competition_vi||"";return(0,a.jsxs)("a",{href:`/match/${encodeURIComponent(e.post_name||e.id)}`,className:"flex items-center gap-3 rounded-2xl bg-white hover:bg-slate-50 border border-slate-100 hover:border-[#4681E8]/30 p-3 transition-all group",children:[(0,a.jsxs)("div",{className:"shrink-0 w-14 text-center",children:[(0,a.jsx)("div",{className:"text-[#E11D48] text-[11px] font-bold",children:s}),(0,a.jsx)("div",{className:"text-slate-400 text-[9px]",children:l})]}),(0,a.jsx)("div",{className:"w-px h-9 bg-slate-200 shrink-0"}),(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("div",{className:"text-slate-400 text-[9px] truncate mb-1",children:r}),(0,a.jsxs)("div",{className:"flex items-center gap-2 mb-0.5",children:[(0,a.jsx)("img",{src:e.home_logo||d(e.home_name),alt:e.home_name,className:"w-4 h-4 object-contain shrink-0",onError:t=>t.target.src=d(e.home_name),loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-slate-600 text-[12px] font-medium truncate",children:e.home_name})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("img",{src:e.away_logo||d(e.away_name),alt:e.away_name,className:"w-4 h-4 object-contain shrink-0",onError:t=>t.target.src=d(e.away_name),loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-slate-600 text-[12px] font-medium truncate",children:e.away_name})]})]}),t.sc?(0,a.jsxs)("span",{className:"text-slate-800 font-bold text-[14px] tabular-nums shrink-0",children:[e.home_score,"-",e.away_score]}):(0,a.jsx)("span",{className:"text-[10px] font-bold text-[#E11D48] bg-[#E11D48]/10 rounded px-2.5 py-1 group-hover:bg-[#E11D48]/15 transition shrink-0",children:"XEM NGAY"})]})}let v={0:{bg:"bg-white/10",text:"text-[#F8FAFC]/40",nameCls:"text-[#94A3B8]"},1:{bg:"bg-white/10",text:"text-[#F8FAFC]/50",nameCls:"text-[#94A3B8]"},2:{bg:"bg-green-900/50",text:"text-green-400",nameCls:"text-green-400"},3:{bg:"bg-yellow-900/40",text:"text-yellow-400",nameCls:"text-emerald-600 font-bold"},4:{bg:"bg-blue-900/40",text:"text-blue-400",nameCls:"text-blue-400 font-bold"},5:{bg:"bg-red-900/40",text:"text-red-400",nameCls:"text-red-400 font-bold"}};function N({anchors:e,selectedAnchor:t}){let[s,r]=(0,l.useState)([]),[n,i]=(0,l.useState)(!1),o=(0,l.useRef)(null),c=(0,l.useRef)(null),d=t?.roomNum;return(0,l.useEffect)(()=>{if(!d)return;r([]),i(!1);let e=new EventSource(`/api/chat/${d}`);return e.onopen=()=>i(!0),e.onmessage=e=>{try{let t=JSON.parse(e.data);if("connected"===t.type)return void i(!0);if("history"===t.type&&Array.isArray(t.messages))return void r(e=>[...t.messages,...e].slice(-200));t.user&&t.text&&r(e=>[...e,t].slice(-200))}catch{}},e.onerror=()=>i(!1),()=>{e.close(),i(!1)}},[d]),(0,l.useEffect)(()=>{requestAnimationFrame(()=>{let e=c.current;e&&(e.scrollTop=e.scrollHeight)})},[s.length]),(0,a.jsxs)("div",{className:"flex flex-col h-full bg-[#0F0F23]",children:[(0,a.jsxs)("div",{ref:c,className:"flex-1 min-h-0 px-3 py-2 flex flex-col gap-[3px] overflow-y-auto",style:{scrollbarWidth:"thin",scrollbarColor:"#444 transparent"},children:[(0,a.jsx)("div",{className:"text-center text-[10px] text-[#F8FAFC]/30 bg-slate-50/60 py-1.5 rounded-xl mb-1 sticky top-0 z-10 backdrop-blur-sm",children:n?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"inline-block h-1.5 w-1.5 rounded-full bg-green-400 animate-pulse mr-1"}),"Đang kết nối ph\xf2ng chat trá»±c tiếp"]}):d?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"inline-block h-1.5 w-1.5 rounded-full bg-yellow-400 animate-pulse mr-1"}),"Đang kết nối..."]}
559):"Ch\xe0o mừng bạn đến với ph\xf2ng chat"}),0===s.length&&n&&(0,a.jsx)("div",{className:"text-center text-[10px] text-[#F8FAFC]/20 py-4",children:"Chờ tin nhắn mới..."}),s.map((e,t)=>{var s;let l=(s=e.level)>=5?v[5]:v[s]||v[0];return 2===e.type||e.text?.includes("v\xe0o ph\xf2ng tr\xf2 chuyện")?(0,a.jsxs)("div",{className:"flex items-start gap-1.5 text-[11px] leading-relaxed py-[1px] opacity-60",children:[(0,a.jsx)("span",{className:"text-green-500/70 font-medium",children:"Hi"}),(0,a.jsxs)("span",{className:`shrink-0 inline-flex items-center px-1 py-[0.5px] rounded text-[8px] font-bold ${l.bg} ${l.text}`,children:["Lv",e.level]}),(0,a.jsxs)("span",{className:`font-bold ${l.nameCls}`,children:[e.user,":"]}),(0,a.jsx)("span",{className:"text-[#F8FAFC]/40",children:e.text})]},`${e.ts}-${t}`):(0,a.jsxs)("div",{className:"flex items-start gap-1.5 text-[11px] leading-relaxed py-[1px]",children:[(0,a.jsxs)("span",{className:`shrink-0 inline-flex items-center px-1 py-[0.5px] rounded text-[8px] font-bold ${l.bg} ${l.text}`,children:["Lv.",e.level]}),(0,a.jsxs)("span",{className:`font-bold shrink-0 ${l.nameCls}`,children:[e.user,":"]}),(0,a.jsx)("span",{className:"text-[#F8FAFC]/80 break-words min-w-0",children:e.text})]},`${e.ts}-${t}`)}),(0,a.jsx)("div",{ref:o})]}),(0,a.jsxs)("div",{className:"shrink-0 px-3 py-2 bg-[#0F0F23] border-t border-white/[0.04] space-y-2",children:[(0,a.jsx)("div",{className:"flex items-center justify-center gap-3 text-[#F8FAFC]/20 text-[10px]",children:(0,a.jsx)("span",{className:"flex items-center gap-1",children:(0,a.jsx)("svg",{className:"w-3 h-3",viewBox:"0 0 24 24",fill:"currentColor",children:(0,a.jsx)("path",{d:"M12 4.5C7 4.5 2.7 7.6 1 12c1.7 4.4 6 7.5 11 7.5s9.3-3.1 11-7.5c-1.7-4.4-6-7.5-11-7.5zm0 12.5c-2.8 0-5-2.2-5-5s2.2-5 5-5 5 2.2 5 5-2.2 5-5 5zm0-8c-1.7 0-3 1.3-3 3s1.3 3 3 3 3-1.3 3-3-1.3-3-3-3z"})})})}),(0,a.jsxs)("div",{className:"flex bg-[#0F0F23] rounded-2xl overflow-hidden border border-white/[0.08]",children:[(0,a.jsx)("input",{type:"text",placeholder:"Đăng nhập để c\xf9ng chat nh\xe9",disabled:!0,className:"flex-1 bg-transparent px-3 py-2 text-[11px] text-[#F8FAFC] outline-none placeholder:text-[#F8FAFC]/30 disabled:opacity-50"}),(0,a.jsx)("button",{disabled:!0,className:"px-4 text-[11px] font-bold bg-[#E11D48] text-black disabled:bg-white/10 disabled:text-[#F8FAFC]/20 transition-colors",children:"Gửi"})]})]})]})}let y={1:{icon:"⚽",label:"B\xe0n thắng",color:"text-green-400"},2:{icon:"\uD83C\uDD7F️",label:"Phạt đền",color:"text-green-400"},3:{icon:"\uD83D\uDFE1",label:"Thẻ v\xe0ng",color:"text-yellow-400"},4:{icon:"\uD83D\uDFE1\uD83D\uDFE1",label:"Thẻ v\xe0ng 2",color:"text-emerald-600"},5:{icon:"\uD83D\uDD34",label:"Thẻ đỏ",color:"text-red-500"},7:{icon:"\uD83D\uDD04",label:"Phản lưới",color:"text-orange-400"},8:{icon:"\uD83C\uDFE5",label:"Chấn thương",color:"text-[#94A3B8]"},9:{icon:"\uD83D\uDD04",label:"Thay người",color:"text-blue-400"},11:{icon:"⏱️",label:"Hiệp 2",color:"text-[#F8FAFC]/40"},15:{icon:"\uD83E\uDD45",label:"Pen trượt",color:"text-red-400"},19:{icon:"⏱️",label:"Kết th\xfac hiệp",color:"text-[#F8FAFC]/30"},21:{icon:"\uD83C\uDFC6",label:"VAR",color:"text-purple-400"}};function _({events:e}){let t=e?.incidents||e?.events||[];return t&&0!==t.length?(0,a.jsx)("div",{className:"flex flex-col",children:t.map((e,t)=>{let s=y[e.type]||{icon:"•",label:`Event ${e.type}`,color:"text-[#F8FAFC]/50"},l=1===e.position,r=2===e.position,n=e.add_time?`+${e.add_time}`:"",i=`${e.time}'${n}`;return l||r||11!==e.type&&19!==e.type?9===e.type?(0,a.jsxs)("div",{className:`flex items-center gap-2 border-b border-slate-50 p-3 text-xs ${l?"":"flex-row-reverse"}`,children:[(0,a.jsx)("span",{className:"text-slate-400 w-10 text-center shrink-0 text-[10px]",children:i}),(0,a.jsxs)("div",{className:`flex-1 flex flex-col gap-0.5 ${l?"items-start":"items-end"}`,children:[(0,a.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,a.jsx)("span",{className:"text-green-400 text-[10px]",children:"▲"}),(0,a.jsx)("span",{className:"text-[#F8FAFC]/80 text-[11px]",children:e.in_player_name||""})]}),(0,a.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,a.jsx)("span",{className:"text-red-400 text-[10px]",children:"▼"}),(0,a.jsx)("span",{className:"text-[#F8FAFC]/40 text-[11px]",children:e.out_player_name||""})]})]})]},t):(0,a.jsxs)("div",{className:`flex items-center gap-2 border-b border-slate-50 p-3 text-xs ${l?"":"flex-row-reverse"}`,children:[(0,a.jsx)("span",{className:"text-slate-400 w-10 text-center shrink-0 text-[10px]",children:i}),(0,a.jsx)("span",{className:`shrink-0 text-sm ${s.color}`,children:s.icon}),(0,a.jsxs)("div",{className:`flex-1 min-w-0 ${l?"text-left":"text-right"}`,children:[(0,a.jsx)("span",{className:"text-slate-700 text-[11px]",children:e.player_name||""}),e.assist1_name&&(0,a.jsxs)("span",{className:"text-slate-400 text-[10px] ml-1",children:["(kiến tạo: ",e.assist1_name,")"]}),1===e.type&&void 0!==e.home_score&&(0,a.jsxs)("span",{className:"text-[#E11D48] font-bold text-[11px] ml-2",children:[e.home_score," - ",e.away_score]})]})]},t):(0,a.jsx)("div",{className:"flex items-center justify-center py-2 border-b border-slate-50 bg-slate-50",children:(0,a.jsxs)("span",{className:"text-slate-400 text-[10px] uppercase tracking-wider",children:[s.icon," ",s.label," — ",i]})},t)})}):(0,a.jsx)(j,{text:"Diễn biến trận đấu sẽ được cập nhật trực tiếp tại đ\xe2y"})}function k({standings:e}
559){return e&&e.teams&&0!==e.teams.length?(0,a.jsxs)("div",{className:"w-full text-[10px]",children:[(0,a.jsxs)("div",{className:"grid grid-cols-[20px_1fr_24px_24px_32px] bg-slate-50 p-2 text-slate-400 uppercase font-bold sticky top-0",children:[(0,a.jsx)("span",{className:"text-center",children:"#"}),(0,a.jsx)("span",{children:"Team"}),(0,a.jsx)("span",{className:"text-center",children:"T"}),(0,a.jsx)("span",{className:"text-center",children:"B"}),(0,a.jsx)("span",{className:"text-center whitespace-nowrap",children:"Đ"})]}),e.teams.slice(0,15).map((e,t)=>{let s=!!e.data,l=s?parseFloat(e.data[0]):e.rank||t+1,r=s?e.data[1]:e.target_name,n=s?e.data[7]:e.points,i=s?e.data[3]:e.won,o=s?e.data[5]:e.loss;return(0,a.jsxs)("div",{className:"grid grid-cols-[20px_1fr_24px_24px_32px] items-center p-2 border-b border-slate-50 hover:bg-slate-50 transition-colors",children:[(0,a.jsx)("span",{className:"text-center text-slate-500",children:l}),(0,a.jsxs)("div",{className:"flex items-center gap-1.5 min-w-0 pr-2",children:[e.team_logo&&(0,a.jsx)("img",{src:e.team_logo,className:"w-3.5 h-3.5 object-contain",alt:r||"Team logo",loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-slate-700 font-medium truncate",children:r})]}),(0,a.jsx)("span",{className:"text-center text-slate-500",children:i}),(0,a.jsx)("span",{className:"text-center text-slate-500",children:o}),(0,a.jsx)("span",{className:"text-center text-[#E11D48] font-bold",children:n})]},r)})]}):(0,a.jsx)(j,{text:"Bảng xếp hạng sẽ được cập nhật"})}function E({odds:e}){let t=Array.isArray(e)?e:[],s=["2","4","3","16"];function l(e){for(let a of s){let s=t.find(t=>t.odds_type===e&&String(t.company_id)===a);if(s?.odds_info?.length)return s}return t.find(t=>t.odds_type===e&&t.odds_info?.length>0)}function r(e,t){let s=e?.odds_info;if(!s?.length)return["-","-","-"];let a="opening"===t?s.length-1:0;if(!s?.length||!s[a])return["-","-","-"];let l=s[a][2];if("string"!=typeof l)return["-","-","-"];let r=l.split(",");return[r[0]||"-",r[1]||"-",r[2]||"-"]}let n=l("asia"),i=l("eu"),o=l("bs"),c=l("cr"),d=r(n,"opening"),x=r(n,"latest"),h=r(i,"opening"),m=r(i,"latest"),p=r(o,"opening"),u=r(o,"latest"),g=r(c,"opening"),b=r(c,"latest"),f=({children:e})=>(0,a.jsx)("th",{className:"px-2 py-2 text-[9px] sm:text-[10px] font-bold uppercase tracking-wider text-slate-500 border-b border-slate-100 text-center",children:e}),j=({children:e,color:t})=>(0,a.jsx)("td",{className:`px-2 py-2.5 text-center text-[11px] sm:text-xs font-bold ${t||"text-slate-600"} border-b border-slate-50`,children:e});return(0,a.jsxs)("div",{className:"overflow-x-auto",children:[(0,a.jsxs)("table",{className:"w-full min-w-[600px]",children:[(0,a.jsxs)("thead",{children:[(0,a.jsxs)("tr",{className:"bg-slate-50",children:[(0,a.jsx)("th",{className:"px-4 py-2 text-left border-b border-slate-100",rowSpan:2,children:(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("div",{className:"w-7 h-7 rounded bg-gradient-to-br from-[#1d4ed8] to-[#3b82f6] flex items-center justify-center text-white text-[9px] font-black shadow-sm",children:"B"}),(0,a.jsx)("span",{className:"text-slate-600 text-[11px] font-bold tracking-wider",children:"SPORT"})]})}),(0,a.jsx)("th",{colSpan:3,className:"px-1 py-1.5 text-center text-[9px] sm:text-[10px] font-bold uppercase tracking-wider text-[#4681E8] border-b border-l border-slate-100",children:"CƯỢC CH\xc2U \xc1"}),(0,a.jsx)("th",{colSpan:3,className:"px-1 py-1.5 text-center text-[9px] sm:text-[10px] font-bold uppercase tracking-wider text-[#4681E8] border-b border-l border-slate-100",children:"CƯỢC CH\xc2U \xc2U"}),(0,a.jsx)("th",{colSpan:3,className:"px-1 py-1.5 text-center text-[9px] sm:text-[10px] font-bold uppercase tracking-wider text-[#4681E8] border-b border-l border-slate-100",children:"T\xc0I XỈU"}),(0,a.jsx)("th",{colSpan:3,className:"px-1 py-1.5 text-center text-[9px] sm:text-[10px] font-bold uppercase tracking-wider text-[#4681E8] border-b border-l border-slate-100",children:"K\xc8O G\xd3C"})]}),(0,a.jsxs)("tr",{className:"bg-slate-50",children:[(0,a.jsx)(f,{children:"CHỦ"}),(0,a.jsx)(f,{children:"CHẤP"}),(0,a.jsx)(f,{children:"KH\xc1CH"}),(0,a.jsx)(f,{children:"CHỦ"}),(0,a.jsx)(f,{children:"H\xd2A"}),(0,a.jsx)(f,{children:"KH\xc1CH"}),(0,a.jsx)(f,{children:"T\xc0I"}),(0,a.jsx)(f,{children:"TỶ LỆ"}),(0,a.jsx)(f,{children:"XỈU"}),(0,a.jsx)(f,{children:"T\xc0I"}),(0,a.jsx)(f,{children:"TỶ LỆ"}),(0,a.jsx)(f,{children:"XỈU"})]})]}),(0,a.jsxs)("tbody",{children:[(0,a.jsxs)("tr",{className:"hover:bg-slate-50 transition-colors",children:[(0,a.jsx)("td",{className:"px-4 py-2.5 text-[11px] sm:text-xs text-slate-500 font-medium border-b border-slate-50",children:"Tỷ Lệ Mở Cược"}),(0,a.jsx)(j,{children:d[0]}),(0,a.jsx)(j,{color:"text-red-400",children:d[1]}),(0,a.jsx)(j,{children:d[2]}),(0,a.jsx)(j,{children:h[0]}),(0,a.jsx)(j,{children:h[1]}),(0,a.jsx)(j,{children:h[2]}),(0,a.jsx)(j,{children:p[0]}),(0,a.jsx)(j,{children:p[1]}),(0,a.jsx)(j,{children:p[2]}),(0,a.jsx)(j,{children:g[0]}),(0,a.jsx)(j,{children:g[1]}),(0,a.jsx)(j,{children:g[2]})]}),(0,a.jsxs)("tr",{className:"hover:bg-slate-50 transition-colors",children:[(0,a.jsx)("td",{className:"px-4 py-2.5 text-[11px] sm:text-xs text-slate-500 font-medium border-b border-slate-50",children:"Tỷ Lệ Trước Trận"}),(0,a.jsx)(j,{children:x[0]}),(0,a.jsx)(j,{color:"text-red-400",children:x[1]}),(0,a.jsx)(j,{children:x[2]}),(0,a.jsx)(j,{children:m[0]}),(0,a.jsx)(j,{children:m[1]}),(0,a.jsx)(j,{children:m[2]}),(0,a.jsx)(j,{children:u[0]}),(0,a.jsx)(j,{children:u[1]}),(0,a.jsx)(j,{children:u[2]}),(0,a.jsx)(j,{children:b[0]}),(0,a.jsx)(j,{children:b[1]}),(0,a.jsx)(j,{children:b[2]})]}),(0,a.jsxs)("tr",{className:"hover:bg-slate-50 transition-colors bg-white",children:[(0,a.jsxs)("td",{className:"px-4 py-2.5 text-[11px] sm:text-xs text-slate-700 font-bold flex items-center gap-1.5 border-b border-slate-50",children:["Live ",(0,a.jsx)("span",{className:"w-1.5 h-1.5 rounded-full bg-red-500 animate-pulse"})]}),(0,a.jsx)(j,{color:"text-green-400",children:x[0]}),(0,a.jsx)(j,{color:"text-red-400",children:x[1]}),(0,a.jsx)(j,{color:"text-green-400",children:x[2]}),(0,a.jsx)(j,{color:"text-green-400",children:m[0]}),(0,a.jsx)(j,{color:"text-green-400",children:m[1]}),(0,a.jsx)(j,{color:"text-green-400",children:m[2]}),(0,a.jsx)(j,{color:"text-green-400",children:u[0]}),(0,a.jsx)(j,{children:u[1]}),(0,a.jsx)(j,{color:"text-green-400",children:u[2]}),(0,a.jsx)(j,{color:"text-green-400",children:b[0]}),(0,a.jsx)(j,{children:b[1]}),(0,a.jsx)(j,{color:"text-green-400",children:b[2]})]})]})]}),(0,a.jsx)("p",{className:"text-center text-slate-400 text-[10px] py-2.5 border-t border-slate-100",children:"Tỷ lệ k\xe8o sẽ được cập nhật gần giờ thi đấu"})]})}},53950:(e,t,s)=>{"use strict";s.d(t,{LiveMatchesClient:()=>m});var a=s(68019),l=s(10707);function r({activeSport:e,onSportChange:t,activeStatus:s,onStatusChange:l,matchesCount:n}){return(0,a.jsxs)("div",{className:"mb-5 flex flex-col gap-3",children:[(0,a.jsx)("div",{className:"flex items-center gap-2 overflow-x-auto pb-1 scrollbar-hide",children:[{id:"1",label:"B\xd3NG Đ\xc1",icon:"⚽"},{id:"2",label:"B\xd3NG RỔ",icon:"\uD83C\uDFC0"},{id:"5",label:"TENNIS",icon:"\uD83C\uDFBE"},{id:"4",label:"CẦU L\xd4NG",icon:"\uD83C\uDFF8"},{id:"3",label:"B\xd3NG CHUYỀN",icon:"\uD83C\uDFD0"},{id:"6",label:"B\xd3NG B\xc0N",icon:"\uD83C\uDFD3"}].map(s=>{let l=e===s.id;return(0,a.jsxs)("button",{type:"button",onClick:()=>t(s.id),className:`flex items-center gap-2 px-4 py-2.5 rounded-xl font-bold text-[12px] whitespace-nowrap transition-all duration-200 border cursor-pointer ${l?"bg-[#4681E8]/10 text-[#4681E8] border-[#4681E8]/40 shadow-[0_0_15px_rgba(70,129,232,0.1)]":"bg-white text-slate-500 border-slate-200 hover:text-slate-700 hover:border-[#4681E8]/30"}`,children:[(0,a.jsx)("span",{className:"text-[14px]",children:s.icon}
559),(0,a.jsx)("span",{className:"tracking-wider uppercase",children:s.label})]},s.id)})}),(0,a.jsx)("div",{className:"flex items-center gap-1 overflow-x-auto pb-1 scrollbar-hide bg-white rounded-xl p-1.5 border border-slate-200",children:[{id:"all",label:"TẤT CẢ",keyCount:"all"},{id:"live",label:"TRỰC TIẾP",keyCount:"live"},{id:"hot",label:"HOT",keyCount:"hot"},{id:"today",label:"H\xd4M NAY",keyCount:"today"},{id:"tomorrow",label:"NG\xc0Y MAI",keyCount:"tomorrow"}].map(e=>{let t=s===e.id,r=n[e.keyCount]||0;return(0,a.jsxs)("button",{type:"button",onClick:()=>l(e.id),className:`relative px-4 py-2 font-bold text-[12px] whitespace-nowrap transition-all duration-200 uppercase tracking-wider flex items-center gap-2 rounded-lg cursor-pointer ${t?"bg-[#4681E8]/10 text-[#4681E8] shadow-inner":"text-slate-500 hover:text-slate-700 hover:bg-[#4681E8]/5"}`,children:["live"===e.id&&t&&(0,a.jsx)("span",{className:"w-1.5 h-1.5 rounded-full bg-[#4681E8] animate-pulse shadow-[0_0_6px_rgba(70,129,232,0.8)]"}),(0,a.jsx)("span",{children:e.label}),(0,a.jsx)("span",{className:`px-1.5 py-0.5 rounded text-[10px] font-black ${t?"bg-[#4681E8]/20 text-[#4681E8]":"text-slate-400"}`,children:r})]},e.id)})})]})}function n(){return"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='10' fill='%2364748B' fill-opacity='0.18'/%3E%3C/svg%3E"}function i({match:e,isLoading:t=!1}){if(t||!e)return(0,a.jsx)("div",{className:"animate-pulse bg-white h-[64px] w-full border-b border-slate-100"});let s=new Date(1e3*parseInt(e.time||0,10)).toLocaleTimeString("vi-VN",{hour:"2-digit",minute:"2-digit",timeZone:"Asia/Ho_Chi_Minh"}),l=function(e,t){if("1"===t||"2"===t)switch(e){case"1":default:return{text:"Sắp diễn",isLive:!1,showScore:!1};case"2":return{text:"H1",isLive:!0,showScore:!0};case"3":return{text:"HT",isLive:!0,showScore:!0};case"4":return{text:"H2",isLive:!0,showScore:!0};case"5":return{text:"Phụ",isLive:!0,showScore:!0};case"7":return{text:"Pen",isLive:!0,showScore:!0};case"8":case"9":return{text:"FT",isLive:!1,showScore:!0}}switch(e){case"0":case"1":return{text:"Sắp diễn",isLive:!1,showScore:!1};case"51":return{text:"S1",isLive:!0,showScore:!0};case"52":return{text:"S2",isLive:!0,showScore:!0};case"53":return{text:"S3",isLive:!0,showScore:!0};case"54":return{text:"S4",isLive:!0,showScore:!0};case"55":return{text:"S5",isLive:!0,showScore:!0};case"100":case"90":case"91":case"110":return{text:"FT",isLive:!1,showScore:!0};default:return{text:"LIVE",isLive:!0,showScore:!0}}}(String(e.status_id),String(e.sport_id)),r=e.time_text||e.source_card_meta?.time_text||"",o=l.isLive,c=e.home_score??"-",d=e.away_score??"-",x=e.home_logo||n(),h=e.away_logo||n();return(0,a.jsxs)("a",{href:`/match/${encodeURIComponent(e.post_name||e.id)}`,className:"flex items-center w-full group border-b border-slate-100 bg-white hover:bg-[#4681E8]/5 transition-colors min-h-[64px]",children:[(0,a.jsx)("div",{className:`w-[60px] flex flex-col items-center justify-center shrink-0 h-full border-r ${o?"border-[#4681E8]/30 bg-[#4681E8]/5":"border-slate-100"}`,children:o?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"text-[#4681E8] font-bold text-[11px] uppercase tracking-wider tabular-nums leading-none",children:r||l.text}),(0,a.jsx)("span",{className:"w-1.5 h-1.5 rounded-full bg-[#4681E8] animate-pulse mt-1"})]}):(0,a.jsx)("span",{className:"text-slate-500 font-medium text-[12px]",children:s})}),(0,a.jsxs)("div",{className:"flex-1 flex flex-col justify-center px-3 py-2 gap-1.5 min-w-0",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between w-full",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2.5 min-w-0 overflow-hidden",children:[(0,a.jsx)("img",{src:x,alt:e.home_name,className:"w-4 h-4 shrink-0 object-contain",onError:e=>e.currentTarget.src=n(),loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-[13px] font-semibold truncate text-slate-800",children:e.home_name})]}),l.showScore&&(0,a.jsx)("span",{className:`text-[15px] font-black tabular-nums shrink-0 ml-2 ${o?"text-[#4681E8]":"text-slate-700"}`,children:c})]}),(0,a.jsxs)("div",{className:"flex items-center justify-between w-full",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2.5 min-w-0 overflow-hidden",children:[(0,a.jsx)("img",{src:h,alt:e.away_name,className:"w-4 h-4 shrink-0 object-contain",onError:e=>e.currentTarget.src=n(),loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-[13px] font-semibold truncate text-slate-800",children:e.away_name})]}),l.showScore&&(0,a.jsx)("span",{className:`text-[15px] font-black tabular-nums shrink-0 ml-2 ${o?"text-[#4681E8]":"text-slate-700"}`,children:d})]})]}),(0,a.jsx)("div",{className:"w-[48px] h-full flex items-center justify-center shrink-0 text-slate-300 group-hover:text-[#4681E8] transition-colors border-l border-slate-100",children:(0,a.jsx)("svg",{className:"w-5 h-5 fill-current",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{d:"M8 5v14l11-7z"})})})]})}let o=new Set(["1","2","3","4","5","7"]),c=new Set(["8","9","15"]),d=new Set(["51","52","53","54","5
5595","56","57","58","59"]),x=new Set(["100","90","91","92","93","110"]);function h(e){let t=String(e.status_id);return 2>=parseInt(e.sport_id)?o.has(t):d.has(t)}function m({matches:e,matchIndex:t}){let[s,n]=(0,l.useState)("1"),[o,d]=(0,l.useState)("all"),[p,u]=(0,l.useState)(1);(0,l.useEffect)(()=>{u(1)},[s,o]);let{todayStart:g,tomorrowStart:b,dayAfterStart:f}=(0,l.useMemo)(()=>{let e,t,s,{vnTodayStartUTC:a,vnTomorrowStartUTC:l,vnDayAfterStartUTC:r}=(s=(t=Math.floor(Date.UTC((e=new Date(Date.now()+252e5)).getUTCFullYear(),e.getUTCMonth(),e.getUTCDate())/1e3)-25200)+86400,{vnTodayStartUTC:t,vnTomorrowStartUTC:s,vnDayAfterStartUTC:s+86400});return{todayStart:a,tomorrowStart:l,dayAfterStart:r}},[]),j=(0,l.useMemo)(()=>new Map(e.map(e=>[e?.match_key?String(e.match_key):e?.ls_id?String(e.ls_id):e?.id?`${String(e.sport_id||"0")}:${String(e.id)}`:e?.scheduleId?`${String(e.sport_id||"0")}:schedule:${String(e.scheduleId)}`:[String(e?.sport_id||"0"),String(e?.time||"0"),String(e?.home_name||""),String(e?.away_name||"")].join(":"),e])),[e]),w=t?.summary_by_sport?.[s],v=t?.bucket_keys_by_sport?.[s],N=t?.bucket_pages_by_sport?.[s],y=e.filter(e=>{let t;return String(e.sport_id)===s&&(t=String(e.status_id),2>=parseInt(e.sport_id)?!c.has(t):!x.has(t))}),_=y.filter(e=>{let t=parseInt(e.time);return t>=g&&t<b}),k=y.filter(e=>{let t=parseInt(e.time);return t>=b&&t<f}),E={all:y.length,live:y.filter(e=>h(e)).length,hot:y.filter(e=>"1"===String(e.hot)).length,today:_.length,tomorrow:k.length},C=(0,l.useMemo)(()=>{if(v){if("all"===o&&Array.isArray(N?.all)&&N.all.length>0)return N.all.slice(0,p).flat().map(e=>j.get(e)).filter(Boolean);let e=v[o];if(Array.isArray(e))return e.map(e=>j.get(e)).filter(Boolean)}return"all"===o?y:"live"===o?y.filter(e=>h(e)):"hot"===o?y.filter(e=>"1"===String(e.hot)):"today"===o?_:"tomorrow"===o?k:y},[o,y,j,N,v,_,k,p]),S="all"===o&&Array.isArray(N?.all)&&p<N.all.length,L=(0,l.useMemo)(()=>"all"!==o&&"live"!==o&&"hot"!==o?[]:C.filter(e=>"1"===String(e.hot)||h(e)).slice(0,4),[C,o]),$=(0,l.useMemo)(()=>{let e=new Map;
559return C.forEach(t=>{let s=t.source_card_meta?.league_label||t.match_data?.competition_vi||t.match_data?.competition_name||t.match_data?.competition_full||"Giải đấu kh\xe1c";e.has(s)||e.set(s,[]),e.get(s).push(t)}),Array.from(e.entries())},[C]);return(0,a.jsxs)("div",{className:"w-full min-h-[500px]",children:[(0,a.jsx)(r,{activeSport:s,onSportChange:n,activeStatus:o,onStatusChange:d,matchesCount:w||E}),0===C.length?(0,a.jsx)("div",{className:"py-20 text-center",children:(0,a.jsx)("div",{className:"text-slate-400 text-base font-medium",children:"Kh\xf4ng c\xf3 trận đấu n\xe0o."})}):(0,a.jsxs)("div",{className:"flex flex-col gap-6",children:[L.length>0&&"all"===o&&(0,a.jsxs)("div",{className:"mb-4",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 mb-3 px-1",children:[(0,a.jsx)("span",{className:"w-2 h-4 rounded-full bg-[#4681E8]"}),(0,a.jsx)("h2",{className:"text-slate-800 font-black text-sm uppercase tracking-wider",children:"Trận đấu t\xe2m điểm"})]}),(0,a.jsx)("div",{className:"grid grid-cols-1 xl:grid-cols-2 gap-2",children:L.map((e,t)=>(0,a.jsx)(i,{match:e},`featured-${e.ls_id||e.id}-${t}`))})]}),(0,a.jsx)("div",{className:"flex flex-col gap-5",children:$.map(([e,t])=>{let s=t[0]?.match_data?.competition_logo;return(0,a.jsxs)("div",{className:"rounded-xl overflow-hidden border border-slate-200 bg-white shadow-sm",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2.5 bg-[#0E1B33] px-4 py-2.5 border-b border-[#0E1B33]",children:[s&&(0,a.jsx)("img",{src:s,alt:"league",className:"w-4 h-4 object-contain brightness-200 opacity-80",loading:"lazy",decoding:"async"}),(0,a.jsx)("h3",{className:"text-white text-[12px] font-bold uppercase tracking-wider truncate",children:e})]}),(0,a.jsx)("div",{className:"flex flex-col",children:t.map((e,t)=>(0,a.jsx)(i,{match:e},e.ls_id||`${e.id}-${t}`))})]},e)})}),S&&(0,a.jsx)("div",{className:"flex justify-center mt-6",children:(0,a.jsx)("button",{type:"button",onClick:()=>u(e=>e+1),className:"inline-flex items-center justify-center rounded-xl border border-[#4681E8]/30 bg-white px-8 py-3 text-[12px] font-bold uppercase tracking-wider text-[#4681E8] transition-all duration-200 hover:bg-[#4681E8] hover:text-white hover:border-[#4681E8]",children:"Tải th\xeam"})})]})]})}},54738:()=>{},55427:(e,t,s)=>{"use strict";s.d(t,{Klivevip03SchedulePage:()=>d});var a=s(68019),l=s(10707),r=s(78637),n=s(43539);function i({html:e}){return e?.trim()?(0,a.jsx)("section",{className:"relative mt-10 mb-6",children:(0,a.jsx)("div",{className:"seo-prose relative",children:(0,a.jsx)("div",{dangerouslySetInnerHTML:{__html:e},className:"text-slate-600 text-[14px] leading-[1.85] px-1 [&_strong]:text-slate-900 [&_a]:text-[#4681E8]"})})}):null}s(30613);let o=`
560<h2>Lịch thi đấu b\xf3ng đ\xe1 - Cập nhật lịch b\xf3ng đ\xe1 h\xf4m nay nhanh v\xe0 ch\xednh x\xe1c</h2>
561
562<p>Để <strong>xem lịch thi đấu b\xf3ng đ\xe1</strong> nhanh, ch\xednh x\xe1c v\xe0 đầy đủ nhất, Klive ch\xednh l\xe0 nơi bạn n\xean chọn. Ch\xfang t\xf4i cập nhật lịch thi đấu cho to\xe0n bộ c\xe1c giải đấu trong nước v\xe0 quốc tế, gi\xfap bạn kh\xf4ng bỏ lỡ bất kỳ trận cầu hấp dẫn n\xe0o.</p>
563
564<img src="/images/seo/schedule-football.png" alt="Lịch thi đấu b\xf3ng đ\xe1 h\xf4m nay tại Klive" loading="lazy" />
565
566<div class="toc-box">
567  <h3>Nội dung ch\xednh</h3>
568  <ol>
569    <li>Lịch thi đấu b\xf3ng đ\xe1 trực tuyến h\xe0ng đầu</li>
570    <li>Lịch b\xf3ng đ\xe1 nhanh v\xe0 ch\xednh x\xe1c</li>
571    <li>Cập nhật lịch Ngoại Hạng Anh v\xe0 Champions League</li>
572    <li>C\xe1ch xem lịch thi đấu hiệu quả nhất</li>
573  </ol>
574</div>
575
576<h2>Lịch thi đấu b\xf3ng đ\xe1 trực tuyến h\xe0ng đầu</h2>
577<p>Trong thời đại số, kh\xf4ng ai c\xf2n xem lịch b\xf3ng đ\xe1 tr\xean TV hay b\xe1o giấy nữa. Tất cả đ\xe3 chuyển sang theo d\xf5i online, v\xe0 Klive ch\xednh l\xe0 nền tảng cập nhật lịch b\xf3ng đ\xe1 được đ\xe1nh gi\xe1 cao nhất.</p>
578
579<p>Khi truy cập Klive, bạn c\xf3 thể xem lịch thi đấu của bất kỳ giải đấu b\xf3ng đ\xe1 n\xe0o tr\xean thế giới một c\xe1ch ho\xe0n to\xe0n miễn ph\xed. Th\xf4ng tin lịch đấu được cập nhật sớm nhất v\xe0 chi tiết đến từng ph\xfat.</p>
580
581<h2>Lịch b\xf3ng đ\xe1 nhanh v\xe0 ch\xednh x\xe1c</h2>
582<p>Klive kh\xf4ng chỉ cung cấp lịch thi đấu c\xe1c giải đấu h\xe0ng đầu m\xe0 c\xf2n cập nhật lịch ph\xe1t s\xf3ng tr\xean c\xe1c k\xeanh truyền h\xecnh Việt Nam như K+, FPT Play, VTV Sports. Gi\xfap bạn biết trận n\xe0o được chiếu trực tiếp tr\xean TV v\xe0 sắp xếp thời gian hợp l\xfd.</p>
583
584<h2>Cập nhật lịch Ngoại Hạng Anh v\xe0 Champions League</h2>
585<p>Ngoại Hạng Anh v\xe0 Champions League l\xe0 hai giải đấu được quan t\xe2m nhất. Tại Klive, bạn lu\xf4n nắm được lịch đấu đầy đủ từ v\xf2ng bảng đến chung kết, k\xe8m theo th\xf4ng tin về đội h\xecnh dá»± kiến, phong độ v\xe0 lịch sá»­ đối đầu để chuẩn bị tốt nhất cho má
585»—i trận cầu.</p>
586
587<p>Kết hợp lịch thi đấu với trang trực tiếp b\xf3ng đ\xe1, bạn sẽ c\xf3 trải nghiệm theo d\xf5i b\xf3ng đ\xe1 ho\xe0n hảo nhất - biết trước, xem ngay, kh\xf4ng bỏ lỡ!</p>
588`;var c=s(59472);function d({initialData:e}){let t=(0,r.usePathname)(),[s,h]=(0,l.useState)(!1),[m,p]=(0,l.useState)(new Set),[u,g]=(0,l.useState)(""),[b,f]=(0,l.useState)(!1),[j,w]=(0,l.useState)(0),v=(0,l.useMemo)(()=>(0,c.p_)(e),[e]),N=v.dateTabs,y=(0,l.useMemo)(()=>{if(!v.selectedDate)return 0;let e=N.findIndex(e=>(e.dataValue||e.date)===v.selectedDate);return e>=0?e:0},[N,v.selectedDate]),[_,k]=(0,l.useState)(y),[E,C]=(0,l.useState)(v.leagues||[]),S=(0,l.useMemo)(()=>{if(!u)return E;let e=u.toLowerCase();return E.filter(t=>t.league_name.toLowerCase().includes(e)||t.matches.some(t=>t.home_team.toLowerCase().includes(e)||t.away_team.toLowerCase().includes(e)))},[E,u]),L=Math.max(0,N.length-7),$=N.slice(j,j+7),F=j>0,T=j<L,A=S.reduce((e,t)=>e+t.matches.length,0);return((0,l.useEffect)(()=>{if(!v.selectedDate||!N.length)return;let e=N.findIndex(e=>(e.dataValue||e.date)===v.selectedDate);e>=0&&k(e)},[N,v.selectedDate]),(0,l.useEffect)(()=>{_<j?w(Math.max(0,_)):_>=j+7&&w(Math.min(L,_-7+1))},[_,L,j]),e)?(0,a.jsxs)("div",{className:"max-w-[1440px] mx-auto px-4 py-8",children:[(0,a.jsx)(n.O,{eyebrow:"Lịch thi đấu",title:"LỊCH THI ĐẤU",rightSlot:(0,a.jsxs)("div",{className:"text-[12px] text-slate-500 font-bold uppercase tracking-wider",children:[(0,a.jsx)("span",{className:"text-[#E11D48] font-black",children:S.reduce((e,t)=>e+t.matches.length,0)})," trận đấu"]})}),(0,a.jsxs)("div",{className:"flex items-center mb-4 rounded-xl overflow-hidden border border-slate-200 bg-white shadow-sm",children:[(0,a.jsx)("button",{type:"button",disabled:!F,onClick:()=>w(e=>Math.max(0,e-1)),className:`flex items-center justify-center w-8 h-[52px] bg-slate-100 border-r border-slate-200 text-slate-600 hover:text-slate-800 hover:bg-slate-200 transition-all shrink-0 ${!F?"opacity-30":"cursor-pointer"}`,children:(0,a.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2.5,d:"M15 19l-7-7 7-7"})})}),(0,a.jsx)("div",{className:"flex flex-1",children:$.map((e,s)=>{let l=j+s;return(0,a.jsxs)("button",{type:"button",onClick:()=>(e=>{let s=N[e];if(!s||e===_)return;let a=s.dataValue||s.date;a&&(k(e),p(new Set),h(!0),window.history.replaceState(null,"",`${t}?date=${encodeURIComponent(a)}`),fetch(`/api/socolive/fixtures?date=${encodeURIComponent(a)}`,{cache:"no-store"}).then(e=>e.ok?e.json():null).then(e=>{e&&C((0,c.p_)(e).leagues||[])}).finally(()=>h(!1)))})(l),className:`flex-1 flex flex-col items-center justify-center h-[52px] border-b-[3px] transition-all duration-300 ${_===l?"border-[#4681E8] text-[#4681E8] bg-[#4681E8]/5":"border-transparent text-[#64748B] hover:text-[#94A3B8] hover:bg-slate-100"}`,children:[(0,a.jsx)("span",{className:`text-[11px] font-bold uppercase tracking-widest ${_===l?"text-[#4681E8]":""}`,children:e.label}),(0,a.jsx)("span",{className:`text-[12px] font-mono mt-0.5 ${_===l?"text-slate-800 font-black":""}`,children:e.date})]},`tab-${l}`)})}),(0,a.jsx)("button",{type:"button",disabled:!T,onClick:()=>w(e=>Math.min(L,e+1)),className:`flex items-center justify-center w-8 h-[52px] bg-slate-100 border-l border-slate-200 text-slate-600 hover:text-slate-800 hover:bg-slate-200 transition-all shrink-0 ${!T?"opacity-30":"cursor-pointer"}`,children:(0,a.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2.5,d:"M9 5l7 7-7 7"})})})]}),(0,a.jsxs)("div",{className:"relative mb-4",children:[(0,a.jsxs)("button",{onClick:()=>f(!b),className:"flex items-center gap-3 bg-white hover:bg-slate-50 px-4 py-2.5 rounded-xl border border-slate-200 shadow-sm transition-all text-sm group",children:[(0,a.jsx)("svg",{className:"w-5 h-5 text-[#E11D48] transition-colors group-hover:text-[#F43F5E]",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 6h16M4 12h16M4 18h16"})}),(0,a.jsx)("span",{className:"text-slate-700 font-bold text-[13px] uppercase tracking-wide",children:"Danh s\xe1ch giải đấu"}),(0,a.jsx)("svg",{className:`w-4 h-4 text-slate-500 transition-transform duration-300 ${b?"rotate-180":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),b&&(0,a.jsxs)("div",{className:"absolute top-full left-0 mt-2 w-[360px] bg-white border border-slate-200 rounded-2xl shadow-[0_24px_80px_rgba(0,0,0,0.12)] z-50 max-h-[320px] overflow-hidden flex flex-col",children:[(0,a.jsx)("div",{className:"p-2 border-b border-slate-100",children:(0,a.jsx)("input",{type:"text",placeholder:"T\xecm giải đấu...",value:u,onChange:e=>g(e.target.value),className:"w-full bg-slate-50 border border-transparent roun
588ded-xl px-4 py-2.5 text-sm text-slate-800 placeholder-slate-400 outline-none focus:border-[#4681E8]/50 transition-colors"})}),(0,a.jsx)("div",{className:"overflow-y-auto flex-1 py-2",children:E.map((e,t)=>(0,a.jsxs)("button",{type:"button",onClick:()=>{g(e.league_name),f(!1)},className:"w-full flex items-center gap-3 px-4 py-2.5 hover:bg-slate-50 text-left text-[13px] transition-colors",children:[e.league_icon?(0,a.jsx)("img",{src:e.league_icon,alt:e.league_name||"League",className:"w-5 h-5 object-contain shrink-0",loading:"lazy",decoding:"async"}):(0,a.jsx)("div",{className:"w-5 h-5 rounded-md bg-slate-200 shrink-0"}),(0,a.jsx)("span",{className:"text-slate-600 truncate flex-1 font-medium",children:e.league_name}),(0,a.jsx)("span",{className:"text-[11px] text-[#E11D48] font-bold shrink-0 px-2 py-0.5 bg-[#E11D48]/10 rounded-md border border-[#E11D48]/20",children:e.matches.length})]},t))})]})]}),(0,a.jsxs)("div",{className:"grid grid-cols-[1fr_60px_55px_100px_100px_90px] bg-slate-50 border border-slate-200 rounded-t-xl px-4 py-3 text-[11px] text-slate-500 font-black uppercase tracking-widest shadow-inner",children:[(0,a.jsx)("span",{children:"Trận đấu"}),(0,a.jsx)("span",{className:"text-center",children:"Tỷ số"}),(0,a.jsx)("span",{className:"text-center",children:"Hiệp 1"}),(0,a.jsx)("span",{className:"text-center",children:"Cược chấp"}),(0,a.jsx)("span",{className:"text-center",children:"T\xe0i/Xỉu"}),(0,a.jsx)("span",{className:"text-center",children:"1 X 2"})]}),(0,a.jsxs)("div",{className:"border border-slate-200 border-t-0 rounded-b-xl overflow-hidden relative shadow-[0_8px_30px_rgba(0,0,0,0.06)]",children:[s&&(0,a.jsx)("div",{className:"absolute inset-0 z-10 bg-white/80 backdrop-blur-[2px]",children:(0,a.jsx)("div",{className:"space-y-0",children:[...Array(6)].map((e,t)=>(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 px-4 py-3.5 bg-slate-100 border-b border-slate-200",children:[(0,a.jsx)("div",{className:"w-4 h-4 rounded bg-slate-300 animate-pulse"}),(0,a.jsx)("div",{className:"h-3.5 rounded bg-slate-200 animate-pulse",style:{width:`${120+30*t}px`}})]}),[void 0,void 0].map((e,t)=>(0,a.jsxs)("div",{className:"grid grid-cols-[1fr_60px_55px_100px_100px_90px] items-center px-4 py-3 border-b border-slate-100",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)("div",{className:"w-10 h-3.5 rounded bg-slate-200 animate-pulse"}),(0,a.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,a.jsx)("div",{className:"h-3 w-24 rounded bg-slate-100 animate-pulse"}),(0,a.jsx)("div",{className:"h-3 w-20 rounded bg-slate-100 animate-pulse"})]})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5",children:[(0,a.jsx)("div",{className:"h-3 w-5 rounded bg-slate-100 animate-pulse"}),(0,a.jsx)("div",{className:"h-3 w-5 rounded bg-slate-100 animate-pulse"})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5",children:[(0,a.jsx)("div",{className:"h-3 w-5 rounded bg-slate-100 animate-pulse"}),(0,a.jsx)("div",{className:"h-3 w-5 rounded bg-slate-100 animate-pulse"})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5",children:[(0,a.jsx)("div",{className:"h-3 w-14 rounded bg-slate-100 animate-pulse"}),(0,a.jsx)("div",{className:"h-3 w-10 rounded bg-slate-100 animate-pulse"})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5",children:[(0,a.jsx)("div",{className:"h-3 w-14 rounded bg-slate-100 animate-pulse"}),(0,a.jsx)("div",{className:"h-3 w-10 rounded bg-slate-100 animate-pulse"})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5",children:[(0,a.jsx)("div",{className:"h-3 w-10 rounded bg-slate-100 animate-pulse"}),(0,a.jsx)("div",{className:"h-3 w-10 rounded bg-slate-100 animate-pulse"}),(0,a.jsx)("div",{className:"h-3 w-10 rounded bg-slate-100 animate-pulse"})]})]},t))]},t))})}),0!==S.length||s?S.map((e,t)=>(0,a.jsxs)("div",{id:`league-${t}`,children:[(0,a.jsxs)("button",{onClick:()=>{p(e=>{let s=new Set(e);return s.has(t)?s.delete(t):s.add(t),s})},className:"w-full flex items-center gap-3 px-4 py-3 bg-slate-50 hover:bg-slate-100 border-b border-slate-100 transition-colors text-left group",children:[(0,a.jsx)("svg",{className:`w-4 h-4 text-[#E11D48] transition-transform duration-300 shrink-0 ${m.has(t)?"-rotate-90":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2.5,d:"M19 9l-7 7-7-7"})}),e.league_icon&&(0,a.jsx)("div",{className:"w-6 h-6 rounded-full bg-slate-100 p-0.5 border border-slate-200 flex items-center justify-center shadow-sm",children:(0,a.jsx)("img",{src:e.league_icon,alt:e.league_name||"League",className:"w-4 h-4 object-contain shrink-0",loading:"lazy",decoding:"async"})}),(0,a.jsx)("span",{className:"text-[13px] font-bold text-slate-700 flex-1 truncate uppercase tracking-widest",children:e.league_name}),(0,a.jsxs)("span",{className:"text-[11px] text-[#E11D48] font-bold shrink-0 ml-1 px-2 py-0.5 bg-[#E11D48]/10 rounded border border-[#
588E11D48]/20 group-hover:bg-[#E11D48]/20 transition-colors",children:["BXH ",(0,a.jsx)("svg",{className:"inline w-3 h-3 ml-0.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 6h16M4 10h16M4 14h16M4 18h16"})})]})]}),!m.has(t)&&e.matches.map((e,t)=>(0,a.jsxs)("div",{className:"grid grid-cols-[1fr_60px_55px_100px_100px_90px] items-center px-4 py-3 bg-transparent hover:bg-slate-50 border-b border-slate-100 last:border-0 transition-colors group cursor-default",children:[(0,a.jsxs)("div",{className:"flex items-center gap-4 min-w-0",children:[(0,a.jsx)("span",{className:"text-[#E11D48] font-mono text-[13px] font-black min-w-[42px] shrink-0 drop-shadow-[0_0_4px_rgba(225,29,72,0.4)]",children:e.time}),(0,a.jsxs)("div",{className:"flex flex-col gap-1 min-w-0 flex-1",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[e.home_logo&&(0,a.jsx)("img",{src:e.home_logo,alt:e.home_team||"Home team",className:"w-4 h-4 object-contain shrink-0 filter drop-shadow-[0_2px_2px_rgba(0,0,0,0.8)]",loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-[13px] text-slate-700 font-medium truncate group-hover:text-slate-900 transition-colors",children:e.home_team})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[e.away_logo&&(0,a.jsx)("img",{src:e.away_logo,alt:e.away_team||"Away team",className:"w-4 h-4 object-contain shrink-0",loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-[13px] text-slate-700 font-medium truncate group-hover:text-slate-900 transition-colors",children:e.away_team})]})]})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center",children:[(0,a.jsx)("span",{className:"text-[12px] text-[var(--accent-cyan)] font-mono font-bold",children:"-"!==e.score?e.score:"-"}),(0,a.jsx)("span",{className:"text-[12px] text-[#64748B]",children:"-"})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center",children:[(0,a.jsx)("span",{className:"text-[12px] text-[#64748B]",children:"-"}),(0,a.jsx)("span",{className:"text-[12px] text-[#64748B]",children:"-"})]}),(0,a.jsx)(x,{values:e.handicap,hasLine:!0}),(0,a.jsx)(x,{values:e.over_under,hasLine:!0}),(0,a.jsx)("div",{className:"flex flex-col items-center gap-0",children:e.one_x_two?.length>0?e.one_x_two.map((e,t)=>(0,a.jsx)("span",{className:"text-[11px] text-slate-500 leading-[18px]",children:e||"-"},t)):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"text-[11px] text-[#64748B] leading-[18px]",children:"-"}),(0,a.jsx)("span",{className:"text-[11px] text-[#64748B] leading-[18px]",children:"-"}),(0,a.jsx)("span",{className:"text-[11px] text-[#64748B] leading-[18px]",children:"-"})]})})]},t))]},t)):(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center py-20 gap-3 bg-slate-50",children:[(0,a.jsx)("svg",{className:"w-12 h-12 text-slate-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",strokeWidth:1.5,children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6.75 3v2.25M17.25 3v2.25M3 18.75V7.5a2.25 2.25 0 012.25-2.25h13.5A2.25 2.25 0 0121 7.5v11.25m-18 0A2.25 2.25 0 005.25 21h13.5A2.25 2.25 0 0021 18.75m-18 0v-7.5A2.25 2.25 0 015.25 9h13.5A2.25 2.25 0 0121 11.25v7.5"})}),(0,a.jsx)("span",{className:"text-slate-500 font-medium tracking-wide",children:"Kh\xf4ng c\xf3 trận đấu n\xe0o cho ng\xe0y n\xe0y"}),(0,a.jsx)("span",{className:"text-slate-400 text-[12px]",children:"H\xe3y thử chọn một ng\xe0y kh\xe1c"})]})]}),(0,a.jsxs)("div",{className:"mt-6 text-center text-[11px] text-[#64748B] uppercase tracking-widest font-bold drop-shadow-sm",children:["Tổng cộng ",A," trận đấu trong ",S.length," giải"]}),(0,a.jsx)(i,{html:o})]}):(0,a.jsxs)("div",{className:"max-w-[1440px] mx-auto px-4 py-8",children:[(0,a.jsx)(n.O,{eyebrow:"Lịch thi đấu",title:"LỊCH THI ĐẤU"}),(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center py-16 gap-4",children:[(0,a.jsx)("div",{className:"w-12 h-12 rounded-full border-2 border-[#E11D48]/30 border-t-[#E11D48] animate-spin"}),(0,a.jsx)("span",{className:"text-slate-500 text-sm font-medium tracking-wide",children:"Đang tải lịch thi đấu..."})]})]})}function x({values:e,hasLine:t}){return e&&0!==e.length?t&&e.length>=3?(0,a.jsxs)("div",{className:"flex flex-col items-center gap-0",children:[(0,a.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,a.jsx)("span",{className:"text-[11px] text-[#E11D48] leading-[18px] font-bold",children:e[0]}),(0,a.jsx)("span",{className:"text-[11px] text-slate-500 leading-[18px]",children:e[1]})]}),(0,a.jsx)("span",{className:"text-[11px] text-slate-500 leading-[18px]",children:e[2]})]}):(0,a.jsx)("div",{className:"flex flex-col items-center gap-0",children:e.map((e,t)=>(0,a.jsx)("span",{className:"text-[11px] text-slate-500 leading-[18px]",children:e||"-"},t))}):(0,a.jsxs)("div",{className:"flex flex-col items-center",children:[(0,a.jsx)("span",{className:"text-[11px] text-[#64748B] leading-[18px]",children:"-"}),(0,a.jsx)("span",{className:"text-[11px] text-[#64748B] leading-[18px]",children:"-"})]})}},56073:(e,t,s)=>{"use strict";s.d(t,{StandingsClient:()=>h});var a=s(68019),l=s(10707),r=s(46914),n=s(96007);function i(e){return"W"===e?"border border-emerald-500/45 bg-emerald-500/25 text-emerald-300 shadow-[0_0_0_1px_rgba(16,185,129,0.08)_inset]":"L"===e?"border border-red-500/45 bg-red-500/25 text-red-300 shadow-[0_0_0_1px_rgba(239,68,68,0.08)_inset]":"D"===e?"border border-amber-400/45 bg-amber-400/22 text-amber-200 shadow-[0_0_0_1px_rgba(251,191,36,0.08)_inset]":"border border-slate-500/40 bg-slate-500/18 text-slate-700"}function o(e,t){return 1===e?{bar:"bg-[linear-gradient(180deg,#facc15,#f97316)]",badge:"border-emerald-600/60 bg-slate-100 text-yellow-700 shadow-[0_0_18px_rgba(250,204,21,0.14)]",row:"from-[#32230d]/70 via-trans
588parent to-transparent"}:e<=4?{bar:"bg-[linear-gradient(180deg,#fb7185,#f97316)]",badge:"border-[#fb7185]/45 bg-slate-100 text-rose-700",row:"from-[#241318]/55 via-transparent to-transparent"}:e<=6?{bar:"bg-[linear-gradient(180deg,#f59e0b,#facc15)]",badge:"border-[#f59e0b]/45 bg-slate-100 text-yellow-700",row:"from-[#24190b]/45 via-transparent to-transparent"}:e<=10?{bar:"bg-[linear-gradient(180deg,#38bdf8,#2563eb)]",badge:"border-sky-400/40 bg-white text-sky-700",row:"from-[#101725]/32 via-transparent to-transparent"}:e>=Math.max(t-2,1)?{bar:"bg-[linear-gradient(180deg,#ef4444,#7f1d1d)]",badge:"border-red-500/40 bg-slate-100 text-red-700",row:"from-[#220f14]/45 via-transparent to-transparent"}:{bar:"bg-[linear-gradient(180deg,#64748b,#334155)]",badge:"border-slate-500/35 bg-white text-slate-700",row:"from-[#12161d]/24 via-transparent to-transparent"}}function c({detail:e}){let[t,s]=(0,l.useState)(!1),n=(0,l.useRef)(null),[o,d]=(0,l.useState)({top:0,left:0}),x=i(e.result),h=(0,l.useCallback)(()=>{if(n.current){let e=n.current.getBoundingClientRect();d({top:e.top+window.scrollY-8,left:e.left+e.width/2+window.scrollX})}s(!0)},[]);return(0,a.jsxs)("div",{ref:n,className:"relative inline-flex",onMouseEnter:h,onMouseLeave:()=>s(!1),children:[(0,a.jsx)("span",{className:`inline-flex h-7 w-7 items-center justify-center rounded-[8px] text-[11px] font-black cursor-pointer transition-transform hover:-translate-y-0.5 ${x}`,children:e.result}),t&&e.match_time&&"u">typeof document&&(0,r.createPortal)((0,a.jsxs)("div",{className:"fixed z-[9999] w-[220px] pointer-events-none",style:{top:`${o.top}px`,left:`${o.left}px`,transform:"translate(-50%, -100%)",position:"absolute"},children:[(0,a.jsxs)("div",{className:"overflow-hidden rounded-xl border border-[#cbd5e1] bg-white shadow-2xl",children:[(0,a.jsx)("div",{className:"bg-slate-100 px-3 py-1.5 text-[10px] text-slate-600 font-mono text-center border-b border-[#cbd5e1]",children:e.match_time}),(0,a.jsxs)("div",{className:"px-3 py-2.5 flex items-center justify-between gap-2",children:[(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5 flex-1 min-w-0",children:[e.home_logo?(0,a.jsx)("img",{src:e.home_logo,alt:e.home_team,className:"w-7 h-7 object-contain",loading:"lazy",decoding:"async"}):(0,a.jsx)("div",{className:"w-7 h-7 rounded-full bg-gray-700 flex items-center justify-center text-[8px] text-slate-600 font-bold",children:"?"}),(0,a.jsx)("span",{className:"text-[9px] text-slate-600 font-bold text-center leading-tight line-clamp-2 max-w-[70px]",children:e.home_team})]}),(0,a.jsx)("div",{className:"text-slate-900 font-black text-sm whitespace-nowrap px-1",children:e.score||"? - ?"}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5 flex-1 min-w-0",children:[e.away_logo?(0,a.jsx)("img",{src:e.away_logo,alt:e.away_team,className:"w-7 h-7 object-contain",loading:"lazy",decoding:"async"}):(0,a.jsx)("div",{className:"w-7 h-7 rounded-full bg-gray-700 flex items-center justify-center text-[8px] text-slate-600 font-bold",children:"?"}),(0,a.jsx)("span",{className:"text-[9px] text-slate-600 font-bold text-center leading-tight line-clamp-2 max-w-[70px]",children:e.away_team})]})]})]}),(0,a.jsx)("div",{className:"absolute left-1/2 -translate-x-1/2 -bottom-1 w-2 h-2 bg-white border-r border-b border-[#cbd5e1] rotate-45"})]}),document.body)]})}function d({result:e}){let t=i(e);return(0,a.jsx)("span",{className:`inline-flex h-7 w-7 items-center justify-center rounded-[8px] text-[11px] font-black ${t}`,children:e})}function x({value:e,totalTeams:t}){let s=Number(e);if(!Number.isFinite(s))return(0,a.jsx)("td",{className:"px-4 py-4 text-center font-mono font-black text-slate-400",children:e});let l=o(s,t);return(0,a.jsxs)("td",{className:"relative px-4 py-4 text-center font-mono",children:[(0,a.jsx)("span",{className:`absolute left-0 top-1/2 h-7 w-1 -translate-y-1/2 rounded-r-full ${l.bar}`}),(0,a.jsx)("span",{className:`inline-flex h-8 w-8 items-center justify-center rounded-[10px] border text-[13px] font-black ${l.badge}`,children:s})]})}function h({initialData:e}){let[t]=(0,l.useState)(!1),[s,r]=(0,l.useState)(!1),[i,p]=(0,l.useState)(""),u=(0,l.useRef)(null);if((0,l.useEffect)(()=>{function e(e){u.current&&!u.current.contains(e.target)&&r(!1)}return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[]),!e)return(0,a.jsx)("div",{className:"text-center py-20 text-slate-600",children:"Đang tải dữ liệu..."});let g=e.available_leagues||[],b=g.filter(e=>e.name.toLowerCase().includes(i.toLowerCase())),f=e.teams&&e.teams.length>0&&Array.isArray(e.teams[0]?.form),j=!f&&e.rankings;return(0,a.jsxs)("div",{className:"mx-auto max-w-[1440px] px-4 py-8",children:[(0,a.jsx)(n.v,{eyebrow:"Bảng xếp hạng",title:"BẢNG XẾP HẠNG",rightSlot:(0,a.jsx)("div",{className:"text-[12px] text-slate-600",children:(0,a.jsx)("span",{className:"text-slate-900/80 font-bold",children:e.league_name})})}),g.length>0&&(0,a.jsxs)("div",{className:"mb-6",ref:u,children:[(0,a.jsxs)("div",{className:"relative inline-flex min-w-[320px] items-center gap-3 rounded-2xl border border-slate-200 bg-white backdrop-blur-md px-5 py-3.5 cursor-pointer shadow-[0_8px_30px_rgba(0,0,0,0.06)] transition-colors hover:border-[#4681E8]/50 hover:shadow-[0_8px_30px_rgba(70,129,232,0.1)]",onClick:()=>r(!s),children:[e.league_icon&&(0,a.jsx)("img",{src:e.league_icon,alt:e.league_name||"League icon",className:"w-6 h-6 object-contain",loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-slate-800 font-bold text-sm flex-1",children:e.league_name||"Chọn giải đấu"}),(0,a.jsx)("svg",{className:`w-4 h-4 text-[#4681E8] transition-transform ${s?"rotate-180":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),s&&(0,a.jsxs)("div",{className:"absolute z-50 mt-2 w-[360px] overflow-hidden rounded-2xl border border-slate-200 bg-white backdrop-blur-xl shadow-[0_24px_80px_rgba(0,0,0,0.15)]",children:[(0,a.jsx)("div",{className:"p-2 border-b border-slate-100",children:(0,a.jsx)("input",{type:"text",placeholder:"T\xecm kiếm giải đấu...",value:i,onChange:e=>p(e.target.value),className:"w-full bg-slate-50 text-slate-800 text-sm px-4 py-2.5 rounded-xl border border-transparent outline-none focus:border-[#4681E8]/50 placeholder-slate-400 transition-colors",autoF
588ocus:!0})}),(0,a.jsxs)("div",{className:"max-h-[340px] overflow-y-auto",children:[b.map(t=>(0,a.jsxs)("a",{href:`/standings?league=${encodeURIComponent(t.id)}`,className:`flex items-center gap-3 px-4 py-3 cursor-pointer transition-colors hover:bg-slate-50 ${t.id===e.league_id?"bg-[#4681E8]/10 border-l-4 border-[#4681E8]":""}`,children:[t.icon?(0,a.jsx)("img",{src:t.icon,alt:t.name||"League",className:"w-5 h-5 object-contain flex-shrink-0",loading:"lazy",decoding:"async"}):(0,a.jsx)("div",{className:"w-5 h-5 rounded bg-gray-700 flex-shrink-0"}),(0,a.jsx)("span",{className:"text-sm text-slate-900 truncate",children:t.name})]},t.id)),0===b.length&&(0,a.jsx)("div",{className:"px-4 py-8 text-center text-gray-500 text-sm",children:"Kh\xf4ng t\xecm thấy giải đấu"})]})]})]}),t&&(0,a.jsxs)("div",{className:"flex items-center justify-center py-12",children:[(0,a.jsx)("div",{className:"animate-spin w-8 h-8 border-2 border-emerald-600 border-t-transparent rounded-full"}),(0,a.jsx)("span",{className:"ml-3 text-slate-600 text-sm",children:"Đang tải bảng xếp hạng từ server..."})]}),!t&&f&&(0,a.jsxs)("div",{className:"overflow-hidden rounded-[24px] border border-slate-200 bg-white shadow-[0_8px_30px_rgba(0,0,0,0.08)]",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between gap-3 border-b border-[#4681E8]/20 bg-gradient-to-r from-[#4681E8] to-[#2563eb] px-6 py-4 text-white shadow-[0_4px_25px_rgba(70,129,232,0.3)]",children:[(0,a.jsx)("div",{className:"text-[13px] font-black uppercase tracking-[0.2em] drop-shadow-sm text-white/80",children:"League"}),(0,a.jsx)("div",{className:"truncate text-sm font-black sm:text-base drop-shadow-md",children:e.league_name})]}),(0,a.jsx)("div",{className:"overflow-x-auto",children:(0,a.jsxs)("table",{className:"w-full text-left border-collapse",children:[(0,a.jsx)("thead",{children:(0,a.jsx)("tr",{className:"bg-slate-50 text-[11px] uppercase tracking-[0.2em] text-slate-500",children:e.header.map((t,s)=>{let l=e.teams.some(e=>e.form&&e.form.length>0);return t.toLowerCase().includes("phong độ")&&!l?null:(0,a.jsx)("th",{colSpan:s===e.header.length-1&&l?5:1,className:`p-4 font-semibold ${1===s?"w-1/3 text-left":"text-center"}`,children:t},s)})})}),(0,a.jsx)("tbody",{className:"text-sm",children:e.teams.map((t,s)=>(o(Number(t.data[0]||s+1),e.teams.length),(0,a.jsxs)("tr",{className:"group border-b border-slate-100 bg-white transition-colors hover:bg-slate-50 cursor-pointer",children:[t.data.map((s,l)=>0===l?(0,a.jsx)(x,{value:s,totalTeams:e.teams.length},l):1===l?(0,a.jsx)("td",{className:"p-4",children:(0,a.jsxs)("div",{className:"flex items-center gap-3 rounded-2xl border border-slate-100 bg-slate-50 px-4 py-2.5 transition-colors group-hover:border-[#4681E8]/30 group-hover:bg-[#4681E8]/5",children:[t.team_logo?(0,a.jsx)("img",{src:t.team_logo,alt:s,className:"h-8 w-8 rounded-full bg-white object-contain p-0.5 filter drop-shadow-[0_2px_4px_rgba(0,0,0,0.1)]",loading:"lazy"}):(0,a.jsx)("div",{className:"flex h-8 w-8 items-center justify-center rounded-full border border-slate-200 bg-white text-[10px] font-bold text-slate-400",children:"?"}),(0,a.jsx)("span",{className:"font-bold text-slate-800 transition-colors group-hover:text-[#4681E8]",children:s})]})},l):(0,a.jsx)("td",{className:"p-4 text-center font-mono text-slate-600",children:s},l)),t.form&&t.form.length>0&&(0,a.jsxs)(a.Fragment,{children:[t.form.map((e,t)=>(0,a.jsx)("td",{className:"p-2 text-center",children:e.match_time?(0,a.jsx)(c,{detail:e}):(0,a.jsx)(d,{result:e.result})},`form-${t}`)),t.form.length<5&&Array.from({length:5-t.form.length}).map((e,t)=>(0,a.jsx)("td",{className:"p-2"},`pad-${t}`))]})]},s)))})]})})]}),!t&&!f&&j&&(0,a.jsx)(m,{rankings:e.rankings}),!t&&!f&&!j&&e.header&&e.teams&&(0,a.jsx)("div",{className:"text-center py-20 text-slate-600",children:"Dữ liệu đang được cập nhật..."}),!t&&(f||j)&&(0,a.jsxs)("div",{className:"mt-6 flex flex-wrap items-center gap-5 px-5 py-4 bg-slate-50 rounded-2xl border border-slate-200",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,a.jsx)("span",{className:"w-2.5 h-2.5 rounded-full bg-emerald-500"}),(0,a.jsx)("span",{className:"text-[11px] text-slate-600 font-bold uppercase tracking-wider",children:"Đội trưởng bảng"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,a.jsx)("span",{className:"w-2.5 h-2.5 rounded-full bg-sky-4
58800"}),(0,a.jsx)("span",{className:"text-[11px] text-slate-600 font-bold uppercase tracking-wider",children:"Champions League"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,a.jsx)("span",{className:"w-2.5 h-2.5 rounded-full bg-amber-500"}),(0,a.jsx)("span",{className:"text-[11px] text-slate-600 font-bold uppercase tracking-wider",children:"Europa League"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,a.jsx)("span",{className:"w-2.5 h-2.5 rounded-full bg-[#f97316]"}),(0,a.jsx)("span",{className:"text-[11px] text-slate-600 font-bold uppercase tracking-wider",children:"Europa Conference"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,a.jsx)("span",{className:"w-2.5 h-2.5 rounded-full bg-[#E11D48]"}),(0,a.jsx)("span",{className:"text-[11px] text-slate-600 font-bold uppercase tracking-wider",children:"Xuống hạng"})]})]})]})}function m({rankings:e}){if(!e||0===e.length)return null;let t=e[0].data,s=e.slice(1);return(0,a.jsx)("div",{className:"overflow-hidden rounded-[22px] border border-[#cbd5e1] bg-[linear-gradient(180deg,#191a20,#111218)] shadow-[0_24px_80px_rgba(0,0,0,0.4)]",children:(0,a.jsx)("div",{className:"overflow-x-auto",children:(0,a.jsxs)("table",{className:"w-full text-left border-collapse",children:[(0,a.jsx)("thead",{children:(0,a.jsx)("tr",{className:"bg-white text-[11px] uppercase tracking-[0.18em] text-slate-600",children:t.map((e,l)=>{let r=l===t.length-1,n=s[0]&&s[0].data.length>t.length?s[0].data.length-t.length+1:1;return(0,a.jsx)("th",{colSpan:r?n:1,className:`p-4 font-semibold ${1===l?"w-1/3 text-left":"text-center"}`,children:e},l)})})}),(0,a.jsx)("tbody",{className:"text-sm",children:s.map((e,t)=>(0,a.jsx)("tr",{className:"group border-b border-[#cbd5e1] transition-colors hover:bg-white",children:e.data.map((t,l)=>0===l?(0,a.jsx)(x,{value:t,totalTeams:s.length},l):1===l?(0,a.jsx)("td",{className:"p-4",children:(0,a.jsxs)("div",{className:"flex items-center gap-3 rounded-2xl border border-white/6 bg-[linear-gradient(180deg,rgba(255,255,255,0.03),rgba(255,255,255,0.01))] px-3 py-2 transition-colors group-hover:border-emerald-600/22",children:[e.team_logo?(0,a.jsx)("img",{src:e.team_logo,alt:t,className:"h-8 w-8 rounded-full bg-white/5 object-contain ring-1 ring-white/8",loading:"lazy"}):(0,a.jsx)("div",{className:"flex h-8 w-8 items-center justify-center rounded-full border border-gray-700 bg-gray-800 text-xs font-bold text-gray-500",children:"?"}),(0,a.jsx)("span",{className:"font-bold text-slate-900 transition-colors group-hover:text-emerald-600",children:t})]})},l):["W","D","L"].includes(t)?(0,a.jsx)("td",{className:"p-2 text-center",children:(0,a.jsx)("span",{className:`inline-flex h-7 w-7 items-center justify-center rounded-[8px] text-[11px] font-black ${i(t)}`,children:t})},l):(0,a.jsx)("td",{className:"p-4 text-center font-mono text-slate-600",children:t},l))},t))})]})})})}},57958:(e,t,s)=>{"use strict";s.d(t,{Klivevip17ResultsPage:()=>o});var a=s(68019),l=s(10707),r=s(78637),n=s(6035),i=s(69797);function o({initialData:e,selectedLeague:t}){let s=(0,r.useRouter)(),c=(0,r.usePathname)(),d=(0,r.useSearchParams)(),[x,h]=(0,l.useTransition)(),[m,p]=(0,l.useState)(!1),[u,g]=(0,l.useState)(""),{availableLeagues:b,dateGroups:f}=(0,l.useMemo)(()=>(0,i.o8)(e),[e]),j=(0,l.useMemo)(()=>Array.from(new Set(f.map(e=>e.date_header))),[f]),w=d.get("date")||"",v=e=>{let t=new URLSearchParams(d.toString());e&&e!==w?t.set("date",e):t.delete("date"),h(()=>{let e=t.toString();s.push(e?`${c}?${e}`:c,{scroll:!1})})},N=(0,l.useMemo)(()=>{let e=f;return w&&(e=e.filter(e=>e.date_header===w)),(0,i.kK)(e,t)},[f,w,t]),y=(0,l.useMemo)(()=>{if(!u)return b;let e=u.toLowerCase();return b.filter(t=>t.name.toLowerCase().includes(e))},[b,u]),_=N.reduce((e,t)=>e+t.matches.length,0);if(0===f.length)return(0,a.jsxs)("div",{className:"max-w-[1440px] mx-auto px-4 py-8",children:[(0,a.jsx)(n.j,{eyebrow:"Kết quả",title:"KẾT QUẢ B\xd3NG Đ\xc1"}),(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center py-16 gap-4",children:[(0,a.jsx)("div",{className:"w-12 h-12 rounded-full border-2 border-[#
588E11D48]/30 border-t-[#E11D48] animate-spin"}),(0,a.jsx)("span",{className:"text-slate-500 text-sm font-medium tracking-wide",children:"Đang tải kết quả..."})]})]});let k=e=>{let t=new URLSearchParams(d.toString());e?t.set("league",e):t.delete("league"),p(!1),g(""),h(()=>{let e=t.toString();s.push(e?`${c}?${e}`:c,{scroll:!1})})};return(0,a.jsxs)("div",{className:"max-w-[1440px] mx-auto px-4 py-8",children:[(0,a.jsx)(n.j,{eyebrow:"Kết quả",title:"KẾT QUẢ B\xd3NG Đ\xc1",rightSlot:(0,a.jsx)("div",{className:"text-[12px] text-slate-600",children:(0,a.jsx)("span",{className:"text-slate-900/80 font-bold",children:t||"Tất cả giải đấu"})})}),(0,a.jsxs)("div",{className:"flex flex-col md:flex-row gap-4 mb-4 items-start md:items-center justify-between",children:[j.length>0&&(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,a.jsx)("button",{type:"button",onClick:()=>v(""),className:`px-4 py-2 rounded-xl text-sm font-bold transition-all duration-300 ${!w?"bg-gradient-to-r from-[#4681E8] to-[#2563eb] text-white shadow-[0_4px_15px_rgba(70,129,232,0.4)] border border-[#4681E8]/50":"bg-white text-[#64748B] border border-slate-200 hover:bg-slate-50 hover:text-slate-800"}`,children:"Tất cả ng\xe0y"}),j.slice(0,5).map(e=>(0,a.jsx)("button",{type:"button",onClick:()=>v(e),className:`px-4 py-2 rounded-xl text-sm font-bold transition-all duration-300 ${w===e?"bg-gradient-to-r from-[#4681E8] to-[#2563eb] text-white shadow-[0_4px_15px_rgba(70,129,232,0.4)] border border-[#4681E8]/50":"bg-white text-[#64748B] border border-slate-200 hover:bg-slate-50 hover:text-slate-800"}`,children:e},e))]}),(0,a.jsxs)("div",{className:"relative w-full md:w-[320px]",children:[(0,a.jsxs)("button",{onClick:()=>p(!m),className:"w-full flex items-center gap-3 bg-white hover:bg-slate-50 px-4 py-2.5 rounded-xl border border-slate-200 shadow-inner transition-all text-sm",children:[(0,a.jsx)("svg",{className:"w-5 h-5 text-[#4681E8]",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 4a1 1 0 011-1h16a1 1 0 011 1v2.586a1 1 0 01-.293.707l-6.414 6.414a1 1 0 00-.293.707V17l-4 4v-6.586a1 1 0 00-.293-.707L3.293 7.293A1 1 0 013 6.586V4z"})}),(0,a.jsx)("span",{className:"text-slate-700 font-bold flex-1 text-left truncate",children:t||"Chọn giải đấu..."}),(0,a.jsx)("svg",{className:`w-4 h-4 text-slate-400 transition-transform ${m?"rotate-180":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),m&&(0,a.jsxs)("div",{className:"absolute top-full left-0 right-0 mt-2 bg-white border border-slate-200 rounded-2xl shadow-xl z-50 max-h-[300px] overflow-hidden flex flex-col",children:[(0,a.jsx)("div",{className:"p-2 border-b border-slate-100",children:(0,a.jsx)("input",{type:"text",placeholder:"T\xecm giải đấu...",value:u,onChange:e=>g(e.target.value),className:"w-full bg-slate-50 border border-transparent rounded-xl px-4 py-2.5 text-sm text-slate-800 placeholder-slate-400 outline-none focus:border-[#4681E8]/50 transition-colors"})}),(0,a.jsxs)("div",{className:"overflow-y-auto flex-1 pb-2",children:[(0,a.jsx)("button",{type:"button",onClick:()=>k(),className:`block w-full text-left px-4 py-3 text-sm transition-colors ${!t?"bg-[#4681E8]/10 text-[#4681E8] border-l-4 border-[#4681E8]":"text-slate-600 hover:bg-slate-50 hover:text-slate-800"}`,children:"Tất cả giải đấu"}),y.map((e,s)=>(0,a.jsxs)("button",{type:"button",onClick:()=>k(e.name),className:`flex items-center gap-3 px-4 py-3 text-sm transition-colors cursor-pointer ${t===e.name?"bg-[#4681E8]/10 text-[#4681E8] border-l-4 border-[#4681E8]":"text-slate-600 hover:bg-slate-50 hover:text-slate-800"}`,children:[e.icon?(0,a.jsx)("img",{src:e.icon,alt:e.name||"League",className:"w-5 h-5 object-contain shrink-0",loading:"lazy",decoding:"async"}):(0,a.jsx)("div",{className:"w-5 h-5 rounded-md bg-slate-200 shrink-0"}),(0,a.jsx)("span",{className:"truncate",children:e.name})]},s))]})]})]})]}),x&&(0,a.jsxs)("div",{className:"mb-4 inline-flex items-center gap-2 rounded-full border border-slate-200 bg-white px-4 py-2 text-xs text-slate-500 shadow-sm",children:[(0,a.jsx)("span",{className:"h-2 w-2 rounded-full bg-[#E11D48] animate-pulse shadow-[0_0_8px_rgba(225,29,72,0.8)]"}),(0,a.jsx)("span",{className:"font-bold tracking-wide",children:"Đang tải kết quả từ server..."})]}),(0,a.jsx)("div",{className:"space-y-4",children:0===N.length?(0,a.jsx)("div",{className:"text-center py-16 text-[#64748B] font-medium tracking-wide",children:"Kh\xf4ng c\xf3 kết quả n\xe0o"}):N.map((e,t)=>(0,a.jsxs)("div",{className:"overflow-hidden rounded-2xl border border-slate-200 bg-white shadow-[0_8px_30px_rgba(0,0,0,0.06)]",children:[(0,a.jsx)("div",{className:"bg-slate-50 px-5 py-3 border-b border-slate-100 flex items-center justify-between",children:(0,a.jsxs)("span",{className:"text-[12px] text-slate-500 font-bold uppercase tracking-widest",children:[e.league_round?e.league_round:"V\xf2ng đấu",(0,a.jsx)("span",{className:"text-[#E11D48] ml-2 font-mono text-[11px] bg-[#E11D48]/10 px-2 py-0.5 rounded-full border border-[#
588E11D48]/20",children:e.date_header})]})}),e.matches.map((e,t)=>{var s;return(0,a.jsx)("div",{className:"bg-transparent hover:bg-slate-50 border-b border-slate-100 last:border-0 transition-colors group cursor-default",children:(0,a.jsxs)("div",{className:"flex items-center py-4 px-5 gap-4",children:[(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center min-w-[56px] shrink-0 border-r border-slate-100 pr-4",children:[(0,a.jsx)("span",{className:"text-[9px] text-slate-400 uppercase tracking-widest mb-1 font-bold",children:"L\xfac"}),(0,a.jsx)("span",{className:"text-[13px] text-slate-700 font-mono font-black",children:e.time})]}),(0,a.jsxs)("div",{className:"flex-1 flex items-center justify-end gap-3 min-w-0",children:[(0,a.jsx)("span",{className:"text-[14px] text-slate-800 font-bold truncate text-right group-hover:text-slate-900 transition-colors",children:e.home_team}),e.home_logo?(0,a.jsx)("div",{className:"w-8 h-8 rounded-full bg-slate-100 border border-slate-200 p-1 flex items-center justify-center shadow-sm",children:(0,a.jsx)("img",{src:e.home_logo,alt:e.home_team||"Home team",className:"w-full h-full object-contain",loading:"lazy"})}):(0,a.jsx)("div",{className:"w-8 h-8 rounded-full bg-slate-100 shrink-0 border border-slate-200 flex items-center justify-center text-[10px] font-bold text-slate-400",children:"?"})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center min-w-[90px] shrink-0 bg-slate-50 rounded-xl py-2 px-2 border border-slate-200 shadow-inner group-hover:border-[#4681E8]/40 transition-colors",children:[(0,a.jsx)("span",{className:`text-[22px] leading-none font-black tracking-widest drop-shadow-[0_2px_4px_rgba(0,0,0,0.8)] ${!(s=e.score)||"-"===s?"text-slate-400":"text-slate-800"}`,children:e.score}),e.ht_score&&(0,a.jsxs)("span",{className:"text-[10px] text-slate-500 font-mono mt-1 font-bold",children:["HT: ",e.ht_score]})]}),(0,a.jsxs)("div",{className:"flex-1 flex items-center gap-3 min-w-0",children:[e.away_logo?(0,a.jsx)("div",{className:"w-8 h-8 rounded-full bg-slate-100 border border-slate-200 p-1 flex items-center justify-center shadow-sm",children:(0,a.jsx)("img",{src:e.away_logo,alt:e.away_team||"Away team",className:"w-full h-full object-contain",loading:"lazy"})}):(0,a.jsx)("div",{className:"w-8 h-8 rounded-full bg-slate-100 shrink-0 border border-slate-200 flex items-center justify-center text-[10px] font-bold text-slate-400",children:"?"}),(0,a.jsx)("span",{className:"text-[14px] text-slate-800 font-bold truncate text-left group-hover:text-slate-900 transition-colors",children:e.away_team})]})]})},t)})]},t))}),(0,a.jsxs)("div",{className:"mt-6 text-center text-xs text-[#64748B] font-bold uppercase tracking-widest drop-shadow-sm",children:["Hiển thị ",_," kết quả trận đấu"]})]})}},58653:(e,t,s)=>{"use strict";function a(e){let t=e?.fixtures_v2||null,s=e?.fixtures||e?.schedules||[],a=t?.date_tabs?.length?t.date_tabs:function(e=new Date){let t=["Chủ Nhật","Thứ Hai","Thứ Ba","Thứ Tư","Thứ Năm","Thứ S\xe1u","Thứ Bảy"],s=[];for(let a=0;a<14;a+=1){let l=new Date(e);l.setDate(l.getDate()+a);let r=String(l.getDate()).padStart(2,"0"),n=String(l.getMonth()+1).padStart(2,"0"),i=`${l.getFullYear()}-${l.getMonth()+1}-${l.getDate()}`;s.push({label:0===a?"H\xf4m Nay":t[l.getDay()],date:`${r}.${n}`,dataValue:i,active:0===a})}return s}(),l=e?.selected_date||a.find(e=>e.active)?.dataValue||a[0]?.dataValue||null;if(t?.leagues?.length)return{dateTabs:a,selectedDate:l,leagues:t.leagues,totalMatches:t.leagues.reduce((e,t)=>e+t.matches.length,0)};let r=[],n=new Set;return s.forEach(e=>{let t=e.data;if(!(t.length<3))for(let s=0;s+2<t.length;s+=16){let a=t[s]||"",l=t[s+1]||"",i=t[s+2]||"",o=`${a}-${l}-${i}`;if(!n.has(o)&&l&&(n.add(o),r.push({time:a,home_team:l,away_team:i,home_logo:e.team_logos?.[2*Math.floor(s/16)]||"",away_logo:e.team_logos?.[2*Math.floor(s/16)+1]||"",score:t[s+3]||"-",ht_score:t[s+4]||"",handicap:t.length>s+9?[t[s+7]||"",t[s+8]||"",t[s+9]||""]:[],over_under:t.length>s+12?[t[s+10]||"",t[s+11]||"",t[s+12]||""]:[],one_x_two:t.length>s+15?[t[s+13]||"",t[s+14]||"",t[s+15]||""]:[]}),s+16>=t.length))break}}),{dateTabs:a,selectedDate:l,leagues:r.length>0?[{league_name:"Tất cả trận đấu",league_icon:"",match_count:r.length,matches:r}]:[],totalMatches:r.length}}function l(e){let t=e?.results_v2||null,s=e?.results||[];if(t?.date_groups?.length)return{availableLeagues:t.available_leagues||[],dateGroups:t.date_groups,totalMatches:t.date_groups.reduce((e,t)=>
588e+t.matches.length,0)};let a=[];return s.forEach(e=>{let t=e.data;if(t.length<6)return;let s=t[0],l=s.split(" - "),r=[],n=1,i=0;for(;n<t.length;){if(t[n]?.startsWith("L\xfac")){let s=t[n].replace("L\xfac","").trim();r.push({time:s,home_team:t[n+1]||"",away_team:t[n+4]||"",home_logo:e.team_logos?.[i]||"",away_logo:e.team_logos?.[i+1]||"",score:t[n+2]||"",ht_score:(t[n+3]||"").replace("H1:","").replace("HT:","").trim()}),i+=2,n+=5;continue}n+=1}r.length>0&&a.push({date_header:l[0]?.trim()||s,league_round:l.slice(1).join(" - ").trim(),matches:r})}),{availableLeagues:[],dateGroups:a,totalMatches:a.reduce((e,t)=>e+t.matches.length,0)}}function r(e,t){if(!t)return e;let s=t.toLowerCase();return e.filter(e=>e.league_round.toLowerCase().includes(s))}s.d(t,{kK:()=>r,o8:()=>l,p_:()=>a})},59472:(e,t,s)=>{"use strict";function a(e){let t=e?.fixtures_v2||null,s=e?.fixtures||e?.schedules||[],a=t?.date_tabs?.length?t.date_tabs:function(e=new Date){let t=["Chủ Nhật","Thứ Hai","Thứ Ba","Thứ Tư","Thứ Năm","Thứ S\xe1u","Thứ Bảy"],s=[];for(let a=0;a<14;a+=1){let l=new Date(e);l.setDate(l.getDate()+a);let r=String(l.getDate()).padStart(2,"0"),n=String(l.getMonth()+1).padStart(2,"0"),i=`${l.getFullYear()}-${l.getMonth()+1}-${l.getDate()}`;s.push({label:0===a?"H\xf4m Nay":t[l.getDay()],date:`${r}.${n}`,dataValue:i,active:0===a})}return s}(),l=e?.selected_date||a.find(e=>e.active)?.dataValue||a[0]?.dataValue||null;if(t?.leagues?.length)return{dateTabs:a,selectedDate:l,leagues:t.leagues,totalMatches:t.leagues.reduce((e,t)=>e+t.matches.length,0)};let r=[],n=new Set;return s.forEach(e=>{let t=e.data;if(!(t.length<3))for(let s=0;s+2<t.length;s+=16){let a=t[s]||"",l=t[s+1]||"",i=t[s+2]||"",o=`${a}-${l}-${i}`;if(!n.has(o)&&l&&(n.add(o),r.push({time:a,home_team:l,away_team:i,home_logo:e.team_logos?.[2*Math.floor(s/16)]||"",away_logo:e.team_logos?.[2*Math.floor(s/16)+1]||"",score:t[s+3]||"-",ht_score:t[s+4]||"",handicap:t.length>s+9?[t[s+7]||"",t[s+8]||"",t[s+9]||""]:[],over_under:t.length>s+12?[t[s+10]||"",t[s+11]||"",t[s+12]||""]:[],one_x_two:t.length>s+15?[t[s+13]||"",t[s+14]||"",t[s+15]||""]:[]}),s+16>=t.length))break}}),{dateTabs:a,selectedDate:l,leagues:r.length>0?[{league_name:"Tất cả trận đấu",league_icon:"",match_count:r.length,matches:r}]:[],totalMatches:r.length}}function l(e){let t=e?.results_v2||null,s=e?.results||[];if(t?.date_groups?.length)return{availableLeagues:t.available_leagues||[],dateGroups:t.date_groups,totalMatches:t.date_groups.reduce((e,t)=>e+t.matches.length,0)};let a=[];return s.forEach(e=>{let t=e.data;if(t.length<6)return;let s=t[0],l=s.split(" - "),r=[],n=1,i=0;for(;n<t.length;){if(t[n]?.startsWith("L\xfac")){let s=t[n].replace("L\xfac","").trim();r.push({time:s,home_team:t[n+1]||"",away_team:t[n+4]||"",home_logo:e.team_logos?.[i]||"",away_logo:e.team_logos?.[i+1]||"",score:t[n+2]||"",ht_score:(t[n+3]||"").replace("H1:","").replace("HT:","").trim()}),i+=2,n+=5;continue}n+=1}r.length>0&&a.push({date_header:l[0]?.trim()||s,league_round:l.slice(1).join(" - ").trim(),matches:r})}),{availableLeagues:[],dateGroups:a,totalMatches:a.reduce((e,t)=>e+t.matches.length,0)}}function r(e,t){if(!t)return e;let s=t.toLowerCase();return e.filter(e=>e.league_round.toLowerCase().includes(s))}s.d(t,{kK:()=>r,o8:()=>l,p_:()=>a})},59688:(e,t,s)=>{"use strict";s.d(t,{StandingsClient:()=>h});var a=s(68019),l=s(10707),r=s(46914),n=s(36627);function i(e){return"W"===e?"border border-emerald-500/45 bg-emerald-500/25 text-emerald-300 shadow-[0_0_0_1px_rgba(16,185,129,0.08)_inset]":"L"===e?"border border-red-500/45 bg-red-500/25 text-red-300 shadow-[0_0_0_1px_rgba(239,68,68,0.08)_inset]":"D"===e?"border border-amber-400/45 bg-amber-400/22 text-amber-200 shadow-[0_0_0_1px_rgba(251,191,36,0.08)_inset]":"border border-slate-500/40 bg-slate-500/18 text-slate-700"}function o(e,t){return 1===e?{bar:"bg-[linear-gradient(180deg,#facc15,#f97316)]",badge:"border-emerald-600/60 bg-slate-100 text-yellow-700 shadow-[0_0_18px_rgba(250,204,21,0.14)]",row:"from-[#32230d]/70 via-transparent to-transparent"}:e<=4?{bar:"bg-[linear-gradient(180deg,#fb7185,#f97316)]",badge:"border-[#fb7185]/45 bg-slate-100 text-rose-700",row:"from-[#241318]/55 via-trans
588parent to-transparent"}:e<=6?{bar:"bg-[linear-gradient(180deg,#f59e0b,#facc15)]",badge:"border-[#f59e0b]/45 bg-slate-100 text-yellow-700",row:"from-[#24190b]/45 via-transparent to-transparent"}:e<=10?{bar:"bg-[linear-gradient(180deg,#38bdf8,#2563eb)]",badge:"border-sky-400/40 bg-white text-sky-700",row:"from-[#101725]/32 via-transparent to-transparent"}:e>=Math.max(t-2,1)?{bar:"bg-[linear-gradient(180deg,#ef4444,#7f1d1d)]",badge:"border-red-500/40 bg-slate-100 text-red-700",row:"from-[#220f14]/45 via-transparent to-transparent"}:{bar:"bg-[linear-gradient(180deg,#64748b,#334155)]",badge:"border-slate-500/35 bg-white text-slate-700",row:"from-[#12161d]/24 via-transparent to-transparent"}}function c({detail:e}){let[t,s]=(0,l.useState)(!1),n=(0,l.useRef)(null),[o,d]=(0,l.useState)({top:0,left:0}),x=i(e.result),h=(0,l.useCallback)(()=>{if(n.current){let e=n.current.getBoundingClientRect();d({top:e.top+window.scrollY-8,left:e.left+e.width/2+window.scrollX})}s(!0)},[]);return(0,a.jsxs)("div",{ref:n,className:"relative inline-flex",onMouseEnter:h,onMouseLeave:()=>s(!1),children:[(0,a.jsx)("span",{className:`inline-flex h-7 w-7 items-center justify-center rounded-[8px] text-[11px] font-black cursor-pointer transition-transform hover:-translate-y-0.5 ${x}`,children:e.result}),t&&e.match_time&&"u">typeof document&&(0,r.createPortal)((0,a.jsxs)("div",{className:"fixed z-[9999] w-[220px] pointer-events-none",style:{top:`${o.top}px`,left:`${o.left}px`,transform:"translate(-50%, -100%)",position:"absolute"},children:[(0,a.jsxs)("div",{className:"overflow-hidden rounded-xl border border-[#cbd5e1] bg-white shadow-2xl",children:[(0,a.jsx)("div",{className:"bg-slate-100 px-3 py-1.5 text-[10px] text-slate-600 font-mono text-center border-b border-[#cbd5e1]",children:e.match_time}),(0,a.jsxs)("div",{className:"px-3 py-2.5 flex items-center justify-between gap-2",children:[(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5 flex-1 min-w-0",children:[e.home_logo?(0,a.jsx)("img",{src:e.home_logo,alt:e.home_team,className:"w-7 h-7 object-contain",loading:"lazy",decoding:"async"}):(0,a.jsx)("div",{className:"w-7 h-7 rounded-full bg-gray-700 flex items-center justify-center text-[8px] text-slate-600 font-bold",children:"?"}),(0,a.jsx)("span",{className:"text-[9px] text-slate-600 font-bold text-center leading-tight line-clamp-2 max-w-[70px]",children:e.home_team})]}),(0,a.jsx)("div",{className:"text-slate-900 font-black text-sm whitespace-nowrap px-1",children:e.score||"? - ?"}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5 flex-1 min-w-0",children:[e.away_logo?(0,a.jsx)("img",{src:e.away_logo,alt:e.away_team,className:"w-7 h-7 object-contain",loading:"lazy",decoding:"async"}):(0,a.jsx)("div",{className:"w-7 h-7 rounded-full bg-gray-700 flex items-center justify-center text-[8px] text-slate-600 font-bold",children:"?"}),(0,a.jsx)("span",{className:"text-[9px] text-slate-600 font-bold text-center leading-tight line-clamp-2 max-w-[70px]",children:e.away_team})]})]})]}),(0,a.jsx)("div",{className:"absolute left-1/2 -translate-x-1/2 -bottom-1 w-2 h-2 bg-white border-r border-b border-[#cbd5e1] rotate-45"})]}),document.body)]})}function d({result:e}){let t=i(e);return(0,a.jsx)("span",{className:`inline-flex h-7 w-7 items-center justify-center rounded-[8px] text-[11px] font-black ${t}`,children:e})}function x({value:e,totalTeams:t}){let s=Number(e);if(!Number.isFinite(s))return(0,a.jsx)("td",{className:"px-4 py-4 text-center font-mono font-black text-slate-400",children:e});let l=o(s,t);return(0,a.jsxs)("td",{className:"relative px-4 py-4 text-center font-mono",children:[(0,a.jsx)("span",{className:`absolute left-0 top-1/2 h-7 w-1 -translate-y-1/2 rounded-r-full ${l.bar}`}),(0,a.jsx)("span",{className:`inline-flex h-8 w-8 items-center justify-center rounded-[10px] border text-[13px] font-black ${l.badge}`,children:s})]})}function h({initialData:e}){let[t]=(0,l.useState)(!1),[s,r]=(0,l.useState)(!1),[i,p]=(0,l.useState)(""),u=(0,l.useRef)(null);if((0,l.useEffect)(()=>{function e(e){u.current&&!u.current.contains(e.target)&&r(!1)}return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[]),!e)return(0,a.jsx)("div",{className:"text-center py-20 text-slate-600",children:"Đang tải dữ liệu..."});let g=e.available_leagues||[],b=g.filter(e=>e.name.toLowerCase().includes(i.toLowerCase())),f=e.teams&&e.teams.length>0&&Array.isArray(e.teams[0]?.form),j=!f&&e.rankings;return(0,a.jsxs)("div",{className:"mx-auto max-w-[1440px] px-4 py-8",children:[(0,a.jsx)(n.M,{eyebrow:"Bảng xếp hạng",title:"BẢNG XẾP HẠNG",rightSlot:(0,a.jsx)("div",{className:"text-[12px] text-slate-600",children:(0,a.jsx)("span",{className:"text-slate-900/80 font-bold",children:e.league_name})})}),g.length>0&&(0,a.jsxs)("div",{className:"mb-6",ref:u,children:[(0,a.jsxs)("div",{className:"relative inline-flex min-w-[320px] items-center gap-3 rounded-2xl border border-slate-200 bg-white backdrop-blur-md px-5 py-3.5 cursor-pointer shadow-[0_8px_30px_rgba(0,0,0,0.06)] transition-colors hover:border-[#4681E8]/50 hover:shadow-[0_8px_30px_rgba(70,129,232,0.1)]",onClick:()=>r(!s),children:[e.league_icon&&(0,a.jsx)("img",{src:e.league_icon,alt:e.league_name||"League icon",className:"w-6 h-6 object-contain",loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-slate-800 font-bold text-sm flex-1",children:e.league_name||"Chọn giải đấu"}),(0,a.jsx)("svg",{className:`w-4 h-4 text-[#4681E8] transition-transform ${s?"rotate-180":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),s&&(0,a.jsxs)("div",{className:"absolute z-50 mt-2 w-[360px] overflow-hidden rounded-2xl border border-slate-200 bg-white backdrop-blur-xl shadow-[0_24px_80px_rgba(0,0,0,0.15)]",children:[(0,a.jsx)("div",{className:"p-2 border-b border-slate-100",children:(0,a.jsx)("input",{type:"text",placeholder:"T\xecm kiếm giải đấu...",value:i,onChange:e=>p(e.target.value),className:"w-full bg-slate-50 text-slate-800 text-sm px-4 py-2.5 rounded-xl border border-transparent outline-none focus:border-[#4681E8]/50 placeholder-slate-400 transition-colors",autoF
588ocus:!0})}),(0,a.jsxs)("div",{className:"max-h-[340px] overflow-y-auto",children:[b.map(t=>(0,a.jsxs)("a",{href:`/standings?league=${encodeURIComponent(t.id)}`,className:`flex items-center gap-3 px-4 py-3 cursor-pointer transition-colors hover:bg-slate-50 ${t.id===e.league_id?"bg-[#4681E8]/10 border-l-4 border-[#4681E8]":""}`,children:[t.icon?(0,a.jsx)("img",{src:t.icon,alt:t.name||"League",className:"w-5 h-5 object-contain flex-shrink-0",loading:"lazy",decoding:"async"}):(0,a.jsx)("div",{className:"w-5 h-5 rounded bg-gray-700 flex-shrink-0"}),(0,a.jsx)("span",{className:"text-sm text-slate-900 truncate",children:t.name})]},t.id)),0===b.length&&(0,a.jsx)("div",{className:"px-4 py-8 text-center text-gray-500 text-sm",children:"Kh\xf4ng t\xecm thấy giải đấu"})]})]})]}),t&&(0,a.jsxs)("div",{className:"flex items-center justify-center py-12",children:[(0,a.jsx)("div",{className:"animate-spin w-8 h-8 border-2 border-emerald-600 border-t-transparent rounded-full"}),(0,a.jsx)("span",{className:"ml-3 text-slate-600 text-sm",children:"Đang tải bảng xếp hạng từ server..."})]}),!t&&f&&(0,a.jsxs)("div",{className:"overflow-hidden rounded-[24px] border border-slate-200 bg-white shadow-[0_8px_30px_rgba(0,0,0,0.08)]",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between gap-3 border-b border-[#4681E8]/20 bg-gradient-to-r from-[#4681E8] to-[#2563eb] px-6 py-4 text-white shadow-[0_4px_25px_rgba(70,129,232,0.3)]",children:[(0,a.jsx)("div",{className:"text-[13px] font-black uppercase tracking-[0.2em] drop-shadow-sm text-white/80",children:"League"}),(0,a.jsx)("div",{className:"truncate text-sm font-black sm:text-base drop-shadow-md",children:e.league_name})]}),(0,a.jsx)("div",{className:"overflow-x-auto",children:(0,a.jsxs)("table",{className:"w-full text-left border-collapse",children:[(0,a.jsx)("thead",{children:(0,a.jsx)("tr",{className:"bg-slate-50 text-[11px] uppercase tracking-[0.2em] text-slate-500",children:e.header.map((t,s)=>{let l=e.teams.some(e=>e.form&&e.form.length>0);return t.toLowerCase().includes("phong độ")&&!l?null:(0,a.jsx)("th",{colSpan:s===e.header.length-1&&l?5:1,className:`p-4 font-semibold ${1===s?"w-1/3 text-left":"text-center"}`,children:t},s)})})}),(0,a.jsx)("tbody",{className:"text-sm",children:e.teams.map((t,s)=>(o(Number(t.data[0]||s+1),e.teams.length),(0,a.jsxs)("tr",{className:"group border-b border-slate-100 bg-white transition-colors hover:bg-slate-50 cursor-pointer",children:[t.data.map((s,l)=>0===l?(0,a.jsx)(x,{value:s,totalTeams:e.teams.length},l):1===l?(0,a.jsx)("td",{className:"p-4",children:(0,a.jsxs)("div",{className:"flex items-center gap-3 rounded-2xl border border-slate-100 bg-slate-50 px-4 py-2.5 transition-colors group-hover:border-[#4681E8]/30 group-hover:bg-[#4681E8]/5",children:[t.team_logo?(0,a.jsx)("img",{src:t.team_logo,alt:s,className:"h-8 w-8 rounded-full bg-white object-contain p-0.5 filter drop-shadow-[0_2px_4px_rgba(0,0,0,0.1)]",loading:"lazy"}):(0,a.jsx)("div",{className:"flex h-8 w-8 items-center justify-center rounded-full border border-slate-200 bg-white text-[10px] font-bold text-slate-400",children:"?"}),(0,a.jsx)("span",{className:"font-bold text-slate-800 transition-colors group-hover:text-[#4681E8]",children:s})]})},l):(0,a.jsx)("td",{className:"p-4 text-center font-mono text-slate-600",children:s},l)),t.form&&t.form.length>0&&(0,a.jsxs)(a.Fragment,{children:[t.form.map((e,t)=>(0,a.jsx)("td",{className:"p-2 text-center",children:e.match_time?(0,a.jsx)(c,{detail:e}):(0,a.jsx)(d,{result:e.result})},`form-${t}`)),t.form.length<5&&Array.from({length:5-t.form.length}).map((e,t)=>(0,a.jsx)("td",{className:"p-2"},`pad-${t}`))]})]},s)))})]})})]}),!t&&!f&&j&&(0,a.jsx)(m,{rankings:e.rankings}),!t&&!f&&!j&&e.header&&e.teams&&(0,a.jsx)("div",{className:"text-center py-20 text-slate-600",children:"Dữ liệu đang được cập nhật..."}),!t&&(f||j)&&(0,a.jsxs)("div",{className:"mt-6 flex flex-wrap items-center gap-5 px-5 py-4 bg-slate-50 rounded-2xl border border-slate-200",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,a.jsx)("span",{className:"w-2.5 h-2.5 rounded-full bg-emerald-500"}),(0,a.jsx)("span",{className:"text-[11px] text-slate-600 font-bold uppercase tracking-wider",children:"Đội trưởng bảng"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,a.jsx)("span",{className:"w-2.5 h-2.5 rounded-full bg-sky-4
58800"}),(0,a.jsx)("span",{className:"text-[11px] text-slate-600 font-bold uppercase tracking-wider",children:"Champions League"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,a.jsx)("span",{className:"w-2.5 h-2.5 rounded-full bg-amber-500"}),(0,a.jsx)("span",{className:"text-[11px] text-slate-600 font-bold uppercase tracking-wider",children:"Europa League"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,a.jsx)("span",{className:"w-2.5 h-2.5 rounded-full bg-[#f97316]"}),(0,a.jsx)("span",{className:"text-[11px] text-slate-600 font-bold uppercase tracking-wider",children:"Europa Conference"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,a.jsx)("span",{className:"w-2.5 h-2.5 rounded-full bg-[#E11D48]"}),(0,a.jsx)("span",{className:"text-[11px] text-slate-600 font-bold uppercase tracking-wider",children:"Xuống hạng"})]})]})]})}function m({rankings:e}){if(!e||0===e.length)return null;let t=e[0].data,s=e.slice(1);return(0,a.jsx)("div",{className:"overflow-hidden rounded-[22px] border border-[#cbd5e1] bg-[linear-gradient(180deg,#191a20,#111218)] shadow-[0_24px_80px_rgba(0,0,0,0.4)]",children:(0,a.jsx)("div",{className:"overflow-x-auto",children:(0,a.jsxs)("table",{className:"w-full text-left border-collapse",children:[(0,a.jsx)("thead",{children:(0,a.jsx)("tr",{className:"bg-white text-[11px] uppercase tracking-[0.18em] text-slate-600",children:t.map((e,l)=>{let r=l===t.length-1,n=s[0]&&s[0].data.length>t.length?s[0].data.length-t.length+1:1;return(0,a.jsx)("th",{colSpan:r?n:1,className:`p-4 font-semibold ${1===l?"w-1/3 text-left":"text-center"}`,children:e},l)})})}),(0,a.jsx)("tbody",{className:"text-sm",children:s.map((e,t)=>(0,a.jsx)("tr",{className:"group border-b border-[#cbd5e1] transition-colors hover:bg-white",children:e.data.map((t,l)=>0===l?(0,a.jsx)(x,{value:t,totalTeams:s.length},l):1===l?(0,a.jsx)("td",{className:"p-4",children:(0,a.jsxs)("div",{className:"flex items-center gap-3 rounded-2xl border border-white/6 bg-[linear-gradient(180deg,rgba(255,255,255,0.03),rgba(255,255,255,0.01))] px-3 py-2 transition-colors group-hover:border-emerald-600/22",children:[e.team_logo?(0,a.jsx)("img",{src:e.team_logo,alt:t,className:"h-8 w-8 rounded-full bg-white/5 object-contain ring-1 ring-white/8",loading:"lazy"}):(0,a.jsx)("div",{className:"flex h-8 w-8 items-center justify-center rounded-full border border-gray-700 bg-gray-800 text-xs font-bold text-gray-500",children:"?"}),(0,a.jsx)("span",{className:"font-bold text-slate-900 transition-colors group-hover:text-emerald-600",children:t})]})},l):["W","D","L"].includes(t)?(0,a.jsx)("td",{className:"p-2 text-center",children:(0,a.jsx)("span",{className:`inline-flex h-7 w-7 items-center justify-center rounded-[8px] text-[11px] font-black ${i(t)}`,children:t})},l):(0,a.jsx)("td",{className:"p-4 text-center font-mono text-slate-600",children:t},l))},t))})]})})})}},59973:(e,t,s)=>{"use strict";s.d(t,{LiveMatchesClient:()=>m});var a=s(68019),l=s(10707);function r({activeSport:e,onSportChange:t,activeStatus:s,onStatusChange:l,matchesCount:n}){return(0,a.jsxs)("div",{className:"mb-5 flex flex-col gap-3",children:[(0,a.jsx)("div",{className:"flex items-center gap-2 overflow-x-auto pb-1 scrollbar-hide",children:[{id:"1",label:"B\xd3NG Đ\xc1",icon:"⚽"},{id:"2",label:"B\xd3NG RỔ",icon:"\uD83C\uDFC0"},{id:"5",label:"TENNIS",icon:"\uD83C\uDFBE"},{id:"4",label:"CẦU L\xd4NG",icon:"\uD83C\uDFF8"},{id:"3",label:"B\xd3NG CHUYỀN",icon:"\uD83C\uDFD0"},{id:"6",label:"B\xd3NG B\xc0N",icon:"\uD83C\uDFD3"}].map(s=>{let l=e===s.id;return(0,a.jsxs)("button",{type:"button",onClick:()=>t(s.id),className:`flex items-center gap-2 px-4 py-2.5 rounded-xl font-bold text-[12px] whitespace-nowrap transition-all duration-200 border cursor-pointer ${l?"bg-[#4681E8]/10 text-[#4681E8] border-[#4681E8]/40 shadow-[0_0_15px_rgba(70,129,232,0.1)]":"bg-white text-slate-500 border-slate-200 hover:text-slate-700 hover:border-[#4681E8]/30"}`,children:[(0,a.jsx)("span",{className:"text-[14px]",children:s.icon}
588),(0,a.jsx)("span",{className:"tracking-wider uppercase",children:s.label})]},s.id)})}),(0,a.jsx)("div",{className:"flex items-center gap-1 overflow-x-auto pb-1 scrollbar-hide bg-white rounded-xl p-1.5 border border-slate-200",children:[{id:"all",label:"TẤT CẢ",keyCount:"all"},{id:"live",label:"TRỰC TIẾP",keyCount:"live"},{id:"hot",label:"HOT",keyCount:"hot"},{id:"today",label:"H\xd4M NAY",keyCount:"today"},{id:"tomorrow",label:"NG\xc0Y MAI",keyCount:"tomorrow"}].map(e=>{let t=s===e.id,r=n[e.keyCount]||0;return(0,a.jsxs)("button",{type:"button",onClick:()=>l(e.id),className:`relative px-4 py-2 font-bold text-[12px] whitespace-nowrap transition-all duration-200 uppercase tracking-wider flex items-center gap-2 rounded-lg cursor-pointer ${t?"bg-[#4681E8]/10 text-[#4681E8] shadow-inner":"text-slate-500 hover:text-slate-700 hover:bg-[#4681E8]/5"}`,children:["live"===e.id&&t&&(0,a.jsx)("span",{className:"w-1.5 h-1.5 rounded-full bg-[#4681E8] animate-pulse shadow-[0_0_6px_rgba(70,129,232,0.8)]"}),(0,a.jsx)("span",{children:e.label}),(0,a.jsx)("span",{className:`px-1.5 py-0.5 rounded text-[10px] font-black ${t?"bg-[#4681E8]/20 text-[#4681E8]":"text-slate-400"}`,children:r})]},e.id)})})]})}function n(){return"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='10' fill='%2364748B' fill-opacity='0.18'/%3E%3C/svg%3E"}function i({match:e,isLoading:t=!1}){if(t||!e)return(0,a.jsx)("div",{className:"animate-pulse bg-white h-[64px] w-full border-b border-slate-100"});let s=new Date(1e3*parseInt(e.time||0,10)).toLocaleTimeString("vi-VN",{hour:"2-digit",minute:"2-digit",timeZone:"Asia/Ho_Chi_Minh"}),l=function(e,t){if("1"===t||"2"===t)switch(e){case"1":default:return{text:"Sắp diễn",isLive:!1,showScore:!1};case"2":return{text:"H1",isLive:!0,showScore:!0};case"3":return{text:"HT",isLive:!0,showScore:!0};case"4":return{text:"H2",isLive:!0,showScore:!0};case"5":return{text:"Phụ",isLive:!0,showScore:!0};case"7":return{text:"Pen",isLive:!0,showScore:!0};case"8":case"9":return{text:"FT",isLive:!1,showScore:!0}}switch(e){case"0":case"1":return{text:"Sắp diễn",isLive:!1,showScore:!1};case"51":return{text:"S1",isLive:!0,showScore:!0};case"52":return{text:"S2",isLive:!0,showScore:!0};case"53":return{text:"S3",isLive:!0,showScore:!0};case"54":return{text:"S4",isLive:!0,showScore:!0};case"55":return{text:"S5",isLive:!0,showScore:!0};case"100":case"90":case"91":case"110":return{text:"FT",isLive:!1,showScore:!0};default:return{text:"LIVE",isLive:!0,showScore:!0}}}(String(e.status_id),String(e.sport_id)),r=e.time_text||e.source_card_meta?.time_text||"",o=l.isLive,c=e.home_score??"-",d=e.away_score??"-",x=e.home_logo||n(),h=e.away_logo||n();return(0,a.jsxs)("a",{href:`/match/${encodeURIComponent(e.post_name||e.id)}`,className:"flex items-center w-full group border-b border-slate-100 bg-white hover:bg-[#4681E8]/5 transition-colors min-h-[64px]",children:[(0,a.jsx)("div",{className:`w-[60px] flex flex-col items-center justify-center shrink-0 h-full border-r ${o?"border-[#4681E8]/30 bg-[#4681E8]/5":"border-slate-100"}`,children:o?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"text-[#4681E8] font-bold text-[11px] uppercase tracking-wider tabular-nums leading-none",children:r||l.text}),(0,a.jsx)("span",{className:"w-1.5 h-1.5 rounded-full bg-[#4681E8] animate-pulse mt-1"})]}):(0,a.jsx)("span",{className:"text-slate-500 font-medium text-[12px]",children:s})}),(0,a.jsxs)("div",{className:"flex-1 flex flex-col justify-center px-3 py-2 gap-1.5 min-w-0",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between w-full",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2.5 min-w-0 overflow-hidden",children:[(0,a.jsx)("img",{src:x,alt:e.home_name,className:"w-4 h-4 shrink-0 object-contain",onError:e=>e.currentTarget.src=n(),loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-[13px] font-semibold truncate text-slate-800",children:e.home_name})]}),l.showScore&&(0,a.jsx)("span",{className:`text-[15px] font-black tabular-nums shrink-0 ml-2 ${o?"text-[#4681E8]":"text-slate-700"}`,children:c})]}),(0,a.jsxs)("div",{className:"flex items-center justify-between w-full",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2.5 min-w-0 overflow-hidden",children:[(0,a.jsx)("img",{src:h,alt:e.away_name,className:"w-4 h-4 shrink-0 object-contain",onError:e=>e.currentTarget.src=n(),loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-[13px] font-semibold truncate text-slate-800",children:e.away_name})]}),l.showScore&&(0,a.jsx)("span",{className:`text-[15px] font-black tabular-nums shrink-0 ml-2 ${o?"text-[#4681E8]":"text-slate-700"}`,children:d})]})]}),(0,a.jsx)("div",{className:"w-[48px] h-full flex items-center justify-center shrink-0 text-slate-300 group-hover:text-[#4681E8] transition-colors border-l border-slate-100",children:(0,a.jsx)("svg",{className:"w-5 h-5 fill-current",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{d:"M8 5v14l11-7z"})})})]})}let o=new Set(["1","2","3","4","5","7"]),c=new Set(["8","9","15"]),d=new Set(["51","52","53","54","5
5885","56","57","58","59"]),x=new Set(["100","90","91","92","93","110"]);function h(e){let t=String(e.status_id);return 2>=parseInt(e.sport_id)?o.has(t):d.has(t)}function m({matches:e,matchIndex:t}){let[s,n]=(0,l.useState)("1"),[o,d]=(0,l.useState)("all"),[p,u]=(0,l.useState)(1);(0,l.useEffect)(()=>{u(1)},[s,o]);let{todayStart:g,tomorrowStart:b,dayAfterStart:f}=(0,l.useMemo)(()=>{let e,t,s,{vnTodayStartUTC:a,vnTomorrowStartUTC:l,vnDayAfterStartUTC:r}=(s=(t=Math.floor(Date.UTC((e=new Date(Date.now()+252e5)).getUTCFullYear(),e.getUTCMonth(),e.getUTCDate())/1e3)-25200)+86400,{vnTodayStartUTC:t,vnTomorrowStartUTC:s,vnDayAfterStartUTC:s+86400});return{todayStart:a,tomorrowStart:l,dayAfterStart:r}},[]),j=(0,l.useMemo)(()=>new Map(e.map(e=>[e?.match_key?String(e.match_key):e?.ls_id?String(e.ls_id):e?.id?`${String(e.sport_id||"0")}:${String(e.id)}`:e?.scheduleId?`${String(e.sport_id||"0")}:schedule:${String(e.scheduleId)}`:[String(e?.sport_id||"0"),String(e?.time||"0"),String(e?.home_name||""),String(e?.away_name||"")].join(":"),e])),[e]),w=t?.summary_by_sport?.[s],v=t?.bucket_keys_by_sport?.[s],N=t?.bucket_pages_by_sport?.[s],y=e.filter(e=>{let t;return String(e.sport_id)===s&&(t=String(e.status_id),2>=parseInt(e.sport_id)?!c.has(t):!x.has(t))}),_=y.filter(e=>{let t=parseInt(e.time);return t>=g&&t<b}),k=y.filter(e=>{let t=parseInt(e.time);return t>=b&&t<f}),E={all:y.length,live:y.filter(e=>h(e)).length,hot:y.filter(e=>"1"===String(e.hot)).length,today:_.length,tomorrow:k.length},C=(0,l.useMemo)(()=>{if(v){if("all"===o&&Array.isArray(N?.all)&&N.all.length>0)return N.all.slice(0,p).flat().map(e=>j.get(e)).filter(Boolean);let e=v[o];if(Array.isArray(e))return e.map(e=>j.get(e)).filter(Boolean)}return"all"===o?y:"live"===o?y.filter(e=>h(e)):"hot"===o?y.filter(e=>"1"===String(e.hot)):"today"===o?_:"tomorrow"===o?k:y},[o,y,j,N,v,_,k,p]),S="all"===o&&Array.isArray(N?.all)&&p<N.all.length,L=(0,l.useMemo)(()=>"all"!==o&&"live"!==o&&"hot"!==o?[]:C.filter(e=>"1"===String(e.hot)||h(e)).slice(0,4),[C,o]),$=(0,l.useMemo)(()=>{let e=new Map;
588return C.forEach(t=>{let s=t.source_card_meta?.league_label||t.match_data?.competition_vi||t.match_data?.competition_name||t.match_data?.competition_full||"Giải đấu kh\xe1c";e.has(s)||e.set(s,[]),e.get(s).push(t)}),Array.from(e.entries())},[C]);return(0,a.jsxs)("div",{className:"w-full min-h-[500px]",children:[(0,a.jsx)(r,{activeSport:s,onSportChange:n,activeStatus:o,onStatusChange:d,matchesCount:w||E}),0===C.length?(0,a.jsx)("div",{className:"py-20 text-center",children:(0,a.jsx)("div",{className:"text-slate-400 text-base font-medium",children:"Kh\xf4ng c\xf3 trận đấu n\xe0o."})}):(0,a.jsxs)("div",{className:"flex flex-col gap-6",children:[L.length>0&&"all"===o&&(0,a.jsxs)("div",{className:"mb-4",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 mb-3 px-1",children:[(0,a.jsx)("span",{className:"w-2 h-4 rounded-full bg-[#4681E8]"}),(0,a.jsx)("h2",{className:"text-slate-800 font-black text-sm uppercase tracking-wider",children:"Trận đấu t\xe2m điểm"})]}),(0,a.jsx)("div",{className:"grid grid-cols-1 xl:grid-cols-2 gap-2",children:L.map((e,t)=>(0,a.jsx)(i,{match:e},`featured-${e.ls_id||e.id}-${t}`))})]}),(0,a.jsx)("div",{className:"flex flex-col gap-5",children:$.map(([e,t])=>{let s=t[0]?.match_data?.competition_logo;return(0,a.jsxs)("div",{className:"rounded-xl overflow-hidden border border-slate-200 bg-white shadow-sm",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2.5 bg-[#0E1B33] px-4 py-2.5 border-b border-[#0E1B33]",children:[s&&(0,a.jsx)("img",{src:s,alt:"league",className:"w-4 h-4 object-contain brightness-200 opacity-80",loading:"lazy",decoding:"async"}),(0,a.jsx)("h3",{className:"text-white text-[12px] font-bold uppercase tracking-wider truncate",children:e})]}),(0,a.jsx)("div",{className:"flex flex-col",children:t.map((e,t)=>(0,a.jsx)(i,{match:e},e.ls_id||`${e.id}-${t}`))})]},e)})}),S&&(0,a.jsx)("div",{className:"flex justify-center mt-6",children:(0,a.jsx)("button",{type:"button",onClick:()=>u(e=>e+1),className:"inline-flex items-center justify-center rounded-xl border border-[#4681E8]/30 bg-white px-8 py-3 text-[12px] font-bold uppercase tracking-wider text-[#4681E8] transition-all duration-200 hover:bg-[#4681E8] hover:text-white hover:border-[#4681E8]",children:"Tải th\xeam"})})]})]})}},60997:(e,t,s)=>{"use strict";s.d(t,{Klivevip02SchedulePage:()=>d});var a=s(68019),l=s(10707),r=s(78637),n=s(10327);function i({html:e}){return e?.trim()?(0,a.jsx)("section",{className:"relative mt-10 mb-6",children:(0,a.jsx)("div",{className:"seo-prose relative",children:(0,a.jsx)("div",{dangerouslySetInnerHTML:{__html:e},className:"text-slate-600 text-[14px] leading-[1.85] px-1 [&_strong]:text-slate-900 [&_a]:text-[#4681E8]"})})}):null}s(54738);let o=`
589<h2>Lịch thi đấu b\xf3ng đ\xe1 - Cập nhật lịch b\xf3ng đ\xe1 h\xf4m nay nhanh v\xe0 ch\xednh x\xe1c</h2>
590
591<p>Để <strong>xem lịch thi đấu b\xf3ng đ\xe1</strong> nhanh, ch\xednh x\xe1c v\xe0 đầy đủ nhất, Klive ch\xednh l\xe0 nơi bạn n\xean chọn. Ch\xfang t\xf4i cập nhật lịch thi đấu cho to\xe0n bộ c\xe1c giải đấu trong nước v\xe0 quốc tế, gi\xfap bạn kh\xf4ng bỏ lỡ bất kỳ trận cầu hấp dẫn n\xe0o.</p>
592
593<img src="/images/seo/schedule-football.png" alt="Lịch thi đấu b\xf3ng đ\xe1 h\xf4m nay tại Klive" loading="lazy" />
594
595<div class="toc-box">
596  <h3>Nội dung ch\xednh</h3>
597  <ol>
598    <li>Lịch thi đấu b\xf3ng đ\xe1 trực tuyến h\xe0ng đầu</li>
599    <li>Lịch b\xf3ng đ\xe1 nhanh v\xe0 ch\xednh x\xe1c</li>
600    <li>Cập nhật lịch Ngoại Hạng Anh v\xe0 Champions League</li>
601    <li>C\xe1ch xem lịch thi đấu hiệu quả nhất</li>
602  </ol>
603</div>
604
605<h2>Lịch thi đấu b\xf3ng đ\xe1 trực tuyến h\xe0ng đầu</h2>
606<p>Trong thời đại số, kh\xf4ng ai c\xf2n xem lịch b\xf3ng đ\xe1 tr\xean TV hay b\xe1o giấy nữa. Tất cả đ\xe3 chuyển sang theo d\xf5i online, v\xe0 Klive ch\xednh l\xe0 nền tảng cập nhật lịch b\xf3ng đ\xe1 được đ\xe1nh gi\xe1 cao nhất.</p>
607
608<p>Khi truy cập Klive, bạn c\xf3 thể xem lịch thi đấu của bất kỳ giải đấu b\xf3ng đ\xe1 n\xe0o tr\xean thế giới một c\xe1ch ho\xe0n to\xe0n miễn ph\xed. Th\xf4ng tin lịch đấu được cập nhật sớm nhất v\xe0 chi tiết đến từng ph\xfat.</p>
609
610<h2>Lịch b\xf3ng đ\xe1 nhanh v\xe0 ch\xednh x\xe1c</h2>
611<p>Klive kh\xf4ng chỉ cung cấp lịch thi đấu c\xe1c giải đấu h\xe0ng đầu m\xe0 c\xf2n cập nhật lịch ph\xe1t s\xf3ng tr\xean c\xe1c k\xeanh truyền h\xecnh Việt Nam như K+, FPT Play, VTV Sports. Gi\xfap bạn biết trận n\xe0o được chiếu trực tiếp tr\xean TV v\xe0 sắp xếp thời gian hợp l\xfd.</p>
612
613<h2>Cập nhật lịch Ngoại Hạng Anh v\xe0 Champions League</h2>
614<p>Ngoại Hạng Anh v\xe0 Champions League l\xe0 hai giải đấu được quan t\xe2m nhất. Tại Klive, bạn lu\xf4n nắm được lịch đấu đầy đủ từ v\xf2ng bảng đến chung kết, k\xe8m theo th\xf4ng tin về đội h\xecnh dá»± kiến, phong độ v\xe0 lịch sá»­ đối đầu để chuẩn bị tốt nhất cho má
614»—i trận cầu.</p>
615
616<p>Kết hợp lịch thi đấu với trang trực tiếp b\xf3ng đ\xe1, bạn sẽ c\xf3 trải nghiệm theo d\xf5i b\xf3ng đ\xe1 ho\xe0n hảo nhất - biết trước, xem ngay, kh\xf4ng bỏ lỡ!</p>
617`;var c=s(2047);function d({initialData:e}){let t=(0,r.usePathname)(),[s,h]=(0,l.useState)(!1),[m,p]=(0,l.useState)(new Set),[u,g]=(0,l.useState)(""),[b,f]=(0,l.useState)(!1),[j,w]=(0,l.useState)(0),v=(0,l.useMemo)(()=>(0,c.p_)(e),[e]),N=v.dateTabs,y=(0,l.useMemo)(()=>{if(!v.selectedDate)return 0;let e=N.findIndex(e=>(e.dataValue||e.date)===v.selectedDate);return e>=0?e:0},[N,v.selectedDate]),[_,k]=(0,l.useState)(y),[E,C]=(0,l.useState)(v.leagues||[]),S=(0,l.useMemo)(()=>{if(!u)return E;let e=u.toLowerCase();return E.filter(t=>t.league_name.toLowerCase().includes(e)||t.matches.some(t=>t.home_team.toLowerCase().includes(e)||t.away_team.toLowerCase().includes(e)))},[E,u]),L=Math.max(0,N.length-7),$=N.slice(j,j+7),F=j>0,T=j<L,A=S.reduce((e,t)=>e+t.matches.length,0);return((0,l.useEffect)(()=>{if(!v.selectedDate||!N.length)return;let e=N.findIndex(e=>(e.dataValue||e.date)===v.selectedDate);e>=0&&k(e)},[N,v.selectedDate]),(0,l.useEffect)(()=>{_<j?w(Math.max(0,_)):_>=j+7&&w(Math.min(L,_-7+1))},[_,L,j]),e)?(0,a.jsxs)("div",{className:"max-w-[1440px] mx-auto px-4 py-8",children:[(0,a.jsx)(n.T,{eyebrow:"Lịch thi đấu",title:"LỊCH THI ĐẤU",rightSlot:(0,a.jsxs)("div",{className:"text-[12px] text-slate-500 font-bold uppercase tracking-wider",children:[(0,a.jsx)("span",{className:"text-[#E11D48] font-black",children:S.reduce((e,t)=>e+t.matches.length,0)})," trận đấu"]})}),(0,a.jsxs)("div",{className:"flex items-center mb-4 rounded-xl overflow-hidden border border-slate-200 bg-white shadow-sm",children:[(0,a.jsx)("button",{type:"button",disabled:!F,onClick:()=>w(e=>Math.max(0,e-1)),className:`flex items-center justify-center w-8 h-[52px] bg-slate-100 border-r border-slate-200 text-slate-600 hover:text-slate-800 hover:bg-slate-200 transition-all shrink-0 ${!F?"opacity-30":"cursor-pointer"}`,children:(0,a.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2.5,d:"M15 19l-7-7 7-7"})})}),(0,a.jsx)("div",{className:"flex flex-1",children:$.map((e,s)=>{let l=j+s;return(0,a.jsxs)("button",{type:"button",onClick:()=>(e=>{let s=N[e];if(!s||e===_)return;let a=s.dataValue||s.date;a&&(k(e),p(new Set),h(!0),window.history.replaceState(null,"",`${t}?date=${encodeURIComponent(a)}`),fetch(`/api/socolive/fixtures?date=${encodeURIComponent(a)}`,{cache:"no-store"}).then(e=>e.ok?e.json():null).then(e=>{e&&C((0,c.p_)(e).leagues||[])}).finally(()=>h(!1)))})(l),className:`flex-1 flex flex-col items-center justify-center h-[52px] border-b-[3px] transition-all duration-300 ${_===l?"border-[#4681E8] text-[#4681E8] bg-[#4681E8]/5":"border-transparent text-[#64748B] hover:text-[#94A3B8] hover:bg-slate-100"}`,children:[(0,a.jsx)("span",{className:`text-[11px] font-bold uppercase tracking-widest ${_===l?"text-[#4681E8]":""}`,children:e.label}),(0,a.jsx)("span",{className:`text-[12px] font-mono mt-0.5 ${_===l?"text-slate-800 font-black":""}`,children:e.date})]},`tab-${l}`)})}),(0,a.jsx)("button",{type:"button",disabled:!T,onClick:()=>w(e=>Math.min(L,e+1)),className:`flex items-center justify-center w-8 h-[52px] bg-slate-100 border-l border-slate-200 text-slate-600 hover:text-slate-800 hover:bg-slate-200 transition-all shrink-0 ${!T?"opacity-30":"cursor-pointer"}`,children:(0,a.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2.5,d:"M9 5l7 7-7 7"})})})]}),(0,a.jsxs)("div",{className:"relative mb-4",children:[(0,a.jsxs)("button",{onClick:()=>f(!b),className:"flex items-center gap-3 bg-white hover:bg-slate-50 px-4 py-2.5 rounded-xl border border-slate-200 shadow-sm transition-all text-sm group",children:[(0,a.jsx)("svg",{className:"w-5 h-5 text-[#E11D48] transition-colors group-hover:text-[#F43F5E]",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 6h16M4 12h16M4 18h16"})}),(0,a.jsx)("span",{className:"text-slate-700 font-bold text-[13px] uppercase tracking-wide",children:"Danh s\xe1ch giải đấu"}),(0,a.jsx)("svg",{className:`w-4 h-4 text-slate-500 transition-transform duration-300 ${b?"rotate-180":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),b&&(0,a.jsxs)("div",{className:"absolute top-full left-0 mt-2 w-[360px] bg-white border border-slate-200 rounded-2xl shadow-[0_24px_80px_rgba(0,0,0,0.12)] z-50 max-h-[320px] overflow-hidden flex flex-col",children:[(0,a.jsx)("div",{className:"p-2 border-b border-slate-100",children:(0,a.jsx)("input",{type:"text",placeholder:"T\xecm giải đấu...",value:u,onChange:e=>g(e.target.value),className:"w-full bg-slate-50 border border-transparent roun
617ded-xl px-4 py-2.5 text-sm text-slate-800 placeholder-slate-400 outline-none focus:border-[#4681E8]/50 transition-colors"})}),(0,a.jsx)("div",{className:"overflow-y-auto flex-1 py-2",children:E.map((e,t)=>(0,a.jsxs)("button",{type:"button",onClick:()=>{g(e.league_name),f(!1)},className:"w-full flex items-center gap-3 px-4 py-2.5 hover:bg-slate-50 text-left text-[13px] transition-colors",children:[e.league_icon?(0,a.jsx)("img",{src:e.league_icon,alt:e.league_name||"League",className:"w-5 h-5 object-contain shrink-0",loading:"lazy",decoding:"async"}):(0,a.jsx)("div",{className:"w-5 h-5 rounded-md bg-slate-200 shrink-0"}),(0,a.jsx)("span",{className:"text-slate-600 truncate flex-1 font-medium",children:e.league_name}),(0,a.jsx)("span",{className:"text-[11px] text-[#E11D48] font-bold shrink-0 px-2 py-0.5 bg-[#E11D48]/10 rounded-md border border-[#E11D48]/20",children:e.matches.length})]},t))})]})]}),(0,a.jsxs)("div",{className:"grid grid-cols-[1fr_60px_55px_100px_100px_90px] bg-slate-50 border border-slate-200 rounded-t-xl px-4 py-3 text-[11px] text-slate-500 font-black uppercase tracking-widest shadow-inner",children:[(0,a.jsx)("span",{children:"Trận đấu"}),(0,a.jsx)("span",{className:"text-center",children:"Tỷ số"}),(0,a.jsx)("span",{className:"text-center",children:"Hiệp 1"}),(0,a.jsx)("span",{className:"text-center",children:"Cược chấp"}),(0,a.jsx)("span",{className:"text-center",children:"T\xe0i/Xỉu"}),(0,a.jsx)("span",{className:"text-center",children:"1 X 2"})]}),(0,a.jsxs)("div",{className:"border border-slate-200 border-t-0 rounded-b-xl overflow-hidden relative shadow-[0_8px_30px_rgba(0,0,0,0.06)]",children:[s&&(0,a.jsx)("div",{className:"absolute inset-0 z-10 bg-white/80 backdrop-blur-[2px]",children:(0,a.jsx)("div",{className:"space-y-0",children:[...Array(6)].map((e,t)=>(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 px-4 py-3.5 bg-slate-100 border-b border-slate-200",children:[(0,a.jsx)("div",{className:"w-4 h-4 rounded bg-slate-300 animate-pulse"}),(0,a.jsx)("div",{className:"h-3.5 rounded bg-slate-200 animate-pulse",style:{width:`${120+30*t}px`}})]}),[void 0,void 0].map((e,t)=>(0,a.jsxs)("div",{className:"grid grid-cols-[1fr_60px_55px_100px_100px_90px] items-center px-4 py-3 border-b border-slate-100",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)("div",{className:"w-10 h-3.5 rounded bg-slate-200 animate-pulse"}),(0,a.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,a.jsx)("div",{className:"h-3 w-24 rounded bg-slate-100 animate-pulse"}),(0,a.jsx)("div",{className:"h-3 w-20 rounded bg-slate-100 animate-pulse"})]})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5",children:[(0,a.jsx)("div",{className:"h-3 w-5 rounded bg-slate-100 animate-pulse"}),(0,a.jsx)("div",{className:"h-3 w-5 rounded bg-slate-100 animate-pulse"})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5",children:[(0,a.jsx)("div",{className:"h-3 w-5 rounded bg-slate-100 animate-pulse"}),(0,a.jsx)("div",{className:"h-3 w-5 rounded bg-slate-100 animate-pulse"})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5",children:[(0,a.jsx)("div",{className:"h-3 w-14 rounded bg-slate-100 animate-pulse"}),(0,a.jsx)("div",{className:"h-3 w-10 rounded bg-slate-100 animate-pulse"})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5",children:[(0,a.jsx)("div",{className:"h-3 w-14 rounded bg-slate-100 animate-pulse"}),(0,a.jsx)("div",{className:"h-3 w-10 rounded bg-slate-100 animate-pulse"})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5",children:[(0,a.jsx)("div",{className:"h-3 w-10 rounded bg-slate-100 animate-pulse"}),(0,a.jsx)("div",{className:"h-3 w-10 rounded bg-slate-100 animate-pulse"}),(0,a.jsx)("div",{className:"h-3 w-10 rounded bg-slate-100 animate-pulse"})]})]},t))]},t))})}),0!==S.length||s?S.map((e,t)=>(0,a.jsxs)("div",{id:`league-${t}`,children:[(0,a.jsxs)("button",{onClick:()=>{p(e=>{let s=new Set(e);return s.has(t)?s.delete(t):s.add(t),s})},className:"w-full flex items-center gap-3 px-4 py-3 bg-slate-50 hover:bg-slate-100 border-b border-slate-100 transition-colors text-left group",children:[(0,a.jsx)("svg",{className:`w-4 h-4 text-[#E11D48] transition-transform duration-300 shrink-0 ${m.has(t)?"-rotate-90":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2.5,d:"M19 9l-7 7-7-7"})}),e.league_icon&&(0,a.jsx)("div",{className:"w-6 h-6 rounded-full bg-slate-100 p-0.5 border border-slate-200 flex items-center justify-center shadow-sm",children:(0,a.jsx)("img",{src:e.league_icon,alt:e.league_name||"League",className:"w-4 h-4 object-contain shrink-0",loading:"lazy",decoding:"async"})}),(0,a.jsx)("span",{className:"text-[13px] font-bold text-slate-700 flex-1 truncate uppercase tracking-widest",children:e.league_name}),(0,a.jsxs)("span",{className:"text-[11px] text-[#E11D48] font-bold shrink-0 ml-1 px-2 py-0.5 bg-[#E11D48]/10 rounded border border-[#
617E11D48]/20 group-hover:bg-[#E11D48]/20 transition-colors",children:["BXH ",(0,a.jsx)("svg",{className:"inline w-3 h-3 ml-0.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 6h16M4 10h16M4 14h16M4 18h16"})})]})]}),!m.has(t)&&e.matches.map((e,t)=>(0,a.jsxs)("div",{className:"grid grid-cols-[1fr_60px_55px_100px_100px_90px] items-center px-4 py-3 bg-transparent hover:bg-slate-50 border-b border-slate-100 last:border-0 transition-colors group cursor-default",children:[(0,a.jsxs)("div",{className:"flex items-center gap-4 min-w-0",children:[(0,a.jsx)("span",{className:"text-[#E11D48] font-mono text-[13px] font-black min-w-[42px] shrink-0 drop-shadow-[0_0_4px_rgba(225,29,72,0.4)]",children:e.time}),(0,a.jsxs)("div",{className:"flex flex-col gap-1 min-w-0 flex-1",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[e.home_logo&&(0,a.jsx)("img",{src:e.home_logo,alt:e.home_team||"Home team",className:"w-4 h-4 object-contain shrink-0 filter drop-shadow-[0_2px_2px_rgba(0,0,0,0.8)]",loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-[13px] text-slate-700 font-medium truncate group-hover:text-slate-900 transition-colors",children:e.home_team})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[e.away_logo&&(0,a.jsx)("img",{src:e.away_logo,alt:e.away_team||"Away team",className:"w-4 h-4 object-contain shrink-0",loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-[13px] text-slate-700 font-medium truncate group-hover:text-slate-900 transition-colors",children:e.away_team})]})]})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center",children:[(0,a.jsx)("span",{className:"text-[12px] text-[var(--accent-cyan)] font-mono font-bold",children:"-"!==e.score?e.score:"-"}),(0,a.jsx)("span",{className:"text-[12px] text-[#64748B]",children:"-"})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center",children:[(0,a.jsx)("span",{className:"text-[12px] text-[#64748B]",children:"-"}),(0,a.jsx)("span",{className:"text-[12px] text-[#64748B]",children:"-"})]}),(0,a.jsx)(x,{values:e.handicap,hasLine:!0}),(0,a.jsx)(x,{values:e.over_under,hasLine:!0}),(0,a.jsx)("div",{className:"flex flex-col items-center gap-0",children:e.one_x_two?.length>0?e.one_x_two.map((e,t)=>(0,a.jsx)("span",{className:"text-[11px] text-slate-500 leading-[18px]",children:e||"-"},t)):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"text-[11px] text-[#64748B] leading-[18px]",children:"-"}),(0,a.jsx)("span",{className:"text-[11px] text-[#64748B] leading-[18px]",children:"-"}),(0,a.jsx)("span",{className:"text-[11px] text-[#64748B] leading-[18px]",children:"-"})]})})]},t))]},t)):(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center py-20 gap-3 bg-slate-50",children:[(0,a.jsx)("svg",{className:"w-12 h-12 text-slate-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",strokeWidth:1.5,children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6.75 3v2.25M17.25 3v2.25M3 18.75V7.5a2.25 2.25 0 012.25-2.25h13.5A2.25 2.25 0 0121 7.5v11.25m-18 0A2.25 2.25 0 005.25 21h13.5A2.25 2.25 0 0021 18.75m-18 0v-7.5A2.25 2.25 0 015.25 9h13.5A2.25 2.25 0 0121 11.25v7.5"})}),(0,a.jsx)("span",{className:"text-slate-500 font-medium tracking-wide",children:"Kh\xf4ng c\xf3 trận đấu n\xe0o cho ng\xe0y n\xe0y"}),(0,a.jsx)("span",{className:"text-slate-400 text-[12px]",children:"H\xe3y thử chọn một ng\xe0y kh\xe1c"})]})]}),(0,a.jsxs)("div",{className:"mt-6 text-center text-[11px] text-[#64748B] uppercase tracking-widest font-bold drop-shadow-sm",children:["Tổng cộng ",A," trận đấu trong ",S.length," giải"]}),(0,a.jsx)(i,{html:o})]}):(0,a.jsxs)("div",{className:"max-w-[1440px] mx-auto px-4 py-8",children:[(0,a.jsx)(n.T,{eyebrow:"Lịch thi đấu",title:"LỊCH THI ĐẤU"}),(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center py-16 gap-4",children:[(0,a.jsx)("div",{className:"w-12 h-12 rounded-full border-2 border-[#E11D48]/30 border-t-[#E11D48] animate-spin"}),(0,a.jsx)("span",{className:"text-slate-500 text-sm font-medium tracking-wide",children:"Đang tải lịch thi đấu..."})]})]})}function x({values:e,hasLine:t}){return e&&0!==e.length?t&&e.length>=3?(0,a.jsxs)("div",{className:"flex flex-col items-center gap-0",children:[(0,a.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,a.jsx)("span",{className:"text-[11px] text-[#E11D48] leading-[18px] font-bold",children:e[0]}),(0,a.jsx)("span",{className:"text-[11px] text-slate-500 leading-[18px]",children:e[1]})]}),(0,a.jsx)("span",{className:"text-[11px] text-slate-500 leading-[18px]",children:e[2]})]}):(0,a.jsx)("div",{className:"flex flex-col items-center gap-0",children:e.map((e,t)=>(0,a.jsx)("span",{className:"text-[11px] text-slate-500 leading-[18px]",children:e||"-"},t))}):(0,a.jsxs)("div",{className:"flex flex-col items-center",children:[(0,a.jsx)("span",{className:"text-[11px] text-[#64748B] leading-[18px]",children:"-"}),(0,a.jsx)("span",{className:"text-[11px] text-[#64748B] leading-[18px]",children:"-"})]})}},61705:(e,t,s)=>{"use strict";s.d(t,{Klivevip01SchedulePage:()=>d});var a=s(68019),l=s(10707),r=s(78637),n=s(99271);function i({html:e}){return e?.trim()?(0,a.jsx)("section",{className:"relative mt-10 mb-6",children:(0,a.jsx)("div",{className:"seo-prose relative",children:(0,a.jsx)("div",{dangerouslySetInnerHTML:{__html:e},className:"text-slate-600 text-[14px] leading-[1.85] px-1 [&_strong]:text-slate-900 [&_a]:text-[#4681E8]"})})}):null}s(45499);let o=`
618<h2>Lịch thi đấu b\xf3ng đ\xe1 - Cập nhật lịch b\xf3ng đ\xe1 h\xf4m nay nhanh v\xe0 ch\xednh x\xe1c</h2>
619
620<p>Để <strong>xem lịch thi đấu b\xf3ng đ\xe1</strong> nhanh, ch\xednh x\xe1c v\xe0 đầy đủ nhất, Klive ch\xednh l\xe0 nơi bạn n\xean chọn. Ch\xfang t\xf4i cập nhật lịch thi đấu cho to\xe0n bộ c\xe1c giải đấu trong nước v\xe0 quốc tế, gi\xfap bạn kh\xf4ng bỏ lỡ bất kỳ trận cầu hấp dẫn n\xe0o.</p>
621
622<img src="/images/seo/schedule-football.png" alt="Lịch thi đấu b\xf3ng đ\xe1 h\xf4m nay tại Klive" loading="lazy" />
623
624<div class="toc-box">
625  <h3>Nội dung ch\xednh</h3>
626  <ol>
627    <li>Lịch thi đấu b\xf3ng đ\xe1 trực tuyến h\xe0ng đầu</li>
628    <li>Lịch b\xf3ng đ\xe1 nhanh v\xe0 ch\xednh x\xe1c</li>
629    <li>Cập nhật lịch Ngoại Hạng Anh v\xe0 Champions League</li>
630    <li>C\xe1ch xem lịch thi đấu hiệu quả nhất</li>
631  </ol>
632</div>
633
634<h2>Lịch thi đấu b\xf3ng đ\xe1 trực tuyến h\xe0ng đầu</h2>
635<p>Trong thời đại số, kh\xf4ng ai c\xf2n xem lịch b\xf3ng đ\xe1 tr\xean TV hay b\xe1o giấy nữa. Tất cả đ\xe3 chuyển sang theo d\xf5i online, v\xe0 Klive ch\xednh l\xe0 nền tảng cập nhật lịch b\xf3ng đ\xe1 được đ\xe1nh gi\xe1 cao nhất.</p>
636
637<p>Khi truy cập Klive, bạn c\xf3 thể xem lịch thi đấu của bất kỳ giải đấu b\xf3ng đ\xe1 n\xe0o tr\xean thế giới một c\xe1ch ho\xe0n to\xe0n miễn ph\xed. Th\xf4ng tin lịch đấu được cập nhật sớm nhất v\xe0 chi tiết đến từng ph\xfat.</p>
638
639<h2>Lịch b\xf3ng đ\xe1 nhanh v\xe0 ch\xednh x\xe1c</h2>
640<p>Klive kh\xf4ng chỉ cung cấp lịch thi đấu c\xe1c giải đấu h\xe0ng đầu m\xe0 c\xf2n cập nhật lịch ph\xe1t s\xf3ng tr\xean c\xe1c k\xeanh truyền h\xecnh Việt Nam như K+, FPT Play, VTV Sports. Gi\xfap bạn biết trận n\xe0o được chiếu trực tiếp tr\xean TV v\xe0 sắp xếp thời gian hợp l\xfd.</p>
641
642<h2>Cập nhật lịch Ngoại Hạng Anh v\xe0 Champions League</h2>
643<p>Ngoại Hạng Anh v\xe0 Champions League l\xe0 hai giải đấu được quan t\xe2m nhất. Tại Klive, bạn lu\xf4n nắm được lịch đấu đầy đủ từ v\xf2ng bảng đến chung kết, k\xe8m theo th\xf4ng tin về đội h\xecnh dá»± kiến, phong độ v\xe0 lịch sá»­ đối đầu để chuẩn bị tốt nhất cho má
643»—i trận cầu.</p>
644
645<p>Kết hợp lịch thi đấu với trang trực tiếp b\xf3ng đ\xe1, bạn sẽ c\xf3 trải nghiệm theo d\xf5i b\xf3ng đ\xe1 ho\xe0n hảo nhất - biết trước, xem ngay, kh\xf4ng bỏ lỡ!</p>
646`;var c=s(97426);function d({initialData:e}){let t=(0,r.usePathname)(),[s,h]=(0,l.useState)(!1),[m,p]=(0,l.useState)(new Set),[u,g]=(0,l.useState)(""),[b,f]=(0,l.useState)(!1),[j,w]=(0,l.useState)(0),v=(0,l.useMemo)(()=>(0,c.p_)(e),[e]),N=v.dateTabs,y=(0,l.useMemo)(()=>{if(!v.selectedDate)return 0;let e=N.findIndex(e=>(e.dataValue||e.date)===v.selectedDate);return e>=0?e:0},[N,v.selectedDate]),[_,k]=(0,l.useState)(y),[E,C]=(0,l.useState)(v.leagues||[]),S=(0,l.useMemo)(()=>{if(!u)return E;let e=u.toLowerCase();return E.filter(t=>t.league_name.toLowerCase().includes(e)||t.matches.some(t=>t.home_team.toLowerCase().includes(e)||t.away_team.toLowerCase().includes(e)))},[E,u]),L=Math.max(0,N.length-7),$=N.slice(j,j+7),F=j>0,T=j<L,A=S.reduce((e,t)=>e+t.matches.length,0);return((0,l.useEffect)(()=>{if(!v.selectedDate||!N.length)return;let e=N.findIndex(e=>(e.dataValue||e.date)===v.selectedDate);e>=0&&k(e)},[N,v.selectedDate]),(0,l.useEffect)(()=>{_<j?w(Math.max(0,_)):_>=j+7&&w(Math.min(L,_-7+1))},[_,L,j]),e)?(0,a.jsxs)("div",{className:"max-w-[1440px] mx-auto px-4 py-8",children:[(0,a.jsx)(n.Q,{eyebrow:"Lịch thi đấu",title:"LỊCH THI ĐẤU",rightSlot:(0,a.jsxs)("div",{className:"text-[12px] text-slate-500 font-bold uppercase tracking-wider",children:[(0,a.jsx)("span",{className:"text-[#E11D48] font-black",children:S.reduce((e,t)=>e+t.matches.length,0)})," trận đấu"]})}),(0,a.jsxs)("div",{className:"flex items-center mb-4 rounded-xl overflow-hidden border border-slate-200 bg-white shadow-sm",children:[(0,a.jsx)("button",{type:"button",disabled:!F,onClick:()=>w(e=>Math.max(0,e-1)),className:`flex items-center justify-center w-8 h-[52px] bg-slate-100 border-r border-slate-200 text-slate-600 hover:text-slate-800 hover:bg-slate-200 transition-all shrink-0 ${!F?"opacity-30":"cursor-pointer"}`,children:(0,a.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2.5,d:"M15 19l-7-7 7-7"})})}),(0,a.jsx)("div",{className:"flex flex-1",children:$.map((e,s)=>{let l=j+s;return(0,a.jsxs)("button",{type:"button",onClick:()=>(e=>{let s=N[e];if(!s||e===_)return;let a=s.dataValue||s.date;a&&(k(e),p(new Set),h(!0),window.history.replaceState(null,"",`${t}?date=${encodeURIComponent(a)}`),fetch(`/api/socolive/fixtures?date=${encodeURIComponent(a)}`,{cache:"no-store"}).then(e=>e.ok?e.json():null).then(e=>{e&&C((0,c.p_)(e).leagues||[])}).finally(()=>h(!1)))})(l),className:`flex-1 flex flex-col items-center justify-center h-[52px] border-b-[3px] transition-all duration-300 ${_===l?"border-[#4681E8] text-[#4681E8] bg-[#4681E8]/5":"border-transparent text-[#64748B] hover:text-[#94A3B8] hover:bg-slate-100"}`,children:[(0,a.jsx)("span",{className:`text-[11px] font-bold uppercase tracking-widest ${_===l?"text-[#4681E8]":""}`,children:e.label}),(0,a.jsx)("span",{className:`text-[12px] font-mono mt-0.5 ${_===l?"text-slate-800 font-black":""}`,children:e.date})]},`tab-${l}`)})}),(0,a.jsx)("button",{type:"button",disabled:!T,onClick:()=>w(e=>Math.min(L,e+1)),className:`flex items-center justify-center w-8 h-[52px] bg-slate-100 border-l border-slate-200 text-slate-600 hover:text-slate-800 hover:bg-slate-200 transition-all shrink-0 ${!T?"opacity-30":"cursor-pointer"}`,children:(0,a.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2.5,d:"M9 5l7 7-7 7"})})})]}),(0,a.jsxs)("div",{className:"relative mb-4",children:[(0,a.jsxs)("button",{onClick:()=>f(!b),className:"flex items-center gap-3 bg-white hover:bg-slate-50 px-4 py-2.5 rounded-xl border border-slate-200 shadow-sm transition-all text-sm group",children:[(0,a.jsx)("svg",{className:"w-5 h-5 text-[#E11D48] transition-colors group-hover:text-[#F43F5E]",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 6h16M4 12h16M4 18h16"})}),(0,a.jsx)("span",{className:"text-slate-700 font-bold text-[13px] uppercase tracking-wide",children:"Danh s\xe1ch giải đấu"}),(0,a.jsx)("svg",{className:`w-4 h-4 text-slate-500 transition-transform duration-300 ${b?"rotate-180":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),b&&(0,a.jsxs)("div",{className:"absolute top-full left-0 mt-2 w-[360px] bg-white border border-slate-200 rounded-2xl shadow-[0_24px_80px_rgba(0,0,0,0.12)] z-50 max-h-[320px] overflow-hidden flex flex-col",children:[(0,a.jsx)("div",{className:"p-2 border-b border-slate-100",children:(0,a.jsx)("input",{type:"text",placeholder:"T\xecm giải đấu...",value:u,onChange:e=>g(e.target.value),className:"w-full bg-slate-50 border border-transparent roun
646ded-xl px-4 py-2.5 text-sm text-slate-800 placeholder-slate-400 outline-none focus:border-[#4681E8]/50 transition-colors"})}),(0,a.jsx)("div",{className:"overflow-y-auto flex-1 py-2",children:E.map((e,t)=>(0,a.jsxs)("button",{type:"button",onClick:()=>{g(e.league_name),f(!1)},className:"w-full flex items-center gap-3 px-4 py-2.5 hover:bg-slate-50 text-left text-[13px] transition-colors",children:[e.league_icon?(0,a.jsx)("img",{src:e.league_icon,alt:e.league_name||"League",className:"w-5 h-5 object-contain shrink-0",loading:"lazy",decoding:"async"}):(0,a.jsx)("div",{className:"w-5 h-5 rounded-md bg-slate-200 shrink-0"}),(0,a.jsx)("span",{className:"text-slate-600 truncate flex-1 font-medium",children:e.league_name}),(0,a.jsx)("span",{className:"text-[11px] text-[#E11D48] font-bold shrink-0 px-2 py-0.5 bg-[#E11D48]/10 rounded-md border border-[#E11D48]/20",children:e.matches.length})]},t))})]})]}),(0,a.jsxs)("div",{className:"grid grid-cols-[1fr_60px_55px_100px_100px_90px] bg-slate-50 border border-slate-200 rounded-t-xl px-4 py-3 text-[11px] text-slate-500 font-black uppercase tracking-widest shadow-inner",children:[(0,a.jsx)("span",{children:"Trận đấu"}),(0,a.jsx)("span",{className:"text-center",children:"Tỷ số"}),(0,a.jsx)("span",{className:"text-center",children:"Hiệp 1"}),(0,a.jsx)("span",{className:"text-center",children:"Cược chấp"}),(0,a.jsx)("span",{className:"text-center",children:"T\xe0i/Xỉu"}),(0,a.jsx)("span",{className:"text-center",children:"1 X 2"})]}),(0,a.jsxs)("div",{className:"border border-slate-200 border-t-0 rounded-b-xl overflow-hidden relative shadow-[0_8px_30px_rgba(0,0,0,0.06)]",children:[s&&(0,a.jsx)("div",{className:"absolute inset-0 z-10 bg-white/80 backdrop-blur-[2px]",children:(0,a.jsx)("div",{className:"space-y-0",children:[...Array(6)].map((e,t)=>(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 px-4 py-3.5 bg-slate-100 border-b border-slate-200",children:[(0,a.jsx)("div",{className:"w-4 h-4 rounded bg-slate-300 animate-pulse"}),(0,a.jsx)("div",{className:"h-3.5 rounded bg-slate-200 animate-pulse",style:{width:`${120+30*t}px`}})]}),[void 0,void 0].map((e,t)=>(0,a.jsxs)("div",{className:"grid grid-cols-[1fr_60px_55px_100px_100px_90px] items-center px-4 py-3 border-b border-slate-100",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)("div",{className:"w-10 h-3.5 rounded bg-slate-200 animate-pulse"}),(0,a.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,a.jsx)("div",{className:"h-3 w-24 rounded bg-slate-100 animate-pulse"}),(0,a.jsx)("div",{className:"h-3 w-20 rounded bg-slate-100 animate-pulse"})]})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5",children:[(0,a.jsx)("div",{className:"h-3 w-5 rounded bg-slate-100 animate-pulse"}),(0,a.jsx)("div",{className:"h-3 w-5 rounded bg-slate-100 animate-pulse"})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5",children:[(0,a.jsx)("div",{className:"h-3 w-5 rounded bg-slate-100 animate-pulse"}),(0,a.jsx)("div",{className:"h-3 w-5 rounded bg-slate-100 animate-pulse"})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5",children:[(0,a.jsx)("div",{className:"h-3 w-14 rounded bg-slate-100 animate-pulse"}),(0,a.jsx)("div",{className:"h-3 w-10 rounded bg-slate-100 animate-pulse"})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5",children:[(0,a.jsx)("div",{className:"h-3 w-14 rounded bg-slate-100 animate-pulse"}),(0,a.jsx)("div",{className:"h-3 w-10 rounded bg-slate-100 animate-pulse"})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5",children:[(0,a.jsx)("div",{className:"h-3 w-10 rounded bg-slate-100 animate-pulse"}),(0,a.jsx)("div",{className:"h-3 w-10 rounded bg-slate-100 animate-pulse"}),(0,a.jsx)("div",{className:"h-3 w-10 rounded bg-slate-100 animate-pulse"})]})]},t))]},t))})}),0!==S.length||s?S.map((e,t)=>(0,a.jsxs)("div",{id:`league-${t}`,children:[(0,a.jsxs)("button",{onClick:()=>{p(e=>{let s=new Set(e);return s.has(t)?s.delete(t):s.add(t),s})},className:"w-full flex items-center gap-3 px-4 py-3 bg-slate-50 hover:bg-slate-100 border-b border-slate-100 transition-colors text-left group",children:[(0,a.jsx)("svg",{className:`w-4 h-4 text-[#E11D48] transition-transform duration-300 shrink-0 ${m.has(t)?"-rotate-90":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2.5,d:"M19 9l-7 7-7-7"})}),e.league_icon&&(0,a.jsx)("div",{className:"w-6 h-6 rounded-full bg-slate-100 p-0.5 border border-slate-200 flex items-center justify-center shadow-sm",children:(0,a.jsx)("img",{src:e.league_icon,alt:e.league_name||"League",className:"w-4 h-4 object-contain shrink-0",loading:"lazy",decoding:"async"})}),(0,a.jsx)("span",{className:"text-[13px] font-bold text-slate-700 flex-1 truncate uppercase tracking-widest",children:e.league_name}),(0,a.jsxs)("span",{className:"text-[11px] text-[#E11D48] font-bold shrink-0 ml-1 px-2 py-0.5 bg-[#E11D48]/10 rounded border border-[#
646E11D48]/20 group-hover:bg-[#E11D48]/20 transition-colors",children:["BXH ",(0,a.jsx)("svg",{className:"inline w-3 h-3 ml-0.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 6h16M4 10h16M4 14h16M4 18h16"})})]})]}),!m.has(t)&&e.matches.map((e,t)=>(0,a.jsxs)("div",{className:"grid grid-cols-[1fr_60px_55px_100px_100px_90px] items-center px-4 py-3 bg-transparent hover:bg-slate-50 border-b border-slate-100 last:border-0 transition-colors group cursor-default",children:[(0,a.jsxs)("div",{className:"flex items-center gap-4 min-w-0",children:[(0,a.jsx)("span",{className:"text-[#E11D48] font-mono text-[13px] font-black min-w-[42px] shrink-0 drop-shadow-[0_0_4px_rgba(225,29,72,0.4)]",children:e.time}),(0,a.jsxs)("div",{className:"flex flex-col gap-1 min-w-0 flex-1",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[e.home_logo&&(0,a.jsx)("img",{src:e.home_logo,alt:e.home_team||"Home team",className:"w-4 h-4 object-contain shrink-0 filter drop-shadow-[0_2px_2px_rgba(0,0,0,0.8)]",loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-[13px] text-slate-700 font-medium truncate group-hover:text-slate-900 transition-colors",children:e.home_team})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[e.away_logo&&(0,a.jsx)("img",{src:e.away_logo,alt:e.away_team||"Away team",className:"w-4 h-4 object-contain shrink-0",loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-[13px] text-slate-700 font-medium truncate group-hover:text-slate-900 transition-colors",children:e.away_team})]})]})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center",children:[(0,a.jsx)("span",{className:"text-[12px] text-[var(--accent-cyan)] font-mono font-bold",children:"-"!==e.score?e.score:"-"}),(0,a.jsx)("span",{className:"text-[12px] text-[#64748B]",children:"-"})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center",children:[(0,a.jsx)("span",{className:"text-[12px] text-[#64748B]",children:"-"}),(0,a.jsx)("span",{className:"text-[12px] text-[#64748B]",children:"-"})]}),(0,a.jsx)(x,{values:e.handicap,hasLine:!0}),(0,a.jsx)(x,{values:e.over_under,hasLine:!0}),(0,a.jsx)("div",{className:"flex flex-col items-center gap-0",children:e.one_x_two?.length>0?e.one_x_two.map((e,t)=>(0,a.jsx)("span",{className:"text-[11px] text-slate-500 leading-[18px]",children:e||"-"},t)):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"text-[11px] text-[#64748B] leading-[18px]",children:"-"}),(0,a.jsx)("span",{className:"text-[11px] text-[#64748B] leading-[18px]",children:"-"}),(0,a.jsx)("span",{className:"text-[11px] text-[#64748B] leading-[18px]",children:"-"})]})})]},t))]},t)):(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center py-20 gap-3 bg-slate-50",children:[(0,a.jsx)("svg",{className:"w-12 h-12 text-slate-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",strokeWidth:1.5,children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6.75 3v2.25M17.25 3v2.25M3 18.75V7.5a2.25 2.25 0 012.25-2.25h13.5A2.25 2.25 0 0121 7.5v11.25m-18 0A2.25 2.25 0 005.25 21h13.5A2.25 2.25 0 0021 18.75m-18 0v-7.5A2.25 2.25 0 015.25 9h13.5A2.25 2.25 0 0121 11.25v7.5"})}),(0,a.jsx)("span",{className:"text-slate-500 font-medium tracking-wide",children:"Kh\xf4ng c\xf3 trận đấu n\xe0o cho ng\xe0y n\xe0y"}),(0,a.jsx)("span",{className:"text-slate-400 text-[12px]",children:"H\xe3y thử chọn một ng\xe0y kh\xe1c"})]})]}),(0,a.jsxs)("div",{className:"mt-6 text-center text-[11px] text-[#64748B] uppercase tracking-widest font-bold drop-shadow-sm",children:["Tổng cộng ",A," trận đấu trong ",S.length," giải"]}),(0,a.jsx)(i,{html:o})]}):(0,a.jsxs)("div",{className:"max-w-[1440px] mx-auto px-4 py-8",children:[(0,a.jsx)(n.Q,{eyebrow:"Lịch thi đấu",title:"LỊCH THI ĐẤU"}),(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center py-16 gap-4",children:[(0,a.jsx)("div",{className:"w-12 h-12 rounded-full border-2 border-[#E11D48]/30 border-t-[#E11D48] animate-spin"}),(0,a.jsx)("span",{className:"text-slate-500 text-sm font-medium tracking-wide",children:"Đang tải lịch thi đấu..."})]})]})}function x({values:e,hasLine:t}){return e&&0!==e.length?t&&e.length>=3?(0,a.jsxs)("div",{className:"flex flex-col items-center gap-0",children:[(0,a.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,a.jsx)("span",{className:"text-[11px] text-[#E11D48] leading-[18px] font-bold",children:e[0]}),(0,a.jsx)("span",{className:"text-[11px] text-slate-500 leading-[18px]",children:e[1]})]}),(0,a.jsx)("span",{className:"text-[11px] text-slate-500 leading-[18px]",children:e[2]})]}):(0,a.jsx)("div",{className:"flex flex-col items-center gap-0",children:e.map((e,t)=>(0,a.jsx)("span",{className:"text-[11px] text-slate-500 leading-[18px]",children:e||"-"},t))}):(0,a.jsxs)("div",{className:"flex flex-col items-center",children:[(0,a.jsx)("span",{className:"text-[11px] text-[#64748B] leading-[18px]",children:"-"}),(0,a.jsx)("span",{className:"text-[11px] text-[#64748B] leading-[18px]",children:"-"})]})}},61799:(e,t,s)=>{"use strict";s.d(t,{Klivevip04MatchDetailPage:()=>m});var a=s(68019),l=s(10707),r=s(58420);function n({src:e,poster:t,autoPlay:s=!0,onError:i,className:o=""}){let c=(0,l.useRef)(null),d=(0,l.useRef)(i);d.current=i;let[x,h]=(0,l.useState)(!1),[m,p]=(0,l.useState)(!1);return((0,l.useEffect)(()=>{let t=c.current;if(!t)return;let a=null;h(!1);let l=()=>p(!0),n=()=>p(!1);t.addEventListener("play",l),t.addEventListener("pause",n);let i=()=>{s&&(t.muted=!0,t.play().catch(()=>{}))};if(t.addEventListener("canplay",i),r.Ay.isSupported()){(a=new r.Ay({maxBufferLength:30,maxMaxBufferLength:60,lowLatencyMode:!0,enableWorker:!0})).loadSource(e),a.attachMedia(t),a.on(r.Ay.Events.MANIFEST_PARSED,()=>{s&&(t.muted=!0,t.play().catch(e=>{console.warn("AutoPlay failed:",e),t.muted=!1}))});let l=0,n=0;a.on(r.Ay.Events.ERROR,(e,t)=>
646{if(t.type===r.Ay.ErrorTypes.NETWORK_ERROR&&(++l>2||t.response&&t.response.code>=400)){console.error("HLS Network Error threshold reached (CORS/404), triggering fallback.",t),h(!0),d.current&&d.current(t),a?.destroy();return}if(t.fatal)switch(t.type){case r.Ay.ErrorTypes.NETWORK_ERROR:console.error("HLS Fatal Network Error, recovering...",t),a?.startLoad();break;case r.Ay.ErrorTypes.MEDIA_ERROR:console.error("HLS Media Error, recovering...",t),++n>3?(console.error("HLS Media Error threshold reached, triggering fallback."),h(!0),d.current&&d.current(t),a?.destroy()):a?.recoverMediaError();break;default:console.error("HLS Fatal Error:",t),h(!0),d.current&&d.current(t),a?.destroy()}})}else t.canPlayType("application/vnd.apple.mpegurl")&&(t.src=e,t.addEventListener("loadedmetadata",()=>{s&&t.play().catch(e=>{console.warn("AutoPlay failed:",e)})}),t.addEventListener("error",e=>{h(!0),d.current&&d.current(e)}));return()=>{t.removeEventListener("play",l),t.removeEventListener("pause",n),t.removeEventListener("canplay",i),a&&a.destroy()}},[e,s]),x)?i?null:(0,a.jsxs)("div",{className:`w-full h-full flex flex-col items-center justify-center bg-white/80 backdrop-blur ${o}`,children:[(0,a.jsx)("svg",{className:"w-12 h-12 text-red-500 mb-4 opacity-80",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"})}),(0,a.jsx)("div",{className:"text-slate-600 text-sm font-medium",children:"Video/Stream kh\xf4ng khả dụng hoặc bị lỗi mạng"}),(0,a.jsx)("div",{className:"text-gray-500 text-xs mt-1",children:"Vui l\xf2ng thử lại sau hoặc chọn nguồn kh\xe1c"})]}):(0,a.jsx)("div",{className:`relative group w-full h-full bg-white flex items-center justify-center overflow-hidden ${o}`,children:(0,a.jsx)("video",{ref:c,className:"w-full h-full object-contain",controls:!0,playsInline:!0,muted:s,poster:t,referrerPolicy:"no-referrer"})})}function i(e){let t=(e||"").split(/[\s-]+/).slice(0,2).map(e=>e[0]||"").join("").toUpperCase()||"??";return`data:image/svg+xml,${encodeURIComponent(`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 80 80"><rect width="80" height="80" rx="20" fill="#1a1c25"/><text x="40" y="47" font-size="20" font-family="Arial" font-weight="700" text-anchor="middle" fill="#666">${t}</text></svg>`)}`}function o({homeName:e,awayName:t,homeLogo:s,awayLogo:l,homeScore:r="0",awayScore:n="0",statusText:c="LIVE",timeText:d="",isLive:x=!0,sportId:h="1",matchId:m}){let p=s||i(e),u=l||i(t),g="5"===String(h),b="2"===String(h),f="bg-slate-200 border-slate-200",j="repeating-linear-gradient(90deg, transparent, transparent 10%, #000 10%, #000 20%)";return g?(f="bg-slate-100 border-slate-200",j="none"):b&&(f="bg-[#bc7a46] border-[#8a4e21]",j="repeating-linear-gradient(90deg, transparent, transparent 5%, #000 5%, #000 10%)"),(0,a.jsxs)("div",{className:"relative w-full aspect-video min-h-[300px] max-h-[600px] bg-slate-50 overflow-hidden flex flex-col justify-center",children:[(0,a.jsx)("div",{className:"absolute inset-0 flex items-center justify-center pointer-events-none mt-16 md:mt-24",children:(0,a.jsx)("div",{className:"relative w-[120%] h-[120%] sm:w-[90%] sm:h-[120%] max-w-[900px] flex-shrink-0 transition-transform duration-1000",style:{transform:"perspective(900px) rotateX(60deg) scale(0.9)",transformOrigin:"center center"},children:(0,a.jsxs)("div",{className:`absolute inset-0 ${f} shadow-[0_30px_60px_rgba(0,0,0,0.8)] border-4 rounded-xl overflow-hidden flex transition-colors duration-500`,children:[(0,a.jsx)("div",{className:"absolute inset-0 opacity-15 pointer-events-none",style:{backgroundImage:j}}),(0,a.jsxs)("div",{className:"absolute inset-[4%] pointer-events-none shadow-sm flex items-center justify-center",children:["1"===String(h)&&(0,a.jsxs)("div",{className:"absolute inset-0 w-full h-full border-2 border-white/60",children:[(0,a.jsx)("div",{className:"absolute left-1/2 top-0 bottom-0 w-0 border-l-2 border-white/60 -translate-x-1/2"}),(0,a.jsx)("div",{className:"absolute left-1/2 top-1/2 w-[18%] aspect-square rounded-full border-2 border-white/60 -translate-x-1/2 -translate-y-1/2"}),(0,a.jsx)("div",{className:"absolute left-1/2 top-1/2 w-2 h-2 rounded-full bg-white/80 -translate-x-1/2 -translate-y-1/2"}),(0,a.jsx)("div",{className:"absolute left-0 top-1/2 w-[16%] h-[46%] border-2 border-l-0 border-white/60 -translate-y-1/2 bg-slate-200"}),(0,a.jsx)("div",{className:"absolute left-0 top-1/2 w-[6%] h-[20%] border-2 border-l-0 border-white/60 -translate-y-1/2 bg-slate-200"}),(0,a.jsx)("div",{className:"absolute left-[16%] top-1/2 w-[8%] aspect-square border-2 border-l-0 border-white/60 rounded-r-full -translate-y-1/2 clip-path-half",style:{clipPath:"inset(0 0 0 50%)"}}),(0,a.jsx)("div",{className:"absolute right-0 top-1/2 w-[16%] h-[46%] border-2 border-r-0 border-white/60 -translate-y-1/2 bg-slate-200"}),(0,a.jsx)("div",{className:"absolute right-0 top-1/2 w-[6%] h-[20%] border-2 border-r-0 border-white/60 -translate-y-1/2 bg-slate-200"}),(0,a.jsx)("div",{className:"absolute right-[16%] top-1/2 w-[8%] aspect-square border-2 border-r-0 border-white/60 rounded-l-full -translate-y-1/2 clip-path-half",style:{clipPath:"inset(0 50% 0 0)"}})]}),g&&(0,a.jsxs)("div",{className:"absolute inset-[10%] w-[80%] h-[80%
646] border-2 border-white/80 bg-white",children:[(0,a.jsx)("div",{className:"absolute top-[10%] bottom-[10%] left-0 right-0 border-y-2 border-white/80"}),(0,a.jsx)("div",{className:"absolute left-1/2 top-[-2%] bottom-[-2%] w-1 bg-white/40 shadow-xl -translate-x-1/2 z-10"}),(0,a.jsx)("div",{className:"absolute left-[25%] right-[25%] top-[10%] bottom-[10%] border-x-2 border-white/80"}),(0,a.jsx)("div",{className:"absolute left-[25%] right-[25%] top-1/2 w-[50%] border-t-2 border-white/80 -translate-y-1/2"}),(0,a.jsx)("div",{className:"absolute left-0 top-1/2 w-[2%] border-t-2 border-white/80 -translate-y-1/2"}),(0,a.jsx)("div",{className:"absolute right-0 top-1/2 w-[2%] border-t-2 border-white/80 -translate-y-1/2"})]}),b&&(0,a.jsxs)("div",{className:"absolute inset-0 w-full h-full border-2 border-white/50",children:[(0,a.jsx)("div",{className:"absolute left-1/2 top-0 bottom-0 w-0 border-l-2 border-white/50 -translate-x-1/2"}),(0,a.jsx)("div",{className:"absolute left-1/2 top-1/2 w-[15%] aspect-square rounded-full border-2 border-white/50 -translate-x-1/2 -translate-y-1/2"}),(0,a.jsx)("div",{className:"absolute left-0 top-1/2 w-[18%] h-[35%] border-2 border-l-0 border-white/50 -translate-y-1/2 bg-[#bc7a46]"}),(0,a.jsx)("div",{className:"absolute left-[18%] top-1/2 w-[10%] aspect-square rounded-full border-2 border-white/50 -translate-y-1/2"}),(0,a.jsx)("div",{className:"absolute left-0 top-1/2 w-[30%] h-[70%] border-2 border-l-0 border-white/50 rounded-r-full -translate-y-1/2 opacity-60"}),(0,a.jsx)("div",{className:"absolute right-0 top-1/2 w-[18%] h-[35%] border-2 border-r-0 border-white/50 -translate-y-1/2 bg-[#bc7a46]"}),(0,a.jsx)("div",{className:"absolute right-0 top-1/2 w-[30%] h-[70%] border-2 border-r-0 border-white/50 rounded-l-full -translate-y-1/2 opacity-60"})]})]}),x&&(0,a.jsx)("div",{className:`absolute left-1/2 top-1/2 shadow-[0_8px_16px_rgba(0,0,0,0.8)] z-10 transition-all duration-[3000ms] border-2 border-white/20 rounded-full
647                                ${g?"w-2 h-2 sm:w-3 sm:h-3 bg-[#ccff00]":b?"w-4 h-4 sm:w-6 sm:h-6 bg-[#d95d16]":"w-4 h-4 sm:w-5 sm:h-5 bg-white"}`,style:{animation:"ballMove 8s infinite alternate ease-in-out",transform:"translate(-50%, -50%)"},children:(0,a.jsx)("div",{className:"absolute -bottom-4 left-1/2 w-4 h-2 bg-white/40 rounded-full blur-sm -translate-x-1/2"})}),x&&(0,a.jsxs)("div",{className:"absolute left-[65%] top-[60%] flex flex-col items-center animate-bounce-slow",style:{animation:"floatBubble 4s infinite alternate ease-in-out"},children:[(0,a.jsxs)("div",{className:"bg-white/95 backdrop-blur border border-white/10 rounded-2xl p-2 shadow-2xl flex items-center gap-3 w-max max-w-[200px]",children:[(0,a.jsx)("div",{className:"w-6 h-6 rounded-full flex items-center justify-center p-0.5 bg-white/5 shrink-0",children:(0,a.jsx)("img",{src:p,alt:e||"Home team",className:"max-w-full max-h-full object-contain",onError:t=>t.target.src=i(e),loading:"lazy",decoding:"async"})}),(0,a.jsx)("div",{className:"flex flex-col pr-1 overflow-hidden",children:(0,a.jsx)("span",{className:"text-slate-900 font-bold text-[10px] sm:text-xs tracking-wide truncate",children:g?"Serve / Return":"Tấn c\xf4ng nguy hiểm"})})]}),(0,a.jsx)("div",{className:"w-0 h-0 border-l-[6px] border-r-[6px] border-t-[6px] border-l-transparent border-r-transparent border-t-[#1a1c28]/95 mt-[-1px]"})]})]})})}),(0,a.jsx)("div",{className:"relative z-20 flex-1 flex flex-col items-center justify-start p-4 md:p-6 pointer-events-none w-full",children:(0,a.jsxs)("div",{className:"w-full max-w-[800px] flex items-center justify-between px-4 sm:px-6 py-3 rounded-xl bg-gradient-to-r from-[#0d0f14]/90 via-[#151821]/95 to-[#0d0f14]/90 backdrop-blur-xl border border-white/10 shadow-[0_10px_40px_rgba(0,0,0,0.8)] pointer-events-auto",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 flex-1 min-w-0 pr-2",children:[(0,a.jsx)("img",{src:p,alt:e,className:"w-8 h-8 md:w-12 md:h-12 object-contain drop-shadow-lg shrink-0",onError:t=>t.target.src=i(e),loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-slate-900 text-xs sm:text-sm md:text-base font-bold truncate tracking-wide",children:e})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1 shrink-0 px-2 sm:px-6 min-w-[100px]",children:[(0,a.jsxs)("span",{className:`inline-flex items-center gap-1.5 px-2.5 py-0.5 rounded-full text-[10px] sm:text-xs font-bold shadow-inner ${x?"bg-green-500/10 text-green-400 border border-green-500/20":"bg-white/5 text-slate-900/40"}`,children:[x&&(0,a.jsx)("span",{className:"w-1.5 h-1.5 rounded-full bg-green-500 animate-pulse shadow-[0_0_8px_#22c55e]"}),d||c]}),(0,a.jsxs)("div",{className:"flex gap-3 sm:gap-5 items-center justify-center",children:[(0,a.jsx)("span",{className:"text-slate-900 text-2xl sm:text-4xl font-black drop-shadow-md",children:r}),(0,a.jsx)("span",{className:"text-slate-900/30 text-xl font-light",children:"-"}),(0,a.jsx)("span",{className:"text-slate-900 text-2xl sm:text-4xl font-black drop-shadow-md",children:n})]})]}),(0,a.jsxs)("div",{className:"flex items-center justify-end gap-3 flex-1 min-w-0 pl-2 text-right",children:[(0,a.jsx)("span",{className:"text-slate-900 text-xs sm:text-sm md:text-base font-bold truncate tracking-wide",children:t}),(0,a.jsx)("img",{src:u,alt:t,className:"w-8 h-8 md:w-12 md:h-12 object-contain drop-shadow-lg shrink-0",onError:e=>e.target.src=i(t),loading:"lazy",decoding:"async"})]})]})}),(0,a.jsx)("div",{className:"relative z-20 mt-auto w-full p-4 flex justify-center pointer-events-none",children:(0,a.jsx)("div",{className:"w-full max-w-[600px] h-6 bg-white/40 backdrop-blur-md rounded-full border border-white/5 flex items-center px-4",children:(0,a.jsxs)("div",{className:"flex-1 h-0.5 bg-white/10 relative rounded-full",children:[x&&(0,a.jsx)("div",{className:"absolute left-0 top-0 bottom-0 bg-gradient-to-r from-[#b38b22] to-[#ffda6a] w-[65%] rounded-full opacity-90 shadow-[0_0_12px_#daa520]"}),(0,a.jsx)("span",{className:"absolute left-[65%] top-1/2 -translate-y-1/2 -translate-x-1/2 w-1.5 h-1.5 rounded-full bg-white shadow-md"})]})})}),(0,a.jsx)("style",{children:`
648                @keyframes ballMove {
649                    0% { transform: translate(-30%, -20%) scale(1); }
650                    25% { transform: translate(40%, -10%) scale(1.1); }
651                    50% { transform: translate(20%, 30%) scale(0.9); }
652                    75% { transform: translate(-10%, 15%) scale(1.2); }
653                    100% { transform: translate(-45%, 0%) scale(1); }
654                }
655                @keyframes floatBubble {
656                    0% { transform: translateY(0px) translateX(0px); }
657                    50% { transform: translateY(-8px) translateX(4px); }
658                    100% { transform: translateY(4px) translateX(-4px); }
659                }
660            `})]})}function c(e,t){if("1"===t||"2"===t)switch(e){case"2":return{t:"HT 1",live:!0,sc:!0};case"3":return{t:"Giữa giờ",live:!0,sc:!0};case"4":return{t:"HT 2",live:!0,sc:!0};case"5":return{t:"Hiệp phụ",live:!0,sc:!0};case"7":return{t:"Penalty",live:!0,sc:!0};case"8":case"9":return{t:"Kết th\xfac",live:!1,sc:!0};default:return{t:"Chưa bắt đầu",live:!1,sc:!1}}
660return["51","52","53","54","55"].includes(e)?{t:`Set ${e-50}`,live:!0,sc:!0}:["100","90","110"].includes(e)?{t:"KT",live:!1,sc:!0}:"0"===e||"1"===e?{t:"Chưa bắt đầu",live:!1,sc:!1}:{t:"LIVE",live:!0,sc:!0}}function d(e){let t=(e||"").split(/[\s-]+/).slice(0,2).map(e=>e[0]||"").join("").toUpperCase()||"??";return`data:image/svg+xml,${encodeURIComponent(`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 80 80"><rect width="80" height="80" rx="20" fill="#1a1c25"/><text x="40" y="47" font-size="20" font-family="Arial" font-weight="700" text-anchor="middle" fill="#666">${t}</text></svg>`)}`}function x(e){let t=new Date(1e3*parseInt(e||"0",10));return{hm:t.toLocaleTimeString("vi-VN",{hour:"2-digit",minute:"2-digit",timeZone:"Asia/Ho_Chi_Minh"}),dm:t.toLocaleDateString("vi-VN",{day:"2-digit",month:"2-digit",timeZone:"Asia/Ho_Chi_Minh"}),full:t.toLocaleDateString("vi-VN",{day:"2-digit",month:"2-digit",year:"numeric",timeZone:"Asia/Ho_Chi_Minh"})}}let h="max-w-[1200px]";function m({matchData:e,relatedMatches:t,matchDetails:s,standings:r,brandingNameUpper:i}){let p,u,g,j,v,y,[C,S]=(0,l.useState)("odds"),L=e?.match_data?.anchors||[],[$,F]=(0,l.useState)(!1),[T,A]=(0,l.useState)(!1),[M,H]=(0,l.useState)(null),[D,B]=(0,l.useState)(!1),z=(0,l.useRef)(0);(0,l.useEffect)(()=>{if(!e?.has_live||"1"!==e.has_live||0===L.length)return;let t=!1;B(!0);let s=async t=>{let s=t?.uid,a=`/api/socolive/proxy-stream?url=${encodeURIComponent(`https://live.inplyr.com/${s?`room/${s}`:`default/${e.id}`}.m3u8`)}`;try{let e=await fetch(a,{method:"GET",cache:"no-store"});if(!e.ok)return null;let s=(await e.text()).split("\n").filter(e=>e.trim()&&!e.startsWith("#"));if(0===s.length)return null;return(await fetch(s[0],{method:"HEAD",cache:"no-store"})).ok?t:null}catch{return null}};return Promise.all(L.map(e=>s(e))).then(e=>{if(t)return;let s=e.find(e=>null!==e);s?(H(s),F(!0),A(!1)):(H(L[0]),A(!0)),B(!1)}),()=>{t=!0}},[e?.has_live,L.length]),(0,l.useEffect)(()=>{if(!T||D||z.current>=20)return;let t=setTimeout(()=>{z.current++,A(!1),B(!0);let t=async t=>{let s=t?.uid,a=`/api/socolive/proxy-stream?url=${encodeURIComponent(`https://live.inplyr.com/${s?`room/${s}`:`default/${e.id}`}.m3u8`)}`;try{let e=await fetch(a,{method:"GET",cache:"no-store"});if(!e.ok)return null;let s=(await e.text()).split("\n").filter(e=>e.trim()&&!e.startsWith("#"));if(0===s.length)return null;return(await fetch(s[0],{method:"HEAD",cache:"no-store"})).ok?t:null}catch{return null}};Promise.all(L.map(e=>t(e))).then(e=>{let t=e.find(e=>null!==e);t?(H(t),F(!0),A(!1)):A(!0),B(!1)})},15e3);return()=>clearTimeout(t)},[T,D]);let[I,R]=(0,l.useState)(null),U=e?.post_name||e?.ls_id||e?.id;if(window.location.origin,(0,l.useEffect)(()=>{if(!U)return;let e=setInterval(async()=>{try{let e=await fetch(`/api/klivevip/match/${U}`,{cache:"no-store"});if(e.ok){let t=await e.json();R(t?.match??null)}}catch{}},1e4);return()=>clearInterval(e)},[U]),!e)return(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center py-32 gap-4",children:[(0,a.jsx)("span",{className:"text-[#64748B] text-lg",children:"Kh\xf4ng t\xecm thấy trận đấu"}),(0,a.jsx)("a",{href:"/",className:"text-[#4681E8] hover:underline text-sm",children:"← Quay lại"})]});let G=I?{...e,...I}:e,P=G?.has_live==="1"&&L.length>0,K=c(G.status_id,G.sport_id),V=$&&M&&!T&&!D,W=P&&(D||T&&K.live&&z.current<20),O=!P||T&&!W&&!D,q=!K.live&&"8"!==String(G.status_id)&&"9"!==String(G.status_id),{hm:X,full:Y}=x(G.time),Z=G.source_card_meta?.league_label||G.match_data?.competition_vi||G.match_data?.competition_full||"",Q=G.match_data?.stage_label||G.source_card_meta?.stage_label||"",J=G.home_logo||d(G.home_name),ee=G.away_logo||d(G.away_name),et=e=>t=>{t.target.src=d(e)};return(0,a.jsxs)("div",{className:"w-full bg-white min-h-screen text-slate-600 font-sans pb-16",children:[(0,a.jsx)("div",{className:"w-full border-b border-slate-200 bg-white",children:(0,a.jsxs)("div",{className:`${h} mx-auto px-4 py-3 flex items-center justify-between`,children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 text-[13px] font-bold",children:[(0,a.jsx)("span",{className:"text-[#4681E8] uppercase tracking-wide",children:Z}),Q&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"text-slate-300",children:"•"}),(0,a.jsx)("span",{className:"text-slate-600",children:Q})]})]}),(0,a.jsx)("div",{className:"text-[12px] font-mono text-slate-400 hidden sm:block",children:Y})]})}),(0,a.jsxs)("div",{className:`${h} mx-auto px-0 md:px-4 py-0 md:py-6 flex flex-col lg:flex-row gap-4 lg:gap-6`,children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0 flex flex-col gap-4 lg:gap-6",children:[(0,a.jsxs)("div",{className:"w-full relative bg-[#000000] rounded-none md:rounded-2xl overflow-hidden shadow-[0_10px_40px_rgba(0,0,0,0.5)] border-y md:border border-slate-200",children:[(0,a.jsx)("div",{className:"relative w-full aspect-video bg-[#000000] group z-10",children:V?(0,a.jsx)(n,{src:`/api/klivevip/proxy-stream?url=${encodeURIComponent(`https://live.inplyr.com/${M?.uid&&"default"!==M.uid?`room/${M.uid}`:`default/${G.id}`}.m3u8`)}`,autoPlay:!0,onError:()=>A(!0)}):O?(0,a.jsx)(o,{homeName:G.home_name,awayName:G.away_name,homeLogo:G.home_logo,awayLogo:G.away_logo,homeScore:K.sc?G.home_score:"0",awayScore:K.sc?G.away_score:"0",statusText:K.t,timeText:G.time_text||X,isLive:K.live,sportId:G.sport_id,matchId:G.ls_id||G.id,kickoffMs:1e3*Number(G?.time||0),isPreMatch:q}):(0,a.jsxs)("div",{className:"absolute inset-0 z-10 flex flex-col items-center justify-center p-4 lg:p-10",children:[(0,a.jsxs)("div",{className:"absolute inset-0 flex justify-between items-center opacity-[0.03] pointer-events-none px-4 lg:px-20 overflow-hidden",children:[(0,a.jsx)("img",{src:J,alt:"",className:"w-1/2 max-w-[400px] blur-[10px]",loading:"lazy",decoding:"async"}),(0,a.jsx)("img",{src:ee,alt:"",className:"w-1/2 max-w-[400px] blur-[10px]",loading:"lazy",decoding:"async"})]}),P&&!T&&(0,a.jsx)("button",{onClick:()=>F(!0),className:"group mb-4 sm:mb-8 w-16 h-16 md:w-20 md:h-20 rounded-full bg-[#4681E8] flex items-center justify-center hover:bg-[#55CAF1] transition-all shadow-[0_0_30px_rgba(70,129,232,0.5)] curs
660or-pointer z-20",children:(0,a.jsx)("svg",{className:"w-8 h-8 md:w-10 md:h-10 text-white ml-1.5 md:ml-2 group-hover:scale-110 transition-transform",viewBox:"0 0 24 24",fill:"currentColor",children:(0,a.jsx)("path",{d:"M8 5v14l11-7z"})})}),(0,a.jsxs)("div",{className:"grid grid-cols-[1fr_auto_1fr] items-center w-full max-w-[800px] gap-2 lg:gap-8 z-20",children:[(0,a.jsxs)("div",{className:"flex flex-col items-center gap-2 lg:gap-4",children:[(0,a.jsx)("img",{src:J,alt:G.home_name,className:"w-16 h-16 sm:w-24 sm:h-24 lg:w-32 lg:h-32 object-contain drop-shadow-[0_10px_20px_rgba(0,0,0,0.8)]",onError:et(G.home_name),loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-[#FFFFFF] text-xs sm:text-base lg:text-lg font-black text-center line-clamp-2 uppercase tracking-wide",children:G.home_name})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-2 lg:gap-3",children:[K.sc?(0,a.jsxs)("div",{className:"flex items-center gap-3 lg:gap-6 bg-white/90 backdrop-blur-md px-4 py-2 lg:px-8 lg:py-4 rounded-2xl border border-slate-200 shadow-2xl",children:[(0,a.jsx)("span",{className:"text-[#4681E8] text-[32px] sm:text-[48px] lg:text-[64px] font-black leading-none",children:G.home_score}),(0,a.jsx)("span",{className:"text-slate-300 text-[20px] lg:text-[28px] font-light",children:":"}),(0,a.jsx)("span",{className:"text-[#4681E8] text-[32px] sm:text-[48px] lg:text-[64px] font-black leading-none",children:G.away_score})]}):(0,a.jsx)("div",{className:"text-[#FFFFFF] text-[32px] sm:text-[48px] lg:text-[56px] font-black tracking-widest leading-none drop-shadow-xl",children:X}),(0,a.jsxs)("span",{className:`inline-flex items-center gap-2 rounded-full px-3 py-1 lg:px-5 lg:py-1.5 text-[10px] lg:text-[12px] font-bold tracking-widest uppercase ${K.live?"bg-[#4681E8] text-white shadow-[0_0_20px_rgba(70,129,232,0.6)]":"bg-white text-slate-600 border border-slate-200"}`,children:[K.live&&(0,a.jsx)("span",{className:"w-2 h-2 rounded-full bg-white animate-pulse"}),K.t,G.time_text?` : ${G.time_text}`:""]})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-2 lg:gap-4",children:[(0,a.jsx)("img",{src:ee,alt:G.away_name,className:"w-16 h-16 sm:w-24 sm:h-24 lg:w-32 lg:h-32 object-contain drop-shadow-[0_10px_20px_rgba(0,0,0,0.8)]",onError:et(G.away_name),loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-[#FFFFFF] text-xs sm:text-base lg:text-lg font-black text-center line-clamp-2 uppercase tracking-wide",children:G.away_name})]})]})]})}),L.length>0&&(0,a.jsxs)("div",{className:"w-full bg-white border-t border-slate-200 px-3 lg:px-6 py-2.5 lg:py-4 flex items-center gap-2 lg:gap-4 overflow-x-auto z-20",children:[(0,a.jsx)("span",{className:"text-[10px] lg:text-[11px] text-slate-600 uppercase font-bold tracking-widest shrink-0 mr-1 lg:mr-2",children:"CHỌN K\xcaNH TRUYỀN:"}),L.map((e,t)=>(0,a.jsxs)("button",{onClick:()=>{H(e),F(!0),A(!1)},className:`shrink-0 flex items-center gap-1.5 lg:gap-2 rounded-full px-3 py-1.5 lg:px-5 lg:py-2 text-[11px] lg:text-[13px] font-bold transition-all ${M?.uid===e.uid&&!T?"bg-[#4681E8]/10 border border-[#4681E8] text-[#4681E8] shadow-[0_0_15px_rgba(70,129,232,0.2)]":"bg-white border border-slate-200 text-slate-600 hover:text-[#4681E8] hover:border-[#4681E8]/50"}`,children:[(0,a.jsx)("span",{className:`w-1.5 h-1.5 lg:w-2 lg:h-2 rounded-full ${M?.uid===e.uid&&!T?"bg-[#4681E8] animate-pulse":"bg-transparent"}`}),"BLV ",e.nickName||`K\xeanh ${t+1}`]},e.uid||t))]})]}),(p=(()=>{let e=s?.stats;if(!e)return!1;let t=null;return Array.isArray(e)&&e.length>0?t=e[0]:e?.results?.[0]?t=e.results[0]:e?.stats_full_time&&(t=e),!!t&&!!(t.stats_full_time?.length>0||t.stats_haft_time?.length>0||t.stats_half_time?.length>0||t.stats?.length>0)})(),u=!!(s?.lineup&&(Array.isArray(s.lineup)?s.lineup.length>0:s.lineup.home||s.lineup.away)),g=!!(s?.events&&(Array.isArray(s.events)?s.events.length>0:s.events.incidents?.length>0||s.events.data?.length>0)),j=!!(r&&(Array.isArray(r)?r.length>0:r.data?.length>0)),(y=(v=[{id:"stats",label:"THỐNG K\xca",show:p},{id:"lineup",label:"ĐỘI H\xccNH",show:u},{id:"events",label:"DIỄN BIẾN",show:g},{id:"standings",label:"BẢNG XH",show:j},{id:"odds",label:"TỶ LỆ K\xc8O",show:!!(s?.odds&&Array.isArray(s.odds)&&s.odds.length>0)}].filter(e=>e.show)).find(e=>e.id===C)?C:v[0]?.id||"odds")!==C&&setTimeout(()=>S(y),0),v.length>0?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"bg-white rounded-2xl p-2 border border-slate-200 flex overflow-x-auto gap-2 shadow-[0_4px_15px_rgba(0,0,0,0.08)] mx-4 md:mx-0",children:v.map(({id:e,label:t})=>(0,a.jsx)("button",{onClick:()=>S(e),className:`flex-1 min-w-[100px] py-2.5 sm:py-3 text-[10px] sm:text-[12px] font-black uppercase tracking-widest rounded-xl transition-all ${y===e?"bg-[#4681E8]/10 text-[#4681E8] border border-[#4681E8]/30 shadow-inner":"text-slate-500 hover:text-[#4681E8] hover:bg-[#4681E8]/5 border border-transparent"}`,children:t},e))}),(0,a.jsxs)("div",{className:"bg-white rounded-2xl border border-slate-200 overflow-hidden shadow-[0_4px_15px_rgba(0,0,0,0.08)] min-h-[400px] mx-4 md:mx-0",children:["stats"===y&&(0,a.jsx)(b,{matchDetails:s}),"lineup"===y&&(0,a.jsx)(f,{matchDetails:s}),"events"===y&&(0,a.jsx)(_,{events:s?.events}),"standings"===y&&(0,a.jsx)(k,{standings:r}),"odds"===y&&(0,a.jsx)(E,{odds:s?.odds})]})]}):null),t.length>0&&(0,a.jsxs)("div",{className:"mt-4 mx-4 md:mx-0",children:[(0,a.jsxs)("h2",{className:"px-1 py-4 text-sm sm:text-base font-black text-slate-800 uppercase flex items-center gap-3 tracking-widest border-b border-slate-100 mb-4",children:[(0,a.jsx)("span",{className:"w-1 h-5 bg-[#4681E8] rounded-sm shadow-[0_0_8px_#4681E8]"}),"TRẬN ĐẤU C\xd9NG GIẢI"]}),(0,a.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3 sm:gap-4",children:t.slice(0,4).map(e=>(0,a.jsx)(w,{m:e},e.id))})]})]}),(0,a.jsx)("div",{className:"w-full lg:w-[350px] xl:w-[400px] shrink-0 px-4 md:px-0",children:(0,a.jsxs)("div",{className:"bg-white border border-slate-200 rounded-2xl overflow-hidden flex flex-col shadow-[0_10px_30px_rgba(0,0,0,0.1)] lg:sticky lg:top-8 h-[600px] lg:h-[c
660alc(100vh-100px)] lg:max-h-[850px]",children:[(0,a.jsxs)("div",{className:"px-5 py-4 border-b border-slate-200 flex items-center justify-between bg-white",children:[(0,a.jsxs)("h3",{className:"text-slate-800 text-sm font-black uppercase tracking-widest flex items-center gap-2",children:[(0,a.jsx)("span",{className:"w-2.5 h-2.5 rounded-full bg-[#4681E8] shadow-[0_0_10px_rgba(70,129,232,0.4)]"}),"PH\xd2NG CHAT"]}),(0,a.jsxs)("span",{className:"text-[10px] bg-white px-3 py-1.5 rounded-full text-[#4681E8] font-mono border border-[#4681E8]/30 shadow-inner tracking-widest flex items-center gap-1.5",children:[(0,a.jsx)("svg",{className:"w-3 h-3",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 10l4.553-2.276A1 1 0 0121 8.618v6.764a1 1 0 01-1.447.894L15 14M5 18h8a2 2 0 002-2V8a2 2 0 00-2-2H5a2 2 0 00-2 2v8a2 2 0 002 2z"})}),L.length," BLV"]})]}),(0,a.jsx)("div",{className:"flex-1 bg-[#FFFFFF]/40 min-h-0 chat-container-wrapper",children:(0,a.jsx)(N,{anchors:L,selectedAnchor:M})})]})})]})]})}let p={25:"KIỂM SO\xc1T B\xd3NG",24:"CHUYỀN CH\xcdNH X\xc1C",23:"TỔNG SỐ ĐƯỜNG CHUYỀN",22:"TẤN C\xd4NG",21:"T.C\xd4NG NGUY HIỂM",2:"S\xdaT TR\xdaNG Đ\xcdCH",37:"PHẠT G\xd3C",28:"N\xc9M BI\xcaN",8:"VIỆT VỊ",3:"THẺ V\xc0NG",4:"THẺ ĐỎ",5:"S\xdaT PENALTY",29:"PHẠM LỖI",26:"Đ\xc1NH ĐẦU",27:"CỨU THUA",1:"B\xc0N THẮNG",7:"PHẢN LƯỚI"},u=[25,21,22,24,2,23,4,3,37,28,8,5,29],g="https://cdn.sportdb.live/upload/team/";function b({matchDetails:e}){let[t,s]=(0,l.useState)("full"),r=e?.stats,n=e?.lineup,i=n?.match?.home_team,o=n?.match?.away_team,c=null;Array.isArray(r)&&r.length>0?c=r[0]:r?.results?.[0]?c=r.results[0]:r?.stats_full_time&&(c=r);let d={full:c?.stats_full_time||[],h1:c?.stats_haft_time||c?.stats_half_time||[],h2:c?.stats_haft_time_2nd_half||[]}[t]||[];if(!c||0===d.length)return(0,a.jsx)(j,{text:"Thống k\xea sẽ được cập nhật khi trận đấu bắt đầu"});let x=[...d].sort((e,t)=>{let s=u.indexOf(e.type),a=u.indexOf(t.type);return(-1===s?999:s)-(-1===a?999:a)});return(0,a.jsxs)("div",{className:"flex flex-col",children:[(i||o)&&(0,a.jsxs)("div",{className:"flex items-center justify-between px-4 py-3 border-b border-slate-100",children:[(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5 w-20",children:[i?.logo&&(0,a.jsx)("img",{src:g+i.logo,alt:i?.name||"Home team",className:"w-8 h-8 object-contain",onError:e=>e.target.style.display="none",loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-slate-600 text-[10px] font-medium text-center leading-tight",children:i?.name||""})]}),(0,a.jsx)("div",{className:"flex gap-1",children:[{k:"h1",l:"Hiệp 1"},{k:"h2",l:"Hiệp 2"},{k:"full",l:"Cả trận"}].map(({k:e,l})=>(0,a.jsx)("button",{onClick:()=>s(e),className:`px-2.5 py-1 text-[10px] font-bold rounded transition-all ${t===e?"bg-[#E11D48] text-white":"text-slate-400 hover:text-slate-600 bg-slate-100"}`,children:l},e))}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5 w-20",children:[o?.logo&&(0,a.jsx)("img",{src:g+o.logo,alt:o?.name||"Away team",className:"w-8 h-8 object-contain",onError:e=>e.target.style.display="none",loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-slate-600 text-[10px] font-medium text-center leading-tight",children:o?.name||""})]})]}),(0,a.jsx)("div",{className:"px-4 py-3 space-y-3",children:x.map(e=>{let t=p[e.type]||`Stat ${e.type}`,s=e.home,l=e.away,r=24===e.type||25===e.type,n=s+l,i=0===n?50:s/n*100,o=s>l,c=l>s;return(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"flex justify-between items-center mb-1.5",children:[(0,a.jsxs)("span",{className:`text-xs font-bold w-10 tabular-nums ${o?"text-slate-800":"text-slate-400"}`,children:[s,r?"%":""]}),(0,a.jsx)("span",{className:"text-slate-400 text-[10px] font-semibold tracking-wide uppercase",children:t}),(0,a.jsxs)("span",{className:`text-xs font-bold w-10 text-right tabular-nums ${c?"text-slate-800":"text-slate-400"}`,children:[l,r?"%":""]})]}),(0,a.jsxs)("div",{className:"flex gap-0.5 h-[5px]",children:[(0,a.jsx)("div",{className:"flex-1 rounded-l-full bg-white/[0.06] overflow-hidden flex justify-end",children:(0,a.jsx)("div",{className:`rounded-l-full transition-all duration-500 ${o?"bg-gradient-to-r from-[#E11D48]/60 to-[#E11D48]":"bg-gradient-to-r from-white/10 to-white/20"}`,style:{width:`${i}%`}})}),(0,a.jsx)("div",{className:"flex-1 rounded-r-full bg-white/[0.06] overflow-hidden",children:(0,a.jsx)("div",{className:`rounded-r-full transition-all duration-500 ${c?"bg-gradient-to-l from-[#E11D48]/60 to-[#E11D48]":"bg-gradient-to-l from-white/10 to-white/20"}`,style:{width:`${100-i}%`}})})]})]},e.type)})})]})}
660function f({matchDetails:e}){let[t,s]=(0,l.useState)("pitch"),r=e?.lineup,n=r?.lineup||r,i=n?.home||[],o=n?.away||[],c=r?.home_formation||"",d=r?.away_formation||"",x=r?.match?.home_team,h=r?.match?.away_team;if(0===i.length&&0===o.length)return(0,a.jsx)(j,{text:"Đội h\xecnh sẽ được c\xf4ng bố trước trận đấu 30 ph\xfat"});let m=e=>e.filter(e=>1===e.first),p=e=>e.filter(e=>1!==e.first),u=m(i),g=m(o),b=p(i),w=p(o);return(0,a.jsxs)("div",{className:"flex flex-col",children:[(0,a.jsxs)("div",{className:"flex items-center justify-center gap-1 px-3 py-2 border-b border-slate-100",children:[(0,a.jsx)("button",{onClick:()=>s("pitch"),className:`px-3 py-1.5 text-[10px] font-bold rounded transition-all ${"pitch"===t?"bg-[#E11D48] text-white":"text-slate-400 bg-slate-100"}`,children:"Đội h\xecnh xuất ph\xe1t"}),(0,a.jsx)("button",{onClick:()=>s("list"),className:`px-3 py-1.5 text-[10px] font-bold rounded transition-all ${"list"===t?"bg-[#E11D48] text-white":"text-slate-400 bg-slate-100"}`,children:"Đội h\xecnh dá»± bị"})]}),"pitch"===t?(0,a.jsx)("div",{className:"relative w-full",style:{aspectRatio:"68/105"},children:(0,a.jsxs)("div",{className:"absolute inset-0 bg-gradient-to-b from-[#1a5c2a] via-[#1e6b31] to-[#1a5c2a] rounded-2xl overflow-hidden",children:[(0,a.jsxs)("div",{className:"absolute inset-[3%] border border-white/20 rounded-lg",children:[(0,a.jsx)("div",{className:"absolute left-0 right-0 top-1/2 h-px bg-white/20"}),(0,a.jsx)("div",{className:"absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 w-[22%] aspect-square rounded-full border border-white/20"}),(0,a.jsx)("div",{className:"absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 w-1.5 h-1.5 bg-white/30 rounded-full"}),(0,a.jsx)("div",{className:"absolute top-0 left-1/2 -translate-x-1/2 w-[55%] h-[16%] border-l border-r border-white/20"}),(0,a.jsx)("div",{className:"absolute top-0 left-1/2 -translate-x-1/2 w-[25%] h-[6%] border-l border-r border-white/20"}),(0,a.jsx)("div",{className:"absolute bottom-0 left-1/2 -translate-x-1/2 w-[55%] h-[16%] border-t border-l border-r border-white/20"}),(0,a.jsx)("div",{className:"absolute bottom-0 left-1/2 -translate-x-1/2 w-[25%] h-[6%] border-t border-l border-r border-white/20"})]}),(0,a.jsx)("div",{className:"absolute top-1 left-2 text-[9px] text-[#F8FAFC]/50 font-bold z-10",children:x?.name||""}),(0,a.jsx)("div",{className:"absolute top-1 right-2 text-[9px] text-[#E11D48]/70 font-bold z-10",children:c}),(0,a.jsx)("div",{className:"absolute bottom-1 left-2 text-[9px] text-[#F8FAFC]/50 font-bold z-10",children:h?.name||""}),(0,a.jsx)("div",{className:"absolute bottom-1 right-2 text-[9px] text-[#E11D48]/70 font-bold z-10",children:d}),u.map((e,t)=>{let s=`${e.x||50}%`,l=`${(e.y||10)/2}%`,r="G"===e.position;return(0,a.jsxs)("div",{className:"absolute flex flex-col items-center z-10 -translate-x-1/2 -translate-y-1/2",style:{left:s,top:l},children:[(0,a.jsx)("div",{className:`w-6 h-6 rounded-full flex items-center justify-center text-[9px] font-black ${r?"bg-yellow-400 text-black":"bg-blue-600 text-[#F8FAFC]"} shadow-md border border-white/20`,children:e.shirt_number||""}),(0,a.jsx)("span",{className:"text-[7px] text-[#F8FAFC] font-semibold mt-0.5 text-center max-w-[48px] truncate drop-shadow-[0_1px_2px_rgba(0,0,0,0.8)]",children:(e.name||"").split(" ").slice(-2).join(" ")}),1===e.captain&&(0,a.jsx)("span",{className:"absolute -top-1 -right-1 text-[6px] text-yellow-400",children:"C"})]},`h-${t}`)}),g.map((e,t)=>{let s=`${100-(e.x||50)}%`,l=`${100-(e.y||10)/2}%`,r="G"===e.position;return(0,a.jsxs)("div",{className:"absolute flex flex-col items-center z-10 -translate-x-1/2 -translate-y-1/2",style:{left:s,top:l},children:[(0,a.jsx)("div",{className:`w-6 h-6 rounded-full flex items-center justify-center text-[9px] font-black ${r?"bg-yellow-400 text-black":"bg-orange-500 text-[#F8FAFC]"} shadow-md border border-white/20`,children:e.shirt_number||""}),(0,a.jsx)("span",{className:"text-[7px] text-[#F8FAFC] font-semibold mt-0.5 text-center max-w-[48px] truncate drop-shadow-[0_1px_2px_rgba(0,0,0,0.8)]",children:(e.name||"").split(" ").slice(-2).join(" ")}),1===e.captain&&(0,a.jsx)("span",{className:"absolute -top-1 -right-1 text-[6px] text-yellow-400",children:"C"})]},`a-${t}`)})]})}):(0,a.jsxs)("div",{className:"px-3 py-2 text-xs",children:[(0,a.jsxs)("div",{className:"flex justify-between font-bold text-slate-400 mb-1 uppercase tracking-wider text-[9px] px-1",children:[(0,a.jsx)("span",{children:"Đội chá»
660§ nh\xe0"}),(0,a.jsx)("span",{children:"Đội kh\xe1ch"})]}),Array.from({length:Math.max(b.length,w.length)}).map((e,t)=>{let s=b[t],l=w[t];return(0,a.jsxs)("div",{className:"flex justify-between items-center border-b border-slate-50 py-1.5",children:[(0,a.jsx)("div",{className:"flex items-center gap-1.5 w-1/2 min-w-0",children:s&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"text-[#E11D48] font-bold w-5 text-center shrink-0 text-[10px]",children:s.shirt_number||""}),(0,a.jsx)("span",{className:"text-slate-700 truncate text-[11px]",children:s.name||""})]})}),(0,a.jsx)("div",{className:"flex items-center gap-1.5 w-1/2 justify-end min-w-0",children:l&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"text-slate-700 truncate text-[11px] text-right",children:l.name||""}),(0,a.jsx)("span",{className:"text-[#E11D48] font-bold w-5 text-center shrink-0 text-[10px]",children:l.shirt_number||""})]})})]},t)})]})]})}function j({text:e}){return(0,a.jsx)("div",{className:"flex items-center justify-center py-10 text-slate-400 text-sm text-center",children:e})}function w({m:e}){let t=c(e.status_id,e.sport_id),{hm:s,dm:l}=x(e.time),r=e.source_card_meta?.league_label||e.match_data?.competition_vi||"";return(0,a.jsxs)("a",{href:`/match/${encodeURIComponent(e.post_name||e.id)}`,className:"flex items-center gap-3 rounded-2xl bg-white hover:bg-slate-50 border border-slate-100 hover:border-[#4681E8]/30 p-3 transition-all group",children:[(0,a.jsxs)("div",{className:"shrink-0 w-14 text-center",children:[(0,a.jsx)("div",{className:"text-[#E11D48] text-[11px] font-bold",children:s}),(0,a.jsx)("div",{className:"text-slate-400 text-[9px]",children:l})]}),(0,a.jsx)("div",{className:"w-px h-9 bg-slate-200 shrink-0"}),(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("div",{className:"text-slate-400 text-[9px] truncate mb-1",children:r}),(0,a.jsxs)("div",{className:"flex items-center gap-2 mb-0.5",children:[(0,a.jsx)("img",{src:e.home_logo||d(e.home_name),alt:e.home_name,className:"w-4 h-4 object-contain shrink-0",onError:t=>t.target.src=d(e.home_name),loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-slate-600 text-[12px] font-medium truncate",children:e.home_name})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("img",{src:e.away_logo||d(e.away_name),alt:e.away_name,className:"w-4 h-4 object-contain shrink-0",onError:t=>t.target.src=d(e.away_name),loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-slate-600 text-[12px] font-medium truncate",children:e.away_name})]})]}),t.sc?(0,a.jsxs)("span",{className:"text-slate-800 font-bold text-[14px] tabular-nums shrink-0",children:[e.home_score,"-",e.away_score]}):(0,a.jsx)("span",{className:"text-[10px] font-bold text-[#E11D48] bg-[#E11D48]/10 rounded px-2.5 py-1 group-hover:bg-[#E11D48]/15 transition shrink-0",children:"XEM NGAY"})]})}let v={0:{bg:"bg-white/10",text:"text-[#F8FAFC]/40",nameCls:"text-[#94A3B8]"},1:{bg:"bg-white/10",text:"text-[#F8FAFC]/50",nameCls:"text-[#94A3B8]"},2:{bg:"bg-green-900/50",text:"text-green-400",nameCls:"text-green-400"},3:{bg:"bg-yellow-900/40",text:"text-yellow-400",nameCls:"text-emerald-600 font-bold"},4:{bg:"bg-blue-900/40",text:"text-blue-400",nameCls:"text-blue-400 font-bold"},5:{bg:"bg-red-900/40",text:"text-red-400",nameCls:"text-red-400 font-bold"}};function N({anchors:e,selectedAnchor:t}){let[s,r]=(0,l.useState)([]),[n,i]=(0,l.useState)(!1),o=(0,l.useRef)(null),c=(0,l.useRef)(null),d=t?.roomNum;return(0,l.useEffect)(()=>{if(!d)return;r([]),i(!1);let e=new EventSource(`/api/chat/${d}`);return e.onopen=()=>i(!0),e.onmessage=e=>{try{let t=JSON.parse(e.data);if("connected"===t.type)return void i(!0);if("history"===t.type&&Array.isArray(t.messages))return void r(e=>[...t.messages,...e].slice(-200));t.user&&t.text&&r(e=>[...e,t].slice(-200))}catch{}},e.onerror=()=>i(!1),()=>{e.close(),i(!1)}},[d]),(0,l.useEffect)(()=>{requestAnimationFrame(()=>{let e=c.current;e&&(e.scrollTop=e.scrollHeight)})},[s.length]),(0,a.jsxs)("div",{className:"flex flex-col h-full bg-[#0F0F23]",children:[(0,a.jsxs)("div",{ref:c,className:"flex-1 min-h-0 px-3 py-2 flex flex-col gap-[3px] overflow-y-auto",style:{scrollbarWidth:"thin",scrollbarColor:"#444 transparent"},children:[(0,a.jsx)("div",{className:"text-center text-[10px] text-[#F8FAFC]/30 bg-slate-50/60 py-1.5 rounded-xl mb-1 sticky top-0 z-10 backdrop-blur-sm",children:n?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"inline-block h-1.5 w-1.5 rounded-full bg-green-400 animate-pulse mr-1"}),"Đang kết nối ph\xf2ng chat trá»±c tiếp"]}):d?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"inline-block h-1.5 w-1.5 rounded-full bg-yellow-400 animate-pulse mr-1"}),"Đang kết nối..."]}
660):"Ch\xe0o mừng bạn đến với ph\xf2ng chat"}),0===s.length&&n&&(0,a.jsx)("div",{className:"text-center text-[10px] text-[#F8FAFC]/20 py-4",children:"Chờ tin nhắn mới..."}),s.map((e,t)=>{var s;let l=(s=e.level)>=5?v[5]:v[s]||v[0];return 2===e.type||e.text?.includes("v\xe0o ph\xf2ng tr\xf2 chuyện")?(0,a.jsxs)("div",{className:"flex items-start gap-1.5 text-[11px] leading-relaxed py-[1px] opacity-60",children:[(0,a.jsx)("span",{className:"text-green-500/70 font-medium",children:"Hi"}),(0,a.jsxs)("span",{className:`shrink-0 inline-flex items-center px-1 py-[0.5px] rounded text-[8px] font-bold ${l.bg} ${l.text}`,children:["Lv",e.level]}),(0,a.jsxs)("span",{className:`font-bold ${l.nameCls}`,children:[e.user,":"]}),(0,a.jsx)("span",{className:"text-[#F8FAFC]/40",children:e.text})]},`${e.ts}-${t}`):(0,a.jsxs)("div",{className:"flex items-start gap-1.5 text-[11px] leading-relaxed py-[1px]",children:[(0,a.jsxs)("span",{className:`shrink-0 inline-flex items-center px-1 py-[0.5px] rounded text-[8px] font-bold ${l.bg} ${l.text}`,children:["Lv.",e.level]}),(0,a.jsxs)("span",{className:`font-bold shrink-0 ${l.nameCls}`,children:[e.user,":"]}),(0,a.jsx)("span",{className:"text-[#F8FAFC]/80 break-words min-w-0",children:e.text})]},`${e.ts}-${t}`)}),(0,a.jsx)("div",{ref:o})]}),(0,a.jsxs)("div",{className:"shrink-0 px-3 py-2 bg-[#0F0F23] border-t border-white/[0.04] space-y-2",children:[(0,a.jsx)("div",{className:"flex items-center justify-center gap-3 text-[#F8FAFC]/20 text-[10px]",children:(0,a.jsx)("span",{className:"flex items-center gap-1",children:(0,a.jsx)("svg",{className:"w-3 h-3",viewBox:"0 0 24 24",fill:"currentColor",children:(0,a.jsx)("path",{d:"M12 4.5C7 4.5 2.7 7.6 1 12c1.7 4.4 6 7.5 11 7.5s9.3-3.1 11-7.5c-1.7-4.4-6-7.5-11-7.5zm0 12.5c-2.8 0-5-2.2-5-5s2.2-5 5-5 5 2.2 5 5-2.2 5-5 5zm0-8c-1.7 0-3 1.3-3 3s1.3 3 3 3 3-1.3 3-3-1.3-3-3-3z"})})})}),(0,a.jsxs)("div",{className:"flex bg-[#0F0F23] rounded-2xl overflow-hidden border border-white/[0.08]",children:[(0,a.jsx)("input",{type:"text",placeholder:"Đăng nhập để c\xf9ng chat nh\xe9",disabled:!0,className:"flex-1 bg-transparent px-3 py-2 text-[11px] text-[#F8FAFC] outline-none placeholder:text-[#F8FAFC]/30 disabled:opacity-50"}),(0,a.jsx)("button",{disabled:!0,className:"px-4 text-[11px] font-bold bg-[#E11D48] text-black disabled:bg-white/10 disabled:text-[#F8FAFC]/20 transition-colors",children:"Gửi"})]})]})]})}let y={1:{icon:"⚽",label:"B\xe0n thắng",color:"text-green-400"},2:{icon:"\uD83C\uDD7F️",label:"Phạt đền",color:"text-green-400"},3:{icon:"\uD83D\uDFE1",label:"Thẻ v\xe0ng",color:"text-yellow-400"},4:{icon:"\uD83D\uDFE1\uD83D\uDFE1",label:"Thẻ v\xe0ng 2",color:"text-emerald-600"},5:{icon:"\uD83D\uDD34",label:"Thẻ đỏ",color:"text-red-500"},7:{icon:"\uD83D\uDD04",label:"Phản lưới",color:"text-orange-400"},8:{icon:"\uD83C\uDFE5",label:"Chấn thương",color:"text-[#94A3B8]"},9:{icon:"\uD83D\uDD04",label:"Thay người",color:"text-blue-400"},11:{icon:"⏱️",label:"Hiệp 2",color:"text-[#F8FAFC]/40"},15:{icon:"\uD83E\uDD45",label:"Pen trượt",color:"text-red-400"},19:{icon:"⏱️",label:"Kết th\xfac hiệp",color:"text-[#F8FAFC]/30"},21:{icon:"\uD83C\uDFC6",label:"VAR",color:"text-purple-400"}};function _({events:e}){let t=e?.incidents||e?.events||[];return t&&0!==t.length?(0,a.jsx)("div",{className:"flex flex-col",children:t.map((e,t)=>{let s=y[e.type]||{icon:"•",label:`Event ${e.type}`,color:"text-[#F8FAFC]/50"},l=1===e.position,r=2===e.position,n=e.add_time?`+${e.add_time}`:"",i=`${e.time}'${n}`;return l||r||11!==e.type&&19!==e.type?9===e.type?(0,a.jsxs)("div",{className:`flex items-center gap-2 border-b border-slate-50 p-3 text-xs ${l?"":"flex-row-reverse"}`,children:[(0,a.jsx)("span",{className:"text-slate-400 w-10 text-center shrink-0 text-[10px]",children:i}),(0,a.jsxs)("div",{className:`flex-1 flex flex-col gap-0.5 ${l?"items-start":"items-end"}`,children:[(0,a.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,a.jsx)("span",{className:"text-green-400 text-[10px]",children:"▲"}),(0,a.jsx)("span",{className:"text-[#F8FAFC]/80 text-[11px]",children:e.in_player_name||""})]}),(0,a.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,a.jsx)("span",{className:"text-red-400 text-[10px]",children:"▼"}),(0,a.jsx)("span",{className:"text-[#F8FAFC]/40 text-[11px]",children:e.out_player_name||""})]})]})]},t):(0,a.jsxs)("div",{className:`flex items-center gap-2 border-b border-slate-50 p-3 text-xs ${l?"":"flex-row-reverse"}`,children:[(0,a.jsx)("span",{className:"text-slate-400 w-10 text-center shrink-0 text-[10px]",children:i}),(0,a.jsx)("span",{className:`shrink-0 text-sm ${s.color}`,children:s.icon}),(0,a.jsxs)("div",{className:`flex-1 min-w-0 ${l?"text-left":"text-right"}`,children:[(0,a.jsx)("span",{className:"text-slate-700 text-[11px]",children:e.player_name||""}),e.assist1_name&&(0,a.jsxs)("span",{className:"text-slate-400 text-[10px] ml-1",children:["(kiến tạo: ",e.assist1_name,")"]}),1===e.type&&void 0!==e.home_score&&(0,a.jsxs)("span",{className:"text-[#E11D48] font-bold text-[11px] ml-2",children:[e.home_score," - ",e.away_score]})]})]},t):(0,a.jsx)("div",{className:"flex items-center justify-center py-2 border-b border-slate-50 bg-slate-50",children:(0,a.jsxs)("span",{className:"text-slate-400 text-[10px] uppercase tracking-wider",children:[s.icon," ",s.label," — ",i]})},t)})}):(0,a.jsx)(j,{text:"Diễn biến trận đấu sẽ được cập nhật trực tiếp tại đ\xe2y"})}function k({standings:e}
660){return e&&e.teams&&0!==e.teams.length?(0,a.jsxs)("div",{className:"w-full text-[10px]",children:[(0,a.jsxs)("div",{className:"grid grid-cols-[20px_1fr_24px_24px_32px] bg-slate-50 p-2 text-slate-400 uppercase font-bold sticky top-0",children:[(0,a.jsx)("span",{className:"text-center",children:"#"}),(0,a.jsx)("span",{children:"Team"}),(0,a.jsx)("span",{className:"text-center",children:"T"}),(0,a.jsx)("span",{className:"text-center",children:"B"}),(0,a.jsx)("span",{className:"text-center whitespace-nowrap",children:"Đ"})]}),e.teams.slice(0,15).map((e,t)=>{let s=!!e.data,l=s?parseFloat(e.data[0]):e.rank||t+1,r=s?e.data[1]:e.target_name,n=s?e.data[7]:e.points,i=s?e.data[3]:e.won,o=s?e.data[5]:e.loss;return(0,a.jsxs)("div",{className:"grid grid-cols-[20px_1fr_24px_24px_32px] items-center p-2 border-b border-slate-50 hover:bg-slate-50 transition-colors",children:[(0,a.jsx)("span",{className:"text-center text-slate-500",children:l}),(0,a.jsxs)("div",{className:"flex items-center gap-1.5 min-w-0 pr-2",children:[e.team_logo&&(0,a.jsx)("img",{src:e.team_logo,className:"w-3.5 h-3.5 object-contain",alt:r||"Team logo",loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-slate-700 font-medium truncate",children:r})]}),(0,a.jsx)("span",{className:"text-center text-slate-500",children:i}),(0,a.jsx)("span",{className:"text-center text-slate-500",children:o}),(0,a.jsx)("span",{className:"text-center text-[#E11D48] font-bold",children:n})]},r)})]}):(0,a.jsx)(j,{text:"Bảng xếp hạng sẽ được cập nhật"})}function E({odds:e}){let t=Array.isArray(e)?e:[],s=["2","4","3","16"];function l(e){for(let a of s){let s=t.find(t=>t.odds_type===e&&String(t.company_id)===a);if(s?.odds_info?.length)return s}return t.find(t=>t.odds_type===e&&t.odds_info?.length>0)}function r(e,t){let s=e?.odds_info;if(!s?.length)return["-","-","-"];let a="opening"===t?s.length-1:0;if(!s?.length||!s[a])return["-","-","-"];let l=s[a][2];if("string"!=typeof l)return["-","-","-"];let r=l.split(",");return[r[0]||"-",r[1]||"-",r[2]||"-"]}let n=l("asia"),i=l("eu"),o=l("bs"),c=l("cr"),d=r(n,"opening"),x=r(n,"latest"),h=r(i,"opening"),m=r(i,"latest"),p=r(o,"opening"),u=r(o,"latest"),g=r(c,"opening"),b=r(c,"latest"),f=({children:e})=>(0,a.jsx)("th",{className:"px-2 py-2 text-[9px] sm:text-[10px] font-bold uppercase tracking-wider text-slate-500 border-b border-slate-100 text-center",children:e}),j=({children:e,color:t})=>(0,a.jsx)("td",{className:`px-2 py-2.5 text-center text-[11px] sm:text-xs font-bold ${t||"text-slate-600"} border-b border-slate-50`,children:e});return(0,a.jsxs)("div",{className:"overflow-x-auto",children:[(0,a.jsxs)("table",{className:"w-full min-w-[600px]",children:[(0,a.jsxs)("thead",{children:[(0,a.jsxs)("tr",{className:"bg-slate-50",children:[(0,a.jsx)("th",{className:"px-4 py-2 text-left border-b border-slate-100",rowSpan:2,children:(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("div",{className:"w-7 h-7 rounded bg-gradient-to-br from-[#1d4ed8] to-[#3b82f6] flex items-center justify-center text-white text-[9px] font-black shadow-sm",children:"B"}),(0,a.jsx)("span",{className:"text-slate-600 text-[11px] font-bold tracking-wider",children:"SPORT"})]})}),(0,a.jsx)("th",{colSpan:3,className:"px-1 py-1.5 text-center text-[9px] sm:text-[10px] font-bold uppercase tracking-wider text-[#4681E8] border-b border-l border-slate-100",children:"CƯỢC CH\xc2U \xc1"}),(0,a.jsx)("th",{colSpan:3,className:"px-1 py-1.5 text-center text-[9px] sm:text-[10px] font-bold uppercase tracking-wider text-[#4681E8] border-b border-l border-slate-100",children:"CƯỢC CH\xc2U \xc2U"}),(0,a.jsx)("th",{colSpan:3,className:"px-1 py-1.5 text-center text-[9px] sm:text-[10px] font-bold uppercase tracking-wider text-[#4681E8] border-b border-l border-slate-100",children:"T\xc0I XỈU"}),(0,a.jsx)("th",{colSpan:3,className:"px-1 py-1.5 text-center text-[9px] sm:text-[10px] font-bold uppercase tracking-wider text-[#4681E8] border-b border-l border-slate-100",children:"K\xc8O G\xd3C"})]}),(0,a.jsxs)("tr",{className:"bg-slate-50",children:[(0,a.jsx)(f,{children:"CHỦ"}),(0,a.jsx)(f,{children:"CHẤP"}),(0,a.jsx)(f,{children:"KH\xc1CH"}),(0,a.jsx)(f,{children:"CHỦ"}),(0,a.jsx)(f,{children:"H\xd2A"}),(0,a.jsx)(f,{children:"KH\xc1CH"}),(0,a.jsx)(f,{children:"T\xc0I"}),(0,a.jsx)(f,{children:"TỶ LỆ"}),(0,a.jsx)(f,{children:"XỈU"}),(0,a.jsx)(f,{children:"T\xc0I"}),(0,a.jsx)(f,{children:"TỶ LỆ"}),(0,a.jsx)(f,{children:"XỈU"})]})]}),(0,a.jsxs)("tbody",{children:[(0,a.jsxs)("tr",{className:"hover:bg-slate-50 transition-colors",children:[(0,a.jsx)("td",{className:"px-4 py-2.5 text-[11px] sm:text-xs text-slate-500 font-medium border-b border-slate-50",children:"Tỷ Lệ Mở Cược"}),(0,a.jsx)(j,{children:d[0]}),(0,a.jsx)(j,{color:"text-red-400",children:d[1]}),(0,a.jsx)(j,{children:d[2]}),(0,a.jsx)(j,{children:h[0]}),(0,a.jsx)(j,{children:h[1]}),(0,a.jsx)(j,{children:h[2]}),(0,a.jsx)(j,{children:p[0]}),(0,a.jsx)(j,{children:p[1]}),(0,a.jsx)(j,{children:p[2]}),(0,a.jsx)(j,{children:g[0]}),(0,a.jsx)(j,{children:g[1]}),(0,a.jsx)(j,{children:g[2]})]}),(0,a.jsxs)("tr",{className:"hover:bg-slate-50 transition-colors",children:[(0,a.jsx)("td",{className:"px-4 py-2.5 text-[11px] sm:text-xs text-slate-500 font-medium border-b border-slate-50",children:"Tỷ Lệ Trước Trận"}),(0,a.jsx)(j,{children:x[0]}),(0,a.jsx)(j,{color:"text-red-400",children:x[1]}),(0,a.jsx)(j,{children:x[2]}),(0,a.jsx)(j,{children:m[0]}),(0,a.jsx)(j,{children:m[1]}),(0,a.jsx)(j,{children:m[2]}),(0,a.jsx)(j,{children:u[0]}),(0,a.jsx)(j,{children:u[1]}),(0,a.jsx)(j,{children:u[2]}),(0,a.jsx)(j,{children:b[0]}),(0,a.jsx)(j,{children:b[1]}),(0,a.jsx)(j,{children:b[2]})]}),(0,a.jsxs)("tr",{className:"hover:bg-slate-50 transition-colors bg-white",children:[(0,a.jsxs)("td",{className:"px-4 py-2.5 text-[11px] sm:text-xs text-slate-700 font-bold flex items-center gap-1.5 border-b border-slate-50",children:["Live ",(0,a.jsx)("span",{className:"w-1.5 h-1.5 rounded-full bg-red-500 animate-pulse"})]}),(0,a.jsx)(j,{color:"text-green-400",children:x[0]}),(0,a.jsx)(j,{color:"text-red-400",children:x[1]}),(0,a.jsx)(j,{color:"text-green-400",children:x[2]}),(0,a.jsx)(j,{color:"text-green-400",children:m[0]}),(0,a.jsx)(j,{color:"text-green-400",children:m[1]}),(0,a.jsx)(j,{color:"text-green-400",children:m[2]}),(0,a.jsx)(j,{color:"text-green-400",children:u[0]}),(0,a.jsx)(j,{children:u[1]}),(0,a.jsx)(j,{color:"text-green-400",children:u[2]}),(0,a.jsx)(j,{color:"text-green-400",children:b[0]}),(0,a.jsx)(j,{children:b[1]}),(0,a.jsx)(j,{color:"text-green-400",children:b[2]})]})]})]}),(0,a.jsx)("p",{className:"text-center text-slate-400 text-[10px] py-2.5 border-t border-slate-100",children:"Tỷ lệ k\xe8o sẽ được cập nhật gần giờ thi đấu"})]})}},61822:(e,t,s)=>{"use strict";s.d(t,{StandingsClient:()=>h});var a=s(68019),l=s(10707),r=s(46914),n=s(34003);function i(e){return"W"===e?"border border-emerald-500/45 bg-emerald-500/25 text-emerald-300 shadow-[0_0_0_1px_rgba(16,185,129,0.08)_inset]":"L"===e?"border border-red-500/45 bg-red-500/25 text-red-300 shadow-[0_0_0_1px_rgba(239,68,68,0.08)_inset]":"D"===e?"border border-amber-400/45 bg-amber-400/22 text-amber-200 shadow-[0_0_0_1px_rgba(251,191,36,0.08)_inset]":"border border-slate-500/40 bg-slate-500/18 text-slate-700"}function o(e,t){return 1===e?{bar:"bg-[linear-gradient(180deg,#facc15,#f97316)]",badge:"border-emerald-600/60 bg-slate-100 text-yellow-700 shadow-[0_0_18px_rgba(250,204,21,0.14)]",row:"from-[#32230d]/70 via-trans
660parent to-transparent"}:e<=4?{bar:"bg-[linear-gradient(180deg,#fb7185,#f97316)]",badge:"border-[#fb7185]/45 bg-slate-100 text-rose-700",row:"from-[#241318]/55 via-transparent to-transparent"}:e<=6?{bar:"bg-[linear-gradient(180deg,#f59e0b,#facc15)]",badge:"border-[#f59e0b]/45 bg-slate-100 text-yellow-700",row:"from-[#24190b]/45 via-transparent to-transparent"}:e<=10?{bar:"bg-[linear-gradient(180deg,#38bdf8,#2563eb)]",badge:"border-sky-400/40 bg-white text-sky-700",row:"from-[#101725]/32 via-transparent to-transparent"}:e>=Math.max(t-2,1)?{bar:"bg-[linear-gradient(180deg,#ef4444,#7f1d1d)]",badge:"border-red-500/40 bg-slate-100 text-red-700",row:"from-[#220f14]/45 via-transparent to-transparent"}:{bar:"bg-[linear-gradient(180deg,#64748b,#334155)]",badge:"border-slate-500/35 bg-white text-slate-700",row:"from-[#12161d]/24 via-transparent to-transparent"}}function c({detail:e}){let[t,s]=(0,l.useState)(!1),n=(0,l.useRef)(null),[o,d]=(0,l.useState)({top:0,left:0}),x=i(e.result),h=(0,l.useCallback)(()=>{if(n.current){let e=n.current.getBoundingClientRect();d({top:e.top+window.scrollY-8,left:e.left+e.width/2+window.scrollX})}s(!0)},[]);return(0,a.jsxs)("div",{ref:n,className:"relative inline-flex",onMouseEnter:h,onMouseLeave:()=>s(!1),children:[(0,a.jsx)("span",{className:`inline-flex h-7 w-7 items-center justify-center rounded-[8px] text-[11px] font-black cursor-pointer transition-transform hover:-translate-y-0.5 ${x}`,children:e.result}),t&&e.match_time&&"u">typeof document&&(0,r.createPortal)((0,a.jsxs)("div",{className:"fixed z-[9999] w-[220px] pointer-events-none",style:{top:`${o.top}px`,left:`${o.left}px`,transform:"translate(-50%, -100%)",position:"absolute"},children:[(0,a.jsxs)("div",{className:"overflow-hidden rounded-xl border border-[#cbd5e1] bg-white shadow-2xl",children:[(0,a.jsx)("div",{className:"bg-slate-100 px-3 py-1.5 text-[10px] text-slate-600 font-mono text-center border-b border-[#cbd5e1]",children:e.match_time}),(0,a.jsxs)("div",{className:"px-3 py-2.5 flex items-center justify-between gap-2",children:[(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5 flex-1 min-w-0",children:[e.home_logo?(0,a.jsx)("img",{src:e.home_logo,alt:e.home_team,className:"w-7 h-7 object-contain",loading:"lazy",decoding:"async"}):(0,a.jsx)("div",{className:"w-7 h-7 rounded-full bg-gray-700 flex items-center justify-center text-[8px] text-slate-600 font-bold",children:"?"}),(0,a.jsx)("span",{className:"text-[9px] text-slate-600 font-bold text-center leading-tight line-clamp-2 max-w-[70px]",children:e.home_team})]}),(0,a.jsx)("div",{className:"text-slate-900 font-black text-sm whitespace-nowrap px-1",children:e.score||"? - ?"}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5 flex-1 min-w-0",children:[e.away_logo?(0,a.jsx)("img",{src:e.away_logo,alt:e.away_team,className:"w-7 h-7 object-contain",loading:"lazy",decoding:"async"}):(0,a.jsx)("div",{className:"w-7 h-7 rounded-full bg-gray-700 flex items-center justify-center text-[8px] text-slate-600 font-bold",children:"?"}),(0,a.jsx)("span",{className:"text-[9px] text-slate-600 font-bold text-center leading-tight line-clamp-2 max-w-[70px]",children:e.away_team})]})]})]}),(0,a.jsx)("div",{className:"absolute left-1/2 -translate-x-1/2 -bottom-1 w-2 h-2 bg-white border-r border-b border-[#cbd5e1] rotate-45"})]}),document.body)]})}function d({result:e}){let t=i(e);return(0,a.jsx)("span",{className:`inline-flex h-7 w-7 items-center justify-center rounded-[8px] text-[11px] font-black ${t}`,children:e})}function x({value:e,totalTeams:t}){let s=Number(e);if(!Number.isFinite(s))return(0,a.jsx)("td",{className:"px-4 py-4 text-center font-mono font-black text-slate-400",children:e});let l=o(s,t);return(0,a.jsxs)("td",{className:"relative px-4 py-4 text-center font-mono",children:[(0,a.jsx)("span",{className:`absolute left-0 top-1/2 h-7 w-1 -translate-y-1/2 rounded-r-full ${l.bar}`}),(0,a.jsx)("span",{className:`inline-flex h-8 w-8 items-center justify-center rounded-[10px] border text-[13px] font-black ${l.badge}`,children:s})]})}function h({initialData:e}){let[t]=(0,l.useState)(!1),[s,r]=(0,l.useState)(!1),[i,p]=(0,l.useState)(""),u=(0,l.useRef)(null);if((0,l.useEffect)(()=>{function e(e){u.current&&!u.current.contains(e.target)&&r(!1)}return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[]),!e)return(0,a.jsx)("div",{className:"text-center py-20 text-slate-600",children:"Đang tải dữ liệu..."});let g=e.available_leagues||[],b=g.filter(e=>e.name.toLowerCase().includes(i.toLowerCase())),f=e.teams&&e.teams.length>0&&Array.isArray(e.teams[0]?.form),j=!f&&e.rankings;return(0,a.jsxs)("div",{className:"mx-auto max-w-[1440px] px-4 py-8",children:[(0,a.jsx)(n.G,{eyebrow:"Bảng xếp hạng",title:"BẢNG XẾP HẠNG",rightSlot:(0,a.jsx)("div",{className:"text-[12px] text-slate-600",children:(0,a.jsx)("span",{className:"text-slate-900/80 font-bold",children:e.league_name})})}),g.length>0&&(0,a.jsxs)("div",{className:"mb-6",ref:u,children:[(0,a.jsxs)("div",{className:"relative inline-flex min-w-[320px] items-center gap-3 rounded-2xl border border-slate-200 bg-white backdrop-blur-md px-5 py-3.5 cursor-pointer shadow-[0_8px_30px_rgba(0,0,0,0.06)] transition-colors hover:border-[#4681E8]/50 hover:shadow-[0_8px_30px_rgba(70,129,232,0.1)]",onClick:()=>r(!s),children:[e.league_icon&&(0,a.jsx)("img",{src:e.league_icon,alt:e.league_name||"League icon",className:"w-6 h-6 object-contain",loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-slate-800 font-bold text-sm flex-1",children:e.league_name||"Chọn giải đấu"}),(0,a.jsx)("svg",{className:`w-4 h-4 text-[#4681E8] transition-transform ${s?"rotate-180":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),s&&(0,a.jsxs)("div",{className:"absolute z-50 mt-2 w-[360px] overflow-hidden rounded-2xl border border-slate-200 bg-white backdrop-blur-xl shadow-[0_24px_80px_rgba(0,0,0,0.15)]",children:[(0,a.jsx)("div",{className:"p-2 border-b border-slate-100",children:(0,a.jsx)("input",{type:"text",placeholder:"T\xecm kiếm giải đấu...",value:i,onChange:e=>p(e.target.value),className:"w-full bg-slate-50 text-slate-800 text-sm px-4 py-2.5 rounded-xl border border-transparent outline-none focus:border-[#4681E8]/50 placeholder-slate-400 transition-colors",autoF
660ocus:!0})}),(0,a.jsxs)("div",{className:"max-h-[340px] overflow-y-auto",children:[b.map(t=>(0,a.jsxs)("a",{href:`/standings?league=${encodeURIComponent(t.id)}`,className:`flex items-center gap-3 px-4 py-3 cursor-pointer transition-colors hover:bg-slate-50 ${t.id===e.league_id?"bg-[#4681E8]/10 border-l-4 border-[#4681E8]":""}`,children:[t.icon?(0,a.jsx)("img",{src:t.icon,alt:t.name||"League",className:"w-5 h-5 object-contain flex-shrink-0",loading:"lazy",decoding:"async"}):(0,a.jsx)("div",{className:"w-5 h-5 rounded bg-gray-700 flex-shrink-0"}),(0,a.jsx)("span",{className:"text-sm text-slate-900 truncate",children:t.name})]},t.id)),0===b.length&&(0,a.jsx)("div",{className:"px-4 py-8 text-center text-gray-500 text-sm",children:"Kh\xf4ng t\xecm thấy giải đấu"})]})]})]}),t&&(0,a.jsxs)("div",{className:"flex items-center justify-center py-12",children:[(0,a.jsx)("div",{className:"animate-spin w-8 h-8 border-2 border-emerald-600 border-t-transparent rounded-full"}),(0,a.jsx)("span",{className:"ml-3 text-slate-600 text-sm",children:"Đang tải bảng xếp hạng từ server..."})]}),!t&&f&&(0,a.jsxs)("div",{className:"overflow-hidden rounded-[24px] border border-slate-200 bg-white shadow-[0_8px_30px_rgba(0,0,0,0.08)]",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between gap-3 border-b border-[#4681E8]/20 bg-gradient-to-r from-[#4681E8] to-[#2563eb] px-6 py-4 text-white shadow-[0_4px_25px_rgba(70,129,232,0.3)]",children:[(0,a.jsx)("div",{className:"text-[13px] font-black uppercase tracking-[0.2em] drop-shadow-sm text-white/80",children:"League"}),(0,a.jsx)("div",{className:"truncate text-sm font-black sm:text-base drop-shadow-md",children:e.league_name})]}),(0,a.jsx)("div",{className:"overflow-x-auto",children:(0,a.jsxs)("table",{className:"w-full text-left border-collapse",children:[(0,a.jsx)("thead",{children:(0,a.jsx)("tr",{className:"bg-slate-50 text-[11px] uppercase tracking-[0.2em] text-slate-500",children:e.header.map((t,s)=>{let l=e.teams.some(e=>e.form&&e.form.length>0);return t.toLowerCase().includes("phong độ")&&!l?null:(0,a.jsx)("th",{colSpan:s===e.header.length-1&&l?5:1,className:`p-4 font-semibold ${1===s?"w-1/3 text-left":"text-center"}`,children:t},s)})})}),(0,a.jsx)("tbody",{className:"text-sm",children:e.teams.map((t,s)=>(o(Number(t.data[0]||s+1),e.teams.length),(0,a.jsxs)("tr",{className:"group border-b border-slate-100 bg-white transition-colors hover:bg-slate-50 cursor-pointer",children:[t.data.map((s,l)=>0===l?(0,a.jsx)(x,{value:s,totalTeams:e.teams.length},l):1===l?(0,a.jsx)("td",{className:"p-4",children:(0,a.jsxs)("div",{className:"flex items-center gap-3 rounded-2xl border border-slate-100 bg-slate-50 px-4 py-2.5 transition-colors group-hover:border-[#4681E8]/30 group-hover:bg-[#4681E8]/5",children:[t.team_logo?(0,a.jsx)("img",{src:t.team_logo,alt:s,className:"h-8 w-8 rounded-full bg-white object-contain p-0.5 filter drop-shadow-[0_2px_4px_rgba(0,0,0,0.1)]",loading:"lazy"}):(0,a.jsx)("div",{className:"flex h-8 w-8 items-center justify-center rounded-full border border-slate-200 bg-white text-[10px] font-bold text-slate-400",children:"?"}),(0,a.jsx)("span",{className:"font-bold text-slate-800 transition-colors group-hover:text-[#4681E8]",children:s})]})},l):(0,a.jsx)("td",{className:"p-4 text-center font-mono text-slate-600",children:s},l)),t.form&&t.form.length>0&&(0,a.jsxs)(a.Fragment,{children:[t.form.map((e,t)=>(0,a.jsx)("td",{className:"p-2 text-center",children:e.match_time?(0,a.jsx)(c,{detail:e}):(0,a.jsx)(d,{result:e.result})},`form-${t}`)),t.form.length<5&&Array.from({length:5-t.form.length}).map((e,t)=>(0,a.jsx)("td",{className:"p-2"},`pad-${t}`))]})]},s)))})]})})]}),!t&&!f&&j&&(0,a.jsx)(m,{rankings:e.rankings}),!t&&!f&&!j&&e.header&&e.teams&&(0,a.jsx)("div",{className:"text-center py-20 text-slate-600",children:"Dữ liệu đang được cập nhật..."}),!t&&(f||j)&&(0,a.jsxs)("div",{className:"mt-6 flex flex-wrap items-center gap-5 px-5 py-4 bg-slate-50 rounded-2xl border border-slate-200",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,a.jsx)("span",{className:"w-2.5 h-2.5 rounded-full bg-emerald-500"}),(0,a.jsx)("span",{className:"text-[11px] text-slate-600 font-bold uppercase tracking-wider",children:"Đội trưởng bảng"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,a.jsx)("span",{className:"w-2.5 h-2.5 rounded-full bg-sky-4
66000"}),(0,a.jsx)("span",{className:"text-[11px] text-slate-600 font-bold uppercase tracking-wider",children:"Champions League"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,a.jsx)("span",{className:"w-2.5 h-2.5 rounded-full bg-amber-500"}),(0,a.jsx)("span",{className:"text-[11px] text-slate-600 font-bold uppercase tracking-wider",children:"Europa League"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,a.jsx)("span",{className:"w-2.5 h-2.5 rounded-full bg-[#f97316]"}),(0,a.jsx)("span",{className:"text-[11px] text-slate-600 font-bold uppercase tracking-wider",children:"Europa Conference"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,a.jsx)("span",{className:"w-2.5 h-2.5 rounded-full bg-[#E11D48]"}),(0,a.jsx)("span",{className:"text-[11px] text-slate-600 font-bold uppercase tracking-wider",children:"Xuống hạng"})]})]})]})}function m({rankings:e}){if(!e||0===e.length)return null;let t=e[0].data,s=e.slice(1);return(0,a.jsx)("div",{className:"overflow-hidden rounded-[22px] border border-[#cbd5e1] bg-[linear-gradient(180deg,#191a20,#111218)] shadow-[0_24px_80px_rgba(0,0,0,0.4)]",children:(0,a.jsx)("div",{className:"overflow-x-auto",children:(0,a.jsxs)("table",{className:"w-full text-left border-collapse",children:[(0,a.jsx)("thead",{children:(0,a.jsx)("tr",{className:"bg-white text-[11px] uppercase tracking-[0.18em] text-slate-600",children:t.map((e,l)=>{let r=l===t.length-1,n=s[0]&&s[0].data.length>t.length?s[0].data.length-t.length+1:1;return(0,a.jsx)("th",{colSpan:r?n:1,className:`p-4 font-semibold ${1===l?"w-1/3 text-left":"text-center"}`,children:e},l)})})}),(0,a.jsx)("tbody",{className:"text-sm",children:s.map((e,t)=>(0,a.jsx)("tr",{className:"group border-b border-[#cbd5e1] transition-colors hover:bg-white",children:e.data.map((t,l)=>0===l?(0,a.jsx)(x,{value:t,totalTeams:s.length},l):1===l?(0,a.jsx)("td",{className:"p-4",children:(0,a.jsxs)("div",{className:"flex items-center gap-3 rounded-2xl border border-white/6 bg-[linear-gradient(180deg,rgba(255,255,255,0.03),rgba(255,255,255,0.01))] px-3 py-2 transition-colors group-hover:border-emerald-600/22",children:[e.team_logo?(0,a.jsx)("img",{src:e.team_logo,alt:t,className:"h-8 w-8 rounded-full bg-white/5 object-contain ring-1 ring-white/8",loading:"lazy"}):(0,a.jsx)("div",{className:"flex h-8 w-8 items-center justify-center rounded-full border border-gray-700 bg-gray-800 text-xs font-bold text-gray-500",children:"?"}),(0,a.jsx)("span",{className:"font-bold text-slate-900 transition-colors group-hover:text-emerald-600",children:t})]})},l):["W","D","L"].includes(t)?(0,a.jsx)("td",{className:"p-2 text-center",children:(0,a.jsx)("span",{className:`inline-flex h-7 w-7 items-center justify-center rounded-[8px] text-[11px] font-black ${i(t)}`,children:t})},l):(0,a.jsx)("td",{className:"p-4 text-center font-mono text-slate-600",children:t},l))},t))})]})})})}},61948:(e,t,s)=>{"use strict";s.d(t,{StandingsClient:()=>h});var a=s(68019),l=s(10707),r=s(46914),n=s(81443);function i(e){return"W"===e?"border border-emerald-500/45 bg-emerald-500/25 text-emerald-300 shadow-[0_0_0_1px_rgba(16,185,129,0.08)_inset]":"L"===e?"border border-red-500/45 bg-red-500/25 text-red-300 shadow-[0_0_0_1px_rgba(239,68,68,0.08)_inset]":"D"===e?"border border-amber-400/45 bg-amber-400/22 text-amber-200 shadow-[0_0_0_1px_rgba(251,191,36,0.08)_inset]":"border border-slate-500/40 bg-slate-500/18 text-slate-700"}function o(e,t){return 1===e?{bar:"bg-[linear-gradient(180deg,#facc15,#f97316)]",badge:"border-emerald-600/60 bg-slate-100 text-yellow-700 shadow-[0_0_18px_rgba(250,204,21,0.14)]",row:"from-[#32230d]/70 via-transparent to-transparent"}:e<=4?{bar:"bg-[linear-gradient(180deg,#fb7185,#f97316)]",badge:"border-[#fb7185]/45 bg-slate-100 text-rose-700",row:"from-[#241318]/55 via-transparent to-transparent"}:e<=6?{bar:"bg-[linear-gradient(180deg,#f59e0b,#facc15)]",badge:"border-[#f59e0b]/45 bg-slate-100 text-yellow-700",row:"from-[#24190b]/45 via-transparent to-transparent"}
660:e<=10?{bar:"bg-[linear-gradient(180deg,#38bdf8,#2563eb)]",badge:"border-sky-400/40 bg-white text-sky-700",row:"from-[#101725]/32 via-transparent to-transparent"}:e>=Math.max(t-2,1)?{bar:"bg-[linear-gradient(180deg,#ef4444,#7f1d1d)]",badge:"border-red-500/40 bg-slate-100 text-red-700",row:"from-[#220f14]/45 via-transparent to-transparent"}:{bar:"bg-[linear-gradient(180deg,#64748b,#334155)]",badge:"border-slate-500/35 bg-white text-slate-700",row:"from-[#12161d]/24 via-transparent to-transparent"}}function c({detail:e}){let[t,s]=(0,l.useState)(!1),n=(0,l.useRef)(null),[o,d]=(0,l.useState)({top:0,left:0}),x=i(e.result),h=(0,l.useCallback)(()=>{if(n.current){let e=n.current.getBoundingClientRect();d({top:e.top+window.scrollY-8,left:e.left+e.width/2+window.scrollX})}s(!0)},[]);return(0,a.jsxs)("div",{ref:n,className:"relative inline-flex",onMouseEnter:h,onMouseLeave:()=>s(!1),children:[(0,a.jsx)("span",{className:`inline-flex h-7 w-7 items-center justify-center rounded-[8px] text-[11px] font-black cursor-pointer transition-transform hover:-translate-y-0.5 ${x}`,children:e.result}),t&&e.match_time&&"u">typeof document&&(0,r.createPortal)((0,a.jsxs)("div",{className:"fixed z-[9999] w-[220px] pointer-events-none",style:{top:`${o.top}px`,left:`${o.left}px`,transform:"translate(-50%, -100%)",position:"absolute"},children:[(0,a.jsxs)("div",{className:"overflow-hidden rounded-xl border border-[#cbd5e1] bg-white shadow-2xl",children:[(0,a.jsx)("div",{className:"bg-slate-100 px-3 py-1.5 text-[10px] text-slate-600 font-mono text-center border-b border-[#cbd5e1]",children:e.match_time}),(0,a.jsxs)("div",{className:"px-3 py-2.5 flex items-center justify-between gap-2",children:[(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5 flex-1 min-w-0",children:[e.home_logo?(0,a.jsx)("img",{src:e.home_logo,alt:e.home_team,className:"w-7 h-7 object-contain",loading:"lazy",decoding:"async"}):(0,a.jsx)("div",{className:"w-7 h-7 rounded-full bg-gray-700 flex items-center justify-center text-[8px] text-slate-600 font-bold",children:"?"}),(0,a.jsx)("span",{className:"text-[9px] text-slate-600 font-bold text-center leading-tight line-clamp-2 max-w-[70px]",children:e.home_team})]}),(0,a.jsx)("div",{className:"text-slate-900 font-black text-sm whitespace-nowrap px-1",children:e.score||"? - ?"}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5 flex-1 min-w-0",children:[e.away_logo?(0,a.jsx)("img",{src:e.away_logo,alt:e.away_team,className:"w-7 h-7 object-contain",loading:"lazy",decoding:"async"}):(0,a.jsx)("div",{className:"w-7 h-7 rounded-full bg-gray-700 flex items-center justify-center text-[8px] text-slate-600 font-bold",children:"?"}),(0,a.jsx)("span",{className:"text-[9px] text-slate-600 font-bold text-center leading-tight line-clamp-2 max-w-[70px]",children:e.away_team})]})]})]}),(0,a.jsx)("div",{className:"absolute left-1/2 -translate-x-1/2 -bottom-1 w-2 h-2 bg-white border-r border-b border-[#cbd5e1] rotate-45"})]}),document.body)]})}function d({result:e}){let t=i(e);return(0,a.jsx)("span",{className:`inline-flex h-7 w-7 items-center justify-center rounded-[8px] text-[11px] font-black ${t}`,children:e})}function x({value:e,totalTeams:t}){let s=Number(e);if(!Number.isFinite(s))return(0,a.jsx)("td",{className:"px-4 py-4 text-center font-mono font-black text-slate-400",children:e});let l=o(s,t);return(0,a.jsxs)("td",{className:"relative px-4 py-4 text-center font-mono",children:[(0,a.jsx)("span",{className:`absolute left-0 top-1/2 h-7 w-1 -translate-y-1/2 rounded-r-full ${l.bar}`}),(0,a.jsx)("span",{className:`inline-flex h-8 w-8 items-center justify-center rounded-[10px] border text-[13px] font-black ${l.badge}`,children:s})]})}function h({initialData:e}){let[t]=(0,l.useState)(!1),[s,r]=(0,l.useState)(!1),[i,p]=(0,l.useState)(""),u=(0,l.useRef)(null);if((0,l.useEffect)(()=>{function e(e){u.current&&!u.current.contains(e.target)&&r(!1)}return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[]),!e)return(0,a.jsx)("div",{className:"text-center py-20 text-slate-600",children:"Đang tải dữ liệu..."});let g=e.available_leagues||[],b=g.filter(e=>e.name.toLowerCase().includes(i.toLowerCase())),f=e.teams&&e.teams.length>0&&Array.isArray(e.teams[0]?.form),j=!f&&e.rankings;return(0,a.jsxs)("div",{className:"mx-auto max-w-[1440px] px-4 py-8",children:[(0,a.jsx)(n._,{eyebrow:"Bảng xếp hạng",title:"BẢNG XẾP HẠNG",rightSlot:(0,a.jsx)("div",{className:"text-[12px] text-slate-600",children:(0,a.jsx)("span",{className:"text-slate-900/80 font-bold",children:e.league_name})})}),g.length>0&&(0,a.jsxs)("div",{className:"mb-6",ref:u,children:[(0,a.jsxs)("div",{className:"relative inline-flex min-w-[320px] items-center gap-3 rounded-2xl border border-slate-200 bg-white backdrop-blur-md px-5 py-3.5 cursor-pointer shadow-[0_8px_30px_rgba(0,0,0,0.06)] transition-colors hover:border-[#4681E8]/50 hover:shadow-[0_8px_30px_rgba(70,129,232,0.1)]",onClick:()=>r(!s),children:[e.league_icon&&(0,a.jsx)("img",{src:e.league_icon,alt:e.league_name||"League icon",className:"w-6 h-6 object-contain",loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-slate-800 font-bold text-sm flex-1",children:e.league_name||"Chọn giải đấu"}),(0,a.jsx)("svg",{className:`w-4 h-4 text-[#4681E8] transition-transform ${s?"rotate-180":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),s&&(0,a.jsxs)("div",{className:"absolute z-50 mt-2 w-[360px] overflow-hidden rounded-2xl border border-slate-200 bg-white backdrop-blur-xl shadow-[0_24px_80px_rgba(0,0,0,0.15)]",children:[(0,a.jsx)("div",{className:"p-2 border-b border-slate-100",children:(0,a.jsx)("input",{type:"text",placeholder:"T\xecm kiếm giải đấu...",value:i,onChange:e=>p(e.target.value),className:"w-full bg-slate-50 text-slate-800 text-sm px-4 py-2.5 rounded-xl border border-transparent outline-none focus:border-[#4681E8]/50 placeholder-slate-400 transition-colors",autoF
660ocus:!0})}),(0,a.jsxs)("div",{className:"max-h-[340px] overflow-y-auto",children:[b.map(t=>(0,a.jsxs)("a",{href:`/standings?league=${encodeURIComponent(t.id)}`,className:`flex items-center gap-3 px-4 py-3 cursor-pointer transition-colors hover:bg-slate-50 ${t.id===e.league_id?"bg-[#4681E8]/10 border-l-4 border-[#4681E8]":""}`,children:[t.icon?(0,a.jsx)("img",{src:t.icon,alt:t.name||"League",className:"w-5 h-5 object-contain flex-shrink-0",loading:"lazy",decoding:"async"}):(0,a.jsx)("div",{className:"w-5 h-5 rounded bg-gray-700 flex-shrink-0"}),(0,a.jsx)("span",{className:"text-sm text-slate-900 truncate",children:t.name})]},t.id)),0===b.length&&(0,a.jsx)("div",{className:"px-4 py-8 text-center text-gray-500 text-sm",children:"Kh\xf4ng t\xecm thấy giải đấu"})]})]})]}),t&&(0,a.jsxs)("div",{className:"flex items-center justify-center py-12",children:[(0,a.jsx)("div",{className:"animate-spin w-8 h-8 border-2 border-emerald-600 border-t-transparent rounded-full"}),(0,a.jsx)("span",{className:"ml-3 text-slate-600 text-sm",children:"Đang tải bảng xếp hạng từ server..."})]}),!t&&f&&(0,a.jsxs)("div",{className:"overflow-hidden rounded-[24px] border border-slate-200 bg-white shadow-[0_8px_30px_rgba(0,0,0,0.08)]",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between gap-3 border-b border-[#4681E8]/20 bg-gradient-to-r from-[#4681E8] to-[#2563eb] px-6 py-4 text-white shadow-[0_4px_25px_rgba(70,129,232,0.3)]",children:[(0,a.jsx)("div",{className:"text-[13px] font-black uppercase tracking-[0.2em] drop-shadow-sm text-white/80",children:"League"}),(0,a.jsx)("div",{className:"truncate text-sm font-black sm:text-base drop-shadow-md",children:e.league_name})]}),(0,a.jsx)("div",{className:"overflow-x-auto",children:(0,a.jsxs)("table",{className:"w-full text-left border-collapse",children:[(0,a.jsx)("thead",{children:(0,a.jsx)("tr",{className:"bg-slate-50 text-[11px] uppercase tracking-[0.2em] text-slate-500",children:e.header.map((t,s)=>{let l=e.teams.some(e=>e.form&&e.form.length>0);return t.toLowerCase().includes("phong độ")&&!l?null:(0,a.jsx)("th",{colSpan:s===e.header.length-1&&l?5:1,className:`p-4 font-semibold ${1===s?"w-1/3 text-left":"text-center"}`,children:t},s)})})}),(0,a.jsx)("tbody",{className:"text-sm",children:e.teams.map((t,s)=>(o(Number(t.data[0]||s+1),e.teams.length),(0,a.jsxs)("tr",{className:"group border-b border-slate-100 bg-white transition-colors hover:bg-slate-50 cursor-pointer",children:[t.data.map((s,l)=>0===l?(0,a.jsx)(x,{value:s,totalTeams:e.teams.length},l):1===l?(0,a.jsx)("td",{className:"p-4",children:(0,a.jsxs)("div",{className:"flex items-center gap-3 rounded-2xl border border-slate-100 bg-slate-50 px-4 py-2.5 transition-colors group-hover:border-[#4681E8]/30 group-hover:bg-[#4681E8]/5",children:[t.team_logo?(0,a.jsx)("img",{src:t.team_logo,alt:s,className:"h-8 w-8 rounded-full bg-white object-contain p-0.5 filter drop-shadow-[0_2px_4px_rgba(0,0,0,0.1)]",loading:"lazy"}):(0,a.jsx)("div",{className:"flex h-8 w-8 items-center justify-center rounded-full border border-slate-200 bg-white text-[10px] font-bold text-slate-400",children:"?"}),(0,a.jsx)("span",{className:"font-bold text-slate-800 transition-colors group-hover:text-[#4681E8]",children:s})]})},l):(0,a.jsx)("td",{className:"p-4 text-center font-mono text-slate-600",children:s},l)),t.form&&t.form.length>0&&(0,a.jsxs)(a.Fragment,{children:[t.form.map((e,t)=>(0,a.jsx)("td",{className:"p-2 text-center",children:e.match_time?(0,a.jsx)(c,{detail:e}):(0,a.jsx)(d,{result:e.result})},`form-${t}`)),t.form.length<5&&Array.from({length:5-t.form.length}).map((e,t)=>(0,a.jsx)("td",{className:"p-2"},`pad-${t}`))]})]},s)))})]})})]}),!t&&!f&&j&&(0,a.jsx)(m,{rankings:e.rankings}),!t&&!f&&!j&&e.header&&e.teams&&(0,a.jsx)("div",{className:"text-center py-20 text-slate-600",children:"Dữ liệu đang được cập nhật..."}),!t&&(f||j)&&(0,a.jsxs)("div",{className:"mt-6 flex flex-wrap items-center gap-5 px-5 py-4 bg-slate-50 rounded-2xl border border-slate-200",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,a.jsx)("span",{className:"w-2.5 h-2.5 rounded-full bg-emerald-500"}),(0,a.jsx)("span",{className:"text-[11px] text-slate-600 font-bold uppercase tracking-wider",children:"Đội trưởng bảng"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,a.jsx)("span",{className:"w-2.5 h-2.5 rounded-full bg-sky-4
66000"}),(0,a.jsx)("span",{className:"text-[11px] text-slate-600 font-bold uppercase tracking-wider",children:"Champions League"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,a.jsx)("span",{className:"w-2.5 h-2.5 rounded-full bg-amber-500"}),(0,a.jsx)("span",{className:"text-[11px] text-slate-600 font-bold uppercase tracking-wider",children:"Europa League"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,a.jsx)("span",{className:"w-2.5 h-2.5 rounded-full bg-[#f97316]"}),(0,a.jsx)("span",{className:"text-[11px] text-slate-600 font-bold uppercase tracking-wider",children:"Europa Conference"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,a.jsx)("span",{className:"w-2.5 h-2.5 rounded-full bg-[#E11D48]"}),(0,a.jsx)("span",{className:"text-[11px] text-slate-600 font-bold uppercase tracking-wider",children:"Xuống hạng"})]})]})]})}function m({rankings:e}){if(!e||0===e.length)return null;let t=e[0].data,s=e.slice(1);return(0,a.jsx)("div",{className:"overflow-hidden rounded-[22px] border border-[#cbd5e1] bg-[linear-gradient(180deg,#191a20,#111218)] shadow-[0_24px_80px_rgba(0,0,0,0.4)]",children:(0,a.jsx)("div",{className:"overflow-x-auto",children:(0,a.jsxs)("table",{className:"w-full text-left border-collapse",children:[(0,a.jsx)("thead",{children:(0,a.jsx)("tr",{className:"bg-white text-[11px] uppercase tracking-[0.18em] text-slate-600",children:t.map((e,l)=>{let r=l===t.length-1,n=s[0]&&s[0].data.length>t.length?s[0].data.length-t.length+1:1;return(0,a.jsx)("th",{colSpan:r?n:1,className:`p-4 font-semibold ${1===l?"w-1/3 text-left":"text-center"}`,children:e},l)})})}),(0,a.jsx)("tbody",{className:"text-sm",children:s.map((e,t)=>(0,a.jsx)("tr",{className:"group border-b border-[#cbd5e1] transition-colors hover:bg-white",children:e.data.map((t,l)=>0===l?(0,a.jsx)(x,{value:t,totalTeams:s.length},l):1===l?(0,a.jsx)("td",{className:"p-4",children:(0,a.jsxs)("div",{className:"flex items-center gap-3 rounded-2xl border border-white/6 bg-[linear-gradient(180deg,rgba(255,255,255,0.03),rgba(255,255,255,0.01))] px-3 py-2 transition-colors group-hover:border-emerald-600/22",children:[e.team_logo?(0,a.jsx)("img",{src:e.team_logo,alt:t,className:"h-8 w-8 rounded-full bg-white/5 object-contain ring-1 ring-white/8",loading:"lazy"}):(0,a.jsx)("div",{className:"flex h-8 w-8 items-center justify-center rounded-full border border-gray-700 bg-gray-800 text-xs font-bold text-gray-500",children:"?"}),(0,a.jsx)("span",{className:"font-bold text-slate-900 transition-colors group-hover:text-emerald-600",children:t})]})},l):["W","D","L"].includes(t)?(0,a.jsx)("td",{className:"p-2 text-center",children:(0,a.jsx)("span",{className:`inline-flex h-7 w-7 items-center justify-center rounded-[8px] text-[11px] font-black ${i(t)}`,children:t})},l):(0,a.jsx)("td",{className:"p-4 text-center font-mono text-slate-600",children:t},l))},t))})]})})})}},62447:(e,t,s)=>{"use strict";s.d(t,{StandingsClient:()=>h});var a=s(68019),l=s(10707),r=s(46914),n=s(6035);function i(e){return"W"===e?"border border-emerald-500/45 bg-emerald-500/25 text-emerald-300 shadow-[0_0_0_1px_rgba(16,185,129,0.08)_inset]":"L"===e?"border border-red-500/45 bg-red-500/25 text-red-300 shadow-[0_0_0_1px_rgba(239,68,68,0.08)_inset]":"D"===e?"border border-amber-400/45 bg-amber-400/22 text-amber-200 shadow-[0_0_0_1px_rgba(251,191,36,0.08)_inset]":"border border-slate-500/40 bg-slate-500/18 text-slate-700"}function o(e,t){return 1===e?{bar:"bg-[linear-gradient(180deg,#facc15,#f97316)]",badge:"border-emerald-600/60 bg-slate-100 text-yellow-700 shadow-[0_0_18px_rgba(250,204,21,0.14)]",row:"from-[#32230d]/70 via-transparent to-transparent"}:e<=4?{bar:"bg-[linear-gradient(180deg,#fb7185,#f97316)]",badge:"border-[#fb7185]/45 bg-slate-100 text-rose-700",row:"from-[#241318]/55 via-transparent to-transparent"}:e<=6?{bar:"bg-[linear-gradient(180deg,#f59e0b,#facc15)]",badge:"border-[#f59e0b]/45 bg-slate-100 text-yellow-700",row:"from-[#24190b]/45 via-transparent to-transparent"}
660:e<=10?{bar:"bg-[linear-gradient(180deg,#38bdf8,#2563eb)]",badge:"border-sky-400/40 bg-white text-sky-700",row:"from-[#101725]/32 via-transparent to-transparent"}:e>=Math.max(t-2,1)?{bar:"bg-[linear-gradient(180deg,#ef4444,#7f1d1d)]",badge:"border-red-500/40 bg-slate-100 text-red-700",row:"from-[#220f14]/45 via-transparent to-transparent"}:{bar:"bg-[linear-gradient(180deg,#64748b,#334155)]",badge:"border-slate-500/35 bg-white text-slate-700",row:"from-[#12161d]/24 via-transparent to-transparent"}}function c({detail:e}){let[t,s]=(0,l.useState)(!1),n=(0,l.useRef)(null),[o,d]=(0,l.useState)({top:0,left:0}),x=i(e.result),h=(0,l.useCallback)(()=>{if(n.current){let e=n.current.getBoundingClientRect();d({top:e.top+window.scrollY-8,left:e.left+e.width/2+window.scrollX})}s(!0)},[]);return(0,a.jsxs)("div",{ref:n,className:"relative inline-flex",onMouseEnter:h,onMouseLeave:()=>s(!1),children:[(0,a.jsx)("span",{className:`inline-flex h-7 w-7 items-center justify-center rounded-[8px] text-[11px] font-black cursor-pointer transition-transform hover:-translate-y-0.5 ${x}`,children:e.result}),t&&e.match_time&&"u">typeof document&&(0,r.createPortal)((0,a.jsxs)("div",{className:"fixed z-[9999] w-[220px] pointer-events-none",style:{top:`${o.top}px`,left:`${o.left}px`,transform:"translate(-50%, -100%)",position:"absolute"},children:[(0,a.jsxs)("div",{className:"overflow-hidden rounded-xl border border-[#cbd5e1] bg-white shadow-2xl",children:[(0,a.jsx)("div",{className:"bg-slate-100 px-3 py-1.5 text-[10px] text-slate-600 font-mono text-center border-b border-[#cbd5e1]",children:e.match_time}),(0,a.jsxs)("div",{className:"px-3 py-2.5 flex items-center justify-between gap-2",children:[(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5 flex-1 min-w-0",children:[e.home_logo?(0,a.jsx)("img",{src:e.home_logo,alt:e.home_team,className:"w-7 h-7 object-contain",loading:"lazy",decoding:"async"}):(0,a.jsx)("div",{className:"w-7 h-7 rounded-full bg-gray-700 flex items-center justify-center text-[8px] text-slate-600 font-bold",children:"?"}),(0,a.jsx)("span",{className:"text-[9px] text-slate-600 font-bold text-center leading-tight line-clamp-2 max-w-[70px]",children:e.home_team})]}),(0,a.jsx)("div",{className:"text-slate-900 font-black text-sm whitespace-nowrap px-1",children:e.score||"? - ?"}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5 flex-1 min-w-0",children:[e.away_logo?(0,a.jsx)("img",{src:e.away_logo,alt:e.away_team,className:"w-7 h-7 object-contain",loading:"lazy",decoding:"async"}):(0,a.jsx)("div",{className:"w-7 h-7 rounded-full bg-gray-700 flex items-center justify-center text-[8px] text-slate-600 font-bold",children:"?"}),(0,a.jsx)("span",{className:"text-[9px] text-slate-600 font-bold text-center leading-tight line-clamp-2 max-w-[70px]",children:e.away_team})]})]})]}),(0,a.jsx)("div",{className:"absolute left-1/2 -translate-x-1/2 -bottom-1 w-2 h-2 bg-white border-r border-b border-[#cbd5e1] rotate-45"})]}),document.body)]})}function d({result:e}){let t=i(e);return(0,a.jsx)("span",{className:`inline-flex h-7 w-7 items-center justify-center rounded-[8px] text-[11px] font-black ${t}`,children:e})}function x({value:e,totalTeams:t}){let s=Number(e);if(!Number.isFinite(s))return(0,a.jsx)("td",{className:"px-4 py-4 text-center font-mono font-black text-slate-400",children:e});let l=o(s,t);return(0,a.jsxs)("td",{className:"relative px-4 py-4 text-center font-mono",children:[(0,a.jsx)("span",{className:`absolute left-0 top-1/2 h-7 w-1 -translate-y-1/2 rounded-r-full ${l.bar}`}),(0,a.jsx)("span",{className:`inline-flex h-8 w-8 items-center justify-center rounded-[10px] border text-[13px] font-black ${l.badge}`,children:s})]})}function h({initialData:e}){let[t]=(0,l.useState)(!1),[s,r]=(0,l.useState)(!1),[i,p]=(0,l.useState)(""),u=(0,l.useRef)(null);if((0,l.useEffect)(()=>{function e(e){u.current&&!u.current.contains(e.target)&&r(!1)}return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[]),!e)return(0,a.jsx)("div",{className:"text-center py-20 text-slate-600",children:"Đang tải dữ liệu..."});let g=e.available_leagues||[],b=g.filter(e=>e.name.toLowerCase().includes(i.toLowerCase())),f=e.teams&&e.teams.length>0&&Array.isArray(e.teams[0]?.form),j=!f&&e.rankings;return(0,a.jsxs)("div",{className:"mx-auto max-w-[1440px] px-4 py-8",children:[(0,a.jsx)(n.j,{eyebrow:"Bảng xếp hạng",title:"BẢNG XẾP HẠNG",rightSlot:(0,a.jsx)("div",{className:"text-[12px] text-slate-600",children:(0,a.jsx)("span",{className:"text-slate-900/80 font-bold",children:e.league_name})})}),g.length>0&&(0,a.jsxs)("div",{className:"mb-6",ref:u,children:[(0,a.jsxs)("div",{className:"relative inline-flex min-w-[320px] items-center gap-3 rounded-2xl border border-slate-200 bg-white backdrop-blur-md px-5 py-3.5 cursor-pointer shadow-[0_8px_30px_rgba(0,0,0,0.06)] transition-colors hover:border-[#4681E8]/50 hover:shadow-[0_8px_30px_rgba(70,129,232,0.1)]",onClick:()=>r(!s),children:[e.league_icon&&(0,a.jsx)("img",{src:e.league_icon,alt:e.league_name||"League icon",className:"w-6 h-6 object-contain",loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-slate-800 font-bold text-sm flex-1",children:e.league_name||"Chọn giải đấu"}),(0,a.jsx)("svg",{className:`w-4 h-4 text-[#4681E8] transition-transform ${s?"rotate-180":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),s&&(0,a.jsxs)("div",{className:"absolute z-50 mt-2 w-[360px] overflow-hidden rounded-2xl border border-slate-200 bg-white backdrop-blur-xl shadow-[0_24px_80px_rgba(0,0,0,0.15)]",children:[(0,a.jsx)("div",{className:"p-2 border-b border-slate-100",children:(0,a.jsx)("input",{type:"text",placeholder:"T\xecm kiếm giải đấu...",value:i,onChange:e=>p(e.target.value),className:"w-full bg-slate-50 text-slate-800 text-sm px-4 py-2.5 rounded-xl border border-transparent outline-none focus:border-[#4681E8]/50 placeholder-slate-400 transition-colors",autoF
660ocus:!0})}),(0,a.jsxs)("div",{className:"max-h-[340px] overflow-y-auto",children:[b.map(t=>(0,a.jsxs)("a",{href:`/standings?league=${encodeURIComponent(t.id)}`,className:`flex items-center gap-3 px-4 py-3 cursor-pointer transition-colors hover:bg-slate-50 ${t.id===e.league_id?"bg-[#4681E8]/10 border-l-4 border-[#4681E8]":""}`,children:[t.icon?(0,a.jsx)("img",{src:t.icon,alt:t.name||"League",className:"w-5 h-5 object-contain flex-shrink-0",loading:"lazy",decoding:"async"}):(0,a.jsx)("div",{className:"w-5 h-5 rounded bg-gray-700 flex-shrink-0"}),(0,a.jsx)("span",{className:"text-sm text-slate-900 truncate",children:t.name})]},t.id)),0===b.length&&(0,a.jsx)("div",{className:"px-4 py-8 text-center text-gray-500 text-sm",children:"Kh\xf4ng t\xecm thấy giải đấu"})]})]})]}),t&&(0,a.jsxs)("div",{className:"flex items-center justify-center py-12",children:[(0,a.jsx)("div",{className:"animate-spin w-8 h-8 border-2 border-emerald-600 border-t-transparent rounded-full"}),(0,a.jsx)("span",{className:"ml-3 text-slate-600 text-sm",children:"Đang tải bảng xếp hạng từ server..."})]}),!t&&f&&(0,a.jsxs)("div",{className:"overflow-hidden rounded-[24px] border border-slate-200 bg-white shadow-[0_8px_30px_rgba(0,0,0,0.08)]",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between gap-3 border-b border-[#4681E8]/20 bg-gradient-to-r from-[#4681E8] to-[#2563eb] px-6 py-4 text-white shadow-[0_4px_25px_rgba(70,129,232,0.3)]",children:[(0,a.jsx)("div",{className:"text-[13px] font-black uppercase tracking-[0.2em] drop-shadow-sm text-white/80",children:"League"}),(0,a.jsx)("div",{className:"truncate text-sm font-black sm:text-base drop-shadow-md",children:e.league_name})]}),(0,a.jsx)("div",{className:"overflow-x-auto",children:(0,a.jsxs)("table",{className:"w-full text-left border-collapse",children:[(0,a.jsx)("thead",{children:(0,a.jsx)("tr",{className:"bg-slate-50 text-[11px] uppercase tracking-[0.2em] text-slate-500",children:e.header.map((t,s)=>{let l=e.teams.some(e=>e.form&&e.form.length>0);return t.toLowerCase().includes("phong độ")&&!l?null:(0,a.jsx)("th",{colSpan:s===e.header.length-1&&l?5:1,className:`p-4 font-semibold ${1===s?"w-1/3 text-left":"text-center"}`,children:t},s)})})}),(0,a.jsx)("tbody",{className:"text-sm",children:e.teams.map((t,s)=>(o(Number(t.data[0]||s+1),e.teams.length),(0,a.jsxs)("tr",{className:"group border-b border-slate-100 bg-white transition-colors hover:bg-slate-50 cursor-pointer",children:[t.data.map((s,l)=>0===l?(0,a.jsx)(x,{value:s,totalTeams:e.teams.length},l):1===l?(0,a.jsx)("td",{className:"p-4",children:(0,a.jsxs)("div",{className:"flex items-center gap-3 rounded-2xl border border-slate-100 bg-slate-50 px-4 py-2.5 transition-colors group-hover:border-[#4681E8]/30 group-hover:bg-[#4681E8]/5",children:[t.team_logo?(0,a.jsx)("img",{src:t.team_logo,alt:s,className:"h-8 w-8 rounded-full bg-white object-contain p-0.5 filter drop-shadow-[0_2px_4px_rgba(0,0,0,0.1)]",loading:"lazy"}):(0,a.jsx)("div",{className:"flex h-8 w-8 items-center justify-center rounded-full border border-slate-200 bg-white text-[10px] font-bold text-slate-400",children:"?"}),(0,a.jsx)("span",{className:"font-bold text-slate-800 transition-colors group-hover:text-[#4681E8]",children:s})]})},l):(0,a.jsx)("td",{className:"p-4 text-center font-mono text-slate-600",children:s},l)),t.form&&t.form.length>0&&(0,a.jsxs)(a.Fragment,{children:[t.form.map((e,t)=>(0,a.jsx)("td",{className:"p-2 text-center",children:e.match_time?(0,a.jsx)(c,{detail:e}):(0,a.jsx)(d,{result:e.result})},`form-${t}`)),t.form.length<5&&Array.from({length:5-t.form.length}).map((e,t)=>(0,a.jsx)("td",{className:"p-2"},`pad-${t}`))]})]},s)))})]})})]}),!t&&!f&&j&&(0,a.jsx)(m,{rankings:e.rankings}),!t&&!f&&!j&&e.header&&e.teams&&(0,a.jsx)("div",{className:"text-center py-20 text-slate-600",children:"Dữ liệu đang được cập nhật..."}),!t&&(f||j)&&(0,a.jsxs)("div",{className:"mt-6 flex flex-wrap items-center gap-5 px-5 py-4 bg-slate-50 rounded-2xl border border-slate-200",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,a.jsx)("span",{className:"w-2.5 h-2.5 rounded-full bg-emerald-500"}),(0,a.jsx)("span",{className:"text-[11px] text-slate-600 font-bold uppercase tracking-wider",children:"Đội trưởng bảng"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,a.jsx)("span",{className:"w-2.5 h-2.5 rounded-full bg-sky-4
66000"}),(0,a.jsx)("span",{className:"text-[11px] text-slate-600 font-bold uppercase tracking-wider",children:"Champions League"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,a.jsx)("span",{className:"w-2.5 h-2.5 rounded-full bg-amber-500"}),(0,a.jsx)("span",{className:"text-[11px] text-slate-600 font-bold uppercase tracking-wider",children:"Europa League"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,a.jsx)("span",{className:"w-2.5 h-2.5 rounded-full bg-[#f97316]"}),(0,a.jsx)("span",{className:"text-[11px] text-slate-600 font-bold uppercase tracking-wider",children:"Europa Conference"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,a.jsx)("span",{className:"w-2.5 h-2.5 rounded-full bg-[#E11D48]"}),(0,a.jsx)("span",{className:"text-[11px] text-slate-600 font-bold uppercase tracking-wider",children:"Xuống hạng"})]})]})]})}function m({rankings:e}){if(!e||0===e.length)return null;let t=e[0].data,s=e.slice(1);return(0,a.jsx)("div",{className:"overflow-hidden rounded-[22px] border border-[#cbd5e1] bg-[linear-gradient(180deg,#191a20,#111218)] shadow-[0_24px_80px_rgba(0,0,0,0.4)]",children:(0,a.jsx)("div",{className:"overflow-x-auto",children:(0,a.jsxs)("table",{className:"w-full text-left border-collapse",children:[(0,a.jsx)("thead",{children:(0,a.jsx)("tr",{className:"bg-white text-[11px] uppercase tracking-[0.18em] text-slate-600",children:t.map((e,l)=>{let r=l===t.length-1,n=s[0]&&s[0].data.length>t.length?s[0].data.length-t.length+1:1;return(0,a.jsx)("th",{colSpan:r?n:1,className:`p-4 font-semibold ${1===l?"w-1/3 text-left":"text-center"}`,children:e},l)})})}),(0,a.jsx)("tbody",{className:"text-sm",children:s.map((e,t)=>(0,a.jsx)("tr",{className:"group border-b border-[#cbd5e1] transition-colors hover:bg-white",children:e.data.map((t,l)=>0===l?(0,a.jsx)(x,{value:t,totalTeams:s.length},l):1===l?(0,a.jsx)("td",{className:"p-4",children:(0,a.jsxs)("div",{className:"flex items-center gap-3 rounded-2xl border border-white/6 bg-[linear-gradient(180deg,rgba(255,255,255,0.03),rgba(255,255,255,0.01))] px-3 py-2 transition-colors group-hover:border-emerald-600/22",children:[e.team_logo?(0,a.jsx)("img",{src:e.team_logo,alt:t,className:"h-8 w-8 rounded-full bg-white/5 object-contain ring-1 ring-white/8",loading:"lazy"}):(0,a.jsx)("div",{className:"flex h-8 w-8 items-center justify-center rounded-full border border-gray-700 bg-gray-800 text-xs font-bold text-gray-500",children:"?"}),(0,a.jsx)("span",{className:"font-bold text-slate-900 transition-colors group-hover:text-emerald-600",children:t})]})},l):["W","D","L"].includes(t)?(0,a.jsx)("td",{className:"p-2 text-center",children:(0,a.jsx)("span",{className:`inline-flex h-7 w-7 items-center justify-center rounded-[8px] text-[11px] font-black ${i(t)}`,children:t})},l):(0,a.jsx)("td",{className:"p-4 text-center font-mono text-slate-600",children:t},l))},t))})]})})})}},63145:(e,t,s)=>{"use strict";function a(e){let t=e?.fixtures_v2||null,s=e?.fixtures||e?.schedules||[],a=t?.date_tabs?.length?t.date_tabs:function(e=new Date){let t=["Chủ Nhật","Thứ Hai","Thứ Ba","Thứ Tư","Thứ Năm","Thứ S\xe1u","Thứ Bảy"],s=[];for(let a=0;a<14;a+=1){let l=new Date(e);l.setDate(l.getDate()+a);let r=String(l.getDate()).padStart(2,"0"),n=String(l.getMonth()+1).padStart(2,"0"),i=`${l.getFullYear()}-${l.getMonth()+1}-${l.getDate()}`;s.push({label:0===a?"H\xf4m Nay":t[l.getDay()],date:`${r}.${n}`,dataValue:i,active:0===a})}return s}(),l=e?.selected_date||a.find(e=>e.active)?.dataValue||a[0]?.dataValue||null;if(t?.leagues?.length)return{dateTabs:a,selectedDate:l,leagues:t.leagues,totalMatches:t.leagues.reduce((e,t)=>e+t.matches.length,0)};let r=[],n=new Set;return s.forEach(e=>{let t=e.data;if(!(t.length<3))for(let s=0;s+2<t.length;s+=16){let a=t[s]||"",l=t[s+1]||"",i=t[s+2]||"",o=`${a}-${l}-${i}`;if(!n.has(o)&&l&&(n.add(o),r.push({time:a,home_team:l,away_team:i,home_logo:e.team_logos?.[2*Math.floor(s/16)]||"",away_logo:e.team_logos?.[2*Math.floor(s/16)+1]||"",score:t[s+3]||"-",ht_score:t[s+4]||"",handicap:t.length>s+9?[t[s+7]||"",t[s+8]||"",t[s+9]||""]:[],over_under:t.length>s+12?[t[s+10]||"",t[s+11]||"",t[s+12]||""]:[],one_x_two:t.length>s+15?[t[s+13]||"",t[s+14]||"",t[s+15]||""]:[]}),s+16>=t.length))break}}),{dateTabs:a,selectedDate:l,leagues:r.length>0?[{league_name:"Tất cả trận đấu",league_icon:"",match_count:r.length,matches:r}]:[],totalMatches:r.length}}function l(e){let t=e?.results_v2||null,s=e?.results||[];if(t?.date_groups?.length)return{availableLeagues:t.available_leagues||[],dateGroups:t.date_groups,totalMatches:t.date_groups.reduce((e,t)=>
660e+t.matches.length,0)};let a=[];return s.forEach(e=>{let t=e.data;if(t.length<6)return;let s=t[0],l=s.split(" - "),r=[],n=1,i=0;for(;n<t.length;){if(t[n]?.startsWith("L\xfac")){let s=t[n].replace("L\xfac","").trim();r.push({time:s,home_team:t[n+1]||"",away_team:t[n+4]||"",home_logo:e.team_logos?.[i]||"",away_logo:e.team_logos?.[i+1]||"",score:t[n+2]||"",ht_score:(t[n+3]||"").replace("H1:","").replace("HT:","").trim()}),i+=2,n+=5;continue}n+=1}r.length>0&&a.push({date_header:l[0]?.trim()||s,league_round:l.slice(1).join(" - ").trim(),matches:r})}),{availableLeagues:[],dateGroups:a,totalMatches:a.reduce((e,t)=>e+t.matches.length,0)}}function r(e,t){if(!t)return e;let s=t.toLowerCase();return e.filter(e=>e.league_round.toLowerCase().includes(s))}s.d(t,{kK:()=>r,o8:()=>l,p_:()=>a})},63322:(e,t,s)=>{"use strict";s.d(t,{LiveMatchesClient:()=>m});var a=s(68019),l=s(10707);function r({activeSport:e,onSportChange:t,activeStatus:s,onStatusChange:l,matchesCount:n}){return(0,a.jsxs)("div",{className:"mb-5 flex flex-col gap-3",children:[(0,a.jsx)("div",{className:"flex items-center gap-2 overflow-x-auto pb-1 scrollbar-hide",children:[{id:"1",label:"B\xd3NG Đ\xc1",icon:"⚽"},{id:"2",label:"B\xd3NG RỔ",icon:"\uD83C\uDFC0"},{id:"5",label:"TENNIS",icon:"\uD83C\uDFBE"},{id:"4",label:"CẦU L\xd4NG",icon:"\uD83C\uDFF8"},{id:"3",label:"B\xd3NG CHUYỀN",icon:"\uD83C\uDFD0"},{id:"6",label:"B\xd3NG B\xc0N",icon:"\uD83C\uDFD3"}].map(s=>{let l=e===s.id;return(0,a.jsxs)("button",{type:"button",onClick:()=>t(s.id),className:`flex items-center gap-2 px-4 py-2.5 rounded-xl font-bold text-[12px] whitespace-nowrap transition-all duration-200 border cursor-pointer ${l?"bg-[#4681E8]/10 text-[#4681E8] border-[#4681E8]/40 shadow-[0_0_15px_rgba(70,129,232,0.1)]":"bg-white text-slate-500 border-slate-200 hover:text-slate-700 hover:border-[#4681E8]/30"}`,children:[(0,a.jsx)("span",{className:"text-[14px]",children:s.icon}),(0,a.jsx)("span",{className:"tracking-wider uppercase",children:s.label})]},s.id)})}),(0,a.jsx)("div",{className:"flex items-center gap-1 overflow-x-auto pb-1 scrollbar-hide bg-white rounded-xl p-1.5 border border-slate-200",children:[{id:"all",label:"TẤT CẢ",keyCount:"all"},{id:"live",label:"TRỰC TIẾP",keyCount:"live"},{id:"hot",label:"HOT",keyCount:"hot"},{id:"today",label:"H\xd4M NAY",keyCount:"today"},{id:"tomorrow",label:"NG\xc0Y MAI",keyCount:"tomorrow"}].map(e=>{let t=s===e.id,r=n[e.keyCount]||0;return(0,a.jsxs)("button",{type:"button",onClick:()=>l(e.id),className:`relative px-4 py-2 font-bold text-[12px] whitespace-nowrap transition-all duration-200 uppercase tracking-wider flex items-center gap-2 rounded-lg cursor-pointer ${t?"bg-[#4681E8]/10 text-[#4681E8] shadow-inner":"text-slate-500 hover:text-slate-700 hover:bg-[#4681E8]/5"}`,children:["live"===e.id&&t&&(0,a.jsx)("span",{className:"w-1.5 h-1.5 rounded-full bg-[#4681E8] animate-pulse shadow-[0_0_6px_rgba(70,129,232,0.8)]"}),(0,a.jsx)("span",{children:e.label}),(0,a.jsx)("span",{className:`px-1.5 py-0.5 rounded text-[10px] font-black ${t?"bg-[#4681E8]/20 text-[#4681E8]":"text-slate-400"}`,children:r})]},e.id)})})]})}function n(){return"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='10' fill='%2364748B' fill-opacity='0.18'/%3E%3C/svg%3E"}function i({match:e,isLoading:t=!1}){if(t||!e)return(0,a.jsx)("div",{className:"animate-pulse bg-white h-[64px] w-full border-b border-slate-100"});let s=new Date(1e3*parseInt(e.time||0,10)).toLocaleTimeString("vi-VN",{hour:"2-digit",minute:"2-digit",timeZone:"Asia/Ho_Chi_Minh"}),l=function(e,t){if("1"===t||"2"===t)switch(e){case"1":default:return{text:"Sắp diễn",isLive:!1,showScore:!1};case"2":return{text:"H1",isLive:!0,showScore:!0};case"3":return{text:"HT",isLive:!0,showScore:!0};case"4":return{text:"H2",isLive:!0,showScore:!0};case"5":return{text:"Phụ",isLive:!0,showScore:!0};case"7":return{text:"Pen",isLive:!0,showScore:!0};case"8":case"9":return{text:"FT",isLive:!1,showScore:!0}}switch(e){case"0":case"1":return{text:"Sắp diễn",isLive:!1,showScore:!1};case"51":return{text:"S1",isLive:!0,showScore:!0};case"52":return{text:"S2",isLive:!0,showScore:!0};case"53":return{text:"S3",isLive:!0,showScore:!0};case"54":return{text:"S4",isLive:!0,showScore:!0};case"55":return{text:"S5",isLive:!0,showScore:!0};case"100":case"90":case"91":case"110":return{text:"FT",isLive:!1,showScore:!0};default:return{text:"LIVE",isLive:!0,showScore:!0}}}(String(e.status_id),String(e.sport_id)),r=e.time_text||e.source_card_meta?.time_text||"",o=l.isLive,c=e.home_score??"-",d=e.away_score??"-",x=e.home_logo||n(),h=e.away_logo||n();return(0,a.jsxs)("a",{href:`/match/${encodeURIComponent(e.post_name||e.
660id)}`,className:"flex items-center w-full group border-b border-slate-100 bg-white hover:bg-[#4681E8]/5 transition-colors min-h-[64px]",children:[(0,a.jsx)("div",{className:`w-[60px] flex flex-col items-center justify-center shrink-0 h-full border-r ${o?"border-[#4681E8]/30 bg-[#4681E8]/5":"border-slate-100"}`,children:o?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"text-[#4681E8] font-bold text-[11px] uppercase tracking-wider tabular-nums leading-none",children:r||l.text}),(0,a.jsx)("span",{className:"w-1.5 h-1.5 rounded-full bg-[#4681E8] animate-pulse mt-1"})]}):(0,a.jsx)("span",{className:"text-slate-500 font-medium text-[12px]",children:s})}),(0,a.jsxs)("div",{className:"flex-1 flex flex-col justify-center px-3 py-2 gap-1.5 min-w-0",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between w-full",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2.5 min-w-0 overflow-hidden",children:[(0,a.jsx)("img",{src:x,alt:e.home_name,className:"w-4 h-4 shrink-0 object-contain",onError:e=>e.currentTarget.src=n(),loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-[13px] font-semibold truncate text-slate-800",children:e.home_name})]}),l.showScore&&(0,a.jsx)("span",{className:`text-[15px] font-black tabular-nums shrink-0 ml-2 ${o?"text-[#4681E8]":"text-slate-700"}`,children:c})]}),(0,a.jsxs)("div",{className:"flex items-center justify-between w-full",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2.5 min-w-0 overflow-hidden",children:[(0,a.jsx)("img",{src:h,alt:e.away_name,className:"w-4 h-4 shrink-0 object-contain",onError:e=>e.currentTarget.src=n(),loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-[13px] font-semibold truncate text-slate-800",children:e.away_name})]}),l.showScore&&(0,a.jsx)("span",{className:`text-[15px] font-black tabular-nums shrink-0 ml-2 ${o?"text-[#4681E8]":"text-slate-700"}`,children:d})]})]}),(0,a.jsx)("div",{className:"w-[48px] h-full flex items-center justify-center shrink-0 text-slate-300 group-hover:text-[#4681E8] transition-colors border-l border-slate-100",children:(0,a.jsx)("svg",{className:"w-5 h-5 fill-current",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{d:"M8 5v14l11-7z"})})})]})}let o=new Set(["1","2","3","4","5","7"]),c=new Set(["8","9","15"]),d=new Set(["51","52","53","54","55","56","57","58","59"]),x=new Set(["100","90","91","92","93","110"]);function h(e){let t=String(e.status_id);return 2>=parseInt(e.sport_id)?o.has(t):d.has(t)}function m({matches:e,matchIndex:t}){let[s,n]=(0,l.useState)("1"),[o,d]=(0,l.useState)("all"),[p,u]=(0,l.useState)(1);(0,l.useEffect)(()=>{u(1)},[s,o]);let{todayStart:g,tomorrowStart:b,dayAfterStart:f}=(0,l.useMemo)(()=>{let e,t,s,{vnTodayStartUTC:a,vnTomorrowStartUTC:l,vnDayAfterStartUTC:r}=(s=(t=Math.floor(Date.UTC((e=new Date(Date.now()+252e5)).getUTCFullYear(),e.getUTCMonth(),e.getUTCDate())/1e3)-25200)+86400,{vnTodayStartUTC:t,vnTomorrowStartUTC:s,vnDayAfterStartUTC:s+86400});return{todayStart:a,tomorrowStart:l,dayAfterStart:r}},[]),j=(0,l.useMemo)(()=>new Map(e.map(e=>[e?.match_key?String(e.match_key):e?.ls_id?String(e.ls_id):e?.id?`${String(e.sport_id||"0")}:${String(e.id)}`:e?.scheduleId?`${String(e.sport_id||"0")}:schedule:${String(e.scheduleId)}`:[String(e?.sport_id||"0"),String(e?.time||"0"),String(e?.home_name||""),String(e?.away_name||"")].join(":"),e])),[e]),w=t?.summary_by_sport?.[s],v=t?.bucket_keys_by_sport?.[s],N=t?.bucket_pages_by_sport?.[s],y=e.filter(e=>{let t;return String(e.sport_id)===s&&(t=String(e.status_id),2>=parseInt(e.sport_id)?!c.has(t):!x.has(t))}),_=y.filter(e=>{let t=parseInt(e.time);return t>=g&&t<b}),k=y.filter(e=>{let t=parseInt(e.time);return t>=b&&t<f}),E={all:y.length,live:y.filter(e=>h(e)).length,hot:y.filter(e=>"1"===String(e.hot)).length,today:_.length,tomorrow:k.length},C=(0,l.useMemo)(()=>{if(v){if("all"===o&&Array.isArray(N?.all)&&N.all.length>0)return N.all.slice(0,p).flat().map(e=>j.get(e)).filter(Boolean);let e=v[o];if(Array.isArray(e))return e.map(e=>j.get(e)).filter(Boolean)}return"all"===o?y:"live"===o?y.filter(e=>h(e)):"hot"===o?y.filter(e=>"1"===String(e.hot)):"today"===o?_:"tomorrow"===o?k:y},[o,y,j,N,v,_,k,p]),S="all"===o&&Array.isArray(N?.all)&&p<N.all.length,L=(0,l.useMemo)(()=>"all"!==o&&"live"!==o&&"hot"!==o?[]:C.filter(e=>
660"1"===String(e.hot)||h(e)).slice(0,4),[C,o]),$=(0,l.useMemo)(()=>{let e=new Map;return C.forEach(t=>{let s=t.source_card_meta?.league_label||t.match_data?.competition_vi||t.match_data?.competition_name||t.match_data?.competition_full||"Giải đấu kh\xe1c";e.has(s)||e.set(s,[]),e.get(s).push(t)}),Array.from(e.entries())},[C]);return(0,a.jsxs)("div",{className:"w-full min-h-[500px]",children:[(0,a.jsx)(r,{activeSport:s,onSportChange:n,activeStatus:o,onStatusChange:d,matchesCount:w||E}),0===C.length?(0,a.jsx)("div",{className:"py-20 text-center",children:(0,a.jsx)("div",{className:"text-slate-400 text-base font-medium",children:"Kh\xf4ng c\xf3 trận đấu n\xe0o."})}):(0,a.jsxs)("div",{className:"flex flex-col gap-6",children:[L.length>0&&"all"===o&&(0,a.jsxs)("div",{className:"mb-4",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 mb-3 px-1",children:[(0,a.jsx)("span",{className:"w-2 h-4 rounded-full bg-[#4681E8]"}),(0,a.jsx)("h2",{className:"text-slate-800 font-black text-sm uppercase tracking-wider",children:"Trận đấu t\xe2m điểm"})]}),(0,a.jsx)("div",{className:"grid grid-cols-1 xl:grid-cols-2 gap-2",children:L.map((e,t)=>(0,a.jsx)(i,{match:e},`featured-${e.ls_id||e.id}-${t}`))})]}),(0,a.jsx)("div",{className:"flex flex-col gap-5",children:$.map(([e,t])=>{let s=t[0]?.match_data?.competition_logo;return(0,a.jsxs)("div",{className:"rounded-xl overflow-hidden border border-slate-200 bg-white shadow-sm",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2.5 bg-[#0E1B33] px-4 py-2.5 border-b border-[#0E1B33]",children:[s&&(0,a.jsx)("img",{src:s,alt:"league",className:"w-4 h-4 object-contain brightness-200 opacity-80",loading:"lazy",decoding:"async"}),(0,a.jsx)("h3",{className:"text-white text-[12px] font-bold uppercase tracking-wider truncate",children:e})]}),(0,a.jsx)("div",{className:"flex flex-col",children:t.map((e,t)=>(0,a.jsx)(i,{match:e},e.ls_id||`${e.id}-${t}`))})]},e)})}),S&&(0,a.jsx)("div",{className:"flex justify-center mt-6",children:(0,a.jsx)("button",{type:"button",onClick:()=>u(e=>e+1),className:"inline-flex items-center justify-center rounded-xl border border-[#4681E8]/30 bg-white px-8 py-3 text-[12px] font-bold uppercase tracking-wider text-[#4681E8] transition-all duration-200 hover:bg-[#4681E8] hover:text-white hover:border-[#4681E8]",children:"Tải th\xeam"})})]})]})}},64624:(e,t,s)=>{"use strict";s.d(t,{Klivevip02ResultsPage:()=>o});var a=s(68019),l=s(10707),r=s(78637),n=s(10327),i=s(2047);function o({initialData:e,selectedLeague:t}){let s=(0,r.useRouter)(),c=(0,r.usePathname)(),d=(0,r.useSearchParams)(),[x,h]=(0,l.useTransition)(),[m,p]=(0,l.useState)(!1),[u,g]=(0,l.useState)(""),{availableLeagues:b,dateGroups:f}=(0,l.useMemo)(()=>(0,i.o8)(e),[e]),j=(0,l.useMemo)(()=>Array.from(new Set(f.map(e=>e.date_header))),[f]),w=d.get("date")||"",v=e=>{let t=new URLSearchParams(d.toString());e&&e!==w?t.set("date",e):t.delete("date"),h(()=>{let e=t.toString();s.push(e?`${c}?${e}`:c,{scroll:!1})})},N=(0,l.useMemo)(()=>{let e=f;return w&&(e=e.filter(e=>e.date_header===w)),(0,i.kK)(e,t)},[f,w,t]),y=(0,l.useMemo)(()=>{if(!u)return b;let e=u.toLowerCase();return b.filter(t=>t.name.toLowerCase().includes(e))},[b,u]),_=N.reduce((e,t)=>e+t.matches.length,0);if(0===f.length)return(0,a.jsxs)("div",{className:"max-w-[1440px] mx-auto px-4 py-8",children:[(0,a.jsx)(n.T,{eyebrow:"Kết quả",title:"KẾT QUẢ B\xd3NG Đ\xc1"}),(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center py-16 gap-4",children:[(0,a.jsx)("div",{className:"w-12 h-12 rounded-full border-2 border-[#E11D48]/30 border-t-[#E11D48] animate-spin"}),(0,a.jsx)("span",{className:"text-slate-500 text-sm font-medium tracking-wide",children:"Đang tải kết quả..."})]})]});let k=e=>{let t=new URLSearchParams(d.toString());e?t.set("league",e):t.delete("league"),p(!1),g(""),h(()=>{let e=t.toString();s.push(e?`${c}?${e}`:c,{scroll:!1})})};return(0,a.jsxs)("div",{className:"max-w-[1440px] mx-auto px-4 py-8",children:[(0,a.jsx)(n.T,{eyebrow:"Kết quả",title:"KẾT QUẢ B\xd3NG Đ\xc1",rightSlot:(0,a.jsx)("div",{className:"text-[12px] text-slate-600",children:(0,a.jsx)("span",{className:"text-slate-900/80 font-bold",children:t||"Tất cả giải đấu"})})}),(0,a.jsxs)("div",{className:"flex flex-col md:flex-row gap-4 mb-4 items-start md:items-center justify-between",children:[j.length>0&&(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,a.jsx)("button",{type:"button",onClick:()=>v(""),className:`px-4 py-2 rounded-xl text-sm font-bold transition-all duration-300 ${!w?"bg-gradient-to-r from-[#4681E8] to-[#2563eb] text-white shadow-[0_4px_15px_rgba(70,129,232,0.4)] border border-[#4681E8]/50":"bg-white text-[#64748B] border border-slate-200 hover:bg-slate-50 hover:text-slate-800"}`,children:"Tất cả ng\xe0y"}),j.slice(0,5).map(e=>(0,a.jsx)("button",{type:"button",onClick:()=>v(e),className:`px-4 py-2 rounded-xl text-sm font-bold transition-all duration-300 ${w===e?"bg-gradient-to-r from-[#4681E8] to-[#2563eb] text-white shadow-[0_4px_15px_rgba(70,129,232,0.4)] border border-[#4681E8]/50":"bg-white text-[#64748B] border border-slate-200 hover:bg-slate-50 hover:text-slate-800"}`,children:e},e))]}),(0,a.jsxs)("div",{className:"relative w-full md:w-[320px]",children:[(0,a.jsxs)("button",{onClick:()=>p(!m),className:"w-full flex items-center gap-3 bg-white hover:bg-slate-50 px-4 py-2.5 rounded-xl border border-slate-200 shadow-inner transition-all text-sm",children:[(0,a.jsx)("svg",{className:"w-5 h-5 text-[#4681E8]",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 4a1 1 0 011-1h16a1 1 0 011 1v2.586a1 1 0 01-.293.707l-6.414 6.414a1 1 0 00-.293.707V17l-4 4v-6.586a1 1 0 00-.293-.707L3.293 7.293A1 1 0 013 6.586V4z"})}),(0,a.jsx)("span",{className:"text-slate-700 font-bold flex-1 text-left truncate",children:t||"Chọn giải đấu..."}),(0,a.jsx)("svg",{className:`w-4 h-4 text-slate-400 transition-transform ${m?"rotate-180":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),m&&(0,a.jsxs)("div",{className:"absolute top-full left-0 right-0 mt-2 bg-white border border-slate-200 rounded-2xl shadow-xl z-50 max-h-[300px] overflow-hidden flex flex-col",children:[(0,a.jsx)("div",{className:"p-2 border-b border-slate-100",children:(0,a.jsx)("input",{type:"text",placeholder:"T\xecm giải đấu...",value:u,onChange:e=>g(e.target.value),className:"w-full bg-slate-50 border border-transparent roun
660ded-xl px-4 py-2.5 text-sm text-slate-800 placeholder-slate-400 outline-none focus:border-[#4681E8]/50 transition-colors"})}),(0,a.jsxs)("div",{className:"overflow-y-auto flex-1 pb-2",children:[(0,a.jsx)("button",{type:"button",onClick:()=>k(),className:`block w-full text-left px-4 py-3 text-sm transition-colors ${!t?"bg-[#4681E8]/10 text-[#4681E8] border-l-4 border-[#4681E8]":"text-slate-600 hover:bg-slate-50 hover:text-slate-800"}`,children:"Tất cả giải đấu"}),y.map((e,s)=>(0,a.jsxs)("button",{type:"button",onClick:()=>k(e.name),className:`flex items-center gap-3 px-4 py-3 text-sm transition-colors cursor-pointer ${t===e.name?"bg-[#4681E8]/10 text-[#4681E8] border-l-4 border-[#4681E8]":"text-slate-600 hover:bg-slate-50 hover:text-slate-800"}`,children:[e.icon?(0,a.jsx)("img",{src:e.icon,alt:e.name||"League",className:"w-5 h-5 object-contain shrink-0",loading:"lazy",decoding:"async"}):(0,a.jsx)("div",{className:"w-5 h-5 rounded-md bg-slate-200 shrink-0"}),(0,a.jsx)("span",{className:"truncate",children:e.name})]},s))]})]})]})]}),x&&(0,a.jsxs)("div",{className:"mb-4 inline-flex items-center gap-2 rounded-full border border-slate-200 bg-white px-4 py-2 text-xs text-slate-500 shadow-sm",children:[(0,a.jsx)("span",{className:"h-2 w-2 rounded-full bg-[#E11D48] animate-pulse shadow-[0_0_8px_rgba(225,29,72,0.8)]"}),(0,a.jsx)("span",{className:"font-bold tracking-wide",children:"Đang tải kết quả từ server..."})]}),(0,a.jsx)("div",{className:"space-y-4",children:0===N.length?(0,a.jsx)("div",{className:"text-center py-16 text-[#64748B] font-medium tracking-wide",children:"Kh\xf4ng c\xf3 kết quả n\xe0o"}):N.map((e,t)=>(0,a.jsxs)("div",{className:"overflow-hidden rounded-2xl border border-slate-200 bg-white shadow-[0_8px_30px_rgba(0,0,0,0.06)]",children:[(0,a.jsx)("div",{className:"bg-slate-50 px-5 py-3 border-b border-slate-100 flex items-center justify-between",children:(0,a.jsxs)("span",{className:"text-[12px] text-slate-500 font-bold uppercase tracking-widest",children:[e.league_round?e.league_round:"V\xf2ng đấu",(0,a.jsx)("span",{className:"text-[#E11D48] ml-2 font-mono text-[11px] bg-[#E11D48]/10 px-2 py-0.5 rounded-full border border-[#E11D48]/20",children:e.date_header})]})}),e.matches.map((e,t)=>{var s;return(0,a.jsx)("div",{className:"bg-transparent hover:bg-slate-50 border-b border-slate-100 last:border-0 transition-colors group cursor-default",children:(0,a.jsxs)("div",{className:"flex items-center py-4 px-5 gap-4",children:[(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center min-w-[56px] shrink-0 border-r border-slate-100 pr-4",children:[(0,a.jsx)("span",{className:"text-[9px] text-slate-400 uppercase tracking-widest mb-1 font-bold",children:"L\xfac"}),(0,a.jsx)("span",{className:"text-[13px] text-slate-700 font-mono font-black",children:e.time})]}),(0,a.jsxs)("div",{className:"flex-1 flex items-center justify-end gap-3 min-w-0",children:[(0,a.jsx)("span",{className:"text-[14px] text-slate-800 font-bold truncate text-right group-hover:text-slate-900 transition-colors",children:e.home_team}),e.home_logo?(0,a.jsx)("div",{className:"w-8 h-8 rounded-full bg-slate-100 border border-slate-200 p-1 flex items-center justify-center shadow-sm",children:(0,a.jsx)("img",{src:e.home_logo,alt:e.home_team||"Home team",className:"w-full h-full object-contain",loading:"lazy"})}):(0,a.jsx)("div",{className:"w-8 h-8 rounded-full bg-slate-100 shrink-0 border border-slate-200 flex items-center justify-center text-[10px] font-bold text-slate-400",children:"?"})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center min-w-[90px] shrink-0 bg-slate-50 rounded-xl py-2 px-2 border border-slate-200 shadow-inner group-hover:border-[#4681E8]/40 transition-colors",children:[(0,a.jsx)("span",{className:`text-[22px] leading-none font-black tracking-widest drop-shadow-[0_2px_4px_rgba(0,0,0,0.8)] ${!(s=e.score)||"-"===s?"text-slate-400":"text-slate-800"}`,children:e.score}),e.ht_score&&(0,a.jsxs)("span",{className:"text-[10px] text-slate-500 font-mono mt-1 font-bold",children:["HT: ",e.ht_score]})]}),(0,a.jsxs)("div",{className:"flex-1 flex items-center gap-3 min-w-0",children:[e.away_logo?(0,a.jsx)("div",{className:"w-8 h-8 rounded-full bg-slate-100 border border-slate-200 p-1 flex items-center justify-center shadow-sm",children:(0,a.jsx)("img",{src:e.away_logo,alt:e.away_team||"Away team",className:"w-full h-full object-contain",loading:"lazy"})}):(0,a.jsx)("div",{className:"w-8 h-8 rounded-full bg-slate-100 shrink-0 border border-slate-200 flex items-center justify-center text-[10px] font-bold text-slate-400",children:"?"}),(0,a.jsx)("span",{className:"text-[14px] text-slate-800 font-bold truncate text-left group-hover:text-slate-900 transition-colors",children:e.away_team})]})]})},t)})]},t))}),(0,a.jsxs)("div",{className:"mt-6 text-center text-xs text-[#64748B] font-bold uppercase tracking-widest drop-shadow-sm",children:["Hiển thị ",_," kết quả trận đấu"]})]})}},64807:(e,t,s)=>{"use strict";s.d(t,{StandingsClient:()=>h});var a=s(68019),l=s(10707),r=s(46914),n=s(88435);function i(e){return"W"===e?"border border-emerald-500/45 bg-emerald-500/25 text-emerald-300 shadow-[0_0_0_1px_rgba(16,185,129,0.08)_inset]":"L"===e?"border border-red-500/45 bg-red-500/25 text-red-300 shadow-[0_0_0_1px_rgba(239,68,68,0.08)_inset]":"D"===e?"border border-amber-400/45 bg-amber-400/22 text-amber-200 shadow-[0_0_0_1px_rgba(251,191,36,0.08)_inset]":"border border-slate-500/40 bg-slate-500/18 text-slate-700"}function o(e,t){return 1===e?{bar:"bg-[linear-gradient(180deg,#facc15,#f97316)]",badge:"border-emerald-600/60 bg-slate-100 text-yellow-700 shadow-[0_0_18px_rgba(250,204,21,0.14)]",row:"from-[#32230d]/70 via-trans
660parent to-transparent"}:e<=4?{bar:"bg-[linear-gradient(180deg,#fb7185,#f97316)]",badge:"border-[#fb7185]/45 bg-slate-100 text-rose-700",row:"from-[#241318]/55 via-transparent to-transparent"}:e<=6?{bar:"bg-[linear-gradient(180deg,#f59e0b,#facc15)]",badge:"border-[#f59e0b]/45 bg-slate-100 text-yellow-700",row:"from-[#24190b]/45 via-transparent to-transparent"}:e<=10?{bar:"bg-[linear-gradient(180deg,#38bdf8,#2563eb)]",badge:"border-sky-400/40 bg-white text-sky-700",row:"from-[#101725]/32 via-transparent to-transparent"}:e>=Math.max(t-2,1)?{bar:"bg-[linear-gradient(180deg,#ef4444,#7f1d1d)]",badge:"border-red-500/40 bg-slate-100 text-red-700",row:"from-[#220f14]/45 via-transparent to-transparent"}:{bar:"bg-[linear-gradient(180deg,#64748b,#334155)]",badge:"border-slate-500/35 bg-white text-slate-700",row:"from-[#12161d]/24 via-transparent to-transparent"}}function c({detail:e}){let[t,s]=(0,l.useState)(!1),n=(0,l.useRef)(null),[o,d]=(0,l.useState)({top:0,left:0}),x=i(e.result),h=(0,l.useCallback)(()=>{if(n.current){let e=n.current.getBoundingClientRect();d({top:e.top+window.scrollY-8,left:e.left+e.width/2+window.scrollX})}s(!0)},[]);return(0,a.jsxs)("div",{ref:n,className:"relative inline-flex",onMouseEnter:h,onMouseLeave:()=>s(!1),children:[(0,a.jsx)("span",{className:`inline-flex h-7 w-7 items-center justify-center rounded-[8px] text-[11px] font-black cursor-pointer transition-transform hover:-translate-y-0.5 ${x}`,children:e.result}),t&&e.match_time&&"u">typeof document&&(0,r.createPortal)((0,a.jsxs)("div",{className:"fixed z-[9999] w-[220px] pointer-events-none",style:{top:`${o.top}px`,left:`${o.left}px`,transform:"translate(-50%, -100%)",position:"absolute"},children:[(0,a.jsxs)("div",{className:"overflow-hidden rounded-xl border border-[#cbd5e1] bg-white shadow-2xl",children:[(0,a.jsx)("div",{className:"bg-slate-100 px-3 py-1.5 text-[10px] text-slate-600 font-mono text-center border-b border-[#cbd5e1]",children:e.match_time}),(0,a.jsxs)("div",{className:"px-3 py-2.5 flex items-center justify-between gap-2",children:[(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5 flex-1 min-w-0",children:[e.home_logo?(0,a.jsx)("img",{src:e.home_logo,alt:e.home_team,className:"w-7 h-7 object-contain",loading:"lazy",decoding:"async"}):(0,a.jsx)("div",{className:"w-7 h-7 rounded-full bg-gray-700 flex items-center justify-center text-[8px] text-slate-600 font-bold",children:"?"}),(0,a.jsx)("span",{className:"text-[9px] text-slate-600 font-bold text-center leading-tight line-clamp-2 max-w-[70px]",children:e.home_team})]}),(0,a.jsx)("div",{className:"text-slate-900 font-black text-sm whitespace-nowrap px-1",children:e.score||"? - ?"}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5 flex-1 min-w-0",children:[e.away_logo?(0,a.jsx)("img",{src:e.away_logo,alt:e.away_team,className:"w-7 h-7 object-contain",loading:"lazy",decoding:"async"}):(0,a.jsx)("div",{className:"w-7 h-7 rounded-full bg-gray-700 flex items-center justify-center text-[8px] text-slate-600 font-bold",children:"?"}),(0,a.jsx)("span",{className:"text-[9px] text-slate-600 font-bold text-center leading-tight line-clamp-2 max-w-[70px]",children:e.away_team})]})]})]}),(0,a.jsx)("div",{className:"absolute left-1/2 -translate-x-1/2 -bottom-1 w-2 h-2 bg-white border-r border-b border-[#cbd5e1] rotate-45"})]}),document.body)]})}function d({result:e}){let t=i(e);return(0,a.jsx)("span",{className:`inline-flex h-7 w-7 items-center justify-center rounded-[8px] text-[11px] font-black ${t}`,children:e})}function x({value:e,totalTeams:t}){let s=Number(e);if(!Number.isFinite(s))return(0,a.jsx)("td",{className:"px-4 py-4 text-center font-mono font-black text-slate-400",children:e});let l=o(s,t);return(0,a.jsxs)("td",{className:"relative px-4 py-4 text-center font-mono",children:[(0,a.jsx)("span",{className:`absolute left-0 top-1/2 h-7 w-1 -translate-y-1/2 rounded-r-full ${l.bar}`}),(0,a.jsx)("span",{className:`inline-flex h-8 w-8 items-center justify-center rounded-[10px] border text-[13px] font-black ${l.badge}`,children:s})]})}function h({initialData:e}){let[t]=(0,l.useState)(!1),[s,r]=(0,l.useState)(!1),[i,p]=(0,l.useState)(""),u=(0,l.useRef)(null);if((0,l.useEffect)(()=>{function e(e){u.current&&!u.current.contains(e.target)&&r(!1)}return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[]),!e)return(0,a.jsx)("div",{className:"text-center py-20 text-slate-600",children:"Đang tải dữ liệu..."});let g=e.available_leagues||[],b=g.filter(e=>e.name.toLowerCase().includes(i.toLowerCase())),f=e.teams&&e.teams.length>0&&Array.isArray(e.teams[0]?.form),j=!f&&e.rankings;return(0,a.jsxs)("div",{className:"mx-auto max-w-[1440px] px-4 py-8",children:[(0,a.jsx)(n.H,{eyebrow:"Bảng xếp hạng",title:"BẢNG XẾP HẠNG",rightSlot:(0,a.jsx)("div",{className:"text-[12px] text-slate-600",children:(0,a.jsx)("span",{className:"text-slate-900/80 font-bold",children:e.league_name})})}),g.length>0&&(0,a.jsxs)("div",{className:"mb-6",ref:u,children:[(0,a.jsxs)("div",{className:"relative inline-flex min-w-[320px] items-center gap-3 rounded-2xl border border-slate-200 bg-white backdrop-blur-md px-5 py-3.5 cursor-pointer shadow-[0_8px_30px_rgba(0,0,0,0.06)] transition-colors hover:border-[#4681E8]/50 hover:shadow-[0_8px_30px_rgba(70,129,232,0.1)]",onClick:()=>r(!s),children:[e.league_icon&&(0,a.jsx)("img",{src:e.league_icon,alt:e.league_name||"League icon",className:"w-6 h-6 object-contain",loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-slate-800 font-bold text-sm flex-1",children:e.league_name||"Chọn giải đấu"}),(0,a.jsx)("svg",{className:`w-4 h-4 text-[#4681E8] transition-transform ${s?"rotate-180":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),s&&(0,a.jsxs)("div",{className:"absolute z-50 mt-2 w-[360px] overflow-hidden rounded-2xl border border-slate-200 bg-white backdrop-blur-xl shadow-[0_24px_80px_rgba(0,0,0,0.15)]",children:[(0,a.jsx)("div",{className:"p-2 border-b border-slate-100",children:(0,a.jsx)("input",{type:"text",placeholder:"T\xecm kiếm giải đấu...",value:i,onChange:e=>p(e.target.value),className:"w-full bg-slate-50 text-slate-800 text-sm px-4 py-2.5 rounded-xl border border-transparent outline-none focus:border-[#4681E8]/50 placeholder-slate-400 transition-colors",autoF
660ocus:!0})}),(0,a.jsxs)("div",{className:"max-h-[340px] overflow-y-auto",children:[b.map(t=>(0,a.jsxs)("a",{href:`/standings?league=${encodeURIComponent(t.id)}`,className:`flex items-center gap-3 px-4 py-3 cursor-pointer transition-colors hover:bg-slate-50 ${t.id===e.league_id?"bg-[#4681E8]/10 border-l-4 border-[#4681E8]":""}`,children:[t.icon?(0,a.jsx)("img",{src:t.icon,alt:t.name||"League",className:"w-5 h-5 object-contain flex-shrink-0",loading:"lazy",decoding:"async"}):(0,a.jsx)("div",{className:"w-5 h-5 rounded bg-gray-700 flex-shrink-0"}),(0,a.jsx)("span",{className:"text-sm text-slate-900 truncate",children:t.name})]},t.id)),0===b.length&&(0,a.jsx)("div",{className:"px-4 py-8 text-center text-gray-500 text-sm",children:"Kh\xf4ng t\xecm thấy giải đấu"})]})]})]}),t&&(0,a.jsxs)("div",{className:"flex items-center justify-center py-12",children:[(0,a.jsx)("div",{className:"animate-spin w-8 h-8 border-2 border-emerald-600 border-t-transparent rounded-full"}),(0,a.jsx)("span",{className:"ml-3 text-slate-600 text-sm",children:"Đang tải bảng xếp hạng từ server..."})]}),!t&&f&&(0,a.jsxs)("div",{className:"overflow-hidden rounded-[24px] border border-slate-200 bg-white shadow-[0_8px_30px_rgba(0,0,0,0.08)]",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between gap-3 border-b border-[#4681E8]/20 bg-gradient-to-r from-[#4681E8] to-[#2563eb] px-6 py-4 text-white shadow-[0_4px_25px_rgba(70,129,232,0.3)]",children:[(0,a.jsx)("div",{className:"text-[13px] font-black uppercase tracking-[0.2em] drop-shadow-sm text-white/80",children:"League"}),(0,a.jsx)("div",{className:"truncate text-sm font-black sm:text-base drop-shadow-md",children:e.league_name})]}),(0,a.jsx)("div",{className:"overflow-x-auto",children:(0,a.jsxs)("table",{className:"w-full text-left border-collapse",children:[(0,a.jsx)("thead",{children:(0,a.jsx)("tr",{className:"bg-slate-50 text-[11px] uppercase tracking-[0.2em] text-slate-500",children:e.header.map((t,s)=>{let l=e.teams.some(e=>e.form&&e.form.length>0);return t.toLowerCase().includes("phong độ")&&!l?null:(0,a.jsx)("th",{colSpan:s===e.header.length-1&&l?5:1,className:`p-4 font-semibold ${1===s?"w-1/3 text-left":"text-center"}`,children:t},s)})})}),(0,a.jsx)("tbody",{className:"text-sm",children:e.teams.map((t,s)=>(o(Number(t.data[0]||s+1),e.teams.length),(0,a.jsxs)("tr",{className:"group border-b border-slate-100 bg-white transition-colors hover:bg-slate-50 cursor-pointer",children:[t.data.map((s,l)=>0===l?(0,a.jsx)(x,{value:s,totalTeams:e.teams.length},l):1===l?(0,a.jsx)("td",{className:"p-4",children:(0,a.jsxs)("div",{className:"flex items-center gap-3 rounded-2xl border border-slate-100 bg-slate-50 px-4 py-2.5 transition-colors group-hover:border-[#4681E8]/30 group-hover:bg-[#4681E8]/5",children:[t.team_logo?(0,a.jsx)("img",{src:t.team_logo,alt:s,className:"h-8 w-8 rounded-full bg-white object-contain p-0.5 filter drop-shadow-[0_2px_4px_rgba(0,0,0,0.1)]",loading:"lazy"}):(0,a.jsx)("div",{className:"flex h-8 w-8 items-center justify-center rounded-full border border-slate-200 bg-white text-[10px] font-bold text-slate-400",children:"?"}),(0,a.jsx)("span",{className:"font-bold text-slate-800 transition-colors group-hover:text-[#4681E8]",children:s})]})},l):(0,a.jsx)("td",{className:"p-4 text-center font-mono text-slate-600",children:s},l)),t.form&&t.form.length>0&&(0,a.jsxs)(a.Fragment,{children:[t.form.map((e,t)=>(0,a.jsx)("td",{className:"p-2 text-center",children:e.match_time?(0,a.jsx)(c,{detail:e}):(0,a.jsx)(d,{result:e.result})},`form-${t}`)),t.form.length<5&&Array.from({length:5-t.form.length}).map((e,t)=>(0,a.jsx)("td",{className:"p-2"},`pad-${t}`))]})]},s)))})]})})]}),!t&&!f&&j&&(0,a.jsx)(m,{rankings:e.rankings}),!t&&!f&&!j&&e.header&&e.teams&&(0,a.jsx)("div",{className:"text-center py-20 text-slate-600",children:"Dữ liệu đang được cập nhật..."}),!t&&(f||j)&&(0,a.jsxs)("div",{className:"mt-6 flex flex-wrap items-center gap-5 px-5 py-4 bg-slate-50 rounded-2xl border border-slate-200",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,a.jsx)("span",{className:"w-2.5 h-2.5 rounded-full bg-emerald-500"}),(0,a.jsx)("span",{className:"text-[11px] text-slate-600 font-bold uppercase tracking-wider",children:"Đội trưởng bảng"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,a.jsx)("span",{className:"w-2.5 h-2.5 rounded-full bg-sky-4
66000"}),(0,a.jsx)("span",{className:"text-[11px] text-slate-600 font-bold uppercase tracking-wider",children:"Champions League"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,a.jsx)("span",{className:"w-2.5 h-2.5 rounded-full bg-amber-500"}),(0,a.jsx)("span",{className:"text-[11px] text-slate-600 font-bold uppercase tracking-wider",children:"Europa League"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,a.jsx)("span",{className:"w-2.5 h-2.5 rounded-full bg-[#f97316]"}),(0,a.jsx)("span",{className:"text-[11px] text-slate-600 font-bold uppercase tracking-wider",children:"Europa Conference"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,a.jsx)("span",{className:"w-2.5 h-2.5 rounded-full bg-[#E11D48]"}),(0,a.jsx)("span",{className:"text-[11px] text-slate-600 font-bold uppercase tracking-wider",children:"Xuống hạng"})]})]})]})}function m({rankings:e}){if(!e||0===e.length)return null;let t=e[0].data,s=e.slice(1);return(0,a.jsx)("div",{className:"overflow-hidden rounded-[22px] border border-[#cbd5e1] bg-[linear-gradient(180deg,#191a20,#111218)] shadow-[0_24px_80px_rgba(0,0,0,0.4)]",children:(0,a.jsx)("div",{className:"overflow-x-auto",children:(0,a.jsxs)("table",{className:"w-full text-left border-collapse",children:[(0,a.jsx)("thead",{children:(0,a.jsx)("tr",{className:"bg-white text-[11px] uppercase tracking-[0.18em] text-slate-600",children:t.map((e,l)=>{let r=l===t.length-1,n=s[0]&&s[0].data.length>t.length?s[0].data.length-t.length+1:1;return(0,a.jsx)("th",{colSpan:r?n:1,className:`p-4 font-semibold ${1===l?"w-1/3 text-left":"text-center"}`,children:e},l)})})}),(0,a.jsx)("tbody",{className:"text-sm",children:s.map((e,t)=>(0,a.jsx)("tr",{className:"group border-b border-[#cbd5e1] transition-colors hover:bg-white",children:e.data.map((t,l)=>0===l?(0,a.jsx)(x,{value:t,totalTeams:s.length},l):1===l?(0,a.jsx)("td",{className:"p-4",children:(0,a.jsxs)("div",{className:"flex items-center gap-3 rounded-2xl border border-white/6 bg-[linear-gradient(180deg,rgba(255,255,255,0.03),rgba(255,255,255,0.01))] px-3 py-2 transition-colors group-hover:border-emerald-600/22",children:[e.team_logo?(0,a.jsx)("img",{src:e.team_logo,alt:t,className:"h-8 w-8 rounded-full bg-white/5 object-contain ring-1 ring-white/8",loading:"lazy"}):(0,a.jsx)("div",{className:"flex h-8 w-8 items-center justify-center rounded-full border border-gray-700 bg-gray-800 text-xs font-bold text-gray-500",children:"?"}),(0,a.jsx)("span",{className:"font-bold text-slate-900 transition-colors group-hover:text-emerald-600",children:t})]})},l):["W","D","L"].includes(t)?(0,a.jsx)("td",{className:"p-2 text-center",children:(0,a.jsx)("span",{className:`inline-flex h-7 w-7 items-center justify-center rounded-[8px] text-[11px] font-black ${i(t)}`,children:t})},l):(0,a.jsx)("td",{className:"p-4 text-center font-mono text-slate-600",children:t},l))},t))})]})})})}},65505:(e,t,s)=>{"use strict";s.d(t,{StandingsClient:()=>h});var a=s(68019),l=s(10707),r=s(46914),n=s(10327);function i(e){return"W"===e?"border border-emerald-500/45 bg-emerald-500/25 text-emerald-300 shadow-[0_0_0_1px_rgba(16,185,129,0.08)_inset]":"L"===e?"border border-red-500/45 bg-red-500/25 text-red-300 shadow-[0_0_0_1px_rgba(239,68,68,0.08)_inset]":"D"===e?"border border-amber-400/45 bg-amber-400/22 text-amber-200 shadow-[0_0_0_1px_rgba(251,191,36,0.08)_inset]":"border border-slate-500/40 bg-slate-500/18 text-slate-700"}function o(e,t){return 1===e?{bar:"bg-[linear-gradient(180deg,#facc15,#f97316)]",badge:"border-emerald-600/60 bg-slate-100 text-yellow-700 shadow-[0_0_18px_rgba(250,204,21,0.14)]",row:"from-[#32230d]/70 via-transparent to-transparent"}:e<=4?{bar:"bg-[linear-gradient(180deg,#fb7185,#f97316)]",badge:"border-[#fb7185]/45 bg-slate-100 text-rose-700",row:"from-[#241318]/55 via-transparent to-transparent"}:e<=6?{bar:"bg-[linear-gradient(180deg,#f59e0b,#facc15)]",badge:"border-[#f59e0b]/45 bg-slate-100 text-yellow-700",row:"from-[#24190b]/45 via-transparent to-transparent"}
660:e<=10?{bar:"bg-[linear-gradient(180deg,#38bdf8,#2563eb)]",badge:"border-sky-400/40 bg-white text-sky-700",row:"from-[#101725]/32 via-transparent to-transparent"}:e>=Math.max(t-2,1)?{bar:"bg-[linear-gradient(180deg,#ef4444,#7f1d1d)]",badge:"border-red-500/40 bg-slate-100 text-red-700",row:"from-[#220f14]/45 via-transparent to-transparent"}:{bar:"bg-[linear-gradient(180deg,#64748b,#334155)]",badge:"border-slate-500/35 bg-white text-slate-700",row:"from-[#12161d]/24 via-transparent to-transparent"}}function c({detail:e}){let[t,s]=(0,l.useState)(!1),n=(0,l.useRef)(null),[o,d]=(0,l.useState)({top:0,left:0}),x=i(e.result),h=(0,l.useCallback)(()=>{if(n.current){let e=n.current.getBoundingClientRect();d({top:e.top+window.scrollY-8,left:e.left+e.width/2+window.scrollX})}s(!0)},[]);return(0,a.jsxs)("div",{ref:n,className:"relative inline-flex",onMouseEnter:h,onMouseLeave:()=>s(!1),children:[(0,a.jsx)("span",{className:`inline-flex h-7 w-7 items-center justify-center rounded-[8px] text-[11px] font-black cursor-pointer transition-transform hover:-translate-y-0.5 ${x}`,children:e.result}),t&&e.match_time&&"u">typeof document&&(0,r.createPortal)((0,a.jsxs)("div",{className:"fixed z-[9999] w-[220px] pointer-events-none",style:{top:`${o.top}px`,left:`${o.left}px`,transform:"translate(-50%, -100%)",position:"absolute"},children:[(0,a.jsxs)("div",{className:"overflow-hidden rounded-xl border border-[#cbd5e1] bg-white shadow-2xl",children:[(0,a.jsx)("div",{className:"bg-slate-100 px-3 py-1.5 text-[10px] text-slate-600 font-mono text-center border-b border-[#cbd5e1]",children:e.match_time}),(0,a.jsxs)("div",{className:"px-3 py-2.5 flex items-center justify-between gap-2",children:[(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5 flex-1 min-w-0",children:[e.home_logo?(0,a.jsx)("img",{src:e.home_logo,alt:e.home_team,className:"w-7 h-7 object-contain",loading:"lazy",decoding:"async"}):(0,a.jsx)("div",{className:"w-7 h-7 rounded-full bg-gray-700 flex items-center justify-center text-[8px] text-slate-600 font-bold",children:"?"}),(0,a.jsx)("span",{className:"text-[9px] text-slate-600 font-bold text-center leading-tight line-clamp-2 max-w-[70px]",children:e.home_team})]}),(0,a.jsx)("div",{className:"text-slate-900 font-black text-sm whitespace-nowrap px-1",children:e.score||"? - ?"}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5 flex-1 min-w-0",children:[e.away_logo?(0,a.jsx)("img",{src:e.away_logo,alt:e.away_team,className:"w-7 h-7 object-contain",loading:"lazy",decoding:"async"}):(0,a.jsx)("div",{className:"w-7 h-7 rounded-full bg-gray-700 flex items-center justify-center text-[8px] text-slate-600 font-bold",children:"?"}),(0,a.jsx)("span",{className:"text-[9px] text-slate-600 font-bold text-center leading-tight line-clamp-2 max-w-[70px]",children:e.away_team})]})]})]}),(0,a.jsx)("div",{className:"absolute left-1/2 -translate-x-1/2 -bottom-1 w-2 h-2 bg-white border-r border-b border-[#cbd5e1] rotate-45"})]}),document.body)]})}function d({result:e}){let t=i(e);return(0,a.jsx)("span",{className:`inline-flex h-7 w-7 items-center justify-center rounded-[8px] text-[11px] font-black ${t}`,children:e})}function x({value:e,totalTeams:t}){let s=Number(e);if(!Number.isFinite(s))return(0,a.jsx)("td",{className:"px-4 py-4 text-center font-mono font-black text-slate-400",children:e});let l=o(s,t);return(0,a.jsxs)("td",{className:"relative px-4 py-4 text-center font-mono",children:[(0,a.jsx)("span",{className:`absolute left-0 top-1/2 h-7 w-1 -translate-y-1/2 rounded-r-full ${l.bar}`}),(0,a.jsx)("span",{className:`inline-flex h-8 w-8 items-center justify-center rounded-[10px] border text-[13px] font-black ${l.badge}`,children:s})]})}function h({initialData:e}){let[t]=(0,l.useState)(!1),[s,r]=(0,l.useState)(!1),[i,p]=(0,l.useState)(""),u=(0,l.useRef)(null);if((0,l.useEffect)(()=>{function e(e){u.current&&!u.current.contains(e.target)&&r(!1)}return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[]),!e)return(0,a.jsx)("div",{className:"text-center py-20 text-slate-600",children:"Đang tải dữ liệu..."});let g=e.available_leagues||[],b=g.filter(e=>e.name.toLowerCase().includes(i.toLowerCase())),f=e.teams&&e.teams.length>0&&Array.isArray(e.teams[0]?.form),j=!f&&e.rankings;return(0,a.jsxs)("div",{className:"mx-auto max-w-[1440px] px-4 py-8",children:[(0,a.jsx)(n.T,{eyebrow:"Bảng xếp hạng",title:"BẢNG XẾP HẠNG",rightSlot:(0,a.jsx)("div",{className:"text-[12px] text-slate-600",children:(0,a.jsx)("span",{className:"text-slate-900/80 font-bold",children:e.league_name})})}),g.length>0&&(0,a.jsxs)("div",{className:"mb-6",ref:u,children:[(0,a.jsxs)("div",{className:"relative inline-flex min-w-[320px] items-center gap-3 rounded-2xl border border-slate-200 bg-white backdrop-blur-md px-5 py-3.5 cursor-pointer shadow-[0_8px_30px_rgba(0,0,0,0.06)] transition-colors hover:border-[#4681E8]/50 hover:shadow-[0_8px_30px_rgba(70,129,232,0.1)]",onClick:()=>r(!s),children:[e.league_icon&&(0,a.jsx)("img",{src:e.league_icon,alt:e.league_name||"League icon",className:"w-6 h-6 object-contain",loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-slate-800 font-bold text-sm flex-1",children:e.league_name||"Chọn giải đấu"}),(0,a.jsx)("svg",{className:`w-4 h-4 text-[#4681E8] transition-transform ${s?"rotate-180":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),s&&(0,a.jsxs)("div",{className:"absolute z-50 mt-2 w-[360px] overflow-hidden rounded-2xl border border-slate-200 bg-white backdrop-blur-xl shadow-[0_24px_80px_rgba(0,0,0,0.15)]",children:[(0,a.jsx)("div",{className:"p-2 border-b border-slate-100",children:(0,a.jsx)("input",{type:"text",placeholder:"T\xecm kiếm giải đấu...",value:i,onChange:e=>p(e.target.value),className:"w-full bg-slate-50 text-slate-800 text-sm px-4 py-2.5 rounded-xl border border-transparent outline-none focus:border-[#4681E8]/50 placeholder-slate-400 transition-colors",autoF
660ocus:!0})}),(0,a.jsxs)("div",{className:"max-h-[340px] overflow-y-auto",children:[b.map(t=>(0,a.jsxs)("a",{href:`/standings?league=${encodeURIComponent(t.id)}`,className:`flex items-center gap-3 px-4 py-3 cursor-pointer transition-colors hover:bg-slate-50 ${t.id===e.league_id?"bg-[#4681E8]/10 border-l-4 border-[#4681E8]":""}`,children:[t.icon?(0,a.jsx)("img",{src:t.icon,alt:t.name||"League",className:"w-5 h-5 object-contain flex-shrink-0",loading:"lazy",decoding:"async"}):(0,a.jsx)("div",{className:"w-5 h-5 rounded bg-gray-700 flex-shrink-0"}),(0,a.jsx)("span",{className:"text-sm text-slate-900 truncate",children:t.name})]},t.id)),0===b.length&&(0,a.jsx)("div",{className:"px-4 py-8 text-center text-gray-500 text-sm",children:"Kh\xf4ng t\xecm thấy giải đấu"})]})]})]}),t&&(0,a.jsxs)("div",{className:"flex items-center justify-center py-12",children:[(0,a.jsx)("div",{className:"animate-spin w-8 h-8 border-2 border-emerald-600 border-t-transparent rounded-full"}),(0,a.jsx)("span",{className:"ml-3 text-slate-600 text-sm",children:"Đang tải bảng xếp hạng từ server..."})]}),!t&&f&&(0,a.jsxs)("div",{className:"overflow-hidden rounded-[24px] border border-slate-200 bg-white shadow-[0_8px_30px_rgba(0,0,0,0.08)]",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between gap-3 border-b border-[#4681E8]/20 bg-gradient-to-r from-[#4681E8] to-[#2563eb] px-6 py-4 text-white shadow-[0_4px_25px_rgba(70,129,232,0.3)]",children:[(0,a.jsx)("div",{className:"text-[13px] font-black uppercase tracking-[0.2em] drop-shadow-sm text-white/80",children:"League"}),(0,a.jsx)("div",{className:"truncate text-sm font-black sm:text-base drop-shadow-md",children:e.league_name})]}),(0,a.jsx)("div",{className:"overflow-x-auto",children:(0,a.jsxs)("table",{className:"w-full text-left border-collapse",children:[(0,a.jsx)("thead",{children:(0,a.jsx)("tr",{className:"bg-slate-50 text-[11px] uppercase tracking-[0.2em] text-slate-500",children:e.header.map((t,s)=>{let l=e.teams.some(e=>e.form&&e.form.length>0);return t.toLowerCase().includes("phong độ")&&!l?null:(0,a.jsx)("th",{colSpan:s===e.header.length-1&&l?5:1,className:`p-4 font-semibold ${1===s?"w-1/3 text-left":"text-center"}`,children:t},s)})})}),(0,a.jsx)("tbody",{className:"text-sm",children:e.teams.map((t,s)=>(o(Number(t.data[0]||s+1),e.teams.length),(0,a.jsxs)("tr",{className:"group border-b border-slate-100 bg-white transition-colors hover:bg-slate-50 cursor-pointer",children:[t.data.map((s,l)=>0===l?(0,a.jsx)(x,{value:s,totalTeams:e.teams.length},l):1===l?(0,a.jsx)("td",{className:"p-4",children:(0,a.jsxs)("div",{className:"flex items-center gap-3 rounded-2xl border border-slate-100 bg-slate-50 px-4 py-2.5 transition-colors group-hover:border-[#4681E8]/30 group-hover:bg-[#4681E8]/5",children:[t.team_logo?(0,a.jsx)("img",{src:t.team_logo,alt:s,className:"h-8 w-8 rounded-full bg-white object-contain p-0.5 filter drop-shadow-[0_2px_4px_rgba(0,0,0,0.1)]",loading:"lazy"}):(0,a.jsx)("div",{className:"flex h-8 w-8 items-center justify-center rounded-full border border-slate-200 bg-white text-[10px] font-bold text-slate-400",children:"?"}),(0,a.jsx)("span",{className:"font-bold text-slate-800 transition-colors group-hover:text-[#4681E8]",children:s})]})},l):(0,a.jsx)("td",{className:"p-4 text-center font-mono text-slate-600",children:s},l)),t.form&&t.form.length>0&&(0,a.jsxs)(a.Fragment,{children:[t.form.map((e,t)=>(0,a.jsx)("td",{className:"p-2 text-center",children:e.match_time?(0,a.jsx)(c,{detail:e}):(0,a.jsx)(d,{result:e.result})},`form-${t}`)),t.form.length<5&&Array.from({length:5-t.form.length}).map((e,t)=>(0,a.jsx)("td",{className:"p-2"},`pad-${t}`))]})]},s)))})]})})]}),!t&&!f&&j&&(0,a.jsx)(m,{rankings:e.rankings}),!t&&!f&&!j&&e.header&&e.teams&&(0,a.jsx)("div",{className:"text-center py-20 text-slate-600",children:"Dữ liệu đang được cập nhật..."}),!t&&(f||j)&&(0,a.jsxs)("div",{className:"mt-6 flex flex-wrap items-center gap-5 px-5 py-4 bg-slate-50 rounded-2xl border border-slate-200",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,a.jsx)("span",{className:"w-2.5 h-2.5 rounded-full bg-emerald-500"}),(0,a.jsx)("span",{className:"text-[11px] text-slate-600 font-bold uppercase tracking-wider",children:"Đội trưởng bảng"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,a.jsx)("span",{className:"w-2.5 h-2.5 rounded-full bg-sky-4
66000"}),(0,a.jsx)("span",{className:"text-[11px] text-slate-600 font-bold uppercase tracking-wider",children:"Champions League"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,a.jsx)("span",{className:"w-2.5 h-2.5 rounded-full bg-amber-500"}),(0,a.jsx)("span",{className:"text-[11px] text-slate-600 font-bold uppercase tracking-wider",children:"Europa League"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,a.jsx)("span",{className:"w-2.5 h-2.5 rounded-full bg-[#f97316]"}),(0,a.jsx)("span",{className:"text-[11px] text-slate-600 font-bold uppercase tracking-wider",children:"Europa Conference"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,a.jsx)("span",{className:"w-2.5 h-2.5 rounded-full bg-[#E11D48]"}),(0,a.jsx)("span",{className:"text-[11px] text-slate-600 font-bold uppercase tracking-wider",children:"Xuống hạng"})]})]})]})}function m({rankings:e}){if(!e||0===e.length)return null;let t=e[0].data,s=e.slice(1);return(0,a.jsx)("div",{className:"overflow-hidden rounded-[22px] border border-[#cbd5e1] bg-[linear-gradient(180deg,#191a20,#111218)] shadow-[0_24px_80px_rgba(0,0,0,0.4)]",children:(0,a.jsx)("div",{className:"overflow-x-auto",children:(0,a.jsxs)("table",{className:"w-full text-left border-collapse",children:[(0,a.jsx)("thead",{children:(0,a.jsx)("tr",{className:"bg-white text-[11px] uppercase tracking-[0.18em] text-slate-600",children:t.map((e,l)=>{let r=l===t.length-1,n=s[0]&&s[0].data.length>t.length?s[0].data.length-t.length+1:1;return(0,a.jsx)("th",{colSpan:r?n:1,className:`p-4 font-semibold ${1===l?"w-1/3 text-left":"text-center"}`,children:e},l)})})}),(0,a.jsx)("tbody",{className:"text-sm",children:s.map((e,t)=>(0,a.jsx)("tr",{className:"group border-b border-[#cbd5e1] transition-colors hover:bg-white",children:e.data.map((t,l)=>0===l?(0,a.jsx)(x,{value:t,totalTeams:s.length},l):1===l?(0,a.jsx)("td",{className:"p-4",children:(0,a.jsxs)("div",{className:"flex items-center gap-3 rounded-2xl border border-white/6 bg-[linear-gradient(180deg,rgba(255,255,255,0.03),rgba(255,255,255,0.01))] px-3 py-2 transition-colors group-hover:border-emerald-600/22",children:[e.team_logo?(0,a.jsx)("img",{src:e.team_logo,alt:t,className:"h-8 w-8 rounded-full bg-white/5 object-contain ring-1 ring-white/8",loading:"lazy"}):(0,a.jsx)("div",{className:"flex h-8 w-8 items-center justify-center rounded-full border border-gray-700 bg-gray-800 text-xs font-bold text-gray-500",children:"?"}),(0,a.jsx)("span",{className:"font-bold text-slate-900 transition-colors group-hover:text-emerald-600",children:t})]})},l):["W","D","L"].includes(t)?(0,a.jsx)("td",{className:"p-2 text-center",children:(0,a.jsx)("span",{className:`inline-flex h-7 w-7 items-center justify-center rounded-[8px] text-[11px] font-black ${i(t)}`,children:t})},l):(0,a.jsx)("td",{className:"p-4 text-center font-mono text-slate-600",children:t},l))},t))})]})})})}},65838:(e,t,s)=>{"use strict";s.d(t,{LiveMatchesClient:()=>m});var a=s(68019),l=s(10707);function r({activeSport:e,onSportChange:t,activeStatus:s,onStatusChange:l,matchesCount:n}){return(0,a.jsxs)("div",{className:"mb-5 flex flex-col gap-3",children:[(0,a.jsx)("div",{className:"flex items-center gap-2 overflow-x-auto pb-1 scrollbar-hide",children:[{id:"1",label:"B\xd3NG Đ\xc1",icon:"⚽"},{id:"2",label:"B\xd3NG RỔ",icon:"\uD83C\uDFC0"},{id:"5",label:"TENNIS",icon:"\uD83C\uDFBE"},{id:"4",label:"CẦU L\xd4NG",icon:"\uD83C\uDFF8"},{id:"3",label:"B\xd3NG CHUYỀN",icon:"\uD83C\uDFD0"},{id:"6",label:"B\xd3NG B\xc0N",icon:"\uD83C\uDFD3"}].map(s=>{let l=e===s.id;return(0,a.jsxs)("button",{type:"button",onClick:()=>t(s.id),className:`flex items-center gap-2 px-4 py-2.5 rounded-xl font-bold text-[12px] whitespace-nowrap transition-all duration-200 border cursor-pointer ${l?"bg-[#4681E8]/10 text-[#4681E8] border-[#4681E8]/40 shadow-[0_0_15px_rgba(70,129,232,0.1)]":"bg-white text-slate-500 border-slate-200 hover:text-slate-700 hover:border-[#4681E8]/30"}`,children:[(0,a.jsx)("span",{className:"text-[14px]",children:s.icon}
660),(0,a.jsx)("span",{className:"tracking-wider uppercase",children:s.label})]},s.id)})}),(0,a.jsx)("div",{className:"flex items-center gap-1 overflow-x-auto pb-1 scrollbar-hide bg-white rounded-xl p-1.5 border border-slate-200",children:[{id:"all",label:"TẤT CẢ",keyCount:"all"},{id:"live",label:"TRỰC TIẾP",keyCount:"live"},{id:"hot",label:"HOT",keyCount:"hot"},{id:"today",label:"H\xd4M NAY",keyCount:"today"},{id:"tomorrow",label:"NG\xc0Y MAI",keyCount:"tomorrow"}].map(e=>{let t=s===e.id,r=n[e.keyCount]||0;return(0,a.jsxs)("button",{type:"button",onClick:()=>l(e.id),className:`relative px-4 py-2 font-bold text-[12px] whitespace-nowrap transition-all duration-200 uppercase tracking-wider flex items-center gap-2 rounded-lg cursor-pointer ${t?"bg-[#4681E8]/10 text-[#4681E8] shadow-inner":"text-slate-500 hover:text-slate-700 hover:bg-[#4681E8]/5"}`,children:["live"===e.id&&t&&(0,a.jsx)("span",{className:"w-1.5 h-1.5 rounded-full bg-[#4681E8] animate-pulse shadow-[0_0_6px_rgba(70,129,232,0.8)]"}),(0,a.jsx)("span",{children:e.label}),(0,a.jsx)("span",{className:`px-1.5 py-0.5 rounded text-[10px] font-black ${t?"bg-[#4681E8]/20 text-[#4681E8]":"text-slate-400"}`,children:r})]},e.id)})})]})}function n(){return"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='10' fill='%2364748B' fill-opacity='0.18'/%3E%3C/svg%3E"}function i({match:e,isLoading:t=!1}){if(t||!e)return(0,a.jsx)("div",{className:"animate-pulse bg-white h-[64px] w-full border-b border-slate-100"});let s=new Date(1e3*parseInt(e.time||0,10)).toLocaleTimeString("vi-VN",{hour:"2-digit",minute:"2-digit",timeZone:"Asia/Ho_Chi_Minh"}),l=function(e,t){if("1"===t||"2"===t)switch(e){case"1":default:return{text:"Sắp diễn",isLive:!1,showScore:!1};case"2":return{text:"H1",isLive:!0,showScore:!0};case"3":return{text:"HT",isLive:!0,showScore:!0};case"4":return{text:"H2",isLive:!0,showScore:!0};case"5":return{text:"Phụ",isLive:!0,showScore:!0};case"7":return{text:"Pen",isLive:!0,showScore:!0};case"8":case"9":return{text:"FT",isLive:!1,showScore:!0}}switch(e){case"0":case"1":return{text:"Sắp diễn",isLive:!1,showScore:!1};case"51":return{text:"S1",isLive:!0,showScore:!0};case"52":return{text:"S2",isLive:!0,showScore:!0};case"53":return{text:"S3",isLive:!0,showScore:!0};case"54":return{text:"S4",isLive:!0,showScore:!0};case"55":return{text:"S5",isLive:!0,showScore:!0};case"100":case"90":case"91":case"110":return{text:"FT",isLive:!1,showScore:!0};default:return{text:"LIVE",isLive:!0,showScore:!0}}}(String(e.status_id),String(e.sport_id)),r=e.time_text||e.source_card_meta?.time_text||"",o=l.isLive,c=e.home_score??"-",d=e.away_score??"-",x=e.home_logo||n(),h=e.away_logo||n();return(0,a.jsxs)("a",{href:`/match/${encodeURIComponent(e.post_name||e.id)}`,className:"flex items-center w-full group border-b border-slate-100 bg-white hover:bg-[#4681E8]/5 transition-colors min-h-[64px]",children:[(0,a.jsx)("div",{className:`w-[60px] flex flex-col items-center justify-center shrink-0 h-full border-r ${o?"border-[#4681E8]/30 bg-[#4681E8]/5":"border-slate-100"}`,children:o?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"text-[#4681E8] font-bold text-[11px] uppercase tracking-wider tabular-nums leading-none",children:r||l.text}),(0,a.jsx)("span",{className:"w-1.5 h-1.5 rounded-full bg-[#4681E8] animate-pulse mt-1"})]}):(0,a.jsx)("span",{className:"text-slate-500 font-medium text-[12px]",children:s})}),(0,a.jsxs)("div",{className:"flex-1 flex flex-col justify-center px-3 py-2 gap-1.5 min-w-0",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between w-full",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2.5 min-w-0 overflow-hidden",children:[(0,a.jsx)("img",{src:x,alt:e.home_name,className:"w-4 h-4 shrink-0 object-contain",onError:e=>e.currentTarget.src=n(),loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-[13px] font-semibold truncate text-slate-800",children:e.home_name})]}),l.showScore&&(0,a.jsx)("span",{className:`text-[15px] font-black tabular-nums shrink-0 ml-2 ${o?"text-[#4681E8]":"text-slate-700"}`,children:c})]}),(0,a.jsxs)("div",{className:"flex items-center justify-between w-full",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2.5 min-w-0 overflow-hidden",children:[(0,a.jsx)("img",{src:h,alt:e.away_name,className:"w-4 h-4 shrink-0 object-contain",onError:e=>e.currentTarget.src=n(),loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-[13px] font-semibold truncate text-slate-800",children:e.away_name})]}),l.showScore&&(0,a.jsx)("span",{className:`text-[15px] font-black tabular-nums shrink-0 ml-2 ${o?"text-[#4681E8]":"text-slate-700"}`,children:d})]})]}),(0,a.jsx)("div",{className:"w-[48px] h-full flex items-center justify-center shrink-0 text-slate-300 group-hover:text-[#4681E8] transition-colors border-l border-slate-100",children:(0,a.jsx)("svg",{className:"w-5 h-5 fill-current",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{d:"M8 5v14l11-7z"})})})]})}let o=new Set(["1","2","3","4","5","7"]),c=new Set(["8","9","15"]),d=new Set(["51","52","53","54","5
6605","56","57","58","59"]),x=new Set(["100","90","91","92","93","110"]);function h(e){let t=String(e.status_id);return 2>=parseInt(e.sport_id)?o.has(t):d.has(t)}function m({matches:e,matchIndex:t}){let[s,n]=(0,l.useState)("1"),[o,d]=(0,l.useState)("all"),[p,u]=(0,l.useState)(1);(0,l.useEffect)(()=>{u(1)},[s,o]);let{todayStart:g,tomorrowStart:b,dayAfterStart:f}=(0,l.useMemo)(()=>{let e,t,s,{vnTodayStartUTC:a,vnTomorrowStartUTC:l,vnDayAfterStartUTC:r}=(s=(t=Math.floor(Date.UTC((e=new Date(Date.now()+252e5)).getUTCFullYear(),e.getUTCMonth(),e.getUTCDate())/1e3)-25200)+86400,{vnTodayStartUTC:t,vnTomorrowStartUTC:s,vnDayAfterStartUTC:s+86400});return{todayStart:a,tomorrowStart:l,dayAfterStart:r}},[]),j=(0,l.useMemo)(()=>new Map(e.map(e=>[e?.match_key?String(e.match_key):e?.ls_id?String(e.ls_id):e?.id?`${String(e.sport_id||"0")}:${String(e.id)}`:e?.scheduleId?`${String(e.sport_id||"0")}:schedule:${String(e.scheduleId)}`:[String(e?.sport_id||"0"),String(e?.time||"0"),String(e?.home_name||""),String(e?.away_name||"")].join(":"),e])),[e]),w=t?.summary_by_sport?.[s],v=t?.bucket_keys_by_sport?.[s],N=t?.bucket_pages_by_sport?.[s],y=e.filter(e=>{let t;return String(e.sport_id)===s&&(t=String(e.status_id),2>=parseInt(e.sport_id)?!c.has(t):!x.has(t))}),_=y.filter(e=>{let t=parseInt(e.time);return t>=g&&t<b}),k=y.filter(e=>{let t=parseInt(e.time);return t>=b&&t<f}),E={all:y.length,live:y.filter(e=>h(e)).length,hot:y.filter(e=>"1"===String(e.hot)).length,today:_.length,tomorrow:k.length},C=(0,l.useMemo)(()=>{if(v){if("all"===o&&Array.isArray(N?.all)&&N.all.length>0)return N.all.slice(0,p).flat().map(e=>j.get(e)).filter(Boolean);let e=v[o];if(Array.isArray(e))return e.map(e=>j.get(e)).filter(Boolean)}return"all"===o?y:"live"===o?y.filter(e=>h(e)):"hot"===o?y.filter(e=>"1"===String(e.hot)):"today"===o?_:"tomorrow"===o?k:y},[o,y,j,N,v,_,k,p]),S="all"===o&&Array.isArray(N?.all)&&p<N.all.length,L=(0,l.useMemo)(()=>"all"!==o&&"live"!==o&&"hot"!==o?[]:C.filter(e=>"1"===String(e.hot)||h(e)).slice(0,4),[C,o]),$=(0,l.useMemo)(()=>{let e=new Map;
660return C.forEach(t=>{let s=t.source_card_meta?.league_label||t.match_data?.competition_vi||t.match_data?.competition_name||t.match_data?.competition_full||"Giải đấu kh\xe1c";e.has(s)||e.set(s,[]),e.get(s).push(t)}),Array.from(e.entries())},[C]);return(0,a.jsxs)("div",{className:"w-full min-h-[500px]",children:[(0,a.jsx)(r,{activeSport:s,onSportChange:n,activeStatus:o,onStatusChange:d,matchesCount:w||E}),0===C.length?(0,a.jsx)("div",{className:"py-20 text-center",children:(0,a.jsx)("div",{className:"text-slate-400 text-base font-medium",children:"Kh\xf4ng c\xf3 trận đấu n\xe0o."})}):(0,a.jsxs)("div",{className:"flex flex-col gap-6",children:[L.length>0&&"all"===o&&(0,a.jsxs)("div",{className:"mb-4",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 mb-3 px-1",children:[(0,a.jsx)("span",{className:"w-2 h-4 rounded-full bg-[#4681E8]"}),(0,a.jsx)("h2",{className:"text-slate-800 font-black text-sm uppercase tracking-wider",children:"Trận đấu t\xe2m điểm"})]}),(0,a.jsx)("div",{className:"grid grid-cols-1 xl:grid-cols-2 gap-2",children:L.map((e,t)=>(0,a.jsx)(i,{match:e},`featured-${e.ls_id||e.id}-${t}`))})]}),(0,a.jsx)("div",{className:"flex flex-col gap-5",children:$.map(([e,t])=>{let s=t[0]?.match_data?.competition_logo;return(0,a.jsxs)("div",{className:"rounded-xl overflow-hidden border border-slate-200 bg-white shadow-sm",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2.5 bg-[#0E1B33] px-4 py-2.5 border-b border-[#0E1B33]",children:[s&&(0,a.jsx)("img",{src:s,alt:"league",className:"w-4 h-4 object-contain brightness-200 opacity-80",loading:"lazy",decoding:"async"}),(0,a.jsx)("h3",{className:"text-white text-[12px] font-bold uppercase tracking-wider truncate",children:e})]}),(0,a.jsx)("div",{className:"flex flex-col",children:t.map((e,t)=>(0,a.jsx)(i,{match:e},e.ls_id||`${e.id}-${t}`))})]},e)})}),S&&(0,a.jsx)("div",{className:"flex justify-center mt-6",children:(0,a.jsx)("button",{type:"button",onClick:()=>u(e=>e+1),className:"inline-flex items-center justify-center rounded-xl border border-[#4681E8]/30 bg-white px-8 py-3 text-[12px] font-bold uppercase tracking-wider text-[#4681E8] transition-all duration-200 hover:bg-[#4681E8] hover:text-white hover:border-[#4681E8]",children:"Tải th\xeam"})})]})]})}},67918:(e,t,s)=>{"use strict";s.d(t,{LiveMatchesClient:()=>m});var a=s(68019),l=s(10707);function r({activeSport:e,onSportChange:t,activeStatus:s,onStatusChange:l,matchesCount:n}){return(0,a.jsxs)("div",{className:"mb-5 flex flex-col gap-3",children:[(0,a.jsx)("div",{className:"flex items-center gap-2 overflow-x-auto pb-1 scrollbar-hide",children:[{id:"1",label:"B\xd3NG Đ\xc1",icon:"⚽"},{id:"2",label:"B\xd3NG RỔ",icon:"\uD83C\uDFC0"},{id:"5",label:"TENNIS",icon:"\uD83C\uDFBE"},{id:"4",label:"CẦU L\xd4NG",icon:"\uD83C\uDFF8"},{id:"3",label:"B\xd3NG CHUYỀN",icon:"\uD83C\uDFD0"},{id:"6",label:"B\xd3NG B\xc0N",icon:"\uD83C\uDFD3"}].map(s=>{let l=e===s.id;return(0,a.jsxs)("button",{type:"button",onClick:()=>t(s.id),className:`flex items-center gap-2 px-4 py-2.5 rounded-xl font-bold text-[12px] whitespace-nowrap transition-all duration-200 border cursor-pointer ${l?"bg-[#4681E8]/10 text-[#4681E8] border-[#4681E8]/40 shadow-[0_0_15px_rgba(70,129,232,0.1)]":"bg-white text-slate-500 border-slate-200 hover:text-slate-700 hover:border-[#4681E8]/30"}`,children:[(0,a.jsx)("span",{className:"text-[14px]",children:s.icon}),(0,a.jsx)("span",{className:"tracking-wider uppercase",children:s.label})]},s.id)})}),(0,a.jsx)("div",{className:"flex items-center gap-1 overflow-x-auto pb-1 scrollbar-hide bg-white rounded-xl p-1.5 border border-slate-200",children:[{id:"all",label:"TẤT CẢ",keyCount:"all"},{id:"live",label:"TRỰC TIẾP",keyCount:"live"},{id:"hot",label:"HOT",keyCount:"hot"},{id:"today",label:"H\xd4M NAY",keyCount:"today"},{id:"tomorrow",label:"NG\xc0Y MAI",keyCount:"tomorrow"}].map(e=>{let t=s===e.id,r=n[e.keyCount]||0;return(0,a.jsxs)("button",{type:"button",onClick:()=>l(e.id),className:`relative px-4 py-2 font-bold text-[12px] whitespace-nowrap transition-all duration-200 uppercase tracking-wider flex items-center gap-2 rounded-lg cursor-pointer ${t?"bg-[#4681E8]/10 text-[#4681E8] shadow-inner":"text-slate-500 hover:text-slate-700 hover:bg-[#4681E8]/5"}`,children:["live"===e.id&&t&&(0,a.jsx)("span",{className:"w-1.5 h-1.5 rounded-full bg-[#4681E8] animate-pulse shadow-[0_0_6px_rgba(70,129,232,0.8)]"}),(0,a.jsx)("span",{children:e.label}),(0,a.jsx)("span",{className:`px-1.5 py-0.5 rounded text-[10px] font-black ${t?"bg-[#4681E8]/20 text-[#4681E8]":"text-slate-400"}`,children:r})]},e.id)})})]})}function n(){return"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='10' fill='%2364748B' fill-opacity='0.18'/%3
660E%3C/svg%3E"}function i({match:e,isLoading:t=!1}){if(t||!e)return(0,a.jsx)("div",{className:"animate-pulse bg-white h-[64px] w-full border-b border-slate-100"});let s=new Date(1e3*parseInt(e.time||0,10)).toLocaleTimeString("vi-VN",{hour:"2-digit",minute:"2-digit",timeZone:"Asia/Ho_Chi_Minh"}),l=function(e,t){if("1"===t||"2"===t)switch(e){case"1":default:return{text:"Sắp diễn",isLive:!1,showScore:!1};case"2":return{text:"H1",isLive:!0,showScore:!0};case"3":return{text:"HT",isLive:!0,showScore:!0};case"4":return{text:"H2",isLive:!0,showScore:!0};case"5":return{text:"Phụ",isLive:!0,showScore:!0};case"7":return{text:"Pen",isLive:!0,showScore:!0};case"8":case"9":return{text:"FT",isLive:!1,showScore:!0}}switch(e){case"0":case"1":return{text:"Sắp diễn",isLive:!1,showScore:!1};case"51":return{text:"S1",isLive:!0,showScore:!0};case"52":return{text:"S2",isLive:!0,showScore:!0};case"53":return{text:"S3",isLive:!0,showScore:!0};case"54":return{text:"S4",isLive:!0,showScore:!0};case"55":return{text:"S5",isLive:!0,showScore:!0};case"100":case"90":case"91":case"110":return{text:"FT",isLive:!1,showScore:!0};default:return{text:"LIVE",isLive:!0,showScore:!0}}}(String(e.status_id),String(e.sport_id)),r=e.time_text||e.source_card_meta?.time_text||"",o=l.isLive,c=e.home_score??"-",d=e.away_score??"-",x=e.home_logo||n(),h=e.away_logo||n();return(0,a.jsxs)("a",{href:`/match/${encodeURIComponent(e.post_name||e.id)}`,className:"flex items-center w-full group border-b border-slate-100 bg-white hover:bg-[#4681E8]/5 transition-colors min-h-[64px]",children:[(0,a.jsx)("div",{className:`w-[60px] flex flex-col items-center justify-center shrink-0 h-full border-r ${o?"border-[#4681E8]/30 bg-[#4681E8]/5":"border-slate-100"}`,children:o?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"text-[#4681E8] font-bold text-[11px] uppercase tracking-wider tabular-nums leading-none",children:r||l.text}),(0,a.jsx)("span",{className:"w-1.5 h-1.5 rounded-full bg-[#4681E8] animate-pulse mt-1"})]}):(0,a.jsx)("span",{className:"text-slate-500 font-medium text-[12px]",children:s})}),(0,a.jsxs)("div",{className:"flex-1 flex flex-col justify-center px-3 py-2 gap-1.5 min-w-0",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between w-full",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2.5 min-w-0 overflow-hidden",children:[(0,a.jsx)("img",{src:x,alt:e.home_name,className:"w-4 h-4 shrink-0 object-contain",onError:e=>e.currentTarget.src=n(),loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-[13px] font-semibold truncate text-slate-800",children:e.home_name})]}),l.showScore&&(0,a.jsx)("span",{className:`text-[15px] font-black tabular-nums shrink-0 ml-2 ${o?"text-[#4681E8]":"text-slate-700"}`,children:c})]}),(0,a.jsxs)("div",{className:"flex items-center justify-between w-full",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2.5 min-w-0 overflow-hidden",children:[(0,a.jsx)("img",{src:h,alt:e.away_name,className:"w-4 h-4 shrink-0 object-contain",onError:e=>e.currentTarget.src=n(),loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-[13px] font-semibold truncate text-slate-800",children:e.away_name})]}),l.showScore&&(0,a.jsx)("span",{className:`text-[15px] font-black tabular-nums shrink-0 ml-2 ${o?"text-[#4681E8]":"text-slate-700"}`,children:d})]})]}),(0,a.jsx)("div",{className:"w-[48px] h-full flex items-center justify-center shrink-0 text-slate-300 group-hover:text-[#4681E8] transition-colors border-l border-slate-100",children:(0,a.jsx)("svg",{className:"w-5 h-5 fill-current",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{d:"M8 5v14l11-7z"})})})]})}let o=new Set(["1","2","3","4","5","7"]),c=new Set(["8","9","15"]),d=new Set(["51","52","53","54","55","56","57","58","59"]),x=new Set(["100","90","91","92","93","110"]);function h(e){let t=String(e.status_id);return 2>=parseInt(e.sport_id)?o.has(t):d.has(t)}function m({matches:e,matchIndex:t}){let[s,n]=(0,l.useState)("1"),[o,d]=(0,l.useState)("all"),[p,u]=(0,l.useState)(1);(0,l.useEffect)(()=>{u(1)},[s,o]);let{todayStart:g,tomorrowStart:b,dayAfterStart:f}=(0,l.useMemo)(()=>{let e,t,s,{vnTodayStartUTC:a,vnTomorrowStartUTC:l,vnDayAfterStartUTC:r}=(s=(t=Math.floor(Date.UTC((e=new Date(Date.now()+252e5)).getUTCFullYear(),e.getUTCMonth(),e.getUTCDate())/1e3)-25200)+86400,{vnTodayStartUTC:t,vnTomorrowStartUTC:s,vnDayAfterStartUTC:s+86400});return{todayStart:a,tomorrowStart:l,dayAfterStart:r}},[]),j=(0,l.useMemo)(()=>new Map(e.map(e=>[e?.match_key?String(e.match_key):e?.ls_id?String(e.ls_id):e?.id?`${String(e.sport_id||"0")}
660:${String(e.id)}`:e?.scheduleId?`${String(e.sport_id||"0")}:schedule:${String(e.scheduleId)}`:[String(e?.sport_id||"0"),String(e?.time||"0"),String(e?.home_name||""),String(e?.away_name||"")].join(":"),e])),[e]),w=t?.summary_by_sport?.[s],v=t?.bucket_keys_by_sport?.[s],N=t?.bucket_pages_by_sport?.[s],y=e.filter(e=>{let t;return String(e.sport_id)===s&&(t=String(e.status_id),2>=parseInt(e.sport_id)?!c.has(t):!x.has(t))}),_=y.filter(e=>{let t=parseInt(e.time);return t>=g&&t<b}),k=y.filter(e=>{let t=parseInt(e.time);return t>=b&&t<f}),E={all:y.length,live:y.filter(e=>h(e)).length,hot:y.filter(e=>"1"===String(e.hot)).length,today:_.length,tomorrow:k.length},C=(0,l.useMemo)(()=>{if(v){if("all"===o&&Array.isArray(N?.all)&&N.all.length>0)return N.all.slice(0,p).flat().map(e=>j.get(e)).filter(Boolean);let e=v[o];if(Array.isArray(e))return e.map(e=>j.get(e)).filter(Boolean)}return"all"===o?y:"live"===o?y.filter(e=>h(e)):"hot"===o?y.filter(e=>"1"===String(e.hot)):"today"===o?_:"tomorrow"===o?k:y},[o,y,j,N,v,_,k,p]),S="all"===o&&Array.isArray(N?.all)&&p<N.all.length,L=(0,l.useMemo)(()=>"all"!==o&&"live"!==o&&"hot"!==o?[]:C.filter(e=>"1"===String(e.hot)||h(e)).slice(0,4),[C,o]),$=(0,l.useMemo)(()=>{let e=new Map;
660return C.forEach(t=>{let s=t.source_card_meta?.league_label||t.match_data?.competition_vi||t.match_data?.competition_name||t.match_data?.competition_full||"Giải đấu kh\xe1c";e.has(s)||e.set(s,[]),e.get(s).push(t)}),Array.from(e.entries())},[C]);return(0,a.jsxs)("div",{className:"w-full min-h-[500px]",children:[(0,a.jsx)(r,{activeSport:s,onSportChange:n,activeStatus:o,onStatusChange:d,matchesCount:w||E}),0===C.length?(0,a.jsx)("div",{className:"py-20 text-center",children:(0,a.jsx)("div",{className:"text-slate-400 text-base font-medium",children:"Kh\xf4ng c\xf3 trận đấu n\xe0o."})}):(0,a.jsxs)("div",{className:"flex flex-col gap-6",children:[L.length>0&&"all"===o&&(0,a.jsxs)("div",{className:"mb-4",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 mb-3 px-1",children:[(0,a.jsx)("span",{className:"w-2 h-4 rounded-full bg-[#4681E8]"}),(0,a.jsx)("h2",{className:"text-slate-800 font-black text-sm uppercase tracking-wider",children:"Trận đấu t\xe2m điểm"})]}),(0,a.jsx)("div",{className:"grid grid-cols-1 xl:grid-cols-2 gap-2",children:L.map((e,t)=>(0,a.jsx)(i,{match:e},`featured-${e.ls_id||e.id}-${t}`))})]}),(0,a.jsx)("div",{className:"flex flex-col gap-5",children:$.map(([e,t])=>{let s=t[0]?.match_data?.competition_logo;return(0,a.jsxs)("div",{className:"rounded-xl overflow-hidden border border-slate-200 bg-white shadow-sm",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2.5 bg-[#0E1B33] px-4 py-2.5 border-b border-[#0E1B33]",children:[s&&(0,a.jsx)("img",{src:s,alt:"league",className:"w-4 h-4 object-contain brightness-200 opacity-80",loading:"lazy",decoding:"async"}),(0,a.jsx)("h3",{className:"text-white text-[12px] font-bold uppercase tracking-wider truncate",children:e})]}),(0,a.jsx)("div",{className:"flex flex-col",children:t.map((e,t)=>(0,a.jsx)(i,{match:e},e.ls_id||`${e.id}-${t}`))})]},e)})}),S&&(0,a.jsx)("div",{className:"flex justify-center mt-6",children:(0,a.jsx)("button",{type:"button",onClick:()=>u(e=>e+1),className:"inline-flex items-center justify-center rounded-xl border border-[#4681E8]/30 bg-white px-8 py-3 text-[12px] font-bold uppercase tracking-wider text-[#4681E8] transition-all duration-200 hover:bg-[#4681E8] hover:text-white hover:border-[#4681E8]",children:"Tải th\xeam"})})]})]})}},68688:(e,t,s)=>{"use strict";s.d(t,{StandingsClient:()=>h});var a=s(68019),l=s(10707),r=s(46914),n=s(79623);function i(e){return"W"===e?"border border-emerald-500/45 bg-emerald-500/25 text-emerald-300 shadow-[0_0_0_1px_rgba(16,185,129,0.08)_inset]":"L"===e?"border border-red-500/45 bg-red-500/25 text-red-300 shadow-[0_0_0_1px_rgba(239,68,68,0.08)_inset]":"D"===e?"border border-amber-400/45 bg-amber-400/22 text-amber-200 shadow-[0_0_0_1px_rgba(251,191,36,0.08)_inset]":"border border-slate-500/40 bg-slate-500/18 text-slate-700"}function o(e,t){return 1===e?{bar:"bg-[linear-gradient(180deg,#facc15,#f97316)]",badge:"border-emerald-600/60 bg-slate-100 text-yellow-700 shadow-[0_0_18px_rgba(250,204,21,0.14)]",row:"from-[#32230d]/70 via-transparent to-transparent"}:e<=4?{bar:"bg-[linear-gradient(180deg,#fb7185,#f97316)]",badge:"border-[#fb7185]/45 bg-slate-100 text-rose-700",row:"from-[#241318]/55 via-transparent to-transparent"}:e<=6?{bar:"bg-[linear-gradient(180deg,#f59e0b,#facc15)]",badge:"border-[#f59e0b]/45 bg-slate-100 text-yellow-700",row:"from-[#24190b]/45 via-transparent to-transparent"}:e<=10?{bar:"bg-[linear-gradient(180deg,#38bdf8,#2563eb)]",badge:"border-sky-400/40 bg-white text-sky-700",row:"from-[#101725]/32 via-transparent to-transparent"}:e>=Math.max(t-2,1)?{bar:"bg-[linear-gradient(180deg,#ef4444,#7f1d1d)]",badge:"border-red-500/40 bg-slate-100 text-red-700",row:"from-[#220f14]/45 via-transparent to-transparent"}:{bar:"bg-[linear-gradient(180deg,#64748b,#334155)]",badge:"border-slate-500/35 bg-white text-slate-700",row:"from-[#12161d]/24 via-transparent to-transparent"}}function c({detail:e}){let[t,s]=(0,l.useState)(!1),n=(0,l.useRef)(null),[o,d]=(0,l.useState)({top:0,left:0}),x=i(e.result),h=(0,l.useCallback)(()=>{if(n.current){let e=n.current.getBoundingClientRect();d({top:e.top+window.scrollY-8,left:e.left+e.width/2+window.scrollX})}s(!0)},[]);return(0,a.jsxs)("div",{ref:n,className:"relative inline-flex",onMouseEnter:h,onMouseLeave:()=>s(!1),children:[(0,a.jsx)("span",{className:`inline-flex h-7 w-7 items-center justify-center rounded-[8px] text-[11px] font-black cursor-pointer transition-transform hover:-translate-y-0.5 ${x}`,children:e.result}),t&&e.match_time&&"u">typeof document&&(0,r.createPortal)((0,a.jsxs)("div",{className:"fixed z-[9999] w-[220px] pointer-events-none",style:{to
660p:`${o.top}px`,left:`${o.left}px`,transform:"translate(-50%, -100%)",position:"absolute"},children:[(0,a.jsxs)("div",{className:"overflow-hidden rounded-xl border border-[#cbd5e1] bg-white shadow-2xl",children:[(0,a.jsx)("div",{className:"bg-slate-100 px-3 py-1.5 text-[10px] text-slate-600 font-mono text-center border-b border-[#cbd5e1]",children:e.match_time}),(0,a.jsxs)("div",{className:"px-3 py-2.5 flex items-center justify-between gap-2",children:[(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5 flex-1 min-w-0",children:[e.home_logo?(0,a.jsx)("img",{src:e.home_logo,alt:e.home_team,className:"w-7 h-7 object-contain",loading:"lazy",decoding:"async"}):(0,a.jsx)("div",{className:"w-7 h-7 rounded-full bg-gray-700 flex items-center justify-center text-[8px] text-slate-600 font-bold",children:"?"}),(0,a.jsx)("span",{className:"text-[9px] text-slate-600 font-bold text-center leading-tight line-clamp-2 max-w-[70px]",children:e.home_team})]}),(0,a.jsx)("div",{className:"text-slate-900 font-black text-sm whitespace-nowrap px-1",children:e.score||"? - ?"}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5 flex-1 min-w-0",children:[e.away_logo?(0,a.jsx)("img",{src:e.away_logo,alt:e.away_team,className:"w-7 h-7 object-contain",loading:"lazy",decoding:"async"}):(0,a.jsx)("div",{className:"w-7 h-7 rounded-full bg-gray-700 flex items-center justify-center text-[8px] text-slate-600 font-bold",children:"?"}),(0,a.jsx)("span",{className:"text-[9px] text-slate-600 font-bold text-center leading-tight line-clamp-2 max-w-[70px]",children:e.away_team})]})]})]}),(0,a.jsx)("div",{className:"absolute left-1/2 -translate-x-1/2 -bottom-1 w-2 h-2 bg-white border-r border-b border-[#cbd5e1] rotate-45"})]}),document.body)]})}function d({result:e}){let t=i(e);return(0,a.jsx)("span",{className:`inline-flex h-7 w-7 items-center justify-center rounded-[8px] text-[11px] font-black ${t}`,children:e})}function x({value:e,totalTeams:t}){let s=Number(e);if(!Number.isFinite(s))return(0,a.jsx)("td",{className:"px-4 py-4 text-center font-mono font-black text-slate-400",children:e});let l=o(s,t);return(0,a.jsxs)("td",{className:"relative px-4 py-4 text-center font-mono",children:[(0,a.jsx)("span",{className:`absolute left-0 top-1/2 h-7 w-1 -translate-y-1/2 rounded-r-full ${l.bar}`}),(0,a.jsx)("span",{className:`inline-flex h-8 w-8 items-center justify-center rounded-[10px] border text-[13px] font-black ${l.badge}`,children:s})]})}function h({initialData:e}){let[t]=(0,l.useState)(!1),[s,r]=(0,l.useState)(!1),[i,p]=(0,l.useState)(""),u=(0,l.useRef)(null);if((0,l.useEffect)(()=>{function e(e){u.current&&!u.current.contains(e.target)&&r(!1)}return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[]),!e)return(0,a.jsx)("div",{className:"text-center py-20 text-slate-600",children:"Đang tải dữ liệu..."});let g=e.available_leagues||[],b=g.filter(e=>e.name.toLowerCase().includes(i.toLowerCase())),f=e.teams&&e.teams.length>0&&Array.isArray(e.teams[0]?.form),j=!f&&e.rankings;return(0,a.jsxs)("div",{className:"mx-auto max-w-[1440px] px-4 py-8",children:[(0,a.jsx)(n.c,{eyebrow:"Bảng xếp hạng",title:"BẢNG XẾP HẠNG",rightSlot:(0,a.jsx)("div",{className:"text-[12px] text-slate-600",children:(0,a.jsx)("span",{className:"text-slate-900/80 font-bold",children:e.league_name})})}),g.length>0&&(0,a.jsxs)("div",{className:"mb-6",ref:u,children:[(0,a.jsxs)("div",{className:"relative inline-flex min-w-[320px] items-center gap-3 rounded-2xl border border-slate-200 bg-white backdrop-blur-md px-5 py-3.5 cursor-pointer shadow-[0_8px_30px_rgba(0,0,0,0.06)] transition-colors hover:border-[#4681E8]/50 hover:shadow-[0_8px_30px_rgba(70,129,232,0.1)]",onClick:()=>r(!s),children:[e.league_icon&&(0,a.jsx)("img",{src:e.league_icon,alt:e.league_name||"League icon",className:"w-6 h-6 object-contain",loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-slate-800 font-bold text-sm flex-1",children:e.league_name||"Chọn giải đấu"}),(0,a.jsx)("svg",{className:`w-4 h-4 text-[#4681E8] transition-transform ${s?"rotate-180":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),s&&(0,a.jsxs)("div",{className:"absolute z-50 mt-2 w-[360px] overflow-hidden rounded-2xl border border-slate-200 bg-white backdrop-blur-xl shadow-[0_24px_80px_rgba(0,0,0,0.15)]",children:[(0,a.jsx)("div",{className:"p-2 border-b border-slate-100",children:(0,a.jsx)("input",{type:"text",placeholder:"T\xecm kiếm giải đấu...",value:i,onChange:e=>p(e.target.value),className:"w-full bg-slate-50 text-slate-800 text-sm px-4 py-2.5 rounded-xl border border-transparent outline-none focus:border-[#4681E8]/50 placeholder-slate-400 transition-colors",autoF
660ocus:!0})}),(0,a.jsxs)("div",{className:"max-h-[340px] overflow-y-auto",children:[b.map(t=>(0,a.jsxs)("a",{href:`/standings?league=${encodeURIComponent(t.id)}`,className:`flex items-center gap-3 px-4 py-3 cursor-pointer transition-colors hover:bg-slate-50 ${t.id===e.league_id?"bg-[#4681E8]/10 border-l-4 border-[#4681E8]":""}`,children:[t.icon?(0,a.jsx)("img",{src:t.icon,alt:t.name||"League",className:"w-5 h-5 object-contain flex-shrink-0",loading:"lazy",decoding:"async"}):(0,a.jsx)("div",{className:"w-5 h-5 rounded bg-gray-700 flex-shrink-0"}),(0,a.jsx)("span",{className:"text-sm text-slate-900 truncate",children:t.name})]},t.id)),0===b.length&&(0,a.jsx)("div",{className:"px-4 py-8 text-center text-gray-500 text-sm",children:"Kh\xf4ng t\xecm thấy giải đấu"})]})]})]}),t&&(0,a.jsxs)("div",{className:"flex items-center justify-center py-12",children:[(0,a.jsx)("div",{className:"animate-spin w-8 h-8 border-2 border-emerald-600 border-t-transparent rounded-full"}),(0,a.jsx)("span",{className:"ml-3 text-slate-600 text-sm",children:"Đang tải bảng xếp hạng từ server..."})]}),!t&&f&&(0,a.jsxs)("div",{className:"overflow-hidden rounded-[24px] border border-slate-200 bg-white shadow-[0_8px_30px_rgba(0,0,0,0.08)]",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between gap-3 border-b border-[#4681E8]/20 bg-gradient-to-r from-[#4681E8] to-[#2563eb] px-6 py-4 text-white shadow-[0_4px_25px_rgba(70,129,232,0.3)]",children:[(0,a.jsx)("div",{className:"text-[13px] font-black uppercase tracking-[0.2em] drop-shadow-sm text-white/80",children:"League"}),(0,a.jsx)("div",{className:"truncate text-sm font-black sm:text-base drop-shadow-md",children:e.league_name})]}),(0,a.jsx)("div",{className:"overflow-x-auto",children:(0,a.jsxs)("table",{className:"w-full text-left border-collapse",children:[(0,a.jsx)("thead",{children:(0,a.jsx)("tr",{className:"bg-slate-50 text-[11px] uppercase tracking-[0.2em] text-slate-500",children:e.header.map((t,s)=>{let l=e.teams.some(e=>e.form&&e.form.length>0);return t.toLowerCase().includes("phong độ")&&!l?null:(0,a.jsx)("th",{colSpan:s===e.header.length-1&&l?5:1,className:`p-4 font-semibold ${1===s?"w-1/3 text-left":"text-center"}`,children:t},s)})})}),(0,a.jsx)("tbody",{className:"text-sm",children:e.teams.map((t,s)=>(o(Number(t.data[0]||s+1),e.teams.length),(0,a.jsxs)("tr",{className:"group border-b border-slate-100 bg-white transition-colors hover:bg-slate-50 cursor-pointer",children:[t.data.map((s,l)=>0===l?(0,a.jsx)(x,{value:s,totalTeams:e.teams.length},l):1===l?(0,a.jsx)("td",{className:"p-4",children:(0,a.jsxs)("div",{className:"flex items-center gap-3 rounded-2xl border border-slate-100 bg-slate-50 px-4 py-2.5 transition-colors group-hover:border-[#4681E8]/30 group-hover:bg-[#4681E8]/5",children:[t.team_logo?(0,a.jsx)("img",{src:t.team_logo,alt:s,className:"h-8 w-8 rounded-full bg-white object-contain p-0.5 filter drop-shadow-[0_2px_4px_rgba(0,0,0,0.1)]",loading:"lazy"}):(0,a.jsx)("div",{className:"flex h-8 w-8 items-center justify-center rounded-full border border-slate-200 bg-white text-[10px] font-bold text-slate-400",children:"?"}),(0,a.jsx)("span",{className:"font-bold text-slate-800 transition-colors group-hover:text-[#4681E8]",children:s})]})},l):(0,a.jsx)("td",{className:"p-4 text-center font-mono text-slate-600",children:s},l)),t.form&&t.form.length>0&&(0,a.jsxs)(a.Fragment,{children:[t.form.map((e,t)=>(0,a.jsx)("td",{className:"p-2 text-center",children:e.match_time?(0,a.jsx)(c,{detail:e}):(0,a.jsx)(d,{result:e.result})},`form-${t}`)),t.form.length<5&&Array.from({length:5-t.form.length}).map((e,t)=>(0,a.jsx)("td",{className:"p-2"},`pad-${t}`))]})]},s)))})]})})]}),!t&&!f&&j&&(0,a.jsx)(m,{rankings:e.rankings}),!t&&!f&&!j&&e.header&&e.teams&&(0,a.jsx)("div",{className:"text-center py-20 text-slate-600",children:"Dữ liệu đang được cập nhật..."}),!t&&(f||j)&&(0,a.jsxs)("div",{className:"mt-6 flex flex-wrap items-center gap-5 px-5 py-4 bg-slate-50 rounded-2xl border border-slate-200",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,a.jsx)("span",{className:"w-2.5 h-2.5 rounded-full bg-emerald-500"}),(0,a.jsx)("span",{className:"text-[11px] text-slate-600 font-bold uppercase tracking-wider",children:"Đội trưởng bảng"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,a.jsx)("span",{className:"w-2.5 h-2.5 rounded-full bg-sky-4
66000"}),(0,a.jsx)("span",{className:"text-[11px] text-slate-600 font-bold uppercase tracking-wider",children:"Champions League"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,a.jsx)("span",{className:"w-2.5 h-2.5 rounded-full bg-amber-500"}),(0,a.jsx)("span",{className:"text-[11px] text-slate-600 font-bold uppercase tracking-wider",children:"Europa League"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,a.jsx)("span",{className:"w-2.5 h-2.5 rounded-full bg-[#f97316]"}),(0,a.jsx)("span",{className:"text-[11px] text-slate-600 font-bold uppercase tracking-wider",children:"Europa Conference"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,a.jsx)("span",{className:"w-2.5 h-2.5 rounded-full bg-[#E11D48]"}),(0,a.jsx)("span",{className:"text-[11px] text-slate-600 font-bold uppercase tracking-wider",children:"Xuống hạng"})]})]})]})}function m({rankings:e}){if(!e||0===e.length)return null;let t=e[0].data,s=e.slice(1);return(0,a.jsx)("div",{className:"overflow-hidden rounded-[22px] border border-[#cbd5e1] bg-[linear-gradient(180deg,#191a20,#111218)] shadow-[0_24px_80px_rgba(0,0,0,0.4)]",children:(0,a.jsx)("div",{className:"overflow-x-auto",children:(0,a.jsxs)("table",{className:"w-full text-left border-collapse",children:[(0,a.jsx)("thead",{children:(0,a.jsx)("tr",{className:"bg-white text-[11px] uppercase tracking-[0.18em] text-slate-600",children:t.map((e,l)=>{let r=l===t.length-1,n=s[0]&&s[0].data.length>t.length?s[0].data.length-t.length+1:1;return(0,a.jsx)("th",{colSpan:r?n:1,className:`p-4 font-semibold ${1===l?"w-1/3 text-left":"text-center"}`,children:e},l)})})}),(0,a.jsx)("tbody",{className:"text-sm",children:s.map((e,t)=>(0,a.jsx)("tr",{className:"group border-b border-[#cbd5e1] transition-colors hover:bg-white",children:e.data.map((t,l)=>0===l?(0,a.jsx)(x,{value:t,totalTeams:s.length},l):1===l?(0,a.jsx)("td",{className:"p-4",children:(0,a.jsxs)("div",{className:"flex items-center gap-3 rounded-2xl border border-white/6 bg-[linear-gradient(180deg,rgba(255,255,255,0.03),rgba(255,255,255,0.01))] px-3 py-2 transition-colors group-hover:border-emerald-600/22",children:[e.team_logo?(0,a.jsx)("img",{src:e.team_logo,alt:t,className:"h-8 w-8 rounded-full bg-white/5 object-contain ring-1 ring-white/8",loading:"lazy"}):(0,a.jsx)("div",{className:"flex h-8 w-8 items-center justify-center rounded-full border border-gray-700 bg-gray-800 text-xs font-bold text-gray-500",children:"?"}),(0,a.jsx)("span",{className:"font-bold text-slate-900 transition-colors group-hover:text-emerald-600",children:t})]})},l):["W","D","L"].includes(t)?(0,a.jsx)("td",{className:"p-2 text-center",children:(0,a.jsx)("span",{className:`inline-flex h-7 w-7 items-center justify-center rounded-[8px] text-[11px] font-black ${i(t)}`,children:t})},l):(0,a.jsx)("td",{className:"p-4 text-center font-mono text-slate-600",children:t},l))},t))})]})})})}},69029:(e,t,s)=>{"use strict";s.d(t,{Klivevip02MatchDetailPage:()=>m});var a=s(68019),l=s(10707),r=s(58420);function n({src:e,poster:t,autoPlay:s=!0,onError:i,className:o=""}){let c=(0,l.useRef)(null),d=(0,l.useRef)(i);d.current=i;let[x,h]=(0,l.useState)(!1),[m,p]=(0,l.useState)(!1);return((0,l.useEffect)(()=>{let t=c.current;if(!t)return;let a=null;h(!1);let l=()=>p(!0),n=()=>p(!1);t.addEventListener("play",l),t.addEventListener("pause",n);let i=()=>{s&&(t.muted=!0,t.play().catch(()=>{}))};if(t.addEventListener("canplay",i),r.Ay.isSupported()){(a=new r.Ay({maxBufferLength:30,maxMaxBufferLength:60,lowLatencyMode:!0,enableWorker:!0})).loadSource(e),a.attachMedia(t),a.on(r.Ay.Events.MANIFEST_PARSED,()=>{s&&(t.muted=!0,t.play().catch(e=>{console.warn("AutoPlay failed:",e),t.muted=!1}))});let l=0,n=0;a.on(r.Ay.Events.ERROR,(e,t)=>{if(t.type===r.Ay.ErrorTypes.NETWORK_ERROR&&(++l>2||t.response&&t.response.code>=400)){console.error("HLS Network Error threshold reached (CORS/404), triggering fallback.",t),h(!0),d.current&&d.current(t),a?.destroy();return}if(t.fatal)switch(t.type){case r.Ay.ErrorTypes.NETWORK_ERROR:console.error("HLS Fatal Network Error, recovering...",t),a?.startLoad();break;case r.Ay.ErrorTypes.MEDIA_ERROR:console.error("HLS Media Error, recovering...",t),++n>3?(console.error("HLS Media Error threshold reached, triggering fallback."),h(!0),d.current&&d.current(t),a?.destroy()):a?.recoverMediaError();break;default:console.error("HLS Fatal Error:",t),h(!0),d.current&&d.current(t),a?.destroy()}})}else t.canPlayType("application/vnd.apple.mpegurl")&&(t.src=e,t.addEventListener("loadedmetadata",()=>{s&&t.play().catch(e=>{console.warn("AutoPlay failed:",e)})}),t.addEventListener("error",e=>{h(!0),d.current&&d.current(e)}));return()=>{t.removeEventListener("play",l),t.removeEventListener("pause",n),t.removeEventListener("canplay",i),a&&a.destroy()}},[e,s]),x)?i?null:(0,a.jsxs)("div",{className:`w-full h-full flex flex-col items-center justify-center bg-white/80 backdrop-blur ${o}`,children:[(0,a.jsx)("svg",{className:"w-12 h-12 text-red-500 mb-4 opacity-80",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"})}),(0,a.jsx)("div",{className:"text-slate-600 text-sm font-medium",children:"Video/Stream kh\xf4ng khả dụng hoặc bị lá
660»—i mạng"}),(0,a.jsx)("div",{className:"text-gray-500 text-xs mt-1",children:"Vui l\xf2ng thá»­ lại sau hoặc chọn nguồn kh\xe1c"})]}):(0,a.jsx)("div",{className:`relative group w-full h-full bg-white flex items-center justify-center overflow-hidden ${o}`,children:(0,a.jsx)("video",{ref:c,className:"w-full h-full object-contain",controls:!0,playsInline:!0,muted:s,poster:t,referrerPolicy:"no-referrer"})})}function i(e){let t=(e||"").split(/[\s-]+/).slice(0,2).map(e=>e[0]||"").join("").toUpperCase()||"??";return`data:image/svg+xml,${encodeURIComponent(`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 80 80"><rect width="80" height="80" rx="20" fill="#1a1c25"/><text x="40" y="47" font-size="20" font-family="Arial" font-weight="700" text-anchor="middle" fill="#666">${t}</text></svg>`)}`}function o({homeName:e,awayName:t,homeLogo:s,awayLogo:l,homeScore:r="0",awayScore:n="0",statusText:c="LIVE",timeText:d="",isLive:x=!0,sportId:h="1",matchId:m}){let p=s||i(e),u=l||i(t),g="5"===String(h),b="2"===String(h),f="bg-slate-200 border-slate-200",j="repeating-linear-gradient(90deg, transparent, transparent 10%, #000 10%, #000 20%)";return g?(f="bg-slate-100 border-slate-200",j="none"):b&&(f="bg-[#bc7a46] border-[#8a4e21]",j="repeating-linear-gradient(90deg, transparent, transparent 5%, #000 5%, #000 10%)"),(0,a.jsxs)("div",{className:"relative w-full aspect-video min-h-[300px] max-h-[600px] bg-slate-50 overflow-hidden flex flex-col justify-center",children:[(0,a.jsx)("div",{className:"absolute inset-0 flex items-center justify-center pointer-events-none mt-16 md:mt-24",children:(0,a.jsx)("div",{className:"relative w-[120%] h-[120%] sm:w-[90%] sm:h-[120%] max-w-[900px] flex-shrink-0 transition-transform duration-1000",style:{transform:"perspective(900px) rotateX(60deg) scale(0.9)",transformOrigin:"center center"},children:(0,a.jsxs)("div",{className:`absolute inset-0 ${f} shadow-[0_30px_60px_rgba(0,0,0,0.8)] border-4 rounded-xl overflow-hidden flex transition-colors duration-500`,children:[(0,a.jsx)("div",{className:"absolute inset-0 opacity-15 pointer-events-none",style:{backgroundImage:j}}),(0,a.jsxs)("div",{className:"absolute inset-[4%] pointer-events-none shadow-sm flex items-center justify-center",children:["1"===String(h)&&(0,a.jsxs)("div",{className:"absolute inset-0 w-full h-full border-2 border-white/60",children:[(0,a.jsx)("div",{className:"absolute left-1/2 top-0 bottom-0 w-0 border-l-2 border-white/60 -translate-x-1/2"}),(0,a.jsx)("div",{className:"absolute left-1/2 top-1/2 w-[18%] aspect-square rounded-full border-2 border-white/60 -translate-x-1/2 -translate-y-1/2"}),(0,a.jsx)("div",{className:"absolute left-1/2 top-1/2 w-2 h-2 rounded-full bg-white/80 -translate-x-1/2 -translate-y-1/2"}),(0,a.jsx)("div",{className:"absolute left-0 top-1/2 w-[16%] h-[46%] border-2 border-l-0 border-white/60 -translate-y-1/2 bg-slate-200"}),(0,a.jsx)("div",{className:"absolute left-0 top-1/2 w-[6%] h-[20%] border-2 border-l-0 border-white/60 -translate-y-1/2 bg-slate-200"}),(0,a.jsx)("div",{className:"absolute left-[16%] top-1/2 w-[8%] aspect-square border-2 border-l-0 border-white/60 rounded-r-full -translate-y-1/2 clip-path-half",style:{clipPath:"inset(0 0 0 50%)"}}),(0,a.jsx)("div",{className:"absolute right-0 top-1/2 w-[16%] h-[46%] border-2 border-r-0 border-white/60 -translate-y-1/2 bg-slate-200"}),(0,a.jsx)("div",{className:"absolute right-0 top-1/2 w-[6%] h-[20%] border-2 border-r-0 border-white/60 -translate-y-1/2 bg-slate-200"}),(0,a.jsx)("div",{className:"absolute right-[16%] top-1/2 w-[8%] aspect-square border-2 border-r-0 border-white/60 rounded-l-full -translate-y-1/2 clip-path-half",style:{clipPath:"inset(0 50% 0 0)"}})]}),g&&(0,a.jsxs)("div",{className:"absolute inset-[10%] w-[80%] h-[80%] border-2 border-white/80 bg-white",children:[(0,a.jsx)("div",{className:"absolute top-[10%] bottom-[10%] left-0 right-0 border-y-2 border-white/80"}),(0,a.jsx)("div",{className:"absolute left-1/2 top-[-2%] bottom-[-2%] w-1 bg-white/40 shadow-xl -translate-x-1/2 z-10"}),(0,a.jsx)("div",{className:"absolute left-[25%] right-[25%] top-[10%] bottom-[
66010%] border-x-2 border-white/80"}),(0,a.jsx)("div",{className:"absolute left-[25%] right-[25%] top-1/2 w-[50%] border-t-2 border-white/80 -translate-y-1/2"}),(0,a.jsx)("div",{className:"absolute left-0 top-1/2 w-[2%] border-t-2 border-white/80 -translate-y-1/2"}),(0,a.jsx)("div",{className:"absolute right-0 top-1/2 w-[2%] border-t-2 border-white/80 -translate-y-1/2"})]}),b&&(0,a.jsxs)("div",{className:"absolute inset-0 w-full h-full border-2 border-white/50",children:[(0,a.jsx)("div",{className:"absolute left-1/2 top-0 bottom-0 w-0 border-l-2 border-white/50 -translate-x-1/2"}),(0,a.jsx)("div",{className:"absolute left-1/2 top-1/2 w-[15%] aspect-square rounded-full border-2 border-white/50 -translate-x-1/2 -translate-y-1/2"}),(0,a.jsx)("div",{className:"absolute left-0 top-1/2 w-[18%] h-[35%] border-2 border-l-0 border-white/50 -translate-y-1/2 bg-[#bc7a46]"}),(0,a.jsx)("div",{className:"absolute left-[18%] top-1/2 w-[10%] aspect-square rounded-full border-2 border-white/50 -translate-y-1/2"}),(0,a.jsx)("div",{className:"absolute left-0 top-1/2 w-[30%] h-[70%] border-2 border-l-0 border-white/50 rounded-r-full -translate-y-1/2 opacity-60"}),(0,a.jsx)("div",{className:"absolute right-0 top-1/2 w-[18%] h-[35%] border-2 border-r-0 border-white/50 -translate-y-1/2 bg-[#bc7a46]"}),(0,a.jsx)("div",{className:"absolute right-0 top-1/2 w-[30%] h-[70%] border-2 border-r-0 border-white/50 rounded-l-full -translate-y-1/2 opacity-60"})]})]}),x&&(0,a.jsx)("div",{className:`absolute left-1/2 top-1/2 shadow-[0_8px_16px_rgba(0,0,0,0.8)] z-10 transition-all duration-[3000ms] border-2 border-white/20 rounded-full
661                                ${g?"w-2 h-2 sm:w-3 sm:h-3 bg-[#ccff00]":b?"w-4 h-4 sm:w-6 sm:h-6 bg-[#d95d16]":"w-4 h-4 sm:w-5 sm:h-5 bg-white"}`,style:{animation:"ballMove 8s infinite alternate ease-in-out",transform:"translate(-50%, -50%)"},children:(0,a.jsx)("div",{className:"absolute -bottom-4 left-1/2 w-4 h-2 bg-white/40 rounded-full blur-sm -translate-x-1/2"})}),x&&(0,a.jsxs)("div",{className:"absolute left-[65%] top-[60%] flex flex-col items-center animate-bounce-slow",style:{animation:"floatBubble 4s infinite alternate ease-in-out"},children:[(0,a.jsxs)("div",{className:"bg-white/95 backdrop-blur border border-white/10 rounded-2xl p-2 shadow-2xl flex items-center gap-3 w-max max-w-[200px]",children:[(0,a.jsx)("div",{className:"w-6 h-6 rounded-full flex items-center justify-center p-0.5 bg-white/5 shrink-0",children:(0,a.jsx)("img",{src:p,alt:e||"Home team",className:"max-w-full max-h-full object-contain",onError:t=>t.target.src=i(e),loading:"lazy",decoding:"async"})}),(0,a.jsx)("div",{className:"flex flex-col pr-1 overflow-hidden",children:(0,a.jsx)("span",{className:"text-slate-900 font-bold text-[10px] sm:text-xs tracking-wide truncate",children:g?"Serve / Return":"Tấn c\xf4ng nguy hiểm"})})]}),(0,a.jsx)("div",{className:"w-0 h-0 border-l-[6px] border-r-[6px] border-t-[6px] border-l-transparent border-r-transparent border-t-[#1a1c28]/95 mt-[-1px]"})]})]})})}),(0,a.jsx)("div",{className:"relative z-20 flex-1 flex flex-col items-center justify-start p-4 md:p-6 pointer-events-none w-full",children:(0,a.jsxs)("div",{className:"w-full max-w-[800px] flex items-center justify-between px-4 sm:px-6 py-3 rounded-xl bg-gradient-to-r from-[#0d0f14]/90 via-[#151821]/95 to-[#0d0f14]/90 backdrop-blur-xl border border-white/10 shadow-[0_10px_40px_rgba(0,0,0,0.8)] pointer-events-auto",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 flex-1 min-w-0 pr-2",children:[(0,a.jsx)("img",{src:p,alt:e,className:"w-8 h-8 md:w-12 md:h-12 object-contain drop-shadow-lg shrink-0",onError:t=>t.target.src=i(e),loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-slate-900 text-xs sm:text-sm md:text-base font-bold truncate tracking-wide",children:e})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1 shrink-0 px-2 sm:px-6 min-w-[100px]",children:[(0,a.jsxs)("span",{className:`inline-flex items-center gap-1.5 px-2.5 py-0.5 rounded-full text-[10px] sm:text-xs font-bold shadow-inner ${x?"bg-green-500/10 text-green-400 border border-green-500/20":"bg-white/5 text-slate-900/40"}`,children:[x&&(0,a.jsx)("span",{className:"w-1.5 h-1.5 rounded-full bg-green-500 animate-pulse shadow-[0_0_8px_#22c55e]"}),d||c]}),(0,a.jsxs)("div",{className:"flex gap-3 sm:gap-5 items-center justify-center",children:[(0,a.jsx)("span",{className:"text-slate-900 text-2xl sm:text-4xl font-black drop-shadow-md",children:r}),(0,a.jsx)("span",{className:"text-slate-900/30 text-xl font-light",children:"-"}),(0,a.jsx)("span",{className:"text-slate-900 text-2xl sm:text-4xl font-black drop-shadow-md",children:n})]})]}),(0,a.jsxs)("div",{className:"flex items-center justify-end gap-3 flex-1 min-w-0 pl-2 text-right",children:[(0,a.jsx)("span",{className:"text-slate-900 text-xs sm:text-sm md:text-base font-bold truncate tracking-wide",children:t}),(0,a.jsx)("img",{src:u,alt:t,className:"w-8 h-8 md:w-12 md:h-12 object-contain drop-shadow-lg shrink-0",onError:e=>e.target.src=i(t),loading:"lazy",decoding:"async"})]})]})}),(0,a.jsx)("div",{className:"relative z-20 mt-auto w-full p-4 flex justify-center pointer-events-none",children:(0,a.jsx)("div",{className:"w-full max-w-[600px] h-6 bg-white/40 backdrop-blur-md rounded-full border border-white/5 flex items-center px-4",children:(0,a.jsxs)("div",{className:"flex-1 h-0.5 bg-white/10 relative rounded-full",children:[x&&(0,a.jsx)("div",{className:"absolute left-0 top-0 bottom-0 bg-gradient-to-r from-[#b38b22] to-[#ffda6a] w-[65%] rounded-full opacity-90 shadow-[0_0_12px_#daa520]"}),(0,a.jsx)("span",{className:"absolute left-[65%] top-1/2 -translate-y-1/2 -translate-x-1/2 w-1.5 h-1.5 rounded-full bg-white shadow-md"})]})})}),(0,a.jsx)("style",{children:`
662                @keyframes ballMove {
663                    0% { transform: translate(-30%, -20%) scale(1); }
664                    25% { transform: translate(40%, -10%) scale(1.1); }
665                    50% { transform: translate(20%, 30%) scale(0.9); }
666                    75% { transform: translate(-10%, 15%) scale(1.2); }
667                    100% { transform: translate(-45%, 0%) scale(1); }
668                }
669                @keyframes floatBubble {
670                    0% { transform: translateY(0px) translateX(0px); }
671                    50% { transform: translateY(-8px) translateX(4px); }
672                    100% { transform: translateY(4px) translateX(-4px); }
673                }
674            `})]})}function c(e,t){if("1"===t||"2"===t)switch(e){case"2":return{t:"HT 1",live:!0,sc:!0};case"3":return{t:"Giữa giờ",live:!0,sc:!0};case"4":return{t:"HT 2",live:!0,sc:!0};case"5":return{t:"Hiệp phụ",live:!0,sc:!0};case"7":return{t:"Penalty",live:!0,sc:!0};case"8":case"9":return{t:"Kết th\xfac",live:!1,sc:!0};default:return{t:"Chưa bắt đầu",live:!1,sc:!1}}
674return["51","52","53","54","55"].includes(e)?{t:`Set ${e-50}`,live:!0,sc:!0}:["100","90","110"].includes(e)?{t:"KT",live:!1,sc:!0}:"0"===e||"1"===e?{t:"Chưa bắt đầu",live:!1,sc:!1}:{t:"LIVE",live:!0,sc:!0}}function d(e){let t=(e||"").split(/[\s-]+/).slice(0,2).map(e=>e[0]||"").join("").toUpperCase()||"??";return`data:image/svg+xml,${encodeURIComponent(`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 80 80"><rect width="80" height="80" rx="20" fill="#1a1c25"/><text x="40" y="47" font-size="20" font-family="Arial" font-weight="700" text-anchor="middle" fill="#666">${t}</text></svg>`)}`}function x(e){let t=new Date(1e3*parseInt(e||"0",10));return{hm:t.toLocaleTimeString("vi-VN",{hour:"2-digit",minute:"2-digit",timeZone:"Asia/Ho_Chi_Minh"}),dm:t.toLocaleDateString("vi-VN",{day:"2-digit",month:"2-digit",timeZone:"Asia/Ho_Chi_Minh"}),full:t.toLocaleDateString("vi-VN",{day:"2-digit",month:"2-digit",year:"numeric",timeZone:"Asia/Ho_Chi_Minh"})}}let h="max-w-[1200px]";function m({matchData:e,relatedMatches:t,matchDetails:s,standings:r,brandingNameUpper:i}){let p,u,g,j,v,y,[C,S]=(0,l.useState)("odds"),L=e?.match_data?.anchors||[],[$,F]=(0,l.useState)(!1),[T,A]=(0,l.useState)(!1),[M,H]=(0,l.useState)(null),[D,B]=(0,l.useState)(!1),z=(0,l.useRef)(0);(0,l.useEffect)(()=>{if(!e?.has_live||"1"!==e.has_live||0===L.length)return;let t=!1;B(!0);let s=async t=>{let s=t?.uid,a=`/api/socolive/proxy-stream?url=${encodeURIComponent(`https://live.inplyr.com/${s?`room/${s}`:`default/${e.id}`}.m3u8`)}`;try{let e=await fetch(a,{method:"GET",cache:"no-store"});if(!e.ok)return null;let s=(await e.text()).split("\n").filter(e=>e.trim()&&!e.startsWith("#"));if(0===s.length)return null;return(await fetch(s[0],{method:"HEAD",cache:"no-store"})).ok?t:null}catch{return null}};return Promise.all(L.map(e=>s(e))).then(e=>{if(t)return;let s=e.find(e=>null!==e);s?(H(s),F(!0),A(!1)):(H(L[0]),A(!0)),B(!1)}),()=>{t=!0}},[e?.has_live,L.length]),(0,l.useEffect)(()=>{if(!T||D||z.current>=20)return;let t=setTimeout(()=>{z.current++,A(!1),B(!0);let t=async t=>{let s=t?.uid,a=`/api/socolive/proxy-stream?url=${encodeURIComponent(`https://live.inplyr.com/${s?`room/${s}`:`default/${e.id}`}.m3u8`)}`;try{let e=await fetch(a,{method:"GET",cache:"no-store"});if(!e.ok)return null;let s=(await e.text()).split("\n").filter(e=>e.trim()&&!e.startsWith("#"));if(0===s.length)return null;return(await fetch(s[0],{method:"HEAD",cache:"no-store"})).ok?t:null}catch{return null}};Promise.all(L.map(e=>t(e))).then(e=>{let t=e.find(e=>null!==e);t?(H(t),F(!0),A(!1)):A(!0),B(!1)})},15e3);return()=>clearTimeout(t)},[T,D]);let[I,R]=(0,l.useState)(null),U=e?.post_name||e?.ls_id||e?.id;if(window.location.origin,(0,l.useEffect)(()=>{if(!U)return;let e=setInterval(async()=>{try{let e=await fetch(`/api/klivevip/match/${U}`,{cache:"no-store"});if(e.ok){let t=await e.json();R(t?.match??null)}}catch{}},1e4);return()=>clearInterval(e)},[U]),!e)return(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center py-32 gap-4",children:[(0,a.jsx)("span",{className:"text-[#64748B] text-lg",children:"Kh\xf4ng t\xecm thấy trận đấu"}),(0,a.jsx)("a",{href:"/",className:"text-[#4681E8] hover:underline text-sm",children:"← Quay lại"})]});let G=I?{...e,...I}:e,P=G?.has_live==="1"&&L.length>0,K=c(G.status_id,G.sport_id),V=$&&M&&!T&&!D,W=P&&(D||T&&K.live&&z.current<20),O=!P||T&&!W&&!D,q=!K.live&&"8"!==String(G.status_id)&&"9"!==String(G.status_id),{hm:X,full:Y}=x(G.time),Z=G.source_card_meta?.league_label||G.match_data?.competition_vi||G.match_data?.competition_full||"",Q=G.match_data?.stage_label||G.source_card_meta?.stage_label||"",J=G.home_logo||d(G.home_name),ee=G.away_logo||d(G.away_name),et=e=>t=>{t.target.src=d(e)};return(0,a.jsxs)("div",{className:"w-full bg-white min-h-screen text-slate-600 font-sans pb-16",children:[(0,a.jsx)("div",{className:"w-full border-b border-slate-200 bg-white",children:(0,a.jsxs)("div",{className:`${h} mx-auto px-4 py-3 flex items-center justify-between`,children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 text-[13px] font-bold",children:[(0,a.jsx)("span",{className:"text-[#4681E8] uppercase tracking-wide",children:Z}),Q&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"text-slate-300",children:"•"}),(0,a.jsx)("span",{className:"text-slate-600",children:Q})]})]}),(0,a.jsx)("div",{className:"text-[12px] font-mono text-slate-400 hidden sm:block",children:Y})]})}),(0,a.jsxs)("div",{className:`${h} mx-auto px-0 md:px-4 py-0 md:py-6 flex flex-col lg:flex-row gap-4 lg:gap-6`,children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0 flex flex-col gap-4 lg:gap-6",children:[(0,a.jsxs)("div",{className:"w-full relative bg-[#000000] rounded-none md:rounded-2xl overflow-hidden shadow-[0_10px_40px_rgba(0,0,0,0.5)] border-y md:border border-slate-200",children:[(0,a.jsx)("div",{className:"relative w-full aspect-video bg-[#000000] group z-10",children:V?(0,a.jsx)(n,{src:`/api/klivevip/proxy-stream?url=${encodeURIComponent(`https://live.inplyr.com/${M?.uid&&"default"!==M.uid?`room/${M.uid}`:`default/${G.id}`}.m3u8`)}`,autoPlay:!0,onError:()=>A(!0)}):O?(0,a.jsx)(o,{homeName:G.home_name,awayName:G.away_name,homeLogo:G.home_logo,awayLogo:G.away_logo,homeScore:K.sc?G.home_score:"0",awayScore:K.sc?G.away_score:"0",statusText:K.t,timeText:G.time_text||X,isLive:K.live,sportId:G.sport_id,matchId:G.ls_id||G.id,kickoffMs:1e3*Number(G?.time||0),isPreMatch:q}):(0,a.jsxs)("div",{className:"absolute inset-0 z-10 flex flex-col items-center justify-center p-4 lg:p-10",children:[(0,a.jsxs)("div",{className:"absolute inset-0 flex justify-between items-center opacity-[0.03] pointer-events-none px-4 lg:px-20 overflow-hidden",children:[(0,a.jsx)("img",{src:J,alt:"",className:"w-1/2 max-w-[400px] blur-[10px]",loading:"lazy",decoding:"async"}),(0,a.jsx)("img",{src:ee,alt:"",className:"w-1/2 max-w-[400px] blur-[10px]",loading:"lazy",decoding:"async"})]}),P&&!T&&(0,a.jsx)("button",{onClick:()=>F(!0),className:"group mb-4 sm:mb-8 w-16 h-16 md:w-20 md:h-20 rounded-full bg-[#4681E8] flex items-center justify-center hover:bg-[#55CAF1] transition-all shadow-[0_0_30px_rgba(70,129,232,0.5)] curs
674or-pointer z-20",children:(0,a.jsx)("svg",{className:"w-8 h-8 md:w-10 md:h-10 text-white ml-1.5 md:ml-2 group-hover:scale-110 transition-transform",viewBox:"0 0 24 24",fill:"currentColor",children:(0,a.jsx)("path",{d:"M8 5v14l11-7z"})})}),(0,a.jsxs)("div",{className:"grid grid-cols-[1fr_auto_1fr] items-center w-full max-w-[800px] gap-2 lg:gap-8 z-20",children:[(0,a.jsxs)("div",{className:"flex flex-col items-center gap-2 lg:gap-4",children:[(0,a.jsx)("img",{src:J,alt:G.home_name,className:"w-16 h-16 sm:w-24 sm:h-24 lg:w-32 lg:h-32 object-contain drop-shadow-[0_10px_20px_rgba(0,0,0,0.8)]",onError:et(G.home_name),loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-[#FFFFFF] text-xs sm:text-base lg:text-lg font-black text-center line-clamp-2 uppercase tracking-wide",children:G.home_name})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-2 lg:gap-3",children:[K.sc?(0,a.jsxs)("div",{className:"flex items-center gap-3 lg:gap-6 bg-white/90 backdrop-blur-md px-4 py-2 lg:px-8 lg:py-4 rounded-2xl border border-slate-200 shadow-2xl",children:[(0,a.jsx)("span",{className:"text-[#4681E8] text-[32px] sm:text-[48px] lg:text-[64px] font-black leading-none",children:G.home_score}),(0,a.jsx)("span",{className:"text-slate-300 text-[20px] lg:text-[28px] font-light",children:":"}),(0,a.jsx)("span",{className:"text-[#4681E8] text-[32px] sm:text-[48px] lg:text-[64px] font-black leading-none",children:G.away_score})]}):(0,a.jsx)("div",{className:"text-[#FFFFFF] text-[32px] sm:text-[48px] lg:text-[56px] font-black tracking-widest leading-none drop-shadow-xl",children:X}),(0,a.jsxs)("span",{className:`inline-flex items-center gap-2 rounded-full px-3 py-1 lg:px-5 lg:py-1.5 text-[10px] lg:text-[12px] font-bold tracking-widest uppercase ${K.live?"bg-[#4681E8] text-white shadow-[0_0_20px_rgba(70,129,232,0.6)]":"bg-white text-slate-600 border border-slate-200"}`,children:[K.live&&(0,a.jsx)("span",{className:"w-2 h-2 rounded-full bg-white animate-pulse"}),K.t,G.time_text?` : ${G.time_text}`:""]})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-2 lg:gap-4",children:[(0,a.jsx)("img",{src:ee,alt:G.away_name,className:"w-16 h-16 sm:w-24 sm:h-24 lg:w-32 lg:h-32 object-contain drop-shadow-[0_10px_20px_rgba(0,0,0,0.8)]",onError:et(G.away_name),loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-[#FFFFFF] text-xs sm:text-base lg:text-lg font-black text-center line-clamp-2 uppercase tracking-wide",children:G.away_name})]})]})]})}),L.length>0&&(0,a.jsxs)("div",{className:"w-full bg-white border-t border-slate-200 px-3 lg:px-6 py-2.5 lg:py-4 flex items-center gap-2 lg:gap-4 overflow-x-auto z-20",children:[(0,a.jsx)("span",{className:"text-[10px] lg:text-[11px] text-slate-600 uppercase font-bold tracking-widest shrink-0 mr-1 lg:mr-2",children:"CHỌN K\xcaNH TRUYỀN:"}),L.map((e,t)=>(0,a.jsxs)("button",{onClick:()=>{H(e),F(!0),A(!1)},className:`shrink-0 flex items-center gap-1.5 lg:gap-2 rounded-full px-3 py-1.5 lg:px-5 lg:py-2 text-[11px] lg:text-[13px] font-bold transition-all ${M?.uid===e.uid&&!T?"bg-[#4681E8]/10 border border-[#4681E8] text-[#4681E8] shadow-[0_0_15px_rgba(70,129,232,0.2)]":"bg-white border border-slate-200 text-slate-600 hover:text-[#4681E8] hover:border-[#4681E8]/50"}`,children:[(0,a.jsx)("span",{className:`w-1.5 h-1.5 lg:w-2 lg:h-2 rounded-full ${M?.uid===e.uid&&!T?"bg-[#4681E8] animate-pulse":"bg-transparent"}`}),"BLV ",e.nickName||`K\xeanh ${t+1}`]},e.uid||t))]})]}),(p=(()=>{let e=s?.stats;if(!e)return!1;let t=null;return Array.isArray(e)&&e.length>0?t=e[0]:e?.results?.[0]?t=e.results[0]:e?.stats_full_time&&(t=e),!!t&&!!(t.stats_full_time?.length>0||t.stats_haft_time?.length>0||t.stats_half_time?.length>0||t.stats?.length>0)})(),u=!!(s?.lineup&&(Array.isArray(s.lineup)?s.lineup.length>0:s.lineup.home||s.lineup.away)),g=!!(s?.events&&(Array.isArray(s.events)?s.events.length>0:s.events.incidents?.length>0||s.events.data?.length>0)),j=!!(r&&(Array.isArray(r)?r.length>0:r.data?.length>0)),(y=(v=[{id:"stats",label:"THỐNG K\xca",show:p},{id:"lineup",label:"ĐỘI H\xccNH",show:u},{id:"events",label:"DIỄN BIẾN",show:g},{id:"standings",label:"BẢNG XH",show:j},{id:"odds",label:"TỶ LỆ K\xc8O",show:!!(s?.odds&&Array.isArray(s.odds)&&s.odds.length>0)}].filter(e=>e.show)).find(e=>e.id===C)?C:v[0]?.id||"odds")!==C&&setTimeout(()=>S(y),0),v.length>0?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"bg-white rounded-2xl p-2 border border-slate-200 flex overflow-x-auto gap-2 shadow-[0_4px_15px_rgba(0,0,0,0.08)] mx-4 md:mx-0",children:v.map(({id:e,label:t})=>(0,a.jsx)("button",{onClick:()=>S(e),className:`flex-1 min-w-[100px] py-2.5 sm:py-3 text-[10px] sm:text-[12px] font-black uppercase tracking-widest rounded-xl transition-all ${y===e?"bg-[#4681E8]/10 text-[#4681E8] border border-[#4681E8]/30 shadow-inner":"text-slate-500 hover:text-[#4681E8] hover:bg-[#4681E8]/5 border border-transparent"}`,children:t},e))}),(0,a.jsxs)("div",{className:"bg-white rounded-2xl border border-slate-200 overflow-hidden shadow-[0_4px_15px_rgba(0,0,0,0.08)] min-h-[400px] mx-4 md:mx-0",children:["stats"===y&&(0,a.jsx)(b,{matchDetails:s}),"lineup"===y&&(0,a.jsx)(f,{matchDetails:s}),"events"===y&&(0,a.jsx)(_,{events:s?.events}),"standings"===y&&(0,a.jsx)(k,{standings:r}),"odds"===y&&(0,a.jsx)(E,{odds:s?.odds})]})]}):null),t.length>0&&(0,a.jsxs)("div",{className:"mt-4 mx-4 md:mx-0",children:[(0,a.jsxs)("h2",{className:"px-1 py-4 text-sm sm:text-base font-black text-slate-800 uppercase flex items-center gap-3 tracking-widest border-b border-slate-100 mb-4",children:[(0,a.jsx)("span",{className:"w-1 h-5 bg-[#4681E8] rounded-sm shadow-[0_0_8px_#4681E8]"}),"TRẬN ĐẤU C\xd9NG GIẢI"]}),(0,a.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3 sm:gap-4",children:t.slice(0,4).map(e=>(0,a.jsx)(w,{m:e},e.id))})]})]}),(0,a.jsx)("div",{className:"w-full lg:w-[350px] xl:w-[400px] shrink-0 px-4 md:px-0",children:(0,a.jsxs)("div",{className:"bg-white border border-slate-200 rounded-2xl overflow-hidden flex flex-col shadow-[0_10px_30px_rgba(0,0,0,0.1)] lg:sticky lg:top-8 h-[600px] lg:h-[c
674alc(100vh-100px)] lg:max-h-[850px]",children:[(0,a.jsxs)("div",{className:"px-5 py-4 border-b border-slate-200 flex items-center justify-between bg-white",children:[(0,a.jsxs)("h3",{className:"text-slate-800 text-sm font-black uppercase tracking-widest flex items-center gap-2",children:[(0,a.jsx)("span",{className:"w-2.5 h-2.5 rounded-full bg-[#4681E8] shadow-[0_0_10px_rgba(70,129,232,0.4)]"}),"PH\xd2NG CHAT"]}),(0,a.jsxs)("span",{className:"text-[10px] bg-white px-3 py-1.5 rounded-full text-[#4681E8] font-mono border border-[#4681E8]/30 shadow-inner tracking-widest flex items-center gap-1.5",children:[(0,a.jsx)("svg",{className:"w-3 h-3",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 10l4.553-2.276A1 1 0 0121 8.618v6.764a1 1 0 01-1.447.894L15 14M5 18h8a2 2 0 002-2V8a2 2 0 00-2-2H5a2 2 0 00-2 2v8a2 2 0 002 2z"})}),L.length," BLV"]})]}),(0,a.jsx)("div",{className:"flex-1 bg-[#FFFFFF]/40 min-h-0 chat-container-wrapper",children:(0,a.jsx)(N,{anchors:L,selectedAnchor:M})})]})})]})]})}let p={25:"KIỂM SO\xc1T B\xd3NG",24:"CHUYỀN CH\xcdNH X\xc1C",23:"TỔNG SỐ ĐƯỜNG CHUYỀN",22:"TẤN C\xd4NG",21:"T.C\xd4NG NGUY HIỂM",2:"S\xdaT TR\xdaNG Đ\xcdCH",37:"PHẠT G\xd3C",28:"N\xc9M BI\xcaN",8:"VIỆT VỊ",3:"THẺ V\xc0NG",4:"THẺ ĐỎ",5:"S\xdaT PENALTY",29:"PHẠM LỖI",26:"Đ\xc1NH ĐẦU",27:"CỨU THUA",1:"B\xc0N THẮNG",7:"PHẢN LƯỚI"},u=[25,21,22,24,2,23,4,3,37,28,8,5,29],g="https://cdn.sportdb.live/upload/team/";function b({matchDetails:e}){let[t,s]=(0,l.useState)("full"),r=e?.stats,n=e?.lineup,i=n?.match?.home_team,o=n?.match?.away_team,c=null;Array.isArray(r)&&r.length>0?c=r[0]:r?.results?.[0]?c=r.results[0]:r?.stats_full_time&&(c=r);let d={full:c?.stats_full_time||[],h1:c?.stats_haft_time||c?.stats_half_time||[],h2:c?.stats_haft_time_2nd_half||[]}[t]||[];if(!c||0===d.length)return(0,a.jsx)(j,{text:"Thống k\xea sẽ được cập nhật khi trận đấu bắt đầu"});let x=[...d].sort((e,t)=>{let s=u.indexOf(e.type),a=u.indexOf(t.type);return(-1===s?999:s)-(-1===a?999:a)});return(0,a.jsxs)("div",{className:"flex flex-col",children:[(i||o)&&(0,a.jsxs)("div",{className:"flex items-center justify-between px-4 py-3 border-b border-slate-100",children:[(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5 w-20",children:[i?.logo&&(0,a.jsx)("img",{src:g+i.logo,alt:i?.name||"Home team",className:"w-8 h-8 object-contain",onError:e=>e.target.style.display="none",loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-slate-600 text-[10px] font-medium text-center leading-tight",children:i?.name||""})]}),(0,a.jsx)("div",{className:"flex gap-1",children:[{k:"h1",l:"Hiệp 1"},{k:"h2",l:"Hiệp 2"},{k:"full",l:"Cả trận"}].map(({k:e,l})=>(0,a.jsx)("button",{onClick:()=>s(e),className:`px-2.5 py-1 text-[10px] font-bold rounded transition-all ${t===e?"bg-[#E11D48] text-white":"text-slate-400 hover:text-slate-600 bg-slate-100"}`,children:l},e))}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5 w-20",children:[o?.logo&&(0,a.jsx)("img",{src:g+o.logo,alt:o?.name||"Away team",className:"w-8 h-8 object-contain",onError:e=>e.target.style.display="none",loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-slate-600 text-[10px] font-medium text-center leading-tight",children:o?.name||""})]})]}),(0,a.jsx)("div",{className:"px-4 py-3 space-y-3",children:x.map(e=>{let t=p[e.type]||`Stat ${e.type}`,s=e.home,l=e.away,r=24===e.type||25===e.type,n=s+l,i=0===n?50:s/n*100,o=s>l,c=l>s;return(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"flex justify-between items-center mb-1.5",children:[(0,a.jsxs)("span",{className:`text-xs font-bold w-10 tabular-nums ${o?"text-slate-800":"text-slate-400"}`,children:[s,r?"%":""]}),(0,a.jsx)("span",{className:"text-slate-400 text-[10px] font-semibold tracking-wide uppercase",children:t}),(0,a.jsxs)("span",{className:`text-xs font-bold w-10 text-right tabular-nums ${c?"text-slate-800":"text-slate-400"}`,children:[l,r?"%":""]})]}),(0,a.jsxs)("div",{className:"flex gap-0.5 h-[5px]",children:[(0,a.jsx)("div",{className:"flex-1 rounded-l-full bg-white/[0.06] overflow-hidden flex justify-end",children:(0,a.jsx)("div",{className:`rounded-l-full transition-all duration-500 ${o?"bg-gradient-to-r from-[#E11D48]/60 to-[#E11D48]":"bg-gradient-to-r from-white/10 to-white/20"}`,style:{width:`${i}%`}})}),(0,a.jsx)("div",{className:"flex-1 rounded-r-full bg-white/[0.06] overflow-hidden",children:(0,a.jsx)("div",{className:`rounded-r-full transition-all duration-500 ${c?"bg-gradient-to-l from-[#E11D48]/60 to-[#E11D48]":"bg-gradient-to-l from-white/10 to-white/20"}`,style:{width:`${100-i}%`}})})]})]},e.type)})})]})}
674function f({matchDetails:e}){let[t,s]=(0,l.useState)("pitch"),r=e?.lineup,n=r?.lineup||r,i=n?.home||[],o=n?.away||[],c=r?.home_formation||"",d=r?.away_formation||"",x=r?.match?.home_team,h=r?.match?.away_team;if(0===i.length&&0===o.length)return(0,a.jsx)(j,{text:"Đội h\xecnh sẽ được c\xf4ng bố trước trận đấu 30 ph\xfat"});let m=e=>e.filter(e=>1===e.first),p=e=>e.filter(e=>1!==e.first),u=m(i),g=m(o),b=p(i),w=p(o);return(0,a.jsxs)("div",{className:"flex flex-col",children:[(0,a.jsxs)("div",{className:"flex items-center justify-center gap-1 px-3 py-2 border-b border-slate-100",children:[(0,a.jsx)("button",{onClick:()=>s("pitch"),className:`px-3 py-1.5 text-[10px] font-bold rounded transition-all ${"pitch"===t?"bg-[#E11D48] text-white":"text-slate-400 bg-slate-100"}`,children:"Đội h\xecnh xuất ph\xe1t"}),(0,a.jsx)("button",{onClick:()=>s("list"),className:`px-3 py-1.5 text-[10px] font-bold rounded transition-all ${"list"===t?"bg-[#E11D48] text-white":"text-slate-400 bg-slate-100"}`,children:"Đội h\xecnh dá»± bị"})]}),"pitch"===t?(0,a.jsx)("div",{className:"relative w-full",style:{aspectRatio:"68/105"},children:(0,a.jsxs)("div",{className:"absolute inset-0 bg-gradient-to-b from-[#1a5c2a] via-[#1e6b31] to-[#1a5c2a] rounded-2xl overflow-hidden",children:[(0,a.jsxs)("div",{className:"absolute inset-[3%] border border-white/20 rounded-lg",children:[(0,a.jsx)("div",{className:"absolute left-0 right-0 top-1/2 h-px bg-white/20"}),(0,a.jsx)("div",{className:"absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 w-[22%] aspect-square rounded-full border border-white/20"}),(0,a.jsx)("div",{className:"absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 w-1.5 h-1.5 bg-white/30 rounded-full"}),(0,a.jsx)("div",{className:"absolute top-0 left-1/2 -translate-x-1/2 w-[55%] h-[16%] border-l border-r border-white/20"}),(0,a.jsx)("div",{className:"absolute top-0 left-1/2 -translate-x-1/2 w-[25%] h-[6%] border-l border-r border-white/20"}),(0,a.jsx)("div",{className:"absolute bottom-0 left-1/2 -translate-x-1/2 w-[55%] h-[16%] border-t border-l border-r border-white/20"}),(0,a.jsx)("div",{className:"absolute bottom-0 left-1/2 -translate-x-1/2 w-[25%] h-[6%] border-t border-l border-r border-white/20"})]}),(0,a.jsx)("div",{className:"absolute top-1 left-2 text-[9px] text-[#F8FAFC]/50 font-bold z-10",children:x?.name||""}),(0,a.jsx)("div",{className:"absolute top-1 right-2 text-[9px] text-[#E11D48]/70 font-bold z-10",children:c}),(0,a.jsx)("div",{className:"absolute bottom-1 left-2 text-[9px] text-[#F8FAFC]/50 font-bold z-10",children:h?.name||""}),(0,a.jsx)("div",{className:"absolute bottom-1 right-2 text-[9px] text-[#E11D48]/70 font-bold z-10",children:d}),u.map((e,t)=>{let s=`${e.x||50}%`,l=`${(e.y||10)/2}%`,r="G"===e.position;return(0,a.jsxs)("div",{className:"absolute flex flex-col items-center z-10 -translate-x-1/2 -translate-y-1/2",style:{left:s,top:l},children:[(0,a.jsx)("div",{className:`w-6 h-6 rounded-full flex items-center justify-center text-[9px] font-black ${r?"bg-yellow-400 text-black":"bg-blue-600 text-[#F8FAFC]"} shadow-md border border-white/20`,children:e.shirt_number||""}),(0,a.jsx)("span",{className:"text-[7px] text-[#F8FAFC] font-semibold mt-0.5 text-center max-w-[48px] truncate drop-shadow-[0_1px_2px_rgba(0,0,0,0.8)]",children:(e.name||"").split(" ").slice(-2).join(" ")}),1===e.captain&&(0,a.jsx)("span",{className:"absolute -top-1 -right-1 text-[6px] text-yellow-400",children:"C"})]},`h-${t}`)}),g.map((e,t)=>{let s=`${100-(e.x||50)}%`,l=`${100-(e.y||10)/2}%`,r="G"===e.position;return(0,a.jsxs)("div",{className:"absolute flex flex-col items-center z-10 -translate-x-1/2 -translate-y-1/2",style:{left:s,top:l},children:[(0,a.jsx)("div",{className:`w-6 h-6 rounded-full flex items-center justify-center text-[9px] font-black ${r?"bg-yellow-400 text-black":"bg-orange-500 text-[#F8FAFC]"} shadow-md border border-white/20`,children:e.shirt_number||""}),(0,a.jsx)("span",{className:"text-[7px] text-[#F8FAFC] font-semibold mt-0.5 text-center max-w-[48px] truncate drop-shadow-[0_1px_2px_rgba(0,0,0,0.8)]",children:(e.name||"").split(" ").slice(-2).join(" ")}),1===e.captain&&(0,a.jsx)("span",{className:"absolute -top-1 -right-1 text-[6px] text-yellow-400",children:"C"})]},`a-${t}`)})]})}):(0,a.jsxs)("div",{className:"px-3 py-2 text-xs",children:[(0,a.jsxs)("div",{className:"flex justify-between font-bold text-slate-400 mb-1 uppercase tracking-wider text-[9px] px-1",children:[(0,a.jsx)("span",{children:"Đội chá»
674§ nh\xe0"}),(0,a.jsx)("span",{children:"Đội kh\xe1ch"})]}),Array.from({length:Math.max(b.length,w.length)}).map((e,t)=>{let s=b[t],l=w[t];return(0,a.jsxs)("div",{className:"flex justify-between items-center border-b border-slate-50 py-1.5",children:[(0,a.jsx)("div",{className:"flex items-center gap-1.5 w-1/2 min-w-0",children:s&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"text-[#E11D48] font-bold w-5 text-center shrink-0 text-[10px]",children:s.shirt_number||""}),(0,a.jsx)("span",{className:"text-slate-700 truncate text-[11px]",children:s.name||""})]})}),(0,a.jsx)("div",{className:"flex items-center gap-1.5 w-1/2 justify-end min-w-0",children:l&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"text-slate-700 truncate text-[11px] text-right",children:l.name||""}),(0,a.jsx)("span",{className:"text-[#E11D48] font-bold w-5 text-center shrink-0 text-[10px]",children:l.shirt_number||""})]})})]},t)})]})]})}function j({text:e}){return(0,a.jsx)("div",{className:"flex items-center justify-center py-10 text-slate-400 text-sm text-center",children:e})}function w({m:e}){let t=c(e.status_id,e.sport_id),{hm:s,dm:l}=x(e.time),r=e.source_card_meta?.league_label||e.match_data?.competition_vi||"";return(0,a.jsxs)("a",{href:`/match/${encodeURIComponent(e.post_name||e.id)}`,className:"flex items-center gap-3 rounded-2xl bg-white hover:bg-slate-50 border border-slate-100 hover:border-[#4681E8]/30 p-3 transition-all group",children:[(0,a.jsxs)("div",{className:"shrink-0 w-14 text-center",children:[(0,a.jsx)("div",{className:"text-[#E11D48] text-[11px] font-bold",children:s}),(0,a.jsx)("div",{className:"text-slate-400 text-[9px]",children:l})]}),(0,a.jsx)("div",{className:"w-px h-9 bg-slate-200 shrink-0"}),(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("div",{className:"text-slate-400 text-[9px] truncate mb-1",children:r}),(0,a.jsxs)("div",{className:"flex items-center gap-2 mb-0.5",children:[(0,a.jsx)("img",{src:e.home_logo||d(e.home_name),alt:e.home_name,className:"w-4 h-4 object-contain shrink-0",onError:t=>t.target.src=d(e.home_name),loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-slate-600 text-[12px] font-medium truncate",children:e.home_name})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("img",{src:e.away_logo||d(e.away_name),alt:e.away_name,className:"w-4 h-4 object-contain shrink-0",onError:t=>t.target.src=d(e.away_name),loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-slate-600 text-[12px] font-medium truncate",children:e.away_name})]})]}),t.sc?(0,a.jsxs)("span",{className:"text-slate-800 font-bold text-[14px] tabular-nums shrink-0",children:[e.home_score,"-",e.away_score]}):(0,a.jsx)("span",{className:"text-[10px] font-bold text-[#E11D48] bg-[#E11D48]/10 rounded px-2.5 py-1 group-hover:bg-[#E11D48]/15 transition shrink-0",children:"XEM NGAY"})]})}let v={0:{bg:"bg-white/10",text:"text-[#F8FAFC]/40",nameCls:"text-[#94A3B8]"},1:{bg:"bg-white/10",text:"text-[#F8FAFC]/50",nameCls:"text-[#94A3B8]"},2:{bg:"bg-green-900/50",text:"text-green-400",nameCls:"text-green-400"},3:{bg:"bg-yellow-900/40",text:"text-yellow-400",nameCls:"text-emerald-600 font-bold"},4:{bg:"bg-blue-900/40",text:"text-blue-400",nameCls:"text-blue-400 font-bold"},5:{bg:"bg-red-900/40",text:"text-red-400",nameCls:"text-red-400 font-bold"}};function N({anchors:e,selectedAnchor:t}){let[s,r]=(0,l.useState)([]),[n,i]=(0,l.useState)(!1),o=(0,l.useRef)(null),c=(0,l.useRef)(null),d=t?.roomNum;return(0,l.useEffect)(()=>{if(!d)return;r([]),i(!1);let e=new EventSource(`/api/chat/${d}`);return e.onopen=()=>i(!0),e.onmessage=e=>{try{let t=JSON.parse(e.data);if("connected"===t.type)return void i(!0);if("history"===t.type&&Array.isArray(t.messages))return void r(e=>[...t.messages,...e].slice(-200));t.user&&t.text&&r(e=>[...e,t].slice(-200))}catch{}},e.onerror=()=>i(!1),()=>{e.close(),i(!1)}},[d]),(0,l.useEffect)(()=>{requestAnimationFrame(()=>{let e=c.current;e&&(e.scrollTop=e.scrollHeight)})},[s.length]),(0,a.jsxs)("div",{className:"flex flex-col h-full bg-[#0F0F23]",children:[(0,a.jsxs)("div",{ref:c,className:"flex-1 min-h-0 px-3 py-2 flex flex-col gap-[3px] overflow-y-auto",style:{scrollbarWidth:"thin",scrollbarColor:"#444 transparent"},children:[(0,a.jsx)("div",{className:"text-center text-[10px] text-[#F8FAFC]/30 bg-slate-50/60 py-1.5 rounded-xl mb-1 sticky top-0 z-10 backdrop-blur-sm",children:n?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"inline-block h-1.5 w-1.5 rounded-full bg-green-400 animate-pulse mr-1"}),"Đang kết nối ph\xf2ng chat trá»±c tiếp"]}):d?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"inline-block h-1.5 w-1.5 rounded-full bg-yellow-400 animate-pulse mr-1"}),"Đang kết nối..."]}
674):"Ch\xe0o mừng bạn đến với ph\xf2ng chat"}),0===s.length&&n&&(0,a.jsx)("div",{className:"text-center text-[10px] text-[#F8FAFC]/20 py-4",children:"Chờ tin nhắn mới..."}),s.map((e,t)=>{var s;let l=(s=e.level)>=5?v[5]:v[s]||v[0];return 2===e.type||e.text?.includes("v\xe0o ph\xf2ng tr\xf2 chuyện")?(0,a.jsxs)("div",{className:"flex items-start gap-1.5 text-[11px] leading-relaxed py-[1px] opacity-60",children:[(0,a.jsx)("span",{className:"text-green-500/70 font-medium",children:"Hi"}),(0,a.jsxs)("span",{className:`shrink-0 inline-flex items-center px-1 py-[0.5px] rounded text-[8px] font-bold ${l.bg} ${l.text}`,children:["Lv",e.level]}),(0,a.jsxs)("span",{className:`font-bold ${l.nameCls}`,children:[e.user,":"]}),(0,a.jsx)("span",{className:"text-[#F8FAFC]/40",children:e.text})]},`${e.ts}-${t}`):(0,a.jsxs)("div",{className:"flex items-start gap-1.5 text-[11px] leading-relaxed py-[1px]",children:[(0,a.jsxs)("span",{className:`shrink-0 inline-flex items-center px-1 py-[0.5px] rounded text-[8px] font-bold ${l.bg} ${l.text}`,children:["Lv.",e.level]}),(0,a.jsxs)("span",{className:`font-bold shrink-0 ${l.nameCls}`,children:[e.user,":"]}),(0,a.jsx)("span",{className:"text-[#F8FAFC]/80 break-words min-w-0",children:e.text})]},`${e.ts}-${t}`)}),(0,a.jsx)("div",{ref:o})]}),(0,a.jsxs)("div",{className:"shrink-0 px-3 py-2 bg-[#0F0F23] border-t border-white/[0.04] space-y-2",children:[(0,a.jsx)("div",{className:"flex items-center justify-center gap-3 text-[#F8FAFC]/20 text-[10px]",children:(0,a.jsx)("span",{className:"flex items-center gap-1",children:(0,a.jsx)("svg",{className:"w-3 h-3",viewBox:"0 0 24 24",fill:"currentColor",children:(0,a.jsx)("path",{d:"M12 4.5C7 4.5 2.7 7.6 1 12c1.7 4.4 6 7.5 11 7.5s9.3-3.1 11-7.5c-1.7-4.4-6-7.5-11-7.5zm0 12.5c-2.8 0-5-2.2-5-5s2.2-5 5-5 5 2.2 5 5-2.2 5-5 5zm0-8c-1.7 0-3 1.3-3 3s1.3 3 3 3 3-1.3 3-3-1.3-3-3-3z"})})})}),(0,a.jsxs)("div",{className:"flex bg-[#0F0F23] rounded-2xl overflow-hidden border border-white/[0.08]",children:[(0,a.jsx)("input",{type:"text",placeholder:"Đăng nhập để c\xf9ng chat nh\xe9",disabled:!0,className:"flex-1 bg-transparent px-3 py-2 text-[11px] text-[#F8FAFC] outline-none placeholder:text-[#F8FAFC]/30 disabled:opacity-50"}),(0,a.jsx)("button",{disabled:!0,className:"px-4 text-[11px] font-bold bg-[#E11D48] text-black disabled:bg-white/10 disabled:text-[#F8FAFC]/20 transition-colors",children:"Gửi"})]})]})]})}let y={1:{icon:"⚽",label:"B\xe0n thắng",color:"text-green-400"},2:{icon:"\uD83C\uDD7F️",label:"Phạt đền",color:"text-green-400"},3:{icon:"\uD83D\uDFE1",label:"Thẻ v\xe0ng",color:"text-yellow-400"},4:{icon:"\uD83D\uDFE1\uD83D\uDFE1",label:"Thẻ v\xe0ng 2",color:"text-emerald-600"},5:{icon:"\uD83D\uDD34",label:"Thẻ đỏ",color:"text-red-500"},7:{icon:"\uD83D\uDD04",label:"Phản lưới",color:"text-orange-400"},8:{icon:"\uD83C\uDFE5",label:"Chấn thương",color:"text-[#94A3B8]"},9:{icon:"\uD83D\uDD04",label:"Thay người",color:"text-blue-400"},11:{icon:"⏱️",label:"Hiệp 2",color:"text-[#F8FAFC]/40"},15:{icon:"\uD83E\uDD45",label:"Pen trượt",color:"text-red-400"},19:{icon:"⏱️",label:"Kết th\xfac hiệp",color:"text-[#F8FAFC]/30"},21:{icon:"\uD83C\uDFC6",label:"VAR",color:"text-purple-400"}};function _({events:e}){let t=e?.incidents||e?.events||[];return t&&0!==t.length?(0,a.jsx)("div",{className:"flex flex-col",children:t.map((e,t)=>{let s=y[e.type]||{icon:"•",label:`Event ${e.type}`,color:"text-[#F8FAFC]/50"},l=1===e.position,r=2===e.position,n=e.add_time?`+${e.add_time}`:"",i=`${e.time}'${n}`;return l||r||11!==e.type&&19!==e.type?9===e.type?(0,a.jsxs)("div",{className:`flex items-center gap-2 border-b border-slate-50 p-3 text-xs ${l?"":"flex-row-reverse"}`,children:[(0,a.jsx)("span",{className:"text-slate-400 w-10 text-center shrink-0 text-[10px]",children:i}),(0,a.jsxs)("div",{className:`flex-1 flex flex-col gap-0.5 ${l?"items-start":"items-end"}`,children:[(0,a.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,a.jsx)("span",{className:"text-green-400 text-[10px]",children:"▲"}),(0,a.jsx)("span",{className:"text-[#F8FAFC]/80 text-[11px]",children:e.in_player_name||""})]}),(0,a.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,a.jsx)("span",{className:"text-red-400 text-[10px]",children:"▼"}),(0,a.jsx)("span",{className:"text-[#F8FAFC]/40 text-[11px]",children:e.out_player_name||""})]})]})]},t):(0,a.jsxs)("div",{className:`flex items-center gap-2 border-b border-slate-50 p-3 text-xs ${l?"":"flex-row-reverse"}`,children:[(0,a.jsx)("span",{className:"text-slate-400 w-10 text-center shrink-0 text-[10px]",children:i}),(0,a.jsx)("span",{className:`shrink-0 text-sm ${s.color}`,children:s.icon}),(0,a.jsxs)("div",{className:`flex-1 min-w-0 ${l?"text-left":"text-right"}`,children:[(0,a.jsx)("span",{className:"text-slate-700 text-[11px]",children:e.player_name||""}),e.assist1_name&&(0,a.jsxs)("span",{className:"text-slate-400 text-[10px] ml-1",children:["(kiến tạo: ",e.assist1_name,")"]}),1===e.type&&void 0!==e.home_score&&(0,a.jsxs)("span",{className:"text-[#E11D48] font-bold text-[11px] ml-2",children:[e.home_score," - ",e.away_score]})]})]},t):(0,a.jsx)("div",{className:"flex items-center justify-center py-2 border-b border-slate-50 bg-slate-50",children:(0,a.jsxs)("span",{className:"text-slate-400 text-[10px] uppercase tracking-wider",children:[s.icon," ",s.label," — ",i]})},t)})}):(0,a.jsx)(j,{text:"Diễn biến trận đấu sẽ được cập nhật trực tiếp tại đ\xe2y"})}function k({standings:e}
674){return e&&e.teams&&0!==e.teams.length?(0,a.jsxs)("div",{className:"w-full text-[10px]",children:[(0,a.jsxs)("div",{className:"grid grid-cols-[20px_1fr_24px_24px_32px] bg-slate-50 p-2 text-slate-400 uppercase font-bold sticky top-0",children:[(0,a.jsx)("span",{className:"text-center",children:"#"}),(0,a.jsx)("span",{children:"Team"}),(0,a.jsx)("span",{className:"text-center",children:"T"}),(0,a.jsx)("span",{className:"text-center",children:"B"}),(0,a.jsx)("span",{className:"text-center whitespace-nowrap",children:"Đ"})]}),e.teams.slice(0,15).map((e,t)=>{let s=!!e.data,l=s?parseFloat(e.data[0]):e.rank||t+1,r=s?e.data[1]:e.target_name,n=s?e.data[7]:e.points,i=s?e.data[3]:e.won,o=s?e.data[5]:e.loss;return(0,a.jsxs)("div",{className:"grid grid-cols-[20px_1fr_24px_24px_32px] items-center p-2 border-b border-slate-50 hover:bg-slate-50 transition-colors",children:[(0,a.jsx)("span",{className:"text-center text-slate-500",children:l}),(0,a.jsxs)("div",{className:"flex items-center gap-1.5 min-w-0 pr-2",children:[e.team_logo&&(0,a.jsx)("img",{src:e.team_logo,className:"w-3.5 h-3.5 object-contain",alt:r||"Team logo",loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-slate-700 font-medium truncate",children:r})]}),(0,a.jsx)("span",{className:"text-center text-slate-500",children:i}),(0,a.jsx)("span",{className:"text-center text-slate-500",children:o}),(0,a.jsx)("span",{className:"text-center text-[#E11D48] font-bold",children:n})]},r)})]}):(0,a.jsx)(j,{text:"Bảng xếp hạng sẽ được cập nhật"})}function E({odds:e}){let t=Array.isArray(e)?e:[],s=["2","4","3","16"];function l(e){for(let a of s){let s=t.find(t=>t.odds_type===e&&String(t.company_id)===a);if(s?.odds_info?.length)return s}return t.find(t=>t.odds_type===e&&t.odds_info?.length>0)}function r(e,t){let s=e?.odds_info;if(!s?.length)return["-","-","-"];let a="opening"===t?s.length-1:0;if(!s?.length||!s[a])return["-","-","-"];let l=s[a][2];if("string"!=typeof l)return["-","-","-"];let r=l.split(",");return[r[0]||"-",r[1]||"-",r[2]||"-"]}let n=l("asia"),i=l("eu"),o=l("bs"),c=l("cr"),d=r(n,"opening"),x=r(n,"latest"),h=r(i,"opening"),m=r(i,"latest"),p=r(o,"opening"),u=r(o,"latest"),g=r(c,"opening"),b=r(c,"latest"),f=({children:e})=>(0,a.jsx)("th",{className:"px-2 py-2 text-[9px] sm:text-[10px] font-bold uppercase tracking-wider text-slate-500 border-b border-slate-100 text-center",children:e}),j=({children:e,color:t})=>(0,a.jsx)("td",{className:`px-2 py-2.5 text-center text-[11px] sm:text-xs font-bold ${t||"text-slate-600"} border-b border-slate-50`,children:e});return(0,a.jsxs)("div",{className:"overflow-x-auto",children:[(0,a.jsxs)("table",{className:"w-full min-w-[600px]",children:[(0,a.jsxs)("thead",{children:[(0,a.jsxs)("tr",{className:"bg-slate-50",children:[(0,a.jsx)("th",{className:"px-4 py-2 text-left border-b border-slate-100",rowSpan:2,children:(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("div",{className:"w-7 h-7 rounded bg-gradient-to-br from-[#1d4ed8] to-[#3b82f6] flex items-center justify-center text-white text-[9px] font-black shadow-sm",children:"B"}),(0,a.jsx)("span",{className:"text-slate-600 text-[11px] font-bold tracking-wider",children:"SPORT"})]})}),(0,a.jsx)("th",{colSpan:3,className:"px-1 py-1.5 text-center text-[9px] sm:text-[10px] font-bold uppercase tracking-wider text-[#4681E8] border-b border-l border-slate-100",children:"CƯỢC CH\xc2U \xc1"}),(0,a.jsx)("th",{colSpan:3,className:"px-1 py-1.5 text-center text-[9px] sm:text-[10px] font-bold uppercase tracking-wider text-[#4681E8] border-b border-l border-slate-100",children:"CƯỢC CH\xc2U \xc2U"}),(0,a.jsx)("th",{colSpan:3,className:"px-1 py-1.5 text-center text-[9px] sm:text-[10px] font-bold uppercase tracking-wider text-[#4681E8] border-b border-l border-slate-100",children:"T\xc0I XỈU"}),(0,a.jsx)("th",{colSpan:3,className:"px-1 py-1.5 text-center text-[9px] sm:text-[10px] font-bold uppercase tracking-wider text-[#4681E8] border-b border-l border-slate-100",children:"K\xc8O G\xd3C"})]}),(0,a.jsxs)("tr",{className:"bg-slate-50",children:[(0,a.jsx)(f,{children:"CHỦ"}),(0,a.jsx)(f,{children:"CHẤP"}),(0,a.jsx)(f,{children:"KH\xc1CH"}),(0,a.jsx)(f,{children:"CHỦ"}),(0,a.jsx)(f,{children:"H\xd2A"}),(0,a.jsx)(f,{children:"KH\xc1CH"}),(0,a.jsx)(f,{children:"T\xc0I"}),(0,a.jsx)(f,{children:"TỶ LỆ"}),(0,a.jsx)(f,{children:"XỈU"}),(0,a.jsx)(f,{children:"T\xc0I"}),(0,a.jsx)(f,{children:"TỶ LỆ"}),(0,a.jsx)(f,{children:"XỈU"})]})]}),(0,a.jsxs)("tbody",{children:[(0,a.jsxs)("tr",{className:"hover:bg-slate-50 transition-colors",children:[(0,a.jsx)("td",{className:"px-4 py-2.5 text-[11px] sm:text-xs text-slate-500 font-medium border-b border-slate-50",children:"Tỷ Lệ Mở Cược"}),(0,a.jsx)(j,{children:d[0]}),(0,a.jsx)(j,{color:"text-red-400",children:d[1]}),(0,a.jsx)(j,{children:d[2]}),(0,a.jsx)(j,{children:h[0]}),(0,a.jsx)(j,{children:h[1]}),(0,a.jsx)(j,{children:h[2]}),(0,a.jsx)(j,{children:p[0]}),(0,a.jsx)(j,{children:p[1]}),(0,a.jsx)(j,{children:p[2]}),(0,a.jsx)(j,{children:g[0]}),(0,a.jsx)(j,{children:g[1]}),(0,a.jsx)(j,{children:g[2]})]}),(0,a.jsxs)("tr",{className:"hover:bg-slate-50 transition-colors",children:[(0,a.jsx)("td",{className:"px-4 py-2.5 text-[11px] sm:text-xs text-slate-500 font-medium border-b border-slate-50",children:"Tỷ Lệ Trước Trận"}),(0,a.jsx)(j,{children:x[0]}),(0,a.jsx)(j,{color:"text-red-400",children:x[1]}),(0,a.jsx)(j,{children:x[2]}),(0,a.jsx)(j,{children:m[0]}),(0,a.jsx)(j,{children:m[1]}),(0,a.jsx)(j,{children:m[2]}),(0,a.jsx)(j,{children:u[0]}),(0,a.jsx)(j,{children:u[1]}),(0,a.jsx)(j,{children:u[2]}),(0,a.jsx)(j,{children:b[0]}),(0,a.jsx)(j,{children:b[1]}),(0,a.jsx)(j,{children:b[2]})]}),(0,a.jsxs)("tr",{className:"hover:bg-slate-50 transition-colors bg-white",children:[(0,a.jsxs)("td",{className:"px-4 py-2.5 text-[11px] sm:text-xs text-slate-700 font-bold flex items-center gap-1.5 border-b border-slate-50",children:["Live ",(0,a.jsx)("span",{className:"w-1.5 h-1.5 rounded-full bg-red-500 animate-pulse"})]}),(0,a.jsx)(j,{color:"text-green-400",children:x[0]}),(0,a.jsx)(j,{color:"text-red-400",children:x[1]}),(0,a.jsx)(j,{color:"text-green-400",children:x[2]}),(0,a.jsx)(j,{color:"text-green-400",children:m[0]}),(0,a.jsx)(j,{color:"text-green-400",children:m[1]}),(0,a.jsx)(j,{color:"text-green-400",children:m[2]}),(0,a.jsx)(j,{color:"text-green-400",children:u[0]}),(0,a.jsx)(j,{children:u[1]}),(0,a.jsx)(j,{color:"text-green-400",children:u[2]}),(0,a.jsx)(j,{color:"text-green-400",children:b[0]}),(0,a.jsx)(j,{children:b[1]}),(0,a.jsx)(j,{color:"text-green-400",children:b[2]})]})]})]}),(0,a.jsx)("p",{className:"text-center text-slate-400 text-[10px] py-2.5 border-t border-slate-100",children:"Tỷ lệ k\xe8o sẽ được cập nhật gần giờ thi đấu"})]})}},69076:(e,t,s)=>{"use strict";s.d(t,{Klivevip24ResultsPage:()=>o});var a=s(68019),l=s(10707),r=s(78637),n=s(26895),i=s(48011);function o({initialData:e,selectedLeague:t}){let s=(0,r.useRouter)(),c=(0,r.usePathname)(),d=(0,r.useSearchParams)(),[x,h]=(0,l.useTransition)(),[m,p]=(0,l.useState)(!1),[u,g]=(0,l.useState)(""),{availableLeagues:b,dateGroups:f}=(0,l.useMemo)(()=>(0,i.o8)(e),[e]),j=(0,l.useMemo)(()=>Array.from(new Set(f.map(e=>e.date_header))),[f]),w=d.get("date")||"",v=e=>{let t=new URLSearchParams(d.toString());e&&e!==w?t.set("date",e):t.delete("date"),h(()=>{let e=t.toString();s.push(e?`${c}?${e}`:c,{scroll:!1})})},N=(0,l.useMemo)(()=>{let e=f;return w&&(e=e.filter(e=>e.date_header===w)),(0,i.kK)(e,t)},[f,w,t]),y=(0,l.useMemo)(()=>
674{if(!u)return b;let e=u.toLowerCase();return b.filter(t=>t.name.toLowerCase().includes(e))},[b,u]),_=N.reduce((e,t)=>e+t.matches.length,0);if(0===f.length)return(0,a.jsxs)("div",{className:"max-w-[1440px] mx-auto px-4 py-8",children:[(0,a.jsx)(n.x,{eyebrow:"Kết quả",title:"KẾT QUẢ B\xd3NG Đ\xc1"}),(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center py-16 gap-4",children:[(0,a.jsx)("div",{className:"w-12 h-12 rounded-full border-2 border-[#E11D48]/30 border-t-[#E11D48] animate-spin"}),(0,a.jsx)("span",{className:"text-slate-500 text-sm font-medium tracking-wide",children:"Đang tải kết quả..."})]})]});let k=e=>{let t=new URLSearchParams(d.toString());e?t.set("league",e):t.delete("league"),p(!1),g(""),h(()=>{let e=t.toString();s.push(e?`${c}?${e}`:c,{scroll:!1})})};return(0,a.jsxs)("div",{className:"max-w-[1440px] mx-auto px-4 py-8",children:[(0,a.jsx)(n.x,{eyebrow:"Kết quả",title:"KẾT QUẢ B\xd3NG Đ\xc1",rightSlot:(0,a.jsx)("div",{className:"text-[12px] text-slate-600",children:(0,a.jsx)("span",{className:"text-slate-900/80 font-bold",children:t||"Tất cả giải đấu"})})}),(0,a.jsxs)("div",{className:"flex flex-col md:flex-row gap-4 mb-4 items-start md:items-center justify-between",children:[j.length>0&&(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,a.jsx)("button",{type:"button",onClick:()=>v(""),className:`px-4 py-2 rounded-xl text-sm font-bold transition-all duration-300 ${!w?"bg-gradient-to-r from-[#4681E8] to-[#2563eb] text-white shadow-[0_4px_15px_rgba(70,129,232,0.4)] border border-[#4681E8]/50":"bg-white text-[#64748B] border border-slate-200 hover:bg-slate-50 hover:text-slate-800"}`,children:"Tất cả ng\xe0y"}),j.slice(0,5).map(e=>(0,a.jsx)("button",{type:"button",onClick:()=>v(e),className:`px-4 py-2 rounded-xl text-sm font-bold transition-all duration-300 ${w===e?"bg-gradient-to-r from-[#4681E8] to-[#2563eb] text-white shadow-[0_4px_15px_rgba(70,129,232,0.4)] border border-[#4681E8]/50":"bg-white text-[#64748B] border border-slate-200 hover:bg-slate-50 hover:text-slate-800"}`,children:e},e))]}),(0,a.jsxs)("div",{className:"relative w-full md:w-[320px]",children:[(0,a.jsxs)("button",{onClick:()=>p(!m),className:"w-full flex items-center gap-3 bg-white hover:bg-slate-50 px-4 py-2.5 rounded-xl border border-slate-200 shadow-inner transition-all text-sm",children:[(0,a.jsx)("svg",{className:"w-5 h-5 text-[#4681E8]",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 4a1 1 0 011-1h16a1 1 0 011 1v2.586a1 1 0 01-.293.707l-6.414 6.414a1 1 0 00-.293.707V17l-4 4v-6.586a1 1 0 00-.293-.707L3.293 7.293A1 1 0 013 6.586V4z"})}),(0,a.jsx)("span",{className:"text-slate-700 font-bold flex-1 text-left truncate",children:t||"Chọn giải đấu..."}),(0,a.jsx)("svg",{className:`w-4 h-4 text-slate-400 transition-transform ${m?"rotate-180":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),m&&(0,a.jsxs)("div",{className:"absolute top-full left-0 right-0 mt-2 bg-white border border-slate-200 rounded-2xl shadow-xl z-50 max-h-[300px] overflow-hidden flex flex-col",children:[(0,a.jsx)("div",{className:"p-2 border-b border-slate-100",children:(0,a.jsx)("input",{type:"text",placeholder:"T\xecm giải đấu...",value:u,onChange:e=>g(e.target.value),className:"w-full bg-slate-50 border border-transparent rounded-xl px-4 py-2.5 text-sm text-slate-800 placeholder-slate-400 outline-none focus:border-[#4681E8]/50 transition-colors"})}),(0,a.jsxs)("div",{className:"overflow-y-auto flex-1 pb-2",children:[(0,a.jsx)("button",{type:"button",onClick:()=>k(),className:`block w-full text-left px-4 py-3 text-sm transition-colors ${!t?"bg-[#4681E8]/10 text-[#4681E8] border-l-4 border-[#4681E8]":"text-slate-600 hover:bg-slate-50 hover:text-slate-800"}`,children:"Tất cả giải đấu"}),y.map((e,s)=>(0,a.jsxs)("button",{type:"button",onClick:()=>k(e.name),className:`flex items-center gap-3 px-4 py-3 text-sm transition-colors cursor-pointer ${t===e.name?"bg-[#4681E8]/10 text-[#4681E8] border-l-4 border-[#4681E8]":"text-slate-600 hover:bg-slate-50 hover:text-slate-800"}`,children:[e.icon?(0,a.jsx)("img",{src:e.icon,alt:e.name||"League",className:"w-5 h-5 object-contain shrink-0",loading:"lazy",decoding:"async"}):(0,a.jsx)("div",{className:"w-5 h-5 rounded-md bg-slate-200 shrink-0"}),(0,a.jsx)("span",{className:"truncate",children:e.name})]},s))]})]})]})]}),x&&(0,a.jsxs)("div",{className:"mb-4 inline-flex items-center gap-2 rounded-full border border-slate-200 bg-white px-4 py-2 text-xs text-slate-500 shadow-sm",children:[(0,a.jsx)("span",{className:"h-2 w-2 rounded-full bg-[#E11D48] animate-pulse shadow-[0_0_8px_rgba(225,29,72,0.8)]"}),(0,a.jsx)("span",{className:"font-bold tracking-wide",children:"Đang tải kết quả từ server..."})]}),(0,a.jsx)("div",{className:"space-y-4",children:0===N.length?(0,a.jsx)("div",{className:"text-center py-16 text-[#64748B] font-medium tracking-wide",children:"Kh\xf4ng c\xf3 kết quả n\xe0o"}):N.map((e,t)=>(0,a.jsxs)("div",{className:"overflow-hidden rounded-2xl border border-slate-200 bg-white shadow-[0_8px_30px_rgba(0,0,0,0.06)]",children:[(0,a.jsx)("div",{className:"bg-slate-50 px-5 py-3 border-b border-slate-100 flex items-center justify-between",children:(0,a.jsxs)("span",{className:"text-[12px] text-slate-500 font-bold uppercase tracking-widest",children:[e.league_round?e.league_round:"V\xf2ng đấu",(0,a.jsx)("span",{className:"text-[#E11D48] ml-2 font-mono text-[11px] bg-[#E11D48]/10 px-2 py-0.5 rounded-full border border-[#
674E11D48]/20",children:e.date_header})]})}),e.matches.map((e,t)=>{var s;return(0,a.jsx)("div",{className:"bg-transparent hover:bg-slate-50 border-b border-slate-100 last:border-0 transition-colors group cursor-default",children:(0,a.jsxs)("div",{className:"flex items-center py-4 px-5 gap-4",children:[(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center min-w-[56px] shrink-0 border-r border-slate-100 pr-4",children:[(0,a.jsx)("span",{className:"text-[9px] text-slate-400 uppercase tracking-widest mb-1 font-bold",children:"L\xfac"}),(0,a.jsx)("span",{className:"text-[13px] text-slate-700 font-mono font-black",children:e.time})]}),(0,a.jsxs)("div",{className:"flex-1 flex items-center justify-end gap-3 min-w-0",children:[(0,a.jsx)("span",{className:"text-[14px] text-slate-800 font-bold truncate text-right group-hover:text-slate-900 transition-colors",children:e.home_team}),e.home_logo?(0,a.jsx)("div",{className:"w-8 h-8 rounded-full bg-slate-100 border border-slate-200 p-1 flex items-center justify-center shadow-sm",children:(0,a.jsx)("img",{src:e.home_logo,alt:e.home_team||"Home team",className:"w-full h-full object-contain",loading:"lazy"})}):(0,a.jsx)("div",{className:"w-8 h-8 rounded-full bg-slate-100 shrink-0 border border-slate-200 flex items-center justify-center text-[10px] font-bold text-slate-400",children:"?"})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center min-w-[90px] shrink-0 bg-slate-50 rounded-xl py-2 px-2 border border-slate-200 shadow-inner group-hover:border-[#4681E8]/40 transition-colors",children:[(0,a.jsx)("span",{className:`text-[22px] leading-none font-black tracking-widest drop-shadow-[0_2px_4px_rgba(0,0,0,0.8)] ${!(s=e.score)||"-"===s?"text-slate-400":"text-slate-800"}`,children:e.score}),e.ht_score&&(0,a.jsxs)("span",{className:"text-[10px] text-slate-500 font-mono mt-1 font-bold",children:["HT: ",e.ht_score]})]}),(0,a.jsxs)("div",{className:"flex-1 flex items-center gap-3 min-w-0",children:[e.away_logo?(0,a.jsx)("div",{className:"w-8 h-8 rounded-full bg-slate-100 border border-slate-200 p-1 flex items-center justify-center shadow-sm",children:(0,a.jsx)("img",{src:e.away_logo,alt:e.away_team||"Away team",className:"w-full h-full object-contain",loading:"lazy"})}):(0,a.jsx)("div",{className:"w-8 h-8 rounded-full bg-slate-100 shrink-0 border border-slate-200 flex items-center justify-center text-[10px] font-bold text-slate-400",children:"?"}),(0,a.jsx)("span",{className:"text-[14px] text-slate-800 font-bold truncate text-left group-hover:text-slate-900 transition-colors",children:e.away_team})]})]})},t)})]},t))}),(0,a.jsxs)("div",{className:"mt-6 text-center text-xs text-[#64748B] font-bold uppercase tracking-widest drop-shadow-sm",children:["Hiển thị ",_," kết quả trận đấu"]})]})}},69797:(e,t,s)=>{"use strict";function a(e){let t=e?.fixtures_v2||null,s=e?.fixtures||e?.schedules||[],a=t?.date_tabs?.length?t.date_tabs:function(e=new Date){let t=["Chủ Nhật","Thứ Hai","Thứ Ba","Thứ Tư","Thứ Năm","Thứ S\xe1u","Thứ Bảy"],s=[];for(let a=0;a<14;a+=1){let l=new Date(e);l.setDate(l.getDate()+a);let r=String(l.getDate()).padStart(2,"0"),n=String(l.getMonth()+1).padStart(2,"0"),i=`${l.getFullYear()}-${l.getMonth()+1}-${l.getDate()}`;s.push({label:0===a?"H\xf4m Nay":t[l.getDay()],date:`${r}.${n}`,dataValue:i,active:0===a})}return s}(),l=e?.selected_date||a.find(e=>e.active)?.dataValue||a[0]?.dataValue||null;if(t?.leagues?.length)return{dateTabs:a,selectedDate:l,leagues:t.leagues,totalMatches:t.leagues.reduce((e,t)=>e+t.matches.length,0)};let r=[],n=new Set;return s.forEach(e=>{let t=e.data;if(!(t.length<3))for(let s=0;s+2<t.length;s+=16){let a=t[s]||"",l=t[s+1]||"",i=t[s+2]||"",o=`${a}-${l}-${i}`;if(!n.has(o)&&l&&(n.add(o),r.push({time:a,home_team:l,away_team:i,home_logo:e.team_logos?.[2*Math.floor(s/16)]||"",away_logo:e.team_logos?.[2*Math.floor(s/16)+1]||"",score:t[s+3]||"-",ht_score:t[s+4]||"",handicap:t.length>s+9?[t[s+7]||"",t[s+8]||"",t[s+9]||""]:[],over_under:t.length>s+12?[t[s+10]||"",t[s+11]||"",t[s+12]||""]:[],one_x_two:t.length>s+15?[t[s+13]||"",t[s+14]||"",t[s+15]||""]:[]}),s+16>=t.length))break}}),{dateTabs:a,selectedDate:l,leagues:r.length>0?[{league_name:"Tất cả trận đấu",league_icon:"",match_count:r.length,matches:r}]:[],totalMatches:r.length}}function l(e){let t=e?.results_v2||null,s=e?.results||[];if(t?.date_groups?.length)return{availableLeagues:t.available_leagues||[],dateGroups:t.date_groups,totalMatches:t.date_groups.reduce((e,t)=>
674e+t.matches.length,0)};let a=[];return s.forEach(e=>{let t=e.data;if(t.length<6)return;let s=t[0],l=s.split(" - "),r=[],n=1,i=0;for(;n<t.length;){if(t[n]?.startsWith("L\xfac")){let s=t[n].replace("L\xfac","").trim();r.push({time:s,home_team:t[n+1]||"",away_team:t[n+4]||"",home_logo:e.team_logos?.[i]||"",away_logo:e.team_logos?.[i+1]||"",score:t[n+2]||"",ht_score:(t[n+3]||"").replace("H1:","").replace("HT:","").trim()}),i+=2,n+=5;continue}n+=1}r.length>0&&a.push({date_header:l[0]?.trim()||s,league_round:l.slice(1).join(" - ").trim(),matches:r})}),{availableLeagues:[],dateGroups:a,totalMatches:a.reduce((e,t)=>e+t.matches.length,0)}}function r(e,t){if(!t)return e;let s=t.toLowerCase();return e.filter(e=>e.league_round.toLowerCase().includes(s))}s.d(t,{kK:()=>r,o8:()=>l,p_:()=>a})},69839:()=>{},70508:(e,t,s)=>{"use strict";s.d(t,{cn:()=>r});var a=s(69161),l=s(82449);function r(...e){return(0,l.QP)((0,a.$)(e))}},71099:(e,t,s)=>{"use strict";s.d(t,{f:()=>r});var a=s(68019),l=s(70508);function r({eyebrow:e,title:t,titleAddon:s,rightSlot:n,className:i}){return(0,a.jsx)("div",{className:(0,l.cn)("relative mb-5 overflow-hidden border-b border-slate-200",i),children:(0,a.jsxs)("div",{className:"flex items-center justify-between px-1 py-4 min-h-[56px]",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 min-w-0",children:[(0,a.jsx)("span",{className:"h-8 w-1 shrink-0 rounded-sm bg-gradient-to-b from-[#4681E8] to-[#55CAF1] shadow-[0_0_10px_rgba(70,129,232,0.5)]"}),(0,a.jsxs)("div",{className:"min-w-0",children:[e&&(0,a.jsx)("div",{className:"text-[10px] font-bold uppercase tracking-[0.2em] text-[#4681E8]/60 mb-0.5",children:e}),(0,a.jsxs)("div",{className:"flex items-center gap-2.5 flex-wrap",children:[(0,a.jsx)("h1",{className:"text-[18px] sm:text-[22px] font-black uppercase tracking-tight text-slate-800 leading-none",children:t}),s]})]})]}),n&&(0,a.jsx)("div",{className:"hidden sm:flex items-center gap-2 text-right shrink-0 ml-4",children:n})]})})}},71202:(e,t,s)=>{"use strict";s.d(t,{LiveMatchesClient:()=>m});var a=s(68019),l=s(10707);function r({activeSport:e,onSportChange:t,activeStatus:s,onStatusChange:l,matchesCount:n}){return(0,a.jsxs)("div",{className:"mb-5 flex flex-col gap-3",children:[(0,a.jsx)("div",{className:"flex items-center gap-2 overflow-x-auto pb-1 scrollbar-hide",children:[{id:"1",label:"B\xd3NG Đ\xc1",icon:"⚽"},{id:"2",label:"B\xd3NG RỔ",icon:"\uD83C\uDFC0"},{id:"5",label:"TENNIS",icon:"\uD83C\uDFBE"},{id:"4",label:"CẦU L\xd4NG",icon:"\uD83C\uDFF8"},{id:"3",label:"B\xd3NG CHUYỀN",icon:"\uD83C\uDFD0"},{id:"6",label:"B\xd3NG B\xc0N",icon:"\uD83C\uDFD3"}].map(s=>{let l=e===s.id;return(0,a.jsxs)("button",{type:"button",onClick:()=>t(s.id),className:`flex items-center gap-2 px-4 py-2.5 rounded-xl font-bold text-[12px] whitespace-nowrap transition-all duration-200 border cursor-pointer ${l?"bg-[#4681E8]/10 text-[#4681E8] border-[#4681E8]/40 shadow-[0_0_15px_rgba(70,129,232,0.1)]":"bg-white text-slate-500 border-slate-200 hover:text-slate-700 hover:border-[#4681E8]/30"}`,children:[(0,a.jsx)("span",{className:"text-[14px]",children:s.icon}),(0,a.jsx)("span",{className:"tracking-wider uppercase",children:s.label})]},s.id)})}),(0,a.jsx)("div",{className:"flex items-center gap-1 overflow-x-auto pb-1 scrollbar-hide bg-white rounded-xl p-1.5 border border-slate-200",children:[{id:"all",label:"TẤT CẢ",keyCount:"all"},{id:"live",label:"TRỰC TIẾP",keyCount:"live"},{id:"hot",label:"HOT",keyCount:"hot"},{id:"today",label:"H\xd4M NAY",keyCount:"today"},{id:"tomorrow",label:"NG\xc0Y MAI",keyCount:"tomorrow"}].map(e=>{let t=s===e.id,r=n[e.keyCount]||0;return(0,a.jsxs)("button",{type:"button",onClick:()=>l(e.id),className:`relative px-4 py-2 font-bold text-[12px] whitespace-nowrap transition-all duration-200 uppercase tracking-wider flex items-center gap-2 rounded-lg cursor-pointer ${t?"bg-[#4681E8]/10 text-[#4681E8] shadow-inner":"text-slate-500 hover:text-slate-700 hover:bg-[#4681E8]/5"}`,children:["live"===e.id&&t&&(0,a.jsx)("span",{className:"w-1.5 h-1.5 rounded-full bg-[#4681E8] animate-pulse shadow-[0_0_6px_rgba(70,129,232,0.8)]"}),(0,a.jsx)("span",{children:e.label}),(0,a.jsx)("span",{className:`px-1.5 py-0.5 rounded text-[10px] font-black ${t?"bg-[#4681E8]/20 text-[#4681E8]":"text-slate-400"}`,children:r})]},e.id)})})]})}function n(){return"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='10' fill='%2364748B' fill-opacity='0.18'/%3
674E%3C/svg%3E"}function i({match:e,isLoading:t=!1}){if(t||!e)return(0,a.jsx)("div",{className:"animate-pulse bg-white h-[64px] w-full border-b border-slate-100"});let s=new Date(1e3*parseInt(e.time||0,10)).toLocaleTimeString("vi-VN",{hour:"2-digit",minute:"2-digit",timeZone:"Asia/Ho_Chi_Minh"}),l=function(e,t){if("1"===t||"2"===t)switch(e){case"1":default:return{text:"Sắp diễn",isLive:!1,showScore:!1};case"2":return{text:"H1",isLive:!0,showScore:!0};case"3":return{text:"HT",isLive:!0,showScore:!0};case"4":return{text:"H2",isLive:!0,showScore:!0};case"5":return{text:"Phụ",isLive:!0,showScore:!0};case"7":return{text:"Pen",isLive:!0,showScore:!0};case"8":case"9":return{text:"FT",isLive:!1,showScore:!0}}switch(e){case"0":case"1":return{text:"Sắp diễn",isLive:!1,showScore:!1};case"51":return{text:"S1",isLive:!0,showScore:!0};case"52":return{text:"S2",isLive:!0,showScore:!0};case"53":return{text:"S3",isLive:!0,showScore:!0};case"54":return{text:"S4",isLive:!0,showScore:!0};case"55":return{text:"S5",isLive:!0,showScore:!0};case"100":case"90":case"91":case"110":return{text:"FT",isLive:!1,showScore:!0};default:return{text:"LIVE",isLive:!0,showScore:!0}}}(String(e.status_id),String(e.sport_id)),r=e.time_text||e.source_card_meta?.time_text||"",o=l.isLive,c=e.home_score??"-",d=e.away_score??"-",x=e.home_logo||n(),h=e.away_logo||n();return(0,a.jsxs)("a",{href:`/match/${encodeURIComponent(e.post_name||e.id)}`,className:"flex items-center w-full group border-b border-slate-100 bg-white hover:bg-[#4681E8]/5 transition-colors min-h-[64px]",children:[(0,a.jsx)("div",{className:`w-[60px] flex flex-col items-center justify-center shrink-0 h-full border-r ${o?"border-[#4681E8]/30 bg-[#4681E8]/5":"border-slate-100"}`,children:o?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"text-[#4681E8] font-bold text-[11px] uppercase tracking-wider tabular-nums leading-none",children:r||l.text}),(0,a.jsx)("span",{className:"w-1.5 h-1.5 rounded-full bg-[#4681E8] animate-pulse mt-1"})]}):(0,a.jsx)("span",{className:"text-slate-500 font-medium text-[12px]",children:s})}),(0,a.jsxs)("div",{className:"flex-1 flex flex-col justify-center px-3 py-2 gap-1.5 min-w-0",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between w-full",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2.5 min-w-0 overflow-hidden",children:[(0,a.jsx)("img",{src:x,alt:e.home_name,className:"w-4 h-4 shrink-0 object-contain",onError:e=>e.currentTarget.src=n(),loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-[13px] font-semibold truncate text-slate-800",children:e.home_name})]}),l.showScore&&(0,a.jsx)("span",{className:`text-[15px] font-black tabular-nums shrink-0 ml-2 ${o?"text-[#4681E8]":"text-slate-700"}`,children:c})]}),(0,a.jsxs)("div",{className:"flex items-center justify-between w-full",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2.5 min-w-0 overflow-hidden",children:[(0,a.jsx)("img",{src:h,alt:e.away_name,className:"w-4 h-4 shrink-0 object-contain",onError:e=>e.currentTarget.src=n(),loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-[13px] font-semibold truncate text-slate-800",children:e.away_name})]}),l.showScore&&(0,a.jsx)("span",{className:`text-[15px] font-black tabular-nums shrink-0 ml-2 ${o?"text-[#4681E8]":"text-slate-700"}`,children:d})]})]}),(0,a.jsx)("div",{className:"w-[48px] h-full flex items-center justify-center shrink-0 text-slate-300 group-hover:text-[#4681E8] transition-colors border-l border-slate-100",children:(0,a.jsx)("svg",{className:"w-5 h-5 fill-current",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{d:"M8 5v14l11-7z"})})})]})}let o=new Set(["1","2","3","4","5","7"]),c=new Set(["8","9","15"]),d=new Set(["51","52","53","54","55","56","57","58","59"]),x=new Set(["100","90","91","92","93","110"]);function h(e){let t=String(e.status_id);return 2>=parseInt(e.sport_id)?o.has(t):d.has(t)}function m({matches:e,matchIndex:t}){let[s,n]=(0,l.useState)("1"),[o,d]=(0,l.useState)("all"),[p,u]=(0,l.useState)(1);(0,l.useEffect)(()=>{u(1)},[s,o]);let{todayStart:g,tomorrowStart:b,dayAfterStart:f}=(0,l.useMemo)(()=>{let e,t,s,{vnTodayStartUTC:a,vnTomorrowStartUTC:l,vnDayAfterStartUTC:r}=(s=(t=Math.floor(Date.UTC((e=new Date(Date.now()+252e5)).getUTCFullYear(),e.getUTCMonth(),e.getUTCDate())/1e3)-25200)+86400,{vnTodayStartUTC:t,vnTomorrowStartUTC:s,vnDayAfterStartUTC:s+86400});return{todayStart:a,tomorrowStart:l,dayAfterStart:r}},[]),j=(0,l.useMemo)(()=>new Map(e.map(e=>[e?.match_key?String(e.match_key):e?.ls_id?String(e.ls_id):e?.id?`${String(e.sport_id||"0")}
674:${String(e.id)}`:e?.scheduleId?`${String(e.sport_id||"0")}:schedule:${String(e.scheduleId)}`:[String(e?.sport_id||"0"),String(e?.time||"0"),String(e?.home_name||""),String(e?.away_name||"")].join(":"),e])),[e]),w=t?.summary_by_sport?.[s],v=t?.bucket_keys_by_sport?.[s],N=t?.bucket_pages_by_sport?.[s],y=e.filter(e=>{let t;return String(e.sport_id)===s&&(t=String(e.status_id),2>=parseInt(e.sport_id)?!c.has(t):!x.has(t))}),_=y.filter(e=>{let t=parseInt(e.time);return t>=g&&t<b}),k=y.filter(e=>{let t=parseInt(e.time);return t>=b&&t<f}),E={all:y.length,live:y.filter(e=>h(e)).length,hot:y.filter(e=>"1"===String(e.hot)).length,today:_.length,tomorrow:k.length},C=(0,l.useMemo)(()=>{if(v){if("all"===o&&Array.isArray(N?.all)&&N.all.length>0)return N.all.slice(0,p).flat().map(e=>j.get(e)).filter(Boolean);let e=v[o];if(Array.isArray(e))return e.map(e=>j.get(e)).filter(Boolean)}return"all"===o?y:"live"===o?y.filter(e=>h(e)):"hot"===o?y.filter(e=>"1"===String(e.hot)):"today"===o?_:"tomorrow"===o?k:y},[o,y,j,N,v,_,k,p]),S="all"===o&&Array.isArray(N?.all)&&p<N.all.length,L=(0,l.useMemo)(()=>"all"!==o&&"live"!==o&&"hot"!==o?[]:C.filter(e=>"1"===String(e.hot)||h(e)).slice(0,4),[C,o]),$=(0,l.useMemo)(()=>{let e=new Map;
674return C.forEach(t=>{let s=t.source_card_meta?.league_label||t.match_data?.competition_vi||t.match_data?.competition_name||t.match_data?.competition_full||"Giải đấu kh\xe1c";e.has(s)||e.set(s,[]),e.get(s).push(t)}),Array.from(e.entries())},[C]);return(0,a.jsxs)("div",{className:"w-full min-h-[500px]",children:[(0,a.jsx)(r,{activeSport:s,onSportChange:n,activeStatus:o,onStatusChange:d,matchesCount:w||E}),0===C.length?(0,a.jsx)("div",{className:"py-20 text-center",children:(0,a.jsx)("div",{className:"text-slate-400 text-base font-medium",children:"Kh\xf4ng c\xf3 trận đấu n\xe0o."})}):(0,a.jsxs)("div",{className:"flex flex-col gap-6",children:[L.length>0&&"all"===o&&(0,a.jsxs)("div",{className:"mb-4",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 mb-3 px-1",children:[(0,a.jsx)("span",{className:"w-2 h-4 rounded-full bg-[#4681E8]"}),(0,a.jsx)("h2",{className:"text-slate-800 font-black text-sm uppercase tracking-wider",children:"Trận đấu t\xe2m điểm"})]}),(0,a.jsx)("div",{className:"grid grid-cols-1 xl:grid-cols-2 gap-2",children:L.map((e,t)=>(0,a.jsx)(i,{match:e},`featured-${e.ls_id||e.id}-${t}`))})]}),(0,a.jsx)("div",{className:"flex flex-col gap-5",children:$.map(([e,t])=>{let s=t[0]?.match_data?.competition_logo;return(0,a.jsxs)("div",{className:"rounded-xl overflow-hidden border border-slate-200 bg-white shadow-sm",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2.5 bg-[#0E1B33] px-4 py-2.5 border-b border-[#0E1B33]",children:[s&&(0,a.jsx)("img",{src:s,alt:"league",className:"w-4 h-4 object-contain brightness-200 opacity-80",loading:"lazy",decoding:"async"}),(0,a.jsx)("h3",{className:"text-white text-[12px] font-bold uppercase tracking-wider truncate",children:e})]}),(0,a.jsx)("div",{className:"flex flex-col",children:t.map((e,t)=>(0,a.jsx)(i,{match:e},e.ls_id||`${e.id}-${t}`))})]},e)})}),S&&(0,a.jsx)("div",{className:"flex justify-center mt-6",children:(0,a.jsx)("button",{type:"button",onClick:()=>u(e=>e+1),className:"inline-flex items-center justify-center rounded-xl border border-[#4681E8]/30 bg-white px-8 py-3 text-[12px] font-bold uppercase tracking-wider text-[#4681E8] transition-all duration-200 hover:bg-[#4681E8] hover:text-white hover:border-[#4681E8]",children:"Tải th\xeam"})})]})]})}},72344:(e,t,s)=>{"use strict";s.d(t,{StandingsClient:()=>h});var a=s(68019),l=s(10707),r=s(46914),n=s(99271);function i(e){return"W"===e?"border border-emerald-500/45 bg-emerald-500/25 text-emerald-300 shadow-[0_0_0_1px_rgba(16,185,129,0.08)_inset]":"L"===e?"border border-red-500/45 bg-red-500/25 text-red-300 shadow-[0_0_0_1px_rgba(239,68,68,0.08)_inset]":"D"===e?"border border-amber-400/45 bg-amber-400/22 text-amber-200 shadow-[0_0_0_1px_rgba(251,191,36,0.08)_inset]":"border border-slate-500/40 bg-slate-500/18 text-slate-700"}function o(e,t){return 1===e?{bar:"bg-[linear-gradient(180deg,#facc15,#f97316)]",badge:"border-emerald-600/60 bg-slate-100 text-yellow-700 shadow-[0_0_18px_rgba(250,204,21,0.14)]",row:"from-[#32230d]/70 via-transparent to-transparent"}:e<=4?{bar:"bg-[linear-gradient(180deg,#fb7185,#f97316)]",badge:"border-[#fb7185]/45 bg-slate-100 text-rose-700",row:"from-[#241318]/55 via-transparent to-transparent"}:e<=6?{bar:"bg-[linear-gradient(180deg,#f59e0b,#facc15)]",badge:"border-[#f59e0b]/45 bg-slate-100 text-yellow-700",row:"from-[#24190b]/45 via-transparent to-transparent"}:e<=10?{bar:"bg-[linear-gradient(180deg,#38bdf8,#2563eb)]",badge:"border-sky-400/40 bg-white text-sky-700",row:"from-[#101725]/32 via-transparent to-transparent"}:e>=Math.max(t-2,1)?{bar:"bg-[linear-gradient(180deg,#ef4444,#7f1d1d)]",badge:"border-red-500/40 bg-slate-100 text-red-700",row:"from-[#220f14]/45 via-transparent to-transparent"}:{bar:"bg-[linear-gradient(180deg,#64748b,#334155)]",badge:"border-slate-500/35 bg-white text-slate-700",row:"from-[#12161d]/24 via-transparent to-transparent"}}function c({detail:e}){let[t,s]=(0,l.useState)(!1),n=(0,l.useRef)(null),[o,d]=(0,l.useState)({top:0,left:0}),x=i(e.result),h=(0,l.useCallback)(()=>{if(n.current){let e=n.current.getBoundingClientRect();d({top:e.top+window.scrollY-8,left:e.left+e.width/2+window.scrollX})}s(!0)},[]);return(0,a.jsxs)("div",{ref:n,className:"relative inline-flex",onMouseEnter:h,onMouseLeave:()=>s(!1),children:[(0,a.jsx)("span",{className:`inline-flex h-7 w-7 items-center justify-center rounded-[8px] text-[11px] font-black cursor-pointer transition-transform hover:-translate-y-0.5 ${x}`,children:e.result}),t&&e.match_time&&"u">typeof document&&(0,r.createPortal)((0,a.jsxs)("div",{className:"fixed z-[9999] w-[220px] pointer-events-none",style:{to
674p:`${o.top}px`,left:`${o.left}px`,transform:"translate(-50%, -100%)",position:"absolute"},children:[(0,a.jsxs)("div",{className:"overflow-hidden rounded-xl border border-[#cbd5e1] bg-white shadow-2xl",children:[(0,a.jsx)("div",{className:"bg-slate-100 px-3 py-1.5 text-[10px] text-slate-600 font-mono text-center border-b border-[#cbd5e1]",children:e.match_time}),(0,a.jsxs)("div",{className:"px-3 py-2.5 flex items-center justify-between gap-2",children:[(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5 flex-1 min-w-0",children:[e.home_logo?(0,a.jsx)("img",{src:e.home_logo,alt:e.home_team,className:"w-7 h-7 object-contain",loading:"lazy",decoding:"async"}):(0,a.jsx)("div",{className:"w-7 h-7 rounded-full bg-gray-700 flex items-center justify-center text-[8px] text-slate-600 font-bold",children:"?"}),(0,a.jsx)("span",{className:"text-[9px] text-slate-600 font-bold text-center leading-tight line-clamp-2 max-w-[70px]",children:e.home_team})]}),(0,a.jsx)("div",{className:"text-slate-900 font-black text-sm whitespace-nowrap px-1",children:e.score||"? - ?"}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5 flex-1 min-w-0",children:[e.away_logo?(0,a.jsx)("img",{src:e.away_logo,alt:e.away_team,className:"w-7 h-7 object-contain",loading:"lazy",decoding:"async"}):(0,a.jsx)("div",{className:"w-7 h-7 rounded-full bg-gray-700 flex items-center justify-center text-[8px] text-slate-600 font-bold",children:"?"}),(0,a.jsx)("span",{className:"text-[9px] text-slate-600 font-bold text-center leading-tight line-clamp-2 max-w-[70px]",children:e.away_team})]})]})]}),(0,a.jsx)("div",{className:"absolute left-1/2 -translate-x-1/2 -bottom-1 w-2 h-2 bg-white border-r border-b border-[#cbd5e1] rotate-45"})]}),document.body)]})}function d({result:e}){let t=i(e);return(0,a.jsx)("span",{className:`inline-flex h-7 w-7 items-center justify-center rounded-[8px] text-[11px] font-black ${t}`,children:e})}function x({value:e,totalTeams:t}){let s=Number(e);if(!Number.isFinite(s))return(0,a.jsx)("td",{className:"px-4 py-4 text-center font-mono font-black text-slate-400",children:e});let l=o(s,t);return(0,a.jsxs)("td",{className:"relative px-4 py-4 text-center font-mono",children:[(0,a.jsx)("span",{className:`absolute left-0 top-1/2 h-7 w-1 -translate-y-1/2 rounded-r-full ${l.bar}`}),(0,a.jsx)("span",{className:`inline-flex h-8 w-8 items-center justify-center rounded-[10px] border text-[13px] font-black ${l.badge}`,children:s})]})}function h({initialData:e}){let[t]=(0,l.useState)(!1),[s,r]=(0,l.useState)(!1),[i,p]=(0,l.useState)(""),u=(0,l.useRef)(null);if((0,l.useEffect)(()=>{function e(e){u.current&&!u.current.contains(e.target)&&r(!1)}return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[]),!e)return(0,a.jsx)("div",{className:"text-center py-20 text-slate-600",children:"Đang tải dữ liệu..."});let g=e.available_leagues||[],b=g.filter(e=>e.name.toLowerCase().includes(i.toLowerCase())),f=e.teams&&e.teams.length>0&&Array.isArray(e.teams[0]?.form),j=!f&&e.rankings;return(0,a.jsxs)("div",{className:"mx-auto max-w-[1440px] px-4 py-8",children:[(0,a.jsx)(n.Q,{eyebrow:"Bảng xếp hạng",title:"BẢNG XẾP HẠNG",rightSlot:(0,a.jsx)("div",{className:"text-[12px] text-slate-600",children:(0,a.jsx)("span",{className:"text-slate-900/80 font-bold",children:e.league_name})})}),g.length>0&&(0,a.jsxs)("div",{className:"mb-6",ref:u,children:[(0,a.jsxs)("div",{className:"relative inline-flex min-w-[320px] items-center gap-3 rounded-2xl border border-slate-200 bg-white backdrop-blur-md px-5 py-3.5 cursor-pointer shadow-[0_8px_30px_rgba(0,0,0,0.06)] transition-colors hover:border-[#4681E8]/50 hover:shadow-[0_8px_30px_rgba(70,129,232,0.1)]",onClick:()=>r(!s),children:[e.league_icon&&(0,a.jsx)("img",{src:e.league_icon,alt:e.league_name||"League icon",className:"w-6 h-6 object-contain",loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-slate-800 font-bold text-sm flex-1",children:e.league_name||"Chọn giải đấu"}),(0,a.jsx)("svg",{className:`w-4 h-4 text-[#4681E8] transition-transform ${s?"rotate-180":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),s&&(0,a.jsxs)("div",{className:"absolute z-50 mt-2 w-[360px] overflow-hidden rounded-2xl border border-slate-200 bg-white backdrop-blur-xl shadow-[0_24px_80px_rgba(0,0,0,0.15)]",children:[(0,a.jsx)("div",{className:"p-2 border-b border-slate-100",children:(0,a.jsx)("input",{type:"text",placeholder:"T\xecm kiếm giải đấu...",value:i,onChange:e=>p(e.target.value),className:"w-full bg-slate-50 text-slate-800 text-sm px-4 py-2.5 rounded-xl border border-transparent outline-none focus:border-[#4681E8]/50 placeholder-slate-400 transition-colors",autoF
674ocus:!0})}),(0,a.jsxs)("div",{className:"max-h-[340px] overflow-y-auto",children:[b.map(t=>(0,a.jsxs)("a",{href:`/standings?league=${encodeURIComponent(t.id)}`,className:`flex items-center gap-3 px-4 py-3 cursor-pointer transition-colors hover:bg-slate-50 ${t.id===e.league_id?"bg-[#4681E8]/10 border-l-4 border-[#4681E8]":""}`,children:[t.icon?(0,a.jsx)("img",{src:t.icon,alt:t.name||"League",className:"w-5 h-5 object-contain flex-shrink-0",loading:"lazy",decoding:"async"}):(0,a.jsx)("div",{className:"w-5 h-5 rounded bg-gray-700 flex-shrink-0"}),(0,a.jsx)("span",{className:"text-sm text-slate-900 truncate",children:t.name})]},t.id)),0===b.length&&(0,a.jsx)("div",{className:"px-4 py-8 text-center text-gray-500 text-sm",children:"Kh\xf4ng t\xecm thấy giải đấu"})]})]})]}),t&&(0,a.jsxs)("div",{className:"flex items-center justify-center py-12",children:[(0,a.jsx)("div",{className:"animate-spin w-8 h-8 border-2 border-emerald-600 border-t-transparent rounded-full"}),(0,a.jsx)("span",{className:"ml-3 text-slate-600 text-sm",children:"Đang tải bảng xếp hạng từ server..."})]}),!t&&f&&(0,a.jsxs)("div",{className:"overflow-hidden rounded-[24px] border border-slate-200 bg-white shadow-[0_8px_30px_rgba(0,0,0,0.08)]",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between gap-3 border-b border-[#4681E8]/20 bg-gradient-to-r from-[#4681E8] to-[#2563eb] px-6 py-4 text-white shadow-[0_4px_25px_rgba(70,129,232,0.3)]",children:[(0,a.jsx)("div",{className:"text-[13px] font-black uppercase tracking-[0.2em] drop-shadow-sm text-white/80",children:"League"}),(0,a.jsx)("div",{className:"truncate text-sm font-black sm:text-base drop-shadow-md",children:e.league_name})]}),(0,a.jsx)("div",{className:"overflow-x-auto",children:(0,a.jsxs)("table",{className:"w-full text-left border-collapse",children:[(0,a.jsx)("thead",{children:(0,a.jsx)("tr",{className:"bg-slate-50 text-[11px] uppercase tracking-[0.2em] text-slate-500",children:e.header.map((t,s)=>{let l=e.teams.some(e=>e.form&&e.form.length>0);return t.toLowerCase().includes("phong độ")&&!l?null:(0,a.jsx)("th",{colSpan:s===e.header.length-1&&l?5:1,className:`p-4 font-semibold ${1===s?"w-1/3 text-left":"text-center"}`,children:t},s)})})}),(0,a.jsx)("tbody",{className:"text-sm",children:e.teams.map((t,s)=>(o(Number(t.data[0]||s+1),e.teams.length),(0,a.jsxs)("tr",{className:"group border-b border-slate-100 bg-white transition-colors hover:bg-slate-50 cursor-pointer",children:[t.data.map((s,l)=>0===l?(0,a.jsx)(x,{value:s,totalTeams:e.teams.length},l):1===l?(0,a.jsx)("td",{className:"p-4",children:(0,a.jsxs)("div",{className:"flex items-center gap-3 rounded-2xl border border-slate-100 bg-slate-50 px-4 py-2.5 transition-colors group-hover:border-[#4681E8]/30 group-hover:bg-[#4681E8]/5",children:[t.team_logo?(0,a.jsx)("img",{src:t.team_logo,alt:s,className:"h-8 w-8 rounded-full bg-white object-contain p-0.5 filter drop-shadow-[0_2px_4px_rgba(0,0,0,0.1)]",loading:"lazy"}):(0,a.jsx)("div",{className:"flex h-8 w-8 items-center justify-center rounded-full border border-slate-200 bg-white text-[10px] font-bold text-slate-400",children:"?"}),(0,a.jsx)("span",{className:"font-bold text-slate-800 transition-colors group-hover:text-[#4681E8]",children:s})]})},l):(0,a.jsx)("td",{className:"p-4 text-center font-mono text-slate-600",children:s},l)),t.form&&t.form.length>0&&(0,a.jsxs)(a.Fragment,{children:[t.form.map((e,t)=>(0,a.jsx)("td",{className:"p-2 text-center",children:e.match_time?(0,a.jsx)(c,{detail:e}):(0,a.jsx)(d,{result:e.result})},`form-${t}`)),t.form.length<5&&Array.from({length:5-t.form.length}).map((e,t)=>(0,a.jsx)("td",{className:"p-2"},`pad-${t}`))]})]},s)))})]})})]}),!t&&!f&&j&&(0,a.jsx)(m,{rankings:e.rankings}),!t&&!f&&!j&&e.header&&e.teams&&(0,a.jsx)("div",{className:"text-center py-20 text-slate-600",children:"Dữ liệu đang được cập nhật..."}),!t&&(f||j)&&(0,a.jsxs)("div",{className:"mt-6 flex flex-wrap items-center gap-5 px-5 py-4 bg-slate-50 rounded-2xl border border-slate-200",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,a.jsx)("span",{className:"w-2.5 h-2.5 rounded-full bg-emerald-500"}),(0,a.jsx)("span",{className:"text-[11px] text-slate-600 font-bold uppercase tracking-wider",children:"Đội trưởng bảng"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,a.jsx)("span",{className:"w-2.5 h-2.5 rounded-full bg-sky-4
67400"}),(0,a.jsx)("span",{className:"text-[11px] text-slate-600 font-bold uppercase tracking-wider",children:"Champions League"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,a.jsx)("span",{className:"w-2.5 h-2.5 rounded-full bg-amber-500"}),(0,a.jsx)("span",{className:"text-[11px] text-slate-600 font-bold uppercase tracking-wider",children:"Europa League"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,a.jsx)("span",{className:"w-2.5 h-2.5 rounded-full bg-[#f97316]"}),(0,a.jsx)("span",{className:"text-[11px] text-slate-600 font-bold uppercase tracking-wider",children:"Europa Conference"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,a.jsx)("span",{className:"w-2.5 h-2.5 rounded-full bg-[#E11D48]"}),(0,a.jsx)("span",{className:"text-[11px] text-slate-600 font-bold uppercase tracking-wider",children:"Xuống hạng"})]})]})]})}function m({rankings:e}){if(!e||0===e.length)return null;let t=e[0].data,s=e.slice(1);return(0,a.jsx)("div",{className:"overflow-hidden rounded-[22px] border border-[#cbd5e1] bg-[linear-gradient(180deg,#191a20,#111218)] shadow-[0_24px_80px_rgba(0,0,0,0.4)]",children:(0,a.jsx)("div",{className:"overflow-x-auto",children:(0,a.jsxs)("table",{className:"w-full text-left border-collapse",children:[(0,a.jsx)("thead",{children:(0,a.jsx)("tr",{className:"bg-white text-[11px] uppercase tracking-[0.18em] text-slate-600",children:t.map((e,l)=>{let r=l===t.length-1,n=s[0]&&s[0].data.length>t.length?s[0].data.length-t.length+1:1;return(0,a.jsx)("th",{colSpan:r?n:1,className:`p-4 font-semibold ${1===l?"w-1/3 text-left":"text-center"}`,children:e},l)})})}),(0,a.jsx)("tbody",{className:"text-sm",children:s.map((e,t)=>(0,a.jsx)("tr",{className:"group border-b border-[#cbd5e1] transition-colors hover:bg-white",children:e.data.map((t,l)=>0===l?(0,a.jsx)(x,{value:t,totalTeams:s.length},l):1===l?(0,a.jsx)("td",{className:"p-4",children:(0,a.jsxs)("div",{className:"flex items-center gap-3 rounded-2xl border border-white/6 bg-[linear-gradient(180deg,rgba(255,255,255,0.03),rgba(255,255,255,0.01))] px-3 py-2 transition-colors group-hover:border-emerald-600/22",children:[e.team_logo?(0,a.jsx)("img",{src:e.team_logo,alt:t,className:"h-8 w-8 rounded-full bg-white/5 object-contain ring-1 ring-white/8",loading:"lazy"}):(0,a.jsx)("div",{className:"flex h-8 w-8 items-center justify-center rounded-full border border-gray-700 bg-gray-800 text-xs font-bold text-gray-500",children:"?"}),(0,a.jsx)("span",{className:"font-bold text-slate-900 transition-colors group-hover:text-emerald-600",children:t})]})},l):["W","D","L"].includes(t)?(0,a.jsx)("td",{className:"p-2 text-center",children:(0,a.jsx)("span",{className:`inline-flex h-7 w-7 items-center justify-center rounded-[8px] text-[11px] font-black ${i(t)}`,children:t})},l):(0,a.jsx)("td",{className:"p-4 text-center font-mono text-slate-600",children:t},l))},t))})]})})})}},73268:(e,t,s)=>{"use strict";function a(e){let t=e?.fixtures_v2||null,s=e?.fixtures||e?.schedules||[],a=t?.date_tabs?.length?t.date_tabs:function(e=new Date){let t=["Chủ Nhật","Thứ Hai","Thứ Ba","Thứ Tư","Thứ Năm","Thứ S\xe1u","Thứ Bảy"],s=[];for(let a=0;a<14;a+=1){let l=new Date(e);l.setDate(l.getDate()+a);let r=String(l.getDate()).padStart(2,"0"),n=String(l.getMonth()+1).padStart(2,"0"),i=`${l.getFullYear()}-${l.getMonth()+1}-${l.getDate()}`;s.push({label:0===a?"H\xf4m Nay":t[l.getDay()],date:`${r}.${n}`,dataValue:i,active:0===a})}return s}(),l=e?.selected_date||a.find(e=>e.active)?.dataValue||a[0]?.dataValue||null;if(t?.leagues?.length)return{dateTabs:a,selectedDate:l,leagues:t.leagues,totalMatches:t.leagues.reduce((e,t)=>e+t.matches.length,0)};let r=[],n=new Set;return s.forEach(e=>{let t=e.data;if(!(t.length<3))for(let s=0;s+2<t.length;s+=16){let a=t[s]||"",l=t[s+1]||"",i=t[s+2]||"",o=`${a}-${l}-${i}`;if(!n.has(o)&&l&&(n.add(o),r.push({time:a,home_team:l,away_team:i,home_logo:e.team_logos?.[2*Math.floor(s/16)]||"",away_logo:e.team_logos?.[2*Math.floor(s/16)+1]||"",score:t[s+3]||"-",ht_score:t[s+4]||"",handicap:t.length>s+9?[t[s+7]||"",t[s+8]||"",t[s+9]||""]:[],over_under:t.length>s+12?[t[s+10]||"",t[s+11]||"",t[s+12]||""]:[],one_x_two:t.length>s+15?[t[s+13]||"",t[s+14]||"",t[s+15]||""]:[]}),s+16>=t.length))break}}),{dateTabs:a,selectedDate:l,leagues:r.length>0?[{league_name:"Tất cả trận đấu",league_icon:"",match_count:r.length,matches:r}]:[],totalMatches:r.length}}function l(e){let t=e?.results_v2||null,s=e?.results||[];if(t?.date_groups?.length)return{availableLeagues:t.available_leagues||[],dateGroups:t.date_groups,totalMatches:t.date_groups.reduce((e,t)=>
674e+t.matches.length,0)};let a=[];return s.forEach(e=>{let t=e.data;if(t.length<6)return;let s=t[0],l=s.split(" - "),r=[],n=1,i=0;for(;n<t.length;){if(t[n]?.startsWith("L\xfac")){let s=t[n].replace("L\xfac","").trim();r.push({time:s,home_team:t[n+1]||"",away_team:t[n+4]||"",home_logo:e.team_logos?.[i]||"",away_logo:e.team_logos?.[i+1]||"",score:t[n+2]||"",ht_score:(t[n+3]||"").replace("H1:","").replace("HT:","").trim()}),i+=2,n+=5;continue}n+=1}r.length>0&&a.push({date_header:l[0]?.trim()||s,league_round:l.slice(1).join(" - ").trim(),matches:r})}),{availableLeagues:[],dateGroups:a,totalMatches:a.reduce((e,t)=>e+t.matches.length,0)}}function r(e,t){if(!t)return e;let s=t.toLowerCase();return e.filter(e=>e.league_round.toLowerCase().includes(s))}s.d(t,{kK:()=>r,o8:()=>l,p_:()=>a})},73401:()=>{},75235:(e,t,s)=>{"use strict";s.d(t,{LiveMatchesClient:()=>m});var a=s(68019),l=s(10707);function r({activeSport:e,onSportChange:t,activeStatus:s,onStatusChange:l,matchesCount:n}){return(0,a.jsxs)("div",{className:"mb-5 flex flex-col gap-3",children:[(0,a.jsx)("div",{className:"flex items-center gap-2 overflow-x-auto pb-1 scrollbar-hide",children:[{id:"1",label:"B\xd3NG Đ\xc1",icon:"⚽"},{id:"2",label:"B\xd3NG RỔ",icon:"\uD83C\uDFC0"},{id:"5",label:"TENNIS",icon:"\uD83C\uDFBE"},{id:"4",label:"CẦU L\xd4NG",icon:"\uD83C\uDFF8"},{id:"3",label:"B\xd3NG CHUYỀN",icon:"\uD83C\uDFD0"},{id:"6",label:"B\xd3NG B\xc0N",icon:"\uD83C\uDFD3"}].map(s=>{let l=e===s.id;return(0,a.jsxs)("button",{type:"button",onClick:()=>t(s.id),className:`flex items-center gap-2 px-4 py-2.5 rounded-xl font-bold text-[12px] whitespace-nowrap transition-all duration-200 border cursor-pointer ${l?"bg-[#4681E8]/10 text-[#4681E8] border-[#4681E8]/40 shadow-[0_0_15px_rgba(70,129,232,0.1)]":"bg-white text-slate-500 border-slate-200 hover:text-slate-700 hover:border-[#4681E8]/30"}`,children:[(0,a.jsx)("span",{className:"text-[14px]",children:s.icon}),(0,a.jsx)("span",{className:"tracking-wider uppercase",children:s.label})]},s.id)})}),(0,a.jsx)("div",{className:"flex items-center gap-1 overflow-x-auto pb-1 scrollbar-hide bg-white rounded-xl p-1.5 border border-slate-200",children:[{id:"all",label:"TẤT CẢ",keyCount:"all"},{id:"live",label:"TRỰC TIẾP",keyCount:"live"},{id:"hot",label:"HOT",keyCount:"hot"},{id:"today",label:"H\xd4M NAY",keyCount:"today"},{id:"tomorrow",label:"NG\xc0Y MAI",keyCount:"tomorrow"}].map(e=>{let t=s===e.id,r=n[e.keyCount]||0;return(0,a.jsxs)("button",{type:"button",onClick:()=>l(e.id),className:`relative px-4 py-2 font-bold text-[12px] whitespace-nowrap transition-all duration-200 uppercase tracking-wider flex items-center gap-2 rounded-lg cursor-pointer ${t?"bg-[#4681E8]/10 text-[#4681E8] shadow-inner":"text-slate-500 hover:text-slate-700 hover:bg-[#4681E8]/5"}`,children:["live"===e.id&&t&&(0,a.jsx)("span",{className:"w-1.5 h-1.5 rounded-full bg-[#4681E8] animate-pulse shadow-[0_0_6px_rgba(70,129,232,0.8)]"}),(0,a.jsx)("span",{children:e.label}),(0,a.jsx)("span",{className:`px-1.5 py-0.5 rounded text-[10px] font-black ${t?"bg-[#4681E8]/20 text-[#4681E8]":"text-slate-400"}`,children:r})]},e.id)})})]})}function n(){return"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='10' fill='%2364748B' fill-opacity='0.18'/%3E%3C/svg%3E"}function i({match:e,isLoading:t=!1}){if(t||!e)return(0,a.jsx)("div",{className:"animate-pulse bg-white h-[64px] w-full border-b border-slate-100"});let s=new Date(1e3*parseInt(e.time||0,10)).toLocaleTimeString("vi-VN",{hour:"2-digit",minute:"2-digit",timeZone:"Asia/Ho_Chi_Minh"}),l=function(e,t){if("1"===t||"2"===t)switch(e){case"1":default:return{text:"Sắp diễn",isLive:!1,showScore:!1};case"2":return{text:"H1",isLive:!0,showScore:!0};case"3":return{text:"HT",isLive:!0,showScore:!0};case"4":return{text:"H2",isLive:!0,showScore:!0};case"5":return{text:"Phụ",isLive:!0,showScore:!0};case"7":return{text:"Pen",isLive:!0,showScore:!0};case"8":case"9":return{text:"FT",isLive:!1,showScore:!0}}switch(e){case"0":case"1":return{text:"Sắp diễn",isLive:!1,showScore:!1};case"51":return{text:"S1",isLive:!0,showScore:!0};case"52":return{text:"S2",isLive:!0,showScore:!0};case"53":return{text:"S3",isLive:!0,showScore:!0};case"54":return{text:"S4",isLive:!0,showScore:!0};case"55":return{text:"S5",isLive:!0,showScore:!0};case"100":case"90":case"91":case"110":return{text:"FT",isLive:!1,showScore:!0};default:return{text:"LIVE",isLive:!0,showScore:!0}}}(String(e.status_id),String(e.sport_id)),r=e.time_text||e.source_card_meta?.time_text||"",o=l.isLive,c=e.home_score??"-",d=e.away_score??"-",x=e.home_logo||n(),h=e.away_logo||n();return(0,a.jsxs)("a",{href:`/match/${encodeURIComponent(e.post_name||e.
674id)}`,className:"flex items-center w-full group border-b border-slate-100 bg-white hover:bg-[#4681E8]/5 transition-colors min-h-[64px]",children:[(0,a.jsx)("div",{className:`w-[60px] flex flex-col items-center justify-center shrink-0 h-full border-r ${o?"border-[#4681E8]/30 bg-[#4681E8]/5":"border-slate-100"}`,children:o?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"text-[#4681E8] font-bold text-[11px] uppercase tracking-wider tabular-nums leading-none",children:r||l.text}),(0,a.jsx)("span",{className:"w-1.5 h-1.5 rounded-full bg-[#4681E8] animate-pulse mt-1"})]}):(0,a.jsx)("span",{className:"text-slate-500 font-medium text-[12px]",children:s})}),(0,a.jsxs)("div",{className:"flex-1 flex flex-col justify-center px-3 py-2 gap-1.5 min-w-0",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between w-full",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2.5 min-w-0 overflow-hidden",children:[(0,a.jsx)("img",{src:x,alt:e.home_name,className:"w-4 h-4 shrink-0 object-contain",onError:e=>e.currentTarget.src=n(),loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-[13px] font-semibold truncate text-slate-800",children:e.home_name})]}),l.showScore&&(0,a.jsx)("span",{className:`text-[15px] font-black tabular-nums shrink-0 ml-2 ${o?"text-[#4681E8]":"text-slate-700"}`,children:c})]}),(0,a.jsxs)("div",{className:"flex items-center justify-between w-full",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2.5 min-w-0 overflow-hidden",children:[(0,a.jsx)("img",{src:h,alt:e.away_name,className:"w-4 h-4 shrink-0 object-contain",onError:e=>e.currentTarget.src=n(),loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-[13px] font-semibold truncate text-slate-800",children:e.away_name})]}),l.showScore&&(0,a.jsx)("span",{className:`text-[15px] font-black tabular-nums shrink-0 ml-2 ${o?"text-[#4681E8]":"text-slate-700"}`,children:d})]})]}),(0,a.jsx)("div",{className:"w-[48px] h-full flex items-center justify-center shrink-0 text-slate-300 group-hover:text-[#4681E8] transition-colors border-l border-slate-100",children:(0,a.jsx)("svg",{className:"w-5 h-5 fill-current",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{d:"M8 5v14l11-7z"})})})]})}let o=new Set(["1","2","3","4","5","7"]),c=new Set(["8","9","15"]),d=new Set(["51","52","53","54","55","56","57","58","59"]),x=new Set(["100","90","91","92","93","110"]);function h(e){let t=String(e.status_id);return 2>=parseInt(e.sport_id)?o.has(t):d.has(t)}function m({matches:e,matchIndex:t}){let[s,n]=(0,l.useState)("1"),[o,d]=(0,l.useState)("all"),[p,u]=(0,l.useState)(1);(0,l.useEffect)(()=>{u(1)},[s,o]);let{todayStart:g,tomorrowStart:b,dayAfterStart:f}=(0,l.useMemo)(()=>{let e,t,s,{vnTodayStartUTC:a,vnTomorrowStartUTC:l,vnDayAfterStartUTC:r}=(s=(t=Math.floor(Date.UTC((e=new Date(Date.now()+252e5)).getUTCFullYear(),e.getUTCMonth(),e.getUTCDate())/1e3)-25200)+86400,{vnTodayStartUTC:t,vnTomorrowStartUTC:s,vnDayAfterStartUTC:s+86400});return{todayStart:a,tomorrowStart:l,dayAfterStart:r}},[]),j=(0,l.useMemo)(()=>new Map(e.map(e=>[e?.match_key?String(e.match_key):e?.ls_id?String(e.ls_id):e?.id?`${String(e.sport_id||"0")}:${String(e.id)}`:e?.scheduleId?`${String(e.sport_id||"0")}:schedule:${String(e.scheduleId)}`:[String(e?.sport_id||"0"),String(e?.time||"0"),String(e?.home_name||""),String(e?.away_name||"")].join(":"),e])),[e]),w=t?.summary_by_sport?.[s],v=t?.bucket_keys_by_sport?.[s],N=t?.bucket_pages_by_sport?.[s],y=e.filter(e=>{let t;return String(e.sport_id)===s&&(t=String(e.status_id),2>=parseInt(e.sport_id)?!c.has(t):!x.has(t))}),_=y.filter(e=>{let t=parseInt(e.time);return t>=g&&t<b}),k=y.filter(e=>{let t=parseInt(e.time);return t>=b&&t<f}),E={all:y.length,live:y.filter(e=>h(e)).length,hot:y.filter(e=>"1"===String(e.hot)).length,today:_.length,tomorrow:k.length},C=(0,l.useMemo)(()=>{if(v){if("all"===o&&Array.isArray(N?.all)&&N.all.length>0)return N.all.slice(0,p).flat().map(e=>j.get(e)).filter(Boolean);let e=v[o];if(Array.isArray(e))return e.map(e=>j.get(e)).filter(Boolean)}return"all"===o?y:"live"===o?y.filter(e=>h(e)):"hot"===o?y.filter(e=>"1"===String(e.hot)):"today"===o?_:"tomorrow"===o?k:y},[o,y,j,N,v,_,k,p]),S="all"===o&&Array.isArray(N?.all)&&p<N.all.length,L=(0,l.useMemo)(()=>"all"!==o&&"live"!==o&&"hot"!==o?[]:C.filter(e=>
674"1"===String(e.hot)||h(e)).slice(0,4),[C,o]),$=(0,l.useMemo)(()=>{let e=new Map;return C.forEach(t=>{let s=t.source_card_meta?.league_label||t.match_data?.competition_vi||t.match_data?.competition_name||t.match_data?.competition_full||"Giải đấu kh\xe1c";e.has(s)||e.set(s,[]),e.get(s).push(t)}),Array.from(e.entries())},[C]);return(0,a.jsxs)("div",{className:"w-full min-h-[500px]",children:[(0,a.jsx)(r,{activeSport:s,onSportChange:n,activeStatus:o,onStatusChange:d,matchesCount:w||E}),0===C.length?(0,a.jsx)("div",{className:"py-20 text-center",children:(0,a.jsx)("div",{className:"text-slate-400 text-base font-medium",children:"Kh\xf4ng c\xf3 trận đấu n\xe0o."})}):(0,a.jsxs)("div",{className:"flex flex-col gap-6",children:[L.length>0&&"all"===o&&(0,a.jsxs)("div",{className:"mb-4",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 mb-3 px-1",children:[(0,a.jsx)("span",{className:"w-2 h-4 rounded-full bg-[#4681E8]"}),(0,a.jsx)("h2",{className:"text-slate-800 font-black text-sm uppercase tracking-wider",children:"Trận đấu t\xe2m điểm"})]}),(0,a.jsx)("div",{className:"grid grid-cols-1 xl:grid-cols-2 gap-2",children:L.map((e,t)=>(0,a.jsx)(i,{match:e},`featured-${e.ls_id||e.id}-${t}`))})]}),(0,a.jsx)("div",{className:"flex flex-col gap-5",children:$.map(([e,t])=>{let s=t[0]?.match_data?.competition_logo;return(0,a.jsxs)("div",{className:"rounded-xl overflow-hidden border border-slate-200 bg-white shadow-sm",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2.5 bg-[#0E1B33] px-4 py-2.5 border-b border-[#0E1B33]",children:[s&&(0,a.jsx)("img",{src:s,alt:"league",className:"w-4 h-4 object-contain brightness-200 opacity-80",loading:"lazy",decoding:"async"}),(0,a.jsx)("h3",{className:"text-white text-[12px] font-bold uppercase tracking-wider truncate",children:e})]}),(0,a.jsx)("div",{className:"flex flex-col",children:t.map((e,t)=>(0,a.jsx)(i,{match:e},e.ls_id||`${e.id}-${t}`))})]},e)})}),S&&(0,a.jsx)("div",{className:"flex justify-center mt-6",children:(0,a.jsx)("button",{type:"button",onClick:()=>u(e=>e+1),className:"inline-flex items-center justify-center rounded-xl border border-[#4681E8]/30 bg-white px-8 py-3 text-[12px] font-bold uppercase tracking-wider text-[#4681E8] transition-all duration-200 hover:bg-[#4681E8] hover:text-white hover:border-[#4681E8]",children:"Tải th\xeam"})})]})]})}},75627:(e,t,s)=>{"use strict";s.d(t,{R:()=>r});var a=s(68019),l=s(70508);function r({eyebrow:e,title:t,titleAddon:s,rightSlot:n,className:i}){return(0,a.jsx)("div",{className:(0,l.cn)("relative mb-5 overflow-hidden border-b border-slate-200",i),children:(0,a.jsxs)("div",{className:"flex items-center justify-between px-1 py-4 min-h-[56px]",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 min-w-0",children:[(0,a.jsx)("span",{className:"h-8 w-1 shrink-0 rounded-sm bg-gradient-to-b from-[#4681E8] to-[#55CAF1] shadow-[0_0_10px_rgba(70,129,232,0.5)]"}),(0,a.jsxs)("div",{className:"min-w-0",children:[e&&(0,a.jsx)("div",{className:"text-[10px] font-bold uppercase tracking-[0.2em] text-[#4681E8]/60 mb-0.5",children:e}),(0,a.jsxs)("div",{className:"flex items-center gap-2.5 flex-wrap",children:[(0,a.jsx)("h1",{className:"text-[18px] sm:text-[22px] font-black uppercase tracking-tight text-slate-800 leading-none",children:t}),s]})]})]}),n&&(0,a.jsx)("div",{className:"hidden sm:flex items-center gap-2 text-right shrink-0 ml-4",children:n})]})})}},75688:()=>{},75713:(e,t,s)=>{"use strict";s.d(t,{Klivevip15MatchDetailPage:()=>m});var a=s(68019),l=s(10707),r=s(58420);function n({src:e,poster:t,autoPlay:s=!0,onError:i,className:o=""}){let c=(0,l.useRef)(null),d=(0,l.useRef)(i);d.current=i;let[x,h]=(0,l.useState)(!1),[m,p]=(0,l.useState)(!1);return((0,l.useEffect)(()=>{let t=c.current;if(!t)return;let a=null;h(!1);let l=()=>p(!0),n=()=>p(!1);t.addEventListener("play",l),t.addEventListener("pause",n);let i=()=>{s&&(t.muted=!0,t.play().catch(()=>{}))};if(t.addEventListener("canplay",i),r.Ay.isSupported()){(a=new r.Ay({maxBufferLength:30,maxMaxBufferLength:60,lowLatencyMode:!0,enableWorker:!0})).loadSource(e),a.attachMedia(t),a.on(r.Ay.Events.MANIFEST_PARSED,()=>{s&&(t.muted=!0,t.play().catch(e=>{console.warn("AutoPlay failed:",e),t.muted=!1}))});let l=0,n=0;a.on(r.Ay.Events.ERROR,(e,t)=>
674{if(t.type===r.Ay.ErrorTypes.NETWORK_ERROR&&(++l>2||t.response&&t.response.code>=400)){console.error("HLS Network Error threshold reached (CORS/404), triggering fallback.",t),h(!0),d.current&&d.current(t),a?.destroy();return}if(t.fatal)switch(t.type){case r.Ay.ErrorTypes.NETWORK_ERROR:console.error("HLS Fatal Network Error, recovering...",t),a?.startLoad();break;case r.Ay.ErrorTypes.MEDIA_ERROR:console.error("HLS Media Error, recovering...",t),++n>3?(console.error("HLS Media Error threshold reached, triggering fallback."),h(!0),d.current&&d.current(t),a?.destroy()):a?.recoverMediaError();break;default:console.error("HLS Fatal Error:",t),h(!0),d.current&&d.current(t),a?.destroy()}})}else t.canPlayType("application/vnd.apple.mpegurl")&&(t.src=e,t.addEventListener("loadedmetadata",()=>{s&&t.play().catch(e=>{console.warn("AutoPlay failed:",e)})}),t.addEventListener("error",e=>{h(!0),d.current&&d.current(e)}));return()=>{t.removeEventListener("play",l),t.removeEventListener("pause",n),t.removeEventListener("canplay",i),a&&a.destroy()}},[e,s]),x)?i?null:(0,a.jsxs)("div",{className:`w-full h-full flex flex-col items-center justify-center bg-white/80 backdrop-blur ${o}`,children:[(0,a.jsx)("svg",{className:"w-12 h-12 text-red-500 mb-4 opacity-80",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"})}),(0,a.jsx)("div",{className:"text-slate-600 text-sm font-medium",children:"Video/Stream kh\xf4ng khả dụng hoặc bị lỗi mạng"}),(0,a.jsx)("div",{className:"text-gray-500 text-xs mt-1",children:"Vui l\xf2ng thử lại sau hoặc chọn nguồn kh\xe1c"})]}):(0,a.jsx)("div",{className:`relative group w-full h-full bg-white flex items-center justify-center overflow-hidden ${o}`,children:(0,a.jsx)("video",{ref:c,className:"w-full h-full object-contain",controls:!0,playsInline:!0,muted:s,poster:t,referrerPolicy:"no-referrer"})})}function i(e){let t=(e||"").split(/[\s-]+/).slice(0,2).map(e=>e[0]||"").join("").toUpperCase()||"??";return`data:image/svg+xml,${encodeURIComponent(`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 80 80"><rect width="80" height="80" rx="20" fill="#1a1c25"/><text x="40" y="47" font-size="20" font-family="Arial" font-weight="700" text-anchor="middle" fill="#666">${t}</text></svg>`)}`}function o({homeName:e,awayName:t,homeLogo:s,awayLogo:l,homeScore:r="0",awayScore:n="0",statusText:c="LIVE",timeText:d="",isLive:x=!0,sportId:h="1",matchId:m}){let p=s||i(e),u=l||i(t),g="5"===String(h),b="2"===String(h),f="bg-slate-200 border-slate-200",j="repeating-linear-gradient(90deg, transparent, transparent 10%, #000 10%, #000 20%)";return g?(f="bg-slate-100 border-slate-200",j="none"):b&&(f="bg-[#bc7a46] border-[#8a4e21]",j="repeating-linear-gradient(90deg, transparent, transparent 5%, #000 5%, #000 10%)"),(0,a.jsxs)("div",{className:"relative w-full aspect-video min-h-[300px] max-h-[600px] bg-slate-50 overflow-hidden flex flex-col justify-center",children:[(0,a.jsx)("div",{className:"absolute inset-0 flex items-center justify-center pointer-events-none mt-16 md:mt-24",children:(0,a.jsx)("div",{className:"relative w-[120%] h-[120%] sm:w-[90%] sm:h-[120%] max-w-[900px] flex-shrink-0 transition-transform duration-1000",style:{transform:"perspective(900px) rotateX(60deg) scale(0.9)",transformOrigin:"center center"},children:(0,a.jsxs)("div",{className:`absolute inset-0 ${f} shadow-[0_30px_60px_rgba(0,0,0,0.8)] border-4 rounded-xl overflow-hidden flex transition-colors duration-500`,children:[(0,a.jsx)("div",{className:"absolute inset-0 opacity-15 pointer-events-none",style:{backgroundImage:j}}),(0,a.jsxs)("div",{className:"absolute inset-[4%] pointer-events-none shadow-sm flex items-center justify-center",children:["1"===String(h)&&(0,a.jsxs)("div",{className:"absolute inset-0 w-full h-full border-2 border-white/60",children:[(0,a.jsx)("div",{className:"absolute left-1/2 top-0 bottom-0 w-0 border-l-2 border-white/60 -translate-x-1/2"}),(0,a.jsx)("div",{className:"absolute left-1/2 top-1/2 w-[18%] aspect-square rounded-full border-2 border-white/60 -translate-x-1/2 -translate-y-1/2"}),(0,a.jsx)("div",{className:"absolute left-1/2 top-1/2 w-2 h-2 rounded-full bg-white/80 -translate-x-1/2 -translate-y-1/2"}),(0,a.jsx)("div",{className:"absolute left-0 top-1/2 w-[16%] h-[46%] border-2 border-l-0 border-white/60 -translate-y-1/2 bg-slate-200"}),(0,a.jsx)("div",{className:"absolute left-0 top-1/2 w-[6%] h-[20%] border-2 border-l-0 border-white/60 -translate-y-1/2 bg-slate-200"}),(0,a.jsx)("div",{className:"absolute left-[16%] top-1/2 w-[8%] aspect-square border-2 border-l-0 border-white/60 rounded-r-full -translate-y-1/2 clip-path-half",style:{clipPath:"inset(0 0 0 50%)"}}),(0,a.jsx)("div",{className:"absolute right-0 top-1/2 w-[16%] h-[46%] border-2 border-r-0 border-white/60 -translate-y-1/2 bg-slate-200"}),(0,a.jsx)("div",{className:"absolute right-0 top-1/2 w-[6%] h-[20%] border-2 border-r-0 border-white/60 -translate-y-1/2 bg-slate-200"}),(0,a.jsx)("div",{className:"absolute right-[16%] top-1/2 w-[8%] aspect-square border-2 border-r-0 border-white/60 rounded-l-full -translate-y-1/2 clip-path-half",style:{clipPath:"inset(0 50% 0 0)"}})]}),g&&(0,a.jsxs)("div",{className:"absolute inset-[10%] w-[80%] h-[80%
674] border-2 border-white/80 bg-white",children:[(0,a.jsx)("div",{className:"absolute top-[10%] bottom-[10%] left-0 right-0 border-y-2 border-white/80"}),(0,a.jsx)("div",{className:"absolute left-1/2 top-[-2%] bottom-[-2%] w-1 bg-white/40 shadow-xl -translate-x-1/2 z-10"}),(0,a.jsx)("div",{className:"absolute left-[25%] right-[25%] top-[10%] bottom-[10%] border-x-2 border-white/80"}),(0,a.jsx)("div",{className:"absolute left-[25%] right-[25%] top-1/2 w-[50%] border-t-2 border-white/80 -translate-y-1/2"}),(0,a.jsx)("div",{className:"absolute left-0 top-1/2 w-[2%] border-t-2 border-white/80 -translate-y-1/2"}),(0,a.jsx)("div",{className:"absolute right-0 top-1/2 w-[2%] border-t-2 border-white/80 -translate-y-1/2"})]}),b&&(0,a.jsxs)("div",{className:"absolute inset-0 w-full h-full border-2 border-white/50",children:[(0,a.jsx)("div",{className:"absolute left-1/2 top-0 bottom-0 w-0 border-l-2 border-white/50 -translate-x-1/2"}),(0,a.jsx)("div",{className:"absolute left-1/2 top-1/2 w-[15%] aspect-square rounded-full border-2 border-white/50 -translate-x-1/2 -translate-y-1/2"}),(0,a.jsx)("div",{className:"absolute left-0 top-1/2 w-[18%] h-[35%] border-2 border-l-0 border-white/50 -translate-y-1/2 bg-[#bc7a46]"}),(0,a.jsx)("div",{className:"absolute left-[18%] top-1/2 w-[10%] aspect-square rounded-full border-2 border-white/50 -translate-y-1/2"}),(0,a.jsx)("div",{className:"absolute left-0 top-1/2 w-[30%] h-[70%] border-2 border-l-0 border-white/50 rounded-r-full -translate-y-1/2 opacity-60"}),(0,a.jsx)("div",{className:"absolute right-0 top-1/2 w-[18%] h-[35%] border-2 border-r-0 border-white/50 -translate-y-1/2 bg-[#bc7a46]"}),(0,a.jsx)("div",{className:"absolute right-0 top-1/2 w-[30%] h-[70%] border-2 border-r-0 border-white/50 rounded-l-full -translate-y-1/2 opacity-60"})]})]}),x&&(0,a.jsx)("div",{className:`absolute left-1/2 top-1/2 shadow-[0_8px_16px_rgba(0,0,0,0.8)] z-10 transition-all duration-[3000ms] border-2 border-white/20 rounded-full
675                                ${g?"w-2 h-2 sm:w-3 sm:h-3 bg-[#ccff00]":b?"w-4 h-4 sm:w-6 sm:h-6 bg-[#d95d16]":"w-4 h-4 sm:w-5 sm:h-5 bg-white"}`,style:{animation:"ballMove 8s infinite alternate ease-in-out",transform:"translate(-50%, -50%)"},children:(0,a.jsx)("div",{className:"absolute -bottom-4 left-1/2 w-4 h-2 bg-white/40 rounded-full blur-sm -translate-x-1/2"})}),x&&(0,a.jsxs)("div",{className:"absolute left-[65%] top-[60%] flex flex-col items-center animate-bounce-slow",style:{animation:"floatBubble 4s infinite alternate ease-in-out"},children:[(0,a.jsxs)("div",{className:"bg-white/95 backdrop-blur border border-white/10 rounded-2xl p-2 shadow-2xl flex items-center gap-3 w-max max-w-[200px]",children:[(0,a.jsx)("div",{className:"w-6 h-6 rounded-full flex items-center justify-center p-0.5 bg-white/5 shrink-0",children:(0,a.jsx)("img",{src:p,alt:e||"Home team",className:"max-w-full max-h-full object-contain",onError:t=>t.target.src=i(e),loading:"lazy",decoding:"async"})}),(0,a.jsx)("div",{className:"flex flex-col pr-1 overflow-hidden",children:(0,a.jsx)("span",{className:"text-slate-900 font-bold text-[10px] sm:text-xs tracking-wide truncate",children:g?"Serve / Return":"Tấn c\xf4ng nguy hiểm"})})]}),(0,a.jsx)("div",{className:"w-0 h-0 border-l-[6px] border-r-[6px] border-t-[6px] border-l-transparent border-r-transparent border-t-[#1a1c28]/95 mt-[-1px]"})]})]})})}),(0,a.jsx)("div",{className:"relative z-20 flex-1 flex flex-col items-center justify-start p-4 md:p-6 pointer-events-none w-full",children:(0,a.jsxs)("div",{className:"w-full max-w-[800px] flex items-center justify-between px-4 sm:px-6 py-3 rounded-xl bg-gradient-to-r from-[#0d0f14]/90 via-[#151821]/95 to-[#0d0f14]/90 backdrop-blur-xl border border-white/10 shadow-[0_10px_40px_rgba(0,0,0,0.8)] pointer-events-auto",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 flex-1 min-w-0 pr-2",children:[(0,a.jsx)("img",{src:p,alt:e,className:"w-8 h-8 md:w-12 md:h-12 object-contain drop-shadow-lg shrink-0",onError:t=>t.target.src=i(e),loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-slate-900 text-xs sm:text-sm md:text-base font-bold truncate tracking-wide",children:e})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1 shrink-0 px-2 sm:px-6 min-w-[100px]",children:[(0,a.jsxs)("span",{className:`inline-flex items-center gap-1.5 px-2.5 py-0.5 rounded-full text-[10px] sm:text-xs font-bold shadow-inner ${x?"bg-green-500/10 text-green-400 border border-green-500/20":"bg-white/5 text-slate-900/40"}`,children:[x&&(0,a.jsx)("span",{className:"w-1.5 h-1.5 rounded-full bg-green-500 animate-pulse shadow-[0_0_8px_#22c55e]"}),d||c]}),(0,a.jsxs)("div",{className:"flex gap-3 sm:gap-5 items-center justify-center",children:[(0,a.jsx)("span",{className:"text-slate-900 text-2xl sm:text-4xl font-black drop-shadow-md",children:r}),(0,a.jsx)("span",{className:"text-slate-900/30 text-xl font-light",children:"-"}),(0,a.jsx)("span",{className:"text-slate-900 text-2xl sm:text-4xl font-black drop-shadow-md",children:n})]})]}),(0,a.jsxs)("div",{className:"flex items-center justify-end gap-3 flex-1 min-w-0 pl-2 text-right",children:[(0,a.jsx)("span",{className:"text-slate-900 text-xs sm:text-sm md:text-base font-bold truncate tracking-wide",children:t}),(0,a.jsx)("img",{src:u,alt:t,className:"w-8 h-8 md:w-12 md:h-12 object-contain drop-shadow-lg shrink-0",onError:e=>e.target.src=i(t),loading:"lazy",decoding:"async"})]})]})}),(0,a.jsx)("div",{className:"relative z-20 mt-auto w-full p-4 flex justify-center pointer-events-none",children:(0,a.jsx)("div",{className:"w-full max-w-[600px] h-6 bg-white/40 backdrop-blur-md rounded-full border border-white/5 flex items-center px-4",children:(0,a.jsxs)("div",{className:"flex-1 h-0.5 bg-white/10 relative rounded-full",children:[x&&(0,a.jsx)("div",{className:"absolute left-0 top-0 bottom-0 bg-gradient-to-r from-[#b38b22] to-[#ffda6a] w-[65%] rounded-full opacity-90 shadow-[0_0_12px_#daa520]"}),(0,a.jsx)("span",{className:"absolute left-[65%] top-1/2 -translate-y-1/2 -translate-x-1/2 w-1.5 h-1.5 rounded-full bg-white shadow-md"})]})})}),(0,a.jsx)("style",{children:`
676                @keyframes ballMove {
677                    0% { transform: translate(-30%, -20%) scale(1); }
678                    25% { transform: translate(40%, -10%) scale(1.1); }
679                    50% { transform: translate(20%, 30%) scale(0.9); }
680                    75% { transform: translate(-10%, 15%) scale(1.2); }
681                    100% { transform: translate(-45%, 0%) scale(1); }
682                }
683                @keyframes floatBubble {
684                    0% { transform: translateY(0px) translateX(0px); }
685                    50% { transform: translateY(-8px) translateX(4px); }
686                    100% { transform: translateY(4px) translateX(-4px); }
687                }
688            `})]})}function c(e,t){if("1"===t||"2"===t)switch(e){case"2":return{t:"HT 1",live:!0,sc:!0};case"3":return{t:"Giữa giờ",live:!0,sc:!0};case"4":return{t:"HT 2",live:!0,sc:!0};case"5":return{t:"Hiệp phụ",live:!0,sc:!0};case"7":return{t:"Penalty",live:!0,sc:!0};case"8":case"9":return{t:"Kết th\xfac",live:!1,sc:!0};default:return{t:"Chưa bắt đầu",live:!1,sc:!1}}
688return["51","52","53","54","55"].includes(e)?{t:`Set ${e-50}`,live:!0,sc:!0}:["100","90","110"].includes(e)?{t:"KT",live:!1,sc:!0}:"0"===e||"1"===e?{t:"Chưa bắt đầu",live:!1,sc:!1}:{t:"LIVE",live:!0,sc:!0}}function d(e){let t=(e||"").split(/[\s-]+/).slice(0,2).map(e=>e[0]||"").join("").toUpperCase()||"??";return`data:image/svg+xml,${encodeURIComponent(`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 80 80"><rect width="80" height="80" rx="20" fill="#1a1c25"/><text x="40" y="47" font-size="20" font-family="Arial" font-weight="700" text-anchor="middle" fill="#666">${t}</text></svg>`)}`}function x(e){let t=new Date(1e3*parseInt(e||"0",10));return{hm:t.toLocaleTimeString("vi-VN",{hour:"2-digit",minute:"2-digit",timeZone:"Asia/Ho_Chi_Minh"}),dm:t.toLocaleDateString("vi-VN",{day:"2-digit",month:"2-digit",timeZone:"Asia/Ho_Chi_Minh"}),full:t.toLocaleDateString("vi-VN",{day:"2-digit",month:"2-digit",year:"numeric",timeZone:"Asia/Ho_Chi_Minh"})}}let h="max-w-[1200px]";function m({matchData:e,relatedMatches:t,matchDetails:s,standings:r,brandingNameUpper:i}){let p,u,g,j,v,y,[C,S]=(0,l.useState)("odds"),L=e?.match_data?.anchors||[],[$,F]=(0,l.useState)(!1),[T,A]=(0,l.useState)(!1),[M,H]=(0,l.useState)(null),[D,B]=(0,l.useState)(!1),z=(0,l.useRef)(0);(0,l.useEffect)(()=>{if(!e?.has_live||"1"!==e.has_live||0===L.length)return;let t=!1;B(!0);let s=async t=>{let s=t?.uid,a=`/api/socolive/proxy-stream?url=${encodeURIComponent(`https://live.inplyr.com/${s?`room/${s}`:`default/${e.id}`}.m3u8`)}`;try{let e=await fetch(a,{method:"GET",cache:"no-store"});if(!e.ok)return null;let s=(await e.text()).split("\n").filter(e=>e.trim()&&!e.startsWith("#"));if(0===s.length)return null;return(await fetch(s[0],{method:"HEAD",cache:"no-store"})).ok?t:null}catch{return null}};return Promise.all(L.map(e=>s(e))).then(e=>{if(t)return;let s=e.find(e=>null!==e);s?(H(s),F(!0),A(!1)):(H(L[0]),A(!0)),B(!1)}),()=>{t=!0}},[e?.has_live,L.length]),(0,l.useEffect)(()=>{if(!T||D||z.current>=20)return;let t=setTimeout(()=>{z.current++,A(!1),B(!0);let t=async t=>{let s=t?.uid,a=`/api/socolive/proxy-stream?url=${encodeURIComponent(`https://live.inplyr.com/${s?`room/${s}`:`default/${e.id}`}.m3u8`)}`;try{let e=await fetch(a,{method:"GET",cache:"no-store"});if(!e.ok)return null;let s=(await e.text()).split("\n").filter(e=>e.trim()&&!e.startsWith("#"));if(0===s.length)return null;return(await fetch(s[0],{method:"HEAD",cache:"no-store"})).ok?t:null}catch{return null}};Promise.all(L.map(e=>t(e))).then(e=>{let t=e.find(e=>null!==e);t?(H(t),F(!0),A(!1)):A(!0),B(!1)})},15e3);return()=>clearTimeout(t)},[T,D]);let[I,R]=(0,l.useState)(null),U=e?.post_name||e?.ls_id||e?.id;if(window.location.origin,(0,l.useEffect)(()=>{if(!U)return;let e=setInterval(async()=>{try{let e=await fetch(`/api/klivevip/match/${U}`,{cache:"no-store"});if(e.ok){let t=await e.json();R(t?.match??null)}}catch{}},1e4);return()=>clearInterval(e)},[U]),!e)return(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center py-32 gap-4",children:[(0,a.jsx)("span",{className:"text-[#64748B] text-lg",children:"Kh\xf4ng t\xecm thấy trận đấu"}),(0,a.jsx)("a",{href:"/",className:"text-[#4681E8] hover:underline text-sm",children:"← Quay lại"})]});let G=I?{...e,...I}:e,P=G?.has_live==="1"&&L.length>0,K=c(G.status_id,G.sport_id),V=$&&M&&!T&&!D,W=P&&(D||T&&K.live&&z.current<20),O=!P||T&&!W&&!D,q=!K.live&&"8"!==String(G.status_id)&&"9"!==String(G.status_id),{hm:X,full:Y}=x(G.time),Z=G.source_card_meta?.league_label||G.match_data?.competition_vi||G.match_data?.competition_full||"",Q=G.match_data?.stage_label||G.source_card_meta?.stage_label||"",J=G.home_logo||d(G.home_name),ee=G.away_logo||d(G.away_name),et=e=>t=>{t.target.src=d(e)};return(0,a.jsxs)("div",{className:"w-full bg-white min-h-screen text-slate-600 font-sans pb-16",children:[(0,a.jsx)("div",{className:"w-full border-b border-slate-200 bg-white",children:(0,a.jsxs)("div",{className:`${h} mx-auto px-4 py-3 flex items-center justify-between`,children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 text-[13px] font-bold",children:[(0,a.jsx)("span",{className:"text-[#4681E8] uppercase tracking-wide",children:Z}),Q&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"text-slate-300",children:"•"}),(0,a.jsx)("span",{className:"text-slate-600",children:Q})]})]}),(0,a.jsx)("div",{className:"text-[12px] font-mono text-slate-400 hidden sm:block",children:Y})]})}),(0,a.jsxs)("div",{className:`${h} mx-auto px-0 md:px-4 py-0 md:py-6 flex flex-col lg:flex-row gap-4 lg:gap-6`,children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0 flex flex-col gap-4 lg:gap-6",children:[(0,a.jsxs)("div",{className:"w-full relative bg-[#000000] rounded-none md:rounded-2xl overflow-hidden shadow-[0_10px_40px_rgba(0,0,0,0.5)] border-y md:border border-slate-200",children:[(0,a.jsx)("div",{className:"relative w-full aspect-video bg-[#000000] group z-10",children:V?(0,a.jsx)(n,{src:`/api/klivevip/proxy-stream?url=${encodeURIComponent(`https://live.inplyr.com/${M?.uid&&"default"!==M.uid?`room/${M.uid}`:`default/${G.id}`}.m3u8`)}`,autoPlay:!0,onError:()=>A(!0)}):O?(0,a.jsx)(o,{homeName:G.home_name,awayName:G.away_name,homeLogo:G.home_logo,awayLogo:G.away_logo,homeScore:K.sc?G.home_score:"0",awayScore:K.sc?G.away_score:"0",statusText:K.t,timeText:G.time_text||X,isLive:K.live,sportId:G.sport_id,matchId:G.ls_id||G.id,kickoffMs:1e3*Number(G?.time||0),isPreMatch:q}):(0,a.jsxs)("div",{className:"absolute inset-0 z-10 flex flex-col items-center justify-center p-4 lg:p-10",children:[(0,a.jsxs)("div",{className:"absolute inset-0 flex justify-between items-center opacity-[0.03] pointer-events-none px-4 lg:px-20 overflow-hidden",children:[(0,a.jsx)("img",{src:J,alt:"",className:"w-1/2 max-w-[400px] blur-[10px]",loading:"lazy",decoding:"async"}),(0,a.jsx)("img",{src:ee,alt:"",className:"w-1/2 max-w-[400px] blur-[10px]",loading:"lazy",decoding:"async"})]}),P&&!T&&(0,a.jsx)("button",{onClick:()=>F(!0),className:"group mb-4 sm:mb-8 w-16 h-16 md:w-20 md:h-20 rounded-full bg-[#4681E8] flex items-center justify-center hover:bg-[#55CAF1] transition-all shadow-[0_0_30px_rgba(70,129,232,0.5)] curs
688or-pointer z-20",children:(0,a.jsx)("svg",{className:"w-8 h-8 md:w-10 md:h-10 text-white ml-1.5 md:ml-2 group-hover:scale-110 transition-transform",viewBox:"0 0 24 24",fill:"currentColor",children:(0,a.jsx)("path",{d:"M8 5v14l11-7z"})})}),(0,a.jsxs)("div",{className:"grid grid-cols-[1fr_auto_1fr] items-center w-full max-w-[800px] gap-2 lg:gap-8 z-20",children:[(0,a.jsxs)("div",{className:"flex flex-col items-center gap-2 lg:gap-4",children:[(0,a.jsx)("img",{src:J,alt:G.home_name,className:"w-16 h-16 sm:w-24 sm:h-24 lg:w-32 lg:h-32 object-contain drop-shadow-[0_10px_20px_rgba(0,0,0,0.8)]",onError:et(G.home_name),loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-[#FFFFFF] text-xs sm:text-base lg:text-lg font-black text-center line-clamp-2 uppercase tracking-wide",children:G.home_name})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-2 lg:gap-3",children:[K.sc?(0,a.jsxs)("div",{className:"flex items-center gap-3 lg:gap-6 bg-white/90 backdrop-blur-md px-4 py-2 lg:px-8 lg:py-4 rounded-2xl border border-slate-200 shadow-2xl",children:[(0,a.jsx)("span",{className:"text-[#4681E8] text-[32px] sm:text-[48px] lg:text-[64px] font-black leading-none",children:G.home_score}),(0,a.jsx)("span",{className:"text-slate-300 text-[20px] lg:text-[28px] font-light",children:":"}),(0,a.jsx)("span",{className:"text-[#4681E8] text-[32px] sm:text-[48px] lg:text-[64px] font-black leading-none",children:G.away_score})]}):(0,a.jsx)("div",{className:"text-[#FFFFFF] text-[32px] sm:text-[48px] lg:text-[56px] font-black tracking-widest leading-none drop-shadow-xl",children:X}),(0,a.jsxs)("span",{className:`inline-flex items-center gap-2 rounded-full px-3 py-1 lg:px-5 lg:py-1.5 text-[10px] lg:text-[12px] font-bold tracking-widest uppercase ${K.live?"bg-[#4681E8] text-white shadow-[0_0_20px_rgba(70,129,232,0.6)]":"bg-white text-slate-600 border border-slate-200"}`,children:[K.live&&(0,a.jsx)("span",{className:"w-2 h-2 rounded-full bg-white animate-pulse"}),K.t,G.time_text?` : ${G.time_text}`:""]})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-2 lg:gap-4",children:[(0,a.jsx)("img",{src:ee,alt:G.away_name,className:"w-16 h-16 sm:w-24 sm:h-24 lg:w-32 lg:h-32 object-contain drop-shadow-[0_10px_20px_rgba(0,0,0,0.8)]",onError:et(G.away_name),loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-[#FFFFFF] text-xs sm:text-base lg:text-lg font-black text-center line-clamp-2 uppercase tracking-wide",children:G.away_name})]})]})]})}),L.length>0&&(0,a.jsxs)("div",{className:"w-full bg-white border-t border-slate-200 px-3 lg:px-6 py-2.5 lg:py-4 flex items-center gap-2 lg:gap-4 overflow-x-auto z-20",children:[(0,a.jsx)("span",{className:"text-[10px] lg:text-[11px] text-slate-600 uppercase font-bold tracking-widest shrink-0 mr-1 lg:mr-2",children:"CHỌN K\xcaNH TRUYỀN:"}),L.map((e,t)=>(0,a.jsxs)("button",{onClick:()=>{H(e),F(!0),A(!1)},className:`shrink-0 flex items-center gap-1.5 lg:gap-2 rounded-full px-3 py-1.5 lg:px-5 lg:py-2 text-[11px] lg:text-[13px] font-bold transition-all ${M?.uid===e.uid&&!T?"bg-[#4681E8]/10 border border-[#4681E8] text-[#4681E8] shadow-[0_0_15px_rgba(70,129,232,0.2)]":"bg-white border border-slate-200 text-slate-600 hover:text-[#4681E8] hover:border-[#4681E8]/50"}`,children:[(0,a.jsx)("span",{className:`w-1.5 h-1.5 lg:w-2 lg:h-2 rounded-full ${M?.uid===e.uid&&!T?"bg-[#4681E8] animate-pulse":"bg-transparent"}`}),"BLV ",e.nickName||`K\xeanh ${t+1}`]},e.uid||t))]})]}),(p=(()=>{let e=s?.stats;if(!e)return!1;let t=null;return Array.isArray(e)&&e.length>0?t=e[0]:e?.results?.[0]?t=e.results[0]:e?.stats_full_time&&(t=e),!!t&&!!(t.stats_full_time?.length>0||t.stats_haft_time?.length>0||t.stats_half_time?.length>0||t.stats?.length>0)})(),u=!!(s?.lineup&&(Array.isArray(s.lineup)?s.lineup.length>0:s.lineup.home||s.lineup.away)),g=!!(s?.events&&(Array.isArray(s.events)?s.events.length>0:s.events.incidents?.length>0||s.events.data?.length>0)),j=!!(r&&(Array.isArray(r)?r.length>0:r.data?.length>0)),(y=(v=[{id:"stats",label:"THỐNG K\xca",show:p},{id:"lineup",label:"ĐỘI H\xccNH",show:u},{id:"events",label:"DIỄN BIẾN",show:g},{id:"standings",label:"BẢNG XH",show:j},{id:"odds",label:"TỶ LỆ K\xc8O",show:!!(s?.odds&&Array.isArray(s.odds)&&s.odds.length>0)}].filter(e=>e.show)).find(e=>e.id===C)?C:v[0]?.id||"odds")!==C&&setTimeout(()=>S(y),0),v.length>0?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"bg-white rounded-2xl p-2 border border-slate-200 flex overflow-x-auto gap-2 shadow-[0_4px_15px_rgba(0,0,0,0.08)] mx-4 md:mx-0",children:v.map(({id:e,label:t})=>(0,a.jsx)("button",{onClick:()=>S(e),className:`flex-1 min-w-[100px] py-2.5 sm:py-3 text-[10px] sm:text-[12px] font-black uppercase tracking-widest rounded-xl transition-all ${y===e?"bg-[#4681E8]/10 text-[#4681E8] border border-[#4681E8]/30 shadow-inner":"text-slate-500 hover:text-[#4681E8] hover:bg-[#4681E8]/5 border border-transparent"}`,children:t},e))}),(0,a.jsxs)("div",{className:"bg-white rounded-2xl border border-slate-200 overflow-hidden shadow-[0_4px_15px_rgba(0,0,0,0.08)] min-h-[400px] mx-4 md:mx-0",children:["stats"===y&&(0,a.jsx)(b,{matchDetails:s}),"lineup"===y&&(0,a.jsx)(f,{matchDetails:s}),"events"===y&&(0,a.jsx)(_,{events:s?.events}),"standings"===y&&(0,a.jsx)(k,{standings:r}),"odds"===y&&(0,a.jsx)(E,{odds:s?.odds})]})]}):null),t.length>0&&(0,a.jsxs)("div",{className:"mt-4 mx-4 md:mx-0",children:[(0,a.jsxs)("h2",{className:"px-1 py-4 text-sm sm:text-base font-black text-slate-800 uppercase flex items-center gap-3 tracking-widest border-b border-slate-100 mb-4",children:[(0,a.jsx)("span",{className:"w-1 h-5 bg-[#4681E8] rounded-sm shadow-[0_0_8px_#4681E8]"}),"TRẬN ĐẤU C\xd9NG GIẢI"]}),(0,a.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3 sm:gap-4",children:t.slice(0,4).map(e=>(0,a.jsx)(w,{m:e},e.id))})]})]}),(0,a.jsx)("div",{className:"w-full lg:w-[350px] xl:w-[400px] shrink-0 px-4 md:px-0",children:(0,a.jsxs)("div",{className:"bg-white border border-slate-200 rounded-2xl overflow-hidden flex flex-col shadow-[0_10px_30px_rgba(0,0,0,0.1)] lg:sticky lg:top-8 h-[600px] lg:h-[c
688alc(100vh-100px)] lg:max-h-[850px]",children:[(0,a.jsxs)("div",{className:"px-5 py-4 border-b border-slate-200 flex items-center justify-between bg-white",children:[(0,a.jsxs)("h3",{className:"text-slate-800 text-sm font-black uppercase tracking-widest flex items-center gap-2",children:[(0,a.jsx)("span",{className:"w-2.5 h-2.5 rounded-full bg-[#4681E8] shadow-[0_0_10px_rgba(70,129,232,0.4)]"}),"PH\xd2NG CHAT"]}),(0,a.jsxs)("span",{className:"text-[10px] bg-white px-3 py-1.5 rounded-full text-[#4681E8] font-mono border border-[#4681E8]/30 shadow-inner tracking-widest flex items-center gap-1.5",children:[(0,a.jsx)("svg",{className:"w-3 h-3",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 10l4.553-2.276A1 1 0 0121 8.618v6.764a1 1 0 01-1.447.894L15 14M5 18h8a2 2 0 002-2V8a2 2 0 00-2-2H5a2 2 0 00-2 2v8a2 2 0 002 2z"})}),L.length," BLV"]})]}),(0,a.jsx)("div",{className:"flex-1 bg-[#FFFFFF]/40 min-h-0 chat-container-wrapper",children:(0,a.jsx)(N,{anchors:L,selectedAnchor:M})})]})})]})]})}let p={25:"KIỂM SO\xc1T B\xd3NG",24:"CHUYỀN CH\xcdNH X\xc1C",23:"TỔNG SỐ ĐƯỜNG CHUYỀN",22:"TẤN C\xd4NG",21:"T.C\xd4NG NGUY HIỂM",2:"S\xdaT TR\xdaNG Đ\xcdCH",37:"PHẠT G\xd3C",28:"N\xc9M BI\xcaN",8:"VIỆT VỊ",3:"THẺ V\xc0NG",4:"THẺ ĐỎ",5:"S\xdaT PENALTY",29:"PHẠM LỖI",26:"Đ\xc1NH ĐẦU",27:"CỨU THUA",1:"B\xc0N THẮNG",7:"PHẢN LƯỚI"},u=[25,21,22,24,2,23,4,3,37,28,8,5,29],g="https://cdn.sportdb.live/upload/team/";function b({matchDetails:e}){let[t,s]=(0,l.useState)("full"),r=e?.stats,n=e?.lineup,i=n?.match?.home_team,o=n?.match?.away_team,c=null;Array.isArray(r)&&r.length>0?c=r[0]:r?.results?.[0]?c=r.results[0]:r?.stats_full_time&&(c=r);let d={full:c?.stats_full_time||[],h1:c?.stats_haft_time||c?.stats_half_time||[],h2:c?.stats_haft_time_2nd_half||[]}[t]||[];if(!c||0===d.length)return(0,a.jsx)(j,{text:"Thống k\xea sẽ được cập nhật khi trận đấu bắt đầu"});let x=[...d].sort((e,t)=>{let s=u.indexOf(e.type),a=u.indexOf(t.type);return(-1===s?999:s)-(-1===a?999:a)});return(0,a.jsxs)("div",{className:"flex flex-col",children:[(i||o)&&(0,a.jsxs)("div",{className:"flex items-center justify-between px-4 py-3 border-b border-slate-100",children:[(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5 w-20",children:[i?.logo&&(0,a.jsx)("img",{src:g+i.logo,alt:i?.name||"Home team",className:"w-8 h-8 object-contain",onError:e=>e.target.style.display="none",loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-slate-600 text-[10px] font-medium text-center leading-tight",children:i?.name||""})]}),(0,a.jsx)("div",{className:"flex gap-1",children:[{k:"h1",l:"Hiệp 1"},{k:"h2",l:"Hiệp 2"},{k:"full",l:"Cả trận"}].map(({k:e,l})=>(0,a.jsx)("button",{onClick:()=>s(e),className:`px-2.5 py-1 text-[10px] font-bold rounded transition-all ${t===e?"bg-[#E11D48] text-white":"text-slate-400 hover:text-slate-600 bg-slate-100"}`,children:l},e))}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5 w-20",children:[o?.logo&&(0,a.jsx)("img",{src:g+o.logo,alt:o?.name||"Away team",className:"w-8 h-8 object-contain",onError:e=>e.target.style.display="none",loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-slate-600 text-[10px] font-medium text-center leading-tight",children:o?.name||""})]})]}),(0,a.jsx)("div",{className:"px-4 py-3 space-y-3",children:x.map(e=>{let t=p[e.type]||`Stat ${e.type}`,s=e.home,l=e.away,r=24===e.type||25===e.type,n=s+l,i=0===n?50:s/n*100,o=s>l,c=l>s;return(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"flex justify-between items-center mb-1.5",children:[(0,a.jsxs)("span",{className:`text-xs font-bold w-10 tabular-nums ${o?"text-slate-800":"text-slate-400"}`,children:[s,r?"%":""]}),(0,a.jsx)("span",{className:"text-slate-400 text-[10px] font-semibold tracking-wide uppercase",children:t}),(0,a.jsxs)("span",{className:`text-xs font-bold w-10 text-right tabular-nums ${c?"text-slate-800":"text-slate-400"}`,children:[l,r?"%":""]})]}),(0,a.jsxs)("div",{className:"flex gap-0.5 h-[5px]",children:[(0,a.jsx)("div",{className:"flex-1 rounded-l-full bg-white/[0.06] overflow-hidden flex justify-end",children:(0,a.jsx)("div",{className:`rounded-l-full transition-all duration-500 ${o?"bg-gradient-to-r from-[#E11D48]/60 to-[#E11D48]":"bg-gradient-to-r from-white/10 to-white/20"}`,style:{width:`${i}%`}})}),(0,a.jsx)("div",{className:"flex-1 rounded-r-full bg-white/[0.06] overflow-hidden",children:(0,a.jsx)("div",{className:`rounded-r-full transition-all duration-500 ${c?"bg-gradient-to-l from-[#E11D48]/60 to-[#E11D48]":"bg-gradient-to-l from-white/10 to-white/20"}`,style:{width:`${100-i}%`}})})]})]},e.type)})})]})}
688function f({matchDetails:e}){let[t,s]=(0,l.useState)("pitch"),r=e?.lineup,n=r?.lineup||r,i=n?.home||[],o=n?.away||[],c=r?.home_formation||"",d=r?.away_formation||"",x=r?.match?.home_team,h=r?.match?.away_team;if(0===i.length&&0===o.length)return(0,a.jsx)(j,{text:"Đội h\xecnh sẽ được c\xf4ng bố trước trận đấu 30 ph\xfat"});let m=e=>e.filter(e=>1===e.first),p=e=>e.filter(e=>1!==e.first),u=m(i),g=m(o),b=p(i),w=p(o);return(0,a.jsxs)("div",{className:"flex flex-col",children:[(0,a.jsxs)("div",{className:"flex items-center justify-center gap-1 px-3 py-2 border-b border-slate-100",children:[(0,a.jsx)("button",{onClick:()=>s("pitch"),className:`px-3 py-1.5 text-[10px] font-bold rounded transition-all ${"pitch"===t?"bg-[#E11D48] text-white":"text-slate-400 bg-slate-100"}`,children:"Đội h\xecnh xuất ph\xe1t"}),(0,a.jsx)("button",{onClick:()=>s("list"),className:`px-3 py-1.5 text-[10px] font-bold rounded transition-all ${"list"===t?"bg-[#E11D48] text-white":"text-slate-400 bg-slate-100"}`,children:"Đội h\xecnh dá»± bị"})]}),"pitch"===t?(0,a.jsx)("div",{className:"relative w-full",style:{aspectRatio:"68/105"},children:(0,a.jsxs)("div",{className:"absolute inset-0 bg-gradient-to-b from-[#1a5c2a] via-[#1e6b31] to-[#1a5c2a] rounded-2xl overflow-hidden",children:[(0,a.jsxs)("div",{className:"absolute inset-[3%] border border-white/20 rounded-lg",children:[(0,a.jsx)("div",{className:"absolute left-0 right-0 top-1/2 h-px bg-white/20"}),(0,a.jsx)("div",{className:"absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 w-[22%] aspect-square rounded-full border border-white/20"}),(0,a.jsx)("div",{className:"absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 w-1.5 h-1.5 bg-white/30 rounded-full"}),(0,a.jsx)("div",{className:"absolute top-0 left-1/2 -translate-x-1/2 w-[55%] h-[16%] border-l border-r border-white/20"}),(0,a.jsx)("div",{className:"absolute top-0 left-1/2 -translate-x-1/2 w-[25%] h-[6%] border-l border-r border-white/20"}),(0,a.jsx)("div",{className:"absolute bottom-0 left-1/2 -translate-x-1/2 w-[55%] h-[16%] border-t border-l border-r border-white/20"}),(0,a.jsx)("div",{className:"absolute bottom-0 left-1/2 -translate-x-1/2 w-[25%] h-[6%] border-t border-l border-r border-white/20"})]}),(0,a.jsx)("div",{className:"absolute top-1 left-2 text-[9px] text-[#F8FAFC]/50 font-bold z-10",children:x?.name||""}),(0,a.jsx)("div",{className:"absolute top-1 right-2 text-[9px] text-[#E11D48]/70 font-bold z-10",children:c}),(0,a.jsx)("div",{className:"absolute bottom-1 left-2 text-[9px] text-[#F8FAFC]/50 font-bold z-10",children:h?.name||""}),(0,a.jsx)("div",{className:"absolute bottom-1 right-2 text-[9px] text-[#E11D48]/70 font-bold z-10",children:d}),u.map((e,t)=>{let s=`${e.x||50}%`,l=`${(e.y||10)/2}%`,r="G"===e.position;return(0,a.jsxs)("div",{className:"absolute flex flex-col items-center z-10 -translate-x-1/2 -translate-y-1/2",style:{left:s,top:l},children:[(0,a.jsx)("div",{className:`w-6 h-6 rounded-full flex items-center justify-center text-[9px] font-black ${r?"bg-yellow-400 text-black":"bg-blue-600 text-[#F8FAFC]"} shadow-md border border-white/20`,children:e.shirt_number||""}),(0,a.jsx)("span",{className:"text-[7px] text-[#F8FAFC] font-semibold mt-0.5 text-center max-w-[48px] truncate drop-shadow-[0_1px_2px_rgba(0,0,0,0.8)]",children:(e.name||"").split(" ").slice(-2).join(" ")}),1===e.captain&&(0,a.jsx)("span",{className:"absolute -top-1 -right-1 text-[6px] text-yellow-400",children:"C"})]},`h-${t}`)}),g.map((e,t)=>{let s=`${100-(e.x||50)}%`,l=`${100-(e.y||10)/2}%`,r="G"===e.position;return(0,a.jsxs)("div",{className:"absolute flex flex-col items-center z-10 -translate-x-1/2 -translate-y-1/2",style:{left:s,top:l},children:[(0,a.jsx)("div",{className:`w-6 h-6 rounded-full flex items-center justify-center text-[9px] font-black ${r?"bg-yellow-400 text-black":"bg-orange-500 text-[#F8FAFC]"} shadow-md border border-white/20`,children:e.shirt_number||""}),(0,a.jsx)("span",{className:"text-[7px] text-[#F8FAFC] font-semibold mt-0.5 text-center max-w-[48px] truncate drop-shadow-[0_1px_2px_rgba(0,0,0,0.8)]",children:(e.name||"").split(" ").slice(-2).join(" ")}),1===e.captain&&(0,a.jsx)("span",{className:"absolute -top-1 -right-1 text-[6px] text-yellow-400",children:"C"})]},`a-${t}`)})]})}):(0,a.jsxs)("div",{className:"px-3 py-2 text-xs",children:[(0,a.jsxs)("div",{className:"flex justify-between font-bold text-slate-400 mb-1 uppercase tracking-wider text-[9px] px-1",children:[(0,a.jsx)("span",{children:"Đội chá»
688§ nh\xe0"}),(0,a.jsx)("span",{children:"Đội kh\xe1ch"})]}),Array.from({length:Math.max(b.length,w.length)}).map((e,t)=>{let s=b[t],l=w[t];return(0,a.jsxs)("div",{className:"flex justify-between items-center border-b border-slate-50 py-1.5",children:[(0,a.jsx)("div",{className:"flex items-center gap-1.5 w-1/2 min-w-0",children:s&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"text-[#E11D48] font-bold w-5 text-center shrink-0 text-[10px]",children:s.shirt_number||""}),(0,a.jsx)("span",{className:"text-slate-700 truncate text-[11px]",children:s.name||""})]})}),(0,a.jsx)("div",{className:"flex items-center gap-1.5 w-1/2 justify-end min-w-0",children:l&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"text-slate-700 truncate text-[11px] text-right",children:l.name||""}),(0,a.jsx)("span",{className:"text-[#E11D48] font-bold w-5 text-center shrink-0 text-[10px]",children:l.shirt_number||""})]})})]},t)})]})]})}function j({text:e}){return(0,a.jsx)("div",{className:"flex items-center justify-center py-10 text-slate-400 text-sm text-center",children:e})}function w({m:e}){let t=c(e.status_id,e.sport_id),{hm:s,dm:l}=x(e.time),r=e.source_card_meta?.league_label||e.match_data?.competition_vi||"";return(0,a.jsxs)("a",{href:`/match/${encodeURIComponent(e.post_name||e.id)}`,className:"flex items-center gap-3 rounded-2xl bg-white hover:bg-slate-50 border border-slate-100 hover:border-[#4681E8]/30 p-3 transition-all group",children:[(0,a.jsxs)("div",{className:"shrink-0 w-14 text-center",children:[(0,a.jsx)("div",{className:"text-[#E11D48] text-[11px] font-bold",children:s}),(0,a.jsx)("div",{className:"text-slate-400 text-[9px]",children:l})]}),(0,a.jsx)("div",{className:"w-px h-9 bg-slate-200 shrink-0"}),(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("div",{className:"text-slate-400 text-[9px] truncate mb-1",children:r}),(0,a.jsxs)("div",{className:"flex items-center gap-2 mb-0.5",children:[(0,a.jsx)("img",{src:e.home_logo||d(e.home_name),alt:e.home_name,className:"w-4 h-4 object-contain shrink-0",onError:t=>t.target.src=d(e.home_name),loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-slate-600 text-[12px] font-medium truncate",children:e.home_name})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("img",{src:e.away_logo||d(e.away_name),alt:e.away_name,className:"w-4 h-4 object-contain shrink-0",onError:t=>t.target.src=d(e.away_name),loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-slate-600 text-[12px] font-medium truncate",children:e.away_name})]})]}),t.sc?(0,a.jsxs)("span",{className:"text-slate-800 font-bold text-[14px] tabular-nums shrink-0",children:[e.home_score,"-",e.away_score]}):(0,a.jsx)("span",{className:"text-[10px] font-bold text-[#E11D48] bg-[#E11D48]/10 rounded px-2.5 py-1 group-hover:bg-[#E11D48]/15 transition shrink-0",children:"XEM NGAY"})]})}let v={0:{bg:"bg-white/10",text:"text-[#F8FAFC]/40",nameCls:"text-[#94A3B8]"},1:{bg:"bg-white/10",text:"text-[#F8FAFC]/50",nameCls:"text-[#94A3B8]"},2:{bg:"bg-green-900/50",text:"text-green-400",nameCls:"text-green-400"},3:{bg:"bg-yellow-900/40",text:"text-yellow-400",nameCls:"text-emerald-600 font-bold"},4:{bg:"bg-blue-900/40",text:"text-blue-400",nameCls:"text-blue-400 font-bold"},5:{bg:"bg-red-900/40",text:"text-red-400",nameCls:"text-red-400 font-bold"}};function N({anchors:e,selectedAnchor:t}){let[s,r]=(0,l.useState)([]),[n,i]=(0,l.useState)(!1),o=(0,l.useRef)(null),c=(0,l.useRef)(null),d=t?.roomNum;return(0,l.useEffect)(()=>{if(!d)return;r([]),i(!1);let e=new EventSource(`/api/chat/${d}`);return e.onopen=()=>i(!0),e.onmessage=e=>{try{let t=JSON.parse(e.data);if("connected"===t.type)return void i(!0);if("history"===t.type&&Array.isArray(t.messages))return void r(e=>[...t.messages,...e].slice(-200));t.user&&t.text&&r(e=>[...e,t].slice(-200))}catch{}},e.onerror=()=>i(!1),()=>{e.close(),i(!1)}},[d]),(0,l.useEffect)(()=>{requestAnimationFrame(()=>{let e=c.current;e&&(e.scrollTop=e.scrollHeight)})},[s.length]),(0,a.jsxs)("div",{className:"flex flex-col h-full bg-[#0F0F23]",children:[(0,a.jsxs)("div",{ref:c,className:"flex-1 min-h-0 px-3 py-2 flex flex-col gap-[3px] overflow-y-auto",style:{scrollbarWidth:"thin",scrollbarColor:"#444 transparent"},children:[(0,a.jsx)("div",{className:"text-center text-[10px] text-[#F8FAFC]/30 bg-slate-50/60 py-1.5 rounded-xl mb-1 sticky top-0 z-10 backdrop-blur-sm",children:n?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"inline-block h-1.5 w-1.5 rounded-full bg-green-400 animate-pulse mr-1"}),"Đang kết nối ph\xf2ng chat trá»±c tiếp"]}):d?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"inline-block h-1.5 w-1.5 rounded-full bg-yellow-400 animate-pulse mr-1"}),"Đang kết nối..."]}
688):"Ch\xe0o mừng bạn đến với ph\xf2ng chat"}),0===s.length&&n&&(0,a.jsx)("div",{className:"text-center text-[10px] text-[#F8FAFC]/20 py-4",children:"Chờ tin nhắn mới..."}),s.map((e,t)=>{var s;let l=(s=e.level)>=5?v[5]:v[s]||v[0];return 2===e.type||e.text?.includes("v\xe0o ph\xf2ng tr\xf2 chuyện")?(0,a.jsxs)("div",{className:"flex items-start gap-1.5 text-[11px] leading-relaxed py-[1px] opacity-60",children:[(0,a.jsx)("span",{className:"text-green-500/70 font-medium",children:"Hi"}),(0,a.jsxs)("span",{className:`shrink-0 inline-flex items-center px-1 py-[0.5px] rounded text-[8px] font-bold ${l.bg} ${l.text}`,children:["Lv",e.level]}),(0,a.jsxs)("span",{className:`font-bold ${l.nameCls}`,children:[e.user,":"]}),(0,a.jsx)("span",{className:"text-[#F8FAFC]/40",children:e.text})]},`${e.ts}-${t}`):(0,a.jsxs)("div",{className:"flex items-start gap-1.5 text-[11px] leading-relaxed py-[1px]",children:[(0,a.jsxs)("span",{className:`shrink-0 inline-flex items-center px-1 py-[0.5px] rounded text-[8px] font-bold ${l.bg} ${l.text}`,children:["Lv.",e.level]}),(0,a.jsxs)("span",{className:`font-bold shrink-0 ${l.nameCls}`,children:[e.user,":"]}),(0,a.jsx)("span",{className:"text-[#F8FAFC]/80 break-words min-w-0",children:e.text})]},`${e.ts}-${t}`)}),(0,a.jsx)("div",{ref:o})]}),(0,a.jsxs)("div",{className:"shrink-0 px-3 py-2 bg-[#0F0F23] border-t border-white/[0.04] space-y-2",children:[(0,a.jsx)("div",{className:"flex items-center justify-center gap-3 text-[#F8FAFC]/20 text-[10px]",children:(0,a.jsx)("span",{className:"flex items-center gap-1",children:(0,a.jsx)("svg",{className:"w-3 h-3",viewBox:"0 0 24 24",fill:"currentColor",children:(0,a.jsx)("path",{d:"M12 4.5C7 4.5 2.7 7.6 1 12c1.7 4.4 6 7.5 11 7.5s9.3-3.1 11-7.5c-1.7-4.4-6-7.5-11-7.5zm0 12.5c-2.8 0-5-2.2-5-5s2.2-5 5-5 5 2.2 5 5-2.2 5-5 5zm0-8c-1.7 0-3 1.3-3 3s1.3 3 3 3 3-1.3 3-3-1.3-3-3-3z"})})})}),(0,a.jsxs)("div",{className:"flex bg-[#0F0F23] rounded-2xl overflow-hidden border border-white/[0.08]",children:[(0,a.jsx)("input",{type:"text",placeholder:"Đăng nhập để c\xf9ng chat nh\xe9",disabled:!0,className:"flex-1 bg-transparent px-3 py-2 text-[11px] text-[#F8FAFC] outline-none placeholder:text-[#F8FAFC]/30 disabled:opacity-50"}),(0,a.jsx)("button",{disabled:!0,className:"px-4 text-[11px] font-bold bg-[#E11D48] text-black disabled:bg-white/10 disabled:text-[#F8FAFC]/20 transition-colors",children:"Gửi"})]})]})]})}let y={1:{icon:"⚽",label:"B\xe0n thắng",color:"text-green-400"},2:{icon:"\uD83C\uDD7F️",label:"Phạt đền",color:"text-green-400"},3:{icon:"\uD83D\uDFE1",label:"Thẻ v\xe0ng",color:"text-yellow-400"},4:{icon:"\uD83D\uDFE1\uD83D\uDFE1",label:"Thẻ v\xe0ng 2",color:"text-emerald-600"},5:{icon:"\uD83D\uDD34",label:"Thẻ đỏ",color:"text-red-500"},7:{icon:"\uD83D\uDD04",label:"Phản lưới",color:"text-orange-400"},8:{icon:"\uD83C\uDFE5",label:"Chấn thương",color:"text-[#94A3B8]"},9:{icon:"\uD83D\uDD04",label:"Thay người",color:"text-blue-400"},11:{icon:"⏱️",label:"Hiệp 2",color:"text-[#F8FAFC]/40"},15:{icon:"\uD83E\uDD45",label:"Pen trượt",color:"text-red-400"},19:{icon:"⏱️",label:"Kết th\xfac hiệp",color:"text-[#F8FAFC]/30"},21:{icon:"\uD83C\uDFC6",label:"VAR",color:"text-purple-400"}};function _({events:e}){let t=e?.incidents||e?.events||[];return t&&0!==t.length?(0,a.jsx)("div",{className:"flex flex-col",children:t.map((e,t)=>{let s=y[e.type]||{icon:"•",label:`Event ${e.type}`,color:"text-[#F8FAFC]/50"},l=1===e.position,r=2===e.position,n=e.add_time?`+${e.add_time}`:"",i=`${e.time}'${n}`;return l||r||11!==e.type&&19!==e.type?9===e.type?(0,a.jsxs)("div",{className:`flex items-center gap-2 border-b border-slate-50 p-3 text-xs ${l?"":"flex-row-reverse"}`,children:[(0,a.jsx)("span",{className:"text-slate-400 w-10 text-center shrink-0 text-[10px]",children:i}),(0,a.jsxs)("div",{className:`flex-1 flex flex-col gap-0.5 ${l?"items-start":"items-end"}`,children:[(0,a.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,a.jsx)("span",{className:"text-green-400 text-[10px]",children:"▲"}),(0,a.jsx)("span",{className:"text-[#F8FAFC]/80 text-[11px]",children:e.in_player_name||""})]}),(0,a.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,a.jsx)("span",{className:"text-red-400 text-[10px]",children:"▼"}),(0,a.jsx)("span",{className:"text-[#F8FAFC]/40 text-[11px]",children:e.out_player_name||""})]})]})]},t):(0,a.jsxs)("div",{className:`flex items-center gap-2 border-b border-slate-50 p-3 text-xs ${l?"":"flex-row-reverse"}`,children:[(0,a.jsx)("span",{className:"text-slate-400 w-10 text-center shrink-0 text-[10px]",children:i}),(0,a.jsx)("span",{className:`shrink-0 text-sm ${s.color}`,children:s.icon}),(0,a.jsxs)("div",{className:`flex-1 min-w-0 ${l?"text-left":"text-right"}`,children:[(0,a.jsx)("span",{className:"text-slate-700 text-[11px]",children:e.player_name||""}),e.assist1_name&&(0,a.jsxs)("span",{className:"text-slate-400 text-[10px] ml-1",children:["(kiến tạo: ",e.assist1_name,")"]}),1===e.type&&void 0!==e.home_score&&(0,a.jsxs)("span",{className:"text-[#E11D48] font-bold text-[11px] ml-2",children:[e.home_score," - ",e.away_score]})]})]},t):(0,a.jsx)("div",{className:"flex items-center justify-center py-2 border-b border-slate-50 bg-slate-50",children:(0,a.jsxs)("span",{className:"text-slate-400 text-[10px] uppercase tracking-wider",children:[s.icon," ",s.label," — ",i]})},t)})}):(0,a.jsx)(j,{text:"Diễn biến trận đấu sẽ được cập nhật trực tiếp tại đ\xe2y"})}function k({standings:e}
688){return e&&e.teams&&0!==e.teams.length?(0,a.jsxs)("div",{className:"w-full text-[10px]",children:[(0,a.jsxs)("div",{className:"grid grid-cols-[20px_1fr_24px_24px_32px] bg-slate-50 p-2 text-slate-400 uppercase font-bold sticky top-0",children:[(0,a.jsx)("span",{className:"text-center",children:"#"}),(0,a.jsx)("span",{children:"Team"}),(0,a.jsx)("span",{className:"text-center",children:"T"}),(0,a.jsx)("span",{className:"text-center",children:"B"}),(0,a.jsx)("span",{className:"text-center whitespace-nowrap",children:"Đ"})]}),e.teams.slice(0,15).map((e,t)=>{let s=!!e.data,l=s?parseFloat(e.data[0]):e.rank||t+1,r=s?e.data[1]:e.target_name,n=s?e.data[7]:e.points,i=s?e.data[3]:e.won,o=s?e.data[5]:e.loss;return(0,a.jsxs)("div",{className:"grid grid-cols-[20px_1fr_24px_24px_32px] items-center p-2 border-b border-slate-50 hover:bg-slate-50 transition-colors",children:[(0,a.jsx)("span",{className:"text-center text-slate-500",children:l}),(0,a.jsxs)("div",{className:"flex items-center gap-1.5 min-w-0 pr-2",children:[e.team_logo&&(0,a.jsx)("img",{src:e.team_logo,className:"w-3.5 h-3.5 object-contain",alt:r||"Team logo",loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-slate-700 font-medium truncate",children:r})]}),(0,a.jsx)("span",{className:"text-center text-slate-500",children:i}),(0,a.jsx)("span",{className:"text-center text-slate-500",children:o}),(0,a.jsx)("span",{className:"text-center text-[#E11D48] font-bold",children:n})]},r)})]}):(0,a.jsx)(j,{text:"Bảng xếp hạng sẽ được cập nhật"})}function E({odds:e}){let t=Array.isArray(e)?e:[],s=["2","4","3","16"];function l(e){for(let a of s){let s=t.find(t=>t.odds_type===e&&String(t.company_id)===a);if(s?.odds_info?.length)return s}return t.find(t=>t.odds_type===e&&t.odds_info?.length>0)}function r(e,t){let s=e?.odds_info;if(!s?.length)return["-","-","-"];let a="opening"===t?s.length-1:0;if(!s?.length||!s[a])return["-","-","-"];let l=s[a][2];if("string"!=typeof l)return["-","-","-"];let r=l.split(",");return[r[0]||"-",r[1]||"-",r[2]||"-"]}let n=l("asia"),i=l("eu"),o=l("bs"),c=l("cr"),d=r(n,"opening"),x=r(n,"latest"),h=r(i,"opening"),m=r(i,"latest"),p=r(o,"opening"),u=r(o,"latest"),g=r(c,"opening"),b=r(c,"latest"),f=({children:e})=>(0,a.jsx)("th",{className:"px-2 py-2 text-[9px] sm:text-[10px] font-bold uppercase tracking-wider text-slate-500 border-b border-slate-100 text-center",children:e}),j=({children:e,color:t})=>(0,a.jsx)("td",{className:`px-2 py-2.5 text-center text-[11px] sm:text-xs font-bold ${t||"text-slate-600"} border-b border-slate-50`,children:e});return(0,a.jsxs)("div",{className:"overflow-x-auto",children:[(0,a.jsxs)("table",{className:"w-full min-w-[600px]",children:[(0,a.jsxs)("thead",{children:[(0,a.jsxs)("tr",{className:"bg-slate-50",children:[(0,a.jsx)("th",{className:"px-4 py-2 text-left border-b border-slate-100",rowSpan:2,children:(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("div",{className:"w-7 h-7 rounded bg-gradient-to-br from-[#1d4ed8] to-[#3b82f6] flex items-center justify-center text-white text-[9px] font-black shadow-sm",children:"B"}),(0,a.jsx)("span",{className:"text-slate-600 text-[11px] font-bold tracking-wider",children:"SPORT"})]})}),(0,a.jsx)("th",{colSpan:3,className:"px-1 py-1.5 text-center text-[9px] sm:text-[10px] font-bold uppercase tracking-wider text-[#4681E8] border-b border-l border-slate-100",children:"CƯỢC CH\xc2U \xc1"}),(0,a.jsx)("th",{colSpan:3,className:"px-1 py-1.5 text-center text-[9px] sm:text-[10px] font-bold uppercase tracking-wider text-[#4681E8] border-b border-l border-slate-100",children:"CƯỢC CH\xc2U \xc2U"}),(0,a.jsx)("th",{colSpan:3,className:"px-1 py-1.5 text-center text-[9px] sm:text-[10px] font-bold uppercase tracking-wider text-[#4681E8] border-b border-l border-slate-100",children:"T\xc0I XỈU"}),(0,a.jsx)("th",{colSpan:3,className:"px-1 py-1.5 text-center text-[9px] sm:text-[10px] font-bold uppercase tracking-wider text-[#4681E8] border-b border-l border-slate-100",children:"K\xc8O G\xd3C"})]}),(0,a.jsxs)("tr",{className:"bg-slate-50",children:[(0,a.jsx)(f,{children:"CHỦ"}),(0,a.jsx)(f,{children:"CHẤP"}),(0,a.jsx)(f,{children:"KH\xc1CH"}),(0,a.jsx)(f,{children:"CHỦ"}),(0,a.jsx)(f,{children:"H\xd2A"}),(0,a.jsx)(f,{children:"KH\xc1CH"}),(0,a.jsx)(f,{children:"T\xc0I"}),(0,a.jsx)(f,{children:"TỶ LỆ"}),(0,a.jsx)(f,{children:"XỈU"}),(0,a.jsx)(f,{children:"T\xc0I"}),(0,a.jsx)(f,{children:"TỶ LỆ"}),(0,a.jsx)(f,{children:"XỈU"})]})]}),(0,a.jsxs)("tbody",{children:[(0,a.jsxs)("tr",{className:"hover:bg-slate-50 transition-colors",children:[(0,a.jsx)("td",{className:"px-4 py-2.5 text-[11px] sm:text-xs text-slate-500 font-medium border-b border-slate-50",children:"Tỷ Lệ Mở Cược"}),(0,a.jsx)(j,{children:d[0]}),(0,a.jsx)(j,{color:"text-red-400",children:d[1]}),(0,a.jsx)(j,{children:d[2]}),(0,a.jsx)(j,{children:h[0]}),(0,a.jsx)(j,{children:h[1]}),(0,a.jsx)(j,{children:h[2]}),(0,a.jsx)(j,{children:p[0]}),(0,a.jsx)(j,{children:p[1]}),(0,a.jsx)(j,{children:p[2]}),(0,a.jsx)(j,{children:g[0]}),(0,a.jsx)(j,{children:g[1]}),(0,a.jsx)(j,{children:g[2]})]}),(0,a.jsxs)("tr",{className:"hover:bg-slate-50 transition-colors",children:[(0,a.jsx)("td",{className:"px-4 py-2.5 text-[11px] sm:text-xs text-slate-500 font-medium border-b border-slate-50",children:"Tỷ Lệ Trước Trận"}),(0,a.jsx)(j,{children:x[0]}),(0,a.jsx)(j,{color:"text-red-400",children:x[1]}),(0,a.jsx)(j,{children:x[2]}),(0,a.jsx)(j,{children:m[0]}),(0,a.jsx)(j,{children:m[1]}),(0,a.jsx)(j,{children:m[2]}),(0,a.jsx)(j,{children:u[0]}),(0,a.jsx)(j,{children:u[1]}),(0,a.jsx)(j,{children:u[2]}),(0,a.jsx)(j,{children:b[0]}),(0,a.jsx)(j,{children:b[1]}),(0,a.jsx)(j,{children:b[2]})]}),(0,a.jsxs)("tr",{className:"hover:bg-slate-50 transition-colors bg-white",children:[(0,a.jsxs)("td",{className:"px-4 py-2.5 text-[11px] sm:text-xs text-slate-700 font-bold flex items-center gap-1.5 border-b border-slate-50",children:["Live ",(0,a.jsx)("span",{className:"w-1.5 h-1.5 rounded-full bg-red-500 animate-pulse"})]}),(0,a.jsx)(j,{color:"text-green-400",children:x[0]}),(0,a.jsx)(j,{color:"text-red-400",children:x[1]}),(0,a.jsx)(j,{color:"text-green-400",children:x[2]}),(0,a.jsx)(j,{color:"text-green-400",children:m[0]}),(0,a.jsx)(j,{color:"text-green-400",children:m[1]}),(0,a.jsx)(j,{color:"text-green-400",children:m[2]}),(0,a.jsx)(j,{color:"text-green-400",children:u[0]}),(0,a.jsx)(j,{children:u[1]}),(0,a.jsx)(j,{color:"text-green-400",children:u[2]}),(0,a.jsx)(j,{color:"text-green-400",children:b[0]}),(0,a.jsx)(j,{children:b[1]}),(0,a.jsx)(j,{color:"text-green-400",children:b[2]})]})]})]}),(0,a.jsx)("p",{className:"text-center text-slate-400 text-[10px] py-2.5 border-t border-slate-100",children:"Tỷ lệ k\xe8o sẽ được cập nhật gần giờ thi đấu"})]})}},76057:(e,t,s)=>{"use strict";s.d(t,{Klivevip12SchedulePage:()=>d});var a=s(68019),l=s(10707),r=s(78637),n=s(36627);function i({html:e}){return e?.trim()?(0,a.jsx)("section",{className:"relative mt-10 mb-6",children:(0,a.jsx)("div",{className:"seo-prose relative",children:(0,a.jsx)("div",{dangerouslySetInnerHTML:{__html:e},className:"text-slate-600 text-[14px] leading-[1.85] px-1 [&_strong]:text-slate-900 [&_a]:text-[#4681E8]"})})}):null}s(20935);let o=`
689<h2>Lịch thi đấu b\xf3ng đ\xe1 - Cập nhật lịch b\xf3ng đ\xe1 h\xf4m nay nhanh v\xe0 ch\xednh x\xe1c</h2>
690
691<p>Để <strong>xem lịch thi đấu b\xf3ng đ\xe1</strong> nhanh, ch\xednh x\xe1c v\xe0 đầy đủ nhất, Klive ch\xednh l\xe0 nơi bạn n\xean chọn. Ch\xfang t\xf4i cập nhật lịch thi đấu cho to\xe0n bộ c\xe1c giải đấu trong nước v\xe0 quốc tế, gi\xfap bạn kh\xf4ng bỏ lỡ bất kỳ trận cầu hấp dẫn n\xe0o.</p>
692
693<img src="/images/seo/schedule-football.png" alt="Lịch thi đấu b\xf3ng đ\xe1 h\xf4m nay tại Klive" loading="lazy" />
694
695<div class="toc-box">
696  <h3>Nội dung ch\xednh</h3>
697  <ol>
698    <li>Lịch thi đấu b\xf3ng đ\xe1 trực tuyến h\xe0ng đầu</li>
699    <li>Lịch b\xf3ng đ\xe1 nhanh v\xe0 ch\xednh x\xe1c</li>
700    <li>Cập nhật lịch Ngoại Hạng Anh v\xe0 Champions League</li>
701    <li>C\xe1ch xem lịch thi đấu hiệu quả nhất</li>
702  </ol>
703</div>
704
705<h2>Lịch thi đấu b\xf3ng đ\xe1 trực tuyến h\xe0ng đầu</h2>
706<p>Trong thời đại số, kh\xf4ng ai c\xf2n xem lịch b\xf3ng đ\xe1 tr\xean TV hay b\xe1o giấy nữa. Tất cả đ\xe3 chuyển sang theo d\xf5i online, v\xe0 Klive ch\xednh l\xe0 nền tảng cập nhật lịch b\xf3ng đ\xe1 được đ\xe1nh gi\xe1 cao nhất.</p>
707
708<p>Khi truy cập Klive, bạn c\xf3 thể xem lịch thi đấu của bất kỳ giải đấu b\xf3ng đ\xe1 n\xe0o tr\xean thế giới một c\xe1ch ho\xe0n to\xe0n miễn ph\xed. Th\xf4ng tin lịch đấu được cập nhật sớm nhất v\xe0 chi tiết đến từng ph\xfat.</p>
709
710<h2>Lịch b\xf3ng đ\xe1 nhanh v\xe0 ch\xednh x\xe1c</h2>
711<p>Klive kh\xf4ng chỉ cung cấp lịch thi đấu c\xe1c giải đấu h\xe0ng đầu m\xe0 c\xf2n cập nhật lịch ph\xe1t s\xf3ng tr\xean c\xe1c k\xeanh truyền h\xecnh Việt Nam như K+, FPT Play, VTV Sports. Gi\xfap bạn biết trận n\xe0o được chiếu trực tiếp tr\xean TV v\xe0 sắp xếp thời gian hợp l\xfd.</p>
712
713<h2>Cập nhật lịch Ngoại Hạng Anh v\xe0 Champions League</h2>
714<p>Ngoại Hạng Anh v\xe0 Champions League l\xe0 hai giải đấu được quan t\xe2m nhất. Tại Klive, bạn lu\xf4n nắm được lịch đấu đầy đủ từ v\xf2ng bảng đến chung kết, k\xe8m theo th\xf4ng tin về đội h\xecnh dá»± kiến, phong độ v\xe0 lịch sá»­ đối đầu để chuẩn bị tốt nhất cho má
714»—i trận cầu.</p>
715
716<p>Kết hợp lịch thi đấu với trang trực tiếp b\xf3ng đ\xe1, bạn sẽ c\xf3 trải nghiệm theo d\xf5i b\xf3ng đ\xe1 ho\xe0n hảo nhất - biết trước, xem ngay, kh\xf4ng bỏ lỡ!</p>
717`;var c=s(18210);function d({initialData:e}){let t=(0,r.usePathname)(),[s,h]=(0,l.useState)(!1),[m,p]=(0,l.useState)(new Set),[u,g]=(0,l.useState)(""),[b,f]=(0,l.useState)(!1),[j,w]=(0,l.useState)(0),v=(0,l.useMemo)(()=>(0,c.p_)(e),[e]),N=v.dateTabs,y=(0,l.useMemo)(()=>{if(!v.selectedDate)return 0;let e=N.findIndex(e=>(e.dataValue||e.date)===v.selectedDate);return e>=0?e:0},[N,v.selectedDate]),[_,k]=(0,l.useState)(y),[E,C]=(0,l.useState)(v.leagues||[]),S=(0,l.useMemo)(()=>{if(!u)return E;let e=u.toLowerCase();return E.filter(t=>t.league_name.toLowerCase().includes(e)||t.matches.some(t=>t.home_team.toLowerCase().includes(e)||t.away_team.toLowerCase().includes(e)))},[E,u]),L=Math.max(0,N.length-7),$=N.slice(j,j+7),F=j>0,T=j<L,A=S.reduce((e,t)=>e+t.matches.length,0);return((0,l.useEffect)(()=>{if(!v.selectedDate||!N.length)return;let e=N.findIndex(e=>(e.dataValue||e.date)===v.selectedDate);e>=0&&k(e)},[N,v.selectedDate]),(0,l.useEffect)(()=>{_<j?w(Math.max(0,_)):_>=j+7&&w(Math.min(L,_-7+1))},[_,L,j]),e)?(0,a.jsxs)("div",{className:"max-w-[1440px] mx-auto px-4 py-8",children:[(0,a.jsx)(n.M,{eyebrow:"Lịch thi đấu",title:"LỊCH THI ĐẤU",rightSlot:(0,a.jsxs)("div",{className:"text-[12px] text-slate-500 font-bold uppercase tracking-wider",children:[(0,a.jsx)("span",{className:"text-[#E11D48] font-black",children:S.reduce((e,t)=>e+t.matches.length,0)})," trận đấu"]})}),(0,a.jsxs)("div",{className:"flex items-center mb-4 rounded-xl overflow-hidden border border-slate-200 bg-white shadow-sm",children:[(0,a.jsx)("button",{type:"button",disabled:!F,onClick:()=>w(e=>Math.max(0,e-1)),className:`flex items-center justify-center w-8 h-[52px] bg-slate-100 border-r border-slate-200 text-slate-600 hover:text-slate-800 hover:bg-slate-200 transition-all shrink-0 ${!F?"opacity-30":"cursor-pointer"}`,children:(0,a.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2.5,d:"M15 19l-7-7 7-7"})})}),(0,a.jsx)("div",{className:"flex flex-1",children:$.map((e,s)=>{let l=j+s;return(0,a.jsxs)("button",{type:"button",onClick:()=>(e=>{let s=N[e];if(!s||e===_)return;let a=s.dataValue||s.date;a&&(k(e),p(new Set),h(!0),window.history.replaceState(null,"",`${t}?date=${encodeURIComponent(a)}`),fetch(`/api/socolive/fixtures?date=${encodeURIComponent(a)}`,{cache:"no-store"}).then(e=>e.ok?e.json():null).then(e=>{e&&C((0,c.p_)(e).leagues||[])}).finally(()=>h(!1)))})(l),className:`flex-1 flex flex-col items-center justify-center h-[52px] border-b-[3px] transition-all duration-300 ${_===l?"border-[#4681E8] text-[#4681E8] bg-[#4681E8]/5":"border-transparent text-[#64748B] hover:text-[#94A3B8] hover:bg-slate-100"}`,children:[(0,a.jsx)("span",{className:`text-[11px] font-bold uppercase tracking-widest ${_===l?"text-[#4681E8]":""}`,children:e.label}),(0,a.jsx)("span",{className:`text-[12px] font-mono mt-0.5 ${_===l?"text-slate-800 font-black":""}`,children:e.date})]},`tab-${l}`)})}),(0,a.jsx)("button",{type:"button",disabled:!T,onClick:()=>w(e=>Math.min(L,e+1)),className:`flex items-center justify-center w-8 h-[52px] bg-slate-100 border-l border-slate-200 text-slate-600 hover:text-slate-800 hover:bg-slate-200 transition-all shrink-0 ${!T?"opacity-30":"cursor-pointer"}`,children:(0,a.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2.5,d:"M9 5l7 7-7 7"})})})]}),(0,a.jsxs)("div",{className:"relative mb-4",children:[(0,a.jsxs)("button",{onClick:()=>f(!b),className:"flex items-center gap-3 bg-white hover:bg-slate-50 px-4 py-2.5 rounded-xl border border-slate-200 shadow-sm transition-all text-sm group",children:[(0,a.jsx)("svg",{className:"w-5 h-5 text-[#E11D48] transition-colors group-hover:text-[#F43F5E]",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 6h16M4 12h16M4 18h16"})}),(0,a.jsx)("span",{className:"text-slate-700 font-bold text-[13px] uppercase tracking-wide",children:"Danh s\xe1ch giải đấu"}),(0,a.jsx)("svg",{className:`w-4 h-4 text-slate-500 transition-transform duration-300 ${b?"rotate-180":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),b&&(0,a.jsxs)("div",{className:"absolute top-full left-0 mt-2 w-[360px] bg-white border border-slate-200 rounded-2xl shadow-[0_24px_80px_rgba(0,0,0,0.12)] z-50 max-h-[320px] overflow-hidden flex flex-col",children:[(0,a.jsx)("div",{className:"p-2 border-b border-slate-100",children:(0,a.jsx)("input",{type:"text",placeholder:"T\xecm giải đấu...",value:u,onChange:e=>g(e.target.value),className:"w-full bg-slate-50 border border-transparent roun
717ded-xl px-4 py-2.5 text-sm text-slate-800 placeholder-slate-400 outline-none focus:border-[#4681E8]/50 transition-colors"})}),(0,a.jsx)("div",{className:"overflow-y-auto flex-1 py-2",children:E.map((e,t)=>(0,a.jsxs)("button",{type:"button",onClick:()=>{g(e.league_name),f(!1)},className:"w-full flex items-center gap-3 px-4 py-2.5 hover:bg-slate-50 text-left text-[13px] transition-colors",children:[e.league_icon?(0,a.jsx)("img",{src:e.league_icon,alt:e.league_name||"League",className:"w-5 h-5 object-contain shrink-0",loading:"lazy",decoding:"async"}):(0,a.jsx)("div",{className:"w-5 h-5 rounded-md bg-slate-200 shrink-0"}),(0,a.jsx)("span",{className:"text-slate-600 truncate flex-1 font-medium",children:e.league_name}),(0,a.jsx)("span",{className:"text-[11px] text-[#E11D48] font-bold shrink-0 px-2 py-0.5 bg-[#E11D48]/10 rounded-md border border-[#E11D48]/20",children:e.matches.length})]},t))})]})]}),(0,a.jsxs)("div",{className:"grid grid-cols-[1fr_60px_55px_100px_100px_90px] bg-slate-50 border border-slate-200 rounded-t-xl px-4 py-3 text-[11px] text-slate-500 font-black uppercase tracking-widest shadow-inner",children:[(0,a.jsx)("span",{children:"Trận đấu"}),(0,a.jsx)("span",{className:"text-center",children:"Tỷ số"}),(0,a.jsx)("span",{className:"text-center",children:"Hiệp 1"}),(0,a.jsx)("span",{className:"text-center",children:"Cược chấp"}),(0,a.jsx)("span",{className:"text-center",children:"T\xe0i/Xỉu"}),(0,a.jsx)("span",{className:"text-center",children:"1 X 2"})]}),(0,a.jsxs)("div",{className:"border border-slate-200 border-t-0 rounded-b-xl overflow-hidden relative shadow-[0_8px_30px_rgba(0,0,0,0.06)]",children:[s&&(0,a.jsx)("div",{className:"absolute inset-0 z-10 bg-white/80 backdrop-blur-[2px]",children:(0,a.jsx)("div",{className:"space-y-0",children:[...Array(6)].map((e,t)=>(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 px-4 py-3.5 bg-slate-100 border-b border-slate-200",children:[(0,a.jsx)("div",{className:"w-4 h-4 rounded bg-slate-300 animate-pulse"}),(0,a.jsx)("div",{className:"h-3.5 rounded bg-slate-200 animate-pulse",style:{width:`${120+30*t}px`}})]}),[void 0,void 0].map((e,t)=>(0,a.jsxs)("div",{className:"grid grid-cols-[1fr_60px_55px_100px_100px_90px] items-center px-4 py-3 border-b border-slate-100",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)("div",{className:"w-10 h-3.5 rounded bg-slate-200 animate-pulse"}),(0,a.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,a.jsx)("div",{className:"h-3 w-24 rounded bg-slate-100 animate-pulse"}),(0,a.jsx)("div",{className:"h-3 w-20 rounded bg-slate-100 animate-pulse"})]})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5",children:[(0,a.jsx)("div",{className:"h-3 w-5 rounded bg-slate-100 animate-pulse"}),(0,a.jsx)("div",{className:"h-3 w-5 rounded bg-slate-100 animate-pulse"})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5",children:[(0,a.jsx)("div",{className:"h-3 w-5 rounded bg-slate-100 animate-pulse"}),(0,a.jsx)("div",{className:"h-3 w-5 rounded bg-slate-100 animate-pulse"})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5",children:[(0,a.jsx)("div",{className:"h-3 w-14 rounded bg-slate-100 animate-pulse"}),(0,a.jsx)("div",{className:"h-3 w-10 rounded bg-slate-100 animate-pulse"})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5",children:[(0,a.jsx)("div",{className:"h-3 w-14 rounded bg-slate-100 animate-pulse"}),(0,a.jsx)("div",{className:"h-3 w-10 rounded bg-slate-100 animate-pulse"})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5",children:[(0,a.jsx)("div",{className:"h-3 w-10 rounded bg-slate-100 animate-pulse"}),(0,a.jsx)("div",{className:"h-3 w-10 rounded bg-slate-100 animate-pulse"}),(0,a.jsx)("div",{className:"h-3 w-10 rounded bg-slate-100 animate-pulse"})]})]},t))]},t))})}),0!==S.length||s?S.map((e,t)=>(0,a.jsxs)("div",{id:`league-${t}`,children:[(0,a.jsxs)("button",{onClick:()=>{p(e=>{let s=new Set(e);return s.has(t)?s.delete(t):s.add(t),s})},className:"w-full flex items-center gap-3 px-4 py-3 bg-slate-50 hover:bg-slate-100 border-b border-slate-100 transition-colors text-left group",children:[(0,a.jsx)("svg",{className:`w-4 h-4 text-[#E11D48] transition-transform duration-300 shrink-0 ${m.has(t)?"-rotate-90":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2.5,d:"M19 9l-7 7-7-7"})}),e.league_icon&&(0,a.jsx)("div",{className:"w-6 h-6 rounded-full bg-slate-100 p-0.5 border border-slate-200 flex items-center justify-center shadow-sm",children:(0,a.jsx)("img",{src:e.league_icon,alt:e.league_name||"League",className:"w-4 h-4 object-contain shrink-0",loading:"lazy",decoding:"async"})}),(0,a.jsx)("span",{className:"text-[13px] font-bold text-slate-700 flex-1 truncate uppercase tracking-widest",children:e.league_name}),(0,a.jsxs)("span",{className:"text-[11px] text-[#E11D48] font-bold shrink-0 ml-1 px-2 py-0.5 bg-[#E11D48]/10 rounded border border-[#
717E11D48]/20 group-hover:bg-[#E11D48]/20 transition-colors",children:["BXH ",(0,a.jsx)("svg",{className:"inline w-3 h-3 ml-0.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 6h16M4 10h16M4 14h16M4 18h16"})})]})]}),!m.has(t)&&e.matches.map((e,t)=>(0,a.jsxs)("div",{className:"grid grid-cols-[1fr_60px_55px_100px_100px_90px] items-center px-4 py-3 bg-transparent hover:bg-slate-50 border-b border-slate-100 last:border-0 transition-colors group cursor-default",children:[(0,a.jsxs)("div",{className:"flex items-center gap-4 min-w-0",children:[(0,a.jsx)("span",{className:"text-[#E11D48] font-mono text-[13px] font-black min-w-[42px] shrink-0 drop-shadow-[0_0_4px_rgba(225,29,72,0.4)]",children:e.time}),(0,a.jsxs)("div",{className:"flex flex-col gap-1 min-w-0 flex-1",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[e.home_logo&&(0,a.jsx)("img",{src:e.home_logo,alt:e.home_team||"Home team",className:"w-4 h-4 object-contain shrink-0 filter drop-shadow-[0_2px_2px_rgba(0,0,0,0.8)]",loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-[13px] text-slate-700 font-medium truncate group-hover:text-slate-900 transition-colors",children:e.home_team})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[e.away_logo&&(0,a.jsx)("img",{src:e.away_logo,alt:e.away_team||"Away team",className:"w-4 h-4 object-contain shrink-0",loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-[13px] text-slate-700 font-medium truncate group-hover:text-slate-900 transition-colors",children:e.away_team})]})]})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center",children:[(0,a.jsx)("span",{className:"text-[12px] text-[var(--accent-cyan)] font-mono font-bold",children:"-"!==e.score?e.score:"-"}),(0,a.jsx)("span",{className:"text-[12px] text-[#64748B]",children:"-"})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center",children:[(0,a.jsx)("span",{className:"text-[12px] text-[#64748B]",children:"-"}),(0,a.jsx)("span",{className:"text-[12px] text-[#64748B]",children:"-"})]}),(0,a.jsx)(x,{values:e.handicap,hasLine:!0}),(0,a.jsx)(x,{values:e.over_under,hasLine:!0}),(0,a.jsx)("div",{className:"flex flex-col items-center gap-0",children:e.one_x_two?.length>0?e.one_x_two.map((e,t)=>(0,a.jsx)("span",{className:"text-[11px] text-slate-500 leading-[18px]",children:e||"-"},t)):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"text-[11px] text-[#64748B] leading-[18px]",children:"-"}),(0,a.jsx)("span",{className:"text-[11px] text-[#64748B] leading-[18px]",children:"-"}),(0,a.jsx)("span",{className:"text-[11px] text-[#64748B] leading-[18px]",children:"-"})]})})]},t))]},t)):(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center py-20 gap-3 bg-slate-50",children:[(0,a.jsx)("svg",{className:"w-12 h-12 text-slate-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",strokeWidth:1.5,children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6.75 3v2.25M17.25 3v2.25M3 18.75V7.5a2.25 2.25 0 012.25-2.25h13.5A2.25 2.25 0 0121 7.5v11.25m-18 0A2.25 2.25 0 005.25 21h13.5A2.25 2.25 0 0021 18.75m-18 0v-7.5A2.25 2.25 0 015.25 9h13.5A2.25 2.25 0 0121 11.25v7.5"})}),(0,a.jsx)("span",{className:"text-slate-500 font-medium tracking-wide",children:"Kh\xf4ng c\xf3 trận đấu n\xe0o cho ng\xe0y n\xe0y"}),(0,a.jsx)("span",{className:"text-slate-400 text-[12px]",children:"H\xe3y thá»­ chọn một ng\xe0y kh\xe1c"})]})]}),(0,a.jsxs)("div",{className:"mt-6 text-center text-[11px] text-[#64748B] uppercase tracking-widest font-bold drop-shadow-sm",children:["Tổng cộng ",A," trận đấu trong ",S.length," giải"]}),(0,a.jsx)(i,{html:o})]}):(0,a.jsxs)("div",{className:"max-w-[1440px] mx-auto px-4 py-8",children:[(0,a.jsx)(n.M,{eyebrow:"Lịch thi đấu",title:"LỊCH THI ĐẤU"}),(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center py-16 gap-4",children:[(0,a.jsx)("div",{className:"w-12 h-12 rounded-full border-2 border-[#E11D48]/30 border-t-[#E11D48] animate-spin"}),(0,a.jsx)("span",{className:"text-slate-500 text-sm font-medium tracking-wide",children:"Đang tải lịch thi đấu..."})]})]})}function x({values:e,hasLine:t}){return e&&0!==e.length?t&&e.length>=3?(0,a.jsxs)("div",{className:"flex flex-col items-center gap-0",children:[(0,a.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,a.jsx)("span",{className:"text-[11px] text-[#E11D48] leading-[18px] font-bold",children:e[0]}),(0,a.jsx)("span",{className:"text-[11px] text-slate-500 leading-[18px]",children:e[1]})]}),(0,a.jsx)("span",{className:"text-[11px] text-slate-500 leading-[18px]",children:e[2]})]}):(0,a.jsx)("div",{className:"flex flex-col items-center gap-0",children:e.map((e,t)=>(0,a.jsx)("span",{className:"text-[11px] text-slate-500 leading-[18px]",children:e||"-"},t))}):(0,a.jsxs)("div",{className:"flex flex-col items-center",children:[(0,a.jsx)("span",{className:"text-[11px] text-[#64748B] leading-[18px]",children:"-"}),(0,a.jsx)("span",{className:"text-[11px] text-[#64748B] leading-[18px]",children:"-"})]})}},76122:()=>{},77935:(e,t,s)=>{"use strict";function a(e){let t=e?.fixtures_v2||null,s=e?.fixtures||e?.schedules||[],a=t?.date_tabs?.length?t.date_tabs:function(e=new Date){let t=["Chá»
717§ Nhật","Thứ Hai","Thứ Ba","Thứ Tư","Thứ Năm","Thứ S\xe1u","Thứ Bảy"],s=[];for(let a=0;a<14;a+=1){let l=new Date(e);l.setDate(l.getDate()+a);let r=String(l.getDate()).padStart(2,"0"),n=String(l.getMonth()+1).padStart(2,"0"),i=`${l.getFullYear()}-${l.getMonth()+1}-${l.getDate()}`;s.push({label:0===a?"H\xf4m Nay":t[l.getDay()],date:`${r}.${n}`,dataValue:i,active:0===a})}return s}(),l=e?.selected_date||a.find(e=>e.active)?.dataValue||a[0]?.dataValue||null;if(t?.leagues?.length)return{dateTabs:a,selectedDate:l,leagues:t.leagues,totalMatches:t.leagues.reduce((e,t)=>e+t.matches.length,0)};let r=[],n=new Set;return s.forEach(e=>{let t=e.data;if(!(t.length<3))for(let s=0;s+2<t.length;s+=16){let a=t[s]||"",l=t[s+1]||"",i=t[s+2]||"",o=`${a}-${l}-${i}`;if(!n.has(o)&&l&&(n.add(o),r.push({time:a,home_team:l,away_team:i,home_logo:e.team_logos?.[2*Math.floor(s/16)]||"",away_logo:e.team_logos?.[2*Math.floor(s/16)+1]||"",score:t[s+3]||"-",ht_score:t[s+4]||"",handicap:t.length>s+9?[t[s+7]||"",t[s+8]||"",t[s+9]||""]:[],over_under:t.length>s+12?[t[s+10]||"",t[s+11]||"",t[s+12]||""]:[],one_x_two:t.length>s+15?[t[s+13]||"",t[s+14]||"",t[s+15]||""]:[]}),s+16>=t.length))break}}),{dateTabs:a,selectedDate:l,leagues:r.length>0?[{league_name:"Tất cả trận đấu",league_icon:"",match_count:r.length,matches:r}]:[],totalMatches:r.length}}function l(e){let t=e?.results_v2||null,s=e?.results||[];if(t?.date_groups?.length)return{availableLeagues:t.available_leagues||[],dateGroups:t.date_groups,totalMatches:t.date_groups.reduce((e,t)=>e+t.matches.length,0)};let a=[];return s.forEach(e=>{let t=e.data;if(t.length<6)return;let s=t[0],l=s.split(" - "),r=[],n=1,i=0;for(;n<t.length;){if(t[n]?.startsWith("L\xfac")){let s=t[n].replace("L\xfac","").trim();r.push({time:s,home_team:t[n+1]||"",away_team:t[n+4]||"",home_logo:e.team_logos?.[i]||"",away_logo:e.team_logos?.[i+1]||"",score:t[n+2]||"",ht_score:(t[n+3]||"").replace("H1:","").replace("HT:","").trim()}),i+=2,n+=5;continue}n+=1}r.length>0&&a.push({date_header:l[0]?.trim()||s,league_round:l.slice(1).join(" - ").trim(),matches:r})}),{availableLeagues:[],dateGroups:a,totalMatches:a.reduce((e,t)=>e+t.matches.length,0)}}function r(e,t){if(!t)return e;let s=t.toLowerCase();return e.filter(e=>e.league_round.toLowerCase().includes(s))}s.d(t,{kK:()=>r,o8:()=>l,p_:()=>a})},78219:(e,t,s)=>{"use strict";s.d(t,{StandingsClient:()=>h});var a=s(68019),l=s(10707),r=s(46914),n=s(89619);function i(e){return"W"===e?"border border-emerald-500/45 bg-emerald-500/25 text-emerald-300 shadow-[0_0_0_1px_rgba(16,185,129,0.08)_inset]":"L"===e?"border border-red-500/45 bg-red-500/25 text-red-300 shadow-[0_0_0_1px_rgba(239,68,68,0.08)_inset]":"D"===e?"border border-amber-400/45 bg-amber-400/22 text-amber-200 shadow-[0_0_0_1px_rgba(251,191,36,0.08)_inset]":"border border-slate-500/40 bg-slate-500/18 text-slate-700"}function o(e,t){return 1===e?{bar:"bg-[linear-gradient(180deg,#facc15,#f97316)]",badge:"border-emerald-600/60 bg-slate-100 text-yellow-700 shadow-[0_0_18px_rgba(250,204,21,0.14)]",row:"from-[#32230d]/70 via-transparent to-transparent"}:e<=4?{bar:"bg-[linear-gradient(180deg,#fb7185,#f97316)]",badge:"border-[#fb7185]/45 bg-slate-100 text-rose-700",row:"from-[#241318]/55 via-transparent to-transparent"}:e<=6?{bar:"bg-[linear-gradient(180deg,#f59e0b,#facc15)]",badge:"border-[#f59e0b]/45 bg-slate-100 text-yellow-700",row:"from-[#24190b]/45 via-transparent to-transparent"}:e<=10?{bar:"bg-[linear-gradient(180deg,#38bdf8,#2563eb)]",badge:"border-sky-400/40 bg-white text-sky-700",row:"from-[#101725]/32 via-transparent to-transparent"}:e>=Math.max(t-2,1)?{bar:"bg-[linear-gradient(180deg,#ef4444,#7f1d1d)]",badge:"border-red-500/40 bg-slate-100 text-red-700",row:"from-[#220f14]/45 via-transparent to-transparent"}:{bar:"bg-[linear-gradient(180deg,#64748b,#334155)]",badge:"border-slate-500/35 bg-white text-slate-700",row:"from-[#12161d]/24 via-transparent to-transparent"}}function c({detail:e}){let[t,s]=(0,l.useState)(!1),n=(0,l.useRef)(null),[o,d]=(0,l.useState)({top:0,left:0}),x=i(e.result),h=(0,l.useCallback)(()=>
717{if(n.current){let e=n.current.getBoundingClientRect();d({top:e.top+window.scrollY-8,left:e.left+e.width/2+window.scrollX})}s(!0)},[]);return(0,a.jsxs)("div",{ref:n,className:"relative inline-flex",onMouseEnter:h,onMouseLeave:()=>s(!1),children:[(0,a.jsx)("span",{className:`inline-flex h-7 w-7 items-center justify-center rounded-[8px] text-[11px] font-black cursor-pointer transition-transform hover:-translate-y-0.5 ${x}`,children:e.result}),t&&e.match_time&&"u">typeof document&&(0,r.createPortal)((0,a.jsxs)("div",{className:"fixed z-[9999] w-[220px] pointer-events-none",style:{top:`${o.top}px`,left:`${o.left}px`,transform:"translate(-50%, -100%)",position:"absolute"},children:[(0,a.jsxs)("div",{className:"overflow-hidden rounded-xl border border-[#cbd5e1] bg-white shadow-2xl",children:[(0,a.jsx)("div",{className:"bg-slate-100 px-3 py-1.5 text-[10px] text-slate-600 font-mono text-center border-b border-[#cbd5e1]",children:e.match_time}),(0,a.jsxs)("div",{className:"px-3 py-2.5 flex items-center justify-between gap-2",children:[(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5 flex-1 min-w-0",children:[e.home_logo?(0,a.jsx)("img",{src:e.home_logo,alt:e.home_team,className:"w-7 h-7 object-contain",loading:"lazy",decoding:"async"}):(0,a.jsx)("div",{className:"w-7 h-7 rounded-full bg-gray-700 flex items-center justify-center text-[8px] text-slate-600 font-bold",children:"?"}),(0,a.jsx)("span",{className:"text-[9px] text-slate-600 font-bold text-center leading-tight line-clamp-2 max-w-[70px]",children:e.home_team})]}),(0,a.jsx)("div",{className:"text-slate-900 font-black text-sm whitespace-nowrap px-1",children:e.score||"? - ?"}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5 flex-1 min-w-0",children:[e.away_logo?(0,a.jsx)("img",{src:e.away_logo,alt:e.away_team,className:"w-7 h-7 object-contain",loading:"lazy",decoding:"async"}):(0,a.jsx)("div",{className:"w-7 h-7 rounded-full bg-gray-700 flex items-center justify-center text-[8px] text-slate-600 font-bold",children:"?"}),(0,a.jsx)("span",{className:"text-[9px] text-slate-600 font-bold text-center leading-tight line-clamp-2 max-w-[70px]",children:e.away_team})]})]})]}),(0,a.jsx)("div",{className:"absolute left-1/2 -translate-x-1/2 -bottom-1 w-2 h-2 bg-white border-r border-b border-[#cbd5e1] rotate-45"})]}),document.body)]})}function d({result:e}){let t=i(e);return(0,a.jsx)("span",{className:`inline-flex h-7 w-7 items-center justify-center rounded-[8px] text-[11px] font-black ${t}`,children:e})}function x({value:e,totalTeams:t}){let s=Number(e);if(!Number.isFinite(s))return(0,a.jsx)("td",{className:"px-4 py-4 text-center font-mono font-black text-slate-400",children:e});let l=o(s,t);return(0,a.jsxs)("td",{className:"relative px-4 py-4 text-center font-mono",children:[(0,a.jsx)("span",{className:`absolute left-0 top-1/2 h-7 w-1 -translate-y-1/2 rounded-r-full ${l.bar}`}),(0,a.jsx)("span",{className:`inline-flex h-8 w-8 items-center justify-center rounded-[10px] border text-[13px] font-black ${l.badge}`,children:s})]})}function h({initialData:e}){let[t]=(0,l.useState)(!1),[s,r]=(0,l.useState)(!1),[i,p]=(0,l.useState)(""),u=(0,l.useRef)(null);if((0,l.useEffect)(()=>{function e(e){u.current&&!u.current.contains(e.target)&&r(!1)}return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[]),!e)return(0,a.jsx)("div",{className:"text-center py-20 text-slate-600",children:"Đang tải dữ liệu..."});let g=e.available_leagues||[],b=g.filter(e=>e.name.toLowerCase().includes(i.toLowerCase())),f=e.teams&&e.teams.length>0&&Array.isArray(e.teams[0]?.form),j=!f&&e.rankings;return(0,a.jsxs)("div",{className:"mx-auto max-w-[1440px] px-4 py-8",children:[(0,a.jsx)(n.V,{eyebrow:"Bảng xếp hạng",title:"BẢNG XẾP HẠNG",rightSlot:(0,a.jsx)("div",{className:"text-[12px] text-slate-600",children:(0,a.jsx)("span",{className:"text-slate-900/80 font-bold",children:e.league_name})})}),g.length>0&&(0,a.jsxs)("div",{className:"mb-6",ref:u,children:[(0,a.jsxs)("div",{className:"relative inline-flex min-w-[320px] items-center gap-3 rounded-2xl border border-slate-200 bg-white backdrop-blur-md px-5 py-3.5 cursor-pointer shadow-[0_8px_30px_rgba(0,0,0,0.06)] transition-colors hover:border-[#4681E8]/50 hover:shadow-[0_8px_30px_rgba(70,129,232,0.1)]",onClick:()=>r(!s),children:[e.league_icon&&(0,a.jsx)("img",{src:e.league_icon,alt:e.league_name||"League icon",className:"w-6 h-6 object-contain",loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-slate-800 font-bold text-sm flex-1",children:e.league_name||"Chọn giải đấu"}),(0,a.jsx)("svg",{className:`w-4 h-4 text-[#4681E8] transition-transform ${s?"rotate-180":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),s&&(0,a.jsxs)("div",{className:"absolute z-50 mt-2 w-[360px] overflow-hidden rounded-2xl border border-slate-200 bg-white backdrop-blur-xl shadow-[0_24px_80px_rgba(0,0,0,0.15)]",children:[(0,a.jsx)("div",{className:"p-2 border-b border-slate-100",children:(0,a.jsx)("input",{type:"text",placeholder:"T\xecm kiếm giải đấu...",value:i,onChange:e=>p(e.target.value),className:"w-full bg-slate-50 text-slate-800 text-sm px-4 py-2.5 rounded-xl border border-transparent outline-none focus:border-[#4681E8]/50 placeholder-slate-400 transition-colors",autoF
717ocus:!0})}),(0,a.jsxs)("div",{className:"max-h-[340px] overflow-y-auto",children:[b.map(t=>(0,a.jsxs)("a",{href:`/standings?league=${encodeURIComponent(t.id)}`,className:`flex items-center gap-3 px-4 py-3 cursor-pointer transition-colors hover:bg-slate-50 ${t.id===e.league_id?"bg-[#4681E8]/10 border-l-4 border-[#4681E8]":""}`,children:[t.icon?(0,a.jsx)("img",{src:t.icon,alt:t.name||"League",className:"w-5 h-5 object-contain flex-shrink-0",loading:"lazy",decoding:"async"}):(0,a.jsx)("div",{className:"w-5 h-5 rounded bg-gray-700 flex-shrink-0"}),(0,a.jsx)("span",{className:"text-sm text-slate-900 truncate",children:t.name})]},t.id)),0===b.length&&(0,a.jsx)("div",{className:"px-4 py-8 text-center text-gray-500 text-sm",children:"Kh\xf4ng t\xecm thấy giải đấu"})]})]})]}),t&&(0,a.jsxs)("div",{className:"flex items-center justify-center py-12",children:[(0,a.jsx)("div",{className:"animate-spin w-8 h-8 border-2 border-emerald-600 border-t-transparent rounded-full"}),(0,a.jsx)("span",{className:"ml-3 text-slate-600 text-sm",children:"Đang tải bảng xếp hạng từ server..."})]}),!t&&f&&(0,a.jsxs)("div",{className:"overflow-hidden rounded-[24px] border border-slate-200 bg-white shadow-[0_8px_30px_rgba(0,0,0,0.08)]",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between gap-3 border-b border-[#4681E8]/20 bg-gradient-to-r from-[#4681E8] to-[#2563eb] px-6 py-4 text-white shadow-[0_4px_25px_rgba(70,129,232,0.3)]",children:[(0,a.jsx)("div",{className:"text-[13px] font-black uppercase tracking-[0.2em] drop-shadow-sm text-white/80",children:"League"}),(0,a.jsx)("div",{className:"truncate text-sm font-black sm:text-base drop-shadow-md",children:e.league_name})]}),(0,a.jsx)("div",{className:"overflow-x-auto",children:(0,a.jsxs)("table",{className:"w-full text-left border-collapse",children:[(0,a.jsx)("thead",{children:(0,a.jsx)("tr",{className:"bg-slate-50 text-[11px] uppercase tracking-[0.2em] text-slate-500",children:e.header.map((t,s)=>{let l=e.teams.some(e=>e.form&&e.form.length>0);return t.toLowerCase().includes("phong độ")&&!l?null:(0,a.jsx)("th",{colSpan:s===e.header.length-1&&l?5:1,className:`p-4 font-semibold ${1===s?"w-1/3 text-left":"text-center"}`,children:t},s)})})}),(0,a.jsx)("tbody",{className:"text-sm",children:e.teams.map((t,s)=>(o(Number(t.data[0]||s+1),e.teams.length),(0,a.jsxs)("tr",{className:"group border-b border-slate-100 bg-white transition-colors hover:bg-slate-50 cursor-pointer",children:[t.data.map((s,l)=>0===l?(0,a.jsx)(x,{value:s,totalTeams:e.teams.length},l):1===l?(0,a.jsx)("td",{className:"p-4",children:(0,a.jsxs)("div",{className:"flex items-center gap-3 rounded-2xl border border-slate-100 bg-slate-50 px-4 py-2.5 transition-colors group-hover:border-[#4681E8]/30 group-hover:bg-[#4681E8]/5",children:[t.team_logo?(0,a.jsx)("img",{src:t.team_logo,alt:s,className:"h-8 w-8 rounded-full bg-white object-contain p-0.5 filter drop-shadow-[0_2px_4px_rgba(0,0,0,0.1)]",loading:"lazy"}):(0,a.jsx)("div",{className:"flex h-8 w-8 items-center justify-center rounded-full border border-slate-200 bg-white text-[10px] font-bold text-slate-400",children:"?"}),(0,a.jsx)("span",{className:"font-bold text-slate-800 transition-colors group-hover:text-[#4681E8]",children:s})]})},l):(0,a.jsx)("td",{className:"p-4 text-center font-mono text-slate-600",children:s},l)),t.form&&t.form.length>0&&(0,a.jsxs)(a.Fragment,{children:[t.form.map((e,t)=>(0,a.jsx)("td",{className:"p-2 text-center",children:e.match_time?(0,a.jsx)(c,{detail:e}):(0,a.jsx)(d,{result:e.result})},`form-${t}`)),t.form.length<5&&Array.from({length:5-t.form.length}).map((e,t)=>(0,a.jsx)("td",{className:"p-2"},`pad-${t}`))]})]},s)))})]})})]}),!t&&!f&&j&&(0,a.jsx)(m,{rankings:e.rankings}),!t&&!f&&!j&&e.header&&e.teams&&(0,a.jsx)("div",{className:"text-center py-20 text-slate-600",children:"Dữ liệu đang được cập nhật..."}),!t&&(f||j)&&(0,a.jsxs)("div",{className:"mt-6 flex flex-wrap items-center gap-5 px-5 py-4 bg-slate-50 rounded-2xl border border-slate-200",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,a.jsx)("span",{className:"w-2.5 h-2.5 rounded-full bg-emerald-500"}),(0,a.jsx)("span",{className:"text-[11px] text-slate-600 font-bold uppercase tracking-wider",children:"Đội trưởng bảng"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,a.jsx)("span",{className:"w-2.5 h-2.5 rounded-full bg-sky-4
71700"}),(0,a.jsx)("span",{className:"text-[11px] text-slate-600 font-bold uppercase tracking-wider",children:"Champions League"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,a.jsx)("span",{className:"w-2.5 h-2.5 rounded-full bg-amber-500"}),(0,a.jsx)("span",{className:"text-[11px] text-slate-600 font-bold uppercase tracking-wider",children:"Europa League"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,a.jsx)("span",{className:"w-2.5 h-2.5 rounded-full bg-[#f97316]"}),(0,a.jsx)("span",{className:"text-[11px] text-slate-600 font-bold uppercase tracking-wider",children:"Europa Conference"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,a.jsx)("span",{className:"w-2.5 h-2.5 rounded-full bg-[#E11D48]"}),(0,a.jsx)("span",{className:"text-[11px] text-slate-600 font-bold uppercase tracking-wider",children:"Xuống hạng"})]})]})]})}function m({rankings:e}){if(!e||0===e.length)return null;let t=e[0].data,s=e.slice(1);return(0,a.jsx)("div",{className:"overflow-hidden rounded-[22px] border border-[#cbd5e1] bg-[linear-gradient(180deg,#191a20,#111218)] shadow-[0_24px_80px_rgba(0,0,0,0.4)]",children:(0,a.jsx)("div",{className:"overflow-x-auto",children:(0,a.jsxs)("table",{className:"w-full text-left border-collapse",children:[(0,a.jsx)("thead",{children:(0,a.jsx)("tr",{className:"bg-white text-[11px] uppercase tracking-[0.18em] text-slate-600",children:t.map((e,l)=>{let r=l===t.length-1,n=s[0]&&s[0].data.length>t.length?s[0].data.length-t.length+1:1;return(0,a.jsx)("th",{colSpan:r?n:1,className:`p-4 font-semibold ${1===l?"w-1/3 text-left":"text-center"}`,children:e},l)})})}),(0,a.jsx)("tbody",{className:"text-sm",children:s.map((e,t)=>(0,a.jsx)("tr",{className:"group border-b border-[#cbd5e1] transition-colors hover:bg-white",children:e.data.map((t,l)=>0===l?(0,a.jsx)(x,{value:t,totalTeams:s.length},l):1===l?(0,a.jsx)("td",{className:"p-4",children:(0,a.jsxs)("div",{className:"flex items-center gap-3 rounded-2xl border border-white/6 bg-[linear-gradient(180deg,rgba(255,255,255,0.03),rgba(255,255,255,0.01))] px-3 py-2 transition-colors group-hover:border-emerald-600/22",children:[e.team_logo?(0,a.jsx)("img",{src:e.team_logo,alt:t,className:"h-8 w-8 rounded-full bg-white/5 object-contain ring-1 ring-white/8",loading:"lazy"}):(0,a.jsx)("div",{className:"flex h-8 w-8 items-center justify-center rounded-full border border-gray-700 bg-gray-800 text-xs font-bold text-gray-500",children:"?"}),(0,a.jsx)("span",{className:"font-bold text-slate-900 transition-colors group-hover:text-emerald-600",children:t})]})},l):["W","D","L"].includes(t)?(0,a.jsx)("td",{className:"p-2 text-center",children:(0,a.jsx)("span",{className:`inline-flex h-7 w-7 items-center justify-center rounded-[8px] text-[11px] font-black ${i(t)}`,children:t})},l):(0,a.jsx)("td",{className:"p-4 text-center font-mono text-slate-600",children:t},l))},t))})]})})})}},78686:()=>{},78736:(e,t,s)=>{"use strict";s.d(t,{LiveMatchesClient:()=>m});var a=s(68019),l=s(10707);function r({activeSport:e,onSportChange:t,activeStatus:s,onStatusChange:l,matchesCount:n}){return(0,a.jsxs)("div",{className:"mb-5 flex flex-col gap-3",children:[(0,a.jsx)("div",{className:"flex items-center gap-2 overflow-x-auto pb-1 scrollbar-hide",children:[{id:"1",label:"B\xd3NG Đ\xc1",icon:"⚽"},{id:"2",label:"B\xd3NG RỔ",icon:"\uD83C\uDFC0"},{id:"5",label:"TENNIS",icon:"\uD83C\uDFBE"},{id:"4",label:"CẦU L\xd4NG",icon:"\uD83C\uDFF8"},{id:"3",label:"B\xd3NG CHUYỀN",icon:"\uD83C\uDFD0"},{id:"6",label:"B\xd3NG B\xc0N",icon:"\uD83C\uDFD3"}].map(s=>{let l=e===s.id;return(0,a.jsxs)("button",{type:"button",onClick:()=>t(s.id),className:`flex items-center gap-2 px-4 py-2.5 rounded-xl font-bold text-[12px] whitespace-nowrap transition-all duration-200 border cursor-pointer ${l?"bg-[#4681E8]/10 text-[#4681E8] border-[#4681E8]/40 shadow-[0_0_15px_rgba(70,129,232,0.1)]":"bg-white text-slate-500 border-slate-200 hover:text-slate-700 hover:border-[#4681E8]/30"}`,children:[(0,a.jsx)("span",{className:"text-[14px]",children:s.icon}
717),(0,a.jsx)("span",{className:"tracking-wider uppercase",children:s.label})]},s.id)})}),(0,a.jsx)("div",{className:"flex items-center gap-1 overflow-x-auto pb-1 scrollbar-hide bg-white rounded-xl p-1.5 border border-slate-200",children:[{id:"all",label:"TẤT CẢ",keyCount:"all"},{id:"live",label:"TRỰC TIẾP",keyCount:"live"},{id:"hot",label:"HOT",keyCount:"hot"},{id:"today",label:"H\xd4M NAY",keyCount:"today"},{id:"tomorrow",label:"NG\xc0Y MAI",keyCount:"tomorrow"}].map(e=>{let t=s===e.id,r=n[e.keyCount]||0;return(0,a.jsxs)("button",{type:"button",onClick:()=>l(e.id),className:`relative px-4 py-2 font-bold text-[12px] whitespace-nowrap transition-all duration-200 uppercase tracking-wider flex items-center gap-2 rounded-lg cursor-pointer ${t?"bg-[#4681E8]/10 text-[#4681E8] shadow-inner":"text-slate-500 hover:text-slate-700 hover:bg-[#4681E8]/5"}`,children:["live"===e.id&&t&&(0,a.jsx)("span",{className:"w-1.5 h-1.5 rounded-full bg-[#4681E8] animate-pulse shadow-[0_0_6px_rgba(70,129,232,0.8)]"}),(0,a.jsx)("span",{children:e.label}),(0,a.jsx)("span",{className:`px-1.5 py-0.5 rounded text-[10px] font-black ${t?"bg-[#4681E8]/20 text-[#4681E8]":"text-slate-400"}`,children:r})]},e.id)})})]})}function n(){return"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='10' fill='%2364748B' fill-opacity='0.18'/%3E%3C/svg%3E"}function i({match:e,isLoading:t=!1}){if(t||!e)return(0,a.jsx)("div",{className:"animate-pulse bg-white h-[64px] w-full border-b border-slate-100"});let s=new Date(1e3*parseInt(e.time||0,10)).toLocaleTimeString("vi-VN",{hour:"2-digit",minute:"2-digit",timeZone:"Asia/Ho_Chi_Minh"}),l=function(e,t){if("1"===t||"2"===t)switch(e){case"1":default:return{text:"Sắp diễn",isLive:!1,showScore:!1};case"2":return{text:"H1",isLive:!0,showScore:!0};case"3":return{text:"HT",isLive:!0,showScore:!0};case"4":return{text:"H2",isLive:!0,showScore:!0};case"5":return{text:"Phụ",isLive:!0,showScore:!0};case"7":return{text:"Pen",isLive:!0,showScore:!0};case"8":case"9":return{text:"FT",isLive:!1,showScore:!0}}switch(e){case"0":case"1":return{text:"Sắp diễn",isLive:!1,showScore:!1};case"51":return{text:"S1",isLive:!0,showScore:!0};case"52":return{text:"S2",isLive:!0,showScore:!0};case"53":return{text:"S3",isLive:!0,showScore:!0};case"54":return{text:"S4",isLive:!0,showScore:!0};case"55":return{text:"S5",isLive:!0,showScore:!0};case"100":case"90":case"91":case"110":return{text:"FT",isLive:!1,showScore:!0};default:return{text:"LIVE",isLive:!0,showScore:!0}}}(String(e.status_id),String(e.sport_id)),r=e.time_text||e.source_card_meta?.time_text||"",o=l.isLive,c=e.home_score??"-",d=e.away_score??"-",x=e.home_logo||n(),h=e.away_logo||n();return(0,a.jsxs)("a",{href:`/match/${encodeURIComponent(e.post_name||e.id)}`,className:"flex items-center w-full group border-b border-slate-100 bg-white hover:bg-[#4681E8]/5 transition-colors min-h-[64px]",children:[(0,a.jsx)("div",{className:`w-[60px] flex flex-col items-center justify-center shrink-0 h-full border-r ${o?"border-[#4681E8]/30 bg-[#4681E8]/5":"border-slate-100"}`,children:o?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"text-[#4681E8] font-bold text-[11px] uppercase tracking-wider tabular-nums leading-none",children:r||l.text}),(0,a.jsx)("span",{className:"w-1.5 h-1.5 rounded-full bg-[#4681E8] animate-pulse mt-1"})]}):(0,a.jsx)("span",{className:"text-slate-500 font-medium text-[12px]",children:s})}),(0,a.jsxs)("div",{className:"flex-1 flex flex-col justify-center px-3 py-2 gap-1.5 min-w-0",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between w-full",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2.5 min-w-0 overflow-hidden",children:[(0,a.jsx)("img",{src:x,alt:e.home_name,className:"w-4 h-4 shrink-0 object-contain",onError:e=>e.currentTarget.src=n(),loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-[13px] font-semibold truncate text-slate-800",children:e.home_name})]}),l.showScore&&(0,a.jsx)("span",{className:`text-[15px] font-black tabular-nums shrink-0 ml-2 ${o?"text-[#4681E8]":"text-slate-700"}`,children:c})]}),(0,a.jsxs)("div",{className:"flex items-center justify-between w-full",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2.5 min-w-0 overflow-hidden",children:[(0,a.jsx)("img",{src:h,alt:e.away_name,className:"w-4 h-4 shrink-0 object-contain",onError:e=>e.currentTarget.src=n(),loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-[13px] font-semibold truncate text-slate-800",children:e.away_name})]}),l.showScore&&(0,a.jsx)("span",{className:`text-[15px] font-black tabular-nums shrink-0 ml-2 ${o?"text-[#4681E8]":"text-slate-700"}`,children:d})]})]}),(0,a.jsx)("div",{className:"w-[48px] h-full flex items-center justify-center shrink-0 text-slate-300 group-hover:text-[#4681E8] transition-colors border-l border-slate-100",children:(0,a.jsx)("svg",{className:"w-5 h-5 fill-current",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{d:"M8 5v14l11-7z"})})})]})}let o=new Set(["1","2","3","4","5","7"]),c=new Set(["8","9","15"]),d=new Set(["51","52","53","54","5
7175","56","57","58","59"]),x=new Set(["100","90","91","92","93","110"]);function h(e){let t=String(e.status_id);return 2>=parseInt(e.sport_id)?o.has(t):d.has(t)}function m({matches:e,matchIndex:t}){let[s,n]=(0,l.useState)("1"),[o,d]=(0,l.useState)("all"),[p,u]=(0,l.useState)(1);(0,l.useEffect)(()=>{u(1)},[s,o]);let{todayStart:g,tomorrowStart:b,dayAfterStart:f}=(0,l.useMemo)(()=>{let e,t,s,{vnTodayStartUTC:a,vnTomorrowStartUTC:l,vnDayAfterStartUTC:r}=(s=(t=Math.floor(Date.UTC((e=new Date(Date.now()+252e5)).getUTCFullYear(),e.getUTCMonth(),e.getUTCDate())/1e3)-25200)+86400,{vnTodayStartUTC:t,vnTomorrowStartUTC:s,vnDayAfterStartUTC:s+86400});return{todayStart:a,tomorrowStart:l,dayAfterStart:r}},[]),j=(0,l.useMemo)(()=>new Map(e.map(e=>[e?.match_key?String(e.match_key):e?.ls_id?String(e.ls_id):e?.id?`${String(e.sport_id||"0")}:${String(e.id)}`:e?.scheduleId?`${String(e.sport_id||"0")}:schedule:${String(e.scheduleId)}`:[String(e?.sport_id||"0"),String(e?.time||"0"),String(e?.home_name||""),String(e?.away_name||"")].join(":"),e])),[e]),w=t?.summary_by_sport?.[s],v=t?.bucket_keys_by_sport?.[s],N=t?.bucket_pages_by_sport?.[s],y=e.filter(e=>{let t;return String(e.sport_id)===s&&(t=String(e.status_id),2>=parseInt(e.sport_id)?!c.has(t):!x.has(t))}),_=y.filter(e=>{let t=parseInt(e.time);return t>=g&&t<b}),k=y.filter(e=>{let t=parseInt(e.time);return t>=b&&t<f}),E={all:y.length,live:y.filter(e=>h(e)).length,hot:y.filter(e=>"1"===String(e.hot)).length,today:_.length,tomorrow:k.length},C=(0,l.useMemo)(()=>{if(v){if("all"===o&&Array.isArray(N?.all)&&N.all.length>0)return N.all.slice(0,p).flat().map(e=>j.get(e)).filter(Boolean);let e=v[o];if(Array.isArray(e))return e.map(e=>j.get(e)).filter(Boolean)}return"all"===o?y:"live"===o?y.filter(e=>h(e)):"hot"===o?y.filter(e=>"1"===String(e.hot)):"today"===o?_:"tomorrow"===o?k:y},[o,y,j,N,v,_,k,p]),S="all"===o&&Array.isArray(N?.all)&&p<N.all.length,L=(0,l.useMemo)(()=>"all"!==o&&"live"!==o&&"hot"!==o?[]:C.filter(e=>"1"===String(e.hot)||h(e)).slice(0,4),[C,o]),$=(0,l.useMemo)(()=>{let e=new Map;
717return C.forEach(t=>{let s=t.source_card_meta?.league_label||t.match_data?.competition_vi||t.match_data?.competition_name||t.match_data?.competition_full||"Giải đấu kh\xe1c";e.has(s)||e.set(s,[]),e.get(s).push(t)}),Array.from(e.entries())},[C]);return(0,a.jsxs)("div",{className:"w-full min-h-[500px]",children:[(0,a.jsx)(r,{activeSport:s,onSportChange:n,activeStatus:o,onStatusChange:d,matchesCount:w||E}),0===C.length?(0,a.jsx)("div",{className:"py-20 text-center",children:(0,a.jsx)("div",{className:"text-slate-400 text-base font-medium",children:"Kh\xf4ng c\xf3 trận đấu n\xe0o."})}):(0,a.jsxs)("div",{className:"flex flex-col gap-6",children:[L.length>0&&"all"===o&&(0,a.jsxs)("div",{className:"mb-4",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 mb-3 px-1",children:[(0,a.jsx)("span",{className:"w-2 h-4 rounded-full bg-[#4681E8]"}),(0,a.jsx)("h2",{className:"text-slate-800 font-black text-sm uppercase tracking-wider",children:"Trận đấu t\xe2m điểm"})]}),(0,a.jsx)("div",{className:"grid grid-cols-1 xl:grid-cols-2 gap-2",children:L.map((e,t)=>(0,a.jsx)(i,{match:e},`featured-${e.ls_id||e.id}-${t}`))})]}),(0,a.jsx)("div",{className:"flex flex-col gap-5",children:$.map(([e,t])=>{let s=t[0]?.match_data?.competition_logo;return(0,a.jsxs)("div",{className:"rounded-xl overflow-hidden border border-slate-200 bg-white shadow-sm",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2.5 bg-[#0E1B33] px-4 py-2.5 border-b border-[#0E1B33]",children:[s&&(0,a.jsx)("img",{src:s,alt:"league",className:"w-4 h-4 object-contain brightness-200 opacity-80",loading:"lazy",decoding:"async"}),(0,a.jsx)("h3",{className:"text-white text-[12px] font-bold uppercase tracking-wider truncate",children:e})]}),(0,a.jsx)("div",{className:"flex flex-col",children:t.map((e,t)=>(0,a.jsx)(i,{match:e},e.ls_id||`${e.id}-${t}`))})]},e)})}),S&&(0,a.jsx)("div",{className:"flex justify-center mt-6",children:(0,a.jsx)("button",{type:"button",onClick:()=>u(e=>e+1),className:"inline-flex items-center justify-center rounded-xl border border-[#4681E8]/30 bg-white px-8 py-3 text-[12px] font-bold uppercase tracking-wider text-[#4681E8] transition-all duration-200 hover:bg-[#4681E8] hover:text-white hover:border-[#4681E8]",children:"Tải th\xeam"})})]})]})}},79400:(e,t,s)=>{"use strict";s.d(t,{Klivevip19ResultsPage:()=>o});var a=s(68019),l=s(10707),r=s(78637),n=s(75627),i=s(23719);function o({initialData:e,selectedLeague:t}){let s=(0,r.useRouter)(),c=(0,r.usePathname)(),d=(0,r.useSearchParams)(),[x,h]=(0,l.useTransition)(),[m,p]=(0,l.useState)(!1),[u,g]=(0,l.useState)(""),{availableLeagues:b,dateGroups:f}=(0,l.useMemo)(()=>(0,i.o8)(e),[e]),j=(0,l.useMemo)(()=>Array.from(new Set(f.map(e=>e.date_header))),[f]),w=d.get("date")||"",v=e=>{let t=new URLSearchParams(d.toString());e&&e!==w?t.set("date",e):t.delete("date"),h(()=>{let e=t.toString();s.push(e?`${c}?${e}`:c,{scroll:!1})})},N=(0,l.useMemo)(()=>{let e=f;return w&&(e=e.filter(e=>e.date_header===w)),(0,i.kK)(e,t)},[f,w,t]),y=(0,l.useMemo)(()=>{if(!u)return b;let e=u.toLowerCase();return b.filter(t=>t.name.toLowerCase().includes(e))},[b,u]),_=N.reduce((e,t)=>e+t.matches.length,0);if(0===f.length)return(0,a.jsxs)("div",{className:"max-w-[1440px] mx-auto px-4 py-8",children:[(0,a.jsx)(n.R,{eyebrow:"Kết quả",title:"KẾT QUẢ B\xd3NG Đ\xc1"}),(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center py-16 gap-4",children:[(0,a.jsx)("div",{className:"w-12 h-12 rounded-full border-2 border-[#E11D48]/30 border-t-[#E11D48] animate-spin"}),(0,a.jsx)("span",{className:"text-slate-500 text-sm font-medium tracking-wide",children:"Đang tải kết quả..."})]})]});let k=e=>{let t=new URLSearchParams(d.toString());e?t.set("league",e):t.delete("league"),p(!1),g(""),h(()=>{let e=t.toString();s.push(e?`${c}?${e}`:c,{scroll:!1})})};return(0,a.jsxs)("div",{className:"max-w-[1440px] mx-auto px-4 py-8",children:[(0,a.jsx)(n.R,{eyebrow:"Kết quả",title:"KẾT QUẢ B\xd3NG Đ\xc1",rightSlot:(0,a.jsx)("div",{className:"text-[12px] text-slate-600",children:(0,a.jsx)("span",{className:"text-slate-900/80 font-bold",children:t||"Tất cả giải đấu"})})}),(0,a.jsxs)("div",{className:"flex flex-col md:flex-row gap-4 mb-4 items-start md:items-center justify-between",children:[j.length>0&&(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,a.jsx)("button",{type:"button",onClick:()=>v(""),className:`px-4 py-2 rounded-xl text-sm font-bold transition-all duration-300 ${!w?"bg-gradient-to-r from-[#4681E8] to-[#2563eb] text-white shadow-[0_4px_15px_rgba(70,129,232,0.4)] border border-[#4681E8]/50":"bg-white text-[#64748B] border border-slate-200 hover:bg-slate-50 hover:text-slate-800"}`,children:"Tất cả ng\xe0y"}),j.slice(0,5).map(e=>(0,a.jsx)("button",{type:"button",onClick:()=>v(e),className:`px-4 py-2 rounded-xl text-sm font-bold transition-all duration-300 ${w===e?"bg-gradient-to-r from-[#4681E8] to-[#2563eb] text-white shadow-[0_4px_15px_rgba(70,129,232,0.4)] border border-[#4681E8]/50":"bg-white text-[#64748B] border border-slate-200 hover:bg-slate-50 hover:text-slate-800"}`,children:e},e))]}),(0,a.jsxs)("div",{className:"relative w-full md:w-[320px]",children:[(0,a.jsxs)("button",{onClick:()=>p(!m),className:"w-full flex items-center gap-3 bg-white hover:bg-slate-50 px-4 py-2.5 rounded-xl border border-slate-200 shadow-inner transition-all text-sm",children:[(0,a.jsx)("svg",{className:"w-5 h-5 text-[#4681E8]",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 4a1 1 0 011-1h16a1 1 0 011 1v2.586a1 1 0 01-.293.707l-6.414 6.414a1 1 0 00-.293.707V17l-4 4v-6.586a1 1 0 00-.293-.707L3.293 7.293A1 1 0 013 6.586V4z"})}),(0,a.jsx)("span",{className:"text-slate-700 font-bold flex-1 text-left truncate",children:t||"Chọn giải đấu..."}),(0,a.jsx)("svg",{className:`w-4 h-4 text-slate-400 transition-transform ${m?"rotate-180":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),m&&(0,a.jsxs)("div",{className:"absolute top-full left-0 right-0 mt-2 bg-white border border-slate-200 rounded-2xl shadow-xl z-50 max-h-[300px] overflow-hidden flex flex-col",children:[(0,a.jsx)("div",{className:"p-2 border-b border-slate-100",children:(0,a.jsx)("input",{type:"text",placeholder:"T\xecm giải đấu...",value:u,onChange:e=>g(e.target.value),className:"w-full bg-slate-50 border border-transparent roun
717ded-xl px-4 py-2.5 text-sm text-slate-800 placeholder-slate-400 outline-none focus:border-[#4681E8]/50 transition-colors"})}),(0,a.jsxs)("div",{className:"overflow-y-auto flex-1 pb-2",children:[(0,a.jsx)("button",{type:"button",onClick:()=>k(),className:`block w-full text-left px-4 py-3 text-sm transition-colors ${!t?"bg-[#4681E8]/10 text-[#4681E8] border-l-4 border-[#4681E8]":"text-slate-600 hover:bg-slate-50 hover:text-slate-800"}`,children:"Tất cả giải đấu"}),y.map((e,s)=>(0,a.jsxs)("button",{type:"button",onClick:()=>k(e.name),className:`flex items-center gap-3 px-4 py-3 text-sm transition-colors cursor-pointer ${t===e.name?"bg-[#4681E8]/10 text-[#4681E8] border-l-4 border-[#4681E8]":"text-slate-600 hover:bg-slate-50 hover:text-slate-800"}`,children:[e.icon?(0,a.jsx)("img",{src:e.icon,alt:e.name||"League",className:"w-5 h-5 object-contain shrink-0",loading:"lazy",decoding:"async"}):(0,a.jsx)("div",{className:"w-5 h-5 rounded-md bg-slate-200 shrink-0"}),(0,a.jsx)("span",{className:"truncate",children:e.name})]},s))]})]})]})]}),x&&(0,a.jsxs)("div",{className:"mb-4 inline-flex items-center gap-2 rounded-full border border-slate-200 bg-white px-4 py-2 text-xs text-slate-500 shadow-sm",children:[(0,a.jsx)("span",{className:"h-2 w-2 rounded-full bg-[#E11D48] animate-pulse shadow-[0_0_8px_rgba(225,29,72,0.8)]"}),(0,a.jsx)("span",{className:"font-bold tracking-wide",children:"Đang tải kết quả từ server..."})]}),(0,a.jsx)("div",{className:"space-y-4",children:0===N.length?(0,a.jsx)("div",{className:"text-center py-16 text-[#64748B] font-medium tracking-wide",children:"Kh\xf4ng c\xf3 kết quả n\xe0o"}):N.map((e,t)=>(0,a.jsxs)("div",{className:"overflow-hidden rounded-2xl border border-slate-200 bg-white shadow-[0_8px_30px_rgba(0,0,0,0.06)]",children:[(0,a.jsx)("div",{className:"bg-slate-50 px-5 py-3 border-b border-slate-100 flex items-center justify-between",children:(0,a.jsxs)("span",{className:"text-[12px] text-slate-500 font-bold uppercase tracking-widest",children:[e.league_round?e.league_round:"V\xf2ng đấu",(0,a.jsx)("span",{className:"text-[#E11D48] ml-2 font-mono text-[11px] bg-[#E11D48]/10 px-2 py-0.5 rounded-full border border-[#E11D48]/20",children:e.date_header})]})}),e.matches.map((e,t)=>{var s;return(0,a.jsx)("div",{className:"bg-transparent hover:bg-slate-50 border-b border-slate-100 last:border-0 transition-colors group cursor-default",children:(0,a.jsxs)("div",{className:"flex items-center py-4 px-5 gap-4",children:[(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center min-w-[56px] shrink-0 border-r border-slate-100 pr-4",children:[(0,a.jsx)("span",{className:"text-[9px] text-slate-400 uppercase tracking-widest mb-1 font-bold",children:"L\xfac"}),(0,a.jsx)("span",{className:"text-[13px] text-slate-700 font-mono font-black",children:e.time})]}),(0,a.jsxs)("div",{className:"flex-1 flex items-center justify-end gap-3 min-w-0",children:[(0,a.jsx)("span",{className:"text-[14px] text-slate-800 font-bold truncate text-right group-hover:text-slate-900 transition-colors",children:e.home_team}),e.home_logo?(0,a.jsx)("div",{className:"w-8 h-8 rounded-full bg-slate-100 border border-slate-200 p-1 flex items-center justify-center shadow-sm",children:(0,a.jsx)("img",{src:e.home_logo,alt:e.home_team||"Home team",className:"w-full h-full object-contain",loading:"lazy"})}):(0,a.jsx)("div",{className:"w-8 h-8 rounded-full bg-slate-100 shrink-0 border border-slate-200 flex items-center justify-center text-[10px] font-bold text-slate-400",children:"?"})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center min-w-[90px] shrink-0 bg-slate-50 rounded-xl py-2 px-2 border border-slate-200 shadow-inner group-hover:border-[#4681E8]/40 transition-colors",children:[(0,a.jsx)("span",{className:`text-[22px] leading-none font-black tracking-widest drop-shadow-[0_2px_4px_rgba(0,0,0,0.8)] ${!(s=e.score)||"-"===s?"text-slate-400":"text-slate-800"}`,children:e.score}),e.ht_score&&(0,a.jsxs)("span",{className:"text-[10px] text-slate-500 font-mono mt-1 font-bold",children:["HT: ",e.ht_score]})]}),(0,a.jsxs)("div",{className:"flex-1 flex items-center gap-3 min-w-0",children:[e.away_logo?(0,a.jsx)("div",{className:"w-8 h-8 rounded-full bg-slate-100 border border-slate-200 p-1 flex items-center justify-center shadow-sm",children:(0,a.jsx)("img",{src:e.away_logo,alt:e.away_team||"Away team",className:"w-full h-full object-contain",loading:"lazy"})}):(0,a.jsx)("div",{className:"w-8 h-8 rounded-full bg-slate-100 shrink-0 border border-slate-200 flex items-center justify-center text-[10px] font-bold text-slate-400",children:"?"}),(0,a.jsx)("span",{className:"text-[14px] text-slate-800 font-bold truncate text-left group-hover:text-slate-900 transition-colors",children:e.away_team})]})]})},t)})]},t))}),(0,a.jsxs)("div",{className:"mt-6 text-center text-xs text-[#64748B] font-bold uppercase tracking-widest drop-shadow-sm",children:["Hiển thị ",_," kết quả trận đấu"]})]})}},79623:(e,t,s)=>{"use strict";s.d(t,{c:()=>r});var a=s(68019),l=s(70508);
717function r({eyebrow:e,title:t,titleAddon:s,rightSlot:n,className:i}){return(0,a.jsx)("div",{className:(0,l.cn)("relative mb-5 overflow-hidden border-b border-slate-200",i),children:(0,a.jsxs)("div",{className:"flex items-center justify-between px-1 py-4 min-h-[56px]",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 min-w-0",children:[(0,a.jsx)("span",{className:"h-8 w-1 shrink-0 rounded-sm bg-gradient-to-b from-[#4681E8] to-[#55CAF1] shadow-[0_0_10px_rgba(70,129,232,0.5)]"}),(0,a.jsxs)("div",{className:"min-w-0",children:[e&&(0,a.jsx)("div",{className:"text-[10px] font-bold uppercase tracking-[0.2em] text-[#4681E8]/60 mb-0.5",children:e}),(0,a.jsxs)("div",{className:"flex items-center gap-2.5 flex-wrap",children:[(0,a.jsx)("h1",{className:"text-[18px] sm:text-[22px] font-black uppercase tracking-tight text-slate-800 leading-none",children:t}),s]})]})]}),n&&(0,a.jsx)("div",{className:"hidden sm:flex items-center gap-2 text-right shrink-0 ml-4",children:n})]})})}},80430:(e,t,s)=>{"use strict";s.d(t,{Klivevip03MatchDetailPage:()=>m});var a=s(68019),l=s(10707),r=s(58420);function n({src:e,poster:t,autoPlay:s=!0,onError:i,className:o=""}){let c=(0,l.useRef)(null),d=(0,l.useRef)(i);d.current=i;let[x,h]=(0,l.useState)(!1),[m,p]=(0,l.useState)(!1);return((0,l.useEffect)(()=>{let t=c.current;if(!t)return;let a=null;h(!1);let l=()=>p(!0),n=()=>p(!1);t.addEventListener("play",l),t.addEventListener("pause",n);let i=()=>{s&&(t.muted=!0,t.play().catch(()=>{}))};if(t.addEventListener("canplay",i),r.Ay.isSupported()){(a=new r.Ay({maxBufferLength:30,maxMaxBufferLength:60,lowLatencyMode:!0,enableWorker:!0})).loadSource(e),a.attachMedia(t),a.on(r.Ay.Events.MANIFEST_PARSED,()=>{s&&(t.muted=!0,t.play().catch(e=>{console.warn("AutoPlay failed:",e),t.muted=!1}))});let l=0,n=0;a.on(r.Ay.Events.ERROR,(e,t)=>{if(t.type===r.Ay.ErrorTypes.NETWORK_ERROR&&(++l>2||t.response&&t.response.code>=400)){console.error("HLS Network Error threshold reached (CORS/404), triggering fallback.",t),h(!0),d.current&&d.current(t),a?.destroy();return}if(t.fatal)switch(t.type){case r.Ay.ErrorTypes.NETWORK_ERROR:console.error("HLS Fatal Network Error, recovering...",t),a?.startLoad();break;case r.Ay.ErrorTypes.MEDIA_ERROR:console.error("HLS Media Error, recovering...",t),++n>3?(console.error("HLS Media Error threshold reached, triggering fallback."),h(!0),d.current&&d.current(t),a?.destroy()):a?.recoverMediaError();break;default:console.error("HLS Fatal Error:",t),h(!0),d.current&&d.current(t),a?.destroy()}})}else t.canPlayType("application/vnd.apple.mpegurl")&&(t.src=e,t.addEventListener("loadedmetadata",()=>{s&&t.play().catch(e=>{console.warn("AutoPlay failed:",e)})}),t.addEventListener("error",e=>{h(!0),d.current&&d.current(e)}));return()=>{t.removeEventListener("play",l),t.removeEventListener("pause",n),t.removeEventListener("canplay",i),a&&a.destroy()}},[e,s]),x)?i?null:(0,a.jsxs)("div",{className:`w-full h-full flex flex-col items-center justify-center bg-white/80 backdrop-blur ${o}`,children:[(0,a.jsx)("svg",{className:"w-12 h-12 text-red-500 mb-4 opacity-80",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"})}),(0,a.jsx)("div",{className:"text-slate-600 text-sm font-medium",children:"Video/Stream kh\xf4ng khả dụng hoặc bị lỗi mạng"}),(0,a.jsx)("div",{className:"text-gray-500 text-xs mt-1",children:"Vui l\xf2ng thử lại sau hoặc chọn nguồn kh\xe1c"})]}):(0,a.jsx)("div",{className:`relative group w-full h-full bg-white flex items-center justify-center overflow-hidden ${o}`,children:(0,a.jsx)("video",{ref:c,className:"w-full h-full object-contain",controls:!0,playsInline:!0,muted:s,poster:t,referrerPolicy:"no-referrer"})})}function i(e){let t=(e||"").split(/[\s-]+/).slice(0,2).map(e=>e[0]||"").join("").toUpperCase()||"??";return`data:image/svg+xml,${encodeURIComponent(`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 80 80"><rect width="80" height="80" rx="20" fill="#1a1c25"/><text x="40" y="47" font-size="20" font-family="Arial" font-weight="700" text-anchor="middle" fill="#666">${t}</text></svg>`)}`}function o({homeName:e,awayName:t,homeLogo:s,awayLogo:l,homeScore:r="0",awayScore:n="0",statusText:c="LIVE",timeText:d="",isLive:x=!0,sportId:h="1",matchId:m}){let p=s||i(e),u=l||i(t),g="5"===String(h),b="2"===String(h),f="bg-slate-200 border-slate-200",j="repeating-linear-gradient(90deg, transparent, transparent 10%, #000 10%, #000 20%)";return g?(f="bg-slate-100 border-slate-200",j="none"):b&&(f="bg-[#bc7a46] border-[#8a4e21]",j="repeating-linear-gradient(90deg, transparent, transparent 5%, #000 5%, #000 10%)"),(0,a.jsxs)("div",{className:"relative w-full aspect-video min-h-[300px] max-h-[600px] bg-slate-50 overflow-hidden flex flex-col justify-center",children:[(0,a.jsx)("div",{className:"absolute inset-0 flex items-center justify-center pointer-events-none mt-16 md:mt-24",children:(0,a.jsx)("div",{className:"relative w-[120%] h-[120%] sm:w-[90%] sm:h-[120%] max-w-[900px] flex-shrink-0 transition-transform duration-1000",style:{transform:"perspective(900px) rotateX(60deg) scale(0.9)",transformOrigin:"center center"},children:(0,a.jsxs)("div",{className:`absolute inset-0 ${f} shadow-[0_30px_60px_rgba(0,0,0,0.8)] border-4 rounded-xl overflow-hidden flex transition-colors duration-500`,children:[(0,a.jsx)("div",{className:"absolute inset-0 opacity-15 pointer-events-none",style:{backgroundImage:j}}),(0,a.jsxs)("div",{className:"absolute inset-[4%] pointer-events-none shadow-sm flex items-center justify-center",children:["1"===String(h)&&(0,a.jsxs)("div",{className:"absolute inset-0 w-full h-full border-2 border-white/60",children:[(0,a.jsx)("div",{className:"absolute left-1/2 top-0 bottom-0 w-0 border-l-2 border-white/60 -translate-x-1/2"}),(0,a.jsx)("div",{className:"absolute left-1/2 top-1/2 w-[18%] aspect-square rounded-full border-2 border-white/60 -translate-x-1/2 -translate-y-1/2"}),(0,a.jsx)("div",{className:"absolute left-1/2 top-1/2 w-2 h-2 rounded-full bg-white/80 -translate-x-1/2 -translate-y-1/2"}),(0,a.jsx)("div",{className:"absolute left-0 top-1/2 w-[16%] h-[46%] border-2 border-l-0 border-white/60 -translate-y-1/2 bg-slate-200"}),(0,a.jsx)("div",{className:"absolute left-0 top-1/2 w-[6%] h-[20%] border-2 border-l-0 border-white/60 -translate-y-1/2 bg-slate-200"}),(0,a.jsx)("div",{className:"absolute left-[16%] top-1/2 w-[8%] aspect-square border-2 border-l-0 border-white/60 rounded-r-full -translate-y-1/2 clip-path-half",style:{clipPath:"inset(0 0 0 50%)"}}),(0,a.jsx)("div",{className:"absolute right-0 top-1/2 w-[16%] h-[46%] border-2 border-r-0 border-white/60 -translate-y-1/2 bg-slate-200"}),(0,a.jsx)("div",{className:"absolute right-0 top-1/2 w-[6%] h-[20%] border-2 border-r-0 border-white/60 -translate-y-1/2 bg-slate-200"}),(0,a.jsx)("div",{className:"absolute right-[16%] top-1/2 w-[8%] aspect-square border-2 border-r-0 border-white/60 rounded-l-full -translate-y-1/2 clip-path-half",style:{clipPath:"inset(0 50% 0 0)"}})]}),g&&(0,a.jsxs)("div",{className:"absolute inset-[10%] w-[80%] h-[80%
717] border-2 border-white/80 bg-white",children:[(0,a.jsx)("div",{className:"absolute top-[10%] bottom-[10%] left-0 right-0 border-y-2 border-white/80"}),(0,a.jsx)("div",{className:"absolute left-1/2 top-[-2%] bottom-[-2%] w-1 bg-white/40 shadow-xl -translate-x-1/2 z-10"}),(0,a.jsx)("div",{className:"absolute left-[25%] right-[25%] top-[10%] bottom-[10%] border-x-2 border-white/80"}),(0,a.jsx)("div",{className:"absolute left-[25%] right-[25%] top-1/2 w-[50%] border-t-2 border-white/80 -translate-y-1/2"}),(0,a.jsx)("div",{className:"absolute left-0 top-1/2 w-[2%] border-t-2 border-white/80 -translate-y-1/2"}),(0,a.jsx)("div",{className:"absolute right-0 top-1/2 w-[2%] border-t-2 border-white/80 -translate-y-1/2"})]}),b&&(0,a.jsxs)("div",{className:"absolute inset-0 w-full h-full border-2 border-white/50",children:[(0,a.jsx)("div",{className:"absolute left-1/2 top-0 bottom-0 w-0 border-l-2 border-white/50 -translate-x-1/2"}),(0,a.jsx)("div",{className:"absolute left-1/2 top-1/2 w-[15%] aspect-square rounded-full border-2 border-white/50 -translate-x-1/2 -translate-y-1/2"}),(0,a.jsx)("div",{className:"absolute left-0 top-1/2 w-[18%] h-[35%] border-2 border-l-0 border-white/50 -translate-y-1/2 bg-[#bc7a46]"}),(0,a.jsx)("div",{className:"absolute left-[18%] top-1/2 w-[10%] aspect-square rounded-full border-2 border-white/50 -translate-y-1/2"}),(0,a.jsx)("div",{className:"absolute left-0 top-1/2 w-[30%] h-[70%] border-2 border-l-0 border-white/50 rounded-r-full -translate-y-1/2 opacity-60"}),(0,a.jsx)("div",{className:"absolute right-0 top-1/2 w-[18%] h-[35%] border-2 border-r-0 border-white/50 -translate-y-1/2 bg-[#bc7a46]"}),(0,a.jsx)("div",{className:"absolute right-0 top-1/2 w-[30%] h-[70%] border-2 border-r-0 border-white/50 rounded-l-full -translate-y-1/2 opacity-60"})]})]}),x&&(0,a.jsx)("div",{className:`absolute left-1/2 top-1/2 shadow-[0_8px_16px_rgba(0,0,0,0.8)] z-10 transition-all duration-[3000ms] border-2 border-white/20 rounded-full
718                                ${g?"w-2 h-2 sm:w-3 sm:h-3 bg-[#ccff00]":b?"w-4 h-4 sm:w-6 sm:h-6 bg-[#d95d16]":"w-4 h-4 sm:w-5 sm:h-5 bg-white"}`,style:{animation:"ballMove 8s infinite alternate ease-in-out",transform:"translate(-50%, -50%)"},children:(0,a.jsx)("div",{className:"absolute -bottom-4 left-1/2 w-4 h-2 bg-white/40 rounded-full blur-sm -translate-x-1/2"})}),x&&(0,a.jsxs)("div",{className:"absolute left-[65%] top-[60%] flex flex-col items-center animate-bounce-slow",style:{animation:"floatBubble 4s infinite alternate ease-in-out"},children:[(0,a.jsxs)("div",{className:"bg-white/95 backdrop-blur border border-white/10 rounded-2xl p-2 shadow-2xl flex items-center gap-3 w-max max-w-[200px]",children:[(0,a.jsx)("div",{className:"w-6 h-6 rounded-full flex items-center justify-center p-0.5 bg-white/5 shrink-0",children:(0,a.jsx)("img",{src:p,alt:e||"Home team",className:"max-w-full max-h-full object-contain",onError:t=>t.target.src=i(e),loading:"lazy",decoding:"async"})}),(0,a.jsx)("div",{className:"flex flex-col pr-1 overflow-hidden",children:(0,a.jsx)("span",{className:"text-slate-900 font-bold text-[10px] sm:text-xs tracking-wide truncate",children:g?"Serve / Return":"Tấn c\xf4ng nguy hiểm"})})]}),(0,a.jsx)("div",{className:"w-0 h-0 border-l-[6px] border-r-[6px] border-t-[6px] border-l-transparent border-r-transparent border-t-[#1a1c28]/95 mt-[-1px]"})]})]})})}),(0,a.jsx)("div",{className:"relative z-20 flex-1 flex flex-col items-center justify-start p-4 md:p-6 pointer-events-none w-full",children:(0,a.jsxs)("div",{className:"w-full max-w-[800px] flex items-center justify-between px-4 sm:px-6 py-3 rounded-xl bg-gradient-to-r from-[#0d0f14]/90 via-[#151821]/95 to-[#0d0f14]/90 backdrop-blur-xl border border-white/10 shadow-[0_10px_40px_rgba(0,0,0,0.8)] pointer-events-auto",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 flex-1 min-w-0 pr-2",children:[(0,a.jsx)("img",{src:p,alt:e,className:"w-8 h-8 md:w-12 md:h-12 object-contain drop-shadow-lg shrink-0",onError:t=>t.target.src=i(e),loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-slate-900 text-xs sm:text-sm md:text-base font-bold truncate tracking-wide",children:e})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1 shrink-0 px-2 sm:px-6 min-w-[100px]",children:[(0,a.jsxs)("span",{className:`inline-flex items-center gap-1.5 px-2.5 py-0.5 rounded-full text-[10px] sm:text-xs font-bold shadow-inner ${x?"bg-green-500/10 text-green-400 border border-green-500/20":"bg-white/5 text-slate-900/40"}`,children:[x&&(0,a.jsx)("span",{className:"w-1.5 h-1.5 rounded-full bg-green-500 animate-pulse shadow-[0_0_8px_#22c55e]"}),d||c]}),(0,a.jsxs)("div",{className:"flex gap-3 sm:gap-5 items-center justify-center",children:[(0,a.jsx)("span",{className:"text-slate-900 text-2xl sm:text-4xl font-black drop-shadow-md",children:r}),(0,a.jsx)("span",{className:"text-slate-900/30 text-xl font-light",children:"-"}),(0,a.jsx)("span",{className:"text-slate-900 text-2xl sm:text-4xl font-black drop-shadow-md",children:n})]})]}),(0,a.jsxs)("div",{className:"flex items-center justify-end gap-3 flex-1 min-w-0 pl-2 text-right",children:[(0,a.jsx)("span",{className:"text-slate-900 text-xs sm:text-sm md:text-base font-bold truncate tracking-wide",children:t}),(0,a.jsx)("img",{src:u,alt:t,className:"w-8 h-8 md:w-12 md:h-12 object-contain drop-shadow-lg shrink-0",onError:e=>e.target.src=i(t),loading:"lazy",decoding:"async"})]})]})}),(0,a.jsx)("div",{className:"relative z-20 mt-auto w-full p-4 flex justify-center pointer-events-none",children:(0,a.jsx)("div",{className:"w-full max-w-[600px] h-6 bg-white/40 backdrop-blur-md rounded-full border border-white/5 flex items-center px-4",children:(0,a.jsxs)("div",{className:"flex-1 h-0.5 bg-white/10 relative rounded-full",children:[x&&(0,a.jsx)("div",{className:"absolute left-0 top-0 bottom-0 bg-gradient-to-r from-[#b38b22] to-[#ffda6a] w-[65%] rounded-full opacity-90 shadow-[0_0_12px_#daa520]"}),(0,a.jsx)("span",{className:"absolute left-[65%] top-1/2 -translate-y-1/2 -translate-x-1/2 w-1.5 h-1.5 rounded-full bg-white shadow-md"})]})})}),(0,a.jsx)("style",{children:`
719                @keyframes ballMove {
720                    0% { transform: translate(-30%, -20%) scale(1); }
721                    25% { transform: translate(40%, -10%) scale(1.1); }
722                    50% { transform: translate(20%, 30%) scale(0.9); }
723                    75% { transform: translate(-10%, 15%) scale(1.2); }
724                    100% { transform: translate(-45%, 0%) scale(1); }
725                }
726                @keyframes floatBubble {
727                    0% { transform: translateY(0px) translateX(0px); }
728                    50% { transform: translateY(-8px) translateX(4px); }
729                    100% { transform: translateY(4px) translateX(-4px); }
730                }
731            `})]})}function c(e,t){if("1"===t||"2"===t)switch(e){case"2":return{t:"HT 1",live:!0,sc:!0};case"3":return{t:"Giữa giờ",live:!0,sc:!0};case"4":return{t:"HT 2",live:!0,sc:!0};case"5":return{t:"Hiệp phụ",live:!0,sc:!0};case"7":return{t:"Penalty",live:!0,sc:!0};case"8":case"9":return{t:"Kết th\xfac",live:!1,sc:!0};default:return{t:"Chưa bắt đầu",live:!1,sc:!1}}
731return["51","52","53","54","55"].includes(e)?{t:`Set ${e-50}`,live:!0,sc:!0}:["100","90","110"].includes(e)?{t:"KT",live:!1,sc:!0}:"0"===e||"1"===e?{t:"Chưa bắt đầu",live:!1,sc:!1}:{t:"LIVE",live:!0,sc:!0}}function d(e){let t=(e||"").split(/[\s-]+/).slice(0,2).map(e=>e[0]||"").join("").toUpperCase()||"??";return`data:image/svg+xml,${encodeURIComponent(`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 80 80"><rect width="80" height="80" rx="20" fill="#1a1c25"/><text x="40" y="47" font-size="20" font-family="Arial" font-weight="700" text-anchor="middle" fill="#666">${t}</text></svg>`)}`}function x(e){let t=new Date(1e3*parseInt(e||"0",10));return{hm:t.toLocaleTimeString("vi-VN",{hour:"2-digit",minute:"2-digit",timeZone:"Asia/Ho_Chi_Minh"}),dm:t.toLocaleDateString("vi-VN",{day:"2-digit",month:"2-digit",timeZone:"Asia/Ho_Chi_Minh"}),full:t.toLocaleDateString("vi-VN",{day:"2-digit",month:"2-digit",year:"numeric",timeZone:"Asia/Ho_Chi_Minh"})}}let h="max-w-[1200px]";function m({matchData:e,relatedMatches:t,matchDetails:s,standings:r,brandingNameUpper:i}){let p,u,g,j,v,y,[C,S]=(0,l.useState)("odds"),L=e?.match_data?.anchors||[],[$,F]=(0,l.useState)(!1),[T,A]=(0,l.useState)(!1),[M,H]=(0,l.useState)(null),[D,B]=(0,l.useState)(!1),z=(0,l.useRef)(0);(0,l.useEffect)(()=>{if(!e?.has_live||"1"!==e.has_live||0===L.length)return;let t=!1;B(!0);let s=async t=>{let s=t?.uid,a=`/api/socolive/proxy-stream?url=${encodeURIComponent(`https://live.inplyr.com/${s?`room/${s}`:`default/${e.id}`}.m3u8`)}`;try{let e=await fetch(a,{method:"GET",cache:"no-store"});if(!e.ok)return null;let s=(await e.text()).split("\n").filter(e=>e.trim()&&!e.startsWith("#"));if(0===s.length)return null;return(await fetch(s[0],{method:"HEAD",cache:"no-store"})).ok?t:null}catch{return null}};return Promise.all(L.map(e=>s(e))).then(e=>{if(t)return;let s=e.find(e=>null!==e);s?(H(s),F(!0),A(!1)):(H(L[0]),A(!0)),B(!1)}),()=>{t=!0}},[e?.has_live,L.length]),(0,l.useEffect)(()=>{if(!T||D||z.current>=20)return;let t=setTimeout(()=>{z.current++,A(!1),B(!0);let t=async t=>{let s=t?.uid,a=`/api/socolive/proxy-stream?url=${encodeURIComponent(`https://live.inplyr.com/${s?`room/${s}`:`default/${e.id}`}.m3u8`)}`;try{let e=await fetch(a,{method:"GET",cache:"no-store"});if(!e.ok)return null;let s=(await e.text()).split("\n").filter(e=>e.trim()&&!e.startsWith("#"));if(0===s.length)return null;return(await fetch(s[0],{method:"HEAD",cache:"no-store"})).ok?t:null}catch{return null}};Promise.all(L.map(e=>t(e))).then(e=>{let t=e.find(e=>null!==e);t?(H(t),F(!0),A(!1)):A(!0),B(!1)})},15e3);return()=>clearTimeout(t)},[T,D]);let[I,R]=(0,l.useState)(null),U=e?.post_name||e?.ls_id||e?.id;if(window.location.origin,(0,l.useEffect)(()=>{if(!U)return;let e=setInterval(async()=>{try{let e=await fetch(`/api/klivevip/match/${U}`,{cache:"no-store"});if(e.ok){let t=await e.json();R(t?.match??null)}}catch{}},1e4);return()=>clearInterval(e)},[U]),!e)return(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center py-32 gap-4",children:[(0,a.jsx)("span",{className:"text-[#64748B] text-lg",children:"Kh\xf4ng t\xecm thấy trận đấu"}),(0,a.jsx)("a",{href:"/",className:"text-[#4681E8] hover:underline text-sm",children:"← Quay lại"})]});let G=I?{...e,...I}:e,P=G?.has_live==="1"&&L.length>0,K=c(G.status_id,G.sport_id),V=$&&M&&!T&&!D,W=P&&(D||T&&K.live&&z.current<20),O=!P||T&&!W&&!D,q=!K.live&&"8"!==String(G.status_id)&&"9"!==String(G.status_id),{hm:X,full:Y}=x(G.time),Z=G.source_card_meta?.league_label||G.match_data?.competition_vi||G.match_data?.competition_full||"",Q=G.match_data?.stage_label||G.source_card_meta?.stage_label||"",J=G.home_logo||d(G.home_name),ee=G.away_logo||d(G.away_name),et=e=>t=>{t.target.src=d(e)};return(0,a.jsxs)("div",{className:"w-full bg-white min-h-screen text-slate-600 font-sans pb-16",children:[(0,a.jsx)("div",{className:"w-full border-b border-slate-200 bg-white",children:(0,a.jsxs)("div",{className:`${h} mx-auto px-4 py-3 flex items-center justify-between`,children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 text-[13px] font-bold",children:[(0,a.jsx)("span",{className:"text-[#4681E8] uppercase tracking-wide",children:Z}),Q&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"text-slate-300",children:"•"}),(0,a.jsx)("span",{className:"text-slate-600",children:Q})]})]}),(0,a.jsx)("div",{className:"text-[12px] font-mono text-slate-400 hidden sm:block",children:Y})]})}),(0,a.jsxs)("div",{className:`${h} mx-auto px-0 md:px-4 py-0 md:py-6 flex flex-col lg:flex-row gap-4 lg:gap-6`,children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0 flex flex-col gap-4 lg:gap-6",children:[(0,a.jsxs)("div",{className:"w-full relative bg-[#000000] rounded-none md:rounded-2xl overflow-hidden shadow-[0_10px_40px_rgba(0,0,0,0.5)] border-y md:border border-slate-200",children:[(0,a.jsx)("div",{className:"relative w-full aspect-video bg-[#000000] group z-10",children:V?(0,a.jsx)(n,{src:`/api/klivevip/proxy-stream?url=${encodeURIComponent(`https://live.inplyr.com/${M?.uid&&"default"!==M.uid?`room/${M.uid}`:`default/${G.id}`}.m3u8`)}`,autoPlay:!0,onError:()=>A(!0)}):O?(0,a.jsx)(o,{homeName:G.home_name,awayName:G.away_name,homeLogo:G.home_logo,awayLogo:G.away_logo,homeScore:K.sc?G.home_score:"0",awayScore:K.sc?G.away_score:"0",statusText:K.t,timeText:G.time_text||X,isLive:K.live,sportId:G.sport_id,matchId:G.ls_id||G.id,kickoffMs:1e3*Number(G?.time||0),isPreMatch:q}):(0,a.jsxs)("div",{className:"absolute inset-0 z-10 flex flex-col items-center justify-center p-4 lg:p-10",children:[(0,a.jsxs)("div",{className:"absolute inset-0 flex justify-between items-center opacity-[0.03] pointer-events-none px-4 lg:px-20 overflow-hidden",children:[(0,a.jsx)("img",{src:J,alt:"",className:"w-1/2 max-w-[400px] blur-[10px]",loading:"lazy",decoding:"async"}),(0,a.jsx)("img",{src:ee,alt:"",className:"w-1/2 max-w-[400px] blur-[10px]",loading:"lazy",decoding:"async"})]}),P&&!T&&(0,a.jsx)("button",{onClick:()=>F(!0),className:"group mb-4 sm:mb-8 w-16 h-16 md:w-20 md:h-20 rounded-full bg-[#4681E8] flex items-center justify-center hover:bg-[#55CAF1] transition-all shadow-[0_0_30px_rgba(70,129,232,0.5)] curs
731or-pointer z-20",children:(0,a.jsx)("svg",{className:"w-8 h-8 md:w-10 md:h-10 text-white ml-1.5 md:ml-2 group-hover:scale-110 transition-transform",viewBox:"0 0 24 24",fill:"currentColor",children:(0,a.jsx)("path",{d:"M8 5v14l11-7z"})})}),(0,a.jsxs)("div",{className:"grid grid-cols-[1fr_auto_1fr] items-center w-full max-w-[800px] gap-2 lg:gap-8 z-20",children:[(0,a.jsxs)("div",{className:"flex flex-col items-center gap-2 lg:gap-4",children:[(0,a.jsx)("img",{src:J,alt:G.home_name,className:"w-16 h-16 sm:w-24 sm:h-24 lg:w-32 lg:h-32 object-contain drop-shadow-[0_10px_20px_rgba(0,0,0,0.8)]",onError:et(G.home_name),loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-[#FFFFFF] text-xs sm:text-base lg:text-lg font-black text-center line-clamp-2 uppercase tracking-wide",children:G.home_name})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-2 lg:gap-3",children:[K.sc?(0,a.jsxs)("div",{className:"flex items-center gap-3 lg:gap-6 bg-white/90 backdrop-blur-md px-4 py-2 lg:px-8 lg:py-4 rounded-2xl border border-slate-200 shadow-2xl",children:[(0,a.jsx)("span",{className:"text-[#4681E8] text-[32px] sm:text-[48px] lg:text-[64px] font-black leading-none",children:G.home_score}),(0,a.jsx)("span",{className:"text-slate-300 text-[20px] lg:text-[28px] font-light",children:":"}),(0,a.jsx)("span",{className:"text-[#4681E8] text-[32px] sm:text-[48px] lg:text-[64px] font-black leading-none",children:G.away_score})]}):(0,a.jsx)("div",{className:"text-[#FFFFFF] text-[32px] sm:text-[48px] lg:text-[56px] font-black tracking-widest leading-none drop-shadow-xl",children:X}),(0,a.jsxs)("span",{className:`inline-flex items-center gap-2 rounded-full px-3 py-1 lg:px-5 lg:py-1.5 text-[10px] lg:text-[12px] font-bold tracking-widest uppercase ${K.live?"bg-[#4681E8] text-white shadow-[0_0_20px_rgba(70,129,232,0.6)]":"bg-white text-slate-600 border border-slate-200"}`,children:[K.live&&(0,a.jsx)("span",{className:"w-2 h-2 rounded-full bg-white animate-pulse"}),K.t,G.time_text?` : ${G.time_text}`:""]})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-2 lg:gap-4",children:[(0,a.jsx)("img",{src:ee,alt:G.away_name,className:"w-16 h-16 sm:w-24 sm:h-24 lg:w-32 lg:h-32 object-contain drop-shadow-[0_10px_20px_rgba(0,0,0,0.8)]",onError:et(G.away_name),loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-[#FFFFFF] text-xs sm:text-base lg:text-lg font-black text-center line-clamp-2 uppercase tracking-wide",children:G.away_name})]})]})]})}),L.length>0&&(0,a.jsxs)("div",{className:"w-full bg-white border-t border-slate-200 px-3 lg:px-6 py-2.5 lg:py-4 flex items-center gap-2 lg:gap-4 overflow-x-auto z-20",children:[(0,a.jsx)("span",{className:"text-[10px] lg:text-[11px] text-slate-600 uppercase font-bold tracking-widest shrink-0 mr-1 lg:mr-2",children:"CHỌN K\xcaNH TRUYỀN:"}),L.map((e,t)=>(0,a.jsxs)("button",{onClick:()=>{H(e),F(!0),A(!1)},className:`shrink-0 flex items-center gap-1.5 lg:gap-2 rounded-full px-3 py-1.5 lg:px-5 lg:py-2 text-[11px] lg:text-[13px] font-bold transition-all ${M?.uid===e.uid&&!T?"bg-[#4681E8]/10 border border-[#4681E8] text-[#4681E8] shadow-[0_0_15px_rgba(70,129,232,0.2)]":"bg-white border border-slate-200 text-slate-600 hover:text-[#4681E8] hover:border-[#4681E8]/50"}`,children:[(0,a.jsx)("span",{className:`w-1.5 h-1.5 lg:w-2 lg:h-2 rounded-full ${M?.uid===e.uid&&!T?"bg-[#4681E8] animate-pulse":"bg-transparent"}`}),"BLV ",e.nickName||`K\xeanh ${t+1}`]},e.uid||t))]})]}),(p=(()=>{let e=s?.stats;if(!e)return!1;let t=null;return Array.isArray(e)&&e.length>0?t=e[0]:e?.results?.[0]?t=e.results[0]:e?.stats_full_time&&(t=e),!!t&&!!(t.stats_full_time?.length>0||t.stats_haft_time?.length>0||t.stats_half_time?.length>0||t.stats?.length>0)})(),u=!!(s?.lineup&&(Array.isArray(s.lineup)?s.lineup.length>0:s.lineup.home||s.lineup.away)),g=!!(s?.events&&(Array.isArray(s.events)?s.events.length>0:s.events.incidents?.length>0||s.events.data?.length>0)),j=!!(r&&(Array.isArray(r)?r.length>0:r.data?.length>0)),(y=(v=[{id:"stats",label:"THỐNG K\xca",show:p},{id:"lineup",label:"ĐỘI H\xccNH",show:u},{id:"events",label:"DIỄN BIẾN",show:g},{id:"standings",label:"BẢNG XH",show:j},{id:"odds",label:"TỶ LỆ K\xc8O",show:!!(s?.odds&&Array.isArray(s.odds)&&s.odds.length>0)}].filter(e=>e.show)).find(e=>e.id===C)?C:v[0]?.id||"odds")!==C&&setTimeout(()=>S(y),0),v.length>0?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"bg-white rounded-2xl p-2 border border-slate-200 flex overflow-x-auto gap-2 shadow-[0_4px_15px_rgba(0,0,0,0.08)] mx-4 md:mx-0",children:v.map(({id:e,label:t})=>(0,a.jsx)("button",{onClick:()=>S(e),className:`flex-1 min-w-[100px] py-2.5 sm:py-3 text-[10px] sm:text-[12px] font-black uppercase tracking-widest rounded-xl transition-all ${y===e?"bg-[#4681E8]/10 text-[#4681E8] border border-[#4681E8]/30 shadow-inner":"text-slate-500 hover:text-[#4681E8] hover:bg-[#4681E8]/5 border border-transparent"}`,children:t},e))}),(0,a.jsxs)("div",{className:"bg-white rounded-2xl border border-slate-200 overflow-hidden shadow-[0_4px_15px_rgba(0,0,0,0.08)] min-h-[400px] mx-4 md:mx-0",children:["stats"===y&&(0,a.jsx)(b,{matchDetails:s}),"lineup"===y&&(0,a.jsx)(f,{matchDetails:s}),"events"===y&&(0,a.jsx)(_,{events:s?.events}),"standings"===y&&(0,a.jsx)(k,{standings:r}),"odds"===y&&(0,a.jsx)(E,{odds:s?.odds})]})]}):null),t.length>0&&(0,a.jsxs)("div",{className:"mt-4 mx-4 md:mx-0",children:[(0,a.jsxs)("h2",{className:"px-1 py-4 text-sm sm:text-base font-black text-slate-800 uppercase flex items-center gap-3 tracking-widest border-b border-slate-100 mb-4",children:[(0,a.jsx)("span",{className:"w-1 h-5 bg-[#4681E8] rounded-sm shadow-[0_0_8px_#4681E8]"}),"TRẬN ĐẤU C\xd9NG GIẢI"]}),(0,a.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3 sm:gap-4",children:t.slice(0,4).map(e=>(0,a.jsx)(w,{m:e},e.id))})]})]}),(0,a.jsx)("div",{className:"w-full lg:w-[350px] xl:w-[400px] shrink-0 px-4 md:px-0",children:(0,a.jsxs)("div",{className:"bg-white border border-slate-200 rounded-2xl overflow-hidden flex flex-col shadow-[0_10px_30px_rgba(0,0,0,0.1)] lg:sticky lg:top-8 h-[600px] lg:h-[c
731alc(100vh-100px)] lg:max-h-[850px]",children:[(0,a.jsxs)("div",{className:"px-5 py-4 border-b border-slate-200 flex items-center justify-between bg-white",children:[(0,a.jsxs)("h3",{className:"text-slate-800 text-sm font-black uppercase tracking-widest flex items-center gap-2",children:[(0,a.jsx)("span",{className:"w-2.5 h-2.5 rounded-full bg-[#4681E8] shadow-[0_0_10px_rgba(70,129,232,0.4)]"}),"PH\xd2NG CHAT"]}),(0,a.jsxs)("span",{className:"text-[10px] bg-white px-3 py-1.5 rounded-full text-[#4681E8] font-mono border border-[#4681E8]/30 shadow-inner tracking-widest flex items-center gap-1.5",children:[(0,a.jsx)("svg",{className:"w-3 h-3",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 10l4.553-2.276A1 1 0 0121 8.618v6.764a1 1 0 01-1.447.894L15 14M5 18h8a2 2 0 002-2V8a2 2 0 00-2-2H5a2 2 0 00-2 2v8a2 2 0 002 2z"})}),L.length," BLV"]})]}),(0,a.jsx)("div",{className:"flex-1 bg-[#FFFFFF]/40 min-h-0 chat-container-wrapper",children:(0,a.jsx)(N,{anchors:L,selectedAnchor:M})})]})})]})]})}let p={25:"KIỂM SO\xc1T B\xd3NG",24:"CHUYỀN CH\xcdNH X\xc1C",23:"TỔNG SỐ ĐƯỜNG CHUYỀN",22:"TẤN C\xd4NG",21:"T.C\xd4NG NGUY HIỂM",2:"S\xdaT TR\xdaNG Đ\xcdCH",37:"PHẠT G\xd3C",28:"N\xc9M BI\xcaN",8:"VIỆT VỊ",3:"THẺ V\xc0NG",4:"THẺ ĐỎ",5:"S\xdaT PENALTY",29:"PHẠM LỖI",26:"Đ\xc1NH ĐẦU",27:"CỨU THUA",1:"B\xc0N THẮNG",7:"PHẢN LƯỚI"},u=[25,21,22,24,2,23,4,3,37,28,8,5,29],g="https://cdn.sportdb.live/upload/team/";function b({matchDetails:e}){let[t,s]=(0,l.useState)("full"),r=e?.stats,n=e?.lineup,i=n?.match?.home_team,o=n?.match?.away_team,c=null;Array.isArray(r)&&r.length>0?c=r[0]:r?.results?.[0]?c=r.results[0]:r?.stats_full_time&&(c=r);let d={full:c?.stats_full_time||[],h1:c?.stats_haft_time||c?.stats_half_time||[],h2:c?.stats_haft_time_2nd_half||[]}[t]||[];if(!c||0===d.length)return(0,a.jsx)(j,{text:"Thống k\xea sẽ được cập nhật khi trận đấu bắt đầu"});let x=[...d].sort((e,t)=>{let s=u.indexOf(e.type),a=u.indexOf(t.type);return(-1===s?999:s)-(-1===a?999:a)});return(0,a.jsxs)("div",{className:"flex flex-col",children:[(i||o)&&(0,a.jsxs)("div",{className:"flex items-center justify-between px-4 py-3 border-b border-slate-100",children:[(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5 w-20",children:[i?.logo&&(0,a.jsx)("img",{src:g+i.logo,alt:i?.name||"Home team",className:"w-8 h-8 object-contain",onError:e=>e.target.style.display="none",loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-slate-600 text-[10px] font-medium text-center leading-tight",children:i?.name||""})]}),(0,a.jsx)("div",{className:"flex gap-1",children:[{k:"h1",l:"Hiệp 1"},{k:"h2",l:"Hiệp 2"},{k:"full",l:"Cả trận"}].map(({k:e,l})=>(0,a.jsx)("button",{onClick:()=>s(e),className:`px-2.5 py-1 text-[10px] font-bold rounded transition-all ${t===e?"bg-[#E11D48] text-white":"text-slate-400 hover:text-slate-600 bg-slate-100"}`,children:l},e))}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5 w-20",children:[o?.logo&&(0,a.jsx)("img",{src:g+o.logo,alt:o?.name||"Away team",className:"w-8 h-8 object-contain",onError:e=>e.target.style.display="none",loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-slate-600 text-[10px] font-medium text-center leading-tight",children:o?.name||""})]})]}),(0,a.jsx)("div",{className:"px-4 py-3 space-y-3",children:x.map(e=>{let t=p[e.type]||`Stat ${e.type}`,s=e.home,l=e.away,r=24===e.type||25===e.type,n=s+l,i=0===n?50:s/n*100,o=s>l,c=l>s;return(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"flex justify-between items-center mb-1.5",children:[(0,a.jsxs)("span",{className:`text-xs font-bold w-10 tabular-nums ${o?"text-slate-800":"text-slate-400"}`,children:[s,r?"%":""]}),(0,a.jsx)("span",{className:"text-slate-400 text-[10px] font-semibold tracking-wide uppercase",children:t}),(0,a.jsxs)("span",{className:`text-xs font-bold w-10 text-right tabular-nums ${c?"text-slate-800":"text-slate-400"}`,children:[l,r?"%":""]})]}),(0,a.jsxs)("div",{className:"flex gap-0.5 h-[5px]",children:[(0,a.jsx)("div",{className:"flex-1 rounded-l-full bg-white/[0.06] overflow-hidden flex justify-end",children:(0,a.jsx)("div",{className:`rounded-l-full transition-all duration-500 ${o?"bg-gradient-to-r from-[#E11D48]/60 to-[#E11D48]":"bg-gradient-to-r from-white/10 to-white/20"}`,style:{width:`${i}%`}})}),(0,a.jsx)("div",{className:"flex-1 rounded-r-full bg-white/[0.06] overflow-hidden",children:(0,a.jsx)("div",{className:`rounded-r-full transition-all duration-500 ${c?"bg-gradient-to-l from-[#E11D48]/60 to-[#E11D48]":"bg-gradient-to-l from-white/10 to-white/20"}`,style:{width:`${100-i}%`}})})]})]},e.type)})})]})}
731function f({matchDetails:e}){let[t,s]=(0,l.useState)("pitch"),r=e?.lineup,n=r?.lineup||r,i=n?.home||[],o=n?.away||[],c=r?.home_formation||"",d=r?.away_formation||"",x=r?.match?.home_team,h=r?.match?.away_team;if(0===i.length&&0===o.length)return(0,a.jsx)(j,{text:"Đội h\xecnh sẽ được c\xf4ng bố trước trận đấu 30 ph\xfat"});let m=e=>e.filter(e=>1===e.first),p=e=>e.filter(e=>1!==e.first),u=m(i),g=m(o),b=p(i),w=p(o);return(0,a.jsxs)("div",{className:"flex flex-col",children:[(0,a.jsxs)("div",{className:"flex items-center justify-center gap-1 px-3 py-2 border-b border-slate-100",children:[(0,a.jsx)("button",{onClick:()=>s("pitch"),className:`px-3 py-1.5 text-[10px] font-bold rounded transition-all ${"pitch"===t?"bg-[#E11D48] text-white":"text-slate-400 bg-slate-100"}`,children:"Đội h\xecnh xuất ph\xe1t"}),(0,a.jsx)("button",{onClick:()=>s("list"),className:`px-3 py-1.5 text-[10px] font-bold rounded transition-all ${"list"===t?"bg-[#E11D48] text-white":"text-slate-400 bg-slate-100"}`,children:"Đội h\xecnh dá»± bị"})]}),"pitch"===t?(0,a.jsx)("div",{className:"relative w-full",style:{aspectRatio:"68/105"},children:(0,a.jsxs)("div",{className:"absolute inset-0 bg-gradient-to-b from-[#1a5c2a] via-[#1e6b31] to-[#1a5c2a] rounded-2xl overflow-hidden",children:[(0,a.jsxs)("div",{className:"absolute inset-[3%] border border-white/20 rounded-lg",children:[(0,a.jsx)("div",{className:"absolute left-0 right-0 top-1/2 h-px bg-white/20"}),(0,a.jsx)("div",{className:"absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 w-[22%] aspect-square rounded-full border border-white/20"}),(0,a.jsx)("div",{className:"absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 w-1.5 h-1.5 bg-white/30 rounded-full"}),(0,a.jsx)("div",{className:"absolute top-0 left-1/2 -translate-x-1/2 w-[55%] h-[16%] border-l border-r border-white/20"}),(0,a.jsx)("div",{className:"absolute top-0 left-1/2 -translate-x-1/2 w-[25%] h-[6%] border-l border-r border-white/20"}),(0,a.jsx)("div",{className:"absolute bottom-0 left-1/2 -translate-x-1/2 w-[55%] h-[16%] border-t border-l border-r border-white/20"}),(0,a.jsx)("div",{className:"absolute bottom-0 left-1/2 -translate-x-1/2 w-[25%] h-[6%] border-t border-l border-r border-white/20"})]}),(0,a.jsx)("div",{className:"absolute top-1 left-2 text-[9px] text-[#F8FAFC]/50 font-bold z-10",children:x?.name||""}),(0,a.jsx)("div",{className:"absolute top-1 right-2 text-[9px] text-[#E11D48]/70 font-bold z-10",children:c}),(0,a.jsx)("div",{className:"absolute bottom-1 left-2 text-[9px] text-[#F8FAFC]/50 font-bold z-10",children:h?.name||""}),(0,a.jsx)("div",{className:"absolute bottom-1 right-2 text-[9px] text-[#E11D48]/70 font-bold z-10",children:d}),u.map((e,t)=>{let s=`${e.x||50}%`,l=`${(e.y||10)/2}%`,r="G"===e.position;return(0,a.jsxs)("div",{className:"absolute flex flex-col items-center z-10 -translate-x-1/2 -translate-y-1/2",style:{left:s,top:l},children:[(0,a.jsx)("div",{className:`w-6 h-6 rounded-full flex items-center justify-center text-[9px] font-black ${r?"bg-yellow-400 text-black":"bg-blue-600 text-[#F8FAFC]"} shadow-md border border-white/20`,children:e.shirt_number||""}),(0,a.jsx)("span",{className:"text-[7px] text-[#F8FAFC] font-semibold mt-0.5 text-center max-w-[48px] truncate drop-shadow-[0_1px_2px_rgba(0,0,0,0.8)]",children:(e.name||"").split(" ").slice(-2).join(" ")}),1===e.captain&&(0,a.jsx)("span",{className:"absolute -top-1 -right-1 text-[6px] text-yellow-400",children:"C"})]},`h-${t}`)}),g.map((e,t)=>{let s=`${100-(e.x||50)}%`,l=`${100-(e.y||10)/2}%`,r="G"===e.position;return(0,a.jsxs)("div",{className:"absolute flex flex-col items-center z-10 -translate-x-1/2 -translate-y-1/2",style:{left:s,top:l},children:[(0,a.jsx)("div",{className:`w-6 h-6 rounded-full flex items-center justify-center text-[9px] font-black ${r?"bg-yellow-400 text-black":"bg-orange-500 text-[#F8FAFC]"} shadow-md border border-white/20`,children:e.shirt_number||""}),(0,a.jsx)("span",{className:"text-[7px] text-[#F8FAFC] font-semibold mt-0.5 text-center max-w-[48px] truncate drop-shadow-[0_1px_2px_rgba(0,0,0,0.8)]",children:(e.name||"").split(" ").slice(-2).join(" ")}),1===e.captain&&(0,a.jsx)("span",{className:"absolute -top-1 -right-1 text-[6px] text-yellow-400",children:"C"})]},`a-${t}`)})]})}):(0,a.jsxs)("div",{className:"px-3 py-2 text-xs",children:[(0,a.jsxs)("div",{className:"flex justify-between font-bold text-slate-400 mb-1 uppercase tracking-wider text-[9px] px-1",children:[(0,a.jsx)("span",{children:"Đội chá»
731§ nh\xe0"}),(0,a.jsx)("span",{children:"Đội kh\xe1ch"})]}),Array.from({length:Math.max(b.length,w.length)}).map((e,t)=>{let s=b[t],l=w[t];return(0,a.jsxs)("div",{className:"flex justify-between items-center border-b border-slate-50 py-1.5",children:[(0,a.jsx)("div",{className:"flex items-center gap-1.5 w-1/2 min-w-0",children:s&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"text-[#E11D48] font-bold w-5 text-center shrink-0 text-[10px]",children:s.shirt_number||""}),(0,a.jsx)("span",{className:"text-slate-700 truncate text-[11px]",children:s.name||""})]})}),(0,a.jsx)("div",{className:"flex items-center gap-1.5 w-1/2 justify-end min-w-0",children:l&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"text-slate-700 truncate text-[11px] text-right",children:l.name||""}),(0,a.jsx)("span",{className:"text-[#E11D48] font-bold w-5 text-center shrink-0 text-[10px]",children:l.shirt_number||""})]})})]},t)})]})]})}function j({text:e}){return(0,a.jsx)("div",{className:"flex items-center justify-center py-10 text-slate-400 text-sm text-center",children:e})}function w({m:e}){let t=c(e.status_id,e.sport_id),{hm:s,dm:l}=x(e.time),r=e.source_card_meta?.league_label||e.match_data?.competition_vi||"";return(0,a.jsxs)("a",{href:`/match/${encodeURIComponent(e.post_name||e.id)}`,className:"flex items-center gap-3 rounded-2xl bg-white hover:bg-slate-50 border border-slate-100 hover:border-[#4681E8]/30 p-3 transition-all group",children:[(0,a.jsxs)("div",{className:"shrink-0 w-14 text-center",children:[(0,a.jsx)("div",{className:"text-[#E11D48] text-[11px] font-bold",children:s}),(0,a.jsx)("div",{className:"text-slate-400 text-[9px]",children:l})]}),(0,a.jsx)("div",{className:"w-px h-9 bg-slate-200 shrink-0"}),(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("div",{className:"text-slate-400 text-[9px] truncate mb-1",children:r}),(0,a.jsxs)("div",{className:"flex items-center gap-2 mb-0.5",children:[(0,a.jsx)("img",{src:e.home_logo||d(e.home_name),alt:e.home_name,className:"w-4 h-4 object-contain shrink-0",onError:t=>t.target.src=d(e.home_name),loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-slate-600 text-[12px] font-medium truncate",children:e.home_name})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("img",{src:e.away_logo||d(e.away_name),alt:e.away_name,className:"w-4 h-4 object-contain shrink-0",onError:t=>t.target.src=d(e.away_name),loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-slate-600 text-[12px] font-medium truncate",children:e.away_name})]})]}),t.sc?(0,a.jsxs)("span",{className:"text-slate-800 font-bold text-[14px] tabular-nums shrink-0",children:[e.home_score,"-",e.away_score]}):(0,a.jsx)("span",{className:"text-[10px] font-bold text-[#E11D48] bg-[#E11D48]/10 rounded px-2.5 py-1 group-hover:bg-[#E11D48]/15 transition shrink-0",children:"XEM NGAY"})]})}let v={0:{bg:"bg-white/10",text:"text-[#F8FAFC]/40",nameCls:"text-[#94A3B8]"},1:{bg:"bg-white/10",text:"text-[#F8FAFC]/50",nameCls:"text-[#94A3B8]"},2:{bg:"bg-green-900/50",text:"text-green-400",nameCls:"text-green-400"},3:{bg:"bg-yellow-900/40",text:"text-yellow-400",nameCls:"text-emerald-600 font-bold"},4:{bg:"bg-blue-900/40",text:"text-blue-400",nameCls:"text-blue-400 font-bold"},5:{bg:"bg-red-900/40",text:"text-red-400",nameCls:"text-red-400 font-bold"}};function N({anchors:e,selectedAnchor:t}){let[s,r]=(0,l.useState)([]),[n,i]=(0,l.useState)(!1),o=(0,l.useRef)(null),c=(0,l.useRef)(null),d=t?.roomNum;return(0,l.useEffect)(()=>{if(!d)return;r([]),i(!1);let e=new EventSource(`/api/chat/${d}`);return e.onopen=()=>i(!0),e.onmessage=e=>{try{let t=JSON.parse(e.data);if("connected"===t.type)return void i(!0);if("history"===t.type&&Array.isArray(t.messages))return void r(e=>[...t.messages,...e].slice(-200));t.user&&t.text&&r(e=>[...e,t].slice(-200))}catch{}},e.onerror=()=>i(!1),()=>{e.close(),i(!1)}},[d]),(0,l.useEffect)(()=>{requestAnimationFrame(()=>{let e=c.current;e&&(e.scrollTop=e.scrollHeight)})},[s.length]),(0,a.jsxs)("div",{className:"flex flex-col h-full bg-[#0F0F23]",children:[(0,a.jsxs)("div",{ref:c,className:"flex-1 min-h-0 px-3 py-2 flex flex-col gap-[3px] overflow-y-auto",style:{scrollbarWidth:"thin",scrollbarColor:"#444 transparent"},children:[(0,a.jsx)("div",{className:"text-center text-[10px] text-[#F8FAFC]/30 bg-slate-50/60 py-1.5 rounded-xl mb-1 sticky top-0 z-10 backdrop-blur-sm",children:n?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"inline-block h-1.5 w-1.5 rounded-full bg-green-400 animate-pulse mr-1"}),"Đang kết nối ph\xf2ng chat trá»±c tiếp"]}):d?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"inline-block h-1.5 w-1.5 rounded-full bg-yellow-400 animate-pulse mr-1"}),"Đang kết nối..."]}
731):"Ch\xe0o mừng bạn đến với ph\xf2ng chat"}),0===s.length&&n&&(0,a.jsx)("div",{className:"text-center text-[10px] text-[#F8FAFC]/20 py-4",children:"Chờ tin nhắn mới..."}),s.map((e,t)=>{var s;let l=(s=e.level)>=5?v[5]:v[s]||v[0];return 2===e.type||e.text?.includes("v\xe0o ph\xf2ng tr\xf2 chuyện")?(0,a.jsxs)("div",{className:"flex items-start gap-1.5 text-[11px] leading-relaxed py-[1px] opacity-60",children:[(0,a.jsx)("span",{className:"text-green-500/70 font-medium",children:"Hi"}),(0,a.jsxs)("span",{className:`shrink-0 inline-flex items-center px-1 py-[0.5px] rounded text-[8px] font-bold ${l.bg} ${l.text}`,children:["Lv",e.level]}),(0,a.jsxs)("span",{className:`font-bold ${l.nameCls}`,children:[e.user,":"]}),(0,a.jsx)("span",{className:"text-[#F8FAFC]/40",children:e.text})]},`${e.ts}-${t}`):(0,a.jsxs)("div",{className:"flex items-start gap-1.5 text-[11px] leading-relaxed py-[1px]",children:[(0,a.jsxs)("span",{className:`shrink-0 inline-flex items-center px-1 py-[0.5px] rounded text-[8px] font-bold ${l.bg} ${l.text}`,children:["Lv.",e.level]}),(0,a.jsxs)("span",{className:`font-bold shrink-0 ${l.nameCls}`,children:[e.user,":"]}),(0,a.jsx)("span",{className:"text-[#F8FAFC]/80 break-words min-w-0",children:e.text})]},`${e.ts}-${t}`)}),(0,a.jsx)("div",{ref:o})]}),(0,a.jsxs)("div",{className:"shrink-0 px-3 py-2 bg-[#0F0F23] border-t border-white/[0.04] space-y-2",children:[(0,a.jsx)("div",{className:"flex items-center justify-center gap-3 text-[#F8FAFC]/20 text-[10px]",children:(0,a.jsx)("span",{className:"flex items-center gap-1",children:(0,a.jsx)("svg",{className:"w-3 h-3",viewBox:"0 0 24 24",fill:"currentColor",children:(0,a.jsx)("path",{d:"M12 4.5C7 4.5 2.7 7.6 1 12c1.7 4.4 6 7.5 11 7.5s9.3-3.1 11-7.5c-1.7-4.4-6-7.5-11-7.5zm0 12.5c-2.8 0-5-2.2-5-5s2.2-5 5-5 5 2.2 5 5-2.2 5-5 5zm0-8c-1.7 0-3 1.3-3 3s1.3 3 3 3 3-1.3 3-3-1.3-3-3-3z"})})})}),(0,a.jsxs)("div",{className:"flex bg-[#0F0F23] rounded-2xl overflow-hidden border border-white/[0.08]",children:[(0,a.jsx)("input",{type:"text",placeholder:"Đăng nhập để c\xf9ng chat nh\xe9",disabled:!0,className:"flex-1 bg-transparent px-3 py-2 text-[11px] text-[#F8FAFC] outline-none placeholder:text-[#F8FAFC]/30 disabled:opacity-50"}),(0,a.jsx)("button",{disabled:!0,className:"px-4 text-[11px] font-bold bg-[#E11D48] text-black disabled:bg-white/10 disabled:text-[#F8FAFC]/20 transition-colors",children:"Gửi"})]})]})]})}let y={1:{icon:"⚽",label:"B\xe0n thắng",color:"text-green-400"},2:{icon:"\uD83C\uDD7F️",label:"Phạt đền",color:"text-green-400"},3:{icon:"\uD83D\uDFE1",label:"Thẻ v\xe0ng",color:"text-yellow-400"},4:{icon:"\uD83D\uDFE1\uD83D\uDFE1",label:"Thẻ v\xe0ng 2",color:"text-emerald-600"},5:{icon:"\uD83D\uDD34",label:"Thẻ đỏ",color:"text-red-500"},7:{icon:"\uD83D\uDD04",label:"Phản lưới",color:"text-orange-400"},8:{icon:"\uD83C\uDFE5",label:"Chấn thương",color:"text-[#94A3B8]"},9:{icon:"\uD83D\uDD04",label:"Thay người",color:"text-blue-400"},11:{icon:"⏱️",label:"Hiệp 2",color:"text-[#F8FAFC]/40"},15:{icon:"\uD83E\uDD45",label:"Pen trượt",color:"text-red-400"},19:{icon:"⏱️",label:"Kết th\xfac hiệp",color:"text-[#F8FAFC]/30"},21:{icon:"\uD83C\uDFC6",label:"VAR",color:"text-purple-400"}};function _({events:e}){let t=e?.incidents||e?.events||[];return t&&0!==t.length?(0,a.jsx)("div",{className:"flex flex-col",children:t.map((e,t)=>{let s=y[e.type]||{icon:"•",label:`Event ${e.type}`,color:"text-[#F8FAFC]/50"},l=1===e.position,r=2===e.position,n=e.add_time?`+${e.add_time}`:"",i=`${e.time}'${n}`;return l||r||11!==e.type&&19!==e.type?9===e.type?(0,a.jsxs)("div",{className:`flex items-center gap-2 border-b border-slate-50 p-3 text-xs ${l?"":"flex-row-reverse"}`,children:[(0,a.jsx)("span",{className:"text-slate-400 w-10 text-center shrink-0 text-[10px]",children:i}),(0,a.jsxs)("div",{className:`flex-1 flex flex-col gap-0.5 ${l?"items-start":"items-end"}`,children:[(0,a.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,a.jsx)("span",{className:"text-green-400 text-[10px]",children:"▲"}),(0,a.jsx)("span",{className:"text-[#F8FAFC]/80 text-[11px]",children:e.in_player_name||""})]}),(0,a.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,a.jsx)("span",{className:"text-red-400 text-[10px]",children:"▼"}),(0,a.jsx)("span",{className:"text-[#F8FAFC]/40 text-[11px]",children:e.out_player_name||""})]})]})]},t):(0,a.jsxs)("div",{className:`flex items-center gap-2 border-b border-slate-50 p-3 text-xs ${l?"":"flex-row-reverse"}`,children:[(0,a.jsx)("span",{className:"text-slate-400 w-10 text-center shrink-0 text-[10px]",children:i}),(0,a.jsx)("span",{className:`shrink-0 text-sm ${s.color}`,children:s.icon}),(0,a.jsxs)("div",{className:`flex-1 min-w-0 ${l?"text-left":"text-right"}`,children:[(0,a.jsx)("span",{className:"text-slate-700 text-[11px]",children:e.player_name||""}),e.assist1_name&&(0,a.jsxs)("span",{className:"text-slate-400 text-[10px] ml-1",children:["(kiến tạo: ",e.assist1_name,")"]}),1===e.type&&void 0!==e.home_score&&(0,a.jsxs)("span",{className:"text-[#E11D48] font-bold text-[11px] ml-2",children:[e.home_score," - ",e.away_score]})]})]},t):(0,a.jsx)("div",{className:"flex items-center justify-center py-2 border-b border-slate-50 bg-slate-50",children:(0,a.jsxs)("span",{className:"text-slate-400 text-[10px] uppercase tracking-wider",children:[s.icon," ",s.label," — ",i]})},t)})}):(0,a.jsx)(j,{text:"Diễn biến trận đấu sẽ được cập nhật trực tiếp tại đ\xe2y"})}function k({standings:e}
731){return e&&e.teams&&0!==e.teams.length?(0,a.jsxs)("div",{className:"w-full text-[10px]",children:[(0,a.jsxs)("div",{className:"grid grid-cols-[20px_1fr_24px_24px_32px] bg-slate-50 p-2 text-slate-400 uppercase font-bold sticky top-0",children:[(0,a.jsx)("span",{className:"text-center",children:"#"}),(0,a.jsx)("span",{children:"Team"}),(0,a.jsx)("span",{className:"text-center",children:"T"}),(0,a.jsx)("span",{className:"text-center",children:"B"}),(0,a.jsx)("span",{className:"text-center whitespace-nowrap",children:"Đ"})]}),e.teams.slice(0,15).map((e,t)=>{let s=!!e.data,l=s?parseFloat(e.data[0]):e.rank||t+1,r=s?e.data[1]:e.target_name,n=s?e.data[7]:e.points,i=s?e.data[3]:e.won,o=s?e.data[5]:e.loss;return(0,a.jsxs)("div",{className:"grid grid-cols-[20px_1fr_24px_24px_32px] items-center p-2 border-b border-slate-50 hover:bg-slate-50 transition-colors",children:[(0,a.jsx)("span",{className:"text-center text-slate-500",children:l}),(0,a.jsxs)("div",{className:"flex items-center gap-1.5 min-w-0 pr-2",children:[e.team_logo&&(0,a.jsx)("img",{src:e.team_logo,className:"w-3.5 h-3.5 object-contain",alt:r||"Team logo",loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-slate-700 font-medium truncate",children:r})]}),(0,a.jsx)("span",{className:"text-center text-slate-500",children:i}),(0,a.jsx)("span",{className:"text-center text-slate-500",children:o}),(0,a.jsx)("span",{className:"text-center text-[#E11D48] font-bold",children:n})]},r)})]}):(0,a.jsx)(j,{text:"Bảng xếp hạng sẽ được cập nhật"})}function E({odds:e}){let t=Array.isArray(e)?e:[],s=["2","4","3","16"];function l(e){for(let a of s){let s=t.find(t=>t.odds_type===e&&String(t.company_id)===a);if(s?.odds_info?.length)return s}return t.find(t=>t.odds_type===e&&t.odds_info?.length>0)}function r(e,t){let s=e?.odds_info;if(!s?.length)return["-","-","-"];let a="opening"===t?s.length-1:0;if(!s?.length||!s[a])return["-","-","-"];let l=s[a][2];if("string"!=typeof l)return["-","-","-"];let r=l.split(",");return[r[0]||"-",r[1]||"-",r[2]||"-"]}let n=l("asia"),i=l("eu"),o=l("bs"),c=l("cr"),d=r(n,"opening"),x=r(n,"latest"),h=r(i,"opening"),m=r(i,"latest"),p=r(o,"opening"),u=r(o,"latest"),g=r(c,"opening"),b=r(c,"latest"),f=({children:e})=>(0,a.jsx)("th",{className:"px-2 py-2 text-[9px] sm:text-[10px] font-bold uppercase tracking-wider text-slate-500 border-b border-slate-100 text-center",children:e}),j=({children:e,color:t})=>(0,a.jsx)("td",{className:`px-2 py-2.5 text-center text-[11px] sm:text-xs font-bold ${t||"text-slate-600"} border-b border-slate-50`,children:e});return(0,a.jsxs)("div",{className:"overflow-x-auto",children:[(0,a.jsxs)("table",{className:"w-full min-w-[600px]",children:[(0,a.jsxs)("thead",{children:[(0,a.jsxs)("tr",{className:"bg-slate-50",children:[(0,a.jsx)("th",{className:"px-4 py-2 text-left border-b border-slate-100",rowSpan:2,children:(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("div",{className:"w-7 h-7 rounded bg-gradient-to-br from-[#1d4ed8] to-[#3b82f6] flex items-center justify-center text-white text-[9px] font-black shadow-sm",children:"B"}),(0,a.jsx)("span",{className:"text-slate-600 text-[11px] font-bold tracking-wider",children:"SPORT"})]})}),(0,a.jsx)("th",{colSpan:3,className:"px-1 py-1.5 text-center text-[9px] sm:text-[10px] font-bold uppercase tracking-wider text-[#4681E8] border-b border-l border-slate-100",children:"CƯỢC CH\xc2U \xc1"}),(0,a.jsx)("th",{colSpan:3,className:"px-1 py-1.5 text-center text-[9px] sm:text-[10px] font-bold uppercase tracking-wider text-[#4681E8] border-b border-l border-slate-100",children:"CƯỢC CH\xc2U \xc2U"}),(0,a.jsx)("th",{colSpan:3,className:"px-1 py-1.5 text-center text-[9px] sm:text-[10px] font-bold uppercase tracking-wider text-[#4681E8] border-b border-l border-slate-100",children:"T\xc0I XỈU"}),(0,a.jsx)("th",{colSpan:3,className:"px-1 py-1.5 text-center text-[9px] sm:text-[10px] font-bold uppercase tracking-wider text-[#4681E8] border-b border-l border-slate-100",children:"K\xc8O G\xd3C"})]}),(0,a.jsxs)("tr",{className:"bg-slate-50",children:[(0,a.jsx)(f,{children:"CHỦ"}),(0,a.jsx)(f,{children:"CHẤP"}),(0,a.jsx)(f,{children:"KH\xc1CH"}),(0,a.jsx)(f,{children:"CHỦ"}),(0,a.jsx)(f,{children:"H\xd2A"}),(0,a.jsx)(f,{children:"KH\xc1CH"}),(0,a.jsx)(f,{children:"T\xc0I"}),(0,a.jsx)(f,{children:"TỶ LỆ"}),(0,a.jsx)(f,{children:"XỈU"}),(0,a.jsx)(f,{children:"T\xc0I"}),(0,a.jsx)(f,{children:"TỶ LỆ"}),(0,a.jsx)(f,{children:"XỈU"})]})]}),(0,a.jsxs)("tbody",{children:[(0,a.jsxs)("tr",{className:"hover:bg-slate-50 transition-colors",children:[(0,a.jsx)("td",{className:"px-4 py-2.5 text-[11px] sm:text-xs text-slate-500 font-medium border-b border-slate-50",children:"Tỷ Lệ Mở Cược"}),(0,a.jsx)(j,{children:d[0]}),(0,a.jsx)(j,{color:"text-red-400",children:d[1]}),(0,a.jsx)(j,{children:d[2]}),(0,a.jsx)(j,{children:h[0]}),(0,a.jsx)(j,{children:h[1]}),(0,a.jsx)(j,{children:h[2]}),(0,a.jsx)(j,{children:p[0]}),(0,a.jsx)(j,{children:p[1]}),(0,a.jsx)(j,{children:p[2]}),(0,a.jsx)(j,{children:g[0]}),(0,a.jsx)(j,{children:g[1]}),(0,a.jsx)(j,{children:g[2]})]}),(0,a.jsxs)("tr",{className:"hover:bg-slate-50 transition-colors",children:[(0,a.jsx)("td",{className:"px-4 py-2.5 text-[11px] sm:text-xs text-slate-500 font-medium border-b border-slate-50",children:"Tỷ Lệ Trước Trận"}),(0,a.jsx)(j,{children:x[0]}),(0,a.jsx)(j,{color:"text-red-400",children:x[1]}),(0,a.jsx)(j,{children:x[2]}),(0,a.jsx)(j,{children:m[0]}),(0,a.jsx)(j,{children:m[1]}),(0,a.jsx)(j,{children:m[2]}),(0,a.jsx)(j,{children:u[0]}),(0,a.jsx)(j,{children:u[1]}),(0,a.jsx)(j,{children:u[2]}),(0,a.jsx)(j,{children:b[0]}),(0,a.jsx)(j,{children:b[1]}),(0,a.jsx)(j,{children:b[2]})]}),(0,a.jsxs)("tr",{className:"hover:bg-slate-50 transition-colors bg-white",children:[(0,a.jsxs)("td",{className:"px-4 py-2.5 text-[11px] sm:text-xs text-slate-700 font-bold flex items-center gap-1.5 border-b border-slate-50",children:["Live ",(0,a.jsx)("span",{className:"w-1.5 h-1.5 rounded-full bg-red-500 animate-pulse"})]}),(0,a.jsx)(j,{color:"text-green-400",children:x[0]}),(0,a.jsx)(j,{color:"text-red-400",children:x[1]}),(0,a.jsx)(j,{color:"text-green-400",children:x[2]}),(0,a.jsx)(j,{color:"text-green-400",children:m[0]}),(0,a.jsx)(j,{color:"text-green-400",children:m[1]}),(0,a.jsx)(j,{color:"text-green-400",children:m[2]}),(0,a.jsx)(j,{color:"text-green-400",children:u[0]}),(0,a.jsx)(j,{children:u[1]}),(0,a.jsx)(j,{color:"text-green-400",children:u[2]}),(0,a.jsx)(j,{color:"text-green-400",children:b[0]}),(0,a.jsx)(j,{children:b[1]}),(0,a.jsx)(j,{color:"text-green-400",children:b[2]})]})]})]}),(0,a.jsx)("p",{className:"text-center text-slate-400 text-[10px] py-2.5 border-t border-slate-100",children:"Tỷ lệ k\xe8o sẽ được cập nhật gần giờ thi đấu"})]})}},81057:(e,t,s)=>{"use strict";s.d(t,{Klivevip14ResultsPage:()=>o});var a=s(68019),l=s(10707),r=s(78637),n=s(41427),i=s(6500);function o({initialData:e,selectedLeague:t}){let s=(0,r.useRouter)(),c=(0,r.usePathname)(),d=(0,r.useSearchParams)(),[x,h]=(0,l.useTransition)(),[m,p]=(0,l.useState)(!1),[u,g]=(0,l.useState)(""),{availableLeagues:b,dateGroups:f}=(0,l.useMemo)(()=>(0,i.o8)(e),[e]),j=(0,l.useMemo)(()=>Array.from(new Set(f.map(e=>e.date_header))),[f]),w=d.get("date")||"",v=e=>{let t=new URLSearchParams(d.toString());e&&e!==w?t.set("date",e):t.delete("date"),h(()=>{let e=t.toString();s.push(e?`${c}?${e}`:c,{scroll:!1})})},N=(0,l.useMemo)(()=>{let e=f;return w&&(e=e.filter(e=>e.date_header===w)),(0,i.kK)(e,t)},[f,w,t]),y=(0,l.useMemo)(()=>
731{if(!u)return b;let e=u.toLowerCase();return b.filter(t=>t.name.toLowerCase().includes(e))},[b,u]),_=N.reduce((e,t)=>e+t.matches.length,0);if(0===f.length)return(0,a.jsxs)("div",{className:"max-w-[1440px] mx-auto px-4 py-8",children:[(0,a.jsx)(n.i,{eyebrow:"Kết quả",title:"KẾT QUẢ B\xd3NG Đ\xc1"}),(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center py-16 gap-4",children:[(0,a.jsx)("div",{className:"w-12 h-12 rounded-full border-2 border-[#E11D48]/30 border-t-[#E11D48] animate-spin"}),(0,a.jsx)("span",{className:"text-slate-500 text-sm font-medium tracking-wide",children:"Đang tải kết quả..."})]})]});let k=e=>{let t=new URLSearchParams(d.toString());e?t.set("league",e):t.delete("league"),p(!1),g(""),h(()=>{let e=t.toString();s.push(e?`${c}?${e}`:c,{scroll:!1})})};return(0,a.jsxs)("div",{className:"max-w-[1440px] mx-auto px-4 py-8",children:[(0,a.jsx)(n.i,{eyebrow:"Kết quả",title:"KẾT QUẢ B\xd3NG Đ\xc1",rightSlot:(0,a.jsx)("div",{className:"text-[12px] text-slate-600",children:(0,a.jsx)("span",{className:"text-slate-900/80 font-bold",children:t||"Tất cả giải đấu"})})}),(0,a.jsxs)("div",{className:"flex flex-col md:flex-row gap-4 mb-4 items-start md:items-center justify-between",children:[j.length>0&&(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,a.jsx)("button",{type:"button",onClick:()=>v(""),className:`px-4 py-2 rounded-xl text-sm font-bold transition-all duration-300 ${!w?"bg-gradient-to-r from-[#4681E8] to-[#2563eb] text-white shadow-[0_4px_15px_rgba(70,129,232,0.4)] border border-[#4681E8]/50":"bg-white text-[#64748B] border border-slate-200 hover:bg-slate-50 hover:text-slate-800"}`,children:"Tất cả ng\xe0y"}),j.slice(0,5).map(e=>(0,a.jsx)("button",{type:"button",onClick:()=>v(e),className:`px-4 py-2 rounded-xl text-sm font-bold transition-all duration-300 ${w===e?"bg-gradient-to-r from-[#4681E8] to-[#2563eb] text-white shadow-[0_4px_15px_rgba(70,129,232,0.4)] border border-[#4681E8]/50":"bg-white text-[#64748B] border border-slate-200 hover:bg-slate-50 hover:text-slate-800"}`,children:e},e))]}),(0,a.jsxs)("div",{className:"relative w-full md:w-[320px]",children:[(0,a.jsxs)("button",{onClick:()=>p(!m),className:"w-full flex items-center gap-3 bg-white hover:bg-slate-50 px-4 py-2.5 rounded-xl border border-slate-200 shadow-inner transition-all text-sm",children:[(0,a.jsx)("svg",{className:"w-5 h-5 text-[#4681E8]",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 4a1 1 0 011-1h16a1 1 0 011 1v2.586a1 1 0 01-.293.707l-6.414 6.414a1 1 0 00-.293.707V17l-4 4v-6.586a1 1 0 00-.293-.707L3.293 7.293A1 1 0 013 6.586V4z"})}),(0,a.jsx)("span",{className:"text-slate-700 font-bold flex-1 text-left truncate",children:t||"Chọn giải đấu..."}),(0,a.jsx)("svg",{className:`w-4 h-4 text-slate-400 transition-transform ${m?"rotate-180":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),m&&(0,a.jsxs)("div",{className:"absolute top-full left-0 right-0 mt-2 bg-white border border-slate-200 rounded-2xl shadow-xl z-50 max-h-[300px] overflow-hidden flex flex-col",children:[(0,a.jsx)("div",{className:"p-2 border-b border-slate-100",children:(0,a.jsx)("input",{type:"text",placeholder:"T\xecm giải đấu...",value:u,onChange:e=>g(e.target.value),className:"w-full bg-slate-50 border border-transparent rounded-xl px-4 py-2.5 text-sm text-slate-800 placeholder-slate-400 outline-none focus:border-[#4681E8]/50 transition-colors"})}),(0,a.jsxs)("div",{className:"overflow-y-auto flex-1 pb-2",children:[(0,a.jsx)("button",{type:"button",onClick:()=>k(),className:`block w-full text-left px-4 py-3 text-sm transition-colors ${!t?"bg-[#4681E8]/10 text-[#4681E8] border-l-4 border-[#4681E8]":"text-slate-600 hover:bg-slate-50 hover:text-slate-800"}`,children:"Tất cả giải đấu"}),y.map((e,s)=>(0,a.jsxs)("button",{type:"button",onClick:()=>k(e.name),className:`flex items-center gap-3 px-4 py-3 text-sm transition-colors cursor-pointer ${t===e.name?"bg-[#4681E8]/10 text-[#4681E8] border-l-4 border-[#4681E8]":"text-slate-600 hover:bg-slate-50 hover:text-slate-800"}`,children:[e.icon?(0,a.jsx)("img",{src:e.icon,alt:e.name||"League",className:"w-5 h-5 object-contain shrink-0",loading:"lazy",decoding:"async"}):(0,a.jsx)("div",{className:"w-5 h-5 rounded-md bg-slate-200 shrink-0"}),(0,a.jsx)("span",{className:"truncate",children:e.name})]},s))]})]})]})]}),x&&(0,a.jsxs)("div",{className:"mb-4 inline-flex items-center gap-2 rounded-full border border-slate-200 bg-white px-4 py-2 text-xs text-slate-500 shadow-sm",children:[(0,a.jsx)("span",{className:"h-2 w-2 rounded-full bg-[#E11D48] animate-pulse shadow-[0_0_8px_rgba(225,29,72,0.8)]"}),(0,a.jsx)("span",{className:"font-bold tracking-wide",children:"Đang tải kết quả từ server..."})]}),(0,a.jsx)("div",{className:"space-y-4",children:0===N.length?(0,a.jsx)("div",{className:"text-center py-16 text-[#64748B] font-medium tracking-wide",children:"Kh\xf4ng c\xf3 kết quả n\xe0o"}):N.map((e,t)=>(0,a.jsxs)("div",{className:"overflow-hidden rounded-2xl border border-slate-200 bg-white shadow-[0_8px_30px_rgba(0,0,0,0.06)]",children:[(0,a.jsx)("div",{className:"bg-slate-50 px-5 py-3 border-b border-slate-100 flex items-center justify-between",children:(0,a.jsxs)("span",{className:"text-[12px] text-slate-500 font-bold uppercase tracking-widest",children:[e.league_round?e.league_round:"V\xf2ng đấu",(0,a.jsx)("span",{className:"text-[#E11D48] ml-2 font-mono text-[11px] bg-[#E11D48]/10 px-2 py-0.5 rounded-full border border-[#
731E11D48]/20",children:e.date_header})]})}),e.matches.map((e,t)=>{var s;return(0,a.jsx)("div",{className:"bg-transparent hover:bg-slate-50 border-b border-slate-100 last:border-0 transition-colors group cursor-default",children:(0,a.jsxs)("div",{className:"flex items-center py-4 px-5 gap-4",children:[(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center min-w-[56px] shrink-0 border-r border-slate-100 pr-4",children:[(0,a.jsx)("span",{className:"text-[9px] text-slate-400 uppercase tracking-widest mb-1 font-bold",children:"L\xfac"}),(0,a.jsx)("span",{className:"text-[13px] text-slate-700 font-mono font-black",children:e.time})]}),(0,a.jsxs)("div",{className:"flex-1 flex items-center justify-end gap-3 min-w-0",children:[(0,a.jsx)("span",{className:"text-[14px] text-slate-800 font-bold truncate text-right group-hover:text-slate-900 transition-colors",children:e.home_team}),e.home_logo?(0,a.jsx)("div",{className:"w-8 h-8 rounded-full bg-slate-100 border border-slate-200 p-1 flex items-center justify-center shadow-sm",children:(0,a.jsx)("img",{src:e.home_logo,alt:e.home_team||"Home team",className:"w-full h-full object-contain",loading:"lazy"})}):(0,a.jsx)("div",{className:"w-8 h-8 rounded-full bg-slate-100 shrink-0 border border-slate-200 flex items-center justify-center text-[10px] font-bold text-slate-400",children:"?"})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center min-w-[90px] shrink-0 bg-slate-50 rounded-xl py-2 px-2 border border-slate-200 shadow-inner group-hover:border-[#4681E8]/40 transition-colors",children:[(0,a.jsx)("span",{className:`text-[22px] leading-none font-black tracking-widest drop-shadow-[0_2px_4px_rgba(0,0,0,0.8)] ${!(s=e.score)||"-"===s?"text-slate-400":"text-slate-800"}`,children:e.score}),e.ht_score&&(0,a.jsxs)("span",{className:"text-[10px] text-slate-500 font-mono mt-1 font-bold",children:["HT: ",e.ht_score]})]}),(0,a.jsxs)("div",{className:"flex-1 flex items-center gap-3 min-w-0",children:[e.away_logo?(0,a.jsx)("div",{className:"w-8 h-8 rounded-full bg-slate-100 border border-slate-200 p-1 flex items-center justify-center shadow-sm",children:(0,a.jsx)("img",{src:e.away_logo,alt:e.away_team||"Away team",className:"w-full h-full object-contain",loading:"lazy"})}):(0,a.jsx)("div",{className:"w-8 h-8 rounded-full bg-slate-100 shrink-0 border border-slate-200 flex items-center justify-center text-[10px] font-bold text-slate-400",children:"?"}),(0,a.jsx)("span",{className:"text-[14px] text-slate-800 font-bold truncate text-left group-hover:text-slate-900 transition-colors",children:e.away_team})]})]})},t)})]},t))}),(0,a.jsxs)("div",{className:"mt-6 text-center text-xs text-[#64748B] font-bold uppercase tracking-widest drop-shadow-sm",children:["Hiển thị ",_," kết quả trận đấu"]})]})}},81072:(e,t,s)=>{"use strict";s.d(t,{Klivevip13SchedulePage:()=>d});var a=s(68019),l=s(10707),r=s(78637),n=s(89619);function i({html:e}){return e?.trim()?(0,a.jsx)("section",{className:"relative mt-10 mb-6",children:(0,a.jsx)("div",{className:"seo-prose relative",children:(0,a.jsx)("div",{dangerouslySetInnerHTML:{__html:e},className:"text-slate-600 text-[14px] leading-[1.85] px-1 [&_strong]:text-slate-900 [&_a]:text-[#4681E8]"})})}):null}s(18556);let o=`
732<h2>Lịch thi đấu b\xf3ng đ\xe1 - Cập nhật lịch b\xf3ng đ\xe1 h\xf4m nay nhanh v\xe0 ch\xednh x\xe1c</h2>
733
734<p>Để <strong>xem lịch thi đấu b\xf3ng đ\xe1</strong> nhanh, ch\xednh x\xe1c v\xe0 đầy đủ nhất, Klive ch\xednh l\xe0 nơi bạn n\xean chọn. Ch\xfang t\xf4i cập nhật lịch thi đấu cho to\xe0n bộ c\xe1c giải đấu trong nước v\xe0 quốc tế, gi\xfap bạn kh\xf4ng bỏ lỡ bất kỳ trận cầu hấp dẫn n\xe0o.</p>
735
736<img src="/images/seo/schedule-football.png" alt="Lịch thi đấu b\xf3ng đ\xe1 h\xf4m nay tại Klive" loading="lazy" />
737
738<div class="toc-box">
739  <h3>Nội dung ch\xednh</h3>
740  <ol>
741    <li>Lịch thi đấu b\xf3ng đ\xe1 trực tuyến h\xe0ng đầu</li>
742    <li>Lịch b\xf3ng đ\xe1 nhanh v\xe0 ch\xednh x\xe1c</li>
743    <li>Cập nhật lịch Ngoại Hạng Anh v\xe0 Champions League</li>
744    <li>C\xe1ch xem lịch thi đấu hiệu quả nhất</li>
745  </ol>
746</div>
747
748<h2>Lịch thi đấu b\xf3ng đ\xe1 trực tuyến h\xe0ng đầu</h2>
749<p>Trong thời đại số, kh\xf4ng ai c\xf2n xem lịch b\xf3ng đ\xe1 tr\xean TV hay b\xe1o giấy nữa. Tất cả đ\xe3 chuyển sang theo d\xf5i online, v\xe0 Klive ch\xednh l\xe0 nền tảng cập nhật lịch b\xf3ng đ\xe1 được đ\xe1nh gi\xe1 cao nhất.</p>
750
751<p>Khi truy cập Klive, bạn c\xf3 thể xem lịch thi đấu của bất kỳ giải đấu b\xf3ng đ\xe1 n\xe0o tr\xean thế giới một c\xe1ch ho\xe0n to\xe0n miễn ph\xed. Th\xf4ng tin lịch đấu được cập nhật sớm nhất v\xe0 chi tiết đến từng ph\xfat.</p>
752
753<h2>Lịch b\xf3ng đ\xe1 nhanh v\xe0 ch\xednh x\xe1c</h2>
754<p>Klive kh\xf4ng chỉ cung cấp lịch thi đấu c\xe1c giải đấu h\xe0ng đầu m\xe0 c\xf2n cập nhật lịch ph\xe1t s\xf3ng tr\xean c\xe1c k\xeanh truyền h\xecnh Việt Nam như K+, FPT Play, VTV Sports. Gi\xfap bạn biết trận n\xe0o được chiếu trực tiếp tr\xean TV v\xe0 sắp xếp thời gian hợp l\xfd.</p>
755
756<h2>Cập nhật lịch Ngoại Hạng Anh v\xe0 Champions League</h2>
757<p>Ngoại Hạng Anh v\xe0 Champions League l\xe0 hai giải đấu được quan t\xe2m nhất. Tại Klive, bạn lu\xf4n nắm được lịch đấu đầy đủ từ v\xf2ng bảng đến chung kết, k\xe8m theo th\xf4ng tin về đội h\xecnh dá»± kiến, phong độ v\xe0 lịch sá»­ đối đầu để chuẩn bị tốt nhất cho má
757»—i trận cầu.</p>
758
759<p>Kết hợp lịch thi đấu với trang trực tiếp b\xf3ng đ\xe1, bạn sẽ c\xf3 trải nghiệm theo d\xf5i b\xf3ng đ\xe1 ho\xe0n hảo nhất - biết trước, xem ngay, kh\xf4ng bỏ lỡ!</p>
760`;var c=s(35793);function d({initialData:e}){let t=(0,r.usePathname)(),[s,h]=(0,l.useState)(!1),[m,p]=(0,l.useState)(new Set),[u,g]=(0,l.useState)(""),[b,f]=(0,l.useState)(!1),[j,w]=(0,l.useState)(0),v=(0,l.useMemo)(()=>(0,c.p_)(e),[e]),N=v.dateTabs,y=(0,l.useMemo)(()=>{if(!v.selectedDate)return 0;let e=N.findIndex(e=>(e.dataValue||e.date)===v.selectedDate);return e>=0?e:0},[N,v.selectedDate]),[_,k]=(0,l.useState)(y),[E,C]=(0,l.useState)(v.leagues||[]),S=(0,l.useMemo)(()=>{if(!u)return E;let e=u.toLowerCase();return E.filter(t=>t.league_name.toLowerCase().includes(e)||t.matches.some(t=>t.home_team.toLowerCase().includes(e)||t.away_team.toLowerCase().includes(e)))},[E,u]),L=Math.max(0,N.length-7),$=N.slice(j,j+7),F=j>0,T=j<L,A=S.reduce((e,t)=>e+t.matches.length,0);return((0,l.useEffect)(()=>{if(!v.selectedDate||!N.length)return;let e=N.findIndex(e=>(e.dataValue||e.date)===v.selectedDate);e>=0&&k(e)},[N,v.selectedDate]),(0,l.useEffect)(()=>{_<j?w(Math.max(0,_)):_>=j+7&&w(Math.min(L,_-7+1))},[_,L,j]),e)?(0,a.jsxs)("div",{className:"max-w-[1440px] mx-auto px-4 py-8",children:[(0,a.jsx)(n.V,{eyebrow:"Lịch thi đấu",title:"LỊCH THI ĐẤU",rightSlot:(0,a.jsxs)("div",{className:"text-[12px] text-slate-500 font-bold uppercase tracking-wider",children:[(0,a.jsx)("span",{className:"text-[#E11D48] font-black",children:S.reduce((e,t)=>e+t.matches.length,0)})," trận đấu"]})}),(0,a.jsxs)("div",{className:"flex items-center mb-4 rounded-xl overflow-hidden border border-slate-200 bg-white shadow-sm",children:[(0,a.jsx)("button",{type:"button",disabled:!F,onClick:()=>w(e=>Math.max(0,e-1)),className:`flex items-center justify-center w-8 h-[52px] bg-slate-100 border-r border-slate-200 text-slate-600 hover:text-slate-800 hover:bg-slate-200 transition-all shrink-0 ${!F?"opacity-30":"cursor-pointer"}`,children:(0,a.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2.5,d:"M15 19l-7-7 7-7"})})}),(0,a.jsx)("div",{className:"flex flex-1",children:$.map((e,s)=>{let l=j+s;return(0,a.jsxs)("button",{type:"button",onClick:()=>(e=>{let s=N[e];if(!s||e===_)return;let a=s.dataValue||s.date;a&&(k(e),p(new Set),h(!0),window.history.replaceState(null,"",`${t}?date=${encodeURIComponent(a)}`),fetch(`/api/socolive/fixtures?date=${encodeURIComponent(a)}`,{cache:"no-store"}).then(e=>e.ok?e.json():null).then(e=>{e&&C((0,c.p_)(e).leagues||[])}).finally(()=>h(!1)))})(l),className:`flex-1 flex flex-col items-center justify-center h-[52px] border-b-[3px] transition-all duration-300 ${_===l?"border-[#4681E8] text-[#4681E8] bg-[#4681E8]/5":"border-transparent text-[#64748B] hover:text-[#94A3B8] hover:bg-slate-100"}`,children:[(0,a.jsx)("span",{className:`text-[11px] font-bold uppercase tracking-widest ${_===l?"text-[#4681E8]":""}`,children:e.label}),(0,a.jsx)("span",{className:`text-[12px] font-mono mt-0.5 ${_===l?"text-slate-800 font-black":""}`,children:e.date})]},`tab-${l}`)})}),(0,a.jsx)("button",{type:"button",disabled:!T,onClick:()=>w(e=>Math.min(L,e+1)),className:`flex items-center justify-center w-8 h-[52px] bg-slate-100 border-l border-slate-200 text-slate-600 hover:text-slate-800 hover:bg-slate-200 transition-all shrink-0 ${!T?"opacity-30":"cursor-pointer"}`,children:(0,a.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2.5,d:"M9 5l7 7-7 7"})})})]}),(0,a.jsxs)("div",{className:"relative mb-4",children:[(0,a.jsxs)("button",{onClick:()=>f(!b),className:"flex items-center gap-3 bg-white hover:bg-slate-50 px-4 py-2.5 rounded-xl border border-slate-200 shadow-sm transition-all text-sm group",children:[(0,a.jsx)("svg",{className:"w-5 h-5 text-[#E11D48] transition-colors group-hover:text-[#F43F5E]",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 6h16M4 12h16M4 18h16"})}),(0,a.jsx)("span",{className:"text-slate-700 font-bold text-[13px] uppercase tracking-wide",children:"Danh s\xe1ch giải đấu"}),(0,a.jsx)("svg",{className:`w-4 h-4 text-slate-500 transition-transform duration-300 ${b?"rotate-180":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),b&&(0,a.jsxs)("div",{className:"absolute top-full left-0 mt-2 w-[360px] bg-white border border-slate-200 rounded-2xl shadow-[0_24px_80px_rgba(0,0,0,0.12)] z-50 max-h-[320px] overflow-hidden flex flex-col",children:[(0,a.jsx)("div",{className:"p-2 border-b border-slate-100",children:(0,a.jsx)("input",{type:"text",placeholder:"T\xecm giải đấu...",value:u,onChange:e=>g(e.target.value),className:"w-full bg-slate-50 border border-transparent roun
760ded-xl px-4 py-2.5 text-sm text-slate-800 placeholder-slate-400 outline-none focus:border-[#4681E8]/50 transition-colors"})}),(0,a.jsx)("div",{className:"overflow-y-auto flex-1 py-2",children:E.map((e,t)=>(0,a.jsxs)("button",{type:"button",onClick:()=>{g(e.league_name),f(!1)},className:"w-full flex items-center gap-3 px-4 py-2.5 hover:bg-slate-50 text-left text-[13px] transition-colors",children:[e.league_icon?(0,a.jsx)("img",{src:e.league_icon,alt:e.league_name||"League",className:"w-5 h-5 object-contain shrink-0",loading:"lazy",decoding:"async"}):(0,a.jsx)("div",{className:"w-5 h-5 rounded-md bg-slate-200 shrink-0"}),(0,a.jsx)("span",{className:"text-slate-600 truncate flex-1 font-medium",children:e.league_name}),(0,a.jsx)("span",{className:"text-[11px] text-[#E11D48] font-bold shrink-0 px-2 py-0.5 bg-[#E11D48]/10 rounded-md border border-[#E11D48]/20",children:e.matches.length})]},t))})]})]}),(0,a.jsxs)("div",{className:"grid grid-cols-[1fr_60px_55px_100px_100px_90px] bg-slate-50 border border-slate-200 rounded-t-xl px-4 py-3 text-[11px] text-slate-500 font-black uppercase tracking-widest shadow-inner",children:[(0,a.jsx)("span",{children:"Trận đấu"}),(0,a.jsx)("span",{className:"text-center",children:"Tỷ số"}),(0,a.jsx)("span",{className:"text-center",children:"Hiệp 1"}),(0,a.jsx)("span",{className:"text-center",children:"Cược chấp"}),(0,a.jsx)("span",{className:"text-center",children:"T\xe0i/Xỉu"}),(0,a.jsx)("span",{className:"text-center",children:"1 X 2"})]}),(0,a.jsxs)("div",{className:"border border-slate-200 border-t-0 rounded-b-xl overflow-hidden relative shadow-[0_8px_30px_rgba(0,0,0,0.06)]",children:[s&&(0,a.jsx)("div",{className:"absolute inset-0 z-10 bg-white/80 backdrop-blur-[2px]",children:(0,a.jsx)("div",{className:"space-y-0",children:[...Array(6)].map((e,t)=>(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 px-4 py-3.5 bg-slate-100 border-b border-slate-200",children:[(0,a.jsx)("div",{className:"w-4 h-4 rounded bg-slate-300 animate-pulse"}),(0,a.jsx)("div",{className:"h-3.5 rounded bg-slate-200 animate-pulse",style:{width:`${120+30*t}px`}})]}),[void 0,void 0].map((e,t)=>(0,a.jsxs)("div",{className:"grid grid-cols-[1fr_60px_55px_100px_100px_90px] items-center px-4 py-3 border-b border-slate-100",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)("div",{className:"w-10 h-3.5 rounded bg-slate-200 animate-pulse"}),(0,a.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,a.jsx)("div",{className:"h-3 w-24 rounded bg-slate-100 animate-pulse"}),(0,a.jsx)("div",{className:"h-3 w-20 rounded bg-slate-100 animate-pulse"})]})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5",children:[(0,a.jsx)("div",{className:"h-3 w-5 rounded bg-slate-100 animate-pulse"}),(0,a.jsx)("div",{className:"h-3 w-5 rounded bg-slate-100 animate-pulse"})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5",children:[(0,a.jsx)("div",{className:"h-3 w-5 rounded bg-slate-100 animate-pulse"}),(0,a.jsx)("div",{className:"h-3 w-5 rounded bg-slate-100 animate-pulse"})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5",children:[(0,a.jsx)("div",{className:"h-3 w-14 rounded bg-slate-100 animate-pulse"}),(0,a.jsx)("div",{className:"h-3 w-10 rounded bg-slate-100 animate-pulse"})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5",children:[(0,a.jsx)("div",{className:"h-3 w-14 rounded bg-slate-100 animate-pulse"}),(0,a.jsx)("div",{className:"h-3 w-10 rounded bg-slate-100 animate-pulse"})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5",children:[(0,a.jsx)("div",{className:"h-3 w-10 rounded bg-slate-100 animate-pulse"}),(0,a.jsx)("div",{className:"h-3 w-10 rounded bg-slate-100 animate-pulse"}),(0,a.jsx)("div",{className:"h-3 w-10 rounded bg-slate-100 animate-pulse"})]})]},t))]},t))})}),0!==S.length||s?S.map((e,t)=>(0,a.jsxs)("div",{id:`league-${t}`,children:[(0,a.jsxs)("button",{onClick:()=>{p(e=>{let s=new Set(e);return s.has(t)?s.delete(t):s.add(t),s})},className:"w-full flex items-center gap-3 px-4 py-3 bg-slate-50 hover:bg-slate-100 border-b border-slate-100 transition-colors text-left group",children:[(0,a.jsx)("svg",{className:`w-4 h-4 text-[#E11D48] transition-transform duration-300 shrink-0 ${m.has(t)?"-rotate-90":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2.5,d:"M19 9l-7 7-7-7"})}),e.league_icon&&(0,a.jsx)("div",{className:"w-6 h-6 rounded-full bg-slate-100 p-0.5 border border-slate-200 flex items-center justify-center shadow-sm",children:(0,a.jsx)("img",{src:e.league_icon,alt:e.league_name||"League",className:"w-4 h-4 object-contain shrink-0",loading:"lazy",decoding:"async"})}),(0,a.jsx)("span",{className:"text-[13px] font-bold text-slate-700 flex-1 truncate uppercase tracking-widest",children:e.league_name}),(0,a.jsxs)("span",{className:"text-[11px] text-[#E11D48] font-bold shrink-0 ml-1 px-2 py-0.5 bg-[#E11D48]/10 rounded border border-[#
760E11D48]/20 group-hover:bg-[#E11D48]/20 transition-colors",children:["BXH ",(0,a.jsx)("svg",{className:"inline w-3 h-3 ml-0.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 6h16M4 10h16M4 14h16M4 18h16"})})]})]}),!m.has(t)&&e.matches.map((e,t)=>(0,a.jsxs)("div",{className:"grid grid-cols-[1fr_60px_55px_100px_100px_90px] items-center px-4 py-3 bg-transparent hover:bg-slate-50 border-b border-slate-100 last:border-0 transition-colors group cursor-default",children:[(0,a.jsxs)("div",{className:"flex items-center gap-4 min-w-0",children:[(0,a.jsx)("span",{className:"text-[#E11D48] font-mono text-[13px] font-black min-w-[42px] shrink-0 drop-shadow-[0_0_4px_rgba(225,29,72,0.4)]",children:e.time}),(0,a.jsxs)("div",{className:"flex flex-col gap-1 min-w-0 flex-1",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[e.home_logo&&(0,a.jsx)("img",{src:e.home_logo,alt:e.home_team||"Home team",className:"w-4 h-4 object-contain shrink-0 filter drop-shadow-[0_2px_2px_rgba(0,0,0,0.8)]",loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-[13px] text-slate-700 font-medium truncate group-hover:text-slate-900 transition-colors",children:e.home_team})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[e.away_logo&&(0,a.jsx)("img",{src:e.away_logo,alt:e.away_team||"Away team",className:"w-4 h-4 object-contain shrink-0",loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-[13px] text-slate-700 font-medium truncate group-hover:text-slate-900 transition-colors",children:e.away_team})]})]})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center",children:[(0,a.jsx)("span",{className:"text-[12px] text-[var(--accent-cyan)] font-mono font-bold",children:"-"!==e.score?e.score:"-"}),(0,a.jsx)("span",{className:"text-[12px] text-[#64748B]",children:"-"})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center",children:[(0,a.jsx)("span",{className:"text-[12px] text-[#64748B]",children:"-"}),(0,a.jsx)("span",{className:"text-[12px] text-[#64748B]",children:"-"})]}),(0,a.jsx)(x,{values:e.handicap,hasLine:!0}),(0,a.jsx)(x,{values:e.over_under,hasLine:!0}),(0,a.jsx)("div",{className:"flex flex-col items-center gap-0",children:e.one_x_two?.length>0?e.one_x_two.map((e,t)=>(0,a.jsx)("span",{className:"text-[11px] text-slate-500 leading-[18px]",children:e||"-"},t)):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"text-[11px] text-[#64748B] leading-[18px]",children:"-"}),(0,a.jsx)("span",{className:"text-[11px] text-[#64748B] leading-[18px]",children:"-"}),(0,a.jsx)("span",{className:"text-[11px] text-[#64748B] leading-[18px]",children:"-"})]})})]},t))]},t)):(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center py-20 gap-3 bg-slate-50",children:[(0,a.jsx)("svg",{className:"w-12 h-12 text-slate-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",strokeWidth:1.5,children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6.75 3v2.25M17.25 3v2.25M3 18.75V7.5a2.25 2.25 0 012.25-2.25h13.5A2.25 2.25 0 0121 7.5v11.25m-18 0A2.25 2.25 0 005.25 21h13.5A2.25 2.25 0 0021 18.75m-18 0v-7.5A2.25 2.25 0 015.25 9h13.5A2.25 2.25 0 0121 11.25v7.5"})}),(0,a.jsx)("span",{className:"text-slate-500 font-medium tracking-wide",children:"Kh\xf4ng c\xf3 trận đấu n\xe0o cho ng\xe0y n\xe0y"}),(0,a.jsx)("span",{className:"text-slate-400 text-[12px]",children:"H\xe3y thử chọn một ng\xe0y kh\xe1c"})]})]}),(0,a.jsxs)("div",{className:"mt-6 text-center text-[11px] text-[#64748B] uppercase tracking-widest font-bold drop-shadow-sm",children:["Tổng cộng ",A," trận đấu trong ",S.length," giải"]}),(0,a.jsx)(i,{html:o})]}):(0,a.jsxs)("div",{className:"max-w-[1440px] mx-auto px-4 py-8",children:[(0,a.jsx)(n.V,{eyebrow:"Lịch thi đấu",title:"LỊCH THI ĐẤU"}),(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center py-16 gap-4",children:[(0,a.jsx)("div",{className:"w-12 h-12 rounded-full border-2 border-[#E11D48]/30 border-t-[#E11D48] animate-spin"}),(0,a.jsx)("span",{className:"text-slate-500 text-sm font-medium tracking-wide",children:"Đang tải lịch thi đấu..."})]})]})}function x({values:e,hasLine:t}){return e&&0!==e.length?t&&e.length>=3?(0,a.jsxs)("div",{className:"flex flex-col items-center gap-0",children:[(0,a.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,a.jsx)("span",{className:"text-[11px] text-[#E11D48] leading-[18px] font-bold",children:e[0]}),(0,a.jsx)("span",{className:"text-[11px] text-slate-500 leading-[18px]",children:e[1]})]}),(0,a.jsx)("span",{className:"text-[11px] text-slate-500 leading-[18px]",children:e[2]})]}):(0,a.jsx)("div",{className:"flex flex-col items-center gap-0",children:e.map((e,t)=>(0,a.jsx)("span",{className:"text-[11px] text-slate-500 leading-[18px]",children:e||"-"},t))}):(0,a.jsxs)("div",{className:"flex flex-col items-center",children:[(0,a.jsx)("span",{className:"text-[11px] text-[#64748B] leading-[18px]",children:"-"}),(0,a.jsx)("span",{className:"text-[11px] text-[#64748B] leading-[18px]",children:"-"})]})}},81443:(e,t,s)=>{"use strict";s.d(t,{_:()=>r});var a=s(68019),l=s(70508);
760function r({eyebrow:e,title:t,titleAddon:s,rightSlot:n,className:i}){return(0,a.jsx)("div",{className:(0,l.cn)("relative mb-5 overflow-hidden border-b border-slate-200",i),children:(0,a.jsxs)("div",{className:"flex items-center justify-between px-1 py-4 min-h-[56px]",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 min-w-0",children:[(0,a.jsx)("span",{className:"h-8 w-1 shrink-0 rounded-sm bg-gradient-to-b from-[#4681E8] to-[#55CAF1] shadow-[0_0_10px_rgba(70,129,232,0.5)]"}),(0,a.jsxs)("div",{className:"min-w-0",children:[e&&(0,a.jsx)("div",{className:"text-[10px] font-bold uppercase tracking-[0.2em] text-[#4681E8]/60 mb-0.5",children:e}),(0,a.jsxs)("div",{className:"flex items-center gap-2.5 flex-wrap",children:[(0,a.jsx)("h1",{className:"text-[18px] sm:text-[22px] font-black uppercase tracking-tight text-slate-800 leading-none",children:t}),s]})]})]}),n&&(0,a.jsx)("div",{className:"hidden sm:flex items-center gap-2 text-right shrink-0 ml-4",children:n})]})})}},81644:(e,t,s)=>{"use strict";s.d(t,{Klivevip15ResultsPage:()=>o});var a=s(68019),l=s(10707),r=s(78637),n=s(71099),i=s(25619);function o({initialData:e,selectedLeague:t}){let s=(0,r.useRouter)(),c=(0,r.usePathname)(),d=(0,r.useSearchParams)(),[x,h]=(0,l.useTransition)(),[m,p]=(0,l.useState)(!1),[u,g]=(0,l.useState)(""),{availableLeagues:b,dateGroups:f}=(0,l.useMemo)(()=>(0,i.o8)(e),[e]),j=(0,l.useMemo)(()=>Array.from(new Set(f.map(e=>e.date_header))),[f]),w=d.get("date")||"",v=e=>{let t=new URLSearchParams(d.toString());e&&e!==w?t.set("date",e):t.delete("date"),h(()=>{let e=t.toString();s.push(e?`${c}?${e}`:c,{scroll:!1})})},N=(0,l.useMemo)(()=>{let e=f;return w&&(e=e.filter(e=>e.date_header===w)),(0,i.kK)(e,t)},[f,w,t]),y=(0,l.useMemo)(()=>{if(!u)return b;let e=u.toLowerCase();return b.filter(t=>t.name.toLowerCase().includes(e))},[b,u]),_=N.reduce((e,t)=>e+t.matches.length,0);if(0===f.length)return(0,a.jsxs)("div",{className:"max-w-[1440px] mx-auto px-4 py-8",children:[(0,a.jsx)(n.f,{eyebrow:"Kết quả",title:"KẾT QUẢ B\xd3NG Đ\xc1"}),(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center py-16 gap-4",children:[(0,a.jsx)("div",{className:"w-12 h-12 rounded-full border-2 border-[#E11D48]/30 border-t-[#E11D48] animate-spin"}),(0,a.jsx)("span",{className:"text-slate-500 text-sm font-medium tracking-wide",children:"Đang tải kết quả..."})]})]});let k=e=>{let t=new URLSearchParams(d.toString());e?t.set("league",e):t.delete("league"),p(!1),g(""),h(()=>{let e=t.toString();s.push(e?`${c}?${e}`:c,{scroll:!1})})};return(0,a.jsxs)("div",{className:"max-w-[1440px] mx-auto px-4 py-8",children:[(0,a.jsx)(n.f,{eyebrow:"Kết quả",title:"KẾT QUẢ B\xd3NG Đ\xc1",rightSlot:(0,a.jsx)("div",{className:"text-[12px] text-slate-600",children:(0,a.jsx)("span",{className:"text-slate-900/80 font-bold",children:t||"Tất cả giải đấu"})})}),(0,a.jsxs)("div",{className:"flex flex-col md:flex-row gap-4 mb-4 items-start md:items-center justify-between",children:[j.length>0&&(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,a.jsx)("button",{type:"button",onClick:()=>v(""),className:`px-4 py-2 rounded-xl text-sm font-bold transition-all duration-300 ${!w?"bg-gradient-to-r from-[#4681E8] to-[#2563eb] text-white shadow-[0_4px_15px_rgba(70,129,232,0.4)] border border-[#4681E8]/50":"bg-white text-[#64748B] border border-slate-200 hover:bg-slate-50 hover:text-slate-800"}`,children:"Tất cả ng\xe0y"}),j.slice(0,5).map(e=>(0,a.jsx)("button",{type:"button",onClick:()=>v(e),className:`px-4 py-2 rounded-xl text-sm font-bold transition-all duration-300 ${w===e?"bg-gradient-to-r from-[#4681E8] to-[#2563eb] text-white shadow-[0_4px_15px_rgba(70,129,232,0.4)] border border-[#4681E8]/50":"bg-white text-[#64748B] border border-slate-200 hover:bg-slate-50 hover:text-slate-800"}`,children:e},e))]}),(0,a.jsxs)("div",{className:"relative w-full md:w-[320px]",children:[(0,a.jsxs)("button",{onClick:()=>p(!m),className:"w-full flex items-center gap-3 bg-white hover:bg-slate-50 px-4 py-2.5 rounded-xl border border-slate-200 shadow-inner transition-all text-sm",children:[(0,a.jsx)("svg",{className:"w-5 h-5 text-[#4681E8]",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 4a1 1 0 011-1h16a1 1 0 011 1v2.586a1 1 0 01-.293.707l-6.414 6.414a1 1 0 00-.293.707V17l-4 4v-6.586a1 1 0 00-.293-.707L3.293 7.293A1 1 0 013 6.586V4z"})}),(0,a.jsx)("span",{className:"text-slate-700 font-bold flex-1 text-left truncate",children:t||"Chọn giải đấu..."}),(0,a.jsx)("svg",{className:`w-4 h-4 text-slate-400 transition-transform ${m?"rotate-180":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),m&&(0,a.jsxs)("div",{className:"absolute top-full left-0 right-0 mt-2 bg-white border border-slate-200 rounded-2xl shadow-xl z-50 max-h-[300px] overflow-hidden flex flex-col",children:[(0,a.jsx)("div",{className:"p-2 border-b border-slate-100",children:(0,a.jsx)("input",{type:"text",placeholder:"T\xecm giải đấu...",value:u,onChange:e=>g(e.target.value),className:"w-full bg-slate-50 border border-transparent roun
760ded-xl px-4 py-2.5 text-sm text-slate-800 placeholder-slate-400 outline-none focus:border-[#4681E8]/50 transition-colors"})}),(0,a.jsxs)("div",{className:"overflow-y-auto flex-1 pb-2",children:[(0,a.jsx)("button",{type:"button",onClick:()=>k(),className:`block w-full text-left px-4 py-3 text-sm transition-colors ${!t?"bg-[#4681E8]/10 text-[#4681E8] border-l-4 border-[#4681E8]":"text-slate-600 hover:bg-slate-50 hover:text-slate-800"}`,children:"Tất cả giải đấu"}),y.map((e,s)=>(0,a.jsxs)("button",{type:"button",onClick:()=>k(e.name),className:`flex items-center gap-3 px-4 py-3 text-sm transition-colors cursor-pointer ${t===e.name?"bg-[#4681E8]/10 text-[#4681E8] border-l-4 border-[#4681E8]":"text-slate-600 hover:bg-slate-50 hover:text-slate-800"}`,children:[e.icon?(0,a.jsx)("img",{src:e.icon,alt:e.name||"League",className:"w-5 h-5 object-contain shrink-0",loading:"lazy",decoding:"async"}):(0,a.jsx)("div",{className:"w-5 h-5 rounded-md bg-slate-200 shrink-0"}),(0,a.jsx)("span",{className:"truncate",children:e.name})]},s))]})]})]})]}),x&&(0,a.jsxs)("div",{className:"mb-4 inline-flex items-center gap-2 rounded-full border border-slate-200 bg-white px-4 py-2 text-xs text-slate-500 shadow-sm",children:[(0,a.jsx)("span",{className:"h-2 w-2 rounded-full bg-[#E11D48] animate-pulse shadow-[0_0_8px_rgba(225,29,72,0.8)]"}),(0,a.jsx)("span",{className:"font-bold tracking-wide",children:"Đang tải kết quả từ server..."})]}),(0,a.jsx)("div",{className:"space-y-4",children:0===N.length?(0,a.jsx)("div",{className:"text-center py-16 text-[#64748B] font-medium tracking-wide",children:"Kh\xf4ng c\xf3 kết quả n\xe0o"}):N.map((e,t)=>(0,a.jsxs)("div",{className:"overflow-hidden rounded-2xl border border-slate-200 bg-white shadow-[0_8px_30px_rgba(0,0,0,0.06)]",children:[(0,a.jsx)("div",{className:"bg-slate-50 px-5 py-3 border-b border-slate-100 flex items-center justify-between",children:(0,a.jsxs)("span",{className:"text-[12px] text-slate-500 font-bold uppercase tracking-widest",children:[e.league_round?e.league_round:"V\xf2ng đấu",(0,a.jsx)("span",{className:"text-[#E11D48] ml-2 font-mono text-[11px] bg-[#E11D48]/10 px-2 py-0.5 rounded-full border border-[#E11D48]/20",children:e.date_header})]})}),e.matches.map((e,t)=>{var s;return(0,a.jsx)("div",{className:"bg-transparent hover:bg-slate-50 border-b border-slate-100 last:border-0 transition-colors group cursor-default",children:(0,a.jsxs)("div",{className:"flex items-center py-4 px-5 gap-4",children:[(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center min-w-[56px] shrink-0 border-r border-slate-100 pr-4",children:[(0,a.jsx)("span",{className:"text-[9px] text-slate-400 uppercase tracking-widest mb-1 font-bold",children:"L\xfac"}),(0,a.jsx)("span",{className:"text-[13px] text-slate-700 font-mono font-black",children:e.time})]}),(0,a.jsxs)("div",{className:"flex-1 flex items-center justify-end gap-3 min-w-0",children:[(0,a.jsx)("span",{className:"text-[14px] text-slate-800 font-bold truncate text-right group-hover:text-slate-900 transition-colors",children:e.home_team}),e.home_logo?(0,a.jsx)("div",{className:"w-8 h-8 rounded-full bg-slate-100 border border-slate-200 p-1 flex items-center justify-center shadow-sm",children:(0,a.jsx)("img",{src:e.home_logo,alt:e.home_team||"Home team",className:"w-full h-full object-contain",loading:"lazy"})}):(0,a.jsx)("div",{className:"w-8 h-8 rounded-full bg-slate-100 shrink-0 border border-slate-200 flex items-center justify-center text-[10px] font-bold text-slate-400",children:"?"})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center min-w-[90px] shrink-0 bg-slate-50 rounded-xl py-2 px-2 border border-slate-200 shadow-inner group-hover:border-[#4681E8]/40 transition-colors",children:[(0,a.jsx)("span",{className:`text-[22px] leading-none font-black tracking-widest drop-shadow-[0_2px_4px_rgba(0,0,0,0.8)] ${!(s=e.score)||"-"===s?"text-slate-400":"text-slate-800"}`,children:e.score}),e.ht_score&&(0,a.jsxs)("span",{className:"text-[10px] text-slate-500 font-mono mt-1 font-bold",children:["HT: ",e.ht_score]})]}),(0,a.jsxs)("div",{className:"flex-1 flex items-center gap-3 min-w-0",children:[e.away_logo?(0,a.jsx)("div",{className:"w-8 h-8 rounded-full bg-slate-100 border border-slate-200 p-1 flex items-center justify-center shadow-sm",children:(0,a.jsx)("img",{src:e.away_logo,alt:e.away_team||"Away team",className:"w-full h-full object-contain",loading:"lazy"})}):(0,a.jsx)("div",{className:"w-8 h-8 rounded-full bg-slate-100 shrink-0 border border-slate-200 flex items-center justify-center text-[10px] font-bold text-slate-400",children:"?"}),(0,a.jsx)("span",{className:"text-[14px] text-slate-800 font-bold truncate text-left group-hover:text-slate-900 transition-colors",children:e.away_team})]})]})},t)})]},t))}),(0,a.jsxs)("div",{className:"mt-6 text-center text-xs text-[#64748B] font-bold uppercase tracking-widest drop-shadow-sm",children:["Hiển thị ",_," kết quả trận đấu"]})]})}},81900:(e,t,s)=>{"use strict";s.d(t,{LiveMatchesClient:()=>m});var a=s(68019),l=s(10707);function r({activeSport:e,onSportChange:t,activeStatus:s,onStatusChange:l,matchesCount:n}){return(0,a.jsxs)("div",{className:"mb-5 flex flex-col gap-3",children:[(0,a.jsx)("div",{className:"flex items-center gap-2 overflow-x-auto pb-1 scrollbar-hide",children:[{id:"1",label:"B\xd3NG Đ\xc1",icon:"⚽"},{id:"2",label:"B\xd3NG RỔ",icon:"\uD83C\uDFC0"},{id:"5",label:"TENNIS",icon:"\uD83C\uDFBE"},{id:"4",label:"CẦU L\xd4NG",icon:"\uD83C\uDFF8"},{id:"3",label:"B\xd3NG CHUYỀN",icon:"\uD83C\uDFD0"},{id:"6",label:"B\xd3NG B\xc0N",icon:"\uD83C\uDFD3"}].map(s=>{let l=e===s.id;return(0,a.jsxs)("button",{type:"button",onClick:()=>t(s.id),className:`flex items-center gap-2 px-4 py-2.5 rounded-xl font-bold text-[12px] whitespace-nowrap transition-all duration-200 border cursor-pointer ${l?"bg-[#4681E8]/10 text-[#4681E8] border-[#4681E8]/40 shadow-[0_0_15px_rgba(70,129,232,0.1)]":"bg-white text-slate-500 border-slate-200 hover:text-slate-700 hover:border-[#4681E8]/30"}`,children:[(0,a.jsx)("span",{className:"text-[14px]",children:s.icon}
760),(0,a.jsx)("span",{className:"tracking-wider uppercase",children:s.label})]},s.id)})}),(0,a.jsx)("div",{className:"flex items-center gap-1 overflow-x-auto pb-1 scrollbar-hide bg-white rounded-xl p-1.5 border border-slate-200",children:[{id:"all",label:"TẤT CẢ",keyCount:"all"},{id:"live",label:"TRỰC TIẾP",keyCount:"live"},{id:"hot",label:"HOT",keyCount:"hot"},{id:"today",label:"H\xd4M NAY",keyCount:"today"},{id:"tomorrow",label:"NG\xc0Y MAI",keyCount:"tomorrow"}].map(e=>{let t=s===e.id,r=n[e.keyCount]||0;return(0,a.jsxs)("button",{type:"button",onClick:()=>l(e.id),className:`relative px-4 py-2 font-bold text-[12px] whitespace-nowrap transition-all duration-200 uppercase tracking-wider flex items-center gap-2 rounded-lg cursor-pointer ${t?"bg-[#4681E8]/10 text-[#4681E8] shadow-inner":"text-slate-500 hover:text-slate-700 hover:bg-[#4681E8]/5"}`,children:["live"===e.id&&t&&(0,a.jsx)("span",{className:"w-1.5 h-1.5 rounded-full bg-[#4681E8] animate-pulse shadow-[0_0_6px_rgba(70,129,232,0.8)]"}),(0,a.jsx)("span",{children:e.label}),(0,a.jsx)("span",{className:`px-1.5 py-0.5 rounded text-[10px] font-black ${t?"bg-[#4681E8]/20 text-[#4681E8]":"text-slate-400"}`,children:r})]},e.id)})})]})}function n(){return"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='10' fill='%2364748B' fill-opacity='0.18'/%3E%3C/svg%3E"}function i({match:e,isLoading:t=!1}){if(t||!e)return(0,a.jsx)("div",{className:"animate-pulse bg-white h-[64px] w-full border-b border-slate-100"});let s=new Date(1e3*parseInt(e.time||0,10)).toLocaleTimeString("vi-VN",{hour:"2-digit",minute:"2-digit",timeZone:"Asia/Ho_Chi_Minh"}),l=function(e,t){if("1"===t||"2"===t)switch(e){case"1":default:return{text:"Sắp diễn",isLive:!1,showScore:!1};case"2":return{text:"H1",isLive:!0,showScore:!0};case"3":return{text:"HT",isLive:!0,showScore:!0};case"4":return{text:"H2",isLive:!0,showScore:!0};case"5":return{text:"Phụ",isLive:!0,showScore:!0};case"7":return{text:"Pen",isLive:!0,showScore:!0};case"8":case"9":return{text:"FT",isLive:!1,showScore:!0}}switch(e){case"0":case"1":return{text:"Sắp diễn",isLive:!1,showScore:!1};case"51":return{text:"S1",isLive:!0,showScore:!0};case"52":return{text:"S2",isLive:!0,showScore:!0};case"53":return{text:"S3",isLive:!0,showScore:!0};case"54":return{text:"S4",isLive:!0,showScore:!0};case"55":return{text:"S5",isLive:!0,showScore:!0};case"100":case"90":case"91":case"110":return{text:"FT",isLive:!1,showScore:!0};default:return{text:"LIVE",isLive:!0,showScore:!0}}}(String(e.status_id),String(e.sport_id)),r=e.time_text||e.source_card_meta?.time_text||"",o=l.isLive,c=e.home_score??"-",d=e.away_score??"-",x=e.home_logo||n(),h=e.away_logo||n();return(0,a.jsxs)("a",{href:`/match/${encodeURIComponent(e.post_name||e.id)}`,className:"flex items-center w-full group border-b border-slate-100 bg-white hover:bg-[#4681E8]/5 transition-colors min-h-[64px]",children:[(0,a.jsx)("div",{className:`w-[60px] flex flex-col items-center justify-center shrink-0 h-full border-r ${o?"border-[#4681E8]/30 bg-[#4681E8]/5":"border-slate-100"}`,children:o?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"text-[#4681E8] font-bold text-[11px] uppercase tracking-wider tabular-nums leading-none",children:r||l.text}),(0,a.jsx)("span",{className:"w-1.5 h-1.5 rounded-full bg-[#4681E8] animate-pulse mt-1"})]}):(0,a.jsx)("span",{className:"text-slate-500 font-medium text-[12px]",children:s})}),(0,a.jsxs)("div",{className:"flex-1 flex flex-col justify-center px-3 py-2 gap-1.5 min-w-0",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between w-full",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2.5 min-w-0 overflow-hidden",children:[(0,a.jsx)("img",{src:x,alt:e.home_name,className:"w-4 h-4 shrink-0 object-contain",onError:e=>e.currentTarget.src=n(),loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-[13px] font-semibold truncate text-slate-800",children:e.home_name})]}),l.showScore&&(0,a.jsx)("span",{className:`text-[15px] font-black tabular-nums shrink-0 ml-2 ${o?"text-[#4681E8]":"text-slate-700"}`,children:c})]}),(0,a.jsxs)("div",{className:"flex items-center justify-between w-full",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2.5 min-w-0 overflow-hidden",children:[(0,a.jsx)("img",{src:h,alt:e.away_name,className:"w-4 h-4 shrink-0 object-contain",onError:e=>e.currentTarget.src=n(),loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-[13px] font-semibold truncate text-slate-800",children:e.away_name})]}),l.showScore&&(0,a.jsx)("span",{className:`text-[15px] font-black tabular-nums shrink-0 ml-2 ${o?"text-[#4681E8]":"text-slate-700"}`,children:d})]})]}),(0,a.jsx)("div",{className:"w-[48px] h-full flex items-center justify-center shrink-0 text-slate-300 group-hover:text-[#4681E8] transition-colors border-l border-slate-100",children:(0,a.jsx)("svg",{className:"w-5 h-5 fill-current",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{d:"M8 5v14l11-7z"})})})]})}let o=new Set(["1","2","3","4","5","7"]),c=new Set(["8","9","15"]),d=new Set(["51","52","53","54","5
7605","56","57","58","59"]),x=new Set(["100","90","91","92","93","110"]);function h(e){let t=String(e.status_id);return 2>=parseInt(e.sport_id)?o.has(t):d.has(t)}function m({matches:e,matchIndex:t}){let[s,n]=(0,l.useState)("1"),[o,d]=(0,l.useState)("all"),[p,u]=(0,l.useState)(1);(0,l.useEffect)(()=>{u(1)},[s,o]);let{todayStart:g,tomorrowStart:b,dayAfterStart:f}=(0,l.useMemo)(()=>{let e,t,s,{vnTodayStartUTC:a,vnTomorrowStartUTC:l,vnDayAfterStartUTC:r}=(s=(t=Math.floor(Date.UTC((e=new Date(Date.now()+252e5)).getUTCFullYear(),e.getUTCMonth(),e.getUTCDate())/1e3)-25200)+86400,{vnTodayStartUTC:t,vnTomorrowStartUTC:s,vnDayAfterStartUTC:s+86400});return{todayStart:a,tomorrowStart:l,dayAfterStart:r}},[]),j=(0,l.useMemo)(()=>new Map(e.map(e=>[e?.match_key?String(e.match_key):e?.ls_id?String(e.ls_id):e?.id?`${String(e.sport_id||"0")}:${String(e.id)}`:e?.scheduleId?`${String(e.sport_id||"0")}:schedule:${String(e.scheduleId)}`:[String(e?.sport_id||"0"),String(e?.time||"0"),String(e?.home_name||""),String(e?.away_name||"")].join(":"),e])),[e]),w=t?.summary_by_sport?.[s],v=t?.bucket_keys_by_sport?.[s],N=t?.bucket_pages_by_sport?.[s],y=e.filter(e=>{let t;return String(e.sport_id)===s&&(t=String(e.status_id),2>=parseInt(e.sport_id)?!c.has(t):!x.has(t))}),_=y.filter(e=>{let t=parseInt(e.time);return t>=g&&t<b}),k=y.filter(e=>{let t=parseInt(e.time);return t>=b&&t<f}),E={all:y.length,live:y.filter(e=>h(e)).length,hot:y.filter(e=>"1"===String(e.hot)).length,today:_.length,tomorrow:k.length},C=(0,l.useMemo)(()=>{if(v){if("all"===o&&Array.isArray(N?.all)&&N.all.length>0)return N.all.slice(0,p).flat().map(e=>j.get(e)).filter(Boolean);let e=v[o];if(Array.isArray(e))return e.map(e=>j.get(e)).filter(Boolean)}return"all"===o?y:"live"===o?y.filter(e=>h(e)):"hot"===o?y.filter(e=>"1"===String(e.hot)):"today"===o?_:"tomorrow"===o?k:y},[o,y,j,N,v,_,k,p]),S="all"===o&&Array.isArray(N?.all)&&p<N.all.length,L=(0,l.useMemo)(()=>"all"!==o&&"live"!==o&&"hot"!==o?[]:C.filter(e=>"1"===String(e.hot)||h(e)).slice(0,4),[C,o]),$=(0,l.useMemo)(()=>{let e=new Map;
760return C.forEach(t=>{let s=t.source_card_meta?.league_label||t.match_data?.competition_vi||t.match_data?.competition_name||t.match_data?.competition_full||"Giải đấu kh\xe1c";e.has(s)||e.set(s,[]),e.get(s).push(t)}),Array.from(e.entries())},[C]);return(0,a.jsxs)("div",{className:"w-full min-h-[500px]",children:[(0,a.jsx)(r,{activeSport:s,onSportChange:n,activeStatus:o,onStatusChange:d,matchesCount:w||E}),0===C.length?(0,a.jsx)("div",{className:"py-20 text-center",children:(0,a.jsx)("div",{className:"text-slate-400 text-base font-medium",children:"Kh\xf4ng c\xf3 trận đấu n\xe0o."})}):(0,a.jsxs)("div",{className:"flex flex-col gap-6",children:[L.length>0&&"all"===o&&(0,a.jsxs)("div",{className:"mb-4",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 mb-3 px-1",children:[(0,a.jsx)("span",{className:"w-2 h-4 rounded-full bg-[#4681E8]"}),(0,a.jsx)("h2",{className:"text-slate-800 font-black text-sm uppercase tracking-wider",children:"Trận đấu t\xe2m điểm"})]}),(0,a.jsx)("div",{className:"grid grid-cols-1 xl:grid-cols-2 gap-2",children:L.map((e,t)=>(0,a.jsx)(i,{match:e},`featured-${e.ls_id||e.id}-${t}`))})]}),(0,a.jsx)("div",{className:"flex flex-col gap-5",children:$.map(([e,t])=>{let s=t[0]?.match_data?.competition_logo;return(0,a.jsxs)("div",{className:"rounded-xl overflow-hidden border border-slate-200 bg-white shadow-sm",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2.5 bg-[#0E1B33] px-4 py-2.5 border-b border-[#0E1B33]",children:[s&&(0,a.jsx)("img",{src:s,alt:"league",className:"w-4 h-4 object-contain brightness-200 opacity-80",loading:"lazy",decoding:"async"}),(0,a.jsx)("h3",{className:"text-white text-[12px] font-bold uppercase tracking-wider truncate",children:e})]}),(0,a.jsx)("div",{className:"flex flex-col",children:t.map((e,t)=>(0,a.jsx)(i,{match:e},e.ls_id||`${e.id}-${t}`))})]},e)})}),S&&(0,a.jsx)("div",{className:"flex justify-center mt-6",children:(0,a.jsx)("button",{type:"button",onClick:()=>u(e=>e+1),className:"inline-flex items-center justify-center rounded-xl border border-[#4681E8]/30 bg-white px-8 py-3 text-[12px] font-bold uppercase tracking-wider text-[#4681E8] transition-all duration-200 hover:bg-[#4681E8] hover:text-white hover:border-[#4681E8]",children:"Tải th\xeam"})})]})]})}},82511:(e,t,s)=>{"use strict";s.d(t,{Klivevip07SchedulePage:()=>d});var a=s(68019),l=s(10707),r=s(78637),n=s(27347);function i({html:e}){return e?.trim()?(0,a.jsx)("section",{className:"relative mt-10 mb-6",children:(0,a.jsx)("div",{className:"seo-prose relative",children:(0,a.jsx)("div",{dangerouslySetInnerHTML:{__html:e},className:"text-slate-600 text-[14px] leading-[1.85] px-1 [&_strong]:text-slate-900 [&_a]:text-[#4681E8]"})})}):null}s(92761);let o=`
761<h2>Lịch thi đấu b\xf3ng đ\xe1 - Cập nhật lịch b\xf3ng đ\xe1 h\xf4m nay nhanh v\xe0 ch\xednh x\xe1c</h2>
762
763<p>Để <strong>xem lịch thi đấu b\xf3ng đ\xe1</strong> nhanh, ch\xednh x\xe1c v\xe0 đầy đủ nhất, Klive ch\xednh l\xe0 nơi bạn n\xean chọn. Ch\xfang t\xf4i cập nhật lịch thi đấu cho to\xe0n bộ c\xe1c giải đấu trong nước v\xe0 quốc tế, gi\xfap bạn kh\xf4ng bỏ lỡ bất kỳ trận cầu hấp dẫn n\xe0o.</p>
764
765<img src="/images/seo/schedule-football.png" alt="Lịch thi đấu b\xf3ng đ\xe1 h\xf4m nay tại Klive" loading="lazy" />
766
767<div class="toc-box">
768  <h3>Nội dung ch\xednh</h3>
769  <ol>
770    <li>Lịch thi đấu b\xf3ng đ\xe1 trực tuyến h\xe0ng đầu</li>
771    <li>Lịch b\xf3ng đ\xe1 nhanh v\xe0 ch\xednh x\xe1c</li>
772    <li>Cập nhật lịch Ngoại Hạng Anh v\xe0 Champions League</li>
773    <li>C\xe1ch xem lịch thi đấu hiệu quả nhất</li>
774  </ol>
775</div>
776
777<h2>Lịch thi đấu b\xf3ng đ\xe1 trực tuyến h\xe0ng đầu</h2>
778<p>Trong thời đại số, kh\xf4ng ai c\xf2n xem lịch b\xf3ng đ\xe1 tr\xean TV hay b\xe1o giấy nữa. Tất cả đ\xe3 chuyển sang theo d\xf5i online, v\xe0 Klive ch\xednh l\xe0 nền tảng cập nhật lịch b\xf3ng đ\xe1 được đ\xe1nh gi\xe1 cao nhất.</p>
779
780<p>Khi truy cập Klive, bạn c\xf3 thể xem lịch thi đấu của bất kỳ giải đấu b\xf3ng đ\xe1 n\xe0o tr\xean thế giới một c\xe1ch ho\xe0n to\xe0n miễn ph\xed. Th\xf4ng tin lịch đấu được cập nhật sớm nhất v\xe0 chi tiết đến từng ph\xfat.</p>
781
782<h2>Lịch b\xf3ng đ\xe1 nhanh v\xe0 ch\xednh x\xe1c</h2>
783<p>Klive kh\xf4ng chỉ cung cấp lịch thi đấu c\xe1c giải đấu h\xe0ng đầu m\xe0 c\xf2n cập nhật lịch ph\xe1t s\xf3ng tr\xean c\xe1c k\xeanh truyền h\xecnh Việt Nam như K+, FPT Play, VTV Sports. Gi\xfap bạn biết trận n\xe0o được chiếu trực tiếp tr\xean TV v\xe0 sắp xếp thời gian hợp l\xfd.</p>
784
785<h2>Cập nhật lịch Ngoại Hạng Anh v\xe0 Champions League</h2>
786<p>Ngoại Hạng Anh v\xe0 Champions League l\xe0 hai giải đấu được quan t\xe2m nhất. Tại Klive, bạn lu\xf4n nắm được lịch đấu đầy đủ từ v\xf2ng bảng đến chung kết, k\xe8m theo th\xf4ng tin về đội h\xecnh dá»± kiến, phong độ v\xe0 lịch sá»­ đối đầu để chuẩn bị tốt nhất cho má
786»—i trận cầu.</p>
787
788<p>Kết hợp lịch thi đấu với trang trực tiếp b\xf3ng đ\xe1, bạn sẽ c\xf3 trải nghiệm theo d\xf5i b\xf3ng đ\xe1 ho\xe0n hảo nhất - biết trước, xem ngay, kh\xf4ng bỏ lỡ!</p>
789`;var c=s(73268);function d({initialData:e}){let t=(0,r.usePathname)(),[s,h]=(0,l.useState)(!1),[m,p]=(0,l.useState)(new Set),[u,g]=(0,l.useState)(""),[b,f]=(0,l.useState)(!1),[j,w]=(0,l.useState)(0),v=(0,l.useMemo)(()=>(0,c.p_)(e),[e]),N=v.dateTabs,y=(0,l.useMemo)(()=>{if(!v.selectedDate)return 0;let e=N.findIndex(e=>(e.dataValue||e.date)===v.selectedDate);return e>=0?e:0},[N,v.selectedDate]),[_,k]=(0,l.useState)(y),[E,C]=(0,l.useState)(v.leagues||[]),S=(0,l.useMemo)(()=>{if(!u)return E;let e=u.toLowerCase();return E.filter(t=>t.league_name.toLowerCase().includes(e)||t.matches.some(t=>t.home_team.toLowerCase().includes(e)||t.away_team.toLowerCase().includes(e)))},[E,u]),L=Math.max(0,N.length-7),$=N.slice(j,j+7),F=j>0,T=j<L,A=S.reduce((e,t)=>e+t.matches.length,0);return((0,l.useEffect)(()=>{if(!v.selectedDate||!N.length)return;let e=N.findIndex(e=>(e.dataValue||e.date)===v.selectedDate);e>=0&&k(e)},[N,v.selectedDate]),(0,l.useEffect)(()=>{_<j?w(Math.max(0,_)):_>=j+7&&w(Math.min(L,_-7+1))},[_,L,j]),e)?(0,a.jsxs)("div",{className:"max-w-[1440px] mx-auto px-4 py-8",children:[(0,a.jsx)(n.A,{eyebrow:"Lịch thi đấu",title:"LỊCH THI ĐẤU",rightSlot:(0,a.jsxs)("div",{className:"text-[12px] text-slate-500 font-bold uppercase tracking-wider",children:[(0,a.jsx)("span",{className:"text-[#E11D48] font-black",children:S.reduce((e,t)=>e+t.matches.length,0)})," trận đấu"]})}),(0,a.jsxs)("div",{className:"flex items-center mb-4 rounded-xl overflow-hidden border border-slate-200 bg-white shadow-sm",children:[(0,a.jsx)("button",{type:"button",disabled:!F,onClick:()=>w(e=>Math.max(0,e-1)),className:`flex items-center justify-center w-8 h-[52px] bg-slate-100 border-r border-slate-200 text-slate-600 hover:text-slate-800 hover:bg-slate-200 transition-all shrink-0 ${!F?"opacity-30":"cursor-pointer"}`,children:(0,a.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2.5,d:"M15 19l-7-7 7-7"})})}),(0,a.jsx)("div",{className:"flex flex-1",children:$.map((e,s)=>{let l=j+s;return(0,a.jsxs)("button",{type:"button",onClick:()=>(e=>{let s=N[e];if(!s||e===_)return;let a=s.dataValue||s.date;a&&(k(e),p(new Set),h(!0),window.history.replaceState(null,"",`${t}?date=${encodeURIComponent(a)}`),fetch(`/api/socolive/fixtures?date=${encodeURIComponent(a)}`,{cache:"no-store"}).then(e=>e.ok?e.json():null).then(e=>{e&&C((0,c.p_)(e).leagues||[])}).finally(()=>h(!1)))})(l),className:`flex-1 flex flex-col items-center justify-center h-[52px] border-b-[3px] transition-all duration-300 ${_===l?"border-[#4681E8] text-[#4681E8] bg-[#4681E8]/5":"border-transparent text-[#64748B] hover:text-[#94A3B8] hover:bg-slate-100"}`,children:[(0,a.jsx)("span",{className:`text-[11px] font-bold uppercase tracking-widest ${_===l?"text-[#4681E8]":""}`,children:e.label}),(0,a.jsx)("span",{className:`text-[12px] font-mono mt-0.5 ${_===l?"text-slate-800 font-black":""}`,children:e.date})]},`tab-${l}`)})}),(0,a.jsx)("button",{type:"button",disabled:!T,onClick:()=>w(e=>Math.min(L,e+1)),className:`flex items-center justify-center w-8 h-[52px] bg-slate-100 border-l border-slate-200 text-slate-600 hover:text-slate-800 hover:bg-slate-200 transition-all shrink-0 ${!T?"opacity-30":"cursor-pointer"}`,children:(0,a.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2.5,d:"M9 5l7 7-7 7"})})})]}),(0,a.jsxs)("div",{className:"relative mb-4",children:[(0,a.jsxs)("button",{onClick:()=>f(!b),className:"flex items-center gap-3 bg-white hover:bg-slate-50 px-4 py-2.5 rounded-xl border border-slate-200 shadow-sm transition-all text-sm group",children:[(0,a.jsx)("svg",{className:"w-5 h-5 text-[#E11D48] transition-colors group-hover:text-[#F43F5E]",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 6h16M4 12h16M4 18h16"})}),(0,a.jsx)("span",{className:"text-slate-700 font-bold text-[13px] uppercase tracking-wide",children:"Danh s\xe1ch giải đấu"}),(0,a.jsx)("svg",{className:`w-4 h-4 text-slate-500 transition-transform duration-300 ${b?"rotate-180":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),b&&(0,a.jsxs)("div",{className:"absolute top-full left-0 mt-2 w-[360px] bg-white border border-slate-200 rounded-2xl shadow-[0_24px_80px_rgba(0,0,0,0.12)] z-50 max-h-[320px] overflow-hidden flex flex-col",children:[(0,a.jsx)("div",{className:"p-2 border-b border-slate-100",children:(0,a.jsx)("input",{type:"text",placeholder:"T\xecm giải đấu...",value:u,onChange:e=>g(e.target.value),className:"w-full bg-slate-50 border border-transparent roun
789ded-xl px-4 py-2.5 text-sm text-slate-800 placeholder-slate-400 outline-none focus:border-[#4681E8]/50 transition-colors"})}),(0,a.jsx)("div",{className:"overflow-y-auto flex-1 py-2",children:E.map((e,t)=>(0,a.jsxs)("button",{type:"button",onClick:()=>{g(e.league_name),f(!1)},className:"w-full flex items-center gap-3 px-4 py-2.5 hover:bg-slate-50 text-left text-[13px] transition-colors",children:[e.league_icon?(0,a.jsx)("img",{src:e.league_icon,alt:e.league_name||"League",className:"w-5 h-5 object-contain shrink-0",loading:"lazy",decoding:"async"}):(0,a.jsx)("div",{className:"w-5 h-5 rounded-md bg-slate-200 shrink-0"}),(0,a.jsx)("span",{className:"text-slate-600 truncate flex-1 font-medium",children:e.league_name}),(0,a.jsx)("span",{className:"text-[11px] text-[#E11D48] font-bold shrink-0 px-2 py-0.5 bg-[#E11D48]/10 rounded-md border border-[#E11D48]/20",children:e.matches.length})]},t))})]})]}),(0,a.jsxs)("div",{className:"grid grid-cols-[1fr_60px_55px_100px_100px_90px] bg-slate-50 border border-slate-200 rounded-t-xl px-4 py-3 text-[11px] text-slate-500 font-black uppercase tracking-widest shadow-inner",children:[(0,a.jsx)("span",{children:"Trận đấu"}),(0,a.jsx)("span",{className:"text-center",children:"Tỷ số"}),(0,a.jsx)("span",{className:"text-center",children:"Hiệp 1"}),(0,a.jsx)("span",{className:"text-center",children:"Cược chấp"}),(0,a.jsx)("span",{className:"text-center",children:"T\xe0i/Xỉu"}),(0,a.jsx)("span",{className:"text-center",children:"1 X 2"})]}),(0,a.jsxs)("div",{className:"border border-slate-200 border-t-0 rounded-b-xl overflow-hidden relative shadow-[0_8px_30px_rgba(0,0,0,0.06)]",children:[s&&(0,a.jsx)("div",{className:"absolute inset-0 z-10 bg-white/80 backdrop-blur-[2px]",children:(0,a.jsx)("div",{className:"space-y-0",children:[...Array(6)].map((e,t)=>(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 px-4 py-3.5 bg-slate-100 border-b border-slate-200",children:[(0,a.jsx)("div",{className:"w-4 h-4 rounded bg-slate-300 animate-pulse"}),(0,a.jsx)("div",{className:"h-3.5 rounded bg-slate-200 animate-pulse",style:{width:`${120+30*t}px`}})]}),[void 0,void 0].map((e,t)=>(0,a.jsxs)("div",{className:"grid grid-cols-[1fr_60px_55px_100px_100px_90px] items-center px-4 py-3 border-b border-slate-100",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)("div",{className:"w-10 h-3.5 rounded bg-slate-200 animate-pulse"}),(0,a.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,a.jsx)("div",{className:"h-3 w-24 rounded bg-slate-100 animate-pulse"}),(0,a.jsx)("div",{className:"h-3 w-20 rounded bg-slate-100 animate-pulse"})]})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5",children:[(0,a.jsx)("div",{className:"h-3 w-5 rounded bg-slate-100 animate-pulse"}),(0,a.jsx)("div",{className:"h-3 w-5 rounded bg-slate-100 animate-pulse"})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5",children:[(0,a.jsx)("div",{className:"h-3 w-5 rounded bg-slate-100 animate-pulse"}),(0,a.jsx)("div",{className:"h-3 w-5 rounded bg-slate-100 animate-pulse"})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5",children:[(0,a.jsx)("div",{className:"h-3 w-14 rounded bg-slate-100 animate-pulse"}),(0,a.jsx)("div",{className:"h-3 w-10 rounded bg-slate-100 animate-pulse"})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5",children:[(0,a.jsx)("div",{className:"h-3 w-14 rounded bg-slate-100 animate-pulse"}),(0,a.jsx)("div",{className:"h-3 w-10 rounded bg-slate-100 animate-pulse"})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5",children:[(0,a.jsx)("div",{className:"h-3 w-10 rounded bg-slate-100 animate-pulse"}),(0,a.jsx)("div",{className:"h-3 w-10 rounded bg-slate-100 animate-pulse"}),(0,a.jsx)("div",{className:"h-3 w-10 rounded bg-slate-100 animate-pulse"})]})]},t))]},t))})}),0!==S.length||s?S.map((e,t)=>(0,a.jsxs)("div",{id:`league-${t}`,children:[(0,a.jsxs)("button",{onClick:()=>{p(e=>{let s=new Set(e);return s.has(t)?s.delete(t):s.add(t),s})},className:"w-full flex items-center gap-3 px-4 py-3 bg-slate-50 hover:bg-slate-100 border-b border-slate-100 transition-colors text-left group",children:[(0,a.jsx)("svg",{className:`w-4 h-4 text-[#E11D48] transition-transform duration-300 shrink-0 ${m.has(t)?"-rotate-90":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2.5,d:"M19 9l-7 7-7-7"})}),e.league_icon&&(0,a.jsx)("div",{className:"w-6 h-6 rounded-full bg-slate-100 p-0.5 border border-slate-200 flex items-center justify-center shadow-sm",children:(0,a.jsx)("img",{src:e.league_icon,alt:e.league_name||"League",className:"w-4 h-4 object-contain shrink-0",loading:"lazy",decoding:"async"})}),(0,a.jsx)("span",{className:"text-[13px] font-bold text-slate-700 flex-1 truncate uppercase tracking-widest",children:e.league_name}),(0,a.jsxs)("span",{className:"text-[11px] text-[#E11D48] font-bold shrink-0 ml-1 px-2 py-0.5 bg-[#E11D48]/10 rounded border border-[#
789E11D48]/20 group-hover:bg-[#E11D48]/20 transition-colors",children:["BXH ",(0,a.jsx)("svg",{className:"inline w-3 h-3 ml-0.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 6h16M4 10h16M4 14h16M4 18h16"})})]})]}),!m.has(t)&&e.matches.map((e,t)=>(0,a.jsxs)("div",{className:"grid grid-cols-[1fr_60px_55px_100px_100px_90px] items-center px-4 py-3 bg-transparent hover:bg-slate-50 border-b border-slate-100 last:border-0 transition-colors group cursor-default",children:[(0,a.jsxs)("div",{className:"flex items-center gap-4 min-w-0",children:[(0,a.jsx)("span",{className:"text-[#E11D48] font-mono text-[13px] font-black min-w-[42px] shrink-0 drop-shadow-[0_0_4px_rgba(225,29,72,0.4)]",children:e.time}),(0,a.jsxs)("div",{className:"flex flex-col gap-1 min-w-0 flex-1",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[e.home_logo&&(0,a.jsx)("img",{src:e.home_logo,alt:e.home_team||"Home team",className:"w-4 h-4 object-contain shrink-0 filter drop-shadow-[0_2px_2px_rgba(0,0,0,0.8)]",loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-[13px] text-slate-700 font-medium truncate group-hover:text-slate-900 transition-colors",children:e.home_team})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[e.away_logo&&(0,a.jsx)("img",{src:e.away_logo,alt:e.away_team||"Away team",className:"w-4 h-4 object-contain shrink-0",loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-[13px] text-slate-700 font-medium truncate group-hover:text-slate-900 transition-colors",children:e.away_team})]})]})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center",children:[(0,a.jsx)("span",{className:"text-[12px] text-[var(--accent-cyan)] font-mono font-bold",children:"-"!==e.score?e.score:"-"}),(0,a.jsx)("span",{className:"text-[12px] text-[#64748B]",children:"-"})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center",children:[(0,a.jsx)("span",{className:"text-[12px] text-[#64748B]",children:"-"}),(0,a.jsx)("span",{className:"text-[12px] text-[#64748B]",children:"-"})]}),(0,a.jsx)(x,{values:e.handicap,hasLine:!0}),(0,a.jsx)(x,{values:e.over_under,hasLine:!0}),(0,a.jsx)("div",{className:"flex flex-col items-center gap-0",children:e.one_x_two?.length>0?e.one_x_two.map((e,t)=>(0,a.jsx)("span",{className:"text-[11px] text-slate-500 leading-[18px]",children:e||"-"},t)):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"text-[11px] text-[#64748B] leading-[18px]",children:"-"}),(0,a.jsx)("span",{className:"text-[11px] text-[#64748B] leading-[18px]",children:"-"}),(0,a.jsx)("span",{className:"text-[11px] text-[#64748B] leading-[18px]",children:"-"})]})})]},t))]},t)):(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center py-20 gap-3 bg-slate-50",children:[(0,a.jsx)("svg",{className:"w-12 h-12 text-slate-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",strokeWidth:1.5,children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6.75 3v2.25M17.25 3v2.25M3 18.75V7.5a2.25 2.25 0 012.25-2.25h13.5A2.25 2.25 0 0121 7.5v11.25m-18 0A2.25 2.25 0 005.25 21h13.5A2.25 2.25 0 0021 18.75m-18 0v-7.5A2.25 2.25 0 015.25 9h13.5A2.25 2.25 0 0121 11.25v7.5"})}),(0,a.jsx)("span",{className:"text-slate-500 font-medium tracking-wide",children:"Kh\xf4ng c\xf3 trận đấu n\xe0o cho ng\xe0y n\xe0y"}),(0,a.jsx)("span",{className:"text-slate-400 text-[12px]",children:"H\xe3y thử chọn một ng\xe0y kh\xe1c"})]})]}),(0,a.jsxs)("div",{className:"mt-6 text-center text-[11px] text-[#64748B] uppercase tracking-widest font-bold drop-shadow-sm",children:["Tổng cộng ",A," trận đấu trong ",S.length," giải"]}),(0,a.jsx)(i,{html:o})]}):(0,a.jsxs)("div",{className:"max-w-[1440px] mx-auto px-4 py-8",children:[(0,a.jsx)(n.A,{eyebrow:"Lịch thi đấu",title:"LỊCH THI ĐẤU"}),(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center py-16 gap-4",children:[(0,a.jsx)("div",{className:"w-12 h-12 rounded-full border-2 border-[#E11D48]/30 border-t-[#E11D48] animate-spin"}),(0,a.jsx)("span",{className:"text-slate-500 text-sm font-medium tracking-wide",children:"Đang tải lịch thi đấu..."})]})]})}function x({values:e,hasLine:t}){return e&&0!==e.length?t&&e.length>=3?(0,a.jsxs)("div",{className:"flex flex-col items-center gap-0",children:[(0,a.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,a.jsx)("span",{className:"text-[11px] text-[#E11D48] leading-[18px] font-bold",children:e[0]}),(0,a.jsx)("span",{className:"text-[11px] text-slate-500 leading-[18px]",children:e[1]})]}),(0,a.jsx)("span",{className:"text-[11px] text-slate-500 leading-[18px]",children:e[2]})]}):(0,a.jsx)("div",{className:"flex flex-col items-center gap-0",children:e.map((e,t)=>(0,a.jsx)("span",{className:"text-[11px] text-slate-500 leading-[18px]",children:e||"-"},t))}):(0,a.jsxs)("div",{className:"flex flex-col items-center",children:[(0,a.jsx)("span",{className:"text-[11px] text-[#64748B] leading-[18px]",children:"-"}),(0,a.jsx)("span",{className:"text-[11px] text-[#64748B] leading-[18px]",children:"-"})]})}},82702:(e,t,s)=>{"use strict";s.d(t,{Klivevip06SchedulePage:()=>d});var a=s(68019),l=s(10707),r=s(78637),n=s(42879);function i({html:e}){return e?.trim()?(0,a.jsx)("section",{className:"relative mt-10 mb-6",children:(0,a.jsx)("div",{className:"seo-prose relative",children:(0,a.jsx)("div",{dangerouslySetInnerHTML:{__html:e},className:"text-slate-600 text-[14px] leading-[1.85] px-1 [&_strong]:text-slate-900 [&_a]:text-[#4681E8]"})})}):null}s(13878);let o=`
790<h2>Lịch thi đấu b\xf3ng đ\xe1 - Cập nhật lịch b\xf3ng đ\xe1 h\xf4m nay nhanh v\xe0 ch\xednh x\xe1c</h2>
791
792<p>Để <strong>xem lịch thi đấu b\xf3ng đ\xe1</strong> nhanh, ch\xednh x\xe1c v\xe0 đầy đủ nhất, Klive ch\xednh l\xe0 nơi bạn n\xean chọn. Ch\xfang t\xf4i cập nhật lịch thi đấu cho to\xe0n bộ c\xe1c giải đấu trong nước v\xe0 quốc tế, gi\xfap bạn kh\xf4ng bỏ lỡ bất kỳ trận cầu hấp dẫn n\xe0o.</p>
793
794<img src="/images/seo/schedule-football.png" alt="Lịch thi đấu b\xf3ng đ\xe1 h\xf4m nay tại Klive" loading="lazy" />
795
796<div class="toc-box">
797  <h3>Nội dung ch\xednh</h3>
798  <ol>
799    <li>Lịch thi đấu b\xf3ng đ\xe1 trực tuyến h\xe0ng đầu</li>
800    <li>Lịch b\xf3ng đ\xe1 nhanh v\xe0 ch\xednh x\xe1c</li>
801    <li>Cập nhật lịch Ngoại Hạng Anh v\xe0 Champions League</li>
802    <li>C\xe1ch xem lịch thi đấu hiệu quả nhất</li>
803  </ol>
804</div>
805
806<h2>Lịch thi đấu b\xf3ng đ\xe1 trực tuyến h\xe0ng đầu</h2>
807<p>Trong thời đại số, kh\xf4ng ai c\xf2n xem lịch b\xf3ng đ\xe1 tr\xean TV hay b\xe1o giấy nữa. Tất cả đ\xe3 chuyển sang theo d\xf5i online, v\xe0 Klive ch\xednh l\xe0 nền tảng cập nhật lịch b\xf3ng đ\xe1 được đ\xe1nh gi\xe1 cao nhất.</p>
808
809<p>Khi truy cập Klive, bạn c\xf3 thể xem lịch thi đấu của bất kỳ giải đấu b\xf3ng đ\xe1 n\xe0o tr\xean thế giới một c\xe1ch ho\xe0n to\xe0n miễn ph\xed. Th\xf4ng tin lịch đấu được cập nhật sớm nhất v\xe0 chi tiết đến từng ph\xfat.</p>
810
811<h2>Lịch b\xf3ng đ\xe1 nhanh v\xe0 ch\xednh x\xe1c</h2>
812<p>Klive kh\xf4ng chỉ cung cấp lịch thi đấu c\xe1c giải đấu h\xe0ng đầu m\xe0 c\xf2n cập nhật lịch ph\xe1t s\xf3ng tr\xean c\xe1c k\xeanh truyền h\xecnh Việt Nam như K+, FPT Play, VTV Sports. Gi\xfap bạn biết trận n\xe0o được chiếu trực tiếp tr\xean TV v\xe0 sắp xếp thời gian hợp l\xfd.</p>
813
814<h2>Cập nhật lịch Ngoại Hạng Anh v\xe0 Champions League</h2>
815<p>Ngoại Hạng Anh v\xe0 Champions League l\xe0 hai giải đấu được quan t\xe2m nhất. Tại Klive, bạn lu\xf4n nắm được lịch đấu đầy đủ từ v\xf2ng bảng đến chung kết, k\xe8m theo th\xf4ng tin về đội h\xecnh dá»± kiến, phong độ v\xe0 lịch sá»­ đối đầu để chuẩn bị tốt nhất cho má
815»—i trận cầu.</p>
816
817<p>Kết hợp lịch thi đấu với trang trực tiếp b\xf3ng đ\xe1, bạn sẽ c\xf3 trải nghiệm theo d\xf5i b\xf3ng đ\xe1 ho\xe0n hảo nhất - biết trước, xem ngay, kh\xf4ng bỏ lỡ!</p>
818`;var c=s(50179);function d({initialData:e}){let t=(0,r.usePathname)(),[s,h]=(0,l.useState)(!1),[m,p]=(0,l.useState)(new Set),[u,g]=(0,l.useState)(""),[b,f]=(0,l.useState)(!1),[j,w]=(0,l.useState)(0),v=(0,l.useMemo)(()=>(0,c.p_)(e),[e]),N=v.dateTabs,y=(0,l.useMemo)(()=>{if(!v.selectedDate)return 0;let e=N.findIndex(e=>(e.dataValue||e.date)===v.selectedDate);return e>=0?e:0},[N,v.selectedDate]),[_,k]=(0,l.useState)(y),[E,C]=(0,l.useState)(v.leagues||[]),S=(0,l.useMemo)(()=>{if(!u)return E;let e=u.toLowerCase();return E.filter(t=>t.league_name.toLowerCase().includes(e)||t.matches.some(t=>t.home_team.toLowerCase().includes(e)||t.away_team.toLowerCase().includes(e)))},[E,u]),L=Math.max(0,N.length-7),$=N.slice(j,j+7),F=j>0,T=j<L,A=S.reduce((e,t)=>e+t.matches.length,0);return((0,l.useEffect)(()=>{if(!v.selectedDate||!N.length)return;let e=N.findIndex(e=>(e.dataValue||e.date)===v.selectedDate);e>=0&&k(e)},[N,v.selectedDate]),(0,l.useEffect)(()=>{_<j?w(Math.max(0,_)):_>=j+7&&w(Math.min(L,_-7+1))},[_,L,j]),e)?(0,a.jsxs)("div",{className:"max-w-[1440px] mx-auto px-4 py-8",children:[(0,a.jsx)(n.B,{eyebrow:"Lịch thi đấu",title:"LỊCH THI ĐẤU",rightSlot:(0,a.jsxs)("div",{className:"text-[12px] text-slate-500 font-bold uppercase tracking-wider",children:[(0,a.jsx)("span",{className:"text-[#E11D48] font-black",children:S.reduce((e,t)=>e+t.matches.length,0)})," trận đấu"]})}),(0,a.jsxs)("div",{className:"flex items-center mb-4 rounded-xl overflow-hidden border border-slate-200 bg-white shadow-sm",children:[(0,a.jsx)("button",{type:"button",disabled:!F,onClick:()=>w(e=>Math.max(0,e-1)),className:`flex items-center justify-center w-8 h-[52px] bg-slate-100 border-r border-slate-200 text-slate-600 hover:text-slate-800 hover:bg-slate-200 transition-all shrink-0 ${!F?"opacity-30":"cursor-pointer"}`,children:(0,a.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2.5,d:"M15 19l-7-7 7-7"})})}),(0,a.jsx)("div",{className:"flex flex-1",children:$.map((e,s)=>{let l=j+s;return(0,a.jsxs)("button",{type:"button",onClick:()=>(e=>{let s=N[e];if(!s||e===_)return;let a=s.dataValue||s.date;a&&(k(e),p(new Set),h(!0),window.history.replaceState(null,"",`${t}?date=${encodeURIComponent(a)}`),fetch(`/api/socolive/fixtures?date=${encodeURIComponent(a)}`,{cache:"no-store"}).then(e=>e.ok?e.json():null).then(e=>{e&&C((0,c.p_)(e).leagues||[])}).finally(()=>h(!1)))})(l),className:`flex-1 flex flex-col items-center justify-center h-[52px] border-b-[3px] transition-all duration-300 ${_===l?"border-[#4681E8] text-[#4681E8] bg-[#4681E8]/5":"border-transparent text-[#64748B] hover:text-[#94A3B8] hover:bg-slate-100"}`,children:[(0,a.jsx)("span",{className:`text-[11px] font-bold uppercase tracking-widest ${_===l?"text-[#4681E8]":""}`,children:e.label}),(0,a.jsx)("span",{className:`text-[12px] font-mono mt-0.5 ${_===l?"text-slate-800 font-black":""}`,children:e.date})]},`tab-${l}`)})}),(0,a.jsx)("button",{type:"button",disabled:!T,onClick:()=>w(e=>Math.min(L,e+1)),className:`flex items-center justify-center w-8 h-[52px] bg-slate-100 border-l border-slate-200 text-slate-600 hover:text-slate-800 hover:bg-slate-200 transition-all shrink-0 ${!T?"opacity-30":"cursor-pointer"}`,children:(0,a.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2.5,d:"M9 5l7 7-7 7"})})})]}),(0,a.jsxs)("div",{className:"relative mb-4",children:[(0,a.jsxs)("button",{onClick:()=>f(!b),className:"flex items-center gap-3 bg-white hover:bg-slate-50 px-4 py-2.5 rounded-xl border border-slate-200 shadow-sm transition-all text-sm group",children:[(0,a.jsx)("svg",{className:"w-5 h-5 text-[#E11D48] transition-colors group-hover:text-[#F43F5E]",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 6h16M4 12h16M4 18h16"})}),(0,a.jsx)("span",{className:"text-slate-700 font-bold text-[13px] uppercase tracking-wide",children:"Danh s\xe1ch giải đấu"}),(0,a.jsx)("svg",{className:`w-4 h-4 text-slate-500 transition-transform duration-300 ${b?"rotate-180":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),b&&(0,a.jsxs)("div",{className:"absolute top-full left-0 mt-2 w-[360px] bg-white border border-slate-200 rounded-2xl shadow-[0_24px_80px_rgba(0,0,0,0.12)] z-50 max-h-[320px] overflow-hidden flex flex-col",children:[(0,a.jsx)("div",{className:"p-2 border-b border-slate-100",children:(0,a.jsx)("input",{type:"text",placeholder:"T\xecm giải đấu...",value:u,onChange:e=>g(e.target.value),className:"w-full bg-slate-50 border border-transparent roun
818ded-xl px-4 py-2.5 text-sm text-slate-800 placeholder-slate-400 outline-none focus:border-[#4681E8]/50 transition-colors"})}),(0,a.jsx)("div",{className:"overflow-y-auto flex-1 py-2",children:E.map((e,t)=>(0,a.jsxs)("button",{type:"button",onClick:()=>{g(e.league_name),f(!1)},className:"w-full flex items-center gap-3 px-4 py-2.5 hover:bg-slate-50 text-left text-[13px] transition-colors",children:[e.league_icon?(0,a.jsx)("img",{src:e.league_icon,alt:e.league_name||"League",className:"w-5 h-5 object-contain shrink-0",loading:"lazy",decoding:"async"}):(0,a.jsx)("div",{className:"w-5 h-5 rounded-md bg-slate-200 shrink-0"}),(0,a.jsx)("span",{className:"text-slate-600 truncate flex-1 font-medium",children:e.league_name}),(0,a.jsx)("span",{className:"text-[11px] text-[#E11D48] font-bold shrink-0 px-2 py-0.5 bg-[#E11D48]/10 rounded-md border border-[#E11D48]/20",children:e.matches.length})]},t))})]})]}),(0,a.jsxs)("div",{className:"grid grid-cols-[1fr_60px_55px_100px_100px_90px] bg-slate-50 border border-slate-200 rounded-t-xl px-4 py-3 text-[11px] text-slate-500 font-black uppercase tracking-widest shadow-inner",children:[(0,a.jsx)("span",{children:"Trận đấu"}),(0,a.jsx)("span",{className:"text-center",children:"Tỷ số"}),(0,a.jsx)("span",{className:"text-center",children:"Hiệp 1"}),(0,a.jsx)("span",{className:"text-center",children:"Cược chấp"}),(0,a.jsx)("span",{className:"text-center",children:"T\xe0i/Xỉu"}),(0,a.jsx)("span",{className:"text-center",children:"1 X 2"})]}),(0,a.jsxs)("div",{className:"border border-slate-200 border-t-0 rounded-b-xl overflow-hidden relative shadow-[0_8px_30px_rgba(0,0,0,0.06)]",children:[s&&(0,a.jsx)("div",{className:"absolute inset-0 z-10 bg-white/80 backdrop-blur-[2px]",children:(0,a.jsx)("div",{className:"space-y-0",children:[...Array(6)].map((e,t)=>(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 px-4 py-3.5 bg-slate-100 border-b border-slate-200",children:[(0,a.jsx)("div",{className:"w-4 h-4 rounded bg-slate-300 animate-pulse"}),(0,a.jsx)("div",{className:"h-3.5 rounded bg-slate-200 animate-pulse",style:{width:`${120+30*t}px`}})]}),[void 0,void 0].map((e,t)=>(0,a.jsxs)("div",{className:"grid grid-cols-[1fr_60px_55px_100px_100px_90px] items-center px-4 py-3 border-b border-slate-100",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)("div",{className:"w-10 h-3.5 rounded bg-slate-200 animate-pulse"}),(0,a.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,a.jsx)("div",{className:"h-3 w-24 rounded bg-slate-100 animate-pulse"}),(0,a.jsx)("div",{className:"h-3 w-20 rounded bg-slate-100 animate-pulse"})]})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5",children:[(0,a.jsx)("div",{className:"h-3 w-5 rounded bg-slate-100 animate-pulse"}),(0,a.jsx)("div",{className:"h-3 w-5 rounded bg-slate-100 animate-pulse"})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5",children:[(0,a.jsx)("div",{className:"h-3 w-5 rounded bg-slate-100 animate-pulse"}),(0,a.jsx)("div",{className:"h-3 w-5 rounded bg-slate-100 animate-pulse"})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5",children:[(0,a.jsx)("div",{className:"h-3 w-14 rounded bg-slate-100 animate-pulse"}),(0,a.jsx)("div",{className:"h-3 w-10 rounded bg-slate-100 animate-pulse"})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5",children:[(0,a.jsx)("div",{className:"h-3 w-14 rounded bg-slate-100 animate-pulse"}),(0,a.jsx)("div",{className:"h-3 w-10 rounded bg-slate-100 animate-pulse"})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5",children:[(0,a.jsx)("div",{className:"h-3 w-10 rounded bg-slate-100 animate-pulse"}),(0,a.jsx)("div",{className:"h-3 w-10 rounded bg-slate-100 animate-pulse"}),(0,a.jsx)("div",{className:"h-3 w-10 rounded bg-slate-100 animate-pulse"})]})]},t))]},t))})}),0!==S.length||s?S.map((e,t)=>(0,a.jsxs)("div",{id:`league-${t}`,children:[(0,a.jsxs)("button",{onClick:()=>{p(e=>{let s=new Set(e);return s.has(t)?s.delete(t):s.add(t),s})},className:"w-full flex items-center gap-3 px-4 py-3 bg-slate-50 hover:bg-slate-100 border-b border-slate-100 transition-colors text-left group",children:[(0,a.jsx)("svg",{className:`w-4 h-4 text-[#E11D48] transition-transform duration-300 shrink-0 ${m.has(t)?"-rotate-90":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2.5,d:"M19 9l-7 7-7-7"})}),e.league_icon&&(0,a.jsx)("div",{className:"w-6 h-6 rounded-full bg-slate-100 p-0.5 border border-slate-200 flex items-center justify-center shadow-sm",children:(0,a.jsx)("img",{src:e.league_icon,alt:e.league_name||"League",className:"w-4 h-4 object-contain shrink-0",loading:"lazy",decoding:"async"})}),(0,a.jsx)("span",{className:"text-[13px] font-bold text-slate-700 flex-1 truncate uppercase tracking-widest",children:e.league_name}),(0,a.jsxs)("span",{className:"text-[11px] text-[#E11D48] font-bold shrink-0 ml-1 px-2 py-0.5 bg-[#E11D48]/10 rounded border border-[#
818E11D48]/20 group-hover:bg-[#E11D48]/20 transition-colors",children:["BXH ",(0,a.jsx)("svg",{className:"inline w-3 h-3 ml-0.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 6h16M4 10h16M4 14h16M4 18h16"})})]})]}),!m.has(t)&&e.matches.map((e,t)=>(0,a.jsxs)("div",{className:"grid grid-cols-[1fr_60px_55px_100px_100px_90px] items-center px-4 py-3 bg-transparent hover:bg-slate-50 border-b border-slate-100 last:border-0 transition-colors group cursor-default",children:[(0,a.jsxs)("div",{className:"flex items-center gap-4 min-w-0",children:[(0,a.jsx)("span",{className:"text-[#E11D48] font-mono text-[13px] font-black min-w-[42px] shrink-0 drop-shadow-[0_0_4px_rgba(225,29,72,0.4)]",children:e.time}),(0,a.jsxs)("div",{className:"flex flex-col gap-1 min-w-0 flex-1",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[e.home_logo&&(0,a.jsx)("img",{src:e.home_logo,alt:e.home_team||"Home team",className:"w-4 h-4 object-contain shrink-0 filter drop-shadow-[0_2px_2px_rgba(0,0,0,0.8)]",loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-[13px] text-slate-700 font-medium truncate group-hover:text-slate-900 transition-colors",children:e.home_team})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[e.away_logo&&(0,a.jsx)("img",{src:e.away_logo,alt:e.away_team||"Away team",className:"w-4 h-4 object-contain shrink-0",loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-[13px] text-slate-700 font-medium truncate group-hover:text-slate-900 transition-colors",children:e.away_team})]})]})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center",children:[(0,a.jsx)("span",{className:"text-[12px] text-[var(--accent-cyan)] font-mono font-bold",children:"-"!==e.score?e.score:"-"}),(0,a.jsx)("span",{className:"text-[12px] text-[#64748B]",children:"-"})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center",children:[(0,a.jsx)("span",{className:"text-[12px] text-[#64748B]",children:"-"}),(0,a.jsx)("span",{className:"text-[12px] text-[#64748B]",children:"-"})]}),(0,a.jsx)(x,{values:e.handicap,hasLine:!0}),(0,a.jsx)(x,{values:e.over_under,hasLine:!0}),(0,a.jsx)("div",{className:"flex flex-col items-center gap-0",children:e.one_x_two?.length>0?e.one_x_two.map((e,t)=>(0,a.jsx)("span",{className:"text-[11px] text-slate-500 leading-[18px]",children:e||"-"},t)):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"text-[11px] text-[#64748B] leading-[18px]",children:"-"}),(0,a.jsx)("span",{className:"text-[11px] text-[#64748B] leading-[18px]",children:"-"}),(0,a.jsx)("span",{className:"text-[11px] text-[#64748B] leading-[18px]",children:"-"})]})})]},t))]},t)):(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center py-20 gap-3 bg-slate-50",children:[(0,a.jsx)("svg",{className:"w-12 h-12 text-slate-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",strokeWidth:1.5,children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6.75 3v2.25M17.25 3v2.25M3 18.75V7.5a2.25 2.25 0 012.25-2.25h13.5A2.25 2.25 0 0121 7.5v11.25m-18 0A2.25 2.25 0 005.25 21h13.5A2.25 2.25 0 0021 18.75m-18 0v-7.5A2.25 2.25 0 015.25 9h13.5A2.25 2.25 0 0121 11.25v7.5"})}),(0,a.jsx)("span",{className:"text-slate-500 font-medium tracking-wide",children:"Kh\xf4ng c\xf3 trận đấu n\xe0o cho ng\xe0y n\xe0y"}),(0,a.jsx)("span",{className:"text-slate-400 text-[12px]",children:"H\xe3y thử chọn một ng\xe0y kh\xe1c"})]})]}),(0,a.jsxs)("div",{className:"mt-6 text-center text-[11px] text-[#64748B] uppercase tracking-widest font-bold drop-shadow-sm",children:["Tổng cộng ",A," trận đấu trong ",S.length," giải"]}),(0,a.jsx)(i,{html:o})]}):(0,a.jsxs)("div",{className:"max-w-[1440px] mx-auto px-4 py-8",children:[(0,a.jsx)(n.B,{eyebrow:"Lịch thi đấu",title:"LỊCH THI ĐẤU"}),(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center py-16 gap-4",children:[(0,a.jsx)("div",{className:"w-12 h-12 rounded-full border-2 border-[#E11D48]/30 border-t-[#E11D48] animate-spin"}),(0,a.jsx)("span",{className:"text-slate-500 text-sm font-medium tracking-wide",children:"Đang tải lịch thi đấu..."})]})]})}function x({values:e,hasLine:t}){return e&&0!==e.length?t&&e.length>=3?(0,a.jsxs)("div",{className:"flex flex-col items-center gap-0",children:[(0,a.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,a.jsx)("span",{className:"text-[11px] text-[#E11D48] leading-[18px] font-bold",children:e[0]}),(0,a.jsx)("span",{className:"text-[11px] text-slate-500 leading-[18px]",children:e[1]})]}),(0,a.jsx)("span",{className:"text-[11px] text-slate-500 leading-[18px]",children:e[2]})]}):(0,a.jsx)("div",{className:"flex flex-col items-center gap-0",children:e.map((e,t)=>(0,a.jsx)("span",{className:"text-[11px] text-slate-500 leading-[18px]",children:e||"-"},t))}):(0,a.jsxs)("div",{className:"flex flex-col items-center",children:[(0,a.jsx)("span",{className:"text-[11px] text-[#64748B] leading-[18px]",children:"-"}),(0,a.jsx)("span",{className:"text-[11px] text-[#64748B] leading-[18px]",children:"-"})]})}},82712:(e,t,s)=>{"use strict";s.d(t,{LiveMatchesClient:()=>m});var a=s(68019),l=s(10707);function r({activeSport:e,onSportChange:t,activeStatus:s,onStatusChange:l,matchesCount:n}){return(0,a.jsxs)("div",{className:"mb-5 flex flex-col gap-3",children:[(0,a.jsx)("div",{className:"flex items-center gap-2 overflow-x-auto pb-1 scrollbar-hide",children:[{id:"1",label:"B\xd3NG Đ\xc1",icon:"⚽"},{id:"2",label:"B\xd3NG RỔ",icon:"\uD83C\uDFC0"},{id:"5",label:"TENNIS",icon:"\uD83C\uDFBE"},{id:"4",label:"CẦU L\xd4NG",icon:"\uD83C\uDFF8"},{id:"3",label:"B\xd3NG CHUYỀN",icon:"\uD83C\uDFD0"},{id:"6",label:"B\xd3NG B\xc0N",icon:"\uD83C\uDFD3"}].map(s=>{let l=e===s.id;return(0,a.jsxs)("button",{type:"button",onClick:()=>t(s.id),className:`flex items-center gap-2 px-4 py-2.5 rounded-xl font-bold text-[12px] whitespace-nowrap transition-all duration-200 border cursor-pointer ${l?"bg-[#4681E8]/10 text-[#4681E8] border-[#4681E8]/40 shadow-[0_0_15px_rgba(70,129,232,0.1)]":"bg-white text-slate-500 border-slate-200 hover:text-slate-700 hover:border-[#4681E8]/30"}`,children:[(0,a.jsx)("span",{className:"text-[14px]",children:s.icon}
818),(0,a.jsx)("span",{className:"tracking-wider uppercase",children:s.label})]},s.id)})}),(0,a.jsx)("div",{className:"flex items-center gap-1 overflow-x-auto pb-1 scrollbar-hide bg-white rounded-xl p-1.5 border border-slate-200",children:[{id:"all",label:"TẤT CẢ",keyCount:"all"},{id:"live",label:"TRỰC TIẾP",keyCount:"live"},{id:"hot",label:"HOT",keyCount:"hot"},{id:"today",label:"H\xd4M NAY",keyCount:"today"},{id:"tomorrow",label:"NG\xc0Y MAI",keyCount:"tomorrow"}].map(e=>{let t=s===e.id,r=n[e.keyCount]||0;return(0,a.jsxs)("button",{type:"button",onClick:()=>l(e.id),className:`relative px-4 py-2 font-bold text-[12px] whitespace-nowrap transition-all duration-200 uppercase tracking-wider flex items-center gap-2 rounded-lg cursor-pointer ${t?"bg-[#4681E8]/10 text-[#4681E8] shadow-inner":"text-slate-500 hover:text-slate-700 hover:bg-[#4681E8]/5"}`,children:["live"===e.id&&t&&(0,a.jsx)("span",{className:"w-1.5 h-1.5 rounded-full bg-[#4681E8] animate-pulse shadow-[0_0_6px_rgba(70,129,232,0.8)]"}),(0,a.jsx)("span",{children:e.label}),(0,a.jsx)("span",{className:`px-1.5 py-0.5 rounded text-[10px] font-black ${t?"bg-[#4681E8]/20 text-[#4681E8]":"text-slate-400"}`,children:r})]},e.id)})})]})}function n(){return"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='10' fill='%2364748B' fill-opacity='0.18'/%3E%3C/svg%3E"}function i({match:e,isLoading:t=!1}){if(t||!e)return(0,a.jsx)("div",{className:"animate-pulse bg-white h-[64px] w-full border-b border-slate-100"});let s=new Date(1e3*parseInt(e.time||0,10)).toLocaleTimeString("vi-VN",{hour:"2-digit",minute:"2-digit",timeZone:"Asia/Ho_Chi_Minh"}),l=function(e,t){if("1"===t||"2"===t)switch(e){case"1":default:return{text:"Sắp diễn",isLive:!1,showScore:!1};case"2":return{text:"H1",isLive:!0,showScore:!0};case"3":return{text:"HT",isLive:!0,showScore:!0};case"4":return{text:"H2",isLive:!0,showScore:!0};case"5":return{text:"Phụ",isLive:!0,showScore:!0};case"7":return{text:"Pen",isLive:!0,showScore:!0};case"8":case"9":return{text:"FT",isLive:!1,showScore:!0}}switch(e){case"0":case"1":return{text:"Sắp diễn",isLive:!1,showScore:!1};case"51":return{text:"S1",isLive:!0,showScore:!0};case"52":return{text:"S2",isLive:!0,showScore:!0};case"53":return{text:"S3",isLive:!0,showScore:!0};case"54":return{text:"S4",isLive:!0,showScore:!0};case"55":return{text:"S5",isLive:!0,showScore:!0};case"100":case"90":case"91":case"110":return{text:"FT",isLive:!1,showScore:!0};default:return{text:"LIVE",isLive:!0,showScore:!0}}}(String(e.status_id),String(e.sport_id)),r=e.time_text||e.source_card_meta?.time_text||"",o=l.isLive,c=e.home_score??"-",d=e.away_score??"-",x=e.home_logo||n(),h=e.away_logo||n();return(0,a.jsxs)("a",{href:`/match/${encodeURIComponent(e.post_name||e.id)}`,className:"flex items-center w-full group border-b border-slate-100 bg-white hover:bg-[#4681E8]/5 transition-colors min-h-[64px]",children:[(0,a.jsx)("div",{className:`w-[60px] flex flex-col items-center justify-center shrink-0 h-full border-r ${o?"border-[#4681E8]/30 bg-[#4681E8]/5":"border-slate-100"}`,children:o?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"text-[#4681E8] font-bold text-[11px] uppercase tracking-wider tabular-nums leading-none",children:r||l.text}),(0,a.jsx)("span",{className:"w-1.5 h-1.5 rounded-full bg-[#4681E8] animate-pulse mt-1"})]}):(0,a.jsx)("span",{className:"text-slate-500 font-medium text-[12px]",children:s})}),(0,a.jsxs)("div",{className:"flex-1 flex flex-col justify-center px-3 py-2 gap-1.5 min-w-0",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between w-full",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2.5 min-w-0 overflow-hidden",children:[(0,a.jsx)("img",{src:x,alt:e.home_name,className:"w-4 h-4 shrink-0 object-contain",onError:e=>e.currentTarget.src=n(),loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-[13px] font-semibold truncate text-slate-800",children:e.home_name})]}),l.showScore&&(0,a.jsx)("span",{className:`text-[15px] font-black tabular-nums shrink-0 ml-2 ${o?"text-[#4681E8]":"text-slate-700"}`,children:c})]}),(0,a.jsxs)("div",{className:"flex items-center justify-between w-full",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2.5 min-w-0 overflow-hidden",children:[(0,a.jsx)("img",{src:h,alt:e.away_name,className:"w-4 h-4 shrink-0 object-contain",onError:e=>e.currentTarget.src=n(),loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-[13px] font-semibold truncate text-slate-800",children:e.away_name})]}),l.showScore&&(0,a.jsx)("span",{className:`text-[15px] font-black tabular-nums shrink-0 ml-2 ${o?"text-[#4681E8]":"text-slate-700"}`,children:d})]})]}),(0,a.jsx)("div",{className:"w-[48px] h-full flex items-center justify-center shrink-0 text-slate-300 group-hover:text-[#4681E8] transition-colors border-l border-slate-100",children:(0,a.jsx)("svg",{className:"w-5 h-5 fill-current",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{d:"M8 5v14l11-7z"})})})]})}let o=new Set(["1","2","3","4","5","7"]),c=new Set(["8","9","15"]),d=new Set(["51","52","53","54","5
8185","56","57","58","59"]),x=new Set(["100","90","91","92","93","110"]);function h(e){let t=String(e.status_id);return 2>=parseInt(e.sport_id)?o.has(t):d.has(t)}function m({matches:e,matchIndex:t}){let[s,n]=(0,l.useState)("1"),[o,d]=(0,l.useState)("all"),[p,u]=(0,l.useState)(1);(0,l.useEffect)(()=>{u(1)},[s,o]);let{todayStart:g,tomorrowStart:b,dayAfterStart:f}=(0,l.useMemo)(()=>{let e,t,s,{vnTodayStartUTC:a,vnTomorrowStartUTC:l,vnDayAfterStartUTC:r}=(s=(t=Math.floor(Date.UTC((e=new Date(Date.now()+252e5)).getUTCFullYear(),e.getUTCMonth(),e.getUTCDate())/1e3)-25200)+86400,{vnTodayStartUTC:t,vnTomorrowStartUTC:s,vnDayAfterStartUTC:s+86400});return{todayStart:a,tomorrowStart:l,dayAfterStart:r}},[]),j=(0,l.useMemo)(()=>new Map(e.map(e=>[e?.match_key?String(e.match_key):e?.ls_id?String(e.ls_id):e?.id?`${String(e.sport_id||"0")}:${String(e.id)}`:e?.scheduleId?`${String(e.sport_id||"0")}:schedule:${String(e.scheduleId)}`:[String(e?.sport_id||"0"),String(e?.time||"0"),String(e?.home_name||""),String(e?.away_name||"")].join(":"),e])),[e]),w=t?.summary_by_sport?.[s],v=t?.bucket_keys_by_sport?.[s],N=t?.bucket_pages_by_sport?.[s],y=e.filter(e=>{let t;return String(e.sport_id)===s&&(t=String(e.status_id),2>=parseInt(e.sport_id)?!c.has(t):!x.has(t))}),_=y.filter(e=>{let t=parseInt(e.time);return t>=g&&t<b}),k=y.filter(e=>{let t=parseInt(e.time);return t>=b&&t<f}),E={all:y.length,live:y.filter(e=>h(e)).length,hot:y.filter(e=>"1"===String(e.hot)).length,today:_.length,tomorrow:k.length},C=(0,l.useMemo)(()=>{if(v){if("all"===o&&Array.isArray(N?.all)&&N.all.length>0)return N.all.slice(0,p).flat().map(e=>j.get(e)).filter(Boolean);let e=v[o];if(Array.isArray(e))return e.map(e=>j.get(e)).filter(Boolean)}return"all"===o?y:"live"===o?y.filter(e=>h(e)):"hot"===o?y.filter(e=>"1"===String(e.hot)):"today"===o?_:"tomorrow"===o?k:y},[o,y,j,N,v,_,k,p]),S="all"===o&&Array.isArray(N?.all)&&p<N.all.length,L=(0,l.useMemo)(()=>"all"!==o&&"live"!==o&&"hot"!==o?[]:C.filter(e=>"1"===String(e.hot)||h(e)).slice(0,4),[C,o]),$=(0,l.useMemo)(()=>{let e=new Map;
818return C.forEach(t=>{let s=t.source_card_meta?.league_label||t.match_data?.competition_vi||t.match_data?.competition_name||t.match_data?.competition_full||"Giải đấu kh\xe1c";e.has(s)||e.set(s,[]),e.get(s).push(t)}),Array.from(e.entries())},[C]);return(0,a.jsxs)("div",{className:"w-full min-h-[500px]",children:[(0,a.jsx)(r,{activeSport:s,onSportChange:n,activeStatus:o,onStatusChange:d,matchesCount:w||E}),0===C.length?(0,a.jsx)("div",{className:"py-20 text-center",children:(0,a.jsx)("div",{className:"text-slate-400 text-base font-medium",children:"Kh\xf4ng c\xf3 trận đấu n\xe0o."})}):(0,a.jsxs)("div",{className:"flex flex-col gap-6",children:[L.length>0&&"all"===o&&(0,a.jsxs)("div",{className:"mb-4",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 mb-3 px-1",children:[(0,a.jsx)("span",{className:"w-2 h-4 rounded-full bg-[#4681E8]"}),(0,a.jsx)("h2",{className:"text-slate-800 font-black text-sm uppercase tracking-wider",children:"Trận đấu t\xe2m điểm"})]}),(0,a.jsx)("div",{className:"grid grid-cols-1 xl:grid-cols-2 gap-2",children:L.map((e,t)=>(0,a.jsx)(i,{match:e},`featured-${e.ls_id||e.id}-${t}`))})]}),(0,a.jsx)("div",{className:"flex flex-col gap-5",children:$.map(([e,t])=>{let s=t[0]?.match_data?.competition_logo;return(0,a.jsxs)("div",{className:"rounded-xl overflow-hidden border border-slate-200 bg-white shadow-sm",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2.5 bg-[#0E1B33] px-4 py-2.5 border-b border-[#0E1B33]",children:[s&&(0,a.jsx)("img",{src:s,alt:"league",className:"w-4 h-4 object-contain brightness-200 opacity-80",loading:"lazy",decoding:"async"}),(0,a.jsx)("h3",{className:"text-white text-[12px] font-bold uppercase tracking-wider truncate",children:e})]}),(0,a.jsx)("div",{className:"flex flex-col",children:t.map((e,t)=>(0,a.jsx)(i,{match:e},e.ls_id||`${e.id}-${t}`))})]},e)})}),S&&(0,a.jsx)("div",{className:"flex justify-center mt-6",children:(0,a.jsx)("button",{type:"button",onClick:()=>u(e=>e+1),className:"inline-flex items-center justify-center rounded-xl border border-[#4681E8]/30 bg-white px-8 py-3 text-[12px] font-bold uppercase tracking-wider text-[#4681E8] transition-all duration-200 hover:bg-[#4681E8] hover:text-white hover:border-[#4681E8]",children:"Tải th\xeam"})})]})]})}},83378:(e,t,s)=>{"use strict";s.d(t,{KlivevipResultsPage:()=>o});var a=s(68019),l=s(10707),r=s(78637),n=s(22739),i=s(63145);function o({initialData:e,selectedLeague:t}){let s=(0,r.useRouter)(),c=(0,r.usePathname)(),d=(0,r.useSearchParams)(),[x,h]=(0,l.useTransition)(),[m,p]=(0,l.useState)(!1),[u,g]=(0,l.useState)(""),{availableLeagues:b,dateGroups:f}=(0,l.useMemo)(()=>(0,i.o8)(e),[e]),j=(0,l.useMemo)(()=>Array.from(new Set(f.map(e=>e.date_header))),[f]),w=d.get("date")||"",v=e=>{let t=new URLSearchParams(d.toString());e&&e!==w?t.set("date",e):t.delete("date"),h(()=>{let e=t.toString();s.push(e?`${c}?${e}`:c,{scroll:!1})})},N=(0,l.useMemo)(()=>{let e=f;return w&&(e=e.filter(e=>e.date_header===w)),(0,i.kK)(e,t)},[f,w,t]),y=(0,l.useMemo)(()=>{if(!u)return b;let e=u.toLowerCase();return b.filter(t=>t.name.toLowerCase().includes(e))},[b,u]),_=N.reduce((e,t)=>e+t.matches.length,0);if(0===f.length)return(0,a.jsxs)("div",{className:"max-w-[1440px] mx-auto px-4 py-8",children:[(0,a.jsx)(n.d,{eyebrow:"Kết quả",title:"KẾT QUẢ B\xd3NG Đ\xc1"}),(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center py-16 gap-4",children:[(0,a.jsx)("div",{className:"w-12 h-12 rounded-full border-2 border-[#E11D48]/30 border-t-[#E11D48] animate-spin"}),(0,a.jsx)("span",{className:"text-slate-500 text-sm font-medium tracking-wide",children:"Đang tải kết quả..."})]})]});let k=e=>{let t=new URLSearchParams(d.toString());e?t.set("league",e):t.delete("league"),p(!1),g(""),h(()=>{let e=t.toString();s.push(e?`${c}?${e}`:c,{scroll:!1})})};return(0,a.jsxs)("div",{className:"max-w-[1440px] mx-auto px-4 py-8",children:[(0,a.jsx)(n.d,{eyebrow:"Kết quả",title:"KẾT QUẢ B\xd3NG Đ\xc1",rightSlot:(0,a.jsx)("div",{className:"text-[12px] text-slate-600",children:(0,a.jsx)("span",{className:"text-slate-900/80 font-bold",children:t||"Tất cả giải đấu"})})}),(0,a.jsxs)("div",{className:"flex flex-col md:flex-row gap-4 mb-4 items-start md:items-center justify-between",children:[j.length>0&&(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,a.jsx)("button",{type:"button",onClick:()=>v(""),className:`px-4 py-2 rounded-xl text-sm font-bold transition-all duration-300 ${!w?"bg-gradient-to-r from-[#4681E8] to-[#2563eb] text-white shadow-[0_4px_15px_rgba(70,129,232,0.4)] border border-[#4681E8]/50":"bg-white text-[#64748B] border border-slate-200 hover:bg-slate-50 hover:text-slate-800"}`,children:"Tất cả ng\xe0y"}),j.slice(0,5).map(e=>(0,a.jsx)("button",{type:"button",onClick:()=>v(e),className:`px-4 py-2 rounded-xl text-sm font-bold transition-all duration-300 ${w===e?"bg-gradient-to-r from-[#4681E8] to-[#2563eb] text-white shadow-[0_4px_15px_rgba(70,129,232,0.4)] border border-[#4681E8]/50":"bg-white text-[#64748B] border border-slate-200 hover:bg-slate-50 hover:text-slate-800"}`,children:e},e))]}),(0,a.jsxs)("div",{className:"relative w-full md:w-[320px]",children:[(0,a.jsxs)("button",{onClick:()=>p(!m),className:"w-full flex items-center gap-3 bg-white hover:bg-slate-50 px-4 py-2.5 rounded-xl border border-slate-200 shadow-inner transition-all text-sm",children:[(0,a.jsx)("svg",{className:"w-5 h-5 text-[#4681E8]",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 4a1 1 0 011-1h16a1 1 0 011 1v2.586a1 1 0 01-.293.707l-6.414 6.414a1 1 0 00-.293.707V17l-4 4v-6.586a1 1 0 00-.293-.707L3.293 7.293A1 1 0 013 6.586V4z"})}),(0,a.jsx)("span",{className:"text-slate-700 font-bold flex-1 text-left truncate",children:t||"Chọn giải đấu..."}),(0,a.jsx)("svg",{className:`w-4 h-4 text-slate-400 transition-transform ${m?"rotate-180":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),m&&(0,a.jsxs)("div",{className:"absolute top-full left-0 right-0 mt-2 bg-white border border-slate-200 rounded-2xl shadow-xl z-50 max-h-[300px] overflow-hidden flex flex-col",children:[(0,a.jsx)("div",{className:"p-2 border-b border-slate-100",children:(0,a.jsx)("input",{type:"text",placeholder:"T\xecm giải đấu...",value:u,onChange:e=>g(e.target.value),className:"w-full bg-slate-50 border border-transparent roun
818ded-xl px-4 py-2.5 text-sm text-slate-800 placeholder-slate-400 outline-none focus:border-[#4681E8]/50 transition-colors"})}),(0,a.jsxs)("div",{className:"overflow-y-auto flex-1 pb-2",children:[(0,a.jsx)("button",{type:"button",onClick:()=>k(),className:`block w-full text-left px-4 py-3 text-sm transition-colors ${!t?"bg-[#4681E8]/10 text-[#4681E8] border-l-4 border-[#4681E8]":"text-slate-600 hover:bg-slate-50 hover:text-slate-800"}`,children:"Tất cả giải đấu"}),y.map((e,s)=>(0,a.jsxs)("button",{type:"button",onClick:()=>k(e.name),className:`flex items-center gap-3 px-4 py-3 text-sm transition-colors cursor-pointer ${t===e.name?"bg-[#4681E8]/10 text-[#4681E8] border-l-4 border-[#4681E8]":"text-slate-600 hover:bg-slate-50 hover:text-slate-800"}`,children:[e.icon?(0,a.jsx)("img",{src:e.icon,alt:e.name||"League",className:"w-5 h-5 object-contain shrink-0",loading:"lazy",decoding:"async"}):(0,a.jsx)("div",{className:"w-5 h-5 rounded-md bg-slate-200 shrink-0"}),(0,a.jsx)("span",{className:"truncate",children:e.name})]},s))]})]})]})]}),x&&(0,a.jsxs)("div",{className:"mb-4 inline-flex items-center gap-2 rounded-full border border-slate-200 bg-white px-4 py-2 text-xs text-slate-500 shadow-sm",children:[(0,a.jsx)("span",{className:"h-2 w-2 rounded-full bg-[#E11D48] animate-pulse shadow-[0_0_8px_rgba(225,29,72,0.8)]"}),(0,a.jsx)("span",{className:"font-bold tracking-wide",children:"Đang tải kết quả từ server..."})]}),(0,a.jsx)("div",{className:"space-y-4",children:0===N.length?(0,a.jsx)("div",{className:"text-center py-16 text-[#64748B] font-medium tracking-wide",children:"Kh\xf4ng c\xf3 kết quả n\xe0o"}):N.map((e,t)=>(0,a.jsxs)("div",{className:"overflow-hidden rounded-2xl border border-slate-200 bg-white shadow-[0_8px_30px_rgba(0,0,0,0.06)]",children:[(0,a.jsx)("div",{className:"bg-slate-50 px-5 py-3 border-b border-slate-100 flex items-center justify-between",children:(0,a.jsxs)("span",{className:"text-[12px] text-slate-500 font-bold uppercase tracking-widest",children:[e.league_round?e.league_round:"V\xf2ng đấu",(0,a.jsx)("span",{className:"text-[#E11D48] ml-2 font-mono text-[11px] bg-[#E11D48]/10 px-2 py-0.5 rounded-full border border-[#E11D48]/20",children:e.date_header})]})}),e.matches.map((e,t)=>{var s;return(0,a.jsx)("div",{className:"bg-transparent hover:bg-slate-50 border-b border-slate-100 last:border-0 transition-colors group cursor-default",children:(0,a.jsxs)("div",{className:"flex items-center py-4 px-5 gap-4",children:[(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center min-w-[56px] shrink-0 border-r border-slate-100 pr-4",children:[(0,a.jsx)("span",{className:"text-[9px] text-slate-400 uppercase tracking-widest mb-1 font-bold",children:"L\xfac"}),(0,a.jsx)("span",{className:"text-[13px] text-slate-700 font-mono font-black",children:e.time})]}),(0,a.jsxs)("div",{className:"flex-1 flex items-center justify-end gap-3 min-w-0",children:[(0,a.jsx)("span",{className:"text-[14px] text-slate-800 font-bold truncate text-right group-hover:text-slate-900 transition-colors",children:e.home_team}),e.home_logo?(0,a.jsx)("div",{className:"w-8 h-8 rounded-full bg-slate-100 border border-slate-200 p-1 flex items-center justify-center shadow-sm",children:(0,a.jsx)("img",{src:e.home_logo,alt:e.home_team||"Home team",className:"w-full h-full object-contain",loading:"lazy"})}):(0,a.jsx)("div",{className:"w-8 h-8 rounded-full bg-slate-100 shrink-0 border border-slate-200 flex items-center justify-center text-[10px] font-bold text-slate-400",children:"?"})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center min-w-[90px] shrink-0 bg-slate-50 rounded-xl py-2 px-2 border border-slate-200 shadow-inner group-hover:border-[#4681E8]/40 transition-colors",children:[(0,a.jsx)("span",{className:`text-[22px] leading-none font-black tracking-widest drop-shadow-[0_2px_4px_rgba(0,0,0,0.8)] ${!(s=e.score)||"-"===s?"text-slate-400":"text-slate-800"}`,children:e.score}),e.ht_score&&(0,a.jsxs)("span",{className:"text-[10px] text-slate-500 font-mono mt-1 font-bold",children:["HT: ",e.ht_score]})]}),(0,a.jsxs)("div",{className:"flex-1 flex items-center gap-3 min-w-0",children:[e.away_logo?(0,a.jsx)("div",{className:"w-8 h-8 rounded-full bg-slate-100 border border-slate-200 p-1 flex items-center justify-center shadow-sm",children:(0,a.jsx)("img",{src:e.away_logo,alt:e.away_team||"Away team",className:"w-full h-full object-contain",loading:"lazy"})}):(0,a.jsx)("div",{className:"w-8 h-8 rounded-full bg-slate-100 shrink-0 border border-slate-200 flex items-center justify-center text-[10px] font-bold text-slate-400",children:"?"}),(0,a.jsx)("span",{className:"text-[14px] text-slate-800 font-bold truncate text-left group-hover:text-slate-900 transition-colors",children:e.away_team})]})]})},t)})]},t))}),(0,a.jsxs)("div",{className:"mt-6 text-center text-xs text-[#64748B] font-bold uppercase tracking-widest drop-shadow-sm",children:["Hiển thị ",_," kết quả trận đấu"]})]})}},83727:(e,t,s)=>{"use strict";s.d(t,{Klivevip26MatchDetailPage:()=>m});var a=s(68019),l=s(10707),r=s(58420);function n({src:e,poster:t,autoPlay:s=!0,onError:i,className:o=""}){let c=(0,l.useRef)(null),d=(0,l.useRef)(i);d.current=i;let[x,h]=(0,l.useState)(!1),[m,p]=(0,l.useState)(!1);return((0,l.useEffect)(()=>{let t=c.current;if(!t)return;let a=null;h(!1);let l=()=>p(!0),n=()=>p(!1);t.addEventListener("play",l),t.addEventListener("pause",n);let i=()=>{s&&(t.muted=!0,t.play().catch(()=>{}))};if(t.addEventListener("canplay",i),r.Ay.isSupported()){(a=new r.Ay({maxBufferLength:30,maxMaxBufferLength:60,lowLatencyMode:!0,enableWorker:!0})).loadSource(e),a.attachMedia(t),a.on(r.Ay.Events.MANIFEST_PARSED,()=>{s&&(t.muted=!0,t.play().catch(e=>{console.warn("AutoPlay failed:",e),t.muted=!1}))});let l=0,n=0;a.on(r.Ay.Events.ERROR,(e,t)=>
818{if(t.type===r.Ay.ErrorTypes.NETWORK_ERROR&&(++l>2||t.response&&t.response.code>=400)){console.error("HLS Network Error threshold reached (CORS/404), triggering fallback.",t),h(!0),d.current&&d.current(t),a?.destroy();return}if(t.fatal)switch(t.type){case r.Ay.ErrorTypes.NETWORK_ERROR:console.error("HLS Fatal Network Error, recovering...",t),a?.startLoad();break;case r.Ay.ErrorTypes.MEDIA_ERROR:console.error("HLS Media Error, recovering...",t),++n>3?(console.error("HLS Media Error threshold reached, triggering fallback."),h(!0),d.current&&d.current(t),a?.destroy()):a?.recoverMediaError();break;default:console.error("HLS Fatal Error:",t),h(!0),d.current&&d.current(t),a?.destroy()}})}else t.canPlayType("application/vnd.apple.mpegurl")&&(t.src=e,t.addEventListener("loadedmetadata",()=>{s&&t.play().catch(e=>{console.warn("AutoPlay failed:",e)})}),t.addEventListener("error",e=>{h(!0),d.current&&d.current(e)}));return()=>{t.removeEventListener("play",l),t.removeEventListener("pause",n),t.removeEventListener("canplay",i),a&&a.destroy()}},[e,s]),x)?i?null:(0,a.jsxs)("div",{className:`w-full h-full flex flex-col items-center justify-center bg-white/80 backdrop-blur ${o}`,children:[(0,a.jsx)("svg",{className:"w-12 h-12 text-red-500 mb-4 opacity-80",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"})}),(0,a.jsx)("div",{className:"text-slate-600 text-sm font-medium",children:"Video/Stream kh\xf4ng khả dụng hoặc bị lỗi mạng"}),(0,a.jsx)("div",{className:"text-gray-500 text-xs mt-1",children:"Vui l\xf2ng thử lại sau hoặc chọn nguồn kh\xe1c"})]}):(0,a.jsx)("div",{className:`relative group w-full h-full bg-white flex items-center justify-center overflow-hidden ${o}`,children:(0,a.jsx)("video",{ref:c,className:"w-full h-full object-contain",controls:!0,playsInline:!0,muted:s,poster:t,referrerPolicy:"no-referrer"})})}function i(e){let t=(e||"").split(/[\s-]+/).slice(0,2).map(e=>e[0]||"").join("").toUpperCase()||"??";return`data:image/svg+xml,${encodeURIComponent(`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 80 80"><rect width="80" height="80" rx="20" fill="#1a1c25"/><text x="40" y="47" font-size="20" font-family="Arial" font-weight="700" text-anchor="middle" fill="#666">${t}</text></svg>`)}`}function o({homeName:e,awayName:t,homeLogo:s,awayLogo:l,homeScore:r="0",awayScore:n="0",statusText:c="LIVE",timeText:d="",isLive:x=!0,sportId:h="1",matchId:m}){let p=s||i(e),u=l||i(t),g="5"===String(h),b="2"===String(h),f="bg-slate-200 border-slate-200",j="repeating-linear-gradient(90deg, transparent, transparent 10%, #000 10%, #000 20%)";return g?(f="bg-slate-100 border-slate-200",j="none"):b&&(f="bg-[#bc7a46] border-[#8a4e21]",j="repeating-linear-gradient(90deg, transparent, transparent 5%, #000 5%, #000 10%)"),(0,a.jsxs)("div",{className:"relative w-full aspect-video min-h-[300px] max-h-[600px] bg-slate-50 overflow-hidden flex flex-col justify-center",children:[(0,a.jsx)("div",{className:"absolute inset-0 flex items-center justify-center pointer-events-none mt-16 md:mt-24",children:(0,a.jsx)("div",{className:"relative w-[120%] h-[120%] sm:w-[90%] sm:h-[120%] max-w-[900px] flex-shrink-0 transition-transform duration-1000",style:{transform:"perspective(900px) rotateX(60deg) scale(0.9)",transformOrigin:"center center"},children:(0,a.jsxs)("div",{className:`absolute inset-0 ${f} shadow-[0_30px_60px_rgba(0,0,0,0.8)] border-4 rounded-xl overflow-hidden flex transition-colors duration-500`,children:[(0,a.jsx)("div",{className:"absolute inset-0 opacity-15 pointer-events-none",style:{backgroundImage:j}}),(0,a.jsxs)("div",{className:"absolute inset-[4%] pointer-events-none shadow-sm flex items-center justify-center",children:["1"===String(h)&&(0,a.jsxs)("div",{className:"absolute inset-0 w-full h-full border-2 border-white/60",children:[(0,a.jsx)("div",{className:"absolute left-1/2 top-0 bottom-0 w-0 border-l-2 border-white/60 -translate-x-1/2"}),(0,a.jsx)("div",{className:"absolute left-1/2 top-1/2 w-[18%] aspect-square rounded-full border-2 border-white/60 -translate-x-1/2 -translate-y-1/2"}),(0,a.jsx)("div",{className:"absolute left-1/2 top-1/2 w-2 h-2 rounded-full bg-white/80 -translate-x-1/2 -translate-y-1/2"}),(0,a.jsx)("div",{className:"absolute left-0 top-1/2 w-[16%] h-[46%] border-2 border-l-0 border-white/60 -translate-y-1/2 bg-slate-200"}),(0,a.jsx)("div",{className:"absolute left-0 top-1/2 w-[6%] h-[20%] border-2 border-l-0 border-white/60 -translate-y-1/2 bg-slate-200"}),(0,a.jsx)("div",{className:"absolute left-[16%] top-1/2 w-[8%] aspect-square border-2 border-l-0 border-white/60 rounded-r-full -translate-y-1/2 clip-path-half",style:{clipPath:"inset(0 0 0 50%)"}}),(0,a.jsx)("div",{className:"absolute right-0 top-1/2 w-[16%] h-[46%] border-2 border-r-0 border-white/60 -translate-y-1/2 bg-slate-200"}),(0,a.jsx)("div",{className:"absolute right-0 top-1/2 w-[6%] h-[20%] border-2 border-r-0 border-white/60 -translate-y-1/2 bg-slate-200"}),(0,a.jsx)("div",{className:"absolute right-[16%] top-1/2 w-[8%] aspect-square border-2 border-r-0 border-white/60 rounded-l-full -translate-y-1/2 clip-path-half",style:{clipPath:"inset(0 50% 0 0)"}})]}),g&&(0,a.jsxs)("div",{className:"absolute inset-[10%] w-[80%] h-[80%
818] border-2 border-white/80 bg-white",children:[(0,a.jsx)("div",{className:"absolute top-[10%] bottom-[10%] left-0 right-0 border-y-2 border-white/80"}),(0,a.jsx)("div",{className:"absolute left-1/2 top-[-2%] bottom-[-2%] w-1 bg-white/40 shadow-xl -translate-x-1/2 z-10"}),(0,a.jsx)("div",{className:"absolute left-[25%] right-[25%] top-[10%] bottom-[10%] border-x-2 border-white/80"}),(0,a.jsx)("div",{className:"absolute left-[25%] right-[25%] top-1/2 w-[50%] border-t-2 border-white/80 -translate-y-1/2"}),(0,a.jsx)("div",{className:"absolute left-0 top-1/2 w-[2%] border-t-2 border-white/80 -translate-y-1/2"}),(0,a.jsx)("div",{className:"absolute right-0 top-1/2 w-[2%] border-t-2 border-white/80 -translate-y-1/2"})]}),b&&(0,a.jsxs)("div",{className:"absolute inset-0 w-full h-full border-2 border-white/50",children:[(0,a.jsx)("div",{className:"absolute left-1/2 top-0 bottom-0 w-0 border-l-2 border-white/50 -translate-x-1/2"}),(0,a.jsx)("div",{className:"absolute left-1/2 top-1/2 w-[15%] aspect-square rounded-full border-2 border-white/50 -translate-x-1/2 -translate-y-1/2"}),(0,a.jsx)("div",{className:"absolute left-0 top-1/2 w-[18%] h-[35%] border-2 border-l-0 border-white/50 -translate-y-1/2 bg-[#bc7a46]"}),(0,a.jsx)("div",{className:"absolute left-[18%] top-1/2 w-[10%] aspect-square rounded-full border-2 border-white/50 -translate-y-1/2"}),(0,a.jsx)("div",{className:"absolute left-0 top-1/2 w-[30%] h-[70%] border-2 border-l-0 border-white/50 rounded-r-full -translate-y-1/2 opacity-60"}),(0,a.jsx)("div",{className:"absolute right-0 top-1/2 w-[18%] h-[35%] border-2 border-r-0 border-white/50 -translate-y-1/2 bg-[#bc7a46]"}),(0,a.jsx)("div",{className:"absolute right-0 top-1/2 w-[30%] h-[70%] border-2 border-r-0 border-white/50 rounded-l-full -translate-y-1/2 opacity-60"})]})]}),x&&(0,a.jsx)("div",{className:`absolute left-1/2 top-1/2 shadow-[0_8px_16px_rgba(0,0,0,0.8)] z-10 transition-all duration-[3000ms] border-2 border-white/20 rounded-full
819                                ${g?"w-2 h-2 sm:w-3 sm:h-3 bg-[#ccff00]":b?"w-4 h-4 sm:w-6 sm:h-6 bg-[#d95d16]":"w-4 h-4 sm:w-5 sm:h-5 bg-white"}`,style:{animation:"ballMove 8s infinite alternate ease-in-out",transform:"translate(-50%, -50%)"},children:(0,a.jsx)("div",{className:"absolute -bottom-4 left-1/2 w-4 h-2 bg-white/40 rounded-full blur-sm -translate-x-1/2"})}),x&&(0,a.jsxs)("div",{className:"absolute left-[65%] top-[60%] flex flex-col items-center animate-bounce-slow",style:{animation:"floatBubble 4s infinite alternate ease-in-out"},children:[(0,a.jsxs)("div",{className:"bg-white/95 backdrop-blur border border-white/10 rounded-2xl p-2 shadow-2xl flex items-center gap-3 w-max max-w-[200px]",children:[(0,a.jsx)("div",{className:"w-6 h-6 rounded-full flex items-center justify-center p-0.5 bg-white/5 shrink-0",children:(0,a.jsx)("img",{src:p,alt:e||"Home team",className:"max-w-full max-h-full object-contain",onError:t=>t.target.src=i(e),loading:"lazy",decoding:"async"})}),(0,a.jsx)("div",{className:"flex flex-col pr-1 overflow-hidden",children:(0,a.jsx)("span",{className:"text-slate-900 font-bold text-[10px] sm:text-xs tracking-wide truncate",children:g?"Serve / Return":"Tấn c\xf4ng nguy hiểm"})})]}),(0,a.jsx)("div",{className:"w-0 h-0 border-l-[6px] border-r-[6px] border-t-[6px] border-l-transparent border-r-transparent border-t-[#1a1c28]/95 mt-[-1px]"})]})]})})}),(0,a.jsx)("div",{className:"relative z-20 flex-1 flex flex-col items-center justify-start p-4 md:p-6 pointer-events-none w-full",children:(0,a.jsxs)("div",{className:"w-full max-w-[800px] flex items-center justify-between px-4 sm:px-6 py-3 rounded-xl bg-gradient-to-r from-[#0d0f14]/90 via-[#151821]/95 to-[#0d0f14]/90 backdrop-blur-xl border border-white/10 shadow-[0_10px_40px_rgba(0,0,0,0.8)] pointer-events-auto",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 flex-1 min-w-0 pr-2",children:[(0,a.jsx)("img",{src:p,alt:e,className:"w-8 h-8 md:w-12 md:h-12 object-contain drop-shadow-lg shrink-0",onError:t=>t.target.src=i(e),loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-slate-900 text-xs sm:text-sm md:text-base font-bold truncate tracking-wide",children:e})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1 shrink-0 px-2 sm:px-6 min-w-[100px]",children:[(0,a.jsxs)("span",{className:`inline-flex items-center gap-1.5 px-2.5 py-0.5 rounded-full text-[10px] sm:text-xs font-bold shadow-inner ${x?"bg-green-500/10 text-green-400 border border-green-500/20":"bg-white/5 text-slate-900/40"}`,children:[x&&(0,a.jsx)("span",{className:"w-1.5 h-1.5 rounded-full bg-green-500 animate-pulse shadow-[0_0_8px_#22c55e]"}),d||c]}),(0,a.jsxs)("div",{className:"flex gap-3 sm:gap-5 items-center justify-center",children:[(0,a.jsx)("span",{className:"text-slate-900 text-2xl sm:text-4xl font-black drop-shadow-md",children:r}),(0,a.jsx)("span",{className:"text-slate-900/30 text-xl font-light",children:"-"}),(0,a.jsx)("span",{className:"text-slate-900 text-2xl sm:text-4xl font-black drop-shadow-md",children:n})]})]}),(0,a.jsxs)("div",{className:"flex items-center justify-end gap-3 flex-1 min-w-0 pl-2 text-right",children:[(0,a.jsx)("span",{className:"text-slate-900 text-xs sm:text-sm md:text-base font-bold truncate tracking-wide",children:t}),(0,a.jsx)("img",{src:u,alt:t,className:"w-8 h-8 md:w-12 md:h-12 object-contain drop-shadow-lg shrink-0",onError:e=>e.target.src=i(t),loading:"lazy",decoding:"async"})]})]})}),(0,a.jsx)("div",{className:"relative z-20 mt-auto w-full p-4 flex justify-center pointer-events-none",children:(0,a.jsx)("div",{className:"w-full max-w-[600px] h-6 bg-white/40 backdrop-blur-md rounded-full border border-white/5 flex items-center px-4",children:(0,a.jsxs)("div",{className:"flex-1 h-0.5 bg-white/10 relative rounded-full",children:[x&&(0,a.jsx)("div",{className:"absolute left-0 top-0 bottom-0 bg-gradient-to-r from-[#b38b22] to-[#ffda6a] w-[65%] rounded-full opacity-90 shadow-[0_0_12px_#daa520]"}),(0,a.jsx)("span",{className:"absolute left-[65%] top-1/2 -translate-y-1/2 -translate-x-1/2 w-1.5 h-1.5 rounded-full bg-white shadow-md"})]})})}),(0,a.jsx)("style",{children:`
820                @keyframes ballMove {
821                    0% { transform: translate(-30%, -20%) scale(1); }
822                    25% { transform: translate(40%, -10%) scale(1.1); }
823                    50% { transform: translate(20%, 30%) scale(0.9); }
824                    75% { transform: translate(-10%, 15%) scale(1.2); }
825                    100% { transform: translate(-45%, 0%) scale(1); }
826                }
827                @keyframes floatBubble {
828                    0% { transform: translateY(0px) translateX(0px); }
829                    50% { transform: translateY(-8px) translateX(4px); }
830                    100% { transform: translateY(4px) translateX(-4px); }
831                }
832            `})]})}function c(e,t){if("1"===t||"2"===t)switch(e){case"2":return{t:"HT 1",live:!0,sc:!0};case"3":return{t:"Giữa giờ",live:!0,sc:!0};case"4":return{t:"HT 2",live:!0,sc:!0};case"5":return{t:"Hiệp phụ",live:!0,sc:!0};case"7":return{t:"Penalty",live:!0,sc:!0};case"8":case"9":return{t:"Kết th\xfac",live:!1,sc:!0};default:return{t:"Chưa bắt đầu",live:!1,sc:!1}}
832return["51","52","53","54","55"].includes(e)?{t:`Set ${e-50}`,live:!0,sc:!0}:["100","90","110"].includes(e)?{t:"KT",live:!1,sc:!0}:"0"===e||"1"===e?{t:"Chưa bắt đầu",live:!1,sc:!1}:{t:"LIVE",live:!0,sc:!0}}function d(e){let t=(e||"").split(/[\s-]+/).slice(0,2).map(e=>e[0]||"").join("").toUpperCase()||"??";return`data:image/svg+xml,${encodeURIComponent(`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 80 80"><rect width="80" height="80" rx="20" fill="#1a1c25"/><text x="40" y="47" font-size="20" font-family="Arial" font-weight="700" text-anchor="middle" fill="#666">${t}</text></svg>`)}`}function x(e){let t=new Date(1e3*parseInt(e||"0",10));return{hm:t.toLocaleTimeString("vi-VN",{hour:"2-digit",minute:"2-digit",timeZone:"Asia/Ho_Chi_Minh"}),dm:t.toLocaleDateString("vi-VN",{day:"2-digit",month:"2-digit",timeZone:"Asia/Ho_Chi_Minh"}),full:t.toLocaleDateString("vi-VN",{day:"2-digit",month:"2-digit",year:"numeric",timeZone:"Asia/Ho_Chi_Minh"})}}let h="max-w-[1200px]";function m({matchData:e,relatedMatches:t,matchDetails:s,standings:r,brandingNameUpper:i}){let p,u,g,j,v,y,[C,S]=(0,l.useState)("odds"),L=e?.match_data?.anchors||[],[$,F]=(0,l.useState)(!1),[T,A]=(0,l.useState)(!1),[M,H]=(0,l.useState)(null),[D,B]=(0,l.useState)(!1),z=(0,l.useRef)(0);(0,l.useEffect)(()=>{if(!e?.has_live||"1"!==e.has_live||0===L.length)return;let t=!1;B(!0);let s=async t=>{let s=t?.uid,a=`/api/socolive/proxy-stream?url=${encodeURIComponent(`https://live.inplyr.com/${s?`room/${s}`:`default/${e.id}`}.m3u8`)}`;try{let e=await fetch(a,{method:"GET",cache:"no-store"});if(!e.ok)return null;let s=(await e.text()).split("\n").filter(e=>e.trim()&&!e.startsWith("#"));if(0===s.length)return null;return(await fetch(s[0],{method:"HEAD",cache:"no-store"})).ok?t:null}catch{return null}};return Promise.all(L.map(e=>s(e))).then(e=>{if(t)return;let s=e.find(e=>null!==e);s?(H(s),F(!0),A(!1)):(H(L[0]),A(!0)),B(!1)}),()=>{t=!0}},[e?.has_live,L.length]),(0,l.useEffect)(()=>{if(!T||D||z.current>=20)return;let t=setTimeout(()=>{z.current++,A(!1),B(!0);let t=async t=>{let s=t?.uid,a=`/api/socolive/proxy-stream?url=${encodeURIComponent(`https://live.inplyr.com/${s?`room/${s}`:`default/${e.id}`}.m3u8`)}`;try{let e=await fetch(a,{method:"GET",cache:"no-store"});if(!e.ok)return null;let s=(await e.text()).split("\n").filter(e=>e.trim()&&!e.startsWith("#"));if(0===s.length)return null;return(await fetch(s[0],{method:"HEAD",cache:"no-store"})).ok?t:null}catch{return null}};Promise.all(L.map(e=>t(e))).then(e=>{let t=e.find(e=>null!==e);t?(H(t),F(!0),A(!1)):A(!0),B(!1)})},15e3);return()=>clearTimeout(t)},[T,D]);let[I,R]=(0,l.useState)(null),U=e?.post_name||e?.ls_id||e?.id;if(window.location.origin,(0,l.useEffect)(()=>{if(!U)return;let e=setInterval(async()=>{try{let e=await fetch(`/api/klivevip/match/${U}`,{cache:"no-store"});if(e.ok){let t=await e.json();R(t?.match??null)}}catch{}},1e4);return()=>clearInterval(e)},[U]),!e)return(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center py-32 gap-4",children:[(0,a.jsx)("span",{className:"text-[#64748B] text-lg",children:"Kh\xf4ng t\xecm thấy trận đấu"}),(0,a.jsx)("a",{href:"/",className:"text-[#4681E8] hover:underline text-sm",children:"← Quay lại"})]});let G=I?{...e,...I}:e,P=G?.has_live==="1"&&L.length>0,K=c(G.status_id,G.sport_id),V=$&&M&&!T&&!D,W=P&&(D||T&&K.live&&z.current<20),O=!P||T&&!W&&!D,q=!K.live&&"8"!==String(G.status_id)&&"9"!==String(G.status_id),{hm:X,full:Y}=x(G.time),Z=G.source_card_meta?.league_label||G.match_data?.competition_vi||G.match_data?.competition_full||"",Q=G.match_data?.stage_label||G.source_card_meta?.stage_label||"",J=G.home_logo||d(G.home_name),ee=G.away_logo||d(G.away_name),et=e=>t=>{t.target.src=d(e)};return(0,a.jsxs)("div",{className:"w-full bg-white min-h-screen text-slate-600 font-sans pb-16",children:[(0,a.jsx)("div",{className:"w-full border-b border-slate-200 bg-white",children:(0,a.jsxs)("div",{className:`${h} mx-auto px-4 py-3 flex items-center justify-between`,children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 text-[13px] font-bold",children:[(0,a.jsx)("span",{className:"text-[#4681E8] uppercase tracking-wide",children:Z}),Q&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"text-slate-300",children:"•"}),(0,a.jsx)("span",{className:"text-slate-600",children:Q})]})]}),(0,a.jsx)("div",{className:"text-[12px] font-mono text-slate-400 hidden sm:block",children:Y})]})}),(0,a.jsxs)("div",{className:`${h} mx-auto px-0 md:px-4 py-0 md:py-6 flex flex-col lg:flex-row gap-4 lg:gap-6`,children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0 flex flex-col gap-4 lg:gap-6",children:[(0,a.jsxs)("div",{className:"w-full relative bg-[#000000] rounded-none md:rounded-2xl overflow-hidden shadow-[0_10px_40px_rgba(0,0,0,0.5)] border-y md:border border-slate-200",children:[(0,a.jsx)("div",{className:"relative w-full aspect-video bg-[#000000] group z-10",children:V?(0,a.jsx)(n,{src:`/api/klivevip/proxy-stream?url=${encodeURIComponent(`https://live.inplyr.com/${M?.uid&&"default"!==M.uid?`room/${M.uid}`:`default/${G.id}`}.m3u8`)}`,autoPlay:!0,onError:()=>A(!0)}):O?(0,a.jsx)(o,{homeName:G.home_name,awayName:G.away_name,homeLogo:G.home_logo,awayLogo:G.away_logo,homeScore:K.sc?G.home_score:"0",awayScore:K.sc?G.away_score:"0",statusText:K.t,timeText:G.time_text||X,isLive:K.live,sportId:G.sport_id,matchId:G.ls_id||G.id,kickoffMs:1e3*Number(G?.time||0),isPreMatch:q}):(0,a.jsxs)("div",{className:"absolute inset-0 z-10 flex flex-col items-center justify-center p-4 lg:p-10",children:[(0,a.jsxs)("div",{className:"absolute inset-0 flex justify-between items-center opacity-[0.03] pointer-events-none px-4 lg:px-20 overflow-hidden",children:[(0,a.jsx)("img",{src:J,alt:"",className:"w-1/2 max-w-[400px] blur-[10px]",loading:"lazy",decoding:"async"}),(0,a.jsx)("img",{src:ee,alt:"",className:"w-1/2 max-w-[400px] blur-[10px]",loading:"lazy",decoding:"async"})]}),P&&!T&&(0,a.jsx)("button",{onClick:()=>F(!0),className:"group mb-4 sm:mb-8 w-16 h-16 md:w-20 md:h-20 rounded-full bg-[#4681E8] flex items-center justify-center hover:bg-[#55CAF1] transition-all shadow-[0_0_30px_rgba(70,129,232,0.5)] curs
832or-pointer z-20",children:(0,a.jsx)("svg",{className:"w-8 h-8 md:w-10 md:h-10 text-white ml-1.5 md:ml-2 group-hover:scale-110 transition-transform",viewBox:"0 0 24 24",fill:"currentColor",children:(0,a.jsx)("path",{d:"M8 5v14l11-7z"})})}),(0,a.jsxs)("div",{className:"grid grid-cols-[1fr_auto_1fr] items-center w-full max-w-[800px] gap-2 lg:gap-8 z-20",children:[(0,a.jsxs)("div",{className:"flex flex-col items-center gap-2 lg:gap-4",children:[(0,a.jsx)("img",{src:J,alt:G.home_name,className:"w-16 h-16 sm:w-24 sm:h-24 lg:w-32 lg:h-32 object-contain drop-shadow-[0_10px_20px_rgba(0,0,0,0.8)]",onError:et(G.home_name),loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-[#FFFFFF] text-xs sm:text-base lg:text-lg font-black text-center line-clamp-2 uppercase tracking-wide",children:G.home_name})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-2 lg:gap-3",children:[K.sc?(0,a.jsxs)("div",{className:"flex items-center gap-3 lg:gap-6 bg-white/90 backdrop-blur-md px-4 py-2 lg:px-8 lg:py-4 rounded-2xl border border-slate-200 shadow-2xl",children:[(0,a.jsx)("span",{className:"text-[#4681E8] text-[32px] sm:text-[48px] lg:text-[64px] font-black leading-none",children:G.home_score}),(0,a.jsx)("span",{className:"text-slate-300 text-[20px] lg:text-[28px] font-light",children:":"}),(0,a.jsx)("span",{className:"text-[#4681E8] text-[32px] sm:text-[48px] lg:text-[64px] font-black leading-none",children:G.away_score})]}):(0,a.jsx)("div",{className:"text-[#FFFFFF] text-[32px] sm:text-[48px] lg:text-[56px] font-black tracking-widest leading-none drop-shadow-xl",children:X}),(0,a.jsxs)("span",{className:`inline-flex items-center gap-2 rounded-full px-3 py-1 lg:px-5 lg:py-1.5 text-[10px] lg:text-[12px] font-bold tracking-widest uppercase ${K.live?"bg-[#4681E8] text-white shadow-[0_0_20px_rgba(70,129,232,0.6)]":"bg-white text-slate-600 border border-slate-200"}`,children:[K.live&&(0,a.jsx)("span",{className:"w-2 h-2 rounded-full bg-white animate-pulse"}),K.t,G.time_text?` : ${G.time_text}`:""]})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-2 lg:gap-4",children:[(0,a.jsx)("img",{src:ee,alt:G.away_name,className:"w-16 h-16 sm:w-24 sm:h-24 lg:w-32 lg:h-32 object-contain drop-shadow-[0_10px_20px_rgba(0,0,0,0.8)]",onError:et(G.away_name),loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-[#FFFFFF] text-xs sm:text-base lg:text-lg font-black text-center line-clamp-2 uppercase tracking-wide",children:G.away_name})]})]})]})}),L.length>0&&(0,a.jsxs)("div",{className:"w-full bg-white border-t border-slate-200 px-3 lg:px-6 py-2.5 lg:py-4 flex items-center gap-2 lg:gap-4 overflow-x-auto z-20",children:[(0,a.jsx)("span",{className:"text-[10px] lg:text-[11px] text-slate-600 uppercase font-bold tracking-widest shrink-0 mr-1 lg:mr-2",children:"CHỌN K\xcaNH TRUYỀN:"}),L.map((e,t)=>(0,a.jsxs)("button",{onClick:()=>{H(e),F(!0),A(!1)},className:`shrink-0 flex items-center gap-1.5 lg:gap-2 rounded-full px-3 py-1.5 lg:px-5 lg:py-2 text-[11px] lg:text-[13px] font-bold transition-all ${M?.uid===e.uid&&!T?"bg-[#4681E8]/10 border border-[#4681E8] text-[#4681E8] shadow-[0_0_15px_rgba(70,129,232,0.2)]":"bg-white border border-slate-200 text-slate-600 hover:text-[#4681E8] hover:border-[#4681E8]/50"}`,children:[(0,a.jsx)("span",{className:`w-1.5 h-1.5 lg:w-2 lg:h-2 rounded-full ${M?.uid===e.uid&&!T?"bg-[#4681E8] animate-pulse":"bg-transparent"}`}),"BLV ",e.nickName||`K\xeanh ${t+1}`]},e.uid||t))]})]}),(p=(()=>{let e=s?.stats;if(!e)return!1;let t=null;return Array.isArray(e)&&e.length>0?t=e[0]:e?.results?.[0]?t=e.results[0]:e?.stats_full_time&&(t=e),!!t&&!!(t.stats_full_time?.length>0||t.stats_haft_time?.length>0||t.stats_half_time?.length>0||t.stats?.length>0)})(),u=!!(s?.lineup&&(Array.isArray(s.lineup)?s.lineup.length>0:s.lineup.home||s.lineup.away)),g=!!(s?.events&&(Array.isArray(s.events)?s.events.length>0:s.events.incidents?.length>0||s.events.data?.length>0)),j=!!(r&&(Array.isArray(r)?r.length>0:r.data?.length>0)),(y=(v=[{id:"stats",label:"THỐNG K\xca",show:p},{id:"lineup",label:"ĐỘI H\xccNH",show:u},{id:"events",label:"DIỄN BIẾN",show:g},{id:"standings",label:"BẢNG XH",show:j},{id:"odds",label:"TỶ LỆ K\xc8O",show:!!(s?.odds&&Array.isArray(s.odds)&&s.odds.length>0)}].filter(e=>e.show)).find(e=>e.id===C)?C:v[0]?.id||"odds")!==C&&setTimeout(()=>S(y),0),v.length>0?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"bg-white rounded-2xl p-2 border border-slate-200 flex overflow-x-auto gap-2 shadow-[0_4px_15px_rgba(0,0,0,0.08)] mx-4 md:mx-0",children:v.map(({id:e,label:t})=>(0,a.jsx)("button",{onClick:()=>S(e),className:`flex-1 min-w-[100px] py-2.5 sm:py-3 text-[10px] sm:text-[12px] font-black uppercase tracking-widest rounded-xl transition-all ${y===e?"bg-[#4681E8]/10 text-[#4681E8] border border-[#4681E8]/30 shadow-inner":"text-slate-500 hover:text-[#4681E8] hover:bg-[#4681E8]/5 border border-transparent"}`,children:t},e))}),(0,a.jsxs)("div",{className:"bg-white rounded-2xl border border-slate-200 overflow-hidden shadow-[0_4px_15px_rgba(0,0,0,0.08)] min-h-[400px] mx-4 md:mx-0",children:["stats"===y&&(0,a.jsx)(b,{matchDetails:s}),"lineup"===y&&(0,a.jsx)(f,{matchDetails:s}),"events"===y&&(0,a.jsx)(_,{events:s?.events}),"standings"===y&&(0,a.jsx)(k,{standings:r}),"odds"===y&&(0,a.jsx)(E,{odds:s?.odds})]})]}):null),t.length>0&&(0,a.jsxs)("div",{className:"mt-4 mx-4 md:mx-0",children:[(0,a.jsxs)("h2",{className:"px-1 py-4 text-sm sm:text-base font-black text-slate-800 uppercase flex items-center gap-3 tracking-widest border-b border-slate-100 mb-4",children:[(0,a.jsx)("span",{className:"w-1 h-5 bg-[#4681E8] rounded-sm shadow-[0_0_8px_#4681E8]"}),"TRẬN ĐẤU C\xd9NG GIẢI"]}),(0,a.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3 sm:gap-4",children:t.slice(0,4).map(e=>(0,a.jsx)(w,{m:e},e.id))})]})]}),(0,a.jsx)("div",{className:"w-full lg:w-[350px] xl:w-[400px] shrink-0 px-4 md:px-0",children:(0,a.jsxs)("div",{className:"bg-white border border-slate-200 rounded-2xl overflow-hidden flex flex-col shadow-[0_10px_30px_rgba(0,0,0,0.1)] lg:sticky lg:top-8 h-[600px] lg:h-[c
832alc(100vh-100px)] lg:max-h-[850px]",children:[(0,a.jsxs)("div",{className:"px-5 py-4 border-b border-slate-200 flex items-center justify-between bg-white",children:[(0,a.jsxs)("h3",{className:"text-slate-800 text-sm font-black uppercase tracking-widest flex items-center gap-2",children:[(0,a.jsx)("span",{className:"w-2.5 h-2.5 rounded-full bg-[#4681E8] shadow-[0_0_10px_rgba(70,129,232,0.4)]"}),"PH\xd2NG CHAT"]}),(0,a.jsxs)("span",{className:"text-[10px] bg-white px-3 py-1.5 rounded-full text-[#4681E8] font-mono border border-[#4681E8]/30 shadow-inner tracking-widest flex items-center gap-1.5",children:[(0,a.jsx)("svg",{className:"w-3 h-3",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 10l4.553-2.276A1 1 0 0121 8.618v6.764a1 1 0 01-1.447.894L15 14M5 18h8a2 2 0 002-2V8a2 2 0 00-2-2H5a2 2 0 00-2 2v8a2 2 0 002 2z"})}),L.length," BLV"]})]}),(0,a.jsx)("div",{className:"flex-1 bg-[#FFFFFF]/40 min-h-0 chat-container-wrapper",children:(0,a.jsx)(N,{anchors:L,selectedAnchor:M})})]})})]})]})}let p={25:"KIỂM SO\xc1T B\xd3NG",24:"CHUYỀN CH\xcdNH X\xc1C",23:"TỔNG SỐ ĐƯỜNG CHUYỀN",22:"TẤN C\xd4NG",21:"T.C\xd4NG NGUY HIỂM",2:"S\xdaT TR\xdaNG Đ\xcdCH",37:"PHẠT G\xd3C",28:"N\xc9M BI\xcaN",8:"VIỆT VỊ",3:"THẺ V\xc0NG",4:"THẺ ĐỎ",5:"S\xdaT PENALTY",29:"PHẠM LỖI",26:"Đ\xc1NH ĐẦU",27:"CỨU THUA",1:"B\xc0N THẮNG",7:"PHẢN LƯỚI"},u=[25,21,22,24,2,23,4,3,37,28,8,5,29],g="https://cdn.sportdb.live/upload/team/";function b({matchDetails:e}){let[t,s]=(0,l.useState)("full"),r=e?.stats,n=e?.lineup,i=n?.match?.home_team,o=n?.match?.away_team,c=null;Array.isArray(r)&&r.length>0?c=r[0]:r?.results?.[0]?c=r.results[0]:r?.stats_full_time&&(c=r);let d={full:c?.stats_full_time||[],h1:c?.stats_haft_time||c?.stats_half_time||[],h2:c?.stats_haft_time_2nd_half||[]}[t]||[];if(!c||0===d.length)return(0,a.jsx)(j,{text:"Thống k\xea sẽ được cập nhật khi trận đấu bắt đầu"});let x=[...d].sort((e,t)=>{let s=u.indexOf(e.type),a=u.indexOf(t.type);return(-1===s?999:s)-(-1===a?999:a)});return(0,a.jsxs)("div",{className:"flex flex-col",children:[(i||o)&&(0,a.jsxs)("div",{className:"flex items-center justify-between px-4 py-3 border-b border-slate-100",children:[(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5 w-20",children:[i?.logo&&(0,a.jsx)("img",{src:g+i.logo,alt:i?.name||"Home team",className:"w-8 h-8 object-contain",onError:e=>e.target.style.display="none",loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-slate-600 text-[10px] font-medium text-center leading-tight",children:i?.name||""})]}),(0,a.jsx)("div",{className:"flex gap-1",children:[{k:"h1",l:"Hiệp 1"},{k:"h2",l:"Hiệp 2"},{k:"full",l:"Cả trận"}].map(({k:e,l})=>(0,a.jsx)("button",{onClick:()=>s(e),className:`px-2.5 py-1 text-[10px] font-bold rounded transition-all ${t===e?"bg-[#E11D48] text-white":"text-slate-400 hover:text-slate-600 bg-slate-100"}`,children:l},e))}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5 w-20",children:[o?.logo&&(0,a.jsx)("img",{src:g+o.logo,alt:o?.name||"Away team",className:"w-8 h-8 object-contain",onError:e=>e.target.style.display="none",loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-slate-600 text-[10px] font-medium text-center leading-tight",children:o?.name||""})]})]}),(0,a.jsx)("div",{className:"px-4 py-3 space-y-3",children:x.map(e=>{let t=p[e.type]||`Stat ${e.type}`,s=e.home,l=e.away,r=24===e.type||25===e.type,n=s+l,i=0===n?50:s/n*100,o=s>l,c=l>s;return(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"flex justify-between items-center mb-1.5",children:[(0,a.jsxs)("span",{className:`text-xs font-bold w-10 tabular-nums ${o?"text-slate-800":"text-slate-400"}`,children:[s,r?"%":""]}),(0,a.jsx)("span",{className:"text-slate-400 text-[10px] font-semibold tracking-wide uppercase",children:t}),(0,a.jsxs)("span",{className:`text-xs font-bold w-10 text-right tabular-nums ${c?"text-slate-800":"text-slate-400"}`,children:[l,r?"%":""]})]}),(0,a.jsxs)("div",{className:"flex gap-0.5 h-[5px]",children:[(0,a.jsx)("div",{className:"flex-1 rounded-l-full bg-white/[0.06] overflow-hidden flex justify-end",children:(0,a.jsx)("div",{className:`rounded-l-full transition-all duration-500 ${o?"bg-gradient-to-r from-[#E11D48]/60 to-[#E11D48]":"bg-gradient-to-r from-white/10 to-white/20"}`,style:{width:`${i}%`}})}),(0,a.jsx)("div",{className:"flex-1 rounded-r-full bg-white/[0.06] overflow-hidden",children:(0,a.jsx)("div",{className:`rounded-r-full transition-all duration-500 ${c?"bg-gradient-to-l from-[#E11D48]/60 to-[#E11D48]":"bg-gradient-to-l from-white/10 to-white/20"}`,style:{width:`${100-i}%`}})})]})]},e.type)})})]})}
832function f({matchDetails:e}){let[t,s]=(0,l.useState)("pitch"),r=e?.lineup,n=r?.lineup||r,i=n?.home||[],o=n?.away||[],c=r?.home_formation||"",d=r?.away_formation||"",x=r?.match?.home_team,h=r?.match?.away_team;if(0===i.length&&0===o.length)return(0,a.jsx)(j,{text:"Đội h\xecnh sẽ được c\xf4ng bố trước trận đấu 30 ph\xfat"});let m=e=>e.filter(e=>1===e.first),p=e=>e.filter(e=>1!==e.first),u=m(i),g=m(o),b=p(i),w=p(o);return(0,a.jsxs)("div",{className:"flex flex-col",children:[(0,a.jsxs)("div",{className:"flex items-center justify-center gap-1 px-3 py-2 border-b border-slate-100",children:[(0,a.jsx)("button",{onClick:()=>s("pitch"),className:`px-3 py-1.5 text-[10px] font-bold rounded transition-all ${"pitch"===t?"bg-[#E11D48] text-white":"text-slate-400 bg-slate-100"}`,children:"Đội h\xecnh xuất ph\xe1t"}),(0,a.jsx)("button",{onClick:()=>s("list"),className:`px-3 py-1.5 text-[10px] font-bold rounded transition-all ${"list"===t?"bg-[#E11D48] text-white":"text-slate-400 bg-slate-100"}`,children:"Đội h\xecnh dá»± bị"})]}),"pitch"===t?(0,a.jsx)("div",{className:"relative w-full",style:{aspectRatio:"68/105"},children:(0,a.jsxs)("div",{className:"absolute inset-0 bg-gradient-to-b from-[#1a5c2a] via-[#1e6b31] to-[#1a5c2a] rounded-2xl overflow-hidden",children:[(0,a.jsxs)("div",{className:"absolute inset-[3%] border border-white/20 rounded-lg",children:[(0,a.jsx)("div",{className:"absolute left-0 right-0 top-1/2 h-px bg-white/20"}),(0,a.jsx)("div",{className:"absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 w-[22%] aspect-square rounded-full border border-white/20"}),(0,a.jsx)("div",{className:"absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 w-1.5 h-1.5 bg-white/30 rounded-full"}),(0,a.jsx)("div",{className:"absolute top-0 left-1/2 -translate-x-1/2 w-[55%] h-[16%] border-l border-r border-white/20"}),(0,a.jsx)("div",{className:"absolute top-0 left-1/2 -translate-x-1/2 w-[25%] h-[6%] border-l border-r border-white/20"}),(0,a.jsx)("div",{className:"absolute bottom-0 left-1/2 -translate-x-1/2 w-[55%] h-[16%] border-t border-l border-r border-white/20"}),(0,a.jsx)("div",{className:"absolute bottom-0 left-1/2 -translate-x-1/2 w-[25%] h-[6%] border-t border-l border-r border-white/20"})]}),(0,a.jsx)("div",{className:"absolute top-1 left-2 text-[9px] text-[#F8FAFC]/50 font-bold z-10",children:x?.name||""}),(0,a.jsx)("div",{className:"absolute top-1 right-2 text-[9px] text-[#E11D48]/70 font-bold z-10",children:c}),(0,a.jsx)("div",{className:"absolute bottom-1 left-2 text-[9px] text-[#F8FAFC]/50 font-bold z-10",children:h?.name||""}),(0,a.jsx)("div",{className:"absolute bottom-1 right-2 text-[9px] text-[#E11D48]/70 font-bold z-10",children:d}),u.map((e,t)=>{let s=`${e.x||50}%`,l=`${(e.y||10)/2}%`,r="G"===e.position;return(0,a.jsxs)("div",{className:"absolute flex flex-col items-center z-10 -translate-x-1/2 -translate-y-1/2",style:{left:s,top:l},children:[(0,a.jsx)("div",{className:`w-6 h-6 rounded-full flex items-center justify-center text-[9px] font-black ${r?"bg-yellow-400 text-black":"bg-blue-600 text-[#F8FAFC]"} shadow-md border border-white/20`,children:e.shirt_number||""}),(0,a.jsx)("span",{className:"text-[7px] text-[#F8FAFC] font-semibold mt-0.5 text-center max-w-[48px] truncate drop-shadow-[0_1px_2px_rgba(0,0,0,0.8)]",children:(e.name||"").split(" ").slice(-2).join(" ")}),1===e.captain&&(0,a.jsx)("span",{className:"absolute -top-1 -right-1 text-[6px] text-yellow-400",children:"C"})]},`h-${t}`)}),g.map((e,t)=>{let s=`${100-(e.x||50)}%`,l=`${100-(e.y||10)/2}%`,r="G"===e.position;return(0,a.jsxs)("div",{className:"absolute flex flex-col items-center z-10 -translate-x-1/2 -translate-y-1/2",style:{left:s,top:l},children:[(0,a.jsx)("div",{className:`w-6 h-6 rounded-full flex items-center justify-center text-[9px] font-black ${r?"bg-yellow-400 text-black":"bg-orange-500 text-[#F8FAFC]"} shadow-md border border-white/20`,children:e.shirt_number||""}),(0,a.jsx)("span",{className:"text-[7px] text-[#F8FAFC] font-semibold mt-0.5 text-center max-w-[48px] truncate drop-shadow-[0_1px_2px_rgba(0,0,0,0.8)]",children:(e.name||"").split(" ").slice(-2).join(" ")}),1===e.captain&&(0,a.jsx)("span",{className:"absolute -top-1 -right-1 text-[6px] text-yellow-400",children:"C"})]},`a-${t}`)})]})}):(0,a.jsxs)("div",{className:"px-3 py-2 text-xs",children:[(0,a.jsxs)("div",{className:"flex justify-between font-bold text-slate-400 mb-1 uppercase tracking-wider text-[9px] px-1",children:[(0,a.jsx)("span",{children:"Đội chá»
832§ nh\xe0"}),(0,a.jsx)("span",{children:"Đội kh\xe1ch"})]}),Array.from({length:Math.max(b.length,w.length)}).map((e,t)=>{let s=b[t],l=w[t];return(0,a.jsxs)("div",{className:"flex justify-between items-center border-b border-slate-50 py-1.5",children:[(0,a.jsx)("div",{className:"flex items-center gap-1.5 w-1/2 min-w-0",children:s&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"text-[#E11D48] font-bold w-5 text-center shrink-0 text-[10px]",children:s.shirt_number||""}),(0,a.jsx)("span",{className:"text-slate-700 truncate text-[11px]",children:s.name||""})]})}),(0,a.jsx)("div",{className:"flex items-center gap-1.5 w-1/2 justify-end min-w-0",children:l&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"text-slate-700 truncate text-[11px] text-right",children:l.name||""}),(0,a.jsx)("span",{className:"text-[#E11D48] font-bold w-5 text-center shrink-0 text-[10px]",children:l.shirt_number||""})]})})]},t)})]})]})}function j({text:e}){return(0,a.jsx)("div",{className:"flex items-center justify-center py-10 text-slate-400 text-sm text-center",children:e})}function w({m:e}){let t=c(e.status_id,e.sport_id),{hm:s,dm:l}=x(e.time),r=e.source_card_meta?.league_label||e.match_data?.competition_vi||"";return(0,a.jsxs)("a",{href:`/match/${encodeURIComponent(e.post_name||e.id)}`,className:"flex items-center gap-3 rounded-2xl bg-white hover:bg-slate-50 border border-slate-100 hover:border-[#4681E8]/30 p-3 transition-all group",children:[(0,a.jsxs)("div",{className:"shrink-0 w-14 text-center",children:[(0,a.jsx)("div",{className:"text-[#E11D48] text-[11px] font-bold",children:s}),(0,a.jsx)("div",{className:"text-slate-400 text-[9px]",children:l})]}),(0,a.jsx)("div",{className:"w-px h-9 bg-slate-200 shrink-0"}),(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("div",{className:"text-slate-400 text-[9px] truncate mb-1",children:r}),(0,a.jsxs)("div",{className:"flex items-center gap-2 mb-0.5",children:[(0,a.jsx)("img",{src:e.home_logo||d(e.home_name),alt:e.home_name,className:"w-4 h-4 object-contain shrink-0",onError:t=>t.target.src=d(e.home_name),loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-slate-600 text-[12px] font-medium truncate",children:e.home_name})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("img",{src:e.away_logo||d(e.away_name),alt:e.away_name,className:"w-4 h-4 object-contain shrink-0",onError:t=>t.target.src=d(e.away_name),loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-slate-600 text-[12px] font-medium truncate",children:e.away_name})]})]}),t.sc?(0,a.jsxs)("span",{className:"text-slate-800 font-bold text-[14px] tabular-nums shrink-0",children:[e.home_score,"-",e.away_score]}):(0,a.jsx)("span",{className:"text-[10px] font-bold text-[#E11D48] bg-[#E11D48]/10 rounded px-2.5 py-1 group-hover:bg-[#E11D48]/15 transition shrink-0",children:"XEM NGAY"})]})}let v={0:{bg:"bg-white/10",text:"text-[#F8FAFC]/40",nameCls:"text-[#94A3B8]"},1:{bg:"bg-white/10",text:"text-[#F8FAFC]/50",nameCls:"text-[#94A3B8]"},2:{bg:"bg-green-900/50",text:"text-green-400",nameCls:"text-green-400"},3:{bg:"bg-yellow-900/40",text:"text-yellow-400",nameCls:"text-emerald-600 font-bold"},4:{bg:"bg-blue-900/40",text:"text-blue-400",nameCls:"text-blue-400 font-bold"},5:{bg:"bg-red-900/40",text:"text-red-400",nameCls:"text-red-400 font-bold"}};function N({anchors:e,selectedAnchor:t}){let[s,r]=(0,l.useState)([]),[n,i]=(0,l.useState)(!1),o=(0,l.useRef)(null),c=(0,l.useRef)(null),d=t?.roomNum;return(0,l.useEffect)(()=>{if(!d)return;r([]),i(!1);let e=new EventSource(`/api/chat/${d}`);return e.onopen=()=>i(!0),e.onmessage=e=>{try{let t=JSON.parse(e.data);if("connected"===t.type)return void i(!0);if("history"===t.type&&Array.isArray(t.messages))return void r(e=>[...t.messages,...e].slice(-200));t.user&&t.text&&r(e=>[...e,t].slice(-200))}catch{}},e.onerror=()=>i(!1),()=>{e.close(),i(!1)}},[d]),(0,l.useEffect)(()=>{requestAnimationFrame(()=>{let e=c.current;e&&(e.scrollTop=e.scrollHeight)})},[s.length]),(0,a.jsxs)("div",{className:"flex flex-col h-full bg-[#0F0F23]",children:[(0,a.jsxs)("div",{ref:c,className:"flex-1 min-h-0 px-3 py-2 flex flex-col gap-[3px] overflow-y-auto",style:{scrollbarWidth:"thin",scrollbarColor:"#444 transparent"},children:[(0,a.jsx)("div",{className:"text-center text-[10px] text-[#F8FAFC]/30 bg-slate-50/60 py-1.5 rounded-xl mb-1 sticky top-0 z-10 backdrop-blur-sm",children:n?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"inline-block h-1.5 w-1.5 rounded-full bg-green-400 animate-pulse mr-1"}),"Đang kết nối ph\xf2ng chat trá»±c tiếp"]}):d?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"inline-block h-1.5 w-1.5 rounded-full bg-yellow-400 animate-pulse mr-1"}),"Đang kết nối..."]}
832):"Ch\xe0o mừng bạn đến với ph\xf2ng chat"}),0===s.length&&n&&(0,a.jsx)("div",{className:"text-center text-[10px] text-[#F8FAFC]/20 py-4",children:"Chờ tin nhắn mới..."}),s.map((e,t)=>{var s;let l=(s=e.level)>=5?v[5]:v[s]||v[0];return 2===e.type||e.text?.includes("v\xe0o ph\xf2ng tr\xf2 chuyện")?(0,a.jsxs)("div",{className:"flex items-start gap-1.5 text-[11px] leading-relaxed py-[1px] opacity-60",children:[(0,a.jsx)("span",{className:"text-green-500/70 font-medium",children:"Hi"}),(0,a.jsxs)("span",{className:`shrink-0 inline-flex items-center px-1 py-[0.5px] rounded text-[8px] font-bold ${l.bg} ${l.text}`,children:["Lv",e.level]}),(0,a.jsxs)("span",{className:`font-bold ${l.nameCls}`,children:[e.user,":"]}),(0,a.jsx)("span",{className:"text-[#F8FAFC]/40",children:e.text})]},`${e.ts}-${t}`):(0,a.jsxs)("div",{className:"flex items-start gap-1.5 text-[11px] leading-relaxed py-[1px]",children:[(0,a.jsxs)("span",{className:`shrink-0 inline-flex items-center px-1 py-[0.5px] rounded text-[8px] font-bold ${l.bg} ${l.text}`,children:["Lv.",e.level]}),(0,a.jsxs)("span",{className:`font-bold shrink-0 ${l.nameCls}`,children:[e.user,":"]}),(0,a.jsx)("span",{className:"text-[#F8FAFC]/80 break-words min-w-0",children:e.text})]},`${e.ts}-${t}`)}),(0,a.jsx)("div",{ref:o})]}),(0,a.jsxs)("div",{className:"shrink-0 px-3 py-2 bg-[#0F0F23] border-t border-white/[0.04] space-y-2",children:[(0,a.jsx)("div",{className:"flex items-center justify-center gap-3 text-[#F8FAFC]/20 text-[10px]",children:(0,a.jsx)("span",{className:"flex items-center gap-1",children:(0,a.jsx)("svg",{className:"w-3 h-3",viewBox:"0 0 24 24",fill:"currentColor",children:(0,a.jsx)("path",{d:"M12 4.5C7 4.5 2.7 7.6 1 12c1.7 4.4 6 7.5 11 7.5s9.3-3.1 11-7.5c-1.7-4.4-6-7.5-11-7.5zm0 12.5c-2.8 0-5-2.2-5-5s2.2-5 5-5 5 2.2 5 5-2.2 5-5 5zm0-8c-1.7 0-3 1.3-3 3s1.3 3 3 3 3-1.3 3-3-1.3-3-3-3z"})})})}),(0,a.jsxs)("div",{className:"flex bg-[#0F0F23] rounded-2xl overflow-hidden border border-white/[0.08]",children:[(0,a.jsx)("input",{type:"text",placeholder:"Đăng nhập để c\xf9ng chat nh\xe9",disabled:!0,className:"flex-1 bg-transparent px-3 py-2 text-[11px] text-[#F8FAFC] outline-none placeholder:text-[#F8FAFC]/30 disabled:opacity-50"}),(0,a.jsx)("button",{disabled:!0,className:"px-4 text-[11px] font-bold bg-[#E11D48] text-black disabled:bg-white/10 disabled:text-[#F8FAFC]/20 transition-colors",children:"Gửi"})]})]})]})}let y={1:{icon:"⚽",label:"B\xe0n thắng",color:"text-green-400"},2:{icon:"\uD83C\uDD7F️",label:"Phạt đền",color:"text-green-400"},3:{icon:"\uD83D\uDFE1",label:"Thẻ v\xe0ng",color:"text-yellow-400"},4:{icon:"\uD83D\uDFE1\uD83D\uDFE1",label:"Thẻ v\xe0ng 2",color:"text-emerald-600"},5:{icon:"\uD83D\uDD34",label:"Thẻ đỏ",color:"text-red-500"},7:{icon:"\uD83D\uDD04",label:"Phản lưới",color:"text-orange-400"},8:{icon:"\uD83C\uDFE5",label:"Chấn thương",color:"text-[#94A3B8]"},9:{icon:"\uD83D\uDD04",label:"Thay người",color:"text-blue-400"},11:{icon:"⏱️",label:"Hiệp 2",color:"text-[#F8FAFC]/40"},15:{icon:"\uD83E\uDD45",label:"Pen trượt",color:"text-red-400"},19:{icon:"⏱️",label:"Kết th\xfac hiệp",color:"text-[#F8FAFC]/30"},21:{icon:"\uD83C\uDFC6",label:"VAR",color:"text-purple-400"}};function _({events:e}){let t=e?.incidents||e?.events||[];return t&&0!==t.length?(0,a.jsx)("div",{className:"flex flex-col",children:t.map((e,t)=>{let s=y[e.type]||{icon:"•",label:`Event ${e.type}`,color:"text-[#F8FAFC]/50"},l=1===e.position,r=2===e.position,n=e.add_time?`+${e.add_time}`:"",i=`${e.time}'${n}`;return l||r||11!==e.type&&19!==e.type?9===e.type?(0,a.jsxs)("div",{className:`flex items-center gap-2 border-b border-slate-50 p-3 text-xs ${l?"":"flex-row-reverse"}`,children:[(0,a.jsx)("span",{className:"text-slate-400 w-10 text-center shrink-0 text-[10px]",children:i}),(0,a.jsxs)("div",{className:`flex-1 flex flex-col gap-0.5 ${l?"items-start":"items-end"}`,children:[(0,a.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,a.jsx)("span",{className:"text-green-400 text-[10px]",children:"▲"}),(0,a.jsx)("span",{className:"text-[#F8FAFC]/80 text-[11px]",children:e.in_player_name||""})]}),(0,a.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,a.jsx)("span",{className:"text-red-400 text-[10px]",children:"▼"}),(0,a.jsx)("span",{className:"text-[#F8FAFC]/40 text-[11px]",children:e.out_player_name||""})]})]})]},t):(0,a.jsxs)("div",{className:`flex items-center gap-2 border-b border-slate-50 p-3 text-xs ${l?"":"flex-row-reverse"}`,children:[(0,a.jsx)("span",{className:"text-slate-400 w-10 text-center shrink-0 text-[10px]",children:i}),(0,a.jsx)("span",{className:`shrink-0 text-sm ${s.color}`,children:s.icon}),(0,a.jsxs)("div",{className:`flex-1 min-w-0 ${l?"text-left":"text-right"}`,children:[(0,a.jsx)("span",{className:"text-slate-700 text-[11px]",children:e.player_name||""}),e.assist1_name&&(0,a.jsxs)("span",{className:"text-slate-400 text-[10px] ml-1",children:["(kiến tạo: ",e.assist1_name,")"]}),1===e.type&&void 0!==e.home_score&&(0,a.jsxs)("span",{className:"text-[#E11D48] font-bold text-[11px] ml-2",children:[e.home_score," - ",e.away_score]})]})]},t):(0,a.jsx)("div",{className:"flex items-center justify-center py-2 border-b border-slate-50 bg-slate-50",children:(0,a.jsxs)("span",{className:"text-slate-400 text-[10px] uppercase tracking-wider",children:[s.icon," ",s.label," — ",i]})},t)})}):(0,a.jsx)(j,{text:"Diễn biến trận đấu sẽ được cập nhật trực tiếp tại đ\xe2y"})}function k({standings:e}
832){return e&&e.teams&&0!==e.teams.length?(0,a.jsxs)("div",{className:"w-full text-[10px]",children:[(0,a.jsxs)("div",{className:"grid grid-cols-[20px_1fr_24px_24px_32px] bg-slate-50 p-2 text-slate-400 uppercase font-bold sticky top-0",children:[(0,a.jsx)("span",{className:"text-center",children:"#"}),(0,a.jsx)("span",{children:"Team"}),(0,a.jsx)("span",{className:"text-center",children:"T"}),(0,a.jsx)("span",{className:"text-center",children:"B"}),(0,a.jsx)("span",{className:"text-center whitespace-nowrap",children:"Đ"})]}),e.teams.slice(0,15).map((e,t)=>{let s=!!e.data,l=s?parseFloat(e.data[0]):e.rank||t+1,r=s?e.data[1]:e.target_name,n=s?e.data[7]:e.points,i=s?e.data[3]:e.won,o=s?e.data[5]:e.loss;return(0,a.jsxs)("div",{className:"grid grid-cols-[20px_1fr_24px_24px_32px] items-center p-2 border-b border-slate-50 hover:bg-slate-50 transition-colors",children:[(0,a.jsx)("span",{className:"text-center text-slate-500",children:l}),(0,a.jsxs)("div",{className:"flex items-center gap-1.5 min-w-0 pr-2",children:[e.team_logo&&(0,a.jsx)("img",{src:e.team_logo,className:"w-3.5 h-3.5 object-contain",alt:r||"Team logo",loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-slate-700 font-medium truncate",children:r})]}),(0,a.jsx)("span",{className:"text-center text-slate-500",children:i}),(0,a.jsx)("span",{className:"text-center text-slate-500",children:o}),(0,a.jsx)("span",{className:"text-center text-[#E11D48] font-bold",children:n})]},r)})]}):(0,a.jsx)(j,{text:"Bảng xếp hạng sẽ được cập nhật"})}function E({odds:e}){let t=Array.isArray(e)?e:[],s=["2","4","3","16"];function l(e){for(let a of s){let s=t.find(t=>t.odds_type===e&&String(t.company_id)===a);if(s?.odds_info?.length)return s}return t.find(t=>t.odds_type===e&&t.odds_info?.length>0)}function r(e,t){let s=e?.odds_info;if(!s?.length)return["-","-","-"];let a="opening"===t?s.length-1:0;if(!s?.length||!s[a])return["-","-","-"];let l=s[a][2];if("string"!=typeof l)return["-","-","-"];let r=l.split(",");return[r[0]||"-",r[1]||"-",r[2]||"-"]}let n=l("asia"),i=l("eu"),o=l("bs"),c=l("cr"),d=r(n,"opening"),x=r(n,"latest"),h=r(i,"opening"),m=r(i,"latest"),p=r(o,"opening"),u=r(o,"latest"),g=r(c,"opening"),b=r(c,"latest"),f=({children:e})=>(0,a.jsx)("th",{className:"px-2 py-2 text-[9px] sm:text-[10px] font-bold uppercase tracking-wider text-slate-500 border-b border-slate-100 text-center",children:e}),j=({children:e,color:t})=>(0,a.jsx)("td",{className:`px-2 py-2.5 text-center text-[11px] sm:text-xs font-bold ${t||"text-slate-600"} border-b border-slate-50`,children:e});return(0,a.jsxs)("div",{className:"overflow-x-auto",children:[(0,a.jsxs)("table",{className:"w-full min-w-[600px]",children:[(0,a.jsxs)("thead",{children:[(0,a.jsxs)("tr",{className:"bg-slate-50",children:[(0,a.jsx)("th",{className:"px-4 py-2 text-left border-b border-slate-100",rowSpan:2,children:(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("div",{className:"w-7 h-7 rounded bg-gradient-to-br from-[#1d4ed8] to-[#3b82f6] flex items-center justify-center text-white text-[9px] font-black shadow-sm",children:"B"}),(0,a.jsx)("span",{className:"text-slate-600 text-[11px] font-bold tracking-wider",children:"SPORT"})]})}),(0,a.jsx)("th",{colSpan:3,className:"px-1 py-1.5 text-center text-[9px] sm:text-[10px] font-bold uppercase tracking-wider text-[#4681E8] border-b border-l border-slate-100",children:"CƯỢC CH\xc2U \xc1"}),(0,a.jsx)("th",{colSpan:3,className:"px-1 py-1.5 text-center text-[9px] sm:text-[10px] font-bold uppercase tracking-wider text-[#4681E8] border-b border-l border-slate-100",children:"CƯỢC CH\xc2U \xc2U"}),(0,a.jsx)("th",{colSpan:3,className:"px-1 py-1.5 text-center text-[9px] sm:text-[10px] font-bold uppercase tracking-wider text-[#4681E8] border-b border-l border-slate-100",children:"T\xc0I XỈU"}),(0,a.jsx)("th",{colSpan:3,className:"px-1 py-1.5 text-center text-[9px] sm:text-[10px] font-bold uppercase tracking-wider text-[#4681E8] border-b border-l border-slate-100",children:"K\xc8O G\xd3C"})]}),(0,a.jsxs)("tr",{className:"bg-slate-50",children:[(0,a.jsx)(f,{children:"CHỦ"}),(0,a.jsx)(f,{children:"CHẤP"}),(0,a.jsx)(f,{children:"KH\xc1CH"}),(0,a.jsx)(f,{children:"CHỦ"}),(0,a.jsx)(f,{children:"H\xd2A"}),(0,a.jsx)(f,{children:"KH\xc1CH"}),(0,a.jsx)(f,{children:"T\xc0I"}),(0,a.jsx)(f,{children:"TỶ LỆ"}),(0,a.jsx)(f,{children:"XỈU"}),(0,a.jsx)(f,{children:"T\xc0I"}),(0,a.jsx)(f,{children:"TỶ LỆ"}),(0,a.jsx)(f,{children:"XỈU"})]})]}),(0,a.jsxs)("tbody",{children:[(0,a.jsxs)("tr",{className:"hover:bg-slate-50 transition-colors",children:[(0,a.jsx)("td",{className:"px-4 py-2.5 text-[11px] sm:text-xs text-slate-500 font-medium border-b border-slate-50",children:"Tỷ Lệ Mở Cược"}),(0,a.jsx)(j,{children:d[0]}),(0,a.jsx)(j,{color:"text-red-400",children:d[1]}),(0,a.jsx)(j,{children:d[2]}),(0,a.jsx)(j,{children:h[0]}),(0,a.jsx)(j,{children:h[1]}),(0,a.jsx)(j,{children:h[2]}),(0,a.jsx)(j,{children:p[0]}),(0,a.jsx)(j,{children:p[1]}),(0,a.jsx)(j,{children:p[2]}),(0,a.jsx)(j,{children:g[0]}),(0,a.jsx)(j,{children:g[1]}),(0,a.jsx)(j,{children:g[2]})]}),(0,a.jsxs)("tr",{className:"hover:bg-slate-50 transition-colors",children:[(0,a.jsx)("td",{className:"px-4 py-2.5 text-[11px] sm:text-xs text-slate-500 font-medium border-b border-slate-50",children:"Tỷ Lệ Trước Trận"}),(0,a.jsx)(j,{children:x[0]}),(0,a.jsx)(j,{color:"text-red-400",children:x[1]}),(0,a.jsx)(j,{children:x[2]}),(0,a.jsx)(j,{children:m[0]}),(0,a.jsx)(j,{children:m[1]}),(0,a.jsx)(j,{children:m[2]}),(0,a.jsx)(j,{children:u[0]}),(0,a.jsx)(j,{children:u[1]}),(0,a.jsx)(j,{children:u[2]}),(0,a.jsx)(j,{children:b[0]}),(0,a.jsx)(j,{children:b[1]}),(0,a.jsx)(j,{children:b[2]})]}),(0,a.jsxs)("tr",{className:"hover:bg-slate-50 transition-colors bg-white",children:[(0,a.jsxs)("td",{className:"px-4 py-2.5 text-[11px] sm:text-xs text-slate-700 font-bold flex items-center gap-1.5 border-b border-slate-50",children:["Live ",(0,a.jsx)("span",{className:"w-1.5 h-1.5 rounded-full bg-red-500 animate-pulse"})]}),(0,a.jsx)(j,{color:"text-green-400",children:x[0]}),(0,a.jsx)(j,{color:"text-red-400",children:x[1]}),(0,a.jsx)(j,{color:"text-green-400",children:x[2]}),(0,a.jsx)(j,{color:"text-green-400",children:m[0]}),(0,a.jsx)(j,{color:"text-green-400",children:m[1]}),(0,a.jsx)(j,{color:"text-green-400",children:m[2]}),(0,a.jsx)(j,{color:"text-green-400",children:u[0]}),(0,a.jsx)(j,{children:u[1]}),(0,a.jsx)(j,{color:"text-green-400",children:u[2]}),(0,a.jsx)(j,{color:"text-green-400",children:b[0]}),(0,a.jsx)(j,{children:b[1]}),(0,a.jsx)(j,{color:"text-green-400",children:b[2]})]})]})]}),(0,a.jsx)("p",{className:"text-center text-slate-400 text-[10px] py-2.5 border-t border-slate-100",children:"Tỷ lệ k\xe8o sẽ được cập nhật gần giờ thi đấu"})]})}},83882:(e,t,s)=>{"use strict";s.d(t,{Klivevip13ResultsPage:()=>o});var a=s(68019),l=s(10707),r=s(78637),n=s(89619),i=s(35793);function o({initialData:e,selectedLeague:t}){let s=(0,r.useRouter)(),c=(0,r.usePathname)(),d=(0,r.useSearchParams)(),[x,h]=(0,l.useTransition)(),[m,p]=(0,l.useState)(!1),[u,g]=(0,l.useState)(""),{availableLeagues:b,dateGroups:f}=(0,l.useMemo)(()=>(0,i.o8)(e),[e]),j=(0,l.useMemo)(()=>Array.from(new Set(f.map(e=>e.date_header))),[f]),w=d.get("date")||"",v=e=>{let t=new URLSearchParams(d.toString());e&&e!==w?t.set("date",e):t.delete("date"),h(()=>{let e=t.toString();s.push(e?`${c}?${e}`:c,{scroll:!1})})},N=(0,l.useMemo)(()=>{let e=f;return w&&(e=e.filter(e=>e.date_header===w)),(0,i.kK)(e,t)},[f,w,t]),y=(0,l.useMemo)(()=>
832{if(!u)return b;let e=u.toLowerCase();return b.filter(t=>t.name.toLowerCase().includes(e))},[b,u]),_=N.reduce((e,t)=>e+t.matches.length,0);if(0===f.length)return(0,a.jsxs)("div",{className:"max-w-[1440px] mx-auto px-4 py-8",children:[(0,a.jsx)(n.V,{eyebrow:"Kết quả",title:"KẾT QUẢ B\xd3NG Đ\xc1"}),(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center py-16 gap-4",children:[(0,a.jsx)("div",{className:"w-12 h-12 rounded-full border-2 border-[#E11D48]/30 border-t-[#E11D48] animate-spin"}),(0,a.jsx)("span",{className:"text-slate-500 text-sm font-medium tracking-wide",children:"Đang tải kết quả..."})]})]});let k=e=>{let t=new URLSearchParams(d.toString());e?t.set("league",e):t.delete("league"),p(!1),g(""),h(()=>{let e=t.toString();s.push(e?`${c}?${e}`:c,{scroll:!1})})};return(0,a.jsxs)("div",{className:"max-w-[1440px] mx-auto px-4 py-8",children:[(0,a.jsx)(n.V,{eyebrow:"Kết quả",title:"KẾT QUẢ B\xd3NG Đ\xc1",rightSlot:(0,a.jsx)("div",{className:"text-[12px] text-slate-600",children:(0,a.jsx)("span",{className:"text-slate-900/80 font-bold",children:t||"Tất cả giải đấu"})})}),(0,a.jsxs)("div",{className:"flex flex-col md:flex-row gap-4 mb-4 items-start md:items-center justify-between",children:[j.length>0&&(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,a.jsx)("button",{type:"button",onClick:()=>v(""),className:`px-4 py-2 rounded-xl text-sm font-bold transition-all duration-300 ${!w?"bg-gradient-to-r from-[#4681E8] to-[#2563eb] text-white shadow-[0_4px_15px_rgba(70,129,232,0.4)] border border-[#4681E8]/50":"bg-white text-[#64748B] border border-slate-200 hover:bg-slate-50 hover:text-slate-800"}`,children:"Tất cả ng\xe0y"}),j.slice(0,5).map(e=>(0,a.jsx)("button",{type:"button",onClick:()=>v(e),className:`px-4 py-2 rounded-xl text-sm font-bold transition-all duration-300 ${w===e?"bg-gradient-to-r from-[#4681E8] to-[#2563eb] text-white shadow-[0_4px_15px_rgba(70,129,232,0.4)] border border-[#4681E8]/50":"bg-white text-[#64748B] border border-slate-200 hover:bg-slate-50 hover:text-slate-800"}`,children:e},e))]}),(0,a.jsxs)("div",{className:"relative w-full md:w-[320px]",children:[(0,a.jsxs)("button",{onClick:()=>p(!m),className:"w-full flex items-center gap-3 bg-white hover:bg-slate-50 px-4 py-2.5 rounded-xl border border-slate-200 shadow-inner transition-all text-sm",children:[(0,a.jsx)("svg",{className:"w-5 h-5 text-[#4681E8]",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 4a1 1 0 011-1h16a1 1 0 011 1v2.586a1 1 0 01-.293.707l-6.414 6.414a1 1 0 00-.293.707V17l-4 4v-6.586a1 1 0 00-.293-.707L3.293 7.293A1 1 0 013 6.586V4z"})}),(0,a.jsx)("span",{className:"text-slate-700 font-bold flex-1 text-left truncate",children:t||"Chọn giải đấu..."}),(0,a.jsx)("svg",{className:`w-4 h-4 text-slate-400 transition-transform ${m?"rotate-180":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),m&&(0,a.jsxs)("div",{className:"absolute top-full left-0 right-0 mt-2 bg-white border border-slate-200 rounded-2xl shadow-xl z-50 max-h-[300px] overflow-hidden flex flex-col",children:[(0,a.jsx)("div",{className:"p-2 border-b border-slate-100",children:(0,a.jsx)("input",{type:"text",placeholder:"T\xecm giải đấu...",value:u,onChange:e=>g(e.target.value),className:"w-full bg-slate-50 border border-transparent rounded-xl px-4 py-2.5 text-sm text-slate-800 placeholder-slate-400 outline-none focus:border-[#4681E8]/50 transition-colors"})}),(0,a.jsxs)("div",{className:"overflow-y-auto flex-1 pb-2",children:[(0,a.jsx)("button",{type:"button",onClick:()=>k(),className:`block w-full text-left px-4 py-3 text-sm transition-colors ${!t?"bg-[#4681E8]/10 text-[#4681E8] border-l-4 border-[#4681E8]":"text-slate-600 hover:bg-slate-50 hover:text-slate-800"}`,children:"Tất cả giải đấu"}),y.map((e,s)=>(0,a.jsxs)("button",{type:"button",onClick:()=>k(e.name),className:`flex items-center gap-3 px-4 py-3 text-sm transition-colors cursor-pointer ${t===e.name?"bg-[#4681E8]/10 text-[#4681E8] border-l-4 border-[#4681E8]":"text-slate-600 hover:bg-slate-50 hover:text-slate-800"}`,children:[e.icon?(0,a.jsx)("img",{src:e.icon,alt:e.name||"League",className:"w-5 h-5 object-contain shrink-0",loading:"lazy",decoding:"async"}):(0,a.jsx)("div",{className:"w-5 h-5 rounded-md bg-slate-200 shrink-0"}),(0,a.jsx)("span",{className:"truncate",children:e.name})]},s))]})]})]})]}),x&&(0,a.jsxs)("div",{className:"mb-4 inline-flex items-center gap-2 rounded-full border border-slate-200 bg-white px-4 py-2 text-xs text-slate-500 shadow-sm",children:[(0,a.jsx)("span",{className:"h-2 w-2 rounded-full bg-[#E11D48] animate-pulse shadow-[0_0_8px_rgba(225,29,72,0.8)]"}),(0,a.jsx)("span",{className:"font-bold tracking-wide",children:"Đang tải kết quả từ server..."})]}),(0,a.jsx)("div",{className:"space-y-4",children:0===N.length?(0,a.jsx)("div",{className:"text-center py-16 text-[#64748B] font-medium tracking-wide",children:"Kh\xf4ng c\xf3 kết quả n\xe0o"}):N.map((e,t)=>(0,a.jsxs)("div",{className:"overflow-hidden rounded-2xl border border-slate-200 bg-white shadow-[0_8px_30px_rgba(0,0,0,0.06)]",children:[(0,a.jsx)("div",{className:"bg-slate-50 px-5 py-3 border-b border-slate-100 flex items-center justify-between",children:(0,a.jsxs)("span",{className:"text-[12px] text-slate-500 font-bold uppercase tracking-widest",children:[e.league_round?e.league_round:"V\xf2ng đấu",(0,a.jsx)("span",{className:"text-[#E11D48] ml-2 font-mono text-[11px] bg-[#E11D48]/10 px-2 py-0.5 rounded-full border border-[#
832E11D48]/20",children:e.date_header})]})}),e.matches.map((e,t)=>{var s;return(0,a.jsx)("div",{className:"bg-transparent hover:bg-slate-50 border-b border-slate-100 last:border-0 transition-colors group cursor-default",children:(0,a.jsxs)("div",{className:"flex items-center py-4 px-5 gap-4",children:[(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center min-w-[56px] shrink-0 border-r border-slate-100 pr-4",children:[(0,a.jsx)("span",{className:"text-[9px] text-slate-400 uppercase tracking-widest mb-1 font-bold",children:"L\xfac"}),(0,a.jsx)("span",{className:"text-[13px] text-slate-700 font-mono font-black",children:e.time})]}),(0,a.jsxs)("div",{className:"flex-1 flex items-center justify-end gap-3 min-w-0",children:[(0,a.jsx)("span",{className:"text-[14px] text-slate-800 font-bold truncate text-right group-hover:text-slate-900 transition-colors",children:e.home_team}),e.home_logo?(0,a.jsx)("div",{className:"w-8 h-8 rounded-full bg-slate-100 border border-slate-200 p-1 flex items-center justify-center shadow-sm",children:(0,a.jsx)("img",{src:e.home_logo,alt:e.home_team||"Home team",className:"w-full h-full object-contain",loading:"lazy"})}):(0,a.jsx)("div",{className:"w-8 h-8 rounded-full bg-slate-100 shrink-0 border border-slate-200 flex items-center justify-center text-[10px] font-bold text-slate-400",children:"?"})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center min-w-[90px] shrink-0 bg-slate-50 rounded-xl py-2 px-2 border border-slate-200 shadow-inner group-hover:border-[#4681E8]/40 transition-colors",children:[(0,a.jsx)("span",{className:`text-[22px] leading-none font-black tracking-widest drop-shadow-[0_2px_4px_rgba(0,0,0,0.8)] ${!(s=e.score)||"-"===s?"text-slate-400":"text-slate-800"}`,children:e.score}),e.ht_score&&(0,a.jsxs)("span",{className:"text-[10px] text-slate-500 font-mono mt-1 font-bold",children:["HT: ",e.ht_score]})]}),(0,a.jsxs)("div",{className:"flex-1 flex items-center gap-3 min-w-0",children:[e.away_logo?(0,a.jsx)("div",{className:"w-8 h-8 rounded-full bg-slate-100 border border-slate-200 p-1 flex items-center justify-center shadow-sm",children:(0,a.jsx)("img",{src:e.away_logo,alt:e.away_team||"Away team",className:"w-full h-full object-contain",loading:"lazy"})}):(0,a.jsx)("div",{className:"w-8 h-8 rounded-full bg-slate-100 shrink-0 border border-slate-200 flex items-center justify-center text-[10px] font-bold text-slate-400",children:"?"}),(0,a.jsx)("span",{className:"text-[14px] text-slate-800 font-bold truncate text-left group-hover:text-slate-900 transition-colors",children:e.away_team})]})]})},t)})]},t))}),(0,a.jsxs)("div",{className:"mt-6 text-center text-xs text-[#64748B] font-bold uppercase tracking-widest drop-shadow-sm",children:["Hiển thị ",_," kết quả trận đấu"]})]})}},84054:(e,t,s)=>{"use strict";function a(e){let t=e?.fixtures_v2||null,s=e?.fixtures||e?.schedules||[],a=t?.date_tabs?.length?t.date_tabs:function(e=new Date){let t=["Chủ Nhật","Thứ Hai","Thứ Ba","Thứ Tư","Thứ Năm","Thứ S\xe1u","Thứ Bảy"],s=[];for(let a=0;a<14;a+=1){let l=new Date(e);l.setDate(l.getDate()+a);let r=String(l.getDate()).padStart(2,"0"),n=String(l.getMonth()+1).padStart(2,"0"),i=`${l.getFullYear()}-${l.getMonth()+1}-${l.getDate()}`;s.push({label:0===a?"H\xf4m Nay":t[l.getDay()],date:`${r}.${n}`,dataValue:i,active:0===a})}return s}(),l=e?.selected_date||a.find(e=>e.active)?.dataValue||a[0]?.dataValue||null;if(t?.leagues?.length)return{dateTabs:a,selectedDate:l,leagues:t.leagues,totalMatches:t.leagues.reduce((e,t)=>e+t.matches.length,0)};let r=[],n=new Set;return s.forEach(e=>{let t=e.data;if(!(t.length<3))for(let s=0;s+2<t.length;s+=16){let a=t[s]||"",l=t[s+1]||"",i=t[s+2]||"",o=`${a}-${l}-${i}`;if(!n.has(o)&&l&&(n.add(o),r.push({time:a,home_team:l,away_team:i,home_logo:e.team_logos?.[2*Math.floor(s/16)]||"",away_logo:e.team_logos?.[2*Math.floor(s/16)+1]||"",score:t[s+3]||"-",ht_score:t[s+4]||"",handicap:t.length>s+9?[t[s+7]||"",t[s+8]||"",t[s+9]||""]:[],over_under:t.length>s+12?[t[s+10]||"",t[s+11]||"",t[s+12]||""]:[],one_x_two:t.length>s+15?[t[s+13]||"",t[s+14]||"",t[s+15]||""]:[]}),s+16>=t.length))break}}),{dateTabs:a,selectedDate:l,leagues:r.length>0?[{league_name:"Tất cả trận đấu",league_icon:"",match_count:r.length,matches:r}]:[],totalMatches:r.length}}function l(e){let t=e?.results_v2||null,s=e?.results||[];if(t?.date_groups?.length)return{availableLeagues:t.available_leagues||[],dateGroups:t.date_groups,totalMatches:t.date_groups.reduce((e,t)=>
832e+t.matches.length,0)};let a=[];return s.forEach(e=>{let t=e.data;if(t.length<6)return;let s=t[0],l=s.split(" - "),r=[],n=1,i=0;for(;n<t.length;){if(t[n]?.startsWith("L\xfac")){let s=t[n].replace("L\xfac","").trim();r.push({time:s,home_team:t[n+1]||"",away_team:t[n+4]||"",home_logo:e.team_logos?.[i]||"",away_logo:e.team_logos?.[i+1]||"",score:t[n+2]||"",ht_score:(t[n+3]||"").replace("H1:","").replace("HT:","").trim()}),i+=2,n+=5;continue}n+=1}r.length>0&&a.push({date_header:l[0]?.trim()||s,league_round:l.slice(1).join(" - ").trim(),matches:r})}),{availableLeagues:[],dateGroups:a,totalMatches:a.reduce((e,t)=>e+t.matches.length,0)}}function r(e,t){if(!t)return e;let s=t.toLowerCase();return e.filter(e=>e.league_round.toLowerCase().includes(s))}s.d(t,{kK:()=>r,o8:()=>l,p_:()=>a})},84669:(e,t,s)=>{"use strict";s.d(t,{LiveMatchesClient:()=>m});var a=s(68019),l=s(10707);function r({activeSport:e,onSportChange:t,activeStatus:s,onStatusChange:l,matchesCount:n}){return(0,a.jsxs)("div",{className:"mb-5 flex flex-col gap-3",children:[(0,a.jsx)("div",{className:"flex items-center gap-2 overflow-x-auto pb-1 scrollbar-hide",children:[{id:"1",label:"B\xd3NG Đ\xc1",icon:"⚽"},{id:"2",label:"B\xd3NG RỔ",icon:"\uD83C\uDFC0"},{id:"5",label:"TENNIS",icon:"\uD83C\uDFBE"},{id:"4",label:"CẦU L\xd4NG",icon:"\uD83C\uDFF8"},{id:"3",label:"B\xd3NG CHUYỀN",icon:"\uD83C\uDFD0"},{id:"6",label:"B\xd3NG B\xc0N",icon:"\uD83C\uDFD3"}].map(s=>{let l=e===s.id;return(0,a.jsxs)("button",{type:"button",onClick:()=>t(s.id),className:`flex items-center gap-2 px-4 py-2.5 rounded-xl font-bold text-[12px] whitespace-nowrap transition-all duration-200 border cursor-pointer ${l?"bg-[#4681E8]/10 text-[#4681E8] border-[#4681E8]/40 shadow-[0_0_15px_rgba(70,129,232,0.1)]":"bg-white text-slate-500 border-slate-200 hover:text-slate-700 hover:border-[#4681E8]/30"}`,children:[(0,a.jsx)("span",{className:"text-[14px]",children:s.icon}),(0,a.jsx)("span",{className:"tracking-wider uppercase",children:s.label})]},s.id)})}),(0,a.jsx)("div",{className:"flex items-center gap-1 overflow-x-auto pb-1 scrollbar-hide bg-white rounded-xl p-1.5 border border-slate-200",children:[{id:"all",label:"TẤT CẢ",keyCount:"all"},{id:"live",label:"TRỰC TIẾP",keyCount:"live"},{id:"hot",label:"HOT",keyCount:"hot"},{id:"today",label:"H\xd4M NAY",keyCount:"today"},{id:"tomorrow",label:"NG\xc0Y MAI",keyCount:"tomorrow"}].map(e=>{let t=s===e.id,r=n[e.keyCount]||0;return(0,a.jsxs)("button",{type:"button",onClick:()=>l(e.id),className:`relative px-4 py-2 font-bold text-[12px] whitespace-nowrap transition-all duration-200 uppercase tracking-wider flex items-center gap-2 rounded-lg cursor-pointer ${t?"bg-[#4681E8]/10 text-[#4681E8] shadow-inner":"text-slate-500 hover:text-slate-700 hover:bg-[#4681E8]/5"}`,children:["live"===e.id&&t&&(0,a.jsx)("span",{className:"w-1.5 h-1.5 rounded-full bg-[#4681E8] animate-pulse shadow-[0_0_6px_rgba(70,129,232,0.8)]"}),(0,a.jsx)("span",{children:e.label}),(0,a.jsx)("span",{className:`px-1.5 py-0.5 rounded text-[10px] font-black ${t?"bg-[#4681E8]/20 text-[#4681E8]":"text-slate-400"}`,children:r})]},e.id)})})]})}function n(){return"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='10' fill='%2364748B' fill-opacity='0.18'/%3E%3C/svg%3E"}function i({match:e,isLoading:t=!1}){if(t||!e)return(0,a.jsx)("div",{className:"animate-pulse bg-white h-[64px] w-full border-b border-slate-100"});let s=new Date(1e3*parseInt(e.time||0,10)).toLocaleTimeString("vi-VN",{hour:"2-digit",minute:"2-digit",timeZone:"Asia/Ho_Chi_Minh"}),l=function(e,t){if("1"===t||"2"===t)switch(e){case"1":default:return{text:"Sắp diễn",isLive:!1,showScore:!1};case"2":return{text:"H1",isLive:!0,showScore:!0};case"3":return{text:"HT",isLive:!0,showScore:!0};case"4":return{text:"H2",isLive:!0,showScore:!0};case"5":return{text:"Phụ",isLive:!0,showScore:!0};case"7":return{text:"Pen",isLive:!0,showScore:!0};case"8":case"9":return{text:"FT",isLive:!1,showScore:!0}}switch(e){case"0":case"1":return{text:"Sắp diễn",isLive:!1,showScore:!1};case"51":return{text:"S1",isLive:!0,showScore:!0};case"52":return{text:"S2",isLive:!0,showScore:!0};case"53":return{text:"S3",isLive:!0,showScore:!0};case"54":return{text:"S4",isLive:!0,showScore:!0};case"55":return{text:"S5",isLive:!0,showScore:!0};case"100":case"90":case"91":case"110":return{text:"FT",isLive:!1,showScore:!0};default:return{text:"LIVE",isLive:!0,showScore:!0}}}(String(e.status_id),String(e.sport_id)),r=e.time_text||e.source_card_meta?.time_text||"",o=l.isLive,c=e.home_score??"-",d=e.away_score??"-",x=e.home_logo||n(),h=e.away_logo||n();return(0,a.jsxs)("a",{href:`/match/${encodeURIComponent(e.post_name||e.
832id)}`,className:"flex items-center w-full group border-b border-slate-100 bg-white hover:bg-[#4681E8]/5 transition-colors min-h-[64px]",children:[(0,a.jsx)("div",{className:`w-[60px] flex flex-col items-center justify-center shrink-0 h-full border-r ${o?"border-[#4681E8]/30 bg-[#4681E8]/5":"border-slate-100"}`,children:o?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"text-[#4681E8] font-bold text-[11px] uppercase tracking-wider tabular-nums leading-none",children:r||l.text}),(0,a.jsx)("span",{className:"w-1.5 h-1.5 rounded-full bg-[#4681E8] animate-pulse mt-1"})]}):(0,a.jsx)("span",{className:"text-slate-500 font-medium text-[12px]",children:s})}),(0,a.jsxs)("div",{className:"flex-1 flex flex-col justify-center px-3 py-2 gap-1.5 min-w-0",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between w-full",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2.5 min-w-0 overflow-hidden",children:[(0,a.jsx)("img",{src:x,alt:e.home_name,className:"w-4 h-4 shrink-0 object-contain",onError:e=>e.currentTarget.src=n(),loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-[13px] font-semibold truncate text-slate-800",children:e.home_name})]}),l.showScore&&(0,a.jsx)("span",{className:`text-[15px] font-black tabular-nums shrink-0 ml-2 ${o?"text-[#4681E8]":"text-slate-700"}`,children:c})]}),(0,a.jsxs)("div",{className:"flex items-center justify-between w-full",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2.5 min-w-0 overflow-hidden",children:[(0,a.jsx)("img",{src:h,alt:e.away_name,className:"w-4 h-4 shrink-0 object-contain",onError:e=>e.currentTarget.src=n(),loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-[13px] font-semibold truncate text-slate-800",children:e.away_name})]}),l.showScore&&(0,a.jsx)("span",{className:`text-[15px] font-black tabular-nums shrink-0 ml-2 ${o?"text-[#4681E8]":"text-slate-700"}`,children:d})]})]}),(0,a.jsx)("div",{className:"w-[48px] h-full flex items-center justify-center shrink-0 text-slate-300 group-hover:text-[#4681E8] transition-colors border-l border-slate-100",children:(0,a.jsx)("svg",{className:"w-5 h-5 fill-current",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{d:"M8 5v14l11-7z"})})})]})}let o=new Set(["1","2","3","4","5","7"]),c=new Set(["8","9","15"]),d=new Set(["51","52","53","54","55","56","57","58","59"]),x=new Set(["100","90","91","92","93","110"]);function h(e){let t=String(e.status_id);return 2>=parseInt(e.sport_id)?o.has(t):d.has(t)}function m({matches:e,matchIndex:t}){let[s,n]=(0,l.useState)("1"),[o,d]=(0,l.useState)("all"),[p,u]=(0,l.useState)(1);(0,l.useEffect)(()=>{u(1)},[s,o]);let{todayStart:g,tomorrowStart:b,dayAfterStart:f}=(0,l.useMemo)(()=>{let e,t,s,{vnTodayStartUTC:a,vnTomorrowStartUTC:l,vnDayAfterStartUTC:r}=(s=(t=Math.floor(Date.UTC((e=new Date(Date.now()+252e5)).getUTCFullYear(),e.getUTCMonth(),e.getUTCDate())/1e3)-25200)+86400,{vnTodayStartUTC:t,vnTomorrowStartUTC:s,vnDayAfterStartUTC:s+86400});return{todayStart:a,tomorrowStart:l,dayAfterStart:r}},[]),j=(0,l.useMemo)(()=>new Map(e.map(e=>[e?.match_key?String(e.match_key):e?.ls_id?String(e.ls_id):e?.id?`${String(e.sport_id||"0")}:${String(e.id)}`:e?.scheduleId?`${String(e.sport_id||"0")}:schedule:${String(e.scheduleId)}`:[String(e?.sport_id||"0"),String(e?.time||"0"),String(e?.home_name||""),String(e?.away_name||"")].join(":"),e])),[e]),w=t?.summary_by_sport?.[s],v=t?.bucket_keys_by_sport?.[s],N=t?.bucket_pages_by_sport?.[s],y=e.filter(e=>{let t;return String(e.sport_id)===s&&(t=String(e.status_id),2>=parseInt(e.sport_id)?!c.has(t):!x.has(t))}),_=y.filter(e=>{let t=parseInt(e.time);return t>=g&&t<b}),k=y.filter(e=>{let t=parseInt(e.time);return t>=b&&t<f}),E={all:y.length,live:y.filter(e=>h(e)).length,hot:y.filter(e=>"1"===String(e.hot)).length,today:_.length,tomorrow:k.length},C=(0,l.useMemo)(()=>{if(v){if("all"===o&&Array.isArray(N?.all)&&N.all.length>0)return N.all.slice(0,p).flat().map(e=>j.get(e)).filter(Boolean);let e=v[o];if(Array.isArray(e))return e.map(e=>j.get(e)).filter(Boolean)}return"all"===o?y:"live"===o?y.filter(e=>h(e)):"hot"===o?y.filter(e=>"1"===String(e.hot)):"today"===o?_:"tomorrow"===o?k:y},[o,y,j,N,v,_,k,p]),S="all"===o&&Array.isArray(N?.all)&&p<N.all.length,L=(0,l.useMemo)(()=>"all"!==o&&"live"!==o&&"hot"!==o?[]:C.filter(e=>
832"1"===String(e.hot)||h(e)).slice(0,4),[C,o]),$=(0,l.useMemo)(()=>{let e=new Map;return C.forEach(t=>{let s=t.source_card_meta?.league_label||t.match_data?.competition_vi||t.match_data?.competition_name||t.match_data?.competition_full||"Giải đấu kh\xe1c";e.has(s)||e.set(s,[]),e.get(s).push(t)}),Array.from(e.entries())},[C]);return(0,a.jsxs)("div",{className:"w-full min-h-[500px]",children:[(0,a.jsx)(r,{activeSport:s,onSportChange:n,activeStatus:o,onStatusChange:d,matchesCount:w||E}),0===C.length?(0,a.jsx)("div",{className:"py-20 text-center",children:(0,a.jsx)("div",{className:"text-slate-400 text-base font-medium",children:"Kh\xf4ng c\xf3 trận đấu n\xe0o."})}):(0,a.jsxs)("div",{className:"flex flex-col gap-6",children:[L.length>0&&"all"===o&&(0,a.jsxs)("div",{className:"mb-4",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 mb-3 px-1",children:[(0,a.jsx)("span",{className:"w-2 h-4 rounded-full bg-[#4681E8]"}),(0,a.jsx)("h2",{className:"text-slate-800 font-black text-sm uppercase tracking-wider",children:"Trận đấu t\xe2m điểm"})]}),(0,a.jsx)("div",{className:"grid grid-cols-1 xl:grid-cols-2 gap-2",children:L.map((e,t)=>(0,a.jsx)(i,{match:e},`featured-${e.ls_id||e.id}-${t}`))})]}),(0,a.jsx)("div",{className:"flex flex-col gap-5",children:$.map(([e,t])=>{let s=t[0]?.match_data?.competition_logo;return(0,a.jsxs)("div",{className:"rounded-xl overflow-hidden border border-slate-200 bg-white shadow-sm",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2.5 bg-[#0E1B33] px-4 py-2.5 border-b border-[#0E1B33]",children:[s&&(0,a.jsx)("img",{src:s,alt:"league",className:"w-4 h-4 object-contain brightness-200 opacity-80",loading:"lazy",decoding:"async"}),(0,a.jsx)("h3",{className:"text-white text-[12px] font-bold uppercase tracking-wider truncate",children:e})]}),(0,a.jsx)("div",{className:"flex flex-col",children:t.map((e,t)=>(0,a.jsx)(i,{match:e},e.ls_id||`${e.id}-${t}`))})]},e)})}),S&&(0,a.jsx)("div",{className:"flex justify-center mt-6",children:(0,a.jsx)("button",{type:"button",onClick:()=>u(e=>e+1),className:"inline-flex items-center justify-center rounded-xl border border-[#4681E8]/30 bg-white px-8 py-3 text-[12px] font-bold uppercase tracking-wider text-[#4681E8] transition-all duration-200 hover:bg-[#4681E8] hover:text-white hover:border-[#4681E8]",children:"Tải th\xeam"})})]})]})}},84886:(e,t,s)=>{"use strict";s.d(t,{StandingsClient:()=>h});var a=s(68019),l=s(10707),r=s(46914),n=s(38243);function i(e){return"W"===e?"border border-emerald-500/45 bg-emerald-500/25 text-emerald-300 shadow-[0_0_0_1px_rgba(16,185,129,0.08)_inset]":"L"===e?"border border-red-500/45 bg-red-500/25 text-red-300 shadow-[0_0_0_1px_rgba(239,68,68,0.08)_inset]":"D"===e?"border border-amber-400/45 bg-amber-400/22 text-amber-200 shadow-[0_0_0_1px_rgba(251,191,36,0.08)_inset]":"border border-slate-500/40 bg-slate-500/18 text-slate-700"}function o(e,t){return 1===e?{bar:"bg-[linear-gradient(180deg,#facc15,#f97316)]",badge:"border-emerald-600/60 bg-slate-100 text-yellow-700 shadow-[0_0_18px_rgba(250,204,21,0.14)]",row:"from-[#32230d]/70 via-transparent to-transparent"}:e<=4?{bar:"bg-[linear-gradient(180deg,#fb7185,#f97316)]",badge:"border-[#fb7185]/45 bg-slate-100 text-rose-700",row:"from-[#241318]/55 via-transparent to-transparent"}:e<=6?{bar:"bg-[linear-gradient(180deg,#f59e0b,#facc15)]",badge:"border-[#f59e0b]/45 bg-slate-100 text-yellow-700",row:"from-[#24190b]/45 via-transparent to-transparent"}:e<=10?{bar:"bg-[linear-gradient(180deg,#38bdf8,#2563eb)]",badge:"border-sky-400/40 bg-white text-sky-700",row:"from-[#101725]/32 via-transparent to-transparent"}:e>=Math.max(t-2,1)?{bar:"bg-[linear-gradient(180deg,#ef4444,#7f1d1d)]",badge:"border-red-500/40 bg-slate-100 text-red-700",row:"from-[#220f14]/45 via-transparent to-transparent"}:{bar:"bg-[linear-gradient(180deg,#64748b,#334155)]",badge:"border-slate-500/35 bg-white text-slate-700",row:"from-[#12161d]/24 via-transparent to-transparent"}}function c({detail:e}){let[t,s]=(0,l.useState)(!1),n=(0,l.useRef)(null),[o,d]=(0,l.useState)({top:0,left:0}),x=i(e.result),h=(0,l.useCallback)(()=>
832{if(n.current){let e=n.current.getBoundingClientRect();d({top:e.top+window.scrollY-8,left:e.left+e.width/2+window.scrollX})}s(!0)},[]);return(0,a.jsxs)("div",{ref:n,className:"relative inline-flex",onMouseEnter:h,onMouseLeave:()=>s(!1),children:[(0,a.jsx)("span",{className:`inline-flex h-7 w-7 items-center justify-center rounded-[8px] text-[11px] font-black cursor-pointer transition-transform hover:-translate-y-0.5 ${x}`,children:e.result}),t&&e.match_time&&"u">typeof document&&(0,r.createPortal)((0,a.jsxs)("div",{className:"fixed z-[9999] w-[220px] pointer-events-none",style:{top:`${o.top}px`,left:`${o.left}px`,transform:"translate(-50%, -100%)",position:"absolute"},children:[(0,a.jsxs)("div",{className:"overflow-hidden rounded-xl border border-[#cbd5e1] bg-white shadow-2xl",children:[(0,a.jsx)("div",{className:"bg-slate-100 px-3 py-1.5 text-[10px] text-slate-600 font-mono text-center border-b border-[#cbd5e1]",children:e.match_time}),(0,a.jsxs)("div",{className:"px-3 py-2.5 flex items-center justify-between gap-2",children:[(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5 flex-1 min-w-0",children:[e.home_logo?(0,a.jsx)("img",{src:e.home_logo,alt:e.home_team,className:"w-7 h-7 object-contain",loading:"lazy",decoding:"async"}):(0,a.jsx)("div",{className:"w-7 h-7 rounded-full bg-gray-700 flex items-center justify-center text-[8px] text-slate-600 font-bold",children:"?"}),(0,a.jsx)("span",{className:"text-[9px] text-slate-600 font-bold text-center leading-tight line-clamp-2 max-w-[70px]",children:e.home_team})]}),(0,a.jsx)("div",{className:"text-slate-900 font-black text-sm whitespace-nowrap px-1",children:e.score||"? - ?"}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5 flex-1 min-w-0",children:[e.away_logo?(0,a.jsx)("img",{src:e.away_logo,alt:e.away_team,className:"w-7 h-7 object-contain",loading:"lazy",decoding:"async"}):(0,a.jsx)("div",{className:"w-7 h-7 rounded-full bg-gray-700 flex items-center justify-center text-[8px] text-slate-600 font-bold",children:"?"}),(0,a.jsx)("span",{className:"text-[9px] text-slate-600 font-bold text-center leading-tight line-clamp-2 max-w-[70px]",children:e.away_team})]})]})]}),(0,a.jsx)("div",{className:"absolute left-1/2 -translate-x-1/2 -bottom-1 w-2 h-2 bg-white border-r border-b border-[#cbd5e1] rotate-45"})]}),document.body)]})}function d({result:e}){let t=i(e);return(0,a.jsx)("span",{className:`inline-flex h-7 w-7 items-center justify-center rounded-[8px] text-[11px] font-black ${t}`,children:e})}function x({value:e,totalTeams:t}){let s=Number(e);if(!Number.isFinite(s))return(0,a.jsx)("td",{className:"px-4 py-4 text-center font-mono font-black text-slate-400",children:e});let l=o(s,t);return(0,a.jsxs)("td",{className:"relative px-4 py-4 text-center font-mono",children:[(0,a.jsx)("span",{className:`absolute left-0 top-1/2 h-7 w-1 -translate-y-1/2 rounded-r-full ${l.bar}`}),(0,a.jsx)("span",{className:`inline-flex h-8 w-8 items-center justify-center rounded-[10px] border text-[13px] font-black ${l.badge}`,children:s})]})}function h({initialData:e}){let[t]=(0,l.useState)(!1),[s,r]=(0,l.useState)(!1),[i,p]=(0,l.useState)(""),u=(0,l.useRef)(null);if((0,l.useEffect)(()=>{function e(e){u.current&&!u.current.contains(e.target)&&r(!1)}return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[]),!e)return(0,a.jsx)("div",{className:"text-center py-20 text-slate-600",children:"Đang tải dữ liệu..."});let g=e.available_leagues||[],b=g.filter(e=>e.name.toLowerCase().includes(i.toLowerCase())),f=e.teams&&e.teams.length>0&&Array.isArray(e.teams[0]?.form),j=!f&&e.rankings;return(0,a.jsxs)("div",{className:"mx-auto max-w-[1440px] px-4 py-8",children:[(0,a.jsx)(n.A,{eyebrow:"Bảng xếp hạng",title:"BẢNG XẾP HẠNG",rightSlot:(0,a.jsx)("div",{className:"text-[12px] text-slate-600",children:(0,a.jsx)("span",{className:"text-slate-900/80 font-bold",children:e.league_name})})}),g.length>0&&(0,a.jsxs)("div",{className:"mb-6",ref:u,children:[(0,a.jsxs)("div",{className:"relative inline-flex min-w-[320px] items-center gap-3 rounded-2xl border border-slate-200 bg-white backdrop-blur-md px-5 py-3.5 cursor-pointer shadow-[0_8px_30px_rgba(0,0,0,0.06)] transition-colors hover:border-[#4681E8]/50 hover:shadow-[0_8px_30px_rgba(70,129,232,0.1)]",onClick:()=>r(!s),children:[e.league_icon&&(0,a.jsx)("img",{src:e.league_icon,alt:e.league_name||"League icon",className:"w-6 h-6 object-contain",loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-slate-800 font-bold text-sm flex-1",children:e.league_name||"Chọn giải đấu"}),(0,a.jsx)("svg",{className:`w-4 h-4 text-[#4681E8] transition-transform ${s?"rotate-180":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),s&&(0,a.jsxs)("div",{className:"absolute z-50 mt-2 w-[360px] overflow-hidden rounded-2xl border border-slate-200 bg-white backdrop-blur-xl shadow-[0_24px_80px_rgba(0,0,0,0.15)]",children:[(0,a.jsx)("div",{className:"p-2 border-b border-slate-100",children:(0,a.jsx)("input",{type:"text",placeholder:"T\xecm kiếm giải đấu...",value:i,onChange:e=>p(e.target.value),className:"w-full bg-slate-50 text-slate-800 text-sm px-4 py-2.5 rounded-xl border border-transparent outline-none focus:border-[#4681E8]/50 placeholder-slate-400 transition-colors",autoF
832ocus:!0})}),(0,a.jsxs)("div",{className:"max-h-[340px] overflow-y-auto",children:[b.map(t=>(0,a.jsxs)("a",{href:`/standings?league=${encodeURIComponent(t.id)}`,className:`flex items-center gap-3 px-4 py-3 cursor-pointer transition-colors hover:bg-slate-50 ${t.id===e.league_id?"bg-[#4681E8]/10 border-l-4 border-[#4681E8]":""}`,children:[t.icon?(0,a.jsx)("img",{src:t.icon,alt:t.name||"League",className:"w-5 h-5 object-contain flex-shrink-0",loading:"lazy",decoding:"async"}):(0,a.jsx)("div",{className:"w-5 h-5 rounded bg-gray-700 flex-shrink-0"}),(0,a.jsx)("span",{className:"text-sm text-slate-900 truncate",children:t.name})]},t.id)),0===b.length&&(0,a.jsx)("div",{className:"px-4 py-8 text-center text-gray-500 text-sm",children:"Kh\xf4ng t\xecm thấy giải đấu"})]})]})]}),t&&(0,a.jsxs)("div",{className:"flex items-center justify-center py-12",children:[(0,a.jsx)("div",{className:"animate-spin w-8 h-8 border-2 border-emerald-600 border-t-transparent rounded-full"}),(0,a.jsx)("span",{className:"ml-3 text-slate-600 text-sm",children:"Đang tải bảng xếp hạng từ server..."})]}),!t&&f&&(0,a.jsxs)("div",{className:"overflow-hidden rounded-[24px] border border-slate-200 bg-white shadow-[0_8px_30px_rgba(0,0,0,0.08)]",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between gap-3 border-b border-[#4681E8]/20 bg-gradient-to-r from-[#4681E8] to-[#2563eb] px-6 py-4 text-white shadow-[0_4px_25px_rgba(70,129,232,0.3)]",children:[(0,a.jsx)("div",{className:"text-[13px] font-black uppercase tracking-[0.2em] drop-shadow-sm text-white/80",children:"League"}),(0,a.jsx)("div",{className:"truncate text-sm font-black sm:text-base drop-shadow-md",children:e.league_name})]}),(0,a.jsx)("div",{className:"overflow-x-auto",children:(0,a.jsxs)("table",{className:"w-full text-left border-collapse",children:[(0,a.jsx)("thead",{children:(0,a.jsx)("tr",{className:"bg-slate-50 text-[11px] uppercase tracking-[0.2em] text-slate-500",children:e.header.map((t,s)=>{let l=e.teams.some(e=>e.form&&e.form.length>0);return t.toLowerCase().includes("phong độ")&&!l?null:(0,a.jsx)("th",{colSpan:s===e.header.length-1&&l?5:1,className:`p-4 font-semibold ${1===s?"w-1/3 text-left":"text-center"}`,children:t},s)})})}),(0,a.jsx)("tbody",{className:"text-sm",children:e.teams.map((t,s)=>(o(Number(t.data[0]||s+1),e.teams.length),(0,a.jsxs)("tr",{className:"group border-b border-slate-100 bg-white transition-colors hover:bg-slate-50 cursor-pointer",children:[t.data.map((s,l)=>0===l?(0,a.jsx)(x,{value:s,totalTeams:e.teams.length},l):1===l?(0,a.jsx)("td",{className:"p-4",children:(0,a.jsxs)("div",{className:"flex items-center gap-3 rounded-2xl border border-slate-100 bg-slate-50 px-4 py-2.5 transition-colors group-hover:border-[#4681E8]/30 group-hover:bg-[#4681E8]/5",children:[t.team_logo?(0,a.jsx)("img",{src:t.team_logo,alt:s,className:"h-8 w-8 rounded-full bg-white object-contain p-0.5 filter drop-shadow-[0_2px_4px_rgba(0,0,0,0.1)]",loading:"lazy"}):(0,a.jsx)("div",{className:"flex h-8 w-8 items-center justify-center rounded-full border border-slate-200 bg-white text-[10px] font-bold text-slate-400",children:"?"}),(0,a.jsx)("span",{className:"font-bold text-slate-800 transition-colors group-hover:text-[#4681E8]",children:s})]})},l):(0,a.jsx)("td",{className:"p-4 text-center font-mono text-slate-600",children:s},l)),t.form&&t.form.length>0&&(0,a.jsxs)(a.Fragment,{children:[t.form.map((e,t)=>(0,a.jsx)("td",{className:"p-2 text-center",children:e.match_time?(0,a.jsx)(c,{detail:e}):(0,a.jsx)(d,{result:e.result})},`form-${t}`)),t.form.length<5&&Array.from({length:5-t.form.length}).map((e,t)=>(0,a.jsx)("td",{className:"p-2"},`pad-${t}`))]})]},s)))})]})})]}),!t&&!f&&j&&(0,a.jsx)(m,{rankings:e.rankings}),!t&&!f&&!j&&e.header&&e.teams&&(0,a.jsx)("div",{className:"text-center py-20 text-slate-600",children:"Dữ liệu đang được cập nhật..."}),!t&&(f||j)&&(0,a.jsxs)("div",{className:"mt-6 flex flex-wrap items-center gap-5 px-5 py-4 bg-slate-50 rounded-2xl border border-slate-200",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,a.jsx)("span",{className:"w-2.5 h-2.5 rounded-full bg-emerald-500"}),(0,a.jsx)("span",{className:"text-[11px] text-slate-600 font-bold uppercase tracking-wider",children:"Đội trưởng bảng"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,a.jsx)("span",{className:"w-2.5 h-2.5 rounded-full bg-sky-4
83200"}),(0,a.jsx)("span",{className:"text-[11px] text-slate-600 font-bold uppercase tracking-wider",children:"Champions League"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,a.jsx)("span",{className:"w-2.5 h-2.5 rounded-full bg-amber-500"}),(0,a.jsx)("span",{className:"text-[11px] text-slate-600 font-bold uppercase tracking-wider",children:"Europa League"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,a.jsx)("span",{className:"w-2.5 h-2.5 rounded-full bg-[#f97316]"}),(0,a.jsx)("span",{className:"text-[11px] text-slate-600 font-bold uppercase tracking-wider",children:"Europa Conference"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,a.jsx)("span",{className:"w-2.5 h-2.5 rounded-full bg-[#E11D48]"}),(0,a.jsx)("span",{className:"text-[11px] text-slate-600 font-bold uppercase tracking-wider",children:"Xuống hạng"})]})]})]})}function m({rankings:e}){if(!e||0===e.length)return null;let t=e[0].data,s=e.slice(1);return(0,a.jsx)("div",{className:"overflow-hidden rounded-[22px] border border-[#cbd5e1] bg-[linear-gradient(180deg,#191a20,#111218)] shadow-[0_24px_80px_rgba(0,0,0,0.4)]",children:(0,a.jsx)("div",{className:"overflow-x-auto",children:(0,a.jsxs)("table",{className:"w-full text-left border-collapse",children:[(0,a.jsx)("thead",{children:(0,a.jsx)("tr",{className:"bg-white text-[11px] uppercase tracking-[0.18em] text-slate-600",children:t.map((e,l)=>{let r=l===t.length-1,n=s[0]&&s[0].data.length>t.length?s[0].data.length-t.length+1:1;return(0,a.jsx)("th",{colSpan:r?n:1,className:`p-4 font-semibold ${1===l?"w-1/3 text-left":"text-center"}`,children:e},l)})})}),(0,a.jsx)("tbody",{className:"text-sm",children:s.map((e,t)=>(0,a.jsx)("tr",{className:"group border-b border-[#cbd5e1] transition-colors hover:bg-white",children:e.data.map((t,l)=>0===l?(0,a.jsx)(x,{value:t,totalTeams:s.length},l):1===l?(0,a.jsx)("td",{className:"p-4",children:(0,a.jsxs)("div",{className:"flex items-center gap-3 rounded-2xl border border-white/6 bg-[linear-gradient(180deg,rgba(255,255,255,0.03),rgba(255,255,255,0.01))] px-3 py-2 transition-colors group-hover:border-emerald-600/22",children:[e.team_logo?(0,a.jsx)("img",{src:e.team_logo,alt:t,className:"h-8 w-8 rounded-full bg-white/5 object-contain ring-1 ring-white/8",loading:"lazy"}):(0,a.jsx)("div",{className:"flex h-8 w-8 items-center justify-center rounded-full border border-gray-700 bg-gray-800 text-xs font-bold text-gray-500",children:"?"}),(0,a.jsx)("span",{className:"font-bold text-slate-900 transition-colors group-hover:text-emerald-600",children:t})]})},l):["W","D","L"].includes(t)?(0,a.jsx)("td",{className:"p-2 text-center",children:(0,a.jsx)("span",{className:`inline-flex h-7 w-7 items-center justify-center rounded-[8px] text-[11px] font-black ${i(t)}`,children:t})},l):(0,a.jsx)("td",{className:"p-4 text-center font-mono text-slate-600",children:t},l))},t))})]})})})}},85032:(e,t,s)=>{"use strict";s.d(t,{KlivevipSchedulePage:()=>d});var a=s(68019),l=s(10707),r=s(78637),n=s(22739);function i({html:e}){return e?.trim()?(0,a.jsx)("section",{className:"relative mt-10 mb-6",children:(0,a.jsx)("div",{className:"seo-prose relative",children:(0,a.jsx)("div",{dangerouslySetInnerHTML:{__html:e},className:"text-slate-600 text-[14px] leading-[1.85] px-1 [&_strong]:text-slate-900 [&_a]:text-[#4681E8]"})})}):null}s(75688);let o=`
833<h2>Lịch thi đấu b\xf3ng đ\xe1 - Cập nhật lịch b\xf3ng đ\xe1 h\xf4m nay nhanh v\xe0 ch\xednh x\xe1c</h2>
834
835<p>Để <strong>xem lịch thi đấu b\xf3ng đ\xe1</strong> nhanh, ch\xednh x\xe1c v\xe0 đầy đủ nhất, Klive ch\xednh l\xe0 nơi bạn n\xean chọn. Ch\xfang t\xf4i cập nhật lịch thi đấu cho to\xe0n bộ c\xe1c giải đấu trong nước v\xe0 quốc tế, gi\xfap bạn kh\xf4ng bỏ lỡ bất kỳ trận cầu hấp dẫn n\xe0o.</p>
836
837<img src="/images/seo/schedule-football.png" alt="Lịch thi đấu b\xf3ng đ\xe1 h\xf4m nay tại Klive" loading="lazy" />
838
839<div class="toc-box">
840  <h3>Nội dung ch\xednh</h3>
841  <ol>
842    <li>Lịch thi đấu b\xf3ng đ\xe1 trực tuyến h\xe0ng đầu</li>
843    <li>Lịch b\xf3ng đ\xe1 nhanh v\xe0 ch\xednh x\xe1c</li>
844    <li>Cập nhật lịch Ngoại Hạng Anh v\xe0 Champions League</li>
845    <li>C\xe1ch xem lịch thi đấu hiệu quả nhất</li>
846  </ol>
847</div>
848
849<h2>Lịch thi đấu b\xf3ng đ\xe1 trực tuyến h\xe0ng đầu</h2>
850<p>Trong thời đại số, kh\xf4ng ai c\xf2n xem lịch b\xf3ng đ\xe1 tr\xean TV hay b\xe1o giấy nữa. Tất cả đ\xe3 chuyển sang theo d\xf5i online, v\xe0 Klive ch\xednh l\xe0 nền tảng cập nhật lịch b\xf3ng đ\xe1 được đ\xe1nh gi\xe1 cao nhất.</p>
851
852<p>Khi truy cập Klive, bạn c\xf3 thể xem lịch thi đấu của bất kỳ giải đấu b\xf3ng đ\xe1 n\xe0o tr\xean thế giới một c\xe1ch ho\xe0n to\xe0n miễn ph\xed. Th\xf4ng tin lịch đấu được cập nhật sớm nhất v\xe0 chi tiết đến từng ph\xfat.</p>
853
854<h2>Lịch b\xf3ng đ\xe1 nhanh v\xe0 ch\xednh x\xe1c</h2>
855<p>Klive kh\xf4ng chỉ cung cấp lịch thi đấu c\xe1c giải đấu h\xe0ng đầu m\xe0 c\xf2n cập nhật lịch ph\xe1t s\xf3ng tr\xean c\xe1c k\xeanh truyền h\xecnh Việt Nam như K+, FPT Play, VTV Sports. Gi\xfap bạn biết trận n\xe0o được chiếu trực tiếp tr\xean TV v\xe0 sắp xếp thời gian hợp l\xfd.</p>
856
857<h2>Cập nhật lịch Ngoại Hạng Anh v\xe0 Champions League</h2>
858<p>Ngoại Hạng Anh v\xe0 Champions League l\xe0 hai giải đấu được quan t\xe2m nhất. Tại Klive, bạn lu\xf4n nắm được lịch đấu đầy đủ từ v\xf2ng bảng đến chung kết, k\xe8m theo th\xf4ng tin về đội h\xecnh dá»± kiến, phong độ v\xe0 lịch sá»­ đối đầu để chuẩn bị tốt nhất cho má
858»—i trận cầu.</p>
859
860<p>Kết hợp lịch thi đấu với trang trực tiếp b\xf3ng đ\xe1, bạn sẽ c\xf3 trải nghiệm theo d\xf5i b\xf3ng đ\xe1 ho\xe0n hảo nhất - biết trước, xem ngay, kh\xf4ng bỏ lỡ!</p>
861`;var c=s(63145);function d({initialData:e}){let t=(0,r.usePathname)(),[s,h]=(0,l.useState)(!1),[m,p]=(0,l.useState)(new Set),[u,g]=(0,l.useState)(""),[b,f]=(0,l.useState)(!1),[j,w]=(0,l.useState)(0),v=(0,l.useMemo)(()=>(0,c.p_)(e),[e]),N=v.dateTabs,y=(0,l.useMemo)(()=>{if(!v.selectedDate)return 0;let e=N.findIndex(e=>(e.dataValue||e.date)===v.selectedDate);return e>=0?e:0},[N,v.selectedDate]),[_,k]=(0,l.useState)(y),[E,C]=(0,l.useState)(v.leagues||[]),S=(0,l.useMemo)(()=>{if(!u)return E;let e=u.toLowerCase();return E.filter(t=>t.league_name.toLowerCase().includes(e)||t.matches.some(t=>t.home_team.toLowerCase().includes(e)||t.away_team.toLowerCase().includes(e)))},[E,u]),L=Math.max(0,N.length-7),$=N.slice(j,j+7),F=j>0,T=j<L,A=S.reduce((e,t)=>e+t.matches.length,0);return((0,l.useEffect)(()=>{if(!v.selectedDate||!N.length)return;let e=N.findIndex(e=>(e.dataValue||e.date)===v.selectedDate);e>=0&&k(e)},[N,v.selectedDate]),(0,l.useEffect)(()=>{_<j?w(Math.max(0,_)):_>=j+7&&w(Math.min(L,_-7+1))},[_,L,j]),e)?(0,a.jsxs)("div",{className:"max-w-[1440px] mx-auto px-4 py-8",children:[(0,a.jsx)(n.d,{eyebrow:"Lịch thi đấu",title:"LỊCH THI ĐẤU",rightSlot:(0,a.jsxs)("div",{className:"text-[12px] text-slate-500 font-bold uppercase tracking-wider",children:[(0,a.jsx)("span",{className:"text-[#E11D48] font-black",children:S.reduce((e,t)=>e+t.matches.length,0)})," trận đấu"]})}),(0,a.jsxs)("div",{className:"flex items-center mb-4 rounded-xl overflow-hidden border border-slate-200 bg-white shadow-sm",children:[(0,a.jsx)("button",{type:"button",disabled:!F,onClick:()=>w(e=>Math.max(0,e-1)),className:`flex items-center justify-center w-8 h-[52px] bg-slate-100 border-r border-slate-200 text-slate-600 hover:text-slate-800 hover:bg-slate-200 transition-all shrink-0 ${!F?"opacity-30":"cursor-pointer"}`,children:(0,a.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2.5,d:"M15 19l-7-7 7-7"})})}),(0,a.jsx)("div",{className:"flex flex-1",children:$.map((e,s)=>{let l=j+s;return(0,a.jsxs)("button",{type:"button",onClick:()=>(e=>{let s=N[e];if(!s||e===_)return;let a=s.dataValue||s.date;a&&(k(e),p(new Set),h(!0),window.history.replaceState(null,"",`${t}?date=${encodeURIComponent(a)}`),fetch(`/api/socolive/fixtures?date=${encodeURIComponent(a)}`,{cache:"no-store"}).then(e=>e.ok?e.json():null).then(e=>{e&&C((0,c.p_)(e).leagues||[])}).finally(()=>h(!1)))})(l),className:`flex-1 flex flex-col items-center justify-center h-[52px] border-b-[3px] transition-all duration-300 ${_===l?"border-[#4681E8] text-[#4681E8] bg-[#4681E8]/5":"border-transparent text-[#64748B] hover:text-[#94A3B8] hover:bg-slate-100"}`,children:[(0,a.jsx)("span",{className:`text-[11px] font-bold uppercase tracking-widest ${_===l?"text-[#4681E8]":""}`,children:e.label}),(0,a.jsx)("span",{className:`text-[12px] font-mono mt-0.5 ${_===l?"text-slate-800 font-black":""}`,children:e.date})]},`tab-${l}`)})}),(0,a.jsx)("button",{type:"button",disabled:!T,onClick:()=>w(e=>Math.min(L,e+1)),className:`flex items-center justify-center w-8 h-[52px] bg-slate-100 border-l border-slate-200 text-slate-600 hover:text-slate-800 hover:bg-slate-200 transition-all shrink-0 ${!T?"opacity-30":"cursor-pointer"}`,children:(0,a.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2.5,d:"M9 5l7 7-7 7"})})})]}),(0,a.jsxs)("div",{className:"relative mb-4",children:[(0,a.jsxs)("button",{onClick:()=>f(!b),className:"flex items-center gap-3 bg-white hover:bg-slate-50 px-4 py-2.5 rounded-xl border border-slate-200 shadow-sm transition-all text-sm group",children:[(0,a.jsx)("svg",{className:"w-5 h-5 text-[#E11D48] transition-colors group-hover:text-[#F43F5E]",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 6h16M4 12h16M4 18h16"})}),(0,a.jsx)("span",{className:"text-slate-700 font-bold text-[13px] uppercase tracking-wide",children:"Danh s\xe1ch giải đấu"}),(0,a.jsx)("svg",{className:`w-4 h-4 text-slate-500 transition-transform duration-300 ${b?"rotate-180":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),b&&(0,a.jsxs)("div",{className:"absolute top-full left-0 mt-2 w-[360px] bg-white border border-slate-200 rounded-2xl shadow-[0_24px_80px_rgba(0,0,0,0.12)] z-50 max-h-[320px] overflow-hidden flex flex-col",children:[(0,a.jsx)("div",{className:"p-2 border-b border-slate-100",children:(0,a.jsx)("input",{type:"text",placeholder:"T\xecm giải đấu...",value:u,onChange:e=>g(e.target.value),className:"w-full bg-slate-50 border border-transparent roun
861ded-xl px-4 py-2.5 text-sm text-slate-800 placeholder-slate-400 outline-none focus:border-[#4681E8]/50 transition-colors"})}),(0,a.jsx)("div",{className:"overflow-y-auto flex-1 py-2",children:E.map((e,t)=>(0,a.jsxs)("button",{type:"button",onClick:()=>{g(e.league_name),f(!1)},className:"w-full flex items-center gap-3 px-4 py-2.5 hover:bg-slate-50 text-left text-[13px] transition-colors",children:[e.league_icon?(0,a.jsx)("img",{src:e.league_icon,alt:e.league_name||"League",className:"w-5 h-5 object-contain shrink-0",loading:"lazy",decoding:"async"}):(0,a.jsx)("div",{className:"w-5 h-5 rounded-md bg-slate-200 shrink-0"}),(0,a.jsx)("span",{className:"text-slate-600 truncate flex-1 font-medium",children:e.league_name}),(0,a.jsx)("span",{className:"text-[11px] text-[#E11D48] font-bold shrink-0 px-2 py-0.5 bg-[#E11D48]/10 rounded-md border border-[#E11D48]/20",children:e.matches.length})]},t))})]})]}),(0,a.jsxs)("div",{className:"grid grid-cols-[1fr_60px] md:grid-cols-[1fr_60px_55px_100px_100px_90px] bg-slate-50 border border-slate-200 rounded-t-xl px-4 py-3 text-[11px] text-slate-500 font-black uppercase tracking-widest shadow-inner",children:[(0,a.jsx)("span",{children:"Trận đấu"}),(0,a.jsx)("span",{className:"text-center",children:"Tỷ số"}),(0,a.jsx)("span",{className:"text-center hidden md:block",children:"Hiệp 1"}),(0,a.jsx)("span",{className:"text-center hidden md:block",children:"Cược chấp"}),(0,a.jsx)("span",{className:"text-center hidden md:block",children:"T\xe0i/Xỉu"}),(0,a.jsx)("span",{className:"text-center hidden md:block",children:"1 X 2"})]}),(0,a.jsxs)("div",{className:"border border-slate-200 border-t-0 rounded-b-xl overflow-hidden relative shadow-[0_8px_30px_rgba(0,0,0,0.06)]",children:[s&&(0,a.jsx)("div",{className:"absolute inset-0 z-10 bg-white/80 backdrop-blur-[2px]",children:(0,a.jsx)("div",{className:"space-y-0",children:[...Array(6)].map((e,t)=>(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 px-4 py-3.5 bg-slate-100 border-b border-slate-200",children:[(0,a.jsx)("div",{className:"w-4 h-4 rounded bg-slate-300 animate-pulse"}),(0,a.jsx)("div",{className:"h-3.5 rounded bg-slate-200 animate-pulse",style:{width:`${120+30*t}px`}})]}),[void 0,void 0].map((e,t)=>(0,a.jsxs)("div",{className:"grid grid-cols-[1fr_60px] md:grid-cols-[1fr_60px_55px_100px_100px_90px] items-center px-4 py-3 border-b border-slate-100",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)("div",{className:"w-10 h-3.5 rounded bg-slate-200 animate-pulse"}),(0,a.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,a.jsx)("div",{className:"h-3 w-24 rounded bg-slate-100 animate-pulse"}),(0,a.jsx)("div",{className:"h-3 w-20 rounded bg-slate-100 animate-pulse"})]})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5",children:[(0,a.jsx)("div",{className:"h-3 w-5 rounded bg-slate-100 animate-pulse"}),(0,a.jsx)("div",{className:"h-3 w-5 rounded bg-slate-100 animate-pulse"})]}),(0,a.jsxs)("div",{className:"hidden md:flex flex-col items-center gap-1.5",children:[(0,a.jsx)("div",{className:"h-3 w-5 rounded bg-slate-100 animate-pulse"}),(0,a.jsx)("div",{className:"h-3 w-5 rounded bg-slate-100 animate-pulse"})]}),(0,a.jsxs)("div",{className:"hidden md:flex flex-col items-center gap-1.5",children:[(0,a.jsx)("div",{className:"h-3 w-14 rounded bg-slate-100 animate-pulse"}),(0,a.jsx)("div",{className:"h-3 w-10 rounded bg-slate-100 animate-pulse"})]}),(0,a.jsxs)("div",{className:"hidden md:flex flex-col items-center gap-1.5",children:[(0,a.jsx)("div",{className:"h-3 w-14 rounded bg-slate-100 animate-pulse"}),(0,a.jsx)("div",{className:"h-3 w-10 rounded bg-slate-100 animate-pulse"})]}),(0,a.jsxs)("div",{className:"hidden md:flex flex-col items-center gap-1.5",children:[(0,a.jsx)("div",{className:"h-3 w-10 rounded bg-slate-100 animate-pulse"}),(0,a.jsx)("div",{className:"h-3 w-10 rounded bg-slate-100 animate-pulse"}),(0,a.jsx)("div",{className:"h-3 w-10 rounded bg-slate-100 animate-pulse"})]})]},t))]},t))})}),0!==S.length||s?S.map((e,t)=>(0,a.jsxs)("div",{id:`league-${t}`,children:[(0,a.jsxs)("button",{onClick:()=>{p(e=>{let s=new Set(e);return s.has(t)?s.delete(t):s.add(t),s})},className:"w-full flex items-center gap-3 px-4 py-3 bg-slate-50 hover:bg-slate-100 border-b border-slate-100 transition-colors text-left group",children:[(0,a.jsx)("svg",{className:`w-4 h-4 text-[#E11D48] transition-transform duration-300 shrink-0 ${m.has(t)?"-rotate-90":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2.5,d:"M19 9l-7 7-7-7"})}),e.league_icon&&(0,a.jsx)("div",{className:"w-6 h-6 rounded-full bg-slate-100 p-0.5 border border-slate-200 flex items-center justify-center shadow-sm",children:(0,a.jsx)("img",{src:e.league_icon,alt:e.league_name||"League",className:"w-4 h-4 object-contain shrink-0",loading:"lazy",decoding:"async"})}),(0,a.jsx)("span",{className:"text-[13px] font-bold text-slate-700 flex-1 truncate uppercase tracking-widest",children:e.league_name}),(0,a.jsxs)("span",{className:"text-[11px] text-[#E11D48] font-bold shrink-0 ml-1 px-2 py-0.5 bg-[#E11D48]/10 rounded border border-[#
861E11D48]/20 group-hover:bg-[#E11D48]/20 transition-colors",children:["BXH ",(0,a.jsx)("svg",{className:"inline w-3 h-3 ml-0.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 6h16M4 10h16M4 14h16M4 18h16"})})]})]}),!m.has(t)&&e.matches.map((e,t)=>(0,a.jsxs)("div",{className:"grid grid-cols-[1fr_60px] md:grid-cols-[1fr_60px_55px_100px_100px_90px] items-center px-4 py-3 bg-transparent hover:bg-slate-50 border-b border-slate-100 last:border-0 transition-colors group cursor-default",children:[(0,a.jsxs)("div",{className:"flex items-center gap-4 min-w-0",children:[(0,a.jsx)("span",{className:"text-[#E11D48] font-mono text-[13px] font-black min-w-[42px] shrink-0 drop-shadow-[0_0_4px_rgba(225,29,72,0.4)]",children:e.time}),(0,a.jsxs)("div",{className:"flex flex-col gap-1 min-w-0 flex-1",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[e.home_logo&&(0,a.jsx)("img",{src:e.home_logo,alt:e.home_team||"Home team",className:"w-4 h-4 object-contain shrink-0 filter drop-shadow-[0_2px_2px_rgba(0,0,0,0.8)]",loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-[13px] text-slate-700 font-medium truncate group-hover:text-slate-900 transition-colors",children:e.home_team})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[e.away_logo&&(0,a.jsx)("img",{src:e.away_logo,alt:e.away_team||"Away team",className:"w-4 h-4 object-contain shrink-0",loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-[13px] text-slate-700 font-medium truncate group-hover:text-slate-900 transition-colors",children:e.away_team})]})]})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center",children:[(0,a.jsx)("span",{className:"text-[12px] text-[var(--accent-cyan)] font-mono font-bold",children:"-"!==e.score?e.score:"-"}),(0,a.jsx)("span",{className:"text-[12px] text-[#64748B]",children:"-"})]}),(0,a.jsxs)("div",{className:"hidden md:flex flex-col items-center",children:[(0,a.jsx)("span",{className:"text-[12px] text-[#64748B]",children:"-"}),(0,a.jsx)("span",{className:"text-[12px] text-[#64748B]",children:"-"})]}),(0,a.jsx)(x,{values:e.handicap,hasLine:!0}),(0,a.jsx)(x,{values:e.over_under,hasLine:!0}),(0,a.jsx)("div",{className:"hidden md:flex flex-col items-center gap-0",children:e.one_x_two?.length>0?e.one_x_two.map((e,t)=>(0,a.jsx)("span",{className:"text-[11px] text-slate-500 leading-[18px]",children:e||"-"},t)):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"text-[11px] text-[#64748B] leading-[18px]",children:"-"}),(0,a.jsx)("span",{className:"text-[11px] text-[#64748B] leading-[18px]",children:"-"}),(0,a.jsx)("span",{className:"text-[11px] text-[#64748B] leading-[18px]",children:"-"})]})})]},t))]},t)):(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center py-20 gap-3 bg-slate-50",children:[(0,a.jsx)("svg",{className:"w-12 h-12 text-slate-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",strokeWidth:1.5,children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6.75 3v2.25M17.25 3v2.25M3 18.75V7.5a2.25 2.25 0 012.25-2.25h13.5A2.25 2.25 0 0121 7.5v11.25m-18 0A2.25 2.25 0 005.25 21h13.5A2.25 2.25 0 0021 18.75m-18 0v-7.5A2.25 2.25 0 015.25 9h13.5A2.25 2.25 0 0121 11.25v7.5"})}),(0,a.jsx)("span",{className:"text-slate-500 font-medium tracking-wide",children:"Kh\xf4ng c\xf3 trận đấu n\xe0o cho ng\xe0y n\xe0y"}),(0,a.jsx)("span",{className:"text-slate-400 text-[12px]",children:"H\xe3y thử chọn một ng\xe0y kh\xe1c"})]})]}),(0,a.jsxs)("div",{className:"mt-6 text-center text-[11px] text-[#64748B] uppercase tracking-widest font-bold drop-shadow-sm",children:["Tổng cộng ",A," trận đấu trong ",S.length," giải"]}),(0,a.jsx)(i,{html:o})]}):(0,a.jsxs)("div",{className:"max-w-[1440px] mx-auto px-4 py-8",children:[(0,a.jsx)(n.d,{eyebrow:"Lịch thi đấu",title:"LỊCH THI ĐẤU"}),(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center py-16 gap-4",children:[(0,a.jsx)("div",{className:"w-12 h-12 rounded-full border-2 border-[#
861E11D48]/30 border-t-[#E11D48] animate-spin"}),(0,a.jsx)("span",{className:"text-slate-500 text-sm font-medium tracking-wide",children:"Đang tải lịch thi đấu..."})]})]})}function x({values:e,hasLine:t}){return e&&0!==e.length?t&&e.length>=3?(0,a.jsxs)("div",{className:"hidden md:flex flex-col items-center gap-0",children:[(0,a.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,a.jsx)("span",{className:"text-[11px] text-[#E11D48] leading-[18px] font-bold",children:e[0]}),(0,a.jsx)("span",{className:"text-[11px] text-slate-500 leading-[18px]",children:e[1]})]}),(0,a.jsx)("span",{className:"text-[11px] text-slate-500 leading-[18px]",children:e[2]})]}):(0,a.jsx)("div",{className:"hidden md:flex flex-col items-center gap-0",children:e.map((e,t)=>(0,a.jsx)("span",{className:"text-[11px] text-slate-500 leading-[18px]",children:e||"-"},t))}):(0,a.jsxs)("div",{className:"hidden md:flex flex-col items-center",children:[(0,a.jsx)("span",{className:"text-[11px] text-[#64748B] leading-[18px]",children:"-"}),(0,a.jsx)("span",{className:"text-[11px] text-[#64748B] leading-[18px]",children:"-"})]})}},85188:()=>{},85651:(e,t,s)=>{"use strict";s.d(t,{StandingsClient:()=>h});var a=s(68019),l=s(10707),r=s(46914),n=s(25059);function i(e){return"W"===e?"border border-emerald-500/45 bg-emerald-500/25 text-emerald-300 shadow-[0_0_0_1px_rgba(16,185,129,0.08)_inset]":"L"===e?"border border-red-500/45 bg-red-500/25 text-red-300 shadow-[0_0_0_1px_rgba(239,68,68,0.08)_inset]":"D"===e?"border border-amber-400/45 bg-amber-400/22 text-amber-200 shadow-[0_0_0_1px_rgba(251,191,36,0.08)_inset]":"border border-slate-500/40 bg-slate-500/18 text-slate-700"}function o(e,t){return 1===e?{bar:"bg-[linear-gradient(180deg,#facc15,#f97316)]",badge:"border-emerald-600/60 bg-slate-100 text-yellow-700 shadow-[0_0_18px_rgba(250,204,21,0.14)]",row:"from-[#32230d]/70 via-transparent to-transparent"}:e<=4?{bar:"bg-[linear-gradient(180deg,#fb7185,#f97316)]",badge:"border-[#fb7185]/45 bg-slate-100 text-rose-700",row:"from-[#241318]/55 via-transparent to-transparent"}:e<=6?{bar:"bg-[linear-gradient(180deg,#f59e0b,#facc15)]",badge:"border-[#f59e0b]/45 bg-slate-100 text-yellow-700",row:"from-[#24190b]/45 via-transparent to-transparent"}:e<=10?{bar:"bg-[linear-gradient(180deg,#38bdf8,#2563eb)]",badge:"border-sky-400/40 bg-white text-sky-700",row:"from-[#101725]/32 via-transparent to-transparent"}:e>=Math.max(t-2,1)?{bar:"bg-[linear-gradient(180deg,#ef4444,#7f1d1d)]",badge:"border-red-500/40 bg-slate-100 text-red-700",row:"from-[#220f14]/45 via-transparent to-transparent"}:{bar:"bg-[linear-gradient(180deg,#64748b,#334155)]",badge:"border-slate-500/35 bg-white text-slate-700",row:"from-[#12161d]/24 via-transparent to-transparent"}}function c({detail:e}){let[t,s]=(0,l.useState)(!1),n=(0,l.useRef)(null),[o,d]=(0,l.useState)({top:0,left:0}),x=i(e.result),h=(0,l.useCallback)(()=>{if(n.current){let e=n.current.getBoundingClientRect();d({top:e.top+window.scrollY-8,left:e.left+e.width/2+window.scrollX})}s(!0)},[]);return(0,a.jsxs)("div",{ref:n,className:"relative inline-flex",onMouseEnter:h,onMouseLeave:()=>s(!1),children:[(0,a.jsx)("span",{className:`inline-flex h-7 w-7 items-center justify-center rounded-[8px] text-[11px] font-black cursor-pointer transition-transform hover:-translate-y-0.5 ${x}`,children:e.result}),t&&e.match_time&&"u">typeof document&&(0,r.createPortal)((0,a.jsxs)("div",{className:"fixed z-[9999] w-[220px] pointer-events-none",style:{top:`${o.top}px`,left:`${o.left}px`,transform:"translate(-50%, -100%)",position:"absolute"},children:[(0,a.jsxs)("div",{className:"overflow-hidden rounded-xl border border-[#cbd5e1] bg-white shadow-2xl",children:[(0,a.jsx)("div",{className:"bg-slate-100 px-3 py-1.5 text-[10px] text-slate-600 font-mono text-center border-b border-[#cbd5e1]",children:e.match_time}),(0,a.jsxs)("div",{className:"px-3 py-2.5 flex items-center justify-between gap-2",children:[(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5 flex-1 min-w-0",children:[e.home_logo?(0,a.jsx)("img",{src:e.home_logo,alt:e.home_team,className:"w-7 h-7 object-contain",loading:"lazy",decoding:"async"}):(0,a.jsx)("div",{className:"w-7 h-7 rounded-full bg-gray-700 flex items-center justify-center text-[8px] text-slate-600 font-bold",children:"?"}),(0,a.jsx)("span",{className:"text-[9px] text-slate-600 font-bold text-center leading-tight line-clamp-2 max-w-[70px]",children:e.home_team})]}),(0,a.jsx)("div",{className:"text-slate-900 font-black text-sm whitespace-nowrap px-1",children:e.score||"? - ?"}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5 flex-1 min-w-0",children:[e.away_logo?(0,a.jsx)("img",{src:e.away_logo,alt:e.away_team,className:"w-7 h-7 object-contain",loading:"lazy",decoding:"async"}):(0,a.jsx)("div",{className:"w-7 h-7 rounded-full bg-gray-700 flex items-center justify-center text-[8px] text-slate-600 font-bold",children:"?"}),(0,a.jsx)("span",{className:"text-[9px] text-slate-600 font-bold text-center leading-tight line-clamp-2 max-w-[70px]",children:e.away_team})]})]})]}),(0,a.jsx)("div",{className:"absolute left-1/2 -translate-x-1/2 -bottom-1 w-2 h-2 bg-white border-r border-b border-[#cbd5e1] rotate-45"})]}),document.body)]})}function d({result:e}){let t=i(e);return(0,a.jsx)("span",{className:`inline-flex h-7 w-7 items-center justify-center rounded-[8px] text-[11px] font-black ${t}`,children:e})}function x({value:e,totalTeams:t}){let s=Number(e);if(!Number.isFinite(s))return(0,a.jsx)("td",{className:"px-4 py-4 text-center font-mono font-black text-slate-400",children:e});let l=o(s,t);return(0,a.jsxs)("td",{className:"relative px-4 py-4 text-center font-mono",children:[(0,a.jsx)("span",{className:`absolute left-0 top-1/2 h-7 w-1 -translate-y-1/2 roun
861ded-r-full ${l.bar}`}),(0,a.jsx)("span",{className:`inline-flex h-8 w-8 items-center justify-center rounded-[10px] border text-[13px] font-black ${l.badge}`,children:s})]})}function h({initialData:e}){let[t]=(0,l.useState)(!1),[s,r]=(0,l.useState)(!1),[i,p]=(0,l.useState)(""),u=(0,l.useRef)(null);if((0,l.useEffect)(()=>{function e(e){u.current&&!u.current.contains(e.target)&&r(!1)}return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[]),!e)return(0,a.jsx)("div",{className:"text-center py-20 text-slate-600",children:"Đang tải dữ liệu..."});let g=e.available_leagues||[],b=g.filter(e=>e.name.toLowerCase().includes(i.toLowerCase())),f=e.teams&&e.teams.length>0&&Array.isArray(e.teams[0]?.form),j=!f&&e.rankings;return(0,a.jsxs)("div",{className:"mx-auto max-w-[1440px] px-4 py-8",children:[(0,a.jsx)(n.x,{eyebrow:"Bảng xếp hạng",title:"BẢNG XẾP HẠNG",rightSlot:(0,a.jsx)("div",{className:"text-[12px] text-slate-600",children:(0,a.jsx)("span",{className:"text-slate-900/80 font-bold",children:e.league_name})})}),g.length>0&&(0,a.jsxs)("div",{className:"mb-6",ref:u,children:[(0,a.jsxs)("div",{className:"relative inline-flex min-w-[320px] items-center gap-3 rounded-2xl border border-slate-200 bg-white backdrop-blur-md px-5 py-3.5 cursor-pointer shadow-[0_8px_30px_rgba(0,0,0,0.06)] transition-colors hover:border-[#4681E8]/50 hover:shadow-[0_8px_30px_rgba(70,129,232,0.1)]",onClick:()=>r(!s),children:[e.league_icon&&(0,a.jsx)("img",{src:e.league_icon,alt:e.league_name||"League icon",className:"w-6 h-6 object-contain",loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-slate-800 font-bold text-sm flex-1",children:e.league_name||"Chọn giải đấu"}),(0,a.jsx)("svg",{className:`w-4 h-4 text-[#4681E8] transition-transform ${s?"rotate-180":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),s&&(0,a.jsxs)("div",{className:"absolute z-50 mt-2 w-[360px] overflow-hidden rounded-2xl border border-slate-200 bg-white backdrop-blur-xl shadow-[0_24px_80px_rgba(0,0,0,0.15)]",children:[(0,a.jsx)("div",{className:"p-2 border-b border-slate-100",children:(0,a.jsx)("input",{type:"text",placeholder:"T\xecm kiếm giải đấu...",value:i,onChange:e=>p(e.target.value),className:"w-full bg-slate-50 text-slate-800 text-sm px-4 py-2.5 rounded-xl border border-transparent outline-none focus:border-[#4681E8]/50 placeholder-slate-400 transition-colors",autoFocus:!0})}),(0,a.jsxs)("div",{className:"max-h-[340px] overflow-y-auto",children:[b.map(t=>(0,a.jsxs)("a",{href:`/standings?league=${encodeURIComponent(t.id)}`,className:`flex items-center gap-3 px-4 py-3 cursor-pointer transition-colors hover:bg-slate-50 ${t.id===e.league_id?"bg-[#4681E8]/10 border-l-4 border-[#4681E8]":""}`,children:[t.icon?(0,a.jsx)("img",{src:t.icon,alt:t.name||"League",className:"w-5 h-5 object-contain flex-shrink-0",loading:"lazy",decoding:"async"}):(0,a.jsx)("div",{className:"w-5 h-5 rounded bg-gray-700 flex-shrink-0"}),(0,a.jsx)("span",{className:"text-sm text-slate-900 truncate",children:t.name})]},t.id)),0===b.length&&(0,a.jsx)("div",{className:"px-4 py-8 text-center text-gray-500 text-sm",children:"Kh\xf4ng t\xecm thấy giải đấu"})]})]})]}),t&&(0,a.jsxs)("div",{className:"flex items-center justify-center py-12",children:[(0,a.jsx)("div",{className:"animate-spin w-8 h-8 border-2 border-emerald-600 border-t-transparent rounded-full"}),(0,a.jsx)("span",{className:"ml-3 text-slate-600 text-sm",children:"Đang tải bảng xếp hạng từ server..."})]}),!t&&f&&(0,a.jsxs)("div",{className:"overflow-hidden rounded-[24px] border border-slate-200 bg-white shadow-[0_8px_30px_rgba(0,0,0,0.08)]",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between gap-3 border-b border-[#4681E8]/20 bg-gradient-to-r from-[#4681E8] to-[#2563eb] px-6 py-4 text-white shadow-[0_4px_25px_rgba(70,129,232,0.3)]",children:[(0,a.jsx)("div",{className:"text-[13px] font-black uppercase tracking-[0.2em] drop-shadow-sm text-white/80",children:"League"}),(0,a.jsx)("div",{className:"truncate text-sm font-black sm:text-base drop-shadow-md",children:e.league_name})]}),(0,a.jsx)("div",{className:"overflow-x-auto",children:(0,a.jsxs)("table",{className:"w-full text-left border-collapse",children:[(0,a.jsx)("thead",{children:(0,a.jsx)("tr",{className:"bg-slate-50 text-[11px] uppercase tracking-[0.2em] text-slate-500",children:e.header.map((t,s)=>{let l=e.teams.some(e=>e.form&&e.form.length>0);return t.toLowerCase().includes("phong độ")&&!l?null:(0,a.jsx)("th",{colSpan:s===e.header.length-1&&l?5:1,className:`p-4 font-semibold ${1===s?"w-1/3 text-left":"text-center"}`,children:t},s)})})}),(0,a.jsx)("tbody",{className:"text-sm",children:e.teams.map((t,s)=>(o(Number(t.data[0]||s+1),e.teams.length),(0,a.jsxs)("tr",{className:"group border-b border-slate-100 bg-white transition-colors hover:bg-slate-50 cursor-pointer",children:[t.data.map((s,l)=>0===l?(0,a.jsx)(x,{value:s,totalTeams:e.teams.length},l):1===l?(0,a.jsx)("td",{className:"p-4",children:(0,a.jsxs)("div",{className:"flex items-center gap-3 rounded-2xl border border-slate-100 bg-slate-50 px-4 py-2.5 transition-colors group-hover:border-[#4681E8]/30 group-hover:bg-[#4681E8]/5",children:[t.team_logo?(0,a.jsx)("img",{src:t.team_logo,alt:s,className:"h-8 w-8 rounded-full bg-white object-contain p-0.5 filter drop-shadow-[0_2px_4px_rgba(0,0,0,0.1)]",loading:"lazy"}):(0,a.jsx)("div",{className:"flex h-8 w-8 items-center justify-center rounded-full border border-slate-200 bg-white text-[10px] font-bold text-slate-400",children:"?"}),(0,a.jsx)("span",{className:"font-bold text-slate-800 transition-colors group-hover:text-[#4681E8]",children:s})]})},l):(0,a.jsx)("td",{className:"p-4 text-center font-mono text-slate-600",children:s},l)),t.form&&t.form.length>0&&(0,a.jsxs)(a.Fragment,{children:[t.form.map((e,t)=>(0,a.jsx)("td",{className:"p-2 text-center",children:e.match_time?(0,a.jsx)(c,{detail:e}):(0,a.jsx)(d,{result:e.result})},`form-${t}`)),t.form.length<5&&Array.from({length:5-t.form.length}).map((e,t)=>(0,a.jsx)("td",{className:"p-2"},`pad-${t}`))]})]},s)))})]})})]}),!t&&!f&&j&&(0,a.jsx)(m,{rankings:e.rankings}),!t&&!f&&!j&&e.header&&e.teams&&(0,a.jsx)("div",{className:"text-center py-20 text-slate-600",children:"Dữ liệu đang được cập nhật..."}),!t&&(f||j)&&(0,a.jsxs)("div",{className:"mt-6 flex flex-wrap items-center gap-5 px-5 py-4 bg-slate-50 rounded-2xl border border-slate-200",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,a.jsx)("span",{className:"w-2.5 h-2.5 rounded-full bg-emerald-500"}),(0,a.jsx)("span",{className:"text-[11px] text-slate-600 font-bold uppercase tracking-wider",children:"Đội trưởng bảng"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,a.jsx)("span",{className:"w-2.5 h-2.5 rounded-full bg-sky-4
86100"}),(0,a.jsx)("span",{className:"text-[11px] text-slate-600 font-bold uppercase tracking-wider",children:"Champions League"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,a.jsx)("span",{className:"w-2.5 h-2.5 rounded-full bg-amber-500"}),(0,a.jsx)("span",{className:"text-[11px] text-slate-600 font-bold uppercase tracking-wider",children:"Europa League"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,a.jsx)("span",{className:"w-2.5 h-2.5 rounded-full bg-[#f97316]"}),(0,a.jsx)("span",{className:"text-[11px] text-slate-600 font-bold uppercase tracking-wider",children:"Europa Conference"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,a.jsx)("span",{className:"w-2.5 h-2.5 rounded-full bg-[#E11D48]"}),(0,a.jsx)("span",{className:"text-[11px] text-slate-600 font-bold uppercase tracking-wider",children:"Xuống hạng"})]})]})]})}function m({rankings:e}){if(!e||0===e.length)return null;let t=e[0].data,s=e.slice(1);return(0,a.jsx)("div",{className:"overflow-hidden rounded-[22px] border border-[#cbd5e1] bg-[linear-gradient(180deg,#191a20,#111218)] shadow-[0_24px_80px_rgba(0,0,0,0.4)]",children:(0,a.jsx)("div",{className:"overflow-x-auto",children:(0,a.jsxs)("table",{className:"w-full text-left border-collapse",children:[(0,a.jsx)("thead",{children:(0,a.jsx)("tr",{className:"bg-white text-[11px] uppercase tracking-[0.18em] text-slate-600",children:t.map((e,l)=>{let r=l===t.length-1,n=s[0]&&s[0].data.length>t.length?s[0].data.length-t.length+1:1;return(0,a.jsx)("th",{colSpan:r?n:1,className:`p-4 font-semibold ${1===l?"w-1/3 text-left":"text-center"}`,children:e},l)})})}),(0,a.jsx)("tbody",{className:"text-sm",children:s.map((e,t)=>(0,a.jsx)("tr",{className:"group border-b border-[#cbd5e1] transition-colors hover:bg-white",children:e.data.map((t,l)=>0===l?(0,a.jsx)(x,{value:t,totalTeams:s.length},l):1===l?(0,a.jsx)("td",{className:"p-4",children:(0,a.jsxs)("div",{className:"flex items-center gap-3 rounded-2xl border border-white/6 bg-[linear-gradient(180deg,rgba(255,255,255,0.03),rgba(255,255,255,0.01))] px-3 py-2 transition-colors group-hover:border-emerald-600/22",children:[e.team_logo?(0,a.jsx)("img",{src:e.team_logo,alt:t,className:"h-8 w-8 rounded-full bg-white/5 object-contain ring-1 ring-white/8",loading:"lazy"}):(0,a.jsx)("div",{className:"flex h-8 w-8 items-center justify-center rounded-full border border-gray-700 bg-gray-800 text-xs font-bold text-gray-500",children:"?"}),(0,a.jsx)("span",{className:"font-bold text-slate-900 transition-colors group-hover:text-emerald-600",children:t})]})},l):["W","D","L"].includes(t)?(0,a.jsx)("td",{className:"p-2 text-center",children:(0,a.jsx)("span",{className:`inline-flex h-7 w-7 items-center justify-center rounded-[8px] text-[11px] font-black ${i(t)}`,children:t})},l):(0,a.jsx)("td",{className:"p-4 text-center font-mono text-slate-600",children:t},l))},t))})]})})})}},86385:(e,t,s)=>{"use strict";s.d(t,{LiveMatchesClient:()=>m});var a=s(68019),l=s(10707);function r({activeSport:e,onSportChange:t,activeStatus:s,onStatusChange:l,matchesCount:n}){return(0,a.jsxs)("div",{className:"mb-5 flex flex-col gap-3",children:[(0,a.jsx)("div",{className:"flex items-center gap-2 overflow-x-auto pb-1 scrollbar-hide",children:[{id:"1",label:"B\xd3NG Đ\xc1",icon:"⚽"},{id:"2",label:"B\xd3NG RỔ",icon:"\uD83C\uDFC0"},{id:"5",label:"TENNIS",icon:"\uD83C\uDFBE"},{id:"4",label:"CẦU L\xd4NG",icon:"\uD83C\uDFF8"},{id:"3",label:"B\xd3NG CHUYỀN",icon:"\uD83C\uDFD0"},{id:"6",label:"B\xd3NG B\xc0N",icon:"\uD83C\uDFD3"}].map(s=>{let l=e===s.id;return(0,a.jsxs)("button",{type:"button",onClick:()=>t(s.id),className:`flex items-center gap-2 px-4 py-2.5 rounded-xl font-bold text-[12px] whitespace-nowrap transition-all duration-200 border cursor-pointer ${l?"bg-[#4681E8]/10 text-[#4681E8] border-[#4681E8]/40 shadow-[0_0_15px_rgba(70,129,232,0.1)]":"bg-white text-slate-500 border-slate-200 hover:text-slate-700 hover:border-[#4681E8]/30"}`,children:[(0,a.jsx)("span",{className:"text-[14px]",children:s.icon}
861),(0,a.jsx)("span",{className:"tracking-wider uppercase",children:s.label})]},s.id)})}),(0,a.jsx)("div",{className:"flex items-center gap-1 overflow-x-auto pb-1 scrollbar-hide bg-white rounded-xl p-1.5 border border-slate-200",children:[{id:"all",label:"TẤT CẢ",keyCount:"all"},{id:"live",label:"TRỰC TIẾP",keyCount:"live"},{id:"hot",label:"HOT",keyCount:"hot"},{id:"today",label:"H\xd4M NAY",keyCount:"today"},{id:"tomorrow",label:"NG\xc0Y MAI",keyCount:"tomorrow"}].map(e=>{let t=s===e.id,r=n[e.keyCount]||0;return(0,a.jsxs)("button",{type:"button",onClick:()=>l(e.id),className:`relative px-4 py-2 font-bold text-[12px] whitespace-nowrap transition-all duration-200 uppercase tracking-wider flex items-center gap-2 rounded-lg cursor-pointer ${t?"bg-[#4681E8]/10 text-[#4681E8] shadow-inner":"text-slate-500 hover:text-slate-700 hover:bg-[#4681E8]/5"}`,children:["live"===e.id&&t&&(0,a.jsx)("span",{className:"w-1.5 h-1.5 rounded-full bg-[#4681E8] animate-pulse shadow-[0_0_6px_rgba(70,129,232,0.8)]"}),(0,a.jsx)("span",{children:e.label}),(0,a.jsx)("span",{className:`px-1.5 py-0.5 rounded text-[10px] font-black ${t?"bg-[#4681E8]/20 text-[#4681E8]":"text-slate-400"}`,children:r})]},e.id)})})]})}function n(){return"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='10' fill='%2364748B' fill-opacity='0.18'/%3E%3C/svg%3E"}function i({match:e,isLoading:t=!1}){if(t||!e)return(0,a.jsx)("div",{className:"animate-pulse bg-white h-[64px] w-full border-b border-slate-100"});let s=new Date(1e3*parseInt(e.time||0,10)).toLocaleTimeString("vi-VN",{hour:"2-digit",minute:"2-digit",timeZone:"Asia/Ho_Chi_Minh"}),l=function(e,t){if("1"===t||"2"===t)switch(e){case"1":default:return{text:"Sắp diễn",isLive:!1,showScore:!1};case"2":return{text:"H1",isLive:!0,showScore:!0};case"3":return{text:"HT",isLive:!0,showScore:!0};case"4":return{text:"H2",isLive:!0,showScore:!0};case"5":return{text:"Phụ",isLive:!0,showScore:!0};case"7":return{text:"Pen",isLive:!0,showScore:!0};case"8":case"9":return{text:"FT",isLive:!1,showScore:!0}}switch(e){case"0":case"1":return{text:"Sắp diễn",isLive:!1,showScore:!1};case"51":return{text:"S1",isLive:!0,showScore:!0};case"52":return{text:"S2",isLive:!0,showScore:!0};case"53":return{text:"S3",isLive:!0,showScore:!0};case"54":return{text:"S4",isLive:!0,showScore:!0};case"55":return{text:"S5",isLive:!0,showScore:!0};case"100":case"90":case"91":case"110":return{text:"FT",isLive:!1,showScore:!0};default:return{text:"LIVE",isLive:!0,showScore:!0}}}(String(e.status_id),String(e.sport_id)),r=e.time_text||e.source_card_meta?.time_text||"",o=l.isLive,c=e.home_score??"-",d=e.away_score??"-",x=e.home_logo||n(),h=e.away_logo||n();return(0,a.jsxs)("a",{href:`/match/${encodeURIComponent(e.post_name||e.id)}`,className:"flex items-center w-full group border-b border-slate-100 bg-white hover:bg-[#4681E8]/5 transition-colors min-h-[64px]",children:[(0,a.jsx)("div",{className:`w-[60px] flex flex-col items-center justify-center shrink-0 h-full border-r ${o?"border-[#4681E8]/30 bg-[#4681E8]/5":"border-slate-100"}`,children:o?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"text-[#4681E8] font-bold text-[11px] uppercase tracking-wider tabular-nums leading-none",children:r||l.text}),(0,a.jsx)("span",{className:"w-1.5 h-1.5 rounded-full bg-[#4681E8] animate-pulse mt-1"})]}):(0,a.jsx)("span",{className:"text-slate-500 font-medium text-[12px]",children:s})}),(0,a.jsxs)("div",{className:"flex-1 flex flex-col justify-center px-3 py-2 gap-1.5 min-w-0",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between w-full",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2.5 min-w-0 overflow-hidden",children:[(0,a.jsx)("img",{src:x,alt:e.home_name,className:"w-4 h-4 shrink-0 object-contain",onError:e=>e.currentTarget.src=n(),loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-[13px] font-semibold truncate text-slate-800",children:e.home_name})]}),l.showScore&&(0,a.jsx)("span",{className:`text-[15px] font-black tabular-nums shrink-0 ml-2 ${o?"text-[#4681E8]":"text-slate-700"}`,children:c})]}),(0,a.jsxs)("div",{className:"flex items-center justify-between w-full",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2.5 min-w-0 overflow-hidden",children:[(0,a.jsx)("img",{src:h,alt:e.away_name,className:"w-4 h-4 shrink-0 object-contain",onError:e=>e.currentTarget.src=n(),loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-[13px] font-semibold truncate text-slate-800",children:e.away_name})]}),l.showScore&&(0,a.jsx)("span",{className:`text-[15px] font-black tabular-nums shrink-0 ml-2 ${o?"text-[#4681E8]":"text-slate-700"}`,children:d})]})]}),(0,a.jsx)("div",{className:"w-[48px] h-full flex items-center justify-center shrink-0 text-slate-300 group-hover:text-[#4681E8] transition-colors border-l border-slate-100",children:(0,a.jsx)("svg",{className:"w-5 h-5 fill-current",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{d:"M8 5v14l11-7z"})})})]})}let o=new Set(["1","2","3","4","5","7"]),c=new Set(["8","9","15"]),d=new Set(["51","52","53","54","5
8615","56","57","58","59"]),x=new Set(["100","90","91","92","93","110"]);function h(e){let t=String(e.status_id);return 2>=parseInt(e.sport_id)?o.has(t):d.has(t)}function m({matches:e,matchIndex:t}){let[s,n]=(0,l.useState)("1"),[o,d]=(0,l.useState)("all"),[p,u]=(0,l.useState)(1);(0,l.useEffect)(()=>{u(1)},[s,o]);let{todayStart:g,tomorrowStart:b,dayAfterStart:f}=(0,l.useMemo)(()=>{let e,t,s,{vnTodayStartUTC:a,vnTomorrowStartUTC:l,vnDayAfterStartUTC:r}=(s=(t=Math.floor(Date.UTC((e=new Date(Date.now()+252e5)).getUTCFullYear(),e.getUTCMonth(),e.getUTCDate())/1e3)-25200)+86400,{vnTodayStartUTC:t,vnTomorrowStartUTC:s,vnDayAfterStartUTC:s+86400});return{todayStart:a,tomorrowStart:l,dayAfterStart:r}},[]),j=(0,l.useMemo)(()=>new Map(e.map(e=>[e?.match_key?String(e.match_key):e?.ls_id?String(e.ls_id):e?.id?`${String(e.sport_id||"0")}:${String(e.id)}`:e?.scheduleId?`${String(e.sport_id||"0")}:schedule:${String(e.scheduleId)}`:[String(e?.sport_id||"0"),String(e?.time||"0"),String(e?.home_name||""),String(e?.away_name||"")].join(":"),e])),[e]),w=t?.summary_by_sport?.[s],v=t?.bucket_keys_by_sport?.[s],N=t?.bucket_pages_by_sport?.[s],y=e.filter(e=>{let t;return String(e.sport_id)===s&&(t=String(e.status_id),2>=parseInt(e.sport_id)?!c.has(t):!x.has(t))}),_=y.filter(e=>{let t=parseInt(e.time);return t>=g&&t<b}),k=y.filter(e=>{let t=parseInt(e.time);return t>=b&&t<f}),E={all:y.length,live:y.filter(e=>h(e)).length,hot:y.filter(e=>"1"===String(e.hot)).length,today:_.length,tomorrow:k.length},C=(0,l.useMemo)(()=>{if(v){if("all"===o&&Array.isArray(N?.all)&&N.all.length>0)return N.all.slice(0,p).flat().map(e=>j.get(e)).filter(Boolean);let e=v[o];if(Array.isArray(e))return e.map(e=>j.get(e)).filter(Boolean)}return"all"===o?y:"live"===o?y.filter(e=>h(e)):"hot"===o?y.filter(e=>"1"===String(e.hot)):"today"===o?_:"tomorrow"===o?k:y},[o,y,j,N,v,_,k,p]),S="all"===o&&Array.isArray(N?.all)&&p<N.all.length,L=(0,l.useMemo)(()=>"all"!==o&&"live"!==o&&"hot"!==o?[]:C.filter(e=>"1"===String(e.hot)||h(e)).slice(0,4),[C,o]),$=(0,l.useMemo)(()=>{let e=new Map;
861return C.forEach(t=>{let s=t.source_card_meta?.league_label||t.match_data?.competition_vi||t.match_data?.competition_name||t.match_data?.competition_full||"Giải đấu kh\xe1c";e.has(s)||e.set(s,[]),e.get(s).push(t)}),Array.from(e.entries())},[C]);return(0,a.jsxs)("div",{className:"w-full min-h-[500px]",children:[(0,a.jsx)(r,{activeSport:s,onSportChange:n,activeStatus:o,onStatusChange:d,matchesCount:w||E}),0===C.length?(0,a.jsx)("div",{className:"py-20 text-center",children:(0,a.jsx)("div",{className:"text-slate-400 text-base font-medium",children:"Kh\xf4ng c\xf3 trận đấu n\xe0o."})}):(0,a.jsxs)("div",{className:"flex flex-col gap-6",children:[L.length>0&&"all"===o&&(0,a.jsxs)("div",{className:"mb-4",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 mb-3 px-1",children:[(0,a.jsx)("span",{className:"w-2 h-4 rounded-full bg-[#4681E8]"}),(0,a.jsx)("h2",{className:"text-slate-800 font-black text-sm uppercase tracking-wider",children:"Trận đấu t\xe2m điểm"})]}),(0,a.jsx)("div",{className:"grid grid-cols-1 xl:grid-cols-2 gap-2",children:L.map((e,t)=>(0,a.jsx)(i,{match:e},`featured-${e.ls_id||e.id}-${t}`))})]}),(0,a.jsx)("div",{className:"flex flex-col gap-5",children:$.map(([e,t])=>{let s=t[0]?.match_data?.competition_logo;return(0,a.jsxs)("div",{className:"rounded-xl overflow-hidden border border-slate-200 bg-white shadow-sm",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2.5 bg-[#0E1B33] px-4 py-2.5 border-b border-[#0E1B33]",children:[s&&(0,a.jsx)("img",{src:s,alt:"league",className:"w-4 h-4 object-contain brightness-200 opacity-80",loading:"lazy",decoding:"async"}),(0,a.jsx)("h3",{className:"text-white text-[12px] font-bold uppercase tracking-wider truncate",children:e})]}),(0,a.jsx)("div",{className:"flex flex-col",children:t.map((e,t)=>(0,a.jsx)(i,{match:e},e.ls_id||`${e.id}-${t}`))})]},e)})}),S&&(0,a.jsx)("div",{className:"flex justify-center mt-6",children:(0,a.jsx)("button",{type:"button",onClick:()=>u(e=>e+1),className:"inline-flex items-center justify-center rounded-xl border border-[#4681E8]/30 bg-white px-8 py-3 text-[12px] font-bold uppercase tracking-wider text-[#4681E8] transition-all duration-200 hover:bg-[#4681E8] hover:text-white hover:border-[#4681E8]",children:"Tải th\xeam"})})]})]})}},87276:(e,t,s)=>{"use strict";s.d(t,{LiveMatchesClient:()=>m});var a=s(68019),l=s(10707);function r({activeSport:e,onSportChange:t,activeStatus:s,onStatusChange:l,matchesCount:n}){return(0,a.jsxs)("div",{className:"mb-5 flex flex-col gap-3",children:[(0,a.jsx)("div",{className:"flex items-center gap-2 overflow-x-auto pb-1 scrollbar-hide",children:[{id:"1",label:"B\xd3NG Đ\xc1",icon:"⚽"},{id:"2",label:"B\xd3NG RỔ",icon:"\uD83C\uDFC0"},{id:"5",label:"TENNIS",icon:"\uD83C\uDFBE"},{id:"4",label:"CẦU L\xd4NG",icon:"\uD83C\uDFF8"},{id:"3",label:"B\xd3NG CHUYỀN",icon:"\uD83C\uDFD0"},{id:"6",label:"B\xd3NG B\xc0N",icon:"\uD83C\uDFD3"}].map(s=>{let l=e===s.id;return(0,a.jsxs)("button",{type:"button",onClick:()=>t(s.id),className:`flex items-center gap-2 px-4 py-2.5 rounded-xl font-bold text-[12px] whitespace-nowrap transition-all duration-200 border cursor-pointer ${l?"bg-[#4681E8]/10 text-[#4681E8] border-[#4681E8]/40 shadow-[0_0_15px_rgba(70,129,232,0.1)]":"bg-white text-slate-500 border-slate-200 hover:text-slate-700 hover:border-[#4681E8]/30"}`,children:[(0,a.jsx)("span",{className:"text-[14px]",children:s.icon}),(0,a.jsx)("span",{className:"tracking-wider uppercase",children:s.label})]},s.id)})}),(0,a.jsx)("div",{className:"flex items-center gap-1 overflow-x-auto pb-1 scrollbar-hide bg-white rounded-xl p-1.5 border border-slate-200",children:[{id:"all",label:"TẤT CẢ",keyCount:"all"},{id:"live",label:"TRỰC TIẾP",keyCount:"live"},{id:"hot",label:"HOT",keyCount:"hot"},{id:"today",label:"H\xd4M NAY",keyCount:"today"},{id:"tomorrow",label:"NG\xc0Y MAI",keyCount:"tomorrow"}].map(e=>{let t=s===e.id,r=n[e.keyCount]||0;return(0,a.jsxs)("button",{type:"button",onClick:()=>l(e.id),className:`relative px-4 py-2 font-bold text-[12px] whitespace-nowrap transition-all duration-200 uppercase tracking-wider flex items-center gap-2 rounded-lg cursor-pointer ${t?"bg-[#4681E8]/10 text-[#4681E8] shadow-inner":"text-slate-500 hover:text-slate-700 hover:bg-[#4681E8]/5"}`,children:["live"===e.id&&t&&(0,a.jsx)("span",{className:"w-1.5 h-1.5 rounded-full bg-[#4681E8] animate-pulse shadow-[0_0_6px_rgba(70,129,232,0.8)]"}),(0,a.jsx)("span",{children:e.label}),(0,a.jsx)("span",{className:`px-1.5 py-0.5 rounded text-[10px] font-black ${t?"bg-[#4681E8]/20 text-[#4681E8]":"text-slate-400"}`,children:r})]},e.id)})})]})}function n(){return"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='10' fill='%2364748B' fill-opacity='0.18'/%3
861E%3C/svg%3E"}function i({match:e,isLoading:t=!1}){if(t||!e)return(0,a.jsx)("div",{className:"animate-pulse bg-white h-[64px] w-full border-b border-slate-100"});let s=new Date(1e3*parseInt(e.time||0,10)).toLocaleTimeString("vi-VN",{hour:"2-digit",minute:"2-digit",timeZone:"Asia/Ho_Chi_Minh"}),l=function(e,t){if("1"===t||"2"===t)switch(e){case"1":default:return{text:"Sắp diễn",isLive:!1,showScore:!1};case"2":return{text:"H1",isLive:!0,showScore:!0};case"3":return{text:"HT",isLive:!0,showScore:!0};case"4":return{text:"H2",isLive:!0,showScore:!0};case"5":return{text:"Phụ",isLive:!0,showScore:!0};case"7":return{text:"Pen",isLive:!0,showScore:!0};case"8":case"9":return{text:"FT",isLive:!1,showScore:!0}}switch(e){case"0":case"1":return{text:"Sắp diễn",isLive:!1,showScore:!1};case"51":return{text:"S1",isLive:!0,showScore:!0};case"52":return{text:"S2",isLive:!0,showScore:!0};case"53":return{text:"S3",isLive:!0,showScore:!0};case"54":return{text:"S4",isLive:!0,showScore:!0};case"55":return{text:"S5",isLive:!0,showScore:!0};case"100":case"90":case"91":case"110":return{text:"FT",isLive:!1,showScore:!0};default:return{text:"LIVE",isLive:!0,showScore:!0}}}(String(e.status_id),String(e.sport_id)),r=e.time_text||e.source_card_meta?.time_text||"",o=l.isLive,c=e.home_score??"-",d=e.away_score??"-",x=e.home_logo||n(),h=e.away_logo||n();return(0,a.jsxs)("a",{href:`/match/${encodeURIComponent(e.post_name||e.id)}`,className:"flex items-center w-full group border-b border-slate-100 bg-white hover:bg-[#4681E8]/5 transition-colors min-h-[64px]",children:[(0,a.jsx)("div",{className:`w-[60px] flex flex-col items-center justify-center shrink-0 h-full border-r ${o?"border-[#4681E8]/30 bg-[#4681E8]/5":"border-slate-100"}`,children:o?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"text-[#4681E8] font-bold text-[11px] uppercase tracking-wider tabular-nums leading-none",children:r||l.text}),(0,a.jsx)("span",{className:"w-1.5 h-1.5 rounded-full bg-[#4681E8] animate-pulse mt-1"})]}):(0,a.jsx)("span",{className:"text-slate-500 font-medium text-[12px]",children:s})}),(0,a.jsxs)("div",{className:"flex-1 flex flex-col justify-center px-3 py-2 gap-1.5 min-w-0",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between w-full",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2.5 min-w-0 overflow-hidden",children:[(0,a.jsx)("img",{src:x,alt:e.home_name,className:"w-4 h-4 shrink-0 object-contain",onError:e=>e.currentTarget.src=n(),loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-[13px] font-semibold truncate text-slate-800",children:e.home_name})]}),l.showScore&&(0,a.jsx)("span",{className:`text-[15px] font-black tabular-nums shrink-0 ml-2 ${o?"text-[#4681E8]":"text-slate-700"}`,children:c})]}),(0,a.jsxs)("div",{className:"flex items-center justify-between w-full",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2.5 min-w-0 overflow-hidden",children:[(0,a.jsx)("img",{src:h,alt:e.away_name,className:"w-4 h-4 shrink-0 object-contain",onError:e=>e.currentTarget.src=n(),loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-[13px] font-semibold truncate text-slate-800",children:e.away_name})]}),l.showScore&&(0,a.jsx)("span",{className:`text-[15px] font-black tabular-nums shrink-0 ml-2 ${o?"text-[#4681E8]":"text-slate-700"}`,children:d})]})]}),(0,a.jsx)("div",{className:"w-[48px] h-full flex items-center justify-center shrink-0 text-slate-300 group-hover:text-[#4681E8] transition-colors border-l border-slate-100",children:(0,a.jsx)("svg",{className:"w-5 h-5 fill-current",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{d:"M8 5v14l11-7z"})})})]})}let o=new Set(["1","2","3","4","5","7"]),c=new Set(["8","9","15"]),d=new Set(["51","52","53","54","55","56","57","58","59"]),x=new Set(["100","90","91","92","93","110"]);function h(e){let t=String(e.status_id);return 2>=parseInt(e.sport_id)?o.has(t):d.has(t)}function m({matches:e,matchIndex:t}){let[s,n]=(0,l.useState)("1"),[o,d]=(0,l.useState)("all"),[p,u]=(0,l.useState)(1);(0,l.useEffect)(()=>{u(1)},[s,o]);let{todayStart:g,tomorrowStart:b,dayAfterStart:f}=(0,l.useMemo)(()=>{let e,t,s,{vnTodayStartUTC:a,vnTomorrowStartUTC:l,vnDayAfterStartUTC:r}=(s=(t=Math.floor(Date.UTC((e=new Date(Date.now()+252e5)).getUTCFullYear(),e.getUTCMonth(),e.getUTCDate())/1e3)-25200)+86400,{vnTodayStartUTC:t,vnTomorrowStartUTC:s,vnDayAfterStartUTC:s+86400});return{todayStart:a,tomorrowStart:l,dayAfterStart:r}},[]),j=(0,l.useMemo)(()=>new Map(e.map(e=>[e?.match_key?String(e.match_key):e?.ls_id?String(e.ls_id):e?.id?`${String(e.sport_id||"0")}
861:${String(e.id)}`:e?.scheduleId?`${String(e.sport_id||"0")}:schedule:${String(e.scheduleId)}`:[String(e?.sport_id||"0"),String(e?.time||"0"),String(e?.home_name||""),String(e?.away_name||"")].join(":"),e])),[e]),w=t?.summary_by_sport?.[s],v=t?.bucket_keys_by_sport?.[s],N=t?.bucket_pages_by_sport?.[s],y=e.filter(e=>{let t;return String(e.sport_id)===s&&(t=String(e.status_id),2>=parseInt(e.sport_id)?!c.has(t):!x.has(t))}),_=y.filter(e=>{let t=parseInt(e.time);return t>=g&&t<b}),k=y.filter(e=>{let t=parseInt(e.time);return t>=b&&t<f}),E={all:y.length,live:y.filter(e=>h(e)).length,hot:y.filter(e=>"1"===String(e.hot)).length,today:_.length,tomorrow:k.length},C=(0,l.useMemo)(()=>{if(v){if("all"===o&&Array.isArray(N?.all)&&N.all.length>0)return N.all.slice(0,p).flat().map(e=>j.get(e)).filter(Boolean);let e=v[o];if(Array.isArray(e))return e.map(e=>j.get(e)).filter(Boolean)}return"all"===o?y:"live"===o?y.filter(e=>h(e)):"hot"===o?y.filter(e=>"1"===String(e.hot)):"today"===o?_:"tomorrow"===o?k:y},[o,y,j,N,v,_,k,p]),S="all"===o&&Array.isArray(N?.all)&&p<N.all.length,L=(0,l.useMemo)(()=>"all"!==o&&"live"!==o&&"hot"!==o?[]:C.filter(e=>"1"===String(e.hot)||h(e)).slice(0,4),[C,o]),$=(0,l.useMemo)(()=>{let e=new Map;
861return C.forEach(t=>{let s=t.source_card_meta?.league_label||t.match_data?.competition_vi||t.match_data?.competition_name||t.match_data?.competition_full||"Giải đấu kh\xe1c";e.has(s)||e.set(s,[]),e.get(s).push(t)}),Array.from(e.entries())},[C]);return(0,a.jsxs)("div",{className:"w-full min-h-[500px]",children:[(0,a.jsx)(r,{activeSport:s,onSportChange:n,activeStatus:o,onStatusChange:d,matchesCount:w||E}),0===C.length?(0,a.jsx)("div",{className:"py-20 text-center",children:(0,a.jsx)("div",{className:"text-slate-400 text-base font-medium",children:"Kh\xf4ng c\xf3 trận đấu n\xe0o."})}):(0,a.jsxs)("div",{className:"flex flex-col gap-6",children:[L.length>0&&"all"===o&&(0,a.jsxs)("div",{className:"mb-4",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 mb-3 px-1",children:[(0,a.jsx)("span",{className:"w-2 h-4 rounded-full bg-[#4681E8]"}),(0,a.jsx)("h2",{className:"text-slate-800 font-black text-sm uppercase tracking-wider",children:"Trận đấu t\xe2m điểm"})]}),(0,a.jsx)("div",{className:"grid grid-cols-1 xl:grid-cols-2 gap-2",children:L.map((e,t)=>(0,a.jsx)(i,{match:e},`featured-${e.ls_id||e.id}-${t}`))})]}),(0,a.jsx)("div",{className:"flex flex-col gap-5",children:$.map(([e,t])=>{let s=t[0]?.match_data?.competition_logo;return(0,a.jsxs)("div",{className:"rounded-xl overflow-hidden border border-slate-200 bg-white shadow-sm",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2.5 bg-[#0E1B33] px-4 py-2.5 border-b border-[#0E1B33]",children:[s&&(0,a.jsx)("img",{src:s,alt:"league",className:"w-4 h-4 object-contain brightness-200 opacity-80",loading:"lazy",decoding:"async"}),(0,a.jsx)("h3",{className:"text-white text-[12px] font-bold uppercase tracking-wider truncate",children:e})]}),(0,a.jsx)("div",{className:"flex flex-col",children:t.map((e,t)=>(0,a.jsx)(i,{match:e},e.ls_id||`${e.id}-${t}`))})]},e)})}),S&&(0,a.jsx)("div",{className:"flex justify-center mt-6",children:(0,a.jsx)("button",{type:"button",onClick:()=>u(e=>e+1),className:"inline-flex items-center justify-center rounded-xl border border-[#4681E8]/30 bg-white px-8 py-3 text-[12px] font-bold uppercase tracking-wider text-[#4681E8] transition-all duration-200 hover:bg-[#4681E8] hover:text-white hover:border-[#4681E8]",children:"Tải th\xeam"})})]})]})}},87967:(e,t,s)=>{"use strict";s.d(t,{Klivevip14SchedulePage:()=>d});var a=s(68019),l=s(10707),r=s(78637),n=s(41427);function i({html:e}){return e?.trim()?(0,a.jsx)("section",{className:"relative mt-10 mb-6",children:(0,a.jsx)("div",{className:"seo-prose relative",children:(0,a.jsx)("div",{dangerouslySetInnerHTML:{__html:e},className:"text-slate-600 text-[14px] leading-[1.85] px-1 [&_strong]:text-slate-900 [&_a]:text-[#4681E8]"})})}):null}s(36493);let o=`
862<h2>Lịch thi đấu b\xf3ng đ\xe1 - Cập nhật lịch b\xf3ng đ\xe1 h\xf4m nay nhanh v\xe0 ch\xednh x\xe1c</h2>
863
864<p>Để <strong>xem lịch thi đấu b\xf3ng đ\xe1</strong> nhanh, ch\xednh x\xe1c v\xe0 đầy đủ nhất, Klive ch\xednh l\xe0 nơi bạn n\xean chọn. Ch\xfang t\xf4i cập nhật lịch thi đấu cho to\xe0n bộ c\xe1c giải đấu trong nước v\xe0 quốc tế, gi\xfap bạn kh\xf4ng bỏ lỡ bất kỳ trận cầu hấp dẫn n\xe0o.</p>
865
866<img src="/images/seo/schedule-football.png" alt="Lịch thi đấu b\xf3ng đ\xe1 h\xf4m nay tại Klive" loading="lazy" />
867
868<div class="toc-box">
869  <h3>Nội dung ch\xednh</h3>
870  <ol>
871    <li>Lịch thi đấu b\xf3ng đ\xe1 trực tuyến h\xe0ng đầu</li>
872    <li>Lịch b\xf3ng đ\xe1 nhanh v\xe0 ch\xednh x\xe1c</li>
873    <li>Cập nhật lịch Ngoại Hạng Anh v\xe0 Champions League</li>
874    <li>C\xe1ch xem lịch thi đấu hiệu quả nhất</li>
875  </ol>
876</div>
877
878<h2>Lịch thi đấu b\xf3ng đ\xe1 trực tuyến h\xe0ng đầu</h2>
879<p>Trong thời đại số, kh\xf4ng ai c\xf2n xem lịch b\xf3ng đ\xe1 tr\xean TV hay b\xe1o giấy nữa. Tất cả đ\xe3 chuyển sang theo d\xf5i online, v\xe0 Klive ch\xednh l\xe0 nền tảng cập nhật lịch b\xf3ng đ\xe1 được đ\xe1nh gi\xe1 cao nhất.</p>
880
881<p>Khi truy cập Klive, bạn c\xf3 thể xem lịch thi đấu của bất kỳ giải đấu b\xf3ng đ\xe1 n\xe0o tr\xean thế giới một c\xe1ch ho\xe0n to\xe0n miễn ph\xed. Th\xf4ng tin lịch đấu được cập nhật sớm nhất v\xe0 chi tiết đến từng ph\xfat.</p>
882
883<h2>Lịch b\xf3ng đ\xe1 nhanh v\xe0 ch\xednh x\xe1c</h2>
884<p>Klive kh\xf4ng chỉ cung cấp lịch thi đấu c\xe1c giải đấu h\xe0ng đầu m\xe0 c\xf2n cập nhật lịch ph\xe1t s\xf3ng tr\xean c\xe1c k\xeanh truyền h\xecnh Việt Nam như K+, FPT Play, VTV Sports. Gi\xfap bạn biết trận n\xe0o được chiếu trực tiếp tr\xean TV v\xe0 sắp xếp thời gian hợp l\xfd.</p>
885
886<h2>Cập nhật lịch Ngoại Hạng Anh v\xe0 Champions League</h2>
887<p>Ngoại Hạng Anh v\xe0 Champions League l\xe0 hai giải đấu được quan t\xe2m nhất. Tại Klive, bạn lu\xf4n nắm được lịch đấu đầy đủ từ v\xf2ng bảng đến chung kết, k\xe8m theo th\xf4ng tin về đội h\xecnh dá»± kiến, phong độ v\xe0 lịch sá»­ đối đầu để chuẩn bị tốt nhất cho má
887»—i trận cầu.</p>
888
889<p>Kết hợp lịch thi đấu với trang trực tiếp b\xf3ng đ\xe1, bạn sẽ c\xf3 trải nghiệm theo d\xf5i b\xf3ng đ\xe1 ho\xe0n hảo nhất - biết trước, xem ngay, kh\xf4ng bỏ lỡ!</p>
890`;var c=s(6500);function d({initialData:e}){let t=(0,r.usePathname)(),[s,h]=(0,l.useState)(!1),[m,p]=(0,l.useState)(new Set),[u,g]=(0,l.useState)(""),[b,f]=(0,l.useState)(!1),[j,w]=(0,l.useState)(0),v=(0,l.useMemo)(()=>(0,c.p_)(e),[e]),N=v.dateTabs,y=(0,l.useMemo)(()=>{if(!v.selectedDate)return 0;let e=N.findIndex(e=>(e.dataValue||e.date)===v.selectedDate);return e>=0?e:0},[N,v.selectedDate]),[_,k]=(0,l.useState)(y),[E,C]=(0,l.useState)(v.leagues||[]),S=(0,l.useMemo)(()=>{if(!u)return E;let e=u.toLowerCase();return E.filter(t=>t.league_name.toLowerCase().includes(e)||t.matches.some(t=>t.home_team.toLowerCase().includes(e)||t.away_team.toLowerCase().includes(e)))},[E,u]),L=Math.max(0,N.length-7),$=N.slice(j,j+7),F=j>0,T=j<L,A=S.reduce((e,t)=>e+t.matches.length,0);return((0,l.useEffect)(()=>{if(!v.selectedDate||!N.length)return;let e=N.findIndex(e=>(e.dataValue||e.date)===v.selectedDate);e>=0&&k(e)},[N,v.selectedDate]),(0,l.useEffect)(()=>{_<j?w(Math.max(0,_)):_>=j+7&&w(Math.min(L,_-7+1))},[_,L,j]),e)?(0,a.jsxs)("div",{className:"max-w-[1440px] mx-auto px-4 py-8",children:[(0,a.jsx)(n.i,{eyebrow:"Lịch thi đấu",title:"LỊCH THI ĐẤU",rightSlot:(0,a.jsxs)("div",{className:"text-[12px] text-slate-500 font-bold uppercase tracking-wider",children:[(0,a.jsx)("span",{className:"text-[#E11D48] font-black",children:S.reduce((e,t)=>e+t.matches.length,0)})," trận đấu"]})}),(0,a.jsxs)("div",{className:"flex items-center mb-4 rounded-xl overflow-hidden border border-slate-200 bg-white shadow-sm",children:[(0,a.jsx)("button",{type:"button",disabled:!F,onClick:()=>w(e=>Math.max(0,e-1)),className:`flex items-center justify-center w-8 h-[52px] bg-slate-100 border-r border-slate-200 text-slate-600 hover:text-slate-800 hover:bg-slate-200 transition-all shrink-0 ${!F?"opacity-30":"cursor-pointer"}`,children:(0,a.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2.5,d:"M15 19l-7-7 7-7"})})}),(0,a.jsx)("div",{className:"flex flex-1",children:$.map((e,s)=>{let l=j+s;return(0,a.jsxs)("button",{type:"button",onClick:()=>(e=>{let s=N[e];if(!s||e===_)return;let a=s.dataValue||s.date;a&&(k(e),p(new Set),h(!0),window.history.replaceState(null,"",`${t}?date=${encodeURIComponent(a)}`),fetch(`/api/socolive/fixtures?date=${encodeURIComponent(a)}`,{cache:"no-store"}).then(e=>e.ok?e.json():null).then(e=>{e&&C((0,c.p_)(e).leagues||[])}).finally(()=>h(!1)))})(l),className:`flex-1 flex flex-col items-center justify-center h-[52px] border-b-[3px] transition-all duration-300 ${_===l?"border-[#4681E8] text-[#4681E8] bg-[#4681E8]/5":"border-transparent text-[#64748B] hover:text-[#94A3B8] hover:bg-slate-100"}`,children:[(0,a.jsx)("span",{className:`text-[11px] font-bold uppercase tracking-widest ${_===l?"text-[#4681E8]":""}`,children:e.label}),(0,a.jsx)("span",{className:`text-[12px] font-mono mt-0.5 ${_===l?"text-slate-800 font-black":""}`,children:e.date})]},`tab-${l}`)})}),(0,a.jsx)("button",{type:"button",disabled:!T,onClick:()=>w(e=>Math.min(L,e+1)),className:`flex items-center justify-center w-8 h-[52px] bg-slate-100 border-l border-slate-200 text-slate-600 hover:text-slate-800 hover:bg-slate-200 transition-all shrink-0 ${!T?"opacity-30":"cursor-pointer"}`,children:(0,a.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2.5,d:"M9 5l7 7-7 7"})})})]}),(0,a.jsxs)("div",{className:"relative mb-4",children:[(0,a.jsxs)("button",{onClick:()=>f(!b),className:"flex items-center gap-3 bg-white hover:bg-slate-50 px-4 py-2.5 rounded-xl border border-slate-200 shadow-sm transition-all text-sm group",children:[(0,a.jsx)("svg",{className:"w-5 h-5 text-[#E11D48] transition-colors group-hover:text-[#F43F5E]",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 6h16M4 12h16M4 18h16"})}),(0,a.jsx)("span",{className:"text-slate-700 font-bold text-[13px] uppercase tracking-wide",children:"Danh s\xe1ch giải đấu"}),(0,a.jsx)("svg",{className:`w-4 h-4 text-slate-500 transition-transform duration-300 ${b?"rotate-180":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),b&&(0,a.jsxs)("div",{className:"absolute top-full left-0 mt-2 w-[360px] bg-white border border-slate-200 rounded-2xl shadow-[0_24px_80px_rgba(0,0,0,0.12)] z-50 max-h-[320px] overflow-hidden flex flex-col",children:[(0,a.jsx)("div",{className:"p-2 border-b border-slate-100",children:(0,a.jsx)("input",{type:"text",placeholder:"T\xecm giải đấu...",value:u,onChange:e=>g(e.target.value),className:"w-full bg-slate-50 border border-transparent roun
890ded-xl px-4 py-2.5 text-sm text-slate-800 placeholder-slate-400 outline-none focus:border-[#4681E8]/50 transition-colors"})}),(0,a.jsx)("div",{className:"overflow-y-auto flex-1 py-2",children:E.map((e,t)=>(0,a.jsxs)("button",{type:"button",onClick:()=>{g(e.league_name),f(!1)},className:"w-full flex items-center gap-3 px-4 py-2.5 hover:bg-slate-50 text-left text-[13px] transition-colors",children:[e.league_icon?(0,a.jsx)("img",{src:e.league_icon,alt:e.league_name||"League",className:"w-5 h-5 object-contain shrink-0",loading:"lazy",decoding:"async"}):(0,a.jsx)("div",{className:"w-5 h-5 rounded-md bg-slate-200 shrink-0"}),(0,a.jsx)("span",{className:"text-slate-600 truncate flex-1 font-medium",children:e.league_name}),(0,a.jsx)("span",{className:"text-[11px] text-[#E11D48] font-bold shrink-0 px-2 py-0.5 bg-[#E11D48]/10 rounded-md border border-[#E11D48]/20",children:e.matches.length})]},t))})]})]}),(0,a.jsxs)("div",{className:"grid grid-cols-[1fr_60px_55px_100px_100px_90px] bg-slate-50 border border-slate-200 rounded-t-xl px-4 py-3 text-[11px] text-slate-500 font-black uppercase tracking-widest shadow-inner",children:[(0,a.jsx)("span",{children:"Trận đấu"}),(0,a.jsx)("span",{className:"text-center",children:"Tỷ số"}),(0,a.jsx)("span",{className:"text-center",children:"Hiệp 1"}),(0,a.jsx)("span",{className:"text-center",children:"Cược chấp"}),(0,a.jsx)("span",{className:"text-center",children:"T\xe0i/Xỉu"}),(0,a.jsx)("span",{className:"text-center",children:"1 X 2"})]}),(0,a.jsxs)("div",{className:"border border-slate-200 border-t-0 rounded-b-xl overflow-hidden relative shadow-[0_8px_30px_rgba(0,0,0,0.06)]",children:[s&&(0,a.jsx)("div",{className:"absolute inset-0 z-10 bg-white/80 backdrop-blur-[2px]",children:(0,a.jsx)("div",{className:"space-y-0",children:[...Array(6)].map((e,t)=>(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 px-4 py-3.5 bg-slate-100 border-b border-slate-200",children:[(0,a.jsx)("div",{className:"w-4 h-4 rounded bg-slate-300 animate-pulse"}),(0,a.jsx)("div",{className:"h-3.5 rounded bg-slate-200 animate-pulse",style:{width:`${120+30*t}px`}})]}),[void 0,void 0].map((e,t)=>(0,a.jsxs)("div",{className:"grid grid-cols-[1fr_60px_55px_100px_100px_90px] items-center px-4 py-3 border-b border-slate-100",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)("div",{className:"w-10 h-3.5 rounded bg-slate-200 animate-pulse"}),(0,a.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,a.jsx)("div",{className:"h-3 w-24 rounded bg-slate-100 animate-pulse"}),(0,a.jsx)("div",{className:"h-3 w-20 rounded bg-slate-100 animate-pulse"})]})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5",children:[(0,a.jsx)("div",{className:"h-3 w-5 rounded bg-slate-100 animate-pulse"}),(0,a.jsx)("div",{className:"h-3 w-5 rounded bg-slate-100 animate-pulse"})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5",children:[(0,a.jsx)("div",{className:"h-3 w-5 rounded bg-slate-100 animate-pulse"}),(0,a.jsx)("div",{className:"h-3 w-5 rounded bg-slate-100 animate-pulse"})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5",children:[(0,a.jsx)("div",{className:"h-3 w-14 rounded bg-slate-100 animate-pulse"}),(0,a.jsx)("div",{className:"h-3 w-10 rounded bg-slate-100 animate-pulse"})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5",children:[(0,a.jsx)("div",{className:"h-3 w-14 rounded bg-slate-100 animate-pulse"}),(0,a.jsx)("div",{className:"h-3 w-10 rounded bg-slate-100 animate-pulse"})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5",children:[(0,a.jsx)("div",{className:"h-3 w-10 rounded bg-slate-100 animate-pulse"}),(0,a.jsx)("div",{className:"h-3 w-10 rounded bg-slate-100 animate-pulse"}),(0,a.jsx)("div",{className:"h-3 w-10 rounded bg-slate-100 animate-pulse"})]})]},t))]},t))})}),0!==S.length||s?S.map((e,t)=>(0,a.jsxs)("div",{id:`league-${t}`,children:[(0,a.jsxs)("button",{onClick:()=>{p(e=>{let s=new Set(e);return s.has(t)?s.delete(t):s.add(t),s})},className:"w-full flex items-center gap-3 px-4 py-3 bg-slate-50 hover:bg-slate-100 border-b border-slate-100 transition-colors text-left group",children:[(0,a.jsx)("svg",{className:`w-4 h-4 text-[#E11D48] transition-transform duration-300 shrink-0 ${m.has(t)?"-rotate-90":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2.5,d:"M19 9l-7 7-7-7"})}),e.league_icon&&(0,a.jsx)("div",{className:"w-6 h-6 rounded-full bg-slate-100 p-0.5 border border-slate-200 flex items-center justify-center shadow-sm",children:(0,a.jsx)("img",{src:e.league_icon,alt:e.league_name||"League",className:"w-4 h-4 object-contain shrink-0",loading:"lazy",decoding:"async"})}),(0,a.jsx)("span",{className:"text-[13px] font-bold text-slate-700 flex-1 truncate uppercase tracking-widest",children:e.league_name}),(0,a.jsxs)("span",{className:"text-[11px] text-[#E11D48] font-bold shrink-0 ml-1 px-2 py-0.5 bg-[#E11D48]/10 rounded border border-[#
890E11D48]/20 group-hover:bg-[#E11D48]/20 transition-colors",children:["BXH ",(0,a.jsx)("svg",{className:"inline w-3 h-3 ml-0.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 6h16M4 10h16M4 14h16M4 18h16"})})]})]}),!m.has(t)&&e.matches.map((e,t)=>(0,a.jsxs)("div",{className:"grid grid-cols-[1fr_60px_55px_100px_100px_90px] items-center px-4 py-3 bg-transparent hover:bg-slate-50 border-b border-slate-100 last:border-0 transition-colors group cursor-default",children:[(0,a.jsxs)("div",{className:"flex items-center gap-4 min-w-0",children:[(0,a.jsx)("span",{className:"text-[#E11D48] font-mono text-[13px] font-black min-w-[42px] shrink-0 drop-shadow-[0_0_4px_rgba(225,29,72,0.4)]",children:e.time}),(0,a.jsxs)("div",{className:"flex flex-col gap-1 min-w-0 flex-1",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[e.home_logo&&(0,a.jsx)("img",{src:e.home_logo,alt:e.home_team||"Home team",className:"w-4 h-4 object-contain shrink-0 filter drop-shadow-[0_2px_2px_rgba(0,0,0,0.8)]",loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-[13px] text-slate-700 font-medium truncate group-hover:text-slate-900 transition-colors",children:e.home_team})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[e.away_logo&&(0,a.jsx)("img",{src:e.away_logo,alt:e.away_team||"Away team",className:"w-4 h-4 object-contain shrink-0",loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-[13px] text-slate-700 font-medium truncate group-hover:text-slate-900 transition-colors",children:e.away_team})]})]})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center",children:[(0,a.jsx)("span",{className:"text-[12px] text-[var(--accent-cyan)] font-mono font-bold",children:"-"!==e.score?e.score:"-"}),(0,a.jsx)("span",{className:"text-[12px] text-[#64748B]",children:"-"})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center",children:[(0,a.jsx)("span",{className:"text-[12px] text-[#64748B]",children:"-"}),(0,a.jsx)("span",{className:"text-[12px] text-[#64748B]",children:"-"})]}),(0,a.jsx)(x,{values:e.handicap,hasLine:!0}),(0,a.jsx)(x,{values:e.over_under,hasLine:!0}),(0,a.jsx)("div",{className:"flex flex-col items-center gap-0",children:e.one_x_two?.length>0?e.one_x_two.map((e,t)=>(0,a.jsx)("span",{className:"text-[11px] text-slate-500 leading-[18px]",children:e||"-"},t)):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"text-[11px] text-[#64748B] leading-[18px]",children:"-"}),(0,a.jsx)("span",{className:"text-[11px] text-[#64748B] leading-[18px]",children:"-"}),(0,a.jsx)("span",{className:"text-[11px] text-[#64748B] leading-[18px]",children:"-"})]})})]},t))]},t)):(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center py-20 gap-3 bg-slate-50",children:[(0,a.jsx)("svg",{className:"w-12 h-12 text-slate-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",strokeWidth:1.5,children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6.75 3v2.25M17.25 3v2.25M3 18.75V7.5a2.25 2.25 0 012.25-2.25h13.5A2.25 2.25 0 0121 7.5v11.25m-18 0A2.25 2.25 0 005.25 21h13.5A2.25 2.25 0 0021 18.75m-18 0v-7.5A2.25 2.25 0 015.25 9h13.5A2.25 2.25 0 0121 11.25v7.5"})}),(0,a.jsx)("span",{className:"text-slate-500 font-medium tracking-wide",children:"Kh\xf4ng c\xf3 trận đấu n\xe0o cho ng\xe0y n\xe0y"}),(0,a.jsx)("span",{className:"text-slate-400 text-[12px]",children:"H\xe3y thử chọn một ng\xe0y kh\xe1c"})]})]}),(0,a.jsxs)("div",{className:"mt-6 text-center text-[11px] text-[#64748B] uppercase tracking-widest font-bold drop-shadow-sm",children:["Tổng cộng ",A," trận đấu trong ",S.length," giải"]}),(0,a.jsx)(i,{html:o})]}):(0,a.jsxs)("div",{className:"max-w-[1440px] mx-auto px-4 py-8",children:[(0,a.jsx)(n.i,{eyebrow:"Lịch thi đấu",title:"LỊCH THI ĐẤU"}),(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center py-16 gap-4",children:[(0,a.jsx)("div",{className:"w-12 h-12 rounded-full border-2 border-[#E11D48]/30 border-t-[#E11D48] animate-spin"}),(0,a.jsx)("span",{className:"text-slate-500 text-sm font-medium tracking-wide",children:"Đang tải lịch thi đấu..."})]})]})}function x({values:e,hasLine:t}){return e&&0!==e.length?t&&e.length>=3?(0,a.jsxs)("div",{className:"flex flex-col items-center gap-0",children:[(0,a.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,a.jsx)("span",{className:"text-[11px] text-[#E11D48] leading-[18px] font-bold",children:e[0]}),(0,a.jsx)("span",{className:"text-[11px] text-slate-500 leading-[18px]",children:e[1]})]}),(0,a.jsx)("span",{className:"text-[11px] text-slate-500 leading-[18px]",children:e[2]})]}):(0,a.jsx)("div",{className:"flex flex-col items-center gap-0",children:e.map((e,t)=>(0,a.jsx)("span",{className:"text-[11px] text-slate-500 leading-[18px]",children:e||"-"},t))}):(0,a.jsxs)("div",{className:"flex flex-col items-center",children:[(0,a.jsx)("span",{className:"text-[11px] text-[#64748B] leading-[18px]",children:"-"}),(0,a.jsx)("span",{className:"text-[11px] text-[#64748B] leading-[18px]",children:"-"})]})}},88344:()=>{},88410:(e,t,s)=>{"use strict";s.d(t,{Klivevip20SchedulePage:()=>d});var a=s(68019),l=s(10707),r=s(78637),n=s(96007);function i({html:e}){return e?.trim()?(0,a.jsx)("section",{className:"relative mt-10 mb-6",children:(0,a.jsx)("div",{className:"seo-prose relative",children:(0,a.jsx)("div",{dangerouslySetInnerHTML:{__html:e},className:"text-slate-600 text-[14px] leading-[1.85] px-1 [&_strong]:text-slate-900 [&_a]:text-[#4681E8]"})})}):null}s(76122);let o=`
891<h2>Lịch thi đấu b\xf3ng đ\xe1 - Cập nhật lịch b\xf3ng đ\xe1 h\xf4m nay nhanh v\xe0 ch\xednh x\xe1c</h2>
892
893<p>Để <strong>xem lịch thi đấu b\xf3ng đ\xe1</strong> nhanh, ch\xednh x\xe1c v\xe0 đầy đủ nhất, Klive ch\xednh l\xe0 nơi bạn n\xean chọn. Ch\xfang t\xf4i cập nhật lịch thi đấu cho to\xe0n bộ c\xe1c giải đấu trong nước v\xe0 quốc tế, gi\xfap bạn kh\xf4ng bỏ lỡ bất kỳ trận cầu hấp dẫn n\xe0o.</p>
894
895<img src="/images/seo/schedule-football.png" alt="Lịch thi đấu b\xf3ng đ\xe1 h\xf4m nay tại Klive" loading="lazy" />
896
897<div class="toc-box">
898  <h3>Nội dung ch\xednh</h3>
899  <ol>
900    <li>Lịch thi đấu b\xf3ng đ\xe1 trực tuyến h\xe0ng đầu</li>
901    <li>Lịch b\xf3ng đ\xe1 nhanh v\xe0 ch\xednh x\xe1c</li>
902    <li>Cập nhật lịch Ngoại Hạng Anh v\xe0 Champions League</li>
903    <li>C\xe1ch xem lịch thi đấu hiệu quả nhất</li>
904  </ol>
905</div>
906
907<h2>Lịch thi đấu b\xf3ng đ\xe1 trực tuyến h\xe0ng đầu</h2>
908<p>Trong thời đại số, kh\xf4ng ai c\xf2n xem lịch b\xf3ng đ\xe1 tr\xean TV hay b\xe1o giấy nữa. Tất cả đ\xe3 chuyển sang theo d\xf5i online, v\xe0 Klive ch\xednh l\xe0 nền tảng cập nhật lịch b\xf3ng đ\xe1 được đ\xe1nh gi\xe1 cao nhất.</p>
909
910<p>Khi truy cập Klive, bạn c\xf3 thể xem lịch thi đấu của bất kỳ giải đấu b\xf3ng đ\xe1 n\xe0o tr\xean thế giới một c\xe1ch ho\xe0n to\xe0n miễn ph\xed. Th\xf4ng tin lịch đấu được cập nhật sớm nhất v\xe0 chi tiết đến từng ph\xfat.</p>
911
912<h2>Lịch b\xf3ng đ\xe1 nhanh v\xe0 ch\xednh x\xe1c</h2>
913<p>Klive kh\xf4ng chỉ cung cấp lịch thi đấu c\xe1c giải đấu h\xe0ng đầu m\xe0 c\xf2n cập nhật lịch ph\xe1t s\xf3ng tr\xean c\xe1c k\xeanh truyền h\xecnh Việt Nam như K+, FPT Play, VTV Sports. Gi\xfap bạn biết trận n\xe0o được chiếu trực tiếp tr\xean TV v\xe0 sắp xếp thời gian hợp l\xfd.</p>
914
915<h2>Cập nhật lịch Ngoại Hạng Anh v\xe0 Champions League</h2>
916<p>Ngoại Hạng Anh v\xe0 Champions League l\xe0 hai giải đấu được quan t\xe2m nhất. Tại Klive, bạn lu\xf4n nắm được lịch đấu đầy đủ từ v\xf2ng bảng đến chung kết, k\xe8m theo th\xf4ng tin về đội h\xecnh dá»± kiến, phong độ v\xe0 lịch sá»­ đối đầu để chuẩn bị tốt nhất cho má
916»—i trận cầu.</p>
917
918<p>Kết hợp lịch thi đấu với trang trực tiếp b\xf3ng đ\xe1, bạn sẽ c\xf3 trải nghiệm theo d\xf5i b\xf3ng đ\xe1 ho\xe0n hảo nhất - biết trước, xem ngay, kh\xf4ng bỏ lỡ!</p>
919`;var c=s(35559);function d({initialData:e}){let t=(0,r.usePathname)(),[s,h]=(0,l.useState)(!1),[m,p]=(0,l.useState)(new Set),[u,g]=(0,l.useState)(""),[b,f]=(0,l.useState)(!1),[j,w]=(0,l.useState)(0),v=(0,l.useMemo)(()=>(0,c.p_)(e),[e]),N=v.dateTabs,y=(0,l.useMemo)(()=>{if(!v.selectedDate)return 0;let e=N.findIndex(e=>(e.dataValue||e.date)===v.selectedDate);return e>=0?e:0},[N,v.selectedDate]),[_,k]=(0,l.useState)(y),[E,C]=(0,l.useState)(v.leagues||[]),S=(0,l.useMemo)(()=>{if(!u)return E;let e=u.toLowerCase();return E.filter(t=>t.league_name.toLowerCase().includes(e)||t.matches.some(t=>t.home_team.toLowerCase().includes(e)||t.away_team.toLowerCase().includes(e)))},[E,u]),L=Math.max(0,N.length-7),$=N.slice(j,j+7),F=j>0,T=j<L,A=S.reduce((e,t)=>e+t.matches.length,0);return((0,l.useEffect)(()=>{if(!v.selectedDate||!N.length)return;let e=N.findIndex(e=>(e.dataValue||e.date)===v.selectedDate);e>=0&&k(e)},[N,v.selectedDate]),(0,l.useEffect)(()=>{_<j?w(Math.max(0,_)):_>=j+7&&w(Math.min(L,_-7+1))},[_,L,j]),e)?(0,a.jsxs)("div",{className:"max-w-[1440px] mx-auto px-4 py-8",children:[(0,a.jsx)(n.v,{eyebrow:"Lịch thi đấu",title:"LỊCH THI ĐẤU",rightSlot:(0,a.jsxs)("div",{className:"text-[12px] text-slate-500 font-bold uppercase tracking-wider",children:[(0,a.jsx)("span",{className:"text-[#E11D48] font-black",children:S.reduce((e,t)=>e+t.matches.length,0)})," trận đấu"]})}),(0,a.jsxs)("div",{className:"flex items-center mb-4 rounded-xl overflow-hidden border border-slate-200 bg-white shadow-sm",children:[(0,a.jsx)("button",{type:"button",disabled:!F,onClick:()=>w(e=>Math.max(0,e-1)),className:`flex items-center justify-center w-8 h-[52px] bg-slate-100 border-r border-slate-200 text-slate-600 hover:text-slate-800 hover:bg-slate-200 transition-all shrink-0 ${!F?"opacity-30":"cursor-pointer"}`,children:(0,a.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2.5,d:"M15 19l-7-7 7-7"})})}),(0,a.jsx)("div",{className:"flex flex-1",children:$.map((e,s)=>{let l=j+s;return(0,a.jsxs)("button",{type:"button",onClick:()=>(e=>{let s=N[e];if(!s||e===_)return;let a=s.dataValue||s.date;a&&(k(e),p(new Set),h(!0),window.history.replaceState(null,"",`${t}?date=${encodeURIComponent(a)}`),fetch(`/api/socolive/fixtures?date=${encodeURIComponent(a)}`,{cache:"no-store"}).then(e=>e.ok?e.json():null).then(e=>{e&&C((0,c.p_)(e).leagues||[])}).finally(()=>h(!1)))})(l),className:`flex-1 flex flex-col items-center justify-center h-[52px] border-b-[3px] transition-all duration-300 ${_===l?"border-[#4681E8] text-[#4681E8] bg-[#4681E8]/5":"border-transparent text-[#64748B] hover:text-[#94A3B8] hover:bg-slate-100"}`,children:[(0,a.jsx)("span",{className:`text-[11px] font-bold uppercase tracking-widest ${_===l?"text-[#4681E8]":""}`,children:e.label}),(0,a.jsx)("span",{className:`text-[12px] font-mono mt-0.5 ${_===l?"text-slate-800 font-black":""}`,children:e.date})]},`tab-${l}`)})}),(0,a.jsx)("button",{type:"button",disabled:!T,onClick:()=>w(e=>Math.min(L,e+1)),className:`flex items-center justify-center w-8 h-[52px] bg-slate-100 border-l border-slate-200 text-slate-600 hover:text-slate-800 hover:bg-slate-200 transition-all shrink-0 ${!T?"opacity-30":"cursor-pointer"}`,children:(0,a.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2.5,d:"M9 5l7 7-7 7"})})})]}),(0,a.jsxs)("div",{className:"relative mb-4",children:[(0,a.jsxs)("button",{onClick:()=>f(!b),className:"flex items-center gap-3 bg-white hover:bg-slate-50 px-4 py-2.5 rounded-xl border border-slate-200 shadow-sm transition-all text-sm group",children:[(0,a.jsx)("svg",{className:"w-5 h-5 text-[#E11D48] transition-colors group-hover:text-[#F43F5E]",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 6h16M4 12h16M4 18h16"})}),(0,a.jsx)("span",{className:"text-slate-700 font-bold text-[13px] uppercase tracking-wide",children:"Danh s\xe1ch giải đấu"}),(0,a.jsx)("svg",{className:`w-4 h-4 text-slate-500 transition-transform duration-300 ${b?"rotate-180":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),b&&(0,a.jsxs)("div",{className:"absolute top-full left-0 mt-2 w-[360px] bg-white border border-slate-200 rounded-2xl shadow-[0_24px_80px_rgba(0,0,0,0.12)] z-50 max-h-[320px] overflow-hidden flex flex-col",children:[(0,a.jsx)("div",{className:"p-2 border-b border-slate-100",children:(0,a.jsx)("input",{type:"text",placeholder:"T\xecm giải đấu...",value:u,onChange:e=>g(e.target.value),className:"w-full bg-slate-50 border border-transparent roun
919ded-xl px-4 py-2.5 text-sm text-slate-800 placeholder-slate-400 outline-none focus:border-[#4681E8]/50 transition-colors"})}),(0,a.jsx)("div",{className:"overflow-y-auto flex-1 py-2",children:E.map((e,t)=>(0,a.jsxs)("button",{type:"button",onClick:()=>{g(e.league_name),f(!1)},className:"w-full flex items-center gap-3 px-4 py-2.5 hover:bg-slate-50 text-left text-[13px] transition-colors",children:[e.league_icon?(0,a.jsx)("img",{src:e.league_icon,alt:e.league_name||"League",className:"w-5 h-5 object-contain shrink-0",loading:"lazy",decoding:"async"}):(0,a.jsx)("div",{className:"w-5 h-5 rounded-md bg-slate-200 shrink-0"}),(0,a.jsx)("span",{className:"text-slate-600 truncate flex-1 font-medium",children:e.league_name}),(0,a.jsx)("span",{className:"text-[11px] text-[#E11D48] font-bold shrink-0 px-2 py-0.5 bg-[#E11D48]/10 rounded-md border border-[#E11D48]/20",children:e.matches.length})]},t))})]})]}),(0,a.jsxs)("div",{className:"grid grid-cols-[1fr_60px_55px_100px_100px_90px] bg-slate-50 border border-slate-200 rounded-t-xl px-4 py-3 text-[11px] text-slate-500 font-black uppercase tracking-widest shadow-inner",children:[(0,a.jsx)("span",{children:"Trận đấu"}),(0,a.jsx)("span",{className:"text-center",children:"Tỷ số"}),(0,a.jsx)("span",{className:"text-center",children:"Hiệp 1"}),(0,a.jsx)("span",{className:"text-center",children:"Cược chấp"}),(0,a.jsx)("span",{className:"text-center",children:"T\xe0i/Xỉu"}),(0,a.jsx)("span",{className:"text-center",children:"1 X 2"})]}),(0,a.jsxs)("div",{className:"border border-slate-200 border-t-0 rounded-b-xl overflow-hidden relative shadow-[0_8px_30px_rgba(0,0,0,0.06)]",children:[s&&(0,a.jsx)("div",{className:"absolute inset-0 z-10 bg-white/80 backdrop-blur-[2px]",children:(0,a.jsx)("div",{className:"space-y-0",children:[...Array(6)].map((e,t)=>(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 px-4 py-3.5 bg-slate-100 border-b border-slate-200",children:[(0,a.jsx)("div",{className:"w-4 h-4 rounded bg-slate-300 animate-pulse"}),(0,a.jsx)("div",{className:"h-3.5 rounded bg-slate-200 animate-pulse",style:{width:`${120+30*t}px`}})]}),[void 0,void 0].map((e,t)=>(0,a.jsxs)("div",{className:"grid grid-cols-[1fr_60px_55px_100px_100px_90px] items-center px-4 py-3 border-b border-slate-100",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)("div",{className:"w-10 h-3.5 rounded bg-slate-200 animate-pulse"}),(0,a.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,a.jsx)("div",{className:"h-3 w-24 rounded bg-slate-100 animate-pulse"}),(0,a.jsx)("div",{className:"h-3 w-20 rounded bg-slate-100 animate-pulse"})]})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5",children:[(0,a.jsx)("div",{className:"h-3 w-5 rounded bg-slate-100 animate-pulse"}),(0,a.jsx)("div",{className:"h-3 w-5 rounded bg-slate-100 animate-pulse"})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5",children:[(0,a.jsx)("div",{className:"h-3 w-5 rounded bg-slate-100 animate-pulse"}),(0,a.jsx)("div",{className:"h-3 w-5 rounded bg-slate-100 animate-pulse"})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5",children:[(0,a.jsx)("div",{className:"h-3 w-14 rounded bg-slate-100 animate-pulse"}),(0,a.jsx)("div",{className:"h-3 w-10 rounded bg-slate-100 animate-pulse"})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5",children:[(0,a.jsx)("div",{className:"h-3 w-14 rounded bg-slate-100 animate-pulse"}),(0,a.jsx)("div",{className:"h-3 w-10 rounded bg-slate-100 animate-pulse"})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5",children:[(0,a.jsx)("div",{className:"h-3 w-10 rounded bg-slate-100 animate-pulse"}),(0,a.jsx)("div",{className:"h-3 w-10 rounded bg-slate-100 animate-pulse"}),(0,a.jsx)("div",{className:"h-3 w-10 rounded bg-slate-100 animate-pulse"})]})]},t))]},t))})}),0!==S.length||s?S.map((e,t)=>(0,a.jsxs)("div",{id:`league-${t}`,children:[(0,a.jsxs)("button",{onClick:()=>{p(e=>{let s=new Set(e);return s.has(t)?s.delete(t):s.add(t),s})},className:"w-full flex items-center gap-3 px-4 py-3 bg-slate-50 hover:bg-slate-100 border-b border-slate-100 transition-colors text-left group",children:[(0,a.jsx)("svg",{className:`w-4 h-4 text-[#E11D48] transition-transform duration-300 shrink-0 ${m.has(t)?"-rotate-90":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2.5,d:"M19 9l-7 7-7-7"})}),e.league_icon&&(0,a.jsx)("div",{className:"w-6 h-6 rounded-full bg-slate-100 p-0.5 border border-slate-200 flex items-center justify-center shadow-sm",children:(0,a.jsx)("img",{src:e.league_icon,alt:e.league_name||"League",className:"w-4 h-4 object-contain shrink-0",loading:"lazy",decoding:"async"})}),(0,a.jsx)("span",{className:"text-[13px] font-bold text-slate-700 flex-1 truncate uppercase tracking-widest",children:e.league_name}),(0,a.jsxs)("span",{className:"text-[11px] text-[#E11D48] font-bold shrink-0 ml-1 px-2 py-0.5 bg-[#E11D48]/10 rounded border border-[#
919E11D48]/20 group-hover:bg-[#E11D48]/20 transition-colors",children:["BXH ",(0,a.jsx)("svg",{className:"inline w-3 h-3 ml-0.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 6h16M4 10h16M4 14h16M4 18h16"})})]})]}),!m.has(t)&&e.matches.map((e,t)=>(0,a.jsxs)("div",{className:"grid grid-cols-[1fr_60px_55px_100px_100px_90px] items-center px-4 py-3 bg-transparent hover:bg-slate-50 border-b border-slate-100 last:border-0 transition-colors group cursor-default",children:[(0,a.jsxs)("div",{className:"flex items-center gap-4 min-w-0",children:[(0,a.jsx)("span",{className:"text-[#E11D48] font-mono text-[13px] font-black min-w-[42px] shrink-0 drop-shadow-[0_0_4px_rgba(225,29,72,0.4)]",children:e.time}),(0,a.jsxs)("div",{className:"flex flex-col gap-1 min-w-0 flex-1",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[e.home_logo&&(0,a.jsx)("img",{src:e.home_logo,alt:e.home_team||"Home team",className:"w-4 h-4 object-contain shrink-0 filter drop-shadow-[0_2px_2px_rgba(0,0,0,0.8)]",loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-[13px] text-slate-700 font-medium truncate group-hover:text-slate-900 transition-colors",children:e.home_team})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[e.away_logo&&(0,a.jsx)("img",{src:e.away_logo,alt:e.away_team||"Away team",className:"w-4 h-4 object-contain shrink-0",loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-[13px] text-slate-700 font-medium truncate group-hover:text-slate-900 transition-colors",children:e.away_team})]})]})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center",children:[(0,a.jsx)("span",{className:"text-[12px] text-[var(--accent-cyan)] font-mono font-bold",children:"-"!==e.score?e.score:"-"}),(0,a.jsx)("span",{className:"text-[12px] text-[#64748B]",children:"-"})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center",children:[(0,a.jsx)("span",{className:"text-[12px] text-[#64748B]",children:"-"}),(0,a.jsx)("span",{className:"text-[12px] text-[#64748B]",children:"-"})]}),(0,a.jsx)(x,{values:e.handicap,hasLine:!0}),(0,a.jsx)(x,{values:e.over_under,hasLine:!0}),(0,a.jsx)("div",{className:"flex flex-col items-center gap-0",children:e.one_x_two?.length>0?e.one_x_two.map((e,t)=>(0,a.jsx)("span",{className:"text-[11px] text-slate-500 leading-[18px]",children:e||"-"},t)):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"text-[11px] text-[#64748B] leading-[18px]",children:"-"}),(0,a.jsx)("span",{className:"text-[11px] text-[#64748B] leading-[18px]",children:"-"}),(0,a.jsx)("span",{className:"text-[11px] text-[#64748B] leading-[18px]",children:"-"})]})})]},t))]},t)):(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center py-20 gap-3 bg-slate-50",children:[(0,a.jsx)("svg",{className:"w-12 h-12 text-slate-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",strokeWidth:1.5,children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6.75 3v2.25M17.25 3v2.25M3 18.75V7.5a2.25 2.25 0 012.25-2.25h13.5A2.25 2.25 0 0121 7.5v11.25m-18 0A2.25 2.25 0 005.25 21h13.5A2.25 2.25 0 0021 18.75m-18 0v-7.5A2.25 2.25 0 015.25 9h13.5A2.25 2.25 0 0121 11.25v7.5"})}),(0,a.jsx)("span",{className:"text-slate-500 font-medium tracking-wide",children:"Kh\xf4ng c\xf3 trận đấu n\xe0o cho ng\xe0y n\xe0y"}),(0,a.jsx)("span",{className:"text-slate-400 text-[12px]",children:"H\xe3y thử chọn một ng\xe0y kh\xe1c"})]})]}),(0,a.jsxs)("div",{className:"mt-6 text-center text-[11px] text-[#64748B] uppercase tracking-widest font-bold drop-shadow-sm",children:["Tổng cộng ",A," trận đấu trong ",S.length," giải"]}),(0,a.jsx)(i,{html:o})]}):(0,a.jsxs)("div",{className:"max-w-[1440px] mx-auto px-4 py-8",children:[(0,a.jsx)(n.v,{eyebrow:"Lịch thi đấu",title:"LỊCH THI ĐẤU"}),(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center py-16 gap-4",children:[(0,a.jsx)("div",{className:"w-12 h-12 rounded-full border-2 border-[#E11D48]/30 border-t-[#E11D48] animate-spin"}),(0,a.jsx)("span",{className:"text-slate-500 text-sm font-medium tracking-wide",children:"Đang tải lịch thi đấu..."})]})]})}function x({values:e,hasLine:t}){return e&&0!==e.length?t&&e.length>=3?(0,a.jsxs)("div",{className:"flex flex-col items-center gap-0",children:[(0,a.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,a.jsx)("span",{className:"text-[11px] text-[#E11D48] leading-[18px] font-bold",children:e[0]}),(0,a.jsx)("span",{className:"text-[11px] text-slate-500 leading-[18px]",children:e[1]})]}),(0,a.jsx)("span",{className:"text-[11px] text-slate-500 leading-[18px]",children:e[2]})]}):(0,a.jsx)("div",{className:"flex flex-col items-center gap-0",children:e.map((e,t)=>(0,a.jsx)("span",{className:"text-[11px] text-slate-500 leading-[18px]",children:e||"-"},t))}):(0,a.jsxs)("div",{className:"flex flex-col items-center",children:[(0,a.jsx)("span",{className:"text-[11px] text-[#64748B] leading-[18px]",children:"-"}),(0,a.jsx)("span",{className:"text-[11px] text-[#64748B] leading-[18px]",children:"-"})]})}},88435:(e,t,s)=>{"use strict";s.d(t,{H:()=>r});var a=s(68019),l=s(70508);
919function r({eyebrow:e,title:t,titleAddon:s,rightSlot:n,className:i}){return(0,a.jsx)("div",{className:(0,l.cn)("relative mb-5 overflow-hidden border-b border-slate-200",i),children:(0,a.jsxs)("div",{className:"flex items-center justify-between px-1 py-4 min-h-[56px]",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 min-w-0",children:[(0,a.jsx)("span",{className:"h-8 w-1 shrink-0 rounded-sm bg-gradient-to-b from-[#4681E8] to-[#55CAF1] shadow-[0_0_10px_rgba(70,129,232,0.5)]"}),(0,a.jsxs)("div",{className:"min-w-0",children:[e&&(0,a.jsx)("div",{className:"text-[10px] font-bold uppercase tracking-[0.2em] text-[#4681E8]/60 mb-0.5",children:e}),(0,a.jsxs)("div",{className:"flex items-center gap-2.5 flex-wrap",children:[(0,a.jsx)("h1",{className:"text-[18px] sm:text-[22px] font-black uppercase tracking-tight text-slate-800 leading-none",children:t}),s]})]})]}),n&&(0,a.jsx)("div",{className:"hidden sm:flex items-center gap-2 text-right shrink-0 ml-4",children:n})]})})}},88512:(e,t,s)=>{"use strict";s.d(t,{Klivevip05MatchDetailPage:()=>m});var a=s(68019),l=s(10707),r=s(58420);function n({src:e,poster:t,autoPlay:s=!0,onError:i,className:o=""}){let c=(0,l.useRef)(null),d=(0,l.useRef)(i);d.current=i;let[x,h]=(0,l.useState)(!1),[m,p]=(0,l.useState)(!1);return((0,l.useEffect)(()=>{let t=c.current;if(!t)return;let a=null;h(!1);let l=()=>p(!0),n=()=>p(!1);t.addEventListener("play",l),t.addEventListener("pause",n);let i=()=>{s&&(t.muted=!0,t.play().catch(()=>{}))};if(t.addEventListener("canplay",i),r.Ay.isSupported()){(a=new r.Ay({maxBufferLength:30,maxMaxBufferLength:60,lowLatencyMode:!0,enableWorker:!0})).loadSource(e),a.attachMedia(t),a.on(r.Ay.Events.MANIFEST_PARSED,()=>{s&&(t.muted=!0,t.play().catch(e=>{console.warn("AutoPlay failed:",e),t.muted=!1}))});let l=0,n=0;a.on(r.Ay.Events.ERROR,(e,t)=>{if(t.type===r.Ay.ErrorTypes.NETWORK_ERROR&&(++l>2||t.response&&t.response.code>=400)){console.error("HLS Network Error threshold reached (CORS/404), triggering fallback.",t),h(!0),d.current&&d.current(t),a?.destroy();return}if(t.fatal)switch(t.type){case r.Ay.ErrorTypes.NETWORK_ERROR:console.error("HLS Fatal Network Error, recovering...",t),a?.startLoad();break;case r.Ay.ErrorTypes.MEDIA_ERROR:console.error("HLS Media Error, recovering...",t),++n>3?(console.error("HLS Media Error threshold reached, triggering fallback."),h(!0),d.current&&d.current(t),a?.destroy()):a?.recoverMediaError();break;default:console.error("HLS Fatal Error:",t),h(!0),d.current&&d.current(t),a?.destroy()}})}else t.canPlayType("application/vnd.apple.mpegurl")&&(t.src=e,t.addEventListener("loadedmetadata",()=>{s&&t.play().catch(e=>{console.warn("AutoPlay failed:",e)})}),t.addEventListener("error",e=>{h(!0),d.current&&d.current(e)}));return()=>{t.removeEventListener("play",l),t.removeEventListener("pause",n),t.removeEventListener("canplay",i),a&&a.destroy()}},[e,s]),x)?i?null:(0,a.jsxs)("div",{className:`w-full h-full flex flex-col items-center justify-center bg-white/80 backdrop-blur ${o}`,children:[(0,a.jsx)("svg",{className:"w-12 h-12 text-red-500 mb-4 opacity-80",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"})}),(0,a.jsx)("div",{className:"text-slate-600 text-sm font-medium",children:"Video/Stream kh\xf4ng khả dụng hoặc bị lỗi mạng"}),(0,a.jsx)("div",{className:"text-gray-500 text-xs mt-1",children:"Vui l\xf2ng thử lại sau hoặc chọn nguồn kh\xe1c"})]}):(0,a.jsx)("div",{className:`relative group w-full h-full bg-white flex items-center justify-center overflow-hidden ${o}`,children:(0,a.jsx)("video",{ref:c,className:"w-full h-full object-contain",controls:!0,playsInline:!0,muted:s,poster:t,referrerPolicy:"no-referrer"})})}function i(e){let t=(e||"").split(/[\s-]+/).slice(0,2).map(e=>e[0]||"").join("").toUpperCase()||"??";return`data:image/svg+xml,${encodeURIComponent(`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 80 80"><rect width="80" height="80" rx="20" fill="#1a1c25"/><text x="40" y="47" font-size="20" font-family="Arial" font-weight="700" text-anchor="middle" fill="#666">${t}</text></svg>`)}`}function o({homeName:e,awayName:t,homeLogo:s,awayLogo:l,homeScore:r="0",awayScore:n="0",statusText:c="LIVE",timeText:d="",isLive:x=!0,sportId:h="1",matchId:m}){let p=s||i(e),u=l||i(t),g="5"===String(h),b="2"===String(h),f="bg-slate-200 border-slate-200",j="repeating-linear-gradient(90deg, transparent, transparent 10%, #000 10%, #000 20%)";return g?(f="bg-slate-100 border-slate-200",j="none"):b&&(f="bg-[#bc7a46] border-[#8a4e21]",j="repeating-linear-gradient(90deg, transparent, transparent 5%, #000 5%, #000 10%)"),(0,a.jsxs)("div",{className:"relative w-full aspect-video min-h-[300px] max-h-[600px] bg-slate-50 overflow-hidden flex flex-col justify-center",children:[(0,a.jsx)("div",{className:"absolute inset-0 flex items-center justify-center pointer-events-none mt-16 md:mt-24",children:(0,a.jsx)("div",{className:"relative w-[120%] h-[120%] sm:w-[90%] sm:h-[120%] max-w-[900px] flex-shrink-0 transition-transform duration-1000",style:{transform:"perspective(900px) rotateX(60deg) scale(0.9)",transformOrigin:"center center"},children:(0,a.jsxs)("div",{className:`absolute inset-0 ${f} shadow-[0_30px_60px_rgba(0,0,0,0.8)] border-4 rounded-xl overflow-hidden flex transition-colors duration-500`,children:[(0,a.jsx)("div",{className:"absolute inset-0 opacity-15 pointer-events-none",style:{backgroundImage:j}}),(0,a.jsxs)("div",{className:"absolute inset-[4%] pointer-events-none shadow-sm flex items-center justify-center",children:["1"===String(h)&&(0,a.jsxs)("div",{className:"absolute inset-0 w-full h-full border-2 border-white/60",children:[(0,a.jsx)("div",{className:"absolute left-1/2 top-0 bottom-0 w-0 border-l-2 border-white/60 -translate-x-1/2"}),(0,a.jsx)("div",{className:"absolute left-1/2 top-1/2 w-[18%] aspect-square rounded-full border-2 border-white/60 -translate-x-1/2 -translate-y-1/2"}),(0,a.jsx)("div",{className:"absolute left-1/2 top-1/2 w-2 h-2 rounded-full bg-white/80 -translate-x-1/2 -translate-y-1/2"}),(0,a.jsx)("div",{className:"absolute left-0 top-1/2 w-[16%] h-[46%] border-2 border-l-0 border-white/60 -translate-y-1/2 bg-slate-200"}),(0,a.jsx)("div",{className:"absolute left-0 top-1/2 w-[6%] h-[20%] border-2 border-l-0 border-white/60 -translate-y-1/2 bg-slate-200"}),(0,a.jsx)("div",{className:"absolute left-[16%] top-1/2 w-[8%] aspect-square border-2 border-l-0 border-white/60 rounded-r-full -translate-y-1/2 clip-path-half",style:{clipPath:"inset(0 0 0 50%)"}}),(0,a.jsx)("div",{className:"absolute right-0 top-1/2 w-[16%] h-[46%] border-2 border-r-0 border-white/60 -translate-y-1/2 bg-slate-200"}),(0,a.jsx)("div",{className:"absolute right-0 top-1/2 w-[6%] h-[20%] border-2 border-r-0 border-white/60 -translate-y-1/2 bg-slate-200"}),(0,a.jsx)("div",{className:"absolute right-[16%] top-1/2 w-[8%] aspect-square border-2 border-r-0 border-white/60 rounded-l-full -translate-y-1/2 clip-path-half",style:{clipPath:"inset(0 50% 0 0)"}})]}),g&&(0,a.jsxs)("div",{className:"absolute inset-[10%] w-[80%] h-[80%
919] border-2 border-white/80 bg-white",children:[(0,a.jsx)("div",{className:"absolute top-[10%] bottom-[10%] left-0 right-0 border-y-2 border-white/80"}),(0,a.jsx)("div",{className:"absolute left-1/2 top-[-2%] bottom-[-2%] w-1 bg-white/40 shadow-xl -translate-x-1/2 z-10"}),(0,a.jsx)("div",{className:"absolute left-[25%] right-[25%] top-[10%] bottom-[10%] border-x-2 border-white/80"}),(0,a.jsx)("div",{className:"absolute left-[25%] right-[25%] top-1/2 w-[50%] border-t-2 border-white/80 -translate-y-1/2"}),(0,a.jsx)("div",{className:"absolute left-0 top-1/2 w-[2%] border-t-2 border-white/80 -translate-y-1/2"}),(0,a.jsx)("div",{className:"absolute right-0 top-1/2 w-[2%] border-t-2 border-white/80 -translate-y-1/2"})]}),b&&(0,a.jsxs)("div",{className:"absolute inset-0 w-full h-full border-2 border-white/50",children:[(0,a.jsx)("div",{className:"absolute left-1/2 top-0 bottom-0 w-0 border-l-2 border-white/50 -translate-x-1/2"}),(0,a.jsx)("div",{className:"absolute left-1/2 top-1/2 w-[15%] aspect-square rounded-full border-2 border-white/50 -translate-x-1/2 -translate-y-1/2"}),(0,a.jsx)("div",{className:"absolute left-0 top-1/2 w-[18%] h-[35%] border-2 border-l-0 border-white/50 -translate-y-1/2 bg-[#bc7a46]"}),(0,a.jsx)("div",{className:"absolute left-[18%] top-1/2 w-[10%] aspect-square rounded-full border-2 border-white/50 -translate-y-1/2"}),(0,a.jsx)("div",{className:"absolute left-0 top-1/2 w-[30%] h-[70%] border-2 border-l-0 border-white/50 rounded-r-full -translate-y-1/2 opacity-60"}),(0,a.jsx)("div",{className:"absolute right-0 top-1/2 w-[18%] h-[35%] border-2 border-r-0 border-white/50 -translate-y-1/2 bg-[#bc7a46]"}),(0,a.jsx)("div",{className:"absolute right-0 top-1/2 w-[30%] h-[70%] border-2 border-r-0 border-white/50 rounded-l-full -translate-y-1/2 opacity-60"})]})]}),x&&(0,a.jsx)("div",{className:`absolute left-1/2 top-1/2 shadow-[0_8px_16px_rgba(0,0,0,0.8)] z-10 transition-all duration-[3000ms] border-2 border-white/20 rounded-full
920                                ${g?"w-2 h-2 sm:w-3 sm:h-3 bg-[#ccff00]":b?"w-4 h-4 sm:w-6 sm:h-6 bg-[#d95d16]":"w-4 h-4 sm:w-5 sm:h-5 bg-white"}`,style:{animation:"ballMove 8s infinite alternate ease-in-out",transform:"translate(-50%, -50%)"},children:(0,a.jsx)("div",{className:"absolute -bottom-4 left-1/2 w-4 h-2 bg-white/40 rounded-full blur-sm -translate-x-1/2"})}),x&&(0,a.jsxs)("div",{className:"absolute left-[65%] top-[60%] flex flex-col items-center animate-bounce-slow",style:{animation:"floatBubble 4s infinite alternate ease-in-out"},children:[(0,a.jsxs)("div",{className:"bg-white/95 backdrop-blur border border-white/10 rounded-2xl p-2 shadow-2xl flex items-center gap-3 w-max max-w-[200px]",children:[(0,a.jsx)("div",{className:"w-6 h-6 rounded-full flex items-center justify-center p-0.5 bg-white/5 shrink-0",children:(0,a.jsx)("img",{src:p,alt:e||"Home team",className:"max-w-full max-h-full object-contain",onError:t=>t.target.src=i(e),loading:"lazy",decoding:"async"})}),(0,a.jsx)("div",{className:"flex flex-col pr-1 overflow-hidden",children:(0,a.jsx)("span",{className:"text-slate-900 font-bold text-[10px] sm:text-xs tracking-wide truncate",children:g?"Serve / Return":"Tấn c\xf4ng nguy hiểm"})})]}),(0,a.jsx)("div",{className:"w-0 h-0 border-l-[6px] border-r-[6px] border-t-[6px] border-l-transparent border-r-transparent border-t-[#1a1c28]/95 mt-[-1px]"})]})]})})}),(0,a.jsx)("div",{className:"relative z-20 flex-1 flex flex-col items-center justify-start p-4 md:p-6 pointer-events-none w-full",children:(0,a.jsxs)("div",{className:"w-full max-w-[800px] flex items-center justify-between px-4 sm:px-6 py-3 rounded-xl bg-gradient-to-r from-[#0d0f14]/90 via-[#151821]/95 to-[#0d0f14]/90 backdrop-blur-xl border border-white/10 shadow-[0_10px_40px_rgba(0,0,0,0.8)] pointer-events-auto",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 flex-1 min-w-0 pr-2",children:[(0,a.jsx)("img",{src:p,alt:e,className:"w-8 h-8 md:w-12 md:h-12 object-contain drop-shadow-lg shrink-0",onError:t=>t.target.src=i(e),loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-slate-900 text-xs sm:text-sm md:text-base font-bold truncate tracking-wide",children:e})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1 shrink-0 px-2 sm:px-6 min-w-[100px]",children:[(0,a.jsxs)("span",{className:`inline-flex items-center gap-1.5 px-2.5 py-0.5 rounded-full text-[10px] sm:text-xs font-bold shadow-inner ${x?"bg-green-500/10 text-green-400 border border-green-500/20":"bg-white/5 text-slate-900/40"}`,children:[x&&(0,a.jsx)("span",{className:"w-1.5 h-1.5 rounded-full bg-green-500 animate-pulse shadow-[0_0_8px_#22c55e]"}),d||c]}),(0,a.jsxs)("div",{className:"flex gap-3 sm:gap-5 items-center justify-center",children:[(0,a.jsx)("span",{className:"text-slate-900 text-2xl sm:text-4xl font-black drop-shadow-md",children:r}),(0,a.jsx)("span",{className:"text-slate-900/30 text-xl font-light",children:"-"}),(0,a.jsx)("span",{className:"text-slate-900 text-2xl sm:text-4xl font-black drop-shadow-md",children:n})]})]}),(0,a.jsxs)("div",{className:"flex items-center justify-end gap-3 flex-1 min-w-0 pl-2 text-right",children:[(0,a.jsx)("span",{className:"text-slate-900 text-xs sm:text-sm md:text-base font-bold truncate tracking-wide",children:t}),(0,a.jsx)("img",{src:u,alt:t,className:"w-8 h-8 md:w-12 md:h-12 object-contain drop-shadow-lg shrink-0",onError:e=>e.target.src=i(t),loading:"lazy",decoding:"async"})]})]})}),(0,a.jsx)("div",{className:"relative z-20 mt-auto w-full p-4 flex justify-center pointer-events-none",children:(0,a.jsx)("div",{className:"w-full max-w-[600px] h-6 bg-white/40 backdrop-blur-md rounded-full border border-white/5 flex items-center px-4",children:(0,a.jsxs)("div",{className:"flex-1 h-0.5 bg-white/10 relative rounded-full",children:[x&&(0,a.jsx)("div",{className:"absolute left-0 top-0 bottom-0 bg-gradient-to-r from-[#b38b22] to-[#ffda6a] w-[65%] rounded-full opacity-90 shadow-[0_0_12px_#daa520]"}),(0,a.jsx)("span",{className:"absolute left-[65%] top-1/2 -translate-y-1/2 -translate-x-1/2 w-1.5 h-1.5 rounded-full bg-white shadow-md"})]})})}),(0,a.jsx)("style",{children:`
921                @keyframes ballMove {
922                    0% { transform: translate(-30%, -20%) scale(1); }
923                    25% { transform: translate(40%, -10%) scale(1.1); }
924                    50% { transform: translate(20%, 30%) scale(0.9); }
925                    75% { transform: translate(-10%, 15%) scale(1.2); }
926                    100% { transform: translate(-45%, 0%) scale(1); }
927                }
928                @keyframes floatBubble {
929                    0% { transform: translateY(0px) translateX(0px); }
930                    50% { transform: translateY(-8px) translateX(4px); }
931                    100% { transform: translateY(4px) translateX(-4px); }
932                }
933            `})]})}function c(e,t){if("1"===t||"2"===t)switch(e){case"2":return{t:"HT 1",live:!0,sc:!0};case"3":return{t:"Giữa giờ",live:!0,sc:!0};case"4":return{t:"HT 2",live:!0,sc:!0};case"5":return{t:"Hiệp phụ",live:!0,sc:!0};case"7":return{t:"Penalty",live:!0,sc:!0};case"8":case"9":return{t:"Kết th\xfac",live:!1,sc:!0};default:return{t:"Chưa bắt đầu",live:!1,sc:!1}}
933return["51","52","53","54","55"].includes(e)?{t:`Set ${e-50}`,live:!0,sc:!0}:["100","90","110"].includes(e)?{t:"KT",live:!1,sc:!0}:"0"===e||"1"===e?{t:"Chưa bắt đầu",live:!1,sc:!1}:{t:"LIVE",live:!0,sc:!0}}function d(e){let t=(e||"").split(/[\s-]+/).slice(0,2).map(e=>e[0]||"").join("").toUpperCase()||"??";return`data:image/svg+xml,${encodeURIComponent(`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 80 80"><rect width="80" height="80" rx="20" fill="#1a1c25"/><text x="40" y="47" font-size="20" font-family="Arial" font-weight="700" text-anchor="middle" fill="#666">${t}</text></svg>`)}`}function x(e){let t=new Date(1e3*parseInt(e||"0",10));return{hm:t.toLocaleTimeString("vi-VN",{hour:"2-digit",minute:"2-digit",timeZone:"Asia/Ho_Chi_Minh"}),dm:t.toLocaleDateString("vi-VN",{day:"2-digit",month:"2-digit",timeZone:"Asia/Ho_Chi_Minh"}),full:t.toLocaleDateString("vi-VN",{day:"2-digit",month:"2-digit",year:"numeric",timeZone:"Asia/Ho_Chi_Minh"})}}let h="max-w-[1200px]";function m({matchData:e,relatedMatches:t,matchDetails:s,standings:r,brandingNameUpper:i}){let p,u,g,j,v,y,[C,S]=(0,l.useState)("odds"),L=e?.match_data?.anchors||[],[$,F]=(0,l.useState)(!1),[T,A]=(0,l.useState)(!1),[M,H]=(0,l.useState)(null),[D,B]=(0,l.useState)(!1),z=(0,l.useRef)(0);(0,l.useEffect)(()=>{if(!e?.has_live||"1"!==e.has_live||0===L.length)return;let t=!1;B(!0);let s=async t=>{let s=t?.uid,a=`/api/socolive/proxy-stream?url=${encodeURIComponent(`https://live.inplyr.com/${s?`room/${s}`:`default/${e.id}`}.m3u8`)}`;try{let e=await fetch(a,{method:"GET",cache:"no-store"});if(!e.ok)return null;let s=(await e.text()).split("\n").filter(e=>e.trim()&&!e.startsWith("#"));if(0===s.length)return null;return(await fetch(s[0],{method:"HEAD",cache:"no-store"})).ok?t:null}catch{return null}};return Promise.all(L.map(e=>s(e))).then(e=>{if(t)return;let s=e.find(e=>null!==e);s?(H(s),F(!0),A(!1)):(H(L[0]),A(!0)),B(!1)}),()=>{t=!0}},[e?.has_live,L.length]),(0,l.useEffect)(()=>{if(!T||D||z.current>=20)return;let t=setTimeout(()=>{z.current++,A(!1),B(!0);let t=async t=>{let s=t?.uid,a=`/api/socolive/proxy-stream?url=${encodeURIComponent(`https://live.inplyr.com/${s?`room/${s}`:`default/${e.id}`}.m3u8`)}`;try{let e=await fetch(a,{method:"GET",cache:"no-store"});if(!e.ok)return null;let s=(await e.text()).split("\n").filter(e=>e.trim()&&!e.startsWith("#"));if(0===s.length)return null;return(await fetch(s[0],{method:"HEAD",cache:"no-store"})).ok?t:null}catch{return null}};Promise.all(L.map(e=>t(e))).then(e=>{let t=e.find(e=>null!==e);t?(H(t),F(!0),A(!1)):A(!0),B(!1)})},15e3);return()=>clearTimeout(t)},[T,D]);let[I,R]=(0,l.useState)(null),U=e?.post_name||e?.ls_id||e?.id;if(window.location.origin,(0,l.useEffect)(()=>{if(!U)return;let e=setInterval(async()=>{try{let e=await fetch(`/api/klivevip/match/${U}`,{cache:"no-store"});if(e.ok){let t=await e.json();R(t?.match??null)}}catch{}},1e4);return()=>clearInterval(e)},[U]),!e)return(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center py-32 gap-4",children:[(0,a.jsx)("span",{className:"text-[#64748B] text-lg",children:"Kh\xf4ng t\xecm thấy trận đấu"}),(0,a.jsx)("a",{href:"/",className:"text-[#4681E8] hover:underline text-sm",children:"← Quay lại"})]});let G=I?{...e,...I}:e,P=G?.has_live==="1"&&L.length>0,K=c(G.status_id,G.sport_id),V=$&&M&&!T&&!D,W=P&&(D||T&&K.live&&z.current<20),O=!P||T&&!W&&!D,q=!K.live&&"8"!==String(G.status_id)&&"9"!==String(G.status_id),{hm:X,full:Y}=x(G.time),Z=G.source_card_meta?.league_label||G.match_data?.competition_vi||G.match_data?.competition_full||"",Q=G.match_data?.stage_label||G.source_card_meta?.stage_label||"",J=G.home_logo||d(G.home_name),ee=G.away_logo||d(G.away_name),et=e=>t=>{t.target.src=d(e)};return(0,a.jsxs)("div",{className:"w-full bg-white min-h-screen text-slate-600 font-sans pb-16",children:[(0,a.jsx)("div",{className:"w-full border-b border-slate-200 bg-white",children:(0,a.jsxs)("div",{className:`${h} mx-auto px-4 py-3 flex items-center justify-between`,children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 text-[13px] font-bold",children:[(0,a.jsx)("span",{className:"text-[#4681E8] uppercase tracking-wide",children:Z}),Q&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"text-slate-300",children:"•"}),(0,a.jsx)("span",{className:"text-slate-600",children:Q})]})]}),(0,a.jsx)("div",{className:"text-[12px] font-mono text-slate-400 hidden sm:block",children:Y})]})}),(0,a.jsxs)("div",{className:`${h} mx-auto px-0 md:px-4 py-0 md:py-6 flex flex-col lg:flex-row gap-4 lg:gap-6`,children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0 flex flex-col gap-4 lg:gap-6",children:[(0,a.jsxs)("div",{className:"w-full relative bg-[#000000] rounded-none md:rounded-2xl overflow-hidden shadow-[0_10px_40px_rgba(0,0,0,0.5)] border-y md:border border-slate-200",children:[(0,a.jsx)("div",{className:"relative w-full aspect-video bg-[#000000] group z-10",children:V?(0,a.jsx)(n,{src:`/api/klivevip/proxy-stream?url=${encodeURIComponent(`https://live.inplyr.com/${M?.uid&&"default"!==M.uid?`room/${M.uid}`:`default/${G.id}`}.m3u8`)}`,autoPlay:!0,onError:()=>A(!0)}):O?(0,a.jsx)(o,{homeName:G.home_name,awayName:G.away_name,homeLogo:G.home_logo,awayLogo:G.away_logo,homeScore:K.sc?G.home_score:"0",awayScore:K.sc?G.away_score:"0",statusText:K.t,timeText:G.time_text||X,isLive:K.live,sportId:G.sport_id,matchId:G.ls_id||G.id,kickoffMs:1e3*Number(G?.time||0),isPreMatch:q}):(0,a.jsxs)("div",{className:"absolute inset-0 z-10 flex flex-col items-center justify-center p-4 lg:p-10",children:[(0,a.jsxs)("div",{className:"absolute inset-0 flex justify-between items-center opacity-[0.03] pointer-events-none px-4 lg:px-20 overflow-hidden",children:[(0,a.jsx)("img",{src:J,alt:"",className:"w-1/2 max-w-[400px] blur-[10px]",loading:"lazy",decoding:"async"}),(0,a.jsx)("img",{src:ee,alt:"",className:"w-1/2 max-w-[400px] blur-[10px]",loading:"lazy",decoding:"async"})]}),P&&!T&&(0,a.jsx)("button",{onClick:()=>F(!0),className:"group mb-4 sm:mb-8 w-16 h-16 md:w-20 md:h-20 rounded-full bg-[#4681E8] flex items-center justify-center hover:bg-[#55CAF1] transition-all shadow-[0_0_30px_rgba(70,129,232,0.5)] curs
933or-pointer z-20",children:(0,a.jsx)("svg",{className:"w-8 h-8 md:w-10 md:h-10 text-white ml-1.5 md:ml-2 group-hover:scale-110 transition-transform",viewBox:"0 0 24 24",fill:"currentColor",children:(0,a.jsx)("path",{d:"M8 5v14l11-7z"})})}),(0,a.jsxs)("div",{className:"grid grid-cols-[1fr_auto_1fr] items-center w-full max-w-[800px] gap-2 lg:gap-8 z-20",children:[(0,a.jsxs)("div",{className:"flex flex-col items-center gap-2 lg:gap-4",children:[(0,a.jsx)("img",{src:J,alt:G.home_name,className:"w-16 h-16 sm:w-24 sm:h-24 lg:w-32 lg:h-32 object-contain drop-shadow-[0_10px_20px_rgba(0,0,0,0.8)]",onError:et(G.home_name),loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-[#FFFFFF] text-xs sm:text-base lg:text-lg font-black text-center line-clamp-2 uppercase tracking-wide",children:G.home_name})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-2 lg:gap-3",children:[K.sc?(0,a.jsxs)("div",{className:"flex items-center gap-3 lg:gap-6 bg-white/90 backdrop-blur-md px-4 py-2 lg:px-8 lg:py-4 rounded-2xl border border-slate-200 shadow-2xl",children:[(0,a.jsx)("span",{className:"text-[#4681E8] text-[32px] sm:text-[48px] lg:text-[64px] font-black leading-none",children:G.home_score}),(0,a.jsx)("span",{className:"text-slate-300 text-[20px] lg:text-[28px] font-light",children:":"}),(0,a.jsx)("span",{className:"text-[#4681E8] text-[32px] sm:text-[48px] lg:text-[64px] font-black leading-none",children:G.away_score})]}):(0,a.jsx)("div",{className:"text-[#FFFFFF] text-[32px] sm:text-[48px] lg:text-[56px] font-black tracking-widest leading-none drop-shadow-xl",children:X}),(0,a.jsxs)("span",{className:`inline-flex items-center gap-2 rounded-full px-3 py-1 lg:px-5 lg:py-1.5 text-[10px] lg:text-[12px] font-bold tracking-widest uppercase ${K.live?"bg-[#4681E8] text-white shadow-[0_0_20px_rgba(70,129,232,0.6)]":"bg-white text-slate-600 border border-slate-200"}`,children:[K.live&&(0,a.jsx)("span",{className:"w-2 h-2 rounded-full bg-white animate-pulse"}),K.t,G.time_text?` : ${G.time_text}`:""]})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-2 lg:gap-4",children:[(0,a.jsx)("img",{src:ee,alt:G.away_name,className:"w-16 h-16 sm:w-24 sm:h-24 lg:w-32 lg:h-32 object-contain drop-shadow-[0_10px_20px_rgba(0,0,0,0.8)]",onError:et(G.away_name),loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-[#FFFFFF] text-xs sm:text-base lg:text-lg font-black text-center line-clamp-2 uppercase tracking-wide",children:G.away_name})]})]})]})}),L.length>0&&(0,a.jsxs)("div",{className:"w-full bg-white border-t border-slate-200 px-3 lg:px-6 py-2.5 lg:py-4 flex items-center gap-2 lg:gap-4 overflow-x-auto z-20",children:[(0,a.jsx)("span",{className:"text-[10px] lg:text-[11px] text-slate-600 uppercase font-bold tracking-widest shrink-0 mr-1 lg:mr-2",children:"CHỌN K\xcaNH TRUYỀN:"}),L.map((e,t)=>(0,a.jsxs)("button",{onClick:()=>{H(e),F(!0),A(!1)},className:`shrink-0 flex items-center gap-1.5 lg:gap-2 rounded-full px-3 py-1.5 lg:px-5 lg:py-2 text-[11px] lg:text-[13px] font-bold transition-all ${M?.uid===e.uid&&!T?"bg-[#4681E8]/10 border border-[#4681E8] text-[#4681E8] shadow-[0_0_15px_rgba(70,129,232,0.2)]":"bg-white border border-slate-200 text-slate-600 hover:text-[#4681E8] hover:border-[#4681E8]/50"}`,children:[(0,a.jsx)("span",{className:`w-1.5 h-1.5 lg:w-2 lg:h-2 rounded-full ${M?.uid===e.uid&&!T?"bg-[#4681E8] animate-pulse":"bg-transparent"}`}),"BLV ",e.nickName||`K\xeanh ${t+1}`]},e.uid||t))]})]}),(p=(()=>{let e=s?.stats;if(!e)return!1;let t=null;return Array.isArray(e)&&e.length>0?t=e[0]:e?.results?.[0]?t=e.results[0]:e?.stats_full_time&&(t=e),!!t&&!!(t.stats_full_time?.length>0||t.stats_haft_time?.length>0||t.stats_half_time?.length>0||t.stats?.length>0)})(),u=!!(s?.lineup&&(Array.isArray(s.lineup)?s.lineup.length>0:s.lineup.home||s.lineup.away)),g=!!(s?.events&&(Array.isArray(s.events)?s.events.length>0:s.events.incidents?.length>0||s.events.data?.length>0)),j=!!(r&&(Array.isArray(r)?r.length>0:r.data?.length>0)),(y=(v=[{id:"stats",label:"THỐNG K\xca",show:p},{id:"lineup",label:"ĐỘI H\xccNH",show:u},{id:"events",label:"DIỄN BIẾN",show:g},{id:"standings",label:"BẢNG XH",show:j},{id:"odds",label:"TỶ LỆ K\xc8O",show:!!(s?.odds&&Array.isArray(s.odds)&&s.odds.length>0)}].filter(e=>e.show)).find(e=>e.id===C)?C:v[0]?.id||"odds")!==C&&setTimeout(()=>S(y),0),v.length>0?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"bg-white rounded-2xl p-2 border border-slate-200 flex overflow-x-auto gap-2 shadow-[0_4px_15px_rgba(0,0,0,0.08)] mx-4 md:mx-0",children:v.map(({id:e,label:t})=>(0,a.jsx)("button",{onClick:()=>S(e),className:`flex-1 min-w-[100px] py-2.5 sm:py-3 text-[10px] sm:text-[12px] font-black uppercase tracking-widest rounded-xl transition-all ${y===e?"bg-[#4681E8]/10 text-[#4681E8] border border-[#4681E8]/30 shadow-inner":"text-slate-500 hover:text-[#4681E8] hover:bg-[#4681E8]/5 border border-transparent"}`,children:t},e))}),(0,a.jsxs)("div",{className:"bg-white rounded-2xl border border-slate-200 overflow-hidden shadow-[0_4px_15px_rgba(0,0,0,0.08)] min-h-[400px] mx-4 md:mx-0",children:["stats"===y&&(0,a.jsx)(b,{matchDetails:s}),"lineup"===y&&(0,a.jsx)(f,{matchDetails:s}),"events"===y&&(0,a.jsx)(_,{events:s?.events}),"standings"===y&&(0,a.jsx)(k,{standings:r}),"odds"===y&&(0,a.jsx)(E,{odds:s?.odds})]})]}):null),t.length>0&&(0,a.jsxs)("div",{className:"mt-4 mx-4 md:mx-0",children:[(0,a.jsxs)("h2",{className:"px-1 py-4 text-sm sm:text-base font-black text-slate-800 uppercase flex items-center gap-3 tracking-widest border-b border-slate-100 mb-4",children:[(0,a.jsx)("span",{className:"w-1 h-5 bg-[#4681E8] rounded-sm shadow-[0_0_8px_#4681E8]"}),"TRẬN ĐẤU C\xd9NG GIẢI"]}),(0,a.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3 sm:gap-4",children:t.slice(0,4).map(e=>(0,a.jsx)(w,{m:e},e.id))})]})]}),(0,a.jsx)("div",{className:"w-full lg:w-[350px] xl:w-[400px] shrink-0 px-4 md:px-0",children:(0,a.jsxs)("div",{className:"bg-white border border-slate-200 rounded-2xl overflow-hidden flex flex-col shadow-[0_10px_30px_rgba(0,0,0,0.1)] lg:sticky lg:top-8 h-[600px] lg:h-[c
933alc(100vh-100px)] lg:max-h-[850px]",children:[(0,a.jsxs)("div",{className:"px-5 py-4 border-b border-slate-200 flex items-center justify-between bg-white",children:[(0,a.jsxs)("h3",{className:"text-slate-800 text-sm font-black uppercase tracking-widest flex items-center gap-2",children:[(0,a.jsx)("span",{className:"w-2.5 h-2.5 rounded-full bg-[#4681E8] shadow-[0_0_10px_rgba(70,129,232,0.4)]"}),"PH\xd2NG CHAT"]}),(0,a.jsxs)("span",{className:"text-[10px] bg-white px-3 py-1.5 rounded-full text-[#4681E8] font-mono border border-[#4681E8]/30 shadow-inner tracking-widest flex items-center gap-1.5",children:[(0,a.jsx)("svg",{className:"w-3 h-3",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 10l4.553-2.276A1 1 0 0121 8.618v6.764a1 1 0 01-1.447.894L15 14M5 18h8a2 2 0 002-2V8a2 2 0 00-2-2H5a2 2 0 00-2 2v8a2 2 0 002 2z"})}),L.length," BLV"]})]}),(0,a.jsx)("div",{className:"flex-1 bg-[#FFFFFF]/40 min-h-0 chat-container-wrapper",children:(0,a.jsx)(N,{anchors:L,selectedAnchor:M})})]})})]})]})}let p={25:"KIỂM SO\xc1T B\xd3NG",24:"CHUYỀN CH\xcdNH X\xc1C",23:"TỔNG SỐ ĐƯỜNG CHUYỀN",22:"TẤN C\xd4NG",21:"T.C\xd4NG NGUY HIỂM",2:"S\xdaT TR\xdaNG Đ\xcdCH",37:"PHẠT G\xd3C",28:"N\xc9M BI\xcaN",8:"VIỆT VỊ",3:"THẺ V\xc0NG",4:"THẺ ĐỎ",5:"S\xdaT PENALTY",29:"PHẠM LỖI",26:"Đ\xc1NH ĐẦU",27:"CỨU THUA",1:"B\xc0N THẮNG",7:"PHẢN LƯỚI"},u=[25,21,22,24,2,23,4,3,37,28,8,5,29],g="https://cdn.sportdb.live/upload/team/";function b({matchDetails:e}){let[t,s]=(0,l.useState)("full"),r=e?.stats,n=e?.lineup,i=n?.match?.home_team,o=n?.match?.away_team,c=null;Array.isArray(r)&&r.length>0?c=r[0]:r?.results?.[0]?c=r.results[0]:r?.stats_full_time&&(c=r);let d={full:c?.stats_full_time||[],h1:c?.stats_haft_time||c?.stats_half_time||[],h2:c?.stats_haft_time_2nd_half||[]}[t]||[];if(!c||0===d.length)return(0,a.jsx)(j,{text:"Thống k\xea sẽ được cập nhật khi trận đấu bắt đầu"});let x=[...d].sort((e,t)=>{let s=u.indexOf(e.type),a=u.indexOf(t.type);return(-1===s?999:s)-(-1===a?999:a)});return(0,a.jsxs)("div",{className:"flex flex-col",children:[(i||o)&&(0,a.jsxs)("div",{className:"flex items-center justify-between px-4 py-3 border-b border-slate-100",children:[(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5 w-20",children:[i?.logo&&(0,a.jsx)("img",{src:g+i.logo,alt:i?.name||"Home team",className:"w-8 h-8 object-contain",onError:e=>e.target.style.display="none",loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-slate-600 text-[10px] font-medium text-center leading-tight",children:i?.name||""})]}),(0,a.jsx)("div",{className:"flex gap-1",children:[{k:"h1",l:"Hiệp 1"},{k:"h2",l:"Hiệp 2"},{k:"full",l:"Cả trận"}].map(({k:e,l})=>(0,a.jsx)("button",{onClick:()=>s(e),className:`px-2.5 py-1 text-[10px] font-bold rounded transition-all ${t===e?"bg-[#E11D48] text-white":"text-slate-400 hover:text-slate-600 bg-slate-100"}`,children:l},e))}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5 w-20",children:[o?.logo&&(0,a.jsx)("img",{src:g+o.logo,alt:o?.name||"Away team",className:"w-8 h-8 object-contain",onError:e=>e.target.style.display="none",loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-slate-600 text-[10px] font-medium text-center leading-tight",children:o?.name||""})]})]}),(0,a.jsx)("div",{className:"px-4 py-3 space-y-3",children:x.map(e=>{let t=p[e.type]||`Stat ${e.type}`,s=e.home,l=e.away,r=24===e.type||25===e.type,n=s+l,i=0===n?50:s/n*100,o=s>l,c=l>s;return(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"flex justify-between items-center mb-1.5",children:[(0,a.jsxs)("span",{className:`text-xs font-bold w-10 tabular-nums ${o?"text-slate-800":"text-slate-400"}`,children:[s,r?"%":""]}),(0,a.jsx)("span",{className:"text-slate-400 text-[10px] font-semibold tracking-wide uppercase",children:t}),(0,a.jsxs)("span",{className:`text-xs font-bold w-10 text-right tabular-nums ${c?"text-slate-800":"text-slate-400"}`,children:[l,r?"%":""]})]}),(0,a.jsxs)("div",{className:"flex gap-0.5 h-[5px]",children:[(0,a.jsx)("div",{className:"flex-1 rounded-l-full bg-white/[0.06] overflow-hidden flex justify-end",children:(0,a.jsx)("div",{className:`rounded-l-full transition-all duration-500 ${o?"bg-gradient-to-r from-[#E11D48]/60 to-[#E11D48]":"bg-gradient-to-r from-white/10 to-white/20"}`,style:{width:`${i}%`}})}),(0,a.jsx)("div",{className:"flex-1 rounded-r-full bg-white/[0.06] overflow-hidden",children:(0,a.jsx)("div",{className:`rounded-r-full transition-all duration-500 ${c?"bg-gradient-to-l from-[#E11D48]/60 to-[#E11D48]":"bg-gradient-to-l from-white/10 to-white/20"}`,style:{width:`${100-i}%`}})})]})]},e.type)})})]})}
933function f({matchDetails:e}){let[t,s]=(0,l.useState)("pitch"),r=e?.lineup,n=r?.lineup||r,i=n?.home||[],o=n?.away||[],c=r?.home_formation||"",d=r?.away_formation||"",x=r?.match?.home_team,h=r?.match?.away_team;if(0===i.length&&0===o.length)return(0,a.jsx)(j,{text:"Đội h\xecnh sẽ được c\xf4ng bố trước trận đấu 30 ph\xfat"});let m=e=>e.filter(e=>1===e.first),p=e=>e.filter(e=>1!==e.first),u=m(i),g=m(o),b=p(i),w=p(o);return(0,a.jsxs)("div",{className:"flex flex-col",children:[(0,a.jsxs)("div",{className:"flex items-center justify-center gap-1 px-3 py-2 border-b border-slate-100",children:[(0,a.jsx)("button",{onClick:()=>s("pitch"),className:`px-3 py-1.5 text-[10px] font-bold rounded transition-all ${"pitch"===t?"bg-[#E11D48] text-white":"text-slate-400 bg-slate-100"}`,children:"Đội h\xecnh xuất ph\xe1t"}),(0,a.jsx)("button",{onClick:()=>s("list"),className:`px-3 py-1.5 text-[10px] font-bold rounded transition-all ${"list"===t?"bg-[#E11D48] text-white":"text-slate-400 bg-slate-100"}`,children:"Đội h\xecnh dá»± bị"})]}),"pitch"===t?(0,a.jsx)("div",{className:"relative w-full",style:{aspectRatio:"68/105"},children:(0,a.jsxs)("div",{className:"absolute inset-0 bg-gradient-to-b from-[#1a5c2a] via-[#1e6b31] to-[#1a5c2a] rounded-2xl overflow-hidden",children:[(0,a.jsxs)("div",{className:"absolute inset-[3%] border border-white/20 rounded-lg",children:[(0,a.jsx)("div",{className:"absolute left-0 right-0 top-1/2 h-px bg-white/20"}),(0,a.jsx)("div",{className:"absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 w-[22%] aspect-square rounded-full border border-white/20"}),(0,a.jsx)("div",{className:"absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 w-1.5 h-1.5 bg-white/30 rounded-full"}),(0,a.jsx)("div",{className:"absolute top-0 left-1/2 -translate-x-1/2 w-[55%] h-[16%] border-l border-r border-white/20"}),(0,a.jsx)("div",{className:"absolute top-0 left-1/2 -translate-x-1/2 w-[25%] h-[6%] border-l border-r border-white/20"}),(0,a.jsx)("div",{className:"absolute bottom-0 left-1/2 -translate-x-1/2 w-[55%] h-[16%] border-t border-l border-r border-white/20"}),(0,a.jsx)("div",{className:"absolute bottom-0 left-1/2 -translate-x-1/2 w-[25%] h-[6%] border-t border-l border-r border-white/20"})]}),(0,a.jsx)("div",{className:"absolute top-1 left-2 text-[9px] text-[#F8FAFC]/50 font-bold z-10",children:x?.name||""}),(0,a.jsx)("div",{className:"absolute top-1 right-2 text-[9px] text-[#E11D48]/70 font-bold z-10",children:c}),(0,a.jsx)("div",{className:"absolute bottom-1 left-2 text-[9px] text-[#F8FAFC]/50 font-bold z-10",children:h?.name||""}),(0,a.jsx)("div",{className:"absolute bottom-1 right-2 text-[9px] text-[#E11D48]/70 font-bold z-10",children:d}),u.map((e,t)=>{let s=`${e.x||50}%`,l=`${(e.y||10)/2}%`,r="G"===e.position;return(0,a.jsxs)("div",{className:"absolute flex flex-col items-center z-10 -translate-x-1/2 -translate-y-1/2",style:{left:s,top:l},children:[(0,a.jsx)("div",{className:`w-6 h-6 rounded-full flex items-center justify-center text-[9px] font-black ${r?"bg-yellow-400 text-black":"bg-blue-600 text-[#F8FAFC]"} shadow-md border border-white/20`,children:e.shirt_number||""}),(0,a.jsx)("span",{className:"text-[7px] text-[#F8FAFC] font-semibold mt-0.5 text-center max-w-[48px] truncate drop-shadow-[0_1px_2px_rgba(0,0,0,0.8)]",children:(e.name||"").split(" ").slice(-2).join(" ")}),1===e.captain&&(0,a.jsx)("span",{className:"absolute -top-1 -right-1 text-[6px] text-yellow-400",children:"C"})]},`h-${t}`)}),g.map((e,t)=>{let s=`${100-(e.x||50)}%`,l=`${100-(e.y||10)/2}%`,r="G"===e.position;return(0,a.jsxs)("div",{className:"absolute flex flex-col items-center z-10 -translate-x-1/2 -translate-y-1/2",style:{left:s,top:l},children:[(0,a.jsx)("div",{className:`w-6 h-6 rounded-full flex items-center justify-center text-[9px] font-black ${r?"bg-yellow-400 text-black":"bg-orange-500 text-[#F8FAFC]"} shadow-md border border-white/20`,children:e.shirt_number||""}),(0,a.jsx)("span",{className:"text-[7px] text-[#F8FAFC] font-semibold mt-0.5 text-center max-w-[48px] truncate drop-shadow-[0_1px_2px_rgba(0,0,0,0.8)]",children:(e.name||"").split(" ").slice(-2).join(" ")}),1===e.captain&&(0,a.jsx)("span",{className:"absolute -top-1 -right-1 text-[6px] text-yellow-400",children:"C"})]},`a-${t}`)})]})}):(0,a.jsxs)("div",{className:"px-3 py-2 text-xs",children:[(0,a.jsxs)("div",{className:"flex justify-between font-bold text-slate-400 mb-1 uppercase tracking-wider text-[9px] px-1",children:[(0,a.jsx)("span",{children:"Đội chá»
933§ nh\xe0"}),(0,a.jsx)("span",{children:"Đội kh\xe1ch"})]}),Array.from({length:Math.max(b.length,w.length)}).map((e,t)=>{let s=b[t],l=w[t];return(0,a.jsxs)("div",{className:"flex justify-between items-center border-b border-slate-50 py-1.5",children:[(0,a.jsx)("div",{className:"flex items-center gap-1.5 w-1/2 min-w-0",children:s&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"text-[#E11D48] font-bold w-5 text-center shrink-0 text-[10px]",children:s.shirt_number||""}),(0,a.jsx)("span",{className:"text-slate-700 truncate text-[11px]",children:s.name||""})]})}),(0,a.jsx)("div",{className:"flex items-center gap-1.5 w-1/2 justify-end min-w-0",children:l&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"text-slate-700 truncate text-[11px] text-right",children:l.name||""}),(0,a.jsx)("span",{className:"text-[#E11D48] font-bold w-5 text-center shrink-0 text-[10px]",children:l.shirt_number||""})]})})]},t)})]})]})}function j({text:e}){return(0,a.jsx)("div",{className:"flex items-center justify-center py-10 text-slate-400 text-sm text-center",children:e})}function w({m:e}){let t=c(e.status_id,e.sport_id),{hm:s,dm:l}=x(e.time),r=e.source_card_meta?.league_label||e.match_data?.competition_vi||"";return(0,a.jsxs)("a",{href:`/match/${encodeURIComponent(e.post_name||e.id)}`,className:"flex items-center gap-3 rounded-2xl bg-white hover:bg-slate-50 border border-slate-100 hover:border-[#4681E8]/30 p-3 transition-all group",children:[(0,a.jsxs)("div",{className:"shrink-0 w-14 text-center",children:[(0,a.jsx)("div",{className:"text-[#E11D48] text-[11px] font-bold",children:s}),(0,a.jsx)("div",{className:"text-slate-400 text-[9px]",children:l})]}),(0,a.jsx)("div",{className:"w-px h-9 bg-slate-200 shrink-0"}),(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("div",{className:"text-slate-400 text-[9px] truncate mb-1",children:r}),(0,a.jsxs)("div",{className:"flex items-center gap-2 mb-0.5",children:[(0,a.jsx)("img",{src:e.home_logo||d(e.home_name),alt:e.home_name,className:"w-4 h-4 object-contain shrink-0",onError:t=>t.target.src=d(e.home_name),loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-slate-600 text-[12px] font-medium truncate",children:e.home_name})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("img",{src:e.away_logo||d(e.away_name),alt:e.away_name,className:"w-4 h-4 object-contain shrink-0",onError:t=>t.target.src=d(e.away_name),loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-slate-600 text-[12px] font-medium truncate",children:e.away_name})]})]}),t.sc?(0,a.jsxs)("span",{className:"text-slate-800 font-bold text-[14px] tabular-nums shrink-0",children:[e.home_score,"-",e.away_score]}):(0,a.jsx)("span",{className:"text-[10px] font-bold text-[#E11D48] bg-[#E11D48]/10 rounded px-2.5 py-1 group-hover:bg-[#E11D48]/15 transition shrink-0",children:"XEM NGAY"})]})}let v={0:{bg:"bg-white/10",text:"text-[#F8FAFC]/40",nameCls:"text-[#94A3B8]"},1:{bg:"bg-white/10",text:"text-[#F8FAFC]/50",nameCls:"text-[#94A3B8]"},2:{bg:"bg-green-900/50",text:"text-green-400",nameCls:"text-green-400"},3:{bg:"bg-yellow-900/40",text:"text-yellow-400",nameCls:"text-emerald-600 font-bold"},4:{bg:"bg-blue-900/40",text:"text-blue-400",nameCls:"text-blue-400 font-bold"},5:{bg:"bg-red-900/40",text:"text-red-400",nameCls:"text-red-400 font-bold"}};function N({anchors:e,selectedAnchor:t}){let[s,r]=(0,l.useState)([]),[n,i]=(0,l.useState)(!1),o=(0,l.useRef)(null),c=(0,l.useRef)(null),d=t?.roomNum;return(0,l.useEffect)(()=>{if(!d)return;r([]),i(!1);let e=new EventSource(`/api/chat/${d}`);return e.onopen=()=>i(!0),e.onmessage=e=>{try{let t=JSON.parse(e.data);if("connected"===t.type)return void i(!0);if("history"===t.type&&Array.isArray(t.messages))return void r(e=>[...t.messages,...e].slice(-200));t.user&&t.text&&r(e=>[...e,t].slice(-200))}catch{}},e.onerror=()=>i(!1),()=>{e.close(),i(!1)}},[d]),(0,l.useEffect)(()=>{requestAnimationFrame(()=>{let e=c.current;e&&(e.scrollTop=e.scrollHeight)})},[s.length]),(0,a.jsxs)("div",{className:"flex flex-col h-full bg-[#0F0F23]",children:[(0,a.jsxs)("div",{ref:c,className:"flex-1 min-h-0 px-3 py-2 flex flex-col gap-[3px] overflow-y-auto",style:{scrollbarWidth:"thin",scrollbarColor:"#444 transparent"},children:[(0,a.jsx)("div",{className:"text-center text-[10px] text-[#F8FAFC]/30 bg-slate-50/60 py-1.5 rounded-xl mb-1 sticky top-0 z-10 backdrop-blur-sm",children:n?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"inline-block h-1.5 w-1.5 rounded-full bg-green-400 animate-pulse mr-1"}),"Đang kết nối ph\xf2ng chat trá»±c tiếp"]}):d?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"inline-block h-1.5 w-1.5 rounded-full bg-yellow-400 animate-pulse mr-1"}),"Đang kết nối..."]}
933):"Ch\xe0o mừng bạn đến với ph\xf2ng chat"}),0===s.length&&n&&(0,a.jsx)("div",{className:"text-center text-[10px] text-[#F8FAFC]/20 py-4",children:"Chờ tin nhắn mới..."}),s.map((e,t)=>{var s;let l=(s=e.level)>=5?v[5]:v[s]||v[0];return 2===e.type||e.text?.includes("v\xe0o ph\xf2ng tr\xf2 chuyện")?(0,a.jsxs)("div",{className:"flex items-start gap-1.5 text-[11px] leading-relaxed py-[1px] opacity-60",children:[(0,a.jsx)("span",{className:"text-green-500/70 font-medium",children:"Hi"}),(0,a.jsxs)("span",{className:`shrink-0 inline-flex items-center px-1 py-[0.5px] rounded text-[8px] font-bold ${l.bg} ${l.text}`,children:["Lv",e.level]}),(0,a.jsxs)("span",{className:`font-bold ${l.nameCls}`,children:[e.user,":"]}),(0,a.jsx)("span",{className:"text-[#F8FAFC]/40",children:e.text})]},`${e.ts}-${t}`):(0,a.jsxs)("div",{className:"flex items-start gap-1.5 text-[11px] leading-relaxed py-[1px]",children:[(0,a.jsxs)("span",{className:`shrink-0 inline-flex items-center px-1 py-[0.5px] rounded text-[8px] font-bold ${l.bg} ${l.text}`,children:["Lv.",e.level]}),(0,a.jsxs)("span",{className:`font-bold shrink-0 ${l.nameCls}`,children:[e.user,":"]}),(0,a.jsx)("span",{className:"text-[#F8FAFC]/80 break-words min-w-0",children:e.text})]},`${e.ts}-${t}`)}),(0,a.jsx)("div",{ref:o})]}),(0,a.jsxs)("div",{className:"shrink-0 px-3 py-2 bg-[#0F0F23] border-t border-white/[0.04] space-y-2",children:[(0,a.jsx)("div",{className:"flex items-center justify-center gap-3 text-[#F8FAFC]/20 text-[10px]",children:(0,a.jsx)("span",{className:"flex items-center gap-1",children:(0,a.jsx)("svg",{className:"w-3 h-3",viewBox:"0 0 24 24",fill:"currentColor",children:(0,a.jsx)("path",{d:"M12 4.5C7 4.5 2.7 7.6 1 12c1.7 4.4 6 7.5 11 7.5s9.3-3.1 11-7.5c-1.7-4.4-6-7.5-11-7.5zm0 12.5c-2.8 0-5-2.2-5-5s2.2-5 5-5 5 2.2 5 5-2.2 5-5 5zm0-8c-1.7 0-3 1.3-3 3s1.3 3 3 3 3-1.3 3-3-1.3-3-3-3z"})})})}),(0,a.jsxs)("div",{className:"flex bg-[#0F0F23] rounded-2xl overflow-hidden border border-white/[0.08]",children:[(0,a.jsx)("input",{type:"text",placeholder:"Đăng nhập để c\xf9ng chat nh\xe9",disabled:!0,className:"flex-1 bg-transparent px-3 py-2 text-[11px] text-[#F8FAFC] outline-none placeholder:text-[#F8FAFC]/30 disabled:opacity-50"}),(0,a.jsx)("button",{disabled:!0,className:"px-4 text-[11px] font-bold bg-[#E11D48] text-black disabled:bg-white/10 disabled:text-[#F8FAFC]/20 transition-colors",children:"Gửi"})]})]})]})}let y={1:{icon:"⚽",label:"B\xe0n thắng",color:"text-green-400"},2:{icon:"\uD83C\uDD7F️",label:"Phạt đền",color:"text-green-400"},3:{icon:"\uD83D\uDFE1",label:"Thẻ v\xe0ng",color:"text-yellow-400"},4:{icon:"\uD83D\uDFE1\uD83D\uDFE1",label:"Thẻ v\xe0ng 2",color:"text-emerald-600"},5:{icon:"\uD83D\uDD34",label:"Thẻ đỏ",color:"text-red-500"},7:{icon:"\uD83D\uDD04",label:"Phản lưới",color:"text-orange-400"},8:{icon:"\uD83C\uDFE5",label:"Chấn thương",color:"text-[#94A3B8]"},9:{icon:"\uD83D\uDD04",label:"Thay người",color:"text-blue-400"},11:{icon:"⏱️",label:"Hiệp 2",color:"text-[#F8FAFC]/40"},15:{icon:"\uD83E\uDD45",label:"Pen trượt",color:"text-red-400"},19:{icon:"⏱️",label:"Kết th\xfac hiệp",color:"text-[#F8FAFC]/30"},21:{icon:"\uD83C\uDFC6",label:"VAR",color:"text-purple-400"}};function _({events:e}){let t=e?.incidents||e?.events||[];return t&&0!==t.length?(0,a.jsx)("div",{className:"flex flex-col",children:t.map((e,t)=>{let s=y[e.type]||{icon:"•",label:`Event ${e.type}`,color:"text-[#F8FAFC]/50"},l=1===e.position,r=2===e.position,n=e.add_time?`+${e.add_time}`:"",i=`${e.time}'${n}`;return l||r||11!==e.type&&19!==e.type?9===e.type?(0,a.jsxs)("div",{className:`flex items-center gap-2 border-b border-slate-50 p-3 text-xs ${l?"":"flex-row-reverse"}`,children:[(0,a.jsx)("span",{className:"text-slate-400 w-10 text-center shrink-0 text-[10px]",children:i}),(0,a.jsxs)("div",{className:`flex-1 flex flex-col gap-0.5 ${l?"items-start":"items-end"}`,children:[(0,a.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,a.jsx)("span",{className:"text-green-400 text-[10px]",children:"▲"}),(0,a.jsx)("span",{className:"text-[#F8FAFC]/80 text-[11px]",children:e.in_player_name||""})]}),(0,a.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,a.jsx)("span",{className:"text-red-400 text-[10px]",children:"▼"}),(0,a.jsx)("span",{className:"text-[#F8FAFC]/40 text-[11px]",children:e.out_player_name||""})]})]})]},t):(0,a.jsxs)("div",{className:`flex items-center gap-2 border-b border-slate-50 p-3 text-xs ${l?"":"flex-row-reverse"}`,children:[(0,a.jsx)("span",{className:"text-slate-400 w-10 text-center shrink-0 text-[10px]",children:i}),(0,a.jsx)("span",{className:`shrink-0 text-sm ${s.color}`,children:s.icon}),(0,a.jsxs)("div",{className:`flex-1 min-w-0 ${l?"text-left":"text-right"}`,children:[(0,a.jsx)("span",{className:"text-slate-700 text-[11px]",children:e.player_name||""}),e.assist1_name&&(0,a.jsxs)("span",{className:"text-slate-400 text-[10px] ml-1",children:["(kiến tạo: ",e.assist1_name,")"]}),1===e.type&&void 0!==e.home_score&&(0,a.jsxs)("span",{className:"text-[#E11D48] font-bold text-[11px] ml-2",children:[e.home_score," - ",e.away_score]})]})]},t):(0,a.jsx)("div",{className:"flex items-center justify-center py-2 border-b border-slate-50 bg-slate-50",children:(0,a.jsxs)("span",{className:"text-slate-400 text-[10px] uppercase tracking-wider",children:[s.icon," ",s.label," — ",i]})},t)})}):(0,a.jsx)(j,{text:"Diễn biến trận đấu sẽ được cập nhật trực tiếp tại đ\xe2y"})}function k({standings:e}
933){return e&&e.teams&&0!==e.teams.length?(0,a.jsxs)("div",{className:"w-full text-[10px]",children:[(0,a.jsxs)("div",{className:"grid grid-cols-[20px_1fr_24px_24px_32px] bg-slate-50 p-2 text-slate-400 uppercase font-bold sticky top-0",children:[(0,a.jsx)("span",{className:"text-center",children:"#"}),(0,a.jsx)("span",{children:"Team"}),(0,a.jsx)("span",{className:"text-center",children:"T"}),(0,a.jsx)("span",{className:"text-center",children:"B"}),(0,a.jsx)("span",{className:"text-center whitespace-nowrap",children:"Đ"})]}),e.teams.slice(0,15).map((e,t)=>{let s=!!e.data,l=s?parseFloat(e.data[0]):e.rank||t+1,r=s?e.data[1]:e.target_name,n=s?e.data[7]:e.points,i=s?e.data[3]:e.won,o=s?e.data[5]:e.loss;return(0,a.jsxs)("div",{className:"grid grid-cols-[20px_1fr_24px_24px_32px] items-center p-2 border-b border-slate-50 hover:bg-slate-50 transition-colors",children:[(0,a.jsx)("span",{className:"text-center text-slate-500",children:l}),(0,a.jsxs)("div",{className:"flex items-center gap-1.5 min-w-0 pr-2",children:[e.team_logo&&(0,a.jsx)("img",{src:e.team_logo,className:"w-3.5 h-3.5 object-contain",alt:r||"Team logo",loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-slate-700 font-medium truncate",children:r})]}),(0,a.jsx)("span",{className:"text-center text-slate-500",children:i}),(0,a.jsx)("span",{className:"text-center text-slate-500",children:o}),(0,a.jsx)("span",{className:"text-center text-[#E11D48] font-bold",children:n})]},r)})]}):(0,a.jsx)(j,{text:"Bảng xếp hạng sẽ được cập nhật"})}function E({odds:e}){let t=Array.isArray(e)?e:[],s=["2","4","3","16"];function l(e){for(let a of s){let s=t.find(t=>t.odds_type===e&&String(t.company_id)===a);if(s?.odds_info?.length)return s}return t.find(t=>t.odds_type===e&&t.odds_info?.length>0)}function r(e,t){let s=e?.odds_info;if(!s?.length)return["-","-","-"];let a="opening"===t?s.length-1:0;if(!s?.length||!s[a])return["-","-","-"];let l=s[a][2];if("string"!=typeof l)return["-","-","-"];let r=l.split(",");return[r[0]||"-",r[1]||"-",r[2]||"-"]}let n=l("asia"),i=l("eu"),o=l("bs"),c=l("cr"),d=r(n,"opening"),x=r(n,"latest"),h=r(i,"opening"),m=r(i,"latest"),p=r(o,"opening"),u=r(o,"latest"),g=r(c,"opening"),b=r(c,"latest"),f=({children:e})=>(0,a.jsx)("th",{className:"px-2 py-2 text-[9px] sm:text-[10px] font-bold uppercase tracking-wider text-slate-500 border-b border-slate-100 text-center",children:e}),j=({children:e,color:t})=>(0,a.jsx)("td",{className:`px-2 py-2.5 text-center text-[11px] sm:text-xs font-bold ${t||"text-slate-600"} border-b border-slate-50`,children:e});return(0,a.jsxs)("div",{className:"overflow-x-auto",children:[(0,a.jsxs)("table",{className:"w-full min-w-[600px]",children:[(0,a.jsxs)("thead",{children:[(0,a.jsxs)("tr",{className:"bg-slate-50",children:[(0,a.jsx)("th",{className:"px-4 py-2 text-left border-b border-slate-100",rowSpan:2,children:(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("div",{className:"w-7 h-7 rounded bg-gradient-to-br from-[#1d4ed8] to-[#3b82f6] flex items-center justify-center text-white text-[9px] font-black shadow-sm",children:"B"}),(0,a.jsx)("span",{className:"text-slate-600 text-[11px] font-bold tracking-wider",children:"SPORT"})]})}),(0,a.jsx)("th",{colSpan:3,className:"px-1 py-1.5 text-center text-[9px] sm:text-[10px] font-bold uppercase tracking-wider text-[#4681E8] border-b border-l border-slate-100",children:"CƯỢC CH\xc2U \xc1"}),(0,a.jsx)("th",{colSpan:3,className:"px-1 py-1.5 text-center text-[9px] sm:text-[10px] font-bold uppercase tracking-wider text-[#4681E8] border-b border-l border-slate-100",children:"CƯỢC CH\xc2U \xc2U"}),(0,a.jsx)("th",{colSpan:3,className:"px-1 py-1.5 text-center text-[9px] sm:text-[10px] font-bold uppercase tracking-wider text-[#4681E8] border-b border-l border-slate-100",children:"T\xc0I XỈU"}),(0,a.jsx)("th",{colSpan:3,className:"px-1 py-1.5 text-center text-[9px] sm:text-[10px] font-bold uppercase tracking-wider text-[#4681E8] border-b border-l border-slate-100",children:"K\xc8O G\xd3C"})]}),(0,a.jsxs)("tr",{className:"bg-slate-50",children:[(0,a.jsx)(f,{children:"CHỦ"}),(0,a.jsx)(f,{children:"CHẤP"}),(0,a.jsx)(f,{children:"KH\xc1CH"}),(0,a.jsx)(f,{children:"CHỦ"}),(0,a.jsx)(f,{children:"H\xd2A"}),(0,a.jsx)(f,{children:"KH\xc1CH"}),(0,a.jsx)(f,{children:"T\xc0I"}),(0,a.jsx)(f,{children:"TỶ LỆ"}),(0,a.jsx)(f,{children:"XỈU"}),(0,a.jsx)(f,{children:"T\xc0I"}),(0,a.jsx)(f,{children:"TỶ LỆ"}),(0,a.jsx)(f,{children:"XỈU"})]})]}),(0,a.jsxs)("tbody",{children:[(0,a.jsxs)("tr",{className:"hover:bg-slate-50 transition-colors",children:[(0,a.jsx)("td",{className:"px-4 py-2.5 text-[11px] sm:text-xs text-slate-500 font-medium border-b border-slate-50",children:"Tỷ Lệ Mở Cược"}),(0,a.jsx)(j,{children:d[0]}),(0,a.jsx)(j,{color:"text-red-400",children:d[1]}),(0,a.jsx)(j,{children:d[2]}),(0,a.jsx)(j,{children:h[0]}),(0,a.jsx)(j,{children:h[1]}),(0,a.jsx)(j,{children:h[2]}),(0,a.jsx)(j,{children:p[0]}),(0,a.jsx)(j,{children:p[1]}),(0,a.jsx)(j,{children:p[2]}),(0,a.jsx)(j,{children:g[0]}),(0,a.jsx)(j,{children:g[1]}),(0,a.jsx)(j,{children:g[2]})]}),(0,a.jsxs)("tr",{className:"hover:bg-slate-50 transition-colors",children:[(0,a.jsx)("td",{className:"px-4 py-2.5 text-[11px] sm:text-xs text-slate-500 font-medium border-b border-slate-50",children:"Tỷ Lệ Trước Trận"}),(0,a.jsx)(j,{children:x[0]}),(0,a.jsx)(j,{color:"text-red-400",children:x[1]}),(0,a.jsx)(j,{children:x[2]}),(0,a.jsx)(j,{children:m[0]}),(0,a.jsx)(j,{children:m[1]}),(0,a.jsx)(j,{children:m[2]}),(0,a.jsx)(j,{children:u[0]}),(0,a.jsx)(j,{children:u[1]}),(0,a.jsx)(j,{children:u[2]}),(0,a.jsx)(j,{children:b[0]}),(0,a.jsx)(j,{children:b[1]}),(0,a.jsx)(j,{children:b[2]})]}),(0,a.jsxs)("tr",{className:"hover:bg-slate-50 transition-colors bg-white",children:[(0,a.jsxs)("td",{className:"px-4 py-2.5 text-[11px] sm:text-xs text-slate-700 font-bold flex items-center gap-1.5 border-b border-slate-50",children:["Live ",(0,a.jsx)("span",{className:"w-1.5 h-1.5 rounded-full bg-red-500 animate-pulse"})]}),(0,a.jsx)(j,{color:"text-green-400",children:x[0]}),(0,a.jsx)(j,{color:"text-red-400",children:x[1]}),(0,a.jsx)(j,{color:"text-green-400",children:x[2]}),(0,a.jsx)(j,{color:"text-green-400",children:m[0]}),(0,a.jsx)(j,{color:"text-green-400",children:m[1]}),(0,a.jsx)(j,{color:"text-green-400",children:m[2]}),(0,a.jsx)(j,{color:"text-green-400",children:u[0]}),(0,a.jsx)(j,{children:u[1]}),(0,a.jsx)(j,{color:"text-green-400",children:u[2]}),(0,a.jsx)(j,{color:"text-green-400",children:b[0]}),(0,a.jsx)(j,{children:b[1]}),(0,a.jsx)(j,{color:"text-green-400",children:b[2]})]})]})]}),(0,a.jsx)("p",{className:"text-center text-slate-400 text-[10px] py-2.5 border-t border-slate-100",children:"Tỷ lệ k\xe8o sẽ được cập nhật gần giờ thi đấu"})]})}},88780:(e,t,s)=>{"use strict";s.d(t,{StandingsClient:()=>h});var a=s(68019),l=s(10707),r=s(46914),n=s(29231);function i(e){return"W"===e?"border border-emerald-500/45 bg-emerald-500/25 text-emerald-300 shadow-[0_0_0_1px_rgba(16,185,129,0.08)_inset]":"L"===e?"border border-red-500/45 bg-red-500/25 text-red-300 shadow-[0_0_0_1px_rgba(239,68,68,0.08)_inset]":"D"===e?"border border-amber-400/45 bg-amber-400/22 text-amber-200 shadow-[0_0_0_1px_rgba(251,191,36,0.08)_inset]":"border border-slate-500/40 bg-slate-500/18 text-slate-700"}function o(e,t){return 1===e?{bar:"bg-[linear-gradient(180deg,#facc15,#f97316)]",badge:"border-emerald-600/60 bg-slate-100 text-yellow-700 shadow-[0_0_18px_rgba(250,204,21,0.14)]",row:"from-[#32230d]/70 via-trans
933parent to-transparent"}:e<=4?{bar:"bg-[linear-gradient(180deg,#fb7185,#f97316)]",badge:"border-[#fb7185]/45 bg-slate-100 text-rose-700",row:"from-[#241318]/55 via-transparent to-transparent"}:e<=6?{bar:"bg-[linear-gradient(180deg,#f59e0b,#facc15)]",badge:"border-[#f59e0b]/45 bg-slate-100 text-yellow-700",row:"from-[#24190b]/45 via-transparent to-transparent"}:e<=10?{bar:"bg-[linear-gradient(180deg,#38bdf8,#2563eb)]",badge:"border-sky-400/40 bg-white text-sky-700",row:"from-[#101725]/32 via-transparent to-transparent"}:e>=Math.max(t-2,1)?{bar:"bg-[linear-gradient(180deg,#ef4444,#7f1d1d)]",badge:"border-red-500/40 bg-slate-100 text-red-700",row:"from-[#220f14]/45 via-transparent to-transparent"}:{bar:"bg-[linear-gradient(180deg,#64748b,#334155)]",badge:"border-slate-500/35 bg-white text-slate-700",row:"from-[#12161d]/24 via-transparent to-transparent"}}function c({detail:e}){let[t,s]=(0,l.useState)(!1),n=(0,l.useRef)(null),[o,d]=(0,l.useState)({top:0,left:0}),x=i(e.result),h=(0,l.useCallback)(()=>{if(n.current){let e=n.current.getBoundingClientRect();d({top:e.top+window.scrollY-8,left:e.left+e.width/2+window.scrollX})}s(!0)},[]);return(0,a.jsxs)("div",{ref:n,className:"relative inline-flex",onMouseEnter:h,onMouseLeave:()=>s(!1),children:[(0,a.jsx)("span",{className:`inline-flex h-7 w-7 items-center justify-center rounded-[8px] text-[11px] font-black cursor-pointer transition-transform hover:-translate-y-0.5 ${x}`,children:e.result}),t&&e.match_time&&"u">typeof document&&(0,r.createPortal)((0,a.jsxs)("div",{className:"fixed z-[9999] w-[220px] pointer-events-none",style:{top:`${o.top}px`,left:`${o.left}px`,transform:"translate(-50%, -100%)",position:"absolute"},children:[(0,a.jsxs)("div",{className:"overflow-hidden rounded-xl border border-[#cbd5e1] bg-white shadow-2xl",children:[(0,a.jsx)("div",{className:"bg-slate-100 px-3 py-1.5 text-[10px] text-slate-600 font-mono text-center border-b border-[#cbd5e1]",children:e.match_time}),(0,a.jsxs)("div",{className:"px-3 py-2.5 flex items-center justify-between gap-2",children:[(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5 flex-1 min-w-0",children:[e.home_logo?(0,a.jsx)("img",{src:e.home_logo,alt:e.home_team,className:"w-7 h-7 object-contain",loading:"lazy",decoding:"async"}):(0,a.jsx)("div",{className:"w-7 h-7 rounded-full bg-gray-700 flex items-center justify-center text-[8px] text-slate-600 font-bold",children:"?"}),(0,a.jsx)("span",{className:"text-[9px] text-slate-600 font-bold text-center leading-tight line-clamp-2 max-w-[70px]",children:e.home_team})]}),(0,a.jsx)("div",{className:"text-slate-900 font-black text-sm whitespace-nowrap px-1",children:e.score||"? - ?"}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5 flex-1 min-w-0",children:[e.away_logo?(0,a.jsx)("img",{src:e.away_logo,alt:e.away_team,className:"w-7 h-7 object-contain",loading:"lazy",decoding:"async"}):(0,a.jsx)("div",{className:"w-7 h-7 rounded-full bg-gray-700 flex items-center justify-center text-[8px] text-slate-600 font-bold",children:"?"}),(0,a.jsx)("span",{className:"text-[9px] text-slate-600 font-bold text-center leading-tight line-clamp-2 max-w-[70px]",children:e.away_team})]})]})]}),(0,a.jsx)("div",{className:"absolute left-1/2 -translate-x-1/2 -bottom-1 w-2 h-2 bg-white border-r border-b border-[#cbd5e1] rotate-45"})]}),document.body)]})}function d({result:e}){let t=i(e);return(0,a.jsx)("span",{className:`inline-flex h-7 w-7 items-center justify-center rounded-[8px] text-[11px] font-black ${t}`,children:e})}function x({value:e,totalTeams:t}){let s=Number(e);if(!Number.isFinite(s))return(0,a.jsx)("td",{className:"px-4 py-4 text-center font-mono font-black text-slate-400",children:e});let l=o(s,t);return(0,a.jsxs)("td",{className:"relative px-4 py-4 text-center font-mono",children:[(0,a.jsx)("span",{className:`absolute left-0 top-1/2 h-7 w-1 -translate-y-1/2 rounded-r-full ${l.bar}`}),(0,a.jsx)("span",{className:`inline-flex h-8 w-8 items-center justify-center rounded-[10px] border text-[13px] font-black ${l.badge}`,children:s})]})}function h({initialData:e}){let[t]=(0,l.useState)(!1),[s,r]=(0,l.useState)(!1),[i,p]=(0,l.useState)(""),u=(0,l.useRef)(null);if((0,l.useEffect)(()=>{function e(e){u.current&&!u.current.contains(e.target)&&r(!1)}return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[]),!e)return(0,a.jsx)("div",{className:"text-center py-20 text-slate-600",children:"Đang tải dữ liệu..."});let g=e.available_leagues||[],b=g.filter(e=>e.name.toLowerCase().includes(i.toLowerCase())),f=e.teams&&e.teams.length>0&&Array.isArray(e.teams[0]?.form),j=!f&&e.rankings;return(0,a.jsxs)("div",{className:"mx-auto max-w-[1440px] px-4 py-8",children:[(0,a.jsx)(n.G,{eyebrow:"Bảng xếp hạng",title:"BẢNG XẾP HẠNG",rightSlot:(0,a.jsx)("div",{className:"text-[12px] text-slate-600",children:(0,a.jsx)("span",{className:"text-slate-900/80 font-bold",children:e.league_name})})}),g.length>0&&(0,a.jsxs)("div",{className:"mb-6",ref:u,children:[(0,a.jsxs)("div",{className:"relative inline-flex min-w-[320px] items-center gap-3 rounded-2xl border border-slate-200 bg-white backdrop-blur-md px-5 py-3.5 cursor-pointer shadow-[0_8px_30px_rgba(0,0,0,0.06)] transition-colors hover:border-[#4681E8]/50 hover:shadow-[0_8px_30px_rgba(70,129,232,0.1)]",onClick:()=>r(!s),children:[e.league_icon&&(0,a.jsx)("img",{src:e.league_icon,alt:e.league_name||"League icon",className:"w-6 h-6 object-contain",loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-slate-800 font-bold text-sm flex-1",children:e.league_name||"Chọn giải đấu"}),(0,a.jsx)("svg",{className:`w-4 h-4 text-[#4681E8] transition-transform ${s?"rotate-180":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),s&&(0,a.jsxs)("div",{className:"absolute z-50 mt-2 w-[360px] overflow-hidden rounded-2xl border border-slate-200 bg-white backdrop-blur-xl shadow-[0_24px_80px_rgba(0,0,0,0.15)]",children:[(0,a.jsx)("div",{className:"p-2 border-b border-slate-100",children:(0,a.jsx)("input",{type:"text",placeholder:"T\xecm kiếm giải đấu...",value:i,onChange:e=>p(e.target.value),className:"w-full bg-slate-50 text-slate-800 text-sm px-4 py-2.5 rounded-xl border border-transparent outline-none focus:border-[#4681E8]/50 placeholder-slate-400 transition-colors",autoF
933ocus:!0})}),(0,a.jsxs)("div",{className:"max-h-[340px] overflow-y-auto",children:[b.map(t=>(0,a.jsxs)("a",{href:`/standings?league=${encodeURIComponent(t.id)}`,className:`flex items-center gap-3 px-4 py-3 cursor-pointer transition-colors hover:bg-slate-50 ${t.id===e.league_id?"bg-[#4681E8]/10 border-l-4 border-[#4681E8]":""}`,children:[t.icon?(0,a.jsx)("img",{src:t.icon,alt:t.name||"League",className:"w-5 h-5 object-contain flex-shrink-0",loading:"lazy",decoding:"async"}):(0,a.jsx)("div",{className:"w-5 h-5 rounded bg-gray-700 flex-shrink-0"}),(0,a.jsx)("span",{className:"text-sm text-slate-900 truncate",children:t.name})]},t.id)),0===b.length&&(0,a.jsx)("div",{className:"px-4 py-8 text-center text-gray-500 text-sm",children:"Kh\xf4ng t\xecm thấy giải đấu"})]})]})]}),t&&(0,a.jsxs)("div",{className:"flex items-center justify-center py-12",children:[(0,a.jsx)("div",{className:"animate-spin w-8 h-8 border-2 border-emerald-600 border-t-transparent rounded-full"}),(0,a.jsx)("span",{className:"ml-3 text-slate-600 text-sm",children:"Đang tải bảng xếp hạng từ server..."})]}),!t&&f&&(0,a.jsxs)("div",{className:"overflow-hidden rounded-[24px] border border-slate-200 bg-white shadow-[0_8px_30px_rgba(0,0,0,0.08)]",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between gap-3 border-b border-[#4681E8]/20 bg-gradient-to-r from-[#4681E8] to-[#2563eb] px-6 py-4 text-white shadow-[0_4px_25px_rgba(70,129,232,0.3)]",children:[(0,a.jsx)("div",{className:"text-[13px] font-black uppercase tracking-[0.2em] drop-shadow-sm text-white/80",children:"League"}),(0,a.jsx)("div",{className:"truncate text-sm font-black sm:text-base drop-shadow-md",children:e.league_name})]}),(0,a.jsx)("div",{className:"overflow-x-auto",children:(0,a.jsxs)("table",{className:"w-full text-left border-collapse",children:[(0,a.jsx)("thead",{children:(0,a.jsx)("tr",{className:"bg-slate-50 text-[11px] uppercase tracking-[0.2em] text-slate-500",children:e.header.map((t,s)=>{let l=e.teams.some(e=>e.form&&e.form.length>0);return t.toLowerCase().includes("phong độ")&&!l?null:(0,a.jsx)("th",{colSpan:s===e.header.length-1&&l?5:1,className:`p-4 font-semibold ${1===s?"w-1/3 text-left":"text-center"}`,children:t},s)})})}),(0,a.jsx)("tbody",{className:"text-sm",children:e.teams.map((t,s)=>(o(Number(t.data[0]||s+1),e.teams.length),(0,a.jsxs)("tr",{className:"group border-b border-slate-100 bg-white transition-colors hover:bg-slate-50 cursor-pointer",children:[t.data.map((s,l)=>0===l?(0,a.jsx)(x,{value:s,totalTeams:e.teams.length},l):1===l?(0,a.jsx)("td",{className:"p-4",children:(0,a.jsxs)("div",{className:"flex items-center gap-3 rounded-2xl border border-slate-100 bg-slate-50 px-4 py-2.5 transition-colors group-hover:border-[#4681E8]/30 group-hover:bg-[#4681E8]/5",children:[t.team_logo?(0,a.jsx)("img",{src:t.team_logo,alt:s,className:"h-8 w-8 rounded-full bg-white object-contain p-0.5 filter drop-shadow-[0_2px_4px_rgba(0,0,0,0.1)]",loading:"lazy"}):(0,a.jsx)("div",{className:"flex h-8 w-8 items-center justify-center rounded-full border border-slate-200 bg-white text-[10px] font-bold text-slate-400",children:"?"}),(0,a.jsx)("span",{className:"font-bold text-slate-800 transition-colors group-hover:text-[#4681E8]",children:s})]})},l):(0,a.jsx)("td",{className:"p-4 text-center font-mono text-slate-600",children:s},l)),t.form&&t.form.length>0&&(0,a.jsxs)(a.Fragment,{children:[t.form.map((e,t)=>(0,a.jsx)("td",{className:"p-2 text-center",children:e.match_time?(0,a.jsx)(c,{detail:e}):(0,a.jsx)(d,{result:e.result})},`form-${t}`)),t.form.length<5&&Array.from({length:5-t.form.length}).map((e,t)=>(0,a.jsx)("td",{className:"p-2"},`pad-${t}`))]})]},s)))})]})})]}),!t&&!f&&j&&(0,a.jsx)(m,{rankings:e.rankings}),!t&&!f&&!j&&e.header&&e.teams&&(0,a.jsx)("div",{className:"text-center py-20 text-slate-600",children:"Dữ liệu đang được cập nhật..."}),!t&&(f||j)&&(0,a.jsxs)("div",{className:"mt-6 flex flex-wrap items-center gap-5 px-5 py-4 bg-slate-50 rounded-2xl border border-slate-200",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,a.jsx)("span",{className:"w-2.5 h-2.5 rounded-full bg-emerald-500"}),(0,a.jsx)("span",{className:"text-[11px] text-slate-600 font-bold uppercase tracking-wider",children:"Đội trưởng bảng"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,a.jsx)("span",{className:"w-2.5 h-2.5 rounded-full bg-sky-4
93300"}),(0,a.jsx)("span",{className:"text-[11px] text-slate-600 font-bold uppercase tracking-wider",children:"Champions League"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,a.jsx)("span",{className:"w-2.5 h-2.5 rounded-full bg-amber-500"}),(0,a.jsx)("span",{className:"text-[11px] text-slate-600 font-bold uppercase tracking-wider",children:"Europa League"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,a.jsx)("span",{className:"w-2.5 h-2.5 rounded-full bg-[#f97316]"}),(0,a.jsx)("span",{className:"text-[11px] text-slate-600 font-bold uppercase tracking-wider",children:"Europa Conference"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,a.jsx)("span",{className:"w-2.5 h-2.5 rounded-full bg-[#E11D48]"}),(0,a.jsx)("span",{className:"text-[11px] text-slate-600 font-bold uppercase tracking-wider",children:"Xuống hạng"})]})]})]})}function m({rankings:e}){if(!e||0===e.length)return null;let t=e[0].data,s=e.slice(1);return(0,a.jsx)("div",{className:"overflow-hidden rounded-[22px] border border-[#cbd5e1] bg-[linear-gradient(180deg,#191a20,#111218)] shadow-[0_24px_80px_rgba(0,0,0,0.4)]",children:(0,a.jsx)("div",{className:"overflow-x-auto",children:(0,a.jsxs)("table",{className:"w-full text-left border-collapse",children:[(0,a.jsx)("thead",{children:(0,a.jsx)("tr",{className:"bg-white text-[11px] uppercase tracking-[0.18em] text-slate-600",children:t.map((e,l)=>{let r=l===t.length-1,n=s[0]&&s[0].data.length>t.length?s[0].data.length-t.length+1:1;return(0,a.jsx)("th",{colSpan:r?n:1,className:`p-4 font-semibold ${1===l?"w-1/3 text-left":"text-center"}`,children:e},l)})})}),(0,a.jsx)("tbody",{className:"text-sm",children:s.map((e,t)=>(0,a.jsx)("tr",{className:"group border-b border-[#cbd5e1] transition-colors hover:bg-white",children:e.data.map((t,l)=>0===l?(0,a.jsx)(x,{value:t,totalTeams:s.length},l):1===l?(0,a.jsx)("td",{className:"p-4",children:(0,a.jsxs)("div",{className:"flex items-center gap-3 rounded-2xl border border-white/6 bg-[linear-gradient(180deg,rgba(255,255,255,0.03),rgba(255,255,255,0.01))] px-3 py-2 transition-colors group-hover:border-emerald-600/22",children:[e.team_logo?(0,a.jsx)("img",{src:e.team_logo,alt:t,className:"h-8 w-8 rounded-full bg-white/5 object-contain ring-1 ring-white/8",loading:"lazy"}):(0,a.jsx)("div",{className:"flex h-8 w-8 items-center justify-center rounded-full border border-gray-700 bg-gray-800 text-xs font-bold text-gray-500",children:"?"}),(0,a.jsx)("span",{className:"font-bold text-slate-900 transition-colors group-hover:text-emerald-600",children:t})]})},l):["W","D","L"].includes(t)?(0,a.jsx)("td",{className:"p-2 text-center",children:(0,a.jsx)("span",{className:`inline-flex h-7 w-7 items-center justify-center rounded-[8px] text-[11px] font-black ${i(t)}`,children:t})},l):(0,a.jsx)("td",{className:"p-4 text-center font-mono text-slate-600",children:t},l))},t))})]})})})}},89619:(e,t,s)=>{"use strict";s.d(t,{V:()=>r});var a=s(68019),l=s(70508);function r({eyebrow:e,title:t,titleAddon:s,rightSlot:n,className:i}){return(0,a.jsx)("div",{className:(0,l.cn)("relative mb-5 overflow-hidden border-b border-slate-200",i),children:(0,a.jsxs)("div",{className:"flex items-center justify-between px-1 py-4 min-h-[56px]",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 min-w-0",children:[(0,a.jsx)("span",{className:"h-8 w-1 shrink-0 rounded-sm bg-gradient-to-b from-[#4681E8] to-[#55CAF1] shadow-[0_0_10px_rgba(70,129,232,0.5)]"}),(0,a.jsxs)("div",{className:"min-w-0",children:[e&&(0,a.jsx)("div",{className:"text-[10px] font-bold uppercase tracking-[0.2em] text-[#4681E8]/60 mb-0.5",children:e}),(0,a.jsxs)("div",{className:"flex items-center gap-2.5 flex-wrap",children:[(0,a.jsx)("h1",{className:"text-[18px] sm:text-[22px] font-black uppercase tracking-tight text-slate-800 leading-none",children:t}),s]})]})]}),n&&(0,a.jsx)("div",{className:"hidden sm:flex items-center gap-2 text-right shrink-0 ml-4",children:n})]})})}},90868:(e,t,s)=>{"use strict";s.d(t,{Klivevip12MatchDetailPage:()=>m});var a=s(68019),l=s(10707),r=s(58420);function n({src:e,poster:t,autoPlay:s=!0,onError:i,className:o=""}){let c=(0,l.useRef)(null),d=(0,l.useRef)(i);d.current=i;let[x,h]=(0,l.useState)(!1),[m,p]=(0,l.useState)(!1);return((0,l.useEffect)(()=>{let t=c.current;if(!t)return;let a=null;h(!1);let l=()=>p(!0),n=()=>p(!1);t.addEventListener("play",l),t.addEventListener("pause",n);let i=()=>{s&&(t.muted=!0,t.play().catch(()=>{}))};if(t.addEventListener("canplay",i),r.Ay.isSupported()){(a=new r.Ay({maxBufferLength:30,maxMaxBufferLength:60,lowLatencyMode:!0,enableWorker:!0})).loadSource(e),a.attachMedia(t),a.on(r.Ay.Events.MANIFEST_PARSED,()=>{s&&(t.muted=!0,t.play().catch(e=>{console.warn("AutoPlay failed:",e),t.muted=!1}))});let l=0,n=0;a.on(r.Ay.Events.ERROR,(e,t)=>
933{if(t.type===r.Ay.ErrorTypes.NETWORK_ERROR&&(++l>2||t.response&&t.response.code>=400)){console.error("HLS Network Error threshold reached (CORS/404), triggering fallback.",t),h(!0),d.current&&d.current(t),a?.destroy();return}if(t.fatal)switch(t.type){case r.Ay.ErrorTypes.NETWORK_ERROR:console.error("HLS Fatal Network Error, recovering...",t),a?.startLoad();break;case r.Ay.ErrorTypes.MEDIA_ERROR:console.error("HLS Media Error, recovering...",t),++n>3?(console.error("HLS Media Error threshold reached, triggering fallback."),h(!0),d.current&&d.current(t),a?.destroy()):a?.recoverMediaError();break;default:console.error("HLS Fatal Error:",t),h(!0),d.current&&d.current(t),a?.destroy()}})}else t.canPlayType("application/vnd.apple.mpegurl")&&(t.src=e,t.addEventListener("loadedmetadata",()=>{s&&t.play().catch(e=>{console.warn("AutoPlay failed:",e)})}),t.addEventListener("error",e=>{h(!0),d.current&&d.current(e)}));return()=>{t.removeEventListener("play",l),t.removeEventListener("pause",n),t.removeEventListener("canplay",i),a&&a.destroy()}},[e,s]),x)?i?null:(0,a.jsxs)("div",{className:`w-full h-full flex flex-col items-center justify-center bg-white/80 backdrop-blur ${o}`,children:[(0,a.jsx)("svg",{className:"w-12 h-12 text-red-500 mb-4 opacity-80",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"})}),(0,a.jsx)("div",{className:"text-slate-600 text-sm font-medium",children:"Video/Stream kh\xf4ng khả dụng hoặc bị lỗi mạng"}),(0,a.jsx)("div",{className:"text-gray-500 text-xs mt-1",children:"Vui l\xf2ng thử lại sau hoặc chọn nguồn kh\xe1c"})]}):(0,a.jsx)("div",{className:`relative group w-full h-full bg-white flex items-center justify-center overflow-hidden ${o}`,children:(0,a.jsx)("video",{ref:c,className:"w-full h-full object-contain",controls:!0,playsInline:!0,muted:s,poster:t,referrerPolicy:"no-referrer"})})}function i(e){let t=(e||"").split(/[\s-]+/).slice(0,2).map(e=>e[0]||"").join("").toUpperCase()||"??";return`data:image/svg+xml,${encodeURIComponent(`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 80 80"><rect width="80" height="80" rx="20" fill="#1a1c25"/><text x="40" y="47" font-size="20" font-family="Arial" font-weight="700" text-anchor="middle" fill="#666">${t}</text></svg>`)}`}function o({homeName:e,awayName:t,homeLogo:s,awayLogo:l,homeScore:r="0",awayScore:n="0",statusText:c="LIVE",timeText:d="",isLive:x=!0,sportId:h="1",matchId:m}){let p=s||i(e),u=l||i(t),g="5"===String(h),b="2"===String(h),f="bg-slate-200 border-slate-200",j="repeating-linear-gradient(90deg, transparent, transparent 10%, #000 10%, #000 20%)";return g?(f="bg-slate-100 border-slate-200",j="none"):b&&(f="bg-[#bc7a46] border-[#8a4e21]",j="repeating-linear-gradient(90deg, transparent, transparent 5%, #000 5%, #000 10%)"),(0,a.jsxs)("div",{className:"relative w-full aspect-video min-h-[300px] max-h-[600px] bg-slate-50 overflow-hidden flex flex-col justify-center",children:[(0,a.jsx)("div",{className:"absolute inset-0 flex items-center justify-center pointer-events-none mt-16 md:mt-24",children:(0,a.jsx)("div",{className:"relative w-[120%] h-[120%] sm:w-[90%] sm:h-[120%] max-w-[900px] flex-shrink-0 transition-transform duration-1000",style:{transform:"perspective(900px) rotateX(60deg) scale(0.9)",transformOrigin:"center center"},children:(0,a.jsxs)("div",{className:`absolute inset-0 ${f} shadow-[0_30px_60px_rgba(0,0,0,0.8)] border-4 rounded-xl overflow-hidden flex transition-colors duration-500`,children:[(0,a.jsx)("div",{className:"absolute inset-0 opacity-15 pointer-events-none",style:{backgroundImage:j}}),(0,a.jsxs)("div",{className:"absolute inset-[4%] pointer-events-none shadow-sm flex items-center justify-center",children:["1"===String(h)&&(0,a.jsxs)("div",{className:"absolute inset-0 w-full h-full border-2 border-white/60",children:[(0,a.jsx)("div",{className:"absolute left-1/2 top-0 bottom-0 w-0 border-l-2 border-white/60 -translate-x-1/2"}),(0,a.jsx)("div",{className:"absolute left-1/2 top-1/2 w-[18%] aspect-square rounded-full border-2 border-white/60 -translate-x-1/2 -translate-y-1/2"}),(0,a.jsx)("div",{className:"absolute left-1/2 top-1/2 w-2 h-2 rounded-full bg-white/80 -translate-x-1/2 -translate-y-1/2"}),(0,a.jsx)("div",{className:"absolute left-0 top-1/2 w-[16%] h-[46%] border-2 border-l-0 border-white/60 -translate-y-1/2 bg-slate-200"}),(0,a.jsx)("div",{className:"absolute left-0 top-1/2 w-[6%] h-[20%] border-2 border-l-0 border-white/60 -translate-y-1/2 bg-slate-200"}),(0,a.jsx)("div",{className:"absolute left-[16%] top-1/2 w-[8%] aspect-square border-2 border-l-0 border-white/60 rounded-r-full -translate-y-1/2 clip-path-half",style:{clipPath:"inset(0 0 0 50%)"}}),(0,a.jsx)("div",{className:"absolute right-0 top-1/2 w-[16%] h-[46%] border-2 border-r-0 border-white/60 -translate-y-1/2 bg-slate-200"}),(0,a.jsx)("div",{className:"absolute right-0 top-1/2 w-[6%] h-[20%] border-2 border-r-0 border-white/60 -translate-y-1/2 bg-slate-200"}),(0,a.jsx)("div",{className:"absolute right-[16%] top-1/2 w-[8%] aspect-square border-2 border-r-0 border-white/60 rounded-l-full -translate-y-1/2 clip-path-half",style:{clipPath:"inset(0 50% 0 0)"}})]}),g&&(0,a.jsxs)("div",{className:"absolute inset-[10%] w-[80%] h-[80%
933] border-2 border-white/80 bg-white",children:[(0,a.jsx)("div",{className:"absolute top-[10%] bottom-[10%] left-0 right-0 border-y-2 border-white/80"}),(0,a.jsx)("div",{className:"absolute left-1/2 top-[-2%] bottom-[-2%] w-1 bg-white/40 shadow-xl -translate-x-1/2 z-10"}),(0,a.jsx)("div",{className:"absolute left-[25%] right-[25%] top-[10%] bottom-[10%] border-x-2 border-white/80"}),(0,a.jsx)("div",{className:"absolute left-[25%] right-[25%] top-1/2 w-[50%] border-t-2 border-white/80 -translate-y-1/2"}),(0,a.jsx)("div",{className:"absolute left-0 top-1/2 w-[2%] border-t-2 border-white/80 -translate-y-1/2"}),(0,a.jsx)("div",{className:"absolute right-0 top-1/2 w-[2%] border-t-2 border-white/80 -translate-y-1/2"})]}),b&&(0,a.jsxs)("div",{className:"absolute inset-0 w-full h-full border-2 border-white/50",children:[(0,a.jsx)("div",{className:"absolute left-1/2 top-0 bottom-0 w-0 border-l-2 border-white/50 -translate-x-1/2"}),(0,a.jsx)("div",{className:"absolute left-1/2 top-1/2 w-[15%] aspect-square rounded-full border-2 border-white/50 -translate-x-1/2 -translate-y-1/2"}),(0,a.jsx)("div",{className:"absolute left-0 top-1/2 w-[18%] h-[35%] border-2 border-l-0 border-white/50 -translate-y-1/2 bg-[#bc7a46]"}),(0,a.jsx)("div",{className:"absolute left-[18%] top-1/2 w-[10%] aspect-square rounded-full border-2 border-white/50 -translate-y-1/2"}),(0,a.jsx)("div",{className:"absolute left-0 top-1/2 w-[30%] h-[70%] border-2 border-l-0 border-white/50 rounded-r-full -translate-y-1/2 opacity-60"}),(0,a.jsx)("div",{className:"absolute right-0 top-1/2 w-[18%] h-[35%] border-2 border-r-0 border-white/50 -translate-y-1/2 bg-[#bc7a46]"}),(0,a.jsx)("div",{className:"absolute right-0 top-1/2 w-[30%] h-[70%] border-2 border-r-0 border-white/50 rounded-l-full -translate-y-1/2 opacity-60"})]})]}),x&&(0,a.jsx)("div",{className:`absolute left-1/2 top-1/2 shadow-[0_8px_16px_rgba(0,0,0,0.8)] z-10 transition-all duration-[3000ms] border-2 border-white/20 rounded-full
934                                ${g?"w-2 h-2 sm:w-3 sm:h-3 bg-[#ccff00]":b?"w-4 h-4 sm:w-6 sm:h-6 bg-[#d95d16]":"w-4 h-4 sm:w-5 sm:h-5 bg-white"}`,style:{animation:"ballMove 8s infinite alternate ease-in-out",transform:"translate(-50%, -50%)"},children:(0,a.jsx)("div",{className:"absolute -bottom-4 left-1/2 w-4 h-2 bg-white/40 rounded-full blur-sm -translate-x-1/2"})}),x&&(0,a.jsxs)("div",{className:"absolute left-[65%] top-[60%] flex flex-col items-center animate-bounce-slow",style:{animation:"floatBubble 4s infinite alternate ease-in-out"},children:[(0,a.jsxs)("div",{className:"bg-white/95 backdrop-blur border border-white/10 rounded-2xl p-2 shadow-2xl flex items-center gap-3 w-max max-w-[200px]",children:[(0,a.jsx)("div",{className:"w-6 h-6 rounded-full flex items-center justify-center p-0.5 bg-white/5 shrink-0",children:(0,a.jsx)("img",{src:p,alt:e||"Home team",className:"max-w-full max-h-full object-contain",onError:t=>t.target.src=i(e),loading:"lazy",decoding:"async"})}),(0,a.jsx)("div",{className:"flex flex-col pr-1 overflow-hidden",children:(0,a.jsx)("span",{className:"text-slate-900 font-bold text-[10px] sm:text-xs tracking-wide truncate",children:g?"Serve / Return":"Tấn c\xf4ng nguy hiểm"})})]}),(0,a.jsx)("div",{className:"w-0 h-0 border-l-[6px] border-r-[6px] border-t-[6px] border-l-transparent border-r-transparent border-t-[#1a1c28]/95 mt-[-1px]"})]})]})})}),(0,a.jsx)("div",{className:"relative z-20 flex-1 flex flex-col items-center justify-start p-4 md:p-6 pointer-events-none w-full",children:(0,a.jsxs)("div",{className:"w-full max-w-[800px] flex items-center justify-between px-4 sm:px-6 py-3 rounded-xl bg-gradient-to-r from-[#0d0f14]/90 via-[#151821]/95 to-[#0d0f14]/90 backdrop-blur-xl border border-white/10 shadow-[0_10px_40px_rgba(0,0,0,0.8)] pointer-events-auto",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 flex-1 min-w-0 pr-2",children:[(0,a.jsx)("img",{src:p,alt:e,className:"w-8 h-8 md:w-12 md:h-12 object-contain drop-shadow-lg shrink-0",onError:t=>t.target.src=i(e),loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-slate-900 text-xs sm:text-sm md:text-base font-bold truncate tracking-wide",children:e})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1 shrink-0 px-2 sm:px-6 min-w-[100px]",children:[(0,a.jsxs)("span",{className:`inline-flex items-center gap-1.5 px-2.5 py-0.5 rounded-full text-[10px] sm:text-xs font-bold shadow-inner ${x?"bg-green-500/10 text-green-400 border border-green-500/20":"bg-white/5 text-slate-900/40"}`,children:[x&&(0,a.jsx)("span",{className:"w-1.5 h-1.5 rounded-full bg-green-500 animate-pulse shadow-[0_0_8px_#22c55e]"}),d||c]}),(0,a.jsxs)("div",{className:"flex gap-3 sm:gap-5 items-center justify-center",children:[(0,a.jsx)("span",{className:"text-slate-900 text-2xl sm:text-4xl font-black drop-shadow-md",children:r}),(0,a.jsx)("span",{className:"text-slate-900/30 text-xl font-light",children:"-"}),(0,a.jsx)("span",{className:"text-slate-900 text-2xl sm:text-4xl font-black drop-shadow-md",children:n})]})]}),(0,a.jsxs)("div",{className:"flex items-center justify-end gap-3 flex-1 min-w-0 pl-2 text-right",children:[(0,a.jsx)("span",{className:"text-slate-900 text-xs sm:text-sm md:text-base font-bold truncate tracking-wide",children:t}),(0,a.jsx)("img",{src:u,alt:t,className:"w-8 h-8 md:w-12 md:h-12 object-contain drop-shadow-lg shrink-0",onError:e=>e.target.src=i(t),loading:"lazy",decoding:"async"})]})]})}),(0,a.jsx)("div",{className:"relative z-20 mt-auto w-full p-4 flex justify-center pointer-events-none",children:(0,a.jsx)("div",{className:"w-full max-w-[600px] h-6 bg-white/40 backdrop-blur-md rounded-full border border-white/5 flex items-center px-4",children:(0,a.jsxs)("div",{className:"flex-1 h-0.5 bg-white/10 relative rounded-full",children:[x&&(0,a.jsx)("div",{className:"absolute left-0 top-0 bottom-0 bg-gradient-to-r from-[#b38b22] to-[#ffda6a] w-[65%] rounded-full opacity-90 shadow-[0_0_12px_#daa520]"}),(0,a.jsx)("span",{className:"absolute left-[65%] top-1/2 -translate-y-1/2 -translate-x-1/2 w-1.5 h-1.5 rounded-full bg-white shadow-md"})]})})}),(0,a.jsx)("style",{children:`
935                @keyframes ballMove {
936                    0% { transform: translate(-30%, -20%) scale(1); }
937                    25% { transform: translate(40%, -10%) scale(1.1); }
938                    50% { transform: translate(20%, 30%) scale(0.9); }
939                    75% { transform: translate(-10%, 15%) scale(1.2); }
940                    100% { transform: translate(-45%, 0%) scale(1); }
941                }
942                @keyframes floatBubble {
943                    0% { transform: translateY(0px) translateX(0px); }
944                    50% { transform: translateY(-8px) translateX(4px); }
945                    100% { transform: translateY(4px) translateX(-4px); }
946                }
947            `})]})}function c(e,t){if("1"===t||"2"===t)switch(e){case"2":return{t:"HT 1",live:!0,sc:!0};case"3":return{t:"Giữa giờ",live:!0,sc:!0};case"4":return{t:"HT 2",live:!0,sc:!0};case"5":return{t:"Hiệp phụ",live:!0,sc:!0};case"7":return{t:"Penalty",live:!0,sc:!0};case"8":case"9":return{t:"Kết th\xfac",live:!1,sc:!0};default:return{t:"Chưa bắt đầu",live:!1,sc:!1}}
947return["51","52","53","54","55"].includes(e)?{t:`Set ${e-50}`,live:!0,sc:!0}:["100","90","110"].includes(e)?{t:"KT",live:!1,sc:!0}:"0"===e||"1"===e?{t:"Chưa bắt đầu",live:!1,sc:!1}:{t:"LIVE",live:!0,sc:!0}}function d(e){let t=(e||"").split(/[\s-]+/).slice(0,2).map(e=>e[0]||"").join("").toUpperCase()||"??";return`data:image/svg+xml,${encodeURIComponent(`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 80 80"><rect width="80" height="80" rx="20" fill="#1a1c25"/><text x="40" y="47" font-size="20" font-family="Arial" font-weight="700" text-anchor="middle" fill="#666">${t}</text></svg>`)}`}function x(e){let t=new Date(1e3*parseInt(e||"0",10));return{hm:t.toLocaleTimeString("vi-VN",{hour:"2-digit",minute:"2-digit",timeZone:"Asia/Ho_Chi_Minh"}),dm:t.toLocaleDateString("vi-VN",{day:"2-digit",month:"2-digit",timeZone:"Asia/Ho_Chi_Minh"}),full:t.toLocaleDateString("vi-VN",{day:"2-digit",month:"2-digit",year:"numeric",timeZone:"Asia/Ho_Chi_Minh"})}}let h="max-w-[1200px]";function m({matchData:e,relatedMatches:t,matchDetails:s,standings:r,brandingNameUpper:i}){let p,u,g,j,v,y,[C,S]=(0,l.useState)("odds"),L=e?.match_data?.anchors||[],[$,F]=(0,l.useState)(!1),[T,A]=(0,l.useState)(!1),[M,H]=(0,l.useState)(null),[D,B]=(0,l.useState)(!1),z=(0,l.useRef)(0);(0,l.useEffect)(()=>{if(!e?.has_live||"1"!==e.has_live||0===L.length)return;let t=!1;B(!0);let s=async t=>{let s=t?.uid,a=`/api/socolive/proxy-stream?url=${encodeURIComponent(`https://live.inplyr.com/${s?`room/${s}`:`default/${e.id}`}.m3u8`)}`;try{let e=await fetch(a,{method:"GET",cache:"no-store"});if(!e.ok)return null;let s=(await e.text()).split("\n").filter(e=>e.trim()&&!e.startsWith("#"));if(0===s.length)return null;return(await fetch(s[0],{method:"HEAD",cache:"no-store"})).ok?t:null}catch{return null}};return Promise.all(L.map(e=>s(e))).then(e=>{if(t)return;let s=e.find(e=>null!==e);s?(H(s),F(!0),A(!1)):(H(L[0]),A(!0)),B(!1)}),()=>{t=!0}},[e?.has_live,L.length]),(0,l.useEffect)(()=>{if(!T||D||z.current>=20)return;let t=setTimeout(()=>{z.current++,A(!1),B(!0);let t=async t=>{let s=t?.uid,a=`/api/socolive/proxy-stream?url=${encodeURIComponent(`https://live.inplyr.com/${s?`room/${s}`:`default/${e.id}`}.m3u8`)}`;try{let e=await fetch(a,{method:"GET",cache:"no-store"});if(!e.ok)return null;let s=(await e.text()).split("\n").filter(e=>e.trim()&&!e.startsWith("#"));if(0===s.length)return null;return(await fetch(s[0],{method:"HEAD",cache:"no-store"})).ok?t:null}catch{return null}};Promise.all(L.map(e=>t(e))).then(e=>{let t=e.find(e=>null!==e);t?(H(t),F(!0),A(!1)):A(!0),B(!1)})},15e3);return()=>clearTimeout(t)},[T,D]);let[I,R]=(0,l.useState)(null),U=e?.post_name||e?.ls_id||e?.id;if(window.location.origin,(0,l.useEffect)(()=>{if(!U)return;let e=setInterval(async()=>{try{let e=await fetch(`/api/klivevip/match/${U}`,{cache:"no-store"});if(e.ok){let t=await e.json();R(t?.match??null)}}catch{}},1e4);return()=>clearInterval(e)},[U]),!e)return(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center py-32 gap-4",children:[(0,a.jsx)("span",{className:"text-[#64748B] text-lg",children:"Kh\xf4ng t\xecm thấy trận đấu"}),(0,a.jsx)("a",{href:"/",className:"text-[#4681E8] hover:underline text-sm",children:"← Quay lại"})]});let G=I?{...e,...I}:e,P=G?.has_live==="1"&&L.length>0,K=c(G.status_id,G.sport_id),V=$&&M&&!T&&!D,W=P&&(D||T&&K.live&&z.current<20),O=!P||T&&!W&&!D,q=!K.live&&"8"!==String(G.status_id)&&"9"!==String(G.status_id),{hm:X,full:Y}=x(G.time),Z=G.source_card_meta?.league_label||G.match_data?.competition_vi||G.match_data?.competition_full||"",Q=G.match_data?.stage_label||G.source_card_meta?.stage_label||"",J=G.home_logo||d(G.home_name),ee=G.away_logo||d(G.away_name),et=e=>t=>{t.target.src=d(e)};return(0,a.jsxs)("div",{className:"w-full bg-white min-h-screen text-slate-600 font-sans pb-16",children:[(0,a.jsx)("div",{className:"w-full border-b border-slate-200 bg-white",children:(0,a.jsxs)("div",{className:`${h} mx-auto px-4 py-3 flex items-center justify-between`,children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 text-[13px] font-bold",children:[(0,a.jsx)("span",{className:"text-[#4681E8] uppercase tracking-wide",children:Z}),Q&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"text-slate-300",children:"•"}),(0,a.jsx)("span",{className:"text-slate-600",children:Q})]})]}),(0,a.jsx)("div",{className:"text-[12px] font-mono text-slate-400 hidden sm:block",children:Y})]})}),(0,a.jsxs)("div",{className:`${h} mx-auto px-0 md:px-4 py-0 md:py-6 flex flex-col lg:flex-row gap-4 lg:gap-6`,children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0 flex flex-col gap-4 lg:gap-6",children:[(0,a.jsxs)("div",{className:"w-full relative bg-[#000000] rounded-none md:rounded-2xl overflow-hidden shadow-[0_10px_40px_rgba(0,0,0,0.5)] border-y md:border border-slate-200",children:[(0,a.jsx)("div",{className:"relative w-full aspect-video bg-[#000000] group z-10",children:V?(0,a.jsx)(n,{src:`/api/klivevip/proxy-stream?url=${encodeURIComponent(`https://live.inplyr.com/${M?.uid&&"default"!==M.uid?`room/${M.uid}`:`default/${G.id}`}.m3u8`)}`,autoPlay:!0,onError:()=>A(!0)}):O?(0,a.jsx)(o,{homeName:G.home_name,awayName:G.away_name,homeLogo:G.home_logo,awayLogo:G.away_logo,homeScore:K.sc?G.home_score:"0",awayScore:K.sc?G.away_score:"0",statusText:K.t,timeText:G.time_text||X,isLive:K.live,sportId:G.sport_id,matchId:G.ls_id||G.id,kickoffMs:1e3*Number(G?.time||0),isPreMatch:q}):(0,a.jsxs)("div",{className:"absolute inset-0 z-10 flex flex-col items-center justify-center p-4 lg:p-10",children:[(0,a.jsxs)("div",{className:"absolute inset-0 flex justify-between items-center opacity-[0.03] pointer-events-none px-4 lg:px-20 overflow-hidden",children:[(0,a.jsx)("img",{src:J,alt:"",className:"w-1/2 max-w-[400px] blur-[10px]",loading:"lazy",decoding:"async"}),(0,a.jsx)("img",{src:ee,alt:"",className:"w-1/2 max-w-[400px] blur-[10px]",loading:"lazy",decoding:"async"})]}),P&&!T&&(0,a.jsx)("button",{onClick:()=>F(!0),className:"group mb-4 sm:mb-8 w-16 h-16 md:w-20 md:h-20 rounded-full bg-[#4681E8] flex items-center justify-center hover:bg-[#55CAF1] transition-all shadow-[0_0_30px_rgba(70,129,232,0.5)] curs
947or-pointer z-20",children:(0,a.jsx)("svg",{className:"w-8 h-8 md:w-10 md:h-10 text-white ml-1.5 md:ml-2 group-hover:scale-110 transition-transform",viewBox:"0 0 24 24",fill:"currentColor",children:(0,a.jsx)("path",{d:"M8 5v14l11-7z"})})}),(0,a.jsxs)("div",{className:"grid grid-cols-[1fr_auto_1fr] items-center w-full max-w-[800px] gap-2 lg:gap-8 z-20",children:[(0,a.jsxs)("div",{className:"flex flex-col items-center gap-2 lg:gap-4",children:[(0,a.jsx)("img",{src:J,alt:G.home_name,className:"w-16 h-16 sm:w-24 sm:h-24 lg:w-32 lg:h-32 object-contain drop-shadow-[0_10px_20px_rgba(0,0,0,0.8)]",onError:et(G.home_name),loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-[#FFFFFF] text-xs sm:text-base lg:text-lg font-black text-center line-clamp-2 uppercase tracking-wide",children:G.home_name})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-2 lg:gap-3",children:[K.sc?(0,a.jsxs)("div",{className:"flex items-center gap-3 lg:gap-6 bg-white/90 backdrop-blur-md px-4 py-2 lg:px-8 lg:py-4 rounded-2xl border border-slate-200 shadow-2xl",children:[(0,a.jsx)("span",{className:"text-[#4681E8] text-[32px] sm:text-[48px] lg:text-[64px] font-black leading-none",children:G.home_score}),(0,a.jsx)("span",{className:"text-slate-300 text-[20px] lg:text-[28px] font-light",children:":"}),(0,a.jsx)("span",{className:"text-[#4681E8] text-[32px] sm:text-[48px] lg:text-[64px] font-black leading-none",children:G.away_score})]}):(0,a.jsx)("div",{className:"text-[#FFFFFF] text-[32px] sm:text-[48px] lg:text-[56px] font-black tracking-widest leading-none drop-shadow-xl",children:X}),(0,a.jsxs)("span",{className:`inline-flex items-center gap-2 rounded-full px-3 py-1 lg:px-5 lg:py-1.5 text-[10px] lg:text-[12px] font-bold tracking-widest uppercase ${K.live?"bg-[#4681E8] text-white shadow-[0_0_20px_rgba(70,129,232,0.6)]":"bg-white text-slate-600 border border-slate-200"}`,children:[K.live&&(0,a.jsx)("span",{className:"w-2 h-2 rounded-full bg-white animate-pulse"}),K.t,G.time_text?` : ${G.time_text}`:""]})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-2 lg:gap-4",children:[(0,a.jsx)("img",{src:ee,alt:G.away_name,className:"w-16 h-16 sm:w-24 sm:h-24 lg:w-32 lg:h-32 object-contain drop-shadow-[0_10px_20px_rgba(0,0,0,0.8)]",onError:et(G.away_name),loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-[#FFFFFF] text-xs sm:text-base lg:text-lg font-black text-center line-clamp-2 uppercase tracking-wide",children:G.away_name})]})]})]})}),L.length>0&&(0,a.jsxs)("div",{className:"w-full bg-white border-t border-slate-200 px-3 lg:px-6 py-2.5 lg:py-4 flex items-center gap-2 lg:gap-4 overflow-x-auto z-20",children:[(0,a.jsx)("span",{className:"text-[10px] lg:text-[11px] text-slate-600 uppercase font-bold tracking-widest shrink-0 mr-1 lg:mr-2",children:"CHỌN K\xcaNH TRUYỀN:"}),L.map((e,t)=>(0,a.jsxs)("button",{onClick:()=>{H(e),F(!0),A(!1)},className:`shrink-0 flex items-center gap-1.5 lg:gap-2 rounded-full px-3 py-1.5 lg:px-5 lg:py-2 text-[11px] lg:text-[13px] font-bold transition-all ${M?.uid===e.uid&&!T?"bg-[#4681E8]/10 border border-[#4681E8] text-[#4681E8] shadow-[0_0_15px_rgba(70,129,232,0.2)]":"bg-white border border-slate-200 text-slate-600 hover:text-[#4681E8] hover:border-[#4681E8]/50"}`,children:[(0,a.jsx)("span",{className:`w-1.5 h-1.5 lg:w-2 lg:h-2 rounded-full ${M?.uid===e.uid&&!T?"bg-[#4681E8] animate-pulse":"bg-transparent"}`}),"BLV ",e.nickName||`K\xeanh ${t+1}`]},e.uid||t))]})]}),(p=(()=>{let e=s?.stats;if(!e)return!1;let t=null;return Array.isArray(e)&&e.length>0?t=e[0]:e?.results?.[0]?t=e.results[0]:e?.stats_full_time&&(t=e),!!t&&!!(t.stats_full_time?.length>0||t.stats_haft_time?.length>0||t.stats_half_time?.length>0||t.stats?.length>0)})(),u=!!(s?.lineup&&(Array.isArray(s.lineup)?s.lineup.length>0:s.lineup.home||s.lineup.away)),g=!!(s?.events&&(Array.isArray(s.events)?s.events.length>0:s.events.incidents?.length>0||s.events.data?.length>0)),j=!!(r&&(Array.isArray(r)?r.length>0:r.data?.length>0)),(y=(v=[{id:"stats",label:"THỐNG K\xca",show:p},{id:"lineup",label:"ĐỘI H\xccNH",show:u},{id:"events",label:"DIỄN BIẾN",show:g},{id:"standings",label:"BẢNG XH",show:j},{id:"odds",label:"TỶ LỆ K\xc8O",show:!!(s?.odds&&Array.isArray(s.odds)&&s.odds.length>0)}].filter(e=>e.show)).find(e=>e.id===C)?C:v[0]?.id||"odds")!==C&&setTimeout(()=>S(y),0),v.length>0?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"bg-white rounded-2xl p-2 border border-slate-200 flex overflow-x-auto gap-2 shadow-[0_4px_15px_rgba(0,0,0,0.08)] mx-4 md:mx-0",children:v.map(({id:e,label:t})=>(0,a.jsx)("button",{onClick:()=>S(e),className:`flex-1 min-w-[100px] py-2.5 sm:py-3 text-[10px] sm:text-[12px] font-black uppercase tracking-widest rounded-xl transition-all ${y===e?"bg-[#4681E8]/10 text-[#4681E8] border border-[#4681E8]/30 shadow-inner":"text-slate-500 hover:text-[#4681E8] hover:bg-[#4681E8]/5 border border-transparent"}`,children:t},e))}),(0,a.jsxs)("div",{className:"bg-white rounded-2xl border border-slate-200 overflow-hidden shadow-[0_4px_15px_rgba(0,0,0,0.08)] min-h-[400px] mx-4 md:mx-0",children:["stats"===y&&(0,a.jsx)(b,{matchDetails:s}),"lineup"===y&&(0,a.jsx)(f,{matchDetails:s}),"events"===y&&(0,a.jsx)(_,{events:s?.events}),"standings"===y&&(0,a.jsx)(k,{standings:r}),"odds"===y&&(0,a.jsx)(E,{odds:s?.odds})]})]}):null),t.length>0&&(0,a.jsxs)("div",{className:"mt-4 mx-4 md:mx-0",children:[(0,a.jsxs)("h2",{className:"px-1 py-4 text-sm sm:text-base font-black text-slate-800 uppercase flex items-center gap-3 tracking-widest border-b border-slate-100 mb-4",children:[(0,a.jsx)("span",{className:"w-1 h-5 bg-[#4681E8] rounded-sm shadow-[0_0_8px_#4681E8]"}),"TRẬN ĐẤU C\xd9NG GIẢI"]}),(0,a.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3 sm:gap-4",children:t.slice(0,4).map(e=>(0,a.jsx)(w,{m:e},e.id))})]})]}),(0,a.jsx)("div",{className:"w-full lg:w-[350px] xl:w-[400px] shrink-0 px-4 md:px-0",children:(0,a.jsxs)("div",{className:"bg-white border border-slate-200 rounded-2xl overflow-hidden flex flex-col shadow-[0_10px_30px_rgba(0,0,0,0.1)] lg:sticky lg:top-8 h-[600px] lg:h-[c
947alc(100vh-100px)] lg:max-h-[850px]",children:[(0,a.jsxs)("div",{className:"px-5 py-4 border-b border-slate-200 flex items-center justify-between bg-white",children:[(0,a.jsxs)("h3",{className:"text-slate-800 text-sm font-black uppercase tracking-widest flex items-center gap-2",children:[(0,a.jsx)("span",{className:"w-2.5 h-2.5 rounded-full bg-[#4681E8] shadow-[0_0_10px_rgba(70,129,232,0.4)]"}),"PH\xd2NG CHAT"]}),(0,a.jsxs)("span",{className:"text-[10px] bg-white px-3 py-1.5 rounded-full text-[#4681E8] font-mono border border-[#4681E8]/30 shadow-inner tracking-widest flex items-center gap-1.5",children:[(0,a.jsx)("svg",{className:"w-3 h-3",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 10l4.553-2.276A1 1 0 0121 8.618v6.764a1 1 0 01-1.447.894L15 14M5 18h8a2 2 0 002-2V8a2 2 0 00-2-2H5a2 2 0 00-2 2v8a2 2 0 002 2z"})}),L.length," BLV"]})]}),(0,a.jsx)("div",{className:"flex-1 bg-[#FFFFFF]/40 min-h-0 chat-container-wrapper",children:(0,a.jsx)(N,{anchors:L,selectedAnchor:M})})]})})]})]})}let p={25:"KIỂM SO\xc1T B\xd3NG",24:"CHUYỀN CH\xcdNH X\xc1C",23:"TỔNG SỐ ĐƯỜNG CHUYỀN",22:"TẤN C\xd4NG",21:"T.C\xd4NG NGUY HIỂM",2:"S\xdaT TR\xdaNG Đ\xcdCH",37:"PHẠT G\xd3C",28:"N\xc9M BI\xcaN",8:"VIỆT VỊ",3:"THẺ V\xc0NG",4:"THẺ ĐỎ",5:"S\xdaT PENALTY",29:"PHẠM LỖI",26:"Đ\xc1NH ĐẦU",27:"CỨU THUA",1:"B\xc0N THẮNG",7:"PHẢN LƯỚI"},u=[25,21,22,24,2,23,4,3,37,28,8,5,29],g="https://cdn.sportdb.live/upload/team/";function b({matchDetails:e}){let[t,s]=(0,l.useState)("full"),r=e?.stats,n=e?.lineup,i=n?.match?.home_team,o=n?.match?.away_team,c=null;Array.isArray(r)&&r.length>0?c=r[0]:r?.results?.[0]?c=r.results[0]:r?.stats_full_time&&(c=r);let d={full:c?.stats_full_time||[],h1:c?.stats_haft_time||c?.stats_half_time||[],h2:c?.stats_haft_time_2nd_half||[]}[t]||[];if(!c||0===d.length)return(0,a.jsx)(j,{text:"Thống k\xea sẽ được cập nhật khi trận đấu bắt đầu"});let x=[...d].sort((e,t)=>{let s=u.indexOf(e.type),a=u.indexOf(t.type);return(-1===s?999:s)-(-1===a?999:a)});return(0,a.jsxs)("div",{className:"flex flex-col",children:[(i||o)&&(0,a.jsxs)("div",{className:"flex items-center justify-between px-4 py-3 border-b border-slate-100",children:[(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5 w-20",children:[i?.logo&&(0,a.jsx)("img",{src:g+i.logo,alt:i?.name||"Home team",className:"w-8 h-8 object-contain",onError:e=>e.target.style.display="none",loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-slate-600 text-[10px] font-medium text-center leading-tight",children:i?.name||""})]}),(0,a.jsx)("div",{className:"flex gap-1",children:[{k:"h1",l:"Hiệp 1"},{k:"h2",l:"Hiệp 2"},{k:"full",l:"Cả trận"}].map(({k:e,l})=>(0,a.jsx)("button",{onClick:()=>s(e),className:`px-2.5 py-1 text-[10px] font-bold rounded transition-all ${t===e?"bg-[#E11D48] text-white":"text-slate-400 hover:text-slate-600 bg-slate-100"}`,children:l},e))}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5 w-20",children:[o?.logo&&(0,a.jsx)("img",{src:g+o.logo,alt:o?.name||"Away team",className:"w-8 h-8 object-contain",onError:e=>e.target.style.display="none",loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-slate-600 text-[10px] font-medium text-center leading-tight",children:o?.name||""})]})]}),(0,a.jsx)("div",{className:"px-4 py-3 space-y-3",children:x.map(e=>{let t=p[e.type]||`Stat ${e.type}`,s=e.home,l=e.away,r=24===e.type||25===e.type,n=s+l,i=0===n?50:s/n*100,o=s>l,c=l>s;return(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"flex justify-between items-center mb-1.5",children:[(0,a.jsxs)("span",{className:`text-xs font-bold w-10 tabular-nums ${o?"text-slate-800":"text-slate-400"}`,children:[s,r?"%":""]}),(0,a.jsx)("span",{className:"text-slate-400 text-[10px] font-semibold tracking-wide uppercase",children:t}),(0,a.jsxs)("span",{className:`text-xs font-bold w-10 text-right tabular-nums ${c?"text-slate-800":"text-slate-400"}`,children:[l,r?"%":""]})]}),(0,a.jsxs)("div",{className:"flex gap-0.5 h-[5px]",children:[(0,a.jsx)("div",{className:"flex-1 rounded-l-full bg-white/[0.06] overflow-hidden flex justify-end",children:(0,a.jsx)("div",{className:`rounded-l-full transition-all duration-500 ${o?"bg-gradient-to-r from-[#E11D48]/60 to-[#E11D48]":"bg-gradient-to-r from-white/10 to-white/20"}`,style:{width:`${i}%`}})}),(0,a.jsx)("div",{className:"flex-1 rounded-r-full bg-white/[0.06] overflow-hidden",children:(0,a.jsx)("div",{className:`rounded-r-full transition-all duration-500 ${c?"bg-gradient-to-l from-[#E11D48]/60 to-[#E11D48]":"bg-gradient-to-l from-white/10 to-white/20"}`,style:{width:`${100-i}%`}})})]})]},e.type)})})]})}
947function f({matchDetails:e}){let[t,s]=(0,l.useState)("pitch"),r=e?.lineup,n=r?.lineup||r,i=n?.home||[],o=n?.away||[],c=r?.home_formation||"",d=r?.away_formation||"",x=r?.match?.home_team,h=r?.match?.away_team;if(0===i.length&&0===o.length)return(0,a.jsx)(j,{text:"Đội h\xecnh sẽ được c\xf4ng bố trước trận đấu 30 ph\xfat"});let m=e=>e.filter(e=>1===e.first),p=e=>e.filter(e=>1!==e.first),u=m(i),g=m(o),b=p(i),w=p(o);return(0,a.jsxs)("div",{className:"flex flex-col",children:[(0,a.jsxs)("div",{className:"flex items-center justify-center gap-1 px-3 py-2 border-b border-slate-100",children:[(0,a.jsx)("button",{onClick:()=>s("pitch"),className:`px-3 py-1.5 text-[10px] font-bold rounded transition-all ${"pitch"===t?"bg-[#E11D48] text-white":"text-slate-400 bg-slate-100"}`,children:"Đội h\xecnh xuất ph\xe1t"}),(0,a.jsx)("button",{onClick:()=>s("list"),className:`px-3 py-1.5 text-[10px] font-bold rounded transition-all ${"list"===t?"bg-[#E11D48] text-white":"text-slate-400 bg-slate-100"}`,children:"Đội h\xecnh dá»± bị"})]}),"pitch"===t?(0,a.jsx)("div",{className:"relative w-full",style:{aspectRatio:"68/105"},children:(0,a.jsxs)("div",{className:"absolute inset-0 bg-gradient-to-b from-[#1a5c2a] via-[#1e6b31] to-[#1a5c2a] rounded-2xl overflow-hidden",children:[(0,a.jsxs)("div",{className:"absolute inset-[3%] border border-white/20 rounded-lg",children:[(0,a.jsx)("div",{className:"absolute left-0 right-0 top-1/2 h-px bg-white/20"}),(0,a.jsx)("div",{className:"absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 w-[22%] aspect-square rounded-full border border-white/20"}),(0,a.jsx)("div",{className:"absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 w-1.5 h-1.5 bg-white/30 rounded-full"}),(0,a.jsx)("div",{className:"absolute top-0 left-1/2 -translate-x-1/2 w-[55%] h-[16%] border-l border-r border-white/20"}),(0,a.jsx)("div",{className:"absolute top-0 left-1/2 -translate-x-1/2 w-[25%] h-[6%] border-l border-r border-white/20"}),(0,a.jsx)("div",{className:"absolute bottom-0 left-1/2 -translate-x-1/2 w-[55%] h-[16%] border-t border-l border-r border-white/20"}),(0,a.jsx)("div",{className:"absolute bottom-0 left-1/2 -translate-x-1/2 w-[25%] h-[6%] border-t border-l border-r border-white/20"})]}),(0,a.jsx)("div",{className:"absolute top-1 left-2 text-[9px] text-[#F8FAFC]/50 font-bold z-10",children:x?.name||""}),(0,a.jsx)("div",{className:"absolute top-1 right-2 text-[9px] text-[#E11D48]/70 font-bold z-10",children:c}),(0,a.jsx)("div",{className:"absolute bottom-1 left-2 text-[9px] text-[#F8FAFC]/50 font-bold z-10",children:h?.name||""}),(0,a.jsx)("div",{className:"absolute bottom-1 right-2 text-[9px] text-[#E11D48]/70 font-bold z-10",children:d}),u.map((e,t)=>{let s=`${e.x||50}%`,l=`${(e.y||10)/2}%`,r="G"===e.position;return(0,a.jsxs)("div",{className:"absolute flex flex-col items-center z-10 -translate-x-1/2 -translate-y-1/2",style:{left:s,top:l},children:[(0,a.jsx)("div",{className:`w-6 h-6 rounded-full flex items-center justify-center text-[9px] font-black ${r?"bg-yellow-400 text-black":"bg-blue-600 text-[#F8FAFC]"} shadow-md border border-white/20`,children:e.shirt_number||""}),(0,a.jsx)("span",{className:"text-[7px] text-[#F8FAFC] font-semibold mt-0.5 text-center max-w-[48px] truncate drop-shadow-[0_1px_2px_rgba(0,0,0,0.8)]",children:(e.name||"").split(" ").slice(-2).join(" ")}),1===e.captain&&(0,a.jsx)("span",{className:"absolute -top-1 -right-1 text-[6px] text-yellow-400",children:"C"})]},`h-${t}`)}),g.map((e,t)=>{let s=`${100-(e.x||50)}%`,l=`${100-(e.y||10)/2}%`,r="G"===e.position;return(0,a.jsxs)("div",{className:"absolute flex flex-col items-center z-10 -translate-x-1/2 -translate-y-1/2",style:{left:s,top:l},children:[(0,a.jsx)("div",{className:`w-6 h-6 rounded-full flex items-center justify-center text-[9px] font-black ${r?"bg-yellow-400 text-black":"bg-orange-500 text-[#F8FAFC]"} shadow-md border border-white/20`,children:e.shirt_number||""}),(0,a.jsx)("span",{className:"text-[7px] text-[#F8FAFC] font-semibold mt-0.5 text-center max-w-[48px] truncate drop-shadow-[0_1px_2px_rgba(0,0,0,0.8)]",children:(e.name||"").split(" ").slice(-2).join(" ")}),1===e.captain&&(0,a.jsx)("span",{className:"absolute -top-1 -right-1 text-[6px] text-yellow-400",children:"C"})]},`a-${t}`)})]})}):(0,a.jsxs)("div",{className:"px-3 py-2 text-xs",children:[(0,a.jsxs)("div",{className:"flex justify-between font-bold text-slate-400 mb-1 uppercase tracking-wider text-[9px] px-1",children:[(0,a.jsx)("span",{children:"Đội chá»
947§ nh\xe0"}),(0,a.jsx)("span",{children:"Đội kh\xe1ch"})]}),Array.from({length:Math.max(b.length,w.length)}).map((e,t)=>{let s=b[t],l=w[t];return(0,a.jsxs)("div",{className:"flex justify-between items-center border-b border-slate-50 py-1.5",children:[(0,a.jsx)("div",{className:"flex items-center gap-1.5 w-1/2 min-w-0",children:s&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"text-[#E11D48] font-bold w-5 text-center shrink-0 text-[10px]",children:s.shirt_number||""}),(0,a.jsx)("span",{className:"text-slate-700 truncate text-[11px]",children:s.name||""})]})}),(0,a.jsx)("div",{className:"flex items-center gap-1.5 w-1/2 justify-end min-w-0",children:l&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"text-slate-700 truncate text-[11px] text-right",children:l.name||""}),(0,a.jsx)("span",{className:"text-[#E11D48] font-bold w-5 text-center shrink-0 text-[10px]",children:l.shirt_number||""})]})})]},t)})]})]})}function j({text:e}){return(0,a.jsx)("div",{className:"flex items-center justify-center py-10 text-slate-400 text-sm text-center",children:e})}function w({m:e}){let t=c(e.status_id,e.sport_id),{hm:s,dm:l}=x(e.time),r=e.source_card_meta?.league_label||e.match_data?.competition_vi||"";return(0,a.jsxs)("a",{href:`/match/${encodeURIComponent(e.post_name||e.id)}`,className:"flex items-center gap-3 rounded-2xl bg-white hover:bg-slate-50 border border-slate-100 hover:border-[#4681E8]/30 p-3 transition-all group",children:[(0,a.jsxs)("div",{className:"shrink-0 w-14 text-center",children:[(0,a.jsx)("div",{className:"text-[#E11D48] text-[11px] font-bold",children:s}),(0,a.jsx)("div",{className:"text-slate-400 text-[9px]",children:l})]}),(0,a.jsx)("div",{className:"w-px h-9 bg-slate-200 shrink-0"}),(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("div",{className:"text-slate-400 text-[9px] truncate mb-1",children:r}),(0,a.jsxs)("div",{className:"flex items-center gap-2 mb-0.5",children:[(0,a.jsx)("img",{src:e.home_logo||d(e.home_name),alt:e.home_name,className:"w-4 h-4 object-contain shrink-0",onError:t=>t.target.src=d(e.home_name),loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-slate-600 text-[12px] font-medium truncate",children:e.home_name})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("img",{src:e.away_logo||d(e.away_name),alt:e.away_name,className:"w-4 h-4 object-contain shrink-0",onError:t=>t.target.src=d(e.away_name),loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-slate-600 text-[12px] font-medium truncate",children:e.away_name})]})]}),t.sc?(0,a.jsxs)("span",{className:"text-slate-800 font-bold text-[14px] tabular-nums shrink-0",children:[e.home_score,"-",e.away_score]}):(0,a.jsx)("span",{className:"text-[10px] font-bold text-[#E11D48] bg-[#E11D48]/10 rounded px-2.5 py-1 group-hover:bg-[#E11D48]/15 transition shrink-0",children:"XEM NGAY"})]})}let v={0:{bg:"bg-white/10",text:"text-[#F8FAFC]/40",nameCls:"text-[#94A3B8]"},1:{bg:"bg-white/10",text:"text-[#F8FAFC]/50",nameCls:"text-[#94A3B8]"},2:{bg:"bg-green-900/50",text:"text-green-400",nameCls:"text-green-400"},3:{bg:"bg-yellow-900/40",text:"text-yellow-400",nameCls:"text-emerald-600 font-bold"},4:{bg:"bg-blue-900/40",text:"text-blue-400",nameCls:"text-blue-400 font-bold"},5:{bg:"bg-red-900/40",text:"text-red-400",nameCls:"text-red-400 font-bold"}};function N({anchors:e,selectedAnchor:t}){let[s,r]=(0,l.useState)([]),[n,i]=(0,l.useState)(!1),o=(0,l.useRef)(null),c=(0,l.useRef)(null),d=t?.roomNum;return(0,l.useEffect)(()=>{if(!d)return;r([]),i(!1);let e=new EventSource(`/api/chat/${d}`);return e.onopen=()=>i(!0),e.onmessage=e=>{try{let t=JSON.parse(e.data);if("connected"===t.type)return void i(!0);if("history"===t.type&&Array.isArray(t.messages))return void r(e=>[...t.messages,...e].slice(-200));t.user&&t.text&&r(e=>[...e,t].slice(-200))}catch{}},e.onerror=()=>i(!1),()=>{e.close(),i(!1)}},[d]),(0,l.useEffect)(()=>{requestAnimationFrame(()=>{let e=c.current;e&&(e.scrollTop=e.scrollHeight)})},[s.length]),(0,a.jsxs)("div",{className:"flex flex-col h-full bg-[#0F0F23]",children:[(0,a.jsxs)("div",{ref:c,className:"flex-1 min-h-0 px-3 py-2 flex flex-col gap-[3px] overflow-y-auto",style:{scrollbarWidth:"thin",scrollbarColor:"#444 transparent"},children:[(0,a.jsx)("div",{className:"text-center text-[10px] text-[#F8FAFC]/30 bg-slate-50/60 py-1.5 rounded-xl mb-1 sticky top-0 z-10 backdrop-blur-sm",children:n?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"inline-block h-1.5 w-1.5 rounded-full bg-green-400 animate-pulse mr-1"}),"Đang kết nối ph\xf2ng chat trá»±c tiếp"]}):d?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"inline-block h-1.5 w-1.5 rounded-full bg-yellow-400 animate-pulse mr-1"}),"Đang kết nối..."]}
947):"Ch\xe0o mừng bạn đến với ph\xf2ng chat"}),0===s.length&&n&&(0,a.jsx)("div",{className:"text-center text-[10px] text-[#F8FAFC]/20 py-4",children:"Chờ tin nhắn mới..."}),s.map((e,t)=>{var s;let l=(s=e.level)>=5?v[5]:v[s]||v[0];return 2===e.type||e.text?.includes("v\xe0o ph\xf2ng tr\xf2 chuyện")?(0,a.jsxs)("div",{className:"flex items-start gap-1.5 text-[11px] leading-relaxed py-[1px] opacity-60",children:[(0,a.jsx)("span",{className:"text-green-500/70 font-medium",children:"Hi"}),(0,a.jsxs)("span",{className:`shrink-0 inline-flex items-center px-1 py-[0.5px] rounded text-[8px] font-bold ${l.bg} ${l.text}`,children:["Lv",e.level]}),(0,a.jsxs)("span",{className:`font-bold ${l.nameCls}`,children:[e.user,":"]}),(0,a.jsx)("span",{className:"text-[#F8FAFC]/40",children:e.text})]},`${e.ts}-${t}`):(0,a.jsxs)("div",{className:"flex items-start gap-1.5 text-[11px] leading-relaxed py-[1px]",children:[(0,a.jsxs)("span",{className:`shrink-0 inline-flex items-center px-1 py-[0.5px] rounded text-[8px] font-bold ${l.bg} ${l.text}`,children:["Lv.",e.level]}),(0,a.jsxs)("span",{className:`font-bold shrink-0 ${l.nameCls}`,children:[e.user,":"]}),(0,a.jsx)("span",{className:"text-[#F8FAFC]/80 break-words min-w-0",children:e.text})]},`${e.ts}-${t}`)}),(0,a.jsx)("div",{ref:o})]}),(0,a.jsxs)("div",{className:"shrink-0 px-3 py-2 bg-[#0F0F23] border-t border-white/[0.04] space-y-2",children:[(0,a.jsx)("div",{className:"flex items-center justify-center gap-3 text-[#F8FAFC]/20 text-[10px]",children:(0,a.jsx)("span",{className:"flex items-center gap-1",children:(0,a.jsx)("svg",{className:"w-3 h-3",viewBox:"0 0 24 24",fill:"currentColor",children:(0,a.jsx)("path",{d:"M12 4.5C7 4.5 2.7 7.6 1 12c1.7 4.4 6 7.5 11 7.5s9.3-3.1 11-7.5c-1.7-4.4-6-7.5-11-7.5zm0 12.5c-2.8 0-5-2.2-5-5s2.2-5 5-5 5 2.2 5 5-2.2 5-5 5zm0-8c-1.7 0-3 1.3-3 3s1.3 3 3 3 3-1.3 3-3-1.3-3-3-3z"})})})}),(0,a.jsxs)("div",{className:"flex bg-[#0F0F23] rounded-2xl overflow-hidden border border-white/[0.08]",children:[(0,a.jsx)("input",{type:"text",placeholder:"Đăng nhập để c\xf9ng chat nh\xe9",disabled:!0,className:"flex-1 bg-transparent px-3 py-2 text-[11px] text-[#F8FAFC] outline-none placeholder:text-[#F8FAFC]/30 disabled:opacity-50"}),(0,a.jsx)("button",{disabled:!0,className:"px-4 text-[11px] font-bold bg-[#E11D48] text-black disabled:bg-white/10 disabled:text-[#F8FAFC]/20 transition-colors",children:"Gửi"})]})]})]})}let y={1:{icon:"⚽",label:"B\xe0n thắng",color:"text-green-400"},2:{icon:"\uD83C\uDD7F️",label:"Phạt đền",color:"text-green-400"},3:{icon:"\uD83D\uDFE1",label:"Thẻ v\xe0ng",color:"text-yellow-400"},4:{icon:"\uD83D\uDFE1\uD83D\uDFE1",label:"Thẻ v\xe0ng 2",color:"text-emerald-600"},5:{icon:"\uD83D\uDD34",label:"Thẻ đỏ",color:"text-red-500"},7:{icon:"\uD83D\uDD04",label:"Phản lưới",color:"text-orange-400"},8:{icon:"\uD83C\uDFE5",label:"Chấn thương",color:"text-[#94A3B8]"},9:{icon:"\uD83D\uDD04",label:"Thay người",color:"text-blue-400"},11:{icon:"⏱️",label:"Hiệp 2",color:"text-[#F8FAFC]/40"},15:{icon:"\uD83E\uDD45",label:"Pen trượt",color:"text-red-400"},19:{icon:"⏱️",label:"Kết th\xfac hiệp",color:"text-[#F8FAFC]/30"},21:{icon:"\uD83C\uDFC6",label:"VAR",color:"text-purple-400"}};function _({events:e}){let t=e?.incidents||e?.events||[];return t&&0!==t.length?(0,a.jsx)("div",{className:"flex flex-col",children:t.map((e,t)=>{let s=y[e.type]||{icon:"•",label:`Event ${e.type}`,color:"text-[#F8FAFC]/50"},l=1===e.position,r=2===e.position,n=e.add_time?`+${e.add_time}`:"",i=`${e.time}'${n}`;return l||r||11!==e.type&&19!==e.type?9===e.type?(0,a.jsxs)("div",{className:`flex items-center gap-2 border-b border-slate-50 p-3 text-xs ${l?"":"flex-row-reverse"}`,children:[(0,a.jsx)("span",{className:"text-slate-400 w-10 text-center shrink-0 text-[10px]",children:i}),(0,a.jsxs)("div",{className:`flex-1 flex flex-col gap-0.5 ${l?"items-start":"items-end"}`,children:[(0,a.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,a.jsx)("span",{className:"text-green-400 text-[10px]",children:"▲"}),(0,a.jsx)("span",{className:"text-[#F8FAFC]/80 text-[11px]",children:e.in_player_name||""})]}),(0,a.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,a.jsx)("span",{className:"text-red-400 text-[10px]",children:"▼"}),(0,a.jsx)("span",{className:"text-[#F8FAFC]/40 text-[11px]",children:e.out_player_name||""})]})]})]},t):(0,a.jsxs)("div",{className:`flex items-center gap-2 border-b border-slate-50 p-3 text-xs ${l?"":"flex-row-reverse"}`,children:[(0,a.jsx)("span",{className:"text-slate-400 w-10 text-center shrink-0 text-[10px]",children:i}),(0,a.jsx)("span",{className:`shrink-0 text-sm ${s.color}`,children:s.icon}),(0,a.jsxs)("div",{className:`flex-1 min-w-0 ${l?"text-left":"text-right"}`,children:[(0,a.jsx)("span",{className:"text-slate-700 text-[11px]",children:e.player_name||""}),e.assist1_name&&(0,a.jsxs)("span",{className:"text-slate-400 text-[10px] ml-1",children:["(kiến tạo: ",e.assist1_name,")"]}),1===e.type&&void 0!==e.home_score&&(0,a.jsxs)("span",{className:"text-[#E11D48] font-bold text-[11px] ml-2",children:[e.home_score," - ",e.away_score]})]})]},t):(0,a.jsx)("div",{className:"flex items-center justify-center py-2 border-b border-slate-50 bg-slate-50",children:(0,a.jsxs)("span",{className:"text-slate-400 text-[10px] uppercase tracking-wider",children:[s.icon," ",s.label," — ",i]})},t)})}):(0,a.jsx)(j,{text:"Diễn biến trận đấu sẽ được cập nhật trực tiếp tại đ\xe2y"})}function k({standings:e}
947){return e&&e.teams&&0!==e.teams.length?(0,a.jsxs)("div",{className:"w-full text-[10px]",children:[(0,a.jsxs)("div",{className:"grid grid-cols-[20px_1fr_24px_24px_32px] bg-slate-50 p-2 text-slate-400 uppercase font-bold sticky top-0",children:[(0,a.jsx)("span",{className:"text-center",children:"#"}),(0,a.jsx)("span",{children:"Team"}),(0,a.jsx)("span",{className:"text-center",children:"T"}),(0,a.jsx)("span",{className:"text-center",children:"B"}),(0,a.jsx)("span",{className:"text-center whitespace-nowrap",children:"Đ"})]}),e.teams.slice(0,15).map((e,t)=>{let s=!!e.data,l=s?parseFloat(e.data[0]):e.rank||t+1,r=s?e.data[1]:e.target_name,n=s?e.data[7]:e.points,i=s?e.data[3]:e.won,o=s?e.data[5]:e.loss;return(0,a.jsxs)("div",{className:"grid grid-cols-[20px_1fr_24px_24px_32px] items-center p-2 border-b border-slate-50 hover:bg-slate-50 transition-colors",children:[(0,a.jsx)("span",{className:"text-center text-slate-500",children:l}),(0,a.jsxs)("div",{className:"flex items-center gap-1.5 min-w-0 pr-2",children:[e.team_logo&&(0,a.jsx)("img",{src:e.team_logo,className:"w-3.5 h-3.5 object-contain",alt:r||"Team logo",loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-slate-700 font-medium truncate",children:r})]}),(0,a.jsx)("span",{className:"text-center text-slate-500",children:i}),(0,a.jsx)("span",{className:"text-center text-slate-500",children:o}),(0,a.jsx)("span",{className:"text-center text-[#E11D48] font-bold",children:n})]},r)})]}):(0,a.jsx)(j,{text:"Bảng xếp hạng sẽ được cập nhật"})}function E({odds:e}){let t=Array.isArray(e)?e:[],s=["2","4","3","16"];function l(e){for(let a of s){let s=t.find(t=>t.odds_type===e&&String(t.company_id)===a);if(s?.odds_info?.length)return s}return t.find(t=>t.odds_type===e&&t.odds_info?.length>0)}function r(e,t){let s=e?.odds_info;if(!s?.length)return["-","-","-"];let a="opening"===t?s.length-1:0;if(!s?.length||!s[a])return["-","-","-"];let l=s[a][2];if("string"!=typeof l)return["-","-","-"];let r=l.split(",");return[r[0]||"-",r[1]||"-",r[2]||"-"]}let n=l("asia"),i=l("eu"),o=l("bs"),c=l("cr"),d=r(n,"opening"),x=r(n,"latest"),h=r(i,"opening"),m=r(i,"latest"),p=r(o,"opening"),u=r(o,"latest"),g=r(c,"opening"),b=r(c,"latest"),f=({children:e})=>(0,a.jsx)("th",{className:"px-2 py-2 text-[9px] sm:text-[10px] font-bold uppercase tracking-wider text-slate-500 border-b border-slate-100 text-center",children:e}),j=({children:e,color:t})=>(0,a.jsx)("td",{className:`px-2 py-2.5 text-center text-[11px] sm:text-xs font-bold ${t||"text-slate-600"} border-b border-slate-50`,children:e});return(0,a.jsxs)("div",{className:"overflow-x-auto",children:[(0,a.jsxs)("table",{className:"w-full min-w-[600px]",children:[(0,a.jsxs)("thead",{children:[(0,a.jsxs)("tr",{className:"bg-slate-50",children:[(0,a.jsx)("th",{className:"px-4 py-2 text-left border-b border-slate-100",rowSpan:2,children:(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("div",{className:"w-7 h-7 rounded bg-gradient-to-br from-[#1d4ed8] to-[#3b82f6] flex items-center justify-center text-white text-[9px] font-black shadow-sm",children:"B"}),(0,a.jsx)("span",{className:"text-slate-600 text-[11px] font-bold tracking-wider",children:"SPORT"})]})}),(0,a.jsx)("th",{colSpan:3,className:"px-1 py-1.5 text-center text-[9px] sm:text-[10px] font-bold uppercase tracking-wider text-[#4681E8] border-b border-l border-slate-100",children:"CƯỢC CH\xc2U \xc1"}),(0,a.jsx)("th",{colSpan:3,className:"px-1 py-1.5 text-center text-[9px] sm:text-[10px] font-bold uppercase tracking-wider text-[#4681E8] border-b border-l border-slate-100",children:"CƯỢC CH\xc2U \xc2U"}),(0,a.jsx)("th",{colSpan:3,className:"px-1 py-1.5 text-center text-[9px] sm:text-[10px] font-bold uppercase tracking-wider text-[#4681E8] border-b border-l border-slate-100",children:"T\xc0I XỈU"}),(0,a.jsx)("th",{colSpan:3,className:"px-1 py-1.5 text-center text-[9px] sm:text-[10px] font-bold uppercase tracking-wider text-[#4681E8] border-b border-l border-slate-100",children:"K\xc8O G\xd3C"})]}),(0,a.jsxs)("tr",{className:"bg-slate-50",children:[(0,a.jsx)(f,{children:"CHỦ"}),(0,a.jsx)(f,{children:"CHẤP"}),(0,a.jsx)(f,{children:"KH\xc1CH"}),(0,a.jsx)(f,{children:"CHỦ"}),(0,a.jsx)(f,{children:"H\xd2A"}),(0,a.jsx)(f,{children:"KH\xc1CH"}),(0,a.jsx)(f,{children:"T\xc0I"}),(0,a.jsx)(f,{children:"TỶ LỆ"}),(0,a.jsx)(f,{children:"XỈU"}),(0,a.jsx)(f,{children:"T\xc0I"}),(0,a.jsx)(f,{children:"TỶ LỆ"}),(0,a.jsx)(f,{children:"XỈU"})]})]}),(0,a.jsxs)("tbody",{children:[(0,a.jsxs)("tr",{className:"hover:bg-slate-50 transition-colors",children:[(0,a.jsx)("td",{className:"px-4 py-2.5 text-[11px] sm:text-xs text-slate-500 font-medium border-b border-slate-50",children:"Tỷ Lệ Mở Cược"}),(0,a.jsx)(j,{children:d[0]}),(0,a.jsx)(j,{color:"text-red-400",children:d[1]}),(0,a.jsx)(j,{children:d[2]}),(0,a.jsx)(j,{children:h[0]}),(0,a.jsx)(j,{children:h[1]}),(0,a.jsx)(j,{children:h[2]}),(0,a.jsx)(j,{children:p[0]}),(0,a.jsx)(j,{children:p[1]}),(0,a.jsx)(j,{children:p[2]}),(0,a.jsx)(j,{children:g[0]}),(0,a.jsx)(j,{children:g[1]}),(0,a.jsx)(j,{children:g[2]})]}),(0,a.jsxs)("tr",{className:"hover:bg-slate-50 transition-colors",children:[(0,a.jsx)("td",{className:"px-4 py-2.5 text-[11px] sm:text-xs text-slate-500 font-medium border-b border-slate-50",children:"Tỷ Lệ Trước Trận"}),(0,a.jsx)(j,{children:x[0]}),(0,a.jsx)(j,{color:"text-red-400",children:x[1]}),(0,a.jsx)(j,{children:x[2]}),(0,a.jsx)(j,{children:m[0]}),(0,a.jsx)(j,{children:m[1]}),(0,a.jsx)(j,{children:m[2]}),(0,a.jsx)(j,{children:u[0]}),(0,a.jsx)(j,{children:u[1]}),(0,a.jsx)(j,{children:u[2]}),(0,a.jsx)(j,{children:b[0]}),(0,a.jsx)(j,{children:b[1]}),(0,a.jsx)(j,{children:b[2]})]}),(0,a.jsxs)("tr",{className:"hover:bg-slate-50 transition-colors bg-white",children:[(0,a.jsxs)("td",{className:"px-4 py-2.5 text-[11px] sm:text-xs text-slate-700 font-bold flex items-center gap-1.5 border-b border-slate-50",children:["Live ",(0,a.jsx)("span",{className:"w-1.5 h-1.5 rounded-full bg-red-500 animate-pulse"})]}),(0,a.jsx)(j,{color:"text-green-400",children:x[0]}),(0,a.jsx)(j,{color:"text-red-400",children:x[1]}),(0,a.jsx)(j,{color:"text-green-400",children:x[2]}),(0,a.jsx)(j,{color:"text-green-400",children:m[0]}),(0,a.jsx)(j,{color:"text-green-400",children:m[1]}),(0,a.jsx)(j,{color:"text-green-400",children:m[2]}),(0,a.jsx)(j,{color:"text-green-400",children:u[0]}),(0,a.jsx)(j,{children:u[1]}),(0,a.jsx)(j,{color:"text-green-400",children:u[2]}),(0,a.jsx)(j,{color:"text-green-400",children:b[0]}),(0,a.jsx)(j,{children:b[1]}),(0,a.jsx)(j,{color:"text-green-400",children:b[2]})]})]})]}),(0,a.jsx)("p",{className:"text-center text-slate-400 text-[10px] py-2.5 border-t border-slate-100",children:"Tỷ lệ k\xe8o sẽ được cập nhật gần giờ thi đấu"})]})}},91786:(e,t,s)=>{"use strict";s.d(t,{Klivevip07MatchDetailPage:()=>m});var a=s(68019),l=s(10707),r=s(58420);function n({src:e,poster:t,autoPlay:s=!0,onError:i,className:o=""}){let c=(0,l.useRef)(null),d=(0,l.useRef)(i);d.current=i;let[x,h]=(0,l.useState)(!1),[m,p]=(0,l.useState)(!1);return((0,l.useEffect)(()=>{let t=c.current;if(!t)return;let a=null;h(!1);let l=()=>p(!0),n=()=>p(!1);t.addEventListener("play",l),t.addEventListener("pause",n);let i=()=>{s&&(t.muted=!0,t.play().catch(()=>{}))};if(t.addEventListener("canplay",i),r.Ay.isSupported()){(a=new r.Ay({maxBufferLength:30,maxMaxBufferLength:60,lowLatencyMode:!0,enableWorker:!0})).loadSource(e),a.attachMedia(t),a.on(r.Ay.Events.MANIFEST_PARSED,()=>{s&&(t.muted=!0,t.play().catch(e=>{console.warn("AutoPlay failed:",e),t.muted=!1}))});let l=0,n=0;a.on(r.Ay.Events.ERROR,(e,t)=>
947{if(t.type===r.Ay.ErrorTypes.NETWORK_ERROR&&(++l>2||t.response&&t.response.code>=400)){console.error("HLS Network Error threshold reached (CORS/404), triggering fallback.",t),h(!0),d.current&&d.current(t),a?.destroy();return}if(t.fatal)switch(t.type){case r.Ay.ErrorTypes.NETWORK_ERROR:console.error("HLS Fatal Network Error, recovering...",t),a?.startLoad();break;case r.Ay.ErrorTypes.MEDIA_ERROR:console.error("HLS Media Error, recovering...",t),++n>3?(console.error("HLS Media Error threshold reached, triggering fallback."),h(!0),d.current&&d.current(t),a?.destroy()):a?.recoverMediaError();break;default:console.error("HLS Fatal Error:",t),h(!0),d.current&&d.current(t),a?.destroy()}})}else t.canPlayType("application/vnd.apple.mpegurl")&&(t.src=e,t.addEventListener("loadedmetadata",()=>{s&&t.play().catch(e=>{console.warn("AutoPlay failed:",e)})}),t.addEventListener("error",e=>{h(!0),d.current&&d.current(e)}));return()=>{t.removeEventListener("play",l),t.removeEventListener("pause",n),t.removeEventListener("canplay",i),a&&a.destroy()}},[e,s]),x)?i?null:(0,a.jsxs)("div",{className:`w-full h-full flex flex-col items-center justify-center bg-white/80 backdrop-blur ${o}`,children:[(0,a.jsx)("svg",{className:"w-12 h-12 text-red-500 mb-4 opacity-80",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"})}),(0,a.jsx)("div",{className:"text-slate-600 text-sm font-medium",children:"Video/Stream kh\xf4ng khả dụng hoặc bị lỗi mạng"}),(0,a.jsx)("div",{className:"text-gray-500 text-xs mt-1",children:"Vui l\xf2ng thử lại sau hoặc chọn nguồn kh\xe1c"})]}):(0,a.jsx)("div",{className:`relative group w-full h-full bg-white flex items-center justify-center overflow-hidden ${o}`,children:(0,a.jsx)("video",{ref:c,className:"w-full h-full object-contain",controls:!0,playsInline:!0,muted:s,poster:t,referrerPolicy:"no-referrer"})})}function i(e){let t=(e||"").split(/[\s-]+/).slice(0,2).map(e=>e[0]||"").join("").toUpperCase()||"??";return`data:image/svg+xml,${encodeURIComponent(`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 80 80"><rect width="80" height="80" rx="20" fill="#1a1c25"/><text x="40" y="47" font-size="20" font-family="Arial" font-weight="700" text-anchor="middle" fill="#666">${t}</text></svg>`)}`}function o({homeName:e,awayName:t,homeLogo:s,awayLogo:l,homeScore:r="0",awayScore:n="0",statusText:c="LIVE",timeText:d="",isLive:x=!0,sportId:h="1",matchId:m}){let p=s||i(e),u=l||i(t),g="5"===String(h),b="2"===String(h),f="bg-slate-200 border-slate-200",j="repeating-linear-gradient(90deg, transparent, transparent 10%, #000 10%, #000 20%)";return g?(f="bg-slate-100 border-slate-200",j="none"):b&&(f="bg-[#bc7a46] border-[#8a4e21]",j="repeating-linear-gradient(90deg, transparent, transparent 5%, #000 5%, #000 10%)"),(0,a.jsxs)("div",{className:"relative w-full aspect-video min-h-[300px] max-h-[600px] bg-slate-50 overflow-hidden flex flex-col justify-center",children:[(0,a.jsx)("div",{className:"absolute inset-0 flex items-center justify-center pointer-events-none mt-16 md:mt-24",children:(0,a.jsx)("div",{className:"relative w-[120%] h-[120%] sm:w-[90%] sm:h-[120%] max-w-[900px] flex-shrink-0 transition-transform duration-1000",style:{transform:"perspective(900px) rotateX(60deg) scale(0.9)",transformOrigin:"center center"},children:(0,a.jsxs)("div",{className:`absolute inset-0 ${f} shadow-[0_30px_60px_rgba(0,0,0,0.8)] border-4 rounded-xl overflow-hidden flex transition-colors duration-500`,children:[(0,a.jsx)("div",{className:"absolute inset-0 opacity-15 pointer-events-none",style:{backgroundImage:j}}),(0,a.jsxs)("div",{className:"absolute inset-[4%] pointer-events-none shadow-sm flex items-center justify-center",children:["1"===String(h)&&(0,a.jsxs)("div",{className:"absolute inset-0 w-full h-full border-2 border-white/60",children:[(0,a.jsx)("div",{className:"absolute left-1/2 top-0 bottom-0 w-0 border-l-2 border-white/60 -translate-x-1/2"}),(0,a.jsx)("div",{className:"absolute left-1/2 top-1/2 w-[18%] aspect-square rounded-full border-2 border-white/60 -translate-x-1/2 -translate-y-1/2"}),(0,a.jsx)("div",{className:"absolute left-1/2 top-1/2 w-2 h-2 rounded-full bg-white/80 -translate-x-1/2 -translate-y-1/2"}),(0,a.jsx)("div",{className:"absolute left-0 top-1/2 w-[16%] h-[46%] border-2 border-l-0 border-white/60 -translate-y-1/2 bg-slate-200"}),(0,a.jsx)("div",{className:"absolute left-0 top-1/2 w-[6%] h-[20%] border-2 border-l-0 border-white/60 -translate-y-1/2 bg-slate-200"}),(0,a.jsx)("div",{className:"absolute left-[16%] top-1/2 w-[8%] aspect-square border-2 border-l-0 border-white/60 rounded-r-full -translate-y-1/2 clip-path-half",style:{clipPath:"inset(0 0 0 50%)"}}),(0,a.jsx)("div",{className:"absolute right-0 top-1/2 w-[16%] h-[46%] border-2 border-r-0 border-white/60 -translate-y-1/2 bg-slate-200"}),(0,a.jsx)("div",{className:"absolute right-0 top-1/2 w-[6%] h-[20%] border-2 border-r-0 border-white/60 -translate-y-1/2 bg-slate-200"}),(0,a.jsx)("div",{className:"absolute right-[16%] top-1/2 w-[8%] aspect-square border-2 border-r-0 border-white/60 rounded-l-full -translate-y-1/2 clip-path-half",style:{clipPath:"inset(0 50% 0 0)"}})]}),g&&(0,a.jsxs)("div",{className:"absolute inset-[10%] w-[80%] h-[80%
947] border-2 border-white/80 bg-white",children:[(0,a.jsx)("div",{className:"absolute top-[10%] bottom-[10%] left-0 right-0 border-y-2 border-white/80"}),(0,a.jsx)("div",{className:"absolute left-1/2 top-[-2%] bottom-[-2%] w-1 bg-white/40 shadow-xl -translate-x-1/2 z-10"}),(0,a.jsx)("div",{className:"absolute left-[25%] right-[25%] top-[10%] bottom-[10%] border-x-2 border-white/80"}),(0,a.jsx)("div",{className:"absolute left-[25%] right-[25%] top-1/2 w-[50%] border-t-2 border-white/80 -translate-y-1/2"}),(0,a.jsx)("div",{className:"absolute left-0 top-1/2 w-[2%] border-t-2 border-white/80 -translate-y-1/2"}),(0,a.jsx)("div",{className:"absolute right-0 top-1/2 w-[2%] border-t-2 border-white/80 -translate-y-1/2"})]}),b&&(0,a.jsxs)("div",{className:"absolute inset-0 w-full h-full border-2 border-white/50",children:[(0,a.jsx)("div",{className:"absolute left-1/2 top-0 bottom-0 w-0 border-l-2 border-white/50 -translate-x-1/2"}),(0,a.jsx)("div",{className:"absolute left-1/2 top-1/2 w-[15%] aspect-square rounded-full border-2 border-white/50 -translate-x-1/2 -translate-y-1/2"}),(0,a.jsx)("div",{className:"absolute left-0 top-1/2 w-[18%] h-[35%] border-2 border-l-0 border-white/50 -translate-y-1/2 bg-[#bc7a46]"}),(0,a.jsx)("div",{className:"absolute left-[18%] top-1/2 w-[10%] aspect-square rounded-full border-2 border-white/50 -translate-y-1/2"}),(0,a.jsx)("div",{className:"absolute left-0 top-1/2 w-[30%] h-[70%] border-2 border-l-0 border-white/50 rounded-r-full -translate-y-1/2 opacity-60"}),(0,a.jsx)("div",{className:"absolute right-0 top-1/2 w-[18%] h-[35%] border-2 border-r-0 border-white/50 -translate-y-1/2 bg-[#bc7a46]"}),(0,a.jsx)("div",{className:"absolute right-0 top-1/2 w-[30%] h-[70%] border-2 border-r-0 border-white/50 rounded-l-full -translate-y-1/2 opacity-60"})]})]}),x&&(0,a.jsx)("div",{className:`absolute left-1/2 top-1/2 shadow-[0_8px_16px_rgba(0,0,0,0.8)] z-10 transition-all duration-[3000ms] border-2 border-white/20 rounded-full
948                                ${g?"w-2 h-2 sm:w-3 sm:h-3 bg-[#ccff00]":b?"w-4 h-4 sm:w-6 sm:h-6 bg-[#d95d16]":"w-4 h-4 sm:w-5 sm:h-5 bg-white"}`,style:{animation:"ballMove 8s infinite alternate ease-in-out",transform:"translate(-50%, -50%)"},children:(0,a.jsx)("div",{className:"absolute -bottom-4 left-1/2 w-4 h-2 bg-white/40 rounded-full blur-sm -translate-x-1/2"})}),x&&(0,a.jsxs)("div",{className:"absolute left-[65%] top-[60%] flex flex-col items-center animate-bounce-slow",style:{animation:"floatBubble 4s infinite alternate ease-in-out"},children:[(0,a.jsxs)("div",{className:"bg-white/95 backdrop-blur border border-white/10 rounded-2xl p-2 shadow-2xl flex items-center gap-3 w-max max-w-[200px]",children:[(0,a.jsx)("div",{className:"w-6 h-6 rounded-full flex items-center justify-center p-0.5 bg-white/5 shrink-0",children:(0,a.jsx)("img",{src:p,alt:e||"Home team",className:"max-w-full max-h-full object-contain",onError:t=>t.target.src=i(e),loading:"lazy",decoding:"async"})}),(0,a.jsx)("div",{className:"flex flex-col pr-1 overflow-hidden",children:(0,a.jsx)("span",{className:"text-slate-900 font-bold text-[10px] sm:text-xs tracking-wide truncate",children:g?"Serve / Return":"Tấn c\xf4ng nguy hiểm"})})]}),(0,a.jsx)("div",{className:"w-0 h-0 border-l-[6px] border-r-[6px] border-t-[6px] border-l-transparent border-r-transparent border-t-[#1a1c28]/95 mt-[-1px]"})]})]})})}),(0,a.jsx)("div",{className:"relative z-20 flex-1 flex flex-col items-center justify-start p-4 md:p-6 pointer-events-none w-full",children:(0,a.jsxs)("div",{className:"w-full max-w-[800px] flex items-center justify-between px-4 sm:px-6 py-3 rounded-xl bg-gradient-to-r from-[#0d0f14]/90 via-[#151821]/95 to-[#0d0f14]/90 backdrop-blur-xl border border-white/10 shadow-[0_10px_40px_rgba(0,0,0,0.8)] pointer-events-auto",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 flex-1 min-w-0 pr-2",children:[(0,a.jsx)("img",{src:p,alt:e,className:"w-8 h-8 md:w-12 md:h-12 object-contain drop-shadow-lg shrink-0",onError:t=>t.target.src=i(e),loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-slate-900 text-xs sm:text-sm md:text-base font-bold truncate tracking-wide",children:e})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1 shrink-0 px-2 sm:px-6 min-w-[100px]",children:[(0,a.jsxs)("span",{className:`inline-flex items-center gap-1.5 px-2.5 py-0.5 rounded-full text-[10px] sm:text-xs font-bold shadow-inner ${x?"bg-green-500/10 text-green-400 border border-green-500/20":"bg-white/5 text-slate-900/40"}`,children:[x&&(0,a.jsx)("span",{className:"w-1.5 h-1.5 rounded-full bg-green-500 animate-pulse shadow-[0_0_8px_#22c55e]"}),d||c]}),(0,a.jsxs)("div",{className:"flex gap-3 sm:gap-5 items-center justify-center",children:[(0,a.jsx)("span",{className:"text-slate-900 text-2xl sm:text-4xl font-black drop-shadow-md",children:r}),(0,a.jsx)("span",{className:"text-slate-900/30 text-xl font-light",children:"-"}),(0,a.jsx)("span",{className:"text-slate-900 text-2xl sm:text-4xl font-black drop-shadow-md",children:n})]})]}),(0,a.jsxs)("div",{className:"flex items-center justify-end gap-3 flex-1 min-w-0 pl-2 text-right",children:[(0,a.jsx)("span",{className:"text-slate-900 text-xs sm:text-sm md:text-base font-bold truncate tracking-wide",children:t}),(0,a.jsx)("img",{src:u,alt:t,className:"w-8 h-8 md:w-12 md:h-12 object-contain drop-shadow-lg shrink-0",onError:e=>e.target.src=i(t),loading:"lazy",decoding:"async"})]})]})}),(0,a.jsx)("div",{className:"relative z-20 mt-auto w-full p-4 flex justify-center pointer-events-none",children:(0,a.jsx)("div",{className:"w-full max-w-[600px] h-6 bg-white/40 backdrop-blur-md rounded-full border border-white/5 flex items-center px-4",children:(0,a.jsxs)("div",{className:"flex-1 h-0.5 bg-white/10 relative rounded-full",children:[x&&(0,a.jsx)("div",{className:"absolute left-0 top-0 bottom-0 bg-gradient-to-r from-[#b38b22] to-[#ffda6a] w-[65%] rounded-full opacity-90 shadow-[0_0_12px_#daa520]"}),(0,a.jsx)("span",{className:"absolute left-[65%] top-1/2 -translate-y-1/2 -translate-x-1/2 w-1.5 h-1.5 rounded-full bg-white shadow-md"})]})})}),(0,a.jsx)("style",{children:`
949                @keyframes ballMove {
950                    0% { transform: translate(-30%, -20%) scale(1); }
951                    25% { transform: translate(40%, -10%) scale(1.1); }
952                    50% { transform: translate(20%, 30%) scale(0.9); }
953                    75% { transform: translate(-10%, 15%) scale(1.2); }
954                    100% { transform: translate(-45%, 0%) scale(1); }
955                }
956                @keyframes floatBubble {
957                    0% { transform: translateY(0px) translateX(0px); }
958                    50% { transform: translateY(-8px) translateX(4px); }
959                    100% { transform: translateY(4px) translateX(-4px); }
960                }
961            `})]})}function c(e,t){if("1"===t||"2"===t)switch(e){case"2":return{t:"HT 1",live:!0,sc:!0};case"3":return{t:"Giữa giờ",live:!0,sc:!0};case"4":return{t:"HT 2",live:!0,sc:!0};case"5":return{t:"Hiệp phụ",live:!0,sc:!0};case"7":return{t:"Penalty",live:!0,sc:!0};case"8":case"9":return{t:"Kết th\xfac",live:!1,sc:!0};default:return{t:"Chưa bắt đầu",live:!1,sc:!1}}
961return["51","52","53","54","55"].includes(e)?{t:`Set ${e-50}`,live:!0,sc:!0}:["100","90","110"].includes(e)?{t:"KT",live:!1,sc:!0}:"0"===e||"1"===e?{t:"Chưa bắt đầu",live:!1,sc:!1}:{t:"LIVE",live:!0,sc:!0}}function d(e){let t=(e||"").split(/[\s-]+/).slice(0,2).map(e=>e[0]||"").join("").toUpperCase()||"??";return`data:image/svg+xml,${encodeURIComponent(`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 80 80"><rect width="80" height="80" rx="20" fill="#1a1c25"/><text x="40" y="47" font-size="20" font-family="Arial" font-weight="700" text-anchor="middle" fill="#666">${t}</text></svg>`)}`}function x(e){let t=new Date(1e3*parseInt(e||"0",10));return{hm:t.toLocaleTimeString("vi-VN",{hour:"2-digit",minute:"2-digit",timeZone:"Asia/Ho_Chi_Minh"}),dm:t.toLocaleDateString("vi-VN",{day:"2-digit",month:"2-digit",timeZone:"Asia/Ho_Chi_Minh"}),full:t.toLocaleDateString("vi-VN",{day:"2-digit",month:"2-digit",year:"numeric",timeZone:"Asia/Ho_Chi_Minh"})}}let h="max-w-[1200px]";function m({matchData:e,relatedMatches:t,matchDetails:s,standings:r,brandingNameUpper:i}){let p,u,g,j,v,y,[C,S]=(0,l.useState)("odds"),L=e?.match_data?.anchors||[],[$,F]=(0,l.useState)(!1),[T,A]=(0,l.useState)(!1),[M,H]=(0,l.useState)(null),[D,B]=(0,l.useState)(!1),z=(0,l.useRef)(0);(0,l.useEffect)(()=>{if(!e?.has_live||"1"!==e.has_live||0===L.length)return;let t=!1;B(!0);let s=async t=>{let s=t?.uid,a=`/api/socolive/proxy-stream?url=${encodeURIComponent(`https://live.inplyr.com/${s?`room/${s}`:`default/${e.id}`}.m3u8`)}`;try{let e=await fetch(a,{method:"GET",cache:"no-store"});if(!e.ok)return null;let s=(await e.text()).split("\n").filter(e=>e.trim()&&!e.startsWith("#"));if(0===s.length)return null;return(await fetch(s[0],{method:"HEAD",cache:"no-store"})).ok?t:null}catch{return null}};return Promise.all(L.map(e=>s(e))).then(e=>{if(t)return;let s=e.find(e=>null!==e);s?(H(s),F(!0),A(!1)):(H(L[0]),A(!0)),B(!1)}),()=>{t=!0}},[e?.has_live,L.length]),(0,l.useEffect)(()=>{if(!T||D||z.current>=20)return;let t=setTimeout(()=>{z.current++,A(!1),B(!0);let t=async t=>{let s=t?.uid,a=`/api/socolive/proxy-stream?url=${encodeURIComponent(`https://live.inplyr.com/${s?`room/${s}`:`default/${e.id}`}.m3u8`)}`;try{let e=await fetch(a,{method:"GET",cache:"no-store"});if(!e.ok)return null;let s=(await e.text()).split("\n").filter(e=>e.trim()&&!e.startsWith("#"));if(0===s.length)return null;return(await fetch(s[0],{method:"HEAD",cache:"no-store"})).ok?t:null}catch{return null}};Promise.all(L.map(e=>t(e))).then(e=>{let t=e.find(e=>null!==e);t?(H(t),F(!0),A(!1)):A(!0),B(!1)})},15e3);return()=>clearTimeout(t)},[T,D]);let[I,R]=(0,l.useState)(null),U=e?.post_name||e?.ls_id||e?.id;if(window.location.origin,(0,l.useEffect)(()=>{if(!U)return;let e=setInterval(async()=>{try{let e=await fetch(`/api/klivevip/match/${U}`,{cache:"no-store"});if(e.ok){let t=await e.json();R(t?.match??null)}}catch{}},1e4);return()=>clearInterval(e)},[U]),!e)return(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center py-32 gap-4",children:[(0,a.jsx)("span",{className:"text-[#64748B] text-lg",children:"Kh\xf4ng t\xecm thấy trận đấu"}),(0,a.jsx)("a",{href:"/",className:"text-[#4681E8] hover:underline text-sm",children:"← Quay lại"})]});let G=I?{...e,...I}:e,P=G?.has_live==="1"&&L.length>0,K=c(G.status_id,G.sport_id),V=$&&M&&!T&&!D,W=P&&(D||T&&K.live&&z.current<20),O=!P||T&&!W&&!D,q=!K.live&&"8"!==String(G.status_id)&&"9"!==String(G.status_id),{hm:X,full:Y}=x(G.time),Z=G.source_card_meta?.league_label||G.match_data?.competition_vi||G.match_data?.competition_full||"",Q=G.match_data?.stage_label||G.source_card_meta?.stage_label||"",J=G.home_logo||d(G.home_name),ee=G.away_logo||d(G.away_name),et=e=>t=>{t.target.src=d(e)};return(0,a.jsxs)("div",{className:"w-full bg-white min-h-screen text-slate-600 font-sans pb-16",children:[(0,a.jsx)("div",{className:"w-full border-b border-slate-200 bg-white",children:(0,a.jsxs)("div",{className:`${h} mx-auto px-4 py-3 flex items-center justify-between`,children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 text-[13px] font-bold",children:[(0,a.jsx)("span",{className:"text-[#4681E8] uppercase tracking-wide",children:Z}),Q&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"text-slate-300",children:"•"}),(0,a.jsx)("span",{className:"text-slate-600",children:Q})]})]}),(0,a.jsx)("div",{className:"text-[12px] font-mono text-slate-400 hidden sm:block",children:Y})]})}),(0,a.jsxs)("div",{className:`${h} mx-auto px-0 md:px-4 py-0 md:py-6 flex flex-col lg:flex-row gap-4 lg:gap-6`,children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0 flex flex-col gap-4 lg:gap-6",children:[(0,a.jsxs)("div",{className:"w-full relative bg-[#000000] rounded-none md:rounded-2xl overflow-hidden shadow-[0_10px_40px_rgba(0,0,0,0.5)] border-y md:border border-slate-200",children:[(0,a.jsx)("div",{className:"relative w-full aspect-video bg-[#000000] group z-10",children:V?(0,a.jsx)(n,{src:`/api/klivevip/proxy-stream?url=${encodeURIComponent(`https://live.inplyr.com/${M?.uid&&"default"!==M.uid?`room/${M.uid}`:`default/${G.id}`}.m3u8`)}`,autoPlay:!0,onError:()=>A(!0)}):O?(0,a.jsx)(o,{homeName:G.home_name,awayName:G.away_name,homeLogo:G.home_logo,awayLogo:G.away_logo,homeScore:K.sc?G.home_score:"0",awayScore:K.sc?G.away_score:"0",statusText:K.t,timeText:G.time_text||X,isLive:K.live,sportId:G.sport_id,matchId:G.ls_id||G.id,kickoffMs:1e3*Number(G?.time||0),isPreMatch:q}):(0,a.jsxs)("div",{className:"absolute inset-0 z-10 flex flex-col items-center justify-center p-4 lg:p-10",children:[(0,a.jsxs)("div",{className:"absolute inset-0 flex justify-between items-center opacity-[0.03] pointer-events-none px-4 lg:px-20 overflow-hidden",children:[(0,a.jsx)("img",{src:J,alt:"",className:"w-1/2 max-w-[400px] blur-[10px]",loading:"lazy",decoding:"async"}),(0,a.jsx)("img",{src:ee,alt:"",className:"w-1/2 max-w-[400px] blur-[10px]",loading:"lazy",decoding:"async"})]}),P&&!T&&(0,a.jsx)("button",{onClick:()=>F(!0),className:"group mb-4 sm:mb-8 w-16 h-16 md:w-20 md:h-20 rounded-full bg-[#4681E8] flex items-center justify-center hover:bg-[#55CAF1] transition-all shadow-[0_0_30px_rgba(70,129,232,0.5)] curs
961or-pointer z-20",children:(0,a.jsx)("svg",{className:"w-8 h-8 md:w-10 md:h-10 text-white ml-1.5 md:ml-2 group-hover:scale-110 transition-transform",viewBox:"0 0 24 24",fill:"currentColor",children:(0,a.jsx)("path",{d:"M8 5v14l11-7z"})})}),(0,a.jsxs)("div",{className:"grid grid-cols-[1fr_auto_1fr] items-center w-full max-w-[800px] gap-2 lg:gap-8 z-20",children:[(0,a.jsxs)("div",{className:"flex flex-col items-center gap-2 lg:gap-4",children:[(0,a.jsx)("img",{src:J,alt:G.home_name,className:"w-16 h-16 sm:w-24 sm:h-24 lg:w-32 lg:h-32 object-contain drop-shadow-[0_10px_20px_rgba(0,0,0,0.8)]",onError:et(G.home_name),loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-[#FFFFFF] text-xs sm:text-base lg:text-lg font-black text-center line-clamp-2 uppercase tracking-wide",children:G.home_name})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-2 lg:gap-3",children:[K.sc?(0,a.jsxs)("div",{className:"flex items-center gap-3 lg:gap-6 bg-white/90 backdrop-blur-md px-4 py-2 lg:px-8 lg:py-4 rounded-2xl border border-slate-200 shadow-2xl",children:[(0,a.jsx)("span",{className:"text-[#4681E8] text-[32px] sm:text-[48px] lg:text-[64px] font-black leading-none",children:G.home_score}),(0,a.jsx)("span",{className:"text-slate-300 text-[20px] lg:text-[28px] font-light",children:":"}),(0,a.jsx)("span",{className:"text-[#4681E8] text-[32px] sm:text-[48px] lg:text-[64px] font-black leading-none",children:G.away_score})]}):(0,a.jsx)("div",{className:"text-[#FFFFFF] text-[32px] sm:text-[48px] lg:text-[56px] font-black tracking-widest leading-none drop-shadow-xl",children:X}),(0,a.jsxs)("span",{className:`inline-flex items-center gap-2 rounded-full px-3 py-1 lg:px-5 lg:py-1.5 text-[10px] lg:text-[12px] font-bold tracking-widest uppercase ${K.live?"bg-[#4681E8] text-white shadow-[0_0_20px_rgba(70,129,232,0.6)]":"bg-white text-slate-600 border border-slate-200"}`,children:[K.live&&(0,a.jsx)("span",{className:"w-2 h-2 rounded-full bg-white animate-pulse"}),K.t,G.time_text?` : ${G.time_text}`:""]})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-2 lg:gap-4",children:[(0,a.jsx)("img",{src:ee,alt:G.away_name,className:"w-16 h-16 sm:w-24 sm:h-24 lg:w-32 lg:h-32 object-contain drop-shadow-[0_10px_20px_rgba(0,0,0,0.8)]",onError:et(G.away_name),loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-[#FFFFFF] text-xs sm:text-base lg:text-lg font-black text-center line-clamp-2 uppercase tracking-wide",children:G.away_name})]})]})]})}),L.length>0&&(0,a.jsxs)("div",{className:"w-full bg-white border-t border-slate-200 px-3 lg:px-6 py-2.5 lg:py-4 flex items-center gap-2 lg:gap-4 overflow-x-auto z-20",children:[(0,a.jsx)("span",{className:"text-[10px] lg:text-[11px] text-slate-600 uppercase font-bold tracking-widest shrink-0 mr-1 lg:mr-2",children:"CHỌN K\xcaNH TRUYỀN:"}),L.map((e,t)=>(0,a.jsxs)("button",{onClick:()=>{H(e),F(!0),A(!1)},className:`shrink-0 flex items-center gap-1.5 lg:gap-2 rounded-full px-3 py-1.5 lg:px-5 lg:py-2 text-[11px] lg:text-[13px] font-bold transition-all ${M?.uid===e.uid&&!T?"bg-[#4681E8]/10 border border-[#4681E8] text-[#4681E8] shadow-[0_0_15px_rgba(70,129,232,0.2)]":"bg-white border border-slate-200 text-slate-600 hover:text-[#4681E8] hover:border-[#4681E8]/50"}`,children:[(0,a.jsx)("span",{className:`w-1.5 h-1.5 lg:w-2 lg:h-2 rounded-full ${M?.uid===e.uid&&!T?"bg-[#4681E8] animate-pulse":"bg-transparent"}`}),"BLV ",e.nickName||`K\xeanh ${t+1}`]},e.uid||t))]})]}),(p=(()=>{let e=s?.stats;if(!e)return!1;let t=null;return Array.isArray(e)&&e.length>0?t=e[0]:e?.results?.[0]?t=e.results[0]:e?.stats_full_time&&(t=e),!!t&&!!(t.stats_full_time?.length>0||t.stats_haft_time?.length>0||t.stats_half_time?.length>0||t.stats?.length>0)})(),u=!!(s?.lineup&&(Array.isArray(s.lineup)?s.lineup.length>0:s.lineup.home||s.lineup.away)),g=!!(s?.events&&(Array.isArray(s.events)?s.events.length>0:s.events.incidents?.length>0||s.events.data?.length>0)),j=!!(r&&(Array.isArray(r)?r.length>0:r.data?.length>0)),(y=(v=[{id:"stats",label:"THỐNG K\xca",show:p},{id:"lineup",label:"ĐỘI H\xccNH",show:u},{id:"events",label:"DIỄN BIẾN",show:g},{id:"standings",label:"BẢNG XH",show:j},{id:"odds",label:"TỶ LỆ K\xc8O",show:!!(s?.odds&&Array.isArray(s.odds)&&s.odds.length>0)}].filter(e=>e.show)).find(e=>e.id===C)?C:v[0]?.id||"odds")!==C&&setTimeout(()=>S(y),0),v.length>0?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"bg-white rounded-2xl p-2 border border-slate-200 flex overflow-x-auto gap-2 shadow-[0_4px_15px_rgba(0,0,0,0.08)] mx-4 md:mx-0",children:v.map(({id:e,label:t})=>(0,a.jsx)("button",{onClick:()=>S(e),className:`flex-1 min-w-[100px] py-2.5 sm:py-3 text-[10px] sm:text-[12px] font-black uppercase tracking-widest rounded-xl transition-all ${y===e?"bg-[#4681E8]/10 text-[#4681E8] border border-[#4681E8]/30 shadow-inner":"text-slate-500 hover:text-[#4681E8] hover:bg-[#4681E8]/5 border border-transparent"}`,children:t},e))}),(0,a.jsxs)("div",{className:"bg-white rounded-2xl border border-slate-200 overflow-hidden shadow-[0_4px_15px_rgba(0,0,0,0.08)] min-h-[400px] mx-4 md:mx-0",children:["stats"===y&&(0,a.jsx)(b,{matchDetails:s}),"lineup"===y&&(0,a.jsx)(f,{matchDetails:s}),"events"===y&&(0,a.jsx)(_,{events:s?.events}),"standings"===y&&(0,a.jsx)(k,{standings:r}),"odds"===y&&(0,a.jsx)(E,{odds:s?.odds})]})]}):null),t.length>0&&(0,a.jsxs)("div",{className:"mt-4 mx-4 md:mx-0",children:[(0,a.jsxs)("h2",{className:"px-1 py-4 text-sm sm:text-base font-black text-slate-800 uppercase flex items-center gap-3 tracking-widest border-b border-slate-100 mb-4",children:[(0,a.jsx)("span",{className:"w-1 h-5 bg-[#4681E8] rounded-sm shadow-[0_0_8px_#4681E8]"}),"TRẬN ĐẤU C\xd9NG GIẢI"]}),(0,a.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3 sm:gap-4",children:t.slice(0,4).map(e=>(0,a.jsx)(w,{m:e},e.id))})]})]}),(0,a.jsx)("div",{className:"w-full lg:w-[350px] xl:w-[400px] shrink-0 px-4 md:px-0",children:(0,a.jsxs)("div",{className:"bg-white border border-slate-200 rounded-2xl overflow-hidden flex flex-col shadow-[0_10px_30px_rgba(0,0,0,0.1)] lg:sticky lg:top-8 h-[600px] lg:h-[c
961alc(100vh-100px)] lg:max-h-[850px]",children:[(0,a.jsxs)("div",{className:"px-5 py-4 border-b border-slate-200 flex items-center justify-between bg-white",children:[(0,a.jsxs)("h3",{className:"text-slate-800 text-sm font-black uppercase tracking-widest flex items-center gap-2",children:[(0,a.jsx)("span",{className:"w-2.5 h-2.5 rounded-full bg-[#4681E8] shadow-[0_0_10px_rgba(70,129,232,0.4)]"}),"PH\xd2NG CHAT"]}),(0,a.jsxs)("span",{className:"text-[10px] bg-white px-3 py-1.5 rounded-full text-[#4681E8] font-mono border border-[#4681E8]/30 shadow-inner tracking-widest flex items-center gap-1.5",children:[(0,a.jsx)("svg",{className:"w-3 h-3",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 10l4.553-2.276A1 1 0 0121 8.618v6.764a1 1 0 01-1.447.894L15 14M5 18h8a2 2 0 002-2V8a2 2 0 00-2-2H5a2 2 0 00-2 2v8a2 2 0 002 2z"})}),L.length," BLV"]})]}),(0,a.jsx)("div",{className:"flex-1 bg-[#FFFFFF]/40 min-h-0 chat-container-wrapper",children:(0,a.jsx)(N,{anchors:L,selectedAnchor:M})})]})})]})]})}let p={25:"KIỂM SO\xc1T B\xd3NG",24:"CHUYỀN CH\xcdNH X\xc1C",23:"TỔNG SỐ ĐƯỜNG CHUYỀN",22:"TẤN C\xd4NG",21:"T.C\xd4NG NGUY HIỂM",2:"S\xdaT TR\xdaNG Đ\xcdCH",37:"PHẠT G\xd3C",28:"N\xc9M BI\xcaN",8:"VIỆT VỊ",3:"THẺ V\xc0NG",4:"THẺ ĐỎ",5:"S\xdaT PENALTY",29:"PHẠM LỖI",26:"Đ\xc1NH ĐẦU",27:"CỨU THUA",1:"B\xc0N THẮNG",7:"PHẢN LƯỚI"},u=[25,21,22,24,2,23,4,3,37,28,8,5,29],g="https://cdn.sportdb.live/upload/team/";function b({matchDetails:e}){let[t,s]=(0,l.useState)("full"),r=e?.stats,n=e?.lineup,i=n?.match?.home_team,o=n?.match?.away_team,c=null;Array.isArray(r)&&r.length>0?c=r[0]:r?.results?.[0]?c=r.results[0]:r?.stats_full_time&&(c=r);let d={full:c?.stats_full_time||[],h1:c?.stats_haft_time||c?.stats_half_time||[],h2:c?.stats_haft_time_2nd_half||[]}[t]||[];if(!c||0===d.length)return(0,a.jsx)(j,{text:"Thống k\xea sẽ được cập nhật khi trận đấu bắt đầu"});let x=[...d].sort((e,t)=>{let s=u.indexOf(e.type),a=u.indexOf(t.type);return(-1===s?999:s)-(-1===a?999:a)});return(0,a.jsxs)("div",{className:"flex flex-col",children:[(i||o)&&(0,a.jsxs)("div",{className:"flex items-center justify-between px-4 py-3 border-b border-slate-100",children:[(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5 w-20",children:[i?.logo&&(0,a.jsx)("img",{src:g+i.logo,alt:i?.name||"Home team",className:"w-8 h-8 object-contain",onError:e=>e.target.style.display="none",loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-slate-600 text-[10px] font-medium text-center leading-tight",children:i?.name||""})]}),(0,a.jsx)("div",{className:"flex gap-1",children:[{k:"h1",l:"Hiệp 1"},{k:"h2",l:"Hiệp 2"},{k:"full",l:"Cả trận"}].map(({k:e,l})=>(0,a.jsx)("button",{onClick:()=>s(e),className:`px-2.5 py-1 text-[10px] font-bold rounded transition-all ${t===e?"bg-[#E11D48] text-white":"text-slate-400 hover:text-slate-600 bg-slate-100"}`,children:l},e))}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5 w-20",children:[o?.logo&&(0,a.jsx)("img",{src:g+o.logo,alt:o?.name||"Away team",className:"w-8 h-8 object-contain",onError:e=>e.target.style.display="none",loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-slate-600 text-[10px] font-medium text-center leading-tight",children:o?.name||""})]})]}),(0,a.jsx)("div",{className:"px-4 py-3 space-y-3",children:x.map(e=>{let t=p[e.type]||`Stat ${e.type}`,s=e.home,l=e.away,r=24===e.type||25===e.type,n=s+l,i=0===n?50:s/n*100,o=s>l,c=l>s;return(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"flex justify-between items-center mb-1.5",children:[(0,a.jsxs)("span",{className:`text-xs font-bold w-10 tabular-nums ${o?"text-slate-800":"text-slate-400"}`,children:[s,r?"%":""]}),(0,a.jsx)("span",{className:"text-slate-400 text-[10px] font-semibold tracking-wide uppercase",children:t}),(0,a.jsxs)("span",{className:`text-xs font-bold w-10 text-right tabular-nums ${c?"text-slate-800":"text-slate-400"}`,children:[l,r?"%":""]})]}),(0,a.jsxs)("div",{className:"flex gap-0.5 h-[5px]",children:[(0,a.jsx)("div",{className:"flex-1 rounded-l-full bg-white/[0.06] overflow-hidden flex justify-end",children:(0,a.jsx)("div",{className:`rounded-l-full transition-all duration-500 ${o?"bg-gradient-to-r from-[#E11D48]/60 to-[#E11D48]":"bg-gradient-to-r from-white/10 to-white/20"}`,style:{width:`${i}%`}})}),(0,a.jsx)("div",{className:"flex-1 rounded-r-full bg-white/[0.06] overflow-hidden",children:(0,a.jsx)("div",{className:`rounded-r-full transition-all duration-500 ${c?"bg-gradient-to-l from-[#E11D48]/60 to-[#E11D48]":"bg-gradient-to-l from-white/10 to-white/20"}`,style:{width:`${100-i}%`}})})]})]},e.type)})})]})}
961function f({matchDetails:e}){let[t,s]=(0,l.useState)("pitch"),r=e?.lineup,n=r?.lineup||r,i=n?.home||[],o=n?.away||[],c=r?.home_formation||"",d=r?.away_formation||"",x=r?.match?.home_team,h=r?.match?.away_team;if(0===i.length&&0===o.length)return(0,a.jsx)(j,{text:"Đội h\xecnh sẽ được c\xf4ng bố trước trận đấu 30 ph\xfat"});let m=e=>e.filter(e=>1===e.first),p=e=>e.filter(e=>1!==e.first),u=m(i),g=m(o),b=p(i),w=p(o);return(0,a.jsxs)("div",{className:"flex flex-col",children:[(0,a.jsxs)("div",{className:"flex items-center justify-center gap-1 px-3 py-2 border-b border-slate-100",children:[(0,a.jsx)("button",{onClick:()=>s("pitch"),className:`px-3 py-1.5 text-[10px] font-bold rounded transition-all ${"pitch"===t?"bg-[#E11D48] text-white":"text-slate-400 bg-slate-100"}`,children:"Đội h\xecnh xuất ph\xe1t"}),(0,a.jsx)("button",{onClick:()=>s("list"),className:`px-3 py-1.5 text-[10px] font-bold rounded transition-all ${"list"===t?"bg-[#E11D48] text-white":"text-slate-400 bg-slate-100"}`,children:"Đội h\xecnh dá»± bị"})]}),"pitch"===t?(0,a.jsx)("div",{className:"relative w-full",style:{aspectRatio:"68/105"},children:(0,a.jsxs)("div",{className:"absolute inset-0 bg-gradient-to-b from-[#1a5c2a] via-[#1e6b31] to-[#1a5c2a] rounded-2xl overflow-hidden",children:[(0,a.jsxs)("div",{className:"absolute inset-[3%] border border-white/20 rounded-lg",children:[(0,a.jsx)("div",{className:"absolute left-0 right-0 top-1/2 h-px bg-white/20"}),(0,a.jsx)("div",{className:"absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 w-[22%] aspect-square rounded-full border border-white/20"}),(0,a.jsx)("div",{className:"absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 w-1.5 h-1.5 bg-white/30 rounded-full"}),(0,a.jsx)("div",{className:"absolute top-0 left-1/2 -translate-x-1/2 w-[55%] h-[16%] border-l border-r border-white/20"}),(0,a.jsx)("div",{className:"absolute top-0 left-1/2 -translate-x-1/2 w-[25%] h-[6%] border-l border-r border-white/20"}),(0,a.jsx)("div",{className:"absolute bottom-0 left-1/2 -translate-x-1/2 w-[55%] h-[16%] border-t border-l border-r border-white/20"}),(0,a.jsx)("div",{className:"absolute bottom-0 left-1/2 -translate-x-1/2 w-[25%] h-[6%] border-t border-l border-r border-white/20"})]}),(0,a.jsx)("div",{className:"absolute top-1 left-2 text-[9px] text-[#F8FAFC]/50 font-bold z-10",children:x?.name||""}),(0,a.jsx)("div",{className:"absolute top-1 right-2 text-[9px] text-[#E11D48]/70 font-bold z-10",children:c}),(0,a.jsx)("div",{className:"absolute bottom-1 left-2 text-[9px] text-[#F8FAFC]/50 font-bold z-10",children:h?.name||""}),(0,a.jsx)("div",{className:"absolute bottom-1 right-2 text-[9px] text-[#E11D48]/70 font-bold z-10",children:d}),u.map((e,t)=>{let s=`${e.x||50}%`,l=`${(e.y||10)/2}%`,r="G"===e.position;return(0,a.jsxs)("div",{className:"absolute flex flex-col items-center z-10 -translate-x-1/2 -translate-y-1/2",style:{left:s,top:l},children:[(0,a.jsx)("div",{className:`w-6 h-6 rounded-full flex items-center justify-center text-[9px] font-black ${r?"bg-yellow-400 text-black":"bg-blue-600 text-[#F8FAFC]"} shadow-md border border-white/20`,children:e.shirt_number||""}),(0,a.jsx)("span",{className:"text-[7px] text-[#F8FAFC] font-semibold mt-0.5 text-center max-w-[48px] truncate drop-shadow-[0_1px_2px_rgba(0,0,0,0.8)]",children:(e.name||"").split(" ").slice(-2).join(" ")}),1===e.captain&&(0,a.jsx)("span",{className:"absolute -top-1 -right-1 text-[6px] text-yellow-400",children:"C"})]},`h-${t}`)}),g.map((e,t)=>{let s=`${100-(e.x||50)}%`,l=`${100-(e.y||10)/2}%`,r="G"===e.position;return(0,a.jsxs)("div",{className:"absolute flex flex-col items-center z-10 -translate-x-1/2 -translate-y-1/2",style:{left:s,top:l},children:[(0,a.jsx)("div",{className:`w-6 h-6 rounded-full flex items-center justify-center text-[9px] font-black ${r?"bg-yellow-400 text-black":"bg-orange-500 text-[#F8FAFC]"} shadow-md border border-white/20`,children:e.shirt_number||""}),(0,a.jsx)("span",{className:"text-[7px] text-[#F8FAFC] font-semibold mt-0.5 text-center max-w-[48px] truncate drop-shadow-[0_1px_2px_rgba(0,0,0,0.8)]",children:(e.name||"").split(" ").slice(-2).join(" ")}),1===e.captain&&(0,a.jsx)("span",{className:"absolute -top-1 -right-1 text-[6px] text-yellow-400",children:"C"})]},`a-${t}`)})]})}):(0,a.jsxs)("div",{className:"px-3 py-2 text-xs",children:[(0,a.jsxs)("div",{className:"flex justify-between font-bold text-slate-400 mb-1 uppercase tracking-wider text-[9px] px-1",children:[(0,a.jsx)("span",{children:"Đội chá»
961§ nh\xe0"}),(0,a.jsx)("span",{children:"Đội kh\xe1ch"})]}),Array.from({length:Math.max(b.length,w.length)}).map((e,t)=>{let s=b[t],l=w[t];return(0,a.jsxs)("div",{className:"flex justify-between items-center border-b border-slate-50 py-1.5",children:[(0,a.jsx)("div",{className:"flex items-center gap-1.5 w-1/2 min-w-0",children:s&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"text-[#E11D48] font-bold w-5 text-center shrink-0 text-[10px]",children:s.shirt_number||""}),(0,a.jsx)("span",{className:"text-slate-700 truncate text-[11px]",children:s.name||""})]})}),(0,a.jsx)("div",{className:"flex items-center gap-1.5 w-1/2 justify-end min-w-0",children:l&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"text-slate-700 truncate text-[11px] text-right",children:l.name||""}),(0,a.jsx)("span",{className:"text-[#E11D48] font-bold w-5 text-center shrink-0 text-[10px]",children:l.shirt_number||""})]})})]},t)})]})]})}function j({text:e}){return(0,a.jsx)("div",{className:"flex items-center justify-center py-10 text-slate-400 text-sm text-center",children:e})}function w({m:e}){let t=c(e.status_id,e.sport_id),{hm:s,dm:l}=x(e.time),r=e.source_card_meta?.league_label||e.match_data?.competition_vi||"";return(0,a.jsxs)("a",{href:`/match/${encodeURIComponent(e.post_name||e.id)}`,className:"flex items-center gap-3 rounded-2xl bg-white hover:bg-slate-50 border border-slate-100 hover:border-[#4681E8]/30 p-3 transition-all group",children:[(0,a.jsxs)("div",{className:"shrink-0 w-14 text-center",children:[(0,a.jsx)("div",{className:"text-[#E11D48] text-[11px] font-bold",children:s}),(0,a.jsx)("div",{className:"text-slate-400 text-[9px]",children:l})]}),(0,a.jsx)("div",{className:"w-px h-9 bg-slate-200 shrink-0"}),(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("div",{className:"text-slate-400 text-[9px] truncate mb-1",children:r}),(0,a.jsxs)("div",{className:"flex items-center gap-2 mb-0.5",children:[(0,a.jsx)("img",{src:e.home_logo||d(e.home_name),alt:e.home_name,className:"w-4 h-4 object-contain shrink-0",onError:t=>t.target.src=d(e.home_name),loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-slate-600 text-[12px] font-medium truncate",children:e.home_name})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("img",{src:e.away_logo||d(e.away_name),alt:e.away_name,className:"w-4 h-4 object-contain shrink-0",onError:t=>t.target.src=d(e.away_name),loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-slate-600 text-[12px] font-medium truncate",children:e.away_name})]})]}),t.sc?(0,a.jsxs)("span",{className:"text-slate-800 font-bold text-[14px] tabular-nums shrink-0",children:[e.home_score,"-",e.away_score]}):(0,a.jsx)("span",{className:"text-[10px] font-bold text-[#E11D48] bg-[#E11D48]/10 rounded px-2.5 py-1 group-hover:bg-[#E11D48]/15 transition shrink-0",children:"XEM NGAY"})]})}let v={0:{bg:"bg-white/10",text:"text-[#F8FAFC]/40",nameCls:"text-[#94A3B8]"},1:{bg:"bg-white/10",text:"text-[#F8FAFC]/50",nameCls:"text-[#94A3B8]"},2:{bg:"bg-green-900/50",text:"text-green-400",nameCls:"text-green-400"},3:{bg:"bg-yellow-900/40",text:"text-yellow-400",nameCls:"text-emerald-600 font-bold"},4:{bg:"bg-blue-900/40",text:"text-blue-400",nameCls:"text-blue-400 font-bold"},5:{bg:"bg-red-900/40",text:"text-red-400",nameCls:"text-red-400 font-bold"}};function N({anchors:e,selectedAnchor:t}){let[s,r]=(0,l.useState)([]),[n,i]=(0,l.useState)(!1),o=(0,l.useRef)(null),c=(0,l.useRef)(null),d=t?.roomNum;return(0,l.useEffect)(()=>{if(!d)return;r([]),i(!1);let e=new EventSource(`/api/chat/${d}`);return e.onopen=()=>i(!0),e.onmessage=e=>{try{let t=JSON.parse(e.data);if("connected"===t.type)return void i(!0);if("history"===t.type&&Array.isArray(t.messages))return void r(e=>[...t.messages,...e].slice(-200));t.user&&t.text&&r(e=>[...e,t].slice(-200))}catch{}},e.onerror=()=>i(!1),()=>{e.close(),i(!1)}},[d]),(0,l.useEffect)(()=>{requestAnimationFrame(()=>{let e=c.current;e&&(e.scrollTop=e.scrollHeight)})},[s.length]),(0,a.jsxs)("div",{className:"flex flex-col h-full bg-[#0F0F23]",children:[(0,a.jsxs)("div",{ref:c,className:"flex-1 min-h-0 px-3 py-2 flex flex-col gap-[3px] overflow-y-auto",style:{scrollbarWidth:"thin",scrollbarColor:"#444 transparent"},children:[(0,a.jsx)("div",{className:"text-center text-[10px] text-[#F8FAFC]/30 bg-slate-50/60 py-1.5 rounded-xl mb-1 sticky top-0 z-10 backdrop-blur-sm",children:n?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"inline-block h-1.5 w-1.5 rounded-full bg-green-400 animate-pulse mr-1"}),"Đang kết nối ph\xf2ng chat trá»±c tiếp"]}):d?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"inline-block h-1.5 w-1.5 rounded-full bg-yellow-400 animate-pulse mr-1"}),"Đang kết nối..."]}
961):"Ch\xe0o mừng bạn đến với ph\xf2ng chat"}),0===s.length&&n&&(0,a.jsx)("div",{className:"text-center text-[10px] text-[#F8FAFC]/20 py-4",children:"Chờ tin nhắn mới..."}),s.map((e,t)=>{var s;let l=(s=e.level)>=5?v[5]:v[s]||v[0];return 2===e.type||e.text?.includes("v\xe0o ph\xf2ng tr\xf2 chuyện")?(0,a.jsxs)("div",{className:"flex items-start gap-1.5 text-[11px] leading-relaxed py-[1px] opacity-60",children:[(0,a.jsx)("span",{className:"text-green-500/70 font-medium",children:"Hi"}),(0,a.jsxs)("span",{className:`shrink-0 inline-flex items-center px-1 py-[0.5px] rounded text-[8px] font-bold ${l.bg} ${l.text}`,children:["Lv",e.level]}),(0,a.jsxs)("span",{className:`font-bold ${l.nameCls}`,children:[e.user,":"]}),(0,a.jsx)("span",{className:"text-[#F8FAFC]/40",children:e.text})]},`${e.ts}-${t}`):(0,a.jsxs)("div",{className:"flex items-start gap-1.5 text-[11px] leading-relaxed py-[1px]",children:[(0,a.jsxs)("span",{className:`shrink-0 inline-flex items-center px-1 py-[0.5px] rounded text-[8px] font-bold ${l.bg} ${l.text}`,children:["Lv.",e.level]}),(0,a.jsxs)("span",{className:`font-bold shrink-0 ${l.nameCls}`,children:[e.user,":"]}),(0,a.jsx)("span",{className:"text-[#F8FAFC]/80 break-words min-w-0",children:e.text})]},`${e.ts}-${t}`)}),(0,a.jsx)("div",{ref:o})]}),(0,a.jsxs)("div",{className:"shrink-0 px-3 py-2 bg-[#0F0F23] border-t border-white/[0.04] space-y-2",children:[(0,a.jsx)("div",{className:"flex items-center justify-center gap-3 text-[#F8FAFC]/20 text-[10px]",children:(0,a.jsx)("span",{className:"flex items-center gap-1",children:(0,a.jsx)("svg",{className:"w-3 h-3",viewBox:"0 0 24 24",fill:"currentColor",children:(0,a.jsx)("path",{d:"M12 4.5C7 4.5 2.7 7.6 1 12c1.7 4.4 6 7.5 11 7.5s9.3-3.1 11-7.5c-1.7-4.4-6-7.5-11-7.5zm0 12.5c-2.8 0-5-2.2-5-5s2.2-5 5-5 5 2.2 5 5-2.2 5-5 5zm0-8c-1.7 0-3 1.3-3 3s1.3 3 3 3 3-1.3 3-3-1.3-3-3-3z"})})})}),(0,a.jsxs)("div",{className:"flex bg-[#0F0F23] rounded-2xl overflow-hidden border border-white/[0.08]",children:[(0,a.jsx)("input",{type:"text",placeholder:"Đăng nhập để c\xf9ng chat nh\xe9",disabled:!0,className:"flex-1 bg-transparent px-3 py-2 text-[11px] text-[#F8FAFC] outline-none placeholder:text-[#F8FAFC]/30 disabled:opacity-50"}),(0,a.jsx)("button",{disabled:!0,className:"px-4 text-[11px] font-bold bg-[#E11D48] text-black disabled:bg-white/10 disabled:text-[#F8FAFC]/20 transition-colors",children:"Gửi"})]})]})]})}let y={1:{icon:"⚽",label:"B\xe0n thắng",color:"text-green-400"},2:{icon:"\uD83C\uDD7F️",label:"Phạt đền",color:"text-green-400"},3:{icon:"\uD83D\uDFE1",label:"Thẻ v\xe0ng",color:"text-yellow-400"},4:{icon:"\uD83D\uDFE1\uD83D\uDFE1",label:"Thẻ v\xe0ng 2",color:"text-emerald-600"},5:{icon:"\uD83D\uDD34",label:"Thẻ đỏ",color:"text-red-500"},7:{icon:"\uD83D\uDD04",label:"Phản lưới",color:"text-orange-400"},8:{icon:"\uD83C\uDFE5",label:"Chấn thương",color:"text-[#94A3B8]"},9:{icon:"\uD83D\uDD04",label:"Thay người",color:"text-blue-400"},11:{icon:"⏱️",label:"Hiệp 2",color:"text-[#F8FAFC]/40"},15:{icon:"\uD83E\uDD45",label:"Pen trượt",color:"text-red-400"},19:{icon:"⏱️",label:"Kết th\xfac hiệp",color:"text-[#F8FAFC]/30"},21:{icon:"\uD83C\uDFC6",label:"VAR",color:"text-purple-400"}};function _({events:e}){let t=e?.incidents||e?.events||[];return t&&0!==t.length?(0,a.jsx)("div",{className:"flex flex-col",children:t.map((e,t)=>{let s=y[e.type]||{icon:"•",label:`Event ${e.type}`,color:"text-[#F8FAFC]/50"},l=1===e.position,r=2===e.position,n=e.add_time?`+${e.add_time}`:"",i=`${e.time}'${n}`;return l||r||11!==e.type&&19!==e.type?9===e.type?(0,a.jsxs)("div",{className:`flex items-center gap-2 border-b border-slate-50 p-3 text-xs ${l?"":"flex-row-reverse"}`,children:[(0,a.jsx)("span",{className:"text-slate-400 w-10 text-center shrink-0 text-[10px]",children:i}),(0,a.jsxs)("div",{className:`flex-1 flex flex-col gap-0.5 ${l?"items-start":"items-end"}`,children:[(0,a.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,a.jsx)("span",{className:"text-green-400 text-[10px]",children:"▲"}),(0,a.jsx)("span",{className:"text-[#F8FAFC]/80 text-[11px]",children:e.in_player_name||""})]}),(0,a.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,a.jsx)("span",{className:"text-red-400 text-[10px]",children:"▼"}),(0,a.jsx)("span",{className:"text-[#F8FAFC]/40 text-[11px]",children:e.out_player_name||""})]})]})]},t):(0,a.jsxs)("div",{className:`flex items-center gap-2 border-b border-slate-50 p-3 text-xs ${l?"":"flex-row-reverse"}`,children:[(0,a.jsx)("span",{className:"text-slate-400 w-10 text-center shrink-0 text-[10px]",children:i}),(0,a.jsx)("span",{className:`shrink-0 text-sm ${s.color}`,children:s.icon}),(0,a.jsxs)("div",{className:`flex-1 min-w-0 ${l?"text-left":"text-right"}`,children:[(0,a.jsx)("span",{className:"text-slate-700 text-[11px]",children:e.player_name||""}),e.assist1_name&&(0,a.jsxs)("span",{className:"text-slate-400 text-[10px] ml-1",children:["(kiến tạo: ",e.assist1_name,")"]}),1===e.type&&void 0!==e.home_score&&(0,a.jsxs)("span",{className:"text-[#E11D48] font-bold text-[11px] ml-2",children:[e.home_score," - ",e.away_score]})]})]},t):(0,a.jsx)("div",{className:"flex items-center justify-center py-2 border-b border-slate-50 bg-slate-50",children:(0,a.jsxs)("span",{className:"text-slate-400 text-[10px] uppercase tracking-wider",children:[s.icon," ",s.label," — ",i]})},t)})}):(0,a.jsx)(j,{text:"Diễn biến trận đấu sẽ được cập nhật trực tiếp tại đ\xe2y"})}function k({standings:e}
961){return e&&e.teams&&0!==e.teams.length?(0,a.jsxs)("div",{className:"w-full text-[10px]",children:[(0,a.jsxs)("div",{className:"grid grid-cols-[20px_1fr_24px_24px_32px] bg-slate-50 p-2 text-slate-400 uppercase font-bold sticky top-0",children:[(0,a.jsx)("span",{className:"text-center",children:"#"}),(0,a.jsx)("span",{children:"Team"}),(0,a.jsx)("span",{className:"text-center",children:"T"}),(0,a.jsx)("span",{className:"text-center",children:"B"}),(0,a.jsx)("span",{className:"text-center whitespace-nowrap",children:"Đ"})]}),e.teams.slice(0,15).map((e,t)=>{let s=!!e.data,l=s?parseFloat(e.data[0]):e.rank||t+1,r=s?e.data[1]:e.target_name,n=s?e.data[7]:e.points,i=s?e.data[3]:e.won,o=s?e.data[5]:e.loss;return(0,a.jsxs)("div",{className:"grid grid-cols-[20px_1fr_24px_24px_32px] items-center p-2 border-b border-slate-50 hover:bg-slate-50 transition-colors",children:[(0,a.jsx)("span",{className:"text-center text-slate-500",children:l}),(0,a.jsxs)("div",{className:"flex items-center gap-1.5 min-w-0 pr-2",children:[e.team_logo&&(0,a.jsx)("img",{src:e.team_logo,className:"w-3.5 h-3.5 object-contain",alt:r||"Team logo",loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-slate-700 font-medium truncate",children:r})]}),(0,a.jsx)("span",{className:"text-center text-slate-500",children:i}),(0,a.jsx)("span",{className:"text-center text-slate-500",children:o}),(0,a.jsx)("span",{className:"text-center text-[#E11D48] font-bold",children:n})]},r)})]}):(0,a.jsx)(j,{text:"Bảng xếp hạng sẽ được cập nhật"})}function E({odds:e}){let t=Array.isArray(e)?e:[],s=["2","4","3","16"];function l(e){for(let a of s){let s=t.find(t=>t.odds_type===e&&String(t.company_id)===a);if(s?.odds_info?.length)return s}return t.find(t=>t.odds_type===e&&t.odds_info?.length>0)}function r(e,t){let s=e?.odds_info;if(!s?.length)return["-","-","-"];let a="opening"===t?s.length-1:0;if(!s?.length||!s[a])return["-","-","-"];let l=s[a][2];if("string"!=typeof l)return["-","-","-"];let r=l.split(",");return[r[0]||"-",r[1]||"-",r[2]||"-"]}let n=l("asia"),i=l("eu"),o=l("bs"),c=l("cr"),d=r(n,"opening"),x=r(n,"latest"),h=r(i,"opening"),m=r(i,"latest"),p=r(o,"opening"),u=r(o,"latest"),g=r(c,"opening"),b=r(c,"latest"),f=({children:e})=>(0,a.jsx)("th",{className:"px-2 py-2 text-[9px] sm:text-[10px] font-bold uppercase tracking-wider text-slate-500 border-b border-slate-100 text-center",children:e}),j=({children:e,color:t})=>(0,a.jsx)("td",{className:`px-2 py-2.5 text-center text-[11px] sm:text-xs font-bold ${t||"text-slate-600"} border-b border-slate-50`,children:e});return(0,a.jsxs)("div",{className:"overflow-x-auto",children:[(0,a.jsxs)("table",{className:"w-full min-w-[600px]",children:[(0,a.jsxs)("thead",{children:[(0,a.jsxs)("tr",{className:"bg-slate-50",children:[(0,a.jsx)("th",{className:"px-4 py-2 text-left border-b border-slate-100",rowSpan:2,children:(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("div",{className:"w-7 h-7 rounded bg-gradient-to-br from-[#1d4ed8] to-[#3b82f6] flex items-center justify-center text-white text-[9px] font-black shadow-sm",children:"B"}),(0,a.jsx)("span",{className:"text-slate-600 text-[11px] font-bold tracking-wider",children:"SPORT"})]})}),(0,a.jsx)("th",{colSpan:3,className:"px-1 py-1.5 text-center text-[9px] sm:text-[10px] font-bold uppercase tracking-wider text-[#4681E8] border-b border-l border-slate-100",children:"CƯỢC CH\xc2U \xc1"}),(0,a.jsx)("th",{colSpan:3,className:"px-1 py-1.5 text-center text-[9px] sm:text-[10px] font-bold uppercase tracking-wider text-[#4681E8] border-b border-l border-slate-100",children:"CƯỢC CH\xc2U \xc2U"}),(0,a.jsx)("th",{colSpan:3,className:"px-1 py-1.5 text-center text-[9px] sm:text-[10px] font-bold uppercase tracking-wider text-[#4681E8] border-b border-l border-slate-100",children:"T\xc0I XỈU"}),(0,a.jsx)("th",{colSpan:3,className:"px-1 py-1.5 text-center text-[9px] sm:text-[10px] font-bold uppercase tracking-wider text-[#4681E8] border-b border-l border-slate-100",children:"K\xc8O G\xd3C"})]}),(0,a.jsxs)("tr",{className:"bg-slate-50",children:[(0,a.jsx)(f,{children:"CHỦ"}),(0,a.jsx)(f,{children:"CHẤP"}),(0,a.jsx)(f,{children:"KH\xc1CH"}),(0,a.jsx)(f,{children:"CHỦ"}),(0,a.jsx)(f,{children:"H\xd2A"}),(0,a.jsx)(f,{children:"KH\xc1CH"}),(0,a.jsx)(f,{children:"T\xc0I"}),(0,a.jsx)(f,{children:"TỶ LỆ"}),(0,a.jsx)(f,{children:"XỈU"}),(0,a.jsx)(f,{children:"T\xc0I"}),(0,a.jsx)(f,{children:"TỶ LỆ"}),(0,a.jsx)(f,{children:"XỈU"})]})]}),(0,a.jsxs)("tbody",{children:[(0,a.jsxs)("tr",{className:"hover:bg-slate-50 transition-colors",children:[(0,a.jsx)("td",{className:"px-4 py-2.5 text-[11px] sm:text-xs text-slate-500 font-medium border-b border-slate-50",children:"Tỷ Lệ Mở Cược"}),(0,a.jsx)(j,{children:d[0]}),(0,a.jsx)(j,{color:"text-red-400",children:d[1]}),(0,a.jsx)(j,{children:d[2]}),(0,a.jsx)(j,{children:h[0]}),(0,a.jsx)(j,{children:h[1]}),(0,a.jsx)(j,{children:h[2]}),(0,a.jsx)(j,{children:p[0]}),(0,a.jsx)(j,{children:p[1]}),(0,a.jsx)(j,{children:p[2]}),(0,a.jsx)(j,{children:g[0]}),(0,a.jsx)(j,{children:g[1]}),(0,a.jsx)(j,{children:g[2]})]}),(0,a.jsxs)("tr",{className:"hover:bg-slate-50 transition-colors",children:[(0,a.jsx)("td",{className:"px-4 py-2.5 text-[11px] sm:text-xs text-slate-500 font-medium border-b border-slate-50",children:"Tỷ Lệ Trước Trận"}),(0,a.jsx)(j,{children:x[0]}),(0,a.jsx)(j,{color:"text-red-400",children:x[1]}),(0,a.jsx)(j,{children:x[2]}),(0,a.jsx)(j,{children:m[0]}),(0,a.jsx)(j,{children:m[1]}),(0,a.jsx)(j,{children:m[2]}),(0,a.jsx)(j,{children:u[0]}),(0,a.jsx)(j,{children:u[1]}),(0,a.jsx)(j,{children:u[2]}),(0,a.jsx)(j,{children:b[0]}),(0,a.jsx)(j,{children:b[1]}),(0,a.jsx)(j,{children:b[2]})]}),(0,a.jsxs)("tr",{className:"hover:bg-slate-50 transition-colors bg-white",children:[(0,a.jsxs)("td",{className:"px-4 py-2.5 text-[11px] sm:text-xs text-slate-700 font-bold flex items-center gap-1.5 border-b border-slate-50",children:["Live ",(0,a.jsx)("span",{className:"w-1.5 h-1.5 rounded-full bg-red-500 animate-pulse"})]}),(0,a.jsx)(j,{color:"text-green-400",children:x[0]}),(0,a.jsx)(j,{color:"text-red-400",children:x[1]}),(0,a.jsx)(j,{color:"text-green-400",children:x[2]}),(0,a.jsx)(j,{color:"text-green-400",children:m[0]}),(0,a.jsx)(j,{color:"text-green-400",children:m[1]}),(0,a.jsx)(j,{color:"text-green-400",children:m[2]}),(0,a.jsx)(j,{color:"text-green-400",children:u[0]}),(0,a.jsx)(j,{children:u[1]}),(0,a.jsx)(j,{color:"text-green-400",children:u[2]}),(0,a.jsx)(j,{color:"text-green-400",children:b[0]}),(0,a.jsx)(j,{children:b[1]}),(0,a.jsx)(j,{color:"text-green-400",children:b[2]})]})]})]}),(0,a.jsx)("p",{className:"text-center text-slate-400 text-[10px] py-2.5 border-t border-slate-100",children:"Tỷ lệ k\xe8o sẽ được cập nhật gần giờ thi đấu"})]})}},92761:()=>{},94197:(e,t,s)=>{"use strict";s.d(t,{StandingsClient:()=>h});var a=s(68019),l=s(10707),r=s(46914),n=s(71099);function i(e){return"W"===e?"border border-emerald-500/45 bg-emerald-500/25 text-emerald-300 shadow-[0_0_0_1px_rgba(16,185,129,0.08)_inset]":"L"===e?"border border-red-500/45 bg-red-500/25 text-red-300 shadow-[0_0_0_1px_rgba(239,68,68,0.08)_inset]":"D"===e?"border border-amber-400/45 bg-amber-400/22 text-amber-200 shadow-[0_0_0_1px_rgba(251,191,36,0.08)_inset]":"border border-slate-500/40 bg-slate-500/18 text-slate-700"}function o(e,t){return 1===e?{bar:"bg-[linear-gradient(180deg,#facc15,#f97316)]",badge:"border-emerald-600/60 bg-slate-100 text-yellow-700 shadow-[0_0_18px_rgba(250,204,21,0.14)]",row:"from-[#32230d]/70 via-trans
961parent to-transparent"}:e<=4?{bar:"bg-[linear-gradient(180deg,#fb7185,#f97316)]",badge:"border-[#fb7185]/45 bg-slate-100 text-rose-700",row:"from-[#241318]/55 via-transparent to-transparent"}:e<=6?{bar:"bg-[linear-gradient(180deg,#f59e0b,#facc15)]",badge:"border-[#f59e0b]/45 bg-slate-100 text-yellow-700",row:"from-[#24190b]/45 via-transparent to-transparent"}:e<=10?{bar:"bg-[linear-gradient(180deg,#38bdf8,#2563eb)]",badge:"border-sky-400/40 bg-white text-sky-700",row:"from-[#101725]/32 via-transparent to-transparent"}:e>=Math.max(t-2,1)?{bar:"bg-[linear-gradient(180deg,#ef4444,#7f1d1d)]",badge:"border-red-500/40 bg-slate-100 text-red-700",row:"from-[#220f14]/45 via-transparent to-transparent"}:{bar:"bg-[linear-gradient(180deg,#64748b,#334155)]",badge:"border-slate-500/35 bg-white text-slate-700",row:"from-[#12161d]/24 via-transparent to-transparent"}}function c({detail:e}){let[t,s]=(0,l.useState)(!1),n=(0,l.useRef)(null),[o,d]=(0,l.useState)({top:0,left:0}),x=i(e.result),h=(0,l.useCallback)(()=>{if(n.current){let e=n.current.getBoundingClientRect();d({top:e.top+window.scrollY-8,left:e.left+e.width/2+window.scrollX})}s(!0)},[]);return(0,a.jsxs)("div",{ref:n,className:"relative inline-flex",onMouseEnter:h,onMouseLeave:()=>s(!1),children:[(0,a.jsx)("span",{className:`inline-flex h-7 w-7 items-center justify-center rounded-[8px] text-[11px] font-black cursor-pointer transition-transform hover:-translate-y-0.5 ${x}`,children:e.result}),t&&e.match_time&&"u">typeof document&&(0,r.createPortal)((0,a.jsxs)("div",{className:"fixed z-[9999] w-[220px] pointer-events-none",style:{top:`${o.top}px`,left:`${o.left}px`,transform:"translate(-50%, -100%)",position:"absolute"},children:[(0,a.jsxs)("div",{className:"overflow-hidden rounded-xl border border-[#cbd5e1] bg-white shadow-2xl",children:[(0,a.jsx)("div",{className:"bg-slate-100 px-3 py-1.5 text-[10px] text-slate-600 font-mono text-center border-b border-[#cbd5e1]",children:e.match_time}),(0,a.jsxs)("div",{className:"px-3 py-2.5 flex items-center justify-between gap-2",children:[(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5 flex-1 min-w-0",children:[e.home_logo?(0,a.jsx)("img",{src:e.home_logo,alt:e.home_team,className:"w-7 h-7 object-contain",loading:"lazy",decoding:"async"}):(0,a.jsx)("div",{className:"w-7 h-7 rounded-full bg-gray-700 flex items-center justify-center text-[8px] text-slate-600 font-bold",children:"?"}),(0,a.jsx)("span",{className:"text-[9px] text-slate-600 font-bold text-center leading-tight line-clamp-2 max-w-[70px]",children:e.home_team})]}),(0,a.jsx)("div",{className:"text-slate-900 font-black text-sm whitespace-nowrap px-1",children:e.score||"? - ?"}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5 flex-1 min-w-0",children:[e.away_logo?(0,a.jsx)("img",{src:e.away_logo,alt:e.away_team,className:"w-7 h-7 object-contain",loading:"lazy",decoding:"async"}):(0,a.jsx)("div",{className:"w-7 h-7 rounded-full bg-gray-700 flex items-center justify-center text-[8px] text-slate-600 font-bold",children:"?"}),(0,a.jsx)("span",{className:"text-[9px] text-slate-600 font-bold text-center leading-tight line-clamp-2 max-w-[70px]",children:e.away_team})]})]})]}),(0,a.jsx)("div",{className:"absolute left-1/2 -translate-x-1/2 -bottom-1 w-2 h-2 bg-white border-r border-b border-[#cbd5e1] rotate-45"})]}),document.body)]})}function d({result:e}){let t=i(e);return(0,a.jsx)("span",{className:`inline-flex h-7 w-7 items-center justify-center rounded-[8px] text-[11px] font-black ${t}`,children:e})}function x({value:e,totalTeams:t}){let s=Number(e);if(!Number.isFinite(s))return(0,a.jsx)("td",{className:"px-4 py-4 text-center font-mono font-black text-slate-400",children:e});let l=o(s,t);return(0,a.jsxs)("td",{className:"relative px-4 py-4 text-center font-mono",children:[(0,a.jsx)("span",{className:`absolute left-0 top-1/2 h-7 w-1 -translate-y-1/2 rounded-r-full ${l.bar}`}),(0,a.jsx)("span",{className:`inline-flex h-8 w-8 items-center justify-center rounded-[10px] border text-[13px] font-black ${l.badge}`,children:s})]})}function h({initialData:e}){let[t]=(0,l.useState)(!1),[s,r]=(0,l.useState)(!1),[i,p]=(0,l.useState)(""),u=(0,l.useRef)(null);if((0,l.useEffect)(()=>{function e(e){u.current&&!u.current.contains(e.target)&&r(!1)}return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[]),!e)return(0,a.jsx)("div",{className:"text-center py-20 text-slate-600",children:"Đang tải dữ liệu..."});let g=e.available_leagues||[],b=g.filter(e=>e.name.toLowerCase().includes(i.toLowerCase())),f=e.teams&&e.teams.length>0&&Array.isArray(e.teams[0]?.form),j=!f&&e.rankings;return(0,a.jsxs)("div",{className:"mx-auto max-w-[1440px] px-4 py-8",children:[(0,a.jsx)(n.f,{eyebrow:"Bảng xếp hạng",title:"BẢNG XẾP HẠNG",rightSlot:(0,a.jsx)("div",{className:"text-[12px] text-slate-600",children:(0,a.jsx)("span",{className:"text-slate-900/80 font-bold",children:e.league_name})})}),g.length>0&&(0,a.jsxs)("div",{className:"mb-6",ref:u,children:[(0,a.jsxs)("div",{className:"relative inline-flex min-w-[320px] items-center gap-3 rounded-2xl border border-slate-200 bg-white backdrop-blur-md px-5 py-3.5 cursor-pointer shadow-[0_8px_30px_rgba(0,0,0,0.06)] transition-colors hover:border-[#4681E8]/50 hover:shadow-[0_8px_30px_rgba(70,129,232,0.1)]",onClick:()=>r(!s),children:[e.league_icon&&(0,a.jsx)("img",{src:e.league_icon,alt:e.league_name||"League icon",className:"w-6 h-6 object-contain",loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-slate-800 font-bold text-sm flex-1",children:e.league_name||"Chọn giải đấu"}),(0,a.jsx)("svg",{className:`w-4 h-4 text-[#4681E8] transition-transform ${s?"rotate-180":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),s&&(0,a.jsxs)("div",{className:"absolute z-50 mt-2 w-[360px] overflow-hidden rounded-2xl border border-slate-200 bg-white backdrop-blur-xl shadow-[0_24px_80px_rgba(0,0,0,0.15)]",children:[(0,a.jsx)("div",{className:"p-2 border-b border-slate-100",children:(0,a.jsx)("input",{type:"text",placeholder:"T\xecm kiếm giải đấu...",value:i,onChange:e=>p(e.target.value),className:"w-full bg-slate-50 text-slate-800 text-sm px-4 py-2.5 rounded-xl border border-transparent outline-none focus:border-[#4681E8]/50 placeholder-slate-400 transition-colors",autoF
961ocus:!0})}),(0,a.jsxs)("div",{className:"max-h-[340px] overflow-y-auto",children:[b.map(t=>(0,a.jsxs)("a",{href:`/standings?league=${encodeURIComponent(t.id)}`,className:`flex items-center gap-3 px-4 py-3 cursor-pointer transition-colors hover:bg-slate-50 ${t.id===e.league_id?"bg-[#4681E8]/10 border-l-4 border-[#4681E8]":""}`,children:[t.icon?(0,a.jsx)("img",{src:t.icon,alt:t.name||"League",className:"w-5 h-5 object-contain flex-shrink-0",loading:"lazy",decoding:"async"}):(0,a.jsx)("div",{className:"w-5 h-5 rounded bg-gray-700 flex-shrink-0"}),(0,a.jsx)("span",{className:"text-sm text-slate-900 truncate",children:t.name})]},t.id)),0===b.length&&(0,a.jsx)("div",{className:"px-4 py-8 text-center text-gray-500 text-sm",children:"Kh\xf4ng t\xecm thấy giải đấu"})]})]})]}),t&&(0,a.jsxs)("div",{className:"flex items-center justify-center py-12",children:[(0,a.jsx)("div",{className:"animate-spin w-8 h-8 border-2 border-emerald-600 border-t-transparent rounded-full"}),(0,a.jsx)("span",{className:"ml-3 text-slate-600 text-sm",children:"Đang tải bảng xếp hạng từ server..."})]}),!t&&f&&(0,a.jsxs)("div",{className:"overflow-hidden rounded-[24px] border border-slate-200 bg-white shadow-[0_8px_30px_rgba(0,0,0,0.08)]",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between gap-3 border-b border-[#4681E8]/20 bg-gradient-to-r from-[#4681E8] to-[#2563eb] px-6 py-4 text-white shadow-[0_4px_25px_rgba(70,129,232,0.3)]",children:[(0,a.jsx)("div",{className:"text-[13px] font-black uppercase tracking-[0.2em] drop-shadow-sm text-white/80",children:"League"}),(0,a.jsx)("div",{className:"truncate text-sm font-black sm:text-base drop-shadow-md",children:e.league_name})]}),(0,a.jsx)("div",{className:"overflow-x-auto",children:(0,a.jsxs)("table",{className:"w-full text-left border-collapse",children:[(0,a.jsx)("thead",{children:(0,a.jsx)("tr",{className:"bg-slate-50 text-[11px] uppercase tracking-[0.2em] text-slate-500",children:e.header.map((t,s)=>{let l=e.teams.some(e=>e.form&&e.form.length>0);return t.toLowerCase().includes("phong độ")&&!l?null:(0,a.jsx)("th",{colSpan:s===e.header.length-1&&l?5:1,className:`p-4 font-semibold ${1===s?"w-1/3 text-left":"text-center"}`,children:t},s)})})}),(0,a.jsx)("tbody",{className:"text-sm",children:e.teams.map((t,s)=>(o(Number(t.data[0]||s+1),e.teams.length),(0,a.jsxs)("tr",{className:"group border-b border-slate-100 bg-white transition-colors hover:bg-slate-50 cursor-pointer",children:[t.data.map((s,l)=>0===l?(0,a.jsx)(x,{value:s,totalTeams:e.teams.length},l):1===l?(0,a.jsx)("td",{className:"p-4",children:(0,a.jsxs)("div",{className:"flex items-center gap-3 rounded-2xl border border-slate-100 bg-slate-50 px-4 py-2.5 transition-colors group-hover:border-[#4681E8]/30 group-hover:bg-[#4681E8]/5",children:[t.team_logo?(0,a.jsx)("img",{src:t.team_logo,alt:s,className:"h-8 w-8 rounded-full bg-white object-contain p-0.5 filter drop-shadow-[0_2px_4px_rgba(0,0,0,0.1)]",loading:"lazy"}):(0,a.jsx)("div",{className:"flex h-8 w-8 items-center justify-center rounded-full border border-slate-200 bg-white text-[10px] font-bold text-slate-400",children:"?"}),(0,a.jsx)("span",{className:"font-bold text-slate-800 transition-colors group-hover:text-[#4681E8]",children:s})]})},l):(0,a.jsx)("td",{className:"p-4 text-center font-mono text-slate-600",children:s},l)),t.form&&t.form.length>0&&(0,a.jsxs)(a.Fragment,{children:[t.form.map((e,t)=>(0,a.jsx)("td",{className:"p-2 text-center",children:e.match_time?(0,a.jsx)(c,{detail:e}):(0,a.jsx)(d,{result:e.result})},`form-${t}`)),t.form.length<5&&Array.from({length:5-t.form.length}).map((e,t)=>(0,a.jsx)("td",{className:"p-2"},`pad-${t}`))]})]},s)))})]})})]}),!t&&!f&&j&&(0,a.jsx)(m,{rankings:e.rankings}),!t&&!f&&!j&&e.header&&e.teams&&(0,a.jsx)("div",{className:"text-center py-20 text-slate-600",children:"Dữ liệu đang được cập nhật..."}),!t&&(f||j)&&(0,a.jsxs)("div",{className:"mt-6 flex flex-wrap items-center gap-5 px-5 py-4 bg-slate-50 rounded-2xl border border-slate-200",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,a.jsx)("span",{className:"w-2.5 h-2.5 rounded-full bg-emerald-500"}),(0,a.jsx)("span",{className:"text-[11px] text-slate-600 font-bold uppercase tracking-wider",children:"Đội trưởng bảng"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,a.jsx)("span",{className:"w-2.5 h-2.5 rounded-full bg-sky-4
96100"}),(0,a.jsx)("span",{className:"text-[11px] text-slate-600 font-bold uppercase tracking-wider",children:"Champions League"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,a.jsx)("span",{className:"w-2.5 h-2.5 rounded-full bg-amber-500"}),(0,a.jsx)("span",{className:"text-[11px] text-slate-600 font-bold uppercase tracking-wider",children:"Europa League"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,a.jsx)("span",{className:"w-2.5 h-2.5 rounded-full bg-[#f97316]"}),(0,a.jsx)("span",{className:"text-[11px] text-slate-600 font-bold uppercase tracking-wider",children:"Europa Conference"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,a.jsx)("span",{className:"w-2.5 h-2.5 rounded-full bg-[#E11D48]"}),(0,a.jsx)("span",{className:"text-[11px] text-slate-600 font-bold uppercase tracking-wider",children:"Xuống hạng"})]})]})]})}function m({rankings:e}){if(!e||0===e.length)return null;let t=e[0].data,s=e.slice(1);return(0,a.jsx)("div",{className:"overflow-hidden rounded-[22px] border border-[#cbd5e1] bg-[linear-gradient(180deg,#191a20,#111218)] shadow-[0_24px_80px_rgba(0,0,0,0.4)]",children:(0,a.jsx)("div",{className:"overflow-x-auto",children:(0,a.jsxs)("table",{className:"w-full text-left border-collapse",children:[(0,a.jsx)("thead",{children:(0,a.jsx)("tr",{className:"bg-white text-[11px] uppercase tracking-[0.18em] text-slate-600",children:t.map((e,l)=>{let r=l===t.length-1,n=s[0]&&s[0].data.length>t.length?s[0].data.length-t.length+1:1;return(0,a.jsx)("th",{colSpan:r?n:1,className:`p-4 font-semibold ${1===l?"w-1/3 text-left":"text-center"}`,children:e},l)})})}),(0,a.jsx)("tbody",{className:"text-sm",children:s.map((e,t)=>(0,a.jsx)("tr",{className:"group border-b border-[#cbd5e1] transition-colors hover:bg-white",children:e.data.map((t,l)=>0===l?(0,a.jsx)(x,{value:t,totalTeams:s.length},l):1===l?(0,a.jsx)("td",{className:"p-4",children:(0,a.jsxs)("div",{className:"flex items-center gap-3 rounded-2xl border border-white/6 bg-[linear-gradient(180deg,rgba(255,255,255,0.03),rgba(255,255,255,0.01))] px-3 py-2 transition-colors group-hover:border-emerald-600/22",children:[e.team_logo?(0,a.jsx)("img",{src:e.team_logo,alt:t,className:"h-8 w-8 rounded-full bg-white/5 object-contain ring-1 ring-white/8",loading:"lazy"}):(0,a.jsx)("div",{className:"flex h-8 w-8 items-center justify-center rounded-full border border-gray-700 bg-gray-800 text-xs font-bold text-gray-500",children:"?"}),(0,a.jsx)("span",{className:"font-bold text-slate-900 transition-colors group-hover:text-emerald-600",children:t})]})},l):["W","D","L"].includes(t)?(0,a.jsx)("td",{className:"p-2 text-center",children:(0,a.jsx)("span",{className:`inline-flex h-7 w-7 items-center justify-center rounded-[8px] text-[11px] font-black ${i(t)}`,children:t})},l):(0,a.jsx)("td",{className:"p-4 text-center font-mono text-slate-600",children:t},l))},t))})]})})})}},95899:(e,t,s)=>{"use strict";s.d(t,{LiveMatchesClient:()=>m});var a=s(68019),l=s(10707);function r({activeSport:e,onSportChange:t,activeStatus:s,onStatusChange:l,matchesCount:n}){return(0,a.jsxs)("div",{className:"mb-5 flex flex-col gap-3",children:[(0,a.jsx)("div",{className:"flex items-center gap-2 overflow-x-auto pb-1 scrollbar-hide",children:[{id:"1",label:"B\xd3NG Đ\xc1",icon:"⚽"},{id:"2",label:"B\xd3NG RỔ",icon:"\uD83C\uDFC0"},{id:"5",label:"TENNIS",icon:"\uD83C\uDFBE"},{id:"4",label:"CẦU L\xd4NG",icon:"\uD83C\uDFF8"},{id:"3",label:"B\xd3NG CHUYỀN",icon:"\uD83C\uDFD0"},{id:"6",label:"B\xd3NG B\xc0N",icon:"\uD83C\uDFD3"}].map(s=>{let l=e===s.id;return(0,a.jsxs)("button",{type:"button",onClick:()=>t(s.id),className:`flex items-center gap-2 px-4 py-2.5 rounded-xl font-bold text-[12px] whitespace-nowrap transition-all duration-200 border cursor-pointer ${l?"bg-[#4681E8]/10 text-[#4681E8] border-[#4681E8]/40 shadow-[0_0_15px_rgba(70,129,232,0.1)]":"bg-white text-slate-500 border-slate-200 hover:text-slate-700 hover:border-[#4681E8]/30"}`,children:[(0,a.jsx)("span",{className:"text-[14px]",children:s.icon}
961),(0,a.jsx)("span",{className:"tracking-wider uppercase",children:s.label})]},s.id)})}),(0,a.jsx)("div",{className:"flex items-center gap-1 overflow-x-auto pb-1 scrollbar-hide bg-white rounded-xl p-1.5 border border-slate-200",children:[{id:"all",label:"TẤT CẢ",keyCount:"all"},{id:"live",label:"TRỰC TIẾP",keyCount:"live"},{id:"hot",label:"HOT",keyCount:"hot"},{id:"today",label:"H\xd4M NAY",keyCount:"today"},{id:"tomorrow",label:"NG\xc0Y MAI",keyCount:"tomorrow"}].map(e=>{let t=s===e.id,r=n[e.keyCount]||0;return(0,a.jsxs)("button",{type:"button",onClick:()=>l(e.id),className:`relative px-4 py-2 font-bold text-[12px] whitespace-nowrap transition-all duration-200 uppercase tracking-wider flex items-center gap-2 rounded-lg cursor-pointer ${t?"bg-[#4681E8]/10 text-[#4681E8] shadow-inner":"text-slate-500 hover:text-slate-700 hover:bg-[#4681E8]/5"}`,children:["live"===e.id&&t&&(0,a.jsx)("span",{className:"w-1.5 h-1.5 rounded-full bg-[#4681E8] animate-pulse shadow-[0_0_6px_rgba(70,129,232,0.8)]"}),(0,a.jsx)("span",{children:e.label}),(0,a.jsx)("span",{className:`px-1.5 py-0.5 rounded text-[10px] font-black ${t?"bg-[#4681E8]/20 text-[#4681E8]":"text-slate-400"}`,children:r})]},e.id)})})]})}function n(){return"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='10' fill='%2364748B' fill-opacity='0.18'/%3E%3C/svg%3E"}function i({match:e,isLoading:t=!1}){if(t||!e)return(0,a.jsx)("div",{className:"animate-pulse bg-white h-[64px] w-full border-b border-slate-100"});let s=new Date(1e3*parseInt(e.time||0,10)).toLocaleTimeString("vi-VN",{hour:"2-digit",minute:"2-digit",timeZone:"Asia/Ho_Chi_Minh"}),l=function(e,t){if("1"===t||"2"===t)switch(e){case"1":default:return{text:"Sắp diễn",isLive:!1,showScore:!1};case"2":return{text:"H1",isLive:!0,showScore:!0};case"3":return{text:"HT",isLive:!0,showScore:!0};case"4":return{text:"H2",isLive:!0,showScore:!0};case"5":return{text:"Phụ",isLive:!0,showScore:!0};case"7":return{text:"Pen",isLive:!0,showScore:!0};case"8":case"9":return{text:"FT",isLive:!1,showScore:!0}}switch(e){case"0":case"1":return{text:"Sắp diễn",isLive:!1,showScore:!1};case"51":return{text:"S1",isLive:!0,showScore:!0};case"52":return{text:"S2",isLive:!0,showScore:!0};case"53":return{text:"S3",isLive:!0,showScore:!0};case"54":return{text:"S4",isLive:!0,showScore:!0};case"55":return{text:"S5",isLive:!0,showScore:!0};case"100":case"90":case"91":case"110":return{text:"FT",isLive:!1,showScore:!0};default:return{text:"LIVE",isLive:!0,showScore:!0}}}(String(e.status_id),String(e.sport_id)),r=e.time_text||e.source_card_meta?.time_text||"",o=l.isLive,c=e.home_score??"-",d=e.away_score??"-",x=e.home_logo||n(),h=e.away_logo||n();return(0,a.jsxs)("a",{href:`/match/${encodeURIComponent(e.post_name||e.id)}`,className:"flex items-center w-full group border-b border-slate-100 bg-white hover:bg-[#4681E8]/5 transition-colors min-h-[64px]",children:[(0,a.jsx)("div",{className:`w-[60px] flex flex-col items-center justify-center shrink-0 h-full border-r ${o?"border-[#4681E8]/30 bg-[#4681E8]/5":"border-slate-100"}`,children:o?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"text-[#4681E8] font-bold text-[11px] uppercase tracking-wider tabular-nums leading-none",children:r||l.text}),(0,a.jsx)("span",{className:"w-1.5 h-1.5 rounded-full bg-[#4681E8] animate-pulse mt-1"})]}):(0,a.jsx)("span",{className:"text-slate-500 font-medium text-[12px]",children:s})}),(0,a.jsxs)("div",{className:"flex-1 flex flex-col justify-center px-3 py-2 gap-1.5 min-w-0",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between w-full",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2.5 min-w-0 overflow-hidden",children:[(0,a.jsx)("img",{src:x,alt:e.home_name,className:"w-4 h-4 shrink-0 object-contain",onError:e=>e.currentTarget.src=n(),loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-[13px] font-semibold truncate text-slate-800",children:e.home_name})]}),l.showScore&&(0,a.jsx)("span",{className:`text-[15px] font-black tabular-nums shrink-0 ml-2 ${o?"text-[#4681E8]":"text-slate-700"}`,children:c})]}),(0,a.jsxs)("div",{className:"flex items-center justify-between w-full",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2.5 min-w-0 overflow-hidden",children:[(0,a.jsx)("img",{src:h,alt:e.away_name,className:"w-4 h-4 shrink-0 object-contain",onError:e=>e.currentTarget.src=n(),loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-[13px] font-semibold truncate text-slate-800",children:e.away_name})]}),l.showScore&&(0,a.jsx)("span",{className:`text-[15px] font-black tabular-nums shrink-0 ml-2 ${o?"text-[#4681E8]":"text-slate-700"}`,children:d})]})]}),(0,a.jsx)("div",{className:"w-[48px] h-full flex items-center justify-center shrink-0 text-slate-300 group-hover:text-[#4681E8] transition-colors border-l border-slate-100",children:(0,a.jsx)("svg",{className:"w-5 h-5 fill-current",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{d:"M8 5v14l11-7z"})})})]})}let o=new Set(["1","2","3","4","5","7"]),c=new Set(["8","9","15"]),d=new Set(["51","52","53","54","5
9615","56","57","58","59"]),x=new Set(["100","90","91","92","93","110"]);function h(e){let t=String(e.status_id);return 2>=parseInt(e.sport_id)?o.has(t):d.has(t)}function m({matches:e,matchIndex:t}){let[s,n]=(0,l.useState)("1"),[o,d]=(0,l.useState)("all"),[p,u]=(0,l.useState)(1);(0,l.useEffect)(()=>{u(1)},[s,o]);let{todayStart:g,tomorrowStart:b,dayAfterStart:f}=(0,l.useMemo)(()=>{let e,t,s,{vnTodayStartUTC:a,vnTomorrowStartUTC:l,vnDayAfterStartUTC:r}=(s=(t=Math.floor(Date.UTC((e=new Date(Date.now()+252e5)).getUTCFullYear(),e.getUTCMonth(),e.getUTCDate())/1e3)-25200)+86400,{vnTodayStartUTC:t,vnTomorrowStartUTC:s,vnDayAfterStartUTC:s+86400});return{todayStart:a,tomorrowStart:l,dayAfterStart:r}},[]),j=(0,l.useMemo)(()=>new Map(e.map(e=>[e?.match_key?String(e.match_key):e?.ls_id?String(e.ls_id):e?.id?`${String(e.sport_id||"0")}:${String(e.id)}`:e?.scheduleId?`${String(e.sport_id||"0")}:schedule:${String(e.scheduleId)}`:[String(e?.sport_id||"0"),String(e?.time||"0"),String(e?.home_name||""),String(e?.away_name||"")].join(":"),e])),[e]),w=t?.summary_by_sport?.[s],v=t?.bucket_keys_by_sport?.[s],N=t?.bucket_pages_by_sport?.[s],y=e.filter(e=>{let t;return String(e.sport_id)===s&&(t=String(e.status_id),2>=parseInt(e.sport_id)?!c.has(t):!x.has(t))}),_=y.filter(e=>{let t=parseInt(e.time);return t>=g&&t<b}),k=y.filter(e=>{let t=parseInt(e.time);return t>=b&&t<f}),E={all:y.length,live:y.filter(e=>h(e)).length,hot:y.filter(e=>"1"===String(e.hot)).length,today:_.length,tomorrow:k.length},C=(0,l.useMemo)(()=>{if(v){if("all"===o&&Array.isArray(N?.all)&&N.all.length>0)return N.all.slice(0,p).flat().map(e=>j.get(e)).filter(Boolean);let e=v[o];if(Array.isArray(e))return e.map(e=>j.get(e)).filter(Boolean)}return"all"===o?y:"live"===o?y.filter(e=>h(e)):"hot"===o?y.filter(e=>"1"===String(e.hot)):"today"===o?_:"tomorrow"===o?k:y},[o,y,j,N,v,_,k,p]),S="all"===o&&Array.isArray(N?.all)&&p<N.all.length,L=(0,l.useMemo)(()=>"all"!==o&&"live"!==o&&"hot"!==o?[]:C.filter(e=>"1"===String(e.hot)||h(e)).slice(0,4),[C,o]),$=(0,l.useMemo)(()=>{let e=new Map;
961return C.forEach(t=>{let s=t.source_card_meta?.league_label||t.match_data?.competition_vi||t.match_data?.competition_name||t.match_data?.competition_full||"Giải đấu kh\xe1c";e.has(s)||e.set(s,[]),e.get(s).push(t)}),Array.from(e.entries())},[C]);return(0,a.jsxs)("div",{className:"w-full min-h-[500px]",children:[(0,a.jsx)(r,{activeSport:s,onSportChange:n,activeStatus:o,onStatusChange:d,matchesCount:w||E}),0===C.length?(0,a.jsx)("div",{className:"py-20 text-center",children:(0,a.jsx)("div",{className:"text-slate-400 text-base font-medium",children:"Kh\xf4ng c\xf3 trận đấu n\xe0o."})}):(0,a.jsxs)("div",{className:"flex flex-col gap-6",children:[L.length>0&&"all"===o&&(0,a.jsxs)("div",{className:"mb-4",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 mb-3 px-1",children:[(0,a.jsx)("span",{className:"w-2 h-4 rounded-full bg-[#4681E8]"}),(0,a.jsx)("h2",{className:"text-slate-800 font-black text-sm uppercase tracking-wider",children:"Trận đấu t\xe2m điểm"})]}),(0,a.jsx)("div",{className:"grid grid-cols-1 xl:grid-cols-2 gap-2",children:L.map((e,t)=>(0,a.jsx)(i,{match:e},`featured-${e.ls_id||e.id}-${t}`))})]}),(0,a.jsx)("div",{className:"flex flex-col gap-5",children:$.map(([e,t])=>{let s=t[0]?.match_data?.competition_logo;return(0,a.jsxs)("div",{className:"rounded-xl overflow-hidden border border-slate-200 bg-white shadow-sm",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2.5 bg-[#0E1B33] px-4 py-2.5 border-b border-[#0E1B33]",children:[s&&(0,a.jsx)("img",{src:s,alt:"league",className:"w-4 h-4 object-contain brightness-200 opacity-80",loading:"lazy",decoding:"async"}),(0,a.jsx)("h3",{className:"text-white text-[12px] font-bold uppercase tracking-wider truncate",children:e})]}),(0,a.jsx)("div",{className:"flex flex-col",children:t.map((e,t)=>(0,a.jsx)(i,{match:e},e.ls_id||`${e.id}-${t}`))})]},e)})}),S&&(0,a.jsx)("div",{className:"flex justify-center mt-6",children:(0,a.jsx)("button",{type:"button",onClick:()=>u(e=>e+1),className:"inline-flex items-center justify-center rounded-xl border border-[#4681E8]/30 bg-white px-8 py-3 text-[12px] font-bold uppercase tracking-wider text-[#4681E8] transition-all duration-200 hover:bg-[#4681E8] hover:text-white hover:border-[#4681E8]",children:"Tải th\xeam"})})]})]})}},96007:(e,t,s)=>{"use strict";s.d(t,{v:()=>r});var a=s(68019),l=s(70508);function r({eyebrow:e,title:t,titleAddon:s,rightSlot:n,className:i}){return(0,a.jsx)("div",{className:(0,l.cn)("relative mb-5 overflow-hidden border-b border-slate-200",i),children:(0,a.jsxs)("div",{className:"flex items-center justify-between px-1 py-4 min-h-[56px]",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 min-w-0",children:[(0,a.jsx)("span",{className:"h-8 w-1 shrink-0 rounded-sm bg-gradient-to-b from-[#4681E8] to-[#55CAF1] shadow-[0_0_10px_rgba(70,129,232,0.5)]"}),(0,a.jsxs)("div",{className:"min-w-0",children:[e&&(0,a.jsx)("div",{className:"text-[10px] font-bold uppercase tracking-[0.2em] text-[#4681E8]/60 mb-0.5",children:e}),(0,a.jsxs)("div",{className:"flex items-center gap-2.5 flex-wrap",children:[(0,a.jsx)("h1",{className:"text-[18px] sm:text-[22px] font-black uppercase tracking-tight text-slate-800 leading-none",children:t}),s]})]})]}),n&&(0,a.jsx)("div",{className:"hidden sm:flex items-center gap-2 text-right shrink-0 ml-4",children:n})]})})}},96444:(e,t,s)=>{"use strict";s.d(t,{LiveMatchesClient:()=>m});var a=s(68019),l=s(10707);function r({activeSport:e,onSportChange:t,activeStatus:s,onStatusChange:l,matchesCount:n}){return(0,a.jsxs)("div",{className:"mb-5 flex flex-col gap-3",children:[(0,a.jsx)("div",{className:"flex items-center gap-2 overflow-x-auto pb-1 scrollbar-hide",children:[{id:"1",label:"B\xd3NG Đ\xc1",icon:"⚽"},{id:"2",label:"B\xd3NG RỔ",icon:"\uD83C\uDFC0"},{id:"5",label:"TENNIS",icon:"\uD83C\uDFBE"},{id:"4",label:"CẦU L\xd4NG",icon:"\uD83C\uDFF8"},{id:"3",label:"B\xd3NG CHUYỀN",icon:"\uD83C\uDFD0"},{id:"6",label:"B\xd3NG B\xc0N",icon:"\uD83C\uDFD3"}].map(s=>{let l=e===s.id;return(0,a.jsxs)("button",{type:"button",onClick:()=>t(s.id),className:`flex items-center gap-2 px-4 py-2.5 rounded-xl font-bold text-[12px] whitespace-nowrap transition-all duration-200 border cursor-pointer ${l?"bg-[#4681E8]/10 text-[#4681E8] border-[#4681E8]/40 shadow-[0_0_15px_rgba(70,129,232,0.1)]":"bg-white text-slate-500 border-slate-200 hover:text-slate-700 hover:border-[#4681E8]/30"}`,children:[(0,a.jsx)("span",{className:"text-[14px]",children:s.icon}
961),(0,a.jsx)("span",{className:"tracking-wider uppercase",children:s.label})]},s.id)})}),(0,a.jsx)("div",{className:"flex items-center gap-1 overflow-x-auto pb-1 scrollbar-hide bg-white rounded-xl p-1.5 border border-slate-200",children:[{id:"all",label:"TẤT CẢ",keyCount:"all"},{id:"live",label:"TRỰC TIẾP",keyCount:"live"},{id:"hot",label:"HOT",keyCount:"hot"},{id:"today",label:"H\xd4M NAY",keyCount:"today"},{id:"tomorrow",label:"NG\xc0Y MAI",keyCount:"tomorrow"}].map(e=>{let t=s===e.id,r=n[e.keyCount]||0;return(0,a.jsxs)("button",{type:"button",onClick:()=>l(e.id),className:`relative px-4 py-2 font-bold text-[12px] whitespace-nowrap transition-all duration-200 uppercase tracking-wider flex items-center gap-2 rounded-lg cursor-pointer ${t?"bg-[#4681E8]/10 text-[#4681E8] shadow-inner":"text-slate-500 hover:text-slate-700 hover:bg-[#4681E8]/5"}`,children:["live"===e.id&&t&&(0,a.jsx)("span",{className:"w-1.5 h-1.5 rounded-full bg-[#4681E8] animate-pulse shadow-[0_0_6px_rgba(70,129,232,0.8)]"}),(0,a.jsx)("span",{children:e.label}),(0,a.jsx)("span",{className:`px-1.5 py-0.5 rounded text-[10px] font-black ${t?"bg-[#4681E8]/20 text-[#4681E8]":"text-slate-400"}`,children:r})]},e.id)})})]})}function n(){return"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='10' fill='%2364748B' fill-opacity='0.18'/%3E%3C/svg%3E"}function i({match:e,isLoading:t=!1}){if(t||!e)return(0,a.jsx)("div",{className:"animate-pulse bg-white h-[64px] w-full border-b border-slate-100"});let s=new Date(1e3*parseInt(e.time||0,10)).toLocaleTimeString("vi-VN",{hour:"2-digit",minute:"2-digit",timeZone:"Asia/Ho_Chi_Minh"}),l=function(e,t){if("1"===t||"2"===t)switch(e){case"1":default:return{text:"Sắp diễn",isLive:!1,showScore:!1};case"2":return{text:"H1",isLive:!0,showScore:!0};case"3":return{text:"HT",isLive:!0,showScore:!0};case"4":return{text:"H2",isLive:!0,showScore:!0};case"5":return{text:"Phụ",isLive:!0,showScore:!0};case"7":return{text:"Pen",isLive:!0,showScore:!0};case"8":case"9":return{text:"FT",isLive:!1,showScore:!0}}switch(e){case"0":case"1":return{text:"Sắp diễn",isLive:!1,showScore:!1};case"51":return{text:"S1",isLive:!0,showScore:!0};case"52":return{text:"S2",isLive:!0,showScore:!0};case"53":return{text:"S3",isLive:!0,showScore:!0};case"54":return{text:"S4",isLive:!0,showScore:!0};case"55":return{text:"S5",isLive:!0,showScore:!0};case"100":case"90":case"91":case"110":return{text:"FT",isLive:!1,showScore:!0};default:return{text:"LIVE",isLive:!0,showScore:!0}}}(String(e.status_id),String(e.sport_id)),r=e.time_text||e.source_card_meta?.time_text||"",o=l.isLive,c=e.home_score??"-",d=e.away_score??"-",x=e.home_logo||n(),h=e.away_logo||n();return(0,a.jsxs)("a",{href:`/match/${encodeURIComponent(e.post_name||e.id)}`,className:"flex items-center w-full group border-b border-slate-100 bg-white hover:bg-[#4681E8]/5 transition-colors min-h-[64px]",children:[(0,a.jsx)("div",{className:`w-[60px] flex flex-col items-center justify-center shrink-0 h-full border-r ${o?"border-[#4681E8]/30 bg-[#4681E8]/5":"border-slate-100"}`,children:o?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"text-[#4681E8] font-bold text-[11px] uppercase tracking-wider tabular-nums leading-none",children:r||l.text}),(0,a.jsx)("span",{className:"w-1.5 h-1.5 rounded-full bg-[#4681E8] animate-pulse mt-1"})]}):(0,a.jsx)("span",{className:"text-slate-500 font-medium text-[12px]",children:s})}),(0,a.jsxs)("div",{className:"flex-1 flex flex-col justify-center px-3 py-2 gap-1.5 min-w-0",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between w-full",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2.5 min-w-0 overflow-hidden",children:[(0,a.jsx)("img",{src:x,alt:e.home_name,className:"w-4 h-4 shrink-0 object-contain",onError:e=>e.currentTarget.src=n(),loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-[13px] font-semibold truncate text-slate-800",children:e.home_name})]}),l.showScore&&(0,a.jsx)("span",{className:`text-[15px] font-black tabular-nums shrink-0 ml-2 ${o?"text-[#4681E8]":"text-slate-700"}`,children:c})]}),(0,a.jsxs)("div",{className:"flex items-center justify-between w-full",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2.5 min-w-0 overflow-hidden",children:[(0,a.jsx)("img",{src:h,alt:e.away_name,className:"w-4 h-4 shrink-0 object-contain",onError:e=>e.currentTarget.src=n(),loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-[13px] font-semibold truncate text-slate-800",children:e.away_name})]}),l.showScore&&(0,a.jsx)("span",{className:`text-[15px] font-black tabular-nums shrink-0 ml-2 ${o?"text-[#4681E8]":"text-slate-700"}`,children:d})]})]}),(0,a.jsx)("div",{className:"w-[48px] h-full flex items-center justify-center shrink-0 text-slate-300 group-hover:text-[#4681E8] transition-colors border-l border-slate-100",children:(0,a.jsx)("svg",{className:"w-5 h-5 fill-current",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{d:"M8 5v14l11-7z"})})})]})}let o=new Set(["1","2","3","4","5","7"]),c=new Set(["8","9","15"]),d=new Set(["51","52","53","54","5
9615","56","57","58","59"]),x=new Set(["100","90","91","92","93","110"]);function h(e){let t=String(e.status_id);return 2>=parseInt(e.sport_id)?o.has(t):d.has(t)}function m({matches:e,matchIndex:t}){let[s,n]=(0,l.useState)("1"),[o,d]=(0,l.useState)("all"),[p,u]=(0,l.useState)(1);(0,l.useEffect)(()=>{u(1)},[s,o]);let{todayStart:g,tomorrowStart:b,dayAfterStart:f}=(0,l.useMemo)(()=>{let e,t,s,{vnTodayStartUTC:a,vnTomorrowStartUTC:l,vnDayAfterStartUTC:r}=(s=(t=Math.floor(Date.UTC((e=new Date(Date.now()+252e5)).getUTCFullYear(),e.getUTCMonth(),e.getUTCDate())/1e3)-25200)+86400,{vnTodayStartUTC:t,vnTomorrowStartUTC:s,vnDayAfterStartUTC:s+86400});return{todayStart:a,tomorrowStart:l,dayAfterStart:r}},[]),j=(0,l.useMemo)(()=>new Map(e.map(e=>[e?.match_key?String(e.match_key):e?.ls_id?String(e.ls_id):e?.id?`${String(e.sport_id||"0")}:${String(e.id)}`:e?.scheduleId?`${String(e.sport_id||"0")}:schedule:${String(e.scheduleId)}`:[String(e?.sport_id||"0"),String(e?.time||"0"),String(e?.home_name||""),String(e?.away_name||"")].join(":"),e])),[e]),w=t?.summary_by_sport?.[s],v=t?.bucket_keys_by_sport?.[s],N=t?.bucket_pages_by_sport?.[s],y=e.filter(e=>{let t;return String(e.sport_id)===s&&(t=String(e.status_id),2>=parseInt(e.sport_id)?!c.has(t):!x.has(t))}),_=y.filter(e=>{let t=parseInt(e.time);return t>=g&&t<b}),k=y.filter(e=>{let t=parseInt(e.time);return t>=b&&t<f}),E={all:y.length,live:y.filter(e=>h(e)).length,hot:y.filter(e=>"1"===String(e.hot)).length,today:_.length,tomorrow:k.length},C=(0,l.useMemo)(()=>{if(v){if("all"===o&&Array.isArray(N?.all)&&N.all.length>0)return N.all.slice(0,p).flat().map(e=>j.get(e)).filter(Boolean);let e=v[o];if(Array.isArray(e))return e.map(e=>j.get(e)).filter(Boolean)}return"all"===o?y:"live"===o?y.filter(e=>h(e)):"hot"===o?y.filter(e=>"1"===String(e.hot)):"today"===o?_:"tomorrow"===o?k:y},[o,y,j,N,v,_,k,p]),S="all"===o&&Array.isArray(N?.all)&&p<N.all.length,L=(0,l.useMemo)(()=>"all"!==o&&"live"!==o&&"hot"!==o?[]:C.filter(e=>"1"===String(e.hot)||h(e)).slice(0,4),[C,o]),$=(0,l.useMemo)(()=>{let e=new Map;
961return C.forEach(t=>{let s=t.source_card_meta?.league_label||t.match_data?.competition_vi||t.match_data?.competition_name||t.match_data?.competition_full||"Giải đấu kh\xe1c";e.has(s)||e.set(s,[]),e.get(s).push(t)}),Array.from(e.entries())},[C]);return(0,a.jsxs)("div",{className:"w-full min-h-[500px]",children:[(0,a.jsx)(r,{activeSport:s,onSportChange:n,activeStatus:o,onStatusChange:d,matchesCount:w||E}),0===C.length?(0,a.jsx)("div",{className:"py-20 text-center",children:(0,a.jsx)("div",{className:"text-slate-400 text-base font-medium",children:"Kh\xf4ng c\xf3 trận đấu n\xe0o."})}):(0,a.jsxs)("div",{className:"flex flex-col gap-6",children:[L.length>0&&"all"===o&&(0,a.jsxs)("div",{className:"mb-4",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 mb-3 px-1",children:[(0,a.jsx)("span",{className:"w-2 h-4 rounded-full bg-[#4681E8]"}),(0,a.jsx)("h2",{className:"text-slate-800 font-black text-sm uppercase tracking-wider",children:"Trận đấu t\xe2m điểm"})]}),(0,a.jsx)("div",{className:"grid grid-cols-1 xl:grid-cols-2 gap-2",children:L.map((e,t)=>(0,a.jsx)(i,{match:e},`featured-${e.ls_id||e.id}-${t}`))})]}),(0,a.jsx)("div",{className:"flex flex-col gap-5",children:$.map(([e,t])=>{let s=t[0]?.match_data?.competition_logo;return(0,a.jsxs)("div",{className:"rounded-xl overflow-hidden border border-slate-200 bg-white shadow-sm",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2.5 bg-[#0E1B33] px-4 py-2.5 border-b border-[#0E1B33]",children:[s&&(0,a.jsx)("img",{src:s,alt:"league",className:"w-4 h-4 object-contain brightness-200 opacity-80",loading:"lazy",decoding:"async"}),(0,a.jsx)("h3",{className:"text-white text-[12px] font-bold uppercase tracking-wider truncate",children:e})]}),(0,a.jsx)("div",{className:"flex flex-col",children:t.map((e,t)=>(0,a.jsx)(i,{match:e},e.ls_id||`${e.id}-${t}`))})]},e)})}),S&&(0,a.jsx)("div",{className:"flex justify-center mt-6",children:(0,a.jsx)("button",{type:"button",onClick:()=>u(e=>e+1),className:"inline-flex items-center justify-center rounded-xl border border-[#4681E8]/30 bg-white px-8 py-3 text-[12px] font-bold uppercase tracking-wider text-[#4681E8] transition-all duration-200 hover:bg-[#4681E8] hover:text-white hover:border-[#4681E8]",children:"Tải th\xeam"})})]})]})}},97426:(e,t,s)=>{"use strict";function a(e){let t=e?.fixtures_v2||null,s=e?.fixtures||e?.schedules||[],a=t?.date_tabs?.length?t.date_tabs:function(e=new Date){let t=["Chủ Nhật","Thứ Hai","Thứ Ba","Thứ Tư","Thứ Năm","Thứ S\xe1u","Thứ Bảy"],s=[];for(let a=0;a<14;a+=1){let l=new Date(e);l.setDate(l.getDate()+a);let r=String(l.getDate()).padStart(2,"0"),n=String(l.getMonth()+1).padStart(2,"0"),i=`${l.getFullYear()}-${l.getMonth()+1}-${l.getDate()}`;s.push({label:0===a?"H\xf4m Nay":t[l.getDay()],date:`${r}.${n}`,dataValue:i,active:0===a})}return s}(),l=e?.selected_date||a.find(e=>e.active)?.dataValue||a[0]?.dataValue||null;if(t?.leagues?.length)return{dateTabs:a,selectedDate:l,leagues:t.leagues,totalMatches:t.leagues.reduce((e,t)=>e+t.matches.length,0)};let r=[],n=new Set;return s.forEach(e=>{let t=e.data;if(!(t.length<3))for(let s=0;s+2<t.length;s+=16){let a=t[s]||"",l=t[s+1]||"",i=t[s+2]||"",o=`${a}-${l}-${i}`;if(!n.has(o)&&l&&(n.add(o),r.push({time:a,home_team:l,away_team:i,home_logo:e.team_logos?.[2*Math.floor(s/16)]||"",away_logo:e.team_logos?.[2*Math.floor(s/16)+1]||"",score:t[s+3]||"-",ht_score:t[s+4]||"",handicap:t.length>s+9?[t[s+7]||"",t[s+8]||"",t[s+9]||""]:[],over_under:t.length>s+12?[t[s+10]||"",t[s+11]||"",t[s+12]||""]:[],one_x_two:t.length>s+15?[t[s+13]||"",t[s+14]||"",t[s+15]||""]:[]}),s+16>=t.length))break}}),{dateTabs:a,selectedDate:l,leagues:r.length>0?[{league_name:"Tất cả trận đấu",league_icon:"",match_count:r.length,matches:r}]:[],totalMatches:r.length}}function l(e){let t=e?.results_v2||null,s=e?.results||[];if(t?.date_groups?.length)return{availableLeagues:t.available_leagues||[],dateGroups:t.date_groups,totalMatches:t.date_groups.reduce((e,t)=>e+t.matches.length,0)};let a=[];return s.forEach(e=>{let t=e.data;if(t.length<6)return;let s=t[0],l=s.split(" - "),r=[],n=1,i=0;for(;n<t.length;){if(t[n]?.startsWith("L\xfac")){let s=t[n].replace("L\xfac","").trim();r.push({time:s,home_team:t[n+1]||"",away_team:t[n+4]||"",home_logo:e.team_logos?.[i]||"",away_logo:e.team_logos?.[i+1]||"",score:t[n+2]||"",ht_score:(t[n+3]||"").replace("H1:","").replace("HT:","").trim()}),i+=2,n+=5;continue}n+=1}r.length>0&&a.push({date_header:l[0]?.trim()||s,league_round:l.slice(1).join(" - ").trim(),matches:r})}),{availableLeagues:[],dateGroups:a,totalMatches:a.reduce((e,t)=>
961e+t.matches.length,0)}}function r(e,t){if(!t)return e;let s=t.toLowerCase();return e.filter(e=>e.league_round.toLowerCase().includes(s))}s.d(t,{kK:()=>r,o8:()=>l,p_:()=>a})},98117:(e,t,s)=>{"use strict";s.d(t,{Klivevip03ResultsPage:()=>o});var a=s(68019),l=s(10707),r=s(78637),n=s(43539),i=s(59472);function o({initialData:e,selectedLeague:t}){let s=(0,r.useRouter)(),c=(0,r.usePathname)(),d=(0,r.useSearchParams)(),[x,h]=(0,l.useTransition)(),[m,p]=(0,l.useState)(!1),[u,g]=(0,l.useState)(""),{availableLeagues:b,dateGroups:f}=(0,l.useMemo)(()=>(0,i.o8)(e),[e]),j=(0,l.useMemo)(()=>Array.from(new Set(f.map(e=>e.date_header))),[f]),w=d.get("date")||"",v=e=>{let t=new URLSearchParams(d.toString());e&&e!==w?t.set("date",e):t.delete("date"),h(()=>{let e=t.toString();s.push(e?`${c}?${e}`:c,{scroll:!1})})},N=(0,l.useMemo)(()=>{let e=f;return w&&(e=e.filter(e=>e.date_header===w)),(0,i.kK)(e,t)},[f,w,t]),y=(0,l.useMemo)(()=>{if(!u)return b;let e=u.toLowerCase();return b.filter(t=>t.name.toLowerCase().includes(e))},[b,u]),_=N.reduce((e,t)=>e+t.matches.length,0);if(0===f.length)return(0,a.jsxs)("div",{className:"max-w-[1440px] mx-auto px-4 py-8",children:[(0,a.jsx)(n.O,{eyebrow:"Kết quả",title:"KẾT QUẢ B\xd3NG Đ\xc1"}),(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center py-16 gap-4",children:[(0,a.jsx)("div",{className:"w-12 h-12 rounded-full border-2 border-[#E11D48]/30 border-t-[#E11D48] animate-spin"}),(0,a.jsx)("span",{className:"text-slate-500 text-sm font-medium tracking-wide",children:"Đang tải kết quả..."})]})]});let k=e=>{let t=new URLSearchParams(d.toString());e?t.set("league",e):t.delete("league"),p(!1),g(""),h(()=>{let e=t.toString();s.push(e?`${c}?${e}`:c,{scroll:!1})})};return(0,a.jsxs)("div",{className:"max-w-[1440px] mx-auto px-4 py-8",children:[(0,a.jsx)(n.O,{eyebrow:"Kết quả",title:"KẾT QUẢ B\xd3NG Đ\xc1",rightSlot:(0,a.jsx)("div",{className:"text-[12px] text-slate-600",children:(0,a.jsx)("span",{className:"text-slate-900/80 font-bold",children:t||"Tất cả giải đấu"})})}),(0,a.jsxs)("div",{className:"flex flex-col md:flex-row gap-4 mb-4 items-start md:items-center justify-between",children:[j.length>0&&(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,a.jsx)("button",{type:"button",onClick:()=>v(""),className:`px-4 py-2 rounded-xl text-sm font-bold transition-all duration-300 ${!w?"bg-gradient-to-r from-[#4681E8] to-[#2563eb] text-white shadow-[0_4px_15px_rgba(70,129,232,0.4)] border border-[#4681E8]/50":"bg-white text-[#64748B] border border-slate-200 hover:bg-slate-50 hover:text-slate-800"}`,children:"Tất cả ng\xe0y"}),j.slice(0,5).map(e=>(0,a.jsx)("button",{type:"button",onClick:()=>v(e),className:`px-4 py-2 rounded-xl text-sm font-bold transition-all duration-300 ${w===e?"bg-gradient-to-r from-[#4681E8] to-[#2563eb] text-white shadow-[0_4px_15px_rgba(70,129,232,0.4)] border border-[#4681E8]/50":"bg-white text-[#64748B] border border-slate-200 hover:bg-slate-50 hover:text-slate-800"}`,children:e},e))]}),(0,a.jsxs)("div",{className:"relative w-full md:w-[320px]",children:[(0,a.jsxs)("button",{onClick:()=>p(!m),className:"w-full flex items-center gap-3 bg-white hover:bg-slate-50 px-4 py-2.5 rounded-xl border border-slate-200 shadow-inner transition-all text-sm",children:[(0,a.jsx)("svg",{className:"w-5 h-5 text-[#4681E8]",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 4a1 1 0 011-1h16a1 1 0 011 1v2.586a1 1 0 01-.293.707l-6.414 6.414a1 1 0 00-.293.707V17l-4 4v-6.586a1 1 0 00-.293-.707L3.293 7.293A1 1 0 013 6.586V4z"})}),(0,a.jsx)("span",{className:"text-slate-700 font-bold flex-1 text-left truncate",children:t||"Chọn giải đấu..."}),(0,a.jsx)("svg",{className:`w-4 h-4 text-slate-400 transition-transform ${m?"rotate-180":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),m&&(0,a.jsxs)("div",{className:"absolute top-full left-0 right-0 mt-2 bg-white border border-slate-200 rounded-2xl shadow-xl z-50 max-h-[300px] overflow-hidden flex flex-col",children:[(0,a.jsx)("div",{className:"p-2 border-b border-slate-100",children:(0,a.jsx)("input",{type:"text",placeholder:"T\xecm giải đấu...",value:u,onChange:e=>g(e.target.value),className:"w-full bg-slate-50 border border-transparent roun
961ded-xl px-4 py-2.5 text-sm text-slate-800 placeholder-slate-400 outline-none focus:border-[#4681E8]/50 transition-colors"})}),(0,a.jsxs)("div",{className:"overflow-y-auto flex-1 pb-2",children:[(0,a.jsx)("button",{type:"button",onClick:()=>k(),className:`block w-full text-left px-4 py-3 text-sm transition-colors ${!t?"bg-[#4681E8]/10 text-[#4681E8] border-l-4 border-[#4681E8]":"text-slate-600 hover:bg-slate-50 hover:text-slate-800"}`,children:"Tất cả giải đấu"}),y.map((e,s)=>(0,a.jsxs)("button",{type:"button",onClick:()=>k(e.name),className:`flex items-center gap-3 px-4 py-3 text-sm transition-colors cursor-pointer ${t===e.name?"bg-[#4681E8]/10 text-[#4681E8] border-l-4 border-[#4681E8]":"text-slate-600 hover:bg-slate-50 hover:text-slate-800"}`,children:[e.icon?(0,a.jsx)("img",{src:e.icon,alt:e.name||"League",className:"w-5 h-5 object-contain shrink-0",loading:"lazy",decoding:"async"}):(0,a.jsx)("div",{className:"w-5 h-5 rounded-md bg-slate-200 shrink-0"}),(0,a.jsx)("span",{className:"truncate",children:e.name})]},s))]})]})]})]}),x&&(0,a.jsxs)("div",{className:"mb-4 inline-flex items-center gap-2 rounded-full border border-slate-200 bg-white px-4 py-2 text-xs text-slate-500 shadow-sm",children:[(0,a.jsx)("span",{className:"h-2 w-2 rounded-full bg-[#E11D48] animate-pulse shadow-[0_0_8px_rgba(225,29,72,0.8)]"}),(0,a.jsx)("span",{className:"font-bold tracking-wide",children:"Đang tải kết quả từ server..."})]}),(0,a.jsx)("div",{className:"space-y-4",children:0===N.length?(0,a.jsx)("div",{className:"text-center py-16 text-[#64748B] font-medium tracking-wide",children:"Kh\xf4ng c\xf3 kết quả n\xe0o"}):N.map((e,t)=>(0,a.jsxs)("div",{className:"overflow-hidden rounded-2xl border border-slate-200 bg-white shadow-[0_8px_30px_rgba(0,0,0,0.06)]",children:[(0,a.jsx)("div",{className:"bg-slate-50 px-5 py-3 border-b border-slate-100 flex items-center justify-between",children:(0,a.jsxs)("span",{className:"text-[12px] text-slate-500 font-bold uppercase tracking-widest",children:[e.league_round?e.league_round:"V\xf2ng đấu",(0,a.jsx)("span",{className:"text-[#E11D48] ml-2 font-mono text-[11px] bg-[#E11D48]/10 px-2 py-0.5 rounded-full border border-[#E11D48]/20",children:e.date_header})]})}),e.matches.map((e,t)=>{var s;return(0,a.jsx)("div",{className:"bg-transparent hover:bg-slate-50 border-b border-slate-100 last:border-0 transition-colors group cursor-default",children:(0,a.jsxs)("div",{className:"flex items-center py-4 px-5 gap-4",children:[(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center min-w-[56px] shrink-0 border-r border-slate-100 pr-4",children:[(0,a.jsx)("span",{className:"text-[9px] text-slate-400 uppercase tracking-widest mb-1 font-bold",children:"L\xfac"}),(0,a.jsx)("span",{className:"text-[13px] text-slate-700 font-mono font-black",children:e.time})]}),(0,a.jsxs)("div",{className:"flex-1 flex items-center justify-end gap-3 min-w-0",children:[(0,a.jsx)("span",{className:"text-[14px] text-slate-800 font-bold truncate text-right group-hover:text-slate-900 transition-colors",children:e.home_team}),e.home_logo?(0,a.jsx)("div",{className:"w-8 h-8 rounded-full bg-slate-100 border border-slate-200 p-1 flex items-center justify-center shadow-sm",children:(0,a.jsx)("img",{src:e.home_logo,alt:e.home_team||"Home team",className:"w-full h-full object-contain",loading:"lazy"})}):(0,a.jsx)("div",{className:"w-8 h-8 rounded-full bg-slate-100 shrink-0 border border-slate-200 flex items-center justify-center text-[10px] font-bold text-slate-400",children:"?"})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center min-w-[90px] shrink-0 bg-slate-50 rounded-xl py-2 px-2 border border-slate-200 shadow-inner group-hover:border-[#4681E8]/40 transition-colors",children:[(0,a.jsx)("span",{className:`text-[22px] leading-none font-black tracking-widest drop-shadow-[0_2px_4px_rgba(0,0,0,0.8)] ${!(s=e.score)||"-"===s?"text-slate-400":"text-slate-800"}`,children:e.score}),e.ht_score&&(0,a.jsxs)("span",{className:"text-[10px] text-slate-500 font-mono mt-1 font-bold",children:["HT: ",e.ht_score]})]}),(0,a.jsxs)("div",{className:"flex-1 flex items-center gap-3 min-w-0",children:[e.away_logo?(0,a.jsx)("div",{className:"w-8 h-8 rounded-full bg-slate-100 border border-slate-200 p-1 flex items-center justify-center shadow-sm",children:(0,a.jsx)("img",{src:e.away_logo,alt:e.away_team||"Away team",className:"w-full h-full object-contain",loading:"lazy"})}):(0,a.jsx)("div",{className:"w-8 h-8 rounded-full bg-slate-100 shrink-0 border border-slate-200 flex items-center justify-center text-[10px] font-bold text-slate-400",children:"?"}),(0,a.jsx)("span",{className:"text-[14px] text-slate-800 font-bold truncate text-left group-hover:text-slate-900 transition-colors",children:e.away_team})]})]})},t)})]},t))}),(0,a.jsxs)("div",{className:"mt-6 text-center text-xs text-[#64748B] font-bold uppercase tracking-widest drop-shadow-sm",children:["Hiển thị ",_," kết quả trận đấu"]})]})}},98138:(e,t,s)=>{"use strict";s.d(t,{Klivevip19SchedulePage:()=>d});var a=s(68019),l=s(10707),r=s(78637),n=s(75627);function i({html:e}){return e?.trim()?(0,a.jsx)("section",{className:"relative mt-10 mb-6",children:(0,a.jsx)("div",{className:"seo-prose relative",children:(0,a.jsx)("div",{dangerouslySetInnerHTML:{__html:e},className:"text-slate-600 text-[14px] leading-[1.85] px-1 [&_strong]:text-slate-900 [&_a]:text-[#4681E8]"})})}):null}s(33622);let o=`
962<h2>Lịch thi đấu b\xf3ng đ\xe1 - Cập nhật lịch b\xf3ng đ\xe1 h\xf4m nay nhanh v\xe0 ch\xednh x\xe1c</h2>
963
964<p>Để <strong>xem lịch thi đấu b\xf3ng đ\xe1</strong> nhanh, ch\xednh x\xe1c v\xe0 đầy đủ nhất, Klive ch\xednh l\xe0 nơi bạn n\xean chọn. Ch\xfang t\xf4i cập nhật lịch thi đấu cho to\xe0n bộ c\xe1c giải đấu trong nước v\xe0 quốc tế, gi\xfap bạn kh\xf4ng bỏ lỡ bất kỳ trận cầu hấp dẫn n\xe0o.</p>
965
966<img src="/images/seo/schedule-football.png" alt="Lịch thi đấu b\xf3ng đ\xe1 h\xf4m nay tại Klive" loading="lazy" />
967
968<div class="toc-box">
969  <h3>Nội dung ch\xednh</h3>
970  <ol>
971    <li>Lịch thi đấu b\xf3ng đ\xe1 trực tuyến h\xe0ng đầu</li>
972    <li>Lịch b\xf3ng đ\xe1 nhanh v\xe0 ch\xednh x\xe1c</li>
973    <li>Cập nhật lịch Ngoại Hạng Anh v\xe0 Champions League</li>
974    <li>C\xe1ch xem lịch thi đấu hiệu quả nhất</li>
975  </ol>
976</div>
977
978<h2>Lịch thi đấu b\xf3ng đ\xe1 trực tuyến h\xe0ng đầu</h2>
979<p>Trong thời đại số, kh\xf4ng ai c\xf2n xem lịch b\xf3ng đ\xe1 tr\xean TV hay b\xe1o giấy nữa. Tất cả đ\xe3 chuyển sang theo d\xf5i online, v\xe0 Klive ch\xednh l\xe0 nền tảng cập nhật lịch b\xf3ng đ\xe1 được đ\xe1nh gi\xe1 cao nhất.</p>
980
981<p>Khi truy cập Klive, bạn c\xf3 thể xem lịch thi đấu của bất kỳ giải đấu b\xf3ng đ\xe1 n\xe0o tr\xean thế giới một c\xe1ch ho\xe0n to\xe0n miễn ph\xed. Th\xf4ng tin lịch đấu được cập nhật sớm nhất v\xe0 chi tiết đến từng ph\xfat.</p>
982
983<h2>Lịch b\xf3ng đ\xe1 nhanh v\xe0 ch\xednh x\xe1c</h2>
984<p>Klive kh\xf4ng chỉ cung cấp lịch thi đấu c\xe1c giải đấu h\xe0ng đầu m\xe0 c\xf2n cập nhật lịch ph\xe1t s\xf3ng tr\xean c\xe1c k\xeanh truyền h\xecnh Việt Nam như K+, FPT Play, VTV Sports. Gi\xfap bạn biết trận n\xe0o được chiếu trực tiếp tr\xean TV v\xe0 sắp xếp thời gian hợp l\xfd.</p>
985
986<h2>Cập nhật lịch Ngoại Hạng Anh v\xe0 Champions League</h2>
987<p>Ngoại Hạng Anh v\xe0 Champions League l\xe0 hai giải đấu được quan t\xe2m nhất. Tại Klive, bạn lu\xf4n nắm được lịch đấu đầy đủ từ v\xf2ng bảng đến chung kết, k\xe8m theo th\xf4ng tin về đội h\xecnh dá»± kiến, phong độ v\xe0 lịch sá»­ đối đầu để chuẩn bị tốt nhất cho má
987»—i trận cầu.</p>
988
989<p>Kết hợp lịch thi đấu với trang trực tiếp b\xf3ng đ\xe1, bạn sẽ c\xf3 trải nghiệm theo d\xf5i b\xf3ng đ\xe1 ho\xe0n hảo nhất - biết trước, xem ngay, kh\xf4ng bỏ lỡ!</p>
990`;var c=s(23719);function d({initialData:e}){let t=(0,r.usePathname)(),[s,h]=(0,l.useState)(!1),[m,p]=(0,l.useState)(new Set),[u,g]=(0,l.useState)(""),[b,f]=(0,l.useState)(!1),[j,w]=(0,l.useState)(0),v=(0,l.useMemo)(()=>(0,c.p_)(e),[e]),N=v.dateTabs,y=(0,l.useMemo)(()=>{if(!v.selectedDate)return 0;let e=N.findIndex(e=>(e.dataValue||e.date)===v.selectedDate);return e>=0?e:0},[N,v.selectedDate]),[_,k]=(0,l.useState)(y),[E,C]=(0,l.useState)(v.leagues||[]),S=(0,l.useMemo)(()=>{if(!u)return E;let e=u.toLowerCase();return E.filter(t=>t.league_name.toLowerCase().includes(e)||t.matches.some(t=>t.home_team.toLowerCase().includes(e)||t.away_team.toLowerCase().includes(e)))},[E,u]),L=Math.max(0,N.length-7),$=N.slice(j,j+7),F=j>0,T=j<L,A=S.reduce((e,t)=>e+t.matches.length,0);return((0,l.useEffect)(()=>{if(!v.selectedDate||!N.length)return;let e=N.findIndex(e=>(e.dataValue||e.date)===v.selectedDate);e>=0&&k(e)},[N,v.selectedDate]),(0,l.useEffect)(()=>{_<j?w(Math.max(0,_)):_>=j+7&&w(Math.min(L,_-7+1))},[_,L,j]),e)?(0,a.jsxs)("div",{className:"max-w-[1440px] mx-auto px-4 py-8",children:[(0,a.jsx)(n.R,{eyebrow:"Lịch thi đấu",title:"LỊCH THI ĐẤU",rightSlot:(0,a.jsxs)("div",{className:"text-[12px] text-slate-500 font-bold uppercase tracking-wider",children:[(0,a.jsx)("span",{className:"text-[#E11D48] font-black",children:S.reduce((e,t)=>e+t.matches.length,0)})," trận đấu"]})}),(0,a.jsxs)("div",{className:"flex items-center mb-4 rounded-xl overflow-hidden border border-slate-200 bg-white shadow-sm",children:[(0,a.jsx)("button",{type:"button",disabled:!F,onClick:()=>w(e=>Math.max(0,e-1)),className:`flex items-center justify-center w-8 h-[52px] bg-slate-100 border-r border-slate-200 text-slate-600 hover:text-slate-800 hover:bg-slate-200 transition-all shrink-0 ${!F?"opacity-30":"cursor-pointer"}`,children:(0,a.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2.5,d:"M15 19l-7-7 7-7"})})}),(0,a.jsx)("div",{className:"flex flex-1",children:$.map((e,s)=>{let l=j+s;return(0,a.jsxs)("button",{type:"button",onClick:()=>(e=>{let s=N[e];if(!s||e===_)return;let a=s.dataValue||s.date;a&&(k(e),p(new Set),h(!0),window.history.replaceState(null,"",`${t}?date=${encodeURIComponent(a)}`),fetch(`/api/socolive/fixtures?date=${encodeURIComponent(a)}`,{cache:"no-store"}).then(e=>e.ok?e.json():null).then(e=>{e&&C((0,c.p_)(e).leagues||[])}).finally(()=>h(!1)))})(l),className:`flex-1 flex flex-col items-center justify-center h-[52px] border-b-[3px] transition-all duration-300 ${_===l?"border-[#4681E8] text-[#4681E8] bg-[#4681E8]/5":"border-transparent text-[#64748B] hover:text-[#94A3B8] hover:bg-slate-100"}`,children:[(0,a.jsx)("span",{className:`text-[11px] font-bold uppercase tracking-widest ${_===l?"text-[#4681E8]":""}`,children:e.label}),(0,a.jsx)("span",{className:`text-[12px] font-mono mt-0.5 ${_===l?"text-slate-800 font-black":""}`,children:e.date})]},`tab-${l}`)})}),(0,a.jsx)("button",{type:"button",disabled:!T,onClick:()=>w(e=>Math.min(L,e+1)),className:`flex items-center justify-center w-8 h-[52px] bg-slate-100 border-l border-slate-200 text-slate-600 hover:text-slate-800 hover:bg-slate-200 transition-all shrink-0 ${!T?"opacity-30":"cursor-pointer"}`,children:(0,a.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2.5,d:"M9 5l7 7-7 7"})})})]}),(0,a.jsxs)("div",{className:"relative mb-4",children:[(0,a.jsxs)("button",{onClick:()=>f(!b),className:"flex items-center gap-3 bg-white hover:bg-slate-50 px-4 py-2.5 rounded-xl border border-slate-200 shadow-sm transition-all text-sm group",children:[(0,a.jsx)("svg",{className:"w-5 h-5 text-[#E11D48] transition-colors group-hover:text-[#F43F5E]",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 6h16M4 12h16M4 18h16"})}),(0,a.jsx)("span",{className:"text-slate-700 font-bold text-[13px] uppercase tracking-wide",children:"Danh s\xe1ch giải đấu"}),(0,a.jsx)("svg",{className:`w-4 h-4 text-slate-500 transition-transform duration-300 ${b?"rotate-180":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),b&&(0,a.jsxs)("div",{className:"absolute top-full left-0 mt-2 w-[360px] bg-white border border-slate-200 rounded-2xl shadow-[0_24px_80px_rgba(0,0,0,0.12)] z-50 max-h-[320px] overflow-hidden flex flex-col",children:[(0,a.jsx)("div",{className:"p-2 border-b border-slate-100",children:(0,a.jsx)("input",{type:"text",placeholder:"T\xecm giải đấu...",value:u,onChange:e=>g(e.target.value),className:"w-full bg-slate-50 border border-transparent roun
990ded-xl px-4 py-2.5 text-sm text-slate-800 placeholder-slate-400 outline-none focus:border-[#4681E8]/50 transition-colors"})}),(0,a.jsx)("div",{className:"overflow-y-auto flex-1 py-2",children:E.map((e,t)=>(0,a.jsxs)("button",{type:"button",onClick:()=>{g(e.league_name),f(!1)},className:"w-full flex items-center gap-3 px-4 py-2.5 hover:bg-slate-50 text-left text-[13px] transition-colors",children:[e.league_icon?(0,a.jsx)("img",{src:e.league_icon,alt:e.league_name||"League",className:"w-5 h-5 object-contain shrink-0",loading:"lazy",decoding:"async"}):(0,a.jsx)("div",{className:"w-5 h-5 rounded-md bg-slate-200 shrink-0"}),(0,a.jsx)("span",{className:"text-slate-600 truncate flex-1 font-medium",children:e.league_name}),(0,a.jsx)("span",{className:"text-[11px] text-[#E11D48] font-bold shrink-0 px-2 py-0.5 bg-[#E11D48]/10 rounded-md border border-[#E11D48]/20",children:e.matches.length})]},t))})]})]}),(0,a.jsxs)("div",{className:"grid grid-cols-[1fr_60px_55px_100px_100px_90px] bg-slate-50 border border-slate-200 rounded-t-xl px-4 py-3 text-[11px] text-slate-500 font-black uppercase tracking-widest shadow-inner",children:[(0,a.jsx)("span",{children:"Trận đấu"}),(0,a.jsx)("span",{className:"text-center",children:"Tỷ số"}),(0,a.jsx)("span",{className:"text-center",children:"Hiệp 1"}),(0,a.jsx)("span",{className:"text-center",children:"Cược chấp"}),(0,a.jsx)("span",{className:"text-center",children:"T\xe0i/Xỉu"}),(0,a.jsx)("span",{className:"text-center",children:"1 X 2"})]}),(0,a.jsxs)("div",{className:"border border-slate-200 border-t-0 rounded-b-xl overflow-hidden relative shadow-[0_8px_30px_rgba(0,0,0,0.06)]",children:[s&&(0,a.jsx)("div",{className:"absolute inset-0 z-10 bg-white/80 backdrop-blur-[2px]",children:(0,a.jsx)("div",{className:"space-y-0",children:[...Array(6)].map((e,t)=>(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 px-4 py-3.5 bg-slate-100 border-b border-slate-200",children:[(0,a.jsx)("div",{className:"w-4 h-4 rounded bg-slate-300 animate-pulse"}),(0,a.jsx)("div",{className:"h-3.5 rounded bg-slate-200 animate-pulse",style:{width:`${120+30*t}px`}})]}),[void 0,void 0].map((e,t)=>(0,a.jsxs)("div",{className:"grid grid-cols-[1fr_60px_55px_100px_100px_90px] items-center px-4 py-3 border-b border-slate-100",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)("div",{className:"w-10 h-3.5 rounded bg-slate-200 animate-pulse"}),(0,a.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,a.jsx)("div",{className:"h-3 w-24 rounded bg-slate-100 animate-pulse"}),(0,a.jsx)("div",{className:"h-3 w-20 rounded bg-slate-100 animate-pulse"})]})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5",children:[(0,a.jsx)("div",{className:"h-3 w-5 rounded bg-slate-100 animate-pulse"}),(0,a.jsx)("div",{className:"h-3 w-5 rounded bg-slate-100 animate-pulse"})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5",children:[(0,a.jsx)("div",{className:"h-3 w-5 rounded bg-slate-100 animate-pulse"}),(0,a.jsx)("div",{className:"h-3 w-5 rounded bg-slate-100 animate-pulse"})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5",children:[(0,a.jsx)("div",{className:"h-3 w-14 rounded bg-slate-100 animate-pulse"}),(0,a.jsx)("div",{className:"h-3 w-10 rounded bg-slate-100 animate-pulse"})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5",children:[(0,a.jsx)("div",{className:"h-3 w-14 rounded bg-slate-100 animate-pulse"}),(0,a.jsx)("div",{className:"h-3 w-10 rounded bg-slate-100 animate-pulse"})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center gap-1.5",children:[(0,a.jsx)("div",{className:"h-3 w-10 rounded bg-slate-100 animate-pulse"}),(0,a.jsx)("div",{className:"h-3 w-10 rounded bg-slate-100 animate-pulse"}),(0,a.jsx)("div",{className:"h-3 w-10 rounded bg-slate-100 animate-pulse"})]})]},t))]},t))})}),0!==S.length||s?S.map((e,t)=>(0,a.jsxs)("div",{id:`league-${t}`,children:[(0,a.jsxs)("button",{onClick:()=>{p(e=>{let s=new Set(e);return s.has(t)?s.delete(t):s.add(t),s})},className:"w-full flex items-center gap-3 px-4 py-3 bg-slate-50 hover:bg-slate-100 border-b border-slate-100 transition-colors text-left group",children:[(0,a.jsx)("svg",{className:`w-4 h-4 text-[#E11D48] transition-transform duration-300 shrink-0 ${m.has(t)?"-rotate-90":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2.5,d:"M19 9l-7 7-7-7"})}),e.league_icon&&(0,a.jsx)("div",{className:"w-6 h-6 rounded-full bg-slate-100 p-0.5 border border-slate-200 flex items-center justify-center shadow-sm",children:(0,a.jsx)("img",{src:e.league_icon,alt:e.league_name||"League",className:"w-4 h-4 object-contain shrink-0",loading:"lazy",decoding:"async"})}),(0,a.jsx)("span",{className:"text-[13px] font-bold text-slate-700 flex-1 truncate uppercase tracking-widest",children:e.league_name}),(0,a.jsxs)("span",{className:"text-[11px] text-[#E11D48] font-bold shrink-0 ml-1 px-2 py-0.5 bg-[#E11D48]/10 rounded border border-[#
990E11D48]/20 group-hover:bg-[#E11D48]/20 transition-colors",children:["BXH ",(0,a.jsx)("svg",{className:"inline w-3 h-3 ml-0.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 6h16M4 10h16M4 14h16M4 18h16"})})]})]}),!m.has(t)&&e.matches.map((e,t)=>(0,a.jsxs)("div",{className:"grid grid-cols-[1fr_60px_55px_100px_100px_90px] items-center px-4 py-3 bg-transparent hover:bg-slate-50 border-b border-slate-100 last:border-0 transition-colors group cursor-default",children:[(0,a.jsxs)("div",{className:"flex items-center gap-4 min-w-0",children:[(0,a.jsx)("span",{className:"text-[#E11D48] font-mono text-[13px] font-black min-w-[42px] shrink-0 drop-shadow-[0_0_4px_rgba(225,29,72,0.4)]",children:e.time}),(0,a.jsxs)("div",{className:"flex flex-col gap-1 min-w-0 flex-1",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[e.home_logo&&(0,a.jsx)("img",{src:e.home_logo,alt:e.home_team||"Home team",className:"w-4 h-4 object-contain shrink-0 filter drop-shadow-[0_2px_2px_rgba(0,0,0,0.8)]",loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-[13px] text-slate-700 font-medium truncate group-hover:text-slate-900 transition-colors",children:e.home_team})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[e.away_logo&&(0,a.jsx)("img",{src:e.away_logo,alt:e.away_team||"Away team",className:"w-4 h-4 object-contain shrink-0",loading:"lazy",decoding:"async"}),(0,a.jsx)("span",{className:"text-[13px] text-slate-700 font-medium truncate group-hover:text-slate-900 transition-colors",children:e.away_team})]})]})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center",children:[(0,a.jsx)("span",{className:"text-[12px] text-[var(--accent-cyan)] font-mono font-bold",children:"-"!==e.score?e.score:"-"}),(0,a.jsx)("span",{className:"text-[12px] text-[#64748B]",children:"-"})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center",children:[(0,a.jsx)("span",{className:"text-[12px] text-[#64748B]",children:"-"}),(0,a.jsx)("span",{className:"text-[12px] text-[#64748B]",children:"-"})]}),(0,a.jsx)(x,{values:e.handicap,hasLine:!0}),(0,a.jsx)(x,{values:e.over_under,hasLine:!0}),(0,a.jsx)("div",{className:"flex flex-col items-center gap-0",children:e.one_x_two?.length>0?e.one_x_two.map((e,t)=>(0,a.jsx)("span",{className:"text-[11px] text-slate-500 leading-[18px]",children:e||"-"},t)):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"text-[11px] text-[#64748B] leading-[18px]",children:"-"}),(0,a.jsx)("span",{className:"text-[11px] text-[#64748B] leading-[18px]",children:"-"}),(0,a.jsx)("span",{className:"text-[11px] text-[#64748B] leading-[18px]",children:"-"})]})})]},t))]},t)):(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center py-20 gap-3 bg-slate-50",children:[(0,a.jsx)("svg",{className:"w-12 h-12 text-slate-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",strokeWidth:1.5,children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6.75 3v2.25M17.25 3v2.25M3 18.75V7.5a2.25 2.25 0 012.25-2.25h13.5A2.25 2.25 0 0121 7.5v11.25m-18 0A2.25 2.25 0 005.25 21h13.5A2.25 2.25 0 0021 18.75m-18 0v-7.5A2.25 2.25 0 015.25 9h13.5A2.25 2.25 0 0121 11.25v7.5"})}),(0,a.jsx)("span",{className:"text-slate-500 font-medium tracking-wide",children:"Kh\xf4ng c\xf3 trận đấu n\xe0o cho ng\xe0y n\xe0y"}),(0,a.jsx)("span",{className:"text-slate-400 text-[12px]",children:"H\xe3y thử chọn một ng\xe0y kh\xe1c"})]})]}),(0,a.jsxs)("div",{className:"mt-6 text-center text-[11px] text-[#64748B] uppercase tracking-widest font-bold drop-shadow-sm",children:["Tổng cộng ",A," trận đấu trong ",S.length," giải"]}),(0,a.jsx)(i,{html:o})]}):(0,a.jsxs)("div",{className:"max-w-[1440px] mx-auto px-4 py-8",children:[(0,a.jsx)(n.R,{eyebrow:"Lịch thi đấu",title:"LỊCH THI ĐẤU"}),(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center py-16 gap-4",children:[(0,a.jsx)("div",{className:"w-12 h-12 rounded-full border-2 border-[#E11D48]/30 border-t-[#E11D48] animate-spin"}),(0,a.jsx)("span",{className:"text-slate-500 text-sm font-medium tracking-wide",children:"Đang tải lịch thi đấu..."})]})]})}function x({values:e,hasLine:t}){return e&&0!==e.length?t&&e.length>=3?(0,a.jsxs)("div",{className:"flex flex-col items-center gap-0",children:[(0,a.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,a.jsx)("span",{className:"text-[11px] text-[#E11D48] leading-[18px] font-bold",children:e[0]}),(0,a.jsx)("span",{className:"text-[11px] text-slate-500 leading-[18px]",children:e[1]})]}),(0,a.jsx)("span",{className:"text-[11px] text-slate-500 leading-[18px]",children:e[2]})]}):(0,a.jsx)("div",{className:"flex flex-col items-center gap-0",children:e.map((e,t)=>(0,a.jsx)("span",{className:"text-[11px] text-slate-500 leading-[18px]",children:e||"-"},t))}):(0,a.jsxs)("div",{className:"flex flex-col items-center",children:[(0,a.jsx)("span",{className:"text-[11px] text-[#64748B] leading-[18px]",children:"-"}),(0,a.jsx)("span",{className:"text-[11px] text-[#64748B] leading-[18px]",children:"-"})]})}},98769:()=>{},98983:(e,t,s)=>{"use strict";s.d(t,{Klivevip12ResultsPage:()=>o});var a=s(68019),l=s(10707),r=s(78637),n=s(36627),i=s(18210);function o({initialData:e,selectedLeague:t}){let s=(0,r.useRouter)(),c=(0,r.usePathname)(),d=(0,r.useSearchParams)(),[x,h]=(0,l.useTransition)(),[m,p]=(0,l.useState)(!1),[u,g]=(0,l.useState)(""),{availableLeagues:b,dateGroups:f}=(0,l.useMemo)(()=>(0,i.o8)(e),[e]),j=(0,l.useMemo)(()=>Array.from(new Set(f.map(e=>e.date_header))),[f]),w=d.get("date")||"",v=e=>{let t=new URLSearchParams(d.toString());e&&e!==w?t.set("date",e):t.delete("date"),h(()=>{let e=t.toString();s.push(e?`${c}?${e}`:c,{scroll:!1})})},N=(0,l.useMemo)(()=>{let e=f;return w&&(e=e.filter(e=>e.date_header===w)),(0,i.kK)(e,t)},[f,w,t]),y=(0,l.useMemo)(()=>
990{if(!u)return b;let e=u.toLowerCase();return b.filter(t=>t.name.toLowerCase().includes(e))},[b,u]),_=N.reduce((e,t)=>e+t.matches.length,0);if(0===f.length)return(0,a.jsxs)("div",{className:"max-w-[1440px] mx-auto px-4 py-8",children:[(0,a.jsx)(n.M,{eyebrow:"Kết quả",title:"KẾT QUẢ B\xd3NG Đ\xc1"}),(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center py-16 gap-4",children:[(0,a.jsx)("div",{className:"w-12 h-12 rounded-full border-2 border-[#E11D48]/30 border-t-[#E11D48] animate-spin"}),(0,a.jsx)("span",{className:"text-slate-500 text-sm font-medium tracking-wide",children:"Đang tải kết quả..."})]})]});let k=e=>{let t=new URLSearchParams(d.toString());e?t.set("league",e):t.delete("league"),p(!1),g(""),h(()=>{let e=t.toString();s.push(e?`${c}?${e}`:c,{scroll:!1})})};return(0,a.jsxs)("div",{className:"max-w-[1440px] mx-auto px-4 py-8",children:[(0,a.jsx)(n.M,{eyebrow:"Kết quả",title:"KẾT QUẢ B\xd3NG Đ\xc1",rightSlot:(0,a.jsx)("div",{className:"text-[12px] text-slate-600",children:(0,a.jsx)("span",{className:"text-slate-900/80 font-bold",children:t||"Tất cả giải đấu"})})}),(0,a.jsxs)("div",{className:"flex flex-col md:flex-row gap-4 mb-4 items-start md:items-center justify-between",children:[j.length>0&&(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,a.jsx)("button",{type:"button",onClick:()=>v(""),className:`px-4 py-2 rounded-xl text-sm font-bold transition-all duration-300 ${!w?"bg-gradient-to-r from-[#4681E8] to-[#2563eb] text-white shadow-[0_4px_15px_rgba(70,129,232,0.4)] border border-[#4681E8]/50":"bg-white text-[#64748B] border border-slate-200 hover:bg-slate-50 hover:text-slate-800"}`,children:"Tất cả ng\xe0y"}),j.slice(0,5).map(e=>(0,a.jsx)("button",{type:"button",onClick:()=>v(e),className:`px-4 py-2 rounded-xl text-sm font-bold transition-all duration-300 ${w===e?"bg-gradient-to-r from-[#4681E8] to-[#2563eb] text-white shadow-[0_4px_15px_rgba(70,129,232,0.4)] border border-[#4681E8]/50":"bg-white text-[#64748B] border border-slate-200 hover:bg-slate-50 hover:text-slate-800"}`,children:e},e))]}),(0,a.jsxs)("div",{className:"relative w-full md:w-[320px]",children:[(0,a.jsxs)("button",{onClick:()=>p(!m),className:"w-full flex items-center gap-3 bg-white hover:bg-slate-50 px-4 py-2.5 rounded-xl border border-slate-200 shadow-inner transition-all text-sm",children:[(0,a.jsx)("svg",{className:"w-5 h-5 text-[#4681E8]",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 4a1 1 0 011-1h16a1 1 0 011 1v2.586a1 1 0 01-.293.707l-6.414 6.414a1 1 0 00-.293.707V17l-4 4v-6.586a1 1 0 00-.293-.707L3.293 7.293A1 1 0 013 6.586V4z"})}),(0,a.jsx)("span",{className:"text-slate-700 font-bold flex-1 text-left truncate",children:t||"Chọn giải đấu..."}),(0,a.jsx)("svg",{className:`w-4 h-4 text-slate-400 transition-transform ${m?"rotate-180":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),m&&(0,a.jsxs)("div",{className:"absolute top-full left-0 right-0 mt-2 bg-white border border-slate-200 rounded-2xl shadow-xl z-50 max-h-[300px] overflow-hidden flex flex-col",children:[(0,a.jsx)("div",{className:"p-2 border-b border-slate-100",children:(0,a.jsx)("input",{type:"text",placeholder:"T\xecm giải đấu...",value:u,onChange:e=>g(e.target.value),className:"w-full bg-slate-50 border border-transparent rounded-xl px-4 py-2.5 text-sm text-slate-800 placeholder-slate-400 outline-none focus:border-[#4681E8]/50 transition-colors"})}),(0,a.jsxs)("div",{className:"overflow-y-auto flex-1 pb-2",children:[(0,a.jsx)("button",{type:"button",onClick:()=>k(),className:`block w-full text-left px-4 py-3 text-sm transition-colors ${!t?"bg-[#4681E8]/10 text-[#4681E8] border-l-4 border-[#4681E8]":"text-slate-600 hover:bg-slate-50 hover:text-slate-800"}`,children:"Tất cả giải đấu"}),y.map((e,s)=>(0,a.jsxs)("button",{type:"button",onClick:()=>k(e.name),className:`flex items-center gap-3 px-4 py-3 text-sm transition-colors cursor-pointer ${t===e.name?"bg-[#4681E8]/10 text-[#4681E8] border-l-4 border-[#4681E8]":"text-slate-600 hover:bg-slate-50 hover:text-slate-800"}`,children:[e.icon?(0,a.jsx)("img",{src:e.icon,alt:e.name||"League",className:"w-5 h-5 object-contain shrink-0",loading:"lazy",decoding:"async"}):(0,a.jsx)("div",{className:"w-5 h-5 rounded-md bg-slate-200 shrink-0"}),(0,a.jsx)("span",{className:"truncate",children:e.name})]},s))]})]})]})]}),x&&(0,a.jsxs)("div",{className:"mb-4 inline-flex items-center gap-2 rounded-full border border-slate-200 bg-white px-4 py-2 text-xs text-slate-500 shadow-sm",children:[(0,a.jsx)("span",{className:"h-2 w-2 rounded-full bg-[#E11D48] animate-pulse shadow-[0_0_8px_rgba(225,29,72,0.8)]"}),(0,a.jsx)("span",{className:"font-bold tracking-wide",children:"Đang tải kết quả từ server..."})]}),(0,a.jsx)("div",{className:"space-y-4",children:0===N.length?(0,a.jsx)("div",{className:"text-center py-16 text-[#64748B] font-medium tracking-wide",children:"Kh\xf4ng c\xf3 kết quả n\xe0o"}):N.map((e,t)=>(0,a.jsxs)("div",{className:"overflow-hidden rounded-2xl border border-slate-200 bg-white shadow-[0_8px_30px_rgba(0,0,0,0.06)]",children:[(0,a.jsx)("div",{className:"bg-slate-50 px-5 py-3 border-b border-slate-100 flex items-center justify-between",children:(0,a.jsxs)("span",{className:"text-[12px] text-slate-500 font-bold uppercase tracking-widest",children:[e.league_round?e.league_round:"V\xf2ng đấu",(0,a.jsx)("span",{className:"text-[#E11D48] ml-2 font-mono text-[11px] bg-[#E11D48]/10 px-2 py-0.5 rounded-full border border-[#
990E11D48]/20",children:e.date_header})]})}),e.matches.map((e,t)=>{var s;return(0,a.jsx)("div",{className:"bg-transparent hover:bg-slate-50 border-b border-slate-100 last:border-0 transition-colors group cursor-default",children:(0,a.jsxs)("div",{className:"flex items-center py-4 px-5 gap-4",children:[(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center min-w-[56px] shrink-0 border-r border-slate-100 pr-4",children:[(0,a.jsx)("span",{className:"text-[9px] text-slate-400 uppercase tracking-widest mb-1 font-bold",children:"L\xfac"}),(0,a.jsx)("span",{className:"text-[13px] text-slate-700 font-mono font-black",children:e.time})]}),(0,a.jsxs)("div",{className:"flex-1 flex items-center justify-end gap-3 min-w-0",children:[(0,a.jsx)("span",{className:"text-[14px] text-slate-800 font-bold truncate text-right group-hover:text-slate-900 transition-colors",children:e.home_team}),e.home_logo?(0,a.jsx)("div",{className:"w-8 h-8 rounded-full bg-slate-100 border border-slate-200 p-1 flex items-center justify-center shadow-sm",children:(0,a.jsx)("img",{src:e.home_logo,alt:e.home_team||"Home team",className:"w-full h-full object-contain",loading:"lazy"})}):(0,a.jsx)("div",{className:"w-8 h-8 rounded-full bg-slate-100 shrink-0 border border-slate-200 flex items-center justify-center text-[10px] font-bold text-slate-400",children:"?"})]}),(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center min-w-[90px] shrink-0 bg-slate-50 rounded-xl py-2 px-2 border border-slate-200 shadow-inner group-hover:border-[#4681E8]/40 transition-colors",children:[(0,a.jsx)("span",{className:`text-[22px] leading-none font-black tracking-widest drop-shadow-[0_2px_4px_rgba(0,0,0,0.8)] ${!(s=e.score)||"-"===s?"text-slate-400":"text-slate-800"}`,children:e.score}),e.ht_score&&(0,a.jsxs)("span",{className:"text-[10px] text-slate-500 font-mono mt-1 font-bold",children:["HT: ",e.ht_score]})]}),(0,a.jsxs)("div",{className:"flex-1 flex items-center gap-3 min-w-0",children:[e.away_logo?(0,a.jsx)("div",{className:"w-8 h-8 rounded-full bg-slate-100 border border-slate-200 p-1 flex items-center justify-center shadow-sm",children:(0,a.jsx)("img",{src:e.away_logo,alt:e.away_team||"Away team",className:"w-full h-full object-contain",loading:"lazy"})}):(0,a.jsx)("div",{className:"w-8 h-8 rounded-full bg-slate-100 shrink-0 border border-slate-200 flex items-center justify-center text-[10px] font-bold text-slate-400",children:"?"}),(0,a.jsx)("span",{className:"text-[14px] text-slate-800 font-bold truncate text-left group-hover:text-slate-900 transition-colors",children:e.away_team})]})]})},t)})]},t))}),(0,a.jsxs)("div",{className:"mt-6 text-center text-xs text-[#64748B] font-bold uppercase tracking-widest drop-shadow-sm",children:["Hiển thị ",_," kết quả trận đấu"]})]})}},99271:(e,t,s)=>{"use strict";s.d(t,{Q:()=>r});var a=s(68019),l=s(70508);function r({eyebrow:e,title:t,titleAddon:s,rightSlot:n,className:i}){return(0,a.jsx)("div",{className:(0,l.cn)("relative mb-5 overflow-hidden border-b border-slate-200",i),children:(0,a.jsxs)("div",{className:"flex items-center justify-between px-1 py-4 min-h-[56px]",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 min-w-0",children:[(0,a.jsx)("span",{className:"h-8 w-1 shrink-0 rounded-sm bg-gradient-to-b from-[#4681E8] to-[#55CAF1] shadow-[0_0_10px_rgba(70,129,232,0.5)]"}),(0,a.jsxs)("div",{className:"min-w-0",children:[e&&(0,a.jsx)("div",{className:"text-[10px] font-bold uppercase tracking-[0.2em] text-[#4681E8]/60 mb-0.5",children:e}),(0,a.jsxs)("div",{className:"flex items-center gap-2.5 flex-wrap",children:[(0,a.jsx)("h1",{className:"text-[18px] sm:text-[22px] font-black uppercase tracking-tight text-slate-800 leading-none",children:t}),s]})]})]}),n&&(0,a.jsx)("div",{className:"hidden sm:flex items-center gap-2 text-right shrink-0 ml-4",children:n})]})})}}}]);

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.