1import{_ as k}from"./Cp5oYlq4.js";import{N as P,o as n,c as I,a as C,b as e,l as x,aM as w,h as d,H as _,G as g,F as b,d as h,e as p,D as v,E as U,t as u,p as S,_ as N,L as z,w as T,A as V,aN as j}from"./B9cCGS5t.js";import{u as D}from"./CjRTMq7w.js";import"./-M6jO3wX.js";const L={props:{stats:{type:Array,required:!0},competitionLogo:{type:String,required:!0},title:{type:String,required:!0}},data(){return{selectedPlayerId:this.stats[0]?.player.id,statType:"kost"}},computed:{selectedPlayerStats(){return this.stats.find(s=>s.player.id===this.selectedPlayerId)},showPercent(){return["hs","kost"].includes(this.statType)},altText(){const s=[],{player:t,stats:o,team:c}=this.selectedPlayerStats,r=t.stylized_name||selectedPlayerStats.player.ign,a=(t.name||"").split(" "),m=a.shift();s.push(`Post-match result of ${this.title}.`),s.push(`The player ${m} â${r}â ${a.join(" ")} is highlighted.`.split(" ").filter(Boolean).join(" ")),s.push(`They played for ${c.tag} in the match.`);const y=`${o[this.statType]}${this.showPercent?"%":""}`;return s.push(`They achieved a ${this.$options.statTypes[this.statType]} of ${y}.`),s.push(`Their SiegeGG Rating for the match is ${o.rating}.`),s.join(" ")}},methods:{copy(){const{altcopy:s}=this.$refs;s.select(),s.setSelectionRange(0,99999),navigator.clipboard.writeText(s.value),document.execCommand("copy")}},statTypes:{kost:"KOST",kpr:"KPR",hs:"HS%",kd:"KD",ok:"Entry"}},R={class:"container"},$={class:"row"},B={class:"col-12 col-md-6"},E={class:"form-group"},G=["value","textContent"],A={class:"col-12 col-md-6"},F={class:"form-group"},O=["value","textContent"],q={class:"container text-center mb-3"},K=["value"],M={class:"d-flex align-items-center",style:{height:"750px"}},H={class:"export-crop crop mx-auto bg-dark mb-3",style:{height:"500px",width:"500px",transform:"scale(1.5)"}},W={key:0},J={class:"position-absolute w-100 h-100 overflow-hidden"},Q={class:"d-flex align-items-center justify-content-center position-absolute w-100"},X={class:"position-absolute bg-darker d-flex flex-column py-3 px-5",style:{bottom:"0",left:"0",width:"100%",height:"155px"}},Y={class:"d-flex",style:{"line-height":"1"}},Z={class:"d-flex flex-grow-1"},ee={class:"d-flex flex-column"},te={class:"h3 mb-0"},se={class:"fs-sm text-muted"},ae={class:"d-flex flex-column text-right mr-4"},le={class:"h3 mb-0"},oe={key:0,class:"fs-sm"},re={class:"fs-sm text-muted"},ie={class:"d-flex flex-column text-right"},ne={class:"h3 mb-0"};function ce(s,t,o,c,r,a){const m=U,y=N;return n(),I(y,{padded:""},{default:C(()=>[e("div",R,[e("div",$,[e("div",B,[e("div",E,[t[3]||(t[3]=e("label",{for:"player"},"Select a player",-1)),x(e("select",{id:"player","onUpdate:modelValue":t[0]||(t[0]=l=>r.selectedPlayerId=l),class:"form-control"},[(n(!0),d(g,null,_(o.stats,l=>(n(),d("option",{key:l.player.id,value:l.player.id,textContent:u(`${l.player.stylized_name||l.player.ign} (${l.team.name})`)},null,8,G))),128))],512),[[w,r.selectedPlayerId]])])]),e("div",A,[e("div",F,[t[4]||(t[4]=e("label",{for:"player"},"Select a stat",-1)),x(e("select",{id:"player","onUpdate:modelValue":t[1]||(t[1]=l=>r.statType=l),class:"form-control"},[(n(!0),d(g,null,_(s.$options.statTypes,(l,i)=>(n(),d("option",{key:i,value:i,textContent:u(l)},null,8,O))),128))],512),[[w,r.statType]])])])])]),t[11]||(t[11]=e("div",{class:"container"},[e("hr"),e("h2",{class:"h3 text-center"},"Image description")],-1)),e("div",q,[t[5]||(t[5]=e("p",{class:"mb-0"}," Copy this auto-generated description (aka. ALT text) and paste it into Twitter when posting the image. ",-1)),t[6]||(t[6]=e("p",null,[b(" Doing this makes our tweets accessible to more people ("),e("a",{href:"https://help.twitter.com/en/using-twitter/picture-descriptions",target:"_blank"},"how?"),b("). ")],-1)),e("input",{ref:"altcopy",class:"form-control",type:"text",value:a.altText,readonly:"",onClick:t[2]||(t[2]=(...l)=>a.copy&&a.copy(...l))},null,8,K)]),t[12]||(t[12]=e("div",{class:"container"},[e("hr"),e("h2",{class:"h3 text-center"},"Export preview")],-1)),e("div",M,[e("div",H,[a.selectedPlayerStats&&a.selectedPlayerStats.stats?(n(),d("div",W,[e("div",J,[(n(),d(g,null,_([1,2,3,4,5],l=>e("div",{key:l,class:"position-relative mb-2",style:{left:"-1.5rem",top:"-1.5rem",width:"200%"}},[(n(),d(g,null,_([1,2,3,4,5,6],i=>h(m,{key:i,class:"position-relative",style:z(`${l%2===0?"right":"left"}: 26.5px; margin-left: 17.5px; margin-right: 17.5px`),src:s.cdn_opt(("useImageUrl"in s?s.useImageUrl:p(v))(o.competitionLogo),{resize:140}),width:"70",alt:""},null,8,["style","src"])),64))])),64))]),e("div",Q,[h(m,{class:"pt-3",style:{width:"85%",filter:"drop-shadow(0 0 16px #101011dd)"},src:s.cdn_opt(("useImageUrl"in s?s.useImageUrl:p(v))(a.selectedPlayerStats.player.image_url),{resize:1e3}),"responsive-sizes":[1e3],alt:""},null,8,["src"])]),e("div",X,[e("div",Y,[e("div",Z,[h(m,{src:("useImageUrl"in s?s.useImageUrl:p(v))(a.selectedPlayerStats.team.logo_url),class:"w-3 p-1",alt:`Logo of ${a.selectedPlayerStats.team.name}`},null,8,["src","alt"]),e("div",ee,[e("div",te,u(a.selectedPlayerStats.player.stylized_name||a.selectedPlayerStats.player.ign),1),e("div",se,u(a.selectedPlayerStats.player.name),1)])]),e("div",ae,[e("div",le,[e("span",null,u(a.selectedPlayerStats.stats[r.statType]),1),a.showPercent?(n(),d("span",oe,"%")):S("",!0)]),e("div",re,u(s.$options.statTypes[r.statType]),1)]),e("div",ie,[e("div",ne,[e("span",null,u(a.selectedPlayerStats.stats.rating),1)]),t[7]||
1(t[7]=e("div",{class:"fs-sm text-muted"},"Rating",-1))])]),t[8]||(t[8]=e("div",{class:"bg-success mt-2 fs-2xs py-1 text-center text-uppercase",style:{"border-radius":"20px"}}," Visit Siege.GG for the full stats from the match! ",-1)),h(m,{class:"mt-3",src:"https://siege.gg/images/logo_white.svg",height:"10",alt:""})])])):S("",!0),t[9]||(t[9]=e("span",{class:"crop__marks"},[e("span",{class:"crop--tl"}),e("span",{class:"crop--tr"})],-1)),t[10]||(t[10]=e("span",{class:"crop__marks"},[e("span",{class:"crop--bl"}),e("span",{class:"crop--br"})],-1))])])]),_:1})}const de=Object.assign(P(L,[["render",ce],["__scopeId","data-v-89e98920"]]),{__name:"MatchesExporter"}),ye={__name:"exporter",async setup(s){let t,o;const{data:c}=([t,o]=T(()=>D(`matches/${encodeURIComponent(V().params.slug)}`)),t=await t,o(),t),{data:r}=([t,o]=T(()=>j(c.value.player_stats_url,"$ThWOIydb9F")),t=await t,o(),t);return(a,m)=>{const y=k,l=de;return n(),d("div",null,[h(y,{cms:"",match:p(c)},null,8,["match"]),h(l,{"competition-logo":p(c).competition.logo_url,title:p(c).competition_name,stats:Object.values(p(r).players).map(i=>({stats:i,player:p(c).players.find(f=>f.id===i.player_id)})).map(i=>({...i,team:p(c).rosters.find(f=>f.id===i.player.roster_id)}))},null,8,["competition-logo","title","stats"])])}}};export{ye as default};
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.