@golstats/gsc-table-scrollable 1.0.13 → 1.0.14

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.
@@ -1 +1 @@
1
- (function(E,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(E=typeof globalThis<"u"?globalThis:E||self,e(E.GSCTableScrollable={},E.Vue))})(this,function(E,e){"use strict";const j=(o,a)=>{const l=o.__vccOpts||o;for(const[r,m]of a)l[r]=m;return l},H={key:1},G={width:"10",height:"8",viewBox:"0 0 10 8",fill:"none",xmlns:"http://www.w3.org/2000/svg"},U=["fill"],q={key:0,class:"checkbox__teams"},v={class:"checkbox__teams__logo"},J=["src"],X={class:"checkbox__teams__logo"},K=["src"],Q={__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(o){return["left","right","top","bottom"].includes(o)}},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(o,{emit:a}){const l=o;e.useCssVars(d=>({"7bd9d47b":o.width,"34dc7ddc":o.height}));const r=e.ref(!1),m=e.computed(()=>{const d={color:l.boxValueColor,"font-family":l.fontFamily,height:l.boxWidthAndHeight,width:l.boxWidthAndHeight,minWidth:l.boxWidthAndHeight,"border-radius":l.boxBorderRadius,"margin-top":l.boxMarginTop};return r.value?(d["background-color"]=l.boxBackgroundColor,d.border=`solid ${l.boxBorderWidth} ${l.boxBackgroundColor}`):d.border=`solid ${l.boxBorderWidth} ${l.boxBorderColor}`,d}),c=e.computed(()=>({"font-family":l.boxValueFontFamily,"font-size":l.boxValueFontSize,color:l.boxValueColor,"line-height":1})),C=e.computed(()=>{const d={color:l.labelColor,"font-family":l.fontFamily,"font-size":l.labelFontSize,"white-space":l.labelWhiteSpace,"text-align":l.boxPosition==="top"||l.boxPosition==="bottom"?"center":l.boxPosition};return(l.boxPosition==="left"||l.boxPosition==="right")&&(d[`margin-${l.boxPosition}`]=l.isBoxOnly?"0":l.teamsIds?"8px":"10px"),d});e.watch(()=>l.modelValue,d=>{d!==r.value&&(r.value=d)},{immediate:!0});function y(){l.avoidInteraction||!r.value&&l.avoidToCheck||(r.value=!r.value,a("update:modelValue",r.value))}function w(d){return`${{}.TEAM_LOGOS_URL||"https://golstatsimages.blob.core.windows.net/teams-80/"}${d}.png`}return(d,x)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["checkbox",`box-${o.boxPosition}`]),onClick:y},[e.createElementVNode("div",{class:"checkbox__box",style:e.normalizeStyle(m.value)},[r.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[l.boxValue?(e.openBlock(),e.createElementBlock("div",{key:0,class:"checkbox__box__value",style:e.normalizeStyle(c.value)},e.toDisplayString(o.boxValue),5)):(e.openBlock(),e.createElementBlock("div",H,[(e.openBlock(),e.createElementBlock("svg",G,[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:o.boxValueColor},null,8,U)]))]))],64)):e.createCommentVNode("",!0)],4),o.teamsIds&&o.teamsIds.length?(e.openBlock(),e.createElementBlock("div",q,[e.createElementVNode("div",v,[e.createElementVNode("img",{src:w(o.teamsIds[0]),alt:""},null,8,J)]),e.createElementVNode("div",X,[e.createElementVNode("img",{src:w(o.teamsIds[1]),alt:""},null,8,K)])])):e.createCommentVNode("",!0),e.createElementVNode("div",{class:"checkbox__label",style:e.normalizeStyle(C.value)},e.toDisplayString(o.label),5)],2))}},Y=j(Q,[["__scopeId","data-v-b6f124d8"]]),ee=(o,a)=>{const l=o.__vccOpts||o;for(const[r,m]of a)l[r]=m;return l},B={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(o){this.status=o}}},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(o){this.$emit("click",o),this.typeOnOff&&(this.status=!this.status,this.$emit("status",this.status))}}},z=()=>{e.useCssVars(o=>({"9d01acb4":o.height,"14e95081":o.borderWidthBtn,"38fec285":o.borderType,34353510:o.borderColor,"20d20dc6":o.borderRadius,17130967:o.width,"4ccb7d36":o.backgroundColor,"5d1e86a2":o.cursorType,ce65d4a2:o.fontSize,fe4ac47a:o.fontStyle,f98e44dc:o.fontFamily,"93b87770":o.marginLeftStat,c7f7beba:o.fontSizeStat}))},M=B.setup;B.setup=M?(o,a)=>(z(),M(o,a)):z;const te=o=>(e.pushScopeId("data-v-f3ee6b2b"),o=o(),e.popScopeId(),o),oe=["src"],le={key:1,class:"text"},se=["src"],ne={class:"stats"},ae=te(()=>e.createElementVNode("img",{class:"iconstats",src:"https://golstatsimages.blob.core.windows.net/todoelfut/playdes.png"},null,-1)),ie={class:"numstats"},re={class:"leyend"};function ce(o,a,l,r,m,c){return e.openBlock(),e.createElementBlock("div",null,[l.type==0?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["button",m.status&&l.typeOnOff&&"button-active"]),style:e.normalizeStyle([c.customStyle,m.status&&l.typeOnOff&&c.customActive]),onClick:a[0]||(a[0]=(...C)=>c.btnClick&&c.btnClick(...C))},[l.icon&&l.iconPosition.toLowerCase()==="left"?(e.openBlock(),e.createElementBlock("img",{key:0,class:"icon",style:e.normalizeStyle({width:l.iconSize}),src:l.icon},null,12,oe)):e.createCommentVNode("",!0),l.textValue?(e.openBlock(),e.createElementBlock("div",le,e.toDisplayString(l.textValue),1)):e.createCommentVNode("",!0),l.icon&&l.iconPosition.toLowerCase()==="right"?(e.openBlock(),e.createElementBlock("img",{key:2,class:"icon",style:e.normalizeStyle({width:l.iconSize}),src:l.icon},null,12,se)):e.createCommentVNode("",!0)],6)):e.createCommentVNode("",!0),l.type==1?(e.openBlock(),e.createElementBlock("div",{key:1,class:"button-target",onClick:a[1]||(a[1]=(...C)=>c.btnClick&&c.btnClick(...C))},[e.createElementVNode("div",ne,[ae,e.createElementVNode("div",ie,e.toDisplayString(l.textStat),1)]),e.createElementVNode("div",re,e.toDisplayString(l.textCategory),1)])):e.createCommentVNode("",!0)])}const de=ee(B,[["render",ce],["__scopeId","data-v-f3ee6b2b"]]),T=(o,a)=>{const l=o.__vccOpts||o;for(const[r,m]of a)l[r]=m;return l},D=o=>(e.pushScopeId("data-v-16177785"),o=o(),e.popScopeId(),o),me={key:0,class:"overlay"},fe={class:"name"},pe=["onClick"],he=[D(()=>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))],_e=D(()=>e.createElementVNode("div",{class:"column-title-2"},null,-1)),ge=["onClick"],Ce=T({__name:"ScrollColumns",props:{availablePlayers:{type:Array,default:()=>[]},isEditMode:{type:Boolean,default:!1}},emits:["expand","open-media","click-parameters"],setup(o,{expose:a,emit:l}){const r=o,m=e.ref(null),c=e.ref(null),C=e.ref(0);e.ref(!1);const y=e.computed(()=>{const f=r.availablePlayers[0];return f?f.stats:[]}),w=e.computed(()=>{const f=`repeat(${y.value.length}, max-content) 36px`;let p="";return C.value>0&&document.querySelectorAll(".column-title-2").forEach(b=>{p+=`${b.offsetWidth}px `}),{"--grid-template-columns":f,"--grid-template-columns-totals":p||f}});function d(){m.value=new ResizeObserver(f=>{for(const p of f){const{width:g}=p.contentRect;C.value=g}}),m.value.observe(c.value)}function x(f,p){const b=document.querySelectorAll(".scrollable-row-totals")[f+1];b&&(b.style.marginTop=`${p}px`)}function S({player:f,stat:p}){!p.total||p==="0%"||!p.seasons||!p.seasons.length||l("open-media",{...f,stat:p})}function h(f){!f||f==="no"||l("click-parameters",f)}return e.onMounted(()=>{d()}),a({setMarginTopDetails:x}),(f,p)=>(e.openBlock(),e.createElementBlock("div",{class:"scroll-columns",style:e.normalizeStyle(w.value)},[o.isEditMode?(e.openBlock(),e.createElementBlock("div",me)):e.createCommentVNode("",!0),e.createElementVNode("div",{ref_key:"titlesRow",ref:c,class:"scrollable-row-2"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(y.value,(g,b)=>(e.openBlock(),e.createElementBlock("div",{key:`t-${b}`,class:"column-title-2"},[e.createElementVNode("div",fe,e.toDisplayString(g.name),1),g.parameters&&g.parameters!=="no"?(e.openBlock(),e.createElementBlock("div",{key:0,class:"parameters",role:"button",onClick:k=>h(g.parameters)},he,8,pe)):e.createCommentVNode("",!0)]))),128)),_e],512),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.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,k=>(e.openBlock(),e.createElementBlock("div",{key:k.category_id,class:e.normalizeClass(["row data-info",{odd:b%2!==0,underline:!!k.total&&k.total!=="0%"&&k.seasons&&k.seasons.length}]),onClick:F=>S({player:g,stat:k})},e.toDisplayString(k.total),11,ge))),128))]))),128))],4))}},[["__scopeId","data-v-16177785"]]),_=o=>(e.pushScopeId("data-v-bfcf1c28"),o=o(),e.popScopeId(),o),ke={class:"table__static-column"},be=_(()=>e.createElementVNode("div",{class:"static-title column-title"},null,-1)),ue={class:"container"},ye={class:"details-row__info"},we={class:"details-row__info__personal"},Ee={class:"bold"},xe={class:"bold"},Se={class:"bold"},Ve={class:"bold"},Be={class:"details-row__info__games"},Ne={class:"bold"},Le={class:"bold"},$e=["onClick"],ze=[_(()=>e.createElementVNode("div",null,"Ver gráfica",-1)),_(()=>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))],Me=["onClick"],Te=[_(()=>e.createElementVNode("div",null,"Eliminar de lista",-1)),_(()=>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))],De=["onClick"],Fe=[_(()=>e.createElementVNode("div",null,"Agregar a lista",-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":"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))],Ie=["onClick"],Oe=[_(()=>e.createElementVNode("div",null,"Ver perfil",-1))],Re={class:"static-row__info-player"},Pe={class:"position"},Ze=["onClick"],Ae=[_(()=>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)),_(()=>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)),_(()=>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))],We=["onClick"],je=[_(()=>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)),_(()=>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)),_(()=>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))],He={class:"player-photo"},Ge=["src"],Ue={class:"player-name"},qe={class:"arrow"},ve=["onClick"],Je=[_(()=>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))],Xe=e.createStaticVNode('<div class="titles scrollable-row" data-v-bfcf1c28><div class="column-title" data-v-bfcf1c28>Equipo</div><div class="column-title" data-v-bfcf1c28>Posición</div><div class="column-title" data-v-bfcf1c28>Edad</div><div class="column-title" data-v-bfcf1c28>País</div><div class="column-title" data-v-bfcf1c28>Partidos Jugados</div><div class="column-title" data-v-bfcf1c28>Minutos Jugados</div><div class="column-title" data-v-bfcf1c28>Liga</div><div class="column-title" data-v-bfcf1c28>Videos</div><div class="column-title" data-v-bfcf1c28></div></div>',1),Ke={class:"team-logo"},Qe=["src"],Ye={class:"team-name data-info"},et=["src"],tt=T({__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(o,{emit:a}){const l=o;let r=null,m=null;const c=e.ref([]),C=e.ref(null),y=e.ref(null),w=e.ref(0),d=e.ref(0),x=e.ref(-1);e.ref(!1);const S=e.ref(null),h=e.ref(null),f=e.computed(()=>({"--width-details":`${w.value}px`,"--gap-static-row":`${p.value?"8px":"18px"}`,"--width-static-column":`${p.value?"50%":"256px"}`})),p=e.computed(()=>w.value<600);e.watch(()=>l.players,t=>{t&&t.length&&(c.value=t.map((i,s)=>{const n=s+1,u={...i,position:n<10?`0${n}`:`${n}`,isSelected:!1,isExpanded:!1,isOdd:s%2!==0,index:s};return u.parameters&&Object.entries(u.parameters).forEach(([L,$])=>{const W=u.stats.find(rt=>rt.custom_category_id===Number(L));W&&(W.parameters=$)}),u}))},{immediate:!0,deep:!0}),e.watch(()=>l.isEditMode,t=>{t&&c.value.forEach(i=>{i.isSelected=!1})}),e.watch(d,t=>{const s=document.querySelectorAll(".static-row")[x.value+1];s&&(s.style.marginTop=`${t}px`),l.isGeneral?g(x.value,t):y.value&&y.value.setMarginTopDetails(x.value,t),t===0&&S.value&&R(S.value)});function g(t,i){const n=document.querySelectorAll(".scrollable-row")[t+2];n&&(n.style.marginTop=`${i}px`)}function b(t){a("click-parameters",t)}function k(t){const i=t.player||t.objeto_player,s=i?i.player_id||i.id||i.playerId:t.id||t.player_id,n={isFeaturedPlayers:!1,mainSectionType:1,playListType:2,gameIds:null,playerIds:s?[s]:[],goalkeeperIds:[],matchResult:[1,2,3],categorySingleName:"",isRivalSubject:!1,avoidCategorySingleName:!1,currentPlayIndex:0,playData:null,lastClashedGameId:null,tournamentsLastClashes:null,advancedFilter:{playListTitle:"Jugadas Relevantes"}};if(t.stat&&t.stat.parameters&&(n.parameters=t.stat.parameters),t.stat&&t.stat.seasons&&t.stat.seasons.length||t.seasons&&t.seasons.length){const u=[...t.stat&&t.stat.seasons&&t.stat.seasons.length?t.stat.seasons:t.seasons];u.sort((L,$)=>L-$),n.seasonId=u.shift(),n.seasonsIds=u}else(t.season_id||t.seasonId)&&(n.seasonId=t.season_id||t.seasonId);t.stat?t.stat.category_id&&t.stat.category_id.length?n.categoryIds=t.stat.category_id:t.stat.custom_category_id&&(n.customCategoryIds=[t.stat.custom_category_id]):n.categoryIds=lt(t.player_position),a("open-media",n)}function F(){r=new ResizeObserver(t=>{for(const i of t)w.value=i.contentRect.width}),r.observe(C.value)}function ot(t){m=new ResizeObserver(i=>{for(const s of i)d.value=s.contentRect.height}),m.observe(t)}function lt(t){return t==="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 st(t,i){i.isSelected=t;const s=c.value.filter(n=>n.isSelected);a("change-selected-players",s)}function nt(t){a("view-profile",t)}function I(t){a("delete-from-list",t)}function O(t){a("add-to-list",t)}function at(t){a("show-graph",t)}function R(t){if(t.isExpanded){t.isExpanded=!1,S.value=null;return}const i=c.value.find(u=>u.isExpanded);if(i&&(i.isExpanded=!1),i){S.value=t;return}const n=document.querySelectorAll(".details-row")[t.index];x.value=t.index,ot(n),t.isExpanded=!0}let N=!1,P,Z,A=function(t){N=!0,P=t.pageX-h.value.offsetLeft,Z=h.value.scrollLeft},V=function(){N=!1};function it(){h.value&&(h.value.addEventListener("mousemove",t=>{if(!N)return;const s=t.pageX-h.value.offsetLeft-P;h.value.scrollLeft=Z-s}),h.value.addEventListener("mousedown",A,!1),h.value.addEventListener("mouseup",V,!1),h.value.addEventListener("mouseleave",V,!1))}return e.onMounted(()=>{F(),it()}),e.onBeforeUnmount(()=>{r&&r.disconnect(),m&&m.disconnect(),h.value&&(h.value.removeEventListener("mousemove",A,!1),h.value.removeEventListener("mouseup",V,!1),h.value.removeEventListener("mouseleave",V,!1))}),(t,i)=>(e.openBlock(),e.createElementBlock("div",{class:"table",ref_key:"tableSC",ref:C,style:e.normalizeStyle(f.value)},[e.createElementVNode("div",ke,[be,(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,s=>(e.openBlock(),e.createElementBlock("div",{key:`s-${s.id}`,class:e.normalizeClass(["row static-row",{odd:s.isOdd}])},[e.createVNode(e.Transition,null,{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",{class:e.normalizeClass(["details-row",{odd:s.isOdd}])},[e.createElementVNode("div",ue,[e.createElementVNode("div",ye,[e.createElementVNode("div",we,[e.createElementVNode("div",null,[e.createTextVNode("Equipo: "),e.createElementVNode("span",Ee,e.toDisplayString(s.team_name),1)]),e.createElementVNode("div",null,[e.createTextVNode("Edad: "),e.createElementVNode("span",xe,e.toDisplayString(s.player_age)+" Años",1)]),e.createElementVNode("div",null,[e.createTextVNode("Nacionalidad: "),e.createElementVNode("span",Se,e.toDisplayString(s.player_country),1)]),e.createElementVNode("div",null,[e.createTextVNode("Posición: "),e.createElementVNode("span",Ve,e.toDisplayString(s.position_name),1)])]),e.createElementVNode("div",Be,[e.createElementVNode("div",null,[e.createTextVNode("Partidos Jugados: "),e.createElementVNode("span",Ne,e.toDisplayString(s.player_games),1)]),e.createElementVNode("div",null,[e.createTextVNode("Minutos Jugados: "),e.createElementVNode("span",Le,e.toDisplayString(s.player_min),1)])])]),e.createElementVNode("div",{class:"details-row__buttons",style:e.normalizeStyle(p.value?"margin-left: 0; gap: 8px;":"")},[e.createElementVNode("div",{role:"button",class:"button",onClick:n=>at(s)},ze,8,$e),o.isTableFromList?(e.openBlock(),e.createElementBlock("div",{key:0,role:"button",class:"button",onClick:n=>I(s)},Te,8,Me)):(e.openBlock(),e.createElementBlock("div",{key:1,role:"button",class:"button",onClick:n=>O(s)},Fe,8,De)),e.createElementVNode("div",{role:"button",class:"button green",onClick:n=>nt(s)},Oe,8,Ie)],4)])],2),[[e.vShow,s.isExpanded]])]),_:2},1024),o.isEditMode?(e.openBlock(),e.createBlock(e.unref(Y),{key:0,fontFamily:"Poppins-Regular",labelFontSize:"14px","model-value":s.isSelected,"onUpdate:modelValue":n=>st(n,s)},null,8,["model-value","onUpdate:modelValue"])):e.createCommentVNode("",!0),e.createElementVNode("div",Re,[e.createElementVNode("div",Pe,e.toDisplayString(s.position),1),o.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:n=>I(s)},Ae,8,Ze)):(e.openBlock(),e.createElementBlock("svg",{key:1,width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",onClick:n=>O(s)},je,8,We)),e.createElementVNode("div",He,[e.createElementVNode("div",null,[e.createElementVNode("img",{src:s.player_photo,alt:"player photo"},null,8,Ge)])]),e.createElementVNode("div",Ue,e.toDisplayString(s.player_name),1)]),e.createElementVNode("div",qe,[(e.openBlock(),e.createElementBlock("svg",{class:e.normalizeClass(["_arrowExpandIcon_6ak64_1115 _rotate_6ak64_5",{expanded:s.isExpanded}]),width:"12",height:"8",viewBox:"0 0 12 8",fill:"#D9D9D9",xmlns:"http://www.w3.org/2000/svg",onClick:n=>R(s)},Je,10,ve))])],2))),128))]),e.createElementVNode("div",{ref_key:"scrollableColumns",ref:h,class:"table__scrollable-columns"},[o.isGeneral?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[Xe,(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,s=>(e.openBlock(),e.createElementBlock("div",{key:`i-${s.id}`,class:"row scrollable-row"},[e.createElementVNode("div",{class:e.normalizeClass(["row team-info",{odd:s.isOdd}])},[e.createElementVNode("div",Ke,[e.createElementVNode("img",{src:s.team_logo,alt:"team logo"},null,8,Qe)]),e.createElementVNode("div",Ye,e.toDisplayString(s.team_abrev),1)],2),e.createElementVNode("div",{class:e.normalizeClass(["row data-info",{odd:s.isOdd}])},e.toDisplayString(s.player_position),3),e.createElementVNode("div",{class:e.normalizeClass(["row data-info",{odd:s.isOdd}])},e.toDisplayString(s.player_age),3),e.createElementVNode("div",{class:e.normalizeClass(["row data-info",{odd:s.isOdd}])},[e.createElementVNode("img",{src:s.player_country_flag,alt:"player country flag",class:"country-flag"},null,8,et)],2),e.createElementVNode("div",{class:e.normalizeClass(["row data-info",{odd:s.isOdd}])},e.toDisplayString(s.player_games),3),e.createElementVNode("div",{class:e.normalizeClass(["row data-info",{odd:s.isOdd}])},e.toDisplayString(s.player_min),3),e.createElementVNode("div",{class:e.normalizeClass(["row data-info",{odd:s.isOdd}])},e.toDisplayString(s.league_name),3),e.createElementVNode("div",{class:e.normalizeClass(["row data-info",{odd:s.isOdd}])},[e.createVNode(e.unref(de),{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:n=>k(s)},null,8,["onClick"])],2),e.createElementVNode("div",{class:e.normalizeClass(["row data-info",{odd:s.isOdd}])},null,2)]))),128))],64)):(e.openBlock(),e.createBlock(Ce,{key:1,ref_key:"scrollColumns",ref:y,"available-players":c.value,"is-edit-mode":o.isEditMode,onOpenMedia:k,onClickParameters:b},null,8,["available-players","is-edit-mode"]))],512)],4))}},[["__scopeId","data-v-bfcf1c28"]]);E.GSCTableScrollable=tt,Object.defineProperty(E,Symbol.toStringTag,{value:"Module"})});
1
+ (function(S,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(S=typeof globalThis<"u"?globalThis:S||self,e(S.GSCTableScrollable={},S.Vue))})(this,function(S,e){"use strict";const U=(l,d)=>{const s=l.__vccOpts||l;for(const[c,h]of d)s[c]=h;return s},q={key:1},J={width:"10",height:"8",viewBox:"0 0 10 8",fill:"none",xmlns:"http://www.w3.org/2000/svg"},X=["fill"],K={key:0,class:"checkbox__teams"},Q={class:"checkbox__teams__logo"},Y=["src"],v={class:"checkbox__teams__logo"},ee=["src"],te={__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(l){return["left","right","top","bottom"].includes(l)}},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(l,{emit:d}){const s=l;e.useCssVars(f=>({"7bd9d47b":l.width,"34dc7ddc":l.height}));const c=e.ref(!1),h=e.computed(()=>{const f={color:s.boxValueColor,"font-family":s.fontFamily,height:s.boxWidthAndHeight,width:s.boxWidthAndHeight,minWidth:s.boxWidthAndHeight,"border-radius":s.boxBorderRadius,"margin-top":s.boxMarginTop};return c.value?(f["background-color"]=s.boxBackgroundColor,f.border=`solid ${s.boxBorderWidth} ${s.boxBackgroundColor}`):f.border=`solid ${s.boxBorderWidth} ${s.boxBorderColor}`,f}),p=e.computed(()=>({"font-family":s.boxValueFontFamily,"font-size":s.boxValueFontSize,color:s.boxValueColor,"line-height":1})),w=e.computed(()=>{const f={color:s.labelColor,"font-family":s.fontFamily,"font-size":s.labelFontSize,"white-space":s.labelWhiteSpace,"text-align":s.boxPosition==="top"||s.boxPosition==="bottom"?"center":s.boxPosition};return(s.boxPosition==="left"||s.boxPosition==="right")&&(f[`margin-${s.boxPosition}`]=s.isBoxOnly?"0":s.teamsIds?"8px":"10px"),f});e.watch(()=>s.modelValue,f=>{f!==c.value&&(c.value=f)},{immediate:!0});function E(){s.avoidInteraction||!c.value&&s.avoidToCheck||(c.value=!c.value,d("update:modelValue",c.value))}function V(f){return`${{}.TEAM_LOGOS_URL||"https://golstatsimages.blob.core.windows.net/teams-80/"}${f}.png`}return(f,N)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["checkbox",`box-${l.boxPosition}`]),onClick:E},[e.createElementVNode("div",{class:"checkbox__box",style:e.normalizeStyle(h.value)},[c.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[s.boxValue?(e.openBlock(),e.createElementBlock("div",{key:0,class:"checkbox__box__value",style:e.normalizeStyle(p.value)},e.toDisplayString(l.boxValue),5)):(e.openBlock(),e.createElementBlock("div",q,[(e.openBlock(),e.createElementBlock("svg",J,[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:l.boxValueColor},null,8,X)]))]))],64)):e.createCommentVNode("",!0)],4),l.teamsIds&&l.teamsIds.length?(e.openBlock(),e.createElementBlock("div",K,[e.createElementVNode("div",Q,[e.createElementVNode("img",{src:V(l.teamsIds[0]),alt:""},null,8,Y)]),e.createElementVNode("div",v,[e.createElementVNode("img",{src:V(l.teamsIds[1]),alt:""},null,8,ee)])])):e.createCommentVNode("",!0),e.createElementVNode("div",{class:"checkbox__label",style:e.normalizeStyle(w.value)},e.toDisplayString(l.label),5)],2))}},oe=U(te,[["__scopeId","data-v-b6f124d8"]]),le=(l,d)=>{const s=l.__vccOpts||l;for(const[c,h]of d)s[c]=h;return s},$={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(l){this.status=l}}},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(l){this.$emit("click",l),this.typeOnOff&&(this.status=!this.status,this.$emit("status",this.status))}}},T=()=>{e.useCssVars(l=>({"9d01acb4":l.height,"14e95081":l.borderWidthBtn,"38fec285":l.borderType,34353510:l.borderColor,"20d20dc6":l.borderRadius,17130967:l.width,"4ccb7d36":l.backgroundColor,"5d1e86a2":l.cursorType,ce65d4a2:l.fontSize,fe4ac47a:l.fontStyle,f98e44dc:l.fontFamily,"93b87770":l.marginLeftStat,c7f7beba:l.fontSizeStat}))},R=$.setup;$.setup=R?(l,d)=>(T(),R(l,d)):T;const se=l=>(e.pushScopeId("data-v-f3ee6b2b"),l=l(),e.popScopeId(),l),ne=["src"],ie={key:1,class:"text"},ae=["src"],re={class:"stats"},de=se(()=>e.createElementVNode("img",{class:"iconstats",src:"https://golstatsimages.blob.core.windows.net/todoelfut/playdes.png"},null,-1)),ce={class:"numstats"},me={class:"leyend"};function fe(l,d,s,c,h,p){return e.openBlock(),e.createElementBlock("div",null,[s.type==0?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["button",h.status&&s.typeOnOff&&"button-active"]),style:e.normalizeStyle([p.customStyle,h.status&&s.typeOnOff&&p.customActive]),onClick:d[0]||(d[0]=(...w)=>p.btnClick&&p.btnClick(...w))},[s.icon&&s.iconPosition.toLowerCase()==="left"?(e.openBlock(),e.createElementBlock("img",{key:0,class:"icon",style:e.normalizeStyle({width:s.iconSize}),src:s.icon},null,12,ne)):e.createCommentVNode("",!0),s.textValue?(e.openBlock(),e.createElementBlock("div",ie,e.toDisplayString(s.textValue),1)):e.createCommentVNode("",!0),s.icon&&s.iconPosition.toLowerCase()==="right"?(e.openBlock(),e.createElementBlock("img",{key:2,class:"icon",style:e.normalizeStyle({width:s.iconSize}),src:s.icon},null,12,ae)):e.createCommentVNode("",!0)],6)):e.createCommentVNode("",!0),s.type==1?(e.openBlock(),e.createElementBlock("div",{key:1,class:"button-target",onClick:d[1]||(d[1]=(...w)=>p.btnClick&&p.btnClick(...w))},[e.createElementVNode("div",re,[de,e.createElementVNode("div",ce,e.toDisplayString(s.textStat),1)]),e.createElementVNode("div",me,e.toDisplayString(s.textCategory),1)])):e.createCommentVNode("",!0)])}const he=le($,[["render",fe],["__scopeId","data-v-f3ee6b2b"]]),I=(l,d)=>{const s=l.__vccOpts||l;for(const[c,h]of d)s[c]=h;return s},D=l=>(e.pushScopeId("data-v-df83603b"),l=l(),e.popScopeId(),l),pe={key:0,class:"overlay"},_e=["onClick"],ge=[D(()=>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))],ke={class:"name"},Ce=["onClick"],ye=[D(()=>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))],we=D(()=>e.createElementVNode("div",{class:"column-title-2"},null,-1)),be=["onClick"],ue=I({__name:"ScrollColumns",props:{availablePlayers:{type:Array,default:()=>[]},isEditMode:{type:Boolean,default:!1}},emits:["expand","open-media","click-parameters","sort"],setup(l,{expose:d,emit:s}){const c=l,h=e.ref(null),p=e.ref(null),w=e.ref(0);e.ref(!1);const E=e.computed(()=>{const r=c.availablePlayers[0];return r?r.stats:[]}),V=e.computed(()=>{const r=`repeat(${E.value.length}, max-content) 36px`;let m="";return w.value>0&&document.querySelectorAll(".column-title-2").forEach(b=>{m+=`${b.offsetWidth}px `}),{"--grid-template-columns":r,"--grid-template-columns-totals":m||r}});function f(){h.value=new ResizeObserver(r=>{for(const m of r){const{width:k}=m.contentRect;w.value=k}}),h.value.observe(p.value)}function N(r,m){const b=document.querySelectorAll(".scrollable-row-totals")[r+1];b&&(b.style.marginTop=`${m}px`)}function B({player:r,stat:m}){!m.total||m==="0%"||!m.seasons||!m.seasons.length||s("open-media",{...r,stat:m})}function g(r){!r||r==="no"||s("click-parameters",r)}function M(r){s("sort",r)}return e.onMounted(()=>{f()}),d({setMarginTopDetails:N}),(r,m)=>(e.openBlock(),e.createElementBlock("div",{class:"scroll-columns",style:e.normalizeStyle(V.value)},[l.isEditMode?(e.openBlock(),e.createElementBlock("div",pe)):e.createCommentVNode("",!0),e.createElementVNode("div",{ref_key:"titlesRow",ref:p,class:"scrollable-row-2"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(E.value,(k,b)=>(e.openBlock(),e.createElementBlock("div",{key:`t-${b}`,class:"column-title-2"},[k.parameters&&k.parameters!=="no"?(e.openBlock(),e.createElementBlock("div",{key:0,class:"parameters",role:"button",onClick:y=>g(k.parameters)},ge,8,_e)):e.createCommentVNode("",!0),e.createElementVNode("div",ke,e.toDisplayString(k.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:y=>M(k)},ye,8,Ce))]))),128)),we],512),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.availablePlayers,(k,b)=>(e.openBlock(),e.createElementBlock("div",{key:`i-${k.id}`,class:"row scrollable-row-totals"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(k.stats,y=>(e.openBlock(),e.createElementBlock("div",{key:y.category_id,class:e.normalizeClass(["row data-info",{odd:b%2!==0,underline:!!y.total&&y.total!=="0%"&&y.seasons&&y.seasons.length}])},[e.createElementVNode("span",{onClick:F=>B({player:k,stat:y})},e.toDisplayString(y.total),9,be)],2))),128))]))),128))],4))}},[["__scopeId","data-v-df83603b"]]),a=l=>(e.pushScopeId("data-v-14d97ca7"),l=l(),e.popScopeId(),l),Ee={class:"table__static-column"},Ve={class:"static-title column-title restore"},xe=[a(()=>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)),a(()=>e.createElementVNode("div",null,"Restaurar orden",-1))],Se=["id"],Ne={class:"container"},Be={class:"details-row__info"},Me={class:"details-row__info__personal"},Le={class:"bold"},$e={class:"bold"},De={class:"bold"},ze={class:"bold"},Te={class:"details-row__info__games"},Re={class:"bold"},Ie={class:"bold"},Fe=["onClick"],Pe=[a(()=>e.createElementVNode("div",null,"Ver gráfica",-1)),a(()=>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))],Oe=["onClick"],je=[a(()=>e.createElementVNode("div",null,"Eliminar de lista",-1)),a(()=>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))],Ae=["onClick"],Ze=[a(()=>e.createElementVNode("div",null,"Agregar a lista",-1)),a(()=>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))],We=["onClick"],He=[a(()=>e.createElementVNode("div",null,"Ver perfil",-1))],Ge={class:"static-row__info-player"},Ue={class:"position"},qe=["onClick"],Je=[a(()=>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)),a(()=>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)),a(()=>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))],Xe=["onClick"],Ke=[a(()=>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)),a(()=>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)),a(()=>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))],Qe={class:"player-photo"},Ye=["src"],ve={class:"player-name"},et={class:"arrow"},tt=["onClick"],ot=[a(()=>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))],lt={class:"titles scrollable-row"},st={class:"column-title"},nt=a(()=>e.createElementVNode("div",null," Equipo ",-1)),it=[a(()=>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))],at={class:"column-title"},rt=a(()=>e.createElementVNode("div",null," Posición ",-1)),dt=[a(()=>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))],ct={class:"column-title"},mt=a(()=>e.createElementVNode("div",null," Edad ",-1)),ft=[a(()=>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))],ht=a(()=>e.createElementVNode("div",{class:"column-title"},"País",-1)),pt={class:"column-title"},_t=a(()=>e.createElementVNode("div",null," Partidos Jugados ",-1)),gt=[a(()=>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))],kt={class:"column-title"},Ct=a(()=>e.createElementVNode("div",null," Minutos Jugados ",-1)),yt=[a(()=>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))],wt={class:"column-title"},bt=a(()=>e.createElementVNode("div",null," Liga ",-1)),ut=[a(()=>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))],Et=a(()=>e.createElementVNode("div",{class:"column-title"},"Videos",-1)),Vt={class:"team-logo"},xt=["src"],St={class:"team-name data-info"},Nt=["src"],Bt=I({__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(l,{emit:d}){const s=l;let c=null,h=null;const p=e.ref([]),w=e.ref(null),E=e.ref(null),V=e.ref(0),f=e.ref(0),N=e.ref(-1);e.ref(!1);const B=e.ref(null),g=e.ref(null),M=e.ref(null),r=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}]),k=e.ref(0),b=e.computed(()=>({"--width-details":`${V.value}px`,"--gap-static-row":`${y.value?"8px":"18px"}`,"--width-static-column":`${y.value?"50%":"256px"}`})),y=e.computed(()=>V.value<600);e.watch(()=>s.players,t=>{t&&t.length&&(p.value=t.map((n,o)=>{const i=o+1,_={...n,position:i<10?`0${i}`:`${i}`,isSelected:!1,isExpanded:!1,isOdd:o%2!==0,index:o};return n.stats&&n.stats.length&&(_.stats=n.stats.map(C=>({...C,isDesc:!1,isRoot:!1}))),_.parameters&&Object.entries(_.parameters).forEach(([C,u])=>{const G=_.stats.find(Ft=>Ft.custom_category_id===Number(C));G&&(G.parameters=u)}),_}),r.value=p.value.map(n=>({...n})))},{immediate:!0,deep:!0}),e.watch(()=>s.isEditMode,t=>{t&&p.value.forEach(n=>{n.isSelected=!1})}),e.watch(()=>M.value,t=>{if(t){let n=[...r.value];t.isRoot?n.sort((o,i)=>typeof o[t.name]=="string"?t.isDesc?o[t.name].localeCompare(i[t.name]):o[t.name].localeCompare(i[t.name])*-1:t.isDesc?i[t.name]-o[t.name]:o[t.name]-i[t.name]):n.sort((o,i)=>{const _=o.stats.find(u=>u.name===t.name),C=i.stats.find(u=>u.name===t.name);return typeof _.value=="string"?t.isDesc?_.total.localeCompare(C.total):_.total.localeCompare(C.total)*-1:t.isDesc?C.total-_.total:_.total-C.total}),n.forEach((o,i)=>{o.isOdd=i%2!==0}),r.value=n}else r.value.sort((n,o)=>n.index-o.index).forEach((n,o)=>{n.isOdd=o%2!==0})},{immediate:!0,deep:!0}),e.watch(f,t=>{const o=document.querySelectorAll(".static-row")[N.value+1];o&&(o.style.marginTop=`${t}px`),s.isGeneral?F(N.value,t):E.value&&E.value.setMarginTopDetails(N.value,t),t===0&&B.value&&A(B.value)});function F(t,n){const i=document.querySelectorAll(".scrollable-row")[t+2];i&&(i.style.marginTop=`${n}px`)}function Mt(t){d("click-parameters",t)}function x(t){t&&(t.isDesc=!t.isDesc),M.value=t}function P(t){const n=t.player||t.objeto_player,o=n?n.player_id||n.id||n.playerId:t.id||t.player_id,i={isFeaturedPlayers:!1,mainSectionType:1,playListType:2,gameIds:null,playerIds:o?[o]:[],goalkeeperIds:[],matchResult:[1,2,3],categorySingleName:"",isRivalSubject:!1,avoidCategorySingleName:!1,currentPlayIndex:0,playData:null,lastClashedGameId:null,tournamentsLastClashes:null,advancedFilter:{playListTitle:"Jugadas Relevantes"}};if(t.stat&&t.stat.parameters&&(i.parameters=t.stat.parameters),t.stat&&t.stat.seasons&&t.stat.seasons.length||t.seasons&&t.seasons.length){const _=[...t.stat&&t.stat.seasons&&t.stat.seasons.length?t.stat.seasons:t.seasons];_.sort((C,u)=>C-u),i.seasonId=_.shift(),i.seasonsIds=_}else(t.season_id||t.seasonId)&&(i.seasonId=t.season_id||t.seasonId);t.stat?t.stat.category_id&&t.stat.category_id.length?i.categoryIds=t.stat.category_id:t.stat.custom_category_id&&(i.customCategoryIds=[t.stat.custom_category_id]):i.categoryIds=Dt(t.player_position),d("open-media",i)}function Lt(){c=new ResizeObserver(t=>{for(const n of t)V.value=n.contentRect.width}),c.observe(w.value)}function $t(t){h=new ResizeObserver(n=>{for(const o of n)f.value=o.contentRect.height}),h.observe(t)}function Dt(t){return t==="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 zt(t,n){n.isSelected=t;const o=p.value.filter(i=>i.isSelected);d("change-selected-players",o)}function Tt(t){d("view-profile",t)}function O(t){d("delete-from-list",t)}function j(t){d("add-to-list",t)}function Rt(t){d("show-graph",t)}function A(t){if(t.isExpanded){t.isExpanded=!1,B.value=null;return}const n=p.value.find(C=>C.isExpanded);if(n&&(n.isExpanded=!1),n){B.value=t;return}const o=document.querySelectorAll(".details-row");let i=-1;o.forEach((C,u)=>{C.id===`dr-${t.id}`&&(i=u)});const _=o[i];N.value=i,$t(_),t.isExpanded=!0}let z=!1,Z,W,H=function(t){z=!0,Z=t.pageX-g.value.offsetLeft,W=g.value.scrollLeft},L=function(){z=!1};function It(){g.value&&(g.value.addEventListener("mousemove",t=>{if(!z)return;const o=t.pageX-g.value.offsetLeft-Z;g.value.scrollLeft=W-o}),g.value.addEventListener("mousedown",H,!1),g.value.addEventListener("mouseup",L,!1),g.value.addEventListener("mouseleave",L,!1))}return e.onMounted(()=>{Lt(),It()}),e.onBeforeUnmount(()=>{c&&c.disconnect(),h&&h.disconnect(),g.value&&(g.value.removeEventListener("mousemove",H,!1),g.value.removeEventListener("mouseup",L,!1),g.value.removeEventListener("mouseleave",L,!1))}),(t,n)=>(e.openBlock(),e.createElementBlock("div",{class:"table",ref_key:"tableSC",ref:w,style:e.normalizeStyle(b.value),key:k.value},[e.createElementVNode("div",Ee,[e.createElementVNode("div",Ve,[e.createElementVNode("div",{role:"button",class:"restore-button",onClick:n[0]||(n[0]=o=>x(null))},xe)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value,o=>(e.openBlock(),e.createElementBlock("div",{key:`s-${o.id}`,class:e.normalizeClass(["row static-row",{odd:o.isOdd}])},[e.createVNode(e.Transition,null,{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",{id:`dr-${o.id}`,class:e.normalizeClass(["details-row",{odd:o.isOdd}])},[e.createElementVNode("div",Ne,[e.createElementVNode("div",Be,[e.createElementVNode("div",Me,[e.createElementVNode("div",null,[e.createTextVNode("Equipo: "),e.createElementVNode("span",Le,e.toDisplayString(o.team_name),1)]),e.createElementVNode("div",null,[e.createTextVNode("Edad: "),e.createElementVNode("span",$e,e.toDisplayString(o.player_age)+" Años",1)]),e.createElementVNode("div",null,[e.createTextVNode("Nacionalidad: "),e.createElementVNode("span",De,e.toDisplayString(o.player_country),1)]),e.createElementVNode("div",null,[e.createTextVNode("Posición: "),e.createElementVNode("span",ze,e.toDisplayString(o.position_name),1)])]),e.createElementVNode("div",Te,[e.createElementVNode("div",null,[e.createTextVNode("Partidos Jugados: "),e.createElementVNode("span",Re,e.toDisplayString(o.player_games),1)]),e.createElementVNode("div",null,[e.createTextVNode("Minutos Jugados: "),e.createElementVNode("span",Ie,e.toDisplayString(o.player_min),1)])])]),e.createElementVNode("div",{class:"details-row__buttons",style:e.normalizeStyle(y.value?"margin-left: 0; gap: 8px;":"")},[e.createElementVNode("div",{role:"button",class:"button",onClick:i=>Rt(o)},Pe,8,Fe),l.isTableFromList?(e.openBlock(),e.createElementBlock("div",{key:0,role:"button",class:"button",onClick:i=>O(o)},je,8,Oe)):(e.openBlock(),e.createElementBlock("div",{key:1,role:"button",class:"button",onClick:i=>j(o)},Ze,8,Ae)),e.createElementVNode("div",{role:"button",class:"button green",onClick:i=>Tt(o)},He,8,We)],4)])],10,Se),[[e.vShow,o.isExpanded]])]),_:2},1024),l.isEditMode?(e.openBlock(),e.createBlock(e.unref(oe),{key:0,fontFamily:"Poppins-Regular",labelFontSize:"14px","model-value":o.isSelected,"onUpdate:modelValue":i=>zt(i,o)},null,8,["model-value","onUpdate:modelValue"])):e.createCommentVNode("",!0),e.createElementVNode("div",Ge,[e.createElementVNode("div",Ue,e.toDisplayString(o.position),1),l.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:i=>O(o)},Je,8,qe)):(e.openBlock(),e.createElementBlock("svg",{key:1,width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",onClick:i=>j(o)},Ke,8,Xe)),e.createElementVNode("div",Qe,[e.createElementVNode("div",null,[e.createElementVNode("img",{src:o.player_photo,alt:"player photo"},null,8,Ye)])]),e.createElementVNode("div",ve,e.toDisplayString(o.player_name),1)]),e.createElementVNode("div",et,[(e.openBlock(),e.createElementBlock("svg",{class:e.normalizeClass(["_arrowExpandIcon_6ak64_1115 _rotate_6ak64_5",{expanded:o.isExpanded}]),width:"12",height:"8",viewBox:"0 0 12 8",fill:"#D9D9D9",xmlns:"http://www.w3.org/2000/svg",onClick:i=>A(o)},ot,10,tt))])],2))),128))]),e.createElementVNode("div",{ref_key:"scrollableColumns",ref:g,class:"table__scrollable-columns"},[l.isGeneral?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("div",lt,[e.createElementVNode("div",st,[nt,(e.openBlock(),e.createElementBlock("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",onClick:n[1]||(n[1]=o=>x(m.value[0]))},it))]),e.createElementVNode("div",at,[rt,(e.openBlock(),e.createElementBlock("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",onClick:n[2]||(n[2]=o=>x(m.value[1]))},dt))]),e.createElementVNode("div",ct,[mt,(e.openBlock(),e.createElementBlock("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",onClick:n[3]||(n[3]=o=>x(m.value[2]))},ft))]),ht,e.createElementVNode("div",pt,[_t,(e.openBlock(),e.createElementBlock("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",onClick:n[4]||(n[4]=o=>x(m.value[3]))},gt))]),e.createElementVNode("div",kt,[Ct,(e.openBlock(),e.createElementBlock("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",onClick:n[5]||(n[5]=o=>x(m.value[4]))},yt))]),e.createElementVNode("div",wt,[bt,(e.openBlock(),e.createElementBlock("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",onClick:n[6]||(n[6]=o=>x(m.value[5]))},ut))]),Et]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value,o=>(e.openBlock(),e.createElementBlock("div",{key:`i-${o.id}`,class:"row scrollable-row"},[e.createElementVNode("div",{class:e.normalizeClass(["row team-info",{odd:o.isOdd}])},[e.createElementVNode("div",Vt,[e.createElementVNode("img",{src:o.team_logo,alt:"team logo"},null,8,xt)]),e.createElementVNode("div",St,e.toDisplayString(o.team_abrev),1)],2),e.createElementVNode("div",{class:e.normalizeClass(["row data-info",{odd:o.isOdd}])},e.toDisplayString(o.player_position),3),e.createElementVNode("div",{class:e.normalizeClass(["row data-info",{odd:o.isOdd}])},e.toDisplayString(o.player_age),3),e.createElementVNode("div",{class:e.normalizeClass(["row data-info",{odd:o.isOdd}])},[e.createElementVNode("img",{src:o.player_country_flag,alt:"player country flag",class:"country-flag"},null,8,Nt)],2),e.createElementVNode("div",{class:e.normalizeClass(["row data-info",{odd:o.isOdd}])},e.toDisplayString(o.player_games),3),e.createElementVNode("div",{class:e.normalizeClass(["row data-info",{odd:o.isOdd}])},e.toDisplayString(o.player_min),3),e.createElementVNode("div",{class:e.normalizeClass(["row data-info",{odd:o.isOdd}])},e.toDisplayString(o.league_name),3),e.createElementVNode("div",{class:e.normalizeClass(["row data-info",{odd:o.isOdd}])},[e.createVNode(e.unref(he),{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:i=>P(o)},null,8,["onClick"])],2)]))),128))],64)):(e.openBlock(),e.createBlock(ue,{key:1,ref_key:"scrollColumns",ref:E,"available-players":r.value,"is-edit-mode":l.isEditMode,onOpenMedia:P,onClickParameters:Mt,onSort:x},null,8,["available-players","is-edit-mode"]))],512)],4))}},[["__scopeId","data-v-14d97ca7"]]);S.GSCTableScrollable=Bt,Object.defineProperty(S,Symbol.toStringTag,{value:"Module"})});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@golstats/gsc-table-scrollable",
3
- "version": "1.0.13",
3
+ "version": "1.0.14",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist"