@golstats/gsc-landing 1.0.21 → 1.0.22

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.
@@ -300,4 +300,4 @@ browserWorkerPolyFill(self);
300
300
  * Vue 3 Carousel 0.3.1
301
301
  * (c) 2023
302
302
  * @license MIT
303
- */const Sa={itemsToShow:1,itemsToScroll:1,modelValue:0,transition:300,autoplay:0,snapAlign:"center",wrapAround:!1,throttle:16,pauseAutoplayOnHover:!1,mouseDrag:!0,touchDrag:!0,dir:"ltr",breakpoints:void 0,i18n:{ariaNextSlide:"Navigate to next slide",ariaPreviousSlide:"Navigate to previous slide",ariaNavigateToSlide:"Navigate to slide {slideNumber}",ariaGallery:"Gallery",itemXofY:"Item {currentSlide} of {slidesCount}",iconArrowUp:"Arrow pointing upwards",iconArrowDown:"Arrow pointing downwards",iconArrowRight:"Arrow pointing to the right",iconArrowLeft:"Arrow pointing to the left"}},JA={itemsToShow:{default:Sa.itemsToShow,type:Number},itemsToScroll:{default:Sa.itemsToScroll,type:Number},wrapAround:{default:Sa.wrapAround,type:Boolean},throttle:{default:Sa.throttle,type:Number},snapAlign:{default:Sa.snapAlign,validator(e){return["start","end","center","center-even","center-odd"].includes(e)}},transition:{default:Sa.transition,type:Number},breakpoints:{default:Sa.breakpoints,type:Object},autoplay:{default:Sa.autoplay,type:Number},pauseAutoplayOnHover:{default:Sa.pauseAutoplayOnHover,type:Boolean},modelValue:{default:void 0,type:Number},mouseDrag:{default:Sa.mouseDrag,type:Boolean},touchDrag:{default:Sa.touchDrag,type:Boolean},dir:{default:Sa.dir,validator(e){return["rtl","ltr"].includes(e)}},i18n:{default:Sa.i18n,type:Object},settings:{default(){return{}},type:Object}};function Tke({config:e,slidesCount:t}){const{snapAlign:a,wrapAround:i,itemsToShow:n=1}=e;if(i)return Math.max(t-1,0);let r;switch(a){case"start":r=t-n;break;case"end":r=t-1;break;case"center":case"center-odd":r=t-Math.ceil((n-.5)/2);break;case"center-even":r=t-Math.ceil(n/2);break;default:r=0;break}return Math.max(r,0)}function Cke({config:e,slidesCount:t}){const{wrapAround:a,snapAlign:i,itemsToShow:n=1}=e;let r=0;if(a||n>t)return r;switch(i){case"start":r=0;break;case"end":r=n-1;break;case"center":case"center-odd":r=Math.floor((n-1)/2);break;case"center-even":r=Math.floor((n-2)/2);break;default:r=0;break}return r}function o1({val:e,max:t,min:a}){return t<a?e:Math.min(Math.max(e,a),t)}function kke({config:e,currentSlide:t,slidesCount:a}){const{snapAlign:i,wrapAround:n,itemsToShow:r=1}=e;let o=t;switch(i){case"center":case"center-odd":o-=(r-1)/2;break;case"center-even":o-=(r-2)/2;break;case"end":o-=r-1;break}return n?o:o1({val:o,max:a-r,min:0})}function YA(e){return e?e.reduce((t,a)=>{var i;return a.type===s.Fragment?[...t,...YA(a.children)]:((i=a.type)===null||i===void 0?void 0:i.name)==="CarouselSlide"?[...t,a]:t},[]):[]}function l1({val:e,max:t,min:a=0}){return e>t?l1({val:e-(t+1),max:t,min:a}):e<a?l1({val:e+(t+1),max:t,min:a}):e}function Eke(e,t){let a;return t?function(...i){const n=this;a||(e.apply(n,i),a=!0,setTimeout(()=>a=!1,t))}:e}function Ike(e,t){let a;return function(...i){a&&clearTimeout(a),a=setTimeout(()=>{e(...i),a=null},t)}}function xke(e="",t={}){return Object.entries(t).reduce((a,[i,n])=>a.replace(`{${i}}`,String(n)),e)}var Nke=s.defineComponent({name:"ARIA",setup(){const e=s.inject("config",s.reactive(Object.assign({},Sa))),t=s.inject("currentSlide",s.ref(0)),a=s.inject("slidesCount",s.ref(0));return()=>s.h("div",{class:["carousel__liveregion","carousel__sr-only"],"aria-live":"polite","aria-atomic":"true"},xke(e.i18n.itemXofY,{currentSlide:t.value+1,slidesCount:a.value}))}}),Ake=s.defineComponent({name:"Carousel",props:JA,setup(e,{slots:t,emit:a,expose:i}){var n;const r=s.ref(null),o=s.ref([]),l=s.ref(0),c=s.ref(0),d=s.reactive(Object.assign({},Sa));let u=Object.assign({},Sa),h;const p=s.ref((n=e.modelValue)!==null&&n!==void 0?n:0),m=s.ref(0),f=s.ref(0),v=s.ref(0),_=s.ref(0);let x,B;s.provide("config",d),s.provide("slidesCount",c),s.provide("currentSlide",p),s.provide("maxSlide",v),s.provide("minSlide",_),s.provide("slideWidth",l);function F(){h=Object.assign({},e.breakpoints),u=Object.assign(Object.assign(Object.assign({},u),e),{i18n:Object.assign(Object.assign({},u.i18n),e.i18n),breakpoints:void 0}),D(u)}function O(){if(!h||!Object.keys(h).length)return;const W=Object.keys(h).map(Se=>Number(Se)).sort((Se,Ge)=>+Ge-+Se);let ke=Object.assign({},u);W.some(Se=>{const Ge=window.matchMedia(`(min-width: ${Se}px)`).matches;return Ge&&(ke=Object.assign(Object.assign({},ke),h[Se])),Ge}),D(ke)}function D(W){Object.entries(W).forEach(([ke,Se])=>d[ke]=Se)}const M=Ike(()=>{O(),L()},16);function L(){if(!r.value)return;const W=r.value.getBoundingClientRect();l.value=W.width/d.itemsToShow}function J(){c.value<=0||(f.value=Math.ceil((c.value-1)/2),v.value=Tke({config:d,slidesCount:c.value}),_.value=Cke({config:d,slidesCount:c.value}),d.wrapAround||(p.value=o1({val:p.value,max:v.value,min:_.value})))}s.onMounted(()=>{s.nextTick(()=>L()),setTimeout(()=>L(),1e3),O(),Fe(),window.addEventListener("resize",M,{passive:!0}),a("init")}),s.onUnmounted(()=>{B&&clearTimeout(B),x&&clearInterval(x),window.removeEventListener("resize",M,{passive:!0})});let j=!1;const ne={x:0,y:0},le={x:0,y:0},Z=s.reactive({x:0,y:0}),re=s.ref(!1),Ce=s.ref(!1),ve=()=>{re.value=!0},pe=()=>{re.value=!1};function z(W){["INPUT","TEXTAREA","SELECT"].includes(W.target.tagName)||(j=W.type==="touchstart",j||W.preventDefault(),!(!j&&W.button!==0||te.value)&&(ne.x=j?W.touches[0].clientX:W.clientX,ne.y=j?W.touches[0].clientY:W.clientY,document.addEventListener(j?"touchmove":"mousemove",$,!0),document.addEventListener(j?"touchend":"mouseup",ae,!0)))}const $=Eke(W=>{Ce.value=!0,le.x=j?W.touches[0].clientX:W.clientX,le.y=j?W.touches[0].clientY:W.clientY;const ke=le.x-ne.x,Se=le.y-ne.y;Z.y=Se,Z.x=ke},d.throttle);function ae(){const W=d.dir==="rtl"?-1:1,ke=Math.sign(Z.x)*.4,Se=Math.round(Z.x/l.value+ke)*W;if(Se&&!j){const Ge=gt=>{gt.stopPropagation(),window.removeEventListener("click",Ge,!0)};window.addEventListener("click",Ge,!0)}_e(p.value-Se),Z.x=0,Z.y=0,Ce.value=!1,document.removeEventListener(j?"touchmove":"mousemove",$,!0),document.removeEventListener(j?"touchend":"mouseup",ae,!0)}function Fe(){!d.autoplay||d.autoplay<=0||(x=setInterval(()=>{d.pauseAutoplayOnHover&&re.value||we()},d.autoplay))}function se(){x&&(clearInterval(x),x=null),Fe()}const te=s.ref(!1);function _e(W){const ke=d.wrapAround?W:o1({val:W,max:v.value,min:_.value});p.value===ke||te.value||(a("slide-start",{slidingToIndex:W,currentSlideIndex:p.value,prevSlideIndex:m.value,slidesCount:c.value}),te.value=!0,m.value=p.value,p.value=ke,B=setTimeout(()=>{if(d.wrapAround){const Se=l1({val:ke,max:v.value,min:0});Se!==p.value&&(p.value=Se,a("loop",{currentSlideIndex:p.value,slidingToIndex:W}))}a("update:modelValue",p.value),a("slide-end",{currentSlideIndex:p.value,prevSlideIndex:m.value,slidesCount:c.value}),te.value=!1,se()},d.transition))}function we(){_e(p.value+d.itemsToScroll)}function ge(){_e(p.value-d.itemsToScroll)}const ee={slideTo:_e,next:we,prev:ge};s.provide("nav",ee),s.provide("isSliding",te);const ce=s.computed(()=>kke({config:d,currentSlide:p.value,slidesCount:c.value}));s.provide("slidesToScroll",ce);const X=s.computed(()=>{const W=d.dir==="rtl"?-1:1,ke=ce.value*l.value*W;return{transform:`translateX(${Z.x-ke}px)`,transition:`${te.value?d.transition:0}ms`,margin:d.wrapAround?`0 -${c.value*l.value}px`:"",width:"100%"}});function R(){F(),O(),J(),L(),se()}Object.keys(JA).forEach(W=>{["modelValue"].includes(W)||s.watch(()=>e[W],R)}),s.watch(()=>e.modelValue,W=>{W!==p.value&&_e(Number(W))}),s.watch(c,J),a("before-init"),F();const he={config:d,slidesCount:c,slideWidth:l,next:we,prev:ge,slideTo:_e,currentSlide:p,maxSlide:v,minSlide:_,middleSlide:f};i({updateBreakpointsConfigs:O,updateSlidesData:J,updateSlideWidth:L,initDefaultConfigs:F,restartCarousel:R,slideTo:_e,next:we,prev:ge,nav:ee,data:he});const be=t.default||t.slides,Me=t.addons,We=s.reactive(he);return()=>{const W=YA(be==null?void 0:be(We)),ke=(Me==null?void 0:Me(We))||[];W.forEach((Ye,Ze)=>Ye.props.index=Ze);let Se=W;if(d.wrapAround){const Ye=W.map((Bt,rt)=>s.cloneVNode(Bt,{index:-W.length+rt,isClone:!0,key:`clone-before-${rt}`})),Ze=W.map((Bt,rt)=>s.cloneVNode(Bt,{index:W.length+rt,isClone:!0,key:`clone-after-${rt}`}));Se=[...Ye,...W,...Ze]}o.value=W,c.value=Math.max(W.length,1);const Ge=s.h("ol",{class:"carousel__track",style:X.value,onMousedownCapture:d.mouseDrag?z:null,onTouchstartPassiveCapture:d.touchDrag?z:null},Se),gt=s.h("div",{class:"carousel__viewport"},Ge);return s.h("section",{ref:r,class:{carousel:!0,"is-sliding":te.value,"is-dragging":Ce.value,"is-hover":re.value,"carousel--rtl":d.dir==="rtl"},dir:d.dir,"aria-label":d.i18n.ariaGallery,tabindex:"0",onMouseenter:ve,onMouseleave:pe},[gt,ke,s.h(Nke)])}}}),QA;(function(e){e.arrowUp="arrowUp",e.arrowDown="arrowDown",e.arrowRight="arrowRight",e.arrowLeft="arrowLeft"})(QA||(QA={}));var Pke=s.defineComponent({name:"CarouselSlide",props:{index:{type:Number,default:1},isClone:{type:Boolean,default:!1}},setup(e,{slots:t}){const a=s.inject("config",s.reactive(Object.assign({},Sa))),i=s.inject("currentSlide",s.ref(0)),n=s.inject("slidesToScroll",s.ref(0)),r=s.inject("isSliding",s.ref(!1)),o=()=>e.index===i.value,l=()=>e.index===i.value-1,c=()=>e.index===i.value+1,d=()=>{const u=Math.floor(n.value),h=Math.ceil(n.value+a.itemsToShow-1);return e.index>=u&&e.index<=h};return()=>{var u;return s.h("li",{style:{width:`${100/a.itemsToShow}%`},class:{carousel__slide:!0,"carousel__slide--clone":e.isClone,"carousel__slide--visible":d(),"carousel__slide--active":o(),"carousel__slide--prev":l(),"carousel__slide--next":c(),"carousel__slide--sliding":r.value},"aria-hidden":!d()},(u=t.default)===null||u===void 0?void 0:u.call(t))}}});const Oke=(e,t)=>{const a=e.__vccOpts||e;for(const[i,n]of t)a[i]=n;return a},Bke=e=>(s.pushScopeId("data-v-dd3cbf69"),e=e(),s.popScopeId(),e),Dke={class:"gsc-carousel"},Lke={key:0},Mke=Bke(()=>s.createElementVNode("div",null,"no hay",-1)),Rke=[Mke],Fke={class:"gsc-carousel__2d__slides"},Vke={width:"9",height:"18",viewBox:"0 0 9 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Uke=["fill"],jke={width:"9",height:"18",viewBox:"0 0 9 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},zke=["fill"],Hke={class:"gsc-carousel__2d__navigation"},qke={width:"8",height:"15",viewBox:"0 0 8 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Wke=["stroke"],Gke={key:1,class:"gsc-carousel__2d__navigation__pagination"},Kke=["onClick"],Xke={width:"7",height:"15",viewBox:"0 0 7 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Jke=["stroke"],Yke={__name:"GSC-Carousel",props:{currentItemIndex:{type:Number,default:0},items:{type:Array,default:()=>[]},is3d:{type:Boolean,default:!1},isPaginationVisible:{type:Boolean,default:!1},areNavigationArrowsVisible:{type:Boolean,default:!0},defaultItemByIndex:{type:Number,default:0},defaultItemByProp:{type:Object,default:null,validator:e=>["propName","value"].every(t=>t in e)},navigationHeight:{type:Number,default:4},navigationBorderRadius:{type:Number,default:4},navigationColor:{type:String,default:"rgba(255, 255, 255, 0.4)"},navigationActiveColor:{type:String,default:"#cbee6b"},navigationActiveWidth:{type:Number,default:30},arrowsColor:{type:String,default:"#cbee6b"},wrapAround:{type:Boolean,default:!1},itemsToShow:{type:Number,default:1},isMainSlidePriority:{type:Boolean,default:!1},areSlidesArrowsVisible:{type:Boolean,default:!1},slideLeftArrowBackgroundImage:{type:String,default:"linear-gradient(to right, rgba(13, 29, 41, 1), rgba(0, 0, 0, 0))"},slideRightArrowBackgroundImage:{type:String,default:"linear-gradient(to left, rgba(13, 29, 41, 1), rgba(0, 0, 0, 0))"},areSlidesArrowsRounded:{type:Boolean,default:!1},slidesArrowsLeftAndRight:{type:String,default:"20px"},secondarySlidesOpacity:{type:Number,default:.8},marginTop:{type:String,default:"0"}},emits:["input","update:currentItemIndex"],setup(e,{expose:t,emit:a}){s.useCssVars(_=>({"0d808f0f":e.slideLeftArrowBackgroundImage,"1e0ef2e5":e.slidesArrowsLeftAndRight,"66d12b5c":e.slideRightArrowBackgroundImage,"2b22a85a":e.marginTop,"1a842b02":e.secondarySlidesOpacity}));const i=e,n=s.ref(null),r=s.ref({}),o=s.ref(0),l=s.ref(!1);s.watch(n,_=>{_&&l.value?(l.value=!1,d(i.items)):_&&_.slideTo&&_.slideTo(o.value)},{deep:!0}),s.watch(()=>i.currentItemIndex,_=>{o.value!==_&&m(_)}),s.watch(()=>i.items,_=>{n.value?d(_):l.value=!0},{immediate:!0});const c=a;function d(_){if(_&&_.length&&n.value){if(i.defaultItemByProp){const x=i.items.findIndex(B=>B[i.defaultItemByProp.propName]===i.defaultItemByProp.value);x!==-1?(o.value=x,r.value=_[x]):(o.value=0,r.value=_[0])}else o.value=i.defaultItemByIndex,r.value=_[i.defaultItemByIndex];n.value.slideTo&&n.value.slideTo(o.value),c("input",{selectedItem:r.value,selectedItemIndex:o.value})}}function u(){n.value&&n.value.next()}function h(){n.value&&n.value.prev()}function p(){n.value&&n.value.updateSlideWidth()}function m(_){n.value&&n.value.slideTo(_)}function f(_){n.value.slideTo(_)}function v(_){const x=_.slidingToIndex<0?i.items.length-1:_.slidingToIndex===i.items.length?0:_.slidingToIndex;o.value=x,r.value=i.items[x],c("update:currentItemIndex",x),c("input",{selectedItem:r.value,selectedItemIndex:o.value})}return t({prev:h,next:u,updateSlideWidth:p,slideTo:m}),(_,x)=>(s.openBlock(),s.createElementBlock("div",Dke,[i.is3d?(s.openBlock(),s.createElementBlock("div",Lke,Rke)):(s.openBlock(),s.createElementBlock("div",{key:1,class:s.normalizeClass(["gsc-carousel__2d",{"main-slide-priority":e.isMainSlidePriority}])},[s.createElementVNode("div",Fke,[s.createVNode(s.unref(Ake),{ref_key:"carousel2d",ref:n,"items-to-show":e.itemsToShow,"wrap-around":e.wrapAround,onSlideStart:v},{default:s.withCtx(()=>[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(e.items,(B,F)=>(s.openBlock(),s.createBlock(s.unref(Pke),{key:F},{default:s.withCtx(()=>[s.renderSlot(_.$slots,"default",{item:B},void 0,!0)]),_:2},1024))),128))]),_:3},8,["items-to-show","wrap-around"])]),e.areSlidesArrowsVisible?(s.openBlock(),s.createElementBlock("div",{key:0,class:"gsc-carousel__2d__arrow-left",onClick:x[0]||(x[0]=B=>n.value.prev())},[s.createElementVNode("div",{class:s.normalizeClass(["gsc-carousel__2d__slide-button",{rounded:e.areSlidesArrowsRounded}])},[(s.openBlock(),s.createElementBlock("svg",Vke,[s.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M3.10399 9L8.62342 15.4393C9.12552 16.0251 9.12552 16.9749 8.62342 17.5607C8.12132 18.1464 7.30725 18.1464 6.80514 17.5607L0.376575 10.0607C-0.125528 9.47487 -0.125528 8.52512 0.376575 7.93934L6.80515 0.439339C7.30725 -0.146447 8.12132 -0.146447 8.62342 0.43934C9.12553 1.02513 9.12553 1.97487 8.62342 2.56066L3.10399 9Z",fill:e.arrowsColor},null,8,Uke)]))],2)])):s.createCommentVNode("",!0),e.areSlidesArrowsVisible?(s.openBlock(),s.createElementBlock("div",{key:1,class:"gsc-carousel__2d__arrow-right",onClick:x[1]||(x[1]=B=>u())},[s.createElementVNode("div",{class:s.normalizeClass(["gsc-carousel__2d__slide-button",{rounded:e.areSlidesArrowsRounded}])},[(s.openBlock(),s.createElementBlock("svg",jke,[s.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M5.89601 9L0.376575 2.56066C-0.125528 1.97487 -0.125528 1.02513 0.376575 0.439339C0.878675 -0.146447 1.69275 -0.146447 2.19486 0.43934L8.62343 7.93934C9.12553 8.52513 9.12553 9.47487 8.62343 10.0607L2.19486 17.5607C1.69275 18.1464 0.878675 18.1464 0.376575 17.5607C-0.125528 16.9749 -0.125528 16.0251 0.376575 15.4393L5.89601 9Z",fill:e.arrowsColor},null,8,zke)]))],2)])):s.createCommentVNode("",!0),s.createElementVNode("div",Hke,[e.areNavigationArrowsVisible?(s.openBlock(),s.createElementBlock("div",{key:0,class:"gsc-carousel__2d__navigation__arrow-left",onClick:x[2]||(x[2]=B=>h())},[(s.openBlock(),s.createElementBlock("svg",qke,[s.createElementVNode("path",{d:"M6.72998 13.894L1.46621 8.63028C0.84457 8.00863 0.84457 6.9914 1.46621 6.36976L6.72998 1.10599",stroke:i.arrowsColor},null,8,Wke)]))])):s.createCommentVNode("",!0),e.isPaginationVisible?(s.openBlock(),s.createElementBlock("div",Gke,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(e.items,(B,F)=>(s.openBlock(),s.createElementBlock("div",{key:`i-${F}`,class:"gsc-carousel__2d__navigation__pagination__item",style:s.normalizeStyle({height:`${i.navigationHeight}px`,width:`${o.value===F?i.navigationActiveWidth:i.navigationActiveWidth/2}px`,borderRadius:`${i.navigationBorderRadius}px`,backgroundColor:`${o.value===F?i.navigationActiveColor:i.navigationColor}`,transition:"all 0.1s ease-in-out"}),onClick:O=>f(F)},null,12,Kke))),128))])):s.createCommentVNode("",!0),e.areNavigationArrowsVisible?(s.openBlock(),s.createElementBlock("div",{key:2,class:"gsc-carousel__2d__navigation__arrow-right",onClick:x[3]||(x[3]=B=>n.value.next())},[(s.openBlock(),s.createElementBlock("svg",Xke,[s.createElementVNode("path",{d:"M0.72998 1.10599L5.99375 6.36975C6.61539 6.9914 6.61539 8.00863 5.99375 8.63027L0.72998 13.894",stroke:i.arrowsColor},null,8,Jke)]))])):s.createCommentVNode("",!0)])],2))]))}},Qke=Oke(Yke,[["__scopeId","data-v-dd3cbf69"]]),Zke={class:"carousel-video-player"},$ke={class:"video-container"},eEe=["id"],tEe={__name:"CarouselVideoPlayer",props:{play:{type:Object,required:!0},videojs:{type:Function,required:!0}},emits:["play-ended"],setup(e,{emit:t}){const a=e,i=t,n=s.ref(null),r=s.computed(()=>`p-${a.play.playId}`);function o(){n.value=a.videojs(r.value,{controlBar:{fullscreenToggle:!1},playsinline:!0}),n.value.src({type:"video/mp4",src:`https://golstatsbets.blob.core.windows.net/video-player/${a.play.gameId}_1.mp4`}),n.value.offset({start:a.play.startSeconds,end:a.play.endSeconds}),n.value.on("ended",()=>{i("play-ended")}),a.play.videoPlayer=n}return s.onMounted(()=>{setTimeout(()=>{o()},10)}),(l,c)=>(s.openBlock(),s.createElementBlock("div",Zke,[s.createElementVNode("div",$ke,[s.createElementVNode("video",{id:r.value,class:"video-js",controls:"",preload:"auto","data-setup":"{}"},null,8,eEe)])]))}},aEe=bt(tEe,[["__scopeId","data-v-e4d57431"]]),iEe=e=>(s.pushScopeId("data-v-bf6136c0"),e=e(),s.popScopeId(),e),nEe=iEe(()=>s.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none"},[s.createElementVNode("path",{d:"M5 15L15 5",stroke:"white","stroke-width":"1.7","stroke-miterlimit":"10","stroke-linecap":"round","stroke-linejoin":"round"}),s.createElementVNode("path",{d:"M15 15L5 5",stroke:"white","stroke-width":"1.7","stroke-miterlimit":"10","stroke-linecap":"round","stroke-linejoin":"round"})],-1)),rEe=[nEe],sEe={class:"carousel-full-screen__carousel"},oEe={class:"carousel-full-screen__carousel__video-player"},lEe={__name:"CarouselFullScreen",props:{playerQueue:{type:Array,default:()=>[]},playlistIndex:{type:Number,default:0},initialPlay:{type:Object,default:()=>({})},videojs:{type:Function,required:!0}},emits:["close"],setup(e,{emit:t}){const a=e,i=t,n=s.ref({wrapAround:!1,itemsToShow:1.2,isMainSlidePriority:!0,areSlidesArrowsVisible:!0,areNavigationArrowsVisible:!1,slideLeftArrowBackgroundImage:"none",slideRightArrowBackgroundImage:"none"}),r=s.ref(0),o=s.ref(0),l=s.ref(null);function c(){return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}function d(){return/iPhone|iPad/i.test(navigator.userAgent)}function u(){const _=document.getElementById("carousel-swipe"),x=window.screen.orientation;x.angle==90&&c()||window.innerWidth<window.innerHeight&&c()?_.classList.remove("landscape"):(x.angle==0&&c()||window.innerWidth>window.innerHeight&&c())&&_.classList.add("landscape")}function h(){const _=document.getElementById("carousel-swipe"),x=window.screen.orientation;x.angle==90&&c()||window.innerWidth>window.innerHeight&&c()?_.classList.remove("landscape"):(x.angle==0&&c()||window.innerWidth<window.innerHeight&&c())&&_.classList.add("landscape")}function p(){const _=document.getElementById("carousel-swipe");window.innerWidth>window.innerHeight&&c()?_.classList.remove("landscape"):window.innerWidth<window.innerHeight&&c()&&_.classList.add("landscape")}function m({selectedItemIndex:_}){const x=_-r.value;o.value+=x;const B=a.playerQueue[r.value],F=a.playerQueue[_];B.videoPlayer&&B.videoPlayer.pause(),F.videoPlayer&&F.videoPlayer.play(),r.value=_}function f(){l.value&&l.value.next()}function v(){const _=a.playlistIndex+o.value;o.value=0,r.value=0,i("close",_)}return s.onMounted(()=>{d()?(window.addEventListener("resize",p),p()):(window.addEventListener("orientationchange",u),h()),setTimeout(()=>{const _=document.getElementsByClassName("video-element");_&&_.length&&Array.from(_).forEach((x,B)=>{x.id=`plyrFS${B+1}`})},100)}),s.onBeforeUnmount(()=>{d()?window.removeEventListener("resize",p):window.removeEventListener("orientationchange",u),a.playerQueue.forEach(_=>{_.videoPlayer&&(_.videoPlayer.pause(),_.videoPlayer.dispose())})}),(_,x)=>(s.openBlock(),s.createElementBlock("div",{class:s.normalizeClass(["carousel-full-screen",{landscape:c()}]),id:"carousel-swipe"},[s.createElementVNode("div",{class:"carousel-full-screen__close",onClick:v},rEe),s.createElementVNode("div",sEe,[s.createVNode(s.unref(Qke),s.mergeProps({ref_key:"gscCarousel",ref:l},n.value,{items:e.playerQueue,"default-item-by-prop":{propName:"playId",value:e.initialPlay.playId},onInput:m}),{default:s.withCtx(({item:B})=>[s.createElementVNode("div",oEe,[s.createVNode(aEe,{videojs:e.videojs,play:B,onPlayEnded:f},null,8,["videojs","play"])])]),_:1},16,["items","default-item-by-prop"])])],2))}},cEe=bt(lEe,[["__scopeId","data-v-bf6136c0"]]),dEe=Gd(),Yi=n0e();let yu=null;const _u=["goals","bestPlays"],ze={1:{name:"Oportunidad de Gol",weighing:3},2:{name:"Gol",weighing:1},3:{name:"Autogol",weighing:2},4:{name:"Tarjeta Amarilla",weighing:5},5:{name:"Tarjeta Roja",weighing:4},6:{name:"Penal Recibido",weighing:6},7:{name:"Atajada",weighing:8},8:{name:"Asistencia",weighing:9},9:{name:"Participación en Gol",weighing:14},10:{name:"Sobresaliente",weighing:20},11:{name:"Centro Rematado",weighing:11},12:{name:"Corner Rematado",weighing:12},13:{name:"Tiro Libre Rematado",weighing:13},14:{name:"1vs1 Exitoso Ofensivo",weighing:16},15:{name:"1vs1 Exitoso Defensivo",weighing:18},16:{name:"Pase Filtrado",weighing:15},17:{name:"Balón ganado en Área Propia",weighing:19},18:{name:"Balón Recuperado",weighing:17},19:{name:"Gol Recibido",weighing:7},20:{name:"Pases acertados",weighing:100},21:{name:"Balones recuperados en disputa",weighing:100},22:{name:"Asistencias",weighing:100},23:{name:"Participaciones en gol",weighing:100},24:{name:"Tiros a gol",weighing:100},25:{name:"Tiros a gol que llegaron a la portería",weighing:100},26:{name:"Cabeceos en área rival",weighing:100},27:{name:"Cabeceos en área propia",weighing:100},28:{name:"Centros",weighing:100},29:{name:"Centros acertados",weighing:100},30:{name:"1vs1 exitosos ofensivo",weighing:100},31:{name:"1vs1 exitosos ofensivo que terminaron en gol",weighing:100},32:{name:"1vs1 defensivos exitoso",weighing:100},33:{name:"Rechaces",weighing:100},34:{name:"Balones ganados en área rival",weighing:100},35:{name:"Balones ganados en área propia",weighing:100},36:{name:"Faltas cometidas",weighing:100},37:{name:"Faltas recibidas",weighing:100},38:{name:"Tarjetas amarillas",weighing:100},39:{name:"Tarjetas rojas",weighing:100},40:{name:"Atajadas",weighing:100},41:{name:"Tiros de Esquina",weighing:100,bluer:!0},42:{name:"Balones recuperados en cancha rival",weighing:100},43:{name:"Origen de gol",weighing:10}},Ef={player:{"12-55":ze[2]},gamesAndTeams:{"12-55":ze[2],"54_r-35_r":ze[3]}},Qi={games:{"607-608":ze[1],"12-55":ze[2],"54-35":ze[3],"14-52":ze[4],"15-53":ze[5],"466-477":ze[6]},team:{"607-608":ze[1],"12-55":ze[2],"54-35":ze[3],"14-52":ze[4],"15-53":ze[5],"466-477":ze[6],"40-257":ze[19],39:ze[7]},player:{regular:{12:ze[2],35:ze[3],10:ze[8],27:ze[9],607:ze[1],61:ze[43],519:ze[10],"98-101-109-112":ze[11],"121-122-127-128-135-136-141-142":ze[12],"161-170-179":ze[13],702:ze[14],730:ze[15],466:ze[6],217:ze[16],"211-232-235-239-242-282-284-289-291-296":ze[17],"485-486-487-488":ze[18],14:ze[4],15:ze[5],257:ze[19]},goalkeeper:{55:ze[2],324:ze[8],323:ze[9],608:ze[1],39:ze[7],774:ze[14],802:ze[15],52:ze[4],53:ze[5],40:ze[19],54:ze[3]}}},uEe={"2-20":ze[20],483:ze[21],10:ze[22],27:ze[23],510:ze[24],"537-540-544-547":ze[25],328:ze[26],"231-280-238-287-406-294":ze[27],"13-25":ze[28],"98-101-104-105-109-112-115-116":ze[29],4:ze[30],88:ze[31],5:ze[32],34:ze[33],11:ze[34],23:ze[35],17:ze[36],18:ze[37],14:ze[38],15:ze[39],39:ze[40],"31-32":ze[41],"225-224":ze[42]},hEe=["Ene","Feb","Mar","Abr","May","Jun","Jul","Ago","Sep","Oct","Nov","Dic"],pEe=1,c1={components:{CarouselFullScreen:cEe,SearchFilters:wke,VideoSearch:awe,VideoPlayerControls:Tde,VideoPlayer:rue,CurrentMatch:coe,MatchesList:hoe,GSCPlayerTeamGame:pde,GscSwitchComponent:AE},props:{section:{type:Boolean,default:!0},componentWidth:{type:Number,default:767,validator(e){return e>0}},backgroundColor:{type:String,default:"#172531"},user:{type:Object,default:()=>({})},token:{type:String,default:""},isGSUser:{type:Boolean,default:!0},tournamentSelectedId:{type:Number,default:0},seasonSelectedId:{type:Number,default:0},tournamentsForMediaPlayer:{type:[Map],default:()=>new Map},isFromMexico:{type:Boolean,default:!0},gsData:{type:[Object,null],default:null},isFirstRow:{type:Boolean,default:!1},custom:{type:[Object,null],default:null},autoFillVideos:{type:Boolean,default:!1},isPlayerUser:{type:Boolean,default:!1},isGoalkeeper:{type:[Boolean,Number],default:!1},playerId:{type:Number,default:0},isModalMode:{type:Boolean,default:!0},modalInitialData:{type:Object,default:null},isModal:{type:Boolean,default:!1},isGoalsOnly:{type:Boolean,default:!1}},data(){return{videojsLocal:null,player:null,lastSearchResult:null,mobileClass:!1,currentMobileTab:"Estás viendo",currentTabMoreVideos:"Resumen",booleanIsFirstIteration:!0,numberCurrentSeasonId:0,numberLastActionId:0,numberPlayerSpeed:1,numberOptionsMenuTop:0,numberOptionsMenuLeft:0,booleanIsVideoPlayerPlaying:!1,booleanIsOptionsMenuVisible:!1,booleanIsSpeedModalVisible:!1,showModalConfirm:!1,showConfirmPlaylist:!0,showModal:!1,seasonId:0,plays:[],playerQueue:[],playsType:_u[0],playsTypeOptions:_u,playInfo:{},teamsMap:new Map,gamesMap:new Map,roundsMap:new Map,mediaPlayerMode:"games",playerPosition:0,playlistTournament:null,showImage:!1,seasonName:"",playlistSeasonIndex:0,playlistSeasonIndexAux:0,playerModeSelected:1,currentTournament:{seasons:[]},mediaPlayerResizeObserver:null,mediaPlayerWidth:0,lastMediaPlayerWidth:0,selectedType:1,roundsAndGamesWithPlaysMap:null,gameIdSelected:0,seasonSearchingCount:0,hasPlayerActivityInTournament:!1,isAutoPlay:!1,storeModule:this.isModalMode?"mediaModal":"mediaGeneral",isFirstTypeChange:!0,rivalCategories:[],counterAux:0,useIdsFromAdvancedFilter:!1,maxGameId:0,tournamentsForModalLauncher:new Map,lastGameIdWatched:0,isSomeListSelected:!1,booleanIsModesModalOpen:!1,arrayCategoriesIdsToFilter:null,arrayRivalCategoriesIdsToFilter:null,arrayCategoriesIdsRaw:null,booleanIsFilterApplied:!1,stringModeTitle:"Estas viendo: Goles de la jornada",objectMediaPlayerModeFilters:this.getEmptyMediaPlayerModeFilters(),playSeekerPlays:[],geoOptions:{enableHighAccuracy:!0,timeout:5e3,maximumAge:0},coords:null,concatPlays:!1,currentPlayIndex:0,firstInteractionToken:"",firstInteractionUrl:"https://playseeker-api-fi.golstats.com",userBehaviorUrl:"https://playseeker-api-ub.golstats.com",gamesUrl:"https://qyyibs1w0d.execute-api.us-west-2.amazonaws.com/prod/calendar/gamesBySeason?",booleanIsPlaySeekerMode:!1,objectLastDataToFilter:null,objectPlaySeekerLastPlay:null,objectPlaySync:null,isCarouselFullScreenVisible:!1}},computed:{...cC("mediaModal",["currentPlaylistPlays","modalSectionSelected","isModalOpen","playlistGameId"]),...cC("mediaGeneral",["playersMapMyPlaylists","teamsMapMyPlaylists","gamesMapMyPlaylists","maxGameIdMyPlaylists","player","mapMinutesPlayedCategoryNames","playSeekerUserId","playSeekerCurrentSessionId"]),...uC("mediaModal",["currentPlayerQueueByGames"]),...uC("mediaGeneral",["userPlaylistsSeasonIds"]),currentMatch(){return this.currentPlayerQueueByGames&&this.currentPlayerQueueByGames.length&&this.playlistGameId?this.currentPlayerQueueByGames.find(e=>e.id===this.playlistGameId):null},dynamicClasses(){let e=[];return this.isModal&&e.push("modal-class"),this.mediaPlayerWidth>0&&(this.mediaPlayerWidth<=420?e.push("modal-video__420"):this.mediaPlayerWidth<=750?e.push("modal-video__750"):this.mediaPlayerWidth<=850?e.push("modal-video__850"):this.mediaPlayerWidth<=1024?e.push("modal-video__1024"):this.mediaPlayerWidth<=1100?e.push("modal-video__1100"):this.mediaPlayerWidth<=1280?e.push("modal-video__1280"):this.mediaPlayerWidth<=1520&&e.push("modal-video__1520")),e},carouselPlayerQueue(){return this.playerQueue?this.playerQueue.filter(e=>e.gameId===this.currentMatch.id):[]},mediaPlayerType(){return"general"},extraCategories(){return[...K1e,...X1e,...tSe,...nSe,...lSe,...hSe,...gSe,...Z1e].reduce((e,t)=>(t.categories.forEach(a=>{e.set(a,{id:a,name:this.$t&&t.translationKey&&this.$t(t.translationKey)||t.singleName})}),e),new Map)},isMyPlaylistsActive(){return this.isModalMode&&this.modalSectionSelected===2&&this.isSomeListSelected},modalInitialState(){return this.isModalMode?this.$store.state.mediaModal.modalInitialState:{}},modalSectionSelected(){return this.isModalMode?this.$store.state.mediaModal.modalSectionSelected:{}},playerType(){return this.isModalMode?this.$store.state.mediaModal.playerType:0},advancedFilter(){return this.isModalMode?this.$store.state.mediaModal.advancedFilter:{}},applyAdvancedFilterCounter(){return this.isModalMode?this.$store.state.mediaModal.applyAdvancedFilterCounter:0},selectedSubcategoryIds(){return this.isModalMode?this.$store.state.mediaModal.selectedSubcategoryIds:[]},getSeasonIdOnly(){return this.$store.getters[`${this.storeModule}/getSeasonIdOnly`]},getTeamId(){return this.$store.getters[`${this.storeModule}/getTeamId`]},getPlayerId(){return this.$store.getters[`${this.storeModule}/getPlayerId`]},seasonPlayers(){return this.$store.getters[`${this.storeModule}/seasonPlayers`]},selectedTournament(){return this.$store.getters[`${this.storeModule}/selectedTournament`]},isPlayerGoalkeeper(){return this.$store.getters[`${this.storeModule}/isPlayerGoalkeeper`]},hasPlayerPositionId(){return this.$store.getters[`${this.storeModule}/hasPlayerPositionId`]},playersByTeam(){return this.$store.getters[`${this.storeModule}/playersByTeam`]},tournaments(){return this.$store.state[`${this.storeModule}`].tournaments},seasonID(){return this.$store.state[`${this.storeModule}`].seasonID},playlistIndex(){return this.$store.state[`${this.storeModule}`].playlistIndex},retroSeason(){return this.$store.state[`${this.storeModule}`].retroSeason},objectMediaData(){return this.$store.state[`${this.storeModule}`].objectMediaData},playsSaved(){return this.$store.getters["mediaGeneral/playsSaved"]},summaryData(){return null},isSummaryData(){return!!this.summaryData},profilesSeasonId(){return this.isModalMode?0:this.$store.getters["filterGeneral/getSeasonId"]},currentCategories(){return this.isModalMode?this.modalSectionSelected===1?this.isGoalsOnly?Object.keys(Ef.gamesAndTeams).reduce((e,t)=>(t.split("-").forEach(a=>{e.push(a)}),e),[]):this.modalInitialState?this.modalInitialState.categoryIds&&this.modalInitialState.categoryIds.length?this.modalInitialState.categoryIds:this.getBestCategoriesIds():[]:this.useIdsFromAdvancedFilter?this.selectedSubcategoryIds:this.modalInitialState?this.modalInitialState.categoryIds:[]:this.summaryData?Object.keys(this.summaryData.isTeam?Ef.gamesAndTeams:this.summaryData.positionId===1?Qi.player.goalkeeper:Qi.player.regular).reduce((e,t)=>(t.split("-").forEach(a=>{e.push(a)}),e),[]):Object.keys(this.user&&this.user.is_player&&this.hasUserPlayerSelectedSeason?this.user.is_goalkeeper?Qi.player.goalkeeper:Qi.player.regular:Ef.gamesAndTeams).reduce((e,t)=>(t.split("-").forEach(a=>{e.push(a)}),e),[])},allCategories(){const e=new Map,t={...Ef.gamesAndTeams,...uEe};return Object.entries(t).forEach(([a,i])=>{a.split("-").forEach(n=>{e.set(n.includes("_r")?n:Number(n),i)})}),this.setBestCategoriesNames(e),e},queryCategories(){let e="";const t=[];return this.currentCategories.forEach((a,i)=>{let n=typeof a=="string"?a:a.toString(),r=!1;n.includes("_")&&(r=!0,n=Number(n.split("_")[0]),t.push(n)),e+=`${i>0?"&":""}${r?"r":""}categories=${n}`}),this.setRivalCategories(t),e},gamesByRound(){const e={};if(this.roundsAndGamesWithPlaysMap)for(const[t,a]of this.roundsAndGamesWithPlaysMap){const[i,n]=t.split(","),r=Array.from(a.values());r.sort((o,l)=>l.dateTimeMillis-o.dateTimeMillis),e[n]={name:i,games:r}}return e},teams(){return this.teamsMap?Array.from(this.teamsMap.values()):[]},isGoalsActive(){return this.playsType===_u[0]},headerResponsiveClass(){const e=[];return this.mediaPlayerWidth<354?e.push("header--width-354"):this.mediaPlayerWidth<440?e.push("header--width-400"):this.mediaPlayerWidth<541?e.push("header--width-540"):this.mediaPlayerWidth<626?e.push("header--width-626"):this.isFirstRow&&this.mediaPlayerWidth<610&&e.push("header--first-row"),e},playInfoStyle(){return!this.gsData&&this.mediaPlayerWidth<871?{padding:"0 0.5em"}:this.isFirstRow?{"margin-top":"0.3em"}:{}},headerIcon(){return this.custom!=null&&Object.keys(this.custom).length?this.custom.logo:"https://az755631.vo.msecnd.net/content/shieldLogoPc.png"},isUserTournament(){return this.gsData&&this.gsData.tournamentId===this.currentTournament._id},hasUserPlayerSelectedSeason(){return this.user.is_player?this.user.related_seasons.includes(this.numberCurrentSeasonId||this.seasonSelectedId):!1},hasUserTeamSelectedTournament(){return!this.user.is_player&&this.user.team?this.user.related_seasons.includes(this.numberCurrentSeasonId||this.seasonSelectedId):!1}},watch:{isModalOpen(e){e||this.applyObjectMediaData()},seasonSelected(){this.setInitialTitle()},tournamentSelectedId(){this.setInitialTitle()},seasonSelectedId:{handler(e){this.setUpData(e)},immediate:!0},selectedTournament:{deep:!0,handler(e){e&&(this.playlistTournament=e,this.playlistSeasonIndex=0)}},seasonID:{deep:!0,handler(e){e&&(this.playlistSeasonIndexAux=e.index)}},playsType(e){this.isModalMode||this.setPlaysType({mediaPlayerType:this.mediaPlayerType,playsType:e}),this.fetchInfo(!0,this.playlistTournament)},modalSectionSelected(e){e!==1&&(this.isSomeListSelected=!1),[0,1].includes(e)&&(this.playsType!==_u[e]?this.playsType=_u[e]:this.fetchInfo(!0,this.playlistTournament)),this.modalInitialState&&this.modalInitialState.mainSectionType-1===this.modalSectionSelected&&this.checkSeason()},selectedSubcategoryIds(e){e&&e.length&&this.applyAdvancedFilter()},seasonPlayers(e){if(this.getPlayerId&&!this.hasPlayerPositionId){const t=e.get(this.getPlayerId);t&&this.$store.commit(`${this.storeModule}/setPlayer`,t)}},profilesSeasonId:{handler(e){this.setUpData(e)}},tournamentsForMediaPlayer(e){this.seasonSelectedId&&e.size>0&&!this.isModalMode&&this.setUpData(this.seasonSelectedId)},currentPlaylistPlays(e){this.isModalMode&&this.modalSectionSelected===2&&this.setPlaylistPlays(e)},userPlaylistsSeasonIds(e){this.fillMyPlaylistsData(Array.from(e.values()))},seasonId:{immediate:!0,handler(e){this.isModalMode||this.setSeasonId({mediaPlayerType:this.mediaPlayerType,seasonId:e})}},currentCategories:{immediate:!0,handler(e){this.isModalMode||this.setCurrentCategories({mediaPlayerType:this.mediaPlayerType,currentCategories:e})}},selectedType:{immediate:!0,handler(e){this.isModalMode||this.setSelectedType({mediaPlayerType:this.mediaPlayerType,selectedType:e})}},getTeamId:{immediate:!0,handler(e){this.isModalMode||this.setTeamId({mediaPlayerType:this.mediaPlayerType,teamId:e})}},player:{immediate:!0,handler(e){this.isModalMode||this.setModalPlayer({mediaPlayerType:this.mediaPlayerType,player:e})}}},methods:{...dC("mediaModal",["setPlaylistGameId","setPlayerType","setModalInitialState","setIsModalOpen","setIsModalCreatePlayListOpen"]),...dC("mediaGeneral",["setPlayersMapMyPlaylists","setTeamsMapMyPlaylists","setGamesMapMyPlaylists","setMaxGameIdMyPlaylists","setSeasonId","setPlaysType","setCurrentCategories","setSelectedType","setTournamentsForModalLauncher","setTeamId","setModalPlayer","setPlaysToSaveAsFavorites","setPlaySeekerUserId","setPlaySeekerCurrentSessionId"]),applyObjectMediaData(){!this.objectMediaData||this.objectMediaData.booleanAvoidApply||(this.objectMediaData.numberMainSectionType&&this.$store.commit("mediaModal/setModalSectionSelected",this.objectMediaData.numberMainSectionType),this.objectPlaySync=this.objectMediaData.objectPlaySync?{...this.objectMediaData.objectPlaySync,booleanIsApplied:!1}:null,this.stringModeTitle=this.objectMediaData.stringModeTitle,this.playerQueue=[...this.objectMediaData.arrayPlayerQueue],this.$store.commit(`${this.storeModule}/setPlaylistIndex`,{mediaPlayerType:this.isModalMode?null:this.mediaPlayerType,playlistIndex:this.objectMediaData.numberPlaylistIndex}),this.$store.commit(`${this.storeModule}/setCurrentPlayerQueue`,this.playerQueue),this.playlistSeasonIndex=this.objectMediaData.numberPlaylistSeasonIndex,this.booleanIsPlaySeekerMode=this.objectMediaData.booleanIsPlaySeekerMode,this.booleanIsFilterApplied=this.objectMediaData.booleanIsFilterApplied,this.objectMediaData.objectLastDataToFilter&&this.fillDataToFilterData(this.objectMediaData.objectLastDataToFilter))},setPlaylistPlays(e){const t=this.getFormattedPlays(e,!0);this.generatePlayerQueue(null,t,!0)},applyAdvancedFilter(){this.useIdsFromAdvancedFilter=!0,this.fetchInfo(!0,this.playlistTournament)},setRivalCategories(e){this.rivalCategories=e},setUpData(e,t=!1){if(!this.isFromMexico&&!this.isGSUser){this.$emit("finish");return}let a=!1;const i=this.tournamentsForMediaPlayer;e||(a=!0,e=this.seasonSelectedId);const n=Number(e);let r=i.get(n);if(this.tournamentsForModalLauncher=i,this.isModalMode||this.setTournamentsForModalLauncher({mediaPlayerType:this.mediaPlayerType,tournamentsForModalLauncher:i}),!r&&this.isModalMode&&this.modalInitialState&&this.modalInitialState.tournamentsLastClashes&&(r=this.modalInitialState.tournamentsLastClashes.get(e)),this.playlistTournament=r,r){if(this.summaryData&&(this.stringModeTitle=this.summaryData.isTeam?"Estas viendo: Resumen equipo":"Estas viendo: Resumen jugador"),this.playlistSeasonIndex=r.seasons.findIndex(o=>o.id===n),this.playlistSeasonIndexAux=this.playlistSeasonIndex,!t&&!this.summaryData)if(this.isPlayerUser){if(this.hasPlayerActivityInTournament=!!this.getPlayerTournamentBySelectedSeason(n,i),this.hasPlayerActivityInTournament){const o={id:Number(this.user.player)};this.isGoalkeeper&&(o.positionId=1),this.seasonSearchingCount=0,this.$store.commit(`${this.storeModule}/setPlayer`,o),this.$store.commit(`${this.storeModule}/setTeam`,this.gsData.teamId),this.onPlayerSelected();return}!this.hasPlayerActivityInTournament&&this.selectedType!==1&&(this.$store.commit(`${this.storeModule}/setPlayer`,null),this.$store.commit(`${this.storeModule}/setTeam`,null))}else if(this.gsData&&this.gsData.tournamentId===this.playlistTournament._id&&this.gsData.teamId){this.seasonSearchingCount=0,this.$store.commit(`${this.storeModule}/setPlayer`,null),this.$store.commit(`${this.storeModule}/setTeam`,this.gsData.teamId),this.onTeamSelected();return}else this.seasonSearchingCount=0,this.$store.commit(`${this.storeModule}/setPlayer`,null),this.$store.commit(`${this.storeModule}/setTeam`,null);this.fillSeasons([r],a)}},setInitialTitle(){!this.summaryData&&!this.booleanIsFilterApplied&&this.hasUserPlayerSelectedSeason?this.stringModeTitle="Estas viendo: Resumen de jugador":!this.summaryData&&!this.booleanIsFilterApplied&&this.hasUserTeamSelectedTournament?this.stringModeTitle="Estas viendo: Resumen de equipo":this.stringModeTitle="Estas viendo: Goles de la jornada"},closeModalConfirm(){this.showModalConfirm=!1},onModalSpeedClose(){this.booleanIsSpeedModalVisible=!1},onClickSpeed(e){this.numberPlayerSpeed=e,this.$refs.videoPlayer.setSpeedToAllPlayers(e),this.booleanIsSpeedModalVisible=!1},confirmModalConfirm(){this.showModalConfirm=!1,this.$refs.videoPlayer.playCurrentVideoPlayer()},openmodal(){this.$refs.videoPlayer.setAutoPlaysCount(0),this.showModal=!0},closeModal(){this.showModal=!1},getBestCategoriesIds(){let e=null;return this.mediaPlayerMode==="player"?this.isPlayerGoalkeeper?e=Object.keys(Qi.player.goalkeeper):e=Object.keys(Qi.player.regular):e=Object.keys(Qi[this.mediaPlayerMode]),e.reduce((t,a)=>(a.split("-").forEach(i=>{t.push(i)}),t),[])},setBestCategoriesNames(e){[...Object.entries(Qi.player.goalkeeper),...Object.entries(Qi.player.regular),...Object.entries(Qi[this.mediaPlayerMode])].forEach(([t,a])=>{t.split("-").forEach(i=>{e.set(Number(i),a)})})},onPlaysTypeClicked(e){this.playsType=e},getPlayTime(e,t){let a="",i=0;switch(e.matchLapse){case 1:a=e.syncStartFirstTime;break;case 2:a=e.syncStartSecondTime,i=45;break;case 3:a=e.syncStartFirstExtraTime,i=90;break;case 4:a=e.syncStartSecondExtraTime,i=105;break;case 5:a=e.syncStartPenals,i=120;break}return(!a||a==="0")&&(a="00:00"),this.getTimeToSeconds(a)+(this.getTimeToSeconds(e[t])-i*60)},getTimeToSeconds(e){const t=e.indexOf(".")>-1?e.substring(0,e.indexOf(".")):e,[a,i,n]=t.split(":").reverse();return(n?Number(n)*60*60:0)+Number(i)*60+Number(a)},getFormattedPlays(e,t=!1,a=null){this.roundsAndGamesWithPlaysMap=new Map,yu=new Map,e.forEach(n=>{const r=n.reduce((u,h,p)=>(u[dEe[p]]=h,u),{});r.playRaw=n;let o=null,l=null,c=null,d=0;if(t?(c=this.teamsMapMyPlaylists,d=this.maxGameIdMyPlaylists,o=this.gamesMapMyPlaylists.get(r.gameId),l=this.playersMapMyPlaylists.get(r.playerId),r.booleanIsFromMyPlaylists=!0):(c=a?a.mapTeams:this.teamsMap,d=a?a.maxGameId:this.maxGameId,o=a?a.mapGames.get(r.gameId):this.gamesMap.get(r.gameId),l=a?a.mapPlayers.get(r.playerId):this.seasonPlayers.get(r.playerId)),l&&o&&r.gameId<=d){const u=`${o.roundName},${o.roundAbbreviation},${o.seasonId}`,h=this.roundsAndGamesWithPlaysMap.get(u);h?h.set(o.id,o):this.roundsAndGamesWithPlaysMap.set(u,new Map().set(o.id,o)),r.game=o,r.game.awayTeam.id===r.teamId?(r.teamName=r.game.awayTeam.name,r.teamAcronym=r.game.awayTeam.acronym,r.rivalName=r.game.homeTeam.name):(r.teamName=r.game.homeTeam.name,r.teamAcronym=r.game.homeTeam.acronym,r.rivalName=r.game.awayTeam.name),r.playingAs=r.teamId===r.game.homeTeam.id?1:2,r.player=l,r.playerTeamLogo=c.get(r.player.teamId).logo,r.rivalTeamLogo=c.get(r.player.teamId===r.game.homeTeam.id?r.game.awayTeam.id:r.game.homeTeam.id).logo,r.startSeconds=this.getPlayTime(r,"startTime"),r.endSeconds=this.getPlayTime(r,"endTime");const p=new Date(r.gameDate),[m,f]=r.gameHour.split(":");p.setHours(m),p.setMinutes(f),r.dateTimeMillis=p.valueOf(),yu.has(r.gameId)?yu.get(r.gameId).plays.push(r):yu.set(r.gameId,{dateTimeMillis:p.valueOf(),plays:[r]})}});const i=Array.from(yu.values());return i.sort((n,r)=>r.dateTimeMillis-n.dateTimeMillis),i.reduce((n,r)=>(r.plays.sort((o,l)=>+`${o.matchLapse}${o.startTime.replace(/:*\.*/g,"")}`-+`${l.matchLapse}${l.startTime.replace(/:*\.*/g,"")}`),n.push(...r.plays),n),[])},generatePlayerQueue(e,t,a=!1,i=-1,n){if(!t.length)return;const r=new Map,o=this.modalInitialState?this.modalInitialState.advancedFilter||{}:{};o&&o.fieldSections&&(o.fieldSectors=o.fieldSections.map(d=>Ji[`${d}`]));let l=0,c=0;if(this.playerQueue=t.reduce((d,u)=>{const h=`${u.gameId}-${u.playerId}-${u.startTime}`;let p=!1;if(this.modalInitialState&&this.modalInitialState.playsIds)p=!this.modalInitialState.playsIds.has(u.playId);else if(this.lastSearchResult)this.lastSearchResult.team&&(p=u.game.homeTeam.id!==this.lastSearchResult.team.id&&u.game.awayTeam.id!==this.lastSearchResult.team.id),!p&&this.lastSearchResult.game&&(p=u.gameId!==this.lastSearchResult.game.id),!p&&this.lastSearchResult.player&&(p=u.playerId!==this.lastSearchResult.player.id);else if(this.isModalMode&&!a&&!n){this.modalInitialState.lastClashesGameId&&(p=u.gameId!==this.modalInitialState.lastClashesGameId);const v=this.getTeamId||this.modalInitialState.teamId;if(v&&(p=u.game.homeTeam.id!==v&&u.game.awayTeam.id!==v),!p&&this.selectedType===2&&(p=(this.modalInitialState&&this.modalInitialState.playerIds?this.modalInitialState.playerIds[0]:this.getPlayerId)!==u.playerId),!p&&o&&(o.playingAs&&o.playingAs.length&&(p=o.requiresRivalTransform&&o.playingAs.length===1&&u.teamId!==v?o.playingAs.includes(u.playingAs):!o.playingAs.includes(u.playingAs)),!p&&o.timeSections&&o.timeSections.length&&(p=!o.timeSections.includes(u.section)),!p&&o.coordinatePoint&&o.fieldSectors)){const _=bl(u[`x${o.coordinatePoint}`],u[`y${o.coordinatePoint}`])+1;p=!o.fieldSectors.includes(_)}if(!p&&v&&this.modalInitialState.matchResult&&this.modalInitialState.matchResult.length){const _=u.game.gameResult===3?3:u.game.gameResult===1&&v===u.game.homeTeam.id||u.game.gameResult===2&&v===u.game.awayTeam.id?1:2;p=!this.modalInitialState.matchResult.includes(_)}}const m=this.lastSearchResult?this.lastSearchResult.categoryIds:this.arrayCategoriesIdsToFilter||e,f=this.arrayRivalCategoriesIdsToFilter||this.rivalCategories;if(a||(n||!p)&&(m.includes(u.categoryId)||f.includes(u.categoryId)&&(this.booleanIsFilterApplied||!this.getTeamId||u.rivalTeamId===this.getTeamId))&&u.startSeconds!==u.endSeconds){const v=r.get(h);let _=this.modalInitialState&&this.modalInitialState.mainSectionType===this.modalSectionSelected+1&&this.modalInitialState.categorySingleName&&!this.modalInitialState.avoidCategorySingleName&&![35,54].includes(u.categoryId)?{name:this.modalInitialState.categorySingleName}:this.allCategories.get(u.categoryId)||this.allCategories.get(`${u.categoryId}_r`)||this.extraCategories.get(u.categoryId)||this.extraCategories.get(`${u.categoryId}_r`);this.modalInitialState&&this.modalInitialState.avoidCategorySingleName?_={name:this.modalInitialState.categorySingleName,weighing:1}:this.isModalMode&&u.categoryId===33&&(_={name:"Fuera de lugar",weighing:1});let x="";_||(x=this.mapMinutesPlayedCategoryNames.get(u.categoryId),x?_={name:x,weighing:1}:!_&&o&&(_={name:o.playListTitle,weighing:100})),_||(_=this.allCategories.get(u.categoryId)||this.allCategories.get(`${u.categoryId}_r`)||this.extraCategories.get(u.categoryId)||this.extraCategories.get(`${u.categoryId}_r`)),c||(this.lastGameIdWatched===u.gameId&&(c=l),l++),v?(_.weighing<v.mainCategory.weighing&&(v.mainCategory=_),v.categoriesNames.add(_.name)):(u.isSaved=this.playsSaved.has(u.playId),u.mainCategory=_,u.categoriesNames=new Set,u.categoriesNames.add(_.name),r.set(h,u),d.push(u))}return d},[]),this.showImage=!1,this.isModalMode){if(a)this.$store.commit("mediaModal/setPlaylistIndex",{mediaPlayerType:this.isModalMode?null:this.mediaPlayerType,playlistIndex:0});else{if(this.modalInitialState&&this.modalInitialState.playData){const d=this.playerQueue.findIndex(u=>u.playId===this.modalInitialState.playData.playId);d!==-1&&this.$store.commit("mediaModal/setPlaylistIndex",{mediaPlayerType:this.isModalMode?null:this.mediaPlayerType,playlistIndex:d})}if(this.playerQueue.length)if(n&&this.objectMediaPlayerModeFilters.objectGameSelected){const d=this.playerQueue.findIndex(u=>this.objectMediaPlayerModeFilters.objectGameSelected.game_id===u.game.id);d!==-1&&this.$store.commit("mediaModal/setPlaylistIndex",{mediaPlayerType:this.isModalMode?null:this.mediaPlayerType,playlistIndex:d})}else if(this.modalInitialState&&!this.modalInitialState.lastClashesGameId&&this.modalInitialState.gameIds&&this.selectedType===1){const d=this.playerQueue.findIndex(u=>this.modalInitialState.gameIds.includes(u.game.id));d!==-1?this.$store.commit("mediaModal/setPlaylistIndex",{mediaPlayerType:this.isModalMode?null:this.mediaPlayerType,playlistIndex:d}):this.playerQueue=[]}else this.modalInitialState&&this.modalInitialState.currentPlayIndex?this.$store.commit("mediaModal/setPlaylistIndex",{mediaPlayerType:this.isModalMode?null:this.mediaPlayerType,playlistIndex:this.modalInitialState.currentPlayIndex}):i>-1&&this.$store.commit("mediaModal/setPlaylistIndex",{mediaPlayerType:this.isModalMode?null:this.mediaPlayerType,playlistIndex:i})}this.$store.commit(`${this.storeModule}/setCurrentPlayerQueue`,this.playerQueue)}else if(n&&this.objectMediaPlayerModeFilters.objectGameSelected){const d=this.playerQueue.findIndex(u=>this.objectMediaPlayerModeFilters.objectGameSelected.game_id===u.game.id);d!==-1&&this.$store.commit("mediaGeneral/setPlaylistIndex",{mediaPlayerType:this.isModalMode?null:this.mediaPlayerType,playlistIndex:d})}else i>-1?this.$store.commit("mediaGeneral/setPlaylistIndex",{mediaPlayerType:this.isModalMode?null:this.mediaPlayerType,playlistIndex:i}):this.selectedType===1&&c&&this.$store.commit("mediaGeneral/setPlaylistIndex",{mediaPlayerType:this.isModalMode?null:this.mediaPlayerType,playlistIndex:c});this.playerQueue.length||this.emptyListDecision(),this.booleanIsFirstIteration&&(this.booleanIsFirstIteration=!1,this.$emit("finish"))},emptyListDecision(){this.summaryData&&this.summaryData.isTeam&&this.playsType===this.playsTypeOptions[0]?this.playsType=this.playsTypeOptions[1]:!this.summaryData&&!this.isModalMode&&this.onTypeChanged(1)},getGeneralName(e){return e.split(" ").reduce((t,a,i)=>{if(i===0)if(a.includes("."))t.push(a);else{const n=a.toLowerCase().split("");n[0]=n[0].toUpperCase(),t.push(n.join(""))}else t.push(a.toLowerCase());return t},[]).join(" ")},getSingleName(e){return e.split(" ").reduce((t,a)=>{let i=a;return a.endsWith("ciones")?i=a.replace("ciones","ción"):a.endsWith("nales")?i=a.replace("nales","nal"):a.endsWith("vocan")?i=a.replace("vocan","voca"):a.endsWith("lones")?i=a.replace("lones","lón"):a.endsWith("oles")?i=a.replace("oles","ol"):(a.endsWith("os")||a.endsWith("as")||a.endsWith("es"))&&(i=a.slice(0,a.length-1)),t.push(i),t},[]).join(" ")},getCategoryFormat(e=""){const t=this.getGeneralName(e);return this.getSingleName(t)},getPlayerTournamentBySelectedSeason(e,t){const a=this.user.related_seasons.reduce((n,r)=>{const o=t.get(r);return o&&n.push(o._id),n},[]),i=t.get(e);return a.includes(i._id)?i:null},changeTournament(e){},changeSeason(e){},getFilteredPlays(e){return e.reduce((t,a)=>{if(this.objectMediaPlayerModeFilters.objectFilters.numberActionId>1){let i=!0;if(i&&this.objectMediaPlayerModeFilters.objectFilters.objectAdvancedFilters.arrayPlayingAs&&([3,4].includes(this.actionId)?i=!(this.objectMediaPlayerModeFilters.objectFilters.objectAdvancedFilters.booleanRequiresRivalTransform&&this.objectMediaPlayerModeFilters.objectFilters.objectAdvancedFilters.arrayPlayingAs.length===1?a.teamId!==this.objectMediaPlayerModeFilters.objectFilters.objectAdvancedFilters.numberTeamId?this.objectMediaPlayerModeFilters.objectFilters.objectAdvancedFilters.arrayPlayingAs.includes(a.playingAs):!this.objectMediaPlayerModeFilters.objectFilters.objectAdvancedFilters.arrayPlayingAs.includes(a.playingAs):!this.objectMediaPlayerModeFilters.objectFilters.objectAdvancedFilters.arrayPlayingAs.includes(a.playingAs)):i=this.objectMediaPlayerModeFilters.objectFilters.objectAdvancedFilters.arrayPlayingAs.includes(a.playingAs)),i&&this.objectMediaPlayerModeFilters.objectFilters.objectAdvancedFilters.arrayTimeSections&&(i=this.objectMediaPlayerModeFilters.objectFilters.objectAdvancedFilters.arrayTimeSections.includes(a.section)),i&&this.objectMediaPlayerModeFilters.objectFilters.objectAdvancedFilters.coordinatePoint&&this.objectMediaPlayerModeFilters.objectFilters.objectAdvancedFilters.arrayFieldSections){const n=`${bl(a[`x${this.objectMediaPlayerModeFilters.objectFilters.objectAdvancedFilters.coordinatePoint}`],a[`y${this.objectMediaPlayerModeFilters.objectFilters.objectAdvancedFilters.coordinatePoint}`])+1}`,r=Ji[n],o=this.objectMediaPlayerModeFilters.objectFilters.objectAdvancedFilters.requiresRivalTransform&&this.objectMediaPlayerModeFilters.objectFilters.objectAdvancedFilters.arraySelectedSubcategoryIds.includes(`${a.categoryId}_r`)?Ji[`${gu[n]}`]:r;i=!!this.objectMediaPlayerModeFilters.objectFilters.objectAdvancedFilters.arrayFieldSections.find(l=>l.num===o&&l.status)}i&&t.push(a)}else t.push(a);return t},[])},async fillSeasonPlayers(e){try{const t=await this.$store.dispatch("mediaGeneral/getPlayersBySeasons",{seasonId:e.id,returnData:!0});e.mapPlayers=new Map,e.mapPlayersByTeam=t.reduce((a,i)=>{e.mapPlayers.set(i.player_id,{id:i.player_id,name:i.player_name,shortName:i.shortName,photo:i.player_photo,teamId:i.team_id,positionId:i.position_id});const n=a.get(i.team_id);return n?n.push(i):a.set(i.team_id,[i]),a},new Map)}catch(t){throw new Error(t)}},async fillMatchDaysAndGamesV2(e){try{const{seasonsAndGames:t,seasonsAndTeams:a}=await this.fetchSeasonsGamesAndTeamsV2([e.id,...e.related_seasons.map(o=>o.id)],3),i=a.find(o=>o._id===e.id);e.arrayTeams=[],e.mapTeams=new Map;const n=i.teams.reduce((o,l)=>(e.arrayTeams.push(l),e.mapTeams.set(l.team_id,{name:l.colloquial_name,acronym:l.acronym,logo:l.logo,id:l.team_id}),o.set(l.team_id,l),o),new Map);e.mapGames=new Map,e.mapGamesByTeam=new Map;const r=Array.from(t.reduce((o,l)=>(l.games.forEach(c=>{if(c.game_status===1&&c.has_video){(!e.maxGameId||c.game_id>e.maxGameId)&&(e.maxGameId=c.game_id);let d=c.matchday_abbreviation.replace("M","J"),u=c.matchday_abbreviation.replace("M","Jornada ");const h=c.matchday_abbreviation.replace("M","");l.season_type===0?this.objectMediaPlayerModeFilters.objectTournamentSelected.id===33&&(c.seasonId===881?(d=y6[h]||d,u=g6[h]||u):(d=Em[c.matchday_abbreviation]?c.matchday_abbreviation:d,u=Em[c.matchday_abbreviation]||u,d==="FINAL"&&(d="F"))):l.season_type===1?(d=f6[c.matchday_abbreviation],u=d):c.matchday_id===182?(d="PI1",u="Play In 1"):c.matchday_id===183?(d="PI2",u="Play In 2"):(d=c.matchday_abbreviation.replace("PO","R"),u="Repechaje"),c.roundAbbreviation=d,c.roundName=u,e.mapGames.set(c.game_id,{id:c.game_id,date:c.date,dateTimeMillis:new Date(c.date_time_utc).valueOf(),homeTeam:e.mapTeams.get(c.home_team),awayTeam:e.mapTeams.get(c.visiting_team),roundAbbreviation:c.roundAbbreviation,roundName:c.roundName,score:c.score,gameResult:c.score[0]>c.score[1]?1:c.score[0]<c.score[1]?2:3,seasonId:l.season_id});const p=o.get(c.roundAbbreviation);c.numberDateTimeMillis=new Date(c.date_time_utc).getTime(),c.homeTeam=n.get(c.home_team),c.awayTeam=n.get(c.visiting_team);const m=e.mapGamesByTeam.get(c.home_team),f=e.mapGamesByTeam.get(c.visiting_team);m?m.push(c):e.mapGamesByTeam.set(c.home_team,[c]),f?f.push(c):e.mapGamesByTeam.set(c.visiting_team,[c]),p?p.arrayGames.push(c):o.set(c.roundAbbreviation,{stringMatchDayAbbreviation:c.roundAbbreviation,stringMatchDayName:c.roundName,arrayGames:[c]})}}),o),new Map).values());r.reverse(),r.forEach(o=>{o.arrayGames.sort((l,c)=>l.numberDateTimeMillis-c.numberDateTimeMillis)}),e.arrayMatchDays=r,this.objectMatchDaySelected=r[0]||{}}catch(t){throw new Error(t)}},async fetchSeasonsGamesAndTeamsV2(e,t,a=""){let i=a;try{i||(i=this.gamesUrl,e.forEach((o,l)=>{i+=`${l===0?"":"&"}seasons=${o}`}));const{data:{data:n,teams:r}}=await ki.get(i);return{seasonsAndGames:n,seasonsAndTeams:r}}catch(n){if(t>0)return this.fetchSeasonsGamesAndTeamsV2(e,t-1,i);throw new Error(n)}},async fillNextSeasonPlays(){try{this.showImage=!0,this.playlistSeasonIndex++,this.seasonName=this.objectMediaPlayerModeFilters.objectTournamentSelected.arraySeasons[this.playlistSeasonIndex].name,this.playlistSeasonIndex>this.objectMediaPlayerModeFilters.objectTournamentSelected.arraySeasons.length-1&&(this.playlistSeasonIndex=0);const e=this.objectMediaPlayerModeFilters.objectTournamentSelected.arraySeasons[this.playlistSeasonIndex];e.arrayMatchDays||(await this.fillMatchDaysAndGamesV2(e),await this.fillSeasonPlayers(e));const t=await this.fetchPlays(e.id,this.objectMediaPlayerModeFilters.stringQueryCategoryIds,this.objectMediaPlayerModeFilters.stringQueryParams),a=this.getFormattedPlays(t,!1,e),i=this.getFilteredPlays(a);this.generatePlayerQueue(null,i,!1,0,!0)}catch(e){throw new Error(e)}},onPlaylistEnded(){this.booleanIsPlaySeekerMode||(this.isMyPlaylistsActive?this.$store.commit("mediaModal/setPlaylistIndex",{mediaPlayerType:this.isModalMode?null:this.mediaPlayerType,playlistIndex:0}):this.booleanIsFilterApplied?this.fillNextSeasonPlays():(this.playlistSeasonIndex++,this.playlistSeasonIndex>this.playlistTournament.seasons.length-1&&(this.playlistSeasonIndex=0),this.seasonName=this.playlistTournament.seasons[this.playlistSeasonIndex].name,this.showImage=!0,setTimeout(()=>{this.fetchInfo(!1,this.playlistTournament)},4e3)))},onFullScreenChange(){this.isCarouselFullScreenVisible=!0},onTypeChanged(e=1){if((e!==this.selectedType||this.isModalMode)&&(this.isModalMode&&this.setPlayerType(e),this.selectedType!==e||this.isModalMode&&e===1)){if(this.selectedType=e,this.selectedType===2){this.mediaPlayerMode="player";const t=this.summaryData?{id:this.summaryData.id}:this.isModalMode?this.isFirstTypeChange?this.modalInitialState&&this.modalInitialState.goalkeeperIds?{id:this.modalInitialState.goalkeeperIds[0],positionId:1}:{id:this.modalInitialState.playerIds[0]}:this.playInfo.player:this.isUserTournament?null:this.playInfo.player;this.$store.commit(`${this.storeModule}/setPlayer`,t),this.$store.commit(`${this.storeModule}/setTeam`,this.isModalMode?this.playInfo.teamId:this.isUserTournament?this.gsData.teamId:this.playInfo.teamId),this.onPlayerSelected()}else if(this.selectedType===3){this.mediaPlayerMode="team";const t=this.summaryData?this.summaryData.id:this.isModalMode?this.isFirstTypeChange?this.modalInitialState&&this.modalInitialState.teamId:this.playInfo.teamId:this.hasPlayerActivityInTournament||this.isUserTournament?this.gsData.teamId:this.playInfo.teamId;this.$store.commit(`${this.storeModule}/setPlayer`,null),this.$store.commit(`${this.storeModule}/setTeam`,t),this.onTeamSelected()}else this.selectedType===1&&(this.mediaPlayerMode="games",this.$store.commit(`${this.storeModule}/setPlayer`,null),this.$store.commit(`${this.storeModule}/setTeam`,null),this.checkSeason());e!==0&&(this.isFirstTypeChange=!1)}},onMaxInactivityReached(){this.showModalConfirm=!0},checkSeason(){this.gsData||(this.playlistSeasonIndex=this.playlistSeasonIndexAux);const e=this.getSeasonIdOnly===this.seasonId;this.fetchInfo(e,this.playlistTournament)},onPlayerSelected(){this.mediaPlayerMode="player",this.checkSeason()},onTeamSelected(){this.mediaPlayerMode="team",this.checkSeason()},onGameIdSelected(e){this.gameIdSelected=e},onPlaying(){this.isAutoPlay=!0},onPlayChanged(e){if(this.lastGameIdWatched=e.gameId,e.isPlaySeeker)this.playInfo=e,this.objectPlaySeekerLastPlay={playListId:e.payloadData.playlist_id,groupPlayListId:e.payloadData.group_playlist_id,groupId:e.payloadData.group_id,playIndex:e.payloadData.play_number-1},window.localStorage.setItem("playSeekerLastPlay",JSON.stringify(this.objectPlaySeekerLastPlay));else if(e.booleanIsFullGame)this.playInfo={playId:e.playId,booleanIsFullGame:!0,homeTeamLogo:e.objectGame.homeTeam.logo,homeTeamName:e.objectGame.homeTeam.colloquial_name,awayTeamLogo:e.objectGame.awayTeam.logo,awayTeamName:e.objectGame.awayTeam.colloquial_name,arrayScore:e.objectGame.score,gameId:e.gameId,seasonId:e.objectGame.season_id,teamLogo:e.playerTeamLogo,playerLogo:e.player.photo,dateTimeMillis:new Date(e.objectGame.date_time_utc).getTime()};else if(this.summaryData)this.playInfo={playId:e.playId,homeTeamLogo:e.game.homeTeam.logo,homeTeamName:e.game.homeTeam.colloquial_name||e.game.homeTeam.name,awayTeamLogo:e.game.awayTeam.logo,awayTeamName:e.game.awayTeam.colloquial_name||e.game.awayTeam.name,arrayScore:e.game.score,gameId:e.gameId,seasonId:e.seasonId,mainCategoryName:T0(e.mainCategory.name),playerShortName:e.player.shortName,dateTimeMillis:e.dateTimeMillis,playRaw:e.playRaw,startSeconds:e.startSeconds,endSeconds:e.endSeconds};else{if(this.isModalMode){this.setPlaylistGameId(e.game.id);const t=this.playerType===2?e.player.shortName:this.playerType===3?this.modalInitialState&&this.modalInitialState.isRivalSubject&&this.modalInitialState.mainSectionType===this.modalSectionSelected+1?[35,54].includes(e.categoryId)?e.teamname:e.rivalName:[35,54].includes(e.categoryId)?e.rivalName:e.teamName:"";this.$emit("subject-change",t?` - ${t}`:"")}this.playInfo={playId:e.playId,date:e.gameDate,dateTimeMillis:e.dateTimeMillis,arrayScore:e.game.score,objectHomeTeam:e.game.homeTeam,objectAwayTeam:e.game.awayTeam,playerId:e.player.id,playerName:e.player.name,playerShortName:e.player.shortName,playCategory:e.categoryName,teams:`${e.game.homeTeam.name} vs ${e.game.awayTeam.name}`,playerPhoto:e.player.photo,teamLogo:e.playerTeamLogo,rivalLogo:e.rivalTeamLogo,teamId:e.teamId,categoryId:e.categoryId,jersey:e.jersey,mainCategoryName:T0(e.mainCategory.name||e.stringMainCategoryName||""),categoriesNames:Array.from(e.categoriesNames.values()).reduce((t,a,i)=>(t+=`${i===0?"":", "}${a}`,t),""),gameId:e.game.id,roundAbbreviation:e.game.roundAbbreviation,player:e.player,asLocal:e.game.homeTeam.id===e.teamId,momentOfPlay:e.momentOfPlay,seasonId:e.seasonId,playRaw:e.playRaw,startSeconds:e.startSeconds,endSeconds:e.endSeconds,booleanIsFromMyPlaylists:e.booleanIsFromMyPlaylists,tvStations:e.game.tvStations}}},async fetchPlays(e=null,t=null,a=null){try{this.lastGameIdWatched=0;let i="";if(a===null){const r=this.modalInitialState&&this.modalInitialState.playerIds&&this.modalInitialState.playerIds.length;this.modalInitialState.isFeaturedPlayers?(this.modalInitialState.playerIds.forEach(o=>{i+=`&player=${o}`}),this.modalInitialState.isFeaturedPlayers=!1):this.getPlayerId?(this.hasUserPlayerSelectedSeason&&this.getPlayerId===this.user.player||!this.user.is_player)&&(i+=`&player=${this.getPlayerId}`):r?this.modalInitialState.playerIds.forEach(o=>{i+=`&player=${o}`}):(this.getTeamId||this.modalInitialState.teamId)&&(i+=`&team=${this.getTeamId||this.modalInitialState.teamId}`),this.modalInitialState&&this.modalInitialState.isPost&&(i+="&isPost=1")}const n=await ki.get(`https://cpj4073446.execute-api.us-east-2.amazonaws.com/prod/videos/plays/seasons/${e||this.seasonId}?${t||this.queryCategories}${a||i}`);if(n.data&&n.data.plays){const r=[...n.data.plays];return n.data.plays_rival?r.concat(n.data.plays_rival):r}return[]}catch(i){throw new Error(i)}},async fetchInfo(e,t){try{if(!t)return;let a=this.playlistSeasonIndex;this.playlistTournament=t,this.seasonId=t.seasons[a].id;const i=[this.fetchPlays()];if(!e&&t.seasons[a]){const l=[this.seasonId];t.seasons[a].related_seasons&&t.seasons[a].related_seasons.length&&l.push(...t.seasons[a].related_seasons.map(c=>c.id)),i.push(this.$store.dispatch(`${this.storeModule}/fetchSeasonsGamesAndTeams`,{seasons:l})),i.push(this.$store.dispatch(`${this.storeModule}/getPlayersBySeasons`,{seasonId:this.seasonId}))}const[n,r]=await Promise.all(i);if(this.plays=n||[],this.hasPlayerActivityInTournament&&!this.plays.length)if(this.playlistSeasonIndex<this.playlistTournament.seasons.length-1&&this.seasonSearchingCount<1)this.playlistSeasonIndex++,this.seasonSearchingCount++,await this.fetchInfo(!1,t);else return;e||this.formatGamesAndTeams(r);const o=this.getFormattedPlays(this.plays);this.generatePlayerQueue(this.currentCategories.reduce((l,c)=>(typeof c=="string"&&c.includes("_")||l.push(Number(c)),l),[]),o),this.showImage=!1}catch(a){throw new Error(a)}},async fillSeasons(e,t=!1){try{if(e){let a=null;if(this.autoFillVideos?a=e.find(i=>i._id===1):a=e[0],a){if(this.currentTournament=a,this.isModalMode&&!t&&!this.lastSearchResult)return;await this.fetchInfo(!1,this.currentTournament)}}}catch(a){throw new Error(a)}},async fillMyPlaylistsData(e){if(e.length){const t=[this.$store.dispatch("mediaGeneral/fetchSeasonsGamesAndTeams",{seasons:e})];e.forEach(r=>{t.push(this.$store.dispatch("mediaGeneral/getPlayersBySeasons",{seasonId:r,returnData:!0}))});const a=await Promise.all(t),i=a.shift();this.formatGamesAndTeamsForMyPlaylists(i);const n=a.reduce((r,o)=>(o.forEach(l=>{r.set(l.player_id,{id:l.player_id,name:l.player_name,shortName:l.shortName,photo:l.player_photo,teamId:l.team_id,positionId:l.position_id})}),r),new Map);this.setPlayersMapMyPlaylists(n)}},getBestPlaysCategoriesIds(){return Object.keys(Qi[this.mediaPlayerMode]).reduce((e,t)=>(t.split("-").forEach(a=>{e.push(Number(a))}),e),[])},setUpMediaGeneralData(){const{objectCurrentPlay:e,numberCurrentTime:t}=this.$refs.videoPlayer.getCurrentPlayerPlayInfo(),a={numberPlayId:e.playId,numberCurrentTime:t},i={arrayPlayerQueue:[...this.playerQueue],stringModeTitle:this.stringModeTitle,numberPlaylistIndex:this.playlistIndex,numberPlaylistSeasonIndex:this.playlistSeasonIndex,booleanIsFilterApplied:this.booleanIsFilterApplied,booleanIsPlaySeekerMode:this.booleanIsPlaySeekerMode,booleanAvoidApply:this.isModalMode&&this.modalInitialState&&this.modalInitialState.avoidApply&&!this.booleanIsFilterApplied,objectPlaySync:a};this.booleanIsFilterApplied&&(i.objectLastDataToFilter=this.objectLastDataToFilter),this.$store.commit("mediaGeneral/setObjectMediaData",i)},formatGamesAndTeams(e){this.roundsMap=new Map,this.teamsMap=e.seasonsAndTeams.reduce((t,a)=>(a&&a.teams.forEach(i=>{t.has(i.team_id)||t.set(i.team_id,{name:i.colloquial_name,acronym:i.acronym,logo:i.logo,id:i.team_id,players:this.playersByTeam.get(i.team_id)})}),t),new Map),this.gamesMap=e.seasonsAndGames.reduce((t,a)=>{const i=!!(this.currentTournament&&this.currentTournament.tournament&&this.currentTournament.tournament.tournament_type);return a.games.forEach(n=>{n.seasonType=a.season_type,n.seasonId=a.season_id,n.game_id>this.maxGameId&&(this.maxGameId=n.game_id);let r=n.matchday_abbreviation.replace("M","J"),o=n.matchday_abbreviation.replace("M","Jornada ");const l=n.matchday_abbreviation.replace("M","");n.seasonType===0?i&&(n.seasonId===881?(r=y6[l]||r,o=g6[l]||o):(r=Em[n.matchday_abbreviation]?n.matchday_abbreviation:r,o=Em[n.matchday_abbreviation]||o,r==="FINAL"&&(r="F"))):n.seasonType===1?(r=f6[n.matchday_abbreviation],o=r):n.matchday_id===182?(r="PI1",o="Play In 1"):n.matchday_id===183?(r="PI2",o="Play In 2"):(r=n.matchday_abbreviation.replace("PO","R"),o="Repechaje"),n.roundAbbreviation=r,n.roundName=o;const c=n.date.split("-"),d={id:n.game_id,date:n.date,dateTimeMillis:new Date(n.date_time_utc).valueOf(),homeTeam:this.teamsMap.get(n.home_team),awayTeam:this.teamsMap.get(n.visiting_team),roundAbbreviation:n.roundAbbreviation,roundName:n.roundName,score:n.score,gameResult:n.score[0]>n.score[1]?1:n.score[0]<n.score[1]?2:3,seasonId:a.season_id,dateFormatted:`${Number(c[2])} ${hEe[Number(c[1])-1]}, ${c[0]}`,tvStations:n.tv_stations?n.tv_stations.join(", "):null},u=this.roundsMap.get(n.roundAbbreviation);u?u.push(d):this.roundsMap.set(n.roundAbbreviation,[d]),t.has(n.game_id)||t.set(n.game_id,d)}),t},new Map)},formatGamesAndTeamsForMyPlaylists(e){const t=e.seasonsAndTeams.reduce((n,r)=>(r&&r.teams.forEach(o=>{n.has(o.team_id)||n.set(o.team_id,{name:o.colloquial_name,acronym:o.acronym,logo:o.logo,id:o.team_id,players:this.playersByTeam.get(o.team_id)})}),n),new Map);let a=0;const i=e.seasonsAndGames.reduce((n,r)=>(r.games.forEach(o=>{o.seasonType=r.season_type,o.seasonId=r.season_id,o.game_id>a&&(a=o.game_id);const l={id:o.game_id,date:o.date,dateTimeMillis:new Date(o.date_time_utc).valueOf(),homeTeam:t.get(o.home_team),awayTeam:t.get(o.visiting_team),roundAbbreviation:o.matchday_abbreviation,roundName:o.matchday_abbreviation.replace("M","MatchDay "),score:o.score,gameResult:o.score[0]>o.score[1]?1:o.score[0]<o.score[1]?2:3,seasonId:r.season_id};n.has(o.game_id)||n.set(o.game_id,l)}),n),new Map);this.setTeamsMapMyPlaylists(t),this.setGamesMapMyPlaylists(i),this.setMaxGameIdMyPlaylists(a)},onPlayerModeClicked(e){this.playerModeSelected=e},onClickModalLauncher(e=1){const{objectCurrentPlay:t,numberCurrentTime:a}=this.$refs.videoPlayer.getCurrentPlayerPlayInfo(),i={numberPlayId:t.playId,numberCurrentTime:a};this.$refs.videoPlayer.pausePlayers();let n=null;if(!e&&this.booleanIsFilterApplied||this.objectMediaPlayerModeFilters.objectSeasonSelected||this.booleanIsPlaySeekerMode||this.booleanIsFilterApplied){const r={arrayPlayerQueue:[...this.playerQueue],stringModeTitle:this.stringModeTitle,numberPlaylistIndex:this.playlistIndex,numberPlaylistSeasonIndex:this.playlistSeasonIndex,booleanIsPlaySeekerMode:this.booleanIsPlaySeekerMode,numberMainSectionType:e,objectPlaySync:i};r.booleanIsFilterApplied=this.booleanIsFilterApplied,this.booleanIsFilterApplied&&(r.objectLastDataToFilter=this.objectLastDataToFilter),this.$store.commit("mediaModal/setModalInitialState",null),this.$store.commit("mediaModal/setObjectMediaData",r)}else n={seasonId:this.seasonId,tournaments:this.tournamentsForModalLauncher,categoryIds:[...this.currentCategories],mainSectionType:e,matchResult:[1,2,3],currentPlayIndex:this.playlistIndex,objectPlaySync:i},this.getPlayerId?this.isPlayerGoalkeeper?n.goalkeeperIds=[this.getPlayerId]:n.playerIds=[this.getPlayerId]:this.getTeamId&&(n.teamId=this.getTeamId),this.$store.commit("mediaModal/setObjectMediaData",null),this.$store.commit("mediaModal/setModalInitialState",n);this.$store.commit("mediaModal/setIsModalOpen",!0)},setUpResizeObserver(){if(window.ResizeObserver)this.mediaPlayerResizeObserver=new window.ResizeObserver(()=>{this.mediaPlayerWidth=this.$refs.mediaPlayer.clientWidth}),this.mediaPlayerResizeObserver.observe(this.$refs.mediaPlayer);else throw new Error("Resize observer not supported!")},onClickMyPlaylists(){this.isModalMode?this.$store.commit("mediaModal/setModalSectionSelected",2):this.onClickModalLauncher(2)},getEmptyMediaPlayerModeFilters(){return{objectTournamentSelected:null,objectSeasonSelected:null,stringQueryCategoryIds:"",stringQueryParams:"",objectFilters:{numberActionId:0,numberMediaPlayerType:null,objectCategorySelected:null,objectAdvancedFilters:{numberTeamId:null,numberPlayerId:null,arraySelectedSubcategoryIds:[],booleanRequiresRivalTransform:!1,numberCoordinatePoint:2,arrayPlayingAs:[],arrayTimeSections:[],arrayFieldSections:[]}}}},fillDataToFilterData(e){this.objectLastDataToFilter=e,this.arrayCategoriesIdsToFilter=e.arrayCategoriesIds,this.arrayRivalCategoriesIdsToFilter=e.arrayRivalCategoriesIds,this.arrayCategoriesIdsRaw=e.arrayCategoriesIdsRaw,this.objectMediaPlayerModeFilters.stringQueryCategoryIds=e.stringQueryCategoryIds,this.objectMediaPlayerModeFilters.stringQueryParams=e.stringQueryParams,this.objectMediaPlayerModeFilters.objectTournamentSelected=e.objectTournamentSelected,this.objectMediaPlayerModeFilters.objectSeasonSelected=e.objectSeasonSelected,this.objectMediaPlayerModeFilters.objectGameSelected=e.objectGameSelected,this.objectMediaPlayerModeFilters.objectFilters.numberMediaPlayerType=e.objectFilters.numberMediaPlayerType,this.objectMediaPlayerModeFilters.objectFilters.objectCategorySelected=e.objectFilters.objectCategorySelected,this.objectMediaPlayerModeFilters.objectFilters.numberActionId=e.objectFilters.numberActionId,this.objectMediaPlayerModeFilters.objectFilters.objectAdvancedFilters.numberTeamId=e.objectFilters.objectAdvancedFilters.numberTeamId,this.objectMediaPlayerModeFilters.objectFilters.objectAdvancedFilters.numberPlayerId=e.objectFilters.objectAdvancedFilters.numberPlayerId,this.objectMediaPlayerModeFilters.objectFilters.objectAdvancedFilters.booleanIsPlayerGoalKeeper=e.objectFilters.objectAdvancedFilters.booleanIsPlayerGoalKeeper,this.objectMediaPlayerModeFilters.objectFilters.objectAdvancedFilters.arraySelectedSubcategoryIds=e.objectFilters.objectAdvancedFilters.arraySelectedSubcategoryIds,this.objectMediaPlayerModeFilters.objectFilters.objectAdvancedFilters.booleanRequiresRivalTransform=e.objectFilters.objectAdvancedFilters.booleanRequiresRivalTransform,this.objectMediaPlayerModeFilters.objectFilters.objectAdvancedFilters.numberCoordinatePoint=e.objectFilters.objectAdvancedFilters.numberCoordinatePoint,this.objectMediaPlayerModeFilters.objectFilters.objectAdvancedFilters.arrayPlayingAs=e.objectFilters.objectAdvancedFilters.arrayPlayingAs,this.objectMediaPlayerModeFilters.objectFilters.objectAdvancedFilters.arrayTimeSections=e.objectFilters.objectAdvancedFilters.arrayTimeSections,this.objectMediaPlayerModeFilters.objectFilters.objectAdvancedFilters.arrayFieldSections=e.objectFilters.objectAdvancedFilters.arrayFieldSections,this.selectedType=e.numberSelectedType},onApplyFilters(e){this.stringModeTitle=`Estas viendo: ${e.stringControlsTitle}`,this.booleanIsPlaySeekerMode=!1,this.booleanIsFilterApplied=!0,this.fillDataToFilterData(e),this.playlistSeasonIndex=e.objectTournamentSelected.numberSeasonSelectedIndex,this.generatePlayerQueue(null,e.arrayFormattedPlays,!1,e.numberPlaylistIndex,!0)},onClickOptions(e){this.booleanIsOptionsMenuVisible=!0,this.numberOptionsMenuTop=e.numberY,this.numberOptionsMenuLeft=e.numberX},onClickOpenModes(){this.$refs.videoPlayer.pausePlayers(),this.booleanIsModesModalOpen=!0},onClickFullGame(e){this.booleanIsPlaySeekerMode=!1,this.booleanIsFilterApplied=!0;const t=e.arrayMatchDayGames.findIndex(a=>a.game_id===e.objectGame.game_id);t!==-1&&(this.stringModeTitle=`Estas viendo: ${e.stringControlsTitle}`,this.booleanIsPlaySeekerMode=!1,this.playerQueue=e.arrayMatchDayGames.map(a=>(a.homeTeam.name=a.homeTeam.colloquial_name,a.awayTeam.name=a.awayTeam.colloquial_name,{booleanIsFullGame:!0,objectGame:a,gameId:a.game_id,startSeconds:0,endSeconds:null})),this.$store.commit(`${this.storeModule}/setPlaylistIndex`,{mediaPlayerType:this.isModalMode?null:this.mediaPlayerType,playlistIndex:t}),this.$store.commit(`${this.storeModule}/setCurrentPlayerQueue`,this.playerQueue))},onModesModalClose(){this.booleanIsModesModalOpen=!1,this.onClickSpeed(1)},onClickMode(){this.$refs.videoPlayer.setSpeedToAllPlayers(1)},onClickSurpriseMe(){this.booleanIsFilterApplied=!1,this.booleanIsPlaySeekerMode=!0,this.fillPlaySeekerPlays()},getPlaySeekerCategoryName(e){if(e.categoryId===33)return"Fuera de lugar";if([35,54].includes(e.categoryId))return"Auto gol";{const t=this.allCategories.get(e.categoryId)||this.allCategories.get(`${e.categoryId}_r`)||this.extraCategories.get(e.categoryId)||this.extraCategories.get(`${e.categoryId}_r`);return t?t.name:"S/N"}},async setUpTokens(){try{const e=await(await fetch(`${this.firstInteractionUrl}/token`,{method:"POST",mode:"cors",headers:{Authorization:"Basic bXN1c2VyQWRtaW46bXN1c2VycGFzc3dvcmRBZG1pbg=="},referrerPolicy:"no-referrer"})).json();this.firstInteractionToken=e.token}catch(e){throw new Error(e)}},async fillPlaySeekerPlays(){try{if(this.stringModeTitle="Sorpréndeme",this.booleanIsPlaySeekerMode){const e=await(await fetch(`${this.firstInteractionUrl}/firstInteraction/${pEe}/${this.user.username}/playlist`,{method:"GET",headers:{Authorization:`Bearer ${this.firstInteractionToken}`},referrerPolicy:"no-referrer"})).json();e&&(this.setPlaySeekerUserId(e.user_id),this.setPlaySeekerCurrentSessionId(this.getPlaySeekerSessionId(this.playSeekerUserId)),this.$emit("change-user-id",this.playSeekerUserId),window.localStorage.setItem("playSeekerUserId",this.playSeekerUserId),this.formatPlaySeekerPlays(e))}}catch(e){throw new Error(e)}},formatPlaySeekerPlays(e){let t=[];e&&e.playlist&&e.playlist.length&&(t=e.playlist.reduce((i,n,r)=>{const o={...Object.entries(Yi).reduce((h,[p,m])=>(h[p]=n[m],h),{}),isPlaySeeker:!0,startSeconds:n[Yi.startTime],endSeconds:n[Yi.endTime],totalSeconds:Math.floor(n[Yi.endTime]-n[Yi.startTime]),payloadData:{play_id:n[Yi.playId],total_plays:e.total_plays,play_number:r+1,group_playlist_id:e.group_playlist_id,playlist_id:e.playlist_id,group_id:e.group_id,moment_of_play:n[Yi.momentOfPlay],play_type:n[Yi.categoryId],viewer_second_start:Math.floor(n[Yi.startTime]),intended_second_start:Math.floor(n[Yi.startTime]),intended_second_end:Math.floor(n[Yi.endTime]),latitude_of_user:null,longitude_of_user:null}},[l,c]=o.playerName.split(","),d=l.split(" ");let u="";for(const h of d)if(u+=` ${h}`,h.length>3)break;if(o.playerShortName=c&&l?`${c.trim().charAt(0)}.${u}`:"",!o.mainCategoryName){o.mainCategoryName=T0(this.getPlaySeekerCategoryName(o));const[h,p]=o.finalScore.split(" - ");o.arrayScore=[Number(h),Number(p)]}return i.push(o),i},[]));let a=[];this.concatPlays?a=[...this.playerQueue.splice(0,this.currentPlayIndex+1),...t]:a=t,this.playerQueue=a,this.objectPlaySeekerLastPlay&&this.objectPlaySeekerLastPlay.playListId===e.playlist_id&&this.objectPlaySeekerLastPlay.groupPlayListId===e.group_playlist_id&&this.objectPlaySeekerLastPlay.groupId===e.group_id&&this.$store.commit(`${this.storeModule}/setPlaylistIndex`,{mediaPlayerType:this.isModalMode?null:this.mediaPlayerType,playlistIndex:this.objectPlaySeekerLastPlay.playIndex}),this.$store.commit(`${this.storeModule}/setCurrentPlayerQueue`,this.playerQueue)},getPlaySeekerSessionId(e){return e?`S_${e}${Date.now()}`:null},getRandomPercentage(){return Math.floor(Math.random()*60+20)},async sendUserBehavior(e,t,a){try{if(this.playInfo.isPlaySeeker){const i={user_id:this.playSeekerUserId,current_session_id:this.playSeekerCurrentSessionId,last_play:{...this.playInfo.payloadData}};i&&(i.last_play.action=t,i.last_play.percentage_viewed=t===1?100:this.getRandomPercentage(),i.last_play.viewer_second_end=e||this.playInfo.endSeconds,i.last_play.date_time_of_user_action=a,this.coords&&(i.last_play.latitude_of_user=this.coords.latitude,i.last_play.longitude_of_user=this.coords.latitude));const n=await fetch(`${this.userBehaviorUrl}/user-behavior`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(i)});if(n.status===200){const r=await n.json();r&&(this.concatPlays=!0,this.formatPlaySeekerPlays(r))}else this.concatPlays=!1}}catch(i){throw new Error(i)}},onGeoSuccess(e){this.coords=e.coords},onGeoError(e){throw new Error(e)},onClickTimeButton(e){e.numberType===1?this.$refs.videoPlayer.addSecondsToCurrentPlayer(e.numberValue*e.numberValueFactor):e.numberType===2?this.booleanIsSpeedModalVisible=!0:this.booleanIsVideoPlayerPlaying?this.$refs.videoPlayer.pausePlayers():this.$refs.videoPlayer.playCurrentPlayer()},onClickOption(e){this.$refs.videoPlayer.pausePlayers(),e===1?hp.emit("click-game",{gameId:this.playInfo.gameId,gameStatus:1,dateTimeUTC:new Date(this.playInfo.dateTimeMillis).toISOString(),seasonId:this.playInfo.seasonId,stringSectionName:"lineups"}):e===2?this.onClickDownload():e===3?(this.setPlaysToSaveAsFavorites([this.playInfo.playRaw]),this.setIsModalCreatePlayListOpen(!0)):e===4&&(this.isModalMode?this.$emit("show-list"):this.onClickModalLauncher())},onClickNextBack(e){this.$refs.videoPlayer.onMoveToPlayClicked(e)},onPlayIteration({iterationTime:e,userAction:t,dateTimeIsoString:a}){this.booleanIsPlaySeekerMode&&this.sendUserBehavior(e,t,a)},onClickAnalyst(){this.onClickModalLauncher()},onClickFullscreen(){this.isCarouselFullScreenVisible=!0},onChangeSeason(e){this.numberCurrentSeasonId=Number(e),this.isAutoPlay=!1,this.objectMediaPlayerModeFilters=this.getEmptyMediaPlayerModeFilters(),this.setUpData(e)},onUpdateSearchResult(e){this.lastSearchResult=e,this.setUpData(e.seasonId)},onClickClose(){this.$emit("close")},onClickCloseCarousel(e){e&&this.$store.commit("mediaModal/setPlaylistIndex",{mediaPlayerType:null,playlistIndex:e}),this.isCarouselFullScreenVisible=!1},getPlayerOptions(){return{playbackRates:[.5,1,1.5,2],autoplay:!1,controls:!0,controlBar:{children:["playToggle","volumePanel","playbackRateMenuButton","CurrentTimeDisplay","progressControl","remainingTimeDisplay","fullscreenToggle"],pictureInPictureToggle:!1,volumePanel:{inline:!1}},liveui:!0,preload:"auto",fluid:!0}},videoJsInit(){fe.registerPlugin("offset",Zv),this.videojsLocal=fe}},async created(){try{this.videoJsInit(),ki.defaults.headers.common.Authorization=this.token,this.modalInitialData&&this.$store.commit("mediaModal/setModalInitialState",this.modalInitialData),hp.on("change-season",this.onChangeSeason),await this.setUpTokens(),hp.on("some-list-selected",()=>{this.isSomeListSelected=!0}),this.autoFillVideos&&await this.$store.dispatch(`${this.storeModule}/fetchTournaments`)}catch(e){throw new Error(e)}},mounted(){this.isModalMode?setTimeout(()=>{this.modalInitialState?(this.objectPlaySync=this.modalInitialState.objectPlaySync?{...this.modalInitialState.objectPlaySync,booleanIsApplied:!1}:null,this.setUpData(this.modalInitialState.seasonId),this.onTypeChanged(this.modalInitialState.playListType),this.$store.commit("mediaModal/setModalSectionSelected",this.modalInitialState.mainSectionType||1),this.stringModeTitle=`Estas viendo: ${this.modalInitialState.teamId?"Resumen de equipo":this.modalInitialState.playerIds&&this.modalInitialState.playerIds.length?"Resumen de jugador":this.modalInitialState.gameIds&&this.modalInitialState.gameIds.length?"Resumen de partido":""}`):this.objectMediaData&&(this.$store.commit("mediaModal/setModalSectionSelected",1),this.applyObjectMediaData())},100):this.seasonSelectedId&&this.tournamentsForMediaPlayer.size>0&&(this.setUpData(this.seasonSelectedId),this.setInitialTitle()),setTimeout(()=>{this.setUpResizeObserver()},1e3)},beforeUnmount(){this.isSomeListSelected=!1,this.mediaPlayerResizeObserver&&(this.mediaPlayerResizeObserver.disconnect(),this.mediaPlayerResizeObserver=null),this.$store.commit(`${this.storeModule}/setPlayer`,null),this.$store.commit(`${this.storeModule}/setTeam`,null),this.setPlaylistGameId(0)}},ZA=()=>{s.useCssVars(e=>({"1f6bcce1":e.backgroundColor}))},$A=c1.setup;c1.setup=$A?(e,t)=>(ZA(),$A(e,t)):ZA;const bu=e=>(s.pushScopeId("data-v-f53eaa41"),e=e(),s.popScopeId(),e),mEe={class:"modal-video__videos"},fEe=bu(()=>s.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none"},[s.createElementVNode("path",{d:"M5 15L15 5",stroke:"white","stroke-width":"1.7","stroke-miterlimit":"10","stroke-linecap":"round","stroke-linejoin":"round"}),s.createElementVNode("path",{d:"M15 15L5 5",stroke:"white","stroke-width":"1.7","stroke-miterlimit":"10","stroke-linecap":"round","stroke-linejoin":"round"})],-1)),gEe=[fEe],yEe={class:"modal-video__videos__search-and-filters"},_Ee={class:"modal-video__search-and-filters__search"},bEe={class:"modal-video__search-and-filters__advanced"},vEe={class:"modal-video__videos__video"},SEe={key:1,class:"modal-video__detail"},wEe={class:"modal-video__img-container"},TEe=["src"],CEe={class:"modal-video__img-container overlap"},kEe=["src"],EEe={class:"modal-video__description"},IEe={key:2,class:"modal-video__date"},xEe={class:"discover-container"},NEe=bu(()=>s.createElementVNode("div",{class:"title-value"},"Descubre videos",-1)),AEe={class:"modal-video__matches"},PEe={class:"current-match-info"},OEe=bu(()=>s.createElementVNode("h4",null,"Estás viendo:",-1)),BEe={key:0},DEe={class:"modal-video__game-list"},LEe=bu(()=>s.createElementVNode("div",{class:"modal-video__game-list__title"},"Otros partidos",-1)),MEe={class:"discover-videos"},REe=bu(()=>s.createElementVNode("div",{class:"title-value"},"Descubre videos",-1));function FEe(e,t,a,i,n,r){const o=s.resolveComponent("CarouselFullScreen"),l=s.resolveComponent("VideoSearch"),c=s.resolveComponent("SearchFilters"),d=s.resolveComponent("VideoPlayer"),u=s.resolveComponent("VideoPlayerControls"),h=s.resolveComponent("GscSwitchComponent"),p=s.resolveComponent("GSCPlayerTeamGame"),m=s.resolveComponent("CurrentMatch"),f=s.resolveComponent("MatchesList");return s.openBlock(),s.createElementBlock(s.Fragment,null,[n.isCarouselFullScreenVisible?(s.openBlock(),s.createBlock(o,{key:0,videojs:n.videojsLocal,"player-queue":r.carouselPlayerQueue,"playlist-index":r.playlistIndex,"initial-play":n.playInfo,onClose:r.onClickCloseCarousel},null,8,["videojs","player-queue","playlist-index","initial-play","onClose"])):s.createCommentVNode("",!0),s.createElementVNode("div",{ref:"mediaPlayer",class:s.normalizeClass(["modal-video",r.dynamicClasses])},[s.createElementVNode("div",mEe,[a.isModal?(s.openBlock(),s.createElementBlock("div",{key:0,class:"modal-video__close",onClick:t[0]||(t[0]=(...v)=>r.onClickClose&&r.onClickClose(...v))},gEe)):s.createCommentVNode("",!0),s.createElementVNode("div",yEe,[s.createElementVNode("div",_Ee,[s.createVNode(l,{"onUpdate:searchResult":r.onUpdateSearchResult,clientWidth:this.mediaPlayerWidth},null,8,["onUpdate:searchResult","clientWidth"])]),s.createElementVNode("div",bEe,[s.createVNode(c,{onApplyFilters:r.onApplyFilters,clientWidth:this.mediaPlayerWidth},null,8,["onApplyFilters","clientWidth"])])]),s.createElementVNode("div",vEe,[s.createVNode(d,{ref:"videoPlayer","player-queue":n.playerQueue,"is-v2":"","is-gs":"","is-from-mexico":a.isFromMexico,"is-gs-user":a.isGSUser,"container-width":n.mediaPlayerWidth,"game-id-selected":n.gameIdSelected,"is-first-row":!1,"plays-type-selected":n.selectedType,"is-auto-play":n.isAutoPlay,"is-modal-mode":a.isModalMode,"are-types-hidden":r.isSummaryData||r.isMyPlaylistsActive,"is-play-seeker-mode":n.booleanIsPlaySeekerMode,"play-sync":n.objectPlaySync,onPlayIteration:r.onPlayIteration,onPlaying:r.onPlaying,onPlayChanged:r.onPlayChanged,onMaxInactivityReached:r.onMaxInactivityReached,onPlaylistEnded:r.onPlaylistEnded,onChangeType:r.onTypeChanged,onPlay:t[1]||(t[1]=v=>n.booleanIsVideoPlayerPlaying=!0),onPause:t[2]||(t[2]=v=>n.booleanIsVideoPlayerPlaying=!1),onClickFullScreen:r.onClickFullscreen},null,8,["player-queue","is-from-mexico","is-gs-user","container-width","game-id-selected","plays-type-selected","is-auto-play","is-modal-mode","are-types-hidden","is-play-seeker-mode","play-sync","onPlayIteration","onPlaying","onPlayChanged","onMaxInactivityReached","onPlaylistEnded","onChangeType","onClickFullScreen"]),s.createVNode(u,{"play-info":n.playInfo,onClickNextBack:r.onClickNextBack,clientWidth:this.mediaPlayerWidth},null,8,["play-info","onClickNextBack","clientWidth"])]),n.playInfo&&n.playInfo.objectHomeTeam?(s.openBlock(),s.createElementBlock("div",SEe,[s.createElementVNode("div",wEe,[s.createElementVNode("img",{class:"modal-video__img",src:n.playInfo.teamLogo},null,8,TEe)]),s.createElementVNode("div",CEe,[s.createElementVNode("img",{class:"modal-video__img",src:n.playInfo.playerPhoto},null,8,kEe)]),s.createElementVNode("div",EEe,s.toDisplayString(n.playInfo.objectHomeTeam.acronym)+" "+s.toDisplayString(n.playInfo.arrayScore[0])+" : "+s.toDisplayString(n.playInfo.arrayScore[1])+" "+s.toDisplayString(n.playInfo.objectAwayTeam.acronym)+" I "+s.toDisplayString(n.playInfo.roundAbbreviation)+" "+s.toDisplayString(n.playInfo.tvStations||""),1)])):s.createCommentVNode("",!0),!n.mobileClass&&n.playInfo?(s.openBlock(),s.createElementBlock("div",IEe,s.toDisplayString(n.playInfo.date),1)):s.createCommentVNode("",!0),s.createElementVNode("div",xEe,[NEe,n.mobileClass?(s.openBlock(),s.createBlock(h,{key:0,buttons:["Estás viendo","Otros partidos","Descubre videos"],class:"current-match__tabs",selectedOption:n.currentMobileTab,arrow:!1,borderRadius:"32px",height:"28px",fontSize:"11px;",backgroundOptionActive:"transparent",onInput:t[3]||(t[3]=v=>n.currentMobileTab=v)},null,8,["selectedOption"])):s.createCommentVNode("",!0),a.section?(s.openBlock(),s.createElementBlock(s.Fragment,{key:1},[s.createVNode(h,{style:{"margin-left":"25px"},buttons:["Resumen","Proximo rival"],onInput:t[4]||(t[4]=v=>n.currentTabMoreVideos=v),background:"trasparent",height:"28px",width:"160px","font-family":"Poppins-Regular",type:2,arrow:!1,selectedOption:n.currentTabMoreVideos},null,8,["selectedOption"]),this.user.is_player?(s.openBlock(),s.createElementBlock(s.Fragment,{key:0},[n.currentTabMoreVideos=="Resumen"?(s.openBlock(),s.createElementBlock(s.Fragment,{key:0},[!n.mobileClass||n.currentMobileTab==="Resumen"?(s.openBlock(),s.createBlock(p,{key:0,type:8,style:{"margin-top":"-30px"},title:"",backgroundColor:"#172531",data:{season:a.user.season,player:a.user.player,category:1255e3},width:"100%"},null,8,["data"])):s.createCommentVNode("",!0)],64)):(s.openBlock(),s.createElementBlock(s.Fragment,{key:1},[!n.mobileClass||n.currentMobileTab==="Resumen"?(s.openBlock(),s.createBlock(p,{key:0,type:8,style:{"margin-top":"-30px"},title:"",backgroundColor:"#172531",data:{season:a.user.season,player:a.user.player,category:1255e3},width:"100%"},null,8,["data"])):s.createCommentVNode("",!0)],64))],64)):(s.openBlock(),s.createElementBlock(s.Fragment,{key:1},[n.currentTabMoreVideos=="Resumen"?(s.openBlock(),s.createElementBlock(s.Fragment,{key:0},[!n.mobileClass||n.currentMobileTab==="Resumen"?(s.openBlock(),s.createBlock(p,{key:0,type:7,title:"",style:{"margin-top":"-30px"},backgroundColor:"#172531",data:{season:a.user.season,team:a.user.team,category:1255e3},width:"100%"},null,8,["data"])):s.createCommentVNode("",!0)],64)):(s.openBlock(),s.createElementBlock(s.Fragment,{key:1},[!n.mobileClass||n.currentMobileTab==="Resumen"?(s.openBlock(),s.createBlock(p,{key:0,type:7,style:{"margin-top":"-30px"},title:"",backgroundColor:"#172531",data:{season:a.user.season,team:0,category:1255e3},width:"100%"},null,8,["data"])):s.createCommentVNode("",!0)],64))],64))],64)):(s.openBlock(),s.createElementBlock(s.Fragment,{key:2},[!n.mobileClass||n.currentMobileTab==="Resumen"?(s.openBlock(),s.createBlock(p,{key:0,style:{"margin-top":"-30px"},type:13,data:{season:a.user.season,category:1255e3},width:"100%",backgroundColor:"#172531",title:""},null,8,["data"])):s.createCommentVNode("",!0)],64))])]),s.createElementVNode("div",AEe,[s.createElementVNode("div",PEe,[n.mobileClass?s.createCommentVNode("",!0):(s.openBlock(),s.createElementBlock(s.Fragment,{key:0},[OEe,n.playInfo?(s.openBlock(),s.createElementBlock("h3",BEe,s.toDisplayString(n.playInfo.mainCategoryName),1)):s.createCommentVNode("",!0)],64)),r.currentMatch&&(!n.mobileClass||n.currentMobileTab==="Estás viendo")?(s.openBlock(),s.createBlock(m,{key:1,currentMatch:r.currentMatch,mobileClass:"",clientWidth:this.mediaPlayerWidth},null,8,["currentMatch","clientWidth"])):s.createCommentVNode("",!0)]),s.createElementVNode("div",DEe,[LEe,!n.mobileClass||n.currentMobileTab==="Otros partidos"?(s.openBlock(),s.createBlock(f,{key:0,matches:e.currentPlayerQueueByGames,mobileClass:"",clientWidth:this.mediaPlayerWidth},null,8,["matches","clientWidth"])):s.createCommentVNode("",!0)])]),s.createElementVNode("div",MEe,[REe,n.mobileClass?(s.openBlock(),s.createBlock(h,{key:0,buttons:["Estás viendo","Otros partidos","Descubre videos"],class:"current-match__tabs",selectedOption:n.currentMobileTab,arrow:!1,borderRadius:"32px",height:"28px",fontSize:"11px;",backgroundOptionActive:"transparent",onInput:t[5]||(t[5]=v=>n.currentMobileTab=v)},null,8,["selectedOption"])):s.createCommentVNode("",!0),a.section?(s.openBlock(),s.createElementBlock(s.Fragment,{key:1},[s.createVNode(h,{style:{"margin-left":"25px"},buttons:["Resumen","Proximo rival"],onInput:t[6]||(t[6]=v=>n.currentTabMoreVideos=v),background:"trasparent",height:"28px",width:"160px","font-family":"Poppins-Regular",type:2,arrow:!1,selectedOption:n.currentTabMoreVideos},null,8,["selectedOption"]),this.user.is_player?(s.openBlock(),s.createElementBlock(s.Fragment,{key:0},[n.currentTabMoreVideos=="Resumen"?(s.openBlock(),s.createElementBlock(s.Fragment,{key:0},[!n.mobileClass||n.currentMobileTab==="Resumen"?(s.openBlock(),s.createBlock(p,{key:0,type:8,style:{"margin-top":"-30px"},title:"",backgroundColor:"#172531",data:{season:a.user.season,player:a.user.player,category:1255e3},width:"100%"},null,8,["data"])):s.createCommentVNode("",!0)],64)):(s.openBlock(),s.createElementBlock(s.Fragment,{key:1},[!n.mobileClass||n.currentMobileTab==="Resumen"?(s.openBlock(),s.createBlock(p,{key:0,type:8,style:{"margin-top":"-30px"},title:"",backgroundColor:"#172531",data:{season:a.user.season,player:a.user.player,category:1255e3},width:"100%"},null,8,["data"])):s.createCommentVNode("",!0)],64))],64)):(s.openBlock(),s.createElementBlock(s.Fragment,{key:1},[n.currentTabMoreVideos=="Resumen"?(s.openBlock(),s.createElementBlock(s.Fragment,{key:0},[!n.mobileClass||n.currentMobileTab==="Resumen"?(s.openBlock(),s.createBlock(p,{key:0,type:7,title:"",style:{"margin-top":"-30px"},backgroundColor:"#172531",data:{season:a.user.season,team:a.user.team,category:1255e3},width:"100%"},null,8,["data"])):s.createCommentVNode("",!0)],64)):(s.openBlock(),s.createElementBlock(s.Fragment,{key:1},[!n.mobileClass||n.currentMobileTab==="Resumen"?(s.openBlock(),s.createBlock(p,{key:0,type:7,style:{"margin-top":"-30px"},title:"",backgroundColor:"#172531",data:{season:a.user.season,team:0,category:1255e3},width:"100%"},null,8,["data"])):s.createCommentVNode("",!0)],64))],64))],64)):(s.openBlock(),s.createElementBlock(s.Fragment,{key:2},[!n.mobileClass||n.currentMobileTab==="Resumen"?(s.openBlock(),s.createBlock(p,{key:0,style:{"margin-top":"-30px"},type:13,data:{season:a.user.season,category:1255e3},width:"100%",backgroundColor:"#172531",title:""},null,8,["data"])):s.createCommentVNode("",!0)],64))])],2)],64)}const VEe=bt(c1,[["render",FEe],["__scopeId","data-v-f53eaa41"]]);a0e();const UEe={class:"container"},jEe=!1,zEe=si({__name:"GSCMediaPlayer",setup(e){const t=s.ref("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MCwibmFtZSI6IlVzdWFyaW8gRnJlZSIsInVzZXJuYW1lIjoiZnJlZUBnb2xzdGF0cy5jb20iLCJlbWFpbCI6ImZyZWVAZ29sc3RhdHMuY29tIiwiaWF0IjoxNjA2NzU4Nzk1LCJleHAiOjE2MzgyOTQ3OTV9.kPNmP7yDtk38cAXrUyc7OHRh6J25VFqy-XUNzbK-4YE");Sc.defaults.headers.common.Authorization=t.value;const a=[{_id:44,seasons:[{name:"Clausura 2023",related_seasons:[{type:1,id:1752}],id:1713,type:0},{name:"Apertura 2022",related_seasons:[{type:1,id:1592}],id:1542,type:0},{name:"Grita Mexico C22",related_seasons:[{type:1,id:1521}],id:1486,type:0}],tournament:{show_logos:0,tournament_type:0,name:"Sub-20",logo:null,id:44,tournament_status:0,order:5}},{_id:1095,seasons:[{name:"Apertura 2023",related_seasons:[{type:1,id:1831}],id:1783,type:0},{name:"Clausura 2023",related_seasons:[{type:1,id:1750}],id:1715,type:0},{name:"Apertura 2022",related_seasons:[{type:1,id:1652}],id:1541,type:0},{name:"Grita Mexico C22",related_seasons:[{type:1,id:1527}],id:1488,type:0}],tournament:{show_logos:0,tournament_type:0,name:"Sub-16",logo:null,id:1095,tournament_status:0,order:7}},{_id:1001,seasons:[{name:"Clausura 2024",related_seasons:[],id:1838,type:0},{name:"Apertura 2023",related_seasons:[{type:1,id:1825}],id:1777,type:0},{name:"Clausura 2023",related_seasons:[{type:1,id:1747}],id:1696,type:0},{name:"Apertura 2022",related_seasons:[{type:1,id:1655}],id:1539,type:0},{name:"Grita Mexico C22",related_seasons:[{type:1,id:1523}],id:1485,type:0},{name:"Grita Mexico A21",related_seasons:[{type:1,id:1458}],id:1402,type:0},{name:"Guard1anes Clausura 2021",related_seasons:[{type:1,id:1384}],id:1323,type:0},{name:"Guard1anes 2020",related_seasons:[{type:1,id:1318}],id:1283,type:0},{name:"Clausura 2020",related_seasons:[],id:1241,type:0},{name:"Apertura 2019",related_seasons:[{type:1,id:1227}],id:1157,type:0},{name:"Clausura 2019",related_seasons:[{type:1,id:1132}],id:1095,type:0},{name:"Apertura 2018",related_seasons:[{type:1,id:1072}],id:1004,type:0},{name:"Clausura 2018",related_seasons:[{type:1,id:1237}],id:1236,type:0}],tournament:{show_logos:1,tournament_type:0,name:"Liga MX Femenil",logo:"https://az755631.vo.msecnd.net/tournaments/femenil_mx.png",id:1001,tournament_status:0,order:2}},{_id:1143,seasons:[{name:"Apertura 2023",related_seasons:[{type:1,id:1829}],id:1785,type:0}],tournament:{show_logos:0,tournament_type:0,name:"Sub-23",logo:null,id:1143,tournament_status:0,order:4}},{_id:1,seasons:[{name:"Clausura 2024",related_seasons:[],id:1836,type:0},{name:"Apertura 2023",related_seasons:[{type:2,id:1826},{type:1,id:1827}],id:1772,type:0},{name:"Clausura 2023",related_seasons:[{type:2,id:1745},{type:1,id:1746}],id:1694,type:0},{name:"Apertura 2022",related_seasons:[{type:2,id:1591},{type:1,id:1594}],id:1535,type:0},{name:"Grita Mexico C22",related_seasons:[{type:2,id:1520},{type:1,id:1525}],id:1476,type:0},{name:"Grita Mexico A21",related_seasons:[{type:2,id:1446},{type:1,id:1456}],id:1401,type:0},{name:"Guard1anes Clausura 2021",related_seasons:[{type:2,id:1382},{type:1,id:1383}],id:1325,type:0},{name:"Guard1anes 2020",related_seasons:[{type:2,id:1311},{type:1,id:1316}],id:1275,type:0},{name:"Clausura 2020",related_seasons:[],id:1239,type:0},{name:"Apertura 2019",related_seasons:[{type:1,id:1231}],id:1155,type:0},{name:"Clausura 2019",related_seasons:[{type:1,id:1135}],id:1093,type:0},{name:"Apertura 2018",related_seasons:[{type:1,id:1075}],id:1002,type:0}],tournament:{show_logos:1,tournament_type:0,name:"Liga MX",logo:"https://az755631.vo.msecnd.net/tournaments/liga_mx.png",id:1,tournament_status:0,order:1}},{_id:1071,seasons:[{name:"Clausura 2024",related_seasons:[],id:1837,type:0},{name:"Apertura 2023",related_seasons:[{type:2,id:1822},{type:1,id:1828}],id:1776,type:0},{name:"Clausura 2023",related_seasons:[{type:2,id:1742},{type:1,id:1748}],id:1695,type:0},{name:"Apertura 2022",related_seasons:[{type:2,id:1598},{type:1,id:1618}],id:1544,type:0},{name:"Grita Mexico C22",related_seasons:[{type:2,id:1515},{type:1,id:1519}],id:1484,type:0},{name:"Grita Mexico A21",related_seasons:[{type:2,id:1454},{type:1,id:1463}],id:1408,type:0},{name:"Guard1anes Clausura 2021",related_seasons:[{type:2,id:1378},{type:1,id:1380}],id:1327,type:0},{name:"Guard1anes 2020",related_seasons:[{type:2,id:1315},{type:1,id:1317}],id:1287,type:0}],tournament:{show_logos:1,tournament_type:0,name:"Liga Expansion MX",logo:"https://az755631.vo.msecnd.net/tournaments/expansion_mx.png",id:1071,tournament_status:0,order:3}},{_id:1096,seasons:[{name:"Apertura 2023",related_seasons:[{type:1,id:1830}],id:1782,type:0},{name:"Clausura 2023",related_seasons:[{type:1,id:1751}],id:1714,type:0},{name:"Apertura 2022",related_seasons:[{type:1,id:1593}],id:1543,type:0},{name:"Grita Mexico C22",related_seasons:[{type:1,id:1522}],id:1487,type:0}],tournament:{show_logos:0,tournament_type:0,name:"Sub-18",logo:null,id:1096,tournament_status:0,order:6}}],i={token:"",token_b2c:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MjQyNTQsIm5hbWUiOiJHb2xTdGF0cyIsInVzZXJuYW1lIjoiZ29sdGVzdGluZyIsImVtYWlsIjoiIiwicHJvdmlkZXJfaWQiOjEsImxvZ2luX2dvbHN0YXRzIjoxLCJpYXQiOjE3MDA3ODkyNTcsImV4cCI6MTczMjMyNTI1N30.4iVGU3Q8rcNFRkYiPEmEYj1pB_UoYr1L5virEIpmGhs",id:24254,username:"goltesting",name:"GolStats",team:1,player:0,tournament:1,type_system:"presidents",language:"es",active_time:1,season:1772,is_player:0,related_seasons:[],is_goalkeeper:0,show_dashboard:1,user_type:1,premiumAccount:!0,userType:1,accessVideos:!0,sessionExpiration:1701869305930},n=s.computed(()=>a.reduce((r,o)=>{const l={...o.tournament,seasons:o.seasons};return l.seasons.forEach(c=>{r.set(c.id,l)}),r},new Map));return(r,o)=>(s.openBlock(),s.createElementBlock("div",UEe,[s.createVNode(s.unref(VEe),{"season-selected-id":1772,user:i,section:jEe,token:t.value,"tournaments-for-media-player":n.value,"background-color":""},null,8,["token","tournaments-for-media-player"])]))}},[["__scopeId","data-v-6fdc2bb3"]]),HEe={PO1:"CFI",PO2:"CFV",PO3:"SFI",PO4:"SFV",PO5:"FI",PO6:"FV"},qEe={DF:"Dieciseisavos",OF:"Octavos",CF:"Cuartos",SF:"Semifinales","3ER":"Tercer lugar",FINAL:"Final"},WEe={4:"Octavos",5:"Cuartos",6:"Semifinales",7:"Final"},GEe=(e,t)=>{const a=e.__vccOpts||e;for(const[i,n]of t)a[i]=n;return a},d1={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(e){this.status=e}}},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(e){this.$emit("click",e),this.typeOnOff&&(this.status=!this.status,this.$emit("status",this.status))}}},eP=()=>{s.useCssVars(e=>({"1c960139":e.height,b2f635d8:e.borderWidthBtn,"06e99898":e.borderType,"55555c76":e.borderColor,"23b6d320":e.borderRadius,"22c97374":e.width,"22bb09fa":e.backgroundColor,c148da7c:e.cursorType,cce756fc:e.fontSize,cff98d60:e.fontStyle,"5123b3a5":e.fontFamily,"47bf58db":e.marginLeftStat,cadc8414:e.fontSizeStat}))},tP=d1.setup;d1.setup=tP?(e,t)=>(eP(),tP(e,t)):eP;const KEe=e=>(s.pushScopeId("data-v-fb269a1e"),e=e(),s.popScopeId(),e),XEe=["src"],JEe={key:1,class:"text"},YEe=["src"],QEe={class:"stats"},ZEe=KEe(()=>s.createElementVNode("img",{class:"iconstats",src:"https://az755631.vo.msecnd.net/todoelfut/playdes.png"},null,-1)),$Ee={class:"numstats"},e5e={class:"leyend"};function t5e(e,t,a,i,n,r){return s.openBlock(),s.createElementBlock("div",null,[a.type==0?(s.openBlock(),s.createElementBlock("div",{key:0,class:s.normalizeClass(["button",n.status&&a.typeOnOff&&"button-active"]),style:s.normalizeStyle([r.customStyle,n.status&&a.typeOnOff&&r.customActive]),onClick:t[0]||(t[0]=(...o)=>r.btnClick&&r.btnClick(...o))},[a.icon&&a.iconPosition.toLowerCase()==="left"?(s.openBlock(),s.createElementBlock("img",{key:0,class:"icon",style:s.normalizeStyle({width:a.iconSize}),src:a.icon},null,12,XEe)):s.createCommentVNode("",!0),a.textValue?(s.openBlock(),s.createElementBlock("div",JEe,s.toDisplayString(a.textValue),1)):s.createCommentVNode("",!0),a.icon&&a.iconPosition.toLowerCase()==="right"?(s.openBlock(),s.createElementBlock("img",{key:2,class:"icon",style:s.normalizeStyle({width:a.iconSize}),src:a.icon},null,12,YEe)):s.createCommentVNode("",!0)],6)):s.createCommentVNode("",!0),a.type==1?(s.openBlock(),s.createElementBlock("div",{key:1,class:"button-target",onClick:t[1]||(t[1]=(...o)=>r.btnClick&&r.btnClick(...o))},[s.createElementVNode("div",QEe,[ZEe,s.createElementVNode("div",$Ee,s.toDisplayString(a.textStat),1)]),s.createElementVNode("div",e5e,s.toDisplayString(a.textCategory),1)])):s.createCommentVNode("",!0)])}const a5e=GEe(d1,[["render",t5e],["__scopeId","data-v-fb269a1e"]]),i5e={class:"gsc-dropdown__main-container__item-selected"},n5e=["height","width"],r5e=["stroke"],s5e={class:"gsc-dropdown__items-container"},o5e=["onClick"],l5e={key:0,class:"gsc-dropdown__items-footer"},c5e={__name:"GSC-Dropdown",props:{modelValue:{type:[Object,Number,String],default:()=>null},height:{type:String,default:"fit-content"},width:{type:String,default:"fit-content"},fontSize:{type:String,default:"14px"},borderRadius:{type:Number,default:5},arrowHeight:{type:Number,default:24},arrowWidth:{type:Number,default:24},borderType:{type:String,default:"solid",validator:function(e){return["solid","dotted","dashed"].includes(e)}},borderWidth:{type:Number,default:1},borderColor:{type:String,default:"black"},backgroundColor:{type:String,default:"grey"},color:{type:String,default:"black"},arrowColor:{type:String,default:"#CBEE6B"},items:{type:Array,default:()=>[]},defaultItemByIndex:{type:Number,default:0},defaultItemByProp:{type:Object,default:null,validator:e=>["propName","value"].every(t=>t in e)},listBackgroundColor:{type:String,default:"white"},hoverBackgroundColor:{type:String,default:"#f1f1f1"},listItemPadding:{type:String,default:"10px 12px"},listHeight:{type:String,default:"fit-content"},listItemSelectedColor:{type:String,default:"white"},listItemSelectedBackgroundColor:{type:String,default:"#399cfd"},listItemColor:{type:String,default:"black"},listBorderRadius:{type:String,default:"0"},listBorderColor:{type:String,default:""},listBorderWidth:{type:Number,default:1},isListSameWidth:{type:Boolean,default:!1},isMultipleOption:{type:Boolean,default:!1},footerBorderColor:{type:String,default:"#626970"},footerBorderWidth:{type:Number,default:1},isFooterVisible:{type:Boolean,default:!1},isDisabled:{type:Boolean,default:!1},onlyFirstTime:{type:Boolean,default:!1}},emits:["input","click-ready","update:modelValue"],setup(e,{emit:t}){const a=e,i=s.ref({}),n=s.ref(a.isMultipleOption?-1:0),r=s.ref(!1);s.watch(()=>a.items,(h,p)=>{if(!a.modelValue&&(!a.onlyFirstTime||!p||!p.length)&&h&&h.length){if(a.defaultItemByProp){const m=a.items.findIndex(f=>f[a.defaultItemByProp.propName]===a.defaultItemByProp.value);m!==-1?(n.value=m,i.value=h[m]):(n.value=0,i.value=h[0])}else i.value=h[a.defaultItemByIndex];t("input",i.value)}},{immediate:!0}),s.watch(()=>a.modelValue,h=>{if(h){const p=a.items.findIndex(m=>typeof h=="object"?JSON.stringify(m)===JSON.stringify(h):m===h);p!==-1&&(n.value=p,i.value=a.items[p],t("update:modelValue",i.value))}},{immediate:!0});const o=s.computed(()=>({height:a.height,width:a.width,backgroundColor:a.backgroundColor,borderRadius:`${a.borderRadius}px`,border:`${a.borderType} ${a.borderWidth}px ${a.borderColor}`,color:a.color,"--hover-background-color":a.hoverBackgroundColor,"--list-item-padding":a.listItemPadding,"--list-background-color":a.listBackgroundColor,"--list-height":a.listHeight,"--list-item-selected-color":a.listItemSelectedColor,"--list-item-selected-background-color":a.listItemSelectedBackgroundColor,"--list-item-color":a.listItemColor,"--list-border-radius":`${a.listBorderRadius}`,"--list-border-color":a.listBorderColor,"--list-width":a.isListSameWidth?a.width:"fit-content","--list-border-width":`${a.listBorderWidth}px`,"--footer-border":`${a.footerBorderWidth}px solid ${a.footerBorderColor}`,"--dropdown-opacity":a.isDisabled?"0.5":"1","--dropdown-cursor":a.isDisabled?"not-allowed":"pointer","--dropdown-font-size":a.fontSize?a.fontSize:"14px"})),l=s.computed(()=>({height:`${a.arrowHeight}px`,width:`${a.arrowWidth}px`}));function c(){a.isDisabled||(r.value=!r.value)}function d(h,p){a.isMultipleOption?n.value=-1:(n.value=p,r.value=!1),i.value=h,t("input",i.value),t("update:modelValue",i.value)}function u(){r.value=!1,t("click-ready")}return(h,p)=>(s.openBlock(),s.createElementBlock("div",{class:"gsc-dropdown",style:s.normalizeStyle(o.value)},[s.createElementVNode("div",{class:"gsc-dropdown__main-container",style:s.normalizeStyle({"padding-right":`${e.arrowWidth+8}px`}),onClick:c},[s.createElementVNode("div",i5e,[s.renderSlot(h.$slots,"default",{selectedItem:i.value})]),s.createElementVNode("div",{class:s.normalizeClass(["gsc-dropdown__main-container__icon",{"rotated-180":r.value}]),style:s.normalizeStyle(l.value)},[(s.openBlock(),s.createElementBlock("svg",{height:e.arrowHeight,width:e.arrowWidth,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[s.createElementVNode("path",{d:"M18.394 9.13501L13.1302 14.3988C12.5086 15.0204 11.4914 15.0204 10.8697 14.3988L5.60596 9.13501",stroke:e.arrowColor},null,8,r5e)],8,n5e))],6)],4),s.createVNode(s.Transition,null,{default:s.withCtx(()=>[s.withDirectives(s.createElementVNode("div",s5e,[s.createElementVNode("div",null,[s.createElementVNode("div",{class:"gsc-dropdown__items",style:s.normalizeStyle({"margin-top":`${a.borderWidth}px`})},[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(e.items,(m,f)=>(s.openBlock(),s.createElementBlock("div",{class:s.normalizeClass(["gsc-dropdown__items__item",{selected:f===n.value}]),key:f,onClick:v=>d(m,f)},[s.renderSlot(h.$slots,"availableItem",{item:m})],10,o5e))),128))],4),e.isFooterVisible?(s.openBlock(),s.createElementBlock("div",l5e,[s.createVNode(s.unref(a5e),{"text-value":"Listo","border-color":"#cbee6b","font-size":"12px",width:"72px",height:"22px","border-radius":"62px","border-width":.8,onClick:u})])):s.createCommentVNode("",!0)])],512),[[s.vShow,r.value]])]),_:3})],4))}},d5e=(e,t)=>{const a=e.__vccOpts||e;for(const[i,n]of t)a[i]=n;return a},u5e={class:"tournament-select__selected-tournament"},h5e={class:"tournament-select__selected-tournament__logo"},p5e=["src"],m5e={class:"tournament-select__selected-tournament__name"},f5e={__name:"GSCTournamentSelect",props:{apiUrl:{type:String,default:"https://kefloixzy1.execute-api.us-west-2.amazonaws.com/prod/gs3/tournaments"},fontFamily:{type:String,default:"sans-serif"},logosUrl:{type:String,default:"https://az755631.vo.msecnd.net/todoelfut/"},logoFileType:{type:String,default:"png"},height:{type:String,default:"40px"},width:{type:String,default:"179px"},borderRadius:{type:Number,default:8},arrowHeight:{type:Number,default:24},arrowWidth:{type:Number,default:24},borderType:{type:String,default:"solid",validator:function(e){return["solid","dotted","dashed"].includes(e)}},borderWidth:{type:Number,default:1},borderColor:{type:String,default:"rgba(255, 255, 255, 0.2)"},backgroundColor:{type:String,default:"#0d1d29"},color:{type:String,default:"white"},arrowColor:{type:String,default:"#CBEE6B"},items:{type:Array,default:()=>[]},defaultItemByIndex:{type:Number,default:0},defaultItemByProp:{type:Object,default:null,validator:e=>["propName","value"].every(t=>t in e)},currentSeasonId:{type:Number,default:0}},emits:["input"],setup(e,{emit:t}){const a=e,i=s.ref([]),n=s.computed(()=>{const h={};return a.fontFamily&&(h["font-family"]=`${a.fontFamily}`),h}),r=s.computed(()=>i.value.find(h=>h.seasonsIds.has(a.currentSeasonId))||i.value[0]);async function o(){try{if(a.items&&a.items.length)i.value=[...a.items];else if(a.apiUrl){const h=await c();i.value=h.map(p=>({...p.tournament,seasons:p.seasons,seasonsIds:p.seasons.reduce((m,f)=>(m.add(f.id),m),new Set)})).sort((p,m)=>p.order-m.order)}}catch(h){throw new Error(h)}}function l(h){const p=new XMLHttpRequest,m=`${a.logosUrl}${h}.${a.logoFileType}`;return p.open("HEAD",m,!1),p.send(),p.status!==404}async function c(){try{return(await fetch(a.apiUrl)).json()}catch(h){return Promise.reject(h)}}function d(h){t("input",h)}function u(h){t("input",h)}return s.onMounted(()=>{o()}),(h,p)=>(s.openBlock(),s.createElementBlock("div",{class:"tournament-select",style:s.normalizeStyle(n.value)},[s.createVNode(s.unref(c5e),s.mergeProps(a,{"model-value":r.value,items:i.value,onInput:d,"onUpdate:modelValue":u}),{default:s.withCtx(({selectedItem:m})=>[s.createElementVNode("div",u5e,[s.createElementVNode("div",h5e,[l(m.id)?(s.openBlock(),s.createElementBlock("img",{key:0,src:`${a.logosUrl}${m.id}.${a.logoFileType}`,alt:""},null,8,p5e)):s.createCommentVNode("",!0)]),s.createElementVNode("div",m5e,s.toDisplayString(m.name),1)])]),availableItem:s.withCtx(({item:m})=>[s.createElementVNode("div",null,s.toDisplayString(m.name),1)]),_:1},16,["model-value","items"])],4))}},g5e=d5e(f5e,[["__scopeId","data-v-0426ea5e"]]),y5e=(e,t)=>{const a=e.__vccOpts||e;for(const[i,n]of t)a[i]=n;return a},u1={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(e){this.status=e}}},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(e){this.$emit("click",e),this.typeOnOff&&(this.status=!this.status,this.$emit("status",this.status))}}},aP=()=>{s.useCssVars(e=>({"1c960139":e.height,b2f635d8:e.borderWidthBtn,"06e99898":e.borderType,"55555c76":e.borderColor,"23b6d320":e.borderRadius,"22c97374":e.width,"22bb09fa":e.backgroundColor,c148da7c:e.cursorType,cce756fc:e.fontSize,cff98d60:e.fontStyle,"5123b3a5":e.fontFamily,"47bf58db":e.marginLeftStat,cadc8414:e.fontSizeStat}))},iP=u1.setup;u1.setup=iP?(e,t)=>(aP(),iP(e,t)):aP;const _5e=e=>(s.pushScopeId("data-v-fb269a1e"),e=e(),s.popScopeId(),e),b5e=["src"],v5e={key:1,class:"text"},S5e=["src"],w5e={class:"stats"},T5e=_5e(()=>s.createElementVNode("img",{class:"iconstats",src:"https://az755631.vo.msecnd.net/todoelfut/playdes.png"},null,-1)),C5e={class:"numstats"},k5e={class:"leyend"};function E5e(e,t,a,i,n,r){return s.openBlock(),s.createElementBlock("div",null,[a.type==0?(s.openBlock(),s.createElementBlock("div",{key:0,class:s.normalizeClass(["button",n.status&&a.typeOnOff&&"button-active"]),style:s.normalizeStyle([r.customStyle,n.status&&a.typeOnOff&&r.customActive]),onClick:t[0]||(t[0]=(...o)=>r.btnClick&&r.btnClick(...o))},[a.icon&&a.iconPosition.toLowerCase()==="left"?(s.openBlock(),s.createElementBlock("img",{key:0,class:"icon",style:s.normalizeStyle({width:a.iconSize}),src:a.icon},null,12,b5e)):s.createCommentVNode("",!0),a.textValue?(s.openBlock(),s.createElementBlock("div",v5e,s.toDisplayString(a.textValue),1)):s.createCommentVNode("",!0),a.icon&&a.iconPosition.toLowerCase()==="right"?(s.openBlock(),s.createElementBlock("img",{key:2,class:"icon",style:s.normalizeStyle({width:a.iconSize}),src:a.icon},null,12,S5e)):s.createCommentVNode("",!0)],6)):s.createCommentVNode("",!0),a.type==1?(s.openBlock(),s.createElementBlock("div",{key:1,class:"button-target",onClick:t[1]||(t[1]=(...o)=>r.btnClick&&r.btnClick(...o))},[s.createElementVNode("div",w5e,[T5e,s.createElementVNode("div",C5e,s.toDisplayString(a.textStat),1)]),s.createElementVNode("div",k5e,s.toDisplayString(a.textCategory),1)])):s.createCommentVNode("",!0)])}const I5e=y5e(u1,[["render",E5e],["__scopeId","data-v-fb269a1e"]]),x5e={class:"gsc-dropdown__main-container__item-selected"},N5e=["height","width"],A5e=["stroke"],P5e={class:"gsc-dropdown__items-container"},O5e=["onClick"],B5e={key:0,class:"gsc-dropdown__items-footer"},D5e={__name:"GSC-Dropdown",props:{modelValue:{type:[Object,Number,String],default:()=>null},height:{type:String,default:"fit-content"},width:{type:String,default:"fit-content"},fontSize:{type:String,default:"14px"},borderRadius:{type:Number,default:5},arrowHeight:{type:Number,default:24},arrowWidth:{type:Number,default:24},borderType:{type:String,default:"solid",validator:function(e){return["solid","dotted","dashed"].includes(e)}},borderWidth:{type:Number,default:1},borderColor:{type:String,default:"black"},backgroundColor:{type:String,default:"grey"},color:{type:String,default:"black"},arrowColor:{type:String,default:"#CBEE6B"},items:{type:Array,default:()=>[]},defaultItemByIndex:{type:Number,default:0},defaultItemByProp:{type:Object,default:null,validator:e=>["propName","value"].every(t=>t in e)},listBackgroundColor:{type:String,default:"white"},hoverBackgroundColor:{type:String,default:"#f1f1f1"},listItemPadding:{type:String,default:"10px 12px"},listHeight:{type:String,default:"fit-content"},listItemSelectedColor:{type:String,default:"white"},listItemSelectedBackgroundColor:{type:String,default:"#399cfd"},listItemColor:{type:String,default:"black"},listBorderRadius:{type:String,default:"0"},listBorderColor:{type:String,default:""},listBorderWidth:{type:Number,default:1},isListSameWidth:{type:Boolean,default:!1},isMultipleOption:{type:Boolean,default:!1},footerBorderColor:{type:String,default:"#626970"},footerBorderWidth:{type:Number,default:1},isFooterVisible:{type:Boolean,default:!1},isDisabled:{type:Boolean,default:!1},onlyFirstTime:{type:Boolean,default:!1}},emits:["input","click-ready","update:modelValue"],setup(e,{emit:t}){const a=e,i=s.ref({}),n=s.ref(a.isMultipleOption?-1:0),r=s.ref(!1);s.watch(()=>a.items,(h,p)=>{if(!a.modelValue&&(!a.onlyFirstTime||!p||!p.length)&&h&&h.length){if(a.defaultItemByProp){const m=a.items.findIndex(f=>f[a.defaultItemByProp.propName]===a.defaultItemByProp.value);m!==-1?(n.value=m,i.value=h[m]):(n.value=0,i.value=h[0])}else i.value=h[a.defaultItemByIndex];t("input",i.value)}},{immediate:!0}),s.watch(()=>a.modelValue,h=>{if(h){const p=a.items.findIndex(m=>typeof h=="object"?JSON.stringify(m)===JSON.stringify(h):m===h);p!==-1&&(n.value=p,i.value=a.items[p],t("update:modelValue",i.value))}},{immediate:!0});const o=s.computed(()=>({height:a.height,width:a.width,backgroundColor:a.backgroundColor,borderRadius:`${a.borderRadius}px`,border:`${a.borderType} ${a.borderWidth}px ${a.borderColor}`,color:a.color,"--hover-background-color":a.hoverBackgroundColor,"--list-item-padding":a.listItemPadding,"--list-background-color":a.listBackgroundColor,"--list-height":a.listHeight,"--list-item-selected-color":a.listItemSelectedColor,"--list-item-selected-background-color":a.listItemSelectedBackgroundColor,"--list-item-color":a.listItemColor,"--list-border-radius":`${a.listBorderRadius}`,"--list-border-color":a.listBorderColor,"--list-width":a.isListSameWidth?a.width:"fit-content","--list-border-width":`${a.listBorderWidth}px`,"--footer-border":`${a.footerBorderWidth}px solid ${a.footerBorderColor}`,"--dropdown-opacity":a.isDisabled?"0.5":"1","--dropdown-cursor":a.isDisabled?"not-allowed":"pointer","--dropdown-font-size":a.fontSize?a.fontSize:"14px"})),l=s.computed(()=>({height:`${a.arrowHeight}px`,width:`${a.arrowWidth}px`}));function c(){a.isDisabled||(r.value=!r.value)}function d(h,p){a.isMultipleOption?n.value=-1:(n.value=p,r.value=!1),i.value=h,t("input",i.value),t("update:modelValue",i.value)}function u(){r.value=!1,t("click-ready")}return(h,p)=>(s.openBlock(),s.createElementBlock("div",{class:"gsc-dropdown",style:s.normalizeStyle(o.value)},[s.createElementVNode("div",{class:"gsc-dropdown__main-container",style:s.normalizeStyle({"padding-right":`${e.arrowWidth+8}px`}),onClick:c},[s.createElementVNode("div",x5e,[s.renderSlot(h.$slots,"default",{selectedItem:i.value})]),s.createElementVNode("div",{class:s.normalizeClass(["gsc-dropdown__main-container__icon",{"rotated-180":r.value}]),style:s.normalizeStyle(l.value)},[(s.openBlock(),s.createElementBlock("svg",{height:e.arrowHeight,width:e.arrowWidth,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[s.createElementVNode("path",{d:"M18.394 9.13501L13.1302 14.3988C12.5086 15.0204 11.4914 15.0204 10.8697 14.3988L5.60596 9.13501",stroke:e.arrowColor},null,8,A5e)],8,N5e))],6)],4),s.createVNode(s.Transition,null,{default:s.withCtx(()=>[s.withDirectives(s.createElementVNode("div",P5e,[s.createElementVNode("div",null,[s.createElementVNode("div",{class:"gsc-dropdown__items",style:s.normalizeStyle({"margin-top":`${a.borderWidth}px`})},[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(e.items,(m,f)=>(s.openBlock(),s.createElementBlock("div",{class:s.normalizeClass(["gsc-dropdown__items__item",{selected:f===n.value}]),key:f,onClick:v=>d(m,f)},[s.renderSlot(h.$slots,"availableItem",{item:m})],10,O5e))),128))],4),e.isFooterVisible?(s.openBlock(),s.createElementBlock("div",B5e,[s.createVNode(s.unref(I5e),{"text-value":"Listo","border-color":"#cbee6b","font-size":"12px",width:"72px",height:"22px","border-radius":"62px","border-width":.8,onClick:u})])):s.createCommentVNode("",!0)])],512),[[s.vShow,r.value]])]),_:3})],4))}},L5e=(e,t)=>{const a=e.__vccOpts||e;for(const[i,n]of t)a[i]=n;return a},M5e={class:"season-name"},R5e={components:{GSCSeasonSelect:L5e({__name:"GSC-SeasonSelect",props:{seasons:{type:Array,default:()=>[]},currentSeasonId:{type:Number,default:0}},emits:["input"],setup(e,{emit:t}){const a=e,i=t,n=s.computed(()=>a.seasons.find(l=>l.id===a.currentSeasonId));function r(l){i("input",l)}function o(l){i("input",l)}return(l,c)=>(s.openBlock(),s.createBlock(s.unref(D5e),{items:e.seasons,"model-value":n.value,height:"40px",width:"179px","background-color":"#0d1d29",color:"white","border-color":"rgba(255, 255, 255, 0.2)","font-family":"Poppins-Regular","border-radius":8,onInput:o,"onUpdate:modelValue":r},{default:s.withCtx(({selectedItem:d})=>[s.createElementVNode("div",M5e,[s.createElementVNode("span",null,s.toDisplayString(d.name),1)])]),availableItem:s.withCtx(({item:d})=>[s.createElementVNode("span",null,s.toDisplayString(d.name),1)]),_:1},8,["items","model-value"]))}},[["__scopeId","data-v-cb91d262"]]),GSCTournamentSelect:g5e,GSCGames:ej,GSCGridTeamsMatches:l7,GSCPlayersLanding:t7,GSCTops:tz,GSCTableCalendar:YV,GSCMediaPlayer:zEe},setup(){const e=s.ref("landingref"),{elementSize:t}=AO(e);return{landingref:e,elementSize:t}},watch:{team:{immediate:!0,deep:!0,async handler(e){if(Object.keys(this.seasonSelected).length!==0){const t=await this.generateSeasons(this.seasonSelected);this.seasonsSelected=t,this.fetchGames(e,t)}}},closestRound(e){this.selectedRoundKeyIndex=this.tournamentScheduleKeys.findIndex(t=>t===e),this.selectedRound=e}},props:{currentSeasonId:{type:Number,default:0},season:{type:Number,default:1772},isplayer:{type:Boolean,default:!1},user:{type:Object,default:()=>{}},team:{type:Number,default:0},player:{type:Number,default:0},gamesPerMatchDay:{type:Number,default:0,validator(e){return!Number.isNaN(e)&&e>=0}}},data(){return{defaultGameId:0,lastSeasonsIds:[],gamesPages:new Map,selectedRoundKeyIndex:0,selectedRound:0,fullTournamentScheduleFull:[],defaultMatchDayKey:null,isCupTournament:!1,retries:3,userTeamGames:[],isCupLegacyTournament:!1,tournamentScheduleKeys:[],currentTournamentGames:null,currentTournamentTeams:null,gamesUrl:"https://qyyibs1w0d.execute-api.us-west-2.amazonaws.com/prod/calendar/gamesBySeason/",gamesUrl2:"https://qyyibs1w0d.execute-api.us-west-2.amazonaws.com/prod/calendar/gamesBySeason?",seasonSelected:{},seasonSelectedDropDowns:{},seasonsSelected:[],fullTournamentSchedule:{},tournamentSelected:{},tournamentSelectedDropDowns:{seasons:[]},playersLength:0,tokenFree:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MCwibmFtZSI6IlVzdWFyaW8gRnJlZSIsInVzZXJuYW1lIjoiZnJlZUBnb2xzdGF0cy5jb20iLCJlbWFpbCI6ImZyZWVAZ29sc3RhdHMuY29tIiwiaWF0IjoxNjA2NzU4Nzk1LCJleHAiOjE2MzgyOTQ3OTV9.kPNmP7yDtk38cAXrUyc7OHRh6J25VFqy-XUNzbK-4YE"}},computed:{gamesFullLeague(){var e=[];for(let t=0;t<this.fullTournamentScheduleFull[this.selectedRound].length;t++)for(let a=0;a<this.fullTournamentScheduleFull[this.selectedRound][t].games.length;a++)e.push(this.fullTournamentScheduleFull[this.selectedRound][t].games[a]);return e},closestRound(){return this.userTeamGames&&this.userTeamGames.length?this.getUserTeamClosestRound(this.fullTournamentScheduleFull):this.getNormalClosestRound(this.fullTournamentScheduleFull)},containerGridCalendarTable(){return this.elementSize.width<=1e3?"container-grid-calendar-table-mobile":"container-grid-calendar-table"},containerbackground(){return this.elementSize.width<=680?"container-background-movil":"container-background"},containerdata(){return this.elementSize.width<=680?"container-data-movil":"container-data"}},methods:{onAction(e){this.$emit("action",e)},onOpenMedia(e){this.$emit("openmedia",e)},onOpenProfile(e){this.$emit("onOpenProfile",e)},onClickMatch(e){this.$emit("openGame",e)},onClickCalendar(){const e={type:this.tournamentSelected.id==this.user.tournament?1:0,team:this.team,season:this.seasonSelectedDropDowns};this.$emit("onClickMyCalendar",e)},moreTops(){const e={team:this.team,season:this.seasonSelectedDropDowns};this.$emit("openTops",e)},clickProfileBtn(e){this.$emit("openProfile",e)},viewAll(){const e={team:this.team,season:this.seasonSelectedDropDowns};this.$emit("openAllPlayers",e)},getTotalPlayers(e){this.playersLength=e},clickCard(e){const t={data:e,isPlayer:this.isplayer};this.$emit("clickOnMainCards",t)},async fetchGames(e,t){const a=t.map(n=>`seasons=${n.id}`).join("&"),i=Sc.create({headers:{Authorization:`${this.tokenFree}`}});this.fullTournamentSchedule=await i.get(this.gamesUrl+e+"?"+a)},async generateSeasons(e){const t=[{id:e.id,type:e.type}];return e.related_seasons&&e.related_seasons.length&&t.push(...e.related_seasons.map(a=>({id:a.id,type:a.type}))),t},async onInputTournament(e){this.tournamentSelected=e,this.tournamentSelectedDropDowns.id!==e.id&&(this.tournamentSelectedDropDowns=e)},async onInputSeason(e){if(this.seasonSelected=e,this.tournamentSelected.id!=this.user.tournament){const t=await this.generateSeasons(this.seasonSelected);this.seasonsSelected=t,await this.createFullTournamentScheme(t,!1)}else{const t=await this.generateSeasons(this.seasonSelected);this.seasonsSelected=t,await this.fetchGames(this.user.team,t)}this.seasonSelectedDropDowns!==e.id&&(this.seasonSelectedDropDowns=e.id,this.$emit("change-season-id",e.id))},async fetchTournaments(e){try{const{data:t}=await Sc.get("https://kefloixzy1.execute-api.us-west-2.amazonaws.com/prod/tournaments");return t}catch(t){if(e>0)return this.fetchTournaments(e-1);throw new Error(t)}},async fetchSeasonsGamesAndTeams(e,t,a=""){let i=a;try{i||(i=this.gamesUrl2,e.forEach((l,c)=>{i+=`${c===0?"":"&"}seasons=${l}`}));const n=Sc.create({headers:{Authorization:`${this.tokenFree}`}}),{data:{data:r,teams:o}}=await n.get(i);return{seasonsAndGames:r,seasonsAndTeams:o}}catch(n){if(t>0)return this.fetchSeasonsGamesAndTeams(e,t-1,i);throw new Error(n)}},areSeasonsDifferent(e){for(const t of e)if(!this.lastSeasonsIds.includes(t.season_id))return!0;return!1},async createFullTournamentScheme(e,t){try{this.fullTournamentSchedule={},this.userTeamGames=[];let a=0;const{seasonsAndGames:i,seasonsAndTeams:n}=await this.fetchSeasonsGamesAndTeams(e.map(c=>c.id),3);if(t&&this.areSeasonsDifferent(i))return;i.forEach(c=>{const{type:d}=e.find(u=>u.id===c.season_id);c.type=d,c.games.forEach(u=>{u.season_id=c.season_id}),d===0&&(a=c.season_id)});const r={seasonsGames:i},{teams:o}=n.find(c=>c.season_id===a),l=r&&r.seasonsGames?r.seasonsGames.map(c=>{const d=c.games.reduce((u,h)=>{const p={...h};return p.dateTimeMillis=new Date(p.date_time_utc).valueOf(),p.home_team=o.find(m=>m.team_id===h.home_team),p.visiting_team=o.find(m=>m.team_id===h.visiting_team),u[h.matchday_abbreviation]?u[h.matchday_abbreviation][h.game_status===3?"canceled":h.date]?u[h.matchday_abbreviation][h.game_status===3?"canceled":h.date].push(p):u[h.matchday_abbreviation][h.game_status===3?"canceled":h.date]=[p]:u[h.matchday_abbreviation]={[h.game_status===3?"canceled":h.date]:[p]},this.gsData&&this.gsData.teamId&&p.game_status===4&&(p.home_team.team_id===this.gsData.teamId||p.visiting_team.team_id===this.gsData.teamId)&&this.userTeamGames.push(p),u},{});this.userTeamGames.sort((u,h)=>u.dateTimeMillis-h.dateTimeMillis);for(let[u,h]of Object.entries(d))d[u]=Object.entries(h).map(([p,m])=>({date:p,games:m.sort((f,v)=>f.dateTimeMillis-v.dateTimeMillis)})),d[u].sort((p,m)=>p.date<m.date?-1:p.date>m.date?1:0);return{type:c.type,weight:c.type===0?0:c.type===2?1:2,schedule:d}}):[];l.sort((c,d)=>c.weight-d.weight),this.fullTournamentScheduleFull=l.reduce((c,d)=>{for(const[u,h]of Object.entries(d.schedule))if(d.type===0)if(this.isCup){const p=u.replace("M",""),m=`Jornada ${p}`;this.isCupLegacy?c[WEe[p]||m]=h:c[qEe[u]||m]=h}else c[Number(u.replace("M","")).toString()]=h;else d.type===2?["PI1","PI2"].includes(u)?c[u]=h:c[`R${Number(u.replace("PO",""))}`]=h:d.type===1&&(c[HEe[u]]=h);return c},{}),this.tournamentScheduleKeys=Object.keys(this.fullTournamentScheduleFull)}catch(a){throw new Error(a)}finally{this.loadingFlag=!1}},getNormalClosestRound(e){const a=Object.entries(Object.entries(e).reduce((r,[o,l])=>(r[o]=[],l.forEach(c=>{c.games.forEach(d=>{const u=new Date(d.date_time_utc).getTime()+66e5;r[o].push(u)})}),r),{}));if(!a.length)return"1";const i=new Date().getTime(),n=a.reduce((r,[o,l])=>{let c=null;return l.forEach(d=>{const u=d-i;u>=0&&(c===null||u<c)&&(c=u)}),c&&(r.shortestTime===null||c<r.shortestTime)&&(r.round=o,r.shortestTime=c),r},{round:"",shortestTime:null});return n.shortestTime!==null?n.round:a[a.length-1][0]},getUserTeamClosestRound(e){let t=1;if(this.userTeamGames.length){const a=this.userTeamGames[0];for(const[i,n]of Object.entries(e))for(const r of n)if(r.games.find(l=>l.game_id===a.game_id))return i}return t}},async created(){const a=(await this.fetchTournaments(3)).find(n=>n._id===1).seasons[1],i=[{id:a.id,type:a.type}];a.related_seasons&&a.related_seasons.length&&i.push(...a.related_seasons.map(n=>({id:n.id,type:n.type}))),await this.createFullTournamentScheme(i,!1)}},F5e=e=>(s.pushScopeId("data-v-1d1c7fb4"),e=e(),s.popScopeId(),e),V5e={class:"gsclanding",ref:"landingref"},U5e={key:0,class:"container-selectors-mobile"},j5e={class:"container-selectors-mobile-tournament"},z5e={class:"container-selectors-mobile-season"},H5e={key:0,class:"home-item-movil"},q5e=F5e(()=>s.createElementVNode("div",{class:"home-movil"},"Inicio",-1)),W5e={class:"name-user-movil"},G5e={key:1,class:"home-item"},K5e={key:2,class:"bar-settings"},X5e={class:"name-user"},J5e={class:"container-selectors"},Y5e={class:"selector-tournament"},Q5e={class:"selector-seasons"},Z5e={key:3,class:"container-games"},$5e={key:4,class:"container-players"},e4e={class:"container-tops"},t4e={class:"container-vr"};function a4e(e,t,a,i,n,r){const o=s.resolveComponent("GSCTournamentSelect"),l=s.resolveComponent("GSCSeasonSelect"),c=s.resolveComponent("GSCGames"),d=s.resolveComponent("GSCGridTeamsMatches"),u=s.resolveComponent("GSCTableCalendar"),h=s.resolveComponent("GSCPlayersLanding"),p=s.resolveComponent("GSCTops"),m=s.resolveComponent("GSCMediaPlayer");return s.openBlock(),s.createElementBlock("div",V5e,[i.elementSize.width<=680?(s.openBlock(),s.createElementBlock("div",U5e,[s.createElementVNode("div",j5e,[s.createVNode(o,{"current-season-id":a.currentSeasonId,width:"100%",onInput:r.onInputTournament},null,8,["current-season-id","onInput"])]),s.createElementVNode("div",z5e,[s.createVNode(l,{"current-season-id":a.currentSeasonId,width:"100%",seasons:n.tournamentSelectedDropDowns.seasons,onInput:r.onInputSeason},null,8,["current-season-id","seasons","onInput"])])])):s.createCommentVNode("",!0),s.createElementVNode("div",{class:s.normalizeClass(r.containerbackground)},[s.createElementVNode("div",{class:s.normalizeClass(r.containerdata)},[i.elementSize.width<=680?(s.openBlock(),s.createElementBlock("div",H5e,[q5e,s.createElementVNode("div",W5e,[s.createTextVNode("Bienvenido "),a.user.name.split(",").length!=0?(s.openBlock(),s.createElementBlock(s.Fragment,{key:0},[a.user.name.split(",").length==1?(s.openBlock(),s.createElementBlock(s.Fragment,{key:0},[a.user.name.split(",")[0]!=""?(s.openBlock(),s.createElementBlock(s.Fragment,{key:0},[s.createTextVNode(", ")],64)):s.createCommentVNode("",!0),s.createTextVNode(s.toDisplayString(a.user.name.split(",")[0]),1)],64)):(s.openBlock(),s.createElementBlock(s.Fragment,{key:1},[a.user.name.split(",")[0]!=""?(s.openBlock(),s.createElementBlock(s.Fragment,{key:0},[s.createTextVNode(", ")],64)):s.createCommentVNode("",!0),s.createTextVNode(s.toDisplayString(a.user.name.split(",")[1]),1)],64))],64)):s.createCommentVNode("",!0)])])):s.createCommentVNode("",!0),i.elementSize.width>680?(s.openBlock(),s.createElementBlock("div",G5e,"Inicio")):s.createCommentVNode("",!0),i.elementSize.width>680?(s.openBlock(),s.createElementBlock("div",K5e,[s.createElementVNode("div",X5e,[s.createTextVNode("Bienvenido "),a.user.name.split(",").length!=0?(s.openBlock(),s.createElementBlock(s.Fragment,{key:0},[a.user.name.split(",").length==1?(s.openBlock(),s.createElementBlock(s.Fragment,{key:0},[a.user.name.split(",")[0]!=""?(s.openBlock(),s.createElementBlock(s.Fragment,{key:0},[s.createTextVNode(", ")],64)):s.createCommentVNode("",!0),s.createTextVNode(s.toDisplayString(a.user.name.split(",")[0]),1)],64)):(s.openBlock(),s.createElementBlock(s.Fragment,{key:1},[a.user.name.split(",")[0]!=""?(s.openBlock(),s.createElementBlock(s.Fragment,{key:0},[s.createTextVNode(", ")],64)):s.createCommentVNode("",!0),s.createTextVNode(s.toDisplayString(a.user.name.split(",")[1]),1)],64))],64)):s.createCommentVNode("",!0)]),s.createElementVNode("div",J5e,[s.createElementVNode("div",Y5e,[s.createVNode(o,{"current-season-id":a.currentSeasonId,onInput:r.onInputTournament},null,8,["current-season-id","onInput"])]),s.createElementVNode("div",Q5e,[s.createVNode(l,{"current-season-id":a.currentSeasonId,seasons:n.tournamentSelectedDropDowns.seasons,onInput:r.onInputSeason},null,8,["current-season-id","seasons","onInput"])])])])):s.createCommentVNode("",!0),Object.keys(n.tournamentSelected).length>0?(s.openBlock(),s.createElementBlock("div",Z5e,[s.createVNode(c,{"component-width":i.elementSize.width,isplayer:a.isplayer,"is-full":n.tournamentSelected.id!=a.user.tournament,onClickMatch:r.onClickMatch,onClickCalendar:r.onClickCalendar,data:n.tournamentSelected.id==a.user.tournament?n.fullTournamentSchedule:r.gamesFullLeague},null,8,["component-width","isplayer","is-full","onClickMatch","onClickCalendar","data"])])):s.createCommentVNode("",!0),s.createElementVNode("div",{class:s.normalizeClass(r.containerGridCalendarTable)},[s.createElementVNode("div",{class:"container-grid",style:s.normalizeStyle(i.elementSize.width<1e3?"width: 100%":"")},[s.createVNode(d,{isPlayer:a.isplayer?n.tournamentSelected.id==a.user.tournament:!1,"player-id":a.user.player,"team-id":a.user.team,"season-selected":n.seasonSelected.id,"next-rival-id":Object.keys(n.fullTournamentSchedule).length>0?a.user.team==n.fullTournamentSchedule.data.prematch.home_team?n.fullTournamentSchedule.data.prematch.visiting_team:n.fullTournamentSchedule.data.prematch.home_team:0,"team-img":"https://az755631.vo.msecnd.net/teams-150/"+a.user.team+".png","player-img":"https://az755631.vo.msecnd.net/players-profile/"+a.user.player+".png","rival-img":Object.keys(n.fullTournamentSchedule).length>0?a.user.team==n.fullTournamentSchedule.data.prematch.home_team?"https://az755631.vo.msecnd.net/teams-150/"+n.fullTournamentSchedule.data.prematch.visiting_team+".png":"https://az755631.vo.msecnd.net/teams-150/"+n.fullTournamentSchedule.data.prematch.home_team+".png":"","has-team":a.isplayer?!1:n.tournamentSelected.id==a.user.tournament,"component-width":i.elementSize.width,onAction:r.clickCard},null,8,["isPlayer","player-id","team-id","season-selected","next-rival-id","team-img","player-img","rival-img","has-team","component-width","onAction"])],4),s.createElementVNode("div",{class:"container-calendar-table",style:s.normalizeStyle(i.elementSize.width<1e3?"width: 100%; margin-top: 30px;":"")},[s.createVNode(u,{onAction:r.onAction,season:n.seasonSelected,seasons:n.seasonsSelected,onOpenmedia:r.onOpenMedia,onOnOpenProfile:r.onOpenProfile,componentWidth:i.elementSize.width},null,8,["onAction","season","seasons","onOpenmedia","onOnOpenProfile","componentWidth"])],4)],2),n.tournamentSelected.id==a.user.tournament?s.withDirectives((s.openBlock(),s.createElementBlock("div",$5e,[s.createVNode(h,{onClickProfileBtn:r.clickProfileBtn,onViewAll:r.viewAll,onTotalPlayers:r.getTotalPlayers,"team-id":a.user.team,"season-id":n.seasonSelected.id,"is-player":a.user.player!=0},null,8,["onClickProfileBtn","onViewAll","onTotalPlayers","team-id","season-id","is-player"])],512)),[[s.vShow,n.playersLength>0]]):s.createCommentVNode("",!0),s.createElementVNode("div",e4e,[s.createVNode(p,{onMore:r.moreTops,"show-switch":n.tournamentSelected.id==a.user.tournament,season:n.seasonSelected.id,"team-id":a.user.team,onOpenmedia:r.onOpenMedia},null,8,["onMore","show-switch","season","team-id","onOpenmedia"])]),s.createElementVNode("div",t4e,[s.createVNode(m)])],2)],2)],512)}const i4e=si(R5e,[["render",a4e],["__scopeId","data-v-1d1c7fb4"]]),n4e=(e,t)=>{const a=e.__vccOpts||e;for(const[i,n]of t)a[i]=n;return a},r4e={key:1},s4e={width:"10",height:"8",viewBox:"0 0 10 8",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o4e=["fill"],l4e={key:0,class:"checkbox__teams"},c4e={class:"checkbox__teams__logo"},d4e=["src"],u4e={class:"checkbox__teams__logo"},h4e=["src"],p4e={__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(e){return["left","right","top","bottom"].includes(e)}},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(e,{emit:t}){const a=e;s.useCssVars(d=>({70501426:e.width,"1957cde0":e.height}));const i=s.ref(!1),n=s.computed(()=>{const d={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 i.value?(d["background-color"]=a.boxBackgroundColor,d.border=`solid ${a.boxBorderWidth} ${a.boxBackgroundColor}`):d.border=`solid ${a.boxBorderWidth} ${a.boxBorderColor}`,d}),r=s.computed(()=>({"font-family":a.boxValueFontFamily,"font-size":a.boxValueFontSize,color:a.boxValueColor,"line-height":1})),o=s.computed(()=>{const d={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")&&(d[`margin-${a.boxPosition}`]=a.isBoxOnly?"0":a.teamsIds?"8px":"10px"),d});s.watch(()=>a.modelValue,d=>{d!==i.value&&(i.value=d)},{immediate:!0});function l(){a.avoidInteraction||!i.value&&a.avoidToCheck||(i.value=!i.value,t("update:modelValue",i.value))}function c(d){return`${{}.TEAM_LOGOS_URL||"https://az755631.vo.msecnd.net/teams-80/"}${d}.png`}return(d,u)=>(s.openBlock(),s.createElementBlock("div",{class:s.normalizeClass(["checkbox",`box-${e.boxPosition}`]),onClick:l},[s.createElementVNode("div",{class:"checkbox__box",style:s.normalizeStyle(n.value)},[i.value?(s.openBlock(),s.createElementBlock(s.Fragment,{key:0},[a.boxValue?(s.openBlock(),s.createElementBlock("div",{key:0,class:"checkbox__box__value",style:s.normalizeStyle(r.value)},s.toDisplayString(e.boxValue),5)):(s.openBlock(),s.createElementBlock("div",r4e,[(s.openBlock(),s.createElementBlock("svg",s4e,[s.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:e.boxValueColor},null,8,o4e)]))]))],64)):s.createCommentVNode("",!0)],4),e.teamsIds&&e.teamsIds.length?(s.openBlock(),s.createElementBlock("div",l4e,[s.createElementVNode("div",c4e,[s.createElementVNode("img",{src:c(e.teamsIds[0]),alt:""},null,8,d4e)]),s.createElementVNode("div",u4e,[s.createElementVNode("img",{src:c(e.teamsIds[1]),alt:""},null,8,h4e)])])):s.createCommentVNode("",!0),s.createElementVNode("div",{class:"checkbox__label",style:s.normalizeStyle(o.value)},s.toDisplayString(e.label),5)],2))}},h1=n4e(p4e,[["__scopeId","data-v-8ab85812"]]),m4e={class:"subcategory-group"},f4e={__name:"SubcategoryGroup",props:{subcategoryGroup:{type:Array,default:()=>[]}},setup(e){return(t,a)=>(s.openBlock(),s.createElementBlock("div",m4e,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(e.subcategoryGroup,i=>(s.openBlock(),s.createBlock(s.unref(h1),{key:i.id,modelValue:i.isSelected,"onUpdate:modelValue":n=>i.isSelected=n,label:i.name},null,8,["modelValue","onUpdate:modelValue","label"]))),128))]))}},g4e=bt(f4e,[["__scopeId","data-v-6c6e0261"]]),y4e={class:"filter-subcategories"},_4e=Object.freeze(Object.defineProperty({__proto__:null,default:bt({__name:"FilterSubcategories",props:{subcategoryGroups:{type:Array,default:()=>[]}},setup(e){return(t,a)=>(s.openBlock(),s.createElementBlock("div",y4e,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(e.subcategoryGroups,i=>(s.openBlock(),s.createElementBlock("div",{key:i.id,class:"filter-subcategories__group"},[s.createVNode(g4e,{subcategoryGroup:i},null,8,["subcategoryGroup"])]))),128))]))}},[["__scopeId","data-v-feeb6f0d"]])},Symbol.toStringTag,{value:"Module"})),If=e=>(s.pushScopeId("data-v-209a8861"),e=e(),s.popScopeId(),e),b4e={class:"details__header"},v4e=If(()=>s.createElementVNode("div",{class:"details__header__title"},"Jugando como",-1)),S4e={class:"details__header__checkbox"},w4e={class:"details__body"},T4e={class:"details__body__playing-as"},C4e=["onClick"],k4e={class:"details__header"},E4e=If(()=>s.createElementVNode("div",{class:"details__header__title"},"En: (Elige el lapso de tiempo)",-1)),I4e={class:"details__header__checkbox"},x4e={class:"details__body"},N4e=If(()=>s.createElementVNode("div",{class:"details__body__title"},"1er tiempo",-1)),A4e={class:"details__body__game-section"},P4e=["onClick"],O4e={class:"details__body"},B4e=If(()=>s.createElementVNode("div",{class:"details__body__title"},"2do tiempo",-1)),D4e={class:"details__body__game-section"},L4e=["onClick"],M4e=Object.freeze(Object.defineProperty({__proto__:null,default:bt({__name:"FilterConditions",props:{conditions:{type:Object,default:()=>({playingAs:[{name:"Local",value:1,isSelected:!0},{name:"Visitante",value:2,isSelected:!0}],gameSections:[{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}]})},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(e){s.useCssVars(u=>({"6828708b":e.buttonsBackgroundColor,"717ea86c":e.buttonsTextColor,"321a49b0":e.buttonsBorderWidth,"31034b4d":e.buttonsBorderColor,dca9f11e:e.buttonsBackgroundColorActive,"90d3dadc":e.buttonsTextColorActive,"305cb0d6":e.buttonsBorderWidthActive,"18196e9a":e.buttonsBorderColorActive}));const t=e,a=s.computed(()=>t.conditions.playingAs.every(u=>u.isSelected)),i=s.computed(()=>t.conditions.gameSections.every(u=>u.isSelected)),n=s.computed(()=>t.conditions.gameSections.reduce((u,h)=>(h.value<=3?u.firstHalf.push(h):u.secondHalf.push(h),u),{firstHalf:[],secondHalf:[]})),r=s.computed(()=>({"--border-radius-first-button":`${t.buttonsBorderRadius} 0 0 ${t.buttonsBorderRadius}`,"--border-radius-last-button":`0 ${t.buttonsBorderRadius} ${t.buttonsBorderRadius} 0`}));function o(u){u?t.conditions.playingAs.forEach(h=>{h.isSelected=!0}):t.conditions.playingAs.forEach((h,p)=>{h.isSelected=p===0})}function l(u){t.conditions.playingAs.filter(h=>h.isSelected).length===1&&u.isSelected||(u.isSelected=!u.isSelected)}function c(u){t.conditions.gameSections.filter(h=>h.isSelected).length===1&&u.isSelected||(u.isSelected=!u.isSelected)}function d(u){u?t.conditions.gameSections.forEach(h=>{h.isSelected=!0}):t.conditions.gameSections.forEach((h,p)=>{h.isSelected=p===0})}return(u,h)=>(s.openBlock(),s.createElementBlock("div",{class:"details",style:s.normalizeStyle(r.value)},[s.createElementVNode("div",b4e,[v4e,s.createElementVNode("div",S4e,[s.createVNode(s.unref(h1),{label:"Todos","model-value":a.value,"onUpdate:modelValue":o},null,8,["model-value"])])]),s.createElementVNode("div",w4e,[s.createElementVNode("div",T4e,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(e.conditions.playingAs,(p,m)=>(s.openBlock(),s.createElementBlock("div",{key:`pa${m}`,class:s.normalizeClass(["details__body__button",{active:p.isSelected}]),onClick:f=>l(p)},s.toDisplayString(p.name),11,C4e))),128))])]),s.createElementVNode("div",k4e,[E4e,s.createElementVNode("div",I4e,[s.createVNode(s.unref(h1),{label:"Todos","model-value":i.value,"onUpdate:modelValue":d},null,8,["model-value"])])]),s.createElementVNode("div",x4e,[N4e,s.createElementVNode("div",A4e,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(n.value.firstHalf,(p,m)=>(s.openBlock(),s.createElementBlock("div",{key:`pa${m}`,class:s.normalizeClass(["details__body__button",{active:p.isSelected}]),onClick:f=>c(p)},s.toDisplayString(p.text),11,P4e))),128))])]),s.createElementVNode("div",O4e,[B4e,s.createElementVNode("div",D4e,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(n.value.secondHalf,(p,m)=>(s.openBlock(),s.createElementBlock("div",{key:`pa${m}`,class:s.normalizeClass(["details__body__button",{active:p.isSelected}]),onClick:f=>c(p)},s.toDisplayString(p.text),11,L4e))),128))])])],4))}},[["__scopeId","data-v-209a8861"]])},Symbol.toStringTag,{value:"Module"})),R4e=(e,t)=>{const a=e.__vccOpts||e;for(const[i,n]of t)a[i]=n;return a},p1={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(e){this.status=e}}},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(e){this.$emit("click",e),this.typeOnOff&&(this.status=!this.status,this.$emit("status",this.status))}}},nP=()=>{s.useCssVars(e=>({"1c960139":e.height,b2f635d8:e.borderWidthBtn,"06e99898":e.borderType,"55555c76":e.borderColor,"23b6d320":e.borderRadius,"22c97374":e.width,"22bb09fa":e.backgroundColor,c148da7c:e.cursorType,cce756fc:e.fontSize,cff98d60:e.fontStyle,"5123b3a5":e.fontFamily,"47bf58db":e.marginLeftStat,cadc8414:e.fontSizeStat}))},rP=p1.setup;p1.setup=rP?(e,t)=>(nP(),rP(e,t)):nP;const F4e=e=>(s.pushScopeId("data-v-fb269a1e"),e=e(),s.popScopeId(),e),V4e=["src"],U4e={key:1,class:"text"},j4e=["src"],z4e={class:"stats"},H4e=F4e(()=>s.createElementVNode("img",{class:"iconstats",src:"https://az755631.vo.msecnd.net/todoelfut/playdes.png"},null,-1)),q4e={class:"numstats"},W4e={class:"leyend"};function G4e(e,t,a,i,n,r){return s.openBlock(),s.createElementBlock("div",null,[a.type==0?(s.openBlock(),s.createElementBlock("div",{key:0,class:s.normalizeClass(["button",n.status&&a.typeOnOff&&"button-active"]),style:s.normalizeStyle([r.customStyle,n.status&&a.typeOnOff&&r.customActive]),onClick:t[0]||(t[0]=(...o)=>r.btnClick&&r.btnClick(...o))},[a.icon&&a.iconPosition.toLowerCase()==="left"?(s.openBlock(),s.createElementBlock("img",{key:0,class:"icon",style:s.normalizeStyle({width:a.iconSize}),src:a.icon},null,12,V4e)):s.createCommentVNode("",!0),a.textValue?(s.openBlock(),s.createElementBlock("div",U4e,s.toDisplayString(a.textValue),1)):s.createCommentVNode("",!0),a.icon&&a.iconPosition.toLowerCase()==="right"?(s.openBlock(),s.createElementBlock("img",{key:2,class:"icon",style:s.normalizeStyle({width:a.iconSize}),src:a.icon},null,12,j4e)):s.createCommentVNode("",!0)],6)):s.createCommentVNode("",!0),a.type==1?(s.openBlock(),s.createElementBlock("div",{key:1,class:"button-target",onClick:t[1]||(t[1]=(...o)=>r.btnClick&&r.btnClick(...o))},[s.createElementVNode("div",z4e,[H4e,s.createElementVNode("div",q4e,s.toDisplayString(a.textStat),1)]),s.createElementVNode("div",W4e,s.toDisplayString(a.textCategory),1)])):s.createCommentVNode("",!0)])}const K4e=R4e(p1,[["render",G4e],["__scopeId","data-v-fb269a1e"]]),X4e=(e,t)=>{const a=e.__vccOpts||e;for(const[i,n]of t)a[i]=n;return a},J4e={key:1},Y4e={width:"10",height:"8",viewBox:"0 0 10 8",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Q4e=["fill"],Z4e={key:0,class:"checkbox__teams"},$4e={class:"checkbox__teams__logo"},e3e=["src"],t3e={class:"checkbox__teams__logo"},a3e=["src"],i3e={__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(e){return["left","right","top","bottom"].includes(e)}},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(e,{emit:t}){const a=e;s.useCssVars(d=>({70501426:e.width,"1957cde0":e.height}));const i=s.ref(!1),n=s.computed(()=>{const d={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 i.value?(d["background-color"]=a.boxBackgroundColor,d.border=`solid ${a.boxBorderWidth} ${a.boxBackgroundColor}`):d.border=`solid ${a.boxBorderWidth} ${a.boxBorderColor}`,d}),r=s.computed(()=>({"font-family":a.boxValueFontFamily,"font-size":a.boxValueFontSize,color:a.boxValueColor,"line-height":1})),o=s.computed(()=>{const d={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")&&(d[`margin-${a.boxPosition}`]=a.isBoxOnly?"0":a.teamsIds?"8px":"10px"),d});s.watch(()=>a.modelValue,d=>{d!==i.value&&(i.value=d)},{immediate:!0});function l(){a.avoidInteraction||!i.value&&a.avoidToCheck||(i.value=!i.value,t("update:modelValue",i.value))}function c(d){return`${{}.TEAM_LOGOS_URL||"https://az755631.vo.msecnd.net/teams-80/"}${d}.png`}return(d,u)=>(s.openBlock(),s.createElementBlock("div",{class:s.normalizeClass(["checkbox",`box-${e.boxPosition}`]),onClick:l},[s.createElementVNode("div",{class:"checkbox__box",style:s.normalizeStyle(n.value)},[i.value?(s.openBlock(),s.createElementBlock(s.Fragment,{key:0},[a.boxValue?(s.openBlock(),s.createElementBlock("div",{key:0,class:"checkbox__box__value",style:s.normalizeStyle(r.value)},s.toDisplayString(e.boxValue),5)):(s.openBlock(),s.createElementBlock("div",J4e,[(s.openBlock(),s.createElementBlock("svg",Y4e,[s.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:e.boxValueColor},null,8,Q4e)]))]))],64)):s.createCommentVNode("",!0)],4),e.teamsIds&&e.teamsIds.length?(s.openBlock(),s.createElementBlock("div",Z4e,[s.createElementVNode("div",$4e,[s.createElementVNode("img",{src:c(e.teamsIds[0]),alt:""},null,8,e3e)]),s.createElementVNode("div",t3e,[s.createElementVNode("img",{src:c(e.teamsIds[1]),alt:""},null,8,a3e)])])):s.createCommentVNode("",!0),s.createElementVNode("div",{class:"checkbox__label",style:s.normalizeStyle(o.value)},s.toDisplayString(e.label),5)],2))}},n3e=X4e(i3e,[["__scopeId","data-v-8ab85812"]]),r3e=(e,t)=>{const a=e.__vccOpts||e;for(const[i,n]of t)a[i]=n;return a},m1={components:{GSCButton:K4e,GSCCheckbox:n3e},data(){return{update:0,all:!1,refreshBtn14:0,refreshBtn24:0,refreshBtn34:0,refreshBtn44:0,sectors:Array.from({length:16},(e,t)=>({sector:t+1,active:!1}))}},props:{backgroundColor:{type:String,default:"#2e3b46"},heightContainer:{type:String,default:"340px"},widthContainer:{type:String,default:"455px"},heightField:{type:Number,default:230},widthField:{type:Number,default:350},heightFieldGrid:{type:String,default:"230px"},widthFieldGrid:{type:String,default:"350px"},backgroundSectorActive:{type:String,default:"#cbee6b"},backgroundSectorDisabled:{type:String,default:"#2e3b46"},borderWidth:{type:Number,default:1},opacitySector:{type:Number,default:.5},borderColor:{type:String,default:"#FFFFFF"},colorLineField:{type:String,default:"#bfc2c5"},borderWidthLineField:{type:Number,default:2},value:{type:Array,default:()=>[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16]}},watch:{value:{deep:!0,immediate:!0,handler(e){this.sectors.forEach((t,a)=>{t.active=e.includes(a+1),this.validateField(a)}),this.$emit("update:modelValue",e)}},sectors:{handler(e){var t=[];for(let a=0;a<e.length;a++)e[a].active&&t.push(a+1);this.$emit("update:modelValue",t)},deep:!0}},computed:{translx(){var e=0;return this.widthField>305&&(e=this.widthField-305),e},transly(){var e=0;return this.heightField>195&&(e=this.heightField-195,e=e/2),e},translxcircle(){var e=0;return this.widthField>305&&(e=this.widthField-305,e=e/2),e}},methods:{clickAll(e){if(e)for(let t=0;t<this.sectors.length;t++)this.sectors[t].active=!0,this.validateField(t);else for(let t=0;t<this.sectors.length;t++)this.sectors[t].active=!0,this.validateField(t);this.status14=!0,this.status24=!0,this.status34=!0,this.status44=!0,this.refreshBtn14+=1,this.refreshBtn24+=1,this.refreshBtn34+=1,this.refreshBtn44+=1},selectSector(e){var t=0;this.sectors[e].active=!this.sectors[e].active;for(let a=0;a<this.sectors.length;a++)this.sectors[a].active&&(t+=1);t==0&&(this.sectors[e].active=!0),this.validateField(e)},btn14(e){this.sectors[0].active=e?this.sectors[0].active=!0:this.sectors[0].active=!1,this.sectors[1].active=e?this.sectors[1].active=!0:this.sectors[1].active=!1,this.sectors[2].active=e?this.sectors[2].active=!0:this.sectors[2].active=!1,this.sectors[3].active=e?this.sectors[3].active=!0:this.sectors[3].active=!1;var t=0;for(let a=0;a<this.sectors.length;a++)this.sectors[a].active&&(t+=1);t==0?(this.sectors[0].active=!0,this.sectors[1].active=!0,this.sectors[2].active=!0,this.sectors[3].active=!0,this.status14=!0,this.refreshBtn14+=1):this.status14=!1,t==16&&(this.all=!0,this.update+=1)},btn24(e){this.sectors[4].active=e?this.sectors[4].active=!0:this.sectors[4].active=!1,this.sectors[5].active=e?this.sectors[5].active=!0:this.sectors[5].active=!1,this.sectors[6].active=e?this.sectors[6].active=!0:this.sectors[6].active=!1,this.sectors[7].active=e?this.sectors[7].active=!0:this.sectors[7].active=!1;var t=0;for(let a=0;a<this.sectors.length;a++)this.sectors[a].active&&(t+=1);t==0?(this.sectors[4].active=!0,this.sectors[5].active=!0,this.sectors[6].active=!0,this.sectors[7].active=!0,this.status24=!0,this.refreshBtn24+=1):this.status24=!1,t==16&&(this.all=!0,this.update+=1)},btn34(e){this.sectors[8].active=e?this.sectors[8].active=!0:this.sectors[8].active=!1,this.sectors[9].active=e?this.sectors[9].active=!0:this.sectors[9].active=!1,this.sectors[10].active=e?this.sectors[10].active=!0:this.sectors[10].active=!1,this.sectors[11].active=e?this.sectors[11].active=!0:this.sectors[11].active=!1;var t=0;for(let a=0;a<this.sectors.length;a++)this.sectors[a].active&&(t+=1);t==0?(this.sectors[8].active=!0,this.sectors[9].active=!0,this.sectors[10].active=!0,this.sectors[11].active=!0,this.status34=!0,this.refreshBtn34+=1):this.status34=!1,t==16&&(this.all=!0,this.update+=1)},btn44(e){this.sectors[12].active=e?this.sectors[12].active=!0:this.sectors[12].active=!1,this.sectors[13].active=e?this.sectors[13].active=!0:this.sectors[13].active=!1,this.sectors[14].active=e?this.sectors[14].active=!0:this.sectors[14].active=!1,this.sectors[15].active=e?this.sectors[15].active=!0:this.sectors[15].active=!1;var t=0;for(let a=0;a<this.sectors.length;a++)this.sectors[a].active&&(t+=1);t==0?(this.sectors[12].active=!0,this.sectors[13].active=!0,this.sectors[14].active=!0,this.sectors[15].active=!0,this.status44=!0,this.refreshBtn44+=1):this.status44=!1,t==16&&(this.all=!0,this.update+=1)},validateField(e){(e===0||e===1||e===2||e===3)&&(this.status14=!!(this.sectors[0].active&&this.sectors[1].active&&this.sectors[2].active&&this.sectors[3].active)),(e===4||e===5||e===6||e===7)&&(this.status24=!!(this.sectors[4].active&&this.sectors[5].active&&this.sectors[6].active&&this.sectors[7].active)),(e===8||e===9||e===10||e===11)&&(this.status34=!!(this.sectors[8].active&&this.sectors[9].active&&this.sectors[10].active&&this.sectors[11].active)),(e===12||e===13||e===14||e===15)&&(this.status44=!!(this.sectors[12].active&&this.sectors[13].active&&this.sectors[14].active&&this.sectors[15].active)),this.status14&&this.status34&&this.status24&&this.status44?this.all=!0:this.all=!1,this.update+=1,this.status14&&(this.refreshBtn14+=1),this.status24&&(this.refreshBtn24+=1),this.status34&&(this.refreshBtn34+=1),this.status44&&(this.refreshBtn44+=1)}}},sP=()=>{s.useCssVars(e=>({"61dc98de":e.widthContainer,"1d1ca7a4":e.heightContainer,"52d6675f":e.backgroundColor,"32f3fa70":e.widthFieldGrid,fe0222fa:e.heightFieldGrid}))},oP=m1.setup;m1.setup=oP?(e,t)=>(sP(),oP(e,t)):sP;const s3e=e=>(s.pushScopeId("data-v-d1808ad6"),e=e(),s.popScopeId(),e),o3e={class:"gsc-field"},l3e={class:"gsc-field__title-checked"},c3e=s3e(()=>s.createElementVNode("div",{class:"gsc-field__title-checked__title"},"Pase(s) desde la(s) zona(s):",-1)),d3e={class:"gsc-field__title-checked__check-cont"},u3e={class:"gsc-field__container-field"},h3e={class:"gsc-field__container-field__field"},p3e={width:"100%",height:"100%",fill:"#2e3b46",xmlns:"http://www.w3.org/2000/svg"},m3e=["stroke"],f3e=["stroke","stroke-width"],g3e=["stroke","stroke-width"],y3e=["stroke-width","stroke"],_3e=["fill","fill-opacity","stroke","stroke-width"],b3e=["fill","fill-opacity","stroke","stroke-width"],v3e=["fill","fill-opacity","stroke","stroke-width"],S3e=["fill","fill-opacity","stroke","stroke-width"],w3e=["fill","fill-opacity","stroke","stroke-width"],T3e=["fill","fill-opacity","stroke","stroke-width"],C3e=["fill","fill-opacity","stroke","stroke-width"],k3e=["fill","fill-opacity","stroke","stroke-width"],E3e=["fill","fill-opacity","stroke","stroke-width"],I3e=["fill","fill-opacity","stroke","stroke-width"],x3e=["fill","fill-opacity","stroke","stroke-width"],N3e=["fill","fill-opacity","stroke","stroke-width"],A3e=["fill","fill-opacity","stroke","stroke-width"],P3e=["fill","fill-opacity","stroke","stroke-width"],O3e=["fill","fill-opacity","stroke","stroke-width"],B3e=["fill","fill-opacity","stroke","stroke-width"],D3e={class:"gsc-field__container-field__bar-buttons"};function L3e(e,t,a,i,n,r){const o=s.resolveComponent("GSCCheckbox"),l=s.resolveComponent("GSCButton");return s.openBlock(),s.createElementBlock("div",o3e,[s.createElementVNode("div",l3e,[c3e,s.createElementVNode("div",d3e,[(s.openBlock(),s.createBlock(o,{label:"Todas las zonas","box-value-font-family":"Poppins-Regular","box-position":"right","label-font-size":"14px","label-white-space":"nowrap","box-margin-top":"0.4em",value:n.all,key:n.update,"model-value":n.all,"onUpdate:modelValue":r.clickAll},null,8,["value","model-value","onUpdate:modelValue"]))])]),s.createElementVNode("div",u3e,[s.createElementVNode("div",h3e,[(s.openBlock(),s.createElementBlock("svg",p3e,[s.createElementVNode("rect",{x:"1.5",y:"0.5",width:"100%",height:"100%",rx:"1.5",stroke:a.colorLineField},null,8,m3e),s.createElementVNode("path",{style:s.normalizeStyle("transform: translate("+r.translx+"px, "+r.transly+"px);"),d:"M303.597 39.9799H263.371C262.817 39.9799 262.369 40.4301 262.371 40.984L262.842 155.176C262.845 155.726 263.292 156.172 263.842 156.172H302.884",stroke:a.colorLineField,"stroke-width":a.borderWidthLineField,"stroke-linecap":"square"},null,12,f3e),s.createElementVNode("path",{style:s.normalizeStyle("transform: translateY("+r.transly+"px);"),class:"porteria1",d:"M1.09097 156.172L41.3162 156.172C41.8701 156.172 42.3185 155.722 42.3162 155.168L41.845 40.9758C41.8427 40.4252 41.3957 39.98 40.845 39.98L1.80338 39.98",stroke:a.colorLineField,"stroke-width":a.borderWidthLineField,"stroke-linecap":"square"},null,12,g3e),s.createElementVNode("path",{style:s.normalizeStyle("transform: translate("+r.translxcircle+"px, "+r.transly+"px);"),class:"circle",d:"M182.911 97.4512C182.911 113.726 169.44 126.936 152.801 126.936C136.162 126.936 122.691 113.726 122.691 97.4512C122.691 81.1767 136.162 67.9662 152.801 67.9662C169.44 67.9662 182.911 81.1767 182.911 97.4512Z","stroke-width":a.borderWidthLineField,stroke:a.colorLineField},null,12,y3e),s.createElementVNode("rect",{x:"0%",y:"0%",width:"25%",height:"25%",fill:n.sectors[0].active?a.backgroundSectorActive:a.backgroundSectorDisabled,"fill-opacity":a.opacitySector,stroke:a.borderColor,"stroke-width":a.borderWidth,onClick:t[0]||(t[0]=c=>r.selectSector(0))},null,8,_3e),s.createElementVNode("rect",{x:"0%",y:"25%",width:"25%",height:"25%",fill:n.sectors[1].active?a.backgroundSectorActive:a.backgroundSectorDisabled,"fill-opacity":a.opacitySector,stroke:a.borderColor,"stroke-width":a.borderWidth,onClick:t[1]||(t[1]=c=>r.selectSector(1))},null,8,b3e),s.createElementVNode("rect",{x:"0%",y:"50%",width:"25%",height:"25%",fill:n.sectors[2].active?a.backgroundSectorActive:a.backgroundSectorDisabled,"fill-opacity":a.opacitySector,stroke:a.borderColor,"stroke-width":a.borderWidth,onClick:t[2]||(t[2]=c=>r.selectSector(2))},null,8,v3e),s.createElementVNode("rect",{x:"0%",y:"75%",width:"25%",height:"25%",fill:n.sectors[3].active?a.backgroundSectorActive:a.backgroundSectorDisabled,"fill-opacity":a.opacitySector,stroke:a.borderColor,"stroke-width":a.borderWidth,onClick:t[3]||(t[3]=c=>r.selectSector(3))},null,8,S3e),s.createElementVNode("rect",{x:"25%",y:"0%",width:"25%",height:"25%",fill:n.sectors[4].active?a.backgroundSectorActive:a.backgroundSectorDisabled,"fill-opacity":a.opacitySector,stroke:a.borderColor,"stroke-width":a.borderWidth,onClick:t[4]||(t[4]=c=>r.selectSector(4))},null,8,w3e),s.createElementVNode("rect",{x:"25%",y:"25%",width:"25%",height:"25%",fill:n.sectors[5].active?a.backgroundSectorActive:a.backgroundSectorDisabled,"fill-opacity":a.opacitySector,stroke:a.borderColor,"stroke-width":a.borderWidth,onClick:t[5]||(t[5]=c=>r.selectSector(5))},null,8,T3e),s.createElementVNode("rect",{x:"25%",y:"50%",width:"25%",height:"25%",fill:n.sectors[6].active?a.backgroundSectorActive:a.backgroundSectorDisabled,"fill-opacity":a.opacitySector,stroke:a.borderColor,"stroke-width":a.borderWidth,onClick:t[6]||(t[6]=c=>r.selectSector(6))},null,8,C3e),s.createElementVNode("rect",{x:"25%",y:"75%",width:"25%",height:"25%",fill:n.sectors[7].active?a.backgroundSectorActive:a.backgroundSectorDisabled,"fill-opacity":a.opacitySector,stroke:a.borderColor,"stroke-width":a.borderWidth,onClick:t[7]||(t[7]=c=>r.selectSector(7))},null,8,k3e),s.createElementVNode("rect",{x:"50%",y:"0%",width:"25%",height:"25%",fill:n.sectors[8].active?a.backgroundSectorActive:a.backgroundSectorDisabled,"fill-opacity":a.opacitySector,stroke:a.borderColor,"stroke-width":a.borderWidth,onClick:t[8]||(t[8]=c=>r.selectSector(8))},null,8,E3e),s.createElementVNode("rect",{x:"50%",y:"25%",width:"25%",height:"25%",fill:n.sectors[9].active?a.backgroundSectorActive:a.backgroundSectorDisabled,"fill-opacity":a.opacitySector,stroke:a.borderColor,"stroke-width":a.borderWidth,onClick:t[9]||(t[9]=c=>r.selectSector(9))},null,8,I3e),s.createElementVNode("rect",{x:"50%",y:"50%",width:"25%",height:"25%",fill:n.sectors[10].active?a.backgroundSectorActive:a.backgroundSectorDisabled,"fill-opacity":a.opacitySector,stroke:a.borderColor,"stroke-width":a.borderWidth,onClick:t[10]||(t[10]=c=>r.selectSector(10))},null,8,x3e),s.createElementVNode("rect",{x:"50%",y:"75%",width:"25%",height:"25%",fill:n.sectors[11].active?a.backgroundSectorActive:a.backgroundSectorDisabled,"fill-opacity":a.opacitySector,stroke:a.borderColor,"stroke-width":a.borderWidth,onClick:t[11]||(t[11]=c=>r.selectSector(11))},null,8,N3e),s.createElementVNode("rect",{x:"75%",y:"0%",width:"25%",height:"25%",fill:n.sectors[12].active?a.backgroundSectorActive:a.backgroundSectorDisabled,"fill-opacity":a.opacitySector,stroke:a.borderColor,"stroke-width":a.borderWidth,onClick:t[12]||(t[12]=c=>r.selectSector(12))},null,8,A3e),s.createElementVNode("rect",{x:"75%",y:"25%",width:"25%",height:"25%",fill:n.sectors[13].active?a.backgroundSectorActive:a.backgroundSectorDisabled,"fill-opacity":a.opacitySector,stroke:a.borderColor,"stroke-width":a.borderWidth,onClick:t[13]||(t[13]=c=>r.selectSector(13))},null,8,P3e),s.createElementVNode("rect",{x:"75%",y:"50%",width:"25%",height:"25%",fill:n.sectors[14].active?a.backgroundSectorActive:a.backgroundSectorDisabled,"fill-opacity":a.opacitySector,stroke:a.borderColor,"stroke-width":a.borderWidth,onClick:t[14]||(t[14]=c=>r.selectSector(14))},null,8,O3e),s.createElementVNode("rect",{x:"75%",y:"75%",width:"25%",height:"25%",fill:n.sectors[15].active?a.backgroundSectorActive:a.backgroundSectorDisabled,"fill-opacity":a.opacitySector,stroke:a.borderColor,"stroke-width":a.borderWidth,onClick:t[15]||(t[15]=c=>r.selectSector(15))},null,8,B3e)]))]),s.createElementVNode("div",D3e,[(s.openBlock(),s.createBlock(l,{"text-value":"1/4 tos","font-size":"12px",height:"26px",width:"65px","type-on-off":!0,"border-width":1,"font-color":"#bfc2c5","border-color":"#8c9399","border-radius":"4px","font-family":"Poppins-Medium","active-border-width":1,"background-color":"","active-background-color":"#cbee6b33",ref:"btn14",onStatus:r.btn14,key:n.refreshBtn14,value:e.status14},null,8,["onStatus","value"])),(s.openBlock(),s.createBlock(l,{"text-value":"2/4 tos","font-size":"12px",height:"26px",width:"65px","type-on-off":!0,"border-width":1,"font-color":"#bfc2c5","border-color":"#8c9399","border-radius":"4px","font-family":"Poppins-Medium","active-border-width":1,"background-color":"","active-background-color":"#cbee6b33",ref:"btn24",onStatus:r.btn24,key:n.refreshBtn24,value:e.status24},null,8,["onStatus","value"])),(s.openBlock(),s.createBlock(l,{"text-value":"3/4 tos","font-size":"12px",height:"26px",width:"65px","type-on-off":!0,"border-width":1,"font-color":"#bfc2c5","border-color":"#8c9399","border-radius":"4px","font-family":"Poppins-Medium","active-border-width":1,"background-color":"","active-background-color":"#cbee6b33",ref:"btn34",onStatus:r.btn34,key:n.refreshBtn34,value:e.status34},null,8,["onStatus","value"])),(s.openBlock(),s.createBlock(l,{"text-value":"4/4 tos","font-size":"12px",height:"26px",width:"65px","type-on-off":!0,"border-width":1,"font-color":"#bfc2c5","border-color":"#8c9399","border-radius":"4px","font-family":"Poppins-Medium","active-border-width":1,"background-color":"","active-background-color":"#cbee6b33",ref:"btn44",onStatus:r.btn44,key:n.refreshBtn44,value:e.status44},null,8,["onStatus","value"]))])])])}const M3e=r3e(m1,[["render",L3e],["__scopeId","data-v-d1808ad6"]]),R3e={class:"filter-field"},F3e=Object.freeze(Object.defineProperty({__proto__:null,default:bt({__name:"FilterField",setup(e){const t=s.ref(Array.from({length:16},(i,n)=>n+1));function a(i){}return(i,n)=>(s.openBlock(),s.createElementBlock("div",R3e,[s.createVNode(s.unref(M3e),{width:"100%","background-color":"#2E3B46",value:t.value,"onUpdate:modelValue":a},null,8,["value"])]))}},[["__scopeId","data-v-95dd6111"]])},Symbol.toStringTag,{value:"Module"}));fs.GSCLanding=i4e,Object.defineProperty(fs,Symbol.toStringTag,{value:"Module"})});
303
+ */const Sa={itemsToShow:1,itemsToScroll:1,modelValue:0,transition:300,autoplay:0,snapAlign:"center",wrapAround:!1,throttle:16,pauseAutoplayOnHover:!1,mouseDrag:!0,touchDrag:!0,dir:"ltr",breakpoints:void 0,i18n:{ariaNextSlide:"Navigate to next slide",ariaPreviousSlide:"Navigate to previous slide",ariaNavigateToSlide:"Navigate to slide {slideNumber}",ariaGallery:"Gallery",itemXofY:"Item {currentSlide} of {slidesCount}",iconArrowUp:"Arrow pointing upwards",iconArrowDown:"Arrow pointing downwards",iconArrowRight:"Arrow pointing to the right",iconArrowLeft:"Arrow pointing to the left"}},JA={itemsToShow:{default:Sa.itemsToShow,type:Number},itemsToScroll:{default:Sa.itemsToScroll,type:Number},wrapAround:{default:Sa.wrapAround,type:Boolean},throttle:{default:Sa.throttle,type:Number},snapAlign:{default:Sa.snapAlign,validator(e){return["start","end","center","center-even","center-odd"].includes(e)}},transition:{default:Sa.transition,type:Number},breakpoints:{default:Sa.breakpoints,type:Object},autoplay:{default:Sa.autoplay,type:Number},pauseAutoplayOnHover:{default:Sa.pauseAutoplayOnHover,type:Boolean},modelValue:{default:void 0,type:Number},mouseDrag:{default:Sa.mouseDrag,type:Boolean},touchDrag:{default:Sa.touchDrag,type:Boolean},dir:{default:Sa.dir,validator(e){return["rtl","ltr"].includes(e)}},i18n:{default:Sa.i18n,type:Object},settings:{default(){return{}},type:Object}};function Tke({config:e,slidesCount:t}){const{snapAlign:a,wrapAround:i,itemsToShow:n=1}=e;if(i)return Math.max(t-1,0);let r;switch(a){case"start":r=t-n;break;case"end":r=t-1;break;case"center":case"center-odd":r=t-Math.ceil((n-.5)/2);break;case"center-even":r=t-Math.ceil(n/2);break;default:r=0;break}return Math.max(r,0)}function Cke({config:e,slidesCount:t}){const{wrapAround:a,snapAlign:i,itemsToShow:n=1}=e;let r=0;if(a||n>t)return r;switch(i){case"start":r=0;break;case"end":r=n-1;break;case"center":case"center-odd":r=Math.floor((n-1)/2);break;case"center-even":r=Math.floor((n-2)/2);break;default:r=0;break}return r}function o1({val:e,max:t,min:a}){return t<a?e:Math.min(Math.max(e,a),t)}function kke({config:e,currentSlide:t,slidesCount:a}){const{snapAlign:i,wrapAround:n,itemsToShow:r=1}=e;let o=t;switch(i){case"center":case"center-odd":o-=(r-1)/2;break;case"center-even":o-=(r-2)/2;break;case"end":o-=r-1;break}return n?o:o1({val:o,max:a-r,min:0})}function YA(e){return e?e.reduce((t,a)=>{var i;return a.type===s.Fragment?[...t,...YA(a.children)]:((i=a.type)===null||i===void 0?void 0:i.name)==="CarouselSlide"?[...t,a]:t},[]):[]}function l1({val:e,max:t,min:a=0}){return e>t?l1({val:e-(t+1),max:t,min:a}):e<a?l1({val:e+(t+1),max:t,min:a}):e}function Eke(e,t){let a;return t?function(...i){const n=this;a||(e.apply(n,i),a=!0,setTimeout(()=>a=!1,t))}:e}function Ike(e,t){let a;return function(...i){a&&clearTimeout(a),a=setTimeout(()=>{e(...i),a=null},t)}}function xke(e="",t={}){return Object.entries(t).reduce((a,[i,n])=>a.replace(`{${i}}`,String(n)),e)}var Nke=s.defineComponent({name:"ARIA",setup(){const e=s.inject("config",s.reactive(Object.assign({},Sa))),t=s.inject("currentSlide",s.ref(0)),a=s.inject("slidesCount",s.ref(0));return()=>s.h("div",{class:["carousel__liveregion","carousel__sr-only"],"aria-live":"polite","aria-atomic":"true"},xke(e.i18n.itemXofY,{currentSlide:t.value+1,slidesCount:a.value}))}}),Ake=s.defineComponent({name:"Carousel",props:JA,setup(e,{slots:t,emit:a,expose:i}){var n;const r=s.ref(null),o=s.ref([]),l=s.ref(0),c=s.ref(0),d=s.reactive(Object.assign({},Sa));let u=Object.assign({},Sa),h;const p=s.ref((n=e.modelValue)!==null&&n!==void 0?n:0),m=s.ref(0),f=s.ref(0),v=s.ref(0),_=s.ref(0);let x,B;s.provide("config",d),s.provide("slidesCount",c),s.provide("currentSlide",p),s.provide("maxSlide",v),s.provide("minSlide",_),s.provide("slideWidth",l);function F(){h=Object.assign({},e.breakpoints),u=Object.assign(Object.assign(Object.assign({},u),e),{i18n:Object.assign(Object.assign({},u.i18n),e.i18n),breakpoints:void 0}),D(u)}function O(){if(!h||!Object.keys(h).length)return;const W=Object.keys(h).map(Se=>Number(Se)).sort((Se,Ge)=>+Ge-+Se);let ke=Object.assign({},u);W.some(Se=>{const Ge=window.matchMedia(`(min-width: ${Se}px)`).matches;return Ge&&(ke=Object.assign(Object.assign({},ke),h[Se])),Ge}),D(ke)}function D(W){Object.entries(W).forEach(([ke,Se])=>d[ke]=Se)}const M=Ike(()=>{O(),L()},16);function L(){if(!r.value)return;const W=r.value.getBoundingClientRect();l.value=W.width/d.itemsToShow}function J(){c.value<=0||(f.value=Math.ceil((c.value-1)/2),v.value=Tke({config:d,slidesCount:c.value}),_.value=Cke({config:d,slidesCount:c.value}),d.wrapAround||(p.value=o1({val:p.value,max:v.value,min:_.value})))}s.onMounted(()=>{s.nextTick(()=>L()),setTimeout(()=>L(),1e3),O(),Fe(),window.addEventListener("resize",M,{passive:!0}),a("init")}),s.onUnmounted(()=>{B&&clearTimeout(B),x&&clearInterval(x),window.removeEventListener("resize",M,{passive:!0})});let j=!1;const ne={x:0,y:0},le={x:0,y:0},Z=s.reactive({x:0,y:0}),re=s.ref(!1),Ce=s.ref(!1),ve=()=>{re.value=!0},pe=()=>{re.value=!1};function z(W){["INPUT","TEXTAREA","SELECT"].includes(W.target.tagName)||(j=W.type==="touchstart",j||W.preventDefault(),!(!j&&W.button!==0||te.value)&&(ne.x=j?W.touches[0].clientX:W.clientX,ne.y=j?W.touches[0].clientY:W.clientY,document.addEventListener(j?"touchmove":"mousemove",$,!0),document.addEventListener(j?"touchend":"mouseup",ae,!0)))}const $=Eke(W=>{Ce.value=!0,le.x=j?W.touches[0].clientX:W.clientX,le.y=j?W.touches[0].clientY:W.clientY;const ke=le.x-ne.x,Se=le.y-ne.y;Z.y=Se,Z.x=ke},d.throttle);function ae(){const W=d.dir==="rtl"?-1:1,ke=Math.sign(Z.x)*.4,Se=Math.round(Z.x/l.value+ke)*W;if(Se&&!j){const Ge=gt=>{gt.stopPropagation(),window.removeEventListener("click",Ge,!0)};window.addEventListener("click",Ge,!0)}_e(p.value-Se),Z.x=0,Z.y=0,Ce.value=!1,document.removeEventListener(j?"touchmove":"mousemove",$,!0),document.removeEventListener(j?"touchend":"mouseup",ae,!0)}function Fe(){!d.autoplay||d.autoplay<=0||(x=setInterval(()=>{d.pauseAutoplayOnHover&&re.value||we()},d.autoplay))}function se(){x&&(clearInterval(x),x=null),Fe()}const te=s.ref(!1);function _e(W){const ke=d.wrapAround?W:o1({val:W,max:v.value,min:_.value});p.value===ke||te.value||(a("slide-start",{slidingToIndex:W,currentSlideIndex:p.value,prevSlideIndex:m.value,slidesCount:c.value}),te.value=!0,m.value=p.value,p.value=ke,B=setTimeout(()=>{if(d.wrapAround){const Se=l1({val:ke,max:v.value,min:0});Se!==p.value&&(p.value=Se,a("loop",{currentSlideIndex:p.value,slidingToIndex:W}))}a("update:modelValue",p.value),a("slide-end",{currentSlideIndex:p.value,prevSlideIndex:m.value,slidesCount:c.value}),te.value=!1,se()},d.transition))}function we(){_e(p.value+d.itemsToScroll)}function ge(){_e(p.value-d.itemsToScroll)}const ee={slideTo:_e,next:we,prev:ge};s.provide("nav",ee),s.provide("isSliding",te);const ce=s.computed(()=>kke({config:d,currentSlide:p.value,slidesCount:c.value}));s.provide("slidesToScroll",ce);const X=s.computed(()=>{const W=d.dir==="rtl"?-1:1,ke=ce.value*l.value*W;return{transform:`translateX(${Z.x-ke}px)`,transition:`${te.value?d.transition:0}ms`,margin:d.wrapAround?`0 -${c.value*l.value}px`:"",width:"100%"}});function R(){F(),O(),J(),L(),se()}Object.keys(JA).forEach(W=>{["modelValue"].includes(W)||s.watch(()=>e[W],R)}),s.watch(()=>e.modelValue,W=>{W!==p.value&&_e(Number(W))}),s.watch(c,J),a("before-init"),F();const he={config:d,slidesCount:c,slideWidth:l,next:we,prev:ge,slideTo:_e,currentSlide:p,maxSlide:v,minSlide:_,middleSlide:f};i({updateBreakpointsConfigs:O,updateSlidesData:J,updateSlideWidth:L,initDefaultConfigs:F,restartCarousel:R,slideTo:_e,next:we,prev:ge,nav:ee,data:he});const be=t.default||t.slides,Me=t.addons,We=s.reactive(he);return()=>{const W=YA(be==null?void 0:be(We)),ke=(Me==null?void 0:Me(We))||[];W.forEach((Ye,Ze)=>Ye.props.index=Ze);let Se=W;if(d.wrapAround){const Ye=W.map((Bt,rt)=>s.cloneVNode(Bt,{index:-W.length+rt,isClone:!0,key:`clone-before-${rt}`})),Ze=W.map((Bt,rt)=>s.cloneVNode(Bt,{index:W.length+rt,isClone:!0,key:`clone-after-${rt}`}));Se=[...Ye,...W,...Ze]}o.value=W,c.value=Math.max(W.length,1);const Ge=s.h("ol",{class:"carousel__track",style:X.value,onMousedownCapture:d.mouseDrag?z:null,onTouchstartPassiveCapture:d.touchDrag?z:null},Se),gt=s.h("div",{class:"carousel__viewport"},Ge);return s.h("section",{ref:r,class:{carousel:!0,"is-sliding":te.value,"is-dragging":Ce.value,"is-hover":re.value,"carousel--rtl":d.dir==="rtl"},dir:d.dir,"aria-label":d.i18n.ariaGallery,tabindex:"0",onMouseenter:ve,onMouseleave:pe},[gt,ke,s.h(Nke)])}}}),QA;(function(e){e.arrowUp="arrowUp",e.arrowDown="arrowDown",e.arrowRight="arrowRight",e.arrowLeft="arrowLeft"})(QA||(QA={}));var Pke=s.defineComponent({name:"CarouselSlide",props:{index:{type:Number,default:1},isClone:{type:Boolean,default:!1}},setup(e,{slots:t}){const a=s.inject("config",s.reactive(Object.assign({},Sa))),i=s.inject("currentSlide",s.ref(0)),n=s.inject("slidesToScroll",s.ref(0)),r=s.inject("isSliding",s.ref(!1)),o=()=>e.index===i.value,l=()=>e.index===i.value-1,c=()=>e.index===i.value+1,d=()=>{const u=Math.floor(n.value),h=Math.ceil(n.value+a.itemsToShow-1);return e.index>=u&&e.index<=h};return()=>{var u;return s.h("li",{style:{width:`${100/a.itemsToShow}%`},class:{carousel__slide:!0,"carousel__slide--clone":e.isClone,"carousel__slide--visible":d(),"carousel__slide--active":o(),"carousel__slide--prev":l(),"carousel__slide--next":c(),"carousel__slide--sliding":r.value},"aria-hidden":!d()},(u=t.default)===null||u===void 0?void 0:u.call(t))}}});const Oke=(e,t)=>{const a=e.__vccOpts||e;for(const[i,n]of t)a[i]=n;return a},Bke=e=>(s.pushScopeId("data-v-dd3cbf69"),e=e(),s.popScopeId(),e),Dke={class:"gsc-carousel"},Lke={key:0},Mke=Bke(()=>s.createElementVNode("div",null,"no hay",-1)),Rke=[Mke],Fke={class:"gsc-carousel__2d__slides"},Vke={width:"9",height:"18",viewBox:"0 0 9 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Uke=["fill"],jke={width:"9",height:"18",viewBox:"0 0 9 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},zke=["fill"],Hke={class:"gsc-carousel__2d__navigation"},qke={width:"8",height:"15",viewBox:"0 0 8 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Wke=["stroke"],Gke={key:1,class:"gsc-carousel__2d__navigation__pagination"},Kke=["onClick"],Xke={width:"7",height:"15",viewBox:"0 0 7 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Jke=["stroke"],Yke={__name:"GSC-Carousel",props:{currentItemIndex:{type:Number,default:0},items:{type:Array,default:()=>[]},is3d:{type:Boolean,default:!1},isPaginationVisible:{type:Boolean,default:!1},areNavigationArrowsVisible:{type:Boolean,default:!0},defaultItemByIndex:{type:Number,default:0},defaultItemByProp:{type:Object,default:null,validator:e=>["propName","value"].every(t=>t in e)},navigationHeight:{type:Number,default:4},navigationBorderRadius:{type:Number,default:4},navigationColor:{type:String,default:"rgba(255, 255, 255, 0.4)"},navigationActiveColor:{type:String,default:"#cbee6b"},navigationActiveWidth:{type:Number,default:30},arrowsColor:{type:String,default:"#cbee6b"},wrapAround:{type:Boolean,default:!1},itemsToShow:{type:Number,default:1},isMainSlidePriority:{type:Boolean,default:!1},areSlidesArrowsVisible:{type:Boolean,default:!1},slideLeftArrowBackgroundImage:{type:String,default:"linear-gradient(to right, rgba(13, 29, 41, 1), rgba(0, 0, 0, 0))"},slideRightArrowBackgroundImage:{type:String,default:"linear-gradient(to left, rgba(13, 29, 41, 1), rgba(0, 0, 0, 0))"},areSlidesArrowsRounded:{type:Boolean,default:!1},slidesArrowsLeftAndRight:{type:String,default:"20px"},secondarySlidesOpacity:{type:Number,default:.8},marginTop:{type:String,default:"0"}},emits:["input","update:currentItemIndex"],setup(e,{expose:t,emit:a}){s.useCssVars(_=>({"0d808f0f":e.slideLeftArrowBackgroundImage,"1e0ef2e5":e.slidesArrowsLeftAndRight,"66d12b5c":e.slideRightArrowBackgroundImage,"2b22a85a":e.marginTop,"1a842b02":e.secondarySlidesOpacity}));const i=e,n=s.ref(null),r=s.ref({}),o=s.ref(0),l=s.ref(!1);s.watch(n,_=>{_&&l.value?(l.value=!1,d(i.items)):_&&_.slideTo&&_.slideTo(o.value)},{deep:!0}),s.watch(()=>i.currentItemIndex,_=>{o.value!==_&&m(_)}),s.watch(()=>i.items,_=>{n.value?d(_):l.value=!0},{immediate:!0});const c=a;function d(_){if(_&&_.length&&n.value){if(i.defaultItemByProp){const x=i.items.findIndex(B=>B[i.defaultItemByProp.propName]===i.defaultItemByProp.value);x!==-1?(o.value=x,r.value=_[x]):(o.value=0,r.value=_[0])}else o.value=i.defaultItemByIndex,r.value=_[i.defaultItemByIndex];n.value.slideTo&&n.value.slideTo(o.value),c("input",{selectedItem:r.value,selectedItemIndex:o.value})}}function u(){n.value&&n.value.next()}function h(){n.value&&n.value.prev()}function p(){n.value&&n.value.updateSlideWidth()}function m(_){n.value&&n.value.slideTo(_)}function f(_){n.value.slideTo(_)}function v(_){const x=_.slidingToIndex<0?i.items.length-1:_.slidingToIndex===i.items.length?0:_.slidingToIndex;o.value=x,r.value=i.items[x],c("update:currentItemIndex",x),c("input",{selectedItem:r.value,selectedItemIndex:o.value})}return t({prev:h,next:u,updateSlideWidth:p,slideTo:m}),(_,x)=>(s.openBlock(),s.createElementBlock("div",Dke,[i.is3d?(s.openBlock(),s.createElementBlock("div",Lke,Rke)):(s.openBlock(),s.createElementBlock("div",{key:1,class:s.normalizeClass(["gsc-carousel__2d",{"main-slide-priority":e.isMainSlidePriority}])},[s.createElementVNode("div",Fke,[s.createVNode(s.unref(Ake),{ref_key:"carousel2d",ref:n,"items-to-show":e.itemsToShow,"wrap-around":e.wrapAround,onSlideStart:v},{default:s.withCtx(()=>[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(e.items,(B,F)=>(s.openBlock(),s.createBlock(s.unref(Pke),{key:F},{default:s.withCtx(()=>[s.renderSlot(_.$slots,"default",{item:B},void 0,!0)]),_:2},1024))),128))]),_:3},8,["items-to-show","wrap-around"])]),e.areSlidesArrowsVisible?(s.openBlock(),s.createElementBlock("div",{key:0,class:"gsc-carousel__2d__arrow-left",onClick:x[0]||(x[0]=B=>n.value.prev())},[s.createElementVNode("div",{class:s.normalizeClass(["gsc-carousel__2d__slide-button",{rounded:e.areSlidesArrowsRounded}])},[(s.openBlock(),s.createElementBlock("svg",Vke,[s.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M3.10399 9L8.62342 15.4393C9.12552 16.0251 9.12552 16.9749 8.62342 17.5607C8.12132 18.1464 7.30725 18.1464 6.80514 17.5607L0.376575 10.0607C-0.125528 9.47487 -0.125528 8.52512 0.376575 7.93934L6.80515 0.439339C7.30725 -0.146447 8.12132 -0.146447 8.62342 0.43934C9.12553 1.02513 9.12553 1.97487 8.62342 2.56066L3.10399 9Z",fill:e.arrowsColor},null,8,Uke)]))],2)])):s.createCommentVNode("",!0),e.areSlidesArrowsVisible?(s.openBlock(),s.createElementBlock("div",{key:1,class:"gsc-carousel__2d__arrow-right",onClick:x[1]||(x[1]=B=>u())},[s.createElementVNode("div",{class:s.normalizeClass(["gsc-carousel__2d__slide-button",{rounded:e.areSlidesArrowsRounded}])},[(s.openBlock(),s.createElementBlock("svg",jke,[s.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M5.89601 9L0.376575 2.56066C-0.125528 1.97487 -0.125528 1.02513 0.376575 0.439339C0.878675 -0.146447 1.69275 -0.146447 2.19486 0.43934L8.62343 7.93934C9.12553 8.52513 9.12553 9.47487 8.62343 10.0607L2.19486 17.5607C1.69275 18.1464 0.878675 18.1464 0.376575 17.5607C-0.125528 16.9749 -0.125528 16.0251 0.376575 15.4393L5.89601 9Z",fill:e.arrowsColor},null,8,zke)]))],2)])):s.createCommentVNode("",!0),s.createElementVNode("div",Hke,[e.areNavigationArrowsVisible?(s.openBlock(),s.createElementBlock("div",{key:0,class:"gsc-carousel__2d__navigation__arrow-left",onClick:x[2]||(x[2]=B=>h())},[(s.openBlock(),s.createElementBlock("svg",qke,[s.createElementVNode("path",{d:"M6.72998 13.894L1.46621 8.63028C0.84457 8.00863 0.84457 6.9914 1.46621 6.36976L6.72998 1.10599",stroke:i.arrowsColor},null,8,Wke)]))])):s.createCommentVNode("",!0),e.isPaginationVisible?(s.openBlock(),s.createElementBlock("div",Gke,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(e.items,(B,F)=>(s.openBlock(),s.createElementBlock("div",{key:`i-${F}`,class:"gsc-carousel__2d__navigation__pagination__item",style:s.normalizeStyle({height:`${i.navigationHeight}px`,width:`${o.value===F?i.navigationActiveWidth:i.navigationActiveWidth/2}px`,borderRadius:`${i.navigationBorderRadius}px`,backgroundColor:`${o.value===F?i.navigationActiveColor:i.navigationColor}`,transition:"all 0.1s ease-in-out"}),onClick:O=>f(F)},null,12,Kke))),128))])):s.createCommentVNode("",!0),e.areNavigationArrowsVisible?(s.openBlock(),s.createElementBlock("div",{key:2,class:"gsc-carousel__2d__navigation__arrow-right",onClick:x[3]||(x[3]=B=>n.value.next())},[(s.openBlock(),s.createElementBlock("svg",Xke,[s.createElementVNode("path",{d:"M0.72998 1.10599L5.99375 6.36975C6.61539 6.9914 6.61539 8.00863 5.99375 8.63027L0.72998 13.894",stroke:i.arrowsColor},null,8,Jke)]))])):s.createCommentVNode("",!0)])],2))]))}},Qke=Oke(Yke,[["__scopeId","data-v-dd3cbf69"]]),Zke={class:"carousel-video-player"},$ke={class:"video-container"},eEe=["id"],tEe={__name:"CarouselVideoPlayer",props:{play:{type:Object,required:!0},videojs:{type:Function,required:!0}},emits:["play-ended"],setup(e,{emit:t}){const a=e,i=t,n=s.ref(null),r=s.computed(()=>`p-${a.play.playId}`);function o(){n.value=a.videojs(r.value,{controlBar:{fullscreenToggle:!1},playsinline:!0}),n.value.src({type:"video/mp4",src:`https://golstatsbets.blob.core.windows.net/video-player/${a.play.gameId}_1.mp4`}),n.value.offset({start:a.play.startSeconds,end:a.play.endSeconds}),n.value.on("ended",()=>{i("play-ended")}),a.play.videoPlayer=n}return s.onMounted(()=>{setTimeout(()=>{o()},10)}),(l,c)=>(s.openBlock(),s.createElementBlock("div",Zke,[s.createElementVNode("div",$ke,[s.createElementVNode("video",{id:r.value,class:"video-js",controls:"",preload:"auto","data-setup":"{}"},null,8,eEe)])]))}},aEe=bt(tEe,[["__scopeId","data-v-e4d57431"]]),iEe=e=>(s.pushScopeId("data-v-bf6136c0"),e=e(),s.popScopeId(),e),nEe=iEe(()=>s.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none"},[s.createElementVNode("path",{d:"M5 15L15 5",stroke:"white","stroke-width":"1.7","stroke-miterlimit":"10","stroke-linecap":"round","stroke-linejoin":"round"}),s.createElementVNode("path",{d:"M15 15L5 5",stroke:"white","stroke-width":"1.7","stroke-miterlimit":"10","stroke-linecap":"round","stroke-linejoin":"round"})],-1)),rEe=[nEe],sEe={class:"carousel-full-screen__carousel"},oEe={class:"carousel-full-screen__carousel__video-player"},lEe={__name:"CarouselFullScreen",props:{playerQueue:{type:Array,default:()=>[]},playlistIndex:{type:Number,default:0},initialPlay:{type:Object,default:()=>({})},videojs:{type:Function,required:!0}},emits:["close"],setup(e,{emit:t}){const a=e,i=t,n=s.ref({wrapAround:!1,itemsToShow:1.2,isMainSlidePriority:!0,areSlidesArrowsVisible:!0,areNavigationArrowsVisible:!1,slideLeftArrowBackgroundImage:"none",slideRightArrowBackgroundImage:"none"}),r=s.ref(0),o=s.ref(0),l=s.ref(null);function c(){return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}function d(){return/iPhone|iPad/i.test(navigator.userAgent)}function u(){const _=document.getElementById("carousel-swipe"),x=window.screen.orientation;x.angle==90&&c()||window.innerWidth<window.innerHeight&&c()?_.classList.remove("landscape"):(x.angle==0&&c()||window.innerWidth>window.innerHeight&&c())&&_.classList.add("landscape")}function h(){const _=document.getElementById("carousel-swipe"),x=window.screen.orientation;x.angle==90&&c()||window.innerWidth>window.innerHeight&&c()?_.classList.remove("landscape"):(x.angle==0&&c()||window.innerWidth<window.innerHeight&&c())&&_.classList.add("landscape")}function p(){const _=document.getElementById("carousel-swipe");window.innerWidth>window.innerHeight&&c()?_.classList.remove("landscape"):window.innerWidth<window.innerHeight&&c()&&_.classList.add("landscape")}function m({selectedItemIndex:_}){const x=_-r.value;o.value+=x;const B=a.playerQueue[r.value],F=a.playerQueue[_];B.videoPlayer&&B.videoPlayer.pause(),F.videoPlayer&&F.videoPlayer.play(),r.value=_}function f(){l.value&&l.value.next()}function v(){const _=a.playlistIndex+o.value;o.value=0,r.value=0,i("close",_)}return s.onMounted(()=>{d()?(window.addEventListener("resize",p),p()):(window.addEventListener("orientationchange",u),h()),setTimeout(()=>{const _=document.getElementsByClassName("video-element");_&&_.length&&Array.from(_).forEach((x,B)=>{x.id=`plyrFS${B+1}`})},100)}),s.onBeforeUnmount(()=>{d()?window.removeEventListener("resize",p):window.removeEventListener("orientationchange",u),a.playerQueue.forEach(_=>{_.videoPlayer&&(_.videoPlayer.pause(),_.videoPlayer.dispose())})}),(_,x)=>(s.openBlock(),s.createElementBlock("div",{class:s.normalizeClass(["carousel-full-screen",{landscape:c()}]),id:"carousel-swipe"},[s.createElementVNode("div",{class:"carousel-full-screen__close",onClick:v},rEe),s.createElementVNode("div",sEe,[s.createVNode(s.unref(Qke),s.mergeProps({ref_key:"gscCarousel",ref:l},n.value,{items:e.playerQueue,"default-item-by-prop":{propName:"playId",value:e.initialPlay.playId},onInput:m}),{default:s.withCtx(({item:B})=>[s.createElementVNode("div",oEe,[s.createVNode(aEe,{videojs:e.videojs,play:B,onPlayEnded:f},null,8,["videojs","play"])])]),_:1},16,["items","default-item-by-prop"])])],2))}},cEe=bt(lEe,[["__scopeId","data-v-bf6136c0"]]),dEe=Gd(),Yi=n0e();let yu=null;const _u=["goals","bestPlays"],ze={1:{name:"Oportunidad de Gol",weighing:3},2:{name:"Gol",weighing:1},3:{name:"Autogol",weighing:2},4:{name:"Tarjeta Amarilla",weighing:5},5:{name:"Tarjeta Roja",weighing:4},6:{name:"Penal Recibido",weighing:6},7:{name:"Atajada",weighing:8},8:{name:"Asistencia",weighing:9},9:{name:"Participación en Gol",weighing:14},10:{name:"Sobresaliente",weighing:20},11:{name:"Centro Rematado",weighing:11},12:{name:"Corner Rematado",weighing:12},13:{name:"Tiro Libre Rematado",weighing:13},14:{name:"1vs1 Exitoso Ofensivo",weighing:16},15:{name:"1vs1 Exitoso Defensivo",weighing:18},16:{name:"Pase Filtrado",weighing:15},17:{name:"Balón ganado en Área Propia",weighing:19},18:{name:"Balón Recuperado",weighing:17},19:{name:"Gol Recibido",weighing:7},20:{name:"Pases acertados",weighing:100},21:{name:"Balones recuperados en disputa",weighing:100},22:{name:"Asistencias",weighing:100},23:{name:"Participaciones en gol",weighing:100},24:{name:"Tiros a gol",weighing:100},25:{name:"Tiros a gol que llegaron a la portería",weighing:100},26:{name:"Cabeceos en área rival",weighing:100},27:{name:"Cabeceos en área propia",weighing:100},28:{name:"Centros",weighing:100},29:{name:"Centros acertados",weighing:100},30:{name:"1vs1 exitosos ofensivo",weighing:100},31:{name:"1vs1 exitosos ofensivo que terminaron en gol",weighing:100},32:{name:"1vs1 defensivos exitoso",weighing:100},33:{name:"Rechaces",weighing:100},34:{name:"Balones ganados en área rival",weighing:100},35:{name:"Balones ganados en área propia",weighing:100},36:{name:"Faltas cometidas",weighing:100},37:{name:"Faltas recibidas",weighing:100},38:{name:"Tarjetas amarillas",weighing:100},39:{name:"Tarjetas rojas",weighing:100},40:{name:"Atajadas",weighing:100},41:{name:"Tiros de Esquina",weighing:100,bluer:!0},42:{name:"Balones recuperados en cancha rival",weighing:100},43:{name:"Origen de gol",weighing:10}},Ef={player:{"12-55":ze[2]},gamesAndTeams:{"12-55":ze[2],"54_r-35_r":ze[3]}},Qi={games:{"607-608":ze[1],"12-55":ze[2],"54-35":ze[3],"14-52":ze[4],"15-53":ze[5],"466-477":ze[6]},team:{"607-608":ze[1],"12-55":ze[2],"54-35":ze[3],"14-52":ze[4],"15-53":ze[5],"466-477":ze[6],"40-257":ze[19],39:ze[7]},player:{regular:{12:ze[2],35:ze[3],10:ze[8],27:ze[9],607:ze[1],61:ze[43],519:ze[10],"98-101-109-112":ze[11],"121-122-127-128-135-136-141-142":ze[12],"161-170-179":ze[13],702:ze[14],730:ze[15],466:ze[6],217:ze[16],"211-232-235-239-242-282-284-289-291-296":ze[17],"485-486-487-488":ze[18],14:ze[4],15:ze[5],257:ze[19]},goalkeeper:{55:ze[2],324:ze[8],323:ze[9],608:ze[1],39:ze[7],774:ze[14],802:ze[15],52:ze[4],53:ze[5],40:ze[19],54:ze[3]}}},uEe={"2-20":ze[20],483:ze[21],10:ze[22],27:ze[23],510:ze[24],"537-540-544-547":ze[25],328:ze[26],"231-280-238-287-406-294":ze[27],"13-25":ze[28],"98-101-104-105-109-112-115-116":ze[29],4:ze[30],88:ze[31],5:ze[32],34:ze[33],11:ze[34],23:ze[35],17:ze[36],18:ze[37],14:ze[38],15:ze[39],39:ze[40],"31-32":ze[41],"225-224":ze[42]},hEe=["Ene","Feb","Mar","Abr","May","Jun","Jul","Ago","Sep","Oct","Nov","Dic"],pEe=1,c1={components:{CarouselFullScreen:cEe,SearchFilters:wke,VideoSearch:awe,VideoPlayerControls:Tde,VideoPlayer:rue,CurrentMatch:coe,MatchesList:hoe,GSCPlayerTeamGame:pde,GscSwitchComponent:AE},props:{section:{type:Boolean,default:!0},componentWidth:{type:Number,default:767,validator(e){return e>0}},backgroundColor:{type:String,default:"#172531"},user:{type:Object,default:()=>({})},token:{type:String,default:""},isGSUser:{type:Boolean,default:!0},tournamentSelectedId:{type:Number,default:0},seasonSelectedId:{type:Number,default:0},tournamentsForMediaPlayer:{type:[Map],default:()=>new Map},isFromMexico:{type:Boolean,default:!0},gsData:{type:[Object,null],default:null},isFirstRow:{type:Boolean,default:!1},custom:{type:[Object,null],default:null},autoFillVideos:{type:Boolean,default:!1},isPlayerUser:{type:Boolean,default:!1},isGoalkeeper:{type:[Boolean,Number],default:!1},playerId:{type:Number,default:0},isModalMode:{type:Boolean,default:!0},modalInitialData:{type:Object,default:null},isModal:{type:Boolean,default:!1},isGoalsOnly:{type:Boolean,default:!1}},data(){return{videojsLocal:null,player:null,lastSearchResult:null,mobileClass:!1,currentMobileTab:"Estás viendo",currentTabMoreVideos:"Resumen",booleanIsFirstIteration:!0,numberCurrentSeasonId:0,numberLastActionId:0,numberPlayerSpeed:1,numberOptionsMenuTop:0,numberOptionsMenuLeft:0,booleanIsVideoPlayerPlaying:!1,booleanIsOptionsMenuVisible:!1,booleanIsSpeedModalVisible:!1,showModalConfirm:!1,showConfirmPlaylist:!0,showModal:!1,seasonId:0,plays:[],playerQueue:[],playsType:_u[0],playsTypeOptions:_u,playInfo:{},teamsMap:new Map,gamesMap:new Map,roundsMap:new Map,mediaPlayerMode:"games",playerPosition:0,playlistTournament:null,showImage:!1,seasonName:"",playlistSeasonIndex:0,playlistSeasonIndexAux:0,playerModeSelected:1,currentTournament:{seasons:[]},mediaPlayerResizeObserver:null,mediaPlayerWidth:0,lastMediaPlayerWidth:0,selectedType:1,roundsAndGamesWithPlaysMap:null,gameIdSelected:0,seasonSearchingCount:0,hasPlayerActivityInTournament:!1,isAutoPlay:!1,storeModule:this.isModalMode?"mediaModal":"mediaGeneral",isFirstTypeChange:!0,rivalCategories:[],counterAux:0,useIdsFromAdvancedFilter:!1,maxGameId:0,tournamentsForModalLauncher:new Map,lastGameIdWatched:0,isSomeListSelected:!1,booleanIsModesModalOpen:!1,arrayCategoriesIdsToFilter:null,arrayRivalCategoriesIdsToFilter:null,arrayCategoriesIdsRaw:null,booleanIsFilterApplied:!1,stringModeTitle:"Estas viendo: Goles de la jornada",objectMediaPlayerModeFilters:this.getEmptyMediaPlayerModeFilters(),playSeekerPlays:[],geoOptions:{enableHighAccuracy:!0,timeout:5e3,maximumAge:0},coords:null,concatPlays:!1,currentPlayIndex:0,firstInteractionToken:"",firstInteractionUrl:"https://playseeker-api-fi.golstats.com",userBehaviorUrl:"https://playseeker-api-ub.golstats.com",gamesUrl:"https://qyyibs1w0d.execute-api.us-west-2.amazonaws.com/prod/calendar/gamesBySeason?",booleanIsPlaySeekerMode:!1,objectLastDataToFilter:null,objectPlaySeekerLastPlay:null,objectPlaySync:null,isCarouselFullScreenVisible:!1}},computed:{...cC("mediaModal",["currentPlaylistPlays","modalSectionSelected","isModalOpen","playlistGameId"]),...cC("mediaGeneral",["playersMapMyPlaylists","teamsMapMyPlaylists","gamesMapMyPlaylists","maxGameIdMyPlaylists","player","mapMinutesPlayedCategoryNames","playSeekerUserId","playSeekerCurrentSessionId"]),...uC("mediaModal",["currentPlayerQueueByGames"]),...uC("mediaGeneral",["userPlaylistsSeasonIds"]),currentMatch(){return this.currentPlayerQueueByGames&&this.currentPlayerQueueByGames.length&&this.playlistGameId?this.currentPlayerQueueByGames.find(e=>e.id===this.playlistGameId):null},dynamicClasses(){let e=[];return this.isModal&&e.push("modal-class"),this.mediaPlayerWidth>0&&(this.mediaPlayerWidth<=420?e.push("modal-video__420"):this.mediaPlayerWidth<=750?e.push("modal-video__750"):this.mediaPlayerWidth<=850?e.push("modal-video__850"):this.mediaPlayerWidth<=1024?e.push("modal-video__1024"):this.mediaPlayerWidth<=1100?e.push("modal-video__1100"):this.mediaPlayerWidth<=1280?e.push("modal-video__1280"):this.mediaPlayerWidth<=1520&&e.push("modal-video__1520")),e},carouselPlayerQueue(){return this.playerQueue?this.playerQueue.filter(e=>e.gameId===this.currentMatch.id):[]},mediaPlayerType(){return"general"},extraCategories(){return[...K1e,...X1e,...tSe,...nSe,...lSe,...hSe,...gSe,...Z1e].reduce((e,t)=>(t.categories.forEach(a=>{e.set(a,{id:a,name:this.$t&&t.translationKey&&this.$t(t.translationKey)||t.singleName})}),e),new Map)},isMyPlaylistsActive(){return this.isModalMode&&this.modalSectionSelected===2&&this.isSomeListSelected},modalInitialState(){return this.isModalMode?this.$store.state.mediaModal.modalInitialState:{}},modalSectionSelected(){return this.isModalMode?this.$store.state.mediaModal.modalSectionSelected:{}},playerType(){return this.isModalMode?this.$store.state.mediaModal.playerType:0},advancedFilter(){return this.isModalMode?this.$store.state.mediaModal.advancedFilter:{}},applyAdvancedFilterCounter(){return this.isModalMode?this.$store.state.mediaModal.applyAdvancedFilterCounter:0},selectedSubcategoryIds(){return this.isModalMode?this.$store.state.mediaModal.selectedSubcategoryIds:[]},getSeasonIdOnly(){return this.$store.getters[`${this.storeModule}/getSeasonIdOnly`]},getTeamId(){return this.$store.getters[`${this.storeModule}/getTeamId`]},getPlayerId(){return this.$store.getters[`${this.storeModule}/getPlayerId`]},seasonPlayers(){return this.$store.getters[`${this.storeModule}/seasonPlayers`]},selectedTournament(){return this.$store.getters[`${this.storeModule}/selectedTournament`]},isPlayerGoalkeeper(){return this.$store.getters[`${this.storeModule}/isPlayerGoalkeeper`]},hasPlayerPositionId(){return this.$store.getters[`${this.storeModule}/hasPlayerPositionId`]},playersByTeam(){return this.$store.getters[`${this.storeModule}/playersByTeam`]},tournaments(){return this.$store.state[`${this.storeModule}`].tournaments},seasonID(){return this.$store.state[`${this.storeModule}`].seasonID},playlistIndex(){return this.$store.state[`${this.storeModule}`].playlistIndex},retroSeason(){return this.$store.state[`${this.storeModule}`].retroSeason},objectMediaData(){return this.$store.state[`${this.storeModule}`].objectMediaData},playsSaved(){return this.$store.getters["mediaGeneral/playsSaved"]},summaryData(){return null},isSummaryData(){return!!this.summaryData},profilesSeasonId(){return this.isModalMode?0:this.$store.getters["filterGeneral/getSeasonId"]},currentCategories(){return this.isModalMode?this.modalSectionSelected===1?this.isGoalsOnly?Object.keys(Ef.gamesAndTeams).reduce((e,t)=>(t.split("-").forEach(a=>{e.push(a)}),e),[]):this.modalInitialState?this.modalInitialState.categoryIds&&this.modalInitialState.categoryIds.length?this.modalInitialState.categoryIds:this.getBestCategoriesIds():[]:this.useIdsFromAdvancedFilter?this.selectedSubcategoryIds:this.modalInitialState?this.modalInitialState.categoryIds:[]:this.summaryData?Object.keys(this.summaryData.isTeam?Ef.gamesAndTeams:this.summaryData.positionId===1?Qi.player.goalkeeper:Qi.player.regular).reduce((e,t)=>(t.split("-").forEach(a=>{e.push(a)}),e),[]):Object.keys(this.user&&this.user.is_player&&this.hasUserPlayerSelectedSeason?this.user.is_goalkeeper?Qi.player.goalkeeper:Qi.player.regular:Ef.gamesAndTeams).reduce((e,t)=>(t.split("-").forEach(a=>{e.push(a)}),e),[])},allCategories(){const e=new Map,t={...Ef.gamesAndTeams,...uEe};return Object.entries(t).forEach(([a,i])=>{a.split("-").forEach(n=>{e.set(n.includes("_r")?n:Number(n),i)})}),this.setBestCategoriesNames(e),e},queryCategories(){let e="";const t=[];return this.currentCategories.forEach((a,i)=>{let n=typeof a=="string"?a:a.toString(),r=!1;n.includes("_")&&(r=!0,n=Number(n.split("_")[0]),t.push(n)),e+=`${i>0?"&":""}${r?"r":""}categories=${n}`}),this.setRivalCategories(t),e},gamesByRound(){const e={};if(this.roundsAndGamesWithPlaysMap)for(const[t,a]of this.roundsAndGamesWithPlaysMap){const[i,n]=t.split(","),r=Array.from(a.values());r.sort((o,l)=>l.dateTimeMillis-o.dateTimeMillis),e[n]={name:i,games:r}}return e},teams(){return this.teamsMap?Array.from(this.teamsMap.values()):[]},isGoalsActive(){return this.playsType===_u[0]},headerResponsiveClass(){const e=[];return this.mediaPlayerWidth<354?e.push("header--width-354"):this.mediaPlayerWidth<440?e.push("header--width-400"):this.mediaPlayerWidth<541?e.push("header--width-540"):this.mediaPlayerWidth<626?e.push("header--width-626"):this.isFirstRow&&this.mediaPlayerWidth<610&&e.push("header--first-row"),e},playInfoStyle(){return!this.gsData&&this.mediaPlayerWidth<871?{padding:"0 0.5em"}:this.isFirstRow?{"margin-top":"0.3em"}:{}},headerIcon(){return this.custom!=null&&Object.keys(this.custom).length?this.custom.logo:"https://az755631.vo.msecnd.net/content/shieldLogoPc.png"},isUserTournament(){return this.gsData&&this.gsData.tournamentId===this.currentTournament._id},hasUserPlayerSelectedSeason(){return this.user.is_player?this.user.related_seasons.includes(this.numberCurrentSeasonId||this.seasonSelectedId):!1},hasUserTeamSelectedTournament(){return!this.user.is_player&&this.user.team?this.user.related_seasons.includes(this.numberCurrentSeasonId||this.seasonSelectedId):!1}},watch:{isModalOpen(e){e||this.applyObjectMediaData()},seasonSelected(){this.setInitialTitle()},tournamentSelectedId(){this.setInitialTitle()},seasonSelectedId:{handler(e){this.setUpData(e)},immediate:!0},selectedTournament:{deep:!0,handler(e){e&&(this.playlistTournament=e,this.playlistSeasonIndex=0)}},seasonID:{deep:!0,handler(e){e&&(this.playlistSeasonIndexAux=e.index)}},playsType(e){this.isModalMode||this.setPlaysType({mediaPlayerType:this.mediaPlayerType,playsType:e}),this.fetchInfo(!0,this.playlistTournament)},modalSectionSelected(e){e!==1&&(this.isSomeListSelected=!1),[0,1].includes(e)&&(this.playsType!==_u[e]?this.playsType=_u[e]:this.fetchInfo(!0,this.playlistTournament)),this.modalInitialState&&this.modalInitialState.mainSectionType-1===this.modalSectionSelected&&this.checkSeason()},selectedSubcategoryIds(e){e&&e.length&&this.applyAdvancedFilter()},seasonPlayers(e){if(this.getPlayerId&&!this.hasPlayerPositionId){const t=e.get(this.getPlayerId);t&&this.$store.commit(`${this.storeModule}/setPlayer`,t)}},profilesSeasonId:{handler(e){this.setUpData(e)}},tournamentsForMediaPlayer(e){this.seasonSelectedId&&e.size>0&&!this.isModalMode&&this.setUpData(this.seasonSelectedId)},currentPlaylistPlays(e){this.isModalMode&&this.modalSectionSelected===2&&this.setPlaylistPlays(e)},userPlaylistsSeasonIds(e){this.fillMyPlaylistsData(Array.from(e.values()))},seasonId:{immediate:!0,handler(e){this.isModalMode||this.setSeasonId({mediaPlayerType:this.mediaPlayerType,seasonId:e})}},currentCategories:{immediate:!0,handler(e){this.isModalMode||this.setCurrentCategories({mediaPlayerType:this.mediaPlayerType,currentCategories:e})}},selectedType:{immediate:!0,handler(e){this.isModalMode||this.setSelectedType({mediaPlayerType:this.mediaPlayerType,selectedType:e})}},getTeamId:{immediate:!0,handler(e){this.isModalMode||this.setTeamId({mediaPlayerType:this.mediaPlayerType,teamId:e})}},player:{immediate:!0,handler(e){this.isModalMode||this.setModalPlayer({mediaPlayerType:this.mediaPlayerType,player:e})}}},methods:{...dC("mediaModal",["setPlaylistGameId","setPlayerType","setModalInitialState","setIsModalOpen","setIsModalCreatePlayListOpen"]),...dC("mediaGeneral",["setPlayersMapMyPlaylists","setTeamsMapMyPlaylists","setGamesMapMyPlaylists","setMaxGameIdMyPlaylists","setSeasonId","setPlaysType","setCurrentCategories","setSelectedType","setTournamentsForModalLauncher","setTeamId","setModalPlayer","setPlaysToSaveAsFavorites","setPlaySeekerUserId","setPlaySeekerCurrentSessionId"]),applyObjectMediaData(){!this.objectMediaData||this.objectMediaData.booleanAvoidApply||(this.objectMediaData.numberMainSectionType&&this.$store.commit("mediaModal/setModalSectionSelected",this.objectMediaData.numberMainSectionType),this.objectPlaySync=this.objectMediaData.objectPlaySync?{...this.objectMediaData.objectPlaySync,booleanIsApplied:!1}:null,this.stringModeTitle=this.objectMediaData.stringModeTitle,this.playerQueue=[...this.objectMediaData.arrayPlayerQueue],this.$store.commit(`${this.storeModule}/setPlaylistIndex`,{mediaPlayerType:this.isModalMode?null:this.mediaPlayerType,playlistIndex:this.objectMediaData.numberPlaylistIndex}),this.$store.commit(`${this.storeModule}/setCurrentPlayerQueue`,this.playerQueue),this.playlistSeasonIndex=this.objectMediaData.numberPlaylistSeasonIndex,this.booleanIsPlaySeekerMode=this.objectMediaData.booleanIsPlaySeekerMode,this.booleanIsFilterApplied=this.objectMediaData.booleanIsFilterApplied,this.objectMediaData.objectLastDataToFilter&&this.fillDataToFilterData(this.objectMediaData.objectLastDataToFilter))},setPlaylistPlays(e){const t=this.getFormattedPlays(e,!0);this.generatePlayerQueue(null,t,!0)},applyAdvancedFilter(){this.useIdsFromAdvancedFilter=!0,this.fetchInfo(!0,this.playlistTournament)},setRivalCategories(e){this.rivalCategories=e},setUpData(e,t=!1){if(!this.isFromMexico&&!this.isGSUser){this.$emit("finish");return}let a=!1;const i=this.tournamentsForMediaPlayer;e||(a=!0,e=this.seasonSelectedId);const n=Number(e);let r=i.get(n);if(this.tournamentsForModalLauncher=i,this.isModalMode||this.setTournamentsForModalLauncher({mediaPlayerType:this.mediaPlayerType,tournamentsForModalLauncher:i}),!r&&this.isModalMode&&this.modalInitialState&&this.modalInitialState.tournamentsLastClashes&&(r=this.modalInitialState.tournamentsLastClashes.get(e)),this.playlistTournament=r,r){if(this.summaryData&&(this.stringModeTitle=this.summaryData.isTeam?"Estas viendo: Resumen equipo":"Estas viendo: Resumen jugador"),this.playlistSeasonIndex=r.seasons.findIndex(o=>o.id===n),this.playlistSeasonIndexAux=this.playlistSeasonIndex,!t&&!this.summaryData)if(this.isPlayerUser){if(this.hasPlayerActivityInTournament=!!this.getPlayerTournamentBySelectedSeason(n,i),this.hasPlayerActivityInTournament){const o={id:Number(this.user.player)};this.isGoalkeeper&&(o.positionId=1),this.seasonSearchingCount=0,this.$store.commit(`${this.storeModule}/setPlayer`,o),this.$store.commit(`${this.storeModule}/setTeam`,this.gsData.teamId),this.onPlayerSelected();return}!this.hasPlayerActivityInTournament&&this.selectedType!==1&&(this.$store.commit(`${this.storeModule}/setPlayer`,null),this.$store.commit(`${this.storeModule}/setTeam`,null))}else if(this.gsData&&this.gsData.tournamentId===this.playlistTournament._id&&this.gsData.teamId){this.seasonSearchingCount=0,this.$store.commit(`${this.storeModule}/setPlayer`,null),this.$store.commit(`${this.storeModule}/setTeam`,this.gsData.teamId),this.onTeamSelected();return}else this.seasonSearchingCount=0,this.$store.commit(`${this.storeModule}/setPlayer`,null),this.$store.commit(`${this.storeModule}/setTeam`,null);this.fillSeasons([r],a)}},setInitialTitle(){!this.summaryData&&!this.booleanIsFilterApplied&&this.hasUserPlayerSelectedSeason?this.stringModeTitle="Estas viendo: Resumen de jugador":!this.summaryData&&!this.booleanIsFilterApplied&&this.hasUserTeamSelectedTournament?this.stringModeTitle="Estas viendo: Resumen de equipo":this.stringModeTitle="Estas viendo: Goles de la jornada"},closeModalConfirm(){this.showModalConfirm=!1},onModalSpeedClose(){this.booleanIsSpeedModalVisible=!1},onClickSpeed(e){this.numberPlayerSpeed=e,this.$refs.videoPlayer.setSpeedToAllPlayers(e),this.booleanIsSpeedModalVisible=!1},confirmModalConfirm(){this.showModalConfirm=!1,this.$refs.videoPlayer.playCurrentVideoPlayer()},openmodal(){this.$refs.videoPlayer.setAutoPlaysCount(0),this.showModal=!0},closeModal(){this.showModal=!1},getBestCategoriesIds(){let e=null;return this.mediaPlayerMode==="player"?this.isPlayerGoalkeeper?e=Object.keys(Qi.player.goalkeeper):e=Object.keys(Qi.player.regular):e=Object.keys(Qi[this.mediaPlayerMode]),e.reduce((t,a)=>(a.split("-").forEach(i=>{t.push(i)}),t),[])},setBestCategoriesNames(e){[...Object.entries(Qi.player.goalkeeper),...Object.entries(Qi.player.regular),...Object.entries(Qi[this.mediaPlayerMode])].forEach(([t,a])=>{t.split("-").forEach(i=>{e.set(Number(i),a)})})},onPlaysTypeClicked(e){this.playsType=e},getPlayTime(e,t){let a="",i=0;switch(e.matchLapse){case 1:a=e.syncStartFirstTime;break;case 2:a=e.syncStartSecondTime,i=45;break;case 3:a=e.syncStartFirstExtraTime,i=90;break;case 4:a=e.syncStartSecondExtraTime,i=105;break;case 5:a=e.syncStartPenals,i=120;break}return(!a||a==="0")&&(a="00:00"),this.getTimeToSeconds(a)+(this.getTimeToSeconds(e[t])-i*60)},getTimeToSeconds(e){const t=e.indexOf(".")>-1?e.substring(0,e.indexOf(".")):e,[a,i,n]=t.split(":").reverse();return(n?Number(n)*60*60:0)+Number(i)*60+Number(a)},getFormattedPlays(e,t=!1,a=null){this.roundsAndGamesWithPlaysMap=new Map,yu=new Map,e.forEach(n=>{const r=n.reduce((u,h,p)=>(u[dEe[p]]=h,u),{});r.playRaw=n;let o=null,l=null,c=null,d=0;if(t?(c=this.teamsMapMyPlaylists,d=this.maxGameIdMyPlaylists,o=this.gamesMapMyPlaylists.get(r.gameId),l=this.playersMapMyPlaylists.get(r.playerId),r.booleanIsFromMyPlaylists=!0):(c=a?a.mapTeams:this.teamsMap,d=a?a.maxGameId:this.maxGameId,o=a?a.mapGames.get(r.gameId):this.gamesMap.get(r.gameId),l=a?a.mapPlayers.get(r.playerId):this.seasonPlayers.get(r.playerId)),l&&o&&r.gameId<=d){const u=`${o.roundName},${o.roundAbbreviation},${o.seasonId}`,h=this.roundsAndGamesWithPlaysMap.get(u);h?h.set(o.id,o):this.roundsAndGamesWithPlaysMap.set(u,new Map().set(o.id,o)),r.game=o,r.game.awayTeam.id===r.teamId?(r.teamName=r.game.awayTeam.name,r.teamAcronym=r.game.awayTeam.acronym,r.rivalName=r.game.homeTeam.name):(r.teamName=r.game.homeTeam.name,r.teamAcronym=r.game.homeTeam.acronym,r.rivalName=r.game.awayTeam.name),r.playingAs=r.teamId===r.game.homeTeam.id?1:2,r.player=l,r.playerTeamLogo=c.get(r.player.teamId).logo,r.rivalTeamLogo=c.get(r.player.teamId===r.game.homeTeam.id?r.game.awayTeam.id:r.game.homeTeam.id).logo,r.startSeconds=this.getPlayTime(r,"startTime"),r.endSeconds=this.getPlayTime(r,"endTime");const p=new Date(r.gameDate),[m,f]=r.gameHour.split(":");p.setHours(m),p.setMinutes(f),r.dateTimeMillis=p.valueOf(),yu.has(r.gameId)?yu.get(r.gameId).plays.push(r):yu.set(r.gameId,{dateTimeMillis:p.valueOf(),plays:[r]})}});const i=Array.from(yu.values());return i.sort((n,r)=>r.dateTimeMillis-n.dateTimeMillis),i.reduce((n,r)=>(r.plays.sort((o,l)=>+`${o.matchLapse}${o.startTime.replace(/:*\.*/g,"")}`-+`${l.matchLapse}${l.startTime.replace(/:*\.*/g,"")}`),n.push(...r.plays),n),[])},generatePlayerQueue(e,t,a=!1,i=-1,n){if(!t.length)return;const r=new Map,o=this.modalInitialState?this.modalInitialState.advancedFilter||{}:{};o&&o.fieldSections&&(o.fieldSectors=o.fieldSections.map(d=>Ji[`${d}`]));let l=0,c=0;if(this.playerQueue=t.reduce((d,u)=>{const h=`${u.gameId}-${u.playerId}-${u.startTime}`;let p=!1;if(this.modalInitialState&&this.modalInitialState.playsIds)p=!this.modalInitialState.playsIds.has(u.playId);else if(this.lastSearchResult)this.lastSearchResult.team&&(p=u.game.homeTeam.id!==this.lastSearchResult.team.id&&u.game.awayTeam.id!==this.lastSearchResult.team.id),!p&&this.lastSearchResult.game&&(p=u.gameId!==this.lastSearchResult.game.id),!p&&this.lastSearchResult.player&&(p=u.playerId!==this.lastSearchResult.player.id);else if(this.isModalMode&&!a&&!n){this.modalInitialState.lastClashesGameId&&(p=u.gameId!==this.modalInitialState.lastClashesGameId);const v=this.getTeamId||this.modalInitialState.teamId;if(v&&(p=u.game.homeTeam.id!==v&&u.game.awayTeam.id!==v),!p&&this.selectedType===2&&(p=(this.modalInitialState&&this.modalInitialState.playerIds?this.modalInitialState.playerIds[0]:this.getPlayerId)!==u.playerId),!p&&o&&(o.playingAs&&o.playingAs.length&&(p=o.requiresRivalTransform&&o.playingAs.length===1&&u.teamId!==v?o.playingAs.includes(u.playingAs):!o.playingAs.includes(u.playingAs)),!p&&o.timeSections&&o.timeSections.length&&(p=!o.timeSections.includes(u.section)),!p&&o.coordinatePoint&&o.fieldSectors)){const _=bl(u[`x${o.coordinatePoint}`],u[`y${o.coordinatePoint}`])+1;p=!o.fieldSectors.includes(_)}if(!p&&v&&this.modalInitialState.matchResult&&this.modalInitialState.matchResult.length){const _=u.game.gameResult===3?3:u.game.gameResult===1&&v===u.game.homeTeam.id||u.game.gameResult===2&&v===u.game.awayTeam.id?1:2;p=!this.modalInitialState.matchResult.includes(_)}}const m=this.lastSearchResult?this.lastSearchResult.categoryIds:this.arrayCategoriesIdsToFilter||e,f=this.arrayRivalCategoriesIdsToFilter||this.rivalCategories;if(a||(n||!p)&&(m.includes(u.categoryId)||f.includes(u.categoryId)&&(this.booleanIsFilterApplied||!this.getTeamId||u.rivalTeamId===this.getTeamId))&&u.startSeconds!==u.endSeconds){const v=r.get(h);let _=this.modalInitialState&&this.modalInitialState.mainSectionType===this.modalSectionSelected+1&&this.modalInitialState.categorySingleName&&!this.modalInitialState.avoidCategorySingleName&&![35,54].includes(u.categoryId)?{name:this.modalInitialState.categorySingleName}:this.allCategories.get(u.categoryId)||this.allCategories.get(`${u.categoryId}_r`)||this.extraCategories.get(u.categoryId)||this.extraCategories.get(`${u.categoryId}_r`);this.modalInitialState&&this.modalInitialState.avoidCategorySingleName?_={name:this.modalInitialState.categorySingleName,weighing:1}:this.isModalMode&&u.categoryId===33&&(_={name:"Fuera de lugar",weighing:1});let x="";_||(x=this.mapMinutesPlayedCategoryNames.get(u.categoryId),x?_={name:x,weighing:1}:!_&&o&&(_={name:o.playListTitle,weighing:100})),_||(_=this.allCategories.get(u.categoryId)||this.allCategories.get(`${u.categoryId}_r`)||this.extraCategories.get(u.categoryId)||this.extraCategories.get(`${u.categoryId}_r`)),c||(this.lastGameIdWatched===u.gameId&&(c=l),l++),v?(_.weighing<v.mainCategory.weighing&&(v.mainCategory=_),v.categoriesNames.add(_.name)):(u.isSaved=this.playsSaved.has(u.playId),u.mainCategory=_,u.categoriesNames=new Set,u.categoriesNames.add(_.name),r.set(h,u),d.push(u))}return d},[]),this.showImage=!1,this.isModalMode){if(a)this.$store.commit("mediaModal/setPlaylistIndex",{mediaPlayerType:this.isModalMode?null:this.mediaPlayerType,playlistIndex:0});else{if(this.modalInitialState&&this.modalInitialState.playData){const d=this.playerQueue.findIndex(u=>u.playId===this.modalInitialState.playData.playId);d!==-1&&this.$store.commit("mediaModal/setPlaylistIndex",{mediaPlayerType:this.isModalMode?null:this.mediaPlayerType,playlistIndex:d})}if(this.playerQueue.length)if(n&&this.objectMediaPlayerModeFilters.objectGameSelected){const d=this.playerQueue.findIndex(u=>this.objectMediaPlayerModeFilters.objectGameSelected.game_id===u.game.id);d!==-1&&this.$store.commit("mediaModal/setPlaylistIndex",{mediaPlayerType:this.isModalMode?null:this.mediaPlayerType,playlistIndex:d})}else if(this.modalInitialState&&!this.modalInitialState.lastClashesGameId&&this.modalInitialState.gameIds&&this.selectedType===1){const d=this.playerQueue.findIndex(u=>this.modalInitialState.gameIds.includes(u.game.id));d!==-1?this.$store.commit("mediaModal/setPlaylistIndex",{mediaPlayerType:this.isModalMode?null:this.mediaPlayerType,playlistIndex:d}):this.playerQueue=[]}else this.modalInitialState&&this.modalInitialState.currentPlayIndex?this.$store.commit("mediaModal/setPlaylistIndex",{mediaPlayerType:this.isModalMode?null:this.mediaPlayerType,playlistIndex:this.modalInitialState.currentPlayIndex}):i>-1&&this.$store.commit("mediaModal/setPlaylistIndex",{mediaPlayerType:this.isModalMode?null:this.mediaPlayerType,playlistIndex:i})}this.$store.commit(`${this.storeModule}/setCurrentPlayerQueue`,this.playerQueue)}else if(n&&this.objectMediaPlayerModeFilters.objectGameSelected){const d=this.playerQueue.findIndex(u=>this.objectMediaPlayerModeFilters.objectGameSelected.game_id===u.game.id);d!==-1&&this.$store.commit("mediaGeneral/setPlaylistIndex",{mediaPlayerType:this.isModalMode?null:this.mediaPlayerType,playlistIndex:d})}else i>-1?this.$store.commit("mediaGeneral/setPlaylistIndex",{mediaPlayerType:this.isModalMode?null:this.mediaPlayerType,playlistIndex:i}):this.selectedType===1&&c&&this.$store.commit("mediaGeneral/setPlaylistIndex",{mediaPlayerType:this.isModalMode?null:this.mediaPlayerType,playlistIndex:c});this.playerQueue.length||this.emptyListDecision(),this.booleanIsFirstIteration&&(this.booleanIsFirstIteration=!1,this.$emit("finish"))},emptyListDecision(){this.summaryData&&this.summaryData.isTeam&&this.playsType===this.playsTypeOptions[0]?this.playsType=this.playsTypeOptions[1]:!this.summaryData&&!this.isModalMode&&this.onTypeChanged(1)},getGeneralName(e){return e.split(" ").reduce((t,a,i)=>{if(i===0)if(a.includes("."))t.push(a);else{const n=a.toLowerCase().split("");n[0]=n[0].toUpperCase(),t.push(n.join(""))}else t.push(a.toLowerCase());return t},[]).join(" ")},getSingleName(e){return e.split(" ").reduce((t,a)=>{let i=a;return a.endsWith("ciones")?i=a.replace("ciones","ción"):a.endsWith("nales")?i=a.replace("nales","nal"):a.endsWith("vocan")?i=a.replace("vocan","voca"):a.endsWith("lones")?i=a.replace("lones","lón"):a.endsWith("oles")?i=a.replace("oles","ol"):(a.endsWith("os")||a.endsWith("as")||a.endsWith("es"))&&(i=a.slice(0,a.length-1)),t.push(i),t},[]).join(" ")},getCategoryFormat(e=""){const t=this.getGeneralName(e);return this.getSingleName(t)},getPlayerTournamentBySelectedSeason(e,t){const a=this.user.related_seasons.reduce((n,r)=>{const o=t.get(r);return o&&n.push(o._id),n},[]),i=t.get(e);return a.includes(i._id)?i:null},changeTournament(e){},changeSeason(e){},getFilteredPlays(e){return e.reduce((t,a)=>{if(this.objectMediaPlayerModeFilters.objectFilters.numberActionId>1){let i=!0;if(i&&this.objectMediaPlayerModeFilters.objectFilters.objectAdvancedFilters.arrayPlayingAs&&([3,4].includes(this.actionId)?i=!(this.objectMediaPlayerModeFilters.objectFilters.objectAdvancedFilters.booleanRequiresRivalTransform&&this.objectMediaPlayerModeFilters.objectFilters.objectAdvancedFilters.arrayPlayingAs.length===1?a.teamId!==this.objectMediaPlayerModeFilters.objectFilters.objectAdvancedFilters.numberTeamId?this.objectMediaPlayerModeFilters.objectFilters.objectAdvancedFilters.arrayPlayingAs.includes(a.playingAs):!this.objectMediaPlayerModeFilters.objectFilters.objectAdvancedFilters.arrayPlayingAs.includes(a.playingAs):!this.objectMediaPlayerModeFilters.objectFilters.objectAdvancedFilters.arrayPlayingAs.includes(a.playingAs)):i=this.objectMediaPlayerModeFilters.objectFilters.objectAdvancedFilters.arrayPlayingAs.includes(a.playingAs)),i&&this.objectMediaPlayerModeFilters.objectFilters.objectAdvancedFilters.arrayTimeSections&&(i=this.objectMediaPlayerModeFilters.objectFilters.objectAdvancedFilters.arrayTimeSections.includes(a.section)),i&&this.objectMediaPlayerModeFilters.objectFilters.objectAdvancedFilters.coordinatePoint&&this.objectMediaPlayerModeFilters.objectFilters.objectAdvancedFilters.arrayFieldSections){const n=`${bl(a[`x${this.objectMediaPlayerModeFilters.objectFilters.objectAdvancedFilters.coordinatePoint}`],a[`y${this.objectMediaPlayerModeFilters.objectFilters.objectAdvancedFilters.coordinatePoint}`])+1}`,r=Ji[n],o=this.objectMediaPlayerModeFilters.objectFilters.objectAdvancedFilters.requiresRivalTransform&&this.objectMediaPlayerModeFilters.objectFilters.objectAdvancedFilters.arraySelectedSubcategoryIds.includes(`${a.categoryId}_r`)?Ji[`${gu[n]}`]:r;i=!!this.objectMediaPlayerModeFilters.objectFilters.objectAdvancedFilters.arrayFieldSections.find(l=>l.num===o&&l.status)}i&&t.push(a)}else t.push(a);return t},[])},async fillSeasonPlayers(e){try{const t=await this.$store.dispatch("mediaGeneral/getPlayersBySeasons",{seasonId:e.id,returnData:!0});e.mapPlayers=new Map,e.mapPlayersByTeam=t.reduce((a,i)=>{e.mapPlayers.set(i.player_id,{id:i.player_id,name:i.player_name,shortName:i.shortName,photo:i.player_photo,teamId:i.team_id,positionId:i.position_id});const n=a.get(i.team_id);return n?n.push(i):a.set(i.team_id,[i]),a},new Map)}catch(t){throw new Error(t)}},async fillMatchDaysAndGamesV2(e){try{const{seasonsAndGames:t,seasonsAndTeams:a}=await this.fetchSeasonsGamesAndTeamsV2([e.id,...e.related_seasons.map(o=>o.id)],3),i=a.find(o=>o._id===e.id);e.arrayTeams=[],e.mapTeams=new Map;const n=i.teams.reduce((o,l)=>(e.arrayTeams.push(l),e.mapTeams.set(l.team_id,{name:l.colloquial_name,acronym:l.acronym,logo:l.logo,id:l.team_id}),o.set(l.team_id,l),o),new Map);e.mapGames=new Map,e.mapGamesByTeam=new Map;const r=Array.from(t.reduce((o,l)=>(l.games.forEach(c=>{if(c.game_status===1&&c.has_video){(!e.maxGameId||c.game_id>e.maxGameId)&&(e.maxGameId=c.game_id);let d=c.matchday_abbreviation.replace("M","J"),u=c.matchday_abbreviation.replace("M","Jornada ");const h=c.matchday_abbreviation.replace("M","");l.season_type===0?this.objectMediaPlayerModeFilters.objectTournamentSelected.id===33&&(c.seasonId===881?(d=y6[h]||d,u=g6[h]||u):(d=Em[c.matchday_abbreviation]?c.matchday_abbreviation:d,u=Em[c.matchday_abbreviation]||u,d==="FINAL"&&(d="F"))):l.season_type===1?(d=f6[c.matchday_abbreviation],u=d):c.matchday_id===182?(d="PI1",u="Play In 1"):c.matchday_id===183?(d="PI2",u="Play In 2"):(d=c.matchday_abbreviation.replace("PO","R"),u="Repechaje"),c.roundAbbreviation=d,c.roundName=u,e.mapGames.set(c.game_id,{id:c.game_id,date:c.date,dateTimeMillis:new Date(c.date_time_utc).valueOf(),homeTeam:e.mapTeams.get(c.home_team),awayTeam:e.mapTeams.get(c.visiting_team),roundAbbreviation:c.roundAbbreviation,roundName:c.roundName,score:c.score,gameResult:c.score[0]>c.score[1]?1:c.score[0]<c.score[1]?2:3,seasonId:l.season_id});const p=o.get(c.roundAbbreviation);c.numberDateTimeMillis=new Date(c.date_time_utc).getTime(),c.homeTeam=n.get(c.home_team),c.awayTeam=n.get(c.visiting_team);const m=e.mapGamesByTeam.get(c.home_team),f=e.mapGamesByTeam.get(c.visiting_team);m?m.push(c):e.mapGamesByTeam.set(c.home_team,[c]),f?f.push(c):e.mapGamesByTeam.set(c.visiting_team,[c]),p?p.arrayGames.push(c):o.set(c.roundAbbreviation,{stringMatchDayAbbreviation:c.roundAbbreviation,stringMatchDayName:c.roundName,arrayGames:[c]})}}),o),new Map).values());r.reverse(),r.forEach(o=>{o.arrayGames.sort((l,c)=>l.numberDateTimeMillis-c.numberDateTimeMillis)}),e.arrayMatchDays=r,this.objectMatchDaySelected=r[0]||{}}catch(t){throw new Error(t)}},async fetchSeasonsGamesAndTeamsV2(e,t,a=""){let i=a;try{i||(i=this.gamesUrl,e.forEach((o,l)=>{i+=`${l===0?"":"&"}seasons=${o}`}));const{data:{data:n,teams:r}}=await ki.get(i);return{seasonsAndGames:n,seasonsAndTeams:r}}catch(n){if(t>0)return this.fetchSeasonsGamesAndTeamsV2(e,t-1,i);throw new Error(n)}},async fillNextSeasonPlays(){try{this.showImage=!0,this.playlistSeasonIndex++,this.seasonName=this.objectMediaPlayerModeFilters.objectTournamentSelected.arraySeasons[this.playlistSeasonIndex].name,this.playlistSeasonIndex>this.objectMediaPlayerModeFilters.objectTournamentSelected.arraySeasons.length-1&&(this.playlistSeasonIndex=0);const e=this.objectMediaPlayerModeFilters.objectTournamentSelected.arraySeasons[this.playlistSeasonIndex];e.arrayMatchDays||(await this.fillMatchDaysAndGamesV2(e),await this.fillSeasonPlayers(e));const t=await this.fetchPlays(e.id,this.objectMediaPlayerModeFilters.stringQueryCategoryIds,this.objectMediaPlayerModeFilters.stringQueryParams),a=this.getFormattedPlays(t,!1,e),i=this.getFilteredPlays(a);this.generatePlayerQueue(null,i,!1,0,!0)}catch(e){throw new Error(e)}},onPlaylistEnded(){this.booleanIsPlaySeekerMode||(this.isMyPlaylistsActive?this.$store.commit("mediaModal/setPlaylistIndex",{mediaPlayerType:this.isModalMode?null:this.mediaPlayerType,playlistIndex:0}):this.booleanIsFilterApplied?this.fillNextSeasonPlays():(this.playlistSeasonIndex++,this.playlistSeasonIndex>this.playlistTournament.seasons.length-1&&(this.playlistSeasonIndex=0),this.seasonName=this.playlistTournament.seasons[this.playlistSeasonIndex].name,this.showImage=!0,setTimeout(()=>{this.fetchInfo(!1,this.playlistTournament)},4e3)))},onFullScreenChange(){this.isCarouselFullScreenVisible=!0},onTypeChanged(e=1){if((e!==this.selectedType||this.isModalMode)&&(this.isModalMode&&this.setPlayerType(e),this.selectedType!==e||this.isModalMode&&e===1)){if(this.selectedType=e,this.selectedType===2){this.mediaPlayerMode="player";const t=this.summaryData?{id:this.summaryData.id}:this.isModalMode?this.isFirstTypeChange?this.modalInitialState&&this.modalInitialState.goalkeeperIds?{id:this.modalInitialState.goalkeeperIds[0],positionId:1}:{id:this.modalInitialState.playerIds[0]}:this.playInfo.player:this.isUserTournament?null:this.playInfo.player;this.$store.commit(`${this.storeModule}/setPlayer`,t),this.$store.commit(`${this.storeModule}/setTeam`,this.isModalMode?this.playInfo.teamId:this.isUserTournament?this.gsData.teamId:this.playInfo.teamId),this.onPlayerSelected()}else if(this.selectedType===3){this.mediaPlayerMode="team";const t=this.summaryData?this.summaryData.id:this.isModalMode?this.isFirstTypeChange?this.modalInitialState&&this.modalInitialState.teamId:this.playInfo.teamId:this.hasPlayerActivityInTournament||this.isUserTournament?this.gsData.teamId:this.playInfo.teamId;this.$store.commit(`${this.storeModule}/setPlayer`,null),this.$store.commit(`${this.storeModule}/setTeam`,t),this.onTeamSelected()}else this.selectedType===1&&(this.mediaPlayerMode="games",this.$store.commit(`${this.storeModule}/setPlayer`,null),this.$store.commit(`${this.storeModule}/setTeam`,null),this.checkSeason());e!==0&&(this.isFirstTypeChange=!1)}},onMaxInactivityReached(){this.showModalConfirm=!0},checkSeason(){this.gsData||(this.playlistSeasonIndex=this.playlistSeasonIndexAux);const e=this.getSeasonIdOnly===this.seasonId;this.fetchInfo(e,this.playlistTournament)},onPlayerSelected(){this.mediaPlayerMode="player",this.checkSeason()},onTeamSelected(){this.mediaPlayerMode="team",this.checkSeason()},onGameIdSelected(e){this.gameIdSelected=e},onPlaying(){this.isAutoPlay=!0},onPlayChanged(e){if(this.lastGameIdWatched=e.gameId,e.isPlaySeeker)this.playInfo=e,this.objectPlaySeekerLastPlay={playListId:e.payloadData.playlist_id,groupPlayListId:e.payloadData.group_playlist_id,groupId:e.payloadData.group_id,playIndex:e.payloadData.play_number-1},window.localStorage.setItem("playSeekerLastPlay",JSON.stringify(this.objectPlaySeekerLastPlay));else if(e.booleanIsFullGame)this.playInfo={playId:e.playId,booleanIsFullGame:!0,homeTeamLogo:e.objectGame.homeTeam.logo,homeTeamName:e.objectGame.homeTeam.colloquial_name,awayTeamLogo:e.objectGame.awayTeam.logo,awayTeamName:e.objectGame.awayTeam.colloquial_name,arrayScore:e.objectGame.score,gameId:e.gameId,seasonId:e.objectGame.season_id,teamLogo:e.playerTeamLogo,playerLogo:e.player.photo,dateTimeMillis:new Date(e.objectGame.date_time_utc).getTime()};else if(this.summaryData)this.playInfo={playId:e.playId,homeTeamLogo:e.game.homeTeam.logo,homeTeamName:e.game.homeTeam.colloquial_name||e.game.homeTeam.name,awayTeamLogo:e.game.awayTeam.logo,awayTeamName:e.game.awayTeam.colloquial_name||e.game.awayTeam.name,arrayScore:e.game.score,gameId:e.gameId,seasonId:e.seasonId,mainCategoryName:T0(e.mainCategory.name),playerShortName:e.player.shortName,dateTimeMillis:e.dateTimeMillis,playRaw:e.playRaw,startSeconds:e.startSeconds,endSeconds:e.endSeconds};else{if(this.isModalMode){this.setPlaylistGameId(e.game.id);const t=this.playerType===2?e.player.shortName:this.playerType===3?this.modalInitialState&&this.modalInitialState.isRivalSubject&&this.modalInitialState.mainSectionType===this.modalSectionSelected+1?[35,54].includes(e.categoryId)?e.teamname:e.rivalName:[35,54].includes(e.categoryId)?e.rivalName:e.teamName:"";this.$emit("subject-change",t?` - ${t}`:"")}this.playInfo={playId:e.playId,date:e.gameDate,dateTimeMillis:e.dateTimeMillis,arrayScore:e.game.score,objectHomeTeam:e.game.homeTeam,objectAwayTeam:e.game.awayTeam,playerId:e.player.id,playerName:e.player.name,playerShortName:e.player.shortName,playCategory:e.categoryName,teams:`${e.game.homeTeam.name} vs ${e.game.awayTeam.name}`,playerPhoto:e.player.photo,teamLogo:e.playerTeamLogo,rivalLogo:e.rivalTeamLogo,teamId:e.teamId,categoryId:e.categoryId,jersey:e.jersey,mainCategoryName:T0(e.mainCategory.name||e.stringMainCategoryName||""),categoriesNames:Array.from(e.categoriesNames.values()).reduce((t,a,i)=>(t+=`${i===0?"":", "}${a}`,t),""),gameId:e.game.id,roundAbbreviation:e.game.roundAbbreviation,player:e.player,asLocal:e.game.homeTeam.id===e.teamId,momentOfPlay:e.momentOfPlay,seasonId:e.seasonId,playRaw:e.playRaw,startSeconds:e.startSeconds,endSeconds:e.endSeconds,booleanIsFromMyPlaylists:e.booleanIsFromMyPlaylists,tvStations:e.game.tvStations}}},async fetchPlays(e=null,t=null,a=null){try{this.lastGameIdWatched=0;let i="";if(a===null){const r=this.modalInitialState&&this.modalInitialState.playerIds&&this.modalInitialState.playerIds.length;this.modalInitialState.isFeaturedPlayers?(this.modalInitialState.playerIds.forEach(o=>{i+=`&player=${o}`}),this.modalInitialState.isFeaturedPlayers=!1):this.getPlayerId?(this.hasUserPlayerSelectedSeason&&this.getPlayerId===this.user.player||!this.user.is_player)&&(i+=`&player=${this.getPlayerId}`):r?this.modalInitialState.playerIds.forEach(o=>{i+=`&player=${o}`}):(this.getTeamId||this.modalInitialState.teamId)&&(i+=`&team=${this.getTeamId||this.modalInitialState.teamId}`),this.modalInitialState&&this.modalInitialState.isPost&&(i+="&isPost=1")}const n=await ki.get(`https://cpj4073446.execute-api.us-east-2.amazonaws.com/prod/videos/plays/seasons/${e||this.seasonId}?${t||this.queryCategories}${a||i}`);if(n.data&&n.data.plays){const r=[...n.data.plays];return n.data.plays_rival?r.concat(n.data.plays_rival):r}return[]}catch(i){throw new Error(i)}},async fetchInfo(e,t){try{if(!t)return;let a=this.playlistSeasonIndex;this.playlistTournament=t,this.seasonId=t.seasons[a].id;const i=[this.fetchPlays()];if(!e&&t.seasons[a]){const l=[this.seasonId];t.seasons[a].related_seasons&&t.seasons[a].related_seasons.length&&l.push(...t.seasons[a].related_seasons.map(c=>c.id)),i.push(this.$store.dispatch(`${this.storeModule}/fetchSeasonsGamesAndTeams`,{seasons:l})),i.push(this.$store.dispatch(`${this.storeModule}/getPlayersBySeasons`,{seasonId:this.seasonId}))}const[n,r]=await Promise.all(i);if(this.plays=n||[],this.hasPlayerActivityInTournament&&!this.plays.length)if(this.playlistSeasonIndex<this.playlistTournament.seasons.length-1&&this.seasonSearchingCount<1)this.playlistSeasonIndex++,this.seasonSearchingCount++,await this.fetchInfo(!1,t);else return;e||this.formatGamesAndTeams(r);const o=this.getFormattedPlays(this.plays);this.generatePlayerQueue(this.currentCategories.reduce((l,c)=>(typeof c=="string"&&c.includes("_")||l.push(Number(c)),l),[]),o),this.showImage=!1}catch(a){throw new Error(a)}},async fillSeasons(e,t=!1){try{if(e){let a=null;if(this.autoFillVideos?a=e.find(i=>i._id===1):a=e[0],a){if(this.currentTournament=a,this.isModalMode&&!t&&!this.lastSearchResult)return;await this.fetchInfo(!1,this.currentTournament)}}}catch(a){throw new Error(a)}},async fillMyPlaylistsData(e){if(e.length){const t=[this.$store.dispatch("mediaGeneral/fetchSeasonsGamesAndTeams",{seasons:e})];e.forEach(r=>{t.push(this.$store.dispatch("mediaGeneral/getPlayersBySeasons",{seasonId:r,returnData:!0}))});const a=await Promise.all(t),i=a.shift();this.formatGamesAndTeamsForMyPlaylists(i);const n=a.reduce((r,o)=>(o.forEach(l=>{r.set(l.player_id,{id:l.player_id,name:l.player_name,shortName:l.shortName,photo:l.player_photo,teamId:l.team_id,positionId:l.position_id})}),r),new Map);this.setPlayersMapMyPlaylists(n)}},getBestPlaysCategoriesIds(){return Object.keys(Qi[this.mediaPlayerMode]).reduce((e,t)=>(t.split("-").forEach(a=>{e.push(Number(a))}),e),[])},setUpMediaGeneralData(){const{objectCurrentPlay:e,numberCurrentTime:t}=this.$refs.videoPlayer.getCurrentPlayerPlayInfo(),a={numberPlayId:e.playId,numberCurrentTime:t},i={arrayPlayerQueue:[...this.playerQueue],stringModeTitle:this.stringModeTitle,numberPlaylistIndex:this.playlistIndex,numberPlaylistSeasonIndex:this.playlistSeasonIndex,booleanIsFilterApplied:this.booleanIsFilterApplied,booleanIsPlaySeekerMode:this.booleanIsPlaySeekerMode,booleanAvoidApply:this.isModalMode&&this.modalInitialState&&this.modalInitialState.avoidApply&&!this.booleanIsFilterApplied,objectPlaySync:a};this.booleanIsFilterApplied&&(i.objectLastDataToFilter=this.objectLastDataToFilter),this.$store.commit("mediaGeneral/setObjectMediaData",i)},formatGamesAndTeams(e){this.roundsMap=new Map,this.teamsMap=e.seasonsAndTeams.reduce((t,a)=>(a&&a.teams.forEach(i=>{t.has(i.team_id)||t.set(i.team_id,{name:i.colloquial_name,acronym:i.acronym,logo:i.logo,id:i.team_id,players:this.playersByTeam.get(i.team_id)})}),t),new Map),this.gamesMap=e.seasonsAndGames.reduce((t,a)=>{const i=!!(this.currentTournament&&this.currentTournament.tournament&&this.currentTournament.tournament.tournament_type);return a.games.forEach(n=>{n.seasonType=a.season_type,n.seasonId=a.season_id,n.game_id>this.maxGameId&&(this.maxGameId=n.game_id);let r=n.matchday_abbreviation.replace("M","J"),o=n.matchday_abbreviation.replace("M","Jornada ");const l=n.matchday_abbreviation.replace("M","");n.seasonType===0?i&&(n.seasonId===881?(r=y6[l]||r,o=g6[l]||o):(r=Em[n.matchday_abbreviation]?n.matchday_abbreviation:r,o=Em[n.matchday_abbreviation]||o,r==="FINAL"&&(r="F"))):n.seasonType===1?(r=f6[n.matchday_abbreviation],o=r):n.matchday_id===182?(r="PI1",o="Play In 1"):n.matchday_id===183?(r="PI2",o="Play In 2"):(r=n.matchday_abbreviation.replace("PO","R"),o="Repechaje"),n.roundAbbreviation=r,n.roundName=o;const c=n.date.split("-"),d={id:n.game_id,date:n.date,dateTimeMillis:new Date(n.date_time_utc).valueOf(),homeTeam:this.teamsMap.get(n.home_team),awayTeam:this.teamsMap.get(n.visiting_team),roundAbbreviation:n.roundAbbreviation,roundName:n.roundName,score:n.score,gameResult:n.score[0]>n.score[1]?1:n.score[0]<n.score[1]?2:3,seasonId:a.season_id,dateFormatted:`${Number(c[2])} ${hEe[Number(c[1])-1]}, ${c[0]}`,tvStations:n.tv_stations?n.tv_stations.join(", "):null},u=this.roundsMap.get(n.roundAbbreviation);u?u.push(d):this.roundsMap.set(n.roundAbbreviation,[d]),t.has(n.game_id)||t.set(n.game_id,d)}),t},new Map)},formatGamesAndTeamsForMyPlaylists(e){const t=e.seasonsAndTeams.reduce((n,r)=>(r&&r.teams.forEach(o=>{n.has(o.team_id)||n.set(o.team_id,{name:o.colloquial_name,acronym:o.acronym,logo:o.logo,id:o.team_id,players:this.playersByTeam.get(o.team_id)})}),n),new Map);let a=0;const i=e.seasonsAndGames.reduce((n,r)=>(r.games.forEach(o=>{o.seasonType=r.season_type,o.seasonId=r.season_id,o.game_id>a&&(a=o.game_id);const l={id:o.game_id,date:o.date,dateTimeMillis:new Date(o.date_time_utc).valueOf(),homeTeam:t.get(o.home_team),awayTeam:t.get(o.visiting_team),roundAbbreviation:o.matchday_abbreviation,roundName:o.matchday_abbreviation.replace("M","MatchDay "),score:o.score,gameResult:o.score[0]>o.score[1]?1:o.score[0]<o.score[1]?2:3,seasonId:r.season_id};n.has(o.game_id)||n.set(o.game_id,l)}),n),new Map);this.setTeamsMapMyPlaylists(t),this.setGamesMapMyPlaylists(i),this.setMaxGameIdMyPlaylists(a)},onPlayerModeClicked(e){this.playerModeSelected=e},onClickModalLauncher(e=1){const{objectCurrentPlay:t,numberCurrentTime:a}=this.$refs.videoPlayer.getCurrentPlayerPlayInfo(),i={numberPlayId:t.playId,numberCurrentTime:a};this.$refs.videoPlayer.pausePlayers();let n=null;if(!e&&this.booleanIsFilterApplied||this.objectMediaPlayerModeFilters.objectSeasonSelected||this.booleanIsPlaySeekerMode||this.booleanIsFilterApplied){const r={arrayPlayerQueue:[...this.playerQueue],stringModeTitle:this.stringModeTitle,numberPlaylistIndex:this.playlistIndex,numberPlaylistSeasonIndex:this.playlistSeasonIndex,booleanIsPlaySeekerMode:this.booleanIsPlaySeekerMode,numberMainSectionType:e,objectPlaySync:i};r.booleanIsFilterApplied=this.booleanIsFilterApplied,this.booleanIsFilterApplied&&(r.objectLastDataToFilter=this.objectLastDataToFilter),this.$store.commit("mediaModal/setModalInitialState",null),this.$store.commit("mediaModal/setObjectMediaData",r)}else n={seasonId:this.seasonId,tournaments:this.tournamentsForModalLauncher,categoryIds:[...this.currentCategories],mainSectionType:e,matchResult:[1,2,3],currentPlayIndex:this.playlistIndex,objectPlaySync:i},this.getPlayerId?this.isPlayerGoalkeeper?n.goalkeeperIds=[this.getPlayerId]:n.playerIds=[this.getPlayerId]:this.getTeamId&&(n.teamId=this.getTeamId),this.$store.commit("mediaModal/setObjectMediaData",null),this.$store.commit("mediaModal/setModalInitialState",n);this.$store.commit("mediaModal/setIsModalOpen",!0)},setUpResizeObserver(){if(window.ResizeObserver)this.mediaPlayerResizeObserver=new window.ResizeObserver(()=>{this.mediaPlayerWidth=this.$refs.mediaPlayer.clientWidth}),this.mediaPlayerResizeObserver.observe(this.$refs.mediaPlayer);else throw new Error("Resize observer not supported!")},onClickMyPlaylists(){this.isModalMode?this.$store.commit("mediaModal/setModalSectionSelected",2):this.onClickModalLauncher(2)},getEmptyMediaPlayerModeFilters(){return{objectTournamentSelected:null,objectSeasonSelected:null,stringQueryCategoryIds:"",stringQueryParams:"",objectFilters:{numberActionId:0,numberMediaPlayerType:null,objectCategorySelected:null,objectAdvancedFilters:{numberTeamId:null,numberPlayerId:null,arraySelectedSubcategoryIds:[],booleanRequiresRivalTransform:!1,numberCoordinatePoint:2,arrayPlayingAs:[],arrayTimeSections:[],arrayFieldSections:[]}}}},fillDataToFilterData(e){this.objectLastDataToFilter=e,this.arrayCategoriesIdsToFilter=e.arrayCategoriesIds,this.arrayRivalCategoriesIdsToFilter=e.arrayRivalCategoriesIds,this.arrayCategoriesIdsRaw=e.arrayCategoriesIdsRaw,this.objectMediaPlayerModeFilters.stringQueryCategoryIds=e.stringQueryCategoryIds,this.objectMediaPlayerModeFilters.stringQueryParams=e.stringQueryParams,this.objectMediaPlayerModeFilters.objectTournamentSelected=e.objectTournamentSelected,this.objectMediaPlayerModeFilters.objectSeasonSelected=e.objectSeasonSelected,this.objectMediaPlayerModeFilters.objectGameSelected=e.objectGameSelected,this.objectMediaPlayerModeFilters.objectFilters.numberMediaPlayerType=e.objectFilters.numberMediaPlayerType,this.objectMediaPlayerModeFilters.objectFilters.objectCategorySelected=e.objectFilters.objectCategorySelected,this.objectMediaPlayerModeFilters.objectFilters.numberActionId=e.objectFilters.numberActionId,this.objectMediaPlayerModeFilters.objectFilters.objectAdvancedFilters.numberTeamId=e.objectFilters.objectAdvancedFilters.numberTeamId,this.objectMediaPlayerModeFilters.objectFilters.objectAdvancedFilters.numberPlayerId=e.objectFilters.objectAdvancedFilters.numberPlayerId,this.objectMediaPlayerModeFilters.objectFilters.objectAdvancedFilters.booleanIsPlayerGoalKeeper=e.objectFilters.objectAdvancedFilters.booleanIsPlayerGoalKeeper,this.objectMediaPlayerModeFilters.objectFilters.objectAdvancedFilters.arraySelectedSubcategoryIds=e.objectFilters.objectAdvancedFilters.arraySelectedSubcategoryIds,this.objectMediaPlayerModeFilters.objectFilters.objectAdvancedFilters.booleanRequiresRivalTransform=e.objectFilters.objectAdvancedFilters.booleanRequiresRivalTransform,this.objectMediaPlayerModeFilters.objectFilters.objectAdvancedFilters.numberCoordinatePoint=e.objectFilters.objectAdvancedFilters.numberCoordinatePoint,this.objectMediaPlayerModeFilters.objectFilters.objectAdvancedFilters.arrayPlayingAs=e.objectFilters.objectAdvancedFilters.arrayPlayingAs,this.objectMediaPlayerModeFilters.objectFilters.objectAdvancedFilters.arrayTimeSections=e.objectFilters.objectAdvancedFilters.arrayTimeSections,this.objectMediaPlayerModeFilters.objectFilters.objectAdvancedFilters.arrayFieldSections=e.objectFilters.objectAdvancedFilters.arrayFieldSections,this.selectedType=e.numberSelectedType},onApplyFilters(e){this.stringModeTitle=`Estas viendo: ${e.stringControlsTitle}`,this.booleanIsPlaySeekerMode=!1,this.booleanIsFilterApplied=!0,this.fillDataToFilterData(e),this.playlistSeasonIndex=e.objectTournamentSelected.numberSeasonSelectedIndex,this.generatePlayerQueue(null,e.arrayFormattedPlays,!1,e.numberPlaylistIndex,!0)},onClickOptions(e){this.booleanIsOptionsMenuVisible=!0,this.numberOptionsMenuTop=e.numberY,this.numberOptionsMenuLeft=e.numberX},onClickOpenModes(){this.$refs.videoPlayer.pausePlayers(),this.booleanIsModesModalOpen=!0},onClickFullGame(e){this.booleanIsPlaySeekerMode=!1,this.booleanIsFilterApplied=!0;const t=e.arrayMatchDayGames.findIndex(a=>a.game_id===e.objectGame.game_id);t!==-1&&(this.stringModeTitle=`Estas viendo: ${e.stringControlsTitle}`,this.booleanIsPlaySeekerMode=!1,this.playerQueue=e.arrayMatchDayGames.map(a=>(a.homeTeam.name=a.homeTeam.colloquial_name,a.awayTeam.name=a.awayTeam.colloquial_name,{booleanIsFullGame:!0,objectGame:a,gameId:a.game_id,startSeconds:0,endSeconds:null})),this.$store.commit(`${this.storeModule}/setPlaylistIndex`,{mediaPlayerType:this.isModalMode?null:this.mediaPlayerType,playlistIndex:t}),this.$store.commit(`${this.storeModule}/setCurrentPlayerQueue`,this.playerQueue))},onModesModalClose(){this.booleanIsModesModalOpen=!1,this.onClickSpeed(1)},onClickMode(){this.$refs.videoPlayer.setSpeedToAllPlayers(1)},onClickSurpriseMe(){this.booleanIsFilterApplied=!1,this.booleanIsPlaySeekerMode=!0,this.fillPlaySeekerPlays()},getPlaySeekerCategoryName(e){if(e.categoryId===33)return"Fuera de lugar";if([35,54].includes(e.categoryId))return"Auto gol";{const t=this.allCategories.get(e.categoryId)||this.allCategories.get(`${e.categoryId}_r`)||this.extraCategories.get(e.categoryId)||this.extraCategories.get(`${e.categoryId}_r`);return t?t.name:"S/N"}},async setUpTokens(){try{const e=await(await fetch(`${this.firstInteractionUrl}/token`,{method:"POST",mode:"cors",headers:{Authorization:"Basic bXN1c2VyQWRtaW46bXN1c2VycGFzc3dvcmRBZG1pbg=="},referrerPolicy:"no-referrer"})).json();this.firstInteractionToken=e.token}catch(e){throw new Error(e)}},async fillPlaySeekerPlays(){try{if(this.stringModeTitle="Sorpréndeme",this.booleanIsPlaySeekerMode){const e=await(await fetch(`${this.firstInteractionUrl}/firstInteraction/${pEe}/${this.user.username}/playlist`,{method:"GET",headers:{Authorization:`Bearer ${this.firstInteractionToken}`},referrerPolicy:"no-referrer"})).json();e&&(this.setPlaySeekerUserId(e.user_id),this.setPlaySeekerCurrentSessionId(this.getPlaySeekerSessionId(this.playSeekerUserId)),this.$emit("change-user-id",this.playSeekerUserId),window.localStorage.setItem("playSeekerUserId",this.playSeekerUserId),this.formatPlaySeekerPlays(e))}}catch(e){throw new Error(e)}},formatPlaySeekerPlays(e){let t=[];e&&e.playlist&&e.playlist.length&&(t=e.playlist.reduce((i,n,r)=>{const o={...Object.entries(Yi).reduce((h,[p,m])=>(h[p]=n[m],h),{}),isPlaySeeker:!0,startSeconds:n[Yi.startTime],endSeconds:n[Yi.endTime],totalSeconds:Math.floor(n[Yi.endTime]-n[Yi.startTime]),payloadData:{play_id:n[Yi.playId],total_plays:e.total_plays,play_number:r+1,group_playlist_id:e.group_playlist_id,playlist_id:e.playlist_id,group_id:e.group_id,moment_of_play:n[Yi.momentOfPlay],play_type:n[Yi.categoryId],viewer_second_start:Math.floor(n[Yi.startTime]),intended_second_start:Math.floor(n[Yi.startTime]),intended_second_end:Math.floor(n[Yi.endTime]),latitude_of_user:null,longitude_of_user:null}},[l,c]=o.playerName.split(","),d=l.split(" ");let u="";for(const h of d)if(u+=` ${h}`,h.length>3)break;if(o.playerShortName=c&&l?`${c.trim().charAt(0)}.${u}`:"",!o.mainCategoryName){o.mainCategoryName=T0(this.getPlaySeekerCategoryName(o));const[h,p]=o.finalScore.split(" - ");o.arrayScore=[Number(h),Number(p)]}return i.push(o),i},[]));let a=[];this.concatPlays?a=[...this.playerQueue.splice(0,this.currentPlayIndex+1),...t]:a=t,this.playerQueue=a,this.objectPlaySeekerLastPlay&&this.objectPlaySeekerLastPlay.playListId===e.playlist_id&&this.objectPlaySeekerLastPlay.groupPlayListId===e.group_playlist_id&&this.objectPlaySeekerLastPlay.groupId===e.group_id&&this.$store.commit(`${this.storeModule}/setPlaylistIndex`,{mediaPlayerType:this.isModalMode?null:this.mediaPlayerType,playlistIndex:this.objectPlaySeekerLastPlay.playIndex}),this.$store.commit(`${this.storeModule}/setCurrentPlayerQueue`,this.playerQueue)},getPlaySeekerSessionId(e){return e?`S_${e}${Date.now()}`:null},getRandomPercentage(){return Math.floor(Math.random()*60+20)},async sendUserBehavior(e,t,a){try{if(this.playInfo.isPlaySeeker){const i={user_id:this.playSeekerUserId,current_session_id:this.playSeekerCurrentSessionId,last_play:{...this.playInfo.payloadData}};i&&(i.last_play.action=t,i.last_play.percentage_viewed=t===1?100:this.getRandomPercentage(),i.last_play.viewer_second_end=e||this.playInfo.endSeconds,i.last_play.date_time_of_user_action=a,this.coords&&(i.last_play.latitude_of_user=this.coords.latitude,i.last_play.longitude_of_user=this.coords.latitude));const n=await fetch(`${this.userBehaviorUrl}/user-behavior`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(i)});if(n.status===200){const r=await n.json();r&&(this.concatPlays=!0,this.formatPlaySeekerPlays(r))}else this.concatPlays=!1}}catch(i){throw new Error(i)}},onGeoSuccess(e){this.coords=e.coords},onGeoError(e){throw new Error(e)},onClickTimeButton(e){e.numberType===1?this.$refs.videoPlayer.addSecondsToCurrentPlayer(e.numberValue*e.numberValueFactor):e.numberType===2?this.booleanIsSpeedModalVisible=!0:this.booleanIsVideoPlayerPlaying?this.$refs.videoPlayer.pausePlayers():this.$refs.videoPlayer.playCurrentPlayer()},onClickOption(e){this.$refs.videoPlayer.pausePlayers(),e===1?hp.emit("click-game",{gameId:this.playInfo.gameId,gameStatus:1,dateTimeUTC:new Date(this.playInfo.dateTimeMillis).toISOString(),seasonId:this.playInfo.seasonId,stringSectionName:"lineups"}):e===2?this.onClickDownload():e===3?(this.setPlaysToSaveAsFavorites([this.playInfo.playRaw]),this.setIsModalCreatePlayListOpen(!0)):e===4&&(this.isModalMode?this.$emit("show-list"):this.onClickModalLauncher())},onClickNextBack(e){this.$refs.videoPlayer.onMoveToPlayClicked(e)},onPlayIteration({iterationTime:e,userAction:t,dateTimeIsoString:a}){this.booleanIsPlaySeekerMode&&this.sendUserBehavior(e,t,a)},onClickAnalyst(){this.onClickModalLauncher()},onClickFullscreen(){this.isCarouselFullScreenVisible=!0},onChangeSeason(e){this.numberCurrentSeasonId=Number(e),this.isAutoPlay=!1,this.objectMediaPlayerModeFilters=this.getEmptyMediaPlayerModeFilters(),this.setUpData(e)},onUpdateSearchResult(e){this.lastSearchResult=e,this.setUpData(e.seasonId)},onClickClose(){this.$emit("close")},onClickCloseCarousel(e){e&&this.$store.commit("mediaModal/setPlaylistIndex",{mediaPlayerType:null,playlistIndex:e}),this.isCarouselFullScreenVisible=!1},getPlayerOptions(){return{playbackRates:[.5,1,1.5,2],autoplay:!1,controls:!0,controlBar:{children:["playToggle","volumePanel","playbackRateMenuButton","CurrentTimeDisplay","progressControl","remainingTimeDisplay","fullscreenToggle"],pictureInPictureToggle:!1,volumePanel:{inline:!1}},liveui:!0,preload:"auto",fluid:!0}},videoJsInit(){fe.registerPlugin("offset",Zv),this.videojsLocal=fe}},async created(){try{this.videoJsInit(),ki.defaults.headers.common.Authorization=this.token,this.modalInitialData&&this.$store.commit("mediaModal/setModalInitialState",this.modalInitialData),hp.on("change-season",this.onChangeSeason),await this.setUpTokens(),hp.on("some-list-selected",()=>{this.isSomeListSelected=!0}),this.autoFillVideos&&await this.$store.dispatch(`${this.storeModule}/fetchTournaments`)}catch(e){throw new Error(e)}},mounted(){this.isModalMode?setTimeout(()=>{this.modalInitialState?(this.objectPlaySync=this.modalInitialState.objectPlaySync?{...this.modalInitialState.objectPlaySync,booleanIsApplied:!1}:null,this.setUpData(this.modalInitialState.seasonId),this.onTypeChanged(this.modalInitialState.playListType),this.$store.commit("mediaModal/setModalSectionSelected",this.modalInitialState.mainSectionType||1),this.stringModeTitle=`Estas viendo: ${this.modalInitialState.teamId?"Resumen de equipo":this.modalInitialState.playerIds&&this.modalInitialState.playerIds.length?"Resumen de jugador":this.modalInitialState.gameIds&&this.modalInitialState.gameIds.length?"Resumen de partido":""}`):this.objectMediaData&&(this.$store.commit("mediaModal/setModalSectionSelected",1),this.applyObjectMediaData())},100):this.seasonSelectedId&&this.tournamentsForMediaPlayer.size>0&&(this.setUpData(this.seasonSelectedId),this.setInitialTitle()),setTimeout(()=>{this.setUpResizeObserver()},1e3)},beforeUnmount(){this.isSomeListSelected=!1,this.mediaPlayerResizeObserver&&(this.mediaPlayerResizeObserver.disconnect(),this.mediaPlayerResizeObserver=null),this.$store.commit(`${this.storeModule}/setPlayer`,null),this.$store.commit(`${this.storeModule}/setTeam`,null),this.setPlaylistGameId(0)}},ZA=()=>{s.useCssVars(e=>({"1f6bcce1":e.backgroundColor}))},$A=c1.setup;c1.setup=$A?(e,t)=>(ZA(),$A(e,t)):ZA;const bu=e=>(s.pushScopeId("data-v-f53eaa41"),e=e(),s.popScopeId(),e),mEe={class:"modal-video__videos"},fEe=bu(()=>s.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none"},[s.createElementVNode("path",{d:"M5 15L15 5",stroke:"white","stroke-width":"1.7","stroke-miterlimit":"10","stroke-linecap":"round","stroke-linejoin":"round"}),s.createElementVNode("path",{d:"M15 15L5 5",stroke:"white","stroke-width":"1.7","stroke-miterlimit":"10","stroke-linecap":"round","stroke-linejoin":"round"})],-1)),gEe=[fEe],yEe={class:"modal-video__videos__search-and-filters"},_Ee={class:"modal-video__search-and-filters__search"},bEe={class:"modal-video__search-and-filters__advanced"},vEe={class:"modal-video__videos__video"},SEe={key:1,class:"modal-video__detail"},wEe={class:"modal-video__img-container"},TEe=["src"],CEe={class:"modal-video__img-container overlap"},kEe=["src"],EEe={class:"modal-video__description"},IEe={key:2,class:"modal-video__date"},xEe={class:"discover-container"},NEe=bu(()=>s.createElementVNode("div",{class:"title-value"},"Descubre videos",-1)),AEe={class:"modal-video__matches"},PEe={class:"current-match-info"},OEe=bu(()=>s.createElementVNode("h4",null,"Estás viendo:",-1)),BEe={key:0},DEe={class:"modal-video__game-list"},LEe=bu(()=>s.createElementVNode("div",{class:"modal-video__game-list__title"},"Otros partidos",-1)),MEe={class:"discover-videos"},REe=bu(()=>s.createElementVNode("div",{class:"title-value"},"Descubre videos",-1));function FEe(e,t,a,i,n,r){const o=s.resolveComponent("CarouselFullScreen"),l=s.resolveComponent("VideoSearch"),c=s.resolveComponent("SearchFilters"),d=s.resolveComponent("VideoPlayer"),u=s.resolveComponent("VideoPlayerControls"),h=s.resolveComponent("GscSwitchComponent"),p=s.resolveComponent("GSCPlayerTeamGame"),m=s.resolveComponent("CurrentMatch"),f=s.resolveComponent("MatchesList");return s.openBlock(),s.createElementBlock(s.Fragment,null,[n.isCarouselFullScreenVisible?(s.openBlock(),s.createBlock(o,{key:0,videojs:n.videojsLocal,"player-queue":r.carouselPlayerQueue,"playlist-index":r.playlistIndex,"initial-play":n.playInfo,onClose:r.onClickCloseCarousel},null,8,["videojs","player-queue","playlist-index","initial-play","onClose"])):s.createCommentVNode("",!0),s.createElementVNode("div",{ref:"mediaPlayer",class:s.normalizeClass(["modal-video",r.dynamicClasses])},[s.createElementVNode("div",mEe,[a.isModal?(s.openBlock(),s.createElementBlock("div",{key:0,class:"modal-video__close",onClick:t[0]||(t[0]=(...v)=>r.onClickClose&&r.onClickClose(...v))},gEe)):s.createCommentVNode("",!0),s.createElementVNode("div",yEe,[s.createElementVNode("div",_Ee,[s.createVNode(l,{"onUpdate:searchResult":r.onUpdateSearchResult,clientWidth:this.mediaPlayerWidth},null,8,["onUpdate:searchResult","clientWidth"])]),s.createElementVNode("div",bEe,[s.createVNode(c,{onApplyFilters:r.onApplyFilters,clientWidth:this.mediaPlayerWidth},null,8,["onApplyFilters","clientWidth"])])]),s.createElementVNode("div",vEe,[s.createVNode(d,{ref:"videoPlayer","player-queue":n.playerQueue,"is-v2":"","is-gs":"","is-from-mexico":a.isFromMexico,"is-gs-user":a.isGSUser,"container-width":n.mediaPlayerWidth,"game-id-selected":n.gameIdSelected,"is-first-row":!1,"plays-type-selected":n.selectedType,"is-auto-play":n.isAutoPlay,"is-modal-mode":a.isModalMode,"are-types-hidden":r.isSummaryData||r.isMyPlaylistsActive,"is-play-seeker-mode":n.booleanIsPlaySeekerMode,"play-sync":n.objectPlaySync,onPlayIteration:r.onPlayIteration,onPlaying:r.onPlaying,onPlayChanged:r.onPlayChanged,onMaxInactivityReached:r.onMaxInactivityReached,onPlaylistEnded:r.onPlaylistEnded,onChangeType:r.onTypeChanged,onPlay:t[1]||(t[1]=v=>n.booleanIsVideoPlayerPlaying=!0),onPause:t[2]||(t[2]=v=>n.booleanIsVideoPlayerPlaying=!1),onClickFullScreen:r.onClickFullscreen},null,8,["player-queue","is-from-mexico","is-gs-user","container-width","game-id-selected","plays-type-selected","is-auto-play","is-modal-mode","are-types-hidden","is-play-seeker-mode","play-sync","onPlayIteration","onPlaying","onPlayChanged","onMaxInactivityReached","onPlaylistEnded","onChangeType","onClickFullScreen"]),s.createVNode(u,{"play-info":n.playInfo,onClickNextBack:r.onClickNextBack,clientWidth:this.mediaPlayerWidth},null,8,["play-info","onClickNextBack","clientWidth"])]),n.playInfo&&n.playInfo.objectHomeTeam?(s.openBlock(),s.createElementBlock("div",SEe,[s.createElementVNode("div",wEe,[s.createElementVNode("img",{class:"modal-video__img",src:n.playInfo.teamLogo},null,8,TEe)]),s.createElementVNode("div",CEe,[s.createElementVNode("img",{class:"modal-video__img",src:n.playInfo.playerPhoto},null,8,kEe)]),s.createElementVNode("div",EEe,s.toDisplayString(n.playInfo.objectHomeTeam.acronym)+" "+s.toDisplayString(n.playInfo.arrayScore[0])+" : "+s.toDisplayString(n.playInfo.arrayScore[1])+" "+s.toDisplayString(n.playInfo.objectAwayTeam.acronym)+" I "+s.toDisplayString(n.playInfo.roundAbbreviation)+" "+s.toDisplayString(n.playInfo.tvStations||""),1)])):s.createCommentVNode("",!0),!n.mobileClass&&n.playInfo?(s.openBlock(),s.createElementBlock("div",IEe,s.toDisplayString(n.playInfo.date),1)):s.createCommentVNode("",!0),s.createElementVNode("div",xEe,[NEe,n.mobileClass?(s.openBlock(),s.createBlock(h,{key:0,buttons:["Estás viendo","Otros partidos","Descubre videos"],class:"current-match__tabs",selectedOption:n.currentMobileTab,arrow:!1,borderRadius:"32px",height:"28px",fontSize:"11px;",backgroundOptionActive:"transparent",onInput:t[3]||(t[3]=v=>n.currentMobileTab=v)},null,8,["selectedOption"])):s.createCommentVNode("",!0),a.section?(s.openBlock(),s.createElementBlock(s.Fragment,{key:1},[s.createVNode(h,{style:{"margin-left":"25px"},buttons:["Resumen","Proximo rival"],onInput:t[4]||(t[4]=v=>n.currentTabMoreVideos=v),background:"trasparent",height:"28px",width:"160px","font-family":"Poppins-Regular",type:2,arrow:!1,selectedOption:n.currentTabMoreVideos},null,8,["selectedOption"]),this.user.is_player?(s.openBlock(),s.createElementBlock(s.Fragment,{key:0},[n.currentTabMoreVideos=="Resumen"?(s.openBlock(),s.createElementBlock(s.Fragment,{key:0},[!n.mobileClass||n.currentMobileTab==="Resumen"?(s.openBlock(),s.createBlock(p,{key:0,type:8,style:{"margin-top":"-30px"},title:"",backgroundColor:"#172531",data:{season:a.user.season,player:a.user.player,category:1255e3},width:"100%"},null,8,["data"])):s.createCommentVNode("",!0)],64)):(s.openBlock(),s.createElementBlock(s.Fragment,{key:1},[!n.mobileClass||n.currentMobileTab==="Resumen"?(s.openBlock(),s.createBlock(p,{key:0,type:8,style:{"margin-top":"-30px"},title:"",backgroundColor:"#172531",data:{season:a.user.season,player:a.user.player,category:1255e3},width:"100%"},null,8,["data"])):s.createCommentVNode("",!0)],64))],64)):(s.openBlock(),s.createElementBlock(s.Fragment,{key:1},[n.currentTabMoreVideos=="Resumen"?(s.openBlock(),s.createElementBlock(s.Fragment,{key:0},[!n.mobileClass||n.currentMobileTab==="Resumen"?(s.openBlock(),s.createBlock(p,{key:0,type:7,title:"",style:{"margin-top":"-30px"},backgroundColor:"#172531",data:{season:a.user.season,team:a.user.team,category:1255e3},width:"100%"},null,8,["data"])):s.createCommentVNode("",!0)],64)):(s.openBlock(),s.createElementBlock(s.Fragment,{key:1},[!n.mobileClass||n.currentMobileTab==="Resumen"?(s.openBlock(),s.createBlock(p,{key:0,type:7,style:{"margin-top":"-30px"},title:"",backgroundColor:"#172531",data:{season:a.user.season,team:0,category:1255e3},width:"100%"},null,8,["data"])):s.createCommentVNode("",!0)],64))],64))],64)):(s.openBlock(),s.createElementBlock(s.Fragment,{key:2},[!n.mobileClass||n.currentMobileTab==="Resumen"?(s.openBlock(),s.createBlock(p,{key:0,style:{"margin-top":"-30px"},type:13,data:{season:a.user.season,category:1255e3},width:"100%",backgroundColor:"#172531",title:""},null,8,["data"])):s.createCommentVNode("",!0)],64))])]),s.createElementVNode("div",AEe,[s.createElementVNode("div",PEe,[n.mobileClass?s.createCommentVNode("",!0):(s.openBlock(),s.createElementBlock(s.Fragment,{key:0},[OEe,n.playInfo?(s.openBlock(),s.createElementBlock("h3",BEe,s.toDisplayString(n.playInfo.mainCategoryName),1)):s.createCommentVNode("",!0)],64)),r.currentMatch&&(!n.mobileClass||n.currentMobileTab==="Estás viendo")?(s.openBlock(),s.createBlock(m,{key:1,currentMatch:r.currentMatch,mobileClass:"",clientWidth:this.mediaPlayerWidth},null,8,["currentMatch","clientWidth"])):s.createCommentVNode("",!0)]),s.createElementVNode("div",DEe,[LEe,!n.mobileClass||n.currentMobileTab==="Otros partidos"?(s.openBlock(),s.createBlock(f,{key:0,matches:e.currentPlayerQueueByGames,mobileClass:"",clientWidth:this.mediaPlayerWidth},null,8,["matches","clientWidth"])):s.createCommentVNode("",!0)])]),s.createElementVNode("div",MEe,[REe,n.mobileClass?(s.openBlock(),s.createBlock(h,{key:0,buttons:["Estás viendo","Otros partidos","Descubre videos"],class:"current-match__tabs",selectedOption:n.currentMobileTab,arrow:!1,borderRadius:"32px",height:"28px",fontSize:"11px;",backgroundOptionActive:"transparent",onInput:t[5]||(t[5]=v=>n.currentMobileTab=v)},null,8,["selectedOption"])):s.createCommentVNode("",!0),a.section?(s.openBlock(),s.createElementBlock(s.Fragment,{key:1},[s.createVNode(h,{style:{"margin-left":"25px"},buttons:["Resumen","Proximo rival"],onInput:t[6]||(t[6]=v=>n.currentTabMoreVideos=v),background:"trasparent",height:"28px",width:"160px","font-family":"Poppins-Regular",type:2,arrow:!1,selectedOption:n.currentTabMoreVideos},null,8,["selectedOption"]),this.user.is_player?(s.openBlock(),s.createElementBlock(s.Fragment,{key:0},[n.currentTabMoreVideos=="Resumen"?(s.openBlock(),s.createElementBlock(s.Fragment,{key:0},[!n.mobileClass||n.currentMobileTab==="Resumen"?(s.openBlock(),s.createBlock(p,{key:0,type:8,style:{"margin-top":"-30px"},title:"",backgroundColor:"#172531",data:{season:a.user.season,player:a.user.player,category:1255e3},width:"100%"},null,8,["data"])):s.createCommentVNode("",!0)],64)):(s.openBlock(),s.createElementBlock(s.Fragment,{key:1},[!n.mobileClass||n.currentMobileTab==="Resumen"?(s.openBlock(),s.createBlock(p,{key:0,type:8,style:{"margin-top":"-30px"},title:"",backgroundColor:"#172531",data:{season:a.user.season,player:a.user.player,category:1255e3},width:"100%"},null,8,["data"])):s.createCommentVNode("",!0)],64))],64)):(s.openBlock(),s.createElementBlock(s.Fragment,{key:1},[n.currentTabMoreVideos=="Resumen"?(s.openBlock(),s.createElementBlock(s.Fragment,{key:0},[!n.mobileClass||n.currentMobileTab==="Resumen"?(s.openBlock(),s.createBlock(p,{key:0,type:7,title:"",style:{"margin-top":"-30px"},backgroundColor:"#172531",data:{season:a.user.season,team:a.user.team,category:1255e3},width:"100%"},null,8,["data"])):s.createCommentVNode("",!0)],64)):(s.openBlock(),s.createElementBlock(s.Fragment,{key:1},[!n.mobileClass||n.currentMobileTab==="Resumen"?(s.openBlock(),s.createBlock(p,{key:0,type:7,style:{"margin-top":"-30px"},title:"",backgroundColor:"#172531",data:{season:a.user.season,team:0,category:1255e3},width:"100%"},null,8,["data"])):s.createCommentVNode("",!0)],64))],64))],64)):(s.openBlock(),s.createElementBlock(s.Fragment,{key:2},[!n.mobileClass||n.currentMobileTab==="Resumen"?(s.openBlock(),s.createBlock(p,{key:0,style:{"margin-top":"-30px"},type:13,data:{season:a.user.season,category:1255e3},width:"100%",backgroundColor:"#172531",title:""},null,8,["data"])):s.createCommentVNode("",!0)],64))])],2)],64)}const VEe=bt(c1,[["render",FEe],["__scopeId","data-v-f53eaa41"]]);a0e();const UEe={class:"container"},jEe=!1,zEe=si({__name:"GSCMediaPlayer",setup(e){const t=s.ref("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MCwibmFtZSI6IlVzdWFyaW8gRnJlZSIsInVzZXJuYW1lIjoiZnJlZUBnb2xzdGF0cy5jb20iLCJlbWFpbCI6ImZyZWVAZ29sc3RhdHMuY29tIiwiaWF0IjoxNjA2NzU4Nzk1LCJleHAiOjE2MzgyOTQ3OTV9.kPNmP7yDtk38cAXrUyc7OHRh6J25VFqy-XUNzbK-4YE");Sc.defaults.headers.common.Authorization=t.value;const a=[{_id:44,seasons:[{name:"Clausura 2023",related_seasons:[{type:1,id:1752}],id:1713,type:0},{name:"Apertura 2022",related_seasons:[{type:1,id:1592}],id:1542,type:0},{name:"Grita Mexico C22",related_seasons:[{type:1,id:1521}],id:1486,type:0}],tournament:{show_logos:0,tournament_type:0,name:"Sub-20",logo:null,id:44,tournament_status:0,order:5}},{_id:1095,seasons:[{name:"Apertura 2023",related_seasons:[{type:1,id:1831}],id:1783,type:0},{name:"Clausura 2023",related_seasons:[{type:1,id:1750}],id:1715,type:0},{name:"Apertura 2022",related_seasons:[{type:1,id:1652}],id:1541,type:0},{name:"Grita Mexico C22",related_seasons:[{type:1,id:1527}],id:1488,type:0}],tournament:{show_logos:0,tournament_type:0,name:"Sub-16",logo:null,id:1095,tournament_status:0,order:7}},{_id:1001,seasons:[{name:"Clausura 2024",related_seasons:[],id:1838,type:0},{name:"Apertura 2023",related_seasons:[{type:1,id:1825}],id:1777,type:0},{name:"Clausura 2023",related_seasons:[{type:1,id:1747}],id:1696,type:0},{name:"Apertura 2022",related_seasons:[{type:1,id:1655}],id:1539,type:0},{name:"Grita Mexico C22",related_seasons:[{type:1,id:1523}],id:1485,type:0},{name:"Grita Mexico A21",related_seasons:[{type:1,id:1458}],id:1402,type:0},{name:"Guard1anes Clausura 2021",related_seasons:[{type:1,id:1384}],id:1323,type:0},{name:"Guard1anes 2020",related_seasons:[{type:1,id:1318}],id:1283,type:0},{name:"Clausura 2020",related_seasons:[],id:1241,type:0},{name:"Apertura 2019",related_seasons:[{type:1,id:1227}],id:1157,type:0},{name:"Clausura 2019",related_seasons:[{type:1,id:1132}],id:1095,type:0},{name:"Apertura 2018",related_seasons:[{type:1,id:1072}],id:1004,type:0},{name:"Clausura 2018",related_seasons:[{type:1,id:1237}],id:1236,type:0}],tournament:{show_logos:1,tournament_type:0,name:"Liga MX Femenil",logo:"https://az755631.vo.msecnd.net/tournaments/femenil_mx.png",id:1001,tournament_status:0,order:2}},{_id:1143,seasons:[{name:"Apertura 2023",related_seasons:[{type:1,id:1829}],id:1785,type:0}],tournament:{show_logos:0,tournament_type:0,name:"Sub-23",logo:null,id:1143,tournament_status:0,order:4}},{_id:1,seasons:[{name:"Clausura 2024",related_seasons:[],id:1836,type:0},{name:"Apertura 2023",related_seasons:[{type:2,id:1826},{type:1,id:1827}],id:1772,type:0},{name:"Clausura 2023",related_seasons:[{type:2,id:1745},{type:1,id:1746}],id:1694,type:0},{name:"Apertura 2022",related_seasons:[{type:2,id:1591},{type:1,id:1594}],id:1535,type:0},{name:"Grita Mexico C22",related_seasons:[{type:2,id:1520},{type:1,id:1525}],id:1476,type:0},{name:"Grita Mexico A21",related_seasons:[{type:2,id:1446},{type:1,id:1456}],id:1401,type:0},{name:"Guard1anes Clausura 2021",related_seasons:[{type:2,id:1382},{type:1,id:1383}],id:1325,type:0},{name:"Guard1anes 2020",related_seasons:[{type:2,id:1311},{type:1,id:1316}],id:1275,type:0},{name:"Clausura 2020",related_seasons:[],id:1239,type:0},{name:"Apertura 2019",related_seasons:[{type:1,id:1231}],id:1155,type:0},{name:"Clausura 2019",related_seasons:[{type:1,id:1135}],id:1093,type:0},{name:"Apertura 2018",related_seasons:[{type:1,id:1075}],id:1002,type:0}],tournament:{show_logos:1,tournament_type:0,name:"Liga MX",logo:"https://az755631.vo.msecnd.net/tournaments/liga_mx.png",id:1,tournament_status:0,order:1}},{_id:1071,seasons:[{name:"Clausura 2024",related_seasons:[],id:1837,type:0},{name:"Apertura 2023",related_seasons:[{type:2,id:1822},{type:1,id:1828}],id:1776,type:0},{name:"Clausura 2023",related_seasons:[{type:2,id:1742},{type:1,id:1748}],id:1695,type:0},{name:"Apertura 2022",related_seasons:[{type:2,id:1598},{type:1,id:1618}],id:1544,type:0},{name:"Grita Mexico C22",related_seasons:[{type:2,id:1515},{type:1,id:1519}],id:1484,type:0},{name:"Grita Mexico A21",related_seasons:[{type:2,id:1454},{type:1,id:1463}],id:1408,type:0},{name:"Guard1anes Clausura 2021",related_seasons:[{type:2,id:1378},{type:1,id:1380}],id:1327,type:0},{name:"Guard1anes 2020",related_seasons:[{type:2,id:1315},{type:1,id:1317}],id:1287,type:0}],tournament:{show_logos:1,tournament_type:0,name:"Liga Expansion MX",logo:"https://az755631.vo.msecnd.net/tournaments/expansion_mx.png",id:1071,tournament_status:0,order:3}},{_id:1096,seasons:[{name:"Apertura 2023",related_seasons:[{type:1,id:1830}],id:1782,type:0},{name:"Clausura 2023",related_seasons:[{type:1,id:1751}],id:1714,type:0},{name:"Apertura 2022",related_seasons:[{type:1,id:1593}],id:1543,type:0},{name:"Grita Mexico C22",related_seasons:[{type:1,id:1522}],id:1487,type:0}],tournament:{show_logos:0,tournament_type:0,name:"Sub-18",logo:null,id:1096,tournament_status:0,order:6}}],i={token:"",token_b2c:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MjQyNTQsIm5hbWUiOiJHb2xTdGF0cyIsInVzZXJuYW1lIjoiZ29sdGVzdGluZyIsImVtYWlsIjoiIiwicHJvdmlkZXJfaWQiOjEsImxvZ2luX2dvbHN0YXRzIjoxLCJpYXQiOjE3MDA3ODkyNTcsImV4cCI6MTczMjMyNTI1N30.4iVGU3Q8rcNFRkYiPEmEYj1pB_UoYr1L5virEIpmGhs",id:24254,username:"goltesting",name:"GolStats",team:1,player:0,tournament:1,type_system:"presidents",language:"es",active_time:1,season:1772,is_player:0,related_seasons:[],is_goalkeeper:0,show_dashboard:1,user_type:1,premiumAccount:!0,userType:1,accessVideos:!0,sessionExpiration:1701869305930},n=s.computed(()=>a.reduce((r,o)=>{const l={...o.tournament,seasons:o.seasons};return l.seasons.forEach(c=>{r.set(c.id,l)}),r},new Map));return(r,o)=>(s.openBlock(),s.createElementBlock("div",UEe,[s.createVNode(s.unref(VEe),{"season-selected-id":1772,user:i,section:jEe,token:t.value,"tournaments-for-media-player":n.value,"background-color":""},null,8,["token","tournaments-for-media-player"])]))}},[["__scopeId","data-v-6fdc2bb3"]]),HEe={PO1:"CFI",PO2:"CFV",PO3:"SFI",PO4:"SFV",PO5:"FI",PO6:"FV"},qEe={DF:"Dieciseisavos",OF:"Octavos",CF:"Cuartos",SF:"Semifinales","3ER":"Tercer lugar",FINAL:"Final"},WEe={4:"Octavos",5:"Cuartos",6:"Semifinales",7:"Final"},GEe=(e,t)=>{const a=e.__vccOpts||e;for(const[i,n]of t)a[i]=n;return a},d1={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(e){this.status=e}}},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(e){this.$emit("click",e),this.typeOnOff&&(this.status=!this.status,this.$emit("status",this.status))}}},eP=()=>{s.useCssVars(e=>({"1c960139":e.height,b2f635d8:e.borderWidthBtn,"06e99898":e.borderType,"55555c76":e.borderColor,"23b6d320":e.borderRadius,"22c97374":e.width,"22bb09fa":e.backgroundColor,c148da7c:e.cursorType,cce756fc:e.fontSize,cff98d60:e.fontStyle,"5123b3a5":e.fontFamily,"47bf58db":e.marginLeftStat,cadc8414:e.fontSizeStat}))},tP=d1.setup;d1.setup=tP?(e,t)=>(eP(),tP(e,t)):eP;const KEe=e=>(s.pushScopeId("data-v-fb269a1e"),e=e(),s.popScopeId(),e),XEe=["src"],JEe={key:1,class:"text"},YEe=["src"],QEe={class:"stats"},ZEe=KEe(()=>s.createElementVNode("img",{class:"iconstats",src:"https://az755631.vo.msecnd.net/todoelfut/playdes.png"},null,-1)),$Ee={class:"numstats"},e5e={class:"leyend"};function t5e(e,t,a,i,n,r){return s.openBlock(),s.createElementBlock("div",null,[a.type==0?(s.openBlock(),s.createElementBlock("div",{key:0,class:s.normalizeClass(["button",n.status&&a.typeOnOff&&"button-active"]),style:s.normalizeStyle([r.customStyle,n.status&&a.typeOnOff&&r.customActive]),onClick:t[0]||(t[0]=(...o)=>r.btnClick&&r.btnClick(...o))},[a.icon&&a.iconPosition.toLowerCase()==="left"?(s.openBlock(),s.createElementBlock("img",{key:0,class:"icon",style:s.normalizeStyle({width:a.iconSize}),src:a.icon},null,12,XEe)):s.createCommentVNode("",!0),a.textValue?(s.openBlock(),s.createElementBlock("div",JEe,s.toDisplayString(a.textValue),1)):s.createCommentVNode("",!0),a.icon&&a.iconPosition.toLowerCase()==="right"?(s.openBlock(),s.createElementBlock("img",{key:2,class:"icon",style:s.normalizeStyle({width:a.iconSize}),src:a.icon},null,12,YEe)):s.createCommentVNode("",!0)],6)):s.createCommentVNode("",!0),a.type==1?(s.openBlock(),s.createElementBlock("div",{key:1,class:"button-target",onClick:t[1]||(t[1]=(...o)=>r.btnClick&&r.btnClick(...o))},[s.createElementVNode("div",QEe,[ZEe,s.createElementVNode("div",$Ee,s.toDisplayString(a.textStat),1)]),s.createElementVNode("div",e5e,s.toDisplayString(a.textCategory),1)])):s.createCommentVNode("",!0)])}const a5e=GEe(d1,[["render",t5e],["__scopeId","data-v-fb269a1e"]]),i5e={class:"gsc-dropdown__main-container__item-selected"},n5e=["height","width"],r5e=["stroke"],s5e={class:"gsc-dropdown__items-container"},o5e=["onClick"],l5e={key:0,class:"gsc-dropdown__items-footer"},c5e={__name:"GSC-Dropdown",props:{modelValue:{type:[Object,Number,String],default:()=>null},height:{type:String,default:"fit-content"},width:{type:String,default:"fit-content"},fontSize:{type:String,default:"14px"},borderRadius:{type:Number,default:5},arrowHeight:{type:Number,default:24},arrowWidth:{type:Number,default:24},borderType:{type:String,default:"solid",validator:function(e){return["solid","dotted","dashed"].includes(e)}},borderWidth:{type:Number,default:1},borderColor:{type:String,default:"black"},backgroundColor:{type:String,default:"grey"},color:{type:String,default:"black"},arrowColor:{type:String,default:"#CBEE6B"},items:{type:Array,default:()=>[]},defaultItemByIndex:{type:Number,default:0},defaultItemByProp:{type:Object,default:null,validator:e=>["propName","value"].every(t=>t in e)},listBackgroundColor:{type:String,default:"white"},hoverBackgroundColor:{type:String,default:"#f1f1f1"},listItemPadding:{type:String,default:"10px 12px"},listHeight:{type:String,default:"fit-content"},listItemSelectedColor:{type:String,default:"white"},listItemSelectedBackgroundColor:{type:String,default:"#399cfd"},listItemColor:{type:String,default:"black"},listBorderRadius:{type:String,default:"0"},listBorderColor:{type:String,default:""},listBorderWidth:{type:Number,default:1},isListSameWidth:{type:Boolean,default:!1},isMultipleOption:{type:Boolean,default:!1},footerBorderColor:{type:String,default:"#626970"},footerBorderWidth:{type:Number,default:1},isFooterVisible:{type:Boolean,default:!1},isDisabled:{type:Boolean,default:!1},onlyFirstTime:{type:Boolean,default:!1}},emits:["input","click-ready","update:modelValue"],setup(e,{emit:t}){const a=e,i=s.ref({}),n=s.ref(a.isMultipleOption?-1:0),r=s.ref(!1);s.watch(()=>a.items,(h,p)=>{if(!a.modelValue&&(!a.onlyFirstTime||!p||!p.length)&&h&&h.length){if(a.defaultItemByProp){const m=a.items.findIndex(f=>f[a.defaultItemByProp.propName]===a.defaultItemByProp.value);m!==-1?(n.value=m,i.value=h[m]):(n.value=0,i.value=h[0])}else i.value=h[a.defaultItemByIndex];t("input",i.value)}},{immediate:!0}),s.watch(()=>a.modelValue,h=>{if(h){const p=a.items.findIndex(m=>typeof h=="object"?JSON.stringify(m)===JSON.stringify(h):m===h);p!==-1&&(n.value=p,i.value=a.items[p],t("update:modelValue",i.value))}},{immediate:!0});const o=s.computed(()=>({height:a.height,width:a.width,backgroundColor:a.backgroundColor,borderRadius:`${a.borderRadius}px`,border:`${a.borderType} ${a.borderWidth}px ${a.borderColor}`,color:a.color,"--hover-background-color":a.hoverBackgroundColor,"--list-item-padding":a.listItemPadding,"--list-background-color":a.listBackgroundColor,"--list-height":a.listHeight,"--list-item-selected-color":a.listItemSelectedColor,"--list-item-selected-background-color":a.listItemSelectedBackgroundColor,"--list-item-color":a.listItemColor,"--list-border-radius":`${a.listBorderRadius}`,"--list-border-color":a.listBorderColor,"--list-width":a.isListSameWidth?a.width:"fit-content","--list-border-width":`${a.listBorderWidth}px`,"--footer-border":`${a.footerBorderWidth}px solid ${a.footerBorderColor}`,"--dropdown-opacity":a.isDisabled?"0.5":"1","--dropdown-cursor":a.isDisabled?"not-allowed":"pointer","--dropdown-font-size":a.fontSize?a.fontSize:"14px"})),l=s.computed(()=>({height:`${a.arrowHeight}px`,width:`${a.arrowWidth}px`}));function c(){a.isDisabled||(r.value=!r.value)}function d(h,p){a.isMultipleOption?n.value=-1:(n.value=p,r.value=!1),i.value=h,t("input",i.value),t("update:modelValue",i.value)}function u(){r.value=!1,t("click-ready")}return(h,p)=>(s.openBlock(),s.createElementBlock("div",{class:"gsc-dropdown",style:s.normalizeStyle(o.value)},[s.createElementVNode("div",{class:"gsc-dropdown__main-container",style:s.normalizeStyle({"padding-right":`${e.arrowWidth+8}px`}),onClick:c},[s.createElementVNode("div",i5e,[s.renderSlot(h.$slots,"default",{selectedItem:i.value})]),s.createElementVNode("div",{class:s.normalizeClass(["gsc-dropdown__main-container__icon",{"rotated-180":r.value}]),style:s.normalizeStyle(l.value)},[(s.openBlock(),s.createElementBlock("svg",{height:e.arrowHeight,width:e.arrowWidth,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[s.createElementVNode("path",{d:"M18.394 9.13501L13.1302 14.3988C12.5086 15.0204 11.4914 15.0204 10.8697 14.3988L5.60596 9.13501",stroke:e.arrowColor},null,8,r5e)],8,n5e))],6)],4),s.createVNode(s.Transition,null,{default:s.withCtx(()=>[s.withDirectives(s.createElementVNode("div",s5e,[s.createElementVNode("div",null,[s.createElementVNode("div",{class:"gsc-dropdown__items",style:s.normalizeStyle({"margin-top":`${a.borderWidth}px`})},[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(e.items,(m,f)=>(s.openBlock(),s.createElementBlock("div",{class:s.normalizeClass(["gsc-dropdown__items__item",{selected:f===n.value}]),key:f,onClick:v=>d(m,f)},[s.renderSlot(h.$slots,"availableItem",{item:m})],10,o5e))),128))],4),e.isFooterVisible?(s.openBlock(),s.createElementBlock("div",l5e,[s.createVNode(s.unref(a5e),{"text-value":"Listo","border-color":"#cbee6b","font-size":"12px",width:"72px",height:"22px","border-radius":"62px","border-width":.8,onClick:u})])):s.createCommentVNode("",!0)])],512),[[s.vShow,r.value]])]),_:3})],4))}},d5e=(e,t)=>{const a=e.__vccOpts||e;for(const[i,n]of t)a[i]=n;return a},u5e={class:"tournament-select__selected-tournament"},h5e={class:"tournament-select__selected-tournament__logo"},p5e=["src"],m5e={class:"tournament-select__selected-tournament__name"},f5e={__name:"GSCTournamentSelect",props:{apiUrl:{type:String,default:"https://kefloixzy1.execute-api.us-west-2.amazonaws.com/prod/gs3/tournaments"},fontFamily:{type:String,default:"sans-serif"},logosUrl:{type:String,default:"https://az755631.vo.msecnd.net/todoelfut/"},logoFileType:{type:String,default:"png"},height:{type:String,default:"40px"},width:{type:String,default:"179px"},borderRadius:{type:Number,default:8},arrowHeight:{type:Number,default:24},arrowWidth:{type:Number,default:24},borderType:{type:String,default:"solid",validator:function(e){return["solid","dotted","dashed"].includes(e)}},borderWidth:{type:Number,default:1},borderColor:{type:String,default:"rgba(255, 255, 255, 0.2)"},backgroundColor:{type:String,default:"#0d1d29"},color:{type:String,default:"white"},arrowColor:{type:String,default:"#CBEE6B"},items:{type:Array,default:()=>[]},defaultItemByIndex:{type:Number,default:0},defaultItemByProp:{type:Object,default:null,validator:e=>["propName","value"].every(t=>t in e)},currentSeasonId:{type:Number,default:0}},emits:["input"],setup(e,{emit:t}){const a=e,i=s.ref([]),n=s.computed(()=>{const h={};return a.fontFamily&&(h["font-family"]=`${a.fontFamily}`),h}),r=s.computed(()=>i.value.find(h=>h.seasonsIds.has(a.currentSeasonId))||i.value[0]);async function o(){try{if(a.items&&a.items.length)i.value=[...a.items];else if(a.apiUrl){const h=await c();i.value=h.map(p=>({...p.tournament,seasons:p.seasons,seasonsIds:p.seasons.reduce((m,f)=>(m.add(f.id),m),new Set)})).sort((p,m)=>p.order-m.order)}}catch(h){throw new Error(h)}}function l(h){const p=new XMLHttpRequest,m=`${a.logosUrl}${h}.${a.logoFileType}`;return p.open("HEAD",m,!1),p.send(),p.status!==404}async function c(){try{return(await fetch(a.apiUrl)).json()}catch(h){return Promise.reject(h)}}function d(h){t("input",h)}function u(h){t("input",h)}return s.onMounted(()=>{o()}),(h,p)=>(s.openBlock(),s.createElementBlock("div",{class:"tournament-select",style:s.normalizeStyle(n.value)},[s.createVNode(s.unref(c5e),s.mergeProps(a,{"model-value":r.value,items:i.value,onInput:d,"onUpdate:modelValue":u}),{default:s.withCtx(({selectedItem:m})=>[s.createElementVNode("div",u5e,[s.createElementVNode("div",h5e,[l(m.id)?(s.openBlock(),s.createElementBlock("img",{key:0,src:`${a.logosUrl}${m.id}.${a.logoFileType}`,alt:""},null,8,p5e)):s.createCommentVNode("",!0)]),s.createElementVNode("div",m5e,s.toDisplayString(m.name),1)])]),availableItem:s.withCtx(({item:m})=>[s.createElementVNode("div",null,s.toDisplayString(m.name),1)]),_:1},16,["model-value","items"])],4))}},g5e=d5e(f5e,[["__scopeId","data-v-0426ea5e"]]),y5e=(e,t)=>{const a=e.__vccOpts||e;for(const[i,n]of t)a[i]=n;return a},u1={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(e){this.status=e}}},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(e){this.$emit("click",e),this.typeOnOff&&(this.status=!this.status,this.$emit("status",this.status))}}},aP=()=>{s.useCssVars(e=>({"1c960139":e.height,b2f635d8:e.borderWidthBtn,"06e99898":e.borderType,"55555c76":e.borderColor,"23b6d320":e.borderRadius,"22c97374":e.width,"22bb09fa":e.backgroundColor,c148da7c:e.cursorType,cce756fc:e.fontSize,cff98d60:e.fontStyle,"5123b3a5":e.fontFamily,"47bf58db":e.marginLeftStat,cadc8414:e.fontSizeStat}))},iP=u1.setup;u1.setup=iP?(e,t)=>(aP(),iP(e,t)):aP;const _5e=e=>(s.pushScopeId("data-v-fb269a1e"),e=e(),s.popScopeId(),e),b5e=["src"],v5e={key:1,class:"text"},S5e=["src"],w5e={class:"stats"},T5e=_5e(()=>s.createElementVNode("img",{class:"iconstats",src:"https://az755631.vo.msecnd.net/todoelfut/playdes.png"},null,-1)),C5e={class:"numstats"},k5e={class:"leyend"};function E5e(e,t,a,i,n,r){return s.openBlock(),s.createElementBlock("div",null,[a.type==0?(s.openBlock(),s.createElementBlock("div",{key:0,class:s.normalizeClass(["button",n.status&&a.typeOnOff&&"button-active"]),style:s.normalizeStyle([r.customStyle,n.status&&a.typeOnOff&&r.customActive]),onClick:t[0]||(t[0]=(...o)=>r.btnClick&&r.btnClick(...o))},[a.icon&&a.iconPosition.toLowerCase()==="left"?(s.openBlock(),s.createElementBlock("img",{key:0,class:"icon",style:s.normalizeStyle({width:a.iconSize}),src:a.icon},null,12,b5e)):s.createCommentVNode("",!0),a.textValue?(s.openBlock(),s.createElementBlock("div",v5e,s.toDisplayString(a.textValue),1)):s.createCommentVNode("",!0),a.icon&&a.iconPosition.toLowerCase()==="right"?(s.openBlock(),s.createElementBlock("img",{key:2,class:"icon",style:s.normalizeStyle({width:a.iconSize}),src:a.icon},null,12,S5e)):s.createCommentVNode("",!0)],6)):s.createCommentVNode("",!0),a.type==1?(s.openBlock(),s.createElementBlock("div",{key:1,class:"button-target",onClick:t[1]||(t[1]=(...o)=>r.btnClick&&r.btnClick(...o))},[s.createElementVNode("div",w5e,[T5e,s.createElementVNode("div",C5e,s.toDisplayString(a.textStat),1)]),s.createElementVNode("div",k5e,s.toDisplayString(a.textCategory),1)])):s.createCommentVNode("",!0)])}const I5e=y5e(u1,[["render",E5e],["__scopeId","data-v-fb269a1e"]]),x5e={class:"gsc-dropdown__main-container__item-selected"},N5e=["height","width"],A5e=["stroke"],P5e={class:"gsc-dropdown__items-container"},O5e=["onClick"],B5e={key:0,class:"gsc-dropdown__items-footer"},D5e={__name:"GSC-Dropdown",props:{modelValue:{type:[Object,Number,String],default:()=>null},height:{type:String,default:"fit-content"},width:{type:String,default:"fit-content"},fontSize:{type:String,default:"14px"},borderRadius:{type:Number,default:5},arrowHeight:{type:Number,default:24},arrowWidth:{type:Number,default:24},borderType:{type:String,default:"solid",validator:function(e){return["solid","dotted","dashed"].includes(e)}},borderWidth:{type:Number,default:1},borderColor:{type:String,default:"black"},backgroundColor:{type:String,default:"grey"},color:{type:String,default:"black"},arrowColor:{type:String,default:"#CBEE6B"},items:{type:Array,default:()=>[]},defaultItemByIndex:{type:Number,default:0},defaultItemByProp:{type:Object,default:null,validator:e=>["propName","value"].every(t=>t in e)},listBackgroundColor:{type:String,default:"white"},hoverBackgroundColor:{type:String,default:"#f1f1f1"},listItemPadding:{type:String,default:"10px 12px"},listHeight:{type:String,default:"fit-content"},listItemSelectedColor:{type:String,default:"white"},listItemSelectedBackgroundColor:{type:String,default:"#399cfd"},listItemColor:{type:String,default:"black"},listBorderRadius:{type:String,default:"0"},listBorderColor:{type:String,default:""},listBorderWidth:{type:Number,default:1},isListSameWidth:{type:Boolean,default:!1},isMultipleOption:{type:Boolean,default:!1},footerBorderColor:{type:String,default:"#626970"},footerBorderWidth:{type:Number,default:1},isFooterVisible:{type:Boolean,default:!1},isDisabled:{type:Boolean,default:!1},onlyFirstTime:{type:Boolean,default:!1}},emits:["input","click-ready","update:modelValue"],setup(e,{emit:t}){const a=e,i=s.ref({}),n=s.ref(a.isMultipleOption?-1:0),r=s.ref(!1);s.watch(()=>a.items,(h,p)=>{if(!a.modelValue&&(!a.onlyFirstTime||!p||!p.length)&&h&&h.length){if(a.defaultItemByProp){const m=a.items.findIndex(f=>f[a.defaultItemByProp.propName]===a.defaultItemByProp.value);m!==-1?(n.value=m,i.value=h[m]):(n.value=0,i.value=h[0])}else i.value=h[a.defaultItemByIndex];t("input",i.value)}},{immediate:!0}),s.watch(()=>a.modelValue,h=>{if(h){const p=a.items.findIndex(m=>typeof h=="object"?JSON.stringify(m)===JSON.stringify(h):m===h);p!==-1&&(n.value=p,i.value=a.items[p],t("update:modelValue",i.value))}},{immediate:!0});const o=s.computed(()=>({height:a.height,width:a.width,backgroundColor:a.backgroundColor,borderRadius:`${a.borderRadius}px`,border:`${a.borderType} ${a.borderWidth}px ${a.borderColor}`,color:a.color,"--hover-background-color":a.hoverBackgroundColor,"--list-item-padding":a.listItemPadding,"--list-background-color":a.listBackgroundColor,"--list-height":a.listHeight,"--list-item-selected-color":a.listItemSelectedColor,"--list-item-selected-background-color":a.listItemSelectedBackgroundColor,"--list-item-color":a.listItemColor,"--list-border-radius":`${a.listBorderRadius}`,"--list-border-color":a.listBorderColor,"--list-width":a.isListSameWidth?a.width:"fit-content","--list-border-width":`${a.listBorderWidth}px`,"--footer-border":`${a.footerBorderWidth}px solid ${a.footerBorderColor}`,"--dropdown-opacity":a.isDisabled?"0.5":"1","--dropdown-cursor":a.isDisabled?"not-allowed":"pointer","--dropdown-font-size":a.fontSize?a.fontSize:"14px"})),l=s.computed(()=>({height:`${a.arrowHeight}px`,width:`${a.arrowWidth}px`}));function c(){a.isDisabled||(r.value=!r.value)}function d(h,p){a.isMultipleOption?n.value=-1:(n.value=p,r.value=!1),i.value=h,t("input",i.value),t("update:modelValue",i.value)}function u(){r.value=!1,t("click-ready")}return(h,p)=>(s.openBlock(),s.createElementBlock("div",{class:"gsc-dropdown",style:s.normalizeStyle(o.value)},[s.createElementVNode("div",{class:"gsc-dropdown__main-container",style:s.normalizeStyle({"padding-right":`${e.arrowWidth+8}px`}),onClick:c},[s.createElementVNode("div",x5e,[s.renderSlot(h.$slots,"default",{selectedItem:i.value})]),s.createElementVNode("div",{class:s.normalizeClass(["gsc-dropdown__main-container__icon",{"rotated-180":r.value}]),style:s.normalizeStyle(l.value)},[(s.openBlock(),s.createElementBlock("svg",{height:e.arrowHeight,width:e.arrowWidth,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[s.createElementVNode("path",{d:"M18.394 9.13501L13.1302 14.3988C12.5086 15.0204 11.4914 15.0204 10.8697 14.3988L5.60596 9.13501",stroke:e.arrowColor},null,8,A5e)],8,N5e))],6)],4),s.createVNode(s.Transition,null,{default:s.withCtx(()=>[s.withDirectives(s.createElementVNode("div",P5e,[s.createElementVNode("div",null,[s.createElementVNode("div",{class:"gsc-dropdown__items",style:s.normalizeStyle({"margin-top":`${a.borderWidth}px`})},[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(e.items,(m,f)=>(s.openBlock(),s.createElementBlock("div",{class:s.normalizeClass(["gsc-dropdown__items__item",{selected:f===n.value}]),key:f,onClick:v=>d(m,f)},[s.renderSlot(h.$slots,"availableItem",{item:m})],10,O5e))),128))],4),e.isFooterVisible?(s.openBlock(),s.createElementBlock("div",B5e,[s.createVNode(s.unref(I5e),{"text-value":"Listo","border-color":"#cbee6b","font-size":"12px",width:"72px",height:"22px","border-radius":"62px","border-width":.8,onClick:u})])):s.createCommentVNode("",!0)])],512),[[s.vShow,r.value]])]),_:3})],4))}},L5e=(e,t)=>{const a=e.__vccOpts||e;for(const[i,n]of t)a[i]=n;return a},M5e={class:"season-name"},R5e={components:{GSCSeasonSelect:L5e({__name:"GSC-SeasonSelect",props:{seasons:{type:Array,default:()=>[]},currentSeasonId:{type:Number,default:0}},emits:["input"],setup(e,{emit:t}){const a=e,i=t,n=s.computed(()=>a.seasons.find(l=>l.id===a.currentSeasonId));function r(l){i("input",l)}function o(l){i("input",l)}return(l,c)=>(s.openBlock(),s.createBlock(s.unref(D5e),{items:e.seasons,"model-value":n.value,height:"40px",width:"179px","background-color":"#0d1d29",color:"white","border-color":"rgba(255, 255, 255, 0.2)","font-family":"Poppins-Regular","border-radius":8,onInput:o,"onUpdate:modelValue":r},{default:s.withCtx(({selectedItem:d})=>[s.createElementVNode("div",M5e,[s.createElementVNode("span",null,s.toDisplayString(d.name),1)])]),availableItem:s.withCtx(({item:d})=>[s.createElementVNode("span",null,s.toDisplayString(d.name),1)]),_:1},8,["items","model-value"]))}},[["__scopeId","data-v-cb91d262"]]),GSCTournamentSelect:g5e,GSCGames:ej,GSCGridTeamsMatches:l7,GSCPlayersLanding:t7,GSCTops:tz,GSCTableCalendar:YV,GSCMediaPlayer:zEe},setup(){const e=s.ref("landingref"),{elementSize:t}=AO(e);return{landingref:e,elementSize:t}},watch:{team:{immediate:!0,deep:!0,async handler(e){if(Object.keys(this.seasonSelected).length!==0){const t=await this.generateSeasons(this.seasonSelected);this.seasonsSelected=t,this.fetchGames(e,t)}}},closestRound(e){this.selectedRoundKeyIndex=this.tournamentScheduleKeys.findIndex(t=>t===e),this.selectedRound=e}},props:{currentSeasonId:{type:Number,default:0},season:{type:Number,default:1772},isplayer:{type:Boolean,default:!1},user:{type:Object,default:()=>{}},team:{type:Number,default:0},player:{type:Number,default:0},gamesPerMatchDay:{type:Number,default:0,validator(e){return!Number.isNaN(e)&&e>=0}}},data(){return{defaultGameId:0,lastSeasonsIds:[],gamesPages:new Map,selectedRoundKeyIndex:0,selectedRound:0,fullTournamentScheduleFull:[],defaultMatchDayKey:null,isCupTournament:!1,retries:3,userTeamGames:[],isCupLegacyTournament:!1,tournamentScheduleKeys:[],currentTournamentGames:null,currentTournamentTeams:null,gamesUrl:"https://qyyibs1w0d.execute-api.us-west-2.amazonaws.com/prod/calendar/gamesBySeason/",gamesUrl2:"https://qyyibs1w0d.execute-api.us-west-2.amazonaws.com/prod/calendar/gamesBySeason?",seasonSelected:{},seasonSelectedDropDowns:{},seasonsSelected:[],fullTournamentSchedule:{},tournamentSelected:{},tournamentSelectedDropDowns:{seasons:[]},playersLength:0,tokenFree:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MCwibmFtZSI6IlVzdWFyaW8gRnJlZSIsInVzZXJuYW1lIjoiZnJlZUBnb2xzdGF0cy5jb20iLCJlbWFpbCI6ImZyZWVAZ29sc3RhdHMuY29tIiwiaWF0IjoxNjA2NzU4Nzk1LCJleHAiOjE2MzgyOTQ3OTV9.kPNmP7yDtk38cAXrUyc7OHRh6J25VFqy-XUNzbK-4YE"}},computed:{gamesFullLeague(){var e=[];for(let t=0;t<this.fullTournamentScheduleFull[this.selectedRound].length;t++)for(let a=0;a<this.fullTournamentScheduleFull[this.selectedRound][t].games.length;a++)e.push(this.fullTournamentScheduleFull[this.selectedRound][t].games[a]);return e},closestRound(){return this.userTeamGames&&this.userTeamGames.length?this.getUserTeamClosestRound(this.fullTournamentScheduleFull):this.getNormalClosestRound(this.fullTournamentScheduleFull)},containerGridCalendarTable(){return this.elementSize.width<=1e3?"container-grid-calendar-table-mobile":"container-grid-calendar-table"},containerbackground(){return this.elementSize.width<=680?"container-background-movil":"container-background"},containerdata(){return this.elementSize.width<=680?"container-data-movil":"container-data"}},methods:{onAction(e){this.$emit("action",e)},onOpenMedia(e){this.$emit("openmedia",e)},onOpenProfile(e){this.$emit("onOpenProfile",e)},onClickMatch(e){this.$emit("openGame",e)},onClickCalendar(){const e={type:this.tournamentSelected.id==this.user.tournament?1:0,team:this.team,season:this.seasonSelectedDropDowns};this.$emit("onClickMyCalendar",e)},moreTops(){const e={team:this.team,season:this.seasonSelectedDropDowns};this.$emit("openTops",e)},clickProfileBtn(e){this.$emit("openProfile",e)},viewAll(){const e={team:this.team,season:this.seasonSelectedDropDowns};this.$emit("openAllPlayers",e)},getTotalPlayers(e){this.playersLength=e},clickCard(e){const t={data:e,isPlayer:this.isplayer};this.$emit("clickOnMainCards",t)},async fetchGames(e,t){const a=t.map(n=>`seasons=${n.id}`).join("&"),i=Sc.create({headers:{Authorization:`${this.tokenFree}`}});this.fullTournamentSchedule=await i.get(this.gamesUrl+e+"?"+a)},async generateSeasons(e){const t=[{id:e.id,type:e.type}];return e.related_seasons&&e.related_seasons.length&&t.push(...e.related_seasons.map(a=>({id:a.id,type:a.type}))),t},async onInputTournament(e){this.tournamentSelected=e,this.tournamentSelectedDropDowns.id!==e.id&&(this.tournamentSelectedDropDowns=e)},async onInputSeason(e){if(this.seasonSelected=e,this.tournamentSelected.id!=this.user.tournament){const t=await this.generateSeasons(this.seasonSelected);this.seasonsSelected=t,await this.createFullTournamentScheme(t,!1)}else{const t=await this.generateSeasons(this.seasonSelected);this.seasonsSelected=t,await this.fetchGames(this.user.team,t)}this.seasonSelectedDropDowns!==e.id&&(this.seasonSelectedDropDowns=e.id,this.$emit("change-season-id",e.id))},async fetchTournaments(e){try{const{data:t}=await Sc.get("https://kefloixzy1.execute-api.us-west-2.amazonaws.com/prod/tournaments");return t}catch(t){if(e>0)return this.fetchTournaments(e-1);throw new Error(t)}},async fetchSeasonsGamesAndTeams(e,t,a=""){let i=a;try{i||(i=this.gamesUrl2,e.forEach((l,c)=>{i+=`${c===0?"":"&"}seasons=${l}`}));const n=Sc.create({headers:{Authorization:`${this.tokenFree}`}}),{data:{data:r,teams:o}}=await n.get(i);return{seasonsAndGames:r,seasonsAndTeams:o}}catch(n){if(t>0)return this.fetchSeasonsGamesAndTeams(e,t-1,i);throw new Error(n)}},areSeasonsDifferent(e){for(const t of e)if(!this.lastSeasonsIds.includes(t.season_id))return!0;return!1},async createFullTournamentScheme(e,t){try{this.fullTournamentSchedule={},this.userTeamGames=[];let a=0;const{seasonsAndGames:i,seasonsAndTeams:n}=await this.fetchSeasonsGamesAndTeams(e.map(c=>c.id),3);if(t&&this.areSeasonsDifferent(i))return;i.forEach(c=>{const{type:d}=e.find(u=>u.id===c.season_id);c.type=d,c.games.forEach(u=>{u.season_id=c.season_id}),d===0&&(a=c.season_id)});const r={seasonsGames:i},{teams:o}=n.find(c=>c.season_id===a),l=r&&r.seasonsGames?r.seasonsGames.map(c=>{const d=c.games.reduce((u,h)=>{const p={...h};return p.dateTimeMillis=new Date(p.date_time_utc).valueOf(),p.home_team=o.find(m=>m.team_id===h.home_team),p.visiting_team=o.find(m=>m.team_id===h.visiting_team),u[h.matchday_abbreviation]?u[h.matchday_abbreviation][h.game_status===3?"canceled":h.date]?u[h.matchday_abbreviation][h.game_status===3?"canceled":h.date].push(p):u[h.matchday_abbreviation][h.game_status===3?"canceled":h.date]=[p]:u[h.matchday_abbreviation]={[h.game_status===3?"canceled":h.date]:[p]},this.gsData&&this.gsData.teamId&&p.game_status===4&&(p.home_team.team_id===this.gsData.teamId||p.visiting_team.team_id===this.gsData.teamId)&&this.userTeamGames.push(p),u},{});this.userTeamGames.sort((u,h)=>u.dateTimeMillis-h.dateTimeMillis);for(let[u,h]of Object.entries(d))d[u]=Object.entries(h).map(([p,m])=>({date:p,games:m.sort((f,v)=>f.dateTimeMillis-v.dateTimeMillis)})),d[u].sort((p,m)=>p.date<m.date?-1:p.date>m.date?1:0);return{type:c.type,weight:c.type===0?0:c.type===2?1:2,schedule:d}}):[];l.sort((c,d)=>c.weight-d.weight),this.fullTournamentScheduleFull=l.reduce((c,d)=>{for(const[u,h]of Object.entries(d.schedule))if(d.type===0)if(this.isCup){const p=u.replace("M",""),m=`Jornada ${p}`;this.isCupLegacy?c[WEe[p]||m]=h:c[qEe[u]||m]=h}else c[Number(u.replace("M","")).toString()]=h;else d.type===2?["PI1","PI2"].includes(u)?c[u]=h:c[`R${Number(u.replace("PO",""))}`]=h:d.type===1&&(c[HEe[u]]=h);return c},{}),this.tournamentScheduleKeys=Object.keys(this.fullTournamentScheduleFull)}catch(a){throw new Error(a)}finally{this.loadingFlag=!1}},getNormalClosestRound(e){const a=Object.entries(Object.entries(e).reduce((r,[o,l])=>(r[o]=[],l.forEach(c=>{c.games.forEach(d=>{const u=new Date(d.date_time_utc).getTime()+66e5;r[o].push(u)})}),r),{}));if(!a.length)return"1";const i=new Date().getTime(),n=a.reduce((r,[o,l])=>{let c=null;return l.forEach(d=>{const u=d-i;u>=0&&(c===null||u<c)&&(c=u)}),c&&(r.shortestTime===null||c<r.shortestTime)&&(r.round=o,r.shortestTime=c),r},{round:"",shortestTime:null});return n.shortestTime!==null?n.round:a[a.length-1][0]},getUserTeamClosestRound(e){let t=1;if(this.userTeamGames.length){const a=this.userTeamGames[0];for(const[i,n]of Object.entries(e))for(const r of n)if(r.games.find(l=>l.game_id===a.game_id))return i}return t}},async created(){const a=(await this.fetchTournaments(3)).find(n=>n._id===1).seasons[1],i=[{id:a.id,type:a.type}];a.related_seasons&&a.related_seasons.length&&i.push(...a.related_seasons.map(n=>({id:n.id,type:n.type}))),await this.createFullTournamentScheme(i,!1)}},F5e=e=>(s.pushScopeId("data-v-1d1c7fb4"),e=e(),s.popScopeId(),e),V5e={class:"gsclanding",ref:"landingref"},U5e={key:0,class:"container-selectors-mobile"},j5e={class:"container-selectors-mobile-tournament"},z5e={class:"container-selectors-mobile-season"},H5e={key:0,class:"home-item-movil"},q5e=F5e(()=>s.createElementVNode("div",{class:"home-movil"},"Inicio",-1)),W5e={class:"name-user-movil"},G5e={key:1,class:"home-item"},K5e={key:2,class:"bar-settings"},X5e={class:"name-user"},J5e={class:"container-selectors"},Y5e={class:"selector-tournament"},Q5e={class:"selector-seasons"},Z5e={key:3,class:"container-games"},$5e={key:4,class:"container-players"},e4e={class:"container-tops"},t4e={class:"container-vr"};function a4e(e,t,a,i,n,r){const o=s.resolveComponent("GSCTournamentSelect"),l=s.resolveComponent("GSCSeasonSelect"),c=s.resolveComponent("GSCGames"),d=s.resolveComponent("GSCGridTeamsMatches"),u=s.resolveComponent("GSCTableCalendar"),h=s.resolveComponent("GSCPlayersLanding"),p=s.resolveComponent("GSCTops"),m=s.resolveComponent("GSCMediaPlayer");return s.openBlock(),s.createElementBlock("div",V5e,[i.elementSize.width<=680?(s.openBlock(),s.createElementBlock("div",U5e,[s.createElementVNode("div",j5e,[s.createVNode(o,{"current-season-id":a.currentSeasonId,width:"100%",onInput:r.onInputTournament},null,8,["current-season-id","onInput"])]),s.createElementVNode("div",z5e,[s.createVNode(l,{"current-season-id":a.currentSeasonId,width:"100%",seasons:n.tournamentSelectedDropDowns.seasons,onInput:r.onInputSeason},null,8,["current-season-id","seasons","onInput"])])])):s.createCommentVNode("",!0),s.createElementVNode("div",{class:s.normalizeClass(r.containerbackground)},[s.createElementVNode("div",{class:s.normalizeClass(r.containerdata)},[i.elementSize.width<=680?(s.openBlock(),s.createElementBlock("div",H5e,[q5e,s.createElementVNode("div",W5e,[s.createTextVNode("Bienvenido "),a.user.name.split(",").length!=0?(s.openBlock(),s.createElementBlock(s.Fragment,{key:0},[a.user.name.split(",").length==1?(s.openBlock(),s.createElementBlock(s.Fragment,{key:0},[a.user.name.split(",")[0]!=""?(s.openBlock(),s.createElementBlock(s.Fragment,{key:0},[s.createTextVNode(", ")],64)):s.createCommentVNode("",!0),s.createTextVNode(s.toDisplayString(a.user.name.split(",")[0]),1)],64)):(s.openBlock(),s.createElementBlock(s.Fragment,{key:1},[a.user.name.split(",")[0]!=""?(s.openBlock(),s.createElementBlock(s.Fragment,{key:0},[s.createTextVNode(", ")],64)):s.createCommentVNode("",!0),s.createTextVNode(s.toDisplayString(a.user.name.split(",")[1]),1)],64))],64)):s.createCommentVNode("",!0)])])):s.createCommentVNode("",!0),i.elementSize.width>680?(s.openBlock(),s.createElementBlock("div",G5e,"Inicio")):s.createCommentVNode("",!0),i.elementSize.width>680?(s.openBlock(),s.createElementBlock("div",K5e,[s.createElementVNode("div",X5e,[s.createTextVNode("Bienvenido "),a.user.name.split(",").length!=0?(s.openBlock(),s.createElementBlock(s.Fragment,{key:0},[a.user.name.split(",").length==1?(s.openBlock(),s.createElementBlock(s.Fragment,{key:0},[a.user.name.split(",")[0]!=""?(s.openBlock(),s.createElementBlock(s.Fragment,{key:0},[s.createTextVNode(", ")],64)):s.createCommentVNode("",!0),s.createTextVNode(s.toDisplayString(a.user.name.split(",")[0]),1)],64)):(s.openBlock(),s.createElementBlock(s.Fragment,{key:1},[a.user.name.split(",")[0]!=""?(s.openBlock(),s.createElementBlock(s.Fragment,{key:0},[s.createTextVNode(", ")],64)):s.createCommentVNode("",!0),s.createTextVNode(s.toDisplayString(a.user.name.split(",")[1]),1)],64))],64)):s.createCommentVNode("",!0)]),s.createElementVNode("div",J5e,[s.createElementVNode("div",Y5e,[s.createVNode(o,{"current-season-id":a.currentSeasonId,onInput:r.onInputTournament},null,8,["current-season-id","onInput"])]),s.createElementVNode("div",Q5e,[s.createVNode(l,{"current-season-id":a.currentSeasonId,seasons:n.tournamentSelectedDropDowns.seasons,onInput:r.onInputSeason},null,8,["current-season-id","seasons","onInput"])])])])):s.createCommentVNode("",!0),Object.keys(n.tournamentSelected).length>0?(s.openBlock(),s.createElementBlock("div",Z5e,[s.createVNode(c,{"component-width":i.elementSize.width,isplayer:a.isplayer,"is-full":n.tournamentSelected.id!=a.user.tournament,onClickMatch:r.onClickMatch,onClickCalendar:r.onClickCalendar,data:n.tournamentSelected.id==a.user.tournament?n.fullTournamentSchedule:r.gamesFullLeague},null,8,["component-width","isplayer","is-full","onClickMatch","onClickCalendar","data"])])):s.createCommentVNode("",!0),s.createElementVNode("div",{class:s.normalizeClass(r.containerGridCalendarTable)},[s.createElementVNode("div",{class:"container-grid",style:s.normalizeStyle(i.elementSize.width<1e3?"width: 100%":"")},[s.createVNode(d,{isPlayer:a.isplayer?n.tournamentSelected.id==a.user.tournament:!1,"player-id":a.user.player,"team-id":a.user.team,"season-selected":n.seasonSelected.id,"next-rival-id":Object.keys(n.fullTournamentSchedule).length>0?a.user.team==n.fullTournamentSchedule.data.prematch.home_team?n.fullTournamentSchedule.data.prematch.visiting_team:n.fullTournamentSchedule.data.prematch.home_team:0,"team-img":"https://az755631.vo.msecnd.net/teams-150/"+a.user.team+".png","player-img":"https://az755631.vo.msecnd.net/players-profile/"+a.user.player+".png","rival-img":Object.keys(n.fullTournamentSchedule).length>0?a.user.team==n.fullTournamentSchedule.data.prematch.home_team?"https://az755631.vo.msecnd.net/teams-150/"+n.fullTournamentSchedule.data.prematch.visiting_team+".png":"https://az755631.vo.msecnd.net/teams-150/"+n.fullTournamentSchedule.data.prematch.home_team+".png":"","has-team":a.isplayer?!1:n.tournamentSelected.id==a.user.tournament,"component-width":i.elementSize.width,onAction:r.clickCard},null,8,["isPlayer","player-id","team-id","season-selected","next-rival-id","team-img","player-img","rival-img","has-team","component-width","onAction"])],4),s.createElementVNode("div",{class:"container-calendar-table",style:s.normalizeStyle(i.elementSize.width<1e3?"width: 100%; margin-top: 30px;":"")},[s.createVNode(u,{onAction:r.onAction,season:n.seasonSelected,seasons:n.seasonsSelected,onOpenmedia:r.onOpenMedia,onOnOpenProfile:r.onOpenProfile,componentWidth:i.elementSize.width},null,8,["onAction","season","seasons","onOpenmedia","onOnOpenProfile","componentWidth"])],4)],2),n.tournamentSelected.id==a.user.tournament?s.withDirectives((s.openBlock(),s.createElementBlock("div",$5e,[s.createVNode(h,{onClickProfileBtn:r.clickProfileBtn,onViewAll:r.viewAll,onTotalPlayers:r.getTotalPlayers,"team-id":a.user.team,"season-id":n.seasonSelected.id,"is-player":a.user.player!=0},null,8,["onClickProfileBtn","onViewAll","onTotalPlayers","team-id","season-id","is-player"])],512)),[[s.vShow,n.playersLength>0]]):s.createCommentVNode("",!0),s.createElementVNode("div",e4e,[s.createVNode(p,{onMore:r.moreTops,"show-switch":n.tournamentSelected.id==a.user.tournament,season:n.seasonSelected.id,"team-id":a.user.team,onOpenmedia:r.onOpenMedia},null,8,["onMore","show-switch","season","team-id","onOpenmedia"])]),s.createElementVNode("div",t4e,[s.createVNode(m)])],2)],2)],512)}const i4e=si(R5e,[["render",a4e],["__scopeId","data-v-1d1c7fb4"]]),n4e=(e,t)=>{const a=e.__vccOpts||e;for(const[i,n]of t)a[i]=n;return a},r4e={key:1},s4e={width:"10",height:"8",viewBox:"0 0 10 8",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o4e=["fill"],l4e={key:0,class:"checkbox__teams"},c4e={class:"checkbox__teams__logo"},d4e=["src"],u4e={class:"checkbox__teams__logo"},h4e=["src"],p4e={__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(e){return["left","right","top","bottom"].includes(e)}},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(e,{emit:t}){const a=e;s.useCssVars(d=>({70501426:e.width,"1957cde0":e.height}));const i=s.ref(!1),n=s.computed(()=>{const d={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 i.value?(d["background-color"]=a.boxBackgroundColor,d.border=`solid ${a.boxBorderWidth} ${a.boxBackgroundColor}`):d.border=`solid ${a.boxBorderWidth} ${a.boxBorderColor}`,d}),r=s.computed(()=>({"font-family":a.boxValueFontFamily,"font-size":a.boxValueFontSize,color:a.boxValueColor,"line-height":1})),o=s.computed(()=>{const d={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")&&(d[`margin-${a.boxPosition}`]=a.isBoxOnly?"0":a.teamsIds?"8px":"10px"),d});s.watch(()=>a.modelValue,d=>{d!==i.value&&(i.value=d)},{immediate:!0});function l(){a.avoidInteraction||!i.value&&a.avoidToCheck||(i.value=!i.value,t("update:modelValue",i.value))}function c(d){return`${{}.TEAM_LOGOS_URL||"https://az755631.vo.msecnd.net/teams-80/"}${d}.png`}return(d,u)=>(s.openBlock(),s.createElementBlock("div",{class:s.normalizeClass(["checkbox",`box-${e.boxPosition}`]),onClick:l},[s.createElementVNode("div",{class:"checkbox__box",style:s.normalizeStyle(n.value)},[i.value?(s.openBlock(),s.createElementBlock(s.Fragment,{key:0},[a.boxValue?(s.openBlock(),s.createElementBlock("div",{key:0,class:"checkbox__box__value",style:s.normalizeStyle(r.value)},s.toDisplayString(e.boxValue),5)):(s.openBlock(),s.createElementBlock("div",r4e,[(s.openBlock(),s.createElementBlock("svg",s4e,[s.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:e.boxValueColor},null,8,o4e)]))]))],64)):s.createCommentVNode("",!0)],4),e.teamsIds&&e.teamsIds.length?(s.openBlock(),s.createElementBlock("div",l4e,[s.createElementVNode("div",c4e,[s.createElementVNode("img",{src:c(e.teamsIds[0]),alt:""},null,8,d4e)]),s.createElementVNode("div",u4e,[s.createElementVNode("img",{src:c(e.teamsIds[1]),alt:""},null,8,h4e)])])):s.createCommentVNode("",!0),s.createElementVNode("div",{class:"checkbox__label",style:s.normalizeStyle(o.value)},s.toDisplayString(e.label),5)],2))}},h1=n4e(p4e,[["__scopeId","data-v-8ab85812"]]),m4e={class:"subcategory-group"},f4e={__name:"SubcategoryGroup",props:{subcategoryGroup:{type:Array,default:()=>[]}},setup(e){return(t,a)=>(s.openBlock(),s.createElementBlock("div",m4e,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(e.subcategoryGroup,i=>(s.openBlock(),s.createBlock(s.unref(h1),{key:i.id,modelValue:i.isSelected,"onUpdate:modelValue":n=>i.isSelected=n,label:i.name},null,8,["modelValue","onUpdate:modelValue","label"]))),128))]))}},g4e=bt(f4e,[["__scopeId","data-v-6c6e0261"]]),y4e={class:"filter-subcategories"},_4e=Object.freeze(Object.defineProperty({__proto__:null,default:bt({__name:"FilterSubcategories",props:{subcategoryGroups:{type:Array,default:()=>[]}},setup(e){return(t,a)=>(s.openBlock(),s.createElementBlock("div",y4e,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(e.subcategoryGroups,i=>(s.openBlock(),s.createElementBlock("div",{key:i.id,class:"filter-subcategories__group"},[s.createVNode(g4e,{subcategoryGroup:i},null,8,["subcategoryGroup"])]))),128))]))}},[["__scopeId","data-v-feeb6f0d"]])},Symbol.toStringTag,{value:"Module"})),If=e=>(s.pushScopeId("data-v-209a8861"),e=e(),s.popScopeId(),e),b4e={class:"details__header"},v4e=If(()=>s.createElementVNode("div",{class:"details__header__title"},"Jugando como",-1)),S4e={class:"details__header__checkbox"},w4e={class:"details__body"},T4e={class:"details__body__playing-as"},C4e=["onClick"],k4e={class:"details__header"},E4e=If(()=>s.createElementVNode("div",{class:"details__header__title"},"En: (Elige el lapso de tiempo)",-1)),I4e={class:"details__header__checkbox"},x4e={class:"details__body"},N4e=If(()=>s.createElementVNode("div",{class:"details__body__title"},"1er tiempo",-1)),A4e={class:"details__body__game-section"},P4e=["onClick"],O4e={class:"details__body"},B4e=If(()=>s.createElementVNode("div",{class:"details__body__title"},"2do tiempo",-1)),D4e={class:"details__body__game-section"},L4e=["onClick"],M4e=Object.freeze(Object.defineProperty({__proto__:null,default:bt({__name:"FilterConditions",props:{conditions:{type:Object,default:()=>({playingAs:[{name:"Local",value:1,isSelected:!0},{name:"Visitante",value:2,isSelected:!0}],gameSections:[{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}]})},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(e){s.useCssVars(u=>({"6828708b":e.buttonsBackgroundColor,"717ea86c":e.buttonsTextColor,"321a49b0":e.buttonsBorderWidth,"31034b4d":e.buttonsBorderColor,dca9f11e:e.buttonsBackgroundColorActive,"90d3dadc":e.buttonsTextColorActive,"305cb0d6":e.buttonsBorderWidthActive,"18196e9a":e.buttonsBorderColorActive}));const t=e,a=s.computed(()=>t.conditions.playingAs.every(u=>u.isSelected)),i=s.computed(()=>t.conditions.gameSections.every(u=>u.isSelected)),n=s.computed(()=>t.conditions.gameSections.reduce((u,h)=>(h.value<=3?u.firstHalf.push(h):u.secondHalf.push(h),u),{firstHalf:[],secondHalf:[]})),r=s.computed(()=>({"--border-radius-first-button":`${t.buttonsBorderRadius} 0 0 ${t.buttonsBorderRadius}`,"--border-radius-last-button":`0 ${t.buttonsBorderRadius} ${t.buttonsBorderRadius} 0`}));function o(u){u?t.conditions.playingAs.forEach(h=>{h.isSelected=!0}):t.conditions.playingAs.forEach((h,p)=>{h.isSelected=p===0})}function l(u){t.conditions.playingAs.filter(h=>h.isSelected).length===1&&u.isSelected||(u.isSelected=!u.isSelected)}function c(u){t.conditions.gameSections.filter(h=>h.isSelected).length===1&&u.isSelected||(u.isSelected=!u.isSelected)}function d(u){u?t.conditions.gameSections.forEach(h=>{h.isSelected=!0}):t.conditions.gameSections.forEach((h,p)=>{h.isSelected=p===0})}return(u,h)=>(s.openBlock(),s.createElementBlock("div",{class:"details",style:s.normalizeStyle(r.value)},[s.createElementVNode("div",b4e,[v4e,s.createElementVNode("div",S4e,[s.createVNode(s.unref(h1),{label:"Todos","model-value":a.value,"onUpdate:modelValue":o},null,8,["model-value"])])]),s.createElementVNode("div",w4e,[s.createElementVNode("div",T4e,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(e.conditions.playingAs,(p,m)=>(s.openBlock(),s.createElementBlock("div",{key:`pa${m}`,class:s.normalizeClass(["details__body__button",{active:p.isSelected}]),onClick:f=>l(p)},s.toDisplayString(p.name),11,C4e))),128))])]),s.createElementVNode("div",k4e,[E4e,s.createElementVNode("div",I4e,[s.createVNode(s.unref(h1),{label:"Todos","model-value":i.value,"onUpdate:modelValue":d},null,8,["model-value"])])]),s.createElementVNode("div",x4e,[N4e,s.createElementVNode("div",A4e,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(n.value.firstHalf,(p,m)=>(s.openBlock(),s.createElementBlock("div",{key:`pa${m}`,class:s.normalizeClass(["details__body__button",{active:p.isSelected}]),onClick:f=>c(p)},s.toDisplayString(p.text),11,P4e))),128))])]),s.createElementVNode("div",O4e,[B4e,s.createElementVNode("div",D4e,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(n.value.secondHalf,(p,m)=>(s.openBlock(),s.createElementBlock("div",{key:`pa${m}`,class:s.normalizeClass(["details__body__button",{active:p.isSelected}]),onClick:f=>c(p)},s.toDisplayString(p.text),11,L4e))),128))])])],4))}},[["__scopeId","data-v-209a8861"]])},Symbol.toStringTag,{value:"Module"})),R4e=(e,t)=>{const a=e.__vccOpts||e;for(const[i,n]of t)a[i]=n;return a},p1={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(e){this.status=e}}},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(e){this.$emit("click",e),this.typeOnOff&&(this.status=!this.status,this.$emit("status",this.status))}}},nP=()=>{s.useCssVars(e=>({"1c960139":e.height,b2f635d8:e.borderWidthBtn,"06e99898":e.borderType,"55555c76":e.borderColor,"23b6d320":e.borderRadius,"22c97374":e.width,"22bb09fa":e.backgroundColor,c148da7c:e.cursorType,cce756fc:e.fontSize,cff98d60:e.fontStyle,"5123b3a5":e.fontFamily,"47bf58db":e.marginLeftStat,cadc8414:e.fontSizeStat}))},rP=p1.setup;p1.setup=rP?(e,t)=>(nP(),rP(e,t)):nP;const F4e=e=>(s.pushScopeId("data-v-fb269a1e"),e=e(),s.popScopeId(),e),V4e=["src"],U4e={key:1,class:"text"},j4e=["src"],z4e={class:"stats"},H4e=F4e(()=>s.createElementVNode("img",{class:"iconstats",src:"https://az755631.vo.msecnd.net/todoelfut/playdes.png"},null,-1)),q4e={class:"numstats"},W4e={class:"leyend"};function G4e(e,t,a,i,n,r){return s.openBlock(),s.createElementBlock("div",null,[a.type==0?(s.openBlock(),s.createElementBlock("div",{key:0,class:s.normalizeClass(["button",n.status&&a.typeOnOff&&"button-active"]),style:s.normalizeStyle([r.customStyle,n.status&&a.typeOnOff&&r.customActive]),onClick:t[0]||(t[0]=(...o)=>r.btnClick&&r.btnClick(...o))},[a.icon&&a.iconPosition.toLowerCase()==="left"?(s.openBlock(),s.createElementBlock("img",{key:0,class:"icon",style:s.normalizeStyle({width:a.iconSize}),src:a.icon},null,12,V4e)):s.createCommentVNode("",!0),a.textValue?(s.openBlock(),s.createElementBlock("div",U4e,s.toDisplayString(a.textValue),1)):s.createCommentVNode("",!0),a.icon&&a.iconPosition.toLowerCase()==="right"?(s.openBlock(),s.createElementBlock("img",{key:2,class:"icon",style:s.normalizeStyle({width:a.iconSize}),src:a.icon},null,12,j4e)):s.createCommentVNode("",!0)],6)):s.createCommentVNode("",!0),a.type==1?(s.openBlock(),s.createElementBlock("div",{key:1,class:"button-target",onClick:t[1]||(t[1]=(...o)=>r.btnClick&&r.btnClick(...o))},[s.createElementVNode("div",z4e,[H4e,s.createElementVNode("div",q4e,s.toDisplayString(a.textStat),1)]),s.createElementVNode("div",W4e,s.toDisplayString(a.textCategory),1)])):s.createCommentVNode("",!0)])}const K4e=R4e(p1,[["render",G4e],["__scopeId","data-v-fb269a1e"]]),X4e=(e,t)=>{const a=e.__vccOpts||e;for(const[i,n]of t)a[i]=n;return a},J4e={key:1},Y4e={width:"10",height:"8",viewBox:"0 0 10 8",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Q4e=["fill"],Z4e={key:0,class:"checkbox__teams"},$4e={class:"checkbox__teams__logo"},e3e=["src"],t3e={class:"checkbox__teams__logo"},a3e=["src"],i3e={__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(e){return["left","right","top","bottom"].includes(e)}},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(e,{emit:t}){const a=e;s.useCssVars(d=>({70501426:e.width,"1957cde0":e.height}));const i=s.ref(!1),n=s.computed(()=>{const d={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 i.value?(d["background-color"]=a.boxBackgroundColor,d.border=`solid ${a.boxBorderWidth} ${a.boxBackgroundColor}`):d.border=`solid ${a.boxBorderWidth} ${a.boxBorderColor}`,d}),r=s.computed(()=>({"font-family":a.boxValueFontFamily,"font-size":a.boxValueFontSize,color:a.boxValueColor,"line-height":1})),o=s.computed(()=>{const d={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")&&(d[`margin-${a.boxPosition}`]=a.isBoxOnly?"0":a.teamsIds?"8px":"10px"),d});s.watch(()=>a.modelValue,d=>{d!==i.value&&(i.value=d)},{immediate:!0});function l(){a.avoidInteraction||!i.value&&a.avoidToCheck||(i.value=!i.value,t("update:modelValue",i.value))}function c(d){return`${{}.TEAM_LOGOS_URL||"https://az755631.vo.msecnd.net/teams-80/"}${d}.png`}return(d,u)=>(s.openBlock(),s.createElementBlock("div",{class:s.normalizeClass(["checkbox",`box-${e.boxPosition}`]),onClick:l},[s.createElementVNode("div",{class:"checkbox__box",style:s.normalizeStyle(n.value)},[i.value?(s.openBlock(),s.createElementBlock(s.Fragment,{key:0},[a.boxValue?(s.openBlock(),s.createElementBlock("div",{key:0,class:"checkbox__box__value",style:s.normalizeStyle(r.value)},s.toDisplayString(e.boxValue),5)):(s.openBlock(),s.createElementBlock("div",J4e,[(s.openBlock(),s.createElementBlock("svg",Y4e,[s.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:e.boxValueColor},null,8,Q4e)]))]))],64)):s.createCommentVNode("",!0)],4),e.teamsIds&&e.teamsIds.length?(s.openBlock(),s.createElementBlock("div",Z4e,[s.createElementVNode("div",$4e,[s.createElementVNode("img",{src:c(e.teamsIds[0]),alt:""},null,8,e3e)]),s.createElementVNode("div",t3e,[s.createElementVNode("img",{src:c(e.teamsIds[1]),alt:""},null,8,a3e)])])):s.createCommentVNode("",!0),s.createElementVNode("div",{class:"checkbox__label",style:s.normalizeStyle(o.value)},s.toDisplayString(e.label),5)],2))}},n3e=X4e(i3e,[["__scopeId","data-v-8ab85812"]]),r3e=(e,t)=>{const a=e.__vccOpts||e;for(const[i,n]of t)a[i]=n;return a},m1={components:{GSCButton:K4e,GSCCheckbox:n3e},data(){return{update:0,all:!1,refreshBtn14:0,refreshBtn24:0,refreshBtn34:0,refreshBtn44:0,sectors:Array.from({length:16},(e,t)=>({sector:t+1,active:!1})),lastUpdatedValue:[]}},props:{backgroundColor:{type:String,default:"#2e3b46"},heightContainer:{type:String,default:"340px"},widthContainer:{type:String,default:"455px"},heightField:{type:Number,default:230},widthField:{type:Number,default:350},heightFieldGrid:{type:String,default:"230px"},widthFieldGrid:{type:String,default:"350px"},backgroundSectorActive:{type:String,default:"#cbee6b"},backgroundSectorDisabled:{type:String,default:"#2e3b46"},borderWidth:{type:Number,default:1},opacitySector:{type:Number,default:.5},borderColor:{type:String,default:"#FFFFFF"},colorLineField:{type:String,default:"#bfc2c5"},borderWidthLineField:{type:Number,default:2},value:{type:Array,default:()=>[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16]}},watch:{value:{deep:!0,immediate:!0,handler(e){const t=e.sort();JSON.stringify(t)!==JSON.stringify(this.lastUpdatedValue)&&(this.lastUpdatedValue=t,this.sectors.forEach((a,i)=>{a.active=e.includes(i+1),this.validateField(i)}),this.$emit("update:modelValue",e))}},sectors:{handler(e){var t=[];for(let a=0;a<e.length;a++)e[a].active&&t.push(a+1);this.$emit("update:modelValue",t)},deep:!0}},computed:{translx(){var e=0;return this.widthField>305&&(e=this.widthField-305),e},transly(){var e=0;return this.heightField>195&&(e=this.heightField-195,e=e/2),e},translxcircle(){var e=0;return this.widthField>305&&(e=this.widthField-305,e=e/2),e}},methods:{clickAll(e){if(e)for(let t=0;t<this.sectors.length;t++)this.sectors[t].active=!0,this.validateField(t);else for(let t=0;t<this.sectors.length;t++)this.sectors[t].active=!0,this.validateField(t);this.status14=!0,this.status24=!0,this.status34=!0,this.status44=!0,this.refreshBtn14+=1,this.refreshBtn24+=1,this.refreshBtn34+=1,this.refreshBtn44+=1},selectSector(e){var t=0;this.sectors[e].active=!this.sectors[e].active;for(let a=0;a<this.sectors.length;a++)this.sectors[a].active&&(t+=1);t==0&&(this.sectors[e].active=!0),this.validateField(e)},btn14(e){this.sectors[0].active=e?this.sectors[0].active=!0:this.sectors[0].active=!1,this.sectors[1].active=e?this.sectors[1].active=!0:this.sectors[1].active=!1,this.sectors[2].active=e?this.sectors[2].active=!0:this.sectors[2].active=!1,this.sectors[3].active=e?this.sectors[3].active=!0:this.sectors[3].active=!1;var t=0;for(let a=0;a<this.sectors.length;a++)this.sectors[a].active&&(t+=1);t==0?(this.sectors[0].active=!0,this.sectors[1].active=!0,this.sectors[2].active=!0,this.sectors[3].active=!0,this.status14=!0,this.refreshBtn14+=1):this.status14=!1,t==16&&(this.all=!0,this.update+=1)},btn24(e){this.sectors[4].active=e?this.sectors[4].active=!0:this.sectors[4].active=!1,this.sectors[5].active=e?this.sectors[5].active=!0:this.sectors[5].active=!1,this.sectors[6].active=e?this.sectors[6].active=!0:this.sectors[6].active=!1,this.sectors[7].active=e?this.sectors[7].active=!0:this.sectors[7].active=!1;var t=0;for(let a=0;a<this.sectors.length;a++)this.sectors[a].active&&(t+=1);t==0?(this.sectors[4].active=!0,this.sectors[5].active=!0,this.sectors[6].active=!0,this.sectors[7].active=!0,this.status24=!0,this.refreshBtn24+=1):this.status24=!1,t==16&&(this.all=!0,this.update+=1)},btn34(e){this.sectors[8].active=e?this.sectors[8].active=!0:this.sectors[8].active=!1,this.sectors[9].active=e?this.sectors[9].active=!0:this.sectors[9].active=!1,this.sectors[10].active=e?this.sectors[10].active=!0:this.sectors[10].active=!1,this.sectors[11].active=e?this.sectors[11].active=!0:this.sectors[11].active=!1;var t=0;for(let a=0;a<this.sectors.length;a++)this.sectors[a].active&&(t+=1);t==0?(this.sectors[8].active=!0,this.sectors[9].active=!0,this.sectors[10].active=!0,this.sectors[11].active=!0,this.status34=!0,this.refreshBtn34+=1):this.status34=!1,t==16&&(this.all=!0,this.update+=1)},btn44(e){this.sectors[12].active=e?this.sectors[12].active=!0:this.sectors[12].active=!1,this.sectors[13].active=e?this.sectors[13].active=!0:this.sectors[13].active=!1,this.sectors[14].active=e?this.sectors[14].active=!0:this.sectors[14].active=!1,this.sectors[15].active=e?this.sectors[15].active=!0:this.sectors[15].active=!1;var t=0;for(let a=0;a<this.sectors.length;a++)this.sectors[a].active&&(t+=1);t==0?(this.sectors[12].active=!0,this.sectors[13].active=!0,this.sectors[14].active=!0,this.sectors[15].active=!0,this.status44=!0,this.refreshBtn44+=1):this.status44=!1,t==16&&(this.all=!0,this.update+=1)},validateField(e){(e===0||e===1||e===2||e===3)&&(this.status14=!!(this.sectors[0].active&&this.sectors[1].active&&this.sectors[2].active&&this.sectors[3].active)),(e===4||e===5||e===6||e===7)&&(this.status24=!!(this.sectors[4].active&&this.sectors[5].active&&this.sectors[6].active&&this.sectors[7].active)),(e===8||e===9||e===10||e===11)&&(this.status34=!!(this.sectors[8].active&&this.sectors[9].active&&this.sectors[10].active&&this.sectors[11].active)),(e===12||e===13||e===14||e===15)&&(this.status44=!!(this.sectors[12].active&&this.sectors[13].active&&this.sectors[14].active&&this.sectors[15].active)),this.all=!!(this.status14&&this.status34&&this.status24&&this.status44),this.update+=1,this.status14&&(this.refreshBtn14+=1),this.status24&&(this.refreshBtn24+=1),this.status34&&(this.refreshBtn34+=1),this.status44&&(this.refreshBtn44+=1)}}},sP=()=>{s.useCssVars(e=>({"74799ff0":e.widthContainer,"24b24725":e.heightContainer,"5a6c06e0":e.backgroundColor,"4f483262":e.widthFieldGrid,eed6e3f8:e.heightFieldGrid}))},oP=m1.setup;m1.setup=oP?(e,t)=>(sP(),oP(e,t)):sP;const s3e=e=>(s.pushScopeId("data-v-f434f4ce"),e=e(),s.popScopeId(),e),o3e={class:"gsc-field"},l3e={class:"gsc-field__title-checked"},c3e=s3e(()=>s.createElementVNode("div",{class:"gsc-field__title-checked__title"},"Pase(s) desde la(s) zona(s):",-1)),d3e={class:"gsc-field__title-checked__check-cont"},u3e={class:"gsc-field__container-field"},h3e={class:"gsc-field__container-field__field"},p3e={width:"100%",height:"100%",fill:"#2e3b46",xmlns:"http://www.w3.org/2000/svg"},m3e=["stroke"],f3e=["stroke","stroke-width"],g3e=["stroke","stroke-width"],y3e=["stroke-width","stroke"],_3e=["fill","fill-opacity","stroke","stroke-width"],b3e=["fill","fill-opacity","stroke","stroke-width"],v3e=["fill","fill-opacity","stroke","stroke-width"],S3e=["fill","fill-opacity","stroke","stroke-width"],w3e=["fill","fill-opacity","stroke","stroke-width"],T3e=["fill","fill-opacity","stroke","stroke-width"],C3e=["fill","fill-opacity","stroke","stroke-width"],k3e=["fill","fill-opacity","stroke","stroke-width"],E3e=["fill","fill-opacity","stroke","stroke-width"],I3e=["fill","fill-opacity","stroke","stroke-width"],x3e=["fill","fill-opacity","stroke","stroke-width"],N3e=["fill","fill-opacity","stroke","stroke-width"],A3e=["fill","fill-opacity","stroke","stroke-width"],P3e=["fill","fill-opacity","stroke","stroke-width"],O3e=["fill","fill-opacity","stroke","stroke-width"],B3e=["fill","fill-opacity","stroke","stroke-width"],D3e={class:"gsc-field__container-field__bar-buttons"};function L3e(e,t,a,i,n,r){const o=s.resolveComponent("GSCCheckbox"),l=s.resolveComponent("GSCButton");return s.openBlock(),s.createElementBlock("div",o3e,[s.createElementVNode("div",l3e,[c3e,s.createElementVNode("div",d3e,[(s.openBlock(),s.createBlock(o,{label:"Todas las zonas","box-value-font-family":"Poppins-Regular","box-position":"right","label-font-size":"14px","label-white-space":"nowrap","box-margin-top":"0.4em",value:n.all,key:n.update,"model-value":n.all,"onUpdate:modelValue":r.clickAll},null,8,["value","model-value","onUpdate:modelValue"]))])]),s.createElementVNode("div",u3e,[s.createElementVNode("div",h3e,[(s.openBlock(),s.createElementBlock("svg",p3e,[s.createElementVNode("rect",{x:"1.5",y:"0.5",width:"100%",height:"100%",rx:"1.5",stroke:a.colorLineField},null,8,m3e),s.createElementVNode("path",{style:s.normalizeStyle("transform: translate("+r.translx+"px, "+r.transly+"px);"),d:"M303.597 39.9799H263.371C262.817 39.9799 262.369 40.4301 262.371 40.984L262.842 155.176C262.845 155.726 263.292 156.172 263.842 156.172H302.884",stroke:a.colorLineField,"stroke-width":a.borderWidthLineField,"stroke-linecap":"square"},null,12,f3e),s.createElementVNode("path",{style:s.normalizeStyle("transform: translateY("+r.transly+"px);"),class:"porteria1",d:"M1.09097 156.172L41.3162 156.172C41.8701 156.172 42.3185 155.722 42.3162 155.168L41.845 40.9758C41.8427 40.4252 41.3957 39.98 40.845 39.98L1.80338 39.98",stroke:a.colorLineField,"stroke-width":a.borderWidthLineField,"stroke-linecap":"square"},null,12,g3e),s.createElementVNode("path",{style:s.normalizeStyle("transform: translate("+r.translxcircle+"px, "+r.transly+"px);"),class:"circle",d:"M182.911 97.4512C182.911 113.726 169.44 126.936 152.801 126.936C136.162 126.936 122.691 113.726 122.691 97.4512C122.691 81.1767 136.162 67.9662 152.801 67.9662C169.44 67.9662 182.911 81.1767 182.911 97.4512Z","stroke-width":a.borderWidthLineField,stroke:a.colorLineField},null,12,y3e),s.createElementVNode("rect",{x:"0%",y:"0%",width:"25%",height:"25%",fill:n.sectors[0].active?a.backgroundSectorActive:a.backgroundSectorDisabled,"fill-opacity":a.opacitySector,stroke:a.borderColor,"stroke-width":a.borderWidth,onClick:t[0]||(t[0]=c=>r.selectSector(0))},null,8,_3e),s.createElementVNode("rect",{x:"0%",y:"25%",width:"25%",height:"25%",fill:n.sectors[1].active?a.backgroundSectorActive:a.backgroundSectorDisabled,"fill-opacity":a.opacitySector,stroke:a.borderColor,"stroke-width":a.borderWidth,onClick:t[1]||(t[1]=c=>r.selectSector(1))},null,8,b3e),s.createElementVNode("rect",{x:"0%",y:"50%",width:"25%",height:"25%",fill:n.sectors[2].active?a.backgroundSectorActive:a.backgroundSectorDisabled,"fill-opacity":a.opacitySector,stroke:a.borderColor,"stroke-width":a.borderWidth,onClick:t[2]||(t[2]=c=>r.selectSector(2))},null,8,v3e),s.createElementVNode("rect",{x:"0%",y:"75%",width:"25%",height:"25%",fill:n.sectors[3].active?a.backgroundSectorActive:a.backgroundSectorDisabled,"fill-opacity":a.opacitySector,stroke:a.borderColor,"stroke-width":a.borderWidth,onClick:t[3]||(t[3]=c=>r.selectSector(3))},null,8,S3e),s.createElementVNode("rect",{x:"25%",y:"0%",width:"25%",height:"25%",fill:n.sectors[4].active?a.backgroundSectorActive:a.backgroundSectorDisabled,"fill-opacity":a.opacitySector,stroke:a.borderColor,"stroke-width":a.borderWidth,onClick:t[4]||(t[4]=c=>r.selectSector(4))},null,8,w3e),s.createElementVNode("rect",{x:"25%",y:"25%",width:"25%",height:"25%",fill:n.sectors[5].active?a.backgroundSectorActive:a.backgroundSectorDisabled,"fill-opacity":a.opacitySector,stroke:a.borderColor,"stroke-width":a.borderWidth,onClick:t[5]||(t[5]=c=>r.selectSector(5))},null,8,T3e),s.createElementVNode("rect",{x:"25%",y:"50%",width:"25%",height:"25%",fill:n.sectors[6].active?a.backgroundSectorActive:a.backgroundSectorDisabled,"fill-opacity":a.opacitySector,stroke:a.borderColor,"stroke-width":a.borderWidth,onClick:t[6]||(t[6]=c=>r.selectSector(6))},null,8,C3e),s.createElementVNode("rect",{x:"25%",y:"75%",width:"25%",height:"25%",fill:n.sectors[7].active?a.backgroundSectorActive:a.backgroundSectorDisabled,"fill-opacity":a.opacitySector,stroke:a.borderColor,"stroke-width":a.borderWidth,onClick:t[7]||(t[7]=c=>r.selectSector(7))},null,8,k3e),s.createElementVNode("rect",{x:"50%",y:"0%",width:"25%",height:"25%",fill:n.sectors[8].active?a.backgroundSectorActive:a.backgroundSectorDisabled,"fill-opacity":a.opacitySector,stroke:a.borderColor,"stroke-width":a.borderWidth,onClick:t[8]||(t[8]=c=>r.selectSector(8))},null,8,E3e),s.createElementVNode("rect",{x:"50%",y:"25%",width:"25%",height:"25%",fill:n.sectors[9].active?a.backgroundSectorActive:a.backgroundSectorDisabled,"fill-opacity":a.opacitySector,stroke:a.borderColor,"stroke-width":a.borderWidth,onClick:t[9]||(t[9]=c=>r.selectSector(9))},null,8,I3e),s.createElementVNode("rect",{x:"50%",y:"50%",width:"25%",height:"25%",fill:n.sectors[10].active?a.backgroundSectorActive:a.backgroundSectorDisabled,"fill-opacity":a.opacitySector,stroke:a.borderColor,"stroke-width":a.borderWidth,onClick:t[10]||(t[10]=c=>r.selectSector(10))},null,8,x3e),s.createElementVNode("rect",{x:"50%",y:"75%",width:"25%",height:"25%",fill:n.sectors[11].active?a.backgroundSectorActive:a.backgroundSectorDisabled,"fill-opacity":a.opacitySector,stroke:a.borderColor,"stroke-width":a.borderWidth,onClick:t[11]||(t[11]=c=>r.selectSector(11))},null,8,N3e),s.createElementVNode("rect",{x:"75%",y:"0%",width:"25%",height:"25%",fill:n.sectors[12].active?a.backgroundSectorActive:a.backgroundSectorDisabled,"fill-opacity":a.opacitySector,stroke:a.borderColor,"stroke-width":a.borderWidth,onClick:t[12]||(t[12]=c=>r.selectSector(12))},null,8,A3e),s.createElementVNode("rect",{x:"75%",y:"25%",width:"25%",height:"25%",fill:n.sectors[13].active?a.backgroundSectorActive:a.backgroundSectorDisabled,"fill-opacity":a.opacitySector,stroke:a.borderColor,"stroke-width":a.borderWidth,onClick:t[13]||(t[13]=c=>r.selectSector(13))},null,8,P3e),s.createElementVNode("rect",{x:"75%",y:"50%",width:"25%",height:"25%",fill:n.sectors[14].active?a.backgroundSectorActive:a.backgroundSectorDisabled,"fill-opacity":a.opacitySector,stroke:a.borderColor,"stroke-width":a.borderWidth,onClick:t[14]||(t[14]=c=>r.selectSector(14))},null,8,O3e),s.createElementVNode("rect",{x:"75%",y:"75%",width:"25%",height:"25%",fill:n.sectors[15].active?a.backgroundSectorActive:a.backgroundSectorDisabled,"fill-opacity":a.opacitySector,stroke:a.borderColor,"stroke-width":a.borderWidth,onClick:t[15]||(t[15]=c=>r.selectSector(15))},null,8,B3e)]))]),s.createElementVNode("div",D3e,[(s.openBlock(),s.createBlock(l,{"text-value":"1/4 tos","font-size":"12px",height:"26px",width:"65px","type-on-off":!0,"border-width":1,"font-color":"#bfc2c5","border-color":"#8c9399","border-radius":"4px","font-family":"Poppins-Medium","active-border-width":1,"background-color":"","active-background-color":"#cbee6b33",ref:"btn14",onStatus:r.btn14,key:n.refreshBtn14,value:e.status14},null,8,["onStatus","value"])),(s.openBlock(),s.createBlock(l,{"text-value":"2/4 tos","font-size":"12px",height:"26px",width:"65px","type-on-off":!0,"border-width":1,"font-color":"#bfc2c5","border-color":"#8c9399","border-radius":"4px","font-family":"Poppins-Medium","active-border-width":1,"background-color":"","active-background-color":"#cbee6b33",ref:"btn24",onStatus:r.btn24,key:n.refreshBtn24,value:e.status24},null,8,["onStatus","value"])),(s.openBlock(),s.createBlock(l,{"text-value":"3/4 tos","font-size":"12px",height:"26px",width:"65px","type-on-off":!0,"border-width":1,"font-color":"#bfc2c5","border-color":"#8c9399","border-radius":"4px","font-family":"Poppins-Medium","active-border-width":1,"background-color":"","active-background-color":"#cbee6b33",ref:"btn34",onStatus:r.btn34,key:n.refreshBtn34,value:e.status34},null,8,["onStatus","value"])),(s.openBlock(),s.createBlock(l,{"text-value":"4/4 tos","font-size":"12px",height:"26px",width:"65px","type-on-off":!0,"border-width":1,"font-color":"#bfc2c5","border-color":"#8c9399","border-radius":"4px","font-family":"Poppins-Medium","active-border-width":1,"background-color":"","active-background-color":"#cbee6b33",ref:"btn44",onStatus:r.btn44,key:n.refreshBtn44,value:e.status44},null,8,["onStatus","value"]))])])])}const M3e=r3e(m1,[["render",L3e],["__scopeId","data-v-f434f4ce"]]),R3e={class:"filter-field"},F3e=Object.freeze(Object.defineProperty({__proto__:null,default:bt({__name:"FilterField",setup(e){const t=s.ref(Array.from({length:16},(i,n)=>n+1));function a(i){}return(i,n)=>(s.openBlock(),s.createElementBlock("div",R3e,[s.createVNode(s.unref(M3e),{width:"100%","background-color":"#2E3B46",value:t.value,"onUpdate:modelValue":a},null,8,["value"])]))}},[["__scopeId","data-v-95dd6111"]])},Symbol.toStringTag,{value:"Module"}));fs.GSCLanding=i4e,Object.defineProperty(fs,Symbol.toStringTag,{value:"Module"})});