1import{c as D,b as c,d as r,e,h as E,D as O,t as d,f as C,r as b,C as B,s as F,F as M,j as A,ah as G,q as I,o as W,U as j,l as q,G as N,ai as U,n as R,v as X,g as $,A as z,E as Y}from"./index-62160fe5.js";import"./ko-edd02af8.js";import{_ as K}from"./Empty-a0cda5c7.js";const J="/assets/logo_League_emblem_kleague2-1b234be4.png",Q={class:"match-wrapper"},Z={class:"match-info-row"},ee={class:"team-box"},te=["src"],ae={class:"team-name"},se={class:"center-box"},oe={class:"league-info"},ie={class:"round-text"},ne={class:"team-box"},le=["src"],ce={class:"team-name"},re={class:"match-details"},de={class:"date-time"},me={key:0,class:"location"},_e={class:"home-badge"},ue={class:"badge-text"},pe={class:"field-name"},fe={__name:"LineupMatchInfo",props:{matchData:{type:Object}},setup(l){const _=l,m=D(()=>{if(!_.matchData.game_date)return"";const u=_.matchData.game_date.replace(/-/g,"."),s=_.matchData.yoil?` (${_.matchData.yoil}) `:" ";return`${u}${s}${_.matchData.game_time}`});return(u,s)=>(c(),r("div",Q,[e("div",Z,[e("div",ee,[e("img",{src:E(O)(l.matchData.home_team),alt:"home-team-emblem",class:"emblem-img"},null,8,te),e("div",ae,d(l.matchData.home_team_name),1)]),e("div",se,[e("div",oe,[s[0]||(s[0]=e("img",{class:"league-logo",src:J,width:"100",alt:"kleague2"},null,-1)),e("div",ie,d(l.matchData.game_type_name),1)]),s[1]||(s[1]=e("div",{class:"vs-text"},[e("span",null,"VS")],-1))]),e("div",ne,[e("img",{src:E(O)(l.matchData.away_team),alt:"away-team-emblem",class:"emblem-img"},null,8,le),e("div",ce,d(l.matchData.away_team_name),1)])]),e("div",re,[e("div",de,d(m.value),1),l.matchData.field_name?(c(),r("div",me,[e("div",_e,[e("span",ue,d(l.matchData.isHome?"H":"A"),1)]),e("span",pe,d(l.matchData.field_name),1)])):C("",!0)])]))}},he={class:"formation-wrapper"},ve={class:"formation-container"},ye={class:"pitch-border-wrap"},ge={class:"pitch-lines"},be={class:"player-unit-box"},xe={class:"player-icon"},$e={class:"back-no"},De={class:"player-name"},Pe={__name:"LineupFormation",props:{formations:{type:Array,default:()=>[]},isValidFormation:{type:Boolean,default:!1}},setup(l){const _=l,m=b([]),u=D(()=>{const o=m.value.find(a=>(a.POSITION_CODE||a.position_code)===1);return o?Number(o.xpos??o.XPOS??0)>50:!1}),s=D(()=>{const o={};return m.value.forEach(t=>{const a=Number(t.xpos??t.XPOS??0),n=Number(t.ypos??t.YPOS??0),f=t.position_code||t.POSITION_CODE;f!==1&&a===0&&n===0&&(o[f]||(o[f]=[]),o[f].push(t))}),Object.keys(o).forEach(t=>{o[t].sort((a,n)=>(a.player_formation_place||0)-(n.player_formation_place||0))}),m.value.map(t=>{const a=t.position_code||t.POSITION_CODE,n=Number(t.xpos??t.XPOS??0),f=Number(t.ypos??t.YPOS??0);let p=0,x=0;if(a!==1&&n===0&&f===0){const y=o[a],i=y.findIndex(h=>(h.id||h.player_id)===(t.id||t.player_id));x=95/(y.length+1)*(i+1)+2.2,u.value?a===2?p=35:a===3?p=65:a===4&&(p=87):a===2?p=60:a===3?p=35:a===4&&(p=10)}else{const y=f*.9+5;let i=0;u.value?a===1?i=15+(100-n)*.05:a===2?i=100-n+29:a===3?i=100-n+37:a===4&&(i=85):a===1?i=85-n*.05:a===2?i=75-n:a===3?i=65-n:a===4&&(i=20),p=Math.max(5,Math.min(95,i)),x=Math.max(5,Math.min(95,y))}return{name:t.player_name||"",no:t.back_no||"",position_code:t.position_code,top:`${p}%`,left:`${x}%`}})});return B(()=>_.formations,o=>{o&&o.length>0&&(m.value=o)},{immediate:!0}),(o,t)=>(c(),r("div",he,[t[4]||(t[4]=e("div",{class:"inner-title"},"í¬ë©ì´ì
",-1)),e("div",ve,[e("div",ye,[e("div",{class:F(["pitch",u.value?"top-side":"bottom-side"])},[e("div",ge,[t[0]||(t[0]=e("div",{class:"center-circle"},null,-1)),t[1]||(t[1]=e("div",{class:"penalty-arc"},null,-1)),t[2]||(t[2]=e("div",{class:"penalty-box"},null,-1)),t[3]||(t[3]=e("div",{class:"goal-box"},null,-1)),(c(!0),r(M,null,A(s.value,(a,n)=>(c(),r("div",{key:n,class:"player",style:G({top:a.top,left:a.left})},[e("div",be,[e("div",xe,[e("span",$e,d(a.no),1)]),e("div",De,d(a.name),1)])],4))),128))])],2)])])]))}},ke={class:"lineup-list-wrapper"},we={class:"inner-title"},Se={class:"player-grid"},Ee=["src","alt","onError"],Oe={key:1,class:"profile-placeholder"},Ie={class:"back-number"},Ne={class:"player-info"},Ve={class:"player-name"},Ce={key:0,class:"captain-mark"},Fe={class:"position-tag"},V={__name:"LineupList",props:{list:{type:Array,default:()=>[]},title:{type:String}},setup(l){const _=m=>{m.is_img_error=!0};return(m,u)=>
1(c(),r("div",ke,[e("div",we,d(l.title),1),e("div",Se,[(c(!0),r(M,null,A(l.list,(s,o)=>(c(),r("div",{key:o,class:"player-item"},[I(d(s.player_img)+" ",1),e("div",{class:F(["profile-img-wrap",{"is-error":!s.player_image_url||s.is_img_error}])},[s.player_image_url&&!s.is_img_error?(c(),r("img",{key:0,src:s.player_image_url,alt:s.player_name,class:"profile-img",onError:t=>_(s)},null,40,Ee)):(c(),r("div",Oe))],2),e("div",Ie,d(s.back_no),1),e("div",Ne,[e("div",Ve,[I(d(s.player_name),1),s.is_captain?(c(),r("span",Ce,"(c)")):C("",!0)]),e("div",Fe,d(s.position_name),1)])]))),128))])]))}},Me={class:"lineup-wrapper"},Ae={key:0},Le={key:1},je={__name:"Lineup",setup(l){const _=new z,m=Y(),u=b(!1),s=b({}),o=b([]),t=b(!1),a=b(!0),n=D(()=>o.value.filter(i=>i.position_name!=="ë기")),f=D(()=>o.value.filter(i=>i.position_name==="ë기"));W(()=>{u.value=j(m),u.value&&(document.body.style.backgroundColor="#F2F4F8",p()),y()}),q(()=>{document.body.style.backgroundColor="",x()});const p=()=>{if(window.innerWidth<=809){const i=document.querySelector(".content-page .content-div");i&&i.style.setProperty("padding","16px 16px 50px","important")}},x=()=>{const i=document.querySelector(".content-page .content-div");i&&i.style.removeProperty("padding")},y=async()=>{try{const P=`/api/schedule/${m.query.date}`,h=await _.getData(P);if(a.value=h&&h.data?h.data.success:!1){const k=h.data.data||{},v=k.match;if(t.value=k.isCorrectFormationData===!0,v){const g=!!(v.game_date&&v.game_date.trim()!=="")?N(`${v.game_date} ${v.game_time||"00:00:00"}`).locale("ko"):null,L=v.home_team==="K02";s.value={...v,yoil:g&&g.isValid()?g.format("ddd"):"-",game_time:g&&g.isValid()?g.format("HH:mm"):"-",isHome:L,type:"next"};const T=k.player||[],H=N().year();o.value=T.map(w=>{const S=w.player_id;return{...w,player_image_url:S?U(H,S):null}})}else s.value={type:"next"},o.value=[]}else s.value={type:"next"},o.value=[]}catch{s.value={type:"next"},o.value=[],t.value=!1}};return(i,P)=>(c(),r("div",Me,[e("section",null,[R($(fe,{matchData:s.value},null,8,["matchData"]),[[X,a.value]]),t.value?(c(),r("div",Ae,[$(Pe,{formations:n.value},null,8,["formations"]),$(V,{title:"ì ë°ëª
ë¨",list:n.value},null,8,["list"]),$(V,{title:"íë³´ëª
ë¨",list:f.value},null,8,["list"])])):(c(),r("div",Le,[$(K,{title:"í¬ë©ì´ì
ë°ì´í°ê° ììµëë¤.","margin-top":26})]))])]))}};export{je 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.