@golstats/lilini-player-detection 1.0.11 → 1.0.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -17,4 +17,4 @@
17
17
  <div class="custom-tooltip-apexchart">
18
18
  <div class="__title">${Number.isNaN(v[b])?"N/A":`${Math.floor(v[b])}%`}</div>
19
19
  </div>
20
- `}}}));e.watch(()=>o.players,(m,g)=>{m&&m.length?(i.value=m.map(b=>({...b,statsGraph:[]})),l.value):r.value=[]},{immediate:!0,deep:!0});let p=[];async function y(m=!1){try{const g=i.value.map(O=>O.objeto_player?O.objeto_player.player_id||O.objeto_player.id:O.id||O.player_id),b=`https://4j4nfvoh0d.execute-api.us-east-2.amazonaws.com/prod/users/${o.userId}/in-followed/stats?months=6`,S={players:g,tournament_id_for_max_value:0};if(p.length===g.length&&p.every(O=>g.includes(O))||(p=[...g]),o.customCategories)S.variables=l.value.productivityFilters.reduce((O,z)=>{if(z.isSelected){const G={...z};delete G.isSelected,O.push(G)}return O},[]);else if(o.dynamicCategories&&l.value){const O=[];S.categories=l.value.productivityFilters.reduce((z,G)=>{if(G.isSelected){O.push(...G.id);const D={ids:G.id,name:G.name};G.parameters&&(D.parameters={...G.parameters}),z.push(D)}return z},[])}if(!S.variables&&!S.categories)return;const v=JSON.stringify(S),q=await(await fetch(b,{method:"PUT",headers:{Authorization:o.token},body:v})).json();u(q,!!l.value)}catch(g){console.error("Error",g)}}function u(m,g=!1){const b={...m};if(!b.max||!b.data)return;if(g){const q=new Map,O=Object.entries(b.data).reduce((z,[G,D],H)=>{const V={playerId:G,categoriesByName:new Map};return D.forEach(w=>{const P=V.categoriesByName.get(w[1]),R=q.get(w[1]);if(P){if(P.categoriesIds.push(w[0]),P.categoriesIds.sort(),P.totals.push(w[2]),H===0&&R){const Z=b.max.find(J=>J[0]===w[0]);Z&&(R.categoriesIds.push(w[0]),R.categoriesIds.sort(),R.max.push(Z[1]))}}else if(V.categoriesByName.set(w[1],{categoriesIds:[w[0]],totals:[w[2]]}),H===0){const Z=b.max.find(J=>J[0]===w[0]);Z&&q.set(w[1],{categoriesIds:[w[0]],max:[Z[1]]})}}),z.push(V),z},[]);b.data=O.reduce((z,G)=>{const D=[];return G.categoriesByName.forEach((H,V)=>{D.push([Array.from(H.categoriesIds).reduce((w,P)=>`${w}-${P}`,""),V,H.totals.reduce((w,P)=>w+P,0)])}),z[G.playerId]=D,z},{}),b.max=q.values().map(z=>[z.categoriesIds.reduce((G,D)=>`${G}-${D}`,""),z.max.reduce((G,D)=>G+D,0)])}const S=b.max.reduce((q,[O,z])=>(q.set(O,z),q),new Map),v=Object.entries(b.data).reduce((q,[O,z])=>(q.set(Number(O),z),q),new Map);r.value=[],i.value.forEach(q=>{const O=v.get(q.objeto_player?q.objeto_player.player_id:q.id||q.player_id);q.statsGraph=[],O&&(q.statsGraph=O.map((z,G)=>{const D=Number(S.get(z[0])),H=z[2],V=G+1;return r.value.length<O.length&&r.value.push({position:V,name:z[1]}),{position:V,name:z[1],playerStat:H,leagueMax:D,id:z[0],playerPercentage:D?Math.floor(H/D*100):H,isVisible:!0}}))})}function f(m){l.value=m,y()}return(m,g)=>{const b=e.resolveComponent("apexchart");return e.openBlock(),e.createElementBlock("div",{class:"graph-spider",style:e.normalizeStyle(n.value)},[e.createElementVNode("div",lT,e.toDisplayString(t.title),1),e.createElementVNode("div",rT,[e.createElementVNode("div",iT,[t.dynamicCategories?(e.openBlock(),e.createBlock(e.unref(ts),{key:0,"button-filter-props":{backgroundColor:"#2e3b46",width:"96.2%",borderColor:"rgba(255, 255, 255, 0.20)",infoBorderColor:"rgba(255, 255, 255, 0.20)",showIcon:!0,height:"38px",padding:"5px 2.2%",textFontFamily:"Poppins-Regular",showBadgeOnFilterFull:!1,showBadge:!0,text:"Ver otras jugadas"},"show-badge-on-filter-full":!1,filters:t.dynamicCategories,"filter-type":e.unref(x).PRODUCTIVITY,"is-for-template-form":!1,"productivity-max-categories":12,"productivity-min-categories":5,"are-offenses-conditions-visible":!1,"is-from-templates":!0,width:"99.7%","template-props":{width:"940px",maxWidth:"940px"},"productivity-text":"Modificar las jugadas que se ven en la gráfica spider","onUpdate:filters":f},null,8,["button-filter-props","filters","filter-type"])):t.customCategories?(e.openBlock(),e.createBlock(e.unref(ts),{key:1,"button-filter-props":{backgroundColor:"#2e3b46",width:"96.2%",borderColor:"rgba(255, 255, 255, 0.20)",infoBorderColor:"rgba(255, 255, 255, 0.20)",showIcon:!0,height:"38px",padding:"5px 2.2%",textFontFamily:"Poppins-Regular",showBadgeOnFilterFull:!1,showBadge:!0,text:"Ver otras jugadas"},"show-badge-on-filter-full":!1,filters:t.customCategories,"filter-type":e.unref(x).PRODUCTIVITY,"is-for-template-form":!1,"productivity-max-categories":12,"productivity-min-categories":1,"are-offenses-conditions-visible":!1,"is-from-templates":!0,width:"99.7%","template-props":{width:"940px",maxWidth:"940px"},"productivity-text":"Modificar las jugadas que se ven en la gráfica spider","onUpdate:filters":f},null,8,["button-filter-props","filters","filter-type"])):e.createCommentVNode("",!0)]),e.createElementVNode("div",nT,[e.createVNode(b,{ref_key:"spiderChart",ref:a,type:"radar",options:h.value,series:d.value},null,8,["options","series"])])])],4)}}},os=al(sT,[["__scopeId","data-v-71513d35"]]),cT=new Map([[1,"Portero"],[2,"Defensa Central"],[3,"Lateral por izquierda"],[4,"Lateral por derecha"],[5,"Volante por izquierda"],[6,"Volante por derecha"],[7,"Volante defensivo"],[8,"Volante ofensivo"],[9,"Delantero"]]),dT={class:"table-radars"},pT={class:"table-radars__table"},mT={class:"table-radars__radars"},uT={class:"radar"},fT={class:"radar"},hT={__name:"GSC-TableAndRadar",props:{players:{type:Array,default:()=>[]},isGeneral:{type:Boolean,default:!0},isEditMode:{type:Boolean,default:!1},userId:{type:Number,default:0},token:{type:String,default:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6Mzg4NjYsIm5hbWUiOiJMaWxsaW5pIiwidXNlcm5hbWUiOiJsaWxsaW5pdGVzdCIsImVtYWlsIjoiIiwicHJvdmlkZXJfaWQiOjEsImxvZ2luX2dvbHN0YXRzIjoxLCJpYXQiOjE3NDgyMTcxMTQsImV4cCI6MTc3OTc1MzExNH0.08YqLIH66doeBS-NLf1CPJM7WnvHLcB2Ypxm5LtBADg"},dynamicCategories:{type:Object,default:()=>({})},positionIds:{type:Array,default:()=>[]}},setup(t,{expose:o}){const a=t,l=e.ref([]),i=e.ref([]);e.ref(a.players);const r=e.ref([]),n=e.ref([]),s=e.ref(!1),d=e.computed(()=>r.value);e.watch(()=>a.players,g=>{g&&g.length&&(l.value=g.map((b,S)=>{const v=S+1;return{...b,position:v<10?`0${v}`:`${v}`,isSelected:!1,isExpanded:!1,isOdd:S%2!==0,countryFlagUrl:`https://golstatsimages.blob.core.windows.net/flags/${b.nationality_id}.jpg`,playerPosition:cT.get(b.position_id)||"",age:c(new Date(b.dob)),index:S}}),i.value=l.value.map(b=>({...b})))},{immediate:!0,deep:!0});function c(g){const b=new Date;let S=b.getFullYear()-g.getFullYear();const v=b.getMonth()-g.getMonth();return(v<0||v===0&&b.getDate()<g.getDate())&&S--,S}const h=e.computed(()=>{const g=a.positionIds&&a.positionIds.length>0?a.positionIds.reduce((b,S)=>`${b}${b==="?"?"":"&"}p=${S}`,"?"):"";return`https://a3tmmmjdaj.execute-api.us-east-2.amazonaws.com/prod/v2/users/${a.userId}/variables${g}`});e.watch(h,(g,b)=>{g&&g!==b&&p(g)},{immediate:!0}),e.watch(()=>a.isEditMode,g=>{g&&l.value.forEach(b=>{b.isSelected=!1})});async function p(g){try{const b=await(await fetch(g,{method:"GET",headers:{"Content-Type":"application/json",Authorization:a.token}})).json();n.value=b.data?b.data.map(S=>({...S,isSelected:!0})):[]}catch(b){console.error("Error fetching user variables:",b)}}function y(g){r.value=g}function u(g){const[b,S]=g.split(","),v=b.split(" ");let q="";for(const O of v)if(q+=` ${O}`,O.length>3)break;return S&&b?`${S.trim()} ${q}`:""}function f(g){l.value.forEach(b=>{b.isNew=!1}),l.value.find(b=>b.id&&g.id&&b.id===g.id||b.objeto_player&&b.objeto_player.player_id===g.player_id||b.player_id&&g.player_id&&b.player_id===g.player_id||b.id&&g.player_id&&b.id===g.player_id||b.player_id&&g.id&&b.player_id===g.id)||(g.name=u(g.name),g.isNew=!0,l.value.unshift(g))}function m(g){s.value=g}return o({addPlayer:f}),(g,b)=>(e.openBlock(),e.createElementBlock("div",dT,[e.createElementVNode("div",pT,[e.createVNode(b7,{players:l.value,onChangeSelectedPlayers:y,onClickCheckbox:m},null,8,["players"])]),e.createElementVNode("div",mT,[e.createElementVNode("div",uT,[e.createVNode(os,{title:"Tipos de jugadas Profesor Lillini:",players:d.value,"custom-categories":n.value,"user-id":t.userId,token:t.token},null,8,["players","custom-categories","user-id","token"])]),e.createElementVNode("div",fT,[e.createVNode(os,{title:"Variables Dinámicas:",players:d.value,"dynamic-categories":t.dynamicCategories,"user-id":t.userId,token:t.token},null,8,["players","dynamic-categories","user-id","token"])])])]))}},yT=al(hT,[["__scopeId","data-v-9610aac0"]]);function gT(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var oo={exports:{}},ls;function bT(){if(ls)return oo.exports;ls=1;function t(){}return t.prototype={on:function(o,a,l){var i=this.e||(this.e={});return(i[o]||(i[o]=[])).push({fn:a,ctx:l}),this},once:function(o,a,l){var i=this;function r(){i.off(o,r),a.apply(l,arguments)}return r._=a,this.on(o,r,l)},emit:function(o){var a=[].slice.call(arguments,1),l=((this.e||(this.e={}))[o]||[]).slice(),i=0,r=l.length;for(i;i<r;i++)l[i].fn.apply(l[i].ctx,a);return this},off:function(o,a){var l=this.e||(this.e={}),i=l[o],r=[];if(i&&a)for(var n=0,s=i.length;n<s;n++)i[n].fn!==a&&i[n].fn._!==a&&r.push(i[n]);return r.length?l[o]=r:delete l[o],this}},oo.exports=t,oo.exports.TinyEmitter=t,oo.exports}var Il,rs;function _T(){if(rs)return Il;rs=1;var t=bT();return Il=new t,Il}var ST=_T();const ET=gT(ST),CT={class:"graph-view"},kT=Ae({__name:"GraphView",props:{playersScouting:{type:Array,default:()=>[]},dynamicCategories:{type:Object,default:()=>null},userId:{type:Number,default:0},positionIds:{type:Array,default:()=>[]}},setup(t){const o=e.ref(null);return e.ref([{position:1,player_name:"S. mty",player_photo:"https://golstatsimages.blob.core.windows.net/players-profile/4988.png",total:"97",id:4988,player_age:34,team_abrev:"MTY",team_name:"Monterrey",team_logo:"https://golstatsimages.blob.core.windows.net/teams-80/7.png",player_position:"VD",position_name:"Volante defensivo",player_country_flag:"https://golstatsimages.blob.core.windows.net/flags/198.jpg",player_games:52,player_min:4265,league_name:"Liga MX",seasons:[1933,1931,1922,1874,1871,1864,1847,1836],season_id:1933,stats:[{category_id:112312312312,name:"Goles",total:10},{category_id:232213313123,name:"Goles alucinantes",total:8},{category_id:112312312312,name:"Goles",total:15},{category_id:232213313123,name:"Goles alucinantes",total:11},{category_id:112312312312,name:"Goles",total:10},{category_id:232213313123,name:"Goles alucinantes",total:18},{category_id:112312312312,name:"Goles",total:5},{category_id:232213313123,name:"Goles alucinantes",total:12},{category_id:112312312312,name:"Goles",total:10},{category_id:232213313123,name:"Goles alucinantes",total:18},{category_id:112312312312,name:"Goles",total:5},{category_id:232213313123,name:"Goles alucinantes",total:12}]},{position:1,player_name:"S. ame",player_photo:"https://golstatsimages.blob.core.windows.net/players-profile/4988.png",total:"97",id:4989,player_age:30,team_abrev:"AME",team_name:"Monterrey",team_logo:"https://golstatsimages.blob.core.windows.net/teams-80/7.png",player_position:"VD",position_name:"Volante defensivo",player_country_flag:"https://golstatsimages.blob.core.windows.net/flags/198.jpg",player_games:22,player_min:6265,league_name:"Liga MX",seasons:[1933,1931,1922,1874,1871,1864,1847,1836],season_id:1933,stats:[{category_id:112312312312,name:"Goles",total:3},{category_id:232213313123,name:"Goles alucinantes",total:7},{category_id:112312312312,name:"Goles",total:5},{category_id:232213313123,name:"Goles alucinantes",total:8},{category_id:112312312312,name:"Goles",total:9},{category_id:232213313123,name:"Goles alucinantes",total:4},{category_id:112312312312,name:"Goles",total:12},{category_id:232213313123,name:"Goles alucinantes",total:8},{category_id:112312312312,name:"Goles",total:9},{category_id:232213313123,name:"Goles alucinantes",total:4},{category_id:112312312312,name:"Goles",total:12},{category_id:232213313123,name:"Goles alucinantes",total:8}]},{position:1,player_name:"S. chi",player_photo:"https://golstatsimages.blob.core.windows.net/players-profile/4988.png",total:"97",id:4588,player_age:24,team_abrev:"CHI",team_name:"Monterrey",team_logo:"https://golstatsimages.blob.core.windows.net/teams-80/7.png",player_position:"VD",position_name:"Volante defensivo",player_country_flag:"https://golstatsimages.blob.core.windows.net/flags/198.jpg",player_games:62,player_min:3265,league_name:"Liga MX",seasons:[1933,1931,1922,1874,1871,1864,1847,1836],season_id:1933,stats:[{category_id:112312312312,name:"Goles",total:9},{category_id:232213313123,name:"Goles alucinantes",total:10},{category_id:112312312312,name:"Goles",total:6},{category_id:232213313123,name:"Goles alucinantes",total:4},{category_id:112312312312,name:"Goles",total:13},{category_id:232213313123,name:"Goles alucinantes",total:9},{category_id:112312312312,name:"Goles",total:10},{category_id:232213313123,name:"Goles alucinantes",total:5}]},{position:1,player_name:"S. Canales",player_photo:"https://golstatsimages.blob.core.windows.net/players-profile/4988.png",total:"97",id:4998,player_age:34,team_abrev:"MTY",team_name:"Monterrey",team_logo:"https://golstatsimages.blob.core.windows.net/teams-80/7.png",player_position:"VD",position_name:"Volante defensivo",player_country_flag:"https://golstatsimages.blob.core.windows.net/flags/198.jpg",player_games:52,player_min:4265,league_name:"Liga MX",seasons:[1933,1931,1922,1874,1871,1864,1847,1836],season_id:1933,stats:[{category_id:112312312312,name:"Goles",total:10},{category_id:232213313123,name:"Goles alucinantes",total:10},{category_id:112312312312,name:"Goles",total:10},{category_id:232213313123,name:"Goles alucinantes",total:10},{category_id:112312312312,name:"Goles",total:10},{category_id:232213313123,name:"Goles alucinantes",total:10},{category_id:112312312312,name:"Goles",total:10},{category_id:232213313123,name:"Goles alucinantes",total:10}]},{position:1,player_name:"S. Canales",player_photo:"https://golstatsimages.blob.core.windows.net/players-profile/4988.png",total:"97",id:4983,player_age:34,team_abrev:"MTY",team_name:"Monterrey",team_logo:"https://golstatsimages.blob.core.windows.net/teams-80/7.png",player_position:"VD",position_name:"Volante defensivo",player_country_flag:"https://golstatsimages.blob.core.windows.net/flags/198.jpg",player_games:52,player_min:4265,league_name:"Liga MX",seasons:[1933,1931,1922,1874,1871,1864,1847,1836],season_id:1933,stats:[{category_id:112312312312,name:"Goles",total:10},{category_id:232213313123,name:"Goles alucinantes",total:10},{category_id:112312312312,name:"Goles",total:10},{category_id:232213313123,name:"Goles alucinantes",total:10},{category_id:112312312312,name:"Goles",total:10},{category_id:232213313123,name:"Goles alucinantes",total:10},{category_id:112312312312,name:"Goles",total:10},{category_id:232213313123,name:"Goles alucinantes",total:10}]}]),ET.on("add-player",a=>{o.value&&o.value.addPlayer(a)}),(a,l)=>(e.openBlock(),e.createElementBlock("div",CT,[e.createVNode(e.unref(yT),{ref_key:"tableAndRadar",ref:o,players:t.playersScouting,"user-id":t.userId,"dynamic-categories":t.dynamicCategories,"position-ids":t.positionIds},null,8,["players","user-id","dynamic-categories","position-ids"])]))}},[["__scopeId","data-v-8926f090"]]),Rl=(t,o)=>{const a=t.__vccOpts||t;for(const[l,i]of o)a[l]=i;return a},Pl={name:"FieldTemplatesElement",props:{fieldWidth:{type:Number,default:302.5},fieldHeight:{type:Number,default:254.5},initialSections:{type:Array,default:()=>[]},displayMode:{type:Boolean,default:!1},title:{type:String,default:"Zona de origen del balón:"},quarters:{type:Array,default:()=>[1,2,3,4]}},data(){return{selectAll:!0,selectedSections:new Set,isDragging:!1,dragSelectMode:null,lastUpdateTime:0,lastSelectedSections:[]}},created(){this.initializeSections()},watch:{initialSections:{handler:"initializeSections",immediate:!0},selectedSections:{handler(t){if(this.lastSelectedSections.every(a=>t.has(a)))return;const o=Array.from(t).map(Number).sort((a,l)=>a-l);this.lastSelectedSections=[...o],this.$emit("sections-changed",o)},deep:!0}},methods:{initializeSections(){if(this.selectedSections.clear(),this.initialSections&&this.initialSections.length>0)this.initialSections.forEach(t=>{const o=Math.ceil(t/4);this.isQuarterEnabled(o)&&this.selectedSections.add(t.toString())});else for(let t=1;t<=16;t++){const o=Math.ceil(t/4);this.isQuarterEnabled(o)&&this.selectedSections.add(t.toString())}this.updateSelectAllState()},isSelected(t){return this.selectedSections.has(t.toString())},toggleSection(t){const o=Math.ceil(t/4);if(!this.isQuarterEnabled(o))return;const a=t.toString();this.selectedSections.size===1&&this.selectedSections.has(a)||(this.selectedSections.has(a)?this.selectedSections.delete(a):this.selectedSections.add(a),this.updateSelectAllState())},toggleAllSections(){if(this.selectAll)for(let t=1;t<=16;t++)this.selectedSections.add(t.toString());else this.selectedSections.clear()},updateSelectAllState(){requestAnimationFrame(()=>{this.selectAll=this.selectedSections.size===16})},startDragging(){this.displayMode||(this.isDragging=!0,event.preventDefault())},stopDragging(){this.displayMode||(this.isDragging=!1,this.dragSelectMode=null)},handleDragSelect(t){if(this.displayMode)return;const o=Date.now();if(o-this.lastUpdateTime<16)return;this.lastUpdateTime=o;const a=t.toString(),l=Math.ceil(t/4);if(this.isQuarterEnabled(l)){if(this.dragSelectMode===null&&(this.dragSelectMode=!this.selectedSections.has(a)),this.dragSelectMode)this.selectedSections.add(a);else{if(this.selectedSections.size===1&&this.selectedSections.has(a))return;this.selectedSections.delete(a)}this.updateSelectAllState()}},getSectionNumber(t,o){return(t-1)*4+o},getSectionIndex(t,o){return(t-1)*4+o},selectColumn(t){if(!this.isQuarterEnabled(t))return;const o=(t-1)*4+1,a=t*4;if(Array.from({length:4},(l,i)=>(o+i).toString()).every(l=>this.selectedSections.has(l))&&this.selectedSections.size>4)for(let l=o;l<=a;l++)this.selectedSections.delete(l.toString());else for(let l=o;l<=a;l++)this.selectedSections.add(l.toString());this.updateSelectAllState()},isQuarterSelected(t){const o=(t-1)*4+1;return Array.from({length:4},(a,l)=>(o+l).toString()).every(a=>this.selectedSections.has(a))},isQuarterEnabled(t){return this.quarters.includes(t)}}},is=()=>{e.useCssVars(t=>({"3f07ccca":t.fieldWidth+"px","26834d3a":t.fieldHeight+"px","1711e604":t.displayMode?"-28px":"0"}))},ns=Pl.setup;Pl.setup=ns?(t,o)=>(is(),ns(t,o)):is;const wT={class:"field-template-element"},VT={class:"field-container"},NT=["onMouseenter","onMousedown"],xT={class:"column-buttons"},BT=["onClick","disabled"];function FT(t,o,a,l,i,r){return e.openBlock(),e.createElementBlock("div",wT,[e.createElementVNode("div",VT,[e.createElementVNode("div",{class:e.normalizeClass(["field-title",{"hidden-title":a.displayMode}])},[e.createElementVNode("span",null,e.toDisplayString(a.title),1)],2),e.createElementVNode("div",{class:"soccer-field",onMousedown:o[0]||(o[0]=(...n)=>r.startDragging&&r.startDragging(...n)),onMouseup:o[1]||(o[1]=(...n)=>r.stopDragging&&r.stopDragging(...n)),onMouseleave:o[2]||(o[2]=(...n)=>r.stopDragging&&r.stopDragging(...n))},[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(4,n=>e.createElementVNode("div",{key:n,class:"field-column"},[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(4,s=>e.createElementVNode("div",{key:`${n}-${s}`,class:e.normalizeClass(["field-section",{selected:r.isSelected(r.getSectionIndex(n,s)),"display-mode":a.displayMode}]),onMouseenter:d=>i.isDragging&&r.handleDragSelect(r.getSectionIndex(n,s)),onMousedown:e.withModifiers(d=>!a.displayMode&&r.toggleSection(r.getSectionIndex(n,s)),["prevent"])},null,42,NT)),64))])),64))],32),e.createElementVNode("div",xT,[a.displayMode?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},e.renderList(4,n=>e.createElementVNode("div",{key:n,class:"column-label"},e.toDisplayString(n)+"/4 tos ",1)),64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},e.renderList(4,n=>e.createElementVNode("button",{key:n,class:e.normalizeClass(["column-button",{selected:r.isQuarterSelected(n),disabled:!r.isQuarterEnabled(n)}]),onClick:s=>r.selectColumn(n),disabled:!r.isQuarterEnabled(n)},e.toDisplayString(n)+"/4 tos ",11,BT)),64))])])])}const TT=Rl(Pl,[["render",FT],["__scopeId","data-v-1f6351a4"]]),Ll={name:"FieldTemplatesElement",props:{fieldWidth:{type:Number,default:302.5},fieldHeight:{type:Number,default:254.5},initialSections:{type:Array,default:()=>[]},displayMode:{type:Boolean,default:!1}},data(){return{selectAll:!0,selectedSections:new Set,isDragging:!1,dragSelectMode:null,lastUpdateTime:0,selectedCells:new Array(72).fill(!0)}},created(){this.initializeSections()},watch:{initialSections:{handler:"initializeSections",immediate:!0},selectedSections:{handler(t){const o=Array.from(t).map(r=>{const[n,s]=r.split("-").map(Number);return{row:n,col:s,value:this.getSequentialNumber(n,s)}}),a={};o.forEach(r=>{a[r.col]||(a[r.col]=[]),a[r.col].push(r)});const l=[];Object.values(a).forEach(r=>{r.sort((s,d)=>d.row-s.row);let n=[r[0]];for(let s=1;s<r.length;s++){const d=r[s];r[s-1].row-d.row===1?n.push(d):(n.length>0&&l.push(n),n=[d])}n.length>0&&l.push(n)});const i=l.sort((r,n)=>{const s=Math.min(...r.map(c=>c.value)),d=Math.min(...n.map(c=>c.value));return s-d}).map(r=>{const n=r.map(s=>s.value).sort((s,d)=>d-s);return n.length===1?[n[0],n[0]]:[n[0],n[n.length-1]]});this.$emit("sections-changed",i)},deep:!0}},methods:{initializeSections(){if(this.initialSections&&this.initialSections.length>0)this.selectedSections.clear(),this.initialSections.forEach(t=>{if(Array.isArray(t)&&t.length===2){const[o,a]=t,l=17-Math.floor((o-1)/21),i=(o-1)%21+1,r=17-Math.floor((a-1)/21),n=(a-1)%21+1;if(i===n){const s=Math.min(l,r),d=Math.max(l,r);for(let c=s;c<=d;c++)this.selectedSections.add(this.getSectionId(c,i))}else{const s=Math.min(i,n),d=Math.max(i,n);for(let c=s;c<=d;c++){const h=c===i?l:1,p=c===n?r:17;for(let y=Math.min(h,p);y<=Math.max(h,p);y++)this.selectedSections.add(this.getSectionId(y,c))}}}});else for(let t=1;t<=17;t++)for(let o=1;o<=21;o++)this.selectedSections.add(this.getSectionId(t,o));this.updateSelectAllState()},getSectionId(t,o){return`${t}-${o}`},isSelected(t,o){return this.selectedSections.has(this.getSectionId(t,o))},toggleSection(t,o){const a=this.getSectionId(t,o);this.selectedSections.has(a)?this.selectedSections.delete(a):this.selectedSections.add(a),this.updateSelectAllState()},toggleAllSections(){if(this.selectAll)for(let t=1;t<=17;t++)for(let o=1;o<=21;o++)this.selectedSections.add(this.getSectionId(t,o));else this.selectedSections.clear()},updateSelectAllState(){requestAnimationFrame(()=>{let t=357;this.selectAll=this.selectedSections.size===t})},startDragging(){this.displayMode||(this.isDragging=!0,event.preventDefault())},stopDragging(){this.displayMode||(this.isDragging=!1,this.dragSelectMode=null)},handleDragSelect(t,o){if(this.displayMode)return;const a=Date.now();if(a-this.lastUpdateTime<16)return;this.lastUpdateTime=a;const l=this.getSectionId(t,o);this.dragSelectMode===null&&(this.dragSelectMode=!this.selectedSections.has(l)),this.dragSelectMode?this.selectedSections.add(l):this.selectedSections.delete(l),this.updateSelectAllState()},getSequentialNumber(t,o){return(17-t)*21+o}}},ss=()=>{e.useCssVars(t=>({"7dc153b4":t.fieldWidth+"px","3cee0bfc":(t.displayMode?t.fieldHeight-24:t.fieldHeight)+"px"}))},cs=Ll.setup;Ll.setup=cs?(t,o)=>(ss(),cs(t,o)):ss;const AT={class:"field-template-element"},$T={class:"field-container"},MT={key:0,class:"select-all-container"},IT={class:"select-all-label"},RT=["onMouseenter","onMousedown"];function PT(t,o,a,l,i,r){return e.openBlock(),e.createElementBlock("div",AT,[e.createElementVNode("div",$T,[a.displayMode?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",MT,[e.createElementVNode("label",IT,[o[5]||(o[5]=e.createElementVNode("span",null,"Seleccionar toda la cancha",-1)),e.withDirectives(e.createElementVNode("input",{type:"checkbox",class:"select-all-checkbox","onUpdate:modelValue":o[0]||(o[0]=n=>i.selectAll=n),onChange:o[1]||(o[1]=(...n)=>r.toggleAllSections&&r.toggleAllSections(...n))},null,544),[[e.vModelCheckbox,i.selectAll]])])])),e.createElementVNode("div",{class:"soccer-field",onMousedown:o[2]||(o[2]=(...n)=>r.startDragging&&r.startDragging(...n)),onMouseup:o[3]||(o[3]=(...n)=>r.stopDragging&&r.stopDragging(...n)),onMouseleave:o[4]||(o[4]=(...n)=>r.stopDragging&&r.stopDragging(...n))},[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(17,n=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:n},[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(21,s=>e.createElementVNode("div",{key:`${n}-${s}`,class:e.normalizeClass(["field-section",{selected:r.isSelected(n,s),"display-mode":a.displayMode}]),onMouseenter:d=>i.isDragging&&r.handleDragSelect(n,s),onMousedown:e.withModifiers(d=>!a.displayMode&&r.toggleSection(n,s),["prevent"])},null,42,RT)),64))],64))),64))],32),o[6]||(o[6]=e.createStaticVNode('<div class="attack-direction" data-v-389c50fa><div class="arrow-line" data-v-389c50fa></div><span class="attack-text" data-v-389c50fa>Ataca</span><div class="arrow-line" data-v-389c50fa></div><svg class="arrow-head" width="12" height="12" viewBox="0 0 12 12" data-v-389c50fa><polygon points="12,6 0,1 0,11" fill="#316fee" data-v-389c50fa></polygon></svg></div>',1))])])}const LT=Rl(Ll,[["render",PT],["__scopeId","data-v-389c50fa"]]),OT={components:{FieldGolStatsTemplates:TT,FieldTemplatesElement:LT},name:"ModalPassConditions",props:{isVisible:{type:Boolean,required:!0},parameters:{type:Object,required:!0}},data(){return{quarters:[1,2],userId:24254,originSelection:[],destinationSelection:[],selectAllOrigin:!1,selectAllDestination:!1,minDistanceX:.5,minDistanceY:.5,minDistanceTotal:.5}},methods:{isArrayOfArrays(t){return Array.isArray(t)&&t.length>0&&t.every(o=>Array.isArray(o))},closeModal(){this.$emit("update:isVisible",!1)},updateOriginSelection(t){this.originSelection=t},updateDestinationSelection(t){this.destinationSelection=t},clearFilters(){this.originSelection=[],this.destinationSelection=[],this.selectAllOrigin=!1,this.selectAllDestination=!1,this.minDistanceX=0,this.minDistanceY=0,this.minDistanceTotal=0},applyFilters(){this.$emit("update:isVisible",!1)}}},vT={key:0,class:"modal-wrapper"},DT={class:"modal-overlay"},zT={class:"modal-container"},UT={class:"modal-content"},jT={class:"modal-header"},HT={class:"fields-container"},WT={class:"field-section"},GT={class:"field-section"},qT={class:"distance-section"},YT={class:"distance-info"},ZT={class:"info-row"},JT={class:"info-value"},KT={class:"info-row"},XT={class:"info-value"},QT={class:"info-row"},eA={class:"info-value"},tA={class:"distance-section"},aA={class:"distance-info"},oA={class:"info-row"},lA={class:"info-value"},rA={class:"info-row"},iA={class:"info-value"},nA={class:"info-row"},sA={class:"info-value"};function cA(t,o,a,l,i,r){var n,s,d,c,h,p,y,u,f,m,g,b;const S=e.resolveComponent("FieldGolStatsTemplates"),v=e.resolveComponent("FieldTemplatesElement");return a.isVisible?(e.openBlock(),e.createElementBlock("div",vT,[e.createElementVNode("div",DT,[e.createElementVNode("div",zT,[e.createElementVNode("div",UT,[e.createElementVNode("div",jT,[o[2]||(o[2]=e.createStaticVNode('<div class="header-content" data-v-834c0128><svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg" data-v-inspector="src/components/GSCTemplates.vue:100:15" data-v-a08c9209="" data-v-834c0128><path d="M5.18088 2.68185L3.12463 4.74435L2.31838 3.93185C2.20069 3.81416 2.04107 3.74805 1.87463 3.74805C1.70819 3.74805 1.54857 3.81416 1.43088 3.93185C1.31319 4.04954 1.24707 4.20917 1.24707 4.3756C1.24707 4.54204 1.31319 4.70166 1.43088 4.81935L2.68088 6.06935C2.73898 6.12793 2.80811 6.17443 2.88427 6.20616C2.96043 6.23789 3.04212 6.25423 3.12463 6.25423C3.20714 6.25423 3.28883 6.23789 3.36499 6.20616C3.44115 6.17443 3.51028 6.12793 3.56838 6.06935L6.06838 3.56935C6.12665 3.51108 6.17288 3.4419 6.20442 3.36576C6.23595 3.28962 6.25218 3.20802 6.25218 3.1256C6.25218 3.04319 6.23595 2.96159 6.20442 2.88545C6.17288 2.80931 6.12665 2.74013 6.06838 2.68185C6.0101 2.62358 5.94092 2.57735 5.86478 2.54582C5.78864 2.51428 5.70704 2.49805 5.62463 2.49805C5.54222 2.49805 5.46061 2.51428 5.38447 2.54582C5.30833 2.57735 5.23915 2.62358 5.18088 2.68185Z" fill="white" data-v-inspector="src/components/GSCTemplates.vue:101:17" data-v-a08c9209="" data-v-834c0128></path><path d="M5 8.125H2.5C2.33424 8.125 2.17527 8.19085 2.05806 8.30806C1.94085 8.42527 1.875 8.58424 1.875 8.75V11.25C1.875 11.4158 1.94085 11.5747 2.05806 11.6919C2.17527 11.8092 2.33424 11.875 2.5 11.875H5C5.16576 11.875 5.32473 11.8092 5.44194 11.6919C5.55915 11.5747 5.625 11.4158 5.625 11.25V8.75C5.625 8.58424 5.55915 8.42527 5.44194 8.30806C5.32473 8.19085 5.16576 8.125 5 8.125ZM4.375 10.625H3.125V9.375H4.375V10.625Z" fill="white" data-v-inspector="src/components/GSCTemplates.vue:104:17" data-v-a08c9209="" data-v-834c0128></path><path d="M5 13.75H2.5C2.33424 13.75 2.17527 13.8158 2.05806 13.9331C1.94085 14.0503 1.875 14.2092 1.875 14.375V16.875C1.875 17.0408 1.94085 17.1997 2.05806 17.3169C2.17527 17.4342 2.33424 17.5 2.5 17.5H5C5.16576 17.5 5.32473 17.4342 5.44194 17.3169C5.55915 17.1997 5.625 17.0408 5.625 16.875V14.375C5.625 14.2092 5.55915 14.0503 5.44194 13.9331C5.32473 13.8158 5.16576 13.75 5 13.75ZM4.375 16.25H3.125V15H4.375V16.25Z" fill="white" data-v-inspector="src/components/GSCTemplates.vue:107:17" data-v-a08c9209="" data-v-834c0128></path><path d="M8.125 9.375H13.125C13.2908 9.375 13.4497 9.30915 13.5669 9.19194C13.6842 9.07473 13.75 8.91576 13.75 8.75C13.75 8.58424 13.6842 8.42527 13.5669 8.30806C13.4497 8.19085 13.2908 8.125 13.125 8.125H8.125C7.95924 8.125 7.80027 8.19085 7.68306 8.30806C7.56585 8.42527 7.5 8.58424 7.5 8.75C7.5 8.91576 7.56585 9.07473 7.68306 9.19194C7.80027 9.30915 7.95924 9.375 8.125 9.375Z" fill="white" data-v-inspector="src/components/GSCTemplates.vue:110:17" data-v-a08c9209="" data-v-834c0128></path><path d="M18.125 10.625H8.125C7.95924 10.625 7.80027 10.6908 7.68306 10.8081C7.56585 10.9253 7.5 11.0842 7.5 11.25C7.5 11.4158 7.56585 11.5747 7.68306 11.6919C7.80027 11.8092 7.95924 11.875 8.125 11.875H18.125C18.2908 11.875 18.4497 11.8092 18.5669 11.6919C18.6842 11.5747 18.75 11.4158 18.75 11.25C18.75 11.0842 18.6842 10.9253 18.5669 10.8081C18.4497 10.6908 18.2908 10.625 18.125 10.625Z" fill="white" data-v-inspector="src/components/GSCTemplates.vue:113:17" data-v-a08c9209="" data-v-834c0128></path><path d="M8.125 15H13.125C13.2908 15 13.4497 14.9342 13.5669 14.8169C13.6842 14.6997 13.75 14.5408 13.75 14.375C13.75 14.2092 13.6842 14.0503 13.5669 13.9331C13.4497 13.8158 13.2908 13.75 13.125 13.75H8.125C7.95924 13.75 7.80027 13.8158 7.68306 13.9331C7.56585 14.0503 7.5 14.2092 7.5 14.375C7.5 14.5408 7.56585 14.6997 7.68306 14.8169C7.80027 14.9342 7.95924 15 8.125 15Z" fill="white" data-v-inspector="src/components/GSCTemplates.vue:116:17" data-v-a08c9209="" data-v-834c0128></path><path d="M18.125 16.25H8.125C7.95924 16.25 7.80027 16.3158 7.68306 16.4331C7.56585 16.5503 7.5 16.7092 7.5 16.875C7.5 17.0408 7.56585 17.1997 7.68306 17.3169C7.80027 17.4342 7.95924 17.5 8.125 17.5H18.125C18.2908 17.5 18.4497 17.4342 18.5669 17.3169C18.6842 17.1997 18.75 17.0408 18.75 16.875C18.75 16.7092 18.6842 16.5503 18.5669 16.4331C18.4497 16.3158 18.2908 16.25 18.125 16.25Z" fill="white" data-v-inspector="src/components/GSCTemplates.vue:119:17" data-v-a08c9209="" data-v-834c0128></path><path d="M8.125 3.75H13.125C13.2908 3.75 13.4497 3.68415 13.5669 3.56694C13.6842 3.44973 13.75 3.29076 13.75 3.125C13.75 2.95924 13.6842 2.80027 13.5669 2.68306C13.4497 2.56585 13.2908 2.5 13.125 2.5H8.125C7.95924 2.5 7.80027 2.56585 7.68306 2.68306C7.56585 2.80027 7.5 2.95924 7.5 3.125C7.5 3.29076 7.56585 3.44973 7.68306 3.56694C7.80027 3.68415 7.95924 3.75 8.125 3.75Z" fill="white" data-v-inspector="src/components/GSCTemplates.vue:122:17" data-v-a08c9209="" data-v-834c0128></path><path d="M8.125 6.25H18.125C18.2908 6.25 18.4497 6.18415 18.5669 6.06694C18.6842 5.94973 18.75 5.79076 18.75 5.625C18.75 5.45924 18.6842 5.30027 18.5669 5.18306C18.4497 5.06585 18.2908 5 18.125 5H8.125C7.95924 5 7.80027 5.06585 7.68306 5.18306C7.56585 5.30027 7.5 5.45924 7.5 5.625C7.5 5.79076 7.56585 5.94973 7.68306 6.06694C7.80027 6.18415 7.95924 6.25 8.125 6.25Z" fill="white" data-v-inspector="src/components/GSCTemplates.vue:125:17" data-v-a08c9209="" data-v-834c0128></path></svg><span data-v-834c0128>Elige las condiciones del pase</span></div>',1)),e.createElementVNode("button",{class:"close-button",onClick:o[0]||(o[0]=q=>t.$emit("update:isVisible",!1))},o[1]||(o[1]=[e.createElementVNode("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M14 1.41L12.59 0L7 5.59L1.41 0L0 1.41L5.59 7L0 12.59L1.41 14L7 8.41L12.59 14L14 12.59L8.41 7L14 1.41Z"})],-1)]))]),e.createElementVNode("div",HT,[e.createElementVNode("div",WT,[r.isArrayOfArrays((n=a.parameters)==null?void 0:n.origin_zones)?(e.openBlock(),e.createBlock(v,{key:1,"user-id":24254,"display-mode":!0,"initial-sections":(d=a.parameters)==null?void 0:d.origin_zones},null,8,["initial-sections"])):(e.openBlock(),e.createBlock(S,{key:0,title:"Elige la zona de origen del balón:","initial-sections":(s=a.parameters)==null?void 0:s.origin_zones,"display-mode":!0},null,8,["initial-sections"]))]),e.createElementVNode("div",GT,[r.isArrayOfArrays((c=a.parameters)==null?void 0:c.destiny_zones)?(e.openBlock(),e.createBlock(v,{key:1,"user-id":24254,"display-mode":!0,"initial-sections":(p=a.parameters)==null?void 0:p.destiny_zones},null,8,["initial-sections"])):(e.openBlock(),e.createBlock(S,{key:0,title:"Elige la zona de destino del balón:","initial-sections":(h=a.parameters)==null?void 0:h.destiny_zones,"display-mode":!0},null,8,["initial-sections"]))])]),e.createElementVNode("div",qT,[o[6]||(o[6]=e.createElementVNode("h3",null,"Distancia mínima del pase:",-1)),e.createElementVNode("div",YT,[e.createElementVNode("div",ZT,[o[3]||(o[3]=e.createElementVNode("span",{class:"info-label"},"Eje X de la cancha (de portería a portería):",-1)),e.createElementVNode("span",JT,e.toDisplayString((y=a.parameters)==null?void 0:y.minimum_distance_x)+" m",1)]),e.createElementVNode("div",KT,[o[4]||(o[4]=e.createElementVNode("span",{class:"info-label"},"Eje Y de la cancha (de banda a banda):",-1)),e.createElementVNode("span",XT,e.toDisplayString((u=a.parameters)==null?void 0:u.minimum_distance_y)+" m",1)]),e.createElementVNode("div",QT,[o[5]||(o[5]=e.createElementVNode("span",{class:"info-label"},"Distancia total (No importa si va diagonal):",-1)),e.createElementVNode("span",eA,e.toDisplayString((f=a.parameters)==null?void 0:f.minimum_total_distance)+" m",1)])])]),e.createElementVNode("div",tA,[o[10]||(o[10]=e.createElementVNode("h3",null,"Distancia máxima del pase:",-1)),e.createElementVNode("div",aA,[e.createElementVNode("div",oA,[o[7]||(o[7]=e.createElementVNode("span",{class:"info-label"},"Eje X de la cancha (de portería a portería):",-1)),e.createElementVNode("span",lA,e.toDisplayString((m=a.parameters)==null?void 0:m.maximum_distance_x)+" m",1)]),e.createElementVNode("div",rA,[o[8]||(o[8]=e.createElementVNode("span",{class:"info-label"},"Eje Y de la cancha (de banda a banda):",-1)),e.createElementVNode("span",iA,e.toDisplayString((g=a.parameters)==null?void 0:g.maximum_distance_y)+" m",1)]),e.createElementVNode("div",nA,[o[9]||(o[9]=e.createElementVNode("span",{class:"info-label"},"Distancia total (No importa si va diagonal):",-1)),e.createElementVNode("span",sA,e.toDisplayString((b=a.parameters)==null?void 0:b.maximum_total_distance)+" m",1)])])])])])])])):e.createCommentVNode("",!0)}const ds=Rl(OT,[["render",cA],["__scopeId","data-v-834c0128"]]),dA={key:0,class:"loading-container"},pA={key:1},mA={class:"tooltip-list"},uA=["onClick"],fA={class:"folder-icon"},hA={key:0,width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},yA={key:1,width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},gA=Ae({__name:"AddToListTooltip",props:{lists:{type:Array,default:()=>[]},isModalOpen:{type:Boolean,default:!1},userId:{type:Number,default:0},token:{type:String,default:""},selectedPlayer:{type:Object,default:()=>({})}},emits:["selectList","close","createNewList","playerAdded"],setup(t,{emit:o}){const a=t,l=e.ref(null),i=e.ref(!0),r=e.ref(!1),n=o;e.watch(()=>a.isModalOpen,y=>{i.value=!y});function s(){n("createNewList")}function d(y){i.value&&l.value&&!l.value.contains(y.target)&&n("close")}async function c(y){try{r.value=!0;const u={dob:a.selectedPlayer.dob,is_female:0,jersey:0,name:a.selectedPlayer.name,nationality:a.selectedPlayer.nationality,nationality_id:a.selectedPlayer.nationality_id,player_id:a.selectedPlayer.player_id,position:a.selectedPlayer.position_id,team_id:a.selectedPlayer.team_id},f={user_id:a.userId,id:y.id,players:[u]};(await ne.create({headers:{Authorization:`${a.token}`}}).put(`https://4j4nfvoh0d.execute-api.us-east-2.amazonaws.com/prod/users/${a.userId}/in-followed/${y.id}/players`,f)).status===200&&(n("playerAdded"),n("selectList",y),n("close"))}catch(u){console.error("Error al agregar jugador a la lista:",u),r.value=!1}}function h(y){i.value&&y.target===l.value&&n("close")}function p(y){var u;return(u=y.players)==null?void 0:u.some(f=>f.player_id===a.selectedPlayer.player_id)}return e.onMounted(()=>{window.addEventListener("mousedown",d)}),e.onUnmounted(()=>{window.removeEventListener("mousedown",d)}),(y,u)=>(e.openBlock(),e.createElementBlock("div",{class:"add-to-list-tooltip",ref_key:"tooltipRef",ref:l,onClick:h},[u[5]||(u[5]=e.createElementVNode("div",{class:"tooltip-title"},"Agregar a lista existente:",-1)),r.value?(e.openBlock(),e.createElementBlock("div",dA,u[0]||(u[0]=[e.createElementVNode("div",{class:"loading-spinner"},null,-1),e.createElementVNode("span",null,"Agregando jugador...",-1)]))):(e.openBlock(),e.createElementBlock("div",pA,[e.createElementVNode("div",mA,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.lists,f=>(e.openBlock(),e.createElementBlock("div",{key:f.id,class:e.normalizeClass(["tooltip-list-item",{disabled:p(f)}]),onClick:m=>!p(f)&&c(f)},[e.createElementVNode("span",fA,[p(f)?(e.openBlock(),e.createElementBlock("svg",yA,u[2]||(u[2]=[e.createElementVNode("rect",{x:"2",y:"5",width:"14",height:"9",rx:"2",fill:"none",stroke:"#9b9b9a","stroke-width":"1.2"},null,-1),e.createElementVNode("path",{d:"M2 7V5C2 3.89543 2.89543 3 4 3H7.5L9 5H14C15.1046 5 16 5.89543 16 7V7",stroke:"#9b9b9a","stroke-width":"1.2"},null,-1),e.createElementVNode("path",{d:"M6 9L8 11L12 7",stroke:"#9b9b9a","stroke-width":"1.2","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)]))):(e.openBlock(),e.createElementBlock("svg",hA,u[1]||(u[1]=[e.createElementVNode("rect",{x:"2",y:"5",width:"14",height:"9",rx:"2",fill:"none",stroke:"#8EA2AB","stroke-width":"1.2"},null,-1),e.createElementVNode("path",{d:"M2 7V5C2 3.89543 2.89543 3 4 3H7.5L9 5H14C15.1046 5 16 5.89543 16 7V7",stroke:"#8EA2AB","stroke-width":"1.2"},null,-1)])))]),e.createElementVNode("span",{class:e.normalizeClass(["list-name",{"disabled-text":p(f)}])},e.toDisplayString(f.name),3)],10,uA))),128))]),u[4]||(u[4]=e.createElementVNode("div",{class:"tooltip-divider"},null,-1)),e.createElementVNode("div",{class:"tooltip-create",onClick:s},u[3]||(u[3]=[e.createElementVNode("span",{class:"plus-icon"},[e.createElementVNode("svg",{width:"23",height:"16",viewBox:"0 0 23 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M12.3877 4.88909H1.70676C1.11931 4.88909 0.638672 5.35562 0.638672 5.92582C0.638672 6.49602 1.11931 6.96254 1.70676 6.96254H12.3877C12.9751 6.96254 13.4558 6.49602 13.4558 5.92582C13.4558 5.35562 12.9751 4.88909 12.3877 4.88909ZM12.3877 0.742188H1.70676C1.11931 0.742188 0.638672 1.20871 0.638672 1.77891C0.638672 2.34911 1.11931 2.81564 1.70676 2.81564H12.3877C12.9751 2.81564 13.4558 2.34911 13.4558 1.77891C13.4558 1.20871 12.9751 0.742188 12.3877 0.742188ZM17.7281 9.03599V5.92582C17.7281 5.35562 17.2475 4.88909 16.6601 4.88909C16.0726 4.88909 15.592 5.35562 15.592 5.92582V9.03599H12.3877C11.8002 9.03599 11.3196 9.50252 11.3196 10.0727C11.3196 10.6429 11.8002 11.1094 12.3877 11.1094H15.592V14.2196C15.592 14.7898 16.0726 15.2563 16.6601 15.2563C17.2475 15.2563 17.7281 14.7898 17.7281 14.2196V11.1094H20.9324C21.5199 11.1094 22.0005 10.6429 22.0005 10.0727C22.0005 9.50252 21.5199 9.03599 20.9324 9.03599H17.7281ZM1.70676 11.1094H8.11532C8.70277 11.1094 9.18341 10.6429 9.18341 10.0727C9.18341 9.50252 8.70277 9.03599 8.11532 9.03599H1.70676C1.11931 9.03599 0.638672 9.50252 0.638672 10.0727C0.638672 10.6429 1.11931 11.1094 1.70676 11.1094Z",fill:"#98a2b3",stroke:"#FFFFFF","stroke-width":"0.091682"})])],-1),e.createElementVNode("span",{class:"create-text"},"Crear nueva lista",-1)]))]))],512))}},[["__scopeId","data-v-934f3c1b"]]),bA={class:"modal-overlay"},_A={key:0,class:"modal-content"},SA={class:"modal-select-container"},EA={class:"modal-input-wrapper"},CA=["disabled"],kA={key:0,class:"modal-input-loading"},wA={key:0,class:"modal-dropdown"},VA={key:0,class:"modal-dropdown-empty"},NA={key:1,class:"modal-dropdown-scroll"},xA={class:"variable-selection"},BA=["value"],FA={class:"variable-text"},TA={class:"modal-dropdown-actions"},AA={key:1,class:"modal-error"},$A={key:0,class:"modal-name-error"},MA={class:"modal-actions"},IA=["disabled"],RA=Ae({__name:"CreateListModal",props:{userId:{type:String,required:!0},token:{type:String,required:!0},lists:{type:Array,default:()=>[]},selectedPlayer:{type:Object,default:()=>({})}},emits:["close","createList","listCreated"],setup(t,{emit:o}){const a=o,l=t,i=e.ref(""),r=e.ref(""),n=e.ref([]),s=e.ref(!1),d=e.ref(!1),c=e.ref([]),h=e.ref(!1),p=e.ref(null),y=e.computed(()=>l.lists.some(H=>H.name.toLowerCase()===i.value.toLowerCase().trim())),u=e.computed(()=>i.value.trim()!==""&&n.value.length>0&&!y.value);async function f(){var H,V;try{h.value=!0;const P=await ne.create({headers:{Authorization:`${l.token}`}}).get(`https://a3tmmmjdaj.execute-api.us-east-2.amazonaws.com/prod/v2/users/${l.userId}/variables`);c.value=P.data.data}catch(w){p.value=((V=(H=w.response)==null?void 0:H.data)==null?void 0:V.message)||"Error al obtener las variables",console.error("Error fetching variables:",w)}finally{h.value=!1}}const m=e.computed(()=>{if(!c.value.length)return[];const H=r.value.toLowerCase().trim();return H?c.value.filter(V=>V.name.toLowerCase().includes(H)):c.value});function g(){s.value=!0}function b(){s.value=!0}function S(){setTimeout(()=>{s.value=!1,r.value=""},200)}function v(){r.value="",s.value=!1}function q(){if(r.value){const H=c.value.find(V=>V.name===r.value);H&&!n.value.some(V=>V.custom_id===H.custom_id)&&(n.value.push(H),r.value="")}s.value=!0}async function O(){var H,V;try{if(i.value&&n.value.length){const w=ne.create({headers:{Authorization:`${l.token}`}}),P={user_id:parseInt(l.userId),name:i.value,variables:n.value},R=await w.post(`https://4j4nfvoh0d.execute-api.us-east-2.amazonaws.com/prod/users/${l.userId}/in-followed`,P);R.data&&(a("createList",{nombre:i.value,variables:n.value,id:R.data.data.id}),a("listCreated"),i.value="",n.value=[],r.value="",s.value=!1,a("close"))}}catch(w){console.error("Error creating list:",w),p.value=((V=(H=w.response)==null?void 0:H.data)==null?void 0:V.message)||"Error al crear la lista"}}function z(){s.value=!1,a("close")}function G(){document.body.style.overflow="hidden"}function D(){document.body.style.overflow=""}return e.onMounted(async()=>{d.value=!0,s.value=!1,G(),await f()}),e.onUnmounted(()=>{D()}),(H,V)=>(e.openBlock(),e.createElementBlock("div",bA,[e.createVNode(e.Transition,{name:"slide-up"},{default:e.withCtx(()=>[d.value?(e.openBlock(),e.createElementBlock("div",_A,[e.createElementVNode("button",{class:"modal-close",onClick:z},"×"),V[6]||(V[6]=e.createElementVNode("div",{class:"modal-title"},[e.createElementVNode("svg",{width:"23",height:"16",viewBox:"0 0 23 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M12.3877 4.88909H1.70676C1.11931 4.88909 0.638672 5.35562 0.638672 5.92582C0.638672 6.49602 1.11931 6.96254 1.70676 6.96254H12.3877C12.9751 6.96254 13.4558 6.49602 13.4558 5.92582C13.4558 5.35562 12.9751 4.88909 12.3877 4.88909ZM12.3877 0.742188H1.70676C1.11931 0.742188 0.638672 1.20871 0.638672 1.77891C0.638672 2.34911 1.11931 2.81564 1.70676 2.81564H12.3877C12.9751 2.81564 13.4558 2.34911 13.4558 1.77891C13.4558 1.20871 12.9751 0.742188 12.3877 0.742188ZM17.7281 9.03599V5.92582C17.7281 5.35562 17.2475 4.88909 16.6601 4.88909C16.0726 4.88909 15.592 5.35562 15.592 5.92582V9.03599H12.3877C11.8002 9.03599 11.3196 9.50252 11.3196 10.0727C11.3196 10.6429 11.8002 11.1094 12.3877 11.1094H15.592V14.2196C15.592 14.7898 16.0726 15.2563 16.6601 15.2563C17.2475 15.2563 17.7281 14.7898 17.7281 14.2196V11.1094H20.9324C21.5199 11.1094 22.0005 10.6429 22.0005 10.0727C22.0005 9.50252 21.5199 9.03599 20.9324 9.03599H17.7281ZM1.70676 11.1094H8.11532C8.70277 11.1094 9.18341 10.6429 9.18341 10.0727C9.18341 9.50252 8.70277 9.03599 8.11532 9.03599H1.70676C1.11931 9.03599 0.638672 9.50252 0.638672 10.0727C0.638672 10.6429 1.11931 11.1094 1.70676 11.1094Z",fill:"#FFFFFF",stroke:"#FFFFFF","stroke-width":"0.091682"})]),e.createTextVNode(" Crear nueva lista ")],-1)),e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":V[0]||(V[0]=w=>i.value=w),class:"modal-input",type:"text",placeholder:"Nombre de tu lista"},null,512),[[e.vModelText,i.value]]),e.createElementVNode("div",SA,[e.createElementVNode("div",EA,[e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":V[1]||(V[1]=w=>r.value=w),class:"modal-input",type:"text",placeholder:"Selecciona las variables que quieres que se vean",onFocus:g,onBlur:S,onInput:b,disabled:h.value},null,40,CA),[[e.vModelText,r.value]]),h.value?(e.openBlock(),e.createElementBlock("div",kA,V[4]||(V[4]=[e.createElementVNode("div",{class:"loading-spinner"},null,-1)]))):(e.openBlock(),e.createElementBlock("button",{key:1,class:"modal-add-btn",onMousedown:e.withModifiers(q,["prevent"])},"+",32))]),s.value&&!h.value&&!p.value?(e.openBlock(),e.createElementBlock("div",wA,[m.value.length===0?(e.openBlock(),e.createElementBlock("div",VA," No se encontraron variables ")):(e.openBlock(),e.createElementBlock("div",NA,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,w=>(e.openBlock(),e.createElementBlock("div",{key:w.custom_id,class:"modal-dropdown-item"},[e.createElementVNode("label",xA,[e.withDirectives(e.createElementVNode("input",{type:"checkbox",value:w,"onUpdate:modelValue":V[2]||(V[2]=P=>n.value=P),onClick:V[3]||(V[3]=e.withModifiers(()=>{},["stop"]))},null,8,BA),[[e.vModelCheckbox,n.value]]),e.createElementVNode("span",FA,e.toDisplayString(w.name),1)])]))),128))])),e.createElementVNode("div",TA,[e.createElementVNode("button",{class:"modal-listo-btn",onMousedown:e.withModifiers(v,["prevent"])},"Listo",32)])])):e.createCommentVNode("",!0),p.value?(e.openBlock(),e.createElementBlock("div",AA,[V[5]||(V[5]=e.createElementVNode("span",{class:"error-icon"},"!",-1)),e.createTextVNode(" "+e.toDisplayString(p.value),1)])):e.createCommentVNode("",!0)]),y.value?(e.openBlock(),e.createElementBlock("div",$A," Ya existe una lista con este nombre, utiliza otro para poder continuar. ")):e.createCommentVNode("",!0),V[7]||(V[7]=e.createElementVNode("div",{class:"modal-divider"},null,-1)),e.createElementVNode("div",MA,[e.createElementVNode("button",{class:"modal-cancel",onClick:z},"Cancelar"),e.createElementVNode("button",{class:e.normalizeClass(["modal-create",{"modal-create--disabled":!u.value}]),onClick:O,disabled:!u.value}," Crear lista ",10,IA)])])):e.createCommentVNode("",!0)]),_:1})]))}},[["__scopeId","data-v-e8fef4fa"]]),PA={class:"player-card"},LA={class:"player-card__image"},OA={key:0,class:"checkbox-container"},vA=["checked"],DA=["src"],zA={class:"player-card__right-data"},UA={class:"player-card__age"},jA={class:"player-card__flag"},HA={class:"player-card__details"},WA={class:"player-card__name"},GA={class:"player-card__position"},qA={key:0,class:"button-row"},YA={class:"stat-header"},ZA={class:"stat-left"},JA=["onClick"],KA={class:"stat-label"},XA={class:"stat-value"},QA={class:"stat-bar-container"},e$={key:1,class:"loading-overlay"},t$=Ae({__name:"GscPlayerCard",props:{player:{type:Object,default:()=>({})},loading:{type:Boolean,default:!0},typeProductivity:{type:Number,default:0},countryFlag:{type:String,default:""},jersey:{type:Number,default:0},player_id:{type:Number,default:0},age:{type:Number,default:18},nationality:{type:String,default:"-"},name:{type:String,default:"-"},position:{type:String,default:"-"},photo:{type:String,default:""},is_female:{type:Number,default:0},isImgFullWidth:{type:Boolean,default:!1},stats:{type:Object,default:()=>({})},max:{type:Object,default:()=>({})},additionalData:{type:Object,default:()=>({})},deleteActive:{type:Boolean,default:!1},userId:{type:Number,default:0},categories:{type:Array,default:()=>[],required:!0},token:{type:String,default:""},statsPromise:{type:Promise,required:!0},isSelected:{type:Boolean,default:!1},showTooltip:{type:Boolean,default:!1},lists:{type:Array,default:()=>[]}},emits:["showTooltip","hideTooltip","openModal","playerAdded"],setup(t,{emit:o}){const a=t,l=o,i=e.ref(null),r=e.ref(!1),n=e.ref(!1),s=e.ref(null),d=[{id:1,nombre:"Laterales mundial sub 20"},{id:2,nombre:"Delanteros 2008"},{id:3,nombre:"Promesas Liga MX"}],c=e.ref(null),h=e.ref("center"),p=e.ref(!1);e.watch(n,O=>{O&&(p.value=!0)}),e.watch(()=>a.showTooltip,O=>{O&&e.nextTick(()=>{y()})},{immediate:!0}),e.onMounted(()=>{document.addEventListener("click",O=>{const z=O.target.closest(".add-to-list-tooltip"),G=O.target.closest(".add-button");!z&&!G&&a.showTooltip&&l("hideTooltip",a.player_id)})});function y(){const O=c.value;if(!O)return;const z=O.getBoundingClientRect(),G=window.innerWidth;z.right>G?h.value="left":h.value="center"}e.onMounted(async()=>{try{console.log("ESTADISTICAS DEL JUGADOR: ",a.stats),console.log("ESTADISTICAS MAXIMAS STATS: ",a.max),i.value=a.stats.map(O=>{var V,w;const z=O[0],G=O[2],D=((w=(V=a.max)==null?void 0:V.find(P=>P[0]===z||P[0]===parseInt(z)||P[0].toString()===z.toString()))==null?void 0:w[1])||0,H=D>0?G/D*100:0;return{name:O[1].replace(/\([^)]*\)/g,"").trim().toLowerCase().replace(/^\w/,P=>P.toUpperCase()),value:G,category:z,percentage:Math.min(H,100)}})}catch(O){console.error("Error cargando estadísticas:",O)}}),e.computed(()=>a.stats&&Object.keys(a.stats).length>0);const u=O=>{s.value=O,r.value=!0},f=()=>{r.value=!1,s.value=null};function m(){p.value=!0,l("showTooltip",a.player_id)}function g(){n.value||(p.value=!1,l("hideTooltip",a.player_id))}function b(){n.value=!0,p.value=!0}async function S(O){try{const z={dob:a.player.dob,is_female:0,jersey:0,name:a.player.name,nationality:a.player.nationality,nationality_id:a.player.nationality_id,player_id:a.player.player_id,position:a.player.position_id,team_id:a.player.team_id},G={user_id:parseInt(a.userId),id:O.id,players:[z]};await ne.create({headers:{Authorization:`${a.token}`}}).put(`https://4j4nfvoh0d.execute-api.us-east-2.amazonaws.com/prod/users/${a.userId}/in-followed/${O.id}/players`,G),d.push(O),n.value=!1,q()}catch(z){console.error("Error al agregar jugador a la lista:",z)}}function v(O){console.log("COIMPOENNTE POADRE, gscPLAYERDcARD",O)}function q(){l("playerAdded")}return(O,z)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",PA,[e.createElementVNode("div",LA,[t.deleteActive?(e.openBlock(),e.createElementBlock("div",OA,[e.createElementVNode("input",{type:"checkbox",class:"player-checkbox",checked:t.isSelected,onChange:z[0]||(z[0]=G=>O.$emit("toggleSelection")),onClick:z[1]||(z[1]=e.withModifiers(()=>{},["stop"]))},null,40,vA)])):e.createCommentVNode("",!0),e.createElementVNode("img",{class:e.normalizeClass(["player-card__photo",{"full-width":t.isImgFullWidth}]),src:t.photo,alt:"Player Image"},null,10,DA),e.createElementVNode("div",zA,[e.createElementVNode("div",UA,e.toDisplayString(t.age)+" años",1),e.createElementVNode("div",jA,[e.createElementVNode("div",{class:"player-card__flag-container",style:e.normalizeStyle({"background-image":`url(${a.countryFlag})`})},null,4)])])]),e.createElementVNode("div",HA,[e.createElementVNode("p",WA,e.toDisplayString(t.name),1),e.createElementVNode("p",GA,e.toDisplayString(t.position),1)]),e.createElementVNode("div",{class:e.normalizeClass(["player-card__actions",{"hide-buttons":t.deleteActive}])},[t.deleteActive?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",qA,[e.createElementVNode("button",{class:"action-button add-button",onClick:e.withModifiers(m,["stop"])},z[5]||(z[5]=[e.createStaticVNode(' Agregar a Lista <span class="button-icon" data-v-d3171f13><svg width="19" height="18" viewBox="0 0 19 18" fill="none" xmlns="http://www.w3.org/2000/svg" data-v-d3171f13><path d="M12.8345 16.4999V14.8333C12.8345 13.9492 12.4833 13.1014 11.8582 12.4763C11.2331 11.8512 10.3852 11.5 9.5012 11.5H4.50126C3.61722 11.5 2.76938 11.8512 2.14427 12.4763C1.51915 13.1014 1.16797 13.9492 1.16797 14.8333V16.4999" stroke="white" stroke-opacity="0.5" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" data-v-d3171f13></path><path d="M7.00126 8.16658C8.84219 8.16658 10.3346 6.67422 10.3346 4.83329C10.3346 2.99237 8.84219 1.5 7.00126 1.5C5.16033 1.5 3.66797 2.99237 3.66797 4.83329C3.66797 6.67422 5.16033 8.16658 7.00126 8.16658Z" stroke="white" stroke-opacity="0.5" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" data-v-d3171f13></path><path d="M15.332 5.66602V10.666M17.832 8.16598H12.832" stroke="white" stroke-opacity="0.5" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" data-v-d3171f13></path></svg></span>',2)])),p.value?(e.openBlock(),e.createElementBlock("div",{key:0,ref:c.value,class:e.normalizeClass(["tooltip-container",h.value]),style:{position:"absolute",left:"0",right:"0","z-index":"2000","margin-top":"40px"}},[e.createVNode(gA,{lists:t.lists,isModalOpen:n.value,token:t.token,"user-id":t.userId,"selected-player":t.player,onSelectList:v,onCreateNewList:b,onClose:g,onPlayerAdded:q},null,8,["lists","isModalOpen","token","user-id","selected-player"])],2)):e.createCommentVNode("",!0)])),t.deleteActive?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("button",{key:1,class:"action-button profile-button",onClick:z[2]||(z[2]=e.withModifiers(G=>O.$emit("showProfile",{player_id:a.player_id,season_id:a.additionalData.season_id,team_id:a.additionalData.team_id,name:a.name,position:a.position,age:a.age,nationality:a.nationality,photo:a.photo,stats:a.stats}),["stop"]))}," Ver perfil "))],2),e.createElementVNode("div",{class:e.normalizeClass(["player-card__stats",{"disabled-stats":t.deleteActive}])},[t.loading?(e.openBlock(),e.createElementBlock("div",e$,z[7]||(z[7]=[e.createElementVNode("div",{class:"loading-animation"},null,-1)]))):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(i.value,(G,D)=>(e.openBlock(),e.createElementBlock("div",{class:"stat-row",key:D},[e.createElementVNode("div",YA,[e.createElementVNode("div",ZA,[G.parametros&&G.parametros!="no"?(e.openBlock(),e.createElementBlock("button",{key:0,class:"stat-info-button",onClick:H=>u(G.parametros)},z[6]||(z[6]=[e.createElementVNode("svg",{width:"8",height:"13",viewBox:"0 0 11 13",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M7.17355 0.761719C6.44909 0.761719 5.77355 1.23716 5.56275 1.90573L0.887836 1.90458C0.572235 1.90458 0.316406 2.16058 0.316406 2.47601C0.316406 2.79144 0.572235 3.04744 0.887836 3.04744L5.56275 3.04688C5.8188 3.74688 6.44909 4.1903 7.17355 4.1903C7.89801 4.1903 8.53475 3.74574 8.79527 3.04231L10.0307 3.04744C10.3463 3.04744 10.6021 2.79144 10.6021 2.47601C10.6021 2.16058 10.3463 1.90458 10.0307 1.90458H8.79041C8.51527 1.20801 7.89801 0.761719 7.17355 0.761719ZM7.17355 1.90458C7.48915 1.90458 7.74498 2.16058 7.74498 2.47601C7.74498 2.79144 7.48915 3.04744 7.17355 3.04744C6.85795 3.04744 6.60212 2.79144 6.60212 2.47601C6.60212 2.16058 6.85795 1.90458 7.17355 1.90458ZM3.74498 5.04744C2.99184 5.04744 2.36144 5.51602 2.13127 6.19142C2.05092 6.19657 0.887836 6.19028 0.887836 6.19028C0.572235 6.19028 0.316406 6.44628 0.316406 6.76171C0.316406 7.07714 0.572235 7.33314 0.887836 7.33314C0.887836 7.33314 2.06064 7.32114 2.13372 7.32857C2.3639 8.004 2.99184 8.476 3.74498 8.476C4.46943 8.476 5.09023 8.032 5.36177 7.33485L10.0307 7.33314C10.3463 7.33314 10.6021 7.07714 10.6021 6.76171C10.6021 6.44628 10.3463 6.19028 10.0307 6.19028L5.3588 6.18519C5.10835 5.50346 4.46943 5.04744 3.74498 5.04744ZM3.74498 6.19028C4.06058 6.19028 4.31641 6.44628 4.31641 6.76171C4.31641 7.07714 4.06058 7.33314 3.74498 7.33314C3.42938 7.33314 3.17355 7.07714 3.17355 6.76171C3.17355 6.44628 3.42938 6.19028 3.74498 6.19028ZM7.17355 9.33314C6.44909 9.33314 5.7864 9.81029 5.56235 10.4703L0.887836 10.476C0.572235 10.476 0.316406 10.732 0.316406 11.0474C0.316406 11.3629 0.572235 11.6189 0.887836 11.6189L5.55389 11.6194C5.79098 12.2966 6.44909 12.7617 7.17355 12.7617C7.89801 12.7617 8.52264 12.3086 8.79784 11.6194L10.0307 11.6189C10.3463 11.6189 10.6021 11.3629 10.6021 11.0474C10.6021 10.732 10.3463 10.476 10.0307 10.476L8.79264 10.4726C8.54595 9.79663 7.89801 9.33314 7.17355 9.33314ZM7.17355 10.476C7.48915 10.476 7.74498 10.732 7.74498 11.0474C7.74498 11.3629 7.48915 11.6189 7.17355 11.6189C6.85795 11.6189 6.60212 11.3629 6.60212 11.0474C6.60212 10.732 6.85795 10.476 7.17355 10.476Z",fill:"white"})],-1)]),8,JA)):e.createCommentVNode("",!0),e.createElementVNode("span",KA,e.toDisplayString(G.name),1)]),e.createElementVNode("span",XA,e.toDisplayString(G.value),1)]),e.createElementVNode("div",QA,[e.createElementVNode("div",{style:e.normalizeStyle({width:`${G.percentage}%`}),class:"stat-bar"},null,4)])]))),128))],2)]),e.createVNode(e.unref(ds),{isVisible:r.value,"onUpdate:isVisible":z[3]||(z[3]=G=>r.value=G),onClose:f,parameters:s.value},null,8,["isVisible","parameters"]),n.value?(e.openBlock(),e.createBlock(RA,{key:0,token:t.token,lists:t.lists,"user-id":t.userId,"selected-player":t.player,onListCreated:q,onClose:z[4]||(z[4]=G=>n.value=!1),onCreateList:S},null,8,["token","lists","user-id","selected-player"])):e.createCommentVNode("",!0)],64))}},[["__scopeId","data-v-d3171f13"]]),a$={class:"grid-view"},o$={key:0,class:"loading-container"},l$={key:1,class:"cards-container"},r$=Ae({__name:"GridView",props:{playersScouting:{type:Object,default:()=>({})},userId:{type:Number,default:0},typeProductivity:{type:Number,default:0},max:{type:Object,default:()=>{}},lists:{type:Array,default:()=>[]},token:{type:String,default:""}},emits:["playerAdded","showProfile"],setup(t,{emit:o}){const a=new Map([[1,"Portero"],[2,"Defensa Central"],[3,"Lateral por izquierda"],[4,"Lateral por derecha"],[5,"Volante por izquierda"],[6,"Volante por derecha"],[7,"Volante defensivo"],[8,"Volante ofensivo"],[9,"Delantero"],[10,"Desconocida"]]),l=new Map([[1,"Portera"],[2,"Defensa Central"],[3,"Lateral por izquierda"],[4,"Lateral por derecha"],[5,"Volante por izquierda"],[6,"Volante por derecha"],[7,"Volante defensiva"],[8,"Volante ofensiva"],[9,"Delantera"],[10,"Desconocida"]]),i=o,r=e.reactive({}),n=e.ref(!1),s=e.ref(null);function d(m,g=!1){return(g?l:a).get(m)||"Desconocida"}function c(m){Object.keys(r).forEach(g=>{r[g]=!1}),r[m]=!0}function h(m){r[m]&&(r[m]=!1)}function p(m){Object.keys(r).forEach(g=>{r[g]=!1}),s.value=m,n.value=!0}function y(m){const g=m.target.closest(".add-to-list-tooltip"),b=m.target.closest(".add-button"),S=m.target.closest(".modal-overlay")||m.target.closest(".modal-content");!g&&!b&&!S&&Object.keys(r).forEach(v=>{r[v]=!1})}function u(){i("playerAdded")}function f(m){i("showProfile",m)}return e.onMounted(()=>{document.addEventListener("mousedown",y)}),e.onUnmounted(()=>{document.removeEventListener("mousedown",y)}),(m,g)=>(e.openBlock(),e.createElementBlock("div",a$,[t.playersScouting?(e.openBlock(),e.createElementBlock("div",l$,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.playersScouting,b=>(e.openBlock(),e.createBlock(t$,{key:b.player_id,loading:!1,statsPromise:!1,player_id:b.player_id,name:b.name,player:b,position:d(b.position_id,b.is_female),age:b.age,nationality:b.nationality,photo:b.photo,"type-productivity":t.typeProductivity,countryFlag:b.countryFlag,stats:t.typeProductivity==1?b.internal_stats:b.stats,max:t.typeProductivity==1?t.max.internal_max:t.max.max,"user-id":t.userId,lists:t.lists,token:t.token,onShowProfile:f,onShowTooltip:c,onHideTooltip:h,onOpenModal:p,onPlayerAdded:u},null,8,["player_id","name","player","position","age","nationality","photo","type-productivity","countryFlag","stats","max","user-id","lists","token"]))),128))])):(e.openBlock(),e.createElementBlock("div",o$,g[2]||(g[2]=[e.createElementVNode("div",{class:"loading-spinner"},null,-1),e.createElementVNode("span",null,"Cargando jugadores...",-1)]))),n.value?(e.openBlock(),e.createBlock(e.unref(ds),{key:2,isVisible:n.value,"onUpdate:isVisible":g[0]||(g[0]=b=>n.value=b),parameters:s.value,onClose:g[1]||(g[1]=b=>n.value=!1)},null,8,["isVisible","parameters"])):e.createCommentVNode("",!0)]))}},[["__scopeId","data-v-19d0373b"]]),i$=(t,o)=>{const a=t.__vccOpts||t;for(const[l,i]of o)a[l]=i;return a},n$={key:1},s$={width:"10",height:"8",viewBox:"0 0 10 8",fill:"none",xmlns:"http://www.w3.org/2000/svg"},c$=["fill"],d$={key:0,class:"checkbox__teams"},p$={class:"checkbox__teams__logo"},m$=["src"],u$={class:"checkbox__teams__logo"},f$=["src"],h$={__name:"GSC-Checkbox",props:{width:{type:String,default:"fit-content"},height:{type:String,default:"fit-content"},label:{type:String,default:""},labelWhiteSpace:{type:String,default:"normal"},labelColor:{type:String,default:"white"},fontFamily:{type:String,default:"sans-serif"},labelFontSize:{type:String,default:"12px"},modelValue:{type:Boolean,default:!1},justifyContent:{type:String,default:"flex-start"},alignItems:{type:String,default:"center"},boxBackgroundColor:{type:String,default:"#CBEE6B"},boxValueColor:{type:String,default:"#0d1d29"},boxValue:{type:[String,Number],default:""},boxPosition:{type:String,default:"left",validator(t){return["left","right","top","bottom"].includes(t)}},boxMarginTop:{type:String,default:"0.2em"},boxWidthAndHeight:{type:String,default:"16px"},boxBorderColor:{type:String,default:"#969da2"},boxBorderWidth:{type:String,default:"2px"},boxBorderRadius:{type:String,default:"4px"},boxValueFontSize:{type:String,default:"10px"},boxValueFontFamily:{type:String,default:"sans-serif"},avoidInteraction:{type:Boolean,default:!1},avoidToCheck:{type:Boolean,default:!1},isBoxOnly:{type:Boolean,default:!1},teamsIds:{type:Array,default:()=>null}},emits:["update:modelValue"],setup(t,{emit:o}){const a=t;e.useCssVars(c=>({"7bd9d47b":t.width,"34dc7ddc":t.height}));const l=e.ref(!1),i=e.computed(()=>{const c={color:a.boxValueColor,"font-family":a.fontFamily,height:a.boxWidthAndHeight,width:a.boxWidthAndHeight,minWidth:a.boxWidthAndHeight,"border-radius":a.boxBorderRadius,"margin-top":a.boxMarginTop};return l.value?(c["background-color"]=a.boxBackgroundColor,c.border=`solid ${a.boxBorderWidth} ${a.boxBackgroundColor}`):c.border=`solid ${a.boxBorderWidth} ${a.boxBorderColor}`,c}),r=e.computed(()=>({"font-family":a.boxValueFontFamily,"font-size":a.boxValueFontSize,color:a.boxValueColor,"line-height":1})),n=e.computed(()=>{const c={color:a.labelColor,"font-family":a.fontFamily,"font-size":a.labelFontSize,"white-space":a.labelWhiteSpace,"text-align":a.boxPosition==="top"||a.boxPosition==="bottom"?"center":a.boxPosition};return(a.boxPosition==="left"||a.boxPosition==="right")&&(c[`margin-${a.boxPosition}`]=a.isBoxOnly?"0":a.teamsIds?"8px":"10px"),c});e.watch(()=>a.modelValue,c=>{c!==l.value&&(l.value=c)},{immediate:!0});function s(){a.avoidInteraction||!l.value&&a.avoidToCheck||(l.value=!l.value,o("update:modelValue",l.value))}function d(c){return`${{}.TEAM_LOGOS_URL||"https://golstatsimages.blob.core.windows.net/teams-80/"}${c}.png`}return(c,h)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["checkbox",`box-${t.boxPosition}`]),onClick:s},[e.createElementVNode("div",{class:"checkbox__box",style:e.normalizeStyle(i.value)},[l.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[a.boxValue?(e.openBlock(),e.createElementBlock("div",{key:0,class:"checkbox__box__value",style:e.normalizeStyle(r.value)},e.toDisplayString(t.boxValue),5)):(e.openBlock(),e.createElementBlock("div",n$,[(e.openBlock(),e.createElementBlock("svg",s$,[e.createElementVNode("path",{d:"M9.77994 1.70133L4.10994 7.37133C3.96994 7.51133 3.77994 7.59133 3.57994 7.59133C3.37994 7.59133 3.18994 7.51133 3.04994 7.37133L0.219941 4.54133C-0.0700586 4.25133 -0.0700586 3.77133 0.219941 3.48133C0.509941 3.19133 0.989941 3.19133 1.27994 3.48133L3.57994 5.78133L8.71994 0.641328C9.00994 0.351328 9.48994 0.351328 9.77994 0.641328C10.0699 0.931328 10.0699 1.40133 9.77994 1.70133Z",fill:t.boxValueColor},null,8,c$)]))]))],64)):e.createCommentVNode("",!0)],4),t.teamsIds&&t.teamsIds.length?(e.openBlock(),e.createElementBlock("div",d$,[e.createElementVNode("div",p$,[e.createElementVNode("img",{src:d(t.teamsIds[0]),alt:""},null,8,m$)]),e.createElementVNode("div",u$,[e.createElementVNode("img",{src:d(t.teamsIds[1]),alt:""},null,8,f$)])])):e.createCommentVNode("",!0),e.createElementVNode("div",{class:"checkbox__label",style:e.normalizeStyle(n.value)},e.toDisplayString(t.label),5)],2))}},y$=i$(h$,[["__scopeId","data-v-b6f124d8"]]),g$=(t,o)=>{const a=t.__vccOpts||t;for(const[l,i]of o)a[l]=i;return a},Ol={props:{type:{type:Number,default:0},value:{type:Boolean,default:!1},textValue:String,icon:String,iconPosition:{type:String,default:"left"},iconSize:String,fontColor:{type:String,default:"#FFFFFF"},textDecoration:String,fontSize:{type:String,default:"16px"},fontSizeStat:{type:String,default:"16px"},fontStyle:String,fontFamily:{type:String,default:"Poppins-Regular"},height:{type:String,default:"fit-content"},width:{type:String,default:"fit-content"},borderRadius:{type:String,default:"0px"},borderType:{type:String,default:"solid"},borderWidth:{type:Number,default:0},borderWidthBtn:{type:String,default:"2px"},borderColor:String,backgroundColor:{type:String,default:"none"},activeBackgroundColor:{type:String,default:"#000000"},activeBorderWidth:{type:Number,default:2},activeBorderType:{type:String,default:"solid"},activeBorderColor:{type:String,default:"#cbee6b"},activeColorText:{type:String,default:"#FFFFFF"},cursorType:{type:String,default:"default"},typeOnOff:{type:Boolean,default:!1},textCategory:String,textStat:String,marginLeftStat:{type:String,default:"15%"}},watch:{value:{deep:!0,immediate:!0,handler(t){this.status=t}}},data(){return{status:!1}},computed:{customStyle(){return{height:this.height,width:this.width,backgroundColor:this.backgroundColor,borderRadius:this.borderRadius,border:`${this.borderType} ${this.borderWidth}px ${this.borderColor}`,color:this.fontColor,textDecoration:this.textDecoration,cursor:this.cursorType,fontSize:this.fontSize,fontStyle:this.fontStyle,fontFamily:`${this.fontFamily} !important`}},customActive(){return{backgroundColor:this.activeBackgroundColor,color:this.activeColorText,border:`${this.activeBorderType} ${this.activeBorderWidth}px ${this.activeBorderColor}`}}},methods:{btnClick(t){this.$emit("click",t),this.typeOnOff&&(this.status=!this.status,this.$emit("status",this.status))}}},ps=()=>{e.useCssVars(t=>({"9d01acb4":t.height,"14e95081":t.borderWidthBtn,"38fec285":t.borderType,34353510:t.borderColor,"20d20dc6":t.borderRadius,17130967:t.width,"4ccb7d36":t.backgroundColor,"5d1e86a2":t.cursorType,ce65d4a2:t.fontSize,fe4ac47a:t.fontStyle,f98e44dc:t.fontFamily,"93b87770":t.marginLeftStat,c7f7beba:t.fontSizeStat}))},ms=Ol.setup;Ol.setup=ms?(t,o)=>(ps(),ms(t,o)):ps;const b$=t=>(e.pushScopeId("data-v-f3ee6b2b"),t=t(),e.popScopeId(),t),_$=["src"],S$={key:1,class:"text"},E$=["src"],C$={class:"stats"},k$=b$(()=>e.createElementVNode("img",{class:"iconstats",src:"https://golstatsimages.blob.core.windows.net/todoelfut/playdes.png"},null,-1)),w$={class:"numstats"},V$={class:"leyend"};function N$(t,o,a,l,i,r){return e.openBlock(),e.createElementBlock("div",null,[a.type==0?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["button",i.status&&a.typeOnOff&&"button-active"]),style:e.normalizeStyle([r.customStyle,i.status&&a.typeOnOff&&r.customActive]),onClick:o[0]||(o[0]=(...n)=>r.btnClick&&r.btnClick(...n))},[a.icon&&a.iconPosition.toLowerCase()==="left"?(e.openBlock(),e.createElementBlock("img",{key:0,class:"icon",style:e.normalizeStyle({width:a.iconSize}),src:a.icon},null,12,_$)):e.createCommentVNode("",!0),a.textValue?(e.openBlock(),e.createElementBlock("div",S$,e.toDisplayString(a.textValue),1)):e.createCommentVNode("",!0),a.icon&&a.iconPosition.toLowerCase()==="right"?(e.openBlock(),e.createElementBlock("img",{key:2,class:"icon",style:e.normalizeStyle({width:a.iconSize}),src:a.icon},null,12,E$)):e.createCommentVNode("",!0)],6)):e.createCommentVNode("",!0),a.type==1?(e.openBlock(),e.createElementBlock("div",{key:1,class:"button-target",onClick:o[1]||(o[1]=(...n)=>r.btnClick&&r.btnClick(...n))},[e.createElementVNode("div",C$,[k$,e.createElementVNode("div",w$,e.toDisplayString(a.textStat),1)]),e.createElementVNode("div",V$,e.toDisplayString(a.textCategory),1)])):e.createCommentVNode("",!0)])}const x$=g$(Ol,[["render",N$],["__scopeId","data-v-f3ee6b2b"]]),us=(t,o)=>{const a=t.__vccOpts||t;for(const[l,i]of o)a[l]=i;return a},vl=t=>(e.pushScopeId("data-v-df83603b"),t=t(),e.popScopeId(),t),B$={key:0,class:"overlay"},F$=["onClick"],T$=vl(()=>e.createElementVNode("svg",{width:"11",height:"12",viewBox:"0 0 11 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M7.50558 0C6.78112 0 6.10558 0.475441 5.89478 1.14401L1.21987 1.14286C0.904267 1.14286 0.648438 1.39886 0.648438 1.71429C0.648438 2.02972 0.904267 2.28572 1.21987 2.28572L5.89478 2.28516C6.15083 2.98516 6.78112 3.42858 7.50558 3.42858C8.23004 3.42858 8.86678 2.98402 9.1273 2.28059L10.3627 2.28572C10.6783 2.28572 10.9342 2.02972 10.9342 1.71429C10.9342 1.39886 10.6783 1.14286 10.3627 1.14286H9.12244C8.8473 0.446287 8.23004 0 7.50558 0ZM7.50558 1.14286C7.82118 1.14286 8.07701 1.39886 8.07701 1.71429C8.07701 2.02972 7.82118 2.28572 7.50558 2.28572C7.18998 2.28572 6.93415 2.02972 6.93415 1.71429C6.93415 1.39886 7.18998 1.14286 7.50558 1.14286ZM4.07701 4.28572C3.32387 4.28572 2.69347 4.7543 2.4633 5.42971C2.38295 5.43485 1.21987 5.42856 1.21987 5.42856C0.904267 5.42856 0.648438 5.68456 0.648438 5.99999C0.648438 6.31542 0.904267 6.57142 1.21987 6.57142C1.21987 6.57142 2.39267 6.55942 2.46575 6.56685C2.69593 7.24228 3.32387 7.71428 4.07701 7.71428C4.80146 7.71428 5.42226 7.27028 5.69381 6.57314L10.3627 6.57142C10.6783 6.57142 10.9342 6.31542 10.9342 5.99999C10.9342 5.68456 10.6783 5.42856 10.3627 5.42856L5.69083 5.42348C5.44038 4.74174 4.80146 4.28572 4.07701 4.28572ZM4.07701 5.42856C4.39261 5.42856 4.64844 5.68456 4.64844 5.99999C4.64844 6.31542 4.39261 6.57142 4.07701 6.57142C3.76141 6.57142 3.50558 6.31542 3.50558 5.99999C3.50558 5.68456 3.76141 5.42856 4.07701 5.42856ZM7.50558 8.57142C6.78112 8.57142 6.11844 9.04857 5.89438 9.70857L1.21987 9.71428C0.904267 9.71428 0.648438 9.97028 0.648438 10.2857C0.648438 10.6011 0.904267 10.8571 1.21987 10.8571L5.88592 10.8577C6.12301 11.5349 6.78112 12 7.50558 12C8.23004 12 8.85467 11.5469 9.12987 10.8577L10.3627 10.8571C10.6783 10.8571 10.9342 10.6011 10.9342 10.2857C10.9342 9.97028 10.6783 9.71428 10.3627 9.71428L9.12467 9.71091C8.87798 9.03491 8.23004 8.57142 7.50558 8.57142ZM7.50558 9.71428C7.82118 9.71428 8.07701 9.97028 8.07701 10.2857C8.07701 10.6011 7.82118 10.8571 7.50558 10.8571C7.18998 10.8571 6.93415 10.6011 6.93415 10.2857C6.93415 9.97028 7.18998 9.71428 7.50558 9.71428Z",fill:"white"})],-1)),A$=[T$],$$={class:"name"},M$=["onClick"],I$=vl(()=>e.createElementVNode("g",{opacity:".5",stroke:"#fff","stroke-width":"1.677","stroke-linecap":"round","stroke-linejoin":"round"},[e.createElementVNode("path",{d:"M4.532 2.13v13.74M8.202 12.2l-3.67 3.669-3.669-3.67M12.919 15.87V2.132M16.589 5.802l-3.67-3.67-3.669 3.67"})],-1)),R$=[I$],P$=vl(()=>e.createElementVNode("div",{class:"column-title-2"},null,-1)),L$=["onClick"],O$={__name:"ScrollColumns",props:{availablePlayers:{type:Array,default:()=>[]},isEditMode:{type:Boolean,default:!1}},emits:["expand","open-media","click-parameters","sort"],setup(t,{expose:o,emit:a}){const l=t,i=e.ref(null),r=e.ref(null),n=e.ref(0);e.ref(!1);const s=e.computed(()=>{const f=l.availablePlayers[0];return f?f.stats:[]}),d=e.computed(()=>{const f=`repeat(${s.value.length}, max-content) 36px`;let m="";return n.value>0&&document.querySelectorAll(".column-title-2").forEach(g=>{m+=`${g.offsetWidth}px `}),{"--grid-template-columns":f,"--grid-template-columns-totals":m||f}});function c(){i.value=new ResizeObserver(f=>{for(const m of f){const{width:g}=m.contentRect;n.value=g}}),i.value.observe(r.value)}function h(f,m){const g=document.querySelectorAll(".scrollable-row-totals")[f+1];g&&(g.style.marginTop=`${m}px`)}function p({player:f,stat:m}){!m.total||m==="0%"||!m.seasons||!m.seasons.length||a("open-media",{...f,stat:m})}function y(f){!f||f==="no"||a("click-parameters",f)}function u(f){a("sort",f)}return e.onMounted(()=>{c()}),o({setMarginTopDetails:h}),(f,m)=>(e.openBlock(),e.createElementBlock("div",{class:"scroll-columns",style:e.normalizeStyle(d.value)},[t.isEditMode?(e.openBlock(),e.createElementBlock("div",B$)):e.createCommentVNode("",!0),e.createElementVNode("div",{ref_key:"titlesRow",ref:r,class:"scrollable-row-2"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,(g,b)=>(e.openBlock(),e.createElementBlock("div",{key:`t-${b}`,class:"column-title-2"},[g.parameters&&g.parameters!=="no"?(e.openBlock(),e.createElementBlock("div",{key:0,class:"parameters",role:"button",onClick:S=>y(g.parameters)},A$,8,F$)):e.createCommentVNode("",!0),e.createElementVNode("div",$$,e.toDisplayString(g.name),1),(e.openBlock(),e.createElementBlock("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",onClick:S=>u(g)},R$,8,M$))]))),128)),P$],512),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.availablePlayers,(g,b)=>(e.openBlock(),e.createElementBlock("div",{key:`i-${g.id}`,class:"row scrollable-row-totals"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.stats,S=>(e.openBlock(),e.createElementBlock("div",{key:S.category_id,class:e.normalizeClass(["row data-info",{odd:b%2!==0,underline:!!S.total&&S.total!=="0%"&&S.seasons&&S.seasons.length}])},[e.createElementVNode("span",{onClick:v=>p({player:g,stat:S})},e.toDisplayString(S.total),9,L$)],2))),128))]))),128))],4))}},v$=us(O$,[["__scopeId","data-v-df83603b"]]),ie=t=>(e.pushScopeId("data-v-18f2714a"),t=t(),e.popScopeId(),t),D$={class:"table__static-column"},z$={class:"static-title column-title restore"},U$=ie(()=>e.createElementVNode("div",{class:"titles-left"},[e.createElementVNode("div",{class:"title"},"Ranking"),e.createElementVNode("div",{class:"title"},"Agregar a lista")],-1)),j$=ie(()=>e.createElementVNode("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("g",{opacity:".6",stroke:"#fff","stroke-width":"1.333","stroke-linecap":"round","stroke-linejoin":"round"},[e.createElementVNode("path",{d:"M15.333 2.667v4h-4M.667 13.333v-4h4"}),e.createElementVNode("path",{d:"M2.34 6a6 6 0 0 1 9.9-2.24l3.094 2.906M.667 9.333l3.093 2.906a6 6 0 0 0 9.9-2.24"})])],-1)),H$=ie(()=>e.createElementVNode("div",null,"Restaurar orden",-1)),W$=[j$,H$],G$=["id"],q$={class:"container"},Y$={class:"details-row__info"},Z$={class:"details-row__info__personal"},J$={class:"bold"},K$={class:"bold"},X$={class:"bold"},Q$={class:"bold"},eM={class:"details-row__info__games"},tM={class:"bold"},aM={class:"bold"},oM=["onClick"],lM=ie(()=>e.createElementVNode("div",null,"Ver gráfica",-1)),rM=ie(()=>e.createElementVNode("svg",{width:"17",height:"16",viewBox:"0 0 17 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("g",{"clip-path":"url(#clip0_3514_71971)"},[e.createElementVNode("path",{d:"M16.3338 6.02932L8.65108 0.447539C8.56099 0.38207 8.43896 0.38207 8.34886 0.447539C8.34292 0.451852 1.97661 5.07726 0.6663 6.02926C0.498706 6.09269 0.445831 6.30248 0.563113 6.43788L3.48277 15.4238C3.51717 15.5297 3.61589 15.6014 3.72727 15.6014H13.2635C13.3911 15.6014 13.484 15.5258 13.5172 15.4238L16.4368 6.43788C16.5544 6.3022 16.501 6.09269 16.3338 6.02932ZM13.1818 14.792L12.2937 13.5604C12.4178 13.3198 12.4262 13.0472 12.3402 12.813L13.4007 8.12035C13.7342 7.97885 13.9718 7.64673 13.9682 7.25316L15.8203 6.67173L13.1818 14.792ZM1.18005 6.67273L2.54311 7.10316C2.52677 7.60485 2.90696 8.01919 3.39221 8.06116L5.37836 11.3233C5.0798 11.6827 5.09336 12.2096 5.41452 12.5533L3.8173 14.7894L1.18005 6.67273ZM7.02283 11.9909C7.03952 11.7764 6.98346 11.5718 6.86936 11.4011L8.47839 9.14851L10.8495 12.4367C10.7173 12.5536 10.6187 12.7075 10.5697 12.8821L7.02283 11.9909ZM7.62217 4.78338C7.74714 5.00898 7.96299 5.17704 8.22033 5.23844V8.35679L4.40411 7.15166C4.40767 6.95926 4.35377 6.77813 4.25196 6.6232L7.62217 4.78338ZM12.2474 6.77016C12.151 6.92429 12.0998 7.10551 12.1071 7.29851L8.73449 8.35735V5.21526C8.94317 5.14495 9.11883 5.00291 9.23183 4.8182L12.2474 6.77016ZM4.25277 7.64307L8.06249 8.84613L6.47533 11.0681C6.26327 10.973 6.02383 10.9611 5.80383 11.0334L3.92524 7.94795C4.05761 7.87432 4.17008 7.76935 4.25277 7.64307ZM11.9237 12.3234C11.7375 12.2181 11.526 12.1827 11.3228 12.214L8.8943 8.84613L12.2678 7.78701C12.4038 7.98623 12.6151 8.12979 12.8607 8.17698L11.9237 12.3234ZM12.648 6.41704L9.36721 4.29329C9.35074 3.90045 9.09089 3.57073 8.73449 3.45063V1.14366L15.6674 6.18076L13.8211 6.76041C13.5672 6.3651 13.0654 6.22463 12.648 6.41704ZM8.22033 3.42748C7.83383 3.5197 7.54105 3.8527 7.50917 4.25923L3.8238 6.27107C3.42227 6.10782 2.95152 6.24232 2.70096 6.61379L1.33164 6.18138L8.22033 1.17648V3.42748ZM5.85711 12.8183C6.22189 12.9143 6.61096 12.7823 6.84071 12.4753L10.5778 13.4143C10.7578 13.9855 11.4215 14.2369 11.9331 13.9395L12.7607 15.0872H4.23642L5.85711 12.8183Z",fill:"white"})]),e.createElementVNode("defs",null,[e.createElementVNode("clipPath",{id:"clip0_3514_71971"},[e.createElementVNode("rect",{width:"16",height:"16",fill:"white",transform:"translate(0.5)"})])])],-1)),iM=[lM,rM],nM=["onClick"],sM=ie(()=>e.createElementVNode("div",null,"Eliminar de lista",-1)),cM=ie(()=>e.createElementVNode("svg",{width:"17",height:"15",viewBox:"0 0 20 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M13.3345 16.5001V14.8334C13.3345 13.9494 12.9833 13.1015 12.3582 12.4764C11.7331 11.8513 10.8852 11.5001 10.0012 11.5001H5.00126C4.11722 11.5001 3.26938 11.8513 2.64427 12.4764C2.01915 13.1015 1.66797 13.9494 1.66797 14.8334V16.5001",stroke:"white","stroke-opacity":"0.5","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}),e.createElementVNode("path",{d:"M7.50126 8.16658C9.34219 8.16658 10.8346 6.67422 10.8346 4.83329C10.8346 2.99237 9.34219 1.5 7.50126 1.5C5.66033 1.5 4.16797 2.99237 4.16797 4.83329C4.16797 6.67422 5.66033 8.16658 7.50126 8.16658Z",stroke:"white","stroke-opacity":"0.5","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}),e.createElementVNode("path",{d:"M18.332 8.16663H13.332",stroke:"white","stroke-opacity":"0.5","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})],-1)),dM=[sM,cM],pM=["onClick"],mM=ie(()=>e.createElementVNode("div",null,"Agregar a lista",-1)),uM=ie(()=>e.createElementVNode("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M13.2016 17.2012V15.601C13.2016 14.7522 12.8645 13.9381 12.2643 13.3379C11.664 12.7377 10.85 12.4005 10.0012 12.4005H5.20047C4.35165 12.4005 3.5376 12.7377 2.9374 13.3379C2.33719 13.9381 2 14.7522 2 15.601V17.2012",stroke:"white","stroke-opacity":"1","stroke-width":"1.44023","stroke-linecap":"round","stroke-linejoin":"round"}),e.createElementVNode("path",{d:"M7.60086 9.19977C9.36843 9.19977 10.8013 7.76687 10.8013 5.9993C10.8013 4.23173 9.36843 2.79883 7.60086 2.79883C5.83329 2.79883 4.40039 4.23173 4.40039 5.9993C4.40039 7.76687 5.83329 9.19977 7.60086 9.19977Z",stroke:"white","stroke-opacity":"1","stroke-width":"1.44023","stroke-linecap":"round","stroke-linejoin":"round"}),e.createElementVNode("path",{d:"M15.5996 6.79944V11.6001M17.9999 9.19979H13.1992",stroke:"white","stroke-opacity":"1","stroke-width":"1.44023","stroke-linecap":"round","stroke-linejoin":"round"})],-1)),fM=[mM,uM],hM=["onClick"],yM=ie(()=>e.createElementVNode("div",null,"Ver perfil",-1)),gM=[yM],bM={class:"static-row__info-player"},_M={class:"position"},SM=["onClick"],EM=ie(()=>e.createElementVNode("path",{d:"M13.3345 16.5001V14.8334C13.3345 13.9494 12.9833 13.1015 12.3582 12.4764C11.7331 11.8513 10.8852 11.5001 10.0012 11.5001H5.00126C4.11722 11.5001 3.26938 11.8513 2.64427 12.4764C2.01915 13.1015 1.66797 13.9494 1.66797 14.8334V16.5001",stroke:"white","stroke-opacity":"0.5","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)),CM=ie(()=>e.createElementVNode("path",{d:"M7.50126 8.16658C9.34219 8.16658 10.8346 6.67422 10.8346 4.83329C10.8346 2.99237 9.34219 1.5 7.50126 1.5C5.66033 1.5 4.16797 2.99237 4.16797 4.83329C4.16797 6.67422 5.66033 8.16658 7.50126 8.16658Z",stroke:"white","stroke-opacity":"0.5","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)),kM=ie(()=>e.createElementVNode("path",{d:"M18.332 8.16663H13.332",stroke:"white","stroke-opacity":"0.5","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)),wM=[EM,CM,kM],VM={key:1,class:"add-to-list"},NM=["onClick"],xM=ie(()=>e.createElementVNode("path",{d:"M13.2016 17.2012V15.601C13.2016 14.7522 12.8645 13.9381 12.2643 13.3379C11.664 12.7377 10.85 12.4005 10.0012 12.4005H5.20047C4.35165 12.4005 3.5376 12.7377 2.9374 13.3379C2.33719 13.9381 2 14.7522 2 15.601V17.2012",stroke:"white","stroke-opacity":"1","stroke-width":"1.44023","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)),BM=ie(()=>e.createElementVNode("path",{d:"M7.60086 9.19977C9.36843 9.19977 10.8013 7.76687 10.8013 5.9993C10.8013 4.23173 9.36843 2.79883 7.60086 2.79883C5.83329 2.79883 4.40039 4.23173 4.40039 5.9993C4.40039 7.76687 5.83329 9.19977 7.60086 9.19977Z",stroke:"white","stroke-opacity":"1","stroke-width":"1.44023","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)),FM=ie(()=>e.createElementVNode("path",{d:"M15.5996 6.79944V11.6001M17.9999 9.19979H13.1992",stroke:"white","stroke-opacity":"1","stroke-width":"1.44023","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)),TM=[xM,BM,FM],AM={class:"player-photo"},$M=["src"],MM={class:"player-name"},IM={class:"arrow"},RM=["onClick"],PM=ie(()=>e.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M6 4.93631L10.2929 1.23496C10.6834 0.898244 11.3166 0.898244 11.7071 1.23496C12.0976 1.57167 12.0976 2.11759 11.7071 2.4543L6.70711 6.76532C6.31658 7.10203 5.68342 7.10203 5.29289 6.76532L0.292893 2.4543C-0.0976311 2.11759 -0.0976311 1.57167 0.292893 1.23496C0.683418 0.898244 1.31658 0.898244 1.70711 1.23496L6 4.93631Z",fill:"#D9D9D9"},null,-1)),LM=[PM],OM={class:"titles scrollable-row"},vM={class:"column-title"},DM=ie(()=>e.createElementVNode("div",null," Equipo ",-1)),zM=ie(()=>e.createElementVNode("g",{opacity:".5",stroke:"#fff","stroke-width":"1.677","stroke-linecap":"round","stroke-linejoin":"round"},[e.createElementVNode("path",{d:"M4.532 2.13v13.74M8.202 12.2l-3.67 3.669-3.669-3.67M12.919 15.87V2.132M16.589 5.802l-3.67-3.67-3.669 3.67"})],-1)),UM=[zM],jM={class:"column-title"},HM=ie(()=>e.createElementVNode("div",null," Posición ",-1)),WM=ie(()=>e.createElementVNode("g",{opacity:".5",stroke:"#fff","stroke-width":"1.677","stroke-linecap":"round","stroke-linejoin":"round"},[e.createElementVNode("path",{d:"M4.532 2.13v13.74M8.202 12.2l-3.67 3.669-3.669-3.67M12.919 15.87V2.132M16.589 5.802l-3.67-3.67-3.669 3.67"})],-1)),GM=[WM],qM={class:"column-title"},YM=ie(()=>e.createElementVNode("div",null," Edad ",-1)),ZM=ie(()=>e.createElementVNode("g",{opacity:".5",stroke:"#fff","stroke-width":"1.677","stroke-linecap":"round","stroke-linejoin":"round"},[e.createElementVNode("path",{d:"M4.532 2.13v13.74M8.202 12.2l-3.67 3.669-3.669-3.67M12.919 15.87V2.132M16.589 5.802l-3.67-3.67-3.669 3.67"})],-1)),JM=[ZM],KM=ie(()=>e.createElementVNode("div",{class:"column-title"},"País",-1)),XM={class:"column-title"},QM=ie(()=>e.createElementVNode("div",null," Partidos Jugados ",-1)),eI=ie(()=>e.createElementVNode("g",{opacity:".5",stroke:"#fff","stroke-width":"1.677","stroke-linecap":"round","stroke-linejoin":"round"},[e.createElementVNode("path",{d:"M4.532 2.13v13.74M8.202 12.2l-3.67 3.669-3.669-3.67M12.919 15.87V2.132M16.589 5.802l-3.67-3.67-3.669 3.67"})],-1)),tI=[eI],aI={class:"column-title"},oI=ie(()=>e.createElementVNode("div",null," Minutos Jugados ",-1)),lI=ie(()=>e.createElementVNode("g",{opacity:".5",stroke:"#fff","stroke-width":"1.677","stroke-linecap":"round","stroke-linejoin":"round"},[e.createElementVNode("path",{d:"M4.532 2.13v13.74M8.202 12.2l-3.67 3.669-3.669-3.67M12.919 15.87V2.132M16.589 5.802l-3.67-3.67-3.669 3.67"})],-1)),rI=[lI],iI={class:"column-title"},nI=ie(()=>e.createElementVNode("div",null," Liga ",-1)),sI=ie(()=>e.createElementVNode("g",{opacity:".5",stroke:"#fff","stroke-width":"1.677","stroke-linecap":"round","stroke-linejoin":"round"},[e.createElementVNode("path",{d:"M4.532 2.13v13.74M8.202 12.2l-3.67 3.669-3.669-3.67M12.919 15.87V2.132M16.589 5.802l-3.67-3.67-3.669 3.67"})],-1)),cI=[sI],dI=ie(()=>e.createElementVNode("div",{class:"column-title"},"Videos",-1)),pI={class:"team-logo"},mI=["src"],uI={class:"team-name data-info"},fI=["src"],hI={__name:"GSC-TableScrollable",props:{players:{type:Array,default:()=>[]},isGeneral:{type:Boolean,default:!0},isEditMode:{type:Boolean,default:!1},isTableFromList:{type:Boolean,default:!1}},emits:["change-selected-players","view-profile","add-to-list","view-graph","open-media","click-parameters"],setup(t,{emit:o}){const a=t;let l=null,i=null;const r=e.ref([]),n=e.ref(null),s=e.ref(null),d=e.ref(0),c=e.ref(0),h=e.ref(-1);e.ref(!1);const p=e.ref(null),y=e.ref(null),u=e.ref(null),f=e.ref([]),m=e.ref([{name:"team_abrev",isDesc:!1,isRoot:!0},{name:"player_position",isDesc:!1,isRoot:!0},{name:"player_age",isDesc:!1,isRoot:!0},{name:"player_games",isDesc:!1,isRoot:!0},{name:"player_min",isDesc:!1,isRoot:!0},{name:"league_name",isDesc:!1,isRoot:!0}]),g=e.ref(0),b=e.computed(()=>({"--width-details":`${d.value}px`,"--gap-static-row":`${S.value?"8px":"18px"}`,"--width-static-column":`${S.value?"50%":"436px"}`})),S=e.computed(()=>d.value<600);e.watch(()=>a.players,B=>{B&&B.length&&(r.value=B.map((j,F)=>{const T=F+1,C={...j,position:T<10?`0${T}`:`${T}`,isSelected:!1,isExpanded:!1,isOdd:F%2!==0,index:F};return j.stats&&j.stats.length&&(C.stats=j.stats.map(W=>({...W,isDesc:!1,isRoot:!1}))),C.parameters&&Object.entries(C.parameters).forEach(([W,_])=>{const k=C.stats.find(Y=>Y.custom_category_id===Number(W));k&&(k.parameters=_)}),C}),f.value=r.value.map(j=>({...j})))},{immediate:!0,deep:!0}),e.watch(()=>a.isEditMode,B=>{B&&r.value.forEach(j=>{j.isSelected=!1})}),e.watch(()=>u.value,B=>{if(B){let j=[...f.value];B.isRoot?j.sort((F,T)=>typeof F[B.name]=="string"?B.isDesc?F[B.name].localeCompare(T[B.name]):F[B.name].localeCompare(T[B.name])*-1:B.isDesc?T[B.name]-F[B.name]:F[B.name]-T[B.name]):j.sort((F,T)=>{const C=F.stats.find(_=>_.name===B.name),W=T.stats.find(_=>_.name===B.name);return typeof C.value=="string"?B.isDesc?C.total.localeCompare(W.total):C.total.localeCompare(W.total)*-1:B.isDesc?W.total-C.total:C.total-W.total}),j.forEach((F,T)=>{F.isOdd=T%2!==0}),f.value=j}else f.value.sort((j,F)=>j.index-F.index).forEach((j,F)=>{j.isOdd=F%2!==0})},{immediate:!0,deep:!0}),e.watch(c,B=>{const j=document.querySelectorAll(".static-row")[h.value+1];j&&(j.style.marginTop=`${B}px`),a.isGeneral?v(h.value,B):s.value&&s.value.setMarginTopDetails(h.value,B),B===0&&p.value&&J(p.value)});function v(B,j){const F=document.querySelectorAll(".scrollable-row")[B+2];F&&(F.style.marginTop=`${j}px`)}function q(B){o("click-parameters",B)}function O(B){B&&(B.isDesc=!B.isDesc),u.value=B}function z(B){const j=B.player||B.objeto_player,F=j?j.player_id||j.id||j.playerId:B.id||B.player_id,T={isFeaturedPlayers:!1,mainSectionType:1,playListType:2,gameIds:null,playerIds:F?[F]:[],goalkeeperIds:[],matchResult:[1,2,3],categorySingleName:"",isRivalSubject:!1,avoidCategorySingleName:!1,currentPlayIndex:0,playData:null,lastClashedGameId:null,tournamentsLastClashes:null,advancedFilter:{playListTitle:"Jugadas Relevantes"}};if(B.stat&&B.stat.parameters&&(T.parameters=B.stat.parameters),B.stat&&B.stat.seasons&&B.stat.seasons.length||B.seasons&&B.seasons.length){const C=[...B.stat&&B.stat.seasons&&B.stat.seasons.length?B.stat.seasons:B.seasons];C.sort((W,_)=>W-_),T.seasonId=C.shift(),T.seasonsIds=C}else(B.season_id||B.seasonId)&&(T.seasonId=B.season_id||B.seasonId);B.stat?B.stat.category_id&&B.stat.category_id.length?T.categoryIds=B.stat.category_id:B.stat.custom_category_id&&(T.customCategoryIds=[B.stat.custom_category_id]):T.categoryIds=H(B.player_position),o("open-media",T)}function G(){l=new ResizeObserver(B=>{for(const j of B)d.value=j.contentRect.width}),l.observe(n.value)}function D(B){i=new ResizeObserver(j=>{for(const F of j)c.value=F.contentRect.height}),i.observe(B)}function H(B){return B==="POR"?[39,40,52,53,54,55,323,324,608,774,802]:[10,12,14,15,27,35,61,217,257,466,519,607,702,730,98,101,109,112,121,122,127,128,135,136,141,142,161,170,179,211,232,235,239,242,282,284,289,291,296,485,486,487,488]}function V(B,j){j.isSelected=B;const F=r.value.filter(T=>T.isSelected);o("change-selected-players",F)}function w(B){o("view-profile",B)}function P(B){o("delete-from-list",B)}function R(B){o("add-to-list",B)}function Z(B){o("show-graph",B)}function J(B){if(B.isExpanded){B.isExpanded=!1,p.value=null;return}const j=r.value.find(W=>W.isExpanded);if(j&&(j.isExpanded=!1),j){p.value=B;return}const F=document.querySelectorAll(".details-row");let T=-1;F.forEach((W,_)=>{W.id===`dr-${B.id}`&&(T=_)});const C=F[T];h.value=T,D(C),B.isExpanded=!0}let pe=!1,se,E,A=function(B){pe=!0,se=B.pageX-y.value.offsetLeft,E=y.value.scrollLeft},U=function(){pe=!1};function L(){y.value&&(y.value.addEventListener("mousemove",B=>{if(!pe)return;const j=B.pageX-y.value.offsetLeft-se;y.value.scrollLeft=E-j}),y.value.addEventListener("mousedown",A,!1),y.value.addEventListener("mouseup",U,!1),y.value.addEventListener("mouseleave",U,!1))}return e.onMounted(()=>{G(),L()}),e.onBeforeUnmount(()=>{l&&l.disconnect(),i&&i.disconnect(),y.value&&(y.value.removeEventListener("mousemove",A,!1),y.value.removeEventListener("mouseup",U,!1),y.value.removeEventListener("mouseleave",U,!1))}),(B,j)=>(e.openBlock(),e.createElementBlock("div",{class:"table",ref_key:"tableSC",ref:n,style:e.normalizeStyle(b.value),key:g.value},[e.createElementVNode("div",D$,[e.createElementVNode("div",z$,[U$,e.createElementVNode("div",{role:"button",class:"restore-button",onClick:j[0]||(j[0]=F=>O(null))},W$)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,F=>(e.openBlock(),e.createElementBlock("div",{key:`s-${F.id}`,class:e.normalizeClass(["row static-row",{odd:F.isOdd}])},[e.createVNode(e.Transition,null,{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",{id:`dr-${F.id}`,class:e.normalizeClass(["details-row",{odd:F.isOdd}])},[e.createElementVNode("div",q$,[e.createElementVNode("div",Y$,[e.createElementVNode("div",Z$,[e.createElementVNode("div",null,[e.createTextVNode("Equipo: "),e.createElementVNode("span",J$,e.toDisplayString(F.team_name),1)]),e.createElementVNode("div",null,[e.createTextVNode("Edad: "),e.createElementVNode("span",K$,e.toDisplayString(F.player_age)+" Años",1)]),e.createElementVNode("div",null,[e.createTextVNode("Nacionalidad: "),e.createElementVNode("span",X$,e.toDisplayString(F.player_country),1)]),e.createElementVNode("div",null,[e.createTextVNode("Posición: "),e.createElementVNode("span",Q$,e.toDisplayString(F.position_name),1)])]),e.createElementVNode("div",eM,[e.createElementVNode("div",null,[e.createTextVNode("Partidos Jugados: "),e.createElementVNode("span",tM,e.toDisplayString(F.player_games),1)]),e.createElementVNode("div",null,[e.createTextVNode("Minutos Jugados: "),e.createElementVNode("span",aM,e.toDisplayString(F.player_min),1)])])]),e.createElementVNode("div",{class:"details-row__buttons",style:e.normalizeStyle(S.value?"margin-left: 0; gap: 8px;":"")},[e.createElementVNode("div",{role:"button",class:"button",onClick:T=>Z(F)},iM,8,oM),t.isTableFromList?(e.openBlock(),e.createElementBlock("div",{key:0,role:"button",class:"button",onClick:T=>P(F)},dM,8,nM)):(e.openBlock(),e.createElementBlock("div",{key:1,role:"button",class:"button",onClick:T=>R(F)},fM,8,pM)),e.createElementVNode("div",{role:"button",class:"button green",onClick:T=>w(F)},gM,8,hM)],4)])],10,G$),[[e.vShow,F.isExpanded]])]),_:2},1024),t.isEditMode?(e.openBlock(),e.createBlock(e.unref(y$),{key:0,fontFamily:"Poppins-Regular",labelFontSize:"14px","model-value":F.isSelected,"onUpdate:modelValue":T=>V(T,F)},null,8,["model-value","onUpdate:modelValue"])):e.createCommentVNode("",!0),e.createElementVNode("div",bM,[e.createElementVNode("div",_M,e.toDisplayString(F.position),1),t.isTableFromList?(e.openBlock(),e.createElementBlock("svg",{key:0,width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",onClick:T=>P(F)},wM,8,SM)):(e.openBlock(),e.createElementBlock("div",VM,[(e.openBlock(),e.createElementBlock("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",onClick:T=>R(F)},TM,8,NM))])),e.createElementVNode("div",AM,[e.createElementVNode("div",null,[e.createElementVNode("img",{src:F.player_photo,alt:"player photo"},null,8,$M)])]),e.createElementVNode("div",MM,e.toDisplayString(F.player_name),1)]),e.createElementVNode("div",IM,[(e.openBlock(),e.createElementBlock("svg",{class:e.normalizeClass(["_arrowExpandIcon_6ak64_1115 _rotate_6ak64_5",{expanded:F.isExpanded}]),width:"12",height:"8",viewBox:"0 0 12 8",fill:"#D9D9D9",xmlns:"http://www.w3.org/2000/svg",onClick:T=>J(F)},LM,10,RM))])],2))),128))]),e.createElementVNode("div",{ref_key:"scrollableColumns",ref:y,class:"table__scrollable-columns"},[t.isGeneral?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("div",OM,[e.createElementVNode("div",vM,[DM,(e.openBlock(),e.createElementBlock("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",onClick:j[1]||(j[1]=F=>O(m.value[0]))},UM))]),e.createElementVNode("div",jM,[HM,(e.openBlock(),e.createElementBlock("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",onClick:j[2]||(j[2]=F=>O(m.value[1]))},GM))]),e.createElementVNode("div",qM,[YM,(e.openBlock(),e.createElementBlock("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",onClick:j[3]||(j[3]=F=>O(m.value[2]))},JM))]),KM,e.createElementVNode("div",XM,[QM,(e.openBlock(),e.createElementBlock("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",onClick:j[4]||(j[4]=F=>O(m.value[3]))},tI))]),e.createElementVNode("div",aI,[oI,(e.openBlock(),e.createElementBlock("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",onClick:j[5]||(j[5]=F=>O(m.value[4]))},rI))]),e.createElementVNode("div",iI,[nI,(e.openBlock(),e.createElementBlock("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",onClick:j[6]||(j[6]=F=>O(m.value[5]))},cI))]),dI]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,F=>(e.openBlock(),e.createElementBlock("div",{key:`i-${F.id}`,class:"row scrollable-row"},[e.createElementVNode("div",{class:e.normalizeClass(["row team-info",{odd:F.isOdd}])},[e.createElementVNode("div",pI,[e.createElementVNode("img",{src:F.team_logo,alt:"team logo"},null,8,mI)]),e.createElementVNode("div",uI,e.toDisplayString(F.team_abrev),1)],2),e.createElementVNode("div",{class:e.normalizeClass(["row data-info",{odd:F.isOdd}])},e.toDisplayString(F.player_position),3),e.createElementVNode("div",{class:e.normalizeClass(["row data-info",{odd:F.isOdd}])},e.toDisplayString(F.player_age),3),e.createElementVNode("div",{class:e.normalizeClass(["row data-info",{odd:F.isOdd}])},[e.createElementVNode("img",{src:F.player_country_flag,alt:"player country flag",class:"country-flag"},null,8,fI)],2),e.createElementVNode("div",{class:e.normalizeClass(["row data-info",{odd:F.isOdd}])},e.toDisplayString(F.player_games),3),e.createElementVNode("div",{class:e.normalizeClass(["row data-info",{odd:F.isOdd}])},e.toDisplayString(F.player_min),3),e.createElementVNode("div",{class:e.normalizeClass(["row data-info",{odd:F.isOdd}])},e.toDisplayString(F.league_name),3),e.createElementVNode("div",{class:e.normalizeClass(["row data-info",{odd:F.isOdd}])},[e.createVNode(e.unref(x$),{icon:"https://golstatsimages.blob.core.windows.net/images-library/arrow-btn.png","icon-size":"19px","icon-position":"left",width:"98px",height:"30px","border-radius":"30px","border-width":"1","background-color":"#ffffff1a","font-family":"Poppins-Regular","border-color":"#55636e","text-value":"Ver videos","font-size":"10px",onClick:T=>z(F)},null,8,["onClick"])],2)]))),128))],64)):(e.openBlock(),e.createBlock(v$,{key:1,ref_key:"scrollColumns",ref:s,"available-players":f.value,"is-edit-mode":t.isEditMode,onOpenMedia:z,onClickParameters:q,onSort:O},null,8,["available-players","is-edit-mode"]))],512)],4))}},yI=us(hI,[["__scopeId","data-v-18f2714a"]]),gI={3:"Albanesa",4:"Argelina",6:"Andorrano",7:"Angoleña",8:"Anguillan",9:"Antiguan",10:"Argentina",11:"Armenia",12:"Arubeño",13:"Austríaca",14:"Austríaca",15:"Azerbaiyano",16:"Bahamas",17:"Bareini",18:"Bangladesí",19:"Barbadense",20:"Bielorrusa",21:"Belga",22:"Beliceña",23:"Beninesa",24:"Bermudeña",25:"Butanés",26:"Boliviana",27:"Bosnia",28:"Botsuano",29:"Brasileña",30:"Islas Vírgenes Británicas",31:"Bruneano",32:"Búlgara",33:"Burundés",34:"Burmesa",35:"Burundés",36:"Camboyana",37:"Camerunés",38:"Canadiense",39:"Caboverdiano",40:"Caimanés",41:"Centroafricana",42:"Chadiano",43:"Chilena",44:"China",45:"Isla de Navidad",46:"Cocos Island",47:"Colombiana",48:"Comorense",49:"Congoleña",50:"Cookiano",51:"Costarricense",52:"Marfileña",53:"Croata",54:"Cubana",55:"Chipriota",56:"Checa",57:"Danesa",58:"Djibouti",60:"Dominicana",61:"Timorense",62:"Ecuatoriana",63:"Egipcia",64:"Salvadoreña",65:"Inglesa",66:"Ecuatoguineano",67:"Eritreo",68:"Estoniana",69:"Etíope",70:"Islas Malvinas",71:"Feroés",72:"Fiyiano",73:"Finlandesa",74:"Francesa",75:"Guayana Francesa",76:"Francopolinecio",77:"Gabonesa",78:"Gambiana",79:"Georgiano",80:"Alemana",81:"Ghanesa",82:"Gibraltareño",221:"Británico",84:"Griega",85:"Groenlandés",86:"Granadino",87:"Guadeloupeño",89:"Guatemalteca",90:"Guineana",91:"Guyanés",92:"Haitiana",93:"Hondureña",94:"Hongkongese",95:"Húngaro",96:"Islandesa",97:"Indio",98:"Indonesia",99:"Iraní",100:"Iraquí",101:"Irlandesa",102:"Manés",103:"Israelí",104:"Italiana",105:"Jamaiquina",106:"Japonesa",107:"Jordana",108:"Kazaja",109:"Keniana",110:"Kiribatiano",111:"Coreana",112:"Surcoreana",113:"Kosovan",114:"Kuwaití",115:"Kirguisa",116:"Laosiano",117:"Letona",118:"Libanesa",119:"Basotho",120:"Liberiana",121:"Libia",122:"Liechtenstein",123:"Lituano",124:"Luxemburguesa",125:"Macaneso",126:"Macedonia",127:"Malgache",128:"Malaya",129:"Malaya",130:"Maldivo",131:"Mali",132:"Maltesa",133:"Marshallese",134:"Martiniqueña",135:"Mauritania",136:"Mauriciano",137:"Mahoran",138:"Mexicana",139:"Micronesio",140:"Moldava",141:"Monacan",142:"Mongol",143:"Montenegrina",144:"Montserratiano",145:"Marroqui",146:"Mozambiqueña",147:"Namibio",148:"Nauruan",149:"Nepalí",150:"Holandesa",151:"Neocaledonio",152:"Neozelandesa",153:"Nicaragüense",154:"Niueño",155:"Nigerina",156:"Nigeriana",157:"Noruega",158:"Normariano",159:"Omaní",160:"Palestina",161:"Palestina",162:"Palauan",163:"Panameña",164:"Papú",165:"Paraguaya",166:"Peruana",167:"Filipina",168:"Pitcairnés",169:"Polaca",170:"Portuguesa",171:"Puertorriqueña",172:"Catari",173:"Reunionés",174:"Rumana",175:"Rusa",176:"Ruandés",177:"Santa Elena",178:"Sancristobaleña",179:"Santa Lucía",180:"Miquelonnais",181:"Sanvicentina",182:"Samoano",183:"Sanmariense",184:"Santotomense",185:"Saudí",186:"Escocesa",187:"Senegalense",188:"Serbia",189:"Seychellense",190:"Sierraleonesa",191:"Singapurense",192:"Eslovena",193:"Eslovena",194:"Salomonense",195:"Somalí",196:"Sudafricana",197:"Surosetio",198:"Española",199:"Esrilanques",200:"Sudanés",201:"Surinamés",202:"Swazi",203:"Sueca",204:"Suiza",205:"Sirio",206:"Taiwanesa",207:"Tayiko",208:"Tanzano",209:"Tailandesa",210:"Togo",211:"Tongano",212:"Trinitaria",213:"Tunecina",214:"Turca",215:"Turkmena",216:"none",217:"Tuvaluano",218:"Ugandesa",219:"Ucraniana",220:"Emiratí",222:"Americana",223:"Uruguaya",224:"Uzbeka",225:"Vanuatuense",226:"Venezolana",227:"Vietnamita",228:"Islas Vírgenes",229:"Galesa",230:"Walisiano",231:"Saharaui",232:"Yemení",233:"Zambiana",234:"Zimbabuense",236:"Curazaleña",237:"San Martín",239:"Debutante"},bI={class:"list-view"},_I=Ae({__name:"ListView",props:{playersScouting:{type:Object,default:()=>({})},userId:{type:Number,default:0},lists:{type:Array,default:()=>[]},token:{type:String,default:""},playerAddtionalData:{type:Object,default:()=>({})},playerStats:{type:Object,default:()=>({})},categories:{type:Array,default:()=>[]}},emits:["open-media"],setup(t,{emit:o}){const a=o,l=t,i=d=>{if(!d)return"-";const c=new Date(d),h=new Date;let p=h.getFullYear()-c.getFullYear();const y=h.getMonth()-c.getMonth();return(y<0||y===0&&h.getDate()<c.getDate())&&p--,p};function r(d){a("open-media",d)}const n=d=>{var c,h,p,y,u;return{objeto_player:d,player_photo:d.photo,player_name:d.name,player_id:d.player_id,player_age:i(d.dob),team_name:((c=l.playerAddtionalData[d.player_id])==null?void 0:c.team_name)||"-",team_id:d.team_id,team_logo:"https://golstatsimages.blob.core.windows.net/teams-80/"+d.team_id+".png",position_name:d.position,player_position:d.position,player_country:gI[`${d.nationality_id}`]||d.nationality,player_country_flag:"https://golstatsimages.blob.core.windows.net/flags/"+d.nationality_id+".jpg",player_games:((h=l.playerAddtionalData[d.player_id])==null?void 0:h.games_played)||0,player_min:((p=l.playerAddtionalData[d.player_id])==null?void 0:p.minutes)||0,league_name:(y=l.playerAddtionalData[d.player_id])==null?void 0:y.tournament_name,seasons:[],season_id:((u=l.playerAddtionalData[d.player_id])==null?void 0:u.season_id)||0,stats:d.stats.map(f=>({category_id:f[0],custom_category_id:f[0],name:f[1].replace(/\([^)]*\)/g,"").trim().toLowerCase().replace(/^\w/,m=>m.toUpperCase()),parameters:f.parameters,total:f[2],seasons:f[3]}))}},s=e.computed(()=>l.playersScouting?Object.values(l.playersScouting).map(d=>n(d)):[]);return(d,c)=>(e.openBlock(),e.createElementBlock("div",bI,[e.createVNode(e.unref(yI),{players:s.value,"is-general":!1,"is-edit-mode":!1,"is-table-from-list":!1,onOpenMedia:r},null,8,["players"])]))}},[["__scopeId","data-v-7cb076a0"]]),SI={class:"title"},EI=["disabled"],CI={key:0,class:"loading-spinner"},kI={key:1},wI={key:2},VI={class:"settings-row"},NI={class:"switch-track"},xI={class:"selector-container"},BI={key:1,class:"criterio-wrapper"},FI={class:"content-container"},TI={class:"header-tools header-tools-graph"},AI={key:0,class:"ht-left"},$I={class:"ht-visualization-selector"},MI={key:0,width:"56",height:"56",viewBox:"0 0 56 56",fill:"none",xmlns:"http://www.w3.org/2000/svg"},II={key:1,width:"56",height:"56",viewBox:"0 0 56 56",fill:"none",xmlns:"http://www.w3.org/2000/svg"},RI={key:0,width:"57",height:"56",viewBox:"0 0 57 56",fill:"none",xmlns:"http://www.w3.org/2000/svg"},PI={key:1,width:"56",height:"56",viewBox:"0 0 56 56",fill:"none",xmlns:"http://www.w3.org/2000/svg"},LI={key:0,width:"56",height:"56",viewBox:"0 0 56 56",fill:"none",xmlns:"http://www.w3.org/2000/svg"},OI={key:1,width:"56",height:"56",viewBox:"0 0 56 56",fill:"none",xmlns:"http://www.w3.org/2000/svg"},vI={class:"players-detection"},DI=Ae({__name:"liliniPlayersDetection",props:{userId:{type:[String,Number],default:34047},token:{type:String,default:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MzQwNDcsIm5hbWUiOiJHb2xTdGF0cyBTYW50b3MiLCJ1c2VybmFtZSI6Imdzc2FudG9zIiwiZW1haWwiOiIiLCJwcm92aWRlcl9pZCI6MSwibG9naW5fZ29sc3RhdHMiOjEsImlhdCI6MTc0NjIyMjQ3NCwiZXhwIjoxNzc3NzU4NDc0fQ.fga__q8pm-HbeHeNPWOqz32n8xkE_zcVPiPu8NTAiOM"}},emits:["showProfile","open-media"],setup(t,{emit:o}){const a=t,l=e.ref(Yc()),i=e.ref(Zc()),r=e.ref(null),n=e.ref(null),s=e.ref(null),d=e.computed(()=>({"--width-button-add-player":k.value==="graph"?"550px":"96%","--justify-content-add-player":k.value==="graph"?"flex-start":"center"})),c=e.computed(()=>({...l.value})),h=e.computed(()=>({...i.value})),p={width:"200px",height:"40px",borderColor:"rgba(255, 255, 255, 0.2)"},y=e.ref(!1),u=e.ref(null),f=e.ref({minutesPlayed:0,percentMinutesPlayed:0,lastMonths:Array.from({length:24},(oe,ae)=>ae+1),selectedMonth:6,statistics:{totals:!0,averagePerGame:!1,averagePerMinute:!1}}),m={isExpansionPanel:!1,templateProps:{boxShadow:"0px 4px 4px rgba(0, 0, 0, 0)"},expansionPanelProps:{width:"400px",borderRadius:"8px",fontFamily:"Poppins-Regular"},fieldComponentProps:{widthContainer:"100%",title:"Elige el área o zona de cancha",titleFontSize:"13px"}},g=e.ref(null),b=e.ref(null),S=e.ref(null),v=e.ref(null),q=e.ref(!1),O=e.ref(null),z=e.ref(null),G=e.ref([]),D=e.ref(!1),H=o;function V(oe){H("open-media",oe)}function w(){D.value=!1}function P(){D.value=!0}function R(){r.value&&r.value.showModal()}async function Z(oe){var De;if(O.value||(O.value=[]),O.value.some(Ve=>Ve.player_id===oe.player_id))n.value.showModal(),console.log("El jugador ya existe en la lista:",oe);else try{const Ve=[oe.player_id,...O.value.map(Lt=>Lt.player_id)],Xe=await ne.post("https://1km387uzk3.execute-api.us-east-2.amazonaws.com/qa/players/stats",{players:Ve,positions:s.value||[],last_months:parseInt((De=S.value)==null?void 0:De.lastMonths)||6});console.log("Respuesta del endpoint de stats:",Xe.data);const He=Xe.data.players.find(Lt=>Lt.player_id===oe.player_id);He&&(oe.stats=He.stats,oe.internal_stats=He.internal_stats),O.value=[oe,...O.value],console.log("Jugador agregado exitosamente:",oe)}catch(Ve){console.error("Error al obtener stats de jugadores:",Ve),n.value.showModal()}}function J(oe){console.log("position: ",oe),s.value=oe.positionIds,q.value=!0,g.value=oe}function pe(oe){console.log("filters: ---------------------------------------------------------------> ",oe),console.log("filters structure:",JSON.stringify(oe,null,2)),u.value=oe,q.value=!0}function se(oe){b.value=oe,q.value=!0}function E(oe){S.value=oe,q.value=!0}function A(oe){console.log("IS selected",oe),v.value=oe,q.value=!0}const U=e.ref(!1),L=e.ref(null);async function B(oe=!1){var ae,De,Ve,Xe,He,Lt,fs;try{U.value=!0,L.value=null,O.value=null,z.value=null;const io=y.value&&((ae=u.value)!=null&&ae.productivityFilters)?[...(u.value.productivityFilters||[]).map(Ot=>({name:Ot.name,ids:Ot.id}))]:[],Dl=((De=u.value)==null?void 0:De.offensesConditions)||{},hs={age_or_year:0,categories:io,elegibles:[],fouls:y.value&&Dl.areFoulsCommittedSelected||!1,red_cards:y.value&&Dl.areRedCardsSelected||!1,yellow_cards:y.value&&Dl.areYellowCardsSelected||!1,last_months:parseInt((Ve=S.value)==null?void 0:Ve.lastMonths)||6,productivity_type:y.value?1:2,minutes_played:parseInt((Xe=S.value)==null?void 0:Xe.minutesPlayed)||0,minutes_played_avg:parseInt((He=S.value)==null?void 0:He.percentMinutesPlayed)||0,nationalities:[138],range_age:[],tournaments:((fs=(Lt=v.value)==null?void 0:Lt.filter(Ot=>Ot.isSelected))==null?void 0:fs.map(Ot=>Ot.id))||[1],positions:s.value||[2],type_stats:1,year:b.value==="Sin límite"?1981:b.value?b.value:1981},vR=oe===!0?{...hs,is_default:!0}:hs,no=await ne.post("https://1km387uzk3.execute-api.us-east-2.amazonaws.com/qa/players/productivity",vR);console.log("Respuesta del servidor:",no.data),O.value=no.data.players,z.value={max:no.data.max,internal_max:no.data.internal_max},q.value=!1}catch(io){console.error("Error en la búsqueda:",io),L.value=io.message||"Error al realizar la búsqueda"}finally{U.value=!1}}function j(){y.value=!y.value,q.value=!0}const F=e.ref(null),T=e.ref(!1),C=e.ref("Modificar la importancia del tipo de jugada en forma jerárquica, para encontrar a los futbolistas más productivos de acuerdo a las mísmas."),W=()=>{F.value&&(T.value=F.value.offsetWidth<1200)};async function _(){try{const ae=await ne.create({headers:{Authorization:`${a.token}`}}).get(`https://4j4nfvoh0d.execute-api.us-east-2.amazonaws.com/prod/users/${a.userId}/in-followed`);G.value=ae.data.data.sort((De,Ve)=>new Date(Ve.updated_at)-new Date(De.updated_at)),console.log("Nuevo valor: 2",G.value)}catch(oe){console.error("Error al obtener las listas del usuario:",oe)}}e.onMounted(()=>{W(),window.addEventListener("resize",W),B(!0),_()}),e.onUnmounted(()=>{window.removeEventListener("resize",W)});const k=e.ref("graph");function Y(oe){k.value=oe}const bt=e.computed(()=>g.value&&g.value.name||"Sin posición seleccionada"),_t=e.computed(()=>!b.value||b.value==="Sin límite"?"":b.value);async function LR(){await _()}function OR(oe){H("showProfile",oe)}return(oe,ae)=>{var De,Ve,Xe;return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(Ws,{"is-visible":D.value,onClose:w},null,8,["is-visible"]),e.createVNode(Hc,{ref_key:"modalAddPlayer",ref:r,onAddPlayer:Z},null,512),e.createVNode(qc,{ref_key:"modalPlayerExists",ref:n},null,512),e.createElementVNode("div",{class:"lilini-players-detection",ref_key:"containerRef",ref:F,style:e.normalizeStyle(d.value)},[e.createElementVNode("div",{class:e.normalizeClass(["filters-container",{"mobile-layout":T.value}])},[e.createElementVNode("h1",SI,"Jugadores más productivos: "+e.toDisplayString(bt.value)+" "+e.toDisplayString(_t.value),1),e.createElementVNode("div",{class:e.normalizeClass(["filters-row",{"mobile-layout":T.value}])},[e.createElementVNode("span",{class:e.normalizeClass(["filter-label",{"mobile-label":T.value}])},"Modificar filtros aplicados:",2),e.createElementVNode("div",{class:e.normalizeClass(["filters-content",{"mobile-layout":T.value}])},[e.createElementVNode("div",{class:e.normalizeClass(["selector-container",{"mobile-layout":T.value}])},[e.createVNode(e.unref(k6),{onChangePosition:J})],2),e.createElementVNode("div",{class:e.normalizeClass(["selector-container",{"mobile-layout":T.value}])},[e.createVNode(e.unref(x6),{"dropdown-props":p,years:(De=e.unref(Nt))==null?void 0:De.availableYears,"selected-year":e.unref(Nt).selectedYear||"Sin límite","selected-item-prefix":"A partir del",onChangeYear:se},null,8,["years","selected-year"])],2),e.createElementVNode("div",{class:e.normalizeClass(["selector-container",{"mobile-layout":T.value}])},[e.createVNode(e.unref(el),e.mergeProps({"button-filter-props":h.value,"filter-type":e.unref(N).UNIVERSE,"show-badge-on-filter-full":!1,filters:f.value},m,{width:"98%","onUpdate:filters":E}),null,16,["button-filter-props","filter-type","filters"])],2),e.createElementVNode("div",{class:e.normalizeClass(["selector-container",{"mobile-layout":T.value}])},[e.createVNode(e.unref(el),{style:{"margin-left":"-4px"},width:"99.7%","button-filter-props":c.value,"is-one-tournament-only":!1,"filter-type":e.unref(N).TOURNAMENTS,"show-badge-on-filter-full":!0,filters:oe.tournamentsToFilter,"onUpdate:filters":A},null,8,["button-filter-props","filter-type","filters"])],2),e.createElementVNode("button",{class:e.normalizeClass(["search-button",{active:q.value,loading:U.value,error:L.value}]),onClick:B,disabled:U.value||!q.value},[U.value?(e.openBlock(),e.createElementBlock("span",CI)):L.value?(e.openBlock(),e.createElementBlock("span",kI,"Error")):(e.openBlock(),e.createElementBlock("span",wI,"Buscar"))],10,EI)],2)],2),e.createElementVNode("div",VI,[ae[4]||(ae[4]=e.createElementVNode("span",{class:"settings-label"},"Jugadores Rankeados por:",-1)),e.createElementVNode("span",{class:e.normalizeClass(["methodology-label",{active:!y.value}])},"Metodología profesor Lillini",2),e.createElementVNode("div",{class:"toggle-container",onClick:j},[e.createElementVNode("div",NI,[e.createElementVNode("div",{class:e.normalizeClass(["switch-ball",{on:y.value}])},null,2)])]),e.createElementVNode("span",{class:e.normalizeClass(["variables-label",{active:y.value}])},"Variables Dinámicas",2),e.createElementVNode("div",xI,[y.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[g.value?(e.openBlock(),e.createBlock(e.unref(el),{key:0,"button-filter-props":{backgroundColor:"#2e3b46",width:"250px",borderColor:"rgba(255, 255, 255, 0.20)",infoBorderColor:"rgba(255, 255, 255, 0.20)",showIcon:!1,height:"30px",padding:"5px 2.2%",textFontFamily:"Poppins-Regular",showBadgeOnFilterFull:!1,showBadge:!1,text:"Modificar Súper Ponderación"},"show-badge-on-filter-full":!1,filters:g.value.categories,"filter-type":e.unref(N).PRODUCTIVITY,"is-for-template-form":!1,"productivity-max-categories":12,"productivity-min-categories":5,width:"99.7%","template-props":{width:"940px",maxWidth:"940px"},"are-productivity-buttons-visible":!1,"productivity-text":C.value,"onUpdate:filters":pe},null,8,["filters","filter-type","productivity-text"])):e.createCommentVNode("",!0)],64)):(e.openBlock(),e.createElementBlock("div",BI,[e.createElementVNode("button",{class:"criterio-btn",onClick:P},ae[3]||(ae[3]=[e.createTextVNode(" Ver criterio pesos "),e.createElementVNode("span",{class:"eye-icon"},[e.createElementVNode("svg",{width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("ellipse",{cx:"11",cy:"11",rx:"8",ry:"5",stroke:"#fff","stroke-opacity":"0.7","stroke-width":"1.5"}),e.createElementVNode("circle",{cx:"11",cy:"11",r:"2",fill:"#fff","fill-opacity":"0.7"})])],-1)]))]))])])],2),e.createElementVNode("div",FI,[e.createElementVNode("div",TI,[k.value==="graph"?(e.openBlock(),e.createElementBlock("div",AI,ae[5]||(ae[5]=[e.createElementVNode("span",{class:"ht-title"},"Ranking",-1),e.createElementVNode("span",{class:"ht-action"},[e.createTextVNode("Agregar"),e.createElementVNode("br"),e.createTextVNode("a lista")],-1),e.createElementVNode("span",{class:"ht-action"},[e.createTextVNode("Ver"),e.createElementVNode("br"),e.createTextVNode("en spider")],-1)]))):e.createCommentVNode("",!0),ae[13]||(ae[13]=e.createElementVNode("div",{class:"ht-separator"},null,-1)),e.createElementVNode("div",{class:e.normalizeClass(["ht-right",{centered:k.value==="list"}])},[e.createElementVNode("div",{class:e.normalizeClass(["ht-right-inner",{centered:k.value==="list"}])},[ae[12]||(ae[12]=e.createElementVNode("span",{class:"ht-label"},"Selecciona la visualización:",-1)),e.createElementVNode("div",$I,[e.createElementVNode("button",{class:e.normalizeClass(["ht-icon",{active:k.value==="graph"}]),onClick:ae[0]||(ae[0]=He=>Y("graph"))},[k.value==="graph"?(e.openBlock(),e.createElementBlock("svg",MI,ae[6]||(ae[6]=[e.createStaticVNode('<path d="M7 0.5H49C52.5899 0.5 55.5 3.41015 55.5 7V49C55.5 52.5899 52.5899 55.5 49 55.5H7C3.41015 55.5 0.5 52.5899 0.5 49V7C0.5 3.41015 3.41015 0.5 7 0.5Z" fill="black" fill-opacity="0.16" data-v-7aa6ffe8></path><path d="M7 0.5H49C52.5899 0.5 55.5 3.41015 55.5 7V49C55.5 52.5899 52.5899 55.5 49 55.5H7C3.41015 55.5 0.5 52.5899 0.5 49V7C0.5 3.41015 3.41015 0.5 7 0.5Z" stroke="#CBEE6B" data-v-7aa6ffe8></path><path d="M17.2832 26.7578C16.8392 27.5273 16.839 28.4757 17.2832 29.2451L21.5635 36.6582C22.0078 37.4276 22.8293 37.9014 23.7178 37.9014L32.2773 37.9014C33.1658 37.9014 33.9873 37.4276 34.4316 36.6582L38.7119 29.2451C39.1561 28.4757 39.156 27.5273 38.7119 26.7578L34.4316 19.3447C33.9874 18.5752 33.1659 18.1006 32.2773 18.1006L23.7178 18.1006C22.8849 18.1006 22.1109 18.5172 21.6514 19.2031L21.5635 19.3447L17.2832 26.7578Z" stroke="#88939A" stroke-width="1.21324" data-v-7aa6ffe8></path><path d="M9.32324 26.375C8.77891 27.3178 8.74529 28.4662 9.22168 29.4346L9.32324 29.625L17.2549 43.3623C17.8355 44.3677 18.9083 44.9873 20.0693 44.9873L35.9307 44.9873C37.0917 44.9873 38.1645 44.3677 38.7451 43.3623L46.6768 29.625C47.257 28.6195 47.2572 27.3804 46.6768 26.375L38.7451 12.6387C38.1645 11.6332 37.0917 11.0137 35.9307 11.0137L20.0693 11.0137C18.9083 11.0137 17.8355 11.6332 17.2549 12.6387L9.32324 26.375Z" stroke="#88939A" stroke-width="1.75" data-v-7aa6ffe8></path><path d="M37.8906 10.8027L18.1683 44.9881" stroke="#88939A" stroke-width="1.21324" data-v-7aa6ffe8></path><path d="M18.0391 10.8613L37.7966 44.9879" stroke="#88939A" stroke-width="1.21324" data-v-7aa6ffe8></path><path d="M7.97105 28.002H48.0078" stroke="#88939A" stroke-width="1.21324" data-v-7aa6ffe8></path><path d="M22.542 19.5566L22.542 27.3945L28.3516 27.3945L28.5273 27.6982L34.0674 37.2949L39.0137 28.7295C39.2737 28.2792 39.2735 27.7238 39.0137 27.2734L34.1377 18.8291C33.8776 18.3786 33.3971 18.1006 32.877 18.1006L23.998 18.1006C23.194 18.1006 22.542 18.7526 22.542 19.5566Z" fill="#CBEE6B" fill-opacity="0.6" stroke="#CBEE6B" stroke-width="1.21324" data-v-7aa6ffe8></path>',8)]))):(e.openBlock(),e.createElementBlock("svg",II,ae[7]||(ae[7]=[e.createStaticVNode('<path d="M17.2832 26.7578C16.8392 27.5273 16.839 28.4757 17.2832 29.2451L21.5635 36.6582C22.0078 37.4276 22.8293 37.9014 23.7178 37.9014L32.2773 37.9014C33.1658 37.9014 33.9873 37.4276 34.4316 36.6582L38.7119 29.2451C39.1561 28.4757 39.156 27.5273 38.7119 26.7578L34.4316 19.3447C33.9874 18.5752 33.1659 18.1006 32.2773 18.1006L23.7178 18.1006C22.8849 18.1006 22.1109 18.5172 21.6514 19.2031L21.5635 19.3447L17.2832 26.7578Z" stroke="#88939A" stroke-width="1.21324" data-v-7aa6ffe8></path><path d="M9.32324 26.375C8.77891 27.3178 8.74529 28.4662 9.22168 29.4346L9.32324 29.625L17.2549 43.3623C17.8355 44.3677 18.9083 44.9873 20.0693 44.9873L35.9307 44.9873C37.0917 44.9873 38.1645 44.3677 38.7451 43.3623L46.6768 29.625C47.257 28.6195 47.2572 27.3804 46.6768 26.375L38.7451 12.6387C38.1645 11.6332 37.0917 11.0137 35.9307 11.0137L20.0693 11.0137C18.9083 11.0137 17.8355 11.6332 17.2549 12.6387L9.32324 26.375Z" stroke="#88939A" stroke-width="1.75" data-v-7aa6ffe8></path><path d="M37.8906 10.8027L18.1683 44.9881" stroke="#88939A" stroke-width="1.21324" data-v-7aa6ffe8></path><path d="M18.0391 10.8613L37.7966 44.9879" stroke="#88939A" stroke-width="1.21324" data-v-7aa6ffe8></path><path d="M7.97105 28.002H48.0078" stroke="#88939A" stroke-width="1.21324" data-v-7aa6ffe8></path><path d="M22.542 19.5566L22.542 27.3945L28.3516 27.3945L28.5273 27.6982L34.0674 37.2949L39.0137 28.7295C39.2737 28.2792 39.2735 27.7238 39.0137 27.2734L34.1377 18.8291C33.8776 18.3786 33.3971 18.1006 32.877 18.1006L23.998 18.1006C23.194 18.1006 22.542 18.7526 22.542 19.5566Z" fill="white" fill-opacity="0.6" data-v-7aa6ffe8></path><path d="M22.542 19.5566L22.542 27.3945L28.3516 27.3945L28.5273 27.6982L34.0674 37.2949L39.0137 28.7295C39.2737 28.2792 39.2735 27.7238 39.0137 27.2734L34.1377 18.8291C33.8776 18.3786 33.3971 18.1006 32.877 18.1006L23.998 18.1006C23.194 18.1006 22.542 18.7526 22.542 19.5566Z" stroke="white" stroke-opacity="0.5" stroke-width="1.21324" data-v-7aa6ffe8></path>',7)])))],2),e.createElementVNode("button",{class:e.normalizeClass(["ht-icon",{active:k.value==="grid"}]),onClick:ae[1]||(ae[1]=He=>Y("grid"))},[k.value==="grid"?(e.openBlock(),e.createElementBlock("svg",RI,ae[8]||(ae[8]=[e.createStaticVNode('<path d="M7.5 0.5H49.5C53.0899 0.5 56 3.41015 56 7V49C56 52.5899 53.0899 55.5 49.5 55.5H7.5C3.91015 55.5 1 52.5899 1 49V7C1 3.41015 3.91015 0.5 7.5 0.5Z" fill="black" fill-opacity="0.16" data-v-7aa6ffe8></path><path d="M7.5 0.5H49.5C53.0899 0.5 56 3.41015 56 7V49C56 52.5899 53.0899 55.5 49.5 55.5H7.5C3.91015 55.5 1 52.5899 1 49V7C1 3.41015 3.91015 0.5 7.5 0.5Z" stroke="#CBEE6B" data-v-7aa6ffe8></path><path d="M25 12.25H12.75V24.5H25V12.25Z" stroke="#CBEE6B" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" data-v-7aa6ffe8></path><path d="M44.25 12.25H32V24.5H44.25V12.25Z" stroke="#CBEE6B" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" data-v-7aa6ffe8></path><path d="M44.25 31.5H32V43.75H44.25V31.5Z" stroke="#CBEE6B" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" data-v-7aa6ffe8></path><path d="M25 31.5H12.75V43.75H25V31.5Z" stroke="#CBEE6B" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" data-v-7aa6ffe8></path>',6)]))):(e.openBlock(),e.createElementBlock("svg",PI,ae[9]||(ae[9]=[e.createStaticVNode('<g opacity="0.4" data-v-7aa6ffe8><path d="M24.5 12.25H12.25V24.5H24.5V12.25Z" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" data-v-7aa6ffe8></path><path d="M43.75 12.25H31.5V24.5H43.75V12.25Z" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" data-v-7aa6ffe8></path><path d="M43.75 31.5H31.5V43.75H43.75V31.5Z" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" data-v-7aa6ffe8></path><path d="M24.5 31.5H12.25V43.75H24.5V31.5Z" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" data-v-7aa6ffe8></path></g>',1)])))],2),e.createElementVNode("button",{class:e.normalizeClass(["ht-icon",{active:k.value==="list"}]),onClick:ae[2]||(ae[2]=He=>Y("list"))},[k.value==="list"?(e.openBlock(),e.createElementBlock("svg",LI,ae[10]||(ae[10]=[e.createStaticVNode('<path d="M7 0.5H49C52.5899 0.5 55.5 3.41015 55.5 7V49C55.5 52.5899 52.5899 55.5 49 55.5H7C3.41015 55.5 0.5 52.5899 0.5 49V7C0.5 3.41015 3.41015 0.5 7 0.5Z" fill="black" fill-opacity="0.16" data-v-7aa6ffe8></path><path d="M7 0.5H49C52.5899 0.5 55.5 3.41015 55.5 7V49C55.5 52.5899 52.5899 55.5 49 55.5H7C3.41015 55.5 0.5 52.5899 0.5 49V7C0.5 3.41015 3.41015 0.5 7 0.5Z" stroke="#CBEE6B" data-v-7aa6ffe8></path><path d="M21 17.5H43.75" stroke="#CBEE6B" stroke-width="3.5" stroke-linecap="round" stroke-linejoin="round" data-v-7aa6ffe8></path><path d="M21 28H43.75" stroke="#CBEE6B" stroke-width="3.5" stroke-linecap="round" stroke-linejoin="round" data-v-7aa6ffe8></path><path d="M21 38.5H43.75" stroke="#CBEE6B" stroke-width="3.5" stroke-linecap="round" stroke-linejoin="round" data-v-7aa6ffe8></path><path d="M12.25 17.5H12.2675" stroke="#CBEE6B" stroke-width="3.5" stroke-linecap="round" stroke-linejoin="round" data-v-7aa6ffe8></path><path d="M12.25 28H12.2675" stroke="#CBEE6B" stroke-width="3.5" stroke-linecap="round" stroke-linejoin="round" data-v-7aa6ffe8></path><path d="M12.25 38.5H12.2675" stroke="#CBEE6B" stroke-width="3.5" stroke-linecap="round" stroke-linejoin="round" data-v-7aa6ffe8></path>',8)]))):(e.openBlock(),e.createElementBlock("svg",OI,ae[11]||(ae[11]=[e.createStaticVNode('<g opacity="0.4" data-v-7aa6ffe8><path d="M21 17.5H43.75" stroke="white" stroke-width="3.5" stroke-linecap="round" stroke-linejoin="round" data-v-7aa6ffe8></path><path d="M21 28H43.75" stroke="white" stroke-width="3.5" stroke-linecap="round" stroke-linejoin="round" data-v-7aa6ffe8></path><path d="M21 38.5H43.75" stroke="white" stroke-width="3.5" stroke-linecap="round" stroke-linejoin="round" data-v-7aa6ffe8></path><path d="M12.25 17.5H12.2675" stroke="white" stroke-width="3.5" stroke-linecap="round" stroke-linejoin="round" data-v-7aa6ffe8></path><path d="M12.25 28H12.2675" stroke="white" stroke-width="3.5" stroke-linecap="round" stroke-linejoin="round" data-v-7aa6ffe8></path><path d="M12.25 38.5H12.2675" stroke="white" stroke-width="3.5" stroke-linecap="round" stroke-linejoin="round" data-v-7aa6ffe8></path></g>',1)])))],2)])],2)],2)]),e.createElementVNode("div",vI,[O.value?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(k.value==="graph"?kT:k.value==="grid"?r$:_I),{key:0,"dynamic-categories":(Ve=g.value)==null?void 0:Ve.categories,"user-id":t.userId,"type-productivity":y.value?1:2,"players-scouting":O.value,max:z.value,token:t.token,lists:G.value,"position-ids":(Xe=g.value)==null?void 0:Xe.positionIds,onOpenMedia:V,onShowProfile:OR,onPlayerAdded:LR},null,40,["dynamic-categories","user-id","type-productivity","players-scouting","max","token","lists","position-ids"])):e.createCommentVNode("",!0)])]),e.createElementVNode("div",{class:"add-player-container"},[e.createElementVNode("div",{role:"button",class:"button-add-player",onClick:R},ae[14]||(ae[14]=[e.createElementVNode("div",null,"Agregar jugador",-1),e.createElementVNode("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M13.2016 17.2012V15.601C13.2016 14.7522 12.8645 13.9381 12.2643 13.3379C11.664 12.7377 10.85 12.4005 10.0012 12.4005H5.20047C4.35165 12.4005 3.5376 12.7377 2.9374 13.3379C2.33719 13.9381 2 14.7522 2 15.601V17.2012",stroke:"white","stroke-opacity":"0.5","stroke-width":"1.44023","stroke-linecap":"round","stroke-linejoin":"round"}),e.createElementVNode("path",{d:"M7.60086 9.19977C9.36843 9.19977 10.8013 7.76687 10.8013 5.9993C10.8013 4.23173 9.36843 2.79883 7.60086 2.79883C5.83329 2.79883 4.40039 4.23173 4.40039 5.9993C4.40039 7.76687 5.83329 9.19977 7.60086 9.19977Z",stroke:"white","stroke-opacity":"0.5","stroke-width":"1.44023","stroke-linecap":"round","stroke-linejoin":"round"}),e.createElementVNode("path",{d:"M15.5996 6.79944V11.6001M17.9999 9.19979H13.1992",stroke:"white","stroke-opacity":"0.5","stroke-width":"1.44023","stroke-linecap":"round","stroke-linejoin":"round"})],-1)]))])],4)],64)}}},[["__scopeId","data-v-7aa6ffe8"]]),zI={class:"subcategory-group"},UI={__name:"SubcategoryGroup",props:{subcategoryGroup:{type:Array,default:()=>[]}},setup(t){return(o,a)=>(e.openBlock(),e.createElementBlock("div",zI,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.subcategoryGroup,l=>(e.openBlock(),e.createBlock(e.unref(ee),{key:l.id,modelValue:l.isSelected,"onUpdate:modelValue":i=>l.isSelected=i,label:l.name},null,8,["modelValue","onUpdate:modelValue","label"]))),128))]))}},jI=le(UI,[["__scopeId","data-v-ae6f3d72"]]),HI={class:"filter-subcategories"},WI=Object.freeze(Object.defineProperty({__proto__:null,default:le({__name:"FilterSubcategories",props:{subcategoryGroups:{type:Array,default:()=>[]}},setup(t){return(o,a)=>(e.openBlock(),e.createElementBlock("div",HI,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.subcategoryGroups,l=>(e.openBlock(),e.createElementBlock("div",{key:l.id,class:"filter-subcategories__group"},[e.createVNode(jI,{subcategoryGroup:l},null,8,["subcategoryGroup"])]))),128))]))}},[["__scopeId","data-v-5edaefc2"]])},Symbol.toStringTag,{value:"Module"})),lo=t=>(e.pushScopeId("data-v-80d9c265"),t=t(),e.popScopeId(),t),GI={class:"details__header"},qI=lo(()=>e.createElementVNode("div",{class:"details__header__title"},"Jugando como",-1)),YI={class:"details__header__checkbox"},ZI={class:"details__body"},JI={class:"details__body__playing-as"},KI=["onClick"],XI={class:"details__header"},QI=lo(()=>e.createElementVNode("div",{class:"details__header__title"},"En: (Elige el lapso de tiempo)",-1)),eR={class:"details__header__checkbox"},tR={class:"details__body"},aR=lo(()=>e.createElementVNode("div",{class:"details__body__title"},"1er tiempo",-1)),oR={class:"details__body__game-section"},lR=["onClick"],rR={class:"details__body"},iR=lo(()=>e.createElementVNode("div",{class:"details__body__title"},"2do tiempo",-1)),nR={class:"details__body__game-section"},sR=["onClick"],cR=Object.freeze(Object.defineProperty({__proto__:null,default:le({__name:"FilterConditions",props:{playingAs:{type:Array,default:()=>[{name:"Local",isSelected:!0},{name:"Visitante",isSelected:!0}]},gameSections:{type:Array,default:()=>[{text:"0-15",value:1,isSelected:!0},{text:"16-30",value:2,isSelected:!0},{text:"31-45",value:3,isSelected:!0},{text:"46-60",value:4,isSelected:!0},{text:"61-75",value:5,isSelected:!0},{text:"76-90",value:6,isSelected:!0}]},buttonsBackgroundColor:{type:String,default:"rgba(255, 255, 255, 0)"},buttonsBackgroundColorActive:{type:String,default:"rgba(203, 238, 107, 0.05)"},buttonsTextColor:{type:String,default:"rgba(255, 255, 255, 0.8)"},buttonsTextColorActive:{type:String,default:"rgba(255, 255, 255, 1)"},buttonsBorderColor:{type:String,default:"#8ea2ab"},buttonsBorderColorActive:{type:String,default:"#cbee6b"},buttonsBorderWidth:{type:String,default:"0.8px"},buttonsBorderWidthActive:{type:String,default:"1px"},buttonsBorderRadius:{type:String,default:"4px"}},setup(t){const o=t;e.useCssVars(h=>({"49cba245":t.buttonsBackgroundColor,"52f02da6":t.buttonsTextColor,"7d3f686a":t.buttonsBorderWidth,"7c286a07":t.buttonsBorderColor,"24a6f4aa":t.buttonsBackgroundColorActive,cd8d7768:t.buttonsTextColorActive,"35fa5c10":t.buttonsBorderWidthActive,"0cde1826":t.buttonsBorderColorActive}));const a=e.computed(()=>o.playingAs.every(h=>h.isSelected)),l=e.computed(()=>o.gameSections.every(h=>h.isSelected)),i=e.computed(()=>o.gameSections.reduce((h,p)=>(p.value<=3?h.firstHalf.push(p):h.secondHalf.push(p),h),{firstHalf:[],secondHalf:[]})),r=e.computed(()=>({"--border-radius-first-button":`${o.buttonsBorderRadius} 0 0 ${o.buttonsBorderRadius}`,"--border-radius-last-button":`0 ${o.buttonsBorderRadius} ${o.buttonsBorderRadius} 0`}));function n(h){h?o.playingAs.forEach(p=>{p.isSelected=!0}):o.playingAs.forEach((p,y)=>{p.isSelected=y===0})}function s(h){o.playingAs.filter(p=>p.isSelected).length===1&&h.isSelected||(h.isSelected=!h.isSelected)}function d(h){o.gameSections.filter(p=>p.isSelected).length===1&&h.isSelected||(h.isSelected=!h.isSelected)}function c(h){h?o.gameSections.forEach(p=>{p.isSelected=!0}):o.gameSections.forEach((p,y)=>{p.isSelected=y===0})}return(h,p)=>(e.openBlock(),e.createElementBlock("div",{class:"details",style:e.normalizeStyle(r.value)},[e.createElementVNode("div",GI,[qI,e.createElementVNode("div",YI,[e.createVNode(e.unref(ee),{label:"Todos","model-value":a.value,"onUpdate:modelValue":n},null,8,["model-value"])])]),e.createElementVNode("div",ZI,[e.createElementVNode("div",JI,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.playingAs,(y,u)=>(e.openBlock(),e.createElementBlock("div",{key:`pa${u}`,class:e.normalizeClass(["details__body__button",{active:y.isSelected}]),onClick:f=>s(y)},e.toDisplayString(y.name),11,KI))),128))])]),e.createElementVNode("div",XI,[QI,e.createElementVNode("div",eR,[e.createVNode(e.unref(ee),{label:"Todos","model-value":l.value,"onUpdate:modelValue":c},null,8,["model-value"])])]),e.createElementVNode("div",tR,[aR,e.createElementVNode("div",oR,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value.firstHalf,(y,u)=>(e.openBlock(),e.createElementBlock("div",{key:`pa${u}`,class:e.normalizeClass(["details__body__button",{active:y.isSelected}]),onClick:f=>d(y)},e.toDisplayString(y.text),11,lR))),128))])]),e.createElementVNode("div",rR,[iR,e.createElementVNode("div",nR,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value.secondHalf,(y,u)=>(e.openBlock(),e.createElementBlock("div",{key:`pa${u}`,class:e.normalizeClass(["details__body__button",{active:y.isSelected}]),onClick:f=>d(y)},e.toDisplayString(y.text),11,sR))),128))])])],4))}},[["__scopeId","data-v-80d9c265"]])},Symbol.toStringTag,{value:"Module"})),dR={class:"filter-field"},pR=Object.freeze(Object.defineProperty({__proto__:null,default:le({__name:"FilterField",setup(t){const o=e.ref(Array.from({length:16},(l,i)=>i+1));function a(){}return(l,i)=>(e.openBlock(),e.createElementBlock("div",dR,[e.createVNode(e.unref(qr),{width:"100%","background-color":"#2E3B46",value:o.value,"onUpdate:modelValue":a},null,8,["value"])]))}},[["__scopeId","data-v-8103c3e1"]])},Symbol.toStringTag,{value:"Module"})),mR={class:"subcategory-group"},uR={__name:"SubcategoryGroup",props:{subcategoryGroup:{type:Array,default:()=>[]}},setup(t){return(o,a)=>(e.openBlock(),e.createElementBlock("div",mR,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.subcategoryGroup,l=>(e.openBlock(),e.createBlock(e.unref(te),{key:l.id,modelValue:l.isSelected,"onUpdate:modelValue":i=>l.isSelected=i,label:l.name},null,8,["modelValue","onUpdate:modelValue","label"]))),128))]))}},fR=re(uR,[["__scopeId","data-v-ae6f3d72"]]),hR={class:"filter-subcategories"},yR=Object.freeze(Object.defineProperty({__proto__:null,default:re({__name:"FilterSubcategories",props:{subcategoryGroups:{type:Array,default:()=>[]}},setup(t){return(o,a)=>(e.openBlock(),e.createElementBlock("div",hR,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.subcategoryGroups,l=>(e.openBlock(),e.createElementBlock("div",{key:l.id,class:"filter-subcategories__group"},[e.createVNode(fR,{subcategoryGroup:l},null,8,["subcategoryGroup"])]))),128))]))}},[["__scopeId","data-v-5edaefc2"]])},Symbol.toStringTag,{value:"Module"})),ro=t=>(e.pushScopeId("data-v-80d9c265"),t=t(),e.popScopeId(),t),gR={class:"details__header"},bR=ro(()=>e.createElementVNode("div",{class:"details__header__title"},"Jugando como",-1)),_R={class:"details__header__checkbox"},SR={class:"details__body"},ER={class:"details__body__playing-as"},CR=["onClick"],kR={class:"details__header"},wR=ro(()=>e.createElementVNode("div",{class:"details__header__title"},"En: (Elige el lapso de tiempo)",-1)),VR={class:"details__header__checkbox"},NR={class:"details__body"},xR=ro(()=>e.createElementVNode("div",{class:"details__body__title"},"1er tiempo",-1)),BR={class:"details__body__game-section"},FR=["onClick"],TR={class:"details__body"},AR=ro(()=>e.createElementVNode("div",{class:"details__body__title"},"2do tiempo",-1)),$R={class:"details__body__game-section"},MR=["onClick"],IR=Object.freeze(Object.defineProperty({__proto__:null,default:re({__name:"FilterConditions",props:{playingAs:{type:Array,default:()=>[{name:"Local",isSelected:!0},{name:"Visitante",isSelected:!0}]},gameSections:{type:Array,default:()=>[{text:"0-15",value:1,isSelected:!0},{text:"16-30",value:2,isSelected:!0},{text:"31-45",value:3,isSelected:!0},{text:"46-60",value:4,isSelected:!0},{text:"61-75",value:5,isSelected:!0},{text:"76-90",value:6,isSelected:!0}]},buttonsBackgroundColor:{type:String,default:"rgba(255, 255, 255, 0)"},buttonsBackgroundColorActive:{type:String,default:"rgba(203, 238, 107, 0.05)"},buttonsTextColor:{type:String,default:"rgba(255, 255, 255, 0.8)"},buttonsTextColorActive:{type:String,default:"rgba(255, 255, 255, 1)"},buttonsBorderColor:{type:String,default:"#8ea2ab"},buttonsBorderColorActive:{type:String,default:"#cbee6b"},buttonsBorderWidth:{type:String,default:"0.8px"},buttonsBorderWidthActive:{type:String,default:"1px"},buttonsBorderRadius:{type:String,default:"4px"}},setup(t){const o=t;e.useCssVars(h=>({"49cba245":t.buttonsBackgroundColor,"52f02da6":t.buttonsTextColor,"7d3f686a":t.buttonsBorderWidth,"7c286a07":t.buttonsBorderColor,"24a6f4aa":t.buttonsBackgroundColorActive,cd8d7768:t.buttonsTextColorActive,"35fa5c10":t.buttonsBorderWidthActive,"0cde1826":t.buttonsBorderColorActive}));const a=e.computed(()=>o.playingAs.every(h=>h.isSelected)),l=e.computed(()=>o.gameSections.every(h=>h.isSelected)),i=e.computed(()=>o.gameSections.reduce((h,p)=>(p.value<=3?h.firstHalf.push(p):h.secondHalf.push(p),h),{firstHalf:[],secondHalf:[]})),r=e.computed(()=>({"--border-radius-first-button":`${o.buttonsBorderRadius} 0 0 ${o.buttonsBorderRadius}`,"--border-radius-last-button":`0 ${o.buttonsBorderRadius} ${o.buttonsBorderRadius} 0`}));function n(h){h?o.playingAs.forEach(p=>{p.isSelected=!0}):o.playingAs.forEach((p,y)=>{p.isSelected=y===0})}function s(h){o.playingAs.filter(p=>p.isSelected).length===1&&h.isSelected||(h.isSelected=!h.isSelected)}function d(h){o.gameSections.filter(p=>p.isSelected).length===1&&h.isSelected||(h.isSelected=!h.isSelected)}function c(h){h?o.gameSections.forEach(p=>{p.isSelected=!0}):o.gameSections.forEach((p,y)=>{p.isSelected=y===0})}return(h,p)=>(e.openBlock(),e.createElementBlock("div",{class:"details",style:e.normalizeStyle(r.value)},[e.createElementVNode("div",gR,[bR,e.createElementVNode("div",_R,[e.createVNode(e.unref(te),{label:"Todos","model-value":a.value,"onUpdate:modelValue":n},null,8,["model-value"])])]),e.createElementVNode("div",SR,[e.createElementVNode("div",ER,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.playingAs,(y,u)=>(e.openBlock(),e.createElementBlock("div",{key:`pa${u}`,class:e.normalizeClass(["details__body__button",{active:y.isSelected}]),onClick:f=>s(y)},e.toDisplayString(y.name),11,CR))),128))])]),e.createElementVNode("div",kR,[wR,e.createElementVNode("div",VR,[e.createVNode(e.unref(te),{label:"Todos","model-value":l.value,"onUpdate:modelValue":c},null,8,["model-value"])])]),e.createElementVNode("div",NR,[xR,e.createElementVNode("div",BR,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value.firstHalf,(y,u)=>(e.openBlock(),e.createElementBlock("div",{key:`pa${u}`,class:e.normalizeClass(["details__body__button",{active:y.isSelected}]),onClick:f=>d(y)},e.toDisplayString(y.text),11,FR))),128))])]),e.createElementVNode("div",TR,[AR,e.createElementVNode("div",$R,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value.secondHalf,(y,u)=>(e.openBlock(),e.createElementBlock("div",{key:`pa${u}`,class:e.normalizeClass(["details__body__button",{active:y.isSelected}]),onClick:f=>d(y)},e.toDisplayString(y.text),11,MR))),128))])])],4))}},[["__scopeId","data-v-80d9c265"]])},Symbol.toStringTag,{value:"Module"})),RR={class:"filter-field"},PR=Object.freeze(Object.defineProperty({__proto__:null,default:re({__name:"FilterField",setup(t){const o=e.ref(Array.from({length:16},(l,i)=>i+1));function a(){}return(l,i)=>(e.openBlock(),e.createElementBlock("div",RR,[e.createVNode(e.unref(sn),{width:"100%","background-color":"#2E3B46",value:o.value,"onUpdate:modelValue":a},null,8,["value"])]))}},[["__scopeId","data-v-8103c3e1"]])},Symbol.toStringTag,{value:"Module"}));Qe.LiliniPlayerDetection=DI,Object.defineProperty(Qe,Symbol.toStringTag,{value:"Module"})});
20
+ `}}}));e.watch(()=>o.players,(m,g)=>{m&&m.length?(i.value=m.map(b=>({...b,statsGraph:[]})),l.value):r.value=[]},{immediate:!0,deep:!0});let p=[];async function y(m=!1){try{const g=i.value.map(O=>O.objeto_player?O.objeto_player.player_id||O.objeto_player.id:O.id||O.player_id),b=`https://4j4nfvoh0d.execute-api.us-east-2.amazonaws.com/prod/users/${o.userId}/in-followed/stats?months=6`,S={players:g,tournament_id_for_max_value:0};if(p.length===g.length&&p.every(O=>g.includes(O))||(p=[...g]),o.customCategories)S.variables=l.value.productivityFilters.reduce((O,z)=>{if(z.isSelected){const G={...z};delete G.isSelected,O.push(G)}return O},[]);else if(o.dynamicCategories&&l.value){const O=[];S.categories=l.value.productivityFilters.reduce((z,G)=>{if(G.isSelected){O.push(...G.id);const D={ids:G.id,name:G.name};G.parameters&&(D.parameters={...G.parameters}),z.push(D)}return z},[])}if(!S.variables&&!S.categories)return;const v=JSON.stringify(S),q=await(await fetch(b,{method:"PUT",headers:{Authorization:o.token},body:v})).json();u(q,!!l.value)}catch(g){console.error("Error",g)}}function u(m,g=!1){const b={...m};if(!b.max||!b.data)return;if(g){const q=new Map,O=Object.entries(b.data).reduce((z,[G,D],H)=>{const V={playerId:G,categoriesByName:new Map};return D.forEach(w=>{const P=V.categoriesByName.get(w[1]),R=q.get(w[1]);if(P){if(P.categoriesIds.push(w[0]),P.categoriesIds.sort(),P.totals.push(w[2]),H===0&&R){const Z=b.max.find(J=>J[0]===w[0]);Z&&(R.categoriesIds.push(w[0]),R.categoriesIds.sort(),R.max.push(Z[1]))}}else if(V.categoriesByName.set(w[1],{categoriesIds:[w[0]],totals:[w[2]]}),H===0){const Z=b.max.find(J=>J[0]===w[0]);Z&&q.set(w[1],{categoriesIds:[w[0]],max:[Z[1]]})}}),z.push(V),z},[]);b.data=O.reduce((z,G)=>{const D=[];return G.categoriesByName.forEach((H,V)=>{D.push([Array.from(H.categoriesIds).reduce((w,P)=>`${w}-${P}`,""),V,H.totals.reduce((w,P)=>w+P,0)])}),z[G.playerId]=D,z},{}),b.max=q.values().map(z=>[z.categoriesIds.reduce((G,D)=>`${G}-${D}`,""),z.max.reduce((G,D)=>G+D,0)])}const S=b.max.reduce((q,[O,z])=>(q.set(O,z),q),new Map),v=Object.entries(b.data).reduce((q,[O,z])=>(q.set(Number(O),z),q),new Map);r.value=[],i.value.forEach(q=>{const O=v.get(q.objeto_player?q.objeto_player.player_id:q.id||q.player_id);q.statsGraph=[],O&&(q.statsGraph=O.map((z,G)=>{const D=Number(S.get(z[0])),H=z[2],V=G+1;return r.value.length<O.length&&r.value.push({position:V,name:z[1]}),{position:V,name:z[1],playerStat:H,leagueMax:D,id:z[0],playerPercentage:D?Math.floor(H/D*100):H,isVisible:!0}}))})}function f(m){l.value=m,y()}return(m,g)=>{const b=e.resolveComponent("apexchart");return e.openBlock(),e.createElementBlock("div",{class:"graph-spider",style:e.normalizeStyle(n.value)},[e.createElementVNode("div",lT,e.toDisplayString(t.title),1),e.createElementVNode("div",rT,[e.createElementVNode("div",iT,[t.dynamicCategories?(e.openBlock(),e.createBlock(e.unref(ts),{key:0,"button-filter-props":{backgroundColor:"#2e3b46",width:"96.2%",borderColor:"rgba(255, 255, 255, 0.20)",infoBorderColor:"rgba(255, 255, 255, 0.20)",showIcon:!0,height:"38px",padding:"5px 2.2%",textFontFamily:"Poppins-Regular",showBadgeOnFilterFull:!1,showBadge:!0,text:"Ver otras jugadas"},"show-badge-on-filter-full":!1,filters:t.dynamicCategories,"filter-type":e.unref(x).PRODUCTIVITY,"is-for-template-form":!1,"productivity-max-categories":12,"productivity-min-categories":5,"are-offenses-conditions-visible":!1,"is-from-templates":!0,width:"99.7%","template-props":{width:"940px",maxWidth:"940px"},"productivity-text":"Modificar las jugadas que se ven en la gráfica spider","onUpdate:filters":f},null,8,["button-filter-props","filters","filter-type"])):t.customCategories?(e.openBlock(),e.createBlock(e.unref(ts),{key:1,"button-filter-props":{backgroundColor:"#2e3b46",width:"96.2%",borderColor:"rgba(255, 255, 255, 0.20)",infoBorderColor:"rgba(255, 255, 255, 0.20)",showIcon:!0,height:"38px",padding:"5px 2.2%",textFontFamily:"Poppins-Regular",showBadgeOnFilterFull:!1,showBadge:!0,text:"Ver otras jugadas"},"show-badge-on-filter-full":!1,filters:t.customCategories,"filter-type":e.unref(x).PRODUCTIVITY,"is-for-template-form":!1,"productivity-max-categories":12,"productivity-min-categories":1,"are-offenses-conditions-visible":!1,"is-from-templates":!0,width:"99.7%","template-props":{width:"940px",maxWidth:"940px"},"productivity-text":"Modificar las jugadas que se ven en la gráfica spider","onUpdate:filters":f},null,8,["button-filter-props","filters","filter-type"])):e.createCommentVNode("",!0)]),e.createElementVNode("div",nT,[e.createVNode(b,{ref_key:"spiderChart",ref:a,type:"radar",options:h.value,series:d.value},null,8,["options","series"])])])],4)}}},os=al(sT,[["__scopeId","data-v-71513d35"]]),cT=new Map([[1,"Portero"],[2,"Defensa Central"],[3,"Lateral por izquierda"],[4,"Lateral por derecha"],[5,"Volante por izquierda"],[6,"Volante por derecha"],[7,"Volante defensivo"],[8,"Volante ofensivo"],[9,"Delantero"]]),dT={class:"table-radars"},pT={class:"table-radars__table"},mT={class:"table-radars__radars"},uT={class:"radar"},fT={class:"radar"},hT={__name:"GSC-TableAndRadar",props:{players:{type:Array,default:()=>[]},isGeneral:{type:Boolean,default:!0},isEditMode:{type:Boolean,default:!1},userId:{type:Number,default:0},token:{type:String,default:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6Mzg4NjYsIm5hbWUiOiJMaWxsaW5pIiwidXNlcm5hbWUiOiJsaWxsaW5pdGVzdCIsImVtYWlsIjoiIiwicHJvdmlkZXJfaWQiOjEsImxvZ2luX2dvbHN0YXRzIjoxLCJpYXQiOjE3NDgyMTcxMTQsImV4cCI6MTc3OTc1MzExNH0.08YqLIH66doeBS-NLf1CPJM7WnvHLcB2Ypxm5LtBADg"},dynamicCategories:{type:Object,default:()=>({})},positionIds:{type:Array,default:()=>[]}},setup(t,{expose:o}){const a=t,l=e.ref([]),i=e.ref([]);e.ref(a.players);const r=e.ref([]),n=e.ref([]),s=e.ref(!1),d=e.computed(()=>r.value);e.watch(()=>a.players,g=>{g&&g.length&&(l.value=g.map((b,S)=>{const v=S+1;return{...b,position:v<10?`0${v}`:`${v}`,isSelected:!1,isExpanded:!1,isOdd:S%2!==0,countryFlagUrl:`https://golstatsimages.blob.core.windows.net/flags/${b.nationality_id}.jpg`,playerPosition:cT.get(b.position_id)||"",age:c(new Date(b.dob)),index:S}}),i.value=l.value.map(b=>({...b})))},{immediate:!0,deep:!0});function c(g){const b=new Date;let S=b.getFullYear()-g.getFullYear();const v=b.getMonth()-g.getMonth();return(v<0||v===0&&b.getDate()<g.getDate())&&S--,S}const h=e.computed(()=>{const g=a.positionIds&&a.positionIds.length>0?a.positionIds.reduce((b,S)=>`${b}${b==="?"?"":"&"}p=${S}`,"?"):"";return`https://a3tmmmjdaj.execute-api.us-east-2.amazonaws.com/prod/v2/users/${a.userId}/variables${g}`});e.watch(h,(g,b)=>{g&&g!==b&&p(g)},{immediate:!0}),e.watch(()=>a.isEditMode,g=>{g&&l.value.forEach(b=>{b.isSelected=!1})});async function p(g){try{const b=await(await fetch(g,{method:"GET",headers:{"Content-Type":"application/json",Authorization:a.token}})).json();n.value=b.data?b.data.map(S=>({...S,isSelected:!0})):[]}catch(b){console.error("Error fetching user variables:",b)}}function y(g){r.value=g}function u(g){const[b,S]=g.split(","),v=b.split(" ");let q="";for(const O of v)if(q+=` ${O}`,O.length>3)break;return S&&b?`${S.trim()} ${q}`:""}function f(g){l.value.forEach(b=>{b.isNew=!1}),l.value.find(b=>b.id&&g.id&&b.id===g.id||b.objeto_player&&b.objeto_player.player_id===g.player_id||b.player_id&&g.player_id&&b.player_id===g.player_id||b.id&&g.player_id&&b.id===g.player_id||b.player_id&&g.id&&b.player_id===g.id)||(g.name=u(g.name),g.isNew=!0,l.value.unshift(g))}function m(g){s.value=g}return o({addPlayer:f}),(g,b)=>(e.openBlock(),e.createElementBlock("div",dT,[e.createElementVNode("div",pT,[e.createVNode(b7,{players:l.value,onChangeSelectedPlayers:y,onClickCheckbox:m},null,8,["players"])]),e.createElementVNode("div",mT,[e.createElementVNode("div",uT,[e.createVNode(os,{title:"Tipos de jugadas Profesor Lillini:",players:d.value,"custom-categories":n.value,"user-id":t.userId,token:t.token},null,8,["players","custom-categories","user-id","token"])]),e.createElementVNode("div",fT,[e.createVNode(os,{title:"Variables Dinámicas:",players:d.value,"dynamic-categories":t.dynamicCategories,"user-id":t.userId,token:t.token},null,8,["players","dynamic-categories","user-id","token"])])])]))}},yT=al(hT,[["__scopeId","data-v-9610aac0"]]);function gT(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var oo={exports:{}},ls;function bT(){if(ls)return oo.exports;ls=1;function t(){}return t.prototype={on:function(o,a,l){var i=this.e||(this.e={});return(i[o]||(i[o]=[])).push({fn:a,ctx:l}),this},once:function(o,a,l){var i=this;function r(){i.off(o,r),a.apply(l,arguments)}return r._=a,this.on(o,r,l)},emit:function(o){var a=[].slice.call(arguments,1),l=((this.e||(this.e={}))[o]||[]).slice(),i=0,r=l.length;for(i;i<r;i++)l[i].fn.apply(l[i].ctx,a);return this},off:function(o,a){var l=this.e||(this.e={}),i=l[o],r=[];if(i&&a)for(var n=0,s=i.length;n<s;n++)i[n].fn!==a&&i[n].fn._!==a&&r.push(i[n]);return r.length?l[o]=r:delete l[o],this}},oo.exports=t,oo.exports.TinyEmitter=t,oo.exports}var Il,rs;function _T(){if(rs)return Il;rs=1;var t=bT();return Il=new t,Il}var ST=_T();const ET=gT(ST),CT={class:"graph-view"},kT=Ae({__name:"GraphView",props:{playersScouting:{type:Array,default:()=>[]},dynamicCategories:{type:Object,default:()=>null},userId:{type:Number,default:0},positionIds:{type:Array,default:()=>[]}},setup(t){const o=e.ref(null);return e.ref([{position:1,player_name:"S. mty",player_photo:"https://golstatsimages.blob.core.windows.net/players-profile/4988.png",total:"97",id:4988,player_age:34,team_abrev:"MTY",team_name:"Monterrey",team_logo:"https://golstatsimages.blob.core.windows.net/teams-80/7.png",player_position:"VD",position_name:"Volante defensivo",player_country_flag:"https://golstatsimages.blob.core.windows.net/flags/198.jpg",player_games:52,player_min:4265,league_name:"Liga MX",seasons:[1933,1931,1922,1874,1871,1864,1847,1836],season_id:1933,stats:[{category_id:112312312312,name:"Goles",total:10},{category_id:232213313123,name:"Goles alucinantes",total:8},{category_id:112312312312,name:"Goles",total:15},{category_id:232213313123,name:"Goles alucinantes",total:11},{category_id:112312312312,name:"Goles",total:10},{category_id:232213313123,name:"Goles alucinantes",total:18},{category_id:112312312312,name:"Goles",total:5},{category_id:232213313123,name:"Goles alucinantes",total:12},{category_id:112312312312,name:"Goles",total:10},{category_id:232213313123,name:"Goles alucinantes",total:18},{category_id:112312312312,name:"Goles",total:5},{category_id:232213313123,name:"Goles alucinantes",total:12}]},{position:1,player_name:"S. ame",player_photo:"https://golstatsimages.blob.core.windows.net/players-profile/4988.png",total:"97",id:4989,player_age:30,team_abrev:"AME",team_name:"Monterrey",team_logo:"https://golstatsimages.blob.core.windows.net/teams-80/7.png",player_position:"VD",position_name:"Volante defensivo",player_country_flag:"https://golstatsimages.blob.core.windows.net/flags/198.jpg",player_games:22,player_min:6265,league_name:"Liga MX",seasons:[1933,1931,1922,1874,1871,1864,1847,1836],season_id:1933,stats:[{category_id:112312312312,name:"Goles",total:3},{category_id:232213313123,name:"Goles alucinantes",total:7},{category_id:112312312312,name:"Goles",total:5},{category_id:232213313123,name:"Goles alucinantes",total:8},{category_id:112312312312,name:"Goles",total:9},{category_id:232213313123,name:"Goles alucinantes",total:4},{category_id:112312312312,name:"Goles",total:12},{category_id:232213313123,name:"Goles alucinantes",total:8},{category_id:112312312312,name:"Goles",total:9},{category_id:232213313123,name:"Goles alucinantes",total:4},{category_id:112312312312,name:"Goles",total:12},{category_id:232213313123,name:"Goles alucinantes",total:8}]},{position:1,player_name:"S. chi",player_photo:"https://golstatsimages.blob.core.windows.net/players-profile/4988.png",total:"97",id:4588,player_age:24,team_abrev:"CHI",team_name:"Monterrey",team_logo:"https://golstatsimages.blob.core.windows.net/teams-80/7.png",player_position:"VD",position_name:"Volante defensivo",player_country_flag:"https://golstatsimages.blob.core.windows.net/flags/198.jpg",player_games:62,player_min:3265,league_name:"Liga MX",seasons:[1933,1931,1922,1874,1871,1864,1847,1836],season_id:1933,stats:[{category_id:112312312312,name:"Goles",total:9},{category_id:232213313123,name:"Goles alucinantes",total:10},{category_id:112312312312,name:"Goles",total:6},{category_id:232213313123,name:"Goles alucinantes",total:4},{category_id:112312312312,name:"Goles",total:13},{category_id:232213313123,name:"Goles alucinantes",total:9},{category_id:112312312312,name:"Goles",total:10},{category_id:232213313123,name:"Goles alucinantes",total:5}]},{position:1,player_name:"S. Canales",player_photo:"https://golstatsimages.blob.core.windows.net/players-profile/4988.png",total:"97",id:4998,player_age:34,team_abrev:"MTY",team_name:"Monterrey",team_logo:"https://golstatsimages.blob.core.windows.net/teams-80/7.png",player_position:"VD",position_name:"Volante defensivo",player_country_flag:"https://golstatsimages.blob.core.windows.net/flags/198.jpg",player_games:52,player_min:4265,league_name:"Liga MX",seasons:[1933,1931,1922,1874,1871,1864,1847,1836],season_id:1933,stats:[{category_id:112312312312,name:"Goles",total:10},{category_id:232213313123,name:"Goles alucinantes",total:10},{category_id:112312312312,name:"Goles",total:10},{category_id:232213313123,name:"Goles alucinantes",total:10},{category_id:112312312312,name:"Goles",total:10},{category_id:232213313123,name:"Goles alucinantes",total:10},{category_id:112312312312,name:"Goles",total:10},{category_id:232213313123,name:"Goles alucinantes",total:10}]},{position:1,player_name:"S. Canales",player_photo:"https://golstatsimages.blob.core.windows.net/players-profile/4988.png",total:"97",id:4983,player_age:34,team_abrev:"MTY",team_name:"Monterrey",team_logo:"https://golstatsimages.blob.core.windows.net/teams-80/7.png",player_position:"VD",position_name:"Volante defensivo",player_country_flag:"https://golstatsimages.blob.core.windows.net/flags/198.jpg",player_games:52,player_min:4265,league_name:"Liga MX",seasons:[1933,1931,1922,1874,1871,1864,1847,1836],season_id:1933,stats:[{category_id:112312312312,name:"Goles",total:10},{category_id:232213313123,name:"Goles alucinantes",total:10},{category_id:112312312312,name:"Goles",total:10},{category_id:232213313123,name:"Goles alucinantes",total:10},{category_id:112312312312,name:"Goles",total:10},{category_id:232213313123,name:"Goles alucinantes",total:10},{category_id:112312312312,name:"Goles",total:10},{category_id:232213313123,name:"Goles alucinantes",total:10}]}]),ET.on("add-player",a=>{o.value&&o.value.addPlayer(a)}),(a,l)=>(e.openBlock(),e.createElementBlock("div",CT,[e.createVNode(e.unref(yT),{ref_key:"tableAndRadar",ref:o,players:t.playersScouting,"user-id":t.userId,"dynamic-categories":t.dynamicCategories,"position-ids":t.positionIds},null,8,["players","user-id","dynamic-categories","position-ids"])]))}},[["__scopeId","data-v-8926f090"]]),Rl=(t,o)=>{const a=t.__vccOpts||t;for(const[l,i]of o)a[l]=i;return a},Pl={name:"FieldTemplatesElement",props:{fieldWidth:{type:Number,default:302.5},fieldHeight:{type:Number,default:254.5},initialSections:{type:Array,default:()=>[]},displayMode:{type:Boolean,default:!1},title:{type:String,default:"Zona de origen del balón:"},quarters:{type:Array,default:()=>[1,2,3,4]}},data(){return{selectAll:!0,selectedSections:new Set,isDragging:!1,dragSelectMode:null,lastUpdateTime:0,lastSelectedSections:[]}},created(){this.initializeSections()},watch:{initialSections:{handler:"initializeSections",immediate:!0},selectedSections:{handler(t){if(this.lastSelectedSections.every(a=>t.has(a)))return;const o=Array.from(t).map(Number).sort((a,l)=>a-l);this.lastSelectedSections=[...o],this.$emit("sections-changed",o)},deep:!0}},methods:{initializeSections(){if(this.selectedSections.clear(),this.initialSections&&this.initialSections.length>0)this.initialSections.forEach(t=>{const o=Math.ceil(t/4);this.isQuarterEnabled(o)&&this.selectedSections.add(t.toString())});else for(let t=1;t<=16;t++){const o=Math.ceil(t/4);this.isQuarterEnabled(o)&&this.selectedSections.add(t.toString())}this.updateSelectAllState()},isSelected(t){return this.selectedSections.has(t.toString())},toggleSection(t){const o=Math.ceil(t/4);if(!this.isQuarterEnabled(o))return;const a=t.toString();this.selectedSections.size===1&&this.selectedSections.has(a)||(this.selectedSections.has(a)?this.selectedSections.delete(a):this.selectedSections.add(a),this.updateSelectAllState())},toggleAllSections(){if(this.selectAll)for(let t=1;t<=16;t++)this.selectedSections.add(t.toString());else this.selectedSections.clear()},updateSelectAllState(){requestAnimationFrame(()=>{this.selectAll=this.selectedSections.size===16})},startDragging(){this.displayMode||(this.isDragging=!0,event.preventDefault())},stopDragging(){this.displayMode||(this.isDragging=!1,this.dragSelectMode=null)},handleDragSelect(t){if(this.displayMode)return;const o=Date.now();if(o-this.lastUpdateTime<16)return;this.lastUpdateTime=o;const a=t.toString(),l=Math.ceil(t/4);if(this.isQuarterEnabled(l)){if(this.dragSelectMode===null&&(this.dragSelectMode=!this.selectedSections.has(a)),this.dragSelectMode)this.selectedSections.add(a);else{if(this.selectedSections.size===1&&this.selectedSections.has(a))return;this.selectedSections.delete(a)}this.updateSelectAllState()}},getSectionNumber(t,o){return(t-1)*4+o},getSectionIndex(t,o){return(t-1)*4+o},selectColumn(t){if(!this.isQuarterEnabled(t))return;const o=(t-1)*4+1,a=t*4;if(Array.from({length:4},(l,i)=>(o+i).toString()).every(l=>this.selectedSections.has(l))&&this.selectedSections.size>4)for(let l=o;l<=a;l++)this.selectedSections.delete(l.toString());else for(let l=o;l<=a;l++)this.selectedSections.add(l.toString());this.updateSelectAllState()},isQuarterSelected(t){const o=(t-1)*4+1;return Array.from({length:4},(a,l)=>(o+l).toString()).every(a=>this.selectedSections.has(a))},isQuarterEnabled(t){return this.quarters.includes(t)}}},is=()=>{e.useCssVars(t=>({"3f07ccca":t.fieldWidth+"px","26834d3a":t.fieldHeight+"px","1711e604":t.displayMode?"-28px":"0"}))},ns=Pl.setup;Pl.setup=ns?(t,o)=>(is(),ns(t,o)):is;const wT={class:"field-template-element"},VT={class:"field-container"},NT=["onMouseenter","onMousedown"],xT={class:"column-buttons"},BT=["onClick","disabled"];function FT(t,o,a,l,i,r){return e.openBlock(),e.createElementBlock("div",wT,[e.createElementVNode("div",VT,[e.createElementVNode("div",{class:e.normalizeClass(["field-title",{"hidden-title":a.displayMode}])},[e.createElementVNode("span",null,e.toDisplayString(a.title),1)],2),e.createElementVNode("div",{class:"soccer-field",onMousedown:o[0]||(o[0]=(...n)=>r.startDragging&&r.startDragging(...n)),onMouseup:o[1]||(o[1]=(...n)=>r.stopDragging&&r.stopDragging(...n)),onMouseleave:o[2]||(o[2]=(...n)=>r.stopDragging&&r.stopDragging(...n))},[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(4,n=>e.createElementVNode("div",{key:n,class:"field-column"},[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(4,s=>e.createElementVNode("div",{key:`${n}-${s}`,class:e.normalizeClass(["field-section",{selected:r.isSelected(r.getSectionIndex(n,s)),"display-mode":a.displayMode}]),onMouseenter:d=>i.isDragging&&r.handleDragSelect(r.getSectionIndex(n,s)),onMousedown:e.withModifiers(d=>!a.displayMode&&r.toggleSection(r.getSectionIndex(n,s)),["prevent"])},null,42,NT)),64))])),64))],32),e.createElementVNode("div",xT,[a.displayMode?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},e.renderList(4,n=>e.createElementVNode("div",{key:n,class:"column-label"},e.toDisplayString(n)+"/4 tos ",1)),64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},e.renderList(4,n=>e.createElementVNode("button",{key:n,class:e.normalizeClass(["column-button",{selected:r.isQuarterSelected(n),disabled:!r.isQuarterEnabled(n)}]),onClick:s=>r.selectColumn(n),disabled:!r.isQuarterEnabled(n)},e.toDisplayString(n)+"/4 tos ",11,BT)),64))])])])}const TT=Rl(Pl,[["render",FT],["__scopeId","data-v-1f6351a4"]]),Ll={name:"FieldTemplatesElement",props:{fieldWidth:{type:Number,default:302.5},fieldHeight:{type:Number,default:254.5},initialSections:{type:Array,default:()=>[]},displayMode:{type:Boolean,default:!1}},data(){return{selectAll:!0,selectedSections:new Set,isDragging:!1,dragSelectMode:null,lastUpdateTime:0,selectedCells:new Array(72).fill(!0)}},created(){this.initializeSections()},watch:{initialSections:{handler:"initializeSections",immediate:!0},selectedSections:{handler(t){const o=Array.from(t).map(r=>{const[n,s]=r.split("-").map(Number);return{row:n,col:s,value:this.getSequentialNumber(n,s)}}),a={};o.forEach(r=>{a[r.col]||(a[r.col]=[]),a[r.col].push(r)});const l=[];Object.values(a).forEach(r=>{r.sort((s,d)=>d.row-s.row);let n=[r[0]];for(let s=1;s<r.length;s++){const d=r[s];r[s-1].row-d.row===1?n.push(d):(n.length>0&&l.push(n),n=[d])}n.length>0&&l.push(n)});const i=l.sort((r,n)=>{const s=Math.min(...r.map(c=>c.value)),d=Math.min(...n.map(c=>c.value));return s-d}).map(r=>{const n=r.map(s=>s.value).sort((s,d)=>d-s);return n.length===1?[n[0],n[0]]:[n[0],n[n.length-1]]});this.$emit("sections-changed",i)},deep:!0}},methods:{initializeSections(){if(this.initialSections&&this.initialSections.length>0)this.selectedSections.clear(),this.initialSections.forEach(t=>{if(Array.isArray(t)&&t.length===2){const[o,a]=t,l=17-Math.floor((o-1)/21),i=(o-1)%21+1,r=17-Math.floor((a-1)/21),n=(a-1)%21+1;if(i===n){const s=Math.min(l,r),d=Math.max(l,r);for(let c=s;c<=d;c++)this.selectedSections.add(this.getSectionId(c,i))}else{const s=Math.min(i,n),d=Math.max(i,n);for(let c=s;c<=d;c++){const h=c===i?l:1,p=c===n?r:17;for(let y=Math.min(h,p);y<=Math.max(h,p);y++)this.selectedSections.add(this.getSectionId(y,c))}}}});else for(let t=1;t<=17;t++)for(let o=1;o<=21;o++)this.selectedSections.add(this.getSectionId(t,o));this.updateSelectAllState()},getSectionId(t,o){return`${t}-${o}`},isSelected(t,o){return this.selectedSections.has(this.getSectionId(t,o))},toggleSection(t,o){const a=this.getSectionId(t,o);this.selectedSections.has(a)?this.selectedSections.delete(a):this.selectedSections.add(a),this.updateSelectAllState()},toggleAllSections(){if(this.selectAll)for(let t=1;t<=17;t++)for(let o=1;o<=21;o++)this.selectedSections.add(this.getSectionId(t,o));else this.selectedSections.clear()},updateSelectAllState(){requestAnimationFrame(()=>{let t=357;this.selectAll=this.selectedSections.size===t})},startDragging(){this.displayMode||(this.isDragging=!0,event.preventDefault())},stopDragging(){this.displayMode||(this.isDragging=!1,this.dragSelectMode=null)},handleDragSelect(t,o){if(this.displayMode)return;const a=Date.now();if(a-this.lastUpdateTime<16)return;this.lastUpdateTime=a;const l=this.getSectionId(t,o);this.dragSelectMode===null&&(this.dragSelectMode=!this.selectedSections.has(l)),this.dragSelectMode?this.selectedSections.add(l):this.selectedSections.delete(l),this.updateSelectAllState()},getSequentialNumber(t,o){return(17-t)*21+o}}},ss=()=>{e.useCssVars(t=>({"7dc153b4":t.fieldWidth+"px","3cee0bfc":(t.displayMode?t.fieldHeight-24:t.fieldHeight)+"px"}))},cs=Ll.setup;Ll.setup=cs?(t,o)=>(ss(),cs(t,o)):ss;const AT={class:"field-template-element"},$T={class:"field-container"},MT={key:0,class:"select-all-container"},IT={class:"select-all-label"},RT=["onMouseenter","onMousedown"];function PT(t,o,a,l,i,r){return e.openBlock(),e.createElementBlock("div",AT,[e.createElementVNode("div",$T,[a.displayMode?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",MT,[e.createElementVNode("label",IT,[o[5]||(o[5]=e.createElementVNode("span",null,"Seleccionar toda la cancha",-1)),e.withDirectives(e.createElementVNode("input",{type:"checkbox",class:"select-all-checkbox","onUpdate:modelValue":o[0]||(o[0]=n=>i.selectAll=n),onChange:o[1]||(o[1]=(...n)=>r.toggleAllSections&&r.toggleAllSections(...n))},null,544),[[e.vModelCheckbox,i.selectAll]])])])),e.createElementVNode("div",{class:"soccer-field",onMousedown:o[2]||(o[2]=(...n)=>r.startDragging&&r.startDragging(...n)),onMouseup:o[3]||(o[3]=(...n)=>r.stopDragging&&r.stopDragging(...n)),onMouseleave:o[4]||(o[4]=(...n)=>r.stopDragging&&r.stopDragging(...n))},[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(17,n=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:n},[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(21,s=>e.createElementVNode("div",{key:`${n}-${s}`,class:e.normalizeClass(["field-section",{selected:r.isSelected(n,s),"display-mode":a.displayMode}]),onMouseenter:d=>i.isDragging&&r.handleDragSelect(n,s),onMousedown:e.withModifiers(d=>!a.displayMode&&r.toggleSection(n,s),["prevent"])},null,42,RT)),64))],64))),64))],32),o[6]||(o[6]=e.createStaticVNode('<div class="attack-direction" data-v-389c50fa><div class="arrow-line" data-v-389c50fa></div><span class="attack-text" data-v-389c50fa>Ataca</span><div class="arrow-line" data-v-389c50fa></div><svg class="arrow-head" width="12" height="12" viewBox="0 0 12 12" data-v-389c50fa><polygon points="12,6 0,1 0,11" fill="#316fee" data-v-389c50fa></polygon></svg></div>',1))])])}const LT=Rl(Ll,[["render",PT],["__scopeId","data-v-389c50fa"]]),OT={components:{FieldGolStatsTemplates:TT,FieldTemplatesElement:LT},name:"ModalPassConditions",props:{isVisible:{type:Boolean,required:!0},parameters:{type:Object,required:!0}},data(){return{quarters:[1,2],userId:24254,originSelection:[],destinationSelection:[],selectAllOrigin:!1,selectAllDestination:!1,minDistanceX:.5,minDistanceY:.5,minDistanceTotal:.5}},methods:{isArrayOfArrays(t){return Array.isArray(t)&&t.length>0&&t.every(o=>Array.isArray(o))},closeModal(){this.$emit("update:isVisible",!1)},updateOriginSelection(t){this.originSelection=t},updateDestinationSelection(t){this.destinationSelection=t},clearFilters(){this.originSelection=[],this.destinationSelection=[],this.selectAllOrigin=!1,this.selectAllDestination=!1,this.minDistanceX=0,this.minDistanceY=0,this.minDistanceTotal=0},applyFilters(){this.$emit("update:isVisible",!1)}}},vT={key:0,class:"modal-wrapper"},DT={class:"modal-overlay"},zT={class:"modal-container"},UT={class:"modal-content"},jT={class:"modal-header"},HT={class:"fields-container"},WT={class:"field-section"},GT={class:"field-section"},qT={class:"distance-section"},YT={class:"distance-info"},ZT={class:"info-row"},JT={class:"info-value"},KT={class:"info-row"},XT={class:"info-value"},QT={class:"info-row"},eA={class:"info-value"},tA={class:"distance-section"},aA={class:"distance-info"},oA={class:"info-row"},lA={class:"info-value"},rA={class:"info-row"},iA={class:"info-value"},nA={class:"info-row"},sA={class:"info-value"};function cA(t,o,a,l,i,r){var n,s,d,c,h,p,y,u,f,m,g,b;const S=e.resolveComponent("FieldGolStatsTemplates"),v=e.resolveComponent("FieldTemplatesElement");return a.isVisible?(e.openBlock(),e.createElementBlock("div",vT,[e.createElementVNode("div",DT,[e.createElementVNode("div",zT,[e.createElementVNode("div",UT,[e.createElementVNode("div",jT,[o[2]||(o[2]=e.createStaticVNode('<div class="header-content" data-v-834c0128><svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg" data-v-inspector="src/components/GSCTemplates.vue:100:15" data-v-a08c9209="" data-v-834c0128><path d="M5.18088 2.68185L3.12463 4.74435L2.31838 3.93185C2.20069 3.81416 2.04107 3.74805 1.87463 3.74805C1.70819 3.74805 1.54857 3.81416 1.43088 3.93185C1.31319 4.04954 1.24707 4.20917 1.24707 4.3756C1.24707 4.54204 1.31319 4.70166 1.43088 4.81935L2.68088 6.06935C2.73898 6.12793 2.80811 6.17443 2.88427 6.20616C2.96043 6.23789 3.04212 6.25423 3.12463 6.25423C3.20714 6.25423 3.28883 6.23789 3.36499 6.20616C3.44115 6.17443 3.51028 6.12793 3.56838 6.06935L6.06838 3.56935C6.12665 3.51108 6.17288 3.4419 6.20442 3.36576C6.23595 3.28962 6.25218 3.20802 6.25218 3.1256C6.25218 3.04319 6.23595 2.96159 6.20442 2.88545C6.17288 2.80931 6.12665 2.74013 6.06838 2.68185C6.0101 2.62358 5.94092 2.57735 5.86478 2.54582C5.78864 2.51428 5.70704 2.49805 5.62463 2.49805C5.54222 2.49805 5.46061 2.51428 5.38447 2.54582C5.30833 2.57735 5.23915 2.62358 5.18088 2.68185Z" fill="white" data-v-inspector="src/components/GSCTemplates.vue:101:17" data-v-a08c9209="" data-v-834c0128></path><path d="M5 8.125H2.5C2.33424 8.125 2.17527 8.19085 2.05806 8.30806C1.94085 8.42527 1.875 8.58424 1.875 8.75V11.25C1.875 11.4158 1.94085 11.5747 2.05806 11.6919C2.17527 11.8092 2.33424 11.875 2.5 11.875H5C5.16576 11.875 5.32473 11.8092 5.44194 11.6919C5.55915 11.5747 5.625 11.4158 5.625 11.25V8.75C5.625 8.58424 5.55915 8.42527 5.44194 8.30806C5.32473 8.19085 5.16576 8.125 5 8.125ZM4.375 10.625H3.125V9.375H4.375V10.625Z" fill="white" data-v-inspector="src/components/GSCTemplates.vue:104:17" data-v-a08c9209="" data-v-834c0128></path><path d="M5 13.75H2.5C2.33424 13.75 2.17527 13.8158 2.05806 13.9331C1.94085 14.0503 1.875 14.2092 1.875 14.375V16.875C1.875 17.0408 1.94085 17.1997 2.05806 17.3169C2.17527 17.4342 2.33424 17.5 2.5 17.5H5C5.16576 17.5 5.32473 17.4342 5.44194 17.3169C5.55915 17.1997 5.625 17.0408 5.625 16.875V14.375C5.625 14.2092 5.55915 14.0503 5.44194 13.9331C5.32473 13.8158 5.16576 13.75 5 13.75ZM4.375 16.25H3.125V15H4.375V16.25Z" fill="white" data-v-inspector="src/components/GSCTemplates.vue:107:17" data-v-a08c9209="" data-v-834c0128></path><path d="M8.125 9.375H13.125C13.2908 9.375 13.4497 9.30915 13.5669 9.19194C13.6842 9.07473 13.75 8.91576 13.75 8.75C13.75 8.58424 13.6842 8.42527 13.5669 8.30806C13.4497 8.19085 13.2908 8.125 13.125 8.125H8.125C7.95924 8.125 7.80027 8.19085 7.68306 8.30806C7.56585 8.42527 7.5 8.58424 7.5 8.75C7.5 8.91576 7.56585 9.07473 7.68306 9.19194C7.80027 9.30915 7.95924 9.375 8.125 9.375Z" fill="white" data-v-inspector="src/components/GSCTemplates.vue:110:17" data-v-a08c9209="" data-v-834c0128></path><path d="M18.125 10.625H8.125C7.95924 10.625 7.80027 10.6908 7.68306 10.8081C7.56585 10.9253 7.5 11.0842 7.5 11.25C7.5 11.4158 7.56585 11.5747 7.68306 11.6919C7.80027 11.8092 7.95924 11.875 8.125 11.875H18.125C18.2908 11.875 18.4497 11.8092 18.5669 11.6919C18.6842 11.5747 18.75 11.4158 18.75 11.25C18.75 11.0842 18.6842 10.9253 18.5669 10.8081C18.4497 10.6908 18.2908 10.625 18.125 10.625Z" fill="white" data-v-inspector="src/components/GSCTemplates.vue:113:17" data-v-a08c9209="" data-v-834c0128></path><path d="M8.125 15H13.125C13.2908 15 13.4497 14.9342 13.5669 14.8169C13.6842 14.6997 13.75 14.5408 13.75 14.375C13.75 14.2092 13.6842 14.0503 13.5669 13.9331C13.4497 13.8158 13.2908 13.75 13.125 13.75H8.125C7.95924 13.75 7.80027 13.8158 7.68306 13.9331C7.56585 14.0503 7.5 14.2092 7.5 14.375C7.5 14.5408 7.56585 14.6997 7.68306 14.8169C7.80027 14.9342 7.95924 15 8.125 15Z" fill="white" data-v-inspector="src/components/GSCTemplates.vue:116:17" data-v-a08c9209="" data-v-834c0128></path><path d="M18.125 16.25H8.125C7.95924 16.25 7.80027 16.3158 7.68306 16.4331C7.56585 16.5503 7.5 16.7092 7.5 16.875C7.5 17.0408 7.56585 17.1997 7.68306 17.3169C7.80027 17.4342 7.95924 17.5 8.125 17.5H18.125C18.2908 17.5 18.4497 17.4342 18.5669 17.3169C18.6842 17.1997 18.75 17.0408 18.75 16.875C18.75 16.7092 18.6842 16.5503 18.5669 16.4331C18.4497 16.3158 18.2908 16.25 18.125 16.25Z" fill="white" data-v-inspector="src/components/GSCTemplates.vue:119:17" data-v-a08c9209="" data-v-834c0128></path><path d="M8.125 3.75H13.125C13.2908 3.75 13.4497 3.68415 13.5669 3.56694C13.6842 3.44973 13.75 3.29076 13.75 3.125C13.75 2.95924 13.6842 2.80027 13.5669 2.68306C13.4497 2.56585 13.2908 2.5 13.125 2.5H8.125C7.95924 2.5 7.80027 2.56585 7.68306 2.68306C7.56585 2.80027 7.5 2.95924 7.5 3.125C7.5 3.29076 7.56585 3.44973 7.68306 3.56694C7.80027 3.68415 7.95924 3.75 8.125 3.75Z" fill="white" data-v-inspector="src/components/GSCTemplates.vue:122:17" data-v-a08c9209="" data-v-834c0128></path><path d="M8.125 6.25H18.125C18.2908 6.25 18.4497 6.18415 18.5669 6.06694C18.6842 5.94973 18.75 5.79076 18.75 5.625C18.75 5.45924 18.6842 5.30027 18.5669 5.18306C18.4497 5.06585 18.2908 5 18.125 5H8.125C7.95924 5 7.80027 5.06585 7.68306 5.18306C7.56585 5.30027 7.5 5.45924 7.5 5.625C7.5 5.79076 7.56585 5.94973 7.68306 6.06694C7.80027 6.18415 7.95924 6.25 8.125 6.25Z" fill="white" data-v-inspector="src/components/GSCTemplates.vue:125:17" data-v-a08c9209="" data-v-834c0128></path></svg><span data-v-834c0128>Elige las condiciones del pase</span></div>',1)),e.createElementVNode("button",{class:"close-button",onClick:o[0]||(o[0]=q=>t.$emit("update:isVisible",!1))},o[1]||(o[1]=[e.createElementVNode("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M14 1.41L12.59 0L7 5.59L1.41 0L0 1.41L5.59 7L0 12.59L1.41 14L7 8.41L12.59 14L14 12.59L8.41 7L14 1.41Z"})],-1)]))]),e.createElementVNode("div",HT,[e.createElementVNode("div",WT,[r.isArrayOfArrays((n=a.parameters)==null?void 0:n.origin_zones)?(e.openBlock(),e.createBlock(v,{key:1,"user-id":24254,"display-mode":!0,"initial-sections":(d=a.parameters)==null?void 0:d.origin_zones},null,8,["initial-sections"])):(e.openBlock(),e.createBlock(S,{key:0,title:"Elige la zona de origen del balón:","initial-sections":(s=a.parameters)==null?void 0:s.origin_zones,"display-mode":!0},null,8,["initial-sections"]))]),e.createElementVNode("div",GT,[r.isArrayOfArrays((c=a.parameters)==null?void 0:c.destiny_zones)?(e.openBlock(),e.createBlock(v,{key:1,"user-id":24254,"display-mode":!0,"initial-sections":(p=a.parameters)==null?void 0:p.destiny_zones},null,8,["initial-sections"])):(e.openBlock(),e.createBlock(S,{key:0,title:"Elige la zona de destino del balón:","initial-sections":(h=a.parameters)==null?void 0:h.destiny_zones,"display-mode":!0},null,8,["initial-sections"]))])]),e.createElementVNode("div",qT,[o[6]||(o[6]=e.createElementVNode("h3",null,"Distancia mínima del pase:",-1)),e.createElementVNode("div",YT,[e.createElementVNode("div",ZT,[o[3]||(o[3]=e.createElementVNode("span",{class:"info-label"},"Eje X de la cancha (de portería a portería):",-1)),e.createElementVNode("span",JT,e.toDisplayString((y=a.parameters)==null?void 0:y.minimum_distance_x)+" m",1)]),e.createElementVNode("div",KT,[o[4]||(o[4]=e.createElementVNode("span",{class:"info-label"},"Eje Y de la cancha (de banda a banda):",-1)),e.createElementVNode("span",XT,e.toDisplayString((u=a.parameters)==null?void 0:u.minimum_distance_y)+" m",1)]),e.createElementVNode("div",QT,[o[5]||(o[5]=e.createElementVNode("span",{class:"info-label"},"Distancia total (No importa si va diagonal):",-1)),e.createElementVNode("span",eA,e.toDisplayString((f=a.parameters)==null?void 0:f.minimum_total_distance)+" m",1)])])]),e.createElementVNode("div",tA,[o[10]||(o[10]=e.createElementVNode("h3",null,"Distancia máxima del pase:",-1)),e.createElementVNode("div",aA,[e.createElementVNode("div",oA,[o[7]||(o[7]=e.createElementVNode("span",{class:"info-label"},"Eje X de la cancha (de portería a portería):",-1)),e.createElementVNode("span",lA,e.toDisplayString((m=a.parameters)==null?void 0:m.maximum_distance_x)+" m",1)]),e.createElementVNode("div",rA,[o[8]||(o[8]=e.createElementVNode("span",{class:"info-label"},"Eje Y de la cancha (de banda a banda):",-1)),e.createElementVNode("span",iA,e.toDisplayString((g=a.parameters)==null?void 0:g.maximum_distance_y)+" m",1)]),e.createElementVNode("div",nA,[o[9]||(o[9]=e.createElementVNode("span",{class:"info-label"},"Distancia total (No importa si va diagonal):",-1)),e.createElementVNode("span",sA,e.toDisplayString((b=a.parameters)==null?void 0:b.maximum_total_distance)+" m",1)])])])])])])])):e.createCommentVNode("",!0)}const ds=Rl(OT,[["render",cA],["__scopeId","data-v-834c0128"]]),dA={key:0,class:"loading-container"},pA={key:1},mA={class:"tooltip-list"},uA=["onClick"],fA={class:"folder-icon"},hA={key:0,width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},yA={key:1,width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},gA=Ae({__name:"AddToListTooltip",props:{lists:{type:Array,default:()=>[]},isModalOpen:{type:Boolean,default:!1},userId:{type:Number,default:0},token:{type:String,default:""},selectedPlayer:{type:Object,default:()=>({})}},emits:["selectList","close","createNewList","playerAdded"],setup(t,{emit:o}){const a=t,l=e.ref(null),i=e.ref(!0),r=e.ref(!1),n=o;e.watch(()=>a.isModalOpen,y=>{i.value=!y});function s(){n("createNewList")}function d(y){i.value&&l.value&&!l.value.contains(y.target)&&n("close")}async function c(y){try{r.value=!0;const u={dob:a.selectedPlayer.dob,is_female:0,jersey:0,name:a.selectedPlayer.name,nationality:a.selectedPlayer.nationality,nationality_id:a.selectedPlayer.nationality_id,player_id:a.selectedPlayer.player_id,position:a.selectedPlayer.position_id,team_id:a.selectedPlayer.team_id},f={user_id:a.userId,id:y.id,players:[u]};(await ne.create({headers:{Authorization:`${a.token}`}}).put(`https://4j4nfvoh0d.execute-api.us-east-2.amazonaws.com/prod/users/${a.userId}/in-followed/${y.id}/players`,f)).status===200&&(n("playerAdded"),n("selectList",y),n("close"))}catch(u){console.error("Error al agregar jugador a la lista:",u),r.value=!1}}function h(y){i.value&&y.target===l.value&&n("close")}function p(y){var u;return(u=y.players)==null?void 0:u.some(f=>f.player_id===a.selectedPlayer.player_id)}return e.onMounted(()=>{window.addEventListener("mousedown",d)}),e.onUnmounted(()=>{window.removeEventListener("mousedown",d)}),(y,u)=>(e.openBlock(),e.createElementBlock("div",{class:"add-to-list-tooltip",ref_key:"tooltipRef",ref:l,onClick:h},[u[5]||(u[5]=e.createElementVNode("div",{class:"tooltip-title"},"Agregar a lista existente:",-1)),r.value?(e.openBlock(),e.createElementBlock("div",dA,u[0]||(u[0]=[e.createElementVNode("div",{class:"loading-spinner"},null,-1),e.createElementVNode("span",null,"Agregando jugador...",-1)]))):(e.openBlock(),e.createElementBlock("div",pA,[e.createElementVNode("div",mA,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.lists,f=>(e.openBlock(),e.createElementBlock("div",{key:f.id,class:e.normalizeClass(["tooltip-list-item",{disabled:p(f)}]),onClick:m=>!p(f)&&c(f)},[e.createElementVNode("span",fA,[p(f)?(e.openBlock(),e.createElementBlock("svg",yA,u[2]||(u[2]=[e.createElementVNode("rect",{x:"2",y:"5",width:"14",height:"9",rx:"2",fill:"none",stroke:"#9b9b9a","stroke-width":"1.2"},null,-1),e.createElementVNode("path",{d:"M2 7V5C2 3.89543 2.89543 3 4 3H7.5L9 5H14C15.1046 5 16 5.89543 16 7V7",stroke:"#9b9b9a","stroke-width":"1.2"},null,-1),e.createElementVNode("path",{d:"M6 9L8 11L12 7",stroke:"#9b9b9a","stroke-width":"1.2","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)]))):(e.openBlock(),e.createElementBlock("svg",hA,u[1]||(u[1]=[e.createElementVNode("rect",{x:"2",y:"5",width:"14",height:"9",rx:"2",fill:"none",stroke:"#8EA2AB","stroke-width":"1.2"},null,-1),e.createElementVNode("path",{d:"M2 7V5C2 3.89543 2.89543 3 4 3H7.5L9 5H14C15.1046 5 16 5.89543 16 7V7",stroke:"#8EA2AB","stroke-width":"1.2"},null,-1)])))]),e.createElementVNode("span",{class:e.normalizeClass(["list-name",{"disabled-text":p(f)}])},e.toDisplayString(f.name),3)],10,uA))),128))]),u[4]||(u[4]=e.createElementVNode("div",{class:"tooltip-divider"},null,-1)),e.createElementVNode("div",{class:"tooltip-create",onClick:s},u[3]||(u[3]=[e.createElementVNode("span",{class:"plus-icon"},[e.createElementVNode("svg",{width:"23",height:"16",viewBox:"0 0 23 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M12.3877 4.88909H1.70676C1.11931 4.88909 0.638672 5.35562 0.638672 5.92582C0.638672 6.49602 1.11931 6.96254 1.70676 6.96254H12.3877C12.9751 6.96254 13.4558 6.49602 13.4558 5.92582C13.4558 5.35562 12.9751 4.88909 12.3877 4.88909ZM12.3877 0.742188H1.70676C1.11931 0.742188 0.638672 1.20871 0.638672 1.77891C0.638672 2.34911 1.11931 2.81564 1.70676 2.81564H12.3877C12.9751 2.81564 13.4558 2.34911 13.4558 1.77891C13.4558 1.20871 12.9751 0.742188 12.3877 0.742188ZM17.7281 9.03599V5.92582C17.7281 5.35562 17.2475 4.88909 16.6601 4.88909C16.0726 4.88909 15.592 5.35562 15.592 5.92582V9.03599H12.3877C11.8002 9.03599 11.3196 9.50252 11.3196 10.0727C11.3196 10.6429 11.8002 11.1094 12.3877 11.1094H15.592V14.2196C15.592 14.7898 16.0726 15.2563 16.6601 15.2563C17.2475 15.2563 17.7281 14.7898 17.7281 14.2196V11.1094H20.9324C21.5199 11.1094 22.0005 10.6429 22.0005 10.0727C22.0005 9.50252 21.5199 9.03599 20.9324 9.03599H17.7281ZM1.70676 11.1094H8.11532C8.70277 11.1094 9.18341 10.6429 9.18341 10.0727C9.18341 9.50252 8.70277 9.03599 8.11532 9.03599H1.70676C1.11931 9.03599 0.638672 9.50252 0.638672 10.0727C0.638672 10.6429 1.11931 11.1094 1.70676 11.1094Z",fill:"#98a2b3",stroke:"#FFFFFF","stroke-width":"0.091682"})])],-1),e.createElementVNode("span",{class:"create-text"},"Crear nueva lista",-1)]))]))],512))}},[["__scopeId","data-v-934f3c1b"]]),bA={class:"modal-overlay"},_A={key:0,class:"modal-content"},SA={class:"modal-select-container"},EA={class:"modal-input-wrapper"},CA=["disabled"],kA={key:0,class:"modal-input-loading"},wA={key:0,class:"modal-dropdown"},VA={key:0,class:"modal-dropdown-empty"},NA={key:1,class:"modal-dropdown-scroll"},xA={class:"variable-selection"},BA=["value"],FA={class:"variable-text"},TA={class:"modal-dropdown-actions"},AA={key:1,class:"modal-error"},$A={key:0,class:"modal-name-error"},MA={class:"modal-actions"},IA=["disabled"],RA=Ae({__name:"CreateListModal",props:{userId:{type:String,required:!0},token:{type:String,required:!0},lists:{type:Array,default:()=>[]},selectedPlayer:{type:Object,default:()=>({})}},emits:["close","createList","listCreated"],setup(t,{emit:o}){const a=o,l=t,i=e.ref(""),r=e.ref(""),n=e.ref([]),s=e.ref(!1),d=e.ref(!1),c=e.ref([]),h=e.ref(!1),p=e.ref(null),y=e.computed(()=>l.lists.some(H=>H.name.toLowerCase()===i.value.toLowerCase().trim())),u=e.computed(()=>i.value.trim()!==""&&n.value.length>0&&!y.value);async function f(){var H,V;try{h.value=!0;const P=await ne.create({headers:{Authorization:`${l.token}`}}).get(`https://a3tmmmjdaj.execute-api.us-east-2.amazonaws.com/prod/v2/users/${l.userId}/variables`);c.value=P.data.data}catch(w){p.value=((V=(H=w.response)==null?void 0:H.data)==null?void 0:V.message)||"Error al obtener las variables",console.error("Error fetching variables:",w)}finally{h.value=!1}}const m=e.computed(()=>{if(!c.value.length)return[];const H=r.value.toLowerCase().trim();return H?c.value.filter(V=>V.name.toLowerCase().includes(H)):c.value});function g(){s.value=!0}function b(){s.value=!0}function S(){setTimeout(()=>{s.value=!1,r.value=""},200)}function v(){r.value="",s.value=!1}function q(){if(r.value){const H=c.value.find(V=>V.name===r.value);H&&!n.value.some(V=>V.custom_id===H.custom_id)&&(n.value.push(H),r.value="")}s.value=!0}async function O(){var H,V;try{if(i.value&&n.value.length){const w=ne.create({headers:{Authorization:`${l.token}`}}),P={user_id:parseInt(l.userId),name:i.value,variables:n.value},R=await w.post(`https://4j4nfvoh0d.execute-api.us-east-2.amazonaws.com/prod/users/${l.userId}/in-followed`,P);R.data&&(a("createList",{nombre:i.value,variables:n.value,id:R.data.data.id}),a("listCreated"),i.value="",n.value=[],r.value="",s.value=!1,a("close"))}}catch(w){console.error("Error creating list:",w),p.value=((V=(H=w.response)==null?void 0:H.data)==null?void 0:V.message)||"Error al crear la lista"}}function z(){s.value=!1,a("close")}function G(){document.body.style.overflow="hidden"}function D(){document.body.style.overflow=""}return e.onMounted(async()=>{d.value=!0,s.value=!1,G(),await f()}),e.onUnmounted(()=>{D()}),(H,V)=>(e.openBlock(),e.createElementBlock("div",bA,[e.createVNode(e.Transition,{name:"slide-up"},{default:e.withCtx(()=>[d.value?(e.openBlock(),e.createElementBlock("div",_A,[e.createElementVNode("button",{class:"modal-close",onClick:z},"×"),V[6]||(V[6]=e.createElementVNode("div",{class:"modal-title"},[e.createElementVNode("svg",{width:"23",height:"16",viewBox:"0 0 23 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M12.3877 4.88909H1.70676C1.11931 4.88909 0.638672 5.35562 0.638672 5.92582C0.638672 6.49602 1.11931 6.96254 1.70676 6.96254H12.3877C12.9751 6.96254 13.4558 6.49602 13.4558 5.92582C13.4558 5.35562 12.9751 4.88909 12.3877 4.88909ZM12.3877 0.742188H1.70676C1.11931 0.742188 0.638672 1.20871 0.638672 1.77891C0.638672 2.34911 1.11931 2.81564 1.70676 2.81564H12.3877C12.9751 2.81564 13.4558 2.34911 13.4558 1.77891C13.4558 1.20871 12.9751 0.742188 12.3877 0.742188ZM17.7281 9.03599V5.92582C17.7281 5.35562 17.2475 4.88909 16.6601 4.88909C16.0726 4.88909 15.592 5.35562 15.592 5.92582V9.03599H12.3877C11.8002 9.03599 11.3196 9.50252 11.3196 10.0727C11.3196 10.6429 11.8002 11.1094 12.3877 11.1094H15.592V14.2196C15.592 14.7898 16.0726 15.2563 16.6601 15.2563C17.2475 15.2563 17.7281 14.7898 17.7281 14.2196V11.1094H20.9324C21.5199 11.1094 22.0005 10.6429 22.0005 10.0727C22.0005 9.50252 21.5199 9.03599 20.9324 9.03599H17.7281ZM1.70676 11.1094H8.11532C8.70277 11.1094 9.18341 10.6429 9.18341 10.0727C9.18341 9.50252 8.70277 9.03599 8.11532 9.03599H1.70676C1.11931 9.03599 0.638672 9.50252 0.638672 10.0727C0.638672 10.6429 1.11931 11.1094 1.70676 11.1094Z",fill:"#FFFFFF",stroke:"#FFFFFF","stroke-width":"0.091682"})]),e.createTextVNode(" Crear nueva lista ")],-1)),e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":V[0]||(V[0]=w=>i.value=w),class:"modal-input",type:"text",placeholder:"Nombre de tu lista"},null,512),[[e.vModelText,i.value]]),e.createElementVNode("div",SA,[e.createElementVNode("div",EA,[e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":V[1]||(V[1]=w=>r.value=w),class:"modal-input",type:"text",placeholder:"Selecciona las variables que quieres que se vean",onFocus:g,onBlur:S,onInput:b,disabled:h.value},null,40,CA),[[e.vModelText,r.value]]),h.value?(e.openBlock(),e.createElementBlock("div",kA,V[4]||(V[4]=[e.createElementVNode("div",{class:"loading-spinner"},null,-1)]))):(e.openBlock(),e.createElementBlock("button",{key:1,class:"modal-add-btn",onMousedown:e.withModifiers(q,["prevent"])},"+",32))]),s.value&&!h.value&&!p.value?(e.openBlock(),e.createElementBlock("div",wA,[m.value.length===0?(e.openBlock(),e.createElementBlock("div",VA," No se encontraron variables ")):(e.openBlock(),e.createElementBlock("div",NA,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,w=>(e.openBlock(),e.createElementBlock("div",{key:w.custom_id,class:"modal-dropdown-item"},[e.createElementVNode("label",xA,[e.withDirectives(e.createElementVNode("input",{type:"checkbox",value:w,"onUpdate:modelValue":V[2]||(V[2]=P=>n.value=P),onClick:V[3]||(V[3]=e.withModifiers(()=>{},["stop"]))},null,8,BA),[[e.vModelCheckbox,n.value]]),e.createElementVNode("span",FA,e.toDisplayString(w.name),1)])]))),128))])),e.createElementVNode("div",TA,[e.createElementVNode("button",{class:"modal-listo-btn",onMousedown:e.withModifiers(v,["prevent"])},"Listo",32)])])):e.createCommentVNode("",!0),p.value?(e.openBlock(),e.createElementBlock("div",AA,[V[5]||(V[5]=e.createElementVNode("span",{class:"error-icon"},"!",-1)),e.createTextVNode(" "+e.toDisplayString(p.value),1)])):e.createCommentVNode("",!0)]),y.value?(e.openBlock(),e.createElementBlock("div",$A," Ya existe una lista con este nombre, utiliza otro para poder continuar. ")):e.createCommentVNode("",!0),V[7]||(V[7]=e.createElementVNode("div",{class:"modal-divider"},null,-1)),e.createElementVNode("div",MA,[e.createElementVNode("button",{class:"modal-cancel",onClick:z},"Cancelar"),e.createElementVNode("button",{class:e.normalizeClass(["modal-create",{"modal-create--disabled":!u.value}]),onClick:O,disabled:!u.value}," Crear lista ",10,IA)])])):e.createCommentVNode("",!0)]),_:1})]))}},[["__scopeId","data-v-e8fef4fa"]]),PA={class:"player-card"},LA={class:"player-card__image"},OA={key:0,class:"checkbox-container"},vA=["checked"],DA=["src"],zA={class:"player-card__right-data"},UA={class:"player-card__age"},jA={class:"player-card__flag"},HA={class:"player-card__details"},WA={class:"player-card__name"},GA={class:"player-card__position"},qA={key:0,class:"button-row"},YA={class:"stat-header"},ZA={class:"stat-left"},JA=["onClick"],KA={class:"stat-label"},XA={class:"stat-value"},QA={class:"stat-bar-container"},e$={key:1,class:"loading-overlay"},t$=Ae({__name:"GscPlayerCard",props:{player:{type:Object,default:()=>({})},loading:{type:Boolean,default:!0},typeProductivity:{type:Number,default:0},countryFlag:{type:String,default:""},jersey:{type:Number,default:0},player_id:{type:Number,default:0},age:{type:Number,default:18},nationality:{type:String,default:"-"},name:{type:String,default:"-"},position:{type:String,default:"-"},photo:{type:String,default:""},is_female:{type:Number,default:0},isImgFullWidth:{type:Boolean,default:!1},stats:{type:Object,default:()=>({})},max:{type:Object,default:()=>({})},additionalData:{type:Object,default:()=>({})},deleteActive:{type:Boolean,default:!1},userId:{type:Number,default:0},categories:{type:Array,default:()=>[],required:!0},token:{type:String,default:""},statsPromise:{type:Promise,required:!0},isSelected:{type:Boolean,default:!1},showTooltip:{type:Boolean,default:!1},lists:{type:Array,default:()=>[]}},emits:["showTooltip","hideTooltip","openModal","playerAdded"],setup(t,{emit:o}){const a=t,l=o,i=e.ref(null),r=e.ref(!1),n=e.ref(!1),s=e.ref(null),d=[{id:1,nombre:"Laterales mundial sub 20"},{id:2,nombre:"Delanteros 2008"},{id:3,nombre:"Promesas Liga MX"}],c=e.ref(null),h=e.ref("center"),p=e.ref(!1);e.watch(n,O=>{O&&(p.value=!0)}),e.watch(()=>a.showTooltip,O=>{O&&e.nextTick(()=>{y()})},{immediate:!0}),e.onMounted(()=>{document.addEventListener("click",O=>{const z=O.target.closest(".add-to-list-tooltip"),G=O.target.closest(".add-button");!z&&!G&&a.showTooltip&&l("hideTooltip",a.player_id)})});function y(){const O=c.value;if(!O)return;const z=O.getBoundingClientRect(),G=window.innerWidth;z.right>G?h.value="left":h.value="center"}e.onMounted(async()=>{try{console.log("ESTADISTICAS DEL JUGADOR: ",a.stats),console.log("ESTADISTICAS MAXIMAS STATS: ",a.max),i.value=a.stats.map(O=>{var V,w;const z=O[0],G=O[2],D=((w=(V=a.max)==null?void 0:V.find(P=>P[0]===z||P[0]===parseInt(z)||P[0].toString()===z.toString()))==null?void 0:w[1])||0,H=D>0?G/D*100:0;return{name:O[1].replace(/\([^)]*\)/g,"").trim().toLowerCase().replace(/^\w/,P=>P.toUpperCase()),value:G,category:z,percentage:Math.min(H,100)}})}catch(O){console.error("Error cargando estadísticas:",O)}}),e.computed(()=>a.stats&&Object.keys(a.stats).length>0);const u=O=>{s.value=O,r.value=!0},f=()=>{r.value=!1,s.value=null};function m(){p.value=!0,l("showTooltip",a.player_id)}function g(){n.value||(p.value=!1,l("hideTooltip",a.player_id))}function b(){n.value=!0,p.value=!0}async function S(O){try{const z={dob:a.player.dob,is_female:0,jersey:0,name:a.player.name,nationality:a.player.nationality,nationality_id:a.player.nationality_id,player_id:a.player.player_id,position:a.player.position_id,team_id:a.player.team_id},G={user_id:parseInt(a.userId),id:O.id,players:[z]};await ne.create({headers:{Authorization:`${a.token}`}}).put(`https://4j4nfvoh0d.execute-api.us-east-2.amazonaws.com/prod/users/${a.userId}/in-followed/${O.id}/players`,G),d.push(O),n.value=!1,q()}catch(z){console.error("Error al agregar jugador a la lista:",z)}}function v(O){console.log("COIMPOENNTE POADRE, gscPLAYERDcARD",O)}function q(){l("playerAdded")}return(O,z)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",PA,[e.createElementVNode("div",LA,[t.deleteActive?(e.openBlock(),e.createElementBlock("div",OA,[e.createElementVNode("input",{type:"checkbox",class:"player-checkbox",checked:t.isSelected,onChange:z[0]||(z[0]=G=>O.$emit("toggleSelection")),onClick:z[1]||(z[1]=e.withModifiers(()=>{},["stop"]))},null,40,vA)])):e.createCommentVNode("",!0),e.createElementVNode("img",{class:e.normalizeClass(["player-card__photo",{"full-width":t.isImgFullWidth}]),src:t.photo,alt:"Player Image"},null,10,DA),e.createElementVNode("div",zA,[e.createElementVNode("div",UA,e.toDisplayString(t.age)+" años",1),e.createElementVNode("div",jA,[e.createElementVNode("div",{class:"player-card__flag-container",style:e.normalizeStyle({"background-image":`url(${a.countryFlag})`})},null,4)])])]),e.createElementVNode("div",HA,[e.createElementVNode("p",WA,e.toDisplayString(t.name),1),e.createElementVNode("p",GA,e.toDisplayString(t.position),1)]),e.createElementVNode("div",{class:e.normalizeClass(["player-card__actions",{"hide-buttons":t.deleteActive}])},[t.deleteActive?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",qA,[e.createElementVNode("button",{class:"action-button add-button",onClick:e.withModifiers(m,["stop"])},z[5]||(z[5]=[e.createStaticVNode(' Agregar a Lista <span class="button-icon" data-v-d3171f13><svg width="19" height="18" viewBox="0 0 19 18" fill="none" xmlns="http://www.w3.org/2000/svg" data-v-d3171f13><path d="M12.8345 16.4999V14.8333C12.8345 13.9492 12.4833 13.1014 11.8582 12.4763C11.2331 11.8512 10.3852 11.5 9.5012 11.5H4.50126C3.61722 11.5 2.76938 11.8512 2.14427 12.4763C1.51915 13.1014 1.16797 13.9492 1.16797 14.8333V16.4999" stroke="white" stroke-opacity="0.5" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" data-v-d3171f13></path><path d="M7.00126 8.16658C8.84219 8.16658 10.3346 6.67422 10.3346 4.83329C10.3346 2.99237 8.84219 1.5 7.00126 1.5C5.16033 1.5 3.66797 2.99237 3.66797 4.83329C3.66797 6.67422 5.16033 8.16658 7.00126 8.16658Z" stroke="white" stroke-opacity="0.5" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" data-v-d3171f13></path><path d="M15.332 5.66602V10.666M17.832 8.16598H12.832" stroke="white" stroke-opacity="0.5" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" data-v-d3171f13></path></svg></span>',2)])),p.value?(e.openBlock(),e.createElementBlock("div",{key:0,ref:c.value,class:e.normalizeClass(["tooltip-container",h.value]),style:{position:"absolute",left:"0",right:"0","z-index":"2000","margin-top":"40px"}},[e.createVNode(gA,{lists:t.lists,isModalOpen:n.value,token:t.token,"user-id":t.userId,"selected-player":t.player,onSelectList:v,onCreateNewList:b,onClose:g,onPlayerAdded:q},null,8,["lists","isModalOpen","token","user-id","selected-player"])],2)):e.createCommentVNode("",!0)])),t.deleteActive?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("button",{key:1,class:"action-button profile-button",onClick:z[2]||(z[2]=e.withModifiers(G=>O.$emit("showProfile",{player_id:a.player_id,season_id:a.additionalData.season_id,team_id:a.additionalData.team_id,name:a.name,position:a.position,age:a.age,nationality:a.nationality,photo:a.photo,stats:a.stats}),["stop"]))}," Ver perfil "))],2),e.createElementVNode("div",{class:e.normalizeClass(["player-card__stats",{"disabled-stats":t.deleteActive}])},[t.loading?(e.openBlock(),e.createElementBlock("div",e$,z[7]||(z[7]=[e.createElementVNode("div",{class:"loading-animation"},null,-1)]))):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(i.value,(G,D)=>(e.openBlock(),e.createElementBlock("div",{class:"stat-row",key:D},[e.createElementVNode("div",YA,[e.createElementVNode("div",ZA,[G.parametros&&G.parametros!="no"?(e.openBlock(),e.createElementBlock("button",{key:0,class:"stat-info-button",onClick:H=>u(G.parametros)},z[6]||(z[6]=[e.createElementVNode("svg",{width:"8",height:"13",viewBox:"0 0 11 13",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M7.17355 0.761719C6.44909 0.761719 5.77355 1.23716 5.56275 1.90573L0.887836 1.90458C0.572235 1.90458 0.316406 2.16058 0.316406 2.47601C0.316406 2.79144 0.572235 3.04744 0.887836 3.04744L5.56275 3.04688C5.8188 3.74688 6.44909 4.1903 7.17355 4.1903C7.89801 4.1903 8.53475 3.74574 8.79527 3.04231L10.0307 3.04744C10.3463 3.04744 10.6021 2.79144 10.6021 2.47601C10.6021 2.16058 10.3463 1.90458 10.0307 1.90458H8.79041C8.51527 1.20801 7.89801 0.761719 7.17355 0.761719ZM7.17355 1.90458C7.48915 1.90458 7.74498 2.16058 7.74498 2.47601C7.74498 2.79144 7.48915 3.04744 7.17355 3.04744C6.85795 3.04744 6.60212 2.79144 6.60212 2.47601C6.60212 2.16058 6.85795 1.90458 7.17355 1.90458ZM3.74498 5.04744C2.99184 5.04744 2.36144 5.51602 2.13127 6.19142C2.05092 6.19657 0.887836 6.19028 0.887836 6.19028C0.572235 6.19028 0.316406 6.44628 0.316406 6.76171C0.316406 7.07714 0.572235 7.33314 0.887836 7.33314C0.887836 7.33314 2.06064 7.32114 2.13372 7.32857C2.3639 8.004 2.99184 8.476 3.74498 8.476C4.46943 8.476 5.09023 8.032 5.36177 7.33485L10.0307 7.33314C10.3463 7.33314 10.6021 7.07714 10.6021 6.76171C10.6021 6.44628 10.3463 6.19028 10.0307 6.19028L5.3588 6.18519C5.10835 5.50346 4.46943 5.04744 3.74498 5.04744ZM3.74498 6.19028C4.06058 6.19028 4.31641 6.44628 4.31641 6.76171C4.31641 7.07714 4.06058 7.33314 3.74498 7.33314C3.42938 7.33314 3.17355 7.07714 3.17355 6.76171C3.17355 6.44628 3.42938 6.19028 3.74498 6.19028ZM7.17355 9.33314C6.44909 9.33314 5.7864 9.81029 5.56235 10.4703L0.887836 10.476C0.572235 10.476 0.316406 10.732 0.316406 11.0474C0.316406 11.3629 0.572235 11.6189 0.887836 11.6189L5.55389 11.6194C5.79098 12.2966 6.44909 12.7617 7.17355 12.7617C7.89801 12.7617 8.52264 12.3086 8.79784 11.6194L10.0307 11.6189C10.3463 11.6189 10.6021 11.3629 10.6021 11.0474C10.6021 10.732 10.3463 10.476 10.0307 10.476L8.79264 10.4726C8.54595 9.79663 7.89801 9.33314 7.17355 9.33314ZM7.17355 10.476C7.48915 10.476 7.74498 10.732 7.74498 11.0474C7.74498 11.3629 7.48915 11.6189 7.17355 11.6189C6.85795 11.6189 6.60212 11.3629 6.60212 11.0474C6.60212 10.732 6.85795 10.476 7.17355 10.476Z",fill:"white"})],-1)]),8,JA)):e.createCommentVNode("",!0),e.createElementVNode("span",KA,e.toDisplayString(G.name),1)]),e.createElementVNode("span",XA,e.toDisplayString(G.value),1)]),e.createElementVNode("div",QA,[e.createElementVNode("div",{style:e.normalizeStyle({width:`${G.percentage}%`}),class:"stat-bar"},null,4)])]))),128))],2)]),e.createVNode(e.unref(ds),{isVisible:r.value,"onUpdate:isVisible":z[3]||(z[3]=G=>r.value=G),onClose:f,parameters:s.value},null,8,["isVisible","parameters"]),n.value?(e.openBlock(),e.createBlock(RA,{key:0,token:t.token,lists:t.lists,"user-id":t.userId,"selected-player":t.player,onListCreated:q,onClose:z[4]||(z[4]=G=>n.value=!1),onCreateList:S},null,8,["token","lists","user-id","selected-player"])):e.createCommentVNode("",!0)],64))}},[["__scopeId","data-v-d3171f13"]]),a$={class:"grid-view"},o$={key:0,class:"loading-container"},l$={key:1,class:"cards-container"},r$=Ae({__name:"GridView",props:{playersScouting:{type:Object,default:()=>({})},userId:{type:Number,default:0},typeProductivity:{type:Number,default:0},max:{type:Object,default:()=>{}},lists:{type:Array,default:()=>[]},token:{type:String,default:""}},emits:["playerAdded","showProfile"],setup(t,{emit:o}){const a=new Map([[1,"Portero"],[2,"Defensa Central"],[3,"Lateral por izquierda"],[4,"Lateral por derecha"],[5,"Volante por izquierda"],[6,"Volante por derecha"],[7,"Volante defensivo"],[8,"Volante ofensivo"],[9,"Delantero"],[10,"Desconocida"]]),l=new Map([[1,"Portera"],[2,"Defensa Central"],[3,"Lateral por izquierda"],[4,"Lateral por derecha"],[5,"Volante por izquierda"],[6,"Volante por derecha"],[7,"Volante defensiva"],[8,"Volante ofensiva"],[9,"Delantera"],[10,"Desconocida"]]),i=o,r=e.reactive({}),n=e.ref(!1),s=e.ref(null);function d(m,g=!1){return(g?l:a).get(m)||"Desconocida"}function c(m){Object.keys(r).forEach(g=>{r[g]=!1}),r[m]=!0}function h(m){r[m]&&(r[m]=!1)}function p(m){Object.keys(r).forEach(g=>{r[g]=!1}),s.value=m,n.value=!0}function y(m){const g=m.target.closest(".add-to-list-tooltip"),b=m.target.closest(".add-button"),S=m.target.closest(".modal-overlay")||m.target.closest(".modal-content");!g&&!b&&!S&&Object.keys(r).forEach(v=>{r[v]=!1})}function u(){i("playerAdded")}function f(m){i("showProfile",m)}return e.onMounted(()=>{document.addEventListener("mousedown",y)}),e.onUnmounted(()=>{document.removeEventListener("mousedown",y)}),(m,g)=>(e.openBlock(),e.createElementBlock("div",a$,[t.playersScouting?(e.openBlock(),e.createElementBlock("div",l$,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.playersScouting,b=>(e.openBlock(),e.createBlock(t$,{key:b.player_id,loading:!1,statsPromise:!1,player_id:b.player_id,name:b.name,player:b,position:d(b.position_id,b.is_female),age:b.age,nationality:b.nationality,photo:b.photo,"type-productivity":t.typeProductivity,countryFlag:b.countryFlag,stats:t.typeProductivity==1?b.internal_stats:b.stats,max:t.typeProductivity==1?t.max.internal_max:t.max.max,"user-id":t.userId,lists:t.lists,token:t.token,onShowProfile:f,onShowTooltip:c,onHideTooltip:h,onOpenModal:p,onPlayerAdded:u},null,8,["player_id","name","player","position","age","nationality","photo","type-productivity","countryFlag","stats","max","user-id","lists","token"]))),128))])):(e.openBlock(),e.createElementBlock("div",o$,g[2]||(g[2]=[e.createElementVNode("div",{class:"loading-spinner"},null,-1),e.createElementVNode("span",null,"Cargando jugadores...",-1)]))),n.value?(e.openBlock(),e.createBlock(e.unref(ds),{key:2,isVisible:n.value,"onUpdate:isVisible":g[0]||(g[0]=b=>n.value=b),parameters:s.value,onClose:g[1]||(g[1]=b=>n.value=!1)},null,8,["isVisible","parameters"])):e.createCommentVNode("",!0)]))}},[["__scopeId","data-v-19d0373b"]]),i$=(t,o)=>{const a=t.__vccOpts||t;for(const[l,i]of o)a[l]=i;return a},n$={key:1},s$={width:"10",height:"8",viewBox:"0 0 10 8",fill:"none",xmlns:"http://www.w3.org/2000/svg"},c$=["fill"],d$={key:0,class:"checkbox__teams"},p$={class:"checkbox__teams__logo"},m$=["src"],u$={class:"checkbox__teams__logo"},f$=["src"],h$={__name:"GSC-Checkbox",props:{width:{type:String,default:"fit-content"},height:{type:String,default:"fit-content"},label:{type:String,default:""},labelWhiteSpace:{type:String,default:"normal"},labelColor:{type:String,default:"white"},fontFamily:{type:String,default:"sans-serif"},labelFontSize:{type:String,default:"12px"},modelValue:{type:Boolean,default:!1},justifyContent:{type:String,default:"flex-start"},alignItems:{type:String,default:"center"},boxBackgroundColor:{type:String,default:"#CBEE6B"},boxValueColor:{type:String,default:"#0d1d29"},boxValue:{type:[String,Number],default:""},boxPosition:{type:String,default:"left",validator(t){return["left","right","top","bottom"].includes(t)}},boxMarginTop:{type:String,default:"0.2em"},boxWidthAndHeight:{type:String,default:"16px"},boxBorderColor:{type:String,default:"#969da2"},boxBorderWidth:{type:String,default:"2px"},boxBorderRadius:{type:String,default:"4px"},boxValueFontSize:{type:String,default:"10px"},boxValueFontFamily:{type:String,default:"sans-serif"},avoidInteraction:{type:Boolean,default:!1},avoidToCheck:{type:Boolean,default:!1},isBoxOnly:{type:Boolean,default:!1},teamsIds:{type:Array,default:()=>null}},emits:["update:modelValue"],setup(t,{emit:o}){const a=t;e.useCssVars(c=>({"7bd9d47b":t.width,"34dc7ddc":t.height}));const l=e.ref(!1),i=e.computed(()=>{const c={color:a.boxValueColor,"font-family":a.fontFamily,height:a.boxWidthAndHeight,width:a.boxWidthAndHeight,minWidth:a.boxWidthAndHeight,"border-radius":a.boxBorderRadius,"margin-top":a.boxMarginTop};return l.value?(c["background-color"]=a.boxBackgroundColor,c.border=`solid ${a.boxBorderWidth} ${a.boxBackgroundColor}`):c.border=`solid ${a.boxBorderWidth} ${a.boxBorderColor}`,c}),r=e.computed(()=>({"font-family":a.boxValueFontFamily,"font-size":a.boxValueFontSize,color:a.boxValueColor,"line-height":1})),n=e.computed(()=>{const c={color:a.labelColor,"font-family":a.fontFamily,"font-size":a.labelFontSize,"white-space":a.labelWhiteSpace,"text-align":a.boxPosition==="top"||a.boxPosition==="bottom"?"center":a.boxPosition};return(a.boxPosition==="left"||a.boxPosition==="right")&&(c[`margin-${a.boxPosition}`]=a.isBoxOnly?"0":a.teamsIds?"8px":"10px"),c});e.watch(()=>a.modelValue,c=>{c!==l.value&&(l.value=c)},{immediate:!0});function s(){a.avoidInteraction||!l.value&&a.avoidToCheck||(l.value=!l.value,o("update:modelValue",l.value))}function d(c){return`${{}.TEAM_LOGOS_URL||"https://golstatsimages.blob.core.windows.net/teams-80/"}${c}.png`}return(c,h)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["checkbox",`box-${t.boxPosition}`]),onClick:s},[e.createElementVNode("div",{class:"checkbox__box",style:e.normalizeStyle(i.value)},[l.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[a.boxValue?(e.openBlock(),e.createElementBlock("div",{key:0,class:"checkbox__box__value",style:e.normalizeStyle(r.value)},e.toDisplayString(t.boxValue),5)):(e.openBlock(),e.createElementBlock("div",n$,[(e.openBlock(),e.createElementBlock("svg",s$,[e.createElementVNode("path",{d:"M9.77994 1.70133L4.10994 7.37133C3.96994 7.51133 3.77994 7.59133 3.57994 7.59133C3.37994 7.59133 3.18994 7.51133 3.04994 7.37133L0.219941 4.54133C-0.0700586 4.25133 -0.0700586 3.77133 0.219941 3.48133C0.509941 3.19133 0.989941 3.19133 1.27994 3.48133L3.57994 5.78133L8.71994 0.641328C9.00994 0.351328 9.48994 0.351328 9.77994 0.641328C10.0699 0.931328 10.0699 1.40133 9.77994 1.70133Z",fill:t.boxValueColor},null,8,c$)]))]))],64)):e.createCommentVNode("",!0)],4),t.teamsIds&&t.teamsIds.length?(e.openBlock(),e.createElementBlock("div",d$,[e.createElementVNode("div",p$,[e.createElementVNode("img",{src:d(t.teamsIds[0]),alt:""},null,8,m$)]),e.createElementVNode("div",u$,[e.createElementVNode("img",{src:d(t.teamsIds[1]),alt:""},null,8,f$)])])):e.createCommentVNode("",!0),e.createElementVNode("div",{class:"checkbox__label",style:e.normalizeStyle(n.value)},e.toDisplayString(t.label),5)],2))}},y$=i$(h$,[["__scopeId","data-v-b6f124d8"]]),g$=(t,o)=>{const a=t.__vccOpts||t;for(const[l,i]of o)a[l]=i;return a},Ol={props:{type:{type:Number,default:0},value:{type:Boolean,default:!1},textValue:String,icon:String,iconPosition:{type:String,default:"left"},iconSize:String,fontColor:{type:String,default:"#FFFFFF"},textDecoration:String,fontSize:{type:String,default:"16px"},fontSizeStat:{type:String,default:"16px"},fontStyle:String,fontFamily:{type:String,default:"Poppins-Regular"},height:{type:String,default:"fit-content"},width:{type:String,default:"fit-content"},borderRadius:{type:String,default:"0px"},borderType:{type:String,default:"solid"},borderWidth:{type:Number,default:0},borderWidthBtn:{type:String,default:"2px"},borderColor:String,backgroundColor:{type:String,default:"none"},activeBackgroundColor:{type:String,default:"#000000"},activeBorderWidth:{type:Number,default:2},activeBorderType:{type:String,default:"solid"},activeBorderColor:{type:String,default:"#cbee6b"},activeColorText:{type:String,default:"#FFFFFF"},cursorType:{type:String,default:"default"},typeOnOff:{type:Boolean,default:!1},textCategory:String,textStat:String,marginLeftStat:{type:String,default:"15%"}},watch:{value:{deep:!0,immediate:!0,handler(t){this.status=t}}},data(){return{status:!1}},computed:{customStyle(){return{height:this.height,width:this.width,backgroundColor:this.backgroundColor,borderRadius:this.borderRadius,border:`${this.borderType} ${this.borderWidth}px ${this.borderColor}`,color:this.fontColor,textDecoration:this.textDecoration,cursor:this.cursorType,fontSize:this.fontSize,fontStyle:this.fontStyle,fontFamily:`${this.fontFamily} !important`}},customActive(){return{backgroundColor:this.activeBackgroundColor,color:this.activeColorText,border:`${this.activeBorderType} ${this.activeBorderWidth}px ${this.activeBorderColor}`}}},methods:{btnClick(t){this.$emit("click",t),this.typeOnOff&&(this.status=!this.status,this.$emit("status",this.status))}}},ps=()=>{e.useCssVars(t=>({"9d01acb4":t.height,"14e95081":t.borderWidthBtn,"38fec285":t.borderType,34353510:t.borderColor,"20d20dc6":t.borderRadius,17130967:t.width,"4ccb7d36":t.backgroundColor,"5d1e86a2":t.cursorType,ce65d4a2:t.fontSize,fe4ac47a:t.fontStyle,f98e44dc:t.fontFamily,"93b87770":t.marginLeftStat,c7f7beba:t.fontSizeStat}))},ms=Ol.setup;Ol.setup=ms?(t,o)=>(ps(),ms(t,o)):ps;const b$=t=>(e.pushScopeId("data-v-f3ee6b2b"),t=t(),e.popScopeId(),t),_$=["src"],S$={key:1,class:"text"},E$=["src"],C$={class:"stats"},k$=b$(()=>e.createElementVNode("img",{class:"iconstats",src:"https://golstatsimages.blob.core.windows.net/todoelfut/playdes.png"},null,-1)),w$={class:"numstats"},V$={class:"leyend"};function N$(t,o,a,l,i,r){return e.openBlock(),e.createElementBlock("div",null,[a.type==0?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["button",i.status&&a.typeOnOff&&"button-active"]),style:e.normalizeStyle([r.customStyle,i.status&&a.typeOnOff&&r.customActive]),onClick:o[0]||(o[0]=(...n)=>r.btnClick&&r.btnClick(...n))},[a.icon&&a.iconPosition.toLowerCase()==="left"?(e.openBlock(),e.createElementBlock("img",{key:0,class:"icon",style:e.normalizeStyle({width:a.iconSize}),src:a.icon},null,12,_$)):e.createCommentVNode("",!0),a.textValue?(e.openBlock(),e.createElementBlock("div",S$,e.toDisplayString(a.textValue),1)):e.createCommentVNode("",!0),a.icon&&a.iconPosition.toLowerCase()==="right"?(e.openBlock(),e.createElementBlock("img",{key:2,class:"icon",style:e.normalizeStyle({width:a.iconSize}),src:a.icon},null,12,E$)):e.createCommentVNode("",!0)],6)):e.createCommentVNode("",!0),a.type==1?(e.openBlock(),e.createElementBlock("div",{key:1,class:"button-target",onClick:o[1]||(o[1]=(...n)=>r.btnClick&&r.btnClick(...n))},[e.createElementVNode("div",C$,[k$,e.createElementVNode("div",w$,e.toDisplayString(a.textStat),1)]),e.createElementVNode("div",V$,e.toDisplayString(a.textCategory),1)])):e.createCommentVNode("",!0)])}const x$=g$(Ol,[["render",N$],["__scopeId","data-v-f3ee6b2b"]]),us=(t,o)=>{const a=t.__vccOpts||t;for(const[l,i]of o)a[l]=i;return a},vl=t=>(e.pushScopeId("data-v-df83603b"),t=t(),e.popScopeId(),t),B$={key:0,class:"overlay"},F$=["onClick"],T$=vl(()=>e.createElementVNode("svg",{width:"11",height:"12",viewBox:"0 0 11 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M7.50558 0C6.78112 0 6.10558 0.475441 5.89478 1.14401L1.21987 1.14286C0.904267 1.14286 0.648438 1.39886 0.648438 1.71429C0.648438 2.02972 0.904267 2.28572 1.21987 2.28572L5.89478 2.28516C6.15083 2.98516 6.78112 3.42858 7.50558 3.42858C8.23004 3.42858 8.86678 2.98402 9.1273 2.28059L10.3627 2.28572C10.6783 2.28572 10.9342 2.02972 10.9342 1.71429C10.9342 1.39886 10.6783 1.14286 10.3627 1.14286H9.12244C8.8473 0.446287 8.23004 0 7.50558 0ZM7.50558 1.14286C7.82118 1.14286 8.07701 1.39886 8.07701 1.71429C8.07701 2.02972 7.82118 2.28572 7.50558 2.28572C7.18998 2.28572 6.93415 2.02972 6.93415 1.71429C6.93415 1.39886 7.18998 1.14286 7.50558 1.14286ZM4.07701 4.28572C3.32387 4.28572 2.69347 4.7543 2.4633 5.42971C2.38295 5.43485 1.21987 5.42856 1.21987 5.42856C0.904267 5.42856 0.648438 5.68456 0.648438 5.99999C0.648438 6.31542 0.904267 6.57142 1.21987 6.57142C1.21987 6.57142 2.39267 6.55942 2.46575 6.56685C2.69593 7.24228 3.32387 7.71428 4.07701 7.71428C4.80146 7.71428 5.42226 7.27028 5.69381 6.57314L10.3627 6.57142C10.6783 6.57142 10.9342 6.31542 10.9342 5.99999C10.9342 5.68456 10.6783 5.42856 10.3627 5.42856L5.69083 5.42348C5.44038 4.74174 4.80146 4.28572 4.07701 4.28572ZM4.07701 5.42856C4.39261 5.42856 4.64844 5.68456 4.64844 5.99999C4.64844 6.31542 4.39261 6.57142 4.07701 6.57142C3.76141 6.57142 3.50558 6.31542 3.50558 5.99999C3.50558 5.68456 3.76141 5.42856 4.07701 5.42856ZM7.50558 8.57142C6.78112 8.57142 6.11844 9.04857 5.89438 9.70857L1.21987 9.71428C0.904267 9.71428 0.648438 9.97028 0.648438 10.2857C0.648438 10.6011 0.904267 10.8571 1.21987 10.8571L5.88592 10.8577C6.12301 11.5349 6.78112 12 7.50558 12C8.23004 12 8.85467 11.5469 9.12987 10.8577L10.3627 10.8571C10.6783 10.8571 10.9342 10.6011 10.9342 10.2857C10.9342 9.97028 10.6783 9.71428 10.3627 9.71428L9.12467 9.71091C8.87798 9.03491 8.23004 8.57142 7.50558 8.57142ZM7.50558 9.71428C7.82118 9.71428 8.07701 9.97028 8.07701 10.2857C8.07701 10.6011 7.82118 10.8571 7.50558 10.8571C7.18998 10.8571 6.93415 10.6011 6.93415 10.2857C6.93415 9.97028 7.18998 9.71428 7.50558 9.71428Z",fill:"white"})],-1)),A$=[T$],$$={class:"name"},M$=["onClick"],I$=vl(()=>e.createElementVNode("g",{opacity:".5",stroke:"#fff","stroke-width":"1.677","stroke-linecap":"round","stroke-linejoin":"round"},[e.createElementVNode("path",{d:"M4.532 2.13v13.74M8.202 12.2l-3.67 3.669-3.669-3.67M12.919 15.87V2.132M16.589 5.802l-3.67-3.67-3.669 3.67"})],-1)),R$=[I$],P$=vl(()=>e.createElementVNode("div",{class:"column-title-2"},null,-1)),L$=["onClick"],O$={__name:"ScrollColumns",props:{availablePlayers:{type:Array,default:()=>[]},isEditMode:{type:Boolean,default:!1}},emits:["expand","open-media","click-parameters","sort"],setup(t,{expose:o,emit:a}){const l=t,i=e.ref(null),r=e.ref(null),n=e.ref(0);e.ref(!1);const s=e.computed(()=>{const f=l.availablePlayers[0];return f?f.stats:[]}),d=e.computed(()=>{const f=`repeat(${s.value.length}, max-content) 36px`;let m="";return n.value>0&&document.querySelectorAll(".column-title-2").forEach(g=>{m+=`${g.offsetWidth}px `}),{"--grid-template-columns":f,"--grid-template-columns-totals":m||f}});function c(){i.value=new ResizeObserver(f=>{for(const m of f){const{width:g}=m.contentRect;n.value=g}}),i.value.observe(r.value)}function h(f,m){const g=document.querySelectorAll(".scrollable-row-totals")[f+1];g&&(g.style.marginTop=`${m}px`)}function p({player:f,stat:m}){!m.total||m==="0%"||!m.seasons||!m.seasons.length||a("open-media",{...f,stat:m})}function y(f){!f||f==="no"||a("click-parameters",f)}function u(f){a("sort",f)}return e.onMounted(()=>{c()}),o({setMarginTopDetails:h}),(f,m)=>(e.openBlock(),e.createElementBlock("div",{class:"scroll-columns",style:e.normalizeStyle(d.value)},[t.isEditMode?(e.openBlock(),e.createElementBlock("div",B$)):e.createCommentVNode("",!0),e.createElementVNode("div",{ref_key:"titlesRow",ref:r,class:"scrollable-row-2"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,(g,b)=>(e.openBlock(),e.createElementBlock("div",{key:`t-${b}`,class:"column-title-2"},[g.parameters&&g.parameters!=="no"?(e.openBlock(),e.createElementBlock("div",{key:0,class:"parameters",role:"button",onClick:S=>y(g.parameters)},A$,8,F$)):e.createCommentVNode("",!0),e.createElementVNode("div",$$,e.toDisplayString(g.name),1),(e.openBlock(),e.createElementBlock("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",onClick:S=>u(g)},R$,8,M$))]))),128)),P$],512),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.availablePlayers,(g,b)=>(e.openBlock(),e.createElementBlock("div",{key:`i-${g.id}`,class:"row scrollable-row-totals"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.stats,S=>(e.openBlock(),e.createElementBlock("div",{key:S.category_id,class:e.normalizeClass(["row data-info",{odd:b%2!==0,underline:!!S.total&&S.total!=="0%"&&S.seasons&&S.seasons.length}])},[e.createElementVNode("span",{onClick:v=>p({player:g,stat:S})},e.toDisplayString(S.total),9,L$)],2))),128))]))),128))],4))}},v$=us(O$,[["__scopeId","data-v-df83603b"]]),ie=t=>(e.pushScopeId("data-v-18f2714a"),t=t(),e.popScopeId(),t),D$={class:"table__static-column"},z$={class:"static-title column-title restore"},U$=ie(()=>e.createElementVNode("div",{class:"titles-left"},[e.createElementVNode("div",{class:"title"},"Ranking"),e.createElementVNode("div",{class:"title"},"Agregar a lista")],-1)),j$=ie(()=>e.createElementVNode("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("g",{opacity:".6",stroke:"#fff","stroke-width":"1.333","stroke-linecap":"round","stroke-linejoin":"round"},[e.createElementVNode("path",{d:"M15.333 2.667v4h-4M.667 13.333v-4h4"}),e.createElementVNode("path",{d:"M2.34 6a6 6 0 0 1 9.9-2.24l3.094 2.906M.667 9.333l3.093 2.906a6 6 0 0 0 9.9-2.24"})])],-1)),H$=ie(()=>e.createElementVNode("div",null,"Restaurar orden",-1)),W$=[j$,H$],G$=["id"],q$={class:"container"},Y$={class:"details-row__info"},Z$={class:"details-row__info__personal"},J$={class:"bold"},K$={class:"bold"},X$={class:"bold"},Q$={class:"bold"},eM={class:"details-row__info__games"},tM={class:"bold"},aM={class:"bold"},oM=["onClick"],lM=ie(()=>e.createElementVNode("div",null,"Ver gráfica",-1)),rM=ie(()=>e.createElementVNode("svg",{width:"17",height:"16",viewBox:"0 0 17 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("g",{"clip-path":"url(#clip0_3514_71971)"},[e.createElementVNode("path",{d:"M16.3338 6.02932L8.65108 0.447539C8.56099 0.38207 8.43896 0.38207 8.34886 0.447539C8.34292 0.451852 1.97661 5.07726 0.6663 6.02926C0.498706 6.09269 0.445831 6.30248 0.563113 6.43788L3.48277 15.4238C3.51717 15.5297 3.61589 15.6014 3.72727 15.6014H13.2635C13.3911 15.6014 13.484 15.5258 13.5172 15.4238L16.4368 6.43788C16.5544 6.3022 16.501 6.09269 16.3338 6.02932ZM13.1818 14.792L12.2937 13.5604C12.4178 13.3198 12.4262 13.0472 12.3402 12.813L13.4007 8.12035C13.7342 7.97885 13.9718 7.64673 13.9682 7.25316L15.8203 6.67173L13.1818 14.792ZM1.18005 6.67273L2.54311 7.10316C2.52677 7.60485 2.90696 8.01919 3.39221 8.06116L5.37836 11.3233C5.0798 11.6827 5.09336 12.2096 5.41452 12.5533L3.8173 14.7894L1.18005 6.67273ZM7.02283 11.9909C7.03952 11.7764 6.98346 11.5718 6.86936 11.4011L8.47839 9.14851L10.8495 12.4367C10.7173 12.5536 10.6187 12.7075 10.5697 12.8821L7.02283 11.9909ZM7.62217 4.78338C7.74714 5.00898 7.96299 5.17704 8.22033 5.23844V8.35679L4.40411 7.15166C4.40767 6.95926 4.35377 6.77813 4.25196 6.6232L7.62217 4.78338ZM12.2474 6.77016C12.151 6.92429 12.0998 7.10551 12.1071 7.29851L8.73449 8.35735V5.21526C8.94317 5.14495 9.11883 5.00291 9.23183 4.8182L12.2474 6.77016ZM4.25277 7.64307L8.06249 8.84613L6.47533 11.0681C6.26327 10.973 6.02383 10.9611 5.80383 11.0334L3.92524 7.94795C4.05761 7.87432 4.17008 7.76935 4.25277 7.64307ZM11.9237 12.3234C11.7375 12.2181 11.526 12.1827 11.3228 12.214L8.8943 8.84613L12.2678 7.78701C12.4038 7.98623 12.6151 8.12979 12.8607 8.17698L11.9237 12.3234ZM12.648 6.41704L9.36721 4.29329C9.35074 3.90045 9.09089 3.57073 8.73449 3.45063V1.14366L15.6674 6.18076L13.8211 6.76041C13.5672 6.3651 13.0654 6.22463 12.648 6.41704ZM8.22033 3.42748C7.83383 3.5197 7.54105 3.8527 7.50917 4.25923L3.8238 6.27107C3.42227 6.10782 2.95152 6.24232 2.70096 6.61379L1.33164 6.18138L8.22033 1.17648V3.42748ZM5.85711 12.8183C6.22189 12.9143 6.61096 12.7823 6.84071 12.4753L10.5778 13.4143C10.7578 13.9855 11.4215 14.2369 11.9331 13.9395L12.7607 15.0872H4.23642L5.85711 12.8183Z",fill:"white"})]),e.createElementVNode("defs",null,[e.createElementVNode("clipPath",{id:"clip0_3514_71971"},[e.createElementVNode("rect",{width:"16",height:"16",fill:"white",transform:"translate(0.5)"})])])],-1)),iM=[lM,rM],nM=["onClick"],sM=ie(()=>e.createElementVNode("div",null,"Eliminar de lista",-1)),cM=ie(()=>e.createElementVNode("svg",{width:"17",height:"15",viewBox:"0 0 20 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M13.3345 16.5001V14.8334C13.3345 13.9494 12.9833 13.1015 12.3582 12.4764C11.7331 11.8513 10.8852 11.5001 10.0012 11.5001H5.00126C4.11722 11.5001 3.26938 11.8513 2.64427 12.4764C2.01915 13.1015 1.66797 13.9494 1.66797 14.8334V16.5001",stroke:"white","stroke-opacity":"0.5","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}),e.createElementVNode("path",{d:"M7.50126 8.16658C9.34219 8.16658 10.8346 6.67422 10.8346 4.83329C10.8346 2.99237 9.34219 1.5 7.50126 1.5C5.66033 1.5 4.16797 2.99237 4.16797 4.83329C4.16797 6.67422 5.66033 8.16658 7.50126 8.16658Z",stroke:"white","stroke-opacity":"0.5","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}),e.createElementVNode("path",{d:"M18.332 8.16663H13.332",stroke:"white","stroke-opacity":"0.5","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})],-1)),dM=[sM,cM],pM=["onClick"],mM=ie(()=>e.createElementVNode("div",null,"Agregar a lista",-1)),uM=ie(()=>e.createElementVNode("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M13.2016 17.2012V15.601C13.2016 14.7522 12.8645 13.9381 12.2643 13.3379C11.664 12.7377 10.85 12.4005 10.0012 12.4005H5.20047C4.35165 12.4005 3.5376 12.7377 2.9374 13.3379C2.33719 13.9381 2 14.7522 2 15.601V17.2012",stroke:"white","stroke-opacity":"1","stroke-width":"1.44023","stroke-linecap":"round","stroke-linejoin":"round"}),e.createElementVNode("path",{d:"M7.60086 9.19977C9.36843 9.19977 10.8013 7.76687 10.8013 5.9993C10.8013 4.23173 9.36843 2.79883 7.60086 2.79883C5.83329 2.79883 4.40039 4.23173 4.40039 5.9993C4.40039 7.76687 5.83329 9.19977 7.60086 9.19977Z",stroke:"white","stroke-opacity":"1","stroke-width":"1.44023","stroke-linecap":"round","stroke-linejoin":"round"}),e.createElementVNode("path",{d:"M15.5996 6.79944V11.6001M17.9999 9.19979H13.1992",stroke:"white","stroke-opacity":"1","stroke-width":"1.44023","stroke-linecap":"round","stroke-linejoin":"round"})],-1)),fM=[mM,uM],hM=["onClick"],yM=ie(()=>e.createElementVNode("div",null,"Ver perfil",-1)),gM=[yM],bM={class:"static-row__info-player"},_M={class:"position"},SM=["onClick"],EM=ie(()=>e.createElementVNode("path",{d:"M13.3345 16.5001V14.8334C13.3345 13.9494 12.9833 13.1015 12.3582 12.4764C11.7331 11.8513 10.8852 11.5001 10.0012 11.5001H5.00126C4.11722 11.5001 3.26938 11.8513 2.64427 12.4764C2.01915 13.1015 1.66797 13.9494 1.66797 14.8334V16.5001",stroke:"white","stroke-opacity":"0.5","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)),CM=ie(()=>e.createElementVNode("path",{d:"M7.50126 8.16658C9.34219 8.16658 10.8346 6.67422 10.8346 4.83329C10.8346 2.99237 9.34219 1.5 7.50126 1.5C5.66033 1.5 4.16797 2.99237 4.16797 4.83329C4.16797 6.67422 5.66033 8.16658 7.50126 8.16658Z",stroke:"white","stroke-opacity":"0.5","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)),kM=ie(()=>e.createElementVNode("path",{d:"M18.332 8.16663H13.332",stroke:"white","stroke-opacity":"0.5","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)),wM=[EM,CM,kM],VM={key:1,class:"add-to-list"},NM=["onClick"],xM=ie(()=>e.createElementVNode("path",{d:"M13.2016 17.2012V15.601C13.2016 14.7522 12.8645 13.9381 12.2643 13.3379C11.664 12.7377 10.85 12.4005 10.0012 12.4005H5.20047C4.35165 12.4005 3.5376 12.7377 2.9374 13.3379C2.33719 13.9381 2 14.7522 2 15.601V17.2012",stroke:"white","stroke-opacity":"1","stroke-width":"1.44023","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)),BM=ie(()=>e.createElementVNode("path",{d:"M7.60086 9.19977C9.36843 9.19977 10.8013 7.76687 10.8013 5.9993C10.8013 4.23173 9.36843 2.79883 7.60086 2.79883C5.83329 2.79883 4.40039 4.23173 4.40039 5.9993C4.40039 7.76687 5.83329 9.19977 7.60086 9.19977Z",stroke:"white","stroke-opacity":"1","stroke-width":"1.44023","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)),FM=ie(()=>e.createElementVNode("path",{d:"M15.5996 6.79944V11.6001M17.9999 9.19979H13.1992",stroke:"white","stroke-opacity":"1","stroke-width":"1.44023","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)),TM=[xM,BM,FM],AM={class:"player-photo"},$M=["src"],MM={class:"player-name"},IM={class:"arrow"},RM=["onClick"],PM=ie(()=>e.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M6 4.93631L10.2929 1.23496C10.6834 0.898244 11.3166 0.898244 11.7071 1.23496C12.0976 1.57167 12.0976 2.11759 11.7071 2.4543L6.70711 6.76532C6.31658 7.10203 5.68342 7.10203 5.29289 6.76532L0.292893 2.4543C-0.0976311 2.11759 -0.0976311 1.57167 0.292893 1.23496C0.683418 0.898244 1.31658 0.898244 1.70711 1.23496L6 4.93631Z",fill:"#D9D9D9"},null,-1)),LM=[PM],OM={class:"titles scrollable-row"},vM={class:"column-title"},DM=ie(()=>e.createElementVNode("div",null," Equipo ",-1)),zM=ie(()=>e.createElementVNode("g",{opacity:".5",stroke:"#fff","stroke-width":"1.677","stroke-linecap":"round","stroke-linejoin":"round"},[e.createElementVNode("path",{d:"M4.532 2.13v13.74M8.202 12.2l-3.67 3.669-3.669-3.67M12.919 15.87V2.132M16.589 5.802l-3.67-3.67-3.669 3.67"})],-1)),UM=[zM],jM={class:"column-title"},HM=ie(()=>e.createElementVNode("div",null," Posición ",-1)),WM=ie(()=>e.createElementVNode("g",{opacity:".5",stroke:"#fff","stroke-width":"1.677","stroke-linecap":"round","stroke-linejoin":"round"},[e.createElementVNode("path",{d:"M4.532 2.13v13.74M8.202 12.2l-3.67 3.669-3.669-3.67M12.919 15.87V2.132M16.589 5.802l-3.67-3.67-3.669 3.67"})],-1)),GM=[WM],qM={class:"column-title"},YM=ie(()=>e.createElementVNode("div",null," Edad ",-1)),ZM=ie(()=>e.createElementVNode("g",{opacity:".5",stroke:"#fff","stroke-width":"1.677","stroke-linecap":"round","stroke-linejoin":"round"},[e.createElementVNode("path",{d:"M4.532 2.13v13.74M8.202 12.2l-3.67 3.669-3.669-3.67M12.919 15.87V2.132M16.589 5.802l-3.67-3.67-3.669 3.67"})],-1)),JM=[ZM],KM=ie(()=>e.createElementVNode("div",{class:"column-title"},"País",-1)),XM={class:"column-title"},QM=ie(()=>e.createElementVNode("div",null," Partidos Jugados ",-1)),eI=ie(()=>e.createElementVNode("g",{opacity:".5",stroke:"#fff","stroke-width":"1.677","stroke-linecap":"round","stroke-linejoin":"round"},[e.createElementVNode("path",{d:"M4.532 2.13v13.74M8.202 12.2l-3.67 3.669-3.669-3.67M12.919 15.87V2.132M16.589 5.802l-3.67-3.67-3.669 3.67"})],-1)),tI=[eI],aI={class:"column-title"},oI=ie(()=>e.createElementVNode("div",null," Minutos Jugados ",-1)),lI=ie(()=>e.createElementVNode("g",{opacity:".5",stroke:"#fff","stroke-width":"1.677","stroke-linecap":"round","stroke-linejoin":"round"},[e.createElementVNode("path",{d:"M4.532 2.13v13.74M8.202 12.2l-3.67 3.669-3.669-3.67M12.919 15.87V2.132M16.589 5.802l-3.67-3.67-3.669 3.67"})],-1)),rI=[lI],iI={class:"column-title"},nI=ie(()=>e.createElementVNode("div",null," Liga ",-1)),sI=ie(()=>e.createElementVNode("g",{opacity:".5",stroke:"#fff","stroke-width":"1.677","stroke-linecap":"round","stroke-linejoin":"round"},[e.createElementVNode("path",{d:"M4.532 2.13v13.74M8.202 12.2l-3.67 3.669-3.669-3.67M12.919 15.87V2.132M16.589 5.802l-3.67-3.67-3.669 3.67"})],-1)),cI=[sI],dI=ie(()=>e.createElementVNode("div",{class:"column-title"},"Videos",-1)),pI={class:"team-logo"},mI=["src"],uI={class:"team-name data-info"},fI=["src"],hI={__name:"GSC-TableScrollable",props:{players:{type:Array,default:()=>[]},isGeneral:{type:Boolean,default:!0},isEditMode:{type:Boolean,default:!1},isTableFromList:{type:Boolean,default:!1}},emits:["change-selected-players","view-profile","add-to-list","view-graph","open-media","click-parameters"],setup(t,{emit:o}){const a=t;let l=null,i=null;const r=e.ref([]),n=e.ref(null),s=e.ref(null),d=e.ref(0),c=e.ref(0),h=e.ref(-1);e.ref(!1);const p=e.ref(null),y=e.ref(null),u=e.ref(null),f=e.ref([]),m=e.ref([{name:"team_abrev",isDesc:!1,isRoot:!0},{name:"player_position",isDesc:!1,isRoot:!0},{name:"player_age",isDesc:!1,isRoot:!0},{name:"player_games",isDesc:!1,isRoot:!0},{name:"player_min",isDesc:!1,isRoot:!0},{name:"league_name",isDesc:!1,isRoot:!0}]),g=e.ref(0),b=e.computed(()=>({"--width-details":`${d.value}px`,"--gap-static-row":`${S.value?"8px":"18px"}`,"--width-static-column":`${S.value?"50%":"436px"}`})),S=e.computed(()=>d.value<600);e.watch(()=>a.players,B=>{B&&B.length&&(r.value=B.map((j,F)=>{const T=F+1,C={...j,position:T<10?`0${T}`:`${T}`,isSelected:!1,isExpanded:!1,isOdd:F%2!==0,index:F};return j.stats&&j.stats.length&&(C.stats=j.stats.map(W=>({...W,isDesc:!1,isRoot:!1}))),C.parameters&&Object.entries(C.parameters).forEach(([W,_])=>{const k=C.stats.find(Y=>Y.custom_category_id===Number(W));k&&(k.parameters=_)}),C}),f.value=r.value.map(j=>({...j})))},{immediate:!0,deep:!0}),e.watch(()=>a.isEditMode,B=>{B&&r.value.forEach(j=>{j.isSelected=!1})}),e.watch(()=>u.value,B=>{if(B){let j=[...f.value];B.isRoot?j.sort((F,T)=>typeof F[B.name]=="string"?B.isDesc?F[B.name].localeCompare(T[B.name]):F[B.name].localeCompare(T[B.name])*-1:B.isDesc?T[B.name]-F[B.name]:F[B.name]-T[B.name]):j.sort((F,T)=>{const C=F.stats.find(_=>_.name===B.name),W=T.stats.find(_=>_.name===B.name);return typeof C.value=="string"?B.isDesc?C.total.localeCompare(W.total):C.total.localeCompare(W.total)*-1:B.isDesc?W.total-C.total:C.total-W.total}),j.forEach((F,T)=>{F.isOdd=T%2!==0}),f.value=j}else f.value.sort((j,F)=>j.index-F.index).forEach((j,F)=>{j.isOdd=F%2!==0})},{immediate:!0,deep:!0}),e.watch(c,B=>{const j=document.querySelectorAll(".static-row")[h.value+1];j&&(j.style.marginTop=`${B}px`),a.isGeneral?v(h.value,B):s.value&&s.value.setMarginTopDetails(h.value,B),B===0&&p.value&&J(p.value)});function v(B,j){const F=document.querySelectorAll(".scrollable-row")[B+2];F&&(F.style.marginTop=`${j}px`)}function q(B){o("click-parameters",B)}function O(B){B&&(B.isDesc=!B.isDesc),u.value=B}function z(B){const j=B.player||B.objeto_player,F=j?j.player_id||j.id||j.playerId:B.id||B.player_id,T={isFeaturedPlayers:!1,mainSectionType:1,playListType:2,gameIds:null,playerIds:F?[F]:[],goalkeeperIds:[],matchResult:[1,2,3],categorySingleName:"",isRivalSubject:!1,avoidCategorySingleName:!1,currentPlayIndex:0,playData:null,lastClashedGameId:null,tournamentsLastClashes:null,advancedFilter:{playListTitle:"Jugadas Relevantes"}};if(B.stat&&B.stat.parameters&&(T.parameters=B.stat.parameters),B.stat&&B.stat.seasons&&B.stat.seasons.length||B.seasons&&B.seasons.length){const C=[...B.stat&&B.stat.seasons&&B.stat.seasons.length?B.stat.seasons:B.seasons];C.sort((W,_)=>W-_),T.seasonId=C.shift(),T.seasonsIds=C}else(B.season_id||B.seasonId)&&(T.seasonId=B.season_id||B.seasonId);B.stat?B.stat.category_id&&B.stat.category_id.length?T.categoryIds=B.stat.category_id:B.stat.custom_category_id&&(T.customCategoryIds=[B.stat.custom_category_id]):T.categoryIds=H(B.player_position),o("open-media",T)}function G(){l=new ResizeObserver(B=>{for(const j of B)d.value=j.contentRect.width}),l.observe(n.value)}function D(B){i=new ResizeObserver(j=>{for(const F of j)c.value=F.contentRect.height}),i.observe(B)}function H(B){return B==="POR"?[39,40,52,53,54,55,323,324,608,774,802]:[10,12,14,15,27,35,61,217,257,466,519,607,702,730,98,101,109,112,121,122,127,128,135,136,141,142,161,170,179,211,232,235,239,242,282,284,289,291,296,485,486,487,488]}function V(B,j){j.isSelected=B;const F=r.value.filter(T=>T.isSelected);o("change-selected-players",F)}function w(B){o("view-profile",B)}function P(B){o("delete-from-list",B)}function R(B){o("add-to-list",B)}function Z(B){o("show-graph",B)}function J(B){if(B.isExpanded){B.isExpanded=!1,p.value=null;return}const j=r.value.find(W=>W.isExpanded);if(j&&(j.isExpanded=!1),j){p.value=B;return}const F=document.querySelectorAll(".details-row");let T=-1;F.forEach((W,_)=>{W.id===`dr-${B.id}`&&(T=_)});const C=F[T];h.value=T,D(C),B.isExpanded=!0}let pe=!1,se,E,A=function(B){pe=!0,se=B.pageX-y.value.offsetLeft,E=y.value.scrollLeft},U=function(){pe=!1};function L(){y.value&&(y.value.addEventListener("mousemove",B=>{if(!pe)return;const j=B.pageX-y.value.offsetLeft-se;y.value.scrollLeft=E-j}),y.value.addEventListener("mousedown",A,!1),y.value.addEventListener("mouseup",U,!1),y.value.addEventListener("mouseleave",U,!1))}return e.onMounted(()=>{G(),L()}),e.onBeforeUnmount(()=>{l&&l.disconnect(),i&&i.disconnect(),y.value&&(y.value.removeEventListener("mousemove",A,!1),y.value.removeEventListener("mouseup",U,!1),y.value.removeEventListener("mouseleave",U,!1))}),(B,j)=>(e.openBlock(),e.createElementBlock("div",{class:"table",ref_key:"tableSC",ref:n,style:e.normalizeStyle(b.value),key:g.value},[e.createElementVNode("div",D$,[e.createElementVNode("div",z$,[U$,e.createElementVNode("div",{role:"button",class:"restore-button",onClick:j[0]||(j[0]=F=>O(null))},W$)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,F=>(e.openBlock(),e.createElementBlock("div",{key:`s-${F.id}`,class:e.normalizeClass(["row static-row",{odd:F.isOdd}])},[e.createVNode(e.Transition,null,{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",{id:`dr-${F.id}`,class:e.normalizeClass(["details-row",{odd:F.isOdd}])},[e.createElementVNode("div",q$,[e.createElementVNode("div",Y$,[e.createElementVNode("div",Z$,[e.createElementVNode("div",null,[e.createTextVNode("Equipo: "),e.createElementVNode("span",J$,e.toDisplayString(F.team_name),1)]),e.createElementVNode("div",null,[e.createTextVNode("Edad: "),e.createElementVNode("span",K$,e.toDisplayString(F.player_age)+" Años",1)]),e.createElementVNode("div",null,[e.createTextVNode("Nacionalidad: "),e.createElementVNode("span",X$,e.toDisplayString(F.player_country),1)]),e.createElementVNode("div",null,[e.createTextVNode("Posición: "),e.createElementVNode("span",Q$,e.toDisplayString(F.position_name),1)])]),e.createElementVNode("div",eM,[e.createElementVNode("div",null,[e.createTextVNode("Partidos Jugados: "),e.createElementVNode("span",tM,e.toDisplayString(F.player_games),1)]),e.createElementVNode("div",null,[e.createTextVNode("Minutos Jugados: "),e.createElementVNode("span",aM,e.toDisplayString(F.player_min),1)])])]),e.createElementVNode("div",{class:"details-row__buttons",style:e.normalizeStyle(S.value?"margin-left: 0; gap: 8px;":"")},[e.createElementVNode("div",{role:"button",class:"button",onClick:T=>Z(F)},iM,8,oM),t.isTableFromList?(e.openBlock(),e.createElementBlock("div",{key:0,role:"button",class:"button",onClick:T=>P(F)},dM,8,nM)):(e.openBlock(),e.createElementBlock("div",{key:1,role:"button",class:"button",onClick:T=>R(F)},fM,8,pM)),e.createElementVNode("div",{role:"button",class:"button green",onClick:T=>w(F)},gM,8,hM)],4)])],10,G$),[[e.vShow,F.isExpanded]])]),_:2},1024),t.isEditMode?(e.openBlock(),e.createBlock(e.unref(y$),{key:0,fontFamily:"Poppins-Regular",labelFontSize:"14px","model-value":F.isSelected,"onUpdate:modelValue":T=>V(T,F)},null,8,["model-value","onUpdate:modelValue"])):e.createCommentVNode("",!0),e.createElementVNode("div",bM,[e.createElementVNode("div",_M,e.toDisplayString(F.position),1),t.isTableFromList?(e.openBlock(),e.createElementBlock("svg",{key:0,width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",onClick:T=>P(F)},wM,8,SM)):(e.openBlock(),e.createElementBlock("div",VM,[(e.openBlock(),e.createElementBlock("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",onClick:T=>R(F)},TM,8,NM))])),e.createElementVNode("div",AM,[e.createElementVNode("div",null,[e.createElementVNode("img",{src:F.player_photo,alt:"player photo"},null,8,$M)])]),e.createElementVNode("div",MM,e.toDisplayString(F.player_name),1)]),e.createElementVNode("div",IM,[(e.openBlock(),e.createElementBlock("svg",{class:e.normalizeClass(["_arrowExpandIcon_6ak64_1115 _rotate_6ak64_5",{expanded:F.isExpanded}]),width:"12",height:"8",viewBox:"0 0 12 8",fill:"#D9D9D9",xmlns:"http://www.w3.org/2000/svg",onClick:T=>J(F)},LM,10,RM))])],2))),128))]),e.createElementVNode("div",{ref_key:"scrollableColumns",ref:y,class:"table__scrollable-columns"},[t.isGeneral?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("div",OM,[e.createElementVNode("div",vM,[DM,(e.openBlock(),e.createElementBlock("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",onClick:j[1]||(j[1]=F=>O(m.value[0]))},UM))]),e.createElementVNode("div",jM,[HM,(e.openBlock(),e.createElementBlock("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",onClick:j[2]||(j[2]=F=>O(m.value[1]))},GM))]),e.createElementVNode("div",qM,[YM,(e.openBlock(),e.createElementBlock("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",onClick:j[3]||(j[3]=F=>O(m.value[2]))},JM))]),KM,e.createElementVNode("div",XM,[QM,(e.openBlock(),e.createElementBlock("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",onClick:j[4]||(j[4]=F=>O(m.value[3]))},tI))]),e.createElementVNode("div",aI,[oI,(e.openBlock(),e.createElementBlock("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",onClick:j[5]||(j[5]=F=>O(m.value[4]))},rI))]),e.createElementVNode("div",iI,[nI,(e.openBlock(),e.createElementBlock("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",onClick:j[6]||(j[6]=F=>O(m.value[5]))},cI))]),dI]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,F=>(e.openBlock(),e.createElementBlock("div",{key:`i-${F.id}`,class:"row scrollable-row"},[e.createElementVNode("div",{class:e.normalizeClass(["row team-info",{odd:F.isOdd}])},[e.createElementVNode("div",pI,[e.createElementVNode("img",{src:F.team_logo,alt:"team logo"},null,8,mI)]),e.createElementVNode("div",uI,e.toDisplayString(F.team_abrev),1)],2),e.createElementVNode("div",{class:e.normalizeClass(["row data-info",{odd:F.isOdd}])},e.toDisplayString(F.player_position),3),e.createElementVNode("div",{class:e.normalizeClass(["row data-info",{odd:F.isOdd}])},e.toDisplayString(F.player_age),3),e.createElementVNode("div",{class:e.normalizeClass(["row data-info",{odd:F.isOdd}])},[e.createElementVNode("img",{src:F.player_country_flag,alt:"player country flag",class:"country-flag"},null,8,fI)],2),e.createElementVNode("div",{class:e.normalizeClass(["row data-info",{odd:F.isOdd}])},e.toDisplayString(F.player_games),3),e.createElementVNode("div",{class:e.normalizeClass(["row data-info",{odd:F.isOdd}])},e.toDisplayString(F.player_min),3),e.createElementVNode("div",{class:e.normalizeClass(["row data-info",{odd:F.isOdd}])},e.toDisplayString(F.league_name),3),e.createElementVNode("div",{class:e.normalizeClass(["row data-info",{odd:F.isOdd}])},[e.createVNode(e.unref(x$),{icon:"https://golstatsimages.blob.core.windows.net/images-library/arrow-btn.png","icon-size":"19px","icon-position":"left",width:"98px",height:"30px","border-radius":"30px","border-width":"1","background-color":"#ffffff1a","font-family":"Poppins-Regular","border-color":"#55636e","text-value":"Ver videos","font-size":"10px",onClick:T=>z(F)},null,8,["onClick"])],2)]))),128))],64)):(e.openBlock(),e.createBlock(v$,{key:1,ref_key:"scrollColumns",ref:s,"available-players":f.value,"is-edit-mode":t.isEditMode,onOpenMedia:z,onClickParameters:q,onSort:O},null,8,["available-players","is-edit-mode"]))],512)],4))}},yI=us(hI,[["__scopeId","data-v-18f2714a"]]),gI={3:"Albanesa",4:"Argelina",6:"Andorrano",7:"Angoleña",8:"Anguillan",9:"Antiguan",10:"Argentina",11:"Armenia",12:"Arubeño",13:"Austríaca",14:"Austríaca",15:"Azerbaiyano",16:"Bahamas",17:"Bareini",18:"Bangladesí",19:"Barbadense",20:"Bielorrusa",21:"Belga",22:"Beliceña",23:"Beninesa",24:"Bermudeña",25:"Butanés",26:"Boliviana",27:"Bosnia",28:"Botsuano",29:"Brasileña",30:"Islas Vírgenes Británicas",31:"Bruneano",32:"Búlgara",33:"Burundés",34:"Burmesa",35:"Burundés",36:"Camboyana",37:"Camerunés",38:"Canadiense",39:"Caboverdiano",40:"Caimanés",41:"Centroafricana",42:"Chadiano",43:"Chilena",44:"China",45:"Isla de Navidad",46:"Cocos Island",47:"Colombiana",48:"Comorense",49:"Congoleña",50:"Cookiano",51:"Costarricense",52:"Marfileña",53:"Croata",54:"Cubana",55:"Chipriota",56:"Checa",57:"Danesa",58:"Djibouti",60:"Dominicana",61:"Timorense",62:"Ecuatoriana",63:"Egipcia",64:"Salvadoreña",65:"Inglesa",66:"Ecuatoguineano",67:"Eritreo",68:"Estoniana",69:"Etíope",70:"Islas Malvinas",71:"Feroés",72:"Fiyiano",73:"Finlandesa",74:"Francesa",75:"Guayana Francesa",76:"Francopolinecio",77:"Gabonesa",78:"Gambiana",79:"Georgiano",80:"Alemana",81:"Ghanesa",82:"Gibraltareño",221:"Británico",84:"Griega",85:"Groenlandés",86:"Granadino",87:"Guadeloupeño",89:"Guatemalteca",90:"Guineana",91:"Guyanés",92:"Haitiana",93:"Hondureña",94:"Hongkongese",95:"Húngaro",96:"Islandesa",97:"Indio",98:"Indonesia",99:"Iraní",100:"Iraquí",101:"Irlandesa",102:"Manés",103:"Israelí",104:"Italiana",105:"Jamaiquina",106:"Japonesa",107:"Jordana",108:"Kazaja",109:"Keniana",110:"Kiribatiano",111:"Coreana",112:"Surcoreana",113:"Kosovan",114:"Kuwaití",115:"Kirguisa",116:"Laosiano",117:"Letona",118:"Libanesa",119:"Basotho",120:"Liberiana",121:"Libia",122:"Liechtenstein",123:"Lituano",124:"Luxemburguesa",125:"Macaneso",126:"Macedonia",127:"Malgache",128:"Malaya",129:"Malaya",130:"Maldivo",131:"Mali",132:"Maltesa",133:"Marshallese",134:"Martiniqueña",135:"Mauritania",136:"Mauriciano",137:"Mahoran",138:"Mexicana",139:"Micronesio",140:"Moldava",141:"Monacan",142:"Mongol",143:"Montenegrina",144:"Montserratiano",145:"Marroqui",146:"Mozambiqueña",147:"Namibio",148:"Nauruan",149:"Nepalí",150:"Holandesa",151:"Neocaledonio",152:"Neozelandesa",153:"Nicaragüense",154:"Niueño",155:"Nigerina",156:"Nigeriana",157:"Noruega",158:"Normariano",159:"Omaní",160:"Palestina",161:"Palestina",162:"Palauan",163:"Panameña",164:"Papú",165:"Paraguaya",166:"Peruana",167:"Filipina",168:"Pitcairnés",169:"Polaca",170:"Portuguesa",171:"Puertorriqueña",172:"Catari",173:"Reunionés",174:"Rumana",175:"Rusa",176:"Ruandés",177:"Santa Elena",178:"Sancristobaleña",179:"Santa Lucía",180:"Miquelonnais",181:"Sanvicentina",182:"Samoano",183:"Sanmariense",184:"Santotomense",185:"Saudí",186:"Escocesa",187:"Senegalense",188:"Serbia",189:"Seychellense",190:"Sierraleonesa",191:"Singapurense",192:"Eslovena",193:"Eslovena",194:"Salomonense",195:"Somalí",196:"Sudafricana",197:"Surosetio",198:"Española",199:"Esrilanques",200:"Sudanés",201:"Surinamés",202:"Swazi",203:"Sueca",204:"Suiza",205:"Sirio",206:"Taiwanesa",207:"Tayiko",208:"Tanzano",209:"Tailandesa",210:"Togo",211:"Tongano",212:"Trinitaria",213:"Tunecina",214:"Turca",215:"Turkmena",216:"none",217:"Tuvaluano",218:"Ugandesa",219:"Ucraniana",220:"Emiratí",222:"Americana",223:"Uruguaya",224:"Uzbeka",225:"Vanuatuense",226:"Venezolana",227:"Vietnamita",228:"Islas Vírgenes",229:"Galesa",230:"Walisiano",231:"Saharaui",232:"Yemení",233:"Zambiana",234:"Zimbabuense",236:"Curazaleña",237:"San Martín",239:"Debutante"},bI={class:"list-view"},_I=Ae({__name:"ListView",props:{playersScouting:{type:Object,default:()=>({})},userId:{type:Number,default:0},lists:{type:Array,default:()=>[]},token:{type:String,default:""},playerAddtionalData:{type:Object,default:()=>({})},playerStats:{type:Object,default:()=>({})},categories:{type:Array,default:()=>[]}},emits:["open-media"],setup(t,{emit:o}){const a=o,l=t,i=d=>{if(!d)return"-";const c=new Date(d),h=new Date;let p=h.getFullYear()-c.getFullYear();const y=h.getMonth()-c.getMonth();return(y<0||y===0&&h.getDate()<c.getDate())&&p--,p};function r(d){a("open-media",d)}const n=d=>{var c,h,p,y,u;return{objeto_player:d,player_photo:d.photo,player_name:d.name,player_id:d.player_id,player_age:i(d.dob),team_name:((c=l.playerAddtionalData[d.player_id])==null?void 0:c.team_name)||"-",team_id:d.team_id,team_logo:"https://golstatsimages.blob.core.windows.net/teams-80/"+d.team_id+".png",position_name:d.position,player_position:d.position,player_country:gI[`${d.nationality_id}`]||d.nationality,player_country_flag:"https://golstatsimages.blob.core.windows.net/flags/"+d.nationality_id+".jpg",player_games:((h=l.playerAddtionalData[d.player_id])==null?void 0:h.games_played)||0,player_min:((p=l.playerAddtionalData[d.player_id])==null?void 0:p.minutes)||0,league_name:(y=l.playerAddtionalData[d.player_id])==null?void 0:y.tournament_name,seasons:[],season_id:((u=l.playerAddtionalData[d.player_id])==null?void 0:u.season_id)||0,stats:d.stats.map(f=>({category_id:f[4],custom_category_id:f[0],name:f[1].replace(/\([^)]*\)/g,"").trim().toLowerCase().replace(/^\w/,m=>m.toUpperCase()),parameters:f.parameters,total:f[2],seasons:f[3]}))}},s=e.computed(()=>l.playersScouting?Object.values(l.playersScouting).map(d=>n(d)):[]);return(d,c)=>(e.openBlock(),e.createElementBlock("div",bI,[e.createVNode(e.unref(yI),{players:s.value,"is-general":!1,"is-edit-mode":!1,"is-table-from-list":!1,onOpenMedia:r},null,8,["players"])]))}},[["__scopeId","data-v-8415432a"]]),SI={class:"title"},EI=["disabled"],CI={key:0,class:"loading-spinner"},kI={key:1},wI={key:2},VI={class:"settings-row"},NI={class:"switch-track"},xI={class:"selector-container"},BI={key:1,class:"criterio-wrapper"},FI={class:"content-container"},TI={class:"header-tools header-tools-graph"},AI={key:0,class:"ht-left"},$I={class:"ht-visualization-selector"},MI={key:0,width:"56",height:"56",viewBox:"0 0 56 56",fill:"none",xmlns:"http://www.w3.org/2000/svg"},II={key:1,width:"56",height:"56",viewBox:"0 0 56 56",fill:"none",xmlns:"http://www.w3.org/2000/svg"},RI={key:0,width:"57",height:"56",viewBox:"0 0 57 56",fill:"none",xmlns:"http://www.w3.org/2000/svg"},PI={key:1,width:"56",height:"56",viewBox:"0 0 56 56",fill:"none",xmlns:"http://www.w3.org/2000/svg"},LI={key:0,width:"56",height:"56",viewBox:"0 0 56 56",fill:"none",xmlns:"http://www.w3.org/2000/svg"},OI={key:1,width:"56",height:"56",viewBox:"0 0 56 56",fill:"none",xmlns:"http://www.w3.org/2000/svg"},vI={class:"players-detection"},DI=Ae({__name:"liliniPlayersDetection",props:{userId:{type:[String,Number],default:34047},token:{type:String,default:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MzQwNDcsIm5hbWUiOiJHb2xTdGF0cyBTYW50b3MiLCJ1c2VybmFtZSI6Imdzc2FudG9zIiwiZW1haWwiOiIiLCJwcm92aWRlcl9pZCI6MSwibG9naW5fZ29sc3RhdHMiOjEsImlhdCI6MTc0NjIyMjQ3NCwiZXhwIjoxNzc3NzU4NDc0fQ.fga__q8pm-HbeHeNPWOqz32n8xkE_zcVPiPu8NTAiOM"}},emits:["showProfile","open-media"],setup(t,{emit:o}){const a=t,l=e.ref(Yc()),i=e.ref(Zc()),r=e.ref(null),n=e.ref(null),s=e.ref(null),d=e.computed(()=>({"--width-button-add-player":k.value==="graph"?"550px":"96%","--justify-content-add-player":k.value==="graph"?"flex-start":"center"})),c=e.computed(()=>({...l.value})),h=e.computed(()=>({...i.value})),p={width:"200px",height:"40px",borderColor:"rgba(255, 255, 255, 0.2)"},y=e.ref(!1),u=e.ref(null),f=e.ref({minutesPlayed:0,percentMinutesPlayed:0,lastMonths:Array.from({length:24},(oe,ae)=>ae+1),selectedMonth:6,statistics:{totals:!0,averagePerGame:!1,averagePerMinute:!1}}),m={isExpansionPanel:!1,templateProps:{boxShadow:"0px 4px 4px rgba(0, 0, 0, 0)"},expansionPanelProps:{width:"400px",borderRadius:"8px",fontFamily:"Poppins-Regular"},fieldComponentProps:{widthContainer:"100%",title:"Elige el área o zona de cancha",titleFontSize:"13px"}},g=e.ref(null),b=e.ref(null),S=e.ref(null),v=e.ref(null),q=e.ref(!1),O=e.ref(null),z=e.ref(null),G=e.ref([]),D=e.ref(!1),H=o;function V(oe){H("open-media",oe)}function w(){D.value=!1}function P(){D.value=!0}function R(){r.value&&r.value.showModal()}async function Z(oe){var De;if(O.value||(O.value=[]),O.value.some(Ve=>Ve.player_id===oe.player_id))n.value.showModal(),console.log("El jugador ya existe en la lista:",oe);else try{const Ve=[oe.player_id,...O.value.map(Lt=>Lt.player_id)],Xe=await ne.post("https://1km387uzk3.execute-api.us-east-2.amazonaws.com/qa/players/stats",{players:Ve,positions:s.value||[],last_months:parseInt((De=S.value)==null?void 0:De.lastMonths)||6});console.log("Respuesta del endpoint de stats:",Xe.data);const He=Xe.data.players.find(Lt=>Lt.player_id===oe.player_id);He&&(oe.stats=He.stats,oe.internal_stats=He.internal_stats),O.value=[oe,...O.value],console.log("Jugador agregado exitosamente:",oe)}catch(Ve){console.error("Error al obtener stats de jugadores:",Ve),n.value.showModal()}}function J(oe){console.log("position: ",oe),s.value=oe.positionIds,q.value=!0,g.value=oe}function pe(oe){console.log("filters: ---------------------------------------------------------------> ",oe),console.log("filters structure:",JSON.stringify(oe,null,2)),u.value=oe,q.value=!0}function se(oe){b.value=oe,q.value=!0}function E(oe){S.value=oe,q.value=!0}function A(oe){console.log("IS selected",oe),v.value=oe,q.value=!0}const U=e.ref(!1),L=e.ref(null);async function B(oe=!1){var ae,De,Ve,Xe,He,Lt,fs;try{U.value=!0,L.value=null,O.value=null,z.value=null;const io=y.value&&((ae=u.value)!=null&&ae.productivityFilters)?[...(u.value.productivityFilters||[]).map(Ot=>({name:Ot.name,ids:Ot.id}))]:[],Dl=((De=u.value)==null?void 0:De.offensesConditions)||{},hs={age_or_year:0,categories:io,elegibles:[],fouls:y.value&&Dl.areFoulsCommittedSelected||!1,red_cards:y.value&&Dl.areRedCardsSelected||!1,yellow_cards:y.value&&Dl.areYellowCardsSelected||!1,last_months:parseInt((Ve=S.value)==null?void 0:Ve.lastMonths)||6,productivity_type:y.value?1:2,minutes_played:parseInt((Xe=S.value)==null?void 0:Xe.minutesPlayed)||0,minutes_played_avg:parseInt((He=S.value)==null?void 0:He.percentMinutesPlayed)||0,nationalities:[138],range_age:[],tournaments:((fs=(Lt=v.value)==null?void 0:Lt.filter(Ot=>Ot.isSelected))==null?void 0:fs.map(Ot=>Ot.id))||[1],positions:s.value||[2],type_stats:1,year:b.value==="Sin límite"?1981:b.value?b.value:1981},vR=oe===!0?{...hs,is_default:!0}:hs,no=await ne.post("https://1km387uzk3.execute-api.us-east-2.amazonaws.com/qa/players/productivity",vR);console.log("Respuesta del servidor:",no.data),O.value=no.data.players,z.value={max:no.data.max,internal_max:no.data.internal_max},q.value=!1}catch(io){console.error("Error en la búsqueda:",io),L.value=io.message||"Error al realizar la búsqueda"}finally{U.value=!1}}function j(){y.value=!y.value,q.value=!0}const F=e.ref(null),T=e.ref(!1),C=e.ref("Modificar la importancia del tipo de jugada en forma jerárquica, para encontrar a los futbolistas más productivos de acuerdo a las mísmas."),W=()=>{F.value&&(T.value=F.value.offsetWidth<1200)};async function _(){try{const ae=await ne.create({headers:{Authorization:`${a.token}`}}).get(`https://4j4nfvoh0d.execute-api.us-east-2.amazonaws.com/prod/users/${a.userId}/in-followed`);G.value=ae.data.data.sort((De,Ve)=>new Date(Ve.updated_at)-new Date(De.updated_at)),console.log("Nuevo valor: 2",G.value)}catch(oe){console.error("Error al obtener las listas del usuario:",oe)}}e.onMounted(()=>{W(),window.addEventListener("resize",W),B(!0),_()}),e.onUnmounted(()=>{window.removeEventListener("resize",W)});const k=e.ref("graph");function Y(oe){k.value=oe}const bt=e.computed(()=>g.value&&g.value.name||"Sin posición seleccionada"),_t=e.computed(()=>!b.value||b.value==="Sin límite"?"":b.value);async function LR(){await _()}function OR(oe){H("showProfile",oe)}return(oe,ae)=>{var De,Ve,Xe;return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(Ws,{"is-visible":D.value,onClose:w},null,8,["is-visible"]),e.createVNode(Hc,{ref_key:"modalAddPlayer",ref:r,onAddPlayer:Z},null,512),e.createVNode(qc,{ref_key:"modalPlayerExists",ref:n},null,512),e.createElementVNode("div",{class:"lilini-players-detection",ref_key:"containerRef",ref:F,style:e.normalizeStyle(d.value)},[e.createElementVNode("div",{class:e.normalizeClass(["filters-container",{"mobile-layout":T.value}])},[e.createElementVNode("h1",SI,"Jugadores más productivos: "+e.toDisplayString(bt.value)+" "+e.toDisplayString(_t.value),1),e.createElementVNode("div",{class:e.normalizeClass(["filters-row",{"mobile-layout":T.value}])},[e.createElementVNode("span",{class:e.normalizeClass(["filter-label",{"mobile-label":T.value}])},"Modificar filtros aplicados:",2),e.createElementVNode("div",{class:e.normalizeClass(["filters-content",{"mobile-layout":T.value}])},[e.createElementVNode("div",{class:e.normalizeClass(["selector-container",{"mobile-layout":T.value}])},[e.createVNode(e.unref(k6),{onChangePosition:J})],2),e.createElementVNode("div",{class:e.normalizeClass(["selector-container",{"mobile-layout":T.value}])},[e.createVNode(e.unref(x6),{"dropdown-props":p,years:(De=e.unref(Nt))==null?void 0:De.availableYears,"selected-year":e.unref(Nt).selectedYear||"Sin límite","selected-item-prefix":"A partir del",onChangeYear:se},null,8,["years","selected-year"])],2),e.createElementVNode("div",{class:e.normalizeClass(["selector-container",{"mobile-layout":T.value}])},[e.createVNode(e.unref(el),e.mergeProps({"button-filter-props":h.value,"filter-type":e.unref(N).UNIVERSE,"show-badge-on-filter-full":!1,filters:f.value},m,{width:"98%","onUpdate:filters":E}),null,16,["button-filter-props","filter-type","filters"])],2),e.createElementVNode("div",{class:e.normalizeClass(["selector-container",{"mobile-layout":T.value}])},[e.createVNode(e.unref(el),{style:{"margin-left":"-4px"},width:"99.7%","button-filter-props":c.value,"is-one-tournament-only":!1,"filter-type":e.unref(N).TOURNAMENTS,"show-badge-on-filter-full":!0,filters:oe.tournamentsToFilter,"onUpdate:filters":A},null,8,["button-filter-props","filter-type","filters"])],2),e.createElementVNode("button",{class:e.normalizeClass(["search-button",{active:q.value,loading:U.value,error:L.value}]),onClick:B,disabled:U.value||!q.value},[U.value?(e.openBlock(),e.createElementBlock("span",CI)):L.value?(e.openBlock(),e.createElementBlock("span",kI,"Error")):(e.openBlock(),e.createElementBlock("span",wI,"Buscar"))],10,EI)],2)],2),e.createElementVNode("div",VI,[ae[4]||(ae[4]=e.createElementVNode("span",{class:"settings-label"},"Jugadores Rankeados por:",-1)),e.createElementVNode("span",{class:e.normalizeClass(["methodology-label",{active:!y.value}])},"Metodología profesor Lillini",2),e.createElementVNode("div",{class:"toggle-container",onClick:j},[e.createElementVNode("div",NI,[e.createElementVNode("div",{class:e.normalizeClass(["switch-ball",{on:y.value}])},null,2)])]),e.createElementVNode("span",{class:e.normalizeClass(["variables-label",{active:y.value}])},"Variables Dinámicas",2),e.createElementVNode("div",xI,[y.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[g.value?(e.openBlock(),e.createBlock(e.unref(el),{key:0,"button-filter-props":{backgroundColor:"#2e3b46",width:"250px",borderColor:"rgba(255, 255, 255, 0.20)",infoBorderColor:"rgba(255, 255, 255, 0.20)",showIcon:!1,height:"30px",padding:"5px 2.2%",textFontFamily:"Poppins-Regular",showBadgeOnFilterFull:!1,showBadge:!1,text:"Modificar Súper Ponderación"},"show-badge-on-filter-full":!1,filters:g.value.categories,"filter-type":e.unref(N).PRODUCTIVITY,"is-for-template-form":!1,"productivity-max-categories":12,"productivity-min-categories":5,width:"99.7%","template-props":{width:"940px",maxWidth:"940px"},"are-productivity-buttons-visible":!1,"productivity-text":C.value,"onUpdate:filters":pe},null,8,["filters","filter-type","productivity-text"])):e.createCommentVNode("",!0)],64)):(e.openBlock(),e.createElementBlock("div",BI,[e.createElementVNode("button",{class:"criterio-btn",onClick:P},ae[3]||(ae[3]=[e.createTextVNode(" Ver criterio pesos "),e.createElementVNode("span",{class:"eye-icon"},[e.createElementVNode("svg",{width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("ellipse",{cx:"11",cy:"11",rx:"8",ry:"5",stroke:"#fff","stroke-opacity":"0.7","stroke-width":"1.5"}),e.createElementVNode("circle",{cx:"11",cy:"11",r:"2",fill:"#fff","fill-opacity":"0.7"})])],-1)]))]))])])],2),e.createElementVNode("div",FI,[e.createElementVNode("div",TI,[k.value==="graph"?(e.openBlock(),e.createElementBlock("div",AI,ae[5]||(ae[5]=[e.createElementVNode("span",{class:"ht-title"},"Ranking",-1),e.createElementVNode("span",{class:"ht-action"},[e.createTextVNode("Agregar"),e.createElementVNode("br"),e.createTextVNode("a lista")],-1),e.createElementVNode("span",{class:"ht-action"},[e.createTextVNode("Ver"),e.createElementVNode("br"),e.createTextVNode("en spider")],-1)]))):e.createCommentVNode("",!0),ae[13]||(ae[13]=e.createElementVNode("div",{class:"ht-separator"},null,-1)),e.createElementVNode("div",{class:e.normalizeClass(["ht-right",{centered:k.value==="list"}])},[e.createElementVNode("div",{class:e.normalizeClass(["ht-right-inner",{centered:k.value==="list"}])},[ae[12]||(ae[12]=e.createElementVNode("span",{class:"ht-label"},"Selecciona la visualización:",-1)),e.createElementVNode("div",$I,[e.createElementVNode("button",{class:e.normalizeClass(["ht-icon",{active:k.value==="graph"}]),onClick:ae[0]||(ae[0]=He=>Y("graph"))},[k.value==="graph"?(e.openBlock(),e.createElementBlock("svg",MI,ae[6]||(ae[6]=[e.createStaticVNode('<path d="M7 0.5H49C52.5899 0.5 55.5 3.41015 55.5 7V49C55.5 52.5899 52.5899 55.5 49 55.5H7C3.41015 55.5 0.5 52.5899 0.5 49V7C0.5 3.41015 3.41015 0.5 7 0.5Z" fill="black" fill-opacity="0.16" data-v-7aa6ffe8></path><path d="M7 0.5H49C52.5899 0.5 55.5 3.41015 55.5 7V49C55.5 52.5899 52.5899 55.5 49 55.5H7C3.41015 55.5 0.5 52.5899 0.5 49V7C0.5 3.41015 3.41015 0.5 7 0.5Z" stroke="#CBEE6B" data-v-7aa6ffe8></path><path d="M17.2832 26.7578C16.8392 27.5273 16.839 28.4757 17.2832 29.2451L21.5635 36.6582C22.0078 37.4276 22.8293 37.9014 23.7178 37.9014L32.2773 37.9014C33.1658 37.9014 33.9873 37.4276 34.4316 36.6582L38.7119 29.2451C39.1561 28.4757 39.156 27.5273 38.7119 26.7578L34.4316 19.3447C33.9874 18.5752 33.1659 18.1006 32.2773 18.1006L23.7178 18.1006C22.8849 18.1006 22.1109 18.5172 21.6514 19.2031L21.5635 19.3447L17.2832 26.7578Z" stroke="#88939A" stroke-width="1.21324" data-v-7aa6ffe8></path><path d="M9.32324 26.375C8.77891 27.3178 8.74529 28.4662 9.22168 29.4346L9.32324 29.625L17.2549 43.3623C17.8355 44.3677 18.9083 44.9873 20.0693 44.9873L35.9307 44.9873C37.0917 44.9873 38.1645 44.3677 38.7451 43.3623L46.6768 29.625C47.257 28.6195 47.2572 27.3804 46.6768 26.375L38.7451 12.6387C38.1645 11.6332 37.0917 11.0137 35.9307 11.0137L20.0693 11.0137C18.9083 11.0137 17.8355 11.6332 17.2549 12.6387L9.32324 26.375Z" stroke="#88939A" stroke-width="1.75" data-v-7aa6ffe8></path><path d="M37.8906 10.8027L18.1683 44.9881" stroke="#88939A" stroke-width="1.21324" data-v-7aa6ffe8></path><path d="M18.0391 10.8613L37.7966 44.9879" stroke="#88939A" stroke-width="1.21324" data-v-7aa6ffe8></path><path d="M7.97105 28.002H48.0078" stroke="#88939A" stroke-width="1.21324" data-v-7aa6ffe8></path><path d="M22.542 19.5566L22.542 27.3945L28.3516 27.3945L28.5273 27.6982L34.0674 37.2949L39.0137 28.7295C39.2737 28.2792 39.2735 27.7238 39.0137 27.2734L34.1377 18.8291C33.8776 18.3786 33.3971 18.1006 32.877 18.1006L23.998 18.1006C23.194 18.1006 22.542 18.7526 22.542 19.5566Z" fill="#CBEE6B" fill-opacity="0.6" stroke="#CBEE6B" stroke-width="1.21324" data-v-7aa6ffe8></path>',8)]))):(e.openBlock(),e.createElementBlock("svg",II,ae[7]||(ae[7]=[e.createStaticVNode('<path d="M17.2832 26.7578C16.8392 27.5273 16.839 28.4757 17.2832 29.2451L21.5635 36.6582C22.0078 37.4276 22.8293 37.9014 23.7178 37.9014L32.2773 37.9014C33.1658 37.9014 33.9873 37.4276 34.4316 36.6582L38.7119 29.2451C39.1561 28.4757 39.156 27.5273 38.7119 26.7578L34.4316 19.3447C33.9874 18.5752 33.1659 18.1006 32.2773 18.1006L23.7178 18.1006C22.8849 18.1006 22.1109 18.5172 21.6514 19.2031L21.5635 19.3447L17.2832 26.7578Z" stroke="#88939A" stroke-width="1.21324" data-v-7aa6ffe8></path><path d="M9.32324 26.375C8.77891 27.3178 8.74529 28.4662 9.22168 29.4346L9.32324 29.625L17.2549 43.3623C17.8355 44.3677 18.9083 44.9873 20.0693 44.9873L35.9307 44.9873C37.0917 44.9873 38.1645 44.3677 38.7451 43.3623L46.6768 29.625C47.257 28.6195 47.2572 27.3804 46.6768 26.375L38.7451 12.6387C38.1645 11.6332 37.0917 11.0137 35.9307 11.0137L20.0693 11.0137C18.9083 11.0137 17.8355 11.6332 17.2549 12.6387L9.32324 26.375Z" stroke="#88939A" stroke-width="1.75" data-v-7aa6ffe8></path><path d="M37.8906 10.8027L18.1683 44.9881" stroke="#88939A" stroke-width="1.21324" data-v-7aa6ffe8></path><path d="M18.0391 10.8613L37.7966 44.9879" stroke="#88939A" stroke-width="1.21324" data-v-7aa6ffe8></path><path d="M7.97105 28.002H48.0078" stroke="#88939A" stroke-width="1.21324" data-v-7aa6ffe8></path><path d="M22.542 19.5566L22.542 27.3945L28.3516 27.3945L28.5273 27.6982L34.0674 37.2949L39.0137 28.7295C39.2737 28.2792 39.2735 27.7238 39.0137 27.2734L34.1377 18.8291C33.8776 18.3786 33.3971 18.1006 32.877 18.1006L23.998 18.1006C23.194 18.1006 22.542 18.7526 22.542 19.5566Z" fill="white" fill-opacity="0.6" data-v-7aa6ffe8></path><path d="M22.542 19.5566L22.542 27.3945L28.3516 27.3945L28.5273 27.6982L34.0674 37.2949L39.0137 28.7295C39.2737 28.2792 39.2735 27.7238 39.0137 27.2734L34.1377 18.8291C33.8776 18.3786 33.3971 18.1006 32.877 18.1006L23.998 18.1006C23.194 18.1006 22.542 18.7526 22.542 19.5566Z" stroke="white" stroke-opacity="0.5" stroke-width="1.21324" data-v-7aa6ffe8></path>',7)])))],2),e.createElementVNode("button",{class:e.normalizeClass(["ht-icon",{active:k.value==="grid"}]),onClick:ae[1]||(ae[1]=He=>Y("grid"))},[k.value==="grid"?(e.openBlock(),e.createElementBlock("svg",RI,ae[8]||(ae[8]=[e.createStaticVNode('<path d="M7.5 0.5H49.5C53.0899 0.5 56 3.41015 56 7V49C56 52.5899 53.0899 55.5 49.5 55.5H7.5C3.91015 55.5 1 52.5899 1 49V7C1 3.41015 3.91015 0.5 7.5 0.5Z" fill="black" fill-opacity="0.16" data-v-7aa6ffe8></path><path d="M7.5 0.5H49.5C53.0899 0.5 56 3.41015 56 7V49C56 52.5899 53.0899 55.5 49.5 55.5H7.5C3.91015 55.5 1 52.5899 1 49V7C1 3.41015 3.91015 0.5 7.5 0.5Z" stroke="#CBEE6B" data-v-7aa6ffe8></path><path d="M25 12.25H12.75V24.5H25V12.25Z" stroke="#CBEE6B" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" data-v-7aa6ffe8></path><path d="M44.25 12.25H32V24.5H44.25V12.25Z" stroke="#CBEE6B" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" data-v-7aa6ffe8></path><path d="M44.25 31.5H32V43.75H44.25V31.5Z" stroke="#CBEE6B" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" data-v-7aa6ffe8></path><path d="M25 31.5H12.75V43.75H25V31.5Z" stroke="#CBEE6B" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" data-v-7aa6ffe8></path>',6)]))):(e.openBlock(),e.createElementBlock("svg",PI,ae[9]||(ae[9]=[e.createStaticVNode('<g opacity="0.4" data-v-7aa6ffe8><path d="M24.5 12.25H12.25V24.5H24.5V12.25Z" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" data-v-7aa6ffe8></path><path d="M43.75 12.25H31.5V24.5H43.75V12.25Z" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" data-v-7aa6ffe8></path><path d="M43.75 31.5H31.5V43.75H43.75V31.5Z" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" data-v-7aa6ffe8></path><path d="M24.5 31.5H12.25V43.75H24.5V31.5Z" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" data-v-7aa6ffe8></path></g>',1)])))],2),e.createElementVNode("button",{class:e.normalizeClass(["ht-icon",{active:k.value==="list"}]),onClick:ae[2]||(ae[2]=He=>Y("list"))},[k.value==="list"?(e.openBlock(),e.createElementBlock("svg",LI,ae[10]||(ae[10]=[e.createStaticVNode('<path d="M7 0.5H49C52.5899 0.5 55.5 3.41015 55.5 7V49C55.5 52.5899 52.5899 55.5 49 55.5H7C3.41015 55.5 0.5 52.5899 0.5 49V7C0.5 3.41015 3.41015 0.5 7 0.5Z" fill="black" fill-opacity="0.16" data-v-7aa6ffe8></path><path d="M7 0.5H49C52.5899 0.5 55.5 3.41015 55.5 7V49C55.5 52.5899 52.5899 55.5 49 55.5H7C3.41015 55.5 0.5 52.5899 0.5 49V7C0.5 3.41015 3.41015 0.5 7 0.5Z" stroke="#CBEE6B" data-v-7aa6ffe8></path><path d="M21 17.5H43.75" stroke="#CBEE6B" stroke-width="3.5" stroke-linecap="round" stroke-linejoin="round" data-v-7aa6ffe8></path><path d="M21 28H43.75" stroke="#CBEE6B" stroke-width="3.5" stroke-linecap="round" stroke-linejoin="round" data-v-7aa6ffe8></path><path d="M21 38.5H43.75" stroke="#CBEE6B" stroke-width="3.5" stroke-linecap="round" stroke-linejoin="round" data-v-7aa6ffe8></path><path d="M12.25 17.5H12.2675" stroke="#CBEE6B" stroke-width="3.5" stroke-linecap="round" stroke-linejoin="round" data-v-7aa6ffe8></path><path d="M12.25 28H12.2675" stroke="#CBEE6B" stroke-width="3.5" stroke-linecap="round" stroke-linejoin="round" data-v-7aa6ffe8></path><path d="M12.25 38.5H12.2675" stroke="#CBEE6B" stroke-width="3.5" stroke-linecap="round" stroke-linejoin="round" data-v-7aa6ffe8></path>',8)]))):(e.openBlock(),e.createElementBlock("svg",OI,ae[11]||(ae[11]=[e.createStaticVNode('<g opacity="0.4" data-v-7aa6ffe8><path d="M21 17.5H43.75" stroke="white" stroke-width="3.5" stroke-linecap="round" stroke-linejoin="round" data-v-7aa6ffe8></path><path d="M21 28H43.75" stroke="white" stroke-width="3.5" stroke-linecap="round" stroke-linejoin="round" data-v-7aa6ffe8></path><path d="M21 38.5H43.75" stroke="white" stroke-width="3.5" stroke-linecap="round" stroke-linejoin="round" data-v-7aa6ffe8></path><path d="M12.25 17.5H12.2675" stroke="white" stroke-width="3.5" stroke-linecap="round" stroke-linejoin="round" data-v-7aa6ffe8></path><path d="M12.25 28H12.2675" stroke="white" stroke-width="3.5" stroke-linecap="round" stroke-linejoin="round" data-v-7aa6ffe8></path><path d="M12.25 38.5H12.2675" stroke="white" stroke-width="3.5" stroke-linecap="round" stroke-linejoin="round" data-v-7aa6ffe8></path></g>',1)])))],2)])],2)],2)]),e.createElementVNode("div",vI,[O.value?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(k.value==="graph"?kT:k.value==="grid"?r$:_I),{key:0,"dynamic-categories":(Ve=g.value)==null?void 0:Ve.categories,"user-id":t.userId,"type-productivity":y.value?1:2,"players-scouting":O.value,max:z.value,token:t.token,lists:G.value,"position-ids":(Xe=g.value)==null?void 0:Xe.positionIds,onOpenMedia:V,onShowProfile:OR,onPlayerAdded:LR},null,40,["dynamic-categories","user-id","type-productivity","players-scouting","max","token","lists","position-ids"])):e.createCommentVNode("",!0)])]),e.createElementVNode("div",{class:"add-player-container"},[e.createElementVNode("div",{role:"button",class:"button-add-player",onClick:R},ae[14]||(ae[14]=[e.createElementVNode("div",null,"Agregar jugador",-1),e.createElementVNode("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M13.2016 17.2012V15.601C13.2016 14.7522 12.8645 13.9381 12.2643 13.3379C11.664 12.7377 10.85 12.4005 10.0012 12.4005H5.20047C4.35165 12.4005 3.5376 12.7377 2.9374 13.3379C2.33719 13.9381 2 14.7522 2 15.601V17.2012",stroke:"white","stroke-opacity":"0.5","stroke-width":"1.44023","stroke-linecap":"round","stroke-linejoin":"round"}),e.createElementVNode("path",{d:"M7.60086 9.19977C9.36843 9.19977 10.8013 7.76687 10.8013 5.9993C10.8013 4.23173 9.36843 2.79883 7.60086 2.79883C5.83329 2.79883 4.40039 4.23173 4.40039 5.9993C4.40039 7.76687 5.83329 9.19977 7.60086 9.19977Z",stroke:"white","stroke-opacity":"0.5","stroke-width":"1.44023","stroke-linecap":"round","stroke-linejoin":"round"}),e.createElementVNode("path",{d:"M15.5996 6.79944V11.6001M17.9999 9.19979H13.1992",stroke:"white","stroke-opacity":"0.5","stroke-width":"1.44023","stroke-linecap":"round","stroke-linejoin":"round"})],-1)]))])],4)],64)}}},[["__scopeId","data-v-7aa6ffe8"]]),zI={class:"subcategory-group"},UI={__name:"SubcategoryGroup",props:{subcategoryGroup:{type:Array,default:()=>[]}},setup(t){return(o,a)=>(e.openBlock(),e.createElementBlock("div",zI,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.subcategoryGroup,l=>(e.openBlock(),e.createBlock(e.unref(ee),{key:l.id,modelValue:l.isSelected,"onUpdate:modelValue":i=>l.isSelected=i,label:l.name},null,8,["modelValue","onUpdate:modelValue","label"]))),128))]))}},jI=le(UI,[["__scopeId","data-v-ae6f3d72"]]),HI={class:"filter-subcategories"},WI=Object.freeze(Object.defineProperty({__proto__:null,default:le({__name:"FilterSubcategories",props:{subcategoryGroups:{type:Array,default:()=>[]}},setup(t){return(o,a)=>(e.openBlock(),e.createElementBlock("div",HI,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.subcategoryGroups,l=>(e.openBlock(),e.createElementBlock("div",{key:l.id,class:"filter-subcategories__group"},[e.createVNode(jI,{subcategoryGroup:l},null,8,["subcategoryGroup"])]))),128))]))}},[["__scopeId","data-v-5edaefc2"]])},Symbol.toStringTag,{value:"Module"})),lo=t=>(e.pushScopeId("data-v-80d9c265"),t=t(),e.popScopeId(),t),GI={class:"details__header"},qI=lo(()=>e.createElementVNode("div",{class:"details__header__title"},"Jugando como",-1)),YI={class:"details__header__checkbox"},ZI={class:"details__body"},JI={class:"details__body__playing-as"},KI=["onClick"],XI={class:"details__header"},QI=lo(()=>e.createElementVNode("div",{class:"details__header__title"},"En: (Elige el lapso de tiempo)",-1)),eR={class:"details__header__checkbox"},tR={class:"details__body"},aR=lo(()=>e.createElementVNode("div",{class:"details__body__title"},"1er tiempo",-1)),oR={class:"details__body__game-section"},lR=["onClick"],rR={class:"details__body"},iR=lo(()=>e.createElementVNode("div",{class:"details__body__title"},"2do tiempo",-1)),nR={class:"details__body__game-section"},sR=["onClick"],cR=Object.freeze(Object.defineProperty({__proto__:null,default:le({__name:"FilterConditions",props:{playingAs:{type:Array,default:()=>[{name:"Local",isSelected:!0},{name:"Visitante",isSelected:!0}]},gameSections:{type:Array,default:()=>[{text:"0-15",value:1,isSelected:!0},{text:"16-30",value:2,isSelected:!0},{text:"31-45",value:3,isSelected:!0},{text:"46-60",value:4,isSelected:!0},{text:"61-75",value:5,isSelected:!0},{text:"76-90",value:6,isSelected:!0}]},buttonsBackgroundColor:{type:String,default:"rgba(255, 255, 255, 0)"},buttonsBackgroundColorActive:{type:String,default:"rgba(203, 238, 107, 0.05)"},buttonsTextColor:{type:String,default:"rgba(255, 255, 255, 0.8)"},buttonsTextColorActive:{type:String,default:"rgba(255, 255, 255, 1)"},buttonsBorderColor:{type:String,default:"#8ea2ab"},buttonsBorderColorActive:{type:String,default:"#cbee6b"},buttonsBorderWidth:{type:String,default:"0.8px"},buttonsBorderWidthActive:{type:String,default:"1px"},buttonsBorderRadius:{type:String,default:"4px"}},setup(t){const o=t;e.useCssVars(h=>({"49cba245":t.buttonsBackgroundColor,"52f02da6":t.buttonsTextColor,"7d3f686a":t.buttonsBorderWidth,"7c286a07":t.buttonsBorderColor,"24a6f4aa":t.buttonsBackgroundColorActive,cd8d7768:t.buttonsTextColorActive,"35fa5c10":t.buttonsBorderWidthActive,"0cde1826":t.buttonsBorderColorActive}));const a=e.computed(()=>o.playingAs.every(h=>h.isSelected)),l=e.computed(()=>o.gameSections.every(h=>h.isSelected)),i=e.computed(()=>o.gameSections.reduce((h,p)=>(p.value<=3?h.firstHalf.push(p):h.secondHalf.push(p),h),{firstHalf:[],secondHalf:[]})),r=e.computed(()=>({"--border-radius-first-button":`${o.buttonsBorderRadius} 0 0 ${o.buttonsBorderRadius}`,"--border-radius-last-button":`0 ${o.buttonsBorderRadius} ${o.buttonsBorderRadius} 0`}));function n(h){h?o.playingAs.forEach(p=>{p.isSelected=!0}):o.playingAs.forEach((p,y)=>{p.isSelected=y===0})}function s(h){o.playingAs.filter(p=>p.isSelected).length===1&&h.isSelected||(h.isSelected=!h.isSelected)}function d(h){o.gameSections.filter(p=>p.isSelected).length===1&&h.isSelected||(h.isSelected=!h.isSelected)}function c(h){h?o.gameSections.forEach(p=>{p.isSelected=!0}):o.gameSections.forEach((p,y)=>{p.isSelected=y===0})}return(h,p)=>(e.openBlock(),e.createElementBlock("div",{class:"details",style:e.normalizeStyle(r.value)},[e.createElementVNode("div",GI,[qI,e.createElementVNode("div",YI,[e.createVNode(e.unref(ee),{label:"Todos","model-value":a.value,"onUpdate:modelValue":n},null,8,["model-value"])])]),e.createElementVNode("div",ZI,[e.createElementVNode("div",JI,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.playingAs,(y,u)=>(e.openBlock(),e.createElementBlock("div",{key:`pa${u}`,class:e.normalizeClass(["details__body__button",{active:y.isSelected}]),onClick:f=>s(y)},e.toDisplayString(y.name),11,KI))),128))])]),e.createElementVNode("div",XI,[QI,e.createElementVNode("div",eR,[e.createVNode(e.unref(ee),{label:"Todos","model-value":l.value,"onUpdate:modelValue":c},null,8,["model-value"])])]),e.createElementVNode("div",tR,[aR,e.createElementVNode("div",oR,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value.firstHalf,(y,u)=>(e.openBlock(),e.createElementBlock("div",{key:`pa${u}`,class:e.normalizeClass(["details__body__button",{active:y.isSelected}]),onClick:f=>d(y)},e.toDisplayString(y.text),11,lR))),128))])]),e.createElementVNode("div",rR,[iR,e.createElementVNode("div",nR,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value.secondHalf,(y,u)=>(e.openBlock(),e.createElementBlock("div",{key:`pa${u}`,class:e.normalizeClass(["details__body__button",{active:y.isSelected}]),onClick:f=>d(y)},e.toDisplayString(y.text),11,sR))),128))])])],4))}},[["__scopeId","data-v-80d9c265"]])},Symbol.toStringTag,{value:"Module"})),dR={class:"filter-field"},pR=Object.freeze(Object.defineProperty({__proto__:null,default:le({__name:"FilterField",setup(t){const o=e.ref(Array.from({length:16},(l,i)=>i+1));function a(){}return(l,i)=>(e.openBlock(),e.createElementBlock("div",dR,[e.createVNode(e.unref(qr),{width:"100%","background-color":"#2E3B46",value:o.value,"onUpdate:modelValue":a},null,8,["value"])]))}},[["__scopeId","data-v-8103c3e1"]])},Symbol.toStringTag,{value:"Module"})),mR={class:"subcategory-group"},uR={__name:"SubcategoryGroup",props:{subcategoryGroup:{type:Array,default:()=>[]}},setup(t){return(o,a)=>(e.openBlock(),e.createElementBlock("div",mR,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.subcategoryGroup,l=>(e.openBlock(),e.createBlock(e.unref(te),{key:l.id,modelValue:l.isSelected,"onUpdate:modelValue":i=>l.isSelected=i,label:l.name},null,8,["modelValue","onUpdate:modelValue","label"]))),128))]))}},fR=re(uR,[["__scopeId","data-v-ae6f3d72"]]),hR={class:"filter-subcategories"},yR=Object.freeze(Object.defineProperty({__proto__:null,default:re({__name:"FilterSubcategories",props:{subcategoryGroups:{type:Array,default:()=>[]}},setup(t){return(o,a)=>(e.openBlock(),e.createElementBlock("div",hR,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.subcategoryGroups,l=>(e.openBlock(),e.createElementBlock("div",{key:l.id,class:"filter-subcategories__group"},[e.createVNode(fR,{subcategoryGroup:l},null,8,["subcategoryGroup"])]))),128))]))}},[["__scopeId","data-v-5edaefc2"]])},Symbol.toStringTag,{value:"Module"})),ro=t=>(e.pushScopeId("data-v-80d9c265"),t=t(),e.popScopeId(),t),gR={class:"details__header"},bR=ro(()=>e.createElementVNode("div",{class:"details__header__title"},"Jugando como",-1)),_R={class:"details__header__checkbox"},SR={class:"details__body"},ER={class:"details__body__playing-as"},CR=["onClick"],kR={class:"details__header"},wR=ro(()=>e.createElementVNode("div",{class:"details__header__title"},"En: (Elige el lapso de tiempo)",-1)),VR={class:"details__header__checkbox"},NR={class:"details__body"},xR=ro(()=>e.createElementVNode("div",{class:"details__body__title"},"1er tiempo",-1)),BR={class:"details__body__game-section"},FR=["onClick"],TR={class:"details__body"},AR=ro(()=>e.createElementVNode("div",{class:"details__body__title"},"2do tiempo",-1)),$R={class:"details__body__game-section"},MR=["onClick"],IR=Object.freeze(Object.defineProperty({__proto__:null,default:re({__name:"FilterConditions",props:{playingAs:{type:Array,default:()=>[{name:"Local",isSelected:!0},{name:"Visitante",isSelected:!0}]},gameSections:{type:Array,default:()=>[{text:"0-15",value:1,isSelected:!0},{text:"16-30",value:2,isSelected:!0},{text:"31-45",value:3,isSelected:!0},{text:"46-60",value:4,isSelected:!0},{text:"61-75",value:5,isSelected:!0},{text:"76-90",value:6,isSelected:!0}]},buttonsBackgroundColor:{type:String,default:"rgba(255, 255, 255, 0)"},buttonsBackgroundColorActive:{type:String,default:"rgba(203, 238, 107, 0.05)"},buttonsTextColor:{type:String,default:"rgba(255, 255, 255, 0.8)"},buttonsTextColorActive:{type:String,default:"rgba(255, 255, 255, 1)"},buttonsBorderColor:{type:String,default:"#8ea2ab"},buttonsBorderColorActive:{type:String,default:"#cbee6b"},buttonsBorderWidth:{type:String,default:"0.8px"},buttonsBorderWidthActive:{type:String,default:"1px"},buttonsBorderRadius:{type:String,default:"4px"}},setup(t){const o=t;e.useCssVars(h=>({"49cba245":t.buttonsBackgroundColor,"52f02da6":t.buttonsTextColor,"7d3f686a":t.buttonsBorderWidth,"7c286a07":t.buttonsBorderColor,"24a6f4aa":t.buttonsBackgroundColorActive,cd8d7768:t.buttonsTextColorActive,"35fa5c10":t.buttonsBorderWidthActive,"0cde1826":t.buttonsBorderColorActive}));const a=e.computed(()=>o.playingAs.every(h=>h.isSelected)),l=e.computed(()=>o.gameSections.every(h=>h.isSelected)),i=e.computed(()=>o.gameSections.reduce((h,p)=>(p.value<=3?h.firstHalf.push(p):h.secondHalf.push(p),h),{firstHalf:[],secondHalf:[]})),r=e.computed(()=>({"--border-radius-first-button":`${o.buttonsBorderRadius} 0 0 ${o.buttonsBorderRadius}`,"--border-radius-last-button":`0 ${o.buttonsBorderRadius} ${o.buttonsBorderRadius} 0`}));function n(h){h?o.playingAs.forEach(p=>{p.isSelected=!0}):o.playingAs.forEach((p,y)=>{p.isSelected=y===0})}function s(h){o.playingAs.filter(p=>p.isSelected).length===1&&h.isSelected||(h.isSelected=!h.isSelected)}function d(h){o.gameSections.filter(p=>p.isSelected).length===1&&h.isSelected||(h.isSelected=!h.isSelected)}function c(h){h?o.gameSections.forEach(p=>{p.isSelected=!0}):o.gameSections.forEach((p,y)=>{p.isSelected=y===0})}return(h,p)=>(e.openBlock(),e.createElementBlock("div",{class:"details",style:e.normalizeStyle(r.value)},[e.createElementVNode("div",gR,[bR,e.createElementVNode("div",_R,[e.createVNode(e.unref(te),{label:"Todos","model-value":a.value,"onUpdate:modelValue":n},null,8,["model-value"])])]),e.createElementVNode("div",SR,[e.createElementVNode("div",ER,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.playingAs,(y,u)=>(e.openBlock(),e.createElementBlock("div",{key:`pa${u}`,class:e.normalizeClass(["details__body__button",{active:y.isSelected}]),onClick:f=>s(y)},e.toDisplayString(y.name),11,CR))),128))])]),e.createElementVNode("div",kR,[wR,e.createElementVNode("div",VR,[e.createVNode(e.unref(te),{label:"Todos","model-value":l.value,"onUpdate:modelValue":c},null,8,["model-value"])])]),e.createElementVNode("div",NR,[xR,e.createElementVNode("div",BR,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value.firstHalf,(y,u)=>(e.openBlock(),e.createElementBlock("div",{key:`pa${u}`,class:e.normalizeClass(["details__body__button",{active:y.isSelected}]),onClick:f=>d(y)},e.toDisplayString(y.text),11,FR))),128))])]),e.createElementVNode("div",TR,[AR,e.createElementVNode("div",$R,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value.secondHalf,(y,u)=>(e.openBlock(),e.createElementBlock("div",{key:`pa${u}`,class:e.normalizeClass(["details__body__button",{active:y.isSelected}]),onClick:f=>d(y)},e.toDisplayString(y.text),11,MR))),128))])])],4))}},[["__scopeId","data-v-80d9c265"]])},Symbol.toStringTag,{value:"Module"})),RR={class:"filter-field"},PR=Object.freeze(Object.defineProperty({__proto__:null,default:re({__name:"FilterField",setup(t){const o=e.ref(Array.from({length:16},(l,i)=>i+1));function a(){}return(l,i)=>(e.openBlock(),e.createElementBlock("div",RR,[e.createVNode(e.unref(sn),{width:"100%","background-color":"#2E3B46",value:o.value,"onUpdate:modelValue":a},null,8,["value"])]))}},[["__scopeId","data-v-8103c3e1"]])},Symbol.toStringTag,{value:"Module"}));Qe.LiliniPlayerDetection=DI,Object.defineProperty(Qe,Symbol.toStringTag,{value:"Module"})});