1import{_ as e,W as t,G as a,e as s,q as l,F as o,v as r,y as i,r as n,g as c,m as d,n as h,t as g,x as p,z as m,$ as w}from"./index-Ce7SucYs.js";/* empty css */const b={name:"leaderboard",props:{searched:Boolean,playerStats:Array,teamStats:Array,site:Boolean,live:Boolean,leagueLink:String},data:()=>({statsTeam:[{label:"Team Score",stat:"score",show:0,lg:!0}],stats:[{label:"Clutches",stat:"clutch",show:0,lg:!0},{label:"High Score",stat:"high",show:0,lg:!0},{label:"Avg. Score",stat:"scoreavg",show:0,lg:!0},{label:"Perfects",stat:"ngame",show:0,lg:!0}],statsSite:[]}),computed:{showStats(){return this.live?this.steStatsLive():this.setStatsWatl(),this.statsSite.filter(e=>this.notEmpty(this.playerStats,e.stat))},teamStatComp(){let e=["baxe","baxewin","clutch","clutchcall","eightyone","forfeit","gp","loss","ngame","nmatch","otl","pts","rubber","rubberwin","score","sgame","smatch","ugame","umatch","win"];return this.playerStats.reduce((t,a)=>(t[a.team.name]=t[a.team.name]||Object.assign(...e.map(e=>({[e]:0}))),e.forEach(e=>{t[a.team.name][e]+=a[e],t[a.team.name].ptspercent=(t[a.team.name].pts/(2*t[a.team.name].gp)*100).toFixed(0)}),t),Object.create(null))}},methods:{steStatsLive(){this.statsSite=[{label:"High Score",stat:"high",show:0,lg:!0},{label:"Avg. Score",stat:"scoreavg",show:0,lg:!0}]},setStatsWatl(){const e=window.innerWidth>0?window.innerWidth:screen.width;this.statsSite=e<576?[{label:"Score",stat:"score",show:0,lg:!0}]:[{label:"Score",stat:"score",show:0,lg:!0},{label:"High Score",stat:"high",show:0,lg:!0},{label:"Avg. Score",stat:"scoreavg",show:0,lg:!0},{label:"consecutive bull`s-eyes",stat:"cbull",show:0,lg:!0},{label:"consecutive killshots",stat:"ckillshot",show:0,lg:!0}]},playerSelect(e){"player"in e?e.code||0===e.code?window.open("/team/"+e.code,"_blank"):alert("Failed to read team data: Code missing"):e.id?t(a("/watl/players/"+e.id)).then(e=>{window.open("/player/"+e.val().code)}):alert("Failed to read player data: Key missing")},leader:(e,t)=>e.slice().sort((e,a)=>parseFloat(e[t])<parseFloat(a[t])?100:parseFloat(e[t])>parseFloat(a[t])?-100:e.score<a.score?1:e.score>a.score?-1:0).slice(0,10),notEmpty(e,t){if(e.length>0)return null!=e[0][t]}}},y=["onClick"],u={class:"players pointer"},v={key:0,class:"points"},S={key:0},k={key:1},f={key:0,class:"pa-4 text-center",style:{width:"100%"}};const _=e(b,[["render",function(e,t,a,b,_,x){const F=n("v-icon"),C=n("v-card");return c(),s("div",{class:i({column:!a.site||a.live,row:a.site})},[(c(!0),s(o,null,r(x.showStats,n=>(c(),d(C,{key:n.stat,"bg-color":"transparent",class:i({"row-card":a.site,"hidden-md-and-down":!n.lg})},{default:h(()=>[g("div",{class:i(["header",{fillBottom:"score"===n.label.toLowerCase()&&a.site}])},["81"===n.label?(c(),d(F,{key:0},{default:h(()=>[...t[1]||(t[1]=[p("mdi-star",-1)])]),_:1})):l("",!0),p(" "+m(n.label)+" ",1),"81"===n.label?(c(),d(F,{key:1},{default:h(()=>[...t[2]||(t[2]=[p("mdi-star",-1)])]),_:1})):l("",!0)],2),g("div",{class:i(["leadercard",{glowing:n.stat}])},[void 0!==a.playerStats?(c(!0),s(o,{key:0},r(x.leader(a.playerStats,n.stat),(e,t)=>(c(),s("div",{class:i(["stat-list",{highlight:t===n.show}]),key:e.id,onClick:t=>x.playerSelect(e)},[g("div",u,[g("span",null,m(a.searched?e.index:t+1)+". "+m(e.name?e.name:e.first+" "+e.last),1)]),e[n.stat]&&e[n.stat]>0?(c(),s("div",v,[e[n.stat]>0?(c(),s("span",S,m("scoreavg"===n.stat&&e[n.stat]?(+e[n.stat]).toFixed(1):e[n.stat]),1)):(c(),s("span",k,"-"))])):l("",!0)],10,y))),128)):l("",!0)],2),void 0!==a.leagueLink?(c(),s("a",{key:0,href:"#",onClick:t[0]||(t[0]=w(t=>e.$router.push(a.leagueLink),["prevent"])),class:"link"},"View Leaderboard")):l("",!0)]),_:2},1032,["class"]))),128)),0===a.playerStats.length?(c(),s("div",f," Stats are not available yet. ")):l("",!0)],2)}],["__scopeId","data-v-6a0aafb2"]]);export{_ as l};
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.