import{r as e}from"./rolldown-runtime-S-ySWqyJ.js";import{bi as t,lr as n,mi as r,ri as i}from"./vendor-DU4C2Mru.js";import{G as a,M as o,N as s,P as c,Q as l,Z as u,vt as d}from"./index-B7s3VjPV.js";import{i as f,n as p,r as m,t as h}from"./tooltip-DjAjb2WT.js";import{n as g,r as _,t as v}from"./time-DscUFrit.js";import{n as y}from"./useValorantAssets-vXg2-QMA.js";import{t as b}from"./PrefetchLink-D9TYVdFs.js";import{t as x}from"./MapImage-wRd7latf.js";var S=i();function C({mapResults:e,team1Id:t,team2Id:n,variant:r,size:i=`sm`,isLive:a,hideSpoilers:o}){if(o)return null;let s=e.filter(e=>e.team1Score>0||e.team2Score>0);return s.length===0?null:r===`pips`?(0,S.jsx)(w,{maps:s,team1Id:t,team2Id:n,isLive:a,size:i}):(0,S.jsx)(T,{maps:s,team1Id:t,team2Id:n,isLive:a,size:i})}function w({maps:e,team1Id:t,team2Id:n,isLive:r,size:i}){let a=i===`sm`?`h-2.5 w-2.5`:`h-3 w-3`;return(0,S.jsx)(m,{children:(0,S.jsx)(`div`,{className:d(`flex items-center justify-center`,i===`sm`?`mt-1.5 gap-1.5`:`mt-2.5 gap-1.5`),children:e.map((e,i)=>{let o=c(e),s=o&&e.winnerId===t,l=o&&e.winnerId===n,u=!o&&r;return(0,S.jsxs)(h,{children:[(0,S.jsx)(f,{render:(0,S.jsx)(`span`,{}),className:d(`rounded-full block cursor-default`,a,s&&`bg-[var(--glk-win)]`,l&&`bg-[var(--glk-loss)]`,u&&`border-2 border-[var(--glk-brand)] animate-pulse`)}),(0,S.jsxs)(p,{side:`top`,className:`flex items-center gap-1.5 text-2xs`,children:[(0,S.jsx)(`span`,{className:`font-semibold`,children:e.mapName}),(0,S.jsx)(`span`,{className:d(`font-bold tabular-nums`,s?`text-[var(--glk-win)]`:u?``:`text-zinc-400`),children:e.team1Score}),(0,S.jsx)(`span`,{className:`text-zinc-500`,children:`–`}),(0,S.jsx)(`span`,{className:d(`font-bold tabular-nums`,l?`text-[var(--glk-win)]`:u?``:`text-zinc-400`),children:e.team2Score})]})]},i)})})})}function T({maps:e,team1Id:t,team2Id:n,isLive:r,size:i}){let a=y(),o=i===`lg`;return(0,S.jsx)(`div`,{className:d(`flex flex-wrap items-center justify-center gap-1`,o?`mt-3`:`mt-2.5`),children:e.map((e,i)=>{let s=c(e),l=s&&e.winnerId===t,u=s&&e.winnerId===n,f=!s&&r,p=a(e.mapName);return(0,S.jsxs)(`div`,{className:d(`relative flex flex-col items-center justify-end overflow-hidden border`,o?`h-[52px] w-[100px] rounded-lg`:`h-10 w-[72px] rounded-md`,f?`border-[var(--glk-brand)]/40 shadow-[0_0_10px_rgba(255,70,85,0.15)]`:`border-zinc-700/50`),children:[p?(0,S.jsx)(`img`,{src:p.splash,alt:``,loading:`lazy`,className:d(`pointer-events-none absolute inset-0 h-full w-full object-cover`,f?`opacity-50 saturate-[0.7]`:`opacity-40 saturate-50`)}):(0,S.jsx)(`div`,{className:`absolute inset-0 bg-zinc-900`}),(0,S.jsx)(`div`,{className:`absolute inset-0 bg-gradient-to-t from-black/90 via-black/50 to-black/30`}),(0,S.jsxs)(`div`,{className:d(`relative z-10 flex flex-col items-center`,o?`gap-0.5 pb-1.5`:`gap-0 pb-1`),style:{textShadow:`0 1px 3px rgba(0,0,0,0.6)`},children:[(0,S.jsx)(`span`,{className:d(`glk-eyebrow text-white/70`,o?`text-[8px] tracking-[1px]`:`text-[7px] tracking-[0.8px]`),children:e.mapName}),(0,S.jsxs)(`div`,{className:d(`flex items-center font-extrabold tabular-nums leading-none`,o?`gap-1 text-base`:`gap-0.5 text-sm`),children:[(0,S.jsx)(`span`,{className:d(l||f?`text-white`:`text-white/35`),children:e.team1Score}),(0,S.jsx)(`span`,{className:`text-white/25 text-[9px]`,children:`–`}),(0,S.jsx)(`span`,{className:d(u||f?`text-white`:`text-white/35`),children:e.team2Score})]})]})]},i)})})}var E=e(t(),1);function D({to:e,fallback:t,className:n}){let[r,i]=(0,E.useState)(()=>v(e)||t||_(e));return(0,E.useEffect)(()=>{if(!e)return;let n=!1,r=()=>{n||i(v(e)||t||_(e))};r();let a=!!v(e),o=setInterval(r,a?1e3:3e4);return()=>{n=!0,clearInterval(o)}},[e,t]),(0,S.jsx)(`span`,{className:n,title:e??void 0,children:r})}function O({format:e,className:t}){return e?(0,S.jsx)(`span`,{className:d(`inline-flex items-center rounded border border-zinc-200 px-1.5 py-0.5 text-2xs font-bold tracking-wider text-zinc-500`,`dark:border-white/10 dark:text-zinc-400`,t),children:e.toUpperCase()}):null}function k({match:e,gameSlug:t,className:i,hideSpoilers:f,showTierBadge:p,compact:m,variant:h=`default`}){let g=r(),v=e.stats?.bracketPlaceholder,y=e.team1??(v?.team1?{id:``,name:v.team1,abbreviation:null,slug:void 0,logoUrl:null,rating:null,ratingDelta:null}:null),w=e.team2??(v?.team2?{id:``,name:v.team2,abbreviation:null,slug:void 0,logoUrl:null,rating:null,ratingDelta:null}:null);if(!y||!w)return null;let T=!e.team1,E=!e.team2,k=!!e.playedAt,N=s(e),P=N?e.mapResults?.filter(t=>c(t)&&t.winnerId===e.team1?.id).length??0:(()=>{let t=e.team1Maps,n=e.stats?.team1Maps;if(t!=null&&e.team2Maps!=null&&e.winner){let r=e.winner.id===e.team1?.id;if(r&&t<e.team2Maps&&n!=null||!r&&t>e.team2Maps&&n!=null)return n}return t??n??null})(),F=N?e.mapResults?.filter(t=>c(t)&&t.winnerId===e.team2?.id).length??0:(()=>{let t=e.team2Maps,n=e.stats?.team2Maps;if(t!=null&&e.team1Maps!=null&&e.winner){let r=e.winner.id===e.team2?.id;if(r&&t<e.team1Maps&&n!=null||!r&&t>e.team1Maps&&n!=null)return n}return t??n??null})(),I=e.winner?.id===e.team1?.id,L=e.winner?.id===e.team2?.id,R=I||!L&&P!=null&&F!=null&&P>F,z=L||!I&&P!=null&&F!=null&&F>P,B=p?a(e.tournament?.tier):null,V=(()=>{let e=y.name,t=w.name;return N?`Live: ${e} vs ${t}`:k&&!f&&P!=null&&F!=null?`${e} ${P}–${F} ${t} (completed)`:k?`${e} vs ${t} (completed)`:`${e} vs ${t} (upcoming)`})();return h===`schedule`?(0,S.jsx)(M,{match:e,gameSlug:t,className:i,hideSpoilers:f,team1:y,team2:w,team1IsPlaceholder:T,team2IsPlaceholder:E,isCompleted:k,isLive:N,t1Score:P,t2Score:F,t1Won:R,t2Won:z,matchLabel:V}):(0,S.jsxs)(b,{to:`/${t}/matches/${e.id}`,"aria-label":V,className:d(`group block transition-colors hover:bg-zinc-50 active:bg-zinc-100 dark:hover:bg-white/[0.03] dark:active:bg-white/[0.05]`,`focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-[var(--glk-brand)]`,m?`px-3.5 py-2.5`:`px-3 py-3 hover:shadow-sm`,i),children:[(0,S.jsxs)(`div`,{className:d(`flex items-center justify-between gap-2`,m?`mb-1`:`mb-1.5`),children:[(0,S.jsxs)(`div`,{className:`flex items-center gap-1.5 text-2xs text-zinc-400 min-w-0`,children:[B&&(0,S.jsx)(`span`,{className:d(`flex-shrink-0 rounded px-1.5 py-0.5 text-[9px] font-bold leading-none`,u(B)),children:l(B)}),e.tournament&&(()=>{let n=e.tournament.slug;return(0,S.jsx)(`span`,{onClick:e=>{n&&(e.preventDefault(),e.stopPropagation(),g(`/${t}/tournaments/${n}`))},className:d(`font-medium text-zinc-500 dark:text-zinc-400 truncate`,n&&`cursor-pointer hover:text-zinc-900 dark:hover:text-zinc-100`),title:e.tournament.name,role:n?`link`:void 0,children:e.tournament.name})})(),e.stage&&(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(`span`,{className:`flex-shrink-0 text-zinc-400 dark:text-zinc-600`,children:`·`}),(0,S.jsx)(`span`,{className:`flex-shrink-0`,children:e.stage})]}),e.format&&(0,S.jsx)(O,{format:e.format,className:`flex-shrink-0`})]}),(0,S.jsxs)(`div`,{className:`flex flex-shrink-0 items-center gap-1.5`,children:[k&&e.isUpset&&!f&&(0,S.jsxs)(`span`,{className:`flex items-center gap-0.5 rounded bg-amber-500/15 px-1.5 py-0.5 text-[9px] font-bold uppercase tracking-wider text-amber-600 dark:bg-amber-400/15 dark:text-amber-400`,title:`Underdog won — winner had a meaningfully lower pre-match rating`,children:[(0,S.jsx)(n,{size:10,"aria-hidden":`true`}),`Upset`]}),N&&(0,S.jsxs)(`span`,{"aria-live":`polite`,className:`glk-pulse-halo flex items-center gap-1 rounded bg-[var(--glk-brand)]/10 px-1.5 py-0.5 text-2xs font-bold text-[var(--glk-brand)]`,children:[(0,S.jsx)(`span`,{className:`h-1.5 w-1.5 animate-pulse rounded-full bg-[var(--glk-brand)]`}),`LIVE`]}),!k&&!N&&e.scheduledAt?(0,S.jsx)(D,{to:e.scheduledAt,className:`text-2xs text-zinc-400 tabular-nums`}):(0,S.jsx)(`span`,{className:`text-2xs text-zinc-400`,title:e.playedAt??e.scheduledAt??``,children:N&&e.scheduledAt?`Started ${_(e.scheduledAt)}`:_(k?e.playedAt:e.scheduledAt)})]})]}),m?(0,S.jsxs)(`div`,{className:`grid grid-cols-[minmax(0,1fr)_auto_minmax(0,1fr)] items-center gap-3`,children:[(0,S.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[(0,S.jsx)(o,{name:y.name,slug:y.slug,abbreviation:y.abbreviation,logoUrl:y.logoUrl,size:`sm`,className:`flex-shrink-0`}),(0,S.jsxs)(`div`,{className:`min-w-0`,children:[(0,S.jsx)(`div`,{className:d(`truncate text-sm font-semibold leading-tight`,T&&`italic text-zinc-500 dark:text-zinc-400`,!T&&k&&!R&&`text-zinc-400 dark:text-zinc-500`,!T&&k&&R&&`text-zinc-900 dark:text-zinc-50`,!T&&!k&&`text-zinc-900 dark:text-zinc-100`),style:{fontFamily:`var(--font-display)`,letterSpacing:`-0.01em`},children:y.name}),y.rating!=null&&Math.round(y.rating)!==1500&&(0,S.jsxs)(`div`,{className:`glk-tabular flex items-center gap-1 text-2xs leading-tight text-zinc-500 dark:text-zinc-500`,children:[(0,S.jsxs)(`span`,{children:[`Rating `,(0,S.jsx)(`span`,{className:`font-mono font-semibold text-zinc-600 dark:text-zinc-400`,children:Math.round(y.rating)})]}),k&&!f&&y.ratingDelta!=null&&y.ratingDelta!==0&&(0,S.jsxs)(`span`,{className:d(`font-mono font-semibold`,y.ratingDelta>0?`text-[var(--glk-win)]`:`text-[var(--glk-loss)]`),children:[y.ratingDelta>0?`+`:``,y.ratingDelta]})]})]})]}),(0,S.jsx)(`div`,{className:`flex items-baseline gap-1.5 font-mono font-bold leading-none tracking-tight`,children:k&&P!=null&&F!=null?f?(0,S.jsx)(`span`,{className:`text-[18px] text-zinc-400 dark:text-zinc-500`,children:`· — ·`}):(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(`span`,{className:d(`text-[20px]`,R?`text-zinc-900 dark:text-zinc-50`:`text-zinc-400 dark:text-zinc-500`),children:P}),(0,S.jsx)(`span`,{className:`text-sm text-zinc-400 dark:text-zinc-600`,children:`–`}),(0,S.jsx)(`span`,{className:d(`text-[20px]`,z?`text-zinc-900 dark:text-zinc-50`:`text-zinc-400 dark:text-zinc-500`),children:F})]}):N&&P!=null&&F!=null?(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(`span`,{className:`glk-score-slide-in text-[20px] text-zinc-900 dark:text-zinc-50`,children:P},`t1-${P}`),(0,S.jsx)(`span`,{className:`text-sm text-zinc-400 dark:text-zinc-600`,children:`–`}),(0,S.jsx)(`span`,{className:`glk-score-slide-in text-[20px] text-zinc-900 dark:text-zinc-50`,children:F},`t2-${F}`)]}):(0,S.jsx)(`span`,{className:`glk-eyebrow`,children:`vs`})}),(0,S.jsxs)(`div`,{className:`flex min-w-0 items-center justify-end gap-2`,children:[(0,S.jsxs)(`div`,{className:`min-w-0 text-right`,children:[(0,S.jsx)(`div`,{className:d(`truncate text-sm font-semibold leading-tight`,E&&`italic text-zinc-500 dark:text-zinc-400`,!E&&k&&!z&&`text-zinc-400 dark:text-zinc-500`,!E&&k&&z&&`text-zinc-900 dark:text-zinc-50`,!E&&!k&&`text-zinc-900 dark:text-zinc-100`),style:{fontFamily:`var(--font-display)`,letterSpacing:`-0.01em`},children:w.name}),w.rating!=null&&Math.round(w.rating)!==1500&&(0,S.jsxs)(`div`,{className:`glk-tabular flex items-center justify-end gap-1 text-2xs leading-tight text-zinc-500 dark:text-zinc-500`,children:[(0,S.jsxs)(`span`,{children:[`Rating `,(0,S.jsx)(`span`,{className:`font-mono font-semibold text-zinc-600 dark:text-zinc-400`,children:Math.round(w.rating)})]}),k&&!f&&w.ratingDelta!=null&&w.ratingDelta!==0&&(0,S.jsxs)(`span`,{className:d(`font-mono font-semibold`,w.ratingDelta>0?`text-[var(--glk-win)]`:`text-[var(--glk-loss)]`),children:[w.ratingDelta>0?`+`:``,w.ratingDelta]})]})]}),(0,S.jsx)(o,{name:w.name,slug:w.slug,abbreviation:w.abbreviation,logoUrl:w.logoUrl,size:`sm`,className:`flex-shrink-0`})]})]}):(0,S.jsxs)(`div`,{className:`grid min-w-0 grid-cols-[minmax(0,1fr)_auto_minmax(0,1fr)] items-center gap-2 sm:gap-3`,children:[(0,S.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[(0,S.jsx)(o,{name:y.name,slug:y.slug,abbreviation:y.abbreviation,logoUrl:y.logoUrl,size:`sm`,className:`flex-shrink-0`}),(0,S.jsxs)(`div`,{className:`min-w-0`,children:[(0,S.jsx)(`span`,{className:d(`hidden truncate text-sm font-semibold leading-tight transition-colors md:inline`,T&&`italic text-zinc-500 dark:text-zinc-400`,!T&&k&&R&&`text-zinc-900 dark:text-zinc-100`,!T&&k&&!R&&`text-zinc-400 dark:text-zinc-500`,!T&&!k&&`text-zinc-900 dark:text-zinc-100`),children:y.name}),(0,S.jsx)(`span`,{className:d(`block truncate text-sm font-semibold leading-tight transition-colors md:hidden`,T&&`italic text-zinc-500 dark:text-zinc-400`,!T&&k&&R&&`text-zinc-900 dark:text-zinc-100`,!T&&k&&!R&&`text-zinc-400 dark:text-zinc-500`,!T&&!k&&`text-zinc-900 dark:text-zinc-100`),children:y.abbreviation??y.name}),(0,S.jsx)(A,{rating:y.rating,ratingDelta:y.ratingDelta,showDelta:k&&!f})]})]}),(0,S.jsxs)(`div`,{className:`flex flex-col items-center gap-0.5`,children:[(0,S.jsx)(j,{isCompleted:k,isLive:N,isForfeit:e.status===`forfeit`,t1Score:P,t2Score:F,t1Won:R,t2Won:z,hideSpoilers:f}),e.winProbabilityA!=null&&e.winProbabilityB!=null&&(!k||!f)&&(0,S.jsxs)(`span`,{className:`glk-tabular text-2xs tabular-nums text-zinc-400 dark:text-zinc-500`,children:[e.winProbabilityA,`% · `,e.winProbabilityB,`%`]})]}),(0,S.jsxs)(`div`,{className:`flex min-w-0 flex-row-reverse items-center gap-2`,children:[(0,S.jsx)(o,{name:w.name,slug:w.slug,abbreviation:w.abbreviation,logoUrl:w.logoUrl,size:`sm`,className:`flex-shrink-0`}),(0,S.jsxs)(`div`,{className:`min-w-0 text-right`,children:[(0,S.jsx)(`span`,{className:d(`hidden truncate text-sm font-semibold leading-tight transition-colors md:inline`,E&&`italic text-zinc-500 dark:text-zinc-400`,!E&&k&&z&&`text-zinc-900 dark:text-zinc-100`,!E&&k&&!z&&`text-zinc-400 dark:text-zinc-500`,!E&&!k&&`text-zinc-900 dark:text-zinc-100`),children:w.name}),(0,S.jsx)(`span`,{className:d(`block truncate text-sm font-semibold leading-tight transition-colors md:hidden`,E&&`italic text-zinc-500 dark:text-zinc-400`,!E&&k&&z&&`text-zinc-900 dark:text-zinc-100`,!E&&k&&!z&&`text-zinc-400 dark:text-zinc-500`,!E&&!k&&`text-zinc-900 dark:text-zinc-100`),children:w.abbreviation??w.name}),(0,S.jsx)(A,{rating:w.rating,ratingDelta:w.ratingDelta,showDelta:k&&!f,align:`right`})]})]})]}),(k||N)&&e.team1&&e.team2&&e.mapResults&&e.mapResults.length>0&&(m?(()=>{let t=e.mapResults.filter(e=>c(e)||e.team1Score>0||e.team2Score>0);return t.length===0?null:(0,S.jsx)(`div`,{className:`mt-2 flex justify-center gap-1.5`,children:t.slice(0,5).map((t,n)=>{let r=t.winnerId===e.team1.id,i=t.winnerId===e.team2.id,a=c(t),o=N&&!a&&(t.team1Score>0||t.team2Score>0);return(0,S.jsxs)(`div`,{className:d(`group/map relative flex w-[140px] items-center gap-1.5 overflow-hidden rounded-md border px-2 py-1`,o?`border-red-500/30 bg-red-500/5`:`border-zinc-200 bg-zinc-50 dark:border-white/[0.06] dark:bg-white/[0.02]`),children:[(0,S.jsxs)(`div`,{className:`pointer-events-none absolute inset-0`,"aria-hidden":`true`,children:[(0,S.jsx)(x,{name:t.mapName,variant:`strip`,index:n,total:e.mapResults.length,grayed:!o&&!a}),(0,S.jsx)(`div`,{className:d(`absolute inset-0 transition-colors duration-200`,o?`bg-red-500/10`:`bg-zinc-50/45 group-hover/map:bg-zinc-50/15 dark:bg-zinc-900/85 dark:group-hover/map:bg-zinc-900/20`)}),(0,S.jsx)(`div`,{className:`pointer-events-none absolute inset-0 bg-gradient-to-r from-white/70 via-white/30 to-transparent dark:hidden`,"aria-hidden":!0})]}),o&&(0,S.jsx)(`span`,{className:`glk-live-dot absolute right-1.5 top-1.5 z-10`,"aria-hidden":`true`,style:{width:4,height:4}}),(0,S.jsxs)(`div`,{className:`relative z-10 min-w-0 flex-1 leading-none`,children:[(0,S.jsxs)(`div`,{className:`glk-eyebrow`,style:{fontSize:9},children:[`Map `,n+1]}),(0,S.jsx)(`div`,{className:`mt-0.5 truncate text-xs font-semibold capitalize text-zinc-700 drop-shadow-[0_1px_1px_rgba(0,0,0,0.25)] dark:text-zinc-100`,children:t.mapName.toLowerCase()})]}),f&&a?(0,S.jsx)(`span`,{className:`glk-metric relative z-10 text-xs text-zinc-400 dark:text-zinc-500`,children:`·–·`}):(0,S.jsxs)(`div`,{className:`glk-metric glk-tabular relative z-10 flex items-center gap-0.5 rounded border border-white/10 bg-zinc-950/60 px-1.5 py-0.5 text-xs leading-none dark:bg-black/50`,children:[(0,S.jsx)(`span`,{className:d(a&&i?`text-zinc-200 dark:text-zinc-500`:`text-zinc-100`),children:t.team1Score}),(0,S.jsx)(`span`,{className:`mx-0.5 text-zinc-500 dark:text-zinc-600`,children:`·`}),(0,S.jsx)(`span`,{className:d(a&&r?`text-zinc-200 dark:text-zinc-500`:`text-zinc-100`),children:t.team2Score})]})]},n)})})})():(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(`div`,{className:`hidden lg:block`,children:(0,S.jsx)(C,{mapResults:e.mapResults,team1Id:e.team1.id,team2Id:e.team2.id,variant:`cards`,isLive:N,hideSpoilers:f})}),(0,S.jsx)(`div`,{className:`lg:hidden`,children:(0,S.jsx)(C,{mapResults:e.mapResults,team1Id:e.team1.id,team2Id:e.team2.id,variant:`pips`,isLive:N,hideSpoilers:f})})]}))]})}function A({rating:e,ratingDelta:t,showDelta:n,align:r=`left`}){return e==null||Math.round(e)===1500?null:(0,S.jsxs)(`div`,{className:d(`glk-tabular flex items-center gap-1 text-2xs leading-tight text-zinc-500 dark:text-zinc-500`,r===`right`&&`justify-end`),title:`Glicko rating: ${e}`,children:[(0,S.jsxs)(`span`,{children:[`Rating`,` `,(0,S.jsx)(`span`,{className:`font-mono font-semibold text-zinc-600 dark:text-zinc-400`,children:Math.round(e)})]}),n&&t!=null&&t!==0&&(0,S.jsxs)(`span`,{className:d(`font-mono font-semibold`,t>0?`text-[var(--glk-win)]`:`text-[var(--glk-loss)]`),children:[t>0?`+`:``,t]})]})}function j({isCompleted:e,isLive:t,isForfeit:n,t1Score:r,t2Score:i,t1Won:a,t2Won:o,hideSpoilers:s}){let c=`glk-tabular inline-flex flex-shrink-0 items-baseline gap-1 rounded-md bg-[var(--glk-surface-card-nested)] px-2.5 py-1 font-mono text-sm font-bold ring-1 ring-inset ring-[var(--glk-surface-card-edge)]`;return e&&r!=null&&i!=null?(0,S.jsx)(`div`,{className:c,"aria-label":s?`Score hidden`:`Score: ${r} to ${i}`,children:s?(0,S.jsx)(`span`,{className:`text-zinc-400`,"aria-hidden":`true`,children:`? – ?`}):(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(`span`,{className:d(a?`text-zinc-900 dark:text-zinc-50`:`text-zinc-400 dark:text-zinc-500`),"aria-hidden":`true`,children:r}),(0,S.jsx)(`span`,{className:`text-xs text-zinc-400 dark:text-zinc-600`,"aria-hidden":`true`,children:`–`}),(0,S.jsx)(`span`,{className:d(o?`text-zinc-900 dark:text-zinc-50`:`text-zinc-400 dark:text-zinc-500`),"aria-hidden":`true`,children:i})]})}):t&&r!=null&&i!=null?(0,S.jsxs)(`div`,{className:c,"aria-label":`Live score: ${r} to ${i}`,"aria-live":`polite`,"aria-atomic":`true`,children:[(0,S.jsx)(`span`,{className:`glk-score-slide-in text-zinc-900 dark:text-zinc-50`,"aria-hidden":`true`,children:r},`t1-${r}`),(0,S.jsx)(`span`,{className:`text-xs text-zinc-400 dark:text-zinc-600`,"aria-hidden":`true`,children:`–`}),(0,S.jsx)(`span`,{className:`glk-score-slide-in text-zinc-900 dark:text-zinc-50`,"aria-hidden":`true`,children:i},`t2-${i}`)]}):n?(0,S.jsx)(`span`,{className:d(c,`text-2xs uppercase tracking-wider text-zinc-500 dark:text-zinc-400`),"aria-label":`Forfeit`,children:`FF`}):(0,S.jsx)(`span`,{className:`glk-eyebrow flex-shrink-0 px-2 text-zinc-400 dark:text-zinc-500`,"aria-hidden":`true`,children:`vs`})}function M({match:e,gameSlug:t,className:n,hideSpoilers:r,team1:i,team2:a,team1IsPlaceholder:s,team2IsPlaceholder:c,isCompleted:l,isLive:u,t1Score:f,t2Score:p,t1Won:m,t2Won:h,matchLabel:_}){let v=e.scheduledAt??e.playedAt,y=v?g(v):`—`;return(0,S.jsx)(b,{to:`/${t}/matches/${e.id}`,"aria-label":_,"data-variant":`schedule`,className:d(`group block px-3 py-3 transition-all duration-150`,`hover:-translate-y-px hover:shadow-sm`,`focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-[var(--glk-brand)]`,n),children:(0,S.jsxs)(`div`,{className:`flex items-start gap-2 sm:gap-3`,children:[(0,S.jsxs)(`div`,{className:`flex w-12 flex-shrink-0 items-center gap-1 pt-px sm:w-14`,children:[u&&(0,S.jsx)(`span`,{"aria-hidden":`true`,className:`h-1.5 w-1.5 flex-shrink-0 animate-pulse rounded-full bg-[var(--glk-brand)]`}),(0,S.jsx)(`span`,{className:d(`glk-tabular text-xs font-medium tabular-nums leading-tight`,u?`text-[var(--glk-brand)]`:`text-zinc-400 dark:text-zinc-500`),children:y})]}),(0,S.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[e.stage&&(0,S.jsx)(`div`,{className:`glk-eyebrow mb-1 truncate text-2xs lowercase text-zinc-500 dark:text-zinc-500`,children:e.stage.toLowerCase()}),(0,S.jsxs)(`div`,{className:`grid min-w-0 grid-cols-[minmax(0,1fr)_auto_minmax(0,1fr)] items-center gap-2 sm:gap-3`,children:[(0,S.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[(0,S.jsx)(o,{name:i.name,slug:i.slug,abbreviation:i.abbreviation,logoUrl:i.logoUrl,size:`sm`,className:`flex-shrink-0`}),(0,S.jsxs)(`div`,{className:`min-w-0`,children:[(0,S.jsx)(`span`,{className:d(`hidden truncate text-sm font-semibold leading-tight md:inline`,s&&`italic text-zinc-500 dark:text-zinc-400`,!s&&l&&m&&`text-zinc-900 dark:text-zinc-100`,!s&&l&&!m&&`text-zinc-400 dark:text-zinc-500`,!s&&!l&&`text-zinc-900 dark:text-zinc-100`),children:i.name}),(0,S.jsx)(`span`,{className:d(`block truncate text-sm font-semibold leading-tight md:hidden`,s&&`italic text-zinc-500 dark:text-zinc-400`,!s&&l&&m&&`text-zinc-900 dark:text-zinc-100`,!s&&l&&!m&&`text-zinc-400 dark:text-zinc-500`,!s&&!l&&`text-zinc-900 dark:text-zinc-100`),children:i.abbreviation??i.name}),(0,S.jsx)(A,{rating:i.rating,ratingDelta:i.ratingDelta,showDelta:l&&!r})]})]}),(0,S.jsxs)(`div`,{className:`flex flex-col items-center gap-0.5`,children:[(0,S.jsx)(j,{isCompleted:l,isLive:u,isForfeit:e.status===`forfeit`,t1Score:f,t2Score:p,t1Won:m,t2Won:h,hideSpoilers:r}),e.winProbabilityA!=null&&e.winProbabilityB!=null&&(!l||!r)&&(0,S.jsxs)(`span`,{className:`glk-tabular text-2xs tabular-nums text-zinc-400 dark:text-zinc-500`,children:[e.winProbabilityA,`% · `,e.winProbabilityB,`%`]})]}),(0,S.jsxs)(`div`,{className:`flex min-w-0 flex-row-reverse items-center gap-2`,children:[(0,S.jsx)(o,{name:a.name,slug:a.slug,abbreviation:a.abbreviation,logoUrl:a.logoUrl,size:`sm`,className:`flex-shrink-0`}),(0,S.jsxs)(`div`,{className:`min-w-0 text-right`,children:[(0,S.jsx)(`span`,{className:d(`hidden truncate text-sm font-semibold leading-tight md:inline`,c&&`italic text-zinc-500 dark:text-zinc-400`,!c&&l&&h&&`text-zinc-900 dark:text-zinc-100`,!c&&l&&!h&&`text-zinc-400 dark:text-zinc-500`,!c&&!l&&`text-zinc-900 dark:text-zinc-100`),children:a.name}),(0,S.jsx)(`span`,{className:d(`block truncate text-sm font-semibold leading-tight md:hidden`,c&&`italic text-zinc-500 dark:text-zinc-400`,!c&&l&&h&&`text-zinc-900 dark:text-zinc-100`,!c&&l&&!h&&`text-zinc-400 dark:text-zinc-500`,!c&&!l&&`text-zinc-900 dark:text-zinc-100`),children:a.abbreviation??a.name}),(0,S.jsx)(A,{rating:a.rating,ratingDelta:a.ratingDelta,showDelta:l&&!r,align:`right`})]})]})]})]})]})})}export{O as n,D as r,k as t};