(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4670],{56029:function(e,t,a){var n=a(33448);e.exports=function(e,t,a){for(var s=-1,r=e.length;++s<r;){var l=e[s],i=t(l);if(null!=i&&(void 0===o?i==i&&!n(i):a(i,o)))var o=i,d=l}return d}},53325:function(e){e.exports=function(e,t){return e>t}},84753:function(e,t,a){var n=a(56029),s=a(53325),r=a(67206);e.exports=function(e,t){return e&&e.length?n(e,r(t,2),s):void 0}},10842:function(e,t,a){"use strict";var n=a(85893),s=a(95429),r=a(24710);t.Z=e=>{var t;return(0,n.jsxs)(s.k,{justify:"flex-end",align:"end",wrap:"wrap",gap:8,children:[!!e.selectedTeams.length&&(0,n.jsxs)(r.C,{color:"gray",onClick:e.open,style:{cursor:"pointer"},children:["Teams:",(0,n.jsx)("span",{style:{fontWeight:300,fontSize:10},children:e.selectedTeams.map(t=>{var a,n;return null!==(n=null===(a=e.teams.find(e=>e.id===t))||void 0===a?void 0:a.name)&&void 0!==n?n:t}).join(", ")})]}),!!e.matchTypes.length&&(0,n.jsxs)(r.C,{color:"gray",onClick:e.open,style:{cursor:"pointer"},children:["Type:"," ",(0,n.jsx)("span",{style:{fontWeight:300,fontSize:10},children:e.matchTypes.join(", ")})]}),!!e.selectedEvents.length&&(0,n.jsxs)(r.C,{color:"gray",onClick:e.open,style:{cursor:"pointer"},children:["Events:"," ",(0,n.jsx)("span",{style:{fontWeight:300,fontSize:10},children:e.selectedEvents.map(t=>{var a,n;return null===(n=e.events)||void 0===n?void 0:null===(a=n.find(e=>e.id===t))||void 0===a?void 0:a.name}).join(", ")})]}),e.timePeriod&&(0,n.jsxs)(r.C,{color:"gray",onClick:e.open,style:{cursor:"pointer"},children:["Season:"," ",(0,n.jsx)("span",{style:{fontWeight:300,fontSize:10},children:(null===(t=e.allSeasons.find(t=>t.id.toString()===e.timePeriod))||void 0===t?void 0:t.title.name)||e.timePeriod})]}),!!e.selectedMaps.length&&(0,n.jsxs)(r.C,{color:"gray",onClick:e.open,style:{cursor:"pointer"},children:["Maps:",(0,n.jsx)("span",{style:{fontWeight:300,fontSize:10},children:e.selectedMaps.map(t=>{var a,n;return null!==(n=null===(a=e.allMaps.find(e=>e.id===t))||void 0===a?void 0:a.name)&&void 0!==n?n:t}).join(", ")})]}),!!e.selectedModes.length&&(0,n.jsxs)(r.C,{color:"gray",onClick:e.open,style:{cursor:"pointer"},children:["Modes:",(0,n.jsx)("span",{style:{fontWeight:300,fontSize:10},children:e.selectedModes.map(t=>e.modeNames[t]||t).join(", ")})]})]})}},97442:function(e,t,a){"use strict";var n=a(85893),s=a(39484),r=a(92795),l=a(95429),i=a(52247),o=a(69084),d=a(96486),c=a.n(d),h=a(78964);t.Z=e=>{var t;let a=(0,s.X)(),d=(0,h.a)("(min-width: 768px)"),m=(t=e.maps)?t.filter(e=>null!==e.name).map(e=>({value:e.id.toString(),label:e.name})):[];return(0,n.jsx)(r.u,{opened:e.opened,onClose:e.close,size:"auto",centered:!0,padding:32,children:(0,n.jsxs)(l.k,{gap:8,justify:"left",wrap:"wrap",direction:"column",w:d?"35vw":void 0,children:[!!e.teams.length&&(0,n.jsx)(i.N,{color:"gray",clearable:!0,data:e.teams.map(e=>({value:e.id.toString(),label:e.name})),label:"Teams",onChange:t=>e.handleSelectedTeamsChange(t.map(Number)),placeholder:"All",style:{color:"dark"===a.colorScheme?"white":"black",flexGrow:1},value:e.selectedTeams.map(String),variant:"filled"}),(0,n.jsx)(i.N,{variant:"filled",clearable:!0,color:"gray",style:{flexGrow:1},label:"Match type",value:e.matchTypes,placeholder:"All",data:[{value:"Offline",label:"LAN"},{value:"Online",label:"Online"}],onChange:t=>e.handleMatchTypeChange(t)}),(0,n.jsx)(o.P,{variant:"filled",color:"gray",style:{color:"dark"===a.colorScheme?"white":"black",flexGrow:1},label:"Season",value:e.timePeriod,data:[...e.allSeasons.map(e=>({value:"".concat(e.id),label:"".concat(e.id," Season (").concat(e.title.name_short,")")})),{value:"All time",label:"All time"}],onChange:t=>{t&&e.handleTimePeriodChange(t)}}),e.events&&(0,n.jsx)("div",{style:{flexGrow:1},children:(0,n.jsx)(i.N,{variant:"filled",clearable:!0,color:"gray",style:{color:"dark"===a.colorScheme?"white":"black",flexGrow:1},label:"Event",value:e.selectedEvents.map(String),placeholder:"All",data:[...c().orderBy(e.events,"name","asc").map(e=>({value:"".concat(e.id),label:e.name}))],onChange:t=>e.handleSelectedEventChange(t.map(Number))})},"event-select-".concat(e.timePeriod)),(0,n.jsx)(i.N,{color:"gray",clearable:!0,data:m,label:"Maps",onChange:t=>e.handleSelectedMapsChange(t.map(Number)),placeholder:"All",style:{color:"dark"===a.colorScheme?"white":"black",flexGrow:1},value:e.selectedMaps.map(String),variant:"filled"}),(0,n.jsx)(i.N,{color:"gray",clearable:!0,data:[{value:"1",label:"Hardpoint"},{value:"2",label:"Search & Destroy"},{value:"3",label:"Control"}],label:"Modes",onChange:t=>e.handleSelectedModesChange(t.map(Number)),placeholder:"All",style:{color:"dark"===a.colorScheme?"white":"black",flexGrow:1},value:e.selectedModes.map(String),variant:"filled"})]})})}},25519:function(e,t,a){"use strict";a.d(t,{Z:function(){return d}});var n=a(85893),s=a(39484),r=a(95429),l=a(24920),i=a(41664),o=a.n(i);function d(e){let{buttonLinks:t}=e,a=(0,s.X)();return(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(r.k,{gap:8,justify:"left",wrap:"wrap",direction:"row",children:t.map(e=>(0,n.jsx)(o(),{href:e.href,style:{flex:1},children:(0,n.jsx)(l.z,{w:"100%",variant:"light",color:"gray",style:{boxShadow:"0px 0px 5px 0px rgba(0,0,0,0.25)",color:"dark"===a.colorScheme?"white":"black"},children:e.text})}))})})}},22147:function(e,t,a){"use strict";a.d(t,{Z:function(){return k}});var n=a(85893),s=a(67294),r=a(39484),l=a(38878),i=a(54410),o=a(1506),d=a(43078),c=a(8207),h=a(95429),m=a(41959),u=a(24920),p=a(58162),g=a(25675),f=a.n(g),y=a(96486),x=a.n(y),v=a(41664),j=a.n(v),w=a(38574),_=a(41123);function b(e){let{children:t,playerTag:a}=e;return a?(0,n.jsx)(j(),{href:"/players/".concat(a.toLowerCase()),style:{color:"inherit",textDecoration:"inherit"},children:t}):(0,n.jsx)(n.Fragment,{children:t})}function k(e){let{isLoading:t,name:a,stat:g,matchTypes:y,selectedMaps:v,selectedModes:k,selectedTeams:M,timePeriod:S,allMaps:T,allPlayers:C,limit:D,eventIds:P,addPagination:A=!1,roundDecimals:L=2,statsArray:O}=e,[N,I]=(0,s.useState)([]),[Z,E]=(0,s.useState)(1),F=Z*D,B=F-D,q=(0,r.X)();return(0,s.useEffect)(()=>{let e=e=>{I(x().orderBy(e,[g],["desc"]))};O?e(O):(async()=>{let{startAt:t,endAt:a,seasonId:n}=(e=>{let t=new Date;switch(e){case"Last month":return{startAt:new Date(t.setMonth(t.getMonth()-1)),endAt:new Date};case"Last 3 months":return{startAt:new Date(t.setMonth(t.getMonth()-3)),endAt:new Date};case"Last 6 months":return{startAt:new Date(t.setMonth(t.getMonth()-6)),endAt:new Date};case"Last 12 months":return{startAt:new Date(t.setFullYear(t.getFullYear()-1)),endAt:new Date};case"2025":return{seasonId:2025};case"2024":return{seasonId:2024};case"2023":return{seasonId:2023};case"2022":return{seasonId:2022};case"2021":return{seasonId:2021};case"2020":return{seasonId:2020};default:return{}}})(S),s=T.map(e=>e.id),r={eventType:y,mapId:v.length?v:s,modeId:k.length?k:[1,2,3],orderBy:g,teamId:M,eventId:P.map(e=>(0,w.m)(e)),seasonId:n,startAt:t,endAt:a},l=await fetch("/api/playerStats",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(r)});if(l.ok){let t=await l.json();e(t=t.map(e=>{let t=C.find(t=>t.id===e.player_id);return t&&t.headshot?{...e,headshot:t.headshot}:e}))}else console.error("Error fetching stats"),I([])})().catch(e=>{console.error("Failed to fetch player stats:",e),I([])})},[O,g,y.length,v.length,k.length,S,T.length,C.length,P.length,M.length]),(0,n.jsxs)(l.Z,{w:"100%",style:{boxShadow:"0px 0px 5px 0px rgba(0,0,0,0.25)",display:"flex",flexDirection:"column"},p:0,children:[(0,n.jsx)(i.x,{fw:700,ta:"center",p:8,children:a}),N?t?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(o.O,{height:48,width:"calc(100% - 16px)",m:8}),(0,n.jsx)(o.O,{height:48,width:"calc(100% - 16px)",m:8}),(0,n.jsx)(o.O,{height:48,width:"calc(100% - 16px)",m:8}),(0,n.jsx)(o.O,{height:48,width:"calc(100% - 16px)",m:8}),(0,n.jsx)(o.O,{height:48,width:"calc(100% - 16px)",m:8})]}):(0,n.jsxs)(n.Fragment,{children:[N.length<=0?(0,n.jsx)(d.W,{mt:"xl",mb:"xl",children:(0,n.jsxs)(c.K,{align:"center",children:[(0,n.jsx)(p.Z,{size:40}),(0,n.jsx)(i.x,{fz:"sm",children:"No records found"})]})}):(0,n.jsx)(n.Fragment,{children:N.slice(B,F).map((e,t)=>{let a=B+t;return(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(b,{playerTag:e.player_tag,children:(0,n.jsx)(l.Z,{pt:8,pb:8,radius:0,style:{backgroundColor:t%2==0?"rgba(0,0,0,0.075)":"transparent"},children:(0,n.jsxs)(h.k,{justify:"space-between",align:"center",children:[(0,n.jsx)(i.x,{w:28,mr:8,children:(0,_._O)(a+1)}),(0,n.jsx)(f(),{width:48,height:48,src:function(e,t){if(!e)return"";let a=t.find(t=>t.id===e);return(null==a?void 0:a.headshot)||""}(e.player_id,C),alt:"".concat(e.player_tag,"'s headshot"),onError:e=>{e.target.id="/bpLightLogo.png",e.target.srcset="/bpLightLogo.png"},style:{borderRadius:8}}),(0,n.jsx)(i.x,{td:"underline",fw:700,ml:8,mr:"auto",maw:80,truncate:!0,children:e.player_tag}),e[g]&&(0,n.jsx)(i.x,{ml:8,children:e[g].toFixed(L)})]})},t)})})})}),(0,n.jsx)(l.Z,{p:8,radius:0,style:{backgroundColor:"rgba(0,0,0,0.075)"},children:A?(0,n.jsx)(m.t,{value:Z,onChange:E,total:Math.ceil(N.length/D),boundaries:2}):(0,n.jsx)(n.Fragment,{children:N.length>0&&(0,n.jsx)(j(),{href:(()=>{let e={matchTypes:y.join(","),timePeriod:S,orderBy:g,events:P.join(","),maps:v.join(","),modes:k.join(","),teams:M.join(",")},t=x().chain(e).pickBy(e=>!x().isNil(e)&&!x().isEmpty(e)).map((e,t)=>"".concat(t,"=").concat(encodeURI(e))).join("&").value();return"/stats/advanced?".concat(t)})(),style:{color:"dark"===q.colorScheme?"white":"black",textDecoration:"inherit"},children:(0,n.jsx)(u.z,{w:"100%",variant:"light",color:"gray",style:{boxShadow:"0px 0px 5px 0px rgba(0,0,0,0.25)",color:"dark"===q.colorScheme?"white":"black"},children:"Leaderboards"})})})})]}):(0,n.jsx)(i.x,{mb:8,ta:"center",children:"Couldn't load stats for selected filters"})]})}},41123:function(e,t,a){"use strict";function n(e){return e?"https://instagram.com/".concat(e):null}function s(e){return e?"https://twitch.tv/".concat(e):null}function r(e){return e?"https://twitter.com/".concat(e):null}function l(e){return e?"https://youtube.com/".concat(e):null}function i(e){if(!e)return null;if(e>3&&e<21)return"".concat(e,"th");switch(e%10){case 1:return"".concat(e,"st");case 2:return"".concat(e,"nd");case 3:return"".concat(e,"rd");default:return"".concat(e,"th")}}a.d(t,{ML:function(){return n},_O:function(){return i},dn:function(){return s},po:function(){return r},zR:function(){return l}})},66520:function(e,t,a){"use strict";a.d(t,{Z:function(){return l}});var n=a(85893),s=a(9008),r=a.n(s);function l(e){let{title:t,description:a,keywords:s,imageUrl:l,url:i}=e;return(0,n.jsxs)(r(),{children:[(0,n.jsx)("title",{children:t}),(0,n.jsx)("meta",{name:"description",content:a}),(0,n.jsx)("meta",{name:"keywords",content:s}),(0,n.jsx)("meta",{property:"og:title",content:t}),(0,n.jsx)("meta",{property:"og:description",content:a}),(0,n.jsx)("meta",{property:"og:image",content:l||"/BPFlatLogoDark.png"}),(0,n.jsx)("meta",{property:"og:type",content:"website"}),(0,n.jsx)("meta",{property:"og:site_name",content:"Breaking Point"}),(0,n.jsx)("meta",{property:"og:url",content:i||"https://www.breakingpoint.gg"}),(0,n.jsx)("link",{rel:"canonical",href:i||"https://www.breakingpoint.gg"}),(0,n.jsx)("meta",{name:"twitter:card",content:"summary_large_image"}),(0,n.jsx)("meta",{name:"twitter:site",content:"@GGBreakingPoint"}),(0,n.jsx)("meta",{name:"twitter:title",content:t}),(0,n.jsx)("meta",{name:"twitter:description",content:a}),(0,n.jsx)("meta",{name:"twitter:image",content:l||"/BPFlatLogoDark.png"})]})}a(67294)},34670:function(e,t,a){"use strict";a.r(t),a.d(t,{__N_SSG:function(){return S},default:function(){return C},filterTeamsForSeasonAndEvents:function(){return T}});var n=a(85893),s=a(67294),r=a(63991),l=a(84753),i=a.n(l),o=a(37113),d=a(65984),c=a(39484),h=a(38878),m=a(95429),u=a(28008),p=a(24920),g=a(79274),f=a(22147),y=a(95448),x=a(25519),v=a(66352),j=a(66520),w=a(97442),_=a(10842),b=a(27896),k=a(97066),M=a.n(k),S=!0;let T=(e,t,a)=>{let n="All time"===a?e:e.filter(e=>e.season_ids.find(e=>e===+a));return t.length?n.filter(e=>e.event_ids.find(e=>t.includes(e))):n};function C(e){var t;let{allMaps:a,allPlayers:l,allSeasons:k,allTeams:S}=e,C=(0,d.rZ)(),D=(0,c.X)(),[P,{open:A,close:L}]=(0,o.q)(!1),O=((null===(t=i()(k,e=>e.id))||void 0===t?void 0:t.id)||y.m).toString(),[N,I]=(0,s.useState)(!0),[Z,E]=(0,g.v1)("matchTypes",(0,g.S$)(g.Oi).withDefault([]).withOptions({clearOnDefault:!0})),[F,B]=(0,g.v1)("timePeriod",g.Oi.withDefault(O).withOptions({clearOnDefault:!0})),[q,z]=(0,g.v1)("events",(0,g.S$)(g.U).withDefault([]).withOptions({clearOnDefault:!0})),[G,W]=(0,g.v1)("maps",(0,g.S$)(g.U).withDefault([]).withOptions({clearOnDefault:!0})),[Q,K]=(0,g.v1)("modes",(0,g.S$)(g.U).withDefault([]).withOptions({clearOnDefault:!0})),[R,Y]=(0,g.v1)("teams",(0,g.S$)(g.U).withDefault([]).withOptions({clearOnDefault:!0})),[H,U]=(0,s.useState)(),[X,$]=(0,s.useState)([]),J=a.filter(e=>{var t;return(null===(t=e.season_id)||void 0===t?void 0:t.toString())===F}),V=T(S,q,F);return(0,s.useEffect)(()=>{"All time"!==F&&(0,v.QW)(parseInt(F,10)).then(e=>{(null==e?void 0:e.data)&&U(e.data)})},[F]),(0,s.useEffect)(()=>{(async()=>{let{startAt:e,endAt:t,seasonId:n}=(e=>{let t=new Date;switch(e){case"Last month":return{startAt:new Date(t.setMonth(t.getMonth()-1)),endAt:new Date};case"Last 3 months":return{startAt:new Date(t.setMonth(t.getMonth()-3)),endAt:new Date};case"Last 6 months":return{startAt:new Date(t.setMonth(t.getMonth()-6)),endAt:new Date};case"Last 12 months":return{startAt:new Date(t.setFullYear(t.getFullYear()-1)),endAt:new Date};case"2025":return{seasonId:2025};case"2024":return{seasonId:2024};case"2023":return{seasonId:2023};case"2022":return{seasonId:2022};case"2021":return{seasonId:2021};case"2020":return{seasonId:2020};default:return{}}})(F),s=a.map(e=>e.id),r={eventType:Z,mapId:G.length?G:s,modeId:Q.length?Q:[1,2,3],teamId:R,sortBy:"bp_rating",eventId:q};n?r.seasonId=n:(r.startAt=e,r.endAt=t);try{let e=await fetch("/api/playerStats",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(r)});if(e.ok){let t=await e.json();t.sort((e,t)=>t.bp_rating-e.bp_rating),t=t.map(e=>{let t=l.find(t=>t.id===e.player_id);return t&&t.headshot?{...e,headshot:t.headshot}:e}),$(t)}else throw Error("Error fetching stats")}catch(e){I(!1),console.error("Failed to fetch player stats:",e)}I(!1)})().then(()=>I(!1)).catch(e=>console.error(e))},[F,G.length,Q.length,a.length,l.length,q.length,Z.length,R.length]),(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(j.Z,{title:"Call of Duty League Stats | Breaking Point",description:"Explore the most comprehensive Call of Duty League stats on Breaking Point. Delve into detailed player performance, team rankings and advanced analytics designed to give fans, players, and analysts unprecedented insights into the game. Whether you're strategizing for fantasy COD League, researching your favorite teams, or just love diving deep into data, our stats page is your ultimate destination for all things COD League. Get up-to-the-minute updates and dive into the heart of COD esports with Breaking Point.",keywords:"Call of Duty League, COD League Stats, Player Performance, Team Rankings, COD Analytics, Esports Data, Fantasy COD League, Breaking Point",imageUrl:"/images/stats/Stats Darkmode.png",url:"https://www.breakingpoint.gg/stats"}),(0,n.jsx)(h.Z,{style:{backgroundColor:"dark"===D.colorScheme?C.colors.dark[8]:C.colors.gray[1]},children:(0,n.jsxs)(m.k,{direction:"column",gap:8,w:"100%",children:[(0,n.jsx)(x.Z,{buttonLinks:[{href:"/stats",text:"Players"},{href:"/stats/advanced",text:"Leaderboards"}]}),(0,n.jsxs)(m.k,{justify:"space-between",align:"end",wrap:"wrap",gap:16,children:[(0,n.jsx)(u.D,{mt:8,children:"Player Stats"}),(0,n.jsxs)(p.z,{color:"gray",variant:"light",style:{boxShadow:"0px 0px 5px 0px rgba(0,0,0,0.25)",color:"dark"===D.colorScheme?"white":"black"},w:128,ml:"auto",onClick:A,children:["Filters ",(0,n.jsx)(r.wHY,{})]})]}),(0,n.jsx)(w.Z,{opened:P,close:L,matchTypes:Z,handleMatchTypeChange:E,timePeriod:F,allSeasons:k,handleTimePeriodChange:e=>{B(e),z([]),W([]),Y(R.filter(t=>T(S,[],e).some(e=>e.id===t)))},events:null!=H?H:[],selectedEvents:q,handleSelectedEventChange:z,maps:J,selectedMaps:G,handleSelectedMapsChange:W,selectedModes:Q,handleSelectedModesChange:K,handleSelectedTeamsChange:Y,selectedTeams:R,teams:V}),(0,n.jsx)(_.Z,{matchTypes:Z,selectedEvents:q,events:null!=H?H:[],timePeriod:F,allSeasons:k,selectedMaps:G,allMaps:a,selectedModes:Q,modeNames:{1:"Hardpoint",2:"Search & Destroy",3:"Control"},open:A,selectedTeams:R,teams:V}),(0,n.jsxs)(m.k,{gap:8,justify:"left",wrap:"wrap",direction:"row",children:[(0,n.jsx)("div",{className:M().top5TableContainer,children:(0,n.jsx)(f.Z,{isLoading:N,name:"K/D",stat:"kd",matchTypes:Z,timePeriod:F,selectedMaps:G,selectedModes:Q,selectedTeams:R,allMaps:a,allPlayers:l,limit:5,eventIds:q,statsArray:X})}),(0,n.jsx)("div",{className:M().top5TableContainer,children:(0,n.jsx)(f.Z,{isLoading:N,name:"Slayer Rating",stat:"slayer_rating",matchTypes:Z,timePeriod:F,selectedMaps:G,selectedModes:Q,selectedTeams:R,allMaps:a,allPlayers:l,limit:5,eventIds:q,statsArray:X})}),(0,n.jsx)("div",{className:M().top5TableContainer,children:(0,n.jsx)(f.Z,{isLoading:N,name:"BP Rating",stat:"bp_rating",matchTypes:Z,timePeriod:F,selectedMaps:G,selectedModes:Q,selectedTeams:R,allMaps:a,allPlayers:l,limit:5,eventIds:q,statsArray:X})}),0===Q.length&&(0,n.jsx)("div",{style:{width:"100%"},children:(0,n.jsx)(b.Z,{placementId:"657186fe4ecfa2596a09d57d",hybridBanner:!0})}),(0===Q.length||Q.includes(1))&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{className:M().top5TableContainer,children:(0,n.jsx)(f.Z,{isLoading:N,name:"Hardpoint K/D",stat:"hp_kd",matchTypes:Z,timePeriod:F,selectedMaps:G,selectedModes:[1],selectedTeams:R,allMaps:a,allPlayers:l,limit:5,eventIds:q,statsArray:X})}),(0,n.jsx)("div",{className:M().top5TableContainer,children:(0,n.jsx)(f.Z,{isLoading:N,name:"Hardpoint KP10M",stat:"hp_k_10m",matchTypes:Z,timePeriod:F,selectedMaps:G,selectedModes:[1],selectedTeams:R,allMaps:a,allPlayers:l,limit:5,eventIds:q,statsArray:X})}),(0,n.jsx)("div",{className:M().top5TableContainer,children:(0,n.jsx)(f.Z,{isLoading:N,name:"Hardpoint DMG/10M",stat:"hp_dmg_10m",matchTypes:Z,timePeriod:F,selectedMaps:G,selectedModes:[1],selectedTeams:R,allMaps:a,allPlayers:l,limit:5,eventIds:q,statsArray:X})})]}),(0===Q.length||Q.includes(2))&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{className:M().top5TableContainer,children:(0,n.jsx)(f.Z,{isLoading:N,name:"SND K/D",stat:"snd_kd",matchTypes:Z,timePeriod:F,selectedMaps:G,selectedModes:[2],selectedTeams:R,allMaps:a,allPlayers:l,limit:5,eventIds:q,statsArray:X})}),(0,n.jsx)("div",{className:M().top5TableContainer,children:(0,n.jsx)(f.Z,{isLoading:N,name:"SND KPR",stat:"snd_kpr",matchTypes:Z,timePeriod:F,selectedMaps:G,selectedModes:[2],selectedTeams:R,allMaps:a,allPlayers:l,limit:5,eventIds:q,statsArray:X})}),(0,n.jsx)("div",{className:M().top5TableContainer,children:(0,n.jsx)(f.Z,{isLoading:N,name:"SND First Blood %",stat:"first_blood_percentage",matchTypes:Z,timePeriod:F,selectedMaps:G,selectedModes:[2],selectedTeams:R,allMaps:a,allPlayers:l,limit:5,eventIds:q,statsArray:X})})]}),(0===Q.length||Q.includes(3))&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{className:M().top5TableContainer,children:(0,n.jsx)(f.Z,{isLoading:N,name:"CTL K/D",stat:"ctl_kd",matchTypes:Z,timePeriod:F,selectedMaps:G,selectedModes:[3],selectedTeams:R,allMaps:a,allPlayers:l,limit:5,eventIds:q,statsArray:X})}),(0,n.jsx)("div",{className:M().top5TableContainer,children:(0,n.jsx)(f.Z,{isLoading:N,name:"Control KP10M",stat:"ctl_k_10m",matchTypes:Z,timePeriod:F,selectedMaps:G,selectedModes:[3],selectedTeams:R,allMaps:a,allPlayers:l,limit:5,eventIds:q,statsArray:X})}),(0,n.jsx)("div",{className:M().top5TableContainer,children:(0,n.jsx)(f.Z,{isLoading:N,name:"CTL DMG/10M",stat:"ctl_dmg_10m",matchTypes:Z,timePeriod:F,selectedMaps:G,selectedModes:[3],selectedTeams:R,allMaps:a,allPlayers:l,limit:5,eventIds:q,statsArray:X})})]})]})]})})]})}},66352:function(e,t,a){"use strict";a.d(t,{EY:function(){return l},QW:function(){return r},xo:function(){return o},NX:function(){return i},ph:function(){return d},o7:function(){return c},YN:function(){return h}});var n=a(36281);function s(e){return e&&e.matches.every(e=>"id"in e)?e:null}async function r(e){return await n.OQ.from("events").select("*").eq("season_id",e)}async function l(e){return await n.OQ.from("events").select("*").eq("id",e).single()}async function i(e,t){return await n.OQ.from("events").select("*").eq("season_id",e).eq("division_id",t).order("start_date",{ascending:!0}).order("end_date",{ascending:!0})}async function o(e){let t=await n.OQ.from("events").select("*,\n matches!inner(*,\n team1: teams!matches_team_1_id_fkey(id, name, logo_darkmode, logo_lightmode),\n team2: teams!matches_team_2_id_fkey(id, name, logo_darkmode, logo_lightmode),\n player_stats!inner(player_id), round: rounds!inner(id, name)\n )").eq("matches.player_stats.player_id",e).neq("matches.status","upcoming").order("start_date",{ascending:!1}),a=t.data?t.data.map(e=>s(e)).filter(e=>!!e):null;return null===t.error?{...t,data:null!=a?a:[]}:{...t,data:null}}async function d(e){let t=await n.OQ.from("events").select("*, matches!inner(*, team1: teams!matches_team_1_id_fkey(*), team2: teams!matches_team_2_id_fkey(*), round: rounds(*))").or("team_1_id.eq.".concat(e,",team_2_id.eq.").concat(e),{foreignTable:"matches"}).neq("matches.status","upcoming").order("start_date",{ascending:!1}),a=t.data?t.data.map(e=>s(e)).filter(e=>!!e):null;return null===t.error?{...t,data:null!=a?a:[]}:{...t,data:null}}async function c(e){let t=await n.OQ.from("events").select("*, matches!inner(*, team1: teams!matches_team_1_id_fkey(*), team2: teams!matches_team_2_id_fkey(*), round: rounds(*))").or("team_1_id.eq.".concat(e,",team_2_id.eq.").concat(e),{foreignTable:"matches"}).eq("matches.status","upcoming").order("start_date",{ascending:!0}),a=t.data?t.data.map(e=>s(e)).filter(e=>!!e):null;return null===t.error?{...t,data:null!=a?a:[]}:{...t,data:null}}async function h(e){let t=await n.OQ.from("events").select("id, name, season_id,\n season: seasons!inner(id),\n matches!inner(\n *,\n round: rounds!inner(id, name),\n team1: teams!matches_team_1_id_fkey(id, name, logo_darkmode, logo_lightmode),\n team2: teams!matches_team_2_id_fkey(id, name, logo_darkmode, logo_lightmode)\n )").eq("season_id",e).ilike("tier","%tournament%"),a=t.data?t.data.map(e=>e&&e.matches.every(e=>"id"in e)&&"id"in e.season?e:null).filter(e=>!!e):null;return null===t.error?{...t,data:null!=a?a:[]}:{...t,data:null}}},95448:function(e,t,a){"use strict";a.d(t,{m:function(){return n}});let n=2025},38574:function(e,t,a){"use strict";function n(e){return e?+e:Number.NaN}a.d(t,{m:function(){return n}})},97066:function(e){e.exports={top5TableContainer:"Players_top5TableContainer__Gjc7u"}},9008:function(e,t,a){e.exports=a(37219)},58162:function(e,t,a){"use strict";a.d(t,{Z:function(){return n}});/** * @license @tabler/icons-react v3.11.0 - MIT * * This source code is licensed under the MIT license. * See the LICENSE file in the root directory of this source tree. */var n=(0,a(21955).Z)("outline","database-exclamation","IconDatabaseExclamation",[["path",{d:"M4 6c0 1.657 3.582 3 8 3s8 -1.343 8 -3s-3.582 -3 -8 -3s-8 1.343 -8 3",key:"svg-0"}],["path",{d:"M4 6v6c0 1.657 3.582 3 8 3c1.118 0 2.182 -.086 3.148 -.241m4.852 -2.759v-6",key:"svg-1"}],["path",{d:"M4 12v6c0 1.657 3.582 3 8 3c1.064 0 2.079 -.078 3.007 -.22",key:"svg-2"}],["path",{d:"M19 16v3",key:"svg-3"}],["path",{d:"M19 22v.01",key:"svg-4"}]])}}]);