PageSourceSearch

https://www.sporttv.pt/_nuxt/BgYZHijt.js

js sporttv.pt collected 2026-10-01 11:28:07 UTC 29,055 bytes, 4 lines download raw bytes

1import{j as H,a as V,H as J,n as ie,O as s,P as l,u as e,a3 as C,Q as D,R as j,W as i,Y as p,X as h,U as P,a2 as R,V as L,Z as oe,k as E,ac as W,b as Z,a9 as re,aa as ce,ad as de,af as ue,ag as me}from"./cVuhXwai.js";import{_ as _e}from"./DvPr355l.js";import{k as z,a6 as pe,I as le,_ as Q,p as Y,ad as he,f as ye,E as ve,c as ge,n as fe}from"./CM_Wyx7H.js";import{_ as Te}from"./ColuIFyH.js";import{f as be}from"./B1l7X2wM.js";import{x as we,k as ne,y as ke,z as Se}from"./Dz0wZwKg.js";import{_ as ee}from"./DlAUqK2U.js";import{a as $e,_ as Me}from"./8B3Wg9e-.js";import{_ as Ae}from"./bgy5R2Cv.js";import{_ as Ce}from"./DG6wcU6u.js";const Ne={class:"relative h-fit"},Ee={class:"rounded-lg overflow-hidden"},Ie=["alt","src"],Le={class:"video-detail-new-hashtags new-video-label flex items-center absolute bottom-2 right-2"},Pe={class:"video-item-duration"},Re={class:"pl-2 flex flex-col gap-1"},Be={class:"related-video-title"},Oe={class:"related-video-duration"},Fe={key:0,class:"video-detail-hashtags"},Ve={key:1,class:"video-detail-hashtags"},De=["onClick"],Ge={key:0,class:"timeline-time"},He={class:C(["flex gap-1 items-center timeline-event-content"])},Ue=["src","alt"],je={class:"timeline-content justify-center"},xe={class:"timeline-title"},qe={key:0,class:"timeline-players"},We={key:0,class:"timeline-event-score"},ze={key:1,class:"timeline-event-score"},Ye={key:2,class:"flex-1"},Ke={class:"timeline"},Xe={key:0,class:"timeline-event home"},Qe={class:"home flex gap-2 items-center"},Je={class:"timeline-event-name"},Ze={class:"timeline-event-value"},et={key:1,class:"timeline-event home"},tt={class:"home flex gap-2 items-center"},st={class:"timeline-event-name"},at={class:"timeline-event-value"},ot=H({__name:"HighlightsTab",props:{event:{},isMobile:{type:Boolean},seekable:{type:Boolean}},emits:["seek-to-event"],setup(N,{emit:m}){const d=N,r=m,{getToken:f}=z(),A=o=>!!d.seekable&&!!o.time,g=o=>{A(o)&&r("seek-to-event",o)},a=V(null);V(void 0);const T=o=>{var w,S,k,$,t;switch((w=o.type)==null?void 0:w.toLowerCase()){case"yellow_card":return"/events/ic_yellow_card.svg";case"yellow_red_card":return"/events/ic_yellowred_card.svg";case"red_card":return"/events/ic_red_card.svg";case"substitution":return"/events/ic_substitution.svg";case"score_change":return o.method&&o.method.toLowerCase().includes("penalty")?"/events/ic_goal_penalty.svg":o.method&&o.method.toLowerCase().includes("own_goal")?"/events/ic_own_goal.png":"/events/ic_goal.svg";case"video_assistant_referee_over":return(S=o.varDescription)!=null&&S.includes("no_penalty")?
1"/events/ic_football_var_penalty_disallowed.svg":(k=o.varDescription)!=null&&k.includes("penalty")?
1"/events/ic_football_var_penalty_confirmed.svg":($=o.varDescription)!=null&&$.includes("no_goal")?
1"/events/ic_football_var_goal_cancelled.svg":(t=o.varDescription)
1!=null&&t.includes("goal")?"/events/ic_football_var_goal_confirmed.svg":"";case"penalty_shootout":return o.penaltyShootoutStatus==="missed"?"/events/ic_goal_penalty_not.svg":"/events/ic_goal_penalty.svg";default:return""}},n=o=>{var w,S,k,$,t;switch((w=o.type)==null?void 0:w.toLowerCase()){case"penalty_shootout":case"yellow_card":case"yellow_red_card":case"red_card":case"substitution":case"video_assistant_referee_over":return(S=o.varDescription)!=null&&S.includes("no_penalty")?f("GAME_EVENT_PENALTY_DISALLOWED"):(k=o.varDescription)!=null&&k.includes("penalty")?f("GAME_EVENT_PENALTY_CONFIRMED"):($=o.varDescription)!=null&&$.includes("no_goal")?f("GAME_EVENT_GOAL_DISALLOWED"):(t=o.varDescription)!=null&&t.includes("goal")?f("GAME_EVENT_GOAL_CONFIRMED"):"";case"score_change":return"";case"match_started":return f("GAMES_EVENT_GAME_START");case"match_ended":return f("GAMES_EVENT_GAME_END");case"period_score":if(o.period===1)return f("GAMES_EVENT_FIRST_HALF_END");case"break_start":return o.periodType==="awaiting_extra"?f("GAMES_EVENT_SECOND_HALF_END"):o.periodType==="extra_time_halftime"?f("GAMES_EVENT_FIRST_HALF_EXTRA_TIME_END"):o.periodType==="awaiting_penalties"||o.breakName==="awaiting_penalties"?f("GAMES_EVENT_PENALTIES_START"):o.breakName==="awaiting_extra"?f("GAMES_EVENT_SECOND_HALF_END"):o.breakName==="extra_time_halftime"?f("GAMES_EVENT_FIRST_HALF_EXTRA_TIME_END"):o.period===1||o.period===2?f("GAMES_EVENT_FIRST_HALF_END"):f("GAMES_EVENT_BREAK_START");default:return o.type||"Evento"}},c=()=>!d.event||!d.event.timeline?[]:d.event.timeline.filter((u,w)=>{if(u.type){const S=u.type.toLowerCase();let k=["match_started","score_change","substitution","yellow_card","red_card","yellow_red_card","video_assistant_referee_over","match_ended","penalty_shootout"].includes(S);return u.type.toLowerCase()==="period_start"&&u.period&&u.period!==1&&u.period!==2&&(k=!0),u.type.toLowerCase()==="break_start"&&(d.event&&d.event.timeline&&d.event.timeline[w+1]&&(u.period=d.event.timeline[w+1].period),k=!0),k}return!1}).reverse(),b=o=>[...o].sort((u,w)=>{var $,t;const S=(($=u.type)==null?void 0:$.toLowerCase())||"",k=((t=w.type)==null?void 0:t.toLowerCase())||"";return S.includes("substituted_in")?-1:k.includes("substituted_in")?1:S.includes("substituted_out")?-1:k.includes("substituted_out")?1:0});J(async()=>{await ie(),we(d.event).then(o=>{a.value=o})});function _(o){let u="";return o&&o.id&&o.slug&&(u="/videos/%1%/%2%/video/%3%/%4%",u=u.replace("%1%",String(o.slug)),u=u.replace("%2%",le(String(o.slug))),u=u.replace("%3%",String(o.id)),u=u.replace("%4%",le(String(o.slug))),u=u.replace("//","/")),u}return(o,u)=>{const w=_e,S=Q,k=Te,$=Q;return s(),l("div",null,[e(a)?(s(),l("div",{key:0,class:C(["highlight-video-section related-section",d.isMobile?"highlight-video-section--mobile":""])},[D($,{to:_(e(a)),class:"related-section-item"},{default:j(()=>[i("div",Ne,[i("div",Ee,[e(a).image?(s(),l("img",{key:0,alt:e(a).headline,src:e(a).image,class:"aspect-video max-w-[160px]"},null,8,Ie)):p("",!0),i("div",Le,[D(w,{"video-detail":e(a),class:"mr-2"},null,8,["video-detail"]),i("div",Pe,h(("formatDuration"in o?o.formatDuration:e(be))(e(a).duration)),1)])])]),D(k,null,{default:j(()=>[i("div",Re,[i("div",Be,h(e(a).headline),1),i("div",Oe,[i("span",null,h(o.$dayjs(e(a).date).fromNow()),1)]),e(a).smartMoment&&e(a).smartMoment.category&&e(a).smartMoment.type===o.MGCoreSmartMomentType.MANUAL?(s(),l("div",Fe,h(("getSmartMomentOwner"in o?o.getSmartMomentOwner:e(pe))(e(a).smartMoment)),1)):(s(),l("div",Ve,[(s(!0),l(P,null,R(e(a).tags,(t,y)=>(s(),L(S,{key:y,class:"video-duration-ref mr-1",to:`/pesquisa/${t}`},{default:j(()=>[oe(" #"+h(t),1)]),_:2},1032,["to"]))),128))]))])]),_:1})]),_:1},8,["to"])],2)):p("",!0),o.event.timeline&&o.event.timeline.length>0?(s(),l("div",{key:1,class:C(["timeline",d.isMobile?"timeline--mobile":""])},[(s(!0),l(P,null,R(c(),(t,y)=>(s(),l("div",{key:y,class:C(["timeline-event",t.competitor,A(t)?"timeline-event-seekable":""]),onClick:v=>g(t)},[i("div",{class:C([t.competitor,"flex-1"])},[t.competitor&&t.matchTime?(s(),l("div",Ge,h(`${t.matchTime}${t.stoppageTime?`+${t.stoppageTime}`:""}`)+"'",1)):p("",!0),i("div",He,[T(t)?(s(),l("img",{key:0,class:"timeline-icon",src:T(t),alt:t.type}
1,null,8,Ue)):p("",!0),i("div",je,[i("div",xe,h(n(t)),1),t.players&&t.players.length>0?(s(),l("div",qe,[(s(!0),l(P,null,R(b(t.players),(v,M)=>(s(),L($,{to:("getLinkToPlayer"in o?o.getLinkToPlayer:e(ne))(v),key:`player-${M}-${t.id}`,class:C([`timeline-player-${M}`,"timeline-player"])},{default:j(()=>[oe(h(v.name),1)]),_:2},1032,["to","class"]))),128))])):p("",!0)])])],2),t.competitor&&t.type==="score_change"?(s(),l("div",We,[i("span",null,h(`${t.homeScore}-${t.awayScore}`),1)])):t.competitor&&t.type==="penalty_shootout"&&t.penaltyShootoutStatus==="scored"?(s(),l("div",ze,[i("span",null,h(`${t.shootoutHomeScore}-${t.shootoutAwayScore}`),1)])):p("",!0),t.competitor&&(t.type==="score_change"||t.type==="penalty_shootout")?(s(),l("div",Ye)):p("",!0)],10,De))),128))],2)):p("",!0),i("div",Ke,[o.event.referee?(s(),l("div",Xe,[i("div",Qe,[i("div",Je,h(e(f)("Árbitro: ")),1),i("div",Ze,h(o.event.referee),1)])])):p("",!0),o.event.venue?(s(),l("div",et,[i("div",tt,[i("div",st,h(e(f)("Estádio: ")),1),i("div",at,h(o.event.venue),1)])])):p("",!0)])])}}}),lt={key:0,class:"match-statistics"},it={class:"stat-value home"},nt={class:"stat-bar-container"},rt={class:"stat-label"},ct={class:"stat-bar"},dt={class:"stat-value away"},ut=H({__name:"MGMatchStatistics",props:{localTeamStatistics:{},visitorTeamStatistics:{},localTeam:{},visitorTeam:{}},setup(N){const m=N,d=E(()=>{var c;return((c=m.localTeam)==null?void 0:c.teamColour)||"#FDEA00"}),r=E(()=>{var c;return((c=m.visitorTeam)==null?void 0:c.teamColour)||"#FDEA00"}),f={ballPossession:{label:"Posse de Bola",isPercentage:!0},shotsTotal:{label:"Total Remates",isPercentage:!1},shotsOnTarget:{label:"Remates à Baliza",isPercentage:!1},shotsOffTarget:{label:"Remates para Fora",isPercentage:!1},shotsBlocked:{label:"Remates Intercetados",isPercentage:!1},shotsSaved:{label:"Defesas",isPercentage:!1},cornerKicks:{label:"Cantos",isPercentage:!1},freeKicks:{label:"Livres",isPercentage:!1},goalKicks:{label:"Pontapés de Baliza",isPercentage:!1},throwIns:{label:"Lançamentos Laterais",isPercentage:!1},fouls:{label:"Faltas",isPercentage:!1},offsides:{label:"Foras de Jogo",isPercentage:!1},yellowCards:{label:"Cartões Amarelos",isPercentage:!1},redCards:{label:"Cartões Vermelhos",isPercentage:!1},yellowRedCards:{label:"Duplo Amarelo",isPercentage:!1},substitutions:{label:"Substituições",isPercentage:!1},injuries:{label:"Lesões",isPercentage:!1},cardsGiven:{label:"Cartões Exibidos",isPercentage:!1}},A=E(()=>m.localTeamStatistics||m.visitorTeamStatistics),g=E(()=>{const c=[],b=new Set;return m.localTeamStatistics&&Object.keys(m.localTeamStatistics).forEach(_=>{b.add(_)}),m.visitorTeamStatistics&&Object.keys(m.visitorTeamStatistics).forEach(_=>{b.add(_)}),b.forEach(_=>{var w,S;const o=(w=m.localTeamStatistics)==null?void 0:w[_],u=(S=m.visitorTeamStatistics)==null?void 0:S[_];if(o!==void 0||u!==void 0){const k=f[_];k&&c.push({key:_,label:k.label,isPercentage:k.isPercentage})}}),c}),a=(c,b)=>{var o,u;return(b==="home"?(o=m.localTeamStatistics)==null?void 0:o[c]:(u=m.visitorTeamStatistics)==null?void 0:u[c])||0},T=(c,b)=>{const _=a(c,"home"),o=a(c,"away");return b==="home"?_>=o:o>_},n=(c,b,_)=>{if(_)return a(c,b);const o=a(c,"home"),u=a(c,"away"),w=o+u;return w===0?0:(b==="home"?o:u)/w*100};return(c,b)=>e(A)?(s(),l("div",lt,[(s(!0),l(P,null,R(e(g),_=>(s(),l("div",{key:_.key,class:"stat-row"},[i("div",it,h(a(_.key,"home"))+h(_.isPercentage?"%":""),1),i("div",nt,[i("div",rt,h(_.label),1),i("div",ct,[i("div",{class:C(["stat-bar-fill home",{"has-lead":T(_.key,"home")}]),style:W({width:`${n(_.key,"home",_.isPercentage)}%`,background:e(d)})},null,6),i("div",{class:C(["stat-bar-fill away",{"has-lead":T(_.key,"away")}]),style:W({width:`${n(_.key,"away",_.isPercentage)}%`,background:e(r)})},null,6)])]),i("div",dt,h(a(_.key,"away"))+h(_.isPercentage?"%":""),1)]))),128))])):p("",!0)}}),mt=ee(ut,[["__scopeId","data-v-fedcde37"]]),_t=H({__name:"StatisticsTab",props:{event:{}},setup(N){return(m,d)=>{const r=mt;return s(),l("div",null,[D(r,{"local-team-statistics":m.event.localTeamStatistics,"visitor-team-statistics":m.event.visitorTeamStatistics,"local-team":m.event.localTeam,"visitor-team":m.event.visitorTeam},null,8,["local-team-statistics","visitor-team-statistics","local-team","visitor-team"])])}}}),pt=Y("/events/ic_yellow_card.svg"),ht=Y("/events/ic_yellowred_card.svg"),yt=Y("/events/ic_goal.svg"),vt=Y("/events/ic_substitution.svg"),gt=["src"],ft={key:2,class:"absolute top-0 left-0 flex items-center gap-0.5"},Tt={key:0,class:"event-indicator bg-white rounded-full"},bt={key:0,class:"event-count"},wt={key:1,class:"event-indicator bg-white rounded-full"},kt={key:2,class:"event-indicator bg-white rounded-full"},St={key:0,class:"event-count"},$t={key:4,class:"absolute bottom-0 left-0 event-indicator bg-white rounded-full"},Mt={class:"flex flex-col"},At={class:"player-name bodyNormalBold break-words"},Ct={key:0,class:"player-position bodySmallRegular"},Nt=H({__name:"BenchPlayerItem",props:{player:{},teamColor:{},hasPhotos:{type:Boolean},alignRight:{type:Boolean},isStarter:{type:Boolean},isFormation:{type:Boolean}},setup(N){const{getToken:m}=z(),d=N,r=E(()=>he(d.teamColor)?"#000000E5":"#FFFFFF"),f=E(()=>{var a,T,n;return!!((a=d.player.playerEvents)!=null&&a.yellowCards||(T=d.player.playerEvents)!=null&&T.yellowRedCards||(n=d.player.playerEvents)!=null&&n.redCards)}),A=E(()=>{var a,T;return!!((a=d.player.playerEvents)!=null&&a.goals||(T=d.player.playerEvents)!=null&&T.ownGoals)}),g=E(()=>{var a,T;return(((a=d.player.playerEvents)==null?void 0:a.goals)||0)+(((T=d.player.playerEvents)==null?void 0:T.ownGoals)||0)});return(a,T)=>{const n=Q;return s(),L(n,{to:("getLinkToPlayer"in a?a.getLinkToPlayer:e(ne))(a.player),class:"bench-player relative w-full"},{default:j(()=>{var c,b,_,o;return[i("div",{class:C(`relative h-fit ${d.isFormation?"w-fit mx-auto":""}`)},[a.player.image&&a.hasPhotos?(s(),l("img",{key:0,src:a.player.image,alt:"Player Photo",class:"player-photo",style:W(`border-color: ${a.teamColor} !important`)},null,12,gt)):(s(),l("span",{key:1,class:"player-number bodyNormalBold",style:W(`background: ${a.teamColor}; color: ${e(r)}`)},h(a.player.shirtNumber),5)),e(f)?(s(),l("div",ft,[(c=a.player.playerEvents)!=null&&c.yellowCards?(s(),l("div",Tt,[i("img",{src:pt,alt:"Yellow Card",class:C(a.isFormation?"w-4 h-4":"w-3 h-3")},null,2),a.player.playerEvents.yellowCards>1?(s(),l("span",bt,h(a.player.playerEvents.yellowCards),1)):p("",!0)])):p("",!0),(b=a.player.playerEvents)!=null&&b.yellowRedCards?(s(),l("div",wt,[i("img",{src:ht,alt:"Yellow-Red Card",class:C(a.isFormation?"w-4 h-4":"w-3 h-3")},null,2)])):p("",!0),(_=a.player.playerEvents)!=null&&_.redCards?(s(),l("div",kt,[i("img",{src:$e,alt:"Red Card",class:C(a.isFormation?"w-4 h-4":"w-3 h-3")},null,2)])):p("",!0)])):p("",!0),e(A)?(s(),l("div",{key:3,class:"absolute top-0 right-0 event-indicator bg-white rounded-l-full rounded-r-[30px] flex gap-0.5 items-center",style:W(e(g)>1?`border-top-right-radius: 2px;
2    border-bottom-right-radius: 2px;
3    border-top-left-radius: 8px;
4    border-bottom-left-radius: 8px;padding-left: 2px`:"border-radius: 50%")},[e(g)>1?(s(),l("span",St,h(e(g)),1)):p("",!0),i("img",{src:yt,alt:"Goal",class:C(a.isFormation?"w-4 h-4":"w-3 h-3")},null,2)],4)):p("",!0),(o=a.player.playerEvents)!=null&&o.wasSubstituted?(s(),l("div",$t,[i("img",{src:vt,alt:"Substitution",class:C(a.isFormation?"w-4 h-4":"w-3 h-3")},null,2)])):p("",!0)],2),i("div",Mt,[i("span",At,h(a.player.image&&a.hasPhotos&&a.player.shirtNumber?`${a.player.shirtNumber}. `:"")+h(a.player.shortName||a.player.name),1),a.isFormation?p("",!0):(s(),l("span",Ct,h(e(m)("PLAYER_POSITION_"+a.player.playerType)),1))])]}),_:1},8,["to"])}}}),Et=ee(Nt,[["__scopeId","data-v-960804ac"]]),It=N=>(re("data-v-cb961133"),N=N(),ce(),N),Lt={key:0,class:"loading-state"},Pt=It(()=>i("div",{class:"spinner"},null,-1)),Rt=[Pt],Bt={key:1,class:"error-state"},Ot={class:"error-text bodyLargeBold"},Ft={class:"error-message bodyNormalRegular"},Vt={key:2,class:"empty-state"},Dt={class:"empty-text bodyLargeBold"},Gt={key:3,class:"lineups-content"},Ht={class:"formation-header"},Ut={key:0,class:"team-formation"},jt={class:"flex gap-1"},xt=["src","alt"],qt={class:"team-name bodyNormalBold"},Wt={key:0,class:"formation bodyNormalRegular"},zt={key:1,class:"team-formation away"},Yt={class:"flex gap-1"},Kt={class:"team-name bodyNormalBold"},Xt=["src","alt"],Qt={key:0,class:"formation bodyNormalRegular"},Jt={key:0,class:"football-field"},Zt={key:0,class:"team-side home-team"},es={key:1,class:"team-side away-team"},ts={key:1,class:"bench-section"},ss={class:"section-heading"},as={class:"headingMobileTitle03"},os={class:"bench-rows"},ls={class:"bench-player-cell bench-player-cell--home"},is={class:"bench-player-cell bench-player-cell--away"},ns={class:"bench-section"},rs={class:"section-heading"},cs={class:"headingMobileTitle03"},ds={class:"bench-rows"},us={class:"bench-player-cell bench-player-cell--home"},ms={class:"bench-player-cell bench-player-cell--away"},_s={key:2,class:"coaches-section"},ps={class:"section-heading"},hs={class:"headingMobileTitle03"},ys={class:"coaches-row"},vs={class:"coach-cell coach-cell--home"},gs={key:0,class:"coach-name bodyNormalBold"},fs={class:"coach-cell coach-cell--away"},Ts={key:0,class:"coach-name bodyNormalBold"},bs=H({__name:"LineupsTab",props:{eventId:{},isMobile:{type:Boolean}},setup(N){const{getToken:m}=z(),d=N,r=V(null),f=V(!0),A=V(""),g=async()=>{f.value=!0,A.value="";try{const t=await ke(d.eventId);t&&t.awayTeam&&t.awayTeam.team!==null&&t.homeTeam&&t.homeTeam.team!==null&&(r.value=t)}catch(t){console.error("Error loading lineups:",t),A.value=t.message||m("MATCH_FORMATIONS_ERROR")}finally{f.value=!1}},a=t=>
4t?t.split("-").map(v=>parseInt(v,10)).filter(v=>!isNaN(v)):void 0,T=(t,y)=>{if(!t||t.length===0)return null;const v=a(y),M={goalkeeper:t[0]||null,formation:[]};if(!v)return null;let B=1;for(let O=0;O<v.length;O++){const U=v[O],G=[];for(let F=0;F<U;F++)B<t.length&&(G.push(t[B]),B++);M.formation.push(G)}return M},n=E(()=>{var t,y,v,M;return T((y=(t=r.value)==null?void 0:t.homeTeam)==null?void 0:y.starters,(M=(v=r.value)==null?void 0:v.homeTeam)==null?void 0:M.formation)}),c=E(()=>{var t,y,v,M;return T((y=(t=r.value)==null?void 0:t.awayTeam)==null?void 0:y.starters,(M=(v=r.value)==null?void 0:v.awayTeam)==null?void 0:M.formation)}),b=E(()=>{var t,y,v;return(v=(y=(t=r.value)==null?void 0:t.homeTeam)==null?void 0:y.team)==null?void 0:v.teamColour}),_=E(()=>{var t,y,v;return(v=(y=(t=r.value)==null?void 0:t.awayTeam)==null?void 0:y.team)==null?void 0:v.teamColour});J(()=>{g()}),Z(()=>d.eventId,()=>{g()});const o=t=>{if(!t||!t.team||!t.team.id)return!1;const{getSetting:y}=ye();return(y("football_photos_lineups_team_ids")||"").split(",").includes(t.team.id)},u=t=>{if(!t)return[];const y={G:1,D:2,M:3,A:4};return[...t].sort((v,M)=>{if(!v.playerType||!M.playerType)return 0;const B=y[v.playerType]||99,O=y[M.playerType]||99;return B!==O?B-O:0})},w=E(()=>{var t,y;return u((y=(t=r.value)==null?void 0:t.homeTeam)==null?void 0:y.bench)}),S=E(()=>{var t,y;return u((y=(t=r.value)==null?void 0:t.awayTeam)==null?void 0:y.bench)}),k=E(()=>{var t,y;return u((y=(t=r.value)==null?void 0:t.homeTeam)==null?void 0:y.starters)}),$=E(()=>{var t,y;return u((y=(t=r.value)==null?void 0:t.awayTeam)==null?void 0:y.starters)});return(t,y)=>{var M,B,O,U,G,F,K,te,se,ae;const v=Et;return s(),l("div",{class:C(["lineups-tab",t.isMobile?"lineups-tab--mobile":""])},[e(f)?(s(),l("div",Lt,Rt)):e(A)?(s(),l("div",Bt,[i("div",Ot,h(e(m)("MATCH_FORMATIONS_ERROR")),1),i("div",Ft,h(e(A)),1)])):!e(r)||!e(r).homeTeam&&!e(r).awayTeam?(s(),l("div",Vt,[i("div",Dt,h(e(m)("MATCH_FORMATIONS_EMPTY")),1)])):(s(),l("div",Gt,[i("div",Ht,[e(r).homeTeam?(s(),l("div",Ut,[i("div",jt,[(M=e(r).homeTeam.team)!=null&&M.logoImageUrl?(s(),l("img",{key:0,src:e(r).homeTeam.team.logoImageUrl,class:"team-logo",alt:(B=e(r).homeTeam.team)==null?void 0:B.name},null,8,xt)):p("",!0),i("span",qt,h((O=e(r).homeTeam.team)==null?void 0:O.name),1)]),e(r).homeTeam.formation?(s(),l("span",Wt,h(e(r).homeTeam.formation),1)):p("",!0)])):p("",!0),e(r).awayTeam?(s(),l("div",zt,[i("div",Yt,[i("span",Kt,h((U=e(r).awayTeam.team)==null?void 0:U.name),1),(G=e(r).awayTeam.team)!=null&&G.logoImageUrl?(s(),l("img",{key:0,src:e(r).awayTeam.team.logoImageUrl,class:"team-logo",alt:(F=e(r).awayTeam.team)==null?void 0:F.name},null,8,Xt)):p("",!0)]),e(r).awayTeam.formation?(s(),l("span",Qt,h(e(r).awayTeam.formation),1)):p("",!0)])):p("",!0)]),e(n)&&e(c)?(s(),l("div",Jt,[e(n)?(s(),l("div",Zt,[i("div",null,[e(n).goalkeeper?(s(),l("div",{key:`home-gk-${e(n).goalkeeper.id}`,class:"player-position lg:flex-1"},[D(v,{player:e(n).goalkeeper,"team-color":e(b),"has-photos":o(e(r).homeTeam),"is-formation":!0},null,8,["player","team-color","has-photos"])])):p("",!0)]),(s(!0),l(P,null,R(e(n).formation,(x,I)=>(s(),l("div",{key:`home-col-${I}`,class:C(t.isMobile?"flex flex-row justify-around items-center w-full":"flex flex-row lg:flex-col-reverse lg:flex-1 justify-around items-center lg:h-full lg:min-h-[500px] w-full")},[(s(!0),l(P,null,R(x,(q,X)=>(s(),l("div",{key:`home-${q.id}-${I}-${X}`,class:"player-position"},[D(v,{player:q,"team-color":e(b),"has-photos":o(e(r).homeTeam),"is-formation":!0},null,8,["player","team-color","has-photos"])]))),128))],2))),128))])):p("",!0),e(c)?(s(),l("div",es,[i("div",null,[e(c).goalkeeper?(s(),l("div",{key:`away-gk-${e(c).goalkeeper.id}`,class:"player-position lg:flex-1"},[D(v,{player:e(c).goalkeeper,"team-color":e(_),"has-photos":o(e(r).awayTeam),"is-formation":!0},null,8,["player","team-color","has-photos"])])):p("",!0)]),(s(!0),l(P,null,R(e(c).formation,(x,I)=>(s(),l("div",{key:`away-col-${I}`,class:C(t.isMobile?"flex flex-row-reverse justify-around items-center w-full":"flex flex-row-reverse lg:flex-col lg:flex-1 justify-around items-center lg:h-full lg:min-h-[500px] w-full")},[(s(!0),l(P,null,R(x,(q,X)=>(s(),l("div",{key:`away-${q.id}-${I}-${X}`,class:"player-position"},[D(v,{player:q,"team-color":e(_),"has-photos":o(e(r).awayTeam),"is-formation":!0},null,8,["player","team-color","has-photos"])]))),128))],2))),128))])):p("",!0)])):(s(),l("div",ts,[i("div",ss,[i("span",as,h(e(m)("MATCH_FORMATIONS_STARTERS")),1)]),i("div",os,[(s(!0),l(P,null,R(Math.max(e(k).length,e($).length),(x,I)=>(s(),l("div",{key:`starters-row-${I}`,class:"bench-row"},[i("div",ls,[e(k)[I]?(s(),L(v,{key:0,player:e(k)[I],"team-color":e(b),"has-photos":o(e(r).homeTeam),"is-starter":!0},null,8,["player","team-color","has-photos"])):p("",!0)]),i("div",is,[e($)[I]?(s(),L(v,{key:0,player:e($)[I],"team-color":e(_),"has-photos":o(e(r).awayTeam),"align-right":!0,"is-starter":!0},null,8,["player","team-color","has-photos"])):p("",!0)])]))),128))])])),i("div",ns,[i("div",rs,[i("span",cs,h(e(m)("MATCH_FORMATIONS_BENCH")),1)]),i("div",ds,[(s(!0),l(P,null,R(Math.max(e(w).length,e(S).length),(x,I)=>(s(),l("div",{key:`bench-row-${I}`,class:"bench-row"},[i("div",us,[e(w)[I]?(s(),L(v,{key:0,player:e(w)[I],"team-color":e(b),"has-photos":o(e(r).homeTeam),"is-starter":!1},null,8,["player","team-color","has-photos"])):p("",!0)]),i("div",ms,[e(S)[I]?(s(),L(v,{key:0,player:e(S)[I],"team-color":e(_),"has-photos":o(e(r).awayTeam),"align-right":!0,"is-starter":!1},null,8,["player","team-color","has-photos"])):p("",!0)])]))),128))])]),(K=e(r).homeTeam)!=null&&K.coach||(te=e(r).awayTeam)!=null&&te.coach?(s(),l("div",_s,[i("div",ps,[i("span",hs,h(e(m)("MATCH_FORMATIONS_COACHES")),1
4)]),i("div",ys,[i("div",vs,[(se=e(r).homeTeam)!=null&&se.coach?(s(),l("span",gs,h(e(r).homeTeam.coach.name),1)):p("",!0)]),i("div",fs,[(ae=e(r).awayTeam)!=null&&ae.coach?(s(),l("span",Ts,h(e(r).awayTeam.coach.name),1)):p("",!0)])])])):p("",!0)]))],2)}}}),ws=ee(bs,[["__scopeId","data-v-cb961133"]]),ks={class:"p-2"},Ss={key:0,class:"loading-state"},$s=i("div",{class:"spinner"},null,-1),Ms=[$s],As={key:2,class:"empty-state"},Cs=i("div",{class:"empty-text"},"Nenhum vídeo disponível",-1),Ns=[Cs],Es=H({__name:"VideosTab",props:{eventId:{},isMobile:{type:Boolean}},setup(N){const m=N,d=V([]),r=V(!0),f=V(null),A=async()=>{if(m.eventId){r.value=!0;try{const{$repositories:g}=ve(),a=await g.videosRepository.getFixtureById(m.eventId);a&&a.content&&(d.value=a.content,f.value={display_name:a.name,id:m.eventId,name:a.name,slug:a.name,image:a.image,position:a.position})}catch(g){console.error("Error loading fixture videos:",g)}finally{r.value=!1}}};return J(async()=>{await ie(),A()}),(g,a)=>{const T=Ae;return s(),l("div",ks,[e(r)?(s(),l("div",Ss,Ms)):e(d).length>0?(s(),l("div",{key:1,class:C(m.isMobile?"grid grid-cols-2 gap-x-4 gap-y-6":"grid grid-cols-2 xl:grid-cols-3 gap-x-4 gap-y-6")},[(s(!0),l(P,null,R(e(d),n=>(s(),L(T,{key:n.id,video:n,playlist:e(f),"ai-generated":!1},null,8,["video","playlist"]))),128))],2)):e(r)?p("",!0):(s(),l("div",As,Ns))])}}}),Is={class:"p-2"},Ls={key:0,class:"loading-state"},Ps=i("div",{class:"spinner"},null,-1),Rs=[Ps],Bs={key:1,class:"h2h-events-list flex flex-col gap-4"},Os={class:"h2h-group-header"},Fs={key:0,class:"h2h-group-title"},Vs={class:"flex items-center gap-2"},Ds=["src"],Gs={class:"h2h-group-subtitle"},Hs={class:"flex flex-col gap-2 mt-2"},Us={key:2,class:"empty-state"},js=i("div",{class:"empty-text"},"Histórico não disponível",-1),xs=[js],qs=H({__name:"HeadToHeadTab",props:{localTeamId:{},visitorTeamId:{}},setup(N){const m=N,d=V([]),r=V(!1),f=E(()=>{const g={};return d.value.forEach(a=>{var u,w,S,k,$,t;const T=((u=a.competition)==null?void 0:u.logoImageUrl)||"",n=((w=a.competition)==null?void 0:w.name)||"Sem Competição",c=((S=a.season)==null?void 0:S.year)||((k=a.season)==null?void 0:k.name)||"Sem Temporada",b=(($=a.competition)==null?void 0:$.id)||"no-competition",_=((t=a.season)==null?void 0:t.id)||"no-season",o=`${b}_${_}`;g[o]||(g[o]={competitionLogo:T,competitionName:n,seasonName:c,events:[],sortKey:`${n}_${c}`}),g[o].events.push(a)}),Object.values(g).forEach(a=>{a.events.sort((T,n)=>{const c=T.date?parseInt(T.date):0;return(n.date?parseInt(n.date):0)-c})}),Object.entries(g).sort(([,a],[,T])=>{const n=T.seasonName.localeCompare(a.seasonName);return n!==0?n:a.competitionName.localeCompare(T.competitionName)}).reduce((a,[T,n])=>(a[T]=n,a),{})}),A=async()=>{if(!(!m.localTeamId||!m.visitorTeamId)){r.value=!0;try{const g=[m.localTeamId,m.visitorTeamId],a=await Se(g);d.value=a}catch(g){console.error("Error loading h2h events:",g)}finally{r.value=!1}}};return Z(()=>[m.localTeamId,m.visitorTeamId],()=>{A()},{immediate:!0}),(g,a)=>{const T=Me;return s(),l("div",Is,[e(r)?(s(),l("div",Ls,Rs)):e(d).length>0?(s(),l("div",Bs,[(s(!0),l(P,null,R(e(f),(n,c)=>(s(),l("div",{key:c,class:"h2h-group"},[i("div",Os,[n.seasonName?(s(),l("span",Fs,h(n.seasonName),1)):p("",!0),i("div",Vs,[n.competitionLogo?(s(),l("img",{key:0,src:n.competitionLogo,width:"20",height:"20",class:"bg-contain w-4 h-4 inline-block"},null,8,Ds)):p("",!0),i("h3",Gs,h(n.competitionName),1)])]),i("div",Hs,[(s(!0),l(P,null,R(n.events,b=>(s(),L(T,{key:b.id,event:b,h2h:!0,class:"match-card-container event-item"},null,8,["event"]))),128))])]))),128))])):(s(),l("div",Us,xs))])}}}),Ws={class:"match-tabs-view"},zs={class:"match-tabs"},Ys=["onClick"],Ks={class:"match-content"},ia=H({__name:"MatchTabsView",props:{event:{},syncWithUrl:{type:Boolean,default:!1},defaultTab:{default:"destaques"},isLive:{type:Boolean,default:!1},isMobile:{type:Boolean,default:!1},seekable:{type:Boolean,default:!1}},emits:["seek-to-event"],setup(N,{emit:m}){const d=N,r=m,{getToken:f}=z(),A=ge(),g=V(d.defaultTab),a=E(()=>{var c;const n=[{id:"destaques",name:f("GAMES_TAB_DESTAQUES"),value:"destaques"}
4,{id:"estatisticas",name:f("GAMES_TAB_ESTATISTICAS"),value:"estatisticas"},{id:"formacoes",name:f("GAMES_TAB_FORMACOES"),value:"formacoes"},{id:"videos",name:f("GAMES_TAB_VIDEOS"),value:"videos"}];return(c=d.event.season)!=null&&c.hasStandings&&n.push({id:"classificacao",name:f("GAMES_TAB_CLASSIFICACAO"),value:"standings"}),n.push({id:"historico",name:f("GAMES_TAB_HISTORICO"),value:"historico"}),n});if(d.syncWithUrl){const n=A.query.tab;n&&a.value.some(c=>c.value===n)&&(g.value=n)}function T(n){g.value=n,d.syncWithUrl&&fe({query:{...A.query,tab:n}})}return d.syncWithUrl&&Z(()=>A.query.tab,n=>{n&&typeof n=="string"&&a.value.some(c=>c.value===n)?g.value=n:n||(g.value=d.defaultTab)}),(n,c)=>{var t,y,v,M,B,O,U,G;const b=ue,_=me,o=ot,u=_t,w=ws,S=Es,k=Ce,$=qs;return s(),l("div",Ws,[i("div",zs,[D(_,{"slides-per-view":"auto",class:"tabs-swiper",navigation:"",modules:["SwiperNavigation"in n?n.SwiperNavigation:e(de)]},{default:j(()=>[(s(!0),l(P,null,R(e(a),F=>(s(),L(b,{key:F.id,class:"tab-slide"},{default:j(()=>[i("button",{onClick:K=>T(F.value),class:C(["tab-button",{active:e(g)===F.value}])},h(F.name),11,Ys)]),_:2},1024))),128))]),_:1},8,["modules"])]),i("div",Ks,[e(g)==="destaques"?(s(),L(o,{key:0,event:n.event,"is-mobile":d.isMobile,seekable:d.seekable,onSeekToEvent:c[0]||(c[0]=F=>r("seek-to-event",F))},null,8,["event","is-mobile","seekable"])):e(g)==="estatisticas"?(s(),L(u,{key:1,event:n.event},null,8,["event"])):e(g)==="formacoes"?(s(),L(w,{key:2,"event-id":String(n.event.id),"is-mobile":d.isMobile},null,8,["event-id","is-mobile"])):e(g)==="videos"?(s(),L(S,{key:3,"event-id":String(n.event.id),"is-mobile":d.isMobile},null,8,["event-id","is-mobile"])):e(g)==="standings"?(s(),L(k,{key:4,"competition-id":(t=n.event.competition)!=null&&t.id?String((y=n.event.competition)==null?void 0:y.id):void 0,"local-team-id":(v=n.event.localTeam)!=null&&v.id?String((M=n.event.localTeam)==null?void 0:M.id):void 0,"visitor-team-id":(B=n.event.visitorTeam)!=null&&B.id?String((O=n.event.visitorTeam)==null?void 0:O.id):void 0,"is-live":n.isLive,compact:n.isMobile},null,8,["competition-id","local-team-id","visitor-team-id","is-live","compact"])):e(g)==="historico"?(s(),L($,{key:5,"local-team-id":String((U=n.event.localTeam)==null?void 0:U.id),"visitor-team-id":String((G=n.event.visitorTeam)==null?void 0:G.id)},null,8,["local-team-id","visitor-team-id"])):p("",!0)])])}}});export{ia as _};

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.