@golstats/gsc-landing 1.0.189 → 1.0.191

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.
@@ -12,7 +12,7 @@
12
12
  * Vue 3 Carousel 0.3.1
13
13
  * (c) 2023
14
14
  * @license MIT
15
- */const rt={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"}},Vd={itemsToShow:{default:rt.itemsToShow,type:Number},itemsToScroll:{default:rt.itemsToScroll,type:Number},wrapAround:{default:rt.wrapAround,type:Boolean},throttle:{default:rt.throttle,type:Number},snapAlign:{default:rt.snapAlign,validator(s){return["start","end","center","center-even","center-odd"].includes(s)}},transition:{default:rt.transition,type:Number},breakpoints:{default:rt.breakpoints,type:Object},autoplay:{default:rt.autoplay,type:Number},pauseAutoplayOnHover:{default:rt.pauseAutoplayOnHover,type:Boolean},modelValue:{default:void 0,type:Number},mouseDrag:{default:rt.mouseDrag,type:Boolean},touchDrag:{default:rt.touchDrag,type:Boolean},dir:{default:rt.dir,validator(s){return["rtl","ltr"].includes(s)}},i18n:{default:rt.i18n,type:Object},settings:{default(){return{}},type:Object}};function aw({config:s,slidesCount:e}){const{snapAlign:t,wrapAround:n,itemsToShow:i=1}=s;if(n)return Math.max(e-1,0);let r;switch(t){case"start":r=e-i;break;case"end":r=e-1;break;case"center":case"center-odd":r=e-Math.ceil((i-.5)/2);break;case"center-even":r=e-Math.ceil(i/2);break;default:r=0;break}return Math.max(r,0)}function iw({config:s,slidesCount:e}){const{wrapAround:t,snapAlign:n,itemsToShow:i=1}=s;let r=0;if(t||i>e)return r;switch(n){case"start":r=0;break;case"end":r=i-1;break;case"center":case"center-odd":r=Math.floor((i-1)/2);break;case"center-even":r=Math.floor((i-2)/2);break;default:r=0;break}return r}function Tr({val:s,max:e,min:t}){return e<t?s:Math.min(Math.max(s,t),e)}function rw({config:s,currentSlide:e,slidesCount:t}){const{snapAlign:n,wrapAround:i,itemsToShow:r=1}=s;let o=e;switch(n){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 i?o:Tr({val:o,max:t-r,min:0})}function $d(s){return s?s.reduce((e,t)=>{var n;return t.type===a.Fragment?[...e,...$d(t.children)]:((n=t.type)===null||n===void 0?void 0:n.name)==="CarouselSlide"?[...e,t]:e},[]):[]}function Cr({val:s,max:e,min:t=0}){return s>e?Cr({val:s-(e+1),max:e,min:t}):s<t?Cr({val:s+(e+1),max:e,min:t}):s}function ow(s,e){let t;return e?function(...n){const i=this;t||(s.apply(i,n),t=!0,setTimeout(()=>t=!1,e))}:s}function lw(s,e){let t;return function(...n){t&&clearTimeout(t),t=setTimeout(()=>{s(...n),t=null},e)}}function cw(s="",e={}){return Object.entries(e).reduce((t,[n,i])=>t.replace(`{${n}}`,String(i)),s)}var dw=a.defineComponent({name:"ARIA",setup(){const s=a.inject("config",a.reactive(Object.assign({},rt))),e=a.inject("currentSlide",a.ref(0)),t=a.inject("slidesCount",a.ref(0));return()=>a.h("div",{class:["carousel__liveregion","carousel__sr-only"],"aria-live":"polite","aria-atomic":"true"},cw(s.i18n.itemXofY,{currentSlide:e.value+1,slidesCount:t.value}))}}),uw=a.defineComponent({name:"Carousel",props:Vd,setup(s,{slots:e,emit:t,expose:n}){var i;const r=a.ref(null),o=a.ref([]),l=a.ref(0),d=a.ref(0),c=a.reactive(Object.assign({},rt));let u=Object.assign({},rt),m;const f=a.ref((i=s.modelValue)!==null&&i!==void 0?i:0),p=a.ref(0),h=a.ref(0),g=a.ref(0),y=a.ref(0);let b,w;a.provide("config",c),a.provide("slidesCount",d),a.provide("currentSlide",f),a.provide("maxSlide",g),a.provide("minSlide",y),a.provide("slideWidth",l);function _(){m=Object.assign({},s.breakpoints),u=Object.assign(Object.assign(Object.assign({},u),s),{i18n:Object.assign(Object.assign({},u.i18n),s.i18n),breakpoints:void 0}),E(u)}function C(){if(!m||!Object.keys(m).length)return;const x=Object.keys(m).map($=>Number($)).sort(($,de)=>+de-+$);let z=Object.assign({},u);x.some($=>{const de=window.matchMedia(`(min-width: ${$}px)`).matches;return de&&(z=Object.assign(Object.assign({},z),m[$])),de}),E(z)}function E(x){Object.entries(x).forEach(([z,$])=>c[z]=$)}const A=lw(()=>{C(),T()},16);function T(){if(!r.value)return;const x=r.value.getBoundingClientRect();l.value=x.width/c.itemsToShow}function R(){d.value<=0||(h.value=Math.ceil((d.value-1)/2),g.value=aw({config:c,slidesCount:d.value}),y.value=iw({config:c,slidesCount:d.value}),c.wrapAround||(f.value=Tr({val:f.value,max:g.value,min:y.value})))}a.onMounted(()=>{a.nextTick(()=>T()),setTimeout(()=>T(),1e3),C(),G(),window.addEventListener("resize",A,{passive:!0}),t("init")}),a.onUnmounted(()=>{w&&clearTimeout(w),b&&clearInterval(b),window.removeEventListener("resize",A,{passive:!0})});let I=!1;const v={x:0,y:0},M={x:0,y:0},j=a.reactive({x:0,y:0}),U=a.ref(!1),se=a.ref(!1),re=()=>{U.value=!0},ie=()=>{U.value=!1};function ue(x){["INPUT","TEXTAREA","SELECT"].includes(x.target.tagName)||(I=x.type==="touchstart",I||x.preventDefault(),!(!I&&x.button!==0||W.value)&&(v.x=I?x.touches[0].clientX:x.clientX,v.y=I?x.touches[0].clientY:x.clientY,document.addEventListener(I?"touchmove":"mousemove",he,!0),document.addEventListener(I?"touchend":"mouseup",J,!0)))}const he=ow(x=>{se.value=!0,M.x=I?x.touches[0].clientX:x.clientX,M.y=I?x.touches[0].clientY:x.clientY;const z=M.x-v.x,$=M.y-v.y;j.y=$,j.x=z},c.throttle);function J(){const x=c.dir==="rtl"?-1:1,z=Math.sign(j.x)*.4,$=Math.round(j.x/l.value+z)*x;if($&&!I){const de=Qe=>{Qe.stopPropagation(),window.removeEventListener("click",de,!0)};window.addEventListener("click",de,!0)}q(f.value-$),j.x=0,j.y=0,se.value=!1,document.removeEventListener(I?"touchmove":"mousemove",he,!0),document.removeEventListener(I?"touchend":"mouseup",J,!0)}function G(){!c.autoplay||c.autoplay<=0||(b=setInterval(()=>{c.pauseAutoplayOnHover&&U.value||me()},c.autoplay))}function ce(){b&&(clearInterval(b),b=null),G()}const W=a.ref(!1);function q(x){const z=c.wrapAround?x:Tr({val:x,max:g.value,min:y.value});f.value===z||W.value||(t("slide-start",{slidingToIndex:x,currentSlideIndex:f.value,prevSlideIndex:p.value,slidesCount:d.value}),W.value=!0,p.value=f.value,f.value=z,w=setTimeout(()=>{if(c.wrapAround){const $=Cr({val:z,max:g.value,min:0});$!==f.value&&(f.value=$,t("loop",{currentSlideIndex:f.value,slidingToIndex:x}))}t("update:modelValue",f.value),t("slide-end",{currentSlideIndex:f.value,prevSlideIndex:p.value,slidesCount:d.value}),W.value=!1,ce()},c.transition))}function me(){q(f.value+c.itemsToScroll)}function ye(){q(f.value-c.itemsToScroll)}const Ce={slideTo:q,next:me,prev:ye};a.provide("nav",Ce),a.provide("isSliding",W);const Q=a.computed(()=>rw({config:c,currentSlide:f.value,slidesCount:d.value}));a.provide("slidesToScroll",Q);const Ee=a.computed(()=>{const x=c.dir==="rtl"?-1:1,z=Q.value*l.value*x;return{transform:`translateX(${j.x-z}px)`,transition:`${W.value?c.transition:0}ms`,margin:c.wrapAround?`0 -${d.value*l.value}px`:"",width:"100%"}});function Te(){_(),C(),R(),T(),ce()}Object.keys(Vd).forEach(x=>{["modelValue"].includes(x)||a.watch(()=>s[x],Te)}),a.watch(()=>s.modelValue,x=>{x!==f.value&&q(Number(x))}),a.watch(d,R),t("before-init"),_();const Ve={config:c,slidesCount:d,slideWidth:l,next:me,prev:ye,slideTo:q,currentSlide:f,maxSlide:g,minSlide:y,middleSlide:h};n({updateBreakpointsConfigs:C,updateSlidesData:R,updateSlideWidth:T,initDefaultConfigs:_,restartCarousel:Te,slideTo:q,next:me,prev:ye,nav:Ce,data:Ve});const dt=e.default||e.slides,ut=e.addons,ht=a.reactive(Ve);return()=>{const x=$d(dt==null?void 0:dt(ht)),z=(ut==null?void 0:ut(ht))||[];x.forEach(($e,Ge)=>$e.props.index=Ge);let $=x;if(c.wrapAround){const $e=x.map((je,Re)=>a.cloneVNode(je,{index:-x.length+Re,isClone:!0,key:`clone-before-${Re}`})),Ge=x.map((je,Re)=>a.cloneVNode(je,{index:x.length+Re,isClone:!0,key:`clone-after-${Re}`}));$=[...$e,...x,...Ge]}o.value=x,d.value=Math.max(x.length,1);const de=a.h("ol",{class:"carousel__track",style:Ee.value,onMousedownCapture:c.mouseDrag?ue:null,onTouchstartPassiveCapture:c.touchDrag?ue:null},$),Qe=a.h("div",{class:"carousel__viewport"},de);return a.h("section",{ref:r,class:{carousel:!0,"is-sliding":W.value,"is-dragging":se.value,"is-hover":U.value,"carousel--rtl":c.dir==="rtl"},dir:c.dir,"aria-label":c.i18n.ariaGallery,tabindex:"0",onMouseenter:re,onMouseleave:ie},[Qe,z,a.h(dw)])}}}),Ud;(function(s){s.arrowUp="arrowUp",s.arrowDown="arrowDown",s.arrowRight="arrowRight",s.arrowLeft="arrowLeft"})(Ud||(Ud={}));var hw=a.defineComponent({name:"CarouselSlide",props:{index:{type:Number,default:1},isClone:{type:Boolean,default:!1}},setup(s,{slots:e}){const t=a.inject("config",a.reactive(Object.assign({},rt))),n=a.inject("currentSlide",a.ref(0)),i=a.inject("slidesToScroll",a.ref(0)),r=a.inject("isSliding",a.ref(!1)),o=()=>s.index===n.value,l=()=>s.index===n.value-1,d=()=>s.index===n.value+1,c=()=>{const u=Math.floor(i.value),m=Math.ceil(i.value+t.itemsToShow-1);return s.index>=u&&s.index<=m};return()=>{var u;return a.h("li",{style:{width:`${100/t.itemsToShow}%`},class:{carousel__slide:!0,"carousel__slide--clone":s.isClone,"carousel__slide--visible":c(),"carousel__slide--active":o(),"carousel__slide--prev":l(),"carousel__slide--next":d(),"carousel__slide--sliding":r.value},"aria-hidden":!c()},(u=e.default)===null||u===void 0?void 0:u.call(e))}}});const mw=(s,e)=>{const t=s.__vccOpts||s;for(const[n,i]of e)t[n]=i;return t},fw=s=>(a.pushScopeId("data-v-54620d25"),s=s(),a.popScopeId(),s),gw={class:"gsc-carousel"},pw={key:0},yw=fw(()=>a.createElementVNode("div",null,"no hay",-1)),bw=[yw],ww={class:"gsc-carousel__2d__slides"},Sw={width:"9",height:"18",viewBox:"0 0 9 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},_w=["fill"],kw={width:"9",height:"18",viewBox:"0 0 9 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Ew=["fill"],Tw={class:"gsc-carousel__2d__navigation"},Cw={width:"8",height:"15",viewBox:"0 0 8 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},xw=["stroke"],Aw={key:1,class:"gsc-carousel__2d__navigation__pagination"},Lw=["onClick"],Iw={width:"7",height:"15",viewBox:"0 0 7 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Bw=["stroke"],Rw={__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:s=>["propName","value"].every(e=>e in s)},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"},arrowsMaxWidth:{type:String,default:"20px"},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(s,{expose:e,emit:t}){const n=s;a.useCssVars(g=>({"2c72d674":s.slideLeftArrowBackgroundImage,"90a63f40":s.slidesArrowsLeftAndRight,"2627d097":s.slideRightArrowBackgroundImage,"1904d43f":s.marginTop,cfb58986:s.secondarySlidesOpacity}));const i=a.ref(null),r=a.ref({}),o=a.ref(0),l=a.ref(!1);a.watch(i,g=>{g&&l.value?(l.value=!1,d(n.items)):g&&g.slideTo&&g.slideTo(o.value)},{deep:!0}),a.watch(()=>n.currentItemIndex,g=>{o.value!==g&&f(g)}),a.watch(()=>n.defaultItemByIndex,g=>{o.value!==g&&f(g)}),a.watch(()=>n.items,g=>{i.value?d(g):l.value=!0},{immediate:!0});function d(g){g&&g.length&&i.value&&setTimeout(()=>{if(n.defaultItemByProp){const y=n.items.findIndex(b=>b[n.defaultItemByProp.propName]===n.defaultItemByProp.value);y!==-1?(o.value=y,r.value=g[y]):(o.value=0,r.value=g[0])}else o.value=n.defaultItemByIndex,r.value=g[n.defaultItemByIndex];i.value.slideTo&&i.value.slideTo(o.value),r.value&&o.value===0&&t("input",{selectedItem:r.value,selectedItemIndex:o.value})},500)}function c(){i.value&&i.value.next()}function u(){i.value&&i.value.prev()}function m(){i.value&&i.value.updateSlideWidth()}function f(g){i.value&&i.value.slideTo(g)}function p(g){i.value.slideTo(g)}function h(g){const y=g.slidingToIndex<0?n.items.length-1:g.slidingToIndex===n.items.length?0:g.slidingToIndex;o.value=y,r.value=n.items[y],t("update:currentItemIndex",y),t("input",{selectedItem:r.value,selectedItemIndex:o.value})}return e({prev:u,next:c,updateSlideWidth:m,slideTo:f}),(g,y)=>(a.openBlock(),a.createElementBlock("div",gw,[n.is3d?(a.openBlock(),a.createElementBlock("div",pw,bw)):(a.openBlock(),a.createElementBlock("div",{key:1,class:a.normalizeClass(["gsc-carousel__2d",{"main-slide-priority":s.isMainSlidePriority}])},[a.createElementVNode("div",ww,[a.createVNode(a.unref(uw),{ref_key:"carousel2d",ref:i,"items-to-show":s.itemsToShow,"wrap-around":s.wrapAround,onSlideStart:h},{default:a.withCtx(()=>[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(s.items,(b,w)=>(a.openBlock(),a.createBlock(a.unref(hw),{key:w},{default:a.withCtx(()=>[a.renderSlot(g.$slots,"default",{item:b},void 0,!0)]),_:2},1024))),128))]),_:3},8,["items-to-show","wrap-around"])]),s.areSlidesArrowsVisible&&s.items.length>1?(a.openBlock(),a.createElementBlock("div",{key:0,class:"gsc-carousel__2d__arrow-left",style:a.normalizeStyle("max-width:"+s.arrowsMaxWidth+"!important"),onClick:y[0]||(y[0]=b=>i.value.prev())},[a.createElementVNode("div",{class:a.normalizeClass(["gsc-carousel__2d__slide-button",{rounded:s.areSlidesArrowsRounded}])},[(a.openBlock(),a.createElementBlock("svg",Sw,[a.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:s.arrowsColor},null,8,_w)]))],2)],4)):a.createCommentVNode("",!0),s.areSlidesArrowsVisible&&s.items.length>1?(a.openBlock(),a.createElementBlock("div",{key:1,class:"gsc-carousel__2d__arrow-right",style:a.normalizeStyle("max-width:"+s.arrowsMaxWidth+"!important"),onClick:y[1]||(y[1]=b=>c())},[a.createElementVNode("div",{class:a.normalizeClass(["gsc-carousel__2d__slide-button",{rounded:s.areSlidesArrowsRounded}])},[(a.openBlock(),a.createElementBlock("svg",kw,[a.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:s.arrowsColor},null,8,Ew)]))],2)],4)):a.createCommentVNode("",!0),a.createElementVNode("div",Tw,[s.areNavigationArrowsVisible?(a.openBlock(),a.createElementBlock("div",{key:0,class:"gsc-carousel__2d__navigation__arrow-left",onClick:y[2]||(y[2]=b=>u())},[(a.openBlock(),a.createElementBlock("svg",Cw,[a.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:n.arrowsColor},null,8,xw)]))])):a.createCommentVNode("",!0),s.isPaginationVisible?(a.openBlock(),a.createElementBlock("div",Aw,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(s.items,(b,w)=>(a.openBlock(),a.createElementBlock("div",{key:`i-${w}`,class:"gsc-carousel__2d__navigation__pagination__item",style:a.normalizeStyle({height:`${n.navigationHeight}px`,width:`${o.value===w?n.navigationActiveWidth:n.navigationActiveWidth/2}px`,borderRadius:`${n.navigationBorderRadius}px`,backgroundColor:`${o.value===w?n.navigationActiveColor:n.navigationColor}`,transition:"all 0.1s ease-in-out"}),onClick:_=>p(w)},null,12,Lw))),128))])):a.createCommentVNode("",!0),s.areNavigationArrowsVisible?(a.openBlock(),a.createElementBlock("div",{key:2,class:"gsc-carousel__2d__navigation__arrow-right",onClick:y[3]||(y[3]=b=>i.value.next())},[(a.openBlock(),a.createElementBlock("svg",Iw,[a.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:n.arrowsColor},null,8,Bw)]))])):a.createCommentVNode("",!0)])],2))]))}},vw=mw(Rw,[["__scopeId","data-v-54620d25"]]),Nw=(s,e)=>{const t=s.__vccOpts||s;for(const[n,i]of e)t[n]=i;return t},xr={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(s){this.status=s}}},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(s){this.$emit("click",s),this.typeOnOff&&(this.status=!this.status,this.$emit("status",this.status))}}},zd=()=>{a.useCssVars(s=>({"1c960139":s.height,b2f635d8:s.borderWidthBtn,"06e99898":s.borderType,"55555c76":s.borderColor,"23b6d320":s.borderRadius,"22c97374":s.width,"22bb09fa":s.backgroundColor,c148da7c:s.cursorType,cce756fc:s.fontSize,cff98d60:s.fontStyle,"5123b3a5":s.fontFamily,"47bf58db":s.marginLeftStat,cadc8414:s.fontSizeStat}))},Gd=xr.setup;xr.setup=Gd?(s,e)=>(zd(),Gd(s,e)):zd;const Dw=s=>(a.pushScopeId("data-v-fb269a1e"),s=s(),a.popScopeId(),s),Pw=["src"],Ow={key:1,class:"text"},Fw=["src"],Mw={class:"stats"},Vw=Dw(()=>a.createElementVNode("img",{class:"iconstats",src:"https://az755631.vo.msecnd.net/todoelfut/playdes.png"},null,-1)),$w={class:"numstats"},Uw={class:"leyend"};function zw(s,e,t,n,i,r){return a.openBlock(),a.createElementBlock("div",null,[t.type==0?(a.openBlock(),a.createElementBlock("div",{key:0,class:a.normalizeClass(["button",i.status&&t.typeOnOff&&"button-active"]),style:a.normalizeStyle([r.customStyle,i.status&&t.typeOnOff&&r.customActive]),onClick:e[0]||(e[0]=(...o)=>r.btnClick&&r.btnClick(...o))},[t.icon&&t.iconPosition.toLowerCase()==="left"?(a.openBlock(),a.createElementBlock("img",{key:0,class:"icon",style:a.normalizeStyle({width:t.iconSize}),src:t.icon},null,12,Pw)):a.createCommentVNode("",!0),t.textValue?(a.openBlock(),a.createElementBlock("div",Ow,a.toDisplayString(t.textValue),1)):a.createCommentVNode("",!0),t.icon&&t.iconPosition.toLowerCase()==="right"?(a.openBlock(),a.createElementBlock("img",{key:2,class:"icon",style:a.normalizeStyle({width:t.iconSize}),src:t.icon},null,12,Fw)):a.createCommentVNode("",!0)],6)):a.createCommentVNode("",!0),t.type==1?(a.openBlock(),a.createElementBlock("div",{key:1,class:"button-target",onClick:e[1]||(e[1]=(...o)=>r.btnClick&&r.btnClick(...o))},[a.createElementVNode("div",Mw,[Vw,a.createElementVNode("div",$w,a.toDisplayString(t.textStat),1)]),a.createElementVNode("div",Uw,a.toDisplayString(t.textCategory),1)])):a.createCommentVNode("",!0)])}const Gw=Nw(xr,[["render",zw],["__scopeId","data-v-fb269a1e"]]),jw={class:"gsc-dropdown__main-container__item-selected"},Hw=["height","width"],Ww=["stroke"],Kw={class:"gsc-dropdown__items-container"},qw=["onClick"],Yw={key:0,class:"gsc-dropdown__items-footer"},Jw={__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(s){return["solid","dotted","dashed"].includes(s)}},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:s=>["propName","value"].every(e=>e in s)},listBackgroundColor:{type:String,default:"white"},hoverBackgroundColor:{type:String,default:"#f1f1f1"},listMarginTop:{type:String,default:"0"},listContainerPadding:{type:String,default:"0"},listItemPadding:{type:String,default:"10px 12px"},listItemMargin:{type:String,default:"0"},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},listItemBorderRadius:{type:String,default:"0"},listAlignment:{type:String,default:"left"},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(s,{emit:e}){const t=s,n=a.ref({}),i=a.ref(null),r=a.ref(t.isMultipleOption?-1:0),o=a.ref(!1);a.watch(()=>t.items,(p,h)=>{if(!t.modelValue&&(!t.onlyFirstTime||!h||!h.length)&&p&&p.length){if(t.defaultItemByProp){const g=t.items.findIndex(y=>y[t.defaultItemByProp.propName]===t.defaultItemByProp.value);g!==-1?(r.value=g,n.value=p[g]):(r.value=0,n.value=p[0])}else n.value=p[t.defaultItemByIndex];e("input",n.value)}},{immediate:!0}),a.watch(()=>t.modelValue,p=>{if(p){const h=t.items.findIndex(g=>typeof p=="object"?JSON.stringify(g)===JSON.stringify(p):g===p);h!==-1&&(r.value=h,n.value=t.items[h],e("update:modelValue",n.value))}},{immediate:!0});const l=a.computed(()=>({height:t.height,width:t.width,backgroundColor:t.backgroundColor,borderRadius:`${t.borderRadius}px`,border:`${t.borderType} ${t.borderWidth}px ${t.borderColor}`,color:t.color,"--hover-background-color":t.hoverBackgroundColor,"--list-container-padding":t.listContainerPadding,"--list-item-padding":t.listItemPadding,"--list-item-margin":t.listItemMargin,"--list-background-color":t.listBackgroundColor,"--list-height":t.listHeight,"--list-item-border-radius":t.listItemBorderRadius,"--list-item-selected-color":t.listItemSelectedColor,"--list-item-selected-background-color":t.listItemSelectedBackgroundColor,"--list-item-color":t.listItemColor,"--list-border-radius":`${t.listBorderRadius}`,"--list-border-color":t.listBorderColor,"--list-width":t.isListSameWidth?t.width:"fit-content","--list-border-width":`${t.listBorderWidth}px`,"--list-margin-top":t.listMarginTop,"--list-left":t.listAlignment==="left"?"0":"auto","--list-right":t.listAlignment==="right"?"0":"auto","--footer-border":`${t.footerBorderWidth}px solid ${t.footerBorderColor}`,"--dropdown-opacity":t.isDisabled?"0.5":"1","--dropdown-cursor":t.isDisabled?"not-allowed":"pointer","--dropdown-font-size":t.fontSize?t.fontSize:"14px"})),d=a.computed(()=>({height:`${t.arrowHeight}px`,width:`${t.arrowWidth}px`}));function c(){t.isDisabled||(o.value=!o.value)}function u(p){i.value&&!i.value.contains(p.target)&&(o.value=!1)}function m(p,h){t.isMultipleOption?r.value=-1:(r.value=h,o.value=!1),n.value=p,e("input",n.value),e("update:modelValue",n.value)}function f(){o.value=!1,e("click-ready")}return a.onMounted(()=>{document.addEventListener("click",u)}),a.onBeforeMount(()=>{document.removeEventListener("click",u)}),(p,h)=>(a.openBlock(),a.createElementBlock("div",{ref_key:"dropDown",ref:i,class:"gsc-dropdown",style:a.normalizeStyle(l.value)},[a.createElementVNode("div",{class:"gsc-dropdown__main-container",style:a.normalizeStyle({"padding-right":`${s.arrowWidth+8}px`}),onClick:c},[a.createElementVNode("div",jw,[a.renderSlot(p.$slots,"default",{selectedItem:n.value})]),a.createElementVNode("div",{class:a.normalizeClass(["gsc-dropdown__main-container__icon",{"rotated-180":o.value}]),style:a.normalizeStyle(d.value)},[(a.openBlock(),a.createElementBlock("svg",{height:s.arrowHeight,width:s.arrowWidth,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[a.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:s.arrowColor},null,8,Ww)],8,Hw))],6)],4),a.createVNode(a.Transition,null,{default:a.withCtx(()=>[a.withDirectives(a.createElementVNode("div",Kw,[a.createElementVNode("div",null,[a.createElementVNode("div",{class:"gsc-dropdown__items",style:a.normalizeStyle({"margin-top":`${t.borderWidth}px`})},[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(s.items,(g,y)=>(a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass(["gsc-dropdown__items__item",{selected:y===r.value}]),key:y,onClick:b=>m(g,y)},[a.renderSlot(p.$slots,"availableItem",{item:g})],10,qw))),128))],4),s.isFooterVisible?(a.openBlock(),a.createElementBlock("div",Yw,[a.createVNode(a.unref(Gw),{"text-value":"Listo","border-color":"#cbee6b","font-size":"12px",width:"72px",height:"22px","border-radius":"62px","border-width":.8,onClick:f})])):a.createCommentVNode("",!0)])],512),[[a.vShow,o.value]])]),_:3})],4))}},Xw=(s,e)=>{const t=s.__vccOpts||s;for(const[n,i]of e)t[n]=i;return t},Zw={class:"tournament-select__selected-tournament"},Qw={class:"tournament-select__selected-tournament__logo"},eS=["src"],tS={class:"tournament-select__selected-tournament__name"},sS="https://kefloixzy1.execute-api.us-west-2.amazonaws.com/prod/gs3/tournaments",nS={__name:"GSCTournamentSelect",props:{apiUrl:{type:String,default:"https://kefloixzy1.execute-api.us-west-2.amazonaws.com/prod/gs3/tournaments"},fontFamily:{type:String,default:"Poppins-Light"},logosUrl:{type:String,default:"https://golstatsimages.blob.core.windows.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(s){return["solid","dotted","dashed"].includes(s)}},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:s=>["propName","value"].every(e=>e in s)},currentSeasonId:{type:Number,default:0},tournamentsIdsToInclude:{type:Set,default:()=>new Set}},emits:["input","change-tournaments"],setup(s,{emit:e}){const t=s,n=a.ref([]),i=a.computed(()=>{const p={};return t.fontFamily&&(p["font-family"]=`${t.fontFamily}`),p}),r=a.computed(()=>t.tournamentsIdsToInclude.size?d(n.value):n.value),o=a.computed(()=>r.value.find(p=>p.seasonsIds.has(t.currentSeasonId))||r.value[0]);async function l(){try{if(t.items&&t.items.length)n.value=[...t.items];else{const p=await u();e("change-tournaments",p),n.value=p.map(h=>({...h.tournament,seasons:h.seasons,seasonsIds:h.seasons.reduce((g,y)=>(g.add(y.id),g),new Set)})).sort((h,g)=>h.order-g.order)}}catch(p){throw new Error(p)}}function d(p){return p.filter(h=>t.tournamentsIdsToInclude.has(h.id))}function c(p){const h=new XMLHttpRequest,g=`${t.logosUrl}${p}.${t.logoFileType}`;return h.open("HEAD",g,!1),h.send(),h.status!==404}async function u(){try{return(await fetch(t.apiUrl||sS)).json()}catch(p){return Promise.reject(p)}}function m(p){e("input",p)}function f(p){e("input",p)}return a.onMounted(()=>{l()}),(p,h)=>(a.openBlock(),a.createElementBlock("div",{class:"tournament-select",style:a.normalizeStyle(i.value)},[a.createVNode(a.unref(Jw),a.mergeProps(t,{"model-value":o.value,items:r.value,onInput:m,"onUpdate:modelValue":f}),{default:a.withCtx(({selectedItem:g})=>[a.createElementVNode("div",Zw,[a.createElementVNode("div",Qw,[c(g.id)?(a.openBlock(),a.createElementBlock("img",{key:0,src:`${t.logosUrl}${g.id}.${t.logoFileType}`,alt:""},null,8,eS)):a.createCommentVNode("",!0)]),a.createElementVNode("div",tS,a.toDisplayString(g.name),1)])]),availableItem:a.withCtx(({item:g})=>[a.createElementVNode("div",null,a.toDisplayString(g.name),1)]),_:1},16,["model-value","items"])],4))}},aS=Xw(nS,[["__scopeId","data-v-5c8e9511"]]),iS=(s,e)=>{const t=s.__vccOpts||s;for(const[n,i]of e)t[n]=i;return t},Ar={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(s){this.status=s}}},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(s){this.$emit("click",s),this.typeOnOff&&(this.status=!this.status,this.$emit("status",this.status))}}},jd=()=>{a.useCssVars(s=>({"1c960139":s.height,b2f635d8:s.borderWidthBtn,"06e99898":s.borderType,"55555c76":s.borderColor,"23b6d320":s.borderRadius,"22c97374":s.width,"22bb09fa":s.backgroundColor,c148da7c:s.cursorType,cce756fc:s.fontSize,cff98d60:s.fontStyle,"5123b3a5":s.fontFamily,"47bf58db":s.marginLeftStat,cadc8414:s.fontSizeStat}))},Hd=Ar.setup;Ar.setup=Hd?(s,e)=>(jd(),Hd(s,e)):jd;const rS=s=>(a.pushScopeId("data-v-fb269a1e"),s=s(),a.popScopeId(),s),oS=["src"],lS={key:1,class:"text"},cS=["src"],dS={class:"stats"},uS=rS(()=>a.createElementVNode("img",{class:"iconstats",src:"https://az755631.vo.msecnd.net/todoelfut/playdes.png"},null,-1)),hS={class:"numstats"},mS={class:"leyend"};function fS(s,e,t,n,i,r){return a.openBlock(),a.createElementBlock("div",null,[t.type==0?(a.openBlock(),a.createElementBlock("div",{key:0,class:a.normalizeClass(["button",i.status&&t.typeOnOff&&"button-active"]),style:a.normalizeStyle([r.customStyle,i.status&&t.typeOnOff&&r.customActive]),onClick:e[0]||(e[0]=(...o)=>r.btnClick&&r.btnClick(...o))},[t.icon&&t.iconPosition.toLowerCase()==="left"?(a.openBlock(),a.createElementBlock("img",{key:0,class:"icon",style:a.normalizeStyle({width:t.iconSize}),src:t.icon},null,12,oS)):a.createCommentVNode("",!0),t.textValue?(a.openBlock(),a.createElementBlock("div",lS,a.toDisplayString(t.textValue),1)):a.createCommentVNode("",!0),t.icon&&t.iconPosition.toLowerCase()==="right"?(a.openBlock(),a.createElementBlock("img",{key:2,class:"icon",style:a.normalizeStyle({width:t.iconSize}),src:t.icon},null,12,cS)):a.createCommentVNode("",!0)],6)):a.createCommentVNode("",!0),t.type==1?(a.openBlock(),a.createElementBlock("div",{key:1,class:"button-target",onClick:e[1]||(e[1]=(...o)=>r.btnClick&&r.btnClick(...o))},[a.createElementVNode("div",dS,[uS,a.createElementVNode("div",hS,a.toDisplayString(t.textStat),1)]),a.createElementVNode("div",mS,a.toDisplayString(t.textCategory),1)])):a.createCommentVNode("",!0)])}const gS=iS(Ar,[["render",fS],["__scopeId","data-v-fb269a1e"]]),pS={class:"gsc-dropdown__main-container__item-selected"},yS=["height","width"],bS=["stroke"],wS={class:"gsc-dropdown__items-container"},SS=["onClick"],_S={key:0,class:"gsc-dropdown__items-footer"},kS={__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(s){return["solid","dotted","dashed"].includes(s)}},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:s=>["propName","value"].every(e=>e in s)},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(s,{emit:e}){const t=s,n=a.ref({}),i=a.ref(null),r=a.ref(t.isMultipleOption?-1:0),o=a.ref(!1);a.watch(()=>t.items,(p,h)=>{if(!t.modelValue&&(!t.onlyFirstTime||!h||!h.length)&&p&&p.length){if(t.defaultItemByProp){const g=t.items.findIndex(y=>y[t.defaultItemByProp.propName]===t.defaultItemByProp.value);g!==-1?(r.value=g,n.value=p[g]):(r.value=0,n.value=p[0])}else n.value=p[t.defaultItemByIndex];e("input",n.value)}},{immediate:!0}),a.watch(()=>t.modelValue,p=>{if(p){const h=t.items.findIndex(g=>typeof p=="object"?JSON.stringify(g)===JSON.stringify(p):g===p);h!==-1&&(r.value=h,n.value=t.items[h],e("update:modelValue",n.value))}},{immediate:!0});const l=a.computed(()=>({height:t.height,width:t.width,backgroundColor:t.backgroundColor,borderRadius:`${t.borderRadius}px`,border:`${t.borderType} ${t.borderWidth}px ${t.borderColor}`,color:t.color,"--hover-background-color":t.hoverBackgroundColor,"--list-item-padding":t.listItemPadding,"--list-background-color":t.listBackgroundColor,"--list-height":t.listHeight,"--list-item-selected-color":t.listItemSelectedColor,"--list-item-selected-background-color":t.listItemSelectedBackgroundColor,"--list-item-color":t.listItemColor,"--list-border-radius":`${t.listBorderRadius}`,"--list-border-color":t.listBorderColor,"--list-width":t.isListSameWidth?t.width:"fit-content","--list-border-width":`${t.listBorderWidth}px`,"--footer-border":`${t.footerBorderWidth}px solid ${t.footerBorderColor}`,"--dropdown-opacity":t.isDisabled?"0.5":"1","--dropdown-cursor":t.isDisabled?"not-allowed":"pointer","--dropdown-font-size":t.fontSize?t.fontSize:"14px"})),d=a.computed(()=>({height:`${t.arrowHeight}px`,width:`${t.arrowWidth}px`}));function c(){t.isDisabled||(o.value=!o.value)}function u(p){i.value&&!i.value.contains(p.target)&&(o.value=!1)}function m(p,h){t.isMultipleOption?r.value=-1:(r.value=h,o.value=!1),n.value=p,e("input",n.value),e("update:modelValue",n.value)}function f(){o.value=!1,e("click-ready")}return a.onMounted(()=>{document.addEventListener("click",u)}),a.onBeforeMount(()=>{document.removeEventListener("click",u)}),(p,h)=>(a.openBlock(),a.createElementBlock("div",{ref_key:"dropDown",ref:i,class:"gsc-dropdown",style:a.normalizeStyle(l.value)},[a.createElementVNode("div",{class:"gsc-dropdown__main-container",style:a.normalizeStyle({"padding-right":`${s.arrowWidth+8}px`}),onClick:c},[a.createElementVNode("div",pS,[a.renderSlot(p.$slots,"default",{selectedItem:n.value})]),a.createElementVNode("div",{class:a.normalizeClass(["gsc-dropdown__main-container__icon",{"rotated-180":o.value}]),style:a.normalizeStyle(d.value)},[(a.openBlock(),a.createElementBlock("svg",{height:s.arrowHeight,width:s.arrowWidth,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[a.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:s.arrowColor},null,8,bS)],8,yS))],6)],4),a.createVNode(a.Transition,null,{default:a.withCtx(()=>[a.withDirectives(a.createElementVNode("div",wS,[a.createElementVNode("div",null,[a.createElementVNode("div",{class:"gsc-dropdown__items",style:a.normalizeStyle({"margin-top":`${t.borderWidth}px`})},[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(s.items,(g,y)=>(a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass(["gsc-dropdown__items__item",{selected:y===r.value}]),key:y,onClick:b=>m(g,y)},[a.renderSlot(p.$slots,"availableItem",{item:g})],10,SS))),128))],4),s.isFooterVisible?(a.openBlock(),a.createElementBlock("div",_S,[a.createVNode(a.unref(gS),{"text-value":"Listo","border-color":"#cbee6b","font-size":"12px",width:"72px",height:"22px","border-radius":"62px","border-width":.8,onClick:f})])):a.createCommentVNode("",!0)])],512),[[a.vShow,o.value]])]),_:3})],4))}},ES=(s,e)=>{const t=s.__vccOpts||s;for(const[n,i]of e)t[n]=i;return t},TS={class:"season-name"},CS={class:"items-list-season"},xS={__name:"GSC-SeasonSelect",props:{seasons:{type:Array,default:()=>[]},currentSeasonId:{type:Number,default:0}},emits:["input"],setup(s,{emit:e}){const t=s,n=a.computed(()=>t.seasons.find(o=>o.id===t.currentSeasonId));function i(o){e("input",o)}function r(o){e("input",o)}return(o,l)=>(a.openBlock(),a.createBlock(a.unref(kS),{items:s.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:r,"onUpdate:modelValue":i},{default:a.withCtx(({selectedItem:d})=>[a.createElementVNode("div",TS,[a.createElementVNode("span",null,a.toDisplayString(d.name),1)])]),availableItem:a.withCtx(({item:d})=>[a.createElementVNode("span",CS,a.toDisplayString(d.name),1)]),_:1},8,["items","model-value"]))}},AS=ES(xS,[["__scopeId","data-v-81bba1d4"]]);function LS(s){const e=a.ref({width:0,height:0});function t(){const n=s.value.getBoundingClientRect();e.value.width=n.width,e.value.height=n.height}return a.onMounted(()=>{t(),window.addEventListener("resize",t)}),a.onUnmounted(()=>{window.removeEventListener("resize",t)}),{elementSize:e}}const IS=(s,e)=>{const t=s.__vccOpts||s;for(const[n,i]of e)t[n]=i;return t},Lr={name:"ScrollableContainer",props:{backgroundColor:{type:String,default:"#0D1D29"},pxScroll:{type:Number,default:100},arrows:{type:Boolean,default:!0},arrowsHideOnNoScroll:{type:Boolean,default:!1},arrowsScrollHide:{type:Boolean,default:!1},arrowsColor:{type:String,default:"#CBEE6B"},arrowsHeight:{type:Number,default:15},arrowsWidth:{type:Number,default:15},arrowsPadding:{type:Number,default:5},arrowsMargin:{type:Number,default:10},arrowsRadius:{type:String,default:"0%"},arrowsBorder:{type:String,default:"none"},arrowsBackground:{type:String,default:"#0D1D29"},arrowsContainerBgL:{type:String,default:"#0D1D29"},arrowsContainerBgR:{type:String,default:"#0D1D29"},scrollColor:{type:String,default:"#c3e569"},arrowsPosition:{type:String,default:"relative"},height:{type:String,default:"100%"}},data(){return{showLeftArrow:!1,showRightArrow:!0,intervalid1:""}},mounted(){this.getScroll(),this.arrowsHideOnNoScroll&&window.addEventListener("resize",this.resizeSlider),this.arrowsHideOnNoScroll&&this.listenerLoad()},beforeUnmount(){this.arrowsHideOnNoScroll&&window.removeEventListener("resize",this.resizeSlider),this.arrowsHideOnNoScroll&&clearInterval(this.intervalid1)},computed:{getViewBox(){return`-2 0 ${this.arrowsWidth} ${this.arrowsHeight}`},hideShowLeftArrow(){let s="";return this.arrowsPosition=="absolute"?s="leftAbsolute":s="leftRelative",this.arrowsScrollHide?this.showLeftArrow?s+=" showArrowSlide":s+=" hideArrowSlide":s+=" showArrowSlide",s},hideShowRightArrow(){let s="";return this.arrowsPosition=="absolute"?s="rightAbsolute":s="rightRelative",this.arrowsScrollHide?this.showRightArrow?s+=" showArrowSlide":s+=" hideArrowSlide":s+=" showArrowSlide",s}},methods:{scrollLeft(){this.$refs.content.scrollLeft-=this.pxScroll},scrollRight(){this.$refs.content.scrollLeft+=this.pxScroll},getScroll(){let s=0;this.arrowsPosition=="relative"?s=this.$refs.content.scrollWidth-this.$el.clientWidth+this.arrowsMargin*2+this.arrowsWidth*4:s=this.$refs.content.scrollWidth-this.$el.clientWidth,this.$refs.content.scrollLeft==0?this.showLeftArrow=!1:this.showLeftArrow=!0,s>0&&(this.$refs.content.scrollLeft==s?this.showRightArrow=!1:this.showRightArrow=!0),this.arrowsHideOnNoScroll&&this.$refs.content.clientWidth===this.$refs.content.scrollWidth&&(this.showRightArrow=!1)},resizeSlider(){this.getScroll();let s;clearTimeout(s),s=setTimeout(this.getScroll,1e3)},listenerLoad(){this.intervalid1=setInterval((function(){var s=this.$el.clientWidth,e=this.$refs.content.scrollWidth;e>0&&s>0&&(e>s?(this.showRightArrow=!0,clearInterval(this.intervalid1)):clearInterval(this.intervalid1))}).bind(this),3e3)}}},Wd=()=>{a.useCssVars(s=>({"42d3dba6":s.backgroundColor,"4de5d2cf":s.height,"67bafa7b":s.arrowsPosition,"61e1032e":s.arrowsPadding+"px","79a4ac00":s.arrowsBackground,"6b8355c6":s.arrowsHeight*2+"px","29a58368":s.arrowsWidth*2+"px","3622fa64":s.arrowsRadius,"1ba101fe":s.arrowsBorder,"0bafb5e6":s.arrowsMargin+"px","423a44b8":s.arrowsContainerBgL,"423a44be":s.arrowsContainerBgR,"10b117ee":s.scrollColor}))},Kd=Lr.setup;Lr.setup=Kd?(s,e)=>(Wd(),Kd(s,e)):Wd;const BS={ref:"gscScrollableContainer",class:"scrollable-container"},RS={class:"scrollable-arrows"},vS=["width","height","viewBox"],NS=["stroke"],DS={class:"scrollable-wrapper"},PS={class:"scrollable-arrows"},OS=["width","height","viewBox"],FS=["stroke"];function MS(s,e,t,n,i,r){return a.openBlock(),a.createElementBlock("div",BS,[t.arrows?(a.openBlock(),a.createElementBlock("div",{key:0,class:a.normalizeClass(["arrows-container",r.hideShowLeftArrow]),onClick:e[0]||(e[0]=(...o)=>r.scrollLeft&&r.scrollLeft(...o))},[a.createElementVNode("div",RS,[(a.openBlock(),a.createElementBlock("svg",{width:t.arrowsWidth,height:t.arrowsHeight,viewBox:r.getViewBox,fill:"none",xmlns:"http://www.w3.org/2000/svg"},[a.createElementVNode("path",{d:"M6.36523 13.788L1.10146 8.52429C0.479824 7.90265 0.479824 6.88541 1.10147 6.26377L6.36523 1",stroke:t.arrowsColor},null,8,NS)],8,vS))])],2)):a.createCommentVNode("",!0),a.createElementVNode("div",{class:"scrollable-content scrollable-content-slider",ref:"content",onScroll:e[1]||(e[1]=(...o)=>r.getScroll&&r.getScroll(...o))},[a.createElementVNode("div",DS,[a.renderSlot(s.$slots,"default",{},void 0,!0)])],544),t.arrows?(a.openBlock(),a.createElementBlock("div",{key:1,id:"arrows-container-right",class:a.normalizeClass(["arrows-container",r.hideShowRightArrow]),onClick:e[2]||(e[2]=(...o)=>r.scrollRight&&r.scrollRight(...o))},[a.createElementVNode("div",PS,[(a.openBlock(),a.createElementBlock("svg",{width:t.arrowsWidth,height:t.arrowsHeight,viewBox:r.getViewBox,fill:"none",xmlns:"http://www.w3.org/2000/svg"},[a.createElementVNode("path",{d:"M0.634765 1.21195L5.89853 6.47571C6.52018 7.09735 6.52018 8.11459 5.89853 8.73623L0.634766 14",stroke:t.arrowsColor},null,8,FS)],8,OS))])],2)):a.createCommentVNode("",!0)],512)}const VS=IS(Lr,[["render",MS],["__scopeId","data-v-b548a08d"]]),$S=(s,e)=>{const t=s.__vccOpts||s;for(const[n,i]of e)t[n]=i;return t},Ir={components:{GSCSlider:VS},props:{arrow:{type:Boolean,required:!0},buttons:{type:Array,required:!0},width:{type:String,default:"300px"},height:{type:String,default:"80px"},fontSize:{type:String,default:"16px"},colorFont:{type:String,default:"#ffffff"},backgroundOptionActive:{type:String,default:"#0d1d29"},colorOptionActive:{type:String,default:"#cbee6b"},colorOptionDisable:{type:String,default:"gray"},backgroundOptionDisable:{type:String,default:"#0d1d29"},fontFamily:{type:String,default:"Poppins-Semibold"},borderWidth:{type:String,default:"3px"},borderRadius:{type:String,default:"0px"},selectedOption:{type:String,default:""},type:{type:Number,default:0},borderWidthContainer:{type:String,default:"1px"},background:{type:String,default:"#0d1d29"},borderColorContainer:{type:String,default:"#505355"},pxScroll:{type:Number,default:100},scrollColor:{type:String,default:"#c3e569"},arrowsPosition:{type:String,default:"relative"},arrowsScrollHide:{type:Boolean,default:!1},arrowsBackground:{type:String,default:"#0D1D29"},arrowsContainerBgL:{type:String,default:"#0D1D29"},arrowsContainerBgR:{type:String,default:"#0D1D29"},arrowsMargin:{type:Number,default:10},arrowsRadius:{type:String,default:"0%"},arrowsBorder:{type:String,default:"none"}},setup(){const s=a.ref("myDivRef"),{elementSize:e}=LS(s);return{myDivRef:s,elementSize:e}},methods:{clickEmitEvent(s){this.$emit("input",s)},customGrid(s){var e={};return s.width>768?e={fontSize:"16px"}:s.width>480?e={fontSize:"14px"}:e={fontSize:"12px"},e}}},qd=()=>{a.useCssVars(s=>({cff4a118:s.fontSize,"42aab7f6":s.borderWidth,d29bcbd2:s.fontFamily,df6c5a9c:s.background,"09b32862":s.borderRadius,"8c0d6daa":s.borderWidthContainer,e8a86fa4:s.borderColorContainer,"179494da":s.colorOptionActive,cea5647c:s.width}))},Yd=Ir.setup;Ir.setup=Yd?(s,e)=>(qd(),Yd(s,e)):qd;const US={ref:"myDivRef"},zS={key:0,class:"gs-switch-container"},GS=["onClick"],jS={key:1,class:"gs-switch-container-type"},HS=["onClick"],WS={key:2,class:"gs-switch-container-carousel"},KS=["onClick"];function qS(s,e,t,n,i,r){const o=a.resolveComponent("GSCSlider");return a.openBlock(),a.createElementBlock("div",US,[t.type==0?(a.openBlock(),a.createElementBlock("div",zS,[a.createElementVNode("div",{class:"gs-switch-container__control",style:a.normalizeStyle([r.customGrid(n.elementSize)])},[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(t.buttons,(l,d)=>(a.openBlock(),a.createElementBlock("div",{class:"gs-switch-container__control__button-option",style:a.normalizeStyle([{height:t.height},t.selectedOption==l?{borderColor:t.colorOptionActive,color:t.colorFont+"!important",background:t.backgroundOptionActive}:{borderColor:t.colorOptionDisable,color:"grey !important"}]),key:d,onClick:c=>(t.selectedOption=l,r.clickEmitEvent(l))},a.toDisplayString(l),13,GS))),128))],4),a.renderSlot(s.$slots,t.selectedOption,{},void 0,!0)])):a.createCommentVNode("",!0),t.type==1?(a.openBlock(),a.createElementBlock("div",jS,[a.createElementVNode("div",{class:"gs-switch-container-type__control",style:a.normalizeStyle([r.customGrid(n.elementSize)])},[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(t.buttons,(l,d)=>(a.openBlock(),a.createElementBlock("div",{class:"gs-switch-container-type__control__button-option-type",style:a.normalizeStyle([{height:t.height},t.selectedOption==l?{borderColor:t.colorOptionActive,color:t.colorFont+"!important",background:t.backgroundOptionActive}:{borderColor:t.colorOptionDisable,borderWidth:"0px",borderWidth:"0px !important",color:"grey !important",background:t.backgroundOptionDisable}]),key:d,onClick:c=>(t.selectedOption=l,r.clickEmitEvent(l))},a.toDisplayString(l),13,HS))),128))],4)])):a.createCommentVNode("",!0),t.type==2?(a.openBlock(),a.createElementBlock("div",WS,[a.createVNode(o,{arrows:t.arrow,"background-color":t.background,"px-scroll":t.pxScroll,"scroll-color":t.scrollColor,"arrows-position":t.arrowsPosition,arrowsScrollHide:t.arrowsScrollHide,"arrows-background":t.arrowsBackground,"arrows-container-bg-l":t.arrowsContainerBgL,"arrows-container-bg-r":t.arrowsContainerBgR,"arrows-margin":t.arrowsMargin,"arrows-radius":t.arrowsRadius,"arrows-border":t.arrowsBorder},{default:a.withCtx(()=>[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(t.buttons,(l,d)=>(a.openBlock(),a.createElementBlock("div",{class:"button-option-multi",style:a.normalizeStyle([{height:t.height},t.selectedOption==l?{borderColor:t.colorOptionActive,color:t.colorFont+"!important",background:t.backgroundOptionActive}:{borderColor:t.colorOptionDisable,color:"grey !important"}]),key:d,onClick:c=>(t.selectedOption=l,r.clickEmitEvent(l))},a.toDisplayString(l),13,KS))),128))]),_:1},8,["arrows","background-color","px-scroll","scroll-color","arrows-position","arrowsScrollHide","arrows-background","arrows-container-bg-l","arrows-container-bg-r","arrows-margin","arrows-radius","arrows-border"])])):a.createCommentVNode("",!0)],512)}const YS=$S(Ir,[["render",qS],["__scopeId","data-v-8a86dfaf"]]),Jd=(s,e)=>{const t=s.__vccOpts||s;for(const[n,i]of e)t[n]=i;return t},JS={components:{},props:{tournamentId:{type:Number,default:0},seasonId:{type:Number,default:0},widthComponent:{type:Number,default:0}},data(){},computed:{},methods:{}},Xd=s=>(a.pushScopeId("data-v-69900788"),s=s(),a.popScopeId(),s),XS={class:"container-img"},ZS=Xd(()=>a.createElementVNode("div",{class:"sep-playoff-top"},null,-1)),QS=Xd(()=>a.createElementVNode("div",{class:"sep-playoff-home"},null,-1));function e_(s,e,t,n,i,r){return a.openBlock(),a.createElementBlock("div",XS,[ZS,t.widthComponent>=1100?(a.openBlock(),a.createElementBlock("div",{key:0,class:"img-container-playoff-home",style:a.normalizeStyle(`background-image: url('https://golstatsimages.blob.core.windows.net/todoelfut/brackets_1010_${t.seasonId}.png?r=${Math.floor(Math.random()*1e4+1)}'); width: calc(100% - 65px); height: calc(850px - 50px);`)},null,4)):t.widthComponent>=985&&t.widthComponent<1100?(a.openBlock(),a.createElementBlock("div",{key:1,class:"img-container-playoff-home",style:a.normalizeStyle(`background-image: url('https://golstatsimages.blob.core.windows.net/todoelfut/brackets_429_${t.seasonId}.png?r=${Math.floor(Math.random()*1e4+1)}'); width: calc(100% - 80px); height: calc(760px - 50px);`)},null,4)):t.widthComponent>=915&&t.widthComponent<985?(a.openBlock(),a.createElementBlock("div",{key:2,class:"img-container-playoff-home",style:a.normalizeStyle(`background-image: url('https://golstatsimages.blob.core.windows.net/todoelfut/brackets_1010_${t.seasonId}.png?r=${Math.floor(Math.random()*1e4+1)}'); width: calc(100% - 80px); height: calc(740px - 90px);`)},null,4)):t.widthComponent>=855&&t.widthComponent<915?(a.openBlock(),a.createElementBlock("div",{key:3,class:"img-container-playoff-home",style:a.normalizeStyle(`background-image: url('https://golstatsimages.blob.core.windows.net/todoelfut/brackets_429_${t.seasonId}.png?r=${Math.floor(Math.random()*1e4+1)}'); width: calc(100% - 80px); height: calc(720px - 110px);`)},null,4)):t.widthComponent>=740&&t.widthComponent<855?(a.openBlock(),a.createElementBlock("div",{key:4,class:"img-container-playoff-home",style:a.normalizeStyle(`background-image: url('https://golstatsimages.blob.core.windows.net/todoelfut/brackets_429_${t.seasonId}.png?r=${Math.floor(Math.random()*1e4+1)}'); width: calc(100% - 80px); height: calc(700px - 180px);`)},null,4)):t.widthComponent>=670&&t.widthComponent<740?(a.openBlock(),a.createElementBlock("div",{key:5,class:"img-container-playoff-home",style:a.normalizeStyle(`background-image: url('https://golstatsimages.blob.core.windows.net/todoelfut/brackets_400_${t.seasonId}.png?r=${Math.floor(Math.random()*1e4+1)}'); width: calc(100% - 80px); height: calc(700px - 200px);`)},null,4)):t.widthComponent>=595&&t.widthComponent<670?(a.openBlock(),a.createElementBlock("div",{key:6,class:"img-container-playoff-home",style:a.normalizeStyle(`background-image: url('https://golstatsimages.blob.core.windows.net/todoelfut/brackets_400_${t.seasonId}.png?r=${Math.floor(Math.random()*1e4+1)}'); width: calc(100% - 50px); height: calc(700px - 240px);`)},null,4)):t.widthComponent>=545&&t.widthComponent<595?(a.openBlock(),a.createElementBlock("div",{key:7,class:"img-container-playoff-home",style:a.normalizeStyle(`background-image: url('https://golstatsimages.blob.core.windows.net/todoelfut/brackets_400_${t.seasonId}.png?r=${Math.floor(Math.random()*1e4+1)}'); width: calc(100% - 50px); height: calc(700px - 280px);`)},null,4)):t.widthComponent>=485&&t.widthComponent<545?(a.openBlock(),a.createElementBlock("div",{key:8,class:"img-container-playoff-home",style:a.normalizeStyle(`background-image: url('https://golstatsimages.blob.core.windows.net/todoelfut/brackets_400_${t.seasonId}.png?r=${Math.floor(Math.random()*1e4+1)}'); width: calc(100% - 40px); height: calc(700px - 320px);`)},null,4)):t.widthComponent>=445&&t.widthComponent<485?(a.openBlock(),a.createElementBlock("div",{key:9,class:"img-container-playoff-home",style:a.normalizeStyle(`background-image: url('https://golstatsimages.blob.core.windows.net/todoelfut/brackets_400_${t.seasonId}.png?r=${Math.floor(Math.random()*1e4+1)}'); width: calc(100% - 40px); height: calc(700px - 360px);`)},null,4)):t.widthComponent>=385&&t.widthComponent<445?(a.openBlock(),a.createElementBlock("div",{key:10,class:"img-container-playoff-home",style:a.normalizeStyle(`background-image: url('https://golstatsimages.blob.core.windows.net/todoelfut/brackets_400_${t.seasonId}.png?r=${Math.floor(Math.random()*1e4+1)}'); width: calc(100% - 40px); height: calc(700px - 410px);`)},null,4)):t.widthComponent>=350&&t.widthComponent<385?(a.openBlock(),a.createElementBlock("div",{key:11,class:"img-container-playoff-home",style:a.normalizeStyle(`background-image: url('https://golstatsimages.blob.core.windows.net/todoelfut/brackets_400_${t.seasonId}.png?r=${Math.floor(Math.random()*1e4+1)}'); width: calc(100% - 20px); height: calc(700px - 420px);`)},null,4)):t.widthComponent<350?(a.openBlock(),a.createElementBlock("div",{key:12,class:"img-container-playoff-home",style:a.normalizeStyle(`background-image: url('https://golstatsimages.blob.core.windows.net/todoelfut/brackets_400_${t.seasonId}.png?r=${Math.floor(Math.random()*1e4+1)}'); width: calc(100% - 20px); height: calc(700px - 440px);`)},null,4)):a.createCommentVNode("",!0),QS])}const t_=Jd(JS,[["render",e_],["__scopeId","data-v-69900788"]]);function s_(s){const e=a.ref({width:0,height:0});function t(){const n=s.value.getBoundingClientRect();e.value.width=n.width,e.value.height=n.height}return a.onMounted(()=>{t(),window.addEventListener("resize",t)}),a.onUnmounted(()=>{window.removeEventListener("resize",t)}),{elementSize:e}}const n_={components:{GSCFilterperteam:x1,GSCTableperteam:nw,GscSwitchComponent:YS,GSCCarousel:vw,GSCTournamentSelect:aS,GSCSeasonSelect:AS,PlayOffIMG:t_},computed:{tableOfPhases(){return this.tournamentSelected?this.tournamentSelected.tournament_type===1?"Fases":this.tournamentSelected.tournament_type===2?"Play Off":"Tabla General":"Tabla General"},customStyle(){return{backgroundColor:this.background,border:`${this.borderType} ${this.borderWidth}px ${this.borderColor}`,height:this.height}},customStyleLanding(){return{boxShadow:"0px 4px 20px 0px rgba(0, 0, 0, 0.25)",backgroundColor:this.background,border:`${this.borderType} ${this.borderWidth}px ${this.borderColor}`,height:this.height,borderRadius:"9px"}},customStyleTitle(){return{color:this.colortitle}}},props:{tournamentsApiUrl:{type:String,default:""},awaitForTournaments:{type:Boolean,default:!1},externalTournaments:{type:Array,default:()=>[]},teamsVideos:{type:Array,default:()=>[]},showVideos:{type:Boolean,default:!0},teamId:{type:Number,default:0},filtersTeams:{type:Boolean,default:!0},teamDefaultSelect:{type:Number,default:0},season:{type:Number},currentSeasonId:{type:Number,default:0},tournament:{type:Number,default:-1},awaitForSeason:{type:Boolean,default:!0},type:{type:Number,default:0},typeView:{type:Number,default:-1},teamperpage:{type:Number,default:5},background:{type:String,default:"#0d1d29"},borderRadius:{type:String,default:"8px"},borderWidth:{type:Number,default:0},borderColor:{type:String,default:"#0d1d29"},borderType:{type:String,default:"solid"},height:{type:String,default:"auto"},colortitle:{type:String,default:"#FFFFFF"},isPaginationVisible:{type:Boolean,default:!1},tournamentsIdsToInclude:{type:Set,default:()=>new Set}},setup(){const s=a.ref("myDivRef"),{elementSize:e}=s_(s);return{myDivRef:s,elementSize:e}},data(){return{url:"https://jfxv8fqkn3.execute-api.us-west-2.amazonaws.com/prod/generalTable/",tournamentsUrl:"https://kefloixzy1.execute-api.us-west-2.amazonaws.com/prod/gs3/tournaments",tournaments:[],tournamentSelected:{seasons:[]},seasonSelected:{},retries:3,typeTournament:0,tableData:null,optionSelectedGroup:"Grupos",tableFull:!0,indexMyTeam:0,flaghideShow:!0,showNum:6,seasonSelect:0,teamselect:0,arrayTournaments:[],arraySeasons:{},seasonBytournament:[],teams:[],pagesteams:[],token:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MCwibmFtZSI6IlVzdWFyaW8gRnJlZSIsInVzZXJuYW1lIjoiZnJlZUBnb2xzdGF0cy5jb20iLCJlbWFpbCI6ImZyZWVAZ29sc3RhdHMuY29tIiwiaWF0IjoxNjA2NzU4Nzk1LCJleHAiOjE2MzgyOTQ3OTV9.kPNmP7yDtk38cAXrUyc7OHRh6J25VFqy-XUNzbK-4YE",lastUrl:"",lastData:null}},watch:{teamId(){this.fillData(this.lastData)},externalTournaments:{handler(s){s.length>0&&this.fillTournamentsData(s)},immediate:!0,deep:!0},teamDefaultSelect:{async handler(s){this.teamselect=s},immediate:!0},currentSeasonId:{async handler(s,e){this.type==1&&s!==0&&s!==e&&await this.getTableList(this.currentSeasonId)},immediate:!0}},async created(){try{if(!this.awaitForTournaments){const s=await this.fetchTournaments(3);await this.fillTournamentsData(s)}}catch(s){throw new Error(s)}},methods:{changeType(s){this.optionSelectedGroup=s},setOpenMedia(s){const e={1e3:[12,55,"35_r","54_r"],1001:["57_r","326_r","56_r","60_r","59_r","55_r",35,54],0:[]},t=[1,2,3],n=e[s.category]||[39,607,608,12,55,54,35,14,52,15,53,466,477,40,257];let i={seasonId:this.seasonSelect,mainSectionType:1,playListType:s.playListType,categoryIds:n,gameIds:null,playerIds:[],teamId:s.team,matchResult:s.matchResult?[s.matchResult]:t,isRivalSubject:s.isRivalSubject,playData:{},advancedFilter:{playListTitle:s.title}};s.category!==0&&(i.advancedFilter.mainCategoryId=s.category),this.$emit("openmedia",i)},openTableProfile(s){const e={team:s,season:this.seasonSelect};this.$emit("openTableProfile",e)},async fillTournamentsData(s){try{this.tournaments=s.map(e=>({...e.tournament,seasons:e.seasons}));for(const e in s){this.arrayTournaments.push({id:s[e].tournament.id,name:s[e].tournament.name}),this.arraySeasons[s[e].tournament.id]={};for(const t in s[e].seasons)this.arraySeasons[s[e].tournament.id][" "+s[e].seasons[t].id]={},this.arraySeasons[s[e].tournament.id][" "+s[e].seasons[t].id].id=s[e].seasons[t].id,this.arraySeasons[s[e].tournament.id][" "+s[e].seasons[t].id].name=s[e].seasons[t].name}if(this.currentSeasonId===0){const e=s.find(t=>t._id===1).seasons[0];await this.getTableList(e.id)}}catch(e){return Promise.reject(e)}},clickAll(s){this.teamselect=s},clickTeam(s){this.teamselect=s},onInputTournament(s){this.typeTournament=s.tournament_type,this.tournamentSelected.id!==s.id&&(this.tournamentSelected=s)},async onInputSeason(s){this.seasonSelected!==s.id&&(this.seasonSelected=s.id,this.$emit("change-season-id",s.id),await this.getTableList(s.id))},async getTableList(s){try{const e=`${this.url}${s}`;if(this.lastUrl===e)return;this.lastUrl=e,this.seasonSelect=s;const t=vd.create({headers:{Authorization:`${this.token}`}});this.lastData=await t.get(this.lastUrl),this.fillData(this.lastData)}catch(e){return Promise.reject(e)}},fillData(s){if(this.teams=[],this.tableData=[],this.pagesteams=[],this.tournamentSelected.tournament_type===0||this.typeView===0){if(this.tableData=s.data.data,this.indexMyTeam=this.tableData.findIndex(e=>e.team_id===this.teamId),this.indexMyTeam>4){let e=[];for(let t=0;t<this.tableData.length;t++)t==4?(e.push(this.tableData[this.indexMyTeam]),e.push(this.tableData[t])):e.push(this.tableData[t]);this.tableData=e}if(this.teamperpage>0){let e=[];this.tableData.forEach((t,n)=>{e.push(t),(n+1)%this.teamperpage===0&&(this.pagesteams.push([...e]),e=[])}),e.length&&this.pagesteams.push([...e])}for(let e=0;e<this.tableData.length;e++){const t=this.teams.findIndex(n=>n.id===this.tableData[e].team_id);this.tableData[e].last_five_games=this.tableData[e].last_five_games.reverse(),t==-1&&this.teams.push({id:this.tableData[e].team_id,team:this.tableData[e].team_name,logo:this.tableData[e].team_logo})}this.teams.sort((e,t)=>{const n=e.team.toUpperCase(),i=t.team.toUpperCase();return n<i?-1:n>i?1:0})}else if(this.tournamentSelected.tournament_type==2||this.typeView==2)this.tableData=s.data.data;else if(this.tournamentSelected.tournament_type==1||this.typeView==1){this.tableData=s.data.groups;for(let e=0;e<this.tableData.length;e++)for(let t=0;t<this.tableData[e].data.length;t++)this.tableData[e].data[t].last_five_games=this.tableData[e].data[t].last_five_games.reverse(),this.teams.findIndex(n=>n.id===this.tableData[e].data[t].team_id)==-1&&this.teams.push({id:this.tableData[e].data[t].team_id,team:this.tableData[e].data[t].team_name,logo:this.tableData[e].data[t].team_logo});this.teams.sort((e,t)=>{const n=e.team.toUpperCase(),i=t.team.toUpperCase();return n<i?-1:n>i?1:0})}},async fetchTournaments(){const s=vd.create({headers:{Authorization:`${this.token}`}}),{data:e}=await s.get(this.tournamentsApiUrl||this.tournamentsUrl);return e}}},Zd=s=>(a.pushScopeId("data-v-b0518cf4"),s=s(),a.popScopeId(),s),a_={key:0,class:"gsc-generaltable__container"},i_={key:1,class:"gsc-generaltable__row-sep"},r_=Zd(()=>a.createElementVNode("div",{class:"gsc-generaltable__row-sep__line"},null,-1)),o_=[r_],l_={key:1,class:"gsc-generaltable__container"},c_={class:"header-switch-option-groups"},d_={key:1,class:"gsc-generaltable__row-sep"},u_=Zd(()=>a.createElementVNode("div",{class:"gsc-generaltable__row-sep__line"},null,-1)),h_=[u_],m_={class:"title-group"},f_={class:"row-table-carrousel"},g_={class:"group-table"},p_={class:"title-group"},y_={key:1,class:"carousel-table-landing"},b_={class:"row-table-carrousel"},w_={class:"header-switch-option-groups-home"},S_={class:"row-table-carrousel"},__={class:"group-table"},k_={class:"title-group"};function E_(s,e,t,n,i,r){const o=a.resolveComponent("GSCTournamentSelect"),l=a.resolveComponent("GSCSeasonSelect"),d=a.resolveComponent("GSCFilterperteam"),c=a.resolveComponent("GSCTableperteam"),u=a.resolveComponent("GscSwitchComponent"),m=a.resolveComponent("GSCCarousel"),f=a.resolveComponent("PlayOffIMG");return a.openBlock(),a.createElementBlock("div",{class:"gsc-generaltable",style:a.normalizeStyle(t.type==0?r.customStyle:r.customStyleLanding),ref:"myDivRef"},[t.type==0?(a.openBlock(),a.createElementBlock(a.Fragment,{key:0},[a.createElementVNode("div",{class:a.normalizeClass(["gsc-generaltable__row-toolbar",n.elementSize.width<590?"style-display":""])},[a.createElementVNode("div",{class:a.normalizeClass(["gsc-generaltable__row-toolbar__title",n.elementSize.width<768?"style-auto":""]),style:a.normalizeStyle(r.customStyleTitle)},a.toDisplayString(r.tableOfPhases),7),a.createElementVNode("div",{class:a.normalizeClass(["gsc-generaltable__row-toolbar__selectors",n.elementSize.width<768&&n.elementSize.width>590?"style-auto":n.elementSize.width<590?"width-100":""])},[a.createElementVNode("div",{class:a.normalizeClass(["gsc-generaltable__row-toolbar__selectors__tournaments",n.elementSize.width<590&&n.elementSize.width>=420?"width-50":n.elementSize.width<420?"width-30":""])},[a.createVNode(o,{"current-season-id":t.currentSeasonId,onInput:r.onInputTournament,"tournaments-ids-to-include":t.tournamentsIdsToInclude,"api-url":t.tournamentsApiUrl},null,8,["current-season-id","onInput","tournaments-ids-to-include","api-url"])],2),a.createElementVNode("div",{class:a.normalizeClass(["gsc-generaltable__row-toolbar__selectors__seasons",n.elementSize.width<590&&n.elementSize.width>=420?"width-50":n.elementSize.width<420?"width-30":""])},[a.createVNode(l,{"current-season-id":t.currentSeasonId,seasons:i.tournamentSelected.seasons,onInput:r.onInputSeason},null,8,["current-season-id","seasons","onInput"])],2)],2)],2),i.typeTournament==0?(a.openBlock(),a.createElementBlock("div",a_,[t.filtersTeams?(a.openBlock(),a.createBlock(d,{key:0,data:i.teams,"background-color":"none","contain-border-radius":"8px",onClickTeam:r.clickTeam,onClickAll:r.clickAll},null,8,["data","onClickTeam","onClickAll"])):a.createCommentVNode("",!0),t.filtersTeams?(a.openBlock(),a.createElementBlock("div",i_,o_)):a.createCommentVNode("",!0),i.tableData?(a.openBlock(!0),a.createElementBlock(a.Fragment,{key:2},a.renderList(i.tableData,(p,h)=>(a.openBlock(),a.createBlock(c,{key:h,onOpenmedia:r.setOpenMedia,onOpenTableProfile:r.openTableProfile,"is-videos":t.showVideos,"teams-videos":t.teamsVideos,isheader:h==0,"background-color":i.teamselect!=0&&i.teamselect==p.team_id?"rgba(30, 60, 81, 0.5)":h%2===0?"#172531":"#0d1d29",data:p},null,8,["onOpenmedia","onOpenTableProfile","is-videos","teams-videos","isheader","background-color","data"]))),128)):a.createCommentVNode("",!0)])):a.createCommentVNode("",!0),i.typeTournament==1?(a.openBlock(),a.createElementBlock("div",l_,[a.createElementVNode("div",c_,[a.createElementVNode("div",{class:a.normalizeClass(n.elementSize.width>880?"switch-size-group":"switch-size-group-movil")},[a.createVNode(u,{type:1,buttons:["Grupos","Play Off"],"selected-option":i.optionSelectedGroup,"border-radius":"32px",height:"28px","border-width":"1px","border-width-container":"0.5px","background-option-active":"#0d1d29","color-option-active":"#cbee6b","font-size":"12px",width:"270px",fontFamily:"Poppins-Light",onInput:r.changeType,arrowsScrollHide:!1,arrowsPosition:"absolute"},null,8,["selected-option","onInput"])],2)]),i.optionSelectedGroup=="Grupos"?(a.openBlock(),a.createElementBlock(a.Fragment,{key:0},[t.filtersTeams?(a.openBlock(),a.createBlock(d,{key:0,data:i.teams,"background-color":"none","contain-border-radius":"8px",onClickTeam:r.clickTeam,onClickAll:r.clickAll},null,8,["data","onClickTeam","onClickAll"])):a.createCommentVNode("",!0),t.filtersTeams?(a.openBlock(),a.createElementBlock("div",d_,h_)):a.createCommentVNode("",!0),n.elementSize.width>600?(a.openBlock(!0),a.createElementBlock(a.Fragment,{key:2},a.renderList(i.tableData,(p,h)=>(a.openBlock(),a.createElementBlock("div",{key:h,class:"group-table"},[a.createElementVNode("div",m_,a.toDisplayString(p.name),1),(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(p.data,(g,y)=>(a.openBlock(),a.createBlock(c,{key:y,onOpenmedia:r.setOpenMedia,onOpenTableProfile:r.openTableProfile,"is-videos":t.showVideos,"teams-videos":t.teamsVideos,isheader:y==0,"background-color":i.teamselect!=0&&i.teamselect==g.team_id?"rgba(30, 60, 81, 0.5)":y%2===0?"#172531":"#0d1d29",data:g},null,8,["onOpenmedia","onOpenTableProfile","is-videos","teams-videos","isheader","background-color","data"]))),128))]))),128)):(a.openBlock(),a.createBlock(m,{key:3,isPaginationVisible:t.isPaginationVisible,items:i.tableData},{default:a.withCtx(({item:p})=>[a.createElementVNode("div",f_,[a.createElementVNode("div",g_,[a.createElementVNode("div",p_,a.toDisplayString(p.name),1),(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(p.data,(h,g)=>(a.openBlock(),a.createBlock(c,{key:g,onOpenmedia:r.setOpenMedia,onOpenTableProfile:r.openTableProfile,"is-videos":t.showVideos,"teams-videos":t.teamsVideos,isheader:g==0,"background-color":i.teamselect!=0&&i.teamselect==h.team_id?"rgba(30, 60, 81, 0.5)":(s.index%2,"#172531"),data:h},null,8,["onOpenmedia","onOpenTableProfile","is-videos","teams-videos","isheader","background-color","data"]))),128))])])]),_:1},8,["isPaginationVisible","items"]))],64)):(a.openBlock(),a.createBlock(f,{key:1,"tournament-id":i.tournamentSelected.id,"season-id":i.seasonSelect,"width-component":n.elementSize.width},null,8,["tournament-id","season-id","width-component"]))])):a.createCommentVNode("",!0),i.typeTournament==2?(a.openBlock(),a.createBlock(f,{key:2,"tournament-id":i.tournamentSelected.id,"season-id":i.seasonSelect,"width-component":n.elementSize.width},null,8,["tournament-id","season-id","width-component"])):a.createCommentVNode("",!0)],64)):(a.openBlock(),a.createElementBlock("div",y_,[t.typeView==0?(a.openBlock(),a.createBlock(m,{key:0,isPaginationVisible:t.isPaginationVisible,items:i.pagesteams},{default:a.withCtx(({item:p})=>[a.createElementVNode("div",b_,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(p,(h,g)=>(a.openBlock(),a.createBlock(c,{key:g,onOpenmedia:r.setOpenMedia,onOpenTableProfile:r.openTableProfile,"is-games":!1,"teams-videos":t.teamsVideos,"is-videos":t.showVideos,ItemHeight:"60px",teamSelected:i.teamselect,isheader:g==0,"background-color":i.teamselect!=0&&i.teamselect==h.team_id?"rgba(30, 60, 81, 0.5)":g%2===0?"#172531":"#0d1d29",data:h},null,8,["onOpenmedia","onOpenTableProfile","teams-videos","is-videos","teamSelected","isheader","background-color","data"]))),128))])]),_:1},8,["isPaginationVisible","items"])):a.createCommentVNode("",!0),t.typeView==1?(a.openBlock(),a.createElementBlock(a.Fragment,{key:1},[a.createElementVNode("div",w_,[a.createElementVNode("div",{class:a.normalizeClass(n.elementSize.width>880?"switch-size-group":"switch-size-group-movil")},[a.createVNode(u,{type:1,buttons:["Grupos","Play Off"],"selected-option":i.optionSelectedGroup,"border-radius":"32px",height:"28px","border-width":"1px","border-width-container":"0.5px","background-option-active":"#0d1d29","color-option-active":"#cbee6b","font-size":"12px",width:"270px",fontFamily:"Poppins-Light",onInput:r.changeType,arrowsScrollHide:!1,arrowsPosition:"absolute"},null,8,["selected-option","onInput"])],2)]),i.optionSelectedGroup=="Grupos"?(a.openBlock(),a.createBlock(m,{key:0,isPaginationVisible:t.isPaginationVisible,items:i.tableData},{default:a.withCtx(({item:p})=>[a.createElementVNode("div",S_,[a.createElementVNode("div",__,[a.createElementVNode("div",k_,a.toDisplayString(p.name),1),(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(p.data,(h,g)=>(a.openBlock(),a.createBlock(c,{key:g,onOpenmedia:r.setOpenMedia,onOpenTableProfile:r.openTableProfile,"is-videos":t.showVideos,"teams-videos":t.teamsVideos,isheader:g==0,"background-color":i.teamselect!=0&&i.teamselect==h.team_id?"rgba(30, 60, 81, 0.5)":(s.index%2,"#172531"),data:h},null,8,["onOpenmedia","onOpenTableProfile","is-videos","teams-videos","isheader","background-color","data"]))),128))])])]),_:1},8,["isPaginationVisible","items"])):(a.openBlock(),a.createElementBlock(a.Fragment,{key:1},[i.tournamentSelected.id?(a.openBlock(),a.createBlock(f,{key:0,"tournament-id":i.tournamentSelected.id,"season-id":i.seasonSelect,"width-component":n.elementSize.width},null,8,["tournament-id","season-id","width-component"])):(a.openBlock(),a.createBlock(f,{key:1,"tournament-id":t.tournament,"season-id":i.seasonSelect,"width-component":n.elementSize.width},null,8,["tournament-id","season-id","width-component"]))],64))],64)):a.createCommentVNode("",!0),t.typeView==2?(a.openBlock(),a.createElementBlock(a.Fragment,{key:2},[i.tournamentSelected.id?(a.openBlock(),a.createBlock(f,{key:0,"tournament-id":i.tournamentSelected.id,"season-id":i.seasonSelect,"width-component":n.elementSize.width},null,8,["tournament-id","season-id","width-component"])):(a.openBlock(),a.createBlock(f,{key:1,"tournament-id":t.tournament,"season-id":i.seasonSelect,"width-component":n.elementSize.width},null,8,["tournament-id","season-id","width-component"]))],64)):a.createCommentVNode("",!0)]))],4)}const T_=Jd(n_,[["render",E_],["__scopeId","data-v-b0518cf4"]]);function C_(s){const e=a.ref({width:0,height:0});function t(){const n=s.value.getBoundingClientRect();e.value.width=n.width,e.value.height=n.height}return a.onMounted(()=>{t(),window.addEventListener("resize",t)}),a.onUnmounted(()=>{window.removeEventListener("resize",t)}),{elementSize:e}}const x_=(s,e)=>{const t=s.__vccOpts||s;for(const[n,i]of e)t[n]=i;return t},Br={name:"ScrollableContainer",props:{backgroundColor:{type:String,default:"#0D1D29"},pxScroll:{type:Number,default:100},arrows:{type:Boolean,default:!0},arrowsHideOnNoScroll:{type:Boolean,default:!1},arrowsScrollHide:{type:Boolean,default:!1},arrowsColor:{type:String,default:"#CBEE6B"},arrowsHeight:{type:Number,default:15},arrowsWidth:{type:Number,default:15},arrowsPadding:{type:Number,default:5},arrowsMargin:{type:Number,default:10},arrowsRadius:{type:String,default:"0%"},arrowsBorder:{type:String,default:"none"},arrowsBackground:{type:String,default:"#0D1D29"},arrowsContainerBgL:{type:String,default:"#0D1D29"},arrowsContainerBgR:{type:String,default:"#0D1D29"},scrollColor:{type:String,default:"#c3e569"},arrowsPosition:{type:String,default:"relative"},height:{type:String,default:"100%"}},data(){return{showLeftArrow:!1,showRightArrow:!0,intervalid1:""}},mounted(){this.getScroll(),this.arrowsHideOnNoScroll&&window.addEventListener("resize",this.resizeSlider),this.arrowsHideOnNoScroll&&this.listenerLoad()},beforeUnmount(){this.arrowsHideOnNoScroll&&window.removeEventListener("resize",this.resizeSlider),this.arrowsHideOnNoScroll&&clearInterval(this.intervalid1)},computed:{getViewBox(){return`-2 0 ${this.arrowsWidth} ${this.arrowsHeight}`},hideShowLeftArrow(){let s="";return this.arrowsPosition=="absolute"?s="leftAbsolute":s="leftRelative",this.arrowsScrollHide?this.showLeftArrow?s+=" showArrowSlide":s+=" hideArrowSlide":s+=" showArrowSlide",s},hideShowRightArrow(){let s="";return this.arrowsPosition=="absolute"?s="rightAbsolute":s="rightRelative",this.arrowsScrollHide?this.showRightArrow?s+=" showArrowSlide":s+=" hideArrowSlide":s+=" showArrowSlide",s}},methods:{scrollLeft(){this.$refs.content.scrollLeft-=this.pxScroll},scrollRight(){this.$refs.content.scrollLeft+=this.pxScroll},getScroll(){let s=0;this.arrowsPosition=="relative"?s=this.$refs.content.scrollWidth-this.$el.clientWidth+this.arrowsMargin*2+this.arrowsWidth*4:s=this.$refs.content.scrollWidth-this.$el.clientWidth,this.$refs.content.scrollLeft==0?this.showLeftArrow=!1:this.showLeftArrow=!0,s>0&&(this.$refs.content.scrollLeft==s?this.showRightArrow=!1:this.showRightArrow=!0),this.arrowsHideOnNoScroll&&this.$refs.content.clientWidth===this.$refs.content.scrollWidth&&(this.showRightArrow=!1)},resizeSlider(){this.getScroll();let s;clearTimeout(s),s=setTimeout(this.getScroll,1e3)},listenerLoad(){this.intervalid1=setInterval((function(){var s=this.$el.clientWidth,e=this.$refs.content.scrollWidth;e>0&&s>0&&(e>s?(this.showRightArrow=!0,clearInterval(this.intervalid1)):clearInterval(this.intervalid1))}).bind(this),3e3)}}},Qd=()=>{a.useCssVars(s=>({"42d3dba6":s.backgroundColor,"4de5d2cf":s.height,"67bafa7b":s.arrowsPosition,"61e1032e":s.arrowsPadding+"px","79a4ac00":s.arrowsBackground,"6b8355c6":s.arrowsHeight*2+"px","29a58368":s.arrowsWidth*2+"px","3622fa64":s.arrowsRadius,"1ba101fe":s.arrowsBorder,"0bafb5e6":s.arrowsMargin+"px","423a44b8":s.arrowsContainerBgL,"423a44be":s.arrowsContainerBgR,"10b117ee":s.scrollColor}))},eu=Br.setup;Br.setup=eu?(s,e)=>(Qd(),eu(s,e)):Qd;const A_={ref:"gscScrollableContainer",class:"scrollable-container"},L_={class:"scrollable-arrows"},I_=["width","height","viewBox"],B_=["stroke"],R_={class:"scrollable-wrapper"},v_={class:"scrollable-arrows"},N_=["width","height","viewBox"],D_=["stroke"];function P_(s,e,t,n,i,r){return a.openBlock(),a.createElementBlock("div",A_,[t.arrows?(a.openBlock(),a.createElementBlock("div",{key:0,class:a.normalizeClass(["arrows-container",r.hideShowLeftArrow]),onClick:e[0]||(e[0]=(...o)=>r.scrollLeft&&r.scrollLeft(...o))},[a.createElementVNode("div",L_,[(a.openBlock(),a.createElementBlock("svg",{width:t.arrowsWidth,height:t.arrowsHeight,viewBox:r.getViewBox,fill:"none",xmlns:"http://www.w3.org/2000/svg"},[a.createElementVNode("path",{d:"M6.36523 13.788L1.10146 8.52429C0.479824 7.90265 0.479824 6.88541 1.10147 6.26377L6.36523 1",stroke:t.arrowsColor},null,8,B_)],8,I_))])],2)):a.createCommentVNode("",!0),a.createElementVNode("div",{class:"scrollable-content scrollable-content-slider",ref:"content",onScroll:e[1]||(e[1]=(...o)=>r.getScroll&&r.getScroll(...o))},[a.createElementVNode("div",R_,[a.renderSlot(s.$slots,"default",{},void 0,!0)])],544),t.arrows?(a.openBlock(),a.createElementBlock("div",{key:1,id:"arrows-container-right",class:a.normalizeClass(["arrows-container",r.hideShowRightArrow]),onClick:e[2]||(e[2]=(...o)=>r.scrollRight&&r.scrollRight(...o))},[a.createElementVNode("div",v_,[(a.openBlock(),a.createElementBlock("svg",{width:t.arrowsWidth,height:t.arrowsHeight,viewBox:r.getViewBox,fill:"none",xmlns:"http://www.w3.org/2000/svg"},[a.createElementVNode("path",{d:"M0.634765 1.21195L5.89853 6.47571C6.52018 7.09735 6.52018 8.11459 5.89853 8.73623L0.634766 14",stroke:t.arrowsColor},null,8,D_)],8,N_))])],2)):a.createCommentVNode("",!0)],512)}const O_=x_(Br,[["render",P_],["__scopeId","data-v-b548a08d"]]),F_=(s,e)=>{const t=s.__vccOpts||s;for(const[n,i]of e)t[n]=i;return t},Rr={components:{GSCSlider:O_},props:{arrow:{type:Boolean,required:!0},buttons:{type:Array,required:!0},width:{type:String,default:"300px"},height:{type:String,default:"80px"},fontSize:{type:String,default:"16px"},colorFont:{type:String,default:"#ffffff"},backgroundOptionActive:{type:String,default:"#0d1d29"},colorOptionActive:{type:String,default:"#cbee6b"},colorOptionDisable:{type:String,default:"gray"},backgroundOptionDisable:{type:String,default:"#0d1d29"},fontFamily:{type:String,default:"Poppins-Semibold"},borderWidth:{type:String,default:"3px"},borderRadius:{type:String,default:"0px"},selectedOption:{type:String,default:""},type:{type:Number,default:0},borderWidthContainer:{type:String,default:"1px"},background:{type:String,default:"#0d1d29"},borderColorContainer:{type:String,default:"#505355"},pxScroll:{type:Number,default:100},scrollColor:{type:String,default:"#c3e569"},arrowsPosition:{type:String,default:"relative"},arrowsScrollHide:{type:Boolean,default:!1},arrowsBackground:{type:String,default:"#0D1D29"},arrowsContainerBgL:{type:String,default:"#0D1D29"},arrowsContainerBgR:{type:String,default:"#0D1D29"},arrowsMargin:{type:Number,default:10},arrowsRadius:{type:String,default:"0%"},arrowsBorder:{type:String,default:"none"}},setup(){const s=a.ref("myDivRef"),{elementSize:e}=C_(s);return{myDivRef:s,elementSize:e}},methods:{clickEmitEvent(s){this.$emit("input",s)},customGrid(s){var e={};return s.width>768?e={fontSize:"16px"}:s.width>480?e={fontSize:"14px"}:e={fontSize:"12px"},e}}},tu=()=>{a.useCssVars(s=>({cff4a118:s.fontSize,"42aab7f6":s.borderWidth,d29bcbd2:s.fontFamily,df6c5a9c:s.background,"09b32862":s.borderRadius,"8c0d6daa":s.borderWidthContainer,e8a86fa4:s.borderColorContainer,"179494da":s.colorOptionActive,cea5647c:s.width}))},su=Rr.setup;Rr.setup=su?(s,e)=>(tu(),su(s,e)):tu;const M_={ref:"myDivRef"},V_={key:0,class:"gs-switch-container"},$_=["onClick"],U_={key:1,class:"gs-switch-container-type"},z_=["onClick"],G_={key:2,class:"gs-switch-container-carousel"},j_=["onClick"];function H_(s,e,t,n,i,r){const o=a.resolveComponent("GSCSlider");return a.openBlock(),a.createElementBlock("div",M_,[t.type==0?(a.openBlock(),a.createElementBlock("div",V_,[a.createElementVNode("div",{class:"gs-switch-container__control",style:a.normalizeStyle([r.customGrid(n.elementSize)])},[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(t.buttons,(l,d)=>(a.openBlock(),a.createElementBlock("div",{class:"gs-switch-container__control__button-option",style:a.normalizeStyle([{height:t.height},t.selectedOption==l?{borderColor:t.colorOptionActive,color:t.colorFont+"!important",background:t.backgroundOptionActive}:{borderColor:t.colorOptionDisable,color:"grey !important"}]),key:d,onClick:c=>(t.selectedOption=l,r.clickEmitEvent(l))},a.toDisplayString(l),13,$_))),128))],4),a.renderSlot(s.$slots,t.selectedOption,{},void 0,!0)])):a.createCommentVNode("",!0),t.type==1?(a.openBlock(),a.createElementBlock("div",U_,[a.createElementVNode("div",{class:"gs-switch-container-type__control",style:a.normalizeStyle([r.customGrid(n.elementSize)])},[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(t.buttons,(l,d)=>(a.openBlock(),a.createElementBlock("div",{class:"gs-switch-container-type__control__button-option-type",style:a.normalizeStyle([{height:t.height},t.selectedOption==l?{borderColor:t.colorOptionActive,color:t.colorFont+"!important",background:t.backgroundOptionActive}:{borderColor:t.colorOptionDisable,borderWidth:"0px",borderWidth:"0px !important",color:"grey !important",background:t.backgroundOptionDisable}]),key:d,onClick:c=>(t.selectedOption=l,r.clickEmitEvent(l))},a.toDisplayString(l),13,z_))),128))],4)])):a.createCommentVNode("",!0),t.type==2?(a.openBlock(),a.createElementBlock("div",G_,[a.createVNode(o,{arrows:t.arrow,"background-color":t.background,"px-scroll":t.pxScroll,"scroll-color":t.scrollColor,"arrows-position":t.arrowsPosition,arrowsScrollHide:t.arrowsScrollHide,"arrows-background":t.arrowsBackground,"arrows-container-bg-l":t.arrowsContainerBgL,"arrows-container-bg-r":t.arrowsContainerBgR,"arrows-margin":t.arrowsMargin,"arrows-radius":t.arrowsRadius,"arrows-border":t.arrowsBorder},{default:a.withCtx(()=>[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(t.buttons,(l,d)=>(a.openBlock(),a.createElementBlock("div",{class:"button-option-multi",style:a.normalizeStyle([{height:t.height},t.selectedOption==l?{borderColor:t.colorOptionActive,color:t.colorFont+"!important",background:t.backgroundOptionActive}:{borderColor:t.colorOptionDisable,color:"grey !important"}]),key:d,onClick:c=>(t.selectedOption=l,r.clickEmitEvent(l))},a.toDisplayString(l),13,j_))),128))]),_:1},8,["arrows","background-color","px-scroll","scroll-color","arrows-position","arrowsScrollHide","arrows-background","arrows-container-bg-l","arrows-container-bg-r","arrows-margin","arrows-radius","arrows-border"])])):a.createCommentVNode("",!0)],512)}const vr=F_(Rr,[["render",H_],["__scopeId","data-v-8a86dfaf"]]);function nu(s,e){return function(){return s.apply(e,arguments)}}const{toString:W_}=Object.prototype,{getPrototypeOf:Nr}=Object,ha=(s=>e=>{const t=W_.call(e);return s[t]||(s[t]=t.slice(8,-1).toLowerCase())})(Object.create(null)),Nt=s=>(s=s.toLowerCase(),e=>ha(e)===s),ma=s=>e=>typeof e===s,{isArray:Us}=Array,yn=ma("undefined");function K_(s){return s!==null&&!yn(s)&&s.constructor!==null&&!yn(s.constructor)&&Ct(s.constructor.isBuffer)&&s.constructor.isBuffer(s)}const au=Nt("ArrayBuffer");function q_(s){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(s):e=s&&s.buffer&&au(s.buffer),e}const Y_=ma("string"),Ct=ma("function"),iu=ma("number"),fa=s=>s!==null&&typeof s=="object",J_=s=>s===!0||s===!1,ga=s=>{if(ha(s)!=="object")return!1;const e=Nr(s);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in s)&&!(Symbol.iterator in s)},X_=Nt("Date"),Z_=Nt("File"),Q_=Nt("Blob"),e2=Nt("FileList"),t2=s=>fa(s)&&Ct(s.pipe),s2=s=>{let e;return s&&(typeof FormData=="function"&&s instanceof FormData||Ct(s.append)&&((e=ha(s))==="formdata"||e==="object"&&Ct(s.toString)&&s.toString()==="[object FormData]"))},n2=Nt("URLSearchParams"),[a2,i2,r2,o2]=["ReadableStream","Request","Response","Headers"].map(Nt),l2=s=>s.trim?s.trim():s.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function bn(s,e,{allOwnKeys:t=!1}={}){if(s===null||typeof s>"u")return;let n,i;if(typeof s!="object"&&(s=[s]),Us(s))for(n=0,i=s.length;n<i;n++)e.call(null,s[n],n,s);else{const r=t?Object.getOwnPropertyNames(s):Object.keys(s),o=r.length;let l;for(n=0;n<o;n++)l=r[n],e.call(null,s[l],l,s)}}function ru(s,e){e=e.toLowerCase();const t=Object.keys(s);let n=t.length,i;for(;n-- >0;)if(i=t[n],e===i.toLowerCase())return i;return null}const Ts=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,ou=s=>!yn(s)&&s!==Ts;function Dr(){const{caseless:s}=ou(this)&&this||{},e={},t=(n,i)=>{const r=s&&ru(e,i)||i;ga(e[r])&&ga(n)?e[r]=Dr(e[r],n):ga(n)?e[r]=Dr({},n):Us(n)?e[r]=n.slice():e[r]=n};for(let n=0,i=arguments.length;n<i;n++)arguments[n]&&bn(arguments[n],t);return e}const c2=(s,e,t,{allOwnKeys:n}={})=>(bn(e,(i,r)=>{t&&Ct(i)?s[r]=nu(i,t):s[r]=i},{allOwnKeys:n}),s),d2=s=>(s.charCodeAt(0)===65279&&(s=s.slice(1)),s),u2=(s,e,t,n)=>{s.prototype=Object.create(e.prototype,n),s.prototype.constructor=s,Object.defineProperty(s,"super",{value:e.prototype}),t&&Object.assign(s.prototype,t)},h2=(s,e,t,n)=>{let i,r,o;const l={};if(e=e||{},s==null)return e;do{for(i=Object.getOwnPropertyNames(s),r=i.length;r-- >0;)o=i[r],(!n||n(o,s,e))&&!l[o]&&(e[o]=s[o],l[o]=!0);s=t!==!1&&Nr(s)}while(s&&(!t||t(s,e))&&s!==Object.prototype);return e},m2=(s,e,t)=>{s=String(s),(t===void 0||t>s.length)&&(t=s.length),t-=e.length;const n=s.indexOf(e,t);return n!==-1&&n===t},f2=s=>{if(!s)return null;if(Us(s))return s;let e=s.length;if(!iu(e))return null;const t=new Array(e);for(;e-- >0;)t[e]=s[e];return t},g2=(s=>e=>s&&e instanceof s)(typeof Uint8Array<"u"&&Nr(Uint8Array)),p2=(s,e)=>{const t=(s&&s[Symbol.iterator]).call(s);let n;for(;(n=t.next())&&!n.done;){const i=n.value;e.call(s,i[0],i[1])}},y2=(s,e)=>{let t;const n=[];for(;(t=s.exec(e))!==null;)n.push(t);return n},b2=Nt("HTMLFormElement"),w2=s=>s.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,t,n){return t.toUpperCase()+n}),lu=(({hasOwnProperty:s})=>(e,t)=>s.call(e,t))(Object.prototype),S2=Nt("RegExp"),cu=(s,e)=>{const t=Object.getOwnPropertyDescriptors(s),n={};bn(t,(i,r)=>{let o;(o=e(i,r,s))!==!1&&(n[r]=o||i)}),Object.defineProperties(s,n)},_2=s=>{cu(s,(e,t)=>{if(Ct(s)&&["arguments","caller","callee"].indexOf(t)!==-1)return!1;const n=s[t];if(Ct(n)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+t+"'")})}})},k2=(s,e)=>{const t={},n=i=>{i.forEach(r=>{t[r]=!0})};return Us(s)?n(s):n(String(s).split(e)),t},E2=()=>{},T2=(s,e)=>s!=null&&Number.isFinite(s=+s)?s:e,Pr="abcdefghijklmnopqrstuvwxyz",du="0123456789",uu={DIGIT:du,ALPHA:Pr,ALPHA_DIGIT:Pr+Pr.toUpperCase()+du},C2=(s=16,e=uu.ALPHA_DIGIT)=>{let t="";const{length:n}=e;for(;s--;)t+=e[Math.random()*n|0];return t};function x2(s){return!!(s&&Ct(s.append)&&s[Symbol.toStringTag]==="FormData"&&s[Symbol.iterator])}const A2=s=>{const e=new Array(10),t=(n,i)=>{if(fa(n)){if(e.indexOf(n)>=0)return;if(!("toJSON"in n)){e[i]=n;const r=Us(n)?[]:{};return bn(n,(o,l)=>{const d=t(o,i+1);!yn(d)&&(r[l]=d)}),e[i]=void 0,r}}return n};return t(s,0)},L2=Nt("AsyncFunction"),I2=s=>s&&(fa(s)||Ct(s))&&Ct(s.then)&&Ct(s.catch),hu=((s,e)=>s?setImmediate:e?((t,n)=>(Ts.addEventListener("message",({source:i,data:r})=>{i===Ts&&r===t&&n.length&&n.shift()()},!1),i=>{n.push(i),Ts.postMessage(t,"*")}))(`axios@${Math.random()}`,[]):t=>setTimeout(t))(typeof setImmediate=="function",Ct(Ts.postMessage)),B2=typeof queueMicrotask<"u"?queueMicrotask.bind(Ts):typeof process<"u"&&process.nextTick||hu,O={isArray:Us,isArrayBuffer:au,isBuffer:K_,isFormData:s2,isArrayBufferView:q_,isString:Y_,isNumber:iu,isBoolean:J_,isObject:fa,isPlainObject:ga,isReadableStream:a2,isRequest:i2,isResponse:r2,isHeaders:o2,isUndefined:yn,isDate:X_,isFile:Z_,isBlob:Q_,isRegExp:S2,isFunction:Ct,isStream:t2,isURLSearchParams:n2,isTypedArray:g2,isFileList:e2,forEach:bn,merge:Dr,extend:c2,trim:l2,stripBOM:d2,inherits:u2,toFlatObject:h2,kindOf:ha,kindOfTest:Nt,endsWith:m2,toArray:f2,forEachEntry:p2,matchAll:y2,isHTMLForm:b2,hasOwnProperty:lu,hasOwnProp:lu,reduceDescriptors:cu,freezeMethods:_2,toObjectSet:k2,toCamelCase:w2,noop:E2,toFiniteNumber:T2,findKey:ru,global:Ts,isContextDefined:ou,ALPHABET:uu,generateString:C2,isSpecCompliantForm:x2,toJSONObject:A2,isAsyncFn:L2,isThenable:I2,setImmediate:hu,asap:B2};function _e(s,e,t,n,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=s,this.name="AxiosError",e&&(this.code=e),t&&(this.config=t),n&&(this.request=n),i&&(this.response=i,this.status=i.status?i.status:null)}O.inherits(_e,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:O.toJSONObject(this.config),code:this.code,status:this.status}}});const mu=_e.prototype,fu={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(s=>{fu[s]={value:s}}),Object.defineProperties(_e,fu),Object.defineProperty(mu,"isAxiosError",{value:!0}),_e.from=(s,e,t,n,i,r)=>{const o=Object.create(mu);return O.toFlatObject(s,o,function(l){return l!==Error.prototype},l=>l!=="isAxiosError"),_e.call(o,s.message,e,t,n,i),o.cause=s,o.name=s.name,r&&Object.assign(o,r),o};const R2=null;function Or(s){return O.isPlainObject(s)||O.isArray(s)}function gu(s){return O.endsWith(s,"[]")?s.slice(0,-2):s}function pu(s,e,t){return s?s.concat(e).map(function(n,i){return n=gu(n),!t&&i?"["+n+"]":n}).join(t?".":""):e}function v2(s){return O.isArray(s)&&!s.some(Or)}const N2=O.toFlatObject(O,{},null,function(s){return/^is[A-Z]/.test(s)});function pa(s,e,t){if(!O.isObject(s))throw new TypeError("target must be an object");e=e||new FormData,t=O.toFlatObject(t,{metaTokens:!0,dots:!1,indexes:!1},!1,function(p,h){return!O.isUndefined(h[p])});const n=t.metaTokens,i=t.visitor||c,r=t.dots,o=t.indexes,l=(t.Blob||typeof Blob<"u"&&Blob)&&O.isSpecCompliantForm(e);if(!O.isFunction(i))throw new TypeError("visitor must be a function");function d(p){if(p===null)return"";if(O.isDate(p))return p.toISOString();if(!l&&O.isBlob(p))throw new _e("Blob is not supported. Use a Buffer instead.");return O.isArrayBuffer(p)||O.isTypedArray(p)?l&&typeof Blob=="function"?new Blob([p]):Buffer.from(p):p}function c(p,h,g){let y=p;if(p&&!g&&typeof p=="object"){if(O.endsWith(h,"{}"))h=n?h:h.slice(0,-2),p=JSON.stringify(p);else if(O.isArray(p)&&v2(p)||(O.isFileList(p)||O.endsWith(h,"[]"))&&(y=O.toArray(p)))return h=gu(h),y.forEach(function(b,w){!(O.isUndefined(b)||b===null)&&e.append(o===!0?pu([h],w,r):o===null?h:h+"[]",d(b))}),!1}return Or(p)?!0:(e.append(pu(g,h,r),d(p)),!1)}const u=[],m=Object.assign(N2,{defaultVisitor:c,convertValue:d,isVisitable:Or});function f(p,h){if(!O.isUndefined(p)){if(u.indexOf(p)!==-1)throw Error("Circular reference detected in "+h.join("."));u.push(p),O.forEach(p,function(g,y){(!(O.isUndefined(g)||g===null)&&i.call(e,g,O.isString(y)?y.trim():y,h,m))===!0&&f(g,h?h.concat(y):[y])}),u.pop()}}if(!O.isObject(s))throw new TypeError("data must be an object");return f(s),e}function yu(s){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(s).replace(/[!'()~]|%20|%00/g,function(t){return e[t]})}function Fr(s,e){this._pairs=[],s&&pa(s,this,e)}const bu=Fr.prototype;bu.append=function(s,e){this._pairs.push([s,e])},bu.toString=function(s){const e=s?function(t){return s.call(this,t,yu)}:yu;return this._pairs.map(function(t){return e(t[0])+"="+e(t[1])},"").join("&")};function D2(s){return encodeURIComponent(s).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function wu(s,e,t){if(!e)return s;const n=t&&t.encode||D2;O.isFunction(t)&&(t={serialize:t});const i=t&&t.serialize;let r;if(i?r=i(e,t):r=O.isURLSearchParams(e)?e.toString():new Fr(e,t).toString(n),r){const o=s.indexOf("#");o!==-1&&(s=s.slice(0,o)),s+=(s.indexOf("?")===-1?"?":"&")+r}return s}const Su=class{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){O.forEach(this.handlers,function(t){t!==null&&e(t)})}},_u={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},P2=typeof URLSearchParams<"u"?URLSearchParams:Fr,O2=typeof FormData<"u"?FormData:null,F2=typeof Blob<"u"?Blob:null,M2={isBrowser:!0,classes:{URLSearchParams:P2,FormData:O2,Blob:F2},protocols:["http","https","file","blob","url","data"]},Mr=typeof window<"u"&&typeof document<"u",Vr=typeof navigator=="object"&&navigator||void 0,V2=Mr&&(!Vr||["ReactNative","NativeScript","NS"].indexOf(Vr.product)<0),$2=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",U2=Mr&&window.location.href||"http://localhost",z2=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Mr,hasStandardBrowserEnv:V2,hasStandardBrowserWebWorkerEnv:$2,navigator:Vr,origin:U2},Symbol.toStringTag,{value:"Module"})),gt={...z2,...M2};function G2(s,e){return pa(s,new gt.classes.URLSearchParams,Object.assign({visitor:function(t,n,i,r){return gt.isNode&&O.isBuffer(t)?(this.append(n,t.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)}},e))}function j2(s){return O.matchAll(/\w+|\[(\w*)]/g,s).map(e=>e[0]==="[]"?"":e[1]||e[0])}function H2(s){const e={},t=Object.keys(s);let n;const i=t.length;let r;for(n=0;n<i;n++)r=t[n],e[r]=s[r];return e}function ku(s){function e(t,n,i,r){let o=t[r++];if(o==="__proto__")return!0;const l=Number.isFinite(+o),d=r>=t.length;return o=!o&&O.isArray(i)?i.length:o,d?(O.hasOwnProp(i,o)?i[o]=[i[o],n]:i[o]=n,!l):((!i[o]||!O.isObject(i[o]))&&(i[o]=[]),e(t,n,i[o],r)&&O.isArray(i[o])&&(i[o]=H2(i[o])),!l)}if(O.isFormData(s)&&O.isFunction(s.entries)){const t={};return O.forEachEntry(s,(n,i)=>{e(j2(n),i,t,0)}),t}return null}function W2(s,e,t){if(O.isString(s))try{return(e||JSON.parse)(s),O.trim(s)}catch(n){if(n.name!=="SyntaxError")throw n}return(0,JSON.stringify)(s)}const $r={transitional:_u,adapter:["xhr","http","fetch"],transformRequest:[function(s,e){const t=e.getContentType()||"",n=t.indexOf("application/json")>-1,i=O.isObject(s);if(i&&O.isHTMLForm(s)&&(s=new FormData(s)),O.isFormData(s))return n?JSON.stringify(ku(s)):s;if(O.isArrayBuffer(s)||O.isBuffer(s)||O.isStream(s)||O.isFile(s)||O.isBlob(s)||O.isReadableStream(s))return s;if(O.isArrayBufferView(s))return s.buffer;if(O.isURLSearchParams(s))return e.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),s.toString();let r;if(i){if(t.indexOf("application/x-www-form-urlencoded")>-1)return G2(s,this.formSerializer).toString();if((r=O.isFileList(s))||t.indexOf("multipart/form-data")>-1){const o=this.env&&this.env.FormData;return pa(r?{"files[]":s}:s,o&&new o,this.formSerializer)}}return i||n?(e.setContentType("application/json",!1),W2(s)):s}],transformResponse:[function(s){const e=this.transitional||$r.transitional,t=e&&e.forcedJSONParsing,n=this.responseType==="json";if(O.isResponse(s)||O.isReadableStream(s))return s;if(s&&O.isString(s)&&(t&&!this.responseType||n)){const i=!(e&&e.silentJSONParsing)&&n;try{return JSON.parse(s)}catch(r){if(i)throw r.name==="SyntaxError"?_e.from(r,_e.ERR_BAD_RESPONSE,this,null,this.response):r}}return s}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:gt.classes.FormData,Blob:gt.classes.Blob},validateStatus:function(s){return s>=200&&s<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};O.forEach(["delete","get","head","post","put","patch"],s=>{$r.headers[s]={}});const Ur=$r,K2=O.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),q2=s=>{const e={};let t,n,i;return s&&s.split(`
15
+ */const rt={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"}},Vd={itemsToShow:{default:rt.itemsToShow,type:Number},itemsToScroll:{default:rt.itemsToScroll,type:Number},wrapAround:{default:rt.wrapAround,type:Boolean},throttle:{default:rt.throttle,type:Number},snapAlign:{default:rt.snapAlign,validator(s){return["start","end","center","center-even","center-odd"].includes(s)}},transition:{default:rt.transition,type:Number},breakpoints:{default:rt.breakpoints,type:Object},autoplay:{default:rt.autoplay,type:Number},pauseAutoplayOnHover:{default:rt.pauseAutoplayOnHover,type:Boolean},modelValue:{default:void 0,type:Number},mouseDrag:{default:rt.mouseDrag,type:Boolean},touchDrag:{default:rt.touchDrag,type:Boolean},dir:{default:rt.dir,validator(s){return["rtl","ltr"].includes(s)}},i18n:{default:rt.i18n,type:Object},settings:{default(){return{}},type:Object}};function aw({config:s,slidesCount:e}){const{snapAlign:t,wrapAround:n,itemsToShow:i=1}=s;if(n)return Math.max(e-1,0);let r;switch(t){case"start":r=e-i;break;case"end":r=e-1;break;case"center":case"center-odd":r=e-Math.ceil((i-.5)/2);break;case"center-even":r=e-Math.ceil(i/2);break;default:r=0;break}return Math.max(r,0)}function iw({config:s,slidesCount:e}){const{wrapAround:t,snapAlign:n,itemsToShow:i=1}=s;let r=0;if(t||i>e)return r;switch(n){case"start":r=0;break;case"end":r=i-1;break;case"center":case"center-odd":r=Math.floor((i-1)/2);break;case"center-even":r=Math.floor((i-2)/2);break;default:r=0;break}return r}function Tr({val:s,max:e,min:t}){return e<t?s:Math.min(Math.max(s,t),e)}function rw({config:s,currentSlide:e,slidesCount:t}){const{snapAlign:n,wrapAround:i,itemsToShow:r=1}=s;let o=e;switch(n){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 i?o:Tr({val:o,max:t-r,min:0})}function $d(s){return s?s.reduce((e,t)=>{var n;return t.type===a.Fragment?[...e,...$d(t.children)]:((n=t.type)===null||n===void 0?void 0:n.name)==="CarouselSlide"?[...e,t]:e},[]):[]}function Cr({val:s,max:e,min:t=0}){return s>e?Cr({val:s-(e+1),max:e,min:t}):s<t?Cr({val:s+(e+1),max:e,min:t}):s}function ow(s,e){let t;return e?function(...n){const i=this;t||(s.apply(i,n),t=!0,setTimeout(()=>t=!1,e))}:s}function lw(s,e){let t;return function(...n){t&&clearTimeout(t),t=setTimeout(()=>{s(...n),t=null},e)}}function cw(s="",e={}){return Object.entries(e).reduce((t,[n,i])=>t.replace(`{${n}}`,String(i)),s)}var dw=a.defineComponent({name:"ARIA",setup(){const s=a.inject("config",a.reactive(Object.assign({},rt))),e=a.inject("currentSlide",a.ref(0)),t=a.inject("slidesCount",a.ref(0));return()=>a.h("div",{class:["carousel__liveregion","carousel__sr-only"],"aria-live":"polite","aria-atomic":"true"},cw(s.i18n.itemXofY,{currentSlide:e.value+1,slidesCount:t.value}))}}),uw=a.defineComponent({name:"Carousel",props:Vd,setup(s,{slots:e,emit:t,expose:n}){var i;const r=a.ref(null),o=a.ref([]),l=a.ref(0),d=a.ref(0),c=a.reactive(Object.assign({},rt));let u=Object.assign({},rt),m;const f=a.ref((i=s.modelValue)!==null&&i!==void 0?i:0),p=a.ref(0),h=a.ref(0),g=a.ref(0),y=a.ref(0);let b,w;a.provide("config",c),a.provide("slidesCount",d),a.provide("currentSlide",f),a.provide("maxSlide",g),a.provide("minSlide",y),a.provide("slideWidth",l);function _(){m=Object.assign({},s.breakpoints),u=Object.assign(Object.assign(Object.assign({},u),s),{i18n:Object.assign(Object.assign({},u.i18n),s.i18n),breakpoints:void 0}),E(u)}function C(){if(!m||!Object.keys(m).length)return;const x=Object.keys(m).map($=>Number($)).sort(($,de)=>+de-+$);let z=Object.assign({},u);x.some($=>{const de=window.matchMedia(`(min-width: ${$}px)`).matches;return de&&(z=Object.assign(Object.assign({},z),m[$])),de}),E(z)}function E(x){Object.entries(x).forEach(([z,$])=>c[z]=$)}const A=lw(()=>{C(),T()},16);function T(){if(!r.value)return;const x=r.value.getBoundingClientRect();l.value=x.width/c.itemsToShow}function R(){d.value<=0||(h.value=Math.ceil((d.value-1)/2),g.value=aw({config:c,slidesCount:d.value}),y.value=iw({config:c,slidesCount:d.value}),c.wrapAround||(f.value=Tr({val:f.value,max:g.value,min:y.value})))}a.onMounted(()=>{a.nextTick(()=>T()),setTimeout(()=>T(),1e3),C(),G(),window.addEventListener("resize",A,{passive:!0}),t("init")}),a.onUnmounted(()=>{w&&clearTimeout(w),b&&clearInterval(b),window.removeEventListener("resize",A,{passive:!0})});let I=!1;const v={x:0,y:0},M={x:0,y:0},j=a.reactive({x:0,y:0}),U=a.ref(!1),se=a.ref(!1),re=()=>{U.value=!0},ie=()=>{U.value=!1};function ue(x){["INPUT","TEXTAREA","SELECT"].includes(x.target.tagName)||(I=x.type==="touchstart",I||x.preventDefault(),!(!I&&x.button!==0||W.value)&&(v.x=I?x.touches[0].clientX:x.clientX,v.y=I?x.touches[0].clientY:x.clientY,document.addEventListener(I?"touchmove":"mousemove",he,!0),document.addEventListener(I?"touchend":"mouseup",J,!0)))}const he=ow(x=>{se.value=!0,M.x=I?x.touches[0].clientX:x.clientX,M.y=I?x.touches[0].clientY:x.clientY;const z=M.x-v.x,$=M.y-v.y;j.y=$,j.x=z},c.throttle);function J(){const x=c.dir==="rtl"?-1:1,z=Math.sign(j.x)*.4,$=Math.round(j.x/l.value+z)*x;if($&&!I){const de=Qe=>{Qe.stopPropagation(),window.removeEventListener("click",de,!0)};window.addEventListener("click",de,!0)}q(f.value-$),j.x=0,j.y=0,se.value=!1,document.removeEventListener(I?"touchmove":"mousemove",he,!0),document.removeEventListener(I?"touchend":"mouseup",J,!0)}function G(){!c.autoplay||c.autoplay<=0||(b=setInterval(()=>{c.pauseAutoplayOnHover&&U.value||me()},c.autoplay))}function ce(){b&&(clearInterval(b),b=null),G()}const W=a.ref(!1);function q(x){const z=c.wrapAround?x:Tr({val:x,max:g.value,min:y.value});f.value===z||W.value||(t("slide-start",{slidingToIndex:x,currentSlideIndex:f.value,prevSlideIndex:p.value,slidesCount:d.value}),W.value=!0,p.value=f.value,f.value=z,w=setTimeout(()=>{if(c.wrapAround){const $=Cr({val:z,max:g.value,min:0});$!==f.value&&(f.value=$,t("loop",{currentSlideIndex:f.value,slidingToIndex:x}))}t("update:modelValue",f.value),t("slide-end",{currentSlideIndex:f.value,prevSlideIndex:p.value,slidesCount:d.value}),W.value=!1,ce()},c.transition))}function me(){q(f.value+c.itemsToScroll)}function ye(){q(f.value-c.itemsToScroll)}const Ce={slideTo:q,next:me,prev:ye};a.provide("nav",Ce),a.provide("isSliding",W);const Q=a.computed(()=>rw({config:c,currentSlide:f.value,slidesCount:d.value}));a.provide("slidesToScroll",Q);const Ee=a.computed(()=>{const x=c.dir==="rtl"?-1:1,z=Q.value*l.value*x;return{transform:`translateX(${j.x-z}px)`,transition:`${W.value?c.transition:0}ms`,margin:c.wrapAround?`0 -${d.value*l.value}px`:"",width:"100%"}});function Te(){_(),C(),R(),T(),ce()}Object.keys(Vd).forEach(x=>{["modelValue"].includes(x)||a.watch(()=>s[x],Te)}),a.watch(()=>s.modelValue,x=>{x!==f.value&&q(Number(x))}),a.watch(d,R),t("before-init"),_();const Ve={config:c,slidesCount:d,slideWidth:l,next:me,prev:ye,slideTo:q,currentSlide:f,maxSlide:g,minSlide:y,middleSlide:h};n({updateBreakpointsConfigs:C,updateSlidesData:R,updateSlideWidth:T,initDefaultConfigs:_,restartCarousel:Te,slideTo:q,next:me,prev:ye,nav:Ce,data:Ve});const dt=e.default||e.slides,ut=e.addons,ht=a.reactive(Ve);return()=>{const x=$d(dt==null?void 0:dt(ht)),z=(ut==null?void 0:ut(ht))||[];x.forEach(($e,Ge)=>$e.props.index=Ge);let $=x;if(c.wrapAround){const $e=x.map((je,Re)=>a.cloneVNode(je,{index:-x.length+Re,isClone:!0,key:`clone-before-${Re}`})),Ge=x.map((je,Re)=>a.cloneVNode(je,{index:x.length+Re,isClone:!0,key:`clone-after-${Re}`}));$=[...$e,...x,...Ge]}o.value=x,d.value=Math.max(x.length,1);const de=a.h("ol",{class:"carousel__track",style:Ee.value,onMousedownCapture:c.mouseDrag?ue:null,onTouchstartPassiveCapture:c.touchDrag?ue:null},$),Qe=a.h("div",{class:"carousel__viewport"},de);return a.h("section",{ref:r,class:{carousel:!0,"is-sliding":W.value,"is-dragging":se.value,"is-hover":U.value,"carousel--rtl":c.dir==="rtl"},dir:c.dir,"aria-label":c.i18n.ariaGallery,tabindex:"0",onMouseenter:re,onMouseleave:ie},[Qe,z,a.h(dw)])}}}),Ud;(function(s){s.arrowUp="arrowUp",s.arrowDown="arrowDown",s.arrowRight="arrowRight",s.arrowLeft="arrowLeft"})(Ud||(Ud={}));var hw=a.defineComponent({name:"CarouselSlide",props:{index:{type:Number,default:1},isClone:{type:Boolean,default:!1}},setup(s,{slots:e}){const t=a.inject("config",a.reactive(Object.assign({},rt))),n=a.inject("currentSlide",a.ref(0)),i=a.inject("slidesToScroll",a.ref(0)),r=a.inject("isSliding",a.ref(!1)),o=()=>s.index===n.value,l=()=>s.index===n.value-1,d=()=>s.index===n.value+1,c=()=>{const u=Math.floor(i.value),m=Math.ceil(i.value+t.itemsToShow-1);return s.index>=u&&s.index<=m};return()=>{var u;return a.h("li",{style:{width:`${100/t.itemsToShow}%`},class:{carousel__slide:!0,"carousel__slide--clone":s.isClone,"carousel__slide--visible":c(),"carousel__slide--active":o(),"carousel__slide--prev":l(),"carousel__slide--next":d(),"carousel__slide--sliding":r.value},"aria-hidden":!c()},(u=e.default)===null||u===void 0?void 0:u.call(e))}}});const mw=(s,e)=>{const t=s.__vccOpts||s;for(const[n,i]of e)t[n]=i;return t},fw=s=>(a.pushScopeId("data-v-54620d25"),s=s(),a.popScopeId(),s),gw={class:"gsc-carousel"},pw={key:0},yw=fw(()=>a.createElementVNode("div",null,"no hay",-1)),bw=[yw],ww={class:"gsc-carousel__2d__slides"},Sw={width:"9",height:"18",viewBox:"0 0 9 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},_w=["fill"],kw={width:"9",height:"18",viewBox:"0 0 9 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Ew=["fill"],Tw={class:"gsc-carousel__2d__navigation"},Cw={width:"8",height:"15",viewBox:"0 0 8 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},xw=["stroke"],Aw={key:1,class:"gsc-carousel__2d__navigation__pagination"},Lw=["onClick"],Iw={width:"7",height:"15",viewBox:"0 0 7 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Bw=["stroke"],Rw={__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:s=>["propName","value"].every(e=>e in s)},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"},arrowsMaxWidth:{type:String,default:"20px"},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(s,{expose:e,emit:t}){const n=s;a.useCssVars(g=>({"2c72d674":s.slideLeftArrowBackgroundImage,"90a63f40":s.slidesArrowsLeftAndRight,"2627d097":s.slideRightArrowBackgroundImage,"1904d43f":s.marginTop,cfb58986:s.secondarySlidesOpacity}));const i=a.ref(null),r=a.ref({}),o=a.ref(0),l=a.ref(!1);a.watch(i,g=>{g&&l.value?(l.value=!1,d(n.items)):g&&g.slideTo&&g.slideTo(o.value)},{deep:!0}),a.watch(()=>n.currentItemIndex,g=>{o.value!==g&&f(g)}),a.watch(()=>n.defaultItemByIndex,g=>{o.value!==g&&f(g)}),a.watch(()=>n.items,g=>{i.value?d(g):l.value=!0},{immediate:!0});function d(g){g&&g.length&&i.value&&setTimeout(()=>{if(n.defaultItemByProp){const y=n.items.findIndex(b=>b[n.defaultItemByProp.propName]===n.defaultItemByProp.value);y!==-1?(o.value=y,r.value=g[y]):(o.value=0,r.value=g[0])}else o.value=n.defaultItemByIndex,r.value=g[n.defaultItemByIndex];i.value.slideTo&&i.value.slideTo(o.value),r.value&&o.value===0&&t("input",{selectedItem:r.value,selectedItemIndex:o.value})},500)}function c(){i.value&&i.value.next()}function u(){i.value&&i.value.prev()}function m(){i.value&&i.value.updateSlideWidth()}function f(g){i.value&&i.value.slideTo(g)}function p(g){i.value.slideTo(g)}function h(g){const y=g.slidingToIndex<0?n.items.length-1:g.slidingToIndex===n.items.length?0:g.slidingToIndex;o.value=y,r.value=n.items[y],t("update:currentItemIndex",y),t("input",{selectedItem:r.value,selectedItemIndex:o.value})}return e({prev:u,next:c,updateSlideWidth:m,slideTo:f}),(g,y)=>(a.openBlock(),a.createElementBlock("div",gw,[n.is3d?(a.openBlock(),a.createElementBlock("div",pw,bw)):(a.openBlock(),a.createElementBlock("div",{key:1,class:a.normalizeClass(["gsc-carousel__2d",{"main-slide-priority":s.isMainSlidePriority}])},[a.createElementVNode("div",ww,[a.createVNode(a.unref(uw),{ref_key:"carousel2d",ref:i,"items-to-show":s.itemsToShow,"wrap-around":s.wrapAround,onSlideStart:h},{default:a.withCtx(()=>[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(s.items,(b,w)=>(a.openBlock(),a.createBlock(a.unref(hw),{key:w},{default:a.withCtx(()=>[a.renderSlot(g.$slots,"default",{item:b},void 0,!0)]),_:2},1024))),128))]),_:3},8,["items-to-show","wrap-around"])]),s.areSlidesArrowsVisible&&s.items.length>1?(a.openBlock(),a.createElementBlock("div",{key:0,class:"gsc-carousel__2d__arrow-left",style:a.normalizeStyle("max-width:"+s.arrowsMaxWidth+"!important"),onClick:y[0]||(y[0]=b=>i.value.prev())},[a.createElementVNode("div",{class:a.normalizeClass(["gsc-carousel__2d__slide-button",{rounded:s.areSlidesArrowsRounded}])},[(a.openBlock(),a.createElementBlock("svg",Sw,[a.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:s.arrowsColor},null,8,_w)]))],2)],4)):a.createCommentVNode("",!0),s.areSlidesArrowsVisible&&s.items.length>1?(a.openBlock(),a.createElementBlock("div",{key:1,class:"gsc-carousel__2d__arrow-right",style:a.normalizeStyle("max-width:"+s.arrowsMaxWidth+"!important"),onClick:y[1]||(y[1]=b=>c())},[a.createElementVNode("div",{class:a.normalizeClass(["gsc-carousel__2d__slide-button",{rounded:s.areSlidesArrowsRounded}])},[(a.openBlock(),a.createElementBlock("svg",kw,[a.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:s.arrowsColor},null,8,Ew)]))],2)],4)):a.createCommentVNode("",!0),a.createElementVNode("div",Tw,[s.areNavigationArrowsVisible?(a.openBlock(),a.createElementBlock("div",{key:0,class:"gsc-carousel__2d__navigation__arrow-left",onClick:y[2]||(y[2]=b=>u())},[(a.openBlock(),a.createElementBlock("svg",Cw,[a.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:n.arrowsColor},null,8,xw)]))])):a.createCommentVNode("",!0),s.isPaginationVisible?(a.openBlock(),a.createElementBlock("div",Aw,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(s.items,(b,w)=>(a.openBlock(),a.createElementBlock("div",{key:`i-${w}`,class:"gsc-carousel__2d__navigation__pagination__item",style:a.normalizeStyle({height:`${n.navigationHeight}px`,width:`${o.value===w?n.navigationActiveWidth:n.navigationActiveWidth/2}px`,borderRadius:`${n.navigationBorderRadius}px`,backgroundColor:`${o.value===w?n.navigationActiveColor:n.navigationColor}`,transition:"all 0.1s ease-in-out"}),onClick:_=>p(w)},null,12,Lw))),128))])):a.createCommentVNode("",!0),s.areNavigationArrowsVisible?(a.openBlock(),a.createElementBlock("div",{key:2,class:"gsc-carousel__2d__navigation__arrow-right",onClick:y[3]||(y[3]=b=>i.value.next())},[(a.openBlock(),a.createElementBlock("svg",Iw,[a.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:n.arrowsColor},null,8,Bw)]))])):a.createCommentVNode("",!0)])],2))]))}},vw=mw(Rw,[["__scopeId","data-v-54620d25"]]),Nw=(s,e)=>{const t=s.__vccOpts||s;for(const[n,i]of e)t[n]=i;return t},xr={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(s){this.status=s}}},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(s){this.$emit("click",s),this.typeOnOff&&(this.status=!this.status,this.$emit("status",this.status))}}},zd=()=>{a.useCssVars(s=>({"1c960139":s.height,b2f635d8:s.borderWidthBtn,"06e99898":s.borderType,"55555c76":s.borderColor,"23b6d320":s.borderRadius,"22c97374":s.width,"22bb09fa":s.backgroundColor,c148da7c:s.cursorType,cce756fc:s.fontSize,cff98d60:s.fontStyle,"5123b3a5":s.fontFamily,"47bf58db":s.marginLeftStat,cadc8414:s.fontSizeStat}))},Gd=xr.setup;xr.setup=Gd?(s,e)=>(zd(),Gd(s,e)):zd;const Dw=s=>(a.pushScopeId("data-v-fb269a1e"),s=s(),a.popScopeId(),s),Pw=["src"],Ow={key:1,class:"text"},Fw=["src"],Mw={class:"stats"},Vw=Dw(()=>a.createElementVNode("img",{class:"iconstats",src:"https://az755631.vo.msecnd.net/todoelfut/playdes.png"},null,-1)),$w={class:"numstats"},Uw={class:"leyend"};function zw(s,e,t,n,i,r){return a.openBlock(),a.createElementBlock("div",null,[t.type==0?(a.openBlock(),a.createElementBlock("div",{key:0,class:a.normalizeClass(["button",i.status&&t.typeOnOff&&"button-active"]),style:a.normalizeStyle([r.customStyle,i.status&&t.typeOnOff&&r.customActive]),onClick:e[0]||(e[0]=(...o)=>r.btnClick&&r.btnClick(...o))},[t.icon&&t.iconPosition.toLowerCase()==="left"?(a.openBlock(),a.createElementBlock("img",{key:0,class:"icon",style:a.normalizeStyle({width:t.iconSize}),src:t.icon},null,12,Pw)):a.createCommentVNode("",!0),t.textValue?(a.openBlock(),a.createElementBlock("div",Ow,a.toDisplayString(t.textValue),1)):a.createCommentVNode("",!0),t.icon&&t.iconPosition.toLowerCase()==="right"?(a.openBlock(),a.createElementBlock("img",{key:2,class:"icon",style:a.normalizeStyle({width:t.iconSize}),src:t.icon},null,12,Fw)):a.createCommentVNode("",!0)],6)):a.createCommentVNode("",!0),t.type==1?(a.openBlock(),a.createElementBlock("div",{key:1,class:"button-target",onClick:e[1]||(e[1]=(...o)=>r.btnClick&&r.btnClick(...o))},[a.createElementVNode("div",Mw,[Vw,a.createElementVNode("div",$w,a.toDisplayString(t.textStat),1)]),a.createElementVNode("div",Uw,a.toDisplayString(t.textCategory),1)])):a.createCommentVNode("",!0)])}const Gw=Nw(xr,[["render",zw],["__scopeId","data-v-fb269a1e"]]),jw={class:"gsc-dropdown__main-container__item-selected"},Hw=["height","width"],Ww=["stroke"],Kw={class:"gsc-dropdown__items-container"},qw=["onClick"],Yw={key:0,class:"gsc-dropdown__items-footer"},Jw={__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(s){return["solid","dotted","dashed"].includes(s)}},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:s=>["propName","value"].every(e=>e in s)},listBackgroundColor:{type:String,default:"white"},hoverBackgroundColor:{type:String,default:"#f1f1f1"},listMarginTop:{type:String,default:"0"},listContainerPadding:{type:String,default:"0"},listItemPadding:{type:String,default:"10px 12px"},listItemMargin:{type:String,default:"0"},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},listItemBorderRadius:{type:String,default:"0"},listAlignment:{type:String,default:"left"},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(s,{emit:e}){const t=s,n=a.ref({}),i=a.ref(null),r=a.ref(t.isMultipleOption?-1:0),o=a.ref(!1);a.watch(()=>t.items,(p,h)=>{if(!t.modelValue&&(!t.onlyFirstTime||!h||!h.length)&&p&&p.length){if(t.defaultItemByProp){const g=t.items.findIndex(y=>y[t.defaultItemByProp.propName]===t.defaultItemByProp.value);g!==-1?(r.value=g,n.value=p[g]):(r.value=0,n.value=p[0])}else n.value=p[t.defaultItemByIndex];e("input",n.value)}},{immediate:!0}),a.watch(()=>t.modelValue,p=>{if(p){const h=t.items.findIndex(g=>typeof p=="object"?JSON.stringify(g)===JSON.stringify(p):g===p);h!==-1&&(r.value=h,n.value=t.items[h],e("update:modelValue",n.value))}},{immediate:!0});const l=a.computed(()=>({height:t.height,width:t.width,backgroundColor:t.backgroundColor,borderRadius:`${t.borderRadius}px`,border:`${t.borderType} ${t.borderWidth}px ${t.borderColor}`,color:t.color,"--hover-background-color":t.hoverBackgroundColor,"--list-container-padding":t.listContainerPadding,"--list-item-padding":t.listItemPadding,"--list-item-margin":t.listItemMargin,"--list-background-color":t.listBackgroundColor,"--list-height":t.listHeight,"--list-item-border-radius":t.listItemBorderRadius,"--list-item-selected-color":t.listItemSelectedColor,"--list-item-selected-background-color":t.listItemSelectedBackgroundColor,"--list-item-color":t.listItemColor,"--list-border-radius":`${t.listBorderRadius}`,"--list-border-color":t.listBorderColor,"--list-width":t.isListSameWidth?t.width:"fit-content","--list-border-width":`${t.listBorderWidth}px`,"--list-margin-top":t.listMarginTop,"--list-left":t.listAlignment==="left"?"0":"auto","--list-right":t.listAlignment==="right"?"0":"auto","--footer-border":`${t.footerBorderWidth}px solid ${t.footerBorderColor}`,"--dropdown-opacity":t.isDisabled?"0.5":"1","--dropdown-cursor":t.isDisabled?"not-allowed":"pointer","--dropdown-font-size":t.fontSize?t.fontSize:"14px"})),d=a.computed(()=>({height:`${t.arrowHeight}px`,width:`${t.arrowWidth}px`}));function c(){t.isDisabled||(o.value=!o.value)}function u(p){i.value&&!i.value.contains(p.target)&&(o.value=!1)}function m(p,h){t.isMultipleOption?r.value=-1:(r.value=h,o.value=!1),n.value=p,e("input",n.value),e("update:modelValue",n.value)}function f(){o.value=!1,e("click-ready")}return a.onMounted(()=>{document.addEventListener("click",u)}),a.onBeforeMount(()=>{document.removeEventListener("click",u)}),(p,h)=>(a.openBlock(),a.createElementBlock("div",{ref_key:"dropDown",ref:i,class:"gsc-dropdown",style:a.normalizeStyle(l.value)},[a.createElementVNode("div",{class:"gsc-dropdown__main-container",style:a.normalizeStyle({"padding-right":`${s.arrowWidth+8}px`}),onClick:c},[a.createElementVNode("div",jw,[a.renderSlot(p.$slots,"default",{selectedItem:n.value})]),a.createElementVNode("div",{class:a.normalizeClass(["gsc-dropdown__main-container__icon",{"rotated-180":o.value}]),style:a.normalizeStyle(d.value)},[(a.openBlock(),a.createElementBlock("svg",{height:s.arrowHeight,width:s.arrowWidth,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[a.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:s.arrowColor},null,8,Ww)],8,Hw))],6)],4),a.createVNode(a.Transition,null,{default:a.withCtx(()=>[a.withDirectives(a.createElementVNode("div",Kw,[a.createElementVNode("div",null,[a.createElementVNode("div",{class:"gsc-dropdown__items",style:a.normalizeStyle({"margin-top":`${t.borderWidth}px`})},[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(s.items,(g,y)=>(a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass(["gsc-dropdown__items__item",{selected:y===r.value}]),key:y,onClick:b=>m(g,y)},[a.renderSlot(p.$slots,"availableItem",{item:g})],10,qw))),128))],4),s.isFooterVisible?(a.openBlock(),a.createElementBlock("div",Yw,[a.createVNode(a.unref(Gw),{"text-value":"Listo","border-color":"#cbee6b","font-size":"12px",width:"72px",height:"22px","border-radius":"62px","border-width":.8,onClick:f})])):a.createCommentVNode("",!0)])],512),[[a.vShow,o.value]])]),_:3})],4))}},Xw=(s,e)=>{const t=s.__vccOpts||s;for(const[n,i]of e)t[n]=i;return t},Zw={class:"tournament-select__selected-tournament"},Qw={class:"tournament-select__selected-tournament__logo"},eS=["src"],tS={class:"tournament-select__selected-tournament__name"},sS="https://kefloixzy1.execute-api.us-west-2.amazonaws.com/prod/gs3/tournaments",nS={__name:"GSCTournamentSelect",props:{apiUrl:{type:String,default:"https://kefloixzy1.execute-api.us-west-2.amazonaws.com/prod/gs3/tournaments"},fontFamily:{type:String,default:"Poppins-Light"},logosUrl:{type:String,default:"https://golstatsimages.blob.core.windows.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(s){return["solid","dotted","dashed"].includes(s)}},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:s=>["propName","value"].every(e=>e in s)},currentSeasonId:{type:Number,default:0},tournamentsIdsToInclude:{type:Set,default:()=>new Set}},emits:["input","change-tournaments"],setup(s,{emit:e}){const t=s,n=a.ref([]),i=a.computed(()=>{const p={};return t.fontFamily&&(p["font-family"]=`${t.fontFamily}`),p}),r=a.computed(()=>t.tournamentsIdsToInclude.size?d(n.value):n.value),o=a.computed(()=>r.value.find(p=>p.seasonsIds.has(t.currentSeasonId))||r.value[0]);async function l(){try{if(t.items&&t.items.length)n.value=[...t.items];else{const p=await u();e("change-tournaments",p),n.value=p.map(h=>({...h.tournament,seasons:h.seasons,seasonsIds:h.seasons.reduce((g,y)=>(g.add(y.id),g),new Set)})).sort((h,g)=>h.order-g.order)}}catch(p){throw new Error(p)}}function d(p){return p.filter(h=>t.tournamentsIdsToInclude.has(h.id))}function c(p){const h=new XMLHttpRequest,g=`${t.logosUrl}${p}.${t.logoFileType}`;return h.open("HEAD",g,!1),h.send(),h.status!==404}async function u(){try{return(await fetch(t.apiUrl||sS)).json()}catch(p){return Promise.reject(p)}}function m(p){e("input",p)}function f(p){e("input",p)}return a.onMounted(()=>{l()}),(p,h)=>(a.openBlock(),a.createElementBlock("div",{class:"tournament-select",style:a.normalizeStyle(i.value)},[a.createVNode(a.unref(Jw),a.mergeProps(t,{"model-value":o.value,items:r.value,onInput:m,"onUpdate:modelValue":f}),{default:a.withCtx(({selectedItem:g})=>[a.createElementVNode("div",Zw,[a.createElementVNode("div",Qw,[c(g.id)?(a.openBlock(),a.createElementBlock("img",{key:0,src:`${t.logosUrl}${g.id}.${t.logoFileType}`,alt:""},null,8,eS)):a.createCommentVNode("",!0)]),a.createElementVNode("div",tS,a.toDisplayString(g.name),1)])]),availableItem:a.withCtx(({item:g})=>[a.createElementVNode("div",null,a.toDisplayString(g.name),1)]),_:1},16,["model-value","items"])],4))}},aS=Xw(nS,[["__scopeId","data-v-5c8e9511"]]),iS=(s,e)=>{const t=s.__vccOpts||s;for(const[n,i]of e)t[n]=i;return t},Ar={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(s){this.status=s}}},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(s){this.$emit("click",s),this.typeOnOff&&(this.status=!this.status,this.$emit("status",this.status))}}},jd=()=>{a.useCssVars(s=>({"9d01acb4":s.height,"14e95081":s.borderWidthBtn,"38fec285":s.borderType,34353510:s.borderColor,"20d20dc6":s.borderRadius,17130967:s.width,"4ccb7d36":s.backgroundColor,"5d1e86a2":s.cursorType,ce65d4a2:s.fontSize,fe4ac47a:s.fontStyle,f98e44dc:s.fontFamily,"93b87770":s.marginLeftStat,c7f7beba:s.fontSizeStat}))},Hd=Ar.setup;Ar.setup=Hd?(s,e)=>(jd(),Hd(s,e)):jd;const rS=s=>(a.pushScopeId("data-v-f3ee6b2b"),s=s(),a.popScopeId(),s),oS=["src"],lS={key:1,class:"text"},cS=["src"],dS={class:"stats"},uS=rS(()=>a.createElementVNode("img",{class:"iconstats",src:"https://golstatsimages.blob.core.windows.net/todoelfut/playdes.png"},null,-1)),hS={class:"numstats"},mS={class:"leyend"};function fS(s,e,t,n,i,r){return a.openBlock(),a.createElementBlock("div",null,[t.type==0?(a.openBlock(),a.createElementBlock("div",{key:0,class:a.normalizeClass(["button",i.status&&t.typeOnOff&&"button-active"]),style:a.normalizeStyle([r.customStyle,i.status&&t.typeOnOff&&r.customActive]),onClick:e[0]||(e[0]=(...o)=>r.btnClick&&r.btnClick(...o))},[t.icon&&t.iconPosition.toLowerCase()==="left"?(a.openBlock(),a.createElementBlock("img",{key:0,class:"icon",style:a.normalizeStyle({width:t.iconSize}),src:t.icon},null,12,oS)):a.createCommentVNode("",!0),t.textValue?(a.openBlock(),a.createElementBlock("div",lS,a.toDisplayString(t.textValue),1)):a.createCommentVNode("",!0),t.icon&&t.iconPosition.toLowerCase()==="right"?(a.openBlock(),a.createElementBlock("img",{key:2,class:"icon",style:a.normalizeStyle({width:t.iconSize}),src:t.icon},null,12,cS)):a.createCommentVNode("",!0)],6)):a.createCommentVNode("",!0),t.type==1?(a.openBlock(),a.createElementBlock("div",{key:1,class:"button-target",onClick:e[1]||(e[1]=(...o)=>r.btnClick&&r.btnClick(...o))},[a.createElementVNode("div",dS,[uS,a.createElementVNode("div",hS,a.toDisplayString(t.textStat),1)]),a.createElementVNode("div",mS,a.toDisplayString(t.textCategory),1)])):a.createCommentVNode("",!0)])}const gS=iS(Ar,[["render",fS],["__scopeId","data-v-f3ee6b2b"]]),pS={class:"gsc-dropdown__main-container__item-selected"},yS=["height","width"],bS=["stroke"],wS={class:"gsc-dropdown__items-container"},SS=["onClick"],_S={key:0,class:"gsc-dropdown__items-footer"},kS={__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(s){return["solid","dotted","dashed"].includes(s)}},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:s=>["propName","value"].every(e=>e in s)},listBackgroundColor:{type:String,default:"white"},hoverBackgroundColor:{type:String,default:"#f1f1f1"},listMarginTop:{type:String,default:"0"},listContainerPadding:{type:String,default:"0"},listItemPadding:{type:String,default:"10px 12px"},listItemMargin:{type:String,default:"0"},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},listItemBorderRadius:{type:String,default:"0"},listAlignment:{type:String,default:"left"},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(s,{emit:e}){const t=s,n=a.ref({}),i=a.ref(null),r=a.ref(t.isMultipleOption?-1:0),o=a.ref(!1);a.watch(()=>t.items,(p,h)=>{if(!t.modelValue&&(!t.onlyFirstTime||!h||!h.length)&&p&&p.length){if(t.defaultItemByProp){const g=t.items.findIndex(y=>y[t.defaultItemByProp.propName]===t.defaultItemByProp.value);g!==-1?(r.value=g,n.value=p[g]):(r.value=0,n.value=p[0])}else n.value=p[t.defaultItemByIndex];e("input",n.value)}},{immediate:!0}),a.watch(()=>t.modelValue,p=>{if(p){const h=t.items.findIndex(g=>typeof p=="object"?JSON.stringify(g)===JSON.stringify(p):g===p);h!==-1&&(r.value=h,n.value=t.items[h],e("update:modelValue",n.value))}},{immediate:!0});const l=a.computed(()=>({height:t.height,width:t.width,backgroundColor:t.backgroundColor,borderRadius:`${t.borderRadius}px`,border:`${t.borderType} ${t.borderWidth}px ${t.borderColor}`,color:t.color,"--hover-background-color":t.hoverBackgroundColor,"--list-container-padding":t.listContainerPadding,"--list-item-padding":t.listItemPadding,"--list-item-margin":t.listItemMargin,"--list-background-color":t.listBackgroundColor,"--list-height":t.listHeight,"--list-item-border-radius":t.listItemBorderRadius,"--list-item-selected-color":t.listItemSelectedColor,"--list-item-selected-background-color":t.listItemSelectedBackgroundColor,"--list-item-color":t.listItemColor,"--list-border-radius":`${t.listBorderRadius}`,"--list-border-color":t.listBorderColor,"--list-width":t.isListSameWidth?t.width:"fit-content","--list-border-width":`${t.listBorderWidth}px`,"--list-margin-top":t.listMarginTop,"--list-left":t.listAlignment==="left"?"0":"auto","--list-right":t.listAlignment==="right"?"0":"auto","--footer-border":`${t.footerBorderWidth}px solid ${t.footerBorderColor}`,"--dropdown-opacity":t.isDisabled?"0.5":"1","--dropdown-cursor":t.isDisabled?"not-allowed":"pointer","--dropdown-font-size":t.fontSize?t.fontSize:"14px"})),d=a.computed(()=>({height:`${t.arrowHeight}px`,width:`${t.arrowWidth}px`}));function c(){t.isDisabled||(o.value=!o.value)}function u(p){i.value&&!i.value.contains(p.target)&&(o.value=!1)}function m(p,h){t.isMultipleOption?r.value=-1:(r.value=h,o.value=!1),n.value=p,e("input",n.value),e("update:modelValue",n.value)}function f(){o.value=!1,e("click-ready")}return a.onMounted(()=>{document.addEventListener("click",u)}),a.onBeforeMount(()=>{document.removeEventListener("click",u)}),(p,h)=>(a.openBlock(),a.createElementBlock("div",{ref_key:"dropDown",ref:i,class:"gsc-dropdown",style:a.normalizeStyle(l.value)},[a.createElementVNode("div",{class:"gsc-dropdown__main-container",style:a.normalizeStyle({"padding-right":`${s.arrowWidth+8}px`}),onClick:c},[a.createElementVNode("div",pS,[a.renderSlot(p.$slots,"default",{selectedItem:n.value})]),a.createElementVNode("div",{class:a.normalizeClass(["gsc-dropdown__main-container__icon",{"rotated-180":o.value}]),style:a.normalizeStyle(d.value)},[(a.openBlock(),a.createElementBlock("svg",{height:s.arrowHeight,width:s.arrowWidth,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[a.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:s.arrowColor},null,8,bS)],8,yS))],6)],4),a.createVNode(a.Transition,null,{default:a.withCtx(()=>[a.withDirectives(a.createElementVNode("div",wS,[a.createElementVNode("div",null,[a.createElementVNode("div",{class:"gsc-dropdown__items",style:a.normalizeStyle({"margin-top":`${t.borderWidth}px`})},[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(s.items,(g,y)=>(a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass(["gsc-dropdown__items__item",{selected:y===r.value}]),key:y,onClick:b=>m(g,y)},[a.renderSlot(p.$slots,"availableItem",{item:g})],10,SS))),128))],4),s.isFooterVisible?(a.openBlock(),a.createElementBlock("div",_S,[a.createVNode(a.unref(gS),{"text-value":"Listo","border-color":"#cbee6b","font-size":"12px",width:"72px",height:"22px","border-radius":"62px","border-width":.8,onClick:f})])):a.createCommentVNode("",!0)])],512),[[a.vShow,o.value]])]),_:3})],4))}},ES=(s,e)=>{const t=s.__vccOpts||s;for(const[n,i]of e)t[n]=i;return t},TS={class:"season-name"},CS={class:"items-list-season"},xS={__name:"GSC-SeasonSelect",props:{seasons:{type:Array,default:()=>[]},currentSeasonId:{type:Number,default:0}},emits:["input"],setup(s,{emit:e}){const t=s,n=a.computed(()=>t.seasons.find(o=>o.id===t.currentSeasonId));function i(o){e("input",o)}function r(o){e("input",o)}return(o,l)=>(a.openBlock(),a.createBlock(a.unref(kS),{items:s.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:r,"onUpdate:modelValue":i},{default:a.withCtx(({selectedItem:d})=>[a.createElementVNode("div",TS,[a.createElementVNode("span",null,a.toDisplayString(d.name),1)])]),availableItem:a.withCtx(({item:d})=>[a.createElementVNode("span",CS,a.toDisplayString(d.name),1)]),_:1},8,["items","model-value"]))}},AS=ES(xS,[["__scopeId","data-v-d23e9ee2"]]);function LS(s){const e=a.ref({width:0,height:0});function t(){const n=s.value.getBoundingClientRect();e.value.width=n.width,e.value.height=n.height}return a.onMounted(()=>{t(),window.addEventListener("resize",t)}),a.onUnmounted(()=>{window.removeEventListener("resize",t)}),{elementSize:e}}const IS=(s,e)=>{const t=s.__vccOpts||s;for(const[n,i]of e)t[n]=i;return t},Lr={name:"ScrollableContainer",props:{backgroundColor:{type:String,default:"#0D1D29"},pxScroll:{type:Number,default:100},arrows:{type:Boolean,default:!0},arrowsHideOnNoScroll:{type:Boolean,default:!1},arrowsScrollHide:{type:Boolean,default:!1},arrowsColor:{type:String,default:"#CBEE6B"},arrowsHeight:{type:Number,default:15},arrowsWidth:{type:Number,default:15},arrowsPadding:{type:Number,default:5},arrowsMargin:{type:Number,default:10},arrowsRadius:{type:String,default:"0%"},arrowsBorder:{type:String,default:"none"},arrowsBackground:{type:String,default:"#0D1D29"},arrowsContainerBgL:{type:String,default:"#0D1D29"},arrowsContainerBgR:{type:String,default:"#0D1D29"},scrollColor:{type:String,default:"#c3e569"},arrowsPosition:{type:String,default:"relative"},height:{type:String,default:"100%"}},data(){return{showLeftArrow:!1,showRightArrow:!0,intervalid1:""}},mounted(){this.getScroll(),this.arrowsHideOnNoScroll&&window.addEventListener("resize",this.resizeSlider),this.arrowsHideOnNoScroll&&this.listenerLoad()},beforeUnmount(){this.arrowsHideOnNoScroll&&window.removeEventListener("resize",this.resizeSlider),this.arrowsHideOnNoScroll&&clearInterval(this.intervalid1)},computed:{getViewBox(){return`-2 0 ${this.arrowsWidth} ${this.arrowsHeight}`},hideShowLeftArrow(){let s="";return this.arrowsPosition=="absolute"?s="leftAbsolute":s="leftRelative",this.arrowsScrollHide?this.showLeftArrow?s+=" showArrowSlide":s+=" hideArrowSlide":s+=" showArrowSlide",s},hideShowRightArrow(){let s="";return this.arrowsPosition=="absolute"?s="rightAbsolute":s="rightRelative",this.arrowsScrollHide?this.showRightArrow?s+=" showArrowSlide":s+=" hideArrowSlide":s+=" showArrowSlide",s}},methods:{scrollLeft(){this.$refs.content.scrollLeft-=this.pxScroll},scrollRight(){this.$refs.content.scrollLeft+=this.pxScroll},getScroll(){let s=0;this.arrowsPosition=="relative"?s=this.$refs.content.scrollWidth-this.$el.clientWidth+this.arrowsMargin*2+this.arrowsWidth*4:s=this.$refs.content.scrollWidth-this.$el.clientWidth,this.$refs.content.scrollLeft==0?this.showLeftArrow=!1:this.showLeftArrow=!0,s>0&&(this.$refs.content.scrollLeft==s?this.showRightArrow=!1:this.showRightArrow=!0),this.arrowsHideOnNoScroll&&this.$refs.content.clientWidth===this.$refs.content.scrollWidth&&(this.showRightArrow=!1)},resizeSlider(){this.getScroll();let s;clearTimeout(s),s=setTimeout(this.getScroll,1e3)},listenerLoad(){this.intervalid1=setInterval((function(){var s=this.$el.clientWidth,e=this.$refs.content.scrollWidth;e>0&&s>0&&(e>s?(this.showRightArrow=!0,clearInterval(this.intervalid1)):clearInterval(this.intervalid1))}).bind(this),3e3)}}},Wd=()=>{a.useCssVars(s=>({"42d3dba6":s.backgroundColor,"4de5d2cf":s.height,"67bafa7b":s.arrowsPosition,"61e1032e":s.arrowsPadding+"px","79a4ac00":s.arrowsBackground,"6b8355c6":s.arrowsHeight*2+"px","29a58368":s.arrowsWidth*2+"px","3622fa64":s.arrowsRadius,"1ba101fe":s.arrowsBorder,"0bafb5e6":s.arrowsMargin+"px","423a44b8":s.arrowsContainerBgL,"423a44be":s.arrowsContainerBgR,"10b117ee":s.scrollColor}))},Kd=Lr.setup;Lr.setup=Kd?(s,e)=>(Wd(),Kd(s,e)):Wd;const BS={ref:"gscScrollableContainer",class:"scrollable-container"},RS={class:"scrollable-arrows"},vS=["width","height","viewBox"],NS=["stroke"],DS={class:"scrollable-wrapper"},PS={class:"scrollable-arrows"},OS=["width","height","viewBox"],FS=["stroke"];function MS(s,e,t,n,i,r){return a.openBlock(),a.createElementBlock("div",BS,[t.arrows?(a.openBlock(),a.createElementBlock("div",{key:0,class:a.normalizeClass(["arrows-container",r.hideShowLeftArrow]),onClick:e[0]||(e[0]=(...o)=>r.scrollLeft&&r.scrollLeft(...o))},[a.createElementVNode("div",RS,[(a.openBlock(),a.createElementBlock("svg",{width:t.arrowsWidth,height:t.arrowsHeight,viewBox:r.getViewBox,fill:"none",xmlns:"http://www.w3.org/2000/svg"},[a.createElementVNode("path",{d:"M6.36523 13.788L1.10146 8.52429C0.479824 7.90265 0.479824 6.88541 1.10147 6.26377L6.36523 1",stroke:t.arrowsColor},null,8,NS)],8,vS))])],2)):a.createCommentVNode("",!0),a.createElementVNode("div",{class:"scrollable-content scrollable-content-slider",ref:"content",onScroll:e[1]||(e[1]=(...o)=>r.getScroll&&r.getScroll(...o))},[a.createElementVNode("div",DS,[a.renderSlot(s.$slots,"default",{},void 0,!0)])],544),t.arrows?(a.openBlock(),a.createElementBlock("div",{key:1,id:"arrows-container-right",class:a.normalizeClass(["arrows-container",r.hideShowRightArrow]),onClick:e[2]||(e[2]=(...o)=>r.scrollRight&&r.scrollRight(...o))},[a.createElementVNode("div",PS,[(a.openBlock(),a.createElementBlock("svg",{width:t.arrowsWidth,height:t.arrowsHeight,viewBox:r.getViewBox,fill:"none",xmlns:"http://www.w3.org/2000/svg"},[a.createElementVNode("path",{d:"M0.634765 1.21195L5.89853 6.47571C6.52018 7.09735 6.52018 8.11459 5.89853 8.73623L0.634766 14",stroke:t.arrowsColor},null,8,FS)],8,OS))])],2)):a.createCommentVNode("",!0)],512)}const VS=IS(Lr,[["render",MS],["__scopeId","data-v-b548a08d"]]),$S=(s,e)=>{const t=s.__vccOpts||s;for(const[n,i]of e)t[n]=i;return t},Ir={components:{GSCSlider:VS},props:{arrow:{type:Boolean,required:!0},buttons:{type:Array,required:!0},width:{type:String,default:"300px"},height:{type:String,default:"80px"},fontSize:{type:String,default:"16px"},colorFont:{type:String,default:"#ffffff"},backgroundOptionActive:{type:String,default:"#0d1d29"},colorOptionActive:{type:String,default:"#cbee6b"},colorOptionDisable:{type:String,default:"gray"},backgroundOptionDisable:{type:String,default:"#0d1d29"},fontFamily:{type:String,default:"Poppins-Semibold"},borderWidth:{type:String,default:"3px"},borderRadius:{type:String,default:"0px"},selectedOption:{type:String,default:""},type:{type:Number,default:0},borderWidthContainer:{type:String,default:"1px"},background:{type:String,default:"#0d1d29"},borderColorContainer:{type:String,default:"#505355"},pxScroll:{type:Number,default:100},scrollColor:{type:String,default:"#c3e569"},arrowsPosition:{type:String,default:"relative"},arrowsScrollHide:{type:Boolean,default:!1},arrowsBackground:{type:String,default:"#0D1D29"},arrowsContainerBgL:{type:String,default:"#0D1D29"},arrowsContainerBgR:{type:String,default:"#0D1D29"},arrowsMargin:{type:Number,default:10},arrowsRadius:{type:String,default:"0%"},arrowsBorder:{type:String,default:"none"}},setup(){const s=a.ref("myDivRef"),{elementSize:e}=LS(s);return{myDivRef:s,elementSize:e}},methods:{clickEmitEvent(s){this.$emit("input",s)},customGrid(s){var e={};return s.width>768?e={fontSize:"16px"}:s.width>480?e={fontSize:"14px"}:e={fontSize:"12px"},e}}},qd=()=>{a.useCssVars(s=>({cff4a118:s.fontSize,"42aab7f6":s.borderWidth,d29bcbd2:s.fontFamily,df6c5a9c:s.background,"09b32862":s.borderRadius,"8c0d6daa":s.borderWidthContainer,e8a86fa4:s.borderColorContainer,"179494da":s.colorOptionActive,cea5647c:s.width}))},Yd=Ir.setup;Ir.setup=Yd?(s,e)=>(qd(),Yd(s,e)):qd;const US={ref:"myDivRef"},zS={key:0,class:"gs-switch-container"},GS=["onClick"],jS={key:1,class:"gs-switch-container-type"},HS=["onClick"],WS={key:2,class:"gs-switch-container-carousel"},KS=["onClick"];function qS(s,e,t,n,i,r){const o=a.resolveComponent("GSCSlider");return a.openBlock(),a.createElementBlock("div",US,[t.type==0?(a.openBlock(),a.createElementBlock("div",zS,[a.createElementVNode("div",{class:"gs-switch-container__control",style:a.normalizeStyle([r.customGrid(n.elementSize)])},[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(t.buttons,(l,d)=>(a.openBlock(),a.createElementBlock("div",{class:"gs-switch-container__control__button-option",style:a.normalizeStyle([{height:t.height},t.selectedOption==l?{borderColor:t.colorOptionActive,color:t.colorFont+"!important",background:t.backgroundOptionActive}:{borderColor:t.colorOptionDisable,color:"grey !important"}]),key:d,onClick:c=>(t.selectedOption=l,r.clickEmitEvent(l))},a.toDisplayString(l),13,GS))),128))],4),a.renderSlot(s.$slots,t.selectedOption,{},void 0,!0)])):a.createCommentVNode("",!0),t.type==1?(a.openBlock(),a.createElementBlock("div",jS,[a.createElementVNode("div",{class:"gs-switch-container-type__control",style:a.normalizeStyle([r.customGrid(n.elementSize)])},[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(t.buttons,(l,d)=>(a.openBlock(),a.createElementBlock("div",{class:"gs-switch-container-type__control__button-option-type",style:a.normalizeStyle([{height:t.height},t.selectedOption==l?{borderColor:t.colorOptionActive,color:t.colorFont+"!important",background:t.backgroundOptionActive}:{borderColor:t.colorOptionDisable,borderWidth:"0px",borderWidth:"0px !important",color:"grey !important",background:t.backgroundOptionDisable}]),key:d,onClick:c=>(t.selectedOption=l,r.clickEmitEvent(l))},a.toDisplayString(l),13,HS))),128))],4)])):a.createCommentVNode("",!0),t.type==2?(a.openBlock(),a.createElementBlock("div",WS,[a.createVNode(o,{arrows:t.arrow,"background-color":t.background,"px-scroll":t.pxScroll,"scroll-color":t.scrollColor,"arrows-position":t.arrowsPosition,arrowsScrollHide:t.arrowsScrollHide,"arrows-background":t.arrowsBackground,"arrows-container-bg-l":t.arrowsContainerBgL,"arrows-container-bg-r":t.arrowsContainerBgR,"arrows-margin":t.arrowsMargin,"arrows-radius":t.arrowsRadius,"arrows-border":t.arrowsBorder},{default:a.withCtx(()=>[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(t.buttons,(l,d)=>(a.openBlock(),a.createElementBlock("div",{class:"button-option-multi",style:a.normalizeStyle([{height:t.height},t.selectedOption==l?{borderColor:t.colorOptionActive,color:t.colorFont+"!important",background:t.backgroundOptionActive}:{borderColor:t.colorOptionDisable,color:"grey !important"}]),key:d,onClick:c=>(t.selectedOption=l,r.clickEmitEvent(l))},a.toDisplayString(l),13,KS))),128))]),_:1},8,["arrows","background-color","px-scroll","scroll-color","arrows-position","arrowsScrollHide","arrows-background","arrows-container-bg-l","arrows-container-bg-r","arrows-margin","arrows-radius","arrows-border"])])):a.createCommentVNode("",!0)],512)}const YS=$S(Ir,[["render",qS],["__scopeId","data-v-8a86dfaf"]]),Jd=(s,e)=>{const t=s.__vccOpts||s;for(const[n,i]of e)t[n]=i;return t},JS={components:{},props:{tournamentId:{type:Number,default:0},seasonId:{type:Number,default:0},widthComponent:{type:Number,default:0}},data(){},computed:{},methods:{}},Xd=s=>(a.pushScopeId("data-v-69900788"),s=s(),a.popScopeId(),s),XS={class:"container-img"},ZS=Xd(()=>a.createElementVNode("div",{class:"sep-playoff-top"},null,-1)),QS=Xd(()=>a.createElementVNode("div",{class:"sep-playoff-home"},null,-1));function e_(s,e,t,n,i,r){return a.openBlock(),a.createElementBlock("div",XS,[ZS,t.widthComponent>=1100?(a.openBlock(),a.createElementBlock("div",{key:0,class:"img-container-playoff-home",style:a.normalizeStyle(`background-image: url('https://golstatsimages.blob.core.windows.net/todoelfut/brackets_1010_${t.seasonId}.png?r=${Math.floor(Math.random()*1e4+1)}'); width: calc(100% - 65px); height: calc(850px - 50px);`)},null,4)):t.widthComponent>=985&&t.widthComponent<1100?(a.openBlock(),a.createElementBlock("div",{key:1,class:"img-container-playoff-home",style:a.normalizeStyle(`background-image: url('https://golstatsimages.blob.core.windows.net/todoelfut/brackets_429_${t.seasonId}.png?r=${Math.floor(Math.random()*1e4+1)}'); width: calc(100% - 80px); height: calc(760px - 50px);`)},null,4)):t.widthComponent>=915&&t.widthComponent<985?(a.openBlock(),a.createElementBlock("div",{key:2,class:"img-container-playoff-home",style:a.normalizeStyle(`background-image: url('https://golstatsimages.blob.core.windows.net/todoelfut/brackets_1010_${t.seasonId}.png?r=${Math.floor(Math.random()*1e4+1)}'); width: calc(100% - 80px); height: calc(740px - 90px);`)},null,4)):t.widthComponent>=855&&t.widthComponent<915?(a.openBlock(),a.createElementBlock("div",{key:3,class:"img-container-playoff-home",style:a.normalizeStyle(`background-image: url('https://golstatsimages.blob.core.windows.net/todoelfut/brackets_429_${t.seasonId}.png?r=${Math.floor(Math.random()*1e4+1)}'); width: calc(100% - 80px); height: calc(720px - 110px);`)},null,4)):t.widthComponent>=740&&t.widthComponent<855?(a.openBlock(),a.createElementBlock("div",{key:4,class:"img-container-playoff-home",style:a.normalizeStyle(`background-image: url('https://golstatsimages.blob.core.windows.net/todoelfut/brackets_429_${t.seasonId}.png?r=${Math.floor(Math.random()*1e4+1)}'); width: calc(100% - 80px); height: calc(700px - 180px);`)},null,4)):t.widthComponent>=670&&t.widthComponent<740?(a.openBlock(),a.createElementBlock("div",{key:5,class:"img-container-playoff-home",style:a.normalizeStyle(`background-image: url('https://golstatsimages.blob.core.windows.net/todoelfut/brackets_400_${t.seasonId}.png?r=${Math.floor(Math.random()*1e4+1)}'); width: calc(100% - 80px); height: calc(700px - 200px);`)},null,4)):t.widthComponent>=595&&t.widthComponent<670?(a.openBlock(),a.createElementBlock("div",{key:6,class:"img-container-playoff-home",style:a.normalizeStyle(`background-image: url('https://golstatsimages.blob.core.windows.net/todoelfut/brackets_400_${t.seasonId}.png?r=${Math.floor(Math.random()*1e4+1)}'); width: calc(100% - 50px); height: calc(700px - 240px);`)},null,4)):t.widthComponent>=545&&t.widthComponent<595?(a.openBlock(),a.createElementBlock("div",{key:7,class:"img-container-playoff-home",style:a.normalizeStyle(`background-image: url('https://golstatsimages.blob.core.windows.net/todoelfut/brackets_400_${t.seasonId}.png?r=${Math.floor(Math.random()*1e4+1)}'); width: calc(100% - 50px); height: calc(700px - 280px);`)},null,4)):t.widthComponent>=485&&t.widthComponent<545?(a.openBlock(),a.createElementBlock("div",{key:8,class:"img-container-playoff-home",style:a.normalizeStyle(`background-image: url('https://golstatsimages.blob.core.windows.net/todoelfut/brackets_400_${t.seasonId}.png?r=${Math.floor(Math.random()*1e4+1)}'); width: calc(100% - 40px); height: calc(700px - 320px);`)},null,4)):t.widthComponent>=445&&t.widthComponent<485?(a.openBlock(),a.createElementBlock("div",{key:9,class:"img-container-playoff-home",style:a.normalizeStyle(`background-image: url('https://golstatsimages.blob.core.windows.net/todoelfut/brackets_400_${t.seasonId}.png?r=${Math.floor(Math.random()*1e4+1)}'); width: calc(100% - 40px); height: calc(700px - 360px);`)},null,4)):t.widthComponent>=385&&t.widthComponent<445?(a.openBlock(),a.createElementBlock("div",{key:10,class:"img-container-playoff-home",style:a.normalizeStyle(`background-image: url('https://golstatsimages.blob.core.windows.net/todoelfut/brackets_400_${t.seasonId}.png?r=${Math.floor(Math.random()*1e4+1)}'); width: calc(100% - 40px); height: calc(700px - 410px);`)},null,4)):t.widthComponent>=350&&t.widthComponent<385?(a.openBlock(),a.createElementBlock("div",{key:11,class:"img-container-playoff-home",style:a.normalizeStyle(`background-image: url('https://golstatsimages.blob.core.windows.net/todoelfut/brackets_400_${t.seasonId}.png?r=${Math.floor(Math.random()*1e4+1)}'); width: calc(100% - 20px); height: calc(700px - 420px);`)},null,4)):t.widthComponent<350?(a.openBlock(),a.createElementBlock("div",{key:12,class:"img-container-playoff-home",style:a.normalizeStyle(`background-image: url('https://golstatsimages.blob.core.windows.net/todoelfut/brackets_400_${t.seasonId}.png?r=${Math.floor(Math.random()*1e4+1)}'); width: calc(100% - 20px); height: calc(700px - 440px);`)},null,4)):a.createCommentVNode("",!0),QS])}const t_=Jd(JS,[["render",e_],["__scopeId","data-v-69900788"]]);function s_(s){const e=a.ref({width:0,height:0});function t(){const n=s.value.getBoundingClientRect();e.value.width=n.width,e.value.height=n.height}return a.onMounted(()=>{t(),window.addEventListener("resize",t)}),a.onUnmounted(()=>{window.removeEventListener("resize",t)}),{elementSize:e}}const n_={components:{GSCFilterperteam:x1,GSCTableperteam:nw,GscSwitchComponent:YS,GSCCarousel:vw,GSCTournamentSelect:aS,GSCSeasonSelect:AS,PlayOffIMG:t_},computed:{tableOfPhases(){return this.tournamentSelected?this.tournamentSelected.tournament_type===1?"Fases":this.tournamentSelected.tournament_type===2?"Play Off":"Tabla General":"Tabla General"},customStyle(){return{backgroundColor:this.background,border:`${this.borderType} ${this.borderWidth}px ${this.borderColor}`,height:this.height}},customStyleLanding(){return{boxShadow:"0px 4px 20px 0px rgba(0, 0, 0, 0.25)",backgroundColor:this.background,border:`${this.borderType} ${this.borderWidth}px ${this.borderColor}`,height:this.height,borderRadius:"9px"}},customStyleTitle(){return{color:this.colortitle}}},props:{tournamentsApiUrl:{type:String,default:""},awaitForTournaments:{type:Boolean,default:!1},externalTournaments:{type:Array,default:()=>[]},teamsVideos:{type:Array,default:()=>[]},showVideos:{type:Boolean,default:!0},teamId:{type:Number,default:0},filtersTeams:{type:Boolean,default:!0},teamDefaultSelect:{type:Number,default:0},season:{type:Number},currentSeasonId:{type:Number,default:0},tournament:{type:Number,default:-1},awaitForSeason:{type:Boolean,default:!0},type:{type:Number,default:0},typeView:{type:Number,default:-1},teamperpage:{type:Number,default:5},background:{type:String,default:"#0d1d29"},borderRadius:{type:String,default:"8px"},borderWidth:{type:Number,default:0},borderColor:{type:String,default:"#0d1d29"},borderType:{type:String,default:"solid"},height:{type:String,default:"auto"},colortitle:{type:String,default:"#FFFFFF"},isPaginationVisible:{type:Boolean,default:!1},tournamentsIdsToInclude:{type:Set,default:()=>new Set}},setup(){const s=a.ref("myDivRef"),{elementSize:e}=s_(s);return{myDivRef:s,elementSize:e}},data(){return{url:"https://jfxv8fqkn3.execute-api.us-west-2.amazonaws.com/prod/generalTable/",tournamentsUrl:"https://kefloixzy1.execute-api.us-west-2.amazonaws.com/prod/gs3/tournaments",tournaments:[],tournamentSelected:{seasons:[]},seasonSelected:{},retries:3,typeTournament:0,tableData:null,optionSelectedGroup:"Grupos",tableFull:!0,indexMyTeam:0,flaghideShow:!0,showNum:6,seasonSelect:0,teamselect:0,arrayTournaments:[],arraySeasons:{},seasonBytournament:[],teams:[],pagesteams:[],token:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MCwibmFtZSI6IlVzdWFyaW8gRnJlZSIsInVzZXJuYW1lIjoiZnJlZUBnb2xzdGF0cy5jb20iLCJlbWFpbCI6ImZyZWVAZ29sc3RhdHMuY29tIiwiaWF0IjoxNjA2NzU4Nzk1LCJleHAiOjE2MzgyOTQ3OTV9.kPNmP7yDtk38cAXrUyc7OHRh6J25VFqy-XUNzbK-4YE",lastUrl:"",lastData:null}},watch:{teamId(){this.fillData(this.lastData)},externalTournaments:{handler(s){s.length>0&&this.fillTournamentsData(s)},immediate:!0,deep:!0},teamDefaultSelect:{async handler(s){this.teamselect=s},immediate:!0},currentSeasonId:{async handler(s,e){this.type==1&&s!==0&&s!==e&&await this.getTableList(this.currentSeasonId)},immediate:!0}},async created(){try{if(!this.awaitForTournaments){const s=await this.fetchTournaments(3);await this.fillTournamentsData(s)}}catch(s){throw new Error(s)}},methods:{changeType(s){this.optionSelectedGroup=s},setOpenMedia(s){const e={1e3:[12,55,"35_r","54_r"],1001:["57_r","326_r","56_r","60_r","59_r","55_r",35,54],0:[]},t=[1,2,3],n=e[s.category]||[39,607,608,12,55,54,35,14,52,15,53,466,477,40,257];let i={seasonId:this.seasonSelect,mainSectionType:1,playListType:s.playListType,categoryIds:n,gameIds:null,playerIds:[],teamId:s.team,matchResult:s.matchResult?[s.matchResult]:t,isRivalSubject:s.isRivalSubject,playData:{},advancedFilter:{playListTitle:s.title}};s.category!==0&&(i.advancedFilter.mainCategoryId=s.category),this.$emit("openmedia",i)},openTableProfile(s){const e={team:s,season:this.seasonSelect};this.$emit("openTableProfile",e)},async fillTournamentsData(s){try{this.tournaments=s.map(e=>({...e.tournament,seasons:e.seasons}));for(const e in s){this.arrayTournaments.push({id:s[e].tournament.id,name:s[e].tournament.name}),this.arraySeasons[s[e].tournament.id]={};for(const t in s[e].seasons)this.arraySeasons[s[e].tournament.id][" "+s[e].seasons[t].id]={},this.arraySeasons[s[e].tournament.id][" "+s[e].seasons[t].id].id=s[e].seasons[t].id,this.arraySeasons[s[e].tournament.id][" "+s[e].seasons[t].id].name=s[e].seasons[t].name}if(this.currentSeasonId===0){const e=s.find(t=>t._id===1).seasons[0];await this.getTableList(e.id)}}catch(e){return Promise.reject(e)}},clickAll(s){this.teamselect=s},clickTeam(s){this.teamselect=s},onInputTournament(s){this.typeTournament=s.tournament_type,this.tournamentSelected.id!==s.id&&(this.tournamentSelected=s)},async onInputSeason(s){this.seasonSelected!==s.id&&(this.seasonSelected=s.id,this.$emit("change-season-id",s.id),await this.getTableList(s.id))},async getTableList(s){try{const e=`${this.url}${s}`;if(this.lastUrl===e)return;this.lastUrl=e,this.seasonSelect=s;const t=vd.create({headers:{Authorization:`${this.token}`}});this.lastData=await t.get(this.lastUrl),this.fillData(this.lastData)}catch(e){return Promise.reject(e)}},fillData(s){if(this.teams=[],this.tableData=[],this.pagesteams=[],this.tournamentSelected.tournament_type===0||this.typeView===0){if(this.tableData=s.data.data,this.indexMyTeam=this.tableData.findIndex(e=>e.team_id===this.teamId),this.indexMyTeam>4){let e=[];for(let t=0;t<this.tableData.length;t++)t==4?(e.push(this.tableData[this.indexMyTeam]),e.push(this.tableData[t])):e.push(this.tableData[t]);this.tableData=e}if(this.teamperpage>0){let e=[];this.tableData.forEach((t,n)=>{e.push(t),(n+1)%this.teamperpage===0&&(this.pagesteams.push([...e]),e=[])}),e.length&&this.pagesteams.push([...e])}for(let e=0;e<this.tableData.length;e++){const t=this.teams.findIndex(n=>n.id===this.tableData[e].team_id);this.tableData[e].last_five_games=this.tableData[e].last_five_games.reverse(),t==-1&&this.teams.push({id:this.tableData[e].team_id,team:this.tableData[e].team_name,logo:this.tableData[e].team_logo})}this.teams.sort((e,t)=>{const n=e.team.toUpperCase(),i=t.team.toUpperCase();return n<i?-1:n>i?1:0})}else if(this.tournamentSelected.tournament_type==2||this.typeView==2)this.tableData=s.data.data;else if(this.tournamentSelected.tournament_type==1||this.typeView==1){this.tableData=s.data.groups;for(let e=0;e<this.tableData.length;e++)for(let t=0;t<this.tableData[e].data.length;t++)this.tableData[e].data[t].last_five_games=this.tableData[e].data[t].last_five_games.reverse(),this.teams.findIndex(n=>n.id===this.tableData[e].data[t].team_id)==-1&&this.teams.push({id:this.tableData[e].data[t].team_id,team:this.tableData[e].data[t].team_name,logo:this.tableData[e].data[t].team_logo});this.teams.sort((e,t)=>{const n=e.team.toUpperCase(),i=t.team.toUpperCase();return n<i?-1:n>i?1:0})}},async fetchTournaments(){const s=vd.create({headers:{Authorization:`${this.token}`}}),{data:e}=await s.get(this.tournamentsApiUrl||this.tournamentsUrl);return e}}},Zd=s=>(a.pushScopeId("data-v-b0518cf4"),s=s(),a.popScopeId(),s),a_={key:0,class:"gsc-generaltable__container"},i_={key:1,class:"gsc-generaltable__row-sep"},r_=Zd(()=>a.createElementVNode("div",{class:"gsc-generaltable__row-sep__line"},null,-1)),o_=[r_],l_={key:1,class:"gsc-generaltable__container"},c_={class:"header-switch-option-groups"},d_={key:1,class:"gsc-generaltable__row-sep"},u_=Zd(()=>a.createElementVNode("div",{class:"gsc-generaltable__row-sep__line"},null,-1)),h_=[u_],m_={class:"title-group"},f_={class:"row-table-carrousel"},g_={class:"group-table"},p_={class:"title-group"},y_={key:1,class:"carousel-table-landing"},b_={class:"row-table-carrousel"},w_={class:"header-switch-option-groups-home"},S_={class:"row-table-carrousel"},__={class:"group-table"},k_={class:"title-group"};function E_(s,e,t,n,i,r){const o=a.resolveComponent("GSCTournamentSelect"),l=a.resolveComponent("GSCSeasonSelect"),d=a.resolveComponent("GSCFilterperteam"),c=a.resolveComponent("GSCTableperteam"),u=a.resolveComponent("GscSwitchComponent"),m=a.resolveComponent("GSCCarousel"),f=a.resolveComponent("PlayOffIMG");return a.openBlock(),a.createElementBlock("div",{class:"gsc-generaltable",style:a.normalizeStyle(t.type==0?r.customStyle:r.customStyleLanding),ref:"myDivRef"},[t.type==0?(a.openBlock(),a.createElementBlock(a.Fragment,{key:0},[a.createElementVNode("div",{class:a.normalizeClass(["gsc-generaltable__row-toolbar",n.elementSize.width<590?"style-display":""])},[a.createElementVNode("div",{class:a.normalizeClass(["gsc-generaltable__row-toolbar__title",n.elementSize.width<768?"style-auto":""]),style:a.normalizeStyle(r.customStyleTitle)},a.toDisplayString(r.tableOfPhases),7),a.createElementVNode("div",{class:a.normalizeClass(["gsc-generaltable__row-toolbar__selectors",n.elementSize.width<768&&n.elementSize.width>590?"style-auto":n.elementSize.width<590?"width-100":""])},[a.createElementVNode("div",{class:a.normalizeClass(["gsc-generaltable__row-toolbar__selectors__tournaments",n.elementSize.width<590&&n.elementSize.width>=420?"width-50":n.elementSize.width<420?"width-30":""])},[a.createVNode(o,{"current-season-id":t.currentSeasonId,onInput:r.onInputTournament,"tournaments-ids-to-include":t.tournamentsIdsToInclude,"api-url":t.tournamentsApiUrl},null,8,["current-season-id","onInput","tournaments-ids-to-include","api-url"])],2),a.createElementVNode("div",{class:a.normalizeClass(["gsc-generaltable__row-toolbar__selectors__seasons",n.elementSize.width<590&&n.elementSize.width>=420?"width-50":n.elementSize.width<420?"width-30":""])},[a.createVNode(l,{"current-season-id":t.currentSeasonId,seasons:i.tournamentSelected.seasons,onInput:r.onInputSeason},null,8,["current-season-id","seasons","onInput"])],2)],2)],2),i.typeTournament==0?(a.openBlock(),a.createElementBlock("div",a_,[t.filtersTeams?(a.openBlock(),a.createBlock(d,{key:0,data:i.teams,"background-color":"none","contain-border-radius":"8px",onClickTeam:r.clickTeam,onClickAll:r.clickAll},null,8,["data","onClickTeam","onClickAll"])):a.createCommentVNode("",!0),t.filtersTeams?(a.openBlock(),a.createElementBlock("div",i_,o_)):a.createCommentVNode("",!0),i.tableData?(a.openBlock(!0),a.createElementBlock(a.Fragment,{key:2},a.renderList(i.tableData,(p,h)=>(a.openBlock(),a.createBlock(c,{key:h,onOpenmedia:r.setOpenMedia,onOpenTableProfile:r.openTableProfile,"is-videos":t.showVideos,"teams-videos":t.teamsVideos,isheader:h==0,"background-color":i.teamselect!=0&&i.teamselect==p.team_id?"rgba(30, 60, 81, 0.5)":h%2===0?"#172531":"#0d1d29",data:p},null,8,["onOpenmedia","onOpenTableProfile","is-videos","teams-videos","isheader","background-color","data"]))),128)):a.createCommentVNode("",!0)])):a.createCommentVNode("",!0),i.typeTournament==1?(a.openBlock(),a.createElementBlock("div",l_,[a.createElementVNode("div",c_,[a.createElementVNode("div",{class:a.normalizeClass(n.elementSize.width>880?"switch-size-group":"switch-size-group-movil")},[a.createVNode(u,{type:1,buttons:["Grupos","Play Off"],"selected-option":i.optionSelectedGroup,"border-radius":"32px",height:"28px","border-width":"1px","border-width-container":"0.5px","background-option-active":"#0d1d29","color-option-active":"#cbee6b","font-size":"12px",width:"270px",fontFamily:"Poppins-Light",onInput:r.changeType,arrowsScrollHide:!1,arrowsPosition:"absolute"},null,8,["selected-option","onInput"])],2)]),i.optionSelectedGroup=="Grupos"?(a.openBlock(),a.createElementBlock(a.Fragment,{key:0},[t.filtersTeams?(a.openBlock(),a.createBlock(d,{key:0,data:i.teams,"background-color":"none","contain-border-radius":"8px",onClickTeam:r.clickTeam,onClickAll:r.clickAll},null,8,["data","onClickTeam","onClickAll"])):a.createCommentVNode("",!0),t.filtersTeams?(a.openBlock(),a.createElementBlock("div",d_,h_)):a.createCommentVNode("",!0),n.elementSize.width>600?(a.openBlock(!0),a.createElementBlock(a.Fragment,{key:2},a.renderList(i.tableData,(p,h)=>(a.openBlock(),a.createElementBlock("div",{key:h,class:"group-table"},[a.createElementVNode("div",m_,a.toDisplayString(p.name),1),(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(p.data,(g,y)=>(a.openBlock(),a.createBlock(c,{key:y,onOpenmedia:r.setOpenMedia,onOpenTableProfile:r.openTableProfile,"is-videos":t.showVideos,"teams-videos":t.teamsVideos,isheader:y==0,"background-color":i.teamselect!=0&&i.teamselect==g.team_id?"rgba(30, 60, 81, 0.5)":y%2===0?"#172531":"#0d1d29",data:g},null,8,["onOpenmedia","onOpenTableProfile","is-videos","teams-videos","isheader","background-color","data"]))),128))]))),128)):(a.openBlock(),a.createBlock(m,{key:3,isPaginationVisible:t.isPaginationVisible,items:i.tableData},{default:a.withCtx(({item:p})=>[a.createElementVNode("div",f_,[a.createElementVNode("div",g_,[a.createElementVNode("div",p_,a.toDisplayString(p.name),1),(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(p.data,(h,g)=>(a.openBlock(),a.createBlock(c,{key:g,onOpenmedia:r.setOpenMedia,onOpenTableProfile:r.openTableProfile,"is-videos":t.showVideos,"teams-videos":t.teamsVideos,isheader:g==0,"background-color":i.teamselect!=0&&i.teamselect==h.team_id?"rgba(30, 60, 81, 0.5)":(s.index%2,"#172531"),data:h},null,8,["onOpenmedia","onOpenTableProfile","is-videos","teams-videos","isheader","background-color","data"]))),128))])])]),_:1},8,["isPaginationVisible","items"]))],64)):(a.openBlock(),a.createBlock(f,{key:1,"tournament-id":i.tournamentSelected.id,"season-id":i.seasonSelect,"width-component":n.elementSize.width},null,8,["tournament-id","season-id","width-component"]))])):a.createCommentVNode("",!0),i.typeTournament==2?(a.openBlock(),a.createBlock(f,{key:2,"tournament-id":i.tournamentSelected.id,"season-id":i.seasonSelect,"width-component":n.elementSize.width},null,8,["tournament-id","season-id","width-component"])):a.createCommentVNode("",!0)],64)):(a.openBlock(),a.createElementBlock("div",y_,[t.typeView==0?(a.openBlock(),a.createBlock(m,{key:0,isPaginationVisible:t.isPaginationVisible,items:i.pagesteams},{default:a.withCtx(({item:p})=>[a.createElementVNode("div",b_,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(p,(h,g)=>(a.openBlock(),a.createBlock(c,{key:g,onOpenmedia:r.setOpenMedia,onOpenTableProfile:r.openTableProfile,"is-games":!1,"teams-videos":t.teamsVideos,"is-videos":t.showVideos,ItemHeight:"60px",teamSelected:i.teamselect,isheader:g==0,"background-color":i.teamselect!=0&&i.teamselect==h.team_id?"rgba(30, 60, 81, 0.5)":g%2===0?"#172531":"#0d1d29",data:h},null,8,["onOpenmedia","onOpenTableProfile","teams-videos","is-videos","teamSelected","isheader","background-color","data"]))),128))])]),_:1},8,["isPaginationVisible","items"])):a.createCommentVNode("",!0),t.typeView==1?(a.openBlock(),a.createElementBlock(a.Fragment,{key:1},[a.createElementVNode("div",w_,[a.createElementVNode("div",{class:a.normalizeClass(n.elementSize.width>880?"switch-size-group":"switch-size-group-movil")},[a.createVNode(u,{type:1,buttons:["Grupos","Play Off"],"selected-option":i.optionSelectedGroup,"border-radius":"32px",height:"28px","border-width":"1px","border-width-container":"0.5px","background-option-active":"#0d1d29","color-option-active":"#cbee6b","font-size":"12px",width:"270px",fontFamily:"Poppins-Light",onInput:r.changeType,arrowsScrollHide:!1,arrowsPosition:"absolute"},null,8,["selected-option","onInput"])],2)]),i.optionSelectedGroup=="Grupos"?(a.openBlock(),a.createBlock(m,{key:0,isPaginationVisible:t.isPaginationVisible,items:i.tableData},{default:a.withCtx(({item:p})=>[a.createElementVNode("div",S_,[a.createElementVNode("div",__,[a.createElementVNode("div",k_,a.toDisplayString(p.name),1),(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(p.data,(h,g)=>(a.openBlock(),a.createBlock(c,{key:g,onOpenmedia:r.setOpenMedia,onOpenTableProfile:r.openTableProfile,"is-videos":t.showVideos,"teams-videos":t.teamsVideos,isheader:g==0,"background-color":i.teamselect!=0&&i.teamselect==h.team_id?"rgba(30, 60, 81, 0.5)":(s.index%2,"#172531"),data:h},null,8,["onOpenmedia","onOpenTableProfile","is-videos","teams-videos","isheader","background-color","data"]))),128))])])]),_:1},8,["isPaginationVisible","items"])):(a.openBlock(),a.createElementBlock(a.Fragment,{key:1},[i.tournamentSelected.id?(a.openBlock(),a.createBlock(f,{key:0,"tournament-id":i.tournamentSelected.id,"season-id":i.seasonSelect,"width-component":n.elementSize.width},null,8,["tournament-id","season-id","width-component"])):(a.openBlock(),a.createBlock(f,{key:1,"tournament-id":t.tournament,"season-id":i.seasonSelect,"width-component":n.elementSize.width},null,8,["tournament-id","season-id","width-component"]))],64))],64)):a.createCommentVNode("",!0),t.typeView==2?(a.openBlock(),a.createElementBlock(a.Fragment,{key:2},[i.tournamentSelected.id?(a.openBlock(),a.createBlock(f,{key:0,"tournament-id":i.tournamentSelected.id,"season-id":i.seasonSelect,"width-component":n.elementSize.width},null,8,["tournament-id","season-id","width-component"])):(a.openBlock(),a.createBlock(f,{key:1,"tournament-id":t.tournament,"season-id":i.seasonSelect,"width-component":n.elementSize.width},null,8,["tournament-id","season-id","width-component"]))],64)):a.createCommentVNode("",!0)]))],4)}const T_=Jd(n_,[["render",E_],["__scopeId","data-v-b0518cf4"]]);function C_(s){const e=a.ref({width:0,height:0});function t(){const n=s.value.getBoundingClientRect();e.value.width=n.width,e.value.height=n.height}return a.onMounted(()=>{t(),window.addEventListener("resize",t)}),a.onUnmounted(()=>{window.removeEventListener("resize",t)}),{elementSize:e}}const x_=(s,e)=>{const t=s.__vccOpts||s;for(const[n,i]of e)t[n]=i;return t},Br={name:"ScrollableContainer",props:{backgroundColor:{type:String,default:"#0D1D29"},pxScroll:{type:Number,default:100},arrows:{type:Boolean,default:!0},arrowsHideOnNoScroll:{type:Boolean,default:!1},arrowsScrollHide:{type:Boolean,default:!1},arrowsColor:{type:String,default:"#CBEE6B"},arrowsHeight:{type:Number,default:15},arrowsWidth:{type:Number,default:15},arrowsPadding:{type:Number,default:5},arrowsMargin:{type:Number,default:10},arrowsRadius:{type:String,default:"0%"},arrowsBorder:{type:String,default:"none"},arrowsBackground:{type:String,default:"#0D1D29"},arrowsContainerBgL:{type:String,default:"#0D1D29"},arrowsContainerBgR:{type:String,default:"#0D1D29"},scrollColor:{type:String,default:"#c3e569"},arrowsPosition:{type:String,default:"relative"},height:{type:String,default:"100%"}},data(){return{showLeftArrow:!1,showRightArrow:!0,intervalid1:""}},mounted(){this.getScroll(),this.arrowsHideOnNoScroll&&window.addEventListener("resize",this.resizeSlider),this.arrowsHideOnNoScroll&&this.listenerLoad()},beforeUnmount(){this.arrowsHideOnNoScroll&&window.removeEventListener("resize",this.resizeSlider),this.arrowsHideOnNoScroll&&clearInterval(this.intervalid1)},computed:{getViewBox(){return`-2 0 ${this.arrowsWidth} ${this.arrowsHeight}`},hideShowLeftArrow(){let s="";return this.arrowsPosition=="absolute"?s="leftAbsolute":s="leftRelative",this.arrowsScrollHide?this.showLeftArrow?s+=" showArrowSlide":s+=" hideArrowSlide":s+=" showArrowSlide",s},hideShowRightArrow(){let s="";return this.arrowsPosition=="absolute"?s="rightAbsolute":s="rightRelative",this.arrowsScrollHide?this.showRightArrow?s+=" showArrowSlide":s+=" hideArrowSlide":s+=" showArrowSlide",s}},methods:{scrollLeft(){this.$refs.content.scrollLeft-=this.pxScroll},scrollRight(){this.$refs.content.scrollLeft+=this.pxScroll},getScroll(){let s=0;this.arrowsPosition=="relative"?s=this.$refs.content.scrollWidth-this.$el.clientWidth+this.arrowsMargin*2+this.arrowsWidth*4:s=this.$refs.content.scrollWidth-this.$el.clientWidth,this.$refs.content.scrollLeft==0?this.showLeftArrow=!1:this.showLeftArrow=!0,s>0&&(this.$refs.content.scrollLeft==s?this.showRightArrow=!1:this.showRightArrow=!0),this.arrowsHideOnNoScroll&&this.$refs.content.clientWidth===this.$refs.content.scrollWidth&&(this.showRightArrow=!1)},resizeSlider(){this.getScroll();let s;clearTimeout(s),s=setTimeout(this.getScroll,1e3)},listenerLoad(){this.intervalid1=setInterval((function(){var s=this.$el.clientWidth,e=this.$refs.content.scrollWidth;e>0&&s>0&&(e>s?(this.showRightArrow=!0,clearInterval(this.intervalid1)):clearInterval(this.intervalid1))}).bind(this),3e3)}}},Qd=()=>{a.useCssVars(s=>({"42d3dba6":s.backgroundColor,"4de5d2cf":s.height,"67bafa7b":s.arrowsPosition,"61e1032e":s.arrowsPadding+"px","79a4ac00":s.arrowsBackground,"6b8355c6":s.arrowsHeight*2+"px","29a58368":s.arrowsWidth*2+"px","3622fa64":s.arrowsRadius,"1ba101fe":s.arrowsBorder,"0bafb5e6":s.arrowsMargin+"px","423a44b8":s.arrowsContainerBgL,"423a44be":s.arrowsContainerBgR,"10b117ee":s.scrollColor}))},eu=Br.setup;Br.setup=eu?(s,e)=>(Qd(),eu(s,e)):Qd;const A_={ref:"gscScrollableContainer",class:"scrollable-container"},L_={class:"scrollable-arrows"},I_=["width","height","viewBox"],B_=["stroke"],R_={class:"scrollable-wrapper"},v_={class:"scrollable-arrows"},N_=["width","height","viewBox"],D_=["stroke"];function P_(s,e,t,n,i,r){return a.openBlock(),a.createElementBlock("div",A_,[t.arrows?(a.openBlock(),a.createElementBlock("div",{key:0,class:a.normalizeClass(["arrows-container",r.hideShowLeftArrow]),onClick:e[0]||(e[0]=(...o)=>r.scrollLeft&&r.scrollLeft(...o))},[a.createElementVNode("div",L_,[(a.openBlock(),a.createElementBlock("svg",{width:t.arrowsWidth,height:t.arrowsHeight,viewBox:r.getViewBox,fill:"none",xmlns:"http://www.w3.org/2000/svg"},[a.createElementVNode("path",{d:"M6.36523 13.788L1.10146 8.52429C0.479824 7.90265 0.479824 6.88541 1.10147 6.26377L6.36523 1",stroke:t.arrowsColor},null,8,B_)],8,I_))])],2)):a.createCommentVNode("",!0),a.createElementVNode("div",{class:"scrollable-content scrollable-content-slider",ref:"content",onScroll:e[1]||(e[1]=(...o)=>r.getScroll&&r.getScroll(...o))},[a.createElementVNode("div",R_,[a.renderSlot(s.$slots,"default",{},void 0,!0)])],544),t.arrows?(a.openBlock(),a.createElementBlock("div",{key:1,id:"arrows-container-right",class:a.normalizeClass(["arrows-container",r.hideShowRightArrow]),onClick:e[2]||(e[2]=(...o)=>r.scrollRight&&r.scrollRight(...o))},[a.createElementVNode("div",v_,[(a.openBlock(),a.createElementBlock("svg",{width:t.arrowsWidth,height:t.arrowsHeight,viewBox:r.getViewBox,fill:"none",xmlns:"http://www.w3.org/2000/svg"},[a.createElementVNode("path",{d:"M0.634765 1.21195L5.89853 6.47571C6.52018 7.09735 6.52018 8.11459 5.89853 8.73623L0.634766 14",stroke:t.arrowsColor},null,8,D_)],8,N_))])],2)):a.createCommentVNode("",!0)],512)}const O_=x_(Br,[["render",P_],["__scopeId","data-v-b548a08d"]]),F_=(s,e)=>{const t=s.__vccOpts||s;for(const[n,i]of e)t[n]=i;return t},Rr={components:{GSCSlider:O_},props:{arrow:{type:Boolean,required:!0},buttons:{type:Array,required:!0},width:{type:String,default:"300px"},height:{type:String,default:"80px"},fontSize:{type:String,default:"16px"},colorFont:{type:String,default:"#ffffff"},backgroundOptionActive:{type:String,default:"#0d1d29"},colorOptionActive:{type:String,default:"#cbee6b"},colorOptionDisable:{type:String,default:"gray"},backgroundOptionDisable:{type:String,default:"#0d1d29"},fontFamily:{type:String,default:"Poppins-Semibold"},borderWidth:{type:String,default:"3px"},borderRadius:{type:String,default:"0px"},selectedOption:{type:String,default:""},type:{type:Number,default:0},borderWidthContainer:{type:String,default:"1px"},background:{type:String,default:"#0d1d29"},borderColorContainer:{type:String,default:"#505355"},pxScroll:{type:Number,default:100},scrollColor:{type:String,default:"#c3e569"},arrowsPosition:{type:String,default:"relative"},arrowsScrollHide:{type:Boolean,default:!1},arrowsBackground:{type:String,default:"#0D1D29"},arrowsContainerBgL:{type:String,default:"#0D1D29"},arrowsContainerBgR:{type:String,default:"#0D1D29"},arrowsMargin:{type:Number,default:10},arrowsRadius:{type:String,default:"0%"},arrowsBorder:{type:String,default:"none"}},setup(){const s=a.ref("myDivRef"),{elementSize:e}=C_(s);return{myDivRef:s,elementSize:e}},methods:{clickEmitEvent(s){this.$emit("input",s)},customGrid(s){var e={};return s.width>768?e={fontSize:"16px"}:s.width>480?e={fontSize:"14px"}:e={fontSize:"12px"},e}}},tu=()=>{a.useCssVars(s=>({cff4a118:s.fontSize,"42aab7f6":s.borderWidth,d29bcbd2:s.fontFamily,df6c5a9c:s.background,"09b32862":s.borderRadius,"8c0d6daa":s.borderWidthContainer,e8a86fa4:s.borderColorContainer,"179494da":s.colorOptionActive,cea5647c:s.width}))},su=Rr.setup;Rr.setup=su?(s,e)=>(tu(),su(s,e)):tu;const M_={ref:"myDivRef"},V_={key:0,class:"gs-switch-container"},$_=["onClick"],U_={key:1,class:"gs-switch-container-type"},z_=["onClick"],G_={key:2,class:"gs-switch-container-carousel"},j_=["onClick"];function H_(s,e,t,n,i,r){const o=a.resolveComponent("GSCSlider");return a.openBlock(),a.createElementBlock("div",M_,[t.type==0?(a.openBlock(),a.createElementBlock("div",V_,[a.createElementVNode("div",{class:"gs-switch-container__control",style:a.normalizeStyle([r.customGrid(n.elementSize)])},[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(t.buttons,(l,d)=>(a.openBlock(),a.createElementBlock("div",{class:"gs-switch-container__control__button-option",style:a.normalizeStyle([{height:t.height},t.selectedOption==l?{borderColor:t.colorOptionActive,color:t.colorFont+"!important",background:t.backgroundOptionActive}:{borderColor:t.colorOptionDisable,color:"grey !important"}]),key:d,onClick:c=>(t.selectedOption=l,r.clickEmitEvent(l))},a.toDisplayString(l),13,$_))),128))],4),a.renderSlot(s.$slots,t.selectedOption,{},void 0,!0)])):a.createCommentVNode("",!0),t.type==1?(a.openBlock(),a.createElementBlock("div",U_,[a.createElementVNode("div",{class:"gs-switch-container-type__control",style:a.normalizeStyle([r.customGrid(n.elementSize)])},[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(t.buttons,(l,d)=>(a.openBlock(),a.createElementBlock("div",{class:"gs-switch-container-type__control__button-option-type",style:a.normalizeStyle([{height:t.height},t.selectedOption==l?{borderColor:t.colorOptionActive,color:t.colorFont+"!important",background:t.backgroundOptionActive}:{borderColor:t.colorOptionDisable,borderWidth:"0px",borderWidth:"0px !important",color:"grey !important",background:t.backgroundOptionDisable}]),key:d,onClick:c=>(t.selectedOption=l,r.clickEmitEvent(l))},a.toDisplayString(l),13,z_))),128))],4)])):a.createCommentVNode("",!0),t.type==2?(a.openBlock(),a.createElementBlock("div",G_,[a.createVNode(o,{arrows:t.arrow,"background-color":t.background,"px-scroll":t.pxScroll,"scroll-color":t.scrollColor,"arrows-position":t.arrowsPosition,arrowsScrollHide:t.arrowsScrollHide,"arrows-background":t.arrowsBackground,"arrows-container-bg-l":t.arrowsContainerBgL,"arrows-container-bg-r":t.arrowsContainerBgR,"arrows-margin":t.arrowsMargin,"arrows-radius":t.arrowsRadius,"arrows-border":t.arrowsBorder},{default:a.withCtx(()=>[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(t.buttons,(l,d)=>(a.openBlock(),a.createElementBlock("div",{class:"button-option-multi",style:a.normalizeStyle([{height:t.height},t.selectedOption==l?{borderColor:t.colorOptionActive,color:t.colorFont+"!important",background:t.backgroundOptionActive}:{borderColor:t.colorOptionDisable,color:"grey !important"}]),key:d,onClick:c=>(t.selectedOption=l,r.clickEmitEvent(l))},a.toDisplayString(l),13,j_))),128))]),_:1},8,["arrows","background-color","px-scroll","scroll-color","arrows-position","arrowsScrollHide","arrows-background","arrows-container-bg-l","arrows-container-bg-r","arrows-margin","arrows-radius","arrows-border"])])):a.createCommentVNode("",!0)],512)}const vr=F_(Rr,[["render",H_],["__scopeId","data-v-8a86dfaf"]]);function nu(s,e){return function(){return s.apply(e,arguments)}}const{toString:W_}=Object.prototype,{getPrototypeOf:Nr}=Object,ha=(s=>e=>{const t=W_.call(e);return s[t]||(s[t]=t.slice(8,-1).toLowerCase())})(Object.create(null)),Nt=s=>(s=s.toLowerCase(),e=>ha(e)===s),ma=s=>e=>typeof e===s,{isArray:Us}=Array,yn=ma("undefined");function K_(s){return s!==null&&!yn(s)&&s.constructor!==null&&!yn(s.constructor)&&Ct(s.constructor.isBuffer)&&s.constructor.isBuffer(s)}const au=Nt("ArrayBuffer");function q_(s){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(s):e=s&&s.buffer&&au(s.buffer),e}const Y_=ma("string"),Ct=ma("function"),iu=ma("number"),fa=s=>s!==null&&typeof s=="object",J_=s=>s===!0||s===!1,ga=s=>{if(ha(s)!=="object")return!1;const e=Nr(s);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in s)&&!(Symbol.iterator in s)},X_=Nt("Date"),Z_=Nt("File"),Q_=Nt("Blob"),e2=Nt("FileList"),t2=s=>fa(s)&&Ct(s.pipe),s2=s=>{let e;return s&&(typeof FormData=="function"&&s instanceof FormData||Ct(s.append)&&((e=ha(s))==="formdata"||e==="object"&&Ct(s.toString)&&s.toString()==="[object FormData]"))},n2=Nt("URLSearchParams"),[a2,i2,r2,o2]=["ReadableStream","Request","Response","Headers"].map(Nt),l2=s=>s.trim?s.trim():s.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function bn(s,e,{allOwnKeys:t=!1}={}){if(s===null||typeof s>"u")return;let n,i;if(typeof s!="object"&&(s=[s]),Us(s))for(n=0,i=s.length;n<i;n++)e.call(null,s[n],n,s);else{const r=t?Object.getOwnPropertyNames(s):Object.keys(s),o=r.length;let l;for(n=0;n<o;n++)l=r[n],e.call(null,s[l],l,s)}}function ru(s,e){e=e.toLowerCase();const t=Object.keys(s);let n=t.length,i;for(;n-- >0;)if(i=t[n],e===i.toLowerCase())return i;return null}const Ts=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,ou=s=>!yn(s)&&s!==Ts;function Dr(){const{caseless:s}=ou(this)&&this||{},e={},t=(n,i)=>{const r=s&&ru(e,i)||i;ga(e[r])&&ga(n)?e[r]=Dr(e[r],n):ga(n)?e[r]=Dr({},n):Us(n)?e[r]=n.slice():e[r]=n};for(let n=0,i=arguments.length;n<i;n++)arguments[n]&&bn(arguments[n],t);return e}const c2=(s,e,t,{allOwnKeys:n}={})=>(bn(e,(i,r)=>{t&&Ct(i)?s[r]=nu(i,t):s[r]=i},{allOwnKeys:n}),s),d2=s=>(s.charCodeAt(0)===65279&&(s=s.slice(1)),s),u2=(s,e,t,n)=>{s.prototype=Object.create(e.prototype,n),s.prototype.constructor=s,Object.defineProperty(s,"super",{value:e.prototype}),t&&Object.assign(s.prototype,t)},h2=(s,e,t,n)=>{let i,r,o;const l={};if(e=e||{},s==null)return e;do{for(i=Object.getOwnPropertyNames(s),r=i.length;r-- >0;)o=i[r],(!n||n(o,s,e))&&!l[o]&&(e[o]=s[o],l[o]=!0);s=t!==!1&&Nr(s)}while(s&&(!t||t(s,e))&&s!==Object.prototype);return e},m2=(s,e,t)=>{s=String(s),(t===void 0||t>s.length)&&(t=s.length),t-=e.length;const n=s.indexOf(e,t);return n!==-1&&n===t},f2=s=>{if(!s)return null;if(Us(s))return s;let e=s.length;if(!iu(e))return null;const t=new Array(e);for(;e-- >0;)t[e]=s[e];return t},g2=(s=>e=>s&&e instanceof s)(typeof Uint8Array<"u"&&Nr(Uint8Array)),p2=(s,e)=>{const t=(s&&s[Symbol.iterator]).call(s);let n;for(;(n=t.next())&&!n.done;){const i=n.value;e.call(s,i[0],i[1])}},y2=(s,e)=>{let t;const n=[];for(;(t=s.exec(e))!==null;)n.push(t);return n},b2=Nt("HTMLFormElement"),w2=s=>s.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,t,n){return t.toUpperCase()+n}),lu=(({hasOwnProperty:s})=>(e,t)=>s.call(e,t))(Object.prototype),S2=Nt("RegExp"),cu=(s,e)=>{const t=Object.getOwnPropertyDescriptors(s),n={};bn(t,(i,r)=>{let o;(o=e(i,r,s))!==!1&&(n[r]=o||i)}),Object.defineProperties(s,n)},_2=s=>{cu(s,(e,t)=>{if(Ct(s)&&["arguments","caller","callee"].indexOf(t)!==-1)return!1;const n=s[t];if(Ct(n)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+t+"'")})}})},k2=(s,e)=>{const t={},n=i=>{i.forEach(r=>{t[r]=!0})};return Us(s)?n(s):n(String(s).split(e)),t},E2=()=>{},T2=(s,e)=>s!=null&&Number.isFinite(s=+s)?s:e,Pr="abcdefghijklmnopqrstuvwxyz",du="0123456789",uu={DIGIT:du,ALPHA:Pr,ALPHA_DIGIT:Pr+Pr.toUpperCase()+du},C2=(s=16,e=uu.ALPHA_DIGIT)=>{let t="";const{length:n}=e;for(;s--;)t+=e[Math.random()*n|0];return t};function x2(s){return!!(s&&Ct(s.append)&&s[Symbol.toStringTag]==="FormData"&&s[Symbol.iterator])}const A2=s=>{const e=new Array(10),t=(n,i)=>{if(fa(n)){if(e.indexOf(n)>=0)return;if(!("toJSON"in n)){e[i]=n;const r=Us(n)?[]:{};return bn(n,(o,l)=>{const d=t(o,i+1);!yn(d)&&(r[l]=d)}),e[i]=void 0,r}}return n};return t(s,0)},L2=Nt("AsyncFunction"),I2=s=>s&&(fa(s)||Ct(s))&&Ct(s.then)&&Ct(s.catch),hu=((s,e)=>s?setImmediate:e?((t,n)=>(Ts.addEventListener("message",({source:i,data:r})=>{i===Ts&&r===t&&n.length&&n.shift()()},!1),i=>{n.push(i),Ts.postMessage(t,"*")}))(`axios@${Math.random()}`,[]):t=>setTimeout(t))(typeof setImmediate=="function",Ct(Ts.postMessage)),B2=typeof queueMicrotask<"u"?queueMicrotask.bind(Ts):typeof process<"u"&&process.nextTick||hu,O={isArray:Us,isArrayBuffer:au,isBuffer:K_,isFormData:s2,isArrayBufferView:q_,isString:Y_,isNumber:iu,isBoolean:J_,isObject:fa,isPlainObject:ga,isReadableStream:a2,isRequest:i2,isResponse:r2,isHeaders:o2,isUndefined:yn,isDate:X_,isFile:Z_,isBlob:Q_,isRegExp:S2,isFunction:Ct,isStream:t2,isURLSearchParams:n2,isTypedArray:g2,isFileList:e2,forEach:bn,merge:Dr,extend:c2,trim:l2,stripBOM:d2,inherits:u2,toFlatObject:h2,kindOf:ha,kindOfTest:Nt,endsWith:m2,toArray:f2,forEachEntry:p2,matchAll:y2,isHTMLForm:b2,hasOwnProperty:lu,hasOwnProp:lu,reduceDescriptors:cu,freezeMethods:_2,toObjectSet:k2,toCamelCase:w2,noop:E2,toFiniteNumber:T2,findKey:ru,global:Ts,isContextDefined:ou,ALPHABET:uu,generateString:C2,isSpecCompliantForm:x2,toJSONObject:A2,isAsyncFn:L2,isThenable:I2,setImmediate:hu,asap:B2};function _e(s,e,t,n,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=s,this.name="AxiosError",e&&(this.code=e),t&&(this.config=t),n&&(this.request=n),i&&(this.response=i,this.status=i.status?i.status:null)}O.inherits(_e,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:O.toJSONObject(this.config),code:this.code,status:this.status}}});const mu=_e.prototype,fu={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(s=>{fu[s]={value:s}}),Object.defineProperties(_e,fu),Object.defineProperty(mu,"isAxiosError",{value:!0}),_e.from=(s,e,t,n,i,r)=>{const o=Object.create(mu);return O.toFlatObject(s,o,function(l){return l!==Error.prototype},l=>l!=="isAxiosError"),_e.call(o,s.message,e,t,n,i),o.cause=s,o.name=s.name,r&&Object.assign(o,r),o};const R2=null;function Or(s){return O.isPlainObject(s)||O.isArray(s)}function gu(s){return O.endsWith(s,"[]")?s.slice(0,-2):s}function pu(s,e,t){return s?s.concat(e).map(function(n,i){return n=gu(n),!t&&i?"["+n+"]":n}).join(t?".":""):e}function v2(s){return O.isArray(s)&&!s.some(Or)}const N2=O.toFlatObject(O,{},null,function(s){return/^is[A-Z]/.test(s)});function pa(s,e,t){if(!O.isObject(s))throw new TypeError("target must be an object");e=e||new FormData,t=O.toFlatObject(t,{metaTokens:!0,dots:!1,indexes:!1},!1,function(p,h){return!O.isUndefined(h[p])});const n=t.metaTokens,i=t.visitor||c,r=t.dots,o=t.indexes,l=(t.Blob||typeof Blob<"u"&&Blob)&&O.isSpecCompliantForm(e);if(!O.isFunction(i))throw new TypeError("visitor must be a function");function d(p){if(p===null)return"";if(O.isDate(p))return p.toISOString();if(!l&&O.isBlob(p))throw new _e("Blob is not supported. Use a Buffer instead.");return O.isArrayBuffer(p)||O.isTypedArray(p)?l&&typeof Blob=="function"?new Blob([p]):Buffer.from(p):p}function c(p,h,g){let y=p;if(p&&!g&&typeof p=="object"){if(O.endsWith(h,"{}"))h=n?h:h.slice(0,-2),p=JSON.stringify(p);else if(O.isArray(p)&&v2(p)||(O.isFileList(p)||O.endsWith(h,"[]"))&&(y=O.toArray(p)))return h=gu(h),y.forEach(function(b,w){!(O.isUndefined(b)||b===null)&&e.append(o===!0?pu([h],w,r):o===null?h:h+"[]",d(b))}),!1}return Or(p)?!0:(e.append(pu(g,h,r),d(p)),!1)}const u=[],m=Object.assign(N2,{defaultVisitor:c,convertValue:d,isVisitable:Or});function f(p,h){if(!O.isUndefined(p)){if(u.indexOf(p)!==-1)throw Error("Circular reference detected in "+h.join("."));u.push(p),O.forEach(p,function(g,y){(!(O.isUndefined(g)||g===null)&&i.call(e,g,O.isString(y)?y.trim():y,h,m))===!0&&f(g,h?h.concat(y):[y])}),u.pop()}}if(!O.isObject(s))throw new TypeError("data must be an object");return f(s),e}function yu(s){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(s).replace(/[!'()~]|%20|%00/g,function(t){return e[t]})}function Fr(s,e){this._pairs=[],s&&pa(s,this,e)}const bu=Fr.prototype;bu.append=function(s,e){this._pairs.push([s,e])},bu.toString=function(s){const e=s?function(t){return s.call(this,t,yu)}:yu;return this._pairs.map(function(t){return e(t[0])+"="+e(t[1])},"").join("&")};function D2(s){return encodeURIComponent(s).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function wu(s,e,t){if(!e)return s;const n=t&&t.encode||D2;O.isFunction(t)&&(t={serialize:t});const i=t&&t.serialize;let r;if(i?r=i(e,t):r=O.isURLSearchParams(e)?e.toString():new Fr(e,t).toString(n),r){const o=s.indexOf("#");o!==-1&&(s=s.slice(0,o)),s+=(s.indexOf("?")===-1?"?":"&")+r}return s}const Su=class{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){O.forEach(this.handlers,function(t){t!==null&&e(t)})}},_u={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},P2=typeof URLSearchParams<"u"?URLSearchParams:Fr,O2=typeof FormData<"u"?FormData:null,F2=typeof Blob<"u"?Blob:null,M2={isBrowser:!0,classes:{URLSearchParams:P2,FormData:O2,Blob:F2},protocols:["http","https","file","blob","url","data"]},Mr=typeof window<"u"&&typeof document<"u",Vr=typeof navigator=="object"&&navigator||void 0,V2=Mr&&(!Vr||["ReactNative","NativeScript","NS"].indexOf(Vr.product)<0),$2=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",U2=Mr&&window.location.href||"http://localhost",z2=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Mr,hasStandardBrowserEnv:V2,hasStandardBrowserWebWorkerEnv:$2,navigator:Vr,origin:U2},Symbol.toStringTag,{value:"Module"})),gt={...z2,...M2};function G2(s,e){return pa(s,new gt.classes.URLSearchParams,Object.assign({visitor:function(t,n,i,r){return gt.isNode&&O.isBuffer(t)?(this.append(n,t.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)}},e))}function j2(s){return O.matchAll(/\w+|\[(\w*)]/g,s).map(e=>e[0]==="[]"?"":e[1]||e[0])}function H2(s){const e={},t=Object.keys(s);let n;const i=t.length;let r;for(n=0;n<i;n++)r=t[n],e[r]=s[r];return e}function ku(s){function e(t,n,i,r){let o=t[r++];if(o==="__proto__")return!0;const l=Number.isFinite(+o),d=r>=t.length;return o=!o&&O.isArray(i)?i.length:o,d?(O.hasOwnProp(i,o)?i[o]=[i[o],n]:i[o]=n,!l):((!i[o]||!O.isObject(i[o]))&&(i[o]=[]),e(t,n,i[o],r)&&O.isArray(i[o])&&(i[o]=H2(i[o])),!l)}if(O.isFormData(s)&&O.isFunction(s.entries)){const t={};return O.forEachEntry(s,(n,i)=>{e(j2(n),i,t,0)}),t}return null}function W2(s,e,t){if(O.isString(s))try{return(e||JSON.parse)(s),O.trim(s)}catch(n){if(n.name!=="SyntaxError")throw n}return(0,JSON.stringify)(s)}const $r={transitional:_u,adapter:["xhr","http","fetch"],transformRequest:[function(s,e){const t=e.getContentType()||"",n=t.indexOf("application/json")>-1,i=O.isObject(s);if(i&&O.isHTMLForm(s)&&(s=new FormData(s)),O.isFormData(s))return n?JSON.stringify(ku(s)):s;if(O.isArrayBuffer(s)||O.isBuffer(s)||O.isStream(s)||O.isFile(s)||O.isBlob(s)||O.isReadableStream(s))return s;if(O.isArrayBufferView(s))return s.buffer;if(O.isURLSearchParams(s))return e.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),s.toString();let r;if(i){if(t.indexOf("application/x-www-form-urlencoded")>-1)return G2(s,this.formSerializer).toString();if((r=O.isFileList(s))||t.indexOf("multipart/form-data")>-1){const o=this.env&&this.env.FormData;return pa(r?{"files[]":s}:s,o&&new o,this.formSerializer)}}return i||n?(e.setContentType("application/json",!1),W2(s)):s}],transformResponse:[function(s){const e=this.transitional||$r.transitional,t=e&&e.forcedJSONParsing,n=this.responseType==="json";if(O.isResponse(s)||O.isReadableStream(s))return s;if(s&&O.isString(s)&&(t&&!this.responseType||n)){const i=!(e&&e.silentJSONParsing)&&n;try{return JSON.parse(s)}catch(r){if(i)throw r.name==="SyntaxError"?_e.from(r,_e.ERR_BAD_RESPONSE,this,null,this.response):r}}return s}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:gt.classes.FormData,Blob:gt.classes.Blob},validateStatus:function(s){return s>=200&&s<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};O.forEach(["delete","get","head","post","put","patch"],s=>{$r.headers[s]={}});const Ur=$r,K2=O.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),q2=s=>{const e={};let t,n,i;return s&&s.split(`
16
16
  `).forEach(function(r){i=r.indexOf(":"),t=r.substring(0,i).trim().toLowerCase(),n=r.substring(i+1).trim(),!(!t||e[t]&&K2[t])&&(t==="set-cookie"?e[t]?e[t].push(n):e[t]=[n]:e[t]=e[t]?e[t]+", "+n:n)}),e},Eu=Symbol("internals");function wn(s){return s&&String(s).trim().toLowerCase()}function ya(s){return s===!1||s==null?s:O.isArray(s)?s.map(ya):String(s)}function Y2(s){const e=Object.create(null),t=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=t.exec(s);)e[n[1]]=n[2];return e}const J2=s=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(s.trim());function zr(s,e,t,n,i){if(O.isFunction(n))return n.call(this,e,t);if(i&&(e=t),!!O.isString(e)){if(O.isString(n))return e.indexOf(n)!==-1;if(O.isRegExp(n))return n.test(e)}}function X2(s){return s.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,n)=>t.toUpperCase()+n)}function Z2(s,e){const t=O.toCamelCase(" "+e);["get","set","has"].forEach(n=>{Object.defineProperty(s,n+t,{value:function(i,r,o){return this[n].call(this,e,i,r,o)},configurable:!0})})}let ba=class{constructor(e){e&&this.set(e)}set(e,t,n){const i=this;function r(l,d,c){const u=wn(d);if(!u)throw new Error("header name must be a non-empty string");const m=O.findKey(i,u);(!m||i[m]===void 0||c===!0||c===void 0&&i[m]!==!1)&&(i[m||d]=ya(l))}const o=(l,d)=>O.forEach(l,(c,u)=>r(c,u,d));if(O.isPlainObject(e)||e instanceof this.constructor)o(e,t);else if(O.isString(e)&&(e=e.trim())&&!J2(e))o(q2(e),t);else if(O.isHeaders(e))for(const[l,d]of e.entries())r(d,l,n);else e!=null&&r(t,e,n);return this}get(e,t){if(e=wn(e),e){const n=O.findKey(this,e);if(n){const i=this[n];if(!t)return i;if(t===!0)return Y2(i);if(O.isFunction(t))return t.call(this,i,n);if(O.isRegExp(t))return t.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=wn(e),e){const n=O.findKey(this,e);return!!(n&&this[n]!==void 0&&(!t||zr(this,this[n],n,t)))}return!1}delete(e,t){const n=this;let i=!1;function r(o){if(o=wn(o),o){const l=O.findKey(n,o);l&&(!t||zr(n,n[l],l,t))&&(delete n[l],i=!0)}}return O.isArray(e)?e.forEach(r):r(e),i}clear(e){const t=Object.keys(this);let n=t.length,i=!1;for(;n--;){const r=t[n];(!e||zr(this,this[r],r,e,!0))&&(delete this[r],i=!0)}return i}normalize(e){const t=this,n={};return O.forEach(this,(i,r)=>{const o=O.findKey(n,r);if(o){t[o]=ya(i),delete t[r];return}const l=e?X2(r):String(r).trim();l!==r&&delete t[r],t[l]=ya(i),n[l]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return O.forEach(this,(n,i)=>{n!=null&&n!==!1&&(t[i]=e&&O.isArray(n)?n.join(", "):n)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,t])=>e+": "+t).join(`
17
17
  `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const n=new this(e);return t.forEach(i=>n.set(i)),n}static accessor(e){const t=(this[Eu]=this[Eu]={accessors:{}}).accessors,n=this.prototype;function i(r){const o=wn(r);t[o]||(Z2(n,r),t[o]=!0)}return O.isArray(e)?e.forEach(i):i(e),this}};ba.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),O.reduceDescriptors(ba.prototype,({value:s},e)=>{let t=e[0].toUpperCase()+e.slice(1);return{get:()=>s,set(n){this[t]=n}}}),O.freezeMethods(ba);const Dt=ba;function Gr(s,e){const t=this||Ur,n=e||t,i=Dt.from(n.headers);let r=n.data;return O.forEach(s,function(o){r=o.call(t,r,i.normalize(),e?e.status:void 0)}),i.normalize(),r}function Tu(s){return!!(s&&s.__CANCEL__)}function zs(s,e,t){_e.call(this,s??"canceled",_e.ERR_CANCELED,e,t),this.name="CanceledError"}O.inherits(zs,_e,{__CANCEL__:!0});function Cu(s,e,t){const n=t.config.validateStatus;!t.status||!n||n(t.status)?s(t):e(new _e("Request failed with status code "+t.status,[_e.ERR_BAD_REQUEST,_e.ERR_BAD_RESPONSE][Math.floor(t.status/100)-4],t.config,t.request,t))}function Q2(s){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(s);return e&&e[1]||""}function ek(s,e){s=s||10;const t=new Array(s),n=new Array(s);let i=0,r=0,o;return e=e!==void 0?e:1e3,function(l){const d=Date.now(),c=n[r];o||(o=d),t[i]=l,n[i]=d;let u=r,m=0;for(;u!==i;)m+=t[u++],u=u%s;if(i=(i+1)%s,i===r&&(r=(r+1)%s),d-o<e)return;const f=c&&d-c;return f?Math.round(m*1e3/f):void 0}}function tk(s,e){let t=0,n=1e3/e,i,r;const o=(l,d=Date.now())=>{t=d,i=null,r&&(clearTimeout(r),r=null),s.apply(null,l)};return[(...l)=>{const d=Date.now(),c=d-t;c>=n?o(l,d):(i=l,r||(r=setTimeout(()=>{r=null,o(i)},n-c)))},()=>i&&o(i)]}const wa=(s,e,t=3)=>{let n=0;const i=ek(50,250);return tk(r=>{const o=r.loaded,l=r.lengthComputable?r.total:void 0,d=o-n,c=i(d),u=o<=l;n=o;const m={loaded:o,total:l,progress:l?o/l:void 0,bytes:d,rate:c||void 0,estimated:c&&l&&u?(l-o)/c:void 0,event:r,lengthComputable:l!=null,[e?"download":"upload"]:!0};s(m)},t)},xu=(s,e)=>{const t=s!=null;return[n=>e[0]({lengthComputable:t,total:s,loaded:n}),e[1]]},Au=s=>(...e)=>O.asap(()=>s(...e)),sk=gt.hasStandardBrowserEnv?((s,e)=>t=>(t=new URL(t,gt.origin),s.protocol===t.protocol&&s.host===t.host&&(e||s.port===t.port)))(new URL(gt.origin),gt.navigator&&/(msie|trident)/i.test(gt.navigator.userAgent)):()=>!0,nk=gt.hasStandardBrowserEnv?{write(s,e,t,n,i,r){const o=[s+"="+encodeURIComponent(e)];O.isNumber(t)&&o.push("expires="+new Date(t).toGMTString()),O.isString(n)&&o.push("path="+n),O.isString(i)&&o.push("domain="+i),r===!0&&o.push("secure"),document.cookie=o.join("; ")},read(s){const e=document.cookie.match(new RegExp("(^|;\\s*)("+s+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(s){this.write(s,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function ak(s){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(s)}function ik(s,e){return e?s.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):s}function Lu(s,e){return s&&!ak(e)?ik(s,e):e}const Iu=s=>s instanceof Dt?{...s}:s;function Cs(s,e){e=e||{};const t={};function n(c,u,m,f){return O.isPlainObject(c)&&O.isPlainObject(u)?O.merge.call({caseless:f},c,u):O.isPlainObject(u)?O.merge({},u):O.isArray(u)?u.slice():u}function i(c,u,m,f){if(O.isUndefined(u)){if(!O.isUndefined(c))return n(void 0,c,m,f)}else return n(c,u,m,f)}function r(c,u){if(!O.isUndefined(u))return n(void 0,u)}function o(c,u){if(O.isUndefined(u)){if(!O.isUndefined(c))return n(void 0,c)}else return n(void 0,u)}function l(c,u,m){if(m in e)return n(c,u);if(m in s)return n(void 0,c)}const d={url:r,method:r,data:r,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:l,headers:(c,u,m)=>i(Iu(c),Iu(u),m,!0)};return O.forEach(Object.keys(Object.assign({},s,e)),function(c){const u=d[c]||i,m=u(s[c],e[c],c);O.isUndefined(m)&&u!==l||(t[c]=m)}),t}const Bu=s=>{const e=Cs({},s);let{data:t,withXSRFToken:n,xsrfHeaderName:i,xsrfCookieName:r,headers:o,auth:l}=e;e.headers=o=Dt.from(o),e.url=wu(Lu(e.baseURL,e.url),s.params,s.paramsSerializer),l&&o.set("Authorization","Basic "+btoa((l.username||"")+":"+(l.password?unescape(encodeURIComponent(l.password)):"")));let d;if(O.isFormData(t)){if(gt.hasStandardBrowserEnv||gt.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if((d=o.getContentType())!==!1){const[c,...u]=d?d.split(";").map(m=>m.trim()).filter(Boolean):[];o.setContentType([c||"multipart/form-data",...u].join("; "))}}if(gt.hasStandardBrowserEnv&&(n&&O.isFunction(n)&&(n=n(e)),n||n!==!1&&sk(e.url))){const c=i&&r&&nk.read(r);c&&o.set(i,c)}return e},rk=typeof XMLHttpRequest<"u",ok=rk&&function(s){return new Promise(function(e,t){const n=Bu(s);let i=n.data;const r=Dt.from(n.headers).normalize();let{responseType:o,onUploadProgress:l,onDownloadProgress:d}=n,c,u,m,f,p;function h(){f&&f(),p&&p(),n.cancelToken&&n.cancelToken.unsubscribe(c),n.signal&&n.signal.removeEventListener("abort",c)}let g=new XMLHttpRequest;g.open(n.method.toUpperCase(),n.url,!0),g.timeout=n.timeout;function y(){if(!g)return;const w=Dt.from("getAllResponseHeaders"in g&&g.getAllResponseHeaders()),_={data:!o||o==="text"||o==="json"?g.responseText:g.response,status:g.status,statusText:g.statusText,headers:w,config:s,request:g};Cu(function(C){e(C),h()},function(C){t(C),h()},_),g=null}"onloadend"in g?g.onloadend=y:g.onreadystatechange=function(){!g||g.readyState!==4||g.status===0&&!(g.responseURL&&g.responseURL.indexOf("file:")===0)||setTimeout(y)},g.onabort=function(){g&&(t(new _e("Request aborted",_e.ECONNABORTED,s,g)),g=null)},g.onerror=function(){t(new _e("Network Error",_e.ERR_NETWORK,s,g)),g=null},g.ontimeout=function(){let w=n.timeout?"timeout of "+n.timeout+"ms exceeded":"timeout exceeded";const _=n.transitional||_u;n.timeoutErrorMessage&&(w=n.timeoutErrorMessage),t(new _e(w,_.clarifyTimeoutError?_e.ETIMEDOUT:_e.ECONNABORTED,s,g)),g=null},i===void 0&&r.setContentType(null),"setRequestHeader"in g&&O.forEach(r.toJSON(),function(w,_){g.setRequestHeader(_,w)}),O.isUndefined(n.withCredentials)||(g.withCredentials=!!n.withCredentials),o&&o!=="json"&&(g.responseType=n.responseType),d&&([m,p]=wa(d,!0),g.addEventListener("progress",m)),l&&g.upload&&([u,f]=wa(l),g.upload.addEventListener("progress",u),g.upload.addEventListener("loadend",f)),(n.cancelToken||n.signal)&&(c=w=>{g&&(t(!w||w.type?new zs(null,s,g):w),g.abort(),g=null)},n.cancelToken&&n.cancelToken.subscribe(c),n.signal&&(n.signal.aborted?c():n.signal.addEventListener("abort",c)));const b=Q2(n.url);if(b&&gt.protocols.indexOf(b)===-1){t(new _e("Unsupported protocol "+b+":",_e.ERR_BAD_REQUEST,s));return}g.send(i||null)})},lk=(s,e)=>{const{length:t}=s=s?s.filter(Boolean):[];if(e||t){let n=new AbortController,i;const r=function(c){if(!i){i=!0,l();const u=c instanceof Error?c:this.reason;n.abort(u instanceof _e?u:new zs(u instanceof Error?u.message:u))}};let o=e&&setTimeout(()=>{o=null,r(new _e(`timeout ${e} of ms exceeded`,_e.ETIMEDOUT))},e);const l=()=>{s&&(o&&clearTimeout(o),o=null,s.forEach(c=>{c.unsubscribe?c.unsubscribe(r):c.removeEventListener("abort",r)}),s=null)};s.forEach(c=>c.addEventListener("abort",r));const{signal:d}=n;return d.unsubscribe=()=>O.asap(l),d}},ck=lk,dk=function*(s,e){let t=s.byteLength;if(t<e){yield s;return}let n=0,i;for(;n<t;)i=n+e,yield s.slice(n,i),n=i},uk=async function*(s,e){for await(const t of hk(s))yield*dk(t,e)},hk=async function*(s){if(s[Symbol.asyncIterator]){yield*s;return}const e=s.getReader();try{for(;;){const{done:t,value:n}=await e.read();if(t)break;yield n}}finally{await e.cancel()}},Ru=(s,e,t,n)=>{const i=uk(s,e);let r=0,o,l=d=>{o||(o=!0,n&&n(d))};return new ReadableStream({async pull(d){try{const{done:c,value:u}=await i.next();if(c){l(),d.close();return}let m=u.byteLength;if(t){let f=r+=m;t(f)}d.enqueue(new Uint8Array(u))}catch(c){throw l(c),c}},cancel(d){return l(d),i.return()}},{highWaterMark:2})},Sa=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",vu=Sa&&typeof ReadableStream=="function",mk=Sa&&(typeof TextEncoder=="function"?(s=>e=>s.encode(e))(new TextEncoder):async s=>new Uint8Array(await new Response(s).arrayBuffer())),Nu=(s,...e)=>{try{return!!s(...e)}catch{return!1}},fk=vu&&Nu(()=>{let s=!1;const e=new Request(gt.origin,{body:new ReadableStream,method:"POST",get duplex(){return s=!0,"half"}}).headers.has("Content-Type");return s&&!e}),Du=64*1024,jr=vu&&Nu(()=>O.isReadableStream(new Response("").body)),_a={stream:jr&&(s=>s.body)};Sa&&(s=>{["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!_a[e]&&(_a[e]=O.isFunction(s[e])?t=>t[e]():(t,n)=>{throw new _e(`Response type '${e}' is not supported`,_e.ERR_NOT_SUPPORT,n)})})})(new Response);const gk=async s=>{if(s==null)return 0;if(O.isBlob(s))return s.size;if(O.isSpecCompliantForm(s))return(await new Request(gt.origin,{method:"POST",body:s}).arrayBuffer()).byteLength;if(O.isArrayBufferView(s)||O.isArrayBuffer(s))return s.byteLength;if(O.isURLSearchParams(s)&&(s=s+""),O.isString(s))return(await mk(s)).byteLength},pk=async(s,e)=>O.toFiniteNumber(s.getContentLength())??gk(e),yk=Sa&&(async s=>{let{url:e,method:t,data:n,signal:i,cancelToken:r,timeout:o,onDownloadProgress:l,onUploadProgress:d,responseType:c,headers:u,withCredentials:m="same-origin",fetchOptions:f}=Bu(s);c=c?(c+"").toLowerCase():"text";let p=ck([i,r&&r.toAbortSignal()],o),h;const g=p&&p.unsubscribe&&(()=>{p.unsubscribe()});let y;try{if(d&&fk&&t!=="get"&&t!=="head"&&(y=await pk(u,n))!==0){let E=new Request(e,{method:"POST",body:n,duplex:"half"}),A;if(O.isFormData(n)&&(A=E.headers.get("content-type"))&&u.setContentType(A),E.body){const[T,R]=xu(y,wa(Au(d)));n=Ru(E.body,Du,T,R)}}O.isString(m)||(m=m?"include":"omit");const b="credentials"in Request.prototype;h=new Request(e,{...f,signal:p,method:t.toUpperCase(),headers:u.normalize().toJSON(),body:n,duplex:"half",credentials:b?m:void 0});let w=await fetch(h);const _=jr&&(c==="stream"||c==="response");if(jr&&(l||_&&g)){const E={};["status","statusText","headers"].forEach(I=>{E[I]=w[I]});const A=O.toFiniteNumber(w.headers.get("content-length")),[T,R]=l&&xu(A,wa(Au(l),!0))||[];w=new Response(Ru(w.body,Du,T,()=>{R&&R(),g&&g()}),E)}c=c||"text";let C=await _a[O.findKey(_a,c)||"text"](w,s);return!_&&g&&g(),await new Promise((E,A)=>{Cu(E,A,{data:C,headers:Dt.from(w.headers),status:w.status,statusText:w.statusText,config:s,request:h})})}catch(b){throw g&&g(),b&&b.name==="TypeError"&&/fetch/i.test(b.message)?Object.assign(new _e("Network Error",_e.ERR_NETWORK,s,h),{cause:b.cause||b}):_e.from(b,b&&b.code,s,h)}}),Hr={http:R2,xhr:ok,fetch:yk};O.forEach(Hr,(s,e)=>{if(s){try{Object.defineProperty(s,"name",{value:e})}catch{}Object.defineProperty(s,"adapterName",{value:e})}});const Pu=s=>`- ${s}`,bk=s=>O.isFunction(s)||s===null||s===!1,Ou={getAdapter:s=>{s=O.isArray(s)?s:[s];const{length:e}=s;let t,n;const i={};for(let r=0;r<e;r++){t=s[r];let o;if(n=t,!bk(t)&&(n=Hr[(o=String(t)).toLowerCase()],n===void 0))throw new _e(`Unknown adapter '${o}'`);if(n)break;i[o||"#"+r]=n}if(!n){const r=Object.entries(i).map(([l,d])=>`adapter ${l} `+(d===!1?"is not supported by the environment":"is not available in the build"));let o=e?r.length>1?`since :
18
18
  `+r.map(Pu).join(`
@@ -29,12 +29,12 @@
29
29
  * Vue 3 Carousel 0.3.4
30
30
  * (c) 2024
31
31
  * @license MIT
32
- */const Je={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"}},th={itemsToShow:{default:Je.itemsToShow,type:Number},itemsToScroll:{default:Je.itemsToScroll,type:Number},wrapAround:{default:Je.wrapAround,type:Boolean},throttle:{default:Je.throttle,type:Number},snapAlign:{default:Je.snapAlign,validator(s){return["start","end","center","center-even","center-odd"].includes(s)}},transition:{default:Je.transition,type:Number},breakpoints:{default:Je.breakpoints,type:Object},autoplay:{default:Je.autoplay,type:Number},pauseAutoplayOnHover:{default:Je.pauseAutoplayOnHover,type:Boolean},modelValue:{default:void 0,type:Number},mouseDrag:{default:Je.mouseDrag,type:Boolean},touchDrag:{default:Je.touchDrag,type:Boolean},dir:{default:Je.dir,validator(s){return["rtl","ltr"].includes(s)}},i18n:{default:Je.i18n,type:Object},settings:{default(){return{}},type:Object}};function YA({config:s,slidesCount:e}){const{snapAlign:t,wrapAround:n,itemsToShow:i=1}=s;if(n)return Math.max(e-1,0);let r;switch(t){case"start":r=e-i;break;case"end":r=e-1;break;case"center":case"center-odd":r=e-Math.ceil((i-.5)/2);break;case"center-even":r=e-Math.ceil(i/2);break;default:r=0;break}return Math.max(r,0)}function JA({config:s,slidesCount:e}){const{wrapAround:t,snapAlign:n,itemsToShow:i=1}=s;let r=0;if(t||i>e)return r;switch(n){case"start":r=0;break;case"end":r=i-1;break;case"center":case"center-odd":r=Math.floor((i-1)/2);break;case"center-even":r=Math.floor((i-2)/2);break;default:r=0;break}return r}function to({val:s,max:e,min:t}){return e<t?s:Math.min(Math.max(s,t),e)}function XA({config:s,currentSlide:e,slidesCount:t}){const{snapAlign:n,wrapAround:i,itemsToShow:r=1}=s;let o=e;switch(n){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 i?o:to({val:o,max:t-r,min:0})}function sh(s){return s?s.reduce((e,t)=>{var n;return t.type===a.Fragment?[...e,...sh(t.children)]:((n=t.type)===null||n===void 0?void 0:n.name)==="CarouselSlide"?[...e,t]:e},[]):[]}function so({val:s,max:e,min:t=0}){return s>e?so({val:s-(e+1),max:e,min:t}):s<t?so({val:s+(e+1),max:e,min:t}):s}function ZA(s,e){let t;return e?function(...n){const i=this;t||(s.apply(i,n),t=!0,setTimeout(()=>t=!1,e))}:s}function QA(s,e){let t;return function(...n){t&&clearTimeout(t),t=setTimeout(()=>{s(...n),t=null},e)}}function eL(s="",e={}){return Object.entries(e).reduce((t,[n,i])=>t.replace(`{${n}}`,String(i)),s)}var tL=a.defineComponent({name:"ARIA",setup(){const s=a.inject("config",a.reactive(Object.assign({},Je))),e=a.inject("currentSlide",a.ref(0)),t=a.inject("slidesCount",a.ref(0));return()=>a.h("div",{class:["carousel__liveregion","carousel__sr-only"],"aria-live":"polite","aria-atomic":"true"},eL(s.i18n.itemXofY,{currentSlide:e.value+1,slidesCount:t.value}))}}),sL=a.defineComponent({name:"Carousel",props:th,setup(s,{slots:e,emit:t,expose:n}){var i;const r=a.ref(null),o=a.ref([]),l=a.ref(0),d=a.ref(0),c=a.reactive(Object.assign({},Je));let u=Object.assign({},Je),m;const f=a.ref((i=s.modelValue)!==null&&i!==void 0?i:0),p=a.ref(0),h=a.ref(0),g=a.ref(0),y=a.ref(0);let b,w;a.provide("config",c),a.provide("slidesCount",d),a.provide("currentSlide",f),a.provide("maxSlide",g),a.provide("minSlide",y),a.provide("slideWidth",l);function _(){m=Object.assign({},s.breakpoints),u=Object.assign(Object.assign(Object.assign({},u),s),{i18n:Object.assign(Object.assign({},u.i18n),s.i18n),breakpoints:void 0}),E(u)}function C(){if(!m||!Object.keys(m).length)return;const x=Object.keys(m).map($=>Number($)).sort(($,de)=>+de-+$);let z=Object.assign({},u);x.some($=>{const de=window.matchMedia(`(min-width: ${$}px)`).matches;return de&&(z=Object.assign(Object.assign({},z),m[$])),de}),E(z)}function E(x){Object.entries(x).forEach(([z,$])=>c[z]=$)}const A=QA(()=>{C(),R(),T()},16);function T(){if(!r.value)return;const x=r.value.getBoundingClientRect();l.value=x.width/c.itemsToShow}function R(){d.value<=0||(h.value=Math.ceil((d.value-1)/2),g.value=YA({config:c,slidesCount:d.value}),y.value=JA({config:c,slidesCount:d.value}),c.wrapAround||(f.value=to({val:f.value,max:g.value,min:y.value})))}a.onMounted(()=>{a.nextTick(()=>T()),setTimeout(()=>T(),1e3),C(),G(),window.addEventListener("resize",A,{passive:!0}),t("init")}),a.onUnmounted(()=>{w&&clearTimeout(w),b&&clearInterval(b),window.removeEventListener("resize",A,{passive:!0})});let I=!1;const v={x:0,y:0},M={x:0,y:0},j=a.reactive({x:0,y:0}),U=a.ref(!1),se=a.ref(!1),re=()=>{U.value=!0},ie=()=>{U.value=!1};function ue(x){["INPUT","TEXTAREA","SELECT"].includes(x.target.tagName)||(I=x.type==="touchstart",I||x.preventDefault(),!(!I&&x.button!==0||W.value)&&(v.x=I?x.touches[0].clientX:x.clientX,v.y=I?x.touches[0].clientY:x.clientY,document.addEventListener(I?"touchmove":"mousemove",he,!0),document.addEventListener(I?"touchend":"mouseup",J,!0)))}const he=ZA(x=>{se.value=!0,M.x=I?x.touches[0].clientX:x.clientX,M.y=I?x.touches[0].clientY:x.clientY;const z=M.x-v.x,$=M.y-v.y;j.y=$,j.x=z},c.throttle);function J(){const x=c.dir==="rtl"?-1:1,z=Math.sign(j.x)*.4,$=Math.round(j.x/l.value+z)*x;if($&&!I){const de=Qe=>{window.removeEventListener("click",de,!0)};window.addEventListener("click",de,!0)}q(f.value-$),j.x=0,j.y=0,se.value=!1,document.removeEventListener(I?"touchmove":"mousemove",he,!0),document.removeEventListener(I?"touchend":"mouseup",J,!0)}function G(){!c.autoplay||c.autoplay<=0||(b=setInterval(()=>{c.pauseAutoplayOnHover&&U.value||me()},c.autoplay))}function ce(){b&&(clearInterval(b),b=null),G()}const W=a.ref(!1);function q(x){const z=c.wrapAround?x:to({val:x,max:g.value,min:y.value});f.value===z||W.value||(t("slide-start",{slidingToIndex:x,currentSlideIndex:f.value,prevSlideIndex:p.value,slidesCount:d.value}),W.value=!0,p.value=f.value,f.value=z,w=setTimeout(()=>{if(c.wrapAround){const $=so({val:z,max:g.value,min:0});$!==f.value&&(f.value=$,t("loop",{currentSlideIndex:f.value,slidingToIndex:x}))}t("update:modelValue",f.value),t("slide-end",{currentSlideIndex:f.value,prevSlideIndex:p.value,slidesCount:d.value}),W.value=!1,ce()},c.transition))}function me(){q(f.value+c.itemsToScroll)}function ye(){q(f.value-c.itemsToScroll)}const Ce={slideTo:q,next:me,prev:ye};a.provide("nav",Ce),a.provide("isSliding",W);const Q=a.computed(()=>XA({config:c,currentSlide:f.value,slidesCount:d.value}));a.provide("slidesToScroll",Q);const Ee=a.computed(()=>{const x=c.dir==="rtl"?-1:1,z=Q.value*l.value*x;return{transform:`translateX(${j.x-z}px)`,transition:`${W.value?c.transition:0}ms`,margin:c.wrapAround?`0 -${d.value*l.value}px`:"",width:"100%"}});function Te(){_(),C(),R(),T(),ce()}Object.keys(th).forEach(x=>{["modelValue"].includes(x)||a.watch(()=>s[x],Te)}),a.watch(()=>s.modelValue,x=>{x!==f.value&&q(Number(x))}),a.watch(d,R),t("before-init"),_();const Ve={config:c,slidesCount:d,slideWidth:l,next:me,prev:ye,slideTo:q,currentSlide:f,maxSlide:g,minSlide:y,middleSlide:h};n({updateBreakpointsConfigs:C,updateSlidesData:R,updateSlideWidth:T,initDefaultConfigs:_,restartCarousel:Te,slideTo:q,next:me,prev:ye,nav:Ce,data:Ve});const dt=e.default||e.slides,ut=e.addons,ht=a.reactive(Ve);return()=>{const x=sh(dt==null?void 0:dt(ht)),z=(ut==null?void 0:ut(ht))||[];x.forEach(($e,Ge)=>$e.props.index=Ge);let $=x;if(c.wrapAround){const $e=x.map((je,Re)=>a.cloneVNode(je,{index:-x.length+Re,isClone:!0,key:`clone-before-${Re}`})),Ge=x.map((je,Re)=>a.cloneVNode(je,{index:x.length+Re,isClone:!0,key:`clone-after-${Re}`}));$=[...$e,...x,...Ge]}o.value=x,d.value=Math.max(x.length,1);const de=a.h("ol",{class:"carousel__track",style:Ee.value,onMousedownCapture:c.mouseDrag?ue:null,onTouchstartPassiveCapture:c.touchDrag?ue:null},$),Qe=a.h("div",{class:"carousel__viewport"},de);return a.h("section",{ref:r,class:{carousel:!0,"is-sliding":W.value,"is-dragging":se.value,"is-hover":U.value,"carousel--rtl":c.dir==="rtl"},dir:c.dir,"aria-label":c.i18n.ariaGallery,tabindex:"0",onMouseenter:re,onMouseleave:ie},[Qe,z,a.h(tL)])}}}),no;(function(s){s.arrowUp="arrowUp",s.arrowDown="arrowDown",s.arrowRight="arrowRight",s.arrowLeft="arrowLeft"})(no||(no={}));const nL={arrowUp:"M7.41 15.41L12 10.83l4.59 4.58L18 14l-6-6-6 6z",arrowDown:"M7.41 8.59L12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z",arrowRight:"M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z",arrowLeft:"M15.41 16.59L10.83 12l4.58-4.59L14 6l-6 6 6 6 1.41-1.41z"};function aL(s){return s in no}const ao=s=>{const e=a.inject("config",a.reactive(Object.assign({},Je))),t=String(s.name),n=`icon${t.charAt(0).toUpperCase()+t.slice(1)}`;if(!t||typeof t!="string"||!aL(t))return;const i=nL[t],r=a.h("path",{d:i}),o=e.i18n[n]||s.title||t,l=a.h("title",o);return a.h("svg",{class:"carousel__icon",viewBox:"0 0 24 24",role:"img","aria-label":o},[l,r])};ao.props={name:String,title:String};const iL=(s,{slots:e,attrs:t})=>{const{next:n,prev:i}=e||{},r=a.inject("config",a.reactive(Object.assign({},Je))),o=a.inject("maxSlide",a.ref(1)),l=a.inject("minSlide",a.ref(1)),d=a.inject("currentSlide",a.ref(1)),c=a.inject("nav",{}),{dir:u,wrapAround:m,i18n:f}=r,p=u==="rtl",h=a.h("button",{type:"button",class:["carousel__prev",!m&&d.value<=l.value&&"carousel__prev--disabled",t==null?void 0:t.class],"aria-label":f.ariaPreviousSlide,onClick:c.prev},(i==null?void 0:i())||a.h(ao,{name:p?"arrowRight":"arrowLeft"})),g=a.h("button",{type:"button",class:["carousel__next",!m&&d.value>=o.value&&"carousel__next--disabled",t==null?void 0:t.class],"aria-label":f.ariaNextSlide,onClick:c.next},(n==null?void 0:n())||a.h(ao,{name:p?"arrowLeft":"arrowRight"}));return[h,g]};var rL=a.defineComponent({name:"CarouselSlide",props:{index:{type:Number,default:1},isClone:{type:Boolean,default:!1}},setup(s,{slots:e}){const t=a.inject("config",a.reactive(Object.assign({},Je))),n=a.inject("currentSlide",a.ref(0)),i=a.inject("slidesToScroll",a.ref(0)),r=a.inject("isSliding",a.ref(!1)),o=a.computed(()=>s.index===n.value),l=a.computed(()=>s.index===n.value-1),d=a.computed(()=>s.index===n.value+1),c=a.computed(()=>{const u=Math.floor(i.value),m=Math.ceil(i.value+t.itemsToShow-1);return s.index>=u&&s.index<=m});return()=>{var u;return a.h("li",{style:{width:`${100/t.itemsToShow}%`},class:{carousel__slide:!0,"carousel__slide--clone":s.isClone,"carousel__slide--visible":c.value,"carousel__slide--active":o.value,"carousel__slide--prev":l.value,"carousel__slide--next":d.value,"carousel__slide--sliding":r.value},"aria-hidden":!c.value},(u=e.default)===null||u===void 0?void 0:u.call(e,{isActive:o.value,isClone:s.isClone,isPrev:l.value,isNext:d.value,isSliding:r.value,isVisible:c.value}))}}});const nh=s=>(a.pushScopeId("data-v-f97685f3"),s=s(),a.popScopeId(),s),oL={key:1,class:"match-day__live"},lL=[nh(()=>a.createElementVNode("div",{class:"match-day__live__bullet"},null,-1)),nh(()=>a.createElementVNode("div",{class:"match-day__live__text"},"LIVE",-1))],cL=et({__name:"MatchDay",props:{isLandingMode:{type:Boolean,default:!1},backgroundColor:{type:String,default:"#183143"},numberColor:{type:String,default:"white"},numberFontFamily:{type:String,default:"sans-serif"},numberFontSize:{type:String,default:"14px"},textColor:{type:String,default:"rgba(255, 255, 255, 0.5)"},textFontFamily:{type:String,default:"'Poppins-Regular', sans-serif"},textFontSize:{type:String,default:"8px"},bottomLineColor:{type:String,default:"#cbee6b"},selectedMatchDayBackgroundColor:{type:String,default:"#243b4c"},height:{type:String,default:"fit-content"},matchDay:{type:Object,default:()=>{}},matchDaySelected:{type:Object,default:()=>{}},componentWidth:{type:[Number,String],default:0}},emits:["change-match-day"],setup(s,{emit:e}){const t=s,n=a.computed(()=>{const l={"background-color":t.backgroundColor,height:t.height};return t.matchDay.key===t.matchDaySelected.key&&(l["border-bottom"]=`solid 1px ${t.bottomLineColor}`,l["background-color"]=t.selectedMatchDayBackgroundColor),t.isLandingMode||(l["border-right"]="solid 1px rgba(255, 255, 255, 0.1)"),l}),i=a.computed(()=>({color:t.numberColor,"font-family":t.numberFontFamily,"font-size":t.numberFontSize})),r=a.computed(()=>({color:t.textColor,"font-family":t.textFontFamily,"font-size":t.textFontSize}));function o(l){e("click-match-day",l)}return(l,d)=>(a.openBlock(),a.createElementBlock("div",{class:"match-day",style:a.normalizeStyle({...n.value}),onClick:d[0]||(d[0]=c=>o(s.matchDay))},[a.createElementVNode("div",{class:"match-day__value",style:a.normalizeStyle(i.value)},a.toDisplayString(s.matchDay.valueText),5),!Number.isNaN(s.matchDay.value)&&!s.matchDay.liveGamesIds.size?(a.openBlock(),a.createElementBlock("div",{key:0,class:"match-day__text",style:a.normalizeStyle([s.isLandingMode?"margin-top:3px":"margin-top:4px",r.value])},a.toDisplayString(s.isLandingMode||s.componentWidth<=425?"JOR":"JORNADA"),5)):s.matchDay.liveGamesIds.size?(a.openBlock(),a.createElementBlock("div",oL,lL)):a.createCommentVNode("",!0)],4))}},[["__scopeId","data-v-f97685f3"]]),ah=et({__name:"MatchDayPicker",props:{matchDays:{type:Array,default:()=>[]},isLandingMode:{type:Boolean,default:!1},backgroundColor:{type:String,default:"#183143"},numberColor:{type:String,default:"white"},numberFontFamily:{type:String,default:"sans-serif"},numberFontSize:{type:String,default:"14px"},textColor:{type:String,default:"rgba(255, 255, 255, 0.5)"},textFontFamily:{type:String,default:"sans-serif"},textFontSize:{type:String,default:"8px"},bottomLineColor:{type:String,default:"#cbee6b"},selectedMatchDayBackgroundColor:{type:String,default:"#243b4c"},height:{type:String,default:"fit-content"},disableMatchdays:{type:Boolean,default:!1},itemsToShow:{type:Number,default:9},itemsToScroll:{type:Number,default:9},defaultMatchDayKey:{type:[String,null],default:""},componentWidth:{type:[Number,String],default:0},closestMatchDay:{type:[Number,String],default:0}},emits:["change-match-day"],setup(s,{emit:e}){const t=s;a.useCssVars(u=>({"179f4a74":o.value,"17a178f4":l.value}));const n=a.ref(null),i=a.ref(-1),r=a.computed(()=>({itemsToShow:t.itemsToShow,itemsToScroll:t.itemsToScroll,snapAlign:"start"})),o=a.computed(()=>n.value.data.currentSlide.value===0?"none":"inline"),l=a.computed(()=>n.value.data.currentSlide.value===n.value.data.maxSlide.value?"none":"inline"),d=a.ref({});a.watch(()=>t.closestMatchDay,u=>{if(u){const m=t.matchDays.find(f=>f.key===u);c(m||t.matchDays[0],!0)}}),a.watch(()=>t.matchDays,u=>{if(!t.closestMatchDay&&u&&u.length){const m=u.find(f=>f.key===t.defaultMatchDayKey);i.value=u.findIndex(f=>f.key===t.defaultMatchDayKey),d.value=m||u[0],e("change-match-day",d.value)}},{immediate:!0}),a.watch(()=>t.defaultMatchDayKey,u=>{if(u){let m=-1;const f=t.matchDays.find((p,h)=>p.key===u?(m=h,!0):!1);f&&(d.value=f),m>-1&&n.value&&n.value.slideTo(m)}});function c(u,m=!1){m&&n.value.slideTo(u.index),t.disableMatchdays?u.avaible==!0&&(d.value=u,e("change-match-day",d.value)):(d.value=u,e("change-match-day",d.value))}return(u,m)=>(a.openBlock(),a.createElementBlock("div",{class:"match-day-picker",style:a.normalizeStyle(s.isLandingMode?"border-top-left-radius: 9px; border-top-right-radius: 9px;":"margin-bottom:12px")},[(a.openBlock(),a.createBlock(a.unref(sL),a.mergeProps(r.value,{modelValue:i.value,ref_key:"matchDayPickerCarousel",ref:n,key:i.value}),{addons:a.withCtx(()=>[a.createVNode(a.unref(iL))]),default:a.withCtx(()=>[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(s.matchDays,f=>(a.openBlock(),a.createBlock(a.unref(rL),{key:f.key},{default:a.withCtx(()=>[a.createVNode(cL,a.mergeProps({style:s.disableMatchdays&&!f.avaible?"opacity: 0.6 !important; cursor: default !important;":""},t,{"match-day":f,"match-day-selected":d.value,"is-landing-mode":s.isLandingMode,"component-width":s.componentWidth,onClickMatchDay:c}),null,16,["style","match-day","match-day-selected","is-landing-mode","component-width"])]),_:2},1024))),128))]),_:1},16,["modelValue"]))],4))}},[["__scopeId","data-v-d4bf2975"]]),dL=["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic"];function ih(){return"https://golstatsimages.blob.core.windows.net/golstats-app/"}function uL(s){return dL[s]}function hL(){let s=!1;return function(e){(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(e)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(e.substr(0,4)))&&(s=!0)}(navigator.userAgent||navigator.vendor||window.opera),s}function io(){let s=window.navigator.userAgent.toLowerCase(),e=/(macintosh|macintel|macppc|mac68k|macos)/i,t=/(win32|win64|windows|wince)/i,n=/(iphone|ipad|ipod)/i,i=null;return e.test(s)?i="macos":n.test(s)?i="ios":t.test(s)?i="windows":/android/.test(s)?i="android":!i&&/linux/.test(s)&&(i="linux"),i}function mL(s){const[e,t]=s.split(","),n=e.split(" ");let i="";for(const r of n)if(i+=` ${r}`,r.length>3)break;return t&&e?`${t.trim().charAt(0)}.${i}`:""}const xs=s=>(a.pushScopeId("data-v-c26e8c06"),s=s(),a.popScopeId(),s),fL={class:"quadrant-matches"},gL={class:"quadrant-matches__header"},pL={class:"quadrant-matches__header__pc"},yL={class:"title-and-switch"},bL={class:"quadrant-matches__title"},wL={key:0,class:"quadrant-matches__header__games-type"},SL=xs(()=>a.createElementVNode("div",{class:"quadrant-matches__header__my-team"},"Mi equipo",-1)),_L={class:"quadrant-matches__header__games-type__logo"},kL=["src"],EL={class:"quadrant-matches__header__games-type__switch"},TL={class:"quadrant-matches__header__games-type__logo"},CL=["src"],xL={key:0,class:"quadrant-matches__header__my-team"},AL=[xs(()=>a.createElementVNode("div",{class:"bullet"},null,-1)),xs(()=>a.createElementVNode("span",null,"LIVE",-1))],LL={key:1,class:"quadrant-matches__header__my-team"},IL=[xs(()=>a.createElementVNode("div",{class:"bullet"},null,-1)),xs(()=>a.createElementVNode("span",null,"LIVE",-1))],BL={class:"quadrant-matches__header__mobile"},RL=[xs(()=>a.createElementVNode("div",{class:"bullet"},null,-1)),xs(()=>a.createElementVNode("span",null,"LIVE",-1))],vL={key:0,class:"quadrant-matches__body"},NL={class:"quadrant-matches__body",style:{"column-gap":"16px"}},DL={class:"quadrant-matches__body matches"},PL={key:0,class:"quadrant-matches__body",style:{"column-gap":"16px","grid-template-columns":"1fr !important"}},OL={key:0,class:"quadrant-matches__body",style:{"column-gap":"16px","grid-template-columns":"1fr !important"}},FL=et({__name:"GSCQuadrantGames",props:{isUserPro:{type:Boolean,default:!1},hasTeam:{type:Boolean,default:!1},currentSeason:{type:Number,default:0},isFull:{type:Boolean,default:!1},comingMatches:{type:Array,default:()=>[]},data:{type:Object,default:()=>{}},previousMatches:{type:Array,default:()=>[]},componentWidth:{type:[Number,String],default:768},tournamentScheduleKeys:{type:Array,default:()=>[]},defaultMatchDayKey:{type:String,default:""},user:{type:Object,default:()=>{}},currentTournament:{type:Object,default:()=>{}},isLiveButtonVisible:{type:Boolean,default:!1}},emits:["change-match-day","change-is-league-selected","click-live"],setup(s,{emit:e}){const t=s,n=a.ref(!0),i=a.toRef(t,"componentWidth"),r=a.computed(()=>i.value<768);a.watch(n,c=>{e("change-is-league-selected",c)}),a.watch(()=>t.currentSeason,c=>{c&&(n.value=!0)}),a.watch(()=>t.currentTournament,c=>{c&&(n.value=!c.id===t.user.tournament,c.id===t.user.tournament&&setTimeout(()=>{n.value=!0,e("change-is-league-selected",!0)},300))});function o(c){e("change-match-day",c)}function l(c){n.value=c}function d(){n.value=!0,setTimeout(()=>{e("click-live")},500)}return(c,u)=>(a.openBlock(),a.createElementBlock("section",fL,[a.createElementVNode("div",gL,[a.createElementVNode("div",pL,[a.createElementVNode("div",yL,[a.createElementVNode("h2",bL,a.toDisplayString((s.isFull,"Partidos")),1)]),s.isFull?s.isLiveButtonVisible?(a.openBlock(),a.createElementBlock("div",LL,[a.createElementVNode("div",{role:"button",class:"btn-live",onClick:d},IL)])):a.createCommentVNode("",!0):(a.openBlock(),a.createElementBlock("div",wL,[SL,a.createElementVNode("div",_L,[s.user&&s.user.team?(a.openBlock(),a.createElementBlock("img",{key:0,src:`https://golstatsimages.blob.core.windows.net/teams-80/${s.user.team}.png`},null,8,kL)):a.createCommentVNode("",!0)]),a.createElementVNode("div",EL,[a.createVNode(qA,{"model-value":n.value,"onUpdate:modelValue":l},null,8,["model-value"])]),a.createElementVNode("div",TL,[s.currentTournament&&s.currentTournament.id?(a.openBlock(),a.createElementBlock("img",{key:0,src:`https://golstatsimages.blob.core.windows.net/todoelfut/${s.currentTournament.id}.png`},null,8,CL)):a.createCommentVNode("",!0)]),s.currentTournament?(a.openBlock(),a.createElementBlock("div",xL,[a.createElementVNode("div",null,a.toDisplayString(s.currentTournament.name),1),s.isLiveButtonVisible?(a.openBlock(),a.createElementBlock("div",{key:0,role:"button",class:"btn-live",onClick:d},AL)):a.createCommentVNode("",!0)])):a.createCommentVNode("",!0)]))]),a.createElementVNode("div",BL,[s.isLiveButtonVisible?(a.openBlock(),a.createElementBlock("div",{key:0,role:"button",class:"btn-live",onClick:d},RL)):a.createCommentVNode("",!0)])]),(s.isFull||n.value)&&s.tournamentScheduleKeys&&s.tournamentScheduleKeys.length?(a.openBlock(),a.createBlock(ah,{key:0,height:"48px","match-days":s.tournamentScheduleKeys,"is-landing-mode":!!r.value,"items-to-show":9,"items-to-scroll":9,"component-width":"100%","default-match-day-key":s.defaultMatchDayKey,onChangeMatchDay:o},null,8,["match-days","is-landing-mode","default-match-day-key"])):a.createCommentVNode("",!0),!s.isFull&&!n.value?(a.openBlock(),a.createElementBlock(a.Fragment,{key:1},[r.value?(a.openBlock(),a.createElementBlock(a.Fragment,{key:1},[Object.keys(s.data).length>0?(a.openBlock(),a.createBlock(a.unref(un),{key:0,pxScroll:348,"background-color":"none",scrollColor:"none",arrowsPosition:"absolute",arrowsScrollHide:!0,arrowsBackground:"rgba(255,255,255,.16)",arrowsContainerBgL:"linear-gradient(270deg, rgba(13,29,41,0) 100%, rgba(13,29,41,1) 100%)",arrowsContainerBgR:"linear-gradient(90deg, rgba(13,29,41,0) 100%, rgba(13,29,41,1) 100%)",arrowsMargin:0,arrowsRadius:"50%",arrowsBorder:"#ddd"},{default:a.withCtx(()=>[a.createElementVNode("div",NL,[a.createVNode(Gs,{small:"",data:s.data.data.prematch,onClickMatch:u[3]||(u[3]=m=>c.$emit("clickMatch",s.data.data.prematch))},null,8,["data"]),s.data.data.postmatch&&s.data.data.postmatch.game_status&&s.data.data.postmatch.game_status!==4?(a.openBlock(),a.createBlock(La,{key:0,data:s.data.data.postmatch,onClickMatch:u[4]||(u[4]=m=>c.$emit("clickMatch",s.data.data.postmatch))},null,8,["data"])):(a.openBlock(),a.createBlock(La,{key:1,"info-type":"prematch",data:s.data.data.postmatch,onClickMatch:u[5]||(u[5]=m=>c.$emit("clickMatch",s.data.data.postmatch))},null,8,["data"]))])]),_:1})):a.createCommentVNode("",!0)],64)):(a.openBlock(),a.createElementBlock(a.Fragment,{key:0},[Object.keys(s.data).length>0?(a.openBlock(),a.createElementBlock("div",vL,[a.createVNode(Gs,{data:s.data.data.prematch,onClickMatch:u[0]||(u[0]=m=>c.$emit("clickMatch",s.data.data.prematch))},null,8,["data"]),s.data.data.postmatch&&s.data.data.postmatch.game_status&&s.data.data.postmatch.game_status!==4?(a.openBlock(),a.createBlock(La,{key:0,data:s.data.data.postmatch,onClickMatch:u[1]||(u[1]=m=>c.$emit("clickMatch",s.data.data.postmatch))},null,8,["data"])):(a.openBlock(),a.createBlock(La,{key:1,"info-type":"prematch",data:s.data.data.postmatch,onClickMatch:u[2]||(u[2]=m=>c.$emit("clickMatch",s.data.data.postmatch))},null,8,["data"]))])):a.createCommentVNode("",!0)],64))],64)):s.data?(a.openBlock(),a.createElementBlock(a.Fragment,{key:2},[s.data.length>1?(a.openBlock(),a.createBlock(a.unref(un),{key:0,pxScroll:348,"background-color":"none",scrollColor:"none",arrowsPosition:"absolute",arrowsScrollHide:!0,arrowsBackground:"rgba(255,255,255,.16)",arrowsContainerBgL:"linear-gradient(270deg, rgba(13,29,41,0) 100%, rgba(13,29,41,1) 100%)",arrowsContainerBgR:"linear-gradient(270deg, rgba(13,29,41,0) 100%, rgba(13,29,41,1) 100%)",arrowsMargin:0,arrowsRadius:"50%",arrowsBorder:"#ddd"},{default:a.withCtx(()=>[a.createElementVNode("div",DL,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(s.data,(m,f)=>(a.openBlock(),a.createBlock(KA,{key:f,game:m,onClickMatch:p=>c.$emit("clickMatch",m)},null,8,["game","onClickMatch"]))),128))])]),_:1})):(a.openBlock(),a.createElementBlock(a.Fragment,{key:1},[r.value?(a.openBlock(),a.createElementBlock(a.Fragment,{key:1},[Object.keys(s.data).length>0?(a.openBlock(),a.createElementBlock("div",OL,[s.data[0].game_status==4?(a.openBlock(),a.createBlock(Gs,{key:0,data:s.data[0],small:"",onClickMatch:u[8]||(u[8]=m=>c.$emit("clickMatch",s.data[0]))},null,8,["data"])):a.createCommentVNode("",!0),s.data[0].game_status!=4?(a.openBlock(),a.createBlock(Gs,{key:1,data:s.data[0],small:"",onClickMatch:u[9]||(u[9]=m=>c.$emit("clickMatch",s.data[0]))},null,8,["data"])):a.createCommentVNode("",!0)])):a.createCommentVNode("",!0)],64)):(a.openBlock(),a.createElementBlock(a.Fragment,{key:0},[Object.keys(s.data).length>0?(a.openBlock(),a.createElementBlock("div",PL,[s.data[0].game_status==4?(a.openBlock(),a.createBlock(Gs,{key:0,data:s.data[0],small:"",onClickMatch:u[6]||(u[6]=m=>c.$emit("clickMatch",s.data[0]))},null,8,["data"])):a.createCommentVNode("",!0),s.data[0].game_status!=4?(a.openBlock(),a.createBlock(Gs,{key:1,data:s.data[0],small:"",onClickMatch:u[7]||(u[7]=m=>c.$emit("clickMatch",s.data[0]))},null,8,["data"])):a.createCommentVNode("",!0)])):a.createCommentVNode("",!0)],64))],64))],64)):a.createCommentVNode("",!0)]))}},[["__scopeId","data-v-c26e8c06"]]),ML={__name:"gsc-games",props:{componentWidth:{type:[Number,String],default:768},isplayer:{type:Boolean,default:!1},isFull:{type:Boolean,default:!1},data:{type:Object,default:()=>{}},tournamentScheduleKeys:{type:Array,default:()=>[]},defaultMatchDayKey:{type:String,default:""},user:{type:Object,default:()=>{}},currentSeason:{type:Number,default:0},currentTournament:{type:Object,default:()=>{}},isLiveButtonVisible:{type:Boolean,default:!1}},setup(s){return(e,t)=>(a.openBlock(),a.createElementBlock("main",null,[a.createVNode(FL,{data:s.data,"component-width":s.componentWidth,"is-full":s.isFull,"has-team":!s.isplayer,"tournament-schedule-keys":s.tournamentScheduleKeys,"default-match-day-key":s.defaultMatchDayKey,user:s.user,"current-season":s.currentSeason,"current-tournament":s.currentTournament,"is-live-button-visible":s.isLiveButtonVisible,onClickLive:t[0]||(t[0]=n=>e.$emit("click-live")),onClickCalendar:t[1]||(t[1]=n=>e.$emit("clickCalendar")),onClickMatch:t[2]||(t[2]=n=>e.$emit("clickMatch",n)),onChangeMatchDay:t[3]||(t[3]=n=>e.$emit("change-match-day",n)),onChangeIsLeagueSelected:t[4]||(t[4]=n=>e.$emit("change-is-league-selected",n))},null,8,["data","component-width","is-full","has-team","tournament-schedule-keys","default-match-day-key","user","current-season","current-tournament","is-live-button-visible"])]))}},VL="_toniKroos_ov00i_18",$L="_centralMidfielder_ov00i_28",UL="_icnPlayIcon_ov00i_38",zL="_verVideos_ov00i_45",GL="_btnVideosOptions_ov00i_55",jL="_btnVideosOptionsTeams_ov00i_70",HL="_info_ov00i_90",WL="_goalUnlock_ov00i_102",KL="_teamsAmerica_ov00i_115",qL="_imageIcon_ov00i_125",YL="_imageIconTeam_ov00i_136",JL="_playerTops_ov00i_148",XL={toniKroos:VL,centralMidfielder:$L,icnPlayIcon:UL,verVideos:zL,btnVideosOptions:GL,btnVideosOptionsTeams:jL,info:HL,goalUnlock:WL,teamsAmerica:KL,imageIcon:qL,imageIconTeam:YL,playerTops:JL},ZL=(s,e)=>{const t=s.__vccOpts||s;for(const[n,i]of e)t[n]=i;return t},QL={props:{height:{type:String,default:"194px"},background:{type:String,default:"#122735"},borderRadius:{type:String,default:"4px"},borderWidth:{type:Number,default:0},borderColor:{type:String,default:"#ffffff"},namePlayerFont:{type:String,default:"Montserrat-SemiBold"},namePlayerFontColor:{type:String,default:"#ffffff"},namePlayerFontSize:{type:String,default:"18px"},namePlayerFontStyle:{type:String,default:"Normal"},namePositionFont:{type:String,default:"Poppins-Regular"},namePositionFontColor:{type:String,default:"#8ea2ab"},namePositionFontSize:{type:String,default:"14px"},namePositionFontStyle:{type:String,default:"Normal"},totalFont:{type:String,default:"Poppins-Regular"},totalFontColor:{type:String,default:"#ffffff"},totalFontSize:{type:String,default:"8px"},totalFontStyle:{type:String,default:"Normal"},totalHeight:{type:String,default:"22px"},totalWidth:{type:String,default:"80px"},totalBorderRadius:{type:String,default:"64px"},totalBorderWidth:{type:Number,default:1},totalBorderColor:{type:String,default:"#cbee6b"},iconPlay:{type:String,default:"/icnplay1.svg"},teamWidth:{type:String,default:"34px"},teamPositionLeft:{type:String,default:"12px"},teamPositionTop:{type:String,default:""},playerOrTeamPhotoWidth:{type:String,default:"99px"},numbertopLeft:{type:String,default:"-8px"},numbertopBottom:{type:String,default:"-25px"},numbertopTop:{type:String},numbertopRight:{type:String},numbertopColor:{type:String,default:"#ffffff"},numbertopFontSize:{type:String,default:"98px"},numbertopOpacity:{type:String,default:"0.18"},numberFontFamily:{type:String,default:"Montserrat-SemiBold"},showShieldTeam:{type:Boolean,default:!0},showIconVideo:{type:Boolean,default:!0},showPositionPlayer:{type:Boolean,default:!0},activeVideos:{type:Boolean,default:!0},freemiumActive:{type:Boolean,default:!1},isPlayer:{type:Boolean,default:!0},data:{type:Object,default:()=>{}}},computed:{customMosaic(){return{height:this.height,background:this.background,borderRadius:`${this.borderRadius} !important`,border:`solid ${this.borderWidth}px ${this.borderColor}`}},customNamePlayer(){return{fontFamily:this.namePlayerFont,fontSize:this.namePlayerFontSize,color:this.namePlayerFontColor,fontStyle:this.namePlayerFontStyle}},customNamePosition(){return{fontFamily:this.namePositionFont,fontSize:this.namePositionFontSize,color:this.namePositionFontColor,fontStyle:this.namePositionFontStyle}},customTotal(){return{fontFamily:this.totalFont,fontSize:this.totalFontSize,color:this.totalFontColor,fontStyle:this.totalFontStyle}},customTotalCont(){return{MinHeight:this.totalHeight,width:this.totalWidth,borderRadius:`${this.totalBorderRadius} !important`,border:`solid ${this.totalBorderWidth}px ${this.totalBorderColor}`}},customShieldTeam(){return{width:this.teamWidth,top:this.teamPositionTop,left:this.teamPositionLeft}},customPhotoPlayerOrTeam(){return{width:this.playerOrTeamPhotoWidth}},customNumberTop(){return{fontSize:this.numbertopFontSize,color:this.numbertopColor,left:this.numbertopLeft,right:this.numbertopRight,top:this.numbertopTop,bottom:this.numbertopBottom,opacity:this.numbertopOpacity,fontFamily:this.numberFontFamily}}},methods:{onPlayerTopsClick(s){this.activeVideos&&(this.$emit("clickMosaic",s),this.$emit("freemium",this.freemiumActive))},onButtonVideos(s){this.activeVideos&&(this.$emit("openmedia",s),this.$emit("clickvideos",s.id),this.$emit("freemium",this.freemiumActive))}}},e5=["src"],t5=["src"],s5=["src"];function n5(s,e,t,n,i,r){return a.openBlock(),a.createElementBlock("section",{class:a.normalizeClass(s.$style.playerTops),style:a.normalizeStyle(r.customMosaic),id:"player-mosaico",onClick:e[1]||(e[1]=o=>r.onPlayerTopsClick(t.data.player_id))},[a.createElementVNode("div",{class:a.normalizeClass(s.$style.info)},[a.createElementVNode("h3",{class:a.normalizeClass(s.$style.toniKroos),style:a.normalizeStyle(r.customNamePlayer)},a.toDisplayString(t.data.player_name),7),t.showPositionPlayer?(a.openBlock(),a.createElementBlock("div",{key:0,class:a.normalizeClass(s.$style.centralMidfielder),style:a.normalizeStyle(r.customNamePosition)},a.toDisplayString(t.data.player_position),7)):a.createCommentVNode("",!0),a.createElementVNode("button",{class:a.normalizeClass(this.isPlayer?s.$style.btnVideosOptions:s.$style.btnVideosOptionsTeams),style:a.normalizeStyle(r.customTotalCont),id:"button-actions",onClick:e[0]||(e[0]=o=>r.onButtonVideos(t.data))},[t.showIconVideo?(a.openBlock(),a.createElementBlock("img",{key:0,class:a.normalizeClass(s.$style.icnPlayIcon),src:t.iconPlay},null,10,e5)):a.createCommentVNode("",!0),a.createElementVNode("div",{class:a.normalizeClass(s.$style.verVideos),style:a.normalizeStyle(r.customTotal)},a.toDisplayString(t.data.player_stat)+" "+a.toDisplayString(t.data.category),7)],6)],2),a.createElementVNode("b",{style:a.normalizeStyle(r.customNumberTop),class:a.normalizeClass(s.$style.goalUnlock)},a.toDisplayString(t.data.top),7),t.showShieldTeam?(a.openBlock(),a.createElementBlock("img",{key:0,class:a.normalizeClass(s.$style.teamsAmerica),style:a.normalizeStyle(r.customShieldTeam),loading:"lazy",src:t.data.team_logo},null,14,t5)):a.createCommentVNode("",!0),a.createElementVNode("img",{style:a.normalizeStyle(r.customPhotoPlayerOrTeam),class:a.normalizeClass(this.isPlayer?s.$style.imageIcon:s.$style.imageIconTeam),loading:"lazy",src:t.data.player_photo},null,14,s5)],6)}const a5={$style:XL},i5=ZL(QL,[["render",n5],["__cssModules",a5]]),r5=(s,e)=>{const t=s.__vccOpts||s;for(const[n,i]of e)t[n]=i;return t},ro={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(s){this.status=s}}},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(s){this.$emit("click",s),this.typeOnOff&&(this.status=!this.status,this.$emit("status",this.status))}}},rh=()=>{a.useCssVars(s=>({"9d01acb4":s.height,"14e95081":s.borderWidthBtn,"38fec285":s.borderType,34353510:s.borderColor,"20d20dc6":s.borderRadius,17130967:s.width,"4ccb7d36":s.backgroundColor,"5d1e86a2":s.cursorType,ce65d4a2:s.fontSize,fe4ac47a:s.fontStyle,f98e44dc:s.fontFamily,"93b87770":s.marginLeftStat,c7f7beba:s.fontSizeStat}))},oh=ro.setup;ro.setup=oh?(s,e)=>(rh(),oh(s,e)):rh;const o5=s=>(a.pushScopeId("data-v-f3ee6b2b"),s=s(),a.popScopeId(),s),l5=["src"],c5={key:1,class:"text"},d5=["src"],u5={class:"stats"},h5=o5(()=>a.createElementVNode("img",{class:"iconstats",src:"https://golstatsimages.blob.core.windows.net/todoelfut/playdes.png"},null,-1)),m5={class:"numstats"},f5={class:"leyend"};function g5(s,e,t,n,i,r){return a.openBlock(),a.createElementBlock("div",null,[t.type==0?(a.openBlock(),a.createElementBlock("div",{key:0,class:a.normalizeClass(["button",i.status&&t.typeOnOff&&"button-active"]),style:a.normalizeStyle([r.customStyle,i.status&&t.typeOnOff&&r.customActive]),onClick:e[0]||(e[0]=(...o)=>r.btnClick&&r.btnClick(...o))},[t.icon&&t.iconPosition.toLowerCase()==="left"?(a.openBlock(),a.createElementBlock("img",{key:0,class:"icon",style:a.normalizeStyle({width:t.iconSize}),src:t.icon},null,12,l5)):a.createCommentVNode("",!0),t.textValue?(a.openBlock(),a.createElementBlock("div",c5,a.toDisplayString(t.textValue),1)):a.createCommentVNode("",!0),t.icon&&t.iconPosition.toLowerCase()==="right"?(a.openBlock(),a.createElementBlock("img",{key:2,class:"icon",style:a.normalizeStyle({width:t.iconSize}),src:t.icon},null,12,d5)):a.createCommentVNode("",!0)],6)):a.createCommentVNode("",!0),t.type==1?(a.openBlock(),a.createElementBlock("div",{key:1,class:"button-target",onClick:e[1]||(e[1]=(...o)=>r.btnClick&&r.btnClick(...o))},[a.createElementVNode("div",u5,[h5,a.createElementVNode("div",m5,a.toDisplayString(t.textStat),1)]),a.createElementVNode("div",f5,a.toDisplayString(t.textCategory),1)])):a.createCommentVNode("",!0)])}const p5=r5(ro,[["render",g5],["__scopeId","data-v-f3ee6b2b"]]);function y5(s){const e=a.ref({width:0,height:0});function t(){const n=s.value.getBoundingClientRect();e.value.width=n.width,e.value.height=n.height}return a.onMounted(()=>{t(),window.addEventListener("resize",t)}),a.onUnmounted(()=>{window.removeEventListener("resize",t)}),{elementSize:e}}const oo={props:{textOptionLeft:String,valueDefault:{type:String,default:""},textOptionRight:String,hiddenLabels:{type:Boolean,default:!1},width:{type:String,default:"50px"},height:{type:String,default:"32px"},heightCircle:{type:String,default:"24px"},widthCircle:{type:String,default:"24px"},widthIcons:{type:String,default:"22"},borderRadius:{type:String,default:"30px"},borderType:{type:String,default:"solid"},borderWidth:{type:Number,default:1},borderColor:{type:String,default:"#FFFFFF"},fontSize:{type:String,default:"14px"},fontColor:{type:String,default:"#000000"},iconA:{type:String,default:""},iconB:{type:String,default:""},fontFamily:{type:String,default:"Poppins-Light"},backgroundColor:{type:String,default:"#2e3b46"},circleColorSwitch:{type:String,default:"#FFFFFF"}},data(){return{OptionDefault:!1}},watch:{valueDefault:{immediate:!0,handler:async function(s){try{s==this.textOptionLeft&&(this.OptionDefault=!1),s==this.textOptionRight&&(this.OptionDefault=!0)}catch(e){throw new Error(e)}}}},computed:{customStyle(){return{width:this.width,height:this.height,borderRadius:this.borderRadius,border:`${this.borderType} ${this.borderWidth}px ${this.borderColor}`,backgroundColor:this.backgroundColor,circleColor:this.circleColorSwitch}},customText(){return{color:this.fontColor,fontSize:this.fontSize,fontFamily:`${this.fontFamily} !important`}}},methods:{handleSwitchChange(s){s.target.checked?this.$emit("change",this.textOptionRight):this.$emit("change",this.textOptionLeft)}}},lh=()=>{a.useCssVars(s=>({"5d15d746":s.backgroundColor,"0bc50bbe":s.widthCircle,"7ad0df62":s.heightCircle}))},ch=oo.setup;oo.setup=ch?(s,e)=>(lh(),ch(s,e)):lh;const b5={key:0,class:"text-left"},w5=["width","src"],S5=["checked"],_5=["width","src"],k5={key:3,class:"text-right"};function E5(s,e,t,n,i,r){return a.openBlock(),a.createElementBlock("div",{class:"gsc-switch-radio",style:a.normalizeStyle(r.customText)},[t.textOptionLeft!=""&&!t.hiddenLabels?(a.openBlock(),a.createElementBlock("span",b5,a.toDisplayString(t.textOptionLeft),1)):a.createCommentVNode("",!0),t.iconA!=""?(a.openBlock(),a.createElementBlock("img",{key:1,width:t.widthIcons,src:t.iconA},null,8,w5)):a.createCommentVNode("",!0),a.createElementVNode("input",{type:"checkbox",id:"toggle-btn",onChange:e[0]||(e[0]=(...o)=>r.handleSwitchChange&&r.handleSwitchChange(...o)),checked:i.OptionDefault},null,40,S5),a.createElementVNode("label",{for:"toggle-btn",style:a.normalizeStyle([r.customStyle,{"--circle-color":t.circleColorSwitch}])},null,4),t.iconB!=""?(a.openBlock(),a.createElementBlock("img",{key:2,width:t.widthIcons,src:t.iconB},null,8,_5)):a.createCommentVNode("",!0),t.textOptionRight!=""&&!t.hiddenLabels?(a.openBlock(),a.createElementBlock("span",k5,a.toDisplayString(t.textOptionRight),1)):a.createCommentVNode("",!0)],4)}const lo={components:{GSCSlider:un,GSCMosaicthebest:i5,GscSwitchComponent:vr,GSCButton:p5,GSCRadioToggle:et(oo,[["render",E5],["__scopeId","data-v-f9c67ce5"]])},setup(){const s=a.ref("myDivRef"),{elementSize:e}=y5(s);return{myDivRef:s,elementSize:e}},props:{backgroundColor:{type:String,default:"#0D1D29"},tournamentSelected:{type:Object,default:()=>({id:0})},showSwitch:{type:Boolean,default:!0},activeVideos:{type:Boolean,default:!0},showSelect:{type:Boolean,default:!0},league:{type:Number,default:0},showMore:{type:Boolean,default:!0},fontFamily:{type:String,default:"Poppins-Semibold"},fontColor:{type:String,default:"#FFFFFF"},fontSize:{type:String,default:"24px"},marginMosaic:{type:String,default:"24px"},tournament:{type:Number,default:1},season:{type:Number,default:1772},teamId:{type:Number,default:0}},watch:{tournamentSelected:{handler(s){s.is_female==1?this.optionSelected="Jugadoras":this.optionSelected="Jugadores"},immediate:!0},season:{async handler(s){const e=this.categorySelected!==null?this.categorySelected:1;this.showSwitch||(this.filterSelected=1),await this.getCategoryStats(s,this.filterSelected,e)},immediate:!0}},data:()=>({url:"https://kgfaxdv624.execute-api.us-east-2.amazonaws.com/prod/tops/seasons/",showTops:!0,token:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MCwibmFtZSI6IlVzdWFyaW8gRnJlZSIsInVzZXJuYW1lIjoiZnJlZUBnb2xzdGF0cy5jb20iLCJlbWFpbCI6ImZyZWVAZ29sc3RhdHMuY29tIiwiaWF0IjoxNjA2NzU4Nzk1LCJleHAiOjE2MzgyOTQ3OTV9.kPNmP7yDtk38cAXrUyc7OHRh6J25VFqy-XUNzbK-4YE",categoriesDefault:["Goles","Pases acertados","Balones recuperados en disputa","Asistencias","Participaciones en gol","Tiros a gol","Tiros a gol que llegaron a la portería","Cabeceos en área rival","Cabeceos en área propia","Centros","Centros acertados","1vs1 exitosos ofensivos","1vs1 exitosos ofensivos que terminaron en gol","1vs1 defensivos exitoso","Rechaces","Balones ganados en área propia","Balones ganados en área rival","Faltas cometidas","Faltas recibidas","Tarjetas amarillas","Tarjetas rojas","Atajadas","Tiros de Esquina"],categories:[{id:1,name:"Goles"},{id:2,name:"Pases acertados"},{id:3,name:"Balones recuperados en disputa"},{id:4,name:"Asistencias"},{id:5,name:"Participaciones en gol"},{id:6,name:"Tiros a gol"},{id:7,name:"Tiros a gol que llegaron a la portería"},{id:8,name:"Cabeceos en área rival"},{id:9,name:"Cabeceos en área propia"},{id:10,name:"Centros"},{id:11,name:"Centros acertados"},{id:12,name:"1vs1 exitosos ofensivos"},{id:13,name:"1vs1 exitosos ofensivos que terminaron en gol"},{id:14,name:"1vs1 defensivos exitoso"},{id:15,name:"Rechaces"},{id:16,name:"Balones ganados en área propia"},{id:17,name:"Balones ganados en área rival"},{id:18,name:"Faltas cometidas"},{id:19,name:"Faltas recibidas"},{id:20,name:"Tarjetas amarillas"},{id:21,name:"Tarjetas rojas"},{id:22,name:"Atajadas"},{id:23,name:"Tiros de Esquina"}],categoryData:[],categorySelected:null,filterSelected:1,isTeam:!1,categoryName:"Goles",optionSelected:"Jugadores",positions:[{name:"Portero"},{name:"Defensa central"},{name:"Lateral por izquierda"},{name:"Lateral por derecha"},{name:"Volante por izquierda"},{name:"Volante por derecha"},{name:"Volante defensivo"},{name:"Volante ofensivo"},{name:"Delantero"},{name:"Desconocida"}]}),async created(){await this.getCategoryStats(this.season,this.league)},computed:{topData(){var s=[];return this.categorySelected!=null&&this.categoryData[this.categorySelected]!==void 0&&(this.isTeam?s=this.categoryData[this.categorySelected].top__teams:s=this.categoryData[this.categorySelected].top__players),s}},methods:{formatPlayerName(s){var n;const e=s.split(",");let t="";if(e[1]&&(t=`${e[1].trim()[0]}.`,e[0])){const i=(n=e[0])==null?void 0:n.trim().split(" ");for(let r of i)if(t=`${t} ${r.trim()}`,r.trim().length>3)break}return t},translateTopCategories(s){return{1:[12,55,"35_r","54_r"],2:[2,20],3:[485,486,487,488],4:[10,324],5:[27,323],6:[510],7:[537,540,544,547],8:[328],9:[231,238,280,287,294,406],10:[13,25],11:[98,101,104,105,109,112,115,116],12:[4],13:[88],14:[5],15:[34],16:[23],17:[11],18:[17,50],19:[18,49],20:[14,52],21:[15,53],22:[39],23:[31,32]}[s]||[]},onOpenMedia(s){const e=this.translateTopCategories(this.categorySelected),t=2,n=3;let i=[],r=0,o=0;this.isTeam?(r=s.player_id,o=n):(i=[s.player_id],o=t);const l={seasonId:this.season,tournaments:[],isFeaturedPlayers:!1,mainSectionType:1,playListType:o,gameIds:null,playerIds:i,goalkeeperIds:[],categoryIds:e,teamId:r,matchResult:[1,2,3],categorySingleName:"",avoidCategorySingleName:!1,currentPlayIndex:0,playData:null,lastClashedGameId:null,tournamentsLastClashes:null,advancedFilter:{playListTitle:s.category},objectPlaySync:null};this.$emit("openmedia",l)},async ChangeRadio(s){const e=this.categorySelected!==null?this.categorySelected:1;s==="Mi equipo"&&(this.filterSelected=0,await this.getCategoryStats(this.season,0,e)),s==="Liga MX"&&(this.filterSelected=1,await this.getCategoryStats(this.season,1,e))},clickMosaic(s){this.$emit("boxinput",s)},clickMore(){this.$emit("more")},async changeType(s){const e=this.categorySelected!==null?this.categorySelected:1;this.optionSelected=s,s=="Equipos"?(await this.getCategoryStats(this.season,1,e),this.isTeam=!0):this.isTeam=!1},compareObjectsMinutes(s,e){return s.total>e.total?-1:s.total<e.total?1:s.minutes<e.minutes?-1:s.minutes>e.minutes?1:0},changeCategory(s){this.categoryName=s;const e=this.categories.find(t=>t.name===s);this.categorySelected=e.id},async getCategoryStats(s,e,t=0){try{let r={},o={},l=[];const d=Le.create({headers:{Authorization:`${this.token}`}});var n={};if(e==0&&(n=await d.get(this.url+this.season+"/teams/"+this.teamId)),e==1&&(n=await d.get(this.url+s)),n.data.players.length==0?this.showTops=!1:this.showTops=!0,n&&n.data){n.data.teams.map(c=>{r[c[0]]={},r[c[0]].id=c[0],r[c[0]].name=c[1],r[c[0]].img=c[3],r[c[0]].abrv=c[2],r[c[0]].logo=c[3]}),n.data.players.map(c=>{o[c[0]]={},o[c[0]].id=c[0],o[c[0]].name=c[1],o[c[0]].img=c[2],o[c[0]].position=c[6],o[c[0]].minutes=c[13],o[c[0]].logo="https://golstatsimages.blob.core.windows.net/teams-80/"+c[10][0].team_id+".png"});var i=1;n.data.tops.map(c=>{l[c.category?c.category:i]={};var u={},m={};c.teams.map(h=>{u[h[0]]={},u[h[0]].total=h[1],u[h[0]].id=r[h[0]].id,u[h[0]].name=r[h[0]].name,u[h[0]].img="https://golstatsimages.blob.core.windows.net/teams-150/"+h[0]+".png",u[h[0]].logo="https://golstatsimages.blob.core.windows.net/teams-80/"+h[0]+".png"}),c.players.map(h=>{m[h[0]]={},m[h[0]].minutes=o[h[0]].minutes,m[h[0]].total=h[1],m[h[0]].name=o[h[0]].name,m[h[0]].img=o[h[0]].img.replace("players-profile/","players-profile/"),m[h[0]].id=o[h[0]].id,m[h[0]].position=this.tournamentSelected.is_female==1?this.positions[o[h[0]].position-1].name.replace("Portero","Portera").replace("Delantero","Delantera").replace("Volante defensivo","Volante defensiva").replace("Volante ofensivo","Volante ofensiva"):this.positions[o[h[0]].position-1].name,m[h[0]].logo=o[h[0]].logo});var f=[],p=[];for(const h in u)f.push(u[h]);for(const h in m)p.push(m[h]);f.sort((h,g)=>h.total<g.total?1:-1),p=p.sort(this.compareObjectsMinutes).slice(0,60),l[c.category?c.category:i].top__players=p,l[c.category?c.category:i].top__teams=f,i++})}else this.showTops=!1;t===0?this.categorySelected=1:this.categorySelected=t,this.categoryData=l}catch(r){return Promise.reject(r)}}}},dh=()=>{a.useCssVars(s=>({"755bc1d4":s.backgroundColor,"7748a398":s.fontFamily,"9f60b25e":s.fontSize,"58c64293":s.fontColor,24655139:s.marginMosaic}))},uh=lo.setup;lo.setup=uh?(s,e)=>(dh(),uh(s,e)):dh;const T5={key:0,class:"gsc-best",ref:"myDivRef"},C5={class:"gsc-best__line-bar-tools"},x5={key:0,class:"gsc-best__line-bar-tools__title"},A5={key:1,class:"gsc-best__line-bar-tools__titlefull"},L5={class:"unit-items"},I5={key:2,class:"gsc-best__line-bar-tools__tools"},B5={key:0,class:"gsc-best__line-bar-tools__tools__tabs"},R5={key:1,class:"gsc-best__line-bar-tools__tools__btn"},v5={key:0,class:"gsc-best__line-bar-tools-movil"},N5={class:"gsc-best__line-bar-tools-movil__tabs"},D5={class:"gsc-best__categories"},P5={class:"gsc-best__players"};function O5(s,e,t,n,i,r){const o=a.resolveComponent("GSCRadioToggle"),l=a.resolveComponent("GSCButton"),d=a.resolveComponent("GscSwitchComponent"),c=a.resolveComponent("GSCMosaicthebest"),u=a.resolveComponent("GSCSlider");return s.showTops?(a.openBlock(),a.createElementBlock("div",T5,[a.createElementVNode("div",C5,[n.elementSize.width>900?(a.openBlock(),a.createElementBlock("div",x5,[a.createElementVNode("span",null,[t.tournamentSelected.is_female==1?(a.openBlock(),a.createElementBlock(a.Fragment,{key:0},[a.createTextVNode("Las mejores")],64)):(a.openBlock(),a.createElementBlock(a.Fragment,{key:1},[a.createTextVNode("Los mejores")],64))]),s.optionSelected!=="Equipos"&&t.showSwitch?(a.openBlock(),a.createBlock(o,{key:0,height:"20px",width:"41px","background-color":"none","width-circle":"15px","height-circle":"15px","circle-color-switch":"#CBEE6B","font-color":"#ffffff","value-default":"Liga MX",iconA:"https://golstatsimages.blob.core.windows.net/teams-150/"+t.teamId+".png",iconB:"https://golstatsimages.blob.core.windows.net/todoelfut/1.png",textOptionLeft:"Mi equipo",textOptionRight:"Liga MX",onChange:r.ChangeRadio},null,8,["iconA","onChange"])):a.createCommentVNode("",!0)])):a.createCommentVNode("",!0),n.elementSize.width<=900?(a.openBlock(),a.createElementBlock("div",A5,[a.createElementVNode("span",{style:a.normalizeStyle(n.elementSize.width<=380?"font-size: 15px; margin-top:0px; width:60px;":"")},[t.tournamentSelected.is_female==1?(a.openBlock(),a.createElementBlock(a.Fragment,{key:0},[a.createTextVNode("Las mejores")],64)):(a.openBlock(),a.createElementBlock(a.Fragment,{key:1},[a.createTextVNode("Los mejores")],64))],4),a.createElementVNode("span",L5,[s.optionSelected!=="Equipos"&&t.showSwitch?(a.openBlock(),a.createBlock(o,{key:0,height:"20px",width:"41px","background-color":"none","width-circle":"15px","height-circle":"15px","circle-color-switch":"#CBEE6B","font-color":"#ffffff","hidden-labels":!0,"value-default":"Liga MX",iconA:"https://golstatsimages.blob.core.windows.net/teams-150/"+t.teamId+".png",iconB:"https://golstatsimages.blob.core.windows.net/todoelfut/1.png",textOptionLeft:"Mi equipo",textOptionRight:"Liga MX",onChange:r.ChangeRadio},null,8,["iconA","onChange"])):a.createCommentVNode("",!0),n.elementSize.width<=900?(a.openBlock(),a.createBlock(l,{key:1,style:{"margin-top":"4px"},width:"75px","text-value":"Ver más","font-color":n.elementSize.width<=680?"rgba(255,255,255, 0.7)":"#fff","font-size":n.elementSize.width<=680?"11px":"14px","text-decoration":"underline",onClick:r.clickMore},null,8,["font-color","font-size","onClick"])):a.createCommentVNode("",!0)])])):a.createCommentVNode("",!0),n.elementSize.width>900?(a.openBlock(),a.createElementBlock("div",I5,[n.elementSize.width>900?(a.openBlock(),a.createElementBlock("div",B5,[t.showSelect?(a.openBlock(),a.createBlock(d,{key:0,arrow:!1,type:1,buttons:[t.tournamentSelected.is_female==1?"Jugadoras":"Jugadores","Equipos"],"selected-option":s.optionSelected,"border-radius":"32px",height:"28px","border-width":"1px","border-width-container":"0.5px","background-option-active":"#0d1d29","color-option-active":"#FFFFFF","font-size":"12px",width:"270px",fontFamily:"Poppins-Light",onInput:r.changeType,arrowsScrollHide:!1,arrowsPosition:"absolute"},null,8,["buttons","selected-option","onInput"])):a.createCommentVNode("",!0)])):a.createCommentVNode("",!0),t.showMore?(a.openBlock(),a.createElementBlock("div",R5,[a.createVNode(l,{width:"75px","text-value":"Ver más","font-size":"14px","text-decoration":"underline",onClick:r.clickMore},null,8,["onClick"]),a.createVNode(l,{width:"10px","text-value":"→","font-size":"14px","font-color":"#cbee6b",onClick:r.clickMore},null,8,["onClick"])])):a.createCommentVNode("",!0)])):a.createCommentVNode("",!0)]),n.elementSize.width<=900&&t.showSelect?(a.openBlock(),a.createElementBlock("div",v5,[a.createElementVNode("div",N5,[t.showSelect?(a.openBlock(),a.createBlock(d,{key:0,arrow:!1,type:1,buttons:[t.tournamentSelected.is_female==1?"Jugadoras":"Jugadores","Equipos"],"selected-option":s.optionSelected,"border-radius":"32px",height:"28px","border-width":"1px","border-width-container":"0.5px","background-option-active":"#0d1d29","color-option-active":"#FFFFFF","font-size":"10px",width:"270px",fontFamily:"Poppins-Light",onInput:r.changeType},null,8,["buttons","selected-option","onInput"])):a.createCommentVNode("",!0)])])):a.createCommentVNode("",!0),a.createElementVNode("div",D5,[a.createVNode(d,{type:2,background:t.backgroundColor,"arrows-background":t.backgroundColor,"background-option-active":t.backgroundColor,arrow:!0,"font-family":"Poppins-Light",buttons:s.categoriesDefault,height:"40px","selected-option":"Goles","font-size":n.elementSize.width<=900?"12px":"14px",width:"max-content",onInput:r.changeCategory,pxScroll:200,scrollColor:"none",arrowsScrollHide:!1,arrowsMargin:0,borderWidth:"2px"},null,8,["background","arrows-background","background-option-active","buttons","font-size","onInput"])]),a.createElementVNode("div",P5,[a.createVNode(u,{pxScroll:198,scrollColor:"none","background-color":t.backgroundColor,arrowsPosition:"absolute",arrowsScrollHide:!0,arrowsBackground:"rgba(255,255,255,.16)",arrowsContainerBgL:"linear-gradient(270deg, rgba(13,29,41,0) 0%, rgba(13,29,41,1) 70%)",arrowsContainerBgR:"linear-gradient(90deg, rgba(13,29,41,0) 0%, rgba(13,29,41,1) 70%)",arrowsMargin:0,arrowsRadius:"50%",arrowsBorder:"#ddd"},{default:a.withCtx(()=>[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(r.topData,(m,f)=>(a.openBlock(),a.createElementBlock("div",{key:f,class:a.normalizeClass(["gsc-best__players__item",f==0?"margin-none":""])},[a.createVNode(c,{data:{player_id:m.id,player_name:this.isTeam?m.name:r.formatPlayerName(m.name),player_position:m.position,player_stat:m.total,category:"Total",top:f<9?"0"+(f+1):f+1,team_logo:m.logo,player_photo:m.img},"show-shield-team":!0,"active-videos":!!t.activeVideos,"show-icon-video":!!t.activeVideos,onClickMosaic:r.clickMosaic,onOpenmedia:r.onOpenMedia,namePlayerFontSize:"13px",namePositionFontSize:"10px",numbertopLeft:"-15px",numberFontFamily:"Oswald-SemiBold",totalFontSize:"12px",totalFont:"Poppins-Light!important",totalHeight:"21px","is-player":!this.isTeam},null,8,["data","active-videos","show-icon-video","onClickMosaic","onOpenmedia","is-player"])],2))),128))]),_:1},8,["background-color"])])],512)):a.createCommentVNode("",!0)}const F5=et(lo,[["render",O5],["__scopeId","data-v-824ba31b"]]);/**
32
+ */const Je={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"}},th={itemsToShow:{default:Je.itemsToShow,type:Number},itemsToScroll:{default:Je.itemsToScroll,type:Number},wrapAround:{default:Je.wrapAround,type:Boolean},throttle:{default:Je.throttle,type:Number},snapAlign:{default:Je.snapAlign,validator(s){return["start","end","center","center-even","center-odd"].includes(s)}},transition:{default:Je.transition,type:Number},breakpoints:{default:Je.breakpoints,type:Object},autoplay:{default:Je.autoplay,type:Number},pauseAutoplayOnHover:{default:Je.pauseAutoplayOnHover,type:Boolean},modelValue:{default:void 0,type:Number},mouseDrag:{default:Je.mouseDrag,type:Boolean},touchDrag:{default:Je.touchDrag,type:Boolean},dir:{default:Je.dir,validator(s){return["rtl","ltr"].includes(s)}},i18n:{default:Je.i18n,type:Object},settings:{default(){return{}},type:Object}};function YA({config:s,slidesCount:e}){const{snapAlign:t,wrapAround:n,itemsToShow:i=1}=s;if(n)return Math.max(e-1,0);let r;switch(t){case"start":r=e-i;break;case"end":r=e-1;break;case"center":case"center-odd":r=e-Math.ceil((i-.5)/2);break;case"center-even":r=e-Math.ceil(i/2);break;default:r=0;break}return Math.max(r,0)}function JA({config:s,slidesCount:e}){const{wrapAround:t,snapAlign:n,itemsToShow:i=1}=s;let r=0;if(t||i>e)return r;switch(n){case"start":r=0;break;case"end":r=i-1;break;case"center":case"center-odd":r=Math.floor((i-1)/2);break;case"center-even":r=Math.floor((i-2)/2);break;default:r=0;break}return r}function to({val:s,max:e,min:t}){return e<t?s:Math.min(Math.max(s,t),e)}function XA({config:s,currentSlide:e,slidesCount:t}){const{snapAlign:n,wrapAround:i,itemsToShow:r=1}=s;let o=e;switch(n){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 i?o:to({val:o,max:t-r,min:0})}function sh(s){return s?s.reduce((e,t)=>{var n;return t.type===a.Fragment?[...e,...sh(t.children)]:((n=t.type)===null||n===void 0?void 0:n.name)==="CarouselSlide"?[...e,t]:e},[]):[]}function so({val:s,max:e,min:t=0}){return s>e?so({val:s-(e+1),max:e,min:t}):s<t?so({val:s+(e+1),max:e,min:t}):s}function ZA(s,e){let t;return e?function(...n){const i=this;t||(s.apply(i,n),t=!0,setTimeout(()=>t=!1,e))}:s}function QA(s,e){let t;return function(...n){t&&clearTimeout(t),t=setTimeout(()=>{s(...n),t=null},e)}}function eL(s="",e={}){return Object.entries(e).reduce((t,[n,i])=>t.replace(`{${n}}`,String(i)),s)}var tL=a.defineComponent({name:"ARIA",setup(){const s=a.inject("config",a.reactive(Object.assign({},Je))),e=a.inject("currentSlide",a.ref(0)),t=a.inject("slidesCount",a.ref(0));return()=>a.h("div",{class:["carousel__liveregion","carousel__sr-only"],"aria-live":"polite","aria-atomic":"true"},eL(s.i18n.itemXofY,{currentSlide:e.value+1,slidesCount:t.value}))}}),sL=a.defineComponent({name:"Carousel",props:th,setup(s,{slots:e,emit:t,expose:n}){var i;const r=a.ref(null),o=a.ref([]),l=a.ref(0),d=a.ref(0),c=a.reactive(Object.assign({},Je));let u=Object.assign({},Je),m;const f=a.ref((i=s.modelValue)!==null&&i!==void 0?i:0),p=a.ref(0),h=a.ref(0),g=a.ref(0),y=a.ref(0);let b,w;a.provide("config",c),a.provide("slidesCount",d),a.provide("currentSlide",f),a.provide("maxSlide",g),a.provide("minSlide",y),a.provide("slideWidth",l);function _(){m=Object.assign({},s.breakpoints),u=Object.assign(Object.assign(Object.assign({},u),s),{i18n:Object.assign(Object.assign({},u.i18n),s.i18n),breakpoints:void 0}),E(u)}function C(){if(!m||!Object.keys(m).length)return;const x=Object.keys(m).map($=>Number($)).sort(($,de)=>+de-+$);let z=Object.assign({},u);x.some($=>{const de=window.matchMedia(`(min-width: ${$}px)`).matches;return de&&(z=Object.assign(Object.assign({},z),m[$])),de}),E(z)}function E(x){Object.entries(x).forEach(([z,$])=>c[z]=$)}const A=QA(()=>{C(),R(),T()},16);function T(){if(!r.value)return;const x=r.value.getBoundingClientRect();l.value=x.width/c.itemsToShow}function R(){d.value<=0||(h.value=Math.ceil((d.value-1)/2),g.value=YA({config:c,slidesCount:d.value}),y.value=JA({config:c,slidesCount:d.value}),c.wrapAround||(f.value=to({val:f.value,max:g.value,min:y.value})))}a.onMounted(()=>{a.nextTick(()=>T()),setTimeout(()=>T(),1e3),C(),G(),window.addEventListener("resize",A,{passive:!0}),t("init")}),a.onUnmounted(()=>{w&&clearTimeout(w),b&&clearInterval(b),window.removeEventListener("resize",A,{passive:!0})});let I=!1;const v={x:0,y:0},M={x:0,y:0},j=a.reactive({x:0,y:0}),U=a.ref(!1),se=a.ref(!1),re=()=>{U.value=!0},ie=()=>{U.value=!1};function ue(x){["INPUT","TEXTAREA","SELECT"].includes(x.target.tagName)||(I=x.type==="touchstart",I||x.preventDefault(),!(!I&&x.button!==0||W.value)&&(v.x=I?x.touches[0].clientX:x.clientX,v.y=I?x.touches[0].clientY:x.clientY,document.addEventListener(I?"touchmove":"mousemove",he,!0),document.addEventListener(I?"touchend":"mouseup",J,!0)))}const he=ZA(x=>{se.value=!0,M.x=I?x.touches[0].clientX:x.clientX,M.y=I?x.touches[0].clientY:x.clientY;const z=M.x-v.x,$=M.y-v.y;j.y=$,j.x=z},c.throttle);function J(){const x=c.dir==="rtl"?-1:1,z=Math.sign(j.x)*.4,$=Math.round(j.x/l.value+z)*x;if($&&!I){const de=Qe=>{window.removeEventListener("click",de,!0)};window.addEventListener("click",de,!0)}q(f.value-$),j.x=0,j.y=0,se.value=!1,document.removeEventListener(I?"touchmove":"mousemove",he,!0),document.removeEventListener(I?"touchend":"mouseup",J,!0)}function G(){!c.autoplay||c.autoplay<=0||(b=setInterval(()=>{c.pauseAutoplayOnHover&&U.value||me()},c.autoplay))}function ce(){b&&(clearInterval(b),b=null),G()}const W=a.ref(!1);function q(x){const z=c.wrapAround?x:to({val:x,max:g.value,min:y.value});f.value===z||W.value||(t("slide-start",{slidingToIndex:x,currentSlideIndex:f.value,prevSlideIndex:p.value,slidesCount:d.value}),W.value=!0,p.value=f.value,f.value=z,w=setTimeout(()=>{if(c.wrapAround){const $=so({val:z,max:g.value,min:0});$!==f.value&&(f.value=$,t("loop",{currentSlideIndex:f.value,slidingToIndex:x}))}t("update:modelValue",f.value),t("slide-end",{currentSlideIndex:f.value,prevSlideIndex:p.value,slidesCount:d.value}),W.value=!1,ce()},c.transition))}function me(){q(f.value+c.itemsToScroll)}function ye(){q(f.value-c.itemsToScroll)}const Ce={slideTo:q,next:me,prev:ye};a.provide("nav",Ce),a.provide("isSliding",W);const Q=a.computed(()=>XA({config:c,currentSlide:f.value,slidesCount:d.value}));a.provide("slidesToScroll",Q);const Ee=a.computed(()=>{const x=c.dir==="rtl"?-1:1,z=Q.value*l.value*x;return{transform:`translateX(${j.x-z}px)`,transition:`${W.value?c.transition:0}ms`,margin:c.wrapAround?`0 -${d.value*l.value}px`:"",width:"100%"}});function Te(){_(),C(),R(),T(),ce()}Object.keys(th).forEach(x=>{["modelValue"].includes(x)||a.watch(()=>s[x],Te)}),a.watch(()=>s.modelValue,x=>{x!==f.value&&q(Number(x))}),a.watch(d,R),t("before-init"),_();const Ve={config:c,slidesCount:d,slideWidth:l,next:me,prev:ye,slideTo:q,currentSlide:f,maxSlide:g,minSlide:y,middleSlide:h};n({updateBreakpointsConfigs:C,updateSlidesData:R,updateSlideWidth:T,initDefaultConfigs:_,restartCarousel:Te,slideTo:q,next:me,prev:ye,nav:Ce,data:Ve});const dt=e.default||e.slides,ut=e.addons,ht=a.reactive(Ve);return()=>{const x=sh(dt==null?void 0:dt(ht)),z=(ut==null?void 0:ut(ht))||[];x.forEach(($e,Ge)=>$e.props.index=Ge);let $=x;if(c.wrapAround){const $e=x.map((je,Re)=>a.cloneVNode(je,{index:-x.length+Re,isClone:!0,key:`clone-before-${Re}`})),Ge=x.map((je,Re)=>a.cloneVNode(je,{index:x.length+Re,isClone:!0,key:`clone-after-${Re}`}));$=[...$e,...x,...Ge]}o.value=x,d.value=Math.max(x.length,1);const de=a.h("ol",{class:"carousel__track",style:Ee.value,onMousedownCapture:c.mouseDrag?ue:null,onTouchstartPassiveCapture:c.touchDrag?ue:null},$),Qe=a.h("div",{class:"carousel__viewport"},de);return a.h("section",{ref:r,class:{carousel:!0,"is-sliding":W.value,"is-dragging":se.value,"is-hover":U.value,"carousel--rtl":c.dir==="rtl"},dir:c.dir,"aria-label":c.i18n.ariaGallery,tabindex:"0",onMouseenter:re,onMouseleave:ie},[Qe,z,a.h(tL)])}}}),no;(function(s){s.arrowUp="arrowUp",s.arrowDown="arrowDown",s.arrowRight="arrowRight",s.arrowLeft="arrowLeft"})(no||(no={}));const nL={arrowUp:"M7.41 15.41L12 10.83l4.59 4.58L18 14l-6-6-6 6z",arrowDown:"M7.41 8.59L12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z",arrowRight:"M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z",arrowLeft:"M15.41 16.59L10.83 12l4.58-4.59L14 6l-6 6 6 6 1.41-1.41z"};function aL(s){return s in no}const ao=s=>{const e=a.inject("config",a.reactive(Object.assign({},Je))),t=String(s.name),n=`icon${t.charAt(0).toUpperCase()+t.slice(1)}`;if(!t||typeof t!="string"||!aL(t))return;const i=nL[t],r=a.h("path",{d:i}),o=e.i18n[n]||s.title||t,l=a.h("title",o);return a.h("svg",{class:"carousel__icon",viewBox:"0 0 24 24",role:"img","aria-label":o},[l,r])};ao.props={name:String,title:String};const iL=(s,{slots:e,attrs:t})=>{const{next:n,prev:i}=e||{},r=a.inject("config",a.reactive(Object.assign({},Je))),o=a.inject("maxSlide",a.ref(1)),l=a.inject("minSlide",a.ref(1)),d=a.inject("currentSlide",a.ref(1)),c=a.inject("nav",{}),{dir:u,wrapAround:m,i18n:f}=r,p=u==="rtl",h=a.h("button",{type:"button",class:["carousel__prev",!m&&d.value<=l.value&&"carousel__prev--disabled",t==null?void 0:t.class],"aria-label":f.ariaPreviousSlide,onClick:c.prev},(i==null?void 0:i())||a.h(ao,{name:p?"arrowRight":"arrowLeft"})),g=a.h("button",{type:"button",class:["carousel__next",!m&&d.value>=o.value&&"carousel__next--disabled",t==null?void 0:t.class],"aria-label":f.ariaNextSlide,onClick:c.next},(n==null?void 0:n())||a.h(ao,{name:p?"arrowLeft":"arrowRight"}));return[h,g]};var rL=a.defineComponent({name:"CarouselSlide",props:{index:{type:Number,default:1},isClone:{type:Boolean,default:!1}},setup(s,{slots:e}){const t=a.inject("config",a.reactive(Object.assign({},Je))),n=a.inject("currentSlide",a.ref(0)),i=a.inject("slidesToScroll",a.ref(0)),r=a.inject("isSliding",a.ref(!1)),o=a.computed(()=>s.index===n.value),l=a.computed(()=>s.index===n.value-1),d=a.computed(()=>s.index===n.value+1),c=a.computed(()=>{const u=Math.floor(i.value),m=Math.ceil(i.value+t.itemsToShow-1);return s.index>=u&&s.index<=m});return()=>{var u;return a.h("li",{style:{width:`${100/t.itemsToShow}%`},class:{carousel__slide:!0,"carousel__slide--clone":s.isClone,"carousel__slide--visible":c.value,"carousel__slide--active":o.value,"carousel__slide--prev":l.value,"carousel__slide--next":d.value,"carousel__slide--sliding":r.value},"aria-hidden":!c.value},(u=e.default)===null||u===void 0?void 0:u.call(e,{isActive:o.value,isClone:s.isClone,isPrev:l.value,isNext:d.value,isSliding:r.value,isVisible:c.value}))}}});const nh=s=>(a.pushScopeId("data-v-f97685f3"),s=s(),a.popScopeId(),s),oL={key:1,class:"match-day__live"},lL=[nh(()=>a.createElementVNode("div",{class:"match-day__live__bullet"},null,-1)),nh(()=>a.createElementVNode("div",{class:"match-day__live__text"},"LIVE",-1))],cL=et({__name:"MatchDay",props:{isLandingMode:{type:Boolean,default:!1},backgroundColor:{type:String,default:"#183143"},numberColor:{type:String,default:"white"},numberFontFamily:{type:String,default:"sans-serif"},numberFontSize:{type:String,default:"14px"},textColor:{type:String,default:"rgba(255, 255, 255, 0.5)"},textFontFamily:{type:String,default:"'Poppins-Regular', sans-serif"},textFontSize:{type:String,default:"8px"},bottomLineColor:{type:String,default:"#cbee6b"},selectedMatchDayBackgroundColor:{type:String,default:"#243b4c"},height:{type:String,default:"fit-content"},matchDay:{type:Object,default:()=>{}},matchDaySelected:{type:Object,default:()=>{}},componentWidth:{type:[Number,String],default:0}},emits:["change-match-day"],setup(s,{emit:e}){const t=s,n=a.computed(()=>{const l={"background-color":t.backgroundColor,height:t.height};return t.matchDay.key===t.matchDaySelected.key&&(l["border-bottom"]=`solid 1px ${t.bottomLineColor}`,l["background-color"]=t.selectedMatchDayBackgroundColor),t.isLandingMode||(l["border-right"]="solid 1px rgba(255, 255, 255, 0.1)"),l}),i=a.computed(()=>({color:t.numberColor,"font-family":t.numberFontFamily,"font-size":t.numberFontSize})),r=a.computed(()=>({color:t.textColor,"font-family":t.textFontFamily,"font-size":t.textFontSize}));function o(l){e("click-match-day",l)}return(l,d)=>(a.openBlock(),a.createElementBlock("div",{class:"match-day",style:a.normalizeStyle({...n.value}),onClick:d[0]||(d[0]=c=>o(s.matchDay))},[a.createElementVNode("div",{class:"match-day__value",style:a.normalizeStyle(i.value)},a.toDisplayString(s.matchDay.valueText),5),!Number.isNaN(s.matchDay.value)&&!s.matchDay.liveGamesIds.size?(a.openBlock(),a.createElementBlock("div",{key:0,class:"match-day__text",style:a.normalizeStyle([s.isLandingMode?"margin-top:3px":"margin-top:4px",r.value])},a.toDisplayString(s.isLandingMode||s.componentWidth<=425?"JOR":"JORNADA"),5)):s.matchDay.liveGamesIds.size?(a.openBlock(),a.createElementBlock("div",oL,lL)):a.createCommentVNode("",!0)],4))}},[["__scopeId","data-v-f97685f3"]]),ah=et({__name:"MatchDayPicker",props:{matchDays:{type:Array,default:()=>[]},isLandingMode:{type:Boolean,default:!1},backgroundColor:{type:String,default:"#183143"},numberColor:{type:String,default:"white"},numberFontFamily:{type:String,default:"sans-serif"},numberFontSize:{type:String,default:"14px"},textColor:{type:String,default:"rgba(255, 255, 255, 0.5)"},textFontFamily:{type:String,default:"sans-serif"},textFontSize:{type:String,default:"8px"},bottomLineColor:{type:String,default:"#cbee6b"},selectedMatchDayBackgroundColor:{type:String,default:"#243b4c"},height:{type:String,default:"fit-content"},disableMatchdays:{type:Boolean,default:!1},itemsToShow:{type:Number,default:9},itemsToScroll:{type:Number,default:9},defaultMatchDayKey:{type:[String,null],default:""},componentWidth:{type:[Number,String],default:0},closestMatchDay:{type:[Number,String],default:0}},emits:["change-match-day"],setup(s,{emit:e}){const t=s;a.useCssVars(u=>({"179f4a74":o.value,"17a178f4":l.value}));const n=a.ref(null),i=a.ref(-1),r=a.computed(()=>({itemsToShow:t.itemsToShow,itemsToScroll:t.itemsToScroll,snapAlign:"start"})),o=a.computed(()=>n.value.data.currentSlide.value===0?"none":"inline"),l=a.computed(()=>n.value.data.currentSlide.value===n.value.data.maxSlide.value?"none":"inline"),d=a.ref({});a.watch(()=>t.closestMatchDay,u=>{if(u){const m=t.matchDays.find(f=>f.key===u);c(m||t.matchDays[0],!0)}}),a.watch(()=>t.matchDays,u=>{if(!t.closestMatchDay&&u&&u.length){const m=u.find(f=>f.key===t.defaultMatchDayKey);i.value=u.findIndex(f=>f.key===t.defaultMatchDayKey),d.value=m||u[0],e("change-match-day",d.value)}},{immediate:!0}),a.watch(()=>t.defaultMatchDayKey,u=>{if(u){let m=-1;const f=t.matchDays.find((p,h)=>p.key===u?(m=h,!0):!1);f&&(d.value=f),m>-1&&n.value&&n.value.slideTo(m)}});function c(u,m=!1){m&&n.value.slideTo(u.index),t.disableMatchdays?u.avaible==!0&&(d.value=u,e("change-match-day",d.value)):(d.value=u,e("change-match-day",d.value))}return(u,m)=>(a.openBlock(),a.createElementBlock("div",{class:"match-day-picker",style:a.normalizeStyle(s.isLandingMode?"border-top-left-radius: 9px; border-top-right-radius: 9px;":"margin-bottom:12px")},[(a.openBlock(),a.createBlock(a.unref(sL),a.mergeProps(r.value,{modelValue:i.value,ref_key:"matchDayPickerCarousel",ref:n,key:i.value}),{addons:a.withCtx(()=>[a.createVNode(a.unref(iL))]),default:a.withCtx(()=>[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(s.matchDays,f=>(a.openBlock(),a.createBlock(a.unref(rL),{key:f.key},{default:a.withCtx(()=>[a.createVNode(cL,a.mergeProps({style:s.disableMatchdays&&!f.avaible?"opacity: 0.6 !important; cursor: default !important;":""},t,{"match-day":f,"match-day-selected":d.value,"is-landing-mode":s.isLandingMode,"component-width":s.componentWidth,onClickMatchDay:c}),null,16,["style","match-day","match-day-selected","is-landing-mode","component-width"])]),_:2},1024))),128))]),_:1},16,["modelValue"]))],4))}},[["__scopeId","data-v-d4bf2975"]]),dL=["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic"];function ih(){return"https://golstatsimages.blob.core.windows.net/golstats-app/"}function uL(s){return dL[s]}function hL(){let s=!1;return function(e){(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(e)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(e.substr(0,4)))&&(s=!0)}(navigator.userAgent||navigator.vendor||window.opera),s}function io(){let s=window.navigator.userAgent.toLowerCase(),e=/(macintosh|macintel|macppc|mac68k|macos)/i,t=/(win32|win64|windows|wince)/i,n=/(iphone|ipad|ipod)/i,i=null;return e.test(s)?i="macos":n.test(s)?i="ios":t.test(s)?i="windows":/android/.test(s)?i="android":!i&&/linux/.test(s)&&(i="linux"),i}function mL(s){const[e,t]=s.split(","),n=e.split(" ");let i="";for(const r of n)if(i+=` ${r}`,r.length>3)break;return t&&e?`${t.trim().charAt(0)}.${i}`:""}const xs=s=>(a.pushScopeId("data-v-c26e8c06"),s=s(),a.popScopeId(),s),fL={class:"quadrant-matches"},gL={class:"quadrant-matches__header"},pL={class:"quadrant-matches__header__pc"},yL={class:"title-and-switch"},bL={class:"quadrant-matches__title"},wL={key:0,class:"quadrant-matches__header__games-type"},SL=xs(()=>a.createElementVNode("div",{class:"quadrant-matches__header__my-team"},"Mi equipo",-1)),_L={class:"quadrant-matches__header__games-type__logo"},kL=["src"],EL={class:"quadrant-matches__header__games-type__switch"},TL={class:"quadrant-matches__header__games-type__logo"},CL=["src"],xL={key:0,class:"quadrant-matches__header__my-team"},AL=[xs(()=>a.createElementVNode("div",{class:"bullet"},null,-1)),xs(()=>a.createElementVNode("span",null,"LIVE",-1))],LL={key:1,class:"quadrant-matches__header__my-team"},IL=[xs(()=>a.createElementVNode("div",{class:"bullet"},null,-1)),xs(()=>a.createElementVNode("span",null,"LIVE",-1))],BL={class:"quadrant-matches__header__mobile"},RL=[xs(()=>a.createElementVNode("div",{class:"bullet"},null,-1)),xs(()=>a.createElementVNode("span",null,"LIVE",-1))],vL={key:0,class:"quadrant-matches__body"},NL={class:"quadrant-matches__body",style:{"column-gap":"16px"}},DL={class:"quadrant-matches__body matches"},PL={key:0,class:"quadrant-matches__body",style:{"column-gap":"16px","grid-template-columns":"1fr !important"}},OL={key:0,class:"quadrant-matches__body",style:{"column-gap":"16px","grid-template-columns":"1fr !important"}},FL=et({__name:"GSCQuadrantGames",props:{isUserPro:{type:Boolean,default:!1},hasTeam:{type:Boolean,default:!1},currentSeason:{type:Number,default:0},isFull:{type:Boolean,default:!1},comingMatches:{type:Array,default:()=>[]},data:{type:Object,default:()=>{}},previousMatches:{type:Array,default:()=>[]},componentWidth:{type:[Number,String],default:768},tournamentScheduleKeys:{type:Array,default:()=>[]},defaultMatchDayKey:{type:String,default:""},user:{type:Object,default:()=>{}},currentTournament:{type:Object,default:()=>{}},isLiveButtonVisible:{type:Boolean,default:!1}},emits:["change-match-day","change-is-league-selected","click-live"],setup(s,{emit:e}){const t=s,n=a.ref(!0),i=a.toRef(t,"componentWidth"),r=a.computed(()=>i.value<768);a.watch(n,c=>{e("change-is-league-selected",c)}),a.watch(()=>t.currentSeason,c=>{c&&(n.value=!0)}),a.watch(()=>t.currentTournament,c=>{c&&(n.value=!c.id===t.user.tournament,c.id===t.user.tournament&&setTimeout(()=>{n.value=!0,e("change-is-league-selected",!0)},300))});function o(c){e("change-match-day",c)}function l(c){n.value=c}function d(){n.value=!0,setTimeout(()=>{e("click-live")},500)}return(c,u)=>(a.openBlock(),a.createElementBlock("section",fL,[a.createElementVNode("div",gL,[a.createElementVNode("div",pL,[a.createElementVNode("div",yL,[a.createElementVNode("h2",bL,a.toDisplayString((s.isFull,"Partidos")),1)]),s.isFull?s.isLiveButtonVisible?(a.openBlock(),a.createElementBlock("div",LL,[a.createElementVNode("div",{role:"button",class:"btn-live",onClick:d},IL)])):a.createCommentVNode("",!0):(a.openBlock(),a.createElementBlock("div",wL,[SL,a.createElementVNode("div",_L,[s.user&&s.user.team?(a.openBlock(),a.createElementBlock("img",{key:0,src:`https://golstatsimages.blob.core.windows.net/teams-80/${s.user.team}.png`},null,8,kL)):a.createCommentVNode("",!0)]),a.createElementVNode("div",EL,[a.createVNode(qA,{"model-value":n.value,"onUpdate:modelValue":l},null,8,["model-value"])]),a.createElementVNode("div",TL,[s.currentTournament&&s.currentTournament.id?(a.openBlock(),a.createElementBlock("img",{key:0,src:`https://golstatsimages.blob.core.windows.net/todoelfut/${s.currentTournament.id}.png`},null,8,CL)):a.createCommentVNode("",!0)]),s.currentTournament?(a.openBlock(),a.createElementBlock("div",xL,[a.createElementVNode("div",null,a.toDisplayString(s.currentTournament.name),1),s.isLiveButtonVisible?(a.openBlock(),a.createElementBlock("div",{key:0,role:"button",class:"btn-live",onClick:d},AL)):a.createCommentVNode("",!0)])):a.createCommentVNode("",!0)]))]),a.createElementVNode("div",BL,[s.isLiveButtonVisible?(a.openBlock(),a.createElementBlock("div",{key:0,role:"button",class:"btn-live",onClick:d},RL)):a.createCommentVNode("",!0)])]),(s.isFull||n.value)&&s.tournamentScheduleKeys&&s.tournamentScheduleKeys.length?(a.openBlock(),a.createBlock(ah,{key:0,height:"48px","match-days":s.tournamentScheduleKeys,"is-landing-mode":!!r.value,"items-to-show":9,"items-to-scroll":9,"component-width":"100%","default-match-day-key":s.defaultMatchDayKey,onChangeMatchDay:o},null,8,["match-days","is-landing-mode","default-match-day-key"])):a.createCommentVNode("",!0),!s.isFull&&!n.value?(a.openBlock(),a.createElementBlock(a.Fragment,{key:1},[r.value?(a.openBlock(),a.createElementBlock(a.Fragment,{key:1},[Object.keys(s.data).length>0?(a.openBlock(),a.createBlock(a.unref(un),{key:0,pxScroll:348,"background-color":"none",scrollColor:"none",arrowsPosition:"absolute",arrowsScrollHide:!0,arrowsBackground:"rgba(255,255,255,.16)",arrowsContainerBgL:"linear-gradient(270deg, rgba(13,29,41,0) 100%, rgba(13,29,41,1) 100%)",arrowsContainerBgR:"linear-gradient(90deg, rgba(13,29,41,0) 100%, rgba(13,29,41,1) 100%)",arrowsMargin:0,arrowsRadius:"50%",arrowsBorder:"#ddd"},{default:a.withCtx(()=>[a.createElementVNode("div",NL,[a.createVNode(Gs,{small:"",data:s.data.data.prematch,onClickMatch:u[3]||(u[3]=m=>c.$emit("clickMatch",s.data.data.prematch))},null,8,["data"]),s.data.data.postmatch&&s.data.data.postmatch.game_status&&s.data.data.postmatch.game_status!==4?(a.openBlock(),a.createBlock(La,{key:0,data:s.data.data.postmatch,onClickMatch:u[4]||(u[4]=m=>c.$emit("clickMatch",s.data.data.postmatch))},null,8,["data"])):(a.openBlock(),a.createBlock(La,{key:1,"info-type":"prematch",data:s.data.data.postmatch,onClickMatch:u[5]||(u[5]=m=>c.$emit("clickMatch",s.data.data.postmatch))},null,8,["data"]))])]),_:1})):a.createCommentVNode("",!0)],64)):(a.openBlock(),a.createElementBlock(a.Fragment,{key:0},[Object.keys(s.data).length>0?(a.openBlock(),a.createElementBlock("div",vL,[a.createVNode(Gs,{data:s.data.data.prematch,onClickMatch:u[0]||(u[0]=m=>c.$emit("clickMatch",s.data.data.prematch))},null,8,["data"]),s.data.data.postmatch&&s.data.data.postmatch.game_status&&s.data.data.postmatch.game_status!==4?(a.openBlock(),a.createBlock(La,{key:0,data:s.data.data.postmatch,onClickMatch:u[1]||(u[1]=m=>c.$emit("clickMatch",s.data.data.postmatch))},null,8,["data"])):(a.openBlock(),a.createBlock(La,{key:1,"info-type":"prematch",data:s.data.data.postmatch,onClickMatch:u[2]||(u[2]=m=>c.$emit("clickMatch",s.data.data.postmatch))},null,8,["data"]))])):a.createCommentVNode("",!0)],64))],64)):s.data?(a.openBlock(),a.createElementBlock(a.Fragment,{key:2},[s.data.length>1?(a.openBlock(),a.createBlock(a.unref(un),{key:0,pxScroll:348,"background-color":"none",scrollColor:"none",arrowsPosition:"absolute",arrowsScrollHide:!0,arrowsBackground:"rgba(255,255,255,.16)",arrowsContainerBgL:"linear-gradient(270deg, rgba(13,29,41,0) 100%, rgba(13,29,41,1) 100%)",arrowsContainerBgR:"linear-gradient(270deg, rgba(13,29,41,0) 100%, rgba(13,29,41,1) 100%)",arrowsMargin:0,arrowsRadius:"50%",arrowsBorder:"#ddd"},{default:a.withCtx(()=>[a.createElementVNode("div",DL,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(s.data,(m,f)=>(a.openBlock(),a.createBlock(KA,{key:f,game:m,onClickMatch:p=>c.$emit("clickMatch",m)},null,8,["game","onClickMatch"]))),128))])]),_:1})):(a.openBlock(),a.createElementBlock(a.Fragment,{key:1},[r.value?(a.openBlock(),a.createElementBlock(a.Fragment,{key:1},[Object.keys(s.data).length>0?(a.openBlock(),a.createElementBlock("div",OL,[s.data[0].game_status==4?(a.openBlock(),a.createBlock(Gs,{key:0,data:s.data[0],small:"",onClickMatch:u[8]||(u[8]=m=>c.$emit("clickMatch",s.data[0]))},null,8,["data"])):a.createCommentVNode("",!0),s.data[0].game_status!=4?(a.openBlock(),a.createBlock(Gs,{key:1,data:s.data[0],small:"",onClickMatch:u[9]||(u[9]=m=>c.$emit("clickMatch",s.data[0]))},null,8,["data"])):a.createCommentVNode("",!0)])):a.createCommentVNode("",!0)],64)):(a.openBlock(),a.createElementBlock(a.Fragment,{key:0},[Object.keys(s.data).length>0?(a.openBlock(),a.createElementBlock("div",PL,[s.data[0].game_status==4?(a.openBlock(),a.createBlock(Gs,{key:0,data:s.data[0],small:"",onClickMatch:u[6]||(u[6]=m=>c.$emit("clickMatch",s.data[0]))},null,8,["data"])):a.createCommentVNode("",!0),s.data[0].game_status!=4?(a.openBlock(),a.createBlock(Gs,{key:1,data:s.data[0],small:"",onClickMatch:u[7]||(u[7]=m=>c.$emit("clickMatch",s.data[0]))},null,8,["data"])):a.createCommentVNode("",!0)])):a.createCommentVNode("",!0)],64))],64))],64)):a.createCommentVNode("",!0)]))}},[["__scopeId","data-v-c26e8c06"]]),ML={__name:"gsc-games",props:{componentWidth:{type:[Number,String],default:768},isplayer:{type:Boolean,default:!1},isFull:{type:Boolean,default:!1},data:{type:Object,default:()=>{}},tournamentScheduleKeys:{type:Array,default:()=>[]},defaultMatchDayKey:{type:String,default:""},user:{type:Object,default:()=>{}},currentSeason:{type:Number,default:0},currentTournament:{type:Object,default:()=>{}},isLiveButtonVisible:{type:Boolean,default:!1}},setup(s){return(e,t)=>(a.openBlock(),a.createElementBlock("main",null,[a.createVNode(FL,{data:s.data,"component-width":s.componentWidth,"is-full":s.isFull,"has-team":!s.isplayer,"tournament-schedule-keys":s.tournamentScheduleKeys,"default-match-day-key":s.defaultMatchDayKey,user:s.user,"current-season":s.currentSeason,"current-tournament":s.currentTournament,"is-live-button-visible":s.isLiveButtonVisible,onClickLive:t[0]||(t[0]=n=>e.$emit("click-live")),onClickCalendar:t[1]||(t[1]=n=>e.$emit("clickCalendar")),onClickMatch:t[2]||(t[2]=n=>e.$emit("clickMatch",n)),onChangeMatchDay:t[3]||(t[3]=n=>e.$emit("change-match-day",n)),onChangeIsLeagueSelected:t[4]||(t[4]=n=>e.$emit("change-is-league-selected",n))},null,8,["data","component-width","is-full","has-team","tournament-schedule-keys","default-match-day-key","user","current-season","current-tournament","is-live-button-visible"])]))}},VL="_toniKroos_lmln3_18",$L="_centralMidfielder_lmln3_28",UL="_icnPlayIcon_lmln3_38",zL="_verVideos_lmln3_45",GL="_btnVideosOptions_lmln3_55",jL="_btnVideosOptionsTeams_lmln3_70",HL="_info_lmln3_90",WL="_goalUnlock_lmln3_102",KL="_teamsAmerica_lmln3_115",qL="_imageIcon_lmln3_125",YL="_imageIconTeam_lmln3_136",JL="_playerTops_lmln3_148",XL={toniKroos:VL,centralMidfielder:$L,icnPlayIcon:UL,verVideos:zL,btnVideosOptions:GL,btnVideosOptionsTeams:jL,info:HL,goalUnlock:WL,teamsAmerica:KL,imageIcon:qL,imageIconTeam:YL,playerTops:JL},ZL=(s,e)=>{const t=s.__vccOpts||s;for(const[n,i]of e)t[n]=i;return t},QL={props:{height:{type:String,default:"194px"},background:{type:String,default:"#122735"},borderRadius:{type:String,default:"4px"},borderWidth:{type:Number,default:0},borderColor:{type:String,default:"#ffffff"},namePlayerFont:{type:String,default:"Montserrat-SemiBold"},namePlayerFontColor:{type:String,default:"#ffffff"},namePlayerFontSize:{type:String,default:"18px"},namePlayerFontStyle:{type:String,default:"Normal"},namePositionFont:{type:String,default:"Poppins-Regular"},namePositionFontColor:{type:String,default:"#8ea2ab"},namePositionFontSize:{type:String,default:"14px"},namePositionFontStyle:{type:String,default:"Normal"},totalFont:{type:String,default:"Poppins-Regular"},totalFontColor:{type:String,default:"#ffffff"},totalFontSize:{type:String,default:"8px"},totalFontStyle:{type:String,default:"Normal"},totalHeight:{type:String,default:"22px"},totalWidth:{type:String,default:"80px"},totalBorderRadius:{type:String,default:"64px"},totalBorderWidth:{type:Number,default:1},totalBorderColor:{type:String,default:"#cbee6b"},iconPlay:{type:String,default:"/icnplay1.svg"},teamWidth:{type:String,default:"34px"},teamPositionLeft:{type:String,default:"12px"},teamPositionTop:{type:String,default:""},playerOrTeamPhotoWidth:{type:String,default:"99px"},numbertopLeft:{type:String,default:"-8px"},numbertopBottom:{type:String,default:"-25px"},numbertopTop:{type:String},numbertopRight:{type:String},numbertopColor:{type:String,default:"#ffffff"},numbertopFontSize:{type:String,default:"98px"},numbertopOpacity:{type:String,default:"0.18"},numberFontFamily:{type:String,default:"Montserrat-SemiBold"},showShieldTeam:{type:Boolean,default:!0},showIconVideo:{type:Boolean,default:!0},showPositionPlayer:{type:Boolean,default:!0},activeVideos:{type:Boolean,default:!0},freemiumActive:{type:Boolean,default:!1},isPlayer:{type:Boolean,default:!0},data:{type:Object,default:()=>{}}},computed:{customMosaic(){return{height:this.height,background:this.background,borderRadius:`${this.borderRadius} !important`,border:`solid ${this.borderWidth}px ${this.borderColor}`}},customNamePlayer(){return{fontFamily:this.namePlayerFont,fontSize:this.namePlayerFontSize,color:this.namePlayerFontColor,fontStyle:this.namePlayerFontStyle}},customNamePosition(){return{fontFamily:this.namePositionFont,fontSize:this.namePositionFontSize,color:this.namePositionFontColor,fontStyle:this.namePositionFontStyle}},customTotal(){return{fontFamily:this.totalFont,fontSize:this.totalFontSize,color:this.totalFontColor,fontStyle:this.totalFontStyle}},customTotalCont(){return{MinHeight:this.totalHeight,width:this.totalWidth,borderRadius:`${this.totalBorderRadius} !important`,border:`solid ${this.totalBorderWidth}px ${this.totalBorderColor}`}},customShieldTeam(){return{width:this.teamWidth,top:this.teamPositionTop,left:this.teamPositionLeft}},customPhotoPlayerOrTeam(){return{width:this.playerOrTeamPhotoWidth}},customNumberTop(){return{fontSize:this.numbertopFontSize,color:this.numbertopColor,left:this.numbertopLeft,right:this.numbertopRight,top:this.numbertopTop,bottom:this.numbertopBottom,opacity:this.numbertopOpacity,fontFamily:this.numberFontFamily}}},methods:{onPlayerTopsClick(s){this.activeVideos&&(this.$emit("clickMosaic",s),this.$emit("freemium",this.freemiumActive))},onButtonVideos(s){this.activeVideos&&(this.$emit("openmedia",s),this.$emit("clickvideos",s.id),this.$emit("freemium",this.freemiumActive))}}},eI=["src"],tI=["src"],sI=["src"];function nI(s,e,t,n,i,r){return a.openBlock(),a.createElementBlock("section",{class:a.normalizeClass(s.$style.playerTops),style:a.normalizeStyle(r.customMosaic),id:"player-mosaico",onClick:e[1]||(e[1]=o=>r.onPlayerTopsClick(t.data.player_id))},[a.createElementVNode("div",{class:a.normalizeClass(s.$style.info)},[a.createElementVNode("h3",{class:a.normalizeClass(s.$style.toniKroos),style:a.normalizeStyle(r.customNamePlayer)},a.toDisplayString(t.data.player_name),7),t.showPositionPlayer?(a.openBlock(),a.createElementBlock("div",{key:0,class:a.normalizeClass(s.$style.centralMidfielder),style:a.normalizeStyle(r.customNamePosition)},a.toDisplayString(t.data.player_position),7)):a.createCommentVNode("",!0),a.createElementVNode("button",{class:a.normalizeClass(this.isPlayer?s.$style.btnVideosOptions:s.$style.btnVideosOptionsTeams),style:a.normalizeStyle(r.customTotalCont),id:"button-actions",onClick:e[0]||(e[0]=o=>r.onButtonVideos(t.data))},[t.showIconVideo?(a.openBlock(),a.createElementBlock("img",{key:0,class:a.normalizeClass(s.$style.icnPlayIcon),src:t.iconPlay},null,10,eI)):a.createCommentVNode("",!0),a.createElementVNode("div",{class:a.normalizeClass(s.$style.verVideos),style:a.normalizeStyle(r.customTotal)},a.toDisplayString(t.data.player_stat)+" "+a.toDisplayString(t.data.category),7)],6)],2),a.createElementVNode("b",{style:a.normalizeStyle(r.customNumberTop),class:a.normalizeClass(s.$style.goalUnlock)},a.toDisplayString(t.data.top),7),t.showShieldTeam?(a.openBlock(),a.createElementBlock("img",{key:0,class:a.normalizeClass(s.$style.teamsAmerica),style:a.normalizeStyle(r.customShieldTeam),loading:"lazy",src:t.data.team_logo},null,14,tI)):a.createCommentVNode("",!0),a.createElementVNode("img",{style:a.normalizeStyle(r.customPhotoPlayerOrTeam),class:a.normalizeClass(this.isPlayer?s.$style.imageIcon:s.$style.imageIconTeam),loading:"lazy",src:t.data.player_photo},null,14,sI)],6)}const aI={$style:XL},iI=ZL(QL,[["render",nI],["__cssModules",aI]]),rI=(s,e)=>{const t=s.__vccOpts||s;for(const[n,i]of e)t[n]=i;return t},ro={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(s){this.status=s}}},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(s){this.$emit("click",s),this.typeOnOff&&(this.status=!this.status,this.$emit("status",this.status))}}},rh=()=>{a.useCssVars(s=>({"9d01acb4":s.height,"14e95081":s.borderWidthBtn,"38fec285":s.borderType,34353510:s.borderColor,"20d20dc6":s.borderRadius,17130967:s.width,"4ccb7d36":s.backgroundColor,"5d1e86a2":s.cursorType,ce65d4a2:s.fontSize,fe4ac47a:s.fontStyle,f98e44dc:s.fontFamily,"93b87770":s.marginLeftStat,c7f7beba:s.fontSizeStat}))},oh=ro.setup;ro.setup=oh?(s,e)=>(rh(),oh(s,e)):rh;const oI=s=>(a.pushScopeId("data-v-f3ee6b2b"),s=s(),a.popScopeId(),s),lI=["src"],cI={key:1,class:"text"},dI=["src"],uI={class:"stats"},hI=oI(()=>a.createElementVNode("img",{class:"iconstats",src:"https://golstatsimages.blob.core.windows.net/todoelfut/playdes.png"},null,-1)),mI={class:"numstats"},fI={class:"leyend"};function gI(s,e,t,n,i,r){return a.openBlock(),a.createElementBlock("div",null,[t.type==0?(a.openBlock(),a.createElementBlock("div",{key:0,class:a.normalizeClass(["button",i.status&&t.typeOnOff&&"button-active"]),style:a.normalizeStyle([r.customStyle,i.status&&t.typeOnOff&&r.customActive]),onClick:e[0]||(e[0]=(...o)=>r.btnClick&&r.btnClick(...o))},[t.icon&&t.iconPosition.toLowerCase()==="left"?(a.openBlock(),a.createElementBlock("img",{key:0,class:"icon",style:a.normalizeStyle({width:t.iconSize}),src:t.icon},null,12,lI)):a.createCommentVNode("",!0),t.textValue?(a.openBlock(),a.createElementBlock("div",cI,a.toDisplayString(t.textValue),1)):a.createCommentVNode("",!0),t.icon&&t.iconPosition.toLowerCase()==="right"?(a.openBlock(),a.createElementBlock("img",{key:2,class:"icon",style:a.normalizeStyle({width:t.iconSize}),src:t.icon},null,12,dI)):a.createCommentVNode("",!0)],6)):a.createCommentVNode("",!0),t.type==1?(a.openBlock(),a.createElementBlock("div",{key:1,class:"button-target",onClick:e[1]||(e[1]=(...o)=>r.btnClick&&r.btnClick(...o))},[a.createElementVNode("div",uI,[hI,a.createElementVNode("div",mI,a.toDisplayString(t.textStat),1)]),a.createElementVNode("div",fI,a.toDisplayString(t.textCategory),1)])):a.createCommentVNode("",!0)])}const pI=rI(ro,[["render",gI],["__scopeId","data-v-f3ee6b2b"]]);function yI(s){const e=a.ref({width:0,height:0});function t(){const n=s.value.getBoundingClientRect();e.value.width=n.width,e.value.height=n.height}return a.onMounted(()=>{t(),window.addEventListener("resize",t)}),a.onUnmounted(()=>{window.removeEventListener("resize",t)}),{elementSize:e}}const oo={props:{textOptionLeft:String,valueDefault:{type:String,default:""},textOptionRight:String,hiddenLabels:{type:Boolean,default:!1},width:{type:String,default:"50px"},height:{type:String,default:"32px"},heightCircle:{type:String,default:"24px"},widthCircle:{type:String,default:"24px"},widthIcons:{type:String,default:"22"},borderRadius:{type:String,default:"30px"},borderType:{type:String,default:"solid"},borderWidth:{type:Number,default:1},borderColor:{type:String,default:"#FFFFFF"},fontSize:{type:String,default:"14px"},fontColor:{type:String,default:"#000000"},iconA:{type:String,default:""},iconB:{type:String,default:""},fontFamily:{type:String,default:"Poppins-Light"},backgroundColor:{type:String,default:"#2e3b46"},circleColorSwitch:{type:String,default:"#FFFFFF"}},data(){return{OptionDefault:!1}},watch:{valueDefault:{immediate:!0,handler:async function(s){try{s==this.textOptionLeft&&(this.OptionDefault=!1),s==this.textOptionRight&&(this.OptionDefault=!0)}catch(e){throw new Error(e)}}}},computed:{customStyle(){return{width:this.width,height:this.height,borderRadius:this.borderRadius,border:`${this.borderType} ${this.borderWidth}px ${this.borderColor}`,backgroundColor:this.backgroundColor,circleColor:this.circleColorSwitch}},customText(){return{color:this.fontColor,fontSize:this.fontSize,fontFamily:`${this.fontFamily} !important`}}},methods:{handleSwitchChange(s){s.target.checked?this.$emit("change",this.textOptionRight):this.$emit("change",this.textOptionLeft)}}},lh=()=>{a.useCssVars(s=>({"5d15d746":s.backgroundColor,"0bc50bbe":s.widthCircle,"7ad0df62":s.heightCircle}))},ch=oo.setup;oo.setup=ch?(s,e)=>(lh(),ch(s,e)):lh;const bI={key:0,class:"text-left"},wI=["width","src"],SI=["checked"],_I=["width","src"],kI={key:3,class:"text-right"};function EI(s,e,t,n,i,r){return a.openBlock(),a.createElementBlock("div",{class:"gsc-switch-radio",style:a.normalizeStyle(r.customText)},[t.textOptionLeft!=""&&!t.hiddenLabels?(a.openBlock(),a.createElementBlock("span",bI,a.toDisplayString(t.textOptionLeft),1)):a.createCommentVNode("",!0),t.iconA!=""?(a.openBlock(),a.createElementBlock("img",{key:1,width:t.widthIcons,src:t.iconA},null,8,wI)):a.createCommentVNode("",!0),a.createElementVNode("input",{type:"checkbox",id:"toggle-btn",onChange:e[0]||(e[0]=(...o)=>r.handleSwitchChange&&r.handleSwitchChange(...o)),checked:i.OptionDefault},null,40,SI),a.createElementVNode("label",{for:"toggle-btn",style:a.normalizeStyle([r.customStyle,{"--circle-color":t.circleColorSwitch}])},null,4),t.iconB!=""?(a.openBlock(),a.createElementBlock("img",{key:2,width:t.widthIcons,src:t.iconB},null,8,_I)):a.createCommentVNode("",!0),t.textOptionRight!=""&&!t.hiddenLabels?(a.openBlock(),a.createElementBlock("span",kI,a.toDisplayString(t.textOptionRight),1)):a.createCommentVNode("",!0)],4)}const lo={components:{GSCSlider:un,GSCMosaicthebest:iI,GscSwitchComponent:vr,GSCButton:pI,GSCRadioToggle:et(oo,[["render",EI],["__scopeId","data-v-f9c67ce5"]])},setup(){const s=a.ref("myDivRef"),{elementSize:e}=yI(s);return{myDivRef:s,elementSize:e}},props:{backgroundColor:{type:String,default:"#0D1D29"},tournamentSelected:{type:Object,default:()=>({id:0})},showSwitch:{type:Boolean,default:!0},activeVideos:{type:Boolean,default:!0},showSelect:{type:Boolean,default:!0},league:{type:Number,default:0},showMore:{type:Boolean,default:!0},fontFamily:{type:String,default:"Poppins-Semibold"},fontColor:{type:String,default:"#FFFFFF"},fontSize:{type:String,default:"24px"},marginMosaic:{type:String,default:"24px"},tournament:{type:Number,default:1},season:{type:Number,default:1772},teamId:{type:Number,default:0}},watch:{tournamentSelected:{handler(s){s.is_female==1?this.optionSelected="Jugadoras":this.optionSelected="Jugadores"},immediate:!0},season:{async handler(s){const e=this.categorySelected!==null?this.categorySelected:1;this.showSwitch||(this.filterSelected=1),await this.getCategoryStats(s,this.filterSelected,e)},immediate:!0}},data:()=>({url:"https://kgfaxdv624.execute-api.us-east-2.amazonaws.com/prod/tops/seasons/",showTops:!0,token:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MCwibmFtZSI6IlVzdWFyaW8gRnJlZSIsInVzZXJuYW1lIjoiZnJlZUBnb2xzdGF0cy5jb20iLCJlbWFpbCI6ImZyZWVAZ29sc3RhdHMuY29tIiwiaWF0IjoxNjA2NzU4Nzk1LCJleHAiOjE2MzgyOTQ3OTV9.kPNmP7yDtk38cAXrUyc7OHRh6J25VFqy-XUNzbK-4YE",categoriesDefault:["Goles","Pases acertados","Balones recuperados en disputa","Asistencias","Participaciones en gol","Tiros a gol","Tiros a gol que llegaron a la portería","Cabeceos en área rival","Cabeceos en área propia","Centros","Centros acertados","1vs1 exitosos ofensivos","1vs1 exitosos ofensivos que terminaron en gol","1vs1 defensivos exitoso","Rechaces","Balones ganados en área propia","Balones ganados en área rival","Faltas cometidas","Faltas recibidas","Tarjetas amarillas","Tarjetas rojas","Atajadas","Tiros de Esquina"],categories:[{id:1,name:"Goles"},{id:2,name:"Pases acertados"},{id:3,name:"Balones recuperados en disputa"},{id:4,name:"Asistencias"},{id:5,name:"Participaciones en gol"},{id:6,name:"Tiros a gol"},{id:7,name:"Tiros a gol que llegaron a la portería"},{id:8,name:"Cabeceos en área rival"},{id:9,name:"Cabeceos en área propia"},{id:10,name:"Centros"},{id:11,name:"Centros acertados"},{id:12,name:"1vs1 exitosos ofensivos"},{id:13,name:"1vs1 exitosos ofensivos que terminaron en gol"},{id:14,name:"1vs1 defensivos exitoso"},{id:15,name:"Rechaces"},{id:16,name:"Balones ganados en área propia"},{id:17,name:"Balones ganados en área rival"},{id:18,name:"Faltas cometidas"},{id:19,name:"Faltas recibidas"},{id:20,name:"Tarjetas amarillas"},{id:21,name:"Tarjetas rojas"},{id:22,name:"Atajadas"},{id:23,name:"Tiros de Esquina"}],categoryData:[],categorySelected:null,filterSelected:1,isTeam:!1,categoryName:"Goles",optionSelected:"Jugadores",positions:[{name:"Portero"},{name:"Defensa central"},{name:"Lateral por izquierda"},{name:"Lateral por derecha"},{name:"Volante por izquierda"},{name:"Volante por derecha"},{name:"Volante defensivo"},{name:"Volante ofensivo"},{name:"Delantero"},{name:"Desconocida"}]}),async created(){await this.getCategoryStats(this.season,this.league)},computed:{topData(){var s=[];return this.categorySelected!=null&&this.categoryData[this.categorySelected]!==void 0&&(this.isTeam?s=this.categoryData[this.categorySelected].top__teams:s=this.categoryData[this.categorySelected].top__players),s}},methods:{formatPlayerName(s){var n;const e=s.split(",");let t="";if(e[1]&&(t=`${e[1].trim()[0]}.`,e[0])){const i=(n=e[0])==null?void 0:n.trim().split(" ");for(let r of i)if(t=`${t} ${r.trim()}`,r.trim().length>3)break}return t},translateTopCategories(s){return{1:[12,55,"35_r","54_r"],2:[2,20],3:[485,486,487,488],4:[10,324],5:[27,323],6:[510],7:[537,540,544,547],8:[328],9:[231,238,280,287,294,406],10:[13,25],11:[98,101,104,105,109,112,115,116],12:[4],13:[88],14:[5],15:[34],16:[23],17:[11],18:[17,50],19:[18,49],20:[14,52],21:[15,53],22:[39],23:[31,32]}[s]||[]},onOpenMedia(s){const e=this.translateTopCategories(this.categorySelected),t=2,n=3;let i=[],r=0,o=0;this.isTeam?(r=s.player_id,o=n):(i=[s.player_id],o=t);const l={seasonId:this.season,tournaments:[],isFeaturedPlayers:!1,mainSectionType:1,playListType:o,gameIds:null,playerIds:i,goalkeeperIds:[],categoryIds:e,teamId:r,matchResult:[1,2,3],categorySingleName:"",avoidCategorySingleName:!1,currentPlayIndex:0,playData:null,lastClashedGameId:null,tournamentsLastClashes:null,advancedFilter:{playListTitle:s.category},objectPlaySync:null};this.$emit("openmedia",l)},async ChangeRadio(s){const e=this.categorySelected!==null?this.categorySelected:1;s==="Mi equipo"&&(this.filterSelected=0,await this.getCategoryStats(this.season,0,e)),s==="Liga MX"&&(this.filterSelected=1,await this.getCategoryStats(this.season,1,e))},clickMosaic(s){this.$emit("boxinput",s)},clickMore(){this.$emit("more")},async changeType(s){const e=this.categorySelected!==null?this.categorySelected:1;this.optionSelected=s,s=="Equipos"?(await this.getCategoryStats(this.season,1,e),this.isTeam=!0):this.isTeam=!1},compareObjectsMinutes(s,e){return s.total>e.total?-1:s.total<e.total?1:s.minutes<e.minutes?-1:s.minutes>e.minutes?1:0},changeCategory(s){this.categoryName=s;const e=this.categories.find(t=>t.name===s);this.categorySelected=e.id},async getCategoryStats(s,e,t=0){try{let r={},o={},l=[];const d=Le.create({headers:{Authorization:`${this.token}`}});var n={};if(e==0&&(n=await d.get(this.url+this.season+"/teams/"+this.teamId)),e==1&&(n=await d.get(this.url+s)),n.data.players.length==0?this.showTops=!1:this.showTops=!0,n&&n.data){n.data.teams.map(c=>{r[c[0]]={},r[c[0]].id=c[0],r[c[0]].name=c[1],r[c[0]].img=c[3],r[c[0]].abrv=c[2],r[c[0]].logo=c[3]}),n.data.players.map(c=>{o[c[0]]={},o[c[0]].id=c[0],o[c[0]].name=c[1],o[c[0]].img=c[2],o[c[0]].position=c[6],o[c[0]].minutes=c[13],o[c[0]].logo="https://golstatsimages.blob.core.windows.net/teams-80/"+c[10][0].team_id+".png"});var i=1;n.data.tops.map(c=>{l[c.category?c.category:i]={};var u={},m={};c.teams.map(h=>{u[h[0]]={},u[h[0]].total=h[1],u[h[0]].id=r[h[0]].id,u[h[0]].name=r[h[0]].name,u[h[0]].img="https://golstatsimages.blob.core.windows.net/teams-150/"+h[0]+".png",u[h[0]].logo="https://golstatsimages.blob.core.windows.net/teams-80/"+h[0]+".png"}),c.players.map(h=>{m[h[0]]={},m[h[0]].minutes=o[h[0]].minutes,m[h[0]].total=h[1],m[h[0]].name=o[h[0]].name,m[h[0]].img=o[h[0]].img.replace("players-profile/","players-profile/"),m[h[0]].id=o[h[0]].id,m[h[0]].position=this.tournamentSelected.is_female==1?this.positions[o[h[0]].position-1].name.replace("Portero","Portera").replace("Delantero","Delantera").replace("Volante defensivo","Volante defensiva").replace("Volante ofensivo","Volante ofensiva"):this.positions[o[h[0]].position-1].name,m[h[0]].logo=o[h[0]].logo});var f=[],p=[];for(const h in u)f.push(u[h]);for(const h in m)p.push(m[h]);f.sort((h,g)=>h.total<g.total?1:-1),p=p.sort(this.compareObjectsMinutes).slice(0,60),l[c.category?c.category:i].top__players=p,l[c.category?c.category:i].top__teams=f,i++})}else this.showTops=!1;t===0?this.categorySelected=1:this.categorySelected=t,this.categoryData=l}catch(r){return Promise.reject(r)}}}},dh=()=>{a.useCssVars(s=>({"755bc1d4":s.backgroundColor,"7748a398":s.fontFamily,"9f60b25e":s.fontSize,"58c64293":s.fontColor,24655139:s.marginMosaic}))},uh=lo.setup;lo.setup=uh?(s,e)=>(dh(),uh(s,e)):dh;const TI={key:0,class:"gsc-best",ref:"myDivRef"},CI={class:"gsc-best__line-bar-tools"},xI={key:0,class:"gsc-best__line-bar-tools__title"},AI={key:1,class:"gsc-best__line-bar-tools__titlefull"},LI={class:"unit-items"},II={key:2,class:"gsc-best__line-bar-tools__tools"},BI={key:0,class:"gsc-best__line-bar-tools__tools__tabs"},RI={key:1,class:"gsc-best__line-bar-tools__tools__btn"},vI={key:0,class:"gsc-best__line-bar-tools-movil"},NI={class:"gsc-best__line-bar-tools-movil__tabs"},DI={class:"gsc-best__categories"},PI={class:"gsc-best__players"};function OI(s,e,t,n,i,r){const o=a.resolveComponent("GSCRadioToggle"),l=a.resolveComponent("GSCButton"),d=a.resolveComponent("GscSwitchComponent"),c=a.resolveComponent("GSCMosaicthebest"),u=a.resolveComponent("GSCSlider");return s.showTops?(a.openBlock(),a.createElementBlock("div",TI,[a.createElementVNode("div",CI,[n.elementSize.width>900?(a.openBlock(),a.createElementBlock("div",xI,[a.createElementVNode("span",null,[t.tournamentSelected.is_female==1?(a.openBlock(),a.createElementBlock(a.Fragment,{key:0},[a.createTextVNode("Las mejores")],64)):(a.openBlock(),a.createElementBlock(a.Fragment,{key:1},[a.createTextVNode("Los mejores")],64))]),s.optionSelected!=="Equipos"&&t.showSwitch?(a.openBlock(),a.createBlock(o,{key:0,height:"20px",width:"41px","background-color":"none","width-circle":"15px","height-circle":"15px","circle-color-switch":"#CBEE6B","font-color":"#ffffff","value-default":"Liga MX",iconA:"https://golstatsimages.blob.core.windows.net/teams-150/"+t.teamId+".png",iconB:"https://golstatsimages.blob.core.windows.net/todoelfut/1.png",textOptionLeft:"Mi equipo",textOptionRight:"Liga MX",onChange:r.ChangeRadio},null,8,["iconA","onChange"])):a.createCommentVNode("",!0)])):a.createCommentVNode("",!0),n.elementSize.width<=900?(a.openBlock(),a.createElementBlock("div",AI,[a.createElementVNode("span",{style:a.normalizeStyle(n.elementSize.width<=380?"font-size: 15px; margin-top:0px; width:60px;":"")},[t.tournamentSelected.is_female==1?(a.openBlock(),a.createElementBlock(a.Fragment,{key:0},[a.createTextVNode("Las mejores")],64)):(a.openBlock(),a.createElementBlock(a.Fragment,{key:1},[a.createTextVNode("Los mejores")],64))],4),a.createElementVNode("span",LI,[s.optionSelected!=="Equipos"&&t.showSwitch?(a.openBlock(),a.createBlock(o,{key:0,height:"20px",width:"41px","background-color":"none","width-circle":"15px","height-circle":"15px","circle-color-switch":"#CBEE6B","font-color":"#ffffff","hidden-labels":!0,"value-default":"Liga MX",iconA:"https://golstatsimages.blob.core.windows.net/teams-150/"+t.teamId+".png",iconB:"https://golstatsimages.blob.core.windows.net/todoelfut/1.png",textOptionLeft:"Mi equipo",textOptionRight:"Liga MX",onChange:r.ChangeRadio},null,8,["iconA","onChange"])):a.createCommentVNode("",!0),n.elementSize.width<=900?(a.openBlock(),a.createBlock(l,{key:1,style:{"margin-top":"4px"},width:"75px","text-value":"Ver más","font-color":n.elementSize.width<=680?"rgba(255,255,255, 0.7)":"#fff","font-size":n.elementSize.width<=680?"11px":"14px","text-decoration":"underline",onClick:r.clickMore},null,8,["font-color","font-size","onClick"])):a.createCommentVNode("",!0)])])):a.createCommentVNode("",!0),n.elementSize.width>900?(a.openBlock(),a.createElementBlock("div",II,[n.elementSize.width>900?(a.openBlock(),a.createElementBlock("div",BI,[t.showSelect?(a.openBlock(),a.createBlock(d,{key:0,arrow:!1,type:1,buttons:[t.tournamentSelected.is_female==1?"Jugadoras":"Jugadores","Equipos"],"selected-option":s.optionSelected,"border-radius":"32px",height:"28px","border-width":"1px","border-width-container":"0.5px","background-option-active":"#0d1d29","color-option-active":"#FFFFFF","font-size":"12px",width:"270px",fontFamily:"Poppins-Light",onInput:r.changeType,arrowsScrollHide:!1,arrowsPosition:"absolute"},null,8,["buttons","selected-option","onInput"])):a.createCommentVNode("",!0)])):a.createCommentVNode("",!0),t.showMore?(a.openBlock(),a.createElementBlock("div",RI,[a.createVNode(l,{width:"75px","text-value":"Ver más","font-size":"14px","text-decoration":"underline",onClick:r.clickMore},null,8,["onClick"]),a.createVNode(l,{width:"10px","text-value":"→","font-size":"14px","font-color":"#cbee6b",onClick:r.clickMore},null,8,["onClick"])])):a.createCommentVNode("",!0)])):a.createCommentVNode("",!0)]),n.elementSize.width<=900&&t.showSelect?(a.openBlock(),a.createElementBlock("div",vI,[a.createElementVNode("div",NI,[t.showSelect?(a.openBlock(),a.createBlock(d,{key:0,arrow:!1,type:1,buttons:[t.tournamentSelected.is_female==1?"Jugadoras":"Jugadores","Equipos"],"selected-option":s.optionSelected,"border-radius":"32px",height:"28px","border-width":"1px","border-width-container":"0.5px","background-option-active":"#0d1d29","color-option-active":"#FFFFFF","font-size":"10px",width:"270px",fontFamily:"Poppins-Light",onInput:r.changeType},null,8,["buttons","selected-option","onInput"])):a.createCommentVNode("",!0)])])):a.createCommentVNode("",!0),a.createElementVNode("div",DI,[a.createVNode(d,{type:2,background:t.backgroundColor,"arrows-background":t.backgroundColor,"background-option-active":t.backgroundColor,arrow:!0,"font-family":"Poppins-Light",buttons:s.categoriesDefault,height:"40px","selected-option":"Goles","font-size":n.elementSize.width<=900?"12px":"14px",width:"max-content",onInput:r.changeCategory,pxScroll:200,scrollColor:"none",arrowsScrollHide:!1,arrowsMargin:0,borderWidth:"2px"},null,8,["background","arrows-background","background-option-active","buttons","font-size","onInput"])]),a.createElementVNode("div",PI,[a.createVNode(u,{pxScroll:198,scrollColor:"none","background-color":t.backgroundColor,arrowsPosition:"absolute",arrowsScrollHide:!0,arrowsBackground:"rgba(255,255,255,.16)",arrowsContainerBgL:"linear-gradient(270deg, rgba(13,29,41,0) 0%, rgba(13,29,41,1) 70%)",arrowsContainerBgR:"linear-gradient(90deg, rgba(13,29,41,0) 0%, rgba(13,29,41,1) 70%)",arrowsMargin:0,arrowsRadius:"50%",arrowsBorder:"#ddd"},{default:a.withCtx(()=>[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(r.topData,(m,f)=>(a.openBlock(),a.createElementBlock("div",{key:f,class:a.normalizeClass(["gsc-best__players__item",f==0?"margin-none":""])},[a.createVNode(c,{data:{player_id:m.id,player_name:this.isTeam?m.name:r.formatPlayerName(m.name),player_position:m.position,player_stat:m.total,category:"Total",top:f<9?"0"+(f+1):f+1,team_logo:m.logo,player_photo:m.img},"show-shield-team":!0,"active-videos":!!t.activeVideos,"show-icon-video":!!t.activeVideos,onClickMosaic:r.clickMosaic,onOpenmedia:r.onOpenMedia,namePlayerFontSize:"13px",namePositionFontSize:"10px",numbertopLeft:"-15px",numberFontFamily:"Oswald-SemiBold",totalFontSize:"12px",totalFont:"Poppins-Light!important",totalHeight:"21px","is-player":!this.isTeam},null,8,["data","active-videos","show-icon-video","onClickMosaic","onOpenmedia","is-player"])],2))),128))]),_:1},8,["background-color"])])],512)):a.createCommentVNode("",!0)}const FI=et(lo,[["render",OI],["__scopeId","data-v-824ba31b"]]);/**
33
33
  * Vue 3 Carousel 0.3.1
34
34
  * (c) 2023
35
35
  * @license MIT
36
- */const lt={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"}},hh={itemsToShow:{default:lt.itemsToShow,type:Number},itemsToScroll:{default:lt.itemsToScroll,type:Number},wrapAround:{default:lt.wrapAround,type:Boolean},throttle:{default:lt.throttle,type:Number},snapAlign:{default:lt.snapAlign,validator(s){return["start","end","center","center-even","center-odd"].includes(s)}},transition:{default:lt.transition,type:Number},breakpoints:{default:lt.breakpoints,type:Object},autoplay:{default:lt.autoplay,type:Number},pauseAutoplayOnHover:{default:lt.pauseAutoplayOnHover,type:Boolean},modelValue:{default:void 0,type:Number},mouseDrag:{default:lt.mouseDrag,type:Boolean},touchDrag:{default:lt.touchDrag,type:Boolean},dir:{default:lt.dir,validator(s){return["rtl","ltr"].includes(s)}},i18n:{default:lt.i18n,type:Object},settings:{default(){return{}},type:Object}};function M5({config:s,slidesCount:e}){const{snapAlign:t,wrapAround:n,itemsToShow:i=1}=s;if(n)return Math.max(e-1,0);let r;switch(t){case"start":r=e-i;break;case"end":r=e-1;break;case"center":case"center-odd":r=e-Math.ceil((i-.5)/2);break;case"center-even":r=e-Math.ceil(i/2);break;default:r=0;break}return Math.max(r,0)}function V5({config:s,slidesCount:e}){const{wrapAround:t,snapAlign:n,itemsToShow:i=1}=s;let r=0;if(t||i>e)return r;switch(n){case"start":r=0;break;case"end":r=i-1;break;case"center":case"center-odd":r=Math.floor((i-1)/2);break;case"center-even":r=Math.floor((i-2)/2);break;default:r=0;break}return r}function co({val:s,max:e,min:t}){return e<t?s:Math.min(Math.max(s,t),e)}function $5({config:s,currentSlide:e,slidesCount:t}){const{snapAlign:n,wrapAround:i,itemsToShow:r=1}=s;let o=e;switch(n){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 i?o:co({val:o,max:t-r,min:0})}function mh(s){return s?s.reduce((e,t)=>{var n;return t.type===a.Fragment?[...e,...mh(t.children)]:((n=t.type)===null||n===void 0?void 0:n.name)==="CarouselSlide"?[...e,t]:e},[]):[]}function uo({val:s,max:e,min:t=0}){return s>e?uo({val:s-(e+1),max:e,min:t}):s<t?uo({val:s+(e+1),max:e,min:t}):s}function U5(s,e){let t;return e?function(...n){const i=this;t||(s.apply(i,n),t=!0,setTimeout(()=>t=!1,e))}:s}function z5(s,e){let t;return function(...n){t&&clearTimeout(t),t=setTimeout(()=>{s(...n),t=null},e)}}function G5(s="",e={}){return Object.entries(e).reduce((t,[n,i])=>t.replace(`{${n}}`,String(i)),s)}var j5=a.defineComponent({name:"ARIA",setup(){const s=a.inject("config",a.reactive(Object.assign({},lt))),e=a.inject("currentSlide",a.ref(0)),t=a.inject("slidesCount",a.ref(0));return()=>a.h("div",{class:["carousel__liveregion","carousel__sr-only"],"aria-live":"polite","aria-atomic":"true"},G5(s.i18n.itemXofY,{currentSlide:e.value+1,slidesCount:t.value}))}}),H5=a.defineComponent({name:"Carousel",props:hh,setup(s,{slots:e,emit:t,expose:n}){var i;const r=a.ref(null),o=a.ref([]),l=a.ref(0),d=a.ref(0),c=a.reactive(Object.assign({},lt));let u=Object.assign({},lt),m;const f=a.ref((i=s.modelValue)!==null&&i!==void 0?i:0),p=a.ref(0),h=a.ref(0),g=a.ref(0),y=a.ref(0);let b,w;a.provide("config",c),a.provide("slidesCount",d),a.provide("currentSlide",f),a.provide("maxSlide",g),a.provide("minSlide",y),a.provide("slideWidth",l);function _(){m=Object.assign({},s.breakpoints),u=Object.assign(Object.assign(Object.assign({},u),s),{i18n:Object.assign(Object.assign({},u.i18n),s.i18n),breakpoints:void 0}),E(u)}function C(){if(!m||!Object.keys(m).length)return;const x=Object.keys(m).map($=>Number($)).sort(($,de)=>+de-+$);let z=Object.assign({},u);x.some($=>{const de=window.matchMedia(`(min-width: ${$}px)`).matches;return de&&(z=Object.assign(Object.assign({},z),m[$])),de}),E(z)}function E(x){Object.entries(x).forEach(([z,$])=>c[z]=$)}const A=z5(()=>{C(),T()},16);function T(){if(!r.value)return;const x=r.value.getBoundingClientRect();l.value=x.width/c.itemsToShow}function R(){d.value<=0||(h.value=Math.ceil((d.value-1)/2),g.value=M5({config:c,slidesCount:d.value}),y.value=V5({config:c,slidesCount:d.value}),c.wrapAround||(f.value=co({val:f.value,max:g.value,min:y.value})))}a.onMounted(()=>{a.nextTick(()=>T()),setTimeout(()=>T(),1e3),C(),G(),window.addEventListener("resize",A,{passive:!0}),t("init")}),a.onUnmounted(()=>{w&&clearTimeout(w),b&&clearInterval(b),window.removeEventListener("resize",A,{passive:!0})});let I=!1;const v={x:0,y:0},M={x:0,y:0},j=a.reactive({x:0,y:0}),U=a.ref(!1),se=a.ref(!1),re=()=>{U.value=!0},ie=()=>{U.value=!1};function ue(x){["INPUT","TEXTAREA","SELECT"].includes(x.target.tagName)||(I=x.type==="touchstart",I||x.preventDefault(),!(!I&&x.button!==0||W.value)&&(v.x=I?x.touches[0].clientX:x.clientX,v.y=I?x.touches[0].clientY:x.clientY,document.addEventListener(I?"touchmove":"mousemove",he,!0),document.addEventListener(I?"touchend":"mouseup",J,!0)))}const he=U5(x=>{se.value=!0,M.x=I?x.touches[0].clientX:x.clientX,M.y=I?x.touches[0].clientY:x.clientY;const z=M.x-v.x,$=M.y-v.y;j.y=$,j.x=z},c.throttle);function J(){const x=c.dir==="rtl"?-1:1,z=Math.sign(j.x)*.4,$=Math.round(j.x/l.value+z)*x;if($&&!I){const de=Qe=>{Qe.stopPropagation(),window.removeEventListener("click",de,!0)};window.addEventListener("click",de,!0)}q(f.value-$),j.x=0,j.y=0,se.value=!1,document.removeEventListener(I?"touchmove":"mousemove",he,!0),document.removeEventListener(I?"touchend":"mouseup",J,!0)}function G(){!c.autoplay||c.autoplay<=0||(b=setInterval(()=>{c.pauseAutoplayOnHover&&U.value||me()},c.autoplay))}function ce(){b&&(clearInterval(b),b=null),G()}const W=a.ref(!1);function q(x){const z=c.wrapAround?x:co({val:x,max:g.value,min:y.value});f.value===z||W.value||(t("slide-start",{slidingToIndex:x,currentSlideIndex:f.value,prevSlideIndex:p.value,slidesCount:d.value}),W.value=!0,p.value=f.value,f.value=z,w=setTimeout(()=>{if(c.wrapAround){const $=uo({val:z,max:g.value,min:0});$!==f.value&&(f.value=$,t("loop",{currentSlideIndex:f.value,slidingToIndex:x}))}t("update:modelValue",f.value),t("slide-end",{currentSlideIndex:f.value,prevSlideIndex:p.value,slidesCount:d.value}),W.value=!1,ce()},c.transition))}function me(){q(f.value+c.itemsToScroll)}function ye(){q(f.value-c.itemsToScroll)}const Ce={slideTo:q,next:me,prev:ye};a.provide("nav",Ce),a.provide("isSliding",W);const Q=a.computed(()=>$5({config:c,currentSlide:f.value,slidesCount:d.value}));a.provide("slidesToScroll",Q);const Ee=a.computed(()=>{const x=c.dir==="rtl"?-1:1,z=Q.value*l.value*x;return{transform:`translateX(${j.x-z}px)`,transition:`${W.value?c.transition:0}ms`,margin:c.wrapAround?`0 -${d.value*l.value}px`:"",width:"100%"}});function Te(){_(),C(),R(),T(),ce()}Object.keys(hh).forEach(x=>{["modelValue"].includes(x)||a.watch(()=>s[x],Te)}),a.watch(()=>s.modelValue,x=>{x!==f.value&&q(Number(x))}),a.watch(d,R),t("before-init"),_();const Ve={config:c,slidesCount:d,slideWidth:l,next:me,prev:ye,slideTo:q,currentSlide:f,maxSlide:g,minSlide:y,middleSlide:h};n({updateBreakpointsConfigs:C,updateSlidesData:R,updateSlideWidth:T,initDefaultConfigs:_,restartCarousel:Te,slideTo:q,next:me,prev:ye,nav:Ce,data:Ve});const dt=e.default||e.slides,ut=e.addons,ht=a.reactive(Ve);return()=>{const x=mh(dt==null?void 0:dt(ht)),z=(ut==null?void 0:ut(ht))||[];x.forEach(($e,Ge)=>$e.props.index=Ge);let $=x;if(c.wrapAround){const $e=x.map((je,Re)=>a.cloneVNode(je,{index:-x.length+Re,isClone:!0,key:`clone-before-${Re}`})),Ge=x.map((je,Re)=>a.cloneVNode(je,{index:x.length+Re,isClone:!0,key:`clone-after-${Re}`}));$=[...$e,...x,...Ge]}o.value=x,d.value=Math.max(x.length,1);const de=a.h("ol",{class:"carousel__track",style:Ee.value,onMousedownCapture:c.mouseDrag?ue:null,onTouchstartPassiveCapture:c.touchDrag?ue:null},$),Qe=a.h("div",{class:"carousel__viewport"},de);return a.h("section",{ref:r,class:{carousel:!0,"is-sliding":W.value,"is-dragging":se.value,"is-hover":U.value,"carousel--rtl":c.dir==="rtl"},dir:c.dir,"aria-label":c.i18n.ariaGallery,tabindex:"0",onMouseenter:re,onMouseleave:ie},[Qe,z,a.h(j5)])}}}),fh;(function(s){s.arrowUp="arrowUp",s.arrowDown="arrowDown",s.arrowRight="arrowRight",s.arrowLeft="arrowLeft"})(fh||(fh={}));var W5=a.defineComponent({name:"CarouselSlide",props:{index:{type:Number,default:1},isClone:{type:Boolean,default:!1}},setup(s,{slots:e}){const t=a.inject("config",a.reactive(Object.assign({},lt))),n=a.inject("currentSlide",a.ref(0)),i=a.inject("slidesToScroll",a.ref(0)),r=a.inject("isSliding",a.ref(!1)),o=()=>s.index===n.value,l=()=>s.index===n.value-1,d=()=>s.index===n.value+1,c=()=>{const u=Math.floor(i.value),m=Math.ceil(i.value+t.itemsToShow-1);return s.index>=u&&s.index<=m};return()=>{var u;return a.h("li",{style:{width:`${100/t.itemsToShow}%`},class:{carousel__slide:!0,"carousel__slide--clone":s.isClone,"carousel__slide--visible":c(),"carousel__slide--active":o(),"carousel__slide--prev":l(),"carousel__slide--next":d(),"carousel__slide--sliding":r.value},"aria-hidden":!c()},(u=e.default)===null||u===void 0?void 0:u.call(e))}}});const K5=(s,e)=>{const t=s.__vccOpts||s;for(const[n,i]of e)t[n]=i;return t},q5=s=>(a.pushScopeId("data-v-54620d25"),s=s(),a.popScopeId(),s),Y5={class:"gsc-carousel"},J5={key:0},X5=q5(()=>a.createElementVNode("div",null,"no hay",-1)),Z5=[X5],Q5={class:"gsc-carousel__2d__slides"},eI={width:"9",height:"18",viewBox:"0 0 9 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},tI=["fill"],sI={width:"9",height:"18",viewBox:"0 0 9 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},nI=["fill"],aI={class:"gsc-carousel__2d__navigation"},iI={width:"8",height:"15",viewBox:"0 0 8 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},rI=["stroke"],oI={key:1,class:"gsc-carousel__2d__navigation__pagination"},lI=["onClick"],cI={width:"7",height:"15",viewBox:"0 0 7 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},dI=["stroke"],uI={__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:s=>["propName","value"].every(e=>e in s)},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"},arrowsMaxWidth:{type:String,default:"20px"},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(s,{expose:e,emit:t}){const n=s;a.useCssVars(g=>({"2c72d674":s.slideLeftArrowBackgroundImage,"90a63f40":s.slidesArrowsLeftAndRight,"2627d097":s.slideRightArrowBackgroundImage,"1904d43f":s.marginTop,cfb58986:s.secondarySlidesOpacity}));const i=a.ref(null),r=a.ref({}),o=a.ref(0),l=a.ref(!1);a.watch(i,g=>{g&&l.value?(l.value=!1,d(n.items)):g&&g.slideTo&&g.slideTo(o.value)},{deep:!0}),a.watch(()=>n.currentItemIndex,g=>{o.value!==g&&f(g)}),a.watch(()=>n.defaultItemByIndex,g=>{o.value!==g&&f(g)}),a.watch(()=>n.items,g=>{i.value?d(g):l.value=!0},{immediate:!0});function d(g){g&&g.length&&i.value&&setTimeout(()=>{if(n.defaultItemByProp){const y=n.items.findIndex(b=>b[n.defaultItemByProp.propName]===n.defaultItemByProp.value);y!==-1?(o.value=y,r.value=g[y]):(o.value=0,r.value=g[0])}else o.value=n.defaultItemByIndex,r.value=g[n.defaultItemByIndex];i.value.slideTo&&i.value.slideTo(o.value),r.value&&o.value===0&&t("input",{selectedItem:r.value,selectedItemIndex:o.value})},500)}function c(){i.value&&i.value.next()}function u(){i.value&&i.value.prev()}function m(){i.value&&i.value.updateSlideWidth()}function f(g){i.value&&i.value.slideTo(g)}function p(g){i.value.slideTo(g)}function h(g){const y=g.slidingToIndex<0?n.items.length-1:g.slidingToIndex===n.items.length?0:g.slidingToIndex;o.value=y,r.value=n.items[y],t("update:currentItemIndex",y),t("input",{selectedItem:r.value,selectedItemIndex:o.value})}return e({prev:u,next:c,updateSlideWidth:m,slideTo:f}),(g,y)=>(a.openBlock(),a.createElementBlock("div",Y5,[n.is3d?(a.openBlock(),a.createElementBlock("div",J5,Z5)):(a.openBlock(),a.createElementBlock("div",{key:1,class:a.normalizeClass(["gsc-carousel__2d",{"main-slide-priority":s.isMainSlidePriority}])},[a.createElementVNode("div",Q5,[a.createVNode(a.unref(H5),{ref_key:"carousel2d",ref:i,"items-to-show":s.itemsToShow,"wrap-around":s.wrapAround,onSlideStart:h},{default:a.withCtx(()=>[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(s.items,(b,w)=>(a.openBlock(),a.createBlock(a.unref(W5),{key:w},{default:a.withCtx(()=>[a.renderSlot(g.$slots,"default",{item:b},void 0,!0)]),_:2},1024))),128))]),_:3},8,["items-to-show","wrap-around"])]),s.areSlidesArrowsVisible&&s.items.length>1?(a.openBlock(),a.createElementBlock("div",{key:0,class:"gsc-carousel__2d__arrow-left",style:a.normalizeStyle("max-width:"+s.arrowsMaxWidth+"!important"),onClick:y[0]||(y[0]=b=>i.value.prev())},[a.createElementVNode("div",{class:a.normalizeClass(["gsc-carousel__2d__slide-button",{rounded:s.areSlidesArrowsRounded}])},[(a.openBlock(),a.createElementBlock("svg",eI,[a.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:s.arrowsColor},null,8,tI)]))],2)],4)):a.createCommentVNode("",!0),s.areSlidesArrowsVisible&&s.items.length>1?(a.openBlock(),a.createElementBlock("div",{key:1,class:"gsc-carousel__2d__arrow-right",style:a.normalizeStyle("max-width:"+s.arrowsMaxWidth+"!important"),onClick:y[1]||(y[1]=b=>c())},[a.createElementVNode("div",{class:a.normalizeClass(["gsc-carousel__2d__slide-button",{rounded:s.areSlidesArrowsRounded}])},[(a.openBlock(),a.createElementBlock("svg",sI,[a.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:s.arrowsColor},null,8,nI)]))],2)],4)):a.createCommentVNode("",!0),a.createElementVNode("div",aI,[s.areNavigationArrowsVisible?(a.openBlock(),a.createElementBlock("div",{key:0,class:"gsc-carousel__2d__navigation__arrow-left",onClick:y[2]||(y[2]=b=>u())},[(a.openBlock(),a.createElementBlock("svg",iI,[a.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:n.arrowsColor},null,8,rI)]))])):a.createCommentVNode("",!0),s.isPaginationVisible?(a.openBlock(),a.createElementBlock("div",oI,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(s.items,(b,w)=>(a.openBlock(),a.createElementBlock("div",{key:`i-${w}`,class:"gsc-carousel__2d__navigation__pagination__item",style:a.normalizeStyle({height:`${n.navigationHeight}px`,width:`${o.value===w?n.navigationActiveWidth:n.navigationActiveWidth/2}px`,borderRadius:`${n.navigationBorderRadius}px`,backgroundColor:`${o.value===w?n.navigationActiveColor:n.navigationColor}`,transition:"all 0.1s ease-in-out"}),onClick:_=>p(w)},null,12,lI))),128))])):a.createCommentVNode("",!0),s.areNavigationArrowsVisible?(a.openBlock(),a.createElementBlock("div",{key:2,class:"gsc-carousel__2d__navigation__arrow-right",onClick:y[3]||(y[3]=b=>i.value.next())},[(a.openBlock(),a.createElementBlock("svg",cI,[a.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:n.arrowsColor},null,8,dI)]))])):a.createCommentVNode("",!0)])],2))]))}},hI=K5(uI,[["__scopeId","data-v-54620d25"]]),gh=["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic"];function Z(s,e,t){return(e=fI(e))in s?Object.defineProperty(s,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):s[e]=t,s}function mI(s,e){if(typeof s!="object"||s===null)return s;var t=s[Symbol.toPrimitive];if(t!==void 0){var n=t.call(s,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(s)}function fI(s){var e=mI(s,"string");return typeof e=="symbol"?e:String(e)}function gI(s,e){if(!(s instanceof e))throw new TypeError("Cannot call a class as a function")}function ph(s,e){for(var t=0;t<e.length;t++){var n=e[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(s,n.key,n)}}function pI(s,e,t){return ph(s.prototype,e),ph(s,t),s}function yI(s,e,t){return e in s?Object.defineProperty(s,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):s[e]=t,s}function yh(s,e){var t=Object.keys(s);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(s);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(s,i).enumerable})),t.push.apply(t,n)}return t}function bh(s){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?yh(Object(t),!0).forEach(function(n){yI(s,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(s,Object.getOwnPropertyDescriptors(t)):yh(Object(t)).forEach(function(n){Object.defineProperty(s,n,Object.getOwnPropertyDescriptor(t,n))})}return s}var wh={addCSS:!0,thumbWidth:15,watch:!0};function bI(s,e){return(function(){return Array.from(document.querySelectorAll(e)).includes(this)}).call(s,e)}function wI(s,e){if(s&&e){var t=new Event(e,{bubbles:!0});s.dispatchEvent(t)}}var Sn=function(s){return s!=null?s.constructor:null},ho=function(s,e){return!!(s&&e&&s instanceof e)},Sh=function(s){return s==null},_h=function(s){return Sn(s)===Object},SI=function(s){return Sn(s)===Number&&!Number.isNaN(s)},kh=function(s){return Sn(s)===String},_I=function(s){return Sn(s)===Boolean},kI=function(s){return Sn(s)===Function},Eh=function(s){return Array.isArray(s)},Th=function(s){return ho(s,NodeList)},EI=function(s){return ho(s,Element)},TI=function(s){return ho(s,Event)},CI=function(s){return Sh(s)||(kh(s)||Eh(s)||Th(s))&&!s.length||_h(s)&&!Object.keys(s).length},pt={nullOrUndefined:Sh,object:_h,number:SI,string:kh,boolean:_I,function:kI,array:Eh,nodeList:Th,element:EI,event:TI,empty:CI};function xI(s){var e="".concat(s).match(/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/);return e?Math.max(0,(e[1]?e[1].length:0)-(e[2]?+e[2]:0)):0}function AI(s,e){if(1>e){var t=xI(e);return parseFloat(s.toFixed(t))}return Math.round(s/e)*e}var LI=function(){function s(e,t){gI(this,s),pt.element(e)?this.element=e:pt.string(e)&&(this.element=document.querySelector(e)),pt.element(this.element)&&pt.empty(this.element.rangeTouch)&&(this.config=bh({},wh,{},t),this.init())}return pI(s,[{key:"init",value:function(){s.enabled&&(this.config.addCSS&&(this.element.style.userSelect="none",this.element.style.webKitUserSelect="none",this.element.style.touchAction="manipulation"),this.listeners(!0),this.element.rangeTouch=this)}},{key:"destroy",value:function(){s.enabled&&(this.config.addCSS&&(this.element.style.userSelect="",this.element.style.webKitUserSelect="",this.element.style.touchAction=""),this.listeners(!1),this.element.rangeTouch=null)}},{key:"listeners",value:function(e){var t=this,n=e?"addEventListener":"removeEventListener";["touchstart","touchmove","touchend"].forEach(function(i){t.element[n](i,function(r){return t.set(r)},!1)})}},{key:"get",value:function(e){if(!s.enabled||!pt.event(e))return null;var t,n=e.target,i=e.changedTouches[0],r=parseFloat(n.getAttribute("min"))||0,o=parseFloat(n.getAttribute("max"))||100,l=parseFloat(n.getAttribute("step"))||1,d=n.getBoundingClientRect(),c=100/d.width*(this.config.thumbWidth/2)/100;return 0>(t=100/d.width*(i.clientX-d.left))?t=0:100<t&&(t=100),50>t?t-=(100-2*t)*c:50<t&&(t+=2*(t-50)*c),r+AI(t/100*(o-r),l)}},{key:"set",value:function(e){s.enabled&&pt.event(e)&&!e.target.disabled&&(e.preventDefault(),e.target.value=this.get(e),wI(e.target,e.type==="touchend"?"change":"input"))}}],[{key:"setup",value:function(e){var t=1<arguments.length&&arguments[1]!==void 0?arguments[1]:{},n=null;if(pt.empty(e)||pt.string(e)?n=Array.from(document.querySelectorAll(pt.string(e)?e:'input[type="range"]')):pt.element(e)?n=[e]:pt.nodeList(e)?n=Array.from(e):pt.array(e)&&(n=e.filter(pt.element)),pt.empty(n))return null;var i=bh({},wh,{},t);if(pt.string(e)&&i.watch){var r=new MutationObserver(function(o){Array.from(o).forEach(function(l){Array.from(l.addedNodes).forEach(function(d){pt.element(d)&&bI(d,e)&&new s(d,i)})})});r.observe(document.body,{childList:!0,subtree:!0})}return n.map(function(o){return new s(o,t)})}},{key:"enabled",get:function(){return"ontouchstart"in document.documentElement}}]),s}();const _n=s=>s!=null?s.constructor:null,is=(s,e)=>!!(s&&e&&s instanceof e),mo=s=>s==null,Ch=s=>_n(s)===Object,II=s=>_n(s)===Number&&!Number.isNaN(s),Ba=s=>_n(s)===String,BI=s=>_n(s)===Boolean,xh=s=>typeof s=="function",Ah=s=>Array.isArray(s),RI=s=>is(s,WeakMap),Lh=s=>is(s,NodeList),vI=s=>_n(s)===Text,NI=s=>is(s,Event),DI=s=>is(s,KeyboardEvent),PI=s=>is(s,window.TextTrackCue)||is(s,window.VTTCue),OI=s=>is(s,TextTrack)||!mo(s)&&Ba(s.kind),FI=s=>is(s,Promise)&&xh(s.then),MI=s=>s!==null&&typeof s=="object"&&s.nodeType===1&&typeof s.style=="object"&&typeof s.ownerDocument=="object",Ih=s=>mo(s)||(Ba(s)||Ah(s)||Lh(s))&&!s.length||Ch(s)&&!Object.keys(s).length;var k={nullOrUndefined:mo,object:Ch,number:II,string:Ba,boolean:BI,function:xh,array:Ah,weakMap:RI,nodeList:Lh,element:MI,textNode:vI,event:NI,keyboardEvent:DI,cue:PI,track:OI,promise:FI,url:s=>{if(is(s,window.URL))return!0;if(!Ba(s))return!1;let e=s;s.startsWith("http://")&&s.startsWith("https://")||(e=`http://${s}`);try{return!Ih(new URL(e).hostname)}catch{return!1}},empty:Ih};const fo=(()=>{const s=document.createElement("span"),e={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"},t=Object.keys(e).find(n=>s.style[n]!==void 0);return!!k.string(t)&&e[t]})();function Bh(s,e){setTimeout(()=>{try{s.hidden=!0,s.offsetHeight,s.hidden=!1}catch{}},e)}const VI=!!window.document.documentMode,$I=/Edge/g.test(navigator.userAgent),UI="WebkitAppearance"in document.documentElement.style&&!/Edge/g.test(navigator.userAgent),zI=/iPhone|iPod/gi.test(navigator.userAgent)&&navigator.maxTouchPoints>1,GI=navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1,jI=/iPad|iPhone|iPod/gi.test(navigator.userAgent)&&navigator.maxTouchPoints>1;var tt={isIE:VI,isEdge:$I,isWebKit:UI,isIPhone:zI,isIPadOS:GI,isIos:jI};function HI(s){return JSON.parse(JSON.stringify(s))}function Rh(s,e){return e.split(".").reduce((t,n)=>t&&t[n],s)}function Ue(s={},...e){if(!e.length)return s;const t=e.shift();return k.object(t)?(Object.keys(t).forEach(n=>{k.object(t[n])?(Object.keys(s).includes(n)||Object.assign(s,{[n]:{}}),Ue(s[n],t[n])):Object.assign(s,{[n]:t[n]})}),Ue(s,...e)):s}function vh(s,e){const t=s.length?s:[s];Array.from(t).reverse().forEach((n,i)=>{const r=i>0?e.cloneNode(!0):e,o=n.parentNode,l=n.nextSibling;r.appendChild(n),l?o.insertBefore(r,l):o.appendChild(r)})}function go(s,e){k.element(s)&&!k.empty(e)&&Object.entries(e).filter(([,t])=>!k.nullOrUndefined(t)).forEach(([t,n])=>s.setAttribute(t,n))}function fe(s,e,t){const n=document.createElement(s);return k.object(e)&&go(n,e),k.string(t)&&(n.innerText=t),n}function WI(s,e){k.element(s)&&k.element(e)&&e.parentNode.insertBefore(s,e.nextSibling)}function Nh(s,e,t,n){k.element(e)&&e.appendChild(fe(s,t,n))}function rs(s){k.nodeList(s)||k.array(s)?Array.from(s).forEach(rs):k.element(s)&&k.element(s.parentNode)&&s.parentNode.removeChild(s)}function Ra(s){if(!k.element(s))return;let{length:e}=s.childNodes;for(;e>0;)s.removeChild(s.lastChild),e-=1}function va(s,e){return k.element(e)&&k.element(e.parentNode)&&k.element(s)?(e.parentNode.replaceChild(s,e),s):null}function Yt(s,e){if(!k.string(s)||k.empty(s))return{};const t={},n=Ue({},e);return s.split(",").forEach(i=>{const r=i.trim(),o=r.replace(".",""),l=r.replace(/[[\]]/g,"").split("="),[d]=l,c=l.length>1?l[1].replace(/["']/g,""):"";switch(r.charAt(0)){case".":k.string(n.class)?t.class=`${n.class} ${o}`:t.class=o;break;case"#":t.id=r.replace("#","");break;case"[":t[d]=c}}),Ue(n,t)}function As(s,e){if(!k.element(s))return;let t=e;k.boolean(t)||(t=!s.hidden),s.hidden=t}function Ne(s,e,t){if(k.nodeList(s))return Array.from(s).map(n=>Ne(n,e,t));if(k.element(s)){let n="toggle";return t!==void 0&&(n=t?"add":"remove"),s.classList[n](e),s.classList.contains(e)}return!1}function Na(s,e){return k.element(s)&&s.classList.contains(e)}function Ls(s,e){const{prototype:t}=Element;return(t.matches||t.webkitMatchesSelector||t.mozMatchesSelector||t.msMatchesSelector||function(){return Array.from(document.querySelectorAll(e)).includes(this)}).call(s,e)}function KI(s,e){const{prototype:t}=Element;return(t.closest||function(){let n=this;do{if(Ls.matches(n,e))return n;n=n.parentElement||n.parentNode}while(n!==null&&n.nodeType===1);return null}).call(s,e)}function kn(s){return this.elements.container.querySelectorAll(s)}function Xe(s){return this.elements.container.querySelector(s)}function po(s=null,e=!1){k.element(s)&&s.focus({preventScroll:!0,focusVisible:e})}const Dh={"audio/ogg":"vorbis","audio/wav":"1","video/webm":"vp8, vorbis","video/mp4":"avc1.42E01E, mp4a.40.2","video/ogg":"theora"},ze={audio:"canPlayType"in document.createElement("audio"),video:"canPlayType"in document.createElement("video"),check(s,e){const t=ze[s]||e!=="html5";return{api:t,ui:t&&ze.rangeInput}},pip:!(tt.isIPhone||!k.function(fe("video").webkitSetPresentationMode)&&(!document.pictureInPictureEnabled||fe("video").disablePictureInPicture)),airplay:k.function(window.WebKitPlaybackTargetAvailabilityEvent),playsinline:"playsInline"in document.createElement("video"),mime(s){if(k.empty(s))return!1;const[e]=s.split("/");let t=s;if(!this.isHTML5||e!==this.type)return!1;Object.keys(Dh).includes(t)&&(t+=`; codecs="${Dh[s]}"`);try{return!!(t&&this.media.canPlayType(t).replace(/no/,""))}catch{return!1}},textTracks:"textTracks"in document.createElement("video"),rangeInput:(()=>{const s=document.createElement("input");return s.type="range",s.type==="range"})(),touch:"ontouchstart"in document.documentElement,transitions:fo!==!1,reducedMotion:"matchMedia"in window&&window.matchMedia("(prefers-reduced-motion)").matches},qI=(()=>{let s=!1;try{const e=Object.defineProperty({},"passive",{get:()=>(s=!0,null)});window.addEventListener("test",null,e),window.removeEventListener("test",null,e)}catch{}return s})();function En(s,e,t,n=!1,i=!0,r=!1){if(!s||!("addEventListener"in s)||k.empty(e)||!k.function(t))return;const o=e.split(" ");let l=r;qI&&(l={passive:i,capture:r}),o.forEach(d=>{this&&this.eventListeners&&n&&this.eventListeners.push({element:s,type:d,callback:t,options:l}),s[n?"addEventListener":"removeEventListener"](d,t,l)})}function Ie(s,e="",t,n=!0,i=!1){En.call(this,s,e,t,!0,n,i)}function Da(s,e="",t,n=!0,i=!1){En.call(this,s,e,t,!1,n,i)}function yo(s,e="",t,n=!0,i=!1){const r=(...o)=>{Da(s,e,r,n,i),t.apply(this,o)};En.call(this,s,e,r,!0,n,i)}function pe(s,e="",t=!1,n={}){if(!k.element(s)||k.empty(e))return;const i=new CustomEvent(e,{bubbles:t,detail:{...n,plyr:this}});s.dispatchEvent(i)}function YI(){this&&this.eventListeners&&(this.eventListeners.forEach(s=>{const{element:e,type:t,callback:n,options:i}=s;e.removeEventListener(t,n,i)}),this.eventListeners=[])}function JI(){return new Promise(s=>this.ready?setTimeout(s,0):Ie.call(this,this.elements.container,"ready",s)).then(()=>{})}function Jt(s){k.promise(s)&&s.then(null,()=>{})}function bo(s){return k.array(s)?s.filter((e,t)=>s.indexOf(e)===t):s}function Ph(s,e){return k.array(s)&&s.length?s.reduce((t,n)=>Math.abs(n-e)<Math.abs(t-e)?n:t):null}function Oh(s){return!(!window||!window.CSS)&&window.CSS.supports(s)}const Fh=[[1,1],[4,3],[3,4],[5,4],[4,5],[3,2],[2,3],[16,10],[10,16],[16,9],[9,16],[21,9],[9,21],[32,9],[9,32]].reduce((s,[e,t])=>({...s,[e/t]:[e,t]}),{});function Mh(s){return k.array(s)||k.string(s)&&s.includes(":")?(k.array(s)?s:s.split(":")).map(Number).every(k.number):!1}function Pa(s){if(!k.array(s)||!s.every(k.number))return null;const[e,t]=s,n=(r,o)=>o===0?r:n(o,r%o),i=n(e,t);return[e/i,t/i]}function wo(s){const e=n=>Mh(n)?n.split(":").map(Number):null;let t=e(s);if(t===null&&(t=e(this.config.ratio)),t===null&&!k.empty(this.embed)&&k.array(this.embed.ratio)&&({ratio:t}=this.embed),t===null&&this.isHTML5){const{videoWidth:n,videoHeight:i}=this.media;t=[n,i]}return Pa(t)}function js(s){if(!this.isVideo)return{};const{wrapper:e}=this.elements,t=wo.call(this,s);if(!k.array(t))return{};const[n,i]=Pa(t),r=100/n*i;if(Oh(`aspect-ratio: ${n}/${i}`)?e.style.aspectRatio=`${n}/${i}`:e.style.paddingBottom=`${r}%`,this.isVimeo&&!this.config.vimeo.premium&&this.supported.ui){const o=100/this.media.offsetWidth*parseInt(window.getComputedStyle(this.media).paddingBottom,10),l=(o-r)/(o/50);this.fullscreen.active?e.style.paddingBottom=null:this.media.style.transform=`translateY(-${l}%)`}else this.isHTML5&&e.classList.add(this.config.classNames.videoFixedRatio);return{padding:r,ratio:t}}function Vh(s,e,t=.05){const n=s/e,i=Ph(Object.keys(Fh),n);return Math.abs(i-n)<=t?Fh[i]:[s,e]}function XI(){return[Math.max(document.documentElement.clientWidth||0,window.innerWidth||0),Math.max(document.documentElement.clientHeight||0,window.innerHeight||0)]}const us={getSources(){return this.isHTML5?Array.from(this.media.querySelectorAll("source")).filter(s=>{const e=s.getAttribute("type");return!!k.empty(e)||ze.mime.call(this,e)}):[]},getQualityOptions(){return this.config.quality.forced?this.config.quality.options:us.getSources.call(this).map(s=>Number(s.getAttribute("size"))).filter(Boolean)},setup(){if(!this.isHTML5)return;const s=this;s.options.speed=s.config.speed.options,k.empty(this.config.ratio)||js.call(s),Object.defineProperty(s.media,"quality",{get(){const e=us.getSources.call(s).find(t=>t.getAttribute("src")===s.source);return e&&Number(e.getAttribute("size"))},set(e){if(s.quality!==e){if(s.config.quality.forced&&k.function(s.config.quality.onChange))s.config.quality.onChange(e);else{const t=us.getSources.call(s).find(d=>Number(d.getAttribute("size"))===e);if(!t)return;const{currentTime:n,paused:i,preload:r,readyState:o,playbackRate:l}=s.media;s.media.src=t.getAttribute("src"),(r!=="none"||o)&&(s.once("loadedmetadata",()=>{s.speed=l,s.currentTime=n,i||Jt(s.play())}),s.media.load())}pe.call(s,s.media,"qualitychange",!1,{quality:e})}}})},cancelRequests(){this.isHTML5&&(rs(us.getSources.call(this)),this.media.setAttribute("src",this.config.blankVideo),this.media.load(),this.debug.log("Cancelled network requests"))}};function ZI(s){return`${s}-${Math.floor(1e4*Math.random())}`}function So(s,...e){return k.empty(s)?s:s.toString().replace(/{(\d+)}/g,(t,n)=>e[n].toString())}function QI(s,e){return s===0||e===0||Number.isNaN(s)||Number.isNaN(e)?0:(s/e*100).toFixed(2)}const Tn=(s="",e="",t="")=>s.replace(new RegExp(e.toString().replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1"),"g"),t.toString()),$h=(s="")=>s.toString().replace(/\w\S*/g,e=>e.charAt(0).toUpperCase()+e.slice(1).toLowerCase());function e4(s=""){let e=s.toString();return e=Tn(e,"-"," "),e=Tn(e,"_"," "),e=$h(e),Tn(e," ","")}function t4(s=""){let e=s.toString();return e=e4(e),e.charAt(0).toLowerCase()+e.slice(1)}function s4(s){const e=document.createDocumentFragment(),t=document.createElement("div");return e.appendChild(t),t.innerHTML=s,e.firstChild.innerText}function n4(s){const e=document.createElement("div");return e.appendChild(s),e.innerHTML}const Uh={pip:"PIP",airplay:"AirPlay",html5:"HTML5",vimeo:"Vimeo",youtube:"YouTube"},st={get(s="",e={}){if(k.empty(s)||k.empty(e))return"";let t=Rh(e.i18n,s);if(k.empty(t))return Object.keys(Uh).includes(s)?Uh[s]:"";const n={"{seektime}":e.seekTime,"{title}":e.title};return Object.entries(n).forEach(([i,r])=>{t=Tn(t,i,r)}),t}};class Cn{constructor(e){Z(this,"get",t=>{if(!Cn.supported||!this.enabled)return null;const n=window.localStorage.getItem(this.key);if(k.empty(n))return null;const i=JSON.parse(n);return k.string(t)&&t.length?i[t]:i}),Z(this,"set",t=>{if(!Cn.supported||!this.enabled||!k.object(t))return;let n=this.get();k.empty(n)&&(n={}),Ue(n,t);try{window.localStorage.setItem(this.key,JSON.stringify(n))}catch{}}),this.enabled=e.config.storage.enabled,this.key=e.config.storage.key}static get supported(){try{if(!("localStorage"in window))return!1;const e="___test";return window.localStorage.setItem(e,e),window.localStorage.removeItem(e),!0}catch{return!1}}}function xn(s,e="text"){return new Promise((t,n)=>{try{const i=new XMLHttpRequest;if(!("withCredentials"in i))return;i.addEventListener("load",()=>{if(e==="text")try{t(JSON.parse(i.responseText))}catch{t(i.responseText)}else t(i.response)}),i.addEventListener("error",()=>{throw new Error(i.status)}),i.open("GET",s,!0),i.responseType=e,i.send()}catch(i){n(i)}})}function zh(s,e){if(!k.string(s))return;const t="cache",n=k.string(e);let i=!1;const r=()=>document.getElementById(e)!==null,o=(l,d)=>{l.innerHTML=d,n&&r()||document.body.insertAdjacentElement("afterbegin",l)};if(!n||!r()){const l=Cn.supported,d=document.createElement("div");if(d.setAttribute("hidden",""),n&&d.setAttribute("id",e),l){const c=window.localStorage.getItem(`${t}-${e}`);if(i=c!==null,i){const u=JSON.parse(c);o(d,u.content)}}xn(s).then(c=>{if(!k.empty(c)){if(l)try{window.localStorage.setItem(`${t}-${e}`,JSON.stringify({content:c}))}catch{}o(d,c)}}).catch(()=>{})}}const Gh=s=>Math.trunc(s/60/60%60,10),a4=s=>Math.trunc(s/60%60,10),i4=s=>Math.trunc(s%60,10);function Oa(s=0,e=!1,t=!1){if(!k.number(s))return Oa(void 0,e,t);const n=l=>`0${l}`.slice(-2);let i=Gh(s);const r=a4(s),o=i4(s);return i=e||i>0?`${i}:`:"",`${t&&s>0?"-":""}${i}${n(r)}:${n(o)}`}const X={getIconUrl(){const s=new URL(this.config.iconUrl,window.location),e=window.location.host?window.location.host:window.top.location.host,t=s.host!==e||tt.isIE&&!window.svg4everybody;return{url:this.config.iconUrl,cors:t}},findElements(){try{return this.elements.controls=Xe.call(this,this.config.selectors.controls.wrapper),this.elements.buttons={play:kn.call(this,this.config.selectors.buttons.play),pause:Xe.call(this,this.config.selectors.buttons.pause),restart:Xe.call(this,this.config.selectors.buttons.restart),rewind:Xe.call(this,this.config.selectors.buttons.rewind),fastForward:Xe.call(this,this.config.selectors.buttons.fastForward),mute:Xe.call(this,this.config.selectors.buttons.mute),pip:Xe.call(this,this.config.selectors.buttons.pip),airplay:Xe.call(this,this.config.selectors.buttons.airplay),settings:Xe.call(this,this.config.selectors.buttons.settings),captions:Xe.call(this,this.config.selectors.buttons.captions),fullscreen:Xe.call(this,this.config.selectors.buttons.fullscreen)},this.elements.progress=Xe.call(this,this.config.selectors.progress),this.elements.inputs={seek:Xe.call(this,this.config.selectors.inputs.seek),volume:Xe.call(this,this.config.selectors.inputs.volume)},this.elements.display={buffer:Xe.call(this,this.config.selectors.display.buffer),currentTime:Xe.call(this,this.config.selectors.display.currentTime),duration:Xe.call(this,this.config.selectors.display.duration)},k.element(this.elements.progress)&&(this.elements.display.seekTooltip=this.elements.progress.querySelector(`.${this.config.classNames.tooltip}`)),!0}catch(s){return this.debug.warn("It looks like there is a problem with your custom controls HTML",s),this.toggleNativeControls(!0),!1}},createIcon(s,e){const t="http://www.w3.org/2000/svg",n=X.getIconUrl.call(this),i=`${n.cors?"":n.url}#${this.config.iconPrefix}`,r=document.createElementNS(t,"svg");go(r,Ue(e,{"aria-hidden":"true",focusable:"false"}));const o=document.createElementNS(t,"use"),l=`${i}-${s}`;return"href"in o&&o.setAttributeNS("http://www.w3.org/1999/xlink","href",l),o.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",l),r.appendChild(o),r},createLabel(s,e={}){const t=st.get(s,this.config);return fe("span",{...e,class:[e.class,this.config.classNames.hidden].filter(Boolean).join(" ")},t)},createBadge(s){if(k.empty(s))return null;const e=fe("span",{class:this.config.classNames.menu.value});return e.appendChild(fe("span",{class:this.config.classNames.menu.badge},s)),e},createButton(s,e){const t=Ue({},e);let n=t4(s);const i={element:"button",toggle:!1,label:null,icon:null,labelPressed:null,iconPressed:null};switch(["element","icon","label"].forEach(o=>{Object.keys(t).includes(o)&&(i[o]=t[o],delete t[o])}),i.element!=="button"||Object.keys(t).includes("type")||(t.type="button"),Object.keys(t).includes("class")?t.class.split(" ").some(o=>o===this.config.classNames.control)||Ue(t,{class:`${t.class} ${this.config.classNames.control}`}):t.class=this.config.classNames.control,s){case"play":i.toggle=!0,i.label="play",i.labelPressed="pause",i.icon="play",i.iconPressed="pause";break;case"mute":i.toggle=!0,i.label="mute",i.labelPressed="unmute",i.icon="volume",i.iconPressed="muted";break;case"captions":i.toggle=!0,i.label="enableCaptions",i.labelPressed="disableCaptions",i.icon="captions-off",i.iconPressed="captions-on";break;case"fullscreen":i.toggle=!0,i.label="enterFullscreen",i.labelPressed="exitFullscreen",i.icon="enter-fullscreen",i.iconPressed="exit-fullscreen";break;case"play-large":t.class+=` ${this.config.classNames.control}--overlaid`,n="play",i.label="play",i.icon="play";break;default:k.empty(i.label)&&(i.label=n),k.empty(i.icon)&&(i.icon=s)}const r=fe(i.element);return i.toggle?(r.appendChild(X.createIcon.call(this,i.iconPressed,{class:"icon--pressed"})),r.appendChild(X.createIcon.call(this,i.icon,{class:"icon--not-pressed"})),r.appendChild(X.createLabel.call(this,i.labelPressed,{class:"label--pressed"})),r.appendChild(X.createLabel.call(this,i.label,{class:"label--not-pressed"}))):(r.appendChild(X.createIcon.call(this,i.icon)),r.appendChild(X.createLabel.call(this,i.label))),Ue(t,Yt(this.config.selectors.buttons[n],t)),go(r,t),n==="play"?(k.array(this.elements.buttons[n])||(this.elements.buttons[n]=[]),this.elements.buttons[n].push(r)):this.elements.buttons[n]=r,r},createRange(s,e){const t=fe("input",Ue(Yt(this.config.selectors.inputs[s]),{type:"range",min:0,max:100,step:.01,value:0,autocomplete:"off",role:"slider","aria-label":st.get(s,this.config),"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":0},e));return this.elements.inputs[s]=t,X.updateRangeFill.call(this,t),LI.setup(t),t},createProgress(s,e){const t=fe("progress",Ue(Yt(this.config.selectors.display[s]),{min:0,max:100,value:0,role:"progressbar","aria-hidden":!0},e));if(s!=="volume"){t.appendChild(fe("span",null,"0"));const n={played:"played",buffer:"buffered"}[s],i=n?st.get(n,this.config):"";t.innerText=`% ${i.toLowerCase()}`}return this.elements.display[s]=t,t},createTime(s,e){const t=Yt(this.config.selectors.display[s],e),n=fe("div",Ue(t,{class:`${t.class?t.class:""} ${this.config.classNames.display.time} `.trim(),"aria-label":st.get(s,this.config),role:"timer"}),"00:00");return this.elements.display[s]=n,n},bindMenuItemShortcuts(s,e){Ie.call(this,s,"keydown keyup",t=>{if(![" ","ArrowUp","ArrowDown","ArrowRight"].includes(t.key)||(t.preventDefault(),t.stopPropagation(),t.type==="keydown"))return;const n=Ls(s,'[role="menuitemradio"]');if(!n&&[" ","ArrowRight"].includes(t.key))X.showMenuPanel.call(this,e,!0);else{let i;t.key!==" "&&(t.key==="ArrowDown"||n&&t.key==="ArrowRight"?(i=s.nextElementSibling,k.element(i)||(i=s.parentNode.firstElementChild)):(i=s.previousElementSibling,k.element(i)||(i=s.parentNode.lastElementChild)),po.call(this,i,!0))}},!1),Ie.call(this,s,"keyup",t=>{t.key==="Return"&&X.focusFirstMenuItem.call(this,null,!0)})},createMenuItem({value:s,list:e,type:t,title:n,badge:i=null,checked:r=!1}){const o=Yt(this.config.selectors.inputs[t]),l=fe("button",Ue(o,{type:"button",role:"menuitemradio",class:`${this.config.classNames.control} ${o.class?o.class:""}`.trim(),"aria-checked":r,value:s})),d=fe("span");d.innerHTML=n,k.element(i)&&d.appendChild(i),l.appendChild(d),Object.defineProperty(l,"checked",{enumerable:!0,get:()=>l.getAttribute("aria-checked")==="true",set(c){c&&Array.from(l.parentNode.children).filter(u=>Ls(u,'[role="menuitemradio"]')).forEach(u=>u.setAttribute("aria-checked","false")),l.setAttribute("aria-checked",c?"true":"false")}}),this.listeners.bind(l,"click keyup",c=>{if(!k.keyboardEvent(c)||c.key===" "){switch(c.preventDefault(),c.stopPropagation(),l.checked=!0,t){case"language":this.currentTrack=Number(s);break;case"quality":this.quality=s;break;case"speed":this.speed=parseFloat(s)}X.showMenuPanel.call(this,"home",k.keyboardEvent(c))}},t,!1),X.bindMenuItemShortcuts.call(this,l,t),e.appendChild(l)},formatTime(s=0,e=!1){return k.number(s)?Oa(s,Gh(this.duration)>0,e):s},updateTimeDisplay(s=null,e=0,t=!1){k.element(s)&&k.number(e)&&(s.innerText=X.formatTime(e,t))},updateVolume(){this.supported.ui&&(k.element(this.elements.inputs.volume)&&X.setRange.call(this,this.elements.inputs.volume,this.muted?0:this.volume),k.element(this.elements.buttons.mute)&&(this.elements.buttons.mute.pressed=this.muted||this.volume===0))},setRange(s,e=0){k.element(s)&&(s.value=e,X.updateRangeFill.call(this,s))},updateProgress(s){if(!this.supported.ui||!k.event(s))return;let e=0;const t=(n,i)=>{const r=k.number(i)?i:0,o=k.element(n)?n:this.elements.display.buffer;if(k.element(o)){o.value=r;const l=o.getElementsByTagName("span")[0];k.element(l)&&(l.childNodes[0].nodeValue=r)}};if(s)switch(s.type){case"timeupdate":case"seeking":case"seeked":e=QI(this.currentTime,this.duration),s.type==="timeupdate"&&X.setRange.call(this,this.elements.inputs.seek,e);break;case"playing":case"progress":t(this.elements.display.buffer,100*this.buffered)}},updateRangeFill(s){const e=k.event(s)?s.target:s;if(k.element(e)&&e.getAttribute("type")==="range"){if(Ls(e,this.config.selectors.inputs.seek)){e.setAttribute("aria-valuenow",this.currentTime);const t=X.formatTime(this.currentTime),n=X.formatTime(this.duration),i=st.get("seekLabel",this.config);e.setAttribute("aria-valuetext",i.replace("{currentTime}",t).replace("{duration}",n))}else if(Ls(e,this.config.selectors.inputs.volume)){const t=100*e.value;e.setAttribute("aria-valuenow",t),e.setAttribute("aria-valuetext",`${t.toFixed(1)}%`)}else e.setAttribute("aria-valuenow",e.value);(tt.isWebKit||tt.isIPadOS)&&e.style.setProperty("--value",e.value/e.max*100+"%")}},updateSeekTooltip(s){var e,t;if(!this.config.tooltips.seek||!k.element(this.elements.inputs.seek)||!k.element(this.elements.display.seekTooltip)||this.duration===0)return;const n=this.elements.display.seekTooltip,i=`${this.config.classNames.tooltip}--visible`,r=u=>Ne(n,i,u);if(this.touch)return void r(!1);let o=0;const l=this.elements.progress.getBoundingClientRect();if(k.event(s))o=100/l.width*(s.pageX-l.left);else{if(!Na(n,i))return;o=parseFloat(n.style.left,10)}o<0?o=0:o>100&&(o=100);const d=this.duration/100*o;n.innerText=X.formatTime(d);const c=(e=this.config.markers)===null||e===void 0||(t=e.points)===null||t===void 0?void 0:t.find(({time:u})=>u===Math.round(d));c&&n.insertAdjacentHTML("afterbegin",`${c.label}<br>`),n.style.left=`${o}%`,k.event(s)&&["mouseenter","mouseleave"].includes(s.type)&&r(s.type==="mouseenter")},timeUpdate(s){const e=!k.element(this.elements.display.duration)&&this.config.invertTime;X.updateTimeDisplay.call(this,this.elements.display.currentTime,e?this.duration-this.currentTime:this.currentTime,e),s&&s.type==="timeupdate"&&this.media.seeking||X.updateProgress.call(this,s)},durationUpdate(){if(!this.supported.ui||!this.config.invertTime&&this.currentTime)return;if(this.duration>=2**32)return As(this.elements.display.currentTime,!0),void As(this.elements.progress,!0);k.element(this.elements.inputs.seek)&&this.elements.inputs.seek.setAttribute("aria-valuemax",this.duration);const s=k.element(this.elements.display.duration);!s&&this.config.displayDuration&&this.paused&&X.updateTimeDisplay.call(this,this.elements.display.currentTime,this.duration),s&&X.updateTimeDisplay.call(this,this.elements.display.duration,this.duration),this.config.markers.enabled&&X.setMarkers.call(this),X.updateSeekTooltip.call(this)},toggleMenuButton(s,e){As(this.elements.settings.buttons[s],!e)},updateSetting(s,e,t){const n=this.elements.settings.panels[s];let i=null,r=e;if(s==="captions")i=this.currentTrack;else{if(i=k.empty(t)?this[s]:t,k.empty(i)&&(i=this.config[s].default),!k.empty(this.options[s])&&!this.options[s].includes(i))return void this.debug.warn(`Unsupported value of '${i}' for ${s}`);if(!this.config[s].options.includes(i))return void this.debug.warn(`Disabled value of '${i}' for ${s}`)}if(k.element(r)||(r=n&&n.querySelector('[role="menu"]')),!k.element(r))return;this.elements.settings.buttons[s].querySelector(`.${this.config.classNames.menu.value}`).innerHTML=X.getLabel.call(this,s,i);const o=r&&r.querySelector(`[value="${i}"]`);k.element(o)&&(o.checked=!0)},getLabel(s,e){switch(s){case"speed":return e===1?st.get("normal",this.config):`${e}&times;`;case"quality":if(k.number(e)){const t=st.get(`qualityLabel.${e}`,this.config);return t.length?t:`${e}p`}return $h(e);case"captions":return Be.getLabel.call(this);default:return null}},setQualityMenu(s){if(!k.element(this.elements.settings.panels.quality))return;const e="quality",t=this.elements.settings.panels.quality.querySelector('[role="menu"]');k.array(s)&&(this.options.quality=bo(s).filter(r=>this.config.quality.options.includes(r)));const n=!k.empty(this.options.quality)&&this.options.quality.length>1;if(X.toggleMenuButton.call(this,e,n),Ra(t),X.checkMenu.call(this),!n)return;const i=r=>{const o=st.get(`qualityBadge.${r}`,this.config);return o.length?X.createBadge.call(this,o):null};this.options.quality.sort((r,o)=>{const l=this.config.quality.options;return l.indexOf(r)>l.indexOf(o)?1:-1}).forEach(r=>{X.createMenuItem.call(this,{value:r,list:t,type:e,title:X.getLabel.call(this,"quality",r),badge:i(r)})}),X.updateSetting.call(this,e,t)},setCaptionsMenu(){if(!k.element(this.elements.settings.panels.captions))return;const s="captions",e=this.elements.settings.panels.captions.querySelector('[role="menu"]'),t=Be.getTracks.call(this),n=!!t.length;if(X.toggleMenuButton.call(this,s,n),Ra(e),X.checkMenu.call(this),!n)return;const i=t.map((r,o)=>({value:o,checked:this.captions.toggled&&this.currentTrack===o,title:Be.getLabel.call(this,r),badge:r.language&&X.createBadge.call(this,r.language.toUpperCase()),list:e,type:"language"}));i.unshift({value:-1,checked:!this.captions.toggled,title:st.get("disabled",this.config),list:e,type:"language"}),i.forEach(X.createMenuItem.bind(this)),X.updateSetting.call(this,s,e)},setSpeedMenu(){if(!k.element(this.elements.settings.panels.speed))return;const s="speed",e=this.elements.settings.panels.speed.querySelector('[role="menu"]');this.options.speed=this.options.speed.filter(n=>n>=this.minimumSpeed&&n<=this.maximumSpeed);const t=!k.empty(this.options.speed)&&this.options.speed.length>1;X.toggleMenuButton.call(this,s,t),Ra(e),X.checkMenu.call(this),t&&(this.options.speed.forEach(n=>{X.createMenuItem.call(this,{value:n,list:e,type:s,title:X.getLabel.call(this,"speed",n)})}),X.updateSetting.call(this,s,e))},checkMenu(){const{buttons:s}=this.elements.settings,e=!k.empty(s)&&Object.values(s).some(t=>!t.hidden);As(this.elements.settings.menu,!e)},focusFirstMenuItem(s,e=!1){if(this.elements.settings.popup.hidden)return;let t=s;k.element(t)||(t=Object.values(this.elements.settings.panels).find(i=>!i.hidden));const n=t.querySelector('[role^="menuitem"]');po.call(this,n,e)},toggleMenu(s){const{popup:e}=this.elements.settings,t=this.elements.buttons.settings;if(!k.element(e)||!k.element(t))return;const{hidden:n}=e;let i=n;if(k.boolean(s))i=s;else if(k.keyboardEvent(s)&&s.key==="Escape")i=!1;else if(k.event(s)){const r=k.function(s.composedPath)?s.composedPath()[0]:s.target,o=e.contains(r);if(o||!o&&s.target!==t&&i)return}t.setAttribute("aria-expanded",i),As(e,!i),Ne(this.elements.container,this.config.classNames.menu.open,i),i&&k.keyboardEvent(s)?X.focusFirstMenuItem.call(this,null,!0):i||n||po.call(this,t,k.keyboardEvent(s))},getMenuSize(s){const e=s.cloneNode(!0);e.style.position="absolute",e.style.opacity=0,e.removeAttribute("hidden"),s.parentNode.appendChild(e);const t=e.scrollWidth,n=e.scrollHeight;return rs(e),{width:t,height:n}},showMenuPanel(s="",e=!1){const t=this.elements.container.querySelector(`#plyr-settings-${this.id}-${s}`);if(!k.element(t))return;const n=t.parentNode,i=Array.from(n.children).find(r=>!r.hidden);if(ze.transitions&&!ze.reducedMotion){n.style.width=`${i.scrollWidth}px`,n.style.height=`${i.scrollHeight}px`;const r=X.getMenuSize.call(this,t),o=l=>{l.target===n&&["width","height"].includes(l.propertyName)&&(n.style.width="",n.style.height="",Da.call(this,n,fo,o))};Ie.call(this,n,fo,o),n.style.width=`${r.width}px`,n.style.height=`${r.height}px`}As(i,!0),As(t,!1),X.focusFirstMenuItem.call(this,t,e)},setDownloadUrl(){const s=this.elements.buttons.download;k.element(s)&&s.setAttribute("href",this.download)},create(s){const{bindMenuItemShortcuts:e,createButton:t,createProgress:n,createRange:i,createTime:r,setQualityMenu:o,setSpeedMenu:l,showMenuPanel:d}=X;this.elements.controls=null,k.array(this.config.controls)&&this.config.controls.includes("play-large")&&this.elements.container.appendChild(t.call(this,"play-large"));const c=fe("div",Yt(this.config.selectors.controls.wrapper));this.elements.controls=c;const u={class:"plyr__controls__item"};return bo(k.array(this.config.controls)?this.config.controls:[]).forEach(m=>{if(m==="restart"&&c.appendChild(t.call(this,"restart",u)),m==="rewind"&&c.appendChild(t.call(this,"rewind",u)),m==="play"&&c.appendChild(t.call(this,"play",u)),m==="fast-forward"&&c.appendChild(t.call(this,"fast-forward",u)),m==="progress"){const f=fe("div",{class:`${u.class} plyr__progress__container`}),p=fe("div",Yt(this.config.selectors.progress));if(p.appendChild(i.call(this,"seek",{id:`plyr-seek-${s.id}`})),p.appendChild(n.call(this,"buffer")),this.config.tooltips.seek){const h=fe("span",{class:this.config.classNames.tooltip},"00:00");p.appendChild(h),this.elements.display.seekTooltip=h}this.elements.progress=p,f.appendChild(this.elements.progress),c.appendChild(f)}if(m==="current-time"&&c.appendChild(r.call(this,"currentTime",u)),m==="duration"&&c.appendChild(r.call(this,"duration",u)),m==="mute"||m==="volume"){let{volume:f}=this.elements;if(k.element(f)&&c.contains(f)||(f=fe("div",Ue({},u,{class:`${u.class} plyr__volume`.trim()})),this.elements.volume=f,c.appendChild(f)),m==="mute"&&f.appendChild(t.call(this,"mute")),m==="volume"&&!tt.isIos&&!tt.isIPadOS){const p={max:1,step:.05,value:this.config.volume};f.appendChild(i.call(this,"volume",Ue(p,{id:`plyr-volume-${s.id}`})))}}if(m==="captions"&&c.appendChild(t.call(this,"captions",u)),m==="settings"&&!k.empty(this.config.settings)){const f=fe("div",Ue({},u,{class:`${u.class} plyr__menu`.trim(),hidden:""}));f.appendChild(t.call(this,"settings",{"aria-haspopup":!0,"aria-controls":`plyr-settings-${s.id}`,"aria-expanded":!1}));const p=fe("div",{class:"plyr__menu__container",id:`plyr-settings-${s.id}`,hidden:""}),h=fe("div"),g=fe("div",{id:`plyr-settings-${s.id}-home`}),y=fe("div",{role:"menu"});g.appendChild(y),h.appendChild(g),this.elements.settings.panels.home=g,this.config.settings.forEach(b=>{const w=fe("button",Ue(Yt(this.config.selectors.buttons.settings),{type:"button",class:`${this.config.classNames.control} ${this.config.classNames.control}--forward`,role:"menuitem","aria-haspopup":!0,hidden:""}));e.call(this,w,b),Ie.call(this,w,"click",()=>{d.call(this,b,!1)});const _=fe("span",null,st.get(b,this.config)),C=fe("span",{class:this.config.classNames.menu.value});C.innerHTML=s[b],_.appendChild(C),w.appendChild(_),y.appendChild(w);const E=fe("div",{id:`plyr-settings-${s.id}-${b}`,hidden:""}),A=fe("button",{type:"button",class:`${this.config.classNames.control} ${this.config.classNames.control}--back`});A.appendChild(fe("span",{"aria-hidden":!0},st.get(b,this.config))),A.appendChild(fe("span",{class:this.config.classNames.hidden},st.get("menuBack",this.config))),Ie.call(this,E,"keydown",T=>{T.key==="ArrowLeft"&&(T.preventDefault(),T.stopPropagation(),d.call(this,"home",!0))},!1),Ie.call(this,A,"click",()=>{d.call(this,"home",!1)}),E.appendChild(A),E.appendChild(fe("div",{role:"menu"})),h.appendChild(E),this.elements.settings.buttons[b]=w,this.elements.settings.panels[b]=E}),p.appendChild(h),f.appendChild(p),c.appendChild(f),this.elements.settings.popup=p,this.elements.settings.menu=f}if(m==="pip"&&ze.pip&&c.appendChild(t.call(this,"pip",u)),m==="airplay"&&ze.airplay&&c.appendChild(t.call(this,"airplay",u)),m==="download"){const f=Ue({},u,{element:"a",href:this.download,target:"_blank"});this.isHTML5&&(f.download="");const{download:p}=this.config.urls;!k.url(p)&&this.isEmbed&&Ue(f,{icon:`logo-${this.provider}`,label:this.provider}),c.appendChild(t.call(this,"download",f))}m==="fullscreen"&&c.appendChild(t.call(this,"fullscreen",u))}),this.isHTML5&&o.call(this,us.getQualityOptions.call(this)),l.call(this),c},inject(){if(this.config.loadSprite){const i=X.getIconUrl.call(this);i.cors&&zh(i.url,"sprite-plyr")}this.id=Math.floor(1e4*Math.random());let s=null;this.elements.controls=null;const e={id:this.id,seektime:this.config.seekTime,title:this.config.title};let t=!0;k.function(this.config.controls)&&(this.config.controls=this.config.controls.call(this,e)),this.config.controls||(this.config.controls=[]),k.element(this.config.controls)||k.string(this.config.controls)?s=this.config.controls:(s=X.create.call(this,{id:this.id,seektime:this.config.seekTime,speed:this.speed,quality:this.quality,captions:Be.getLabel.call(this)}),t=!1);let n;if(t&&k.string(this.config.controls)&&(s=(i=>{let r=i;return Object.entries(e).forEach(([o,l])=>{r=Tn(r,`{${o}}`,l)}),r})(s)),k.string(this.config.selectors.controls.container)&&(n=document.querySelector(this.config.selectors.controls.container)),k.element(n)||(n=this.elements.container),n[k.element(s)?"insertAdjacentElement":"insertAdjacentHTML"]("afterbegin",s),k.element(this.elements.controls)||X.findElements.call(this),!k.empty(this.elements.buttons)){const i=r=>{const o=this.config.classNames.controlPressed;r.setAttribute("aria-pressed","false"),Object.defineProperty(r,"pressed",{configurable:!0,enumerable:!0,get:()=>Na(r,o),set(l=!1){Ne(r,o,l),r.setAttribute("aria-pressed",l?"true":"false")}})};Object.values(this.elements.buttons).filter(Boolean).forEach(r=>{k.array(r)||k.nodeList(r)?Array.from(r).filter(Boolean).forEach(i):i(r)})}if(tt.isEdge&&Bh(n),this.config.tooltips.controls){const{classNames:i,selectors:r}=this.config,o=`${r.controls.wrapper} ${r.labels} .${i.hidden}`,l=kn.call(this,o);Array.from(l).forEach(d=>{Ne(d,this.config.classNames.hidden,!1),Ne(d,this.config.classNames.tooltip,!0)})}},setMediaMetadata(){try{"mediaSession"in navigator&&(navigator.mediaSession.metadata=new window.MediaMetadata({title:this.config.mediaMetadata.title,artist:this.config.mediaMetadata.artist,album:this.config.mediaMetadata.album,artwork:this.config.mediaMetadata.artwork}))}catch{}},setMarkers(){var s,e;if(!this.duration||this.elements.markers)return;const t=(s=this.config.markers)===null||s===void 0||(e=s.points)===null||e===void 0?void 0:e.filter(({time:d})=>d>0&&d<this.duration);if(t==null||!t.length)return;const n=document.createDocumentFragment(),i=document.createDocumentFragment();let r=null;const o=`${this.config.classNames.tooltip}--visible`,l=d=>Ne(r,o,d);t.forEach(d=>{const c=fe("span",{class:this.config.classNames.marker},""),u=d.time/this.duration*100+"%";r&&(c.addEventListener("mouseenter",()=>{d.label||(r.style.left=u,r.innerHTML=d.label,l(!0))}),c.addEventListener("mouseleave",()=>{l(!1)})),c.addEventListener("click",()=>{this.currentTime=d.time}),c.style.left=u,i.appendChild(c)}),n.appendChild(i),this.config.tooltips.seek||(r=fe("span",{class:this.config.classNames.tooltip},""),n.appendChild(r)),this.elements.markers={points:i,tip:r},this.elements.progress.appendChild(n)}};function jh(s,e=!0){let t=s;if(e){const n=document.createElement("a");n.href=t,t=n.href}try{return new URL(t)}catch{return null}}function Hh(s){const e=new URLSearchParams;return k.object(s)&&Object.entries(s).forEach(([t,n])=>{e.set(t,n)}),e}const Be={setup(){if(!this.supported.ui)return;if(!this.isVideo||this.isYouTube||this.isHTML5&&!ze.textTracks)return void(k.array(this.config.controls)&&this.config.controls.includes("settings")&&this.config.settings.includes("captions")&&X.setCaptionsMenu.call(this));if(k.element(this.elements.captions)||(this.elements.captions=fe("div",Yt(this.config.selectors.captions)),this.elements.captions.setAttribute("dir","auto"),WI(this.elements.captions,this.elements.wrapper)),tt.isIE&&window.URL){const n=this.media.querySelectorAll("track");Array.from(n).forEach(i=>{const r=i.getAttribute("src"),o=jh(r);o!==null&&o.hostname!==window.location.href.hostname&&["http:","https:"].includes(o.protocol)&&xn(r,"blob").then(l=>{i.setAttribute("src",window.URL.createObjectURL(l))}).catch(()=>{rs(i)})})}const s=bo((navigator.languages||[navigator.language||navigator.userLanguage||"en"]).map(n=>n.split("-")[0]));let e=(this.storage.get("language")||this.config.captions.language||"auto").toLowerCase();e==="auto"&&([e]=s);let t=this.storage.get("captions");if(k.boolean(t)||({active:t}=this.config.captions),Object.assign(this.captions,{toggled:!1,active:t,language:e,languages:s}),this.isHTML5){const n=this.config.captions.update?"addtrack removetrack":"removetrack";Ie.call(this,this.media.textTracks,n,Be.update.bind(this))}setTimeout(Be.update.bind(this),0)},update(){const s=Be.getTracks.call(this,!0),{active:e,language:t,meta:n,currentTrackNode:i}=this.captions,r=!!s.find(o=>o.language===t);this.isHTML5&&this.isVideo&&s.filter(o=>!n.get(o)).forEach(o=>{this.debug.log("Track added",o),n.set(o,{default:o.mode==="showing"}),o.mode==="showing"&&(o.mode="hidden"),Ie.call(this,o,"cuechange",()=>Be.updateCues.call(this))}),(r&&this.language!==t||!s.includes(i))&&(Be.setLanguage.call(this,t),Be.toggle.call(this,e&&r)),this.elements&&Ne(this.elements.container,this.config.classNames.captions.enabled,!k.empty(s)),k.array(this.config.controls)&&this.config.controls.includes("settings")&&this.config.settings.includes("captions")&&X.setCaptionsMenu.call(this)},toggle(s,e=!0){if(!this.supported.ui)return;const{toggled:t}=this.captions,n=this.config.classNames.captions.active,i=k.nullOrUndefined(s)?!t:s;if(i!==t){if(e||(this.captions.active=i,this.storage.set({captions:i})),!this.language&&i&&!e){const r=Be.getTracks.call(this),o=Be.findTrack.call(this,[this.captions.language,...this.captions.languages],!0);return this.captions.language=o.language,void Be.set.call(this,r.indexOf(o))}this.elements.buttons.captions&&(this.elements.buttons.captions.pressed=i),Ne(this.elements.container,n,i),this.captions.toggled=i,X.updateSetting.call(this,"captions"),pe.call(this,this.media,i?"captionsenabled":"captionsdisabled")}setTimeout(()=>{i&&this.captions.toggled&&(this.captions.currentTrackNode.mode="hidden")})},set(s,e=!0){const t=Be.getTracks.call(this);if(s!==-1)if(k.number(s))if(s in t){if(this.captions.currentTrack!==s){this.captions.currentTrack=s;const n=t[s],{language:i}=n||{};this.captions.currentTrackNode=n,X.updateSetting.call(this,"captions"),e||(this.captions.language=i,this.storage.set({language:i})),this.isVimeo&&this.embed.enableTextTrack(i),pe.call(this,this.media,"languagechange")}Be.toggle.call(this,!0,e),this.isHTML5&&this.isVideo&&Be.updateCues.call(this)}else this.debug.warn("Track not found",s);else this.debug.warn("Invalid caption argument",s);else Be.toggle.call(this,!1,e)},setLanguage(s,e=!0){if(!k.string(s))return void this.debug.warn("Invalid language argument",s);const t=s.toLowerCase();this.captions.language=t;const n=Be.getTracks.call(this),i=Be.findTrack.call(this,[t]);Be.set.call(this,n.indexOf(i),e)},getTracks(s=!1){return Array.from((this.media||{}).textTracks||[]).filter(e=>!this.isHTML5||s||this.captions.meta.has(e)).filter(e=>["captions","subtitles"].includes(e.kind))},findTrack(s,e=!1){const t=Be.getTracks.call(this),n=o=>Number((this.captions.meta.get(o)||{}).default),i=Array.from(t).sort((o,l)=>n(l)-n(o));let r;return s.every(o=>(r=i.find(l=>l.language===o),!r)),r||(e?i[0]:void 0)},getCurrentTrack(){return Be.getTracks.call(this)[this.currentTrack]},getLabel(s){let e=s;return!k.track(e)&&ze.textTracks&&this.captions.toggled&&(e=Be.getCurrentTrack.call(this)),k.track(e)?k.empty(e.label)?k.empty(e.language)?st.get("enabled",this.config):s.language.toUpperCase():e.label:st.get("disabled",this.config)},updateCues(s){if(!this.supported.ui)return;if(!k.element(this.elements.captions))return void this.debug.warn("No captions element to render to");if(!k.nullOrUndefined(s)&&!Array.isArray(s))return void this.debug.warn("updateCues: Invalid input",s);let e=s;if(!e){const n=Be.getCurrentTrack.call(this);e=Array.from((n||{}).activeCues||[]).map(i=>i.getCueAsHTML()).map(n4)}const t=e.map(n=>n.trim()).join(`
37
- `);if(t!==this.elements.captions.innerHTML){Ra(this.elements.captions);const n=fe("span",Yt(this.config.selectors.caption));n.innerHTML=t,this.elements.captions.appendChild(n),pe.call(this,this.media,"cuechange")}}},Wh={enabled:!0,title:"",debug:!1,autoplay:!1,autopause:!0,playsinline:!0,seekTime:10,volume:1,muted:!1,duration:null,displayDuration:!0,invertTime:!0,toggleInvert:!0,ratio:null,clickToPlay:!0,hideControls:!0,resetOnEnd:!1,disableContextMenu:!0,loadSprite:!0,iconPrefix:"plyr",iconUrl:"https://cdn.plyr.io/3.7.8/plyr.svg",blankVideo:"https://cdn.plyr.io/static/blank.mp4",quality:{default:576,options:[4320,2880,2160,1440,1080,720,576,480,360,240],forced:!1,onChange:null},loop:{active:!1},speed:{selected:1,options:[.5,.75,1,1.25,1.5,1.75,2,4]},keyboard:{focused:!0,global:!1},tooltips:{controls:!1,seek:!0},captions:{active:!1,language:"auto",update:!1},fullscreen:{enabled:!0,fallback:!0,iosNative:!1},storage:{enabled:!0,key:"plyr"},controls:["play-large","play","progress","current-time","mute","volume","captions","settings","pip","airplay","fullscreen"],settings:["captions","quality","speed"],i18n:{restart:"Restart",rewind:"Rewind {seektime}s",play:"Play",pause:"Pause",fastForward:"Forward {seektime}s",seek:"Seek",seekLabel:"{currentTime} of {duration}",played:"Played",buffered:"Buffered",currentTime:"Current time",duration:"Duration",volume:"Volume",mute:"Mute",unmute:"Unmute",enableCaptions:"Enable captions",disableCaptions:"Disable captions",download:"Download",enterFullscreen:"Enter fullscreen",exitFullscreen:"Exit fullscreen",frameTitle:"Player for {title}",captions:"Captions",settings:"Settings",pip:"PIP",menuBack:"Go back to previous menu",speed:"Speed",normal:"Normal",quality:"Quality",loop:"Loop",start:"Start",end:"End",all:"All",reset:"Reset",disabled:"Disabled",enabled:"Enabled",advertisement:"Ad",qualityBadge:{2160:"4K",1440:"HD",1080:"HD",720:"HD",576:"SD",480:"SD"}},urls:{download:null,vimeo:{sdk:"https://player.vimeo.com/api/player.js",iframe:"https://player.vimeo.com/video/{0}?{1}",api:"https://vimeo.com/api/oembed.json?url={0}"},youtube:{sdk:"https://www.youtube.com/iframe_api",api:"https://noembed.com/embed?url=https://www.youtube.com/watch?v={0}"},googleIMA:{sdk:"https://imasdk.googleapis.com/js/sdkloader/ima3.js"}},listeners:{seek:null,play:null,pause:null,restart:null,rewind:null,fastForward:null,mute:null,volume:null,captions:null,download:null,fullscreen:null,pip:null,airplay:null,speed:null,quality:null,loop:null,language:null},events:["ended","progress","stalled","playing","waiting","canplay","canplaythrough","loadstart","loadeddata","loadedmetadata","timeupdate","volumechange","play","pause","error","seeking","seeked","emptied","ratechange","cuechange","download","enterfullscreen","exitfullscreen","captionsenabled","captionsdisabled","languagechange","controlshidden","controlsshown","ready","statechange","qualitychange","adsloaded","adscontentpause","adscontentresume","adstarted","adsmidpoint","adscomplete","adsallcomplete","adsimpression","adsclick"],selectors:{editable:"input, textarea, select, [contenteditable]",container:".plyr",controls:{container:null,wrapper:".plyr__controls"},labels:"[data-plyr]",buttons:{play:'[data-plyr="play"]',pause:'[data-plyr="pause"]',restart:'[data-plyr="restart"]',rewind:'[data-plyr="rewind"]',fastForward:'[data-plyr="fast-forward"]',mute:'[data-plyr="mute"]',captions:'[data-plyr="captions"]',download:'[data-plyr="download"]',fullscreen:'[data-plyr="fullscreen"]',pip:'[data-plyr="pip"]',airplay:'[data-plyr="airplay"]',settings:'[data-plyr="settings"]',loop:'[data-plyr="loop"]'},inputs:{seek:'[data-plyr="seek"]',volume:'[data-plyr="volume"]',speed:'[data-plyr="speed"]',language:'[data-plyr="language"]',quality:'[data-plyr="quality"]'},display:{currentTime:".plyr__time--current",duration:".plyr__time--duration",buffer:".plyr__progress__buffer",loop:".plyr__progress__loop",volume:".plyr__volume--display"},progress:".plyr__progress",captions:".plyr__captions",caption:".plyr__caption"},classNames:{type:"plyr--{0}",provider:"plyr--{0}",video:"plyr__video-wrapper",embed:"plyr__video-embed",videoFixedRatio:"plyr__video-wrapper--fixed-ratio",embedContainer:"plyr__video-embed__container",poster:"plyr__poster",posterEnabled:"plyr__poster-enabled",ads:"plyr__ads",control:"plyr__control",controlPressed:"plyr__control--pressed",playing:"plyr--playing",paused:"plyr--paused",stopped:"plyr--stopped",loading:"plyr--loading",hover:"plyr--hover",tooltip:"plyr__tooltip",cues:"plyr__cues",marker:"plyr__progress__marker",hidden:"plyr__sr-only",hideControls:"plyr--hide-controls",isTouch:"plyr--is-touch",uiSupported:"plyr--full-ui",noTransition:"plyr--no-transition",display:{time:"plyr__time"},menu:{value:"plyr__menu__value",badge:"plyr__badge",open:"plyr--menu-open"},captions:{enabled:"plyr--captions-enabled",active:"plyr--captions-active"},fullscreen:{enabled:"plyr--fullscreen-enabled",fallback:"plyr--fullscreen-fallback"},pip:{supported:"plyr--pip-supported",active:"plyr--pip-active"},airplay:{supported:"plyr--airplay-supported",active:"plyr--airplay-active"},previewThumbnails:{thumbContainer:"plyr__preview-thumb",thumbContainerShown:"plyr__preview-thumb--is-shown",imageContainer:"plyr__preview-thumb__image-container",timeContainer:"plyr__preview-thumb__time-container",scrubbingContainer:"plyr__preview-scrubbing",scrubbingContainerShown:"plyr__preview-scrubbing--is-shown"}},attributes:{embed:{provider:"data-plyr-provider",id:"data-plyr-embed-id",hash:"data-plyr-embed-hash"}},ads:{enabled:!1,publisherId:"",tagUrl:""},previewThumbnails:{enabled:!1,src:""},vimeo:{byline:!1,portrait:!1,title:!1,speed:!0,transparent:!1,customControls:!0,referrerPolicy:null,premium:!1},youtube:{rel:0,showinfo:0,iv_load_policy:3,modestbranding:1,customControls:!0,noCookie:!1},mediaMetadata:{title:"",artist:"",album:"",artwork:[]},markers:{enabled:!1,points:[]}},_o={active:"picture-in-picture",inactive:"inline"},hs={html5:"html5",youtube:"youtube",vimeo:"vimeo"},ko={audio:"audio",video:"video"};function r4(s){return/^(https?:\/\/)?(www\.)?(youtube\.com|youtube-nocookie\.com|youtu\.?be)\/.+$/.test(s)?hs.youtube:/^https?:\/\/player.vimeo.com\/video\/\d{0,9}(?=\b|\/)/.test(s)?hs.vimeo:null}const Eo=()=>{};class o4{constructor(e=!1){this.enabled=window.console&&e,this.enabled&&this.log("Debugging enabled")}get log(){return this.enabled?Function.prototype.bind.call(console.log,console):Eo}get warn(){return this.enabled?Function.prototype.bind.call(console.warn,console):Eo}get error(){return this.enabled?Function.prototype.bind.call(console.error,console):Eo}}class Ft{constructor(e){Z(this,"onChange",()=>{if(!this.supported)return;const t=this.player.elements.buttons.fullscreen;k.element(t)&&(t.pressed=this.active);const n=this.target===this.player.media?this.target:this.player.elements.container;pe.call(this.player,n,this.active?"enterfullscreen":"exitfullscreen",!0)}),Z(this,"toggleFallback",(t=!1)=>{if(t?this.scrollPosition={x:window.scrollX??0,y:window.scrollY??0}:window.scrollTo(this.scrollPosition.x,this.scrollPosition.y),document.body.style.overflow=t?"hidden":"",Ne(this.target,this.player.config.classNames.fullscreen.fallback,t),tt.isIos){let n=document.head.querySelector('meta[name="viewport"]');const i="viewport-fit=cover";n||(n=document.createElement("meta"),n.setAttribute("name","viewport"));const r=k.string(n.content)&&n.content.includes(i);t?(this.cleanupViewport=!r,r||(n.content+=`,${i}`)):this.cleanupViewport&&(n.content=n.content.split(",").filter(o=>o.trim()!==i).join(","))}this.onChange()}),Z(this,"trapFocus",t=>{if(tt.isIos||tt.isIPadOS||!this.active||t.key!=="Tab")return;const n=document.activeElement,i=kn.call(this.player,"a[href], button:not(:disabled), input:not(:disabled), [tabindex]"),[r]=i,o=i[i.length-1];n!==o||t.shiftKey?n===r&&t.shiftKey&&(o.focus(),t.preventDefault()):(r.focus(),t.preventDefault())}),Z(this,"update",()=>{if(this.supported){let t;t=this.forceFallback?"Fallback (forced)":Ft.nativeSupported?"Native":"Fallback",this.player.debug.log(`${t} fullscreen enabled`)}else this.player.debug.log("Fullscreen not supported and fallback disabled");Ne(this.player.elements.container,this.player.config.classNames.fullscreen.enabled,this.supported)}),Z(this,"enter",()=>{this.supported&&(tt.isIos&&this.player.config.fullscreen.iosNative?this.player.isVimeo?this.player.embed.requestFullscreen():this.target.webkitEnterFullscreen():!Ft.nativeSupported||this.forceFallback?this.toggleFallback(!0):this.prefix?k.empty(this.prefix)||this.target[`${this.prefix}Request${this.property}`]():this.target.requestFullscreen({navigationUI:"hide"}))}),Z(this,"exit",()=>{if(this.supported)if(tt.isIos&&this.player.config.fullscreen.iosNative)this.player.isVimeo?this.player.embed.exitFullscreen():this.target.webkitEnterFullscreen(),Jt(this.player.play());else if(!Ft.nativeSupported||this.forceFallback)this.toggleFallback(!1);else if(this.prefix){if(!k.empty(this.prefix)){const t=this.prefix==="moz"?"Cancel":"Exit";document[`${this.prefix}${t}${this.property}`]()}}else(document.cancelFullScreen||document.exitFullscreen).call(document)}),Z(this,"toggle",()=>{this.active?this.exit():this.enter()}),this.player=e,this.prefix=Ft.prefix,this.property=Ft.property,this.scrollPosition={x:0,y:0},this.forceFallback=e.config.fullscreen.fallback==="force",this.player.elements.fullscreen=e.config.fullscreen.container&&KI(this.player.elements.container,e.config.fullscreen.container),Ie.call(this.player,document,this.prefix==="ms"?"MSFullscreenChange":`${this.prefix}fullscreenchange`,()=>{this.onChange()}),Ie.call(this.player,this.player.elements.container,"dblclick",t=>{k.element(this.player.elements.controls)&&this.player.elements.controls.contains(t.target)||this.player.listeners.proxy(t,this.toggle,"fullscreen")}),Ie.call(this,this.player.elements.container,"keydown",t=>this.trapFocus(t)),this.update()}static get nativeSupported(){return!!(document.fullscreenEnabled||document.webkitFullscreenEnabled||document.mozFullScreenEnabled||document.msFullscreenEnabled)}get useNative(){return Ft.nativeSupported&&!this.forceFallback}static get prefix(){if(k.function(document.exitFullscreen))return"";let e="";return["webkit","moz","ms"].some(t=>!(!k.function(document[`${t}ExitFullscreen`])&&!k.function(document[`${t}CancelFullScreen`]))&&(e=t,!0)),e}static get property(){return this.prefix==="moz"?"FullScreen":"Fullscreen"}get supported(){return[this.player.config.fullscreen.enabled,this.player.isVideo,Ft.nativeSupported||this.player.config.fullscreen.fallback,!this.player.isYouTube||Ft.nativeSupported||!tt.isIos||this.player.config.playsinline&&!this.player.config.fullscreen.iosNative].every(Boolean)}get active(){if(!this.supported)return!1;if(!Ft.nativeSupported||this.forceFallback)return Na(this.target,this.player.config.classNames.fullscreen.fallback);const e=this.prefix?this.target.getRootNode()[`${this.prefix}${this.property}Element`]:this.target.getRootNode().fullscreenElement;return e&&e.shadowRoot?e===this.target.getRootNode().host:e===this.target}get target(){return tt.isIos&&this.player.config.fullscreen.iosNative?this.player.media:this.player.elements.fullscreen??this.player.elements.container}}function Fa(s,e=1){return new Promise((t,n)=>{const i=new Image,r=()=>{delete i.onload,delete i.onerror,(i.naturalWidth>=e?t:n)(i)};Object.assign(i,{onload:r,onerror:r,src:s})})}const Oe={addStyleHook(){Ne(this.elements.container,this.config.selectors.container.replace(".",""),!0),Ne(this.elements.container,this.config.classNames.uiSupported,this.supported.ui)},toggleNativeControls(s=!1){s&&this.isHTML5?this.media.setAttribute("controls",""):this.media.removeAttribute("controls")},build(){if(this.listeners.media(),!this.supported.ui)return this.debug.warn(`Basic support only for ${this.provider} ${this.type}`),void Oe.toggleNativeControls.call(this,!0);k.element(this.elements.controls)||(X.inject.call(this),this.listeners.controls()),Oe.toggleNativeControls.call(this),this.isHTML5&&Be.setup.call(this),this.volume=null,this.muted=null,this.loop=null,this.quality=null,this.speed=null,X.updateVolume.call(this),X.timeUpdate.call(this),X.durationUpdate.call(this),Oe.checkPlaying.call(this),Ne(this.elements.container,this.config.classNames.pip.supported,ze.pip&&this.isHTML5&&this.isVideo),Ne(this.elements.container,this.config.classNames.airplay.supported,ze.airplay&&this.isHTML5),Ne(this.elements.container,this.config.classNames.isTouch,this.touch),this.ready=!0,setTimeout(()=>{pe.call(this,this.media,"ready")},0),Oe.setTitle.call(this),this.poster&&Oe.setPoster.call(this,this.poster,!1).catch(()=>{}),this.config.duration&&X.durationUpdate.call(this),this.config.mediaMetadata&&X.setMediaMetadata.call(this)},setTitle(){let s=st.get("play",this.config);if(k.string(this.config.title)&&!k.empty(this.config.title)&&(s+=`, ${this.config.title}`),Array.from(this.elements.buttons.play||[]).forEach(e=>{e.setAttribute("aria-label",s)}),this.isEmbed){const e=Xe.call(this,"iframe");if(!k.element(e))return;const t=k.empty(this.config.title)?"video":this.config.title,n=st.get("frameTitle",this.config);e.setAttribute("title",n.replace("{title}",t))}},togglePoster(s){Ne(this.elements.container,this.config.classNames.posterEnabled,s)},setPoster(s,e=!0){return e&&this.poster?Promise.reject(new Error("Poster already set")):(this.media.setAttribute("data-poster",s),this.elements.poster.removeAttribute("hidden"),JI.call(this).then(()=>Fa(s)).catch(t=>{throw s===this.poster&&Oe.togglePoster.call(this,!1),t}).then(()=>{if(s!==this.poster)throw new Error("setPoster cancelled by later call to setPoster")}).then(()=>(Object.assign(this.elements.poster.style,{backgroundImage:`url('${s}')`,backgroundSize:""}),Oe.togglePoster.call(this,!0),s)))},checkPlaying(s){Ne(this.elements.container,this.config.classNames.playing,this.playing),Ne(this.elements.container,this.config.classNames.paused,this.paused),Ne(this.elements.container,this.config.classNames.stopped,this.stopped),Array.from(this.elements.buttons.play||[]).forEach(e=>{Object.assign(e,{pressed:this.playing}),e.setAttribute("aria-label",st.get(this.playing?"pause":"play",this.config))}),k.event(s)&&s.type==="timeupdate"||Oe.toggleControls.call(this)},checkLoading(s){this.loading=["stalled","waiting"].includes(s.type),clearTimeout(this.timers.loading),this.timers.loading=setTimeout(()=>{Ne(this.elements.container,this.config.classNames.loading,this.loading),Oe.toggleControls.call(this)},this.loading?250:0)},toggleControls(s){const{controls:e}=this.elements;if(e&&this.config.hideControls){const t=this.touch&&this.lastSeekTime+2e3>Date.now();this.toggleControls(!!(s||this.loading||this.paused||e.pressed||e.hover||t))}},migrateStyles(){Object.values({...this.media.style}).filter(s=>!k.empty(s)&&k.string(s)&&s.startsWith("--plyr")).forEach(s=>{this.elements.container.style.setProperty(s,this.media.style.getPropertyValue(s)),this.media.style.removeProperty(s)}),k.empty(this.media.style)&&this.media.removeAttribute("style")}};class l4{constructor(e){Z(this,"firstTouch",()=>{const{player:t}=this,{elements:n}=t;t.touch=!0,Ne(n.container,t.config.classNames.isTouch,!0)}),Z(this,"global",(t=!0)=>{const{player:n}=this;n.config.keyboard.global&&En.call(n,window,"keydown keyup",this.handleKey,t,!1),En.call(n,document.body,"click",this.toggleMenu,t),yo.call(n,document.body,"touchstart",this.firstTouch)}),Z(this,"container",()=>{const{player:t}=this,{config:n,elements:i,timers:r}=t;!n.keyboard.global&&n.keyboard.focused&&Ie.call(t,i.container,"keydown keyup",this.handleKey,!1),Ie.call(t,i.container,"mousemove mouseleave touchstart touchmove enterfullscreen exitfullscreen",d=>{const{controls:c}=i;c&&d.type==="enterfullscreen"&&(c.pressed=!1,c.hover=!1);let u=0;["touchstart","touchmove","mousemove"].includes(d.type)&&(Oe.toggleControls.call(t,!0),u=t.touch?3e3:2e3),clearTimeout(r.controls),r.controls=setTimeout(()=>Oe.toggleControls.call(t,!1),u)});const o=()=>{if(!t.isVimeo||t.config.vimeo.premium)return;const d=i.wrapper,{active:c}=t.fullscreen,[u,m]=wo.call(t),f=Oh(`aspect-ratio: ${u} / ${m}`);if(!c)return void(f?(d.style.width=null,d.style.height=null):(d.style.maxWidth=null,d.style.margin=null));const[p,h]=XI(),g=p/h>u/m;f?(d.style.width=g?"auto":"100%",d.style.height=g?"100%":"auto"):(d.style.maxWidth=g?h/m*u+"px":null,d.style.margin=g?"0 auto":null)},l=()=>{clearTimeout(r.resized),r.resized=setTimeout(o,50)};Ie.call(t,i.container,"enterfullscreen exitfullscreen",d=>{const{target:c}=t.fullscreen;c===i.container&&(!t.isEmbed&&k.empty(t.config.ratio)||(o(),(d.type==="enterfullscreen"?Ie:Da).call(t,window,"resize",l)))})}),Z(this,"media",()=>{const{player:t}=this,{elements:n}=t;if(Ie.call(t,t.media,"timeupdate seeking seeked",r=>X.timeUpdate.call(t,r)),Ie.call(t,t.media,"durationchange loadeddata loadedmetadata",r=>X.durationUpdate.call(t,r)),Ie.call(t,t.media,"ended",()=>{t.isHTML5&&t.isVideo&&t.config.resetOnEnd&&(t.restart(),t.pause())}),Ie.call(t,t.media,"progress playing seeking seeked",r=>X.updateProgress.call(t,r)),Ie.call(t,t.media,"volumechange",r=>X.updateVolume.call(t,r)),Ie.call(t,t.media,"playing play pause ended emptied timeupdate",r=>Oe.checkPlaying.call(t,r)),Ie.call(t,t.media,"waiting canplay seeked playing",r=>Oe.checkLoading.call(t,r)),t.supported.ui&&t.config.clickToPlay&&!t.isAudio){const r=Xe.call(t,`.${t.config.classNames.video}`);if(!k.element(r))return;Ie.call(t,n.container,"click",o=>{([n.container,r].includes(o.target)||r.contains(o.target))&&(t.touch&&t.config.hideControls||(t.ended?(this.proxy(o,t.restart,"restart"),this.proxy(o,()=>{Jt(t.play())},"play")):this.proxy(o,()=>{Jt(t.togglePlay())},"play")))})}t.supported.ui&&t.config.disableContextMenu&&Ie.call(t,n.wrapper,"contextmenu",r=>{r.preventDefault()},!1),Ie.call(t,t.media,"volumechange",()=>{t.storage.set({volume:t.volume,muted:t.muted})}),Ie.call(t,t.media,"ratechange",()=>{X.updateSetting.call(t,"speed"),t.storage.set({speed:t.speed})}),Ie.call(t,t.media,"qualitychange",r=>{X.updateSetting.call(t,"quality",null,r.detail.quality)}),Ie.call(t,t.media,"ready qualitychange",()=>{X.setDownloadUrl.call(t)});const i=t.config.events.concat(["keyup","keydown"]).join(" ");Ie.call(t,t.media,i,r=>{let{detail:o={}}=r;r.type==="error"&&(o=t.media.error),pe.call(t,n.container,r.type,!0,o)})}),Z(this,"proxy",(t,n,i)=>{const{player:r}=this,o=r.config.listeners[i];let l=!0;k.function(o)&&(l=o.call(r,t)),l!==!1&&k.function(n)&&n.call(r,t)}),Z(this,"bind",(t,n,i,r,o=!0)=>{const{player:l}=this,d=l.config.listeners[r],c=k.function(d);Ie.call(l,t,n,u=>this.proxy(u,i,r),o&&!c)}),Z(this,"controls",()=>{const{player:t}=this,{elements:n}=t,i=tt.isIE?"change":"input";if(n.buttons.play&&Array.from(n.buttons.play).forEach(r=>{this.bind(r,"click",()=>{Jt(t.togglePlay())},"play")}),this.bind(n.buttons.restart,"click",t.restart,"restart"),this.bind(n.buttons.rewind,"click",()=>{t.lastSeekTime=Date.now(),t.rewind()},"rewind"),this.bind(n.buttons.fastForward,"click",()=>{t.lastSeekTime=Date.now(),t.forward()},"fastForward"),this.bind(n.buttons.mute,"click",()=>{t.muted=!t.muted},"mute"),this.bind(n.buttons.captions,"click",()=>t.toggleCaptions()),this.bind(n.buttons.download,"click",()=>{pe.call(t,t.media,"download")},"download"),this.bind(n.buttons.fullscreen,"click",()=>{t.fullscreen.toggle()},"fullscreen"),this.bind(n.buttons.pip,"click",()=>{t.pip="toggle"},"pip"),this.bind(n.buttons.airplay,"click",t.airplay,"airplay"),this.bind(n.buttons.settings,"click",r=>{r.stopPropagation(),r.preventDefault(),X.toggleMenu.call(t,r)},null,!1),this.bind(n.buttons.settings,"keyup",r=>{[" ","Enter"].includes(r.key)&&(r.key!=="Enter"?(r.preventDefault(),r.stopPropagation(),X.toggleMenu.call(t,r)):X.focusFirstMenuItem.call(t,null,!0))},null,!1),this.bind(n.settings.menu,"keydown",r=>{r.key==="Escape"&&X.toggleMenu.call(t,r)}),this.bind(n.inputs.seek,"mousedown mousemove",r=>{const o=n.progress.getBoundingClientRect(),l=100/o.width*(r.pageX-o.left);r.currentTarget.setAttribute("seek-value",l)}),this.bind(n.inputs.seek,"mousedown mouseup keydown keyup touchstart touchend",r=>{const o=r.currentTarget,l="play-on-seeked";if(k.keyboardEvent(r)&&!["ArrowLeft","ArrowRight"].includes(r.key))return;t.lastSeekTime=Date.now();const d=o.hasAttribute(l),c=["mouseup","touchend","keyup"].includes(r.type);d&&c?(o.removeAttribute(l),Jt(t.play())):!c&&t.playing&&(o.setAttribute(l,""),t.pause())}),tt.isIos){const r=kn.call(t,'input[type="range"]');Array.from(r).forEach(o=>this.bind(o,i,l=>Bh(l.target)))}this.bind(n.inputs.seek,i,r=>{const o=r.currentTarget;let l=o.getAttribute("seek-value");k.empty(l)&&(l=o.value),o.removeAttribute("seek-value"),t.currentTime=l/o.max*t.duration},"seek"),this.bind(n.progress,"mouseenter mouseleave mousemove",r=>X.updateSeekTooltip.call(t,r)),this.bind(n.progress,"mousemove touchmove",r=>{const{previewThumbnails:o}=t;o&&o.loaded&&o.startMove(r)}),this.bind(n.progress,"mouseleave touchend click",()=>{const{previewThumbnails:r}=t;r&&r.loaded&&r.endMove(!1,!0)}),this.bind(n.progress,"mousedown touchstart",r=>{const{previewThumbnails:o}=t;o&&o.loaded&&o.startScrubbing(r)}),this.bind(n.progress,"mouseup touchend",r=>{const{previewThumbnails:o}=t;o&&o.loaded&&o.endScrubbing(r)}),tt.isWebKit&&Array.from(kn.call(t,'input[type="range"]')).forEach(r=>{this.bind(r,"input",o=>X.updateRangeFill.call(t,o.target))}),t.config.toggleInvert&&!k.element(n.display.duration)&&this.bind(n.display.currentTime,"click",()=>{t.currentTime!==0&&(t.config.invertTime=!t.config.invertTime,X.timeUpdate.call(t))}),this.bind(n.inputs.volume,i,r=>{t.volume=r.target.value},"volume"),this.bind(n.controls,"mouseenter mouseleave",r=>{n.controls.hover=!t.touch&&r.type==="mouseenter"}),n.fullscreen&&Array.from(n.fullscreen.children).filter(r=>!r.contains(n.container)).forEach(r=>{this.bind(r,"mouseenter mouseleave",o=>{n.controls&&(n.controls.hover=!t.touch&&o.type==="mouseenter")})}),this.bind(n.controls,"mousedown mouseup touchstart touchend touchcancel",r=>{n.controls.pressed=["mousedown","touchstart"].includes(r.type)}),this.bind(n.controls,"focusin",()=>{const{config:r,timers:o}=t;Ne(n.controls,r.classNames.noTransition,!0),Oe.toggleControls.call(t,!0),setTimeout(()=>{Ne(n.controls,r.classNames.noTransition,!1)},0);const l=this.touch?3e3:4e3;clearTimeout(o.controls),o.controls=setTimeout(()=>Oe.toggleControls.call(t,!1),l)}),this.bind(n.inputs.volume,"wheel",r=>{const o=r.webkitDirectionInvertedFromDevice,[l,d]=[r.deltaX,-r.deltaY].map(m=>o?-m:m),c=Math.sign(Math.abs(l)>Math.abs(d)?l:d);t.increaseVolume(c/50);const{volume:u}=t.media;(c===1&&u<1||c===-1&&u>0)&&r.preventDefault()},"volume",!1)}),this.player=e,this.lastKey=null,this.focusTimer=null,this.lastKeyDown=null,this.handleKey=this.handleKey.bind(this),this.toggleMenu=this.toggleMenu.bind(this),this.firstTouch=this.firstTouch.bind(this)}handleKey(e){const{player:t}=this,{elements:n}=t,{key:i,type:r,altKey:o,ctrlKey:l,metaKey:d,shiftKey:c}=e,u=r==="keydown",m=u&&i===this.lastKey;if(!(o||l||d||c)&&i){if(u){const p=document.activeElement;if(k.element(p)){const{editable:h}=t.config.selectors,{seek:g}=n.inputs;if(p!==g&&Ls(p,h)||e.key===" "&&Ls(p,'button, [role^="menuitem"]'))return}switch([" ","ArrowLeft","ArrowUp","ArrowRight","ArrowDown","0","1","2","3","4","5","6","7","8","9","c","f","k","l","m"].includes(i)&&(e.preventDefault(),e.stopPropagation()),i){case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":m||(f=parseInt(i,10),t.currentTime=t.duration/10*f);break;case" ":case"k":m||Jt(t.togglePlay());break;case"ArrowUp":t.increaseVolume(.1);break;case"ArrowDown":t.decreaseVolume(.1);break;case"m":m||(t.muted=!t.muted);break;case"ArrowRight":t.forward();break;case"ArrowLeft":t.rewind();break;case"f":t.fullscreen.toggle();break;case"c":m||t.toggleCaptions();break;case"l":t.loop=!t.loop}i==="Escape"&&!t.fullscreen.usingNative&&t.fullscreen.active&&t.fullscreen.toggle(),this.lastKey=i}else this.lastKey=null;var f}}toggleMenu(e){X.toggleMenu.call(this.player,e)}}function c4(s,e){return s(e={exports:{}},e.exports),e.exports}var d4=c4(function(s,e){s.exports=function(){var t=function(){},n={},i={},r={};function o(f,p){f=f.push?f:[f];var h,g,y,b=[],w=f.length,_=w;for(h=function(C,E){E.length&&b.push(C),--_||p(b)};w--;)g=f[w],(y=i[g])?h(g,y):(r[g]=r[g]||[]).push(h)}function l(f,p){if(f){var h=r[f];if(i[f]=p,h)for(;h.length;)h[0](f,p),h.splice(0,1)}}function d(f,p){f.call&&(f={success:f}),p.length?(f.error||t)(p):(f.success||t)(f)}function c(f,p,h,g){var y,b,w=document,_=h.async,C=(h.numRetries||0)+1,E=h.before||t,A=f.replace(/[\?|#].*$/,""),T=f.replace(/^(css|img)!/,"");g=g||0,/(^css!|\.css$)/.test(A)?((b=w.createElement("link")).rel="stylesheet",b.href=T,(y="hideFocus"in b)&&b.relList&&(y=0,b.rel="preload",b.as="style")):/(^img!|\.(png|gif|jpg|svg|webp)$)/.test(A)?(b=w.createElement("img")).src=T:((b=w.createElement("script")).src=f,b.async=_===void 0||_),b.onload=b.onerror=b.onbeforeload=function(R){var I=R.type[0];if(y)try{b.sheet.cssText.length||(I="e")}catch(v){v.code!=18&&(I="e")}if(I=="e"){if((g+=1)<C)return c(f,p,h,g)}else if(b.rel=="preload"&&b.as=="style")return b.rel="stylesheet";p(f,I,R.defaultPrevented)},E(f,b)!==!1&&w.head.appendChild(b)}function u(f,p,h){var g,y,b=(f=f.push?f:[f]).length,w=b,_=[];for(g=function(C,E,A){if(E=="e"&&_.push(C),E=="b"){if(!A)return;_.push(C)}--b||p(_)},y=0;y<w;y++)c(f[y],g,h)}function m(f,p,h){var g,y;if(p&&p.trim&&(g=p),y=(g?h:p)||{},g){if(g in n)throw"LoadJS";n[g]=!0}function b(w,_){u(f,function(C){d(y,C),w&&d({success:w,error:_},C),l(g,C)},y)}if(y.returnPromise)return new Promise(b);b()}return m.ready=function(f,p){return o(f,function(h){d(p,h)}),m},m.done=function(f){l(f,[])},m.reset=function(){n={},i={},r={}},m.isDefined=function(f){return f in n},m}()});function To(s){return new Promise((e,t)=>{d4(s,{success:e,error:t})})}function u4(s){return k.empty(s)?null:k.number(Number(s))?s:s.match(/^.*(vimeo.com\/|video\/)(\d+).*/)?RegExp.$2:s}function h4(s){const e=s.match(/^.*(vimeo.com\/|video\/)(\d+)(\?.*&*h=|\/)+([\d,a-f]+)/);return e&&e.length===5?e[4]:null}function An(s){s&&!this.embed.hasPlayed&&(this.embed.hasPlayed=!0),this.media.paused===s&&(this.media.paused=!s,pe.call(this,this.media,s?"play":"pause"))}const Co={setup(){const s=this;Ne(s.elements.wrapper,s.config.classNames.embed,!0),s.options.speed=s.config.speed.options,js.call(s),k.object(window.Vimeo)?Co.ready.call(s):To(s.config.urls.vimeo.sdk).then(()=>{Co.ready.call(s)}).catch(e=>{s.debug.warn("Vimeo SDK (player.js) failed to load",e)})},ready(){const s=this,e=s.config.vimeo,{premium:t,referrerPolicy:n,...i}=e;let r=s.media.getAttribute("src"),o="";k.empty(r)?(r=s.media.getAttribute(s.config.attributes.embed.id),o=s.media.getAttribute(s.config.attributes.embed.hash)):o=h4(r);const l=o?{h:o}:{};t&&Object.assign(i,{controls:!1,sidedock:!1});const d=Hh({loop:s.config.loop.active,autoplay:s.autoplay,muted:s.muted,gesture:"media",playsinline:s.config.playsinline,...l,...i}),c=u4(r),u=fe("iframe"),m=So(s.config.urls.vimeo.iframe,c,d);if(u.setAttribute("src",m),u.setAttribute("allowfullscreen",""),u.setAttribute("allow",["autoplay","fullscreen","picture-in-picture","encrypted-media","accelerometer","gyroscope"].join("; ")),k.empty(n)||u.setAttribute("referrerPolicy",n),t||!e.customControls)u.setAttribute("data-poster",s.poster),s.media=va(u,s.media);else{const w=fe("div",{class:s.config.classNames.embedContainer,"data-poster":s.poster});w.appendChild(u),s.media=va(w,s.media)}e.customControls||xn(So(s.config.urls.vimeo.api,m)).then(w=>{!k.empty(w)&&w.thumbnail_url&&Oe.setPoster.call(s,w.thumbnail_url).catch(()=>{})}),s.embed=new window.Vimeo.Player(u,{autopause:s.config.autopause,muted:s.muted}),s.media.paused=!0,s.media.currentTime=0,s.supported.ui&&s.embed.disableTextTrack(),s.media.play=()=>(An.call(s,!0),s.embed.play()),s.media.pause=()=>(An.call(s,!1),s.embed.pause()),s.media.stop=()=>{s.pause(),s.currentTime=0};let{currentTime:f}=s.media;Object.defineProperty(s.media,"currentTime",{get:()=>f,set(w){const{embed:_,media:C,paused:E,volume:A}=s,T=E&&!_.hasPlayed;C.seeking=!0,pe.call(s,C,"seeking"),Promise.resolve(T&&_.setVolume(0)).then(()=>_.setCurrentTime(w)).then(()=>T&&_.pause()).then(()=>T&&_.setVolume(A)).catch(()=>{})}});let p=s.config.speed.selected;Object.defineProperty(s.media,"playbackRate",{get:()=>p,set(w){s.embed.setPlaybackRate(w).then(()=>{p=w,pe.call(s,s.media,"ratechange")}).catch(()=>{s.options.speed=[1]})}});let{volume:h}=s.config;Object.defineProperty(s.media,"volume",{get:()=>h,set(w){s.embed.setVolume(w).then(()=>{h=w,pe.call(s,s.media,"volumechange")})}});let{muted:g}=s.config;Object.defineProperty(s.media,"muted",{get:()=>g,set(w){const _=!!k.boolean(w)&&w;s.embed.setMuted(!!_||s.config.muted).then(()=>{g=_,pe.call(s,s.media,"volumechange")})}});let y,{loop:b}=s.config;Object.defineProperty(s.media,"loop",{get:()=>b,set(w){const _=k.boolean(w)?w:s.config.loop.active;s.embed.setLoop(_).then(()=>{b=_})}}),s.embed.getVideoUrl().then(w=>{y=w,X.setDownloadUrl.call(s)}).catch(w=>{this.debug.warn(w)}),Object.defineProperty(s.media,"currentSrc",{get:()=>y}),Object.defineProperty(s.media,"ended",{get:()=>s.currentTime===s.duration}),Promise.all([s.embed.getVideoWidth(),s.embed.getVideoHeight()]).then(w=>{const[_,C]=w;s.embed.ratio=Vh(_,C),js.call(this)}),s.embed.setAutopause(s.config.autopause).then(w=>{s.config.autopause=w}),s.embed.getVideoTitle().then(w=>{s.config.title=w,Oe.setTitle.call(this)}),s.embed.getCurrentTime().then(w=>{f=w,pe.call(s,s.media,"timeupdate")}),s.embed.getDuration().then(w=>{s.media.duration=w,pe.call(s,s.media,"durationchange")}),s.embed.getTextTracks().then(w=>{s.media.textTracks=w,Be.setup.call(s)}),s.embed.on("cuechange",({cues:w=[]})=>{const _=w.map(C=>s4(C.text));Be.updateCues.call(s,_)}),s.embed.on("loaded",()=>{s.embed.getPaused().then(w=>{An.call(s,!w),w||pe.call(s,s.media,"playing")}),k.element(s.embed.element)&&s.supported.ui&&s.embed.element.setAttribute("tabindex",-1)}),s.embed.on("bufferstart",()=>{pe.call(s,s.media,"waiting")}),s.embed.on("bufferend",()=>{pe.call(s,s.media,"playing")}),s.embed.on("play",()=>{An.call(s,!0),pe.call(s,s.media,"playing")}),s.embed.on("pause",()=>{An.call(s,!1)}),s.embed.on("timeupdate",w=>{s.media.seeking=!1,f=w.seconds,pe.call(s,s.media,"timeupdate")}),s.embed.on("progress",w=>{s.media.buffered=w.percent,pe.call(s,s.media,"progress"),parseInt(w.percent,10)===1&&pe.call(s,s.media,"canplaythrough"),s.embed.getDuration().then(_=>{_!==s.media.duration&&(s.media.duration=_,pe.call(s,s.media,"durationchange"))})}),s.embed.on("seeked",()=>{s.media.seeking=!1,pe.call(s,s.media,"seeked")}),s.embed.on("ended",()=>{s.media.paused=!0,pe.call(s,s.media,"ended")}),s.embed.on("error",w=>{s.media.error=w,pe.call(s,s.media,"error")}),e.customControls&&setTimeout(()=>Oe.build.call(s),0)}};function m4(s){return k.empty(s)?null:s.match(/^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|&v=)([^#&?]*).*/)?RegExp.$2:s}function Ln(s){s&&!this.embed.hasPlayed&&(this.embed.hasPlayed=!0),this.media.paused===s&&(this.media.paused=!s,pe.call(this,this.media,s?"play":"pause"))}function f4(s){return s.noCookie?"https://www.youtube-nocookie.com":window.location.protocol==="http:"?"http://www.youtube.com":void 0}const Ma={setup(){if(Ne(this.elements.wrapper,this.config.classNames.embed,!0),k.object(window.YT)&&k.function(window.YT.Player))Ma.ready.call(this);else{const s=window.onYouTubeIframeAPIReady;window.onYouTubeIframeAPIReady=()=>{k.function(s)&&s(),Ma.ready.call(this)},To(this.config.urls.youtube.sdk).catch(e=>{this.debug.warn("YouTube API failed to load",e)})}},getTitle(s){xn(So(this.config.urls.youtube.api,s)).then(e=>{if(k.object(e)){const{title:t,height:n,width:i}=e;this.config.title=t,Oe.setTitle.call(this),this.embed.ratio=Vh(i,n)}js.call(this)}).catch(()=>{js.call(this)})},ready(){const s=this,e=s.config.youtube,t=s.media&&s.media.getAttribute("id");if(!k.empty(t)&&t.startsWith("youtube-"))return;let n=s.media.getAttribute("src");k.empty(n)&&(n=s.media.getAttribute(this.config.attributes.embed.id));const i=m4(n),r=fe("div",{id:ZI(s.provider),"data-poster":e.customControls?s.poster:void 0});if(s.media=va(r,s.media),e.customControls){const o=l=>`https://i.ytimg.com/vi/${i}/${l}default.jpg`;Fa(o("maxres"),121).catch(()=>Fa(o("sd"),121)).catch(()=>Fa(o("hq"))).then(l=>Oe.setPoster.call(s,l.src)).then(l=>{l.includes("maxres")||(s.elements.poster.style.backgroundSize="cover")}).catch(()=>{})}s.embed=new window.YT.Player(s.media,{videoId:i,host:f4(e),playerVars:Ue({},{autoplay:s.config.autoplay?1:0,hl:s.config.hl,controls:s.supported.ui&&e.customControls?0:1,disablekb:1,playsinline:s.config.playsinline&&!s.config.fullscreen.iosNative?1:0,cc_load_policy:s.captions.active?1:0,cc_lang_pref:s.config.captions.language,widget_referrer:window?window.location.href:null},e),events:{onError(o){if(!s.media.error){const l=o.data,d={2:"The request contains an invalid parameter value. For example, this error occurs if you specify a video ID that does not have 11 characters, or if the video ID contains invalid characters, such as exclamation points or asterisks.",5:"The requested content cannot be played in an HTML5 player or another error related to the HTML5 player has occurred.",100:"The video requested was not found. This error occurs when a video has been removed (for any reason) or has been marked as private.",101:"The owner of the requested video does not allow it to be played in embedded players.",150:"The owner of the requested video does not allow it to be played in embedded players."}[l]||"An unknown error occurred";s.media.error={code:l,message:d},pe.call(s,s.media,"error")}},onPlaybackRateChange(o){const l=o.target;s.media.playbackRate=l.getPlaybackRate(),pe.call(s,s.media,"ratechange")},onReady(o){if(k.function(s.media.play))return;const l=o.target;Ma.getTitle.call(s,i),s.media.play=()=>{Ln.call(s,!0),l.playVideo()},s.media.pause=()=>{Ln.call(s,!1),l.pauseVideo()},s.media.stop=()=>{l.stopVideo()},s.media.duration=l.getDuration(),s.media.paused=!0,s.media.currentTime=0,Object.defineProperty(s.media,"currentTime",{get:()=>Number(l.getCurrentTime()),set(m){s.paused&&!s.embed.hasPlayed&&s.embed.mute(),s.media.seeking=!0,pe.call(s,s.media,"seeking"),l.seekTo(m)}}),Object.defineProperty(s.media,"playbackRate",{get:()=>l.getPlaybackRate(),set(m){l.setPlaybackRate(m)}});let{volume:d}=s.config;Object.defineProperty(s.media,"volume",{get:()=>d,set(m){d=m,l.setVolume(100*d),pe.call(s,s.media,"volumechange")}});let{muted:c}=s.config;Object.defineProperty(s.media,"muted",{get:()=>c,set(m){const f=k.boolean(m)?m:c;c=f,l[f?"mute":"unMute"](),l.setVolume(100*d),pe.call(s,s.media,"volumechange")}}),Object.defineProperty(s.media,"currentSrc",{get:()=>l.getVideoUrl()}),Object.defineProperty(s.media,"ended",{get:()=>s.currentTime===s.duration});const u=l.getAvailablePlaybackRates();s.options.speed=u.filter(m=>s.config.speed.options.includes(m)),s.supported.ui&&e.customControls&&s.media.setAttribute("tabindex",-1),pe.call(s,s.media,"timeupdate"),pe.call(s,s.media,"durationchange"),clearInterval(s.timers.buffering),s.timers.buffering=setInterval(()=>{s.media.buffered=l.getVideoLoadedFraction(),(s.media.lastBuffered===null||s.media.lastBuffered<s.media.buffered)&&pe.call(s,s.media,"progress"),s.media.lastBuffered=s.media.buffered,s.media.buffered===1&&(clearInterval(s.timers.buffering),pe.call(s,s.media,"canplaythrough"))},200),e.customControls&&setTimeout(()=>Oe.build.call(s),50)},onStateChange(o){const l=o.target;switch(clearInterval(s.timers.playing),s.media.seeking&&[1,2].includes(o.data)&&(s.media.seeking=!1,pe.call(s,s.media,"seeked")),o.data){case-1:pe.call(s,s.media,"timeupdate"),s.media.buffered=l.getVideoLoadedFraction(),pe.call(s,s.media,"progress");break;case 0:Ln.call(s,!1),s.media.loop?(l.stopVideo(),l.playVideo()):pe.call(s,s.media,"ended");break;case 1:e.customControls&&!s.config.autoplay&&s.media.paused&&!s.embed.hasPlayed?s.media.pause():(Ln.call(s,!0),pe.call(s,s.media,"playing"),s.timers.playing=setInterval(()=>{pe.call(s,s.media,"timeupdate")},50),s.media.duration!==l.getDuration()&&(s.media.duration=l.getDuration(),pe.call(s,s.media,"durationchange")));break;case 2:s.muted||s.embed.unMute(),Ln.call(s,!1);break;case 3:pe.call(s,s.media,"waiting")}pe.call(s,s.elements.container,"statechange",!1,{code:o.data})}}})}},Kh={setup(){this.media?(Ne(this.elements.container,this.config.classNames.type.replace("{0}",this.type),!0),Ne(this.elements.container,this.config.classNames.provider.replace("{0}",this.provider),!0),this.isEmbed&&Ne(this.elements.container,this.config.classNames.type.replace("{0}","video"),!0),this.isVideo&&(this.elements.wrapper=fe("div",{class:this.config.classNames.video}),vh(this.media,this.elements.wrapper),this.elements.poster=fe("div",{class:this.config.classNames.poster}),this.elements.wrapper.appendChild(this.elements.poster)),this.isHTML5?us.setup.call(this):this.isYouTube?Ma.setup.call(this):this.isVimeo&&Co.setup.call(this)):this.debug.warn("No media element found!")}};class g4{constructor(e){Z(this,"load",()=>{this.enabled&&(k.object(window.google)&&k.object(window.google.ima)?this.ready():To(this.player.config.urls.googleIMA.sdk).then(()=>{this.ready()}).catch(()=>{this.trigger("error",new Error("Google IMA SDK failed to load"))}))}),Z(this,"ready",()=>{var t;this.enabled||((t=this).manager&&t.manager.destroy(),t.elements.displayContainer&&t.elements.displayContainer.destroy(),t.elements.container.remove()),this.startSafetyTimer(12e3,"ready()"),this.managerPromise.then(()=>{this.clearSafetyTimer("onAdsManagerLoaded()")}),this.listeners(),this.setupIMA()}),Z(this,"setupIMA",()=>{this.elements.container=fe("div",{class:this.player.config.classNames.ads}),this.player.elements.container.appendChild(this.elements.container),google.ima.settings.setVpaidMode(google.ima.ImaSdkSettings.VpaidMode.ENABLED),google.ima.settings.setLocale(this.player.config.ads.language),google.ima.settings.setDisableCustomPlaybackForIOS10Plus(this.player.config.playsinline),this.elements.displayContainer=new google.ima.AdDisplayContainer(this.elements.container,this.player.media),this.loader=new google.ima.AdsLoader(this.elements.displayContainer),this.loader.addEventListener(google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,t=>this.onAdsManagerLoaded(t),!1),this.loader.addEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,t=>this.onAdError(t),!1),this.requestAds()}),Z(this,"requestAds",()=>{const{container:t}=this.player.elements;try{const n=new google.ima.AdsRequest;n.adTagUrl=this.tagUrl,n.linearAdSlotWidth=t.offsetWidth,n.linearAdSlotHeight=t.offsetHeight,n.nonLinearAdSlotWidth=t.offsetWidth,n.nonLinearAdSlotHeight=t.offsetHeight,n.forceNonLinearFullSlot=!1,n.setAdWillPlayMuted(!this.player.muted),this.loader.requestAds(n)}catch(n){this.onAdError(n)}}),Z(this,"pollCountdown",(t=!1)=>{if(!t)return clearInterval(this.countdownTimer),void this.elements.container.removeAttribute("data-badge-text");this.countdownTimer=setInterval(()=>{const n=Oa(Math.max(this.manager.getRemainingTime(),0)),i=`${st.get("advertisement",this.player.config)} - ${n}`;this.elements.container.setAttribute("data-badge-text",i)},100)}),Z(this,"onAdsManagerLoaded",t=>{if(!this.enabled)return;const n=new google.ima.AdsRenderingSettings;n.restoreCustomPlaybackStateOnAdBreakComplete=!0,n.enablePreloading=!0,this.manager=t.getAdsManager(this.player,n),this.cuePoints=this.manager.getCuePoints(),this.manager.addEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,i=>this.onAdError(i)),Object.keys(google.ima.AdEvent.Type).forEach(i=>{this.manager.addEventListener(google.ima.AdEvent.Type[i],r=>this.onAdEvent(r))}),this.trigger("loaded")}),Z(this,"addCuePoints",()=>{k.empty(this.cuePoints)||this.cuePoints.forEach(t=>{if(t!==0&&t!==-1&&t<this.player.duration){const n=this.player.elements.progress;if(k.element(n)){const i=100/this.player.duration*t,r=fe("span",{class:this.player.config.classNames.cues});r.style.left=`${i.toString()}%`,n.appendChild(r)}}})}),Z(this,"onAdEvent",t=>{const{container:n}=this.player.elements,i=t.getAd(),r=t.getAdData();switch((o=>{pe.call(this.player,this.player.media,`ads${o.replace(/_/g,"").toLowerCase()}`)})(t.type),t.type){case google.ima.AdEvent.Type.LOADED:this.trigger("loaded"),this.pollCountdown(!0),i.isLinear()||(i.width=n.offsetWidth,i.height=n.offsetHeight);break;case google.ima.AdEvent.Type.STARTED:this.manager.setVolume(this.player.volume);break;case google.ima.AdEvent.Type.ALL_ADS_COMPLETED:this.player.ended?this.loadAds():this.loader.contentComplete();break;case google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED:this.pauseContent();break;case google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED:this.pollCountdown(),this.resumeContent();break;case google.ima.AdEvent.Type.LOG:r.adError&&this.player.debug.warn(`Non-fatal ad error: ${r.adError.getMessage()}`)}}),Z(this,"onAdError",t=>{this.cancel(),this.player.debug.warn("Ads error",t)}),Z(this,"listeners",()=>{const{container:t}=this.player.elements;let n;this.player.on("canplay",()=>{this.addCuePoints()}),this.player.on("ended",()=>{this.loader.contentComplete()}),this.player.on("timeupdate",()=>{n=this.player.currentTime}),this.player.on("seeked",()=>{const i=this.player.currentTime;k.empty(this.cuePoints)||this.cuePoints.forEach((r,o)=>{n<r&&r<i&&(this.manager.discardAdBreak(),this.cuePoints.splice(o,1))})}),window.addEventListener("resize",()=>{this.manager&&this.manager.resize(t.offsetWidth,t.offsetHeight,google.ima.ViewMode.NORMAL)})}),Z(this,"play",()=>{const{container:t}=this.player.elements;this.managerPromise||this.resumeContent(),this.managerPromise.then(()=>{this.manager.setVolume(this.player.volume),this.elements.displayContainer.initialize();try{this.initialized||(this.manager.init(t.offsetWidth,t.offsetHeight,google.ima.ViewMode.NORMAL),this.manager.start()),this.initialized=!0}catch(n){this.onAdError(n)}}).catch(()=>{})}),Z(this,"resumeContent",()=>{this.elements.container.style.zIndex="",this.playing=!1,Jt(this.player.media.play())}),Z(this,"pauseContent",()=>{this.elements.container.style.zIndex=3,this.playing=!0,this.player.media.pause()}),Z(this,"cancel",()=>{this.initialized&&this.resumeContent(),this.trigger("error"),this.loadAds()}),Z(this,"loadAds",()=>{this.managerPromise.then(()=>{this.manager&&this.manager.destroy(),this.managerPromise=new Promise(t=>{this.on("loaded",t),this.player.debug.log(this.manager)}),this.initialized=!1,this.requestAds()}).catch(()=>{})}),Z(this,"trigger",(t,...n)=>{const i=this.events[t];k.array(i)&&i.forEach(r=>{k.function(r)&&r.apply(this,n)})}),Z(this,"on",(t,n)=>(k.array(this.events[t])||(this.events[t]=[]),this.events[t].push(n),this)),Z(this,"startSafetyTimer",(t,n)=>{this.player.debug.log(`Safety timer invoked from: ${n}`),this.safetyTimer=setTimeout(()=>{this.cancel(),this.clearSafetyTimer("startSafetyTimer()")},t)}),Z(this,"clearSafetyTimer",t=>{k.nullOrUndefined(this.safetyTimer)||(this.player.debug.log(`Safety timer cleared from: ${t}`),clearTimeout(this.safetyTimer),this.safetyTimer=null)}),this.player=e,this.config=e.config.ads,this.playing=!1,this.initialized=!1,this.elements={container:null,displayContainer:null},this.manager=null,this.loader=null,this.cuePoints=null,this.events={},this.safetyTimer=null,this.countdownTimer=null,this.managerPromise=new Promise((t,n)=>{this.on("loaded",t),this.on("error",n)}),this.load()}get enabled(){const{config:e}=this;return this.player.isHTML5&&this.player.isVideo&&e.enabled&&(!k.empty(e.publisherId)||k.url(e.tagUrl))}get tagUrl(){const{config:e}=this;return k.url(e.tagUrl)?e.tagUrl:`https://go.aniview.com/api/adserver6/vast/?${Hh({AV_PUBLISHERID:"58c25bb0073ef448b1087ad6",AV_CHANNELID:"5a0458dc28a06145e4519d21",AV_URL:window.location.hostname,cb:Date.now(),AV_WIDTH:640,AV_HEIGHT:480,AV_CDIM2:e.publisherId})}`}}function qh(s=0,e=0,t=255){return Math.min(Math.max(s,e),t)}const p4=s=>{const e=[];return s.split(/\r\n\r\n|\n\n|\r\r/).forEach(t=>{const n={};t.split(/\r\n|\n|\r/).forEach(i=>{if(k.number(n.startTime)){if(!k.empty(i.trim())&&k.empty(n.text)){const r=i.trim().split("#xywh=");[n.text]=r,r[1]&&([n.x,n.y,n.w,n.h]=r[1].split(","))}}else{const r=i.match(/([0-9]{2})?:?([0-9]{2}):([0-9]{2}).([0-9]{2,3})( ?--> ?)([0-9]{2})?:?([0-9]{2}):([0-9]{2}).([0-9]{2,3})/);r&&(n.startTime=60*Number(r[1]||0)*60+60*Number(r[2])+Number(r[3])+ +`0.${r[4]}`,n.endTime=60*Number(r[6]||0)*60+60*Number(r[7])+Number(r[8])+ +`0.${r[9]}`)}}),n.text&&e.push(n)}),e},Yh=(s,e)=>{const t={};return s>e.width/e.height?(t.width=e.width,t.height=1/s*e.width):(t.height=e.height,t.width=s*e.height),t};class xo{constructor(e){Z(this,"load",()=>{this.player.elements.display.seekTooltip&&(this.player.elements.display.seekTooltip.hidden=this.enabled),this.enabled&&this.getThumbnails().then(()=>{this.enabled&&(this.render(),this.determineContainerAutoSizing(),this.listeners(),this.loaded=!0)})}),Z(this,"getThumbnails",()=>new Promise(t=>{const{src:n}=this.player.config.previewThumbnails;if(k.empty(n))throw new Error("Missing previewThumbnails.src config attribute");const i=()=>{this.thumbnails.sort((r,o)=>r.height-o.height),this.player.debug.log("Preview thumbnails",this.thumbnails),t()};if(k.function(n))n(r=>{this.thumbnails=r,i()});else{const r=(k.string(n)?[n]:n).map(o=>this.getThumbnail(o));Promise.all(r).then(i)}})),Z(this,"getThumbnail",t=>new Promise(n=>{xn(t).then(i=>{const r={frames:p4(i),height:null,urlPrefix:""};r.frames[0].text.startsWith("/")||r.frames[0].text.startsWith("http://")||r.frames[0].text.startsWith("https://")||(r.urlPrefix=t.substring(0,t.lastIndexOf("/")+1));const o=new Image;o.onload=()=>{r.height=o.naturalHeight,r.width=o.naturalWidth,this.thumbnails.push(r),n()},o.src=r.urlPrefix+r.frames[0].text})})),Z(this,"startMove",t=>{if(this.loaded&&k.event(t)&&["touchmove","mousemove"].includes(t.type)&&this.player.media.duration){if(t.type==="touchmove")this.seekTime=this.player.media.duration*(this.player.elements.inputs.seek.value/100);else{var n,i;const r=this.player.elements.progress.getBoundingClientRect(),o=100/r.width*(t.pageX-r.left);this.seekTime=this.player.media.duration*(o/100),this.seekTime<0&&(this.seekTime=0),this.seekTime>this.player.media.duration-1&&(this.seekTime=this.player.media.duration-1),this.mousePosX=t.pageX,this.elements.thumb.time.innerText=Oa(this.seekTime);const l=(n=this.player.config.markers)===null||n===void 0||(i=n.points)===null||i===void 0?void 0:i.find(({time:d})=>d===Math.round(this.seekTime));l&&this.elements.thumb.time.insertAdjacentHTML("afterbegin",`${l.label}<br>`)}this.showImageAtCurrentTime()}}),Z(this,"endMove",()=>{this.toggleThumbContainer(!1,!0)}),Z(this,"startScrubbing",t=>{(k.nullOrUndefined(t.button)||t.button===!1||t.button===0)&&(this.mouseDown=!0,this.player.media.duration&&(this.toggleScrubbingContainer(!0),this.toggleThumbContainer(!1,!0),this.showImageAtCurrentTime()))}),Z(this,"endScrubbing",()=>{this.mouseDown=!1,Math.ceil(this.lastTime)===Math.ceil(this.player.media.currentTime)?this.toggleScrubbingContainer(!1):yo.call(this.player,this.player.media,"timeupdate",()=>{this.mouseDown||this.toggleScrubbingContainer(!1)})}),Z(this,"listeners",()=>{this.player.on("play",()=>{this.toggleThumbContainer(!1,!0)}),this.player.on("seeked",()=>{this.toggleThumbContainer(!1)}),this.player.on("timeupdate",()=>{this.lastTime=this.player.media.currentTime})}),Z(this,"render",()=>{this.elements.thumb.container=fe("div",{class:this.player.config.classNames.previewThumbnails.thumbContainer}),this.elements.thumb.imageContainer=fe("div",{class:this.player.config.classNames.previewThumbnails.imageContainer}),this.elements.thumb.container.appendChild(this.elements.thumb.imageContainer);const t=fe("div",{class:this.player.config.classNames.previewThumbnails.timeContainer});this.elements.thumb.time=fe("span",{},"00:00"),t.appendChild(this.elements.thumb.time),this.elements.thumb.imageContainer.appendChild(t),k.element(this.player.elements.progress)&&this.player.elements.progress.appendChild(this.elements.thumb.container),this.elements.scrubbing.container=fe("div",{class:this.player.config.classNames.previewThumbnails.scrubbingContainer}),this.player.elements.wrapper.appendChild(this.elements.scrubbing.container)}),Z(this,"destroy",()=>{this.elements.thumb.container&&this.elements.thumb.container.remove(),this.elements.scrubbing.container&&this.elements.scrubbing.container.remove()}),Z(this,"showImageAtCurrentTime",()=>{this.mouseDown?this.setScrubbingContainerSize():this.setThumbContainerSizeAndPos();const t=this.thumbnails[0].frames.findIndex(r=>this.seekTime>=r.startTime&&this.seekTime<=r.endTime),n=t>=0;let i=0;this.mouseDown||this.toggleThumbContainer(n),n&&(this.thumbnails.forEach((r,o)=>{this.loadedImages.includes(r.frames[t].text)&&(i=o)}),t!==this.showingThumb&&(this.showingThumb=t,this.loadImage(i)))}),Z(this,"loadImage",(t=0)=>{const n=this.showingThumb,i=this.thumbnails[t],{urlPrefix:r}=i,o=i.frames[n],l=i.frames[n].text,d=r+l;if(this.currentImageElement&&this.currentImageElement.dataset.filename===l)this.showImage(this.currentImageElement,o,t,n,l,!1),this.currentImageElement.dataset.index=n,this.removeOldImages(this.currentImageElement);else{this.loadingImage&&this.usingSprites&&(this.loadingImage.onload=null);const c=new Image;c.src=d,c.dataset.index=n,c.dataset.filename=l,this.showingThumbFilename=l,this.player.debug.log(`Loading image: ${d}`),c.onload=()=>this.showImage(c,o,t,n,l,!0),this.loadingImage=c,this.removeOldImages(c)}}),Z(this,"showImage",(t,n,i,r,o,l=!0)=>{this.player.debug.log(`Showing thumb: ${o}. num: ${r}. qual: ${i}. newimg: ${l}`),this.setImageSizeAndOffset(t,n),l&&(this.currentImageContainer.appendChild(t),this.currentImageElement=t,this.loadedImages.includes(o)||this.loadedImages.push(o)),this.preloadNearby(r,!0).then(this.preloadNearby(r,!1)).then(this.getHigherQuality(i,t,n,o))}),Z(this,"removeOldImages",t=>{Array.from(this.currentImageContainer.children).forEach(n=>{if(n.tagName.toLowerCase()!=="img")return;const i=this.usingSprites?500:1e3;if(n.dataset.index!==t.dataset.index&&!n.dataset.deleting){n.dataset.deleting=!0;const{currentImageContainer:r}=this;setTimeout(()=>{r.removeChild(n),this.player.debug.log(`Removing thumb: ${n.dataset.filename}`)},i)}})}),Z(this,"preloadNearby",(t,n=!0)=>new Promise(i=>{setTimeout(()=>{const r=this.thumbnails[0].frames[t].text;if(this.showingThumbFilename===r){let o;o=n?this.thumbnails[0].frames.slice(t):this.thumbnails[0].frames.slice(0,t).reverse();let l=!1;o.forEach(d=>{const c=d.text;if(c!==r&&!this.loadedImages.includes(c)){l=!0,this.player.debug.log(`Preloading thumb filename: ${c}`);const{urlPrefix:u}=this.thumbnails[0],m=u+c,f=new Image;f.src=m,f.onload=()=>{this.player.debug.log(`Preloaded thumb filename: ${c}`),this.loadedImages.includes(c)||this.loadedImages.push(c),i()}}}),l||i()}},300)})),Z(this,"getHigherQuality",(t,n,i,r)=>{if(t<this.thumbnails.length-1){let o=n.naturalHeight;this.usingSprites&&(o=i.h),o<this.thumbContainerHeight&&setTimeout(()=>{this.showingThumbFilename===r&&(this.player.debug.log(`Showing higher quality thumb for: ${r}`),this.loadImage(t+1))},300)}}),Z(this,"toggleThumbContainer",(t=!1,n=!1)=>{const i=this.player.config.classNames.previewThumbnails.thumbContainerShown;this.elements.thumb.container.classList.toggle(i,t),!t&&n&&(this.showingThumb=null,this.showingThumbFilename=null)}),Z(this,"toggleScrubbingContainer",(t=!1)=>{const n=this.player.config.classNames.previewThumbnails.scrubbingContainerShown;this.elements.scrubbing.container.classList.toggle(n,t),t||(this.showingThumb=null,this.showingThumbFilename=null)}),Z(this,"determineContainerAutoSizing",()=>{(this.elements.thumb.imageContainer.clientHeight>20||this.elements.thumb.imageContainer.clientWidth>20)&&(this.sizeSpecifiedInCSS=!0)}),Z(this,"setThumbContainerSizeAndPos",()=>{const{imageContainer:t}=this.elements.thumb;if(this.sizeSpecifiedInCSS){if(t.clientHeight>20&&t.clientWidth<20){const n=Math.floor(t.clientHeight*this.thumbAspectRatio);t.style.width=`${n}px`}else if(t.clientHeight<20&&t.clientWidth>20){const n=Math.floor(t.clientWidth/this.thumbAspectRatio);t.style.height=`${n}px`}}else{const n=Math.floor(this.thumbContainerHeight*this.thumbAspectRatio);t.style.height=`${this.thumbContainerHeight}px`,t.style.width=`${n}px`}this.setThumbContainerPos()}),Z(this,"setThumbContainerPos",()=>{const t=this.player.elements.progress.getBoundingClientRect(),n=this.player.elements.container.getBoundingClientRect(),{container:i}=this.elements.thumb,r=n.left-t.left+10,o=n.right-t.left-i.clientWidth-10,l=this.mousePosX-t.left-i.clientWidth/2,d=qh(l,r,o);i.style.left=`${d}px`,i.style.setProperty("--preview-arrow-offset",l-d+"px")}),Z(this,"setScrubbingContainerSize",()=>{const{width:t,height:n}=Yh(this.thumbAspectRatio,{width:this.player.media.clientWidth,height:this.player.media.clientHeight});this.elements.scrubbing.container.style.width=`${t}px`,this.elements.scrubbing.container.style.height=`${n}px`}),Z(this,"setImageSizeAndOffset",(t,n)=>{if(!this.usingSprites)return;const i=this.thumbContainerHeight/n.h;t.style.height=t.naturalHeight*i+"px",t.style.width=t.naturalWidth*i+"px",t.style.left=`-${n.x*i}px`,t.style.top=`-${n.y*i}px`}),this.player=e,this.thumbnails=[],this.loaded=!1,this.lastMouseMoveTime=Date.now(),this.mouseDown=!1,this.loadedImages=[],this.elements={thumb:{},scrubbing:{}},this.load()}get enabled(){return this.player.isHTML5&&this.player.isVideo&&this.player.config.previewThumbnails.enabled}get currentImageContainer(){return this.mouseDown?this.elements.scrubbing.container:this.elements.thumb.imageContainer}get usingSprites(){return Object.keys(this.thumbnails[0].frames[0]).includes("w")}get thumbAspectRatio(){return this.usingSprites?this.thumbnails[0].frames[0].w/this.thumbnails[0].frames[0].h:this.thumbnails[0].width/this.thumbnails[0].height}get thumbContainerHeight(){if(this.mouseDown){const{height:e}=Yh(this.thumbAspectRatio,{width:this.player.media.clientWidth,height:this.player.media.clientHeight});return e}return this.sizeSpecifiedInCSS?this.elements.thumb.imageContainer.clientHeight:Math.floor(this.player.media.clientWidth/this.thumbAspectRatio/4)}get currentImageElement(){return this.mouseDown?this.currentScrubbingImageElement:this.currentThumbnailImageElement}set currentImageElement(e){this.mouseDown?this.currentScrubbingImageElement=e:this.currentThumbnailImageElement=e}}const Ao={insertElements(s,e){k.string(e)?Nh(s,this.media,{src:e}):k.array(e)&&e.forEach(t=>{Nh(s,this.media,t)})},change(s){Rh(s,"sources.length")?(us.cancelRequests.call(this),this.destroy.call(this,()=>{this.options.quality=[],rs(this.media),this.media=null,k.element(this.elements.container)&&this.elements.container.removeAttribute("class");const{sources:e,type:t}=s,[{provider:n=hs.html5,src:i}]=e,r=n==="html5"?t:"div",o=n==="html5"?{}:{src:i};Object.assign(this,{provider:n,type:t,supported:ze.check(t,n,this.config.playsinline),media:fe(r,o)}),this.elements.container.appendChild(this.media),k.boolean(s.autoplay)&&(this.config.autoplay=s.autoplay),this.isHTML5&&(this.config.crossorigin&&this.media.setAttribute("crossorigin",""),this.config.autoplay&&this.media.setAttribute("autoplay",""),k.empty(s.poster)||(this.poster=s.poster),this.config.loop.active&&this.media.setAttribute("loop",""),this.config.muted&&this.media.setAttribute("muted",""),this.config.playsinline&&this.media.setAttribute("playsinline","")),Oe.addStyleHook.call(this),this.isHTML5&&Ao.insertElements.call(this,"source",e),this.config.title=s.title,Kh.setup.call(this),this.isHTML5&&Object.keys(s).includes("tracks")&&Ao.insertElements.call(this,"track",s.tracks),(this.isHTML5||this.isEmbed&&!this.supported.ui)&&Oe.build.call(this),this.isHTML5&&this.media.load(),k.empty(s.previewThumbnails)||(Object.assign(this.config.previewThumbnails,s.previewThumbnails),this.previewThumbnails&&this.previewThumbnails.loaded&&(this.previewThumbnails.destroy(),this.previewThumbnails=null),this.config.previewThumbnails.enabled&&(this.previewThumbnails=new xo(this))),this.fullscreen.update()},!0)):this.debug.warn("Invalid source format")}};class Hs{constructor(e,t){if(Z(this,"play",()=>k.function(this.media.play)?(this.ads&&this.ads.enabled&&this.ads.managerPromise.then(()=>this.ads.play()).catch(()=>Jt(this.media.play())),this.media.play()):null),Z(this,"pause",()=>this.playing&&k.function(this.media.pause)?this.media.pause():null),Z(this,"togglePlay",l=>(k.boolean(l)?l:!this.playing)?this.play():this.pause()),Z(this,"stop",()=>{this.isHTML5?(this.pause(),this.restart()):k.function(this.media.stop)&&this.media.stop()}),Z(this,"restart",()=>{this.currentTime=0}),Z(this,"rewind",l=>{this.currentTime-=k.number(l)?l:this.config.seekTime}),Z(this,"forward",l=>{this.currentTime+=k.number(l)?l:this.config.seekTime}),Z(this,"increaseVolume",l=>{const d=this.media.muted?0:this.volume;this.volume=d+(k.number(l)?l:0)}),Z(this,"decreaseVolume",l=>{this.increaseVolume(-l)}),Z(this,"airplay",()=>{ze.airplay&&this.media.webkitShowPlaybackTargetPicker()}),Z(this,"toggleControls",l=>{if(this.supported.ui&&!this.isAudio){const d=Na(this.elements.container,this.config.classNames.hideControls),c=l===void 0?void 0:!l,u=Ne(this.elements.container,this.config.classNames.hideControls,c);if(u&&k.array(this.config.controls)&&this.config.controls.includes("settings")&&!k.empty(this.config.settings)&&X.toggleMenu.call(this,!1),u!==d){const m=u?"controlshidden":"controlsshown";pe.call(this,this.media,m)}return!u}return!1}),Z(this,"on",(l,d)=>{Ie.call(this,this.elements.container,l,d)}),Z(this,"once",(l,d)=>{yo.call(this,this.elements.container,l,d)}),Z(this,"off",(l,d)=>{Da(this.elements.container,l,d)}),Z(this,"destroy",(l,d=!1)=>{if(!this.ready)return;const c=()=>{document.body.style.overflow="",this.embed=null,d?(Object.keys(this.elements).length&&(rs(this.elements.buttons.play),rs(this.elements.captions),rs(this.elements.controls),rs(this.elements.wrapper),this.elements.buttons.play=null,this.elements.captions=null,this.elements.controls=null,this.elements.wrapper=null),k.function(l)&&l()):(YI.call(this),us.cancelRequests.call(this),va(this.elements.original,this.elements.container),pe.call(this,this.elements.original,"destroyed",!0),k.function(l)&&l.call(this.elements.original),this.ready=!1,setTimeout(()=>{this.elements=null,this.media=null},200))};this.stop(),clearTimeout(this.timers.loading),clearTimeout(this.timers.controls),clearTimeout(this.timers.resized),this.isHTML5?(Oe.toggleNativeControls.call(this,!0),c()):this.isYouTube?(clearInterval(this.timers.buffering),clearInterval(this.timers.playing),this.embed!==null&&k.function(this.embed.destroy)&&this.embed.destroy(),c()):this.isVimeo&&(this.embed!==null&&this.embed.unload().then(c),setTimeout(c,200))}),Z(this,"supports",l=>ze.mime.call(this,l)),this.timers={},this.ready=!1,this.loading=!1,this.failed=!1,this.touch=ze.touch,this.media=e,k.string(this.media)&&(this.media=document.querySelectorAll(this.media)),(window.jQuery&&this.media instanceof jQuery||k.nodeList(this.media)||k.array(this.media))&&(this.media=this.media[0]),this.config=Ue({},Wh,Hs.defaults,t||{},(()=>{try{return JSON.parse(this.media.getAttribute("data-plyr-config"))}catch{return{}}})()),this.elements={container:null,fullscreen:null,captions:null,buttons:{},display:{},progress:{},inputs:{},settings:{popup:null,menu:null,panels:{},buttons:{}}},this.captions={active:null,currentTrack:-1,meta:new WeakMap},this.fullscreen={active:!1},this.options={speed:[],quality:[]},this.debug=new o4(this.config.debug),this.debug.log("Config",this.config),this.debug.log("Support",ze),k.nullOrUndefined(this.media)||!k.element(this.media))return void this.debug.error("Setup failed: no suitable element passed");if(this.media.plyr)return void this.debug.warn("Target already setup");if(!this.config.enabled)return void this.debug.error("Setup failed: disabled by config");if(!ze.check().api)return void this.debug.error("Setup failed: no support");const n=this.media.cloneNode(!0);n.autoplay=!1,this.elements.original=n;const i=this.media.tagName.toLowerCase();let r=null,o=null;switch(i){case"div":if(r=this.media.querySelector("iframe"),k.element(r)){if(o=jh(r.getAttribute("src")),this.provider=r4(o.toString()),this.elements.container=this.media,this.media=r,this.elements.container.className="",o.search.length){const l=["1","true"];l.includes(o.searchParams.get("autoplay"))&&(this.config.autoplay=!0),l.includes(o.searchParams.get("loop"))&&(this.config.loop.active=!0),this.isYouTube?(this.config.playsinline=l.includes(o.searchParams.get("playsinline")),this.config.youtube.hl=o.searchParams.get("hl")):this.config.playsinline=!0}}else this.provider=this.media.getAttribute(this.config.attributes.embed.provider),this.media.removeAttribute(this.config.attributes.embed.provider);if(k.empty(this.provider)||!Object.values(hs).includes(this.provider))return void this.debug.error("Setup failed: Invalid provider");this.type=ko.video;break;case"video":case"audio":this.type=i,this.provider=hs.html5,this.media.hasAttribute("crossorigin")&&(this.config.crossorigin=!0),this.media.hasAttribute("autoplay")&&(this.config.autoplay=!0),(this.media.hasAttribute("playsinline")||this.media.hasAttribute("webkit-playsinline"))&&(this.config.playsinline=!0),this.media.hasAttribute("muted")&&(this.config.muted=!0),this.media.hasAttribute("loop")&&(this.config.loop.active=!0);break;default:return void this.debug.error("Setup failed: unsupported type")}this.supported=ze.check(this.type,this.provider),this.supported.api?(this.eventListeners=[],this.listeners=new l4(this),this.storage=new Cn(this),this.media.plyr=this,k.element(this.elements.container)||(this.elements.container=fe("div"),vh(this.media,this.elements.container)),Oe.migrateStyles.call(this),Oe.addStyleHook.call(this),Kh.setup.call(this),this.config.debug&&Ie.call(this,this.elements.container,this.config.events.join(" "),l=>{this.debug.log(`event: ${l.type}`)}),this.fullscreen=new Ft(this),(this.isHTML5||this.isEmbed&&!this.supported.ui)&&Oe.build.call(this),this.listeners.container(),this.listeners.global(),this.config.ads.enabled&&(this.ads=new g4(this)),this.isHTML5&&this.config.autoplay&&this.once("canplay",()=>Jt(this.play())),this.lastSeekTime=0,this.config.previewThumbnails.enabled&&(this.previewThumbnails=new xo(this))):this.debug.error("Setup failed: no support")}get isHTML5(){return this.provider===hs.html5}get isEmbed(){return this.isYouTube||this.isVimeo}get isYouTube(){return this.provider===hs.youtube}get isVimeo(){return this.provider===hs.vimeo}get isVideo(){return this.type===ko.video}get isAudio(){return this.type===ko.audio}get playing(){return!!(this.ready&&!this.paused&&!this.ended)}get paused(){return!!this.media.paused}get stopped(){return!!(this.paused&&this.currentTime===0)}get ended(){return!!this.media.ended}set currentTime(e){if(!this.duration)return;const t=k.number(e)&&e>0;this.media.currentTime=t?Math.min(e,this.duration):0,this.debug.log(`Seeking to ${this.currentTime} seconds`)}get currentTime(){return Number(this.media.currentTime)}get buffered(){const{buffered:e}=this.media;return k.number(e)?e:e&&e.length&&this.duration>0?e.end(0)/this.duration:0}get seeking(){return!!this.media.seeking}get duration(){const e=parseFloat(this.config.duration),t=(this.media||{}).duration,n=k.number(t)&&t!==1/0?t:0;return e||n}set volume(e){let t=e;k.string(t)&&(t=Number(t)),k.number(t)||(t=this.storage.get("volume")),k.number(t)||({volume:t}=this.config),t>1&&(t=1),t<0&&(t=0),this.config.volume=t,this.media.volume=t,!k.empty(e)&&this.muted&&t>0&&(this.muted=!1)}get volume(){return Number(this.media.volume)}set muted(e){let t=e;k.boolean(t)||(t=this.storage.get("muted")),k.boolean(t)||(t=this.config.muted),this.config.muted=t,this.media.muted=t}get muted(){return!!this.media.muted}get hasAudio(){return!this.isHTML5||!!this.isAudio||!!this.media.mozHasAudio||!!this.media.webkitAudioDecodedByteCount||!!(this.media.audioTracks&&this.media.audioTracks.length)}set speed(e){let t=null;k.number(e)&&(t=e),k.number(t)||(t=this.storage.get("speed")),k.number(t)||(t=this.config.speed.selected);const{minimumSpeed:n,maximumSpeed:i}=this;t=qh(t,n,i),this.config.speed.selected=t,setTimeout(()=>{this.media&&(this.media.playbackRate=t)},0)}get speed(){return Number(this.media.playbackRate)}get minimumSpeed(){return this.isYouTube?Math.min(...this.options.speed):this.isVimeo?.5:.0625}get maximumSpeed(){return this.isYouTube?Math.max(...this.options.speed):this.isVimeo?2:16}set quality(e){const t=this.config.quality,n=this.options.quality;if(!n.length)return;let i=[!k.empty(e)&&Number(e),this.storage.get("quality"),t.selected,t.default].find(k.number),r=!0;if(!n.includes(i)){const o=Ph(n,i);this.debug.warn(`Unsupported quality option: ${i}, using ${o} instead`),i=o,r=!1}t.selected=i,this.media.quality=i,r&&this.storage.set({quality:i})}get quality(){return this.media.quality}set loop(e){const t=k.boolean(e)?e:this.config.loop.active;this.config.loop.active=t,this.media.loop=t}get loop(){return!!this.media.loop}set source(e){Ao.change.call(this,e)}get source(){return this.media.currentSrc}get download(){const{download:e}=this.config.urls;return k.url(e)?e:this.source}set download(e){k.url(e)&&(this.config.urls.download=e,X.setDownloadUrl.call(this))}set poster(e){this.isVideo?Oe.setPoster.call(this,e,!1).catch(()=>{}):this.debug.warn("Poster can only be set for video")}get poster(){return this.isVideo?this.media.getAttribute("poster")||this.media.getAttribute("data-poster"):null}get ratio(){if(!this.isVideo)return null;const e=Pa(wo.call(this));return k.array(e)?e.join(":"):e}set ratio(e){this.isVideo?k.string(e)&&Mh(e)?(this.config.ratio=Pa(e),js.call(this)):this.debug.error(`Invalid aspect ratio specified (${e})`):this.debug.warn("Aspect ratio can only be set for video")}set autoplay(e){this.config.autoplay=k.boolean(e)?e:this.config.autoplay}get autoplay(){return!!this.config.autoplay}toggleCaptions(e){Be.toggle.call(this,e,!1)}set currentTrack(e){Be.set.call(this,e,!1),Be.setup.call(this)}get currentTrack(){const{toggled:e,currentTrack:t}=this.captions;return e?t:-1}set language(e){Be.setLanguage.call(this,e,!1)}get language(){return(Be.getCurrentTrack.call(this)||{}).language}set pip(e){if(!ze.pip)return;const t=k.boolean(e)?e:!this.pip;k.function(this.media.webkitSetPresentationMode)&&this.media.webkitSetPresentationMode(t?_o.active:_o.inactive),k.function(this.media.requestPictureInPicture)&&(!this.pip&&t?this.media.requestPictureInPicture():this.pip&&!t&&document.exitPictureInPicture())}get pip(){return ze.pip?k.empty(this.media.webkitPresentationMode)?this.media===document.pictureInPictureElement:this.media.webkitPresentationMode===_o.active:null}setPreviewThumbnails(e){this.previewThumbnails&&this.previewThumbnails.loaded&&(this.previewThumbnails.destroy(),this.previewThumbnails=null),Object.assign(this.config.previewThumbnails,e),this.config.previewThumbnails.enabled&&(this.previewThumbnails=new xo(this))}static supported(e,t){return ze.check(e,t)}static loadSprite(e,t){return zh(e,t)}static setup(e,t={}){let n=null;return k.string(e)?n=Array.from(document.querySelectorAll(e)):k.nodeList(e)?n=Array.from(e):k.array(e)&&(n=e.filter(k.element)),k.empty(n)?null:n.map(i=>new Hs(i,t))}}Hs.defaults=HI(Wh);const y4={key:1,class:"carousel-video-player__play-info__date carousel-video-player__play-info-portrait__date"},b4={class:"carousel-video-player__play-info-portrait__date"},w4={class:"carousel-video-player__play-info-portrait__game"},S4={key:2,class:"carousel-video-player__play-info__data"},_4={class:"video-container"},k4=["id"],E4=et({__name:"CarouselVideoPlayer",props:{play:{type:Object,required:!0},isPlaySeeker:{type:Boolean,default:!1},isPortrait:{type:Boolean,default:!0},isMobileFull:{type:Boolean,default:!0},isIos:{type:Boolean,default:!1}},emits:["play-ended"],setup(s,{emit:e}){const t=s,n=a.ref(null),i=a.ref(!1),r=a.computed(()=>`p-${t.play.playId||t.play.play_id}`),o=a.computed(()=>{if(t.isPlaySeeker){const p=new Date(t.play.gameDate);return`${p.getDate()}, ${uL(p.getMonth())} ${p.getFullYear()}`}const f=new Date(t.play.date_time_utc);return`${f.getDate()}, ${gh[f.getMonth()]} ${f.getFullYear()}`}),l=a.computed(()=>{if(t.isPlaySeeker){const f=t.play.finalScore.split(" ");return`${t.play.homeTeamName} ${f[0]} : ${f[2]} ${t.play.awayTeamName} | ${t.play.categoryName} ${t.play.playerShortName}`}return`${t.play.home_alt_name} ${t.play.score[0]} : ${t.play.score[1]} ${t.play.away_alt_name} | ${t.play.event_type_name} ${t.play.player_name}`}),d=a.computed(()=>{if(t.isPlaySeeker){const f=t.play.finalScore.split(" ");return`${t.play.homeTeamName} ${f[0]} : ${f[2]} ${t.play.awayTeamName}`}return`${t.play.home_alt_name} ${t.play.score[0]} : ${t.play.score[1]} ${t.play.away_alt_name}`}),c=a.computed(()=>t.isPlaySeeker?`${t.play.categoryName} ${t.play.playerShortName}`:`${t.play.event_type_name} ${t.play.player_name}`);function u(){n.value=new Hs(`#${r.value}`,{controls:t.isPlaySeeker?["play","volume"]:["play","volume","progress"],autoplay:!1,playsinline:!0}),t.isPlaySeeker&&(n.value.on("loadeddata",()=>{n.value.currentTime=t.play.startSeconds}),n.value.on("timeupdate",()=>{n.value.currentTime>=t.play.endSeconds&&(n.value.pause(),n.value.currentTime=t.play.startSeconds,e("play-ended"))})),n.value.source={type:"video",sources:[{src:t.isPlaySeeker?t.play.videoUrl:t.play.video_link,type:"video/mp4"}]},n.value.isDestroyed=!1,t.play.videoPlayer=n.value,t.play.plyrInit=u,n.value.on("webkitfullscreenchange",m()),n.value.on("mozfullscreenchange",m()),n.value.on("fullscreenchange",m())}function m(){const f=this;return()=>{document.exitFullscreen?document.exitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitExitFullscreen&&document.webkitExitFullscreen(),setTimeout(()=>{f.$emit("full-screen-change")},100)}}return a.onMounted(()=>{setTimeout(()=>{u()},100)}),(f,p)=>(a.openBlock(),a.createElementBlock("div",{class:"carousel-video-player",onMouseenter:p[0]||(p[0]=h=>i.value=!0),onMouseleave:p[1]||(p[1]=h=>i.value=!1)},[a.withDirectives(a.createElementVNode("div",{class:a.normalizeClass(["carousel-video-player__play-info",s.isPortrait&&s.isMobileFull?"carousel-video-player__play-info-portrait":""])},[!s.isPortrait||!s.isMobileFull?(a.openBlock(),a.createElementBlock("div",{key:0,class:a.normalizeClass(["carousel-video-player__play-info__date",s.isPortrait&&s.isMobileFull?"carousel-video-player__play-info-portrait__date":""])},a.toDisplayString(o.value),3)):a.createCommentVNode("",!0),s.isPortrait&&s.isMobileFull?(a.openBlock(),a.createElementBlock("div",y4,[a.createElementVNode("div",b4,[a.createTextVNode(a.toDisplayString(o.value)+" - ",1),a.createElementVNode("div",w4,a.toDisplayString(d.value),1)]),a.createTextVNode(" "+a.toDisplayString(c.value),1)])):(a.openBlock(),a.createElementBlock("div",S4,a.toDisplayString(l.value),1))],2),[[a.vShow,i.value]]),a.createElementVNode("div",_4,[a.createElementVNode("video",{id:r.value,controls:"",preload:"auto","data-setup":"{}"},null,8,k4)])],32))}},[["__scopeId","data-v-96776f5d"]]),Lo=s=>(a.pushScopeId("data-v-64d330ca"),s=s(),a.popScopeId(),s),T4=[Lo(()=>a.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none"},[a.createElementVNode("path",{d:"M5 15L15 5",stroke:"white","stroke-width":"1.7","stroke-miterlimit":"10","stroke-linecap":"round","stroke-linejoin":"round"}),a.createElementVNode("path",{d:"M15 15L5 5",stroke:"white","stroke-width":"1.7","stroke-miterlimit":"10","stroke-linecap":"round","stroke-linejoin":"round"})],-1))],C4={class:"carousel-full-screen__carousel"},x4={key:0,class:"icon-mobil-scrren"},A4=[Lo(()=>a.createElementVNode("img",{class:"icon-mobil-scrren__img",src:"https://golstatsimages.blob.core.windows.net/images-library/icn-mobile@2x.png"},null,-1)),Lo(()=>a.createElementVNode("div",{class:"icon-mobil-scrren__text-cont"},[a.createElementVNode("div",{class:"icon-mobil-scrren__text-cont__text1"},"Gira tu celular"),a.createElementVNode("div",{class:"icon-mobil-scrren__text-cont__text2"},"Para la mejor experiencia en video")],-1))],L4={class:"carousel-full-screen__carousel__video-player"},Io=2,I4=et({__name:"CarouselFullScreen",props:{playerQueue:{type:Array,default:()=>[]},playlistIndex:{type:Number,default:0},initialPlay:{type:Object,default:()=>({})},isPlaySeeker:{type:Boolean,default:!1}},emits:["close"],setup(s,{emit:e}){const t=s;let n=0,i=new Map;const r=a.ref({wrapAround:!1,itemsToShow:1.2,isMainSlidePriority:!0,areSlidesArrowsVisible:!0,areNavigationArrowsVisible:!1,slideLeftArrowBackgroundImage:"none",slideRightArrowBackgroundImage:"none"}),o=a.ref(null),l=a.ref([]);a.watch(()=>t.playerQueue,b=>{b.length&&(l.value=b.map((w,_)=>(w.index=_,{...w})),n=t.playlistIndex,i=new Map(l.value.map(w=>[w.index,w])))},{immediate:!0});function d(){return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|iPhone|iPad|Opera Mini/i.test(navigator.userAgent)}function c(){return/iPhone|iPad/i.test(navigator.userAgent)}function u({selectedItem:b}){if(n!==b.index){const w=b.index-n;n=b.index;const _=i.get(n+w*-1),C=i.get(n);if(_&&_.videoPlayer&&(_.videoPlayer.pause(),_.videoPlayer.currentTime=0),C&&C.videoPlayer&&C.videoPlayer.play(),w>0){const E=i.get(n+Io),A=i.get(n+1),T=i.get(n-Io);E&&(l.value.find(R=>R.index===E.index)||l.value.push(E)),A&&A.videoPlayer&&A.videoPlayer.isDestroyed&&A.plyrInit(),T&&T.videoPlayer&&(T.videoPlayer.pause(),T.videoPlayer.src="",T.videoPlayer.destroy(),T.videoPlayer.isDestroyed=!0)}else if(w<0){const E=i.get(n-1),A=i.get(n+Io);E&&E.videoPlayer&&E.videoPlayer.isDestroyed&&E.plyrInit(),A&&A.videoPlayer&&(A.videoPlayer.pause(),A.videoPlayer.src="",A.videoPlayer.destroy(),A.videoPlayer.isDestroyed=!0)}}}function m(){o.value&&o.value.next()}function f(){e("close",n)}const p=a.reactive({portrait:window.matchMedia("(orientation: portrait)").matches}),h=a.computed(()=>p.portrait);function g(){var b=window.matchMedia("(orientation: portrait)");b.matches?p.portrait=!0:p.portrait=!1}function y(){window.screen.orientation.angle!=90?p.portrait=!0:p.portrait=!1}return a.onMounted(()=>{c()?(window.addEventListener("resize",g),g()):(window.addEventListener("orientationchange",y),y()),setTimeout(()=>{const b=document.getElementsByClassName("video-element");b&&b.length&&Array.from(b).forEach((w,_)=>{w.id=`plyrFS${_+1}`})},100)}),a.onBeforeUnmount(()=>{c()?window.removeEventListener("resize",g):window.removeEventListener("orientationchange",y),t.playerQueue.forEach(b=>{b.videoPlayer&&(b.videoPlayer.pause(),b.videoPlayer.destroy())})}),(b,w)=>(a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass(["carousel-full-screen",c()&&!h.value?"paddingIos":""]),id:"carousel-swipe"},[a.createElementVNode("div",{class:"carousel-full-screen__close",style:a.normalizeStyle(c()&&h.value?"padding-top:30px":""),onClick:f},T4,4),a.createElementVNode("div",C4,[h.value&&d()?(a.openBlock(),a.createElementBlock("div",x4,A4)):a.createCommentVNode("",!0),a.createVNode(a.unref(hI),a.mergeProps({ref_key:"gscCarousel",ref:o},r.value,{items:l.value,onInput:u}),{default:a.withCtx(({item:_})=>[a.createElementVNode("div",L4,[a.createVNode(E4,{play:_,"is-portrait":h.value,"is-mobile-full":d(),"is-ios":c(),"is-play-seeker":s.isPlaySeeker,onPlayEnded:m},null,8,["play","is-portrait","is-mobile-full","is-ios","is-play-seeker"])])]),_:1},16,["items"])])],2))}},[["__scopeId","data-v-64d330ca"]]),B4=new Map([["M1",{matchDayId:1,matchDayName:"Jornada 1",matchDayAbbreviation:"J1"}],["M2",{matchDayId:2,matchDayName:"Jornada 2",matchDayAbbreviation:"J2"}],["M3",{matchDayId:3,matchDayName:"Jornada 3",matchDayAbbreviation:"J3"}],["M4",{matchDayId:4,matchDayName:"Jornada 4",matchDayAbbreviation:"J4"}],["M5",{matchDayId:5,matchDayName:"Jornada 5",matchDayAbbreviation:"J5"}],["M6",{matchDayId:6,matchDayName:"Jornada 6",matchDayAbbreviation:"J6"}],["DF",{matchDayId:181,matchDayName:"16vos de Final",matchDayAbbreviation:"DF"}],["OF",{matchDayId:176,matchDayName:"Octavos de Final",matchDayAbbreviation:"OF"}],["CF",{matchDayId:177,matchDayName:"Cuartos de Final",matchDayAbbreviation:"CF"}],["SF",{matchDayId:178,matchDayName:"Semifinales",matchDayAbbreviation:"SF"}],["3ER",{matchDayId:179,matchDayName:"Tercer lugar",matchDayAbbreviation:"3ER"}],["FINAL",{matchDayId:180,matchDayName:"Final",matchDayAbbreviation:"FINAL"}]]),R4=new Map([["M1",{matchDayId:1,matchDayName:"16vos de Final Ida",matchDayAbbreviation:"DFI"}],["M2",{matchDayId:2,matchDayName:"16vos de Final Vuelta",matchDayAbbreviation:"DFV"}],["M3",{matchDayId:3,matchDayName:"Octavos de Final Ida",matchDayAbbreviation:"OFI"}],["M4",{matchDayId:4,matchDayName:"Octavos de Final Vuelta",matchDayAbbreviation:"OFV"}],["M5",{matchDayId:5,matchDayName:"Cuartos de Final Ida",matchDayAbbreviation:"CFI"}],["M6",{matchDayId:6,matchDayName:"Cuartos de Final Vuelta",matchDayAbbreviation:"CFV"}],["M7",{matchDayId:7,matchDayName:"Semifinales Ida",matchDayAbbreviation:"SFI"}],["M8",{matchDayId:8,matchDayName:"Semifinales Vuelta",matchDayAbbreviation:"SFV"}],["M10",{matchDayId:10,matchDayName:"Final",matchDayAbbreviation:"FINAL"}]]),Jh={PO1:"CFI",PO2:"CFV",PO3:"SFI",PO4:"SFV",PO5:"FI",PO6:"FV"},Xh={DF:"Dieciseisavos",OF:"Octavos",CF:"Cuartos",SF:"Semifinales","3ER":"Tercer lugar",FINAL:"Final"},Zh={4:"Octavos",5:"Cuartos",6:"Semifinales",7:"Final"},Qh=new Map([[1,B4],[2,R4]]),v4=(s,e)=>{const t=s.__vccOpts||s;for(const[n,i]of e)t[n]=i;return t},Bo={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(s){this.status=s}}},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(s){this.$emit("click",s),this.typeOnOff&&(this.status=!this.status,this.$emit("status",this.status))}}},em=()=>{a.useCssVars(s=>({"1c960139":s.height,b2f635d8:s.borderWidthBtn,"06e99898":s.borderType,"55555c76":s.borderColor,"23b6d320":s.borderRadius,"22c97374":s.width,"22bb09fa":s.backgroundColor,c148da7c:s.cursorType,cce756fc:s.fontSize,cff98d60:s.fontStyle,"5123b3a5":s.fontFamily,"47bf58db":s.marginLeftStat,cadc8414:s.fontSizeStat}))},tm=Bo.setup;Bo.setup=tm?(s,e)=>(em(),tm(s,e)):em;const N4=s=>(a.pushScopeId("data-v-fb269a1e"),s=s(),a.popScopeId(),s),D4=["src"],P4={key:1,class:"text"},O4=["src"],F4={class:"stats"},M4=N4(()=>a.createElementVNode("img",{class:"iconstats",src:"https://az755631.vo.msecnd.net/todoelfut/playdes.png"},null,-1)),V4={class:"numstats"},$4={class:"leyend"};function U4(s,e,t,n,i,r){return a.openBlock(),a.createElementBlock("div",null,[t.type==0?(a.openBlock(),a.createElementBlock("div",{key:0,class:a.normalizeClass(["button",i.status&&t.typeOnOff&&"button-active"]),style:a.normalizeStyle([r.customStyle,i.status&&t.typeOnOff&&r.customActive]),onClick:e[0]||(e[0]=(...o)=>r.btnClick&&r.btnClick(...o))},[t.icon&&t.iconPosition.toLowerCase()==="left"?(a.openBlock(),a.createElementBlock("img",{key:0,class:"icon",style:a.normalizeStyle({width:t.iconSize}),src:t.icon},null,12,D4)):a.createCommentVNode("",!0),t.textValue?(a.openBlock(),a.createElementBlock("div",P4,a.toDisplayString(t.textValue),1)):a.createCommentVNode("",!0),t.icon&&t.iconPosition.toLowerCase()==="right"?(a.openBlock(),a.createElementBlock("img",{key:2,class:"icon",style:a.normalizeStyle({width:t.iconSize}),src:t.icon},null,12,O4)):a.createCommentVNode("",!0)],6)):a.createCommentVNode("",!0),t.type==1?(a.openBlock(),a.createElementBlock("div",{key:1,class:"button-target",onClick:e[1]||(e[1]=(...o)=>r.btnClick&&r.btnClick(...o))},[a.createElementVNode("div",F4,[M4,a.createElementVNode("div",V4,a.toDisplayString(t.textStat),1)]),a.createElementVNode("div",$4,a.toDisplayString(t.textCategory),1)])):a.createCommentVNode("",!0)])}const z4=v4(Bo,[["render",U4],["__scopeId","data-v-fb269a1e"]]),G4={class:"gsc-dropdown__main-container__item-selected"},j4=["height","width"],H4=["stroke"],W4={class:"gsc-dropdown__items-container"},K4=["onClick"],q4={key:0,class:"gsc-dropdown__items-footer"},Y4={__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(s){return["solid","dotted","dashed"].includes(s)}},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:s=>["propName","value"].every(e=>e in s)},listBackgroundColor:{type:String,default:"white"},hoverBackgroundColor:{type:String,default:"#f1f1f1"},listMarginTop:{type:String,default:"0"},listContainerPadding:{type:String,default:"0"},listItemPadding:{type:String,default:"10px 12px"},listItemMargin:{type:String,default:"0"},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},listItemBorderRadius:{type:String,default:"0"},listAlignment:{type:String,default:"left"},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(s,{emit:e}){const t=s,n=a.ref({}),i=a.ref(null),r=a.ref(t.isMultipleOption?-1:0),o=a.ref(!1);a.watch(()=>t.items,(p,h)=>{if(!t.modelValue&&(!t.onlyFirstTime||!h||!h.length)&&p&&p.length){if(t.defaultItemByProp){const g=t.items.findIndex(y=>y[t.defaultItemByProp.propName]===t.defaultItemByProp.value);g!==-1?(r.value=g,n.value=p[g]):(r.value=0,n.value=p[0])}else n.value=p[t.defaultItemByIndex];e("input",n.value)}},{immediate:!0}),a.watch(()=>t.modelValue,p=>{if(p){const h=t.items.findIndex(g=>typeof p=="object"?JSON.stringify(g)===JSON.stringify(p):g===p);h!==-1&&(r.value=h,n.value=t.items[h],e("update:modelValue",n.value))}},{immediate:!0});const l=a.computed(()=>({height:t.height,width:t.width,backgroundColor:t.backgroundColor,borderRadius:`${t.borderRadius}px`,border:`${t.borderType} ${t.borderWidth}px ${t.borderColor}`,color:t.color,"--hover-background-color":t.hoverBackgroundColor,"--list-container-padding":t.listContainerPadding,"--list-item-padding":t.listItemPadding,"--list-item-margin":t.listItemMargin,"--list-background-color":t.listBackgroundColor,"--list-height":t.listHeight,"--list-item-border-radius":t.listItemBorderRadius,"--list-item-selected-color":t.listItemSelectedColor,"--list-item-selected-background-color":t.listItemSelectedBackgroundColor,"--list-item-color":t.listItemColor,"--list-border-radius":`${t.listBorderRadius}`,"--list-border-color":t.listBorderColor,"--list-width":t.isListSameWidth?t.width:"fit-content","--list-border-width":`${t.listBorderWidth}px`,"--list-margin-top":t.listMarginTop,"--list-left":t.listAlignment==="left"?"0":"auto","--list-right":t.listAlignment==="right"?"0":"auto","--footer-border":`${t.footerBorderWidth}px solid ${t.footerBorderColor}`,"--dropdown-opacity":t.isDisabled?"0.5":"1","--dropdown-cursor":t.isDisabled?"not-allowed":"pointer","--dropdown-font-size":t.fontSize?t.fontSize:"14px"})),d=a.computed(()=>({height:`${t.arrowHeight}px`,width:`${t.arrowWidth}px`}));function c(){t.isDisabled||(o.value=!o.value)}function u(p){i.value&&!i.value.contains(p.target)&&(o.value=!1)}function m(p,h){t.isMultipleOption?r.value=-1:(r.value=h,o.value=!1),n.value=p,e("input",n.value),e("update:modelValue",n.value)}function f(){o.value=!1,e("click-ready")}return a.onMounted(()=>{document.addEventListener("click",u)}),a.onBeforeMount(()=>{document.removeEventListener("click",u)}),(p,h)=>(a.openBlock(),a.createElementBlock("div",{ref_key:"dropDown",ref:i,class:"gsc-dropdown",style:a.normalizeStyle(l.value)},[a.createElementVNode("div",{class:"gsc-dropdown__main-container",style:a.normalizeStyle({"padding-right":`${s.arrowWidth+8}px`}),onClick:c},[a.createElementVNode("div",G4,[a.renderSlot(p.$slots,"default",{selectedItem:n.value})]),a.createElementVNode("div",{class:a.normalizeClass(["gsc-dropdown__main-container__icon",{"rotated-180":o.value}]),style:a.normalizeStyle(d.value)},[(a.openBlock(),a.createElementBlock("svg",{height:s.arrowHeight,width:s.arrowWidth,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[a.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:s.arrowColor},null,8,H4)],8,j4))],6)],4),a.createVNode(a.Transition,null,{default:a.withCtx(()=>[a.withDirectives(a.createElementVNode("div",W4,[a.createElementVNode("div",null,[a.createElementVNode("div",{class:"gsc-dropdown__items",style:a.normalizeStyle({"margin-top":`${t.borderWidth}px`})},[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(s.items,(g,y)=>(a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass(["gsc-dropdown__items__item",{selected:y===r.value}]),key:y,onClick:b=>m(g,y)},[a.renderSlot(p.$slots,"availableItem",{item:g})],10,K4))),128))],4),s.isFooterVisible?(a.openBlock(),a.createElementBlock("div",q4,[a.createVNode(a.unref(z4),{"text-value":"Listo","border-color":"#cbee6b","font-size":"12px",width:"72px",height:"22px","border-radius":"62px","border-width":.8,onClick:f})])):a.createCommentVNode("",!0)])],512),[[a.vShow,o.value]])]),_:3})],4))}},J4=(s,e)=>{const t=s.__vccOpts||s;for(const[n,i]of e)t[n]=i;return t},X4={class:"tournament-select__selected-tournament"},Z4={class:"tournament-select__selected-tournament__logo"},Q4=["src"],eB={class:"tournament-select__selected-tournament__name"},tB="https://kefloixzy1.execute-api.us-west-2.amazonaws.com/prod/gs3/tournaments",sB={__name:"GSCTournamentSelect",props:{apiUrl:{type:String,default:"https://kefloixzy1.execute-api.us-west-2.amazonaws.com/prod/gs3/tournaments"},fontFamily:{type:String,default:"Poppins-Light"},logosUrl:{type:String,default:"https://golstatsimages.blob.core.windows.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(s){return["solid","dotted","dashed"].includes(s)}},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:s=>["propName","value"].every(e=>e in s)},currentSeasonId:{type:Number,default:0},tournamentsIdsToInclude:{type:Set,default:()=>new Set}},emits:["input","change-tournaments"],setup(s,{emit:e}){const t=s,n=a.ref([]),i=a.computed(()=>{const p={};return t.fontFamily&&(p["font-family"]=`${t.fontFamily}`),p}),r=a.computed(()=>t.tournamentsIdsToInclude.size?d(n.value):n.value),o=a.computed(()=>r.value.find(p=>p.seasonsIds.has(t.currentSeasonId))||r.value[0]);async function l(){try{if(t.items&&t.items.length)n.value=[...t.items];else{const p=await u();e("change-tournaments",p),n.value=p.map(h=>({...h.tournament,seasons:h.seasons,seasonsIds:h.seasons.reduce((g,y)=>(g.add(y.id),g),new Set)})).sort((h,g)=>h.order-g.order)}}catch(p){throw new Error(p)}}function d(p){return p.filter(h=>t.tournamentsIdsToInclude.has(h.id))}function c(p){const h=new XMLHttpRequest,g=`${t.logosUrl}${p}.${t.logoFileType}`;return h.open("HEAD",g,!1),h.send(),h.status!==404}async function u(){try{return(await fetch(t.apiUrl||tB)).json()}catch(p){return Promise.reject(p)}}function m(p){e("input",p)}function f(p){e("input",p)}return a.onMounted(()=>{l()}),(p,h)=>(a.openBlock(),a.createElementBlock("div",{class:"tournament-select",style:a.normalizeStyle(i.value)},[a.createVNode(a.unref(Y4),a.mergeProps(t,{"model-value":o.value,items:r.value,onInput:m,"onUpdate:modelValue":f}),{default:a.withCtx(({selectedItem:g})=>[a.createElementVNode("div",X4,[a.createElementVNode("div",Z4,[c(g.id)?(a.openBlock(),a.createElementBlock("img",{key:0,src:`${t.logosUrl}${g.id}.${t.logoFileType}`,alt:""},null,8,Q4)):a.createCommentVNode("",!0)]),a.createElementVNode("div",eB,a.toDisplayString(g.name),1)])]),availableItem:a.withCtx(({item:g})=>[a.createElementVNode("div",null,a.toDisplayString(g.name),1)]),_:1},16,["model-value","items"])],4))}},nB=J4(sB,[["__scopeId","data-v-5c8e9511"]]),aB=(s,e)=>{const t=s.__vccOpts||s;for(const[n,i]of e)t[n]=i;return t},Ro={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(s){this.status=s}}},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(s){this.$emit("click",s),this.typeOnOff&&(this.status=!this.status,this.$emit("status",this.status))}}},sm=()=>{a.useCssVars(s=>({"1c960139":s.height,b2f635d8:s.borderWidthBtn,"06e99898":s.borderType,"55555c76":s.borderColor,"23b6d320":s.borderRadius,"22c97374":s.width,"22bb09fa":s.backgroundColor,c148da7c:s.cursorType,cce756fc:s.fontSize,cff98d60:s.fontStyle,"5123b3a5":s.fontFamily,"47bf58db":s.marginLeftStat,cadc8414:s.fontSizeStat}))},nm=Ro.setup;Ro.setup=nm?(s,e)=>(sm(),nm(s,e)):sm;const iB=s=>(a.pushScopeId("data-v-fb269a1e"),s=s(),a.popScopeId(),s),rB=["src"],oB={key:1,class:"text"},lB=["src"],cB={class:"stats"},dB=iB(()=>a.createElementVNode("img",{class:"iconstats",src:"https://az755631.vo.msecnd.net/todoelfut/playdes.png"},null,-1)),uB={class:"numstats"},hB={class:"leyend"};function mB(s,e,t,n,i,r){return a.openBlock(),a.createElementBlock("div",null,[t.type==0?(a.openBlock(),a.createElementBlock("div",{key:0,class:a.normalizeClass(["button",i.status&&t.typeOnOff&&"button-active"]),style:a.normalizeStyle([r.customStyle,i.status&&t.typeOnOff&&r.customActive]),onClick:e[0]||(e[0]=(...o)=>r.btnClick&&r.btnClick(...o))},[t.icon&&t.iconPosition.toLowerCase()==="left"?(a.openBlock(),a.createElementBlock("img",{key:0,class:"icon",style:a.normalizeStyle({width:t.iconSize}),src:t.icon},null,12,rB)):a.createCommentVNode("",!0),t.textValue?(a.openBlock(),a.createElementBlock("div",oB,a.toDisplayString(t.textValue),1)):a.createCommentVNode("",!0),t.icon&&t.iconPosition.toLowerCase()==="right"?(a.openBlock(),a.createElementBlock("img",{key:2,class:"icon",style:a.normalizeStyle({width:t.iconSize}),src:t.icon},null,12,lB)):a.createCommentVNode("",!0)],6)):a.createCommentVNode("",!0),t.type==1?(a.openBlock(),a.createElementBlock("div",{key:1,class:"button-target",onClick:e[1]||(e[1]=(...o)=>r.btnClick&&r.btnClick(...o))},[a.createElementVNode("div",cB,[dB,a.createElementVNode("div",uB,a.toDisplayString(t.textStat),1)]),a.createElementVNode("div",hB,a.toDisplayString(t.textCategory),1)])):a.createCommentVNode("",!0)])}const fB=aB(Ro,[["render",mB],["__scopeId","data-v-fb269a1e"]]),gB={class:"gsc-dropdown__main-container__item-selected"},pB=["height","width"],yB=["stroke"],bB={class:"gsc-dropdown__items-container"},wB=["onClick"],SB={key:0,class:"gsc-dropdown__items-footer"},_B={__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(s){return["solid","dotted","dashed"].includes(s)}},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:s=>["propName","value"].every(e=>e in s)},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(s,{emit:e}){const t=s,n=a.ref({}),i=a.ref(null),r=a.ref(t.isMultipleOption?-1:0),o=a.ref(!1);a.watch(()=>t.items,(p,h)=>{if(!t.modelValue&&(!t.onlyFirstTime||!h||!h.length)&&p&&p.length){if(t.defaultItemByProp){const g=t.items.findIndex(y=>y[t.defaultItemByProp.propName]===t.defaultItemByProp.value);g!==-1?(r.value=g,n.value=p[g]):(r.value=0,n.value=p[0])}else n.value=p[t.defaultItemByIndex];e("input",n.value)}},{immediate:!0}),a.watch(()=>t.modelValue,p=>{if(p){const h=t.items.findIndex(g=>typeof p=="object"?JSON.stringify(g)===JSON.stringify(p):g===p);h!==-1&&(r.value=h,n.value=t.items[h],e("update:modelValue",n.value))}},{immediate:!0});const l=a.computed(()=>({height:t.height,width:t.width,backgroundColor:t.backgroundColor,borderRadius:`${t.borderRadius}px`,border:`${t.borderType} ${t.borderWidth}px ${t.borderColor}`,color:t.color,"--hover-background-color":t.hoverBackgroundColor,"--list-item-padding":t.listItemPadding,"--list-background-color":t.listBackgroundColor,"--list-height":t.listHeight,"--list-item-selected-color":t.listItemSelectedColor,"--list-item-selected-background-color":t.listItemSelectedBackgroundColor,"--list-item-color":t.listItemColor,"--list-border-radius":`${t.listBorderRadius}`,"--list-border-color":t.listBorderColor,"--list-width":t.isListSameWidth?t.width:"fit-content","--list-border-width":`${t.listBorderWidth}px`,"--footer-border":`${t.footerBorderWidth}px solid ${t.footerBorderColor}`,"--dropdown-opacity":t.isDisabled?"0.5":"1","--dropdown-cursor":t.isDisabled?"not-allowed":"pointer","--dropdown-font-size":t.fontSize?t.fontSize:"14px"})),d=a.computed(()=>({height:`${t.arrowHeight}px`,width:`${t.arrowWidth}px`}));function c(){t.isDisabled||(o.value=!o.value)}function u(p){i.value&&!i.value.contains(p.target)&&(o.value=!1)}function m(p,h){t.isMultipleOption?r.value=-1:(r.value=h,o.value=!1),n.value=p,e("input",n.value),e("update:modelValue",n.value)}function f(){o.value=!1,e("click-ready")}return a.onMounted(()=>{document.addEventListener("click",u)}),a.onBeforeMount(()=>{document.removeEventListener("click",u)}),(p,h)=>(a.openBlock(),a.createElementBlock("div",{ref_key:"dropDown",ref:i,class:"gsc-dropdown",style:a.normalizeStyle(l.value)},[a.createElementVNode("div",{class:"gsc-dropdown__main-container",style:a.normalizeStyle({"padding-right":`${s.arrowWidth+8}px`}),onClick:c},[a.createElementVNode("div",gB,[a.renderSlot(p.$slots,"default",{selectedItem:n.value})]),a.createElementVNode("div",{class:a.normalizeClass(["gsc-dropdown__main-container__icon",{"rotated-180":o.value}]),style:a.normalizeStyle(d.value)},[(a.openBlock(),a.createElementBlock("svg",{height:s.arrowHeight,width:s.arrowWidth,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[a.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:s.arrowColor},null,8,yB)],8,pB))],6)],4),a.createVNode(a.Transition,null,{default:a.withCtx(()=>[a.withDirectives(a.createElementVNode("div",bB,[a.createElementVNode("div",null,[a.createElementVNode("div",{class:"gsc-dropdown__items",style:a.normalizeStyle({"margin-top":`${t.borderWidth}px`})},[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(s.items,(g,y)=>(a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass(["gsc-dropdown__items__item",{selected:y===r.value}]),key:y,onClick:b=>m(g,y)},[a.renderSlot(p.$slots,"availableItem",{item:g})],10,wB))),128))],4),s.isFooterVisible?(a.openBlock(),a.createElementBlock("div",SB,[a.createVNode(a.unref(fB),{"text-value":"Listo","border-color":"#cbee6b","font-size":"12px",width:"72px",height:"22px","border-radius":"62px","border-width":.8,onClick:f})])):a.createCommentVNode("",!0)])],512),[[a.vShow,o.value]])]),_:3})],4))}},kB=(s,e)=>{const t=s.__vccOpts||s;for(const[n,i]of e)t[n]=i;return t},EB={class:"season-name"},TB={class:"items-list-season"},CB={__name:"GSC-SeasonSelect",props:{seasons:{type:Array,default:()=>[]},currentSeasonId:{type:Number,default:0}},emits:["input"],setup(s,{emit:e}){const t=s,n=a.computed(()=>t.seasons.find(o=>o.id===t.currentSeasonId));function i(o){e("input",o)}function r(o){e("input",o)}return(o,l)=>(a.openBlock(),a.createBlock(a.unref(_B),{items:s.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:r,"onUpdate:modelValue":i},{default:a.withCtx(({selectedItem:d})=>[a.createElementVNode("div",EB,[a.createElementVNode("span",null,a.toDisplayString(d.name),1)])]),availableItem:a.withCtx(({item:d})=>[a.createElementVNode("span",TB,a.toDisplayString(d.name),1)]),_:1},8,["items","model-value"]))}},xB=kB(CB,[["__scopeId","data-v-81bba1d4"]]);function am(s,e){return function(){return s.apply(e,arguments)}}const{toString:AB}=Object.prototype,{getPrototypeOf:vo}=Object,Va=(s=>e=>{const t=AB.call(e);return s[t]||(s[t]=t.slice(8,-1).toLowerCase())})(Object.create(null)),Mt=s=>(s=s.toLowerCase(),e=>Va(e)===s),$a=s=>e=>typeof e===s,{isArray:Ws}=Array,In=$a("undefined");function LB(s){return s!==null&&!In(s)&&s.constructor!==null&&!In(s.constructor)&&xt(s.constructor.isBuffer)&&s.constructor.isBuffer(s)}const im=Mt("ArrayBuffer");function IB(s){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(s):e=s&&s.buffer&&im(s.buffer),e}const BB=$a("string"),xt=$a("function"),rm=$a("number"),Ua=s=>s!==null&&typeof s=="object",RB=s=>s===!0||s===!1,za=s=>{if(Va(s)!=="object")return!1;const e=vo(s);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in s)&&!(Symbol.iterator in s)},vB=Mt("Date"),NB=Mt("File"),DB=Mt("Blob"),PB=Mt("FileList"),OB=s=>Ua(s)&&xt(s.pipe),FB=s=>{let e;return s&&(typeof FormData=="function"&&s instanceof FormData||xt(s.append)&&((e=Va(s))==="formdata"||e==="object"&&xt(s.toString)&&s.toString()==="[object FormData]"))},MB=Mt("URLSearchParams"),[VB,$B,UB,zB]=["ReadableStream","Request","Response","Headers"].map(Mt),GB=s=>s.trim?s.trim():s.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Bn(s,e,{allOwnKeys:t=!1}={}){if(s===null||typeof s>"u")return;let n,i;if(typeof s!="object"&&(s=[s]),Ws(s))for(n=0,i=s.length;n<i;n++)e.call(null,s[n],n,s);else{const r=t?Object.getOwnPropertyNames(s):Object.keys(s),o=r.length;let l;for(n=0;n<o;n++)l=r[n],e.call(null,s[l],l,s)}}function om(s,e){e=e.toLowerCase();const t=Object.keys(s);let n=t.length,i;for(;n-- >0;)if(i=t[n],e===i.toLowerCase())return i;return null}const Is=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,lm=s=>!In(s)&&s!==Is;function No(){const{caseless:s}=lm(this)&&this||{},e={},t=(n,i)=>{const r=s&&om(e,i)||i;za(e[r])&&za(n)?e[r]=No(e[r],n):za(n)?e[r]=No({},n):Ws(n)?e[r]=n.slice():e[r]=n};for(let n=0,i=arguments.length;n<i;n++)arguments[n]&&Bn(arguments[n],t);return e}const jB=(s,e,t,{allOwnKeys:n}={})=>(Bn(e,(i,r)=>{t&&xt(i)?s[r]=am(i,t):s[r]=i},{allOwnKeys:n}),s),HB=s=>(s.charCodeAt(0)===65279&&(s=s.slice(1)),s),WB=(s,e,t,n)=>{s.prototype=Object.create(e.prototype,n),s.prototype.constructor=s,Object.defineProperty(s,"super",{value:e.prototype}),t&&Object.assign(s.prototype,t)},KB=(s,e,t,n)=>{let i,r,o;const l={};if(e=e||{},s==null)return e;do{for(i=Object.getOwnPropertyNames(s),r=i.length;r-- >0;)o=i[r],(!n||n(o,s,e))&&!l[o]&&(e[o]=s[o],l[o]=!0);s=t!==!1&&vo(s)}while(s&&(!t||t(s,e))&&s!==Object.prototype);return e},qB=(s,e,t)=>{s=String(s),(t===void 0||t>s.length)&&(t=s.length),t-=e.length;const n=s.indexOf(e,t);return n!==-1&&n===t},YB=s=>{if(!s)return null;if(Ws(s))return s;let e=s.length;if(!rm(e))return null;const t=new Array(e);for(;e-- >0;)t[e]=s[e];return t},JB=(s=>e=>s&&e instanceof s)(typeof Uint8Array<"u"&&vo(Uint8Array)),XB=(s,e)=>{const t=(s&&s[Symbol.iterator]).call(s);let n;for(;(n=t.next())&&!n.done;){const i=n.value;e.call(s,i[0],i[1])}},ZB=(s,e)=>{let t;const n=[];for(;(t=s.exec(e))!==null;)n.push(t);return n},QB=Mt("HTMLFormElement"),eR=s=>s.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,t,n){return t.toUpperCase()+n}),cm=(({hasOwnProperty:s})=>(e,t)=>s.call(e,t))(Object.prototype),tR=Mt("RegExp"),dm=(s,e)=>{const t=Object.getOwnPropertyDescriptors(s),n={};Bn(t,(i,r)=>{let o;(o=e(i,r,s))!==!1&&(n[r]=o||i)}),Object.defineProperties(s,n)},sR=s=>{dm(s,(e,t)=>{if(xt(s)&&["arguments","caller","callee"].indexOf(t)!==-1)return!1;const n=s[t];if(xt(n)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+t+"'")})}})},nR=(s,e)=>{const t={},n=i=>{i.forEach(r=>{t[r]=!0})};return Ws(s)?n(s):n(String(s).split(e)),t},aR=()=>{},iR=(s,e)=>s!=null&&Number.isFinite(s=+s)?s:e,Do="abcdefghijklmnopqrstuvwxyz",um="0123456789",hm={DIGIT:um,ALPHA:Do,ALPHA_DIGIT:Do+Do.toUpperCase()+um},rR=(s=16,e=hm.ALPHA_DIGIT)=>{let t="";const{length:n}=e;for(;s--;)t+=e[Math.random()*n|0];return t};function oR(s){return!!(s&&xt(s.append)&&s[Symbol.toStringTag]==="FormData"&&s[Symbol.iterator])}const lR=s=>{const e=new Array(10),t=(n,i)=>{if(Ua(n)){if(e.indexOf(n)>=0)return;if(!("toJSON"in n)){e[i]=n;const r=Ws(n)?[]:{};return Bn(n,(o,l)=>{const d=t(o,i+1);!In(d)&&(r[l]=d)}),e[i]=void 0,r}}return n};return t(s,0)},cR=Mt("AsyncFunction"),dR=s=>s&&(Ua(s)||xt(s))&&xt(s.then)&&xt(s.catch),mm=((s,e)=>s?setImmediate:e?((t,n)=>(Is.addEventListener("message",({source:i,data:r})=>{i===Is&&r===t&&n.length&&n.shift()()},!1),i=>{n.push(i),Is.postMessage(t,"*")}))(`axios@${Math.random()}`,[]):t=>setTimeout(t))(typeof setImmediate=="function",xt(Is.postMessage)),uR=typeof queueMicrotask<"u"?queueMicrotask.bind(Is):typeof process<"u"&&process.nextTick||mm,F={isArray:Ws,isArrayBuffer:im,isBuffer:LB,isFormData:FB,isArrayBufferView:IB,isString:BB,isNumber:rm,isBoolean:RB,isObject:Ua,isPlainObject:za,isReadableStream:VB,isRequest:$B,isResponse:UB,isHeaders:zB,isUndefined:In,isDate:vB,isFile:NB,isBlob:DB,isRegExp:tR,isFunction:xt,isStream:OB,isURLSearchParams:MB,isTypedArray:JB,isFileList:PB,forEach:Bn,merge:No,extend:jB,trim:GB,stripBOM:HB,inherits:WB,toFlatObject:KB,kindOf:Va,kindOfTest:Mt,endsWith:qB,toArray:YB,forEachEntry:XB,matchAll:ZB,isHTMLForm:QB,hasOwnProperty:cm,hasOwnProp:cm,reduceDescriptors:dm,freezeMethods:sR,toObjectSet:nR,toCamelCase:eR,noop:aR,toFiniteNumber:iR,findKey:om,global:Is,isContextDefined:lm,ALPHABET:hm,generateString:rR,isSpecCompliantForm:oR,toJSONObject:lR,isAsyncFn:cR,isThenable:dR,setImmediate:mm,asap:uR};function ke(s,e,t,n,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=s,this.name="AxiosError",e&&(this.code=e),t&&(this.config=t),n&&(this.request=n),i&&(this.response=i,this.status=i.status?i.status:null)}F.inherits(ke,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:F.toJSONObject(this.config),code:this.code,status:this.status}}});const fm=ke.prototype,gm={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(s=>{gm[s]={value:s}}),Object.defineProperties(ke,gm),Object.defineProperty(fm,"isAxiosError",{value:!0}),ke.from=(s,e,t,n,i,r)=>{const o=Object.create(fm);return F.toFlatObject(s,o,function(l){return l!==Error.prototype},l=>l!=="isAxiosError"),ke.call(o,s.message,e,t,n,i),o.cause=s,o.name=s.name,r&&Object.assign(o,r),o};const hR=null;function Po(s){return F.isPlainObject(s)||F.isArray(s)}function pm(s){return F.endsWith(s,"[]")?s.slice(0,-2):s}function ym(s,e,t){return s?s.concat(e).map(function(n,i){return n=pm(n),!t&&i?"["+n+"]":n}).join(t?".":""):e}function mR(s){return F.isArray(s)&&!s.some(Po)}const fR=F.toFlatObject(F,{},null,function(s){return/^is[A-Z]/.test(s)});function Ga(s,e,t){if(!F.isObject(s))throw new TypeError("target must be an object");e=e||new FormData,t=F.toFlatObject(t,{metaTokens:!0,dots:!1,indexes:!1},!1,function(p,h){return!F.isUndefined(h[p])});const n=t.metaTokens,i=t.visitor||c,r=t.dots,o=t.indexes,l=(t.Blob||typeof Blob<"u"&&Blob)&&F.isSpecCompliantForm(e);if(!F.isFunction(i))throw new TypeError("visitor must be a function");function d(p){if(p===null)return"";if(F.isDate(p))return p.toISOString();if(!l&&F.isBlob(p))throw new ke("Blob is not supported. Use a Buffer instead.");return F.isArrayBuffer(p)||F.isTypedArray(p)?l&&typeof Blob=="function"?new Blob([p]):Buffer.from(p):p}function c(p,h,g){let y=p;if(p&&!g&&typeof p=="object"){if(F.endsWith(h,"{}"))h=n?h:h.slice(0,-2),p=JSON.stringify(p);else if(F.isArray(p)&&mR(p)||(F.isFileList(p)||F.endsWith(h,"[]"))&&(y=F.toArray(p)))return h=pm(h),y.forEach(function(b,w){!(F.isUndefined(b)||b===null)&&e.append(o===!0?ym([h],w,r):o===null?h:h+"[]",d(b))}),!1}return Po(p)?!0:(e.append(ym(g,h,r),d(p)),!1)}const u=[],m=Object.assign(fR,{defaultVisitor:c,convertValue:d,isVisitable:Po});function f(p,h){if(!F.isUndefined(p)){if(u.indexOf(p)!==-1)throw Error("Circular reference detected in "+h.join("."));u.push(p),F.forEach(p,function(g,y){(!(F.isUndefined(g)||g===null)&&i.call(e,g,F.isString(y)?y.trim():y,h,m))===!0&&f(g,h?h.concat(y):[y])}),u.pop()}}if(!F.isObject(s))throw new TypeError("data must be an object");return f(s),e}function bm(s){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(s).replace(/[!'()~]|%20|%00/g,function(t){return e[t]})}function Oo(s,e){this._pairs=[],s&&Ga(s,this,e)}const wm=Oo.prototype;wm.append=function(s,e){this._pairs.push([s,e])},wm.toString=function(s){const e=s?function(t){return s.call(this,t,bm)}:bm;return this._pairs.map(function(t){return e(t[0])+"="+e(t[1])},"").join("&")};function gR(s){return encodeURIComponent(s).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Sm(s,e,t){if(!e)return s;const n=t&&t.encode||gR;F.isFunction(t)&&(t={serialize:t});const i=t&&t.serialize;let r;if(i?r=i(e,t):r=F.isURLSearchParams(e)?e.toString():new Oo(e,t).toString(n),r){const o=s.indexOf("#");o!==-1&&(s=s.slice(0,o)),s+=(s.indexOf("?")===-1?"?":"&")+r}return s}class pR{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){F.forEach(this.handlers,function(t){t!==null&&e(t)})}}const _m=pR,km={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},yR=typeof URLSearchParams<"u"?URLSearchParams:Oo,bR=typeof FormData<"u"?FormData:null,wR=typeof Blob<"u"?Blob:null,SR={isBrowser:!0,classes:{URLSearchParams:yR,FormData:bR,Blob:wR},protocols:["http","https","file","blob","url","data"]},Fo=typeof window<"u"&&typeof document<"u",Mo=typeof navigator=="object"&&navigator||void 0,_R=Fo&&(!Mo||["ReactNative","NativeScript","NS"].indexOf(Mo.product)<0),kR=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",ER=Fo&&window.location.href||"http://localhost",TR=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Fo,hasStandardBrowserEnv:_R,hasStandardBrowserWebWorkerEnv:kR,navigator:Mo,origin:ER},Symbol.toStringTag,{value:"Module"})),yt={...TR,...SR};function CR(s,e){return Ga(s,new yt.classes.URLSearchParams,Object.assign({visitor:function(t,n,i,r){return yt.isNode&&F.isBuffer(t)?(this.append(n,t.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)}},e))}function xR(s){return F.matchAll(/\w+|\[(\w*)]/g,s).map(e=>e[0]==="[]"?"":e[1]||e[0])}function AR(s){const e={},t=Object.keys(s);let n;const i=t.length;let r;for(n=0;n<i;n++)r=t[n],e[r]=s[r];return e}function Em(s){function e(t,n,i,r){let o=t[r++];if(o==="__proto__")return!0;const l=Number.isFinite(+o),d=r>=t.length;return o=!o&&F.isArray(i)?i.length:o,d?(F.hasOwnProp(i,o)?i[o]=[i[o],n]:i[o]=n,!l):((!i[o]||!F.isObject(i[o]))&&(i[o]=[]),e(t,n,i[o],r)&&F.isArray(i[o])&&(i[o]=AR(i[o])),!l)}if(F.isFormData(s)&&F.isFunction(s.entries)){const t={};return F.forEachEntry(s,(n,i)=>{e(xR(n),i,t,0)}),t}return null}function LR(s,e,t){if(F.isString(s))try{return(e||JSON.parse)(s),F.trim(s)}catch(n){if(n.name!=="SyntaxError")throw n}return(0,JSON.stringify)(s)}const Vo={transitional:km,adapter:["xhr","http","fetch"],transformRequest:[function(s,e){const t=e.getContentType()||"",n=t.indexOf("application/json")>-1,i=F.isObject(s);if(i&&F.isHTMLForm(s)&&(s=new FormData(s)),F.isFormData(s))return n?JSON.stringify(Em(s)):s;if(F.isArrayBuffer(s)||F.isBuffer(s)||F.isStream(s)||F.isFile(s)||F.isBlob(s)||F.isReadableStream(s))return s;if(F.isArrayBufferView(s))return s.buffer;if(F.isURLSearchParams(s))return e.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),s.toString();let r;if(i){if(t.indexOf("application/x-www-form-urlencoded")>-1)return CR(s,this.formSerializer).toString();if((r=F.isFileList(s))||t.indexOf("multipart/form-data")>-1){const o=this.env&&this.env.FormData;return Ga(r?{"files[]":s}:s,o&&new o,this.formSerializer)}}return i||n?(e.setContentType("application/json",!1),LR(s)):s}],transformResponse:[function(s){const e=this.transitional||Vo.transitional,t=e&&e.forcedJSONParsing,n=this.responseType==="json";if(F.isResponse(s)||F.isReadableStream(s))return s;if(s&&F.isString(s)&&(t&&!this.responseType||n)){const i=!(e&&e.silentJSONParsing)&&n;try{return JSON.parse(s)}catch(r){if(i)throw r.name==="SyntaxError"?ke.from(r,ke.ERR_BAD_RESPONSE,this,null,this.response):r}}return s}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:yt.classes.FormData,Blob:yt.classes.Blob},validateStatus:function(s){return s>=200&&s<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};F.forEach(["delete","get","head","post","put","patch"],s=>{Vo.headers[s]={}});const $o=Vo,IR=F.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),BR=s=>{const e={};let t,n,i;return s&&s.split(`
36
+ */const lt={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"}},hh={itemsToShow:{default:lt.itemsToShow,type:Number},itemsToScroll:{default:lt.itemsToScroll,type:Number},wrapAround:{default:lt.wrapAround,type:Boolean},throttle:{default:lt.throttle,type:Number},snapAlign:{default:lt.snapAlign,validator(s){return["start","end","center","center-even","center-odd"].includes(s)}},transition:{default:lt.transition,type:Number},breakpoints:{default:lt.breakpoints,type:Object},autoplay:{default:lt.autoplay,type:Number},pauseAutoplayOnHover:{default:lt.pauseAutoplayOnHover,type:Boolean},modelValue:{default:void 0,type:Number},mouseDrag:{default:lt.mouseDrag,type:Boolean},touchDrag:{default:lt.touchDrag,type:Boolean},dir:{default:lt.dir,validator(s){return["rtl","ltr"].includes(s)}},i18n:{default:lt.i18n,type:Object},settings:{default(){return{}},type:Object}};function MI({config:s,slidesCount:e}){const{snapAlign:t,wrapAround:n,itemsToShow:i=1}=s;if(n)return Math.max(e-1,0);let r;switch(t){case"start":r=e-i;break;case"end":r=e-1;break;case"center":case"center-odd":r=e-Math.ceil((i-.5)/2);break;case"center-even":r=e-Math.ceil(i/2);break;default:r=0;break}return Math.max(r,0)}function VI({config:s,slidesCount:e}){const{wrapAround:t,snapAlign:n,itemsToShow:i=1}=s;let r=0;if(t||i>e)return r;switch(n){case"start":r=0;break;case"end":r=i-1;break;case"center":case"center-odd":r=Math.floor((i-1)/2);break;case"center-even":r=Math.floor((i-2)/2);break;default:r=0;break}return r}function co({val:s,max:e,min:t}){return e<t?s:Math.min(Math.max(s,t),e)}function $I({config:s,currentSlide:e,slidesCount:t}){const{snapAlign:n,wrapAround:i,itemsToShow:r=1}=s;let o=e;switch(n){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 i?o:co({val:o,max:t-r,min:0})}function mh(s){return s?s.reduce((e,t)=>{var n;return t.type===a.Fragment?[...e,...mh(t.children)]:((n=t.type)===null||n===void 0?void 0:n.name)==="CarouselSlide"?[...e,t]:e},[]):[]}function uo({val:s,max:e,min:t=0}){return s>e?uo({val:s-(e+1),max:e,min:t}):s<t?uo({val:s+(e+1),max:e,min:t}):s}function UI(s,e){let t;return e?function(...n){const i=this;t||(s.apply(i,n),t=!0,setTimeout(()=>t=!1,e))}:s}function zI(s,e){let t;return function(...n){t&&clearTimeout(t),t=setTimeout(()=>{s(...n),t=null},e)}}function GI(s="",e={}){return Object.entries(e).reduce((t,[n,i])=>t.replace(`{${n}}`,String(i)),s)}var jI=a.defineComponent({name:"ARIA",setup(){const s=a.inject("config",a.reactive(Object.assign({},lt))),e=a.inject("currentSlide",a.ref(0)),t=a.inject("slidesCount",a.ref(0));return()=>a.h("div",{class:["carousel__liveregion","carousel__sr-only"],"aria-live":"polite","aria-atomic":"true"},GI(s.i18n.itemXofY,{currentSlide:e.value+1,slidesCount:t.value}))}}),HI=a.defineComponent({name:"Carousel",props:hh,setup(s,{slots:e,emit:t,expose:n}){var i;const r=a.ref(null),o=a.ref([]),l=a.ref(0),d=a.ref(0),c=a.reactive(Object.assign({},lt));let u=Object.assign({},lt),m;const f=a.ref((i=s.modelValue)!==null&&i!==void 0?i:0),p=a.ref(0),h=a.ref(0),g=a.ref(0),y=a.ref(0);let b,w;a.provide("config",c),a.provide("slidesCount",d),a.provide("currentSlide",f),a.provide("maxSlide",g),a.provide("minSlide",y),a.provide("slideWidth",l);function _(){m=Object.assign({},s.breakpoints),u=Object.assign(Object.assign(Object.assign({},u),s),{i18n:Object.assign(Object.assign({},u.i18n),s.i18n),breakpoints:void 0}),E(u)}function C(){if(!m||!Object.keys(m).length)return;const x=Object.keys(m).map($=>Number($)).sort(($,de)=>+de-+$);let z=Object.assign({},u);x.some($=>{const de=window.matchMedia(`(min-width: ${$}px)`).matches;return de&&(z=Object.assign(Object.assign({},z),m[$])),de}),E(z)}function E(x){Object.entries(x).forEach(([z,$])=>c[z]=$)}const A=zI(()=>{C(),T()},16);function T(){if(!r.value)return;const x=r.value.getBoundingClientRect();l.value=x.width/c.itemsToShow}function R(){d.value<=0||(h.value=Math.ceil((d.value-1)/2),g.value=MI({config:c,slidesCount:d.value}),y.value=VI({config:c,slidesCount:d.value}),c.wrapAround||(f.value=co({val:f.value,max:g.value,min:y.value})))}a.onMounted(()=>{a.nextTick(()=>T()),setTimeout(()=>T(),1e3),C(),G(),window.addEventListener("resize",A,{passive:!0}),t("init")}),a.onUnmounted(()=>{w&&clearTimeout(w),b&&clearInterval(b),window.removeEventListener("resize",A,{passive:!0})});let I=!1;const v={x:0,y:0},M={x:0,y:0},j=a.reactive({x:0,y:0}),U=a.ref(!1),se=a.ref(!1),re=()=>{U.value=!0},ie=()=>{U.value=!1};function ue(x){["INPUT","TEXTAREA","SELECT"].includes(x.target.tagName)||(I=x.type==="touchstart",I||x.preventDefault(),!(!I&&x.button!==0||W.value)&&(v.x=I?x.touches[0].clientX:x.clientX,v.y=I?x.touches[0].clientY:x.clientY,document.addEventListener(I?"touchmove":"mousemove",he,!0),document.addEventListener(I?"touchend":"mouseup",J,!0)))}const he=UI(x=>{se.value=!0,M.x=I?x.touches[0].clientX:x.clientX,M.y=I?x.touches[0].clientY:x.clientY;const z=M.x-v.x,$=M.y-v.y;j.y=$,j.x=z},c.throttle);function J(){const x=c.dir==="rtl"?-1:1,z=Math.sign(j.x)*.4,$=Math.round(j.x/l.value+z)*x;if($&&!I){const de=Qe=>{Qe.stopPropagation(),window.removeEventListener("click",de,!0)};window.addEventListener("click",de,!0)}q(f.value-$),j.x=0,j.y=0,se.value=!1,document.removeEventListener(I?"touchmove":"mousemove",he,!0),document.removeEventListener(I?"touchend":"mouseup",J,!0)}function G(){!c.autoplay||c.autoplay<=0||(b=setInterval(()=>{c.pauseAutoplayOnHover&&U.value||me()},c.autoplay))}function ce(){b&&(clearInterval(b),b=null),G()}const W=a.ref(!1);function q(x){const z=c.wrapAround?x:co({val:x,max:g.value,min:y.value});f.value===z||W.value||(t("slide-start",{slidingToIndex:x,currentSlideIndex:f.value,prevSlideIndex:p.value,slidesCount:d.value}),W.value=!0,p.value=f.value,f.value=z,w=setTimeout(()=>{if(c.wrapAround){const $=uo({val:z,max:g.value,min:0});$!==f.value&&(f.value=$,t("loop",{currentSlideIndex:f.value,slidingToIndex:x}))}t("update:modelValue",f.value),t("slide-end",{currentSlideIndex:f.value,prevSlideIndex:p.value,slidesCount:d.value}),W.value=!1,ce()},c.transition))}function me(){q(f.value+c.itemsToScroll)}function ye(){q(f.value-c.itemsToScroll)}const Ce={slideTo:q,next:me,prev:ye};a.provide("nav",Ce),a.provide("isSliding",W);const Q=a.computed(()=>$I({config:c,currentSlide:f.value,slidesCount:d.value}));a.provide("slidesToScroll",Q);const Ee=a.computed(()=>{const x=c.dir==="rtl"?-1:1,z=Q.value*l.value*x;return{transform:`translateX(${j.x-z}px)`,transition:`${W.value?c.transition:0}ms`,margin:c.wrapAround?`0 -${d.value*l.value}px`:"",width:"100%"}});function Te(){_(),C(),R(),T(),ce()}Object.keys(hh).forEach(x=>{["modelValue"].includes(x)||a.watch(()=>s[x],Te)}),a.watch(()=>s.modelValue,x=>{x!==f.value&&q(Number(x))}),a.watch(d,R),t("before-init"),_();const Ve={config:c,slidesCount:d,slideWidth:l,next:me,prev:ye,slideTo:q,currentSlide:f,maxSlide:g,minSlide:y,middleSlide:h};n({updateBreakpointsConfigs:C,updateSlidesData:R,updateSlideWidth:T,initDefaultConfigs:_,restartCarousel:Te,slideTo:q,next:me,prev:ye,nav:Ce,data:Ve});const dt=e.default||e.slides,ut=e.addons,ht=a.reactive(Ve);return()=>{const x=mh(dt==null?void 0:dt(ht)),z=(ut==null?void 0:ut(ht))||[];x.forEach(($e,Ge)=>$e.props.index=Ge);let $=x;if(c.wrapAround){const $e=x.map((je,Re)=>a.cloneVNode(je,{index:-x.length+Re,isClone:!0,key:`clone-before-${Re}`})),Ge=x.map((je,Re)=>a.cloneVNode(je,{index:x.length+Re,isClone:!0,key:`clone-after-${Re}`}));$=[...$e,...x,...Ge]}o.value=x,d.value=Math.max(x.length,1);const de=a.h("ol",{class:"carousel__track",style:Ee.value,onMousedownCapture:c.mouseDrag?ue:null,onTouchstartPassiveCapture:c.touchDrag?ue:null},$),Qe=a.h("div",{class:"carousel__viewport"},de);return a.h("section",{ref:r,class:{carousel:!0,"is-sliding":W.value,"is-dragging":se.value,"is-hover":U.value,"carousel--rtl":c.dir==="rtl"},dir:c.dir,"aria-label":c.i18n.ariaGallery,tabindex:"0",onMouseenter:re,onMouseleave:ie},[Qe,z,a.h(jI)])}}}),fh;(function(s){s.arrowUp="arrowUp",s.arrowDown="arrowDown",s.arrowRight="arrowRight",s.arrowLeft="arrowLeft"})(fh||(fh={}));var WI=a.defineComponent({name:"CarouselSlide",props:{index:{type:Number,default:1},isClone:{type:Boolean,default:!1}},setup(s,{slots:e}){const t=a.inject("config",a.reactive(Object.assign({},lt))),n=a.inject("currentSlide",a.ref(0)),i=a.inject("slidesToScroll",a.ref(0)),r=a.inject("isSliding",a.ref(!1)),o=()=>s.index===n.value,l=()=>s.index===n.value-1,d=()=>s.index===n.value+1,c=()=>{const u=Math.floor(i.value),m=Math.ceil(i.value+t.itemsToShow-1);return s.index>=u&&s.index<=m};return()=>{var u;return a.h("li",{style:{width:`${100/t.itemsToShow}%`},class:{carousel__slide:!0,"carousel__slide--clone":s.isClone,"carousel__slide--visible":c(),"carousel__slide--active":o(),"carousel__slide--prev":l(),"carousel__slide--next":d(),"carousel__slide--sliding":r.value},"aria-hidden":!c()},(u=e.default)===null||u===void 0?void 0:u.call(e))}}});const KI=(s,e)=>{const t=s.__vccOpts||s;for(const[n,i]of e)t[n]=i;return t},qI=s=>(a.pushScopeId("data-v-54620d25"),s=s(),a.popScopeId(),s),YI={class:"gsc-carousel"},JI={key:0},XI=qI(()=>a.createElementVNode("div",null,"no hay",-1)),ZI=[XI],QI={class:"gsc-carousel__2d__slides"},e5={width:"9",height:"18",viewBox:"0 0 9 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t5=["fill"],s5={width:"9",height:"18",viewBox:"0 0 9 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},n5=["fill"],a5={class:"gsc-carousel__2d__navigation"},i5={width:"8",height:"15",viewBox:"0 0 8 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r5=["stroke"],o5={key:1,class:"gsc-carousel__2d__navigation__pagination"},l5=["onClick"],c5={width:"7",height:"15",viewBox:"0 0 7 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},d5=["stroke"],u5={__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:s=>["propName","value"].every(e=>e in s)},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"},arrowsMaxWidth:{type:String,default:"20px"},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(s,{expose:e,emit:t}){const n=s;a.useCssVars(g=>({"2c72d674":s.slideLeftArrowBackgroundImage,"90a63f40":s.slidesArrowsLeftAndRight,"2627d097":s.slideRightArrowBackgroundImage,"1904d43f":s.marginTop,cfb58986:s.secondarySlidesOpacity}));const i=a.ref(null),r=a.ref({}),o=a.ref(0),l=a.ref(!1);a.watch(i,g=>{g&&l.value?(l.value=!1,d(n.items)):g&&g.slideTo&&g.slideTo(o.value)},{deep:!0}),a.watch(()=>n.currentItemIndex,g=>{o.value!==g&&f(g)}),a.watch(()=>n.defaultItemByIndex,g=>{o.value!==g&&f(g)}),a.watch(()=>n.items,g=>{i.value?d(g):l.value=!0},{immediate:!0});function d(g){g&&g.length&&i.value&&setTimeout(()=>{if(n.defaultItemByProp){const y=n.items.findIndex(b=>b[n.defaultItemByProp.propName]===n.defaultItemByProp.value);y!==-1?(o.value=y,r.value=g[y]):(o.value=0,r.value=g[0])}else o.value=n.defaultItemByIndex,r.value=g[n.defaultItemByIndex];i.value.slideTo&&i.value.slideTo(o.value),r.value&&o.value===0&&t("input",{selectedItem:r.value,selectedItemIndex:o.value})},500)}function c(){i.value&&i.value.next()}function u(){i.value&&i.value.prev()}function m(){i.value&&i.value.updateSlideWidth()}function f(g){i.value&&i.value.slideTo(g)}function p(g){i.value.slideTo(g)}function h(g){const y=g.slidingToIndex<0?n.items.length-1:g.slidingToIndex===n.items.length?0:g.slidingToIndex;o.value=y,r.value=n.items[y],t("update:currentItemIndex",y),t("input",{selectedItem:r.value,selectedItemIndex:o.value})}return e({prev:u,next:c,updateSlideWidth:m,slideTo:f}),(g,y)=>(a.openBlock(),a.createElementBlock("div",YI,[n.is3d?(a.openBlock(),a.createElementBlock("div",JI,ZI)):(a.openBlock(),a.createElementBlock("div",{key:1,class:a.normalizeClass(["gsc-carousel__2d",{"main-slide-priority":s.isMainSlidePriority}])},[a.createElementVNode("div",QI,[a.createVNode(a.unref(HI),{ref_key:"carousel2d",ref:i,"items-to-show":s.itemsToShow,"wrap-around":s.wrapAround,onSlideStart:h},{default:a.withCtx(()=>[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(s.items,(b,w)=>(a.openBlock(),a.createBlock(a.unref(WI),{key:w},{default:a.withCtx(()=>[a.renderSlot(g.$slots,"default",{item:b},void 0,!0)]),_:2},1024))),128))]),_:3},8,["items-to-show","wrap-around"])]),s.areSlidesArrowsVisible&&s.items.length>1?(a.openBlock(),a.createElementBlock("div",{key:0,class:"gsc-carousel__2d__arrow-left",style:a.normalizeStyle("max-width:"+s.arrowsMaxWidth+"!important"),onClick:y[0]||(y[0]=b=>i.value.prev())},[a.createElementVNode("div",{class:a.normalizeClass(["gsc-carousel__2d__slide-button",{rounded:s.areSlidesArrowsRounded}])},[(a.openBlock(),a.createElementBlock("svg",e5,[a.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:s.arrowsColor},null,8,t5)]))],2)],4)):a.createCommentVNode("",!0),s.areSlidesArrowsVisible&&s.items.length>1?(a.openBlock(),a.createElementBlock("div",{key:1,class:"gsc-carousel__2d__arrow-right",style:a.normalizeStyle("max-width:"+s.arrowsMaxWidth+"!important"),onClick:y[1]||(y[1]=b=>c())},[a.createElementVNode("div",{class:a.normalizeClass(["gsc-carousel__2d__slide-button",{rounded:s.areSlidesArrowsRounded}])},[(a.openBlock(),a.createElementBlock("svg",s5,[a.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:s.arrowsColor},null,8,n5)]))],2)],4)):a.createCommentVNode("",!0),a.createElementVNode("div",a5,[s.areNavigationArrowsVisible?(a.openBlock(),a.createElementBlock("div",{key:0,class:"gsc-carousel__2d__navigation__arrow-left",onClick:y[2]||(y[2]=b=>u())},[(a.openBlock(),a.createElementBlock("svg",i5,[a.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:n.arrowsColor},null,8,r5)]))])):a.createCommentVNode("",!0),s.isPaginationVisible?(a.openBlock(),a.createElementBlock("div",o5,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(s.items,(b,w)=>(a.openBlock(),a.createElementBlock("div",{key:`i-${w}`,class:"gsc-carousel__2d__navigation__pagination__item",style:a.normalizeStyle({height:`${n.navigationHeight}px`,width:`${o.value===w?n.navigationActiveWidth:n.navigationActiveWidth/2}px`,borderRadius:`${n.navigationBorderRadius}px`,backgroundColor:`${o.value===w?n.navigationActiveColor:n.navigationColor}`,transition:"all 0.1s ease-in-out"}),onClick:_=>p(w)},null,12,l5))),128))])):a.createCommentVNode("",!0),s.areNavigationArrowsVisible?(a.openBlock(),a.createElementBlock("div",{key:2,class:"gsc-carousel__2d__navigation__arrow-right",onClick:y[3]||(y[3]=b=>i.value.next())},[(a.openBlock(),a.createElementBlock("svg",c5,[a.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:n.arrowsColor},null,8,d5)]))])):a.createCommentVNode("",!0)])],2))]))}},h5=KI(u5,[["__scopeId","data-v-54620d25"]]),gh=["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic"];function Z(s,e,t){return(e=f5(e))in s?Object.defineProperty(s,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):s[e]=t,s}function m5(s,e){if(typeof s!="object"||s===null)return s;var t=s[Symbol.toPrimitive];if(t!==void 0){var n=t.call(s,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(s)}function f5(s){var e=m5(s,"string");return typeof e=="symbol"?e:String(e)}function g5(s,e){if(!(s instanceof e))throw new TypeError("Cannot call a class as a function")}function ph(s,e){for(var t=0;t<e.length;t++){var n=e[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(s,n.key,n)}}function p5(s,e,t){return ph(s.prototype,e),ph(s,t),s}function y5(s,e,t){return e in s?Object.defineProperty(s,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):s[e]=t,s}function yh(s,e){var t=Object.keys(s);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(s);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(s,i).enumerable})),t.push.apply(t,n)}return t}function bh(s){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?yh(Object(t),!0).forEach(function(n){y5(s,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(s,Object.getOwnPropertyDescriptors(t)):yh(Object(t)).forEach(function(n){Object.defineProperty(s,n,Object.getOwnPropertyDescriptor(t,n))})}return s}var wh={addCSS:!0,thumbWidth:15,watch:!0};function b5(s,e){return(function(){return Array.from(document.querySelectorAll(e)).includes(this)}).call(s,e)}function w5(s,e){if(s&&e){var t=new Event(e,{bubbles:!0});s.dispatchEvent(t)}}var Sn=function(s){return s!=null?s.constructor:null},ho=function(s,e){return!!(s&&e&&s instanceof e)},Sh=function(s){return s==null},_h=function(s){return Sn(s)===Object},S5=function(s){return Sn(s)===Number&&!Number.isNaN(s)},kh=function(s){return Sn(s)===String},_5=function(s){return Sn(s)===Boolean},k5=function(s){return Sn(s)===Function},Eh=function(s){return Array.isArray(s)},Th=function(s){return ho(s,NodeList)},E5=function(s){return ho(s,Element)},T5=function(s){return ho(s,Event)},C5=function(s){return Sh(s)||(kh(s)||Eh(s)||Th(s))&&!s.length||_h(s)&&!Object.keys(s).length},pt={nullOrUndefined:Sh,object:_h,number:S5,string:kh,boolean:_5,function:k5,array:Eh,nodeList:Th,element:E5,event:T5,empty:C5};function x5(s){var e="".concat(s).match(/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/);return e?Math.max(0,(e[1]?e[1].length:0)-(e[2]?+e[2]:0)):0}function A5(s,e){if(1>e){var t=x5(e);return parseFloat(s.toFixed(t))}return Math.round(s/e)*e}var L5=function(){function s(e,t){g5(this,s),pt.element(e)?this.element=e:pt.string(e)&&(this.element=document.querySelector(e)),pt.element(this.element)&&pt.empty(this.element.rangeTouch)&&(this.config=bh({},wh,{},t),this.init())}return p5(s,[{key:"init",value:function(){s.enabled&&(this.config.addCSS&&(this.element.style.userSelect="none",this.element.style.webKitUserSelect="none",this.element.style.touchAction="manipulation"),this.listeners(!0),this.element.rangeTouch=this)}},{key:"destroy",value:function(){s.enabled&&(this.config.addCSS&&(this.element.style.userSelect="",this.element.style.webKitUserSelect="",this.element.style.touchAction=""),this.listeners(!1),this.element.rangeTouch=null)}},{key:"listeners",value:function(e){var t=this,n=e?"addEventListener":"removeEventListener";["touchstart","touchmove","touchend"].forEach(function(i){t.element[n](i,function(r){return t.set(r)},!1)})}},{key:"get",value:function(e){if(!s.enabled||!pt.event(e))return null;var t,n=e.target,i=e.changedTouches[0],r=parseFloat(n.getAttribute("min"))||0,o=parseFloat(n.getAttribute("max"))||100,l=parseFloat(n.getAttribute("step"))||1,d=n.getBoundingClientRect(),c=100/d.width*(this.config.thumbWidth/2)/100;return 0>(t=100/d.width*(i.clientX-d.left))?t=0:100<t&&(t=100),50>t?t-=(100-2*t)*c:50<t&&(t+=2*(t-50)*c),r+A5(t/100*(o-r),l)}},{key:"set",value:function(e){s.enabled&&pt.event(e)&&!e.target.disabled&&(e.preventDefault(),e.target.value=this.get(e),w5(e.target,e.type==="touchend"?"change":"input"))}}],[{key:"setup",value:function(e){var t=1<arguments.length&&arguments[1]!==void 0?arguments[1]:{},n=null;if(pt.empty(e)||pt.string(e)?n=Array.from(document.querySelectorAll(pt.string(e)?e:'input[type="range"]')):pt.element(e)?n=[e]:pt.nodeList(e)?n=Array.from(e):pt.array(e)&&(n=e.filter(pt.element)),pt.empty(n))return null;var i=bh({},wh,{},t);if(pt.string(e)&&i.watch){var r=new MutationObserver(function(o){Array.from(o).forEach(function(l){Array.from(l.addedNodes).forEach(function(d){pt.element(d)&&b5(d,e)&&new s(d,i)})})});r.observe(document.body,{childList:!0,subtree:!0})}return n.map(function(o){return new s(o,t)})}},{key:"enabled",get:function(){return"ontouchstart"in document.documentElement}}]),s}();const _n=s=>s!=null?s.constructor:null,is=(s,e)=>!!(s&&e&&s instanceof e),mo=s=>s==null,Ch=s=>_n(s)===Object,I5=s=>_n(s)===Number&&!Number.isNaN(s),Ba=s=>_n(s)===String,B5=s=>_n(s)===Boolean,xh=s=>typeof s=="function",Ah=s=>Array.isArray(s),R5=s=>is(s,WeakMap),Lh=s=>is(s,NodeList),v5=s=>_n(s)===Text,N5=s=>is(s,Event),D5=s=>is(s,KeyboardEvent),P5=s=>is(s,window.TextTrackCue)||is(s,window.VTTCue),O5=s=>is(s,TextTrack)||!mo(s)&&Ba(s.kind),F5=s=>is(s,Promise)&&xh(s.then),M5=s=>s!==null&&typeof s=="object"&&s.nodeType===1&&typeof s.style=="object"&&typeof s.ownerDocument=="object",Ih=s=>mo(s)||(Ba(s)||Ah(s)||Lh(s))&&!s.length||Ch(s)&&!Object.keys(s).length;var k={nullOrUndefined:mo,object:Ch,number:I5,string:Ba,boolean:B5,function:xh,array:Ah,weakMap:R5,nodeList:Lh,element:M5,textNode:v5,event:N5,keyboardEvent:D5,cue:P5,track:O5,promise:F5,url:s=>{if(is(s,window.URL))return!0;if(!Ba(s))return!1;let e=s;s.startsWith("http://")&&s.startsWith("https://")||(e=`http://${s}`);try{return!Ih(new URL(e).hostname)}catch{return!1}},empty:Ih};const fo=(()=>{const s=document.createElement("span"),e={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"},t=Object.keys(e).find(n=>s.style[n]!==void 0);return!!k.string(t)&&e[t]})();function Bh(s,e){setTimeout(()=>{try{s.hidden=!0,s.offsetHeight,s.hidden=!1}catch{}},e)}const V5=!!window.document.documentMode,$5=/Edge/g.test(navigator.userAgent),U5="WebkitAppearance"in document.documentElement.style&&!/Edge/g.test(navigator.userAgent),z5=/iPhone|iPod/gi.test(navigator.userAgent)&&navigator.maxTouchPoints>1,G5=navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1,j5=/iPad|iPhone|iPod/gi.test(navigator.userAgent)&&navigator.maxTouchPoints>1;var tt={isIE:V5,isEdge:$5,isWebKit:U5,isIPhone:z5,isIPadOS:G5,isIos:j5};function H5(s){return JSON.parse(JSON.stringify(s))}function Rh(s,e){return e.split(".").reduce((t,n)=>t&&t[n],s)}function Ue(s={},...e){if(!e.length)return s;const t=e.shift();return k.object(t)?(Object.keys(t).forEach(n=>{k.object(t[n])?(Object.keys(s).includes(n)||Object.assign(s,{[n]:{}}),Ue(s[n],t[n])):Object.assign(s,{[n]:t[n]})}),Ue(s,...e)):s}function vh(s,e){const t=s.length?s:[s];Array.from(t).reverse().forEach((n,i)=>{const r=i>0?e.cloneNode(!0):e,o=n.parentNode,l=n.nextSibling;r.appendChild(n),l?o.insertBefore(r,l):o.appendChild(r)})}function go(s,e){k.element(s)&&!k.empty(e)&&Object.entries(e).filter(([,t])=>!k.nullOrUndefined(t)).forEach(([t,n])=>s.setAttribute(t,n))}function fe(s,e,t){const n=document.createElement(s);return k.object(e)&&go(n,e),k.string(t)&&(n.innerText=t),n}function W5(s,e){k.element(s)&&k.element(e)&&e.parentNode.insertBefore(s,e.nextSibling)}function Nh(s,e,t,n){k.element(e)&&e.appendChild(fe(s,t,n))}function rs(s){k.nodeList(s)||k.array(s)?Array.from(s).forEach(rs):k.element(s)&&k.element(s.parentNode)&&s.parentNode.removeChild(s)}function Ra(s){if(!k.element(s))return;let{length:e}=s.childNodes;for(;e>0;)s.removeChild(s.lastChild),e-=1}function va(s,e){return k.element(e)&&k.element(e.parentNode)&&k.element(s)?(e.parentNode.replaceChild(s,e),s):null}function Yt(s,e){if(!k.string(s)||k.empty(s))return{};const t={},n=Ue({},e);return s.split(",").forEach(i=>{const r=i.trim(),o=r.replace(".",""),l=r.replace(/[[\]]/g,"").split("="),[d]=l,c=l.length>1?l[1].replace(/["']/g,""):"";switch(r.charAt(0)){case".":k.string(n.class)?t.class=`${n.class} ${o}`:t.class=o;break;case"#":t.id=r.replace("#","");break;case"[":t[d]=c}}),Ue(n,t)}function As(s,e){if(!k.element(s))return;let t=e;k.boolean(t)||(t=!s.hidden),s.hidden=t}function Ne(s,e,t){if(k.nodeList(s))return Array.from(s).map(n=>Ne(n,e,t));if(k.element(s)){let n="toggle";return t!==void 0&&(n=t?"add":"remove"),s.classList[n](e),s.classList.contains(e)}return!1}function Na(s,e){return k.element(s)&&s.classList.contains(e)}function Ls(s,e){const{prototype:t}=Element;return(t.matches||t.webkitMatchesSelector||t.mozMatchesSelector||t.msMatchesSelector||function(){return Array.from(document.querySelectorAll(e)).includes(this)}).call(s,e)}function K5(s,e){const{prototype:t}=Element;return(t.closest||function(){let n=this;do{if(Ls.matches(n,e))return n;n=n.parentElement||n.parentNode}while(n!==null&&n.nodeType===1);return null}).call(s,e)}function kn(s){return this.elements.container.querySelectorAll(s)}function Xe(s){return this.elements.container.querySelector(s)}function po(s=null,e=!1){k.element(s)&&s.focus({preventScroll:!0,focusVisible:e})}const Dh={"audio/ogg":"vorbis","audio/wav":"1","video/webm":"vp8, vorbis","video/mp4":"avc1.42E01E, mp4a.40.2","video/ogg":"theora"},ze={audio:"canPlayType"in document.createElement("audio"),video:"canPlayType"in document.createElement("video"),check(s,e){const t=ze[s]||e!=="html5";return{api:t,ui:t&&ze.rangeInput}},pip:!(tt.isIPhone||!k.function(fe("video").webkitSetPresentationMode)&&(!document.pictureInPictureEnabled||fe("video").disablePictureInPicture)),airplay:k.function(window.WebKitPlaybackTargetAvailabilityEvent),playsinline:"playsInline"in document.createElement("video"),mime(s){if(k.empty(s))return!1;const[e]=s.split("/");let t=s;if(!this.isHTML5||e!==this.type)return!1;Object.keys(Dh).includes(t)&&(t+=`; codecs="${Dh[s]}"`);try{return!!(t&&this.media.canPlayType(t).replace(/no/,""))}catch{return!1}},textTracks:"textTracks"in document.createElement("video"),rangeInput:(()=>{const s=document.createElement("input");return s.type="range",s.type==="range"})(),touch:"ontouchstart"in document.documentElement,transitions:fo!==!1,reducedMotion:"matchMedia"in window&&window.matchMedia("(prefers-reduced-motion)").matches},q5=(()=>{let s=!1;try{const e=Object.defineProperty({},"passive",{get:()=>(s=!0,null)});window.addEventListener("test",null,e),window.removeEventListener("test",null,e)}catch{}return s})();function En(s,e,t,n=!1,i=!0,r=!1){if(!s||!("addEventListener"in s)||k.empty(e)||!k.function(t))return;const o=e.split(" ");let l=r;q5&&(l={passive:i,capture:r}),o.forEach(d=>{this&&this.eventListeners&&n&&this.eventListeners.push({element:s,type:d,callback:t,options:l}),s[n?"addEventListener":"removeEventListener"](d,t,l)})}function Ie(s,e="",t,n=!0,i=!1){En.call(this,s,e,t,!0,n,i)}function Da(s,e="",t,n=!0,i=!1){En.call(this,s,e,t,!1,n,i)}function yo(s,e="",t,n=!0,i=!1){const r=(...o)=>{Da(s,e,r,n,i),t.apply(this,o)};En.call(this,s,e,r,!0,n,i)}function pe(s,e="",t=!1,n={}){if(!k.element(s)||k.empty(e))return;const i=new CustomEvent(e,{bubbles:t,detail:{...n,plyr:this}});s.dispatchEvent(i)}function Y5(){this&&this.eventListeners&&(this.eventListeners.forEach(s=>{const{element:e,type:t,callback:n,options:i}=s;e.removeEventListener(t,n,i)}),this.eventListeners=[])}function J5(){return new Promise(s=>this.ready?setTimeout(s,0):Ie.call(this,this.elements.container,"ready",s)).then(()=>{})}function Jt(s){k.promise(s)&&s.then(null,()=>{})}function bo(s){return k.array(s)?s.filter((e,t)=>s.indexOf(e)===t):s}function Ph(s,e){return k.array(s)&&s.length?s.reduce((t,n)=>Math.abs(n-e)<Math.abs(t-e)?n:t):null}function Oh(s){return!(!window||!window.CSS)&&window.CSS.supports(s)}const Fh=[[1,1],[4,3],[3,4],[5,4],[4,5],[3,2],[2,3],[16,10],[10,16],[16,9],[9,16],[21,9],[9,21],[32,9],[9,32]].reduce((s,[e,t])=>({...s,[e/t]:[e,t]}),{});function Mh(s){return k.array(s)||k.string(s)&&s.includes(":")?(k.array(s)?s:s.split(":")).map(Number).every(k.number):!1}function Pa(s){if(!k.array(s)||!s.every(k.number))return null;const[e,t]=s,n=(r,o)=>o===0?r:n(o,r%o),i=n(e,t);return[e/i,t/i]}function wo(s){const e=n=>Mh(n)?n.split(":").map(Number):null;let t=e(s);if(t===null&&(t=e(this.config.ratio)),t===null&&!k.empty(this.embed)&&k.array(this.embed.ratio)&&({ratio:t}=this.embed),t===null&&this.isHTML5){const{videoWidth:n,videoHeight:i}=this.media;t=[n,i]}return Pa(t)}function js(s){if(!this.isVideo)return{};const{wrapper:e}=this.elements,t=wo.call(this,s);if(!k.array(t))return{};const[n,i]=Pa(t),r=100/n*i;if(Oh(`aspect-ratio: ${n}/${i}`)?e.style.aspectRatio=`${n}/${i}`:e.style.paddingBottom=`${r}%`,this.isVimeo&&!this.config.vimeo.premium&&this.supported.ui){const o=100/this.media.offsetWidth*parseInt(window.getComputedStyle(this.media).paddingBottom,10),l=(o-r)/(o/50);this.fullscreen.active?e.style.paddingBottom=null:this.media.style.transform=`translateY(-${l}%)`}else this.isHTML5&&e.classList.add(this.config.classNames.videoFixedRatio);return{padding:r,ratio:t}}function Vh(s,e,t=.05){const n=s/e,i=Ph(Object.keys(Fh),n);return Math.abs(i-n)<=t?Fh[i]:[s,e]}function X5(){return[Math.max(document.documentElement.clientWidth||0,window.innerWidth||0),Math.max(document.documentElement.clientHeight||0,window.innerHeight||0)]}const us={getSources(){return this.isHTML5?Array.from(this.media.querySelectorAll("source")).filter(s=>{const e=s.getAttribute("type");return!!k.empty(e)||ze.mime.call(this,e)}):[]},getQualityOptions(){return this.config.quality.forced?this.config.quality.options:us.getSources.call(this).map(s=>Number(s.getAttribute("size"))).filter(Boolean)},setup(){if(!this.isHTML5)return;const s=this;s.options.speed=s.config.speed.options,k.empty(this.config.ratio)||js.call(s),Object.defineProperty(s.media,"quality",{get(){const e=us.getSources.call(s).find(t=>t.getAttribute("src")===s.source);return e&&Number(e.getAttribute("size"))},set(e){if(s.quality!==e){if(s.config.quality.forced&&k.function(s.config.quality.onChange))s.config.quality.onChange(e);else{const t=us.getSources.call(s).find(d=>Number(d.getAttribute("size"))===e);if(!t)return;const{currentTime:n,paused:i,preload:r,readyState:o,playbackRate:l}=s.media;s.media.src=t.getAttribute("src"),(r!=="none"||o)&&(s.once("loadedmetadata",()=>{s.speed=l,s.currentTime=n,i||Jt(s.play())}),s.media.load())}pe.call(s,s.media,"qualitychange",!1,{quality:e})}}})},cancelRequests(){this.isHTML5&&(rs(us.getSources.call(this)),this.media.setAttribute("src",this.config.blankVideo),this.media.load(),this.debug.log("Cancelled network requests"))}};function Z5(s){return`${s}-${Math.floor(1e4*Math.random())}`}function So(s,...e){return k.empty(s)?s:s.toString().replace(/{(\d+)}/g,(t,n)=>e[n].toString())}function Q5(s,e){return s===0||e===0||Number.isNaN(s)||Number.isNaN(e)?0:(s/e*100).toFixed(2)}const Tn=(s="",e="",t="")=>s.replace(new RegExp(e.toString().replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1"),"g"),t.toString()),$h=(s="")=>s.toString().replace(/\w\S*/g,e=>e.charAt(0).toUpperCase()+e.slice(1).toLowerCase());function e4(s=""){let e=s.toString();return e=Tn(e,"-"," "),e=Tn(e,"_"," "),e=$h(e),Tn(e," ","")}function t4(s=""){let e=s.toString();return e=e4(e),e.charAt(0).toLowerCase()+e.slice(1)}function s4(s){const e=document.createDocumentFragment(),t=document.createElement("div");return e.appendChild(t),t.innerHTML=s,e.firstChild.innerText}function n4(s){const e=document.createElement("div");return e.appendChild(s),e.innerHTML}const Uh={pip:"PIP",airplay:"AirPlay",html5:"HTML5",vimeo:"Vimeo",youtube:"YouTube"},st={get(s="",e={}){if(k.empty(s)||k.empty(e))return"";let t=Rh(e.i18n,s);if(k.empty(t))return Object.keys(Uh).includes(s)?Uh[s]:"";const n={"{seektime}":e.seekTime,"{title}":e.title};return Object.entries(n).forEach(([i,r])=>{t=Tn(t,i,r)}),t}};class Cn{constructor(e){Z(this,"get",t=>{if(!Cn.supported||!this.enabled)return null;const n=window.localStorage.getItem(this.key);if(k.empty(n))return null;const i=JSON.parse(n);return k.string(t)&&t.length?i[t]:i}),Z(this,"set",t=>{if(!Cn.supported||!this.enabled||!k.object(t))return;let n=this.get();k.empty(n)&&(n={}),Ue(n,t);try{window.localStorage.setItem(this.key,JSON.stringify(n))}catch{}}),this.enabled=e.config.storage.enabled,this.key=e.config.storage.key}static get supported(){try{if(!("localStorage"in window))return!1;const e="___test";return window.localStorage.setItem(e,e),window.localStorage.removeItem(e),!0}catch{return!1}}}function xn(s,e="text"){return new Promise((t,n)=>{try{const i=new XMLHttpRequest;if(!("withCredentials"in i))return;i.addEventListener("load",()=>{if(e==="text")try{t(JSON.parse(i.responseText))}catch{t(i.responseText)}else t(i.response)}),i.addEventListener("error",()=>{throw new Error(i.status)}),i.open("GET",s,!0),i.responseType=e,i.send()}catch(i){n(i)}})}function zh(s,e){if(!k.string(s))return;const t="cache",n=k.string(e);let i=!1;const r=()=>document.getElementById(e)!==null,o=(l,d)=>{l.innerHTML=d,n&&r()||document.body.insertAdjacentElement("afterbegin",l)};if(!n||!r()){const l=Cn.supported,d=document.createElement("div");if(d.setAttribute("hidden",""),n&&d.setAttribute("id",e),l){const c=window.localStorage.getItem(`${t}-${e}`);if(i=c!==null,i){const u=JSON.parse(c);o(d,u.content)}}xn(s).then(c=>{if(!k.empty(c)){if(l)try{window.localStorage.setItem(`${t}-${e}`,JSON.stringify({content:c}))}catch{}o(d,c)}}).catch(()=>{})}}const Gh=s=>Math.trunc(s/60/60%60,10),a4=s=>Math.trunc(s/60%60,10),i4=s=>Math.trunc(s%60,10);function Oa(s=0,e=!1,t=!1){if(!k.number(s))return Oa(void 0,e,t);const n=l=>`0${l}`.slice(-2);let i=Gh(s);const r=a4(s),o=i4(s);return i=e||i>0?`${i}:`:"",`${t&&s>0?"-":""}${i}${n(r)}:${n(o)}`}const X={getIconUrl(){const s=new URL(this.config.iconUrl,window.location),e=window.location.host?window.location.host:window.top.location.host,t=s.host!==e||tt.isIE&&!window.svg4everybody;return{url:this.config.iconUrl,cors:t}},findElements(){try{return this.elements.controls=Xe.call(this,this.config.selectors.controls.wrapper),this.elements.buttons={play:kn.call(this,this.config.selectors.buttons.play),pause:Xe.call(this,this.config.selectors.buttons.pause),restart:Xe.call(this,this.config.selectors.buttons.restart),rewind:Xe.call(this,this.config.selectors.buttons.rewind),fastForward:Xe.call(this,this.config.selectors.buttons.fastForward),mute:Xe.call(this,this.config.selectors.buttons.mute),pip:Xe.call(this,this.config.selectors.buttons.pip),airplay:Xe.call(this,this.config.selectors.buttons.airplay),settings:Xe.call(this,this.config.selectors.buttons.settings),captions:Xe.call(this,this.config.selectors.buttons.captions),fullscreen:Xe.call(this,this.config.selectors.buttons.fullscreen)},this.elements.progress=Xe.call(this,this.config.selectors.progress),this.elements.inputs={seek:Xe.call(this,this.config.selectors.inputs.seek),volume:Xe.call(this,this.config.selectors.inputs.volume)},this.elements.display={buffer:Xe.call(this,this.config.selectors.display.buffer),currentTime:Xe.call(this,this.config.selectors.display.currentTime),duration:Xe.call(this,this.config.selectors.display.duration)},k.element(this.elements.progress)&&(this.elements.display.seekTooltip=this.elements.progress.querySelector(`.${this.config.classNames.tooltip}`)),!0}catch(s){return this.debug.warn("It looks like there is a problem with your custom controls HTML",s),this.toggleNativeControls(!0),!1}},createIcon(s,e){const t="http://www.w3.org/2000/svg",n=X.getIconUrl.call(this),i=`${n.cors?"":n.url}#${this.config.iconPrefix}`,r=document.createElementNS(t,"svg");go(r,Ue(e,{"aria-hidden":"true",focusable:"false"}));const o=document.createElementNS(t,"use"),l=`${i}-${s}`;return"href"in o&&o.setAttributeNS("http://www.w3.org/1999/xlink","href",l),o.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",l),r.appendChild(o),r},createLabel(s,e={}){const t=st.get(s,this.config);return fe("span",{...e,class:[e.class,this.config.classNames.hidden].filter(Boolean).join(" ")},t)},createBadge(s){if(k.empty(s))return null;const e=fe("span",{class:this.config.classNames.menu.value});return e.appendChild(fe("span",{class:this.config.classNames.menu.badge},s)),e},createButton(s,e){const t=Ue({},e);let n=t4(s);const i={element:"button",toggle:!1,label:null,icon:null,labelPressed:null,iconPressed:null};switch(["element","icon","label"].forEach(o=>{Object.keys(t).includes(o)&&(i[o]=t[o],delete t[o])}),i.element!=="button"||Object.keys(t).includes("type")||(t.type="button"),Object.keys(t).includes("class")?t.class.split(" ").some(o=>o===this.config.classNames.control)||Ue(t,{class:`${t.class} ${this.config.classNames.control}`}):t.class=this.config.classNames.control,s){case"play":i.toggle=!0,i.label="play",i.labelPressed="pause",i.icon="play",i.iconPressed="pause";break;case"mute":i.toggle=!0,i.label="mute",i.labelPressed="unmute",i.icon="volume",i.iconPressed="muted";break;case"captions":i.toggle=!0,i.label="enableCaptions",i.labelPressed="disableCaptions",i.icon="captions-off",i.iconPressed="captions-on";break;case"fullscreen":i.toggle=!0,i.label="enterFullscreen",i.labelPressed="exitFullscreen",i.icon="enter-fullscreen",i.iconPressed="exit-fullscreen";break;case"play-large":t.class+=` ${this.config.classNames.control}--overlaid`,n="play",i.label="play",i.icon="play";break;default:k.empty(i.label)&&(i.label=n),k.empty(i.icon)&&(i.icon=s)}const r=fe(i.element);return i.toggle?(r.appendChild(X.createIcon.call(this,i.iconPressed,{class:"icon--pressed"})),r.appendChild(X.createIcon.call(this,i.icon,{class:"icon--not-pressed"})),r.appendChild(X.createLabel.call(this,i.labelPressed,{class:"label--pressed"})),r.appendChild(X.createLabel.call(this,i.label,{class:"label--not-pressed"}))):(r.appendChild(X.createIcon.call(this,i.icon)),r.appendChild(X.createLabel.call(this,i.label))),Ue(t,Yt(this.config.selectors.buttons[n],t)),go(r,t),n==="play"?(k.array(this.elements.buttons[n])||(this.elements.buttons[n]=[]),this.elements.buttons[n].push(r)):this.elements.buttons[n]=r,r},createRange(s,e){const t=fe("input",Ue(Yt(this.config.selectors.inputs[s]),{type:"range",min:0,max:100,step:.01,value:0,autocomplete:"off",role:"slider","aria-label":st.get(s,this.config),"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":0},e));return this.elements.inputs[s]=t,X.updateRangeFill.call(this,t),L5.setup(t),t},createProgress(s,e){const t=fe("progress",Ue(Yt(this.config.selectors.display[s]),{min:0,max:100,value:0,role:"progressbar","aria-hidden":!0},e));if(s!=="volume"){t.appendChild(fe("span",null,"0"));const n={played:"played",buffer:"buffered"}[s],i=n?st.get(n,this.config):"";t.innerText=`% ${i.toLowerCase()}`}return this.elements.display[s]=t,t},createTime(s,e){const t=Yt(this.config.selectors.display[s],e),n=fe("div",Ue(t,{class:`${t.class?t.class:""} ${this.config.classNames.display.time} `.trim(),"aria-label":st.get(s,this.config),role:"timer"}),"00:00");return this.elements.display[s]=n,n},bindMenuItemShortcuts(s,e){Ie.call(this,s,"keydown keyup",t=>{if(![" ","ArrowUp","ArrowDown","ArrowRight"].includes(t.key)||(t.preventDefault(),t.stopPropagation(),t.type==="keydown"))return;const n=Ls(s,'[role="menuitemradio"]');if(!n&&[" ","ArrowRight"].includes(t.key))X.showMenuPanel.call(this,e,!0);else{let i;t.key!==" "&&(t.key==="ArrowDown"||n&&t.key==="ArrowRight"?(i=s.nextElementSibling,k.element(i)||(i=s.parentNode.firstElementChild)):(i=s.previousElementSibling,k.element(i)||(i=s.parentNode.lastElementChild)),po.call(this,i,!0))}},!1),Ie.call(this,s,"keyup",t=>{t.key==="Return"&&X.focusFirstMenuItem.call(this,null,!0)})},createMenuItem({value:s,list:e,type:t,title:n,badge:i=null,checked:r=!1}){const o=Yt(this.config.selectors.inputs[t]),l=fe("button",Ue(o,{type:"button",role:"menuitemradio",class:`${this.config.classNames.control} ${o.class?o.class:""}`.trim(),"aria-checked":r,value:s})),d=fe("span");d.innerHTML=n,k.element(i)&&d.appendChild(i),l.appendChild(d),Object.defineProperty(l,"checked",{enumerable:!0,get:()=>l.getAttribute("aria-checked")==="true",set(c){c&&Array.from(l.parentNode.children).filter(u=>Ls(u,'[role="menuitemradio"]')).forEach(u=>u.setAttribute("aria-checked","false")),l.setAttribute("aria-checked",c?"true":"false")}}),this.listeners.bind(l,"click keyup",c=>{if(!k.keyboardEvent(c)||c.key===" "){switch(c.preventDefault(),c.stopPropagation(),l.checked=!0,t){case"language":this.currentTrack=Number(s);break;case"quality":this.quality=s;break;case"speed":this.speed=parseFloat(s)}X.showMenuPanel.call(this,"home",k.keyboardEvent(c))}},t,!1),X.bindMenuItemShortcuts.call(this,l,t),e.appendChild(l)},formatTime(s=0,e=!1){return k.number(s)?Oa(s,Gh(this.duration)>0,e):s},updateTimeDisplay(s=null,e=0,t=!1){k.element(s)&&k.number(e)&&(s.innerText=X.formatTime(e,t))},updateVolume(){this.supported.ui&&(k.element(this.elements.inputs.volume)&&X.setRange.call(this,this.elements.inputs.volume,this.muted?0:this.volume),k.element(this.elements.buttons.mute)&&(this.elements.buttons.mute.pressed=this.muted||this.volume===0))},setRange(s,e=0){k.element(s)&&(s.value=e,X.updateRangeFill.call(this,s))},updateProgress(s){if(!this.supported.ui||!k.event(s))return;let e=0;const t=(n,i)=>{const r=k.number(i)?i:0,o=k.element(n)?n:this.elements.display.buffer;if(k.element(o)){o.value=r;const l=o.getElementsByTagName("span")[0];k.element(l)&&(l.childNodes[0].nodeValue=r)}};if(s)switch(s.type){case"timeupdate":case"seeking":case"seeked":e=Q5(this.currentTime,this.duration),s.type==="timeupdate"&&X.setRange.call(this,this.elements.inputs.seek,e);break;case"playing":case"progress":t(this.elements.display.buffer,100*this.buffered)}},updateRangeFill(s){const e=k.event(s)?s.target:s;if(k.element(e)&&e.getAttribute("type")==="range"){if(Ls(e,this.config.selectors.inputs.seek)){e.setAttribute("aria-valuenow",this.currentTime);const t=X.formatTime(this.currentTime),n=X.formatTime(this.duration),i=st.get("seekLabel",this.config);e.setAttribute("aria-valuetext",i.replace("{currentTime}",t).replace("{duration}",n))}else if(Ls(e,this.config.selectors.inputs.volume)){const t=100*e.value;e.setAttribute("aria-valuenow",t),e.setAttribute("aria-valuetext",`${t.toFixed(1)}%`)}else e.setAttribute("aria-valuenow",e.value);(tt.isWebKit||tt.isIPadOS)&&e.style.setProperty("--value",e.value/e.max*100+"%")}},updateSeekTooltip(s){var e,t;if(!this.config.tooltips.seek||!k.element(this.elements.inputs.seek)||!k.element(this.elements.display.seekTooltip)||this.duration===0)return;const n=this.elements.display.seekTooltip,i=`${this.config.classNames.tooltip}--visible`,r=u=>Ne(n,i,u);if(this.touch)return void r(!1);let o=0;const l=this.elements.progress.getBoundingClientRect();if(k.event(s))o=100/l.width*(s.pageX-l.left);else{if(!Na(n,i))return;o=parseFloat(n.style.left,10)}o<0?o=0:o>100&&(o=100);const d=this.duration/100*o;n.innerText=X.formatTime(d);const c=(e=this.config.markers)===null||e===void 0||(t=e.points)===null||t===void 0?void 0:t.find(({time:u})=>u===Math.round(d));c&&n.insertAdjacentHTML("afterbegin",`${c.label}<br>`),n.style.left=`${o}%`,k.event(s)&&["mouseenter","mouseleave"].includes(s.type)&&r(s.type==="mouseenter")},timeUpdate(s){const e=!k.element(this.elements.display.duration)&&this.config.invertTime;X.updateTimeDisplay.call(this,this.elements.display.currentTime,e?this.duration-this.currentTime:this.currentTime,e),s&&s.type==="timeupdate"&&this.media.seeking||X.updateProgress.call(this,s)},durationUpdate(){if(!this.supported.ui||!this.config.invertTime&&this.currentTime)return;if(this.duration>=2**32)return As(this.elements.display.currentTime,!0),void As(this.elements.progress,!0);k.element(this.elements.inputs.seek)&&this.elements.inputs.seek.setAttribute("aria-valuemax",this.duration);const s=k.element(this.elements.display.duration);!s&&this.config.displayDuration&&this.paused&&X.updateTimeDisplay.call(this,this.elements.display.currentTime,this.duration),s&&X.updateTimeDisplay.call(this,this.elements.display.duration,this.duration),this.config.markers.enabled&&X.setMarkers.call(this),X.updateSeekTooltip.call(this)},toggleMenuButton(s,e){As(this.elements.settings.buttons[s],!e)},updateSetting(s,e,t){const n=this.elements.settings.panels[s];let i=null,r=e;if(s==="captions")i=this.currentTrack;else{if(i=k.empty(t)?this[s]:t,k.empty(i)&&(i=this.config[s].default),!k.empty(this.options[s])&&!this.options[s].includes(i))return void this.debug.warn(`Unsupported value of '${i}' for ${s}`);if(!this.config[s].options.includes(i))return void this.debug.warn(`Disabled value of '${i}' for ${s}`)}if(k.element(r)||(r=n&&n.querySelector('[role="menu"]')),!k.element(r))return;this.elements.settings.buttons[s].querySelector(`.${this.config.classNames.menu.value}`).innerHTML=X.getLabel.call(this,s,i);const o=r&&r.querySelector(`[value="${i}"]`);k.element(o)&&(o.checked=!0)},getLabel(s,e){switch(s){case"speed":return e===1?st.get("normal",this.config):`${e}&times;`;case"quality":if(k.number(e)){const t=st.get(`qualityLabel.${e}`,this.config);return t.length?t:`${e}p`}return $h(e);case"captions":return Be.getLabel.call(this);default:return null}},setQualityMenu(s){if(!k.element(this.elements.settings.panels.quality))return;const e="quality",t=this.elements.settings.panels.quality.querySelector('[role="menu"]');k.array(s)&&(this.options.quality=bo(s).filter(r=>this.config.quality.options.includes(r)));const n=!k.empty(this.options.quality)&&this.options.quality.length>1;if(X.toggleMenuButton.call(this,e,n),Ra(t),X.checkMenu.call(this),!n)return;const i=r=>{const o=st.get(`qualityBadge.${r}`,this.config);return o.length?X.createBadge.call(this,o):null};this.options.quality.sort((r,o)=>{const l=this.config.quality.options;return l.indexOf(r)>l.indexOf(o)?1:-1}).forEach(r=>{X.createMenuItem.call(this,{value:r,list:t,type:e,title:X.getLabel.call(this,"quality",r),badge:i(r)})}),X.updateSetting.call(this,e,t)},setCaptionsMenu(){if(!k.element(this.elements.settings.panels.captions))return;const s="captions",e=this.elements.settings.panels.captions.querySelector('[role="menu"]'),t=Be.getTracks.call(this),n=!!t.length;if(X.toggleMenuButton.call(this,s,n),Ra(e),X.checkMenu.call(this),!n)return;const i=t.map((r,o)=>({value:o,checked:this.captions.toggled&&this.currentTrack===o,title:Be.getLabel.call(this,r),badge:r.language&&X.createBadge.call(this,r.language.toUpperCase()),list:e,type:"language"}));i.unshift({value:-1,checked:!this.captions.toggled,title:st.get("disabled",this.config),list:e,type:"language"}),i.forEach(X.createMenuItem.bind(this)),X.updateSetting.call(this,s,e)},setSpeedMenu(){if(!k.element(this.elements.settings.panels.speed))return;const s="speed",e=this.elements.settings.panels.speed.querySelector('[role="menu"]');this.options.speed=this.options.speed.filter(n=>n>=this.minimumSpeed&&n<=this.maximumSpeed);const t=!k.empty(this.options.speed)&&this.options.speed.length>1;X.toggleMenuButton.call(this,s,t),Ra(e),X.checkMenu.call(this),t&&(this.options.speed.forEach(n=>{X.createMenuItem.call(this,{value:n,list:e,type:s,title:X.getLabel.call(this,"speed",n)})}),X.updateSetting.call(this,s,e))},checkMenu(){const{buttons:s}=this.elements.settings,e=!k.empty(s)&&Object.values(s).some(t=>!t.hidden);As(this.elements.settings.menu,!e)},focusFirstMenuItem(s,e=!1){if(this.elements.settings.popup.hidden)return;let t=s;k.element(t)||(t=Object.values(this.elements.settings.panels).find(i=>!i.hidden));const n=t.querySelector('[role^="menuitem"]');po.call(this,n,e)},toggleMenu(s){const{popup:e}=this.elements.settings,t=this.elements.buttons.settings;if(!k.element(e)||!k.element(t))return;const{hidden:n}=e;let i=n;if(k.boolean(s))i=s;else if(k.keyboardEvent(s)&&s.key==="Escape")i=!1;else if(k.event(s)){const r=k.function(s.composedPath)?s.composedPath()[0]:s.target,o=e.contains(r);if(o||!o&&s.target!==t&&i)return}t.setAttribute("aria-expanded",i),As(e,!i),Ne(this.elements.container,this.config.classNames.menu.open,i),i&&k.keyboardEvent(s)?X.focusFirstMenuItem.call(this,null,!0):i||n||po.call(this,t,k.keyboardEvent(s))},getMenuSize(s){const e=s.cloneNode(!0);e.style.position="absolute",e.style.opacity=0,e.removeAttribute("hidden"),s.parentNode.appendChild(e);const t=e.scrollWidth,n=e.scrollHeight;return rs(e),{width:t,height:n}},showMenuPanel(s="",e=!1){const t=this.elements.container.querySelector(`#plyr-settings-${this.id}-${s}`);if(!k.element(t))return;const n=t.parentNode,i=Array.from(n.children).find(r=>!r.hidden);if(ze.transitions&&!ze.reducedMotion){n.style.width=`${i.scrollWidth}px`,n.style.height=`${i.scrollHeight}px`;const r=X.getMenuSize.call(this,t),o=l=>{l.target===n&&["width","height"].includes(l.propertyName)&&(n.style.width="",n.style.height="",Da.call(this,n,fo,o))};Ie.call(this,n,fo,o),n.style.width=`${r.width}px`,n.style.height=`${r.height}px`}As(i,!0),As(t,!1),X.focusFirstMenuItem.call(this,t,e)},setDownloadUrl(){const s=this.elements.buttons.download;k.element(s)&&s.setAttribute("href",this.download)},create(s){const{bindMenuItemShortcuts:e,createButton:t,createProgress:n,createRange:i,createTime:r,setQualityMenu:o,setSpeedMenu:l,showMenuPanel:d}=X;this.elements.controls=null,k.array(this.config.controls)&&this.config.controls.includes("play-large")&&this.elements.container.appendChild(t.call(this,"play-large"));const c=fe("div",Yt(this.config.selectors.controls.wrapper));this.elements.controls=c;const u={class:"plyr__controls__item"};return bo(k.array(this.config.controls)?this.config.controls:[]).forEach(m=>{if(m==="restart"&&c.appendChild(t.call(this,"restart",u)),m==="rewind"&&c.appendChild(t.call(this,"rewind",u)),m==="play"&&c.appendChild(t.call(this,"play",u)),m==="fast-forward"&&c.appendChild(t.call(this,"fast-forward",u)),m==="progress"){const f=fe("div",{class:`${u.class} plyr__progress__container`}),p=fe("div",Yt(this.config.selectors.progress));if(p.appendChild(i.call(this,"seek",{id:`plyr-seek-${s.id}`})),p.appendChild(n.call(this,"buffer")),this.config.tooltips.seek){const h=fe("span",{class:this.config.classNames.tooltip},"00:00");p.appendChild(h),this.elements.display.seekTooltip=h}this.elements.progress=p,f.appendChild(this.elements.progress),c.appendChild(f)}if(m==="current-time"&&c.appendChild(r.call(this,"currentTime",u)),m==="duration"&&c.appendChild(r.call(this,"duration",u)),m==="mute"||m==="volume"){let{volume:f}=this.elements;if(k.element(f)&&c.contains(f)||(f=fe("div",Ue({},u,{class:`${u.class} plyr__volume`.trim()})),this.elements.volume=f,c.appendChild(f)),m==="mute"&&f.appendChild(t.call(this,"mute")),m==="volume"&&!tt.isIos&&!tt.isIPadOS){const p={max:1,step:.05,value:this.config.volume};f.appendChild(i.call(this,"volume",Ue(p,{id:`plyr-volume-${s.id}`})))}}if(m==="captions"&&c.appendChild(t.call(this,"captions",u)),m==="settings"&&!k.empty(this.config.settings)){const f=fe("div",Ue({},u,{class:`${u.class} plyr__menu`.trim(),hidden:""}));f.appendChild(t.call(this,"settings",{"aria-haspopup":!0,"aria-controls":`plyr-settings-${s.id}`,"aria-expanded":!1}));const p=fe("div",{class:"plyr__menu__container",id:`plyr-settings-${s.id}`,hidden:""}),h=fe("div"),g=fe("div",{id:`plyr-settings-${s.id}-home`}),y=fe("div",{role:"menu"});g.appendChild(y),h.appendChild(g),this.elements.settings.panels.home=g,this.config.settings.forEach(b=>{const w=fe("button",Ue(Yt(this.config.selectors.buttons.settings),{type:"button",class:`${this.config.classNames.control} ${this.config.classNames.control}--forward`,role:"menuitem","aria-haspopup":!0,hidden:""}));e.call(this,w,b),Ie.call(this,w,"click",()=>{d.call(this,b,!1)});const _=fe("span",null,st.get(b,this.config)),C=fe("span",{class:this.config.classNames.menu.value});C.innerHTML=s[b],_.appendChild(C),w.appendChild(_),y.appendChild(w);const E=fe("div",{id:`plyr-settings-${s.id}-${b}`,hidden:""}),A=fe("button",{type:"button",class:`${this.config.classNames.control} ${this.config.classNames.control}--back`});A.appendChild(fe("span",{"aria-hidden":!0},st.get(b,this.config))),A.appendChild(fe("span",{class:this.config.classNames.hidden},st.get("menuBack",this.config))),Ie.call(this,E,"keydown",T=>{T.key==="ArrowLeft"&&(T.preventDefault(),T.stopPropagation(),d.call(this,"home",!0))},!1),Ie.call(this,A,"click",()=>{d.call(this,"home",!1)}),E.appendChild(A),E.appendChild(fe("div",{role:"menu"})),h.appendChild(E),this.elements.settings.buttons[b]=w,this.elements.settings.panels[b]=E}),p.appendChild(h),f.appendChild(p),c.appendChild(f),this.elements.settings.popup=p,this.elements.settings.menu=f}if(m==="pip"&&ze.pip&&c.appendChild(t.call(this,"pip",u)),m==="airplay"&&ze.airplay&&c.appendChild(t.call(this,"airplay",u)),m==="download"){const f=Ue({},u,{element:"a",href:this.download,target:"_blank"});this.isHTML5&&(f.download="");const{download:p}=this.config.urls;!k.url(p)&&this.isEmbed&&Ue(f,{icon:`logo-${this.provider}`,label:this.provider}),c.appendChild(t.call(this,"download",f))}m==="fullscreen"&&c.appendChild(t.call(this,"fullscreen",u))}),this.isHTML5&&o.call(this,us.getQualityOptions.call(this)),l.call(this),c},inject(){if(this.config.loadSprite){const i=X.getIconUrl.call(this);i.cors&&zh(i.url,"sprite-plyr")}this.id=Math.floor(1e4*Math.random());let s=null;this.elements.controls=null;const e={id:this.id,seektime:this.config.seekTime,title:this.config.title};let t=!0;k.function(this.config.controls)&&(this.config.controls=this.config.controls.call(this,e)),this.config.controls||(this.config.controls=[]),k.element(this.config.controls)||k.string(this.config.controls)?s=this.config.controls:(s=X.create.call(this,{id:this.id,seektime:this.config.seekTime,speed:this.speed,quality:this.quality,captions:Be.getLabel.call(this)}),t=!1);let n;if(t&&k.string(this.config.controls)&&(s=(i=>{let r=i;return Object.entries(e).forEach(([o,l])=>{r=Tn(r,`{${o}}`,l)}),r})(s)),k.string(this.config.selectors.controls.container)&&(n=document.querySelector(this.config.selectors.controls.container)),k.element(n)||(n=this.elements.container),n[k.element(s)?"insertAdjacentElement":"insertAdjacentHTML"]("afterbegin",s),k.element(this.elements.controls)||X.findElements.call(this),!k.empty(this.elements.buttons)){const i=r=>{const o=this.config.classNames.controlPressed;r.setAttribute("aria-pressed","false"),Object.defineProperty(r,"pressed",{configurable:!0,enumerable:!0,get:()=>Na(r,o),set(l=!1){Ne(r,o,l),r.setAttribute("aria-pressed",l?"true":"false")}})};Object.values(this.elements.buttons).filter(Boolean).forEach(r=>{k.array(r)||k.nodeList(r)?Array.from(r).filter(Boolean).forEach(i):i(r)})}if(tt.isEdge&&Bh(n),this.config.tooltips.controls){const{classNames:i,selectors:r}=this.config,o=`${r.controls.wrapper} ${r.labels} .${i.hidden}`,l=kn.call(this,o);Array.from(l).forEach(d=>{Ne(d,this.config.classNames.hidden,!1),Ne(d,this.config.classNames.tooltip,!0)})}},setMediaMetadata(){try{"mediaSession"in navigator&&(navigator.mediaSession.metadata=new window.MediaMetadata({title:this.config.mediaMetadata.title,artist:this.config.mediaMetadata.artist,album:this.config.mediaMetadata.album,artwork:this.config.mediaMetadata.artwork}))}catch{}},setMarkers(){var s,e;if(!this.duration||this.elements.markers)return;const t=(s=this.config.markers)===null||s===void 0||(e=s.points)===null||e===void 0?void 0:e.filter(({time:d})=>d>0&&d<this.duration);if(t==null||!t.length)return;const n=document.createDocumentFragment(),i=document.createDocumentFragment();let r=null;const o=`${this.config.classNames.tooltip}--visible`,l=d=>Ne(r,o,d);t.forEach(d=>{const c=fe("span",{class:this.config.classNames.marker},""),u=d.time/this.duration*100+"%";r&&(c.addEventListener("mouseenter",()=>{d.label||(r.style.left=u,r.innerHTML=d.label,l(!0))}),c.addEventListener("mouseleave",()=>{l(!1)})),c.addEventListener("click",()=>{this.currentTime=d.time}),c.style.left=u,i.appendChild(c)}),n.appendChild(i),this.config.tooltips.seek||(r=fe("span",{class:this.config.classNames.tooltip},""),n.appendChild(r)),this.elements.markers={points:i,tip:r},this.elements.progress.appendChild(n)}};function jh(s,e=!0){let t=s;if(e){const n=document.createElement("a");n.href=t,t=n.href}try{return new URL(t)}catch{return null}}function Hh(s){const e=new URLSearchParams;return k.object(s)&&Object.entries(s).forEach(([t,n])=>{e.set(t,n)}),e}const Be={setup(){if(!this.supported.ui)return;if(!this.isVideo||this.isYouTube||this.isHTML5&&!ze.textTracks)return void(k.array(this.config.controls)&&this.config.controls.includes("settings")&&this.config.settings.includes("captions")&&X.setCaptionsMenu.call(this));if(k.element(this.elements.captions)||(this.elements.captions=fe("div",Yt(this.config.selectors.captions)),this.elements.captions.setAttribute("dir","auto"),W5(this.elements.captions,this.elements.wrapper)),tt.isIE&&window.URL){const n=this.media.querySelectorAll("track");Array.from(n).forEach(i=>{const r=i.getAttribute("src"),o=jh(r);o!==null&&o.hostname!==window.location.href.hostname&&["http:","https:"].includes(o.protocol)&&xn(r,"blob").then(l=>{i.setAttribute("src",window.URL.createObjectURL(l))}).catch(()=>{rs(i)})})}const s=bo((navigator.languages||[navigator.language||navigator.userLanguage||"en"]).map(n=>n.split("-")[0]));let e=(this.storage.get("language")||this.config.captions.language||"auto").toLowerCase();e==="auto"&&([e]=s);let t=this.storage.get("captions");if(k.boolean(t)||({active:t}=this.config.captions),Object.assign(this.captions,{toggled:!1,active:t,language:e,languages:s}),this.isHTML5){const n=this.config.captions.update?"addtrack removetrack":"removetrack";Ie.call(this,this.media.textTracks,n,Be.update.bind(this))}setTimeout(Be.update.bind(this),0)},update(){const s=Be.getTracks.call(this,!0),{active:e,language:t,meta:n,currentTrackNode:i}=this.captions,r=!!s.find(o=>o.language===t);this.isHTML5&&this.isVideo&&s.filter(o=>!n.get(o)).forEach(o=>{this.debug.log("Track added",o),n.set(o,{default:o.mode==="showing"}),o.mode==="showing"&&(o.mode="hidden"),Ie.call(this,o,"cuechange",()=>Be.updateCues.call(this))}),(r&&this.language!==t||!s.includes(i))&&(Be.setLanguage.call(this,t),Be.toggle.call(this,e&&r)),this.elements&&Ne(this.elements.container,this.config.classNames.captions.enabled,!k.empty(s)),k.array(this.config.controls)&&this.config.controls.includes("settings")&&this.config.settings.includes("captions")&&X.setCaptionsMenu.call(this)},toggle(s,e=!0){if(!this.supported.ui)return;const{toggled:t}=this.captions,n=this.config.classNames.captions.active,i=k.nullOrUndefined(s)?!t:s;if(i!==t){if(e||(this.captions.active=i,this.storage.set({captions:i})),!this.language&&i&&!e){const r=Be.getTracks.call(this),o=Be.findTrack.call(this,[this.captions.language,...this.captions.languages],!0);return this.captions.language=o.language,void Be.set.call(this,r.indexOf(o))}this.elements.buttons.captions&&(this.elements.buttons.captions.pressed=i),Ne(this.elements.container,n,i),this.captions.toggled=i,X.updateSetting.call(this,"captions"),pe.call(this,this.media,i?"captionsenabled":"captionsdisabled")}setTimeout(()=>{i&&this.captions.toggled&&(this.captions.currentTrackNode.mode="hidden")})},set(s,e=!0){const t=Be.getTracks.call(this);if(s!==-1)if(k.number(s))if(s in t){if(this.captions.currentTrack!==s){this.captions.currentTrack=s;const n=t[s],{language:i}=n||{};this.captions.currentTrackNode=n,X.updateSetting.call(this,"captions"),e||(this.captions.language=i,this.storage.set({language:i})),this.isVimeo&&this.embed.enableTextTrack(i),pe.call(this,this.media,"languagechange")}Be.toggle.call(this,!0,e),this.isHTML5&&this.isVideo&&Be.updateCues.call(this)}else this.debug.warn("Track not found",s);else this.debug.warn("Invalid caption argument",s);else Be.toggle.call(this,!1,e)},setLanguage(s,e=!0){if(!k.string(s))return void this.debug.warn("Invalid language argument",s);const t=s.toLowerCase();this.captions.language=t;const n=Be.getTracks.call(this),i=Be.findTrack.call(this,[t]);Be.set.call(this,n.indexOf(i),e)},getTracks(s=!1){return Array.from((this.media||{}).textTracks||[]).filter(e=>!this.isHTML5||s||this.captions.meta.has(e)).filter(e=>["captions","subtitles"].includes(e.kind))},findTrack(s,e=!1){const t=Be.getTracks.call(this),n=o=>Number((this.captions.meta.get(o)||{}).default),i=Array.from(t).sort((o,l)=>n(l)-n(o));let r;return s.every(o=>(r=i.find(l=>l.language===o),!r)),r||(e?i[0]:void 0)},getCurrentTrack(){return Be.getTracks.call(this)[this.currentTrack]},getLabel(s){let e=s;return!k.track(e)&&ze.textTracks&&this.captions.toggled&&(e=Be.getCurrentTrack.call(this)),k.track(e)?k.empty(e.label)?k.empty(e.language)?st.get("enabled",this.config):s.language.toUpperCase():e.label:st.get("disabled",this.config)},updateCues(s){if(!this.supported.ui)return;if(!k.element(this.elements.captions))return void this.debug.warn("No captions element to render to");if(!k.nullOrUndefined(s)&&!Array.isArray(s))return void this.debug.warn("updateCues: Invalid input",s);let e=s;if(!e){const n=Be.getCurrentTrack.call(this);e=Array.from((n||{}).activeCues||[]).map(i=>i.getCueAsHTML()).map(n4)}const t=e.map(n=>n.trim()).join(`
37
+ `);if(t!==this.elements.captions.innerHTML){Ra(this.elements.captions);const n=fe("span",Yt(this.config.selectors.caption));n.innerHTML=t,this.elements.captions.appendChild(n),pe.call(this,this.media,"cuechange")}}},Wh={enabled:!0,title:"",debug:!1,autoplay:!1,autopause:!0,playsinline:!0,seekTime:10,volume:1,muted:!1,duration:null,displayDuration:!0,invertTime:!0,toggleInvert:!0,ratio:null,clickToPlay:!0,hideControls:!0,resetOnEnd:!1,disableContextMenu:!0,loadSprite:!0,iconPrefix:"plyr",iconUrl:"https://cdn.plyr.io/3.7.8/plyr.svg",blankVideo:"https://cdn.plyr.io/static/blank.mp4",quality:{default:576,options:[4320,2880,2160,1440,1080,720,576,480,360,240],forced:!1,onChange:null},loop:{active:!1},speed:{selected:1,options:[.5,.75,1,1.25,1.5,1.75,2,4]},keyboard:{focused:!0,global:!1},tooltips:{controls:!1,seek:!0},captions:{active:!1,language:"auto",update:!1},fullscreen:{enabled:!0,fallback:!0,iosNative:!1},storage:{enabled:!0,key:"plyr"},controls:["play-large","play","progress","current-time","mute","volume","captions","settings","pip","airplay","fullscreen"],settings:["captions","quality","speed"],i18n:{restart:"Restart",rewind:"Rewind {seektime}s",play:"Play",pause:"Pause",fastForward:"Forward {seektime}s",seek:"Seek",seekLabel:"{currentTime} of {duration}",played:"Played",buffered:"Buffered",currentTime:"Current time",duration:"Duration",volume:"Volume",mute:"Mute",unmute:"Unmute",enableCaptions:"Enable captions",disableCaptions:"Disable captions",download:"Download",enterFullscreen:"Enter fullscreen",exitFullscreen:"Exit fullscreen",frameTitle:"Player for {title}",captions:"Captions",settings:"Settings",pip:"PIP",menuBack:"Go back to previous menu",speed:"Speed",normal:"Normal",quality:"Quality",loop:"Loop",start:"Start",end:"End",all:"All",reset:"Reset",disabled:"Disabled",enabled:"Enabled",advertisement:"Ad",qualityBadge:{2160:"4K",1440:"HD",1080:"HD",720:"HD",576:"SD",480:"SD"}},urls:{download:null,vimeo:{sdk:"https://player.vimeo.com/api/player.js",iframe:"https://player.vimeo.com/video/{0}?{1}",api:"https://vimeo.com/api/oembed.json?url={0}"},youtube:{sdk:"https://www.youtube.com/iframe_api",api:"https://noembed.com/embed?url=https://www.youtube.com/watch?v={0}"},googleIMA:{sdk:"https://imasdk.googleapis.com/js/sdkloader/ima3.js"}},listeners:{seek:null,play:null,pause:null,restart:null,rewind:null,fastForward:null,mute:null,volume:null,captions:null,download:null,fullscreen:null,pip:null,airplay:null,speed:null,quality:null,loop:null,language:null},events:["ended","progress","stalled","playing","waiting","canplay","canplaythrough","loadstart","loadeddata","loadedmetadata","timeupdate","volumechange","play","pause","error","seeking","seeked","emptied","ratechange","cuechange","download","enterfullscreen","exitfullscreen","captionsenabled","captionsdisabled","languagechange","controlshidden","controlsshown","ready","statechange","qualitychange","adsloaded","adscontentpause","adscontentresume","adstarted","adsmidpoint","adscomplete","adsallcomplete","adsimpression","adsclick"],selectors:{editable:"input, textarea, select, [contenteditable]",container:".plyr",controls:{container:null,wrapper:".plyr__controls"},labels:"[data-plyr]",buttons:{play:'[data-plyr="play"]',pause:'[data-plyr="pause"]',restart:'[data-plyr="restart"]',rewind:'[data-plyr="rewind"]',fastForward:'[data-plyr="fast-forward"]',mute:'[data-plyr="mute"]',captions:'[data-plyr="captions"]',download:'[data-plyr="download"]',fullscreen:'[data-plyr="fullscreen"]',pip:'[data-plyr="pip"]',airplay:'[data-plyr="airplay"]',settings:'[data-plyr="settings"]',loop:'[data-plyr="loop"]'},inputs:{seek:'[data-plyr="seek"]',volume:'[data-plyr="volume"]',speed:'[data-plyr="speed"]',language:'[data-plyr="language"]',quality:'[data-plyr="quality"]'},display:{currentTime:".plyr__time--current",duration:".plyr__time--duration",buffer:".plyr__progress__buffer",loop:".plyr__progress__loop",volume:".plyr__volume--display"},progress:".plyr__progress",captions:".plyr__captions",caption:".plyr__caption"},classNames:{type:"plyr--{0}",provider:"plyr--{0}",video:"plyr__video-wrapper",embed:"plyr__video-embed",videoFixedRatio:"plyr__video-wrapper--fixed-ratio",embedContainer:"plyr__video-embed__container",poster:"plyr__poster",posterEnabled:"plyr__poster-enabled",ads:"plyr__ads",control:"plyr__control",controlPressed:"plyr__control--pressed",playing:"plyr--playing",paused:"plyr--paused",stopped:"plyr--stopped",loading:"plyr--loading",hover:"plyr--hover",tooltip:"plyr__tooltip",cues:"plyr__cues",marker:"plyr__progress__marker",hidden:"plyr__sr-only",hideControls:"plyr--hide-controls",isTouch:"plyr--is-touch",uiSupported:"plyr--full-ui",noTransition:"plyr--no-transition",display:{time:"plyr__time"},menu:{value:"plyr__menu__value",badge:"plyr__badge",open:"plyr--menu-open"},captions:{enabled:"plyr--captions-enabled",active:"plyr--captions-active"},fullscreen:{enabled:"plyr--fullscreen-enabled",fallback:"plyr--fullscreen-fallback"},pip:{supported:"plyr--pip-supported",active:"plyr--pip-active"},airplay:{supported:"plyr--airplay-supported",active:"plyr--airplay-active"},previewThumbnails:{thumbContainer:"plyr__preview-thumb",thumbContainerShown:"plyr__preview-thumb--is-shown",imageContainer:"plyr__preview-thumb__image-container",timeContainer:"plyr__preview-thumb__time-container",scrubbingContainer:"plyr__preview-scrubbing",scrubbingContainerShown:"plyr__preview-scrubbing--is-shown"}},attributes:{embed:{provider:"data-plyr-provider",id:"data-plyr-embed-id",hash:"data-plyr-embed-hash"}},ads:{enabled:!1,publisherId:"",tagUrl:""},previewThumbnails:{enabled:!1,src:""},vimeo:{byline:!1,portrait:!1,title:!1,speed:!0,transparent:!1,customControls:!0,referrerPolicy:null,premium:!1},youtube:{rel:0,showinfo:0,iv_load_policy:3,modestbranding:1,customControls:!0,noCookie:!1},mediaMetadata:{title:"",artist:"",album:"",artwork:[]},markers:{enabled:!1,points:[]}},_o={active:"picture-in-picture",inactive:"inline"},hs={html5:"html5",youtube:"youtube",vimeo:"vimeo"},ko={audio:"audio",video:"video"};function r4(s){return/^(https?:\/\/)?(www\.)?(youtube\.com|youtube-nocookie\.com|youtu\.?be)\/.+$/.test(s)?hs.youtube:/^https?:\/\/player.vimeo.com\/video\/\d{0,9}(?=\b|\/)/.test(s)?hs.vimeo:null}const Eo=()=>{};class o4{constructor(e=!1){this.enabled=window.console&&e,this.enabled&&this.log("Debugging enabled")}get log(){return this.enabled?Function.prototype.bind.call(console.log,console):Eo}get warn(){return this.enabled?Function.prototype.bind.call(console.warn,console):Eo}get error(){return this.enabled?Function.prototype.bind.call(console.error,console):Eo}}class Ft{constructor(e){Z(this,"onChange",()=>{if(!this.supported)return;const t=this.player.elements.buttons.fullscreen;k.element(t)&&(t.pressed=this.active);const n=this.target===this.player.media?this.target:this.player.elements.container;pe.call(this.player,n,this.active?"enterfullscreen":"exitfullscreen",!0)}),Z(this,"toggleFallback",(t=!1)=>{if(t?this.scrollPosition={x:window.scrollX??0,y:window.scrollY??0}:window.scrollTo(this.scrollPosition.x,this.scrollPosition.y),document.body.style.overflow=t?"hidden":"",Ne(this.target,this.player.config.classNames.fullscreen.fallback,t),tt.isIos){let n=document.head.querySelector('meta[name="viewport"]');const i="viewport-fit=cover";n||(n=document.createElement("meta"),n.setAttribute("name","viewport"));const r=k.string(n.content)&&n.content.includes(i);t?(this.cleanupViewport=!r,r||(n.content+=`,${i}`)):this.cleanupViewport&&(n.content=n.content.split(",").filter(o=>o.trim()!==i).join(","))}this.onChange()}),Z(this,"trapFocus",t=>{if(tt.isIos||tt.isIPadOS||!this.active||t.key!=="Tab")return;const n=document.activeElement,i=kn.call(this.player,"a[href], button:not(:disabled), input:not(:disabled), [tabindex]"),[r]=i,o=i[i.length-1];n!==o||t.shiftKey?n===r&&t.shiftKey&&(o.focus(),t.preventDefault()):(r.focus(),t.preventDefault())}),Z(this,"update",()=>{if(this.supported){let t;t=this.forceFallback?"Fallback (forced)":Ft.nativeSupported?"Native":"Fallback",this.player.debug.log(`${t} fullscreen enabled`)}else this.player.debug.log("Fullscreen not supported and fallback disabled");Ne(this.player.elements.container,this.player.config.classNames.fullscreen.enabled,this.supported)}),Z(this,"enter",()=>{this.supported&&(tt.isIos&&this.player.config.fullscreen.iosNative?this.player.isVimeo?this.player.embed.requestFullscreen():this.target.webkitEnterFullscreen():!Ft.nativeSupported||this.forceFallback?this.toggleFallback(!0):this.prefix?k.empty(this.prefix)||this.target[`${this.prefix}Request${this.property}`]():this.target.requestFullscreen({navigationUI:"hide"}))}),Z(this,"exit",()=>{if(this.supported)if(tt.isIos&&this.player.config.fullscreen.iosNative)this.player.isVimeo?this.player.embed.exitFullscreen():this.target.webkitEnterFullscreen(),Jt(this.player.play());else if(!Ft.nativeSupported||this.forceFallback)this.toggleFallback(!1);else if(this.prefix){if(!k.empty(this.prefix)){const t=this.prefix==="moz"?"Cancel":"Exit";document[`${this.prefix}${t}${this.property}`]()}}else(document.cancelFullScreen||document.exitFullscreen).call(document)}),Z(this,"toggle",()=>{this.active?this.exit():this.enter()}),this.player=e,this.prefix=Ft.prefix,this.property=Ft.property,this.scrollPosition={x:0,y:0},this.forceFallback=e.config.fullscreen.fallback==="force",this.player.elements.fullscreen=e.config.fullscreen.container&&K5(this.player.elements.container,e.config.fullscreen.container),Ie.call(this.player,document,this.prefix==="ms"?"MSFullscreenChange":`${this.prefix}fullscreenchange`,()=>{this.onChange()}),Ie.call(this.player,this.player.elements.container,"dblclick",t=>{k.element(this.player.elements.controls)&&this.player.elements.controls.contains(t.target)||this.player.listeners.proxy(t,this.toggle,"fullscreen")}),Ie.call(this,this.player.elements.container,"keydown",t=>this.trapFocus(t)),this.update()}static get nativeSupported(){return!!(document.fullscreenEnabled||document.webkitFullscreenEnabled||document.mozFullScreenEnabled||document.msFullscreenEnabled)}get useNative(){return Ft.nativeSupported&&!this.forceFallback}static get prefix(){if(k.function(document.exitFullscreen))return"";let e="";return["webkit","moz","ms"].some(t=>!(!k.function(document[`${t}ExitFullscreen`])&&!k.function(document[`${t}CancelFullScreen`]))&&(e=t,!0)),e}static get property(){return this.prefix==="moz"?"FullScreen":"Fullscreen"}get supported(){return[this.player.config.fullscreen.enabled,this.player.isVideo,Ft.nativeSupported||this.player.config.fullscreen.fallback,!this.player.isYouTube||Ft.nativeSupported||!tt.isIos||this.player.config.playsinline&&!this.player.config.fullscreen.iosNative].every(Boolean)}get active(){if(!this.supported)return!1;if(!Ft.nativeSupported||this.forceFallback)return Na(this.target,this.player.config.classNames.fullscreen.fallback);const e=this.prefix?this.target.getRootNode()[`${this.prefix}${this.property}Element`]:this.target.getRootNode().fullscreenElement;return e&&e.shadowRoot?e===this.target.getRootNode().host:e===this.target}get target(){return tt.isIos&&this.player.config.fullscreen.iosNative?this.player.media:this.player.elements.fullscreen??this.player.elements.container}}function Fa(s,e=1){return new Promise((t,n)=>{const i=new Image,r=()=>{delete i.onload,delete i.onerror,(i.naturalWidth>=e?t:n)(i)};Object.assign(i,{onload:r,onerror:r,src:s})})}const Oe={addStyleHook(){Ne(this.elements.container,this.config.selectors.container.replace(".",""),!0),Ne(this.elements.container,this.config.classNames.uiSupported,this.supported.ui)},toggleNativeControls(s=!1){s&&this.isHTML5?this.media.setAttribute("controls",""):this.media.removeAttribute("controls")},build(){if(this.listeners.media(),!this.supported.ui)return this.debug.warn(`Basic support only for ${this.provider} ${this.type}`),void Oe.toggleNativeControls.call(this,!0);k.element(this.elements.controls)||(X.inject.call(this),this.listeners.controls()),Oe.toggleNativeControls.call(this),this.isHTML5&&Be.setup.call(this),this.volume=null,this.muted=null,this.loop=null,this.quality=null,this.speed=null,X.updateVolume.call(this),X.timeUpdate.call(this),X.durationUpdate.call(this),Oe.checkPlaying.call(this),Ne(this.elements.container,this.config.classNames.pip.supported,ze.pip&&this.isHTML5&&this.isVideo),Ne(this.elements.container,this.config.classNames.airplay.supported,ze.airplay&&this.isHTML5),Ne(this.elements.container,this.config.classNames.isTouch,this.touch),this.ready=!0,setTimeout(()=>{pe.call(this,this.media,"ready")},0),Oe.setTitle.call(this),this.poster&&Oe.setPoster.call(this,this.poster,!1).catch(()=>{}),this.config.duration&&X.durationUpdate.call(this),this.config.mediaMetadata&&X.setMediaMetadata.call(this)},setTitle(){let s=st.get("play",this.config);if(k.string(this.config.title)&&!k.empty(this.config.title)&&(s+=`, ${this.config.title}`),Array.from(this.elements.buttons.play||[]).forEach(e=>{e.setAttribute("aria-label",s)}),this.isEmbed){const e=Xe.call(this,"iframe");if(!k.element(e))return;const t=k.empty(this.config.title)?"video":this.config.title,n=st.get("frameTitle",this.config);e.setAttribute("title",n.replace("{title}",t))}},togglePoster(s){Ne(this.elements.container,this.config.classNames.posterEnabled,s)},setPoster(s,e=!0){return e&&this.poster?Promise.reject(new Error("Poster already set")):(this.media.setAttribute("data-poster",s),this.elements.poster.removeAttribute("hidden"),J5.call(this).then(()=>Fa(s)).catch(t=>{throw s===this.poster&&Oe.togglePoster.call(this,!1),t}).then(()=>{if(s!==this.poster)throw new Error("setPoster cancelled by later call to setPoster")}).then(()=>(Object.assign(this.elements.poster.style,{backgroundImage:`url('${s}')`,backgroundSize:""}),Oe.togglePoster.call(this,!0),s)))},checkPlaying(s){Ne(this.elements.container,this.config.classNames.playing,this.playing),Ne(this.elements.container,this.config.classNames.paused,this.paused),Ne(this.elements.container,this.config.classNames.stopped,this.stopped),Array.from(this.elements.buttons.play||[]).forEach(e=>{Object.assign(e,{pressed:this.playing}),e.setAttribute("aria-label",st.get(this.playing?"pause":"play",this.config))}),k.event(s)&&s.type==="timeupdate"||Oe.toggleControls.call(this)},checkLoading(s){this.loading=["stalled","waiting"].includes(s.type),clearTimeout(this.timers.loading),this.timers.loading=setTimeout(()=>{Ne(this.elements.container,this.config.classNames.loading,this.loading),Oe.toggleControls.call(this)},this.loading?250:0)},toggleControls(s){const{controls:e}=this.elements;if(e&&this.config.hideControls){const t=this.touch&&this.lastSeekTime+2e3>Date.now();this.toggleControls(!!(s||this.loading||this.paused||e.pressed||e.hover||t))}},migrateStyles(){Object.values({...this.media.style}).filter(s=>!k.empty(s)&&k.string(s)&&s.startsWith("--plyr")).forEach(s=>{this.elements.container.style.setProperty(s,this.media.style.getPropertyValue(s)),this.media.style.removeProperty(s)}),k.empty(this.media.style)&&this.media.removeAttribute("style")}};class l4{constructor(e){Z(this,"firstTouch",()=>{const{player:t}=this,{elements:n}=t;t.touch=!0,Ne(n.container,t.config.classNames.isTouch,!0)}),Z(this,"global",(t=!0)=>{const{player:n}=this;n.config.keyboard.global&&En.call(n,window,"keydown keyup",this.handleKey,t,!1),En.call(n,document.body,"click",this.toggleMenu,t),yo.call(n,document.body,"touchstart",this.firstTouch)}),Z(this,"container",()=>{const{player:t}=this,{config:n,elements:i,timers:r}=t;!n.keyboard.global&&n.keyboard.focused&&Ie.call(t,i.container,"keydown keyup",this.handleKey,!1),Ie.call(t,i.container,"mousemove mouseleave touchstart touchmove enterfullscreen exitfullscreen",d=>{const{controls:c}=i;c&&d.type==="enterfullscreen"&&(c.pressed=!1,c.hover=!1);let u=0;["touchstart","touchmove","mousemove"].includes(d.type)&&(Oe.toggleControls.call(t,!0),u=t.touch?3e3:2e3),clearTimeout(r.controls),r.controls=setTimeout(()=>Oe.toggleControls.call(t,!1),u)});const o=()=>{if(!t.isVimeo||t.config.vimeo.premium)return;const d=i.wrapper,{active:c}=t.fullscreen,[u,m]=wo.call(t),f=Oh(`aspect-ratio: ${u} / ${m}`);if(!c)return void(f?(d.style.width=null,d.style.height=null):(d.style.maxWidth=null,d.style.margin=null));const[p,h]=X5(),g=p/h>u/m;f?(d.style.width=g?"auto":"100%",d.style.height=g?"100%":"auto"):(d.style.maxWidth=g?h/m*u+"px":null,d.style.margin=g?"0 auto":null)},l=()=>{clearTimeout(r.resized),r.resized=setTimeout(o,50)};Ie.call(t,i.container,"enterfullscreen exitfullscreen",d=>{const{target:c}=t.fullscreen;c===i.container&&(!t.isEmbed&&k.empty(t.config.ratio)||(o(),(d.type==="enterfullscreen"?Ie:Da).call(t,window,"resize",l)))})}),Z(this,"media",()=>{const{player:t}=this,{elements:n}=t;if(Ie.call(t,t.media,"timeupdate seeking seeked",r=>X.timeUpdate.call(t,r)),Ie.call(t,t.media,"durationchange loadeddata loadedmetadata",r=>X.durationUpdate.call(t,r)),Ie.call(t,t.media,"ended",()=>{t.isHTML5&&t.isVideo&&t.config.resetOnEnd&&(t.restart(),t.pause())}),Ie.call(t,t.media,"progress playing seeking seeked",r=>X.updateProgress.call(t,r)),Ie.call(t,t.media,"volumechange",r=>X.updateVolume.call(t,r)),Ie.call(t,t.media,"playing play pause ended emptied timeupdate",r=>Oe.checkPlaying.call(t,r)),Ie.call(t,t.media,"waiting canplay seeked playing",r=>Oe.checkLoading.call(t,r)),t.supported.ui&&t.config.clickToPlay&&!t.isAudio){const r=Xe.call(t,`.${t.config.classNames.video}`);if(!k.element(r))return;Ie.call(t,n.container,"click",o=>{([n.container,r].includes(o.target)||r.contains(o.target))&&(t.touch&&t.config.hideControls||(t.ended?(this.proxy(o,t.restart,"restart"),this.proxy(o,()=>{Jt(t.play())},"play")):this.proxy(o,()=>{Jt(t.togglePlay())},"play")))})}t.supported.ui&&t.config.disableContextMenu&&Ie.call(t,n.wrapper,"contextmenu",r=>{r.preventDefault()},!1),Ie.call(t,t.media,"volumechange",()=>{t.storage.set({volume:t.volume,muted:t.muted})}),Ie.call(t,t.media,"ratechange",()=>{X.updateSetting.call(t,"speed"),t.storage.set({speed:t.speed})}),Ie.call(t,t.media,"qualitychange",r=>{X.updateSetting.call(t,"quality",null,r.detail.quality)}),Ie.call(t,t.media,"ready qualitychange",()=>{X.setDownloadUrl.call(t)});const i=t.config.events.concat(["keyup","keydown"]).join(" ");Ie.call(t,t.media,i,r=>{let{detail:o={}}=r;r.type==="error"&&(o=t.media.error),pe.call(t,n.container,r.type,!0,o)})}),Z(this,"proxy",(t,n,i)=>{const{player:r}=this,o=r.config.listeners[i];let l=!0;k.function(o)&&(l=o.call(r,t)),l!==!1&&k.function(n)&&n.call(r,t)}),Z(this,"bind",(t,n,i,r,o=!0)=>{const{player:l}=this,d=l.config.listeners[r],c=k.function(d);Ie.call(l,t,n,u=>this.proxy(u,i,r),o&&!c)}),Z(this,"controls",()=>{const{player:t}=this,{elements:n}=t,i=tt.isIE?"change":"input";if(n.buttons.play&&Array.from(n.buttons.play).forEach(r=>{this.bind(r,"click",()=>{Jt(t.togglePlay())},"play")}),this.bind(n.buttons.restart,"click",t.restart,"restart"),this.bind(n.buttons.rewind,"click",()=>{t.lastSeekTime=Date.now(),t.rewind()},"rewind"),this.bind(n.buttons.fastForward,"click",()=>{t.lastSeekTime=Date.now(),t.forward()},"fastForward"),this.bind(n.buttons.mute,"click",()=>{t.muted=!t.muted},"mute"),this.bind(n.buttons.captions,"click",()=>t.toggleCaptions()),this.bind(n.buttons.download,"click",()=>{pe.call(t,t.media,"download")},"download"),this.bind(n.buttons.fullscreen,"click",()=>{t.fullscreen.toggle()},"fullscreen"),this.bind(n.buttons.pip,"click",()=>{t.pip="toggle"},"pip"),this.bind(n.buttons.airplay,"click",t.airplay,"airplay"),this.bind(n.buttons.settings,"click",r=>{r.stopPropagation(),r.preventDefault(),X.toggleMenu.call(t,r)},null,!1),this.bind(n.buttons.settings,"keyup",r=>{[" ","Enter"].includes(r.key)&&(r.key!=="Enter"?(r.preventDefault(),r.stopPropagation(),X.toggleMenu.call(t,r)):X.focusFirstMenuItem.call(t,null,!0))},null,!1),this.bind(n.settings.menu,"keydown",r=>{r.key==="Escape"&&X.toggleMenu.call(t,r)}),this.bind(n.inputs.seek,"mousedown mousemove",r=>{const o=n.progress.getBoundingClientRect(),l=100/o.width*(r.pageX-o.left);r.currentTarget.setAttribute("seek-value",l)}),this.bind(n.inputs.seek,"mousedown mouseup keydown keyup touchstart touchend",r=>{const o=r.currentTarget,l="play-on-seeked";if(k.keyboardEvent(r)&&!["ArrowLeft","ArrowRight"].includes(r.key))return;t.lastSeekTime=Date.now();const d=o.hasAttribute(l),c=["mouseup","touchend","keyup"].includes(r.type);d&&c?(o.removeAttribute(l),Jt(t.play())):!c&&t.playing&&(o.setAttribute(l,""),t.pause())}),tt.isIos){const r=kn.call(t,'input[type="range"]');Array.from(r).forEach(o=>this.bind(o,i,l=>Bh(l.target)))}this.bind(n.inputs.seek,i,r=>{const o=r.currentTarget;let l=o.getAttribute("seek-value");k.empty(l)&&(l=o.value),o.removeAttribute("seek-value"),t.currentTime=l/o.max*t.duration},"seek"),this.bind(n.progress,"mouseenter mouseleave mousemove",r=>X.updateSeekTooltip.call(t,r)),this.bind(n.progress,"mousemove touchmove",r=>{const{previewThumbnails:o}=t;o&&o.loaded&&o.startMove(r)}),this.bind(n.progress,"mouseleave touchend click",()=>{const{previewThumbnails:r}=t;r&&r.loaded&&r.endMove(!1,!0)}),this.bind(n.progress,"mousedown touchstart",r=>{const{previewThumbnails:o}=t;o&&o.loaded&&o.startScrubbing(r)}),this.bind(n.progress,"mouseup touchend",r=>{const{previewThumbnails:o}=t;o&&o.loaded&&o.endScrubbing(r)}),tt.isWebKit&&Array.from(kn.call(t,'input[type="range"]')).forEach(r=>{this.bind(r,"input",o=>X.updateRangeFill.call(t,o.target))}),t.config.toggleInvert&&!k.element(n.display.duration)&&this.bind(n.display.currentTime,"click",()=>{t.currentTime!==0&&(t.config.invertTime=!t.config.invertTime,X.timeUpdate.call(t))}),this.bind(n.inputs.volume,i,r=>{t.volume=r.target.value},"volume"),this.bind(n.controls,"mouseenter mouseleave",r=>{n.controls.hover=!t.touch&&r.type==="mouseenter"}),n.fullscreen&&Array.from(n.fullscreen.children).filter(r=>!r.contains(n.container)).forEach(r=>{this.bind(r,"mouseenter mouseleave",o=>{n.controls&&(n.controls.hover=!t.touch&&o.type==="mouseenter")})}),this.bind(n.controls,"mousedown mouseup touchstart touchend touchcancel",r=>{n.controls.pressed=["mousedown","touchstart"].includes(r.type)}),this.bind(n.controls,"focusin",()=>{const{config:r,timers:o}=t;Ne(n.controls,r.classNames.noTransition,!0),Oe.toggleControls.call(t,!0),setTimeout(()=>{Ne(n.controls,r.classNames.noTransition,!1)},0);const l=this.touch?3e3:4e3;clearTimeout(o.controls),o.controls=setTimeout(()=>Oe.toggleControls.call(t,!1),l)}),this.bind(n.inputs.volume,"wheel",r=>{const o=r.webkitDirectionInvertedFromDevice,[l,d]=[r.deltaX,-r.deltaY].map(m=>o?-m:m),c=Math.sign(Math.abs(l)>Math.abs(d)?l:d);t.increaseVolume(c/50);const{volume:u}=t.media;(c===1&&u<1||c===-1&&u>0)&&r.preventDefault()},"volume",!1)}),this.player=e,this.lastKey=null,this.focusTimer=null,this.lastKeyDown=null,this.handleKey=this.handleKey.bind(this),this.toggleMenu=this.toggleMenu.bind(this),this.firstTouch=this.firstTouch.bind(this)}handleKey(e){const{player:t}=this,{elements:n}=t,{key:i,type:r,altKey:o,ctrlKey:l,metaKey:d,shiftKey:c}=e,u=r==="keydown",m=u&&i===this.lastKey;if(!(o||l||d||c)&&i){if(u){const p=document.activeElement;if(k.element(p)){const{editable:h}=t.config.selectors,{seek:g}=n.inputs;if(p!==g&&Ls(p,h)||e.key===" "&&Ls(p,'button, [role^="menuitem"]'))return}switch([" ","ArrowLeft","ArrowUp","ArrowRight","ArrowDown","0","1","2","3","4","5","6","7","8","9","c","f","k","l","m"].includes(i)&&(e.preventDefault(),e.stopPropagation()),i){case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":m||(f=parseInt(i,10),t.currentTime=t.duration/10*f);break;case" ":case"k":m||Jt(t.togglePlay());break;case"ArrowUp":t.increaseVolume(.1);break;case"ArrowDown":t.decreaseVolume(.1);break;case"m":m||(t.muted=!t.muted);break;case"ArrowRight":t.forward();break;case"ArrowLeft":t.rewind();break;case"f":t.fullscreen.toggle();break;case"c":m||t.toggleCaptions();break;case"l":t.loop=!t.loop}i==="Escape"&&!t.fullscreen.usingNative&&t.fullscreen.active&&t.fullscreen.toggle(),this.lastKey=i}else this.lastKey=null;var f}}toggleMenu(e){X.toggleMenu.call(this.player,e)}}function c4(s,e){return s(e={exports:{}},e.exports),e.exports}var d4=c4(function(s,e){s.exports=function(){var t=function(){},n={},i={},r={};function o(f,p){f=f.push?f:[f];var h,g,y,b=[],w=f.length,_=w;for(h=function(C,E){E.length&&b.push(C),--_||p(b)};w--;)g=f[w],(y=i[g])?h(g,y):(r[g]=r[g]||[]).push(h)}function l(f,p){if(f){var h=r[f];if(i[f]=p,h)for(;h.length;)h[0](f,p),h.splice(0,1)}}function d(f,p){f.call&&(f={success:f}),p.length?(f.error||t)(p):(f.success||t)(f)}function c(f,p,h,g){var y,b,w=document,_=h.async,C=(h.numRetries||0)+1,E=h.before||t,A=f.replace(/[\?|#].*$/,""),T=f.replace(/^(css|img)!/,"");g=g||0,/(^css!|\.css$)/.test(A)?((b=w.createElement("link")).rel="stylesheet",b.href=T,(y="hideFocus"in b)&&b.relList&&(y=0,b.rel="preload",b.as="style")):/(^img!|\.(png|gif|jpg|svg|webp)$)/.test(A)?(b=w.createElement("img")).src=T:((b=w.createElement("script")).src=f,b.async=_===void 0||_),b.onload=b.onerror=b.onbeforeload=function(R){var I=R.type[0];if(y)try{b.sheet.cssText.length||(I="e")}catch(v){v.code!=18&&(I="e")}if(I=="e"){if((g+=1)<C)return c(f,p,h,g)}else if(b.rel=="preload"&&b.as=="style")return b.rel="stylesheet";p(f,I,R.defaultPrevented)},E(f,b)!==!1&&w.head.appendChild(b)}function u(f,p,h){var g,y,b=(f=f.push?f:[f]).length,w=b,_=[];for(g=function(C,E,A){if(E=="e"&&_.push(C),E=="b"){if(!A)return;_.push(C)}--b||p(_)},y=0;y<w;y++)c(f[y],g,h)}function m(f,p,h){var g,y;if(p&&p.trim&&(g=p),y=(g?h:p)||{},g){if(g in n)throw"LoadJS";n[g]=!0}function b(w,_){u(f,function(C){d(y,C),w&&d({success:w,error:_},C),l(g,C)},y)}if(y.returnPromise)return new Promise(b);b()}return m.ready=function(f,p){return o(f,function(h){d(p,h)}),m},m.done=function(f){l(f,[])},m.reset=function(){n={},i={},r={}},m.isDefined=function(f){return f in n},m}()});function To(s){return new Promise((e,t)=>{d4(s,{success:e,error:t})})}function u4(s){return k.empty(s)?null:k.number(Number(s))?s:s.match(/^.*(vimeo.com\/|video\/)(\d+).*/)?RegExp.$2:s}function h4(s){const e=s.match(/^.*(vimeo.com\/|video\/)(\d+)(\?.*&*h=|\/)+([\d,a-f]+)/);return e&&e.length===5?e[4]:null}function An(s){s&&!this.embed.hasPlayed&&(this.embed.hasPlayed=!0),this.media.paused===s&&(this.media.paused=!s,pe.call(this,this.media,s?"play":"pause"))}const Co={setup(){const s=this;Ne(s.elements.wrapper,s.config.classNames.embed,!0),s.options.speed=s.config.speed.options,js.call(s),k.object(window.Vimeo)?Co.ready.call(s):To(s.config.urls.vimeo.sdk).then(()=>{Co.ready.call(s)}).catch(e=>{s.debug.warn("Vimeo SDK (player.js) failed to load",e)})},ready(){const s=this,e=s.config.vimeo,{premium:t,referrerPolicy:n,...i}=e;let r=s.media.getAttribute("src"),o="";k.empty(r)?(r=s.media.getAttribute(s.config.attributes.embed.id),o=s.media.getAttribute(s.config.attributes.embed.hash)):o=h4(r);const l=o?{h:o}:{};t&&Object.assign(i,{controls:!1,sidedock:!1});const d=Hh({loop:s.config.loop.active,autoplay:s.autoplay,muted:s.muted,gesture:"media",playsinline:s.config.playsinline,...l,...i}),c=u4(r),u=fe("iframe"),m=So(s.config.urls.vimeo.iframe,c,d);if(u.setAttribute("src",m),u.setAttribute("allowfullscreen",""),u.setAttribute("allow",["autoplay","fullscreen","picture-in-picture","encrypted-media","accelerometer","gyroscope"].join("; ")),k.empty(n)||u.setAttribute("referrerPolicy",n),t||!e.customControls)u.setAttribute("data-poster",s.poster),s.media=va(u,s.media);else{const w=fe("div",{class:s.config.classNames.embedContainer,"data-poster":s.poster});w.appendChild(u),s.media=va(w,s.media)}e.customControls||xn(So(s.config.urls.vimeo.api,m)).then(w=>{!k.empty(w)&&w.thumbnail_url&&Oe.setPoster.call(s,w.thumbnail_url).catch(()=>{})}),s.embed=new window.Vimeo.Player(u,{autopause:s.config.autopause,muted:s.muted}),s.media.paused=!0,s.media.currentTime=0,s.supported.ui&&s.embed.disableTextTrack(),s.media.play=()=>(An.call(s,!0),s.embed.play()),s.media.pause=()=>(An.call(s,!1),s.embed.pause()),s.media.stop=()=>{s.pause(),s.currentTime=0};let{currentTime:f}=s.media;Object.defineProperty(s.media,"currentTime",{get:()=>f,set(w){const{embed:_,media:C,paused:E,volume:A}=s,T=E&&!_.hasPlayed;C.seeking=!0,pe.call(s,C,"seeking"),Promise.resolve(T&&_.setVolume(0)).then(()=>_.setCurrentTime(w)).then(()=>T&&_.pause()).then(()=>T&&_.setVolume(A)).catch(()=>{})}});let p=s.config.speed.selected;Object.defineProperty(s.media,"playbackRate",{get:()=>p,set(w){s.embed.setPlaybackRate(w).then(()=>{p=w,pe.call(s,s.media,"ratechange")}).catch(()=>{s.options.speed=[1]})}});let{volume:h}=s.config;Object.defineProperty(s.media,"volume",{get:()=>h,set(w){s.embed.setVolume(w).then(()=>{h=w,pe.call(s,s.media,"volumechange")})}});let{muted:g}=s.config;Object.defineProperty(s.media,"muted",{get:()=>g,set(w){const _=!!k.boolean(w)&&w;s.embed.setMuted(!!_||s.config.muted).then(()=>{g=_,pe.call(s,s.media,"volumechange")})}});let y,{loop:b}=s.config;Object.defineProperty(s.media,"loop",{get:()=>b,set(w){const _=k.boolean(w)?w:s.config.loop.active;s.embed.setLoop(_).then(()=>{b=_})}}),s.embed.getVideoUrl().then(w=>{y=w,X.setDownloadUrl.call(s)}).catch(w=>{this.debug.warn(w)}),Object.defineProperty(s.media,"currentSrc",{get:()=>y}),Object.defineProperty(s.media,"ended",{get:()=>s.currentTime===s.duration}),Promise.all([s.embed.getVideoWidth(),s.embed.getVideoHeight()]).then(w=>{const[_,C]=w;s.embed.ratio=Vh(_,C),js.call(this)}),s.embed.setAutopause(s.config.autopause).then(w=>{s.config.autopause=w}),s.embed.getVideoTitle().then(w=>{s.config.title=w,Oe.setTitle.call(this)}),s.embed.getCurrentTime().then(w=>{f=w,pe.call(s,s.media,"timeupdate")}),s.embed.getDuration().then(w=>{s.media.duration=w,pe.call(s,s.media,"durationchange")}),s.embed.getTextTracks().then(w=>{s.media.textTracks=w,Be.setup.call(s)}),s.embed.on("cuechange",({cues:w=[]})=>{const _=w.map(C=>s4(C.text));Be.updateCues.call(s,_)}),s.embed.on("loaded",()=>{s.embed.getPaused().then(w=>{An.call(s,!w),w||pe.call(s,s.media,"playing")}),k.element(s.embed.element)&&s.supported.ui&&s.embed.element.setAttribute("tabindex",-1)}),s.embed.on("bufferstart",()=>{pe.call(s,s.media,"waiting")}),s.embed.on("bufferend",()=>{pe.call(s,s.media,"playing")}),s.embed.on("play",()=>{An.call(s,!0),pe.call(s,s.media,"playing")}),s.embed.on("pause",()=>{An.call(s,!1)}),s.embed.on("timeupdate",w=>{s.media.seeking=!1,f=w.seconds,pe.call(s,s.media,"timeupdate")}),s.embed.on("progress",w=>{s.media.buffered=w.percent,pe.call(s,s.media,"progress"),parseInt(w.percent,10)===1&&pe.call(s,s.media,"canplaythrough"),s.embed.getDuration().then(_=>{_!==s.media.duration&&(s.media.duration=_,pe.call(s,s.media,"durationchange"))})}),s.embed.on("seeked",()=>{s.media.seeking=!1,pe.call(s,s.media,"seeked")}),s.embed.on("ended",()=>{s.media.paused=!0,pe.call(s,s.media,"ended")}),s.embed.on("error",w=>{s.media.error=w,pe.call(s,s.media,"error")}),e.customControls&&setTimeout(()=>Oe.build.call(s),0)}};function m4(s){return k.empty(s)?null:s.match(/^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|&v=)([^#&?]*).*/)?RegExp.$2:s}function Ln(s){s&&!this.embed.hasPlayed&&(this.embed.hasPlayed=!0),this.media.paused===s&&(this.media.paused=!s,pe.call(this,this.media,s?"play":"pause"))}function f4(s){return s.noCookie?"https://www.youtube-nocookie.com":window.location.protocol==="http:"?"http://www.youtube.com":void 0}const Ma={setup(){if(Ne(this.elements.wrapper,this.config.classNames.embed,!0),k.object(window.YT)&&k.function(window.YT.Player))Ma.ready.call(this);else{const s=window.onYouTubeIframeAPIReady;window.onYouTubeIframeAPIReady=()=>{k.function(s)&&s(),Ma.ready.call(this)},To(this.config.urls.youtube.sdk).catch(e=>{this.debug.warn("YouTube API failed to load",e)})}},getTitle(s){xn(So(this.config.urls.youtube.api,s)).then(e=>{if(k.object(e)){const{title:t,height:n,width:i}=e;this.config.title=t,Oe.setTitle.call(this),this.embed.ratio=Vh(i,n)}js.call(this)}).catch(()=>{js.call(this)})},ready(){const s=this,e=s.config.youtube,t=s.media&&s.media.getAttribute("id");if(!k.empty(t)&&t.startsWith("youtube-"))return;let n=s.media.getAttribute("src");k.empty(n)&&(n=s.media.getAttribute(this.config.attributes.embed.id));const i=m4(n),r=fe("div",{id:Z5(s.provider),"data-poster":e.customControls?s.poster:void 0});if(s.media=va(r,s.media),e.customControls){const o=l=>`https://i.ytimg.com/vi/${i}/${l}default.jpg`;Fa(o("maxres"),121).catch(()=>Fa(o("sd"),121)).catch(()=>Fa(o("hq"))).then(l=>Oe.setPoster.call(s,l.src)).then(l=>{l.includes("maxres")||(s.elements.poster.style.backgroundSize="cover")}).catch(()=>{})}s.embed=new window.YT.Player(s.media,{videoId:i,host:f4(e),playerVars:Ue({},{autoplay:s.config.autoplay?1:0,hl:s.config.hl,controls:s.supported.ui&&e.customControls?0:1,disablekb:1,playsinline:s.config.playsinline&&!s.config.fullscreen.iosNative?1:0,cc_load_policy:s.captions.active?1:0,cc_lang_pref:s.config.captions.language,widget_referrer:window?window.location.href:null},e),events:{onError(o){if(!s.media.error){const l=o.data,d={2:"The request contains an invalid parameter value. For example, this error occurs if you specify a video ID that does not have 11 characters, or if the video ID contains invalid characters, such as exclamation points or asterisks.",5:"The requested content cannot be played in an HTML5 player or another error related to the HTML5 player has occurred.",100:"The video requested was not found. This error occurs when a video has been removed (for any reason) or has been marked as private.",101:"The owner of the requested video does not allow it to be played in embedded players.",150:"The owner of the requested video does not allow it to be played in embedded players."}[l]||"An unknown error occurred";s.media.error={code:l,message:d},pe.call(s,s.media,"error")}},onPlaybackRateChange(o){const l=o.target;s.media.playbackRate=l.getPlaybackRate(),pe.call(s,s.media,"ratechange")},onReady(o){if(k.function(s.media.play))return;const l=o.target;Ma.getTitle.call(s,i),s.media.play=()=>{Ln.call(s,!0),l.playVideo()},s.media.pause=()=>{Ln.call(s,!1),l.pauseVideo()},s.media.stop=()=>{l.stopVideo()},s.media.duration=l.getDuration(),s.media.paused=!0,s.media.currentTime=0,Object.defineProperty(s.media,"currentTime",{get:()=>Number(l.getCurrentTime()),set(m){s.paused&&!s.embed.hasPlayed&&s.embed.mute(),s.media.seeking=!0,pe.call(s,s.media,"seeking"),l.seekTo(m)}}),Object.defineProperty(s.media,"playbackRate",{get:()=>l.getPlaybackRate(),set(m){l.setPlaybackRate(m)}});let{volume:d}=s.config;Object.defineProperty(s.media,"volume",{get:()=>d,set(m){d=m,l.setVolume(100*d),pe.call(s,s.media,"volumechange")}});let{muted:c}=s.config;Object.defineProperty(s.media,"muted",{get:()=>c,set(m){const f=k.boolean(m)?m:c;c=f,l[f?"mute":"unMute"](),l.setVolume(100*d),pe.call(s,s.media,"volumechange")}}),Object.defineProperty(s.media,"currentSrc",{get:()=>l.getVideoUrl()}),Object.defineProperty(s.media,"ended",{get:()=>s.currentTime===s.duration});const u=l.getAvailablePlaybackRates();s.options.speed=u.filter(m=>s.config.speed.options.includes(m)),s.supported.ui&&e.customControls&&s.media.setAttribute("tabindex",-1),pe.call(s,s.media,"timeupdate"),pe.call(s,s.media,"durationchange"),clearInterval(s.timers.buffering),s.timers.buffering=setInterval(()=>{s.media.buffered=l.getVideoLoadedFraction(),(s.media.lastBuffered===null||s.media.lastBuffered<s.media.buffered)&&pe.call(s,s.media,"progress"),s.media.lastBuffered=s.media.buffered,s.media.buffered===1&&(clearInterval(s.timers.buffering),pe.call(s,s.media,"canplaythrough"))},200),e.customControls&&setTimeout(()=>Oe.build.call(s),50)},onStateChange(o){const l=o.target;switch(clearInterval(s.timers.playing),s.media.seeking&&[1,2].includes(o.data)&&(s.media.seeking=!1,pe.call(s,s.media,"seeked")),o.data){case-1:pe.call(s,s.media,"timeupdate"),s.media.buffered=l.getVideoLoadedFraction(),pe.call(s,s.media,"progress");break;case 0:Ln.call(s,!1),s.media.loop?(l.stopVideo(),l.playVideo()):pe.call(s,s.media,"ended");break;case 1:e.customControls&&!s.config.autoplay&&s.media.paused&&!s.embed.hasPlayed?s.media.pause():(Ln.call(s,!0),pe.call(s,s.media,"playing"),s.timers.playing=setInterval(()=>{pe.call(s,s.media,"timeupdate")},50),s.media.duration!==l.getDuration()&&(s.media.duration=l.getDuration(),pe.call(s,s.media,"durationchange")));break;case 2:s.muted||s.embed.unMute(),Ln.call(s,!1);break;case 3:pe.call(s,s.media,"waiting")}pe.call(s,s.elements.container,"statechange",!1,{code:o.data})}}})}},Kh={setup(){this.media?(Ne(this.elements.container,this.config.classNames.type.replace("{0}",this.type),!0),Ne(this.elements.container,this.config.classNames.provider.replace("{0}",this.provider),!0),this.isEmbed&&Ne(this.elements.container,this.config.classNames.type.replace("{0}","video"),!0),this.isVideo&&(this.elements.wrapper=fe("div",{class:this.config.classNames.video}),vh(this.media,this.elements.wrapper),this.elements.poster=fe("div",{class:this.config.classNames.poster}),this.elements.wrapper.appendChild(this.elements.poster)),this.isHTML5?us.setup.call(this):this.isYouTube?Ma.setup.call(this):this.isVimeo&&Co.setup.call(this)):this.debug.warn("No media element found!")}};class g4{constructor(e){Z(this,"load",()=>{this.enabled&&(k.object(window.google)&&k.object(window.google.ima)?this.ready():To(this.player.config.urls.googleIMA.sdk).then(()=>{this.ready()}).catch(()=>{this.trigger("error",new Error("Google IMA SDK failed to load"))}))}),Z(this,"ready",()=>{var t;this.enabled||((t=this).manager&&t.manager.destroy(),t.elements.displayContainer&&t.elements.displayContainer.destroy(),t.elements.container.remove()),this.startSafetyTimer(12e3,"ready()"),this.managerPromise.then(()=>{this.clearSafetyTimer("onAdsManagerLoaded()")}),this.listeners(),this.setupIMA()}),Z(this,"setupIMA",()=>{this.elements.container=fe("div",{class:this.player.config.classNames.ads}),this.player.elements.container.appendChild(this.elements.container),google.ima.settings.setVpaidMode(google.ima.ImaSdkSettings.VpaidMode.ENABLED),google.ima.settings.setLocale(this.player.config.ads.language),google.ima.settings.setDisableCustomPlaybackForIOS10Plus(this.player.config.playsinline),this.elements.displayContainer=new google.ima.AdDisplayContainer(this.elements.container,this.player.media),this.loader=new google.ima.AdsLoader(this.elements.displayContainer),this.loader.addEventListener(google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,t=>this.onAdsManagerLoaded(t),!1),this.loader.addEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,t=>this.onAdError(t),!1),this.requestAds()}),Z(this,"requestAds",()=>{const{container:t}=this.player.elements;try{const n=new google.ima.AdsRequest;n.adTagUrl=this.tagUrl,n.linearAdSlotWidth=t.offsetWidth,n.linearAdSlotHeight=t.offsetHeight,n.nonLinearAdSlotWidth=t.offsetWidth,n.nonLinearAdSlotHeight=t.offsetHeight,n.forceNonLinearFullSlot=!1,n.setAdWillPlayMuted(!this.player.muted),this.loader.requestAds(n)}catch(n){this.onAdError(n)}}),Z(this,"pollCountdown",(t=!1)=>{if(!t)return clearInterval(this.countdownTimer),void this.elements.container.removeAttribute("data-badge-text");this.countdownTimer=setInterval(()=>{const n=Oa(Math.max(this.manager.getRemainingTime(),0)),i=`${st.get("advertisement",this.player.config)} - ${n}`;this.elements.container.setAttribute("data-badge-text",i)},100)}),Z(this,"onAdsManagerLoaded",t=>{if(!this.enabled)return;const n=new google.ima.AdsRenderingSettings;n.restoreCustomPlaybackStateOnAdBreakComplete=!0,n.enablePreloading=!0,this.manager=t.getAdsManager(this.player,n),this.cuePoints=this.manager.getCuePoints(),this.manager.addEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,i=>this.onAdError(i)),Object.keys(google.ima.AdEvent.Type).forEach(i=>{this.manager.addEventListener(google.ima.AdEvent.Type[i],r=>this.onAdEvent(r))}),this.trigger("loaded")}),Z(this,"addCuePoints",()=>{k.empty(this.cuePoints)||this.cuePoints.forEach(t=>{if(t!==0&&t!==-1&&t<this.player.duration){const n=this.player.elements.progress;if(k.element(n)){const i=100/this.player.duration*t,r=fe("span",{class:this.player.config.classNames.cues});r.style.left=`${i.toString()}%`,n.appendChild(r)}}})}),Z(this,"onAdEvent",t=>{const{container:n}=this.player.elements,i=t.getAd(),r=t.getAdData();switch((o=>{pe.call(this.player,this.player.media,`ads${o.replace(/_/g,"").toLowerCase()}`)})(t.type),t.type){case google.ima.AdEvent.Type.LOADED:this.trigger("loaded"),this.pollCountdown(!0),i.isLinear()||(i.width=n.offsetWidth,i.height=n.offsetHeight);break;case google.ima.AdEvent.Type.STARTED:this.manager.setVolume(this.player.volume);break;case google.ima.AdEvent.Type.ALL_ADS_COMPLETED:this.player.ended?this.loadAds():this.loader.contentComplete();break;case google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED:this.pauseContent();break;case google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED:this.pollCountdown(),this.resumeContent();break;case google.ima.AdEvent.Type.LOG:r.adError&&this.player.debug.warn(`Non-fatal ad error: ${r.adError.getMessage()}`)}}),Z(this,"onAdError",t=>{this.cancel(),this.player.debug.warn("Ads error",t)}),Z(this,"listeners",()=>{const{container:t}=this.player.elements;let n;this.player.on("canplay",()=>{this.addCuePoints()}),this.player.on("ended",()=>{this.loader.contentComplete()}),this.player.on("timeupdate",()=>{n=this.player.currentTime}),this.player.on("seeked",()=>{const i=this.player.currentTime;k.empty(this.cuePoints)||this.cuePoints.forEach((r,o)=>{n<r&&r<i&&(this.manager.discardAdBreak(),this.cuePoints.splice(o,1))})}),window.addEventListener("resize",()=>{this.manager&&this.manager.resize(t.offsetWidth,t.offsetHeight,google.ima.ViewMode.NORMAL)})}),Z(this,"play",()=>{const{container:t}=this.player.elements;this.managerPromise||this.resumeContent(),this.managerPromise.then(()=>{this.manager.setVolume(this.player.volume),this.elements.displayContainer.initialize();try{this.initialized||(this.manager.init(t.offsetWidth,t.offsetHeight,google.ima.ViewMode.NORMAL),this.manager.start()),this.initialized=!0}catch(n){this.onAdError(n)}}).catch(()=>{})}),Z(this,"resumeContent",()=>{this.elements.container.style.zIndex="",this.playing=!1,Jt(this.player.media.play())}),Z(this,"pauseContent",()=>{this.elements.container.style.zIndex=3,this.playing=!0,this.player.media.pause()}),Z(this,"cancel",()=>{this.initialized&&this.resumeContent(),this.trigger("error"),this.loadAds()}),Z(this,"loadAds",()=>{this.managerPromise.then(()=>{this.manager&&this.manager.destroy(),this.managerPromise=new Promise(t=>{this.on("loaded",t),this.player.debug.log(this.manager)}),this.initialized=!1,this.requestAds()}).catch(()=>{})}),Z(this,"trigger",(t,...n)=>{const i=this.events[t];k.array(i)&&i.forEach(r=>{k.function(r)&&r.apply(this,n)})}),Z(this,"on",(t,n)=>(k.array(this.events[t])||(this.events[t]=[]),this.events[t].push(n),this)),Z(this,"startSafetyTimer",(t,n)=>{this.player.debug.log(`Safety timer invoked from: ${n}`),this.safetyTimer=setTimeout(()=>{this.cancel(),this.clearSafetyTimer("startSafetyTimer()")},t)}),Z(this,"clearSafetyTimer",t=>{k.nullOrUndefined(this.safetyTimer)||(this.player.debug.log(`Safety timer cleared from: ${t}`),clearTimeout(this.safetyTimer),this.safetyTimer=null)}),this.player=e,this.config=e.config.ads,this.playing=!1,this.initialized=!1,this.elements={container:null,displayContainer:null},this.manager=null,this.loader=null,this.cuePoints=null,this.events={},this.safetyTimer=null,this.countdownTimer=null,this.managerPromise=new Promise((t,n)=>{this.on("loaded",t),this.on("error",n)}),this.load()}get enabled(){const{config:e}=this;return this.player.isHTML5&&this.player.isVideo&&e.enabled&&(!k.empty(e.publisherId)||k.url(e.tagUrl))}get tagUrl(){const{config:e}=this;return k.url(e.tagUrl)?e.tagUrl:`https://go.aniview.com/api/adserver6/vast/?${Hh({AV_PUBLISHERID:"58c25bb0073ef448b1087ad6",AV_CHANNELID:"5a0458dc28a06145e4519d21",AV_URL:window.location.hostname,cb:Date.now(),AV_WIDTH:640,AV_HEIGHT:480,AV_CDIM2:e.publisherId})}`}}function qh(s=0,e=0,t=255){return Math.min(Math.max(s,e),t)}const p4=s=>{const e=[];return s.split(/\r\n\r\n|\n\n|\r\r/).forEach(t=>{const n={};t.split(/\r\n|\n|\r/).forEach(i=>{if(k.number(n.startTime)){if(!k.empty(i.trim())&&k.empty(n.text)){const r=i.trim().split("#xywh=");[n.text]=r,r[1]&&([n.x,n.y,n.w,n.h]=r[1].split(","))}}else{const r=i.match(/([0-9]{2})?:?([0-9]{2}):([0-9]{2}).([0-9]{2,3})( ?--> ?)([0-9]{2})?:?([0-9]{2}):([0-9]{2}).([0-9]{2,3})/);r&&(n.startTime=60*Number(r[1]||0)*60+60*Number(r[2])+Number(r[3])+ +`0.${r[4]}`,n.endTime=60*Number(r[6]||0)*60+60*Number(r[7])+Number(r[8])+ +`0.${r[9]}`)}}),n.text&&e.push(n)}),e},Yh=(s,e)=>{const t={};return s>e.width/e.height?(t.width=e.width,t.height=1/s*e.width):(t.height=e.height,t.width=s*e.height),t};class xo{constructor(e){Z(this,"load",()=>{this.player.elements.display.seekTooltip&&(this.player.elements.display.seekTooltip.hidden=this.enabled),this.enabled&&this.getThumbnails().then(()=>{this.enabled&&(this.render(),this.determineContainerAutoSizing(),this.listeners(),this.loaded=!0)})}),Z(this,"getThumbnails",()=>new Promise(t=>{const{src:n}=this.player.config.previewThumbnails;if(k.empty(n))throw new Error("Missing previewThumbnails.src config attribute");const i=()=>{this.thumbnails.sort((r,o)=>r.height-o.height),this.player.debug.log("Preview thumbnails",this.thumbnails),t()};if(k.function(n))n(r=>{this.thumbnails=r,i()});else{const r=(k.string(n)?[n]:n).map(o=>this.getThumbnail(o));Promise.all(r).then(i)}})),Z(this,"getThumbnail",t=>new Promise(n=>{xn(t).then(i=>{const r={frames:p4(i),height:null,urlPrefix:""};r.frames[0].text.startsWith("/")||r.frames[0].text.startsWith("http://")||r.frames[0].text.startsWith("https://")||(r.urlPrefix=t.substring(0,t.lastIndexOf("/")+1));const o=new Image;o.onload=()=>{r.height=o.naturalHeight,r.width=o.naturalWidth,this.thumbnails.push(r),n()},o.src=r.urlPrefix+r.frames[0].text})})),Z(this,"startMove",t=>{if(this.loaded&&k.event(t)&&["touchmove","mousemove"].includes(t.type)&&this.player.media.duration){if(t.type==="touchmove")this.seekTime=this.player.media.duration*(this.player.elements.inputs.seek.value/100);else{var n,i;const r=this.player.elements.progress.getBoundingClientRect(),o=100/r.width*(t.pageX-r.left);this.seekTime=this.player.media.duration*(o/100),this.seekTime<0&&(this.seekTime=0),this.seekTime>this.player.media.duration-1&&(this.seekTime=this.player.media.duration-1),this.mousePosX=t.pageX,this.elements.thumb.time.innerText=Oa(this.seekTime);const l=(n=this.player.config.markers)===null||n===void 0||(i=n.points)===null||i===void 0?void 0:i.find(({time:d})=>d===Math.round(this.seekTime));l&&this.elements.thumb.time.insertAdjacentHTML("afterbegin",`${l.label}<br>`)}this.showImageAtCurrentTime()}}),Z(this,"endMove",()=>{this.toggleThumbContainer(!1,!0)}),Z(this,"startScrubbing",t=>{(k.nullOrUndefined(t.button)||t.button===!1||t.button===0)&&(this.mouseDown=!0,this.player.media.duration&&(this.toggleScrubbingContainer(!0),this.toggleThumbContainer(!1,!0),this.showImageAtCurrentTime()))}),Z(this,"endScrubbing",()=>{this.mouseDown=!1,Math.ceil(this.lastTime)===Math.ceil(this.player.media.currentTime)?this.toggleScrubbingContainer(!1):yo.call(this.player,this.player.media,"timeupdate",()=>{this.mouseDown||this.toggleScrubbingContainer(!1)})}),Z(this,"listeners",()=>{this.player.on("play",()=>{this.toggleThumbContainer(!1,!0)}),this.player.on("seeked",()=>{this.toggleThumbContainer(!1)}),this.player.on("timeupdate",()=>{this.lastTime=this.player.media.currentTime})}),Z(this,"render",()=>{this.elements.thumb.container=fe("div",{class:this.player.config.classNames.previewThumbnails.thumbContainer}),this.elements.thumb.imageContainer=fe("div",{class:this.player.config.classNames.previewThumbnails.imageContainer}),this.elements.thumb.container.appendChild(this.elements.thumb.imageContainer);const t=fe("div",{class:this.player.config.classNames.previewThumbnails.timeContainer});this.elements.thumb.time=fe("span",{},"00:00"),t.appendChild(this.elements.thumb.time),this.elements.thumb.imageContainer.appendChild(t),k.element(this.player.elements.progress)&&this.player.elements.progress.appendChild(this.elements.thumb.container),this.elements.scrubbing.container=fe("div",{class:this.player.config.classNames.previewThumbnails.scrubbingContainer}),this.player.elements.wrapper.appendChild(this.elements.scrubbing.container)}),Z(this,"destroy",()=>{this.elements.thumb.container&&this.elements.thumb.container.remove(),this.elements.scrubbing.container&&this.elements.scrubbing.container.remove()}),Z(this,"showImageAtCurrentTime",()=>{this.mouseDown?this.setScrubbingContainerSize():this.setThumbContainerSizeAndPos();const t=this.thumbnails[0].frames.findIndex(r=>this.seekTime>=r.startTime&&this.seekTime<=r.endTime),n=t>=0;let i=0;this.mouseDown||this.toggleThumbContainer(n),n&&(this.thumbnails.forEach((r,o)=>{this.loadedImages.includes(r.frames[t].text)&&(i=o)}),t!==this.showingThumb&&(this.showingThumb=t,this.loadImage(i)))}),Z(this,"loadImage",(t=0)=>{const n=this.showingThumb,i=this.thumbnails[t],{urlPrefix:r}=i,o=i.frames[n],l=i.frames[n].text,d=r+l;if(this.currentImageElement&&this.currentImageElement.dataset.filename===l)this.showImage(this.currentImageElement,o,t,n,l,!1),this.currentImageElement.dataset.index=n,this.removeOldImages(this.currentImageElement);else{this.loadingImage&&this.usingSprites&&(this.loadingImage.onload=null);const c=new Image;c.src=d,c.dataset.index=n,c.dataset.filename=l,this.showingThumbFilename=l,this.player.debug.log(`Loading image: ${d}`),c.onload=()=>this.showImage(c,o,t,n,l,!0),this.loadingImage=c,this.removeOldImages(c)}}),Z(this,"showImage",(t,n,i,r,o,l=!0)=>{this.player.debug.log(`Showing thumb: ${o}. num: ${r}. qual: ${i}. newimg: ${l}`),this.setImageSizeAndOffset(t,n),l&&(this.currentImageContainer.appendChild(t),this.currentImageElement=t,this.loadedImages.includes(o)||this.loadedImages.push(o)),this.preloadNearby(r,!0).then(this.preloadNearby(r,!1)).then(this.getHigherQuality(i,t,n,o))}),Z(this,"removeOldImages",t=>{Array.from(this.currentImageContainer.children).forEach(n=>{if(n.tagName.toLowerCase()!=="img")return;const i=this.usingSprites?500:1e3;if(n.dataset.index!==t.dataset.index&&!n.dataset.deleting){n.dataset.deleting=!0;const{currentImageContainer:r}=this;setTimeout(()=>{r.removeChild(n),this.player.debug.log(`Removing thumb: ${n.dataset.filename}`)},i)}})}),Z(this,"preloadNearby",(t,n=!0)=>new Promise(i=>{setTimeout(()=>{const r=this.thumbnails[0].frames[t].text;if(this.showingThumbFilename===r){let o;o=n?this.thumbnails[0].frames.slice(t):this.thumbnails[0].frames.slice(0,t).reverse();let l=!1;o.forEach(d=>{const c=d.text;if(c!==r&&!this.loadedImages.includes(c)){l=!0,this.player.debug.log(`Preloading thumb filename: ${c}`);const{urlPrefix:u}=this.thumbnails[0],m=u+c,f=new Image;f.src=m,f.onload=()=>{this.player.debug.log(`Preloaded thumb filename: ${c}`),this.loadedImages.includes(c)||this.loadedImages.push(c),i()}}}),l||i()}},300)})),Z(this,"getHigherQuality",(t,n,i,r)=>{if(t<this.thumbnails.length-1){let o=n.naturalHeight;this.usingSprites&&(o=i.h),o<this.thumbContainerHeight&&setTimeout(()=>{this.showingThumbFilename===r&&(this.player.debug.log(`Showing higher quality thumb for: ${r}`),this.loadImage(t+1))},300)}}),Z(this,"toggleThumbContainer",(t=!1,n=!1)=>{const i=this.player.config.classNames.previewThumbnails.thumbContainerShown;this.elements.thumb.container.classList.toggle(i,t),!t&&n&&(this.showingThumb=null,this.showingThumbFilename=null)}),Z(this,"toggleScrubbingContainer",(t=!1)=>{const n=this.player.config.classNames.previewThumbnails.scrubbingContainerShown;this.elements.scrubbing.container.classList.toggle(n,t),t||(this.showingThumb=null,this.showingThumbFilename=null)}),Z(this,"determineContainerAutoSizing",()=>{(this.elements.thumb.imageContainer.clientHeight>20||this.elements.thumb.imageContainer.clientWidth>20)&&(this.sizeSpecifiedInCSS=!0)}),Z(this,"setThumbContainerSizeAndPos",()=>{const{imageContainer:t}=this.elements.thumb;if(this.sizeSpecifiedInCSS){if(t.clientHeight>20&&t.clientWidth<20){const n=Math.floor(t.clientHeight*this.thumbAspectRatio);t.style.width=`${n}px`}else if(t.clientHeight<20&&t.clientWidth>20){const n=Math.floor(t.clientWidth/this.thumbAspectRatio);t.style.height=`${n}px`}}else{const n=Math.floor(this.thumbContainerHeight*this.thumbAspectRatio);t.style.height=`${this.thumbContainerHeight}px`,t.style.width=`${n}px`}this.setThumbContainerPos()}),Z(this,"setThumbContainerPos",()=>{const t=this.player.elements.progress.getBoundingClientRect(),n=this.player.elements.container.getBoundingClientRect(),{container:i}=this.elements.thumb,r=n.left-t.left+10,o=n.right-t.left-i.clientWidth-10,l=this.mousePosX-t.left-i.clientWidth/2,d=qh(l,r,o);i.style.left=`${d}px`,i.style.setProperty("--preview-arrow-offset",l-d+"px")}),Z(this,"setScrubbingContainerSize",()=>{const{width:t,height:n}=Yh(this.thumbAspectRatio,{width:this.player.media.clientWidth,height:this.player.media.clientHeight});this.elements.scrubbing.container.style.width=`${t}px`,this.elements.scrubbing.container.style.height=`${n}px`}),Z(this,"setImageSizeAndOffset",(t,n)=>{if(!this.usingSprites)return;const i=this.thumbContainerHeight/n.h;t.style.height=t.naturalHeight*i+"px",t.style.width=t.naturalWidth*i+"px",t.style.left=`-${n.x*i}px`,t.style.top=`-${n.y*i}px`}),this.player=e,this.thumbnails=[],this.loaded=!1,this.lastMouseMoveTime=Date.now(),this.mouseDown=!1,this.loadedImages=[],this.elements={thumb:{},scrubbing:{}},this.load()}get enabled(){return this.player.isHTML5&&this.player.isVideo&&this.player.config.previewThumbnails.enabled}get currentImageContainer(){return this.mouseDown?this.elements.scrubbing.container:this.elements.thumb.imageContainer}get usingSprites(){return Object.keys(this.thumbnails[0].frames[0]).includes("w")}get thumbAspectRatio(){return this.usingSprites?this.thumbnails[0].frames[0].w/this.thumbnails[0].frames[0].h:this.thumbnails[0].width/this.thumbnails[0].height}get thumbContainerHeight(){if(this.mouseDown){const{height:e}=Yh(this.thumbAspectRatio,{width:this.player.media.clientWidth,height:this.player.media.clientHeight});return e}return this.sizeSpecifiedInCSS?this.elements.thumb.imageContainer.clientHeight:Math.floor(this.player.media.clientWidth/this.thumbAspectRatio/4)}get currentImageElement(){return this.mouseDown?this.currentScrubbingImageElement:this.currentThumbnailImageElement}set currentImageElement(e){this.mouseDown?this.currentScrubbingImageElement=e:this.currentThumbnailImageElement=e}}const Ao={insertElements(s,e){k.string(e)?Nh(s,this.media,{src:e}):k.array(e)&&e.forEach(t=>{Nh(s,this.media,t)})},change(s){Rh(s,"sources.length")?(us.cancelRequests.call(this),this.destroy.call(this,()=>{this.options.quality=[],rs(this.media),this.media=null,k.element(this.elements.container)&&this.elements.container.removeAttribute("class");const{sources:e,type:t}=s,[{provider:n=hs.html5,src:i}]=e,r=n==="html5"?t:"div",o=n==="html5"?{}:{src:i};Object.assign(this,{provider:n,type:t,supported:ze.check(t,n,this.config.playsinline),media:fe(r,o)}),this.elements.container.appendChild(this.media),k.boolean(s.autoplay)&&(this.config.autoplay=s.autoplay),this.isHTML5&&(this.config.crossorigin&&this.media.setAttribute("crossorigin",""),this.config.autoplay&&this.media.setAttribute("autoplay",""),k.empty(s.poster)||(this.poster=s.poster),this.config.loop.active&&this.media.setAttribute("loop",""),this.config.muted&&this.media.setAttribute("muted",""),this.config.playsinline&&this.media.setAttribute("playsinline","")),Oe.addStyleHook.call(this),this.isHTML5&&Ao.insertElements.call(this,"source",e),this.config.title=s.title,Kh.setup.call(this),this.isHTML5&&Object.keys(s).includes("tracks")&&Ao.insertElements.call(this,"track",s.tracks),(this.isHTML5||this.isEmbed&&!this.supported.ui)&&Oe.build.call(this),this.isHTML5&&this.media.load(),k.empty(s.previewThumbnails)||(Object.assign(this.config.previewThumbnails,s.previewThumbnails),this.previewThumbnails&&this.previewThumbnails.loaded&&(this.previewThumbnails.destroy(),this.previewThumbnails=null),this.config.previewThumbnails.enabled&&(this.previewThumbnails=new xo(this))),this.fullscreen.update()},!0)):this.debug.warn("Invalid source format")}};class Hs{constructor(e,t){if(Z(this,"play",()=>k.function(this.media.play)?(this.ads&&this.ads.enabled&&this.ads.managerPromise.then(()=>this.ads.play()).catch(()=>Jt(this.media.play())),this.media.play()):null),Z(this,"pause",()=>this.playing&&k.function(this.media.pause)?this.media.pause():null),Z(this,"togglePlay",l=>(k.boolean(l)?l:!this.playing)?this.play():this.pause()),Z(this,"stop",()=>{this.isHTML5?(this.pause(),this.restart()):k.function(this.media.stop)&&this.media.stop()}),Z(this,"restart",()=>{this.currentTime=0}),Z(this,"rewind",l=>{this.currentTime-=k.number(l)?l:this.config.seekTime}),Z(this,"forward",l=>{this.currentTime+=k.number(l)?l:this.config.seekTime}),Z(this,"increaseVolume",l=>{const d=this.media.muted?0:this.volume;this.volume=d+(k.number(l)?l:0)}),Z(this,"decreaseVolume",l=>{this.increaseVolume(-l)}),Z(this,"airplay",()=>{ze.airplay&&this.media.webkitShowPlaybackTargetPicker()}),Z(this,"toggleControls",l=>{if(this.supported.ui&&!this.isAudio){const d=Na(this.elements.container,this.config.classNames.hideControls),c=l===void 0?void 0:!l,u=Ne(this.elements.container,this.config.classNames.hideControls,c);if(u&&k.array(this.config.controls)&&this.config.controls.includes("settings")&&!k.empty(this.config.settings)&&X.toggleMenu.call(this,!1),u!==d){const m=u?"controlshidden":"controlsshown";pe.call(this,this.media,m)}return!u}return!1}),Z(this,"on",(l,d)=>{Ie.call(this,this.elements.container,l,d)}),Z(this,"once",(l,d)=>{yo.call(this,this.elements.container,l,d)}),Z(this,"off",(l,d)=>{Da(this.elements.container,l,d)}),Z(this,"destroy",(l,d=!1)=>{if(!this.ready)return;const c=()=>{document.body.style.overflow="",this.embed=null,d?(Object.keys(this.elements).length&&(rs(this.elements.buttons.play),rs(this.elements.captions),rs(this.elements.controls),rs(this.elements.wrapper),this.elements.buttons.play=null,this.elements.captions=null,this.elements.controls=null,this.elements.wrapper=null),k.function(l)&&l()):(Y5.call(this),us.cancelRequests.call(this),va(this.elements.original,this.elements.container),pe.call(this,this.elements.original,"destroyed",!0),k.function(l)&&l.call(this.elements.original),this.ready=!1,setTimeout(()=>{this.elements=null,this.media=null},200))};this.stop(),clearTimeout(this.timers.loading),clearTimeout(this.timers.controls),clearTimeout(this.timers.resized),this.isHTML5?(Oe.toggleNativeControls.call(this,!0),c()):this.isYouTube?(clearInterval(this.timers.buffering),clearInterval(this.timers.playing),this.embed!==null&&k.function(this.embed.destroy)&&this.embed.destroy(),c()):this.isVimeo&&(this.embed!==null&&this.embed.unload().then(c),setTimeout(c,200))}),Z(this,"supports",l=>ze.mime.call(this,l)),this.timers={},this.ready=!1,this.loading=!1,this.failed=!1,this.touch=ze.touch,this.media=e,k.string(this.media)&&(this.media=document.querySelectorAll(this.media)),(window.jQuery&&this.media instanceof jQuery||k.nodeList(this.media)||k.array(this.media))&&(this.media=this.media[0]),this.config=Ue({},Wh,Hs.defaults,t||{},(()=>{try{return JSON.parse(this.media.getAttribute("data-plyr-config"))}catch{return{}}})()),this.elements={container:null,fullscreen:null,captions:null,buttons:{},display:{},progress:{},inputs:{},settings:{popup:null,menu:null,panels:{},buttons:{}}},this.captions={active:null,currentTrack:-1,meta:new WeakMap},this.fullscreen={active:!1},this.options={speed:[],quality:[]},this.debug=new o4(this.config.debug),this.debug.log("Config",this.config),this.debug.log("Support",ze),k.nullOrUndefined(this.media)||!k.element(this.media))return void this.debug.error("Setup failed: no suitable element passed");if(this.media.plyr)return void this.debug.warn("Target already setup");if(!this.config.enabled)return void this.debug.error("Setup failed: disabled by config");if(!ze.check().api)return void this.debug.error("Setup failed: no support");const n=this.media.cloneNode(!0);n.autoplay=!1,this.elements.original=n;const i=this.media.tagName.toLowerCase();let r=null,o=null;switch(i){case"div":if(r=this.media.querySelector("iframe"),k.element(r)){if(o=jh(r.getAttribute("src")),this.provider=r4(o.toString()),this.elements.container=this.media,this.media=r,this.elements.container.className="",o.search.length){const l=["1","true"];l.includes(o.searchParams.get("autoplay"))&&(this.config.autoplay=!0),l.includes(o.searchParams.get("loop"))&&(this.config.loop.active=!0),this.isYouTube?(this.config.playsinline=l.includes(o.searchParams.get("playsinline")),this.config.youtube.hl=o.searchParams.get("hl")):this.config.playsinline=!0}}else this.provider=this.media.getAttribute(this.config.attributes.embed.provider),this.media.removeAttribute(this.config.attributes.embed.provider);if(k.empty(this.provider)||!Object.values(hs).includes(this.provider))return void this.debug.error("Setup failed: Invalid provider");this.type=ko.video;break;case"video":case"audio":this.type=i,this.provider=hs.html5,this.media.hasAttribute("crossorigin")&&(this.config.crossorigin=!0),this.media.hasAttribute("autoplay")&&(this.config.autoplay=!0),(this.media.hasAttribute("playsinline")||this.media.hasAttribute("webkit-playsinline"))&&(this.config.playsinline=!0),this.media.hasAttribute("muted")&&(this.config.muted=!0),this.media.hasAttribute("loop")&&(this.config.loop.active=!0);break;default:return void this.debug.error("Setup failed: unsupported type")}this.supported=ze.check(this.type,this.provider),this.supported.api?(this.eventListeners=[],this.listeners=new l4(this),this.storage=new Cn(this),this.media.plyr=this,k.element(this.elements.container)||(this.elements.container=fe("div"),vh(this.media,this.elements.container)),Oe.migrateStyles.call(this),Oe.addStyleHook.call(this),Kh.setup.call(this),this.config.debug&&Ie.call(this,this.elements.container,this.config.events.join(" "),l=>{this.debug.log(`event: ${l.type}`)}),this.fullscreen=new Ft(this),(this.isHTML5||this.isEmbed&&!this.supported.ui)&&Oe.build.call(this),this.listeners.container(),this.listeners.global(),this.config.ads.enabled&&(this.ads=new g4(this)),this.isHTML5&&this.config.autoplay&&this.once("canplay",()=>Jt(this.play())),this.lastSeekTime=0,this.config.previewThumbnails.enabled&&(this.previewThumbnails=new xo(this))):this.debug.error("Setup failed: no support")}get isHTML5(){return this.provider===hs.html5}get isEmbed(){return this.isYouTube||this.isVimeo}get isYouTube(){return this.provider===hs.youtube}get isVimeo(){return this.provider===hs.vimeo}get isVideo(){return this.type===ko.video}get isAudio(){return this.type===ko.audio}get playing(){return!!(this.ready&&!this.paused&&!this.ended)}get paused(){return!!this.media.paused}get stopped(){return!!(this.paused&&this.currentTime===0)}get ended(){return!!this.media.ended}set currentTime(e){if(!this.duration)return;const t=k.number(e)&&e>0;this.media.currentTime=t?Math.min(e,this.duration):0,this.debug.log(`Seeking to ${this.currentTime} seconds`)}get currentTime(){return Number(this.media.currentTime)}get buffered(){const{buffered:e}=this.media;return k.number(e)?e:e&&e.length&&this.duration>0?e.end(0)/this.duration:0}get seeking(){return!!this.media.seeking}get duration(){const e=parseFloat(this.config.duration),t=(this.media||{}).duration,n=k.number(t)&&t!==1/0?t:0;return e||n}set volume(e){let t=e;k.string(t)&&(t=Number(t)),k.number(t)||(t=this.storage.get("volume")),k.number(t)||({volume:t}=this.config),t>1&&(t=1),t<0&&(t=0),this.config.volume=t,this.media.volume=t,!k.empty(e)&&this.muted&&t>0&&(this.muted=!1)}get volume(){return Number(this.media.volume)}set muted(e){let t=e;k.boolean(t)||(t=this.storage.get("muted")),k.boolean(t)||(t=this.config.muted),this.config.muted=t,this.media.muted=t}get muted(){return!!this.media.muted}get hasAudio(){return!this.isHTML5||!!this.isAudio||!!this.media.mozHasAudio||!!this.media.webkitAudioDecodedByteCount||!!(this.media.audioTracks&&this.media.audioTracks.length)}set speed(e){let t=null;k.number(e)&&(t=e),k.number(t)||(t=this.storage.get("speed")),k.number(t)||(t=this.config.speed.selected);const{minimumSpeed:n,maximumSpeed:i}=this;t=qh(t,n,i),this.config.speed.selected=t,setTimeout(()=>{this.media&&(this.media.playbackRate=t)},0)}get speed(){return Number(this.media.playbackRate)}get minimumSpeed(){return this.isYouTube?Math.min(...this.options.speed):this.isVimeo?.5:.0625}get maximumSpeed(){return this.isYouTube?Math.max(...this.options.speed):this.isVimeo?2:16}set quality(e){const t=this.config.quality,n=this.options.quality;if(!n.length)return;let i=[!k.empty(e)&&Number(e),this.storage.get("quality"),t.selected,t.default].find(k.number),r=!0;if(!n.includes(i)){const o=Ph(n,i);this.debug.warn(`Unsupported quality option: ${i}, using ${o} instead`),i=o,r=!1}t.selected=i,this.media.quality=i,r&&this.storage.set({quality:i})}get quality(){return this.media.quality}set loop(e){const t=k.boolean(e)?e:this.config.loop.active;this.config.loop.active=t,this.media.loop=t}get loop(){return!!this.media.loop}set source(e){Ao.change.call(this,e)}get source(){return this.media.currentSrc}get download(){const{download:e}=this.config.urls;return k.url(e)?e:this.source}set download(e){k.url(e)&&(this.config.urls.download=e,X.setDownloadUrl.call(this))}set poster(e){this.isVideo?Oe.setPoster.call(this,e,!1).catch(()=>{}):this.debug.warn("Poster can only be set for video")}get poster(){return this.isVideo?this.media.getAttribute("poster")||this.media.getAttribute("data-poster"):null}get ratio(){if(!this.isVideo)return null;const e=Pa(wo.call(this));return k.array(e)?e.join(":"):e}set ratio(e){this.isVideo?k.string(e)&&Mh(e)?(this.config.ratio=Pa(e),js.call(this)):this.debug.error(`Invalid aspect ratio specified (${e})`):this.debug.warn("Aspect ratio can only be set for video")}set autoplay(e){this.config.autoplay=k.boolean(e)?e:this.config.autoplay}get autoplay(){return!!this.config.autoplay}toggleCaptions(e){Be.toggle.call(this,e,!1)}set currentTrack(e){Be.set.call(this,e,!1),Be.setup.call(this)}get currentTrack(){const{toggled:e,currentTrack:t}=this.captions;return e?t:-1}set language(e){Be.setLanguage.call(this,e,!1)}get language(){return(Be.getCurrentTrack.call(this)||{}).language}set pip(e){if(!ze.pip)return;const t=k.boolean(e)?e:!this.pip;k.function(this.media.webkitSetPresentationMode)&&this.media.webkitSetPresentationMode(t?_o.active:_o.inactive),k.function(this.media.requestPictureInPicture)&&(!this.pip&&t?this.media.requestPictureInPicture():this.pip&&!t&&document.exitPictureInPicture())}get pip(){return ze.pip?k.empty(this.media.webkitPresentationMode)?this.media===document.pictureInPictureElement:this.media.webkitPresentationMode===_o.active:null}setPreviewThumbnails(e){this.previewThumbnails&&this.previewThumbnails.loaded&&(this.previewThumbnails.destroy(),this.previewThumbnails=null),Object.assign(this.config.previewThumbnails,e),this.config.previewThumbnails.enabled&&(this.previewThumbnails=new xo(this))}static supported(e,t){return ze.check(e,t)}static loadSprite(e,t){return zh(e,t)}static setup(e,t={}){let n=null;return k.string(e)?n=Array.from(document.querySelectorAll(e)):k.nodeList(e)?n=Array.from(e):k.array(e)&&(n=e.filter(k.element)),k.empty(n)?null:n.map(i=>new Hs(i,t))}}Hs.defaults=H5(Wh);const y4={key:1,class:"carousel-video-player__play-info__date carousel-video-player__play-info-portrait__date"},b4={class:"carousel-video-player__play-info-portrait__date"},w4={class:"carousel-video-player__play-info-portrait__game"},S4={key:2,class:"carousel-video-player__play-info__data"},_4={class:"video-container"},k4=["id"],E4=et({__name:"CarouselVideoPlayer",props:{play:{type:Object,required:!0},isPlaySeeker:{type:Boolean,default:!1},isPortrait:{type:Boolean,default:!0},isMobileFull:{type:Boolean,default:!0},isIos:{type:Boolean,default:!1}},emits:["play-ended"],setup(s,{emit:e}){const t=s,n=a.ref(null),i=a.ref(!1),r=a.computed(()=>`p-${t.play.playId||t.play.play_id}`),o=a.computed(()=>{if(t.isPlaySeeker){const p=new Date(t.play.gameDate);return`${p.getDate()}, ${uL(p.getMonth())} ${p.getFullYear()}`}const f=new Date(t.play.date_time_utc);return`${f.getDate()}, ${gh[f.getMonth()]} ${f.getFullYear()}`}),l=a.computed(()=>{if(t.isPlaySeeker){const f=t.play.finalScore.split(" ");return`${t.play.homeTeamName} ${f[0]} : ${f[2]} ${t.play.awayTeamName} | ${t.play.categoryName} ${t.play.playerShortName}`}return`${t.play.home_alt_name} ${t.play.score[0]} : ${t.play.score[1]} ${t.play.away_alt_name} | ${t.play.event_type_name} ${t.play.player_name}`}),d=a.computed(()=>{if(t.isPlaySeeker){const f=t.play.finalScore.split(" ");return`${t.play.homeTeamName} ${f[0]} : ${f[2]} ${t.play.awayTeamName}`}return`${t.play.home_alt_name} ${t.play.score[0]} : ${t.play.score[1]} ${t.play.away_alt_name}`}),c=a.computed(()=>t.isPlaySeeker?`${t.play.categoryName} ${t.play.playerShortName}`:`${t.play.event_type_name} ${t.play.player_name}`);function u(){n.value=new Hs(`#${r.value}`,{controls:t.isPlaySeeker?["play","volume"]:["play","volume","progress"],autoplay:!1,playsinline:!0}),t.isPlaySeeker&&(n.value.on("loadeddata",()=>{n.value.currentTime=t.play.startSeconds}),n.value.on("timeupdate",()=>{n.value.currentTime>=t.play.endSeconds&&(n.value.pause(),n.value.currentTime=t.play.startSeconds,e("play-ended"))})),n.value.source={type:"video",sources:[{src:t.isPlaySeeker?t.play.videoUrl:t.play.video_link,type:"video/mp4"}]},n.value.isDestroyed=!1,t.play.videoPlayer=n.value,t.play.plyrInit=u,n.value.on("webkitfullscreenchange",m()),n.value.on("mozfullscreenchange",m()),n.value.on("fullscreenchange",m())}function m(){const f=this;return()=>{document.exitFullscreen?document.exitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitExitFullscreen&&document.webkitExitFullscreen(),setTimeout(()=>{f.$emit("full-screen-change")},100)}}return a.onMounted(()=>{setTimeout(()=>{u()},100)}),(f,p)=>(a.openBlock(),a.createElementBlock("div",{class:"carousel-video-player",onMouseenter:p[0]||(p[0]=h=>i.value=!0),onMouseleave:p[1]||(p[1]=h=>i.value=!1)},[a.withDirectives(a.createElementVNode("div",{class:a.normalizeClass(["carousel-video-player__play-info",s.isPortrait&&s.isMobileFull?"carousel-video-player__play-info-portrait":""])},[!s.isPortrait||!s.isMobileFull?(a.openBlock(),a.createElementBlock("div",{key:0,class:a.normalizeClass(["carousel-video-player__play-info__date",s.isPortrait&&s.isMobileFull?"carousel-video-player__play-info-portrait__date":""])},a.toDisplayString(o.value),3)):a.createCommentVNode("",!0),s.isPortrait&&s.isMobileFull?(a.openBlock(),a.createElementBlock("div",y4,[a.createElementVNode("div",b4,[a.createTextVNode(a.toDisplayString(o.value)+" - ",1),a.createElementVNode("div",w4,a.toDisplayString(d.value),1)]),a.createTextVNode(" "+a.toDisplayString(c.value),1)])):(a.openBlock(),a.createElementBlock("div",S4,a.toDisplayString(l.value),1))],2),[[a.vShow,i.value]]),a.createElementVNode("div",_4,[a.createElementVNode("video",{id:r.value,controls:"",preload:"auto","data-setup":"{}"},null,8,k4)])],32))}},[["__scopeId","data-v-96776f5d"]]),Lo=s=>(a.pushScopeId("data-v-64d330ca"),s=s(),a.popScopeId(),s),T4=[Lo(()=>a.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none"},[a.createElementVNode("path",{d:"M5 15L15 5",stroke:"white","stroke-width":"1.7","stroke-miterlimit":"10","stroke-linecap":"round","stroke-linejoin":"round"}),a.createElementVNode("path",{d:"M15 15L5 5",stroke:"white","stroke-width":"1.7","stroke-miterlimit":"10","stroke-linecap":"round","stroke-linejoin":"round"})],-1))],C4={class:"carousel-full-screen__carousel"},x4={key:0,class:"icon-mobil-scrren"},A4=[Lo(()=>a.createElementVNode("img",{class:"icon-mobil-scrren__img",src:"https://golstatsimages.blob.core.windows.net/images-library/icn-mobile@2x.png"},null,-1)),Lo(()=>a.createElementVNode("div",{class:"icon-mobil-scrren__text-cont"},[a.createElementVNode("div",{class:"icon-mobil-scrren__text-cont__text1"},"Gira tu celular"),a.createElementVNode("div",{class:"icon-mobil-scrren__text-cont__text2"},"Para la mejor experiencia en video")],-1))],L4={class:"carousel-full-screen__carousel__video-player"},Io=2,I4=et({__name:"CarouselFullScreen",props:{playerQueue:{type:Array,default:()=>[]},playlistIndex:{type:Number,default:0},initialPlay:{type:Object,default:()=>({})},isPlaySeeker:{type:Boolean,default:!1}},emits:["close"],setup(s,{emit:e}){const t=s;let n=0,i=new Map;const r=a.ref({wrapAround:!1,itemsToShow:1.2,isMainSlidePriority:!0,areSlidesArrowsVisible:!0,areNavigationArrowsVisible:!1,slideLeftArrowBackgroundImage:"none",slideRightArrowBackgroundImage:"none"}),o=a.ref(null),l=a.ref([]);a.watch(()=>t.playerQueue,b=>{b.length&&(l.value=b.map((w,_)=>(w.index=_,{...w})),n=t.playlistIndex,i=new Map(l.value.map(w=>[w.index,w])))},{immediate:!0});function d(){return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|iPhone|iPad|Opera Mini/i.test(navigator.userAgent)}function c(){return/iPhone|iPad/i.test(navigator.userAgent)}function u({selectedItem:b}){if(n!==b.index){const w=b.index-n;n=b.index;const _=i.get(n+w*-1),C=i.get(n);if(_&&_.videoPlayer&&(_.videoPlayer.pause(),_.videoPlayer.currentTime=0),C&&C.videoPlayer&&C.videoPlayer.play(),w>0){const E=i.get(n+Io),A=i.get(n+1),T=i.get(n-Io);E&&(l.value.find(R=>R.index===E.index)||l.value.push(E)),A&&A.videoPlayer&&A.videoPlayer.isDestroyed&&A.plyrInit(),T&&T.videoPlayer&&(T.videoPlayer.pause(),T.videoPlayer.src="",T.videoPlayer.destroy(),T.videoPlayer.isDestroyed=!0)}else if(w<0){const E=i.get(n-1),A=i.get(n+Io);E&&E.videoPlayer&&E.videoPlayer.isDestroyed&&E.plyrInit(),A&&A.videoPlayer&&(A.videoPlayer.pause(),A.videoPlayer.src="",A.videoPlayer.destroy(),A.videoPlayer.isDestroyed=!0)}}}function m(){o.value&&o.value.next()}function f(){e("close",n)}const p=a.reactive({portrait:window.matchMedia("(orientation: portrait)").matches}),h=a.computed(()=>p.portrait);function g(){var b=window.matchMedia("(orientation: portrait)");b.matches?p.portrait=!0:p.portrait=!1}function y(){window.screen.orientation.angle!=90?p.portrait=!0:p.portrait=!1}return a.onMounted(()=>{c()?(window.addEventListener("resize",g),g()):(window.addEventListener("orientationchange",y),y()),setTimeout(()=>{const b=document.getElementsByClassName("video-element");b&&b.length&&Array.from(b).forEach((w,_)=>{w.id=`plyrFS${_+1}`})},100)}),a.onBeforeUnmount(()=>{c()?window.removeEventListener("resize",g):window.removeEventListener("orientationchange",y),t.playerQueue.forEach(b=>{b.videoPlayer&&(b.videoPlayer.pause(),b.videoPlayer.destroy())})}),(b,w)=>(a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass(["carousel-full-screen",c()&&!h.value?"paddingIos":""]),id:"carousel-swipe"},[a.createElementVNode("div",{class:"carousel-full-screen__close",style:a.normalizeStyle(c()&&h.value?"padding-top:30px":""),onClick:f},T4,4),a.createElementVNode("div",C4,[h.value&&d()?(a.openBlock(),a.createElementBlock("div",x4,A4)):a.createCommentVNode("",!0),a.createVNode(a.unref(h5),a.mergeProps({ref_key:"gscCarousel",ref:o},r.value,{items:l.value,onInput:u}),{default:a.withCtx(({item:_})=>[a.createElementVNode("div",L4,[a.createVNode(E4,{play:_,"is-portrait":h.value,"is-mobile-full":d(),"is-ios":c(),"is-play-seeker":s.isPlaySeeker,onPlayEnded:m},null,8,["play","is-portrait","is-mobile-full","is-ios","is-play-seeker"])])]),_:1},16,["items"])])],2))}},[["__scopeId","data-v-64d330ca"]]),B4=new Map([["M1",{matchDayId:1,matchDayName:"Jornada 1",matchDayAbbreviation:"J1"}],["M2",{matchDayId:2,matchDayName:"Jornada 2",matchDayAbbreviation:"J2"}],["M3",{matchDayId:3,matchDayName:"Jornada 3",matchDayAbbreviation:"J3"}],["M4",{matchDayId:4,matchDayName:"Jornada 4",matchDayAbbreviation:"J4"}],["M5",{matchDayId:5,matchDayName:"Jornada 5",matchDayAbbreviation:"J5"}],["M6",{matchDayId:6,matchDayName:"Jornada 6",matchDayAbbreviation:"J6"}],["DF",{matchDayId:181,matchDayName:"16vos de Final",matchDayAbbreviation:"DF"}],["OF",{matchDayId:176,matchDayName:"Octavos de Final",matchDayAbbreviation:"OF"}],["CF",{matchDayId:177,matchDayName:"Cuartos de Final",matchDayAbbreviation:"CF"}],["SF",{matchDayId:178,matchDayName:"Semifinales",matchDayAbbreviation:"SF"}],["3ER",{matchDayId:179,matchDayName:"Tercer lugar",matchDayAbbreviation:"3ER"}],["FINAL",{matchDayId:180,matchDayName:"Final",matchDayAbbreviation:"FINAL"}]]),R4=new Map([["M1",{matchDayId:1,matchDayName:"16vos de Final Ida",matchDayAbbreviation:"DFI"}],["M2",{matchDayId:2,matchDayName:"16vos de Final Vuelta",matchDayAbbreviation:"DFV"}],["M3",{matchDayId:3,matchDayName:"Octavos de Final Ida",matchDayAbbreviation:"OFI"}],["M4",{matchDayId:4,matchDayName:"Octavos de Final Vuelta",matchDayAbbreviation:"OFV"}],["M5",{matchDayId:5,matchDayName:"Cuartos de Final Ida",matchDayAbbreviation:"CFI"}],["M6",{matchDayId:6,matchDayName:"Cuartos de Final Vuelta",matchDayAbbreviation:"CFV"}],["M7",{matchDayId:7,matchDayName:"Semifinales Ida",matchDayAbbreviation:"SFI"}],["M8",{matchDayId:8,matchDayName:"Semifinales Vuelta",matchDayAbbreviation:"SFV"}],["M10",{matchDayId:10,matchDayName:"Final",matchDayAbbreviation:"FINAL"}]]),Jh={PO1:"CFI",PO2:"CFV",PO3:"SFI",PO4:"SFV",PO5:"FI",PO6:"FV"},Xh={DF:"Dieciseisavos",OF:"Octavos",CF:"Cuartos",SF:"Semifinales","3ER":"Tercer lugar",FINAL:"Final"},Zh={4:"Octavos",5:"Cuartos",6:"Semifinales",7:"Final"},Qh=new Map([[1,B4],[2,R4]]),v4=(s,e)=>{const t=s.__vccOpts||s;for(const[n,i]of e)t[n]=i;return t},Bo={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(s){this.status=s}}},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(s){this.$emit("click",s),this.typeOnOff&&(this.status=!this.status,this.$emit("status",this.status))}}},em=()=>{a.useCssVars(s=>({"1c960139":s.height,b2f635d8:s.borderWidthBtn,"06e99898":s.borderType,"55555c76":s.borderColor,"23b6d320":s.borderRadius,"22c97374":s.width,"22bb09fa":s.backgroundColor,c148da7c:s.cursorType,cce756fc:s.fontSize,cff98d60:s.fontStyle,"5123b3a5":s.fontFamily,"47bf58db":s.marginLeftStat,cadc8414:s.fontSizeStat}))},tm=Bo.setup;Bo.setup=tm?(s,e)=>(em(),tm(s,e)):em;const N4=s=>(a.pushScopeId("data-v-fb269a1e"),s=s(),a.popScopeId(),s),D4=["src"],P4={key:1,class:"text"},O4=["src"],F4={class:"stats"},M4=N4(()=>a.createElementVNode("img",{class:"iconstats",src:"https://az755631.vo.msecnd.net/todoelfut/playdes.png"},null,-1)),V4={class:"numstats"},$4={class:"leyend"};function U4(s,e,t,n,i,r){return a.openBlock(),a.createElementBlock("div",null,[t.type==0?(a.openBlock(),a.createElementBlock("div",{key:0,class:a.normalizeClass(["button",i.status&&t.typeOnOff&&"button-active"]),style:a.normalizeStyle([r.customStyle,i.status&&t.typeOnOff&&r.customActive]),onClick:e[0]||(e[0]=(...o)=>r.btnClick&&r.btnClick(...o))},[t.icon&&t.iconPosition.toLowerCase()==="left"?(a.openBlock(),a.createElementBlock("img",{key:0,class:"icon",style:a.normalizeStyle({width:t.iconSize}),src:t.icon},null,12,D4)):a.createCommentVNode("",!0),t.textValue?(a.openBlock(),a.createElementBlock("div",P4,a.toDisplayString(t.textValue),1)):a.createCommentVNode("",!0),t.icon&&t.iconPosition.toLowerCase()==="right"?(a.openBlock(),a.createElementBlock("img",{key:2,class:"icon",style:a.normalizeStyle({width:t.iconSize}),src:t.icon},null,12,O4)):a.createCommentVNode("",!0)],6)):a.createCommentVNode("",!0),t.type==1?(a.openBlock(),a.createElementBlock("div",{key:1,class:"button-target",onClick:e[1]||(e[1]=(...o)=>r.btnClick&&r.btnClick(...o))},[a.createElementVNode("div",F4,[M4,a.createElementVNode("div",V4,a.toDisplayString(t.textStat),1)]),a.createElementVNode("div",$4,a.toDisplayString(t.textCategory),1)])):a.createCommentVNode("",!0)])}const z4=v4(Bo,[["render",U4],["__scopeId","data-v-fb269a1e"]]),G4={class:"gsc-dropdown__main-container__item-selected"},j4=["height","width"],H4=["stroke"],W4={class:"gsc-dropdown__items-container"},K4=["onClick"],q4={key:0,class:"gsc-dropdown__items-footer"},Y4={__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(s){return["solid","dotted","dashed"].includes(s)}},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:s=>["propName","value"].every(e=>e in s)},listBackgroundColor:{type:String,default:"white"},hoverBackgroundColor:{type:String,default:"#f1f1f1"},listMarginTop:{type:String,default:"0"},listContainerPadding:{type:String,default:"0"},listItemPadding:{type:String,default:"10px 12px"},listItemMargin:{type:String,default:"0"},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},listItemBorderRadius:{type:String,default:"0"},listAlignment:{type:String,default:"left"},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(s,{emit:e}){const t=s,n=a.ref({}),i=a.ref(null),r=a.ref(t.isMultipleOption?-1:0),o=a.ref(!1);a.watch(()=>t.items,(p,h)=>{if(!t.modelValue&&(!t.onlyFirstTime||!h||!h.length)&&p&&p.length){if(t.defaultItemByProp){const g=t.items.findIndex(y=>y[t.defaultItemByProp.propName]===t.defaultItemByProp.value);g!==-1?(r.value=g,n.value=p[g]):(r.value=0,n.value=p[0])}else n.value=p[t.defaultItemByIndex];e("input",n.value)}},{immediate:!0}),a.watch(()=>t.modelValue,p=>{if(p){const h=t.items.findIndex(g=>typeof p=="object"?JSON.stringify(g)===JSON.stringify(p):g===p);h!==-1&&(r.value=h,n.value=t.items[h],e("update:modelValue",n.value))}},{immediate:!0});const l=a.computed(()=>({height:t.height,width:t.width,backgroundColor:t.backgroundColor,borderRadius:`${t.borderRadius}px`,border:`${t.borderType} ${t.borderWidth}px ${t.borderColor}`,color:t.color,"--hover-background-color":t.hoverBackgroundColor,"--list-container-padding":t.listContainerPadding,"--list-item-padding":t.listItemPadding,"--list-item-margin":t.listItemMargin,"--list-background-color":t.listBackgroundColor,"--list-height":t.listHeight,"--list-item-border-radius":t.listItemBorderRadius,"--list-item-selected-color":t.listItemSelectedColor,"--list-item-selected-background-color":t.listItemSelectedBackgroundColor,"--list-item-color":t.listItemColor,"--list-border-radius":`${t.listBorderRadius}`,"--list-border-color":t.listBorderColor,"--list-width":t.isListSameWidth?t.width:"fit-content","--list-border-width":`${t.listBorderWidth}px`,"--list-margin-top":t.listMarginTop,"--list-left":t.listAlignment==="left"?"0":"auto","--list-right":t.listAlignment==="right"?"0":"auto","--footer-border":`${t.footerBorderWidth}px solid ${t.footerBorderColor}`,"--dropdown-opacity":t.isDisabled?"0.5":"1","--dropdown-cursor":t.isDisabled?"not-allowed":"pointer","--dropdown-font-size":t.fontSize?t.fontSize:"14px"})),d=a.computed(()=>({height:`${t.arrowHeight}px`,width:`${t.arrowWidth}px`}));function c(){t.isDisabled||(o.value=!o.value)}function u(p){i.value&&!i.value.contains(p.target)&&(o.value=!1)}function m(p,h){t.isMultipleOption?r.value=-1:(r.value=h,o.value=!1),n.value=p,e("input",n.value),e("update:modelValue",n.value)}function f(){o.value=!1,e("click-ready")}return a.onMounted(()=>{document.addEventListener("click",u)}),a.onBeforeMount(()=>{document.removeEventListener("click",u)}),(p,h)=>(a.openBlock(),a.createElementBlock("div",{ref_key:"dropDown",ref:i,class:"gsc-dropdown",style:a.normalizeStyle(l.value)},[a.createElementVNode("div",{class:"gsc-dropdown__main-container",style:a.normalizeStyle({"padding-right":`${s.arrowWidth+8}px`}),onClick:c},[a.createElementVNode("div",G4,[a.renderSlot(p.$slots,"default",{selectedItem:n.value})]),a.createElementVNode("div",{class:a.normalizeClass(["gsc-dropdown__main-container__icon",{"rotated-180":o.value}]),style:a.normalizeStyle(d.value)},[(a.openBlock(),a.createElementBlock("svg",{height:s.arrowHeight,width:s.arrowWidth,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[a.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:s.arrowColor},null,8,H4)],8,j4))],6)],4),a.createVNode(a.Transition,null,{default:a.withCtx(()=>[a.withDirectives(a.createElementVNode("div",W4,[a.createElementVNode("div",null,[a.createElementVNode("div",{class:"gsc-dropdown__items",style:a.normalizeStyle({"margin-top":`${t.borderWidth}px`})},[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(s.items,(g,y)=>(a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass(["gsc-dropdown__items__item",{selected:y===r.value}]),key:y,onClick:b=>m(g,y)},[a.renderSlot(p.$slots,"availableItem",{item:g})],10,K4))),128))],4),s.isFooterVisible?(a.openBlock(),a.createElementBlock("div",q4,[a.createVNode(a.unref(z4),{"text-value":"Listo","border-color":"#cbee6b","font-size":"12px",width:"72px",height:"22px","border-radius":"62px","border-width":.8,onClick:f})])):a.createCommentVNode("",!0)])],512),[[a.vShow,o.value]])]),_:3})],4))}},J4=(s,e)=>{const t=s.__vccOpts||s;for(const[n,i]of e)t[n]=i;return t},X4={class:"tournament-select__selected-tournament"},Z4={class:"tournament-select__selected-tournament__logo"},Q4=["src"],eB={class:"tournament-select__selected-tournament__name"},tB="https://kefloixzy1.execute-api.us-west-2.amazonaws.com/prod/gs3/tournaments",sB={__name:"GSCTournamentSelect",props:{apiUrl:{type:String,default:"https://kefloixzy1.execute-api.us-west-2.amazonaws.com/prod/gs3/tournaments"},fontFamily:{type:String,default:"Poppins-Light"},logosUrl:{type:String,default:"https://golstatsimages.blob.core.windows.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(s){return["solid","dotted","dashed"].includes(s)}},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:s=>["propName","value"].every(e=>e in s)},currentSeasonId:{type:Number,default:0},tournamentsIdsToInclude:{type:Set,default:()=>new Set}},emits:["input","change-tournaments"],setup(s,{emit:e}){const t=s,n=a.ref([]),i=a.computed(()=>{const p={};return t.fontFamily&&(p["font-family"]=`${t.fontFamily}`),p}),r=a.computed(()=>t.tournamentsIdsToInclude.size?d(n.value):n.value),o=a.computed(()=>r.value.find(p=>p.seasonsIds.has(t.currentSeasonId))||r.value[0]);async function l(){try{if(t.items&&t.items.length)n.value=[...t.items];else{const p=await u();e("change-tournaments",p),n.value=p.map(h=>({...h.tournament,seasons:h.seasons,seasonsIds:h.seasons.reduce((g,y)=>(g.add(y.id),g),new Set)})).sort((h,g)=>h.order-g.order)}}catch(p){throw new Error(p)}}function d(p){return p.filter(h=>t.tournamentsIdsToInclude.has(h.id))}function c(p){const h=new XMLHttpRequest,g=`${t.logosUrl}${p}.${t.logoFileType}`;return h.open("HEAD",g,!1),h.send(),h.status!==404}async function u(){try{return(await fetch(t.apiUrl||tB)).json()}catch(p){return Promise.reject(p)}}function m(p){e("input",p)}function f(p){e("input",p)}return a.onMounted(()=>{l()}),(p,h)=>(a.openBlock(),a.createElementBlock("div",{class:"tournament-select",style:a.normalizeStyle(i.value)},[a.createVNode(a.unref(Y4),a.mergeProps(t,{"model-value":o.value,items:r.value,onInput:m,"onUpdate:modelValue":f}),{default:a.withCtx(({selectedItem:g})=>[a.createElementVNode("div",X4,[a.createElementVNode("div",Z4,[c(g.id)?(a.openBlock(),a.createElementBlock("img",{key:0,src:`${t.logosUrl}${g.id}.${t.logoFileType}`,alt:""},null,8,Q4)):a.createCommentVNode("",!0)]),a.createElementVNode("div",eB,a.toDisplayString(g.name),1)])]),availableItem:a.withCtx(({item:g})=>[a.createElementVNode("div",null,a.toDisplayString(g.name),1)]),_:1},16,["model-value","items"])],4))}},nB=J4(sB,[["__scopeId","data-v-5c8e9511"]]),aB=(s,e)=>{const t=s.__vccOpts||s;for(const[n,i]of e)t[n]=i;return t},Ro={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(s){this.status=s}}},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(s){this.$emit("click",s),this.typeOnOff&&(this.status=!this.status,this.$emit("status",this.status))}}},sm=()=>{a.useCssVars(s=>({"9d01acb4":s.height,"14e95081":s.borderWidthBtn,"38fec285":s.borderType,34353510:s.borderColor,"20d20dc6":s.borderRadius,17130967:s.width,"4ccb7d36":s.backgroundColor,"5d1e86a2":s.cursorType,ce65d4a2:s.fontSize,fe4ac47a:s.fontStyle,f98e44dc:s.fontFamily,"93b87770":s.marginLeftStat,c7f7beba:s.fontSizeStat}))},nm=Ro.setup;Ro.setup=nm?(s,e)=>(sm(),nm(s,e)):sm;const iB=s=>(a.pushScopeId("data-v-f3ee6b2b"),s=s(),a.popScopeId(),s),rB=["src"],oB={key:1,class:"text"},lB=["src"],cB={class:"stats"},dB=iB(()=>a.createElementVNode("img",{class:"iconstats",src:"https://golstatsimages.blob.core.windows.net/todoelfut/playdes.png"},null,-1)),uB={class:"numstats"},hB={class:"leyend"};function mB(s,e,t,n,i,r){return a.openBlock(),a.createElementBlock("div",null,[t.type==0?(a.openBlock(),a.createElementBlock("div",{key:0,class:a.normalizeClass(["button",i.status&&t.typeOnOff&&"button-active"]),style:a.normalizeStyle([r.customStyle,i.status&&t.typeOnOff&&r.customActive]),onClick:e[0]||(e[0]=(...o)=>r.btnClick&&r.btnClick(...o))},[t.icon&&t.iconPosition.toLowerCase()==="left"?(a.openBlock(),a.createElementBlock("img",{key:0,class:"icon",style:a.normalizeStyle({width:t.iconSize}),src:t.icon},null,12,rB)):a.createCommentVNode("",!0),t.textValue?(a.openBlock(),a.createElementBlock("div",oB,a.toDisplayString(t.textValue),1)):a.createCommentVNode("",!0),t.icon&&t.iconPosition.toLowerCase()==="right"?(a.openBlock(),a.createElementBlock("img",{key:2,class:"icon",style:a.normalizeStyle({width:t.iconSize}),src:t.icon},null,12,lB)):a.createCommentVNode("",!0)],6)):a.createCommentVNode("",!0),t.type==1?(a.openBlock(),a.createElementBlock("div",{key:1,class:"button-target",onClick:e[1]||(e[1]=(...o)=>r.btnClick&&r.btnClick(...o))},[a.createElementVNode("div",cB,[dB,a.createElementVNode("div",uB,a.toDisplayString(t.textStat),1)]),a.createElementVNode("div",hB,a.toDisplayString(t.textCategory),1)])):a.createCommentVNode("",!0)])}const fB=aB(Ro,[["render",mB],["__scopeId","data-v-f3ee6b2b"]]),gB={class:"gsc-dropdown__main-container__item-selected"},pB=["height","width"],yB=["stroke"],bB={class:"gsc-dropdown__items-container"},wB=["onClick"],SB={key:0,class:"gsc-dropdown__items-footer"},_B={__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(s){return["solid","dotted","dashed"].includes(s)}},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:s=>["propName","value"].every(e=>e in s)},listBackgroundColor:{type:String,default:"white"},hoverBackgroundColor:{type:String,default:"#f1f1f1"},listMarginTop:{type:String,default:"0"},listContainerPadding:{type:String,default:"0"},listItemPadding:{type:String,default:"10px 12px"},listItemMargin:{type:String,default:"0"},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},listItemBorderRadius:{type:String,default:"0"},listAlignment:{type:String,default:"left"},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(s,{emit:e}){const t=s,n=a.ref({}),i=a.ref(null),r=a.ref(t.isMultipleOption?-1:0),o=a.ref(!1);a.watch(()=>t.items,(p,h)=>{if(!t.modelValue&&(!t.onlyFirstTime||!h||!h.length)&&p&&p.length){if(t.defaultItemByProp){const g=t.items.findIndex(y=>y[t.defaultItemByProp.propName]===t.defaultItemByProp.value);g!==-1?(r.value=g,n.value=p[g]):(r.value=0,n.value=p[0])}else n.value=p[t.defaultItemByIndex];e("input",n.value)}},{immediate:!0}),a.watch(()=>t.modelValue,p=>{if(p){const h=t.items.findIndex(g=>typeof p=="object"?JSON.stringify(g)===JSON.stringify(p):g===p);h!==-1&&(r.value=h,n.value=t.items[h],e("update:modelValue",n.value))}},{immediate:!0});const l=a.computed(()=>({height:t.height,width:t.width,backgroundColor:t.backgroundColor,borderRadius:`${t.borderRadius}px`,border:`${t.borderType} ${t.borderWidth}px ${t.borderColor}`,color:t.color,"--hover-background-color":t.hoverBackgroundColor,"--list-container-padding":t.listContainerPadding,"--list-item-padding":t.listItemPadding,"--list-item-margin":t.listItemMargin,"--list-background-color":t.listBackgroundColor,"--list-height":t.listHeight,"--list-item-border-radius":t.listItemBorderRadius,"--list-item-selected-color":t.listItemSelectedColor,"--list-item-selected-background-color":t.listItemSelectedBackgroundColor,"--list-item-color":t.listItemColor,"--list-border-radius":`${t.listBorderRadius}`,"--list-border-color":t.listBorderColor,"--list-width":t.isListSameWidth?t.width:"fit-content","--list-border-width":`${t.listBorderWidth}px`,"--list-margin-top":t.listMarginTop,"--list-left":t.listAlignment==="left"?"0":"auto","--list-right":t.listAlignment==="right"?"0":"auto","--footer-border":`${t.footerBorderWidth}px solid ${t.footerBorderColor}`,"--dropdown-opacity":t.isDisabled?"0.5":"1","--dropdown-cursor":t.isDisabled?"not-allowed":"pointer","--dropdown-font-size":t.fontSize?t.fontSize:"14px"})),d=a.computed(()=>({height:`${t.arrowHeight}px`,width:`${t.arrowWidth}px`}));function c(){t.isDisabled||(o.value=!o.value)}function u(p){i.value&&!i.value.contains(p.target)&&(o.value=!1)}function m(p,h){t.isMultipleOption?r.value=-1:(r.value=h,o.value=!1),n.value=p,e("input",n.value),e("update:modelValue",n.value)}function f(){o.value=!1,e("click-ready")}return a.onMounted(()=>{document.addEventListener("click",u)}),a.onBeforeMount(()=>{document.removeEventListener("click",u)}),(p,h)=>(a.openBlock(),a.createElementBlock("div",{ref_key:"dropDown",ref:i,class:"gsc-dropdown",style:a.normalizeStyle(l.value)},[a.createElementVNode("div",{class:"gsc-dropdown__main-container",style:a.normalizeStyle({"padding-right":`${s.arrowWidth+8}px`}),onClick:c},[a.createElementVNode("div",gB,[a.renderSlot(p.$slots,"default",{selectedItem:n.value})]),a.createElementVNode("div",{class:a.normalizeClass(["gsc-dropdown__main-container__icon",{"rotated-180":o.value}]),style:a.normalizeStyle(d.value)},[(a.openBlock(),a.createElementBlock("svg",{height:s.arrowHeight,width:s.arrowWidth,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[a.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:s.arrowColor},null,8,yB)],8,pB))],6)],4),a.createVNode(a.Transition,null,{default:a.withCtx(()=>[a.withDirectives(a.createElementVNode("div",bB,[a.createElementVNode("div",null,[a.createElementVNode("div",{class:"gsc-dropdown__items",style:a.normalizeStyle({"margin-top":`${t.borderWidth}px`})},[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(s.items,(g,y)=>(a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass(["gsc-dropdown__items__item",{selected:y===r.value}]),key:y,onClick:b=>m(g,y)},[a.renderSlot(p.$slots,"availableItem",{item:g})],10,wB))),128))],4),s.isFooterVisible?(a.openBlock(),a.createElementBlock("div",SB,[a.createVNode(a.unref(fB),{"text-value":"Listo","border-color":"#cbee6b","font-size":"12px",width:"72px",height:"22px","border-radius":"62px","border-width":.8,onClick:f})])):a.createCommentVNode("",!0)])],512),[[a.vShow,o.value]])]),_:3})],4))}},kB=(s,e)=>{const t=s.__vccOpts||s;for(const[n,i]of e)t[n]=i;return t},EB={class:"season-name"},TB={class:"items-list-season"},CB={__name:"GSC-SeasonSelect",props:{seasons:{type:Array,default:()=>[]},currentSeasonId:{type:Number,default:0}},emits:["input"],setup(s,{emit:e}){const t=s,n=a.computed(()=>t.seasons.find(o=>o.id===t.currentSeasonId));function i(o){e("input",o)}function r(o){e("input",o)}return(o,l)=>(a.openBlock(),a.createBlock(a.unref(_B),{items:s.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:r,"onUpdate:modelValue":i},{default:a.withCtx(({selectedItem:d})=>[a.createElementVNode("div",EB,[a.createElementVNode("span",null,a.toDisplayString(d.name),1)])]),availableItem:a.withCtx(({item:d})=>[a.createElementVNode("span",TB,a.toDisplayString(d.name),1)]),_:1},8,["items","model-value"]))}},xB=kB(CB,[["__scopeId","data-v-d23e9ee2"]]);function am(s,e){return function(){return s.apply(e,arguments)}}const{toString:AB}=Object.prototype,{getPrototypeOf:vo}=Object,Va=(s=>e=>{const t=AB.call(e);return s[t]||(s[t]=t.slice(8,-1).toLowerCase())})(Object.create(null)),Mt=s=>(s=s.toLowerCase(),e=>Va(e)===s),$a=s=>e=>typeof e===s,{isArray:Ws}=Array,In=$a("undefined");function LB(s){return s!==null&&!In(s)&&s.constructor!==null&&!In(s.constructor)&&xt(s.constructor.isBuffer)&&s.constructor.isBuffer(s)}const im=Mt("ArrayBuffer");function IB(s){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(s):e=s&&s.buffer&&im(s.buffer),e}const BB=$a("string"),xt=$a("function"),rm=$a("number"),Ua=s=>s!==null&&typeof s=="object",RB=s=>s===!0||s===!1,za=s=>{if(Va(s)!=="object")return!1;const e=vo(s);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in s)&&!(Symbol.iterator in s)},vB=Mt("Date"),NB=Mt("File"),DB=Mt("Blob"),PB=Mt("FileList"),OB=s=>Ua(s)&&xt(s.pipe),FB=s=>{let e;return s&&(typeof FormData=="function"&&s instanceof FormData||xt(s.append)&&((e=Va(s))==="formdata"||e==="object"&&xt(s.toString)&&s.toString()==="[object FormData]"))},MB=Mt("URLSearchParams"),[VB,$B,UB,zB]=["ReadableStream","Request","Response","Headers"].map(Mt),GB=s=>s.trim?s.trim():s.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Bn(s,e,{allOwnKeys:t=!1}={}){if(s===null||typeof s>"u")return;let n,i;if(typeof s!="object"&&(s=[s]),Ws(s))for(n=0,i=s.length;n<i;n++)e.call(null,s[n],n,s);else{const r=t?Object.getOwnPropertyNames(s):Object.keys(s),o=r.length;let l;for(n=0;n<o;n++)l=r[n],e.call(null,s[l],l,s)}}function om(s,e){e=e.toLowerCase();const t=Object.keys(s);let n=t.length,i;for(;n-- >0;)if(i=t[n],e===i.toLowerCase())return i;return null}const Is=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,lm=s=>!In(s)&&s!==Is;function No(){const{caseless:s}=lm(this)&&this||{},e={},t=(n,i)=>{const r=s&&om(e,i)||i;za(e[r])&&za(n)?e[r]=No(e[r],n):za(n)?e[r]=No({},n):Ws(n)?e[r]=n.slice():e[r]=n};for(let n=0,i=arguments.length;n<i;n++)arguments[n]&&Bn(arguments[n],t);return e}const jB=(s,e,t,{allOwnKeys:n}={})=>(Bn(e,(i,r)=>{t&&xt(i)?s[r]=am(i,t):s[r]=i},{allOwnKeys:n}),s),HB=s=>(s.charCodeAt(0)===65279&&(s=s.slice(1)),s),WB=(s,e,t,n)=>{s.prototype=Object.create(e.prototype,n),s.prototype.constructor=s,Object.defineProperty(s,"super",{value:e.prototype}),t&&Object.assign(s.prototype,t)},KB=(s,e,t,n)=>{let i,r,o;const l={};if(e=e||{},s==null)return e;do{for(i=Object.getOwnPropertyNames(s),r=i.length;r-- >0;)o=i[r],(!n||n(o,s,e))&&!l[o]&&(e[o]=s[o],l[o]=!0);s=t!==!1&&vo(s)}while(s&&(!t||t(s,e))&&s!==Object.prototype);return e},qB=(s,e,t)=>{s=String(s),(t===void 0||t>s.length)&&(t=s.length),t-=e.length;const n=s.indexOf(e,t);return n!==-1&&n===t},YB=s=>{if(!s)return null;if(Ws(s))return s;let e=s.length;if(!rm(e))return null;const t=new Array(e);for(;e-- >0;)t[e]=s[e];return t},JB=(s=>e=>s&&e instanceof s)(typeof Uint8Array<"u"&&vo(Uint8Array)),XB=(s,e)=>{const t=(s&&s[Symbol.iterator]).call(s);let n;for(;(n=t.next())&&!n.done;){const i=n.value;e.call(s,i[0],i[1])}},ZB=(s,e)=>{let t;const n=[];for(;(t=s.exec(e))!==null;)n.push(t);return n},QB=Mt("HTMLFormElement"),eR=s=>s.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,t,n){return t.toUpperCase()+n}),cm=(({hasOwnProperty:s})=>(e,t)=>s.call(e,t))(Object.prototype),tR=Mt("RegExp"),dm=(s,e)=>{const t=Object.getOwnPropertyDescriptors(s),n={};Bn(t,(i,r)=>{let o;(o=e(i,r,s))!==!1&&(n[r]=o||i)}),Object.defineProperties(s,n)},sR=s=>{dm(s,(e,t)=>{if(xt(s)&&["arguments","caller","callee"].indexOf(t)!==-1)return!1;const n=s[t];if(xt(n)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+t+"'")})}})},nR=(s,e)=>{const t={},n=i=>{i.forEach(r=>{t[r]=!0})};return Ws(s)?n(s):n(String(s).split(e)),t},aR=()=>{},iR=(s,e)=>s!=null&&Number.isFinite(s=+s)?s:e,Do="abcdefghijklmnopqrstuvwxyz",um="0123456789",hm={DIGIT:um,ALPHA:Do,ALPHA_DIGIT:Do+Do.toUpperCase()+um},rR=(s=16,e=hm.ALPHA_DIGIT)=>{let t="";const{length:n}=e;for(;s--;)t+=e[Math.random()*n|0];return t};function oR(s){return!!(s&&xt(s.append)&&s[Symbol.toStringTag]==="FormData"&&s[Symbol.iterator])}const lR=s=>{const e=new Array(10),t=(n,i)=>{if(Ua(n)){if(e.indexOf(n)>=0)return;if(!("toJSON"in n)){e[i]=n;const r=Ws(n)?[]:{};return Bn(n,(o,l)=>{const d=t(o,i+1);!In(d)&&(r[l]=d)}),e[i]=void 0,r}}return n};return t(s,0)},cR=Mt("AsyncFunction"),dR=s=>s&&(Ua(s)||xt(s))&&xt(s.then)&&xt(s.catch),mm=((s,e)=>s?setImmediate:e?((t,n)=>(Is.addEventListener("message",({source:i,data:r})=>{i===Is&&r===t&&n.length&&n.shift()()},!1),i=>{n.push(i),Is.postMessage(t,"*")}))(`axios@${Math.random()}`,[]):t=>setTimeout(t))(typeof setImmediate=="function",xt(Is.postMessage)),uR=typeof queueMicrotask<"u"?queueMicrotask.bind(Is):typeof process<"u"&&process.nextTick||mm,F={isArray:Ws,isArrayBuffer:im,isBuffer:LB,isFormData:FB,isArrayBufferView:IB,isString:BB,isNumber:rm,isBoolean:RB,isObject:Ua,isPlainObject:za,isReadableStream:VB,isRequest:$B,isResponse:UB,isHeaders:zB,isUndefined:In,isDate:vB,isFile:NB,isBlob:DB,isRegExp:tR,isFunction:xt,isStream:OB,isURLSearchParams:MB,isTypedArray:JB,isFileList:PB,forEach:Bn,merge:No,extend:jB,trim:GB,stripBOM:HB,inherits:WB,toFlatObject:KB,kindOf:Va,kindOfTest:Mt,endsWith:qB,toArray:YB,forEachEntry:XB,matchAll:ZB,isHTMLForm:QB,hasOwnProperty:cm,hasOwnProp:cm,reduceDescriptors:dm,freezeMethods:sR,toObjectSet:nR,toCamelCase:eR,noop:aR,toFiniteNumber:iR,findKey:om,global:Is,isContextDefined:lm,ALPHABET:hm,generateString:rR,isSpecCompliantForm:oR,toJSONObject:lR,isAsyncFn:cR,isThenable:dR,setImmediate:mm,asap:uR};function ke(s,e,t,n,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=s,this.name="AxiosError",e&&(this.code=e),t&&(this.config=t),n&&(this.request=n),i&&(this.response=i,this.status=i.status?i.status:null)}F.inherits(ke,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:F.toJSONObject(this.config),code:this.code,status:this.status}}});const fm=ke.prototype,gm={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(s=>{gm[s]={value:s}}),Object.defineProperties(ke,gm),Object.defineProperty(fm,"isAxiosError",{value:!0}),ke.from=(s,e,t,n,i,r)=>{const o=Object.create(fm);return F.toFlatObject(s,o,function(l){return l!==Error.prototype},l=>l!=="isAxiosError"),ke.call(o,s.message,e,t,n,i),o.cause=s,o.name=s.name,r&&Object.assign(o,r),o};const hR=null;function Po(s){return F.isPlainObject(s)||F.isArray(s)}function pm(s){return F.endsWith(s,"[]")?s.slice(0,-2):s}function ym(s,e,t){return s?s.concat(e).map(function(n,i){return n=pm(n),!t&&i?"["+n+"]":n}).join(t?".":""):e}function mR(s){return F.isArray(s)&&!s.some(Po)}const fR=F.toFlatObject(F,{},null,function(s){return/^is[A-Z]/.test(s)});function Ga(s,e,t){if(!F.isObject(s))throw new TypeError("target must be an object");e=e||new FormData,t=F.toFlatObject(t,{metaTokens:!0,dots:!1,indexes:!1},!1,function(p,h){return!F.isUndefined(h[p])});const n=t.metaTokens,i=t.visitor||c,r=t.dots,o=t.indexes,l=(t.Blob||typeof Blob<"u"&&Blob)&&F.isSpecCompliantForm(e);if(!F.isFunction(i))throw new TypeError("visitor must be a function");function d(p){if(p===null)return"";if(F.isDate(p))return p.toISOString();if(!l&&F.isBlob(p))throw new ke("Blob is not supported. Use a Buffer instead.");return F.isArrayBuffer(p)||F.isTypedArray(p)?l&&typeof Blob=="function"?new Blob([p]):Buffer.from(p):p}function c(p,h,g){let y=p;if(p&&!g&&typeof p=="object"){if(F.endsWith(h,"{}"))h=n?h:h.slice(0,-2),p=JSON.stringify(p);else if(F.isArray(p)&&mR(p)||(F.isFileList(p)||F.endsWith(h,"[]"))&&(y=F.toArray(p)))return h=pm(h),y.forEach(function(b,w){!(F.isUndefined(b)||b===null)&&e.append(o===!0?ym([h],w,r):o===null?h:h+"[]",d(b))}),!1}return Po(p)?!0:(e.append(ym(g,h,r),d(p)),!1)}const u=[],m=Object.assign(fR,{defaultVisitor:c,convertValue:d,isVisitable:Po});function f(p,h){if(!F.isUndefined(p)){if(u.indexOf(p)!==-1)throw Error("Circular reference detected in "+h.join("."));u.push(p),F.forEach(p,function(g,y){(!(F.isUndefined(g)||g===null)&&i.call(e,g,F.isString(y)?y.trim():y,h,m))===!0&&f(g,h?h.concat(y):[y])}),u.pop()}}if(!F.isObject(s))throw new TypeError("data must be an object");return f(s),e}function bm(s){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(s).replace(/[!'()~]|%20|%00/g,function(t){return e[t]})}function Oo(s,e){this._pairs=[],s&&Ga(s,this,e)}const wm=Oo.prototype;wm.append=function(s,e){this._pairs.push([s,e])},wm.toString=function(s){const e=s?function(t){return s.call(this,t,bm)}:bm;return this._pairs.map(function(t){return e(t[0])+"="+e(t[1])},"").join("&")};function gR(s){return encodeURIComponent(s).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Sm(s,e,t){if(!e)return s;const n=t&&t.encode||gR;F.isFunction(t)&&(t={serialize:t});const i=t&&t.serialize;let r;if(i?r=i(e,t):r=F.isURLSearchParams(e)?e.toString():new Oo(e,t).toString(n),r){const o=s.indexOf("#");o!==-1&&(s=s.slice(0,o)),s+=(s.indexOf("?")===-1?"?":"&")+r}return s}class pR{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){F.forEach(this.handlers,function(t){t!==null&&e(t)})}}const _m=pR,km={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},yR=typeof URLSearchParams<"u"?URLSearchParams:Oo,bR=typeof FormData<"u"?FormData:null,wR=typeof Blob<"u"?Blob:null,SR={isBrowser:!0,classes:{URLSearchParams:yR,FormData:bR,Blob:wR},protocols:["http","https","file","blob","url","data"]},Fo=typeof window<"u"&&typeof document<"u",Mo=typeof navigator=="object"&&navigator||void 0,_R=Fo&&(!Mo||["ReactNative","NativeScript","NS"].indexOf(Mo.product)<0),kR=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",ER=Fo&&window.location.href||"http://localhost",TR=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Fo,hasStandardBrowserEnv:_R,hasStandardBrowserWebWorkerEnv:kR,navigator:Mo,origin:ER},Symbol.toStringTag,{value:"Module"})),yt={...TR,...SR};function CR(s,e){return Ga(s,new yt.classes.URLSearchParams,Object.assign({visitor:function(t,n,i,r){return yt.isNode&&F.isBuffer(t)?(this.append(n,t.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)}},e))}function xR(s){return F.matchAll(/\w+|\[(\w*)]/g,s).map(e=>e[0]==="[]"?"":e[1]||e[0])}function AR(s){const e={},t=Object.keys(s);let n;const i=t.length;let r;for(n=0;n<i;n++)r=t[n],e[r]=s[r];return e}function Em(s){function e(t,n,i,r){let o=t[r++];if(o==="__proto__")return!0;const l=Number.isFinite(+o),d=r>=t.length;return o=!o&&F.isArray(i)?i.length:o,d?(F.hasOwnProp(i,o)?i[o]=[i[o],n]:i[o]=n,!l):((!i[o]||!F.isObject(i[o]))&&(i[o]=[]),e(t,n,i[o],r)&&F.isArray(i[o])&&(i[o]=AR(i[o])),!l)}if(F.isFormData(s)&&F.isFunction(s.entries)){const t={};return F.forEachEntry(s,(n,i)=>{e(xR(n),i,t,0)}),t}return null}function LR(s,e,t){if(F.isString(s))try{return(e||JSON.parse)(s),F.trim(s)}catch(n){if(n.name!=="SyntaxError")throw n}return(0,JSON.stringify)(s)}const Vo={transitional:km,adapter:["xhr","http","fetch"],transformRequest:[function(s,e){const t=e.getContentType()||"",n=t.indexOf("application/json")>-1,i=F.isObject(s);if(i&&F.isHTMLForm(s)&&(s=new FormData(s)),F.isFormData(s))return n?JSON.stringify(Em(s)):s;if(F.isArrayBuffer(s)||F.isBuffer(s)||F.isStream(s)||F.isFile(s)||F.isBlob(s)||F.isReadableStream(s))return s;if(F.isArrayBufferView(s))return s.buffer;if(F.isURLSearchParams(s))return e.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),s.toString();let r;if(i){if(t.indexOf("application/x-www-form-urlencoded")>-1)return CR(s,this.formSerializer).toString();if((r=F.isFileList(s))||t.indexOf("multipart/form-data")>-1){const o=this.env&&this.env.FormData;return Ga(r?{"files[]":s}:s,o&&new o,this.formSerializer)}}return i||n?(e.setContentType("application/json",!1),LR(s)):s}],transformResponse:[function(s){const e=this.transitional||Vo.transitional,t=e&&e.forcedJSONParsing,n=this.responseType==="json";if(F.isResponse(s)||F.isReadableStream(s))return s;if(s&&F.isString(s)&&(t&&!this.responseType||n)){const i=!(e&&e.silentJSONParsing)&&n;try{return JSON.parse(s)}catch(r){if(i)throw r.name==="SyntaxError"?ke.from(r,ke.ERR_BAD_RESPONSE,this,null,this.response):r}}return s}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:yt.classes.FormData,Blob:yt.classes.Blob},validateStatus:function(s){return s>=200&&s<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};F.forEach(["delete","get","head","post","put","patch"],s=>{Vo.headers[s]={}});const $o=Vo,IR=F.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),BR=s=>{const e={};let t,n,i;return s&&s.split(`
38
38
  `).forEach(function(r){i=r.indexOf(":"),t=r.substring(0,i).trim().toLowerCase(),n=r.substring(i+1).trim(),!(!t||e[t]&&IR[t])&&(t==="set-cookie"?e[t]?e[t].push(n):e[t]=[n]:e[t]=e[t]?e[t]+", "+n:n)}),e},Tm=Symbol("internals");function Rn(s){return s&&String(s).trim().toLowerCase()}function ja(s){return s===!1||s==null?s:F.isArray(s)?s.map(ja):String(s)}function RR(s){const e=Object.create(null),t=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=t.exec(s);)e[n[1]]=n[2];return e}const vR=s=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(s.trim());function Uo(s,e,t,n,i){if(F.isFunction(n))return n.call(this,e,t);if(i&&(e=t),!!F.isString(e)){if(F.isString(n))return e.indexOf(n)!==-1;if(F.isRegExp(n))return n.test(e)}}function NR(s){return s.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,n)=>t.toUpperCase()+n)}function DR(s,e){const t=F.toCamelCase(" "+e);["get","set","has"].forEach(n=>{Object.defineProperty(s,n+t,{value:function(i,r,o){return this[n].call(this,e,i,r,o)},configurable:!0})})}class Ha{constructor(e){e&&this.set(e)}set(e,t,n){const i=this;function r(l,d,c){const u=Rn(d);if(!u)throw new Error("header name must be a non-empty string");const m=F.findKey(i,u);(!m||i[m]===void 0||c===!0||c===void 0&&i[m]!==!1)&&(i[m||d]=ja(l))}const o=(l,d)=>F.forEach(l,(c,u)=>r(c,u,d));if(F.isPlainObject(e)||e instanceof this.constructor)o(e,t);else if(F.isString(e)&&(e=e.trim())&&!vR(e))o(BR(e),t);else if(F.isHeaders(e))for(const[l,d]of e.entries())r(d,l,n);else e!=null&&r(t,e,n);return this}get(e,t){if(e=Rn(e),e){const n=F.findKey(this,e);if(n){const i=this[n];if(!t)return i;if(t===!0)return RR(i);if(F.isFunction(t))return t.call(this,i,n);if(F.isRegExp(t))return t.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=Rn(e),e){const n=F.findKey(this,e);return!!(n&&this[n]!==void 0&&(!t||Uo(this,this[n],n,t)))}return!1}delete(e,t){const n=this;let i=!1;function r(o){if(o=Rn(o),o){const l=F.findKey(n,o);l&&(!t||Uo(n,n[l],l,t))&&(delete n[l],i=!0)}}return F.isArray(e)?e.forEach(r):r(e),i}clear(e){const t=Object.keys(this);let n=t.length,i=!1;for(;n--;){const r=t[n];(!e||Uo(this,this[r],r,e,!0))&&(delete this[r],i=!0)}return i}normalize(e){const t=this,n={};return F.forEach(this,(i,r)=>{const o=F.findKey(n,r);if(o){t[o]=ja(i),delete t[r];return}const l=e?NR(r):String(r).trim();l!==r&&delete t[r],t[l]=ja(i),n[l]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return F.forEach(this,(n,i)=>{n!=null&&n!==!1&&(t[i]=e&&F.isArray(n)?n.join(", "):n)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,t])=>e+": "+t).join(`
39
39
  `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const n=new this(e);return t.forEach(i=>n.set(i)),n}static accessor(e){const t=(this[Tm]=this[Tm]={accessors:{}}).accessors,n=this.prototype;function i(r){const o=Rn(r);t[o]||(DR(n,r),t[o]=!0)}return F.isArray(e)?e.forEach(i):i(e),this}}Ha.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),F.reduceDescriptors(Ha.prototype,({value:s},e)=>{let t=e[0].toUpperCase()+e.slice(1);return{get:()=>s,set(n){this[t]=n}}}),F.freezeMethods(Ha);const Vt=Ha;function zo(s,e){const t=this||$o,n=e||t,i=Vt.from(n.headers);let r=n.data;return F.forEach(s,function(o){r=o.call(t,r,i.normalize(),e?e.status:void 0)}),i.normalize(),r}function Cm(s){return!!(s&&s.__CANCEL__)}function Ks(s,e,t){ke.call(this,s??"canceled",ke.ERR_CANCELED,e,t),this.name="CanceledError"}F.inherits(Ks,ke,{__CANCEL__:!0});function xm(s,e,t){const n=t.config.validateStatus;!t.status||!n||n(t.status)?s(t):e(new ke("Request failed with status code "+t.status,[ke.ERR_BAD_REQUEST,ke.ERR_BAD_RESPONSE][Math.floor(t.status/100)-4],t.config,t.request,t))}function PR(s){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(s);return e&&e[1]||""}function OR(s,e){s=s||10;const t=new Array(s),n=new Array(s);let i=0,r=0,o;return e=e!==void 0?e:1e3,function(l){const d=Date.now(),c=n[r];o||(o=d),t[i]=l,n[i]=d;let u=r,m=0;for(;u!==i;)m+=t[u++],u=u%s;if(i=(i+1)%s,i===r&&(r=(r+1)%s),d-o<e)return;const f=c&&d-c;return f?Math.round(m*1e3/f):void 0}}function FR(s,e){let t=0,n=1e3/e,i,r;const o=(l,d=Date.now())=>{t=d,i=null,r&&(clearTimeout(r),r=null),s.apply(null,l)};return[(...l)=>{const d=Date.now(),c=d-t;c>=n?o(l,d):(i=l,r||(r=setTimeout(()=>{r=null,o(i)},n-c)))},()=>i&&o(i)]}const Wa=(s,e,t=3)=>{let n=0;const i=OR(50,250);return FR(r=>{const o=r.loaded,l=r.lengthComputable?r.total:void 0,d=o-n,c=i(d),u=o<=l;n=o;const m={loaded:o,total:l,progress:l?o/l:void 0,bytes:d,rate:c||void 0,estimated:c&&l&&u?(l-o)/c:void 0,event:r,lengthComputable:l!=null,[e?"download":"upload"]:!0};s(m)},t)},Am=(s,e)=>{const t=s!=null;return[n=>e[0]({lengthComputable:t,total:s,loaded:n}),e[1]]},Lm=s=>(...e)=>F.asap(()=>s(...e)),MR=yt.hasStandardBrowserEnv?((s,e)=>t=>(t=new URL(t,yt.origin),s.protocol===t.protocol&&s.host===t.host&&(e||s.port===t.port)))(new URL(yt.origin),yt.navigator&&/(msie|trident)/i.test(yt.navigator.userAgent)):()=>!0,VR=yt.hasStandardBrowserEnv?{write(s,e,t,n,i,r){const o=[s+"="+encodeURIComponent(e)];F.isNumber(t)&&o.push("expires="+new Date(t).toGMTString()),F.isString(n)&&o.push("path="+n),F.isString(i)&&o.push("domain="+i),r===!0&&o.push("secure"),document.cookie=o.join("; ")},read(s){const e=document.cookie.match(new RegExp("(^|;\\s*)("+s+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(s){this.write(s,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function $R(s){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(s)}function UR(s,e){return e?s.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):s}function Im(s,e){return s&&!$R(e)?UR(s,e):e}const Bm=s=>s instanceof Vt?{...s}:s;function Bs(s,e){e=e||{};const t={};function n(c,u,m,f){return F.isPlainObject(c)&&F.isPlainObject(u)?F.merge.call({caseless:f},c,u):F.isPlainObject(u)?F.merge({},u):F.isArray(u)?u.slice():u}function i(c,u,m,f){if(F.isUndefined(u)){if(!F.isUndefined(c))return n(void 0,c,m,f)}else return n(c,u,m,f)}function r(c,u){if(!F.isUndefined(u))return n(void 0,u)}function o(c,u){if(F.isUndefined(u)){if(!F.isUndefined(c))return n(void 0,c)}else return n(void 0,u)}function l(c,u,m){if(m in e)return n(c,u);if(m in s)return n(void 0,c)}const d={url:r,method:r,data:r,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:l,headers:(c,u,m)=>i(Bm(c),Bm(u),m,!0)};return F.forEach(Object.keys(Object.assign({},s,e)),function(c){const u=d[c]||i,m=u(s[c],e[c],c);F.isUndefined(m)&&u!==l||(t[c]=m)}),t}const Rm=s=>{const e=Bs({},s);let{data:t,withXSRFToken:n,xsrfHeaderName:i,xsrfCookieName:r,headers:o,auth:l}=e;e.headers=o=Vt.from(o),e.url=Sm(Im(e.baseURL,e.url),s.params,s.paramsSerializer),l&&o.set("Authorization","Basic "+btoa((l.username||"")+":"+(l.password?unescape(encodeURIComponent(l.password)):"")));let d;if(F.isFormData(t)){if(yt.hasStandardBrowserEnv||yt.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if((d=o.getContentType())!==!1){const[c,...u]=d?d.split(";").map(m=>m.trim()).filter(Boolean):[];o.setContentType([c||"multipart/form-data",...u].join("; "))}}if(yt.hasStandardBrowserEnv&&(n&&F.isFunction(n)&&(n=n(e)),n||n!==!1&&MR(e.url))){const c=i&&r&&VR.read(r);c&&o.set(i,c)}return e},zR=typeof XMLHttpRequest<"u",GR=zR&&function(s){return new Promise(function(e,t){const n=Rm(s);let i=n.data;const r=Vt.from(n.headers).normalize();let{responseType:o,onUploadProgress:l,onDownloadProgress:d}=n,c,u,m,f,p;function h(){f&&f(),p&&p(),n.cancelToken&&n.cancelToken.unsubscribe(c),n.signal&&n.signal.removeEventListener("abort",c)}let g=new XMLHttpRequest;g.open(n.method.toUpperCase(),n.url,!0),g.timeout=n.timeout;function y(){if(!g)return;const w=Vt.from("getAllResponseHeaders"in g&&g.getAllResponseHeaders()),_={data:!o||o==="text"||o==="json"?g.responseText:g.response,status:g.status,statusText:g.statusText,headers:w,config:s,request:g};xm(function(C){e(C),h()},function(C){t(C),h()},_),g=null}"onloadend"in g?g.onloadend=y:g.onreadystatechange=function(){!g||g.readyState!==4||g.status===0&&!(g.responseURL&&g.responseURL.indexOf("file:")===0)||setTimeout(y)},g.onabort=function(){g&&(t(new ke("Request aborted",ke.ECONNABORTED,s,g)),g=null)},g.onerror=function(){t(new ke("Network Error",ke.ERR_NETWORK,s,g)),g=null},g.ontimeout=function(){let w=n.timeout?"timeout of "+n.timeout+"ms exceeded":"timeout exceeded";const _=n.transitional||km;n.timeoutErrorMessage&&(w=n.timeoutErrorMessage),t(new ke(w,_.clarifyTimeoutError?ke.ETIMEDOUT:ke.ECONNABORTED,s,g)),g=null},i===void 0&&r.setContentType(null),"setRequestHeader"in g&&F.forEach(r.toJSON(),function(w,_){g.setRequestHeader(_,w)}),F.isUndefined(n.withCredentials)||(g.withCredentials=!!n.withCredentials),o&&o!=="json"&&(g.responseType=n.responseType),d&&([m,p]=Wa(d,!0),g.addEventListener("progress",m)),l&&g.upload&&([u,f]=Wa(l),g.upload.addEventListener("progress",u),g.upload.addEventListener("loadend",f)),(n.cancelToken||n.signal)&&(c=w=>{g&&(t(!w||w.type?new Ks(null,s,g):w),g.abort(),g=null)},n.cancelToken&&n.cancelToken.subscribe(c),n.signal&&(n.signal.aborted?c():n.signal.addEventListener("abort",c)));const b=PR(n.url);if(b&&yt.protocols.indexOf(b)===-1){t(new ke("Unsupported protocol "+b+":",ke.ERR_BAD_REQUEST,s));return}g.send(i||null)})},jR=(s,e)=>{const{length:t}=s=s?s.filter(Boolean):[];if(e||t){let n=new AbortController,i;const r=function(c){if(!i){i=!0,l();const u=c instanceof Error?c:this.reason;n.abort(u instanceof ke?u:new Ks(u instanceof Error?u.message:u))}};let o=e&&setTimeout(()=>{o=null,r(new ke(`timeout ${e} of ms exceeded`,ke.ETIMEDOUT))},e);const l=()=>{s&&(o&&clearTimeout(o),o=null,s.forEach(c=>{c.unsubscribe?c.unsubscribe(r):c.removeEventListener("abort",r)}),s=null)};s.forEach(c=>c.addEventListener("abort",r));const{signal:d}=n;return d.unsubscribe=()=>F.asap(l),d}},HR=jR,WR=function*(s,e){let t=s.byteLength;if(t<e){yield s;return}let n=0,i;for(;n<t;)i=n+e,yield s.slice(n,i),n=i},KR=async function*(s,e){for await(const t of qR(s))yield*WR(t,e)},qR=async function*(s){if(s[Symbol.asyncIterator]){yield*s;return}const e=s.getReader();try{for(;;){const{done:t,value:n}=await e.read();if(t)break;yield n}}finally{await e.cancel()}},vm=(s,e,t,n)=>{const i=KR(s,e);let r=0,o,l=d=>{o||(o=!0,n&&n(d))};return new ReadableStream({async pull(d){try{const{done:c,value:u}=await i.next();if(c){l(),d.close();return}let m=u.byteLength;if(t){let f=r+=m;t(f)}d.enqueue(new Uint8Array(u))}catch(c){throw l(c),c}},cancel(d){return l(d),i.return()}},{highWaterMark:2})},Ka=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",Nm=Ka&&typeof ReadableStream=="function",YR=Ka&&(typeof TextEncoder=="function"?(s=>e=>s.encode(e))(new TextEncoder):async s=>new Uint8Array(await new Response(s).arrayBuffer())),Dm=(s,...e)=>{try{return!!s(...e)}catch{return!1}},JR=Nm&&Dm(()=>{let s=!1;const e=new Request(yt.origin,{body:new ReadableStream,method:"POST",get duplex(){return s=!0,"half"}}).headers.has("Content-Type");return s&&!e}),Pm=64*1024,Go=Nm&&Dm(()=>F.isReadableStream(new Response("").body)),qa={stream:Go&&(s=>s.body)};Ka&&(s=>{["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!qa[e]&&(qa[e]=F.isFunction(s[e])?t=>t[e]():(t,n)=>{throw new ke(`Response type '${e}' is not supported`,ke.ERR_NOT_SUPPORT,n)})})})(new Response);const XR=async s=>{if(s==null)return 0;if(F.isBlob(s))return s.size;if(F.isSpecCompliantForm(s))return(await new Request(yt.origin,{method:"POST",body:s}).arrayBuffer()).byteLength;if(F.isArrayBufferView(s)||F.isArrayBuffer(s))return s.byteLength;if(F.isURLSearchParams(s)&&(s=s+""),F.isString(s))return(await YR(s)).byteLength},ZR=async(s,e)=>F.toFiniteNumber(s.getContentLength())??XR(e),QR=Ka&&(async s=>{let{url:e,method:t,data:n,signal:i,cancelToken:r,timeout:o,onDownloadProgress:l,onUploadProgress:d,responseType:c,headers:u,withCredentials:m="same-origin",fetchOptions:f}=Rm(s);c=c?(c+"").toLowerCase():"text";let p=HR([i,r&&r.toAbortSignal()],o),h;const g=p&&p.unsubscribe&&(()=>{p.unsubscribe()});let y;try{if(d&&JR&&t!=="get"&&t!=="head"&&(y=await ZR(u,n))!==0){let E=new Request(e,{method:"POST",body:n,duplex:"half"}),A;if(F.isFormData(n)&&(A=E.headers.get("content-type"))&&u.setContentType(A),E.body){const[T,R]=Am(y,Wa(Lm(d)));n=vm(E.body,Pm,T,R)}}F.isString(m)||(m=m?"include":"omit");const b="credentials"in Request.prototype;h=new Request(e,{...f,signal:p,method:t.toUpperCase(),headers:u.normalize().toJSON(),body:n,duplex:"half",credentials:b?m:void 0});let w=await fetch(h);const _=Go&&(c==="stream"||c==="response");if(Go&&(l||_&&g)){const E={};["status","statusText","headers"].forEach(I=>{E[I]=w[I]});const A=F.toFiniteNumber(w.headers.get("content-length")),[T,R]=l&&Am(A,Wa(Lm(l),!0))||[];w=new Response(vm(w.body,Pm,T,()=>{R&&R(),g&&g()}),E)}c=c||"text";let C=await qa[F.findKey(qa,c)||"text"](w,s);return!_&&g&&g(),await new Promise((E,A)=>{xm(E,A,{data:C,headers:Vt.from(w.headers),status:w.status,statusText:w.statusText,config:s,request:h})})}catch(b){throw g&&g(),b&&b.name==="TypeError"&&/fetch/i.test(b.message)?Object.assign(new ke("Network Error",ke.ERR_NETWORK,s,h),{cause:b.cause||b}):ke.from(b,b&&b.code,s,h)}}),jo={http:hR,xhr:GR,fetch:QR};F.forEach(jo,(s,e)=>{if(s){try{Object.defineProperty(s,"name",{value:e})}catch{}Object.defineProperty(s,"adapterName",{value:e})}});const Om=s=>`- ${s}`,ev=s=>F.isFunction(s)||s===null||s===!1,Fm={getAdapter:s=>{s=F.isArray(s)?s:[s];const{length:e}=s;let t,n;const i={};for(let r=0;r<e;r++){t=s[r];let o;if(n=t,!ev(t)&&(n=jo[(o=String(t)).toLowerCase()],n===void 0))throw new ke(`Unknown adapter '${o}'`);if(n)break;i[o||"#"+r]=n}if(!n){const r=Object.entries(i).map(([l,d])=>`adapter ${l} `+(d===!1?"is not supported by the environment":"is not available in the build"));let o=e?r.length>1?`since :
40
40
  `+r.map(Om).join(`
@@ -64,4 +64,4 @@
64
64
  `),c=[],u=e?Y6(e.baseTime,e.timescale):0;let m="00:00.000",f=0,p=0,h,g=!0;l.oncue=function(y){const b=t[n];let w=t.ccOffset;const _=(f-u)/9e4;if(b!=null&&b.new&&(p!==void 0?w=t.ccOffset=b.start:RP(t,n,_)),_){if(!e){h=new Error("Missing initPTS for VTT MPEGTS");return}w=_-t.presentationOffset}const C=y.endTime-y.startTime,E=Lt((y.startTime+w-p)*9e4,i*9e4)/9e4;y.startTime=Math.max(E,0),y.endTime=Math.max(E+C,0);const A=y.text.trim();y.text=decodeURIComponent(encodeURIComponent(A)),y.id||(y.id=ql(y.startTime,y.endTime,A)),y.endTime>0&&c.push(y)},l.onparsingerror=function(y){h=y},l.onflush=function(){if(h){o(h);return}r(c)},d.forEach(y=>{if(g)if(Wl(y,"X-TIMESTAMP-MAP=")){g=!1,y.slice(16).split(",").forEach(b=>{Wl(b,"LOCAL:")?m=b.slice(6):Wl(b,"MPEGTS:")&&(f=parseInt(b.slice(7)))});try{p=BP(m)/1e3}catch(b){h=b}return}else y===""&&(g=!1);l.parse(y+`
65
65
  `)}),l.flush()}const Yl="stpp.ttml.im1t",Qg=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,ep=/^(\d*(?:\.\d*)?)(h|m|s|ms|f|t)$/,NP={left:"start",center:"center",right:"end",start:"start",end:"end"};function tp(s,e,t,n){const i=be(new Uint8Array(s),["mdat"]);if(i.length===0){n(new Error("Could not parse IMSC1 mdat"));return}const r=i.map(l=>Zt(l)),o=q6(e.baseTime,1,e.timescale);try{r.forEach(l=>t(DP(l,o)))}catch(l){n(l)}}function DP(s,e){const i=new DOMParser().parseFromString(s,"text/xml").getElementsByTagName("tt")[0];if(!i)throw new Error("Invalid ttml");const r={frameRate:30,subFrameRate:1,frameRateMultiplier:0,tickRate:0},o=Object.keys(r).reduce((m,f)=>(m[f]=i.getAttribute(`ttp:${f}`)||r[f],m),{}),l=i.getAttribute("xml:space")!=="preserve",d=sp(Jl(i,"styling","style")),c=sp(Jl(i,"layout","region")),u=Jl(i,"body","[begin]");return[].map.call(u,m=>{const f=np(m,l);if(!f||!m.hasAttribute("begin"))return null;const p=Zl(m.getAttribute("begin"),o),h=Zl(m.getAttribute("dur"),o);let g=Zl(m.getAttribute("end"),o);if(p===null)throw ap(m);if(g===null){if(h===null)throw ap(m);g=p+h}const y=new jl(p-e,g-e,f);y.id=ql(y.startTime,y.endTime,y.text);const b=c[m.getAttribute("region")],w=d[m.getAttribute("style")],_=PP(b,w,d),{textAlign:C}=_;if(C){const E=NP[C];E&&(y.lineAlign=E),y.align=C}return qe(y,_),y}).filter(m=>m!==null)}function Jl(s,e,t){const n=s.getElementsByTagName(e)[0];return n?[].slice.call(n.querySelectorAll(t)):[]}function sp(s){return s.reduce((e,t)=>{const n=t.getAttribute("xml:id");return n&&(e[n]=t),e},{})}function np(s,e){return[].slice.call(s.childNodes).reduce((t,n,i)=>{var r;return n.nodeName==="br"&&i?t+`
66
66
  `:(r=n.childNodes)!=null&&r.length?np(n,e):e?t+n.textContent.trim().replace(/\s+/g," "):t+n.textContent},"")}function PP(s,e,t){const n="http://www.w3.org/ns/ttml#styling";let i=null;const r=["displayAlign","textAlign","color","backgroundColor","fontSize","fontFamily"],o=s!=null&&s.hasAttribute("style")?s.getAttribute("style"):null;return o&&t.hasOwnProperty(o)&&(i=t[o]),r.reduce((l,d)=>{const c=Xl(e,n,d)||Xl(s,n,d)||Xl(i,n,d);return c&&(l[d]=c),l},{})}function Xl(s,e,t){return s&&s.hasAttributeNS(e,t)?s.getAttributeNS(e,t):null}function ap(s){return new Error(`Could not parse ttml timestamp ${s}`)}function Zl(s,e){if(!s)return null;let t=Jg(s);return t===null&&(Qg.test(s)?t=OP(s,e):ep.test(s)&&(t=FP(s,e))),t}function OP(s,e){const t=Qg.exec(s),n=(t[4]|0)+(t[5]|0)/e.subFrameRate;return(t[1]|0)*3600+(t[2]|0)*60+(t[3]|0)+n/e.frameRate}function FP(s,e){const t=ep.exec(s),n=Number(t[1]);switch(t[2]){case"h":return n*3600;case"m":return n*60;case"ms":return n*1e3;case"f":return n/e.frameRate;case"t":return n/e.tickRate}return n}class MP{constructor(e){this.hls=void 0,this.media=null,this.config=void 0,this.enabled=!0,this.Cues=void 0,this.textTracks=[],this.tracks=[],this.initPTS=[],this.unparsedVttFrags=[],this.captionsTracks={},this.nonNativeCaptionsTracks={},this.cea608Parser1=void 0,this.cea608Parser2=void 0,this.lastCc=-1,this.lastSn=-1,this.lastPartIndex=-1,this.prevCC=-1,this.vttCCs=op(),this.captionsProperties=void 0,this.hls=e,this.config=e.config,this.Cues=e.config.cueHandler,this.captionsProperties={textTrack1:{label:this.config.captionsTextTrack1Label,languageCode:this.config.captionsTextTrack1LanguageCode},textTrack2:{label:this.config.captionsTextTrack2Label,languageCode:this.config.captionsTextTrack2LanguageCode},textTrack3:{label:this.config.captionsTextTrack3Label,languageCode:this.config.captionsTextTrack3LanguageCode},textTrack4:{label:this.config.captionsTextTrack4Label,languageCode:this.config.captionsTextTrack4LanguageCode}},e.on(S.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(S.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(S.MANIFEST_LOADING,this.onManifestLoading,this),e.on(S.MANIFEST_LOADED,this.onManifestLoaded,this),e.on(S.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.on(S.FRAG_LOADING,this.onFragLoading,this),e.on(S.FRAG_LOADED,this.onFragLoaded,this),e.on(S.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),e.on(S.FRAG_DECRYPTED,this.onFragDecrypted,this),e.on(S.INIT_PTS_FOUND,this.onInitPtsFound,this),e.on(S.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),e.on(S.BUFFER_FLUSHING,this.onBufferFlushing,this)}destroy(){const{hls:e}=this;e.off(S.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(S.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(S.MANIFEST_LOADING,this.onManifestLoading,this),e.off(S.MANIFEST_LOADED,this.onManifestLoaded,this),e.off(S.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.off(S.FRAG_LOADING,this.onFragLoading,this),e.off(S.FRAG_LOADED,this.onFragLoaded,this),e.off(S.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),e.off(S.FRAG_DECRYPTED,this.onFragDecrypted,this),e.off(S.INIT_PTS_FOUND,this.onInitPtsFound,this),e.off(S.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),e.off(S.BUFFER_FLUSHING,this.onBufferFlushing,this),this.hls=this.config=null,this.cea608Parser1=this.cea608Parser2=void 0}initCea608Parsers(){if(this.config.enableCEA708Captions&&(!this.cea608Parser1||!this.cea608Parser2)){const e=new Ni(this,"textTrack1"),t=new Ni(this,"textTrack2"),n=new Ni(this,"textTrack3"),i=new Ni(this,"textTrack4");this.cea608Parser1=new Yg(1,e,t),this.cea608Parser2=new Yg(3,n,i)}}addCues(e,t,n,i,r){let o=!1;for(let l=r.length;l--;){const d=r[l],c=VP(d[0],d[1],t,n);if(c>=0&&(d[0]=Math.min(d[0],t),d[1]=Math.max(d[1],n),o=!0,c/(n-t)>.5))return}if(o||r.push([t,n]),this.config.renderTextTracksNatively){const l=this.captionsTracks[e];this.Cues.newCue(l,t,n,i)}else{const l=this.Cues.newCue(null,t,n,i);this.hls.trigger(S.CUES_PARSED,{type:"captions",cues:l,track:e})}}onInitPtsFound(e,{frag:t,id:n,initPTS:i,timescale:r}){const{unparsedVttFrags:o}=this;n==="main"&&(this.initPTS[t.cc]={baseTime:i,timescale:r}),o.length&&(this.unparsedVttFrags=[],o.forEach(l=>{this.onFragLoaded(S.FRAG_LOADED,l)}))}getExistingTrack(e,t){const{media:n}=this;if(n)for(let i=0;i<n.textTracks.length;i++){const r=n.textTracks[i];if(rp(r,{name:e,lang:t,attrs:{}}))return r}return null}createCaptionsTrack(e){this.config.renderTextTracksNatively?this.createNativeTrack(e):this.createNonNativeTrack(e)}createNativeTrack(e){if(this.captionsTracks[e])return;const{captionsProperties:t,captionsTracks:n,media:i}=this,{label:r,languageCode:o}=t[e],l=this.getExistingTrack(r,o);if(l)n[e]=l,Ys(n[e]),Jf(n[e],i);else{const d=this.createTextTrack("captions",r,o);d&&(d[e]=!0,n[e]=d)}}createNonNativeTrack(e){if(this.nonNativeCaptionsTracks[e])return;const t=this.captionsProperties[e];if(!t)return;const n=t.label,i={_id:e,label:n,kind:"captions",default:t.media?!!t.media.default:!1,closedCaptions:t.media};this.nonNativeCaptionsTracks[e]=i,this.hls.trigger(S.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:[i]})}createTextTrack(e,t,n){const i=this.media;if(i)return i.addTextTrack(e,t,n)}onMediaAttaching(e,t){this.media=t.media,this._cleanTracks()}onMediaDetaching(){const{captionsTracks:e}=this;Object.keys(e).forEach(t=>{Ys(e[t]),delete e[t]}),this.nonNativeCaptionsTracks={}}onManifestLoading(){this.lastCc=-1,this.lastSn=-1,this.lastPartIndex=-1,this.prevCC=-1,this.vttCCs=op(),this._cleanTracks(),this.tracks=[],this.captionsTracks={},this.nonNativeCaptionsTracks={},this.textTracks=[],this.unparsedVttFrags=[],this.initPTS=[],this.cea608Parser1&&this.cea608Parser2&&(this.cea608Parser1.reset(),this.cea608Parser2.reset())}_cleanTracks(){const{media:e}=this;if(!e)return;const t=e.textTracks;if(t)for(let n=0;n<t.length;n++)Ys(t[n])}onSubtitleTracksUpdated(e,t){const n=t.subtitleTracks||[],i=n.some(r=>r.textCodec===Yl);if(this.config.enableWebVTT||i&&this.config.enableIMSC1){if(Ug(this.tracks,n)){this.tracks=n;return}if(this.textTracks=[],this.tracks=n,this.config.renderTextTracksNatively){const o=this.media,l=o?gi(o.textTracks):null;if(this.tracks.forEach((d,c)=>{let u;if(l){let m=null;for(let f=0;f<l.length;f++)if(l[f]&&rp(l[f],d)){m=l[f],l[f]=null;break}m&&(u=m)}if(u)Ys(u);else{const m=ip(d);u=this.createTextTrack(m,d.name,d.lang),u&&(u.mode="disabled")}u&&this.textTracks.push(u)}),l!=null&&l.length){const d=l.filter(c=>c!==null).map(c=>c.label);d.length&&L.warn(`Media element contains unused subtitle tracks: ${d.join(", ")}. Replace media element for each source to clear TextTracks and captions menu.`)}}else if(this.tracks.length){const o=this.tracks.map(l=>({label:l.name,kind:l.type.toLowerCase(),default:l.default,subtitleTrack:l}));this.hls.trigger(S.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:o})}}}onManifestLoaded(e,t){this.config.enableCEA708Captions&&t.captions&&t.captions.forEach(n=>{const i=/(?:CC|SERVICE)([1-4])/.exec(n.instreamId);if(!i)return;const r=`textTrack${i[1]}`,o=this.captionsProperties[r];o&&(o.label=n.name,n.lang&&(o.languageCode=n.lang),o.media=n)})}closedCaptionsForLevel(e){const t=this.hls.levels[e.level];return t==null?void 0:t.attrs["CLOSED-CAPTIONS"]}onFragLoading(e,t){if(this.enabled&&t.frag.type===le.MAIN){var n,i;const{cea608Parser1:r,cea608Parser2:o,lastSn:l}=this,{cc:d,sn:c}=t.frag,u=(n=(i=t.part)==null?void 0:i.index)!=null?n:-1;r&&o&&(c!==l+1||c===l&&u!==this.lastPartIndex+1||d!==this.lastCc)&&(r.reset(),o.reset()),this.lastCc=d,this.lastSn=c,this.lastPartIndex=u}}onFragLoaded(e,t){const{frag:n,payload:i}=t;if(n.type===le.SUBTITLE)if(i.byteLength){const r=n.decryptdata,o="stats"in t;if(r==null||!r.encrypted||o){const l=this.tracks[n.level],d=this.vttCCs;d[n.cc]||(d[n.cc]={start:n.start,prevCC:this.prevCC,new:!0},this.prevCC=n.cc),l&&l.textCodec===Yl?this._parseIMSC1(n,i):this._parseVTTs(t)}}else this.hls.trigger(S.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:n,error:new Error("Empty subtitle payload")})}_parseIMSC1(e,t){const n=this.hls;tp(t,this.initPTS[e.cc],i=>{this._appendCues(i,e.level),n.trigger(S.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:e})},i=>{L.log(`Failed to parse IMSC1: ${i}`),n.trigger(S.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:e,error:i})})}_parseVTTs(e){var t;const{frag:n,payload:i}=e,{initPTS:r,unparsedVttFrags:o}=this,l=r.length-1;if(!r[n.cc]&&l===-1){o.push(e);return}const d=this.hls,c=(t=n.initSegment)!=null&&t.data?At(n.initSegment.data,new Uint8Array(i)):i;vP(c,this.initPTS[n.cc],this.vttCCs,n.cc,n.start,u=>{this._appendCues(u,n.level),d.trigger(S.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:n})},u=>{const m=u.message==="Missing initPTS for VTT MPEGTS";m?o.push(e):this._fallbackToIMSC1(n,i),L.log(`Failed to parse VTT cue: ${u}`),!(m&&l>n.cc)&&d.trigger(S.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:n,error:u})})}_fallbackToIMSC1(e,t){const n=this.tracks[e.level];n.textCodec||tp(t,this.initPTS[e.cc],()=>{n.textCodec=Yl,this._parseIMSC1(e,t)},()=>{n.textCodec="wvtt"})}_appendCues(e,t){const n=this.hls;if(this.config.renderTextTracksNatively){const i=this.textTracks[t];if(!i||i.mode==="disabled")return;e.forEach(r=>Xf(i,r))}else{const i=this.tracks[t];if(!i)return;const r=i.default?"default":"subtitles"+t;n.trigger(S.CUES_PARSED,{type:"subtitles",cues:e,track:r})}}onFragDecrypted(e,t){const{frag:n}=t;n.type===le.SUBTITLE&&this.onFragLoaded(S.FRAG_LOADED,t)}onSubtitleTracksCleared(){this.tracks=[],this.captionsTracks={}}onFragParsingUserdata(e,t){this.initCea608Parsers();const{cea608Parser1:n,cea608Parser2:i}=this;if(!this.enabled||!n||!i)return;const{frag:r,samples:o}=t;if(!(r.type===le.MAIN&&this.closedCaptionsForLevel(r)==="NONE"))for(let l=0;l<o.length;l++){const d=o[l].bytes;if(d){const c=this.extractCea608Data(d);n.addData(o[l].pts,c[0]),i.addData(o[l].pts,c[1])}}}onBufferFlushing(e,{startOffset:t,endOffset:n,endOffsetSubtitles:i,type:r}){const{media:o}=this;if(!(!o||o.currentTime<n)){if(!r||r==="video"){const{captionsTracks:l}=this;Object.keys(l).forEach(d=>_l(l[d],t,n))}if(this.config.renderTextTracksNatively&&t===0&&i!==void 0){const{textTracks:l}=this;Object.keys(l).forEach(d=>_l(l[d],t,i))}}}extractCea608Data(e){const t=[[],[]],n=e[0]&31;let i=2;for(let r=0;r<n;r++){const o=e[i++],l=127&e[i++],d=127&e[i++];if(l===0&&d===0)continue;if((4&o)!==0){const u=3&o;(u===0||u===1)&&(t[u].push(l),t[u].push(d))}}return t}}function ip(s){return s.characteristics&&/transcribes-spoken-dialog/gi.test(s.characteristics)&&/describes-music-and-sound/gi.test(s.characteristics)?"captions":"subtitles"}function rp(s,e){return!!s&&s.kind===ip(e)&&zl(e,s)}function VP(s,e,t,n){return Math.min(e,n)-Math.max(s,t)}function op(){return{ccOffset:0,presentationOffset:0,0:{start:0,prevCC:-1,new:!0}}}class Ql{constructor(e){this.hls=void 0,this.autoLevelCapping=void 0,this.firstLevel=void 0,this.media=void 0,this.restrictedLevels=void 0,this.timer=void 0,this.clientRect=void 0,this.streamController=void 0,this.hls=e,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.firstLevel=-1,this.media=null,this.restrictedLevels=[],this.timer=void 0,this.clientRect=null,this.registerListeners()}setStreamController(e){this.streamController=e}destroy(){this.hls&&this.unregisterListener(),this.timer&&this.stopCapping(),this.media=null,this.clientRect=null,this.hls=this.streamController=null}registerListeners(){const{hls:e}=this;e.on(S.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),e.on(S.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(S.MANIFEST_PARSED,this.onManifestParsed,this),e.on(S.LEVELS_UPDATED,this.onLevelsUpdated,this),e.on(S.BUFFER_CODECS,this.onBufferCodecs,this),e.on(S.MEDIA_DETACHING,this.onMediaDetaching,this)}unregisterListener(){const{hls:e}=this;e.off(S.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),e.off(S.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(S.MANIFEST_PARSED,this.onManifestParsed,this),e.off(S.LEVELS_UPDATED,this.onLevelsUpdated,this),e.off(S.BUFFER_CODECS,this.onBufferCodecs,this),e.off(S.MEDIA_DETACHING,this.onMediaDetaching,this)}onFpsDropLevelCapping(e,t){const n=this.hls.levels[t.droppedLevel];this.isLevelAllowed(n)&&this.restrictedLevels.push({bitrate:n.bitrate,height:n.height,width:n.width})}onMediaAttaching(e,t){this.media=t.media instanceof HTMLVideoElement?t.media:null,this.clientRect=null,this.timer&&this.hls.levels.length&&this.detectPlayerSize()}onManifestParsed(e,t){const n=this.hls;this.restrictedLevels=[],this.firstLevel=t.firstLevel,n.config.capLevelToPlayerSize&&t.video&&this.startCapping()}onLevelsUpdated(e,t){this.timer&&ae(this.autoLevelCapping)&&this.detectPlayerSize()}onBufferCodecs(e,t){this.hls.config.capLevelToPlayerSize&&t.video&&this.startCapping()}onMediaDetaching(){this.stopCapping()}detectPlayerSize(){if(this.media){if(this.mediaHeight<=0||this.mediaWidth<=0){this.clientRect=null;return}const e=this.hls.levels;if(e.length){const t=this.hls,n=this.getMaxLevel(e.length-1);n!==this.autoLevelCapping&&L.log(`Setting autoLevelCapping to ${n}: ${e[n].height}p@${e[n].bitrate} for media ${this.mediaWidth}x${this.mediaHeight}`),t.autoLevelCapping=n,t.autoLevelCapping>this.autoLevelCapping&&this.streamController&&this.streamController.nextLevelSwitch(),this.autoLevelCapping=t.autoLevelCapping}}}getMaxLevel(e){const t=this.hls.levels;if(!t.length)return-1;const n=t.filter((i,r)=>this.isLevelAllowed(i)&&r<=e);return this.clientRect=null,Ql.getMaxLevelByMediaSize(n,this.mediaWidth,this.mediaHeight)}startCapping(){this.timer||(this.autoLevelCapping=Number.POSITIVE_INFINITY,self.clearInterval(this.timer),this.timer=self.setInterval(this.detectPlayerSize.bind(this),1e3),this.detectPlayerSize())}stopCapping(){this.restrictedLevels=[],this.firstLevel=-1,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.timer&&(self.clearInterval(this.timer),this.timer=void 0)}getDimensions(){if(this.clientRect)return this.clientRect;const e=this.media,t={width:0,height:0};if(e){const n=e.getBoundingClientRect();t.width=n.width,t.height=n.height,!t.width&&!t.height&&(t.width=n.right-n.left||e.width||0,t.height=n.bottom-n.top||e.height||0)}return this.clientRect=t,t}get mediaWidth(){return this.getDimensions().width*this.contentScaleFactor}get mediaHeight(){return this.getDimensions().height*this.contentScaleFactor}get contentScaleFactor(){let e=1;if(!this.hls.config.ignoreDevicePixelRatio)try{e=self.devicePixelRatio}catch{}return e}isLevelAllowed(e){return!this.restrictedLevels.some(n=>e.bitrate===n.bitrate&&e.width===n.width&&e.height===n.height)}static getMaxLevelByMediaSize(e,t,n){if(!(e!=null&&e.length))return-1;const i=(l,d)=>d?l.width!==d.width||l.height!==d.height:!0;let r=e.length-1;const o=Math.max(t,n);for(let l=0;l<e.length;l+=1){const d=e[l];if((d.width>=o||d.height>=o)&&i(d,e[l+1])){r=l;break}}return r}}class $P{constructor(e){this.hls=void 0,this.isVideoPlaybackQualityAvailable=!1,this.timer=void 0,this.media=null,this.lastTime=void 0,this.lastDroppedFrames=0,this.lastDecodedFrames=0,this.streamController=void 0,this.hls=e,this.registerListeners()}setStreamController(e){this.streamController=e}registerListeners(){this.hls.on(S.MEDIA_ATTACHING,this.onMediaAttaching,this)}unregisterListeners(){this.hls.off(S.MEDIA_ATTACHING,this.onMediaAttaching,this)}destroy(){this.timer&&clearInterval(this.timer),this.unregisterListeners(),this.isVideoPlaybackQualityAvailable=!1,this.media=null}onMediaAttaching(e,t){const n=this.hls.config;if(n.capLevelOnFPSDrop){const i=t.media instanceof self.HTMLVideoElement?t.media:null;this.media=i,i&&typeof i.getVideoPlaybackQuality=="function"&&(this.isVideoPlaybackQualityAvailable=!0),self.clearInterval(this.timer),this.timer=self.setInterval(this.checkFPSInterval.bind(this),n.fpsDroppedMonitoringPeriod)}}checkFPS(e,t,n){const i=performance.now();if(t){if(this.lastTime){const r=i-this.lastTime,o=n-this.lastDroppedFrames,l=t-this.lastDecodedFrames,d=1e3*o/r,c=this.hls;if(c.trigger(S.FPS_DROP,{currentDropped:o,currentDecoded:l,totalDroppedFrames:n}),d>0&&o>c.config.fpsDroppedMonitoringThreshold*l){let u=c.currentLevel;L.warn("drop FPS ratio greater than max allowed value for currentLevel: "+u),u>0&&(c.autoLevelCapping===-1||c.autoLevelCapping>=u)&&(u=u-1,c.trigger(S.FPS_DROP_LEVEL_CAPPING,{level:u,droppedLevel:c.currentLevel}),c.autoLevelCapping=u,this.streamController.nextLevelSwitch())}}this.lastTime=i,this.lastDroppedFrames=n,this.lastDecodedFrames=t}}checkFPSInterval(){const e=this.media;if(e)if(this.isVideoPlaybackQualityAvailable){const t=e.getVideoPlaybackQuality();this.checkFPS(e,t.totalVideoFrames,t.droppedVideoFrames)}else this.checkFPS(e,e.webkitDecodedFrameCount,e.webkitDroppedFrameCount)}}const Pi="[eme]";class an{constructor(e){this.hls=void 0,this.config=void 0,this.media=null,this.keyFormatPromise=null,this.keySystemAccessPromises={},this._requestLicenseFailureCount=0,this.mediaKeySessions=[],this.keyIdToKeySessionPromise={},this.setMediaKeysQueue=an.CDMCleanupPromise?[an.CDMCleanupPromise]:[],this.debug=L.debug.bind(L,Pi),this.log=L.log.bind(L,Pi),this.warn=L.warn.bind(L,Pi),this.error=L.error.bind(L,Pi),this.onMediaEncrypted=t=>{const{initDataType:n,initData:i}=t,r=`"${t.type}" event: init data type: "${n}"`;if(this.debug(r),i!==null){if(!this.keyFormatPromise){let o=Object.keys(this.keySystemAccessPromises);o.length||(o=oi(this.config));const l=o.map(ul).filter(d=>!!d);this.keyFormatPromise=this.getKeyFormatPromise(l)}this.keyFormatPromise.then(o=>{const l=cl(o);let d,c;if(n==="sinf"){if(l!==De.FAIRPLAY){this.warn(`Ignoring unexpected "${t.type}" event with init data type: "${n}" for selected key-system ${l}`);return}const h=Ze(new Uint8Array(i));try{const g=ol(JSON.parse(h).sinf),y=Bf(g);if(!y)throw new Error("'schm' box missing or not cbcs/cenc with schi > tenc");d=y.subarray(8,24),c=De.FAIRPLAY}catch(g){this.warn(`${r} Failed to parse sinf: ${g}`);return}}else{if(l!==De.WIDEVINE&&l!==De.PLAYREADY){this.warn(`Ignoring unexpected "${t.type}" event with init data type: "${n}" for selected key-system ${l}`);return}const h=yD(i),g=h.filter(b=>!!b.systemId&&dl(b.systemId)===l);g.length>1&&this.warn(`${r} Using first of ${g.length} pssh found for selected key-system ${l}`);const y=g[0];if(!y){h.length===0||h.some(b=>!b.systemId)?this.warn(`${r} contains incomplete or invalid pssh data`):this.log(`ignoring ${r} for ${h.map(b=>dl(b.systemId)).join(",")} pssh data in favor of playlist keys`);return}if(c=dl(y.systemId),y.version===0&&y.data)if(c===De.WIDEVINE){const b=y.data.length-22;d=y.data.subarray(b,b+16)}else c===De.PLAYREADY&&(d=_f(y.data))}if(!c||!d){this.log(`Unable to handle ${r} with key-system ${l}`);return}const u=Qt.hexDump(d),{keyIdToKeySessionPromise:m,mediaKeySessions:f}=this;let p=m[u];for(let h=0;h<f.length;h++){const g=f[h],y=g.decryptdata;if(!y.keyId)continue;const b=Qt.hexDump(y.keyId);if(u===b||y.uri.replace(/-/g,"").indexOf(u)!==-1){if(p=m[b],y.pssh)break;delete m[b],y.pssh=new Uint8Array(i),y.keyId=d,p=m[u]=p.then(()=>this.generateRequestWithPreferredKeySession(g,n,i,"encrypted-event-key-match")),p.catch(w=>this.handleError(w));break}}if(!p){if(c!==l){this.log(`Ignoring "${r}" with ${c} init data for selected key-system ${l}`);return}p=m[u]=this.getKeySystemSelectionPromise([c]).then(({keySystem:h,mediaKeys:g})=>{var y;this.throwIfDestroyed();const b=new Pn("ISO-23001-7",u,(y=ul(h))!=null?y:"");return b.pssh=new Uint8Array(i),b.keyId=d,this.attemptSetMediaKeys(h,g).then(()=>{this.throwIfDestroyed();const w=this.createMediaKeySessionContext({decryptdata:b,keySystem:h,mediaKeys:g});return this.generateRequestWithPreferredKeySession(w,n,i,"encrypted-event-no-match")})}),p.catch(h=>this.handleError(h))}})}},this.onWaitingForKey=t=>{this.log(`"${t.type}" event`)},this.hls=e,this.config=e.config,this.registerListeners()}destroy(){this.unregisterListeners(),this.onMediaDetached();const e=this.config;e.requestMediaKeySystemAccessFunc=null,e.licenseXhrSetup=e.licenseResponseCallback=void 0,e.drmSystems=e.drmSystemOptions={},this.hls=this.config=this.keyIdToKeySessionPromise=null,this.onMediaEncrypted=this.onWaitingForKey=null}registerListeners(){this.hls.on(S.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(S.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.on(S.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.on(S.MANIFEST_LOADED,this.onManifestLoaded,this)}unregisterListeners(){this.hls.off(S.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.off(S.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.off(S.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.off(S.MANIFEST_LOADED,this.onManifestLoaded,this)}getLicenseServerUrl(e){const{drmSystems:t,widevineLicenseUrl:n}=this.config,i=t[e];if(i)return i.licenseUrl;if(e===De.WIDEVINE&&n)return n}getLicenseServerUrlOrThrow(e){const t=this.getLicenseServerUrl(e);if(t===void 0)throw new Error(`no license server URL configured for key-system "${e}"`);return t}getServerCertificateUrl(e){const{drmSystems:t}=this.config,n=t[e];if(n)return n.serverCertificateUrl;this.log(`No Server Certificate in config.drmSystems["${e}"]`)}attemptKeySystemAccess(e){const t=this.hls.levels,n=(o,l,d)=>!!o&&d.indexOf(o)===l,i=t.map(o=>o.audioCodec).filter(n),r=t.map(o=>o.videoCodec).filter(n);return i.length+r.length===0&&r.push("avc1.42e01e"),new Promise((o,l)=>{const d=c=>{const u=c.shift();this.getMediaKeysPromise(u,i,r).then(m=>o({keySystem:u,mediaKeys:m})).catch(m=>{c.length?d(c):m instanceof It?l(m):l(new It({type:ge.KEY_SYSTEM_ERROR,details:N.KEY_SYSTEM_NO_ACCESS,error:m,fatal:!0},m.message))})};d(e)})}requestMediaKeySystemAccess(e,t){const{requestMediaKeySystemAccessFunc:n}=this.config;if(typeof n!="function"){let i=`Configured requestMediaKeySystemAccess is not a function ${n}`;return Sf===null&&self.location.protocol==="http:"&&(i=`navigator.requestMediaKeySystemAccess is not available over insecure protocol ${location.protocol}`),Promise.reject(new Error(i))}return n(e,t)}getMediaKeysPromise(e,t,n){const i=W3(e,t,n,this.config.drmSystemOptions),r=this.keySystemAccessPromises[e];let o=r==null?void 0:r.keySystemAccess;if(!o){this.log(`Requesting encrypted media "${e}" key-system access with config: ${JSON.stringify(i)}`),o=this.requestMediaKeySystemAccess(e,i);const l=this.keySystemAccessPromises[e]={keySystemAccess:o};return o.catch(d=>{this.log(`Failed to obtain access to key-system "${e}": ${d}`)}),o.then(d=>{this.log(`Access for key-system "${d.keySystem}" obtained`);const c=this.fetchServerCertificate(e);return this.log(`Create media-keys for "${e}"`),l.mediaKeys=d.createMediaKeys().then(u=>(this.log(`Media-keys created for "${e}"`),c.then(m=>m?this.setMediaKeysServerCertificate(u,e,m):u))),l.mediaKeys.catch(u=>{this.error(`Failed to create media-keys for "${e}"}: ${u}`)}),l.mediaKeys})}return o.then(()=>r.mediaKeys)}createMediaKeySessionContext({decryptdata:e,keySystem:t,mediaKeys:n}){this.log(`Creating key-system session "${t}" keyId: ${Qt.hexDump(e.keyId||[])}`);const i=n.createSession(),r={decryptdata:e,keySystem:t,mediaKeys:n,mediaKeysSession:i,keyStatus:"status-pending"};return this.mediaKeySessions.push(r),r}renewKeySession(e){const t=e.decryptdata;if(t.pssh){const n=this.createMediaKeySessionContext(e),i=this.getKeyIdString(t),r="cenc";this.keyIdToKeySessionPromise[i]=this.generateRequestWithPreferredKeySession(n,r,t.pssh,"expired")}else this.warn("Could not renew expired session. Missing pssh initData.");this.removeSession(e)}getKeyIdString(e){if(!e)throw new Error("Could not read keyId of undefined decryptdata");if(e.keyId===null)throw new Error("keyId is null");return Qt.hexDump(e.keyId)}updateKeySession(e,t){var n;const i=e.mediaKeysSession;return this.log(`Updating key-session "${i.sessionId}" for keyID ${Qt.hexDump(((n=e.decryptdata)==null?void 0:n.keyId)||[])}
67
- } (data length: ${t&&t.byteLength})`),i.update(t)}selectKeySystemFormat(e){const t=Object.keys(e.levelkeys||{});return this.keyFormatPromise||(this.log(`Selecting key-system from fragment (sn: ${e.sn} ${e.type}: ${e.level}) key formats ${t.join(", ")}`),this.keyFormatPromise=this.getKeyFormatPromise(t)),this.keyFormatPromise}getKeyFormatPromise(e){return new Promise((t,n)=>{const i=oi(this.config),r=e.map(cl).filter(o=>!!o&&i.indexOf(o)!==-1);return this.getKeySystemSelectionPromise(r).then(({keySystem:o})=>{const l=ul(o);l?t(l):n(new Error(`Unable to find format for key-system "${o}"`))}).catch(n)})}loadKey(e){const t=e.keyInfo.decryptdata,n=this.getKeyIdString(t),i=`(keyId: ${n} format: "${t.keyFormat}" method: ${t.method} uri: ${t.uri})`;this.log(`Starting session for key ${i}`);let r=this.keyIdToKeySessionPromise[n];return r||(r=this.keyIdToKeySessionPromise[n]=this.getKeySystemForKeyPromise(t).then(({keySystem:o,mediaKeys:l})=>(this.throwIfDestroyed(),this.log(`Handle encrypted media sn: ${e.frag.sn} ${e.frag.type}: ${e.frag.level} using key ${i}`),this.attemptSetMediaKeys(o,l).then(()=>{this.throwIfDestroyed();const d=this.createMediaKeySessionContext({keySystem:o,mediaKeys:l,decryptdata:t});return this.generateRequestWithPreferredKeySession(d,"cenc",t.pssh,"playlist-key")}))),r.catch(o=>this.handleError(o))),r}throwIfDestroyed(e="Invalid state"){if(!this.hls)throw new Error("invalid state")}handleError(e){this.hls&&(this.error(e.message),e instanceof It?this.hls.trigger(S.ERROR,e.data):this.hls.trigger(S.ERROR,{type:ge.KEY_SYSTEM_ERROR,details:N.KEY_SYSTEM_NO_KEYS,error:e,fatal:!0}))}getKeySystemForKeyPromise(e){const t=this.getKeyIdString(e),n=this.keyIdToKeySessionPromise[t];if(!n){const i=cl(e.keyFormat),r=i?[i]:oi(this.config);return this.attemptKeySystemAccess(r)}return n}getKeySystemSelectionPromise(e){if(e.length||(e=oi(this.config)),e.length===0)throw new It({type:ge.KEY_SYSTEM_ERROR,details:N.KEY_SYSTEM_NO_CONFIGURED_LICENSE,fatal:!0},`Missing key-system license configuration options ${JSON.stringify({drmSystems:this.config.drmSystems})}`);return this.attemptKeySystemAccess(e)}attemptSetMediaKeys(e,t){const n=this.setMediaKeysQueue.slice();this.log(`Setting media-keys for "${e}"`);const i=Promise.all(n).then(()=>{if(!this.media)throw new Error("Attempted to set mediaKeys without media element attached");return this.media.setMediaKeys(t)});return this.setMediaKeysQueue.push(i),i.then(()=>{this.log(`Media-keys set for "${e}"`),n.push(i),this.setMediaKeysQueue=this.setMediaKeysQueue.filter(r=>n.indexOf(r)===-1)})}generateRequestWithPreferredKeySession(e,t,n,i){var r,o;const l=(r=this.config.drmSystems)==null||(o=r[e.keySystem])==null?void 0:o.generateRequest;if(l)try{const h=l.call(this.hls,t,n,e);if(!h)throw new Error("Invalid response from configured generateRequest filter");t=h.initDataType,n=e.decryptdata.pssh=h.initData?new Uint8Array(h.initData):null}catch(h){var d;if(this.warn(h.message),(d=this.hls)!=null&&d.config.debug)throw h}if(n===null)return this.log(`Skipping key-session request for "${i}" (no initData)`),Promise.resolve(e);const c=this.getKeyIdString(e.decryptdata);this.log(`Generating key-session request for "${i}": ${c} (init data type: ${t} length: ${n?n.byteLength:null})`);const u=new Ul,m=e._onmessage=h=>{const g=e.mediaKeysSession;if(!g){u.emit("error",new Error("invalid state"));return}const{messageType:y,message:b}=h;this.log(`"${y}" message event for session "${g.sessionId}" message size: ${b.byteLength}`),y==="license-request"||y==="license-renewal"?this.renewLicense(e,b).catch(w=>{this.handleError(w),u.emit("error",w)}):y==="license-release"?e.keySystem===De.FAIRPLAY&&(this.updateKeySession(e,ll("acknowledged")),this.removeSession(e)):this.warn(`unhandled media key message type "${y}"`)},f=e._onkeystatuseschange=h=>{if(!e.mediaKeysSession){u.emit("error",new Error("invalid state"));return}this.onKeyStatusChange(e);const y=e.keyStatus;u.emit("keyStatus",y),y==="expired"&&(this.warn(`${e.keySystem} expired for key ${c}`),this.renewKeySession(e))};e.mediaKeysSession.addEventListener("message",m),e.mediaKeysSession.addEventListener("keystatuseschange",f);const p=new Promise((h,g)=>{u.on("error",g),u.on("keyStatus",y=>{y.startsWith("usable")?h():y==="output-restricted"?g(new It({type:ge.KEY_SYSTEM_ERROR,details:N.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED,fatal:!1},"HDCP level output restricted")):y==="internal-error"?g(new It({type:ge.KEY_SYSTEM_ERROR,details:N.KEY_SYSTEM_STATUS_INTERNAL_ERROR,fatal:!0},`key status changed to "${y}"`)):y==="expired"?g(new Error("key expired while generating request")):this.warn(`unhandled key status change "${y}"`)})});return e.mediaKeysSession.generateRequest(t,n).then(()=>{var h;this.log(`Request generated for key-session "${(h=e.mediaKeysSession)==null?void 0:h.sessionId}" keyId: ${c}`)}).catch(h=>{throw new It({type:ge.KEY_SYSTEM_ERROR,details:N.KEY_SYSTEM_NO_SESSION,error:h,fatal:!1},`Error generating key-session request: ${h}`)}).then(()=>p).catch(h=>{throw u.removeAllListeners(),this.removeSession(e),h}).then(()=>(u.removeAllListeners(),e))}onKeyStatusChange(e){e.mediaKeysSession.keyStatuses.forEach((t,n)=>{this.log(`key status change "${t}" for keyStatuses keyId: ${Qt.hexDump("buffer"in n?new Uint8Array(n.buffer,n.byteOffset,n.byteLength):new Uint8Array(n))} session keyId: ${Qt.hexDump(new Uint8Array(e.decryptdata.keyId||[]))} uri: ${e.decryptdata.uri}`),e.keyStatus=t})}fetchServerCertificate(e){const t=this.config,n=t.loader,i=new n(t),r=this.getServerCertificateUrl(e);return r?(this.log(`Fetching server certificate for "${e}"`),new Promise((o,l)=>{const d={responseType:"arraybuffer",url:r},c=t.certLoadPolicy.default,u={loadPolicy:c,timeout:c.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0},m={onSuccess:(f,p,h,g)=>{o(f.data)},onError:(f,p,h,g)=>{l(new It({type:ge.KEY_SYSTEM_ERROR,details:N.KEY_SYSTEM_SERVER_CERTIFICATE_REQUEST_FAILED,fatal:!0,networkDetails:h,response:nt({url:d.url,data:void 0},f)},`"${e}" certificate request failed (${r}). Status: ${f.code} (${f.text})`))},onTimeout:(f,p,h)=>{l(new It({type:ge.KEY_SYSTEM_ERROR,details:N.KEY_SYSTEM_SERVER_CERTIFICATE_REQUEST_FAILED,fatal:!0,networkDetails:h,response:{url:d.url,data:void 0}},`"${e}" certificate request timed out (${r})`))},onAbort:(f,p,h)=>{l(new Error("aborted"))}};i.load(d,u,m)})):Promise.resolve()}setMediaKeysServerCertificate(e,t,n){return new Promise((i,r)=>{e.setServerCertificate(n).then(o=>{this.log(`setServerCertificate ${o?"success":"not supported by CDM"} (${n==null?void 0:n.byteLength}) on "${t}"`),i(e)}).catch(o=>{r(new It({type:ge.KEY_SYSTEM_ERROR,details:N.KEY_SYSTEM_SERVER_CERTIFICATE_UPDATE_FAILED,error:o,fatal:!0},o.message))})})}renewLicense(e,t){return this.requestLicense(e,new Uint8Array(t)).then(n=>this.updateKeySession(e,new Uint8Array(n)).catch(i=>{throw new It({type:ge.KEY_SYSTEM_ERROR,details:N.KEY_SYSTEM_SESSION_UPDATE_FAILED,error:i,fatal:!0},i.message)}))}unpackPlayReadyKeyMessage(e,t){const n=String.fromCharCode.apply(null,new Uint16Array(t.buffer));if(!n.includes("PlayReadyKeyMessage"))return e.setRequestHeader("Content-Type","text/xml; charset=utf-8"),t;const i=new DOMParser().parseFromString(n,"application/xml"),r=i.querySelectorAll("HttpHeader");if(r.length>0){let u;for(let m=0,f=r.length;m<f;m++){var o,l;u=r[m];const p=(o=u.querySelector("name"))==null?void 0:o.textContent,h=(l=u.querySelector("value"))==null?void 0:l.textContent;p&&h&&e.setRequestHeader(p,h)}}const d=i.querySelector("Challenge"),c=d==null?void 0:d.textContent;if(!c)throw new Error("Cannot find <Challenge> in key message");return ll(atob(c))}setupLicenseXHR(e,t,n,i){const r=this.config.licenseXhrSetup;return r?Promise.resolve().then(()=>{if(!n.decryptdata)throw new Error("Key removed");return r.call(this.hls,e,t,n,i)}).catch(o=>{if(!n.decryptdata)throw o;return e.open("POST",t,!0),r.call(this.hls,e,t,n,i)}).then(o=>(e.readyState||e.open("POST",t,!0),{xhr:e,licenseChallenge:o||i})):(e.open("POST",t,!0),Promise.resolve({xhr:e,licenseChallenge:i}))}requestLicense(e,t){const n=this.config.keyLoadPolicy.default;return new Promise((i,r)=>{const o=this.getLicenseServerUrlOrThrow(e.keySystem);this.log(`Sending license request to URL: ${o}`);const l=new XMLHttpRequest;l.responseType="arraybuffer",l.onreadystatechange=()=>{if(!this.hls||!e.mediaKeysSession)return r(new Error("invalid state"));if(l.readyState===4)if(l.status===200){this._requestLicenseFailureCount=0;let d=l.response;this.log(`License received ${d instanceof ArrayBuffer?d.byteLength:d}`);const c=this.config.licenseResponseCallback;if(c)try{d=c.call(this.hls,l,o,e)}catch(u){this.error(u)}i(d)}else{const d=n.errorRetry,c=d?d.maxNumRetry:0;if(this._requestLicenseFailureCount++,this._requestLicenseFailureCount>c||l.status>=400&&l.status<500)r(new It({type:ge.KEY_SYSTEM_ERROR,details:N.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0,networkDetails:l,response:{url:o,data:void 0,code:l.status,text:l.statusText}},`License Request XHR failed (${o}). Status: ${l.status} (${l.statusText})`));else{const u=c-this._requestLicenseFailureCount+1;this.warn(`Retrying license request, ${u} attempts left`),this.requestLicense(e,t).then(i,r)}}},e.licenseXhr&&e.licenseXhr.readyState!==XMLHttpRequest.DONE&&e.licenseXhr.abort(),e.licenseXhr=l,this.setupLicenseXHR(l,o,e,t).then(({xhr:d,licenseChallenge:c})=>{e.keySystem==De.PLAYREADY&&(c=this.unpackPlayReadyKeyMessage(d,c)),d.send(c)})})}onMediaAttached(e,t){if(!this.config.emeEnabled)return;const n=t.media;this.media=n,n.removeEventListener("encrypted",this.onMediaEncrypted),n.removeEventListener("waitingforkey",this.onWaitingForKey),n.addEventListener("encrypted",this.onMediaEncrypted),n.addEventListener("waitingforkey",this.onWaitingForKey)}onMediaDetached(){const e=this.media,t=this.mediaKeySessions;e&&(e.removeEventListener("encrypted",this.onMediaEncrypted),e.removeEventListener("waitingforkey",this.onWaitingForKey),this.media=null),this._requestLicenseFailureCount=0,this.setMediaKeysQueue=[],this.mediaKeySessions=[],this.keyIdToKeySessionPromise={},Pn.clearKeyUriToKeyIdMap();const n=t.length;an.CDMCleanupPromise=Promise.all(t.map(i=>this.removeSession(i)).concat(e==null?void 0:e.setMediaKeys(null).catch(i=>{this.log(`Could not clear media keys: ${i}`)}))).then(()=>{n&&(this.log("finished closing key sessions and clearing media keys"),t.length=0)}).catch(i=>{this.log(`Could not close sessions and clear media keys: ${i}`)})}onManifestLoading(){this.keyFormatPromise=null}onManifestLoaded(e,{sessionKeys:t}){if(!(!t||!this.config.emeEnabled)&&!this.keyFormatPromise){const n=t.reduce((i,r)=>(i.indexOf(r.keyFormat)===-1&&i.push(r.keyFormat),i),[]);this.log(`Selecting key-system from session-keys ${n.join(", ")}`),this.keyFormatPromise=this.getKeyFormatPromise(n)}}removeSession(e){const{mediaKeysSession:t,licenseXhr:n}=e;if(t){this.log(`Remove licenses and keys and close session ${t.sessionId}`),e._onmessage&&(t.removeEventListener("message",e._onmessage),e._onmessage=void 0),e._onkeystatuseschange&&(t.removeEventListener("keystatuseschange",e._onkeystatuseschange),e._onkeystatuseschange=void 0),n&&n.readyState!==XMLHttpRequest.DONE&&n.abort(),e.mediaKeysSession=e.decryptdata=e.licenseXhr=void 0;const i=this.mediaKeySessions.indexOf(e);return i>-1&&this.mediaKeySessions.splice(i,1),t.remove().catch(r=>{this.log(`Could not remove session: ${r}`)}).then(()=>t.close()).catch(r=>{this.log(`Could not close session: ${r}`)})}}}an.CDMCleanupPromise=void 0;class It extends Error{constructor(e,t){super(t),this.data=void 0,e.error||(e.error=new Error(t)),this.data=e,e.err=e.error}}var bt;(function(s){s.MANIFEST="m",s.AUDIO="a",s.VIDEO="v",s.MUXED="av",s.INIT="i",s.CAPTION="c",s.TIMED_TEXT="tt",s.KEY="k",s.OTHER="o"})(bt||(bt={}));var ec;(function(s){s.DASH="d",s.HLS="h",s.SMOOTH="s",s.OTHER="o"})(ec||(ec={}));var Ps;(function(s){s.OBJECT="CMCD-Object",s.REQUEST="CMCD-Request",s.SESSION="CMCD-Session",s.STATUS="CMCD-Status"})(Ps||(Ps={}));const UP={[Ps.OBJECT]:["br","d","ot","tb"],[Ps.REQUEST]:["bl","dl","mtp","nor","nrr","su"],[Ps.SESSION]:["cid","pr","sf","sid","st","v"],[Ps.STATUS]:["bs","rtp"]};class rn{constructor(e,t){this.value=void 0,this.params=void 0,Array.isArray(e)&&(e=e.map(n=>n instanceof rn?n:new rn(n))),this.value=e,this.params=t}}class lp{constructor(e){this.description=void 0,this.description=e}}const zP="Dict";function GP(s){return Array.isArray(s)?JSON.stringify(s):s instanceof Map?"Map{}":s instanceof Set?"Set{}":typeof s=="object"?JSON.stringify(s):String(s)}function jP(s,e,t,n){return new Error(`failed to ${s} "${GP(e)}" as ${t}`,{cause:n})}const cp="Bare Item",HP="Boolean",WP="Byte Sequence",KP="Decimal",qP="Integer";function YP(s){return s<-999999999999999||999999999999999<s}const JP=/[\x00-\x1f\x7f]+/,XP="Token",ZP="Key";function as(s,e,t){return jP("serialize",s,e,t)}function QP(s){if(typeof s!="boolean")throw as(s,HP);return s?"?1":"?0"}function eO(s){return btoa(String.fromCharCode(...s))}function tO(s){if(ArrayBuffer.isView(s)===!1)throw as(s,WP);return`:${eO(s)}:`}function dp(s){if(YP(s))throw as(s,qP);return s.toString()}function sO(s){return`@${dp(s.getTime()/1e3)}`}function up(s,e){if(s<0)return-up(-s,e);const t=Math.pow(10,e);if(Math.abs(s*t%1-.5)<Number.EPSILON){const i=Math.floor(s*t);return(i%2===0?i:i+1)/t}else return Math.round(s*t)/t}function nO(s){const e=up(s,3);if(Math.floor(Math.abs(e)).toString().length>12)throw as(s,KP);const t=e.toString();return t.includes(".")?t:`${t}.0`}const aO="String";function iO(s){if(JP.test(s))throw as(s,aO);return`"${s.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}"`}function rO(s){return s.description||s.toString().slice(7,-1)}function hp(s){const e=rO(s);if(/^([a-zA-Z*])([!#$%&'*+\-.^_`|~\w:/]*)$/.test(e)===!1)throw as(e,XP);return e}function tc(s){switch(typeof s){case"number":if(!ae(s))throw as(s,cp);return Number.isInteger(s)?dp(s):nO(s);case"string":return iO(s);case"symbol":return hp(s);case"boolean":return QP(s);case"object":if(s instanceof Date)return sO(s);if(s instanceof Uint8Array)return tO(s);if(s instanceof lp)return hp(s);default:throw as(s,cp)}}function sc(s){if(/^[a-z*][a-z0-9\-_.*]*$/.test(s)===!1)throw as(s,ZP);return s}function nc(s){return s==null?"":Object.entries(s).map(([e,t])=>t===!0?`;${sc(e)}`:`;${sc(e)}=${tc(t)}`).join("")}function mp(s){return s instanceof rn?`${tc(s.value)}${nc(s.params)}`:tc(s)}function oO(s){return`(${s.value.map(mp).join(" ")})${nc(s.params)}`}function lO(s,e={whitespace:!0}){if(typeof s!="object")throw as(s,zP);const t=s instanceof Map?s.entries():Object.entries(s),n=e!=null&&e.whitespace?" ":"";return Array.from(t).map(([i,r])=>{r instanceof rn||(r=new rn(r));let o=sc(i);return r.value===!0?o+=nc(r.params):(o+="=",Array.isArray(r.value)?o+=oO(r):o+=mp(r)),o}).join(`,${n}`)}function cO(s,e){return lO(s,e)}const dO=s=>s==="ot"||s==="sf"||s==="st",uO=s=>typeof s=="number"?ae(s):s!=null&&s!==""&&s!==!1;function hO(s,e){const t=new URL(s),n=new URL(e);if(t.origin!==n.origin)return s;const i=t.pathname.split("/").slice(1),r=n.pathname.split("/").slice(1,-1);for(;i[0]===r[0];)i.shift(),r.shift();for(;r.length;)r.shift(),i.unshift("..");return i.join("/")}function mO(){try{return crypto.randomUUID()}catch{try{const e=URL.createObjectURL(new Blob),t=e.toString();return URL.revokeObjectURL(e),t.slice(t.lastIndexOf("/")+1)}catch{let t=new Date().getTime();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,i=>{const r=(t+Math.random()*16)%16|0;return t=Math.floor(t/16),(i=="x"?r:r&3|8).toString(16)})}}}const Oi=s=>Math.round(s),fO=(s,e)=>(e!=null&&e.baseUrl&&(s=hO(s,e.baseUrl)),encodeURIComponent(s)),Fi=s=>Oi(s/100)*100,gO={br:Oi,d:Oi,bl:Fi,dl:Fi,mtp:Fi,nor:fO,rtp:Fi,tb:Oi};function pO(s,e){const t={};if(s==null||typeof s!="object")return t;const n=Object.keys(s).sort(),i=qe({},gO,e==null?void 0:e.formatters),r=e==null?void 0:e.filter;return n.forEach(o=>{if(r!=null&&r(o))return;let l=s[o];const d=i[o];d&&(l=d(l,e)),!(o==="v"&&l===1)&&(o=="pr"&&l===1||uO(l)&&(dO(o)&&typeof l=="string"&&(l=new lp(l)),t[o]=l))}),t}function fp(s,e={}){return s?cO(pO(s,e),qe({whitespace:!1},e)):""}function yO(s,e={}){if(!s)return{};const t=Object.entries(s),n=Object.entries(UP).concat(Object.entries((e==null?void 0:e.customHeaderMap)||{})),i=t.reduce((r,o)=>{var l,d;const[c,u]=o,m=((l=n.find(f=>f[1].includes(c)))==null?void 0:l[0])||Ps.REQUEST;return(d=r[m])!=null||(r[m]={}),r[m][c]=u,r},{});return Object.entries(i).reduce((r,[o,l])=>(r[o]=fp(l,e),r),{})}function bO(s,e,t){return qe(s,yO(e,t))}const wO="CMCD";function SO(s,e={}){if(!s)return"";const t=fp(s,e);return`${wO}=${encodeURIComponent(t)}`}const gp=/CMCD=[^&#]+/;function _O(s,e,t){const n=SO(e,t);if(!n)return s;if(gp.test(s))return s.replace(gp,n);const i=s.includes("?")?"&":"?";return`${s}${i}${n}`}class kO{constructor(e){this.hls=void 0,this.config=void 0,this.media=void 0,this.sid=void 0,this.cid=void 0,this.useHeaders=!1,this.includeKeys=void 0,this.initialized=!1,this.starved=!1,this.buffering=!0,this.audioBuffer=void 0,this.videoBuffer=void 0,this.onWaiting=()=>{this.initialized&&(this.starved=!0),this.buffering=!0},this.onPlaying=()=>{this.initialized||(this.initialized=!0),this.buffering=!1},this.applyPlaylistData=i=>{try{this.apply(i,{ot:bt.MANIFEST,su:!this.initialized})}catch(r){L.warn("Could not generate manifest CMCD data.",r)}},this.applyFragmentData=i=>{try{const r=i.frag,o=this.hls.levels[r.level],l=this.getObjectType(r),d={d:r.duration*1e3,ot:l};(l===bt.VIDEO||l===bt.AUDIO||l==bt.MUXED)&&(d.br=o.bitrate/1e3,d.tb=this.getTopBandwidth(l)/1e3,d.bl=this.getBufferLength(l)),this.apply(i,d)}catch(r){L.warn("Could not generate segment CMCD data.",r)}},this.hls=e;const t=this.config=e.config,{cmcd:n}=t;n!=null&&(t.pLoader=this.createPlaylistLoader(),t.fLoader=this.createFragmentLoader(),this.sid=n.sessionId||mO(),this.cid=n.contentId,this.useHeaders=n.useHeaders===!0,this.includeKeys=n.includeKeys,this.registerListeners())}registerListeners(){const e=this.hls;e.on(S.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(S.MEDIA_DETACHED,this.onMediaDetached,this),e.on(S.BUFFER_CREATED,this.onBufferCreated,this)}unregisterListeners(){const e=this.hls;e.off(S.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(S.MEDIA_DETACHED,this.onMediaDetached,this),e.off(S.BUFFER_CREATED,this.onBufferCreated,this)}destroy(){this.unregisterListeners(),this.onMediaDetached(),this.hls=this.config=this.audioBuffer=this.videoBuffer=null,this.onWaiting=this.onPlaying=null}onMediaAttached(e,t){this.media=t.media,this.media.addEventListener("waiting",this.onWaiting),this.media.addEventListener("playing",this.onPlaying)}onMediaDetached(){this.media&&(this.media.removeEventListener("waiting",this.onWaiting),this.media.removeEventListener("playing",this.onPlaying),this.media=null)}onBufferCreated(e,t){var n,i;this.audioBuffer=(n=t.tracks.audio)==null?void 0:n.buffer,this.videoBuffer=(i=t.tracks.video)==null?void 0:i.buffer}createData(){var e;return{v:1,sf:ec.HLS,sid:this.sid,cid:this.cid,pr:(e=this.media)==null?void 0:e.playbackRate,mtp:this.hls.bandwidthEstimate/1e3}}apply(e,t={}){qe(t,this.createData());const n=t.ot===bt.INIT||t.ot===bt.VIDEO||t.ot===bt.MUXED;this.starved&&n&&(t.bs=!0,t.su=!0,this.starved=!1),t.su==null&&(t.su=this.buffering);const{includeKeys:i}=this;i&&(t=Object.keys(t).reduce((r,o)=>(i.includes(o)&&(r[o]=t[o]),r),{})),this.useHeaders?(e.headers||(e.headers={}),bO(e.headers,t)):e.url=_O(e.url,t)}getObjectType(e){const{type:t}=e;if(t==="subtitle")return bt.TIMED_TEXT;if(e.sn==="initSegment")return bt.INIT;if(t==="audio")return bt.AUDIO;if(t==="main")return this.hls.audioTracks.length?bt.VIDEO:bt.MUXED}getTopBandwidth(e){let t=0,n;const i=this.hls;if(e===bt.AUDIO)n=i.audioTracks;else{const r=i.maxAutoLevel,o=r>-1?r+1:i.levels.length;n=i.levels.slice(0,o)}for(const r of n)r.bitrate>t&&(t=r.bitrate);return t>0?t:NaN}getBufferLength(e){const t=this.hls.media,n=e===bt.AUDIO?this.audioBuffer:this.videoBuffer;return!n||!t?NaN:Fe.bufferInfo(n,t.currentTime,this.config.maxBufferHole).len*1e3}createPlaylistLoader(){const{pLoader:e}=this.config,t=this.applyPlaylistData,n=e||this.config.loader;return class{constructor(r){this.loader=void 0,this.loader=new n(r)}get stats(){return this.loader.stats}get context(){return this.loader.context}destroy(){this.loader.destroy()}abort(){this.loader.abort()}load(r,o,l){t(r),this.loader.load(r,o,l)}}}createFragmentLoader(){const{fLoader:e}=this.config,t=this.applyFragmentData,n=e||this.config.loader;return class{constructor(r){this.loader=void 0,this.loader=new n(r)}get stats(){return this.loader.stats}get context(){return this.loader.context}destroy(){this.loader.destroy()}abort(){this.loader.abort()}load(r,o,l){t(r),this.loader.load(r,o,l)}}}}const EO=3e5;class TO{constructor(e){this.hls=void 0,this.log=void 0,this.loader=null,this.uri=null,this.pathwayId=".",this.pathwayPriority=null,this.timeToLoad=300,this.reloadTimer=-1,this.updated=0,this.started=!1,this.enabled=!0,this.levels=null,this.audioTracks=null,this.subtitleTracks=null,this.penalizedPathways={},this.hls=e,this.log=L.log.bind(L,"[content-steering]:"),this.registerListeners()}registerListeners(){const e=this.hls;e.on(S.MANIFEST_LOADING,this.onManifestLoading,this),e.on(S.MANIFEST_LOADED,this.onManifestLoaded,this),e.on(S.MANIFEST_PARSED,this.onManifestParsed,this),e.on(S.ERROR,this.onError,this)}unregisterListeners(){const e=this.hls;e&&(e.off(S.MANIFEST_LOADING,this.onManifestLoading,this),e.off(S.MANIFEST_LOADED,this.onManifestLoaded,this),e.off(S.MANIFEST_PARSED,this.onManifestParsed,this),e.off(S.ERROR,this.onError,this))}startLoad(){if(this.started=!0,this.clearTimeout(),this.enabled&&this.uri){if(this.updated){const e=this.timeToLoad*1e3-(performance.now()-this.updated);if(e>0){this.scheduleRefresh(this.uri,e);return}}this.loadSteeringManifest(this.uri)}}stopLoad(){this.started=!1,this.loader&&(this.loader.destroy(),this.loader=null),this.clearTimeout()}clearTimeout(){this.reloadTimer!==-1&&(self.clearTimeout(this.reloadTimer),this.reloadTimer=-1)}destroy(){this.unregisterListeners(),this.stopLoad(),this.hls=null,this.levels=this.audioTracks=this.subtitleTracks=null}removeLevel(e){const t=this.levels;t&&(this.levels=t.filter(n=>n!==e))}onManifestLoading(){this.stopLoad(),this.enabled=!0,this.timeToLoad=300,this.updated=0,this.uri=null,this.pathwayId=".",this.levels=this.audioTracks=this.subtitleTracks=null}onManifestLoaded(e,t){const{contentSteering:n}=t;n!==null&&(this.pathwayId=n.pathwayId,this.uri=n.uri,this.started&&this.startLoad())}onManifestParsed(e,t){this.audioTracks=t.audioTracks,this.subtitleTracks=t.subtitleTracks}onError(e,t){const{errorAction:n}=t;if((n==null?void 0:n.action)===ct.SendAlternateToPenaltyBox&&n.flags===Ut.MoveAllAlternatesMatchingHost){const i=this.levels;let r=this.pathwayPriority,o=this.pathwayId;if(t.context){const{groupId:l,pathwayId:d,type:c}=t.context;l&&i?o=this.getPathwayForGroupId(l,c,o):d&&(o=d)}o in this.penalizedPathways||(this.penalizedPathways[o]=performance.now()),!r&&i&&(r=i.reduce((l,d)=>(l.indexOf(d.pathwayId)===-1&&l.push(d.pathwayId),l),[])),r&&r.length>1&&(this.updatePathwayPriority(r),n.resolved=this.pathwayId!==o),n.resolved||L.warn(`Could not resolve ${t.details} ("${t.error.message}") with content-steering for Pathway: ${o} levels: ${i&&i.length} priorities: ${JSON.stringify(r)} penalized: ${JSON.stringify(this.penalizedPathways)}`)}}filterParsedLevels(e){this.levels=e;let t=this.getLevelsForPathway(this.pathwayId);if(t.length===0){const n=e[0].pathwayId;this.log(`No levels found in Pathway ${this.pathwayId}. Setting initial Pathway to "${n}"`),t=this.getLevelsForPathway(n),this.pathwayId=n}return t.length!==e.length&&this.log(`Found ${t.length}/${e.length} levels in Pathway "${this.pathwayId}"`),t}getLevelsForPathway(e){return this.levels===null?[]:this.levels.filter(t=>e===t.pathwayId)}updatePathwayPriority(e){this.pathwayPriority=e;let t;const n=this.penalizedPathways,i=performance.now();Object.keys(n).forEach(r=>{i-n[r]>EO&&delete n[r]});for(let r=0;r<e.length;r++){const o=e[r];if(o in n)continue;if(o===this.pathwayId)return;const l=this.hls.nextLoadLevel,d=this.hls.levels[l];if(t=this.getLevelsForPathway(o),t.length>0){this.log(`Setting Pathway to "${o}"`),this.pathwayId=o,rg(t),this.hls.trigger(S.LEVELS_UPDATED,{levels:t});const c=this.hls.levels[l];d&&c&&this.levels&&(c.attrs["STABLE-VARIANT-ID"]!==d.attrs["STABLE-VARIANT-ID"]&&c.bitrate!==d.bitrate&&this.log(`Unstable Pathways change from bitrate ${d.bitrate} to ${c.bitrate}`),this.hls.nextLoadLevel=l);break}}}getPathwayForGroupId(e,t,n){const i=this.getLevelsForPathway(n).concat(this.levels||[]);for(let r=0;r<i.length;r++)if(t===Ae.AUDIO_TRACK&&i[r].hasAudioGroup(e)||t===Ae.SUBTITLE_TRACK&&i[r].hasSubtitleGroup(e))return i[r].pathwayId;return n}clonePathways(e){const t=this.levels;if(!t)return;const n={},i={};e.forEach(r=>{const{ID:o,"BASE-ID":l,"URI-REPLACEMENT":d}=r;if(t.some(u=>u.pathwayId===o))return;const c=this.getLevelsForPathway(l).map(u=>{const m=new Me(u.attrs);m["PATHWAY-ID"]=o;const f=m.AUDIO&&`${m.AUDIO}_clone_${o}`,p=m.SUBTITLES&&`${m.SUBTITLES}_clone_${o}`;f&&(n[m.AUDIO]=f,m.AUDIO=f),p&&(i[m.SUBTITLES]=p,m.SUBTITLES=p);const h=yp(u.uri,m["STABLE-VARIANT-ID"],"PER-VARIANT-URIS",d),g=new Js({attrs:m,audioCodec:u.audioCodec,bitrate:u.bitrate,height:u.height,name:u.name,url:h,videoCodec:u.videoCodec,width:u.width});if(u.audioGroups)for(let y=1;y<u.audioGroups.length;y++)g.addGroupId("audio",`${u.audioGroups[y]}_clone_${o}`);if(u.subtitleGroups)for(let y=1;y<u.subtitleGroups.length;y++)g.addGroupId("text",`${u.subtitleGroups[y]}_clone_${o}`);return g});t.push(...c),pp(this.audioTracks,n,d,o),pp(this.subtitleTracks,i,d,o)})}loadSteeringManifest(e){const t=this.hls.config,n=t.loader;this.loader&&this.loader.destroy(),this.loader=new n(t);let i;try{i=new self.URL(e)}catch{this.enabled=!1,this.log(`Failed to parse Steering Manifest URI: ${e}`);return}if(i.protocol!=="data:"){const u=(this.hls.bandwidthEstimate||t.abrEwmaDefaultEstimate)|0;i.searchParams.set("_HLS_pathway",this.pathwayId),i.searchParams.set("_HLS_throughput",""+u)}const r={responseType:"json",url:i.href},o=t.steeringManifestLoadPolicy.default,l=o.errorRetry||o.timeoutRetry||{},d={loadPolicy:o,timeout:o.maxLoadTimeMs,maxRetry:l.maxNumRetry||0,retryDelay:l.retryDelayMs||0,maxRetryDelay:l.maxRetryDelayMs||0},c={onSuccess:(u,m,f,p)=>{this.log(`Loaded steering manifest: "${i}"`);const h=u.data;if(h.VERSION!==1){this.log(`Steering VERSION ${h.VERSION} not supported!`);return}this.updated=performance.now(),this.timeToLoad=h.TTL;const{"RELOAD-URI":g,"PATHWAY-CLONES":y,"PATHWAY-PRIORITY":b}=h;if(g)try{this.uri=new self.URL(g,i).href}catch{this.enabled=!1,this.log(`Failed to parse Steering Manifest RELOAD-URI: ${g}`);return}this.scheduleRefresh(this.uri||f.url),y&&this.clonePathways(y);const w={steeringManifest:h,url:i.toString()};this.hls.trigger(S.STEERING_MANIFEST_LOADED,w),b&&this.updatePathwayPriority(b)},onError:(u,m,f,p)=>{if(this.log(`Error loading steering manifest: ${u.code} ${u.text} (${m.url})`),this.stopLoad(),u.code===410){this.enabled=!1,this.log(`Steering manifest ${m.url} no longer available`);return}let h=this.timeToLoad*1e3;if(u.code===429){const g=this.loader;if(typeof(g==null?void 0:g.getResponseHeader)=="function"){const y=g.getResponseHeader("Retry-After");y&&(h=parseFloat(y)*1e3)}this.log(`Steering manifest ${m.url} rate limited`);return}this.scheduleRefresh(this.uri||m.url,h)},onTimeout:(u,m,f)=>{this.log(`Timeout loading steering manifest (${m.url})`),this.scheduleRefresh(this.uri||m.url)}};this.log(`Requesting steering manifest: ${i}`),this.loader.load(r,d,c)}scheduleRefresh(e,t=this.timeToLoad*1e3){this.clearTimeout(),this.reloadTimer=self.setTimeout(()=>{var n;const i=(n=this.hls)==null?void 0:n.media;if(i&&!i.ended){this.loadSteeringManifest(e);return}this.scheduleRefresh(e,this.timeToLoad*1e3)},t)}}function pp(s,e,t,n){s&&Object.keys(e).forEach(i=>{const r=s.filter(o=>o.groupId===i).map(o=>{const l=qe({},o);return l.details=void 0,l.attrs=new Me(l.attrs),l.url=l.attrs.URI=yp(o.url,o.attrs["STABLE-RENDITION-ID"],"PER-RENDITION-URIS",t),l.groupId=l.attrs["GROUP-ID"]=e[i],l.attrs["PATHWAY-ID"]=n,l});s.push(...r)})}function yp(s,e,t,n){const{HOST:i,PARAMS:r,[t]:o}=n;let l;e&&(l=o==null?void 0:o[e],l&&(s=l));const d=new self.URL(s);return i&&!l&&(d.host=i),r&&Object.keys(r).sort().forEach(c=>{c&&d.searchParams.set(c,r[c])}),d.href}const CO=/^age:\s*[\d.]+\s*$/im;class bp{constructor(e){this.xhrSetup=void 0,this.requestTimeout=void 0,this.retryTimeout=void 0,this.retryDelay=void 0,this.config=null,this.callbacks=null,this.context=null,this.loader=null,this.stats=void 0,this.xhrSetup=e&&e.xhrSetup||null,this.stats=new ii,this.retryDelay=0}destroy(){this.callbacks=null,this.abortInternal(),this.loader=null,this.config=null,this.context=null,this.xhrSetup=null}abortInternal(){const e=this.loader;self.clearTimeout(this.requestTimeout),self.clearTimeout(this.retryTimeout),e&&(e.onreadystatechange=null,e.onprogress=null,e.readyState!==4&&(this.stats.aborted=!0,e.abort()))}abort(){var e;this.abortInternal(),(e=this.callbacks)!=null&&e.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.loader)}load(e,t,n){if(this.stats.loading.start)throw new Error("Loader can only be used once.");this.stats.loading.start=self.performance.now(),this.context=e,this.config=t,this.callbacks=n,this.loadInternal()}loadInternal(){const{config:e,context:t}=this;if(!e||!t)return;const n=this.loader=new self.XMLHttpRequest,i=this.stats;i.loading.first=0,i.loaded=0,i.aborted=!1;const r=this.xhrSetup;r?Promise.resolve().then(()=>{if(!(this.loader!==n||this.stats.aborted))return r(n,t.url)}).catch(o=>{if(!(this.loader!==n||this.stats.aborted))return n.open("GET",t.url,!0),r(n,t.url)}).then(()=>{this.loader!==n||this.stats.aborted||this.openAndSendXhr(n,t,e)}).catch(o=>{this.callbacks.onError({code:n.status,text:o.message},t,n,i)}):this.openAndSendXhr(n,t,e)}openAndSendXhr(e,t,n){e.readyState||e.open("GET",t.url,!0);const i=t.headers,{maxTimeToFirstByteMs:r,maxLoadTimeMs:o}=n.loadPolicy;if(i)for(const l in i)e.setRequestHeader(l,i[l]);t.rangeEnd&&e.setRequestHeader("Range","bytes="+t.rangeStart+"-"+(t.rangeEnd-1)),e.onreadystatechange=this.readystatechange.bind(this),e.onprogress=this.loadprogress.bind(this),e.responseType=t.responseType,self.clearTimeout(this.requestTimeout),n.timeout=r&&ae(r)?r:o,this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),n.timeout),e.send()}readystatechange(){const{context:e,loader:t,stats:n}=this;if(!e||!t)return;const i=t.readyState,r=this.config;if(!n.aborted&&i>=2&&(n.loading.first===0&&(n.loading.first=Math.max(self.performance.now(),n.loading.start),r.timeout!==r.loadPolicy.maxLoadTimeMs&&(self.clearTimeout(this.requestTimeout),r.timeout=r.loadPolicy.maxLoadTimeMs,this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),r.loadPolicy.maxLoadTimeMs-(n.loading.first-n.loading.start)))),i===4)){self.clearTimeout(this.requestTimeout),t.onreadystatechange=null,t.onprogress=null;const o=t.status,l=t.responseType==="text"?t.responseText:null;if(o>=200&&o<300){const m=l??t.response;if(m!=null){n.loading.end=Math.max(self.performance.now(),n.loading.first);const f=t.responseType==="arraybuffer"?m.byteLength:m.length;if(n.loaded=n.total=f,n.bwEstimate=n.total*8e3/(n.loading.end-n.loading.first),!this.callbacks)return;const p=this.callbacks.onProgress;if(p&&p(n,e,m,t),!this.callbacks)return;const h={url:t.responseURL,data:m,code:o};this.callbacks.onSuccess(h,n,e,t);return}}const d=r.loadPolicy.errorRetry,c=n.retry,u={url:e.url,data:void 0,code:o};Si(d,c,!1,u)?this.retry(d):(L.error(`${o} while loading ${e.url}`),this.callbacks.onError({code:o,text:t.statusText},e,t,n))}}loadtimeout(){if(!this.config)return;const e=this.config.loadPolicy.timeoutRetry,t=this.stats.retry;if(Si(e,t,!0))this.retry(e);else{var n;L.warn(`timeout while loading ${(n=this.context)==null?void 0:n.url}`);const i=this.callbacks;i&&(this.abortInternal(),i.onTimeout(this.stats,this.context,this.loader))}}retry(e){const{context:t,stats:n}=this;this.retryDelay=Al(e,n.retry),n.retry++,L.warn(`${status?"HTTP Status "+status:"Timeout"} while loading ${t==null?void 0:t.url}, retrying ${n.retry}/${e.maxNumRetry} in ${this.retryDelay}ms`),this.abortInternal(),this.loader=null,self.clearTimeout(this.retryTimeout),this.retryTimeout=self.setTimeout(this.loadInternal.bind(this),this.retryDelay)}loadprogress(e){const t=this.stats;t.loaded=e.loaded,e.lengthComputable&&(t.total=e.total)}getCacheAge(){let e=null;if(this.loader&&CO.test(this.loader.getAllResponseHeaders())){const t=this.loader.getResponseHeader("age");e=t?parseFloat(t):null}return e}getResponseHeader(e){return this.loader&&new RegExp(`^${e}:\\s*[\\d.]+\\s*$`,"im").test(this.loader.getAllResponseHeaders())?this.loader.getResponseHeader(e):null}}function xO(){if(self.fetch&&self.AbortController&&self.ReadableStream&&self.Request)try{return new self.ReadableStream({}),!0}catch{}return!1}const AO=/(\d+)-(\d+)\/(\d+)/;class wp{constructor(e){this.fetchSetup=void 0,this.requestTimeout=void 0,this.request=null,this.response=null,this.controller=void 0,this.context=null,this.config=null,this.callbacks=null,this.stats=void 0,this.loader=null,this.fetchSetup=e.fetchSetup||RO,this.controller=new self.AbortController,this.stats=new ii}destroy(){this.loader=this.callbacks=this.context=this.config=this.request=null,this.abortInternal(),this.response=null,this.fetchSetup=this.controller=this.stats=null}abortInternal(){this.controller&&!this.stats.loading.end&&(this.stats.aborted=!0,this.controller.abort())}abort(){var e;this.abortInternal(),(e=this.callbacks)!=null&&e.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.response)}load(e,t,n){const i=this.stats;if(i.loading.start)throw new Error("Loader can only be used once.");i.loading.start=self.performance.now();const r=LO(e,this.controller.signal),o=n.onProgress,l=e.responseType==="arraybuffer",d=l?"byteLength":"length",{maxTimeToFirstByteMs:c,maxLoadTimeMs:u}=t.loadPolicy;this.context=e,this.config=t,this.callbacks=n,this.request=this.fetchSetup(e,r),self.clearTimeout(this.requestTimeout),t.timeout=c&&ae(c)?c:u,this.requestTimeout=self.setTimeout(()=>{this.abortInternal(),n.onTimeout(i,e,this.response)},t.timeout),self.fetch(this.request).then(m=>{this.response=this.loader=m;const f=Math.max(self.performance.now(),i.loading.start);if(self.clearTimeout(this.requestTimeout),t.timeout=u,this.requestTimeout=self.setTimeout(()=>{this.abortInternal(),n.onTimeout(i,e,this.response)},u-(f-i.loading.start)),!m.ok){const{status:p,statusText:h}=m;throw new vO(h||"fetch, bad network response",p,m)}return i.loading.first=f,i.total=BO(m.headers)||i.total,o&&ae(t.highWaterMark)?this.loadProgressively(m,i,e,t.highWaterMark,o):l?m.arrayBuffer():e.responseType==="json"?m.json():m.text()}).then(m=>{const f=this.response;if(!f)throw new Error("loader destroyed");self.clearTimeout(this.requestTimeout),i.loading.end=Math.max(self.performance.now(),i.loading.first);const p=m[d];p&&(i.loaded=i.total=p);const h={url:f.url,data:m,code:f.status};o&&!ae(t.highWaterMark)&&o(i,e,m,f),n.onSuccess(h,i,e,f)}).catch(m=>{if(self.clearTimeout(this.requestTimeout),i.aborted)return;const f=m&&m.code||0,p=m?m.message:null;n.onError({code:f,text:p},e,m?m.details:null,i)})}getCacheAge(){let e=null;if(this.response){const t=this.response.headers.get("age");e=t?parseFloat(t):null}return e}getResponseHeader(e){return this.response?this.response.headers.get(e):null}loadProgressively(e,t,n,i=0,r){const o=new bg,l=e.body.getReader(),d=()=>l.read().then(c=>{if(c.done)return o.dataLength&&r(t,n,o.flush(),e),Promise.resolve(new ArrayBuffer(0));const u=c.value,m=u.length;return t.loaded+=m,m<i||o.dataLength?(o.push(u),o.dataLength>=i&&r(t,n,o.flush(),e)):r(t,n,u,e),d()}).catch(()=>Promise.reject());return d()}}function LO(s,e){const t={method:"GET",mode:"cors",credentials:"same-origin",signal:e,headers:new self.Headers(qe({},s.headers))};return s.rangeEnd&&t.headers.set("Range","bytes="+s.rangeStart+"-"+String(s.rangeEnd-1)),t}function IO(s){const e=AO.exec(s);if(e)return parseInt(e[2])-parseInt(e[1])+1}function BO(s){const e=s.get("Content-Range");if(e){const n=IO(e);if(ae(n))return n}const t=s.get("Content-Length");if(t)return parseInt(t)}function RO(s,e){return new self.Request(s.url,e)}class vO extends Error{constructor(e,t,n){super(e),this.code=void 0,this.details=void 0,this.code=t,this.details=n}}const NO=/\s/,DO={newCue(s,e,t,n){const i=[];let r,o,l,d,c;const u=self.VTTCue||self.TextTrackCue;for(let f=0;f<n.rows.length;f++)if(r=n.rows[f],l=!0,d=0,c="",!r.isEmpty()){var m;for(let g=0;g<r.chars.length;g++)NO.test(r.chars[g].uchar)&&l?d++:(c+=r.chars[g].uchar,l=!1);r.cueStartTime=e,e===t&&(t+=1e-4),d>=16?d--:d++;const p=Zg(c.trim()),h=ql(e,t,p);s!=null&&(m=s.cues)!=null&&m.getCueById(h)||(o=new u(e,t,p),o.id=h,o.line=f+1,o.align="left",o.position=10+Math.min(80,Math.floor(d*8/32)*10),i.push(o))}return s&&i.length&&(i.sort((f,p)=>f.line==="auto"||p.line==="auto"?0:f.line>8&&p.line>8?p.line-f.line:f.line-p.line),i.forEach(f=>Xf(s,f))),i}},PO={maxTimeToFirstByteMs:8e3,maxLoadTimeMs:2e4,timeoutRetry:null,errorRetry:null},Sp=nt(nt({autoStartLoad:!0,startPosition:-1,defaultAudioCodec:void 0,debug:!1,capLevelOnFPSDrop:!1,capLevelToPlayerSize:!1,ignoreDevicePixelRatio:!1,preferManagedMediaSource:!0,initialLiveManifestSize:1,maxBufferLength:30,backBufferLength:1/0,frontBufferFlushThreshold:1/0,maxBufferSize:60*1e3*1e3,maxBufferHole:.1,highBufferWatchdogPeriod:2,nudgeOffset:.1,nudgeMaxRetry:3,maxFragLookUpTolerance:.25,liveSyncDurationCount:3,liveMaxLatencyDurationCount:1/0,liveSyncDuration:void 0,liveMaxLatencyDuration:void 0,maxLiveSyncPlaybackRate:1,liveDurationInfinity:!1,liveBackBufferLength:null,maxMaxBufferLength:600,enableWorker:!0,workerPath:null,enableSoftwareAES:!0,startLevel:void 0,startFragPrefetch:!1,fpsDroppedMonitoringPeriod:5e3,fpsDroppedMonitoringThreshold:.2,appendErrorMaxRetry:3,loader:bp,fLoader:void 0,pLoader:void 0,xhrSetup:void 0,licenseXhrSetup:void 0,licenseResponseCallback:void 0,abrController:l6,bufferController:hP,capLevelController:Ql,errorController:JD,fpsController:$P,stretchShortVideoTrack:!1,maxAudioFramesDrift:1,forceKeyFrameOnDiscontinuity:!0,abrEwmaFastLive:3,abrEwmaSlowLive:9,abrEwmaFastVoD:3,abrEwmaSlowVoD:9,abrEwmaDefaultEstimate:5e5,abrEwmaDefaultEstimateMax:5e6,abrBandWidthFactor:.95,abrBandWidthUpFactor:.7,abrMaxWithRealBitrate:!1,maxStarvationDelay:4,maxLoadingDelay:4,minAutoBitrate:0,emeEnabled:!1,widevineLicenseUrl:void 0,drmSystems:{},drmSystemOptions:{},requestMediaKeySystemAccessFunc:Sf,testBandwidth:!0,progressive:!1,lowLatencyMode:!0,cmcd:void 0,enableDateRangeMetadataCues:!0,enableEmsgMetadataCues:!0,enableID3MetadataCues:!0,useMediaCapabilities:!0,certLoadPolicy:{default:PO},keyLoadPolicy:{default:{maxTimeToFirstByteMs:8e3,maxLoadTimeMs:2e4,timeoutRetry:{maxNumRetry:1,retryDelayMs:1e3,maxRetryDelayMs:2e4,backoff:"linear"},errorRetry:{maxNumRetry:8,retryDelayMs:1e3,maxRetryDelayMs:2e4,backoff:"linear"}}},manifestLoadPolicy:{default:{maxTimeToFirstByteMs:1/0,maxLoadTimeMs:2e4,timeoutRetry:{maxNumRetry:2,retryDelayMs:0,maxRetryDelayMs:0},errorRetry:{maxNumRetry:1,retryDelayMs:1e3,maxRetryDelayMs:8e3}}},playlistLoadPolicy:{default:{maxTimeToFirstByteMs:1e4,maxLoadTimeMs:2e4,timeoutRetry:{maxNumRetry:2,retryDelayMs:0,maxRetryDelayMs:0},errorRetry:{maxNumRetry:2,retryDelayMs:1e3,maxRetryDelayMs:8e3}}},fragLoadPolicy:{default:{maxTimeToFirstByteMs:1e4,maxLoadTimeMs:12e4,timeoutRetry:{maxNumRetry:4,retryDelayMs:0,maxRetryDelayMs:0},errorRetry:{maxNumRetry:6,retryDelayMs:1e3,maxRetryDelayMs:8e3}}},steeringManifestLoadPolicy:{default:{maxTimeToFirstByteMs:1e4,maxLoadTimeMs:2e4,timeoutRetry:{maxNumRetry:2,retryDelayMs:0,maxRetryDelayMs:0},errorRetry:{maxNumRetry:1,retryDelayMs:1e3,maxRetryDelayMs:8e3}}},manifestLoadingTimeOut:1e4,manifestLoadingMaxRetry:1,manifestLoadingRetryDelay:1e3,manifestLoadingMaxRetryTimeout:64e3,levelLoadingTimeOut:1e4,levelLoadingMaxRetry:4,levelLoadingRetryDelay:1e3,levelLoadingMaxRetryTimeout:64e3,fragLoadingTimeOut:2e4,fragLoadingMaxRetry:6,fragLoadingRetryDelay:1e3,fragLoadingMaxRetryTimeout:64e3},OO()),{},{subtitleStreamController:lP,subtitleTrackController:dP,timelineController:MP,audioStreamController:rP,audioTrackController:oP,emeController:an,cmcdController:kO,contentSteeringController:TO});function OO(){return{cueHandler:DO,enableWebVTT:!0,enableIMSC1:!0,enableCEA708Captions:!0,captionsTextTrack1Label:"English",captionsTextTrack1LanguageCode:"en",captionsTextTrack2Label:"Spanish",captionsTextTrack2LanguageCode:"es",captionsTextTrack3Label:"Unknown CC",captionsTextTrack3LanguageCode:"",captionsTextTrack4Label:"Unknown CC",captionsTextTrack4LanguageCode:"",renderTextTracksNatively:!0}}function FO(s,e){if((e.liveSyncDurationCount||e.liveMaxLatencyDurationCount)&&(e.liveSyncDuration||e.liveMaxLatencyDuration))throw new Error("Illegal hls.js config: don't mix up liveSyncDurationCount/liveMaxLatencyDurationCount and liveSyncDuration/liveMaxLatencyDuration");if(e.liveMaxLatencyDurationCount!==void 0&&(e.liveSyncDurationCount===void 0||e.liveMaxLatencyDurationCount<=e.liveSyncDurationCount))throw new Error('Illegal hls.js config: "liveMaxLatencyDurationCount" must be greater than "liveSyncDurationCount"');if(e.liveMaxLatencyDuration!==void 0&&(e.liveSyncDuration===void 0||e.liveMaxLatencyDuration<=e.liveSyncDuration))throw new Error('Illegal hls.js config: "liveMaxLatencyDuration" must be greater than "liveSyncDuration"');const t=ac(s),n=["manifest","level","frag"],i=["TimeOut","MaxRetry","RetryDelay","MaxRetryTimeout"];return n.forEach(r=>{const o=`${r==="level"?"playlist":r}LoadPolicy`,l=e[o]===void 0,d=[];i.forEach(c=>{const u=`${r}Loading${c}`,m=e[u];if(m!==void 0&&l){d.push(u);const f=t[o].default;switch(e[o]={default:f},c){case"TimeOut":f.maxLoadTimeMs=m,f.maxTimeToFirstByteMs=m;break;case"MaxRetry":f.errorRetry.maxNumRetry=m,f.timeoutRetry.maxNumRetry=m;break;case"RetryDelay":f.errorRetry.retryDelayMs=m,f.timeoutRetry.retryDelayMs=m;break;case"MaxRetryTimeout":f.errorRetry.maxRetryDelayMs=m,f.timeoutRetry.maxRetryDelayMs=m;break}}}),d.length&&L.warn(`hls.js config: "${d.join('", "')}" setting(s) are deprecated, use "${o}": ${JSON.stringify(e[o])}`)}),nt(nt({},t),e)}function ac(s){return s&&typeof s=="object"?Array.isArray(s)?s.map(ac):Object.keys(s).reduce((e,t)=>(e[t]=ac(s[t]),e),{}):s}function MO(s){const e=s.loader;e!==wp&&e!==bp?(L.log("[config]: Custom loader detected, cannot enable progressive streaming"),s.progressive=!1):xO()&&(s.loader=wp,s.progressive=!0,s.enableSoftwareAES=!0,L.log("[config]: Progressive streaming enabled, using FetchLoader"))}let ic;class VO extends Il{constructor(e,t){super(e,"[level-controller]"),this._levels=[],this._firstLevel=-1,this._maxAutoLevel=-1,this._startLevel=void 0,this.currentLevel=null,this.currentLevelIndex=-1,this.manualLevelIndex=-1,this.steering=void 0,this.onParsedComplete=void 0,this.steering=t,this._registerListeners()}_registerListeners(){const{hls:e}=this;e.on(S.MANIFEST_LOADING,this.onManifestLoading,this),e.on(S.MANIFEST_LOADED,this.onManifestLoaded,this),e.on(S.LEVEL_LOADED,this.onLevelLoaded,this),e.on(S.LEVELS_UPDATED,this.onLevelsUpdated,this),e.on(S.FRAG_BUFFERED,this.onFragBuffered,this),e.on(S.ERROR,this.onError,this)}_unregisterListeners(){const{hls:e}=this;e.off(S.MANIFEST_LOADING,this.onManifestLoading,this),e.off(S.MANIFEST_LOADED,this.onManifestLoaded,this),e.off(S.LEVEL_LOADED,this.onLevelLoaded,this),e.off(S.LEVELS_UPDATED,this.onLevelsUpdated,this),e.off(S.FRAG_BUFFERED,this.onFragBuffered,this),e.off(S.ERROR,this.onError,this)}destroy(){this._unregisterListeners(),this.steering=null,this.resetLevels(),super.destroy()}stopLoad(){this._levels.forEach(t=>{t.loadError=0,t.fragmentError=0}),super.stopLoad()}resetLevels(){this._startLevel=void 0,this.manualLevelIndex=-1,this.currentLevelIndex=-1,this.currentLevel=null,this._levels=[],this._maxAutoLevel=-1}onManifestLoading(e,t){this.resetLevels()}onManifestLoaded(e,t){const n=this.hls.config.preferManagedMediaSource,i=[],r={},o={};let l=!1,d=!1,c=!1;t.levels.forEach(u=>{var m,f;const p=u.attrs;let{audioCodec:h,videoCodec:g}=u;((m=h)==null?void 0:m.indexOf("mp4a.40.34"))!==-1&&(ic||(ic=/chrome|firefox/i.test(navigator.userAgent)),ic&&(u.audioCodec=h=void 0)),h&&(u.audioCodec=h=fi(h,n)),((f=g)==null?void 0:f.indexOf("avc1"))===0&&(g=u.videoCodec=CD(g));const{width:y,height:b,unknownCodecs:w}=u;if(l||(l=!!(y&&b)),d||(d=!!g),c||(c=!!h),w!=null&&w.length||h&&!bl(h,"audio",n)||g&&!bl(g,"video",n))return;const{CODECS:_,"FRAME-RATE":C,"HDCP-LEVEL":E,"PATHWAY-ID":A,RESOLUTION:T,"VIDEO-RANGE":R}=p,v=`${`${A||"."}-`}${u.bitrate}-${T}-${C}-${_}-${R}-${E}`;if(r[v])if(r[v].uri!==u.url&&!u.attrs["PATHWAY-ID"]){const M=o[v]+=1;u.attrs["PATHWAY-ID"]=new Array(M+1).join(".");const j=new Js(u);r[v]=j,i.push(j)}else r[v].addGroupId("audio",p.AUDIO),r[v].addGroupId("text",p.SUBTITLES);else{const M=new Js(u);r[v]=M,o[v]=1,i.push(M)}}),this.filterAndSortMediaOptions(i,t,l,d,c)}filterAndSortMediaOptions(e,t,n,i,r){let o=[],l=[],d=e;if((n||i)&&r&&(d=d.filter(({videoCodec:h,videoRange:g,width:y,height:b})=>(!!h||!!(y&&b))&&MD(g))),d.length===0){Promise.resolve().then(()=>{if(this.hls){t.levels.length&&this.warn(`One or more CODECS in variant not supported: ${JSON.stringify(t.levels[0].attrs)}`);const h=new Error("no level with compatible codecs found in manifest");this.hls.trigger(S.ERROR,{type:ge.MEDIA_ERROR,details:N.MANIFEST_INCOMPATIBLE_CODECS_ERROR,fatal:!0,url:t.url,error:h,reason:h.message})}});return}if(t.audioTracks){const{preferManagedMediaSource:h}=this.hls.config;o=t.audioTracks.filter(g=>!g.audioCodec||bl(g.audioCodec,"audio",h)),_p(o)}t.subtitles&&(l=t.subtitles,_p(l));const c=d.slice(0);d.sort((h,g)=>{if(h.attrs["HDCP-LEVEL"]!==g.attrs["HDCP-LEVEL"])return(h.attrs["HDCP-LEVEL"]||"")>(g.attrs["HDCP-LEVEL"]||"")?1:-1;if(n&&h.height!==g.height)return h.height-g.height;if(h.frameRate!==g.frameRate)return h.frameRate-g.frameRate;if(h.videoRange!==g.videoRange)return yi.indexOf(h.videoRange)-yi.indexOf(g.videoRange);if(h.videoCodec!==g.videoCodec){const y=Mf(h.videoCodec),b=Mf(g.videoCodec);if(y!==b)return b-y}if(h.uri===g.uri&&h.codecSet!==g.codecSet){const y=mi(h.codecSet),b=mi(g.codecSet);if(y!==b)return b-y}return h.averageBitrate!==g.averageBitrate?h.averageBitrate-g.averageBitrate:0});let u=c[0];if(this.steering&&(d=this.steering.filterParsedLevels(d),d.length!==c.length)){for(let h=0;h<c.length;h++)if(c[h].pathwayId===d[0].pathwayId){u=c[h];break}}this._levels=d;for(let h=0;h<d.length;h++)if(d[h]===u){var m;this._firstLevel=h;const g=u.bitrate,y=this.hls.bandwidthEstimate;if(this.log(`manifest loaded, ${d.length} level(s) found, first bitrate: ${g}`),((m=this.hls.userConfig)==null?void 0:m.abrEwmaDefaultEstimate)===void 0){const b=Math.min(g,this.hls.config.abrEwmaDefaultEstimateMax);b>y&&y===Sp.abrEwmaDefaultEstimate&&(this.hls.bandwidthEstimate=b)}break}const f=r&&!i,p={levels:d,audioTracks:o,subtitleTracks:l,sessionData:t.sessionData,sessionKeys:t.sessionKeys,firstLevel:this._firstLevel,stats:t.stats,audio:r,video:i,altAudio:!f&&o.some(h=>!!h.url)};this.hls.trigger(S.MANIFEST_PARSED,p),(this.hls.config.autoStartLoad||this.hls.forceStartLoad)&&this.hls.startLoad(this.hls.config.startPosition)}get levels(){return this._levels.length===0?null:this._levels}get level(){return this.currentLevelIndex}set level(e){const t=this._levels;if(t.length===0)return;if(e<0||e>=t.length){const u=new Error("invalid level idx"),m=e<0;if(this.hls.trigger(S.ERROR,{type:ge.OTHER_ERROR,details:N.LEVEL_SWITCH_ERROR,level:e,fatal:m,error:u,reason:u.message}),m)return;e=Math.min(e,t.length-1)}const n=this.currentLevelIndex,i=this.currentLevel,r=i?i.attrs["PATHWAY-ID"]:void 0,o=t[e],l=o.attrs["PATHWAY-ID"];if(this.currentLevelIndex=e,this.currentLevel=o,n===e&&o.details&&i&&r===l)return;this.log(`Switching to level ${e} (${o.height?o.height+"p ":""}${o.videoRange?o.videoRange+" ":""}${o.codecSet?o.codecSet+" ":""}@${o.bitrate})${l?" with Pathway "+l:""} from level ${n}${r?" with Pathway "+r:""}`);const d={level:e,attrs:o.attrs,details:o.details,bitrate:o.bitrate,averageBitrate:o.averageBitrate,maxBitrate:o.maxBitrate,realBitrate:o.realBitrate,width:o.width,height:o.height,codecSet:o.codecSet,audioCodec:o.audioCodec,videoCodec:o.videoCodec,audioGroups:o.audioGroups,subtitleGroups:o.subtitleGroups,loaded:o.loaded,loadError:o.loadError,fragmentError:o.fragmentError,name:o.name,id:o.id,uri:o.uri,url:o.url,urlId:0,audioGroupIds:o.audioGroupIds,textGroupIds:o.textGroupIds};this.hls.trigger(S.LEVEL_SWITCHING,d);const c=o.details;if(!c||c.live){const u=this.switchParams(o.uri,i==null?void 0:i.details,c);this.loadPlaylist(u)}}get manualLevel(){return this.manualLevelIndex}set manualLevel(e){this.manualLevelIndex=e,this._startLevel===void 0&&(this._startLevel=e),e!==-1&&(this.level=e)}get firstLevel(){return this._firstLevel}set firstLevel(e){this._firstLevel=e}get startLevel(){if(this._startLevel===void 0){const e=this.hls.config.startLevel;return e!==void 0?e:this.hls.firstAutoLevel}return this._startLevel}set startLevel(e){this._startLevel=e}onError(e,t){t.fatal||!t.context||t.context.type===Ae.LEVEL&&t.context.level===this.level&&this.checkRetry(t)}onFragBuffered(e,{frag:t}){if(t!==void 0&&t.type===le.MAIN){const n=t.elementaryStreams;if(!Object.keys(n).some(r=>!!n[r]))return;const i=this._levels[t.level];i!=null&&i.loadError&&(this.log(`Resetting level error count of ${i.loadError} on frag buffered`),i.loadError=0)}}onLevelLoaded(e,t){var n;const{level:i,details:r}=t,o=this._levels[i];if(!o){var l;this.warn(`Invalid level index ${i}`),(l=t.deliveryDirectives)!=null&&l.skip&&(r.deltaUpdateFailed=!0);return}i===this.currentLevelIndex?(o.fragmentError===0&&(o.loadError=0),this.playlistLoaded(i,t,o.details)):(n=t.deliveryDirectives)!=null&&n.skip&&(r.deltaUpdateFailed=!0)}loadPlaylist(e){super.loadPlaylist();const t=this.currentLevelIndex,n=this.currentLevel;if(n&&this.shouldLoadPlaylist(n)){let i=n.uri;if(e)try{i=e.addDirectives(i)}catch(o){this.warn(`Could not construct new URL with HLS Delivery Directives: ${o}`)}const r=n.attrs["PATHWAY-ID"];this.log(`Loading level index ${t}${(e==null?void 0:e.msn)!==void 0?" at sn "+e.msn+" part "+e.part:""} with${r?" Pathway "+r:""} ${i}`),this.clearTimer(),this.hls.trigger(S.LEVEL_LOADING,{url:i,level:t,pathwayId:n.attrs["PATHWAY-ID"],id:0,deliveryDirectives:e||null})}}get nextLoadLevel(){return this.manualLevelIndex!==-1?this.manualLevelIndex:this.hls.nextAutoLevel}set nextLoadLevel(e){this.level=e,this.manualLevelIndex===-1&&(this.hls.nextAutoLevel=e)}removeLevel(e){var t;const n=this._levels.filter((i,r)=>r!==e?!0:(this.steering&&this.steering.removeLevel(i),i===this.currentLevel&&(this.currentLevel=null,this.currentLevelIndex=-1,i.details&&i.details.fragments.forEach(o=>o.level=-1)),!1));rg(n),this._levels=n,this.currentLevelIndex>-1&&(t=this.currentLevel)!=null&&t.details&&(this.currentLevelIndex=this.currentLevel.details.fragments[0].level),this.hls.trigger(S.LEVELS_UPDATED,{levels:n})}onLevelsUpdated(e,{levels:t}){this._levels=t}checkMaxAutoUpdated(){const{autoLevelCapping:e,maxAutoLevel:t,maxHdcpLevel:n}=this.hls;this._maxAutoLevel!==t&&(this._maxAutoLevel=t,this.hls.trigger(S.MAX_AUTO_LEVEL_UPDATED,{autoLevelCapping:e,levels:this.levels,maxAutoLevel:t,minAutoLevel:this.hls.minAutoLevel,maxHdcpLevel:n}))}}function _p(s){const e={};s.forEach(t=>{const n=t.groupId||"";t.id=e[n]=e[n]||0,e[n]++})}class $O{constructor(e){this.config=void 0,this.keyUriToKeyInfo={},this.emeController=null,this.config=e}abort(e){for(const n in this.keyUriToKeyInfo){const i=this.keyUriToKeyInfo[n].loader;if(i){var t;if(e&&e!==((t=i.context)==null?void 0:t.frag.type))return;i.abort()}}}detach(){for(const e in this.keyUriToKeyInfo){const t=this.keyUriToKeyInfo[e];(t.mediaKeySessionContext||t.decryptdata.isCommonEncryption)&&delete this.keyUriToKeyInfo[e]}}destroy(){this.detach();for(const e in this.keyUriToKeyInfo){const t=this.keyUriToKeyInfo[e].loader;t&&t.destroy()}this.keyUriToKeyInfo={}}createKeyLoadError(e,t=N.KEY_LOAD_ERROR,n,i,r){return new ls({type:ge.NETWORK_ERROR,details:t,fatal:!1,frag:e,response:r,error:n,networkDetails:i})}loadClear(e,t){if(this.emeController&&this.config.emeEnabled){const{sn:n,cc:i}=e;for(let r=0;r<t.length;r++){const o=t[r];if(i<=o.cc&&(n==="initSegment"||o.sn==="initSegment"||n<o.sn)){this.emeController.selectKeySystemFormat(o).then(l=>{o.setKeyFormat(l)});break}}}}load(e){return!e.decryptdata&&e.encrypted&&this.emeController&&this.config.emeEnabled?this.emeController.selectKeySystemFormat(e).then(t=>this.loadInternal(e,t)):this.loadInternal(e)}loadInternal(e,t){var n,i;t&&e.setKeyFormat(t);const r=e.decryptdata;if(!r){const c=new Error(t?`Expected frag.decryptdata to be defined after setting format ${t}`:"Missing decryption data on fragment in onKeyLoading");return Promise.reject(this.createKeyLoadError(e,N.KEY_LOAD_ERROR,c))}const o=r.uri;if(!o)return Promise.reject(this.createKeyLoadError(e,N.KEY_LOAD_ERROR,new Error(`Invalid key URI: "${o}"`)));let l=this.keyUriToKeyInfo[o];if((n=l)!=null&&n.decryptdata.key)return r.key=l.decryptdata.key,Promise.resolve({frag:e,keyInfo:l});if((i=l)!=null&&i.keyLoadPromise){var d;switch((d=l.mediaKeySessionContext)==null?void 0:d.keyStatus){case void 0:case"status-pending":case"usable":case"usable-in-future":return l.keyLoadPromise.then(c=>(r.key=c.keyInfo.decryptdata.key,{frag:e,keyInfo:l}))}}switch(l=this.keyUriToKeyInfo[o]={decryptdata:r,keyLoadPromise:null,loader:null,mediaKeySessionContext:null},r.method){case"ISO-23001-7":case"SAMPLE-AES":case"SAMPLE-AES-CENC":case"SAMPLE-AES-CTR":return r.keyFormat==="identity"?this.loadKeyHTTP(l,e):this.loadKeyEME(l,e);case"AES-128":return this.loadKeyHTTP(l,e);default:return Promise.reject(this.createKeyLoadError(e,N.KEY_LOAD_ERROR,new Error(`Key supplied with unsupported METHOD: "${r.method}"`)))}}loadKeyEME(e,t){const n={frag:t,keyInfo:e};if(this.emeController&&this.config.emeEnabled){const i=this.emeController.loadKey(n);if(i)return(e.keyLoadPromise=i.then(r=>(e.mediaKeySessionContext=r,n))).catch(r=>{throw e.keyLoadPromise=null,r})}return Promise.resolve(n)}loadKeyHTTP(e,t){const n=this.config,i=n.loader,r=new i(n);return t.keyLoader=e.loader=r,e.keyLoadPromise=new Promise((o,l)=>{const d={keyInfo:e,frag:t,responseType:"arraybuffer",url:e.decryptdata.uri},c=n.keyLoadPolicy.default,u={loadPolicy:c,timeout:c.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0},m={onSuccess:(f,p,h,g)=>{const{frag:y,keyInfo:b,url:w}=h;if(!y.decryptdata||b!==this.keyUriToKeyInfo[w])return l(this.createKeyLoadError(y,N.KEY_LOAD_ERROR,new Error("after key load, decryptdata unset or changed"),g));b.decryptdata.key=y.decryptdata.key=new Uint8Array(f.data),y.keyLoader=null,b.loader=null,o({frag:y,keyInfo:b})},onError:(f,p,h,g)=>{this.resetLoader(p),l(this.createKeyLoadError(t,N.KEY_LOAD_ERROR,new Error(`HTTP Error ${f.code} loading key ${f.text}`),h,nt({url:d.url,data:void 0},f)))},onTimeout:(f,p,h)=>{this.resetLoader(p),l(this.createKeyLoadError(t,N.KEY_LOAD_TIMEOUT,new Error("key loading timed out"),h))},onAbort:(f,p,h)=>{this.resetLoader(p),l(this.createKeyLoadError(t,N.INTERNAL_ABORTED,new Error("key loading aborted"),h))}};r.load(d,u,m)})}resetLoader(e){const{frag:t,keyInfo:n,url:i}=e,r=n.loader;t.keyLoader===r&&(t.keyLoader=null,n.loader=null),delete this.keyUriToKeyInfo[i],r&&r.destroy()}}function kp(){return self.SourceBuffer||self.WebKitSourceBuffer}function Ep(){if(!Ns())return!1;const e=kp();return!e||e.prototype&&typeof e.prototype.appendBuffer=="function"&&typeof e.prototype.remove=="function"}function UO(){if(!Ep())return!1;const s=Ns();return typeof(s==null?void 0:s.isTypeSupported)=="function"&&(["avc1.42E01E,mp4a.40.2","av01.0.01M.08","vp09.00.50.08"].some(e=>s.isTypeSupported(On(e,"video")))||["mp4a.40.2","fLaC"].some(e=>s.isTypeSupported(On(e,"audio"))))}function zO(){var s;const e=kp();return typeof(e==null||(s=e.prototype)==null?void 0:s.changeType)=="function"}const GO=250,Mi=2,jO=.1,HO=.05;class WO{constructor(e,t,n,i){this.config=void 0,this.media=null,this.fragmentTracker=void 0,this.hls=void 0,this.nudgeRetry=0,this.stallReported=!1,this.stalled=null,this.moved=!1,this.seeking=!1,this.config=e,this.media=t,this.fragmentTracker=n,this.hls=i}destroy(){this.media=null,this.hls=this.fragmentTracker=null}poll(e,t){const{config:n,media:i,stalled:r}=this;if(i===null)return;const{currentTime:o,seeking:l}=i,d=this.seeking&&!l,c=!this.seeking&&l;if(this.seeking=l,o!==e){if(this.moved=!0,l||(this.nudgeRetry=0),r!==null){if(this.stallReported){const y=self.performance.now()-r;L.warn(`playback not stuck anymore @${o}, after ${Math.round(y)}ms`),this.stallReported=!1}this.stalled=null}return}if(c||d){this.stalled=null;return}if(i.paused&&!l||i.ended||i.playbackRate===0||!Fe.getBuffered(i).length){this.nudgeRetry=0;return}const u=Fe.bufferInfo(i,o,0),m=u.nextStart||0;if(l){const y=u.len>Mi,b=!m||t&&t.start<=o||m-o>Mi&&!this.fragmentTracker.getPartialFragment(o);if(y||b)return;this.moved=!1}if(!this.moved&&this.stalled!==null){var f;if(!(u.len>0)&&!m)return;const b=Math.max(m,u.start||0)-o,w=this.hls.levels?this.hls.levels[this.hls.currentLevel]:null,C=(w==null||(f=w.details)==null?void 0:f.live)?w.details.targetduration*2:Mi,E=this.fragmentTracker.getPartialFragment(o);if(b>0&&(b<=C||E)){i.paused||this._trySkipBufferHole(E);return}}const p=self.performance.now();if(r===null){this.stalled=p;return}const h=p-r;if(!l&&h>=GO&&(this._reportStall(u),!this.media))return;const g=Fe.bufferInfo(i,o,n.maxBufferHole);this._tryFixBufferStall(g,h)}_tryFixBufferStall(e,t){const{config:n,fragmentTracker:i,media:r}=this;if(r===null)return;const o=r.currentTime,l=i.getPartialFragment(o);l&&(this._trySkipBufferHole(l)||!this.media)||(e.len>n.maxBufferHole||e.nextStart&&e.nextStart-o<n.maxBufferHole)&&t>n.highBufferWatchdogPeriod*1e3&&(L.warn("Trying to nudge playhead over buffer-hole"),this.stalled=null,this._tryNudgeBuffer())}_reportStall(e){const{hls:t,media:n,stallReported:i}=this;if(!i&&n){this.stallReported=!0;const r=new Error(`Playback stalling at @${n.currentTime} due to low buffer (${JSON.stringify(e)})`);L.warn(r.message),t.trigger(S.ERROR,{type:ge.MEDIA_ERROR,details:N.BUFFER_STALLED_ERROR,fatal:!1,error:r,buffer:e.len})}}_trySkipBufferHole(e){const{config:t,hls:n,media:i}=this;if(i===null)return 0;const r=i.currentTime,o=Fe.bufferInfo(i,r,0),l=r<o.start?o.start:o.nextStart;if(l){const d=o.len<=t.maxBufferHole,c=o.len>0&&o.len<1&&i.readyState<3,u=l-r;if(u>0&&(d||c)){if(u>t.maxBufferHole){const{fragmentTracker:f}=this;let p=!1;if(r===0){const h=f.getAppendedFrag(0,le.MAIN);h&&l<h.end&&(p=!0)}if(!p){const h=e||f.getAppendedFrag(r,le.MAIN);if(h){let g=!1,y=h.end;for(;y<l;){const b=f.getPartialFragment(y);if(b)y+=b.duration;else{g=!0;break}}if(g)return 0}}}const m=Math.max(l+HO,r+jO);if(L.warn(`skipping hole, adjusting currentTime from ${r} to ${m}`),this.moved=!0,this.stalled=null,i.currentTime=m,e&&!e.gap){const f=new Error(`fragment loaded with buffer holes, seeking from ${r} to ${m}`);n.trigger(S.ERROR,{type:ge.MEDIA_ERROR,details:N.BUFFER_SEEK_OVER_HOLE,fatal:!1,error:f,reason:f.message,frag:e})}return m}}return 0}_tryNudgeBuffer(){const{config:e,hls:t,media:n,nudgeRetry:i}=this;if(n===null)return;const r=n.currentTime;if(this.nudgeRetry++,i<e.nudgeMaxRetry){const o=r+(i+1)*e.nudgeOffset,l=new Error(`Nudging 'currentTime' from ${r} to ${o}`);L.warn(l.message),n.currentTime=o,t.trigger(S.ERROR,{type:ge.MEDIA_ERROR,details:N.BUFFER_NUDGE_ON_STALL,error:l,fatal:!1})}else{const o=new Error(`Playhead still not moving while enough data buffered @${r} after ${e.nudgeMaxRetry} nudges`);L.error(o.message),t.trigger(S.ERROR,{type:ge.MEDIA_ERROR,details:N.BUFFER_STALLED_ERROR,error:o,fatal:!0})}}}const KO=100;class qO extends vl{constructor(e,t,n){super(e,t,n,"[stream-controller]",le.MAIN),this.audioCodecSwap=!1,this.gapController=null,this.level=-1,this._forceStartLoad=!1,this.altAudio=!1,this.audioOnly=!1,this.fragPlaying=null,this.onvplaying=null,this.onvseeked=null,this.fragLastKbps=0,this.couldBacktrack=!1,this.backtrackFragment=null,this.audioCodecSwitch=!1,this.videoBuffer=null,this._registerListeners()}_registerListeners(){const{hls:e}=this;e.on(S.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(S.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(S.MANIFEST_LOADING,this.onManifestLoading,this),e.on(S.MANIFEST_PARSED,this.onManifestParsed,this),e.on(S.LEVEL_LOADING,this.onLevelLoading,this),e.on(S.LEVEL_LOADED,this.onLevelLoaded,this),e.on(S.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),e.on(S.ERROR,this.onError,this),e.on(S.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.on(S.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),e.on(S.BUFFER_CREATED,this.onBufferCreated,this),e.on(S.BUFFER_FLUSHED,this.onBufferFlushed,this),e.on(S.LEVELS_UPDATED,this.onLevelsUpdated,this),e.on(S.FRAG_BUFFERED,this.onFragBuffered,this)}_unregisterListeners(){const{hls:e}=this;e.off(S.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(S.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(S.MANIFEST_LOADING,this.onManifestLoading,this),e.off(S.MANIFEST_PARSED,this.onManifestParsed,this),e.off(S.LEVEL_LOADED,this.onLevelLoaded,this),e.off(S.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),e.off(S.ERROR,this.onError,this),e.off(S.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.off(S.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),e.off(S.BUFFER_CREATED,this.onBufferCreated,this),e.off(S.BUFFER_FLUSHED,this.onBufferFlushed,this),e.off(S.LEVELS_UPDATED,this.onLevelsUpdated,this),e.off(S.FRAG_BUFFERED,this.onFragBuffered,this)}onHandlerDestroying(){this._unregisterListeners(),super.onHandlerDestroying()}startLoad(e){if(this.levels){const{lastCurrentTime:t,hls:n}=this;if(this.stopLoad(),this.setInterval(KO),this.level=-1,!this.startFragRequested){let i=n.startLevel;i===-1&&(n.config.testBandwidth&&this.levels.length>1?(i=0,this.bitrateTest=!0):i=n.firstAutoLevel),n.nextLoadLevel=i,this.level=n.loadLevel,this.loadedmetadata=!1}t>0&&e===-1&&(this.log(`Override startPosition with lastCurrentTime @${t.toFixed(3)}`),e=t),this.state=V.IDLE,this.nextLoadPosition=this.startPosition=this.lastCurrentTime=e,this.tick()}else this._forceStartLoad=!0,this.state=V.STOPPED}stopLoad(){this._forceStartLoad=!1,super.stopLoad()}doTick(){switch(this.state){case V.WAITING_LEVEL:{const{levels:t,level:n}=this,i=t==null?void 0:t[n],r=i==null?void 0:i.details;if(r&&(!r.live||this.levelLastLoaded===i)){if(this.waitForCdnTuneIn(r))break;this.state=V.IDLE;break}else if(this.hls.nextLoadLevel!==this.level){this.state=V.IDLE;break}break}case V.FRAG_LOADING_WAITING_RETRY:{var e;const t=self.performance.now(),n=this.retryDate;if(!n||t>=n||(e=this.media)!=null&&e.seeking){const{levels:i,level:r}=this,o=i==null?void 0:i[r];this.resetStartWhenNotLoaded(o||null),this.state=V.IDLE}}break}this.state===V.IDLE&&this.doTickIdle(),this.onTickEnd()}onTickEnd(){super.onTickEnd(),this.checkBuffer(),this.checkFragmentChanged()}doTickIdle(){const{hls:e,levelLastLoaded:t,levels:n,media:i}=this;if(t===null||!i&&(this.startFragRequested||!e.config.startFragPrefetch)||this.altAudio&&this.audioOnly)return;const r=this.buffering?e.nextLoadLevel:e.loadLevel;if(!(n!=null&&n[r]))return;const o=n[r],l=this.getMainFwdBufferInfo();if(l===null)return;const d=this.getLevelDetails();if(d&&this._streamEnded(l,d)){const g={};this.altAudio&&(g.type="video"),this.hls.trigger(S.BUFFER_EOS,g),this.state=V.ENDED;return}if(!this.buffering)return;e.loadLevel!==r&&e.manualLevel===-1&&this.log(`Adapting to level ${r} from level ${this.level}`),this.level=e.nextLoadLevel=r;const c=o.details;if(!c||this.state===V.WAITING_LEVEL||c.live&&this.levelLastLoaded!==o){this.level=r,this.state=V.WAITING_LEVEL;return}const u=l.len,m=this.getMaxBufferLength(o.maxBitrate);if(u>=m)return;this.backtrackFragment&&this.backtrackFragment.start>l.end&&(this.backtrackFragment=null);const f=this.backtrackFragment?this.backtrackFragment.start:l.end;let p=this.getNextFragment(f,c);if(this.couldBacktrack&&!this.fragPrevious&&p&&p.sn!=="initSegment"&&this.fragmentTracker.getState(p)!==at.OK){var h;const y=((h=this.backtrackFragment)!=null?h:p).sn-c.startSN,b=c.fragments[y-1];b&&p.cc===b.cc&&(p=b,this.fragmentTracker.removeFragment(b))}else this.backtrackFragment&&l.len&&(this.backtrackFragment=null);if(p&&this.isLoopLoading(p,f)){if(!p.gap){const y=this.audioOnly&&!this.altAudio?Pe.AUDIO:Pe.VIDEO,b=(y===Pe.VIDEO?this.videoBuffer:this.mediaBuffer)||this.media;b&&this.afterBufferFlushed(b,y,le.MAIN)}p=this.getNextFragmentLoopLoading(p,c,l,le.MAIN,m)}p&&(p.initSegment&&!p.initSegment.data&&!this.bitrateTest&&(p=p.initSegment),this.loadFragment(p,o,f))}loadFragment(e,t,n){const i=this.fragmentTracker.getState(e);this.fragCurrent=e,i===at.NOT_LOADED||i===at.PARTIAL?e.sn==="initSegment"?this._loadInitSegment(e,t):this.bitrateTest?(this.log(`Fragment ${e.sn} of level ${e.level} is being downloaded to test bitrate and will not be buffered`),this._loadBitrateTestFrag(e,t)):(this.startFragRequested=!0,super.loadFragment(e,t,n)):this.clearTrackerIfNeeded(e)}getBufferedFrag(e){return this.fragmentTracker.getBufferedFrag(e,le.MAIN)}followingBufferedFrag(e){return e?this.getBufferedFrag(e.end+.5):null}immediateLevelSwitch(){this.abortCurrentFrag(),this.flushMainBuffer(0,Number.POSITIVE_INFINITY)}nextLevelSwitch(){const{levels:e,media:t}=this;if(t!=null&&t.readyState){let n;const i=this.getAppendedFrag(t.currentTime);i&&i.start>1&&this.flushMainBuffer(0,i.start-1);const r=this.getLevelDetails();if(r!=null&&r.live){const l=this.getMainFwdBufferInfo();if(!l||l.len<r.targetduration*2)return}if(!t.paused&&e){const l=this.hls.nextLoadLevel,d=e[l],c=this.fragLastKbps;c&&this.fragCurrent?n=this.fragCurrent.duration*d.maxBitrate/(1e3*c)+1:n=0}else n=0;const o=this.getBufferedFrag(t.currentTime+n);if(o){const l=this.followingBufferedFrag(o);if(l){this.abortCurrentFrag();const d=l.maxStartPTS?l.maxStartPTS:l.start,c=l.duration,u=Math.max(o.end,d+Math.min(Math.max(c-this.config.maxFragLookUpTolerance,c*(this.couldBacktrack?.5:.125)),c*(this.couldBacktrack?.75:.25)));this.flushMainBuffer(u,Number.POSITIVE_INFINITY)}}}}abortCurrentFrag(){const e=this.fragCurrent;switch(this.fragCurrent=null,this.backtrackFragment=null,e&&(e.abortRequests(),this.fragmentTracker.removeFragment(e)),this.state){case V.KEY_LOADING:case V.FRAG_LOADING:case V.FRAG_LOADING_WAITING_RETRY:case V.PARSING:case V.PARSED:this.state=V.IDLE;break}this.nextLoadPosition=this.getLoadPosition()}flushMainBuffer(e,t){super.flushMainBuffer(e,t,this.altAudio?"video":null)}onMediaAttached(e,t){super.onMediaAttached(e,t);const n=t.media;this.onvplaying=this.onMediaPlaying.bind(this),this.onvseeked=this.onMediaSeeked.bind(this),n.addEventListener("playing",this.onvplaying),n.addEventListener("seeked",this.onvseeked),this.gapController=new WO(this.config,n,this.fragmentTracker,this.hls)}onMediaDetaching(){const{media:e}=this;e&&this.onvplaying&&this.onvseeked&&(e.removeEventListener("playing",this.onvplaying),e.removeEventListener("seeked",this.onvseeked),this.onvplaying=this.onvseeked=null,this.videoBuffer=null),this.fragPlaying=null,this.gapController&&(this.gapController.destroy(),this.gapController=null),super.onMediaDetaching()}onMediaPlaying(){this.tick()}onMediaSeeked(){const e=this.media,t=e?e.currentTime:null;ae(t)&&this.log(`Media seeked to ${t.toFixed(3)}`);const n=this.getMainFwdBufferInfo();if(n===null||n.len===0){this.warn(`Main forward buffer length on "seeked" event ${n?n.len:"empty"})`);return}this.tick()}onManifestLoading(){this.log("Trigger BUFFER_RESET"),this.hls.trigger(S.BUFFER_RESET,void 0),this.fragmentTracker.removeAllFragments(),this.couldBacktrack=!1,this.startPosition=this.lastCurrentTime=this.fragLastKbps=0,this.levels=this.fragPlaying=this.backtrackFragment=this.levelLastLoaded=null,this.altAudio=this.audioOnly=this.startFragRequested=!1}onManifestParsed(e,t){let n=!1,i=!1;t.levels.forEach(r=>{const o=r.audioCodec;o&&(n=n||o.indexOf("mp4a.40.2")!==-1,i=i||o.indexOf("mp4a.40.5")!==-1)}),this.audioCodecSwitch=n&&i&&!zO(),this.audioCodecSwitch&&this.log("Both AAC/HE-AAC audio found in levels; declaring level codec as HE-AAC"),this.levels=t.levels,this.startFragRequested=!1}onLevelLoading(e,t){const{levels:n}=this;if(!n||this.state!==V.IDLE)return;const i=n[t.level];(!i.details||i.details.live&&this.levelLastLoaded!==i||this.waitForCdnTuneIn(i.details))&&(this.state=V.WAITING_LEVEL)}onLevelLoaded(e,t){var n;const{levels:i}=this,r=t.level,o=t.details,l=o.totalduration;if(!i){this.warn(`Levels were reset while loading level ${r}`);return}this.log(`Level ${r} loaded [${o.startSN},${o.endSN}]${o.lastPartSn?`[part-${o.lastPartSn}-${o.lastPartIndex}]`:""}, cc [${o.startCC}, ${o.endCC}] duration:${l}`);const d=i[r],c=this.fragCurrent;c&&(this.state===V.FRAG_LOADING||this.state===V.FRAG_LOADING_WAITING_RETRY)&&c.level!==t.level&&c.loader&&this.abortCurrentFrag();let u=0;if(o.live||(n=d.details)!=null&&n.live){var m;if(this.checkLiveUpdate(o),o.deltaUpdateFailed)return;u=this.alignPlaylists(o,d.details,(m=this.levelLastLoaded)==null?void 0:m.details)}if(d.details=o,this.levelLastLoaded=d,this.hls.trigger(S.LEVEL_UPDATED,{details:o,level:r}),this.state===V.WAITING_LEVEL){if(this.waitForCdnTuneIn(o))return;this.state=V.IDLE}this.startFragRequested?o.live&&this.synchronizeToLiveEdge(o):this.setStartPosition(o,u),this.tick()}_handleFragmentLoadProgress(e){var t;const{frag:n,part:i,payload:r}=e,{levels:o}=this;if(!o){this.warn(`Levels were reset while fragment load was in progress. Fragment ${n.sn} of level ${n.level} will not be buffered`);return}const l=o[n.level],d=l.details;if(!d){this.warn(`Dropping fragment ${n.sn} of level ${n.level} after level details were reset`),this.fragmentTracker.removeFragment(n);return}const c=l.videoCodec,u=d.PTSKnown||!d.live,m=(t=n.initSegment)==null?void 0:t.data,f=this._getAudioCodec(l),p=this.transmuxer=this.transmuxer||new $g(this.hls,le.MAIN,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)),h=i?i.index:-1,g=h!==-1,y=new Bl(n.level,n.sn,n.stats.chunkCount,r.byteLength,h,g),b=this.initPTS[n.cc];p.push(r,m,f,c,n,i,d.totalduration,u,y,b)}onAudioTrackSwitching(e,t){const n=this.altAudio;if(!!!t.url){if(this.mediaBuffer!==this.media){this.log("Switching on main audio, use media.buffered to schedule main fragment loading"),this.mediaBuffer=this.media;const o=this.fragCurrent;o&&(this.log("Switching to main audio track, cancel main fragment load"),o.abortRequests(),this.fragmentTracker.removeFragment(o)),this.resetTransmuxer(),this.resetLoadingState()}else this.audioOnly&&this.resetTransmuxer();const r=this.hls;n&&(r.trigger(S.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:null}),this.fragmentTracker.removeAllFragments()),r.trigger(S.AUDIO_TRACK_SWITCHED,t)}}onAudioTrackSwitched(e,t){const n=t.id,i=!!this.hls.audioTracks[n].url;if(i){const r=this.videoBuffer;r&&this.mediaBuffer!==r&&(this.log("Switching on alternate audio, use video.buffered to schedule main fragment loading"),this.mediaBuffer=r)}this.altAudio=i,this.tick()}onBufferCreated(e,t){const n=t.tracks;let i,r,o=!1;for(const l in n){const d=n[l];if(d.id==="main"){if(r=l,i=d,l==="video"){const c=n[l];c&&(this.videoBuffer=c.buffer)}}else o=!0}o&&i?(this.log(`Alternate track found, use ${r}.buffered to schedule main fragment loading`),this.mediaBuffer=i.buffer):this.mediaBuffer=this.media}onFragBuffered(e,t){const{frag:n,part:i}=t;if(n&&n.type!==le.MAIN)return;if(this.fragContextChanged(n)){this.warn(`Fragment ${n.sn}${i?" p: "+i.index:""} of level ${n.level} finished buffering, but was aborted. state: ${this.state}`),this.state===V.PARSED&&(this.state=V.IDLE);return}const r=i?i.stats:n.stats;this.fragLastKbps=Math.round(8*r.total/(r.buffering.end-r.loading.first)),n.sn!=="initSegment"&&(this.fragPrevious=n),this.fragBufferedComplete(n,i)}onError(e,t){var n;if(t.fatal){this.state=V.ERROR;return}switch(t.details){case N.FRAG_GAP:case N.FRAG_PARSING_ERROR:case N.FRAG_DECRYPT_ERROR:case N.FRAG_LOAD_ERROR:case N.FRAG_LOAD_TIMEOUT:case N.KEY_LOAD_ERROR:case N.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(le.MAIN,t);break;case N.LEVEL_LOAD_ERROR:case N.LEVEL_LOAD_TIMEOUT:case N.LEVEL_PARSING_ERROR:!t.levelRetry&&this.state===V.WAITING_LEVEL&&((n=t.context)==null?void 0:n.type)===Ae.LEVEL&&(this.state=V.IDLE);break;case N.BUFFER_APPEND_ERROR:case N.BUFFER_FULL_ERROR:if(!t.parent||t.parent!=="main")return;if(t.details===N.BUFFER_APPEND_ERROR){this.resetLoadingState();return}this.reduceLengthAndFlushBuffer(t)&&this.flushMainBuffer(0,Number.POSITIVE_INFINITY);break;case N.INTERNAL_EXCEPTION:this.recoverWorkerError(t);break}}checkBuffer(){const{media:e,gapController:t}=this;if(!(!e||!t||!e.readyState)){if(this.loadedmetadata||!Fe.getBuffered(e).length){const n=this.state!==V.IDLE?this.fragCurrent:null;t.poll(this.lastCurrentTime,n)}this.lastCurrentTime=e.currentTime}}onFragLoadEmergencyAborted(){this.state=V.IDLE,this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.startPosition),this.tickImmediate()}onBufferFlushed(e,{type:t}){if(t!==Pe.AUDIO||this.audioOnly&&!this.altAudio){const n=(t===Pe.VIDEO?this.videoBuffer:this.mediaBuffer)||this.media;this.afterBufferFlushed(n,t,le.MAIN),this.tick()}}onLevelsUpdated(e,t){this.level>-1&&this.fragCurrent&&(this.level=this.fragCurrent.level),this.levels=t.levels}swapAudioCodec(){this.audioCodecSwap=!this.audioCodecSwap}seekToStartPos(){const{media:e}=this;if(!e)return;const t=e.currentTime;let n=this.startPosition;if(n>=0&&t<n){if(e.seeking){this.log(`could not seek to ${n}, already seeking at ${t}`);return}const i=Fe.getBuffered(e),o=(i.length?i.start(0):0)-n;o>0&&(o<this.config.maxBufferHole||o<this.config.maxFragLookUpTolerance)&&(this.log(`adjusting start position by ${o} to match buffer start`),n+=o,this.startPosition=n),this.log(`seek to target start position ${n} from current time ${t}`),e.currentTime=n}}_getAudioCodec(e){let t=this.config.defaultAudioCodec||e.audioCodec;return this.audioCodecSwap&&t&&(this.log("Swapping audio codec"),t.indexOf("mp4a.40.5")!==-1?t="mp4a.40.2":t="mp4a.40.5"),t}_loadBitrateTestFrag(e,t){e.bitrateTest=!0,this._doFragLoad(e,t).then(n=>{const{hls:i}=this;if(!n||this.fragContextChanged(e))return;t.fragmentError=0,this.state=V.IDLE,this.startFragRequested=!1,this.bitrateTest=!1;const r=e.stats;r.parsing.start=r.parsing.end=r.buffering.start=r.buffering.end=self.performance.now(),i.trigger(S.FRAG_LOADED,n),e.bitrateTest=!1})}_handleTransmuxComplete(e){var t;const n="main",{hls:i}=this,{remuxResult:r,chunkMeta:o}=e,l=this.getCurrentContext(o);if(!l){this.resetWhenMissingContext(o);return}const{frag:d,part:c,level:u}=l,{video:m,text:f,id3:p,initSegment:h}=r,{details:g}=u,y=this.altAudio?void 0:r.audio;if(this.fragContextChanged(d)){this.fragmentTracker.removeFragment(d);return}if(this.state=V.PARSING,h){if(h!=null&&h.tracks){const _=d.initSegment||d;this._bufferInitSegment(u,h.tracks,_,o),i.trigger(S.FRAG_PARSING_INIT_SEGMENT,{frag:_,id:n,tracks:h.tracks})}const b=h.initPTS,w=h.timescale;ae(b)&&(this.initPTS[d.cc]={baseTime:b,timescale:w},i.trigger(S.INIT_PTS_FOUND,{frag:d,id:n,initPTS:b,timescale:w}))}if(m&&g&&d.sn!=="initSegment"){const b=g.fragments[d.sn-1-g.startSN],w=d.sn===g.startSN,_=!b||d.cc>b.cc;if(r.independent!==!1){const{startPTS:C,endPTS:E,startDTS:A,endDTS:T}=m;if(c)c.elementaryStreams[m.type]={startPTS:C,endPTS:E,startDTS:A,endDTS:T};else if(m.firstKeyFrame&&m.independent&&o.id===1&&!_&&(this.couldBacktrack=!0),m.dropped&&m.independent){const R=this.getMainFwdBufferInfo(),I=(R?R.end:this.getLoadPosition())+this.config.maxBufferHole,v=m.firstKeyFramePTS?m.firstKeyFramePTS:C;if(!w&&I<v-this.config.maxBufferHole&&!_){this.backtrack(d);return}else _&&(d.gap=!0);d.setElementaryStreamInfo(m.type,d.start,E,d.start,T,!0)}else w&&C>Mi&&(d.gap=!0);d.setElementaryStreamInfo(m.type,C,E,A,T),this.backtrackFragment&&(this.backtrackFragment=d),this.bufferFragmentData(m,d,c,o,w||_)}else if(w||_)d.gap=!0;else{this.backtrack(d);return}}if(y){const{startPTS:b,endPTS:w,startDTS:_,endDTS:C}=y;c&&(c.elementaryStreams[Pe.AUDIO]={startPTS:b,endPTS:w,startDTS:_,endDTS:C}),d.setElementaryStreamInfo(Pe.AUDIO,b,w,_,C),this.bufferFragmentData(y,d,c,o)}if(g&&p!=null&&(t=p.samples)!=null&&t.length){const b={id:n,frag:d,details:g,samples:p.samples};i.trigger(S.FRAG_PARSING_METADATA,b)}if(g&&f){const b={id:n,frag:d,details:g,samples:f.samples};i.trigger(S.FRAG_PARSING_USERDATA,b)}}_bufferInitSegment(e,t,n,i){if(this.state!==V.PARSING)return;this.audioOnly=!!t.audio&&!t.video,this.altAudio&&!this.audioOnly&&delete t.audio;const{audio:r,video:o,audiovideo:l}=t;if(r){let d=e.audioCodec;const c=navigator.userAgent.toLowerCase();if(this.audioCodecSwitch){d&&(d.indexOf("mp4a.40.5")!==-1?d="mp4a.40.2":d="mp4a.40.5");const u=r.metadata;u&&"channelCount"in u&&(u.channelCount||1)!==1&&c.indexOf("firefox")===-1&&(d="mp4a.40.5")}d&&d.indexOf("mp4a.40.5")!==-1&&c.indexOf("android")!==-1&&r.container!=="audio/mpeg"&&(d="mp4a.40.2",this.log(`Android: force audio codec to ${d}`)),e.audioCodec&&e.audioCodec!==d&&this.log(`Swapping manifest audio codec "${e.audioCodec}" for "${d}"`),r.levelCodec=d,r.id="main",this.log(`Init audio buffer, container:${r.container}, codecs[selected/level/parsed]=[${d||""}/${e.audioCodec||""}/${r.codec}]`)}o&&(o.levelCodec=e.videoCodec,o.id="main",this.log(`Init video buffer, container:${o.container}, codecs[level/parsed]=[${e.videoCodec||""}/${o.codec}]`)),l&&this.log(`Init audiovideo buffer, container:${l.container}, codecs[level/parsed]=[${e.codecs}/${l.codec}]`),this.hls.trigger(S.BUFFER_CODECS,t),Object.keys(t).forEach(d=>{const u=t[d].initSegment;u!=null&&u.byteLength&&this.hls.trigger(S.BUFFER_APPENDING,{type:d,data:u,frag:n,part:null,chunkMeta:i,parent:n.type})}),this.tickImmediate()}getMainFwdBufferInfo(){return this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:this.media,le.MAIN)}backtrack(e){this.couldBacktrack=!0,this.backtrackFragment=e,this.resetTransmuxer(),this.flushBufferGap(e),this.fragmentTracker.removeFragment(e),this.fragPrevious=null,this.nextLoadPosition=e.start,this.state=V.IDLE}checkFragmentChanged(){const e=this.media;let t=null;if(e&&e.readyState>1&&e.seeking===!1){const n=e.currentTime;if(Fe.isBuffered(e,n)?t=this.getAppendedFrag(n):Fe.isBuffered(e,n+.1)&&(t=this.getAppendedFrag(n+.1)),t){this.backtrackFragment=null;const i=this.fragPlaying,r=t.level;(!i||t.sn!==i.sn||i.level!==r)&&(this.fragPlaying=t,this.hls.trigger(S.FRAG_CHANGED,{frag:t}),(!i||i.level!==r)&&this.hls.trigger(S.LEVEL_SWITCHED,{level:r}))}}}get nextLevel(){const e=this.nextBufferedFrag;return e?e.level:-1}get currentFrag(){const e=this.media;return e?this.fragPlaying||this.getAppendedFrag(e.currentTime):null}get currentProgramDateTime(){const e=this.media;if(e){const t=e.currentTime,n=this.currentFrag;if(n&&ae(t)&&ae(n.programDateTime)){const i=n.programDateTime+(t-n.start)*1e3;return new Date(i)}}return null}get currentLevel(){const e=this.currentFrag;return e?e.level:-1}get nextBufferedFrag(){const e=this.currentFrag;return e?this.followingBufferedFrag(e):null}get forceStartLoad(){return this._forceStartLoad}}class ps{static get version(){return"1.5.19"}static isMSESupported(){return Ep()}static isSupported(){return UO()}static getMediaSource(){return Ns()}static get Events(){return S}static get ErrorTypes(){return ge}static get ErrorDetails(){return N}static get DefaultConfig(){return ps.defaultConfig?ps.defaultConfig:Sp}static set DefaultConfig(e){ps.defaultConfig=e}constructor(e={}){this.config=void 0,this.userConfig=void 0,this.coreComponents=void 0,this.networkControllers=void 0,this.started=!1,this._emitter=new Ul,this._autoLevelCapping=-1,this._maxHdcpLevel=null,this.abrController=void 0,this.bufferController=void 0,this.capLevelController=void 0,this.latencyController=void 0,this.levelController=void 0,this.streamController=void 0,this.audioTrackController=void 0,this.subtitleTrackController=void 0,this.emeController=void 0,this.cmcdController=void 0,this._media=null,this.url=null,this.triggeringException=void 0,O3(e.debug||!1,"Hls instance");const t=this.config=FO(ps.DefaultConfig,e);this.userConfig=e,t.progressive&&MO(t);const{abrController:n,bufferController:i,capLevelController:r,errorController:o,fpsController:l}=t,d=new o(this),c=this.abrController=new n(this),u=this.bufferController=new i(this),m=this.capLevelController=new r(this),f=new l(this),p=new BD(this),h=new PD(this),g=t.contentSteeringController,y=g?new g(this):null,b=this.levelController=new VO(this,y),w=new d6(this),_=new $O(this.config),C=this.streamController=new qO(this,w,_);m.setStreamController(C),f.setStreamController(C);const E=[p,b,C];y&&E.splice(1,0,y),this.networkControllers=E;const A=[c,u,m,f,h,w];this.audioTrackController=this.createController(t.audioTrackController,E);const T=t.audioStreamController;T&&E.push(new T(this,w,_)),this.subtitleTrackController=this.createController(t.subtitleTrackController,E);const R=t.subtitleStreamController;R&&E.push(new R(this,w,_)),this.createController(t.timelineController,A),_.emeController=this.emeController=this.createController(t.emeController,A),this.cmcdController=this.createController(t.cmcdController,A),this.latencyController=this.createController(OD,A),this.coreComponents=A,E.push(d);const I=d.onErrorOut;typeof I=="function"&&this.on(S.ERROR,I,d)}createController(e,t){if(e){const n=new e(this);return t&&t.push(n),n}return null}on(e,t,n=this){this._emitter.on(e,t,n)}once(e,t,n=this){this._emitter.once(e,t,n)}removeAllListeners(e){this._emitter.removeAllListeners(e)}off(e,t,n=this,i){this._emitter.off(e,t,n,i)}listeners(e){return this._emitter.listeners(e)}emit(e,t,n){return this._emitter.emit(e,t,n)}trigger(e,t){if(this.config.debug)return this.emit(e,e,t);try{return this.emit(e,e,t)}catch(n){if(L.error("An internal error happened while handling event "+e+'. Error message: "'+n.message+'". Here is a stacktrace:',n),!this.triggeringException){this.triggeringException=!0;const i=e===S.ERROR;this.trigger(S.ERROR,{type:ge.OTHER_ERROR,details:N.INTERNAL_EXCEPTION,fatal:i,event:e,error:n}),this.triggeringException=!1}}return!1}listenerCount(e){return this._emitter.listenerCount(e)}destroy(){L.log("destroy"),this.trigger(S.DESTROYING,void 0),this.detachMedia(),this.removeAllListeners(),this._autoLevelCapping=-1,this.url=null,this.networkControllers.forEach(t=>t.destroy()),this.networkControllers.length=0,this.coreComponents.forEach(t=>t.destroy()),this.coreComponents.length=0;const e=this.config;e.xhrSetup=e.fetchSetup=void 0,this.userConfig=null}attachMedia(e){L.log("attachMedia"),this._media=e,this.trigger(S.MEDIA_ATTACHING,{media:e})}detachMedia(){L.log("detachMedia"),this.trigger(S.MEDIA_DETACHING,void 0),this._media=null}loadSource(e){this.stopLoad();const t=this.media,n=this.url,i=this.url=al.buildAbsoluteURL(self.location.href,e,{alwaysNormalize:!0});this._autoLevelCapping=-1,this._maxHdcpLevel=null,L.log(`loadSource:${i}`),t&&n&&(n!==i||this.bufferController.hasSourceTypes())&&(this.detachMedia(),this.attachMedia(t)),this.trigger(S.MANIFEST_LOADING,{url:e})}startLoad(e=-1){L.log(`startLoad(${e})`),this.started=!0,this.resumeBuffering();for(let t=0;t<this.networkControllers.length&&(this.networkControllers[t].startLoad(e),!(!this.started||!this.networkControllers));t++);}stopLoad(){L.log("stopLoad"),this.started=!1;for(let e=0;e<this.networkControllers.length&&(this.networkControllers[e].stopLoad(),!(this.started||!this.networkControllers));e++);}resumeBuffering(){L.log("resume buffering"),this.networkControllers.forEach(e=>{e.resumeBuffering&&e.resumeBuffering()})}pauseBuffering(){L.log("pause buffering"),this.networkControllers.forEach(e=>{e.pauseBuffering&&e.pauseBuffering()})}swapAudioCodec(){L.log("swapAudioCodec"),this.streamController.swapAudioCodec()}recoverMediaError(){L.log("recoverMediaError");const e=this._media;this.detachMedia(),e&&this.attachMedia(e)}removeLevel(e){this.levelController.removeLevel(e)}get levels(){const e=this.levelController.levels;return e||[]}get currentLevel(){return this.streamController.currentLevel}set currentLevel(e){L.log(`set currentLevel:${e}`),this.levelController.manualLevel=e,this.streamController.immediateLevelSwitch()}get nextLevel(){return this.streamController.nextLevel}set nextLevel(e){L.log(`set nextLevel:${e}`),this.levelController.manualLevel=e,this.streamController.nextLevelSwitch()}get loadLevel(){return this.levelController.level}set loadLevel(e){L.log(`set loadLevel:${e}`),this.levelController.manualLevel=e}get nextLoadLevel(){return this.levelController.nextLoadLevel}set nextLoadLevel(e){this.levelController.nextLoadLevel=e}get firstLevel(){return Math.max(this.levelController.firstLevel,this.minAutoLevel)}set firstLevel(e){L.log(`set firstLevel:${e}`),this.levelController.firstLevel=e}get startLevel(){const e=this.levelController.startLevel;return e===-1&&this.abrController.forcedAutoLevel>-1?this.abrController.forcedAutoLevel:e}set startLevel(e){L.log(`set startLevel:${e}`),e!==-1&&(e=Math.max(e,this.minAutoLevel)),this.levelController.startLevel=e}get capLevelToPlayerSize(){return this.config.capLevelToPlayerSize}set capLevelToPlayerSize(e){const t=!!e;t!==this.config.capLevelToPlayerSize&&(t?this.capLevelController.startCapping():(this.capLevelController.stopCapping(),this.autoLevelCapping=-1,this.streamController.nextLevelSwitch()),this.config.capLevelToPlayerSize=t)}get autoLevelCapping(){return this._autoLevelCapping}get bandwidthEstimate(){const{bwEstimator:e}=this.abrController;return e?e.getEstimate():NaN}set bandwidthEstimate(e){this.abrController.resetEstimator(e)}get ttfbEstimate(){const{bwEstimator:e}=this.abrController;return e?e.getEstimateTTFB():NaN}set autoLevelCapping(e){this._autoLevelCapping!==e&&(L.log(`set autoLevelCapping:${e}`),this._autoLevelCapping=e,this.levelController.checkMaxAutoUpdated())}get maxHdcpLevel(){return this._maxHdcpLevel}set maxHdcpLevel(e){FD(e)&&this._maxHdcpLevel!==e&&(this._maxHdcpLevel=e,this.levelController.checkMaxAutoUpdated())}get autoLevelEnabled(){return this.levelController.manualLevel===-1}get manualLevel(){return this.levelController.manualLevel}get minAutoLevel(){const{levels:e,config:{minAutoBitrate:t}}=this;if(!e)return 0;const n=e.length;for(let i=0;i<n;i++)if(e[i].maxBitrate>=t)return i;return 0}get maxAutoLevel(){const{levels:e,autoLevelCapping:t,maxHdcpLevel:n}=this;let i;if(t===-1&&e!=null&&e.length?i=e.length-1:i=t,n)for(let r=i;r--;){const o=e[r].attrs["HDCP-LEVEL"];if(o&&o<=n)return r}return i}get firstAutoLevel(){return this.abrController.firstAutoLevel}get nextAutoLevel(){return this.abrController.nextAutoLevel}set nextAutoLevel(e){this.abrController.nextAutoLevel=e}get playingDate(){return this.streamController.currentProgramDateTime}get mainForwardBufferInfo(){return this.streamController.getMainFwdBufferInfo()}setAudioOption(e){var t;return(t=this.audioTrackController)==null?void 0:t.setAudioOption(e)}setSubtitleOption(e){var t;return(t=this.subtitleTrackController)==null||t.setSubtitleOption(e),null}get allAudioTracks(){const e=this.audioTrackController;return e?e.allAudioTracks:[]}get audioTracks(){const e=this.audioTrackController;return e?e.audioTracks:[]}get audioTrack(){const e=this.audioTrackController;return e?e.audioTrack:-1}set audioTrack(e){const t=this.audioTrackController;t&&(t.audioTrack=e)}get allSubtitleTracks(){const e=this.subtitleTrackController;return e?e.allSubtitleTracks:[]}get subtitleTracks(){const e=this.subtitleTrackController;return e?e.subtitleTracks:[]}get subtitleTrack(){const e=this.subtitleTrackController;return e?e.subtitleTrack:-1}get media(){return this._media}set subtitleTrack(e){const t=this.subtitleTrackController;t&&(t.subtitleTrack=e)}get subtitleDisplay(){const e=this.subtitleTrackController;return e?e.subtitleDisplay:!1}set subtitleDisplay(e){const t=this.subtitleTrackController;t&&(t.subtitleDisplay=e)}get lowLatencyMode(){return this.config.lowLatencyMode}set lowLatencyMode(e){this.config.lowLatencyMode=e}get liveSyncPosition(){return this.latencyController.liveSyncPosition}get latency(){return this.latencyController.latency}get maxLatency(){return this.latencyController.maxLatency}get targetLatency(){return this.latencyController.targetLatency}get drift(){return this.latencyController.drift}get forceStartLoad(){return this.streamController.forceStartLoad}}ps.defaultConfig=void 0;const YO=[(s=>(a.pushScopeId("data-v-d3c9a398"),s=s(),a.popScopeId(),s))(()=>a.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none"},[a.createElementVNode("path",{d:"M5 15L15 5",stroke:"white","stroke-width":"1.7","stroke-miterlimit":"10","stroke-linecap":"round","stroke-linejoin":"round"}),a.createElementVNode("path",{d:"M15 15L5 5",stroke:"white","stroke-width":"1.7","stroke-miterlimit":"10","stroke-linecap":"round","stroke-linejoin":"round"})],-1))],JO={class:"stories__content"},XO={class:"story-container-game"},ZO={class:"story-circle"},QO={class:"story-result"},e8={class:"stories__content__stories-bar"},t8={class:"stories__content__video"},s8={class:"stories__content__video__info__date"},n8={class:"stories__content__video__info__data"},a8=et({__name:"GameStories",props:{stories:{type:Array,default:()=>[]},startStoryIndex:{type:Number,default:0},isFirstGameStories:{type:Boolean,default:!1},isLastGameStories:{type:Boolean,default:!1}},emits:["close","last-story-index","swipe","video-play","video-next-back"],setup(s,{emit:e}){const t=s;a.useCssVars(Q=>({"559904cd":y.value,"57a9d8d4":b.value,"57d750a1":A.value}));const n=ih(),r=[{ids:[607,608],name:"Oportunidad de Gol"},{ids:[12,55],name:"Gol"},{ids:[54,35],name:"Autogol"},{ids:[14,52],name:"Tarjeta Amarilla"},{ids:[15,53],name:"Tarjeta Roja"},{ids:[466,477],name:"Penal Recibido"}].reduce((Q,Ee)=>(Ee.ids.forEach(Te=>{Q.set(Te,Ee.name)}),Q),new Map),o=a.ref(null),l=a.ref(null),d=a.ref([]),c=a.ref(0),u=a.ref(null),m=a.ref(0),f=a.ref(0),p=a.ref(0),h=a.ref(!1),g=a.ref(0),y=a.ref("auto"),b=a.ref("100%"),w=a.ref(null),_=a.ref(0),C=a.ref(null),E=a.ref(null),A=a.computed(()=>q()?"7vw":"16px"),T=a.computed(()=>d.value[c.value]),R=a.computed(()=>({"--icon-play":`url(${n}/icnplay1.svg)`}));function I(){l.value.muted=!1,l.value.play()}const v=a.computed(()=>!T.value.isHls&&["ios"].includes(io()));a.watch(()=>T.value,Q=>{Q&&j()}),a.watch(()=>t.stories,Q=>{if(Q.length){c.value=0,p.value=0;const Ee=Q.map(Te=>({...Te,progress:0,isHls:Te.url.includes(".m3u8"),date:`${Te.date.getDate()}, ${gh[Te.date.getMonth()]} ${Te.date.getFullYear()}`,data:`${r.get(Te.categoryId)} ${mL(Te.player.player_name)}`})).sort((Te,Ve)=>Te.startTime-Ve.startTime);t.startStoryIndex>0&&t.startStoryIndex<Ee.length-1&&(Ee.forEach((Te,Ve)=>{Ve<=t.startStoryIndex&&(Te.progress=100)}),c.value=t.startStoryIndex+1,p.value=c.value),d.value=[...Ee]}},{immediate:!0}),a.watch(()=>o.value,Q=>{Q&&M()},{flush:"post"}),a.watch(()=>u.value,Q=>{Q&&(hL()?(Q.addEventListener("touchstart",ce),Q.addEventListener("touchend",W)):(Q.addEventListener("mousedown",ce),Q.addEventListener("mouseup",W)))},{flush:"post"});function M(){l.value=new Hs("#video-plyr",{controls:[],autoplay:!0,playsinline:!0}),l.value.on("loadeddata",se(l.value)),l.value.on("timeupdate",re()),j(T.value),l.value.isDestroyed=!1}function j(){T.value.isHls?U(T.value):l.value&&(l.value.source={type:"video",sources:[{src:T.value.url,type:"video/mp4"}]})}function U(Q){if(o.value)if(ps.isSupported()){o.value.src=null;let Ee=new ps;Ee.loadSource(Q.url),Ee.attachMedia(o.value)}else l.value.source={type:"video",sources:[{src:Q.url,type:"video/mp4"}]}}function se(){const Q=document.querySelector(".plyr__video-wrapper");return Q&&(_.value=Q.getBoundingClientRect()),()=>{l.value.duration>0&&(l.value.currentTime=T.value.startTime||0,l.value.muted=!1,l.value.play(),e("video-play",T.value))}}function re(){return Ce(),()=>{T.value.currentTime=l.value.currentTime,T.value.progress=(l.value.currentTime-T.value.startTime)/T.value.duration*100,(l.value.currentTime-T.value.startTime)/T.value.duration*100===0?q()&&(h.value=!0):q()&&(h.value=!1),(l.value.currentTime-T.value.startTime)/T.value.duration*100<0?E.value&&!q()&&(E.value.style="display: none",b.value="100%"):E.value&&!q()&&(E.value.style="display: block",b.value="auto"),l.value.currentTime>=T.value.endTime&&(l.value.pause(),ie())}}function ie(Q=1){const Ee=c.value+Q;Ee<0?t.isFirstGameStories?l.value&&(l.value.currentTime=T.value.startTime):he("right",T.value):Ee===d.value.length?t.isLastGameStories?G():he("left",T.value):(c.value=Ee,Q===1&&(p.value=c.value))}function ue(){m.value>f.value?he("left",T.value):m.value<f.value?he("right",T.value):J()}function he(Q,Ee){e("last-story-index",p.value),e("swipe",{direction:Q,currentPlay:Ee})}function J(){const Q=window.innerWidth/2,Ee=m.value<Q,Te=T.value.progress;T.value.progress=Ee?0:100,l.value.pause(),e("video-next-back",{eventName:Ee?"stories_video_anterior":"stories_video_siguiente",currentPlay:{...T.value,progress:Te}}),ie(Ee?-1:1)}function G(){l.value.pause(),l.value.muted=!0,e("last-story-index",p.value),e("close",T.value)}function ce(Q){m.value=Q.changedTouches?Q.changedTouches[0].clientX:Q.clientX}function W(Q){f.value=Q.changedTouches?Q.changedTouches[0].clientX:Q.clientX,ue()}function q(){return/iPhone|iPad/i.test(navigator.userAgent)}function me(){window.scrollTo(0,100)}function ye(){if(window.scrollTo(0,100),io()=="android"){const Q=document.querySelector("#stories");Q.requestFullscreen(Q)}}function Ce(){if(window.ResizeObserver)w.value=new window.ResizeObserver(()=>{C.value&&_.value.height>0&&(C.value.getBoundingClientRect().height>610?y.value="auto":y.value="100dvh",C.value.getBoundingClientRect().height>610?b.value="100%":b.value="auto")}),w.value.observe(C.value);else throw new Error("Resize observer not supported!")}return a.onMounted(()=>{g.value=document.documentElement.scrollTop||document.body.scrollTop,window.scrollTo(0,100),q()?(window.addEventListener("resize",me),me()):(window.addEventListener("orientationchange",ye),ye()),setTimeout(()=>{Ce()},500)}),a.onBeforeUnmount(()=>{window.scrollTo(0,g.value),q()?window.removeEventListener("resize",me):(io()=="android"&&document.exitFullscreen(),window.removeEventListener("orientationchange",ye)),w.value&&(w.value.disconnect(),w.value=null)}),(Q,Ee)=>(a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass(["stories",q()?"stories-safe-areas-iphone":""]),id:"stories",ref_key:"eStories",ref:C,style:a.normalizeStyle(R.value)},[a.createElementVNode("div",{class:a.normalizeClass(["stories__close",q()?"stories-safe-areas-iphone":""]),onClick:G},YO,2),a.createElementVNode("div",JO,[a.createElementVNode("div",XO,[a.createElementVNode("div",ZO,[a.createElementVNode("div",{class:"circle-item-home",style:a.normalizeStyle(`background-image: url(${T.value.thumbnail.logoHomeTeam})`)},null,4),a.createElementVNode("div",{class:"circle-item-away",style:a.normalizeStyle(`background-image: url(${T.value.thumbnail.logoAwayTeam})`)},null,4)]),a.createElementVNode("div",QO,a.toDisplayString(T.value.header.label),1)]),a.createElementVNode("div",{ref_key:"overlay",ref:u,class:"stories__content__overlay"},null,512),a.createElementVNode("div",e8,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(d.value,(Te,Ve)=>(a.openBlock(),a.createElementBlock("div",{key:Ve,class:"stories__content__stories-bar__item"},[a.createElementVNode("div",{class:"stories__content__stories-bar__item__progress",style:a.normalizeStyle({width:`${Te.progress}%`})},null,4)]))),128))]),a.createElementVNode("div",t8,[a.createElementVNode("div",{class:"stories__content__video__info",ref_key:"videoInfo",ref:E},[a.createElementVNode("div",s8,a.toDisplayString(T.value.date),1),a.createElementVNode("div",n8,a.toDisplayString(T.value.data),1)],512),a.createElementVNode("video",{ref_key:"player",ref:o,id:"video-plyr",controls:"",preload:"auto","data-setup":"{}",playsinline:""},null,512)])]),v.value?(a.openBlock(),a.createElementBlock("button",{key:0,id:"btn_play_ios",style:a.normalizeStyle(h.value?"display:block":"display:none"),onClick:I},null,4)):a.createCommentVNode("",!0)],6))}},[["__scopeId","data-v-d3c9a398"]]),i8={playlist_id:"GPI_default2022-12-08T02:51:56.334+00:00-PI-0",last_played_index:0,group_id:"1",total_plays:55,playlist_type:"1",group_playlist_id:"GPI_default2022-12-08T02:51:56.334+00:00",user_id:"goltesting",created_at:"2023-03-30T15:42:36.402+00:00",playlist:[[136731235,"Liga MX","Apertura 2022",69929,"Aldrete Rodriguez, Adrian","Quintero Huitron, Daniel","Estadio Ol&iacute;mpico Universitario, Ciudad de M&eacute;xico.","1 - 0","1 - 0","2022-07-17T05:00:00.000Z","Universidad Nacional","https://golstatsimages.blob.core.windows.net/teams-80/11.png","Necaxa","https://golstatsimages.blob.core.windows.net/teams-80/205.png",12,"Goals",1259,1278,20,1266,"https://golstatsbets.blob.core.windows.net/video-player/69929_1.mp4"],[139820484,"Liga MX","Apertura 2022",70042,"Davila Zavala, Victor","Mejia, Oscar ","Estadio Nuevo Monumental, Rafaela.","3 - 1","1 - 0","2022-09-18T05:00:00.000Z","Leon","https://golstatsimages.blob.core.windows.net/teams-80/173.png","Queretaro","https://golstatsimages.blob.core.windows.net/teams-80/12.png",12,"Goals",1501,1524,24,1512,"https://golstatsbets.blob.core.windows.net/video-player/70042_1.mp4"],[139566427,"Liga MX","Apertura 2022",69989,"Zaldivar Caviedes, Angel","Guerrero Ramirez, Fernando","Estadio Akron, Zapopan.","1 - 4","1 - 0","2022-09-13T05:00:00.000Z","Guadalajara","https://golstatsimages.blob.core.windows.net/teams-80/1.png","Tigres de la UANL","https://golstatsimages.blob.core.windows.net/teams-80/16.png",12,"Goals",6569,6588,108,6576,"https://golstatsbets.blob.core.windows.net/video-player/69989_1.mp4"],[139441913,"Liga MX","Apertura 2022",70031,"Vega Rojas, Alexis","Quintero Huitron, Daniel","Estadio Akron, Zapopan.","1 - 0","1 - 0","2022-09-10T05:00:00.000Z","Guadalajara","https://golstatsimages.blob.core.windows.net/teams-80/1.png","Puebla FC","https://golstatsimages.blob.core.windows.net/teams-80/10.png",12,"Goals",6207,6237,103,6225,"https://golstatsbets.blob.core.windows.net/video-player/70031_1.mp4"],[139566063,"Liga MX","Apertura 2022",69989,"Guzman Palomeque, Nahuel","Guerrero Ramirez, Fernando","Estadio Akron, Zapopan.","1 - 4","0 - 0","2022-09-13T05:00:00.000Z","Guadalajara","https://golstatsimages.blob.core.windows.net/teams-80/1.png","Tigres de la UANL","https://golstatsimages.blob.core.windows.net/teams-80/16.png",39,"Saves",2554,2573,41,2561,"https://golstatsbets.blob.core.windows.net/video-player/69989_1.mp4"],[138276096,"Liga MX","Apertura 2022",69983,"Cortizo de la Piedra, Jordi","Guerrero Ramirez, Fernando","Estadio Cuauhtemoc, Puebla.","2 - 2","1 - 0","2022-08-16T05:00:00.000Z","Puebla FC","https://golstatsimages.blob.core.windows.net/teams-80/10.png","Necaxa","https://golstatsimages.blob.core.windows.net/teams-80/205.png",12,"Goals",5020,5046,83,5034,"https://golstatsbets.blob.core.windows.net/video-player/69983_1.mp4"],[139285589,"Liga MX","Apertura 2022",70021,"Cortizo de la Piedra, Jordi","Escobedo, Adonai","Estadio Cuauhtemoc, Puebla.","2 - 2","1 - 0","2022-09-07T05:00:00.000Z","Puebla FC","https://golstatsimages.blob.core.windows.net/teams-80/10.png","Pachuca","https://golstatsimages.blob.core.windows.net/teams-80/9.png",12,"Goals",1123,1152,18,1140,"https://golstatsbets.blob.core.windows.net/video-player/70021_1.mp4"],[139294964,"Liga MX","Apertura 2022",70022,"Cordova Reyes, Francisco","Ortiz Nava, Marco Antonio","Estadio Universitario, San Nicol&aacute;s de los Garza.","3 - 1","1 - 0","2022-09-07T05:00:00.000Z","Tigres de la UANL","https://golstatsimages.blob.core.windows.net/teams-80/16.png","Toluca","https://golstatsimages.blob.core.windows.net/teams-80/18.png",12,"Goals",2564,2583,41,2571,"https://golstatsbets.blob.core.windows.net/video-player/70022_1.mp4"],[137782451,"Liga MX","Apertura 2022",69968,"Orrantia Trevino, Carlos","Macias Romo, Oscar","Estadio TSM Corona, Torre&oacute;n.","4 - 0","1 - 0","2022-08-06T05:00:00.000Z","Santos Laguna","https://golstatsimages.blob.core.windows.net/teams-80/14.png","Cruz Azul","https://golstatsimages.blob.core.windows.net/teams-80/5.png",12,"Goals",4662,4693,77,4681,"https://golstatsbets.blob.core.windows.net/video-player/69968_1.mp4"],[136551560,"Liga MX","Apertura 2022",69924,"Sanchez Guerrero, Richard","Escobedo, Adonai","Estadio Azteca, Ciudad de M&eacute;xico.","1 - 0","1 - 0","2022-07-13T05:00:00.000Z","America","https://golstatsimages.blob.core.windows.net/teams-80/2.png","Toluca","https://golstatsimages.blob.core.windows.net/teams-80/18.png",12,"Goals",7032,7064,116,7052,"https://golstatsbets.blob.core.windows.net/video-player/69924_1.mp4"],[136391881,"Liga MX","Apertura 2022",69914,"Hurtado Herrera, Aviles","Ramos Palazuelos, Cesar","Estadio Hidalgo, Pachuca.","2 - 0","1 - 0","2022-07-04T05:00:00.000Z","Pachuca","https://golstatsimages.blob.core.windows.net/teams-80/9.png","Queretaro","https://golstatsimages.blob.core.windows.net/teams-80/12.png",12,"Goals",4903,4937,81,4925,"https://golstatsbets.blob.core.windows.net/video-player/69914_1.mp4"],[138158049,"Liga MX","Apertura 2022",69979,"Volpi, Tiago Luis","Hernandez Gomez, Fernando","Estadio Azteca, Ciudad de M&eacute;xico.","2 - 3","0 - 1","2022-08-14T05:00:00.000Z","Cruz Azul","https://golstatsimages.blob.core.windows.net/teams-80/5.png","Toluca","https://golstatsimages.blob.core.windows.net/teams-80/18.png",39,"Saves",7207,7226,119,7214,"https://golstatsbets.blob.core.windows.net/video-player/69979_1.mp4"],[138124884,"Liga MX","Apertura 2022",69978,"Vargas Gil, Camilo","Ortiz Nava, Marco Antonio","Default","1 - 1","0 - 0","2022-08-13T05:00:00.000Z","Guadalajara","https://golstatsimages.blob.core.windows.net/teams-80/1.png","Atlas","https://golstatsimages.blob.core.windows.net/teams-80/4.png",39,"Saves",6080,6099,100,6087,"https://golstatsbets.blob.core.windows.net/video-player/69978_1.mp4"],[139635463,"Liga MX","Apertura 2022",69950,"Fidalgo Fernandez, Alvaro","Hernandez Gomez, Fernando","Estadio Azteca, Ciudad de M&eacute;xico.","3 - 3","0 - 2","2022-09-14T05:00:00.000Z","America","https://golstatsimages.blob.core.windows.net/teams-80/2.png","Santos Laguna","https://golstatsimages.blob.core.windows.net/teams-80/14.png",10,"Assists",7096,7123,118,7111,"https://golstatsbets.blob.core.windows.net/video-player/69950_1.mp4"],[139769221,"Liga MX","Apertura 2022",70039,"Ochoa Magana, Guillermo","Escobedo, Adonai","Estadio Azteca, Ciudad de M&eacute;xico.","2 - 1","0 - 0","2022-09-17T05:00:00.000Z","America","https://golstatsimages.blob.core.windows.net/teams-80/2.png","Guadalajara","https://golstatsimages.blob.core.windows.net/teams-80/1.png",39,"Saves",4567,4586,76,4574,"https://golstatsbets.blob.core.windows.net/video-player/70039_1.mp4"],[139405626,"Liga MX","Apertura 2022",70028,"Acevedo Lopez, Carlos","Santander, Luis Enrique","Estadio La Corregidora, Quer&eacute;taro.","3 - 3","0 - 2","2022-09-10T05:00:00.000Z","Queretaro","https://golstatsimages.blob.core.windows.net/teams-80/12.png","Santos Laguna","https://golstatsimages.blob.core.windows.net/teams-80/14.png",55,"Goals",7452,7471,124,7459,"https://golstatsbets.blob.core.windows.net/video-player/70028_1.mp4"],[139410464,"Liga MX","Apertura 2022",70030,"Gonzalez Vela Alvizu, Julio","Hernandez Gomez, Fernando","Estadio Nemesio Diez, Toluca.","2 - 2","0 - 1","2022-09-10T05:00:00.000Z","Toluca","https://golstatsimages.blob.core.windows.net/teams-80/18.png","Universidad Nacional","https://golstatsimages.blob.core.windows.net/teams-80/11.png",55,"Goals",7467,7486,124,7474,"https://golstatsbets.blob.core.windows.net/video-player/70030_1.mp4"],[139902797,"Liga MX","Apertura 2022",70038,"Quinones Quinones, Julian","Ortiz Nava, Marco Antonio","Estadio BBVA Bancomer, Guadalupe","2 - 0","0 - 0","2022-09-17T05:00:00.000Z","Rayados de Monterrey","https://golstatsimages.blob.core.windows.net/teams-80/7.png","Atlas","https://golstatsimages.blob.core.windows.net/teams-80/4.png",702,"Con enfrentamiento",2334,2353,38,2341,"https://golstatsbets.blob.core.windows.net/video-player/70038_1.mp4"],[139771860,"Liga MX","Apertura 2022",70038,"Andrada, Esteban ","Ortiz Nava, Marco Antonio","Estadio BBVA Bancomer, Guadalupe","2 - 0","0 - 0","2022-09-17T05:00:00.000Z","Rayados de Monterrey","https://golstatsimages.blob.core.windows.net/teams-80/7.png","Atlas","https://golstatsimages.blob.core.windows.net/teams-80/4.png",39,"Saves",6859,6878,113,6866,"https://golstatsbets.blob.core.windows.net/video-player/70038_1.mp4"],[136392028,"Liga MX","Apertura 2022",69914,"Hurtado Herrera, Aviles","Ramos Palazuelos, Cesar","Estadio Hidalgo, Pachuca.","2 - 0","0 - 0","2022-07-04T05:00:00.000Z","Pachuca","https://golstatsimages.blob.core.windows.net/teams-80/9.png","Queretaro","https://golstatsimages.blob.core.windows.net/teams-80/12.png",607,"Oportunidad de gol",335,374,5,342,"https://golstatsbets.blob.core.windows.net/video-player/69914_1.mp4"],[136467302,"Liga MX","Apertura 2022",69909,"Jurado Roca, Sebastian","Mejia, Oscar ","Estadio Universitario, San Nicol&aacute;s de los Garza.","2 - 3","0 - 0","2022-07-02T05:00:00.000Z","Tigres de la UANL","https://golstatsimages.blob.core.windows.net/teams-80/16.png","Cruz Azul","https://golstatsimages.blob.core.windows.net/teams-80/5.png",39,"Saves",879,898,14,886,"https://golstatsbets.blob.core.windows.net/video-player/69909_1.mp4"],[138402354,"Liga MX","Apertura 2022",69990,"Beltran Cruz, Fernando","Mejia, Oscar ","Estadio Victoria, Aguascalientes.","0 - 4","0 - 1","2022-08-19T05:00:00.000Z","Necaxa","https://golstatsimages.blob.core.windows.net/teams-80/205.png","Guadalajara","https://golstatsimages.blob.core.windows.net/teams-80/1.png",12,"Goals",4517,4551,75,4539,"https://golstatsbets.blob.core.windows.net/video-player/69990_1.mp4"],[138157481,"Liga MX","Apertura 2022",69979,"Meneses Villarroel, Jean","Hernandez Gomez, Fernando","Estadio Azteca, Ciudad de M&eacute;xico.","2 - 3","0 - 1","2022-08-14T05:00:00.000Z","Cruz Azul","https://golstatsimages.blob.core.windows.net/teams-80/5.png","Toluca","https://golstatsimages.blob.core.windows.net/teams-80/18.png",12,"Goals",1900,1925,31,1913,"https://golstatsbets.blob.core.windows.net/video-player/69979_1.mp4"],[140106188,"Liga MX","Apertura 2022",69964,"Cortizo de la Piedra, Jordi","Escobedo, Adonai","Estadio Cuauhtemoc, Puebla.","2 - 1","1 - 0","2022-09-23T05:00:00.000Z","Puebla FC","https://golstatsimages.blob.core.windows.net/teams-80/10.png","Universidad Nacional","https://golstatsimages.blob.core.windows.net/teams-80/11.png",12,"Goals",461,484,7,472,"https://golstatsbets.blob.core.windows.net/video-player/69964_1.mp4"],[139839994,"Liga MX","Apertura 2022",70043,"Garcia Carpizo, Brian","Montano Robles, Diego","Estadio Caliente, Tijuana.","1 - 1","0 - 1","2022-09-18T05:00:00.000Z","Club Tijuana","https://golstatsimages.blob.core.windows.net/teams-80/17.png","Necaxa","https://golstatsimages.blob.core.windows.net/teams-80/205.png",12,"Goals",2112,2133,34,2121,"https://golstatsbets.blob.core.windows.net/video-player/70043_1.mp4"],[139403868,"Liga MX","Apertura 2022",70028,"Suarez, Leonardo Gabriel","Santander, Luis Enrique","Estadio La Corregidora, Quer&eacute;taro.","3 - 3","0 - 1","2022-09-10T05:00:00.000Z","Queretaro","https://golstatsimages.blob.core.windows.net/teams-80/12.png","Santos Laguna","https://golstatsimages.blob.core.windows.net/teams-80/14.png",12,"Goals",4296,4315,71,4303,"https://golstatsbets.blob.core.windows.net/video-player/70028_1.mp4"],[139371616,"Liga MX","Apertura 2022",70027,"Gallardo Vasconcelos, Jesus","Montano Robles, Diego","Estadio Olimpico Benito Juarez, Ciudad Juarez.","0 - 1","0 - 1","2022-09-09T05:00:00.000Z","FC Juarez","https://golstatsimages.blob.core.windows.net/teams-80/3014.png","Rayados de Monterrey","https://golstatsimages.blob.core.windows.net/teams-80/7.png",12,"Goals",5724,5750,94,5738,"https://golstatsbets.blob.core.windows.net/video-player/70027_1.mp4"],[139294028,"Liga MX","Apertura 2022",70022,"Thauvin, Florian","Ortiz Nava, Marco Antonio","Estadio Universitario, San Nicol&aacute;s de los Garza.","3 - 1","2 - 0","2022-09-07T05:00:00.000Z","Tigres de la UANL","https://golstatsimages.blob.core.windows.net/teams-80/16.png","Toluca","https://golstatsimages.blob.core.windows.net/teams-80/18.png",12,"Goals",6011,6030,99,6018,"https://golstatsbets.blob.core.windows.net/video-player/70022_1.mp4"],[137023432,"Liga MX","Apertura 2022",69939,"Gignac, Andre Pierre","Ortiz Nava, Marco Antonio","Estadio Universitario, San Nicol&aacute;s de los Garza.","2 - 0","1 - 0","2022-07-23T05:00:00.000Z","Tigres de la UANL","https://golstatsimages.blob.core.windows.net/teams-80/16.png","Atlas","https://golstatsimages.blob.core.windows.net/teams-80/4.png",12,"Goals",2829,2854,47,2842,"https://golstatsbets.blob.core.windows.net/video-player/69939_1.mp4"],[139303531,"Liga MX","Apertura 2022",70023,"Alves da Silva, Daniel","Ramos Palazuelos, Cesar","Estadio Ol&iacute;mpico Universitario, Ciudad de M&eacute;xico.","4 - 1","0 - 0","2022-09-07T05:00:00.000Z","Universidad Nacional","https://golstatsimages.blob.core.windows.net/teams-80/11.png","Queretaro","https://golstatsimages.blob.core.windows.net/teams-80/12.png",702,"Con enfrentamiento",262,293,3,278,"https://golstatsbets.blob.core.windows.net/video-player/70023_1.mp4"],[139303334,"Liga MX","Apertura 2022",70023,"Alves da Silva, Daniel","Ramos Palazuelos, Cesar","Estadio Ol&iacute;mpico Universitario, Ciudad de M&eacute;xico.","4 - 1","0 - 0","2022-09-07T05:00:00.000Z","Universidad Nacional","https://golstatsimages.blob.core.windows.net/teams-80/11.png","Queretaro","https://golstatsimages.blob.core.windows.net/teams-80/12.png",10,"Assists",5256,5283,87,5271,"https://golstatsbets.blob.core.windows.net/video-player/70023_1.mp4"],[139633795,"Liga MX","Apertura 2022",69950,"Valdes Contreras, Diego","Hernandez Gomez, Fernando","Estadio Azteca, Ciudad de M&eacute;xico.","3 - 3","0 - 1","2022-09-14T05:00:00.000Z","America","https://golstatsimages.blob.core.windows.net/teams-80/2.png","Santos Laguna","https://golstatsimages.blob.core.windows.net/teams-80/14.png",607,"Oportunidad de gol",675,701,10,689,"https://golstatsbets.blob.core.windows.net/video-player/69950_1.mp4"],[139242728,"Liga MX","Apertura 2022",70020,"Valdes Contreras, Diego","Caceres Hernandez, Victor Alfonso","Estadio Azteca, Ciudad de M&eacute;xico.","3 - 0","0 - 0","2022-09-06T05:00:00.000Z","America","https://golstatsimages.blob.core.windows.net/teams-80/2.png","CA San Luis","https://golstatsimages.blob.core.windows.net/teams-80/13.png",10,"Assists",2841,2861,46,2849,"https://golstatsbets.blob.core.windows.net/video-player/70020_1.mp4"],[138747150,"Liga MX","Apertura 2022",7e4,"Valdes Contreras, Diego","Miranda Galindo, Erick Yair","Default","1 - 3","0 - 1","2022-08-26T05:00:00.000Z","Mazatlan FC","https://golstatsimages.blob.core.windows.net/teams-80/8.png","America","https://golstatsimages.blob.core.windows.net/teams-80/2.png",12,"Goals",2425,2448,39,2436,"https://golstatsbets.blob.core.windows.net/video-player/70000_1.mp4"],[138462163,"Liga MX","Apertura 2022",69995,"Valdes Contreras, Diego","Santander, Luis Enrique","Estadio Azteca, Ciudad de M&eacute;xico.","7 - 0","1 - 0","2022-08-20T05:00:00.000Z","America","https://golstatsimages.blob.core.windows.net/teams-80/2.png","Cruz Azul","https://golstatsimages.blob.core.windows.net/teams-80/5.png",12,"Goals",3424,3443,56,3431,"https://golstatsbets.blob.core.windows.net/video-player/69995_1.mp4"],[138832474,"Liga MX","Apertura 2022",70005,"Sambueza, Rubens Oscar","Guerrero Ramirez, Fernando","Estadio TSM Corona, Torre&oacute;n.","4 - 1","1 - 1","2022-08-28T05:00:00.000Z","Santos Laguna","https://golstatsimages.blob.core.windows.net/teams-80/14.png","CA San Luis","https://golstatsimages.blob.core.windows.net/teams-80/13.png",12,"Goals",6830,6859,113,6847,"https://golstatsbets.blob.core.windows.net/video-player/70005_1.mp4"],[137178428,"Liga MX","Apertura 2022",69942,"Ibarra Mina, Alex Renato","Montano Robles, Diego","Estadio Jalisco, Guadalajara.","1 - 2","0 - 1","2022-07-26T05:00:00.000Z","Atlas","https://golstatsimages.blob.core.windows.net/teams-80/4.png","Club Tijuana","https://golstatsimages.blob.core.windows.net/teams-80/17.png",12,"Goals",2786,2811,45,2799,"https://golstatsbets.blob.core.windows.net/video-player/69942_1.mp4"],[138339473,"Liga MX","Apertura 2022",69985,"Canelo, Pedro Alexis","Referee 1","Azteca","1 - 2","0 - 0","2022-08-17T05:00:00.000Z","Cruz Azul","https://golstatsimages.blob.core.windows.net/teams-80/5.png","Club Tijuana","https://golstatsimages.blob.core.windows.net/teams-80/17.png",10,"Assists",5133,5159,85,5147,"https://golstatsbets.blob.core.windows.net/video-player/69985_1.mp4"],[136701989,"Liga MX","Apertura 2022",69927,"Gimenez, Santiago Tomas","Macias Romo, Oscar","Estadio Jalisco, Guadalajara.","3 - 2","0 - 1","2022-07-16T05:00:00.000Z","Atlas","https://golstatsimages.blob.core.windows.net/teams-80/4.png","Cruz Azul","https://golstatsimages.blob.core.windows.net/teams-80/5.png",12,"Goals",1374,1397,22,1385,"https://golstatsbets.blob.core.windows.net/video-player/69927_1.mp4"],[139678329,"Liga MX","Apertura 2022",70049,"Antuna Romero, Carlos","Ortiz Nava, Marco Antonio","Estadio Azteca, Ciudad de M&eacute;xico.","2 - 1","0 - 0","2022-09-15T05:00:00.000Z","Cruz Azul","https://golstatsimages.blob.core.windows.net/teams-80/5.png","Leon","https://golstatsimages.blob.core.windows.net/teams-80/173.png",10,"Assists",6728,6752,111,6740,"https://golstatsbets.blob.core.windows.net/video-player/70049_1.mp4"],[139054131,"Liga MX","Apertura 2022",70010,"Davila Zavala, Victor","Ortiz Nava, Marco Antonio","Estadio Victoria, Aguascalientes.","3 - 2","1 - 1","2022-09-02T05:00:00.000Z","Necaxa","https://golstatsimages.blob.core.windows.net/teams-80/205.png","Leon","https://golstatsimages.blob.core.windows.net/teams-80/173.png",12,"Goals",6636,6661,110,6649,"https://golstatsbets.blob.core.windows.net/video-player/70010_1.mp4"],[137503273,"Liga MX","Apertura 2022",69962,"Davila Zavala, Victor","Macias Romo, Oscar","Estadio Nou Camp, Le&ocuate;n.","3 - 2","1 - 0","2022-07-31T05:00:00.000Z","Leon","https://golstatsimages.blob.core.windows.net/teams-80/173.png","America","https://golstatsimages.blob.core.windows.net/teams-80/2.png",12,"Goals",1940,1965,31,1953,"https://golstatsbets.blob.core.windows.net/video-player/69962_1.mp4"],[139308851,"Liga MX","Apertura 2022",70025,"Benedetti Roa, Nicolas","Hernandez Gomez, Fernando","Default","1 - 0","1 - 0","2022-09-07T05:00:00.000Z","Mazatlan FC","https://golstatsimages.blob.core.windows.net/teams-80/8.png","Atlas","https://golstatsimages.blob.core.windows.net/teams-80/4.png",12,"Goals",1867,1891,31,1879,"https://golstatsbets.blob.core.windows.net/video-player/70025_1.mp4"],[138116335,"Liga MX","Apertura 2022",69976,"Benedetti Roa, Nicolas","Galvan Basulto, Eduardo","Estadio Nou Camp, Le&ocuate;n.","0 - 3","0 - 1","2022-08-13T05:00:00.000Z","Leon","https://golstatsimages.blob.core.windows.net/teams-80/173.png","Mazatlan FC","https://golstatsimages.blob.core.windows.net/teams-80/8.png",12,"Goals",591,629,9,617,"https://golstatsbets.blob.core.windows.net/video-player/69976_1.mp4"],[136791022,"Liga MX","Apertura 2022",69932,"Benedetti Roa, Nicolas","Camacho Peregrina, Jorge","Estadio Hidalgo, Pachuca.","1 - 1","0 - 1","2022-07-18T05:00:00.000Z","Pachuca","https://golstatsimages.blob.core.windows.net/teams-80/9.png","Mazatlan FC","https://golstatsimages.blob.core.windows.net/teams-80/8.png",12,"Goals",4284,4315,71,4303,"https://golstatsbets.blob.core.windows.net/video-player/69932_1.mp4"],[139414938,"Liga MX","Apertura 2022",70026,"Batista Ochoa, Facundo","Guerrero Ramirez, Fernando","Estadio Victoria, Aguascalientes.","1 - 2","1 - 0","2022-09-10T05:00:00.000Z","Necaxa","https://golstatsimages.blob.core.windows.net/teams-80/205.png","America","https://golstatsimages.blob.core.windows.net/teams-80/2.png",12,"Goals",461,490,7,478,"https://golstatsbets.blob.core.windows.net/video-player/70026_1.mp4"],[139051051,"Liga MX","Apertura 2022",70010,"Batista Ochoa, Facundo","Ortiz Nava, Marco Antonio","Estadio Victoria, Aguascalientes.","3 - 2","1 - 0","2022-09-02T05:00:00.000Z","Necaxa","https://golstatsimages.blob.core.windows.net/teams-80/205.png","Leon","https://golstatsimages.blob.core.windows.net/teams-80/173.png",12,"Goals",2731,2750,45,2738,"https://golstatsbets.blob.core.windows.net/video-player/70010_1.mp4"],[137828273,"Liga MX","Apertura 2022",69970,"Batista Ochoa, Facundo","Galvan Basulto, Eduardo","Estadio Alfonso Lastras Ram&iacute;rez, San Luis Potos&iacute;.","1 - 2","0 - 1","2022-08-07T05:00:00.000Z","CA San Luis","https://golstatsimages.blob.core.windows.net/teams-80/13.png","Necaxa","https://golstatsimages.blob.core.windows.net/teams-80/205.png",12,"Goals",849,870,13,858,"https://golstatsbets.blob.core.windows.net/video-player/69970_1.mp4"],[139025773,"Liga MX","Apertura 2022",70009,"Nahuelpan Osten, Ariel","Lopez Penuelas, Ismael","Estadio La Corregidora, Quer&eacute;taro.","1 - 1","1 - 0","2022-09-01T05:00:00.000Z","Queretaro","https://golstatsimages.blob.core.windows.net/teams-80/12.png","Puebla FC","https://golstatsimages.blob.core.windows.net/teams-80/10.png",12,"Goals",1454,1481,24,1472,"https://golstatsbets.blob.core.windows.net/video-player/70009_1.mp4"],[138063913,"Liga MX","Apertura 2022",69973,"Gonzalez Gonzalez, Arturo","Pacheco Larios, Guillermo","Estadio Victoria, Aguascalientes.","1 - 2","0 - 1","2022-08-12T05:00:00.000Z","Necaxa","https://golstatsimages.blob.core.windows.net/teams-80/205.png","Rayados de Monterrey","https://golstatsimages.blob.core.windows.net/teams-80/7.png",12,"Goals",6119,6138,101,6126,"https://golstatsbets.blob.core.windows.net/video-player/69973_1.mp4"],[137780455,"Liga MX","Apertura 2022",69966,"Gonzalez Gonzalez, Arturo","Ortiz Nava, Marco Antonio","Estadio BBVA Bancomer, Guadalupe","5 - 1","1 - 0","2022-08-06T05:00:00.000Z","Rayados de Monterrey","https://golstatsimages.blob.core.windows.net/teams-80/7.png","Leon","https://golstatsimages.blob.core.windows.net/teams-80/173.png",12,"Goals",2292,2321,38,2309,"https://golstatsbets.blob.core.windows.net/video-player/69966_1.mp4"],[140090831,"Liga MX","Apertura 2022",69950,"Suarez, Leonardo Gabriel","Hernandez Gomez, Fernando","Estadio Azteca, Ciudad de M&eacute;xico.","3 - 3","0 - 1","2022-09-14T05:00:00.000Z","America","https://golstatsimages.blob.core.windows.net/teams-80/2.png","Santos Laguna","https://golstatsimages.blob.core.windows.net/teams-80/14.png",12,"Goals",585,612,9,600,"https://golstatsbets.blob.core.windows.net/video-player/69950_1.mp4"],[140090832,"Liga MX","Apertura 2022",69950,"Suarez, Leonardo Gabriel","Hernandez Gomez, Fernando","Estadio Azteca, Ciudad de M&eacute;xico.","3 - 3","0 - 2","2022-09-14T05:00:00.000Z","America","https://golstatsimages.blob.core.windows.net/teams-80/2.png","Santos Laguna","https://golstatsimages.blob.core.windows.net/teams-80/14.png",12,"Goals",1175,1197,18,1182,"https://golstatsbets.blob.core.windows.net/video-player/69950_1.mp4"],[139227464,"Liga MX","Apertura 2022",70018,"Suarez, Leonardo Gabriel","Quintero Huitron, Daniel","Estadio TSM Corona, Torre&oacute;n.","3 - 1","1 - 0","2022-09-06T05:00:00.000Z","Santos Laguna","https://golstatsimages.blob.core.windows.net/teams-80/14.png","Necaxa","https://golstatsimages.blob.core.windows.net/teams-80/205.png",12,"Goals",7011,7034,116,7022,"https://golstatsbets.blob.core.windows.net/video-player/70018_1.mp4"],[138830649,"Liga MX","Apertura 2022",70005,"Suarez, Leonardo Gabriel","Guerrero Ramirez, Fernando","Estadio TSM Corona, Torre&oacute;n.","4 - 1","1 - 0","2022-08-28T05:00:00.000Z","Santos Laguna","https://golstatsimages.blob.core.windows.net/teams-80/14.png","CA San Luis","https://golstatsimages.blob.core.windows.net/teams-80/13.png",12,"Goals",4297,4380,71,4304,"https://golstatsbets.blob.core.windows.net/video-player/70005_1.mp4"]]},r8=new Map([[1,45],[2,90],[3,105],[4,120]]),o8=[{id:12,name:"Gol"},{id:55,name:"Gol"},{id:39,name:"Atajada"},{id:10,name:"Asistencia"},{id:702,name:"1vs1 exitoso ofensivo"},{id:607,name:"Oportunidad de gol"}].reduce((s,e)=>(s.set(e.id,e.name),s),new Map);let Mn=null,Vi=null,$i="";const Gt=A3(),l8={components:{GSCSeasonSelect:xB,GSCTournamentSelect:nB,GSCGames:ML,GSCSlider:un,GSCGridTeamsMatches:By,GSCPlayersLanding:ky,GSCTops:F5,GSCTableCalendar:Xx,DiscoverVideos:C3,CarouselFullScreen:I4,Stories:a8},setup(){const s=a.ref("landingref"),{elementSize:e}=iy(s);return{landingref:s,elementSize:e}},props:{currentSeasonId:{type:Number,default:0},isFemale:{type:Boolean,default:!1},showStories:{type:Boolean,default:!0},season:{type:Number,default:1772},isplayer:{type:Boolean,default:!1},user:{type:Object,default:()=>{}},privileges:{type:Object,default:()=>{}},team:{type:Number,default:0},player:{type:Number,default:0},gamesPerMatchDay:{type:Number,default:0,validator(s){return!Number.isNaN(s)&&s>=0}},token:{type:String,default:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MCwibmFtZSI6IlVzdWFyaW8gRnJlZSIsInVzZXJuYW1lIjoiZnJlZUBnb2xzdGF0cy5jb20iLCJlbWFpbCI6ImZyZWVAZ29sc3RhdHMuY29tIiwiaWF0IjoxNjA2NzU4Nzk1LCJleHAiOjE2MzgyOTQ3OTV9.kPNmP7yDtk38cAXrUyc7OHRh6J25VFqy-XUNzbK-4YE"},tournamentsApiUrl:{type:String,default:""},defaultMediaPlayerSeason:{type:Number,default:0},checkLiveGamesIntervalMinutes:{type:Number,default:2}},data(){return{isPreviousDataLoaded:!1,imagesUrl:ih(),roundAbbreviationByGameId:new Map,isCarouselFullScreenVisible:!1,isPlaySeeker:!1,keyupdate:0,carouselPlayerQueue:[],gameEventsUrl:"https://al2nv2dmkc.execute-api.us-west-2.amazonaws.com/prod/mxm/",defaultGameId:0,lastSeasonsIds:[],arrayGamesAdd:[],gamesPages:new Map,show_stories:!0,selectedRoundKeyIndex:0,currentStoriesLastIndex:0,selectedRoundKeyIndexVideo:0,selectedRound:"0",selectedRoundVideos:"0",isLeagueSelected:!0,fullTournamentScheduleFull:[],fullTournamentScheduleFullGoals:[],defaultMatchDayKey:null,isCupTournament:!1,retries:3,userTeamGames:[],userTeamGamesForVideos:[],isCupLegacyTournament:!1,tournamentScheduleKeys:[],tournamentScheduleKeysByKey:new Map,tournamentScheduleKeysGoals:[],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:[],gamesAllStories:[],fullTournamentSchedule:{},tournamentSelected:{id:0},tournamentType:0,tournamentSelectedDropDowns:{seasons:[]},playersLength:0,playersLengthRival:0,nextRivalId:0,updateTableCalendar:0,loadDiscover:!1,hasNextRival:!1,resumeType:1,goalsType:2,is_public:!1,seasonsGamesMap:new Map,gamesOfTheDayPreMatchIds:new Set,seasonsForLiveGames:[],allLiveGames:[],storiesItems:[],currentStories:[],currentStoryIndex:null,isStoriesVisible:!1,seasonPlayersMap:new Map,currentTournaments:[]}},computed:{teamSelected(){return this.user.is_generic||this.tournamentSelected.id!==this.user.tournament?0:this.user.team},teamRival(){return Object.keys(this.fullTournamentSchedule).length>0?this.user.team==this.fullTournamentSchedule.data.prematch.home_team?this.fullTournamentSchedule.data.prematch.visiting_team:this.fullTournamentSchedule.data.prematch.home_team:0},isGenericLike(){return this.user.is_generic||this.tournamentSelected.id!==this.user.tournament},isPlaySeekerAvailable(){return[34230,34178,34201].includes(this.user.id)},games(){if(!this.isGenericLike&&!this.isLeagueSelected)return this.fullTournamentSchedule;{const s=this.gamesPages.get(this.selectedRound);return s&&s[0]?s[0].sort((e,t)=>{let n=e.dateTimeMillis,i=t.dateTimeMillis;return e.is_live&&(n-=1e9),t.is_live&&(i-=1e9),n-i}):[]}},latestRound(){return this.userTeamGames&&this.userTeamGames.length&&this.fullTournamentScheduleFullGoals&&this.fullTournamentScheduleFullGoals.length?this.getUserTeamClosestRound(this.fullTournamentScheduleFullGoals):this.getNormalClosestRound(this.fullTournamentScheduleFullGoals)},closestRound(){return this.userTeamGames&&this.userTeamGames.length?this.getUserTeamClosestRound(this.fullTournamentScheduleFull):this.getNormalClosestRound(this.fullTournamentScheduleFull)},closestRoundVideos(){return this.userTeamGames&&this.userTeamGames.length?this.getUserTeamClosestRound(this.fullTournamentScheduleFullGoals,!0):this.getNormalClosestRound(this.fullTournamentScheduleFullGoals,!0)},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"}},watch:{games:{immediate:!0,deep:!0,async handler(s){if(s&&s.length>0){if(!this.seasonsSelected.length)return;for(let t=0;t<s.length;t++){const n=this.gamesAllStories.findIndex(i=>i.game_id===s[t].game_id);n!==-1&&(this.gamesAllStories[n].is_live=s[t].is_live,this.gamesAllStories[n].game_status=s[t].game_status)}const e=s.filter(t=>t.is_live);for(let t=0;t<e.length;t++){const n=this.gamesAllStories.findIndex(i=>i.game_id===e[t].game_id);if(n!==-1)this.gamesAllStories[n].score=e[t].score;else{this.gamesAllStories.push(e[t]),this.gamesAllStories=this.ordenarYFiltrarPartidos(this.gamesAllStories);let i=[];for(let r=0;r<this.gamesAllStories.length;r++)this.arrayGamesAdd.findIndex(o=>o.game_id===this.gamesAllStories[r].game_id)===-1?i.push({game_id:this.gamesAllStories[r].game_id,last_index:0,status:1}):i.push({game_id:this.arrayGamesAdd[this.arrayGamesAdd.findIndex(o=>o.game_id===this.gamesAllStories[r].game_id)].game_id,last_index:this.arrayGamesAdd[this.arrayGamesAdd.findIndex(o=>o.game_id===this.gamesAllStories[r].game_id)].last_index,status:this.arrayGamesAdd[this.arrayGamesAdd.findIndex(o=>o.game_id===this.gamesAllStories[r].game_id)].status});this.arrayGamesAdd=i,await Le.post($i,{stories:this.arrayGamesAdd},{headers:{Authorization:`${this.token}`,"Content-Type":"application/json"}});for(let r=0;r<this.arrayGamesAdd.length;r++)this.gamesAllStories.findIndex(o=>o.game_id===this.arrayGamesAdd[r].game_id)!==-1&&(this.gamesAllStories[this.gamesAllStories.findIndex(o=>o.game_id===this.arrayGamesAdd[r].game_id)].index=this.arrayGamesAdd[r].last_index,this.gamesAllStories[this.gamesAllStories.findIndex(o=>o.game_id===this.arrayGamesAdd[r].game_id)].status_storie=this.arrayGamesAdd[r].status)}}}}},"allLiveGames.length":{handler(s){s.length===0&&this.resetGamesLiveInterval()}},privileges:{immediate:!0,deep:!0,async handler(s){this.is_public=s!==null}},team:{immediate:!0,deep:!0,async handler(s){s&&this.seasonsSelected.length&&setTimeout(()=>{this.fetchGames(s,this.seasonsSelected)},1e3)}},closestRound(s){this.selectedRoundKeyIndex=this.tournamentScheduleKeys.findIndex(e=>e===s),this.selectedRound=s},latestRound(s){this.selectedRoundKeyIndexVideo=this.tournamentScheduleKeysGoals.findIndex(e=>e===s),this.selectedRoundVideos=s},isCarouselFullScreenVisible:{handler(s){document.getElementsByTagName("html")[0].style.overflow=s?"hidden":"auto"},immediate:!0}},methods:{getOnlyGamesWithGoals(s){return Object.entries(s).reduce((e,[t,n])=>{const i=n.reduce((r,o)=>{const l=o.games.filter(d=>(d.is_live||d.game_status!==4)&&d.score[0]+d.score[1]>0);return l.length&&r.push({...o,games:l}),r},[]);return i.length&&(e[t]=i),e},{})},async onClickPlaySeeker(){try{const e=await(await fetch("https://rhev2kbe0a.execute-api.us-east-2.amazonaws.com/qa/demo/playseeker")).json();this.formatPlaySeekerPlays(e.data||i8)}catch(s){console.error(s)}},formatPlaySeekerPlays(s){let e=[];s&&s.playlist&&s.playlist.length&&(e=s.playlist.reduce((n,i,r)=>{const l={...Object.entries(Gt).reduce((f,[p,h])=>(f[p]=i[h],f),{}),isPlaySeeker:!0,startSeconds:i[Gt.startTime],endSeconds:i[Gt.endTime],totalSeconds:Math.floor(i[Gt.endTime]-i[Gt.startTime]),payloadData:{play_id:i[Gt.playId],total_plays:s.total_plays,play_number:r+1,group_playlist_id:s.group_playlist_id,playlist_id:s.playlist_id,group_id:s.group_id,moment_of_play:i[Gt.momentOfPlay],play_type:i[Gt.categoryId],viewer_second_start:Math.floor(i[Gt.startTime]),intended_second_start:Math.floor(i[Gt.startTime]),intended_second_end:Math.floor(i[Gt.endTime]),latitude_of_user:null,longitude_of_user:null}},[d,c]=l.playerName.split(","),u=d.split(" ");let m="";for(const f of u)if(m+=` ${f}`,f.length>3)break;if(l.playerShortName=c&&d?`${c.trim().charAt(0)}.${m}`:"",!l.mainCategoryName){const[f,p]=l.finalScore.split(" - ");l.arrayScore=[Number(f),Number(p)]}return l.categoryName=o8.get(l.categoryId),n.push(l),n},[]));let t=[];t=e,this.carouselPlayerQueue=t,this.isPlaySeeker=!0,this.isCarouselFullScreenVisible=!0},formatUsername(s){const e=s.split(",");let t="",n="";return e[1]?(n=e[1].trim().split(" "),n[0]?t=n[0]:t=e[1]):e[0]&&(n=e[0].trim().split(" "),n[0]?t=n[0]:t=e[0]),t.trim()},async fetchGameEvents(s){try{return(await Le.get(`${this.gameEventsUrl}${s}`,{headers:{Authorization:`${this.token}`}})).data}catch(e){throw new Error(e)}},async fetchLiveGames(){try{if(this.seasonsForLiveGames.length===0)return[];const s=this.seasonsForLiveGames.reduce((n,i)=>`${n}seasons=${i}&`,""),e=Le.create({headers:{Authorization:`${this.token}`}}),{data:t}=await e.get(`https://qyyibs1w0d.execute-api.us-west-2.amazonaws.com/prod/calendar/gamesBySeason/lives?${s}`);return t}catch(s){throw new Error(s)}},async onClickOpenCarouselVideos(s){try{this.isPlaySeeker=!1;const t=(await this.fetchGameEvents(s)).plays;this.carouselPlayerQueue=t.filter(n=>n.event_type_id===1&&n.video_link!=="-"),this.isCarouselFullScreenVisible=!0}catch(e){throw new Error(e)}},onChangeMatchDayGames(s){this.selectedRound!==s.key&&(this.selectedRound=s.key)},onClickStory({item:s,index:e}){this.openStory(e),this.onClickStories(s)},onClickLive(){const s=this.allLiveGames[0];if(s){const e=this.seasonsGamesMap.get(s.game_id);e&&(this.selectedRound=e.roundAbbreviationV2)}},onClickCloseCarousel(){this.carouselPlayerQueue=[],this.isPlaySeeker=!1,this.isCarouselFullScreenVisible=!1},onChangeIsLeagueSelected(s){this.isLeagueSelected=s},onAction(s){this.$emit("action",s)},onOpenMedia(s){s.type===1&&s.gameIds&&s.gameIds.length>0?this.onClickOpenCarouselVideos(s.gameIds[0]):this.$emit("openmedia",s)},onOpenProfile(s){this.$emit("onOpenProfile",s)},onClickMatch(s){this.$emit("openGame",s)},onClickCalendar(){const s={type:this.isGenericLike||this.isLeagueSelected?0:1,team:this.team,season:this.seasonSelected.id};this.$emit("onClickMyCalendar",s)},moreTops(){const s={team:this.team,season:this.seasonSelected.id};this.$emit("openTops",s)},clickProfileBtn(s){this.$emit("openProfile",s)},viewAllRival(){const s={team:Object.keys(this.fullTournamentSchedule).length>0?this.user.team==this.fullTournamentSchedule.data.prematch.home_team?this.fullTournamentSchedule.data.prematch.visiting_team:this.fullTournamentSchedule.data.prematch.home_team:0,season:this.seasonSelected.id};this.$emit("openAllPlayers",s)},viewAll(){const s={team:this.team,season:this.seasonSelected.id};this.$emit("openAllPlayers",s)},getTotalPlayers(s){this.playersLength=s},getTotalPlayersRival(s){this.playersLengthRival=s},clickCard(s){const e={data:s,isPlayer:this.isplayer};this.$emit("clickOnMainCards",e)},async fetchGames(s,e){const t=e.map(i=>`seasons=${i.id}`).join("&"),n=Le.create({headers:{Authorization:`${this.token}`}});this.fullTournamentSchedule=await n.get(this.gamesUrl+s+"?"+t),this.fullTournamentSchedule.data&&this.fullTournamentSchedule.data.prematch&&(this.fullTournamentSchedule.data.prematch.roundAbbreviationV2=this.roundAbbreviationByGameId.get(this.fullTournamentSchedule.data.prematch.game_id)),this.fullTournamentSchedule.data&&this.fullTournamentSchedule.data.postmatch&&(this.fullTournamentSchedule.data.postmatch.roundAbbreviationV2=this.roundAbbreviationByGameId.get(this.fullTournamentSchedule.data.postmatch.game_id)),this.nextRivalId=Object.keys(this.fullTournamentSchedule).length>0?this.user.team==this.fullTournamentSchedule.data.prematch.home_team?this.fullTournamentSchedule.data.prematch.visiting_team:this.fullTournamentSchedule.data.prematch.home_team:0,this.loadDiscover=!0},generateSeasons(s){const e=[{id:s.id,type:s.type}];return s.related_seasons&&s.related_seasons.length&&e.push(...s.related_seasons.map(t=>({id:t.id,type:t.type}))),e},async onInputTournament(s){this.tournamentSelected=s,this.tournamentType=s.tournament_type,this.tournamentSelected.id&&this.tournamentSelected.id!==s.id&&(this.updateTableCalendar+=1),this.tournamentSelectedDropDowns.id!==s.id&&(this.tournamentSelectedDropDowns=s)},getSeasonDependentPromises({season:s,seasons:e}){const t={headers:{Authorization:`${this.token}`}},n=[Le.get(`https://ts7thxzaik.execute-api.us-west-2.amazonaws.com/prod/players/seasons/${s.id}`,t)];n.push(this.fetchSeasonsGamesAndTeams(e.map(r=>r.id),3)),n.push(this.fetchStoriesPlays(s));const i=`https://ssh88fgvll.execute-api.us-east-2.amazonaws.com/prod/users/${this.user.id}/seasons/${s.id}/stories`;return i!==$i&&($i=i,n.push(Le.get($i,t))),n},async onInputSeason(s){this.isLeagueSelected=!0;try{if(this.seasonSelected.id!==s.id){this.isPreviousDataLoaded=!1,this.seasonSelected=s,this.seasonsSelected=this.generateSeasons(s);const e=this.getSeasonDependentPromises({season:s,seasons:this.seasonsSelected,retries:3,createdUrl:""}),[t,n,i,r]=await Promise.all(e);this.seasonPlayersMap=new Map,t.data&&t.data.players&&t.data.players.forEach(o=>{this.seasonPlayersMap.set(o.player_id,o)}),r&&r.data?this.arrayGamesAdd=r.data.stories.stories:this.arrayGamesAdd=[],this.resetGamesLiveInterval(),this.seasonSelected=s,this.show_stories=!!s.show_stories,this.seasonsForLiveGames=[s.id,...s.related_seasons.map(o=>o.id)],this.$emit("change-season-id",s.id),this.fillStoriesData(i,n.seasonsAndGames),await this.createFullTournamentScheme({seasons:this.seasonsSelected,seasonsAndGames:n.seasonsAndGames,seasonsAndTeams:n.seasonsAndTeams,applySeasonsValidation:!1}),this.team&&await this.fetchGames(this.team,this.seasonsSelected),this.keyupdate+=1}}catch(e){throw new Error(e)}},ordenarYFiltrarPartidos(s){const e=s.filter(t=>t.game_status===1||t.is_live==1||t.game_status==0);return e.sort((t,n)=>new Date(n.date_time_utc)-new Date(t.date_time_utc)),e.slice(0,18)},async fetchSeasonsGamesAndTeams(s,e,t=""){let n=t;try{const i=Le.create({headers:{Authorization:`${this.token}`}});n||(n=this.gamesUrl2,s.forEach((l,d)=>{n+=`${d===0?"":"&"}seasons=${l}`}));const{data:{data:r,teams:o}}=await i.get(n);return{seasonsAndGames:r,seasonsAndTeams:o}}catch(i){if(e>0)return this.fetchSeasonsGamesAndTeams(s,e-1,n);throw new Error(i)}},async fetchStoriesPlays(s){try{return await Le.create({headers:{Authorization:`${this.token}`}}).get("https://cpj4073446.execute-api.us-east-2.amazonaws.com/prod/videos/plays/seasons/"+s.id+"?categories=607&categories=608&categories=12&categories=55&categories=54&categories=35&categories=15&categories=53&type=1")}catch(e){throw new Error(e)}},fillStoriesData(s,e){let t=s.data?s.data.plays:[];this.gamesAllStories=[];for(let i=0;i<e.length;i++)this.gamesAllStories=this.gamesAllStories.concat(e[i].games);this.gamesAllStories=this.ordenarYFiltrarPartidos(this.gamesAllStories);let n=[];for(let i=0;i<this.gamesAllStories.length;i++)this.arrayGamesAdd.findIndex(r=>r.game_id===this.gamesAllStories[i].game_id)===-1?n.push({game_id:this.gamesAllStories[i].game_id,last_index:0,status:1}):n.push({game_id:this.arrayGamesAdd[this.arrayGamesAdd.findIndex(r=>r.game_id===this.gamesAllStories[i].game_id)].game_id,last_index:this.arrayGamesAdd[this.arrayGamesAdd.findIndex(r=>r.game_id===this.gamesAllStories[i].game_id)].last_index,status:this.arrayGamesAdd[this.arrayGamesAdd.findIndex(r=>r.game_id===this.gamesAllStories[i].game_id)].status});this.arrayGamesAdd=n;for(let i=0;i<this.arrayGamesAdd.length;i++)this.gamesAllStories.findIndex(r=>r.game_id===this.arrayGamesAdd[i].game_id)!==-1&&(this.gamesAllStories[this.gamesAllStories.findIndex(r=>r.game_id===this.arrayGamesAdd[i].game_id)].index=this.arrayGamesAdd[i].last_index,this.gamesAllStories[this.gamesAllStories.findIndex(r=>r.game_id===this.arrayGamesAdd[i].game_id)].status_storie=this.arrayGamesAdd[i].status);this.storiesItems=this.getStoriesStructureVideos(t),setTimeout(()=>{this.sendStoriesData()},1e3)},sendStoriesData(){Le.post(`https://ssh88fgvll.execute-api.us-east-2.amazonaws.com/prod/users/${this.user.id}/seasons/${this.seasonsSelected[0].id}/stories`,{stories:this.arrayGamesAdd},{headers:{Authorization:`${this.token}`,"Content-Type":"application/json"}})},getTimeSeconds(s){const[e,t]=s.split(":"),[n,i]=t.split(".");return parseInt(e)*60+parseInt(n)+parseInt(i)/1e3},getPlayTime(s,e){let t="",n=0;switch(s[7]){case 1:t=s[11];break;case 2:t=s[13],n=45;break;case 3:t=s[15],n=90;break;case 4:t=s[17],n=105;break;case 5:t=s[19],n=120;break}return(!t||t==="0")&&(t="00:00"),this.getTimeToSeconds(t)+(this.getTimeToSeconds(s[e])-n*60)},abrirNuevaVentana(){window.open("https://goltipster.com/view-all#golTipster","_blank")},getTimeToSeconds(s){const t=s.indexOf(".")>-1?s.substring(0,s.indexOf(".")):s,[n,i,r]=t.split(":").reverse();return(r?Number(r)*60*60:0)+Number(i)*60+Number(n)},getStoriesStructureVideos(s){let e=[];for(let t=0;t<this.gamesAllStories.length;t++){let n=s.filter(o=>o[3]===this.gamesAllStories[t].game_id).map(o=>({playId:o[29],gameId:o[3],player:this.seasonPlayersMap.get(o[1]),categoryId:o[0],date:new Date(o[4]+"T"+o[5]),url:o[35]==2?"https://daijvvc13prpy.cloudfront.net/golstats-videos/"+this.gamesAllStories[t].game_id+"_1/"+this.gamesAllStories[t].game_id+"_1.m3u8":"https://golstatsbets.blob.core.windows.net/video-player/"+this.gamesAllStories[t].game_id+"_1.mp4",type:"video",thumbnail:{logoHomeTeam:"https://golstatsimages.blob.core.windows.net/teams-80/"+this.gamesAllStories[t].home_team+".png",logoAwayTeam:"https://golstatsimages.blob.core.windows.net/teams-80/"+this.gamesAllStories[t].visiting_team+".png"},header:{label:this.gamesAllStories[t].home_team_acronym+" "+this.gamesAllStories[t].score[0]+":"+this.gamesAllStories[t].score[1]+" "+this.gamesAllStories[t].visiting_team_acronym+" "+this.gamesAllStories[t].matchday_name.replace("Matchday","JOR").replace("de Final","").replace("Playoffs 1","CFI").replace("Playoffs 2","CFV").replace("Playoffs 3","SFI").replace("Playoffs 4","SFV").replace("Playoffs 5","FI").replace("Playoffs 6","FV")},startTime:this.getPlayTime(o,9),endTime:this.getPlayTime(o,10),duration:Math.floor(this.getTimeSeconds(o[10])-this.getTimeSeconds(o[9]))}));const i={},r=n.filter(o=>i[o.playId]?!1:(i[o.playId]=!0,!0));e.push({game_id:this.gamesAllStories[t].game_id,stories:r})}return e},areSeasonsDifferent(s){for(const e of s)if(!this.lastSeasonsIds.includes(e.season_id))return!0;return!1},async createFullTournamentScheme({seasons:s,seasonsAndGames:e,seasonsAndTeams:t,applySeasonsValidation:n}){try{this.seasonsGamesMap=new Map,this.userTeamGames=[],this.userTeamGamesForVideos=[],this.gamesOfTheDayPreMatchIds.clear();let i=0;if(n&&this.areSeasonsDifferent(e))return;e.forEach(l=>{const d=s.find(c=>c.id===l.season_id);d&&(l.type=d.type,l.games.forEach(c=>{c.season_id=l.season_id}),d.type===0&&(i=l.season_id))});const r={seasonsGames:e},o=t.find(l=>l.season_id===i);if(o){const l=o.teams,d=[...r.seasonsGames],c=r&&r.seasonsGames?r.seasonsGames.map(m=>{const f=m.games.reduce((p,h)=>{const g={...h},y=new Date,[b,w,_]=g.date.split("-"),[C,E,A]=g.schedule.split(":"),T=new Date(Number(b),Number(w)-1,Number(_),Number(C),Number(E),Number(A));return g.dateTimeMillis=T.valueOf(),g.home_team=l.find(R=>R.team_id===h.home_team),g.visiting_team=l.find(R=>R.team_id===h.visiting_team),g.game_status===4&&y.getFullYear()===T.getFullYear()&&y.getMonth()===T.getMonth()&&y.getDate()===T.getDate()&&this.gamesOfTheDayPreMatchIds.add(g.game_id),this.seasonsGamesMap.set(g.game_id,g),p[h.matchday_abbreviation]?p[h.matchday_abbreviation][h.game_status===3?"canceled":h.date]?p[h.matchday_abbreviation][h.game_status===3?"canceled":h.date].push(g):p[h.matchday_abbreviation][h.game_status===3?"canceled":h.date]=[g]:p[h.matchday_abbreviation]={[h.game_status===3?"canceled":h.date]:[g]},this.gsData&&this.gsData.teamId&&g.game_status===4&&(g.home_team.team_id===this.gsData.teamId||g.visiting_team.team_id===this.gsData.teamId)&&(this.userTeamGames.push(g),g.score&&g.score[0]+g.score[1]>0&&this.userTeamGamesForVideos.push(g)),p},{});this.userTeamGames.sort((p,h)=>p.dateTimeMillis-h.dateTimeMillis);for(let[p,h]of Object.entries(f))f[p]=Object.entries(h).map(([g,y])=>({date:g,games:y.sort((b,w)=>b.dateTimeMillis-w.dateTimeMillis)})),f[p].sort((g,y)=>g.date<y.date?-1:g.date>y.date?1:0);return{type:m.type,weight:m.type===0?0:m.type===2?1:2,schedule:f}}):[],u=r&&r.seasonsGames?d.map(m=>{const f=m.games.reduce((p,h)=>{const g={...h};return g.dateTimeMillis=new Date(g.date_time_utc).valueOf(),g.home_team=l.find(y=>y.team_id===h.home_team),g.visiting_team=l.find(y=>y.team_id===h.visiting_team),p[h.matchday_abbreviation]?p[h.matchday_abbreviation][h.game_status===3?"canceled":h.date]?(g.game_status!=4||g.is_live==1)&&(g.score[0]!=0||g.score[1]!=0)&&p[h.matchday_abbreviation][h.game_status===3?"canceled":h.date].push(g):(g.game_status!=4||g.is_live==1)&&(g.score[0]!=0||g.score[1]!=0)&&(p[h.matchday_abbreviation][h.game_status===3?"canceled":h.date]=[g]):(g.game_status!=4||g.is_live==1)&&(g.score[0]!=0||g.score[1]!=0)&&(p[h.matchday_abbreviation]={[h.game_status===3?"canceled":h.date]:[g]}),p},{});this.userTeamGames.sort((p,h)=>p.dateTimeMillis-h.dateTimeMillis);for(let[p,h]of Object.entries(f))f[p]=Object.entries(h).map(([g,y])=>({date:g,games:y.sort((b,w)=>b.dateTimeMillis-w.dateTimeMillis)})),f[p].sort((g,y)=>g.date<y.date?-1:g.date>y.date?1:0);return{type:m.type,weight:m.type===0?0:m.type===2?1:2,schedule:f}}):[];c.sort((m,f)=>m.weight-f.weight),this.fullTournamentScheduleFull=c.reduce((m,f)=>{for(const[p,h]of Object.entries(f.schedule))if(f.type===0)if([1,2].includes(this.tournamentType)){const g=Qh.get(this.tournamentType);if(g){const y=g.get(p);y&&(m[y.matchDayAbbreviation]=h)}}else if(this.isCup){const g=p.replace("M",""),y=`Jornada ${g}`;this.isCupLegacy?m[Zh[g]||y]=h:m[Xh[p]||y]=h}else m[Number(p.replace("M","")).toString()]=h;else f.type===2?["PI1","PI2"].includes(p)?m[p]=h:m[`R${Number(p.replace("PO",""))}`]=h:f.type===1&&(m[Jh[p]]=h);return m},{}),this.fullTournamentScheduleFullGoals=u.reduce((m,f)=>{for(const[p,h]of Object.entries(f.schedule))if(f.type===0)if([1,2].includes(this.tournamentType)){const g=Qh.get(this.tournamentType);if(g){const y=g.get(p);y&&(m[y.matchDayAbbreviation]=h)}}else if(this.isCup){const g=p.replace("M",""),y=`Jornada ${g}`;this.isCupLegacy?m[Zh[g]||y]=h:m[Xh[p]||y]=[]}else m[Number(p.replace("M","")).toString()]=h;else f.type===2?["PI1","PI2"].includes(p)?m[p]=h:m[`R${Number(p.replace("PO",""))}`]=h:f.type===1&&(m[Jh[p]]=h);return m},{}),this.roundAbbreviationByGameId=new Map,this.tournamentScheduleKeysByKey.clear(),this.tournamentScheduleKeys=Array.from(Object.entries(this.fullTournamentScheduleFull).reduce((m,[f,p],h)=>{const g=Number(f);let y="";Number.isNaN(g)?y=f:y=g<10?`0${g}`:f;let b=!1,w=null;const _={key:f,value:g,valueText:y,avaible:b,matchDayId:w,index:h,liveGamesIds:new Set};this.tournamentScheduleKeysByKey.set(f,_);const C=p.reduce((A,T)=>(!w&&T&&T.games&&T.games.length&&(_.matchDayId=T.games[0].matchday_id),T.games.forEach(R=>{this.roundAbbreviationByGameId.set(R.game_id,f),R.roundAbbreviation=Number.isNaN(g)?g:`J ${g}`,R.roundAbbreviationV2=f,R.scheduleKey=_}),A=A.concat(T.games),A),[]);for(const A of C)(A.game_status!==4||A.is_live)&&(A.score[0]!==0||A.score[1]!==0)&&(_.avaible=!0);m.set(f,_);const E=this.getPages(C);return this.gamesPages.set(f,E),m},new Map).values()),this.tournamentScheduleKeysGoals=Array.from(Object.entries(this.fullTournamentScheduleFullGoals).reduce((m,[f,p])=>{const h=Number(f);let g="";Number.isNaN(h)?g=f:g=h<10?`0${h}`:f;let y=!1;const b=p.reduce((w,_)=>(_.games.forEach(C=>{C.roundAbbreviation=Number.isNaN(h)?h:`J ${h}`}),w=w.concat(_.games),w),[]);for(let w=0;w<b.length;w++)(b[w].game_status!=4||b[w].is_live&&(b[w].score[0]!=0||b[w].score[1]!=0))&&(y=!0);return m.set(f,{key:f,value:h,valueText:g,avaible:y}),m},new Map).values())}setTimeout(()=>{this.isPreviousDataLoaded=!0,this.checkLiveGames(),this.gamesOfTheDayPreMatchIds.size&&this.createGameOfTheDayTimeouts()},500)}catch(i){throw new Error(i)}finally{this.loadingFlag=!1}},createGameOfTheDayTimeouts(){this.gamesOfTheDayPreMatchIds.size&&this.gamesOfTheDayPreMatchIds.forEach(s=>{const e=this.seasonsGamesMap.get(s);if(e){const t=new Date().valueOf();if(60*1e3*30+e.dateTimeMillis-t>0){const i=e.dateTimeMillis-t-3e5;setTimeout(()=>{this.createCheckLiveGamesInterval()},i>0?i:0)}}})},resetCheckGamesLiveInterval(){clearInterval(Vi),Vi=null},createCheckLiveGamesInterval(){this.resetCheckGamesLiveInterval(),Vi||(Vi=setInterval(()=>{this.checkLiveGames()},this.checkLiveGamesIntervalMinutes*60*1e3))},async checkLiveGames(){try{const s=await this.fetchLiveGames(),e=new Set;if(this.allLiveGames=s.data.reduce((t,n)=>(n.games.forEach(i=>{e.add(i.game_id),t.push(i)}),t),[]),this.allLiveGames.length){Mn||await this.fillGameEvents();const t=[];this.gamesOfTheDayPreMatchIds.forEach(n=>{const i=this.seasonsGamesMap.get(n);i&&new Date().valueOf()>i.dateTimeMillis&&t.push(n)}),t.length&&t.every(i=>this.seasonsGamesMap.get(i).isLiveTracked)&&this.resetCheckGamesLiveInterval()}}catch(s){throw new Error(s)}},createGamesEventsInterval(){this.resetGamesLiveInterval(),Mn=setInterval(()=>{this.fillGameEvents()},6e4)},resetGamesLiveInterval(){clearInterval(Mn),Mn=null},removeGameIfFinished(s,e,t=!1){for(const n of e)if(n.category_id===0&&n.game_status_id===13)if(t)this.fetchGames(this.team,this.seasonsSelected);else{const i=this.seasonsGamesMap.get(n.game_id);this.allLiveGames=this.allLiveGames.filter(r=>r.game_id!==s.game_id),i.is_live=0,i.game_status=0,i.scheduleKey&&i.scheduleKey.liveGamesIds.delete(s.game_id)}},async fillGameEvents(){try{const s=[];let e=null;for(const n of this.allLiveGames){n.isLiveTracked=!0,this.gamesOfTheDayPreMatchIds.size&&this.gamesOfTheDayPreMatchIds.delete(n.game_id);const i=this.seasonsGamesMap.get(n.game_id);i&&(i.is_live=1,i.game_status=4,i.scheduleKey&&i.scheduleKey.liveGamesIds.add(n.game_id)),e=this.fullTournamentSchedule&&this.fullTournamentSchedule.data&&this.fullTournamentSchedule.data.prematch?this.fullTournamentSchedule.data.prematch:null,e&&e.game_id===n.game_id&&(e.is_live=1,e.game_status=4),s.push(this.fetchGameEvents(n.game_id))}const t=await Promise.all(s);for(const n of t){const i=this.seasonsGamesMap.get(n.game_id);if(i){const r=r8.get(n.recent_lapse);let o=!1,l=!1,d=!1;for(const f of n.plays){if(f.category_id===0&&f.game_status_id===18){d=!0;break}f.category_id===0&&f.game_status_id===17&&(l=!0)}o=l&&!d,i.currentTimeLive=o?"MT":r&&r<n.minute?`${r}' + ${n.minute-r}'`:`${n.minute}'`;const c=[Number(n.score[i.home_team.team_id.toString()])+Number(n.score[`own_${i.visiting_team.team_id.toString()}`]),Number(n.score[i.visiting_team.team_id.toString()])+Number(n.score[`own_${i.home_team.team_id.toString()}`])],u=c[0],m=c[1];i.score=[Number.isNaN(u)?0:u,Number.isNaN(m)?0:m],this.removeGameIfFinished(i,n.plays),e&&e.game_id===i.game_id&&(e.currentTimeLive=i.currentTimeLive,e.score=i.score,this.removeGameIfFinished(e,n.plays,!0))}}Mn||this.createGamesEventsInterval()}catch(s){throw new Error(s)}},getPages(s){const e=[];if(this.gamesPerMatchDay>0){let t=[];s.forEach((n,i)=>{t.push(n),(i+1)%this.gamesPerMatchDay===0&&(e.push([...t]),t=[])}),t.length&&e.push([...t])}else e.push(s);return e},getNormalClosestRound(s,e=!1){const t=new Date().valueOf(),n=e?this.getOnlyGamesWithGoals(s):s,i=Object.entries(Object.entries(n).reduce((o,[l,d])=>(o[l]=null,d.forEach(c=>{c.games.forEach(u=>{if([1,0].includes(u.game_status)||u.is_live){const m=t-u.dateTimeMillis;(o[l]===null||m<o[l])&&(o[l]=m)}})}),o),{}));if(!i.length)return"1";const r=i.reduce((o,[l,d])=>{if(d!==null){const c=this.tournamentScheduleKeysByKey.get(l);(o.shortestMillisToNow===null||d<o.shortestMillisToNow&&c.index>=o.scheduleKey.index)&&(o.shortestMillisToNow=d,o.round=l,o.scheduleKey=c)}return o},{round:"",shortestMillisToNow:null,scheduleKey:null});return r.shortestMillisToNow!==null?r.round:i[0][0]},getUserTeamClosestRound(s,e=!1){let t=1;const n=e?this.userTeamGamesForVideos:this.userTeamGames;if(n.length){const i=n[0];for(const[r,o]of Object.entries(s))for(const l of o)if(l.games.find(c=>c.game_id===i.game_id))return r}return t},async changeIndexStory(s){if(this.arrayGamesAdd.length>0){let e=-1,t=-1,n=-1;this.arrayGamesAdd.findIndex(i=>i.game_id===this.currentStories[0].gameId)!=-1&&(e=this.arrayGamesAdd.findIndex(i=>i.game_id===this.currentStories[0].gameId)),this.gamesAllStories.findIndex(i=>i.game_id===this.currentStories[0].gameId)!=-1&&(t=this.gamesAllStories.findIndex(i=>i.game_id===this.currentStories[0].gameId)),this.storiesItems.findIndex(i=>i.game_id===this.currentStories[0].gameId)!=-1&&(n=this.storiesItems.findIndex(i=>i.game_id===this.currentStories[0].gameId)),e!=-1&&(this.gamesAllStories[t].is_live===1?this.storiesItems[n].stories.length-1==s&&this.storiesItems[n].stories.length>1?this.arrayGamesAdd[e].last_index=s-1:this.arrayGamesAdd[e].last_index=s:this.arrayGamesAdd[e].last_index=s),n!=-1&&this.arrayGamesAdd[e].status>0&&(this.arrayGamesAdd[e].status=s>=this.storiesItems[n].stories.length-1?0:1)}else{this.arrayGamesAdd=[];for(let e=0;e<this.storiesItems.length;e++)this.arrayGamesAdd.push({game_id:this.storiesItems[e].game_id,last_index:this.currentStories[0].gameId==this.storiesItems[e].game_id?s:0,status:this.currentStories[0].gameId==this.storiesItems[e].game_id&&s>=this.storiesItems[e].stories.length-1?0:1})}await Le.post(`https://ssh88fgvll.execute-api.us-east-2.amazonaws.com/prod/users/${this.user.id}/seasons/${this.seasonsSelected[0].id}/stories`,{stories:this.arrayGamesAdd},{headers:{Authorization:`${this.token}`,"Content-Type":"application/json"}});for(let e=0;e<this.arrayGamesAdd.length;e++)this.gamesAllStories.findIndex(t=>t.game_id===this.arrayGamesAdd[e].game_id)!=-1&&(this.gamesAllStories[this.gamesAllStories.findIndex(t=>t.game_id===this.arrayGamesAdd[e].game_id)].index=this.arrayGamesAdd[e].last_index,this.gamesAllStories[this.gamesAllStories.findIndex(t=>t.game_id===this.arrayGamesAdd[e].game_id)].status_storie=this.arrayGamesAdd[e].status)},async getLiveGamePlays(s){var n=(await Le.create({headers:{Authorization:`${this.token}`}}).get("https://cpj4073446.execute-api.us-east-2.amazonaws.com/prod/live/videos/plays/seasons/"+this.gamesAllStories[s].season_id+"/games/"+this.gamesAllStories[s].game_id)).data.plays.filter(l=>l[0]===607||l[0]===608||l[0]===12||l[0]===55||l[0]===54||l[0]===35||l[0]===15||l[0]===53);let i=n.map(l=>({playId:l[29],gameId:l[3],player:this.seasonPlayersMap.get(l[1]),categoryId:l[0],date:new Date(l[4]+"T"+l[5]),url:"https://falconvideolive.blob.core.windows.net/video-hls-live/"+this.gamesAllStories[s].game_id+"/"+this.gamesAllStories[s].game_id+".m3u8",type:"video",thumbnail:{logoHomeTeam:"https://golstatsimages.blob.core.windows.net/teams-80/"+this.gamesAllStories[s].home_team+".png",logoAwayTeam:"https://golstatsimages.blob.core.windows.net/teams-80/"+this.gamesAllStories[s].visiting_team+".png"},header:{label:this.gamesAllStories[s].home_team_acronym+" "+this.gamesAllStories[s].score[0]+":"+this.gamesAllStories[s].score[1]+" "+this.gamesAllStories[s].visiting_team_acronym+" "+this.gamesAllStories[s].matchday_name.replace("Matchday","JOR").replace("de Final","").replace("Playoffs 1","CFI").replace("Playoffs 2","CFV").replace("Playoffs 3","SFI").replace("Playoffs 4","SFV").replace("Playoffs 5","FI").replace("Playoffs 6","FV")},startTime:this.getPlayTime(l,9),endTime:this.getPlayTime(l,10),duration:Math.floor(this.getTimeSeconds(l[10])-this.getTimeSeconds(l[9]))}));const r={},o=i.filter(l=>r[l.playId]?!1:(r[l.playId]=!0,!0));this.storiesItems[s]={game_id:this.gamesAllStories[s].game_id,stories:o}},async openStory(s){const e={headers:{Authorization:`${this.token}`}},[t]=await Promise.all([Le.get(`https://ts7thxzaik.execute-api.us-west-2.amazonaws.com/prod/players/games/${this.gamesAllStories[s].game_id}`,e)]);t.data&&t.data.players.forEach(n=>{this.seasonPlayersMap.set(n.player_id,{dob:n.dob,first_name:n.first_name,jersey:n.jersey,last_name:n.last_name,name:n.name,player_name:n.name,nationality:n.nationality,nationality_id:n.nationality_id,nationality_photo:n.nationality_photo,photo:n.photo,player_id:n.player_id,position_id:n.position_id,short_name:n.short_name,team_id:n.team_id})}),this.gamesAllStories[s].is_live==1||this.gamesAllStories[s].game_status==0?(await this.getLiveGamePlays(s),setTimeout(()=>{this.currentStoryIndex=s,this.currentStories=this.storiesItems[s].stories,this.currentStoriesLastIndex=this.gamesAllStories[s].index},100)):(this.currentStoryIndex=s,this.currentStories=this.storiesItems[s].stories,this.currentStoriesLastIndex=this.gamesAllStories[s].index),setTimeout(()=>{this.isStoriesVisible=!0},150)},onCloseStories(s){this.currentStoriesLastIndex=0,this.isStoriesVisible=!1,this.$emit("event-posthog-stories",{event:"stories_cerrar",properties:{play_id:s?s.playId:null,game_id:s?s.gameId:null,category_id:s?s.categoryId:null,start_time:s?s.startTime:null,end_time:s?parseInt(s.currentTime):null,percentage_viewed:s?parseInt(s.progress):null}})},closeStories(){this.currentStoriesLastIndex=0,this.currentStoryIndex=null,this.currentStories=[]},onSwipeStories({direction:s,currentPlay:e}){s==="right"?(this.$emit("event-posthog-stories",{event:"stories_video_siguiente_partido",properties:{play_id:e?e.playId:null,game_id:e?e.gameId:null,category_id:e?e.categoryId:null,start_time:e?e.startTime:null,end_time:e?parseInt(e.currentTime):null,percentage_viewed:e?parseInt(e.progress):null}}),this.currentStoryIndex>0&&this.openStory(this.currentStoryIndex-1)):(this.$emit("event-posthog-stories",{event:"stories_video_anterior_partido",properties:{play_id:e?e.playId:null,game_id:e?e.gameId:null,category_id:e?e.categoryId:null,start_time:e?e.startTime:null,end_time:e?parseInt(e.currentTime):null,percentage_viewed:e?parseInt(e.progress):null}}),this.currentStoryIndex<this.storiesItems.length-1&&this.openStory(this.currentStoryIndex+1))},onClickNextBackVideo({eventName:s,currentPlay:e}){this.$emit("event-posthog-stories",{event:s,properties:{play_id:e?e.playId:null,game_id:e?e.gameId:null,category_id:e?e.categoryId:null,start_time:e?e.startTime:null,end_time:e?parseInt(e.currentTime):null,percentage_viewed:e?parseInt(e.progress):null}})},onChangeTournaments(s){this.currentTournaments=s},onClickStories(s){this.$emit("event-posthog-stories",{event:"stories_ver_play",properties:{game_id:s.game_id}})},onVideoPlay(s){this.$emit("event-posthog-stories",{event:"stories_play",properties:{play_id:s.playId,game_id:s.gameId,category_id:s.categoryId,start_time:s.startTime,end_time:s.endTime,percentage_viewed:0}})}},async created(){},beforeUnmount(){this.resetGamesLiveInterval()}},ys=s=>(a.pushScopeId("data-v-56204eeb"),s=s(),a.popScopeId(),s),c8={class:"gsclanding",ref:"landingref"},d8={key:2,class:"play-seeker-image"},u8={class:"play-seeker-image__info"},h8=ys(()=>a.createElementVNode("div",{class:"play-seeker-image__info__ai"},"Inteligencia Artificial",-1)),m8={class:"play-seeker-image__info__legends-and-button"},f8=ys(()=>a.createElementVNode("div",{class:"play-seeker-image__info__legends-and-button__legends"},"LEYENDAS PARA TI",-1)),g8={class:"play-icon"},p8=["src"],y8=ys(()=>a.createElementVNode("div",{class:"text"},"Explora videos",-1)),b8={class:"play-seeker-image__players"},w8=["src"],S8={key:3,class:"container-selectors-mobile"},_8={class:"container-selectors-mobile-tournament"},k8={class:"container-selectors-mobile-season"},E8={key:0,class:"home-item-movil"},T8=ys(()=>a.createElementVNode("div",{class:"home-movil"},"Inicio",-1)),C8={class:"name-user-movil"},x8={key:1,class:"home-item"},A8={key:2,class:"bar-settings"},L8={class:"name-user"},I8={class:"container-selectors"},B8={class:"selector-tournament"},R8={class:"selector-seasons"},v8={key:0,class:"container-games"},N8={key:0,class:"container-games"},D8={key:7,class:"container-players-myteam"},P8={key:2,class:"play-seeker-image"},O8={class:"play-seeker-image__info"},F8=ys(()=>a.createElementVNode("div",{class:"play-seeker-image__info__ai"},"Inteligencia Artificial",-1)),M8={class:"play-seeker-image__info__legends-and-button"},V8=ys(()=>a.createElementVNode("div",{class:"play-seeker-image__info__legends-and-button__legends"},"LEYENDAS PARA TI",-1)),$8={class:"play-icon"},U8=["src"],z8=ys(()=>a.createElementVNode("div",{class:"text"},"Explora videos",-1)),G8={class:"play-seeker-image__players"},j8=["src"],H8={key:3,class:"container-selectors-mobile"},W8={class:"container-selectors-mobile-tournament"},K8={class:"container-selectors-mobile-season"},q8={key:0,class:"home-item-movil"},Y8=ys(()=>a.createElementVNode("div",{class:"home-movil"},"Inicio",-1)),J8={class:"name-user-movil"},X8={key:1,class:"home-item"},Z8={key:2,class:"bar-settings"},Q8={class:"name-user"},eF={class:"container-selectors"},tF={class:"selector-tournament"},sF={class:"selector-seasons"},nF={key:3,class:"container-games"},aF={key:5,class:"container-players"};function iF(s,e,t,n,i,r){const o=a.resolveComponent("Stories"),l=a.resolveComponent("CarouselFullScreen"),d=a.resolveComponent("GSCTournamentSelect"),c=a.resolveComponent("GSCSeasonSelect"),u=a.resolveComponent("GSCGridTeamsMatches"),m=a.resolveComponent("GSCTableCalendar"),f=a.resolveComponent("GSCGames");a.resolveComponent("DiscoverVideos");const p=a.resolveComponent("GSCPlayersLanding"),h=a.resolveComponent("GSCTops");return a.resolveComponent("GSCSlider"),a.openBlock(),a.createElementBlock("div",c8,[t.isplayer?(a.openBlock(),a.createElementBlock(a.Fragment,{key:0},[i.isStoriesVisible&&t.showStories?(a.openBlock(),a.createBlock(o,{key:0,stories:i.currentStories,"start-story-index":i.currentStoriesLastIndex,"is-first-game-stories":i.currentStoryIndex===0,"is-last-game-stories":i.currentStoryIndex===i.storiesItems.length-1,onLastStoryIndex:r.changeIndexStory,onClose:r.onCloseStories,onSwipe:r.onSwipeStories,onVideoNextBack:r.onClickNextBackVideo,onVideoPlay:r.onVideoPlay},null,8,["stories","start-story-index","is-first-game-stories","is-last-game-stories","onLastStoryIndex","onClose","onSwipe","onVideoNextBack","onVideoPlay"])):a.createCommentVNode("",!0),i.isCarouselFullScreenVisible?(a.openBlock(),a.createBlock(l,{key:1,"player-queue":i.carouselPlayerQueue,"is-play-seeker":i.isPlaySeeker,"playlist-index":0,onClose:r.onClickCloseCarousel},null,8,["player-queue","is-play-seeker","onClose"])):a.createCommentVNode("",!0),r.isPlaySeekerAvailable?(a.openBlock(),a.createElementBlock("div",d8,[a.createElementVNode("div",u8,[h8,a.createElementVNode("div",m8,[f8,a.createElementVNode("div",{role:"button",class:"play-seeker-image__info__legends-and-button__button",onClick:e[0]||(e[0]=(...g)=>r.onClickPlaySeeker&&r.onClickPlaySeeker(...g))},[a.createElementVNode("div",g8,[a.createElementVNode("img",{src:`${i.imagesUrl}icn-play.svg`,alt:""},null,8,p8)]),y8])])]),a.createElementVNode("div",b8,[a.createElementVNode("img",{src:`${i.imagesUrl}players@2x.png`,alt:""},null,8,w8)])])):a.createCommentVNode("",!0),n.elementSize.width<=680&&n.elementSize.width>0?(a.openBlock(),a.createElementBlock("div",S8,[a.createElementVNode("div",_8,[a.createVNode(d,{"current-season-id":t.currentSeasonId,width:"100%","api-url":t.tournamentsApiUrl,onInput:r.onInputTournament,onChangeTournaments:r.onChangeTournaments},null,8,["current-season-id","api-url","onInput","onChangeTournaments"])]),a.createElementVNode("div",k8,[a.createVNode(c,{"current-season-id":t.currentSeasonId,width:"100%",seasons:i.tournamentSelectedDropDowns.seasons,onInput:r.onInputSeason},null,8,["current-season-id","seasons","onInput"])])])):a.createCommentVNode("",!0),a.createElementVNode("div",{class:a.normalizeClass(r.containerbackground)},[a.createElementVNode("div",{class:a.normalizeClass(r.containerdata)},[n.elementSize.width<=680?(a.openBlock(),a.createElementBlock("div",E8,[T8,a.createElementVNode("div",C8,[t.isFemale?(a.openBlock(),a.createElementBlock(a.Fragment,{key:0},[a.createTextVNode("Bienvenida ")],64)):(a.openBlock(),a.createElementBlock(a.Fragment,{key:1},[a.createTextVNode("Bienvenido ")],64)),i.is_public?(a.openBlock(),a.createElementBlock(a.Fragment,{key:2},[a.createTextVNode("a GolStats ")],64)):(a.openBlock(),a.createElementBlock(a.Fragment,{key:3},[a.createTextVNode(a.toDisplayString(r.formatUsername(t.user.name)),1)],64))])])):a.createCommentVNode("",!0),n.elementSize.width>680?(a.openBlock(),a.createElementBlock("div",x8,"Inicio")):a.createCommentVNode("",!0),n.elementSize.width>680?(a.openBlock(),a.createElementBlock("div",A8,[a.createElementVNode("div",L8,[t.isFemale?(a.openBlock(),a.createElementBlock(a.Fragment,{key:0},[a.createTextVNode("Bienvenida ")],64)):(a.openBlock(),a.createElementBlock(a.Fragment,{key:1},[a.createTextVNode("Bienvenido ")],64)),i.is_public?(a.openBlock(),a.createElementBlock(a.Fragment,{key:2},[a.createTextVNode("a GolStats ")],64)):(a.openBlock(),a.createElementBlock(a.Fragment,{key:3},[a.createTextVNode(a.toDisplayString(r.formatUsername(t.user.name)),1)],64))]),a.createElementVNode("div",I8,[a.createElementVNode("div",B8,[a.createVNode(d,{"current-season-id":t.currentSeasonId,"api-url":t.tournamentsApiUrl,onInput:r.onInputTournament,onChangeTournaments:r.onChangeTournaments},null,8,["current-season-id","api-url","onInput","onChangeTournaments"])]),a.createElementVNode("div",R8,[a.createVNode(c,{"current-season-id":t.currentSeasonId,seasons:i.tournamentSelectedDropDowns.seasons,onInput:r.onInputSeason},null,8,["current-season-id","seasons","onInput"])])])])):a.createCommentVNode("",!0),t.user.tournament===i.tournamentSelected.id?(a.openBlock(),a.createElementBlock(a.Fragment,{key:3},[a.createElementVNode("div",{class:a.normalizeClass(r.containerGridCalendarTable)},[a.createElementVNode("div",{class:"container-grid",style:a.normalizeStyle([n.elementSize.width<=1e3?"width: 100%; ":"",!(t.isplayer&&!r.isGenericLike)&&r.isGenericLike?"max-height: 380px !important;":"max-height: 480px !important; margin-top: 15px !important;"])},[n.elementSize.width>1e3?(a.openBlock(),a.createBlock(u,{key:0,isPlayer:t.isplayer&&!r.isGenericLike,"player-id":t.user.player,"team-id":t.user.team,"is-female":i.tournamentSelected.is_female==1,"tournament-selected":i.tournamentSelected,"is-public":i.is_public,"season-selected":i.seasonSelected.id,"next-rival-id":Object.keys(i.fullTournamentSchedule).length>0?t.user.team==i.fullTournamentSchedule.data.prematch.home_team?i.fullTournamentSchedule.data.prematch.visiting_team:i.fullTournamentSchedule.data.prematch.home_team:0,"team-img":"https://golstatsimages.blob.core.windows.net/teams-150/"+t.user.team+".png","player-img":"https://golstatsimages.blob.core.windows.net/players-profile/"+t.user.player+".png","rival-img":Object.keys(i.fullTournamentSchedule).length>0?t.user.team==i.fullTournamentSchedule.data.prematch.home_team?"https://golstatsimages.blob.core.windows.net/teams-150/"+i.fullTournamentSchedule.data.prematch.visiting_team+".png":"https://golstatsimages.blob.core.windows.net/teams-150/"+i.fullTournamentSchedule.data.prematch.home_team+".png":"","has-team":!r.isGenericLike,"component-width":n.elementSize.width,onAction:r.clickCard},null,8,["isPlayer","player-id","team-id","is-female","tournament-selected","is-public","season-selected","next-rival-id","team-img","player-img","rival-img","has-team","component-width","onAction"])):(a.openBlock(),a.createBlock(u,{key:1,isPlayer:!1,"player-id":t.user.player,"is-female":i.tournamentSelected.is_female==1,"team-id":t.user.team,"is-player-mobile1":t.isplayer&&!r.isGenericLike,"tournament-selected":i.tournamentSelected,"is-public":i.is_public,"season-selected":i.seasonSelected.id,"next-rival-id":Object.keys(i.fullTournamentSchedule).length>0?t.user.team==i.fullTournamentSchedule.data.prematch.home_team?i.fullTournamentSchedule.data.prematch.visiting_team:i.fullTournamentSchedule.data.prematch.home_team:0,"team-img":"https://golstatsimages.blob.core.windows.net/teams-150/"+t.user.team+".png","player-img":"https://golstatsimages.blob.core.windows.net/players-profile/"+t.user.player+".png","rival-img":Object.keys(i.fullTournamentSchedule).length>0?t.user.team==i.fullTournamentSchedule.data.prematch.home_team?"https://golstatsimages.blob.core.windows.net/teams-150/"+i.fullTournamentSchedule.data.prematch.visiting_team+".png":"https://golstatsimages.blob.core.windows.net/teams-150/"+i.fullTournamentSchedule.data.prematch.home_team+".png":"","has-team":!1,"component-width":n.elementSize.width,onAction:r.clickCard},null,8,["player-id","is-female","team-id","is-player-mobile1","tournament-selected","is-public","season-selected","next-rival-id","team-img","player-img","rival-img","component-width","onAction"]))],4),a.withDirectives(a.createElementVNode("div",{class:"container-calendar-table",style:a.normalizeStyle(n.elementSize.width<1e3?"width: 100%;":"")},[i.isPreviousDataLoaded?(a.openBlock(),a.createBlock(m,{season:i.seasonSelected,seasons:i.seasonsSelected,"tournament-type":i.tournamentType,tournament:i.tournamentSelected.id,privileges:t.privileges,"is-public":i.is_public,"is-player":t.isplayer,"is-player-tournament":t.user.tournament===i.tournamentSelected.id,"is-generic":r.isGenericLike,key:i.updateTableCalendar,"team-id":r.teamSelected,componentWidth:n.elementSize&&n.elementSize.width?n.elementSize.width:0,tournaments:i.currentTournaments,onAction:r.onAction,onOnOpenProfile:r.onOpenProfile,onOpenmedia:r.onOpenMedia},null,8,["season","seasons","tournament-type","tournament","privileges","is-public","is-player","is-player-tournament","is-generic","team-id","componentWidth","tournaments","onAction","onOnOpenProfile","onOpenmedia"])):a.createCommentVNode("",!0)],4),[[a.vShow,n.elementSize.width>1e3]])],2),Object.keys(i.tournamentSelected).length>0?(a.openBlock(),a.createElementBlock("div",v8,[a.createVNode(f,{"component-width":n.elementSize.width,isplayer:t.isplayer,"is-full":r.isGenericLike,data:r.games,"tournament-schedule-keys":i.tournamentScheduleKeys,"default-match-day-key":i.selectedRound,user:t.user,"current-tournament":i.tournamentSelected,"current-season":i.seasonSelected.id,"is-live-button-visible":!!i.allLiveGames.length,onClickCalendar:r.onClickCalendar,onClickMatch:r.onClickMatch,onChangeMatchDay:r.onChangeMatchDayGames,onChangeIsLeagueSelected:r.onChangeIsLeagueSelected,onClickLive:r.onClickLive},null,8,["component-width","isplayer","is-full","data","tournament-schedule-keys","default-match-day-key","user","current-tournament","current-season","is-live-button-visible","onClickCalendar","onClickMatch","onChangeMatchDay","onChangeIsLeagueSelected","onClickLive"])])):a.createCommentVNode("",!0)],64)):(a.openBlock(),a.createElementBlock(a.Fragment,{key:4},[Object.keys(i.tournamentSelected).length>0?(a.openBlock(),a.createElementBlock("div",N8,[a.createVNode(f,{"component-width":n.elementSize.width,isplayer:t.isplayer,"is-full":r.isGenericLike,data:r.games,"tournament-schedule-keys":i.tournamentScheduleKeys,"default-match-day-key":i.selectedRound,user:t.user,"current-tournament":i.tournamentSelected,"current-season":i.seasonSelected.id,"is-live-button-visible":!!i.allLiveGames.length,onClickCalendar:r.onClickCalendar,onClickMatch:r.onClickMatch,onChangeMatchDay:r.onChangeMatchDayGames,onChangeIsLeagueSelected:r.onChangeIsLeagueSelected,onClickLive:r.onClickLive},null,8,["component-width","isplayer","is-full","data","tournament-schedule-keys","default-match-day-key","user","current-tournament","current-season","is-live-button-visible","onClickCalendar","onClickMatch","onChangeMatchDay","onChangeIsLeagueSelected","onClickLive"])])):a.createCommentVNode("",!0),a.createElementVNode("div",{class:a.normalizeClass(r.containerGridCalendarTable)},[a.createElementVNode("div",{class:"container-grid",style:a.normalizeStyle([n.elementSize.width<=1e3?"width: 100%; ":"",!(t.isplayer&&!r.isGenericLike)&&r.isGenericLike?"max-height: 380px !important;":"max-height: 480px !important; margin-top: 15px !important;"])},[a.createVNode(u,{isPlayer:t.isplayer&&!r.isGenericLike,"player-id":t.user.player,"team-id":t.user.team,"tournament-selected":i.tournamentSelected,"is-public":i.is_public,"is-female":i.tournamentSelected.is_female==1,"season-selected":i.seasonSelected.id,"next-rival-id":Object.keys(i.fullTournamentSchedule).length>0?t.user.team==i.fullTournamentSchedule.data.prematch.home_team?i.fullTournamentSchedule.data.prematch.visiting_team:i.fullTournamentSchedule.data.prematch.home_team:0,"team-img":"https://golstatsimages.blob.core.windows.net/teams-150/"+t.user.team+".png","player-img":"https://golstatsimages.blob.core.windows.net/players-profile/"+t.user.player+".png","rival-img":Object.keys(i.fullTournamentSchedule).length>0?t.user.team==i.fullTournamentSchedule.data.prematch.home_team?"https://golstatsimages.blob.core.windows.net/teams-150/"+i.fullTournamentSchedule.data.prematch.visiting_team+".png":"https://golstatsimages.blob.core.windows.net/teams-150/"+i.fullTournamentSchedule.data.prematch.home_team+".png":"","has-team":!r.isGenericLike,"component-width":n.elementSize.width,onAction:r.clickCard},null,8,["isPlayer","player-id","team-id","tournament-selected","is-public","is-female","season-selected","next-rival-id","team-img","player-img","rival-img","has-team","component-width","onAction"])],4),a.withDirectives(a.createElementVNode("div",{class:"container-calendar-table",style:a.normalizeStyle(n.elementSize.width<=1e3?"width: 100%; margin-top: 30px;":"")},[i.isPreviousDataLoaded?(a.openBlock(),a.createBlock(m,{season:i.seasonSelected,seasons:i.seasonsSelected,"tournament-type":i.tournamentType,tournament:i.tournamentSelected.id,privileges:t.privileges,"is-public":i.is_public,"is-player":t.isplayer,"is-player-tournament":t.user.tournament===i.tournamentSelected.id,"is-generic":r.isGenericLike,key:i.updateTableCalendar,"team-id":r.teamSelected,componentWidth:n.elementSize&&n.elementSize.width?n.elementSize.width:0,tournaments:i.currentTournaments,onAction:r.onAction,onOnOpenProfile:r.onOpenProfile,onOpenmedia:r.onOpenMedia},null,8,["season","seasons","tournament-type","tournament","privileges","is-public","is-player","is-player-tournament","is-generic","team-id","componentWidth","tournaments","onAction","onOnOpenProfile","onOpenmedia"])):a.createCommentVNode("",!0)],4),[[a.vShow,n.elementSize.width>1e3]])],2)],64)),a.createCommentVNode("",!0),r.isGenericLike?a.createCommentVNode("",!0):a.withDirectives((a.openBlock(),a.createElementBlock("div",{key:r.teamRival,class:"container-players"},[i.isPreviousDataLoaded?(a.openBlock(),a.createBlock(p,{key:r.teamRival,"tournament-selected":i.tournamentSelected,onClickProfileBtn:r.clickProfileBtn,onViewAll:r.viewAllRival,"is-rival":!0,onTotalPlayers:r.getTotalPlayersRival,"team-id":r.teamRival,"season-id":i.seasonSelected.id,"is-player":!0},null,8,["tournament-selected","onClickProfileBtn","onViewAll","onTotalPlayers","team-id","season-id"])):a.createCommentVNode("",!0)])),[[a.vShow,i.playersLengthRival>0&&r.teamRival>0]]),r.isGenericLike?a.createCommentVNode("",!0):a.withDirectives((a.openBlock(),a.createElementBlock("div",D8,[i.isPreviousDataLoaded?(a.openBlock(),a.createBlock(p,{key:0,"tournament-selected":i.tournamentSelected,onClickProfileBtn:r.clickProfileBtn,onViewAll:r.viewAll,onTotalPlayers:r.getTotalPlayers,"team-id":t.user.team,"season-id":i.seasonSelected.id,"is-player":!!t.user.player},null,8,["tournament-selected","onClickProfileBtn","onViewAll","onTotalPlayers","team-id","season-id","is-player"])):a.createCommentVNode("",!0)],512)),[[a.vShow,i.playersLength>0]]),n.elementSize.width<1e3&&t.isplayer&&!r.isGenericLike?(a.openBlock(),a.createElementBlock("div",{key:8,class:a.normalizeClass(r.containerGridCalendarTable)},[a.createElementVNode("div",{class:"container-grid",style:a.normalizeStyle([n.elementSize.width<=1e3?"width: 100%; ":"",!(t.isplayer&&!r.isGenericLike)&&r.isGenericLike?"max-height: 380px !important;":"max-height: 480px !important; margin-top: 65px !important;"])},[n.elementSize.width<1e3?(a.openBlock(),a.createBlock(u,{key:0,isPlayer:!1,"player-id":t.user.player,"team-id":t.user.team,"is-player-mobile2":t.isplayer&&!r.isGenericLike,"tournament-selected":i.tournamentSelected,"is-public":i.is_public,"is-female":i.tournamentSelected.is_female==1,"season-selected":i.seasonSelected.id,"next-rival-id":Object.keys(i.fullTournamentSchedule).length>0?t.user.team==i.fullTournamentSchedule.data.prematch.home_team?i.fullTournamentSchedule.data.prematch.visiting_team:i.fullTournamentSchedule.data.prematch.home_team:0,"team-img":"https://golstatsimages.blob.core.windows.net/teams-150/"+t.user.team+".png","player-img":"https://golstatsimages.blob.core.windows.net/players-profile/"+t.user.player+".png","rival-img":Object.keys(i.fullTournamentSchedule).length>0?t.user.team==i.fullTournamentSchedule.data.prematch.home_team?"https://golstatsimages.blob.core.windows.net/teams-150/"+i.fullTournamentSchedule.data.prematch.visiting_team+".png":"https://golstatsimages.blob.core.windows.net/teams-150/"+i.fullTournamentSchedule.data.prematch.home_team+".png":"","has-team":!1,"component-width":n.elementSize.width,onAction:r.clickCard},null,8,["player-id","team-id","is-player-mobile2","tournament-selected","is-public","is-female","season-selected","next-rival-id","team-img","player-img","rival-img","component-width","onAction"])):a.createCommentVNode("",!0)],4)],2)):a.createCommentVNode("",!0),a.createElementVNode("div",{class:a.normalizeClass(["container-tops",t.user.tournament===i.tournamentSelected.id?"tops-player":""]),style:a.normalizeStyle(t.isplayer&&!r.isGenericLike&&n.elementSize.width<1e3?"margin-top: 35px !important;":i.playersLengthRival==0&&i.playersLength==0&&n.elementSize.width>1e3?"margin-top: 25px !important;":"")},[i.isPreviousDataLoaded?(a.openBlock(),a.createBlock(h,{key:0,"tournament-selected":i.tournamentSelected,onMore:r.moreTops,"show-switch":!r.isGenericLike,season:i.seasonSelected.id,"show-more":!i.is_public,"team-id":t.user.team,"active-videos":i.is_public?t.privileges.vr_privileges:!0,onOpenmedia:r.onOpenMedia},null,8,["tournament-selected","onMore","show-switch","season","show-more","team-id","active-videos","onOpenmedia"])):a.createCommentVNode("",!0)],6),a.createCommentVNode("",!0),a.withDirectives(a.createElementVNode("div",{class:"container-calendar-table",style:a.normalizeStyle(n.elementSize.width<1e3?"width: 100%; ":"")},[i.isPreviousDataLoaded?(a.openBlock(),a.createBlock(m,{season:i.seasonSelected,seasons:i.seasonsSelected,"tournament-type":i.tournamentType,tournament:i.tournamentSelected.id,privileges:t.privileges,"is-public":i.is_public,"is-player":t.isplayer,"is-player-tournament":t.user.tournament===i.tournamentSelected.id,"is-generic":r.isGenericLike,key:i.updateTableCalendar,"team-id":r.teamSelected,componentWidth:n.elementSize&&n.elementSize.width?n.elementSize.width:0,tournaments:i.currentTournaments,onAction:r.onAction,onOnOpenProfile:r.onOpenProfile,onOpenmedia:r.onOpenMedia},null,8,["season","seasons","tournament-type","tournament","privileges","is-public","is-player","is-player-tournament","is-generic","team-id","componentWidth","tournaments","onAction","onOnOpenProfile","onOpenmedia"])):a.createCommentVNode("",!0)],4),[[a.vShow,n.elementSize.width<1e3]]),i.is_public?(a.openBlock(),a.createElementBlock("div",{key:10,class:"b2c-image",onClick:e[1]||(e[1]=(...g)=>r.abrirNuevaVentana&&r.abrirNuevaVentana(...g))})):a.createCommentVNode("",!0)],2)],2)],64)):(a.openBlock(),a.createElementBlock(a.Fragment,{key:1},[i.isStoriesVisible&&t.showStories?(a.openBlock(),a.createBlock(o,{key:0,stories:i.currentStories,"start-story-index":i.currentStoriesLastIndex,"is-first-game-stories":i.currentStoryIndex===0,"is-last-game-stories":i.currentStoryIndex===i.storiesItems.length-1,onLastStoryIndex:r.changeIndexStory,onClose:r.onCloseStories,onSwipe:r.onSwipeStories,onVideoNextBack:r.onClickNextBackVideo,onVideoPlay:r.onVideoPlay},null,8,["stories","start-story-index","is-first-game-stories","is-last-game-stories","onLastStoryIndex","onClose","onSwipe","onVideoNextBack","onVideoPlay"])):a.createCommentVNode("",!0),i.isCarouselFullScreenVisible?(a.openBlock(),a.createBlock(l,{key:1,"player-queue":i.carouselPlayerQueue,"is-play-seeker":i.isPlaySeeker,"playlist-index":0,onClose:r.onClickCloseCarousel},null,8,["player-queue","is-play-seeker","onClose"])):a.createCommentVNode("",!0),r.isPlaySeekerAvailable?(a.openBlock(),a.createElementBlock("div",P8,[a.createElementVNode("div",O8,[F8,a.createElementVNode("div",M8,[V8,a.createElementVNode("div",{role:"button",class:"play-seeker-image__info__legends-and-button__button",onClick:e[2]||(e[2]=(...g)=>r.onClickPlaySeeker&&r.onClickPlaySeeker(...g))},[a.createElementVNode("div",$8,[a.createElementVNode("img",{src:`${i.imagesUrl}icn-play.svg`,alt:""},null,8,U8)]),z8])])]),a.createElementVNode("div",G8,[a.createElementVNode("img",{src:`${i.imagesUrl}players@2x.png`,alt:""},null,8,j8)])])):a.createCommentVNode("",!0),n.elementSize.width<=680&&n.elementSize.width>0?(a.openBlock(),a.createElementBlock("div",H8,[a.createElementVNode("div",W8,[a.createVNode(d,{"current-season-id":t.currentSeasonId,width:"100%","api-url":t.tournamentsApiUrl,onInput:r.onInputTournament,onChangeTournaments:r.onChangeTournaments},null,8,["current-season-id","api-url","onInput","onChangeTournaments"])]),a.createElementVNode("div",K8,[a.createVNode(c,{"current-season-id":t.currentSeasonId,width:"100%",seasons:i.tournamentSelectedDropDowns.seasons,onInput:r.onInputSeason},null,8,["current-season-id","seasons","onInput"])])])):a.createCommentVNode("",!0),a.createElementVNode("div",{class:a.normalizeClass(r.containerbackground)},[a.createElementVNode("div",{class:a.normalizeClass(r.containerdata)},[n.elementSize.width<=680?(a.openBlock(),a.createElementBlock("div",q8,[Y8,a.createElementVNode("div",J8,[t.isFemale?(a.openBlock(),a.createElementBlock(a.Fragment,{key:0},[a.createTextVNode("Bienvenida ")],64)):(a.openBlock(),a.createElementBlock(a.Fragment,{key:1},[a.createTextVNode("Bienvenido ")],64)),i.is_public?(a.openBlock(),a.createElementBlock(a.Fragment,{key:2},[a.createTextVNode("a GolStats ")],64)):(a.openBlock(),a.createElementBlock(a.Fragment,{key:3},[a.createTextVNode(a.toDisplayString(r.formatUsername(t.user.name)),1)],64))])])):a.createCommentVNode("",!0),n.elementSize.width>680?(a.openBlock(),a.createElementBlock("div",X8,"Inicio")):a.createCommentVNode("",!0),n.elementSize.width>680?(a.openBlock(),a.createElementBlock("div",Z8,[a.createElementVNode("div",Q8,[t.isFemale?(a.openBlock(),a.createElementBlock(a.Fragment,{key:0},[a.createTextVNode("Bienvenida ")],64)):(a.openBlock(),a.createElementBlock(a.Fragment,{key:1},[a.createTextVNode("Bienvenido ")],64)),i.is_public?(a.openBlock(),a.createElementBlock(a.Fragment,{key:2},[a.createTextVNode("a GolStats ")],64)):(a.openBlock(),a.createElementBlock(a.Fragment,{key:3},[a.createTextVNode(a.toDisplayString(r.formatUsername(t.user.name)),1)],64))]),a.createElementVNode("div",eF,[a.createElementVNode("div",tF,[a.createVNode(d,{"current-season-id":t.currentSeasonId,"api-url":t.tournamentsApiUrl,onInput:r.onInputTournament,onChangeTournaments:r.onChangeTournaments},null,8,["current-season-id","api-url","onInput","onChangeTournaments"])]),a.createElementVNode("div",sF,[a.createVNode(c,{"current-season-id":t.currentSeasonId,seasons:i.tournamentSelectedDropDowns.seasons,onInput:r.onInputSeason},null,8,["current-season-id","seasons","onInput"])])])])):a.createCommentVNode("",!0),Object.keys(i.tournamentSelected).length>0?(a.openBlock(),a.createElementBlock("div",nF,[a.createVNode(f,{"component-width":n.elementSize.width,isplayer:t.isplayer,"is-full":r.isGenericLike,data:r.games,"tournament-schedule-keys":i.tournamentScheduleKeys,"default-match-day-key":i.selectedRound,user:t.user,"current-tournament":i.tournamentSelected,"current-season":i.seasonSelected.id,"is-live-button-visible":!!i.allLiveGames.length,onClickCalendar:r.onClickCalendar,onClickMatch:r.onClickMatch,onChangeMatchDay:r.onChangeMatchDayGames,onChangeIsLeagueSelected:r.onChangeIsLeagueSelected,onClickLive:r.onClickLive},null,8,["component-width","isplayer","is-full","data","tournament-schedule-keys","default-match-day-key","user","current-tournament","current-season","is-live-button-visible","onClickCalendar","onClickMatch","onChangeMatchDay","onChangeIsLeagueSelected","onClickLive"])])):a.createCommentVNode("",!0),a.createCommentVNode("",!0),a.createElementVNode("div",{class:a.normalizeClass(r.containerGridCalendarTable)},[a.createElementVNode("div",{class:"container-grid",style:a.normalizeStyle([n.elementSize.width<=1e3?"width: 100%; ":"",!(t.isplayer&&!r.isGenericLike)&&r.isGenericLike?"max-height: 380px !important;":"max-height: 480px !important; margin-top: 15px !important;"])},[a.createVNode(u,{isPlayer:t.isplayer&&!r.isGenericLike,"player-id":t.user.player,"team-id":t.user.team,"is-female":i.tournamentSelected.is_female==1,"tournament-selected":i.tournamentSelected,"is-public":i.is_public,"season-selected":i.seasonSelected.id,"next-rival-id":Object.keys(i.fullTournamentSchedule).length>0?t.user.team==i.fullTournamentSchedule.data.prematch.home_team?i.fullTournamentSchedule.data.prematch.visiting_team:i.fullTournamentSchedule.data.prematch.home_team:0,"team-img":"https://golstatsimages.blob.core.windows.net/teams-150/"+t.user.team+".png","player-img":"https://golstatsimages.blob.core.windows.net/players-profile/"+t.user.player+".png","rival-img":Object.keys(i.fullTournamentSchedule).length>0?t.user.team==i.fullTournamentSchedule.data.prematch.home_team?"https://golstatsimages.blob.core.windows.net/teams-150/"+i.fullTournamentSchedule.data.prematch.visiting_team+".png":"https://golstatsimages.blob.core.windows.net/teams-150/"+i.fullTournamentSchedule.data.prematch.home_team+".png":"","has-team":!r.isGenericLike,"component-width":n.elementSize.width,onAction:r.clickCard},null,8,["isPlayer","player-id","team-id","is-female","tournament-selected","is-public","season-selected","next-rival-id","team-img","player-img","rival-img","has-team","component-width","onAction"])],4),a.withDirectives(a.createElementVNode("div",{class:"container-calendar-table",style:a.normalizeStyle(n.elementSize.width<=1e3?"width: 100%; margin-top: 30px;":"")},[i.isPreviousDataLoaded?(a.openBlock(),a.createBlock(m,{season:i.seasonSelected,seasons:i.seasonsSelected,"tournament-type":i.tournamentType,tournament:i.tournamentSelected.id,privileges:t.privileges,"is-public":i.is_public,"is-player":t.isplayer,"is-player-tournament":t.user.tournament===i.tournamentSelected.id,"is-generic":r.isGenericLike,key:i.updateTableCalendar,"team-id":r.teamSelected,componentWidth:n.elementSize&&n.elementSize.width?n.elementSize.width:0,tournaments:i.currentTournaments,onAction:r.onAction,onOnOpenProfile:r.onOpenProfile,onOpenmedia:r.onOpenMedia},null,8,["season","seasons","tournament-type","tournament","privileges","is-public","is-player","is-player-tournament","is-generic","team-id","componentWidth","tournaments","onAction","onOnOpenProfile","onOpenmedia"])):a.createCommentVNode("",!0)],4),[[a.vShow,n.elementSize.width>1e3]])],2),r.isGenericLike?a.createCommentVNode("",!0):a.withDirectives((a.openBlock(),a.createElementBlock("div",aF,[i.isPreviousDataLoaded?(a.openBlock(),a.createBlock(p,{key:0,"tournament-selected":i.tournamentSelected,onClickProfileBtn:r.clickProfileBtn,onViewAll:r.viewAll,onTotalPlayers:r.getTotalPlayers,"team-id":t.user.team,"season-id":i.seasonSelected.id,"is-player":!!t.user.player},null,8,["tournament-selected","onClickProfileBtn","onViewAll","onTotalPlayers","team-id","season-id","is-player"])):a.createCommentVNode("",!0)],512)),[[a.vShow,i.playersLength>0]]),a.createElementVNode("div",{class:a.normalizeClass(["container-tops",t.user.tournament===i.tournamentSelected.id&&!i.is_public&&!r.isGenericLike?"tops-team":""]),style:a.normalizeStyle(!(t.isplayer&&!r.isGenericLike)&&r.isGenericLike&&n.elementSize.width<=1e3||i.playersLengthRival==0&&i.playersLength==0&&n.elementSize.width>1e3?"margin-top: 25px !important;":"")},[i.isPreviousDataLoaded?(a.openBlock(),a.createBlock(h,{key:0,"tournament-selected":i.tournamentSelected,onMore:r.moreTops,"show-switch":!r.isGenericLike,season:i.seasonSelected.id,"show-more":!i.is_public,"team-id":t.user.team,"active-videos":i.is_public?t.privileges.vr_privileges:!0,onOpenmedia:r.onOpenMedia},null,8,["tournament-selected","onMore","show-switch","season","show-more","team-id","active-videos","onOpenmedia"])):a.createCommentVNode("",!0)],6),a.createCommentVNode("",!0),a.withDirectives(a.createElementVNode("div",{class:"container-calendar-table",style:a.normalizeStyle(n.elementSize.width<=1e3?"width: 100%; ":"")},[i.isPreviousDataLoaded?(a.openBlock(),a.createBlock(m,{season:i.seasonSelected,seasons:i.seasonsSelected,"tournament-type":i.tournamentType,tournament:i.tournamentSelected.id,privileges:t.privileges,"is-public":i.is_public,"is-player":t.isplayer,"is-player-tournament":t.user.tournament===i.tournamentSelected.id,"is-generic":r.isGenericLike,key:i.updateTableCalendar,"team-id":r.teamSelected,componentWidth:n.elementSize&&n.elementSize.width?n.elementSize.width:0,tournaments:i.currentTournaments,onAction:r.onAction,onOnOpenProfile:r.onOpenProfile,onOpenmedia:r.onOpenMedia},null,8,["season","seasons","tournament-type","tournament","privileges","is-public","is-player","is-player-tournament","is-generic","team-id","componentWidth","tournaments","onAction","onOnOpenProfile","onOpenmedia"])):a.createCommentVNode("",!0)],4),[[a.vShow,n.elementSize.width<1e3]]),i.is_public?(a.openBlock(),a.createElementBlock("div",{key:7,class:"b2c-image",onClick:e[3]||(e[3]=(...g)=>r.abrirNuevaVentana&&r.abrirNuevaVentana(...g))})):a.createCommentVNode("",!0)],2)],2)],64))],512)}const rF=et(l8,[["render",iF],["__scopeId","data-v-56204eeb"]]);bs.GSCLanding=rF,Object.defineProperty(bs,Symbol.toStringTag,{value:"Module"})});
67
+ } (data length: ${t&&t.byteLength})`),i.update(t)}selectKeySystemFormat(e){const t=Object.keys(e.levelkeys||{});return this.keyFormatPromise||(this.log(`Selecting key-system from fragment (sn: ${e.sn} ${e.type}: ${e.level}) key formats ${t.join(", ")}`),this.keyFormatPromise=this.getKeyFormatPromise(t)),this.keyFormatPromise}getKeyFormatPromise(e){return new Promise((t,n)=>{const i=oi(this.config),r=e.map(cl).filter(o=>!!o&&i.indexOf(o)!==-1);return this.getKeySystemSelectionPromise(r).then(({keySystem:o})=>{const l=ul(o);l?t(l):n(new Error(`Unable to find format for key-system "${o}"`))}).catch(n)})}loadKey(e){const t=e.keyInfo.decryptdata,n=this.getKeyIdString(t),i=`(keyId: ${n} format: "${t.keyFormat}" method: ${t.method} uri: ${t.uri})`;this.log(`Starting session for key ${i}`);let r=this.keyIdToKeySessionPromise[n];return r||(r=this.keyIdToKeySessionPromise[n]=this.getKeySystemForKeyPromise(t).then(({keySystem:o,mediaKeys:l})=>(this.throwIfDestroyed(),this.log(`Handle encrypted media sn: ${e.frag.sn} ${e.frag.type}: ${e.frag.level} using key ${i}`),this.attemptSetMediaKeys(o,l).then(()=>{this.throwIfDestroyed();const d=this.createMediaKeySessionContext({keySystem:o,mediaKeys:l,decryptdata:t});return this.generateRequestWithPreferredKeySession(d,"cenc",t.pssh,"playlist-key")}))),r.catch(o=>this.handleError(o))),r}throwIfDestroyed(e="Invalid state"){if(!this.hls)throw new Error("invalid state")}handleError(e){this.hls&&(this.error(e.message),e instanceof It?this.hls.trigger(S.ERROR,e.data):this.hls.trigger(S.ERROR,{type:ge.KEY_SYSTEM_ERROR,details:N.KEY_SYSTEM_NO_KEYS,error:e,fatal:!0}))}getKeySystemForKeyPromise(e){const t=this.getKeyIdString(e),n=this.keyIdToKeySessionPromise[t];if(!n){const i=cl(e.keyFormat),r=i?[i]:oi(this.config);return this.attemptKeySystemAccess(r)}return n}getKeySystemSelectionPromise(e){if(e.length||(e=oi(this.config)),e.length===0)throw new It({type:ge.KEY_SYSTEM_ERROR,details:N.KEY_SYSTEM_NO_CONFIGURED_LICENSE,fatal:!0},`Missing key-system license configuration options ${JSON.stringify({drmSystems:this.config.drmSystems})}`);return this.attemptKeySystemAccess(e)}attemptSetMediaKeys(e,t){const n=this.setMediaKeysQueue.slice();this.log(`Setting media-keys for "${e}"`);const i=Promise.all(n).then(()=>{if(!this.media)throw new Error("Attempted to set mediaKeys without media element attached");return this.media.setMediaKeys(t)});return this.setMediaKeysQueue.push(i),i.then(()=>{this.log(`Media-keys set for "${e}"`),n.push(i),this.setMediaKeysQueue=this.setMediaKeysQueue.filter(r=>n.indexOf(r)===-1)})}generateRequestWithPreferredKeySession(e,t,n,i){var r,o;const l=(r=this.config.drmSystems)==null||(o=r[e.keySystem])==null?void 0:o.generateRequest;if(l)try{const h=l.call(this.hls,t,n,e);if(!h)throw new Error("Invalid response from configured generateRequest filter");t=h.initDataType,n=e.decryptdata.pssh=h.initData?new Uint8Array(h.initData):null}catch(h){var d;if(this.warn(h.message),(d=this.hls)!=null&&d.config.debug)throw h}if(n===null)return this.log(`Skipping key-session request for "${i}" (no initData)`),Promise.resolve(e);const c=this.getKeyIdString(e.decryptdata);this.log(`Generating key-session request for "${i}": ${c} (init data type: ${t} length: ${n?n.byteLength:null})`);const u=new Ul,m=e._onmessage=h=>{const g=e.mediaKeysSession;if(!g){u.emit("error",new Error("invalid state"));return}const{messageType:y,message:b}=h;this.log(`"${y}" message event for session "${g.sessionId}" message size: ${b.byteLength}`),y==="license-request"||y==="license-renewal"?this.renewLicense(e,b).catch(w=>{this.handleError(w),u.emit("error",w)}):y==="license-release"?e.keySystem===De.FAIRPLAY&&(this.updateKeySession(e,ll("acknowledged")),this.removeSession(e)):this.warn(`unhandled media key message type "${y}"`)},f=e._onkeystatuseschange=h=>{if(!e.mediaKeysSession){u.emit("error",new Error("invalid state"));return}this.onKeyStatusChange(e);const y=e.keyStatus;u.emit("keyStatus",y),y==="expired"&&(this.warn(`${e.keySystem} expired for key ${c}`),this.renewKeySession(e))};e.mediaKeysSession.addEventListener("message",m),e.mediaKeysSession.addEventListener("keystatuseschange",f);const p=new Promise((h,g)=>{u.on("error",g),u.on("keyStatus",y=>{y.startsWith("usable")?h():y==="output-restricted"?g(new It({type:ge.KEY_SYSTEM_ERROR,details:N.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED,fatal:!1},"HDCP level output restricted")):y==="internal-error"?g(new It({type:ge.KEY_SYSTEM_ERROR,details:N.KEY_SYSTEM_STATUS_INTERNAL_ERROR,fatal:!0},`key status changed to "${y}"`)):y==="expired"?g(new Error("key expired while generating request")):this.warn(`unhandled key status change "${y}"`)})});return e.mediaKeysSession.generateRequest(t,n).then(()=>{var h;this.log(`Request generated for key-session "${(h=e.mediaKeysSession)==null?void 0:h.sessionId}" keyId: ${c}`)}).catch(h=>{throw new It({type:ge.KEY_SYSTEM_ERROR,details:N.KEY_SYSTEM_NO_SESSION,error:h,fatal:!1},`Error generating key-session request: ${h}`)}).then(()=>p).catch(h=>{throw u.removeAllListeners(),this.removeSession(e),h}).then(()=>(u.removeAllListeners(),e))}onKeyStatusChange(e){e.mediaKeysSession.keyStatuses.forEach((t,n)=>{this.log(`key status change "${t}" for keyStatuses keyId: ${Qt.hexDump("buffer"in n?new Uint8Array(n.buffer,n.byteOffset,n.byteLength):new Uint8Array(n))} session keyId: ${Qt.hexDump(new Uint8Array(e.decryptdata.keyId||[]))} uri: ${e.decryptdata.uri}`),e.keyStatus=t})}fetchServerCertificate(e){const t=this.config,n=t.loader,i=new n(t),r=this.getServerCertificateUrl(e);return r?(this.log(`Fetching server certificate for "${e}"`),new Promise((o,l)=>{const d={responseType:"arraybuffer",url:r},c=t.certLoadPolicy.default,u={loadPolicy:c,timeout:c.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0},m={onSuccess:(f,p,h,g)=>{o(f.data)},onError:(f,p,h,g)=>{l(new It({type:ge.KEY_SYSTEM_ERROR,details:N.KEY_SYSTEM_SERVER_CERTIFICATE_REQUEST_FAILED,fatal:!0,networkDetails:h,response:nt({url:d.url,data:void 0},f)},`"${e}" certificate request failed (${r}). Status: ${f.code} (${f.text})`))},onTimeout:(f,p,h)=>{l(new It({type:ge.KEY_SYSTEM_ERROR,details:N.KEY_SYSTEM_SERVER_CERTIFICATE_REQUEST_FAILED,fatal:!0,networkDetails:h,response:{url:d.url,data:void 0}},`"${e}" certificate request timed out (${r})`))},onAbort:(f,p,h)=>{l(new Error("aborted"))}};i.load(d,u,m)})):Promise.resolve()}setMediaKeysServerCertificate(e,t,n){return new Promise((i,r)=>{e.setServerCertificate(n).then(o=>{this.log(`setServerCertificate ${o?"success":"not supported by CDM"} (${n==null?void 0:n.byteLength}) on "${t}"`),i(e)}).catch(o=>{r(new It({type:ge.KEY_SYSTEM_ERROR,details:N.KEY_SYSTEM_SERVER_CERTIFICATE_UPDATE_FAILED,error:o,fatal:!0},o.message))})})}renewLicense(e,t){return this.requestLicense(e,new Uint8Array(t)).then(n=>this.updateKeySession(e,new Uint8Array(n)).catch(i=>{throw new It({type:ge.KEY_SYSTEM_ERROR,details:N.KEY_SYSTEM_SESSION_UPDATE_FAILED,error:i,fatal:!0},i.message)}))}unpackPlayReadyKeyMessage(e,t){const n=String.fromCharCode.apply(null,new Uint16Array(t.buffer));if(!n.includes("PlayReadyKeyMessage"))return e.setRequestHeader("Content-Type","text/xml; charset=utf-8"),t;const i=new DOMParser().parseFromString(n,"application/xml"),r=i.querySelectorAll("HttpHeader");if(r.length>0){let u;for(let m=0,f=r.length;m<f;m++){var o,l;u=r[m];const p=(o=u.querySelector("name"))==null?void 0:o.textContent,h=(l=u.querySelector("value"))==null?void 0:l.textContent;p&&h&&e.setRequestHeader(p,h)}}const d=i.querySelector("Challenge"),c=d==null?void 0:d.textContent;if(!c)throw new Error("Cannot find <Challenge> in key message");return ll(atob(c))}setupLicenseXHR(e,t,n,i){const r=this.config.licenseXhrSetup;return r?Promise.resolve().then(()=>{if(!n.decryptdata)throw new Error("Key removed");return r.call(this.hls,e,t,n,i)}).catch(o=>{if(!n.decryptdata)throw o;return e.open("POST",t,!0),r.call(this.hls,e,t,n,i)}).then(o=>(e.readyState||e.open("POST",t,!0),{xhr:e,licenseChallenge:o||i})):(e.open("POST",t,!0),Promise.resolve({xhr:e,licenseChallenge:i}))}requestLicense(e,t){const n=this.config.keyLoadPolicy.default;return new Promise((i,r)=>{const o=this.getLicenseServerUrlOrThrow(e.keySystem);this.log(`Sending license request to URL: ${o}`);const l=new XMLHttpRequest;l.responseType="arraybuffer",l.onreadystatechange=()=>{if(!this.hls||!e.mediaKeysSession)return r(new Error("invalid state"));if(l.readyState===4)if(l.status===200){this._requestLicenseFailureCount=0;let d=l.response;this.log(`License received ${d instanceof ArrayBuffer?d.byteLength:d}`);const c=this.config.licenseResponseCallback;if(c)try{d=c.call(this.hls,l,o,e)}catch(u){this.error(u)}i(d)}else{const d=n.errorRetry,c=d?d.maxNumRetry:0;if(this._requestLicenseFailureCount++,this._requestLicenseFailureCount>c||l.status>=400&&l.status<500)r(new It({type:ge.KEY_SYSTEM_ERROR,details:N.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0,networkDetails:l,response:{url:o,data:void 0,code:l.status,text:l.statusText}},`License Request XHR failed (${o}). Status: ${l.status} (${l.statusText})`));else{const u=c-this._requestLicenseFailureCount+1;this.warn(`Retrying license request, ${u} attempts left`),this.requestLicense(e,t).then(i,r)}}},e.licenseXhr&&e.licenseXhr.readyState!==XMLHttpRequest.DONE&&e.licenseXhr.abort(),e.licenseXhr=l,this.setupLicenseXHR(l,o,e,t).then(({xhr:d,licenseChallenge:c})=>{e.keySystem==De.PLAYREADY&&(c=this.unpackPlayReadyKeyMessage(d,c)),d.send(c)})})}onMediaAttached(e,t){if(!this.config.emeEnabled)return;const n=t.media;this.media=n,n.removeEventListener("encrypted",this.onMediaEncrypted),n.removeEventListener("waitingforkey",this.onWaitingForKey),n.addEventListener("encrypted",this.onMediaEncrypted),n.addEventListener("waitingforkey",this.onWaitingForKey)}onMediaDetached(){const e=this.media,t=this.mediaKeySessions;e&&(e.removeEventListener("encrypted",this.onMediaEncrypted),e.removeEventListener("waitingforkey",this.onWaitingForKey),this.media=null),this._requestLicenseFailureCount=0,this.setMediaKeysQueue=[],this.mediaKeySessions=[],this.keyIdToKeySessionPromise={},Pn.clearKeyUriToKeyIdMap();const n=t.length;an.CDMCleanupPromise=Promise.all(t.map(i=>this.removeSession(i)).concat(e==null?void 0:e.setMediaKeys(null).catch(i=>{this.log(`Could not clear media keys: ${i}`)}))).then(()=>{n&&(this.log("finished closing key sessions and clearing media keys"),t.length=0)}).catch(i=>{this.log(`Could not close sessions and clear media keys: ${i}`)})}onManifestLoading(){this.keyFormatPromise=null}onManifestLoaded(e,{sessionKeys:t}){if(!(!t||!this.config.emeEnabled)&&!this.keyFormatPromise){const n=t.reduce((i,r)=>(i.indexOf(r.keyFormat)===-1&&i.push(r.keyFormat),i),[]);this.log(`Selecting key-system from session-keys ${n.join(", ")}`),this.keyFormatPromise=this.getKeyFormatPromise(n)}}removeSession(e){const{mediaKeysSession:t,licenseXhr:n}=e;if(t){this.log(`Remove licenses and keys and close session ${t.sessionId}`),e._onmessage&&(t.removeEventListener("message",e._onmessage),e._onmessage=void 0),e._onkeystatuseschange&&(t.removeEventListener("keystatuseschange",e._onkeystatuseschange),e._onkeystatuseschange=void 0),n&&n.readyState!==XMLHttpRequest.DONE&&n.abort(),e.mediaKeysSession=e.decryptdata=e.licenseXhr=void 0;const i=this.mediaKeySessions.indexOf(e);return i>-1&&this.mediaKeySessions.splice(i,1),t.remove().catch(r=>{this.log(`Could not remove session: ${r}`)}).then(()=>t.close()).catch(r=>{this.log(`Could not close session: ${r}`)})}}}an.CDMCleanupPromise=void 0;class It extends Error{constructor(e,t){super(t),this.data=void 0,e.error||(e.error=new Error(t)),this.data=e,e.err=e.error}}var bt;(function(s){s.MANIFEST="m",s.AUDIO="a",s.VIDEO="v",s.MUXED="av",s.INIT="i",s.CAPTION="c",s.TIMED_TEXT="tt",s.KEY="k",s.OTHER="o"})(bt||(bt={}));var ec;(function(s){s.DASH="d",s.HLS="h",s.SMOOTH="s",s.OTHER="o"})(ec||(ec={}));var Ps;(function(s){s.OBJECT="CMCD-Object",s.REQUEST="CMCD-Request",s.SESSION="CMCD-Session",s.STATUS="CMCD-Status"})(Ps||(Ps={}));const UP={[Ps.OBJECT]:["br","d","ot","tb"],[Ps.REQUEST]:["bl","dl","mtp","nor","nrr","su"],[Ps.SESSION]:["cid","pr","sf","sid","st","v"],[Ps.STATUS]:["bs","rtp"]};class rn{constructor(e,t){this.value=void 0,this.params=void 0,Array.isArray(e)&&(e=e.map(n=>n instanceof rn?n:new rn(n))),this.value=e,this.params=t}}class lp{constructor(e){this.description=void 0,this.description=e}}const zP="Dict";function GP(s){return Array.isArray(s)?JSON.stringify(s):s instanceof Map?"Map{}":s instanceof Set?"Set{}":typeof s=="object"?JSON.stringify(s):String(s)}function jP(s,e,t,n){return new Error(`failed to ${s} "${GP(e)}" as ${t}`,{cause:n})}const cp="Bare Item",HP="Boolean",WP="Byte Sequence",KP="Decimal",qP="Integer";function YP(s){return s<-999999999999999||999999999999999<s}const JP=/[\x00-\x1f\x7f]+/,XP="Token",ZP="Key";function as(s,e,t){return jP("serialize",s,e,t)}function QP(s){if(typeof s!="boolean")throw as(s,HP);return s?"?1":"?0"}function eO(s){return btoa(String.fromCharCode(...s))}function tO(s){if(ArrayBuffer.isView(s)===!1)throw as(s,WP);return`:${eO(s)}:`}function dp(s){if(YP(s))throw as(s,qP);return s.toString()}function sO(s){return`@${dp(s.getTime()/1e3)}`}function up(s,e){if(s<0)return-up(-s,e);const t=Math.pow(10,e);if(Math.abs(s*t%1-.5)<Number.EPSILON){const i=Math.floor(s*t);return(i%2===0?i:i+1)/t}else return Math.round(s*t)/t}function nO(s){const e=up(s,3);if(Math.floor(Math.abs(e)).toString().length>12)throw as(s,KP);const t=e.toString();return t.includes(".")?t:`${t}.0`}const aO="String";function iO(s){if(JP.test(s))throw as(s,aO);return`"${s.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}"`}function rO(s){return s.description||s.toString().slice(7,-1)}function hp(s){const e=rO(s);if(/^([a-zA-Z*])([!#$%&'*+\-.^_`|~\w:/]*)$/.test(e)===!1)throw as(e,XP);return e}function tc(s){switch(typeof s){case"number":if(!ae(s))throw as(s,cp);return Number.isInteger(s)?dp(s):nO(s);case"string":return iO(s);case"symbol":return hp(s);case"boolean":return QP(s);case"object":if(s instanceof Date)return sO(s);if(s instanceof Uint8Array)return tO(s);if(s instanceof lp)return hp(s);default:throw as(s,cp)}}function sc(s){if(/^[a-z*][a-z0-9\-_.*]*$/.test(s)===!1)throw as(s,ZP);return s}function nc(s){return s==null?"":Object.entries(s).map(([e,t])=>t===!0?`;${sc(e)}`:`;${sc(e)}=${tc(t)}`).join("")}function mp(s){return s instanceof rn?`${tc(s.value)}${nc(s.params)}`:tc(s)}function oO(s){return`(${s.value.map(mp).join(" ")})${nc(s.params)}`}function lO(s,e={whitespace:!0}){if(typeof s!="object")throw as(s,zP);const t=s instanceof Map?s.entries():Object.entries(s),n=e!=null&&e.whitespace?" ":"";return Array.from(t).map(([i,r])=>{r instanceof rn||(r=new rn(r));let o=sc(i);return r.value===!0?o+=nc(r.params):(o+="=",Array.isArray(r.value)?o+=oO(r):o+=mp(r)),o}).join(`,${n}`)}function cO(s,e){return lO(s,e)}const dO=s=>s==="ot"||s==="sf"||s==="st",uO=s=>typeof s=="number"?ae(s):s!=null&&s!==""&&s!==!1;function hO(s,e){const t=new URL(s),n=new URL(e);if(t.origin!==n.origin)return s;const i=t.pathname.split("/").slice(1),r=n.pathname.split("/").slice(1,-1);for(;i[0]===r[0];)i.shift(),r.shift();for(;r.length;)r.shift(),i.unshift("..");return i.join("/")}function mO(){try{return crypto.randomUUID()}catch{try{const e=URL.createObjectURL(new Blob),t=e.toString();return URL.revokeObjectURL(e),t.slice(t.lastIndexOf("/")+1)}catch{let t=new Date().getTime();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,i=>{const r=(t+Math.random()*16)%16|0;return t=Math.floor(t/16),(i=="x"?r:r&3|8).toString(16)})}}}const Oi=s=>Math.round(s),fO=(s,e)=>(e!=null&&e.baseUrl&&(s=hO(s,e.baseUrl)),encodeURIComponent(s)),Fi=s=>Oi(s/100)*100,gO={br:Oi,d:Oi,bl:Fi,dl:Fi,mtp:Fi,nor:fO,rtp:Fi,tb:Oi};function pO(s,e){const t={};if(s==null||typeof s!="object")return t;const n=Object.keys(s).sort(),i=qe({},gO,e==null?void 0:e.formatters),r=e==null?void 0:e.filter;return n.forEach(o=>{if(r!=null&&r(o))return;let l=s[o];const d=i[o];d&&(l=d(l,e)),!(o==="v"&&l===1)&&(o=="pr"&&l===1||uO(l)&&(dO(o)&&typeof l=="string"&&(l=new lp(l)),t[o]=l))}),t}function fp(s,e={}){return s?cO(pO(s,e),qe({whitespace:!1},e)):""}function yO(s,e={}){if(!s)return{};const t=Object.entries(s),n=Object.entries(UP).concat(Object.entries((e==null?void 0:e.customHeaderMap)||{})),i=t.reduce((r,o)=>{var l,d;const[c,u]=o,m=((l=n.find(f=>f[1].includes(c)))==null?void 0:l[0])||Ps.REQUEST;return(d=r[m])!=null||(r[m]={}),r[m][c]=u,r},{});return Object.entries(i).reduce((r,[o,l])=>(r[o]=fp(l,e),r),{})}function bO(s,e,t){return qe(s,yO(e,t))}const wO="CMCD";function SO(s,e={}){if(!s)return"";const t=fp(s,e);return`${wO}=${encodeURIComponent(t)}`}const gp=/CMCD=[^&#]+/;function _O(s,e,t){const n=SO(e,t);if(!n)return s;if(gp.test(s))return s.replace(gp,n);const i=s.includes("?")?"&":"?";return`${s}${i}${n}`}class kO{constructor(e){this.hls=void 0,this.config=void 0,this.media=void 0,this.sid=void 0,this.cid=void 0,this.useHeaders=!1,this.includeKeys=void 0,this.initialized=!1,this.starved=!1,this.buffering=!0,this.audioBuffer=void 0,this.videoBuffer=void 0,this.onWaiting=()=>{this.initialized&&(this.starved=!0),this.buffering=!0},this.onPlaying=()=>{this.initialized||(this.initialized=!0),this.buffering=!1},this.applyPlaylistData=i=>{try{this.apply(i,{ot:bt.MANIFEST,su:!this.initialized})}catch(r){L.warn("Could not generate manifest CMCD data.",r)}},this.applyFragmentData=i=>{try{const r=i.frag,o=this.hls.levels[r.level],l=this.getObjectType(r),d={d:r.duration*1e3,ot:l};(l===bt.VIDEO||l===bt.AUDIO||l==bt.MUXED)&&(d.br=o.bitrate/1e3,d.tb=this.getTopBandwidth(l)/1e3,d.bl=this.getBufferLength(l)),this.apply(i,d)}catch(r){L.warn("Could not generate segment CMCD data.",r)}},this.hls=e;const t=this.config=e.config,{cmcd:n}=t;n!=null&&(t.pLoader=this.createPlaylistLoader(),t.fLoader=this.createFragmentLoader(),this.sid=n.sessionId||mO(),this.cid=n.contentId,this.useHeaders=n.useHeaders===!0,this.includeKeys=n.includeKeys,this.registerListeners())}registerListeners(){const e=this.hls;e.on(S.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(S.MEDIA_DETACHED,this.onMediaDetached,this),e.on(S.BUFFER_CREATED,this.onBufferCreated,this)}unregisterListeners(){const e=this.hls;e.off(S.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(S.MEDIA_DETACHED,this.onMediaDetached,this),e.off(S.BUFFER_CREATED,this.onBufferCreated,this)}destroy(){this.unregisterListeners(),this.onMediaDetached(),this.hls=this.config=this.audioBuffer=this.videoBuffer=null,this.onWaiting=this.onPlaying=null}onMediaAttached(e,t){this.media=t.media,this.media.addEventListener("waiting",this.onWaiting),this.media.addEventListener("playing",this.onPlaying)}onMediaDetached(){this.media&&(this.media.removeEventListener("waiting",this.onWaiting),this.media.removeEventListener("playing",this.onPlaying),this.media=null)}onBufferCreated(e,t){var n,i;this.audioBuffer=(n=t.tracks.audio)==null?void 0:n.buffer,this.videoBuffer=(i=t.tracks.video)==null?void 0:i.buffer}createData(){var e;return{v:1,sf:ec.HLS,sid:this.sid,cid:this.cid,pr:(e=this.media)==null?void 0:e.playbackRate,mtp:this.hls.bandwidthEstimate/1e3}}apply(e,t={}){qe(t,this.createData());const n=t.ot===bt.INIT||t.ot===bt.VIDEO||t.ot===bt.MUXED;this.starved&&n&&(t.bs=!0,t.su=!0,this.starved=!1),t.su==null&&(t.su=this.buffering);const{includeKeys:i}=this;i&&(t=Object.keys(t).reduce((r,o)=>(i.includes(o)&&(r[o]=t[o]),r),{})),this.useHeaders?(e.headers||(e.headers={}),bO(e.headers,t)):e.url=_O(e.url,t)}getObjectType(e){const{type:t}=e;if(t==="subtitle")return bt.TIMED_TEXT;if(e.sn==="initSegment")return bt.INIT;if(t==="audio")return bt.AUDIO;if(t==="main")return this.hls.audioTracks.length?bt.VIDEO:bt.MUXED}getTopBandwidth(e){let t=0,n;const i=this.hls;if(e===bt.AUDIO)n=i.audioTracks;else{const r=i.maxAutoLevel,o=r>-1?r+1:i.levels.length;n=i.levels.slice(0,o)}for(const r of n)r.bitrate>t&&(t=r.bitrate);return t>0?t:NaN}getBufferLength(e){const t=this.hls.media,n=e===bt.AUDIO?this.audioBuffer:this.videoBuffer;return!n||!t?NaN:Fe.bufferInfo(n,t.currentTime,this.config.maxBufferHole).len*1e3}createPlaylistLoader(){const{pLoader:e}=this.config,t=this.applyPlaylistData,n=e||this.config.loader;return class{constructor(r){this.loader=void 0,this.loader=new n(r)}get stats(){return this.loader.stats}get context(){return this.loader.context}destroy(){this.loader.destroy()}abort(){this.loader.abort()}load(r,o,l){t(r),this.loader.load(r,o,l)}}}createFragmentLoader(){const{fLoader:e}=this.config,t=this.applyFragmentData,n=e||this.config.loader;return class{constructor(r){this.loader=void 0,this.loader=new n(r)}get stats(){return this.loader.stats}get context(){return this.loader.context}destroy(){this.loader.destroy()}abort(){this.loader.abort()}load(r,o,l){t(r),this.loader.load(r,o,l)}}}}const EO=3e5;class TO{constructor(e){this.hls=void 0,this.log=void 0,this.loader=null,this.uri=null,this.pathwayId=".",this.pathwayPriority=null,this.timeToLoad=300,this.reloadTimer=-1,this.updated=0,this.started=!1,this.enabled=!0,this.levels=null,this.audioTracks=null,this.subtitleTracks=null,this.penalizedPathways={},this.hls=e,this.log=L.log.bind(L,"[content-steering]:"),this.registerListeners()}registerListeners(){const e=this.hls;e.on(S.MANIFEST_LOADING,this.onManifestLoading,this),e.on(S.MANIFEST_LOADED,this.onManifestLoaded,this),e.on(S.MANIFEST_PARSED,this.onManifestParsed,this),e.on(S.ERROR,this.onError,this)}unregisterListeners(){const e=this.hls;e&&(e.off(S.MANIFEST_LOADING,this.onManifestLoading,this),e.off(S.MANIFEST_LOADED,this.onManifestLoaded,this),e.off(S.MANIFEST_PARSED,this.onManifestParsed,this),e.off(S.ERROR,this.onError,this))}startLoad(){if(this.started=!0,this.clearTimeout(),this.enabled&&this.uri){if(this.updated){const e=this.timeToLoad*1e3-(performance.now()-this.updated);if(e>0){this.scheduleRefresh(this.uri,e);return}}this.loadSteeringManifest(this.uri)}}stopLoad(){this.started=!1,this.loader&&(this.loader.destroy(),this.loader=null),this.clearTimeout()}clearTimeout(){this.reloadTimer!==-1&&(self.clearTimeout(this.reloadTimer),this.reloadTimer=-1)}destroy(){this.unregisterListeners(),this.stopLoad(),this.hls=null,this.levels=this.audioTracks=this.subtitleTracks=null}removeLevel(e){const t=this.levels;t&&(this.levels=t.filter(n=>n!==e))}onManifestLoading(){this.stopLoad(),this.enabled=!0,this.timeToLoad=300,this.updated=0,this.uri=null,this.pathwayId=".",this.levels=this.audioTracks=this.subtitleTracks=null}onManifestLoaded(e,t){const{contentSteering:n}=t;n!==null&&(this.pathwayId=n.pathwayId,this.uri=n.uri,this.started&&this.startLoad())}onManifestParsed(e,t){this.audioTracks=t.audioTracks,this.subtitleTracks=t.subtitleTracks}onError(e,t){const{errorAction:n}=t;if((n==null?void 0:n.action)===ct.SendAlternateToPenaltyBox&&n.flags===Ut.MoveAllAlternatesMatchingHost){const i=this.levels;let r=this.pathwayPriority,o=this.pathwayId;if(t.context){const{groupId:l,pathwayId:d,type:c}=t.context;l&&i?o=this.getPathwayForGroupId(l,c,o):d&&(o=d)}o in this.penalizedPathways||(this.penalizedPathways[o]=performance.now()),!r&&i&&(r=i.reduce((l,d)=>(l.indexOf(d.pathwayId)===-1&&l.push(d.pathwayId),l),[])),r&&r.length>1&&(this.updatePathwayPriority(r),n.resolved=this.pathwayId!==o),n.resolved||L.warn(`Could not resolve ${t.details} ("${t.error.message}") with content-steering for Pathway: ${o} levels: ${i&&i.length} priorities: ${JSON.stringify(r)} penalized: ${JSON.stringify(this.penalizedPathways)}`)}}filterParsedLevels(e){this.levels=e;let t=this.getLevelsForPathway(this.pathwayId);if(t.length===0){const n=e[0].pathwayId;this.log(`No levels found in Pathway ${this.pathwayId}. Setting initial Pathway to "${n}"`),t=this.getLevelsForPathway(n),this.pathwayId=n}return t.length!==e.length&&this.log(`Found ${t.length}/${e.length} levels in Pathway "${this.pathwayId}"`),t}getLevelsForPathway(e){return this.levels===null?[]:this.levels.filter(t=>e===t.pathwayId)}updatePathwayPriority(e){this.pathwayPriority=e;let t;const n=this.penalizedPathways,i=performance.now();Object.keys(n).forEach(r=>{i-n[r]>EO&&delete n[r]});for(let r=0;r<e.length;r++){const o=e[r];if(o in n)continue;if(o===this.pathwayId)return;const l=this.hls.nextLoadLevel,d=this.hls.levels[l];if(t=this.getLevelsForPathway(o),t.length>0){this.log(`Setting Pathway to "${o}"`),this.pathwayId=o,rg(t),this.hls.trigger(S.LEVELS_UPDATED,{levels:t});const c=this.hls.levels[l];d&&c&&this.levels&&(c.attrs["STABLE-VARIANT-ID"]!==d.attrs["STABLE-VARIANT-ID"]&&c.bitrate!==d.bitrate&&this.log(`Unstable Pathways change from bitrate ${d.bitrate} to ${c.bitrate}`),this.hls.nextLoadLevel=l);break}}}getPathwayForGroupId(e,t,n){const i=this.getLevelsForPathway(n).concat(this.levels||[]);for(let r=0;r<i.length;r++)if(t===Ae.AUDIO_TRACK&&i[r].hasAudioGroup(e)||t===Ae.SUBTITLE_TRACK&&i[r].hasSubtitleGroup(e))return i[r].pathwayId;return n}clonePathways(e){const t=this.levels;if(!t)return;const n={},i={};e.forEach(r=>{const{ID:o,"BASE-ID":l,"URI-REPLACEMENT":d}=r;if(t.some(u=>u.pathwayId===o))return;const c=this.getLevelsForPathway(l).map(u=>{const m=new Me(u.attrs);m["PATHWAY-ID"]=o;const f=m.AUDIO&&`${m.AUDIO}_clone_${o}`,p=m.SUBTITLES&&`${m.SUBTITLES}_clone_${o}`;f&&(n[m.AUDIO]=f,m.AUDIO=f),p&&(i[m.SUBTITLES]=p,m.SUBTITLES=p);const h=yp(u.uri,m["STABLE-VARIANT-ID"],"PER-VARIANT-URIS",d),g=new Js({attrs:m,audioCodec:u.audioCodec,bitrate:u.bitrate,height:u.height,name:u.name,url:h,videoCodec:u.videoCodec,width:u.width});if(u.audioGroups)for(let y=1;y<u.audioGroups.length;y++)g.addGroupId("audio",`${u.audioGroups[y]}_clone_${o}`);if(u.subtitleGroups)for(let y=1;y<u.subtitleGroups.length;y++)g.addGroupId("text",`${u.subtitleGroups[y]}_clone_${o}`);return g});t.push(...c),pp(this.audioTracks,n,d,o),pp(this.subtitleTracks,i,d,o)})}loadSteeringManifest(e){const t=this.hls.config,n=t.loader;this.loader&&this.loader.destroy(),this.loader=new n(t);let i;try{i=new self.URL(e)}catch{this.enabled=!1,this.log(`Failed to parse Steering Manifest URI: ${e}`);return}if(i.protocol!=="data:"){const u=(this.hls.bandwidthEstimate||t.abrEwmaDefaultEstimate)|0;i.searchParams.set("_HLS_pathway",this.pathwayId),i.searchParams.set("_HLS_throughput",""+u)}const r={responseType:"json",url:i.href},o=t.steeringManifestLoadPolicy.default,l=o.errorRetry||o.timeoutRetry||{},d={loadPolicy:o,timeout:o.maxLoadTimeMs,maxRetry:l.maxNumRetry||0,retryDelay:l.retryDelayMs||0,maxRetryDelay:l.maxRetryDelayMs||0},c={onSuccess:(u,m,f,p)=>{this.log(`Loaded steering manifest: "${i}"`);const h=u.data;if(h.VERSION!==1){this.log(`Steering VERSION ${h.VERSION} not supported!`);return}this.updated=performance.now(),this.timeToLoad=h.TTL;const{"RELOAD-URI":g,"PATHWAY-CLONES":y,"PATHWAY-PRIORITY":b}=h;if(g)try{this.uri=new self.URL(g,i).href}catch{this.enabled=!1,this.log(`Failed to parse Steering Manifest RELOAD-URI: ${g}`);return}this.scheduleRefresh(this.uri||f.url),y&&this.clonePathways(y);const w={steeringManifest:h,url:i.toString()};this.hls.trigger(S.STEERING_MANIFEST_LOADED,w),b&&this.updatePathwayPriority(b)},onError:(u,m,f,p)=>{if(this.log(`Error loading steering manifest: ${u.code} ${u.text} (${m.url})`),this.stopLoad(),u.code===410){this.enabled=!1,this.log(`Steering manifest ${m.url} no longer available`);return}let h=this.timeToLoad*1e3;if(u.code===429){const g=this.loader;if(typeof(g==null?void 0:g.getResponseHeader)=="function"){const y=g.getResponseHeader("Retry-After");y&&(h=parseFloat(y)*1e3)}this.log(`Steering manifest ${m.url} rate limited`);return}this.scheduleRefresh(this.uri||m.url,h)},onTimeout:(u,m,f)=>{this.log(`Timeout loading steering manifest (${m.url})`),this.scheduleRefresh(this.uri||m.url)}};this.log(`Requesting steering manifest: ${i}`),this.loader.load(r,d,c)}scheduleRefresh(e,t=this.timeToLoad*1e3){this.clearTimeout(),this.reloadTimer=self.setTimeout(()=>{var n;const i=(n=this.hls)==null?void 0:n.media;if(i&&!i.ended){this.loadSteeringManifest(e);return}this.scheduleRefresh(e,this.timeToLoad*1e3)},t)}}function pp(s,e,t,n){s&&Object.keys(e).forEach(i=>{const r=s.filter(o=>o.groupId===i).map(o=>{const l=qe({},o);return l.details=void 0,l.attrs=new Me(l.attrs),l.url=l.attrs.URI=yp(o.url,o.attrs["STABLE-RENDITION-ID"],"PER-RENDITION-URIS",t),l.groupId=l.attrs["GROUP-ID"]=e[i],l.attrs["PATHWAY-ID"]=n,l});s.push(...r)})}function yp(s,e,t,n){const{HOST:i,PARAMS:r,[t]:o}=n;let l;e&&(l=o==null?void 0:o[e],l&&(s=l));const d=new self.URL(s);return i&&!l&&(d.host=i),r&&Object.keys(r).sort().forEach(c=>{c&&d.searchParams.set(c,r[c])}),d.href}const CO=/^age:\s*[\d.]+\s*$/im;class bp{constructor(e){this.xhrSetup=void 0,this.requestTimeout=void 0,this.retryTimeout=void 0,this.retryDelay=void 0,this.config=null,this.callbacks=null,this.context=null,this.loader=null,this.stats=void 0,this.xhrSetup=e&&e.xhrSetup||null,this.stats=new ii,this.retryDelay=0}destroy(){this.callbacks=null,this.abortInternal(),this.loader=null,this.config=null,this.context=null,this.xhrSetup=null}abortInternal(){const e=this.loader;self.clearTimeout(this.requestTimeout),self.clearTimeout(this.retryTimeout),e&&(e.onreadystatechange=null,e.onprogress=null,e.readyState!==4&&(this.stats.aborted=!0,e.abort()))}abort(){var e;this.abortInternal(),(e=this.callbacks)!=null&&e.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.loader)}load(e,t,n){if(this.stats.loading.start)throw new Error("Loader can only be used once.");this.stats.loading.start=self.performance.now(),this.context=e,this.config=t,this.callbacks=n,this.loadInternal()}loadInternal(){const{config:e,context:t}=this;if(!e||!t)return;const n=this.loader=new self.XMLHttpRequest,i=this.stats;i.loading.first=0,i.loaded=0,i.aborted=!1;const r=this.xhrSetup;r?Promise.resolve().then(()=>{if(!(this.loader!==n||this.stats.aborted))return r(n,t.url)}).catch(o=>{if(!(this.loader!==n||this.stats.aborted))return n.open("GET",t.url,!0),r(n,t.url)}).then(()=>{this.loader!==n||this.stats.aborted||this.openAndSendXhr(n,t,e)}).catch(o=>{this.callbacks.onError({code:n.status,text:o.message},t,n,i)}):this.openAndSendXhr(n,t,e)}openAndSendXhr(e,t,n){e.readyState||e.open("GET",t.url,!0);const i=t.headers,{maxTimeToFirstByteMs:r,maxLoadTimeMs:o}=n.loadPolicy;if(i)for(const l in i)e.setRequestHeader(l,i[l]);t.rangeEnd&&e.setRequestHeader("Range","bytes="+t.rangeStart+"-"+(t.rangeEnd-1)),e.onreadystatechange=this.readystatechange.bind(this),e.onprogress=this.loadprogress.bind(this),e.responseType=t.responseType,self.clearTimeout(this.requestTimeout),n.timeout=r&&ae(r)?r:o,this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),n.timeout),e.send()}readystatechange(){const{context:e,loader:t,stats:n}=this;if(!e||!t)return;const i=t.readyState,r=this.config;if(!n.aborted&&i>=2&&(n.loading.first===0&&(n.loading.first=Math.max(self.performance.now(),n.loading.start),r.timeout!==r.loadPolicy.maxLoadTimeMs&&(self.clearTimeout(this.requestTimeout),r.timeout=r.loadPolicy.maxLoadTimeMs,this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),r.loadPolicy.maxLoadTimeMs-(n.loading.first-n.loading.start)))),i===4)){self.clearTimeout(this.requestTimeout),t.onreadystatechange=null,t.onprogress=null;const o=t.status,l=t.responseType==="text"?t.responseText:null;if(o>=200&&o<300){const m=l??t.response;if(m!=null){n.loading.end=Math.max(self.performance.now(),n.loading.first);const f=t.responseType==="arraybuffer"?m.byteLength:m.length;if(n.loaded=n.total=f,n.bwEstimate=n.total*8e3/(n.loading.end-n.loading.first),!this.callbacks)return;const p=this.callbacks.onProgress;if(p&&p(n,e,m,t),!this.callbacks)return;const h={url:t.responseURL,data:m,code:o};this.callbacks.onSuccess(h,n,e,t);return}}const d=r.loadPolicy.errorRetry,c=n.retry,u={url:e.url,data:void 0,code:o};Si(d,c,!1,u)?this.retry(d):(L.error(`${o} while loading ${e.url}`),this.callbacks.onError({code:o,text:t.statusText},e,t,n))}}loadtimeout(){if(!this.config)return;const e=this.config.loadPolicy.timeoutRetry,t=this.stats.retry;if(Si(e,t,!0))this.retry(e);else{var n;L.warn(`timeout while loading ${(n=this.context)==null?void 0:n.url}`);const i=this.callbacks;i&&(this.abortInternal(),i.onTimeout(this.stats,this.context,this.loader))}}retry(e){const{context:t,stats:n}=this;this.retryDelay=Al(e,n.retry),n.retry++,L.warn(`${status?"HTTP Status "+status:"Timeout"} while loading ${t==null?void 0:t.url}, retrying ${n.retry}/${e.maxNumRetry} in ${this.retryDelay}ms`),this.abortInternal(),this.loader=null,self.clearTimeout(this.retryTimeout),this.retryTimeout=self.setTimeout(this.loadInternal.bind(this),this.retryDelay)}loadprogress(e){const t=this.stats;t.loaded=e.loaded,e.lengthComputable&&(t.total=e.total)}getCacheAge(){let e=null;if(this.loader&&CO.test(this.loader.getAllResponseHeaders())){const t=this.loader.getResponseHeader("age");e=t?parseFloat(t):null}return e}getResponseHeader(e){return this.loader&&new RegExp(`^${e}:\\s*[\\d.]+\\s*$`,"im").test(this.loader.getAllResponseHeaders())?this.loader.getResponseHeader(e):null}}function xO(){if(self.fetch&&self.AbortController&&self.ReadableStream&&self.Request)try{return new self.ReadableStream({}),!0}catch{}return!1}const AO=/(\d+)-(\d+)\/(\d+)/;class wp{constructor(e){this.fetchSetup=void 0,this.requestTimeout=void 0,this.request=null,this.response=null,this.controller=void 0,this.context=null,this.config=null,this.callbacks=null,this.stats=void 0,this.loader=null,this.fetchSetup=e.fetchSetup||RO,this.controller=new self.AbortController,this.stats=new ii}destroy(){this.loader=this.callbacks=this.context=this.config=this.request=null,this.abortInternal(),this.response=null,this.fetchSetup=this.controller=this.stats=null}abortInternal(){this.controller&&!this.stats.loading.end&&(this.stats.aborted=!0,this.controller.abort())}abort(){var e;this.abortInternal(),(e=this.callbacks)!=null&&e.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.response)}load(e,t,n){const i=this.stats;if(i.loading.start)throw new Error("Loader can only be used once.");i.loading.start=self.performance.now();const r=LO(e,this.controller.signal),o=n.onProgress,l=e.responseType==="arraybuffer",d=l?"byteLength":"length",{maxTimeToFirstByteMs:c,maxLoadTimeMs:u}=t.loadPolicy;this.context=e,this.config=t,this.callbacks=n,this.request=this.fetchSetup(e,r),self.clearTimeout(this.requestTimeout),t.timeout=c&&ae(c)?c:u,this.requestTimeout=self.setTimeout(()=>{this.abortInternal(),n.onTimeout(i,e,this.response)},t.timeout),self.fetch(this.request).then(m=>{this.response=this.loader=m;const f=Math.max(self.performance.now(),i.loading.start);if(self.clearTimeout(this.requestTimeout),t.timeout=u,this.requestTimeout=self.setTimeout(()=>{this.abortInternal(),n.onTimeout(i,e,this.response)},u-(f-i.loading.start)),!m.ok){const{status:p,statusText:h}=m;throw new vO(h||"fetch, bad network response",p,m)}return i.loading.first=f,i.total=BO(m.headers)||i.total,o&&ae(t.highWaterMark)?this.loadProgressively(m,i,e,t.highWaterMark,o):l?m.arrayBuffer():e.responseType==="json"?m.json():m.text()}).then(m=>{const f=this.response;if(!f)throw new Error("loader destroyed");self.clearTimeout(this.requestTimeout),i.loading.end=Math.max(self.performance.now(),i.loading.first);const p=m[d];p&&(i.loaded=i.total=p);const h={url:f.url,data:m,code:f.status};o&&!ae(t.highWaterMark)&&o(i,e,m,f),n.onSuccess(h,i,e,f)}).catch(m=>{if(self.clearTimeout(this.requestTimeout),i.aborted)return;const f=m&&m.code||0,p=m?m.message:null;n.onError({code:f,text:p},e,m?m.details:null,i)})}getCacheAge(){let e=null;if(this.response){const t=this.response.headers.get("age");e=t?parseFloat(t):null}return e}getResponseHeader(e){return this.response?this.response.headers.get(e):null}loadProgressively(e,t,n,i=0,r){const o=new bg,l=e.body.getReader(),d=()=>l.read().then(c=>{if(c.done)return o.dataLength&&r(t,n,o.flush(),e),Promise.resolve(new ArrayBuffer(0));const u=c.value,m=u.length;return t.loaded+=m,m<i||o.dataLength?(o.push(u),o.dataLength>=i&&r(t,n,o.flush(),e)):r(t,n,u,e),d()}).catch(()=>Promise.reject());return d()}}function LO(s,e){const t={method:"GET",mode:"cors",credentials:"same-origin",signal:e,headers:new self.Headers(qe({},s.headers))};return s.rangeEnd&&t.headers.set("Range","bytes="+s.rangeStart+"-"+String(s.rangeEnd-1)),t}function IO(s){const e=AO.exec(s);if(e)return parseInt(e[2])-parseInt(e[1])+1}function BO(s){const e=s.get("Content-Range");if(e){const n=IO(e);if(ae(n))return n}const t=s.get("Content-Length");if(t)return parseInt(t)}function RO(s,e){return new self.Request(s.url,e)}class vO extends Error{constructor(e,t,n){super(e),this.code=void 0,this.details=void 0,this.code=t,this.details=n}}const NO=/\s/,DO={newCue(s,e,t,n){const i=[];let r,o,l,d,c;const u=self.VTTCue||self.TextTrackCue;for(let f=0;f<n.rows.length;f++)if(r=n.rows[f],l=!0,d=0,c="",!r.isEmpty()){var m;for(let g=0;g<r.chars.length;g++)NO.test(r.chars[g].uchar)&&l?d++:(c+=r.chars[g].uchar,l=!1);r.cueStartTime=e,e===t&&(t+=1e-4),d>=16?d--:d++;const p=Zg(c.trim()),h=ql(e,t,p);s!=null&&(m=s.cues)!=null&&m.getCueById(h)||(o=new u(e,t,p),o.id=h,o.line=f+1,o.align="left",o.position=10+Math.min(80,Math.floor(d*8/32)*10),i.push(o))}return s&&i.length&&(i.sort((f,p)=>f.line==="auto"||p.line==="auto"?0:f.line>8&&p.line>8?p.line-f.line:f.line-p.line),i.forEach(f=>Xf(s,f))),i}},PO={maxTimeToFirstByteMs:8e3,maxLoadTimeMs:2e4,timeoutRetry:null,errorRetry:null},Sp=nt(nt({autoStartLoad:!0,startPosition:-1,defaultAudioCodec:void 0,debug:!1,capLevelOnFPSDrop:!1,capLevelToPlayerSize:!1,ignoreDevicePixelRatio:!1,preferManagedMediaSource:!0,initialLiveManifestSize:1,maxBufferLength:30,backBufferLength:1/0,frontBufferFlushThreshold:1/0,maxBufferSize:60*1e3*1e3,maxBufferHole:.1,highBufferWatchdogPeriod:2,nudgeOffset:.1,nudgeMaxRetry:3,maxFragLookUpTolerance:.25,liveSyncDurationCount:3,liveMaxLatencyDurationCount:1/0,liveSyncDuration:void 0,liveMaxLatencyDuration:void 0,maxLiveSyncPlaybackRate:1,liveDurationInfinity:!1,liveBackBufferLength:null,maxMaxBufferLength:600,enableWorker:!0,workerPath:null,enableSoftwareAES:!0,startLevel:void 0,startFragPrefetch:!1,fpsDroppedMonitoringPeriod:5e3,fpsDroppedMonitoringThreshold:.2,appendErrorMaxRetry:3,loader:bp,fLoader:void 0,pLoader:void 0,xhrSetup:void 0,licenseXhrSetup:void 0,licenseResponseCallback:void 0,abrController:l6,bufferController:hP,capLevelController:Ql,errorController:JD,fpsController:$P,stretchShortVideoTrack:!1,maxAudioFramesDrift:1,forceKeyFrameOnDiscontinuity:!0,abrEwmaFastLive:3,abrEwmaSlowLive:9,abrEwmaFastVoD:3,abrEwmaSlowVoD:9,abrEwmaDefaultEstimate:5e5,abrEwmaDefaultEstimateMax:5e6,abrBandWidthFactor:.95,abrBandWidthUpFactor:.7,abrMaxWithRealBitrate:!1,maxStarvationDelay:4,maxLoadingDelay:4,minAutoBitrate:0,emeEnabled:!1,widevineLicenseUrl:void 0,drmSystems:{},drmSystemOptions:{},requestMediaKeySystemAccessFunc:Sf,testBandwidth:!0,progressive:!1,lowLatencyMode:!0,cmcd:void 0,enableDateRangeMetadataCues:!0,enableEmsgMetadataCues:!0,enableID3MetadataCues:!0,useMediaCapabilities:!0,certLoadPolicy:{default:PO},keyLoadPolicy:{default:{maxTimeToFirstByteMs:8e3,maxLoadTimeMs:2e4,timeoutRetry:{maxNumRetry:1,retryDelayMs:1e3,maxRetryDelayMs:2e4,backoff:"linear"},errorRetry:{maxNumRetry:8,retryDelayMs:1e3,maxRetryDelayMs:2e4,backoff:"linear"}}},manifestLoadPolicy:{default:{maxTimeToFirstByteMs:1/0,maxLoadTimeMs:2e4,timeoutRetry:{maxNumRetry:2,retryDelayMs:0,maxRetryDelayMs:0},errorRetry:{maxNumRetry:1,retryDelayMs:1e3,maxRetryDelayMs:8e3}}},playlistLoadPolicy:{default:{maxTimeToFirstByteMs:1e4,maxLoadTimeMs:2e4,timeoutRetry:{maxNumRetry:2,retryDelayMs:0,maxRetryDelayMs:0},errorRetry:{maxNumRetry:2,retryDelayMs:1e3,maxRetryDelayMs:8e3}}},fragLoadPolicy:{default:{maxTimeToFirstByteMs:1e4,maxLoadTimeMs:12e4,timeoutRetry:{maxNumRetry:4,retryDelayMs:0,maxRetryDelayMs:0},errorRetry:{maxNumRetry:6,retryDelayMs:1e3,maxRetryDelayMs:8e3}}},steeringManifestLoadPolicy:{default:{maxTimeToFirstByteMs:1e4,maxLoadTimeMs:2e4,timeoutRetry:{maxNumRetry:2,retryDelayMs:0,maxRetryDelayMs:0},errorRetry:{maxNumRetry:1,retryDelayMs:1e3,maxRetryDelayMs:8e3}}},manifestLoadingTimeOut:1e4,manifestLoadingMaxRetry:1,manifestLoadingRetryDelay:1e3,manifestLoadingMaxRetryTimeout:64e3,levelLoadingTimeOut:1e4,levelLoadingMaxRetry:4,levelLoadingRetryDelay:1e3,levelLoadingMaxRetryTimeout:64e3,fragLoadingTimeOut:2e4,fragLoadingMaxRetry:6,fragLoadingRetryDelay:1e3,fragLoadingMaxRetryTimeout:64e3},OO()),{},{subtitleStreamController:lP,subtitleTrackController:dP,timelineController:MP,audioStreamController:rP,audioTrackController:oP,emeController:an,cmcdController:kO,contentSteeringController:TO});function OO(){return{cueHandler:DO,enableWebVTT:!0,enableIMSC1:!0,enableCEA708Captions:!0,captionsTextTrack1Label:"English",captionsTextTrack1LanguageCode:"en",captionsTextTrack2Label:"Spanish",captionsTextTrack2LanguageCode:"es",captionsTextTrack3Label:"Unknown CC",captionsTextTrack3LanguageCode:"",captionsTextTrack4Label:"Unknown CC",captionsTextTrack4LanguageCode:"",renderTextTracksNatively:!0}}function FO(s,e){if((e.liveSyncDurationCount||e.liveMaxLatencyDurationCount)&&(e.liveSyncDuration||e.liveMaxLatencyDuration))throw new Error("Illegal hls.js config: don't mix up liveSyncDurationCount/liveMaxLatencyDurationCount and liveSyncDuration/liveMaxLatencyDuration");if(e.liveMaxLatencyDurationCount!==void 0&&(e.liveSyncDurationCount===void 0||e.liveMaxLatencyDurationCount<=e.liveSyncDurationCount))throw new Error('Illegal hls.js config: "liveMaxLatencyDurationCount" must be greater than "liveSyncDurationCount"');if(e.liveMaxLatencyDuration!==void 0&&(e.liveSyncDuration===void 0||e.liveMaxLatencyDuration<=e.liveSyncDuration))throw new Error('Illegal hls.js config: "liveMaxLatencyDuration" must be greater than "liveSyncDuration"');const t=ac(s),n=["manifest","level","frag"],i=["TimeOut","MaxRetry","RetryDelay","MaxRetryTimeout"];return n.forEach(r=>{const o=`${r==="level"?"playlist":r}LoadPolicy`,l=e[o]===void 0,d=[];i.forEach(c=>{const u=`${r}Loading${c}`,m=e[u];if(m!==void 0&&l){d.push(u);const f=t[o].default;switch(e[o]={default:f},c){case"TimeOut":f.maxLoadTimeMs=m,f.maxTimeToFirstByteMs=m;break;case"MaxRetry":f.errorRetry.maxNumRetry=m,f.timeoutRetry.maxNumRetry=m;break;case"RetryDelay":f.errorRetry.retryDelayMs=m,f.timeoutRetry.retryDelayMs=m;break;case"MaxRetryTimeout":f.errorRetry.maxRetryDelayMs=m,f.timeoutRetry.maxRetryDelayMs=m;break}}}),d.length&&L.warn(`hls.js config: "${d.join('", "')}" setting(s) are deprecated, use "${o}": ${JSON.stringify(e[o])}`)}),nt(nt({},t),e)}function ac(s){return s&&typeof s=="object"?Array.isArray(s)?s.map(ac):Object.keys(s).reduce((e,t)=>(e[t]=ac(s[t]),e),{}):s}function MO(s){const e=s.loader;e!==wp&&e!==bp?(L.log("[config]: Custom loader detected, cannot enable progressive streaming"),s.progressive=!1):xO()&&(s.loader=wp,s.progressive=!0,s.enableSoftwareAES=!0,L.log("[config]: Progressive streaming enabled, using FetchLoader"))}let ic;class VO extends Il{constructor(e,t){super(e,"[level-controller]"),this._levels=[],this._firstLevel=-1,this._maxAutoLevel=-1,this._startLevel=void 0,this.currentLevel=null,this.currentLevelIndex=-1,this.manualLevelIndex=-1,this.steering=void 0,this.onParsedComplete=void 0,this.steering=t,this._registerListeners()}_registerListeners(){const{hls:e}=this;e.on(S.MANIFEST_LOADING,this.onManifestLoading,this),e.on(S.MANIFEST_LOADED,this.onManifestLoaded,this),e.on(S.LEVEL_LOADED,this.onLevelLoaded,this),e.on(S.LEVELS_UPDATED,this.onLevelsUpdated,this),e.on(S.FRAG_BUFFERED,this.onFragBuffered,this),e.on(S.ERROR,this.onError,this)}_unregisterListeners(){const{hls:e}=this;e.off(S.MANIFEST_LOADING,this.onManifestLoading,this),e.off(S.MANIFEST_LOADED,this.onManifestLoaded,this),e.off(S.LEVEL_LOADED,this.onLevelLoaded,this),e.off(S.LEVELS_UPDATED,this.onLevelsUpdated,this),e.off(S.FRAG_BUFFERED,this.onFragBuffered,this),e.off(S.ERROR,this.onError,this)}destroy(){this._unregisterListeners(),this.steering=null,this.resetLevels(),super.destroy()}stopLoad(){this._levels.forEach(t=>{t.loadError=0,t.fragmentError=0}),super.stopLoad()}resetLevels(){this._startLevel=void 0,this.manualLevelIndex=-1,this.currentLevelIndex=-1,this.currentLevel=null,this._levels=[],this._maxAutoLevel=-1}onManifestLoading(e,t){this.resetLevels()}onManifestLoaded(e,t){const n=this.hls.config.preferManagedMediaSource,i=[],r={},o={};let l=!1,d=!1,c=!1;t.levels.forEach(u=>{var m,f;const p=u.attrs;let{audioCodec:h,videoCodec:g}=u;((m=h)==null?void 0:m.indexOf("mp4a.40.34"))!==-1&&(ic||(ic=/chrome|firefox/i.test(navigator.userAgent)),ic&&(u.audioCodec=h=void 0)),h&&(u.audioCodec=h=fi(h,n)),((f=g)==null?void 0:f.indexOf("avc1"))===0&&(g=u.videoCodec=CD(g));const{width:y,height:b,unknownCodecs:w}=u;if(l||(l=!!(y&&b)),d||(d=!!g),c||(c=!!h),w!=null&&w.length||h&&!bl(h,"audio",n)||g&&!bl(g,"video",n))return;const{CODECS:_,"FRAME-RATE":C,"HDCP-LEVEL":E,"PATHWAY-ID":A,RESOLUTION:T,"VIDEO-RANGE":R}=p,v=`${`${A||"."}-`}${u.bitrate}-${T}-${C}-${_}-${R}-${E}`;if(r[v])if(r[v].uri!==u.url&&!u.attrs["PATHWAY-ID"]){const M=o[v]+=1;u.attrs["PATHWAY-ID"]=new Array(M+1).join(".");const j=new Js(u);r[v]=j,i.push(j)}else r[v].addGroupId("audio",p.AUDIO),r[v].addGroupId("text",p.SUBTITLES);else{const M=new Js(u);r[v]=M,o[v]=1,i.push(M)}}),this.filterAndSortMediaOptions(i,t,l,d,c)}filterAndSortMediaOptions(e,t,n,i,r){let o=[],l=[],d=e;if((n||i)&&r&&(d=d.filter(({videoCodec:h,videoRange:g,width:y,height:b})=>(!!h||!!(y&&b))&&MD(g))),d.length===0){Promise.resolve().then(()=>{if(this.hls){t.levels.length&&this.warn(`One or more CODECS in variant not supported: ${JSON.stringify(t.levels[0].attrs)}`);const h=new Error("no level with compatible codecs found in manifest");this.hls.trigger(S.ERROR,{type:ge.MEDIA_ERROR,details:N.MANIFEST_INCOMPATIBLE_CODECS_ERROR,fatal:!0,url:t.url,error:h,reason:h.message})}});return}if(t.audioTracks){const{preferManagedMediaSource:h}=this.hls.config;o=t.audioTracks.filter(g=>!g.audioCodec||bl(g.audioCodec,"audio",h)),_p(o)}t.subtitles&&(l=t.subtitles,_p(l));const c=d.slice(0);d.sort((h,g)=>{if(h.attrs["HDCP-LEVEL"]!==g.attrs["HDCP-LEVEL"])return(h.attrs["HDCP-LEVEL"]||"")>(g.attrs["HDCP-LEVEL"]||"")?1:-1;if(n&&h.height!==g.height)return h.height-g.height;if(h.frameRate!==g.frameRate)return h.frameRate-g.frameRate;if(h.videoRange!==g.videoRange)return yi.indexOf(h.videoRange)-yi.indexOf(g.videoRange);if(h.videoCodec!==g.videoCodec){const y=Mf(h.videoCodec),b=Mf(g.videoCodec);if(y!==b)return b-y}if(h.uri===g.uri&&h.codecSet!==g.codecSet){const y=mi(h.codecSet),b=mi(g.codecSet);if(y!==b)return b-y}return h.averageBitrate!==g.averageBitrate?h.averageBitrate-g.averageBitrate:0});let u=c[0];if(this.steering&&(d=this.steering.filterParsedLevels(d),d.length!==c.length)){for(let h=0;h<c.length;h++)if(c[h].pathwayId===d[0].pathwayId){u=c[h];break}}this._levels=d;for(let h=0;h<d.length;h++)if(d[h]===u){var m;this._firstLevel=h;const g=u.bitrate,y=this.hls.bandwidthEstimate;if(this.log(`manifest loaded, ${d.length} level(s) found, first bitrate: ${g}`),((m=this.hls.userConfig)==null?void 0:m.abrEwmaDefaultEstimate)===void 0){const b=Math.min(g,this.hls.config.abrEwmaDefaultEstimateMax);b>y&&y===Sp.abrEwmaDefaultEstimate&&(this.hls.bandwidthEstimate=b)}break}const f=r&&!i,p={levels:d,audioTracks:o,subtitleTracks:l,sessionData:t.sessionData,sessionKeys:t.sessionKeys,firstLevel:this._firstLevel,stats:t.stats,audio:r,video:i,altAudio:!f&&o.some(h=>!!h.url)};this.hls.trigger(S.MANIFEST_PARSED,p),(this.hls.config.autoStartLoad||this.hls.forceStartLoad)&&this.hls.startLoad(this.hls.config.startPosition)}get levels(){return this._levels.length===0?null:this._levels}get level(){return this.currentLevelIndex}set level(e){const t=this._levels;if(t.length===0)return;if(e<0||e>=t.length){const u=new Error("invalid level idx"),m=e<0;if(this.hls.trigger(S.ERROR,{type:ge.OTHER_ERROR,details:N.LEVEL_SWITCH_ERROR,level:e,fatal:m,error:u,reason:u.message}),m)return;e=Math.min(e,t.length-1)}const n=this.currentLevelIndex,i=this.currentLevel,r=i?i.attrs["PATHWAY-ID"]:void 0,o=t[e],l=o.attrs["PATHWAY-ID"];if(this.currentLevelIndex=e,this.currentLevel=o,n===e&&o.details&&i&&r===l)return;this.log(`Switching to level ${e} (${o.height?o.height+"p ":""}${o.videoRange?o.videoRange+" ":""}${o.codecSet?o.codecSet+" ":""}@${o.bitrate})${l?" with Pathway "+l:""} from level ${n}${r?" with Pathway "+r:""}`);const d={level:e,attrs:o.attrs,details:o.details,bitrate:o.bitrate,averageBitrate:o.averageBitrate,maxBitrate:o.maxBitrate,realBitrate:o.realBitrate,width:o.width,height:o.height,codecSet:o.codecSet,audioCodec:o.audioCodec,videoCodec:o.videoCodec,audioGroups:o.audioGroups,subtitleGroups:o.subtitleGroups,loaded:o.loaded,loadError:o.loadError,fragmentError:o.fragmentError,name:o.name,id:o.id,uri:o.uri,url:o.url,urlId:0,audioGroupIds:o.audioGroupIds,textGroupIds:o.textGroupIds};this.hls.trigger(S.LEVEL_SWITCHING,d);const c=o.details;if(!c||c.live){const u=this.switchParams(o.uri,i==null?void 0:i.details,c);this.loadPlaylist(u)}}get manualLevel(){return this.manualLevelIndex}set manualLevel(e){this.manualLevelIndex=e,this._startLevel===void 0&&(this._startLevel=e),e!==-1&&(this.level=e)}get firstLevel(){return this._firstLevel}set firstLevel(e){this._firstLevel=e}get startLevel(){if(this._startLevel===void 0){const e=this.hls.config.startLevel;return e!==void 0?e:this.hls.firstAutoLevel}return this._startLevel}set startLevel(e){this._startLevel=e}onError(e,t){t.fatal||!t.context||t.context.type===Ae.LEVEL&&t.context.level===this.level&&this.checkRetry(t)}onFragBuffered(e,{frag:t}){if(t!==void 0&&t.type===le.MAIN){const n=t.elementaryStreams;if(!Object.keys(n).some(r=>!!n[r]))return;const i=this._levels[t.level];i!=null&&i.loadError&&(this.log(`Resetting level error count of ${i.loadError} on frag buffered`),i.loadError=0)}}onLevelLoaded(e,t){var n;const{level:i,details:r}=t,o=this._levels[i];if(!o){var l;this.warn(`Invalid level index ${i}`),(l=t.deliveryDirectives)!=null&&l.skip&&(r.deltaUpdateFailed=!0);return}i===this.currentLevelIndex?(o.fragmentError===0&&(o.loadError=0),this.playlistLoaded(i,t,o.details)):(n=t.deliveryDirectives)!=null&&n.skip&&(r.deltaUpdateFailed=!0)}loadPlaylist(e){super.loadPlaylist();const t=this.currentLevelIndex,n=this.currentLevel;if(n&&this.shouldLoadPlaylist(n)){let i=n.uri;if(e)try{i=e.addDirectives(i)}catch(o){this.warn(`Could not construct new URL with HLS Delivery Directives: ${o}`)}const r=n.attrs["PATHWAY-ID"];this.log(`Loading level index ${t}${(e==null?void 0:e.msn)!==void 0?" at sn "+e.msn+" part "+e.part:""} with${r?" Pathway "+r:""} ${i}`),this.clearTimer(),this.hls.trigger(S.LEVEL_LOADING,{url:i,level:t,pathwayId:n.attrs["PATHWAY-ID"],id:0,deliveryDirectives:e||null})}}get nextLoadLevel(){return this.manualLevelIndex!==-1?this.manualLevelIndex:this.hls.nextAutoLevel}set nextLoadLevel(e){this.level=e,this.manualLevelIndex===-1&&(this.hls.nextAutoLevel=e)}removeLevel(e){var t;const n=this._levels.filter((i,r)=>r!==e?!0:(this.steering&&this.steering.removeLevel(i),i===this.currentLevel&&(this.currentLevel=null,this.currentLevelIndex=-1,i.details&&i.details.fragments.forEach(o=>o.level=-1)),!1));rg(n),this._levels=n,this.currentLevelIndex>-1&&(t=this.currentLevel)!=null&&t.details&&(this.currentLevelIndex=this.currentLevel.details.fragments[0].level),this.hls.trigger(S.LEVELS_UPDATED,{levels:n})}onLevelsUpdated(e,{levels:t}){this._levels=t}checkMaxAutoUpdated(){const{autoLevelCapping:e,maxAutoLevel:t,maxHdcpLevel:n}=this.hls;this._maxAutoLevel!==t&&(this._maxAutoLevel=t,this.hls.trigger(S.MAX_AUTO_LEVEL_UPDATED,{autoLevelCapping:e,levels:this.levels,maxAutoLevel:t,minAutoLevel:this.hls.minAutoLevel,maxHdcpLevel:n}))}}function _p(s){const e={};s.forEach(t=>{const n=t.groupId||"";t.id=e[n]=e[n]||0,e[n]++})}class $O{constructor(e){this.config=void 0,this.keyUriToKeyInfo={},this.emeController=null,this.config=e}abort(e){for(const n in this.keyUriToKeyInfo){const i=this.keyUriToKeyInfo[n].loader;if(i){var t;if(e&&e!==((t=i.context)==null?void 0:t.frag.type))return;i.abort()}}}detach(){for(const e in this.keyUriToKeyInfo){const t=this.keyUriToKeyInfo[e];(t.mediaKeySessionContext||t.decryptdata.isCommonEncryption)&&delete this.keyUriToKeyInfo[e]}}destroy(){this.detach();for(const e in this.keyUriToKeyInfo){const t=this.keyUriToKeyInfo[e].loader;t&&t.destroy()}this.keyUriToKeyInfo={}}createKeyLoadError(e,t=N.KEY_LOAD_ERROR,n,i,r){return new ls({type:ge.NETWORK_ERROR,details:t,fatal:!1,frag:e,response:r,error:n,networkDetails:i})}loadClear(e,t){if(this.emeController&&this.config.emeEnabled){const{sn:n,cc:i}=e;for(let r=0;r<t.length;r++){const o=t[r];if(i<=o.cc&&(n==="initSegment"||o.sn==="initSegment"||n<o.sn)){this.emeController.selectKeySystemFormat(o).then(l=>{o.setKeyFormat(l)});break}}}}load(e){return!e.decryptdata&&e.encrypted&&this.emeController&&this.config.emeEnabled?this.emeController.selectKeySystemFormat(e).then(t=>this.loadInternal(e,t)):this.loadInternal(e)}loadInternal(e,t){var n,i;t&&e.setKeyFormat(t);const r=e.decryptdata;if(!r){const c=new Error(t?`Expected frag.decryptdata to be defined after setting format ${t}`:"Missing decryption data on fragment in onKeyLoading");return Promise.reject(this.createKeyLoadError(e,N.KEY_LOAD_ERROR,c))}const o=r.uri;if(!o)return Promise.reject(this.createKeyLoadError(e,N.KEY_LOAD_ERROR,new Error(`Invalid key URI: "${o}"`)));let l=this.keyUriToKeyInfo[o];if((n=l)!=null&&n.decryptdata.key)return r.key=l.decryptdata.key,Promise.resolve({frag:e,keyInfo:l});if((i=l)!=null&&i.keyLoadPromise){var d;switch((d=l.mediaKeySessionContext)==null?void 0:d.keyStatus){case void 0:case"status-pending":case"usable":case"usable-in-future":return l.keyLoadPromise.then(c=>(r.key=c.keyInfo.decryptdata.key,{frag:e,keyInfo:l}))}}switch(l=this.keyUriToKeyInfo[o]={decryptdata:r,keyLoadPromise:null,loader:null,mediaKeySessionContext:null},r.method){case"ISO-23001-7":case"SAMPLE-AES":case"SAMPLE-AES-CENC":case"SAMPLE-AES-CTR":return r.keyFormat==="identity"?this.loadKeyHTTP(l,e):this.loadKeyEME(l,e);case"AES-128":return this.loadKeyHTTP(l,e);default:return Promise.reject(this.createKeyLoadError(e,N.KEY_LOAD_ERROR,new Error(`Key supplied with unsupported METHOD: "${r.method}"`)))}}loadKeyEME(e,t){const n={frag:t,keyInfo:e};if(this.emeController&&this.config.emeEnabled){const i=this.emeController.loadKey(n);if(i)return(e.keyLoadPromise=i.then(r=>(e.mediaKeySessionContext=r,n))).catch(r=>{throw e.keyLoadPromise=null,r})}return Promise.resolve(n)}loadKeyHTTP(e,t){const n=this.config,i=n.loader,r=new i(n);return t.keyLoader=e.loader=r,e.keyLoadPromise=new Promise((o,l)=>{const d={keyInfo:e,frag:t,responseType:"arraybuffer",url:e.decryptdata.uri},c=n.keyLoadPolicy.default,u={loadPolicy:c,timeout:c.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0},m={onSuccess:(f,p,h,g)=>{const{frag:y,keyInfo:b,url:w}=h;if(!y.decryptdata||b!==this.keyUriToKeyInfo[w])return l(this.createKeyLoadError(y,N.KEY_LOAD_ERROR,new Error("after key load, decryptdata unset or changed"),g));b.decryptdata.key=y.decryptdata.key=new Uint8Array(f.data),y.keyLoader=null,b.loader=null,o({frag:y,keyInfo:b})},onError:(f,p,h,g)=>{this.resetLoader(p),l(this.createKeyLoadError(t,N.KEY_LOAD_ERROR,new Error(`HTTP Error ${f.code} loading key ${f.text}`),h,nt({url:d.url,data:void 0},f)))},onTimeout:(f,p,h)=>{this.resetLoader(p),l(this.createKeyLoadError(t,N.KEY_LOAD_TIMEOUT,new Error("key loading timed out"),h))},onAbort:(f,p,h)=>{this.resetLoader(p),l(this.createKeyLoadError(t,N.INTERNAL_ABORTED,new Error("key loading aborted"),h))}};r.load(d,u,m)})}resetLoader(e){const{frag:t,keyInfo:n,url:i}=e,r=n.loader;t.keyLoader===r&&(t.keyLoader=null,n.loader=null),delete this.keyUriToKeyInfo[i],r&&r.destroy()}}function kp(){return self.SourceBuffer||self.WebKitSourceBuffer}function Ep(){if(!Ns())return!1;const e=kp();return!e||e.prototype&&typeof e.prototype.appendBuffer=="function"&&typeof e.prototype.remove=="function"}function UO(){if(!Ep())return!1;const s=Ns();return typeof(s==null?void 0:s.isTypeSupported)=="function"&&(["avc1.42E01E,mp4a.40.2","av01.0.01M.08","vp09.00.50.08"].some(e=>s.isTypeSupported(On(e,"video")))||["mp4a.40.2","fLaC"].some(e=>s.isTypeSupported(On(e,"audio"))))}function zO(){var s;const e=kp();return typeof(e==null||(s=e.prototype)==null?void 0:s.changeType)=="function"}const GO=250,Mi=2,jO=.1,HO=.05;class WO{constructor(e,t,n,i){this.config=void 0,this.media=null,this.fragmentTracker=void 0,this.hls=void 0,this.nudgeRetry=0,this.stallReported=!1,this.stalled=null,this.moved=!1,this.seeking=!1,this.config=e,this.media=t,this.fragmentTracker=n,this.hls=i}destroy(){this.media=null,this.hls=this.fragmentTracker=null}poll(e,t){const{config:n,media:i,stalled:r}=this;if(i===null)return;const{currentTime:o,seeking:l}=i,d=this.seeking&&!l,c=!this.seeking&&l;if(this.seeking=l,o!==e){if(this.moved=!0,l||(this.nudgeRetry=0),r!==null){if(this.stallReported){const y=self.performance.now()-r;L.warn(`playback not stuck anymore @${o}, after ${Math.round(y)}ms`),this.stallReported=!1}this.stalled=null}return}if(c||d){this.stalled=null;return}if(i.paused&&!l||i.ended||i.playbackRate===0||!Fe.getBuffered(i).length){this.nudgeRetry=0;return}const u=Fe.bufferInfo(i,o,0),m=u.nextStart||0;if(l){const y=u.len>Mi,b=!m||t&&t.start<=o||m-o>Mi&&!this.fragmentTracker.getPartialFragment(o);if(y||b)return;this.moved=!1}if(!this.moved&&this.stalled!==null){var f;if(!(u.len>0)&&!m)return;const b=Math.max(m,u.start||0)-o,w=this.hls.levels?this.hls.levels[this.hls.currentLevel]:null,C=(w==null||(f=w.details)==null?void 0:f.live)?w.details.targetduration*2:Mi,E=this.fragmentTracker.getPartialFragment(o);if(b>0&&(b<=C||E)){i.paused||this._trySkipBufferHole(E);return}}const p=self.performance.now();if(r===null){this.stalled=p;return}const h=p-r;if(!l&&h>=GO&&(this._reportStall(u),!this.media))return;const g=Fe.bufferInfo(i,o,n.maxBufferHole);this._tryFixBufferStall(g,h)}_tryFixBufferStall(e,t){const{config:n,fragmentTracker:i,media:r}=this;if(r===null)return;const o=r.currentTime,l=i.getPartialFragment(o);l&&(this._trySkipBufferHole(l)||!this.media)||(e.len>n.maxBufferHole||e.nextStart&&e.nextStart-o<n.maxBufferHole)&&t>n.highBufferWatchdogPeriod*1e3&&(L.warn("Trying to nudge playhead over buffer-hole"),this.stalled=null,this._tryNudgeBuffer())}_reportStall(e){const{hls:t,media:n,stallReported:i}=this;if(!i&&n){this.stallReported=!0;const r=new Error(`Playback stalling at @${n.currentTime} due to low buffer (${JSON.stringify(e)})`);L.warn(r.message),t.trigger(S.ERROR,{type:ge.MEDIA_ERROR,details:N.BUFFER_STALLED_ERROR,fatal:!1,error:r,buffer:e.len})}}_trySkipBufferHole(e){const{config:t,hls:n,media:i}=this;if(i===null)return 0;const r=i.currentTime,o=Fe.bufferInfo(i,r,0),l=r<o.start?o.start:o.nextStart;if(l){const d=o.len<=t.maxBufferHole,c=o.len>0&&o.len<1&&i.readyState<3,u=l-r;if(u>0&&(d||c)){if(u>t.maxBufferHole){const{fragmentTracker:f}=this;let p=!1;if(r===0){const h=f.getAppendedFrag(0,le.MAIN);h&&l<h.end&&(p=!0)}if(!p){const h=e||f.getAppendedFrag(r,le.MAIN);if(h){let g=!1,y=h.end;for(;y<l;){const b=f.getPartialFragment(y);if(b)y+=b.duration;else{g=!0;break}}if(g)return 0}}}const m=Math.max(l+HO,r+jO);if(L.warn(`skipping hole, adjusting currentTime from ${r} to ${m}`),this.moved=!0,this.stalled=null,i.currentTime=m,e&&!e.gap){const f=new Error(`fragment loaded with buffer holes, seeking from ${r} to ${m}`);n.trigger(S.ERROR,{type:ge.MEDIA_ERROR,details:N.BUFFER_SEEK_OVER_HOLE,fatal:!1,error:f,reason:f.message,frag:e})}return m}}return 0}_tryNudgeBuffer(){const{config:e,hls:t,media:n,nudgeRetry:i}=this;if(n===null)return;const r=n.currentTime;if(this.nudgeRetry++,i<e.nudgeMaxRetry){const o=r+(i+1)*e.nudgeOffset,l=new Error(`Nudging 'currentTime' from ${r} to ${o}`);L.warn(l.message),n.currentTime=o,t.trigger(S.ERROR,{type:ge.MEDIA_ERROR,details:N.BUFFER_NUDGE_ON_STALL,error:l,fatal:!1})}else{const o=new Error(`Playhead still not moving while enough data buffered @${r} after ${e.nudgeMaxRetry} nudges`);L.error(o.message),t.trigger(S.ERROR,{type:ge.MEDIA_ERROR,details:N.BUFFER_STALLED_ERROR,error:o,fatal:!0})}}}const KO=100;class qO extends vl{constructor(e,t,n){super(e,t,n,"[stream-controller]",le.MAIN),this.audioCodecSwap=!1,this.gapController=null,this.level=-1,this._forceStartLoad=!1,this.altAudio=!1,this.audioOnly=!1,this.fragPlaying=null,this.onvplaying=null,this.onvseeked=null,this.fragLastKbps=0,this.couldBacktrack=!1,this.backtrackFragment=null,this.audioCodecSwitch=!1,this.videoBuffer=null,this._registerListeners()}_registerListeners(){const{hls:e}=this;e.on(S.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(S.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(S.MANIFEST_LOADING,this.onManifestLoading,this),e.on(S.MANIFEST_PARSED,this.onManifestParsed,this),e.on(S.LEVEL_LOADING,this.onLevelLoading,this),e.on(S.LEVEL_LOADED,this.onLevelLoaded,this),e.on(S.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),e.on(S.ERROR,this.onError,this),e.on(S.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.on(S.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),e.on(S.BUFFER_CREATED,this.onBufferCreated,this),e.on(S.BUFFER_FLUSHED,this.onBufferFlushed,this),e.on(S.LEVELS_UPDATED,this.onLevelsUpdated,this),e.on(S.FRAG_BUFFERED,this.onFragBuffered,this)}_unregisterListeners(){const{hls:e}=this;e.off(S.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(S.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(S.MANIFEST_LOADING,this.onManifestLoading,this),e.off(S.MANIFEST_PARSED,this.onManifestParsed,this),e.off(S.LEVEL_LOADED,this.onLevelLoaded,this),e.off(S.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),e.off(S.ERROR,this.onError,this),e.off(S.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.off(S.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),e.off(S.BUFFER_CREATED,this.onBufferCreated,this),e.off(S.BUFFER_FLUSHED,this.onBufferFlushed,this),e.off(S.LEVELS_UPDATED,this.onLevelsUpdated,this),e.off(S.FRAG_BUFFERED,this.onFragBuffered,this)}onHandlerDestroying(){this._unregisterListeners(),super.onHandlerDestroying()}startLoad(e){if(this.levels){const{lastCurrentTime:t,hls:n}=this;if(this.stopLoad(),this.setInterval(KO),this.level=-1,!this.startFragRequested){let i=n.startLevel;i===-1&&(n.config.testBandwidth&&this.levels.length>1?(i=0,this.bitrateTest=!0):i=n.firstAutoLevel),n.nextLoadLevel=i,this.level=n.loadLevel,this.loadedmetadata=!1}t>0&&e===-1&&(this.log(`Override startPosition with lastCurrentTime @${t.toFixed(3)}`),e=t),this.state=V.IDLE,this.nextLoadPosition=this.startPosition=this.lastCurrentTime=e,this.tick()}else this._forceStartLoad=!0,this.state=V.STOPPED}stopLoad(){this._forceStartLoad=!1,super.stopLoad()}doTick(){switch(this.state){case V.WAITING_LEVEL:{const{levels:t,level:n}=this,i=t==null?void 0:t[n],r=i==null?void 0:i.details;if(r&&(!r.live||this.levelLastLoaded===i)){if(this.waitForCdnTuneIn(r))break;this.state=V.IDLE;break}else if(this.hls.nextLoadLevel!==this.level){this.state=V.IDLE;break}break}case V.FRAG_LOADING_WAITING_RETRY:{var e;const t=self.performance.now(),n=this.retryDate;if(!n||t>=n||(e=this.media)!=null&&e.seeking){const{levels:i,level:r}=this,o=i==null?void 0:i[r];this.resetStartWhenNotLoaded(o||null),this.state=V.IDLE}}break}this.state===V.IDLE&&this.doTickIdle(),this.onTickEnd()}onTickEnd(){super.onTickEnd(),this.checkBuffer(),this.checkFragmentChanged()}doTickIdle(){const{hls:e,levelLastLoaded:t,levels:n,media:i}=this;if(t===null||!i&&(this.startFragRequested||!e.config.startFragPrefetch)||this.altAudio&&this.audioOnly)return;const r=this.buffering?e.nextLoadLevel:e.loadLevel;if(!(n!=null&&n[r]))return;const o=n[r],l=this.getMainFwdBufferInfo();if(l===null)return;const d=this.getLevelDetails();if(d&&this._streamEnded(l,d)){const g={};this.altAudio&&(g.type="video"),this.hls.trigger(S.BUFFER_EOS,g),this.state=V.ENDED;return}if(!this.buffering)return;e.loadLevel!==r&&e.manualLevel===-1&&this.log(`Adapting to level ${r} from level ${this.level}`),this.level=e.nextLoadLevel=r;const c=o.details;if(!c||this.state===V.WAITING_LEVEL||c.live&&this.levelLastLoaded!==o){this.level=r,this.state=V.WAITING_LEVEL;return}const u=l.len,m=this.getMaxBufferLength(o.maxBitrate);if(u>=m)return;this.backtrackFragment&&this.backtrackFragment.start>l.end&&(this.backtrackFragment=null);const f=this.backtrackFragment?this.backtrackFragment.start:l.end;let p=this.getNextFragment(f,c);if(this.couldBacktrack&&!this.fragPrevious&&p&&p.sn!=="initSegment"&&this.fragmentTracker.getState(p)!==at.OK){var h;const y=((h=this.backtrackFragment)!=null?h:p).sn-c.startSN,b=c.fragments[y-1];b&&p.cc===b.cc&&(p=b,this.fragmentTracker.removeFragment(b))}else this.backtrackFragment&&l.len&&(this.backtrackFragment=null);if(p&&this.isLoopLoading(p,f)){if(!p.gap){const y=this.audioOnly&&!this.altAudio?Pe.AUDIO:Pe.VIDEO,b=(y===Pe.VIDEO?this.videoBuffer:this.mediaBuffer)||this.media;b&&this.afterBufferFlushed(b,y,le.MAIN)}p=this.getNextFragmentLoopLoading(p,c,l,le.MAIN,m)}p&&(p.initSegment&&!p.initSegment.data&&!this.bitrateTest&&(p=p.initSegment),this.loadFragment(p,o,f))}loadFragment(e,t,n){const i=this.fragmentTracker.getState(e);this.fragCurrent=e,i===at.NOT_LOADED||i===at.PARTIAL?e.sn==="initSegment"?this._loadInitSegment(e,t):this.bitrateTest?(this.log(`Fragment ${e.sn} of level ${e.level} is being downloaded to test bitrate and will not be buffered`),this._loadBitrateTestFrag(e,t)):(this.startFragRequested=!0,super.loadFragment(e,t,n)):this.clearTrackerIfNeeded(e)}getBufferedFrag(e){return this.fragmentTracker.getBufferedFrag(e,le.MAIN)}followingBufferedFrag(e){return e?this.getBufferedFrag(e.end+.5):null}immediateLevelSwitch(){this.abortCurrentFrag(),this.flushMainBuffer(0,Number.POSITIVE_INFINITY)}nextLevelSwitch(){const{levels:e,media:t}=this;if(t!=null&&t.readyState){let n;const i=this.getAppendedFrag(t.currentTime);i&&i.start>1&&this.flushMainBuffer(0,i.start-1);const r=this.getLevelDetails();if(r!=null&&r.live){const l=this.getMainFwdBufferInfo();if(!l||l.len<r.targetduration*2)return}if(!t.paused&&e){const l=this.hls.nextLoadLevel,d=e[l],c=this.fragLastKbps;c&&this.fragCurrent?n=this.fragCurrent.duration*d.maxBitrate/(1e3*c)+1:n=0}else n=0;const o=this.getBufferedFrag(t.currentTime+n);if(o){const l=this.followingBufferedFrag(o);if(l){this.abortCurrentFrag();const d=l.maxStartPTS?l.maxStartPTS:l.start,c=l.duration,u=Math.max(o.end,d+Math.min(Math.max(c-this.config.maxFragLookUpTolerance,c*(this.couldBacktrack?.5:.125)),c*(this.couldBacktrack?.75:.25)));this.flushMainBuffer(u,Number.POSITIVE_INFINITY)}}}}abortCurrentFrag(){const e=this.fragCurrent;switch(this.fragCurrent=null,this.backtrackFragment=null,e&&(e.abortRequests(),this.fragmentTracker.removeFragment(e)),this.state){case V.KEY_LOADING:case V.FRAG_LOADING:case V.FRAG_LOADING_WAITING_RETRY:case V.PARSING:case V.PARSED:this.state=V.IDLE;break}this.nextLoadPosition=this.getLoadPosition()}flushMainBuffer(e,t){super.flushMainBuffer(e,t,this.altAudio?"video":null)}onMediaAttached(e,t){super.onMediaAttached(e,t);const n=t.media;this.onvplaying=this.onMediaPlaying.bind(this),this.onvseeked=this.onMediaSeeked.bind(this),n.addEventListener("playing",this.onvplaying),n.addEventListener("seeked",this.onvseeked),this.gapController=new WO(this.config,n,this.fragmentTracker,this.hls)}onMediaDetaching(){const{media:e}=this;e&&this.onvplaying&&this.onvseeked&&(e.removeEventListener("playing",this.onvplaying),e.removeEventListener("seeked",this.onvseeked),this.onvplaying=this.onvseeked=null,this.videoBuffer=null),this.fragPlaying=null,this.gapController&&(this.gapController.destroy(),this.gapController=null),super.onMediaDetaching()}onMediaPlaying(){this.tick()}onMediaSeeked(){const e=this.media,t=e?e.currentTime:null;ae(t)&&this.log(`Media seeked to ${t.toFixed(3)}`);const n=this.getMainFwdBufferInfo();if(n===null||n.len===0){this.warn(`Main forward buffer length on "seeked" event ${n?n.len:"empty"})`);return}this.tick()}onManifestLoading(){this.log("Trigger BUFFER_RESET"),this.hls.trigger(S.BUFFER_RESET,void 0),this.fragmentTracker.removeAllFragments(),this.couldBacktrack=!1,this.startPosition=this.lastCurrentTime=this.fragLastKbps=0,this.levels=this.fragPlaying=this.backtrackFragment=this.levelLastLoaded=null,this.altAudio=this.audioOnly=this.startFragRequested=!1}onManifestParsed(e,t){let n=!1,i=!1;t.levels.forEach(r=>{const o=r.audioCodec;o&&(n=n||o.indexOf("mp4a.40.2")!==-1,i=i||o.indexOf("mp4a.40.5")!==-1)}),this.audioCodecSwitch=n&&i&&!zO(),this.audioCodecSwitch&&this.log("Both AAC/HE-AAC audio found in levels; declaring level codec as HE-AAC"),this.levels=t.levels,this.startFragRequested=!1}onLevelLoading(e,t){const{levels:n}=this;if(!n||this.state!==V.IDLE)return;const i=n[t.level];(!i.details||i.details.live&&this.levelLastLoaded!==i||this.waitForCdnTuneIn(i.details))&&(this.state=V.WAITING_LEVEL)}onLevelLoaded(e,t){var n;const{levels:i}=this,r=t.level,o=t.details,l=o.totalduration;if(!i){this.warn(`Levels were reset while loading level ${r}`);return}this.log(`Level ${r} loaded [${o.startSN},${o.endSN}]${o.lastPartSn?`[part-${o.lastPartSn}-${o.lastPartIndex}]`:""}, cc [${o.startCC}, ${o.endCC}] duration:${l}`);const d=i[r],c=this.fragCurrent;c&&(this.state===V.FRAG_LOADING||this.state===V.FRAG_LOADING_WAITING_RETRY)&&c.level!==t.level&&c.loader&&this.abortCurrentFrag();let u=0;if(o.live||(n=d.details)!=null&&n.live){var m;if(this.checkLiveUpdate(o),o.deltaUpdateFailed)return;u=this.alignPlaylists(o,d.details,(m=this.levelLastLoaded)==null?void 0:m.details)}if(d.details=o,this.levelLastLoaded=d,this.hls.trigger(S.LEVEL_UPDATED,{details:o,level:r}),this.state===V.WAITING_LEVEL){if(this.waitForCdnTuneIn(o))return;this.state=V.IDLE}this.startFragRequested?o.live&&this.synchronizeToLiveEdge(o):this.setStartPosition(o,u),this.tick()}_handleFragmentLoadProgress(e){var t;const{frag:n,part:i,payload:r}=e,{levels:o}=this;if(!o){this.warn(`Levels were reset while fragment load was in progress. Fragment ${n.sn} of level ${n.level} will not be buffered`);return}const l=o[n.level],d=l.details;if(!d){this.warn(`Dropping fragment ${n.sn} of level ${n.level} after level details were reset`),this.fragmentTracker.removeFragment(n);return}const c=l.videoCodec,u=d.PTSKnown||!d.live,m=(t=n.initSegment)==null?void 0:t.data,f=this._getAudioCodec(l),p=this.transmuxer=this.transmuxer||new $g(this.hls,le.MAIN,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)),h=i?i.index:-1,g=h!==-1,y=new Bl(n.level,n.sn,n.stats.chunkCount,r.byteLength,h,g),b=this.initPTS[n.cc];p.push(r,m,f,c,n,i,d.totalduration,u,y,b)}onAudioTrackSwitching(e,t){const n=this.altAudio;if(!!!t.url){if(this.mediaBuffer!==this.media){this.log("Switching on main audio, use media.buffered to schedule main fragment loading"),this.mediaBuffer=this.media;const o=this.fragCurrent;o&&(this.log("Switching to main audio track, cancel main fragment load"),o.abortRequests(),this.fragmentTracker.removeFragment(o)),this.resetTransmuxer(),this.resetLoadingState()}else this.audioOnly&&this.resetTransmuxer();const r=this.hls;n&&(r.trigger(S.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:null}),this.fragmentTracker.removeAllFragments()),r.trigger(S.AUDIO_TRACK_SWITCHED,t)}}onAudioTrackSwitched(e,t){const n=t.id,i=!!this.hls.audioTracks[n].url;if(i){const r=this.videoBuffer;r&&this.mediaBuffer!==r&&(this.log("Switching on alternate audio, use video.buffered to schedule main fragment loading"),this.mediaBuffer=r)}this.altAudio=i,this.tick()}onBufferCreated(e,t){const n=t.tracks;let i,r,o=!1;for(const l in n){const d=n[l];if(d.id==="main"){if(r=l,i=d,l==="video"){const c=n[l];c&&(this.videoBuffer=c.buffer)}}else o=!0}o&&i?(this.log(`Alternate track found, use ${r}.buffered to schedule main fragment loading`),this.mediaBuffer=i.buffer):this.mediaBuffer=this.media}onFragBuffered(e,t){const{frag:n,part:i}=t;if(n&&n.type!==le.MAIN)return;if(this.fragContextChanged(n)){this.warn(`Fragment ${n.sn}${i?" p: "+i.index:""} of level ${n.level} finished buffering, but was aborted. state: ${this.state}`),this.state===V.PARSED&&(this.state=V.IDLE);return}const r=i?i.stats:n.stats;this.fragLastKbps=Math.round(8*r.total/(r.buffering.end-r.loading.first)),n.sn!=="initSegment"&&(this.fragPrevious=n),this.fragBufferedComplete(n,i)}onError(e,t){var n;if(t.fatal){this.state=V.ERROR;return}switch(t.details){case N.FRAG_GAP:case N.FRAG_PARSING_ERROR:case N.FRAG_DECRYPT_ERROR:case N.FRAG_LOAD_ERROR:case N.FRAG_LOAD_TIMEOUT:case N.KEY_LOAD_ERROR:case N.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(le.MAIN,t);break;case N.LEVEL_LOAD_ERROR:case N.LEVEL_LOAD_TIMEOUT:case N.LEVEL_PARSING_ERROR:!t.levelRetry&&this.state===V.WAITING_LEVEL&&((n=t.context)==null?void 0:n.type)===Ae.LEVEL&&(this.state=V.IDLE);break;case N.BUFFER_APPEND_ERROR:case N.BUFFER_FULL_ERROR:if(!t.parent||t.parent!=="main")return;if(t.details===N.BUFFER_APPEND_ERROR){this.resetLoadingState();return}this.reduceLengthAndFlushBuffer(t)&&this.flushMainBuffer(0,Number.POSITIVE_INFINITY);break;case N.INTERNAL_EXCEPTION:this.recoverWorkerError(t);break}}checkBuffer(){const{media:e,gapController:t}=this;if(!(!e||!t||!e.readyState)){if(this.loadedmetadata||!Fe.getBuffered(e).length){const n=this.state!==V.IDLE?this.fragCurrent:null;t.poll(this.lastCurrentTime,n)}this.lastCurrentTime=e.currentTime}}onFragLoadEmergencyAborted(){this.state=V.IDLE,this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.startPosition),this.tickImmediate()}onBufferFlushed(e,{type:t}){if(t!==Pe.AUDIO||this.audioOnly&&!this.altAudio){const n=(t===Pe.VIDEO?this.videoBuffer:this.mediaBuffer)||this.media;this.afterBufferFlushed(n,t,le.MAIN),this.tick()}}onLevelsUpdated(e,t){this.level>-1&&this.fragCurrent&&(this.level=this.fragCurrent.level),this.levels=t.levels}swapAudioCodec(){this.audioCodecSwap=!this.audioCodecSwap}seekToStartPos(){const{media:e}=this;if(!e)return;const t=e.currentTime;let n=this.startPosition;if(n>=0&&t<n){if(e.seeking){this.log(`could not seek to ${n}, already seeking at ${t}`);return}const i=Fe.getBuffered(e),o=(i.length?i.start(0):0)-n;o>0&&(o<this.config.maxBufferHole||o<this.config.maxFragLookUpTolerance)&&(this.log(`adjusting start position by ${o} to match buffer start`),n+=o,this.startPosition=n),this.log(`seek to target start position ${n} from current time ${t}`),e.currentTime=n}}_getAudioCodec(e){let t=this.config.defaultAudioCodec||e.audioCodec;return this.audioCodecSwap&&t&&(this.log("Swapping audio codec"),t.indexOf("mp4a.40.5")!==-1?t="mp4a.40.2":t="mp4a.40.5"),t}_loadBitrateTestFrag(e,t){e.bitrateTest=!0,this._doFragLoad(e,t).then(n=>{const{hls:i}=this;if(!n||this.fragContextChanged(e))return;t.fragmentError=0,this.state=V.IDLE,this.startFragRequested=!1,this.bitrateTest=!1;const r=e.stats;r.parsing.start=r.parsing.end=r.buffering.start=r.buffering.end=self.performance.now(),i.trigger(S.FRAG_LOADED,n),e.bitrateTest=!1})}_handleTransmuxComplete(e){var t;const n="main",{hls:i}=this,{remuxResult:r,chunkMeta:o}=e,l=this.getCurrentContext(o);if(!l){this.resetWhenMissingContext(o);return}const{frag:d,part:c,level:u}=l,{video:m,text:f,id3:p,initSegment:h}=r,{details:g}=u,y=this.altAudio?void 0:r.audio;if(this.fragContextChanged(d)){this.fragmentTracker.removeFragment(d);return}if(this.state=V.PARSING,h){if(h!=null&&h.tracks){const _=d.initSegment||d;this._bufferInitSegment(u,h.tracks,_,o),i.trigger(S.FRAG_PARSING_INIT_SEGMENT,{frag:_,id:n,tracks:h.tracks})}const b=h.initPTS,w=h.timescale;ae(b)&&(this.initPTS[d.cc]={baseTime:b,timescale:w},i.trigger(S.INIT_PTS_FOUND,{frag:d,id:n,initPTS:b,timescale:w}))}if(m&&g&&d.sn!=="initSegment"){const b=g.fragments[d.sn-1-g.startSN],w=d.sn===g.startSN,_=!b||d.cc>b.cc;if(r.independent!==!1){const{startPTS:C,endPTS:E,startDTS:A,endDTS:T}=m;if(c)c.elementaryStreams[m.type]={startPTS:C,endPTS:E,startDTS:A,endDTS:T};else if(m.firstKeyFrame&&m.independent&&o.id===1&&!_&&(this.couldBacktrack=!0),m.dropped&&m.independent){const R=this.getMainFwdBufferInfo(),I=(R?R.end:this.getLoadPosition())+this.config.maxBufferHole,v=m.firstKeyFramePTS?m.firstKeyFramePTS:C;if(!w&&I<v-this.config.maxBufferHole&&!_){this.backtrack(d);return}else _&&(d.gap=!0);d.setElementaryStreamInfo(m.type,d.start,E,d.start,T,!0)}else w&&C>Mi&&(d.gap=!0);d.setElementaryStreamInfo(m.type,C,E,A,T),this.backtrackFragment&&(this.backtrackFragment=d),this.bufferFragmentData(m,d,c,o,w||_)}else if(w||_)d.gap=!0;else{this.backtrack(d);return}}if(y){const{startPTS:b,endPTS:w,startDTS:_,endDTS:C}=y;c&&(c.elementaryStreams[Pe.AUDIO]={startPTS:b,endPTS:w,startDTS:_,endDTS:C}),d.setElementaryStreamInfo(Pe.AUDIO,b,w,_,C),this.bufferFragmentData(y,d,c,o)}if(g&&p!=null&&(t=p.samples)!=null&&t.length){const b={id:n,frag:d,details:g,samples:p.samples};i.trigger(S.FRAG_PARSING_METADATA,b)}if(g&&f){const b={id:n,frag:d,details:g,samples:f.samples};i.trigger(S.FRAG_PARSING_USERDATA,b)}}_bufferInitSegment(e,t,n,i){if(this.state!==V.PARSING)return;this.audioOnly=!!t.audio&&!t.video,this.altAudio&&!this.audioOnly&&delete t.audio;const{audio:r,video:o,audiovideo:l}=t;if(r){let d=e.audioCodec;const c=navigator.userAgent.toLowerCase();if(this.audioCodecSwitch){d&&(d.indexOf("mp4a.40.5")!==-1?d="mp4a.40.2":d="mp4a.40.5");const u=r.metadata;u&&"channelCount"in u&&(u.channelCount||1)!==1&&c.indexOf("firefox")===-1&&(d="mp4a.40.5")}d&&d.indexOf("mp4a.40.5")!==-1&&c.indexOf("android")!==-1&&r.container!=="audio/mpeg"&&(d="mp4a.40.2",this.log(`Android: force audio codec to ${d}`)),e.audioCodec&&e.audioCodec!==d&&this.log(`Swapping manifest audio codec "${e.audioCodec}" for "${d}"`),r.levelCodec=d,r.id="main",this.log(`Init audio buffer, container:${r.container}, codecs[selected/level/parsed]=[${d||""}/${e.audioCodec||""}/${r.codec}]`)}o&&(o.levelCodec=e.videoCodec,o.id="main",this.log(`Init video buffer, container:${o.container}, codecs[level/parsed]=[${e.videoCodec||""}/${o.codec}]`)),l&&this.log(`Init audiovideo buffer, container:${l.container}, codecs[level/parsed]=[${e.codecs}/${l.codec}]`),this.hls.trigger(S.BUFFER_CODECS,t),Object.keys(t).forEach(d=>{const u=t[d].initSegment;u!=null&&u.byteLength&&this.hls.trigger(S.BUFFER_APPENDING,{type:d,data:u,frag:n,part:null,chunkMeta:i,parent:n.type})}),this.tickImmediate()}getMainFwdBufferInfo(){return this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:this.media,le.MAIN)}backtrack(e){this.couldBacktrack=!0,this.backtrackFragment=e,this.resetTransmuxer(),this.flushBufferGap(e),this.fragmentTracker.removeFragment(e),this.fragPrevious=null,this.nextLoadPosition=e.start,this.state=V.IDLE}checkFragmentChanged(){const e=this.media;let t=null;if(e&&e.readyState>1&&e.seeking===!1){const n=e.currentTime;if(Fe.isBuffered(e,n)?t=this.getAppendedFrag(n):Fe.isBuffered(e,n+.1)&&(t=this.getAppendedFrag(n+.1)),t){this.backtrackFragment=null;const i=this.fragPlaying,r=t.level;(!i||t.sn!==i.sn||i.level!==r)&&(this.fragPlaying=t,this.hls.trigger(S.FRAG_CHANGED,{frag:t}),(!i||i.level!==r)&&this.hls.trigger(S.LEVEL_SWITCHED,{level:r}))}}}get nextLevel(){const e=this.nextBufferedFrag;return e?e.level:-1}get currentFrag(){const e=this.media;return e?this.fragPlaying||this.getAppendedFrag(e.currentTime):null}get currentProgramDateTime(){const e=this.media;if(e){const t=e.currentTime,n=this.currentFrag;if(n&&ae(t)&&ae(n.programDateTime)){const i=n.programDateTime+(t-n.start)*1e3;return new Date(i)}}return null}get currentLevel(){const e=this.currentFrag;return e?e.level:-1}get nextBufferedFrag(){const e=this.currentFrag;return e?this.followingBufferedFrag(e):null}get forceStartLoad(){return this._forceStartLoad}}class ps{static get version(){return"1.5.19"}static isMSESupported(){return Ep()}static isSupported(){return UO()}static getMediaSource(){return Ns()}static get Events(){return S}static get ErrorTypes(){return ge}static get ErrorDetails(){return N}static get DefaultConfig(){return ps.defaultConfig?ps.defaultConfig:Sp}static set DefaultConfig(e){ps.defaultConfig=e}constructor(e={}){this.config=void 0,this.userConfig=void 0,this.coreComponents=void 0,this.networkControllers=void 0,this.started=!1,this._emitter=new Ul,this._autoLevelCapping=-1,this._maxHdcpLevel=null,this.abrController=void 0,this.bufferController=void 0,this.capLevelController=void 0,this.latencyController=void 0,this.levelController=void 0,this.streamController=void 0,this.audioTrackController=void 0,this.subtitleTrackController=void 0,this.emeController=void 0,this.cmcdController=void 0,this._media=null,this.url=null,this.triggeringException=void 0,O3(e.debug||!1,"Hls instance");const t=this.config=FO(ps.DefaultConfig,e);this.userConfig=e,t.progressive&&MO(t);const{abrController:n,bufferController:i,capLevelController:r,errorController:o,fpsController:l}=t,d=new o(this),c=this.abrController=new n(this),u=this.bufferController=new i(this),m=this.capLevelController=new r(this),f=new l(this),p=new BD(this),h=new PD(this),g=t.contentSteeringController,y=g?new g(this):null,b=this.levelController=new VO(this,y),w=new d6(this),_=new $O(this.config),C=this.streamController=new qO(this,w,_);m.setStreamController(C),f.setStreamController(C);const E=[p,b,C];y&&E.splice(1,0,y),this.networkControllers=E;const A=[c,u,m,f,h,w];this.audioTrackController=this.createController(t.audioTrackController,E);const T=t.audioStreamController;T&&E.push(new T(this,w,_)),this.subtitleTrackController=this.createController(t.subtitleTrackController,E);const R=t.subtitleStreamController;R&&E.push(new R(this,w,_)),this.createController(t.timelineController,A),_.emeController=this.emeController=this.createController(t.emeController,A),this.cmcdController=this.createController(t.cmcdController,A),this.latencyController=this.createController(OD,A),this.coreComponents=A,E.push(d);const I=d.onErrorOut;typeof I=="function"&&this.on(S.ERROR,I,d)}createController(e,t){if(e){const n=new e(this);return t&&t.push(n),n}return null}on(e,t,n=this){this._emitter.on(e,t,n)}once(e,t,n=this){this._emitter.once(e,t,n)}removeAllListeners(e){this._emitter.removeAllListeners(e)}off(e,t,n=this,i){this._emitter.off(e,t,n,i)}listeners(e){return this._emitter.listeners(e)}emit(e,t,n){return this._emitter.emit(e,t,n)}trigger(e,t){if(this.config.debug)return this.emit(e,e,t);try{return this.emit(e,e,t)}catch(n){if(L.error("An internal error happened while handling event "+e+'. Error message: "'+n.message+'". Here is a stacktrace:',n),!this.triggeringException){this.triggeringException=!0;const i=e===S.ERROR;this.trigger(S.ERROR,{type:ge.OTHER_ERROR,details:N.INTERNAL_EXCEPTION,fatal:i,event:e,error:n}),this.triggeringException=!1}}return!1}listenerCount(e){return this._emitter.listenerCount(e)}destroy(){L.log("destroy"),this.trigger(S.DESTROYING,void 0),this.detachMedia(),this.removeAllListeners(),this._autoLevelCapping=-1,this.url=null,this.networkControllers.forEach(t=>t.destroy()),this.networkControllers.length=0,this.coreComponents.forEach(t=>t.destroy()),this.coreComponents.length=0;const e=this.config;e.xhrSetup=e.fetchSetup=void 0,this.userConfig=null}attachMedia(e){L.log("attachMedia"),this._media=e,this.trigger(S.MEDIA_ATTACHING,{media:e})}detachMedia(){L.log("detachMedia"),this.trigger(S.MEDIA_DETACHING,void 0),this._media=null}loadSource(e){this.stopLoad();const t=this.media,n=this.url,i=this.url=al.buildAbsoluteURL(self.location.href,e,{alwaysNormalize:!0});this._autoLevelCapping=-1,this._maxHdcpLevel=null,L.log(`loadSource:${i}`),t&&n&&(n!==i||this.bufferController.hasSourceTypes())&&(this.detachMedia(),this.attachMedia(t)),this.trigger(S.MANIFEST_LOADING,{url:e})}startLoad(e=-1){L.log(`startLoad(${e})`),this.started=!0,this.resumeBuffering();for(let t=0;t<this.networkControllers.length&&(this.networkControllers[t].startLoad(e),!(!this.started||!this.networkControllers));t++);}stopLoad(){L.log("stopLoad"),this.started=!1;for(let e=0;e<this.networkControllers.length&&(this.networkControllers[e].stopLoad(),!(this.started||!this.networkControllers));e++);}resumeBuffering(){L.log("resume buffering"),this.networkControllers.forEach(e=>{e.resumeBuffering&&e.resumeBuffering()})}pauseBuffering(){L.log("pause buffering"),this.networkControllers.forEach(e=>{e.pauseBuffering&&e.pauseBuffering()})}swapAudioCodec(){L.log("swapAudioCodec"),this.streamController.swapAudioCodec()}recoverMediaError(){L.log("recoverMediaError");const e=this._media;this.detachMedia(),e&&this.attachMedia(e)}removeLevel(e){this.levelController.removeLevel(e)}get levels(){const e=this.levelController.levels;return e||[]}get currentLevel(){return this.streamController.currentLevel}set currentLevel(e){L.log(`set currentLevel:${e}`),this.levelController.manualLevel=e,this.streamController.immediateLevelSwitch()}get nextLevel(){return this.streamController.nextLevel}set nextLevel(e){L.log(`set nextLevel:${e}`),this.levelController.manualLevel=e,this.streamController.nextLevelSwitch()}get loadLevel(){return this.levelController.level}set loadLevel(e){L.log(`set loadLevel:${e}`),this.levelController.manualLevel=e}get nextLoadLevel(){return this.levelController.nextLoadLevel}set nextLoadLevel(e){this.levelController.nextLoadLevel=e}get firstLevel(){return Math.max(this.levelController.firstLevel,this.minAutoLevel)}set firstLevel(e){L.log(`set firstLevel:${e}`),this.levelController.firstLevel=e}get startLevel(){const e=this.levelController.startLevel;return e===-1&&this.abrController.forcedAutoLevel>-1?this.abrController.forcedAutoLevel:e}set startLevel(e){L.log(`set startLevel:${e}`),e!==-1&&(e=Math.max(e,this.minAutoLevel)),this.levelController.startLevel=e}get capLevelToPlayerSize(){return this.config.capLevelToPlayerSize}set capLevelToPlayerSize(e){const t=!!e;t!==this.config.capLevelToPlayerSize&&(t?this.capLevelController.startCapping():(this.capLevelController.stopCapping(),this.autoLevelCapping=-1,this.streamController.nextLevelSwitch()),this.config.capLevelToPlayerSize=t)}get autoLevelCapping(){return this._autoLevelCapping}get bandwidthEstimate(){const{bwEstimator:e}=this.abrController;return e?e.getEstimate():NaN}set bandwidthEstimate(e){this.abrController.resetEstimator(e)}get ttfbEstimate(){const{bwEstimator:e}=this.abrController;return e?e.getEstimateTTFB():NaN}set autoLevelCapping(e){this._autoLevelCapping!==e&&(L.log(`set autoLevelCapping:${e}`),this._autoLevelCapping=e,this.levelController.checkMaxAutoUpdated())}get maxHdcpLevel(){return this._maxHdcpLevel}set maxHdcpLevel(e){FD(e)&&this._maxHdcpLevel!==e&&(this._maxHdcpLevel=e,this.levelController.checkMaxAutoUpdated())}get autoLevelEnabled(){return this.levelController.manualLevel===-1}get manualLevel(){return this.levelController.manualLevel}get minAutoLevel(){const{levels:e,config:{minAutoBitrate:t}}=this;if(!e)return 0;const n=e.length;for(let i=0;i<n;i++)if(e[i].maxBitrate>=t)return i;return 0}get maxAutoLevel(){const{levels:e,autoLevelCapping:t,maxHdcpLevel:n}=this;let i;if(t===-1&&e!=null&&e.length?i=e.length-1:i=t,n)for(let r=i;r--;){const o=e[r].attrs["HDCP-LEVEL"];if(o&&o<=n)return r}return i}get firstAutoLevel(){return this.abrController.firstAutoLevel}get nextAutoLevel(){return this.abrController.nextAutoLevel}set nextAutoLevel(e){this.abrController.nextAutoLevel=e}get playingDate(){return this.streamController.currentProgramDateTime}get mainForwardBufferInfo(){return this.streamController.getMainFwdBufferInfo()}setAudioOption(e){var t;return(t=this.audioTrackController)==null?void 0:t.setAudioOption(e)}setSubtitleOption(e){var t;return(t=this.subtitleTrackController)==null||t.setSubtitleOption(e),null}get allAudioTracks(){const e=this.audioTrackController;return e?e.allAudioTracks:[]}get audioTracks(){const e=this.audioTrackController;return e?e.audioTracks:[]}get audioTrack(){const e=this.audioTrackController;return e?e.audioTrack:-1}set audioTrack(e){const t=this.audioTrackController;t&&(t.audioTrack=e)}get allSubtitleTracks(){const e=this.subtitleTrackController;return e?e.allSubtitleTracks:[]}get subtitleTracks(){const e=this.subtitleTrackController;return e?e.subtitleTracks:[]}get subtitleTrack(){const e=this.subtitleTrackController;return e?e.subtitleTrack:-1}get media(){return this._media}set subtitleTrack(e){const t=this.subtitleTrackController;t&&(t.subtitleTrack=e)}get subtitleDisplay(){const e=this.subtitleTrackController;return e?e.subtitleDisplay:!1}set subtitleDisplay(e){const t=this.subtitleTrackController;t&&(t.subtitleDisplay=e)}get lowLatencyMode(){return this.config.lowLatencyMode}set lowLatencyMode(e){this.config.lowLatencyMode=e}get liveSyncPosition(){return this.latencyController.liveSyncPosition}get latency(){return this.latencyController.latency}get maxLatency(){return this.latencyController.maxLatency}get targetLatency(){return this.latencyController.targetLatency}get drift(){return this.latencyController.drift}get forceStartLoad(){return this.streamController.forceStartLoad}}ps.defaultConfig=void 0;const YO=[(s=>(a.pushScopeId("data-v-d3c9a398"),s=s(),a.popScopeId(),s))(()=>a.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none"},[a.createElementVNode("path",{d:"M5 15L15 5",stroke:"white","stroke-width":"1.7","stroke-miterlimit":"10","stroke-linecap":"round","stroke-linejoin":"round"}),a.createElementVNode("path",{d:"M15 15L5 5",stroke:"white","stroke-width":"1.7","stroke-miterlimit":"10","stroke-linecap":"round","stroke-linejoin":"round"})],-1))],JO={class:"stories__content"},XO={class:"story-container-game"},ZO={class:"story-circle"},QO={class:"story-result"},e8={class:"stories__content__stories-bar"},t8={class:"stories__content__video"},s8={class:"stories__content__video__info__date"},n8={class:"stories__content__video__info__data"},a8=et({__name:"GameStories",props:{stories:{type:Array,default:()=>[]},startStoryIndex:{type:Number,default:0},isFirstGameStories:{type:Boolean,default:!1},isLastGameStories:{type:Boolean,default:!1}},emits:["close","last-story-index","swipe","video-play","video-next-back"],setup(s,{emit:e}){const t=s;a.useCssVars(Q=>({"559904cd":y.value,"57a9d8d4":b.value,"57d750a1":A.value}));const n=ih(),r=[{ids:[607,608],name:"Oportunidad de Gol"},{ids:[12,55],name:"Gol"},{ids:[54,35],name:"Autogol"},{ids:[14,52],name:"Tarjeta Amarilla"},{ids:[15,53],name:"Tarjeta Roja"},{ids:[466,477],name:"Penal Recibido"}].reduce((Q,Ee)=>(Ee.ids.forEach(Te=>{Q.set(Te,Ee.name)}),Q),new Map),o=a.ref(null),l=a.ref(null),d=a.ref([]),c=a.ref(0),u=a.ref(null),m=a.ref(0),f=a.ref(0),p=a.ref(0),h=a.ref(!1),g=a.ref(0),y=a.ref("auto"),b=a.ref("100%"),w=a.ref(null),_=a.ref(0),C=a.ref(null),E=a.ref(null),A=a.computed(()=>q()?"7vw":"16px"),T=a.computed(()=>d.value[c.value]),R=a.computed(()=>({"--icon-play":`url(${n}/icnplay1.svg)`}));function I(){l.value.muted=!1,l.value.play()}const v=a.computed(()=>!T.value.isHls&&["ios"].includes(io()));a.watch(()=>T.value,Q=>{Q&&j()}),a.watch(()=>t.stories,Q=>{if(Q.length){c.value=0,p.value=0;const Ee=Q.map(Te=>({...Te,progress:0,isHls:Te.url.includes(".m3u8"),date:`${Te.date.getDate()}, ${gh[Te.date.getMonth()]} ${Te.date.getFullYear()}`,data:`${r.get(Te.categoryId)} ${mL(Te.player.player_name)}`})).sort((Te,Ve)=>Te.startTime-Ve.startTime);t.startStoryIndex>0&&t.startStoryIndex<Ee.length-1&&(Ee.forEach((Te,Ve)=>{Ve<=t.startStoryIndex&&(Te.progress=100)}),c.value=t.startStoryIndex+1,p.value=c.value),d.value=[...Ee]}},{immediate:!0}),a.watch(()=>o.value,Q=>{Q&&M()},{flush:"post"}),a.watch(()=>u.value,Q=>{Q&&(hL()?(Q.addEventListener("touchstart",ce),Q.addEventListener("touchend",W)):(Q.addEventListener("mousedown",ce),Q.addEventListener("mouseup",W)))},{flush:"post"});function M(){l.value=new Hs("#video-plyr",{controls:[],autoplay:!0,playsinline:!0}),l.value.on("loadeddata",se(l.value)),l.value.on("timeupdate",re()),j(T.value),l.value.isDestroyed=!1}function j(){T.value.isHls?U(T.value):l.value&&(l.value.source={type:"video",sources:[{src:T.value.url,type:"video/mp4"}]})}function U(Q){if(o.value)if(ps.isSupported()){o.value.src=null;let Ee=new ps;Ee.loadSource(Q.url),Ee.attachMedia(o.value)}else l.value.source={type:"video",sources:[{src:Q.url,type:"video/mp4"}]}}function se(){const Q=document.querySelector(".plyr__video-wrapper");return Q&&(_.value=Q.getBoundingClientRect()),()=>{l.value.duration>0&&(l.value.currentTime=T.value.startTime||0,l.value.muted=!1,l.value.play(),e("video-play",T.value))}}function re(){return Ce(),()=>{T.value.currentTime=l.value.currentTime,T.value.progress=(l.value.currentTime-T.value.startTime)/T.value.duration*100,(l.value.currentTime-T.value.startTime)/T.value.duration*100===0?q()&&(h.value=!0):q()&&(h.value=!1),(l.value.currentTime-T.value.startTime)/T.value.duration*100<0?E.value&&!q()&&(E.value.style="display: none",b.value="100%"):E.value&&!q()&&(E.value.style="display: block",b.value="auto"),l.value.currentTime>=T.value.endTime&&(l.value.pause(),ie())}}function ie(Q=1){const Ee=c.value+Q;Ee<0?t.isFirstGameStories?l.value&&(l.value.currentTime=T.value.startTime):he("right",T.value):Ee===d.value.length?t.isLastGameStories?G():he("left",T.value):(c.value=Ee,Q===1&&(p.value=c.value))}function ue(){m.value>f.value?he("left",T.value):m.value<f.value?he("right",T.value):J()}function he(Q,Ee){e("last-story-index",p.value),e("swipe",{direction:Q,currentPlay:Ee})}function J(){const Q=window.innerWidth/2,Ee=m.value<Q,Te=T.value.progress;T.value.progress=Ee?0:100,l.value.pause(),e("video-next-back",{eventName:Ee?"stories_video_anterior":"stories_video_siguiente",currentPlay:{...T.value,progress:Te}}),ie(Ee?-1:1)}function G(){l.value.pause(),l.value.muted=!0,e("last-story-index",p.value),e("close",T.value)}function ce(Q){m.value=Q.changedTouches?Q.changedTouches[0].clientX:Q.clientX}function W(Q){f.value=Q.changedTouches?Q.changedTouches[0].clientX:Q.clientX,ue()}function q(){return/iPhone|iPad/i.test(navigator.userAgent)}function me(){window.scrollTo(0,100)}function ye(){if(window.scrollTo(0,100),io()=="android"){const Q=document.querySelector("#stories");Q.requestFullscreen(Q)}}function Ce(){if(window.ResizeObserver)w.value=new window.ResizeObserver(()=>{C.value&&_.value.height>0&&(C.value.getBoundingClientRect().height>610?y.value="auto":y.value="100dvh",C.value.getBoundingClientRect().height>610?b.value="100%":b.value="auto")}),w.value.observe(C.value);else throw new Error("Resize observer not supported!")}return a.onMounted(()=>{g.value=document.documentElement.scrollTop||document.body.scrollTop,window.scrollTo(0,100),q()?(window.addEventListener("resize",me),me()):(window.addEventListener("orientationchange",ye),ye()),setTimeout(()=>{Ce()},500)}),a.onBeforeUnmount(()=>{window.scrollTo(0,g.value),q()?window.removeEventListener("resize",me):(io()=="android"&&document.exitFullscreen(),window.removeEventListener("orientationchange",ye)),w.value&&(w.value.disconnect(),w.value=null)}),(Q,Ee)=>(a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass(["stories",q()?"stories-safe-areas-iphone":""]),id:"stories",ref_key:"eStories",ref:C,style:a.normalizeStyle(R.value)},[a.createElementVNode("div",{class:a.normalizeClass(["stories__close",q()?"stories-safe-areas-iphone":""]),onClick:G},YO,2),a.createElementVNode("div",JO,[a.createElementVNode("div",XO,[a.createElementVNode("div",ZO,[a.createElementVNode("div",{class:"circle-item-home",style:a.normalizeStyle(`background-image: url(${T.value.thumbnail.logoHomeTeam})`)},null,4),a.createElementVNode("div",{class:"circle-item-away",style:a.normalizeStyle(`background-image: url(${T.value.thumbnail.logoAwayTeam})`)},null,4)]),a.createElementVNode("div",QO,a.toDisplayString(T.value.header.label),1)]),a.createElementVNode("div",{ref_key:"overlay",ref:u,class:"stories__content__overlay"},null,512),a.createElementVNode("div",e8,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(d.value,(Te,Ve)=>(a.openBlock(),a.createElementBlock("div",{key:Ve,class:"stories__content__stories-bar__item"},[a.createElementVNode("div",{class:"stories__content__stories-bar__item__progress",style:a.normalizeStyle({width:`${Te.progress}%`})},null,4)]))),128))]),a.createElementVNode("div",t8,[a.createElementVNode("div",{class:"stories__content__video__info",ref_key:"videoInfo",ref:E},[a.createElementVNode("div",s8,a.toDisplayString(T.value.date),1),a.createElementVNode("div",n8,a.toDisplayString(T.value.data),1)],512),a.createElementVNode("video",{ref_key:"player",ref:o,id:"video-plyr",controls:"",preload:"auto","data-setup":"{}",playsinline:""},null,512)])]),v.value?(a.openBlock(),a.createElementBlock("button",{key:0,id:"btn_play_ios",style:a.normalizeStyle(h.value?"display:block":"display:none"),onClick:I},null,4)):a.createCommentVNode("",!0)],6))}},[["__scopeId","data-v-d3c9a398"]]),i8={playlist_id:"GPI_default2022-12-08T02:51:56.334+00:00-PI-0",last_played_index:0,group_id:"1",total_plays:55,playlist_type:"1",group_playlist_id:"GPI_default2022-12-08T02:51:56.334+00:00",user_id:"goltesting",created_at:"2023-03-30T15:42:36.402+00:00",playlist:[[136731235,"Liga MX","Apertura 2022",69929,"Aldrete Rodriguez, Adrian","Quintero Huitron, Daniel","Estadio Ol&iacute;mpico Universitario, Ciudad de M&eacute;xico.","1 - 0","1 - 0","2022-07-17T05:00:00.000Z","Universidad Nacional","https://golstatsimages.blob.core.windows.net/teams-80/11.png","Necaxa","https://golstatsimages.blob.core.windows.net/teams-80/205.png",12,"Goals",1259,1278,20,1266,"https://golstatsbets.blob.core.windows.net/video-player/69929_1.mp4"],[139820484,"Liga MX","Apertura 2022",70042,"Davila Zavala, Victor","Mejia, Oscar ","Estadio Nuevo Monumental, Rafaela.","3 - 1","1 - 0","2022-09-18T05:00:00.000Z","Leon","https://golstatsimages.blob.core.windows.net/teams-80/173.png","Queretaro","https://golstatsimages.blob.core.windows.net/teams-80/12.png",12,"Goals",1501,1524,24,1512,"https://golstatsbets.blob.core.windows.net/video-player/70042_1.mp4"],[139566427,"Liga MX","Apertura 2022",69989,"Zaldivar Caviedes, Angel","Guerrero Ramirez, Fernando","Estadio Akron, Zapopan.","1 - 4","1 - 0","2022-09-13T05:00:00.000Z","Guadalajara","https://golstatsimages.blob.core.windows.net/teams-80/1.png","Tigres de la UANL","https://golstatsimages.blob.core.windows.net/teams-80/16.png",12,"Goals",6569,6588,108,6576,"https://golstatsbets.blob.core.windows.net/video-player/69989_1.mp4"],[139441913,"Liga MX","Apertura 2022",70031,"Vega Rojas, Alexis","Quintero Huitron, Daniel","Estadio Akron, Zapopan.","1 - 0","1 - 0","2022-09-10T05:00:00.000Z","Guadalajara","https://golstatsimages.blob.core.windows.net/teams-80/1.png","Puebla FC","https://golstatsimages.blob.core.windows.net/teams-80/10.png",12,"Goals",6207,6237,103,6225,"https://golstatsbets.blob.core.windows.net/video-player/70031_1.mp4"],[139566063,"Liga MX","Apertura 2022",69989,"Guzman Palomeque, Nahuel","Guerrero Ramirez, Fernando","Estadio Akron, Zapopan.","1 - 4","0 - 0","2022-09-13T05:00:00.000Z","Guadalajara","https://golstatsimages.blob.core.windows.net/teams-80/1.png","Tigres de la UANL","https://golstatsimages.blob.core.windows.net/teams-80/16.png",39,"Saves",2554,2573,41,2561,"https://golstatsbets.blob.core.windows.net/video-player/69989_1.mp4"],[138276096,"Liga MX","Apertura 2022",69983,"Cortizo de la Piedra, Jordi","Guerrero Ramirez, Fernando","Estadio Cuauhtemoc, Puebla.","2 - 2","1 - 0","2022-08-16T05:00:00.000Z","Puebla FC","https://golstatsimages.blob.core.windows.net/teams-80/10.png","Necaxa","https://golstatsimages.blob.core.windows.net/teams-80/205.png",12,"Goals",5020,5046,83,5034,"https://golstatsbets.blob.core.windows.net/video-player/69983_1.mp4"],[139285589,"Liga MX","Apertura 2022",70021,"Cortizo de la Piedra, Jordi","Escobedo, Adonai","Estadio Cuauhtemoc, Puebla.","2 - 2","1 - 0","2022-09-07T05:00:00.000Z","Puebla FC","https://golstatsimages.blob.core.windows.net/teams-80/10.png","Pachuca","https://golstatsimages.blob.core.windows.net/teams-80/9.png",12,"Goals",1123,1152,18,1140,"https://golstatsbets.blob.core.windows.net/video-player/70021_1.mp4"],[139294964,"Liga MX","Apertura 2022",70022,"Cordova Reyes, Francisco","Ortiz Nava, Marco Antonio","Estadio Universitario, San Nicol&aacute;s de los Garza.","3 - 1","1 - 0","2022-09-07T05:00:00.000Z","Tigres de la UANL","https://golstatsimages.blob.core.windows.net/teams-80/16.png","Toluca","https://golstatsimages.blob.core.windows.net/teams-80/18.png",12,"Goals",2564,2583,41,2571,"https://golstatsbets.blob.core.windows.net/video-player/70022_1.mp4"],[137782451,"Liga MX","Apertura 2022",69968,"Orrantia Trevino, Carlos","Macias Romo, Oscar","Estadio TSM Corona, Torre&oacute;n.","4 - 0","1 - 0","2022-08-06T05:00:00.000Z","Santos Laguna","https://golstatsimages.blob.core.windows.net/teams-80/14.png","Cruz Azul","https://golstatsimages.blob.core.windows.net/teams-80/5.png",12,"Goals",4662,4693,77,4681,"https://golstatsbets.blob.core.windows.net/video-player/69968_1.mp4"],[136551560,"Liga MX","Apertura 2022",69924,"Sanchez Guerrero, Richard","Escobedo, Adonai","Estadio Azteca, Ciudad de M&eacute;xico.","1 - 0","1 - 0","2022-07-13T05:00:00.000Z","America","https://golstatsimages.blob.core.windows.net/teams-80/2.png","Toluca","https://golstatsimages.blob.core.windows.net/teams-80/18.png",12,"Goals",7032,7064,116,7052,"https://golstatsbets.blob.core.windows.net/video-player/69924_1.mp4"],[136391881,"Liga MX","Apertura 2022",69914,"Hurtado Herrera, Aviles","Ramos Palazuelos, Cesar","Estadio Hidalgo, Pachuca.","2 - 0","1 - 0","2022-07-04T05:00:00.000Z","Pachuca","https://golstatsimages.blob.core.windows.net/teams-80/9.png","Queretaro","https://golstatsimages.blob.core.windows.net/teams-80/12.png",12,"Goals",4903,4937,81,4925,"https://golstatsbets.blob.core.windows.net/video-player/69914_1.mp4"],[138158049,"Liga MX","Apertura 2022",69979,"Volpi, Tiago Luis","Hernandez Gomez, Fernando","Estadio Azteca, Ciudad de M&eacute;xico.","2 - 3","0 - 1","2022-08-14T05:00:00.000Z","Cruz Azul","https://golstatsimages.blob.core.windows.net/teams-80/5.png","Toluca","https://golstatsimages.blob.core.windows.net/teams-80/18.png",39,"Saves",7207,7226,119,7214,"https://golstatsbets.blob.core.windows.net/video-player/69979_1.mp4"],[138124884,"Liga MX","Apertura 2022",69978,"Vargas Gil, Camilo","Ortiz Nava, Marco Antonio","Default","1 - 1","0 - 0","2022-08-13T05:00:00.000Z","Guadalajara","https://golstatsimages.blob.core.windows.net/teams-80/1.png","Atlas","https://golstatsimages.blob.core.windows.net/teams-80/4.png",39,"Saves",6080,6099,100,6087,"https://golstatsbets.blob.core.windows.net/video-player/69978_1.mp4"],[139635463,"Liga MX","Apertura 2022",69950,"Fidalgo Fernandez, Alvaro","Hernandez Gomez, Fernando","Estadio Azteca, Ciudad de M&eacute;xico.","3 - 3","0 - 2","2022-09-14T05:00:00.000Z","America","https://golstatsimages.blob.core.windows.net/teams-80/2.png","Santos Laguna","https://golstatsimages.blob.core.windows.net/teams-80/14.png",10,"Assists",7096,7123,118,7111,"https://golstatsbets.blob.core.windows.net/video-player/69950_1.mp4"],[139769221,"Liga MX","Apertura 2022",70039,"Ochoa Magana, Guillermo","Escobedo, Adonai","Estadio Azteca, Ciudad de M&eacute;xico.","2 - 1","0 - 0","2022-09-17T05:00:00.000Z","America","https://golstatsimages.blob.core.windows.net/teams-80/2.png","Guadalajara","https://golstatsimages.blob.core.windows.net/teams-80/1.png",39,"Saves",4567,4586,76,4574,"https://golstatsbets.blob.core.windows.net/video-player/70039_1.mp4"],[139405626,"Liga MX","Apertura 2022",70028,"Acevedo Lopez, Carlos","Santander, Luis Enrique","Estadio La Corregidora, Quer&eacute;taro.","3 - 3","0 - 2","2022-09-10T05:00:00.000Z","Queretaro","https://golstatsimages.blob.core.windows.net/teams-80/12.png","Santos Laguna","https://golstatsimages.blob.core.windows.net/teams-80/14.png",55,"Goals",7452,7471,124,7459,"https://golstatsbets.blob.core.windows.net/video-player/70028_1.mp4"],[139410464,"Liga MX","Apertura 2022",70030,"Gonzalez Vela Alvizu, Julio","Hernandez Gomez, Fernando","Estadio Nemesio Diez, Toluca.","2 - 2","0 - 1","2022-09-10T05:00:00.000Z","Toluca","https://golstatsimages.blob.core.windows.net/teams-80/18.png","Universidad Nacional","https://golstatsimages.blob.core.windows.net/teams-80/11.png",55,"Goals",7467,7486,124,7474,"https://golstatsbets.blob.core.windows.net/video-player/70030_1.mp4"],[139902797,"Liga MX","Apertura 2022",70038,"Quinones Quinones, Julian","Ortiz Nava, Marco Antonio","Estadio BBVA Bancomer, Guadalupe","2 - 0","0 - 0","2022-09-17T05:00:00.000Z","Rayados de Monterrey","https://golstatsimages.blob.core.windows.net/teams-80/7.png","Atlas","https://golstatsimages.blob.core.windows.net/teams-80/4.png",702,"Con enfrentamiento",2334,2353,38,2341,"https://golstatsbets.blob.core.windows.net/video-player/70038_1.mp4"],[139771860,"Liga MX","Apertura 2022",70038,"Andrada, Esteban ","Ortiz Nava, Marco Antonio","Estadio BBVA Bancomer, Guadalupe","2 - 0","0 - 0","2022-09-17T05:00:00.000Z","Rayados de Monterrey","https://golstatsimages.blob.core.windows.net/teams-80/7.png","Atlas","https://golstatsimages.blob.core.windows.net/teams-80/4.png",39,"Saves",6859,6878,113,6866,"https://golstatsbets.blob.core.windows.net/video-player/70038_1.mp4"],[136392028,"Liga MX","Apertura 2022",69914,"Hurtado Herrera, Aviles","Ramos Palazuelos, Cesar","Estadio Hidalgo, Pachuca.","2 - 0","0 - 0","2022-07-04T05:00:00.000Z","Pachuca","https://golstatsimages.blob.core.windows.net/teams-80/9.png","Queretaro","https://golstatsimages.blob.core.windows.net/teams-80/12.png",607,"Oportunidad de gol",335,374,5,342,"https://golstatsbets.blob.core.windows.net/video-player/69914_1.mp4"],[136467302,"Liga MX","Apertura 2022",69909,"Jurado Roca, Sebastian","Mejia, Oscar ","Estadio Universitario, San Nicol&aacute;s de los Garza.","2 - 3","0 - 0","2022-07-02T05:00:00.000Z","Tigres de la UANL","https://golstatsimages.blob.core.windows.net/teams-80/16.png","Cruz Azul","https://golstatsimages.blob.core.windows.net/teams-80/5.png",39,"Saves",879,898,14,886,"https://golstatsbets.blob.core.windows.net/video-player/69909_1.mp4"],[138402354,"Liga MX","Apertura 2022",69990,"Beltran Cruz, Fernando","Mejia, Oscar ","Estadio Victoria, Aguascalientes.","0 - 4","0 - 1","2022-08-19T05:00:00.000Z","Necaxa","https://golstatsimages.blob.core.windows.net/teams-80/205.png","Guadalajara","https://golstatsimages.blob.core.windows.net/teams-80/1.png",12,"Goals",4517,4551,75,4539,"https://golstatsbets.blob.core.windows.net/video-player/69990_1.mp4"],[138157481,"Liga MX","Apertura 2022",69979,"Meneses Villarroel, Jean","Hernandez Gomez, Fernando","Estadio Azteca, Ciudad de M&eacute;xico.","2 - 3","0 - 1","2022-08-14T05:00:00.000Z","Cruz Azul","https://golstatsimages.blob.core.windows.net/teams-80/5.png","Toluca","https://golstatsimages.blob.core.windows.net/teams-80/18.png",12,"Goals",1900,1925,31,1913,"https://golstatsbets.blob.core.windows.net/video-player/69979_1.mp4"],[140106188,"Liga MX","Apertura 2022",69964,"Cortizo de la Piedra, Jordi","Escobedo, Adonai","Estadio Cuauhtemoc, Puebla.","2 - 1","1 - 0","2022-09-23T05:00:00.000Z","Puebla FC","https://golstatsimages.blob.core.windows.net/teams-80/10.png","Universidad Nacional","https://golstatsimages.blob.core.windows.net/teams-80/11.png",12,"Goals",461,484,7,472,"https://golstatsbets.blob.core.windows.net/video-player/69964_1.mp4"],[139839994,"Liga MX","Apertura 2022",70043,"Garcia Carpizo, Brian","Montano Robles, Diego","Estadio Caliente, Tijuana.","1 - 1","0 - 1","2022-09-18T05:00:00.000Z","Club Tijuana","https://golstatsimages.blob.core.windows.net/teams-80/17.png","Necaxa","https://golstatsimages.blob.core.windows.net/teams-80/205.png",12,"Goals",2112,2133,34,2121,"https://golstatsbets.blob.core.windows.net/video-player/70043_1.mp4"],[139403868,"Liga MX","Apertura 2022",70028,"Suarez, Leonardo Gabriel","Santander, Luis Enrique","Estadio La Corregidora, Quer&eacute;taro.","3 - 3","0 - 1","2022-09-10T05:00:00.000Z","Queretaro","https://golstatsimages.blob.core.windows.net/teams-80/12.png","Santos Laguna","https://golstatsimages.blob.core.windows.net/teams-80/14.png",12,"Goals",4296,4315,71,4303,"https://golstatsbets.blob.core.windows.net/video-player/70028_1.mp4"],[139371616,"Liga MX","Apertura 2022",70027,"Gallardo Vasconcelos, Jesus","Montano Robles, Diego","Estadio Olimpico Benito Juarez, Ciudad Juarez.","0 - 1","0 - 1","2022-09-09T05:00:00.000Z","FC Juarez","https://golstatsimages.blob.core.windows.net/teams-80/3014.png","Rayados de Monterrey","https://golstatsimages.blob.core.windows.net/teams-80/7.png",12,"Goals",5724,5750,94,5738,"https://golstatsbets.blob.core.windows.net/video-player/70027_1.mp4"],[139294028,"Liga MX","Apertura 2022",70022,"Thauvin, Florian","Ortiz Nava, Marco Antonio","Estadio Universitario, San Nicol&aacute;s de los Garza.","3 - 1","2 - 0","2022-09-07T05:00:00.000Z","Tigres de la UANL","https://golstatsimages.blob.core.windows.net/teams-80/16.png","Toluca","https://golstatsimages.blob.core.windows.net/teams-80/18.png",12,"Goals",6011,6030,99,6018,"https://golstatsbets.blob.core.windows.net/video-player/70022_1.mp4"],[137023432,"Liga MX","Apertura 2022",69939,"Gignac, Andre Pierre","Ortiz Nava, Marco Antonio","Estadio Universitario, San Nicol&aacute;s de los Garza.","2 - 0","1 - 0","2022-07-23T05:00:00.000Z","Tigres de la UANL","https://golstatsimages.blob.core.windows.net/teams-80/16.png","Atlas","https://golstatsimages.blob.core.windows.net/teams-80/4.png",12,"Goals",2829,2854,47,2842,"https://golstatsbets.blob.core.windows.net/video-player/69939_1.mp4"],[139303531,"Liga MX","Apertura 2022",70023,"Alves da Silva, Daniel","Ramos Palazuelos, Cesar","Estadio Ol&iacute;mpico Universitario, Ciudad de M&eacute;xico.","4 - 1","0 - 0","2022-09-07T05:00:00.000Z","Universidad Nacional","https://golstatsimages.blob.core.windows.net/teams-80/11.png","Queretaro","https://golstatsimages.blob.core.windows.net/teams-80/12.png",702,"Con enfrentamiento",262,293,3,278,"https://golstatsbets.blob.core.windows.net/video-player/70023_1.mp4"],[139303334,"Liga MX","Apertura 2022",70023,"Alves da Silva, Daniel","Ramos Palazuelos, Cesar","Estadio Ol&iacute;mpico Universitario, Ciudad de M&eacute;xico.","4 - 1","0 - 0","2022-09-07T05:00:00.000Z","Universidad Nacional","https://golstatsimages.blob.core.windows.net/teams-80/11.png","Queretaro","https://golstatsimages.blob.core.windows.net/teams-80/12.png",10,"Assists",5256,5283,87,5271,"https://golstatsbets.blob.core.windows.net/video-player/70023_1.mp4"],[139633795,"Liga MX","Apertura 2022",69950,"Valdes Contreras, Diego","Hernandez Gomez, Fernando","Estadio Azteca, Ciudad de M&eacute;xico.","3 - 3","0 - 1","2022-09-14T05:00:00.000Z","America","https://golstatsimages.blob.core.windows.net/teams-80/2.png","Santos Laguna","https://golstatsimages.blob.core.windows.net/teams-80/14.png",607,"Oportunidad de gol",675,701,10,689,"https://golstatsbets.blob.core.windows.net/video-player/69950_1.mp4"],[139242728,"Liga MX","Apertura 2022",70020,"Valdes Contreras, Diego","Caceres Hernandez, Victor Alfonso","Estadio Azteca, Ciudad de M&eacute;xico.","3 - 0","0 - 0","2022-09-06T05:00:00.000Z","America","https://golstatsimages.blob.core.windows.net/teams-80/2.png","CA San Luis","https://golstatsimages.blob.core.windows.net/teams-80/13.png",10,"Assists",2841,2861,46,2849,"https://golstatsbets.blob.core.windows.net/video-player/70020_1.mp4"],[138747150,"Liga MX","Apertura 2022",7e4,"Valdes Contreras, Diego","Miranda Galindo, Erick Yair","Default","1 - 3","0 - 1","2022-08-26T05:00:00.000Z","Mazatlan FC","https://golstatsimages.blob.core.windows.net/teams-80/8.png","America","https://golstatsimages.blob.core.windows.net/teams-80/2.png",12,"Goals",2425,2448,39,2436,"https://golstatsbets.blob.core.windows.net/video-player/70000_1.mp4"],[138462163,"Liga MX","Apertura 2022",69995,"Valdes Contreras, Diego","Santander, Luis Enrique","Estadio Azteca, Ciudad de M&eacute;xico.","7 - 0","1 - 0","2022-08-20T05:00:00.000Z","America","https://golstatsimages.blob.core.windows.net/teams-80/2.png","Cruz Azul","https://golstatsimages.blob.core.windows.net/teams-80/5.png",12,"Goals",3424,3443,56,3431,"https://golstatsbets.blob.core.windows.net/video-player/69995_1.mp4"],[138832474,"Liga MX","Apertura 2022",70005,"Sambueza, Rubens Oscar","Guerrero Ramirez, Fernando","Estadio TSM Corona, Torre&oacute;n.","4 - 1","1 - 1","2022-08-28T05:00:00.000Z","Santos Laguna","https://golstatsimages.blob.core.windows.net/teams-80/14.png","CA San Luis","https://golstatsimages.blob.core.windows.net/teams-80/13.png",12,"Goals",6830,6859,113,6847,"https://golstatsbets.blob.core.windows.net/video-player/70005_1.mp4"],[137178428,"Liga MX","Apertura 2022",69942,"Ibarra Mina, Alex Renato","Montano Robles, Diego","Estadio Jalisco, Guadalajara.","1 - 2","0 - 1","2022-07-26T05:00:00.000Z","Atlas","https://golstatsimages.blob.core.windows.net/teams-80/4.png","Club Tijuana","https://golstatsimages.blob.core.windows.net/teams-80/17.png",12,"Goals",2786,2811,45,2799,"https://golstatsbets.blob.core.windows.net/video-player/69942_1.mp4"],[138339473,"Liga MX","Apertura 2022",69985,"Canelo, Pedro Alexis","Referee 1","Azteca","1 - 2","0 - 0","2022-08-17T05:00:00.000Z","Cruz Azul","https://golstatsimages.blob.core.windows.net/teams-80/5.png","Club Tijuana","https://golstatsimages.blob.core.windows.net/teams-80/17.png",10,"Assists",5133,5159,85,5147,"https://golstatsbets.blob.core.windows.net/video-player/69985_1.mp4"],[136701989,"Liga MX","Apertura 2022",69927,"Gimenez, Santiago Tomas","Macias Romo, Oscar","Estadio Jalisco, Guadalajara.","3 - 2","0 - 1","2022-07-16T05:00:00.000Z","Atlas","https://golstatsimages.blob.core.windows.net/teams-80/4.png","Cruz Azul","https://golstatsimages.blob.core.windows.net/teams-80/5.png",12,"Goals",1374,1397,22,1385,"https://golstatsbets.blob.core.windows.net/video-player/69927_1.mp4"],[139678329,"Liga MX","Apertura 2022",70049,"Antuna Romero, Carlos","Ortiz Nava, Marco Antonio","Estadio Azteca, Ciudad de M&eacute;xico.","2 - 1","0 - 0","2022-09-15T05:00:00.000Z","Cruz Azul","https://golstatsimages.blob.core.windows.net/teams-80/5.png","Leon","https://golstatsimages.blob.core.windows.net/teams-80/173.png",10,"Assists",6728,6752,111,6740,"https://golstatsbets.blob.core.windows.net/video-player/70049_1.mp4"],[139054131,"Liga MX","Apertura 2022",70010,"Davila Zavala, Victor","Ortiz Nava, Marco Antonio","Estadio Victoria, Aguascalientes.","3 - 2","1 - 1","2022-09-02T05:00:00.000Z","Necaxa","https://golstatsimages.blob.core.windows.net/teams-80/205.png","Leon","https://golstatsimages.blob.core.windows.net/teams-80/173.png",12,"Goals",6636,6661,110,6649,"https://golstatsbets.blob.core.windows.net/video-player/70010_1.mp4"],[137503273,"Liga MX","Apertura 2022",69962,"Davila Zavala, Victor","Macias Romo, Oscar","Estadio Nou Camp, Le&ocuate;n.","3 - 2","1 - 0","2022-07-31T05:00:00.000Z","Leon","https://golstatsimages.blob.core.windows.net/teams-80/173.png","America","https://golstatsimages.blob.core.windows.net/teams-80/2.png",12,"Goals",1940,1965,31,1953,"https://golstatsbets.blob.core.windows.net/video-player/69962_1.mp4"],[139308851,"Liga MX","Apertura 2022",70025,"Benedetti Roa, Nicolas","Hernandez Gomez, Fernando","Default","1 - 0","1 - 0","2022-09-07T05:00:00.000Z","Mazatlan FC","https://golstatsimages.blob.core.windows.net/teams-80/8.png","Atlas","https://golstatsimages.blob.core.windows.net/teams-80/4.png",12,"Goals",1867,1891,31,1879,"https://golstatsbets.blob.core.windows.net/video-player/70025_1.mp4"],[138116335,"Liga MX","Apertura 2022",69976,"Benedetti Roa, Nicolas","Galvan Basulto, Eduardo","Estadio Nou Camp, Le&ocuate;n.","0 - 3","0 - 1","2022-08-13T05:00:00.000Z","Leon","https://golstatsimages.blob.core.windows.net/teams-80/173.png","Mazatlan FC","https://golstatsimages.blob.core.windows.net/teams-80/8.png",12,"Goals",591,629,9,617,"https://golstatsbets.blob.core.windows.net/video-player/69976_1.mp4"],[136791022,"Liga MX","Apertura 2022",69932,"Benedetti Roa, Nicolas","Camacho Peregrina, Jorge","Estadio Hidalgo, Pachuca.","1 - 1","0 - 1","2022-07-18T05:00:00.000Z","Pachuca","https://golstatsimages.blob.core.windows.net/teams-80/9.png","Mazatlan FC","https://golstatsimages.blob.core.windows.net/teams-80/8.png",12,"Goals",4284,4315,71,4303,"https://golstatsbets.blob.core.windows.net/video-player/69932_1.mp4"],[139414938,"Liga MX","Apertura 2022",70026,"Batista Ochoa, Facundo","Guerrero Ramirez, Fernando","Estadio Victoria, Aguascalientes.","1 - 2","1 - 0","2022-09-10T05:00:00.000Z","Necaxa","https://golstatsimages.blob.core.windows.net/teams-80/205.png","America","https://golstatsimages.blob.core.windows.net/teams-80/2.png",12,"Goals",461,490,7,478,"https://golstatsbets.blob.core.windows.net/video-player/70026_1.mp4"],[139051051,"Liga MX","Apertura 2022",70010,"Batista Ochoa, Facundo","Ortiz Nava, Marco Antonio","Estadio Victoria, Aguascalientes.","3 - 2","1 - 0","2022-09-02T05:00:00.000Z","Necaxa","https://golstatsimages.blob.core.windows.net/teams-80/205.png","Leon","https://golstatsimages.blob.core.windows.net/teams-80/173.png",12,"Goals",2731,2750,45,2738,"https://golstatsbets.blob.core.windows.net/video-player/70010_1.mp4"],[137828273,"Liga MX","Apertura 2022",69970,"Batista Ochoa, Facundo","Galvan Basulto, Eduardo","Estadio Alfonso Lastras Ram&iacute;rez, San Luis Potos&iacute;.","1 - 2","0 - 1","2022-08-07T05:00:00.000Z","CA San Luis","https://golstatsimages.blob.core.windows.net/teams-80/13.png","Necaxa","https://golstatsimages.blob.core.windows.net/teams-80/205.png",12,"Goals",849,870,13,858,"https://golstatsbets.blob.core.windows.net/video-player/69970_1.mp4"],[139025773,"Liga MX","Apertura 2022",70009,"Nahuelpan Osten, Ariel","Lopez Penuelas, Ismael","Estadio La Corregidora, Quer&eacute;taro.","1 - 1","1 - 0","2022-09-01T05:00:00.000Z","Queretaro","https://golstatsimages.blob.core.windows.net/teams-80/12.png","Puebla FC","https://golstatsimages.blob.core.windows.net/teams-80/10.png",12,"Goals",1454,1481,24,1472,"https://golstatsbets.blob.core.windows.net/video-player/70009_1.mp4"],[138063913,"Liga MX","Apertura 2022",69973,"Gonzalez Gonzalez, Arturo","Pacheco Larios, Guillermo","Estadio Victoria, Aguascalientes.","1 - 2","0 - 1","2022-08-12T05:00:00.000Z","Necaxa","https://golstatsimages.blob.core.windows.net/teams-80/205.png","Rayados de Monterrey","https://golstatsimages.blob.core.windows.net/teams-80/7.png",12,"Goals",6119,6138,101,6126,"https://golstatsbets.blob.core.windows.net/video-player/69973_1.mp4"],[137780455,"Liga MX","Apertura 2022",69966,"Gonzalez Gonzalez, Arturo","Ortiz Nava, Marco Antonio","Estadio BBVA Bancomer, Guadalupe","5 - 1","1 - 0","2022-08-06T05:00:00.000Z","Rayados de Monterrey","https://golstatsimages.blob.core.windows.net/teams-80/7.png","Leon","https://golstatsimages.blob.core.windows.net/teams-80/173.png",12,"Goals",2292,2321,38,2309,"https://golstatsbets.blob.core.windows.net/video-player/69966_1.mp4"],[140090831,"Liga MX","Apertura 2022",69950,"Suarez, Leonardo Gabriel","Hernandez Gomez, Fernando","Estadio Azteca, Ciudad de M&eacute;xico.","3 - 3","0 - 1","2022-09-14T05:00:00.000Z","America","https://golstatsimages.blob.core.windows.net/teams-80/2.png","Santos Laguna","https://golstatsimages.blob.core.windows.net/teams-80/14.png",12,"Goals",585,612,9,600,"https://golstatsbets.blob.core.windows.net/video-player/69950_1.mp4"],[140090832,"Liga MX","Apertura 2022",69950,"Suarez, Leonardo Gabriel","Hernandez Gomez, Fernando","Estadio Azteca, Ciudad de M&eacute;xico.","3 - 3","0 - 2","2022-09-14T05:00:00.000Z","America","https://golstatsimages.blob.core.windows.net/teams-80/2.png","Santos Laguna","https://golstatsimages.blob.core.windows.net/teams-80/14.png",12,"Goals",1175,1197,18,1182,"https://golstatsbets.blob.core.windows.net/video-player/69950_1.mp4"],[139227464,"Liga MX","Apertura 2022",70018,"Suarez, Leonardo Gabriel","Quintero Huitron, Daniel","Estadio TSM Corona, Torre&oacute;n.","3 - 1","1 - 0","2022-09-06T05:00:00.000Z","Santos Laguna","https://golstatsimages.blob.core.windows.net/teams-80/14.png","Necaxa","https://golstatsimages.blob.core.windows.net/teams-80/205.png",12,"Goals",7011,7034,116,7022,"https://golstatsbets.blob.core.windows.net/video-player/70018_1.mp4"],[138830649,"Liga MX","Apertura 2022",70005,"Suarez, Leonardo Gabriel","Guerrero Ramirez, Fernando","Estadio TSM Corona, Torre&oacute;n.","4 - 1","1 - 0","2022-08-28T05:00:00.000Z","Santos Laguna","https://golstatsimages.blob.core.windows.net/teams-80/14.png","CA San Luis","https://golstatsimages.blob.core.windows.net/teams-80/13.png",12,"Goals",4297,4380,71,4304,"https://golstatsbets.blob.core.windows.net/video-player/70005_1.mp4"]]},r8=new Map([[1,45],[2,90],[3,105],[4,120]]),o8=[{id:12,name:"Gol"},{id:55,name:"Gol"},{id:39,name:"Atajada"},{id:10,name:"Asistencia"},{id:702,name:"1vs1 exitoso ofensivo"},{id:607,name:"Oportunidad de gol"}].reduce((s,e)=>(s.set(e.id,e.name),s),new Map);let Mn=null,Vi=null,$i="";const Gt=A3(),l8={components:{GSCSeasonSelect:xB,GSCTournamentSelect:nB,GSCGames:ML,GSCSlider:un,GSCGridTeamsMatches:By,GSCPlayersLanding:ky,GSCTops:FI,GSCTableCalendar:Xx,DiscoverVideos:C3,CarouselFullScreen:I4,Stories:a8},setup(){const s=a.ref("landingref"),{elementSize:e}=iy(s);return{landingref:s,elementSize:e}},props:{currentSeasonId:{type:Number,default:0},isFemale:{type:Boolean,default:!1},showStories:{type:Boolean,default:!0},season:{type:Number,default:1772},isplayer:{type:Boolean,default:!1},user:{type:Object,default:()=>{}},privileges:{type:Object,default:()=>{}},team:{type:Number,default:0},player:{type:Number,default:0},gamesPerMatchDay:{type:Number,default:0,validator(s){return!Number.isNaN(s)&&s>=0}},token:{type:String,default:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MCwibmFtZSI6IlVzdWFyaW8gRnJlZSIsInVzZXJuYW1lIjoiZnJlZUBnb2xzdGF0cy5jb20iLCJlbWFpbCI6ImZyZWVAZ29sc3RhdHMuY29tIiwiaWF0IjoxNjA2NzU4Nzk1LCJleHAiOjE2MzgyOTQ3OTV9.kPNmP7yDtk38cAXrUyc7OHRh6J25VFqy-XUNzbK-4YE"},tournamentsApiUrl:{type:String,default:""},defaultMediaPlayerSeason:{type:Number,default:0},checkLiveGamesIntervalMinutes:{type:Number,default:2}},data(){return{isPreviousDataLoaded:!1,imagesUrl:ih(),roundAbbreviationByGameId:new Map,isCarouselFullScreenVisible:!1,isPlaySeeker:!1,keyupdate:0,carouselPlayerQueue:[],gameEventsUrl:"https://al2nv2dmkc.execute-api.us-west-2.amazonaws.com/prod/mxm/",defaultGameId:0,lastSeasonsIds:[],arrayGamesAdd:[],gamesPages:new Map,show_stories:!0,selectedRoundKeyIndex:0,currentStoriesLastIndex:0,selectedRoundKeyIndexVideo:0,selectedRound:"0",selectedRoundVideos:"0",isLeagueSelected:!0,fullTournamentScheduleFull:[],fullTournamentScheduleFullGoals:[],defaultMatchDayKey:null,isCupTournament:!1,retries:3,userTeamGames:[],userTeamGamesForVideos:[],isCupLegacyTournament:!1,tournamentScheduleKeys:[],tournamentScheduleKeysByKey:new Map,tournamentScheduleKeysGoals:[],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:[],gamesAllStories:[],fullTournamentSchedule:{},tournamentSelected:{id:0},tournamentType:0,tournamentSelectedDropDowns:{seasons:[]},playersLength:0,playersLengthRival:0,nextRivalId:0,updateTableCalendar:0,loadDiscover:!1,hasNextRival:!1,resumeType:1,goalsType:2,is_public:!1,seasonsGamesMap:new Map,gamesOfTheDayPreMatchIds:new Set,seasonsForLiveGames:[],allLiveGames:[],storiesItems:[],currentStories:[],currentStoryIndex:null,isStoriesVisible:!1,seasonPlayersMap:new Map,currentTournaments:[]}},computed:{teamSelected(){return this.user.is_generic||this.tournamentSelected.id!==this.user.tournament?0:this.user.team},teamRival(){return Object.keys(this.fullTournamentSchedule).length>0?this.user.team==this.fullTournamentSchedule.data.prematch.home_team?this.fullTournamentSchedule.data.prematch.visiting_team:this.fullTournamentSchedule.data.prematch.home_team:0},isGenericLike(){return this.user.is_generic||this.tournamentSelected.id!==this.user.tournament},isPlaySeekerAvailable(){return[34230,34178,34201].includes(this.user.id)},games(){if(!this.isGenericLike&&!this.isLeagueSelected)return this.fullTournamentSchedule;{const s=this.gamesPages.get(this.selectedRound);return s&&s[0]?s[0].sort((e,t)=>{let n=e.dateTimeMillis,i=t.dateTimeMillis;return e.is_live&&(n-=1e9),t.is_live&&(i-=1e9),n-i}):[]}},latestRound(){return this.userTeamGames&&this.userTeamGames.length&&this.fullTournamentScheduleFullGoals&&this.fullTournamentScheduleFullGoals.length?this.getUserTeamClosestRound(this.fullTournamentScheduleFullGoals):this.getNormalClosestRound(this.fullTournamentScheduleFullGoals)},closestRound(){return this.userTeamGames&&this.userTeamGames.length?this.getUserTeamClosestRound(this.fullTournamentScheduleFull):this.getNormalClosestRound(this.fullTournamentScheduleFull)},closestRoundVideos(){return this.userTeamGames&&this.userTeamGames.length?this.getUserTeamClosestRound(this.fullTournamentScheduleFullGoals,!0):this.getNormalClosestRound(this.fullTournamentScheduleFullGoals,!0)},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"}},watch:{games:{immediate:!0,deep:!0,async handler(s){if(s&&s.length>0){if(!this.seasonsSelected.length)return;for(let t=0;t<s.length;t++){const n=this.gamesAllStories.findIndex(i=>i.game_id===s[t].game_id);n!==-1&&(this.gamesAllStories[n].is_live=s[t].is_live,this.gamesAllStories[n].game_status=s[t].game_status)}const e=s.filter(t=>t.is_live);for(let t=0;t<e.length;t++){const n=this.gamesAllStories.findIndex(i=>i.game_id===e[t].game_id);if(n!==-1)this.gamesAllStories[n].score=e[t].score;else{this.gamesAllStories.push(e[t]),this.gamesAllStories=this.ordenarYFiltrarPartidos(this.gamesAllStories);let i=[];for(let r=0;r<this.gamesAllStories.length;r++)this.arrayGamesAdd.findIndex(o=>o.game_id===this.gamesAllStories[r].game_id)===-1?i.push({game_id:this.gamesAllStories[r].game_id,last_index:0,status:1}):i.push({game_id:this.arrayGamesAdd[this.arrayGamesAdd.findIndex(o=>o.game_id===this.gamesAllStories[r].game_id)].game_id,last_index:this.arrayGamesAdd[this.arrayGamesAdd.findIndex(o=>o.game_id===this.gamesAllStories[r].game_id)].last_index,status:this.arrayGamesAdd[this.arrayGamesAdd.findIndex(o=>o.game_id===this.gamesAllStories[r].game_id)].status});this.arrayGamesAdd=i,await Le.post($i,{stories:this.arrayGamesAdd},{headers:{Authorization:`${this.token}`,"Content-Type":"application/json"}});for(let r=0;r<this.arrayGamesAdd.length;r++)this.gamesAllStories.findIndex(o=>o.game_id===this.arrayGamesAdd[r].game_id)!==-1&&(this.gamesAllStories[this.gamesAllStories.findIndex(o=>o.game_id===this.arrayGamesAdd[r].game_id)].index=this.arrayGamesAdd[r].last_index,this.gamesAllStories[this.gamesAllStories.findIndex(o=>o.game_id===this.arrayGamesAdd[r].game_id)].status_storie=this.arrayGamesAdd[r].status)}}}}},"allLiveGames.length":{handler(s){s.length===0&&this.resetGamesLiveInterval()}},privileges:{immediate:!0,deep:!0,async handler(s){this.is_public=s!==null}},team:{immediate:!0,deep:!0,async handler(s){s&&this.seasonsSelected.length&&setTimeout(()=>{this.fetchGames(s,this.seasonsSelected)},1e3)}},closestRound(s){this.selectedRoundKeyIndex=this.tournamentScheduleKeys.findIndex(e=>e===s),this.selectedRound=s},latestRound(s){this.selectedRoundKeyIndexVideo=this.tournamentScheduleKeysGoals.findIndex(e=>e===s),this.selectedRoundVideos=s},isCarouselFullScreenVisible:{handler(s){document.getElementsByTagName("html")[0].style.overflow=s?"hidden":"auto"},immediate:!0}},methods:{getOnlyGamesWithGoals(s){return Object.entries(s).reduce((e,[t,n])=>{const i=n.reduce((r,o)=>{const l=o.games.filter(d=>(d.is_live||d.game_status!==4)&&d.score[0]+d.score[1]>0);return l.length&&r.push({...o,games:l}),r},[]);return i.length&&(e[t]=i),e},{})},async onClickPlaySeeker(){try{const e=await(await fetch("https://rhev2kbe0a.execute-api.us-east-2.amazonaws.com/qa/demo/playseeker")).json();this.formatPlaySeekerPlays(e.data||i8)}catch(s){console.error(s)}},formatPlaySeekerPlays(s){let e=[];s&&s.playlist&&s.playlist.length&&(e=s.playlist.reduce((n,i,r)=>{const l={...Object.entries(Gt).reduce((f,[p,h])=>(f[p]=i[h],f),{}),isPlaySeeker:!0,startSeconds:i[Gt.startTime],endSeconds:i[Gt.endTime],totalSeconds:Math.floor(i[Gt.endTime]-i[Gt.startTime]),payloadData:{play_id:i[Gt.playId],total_plays:s.total_plays,play_number:r+1,group_playlist_id:s.group_playlist_id,playlist_id:s.playlist_id,group_id:s.group_id,moment_of_play:i[Gt.momentOfPlay],play_type:i[Gt.categoryId],viewer_second_start:Math.floor(i[Gt.startTime]),intended_second_start:Math.floor(i[Gt.startTime]),intended_second_end:Math.floor(i[Gt.endTime]),latitude_of_user:null,longitude_of_user:null}},[d,c]=l.playerName.split(","),u=d.split(" ");let m="";for(const f of u)if(m+=` ${f}`,f.length>3)break;if(l.playerShortName=c&&d?`${c.trim().charAt(0)}.${m}`:"",!l.mainCategoryName){const[f,p]=l.finalScore.split(" - ");l.arrayScore=[Number(f),Number(p)]}return l.categoryName=o8.get(l.categoryId),n.push(l),n},[]));let t=[];t=e,this.carouselPlayerQueue=t,this.isPlaySeeker=!0,this.isCarouselFullScreenVisible=!0},formatUsername(s){const e=s.split(",");let t="",n="";return e[1]?(n=e[1].trim().split(" "),n[0]?t=n[0]:t=e[1]):e[0]&&(n=e[0].trim().split(" "),n[0]?t=n[0]:t=e[0]),t.trim()},async fetchGameEvents(s){try{return(await Le.get(`${this.gameEventsUrl}${s}`,{headers:{Authorization:`${this.token}`}})).data}catch(e){throw new Error(e)}},async fetchLiveGames(){try{if(this.seasonsForLiveGames.length===0)return[];const s=this.seasonsForLiveGames.reduce((n,i)=>`${n}seasons=${i}&`,""),e=Le.create({headers:{Authorization:`${this.token}`}}),{data:t}=await e.get(`https://qyyibs1w0d.execute-api.us-west-2.amazonaws.com/prod/calendar/gamesBySeason/lives?${s}`);return t}catch(s){throw new Error(s)}},async onClickOpenCarouselVideos(s){try{this.isPlaySeeker=!1;const t=(await this.fetchGameEvents(s)).plays;this.carouselPlayerQueue=t.filter(n=>n.event_type_id===1&&n.video_link!=="-"),this.isCarouselFullScreenVisible=!0}catch(e){throw new Error(e)}},onChangeMatchDayGames(s){this.selectedRound!==s.key&&(this.selectedRound=s.key)},onClickStory({item:s,index:e}){this.openStory(e),this.onClickStories(s)},onClickLive(){const s=this.allLiveGames[0];if(s){const e=this.seasonsGamesMap.get(s.game_id);e&&(this.selectedRound=e.roundAbbreviationV2)}},onClickCloseCarousel(){this.carouselPlayerQueue=[],this.isPlaySeeker=!1,this.isCarouselFullScreenVisible=!1},onChangeIsLeagueSelected(s){this.isLeagueSelected=s},onAction(s){this.$emit("action",s)},onOpenMedia(s){s.type===1&&s.gameIds&&s.gameIds.length>0?this.onClickOpenCarouselVideos(s.gameIds[0]):this.$emit("openmedia",s)},onOpenProfile(s){this.$emit("onOpenProfile",s)},onClickMatch(s){this.$emit("openGame",s)},onClickCalendar(){const s={type:this.isGenericLike||this.isLeagueSelected?0:1,team:this.team,season:this.seasonSelected.id};this.$emit("onClickMyCalendar",s)},moreTops(){const s={team:this.team,season:this.seasonSelected.id};this.$emit("openTops",s)},clickProfileBtn(s){this.$emit("openProfile",s)},viewAllRival(){const s={team:Object.keys(this.fullTournamentSchedule).length>0?this.user.team==this.fullTournamentSchedule.data.prematch.home_team?this.fullTournamentSchedule.data.prematch.visiting_team:this.fullTournamentSchedule.data.prematch.home_team:0,season:this.seasonSelected.id};this.$emit("openAllPlayers",s)},viewAll(){const s={team:this.team,season:this.seasonSelected.id};this.$emit("openAllPlayers",s)},getTotalPlayers(s){this.playersLength=s},getTotalPlayersRival(s){this.playersLengthRival=s},clickCard(s){const e={data:s,isPlayer:this.isplayer};this.$emit("clickOnMainCards",e)},async fetchGames(s,e){const t=e.map(i=>`seasons=${i.id}`).join("&"),n=Le.create({headers:{Authorization:`${this.token}`}});this.fullTournamentSchedule=await n.get(this.gamesUrl+s+"?"+t),this.fullTournamentSchedule.data&&this.fullTournamentSchedule.data.prematch&&(this.fullTournamentSchedule.data.prematch.roundAbbreviationV2=this.roundAbbreviationByGameId.get(this.fullTournamentSchedule.data.prematch.game_id)),this.fullTournamentSchedule.data&&this.fullTournamentSchedule.data.postmatch&&(this.fullTournamentSchedule.data.postmatch.roundAbbreviationV2=this.roundAbbreviationByGameId.get(this.fullTournamentSchedule.data.postmatch.game_id)),this.nextRivalId=Object.keys(this.fullTournamentSchedule).length>0?this.user.team==this.fullTournamentSchedule.data.prematch.home_team?this.fullTournamentSchedule.data.prematch.visiting_team:this.fullTournamentSchedule.data.prematch.home_team:0,this.loadDiscover=!0},generateSeasons(s){const e=[{id:s.id,type:s.type}];return s.related_seasons&&s.related_seasons.length&&e.push(...s.related_seasons.map(t=>({id:t.id,type:t.type}))),e},async onInputTournament(s){this.tournamentSelected=s,this.tournamentType=s.tournament_type,this.tournamentSelected.id&&this.tournamentSelected.id!==s.id&&(this.updateTableCalendar+=1),this.tournamentSelectedDropDowns.id!==s.id&&(this.tournamentSelectedDropDowns=s)},getSeasonDependentPromises({season:s,seasons:e}){const t={headers:{Authorization:`${this.token}`}},n=[Le.get(`https://ts7thxzaik.execute-api.us-west-2.amazonaws.com/prod/players/seasons/${s.id}`,t)];n.push(this.fetchSeasonsGamesAndTeams(e.map(r=>r.id),3)),n.push(this.fetchStoriesPlays(s));const i=`https://ssh88fgvll.execute-api.us-east-2.amazonaws.com/prod/users/${this.user.id}/seasons/${s.id}/stories`;return i!==$i&&($i=i,n.push(Le.get($i,t))),n},async onInputSeason(s){this.isLeagueSelected=!0;try{if(this.seasonSelected.id!==s.id){this.isPreviousDataLoaded=!1,this.seasonSelected=s,this.seasonsSelected=this.generateSeasons(s);const e=this.getSeasonDependentPromises({season:s,seasons:this.seasonsSelected,retries:3,createdUrl:""}),[t,n,i,r]=await Promise.all(e);this.seasonPlayersMap=new Map,t.data&&t.data.players&&t.data.players.forEach(o=>{this.seasonPlayersMap.set(o.player_id,o)}),r&&r.data?this.arrayGamesAdd=r.data.stories.stories:this.arrayGamesAdd=[],this.resetGamesLiveInterval(),this.seasonSelected=s,this.show_stories=!!s.show_stories,this.seasonsForLiveGames=[s.id,...s.related_seasons.map(o=>o.id)],this.$emit("change-season-id",s.id),this.fillStoriesData(i,n.seasonsAndGames),await this.createFullTournamentScheme({seasons:this.seasonsSelected,seasonsAndGames:n.seasonsAndGames,seasonsAndTeams:n.seasonsAndTeams,applySeasonsValidation:!1}),this.team&&await this.fetchGames(this.team,this.seasonsSelected),this.keyupdate+=1}}catch(e){throw new Error(e)}},ordenarYFiltrarPartidos(s){const e=s.filter(t=>t.game_status===1||t.is_live==1||t.game_status==0);return e.sort((t,n)=>new Date(n.date_time_utc)-new Date(t.date_time_utc)),e.slice(0,18)},async fetchSeasonsGamesAndTeams(s,e,t=""){let n=t;try{const i=Le.create({headers:{Authorization:`${this.token}`}});n||(n=this.gamesUrl2,s.forEach((l,d)=>{n+=`${d===0?"":"&"}seasons=${l}`}));const{data:{data:r,teams:o}}=await i.get(n);return{seasonsAndGames:r,seasonsAndTeams:o}}catch(i){if(e>0)return this.fetchSeasonsGamesAndTeams(s,e-1,n);throw new Error(i)}},async fetchStoriesPlays(s){try{return await Le.create({headers:{Authorization:`${this.token}`}}).get("https://cpj4073446.execute-api.us-east-2.amazonaws.com/prod/videos/plays/seasons/"+s.id+"?categories=607&categories=608&categories=12&categories=55&categories=54&categories=35&categories=15&categories=53&type=1")}catch(e){throw new Error(e)}},fillStoriesData(s,e){let t=s.data?s.data.plays:[];this.gamesAllStories=[];for(let i=0;i<e.length;i++)this.gamesAllStories=this.gamesAllStories.concat(e[i].games);this.gamesAllStories=this.ordenarYFiltrarPartidos(this.gamesAllStories);let n=[];for(let i=0;i<this.gamesAllStories.length;i++)this.arrayGamesAdd.findIndex(r=>r.game_id===this.gamesAllStories[i].game_id)===-1?n.push({game_id:this.gamesAllStories[i].game_id,last_index:0,status:1}):n.push({game_id:this.arrayGamesAdd[this.arrayGamesAdd.findIndex(r=>r.game_id===this.gamesAllStories[i].game_id)].game_id,last_index:this.arrayGamesAdd[this.arrayGamesAdd.findIndex(r=>r.game_id===this.gamesAllStories[i].game_id)].last_index,status:this.arrayGamesAdd[this.arrayGamesAdd.findIndex(r=>r.game_id===this.gamesAllStories[i].game_id)].status});this.arrayGamesAdd=n;for(let i=0;i<this.arrayGamesAdd.length;i++)this.gamesAllStories.findIndex(r=>r.game_id===this.arrayGamesAdd[i].game_id)!==-1&&(this.gamesAllStories[this.gamesAllStories.findIndex(r=>r.game_id===this.arrayGamesAdd[i].game_id)].index=this.arrayGamesAdd[i].last_index,this.gamesAllStories[this.gamesAllStories.findIndex(r=>r.game_id===this.arrayGamesAdd[i].game_id)].status_storie=this.arrayGamesAdd[i].status);this.storiesItems=this.getStoriesStructureVideos(t),setTimeout(()=>{this.sendStoriesData()},1e3)},sendStoriesData(){Le.post(`https://ssh88fgvll.execute-api.us-east-2.amazonaws.com/prod/users/${this.user.id}/seasons/${this.seasonsSelected[0].id}/stories`,{stories:this.arrayGamesAdd},{headers:{Authorization:`${this.token}`,"Content-Type":"application/json"}})},getTimeSeconds(s){const[e,t]=s.split(":"),[n,i]=t.split(".");return parseInt(e)*60+parseInt(n)+parseInt(i)/1e3},getPlayTime(s,e){let t="",n=0;switch(s[7]){case 1:t=s[11];break;case 2:t=s[13],n=45;break;case 3:t=s[15],n=90;break;case 4:t=s[17],n=105;break;case 5:t=s[19],n=120;break}return(!t||t==="0")&&(t="00:00"),this.getTimeToSeconds(t)+(this.getTimeToSeconds(s[e])-n*60)},abrirNuevaVentana(){window.open("https://goltipster.com/view-all#golTipster","_blank")},getTimeToSeconds(s){const t=s.indexOf(".")>-1?s.substring(0,s.indexOf(".")):s,[n,i,r]=t.split(":").reverse();return(r?Number(r)*60*60:0)+Number(i)*60+Number(n)},getStoriesStructureVideos(s){let e=[];for(let t=0;t<this.gamesAllStories.length;t++){let n=s.filter(o=>o[3]===this.gamesAllStories[t].game_id).map(o=>({playId:o[29],gameId:o[3],player:this.seasonPlayersMap.get(o[1]),categoryId:o[0],date:new Date(o[4]+"T"+o[5]),url:o[35]==2?"https://daijvvc13prpy.cloudfront.net/golstats-videos/"+this.gamesAllStories[t].game_id+"_1/"+this.gamesAllStories[t].game_id+"_1.m3u8":"https://golstatsbets.blob.core.windows.net/video-player/"+this.gamesAllStories[t].game_id+"_1.mp4",type:"video",thumbnail:{logoHomeTeam:"https://golstatsimages.blob.core.windows.net/teams-80/"+this.gamesAllStories[t].home_team+".png",logoAwayTeam:"https://golstatsimages.blob.core.windows.net/teams-80/"+this.gamesAllStories[t].visiting_team+".png"},header:{label:this.gamesAllStories[t].home_team_acronym+" "+this.gamesAllStories[t].score[0]+":"+this.gamesAllStories[t].score[1]+" "+this.gamesAllStories[t].visiting_team_acronym+" "+this.gamesAllStories[t].matchday_name.replace("Matchday","JOR").replace("de Final","").replace("Playoffs 1","CFI").replace("Playoffs 2","CFV").replace("Playoffs 3","SFI").replace("Playoffs 4","SFV").replace("Playoffs 5","FI").replace("Playoffs 6","FV")},startTime:this.getPlayTime(o,9),endTime:this.getPlayTime(o,10),duration:Math.floor(this.getTimeSeconds(o[10])-this.getTimeSeconds(o[9]))}));const i={},r=n.filter(o=>i[o.playId]?!1:(i[o.playId]=!0,!0));e.push({game_id:this.gamesAllStories[t].game_id,stories:r})}return e},areSeasonsDifferent(s){for(const e of s)if(!this.lastSeasonsIds.includes(e.season_id))return!0;return!1},async createFullTournamentScheme({seasons:s,seasonsAndGames:e,seasonsAndTeams:t,applySeasonsValidation:n}){try{this.seasonsGamesMap=new Map,this.userTeamGames=[],this.userTeamGamesForVideos=[],this.gamesOfTheDayPreMatchIds.clear();let i=0;if(n&&this.areSeasonsDifferent(e))return;e.forEach(l=>{const d=s.find(c=>c.id===l.season_id);d&&(l.type=d.type,l.games.forEach(c=>{c.season_id=l.season_id}),d.type===0&&(i=l.season_id))});const r={seasonsGames:e},o=t.find(l=>l.season_id===i);if(o){const l=o.teams,d=[...r.seasonsGames],c=r&&r.seasonsGames?r.seasonsGames.map(m=>{const f=m.games.reduce((p,h)=>{const g={...h},y=new Date,[b,w,_]=g.date.split("-"),[C,E,A]=g.schedule.split(":"),T=new Date(Number(b),Number(w)-1,Number(_),Number(C),Number(E),Number(A));return g.dateTimeMillis=T.valueOf(),g.home_team=l.find(R=>R.team_id===h.home_team),g.visiting_team=l.find(R=>R.team_id===h.visiting_team),g.game_status===4&&y.getFullYear()===T.getFullYear()&&y.getMonth()===T.getMonth()&&y.getDate()===T.getDate()&&this.gamesOfTheDayPreMatchIds.add(g.game_id),this.seasonsGamesMap.set(g.game_id,g),p[h.matchday_abbreviation]?p[h.matchday_abbreviation][h.game_status===3?"canceled":h.date]?p[h.matchday_abbreviation][h.game_status===3?"canceled":h.date].push(g):p[h.matchday_abbreviation][h.game_status===3?"canceled":h.date]=[g]:p[h.matchday_abbreviation]={[h.game_status===3?"canceled":h.date]:[g]},this.gsData&&this.gsData.teamId&&g.game_status===4&&(g.home_team.team_id===this.gsData.teamId||g.visiting_team.team_id===this.gsData.teamId)&&(this.userTeamGames.push(g),g.score&&g.score[0]+g.score[1]>0&&this.userTeamGamesForVideos.push(g)),p},{});this.userTeamGames.sort((p,h)=>p.dateTimeMillis-h.dateTimeMillis);for(let[p,h]of Object.entries(f))f[p]=Object.entries(h).map(([g,y])=>({date:g,games:y.sort((b,w)=>b.dateTimeMillis-w.dateTimeMillis)})),f[p].sort((g,y)=>g.date<y.date?-1:g.date>y.date?1:0);return{type:m.type,weight:m.type===0?0:m.type===2?1:2,schedule:f}}):[],u=r&&r.seasonsGames?d.map(m=>{const f=m.games.reduce((p,h)=>{const g={...h};return g.dateTimeMillis=new Date(g.date_time_utc).valueOf(),g.home_team=l.find(y=>y.team_id===h.home_team),g.visiting_team=l.find(y=>y.team_id===h.visiting_team),p[h.matchday_abbreviation]?p[h.matchday_abbreviation][h.game_status===3?"canceled":h.date]?(g.game_status!=4||g.is_live==1)&&(g.score[0]!=0||g.score[1]!=0)&&p[h.matchday_abbreviation][h.game_status===3?"canceled":h.date].push(g):(g.game_status!=4||g.is_live==1)&&(g.score[0]!=0||g.score[1]!=0)&&(p[h.matchday_abbreviation][h.game_status===3?"canceled":h.date]=[g]):(g.game_status!=4||g.is_live==1)&&(g.score[0]!=0||g.score[1]!=0)&&(p[h.matchday_abbreviation]={[h.game_status===3?"canceled":h.date]:[g]}),p},{});this.userTeamGames.sort((p,h)=>p.dateTimeMillis-h.dateTimeMillis);for(let[p,h]of Object.entries(f))f[p]=Object.entries(h).map(([g,y])=>({date:g,games:y.sort((b,w)=>b.dateTimeMillis-w.dateTimeMillis)})),f[p].sort((g,y)=>g.date<y.date?-1:g.date>y.date?1:0);return{type:m.type,weight:m.type===0?0:m.type===2?1:2,schedule:f}}):[];c.sort((m,f)=>m.weight-f.weight),this.fullTournamentScheduleFull=c.reduce((m,f)=>{for(const[p,h]of Object.entries(f.schedule))if(f.type===0)if([1,2].includes(this.tournamentType)){const g=Qh.get(this.tournamentType);if(g){const y=g.get(p);y&&(m[y.matchDayAbbreviation]=h)}}else if(this.isCup){const g=p.replace("M",""),y=`Jornada ${g}`;this.isCupLegacy?m[Zh[g]||y]=h:m[Xh[p]||y]=h}else m[Number(p.replace("M","")).toString()]=h;else f.type===2?["PI1","PI2"].includes(p)?m[p]=h:m[`R${Number(p.replace("PO",""))}`]=h:f.type===1&&(m[Jh[p]]=h);return m},{}),this.fullTournamentScheduleFullGoals=u.reduce((m,f)=>{for(const[p,h]of Object.entries(f.schedule))if(f.type===0)if([1,2].includes(this.tournamentType)){const g=Qh.get(this.tournamentType);if(g){const y=g.get(p);y&&(m[y.matchDayAbbreviation]=h)}}else if(this.isCup){const g=p.replace("M",""),y=`Jornada ${g}`;this.isCupLegacy?m[Zh[g]||y]=h:m[Xh[p]||y]=[]}else m[Number(p.replace("M","")).toString()]=h;else f.type===2?["PI1","PI2"].includes(p)?m[p]=h:m[`R${Number(p.replace("PO",""))}`]=h:f.type===1&&(m[Jh[p]]=h);return m},{}),this.roundAbbreviationByGameId=new Map,this.tournamentScheduleKeysByKey.clear(),this.tournamentScheduleKeys=Array.from(Object.entries(this.fullTournamentScheduleFull).reduce((m,[f,p],h)=>{const g=Number(f);let y="";Number.isNaN(g)?y=f:y=g<10?`0${g}`:f;let b=!1,w=null;const _={key:f,value:g,valueText:y,avaible:b,matchDayId:w,index:h,liveGamesIds:new Set};this.tournamentScheduleKeysByKey.set(f,_);const C=p.reduce((A,T)=>(!w&&T&&T.games&&T.games.length&&(_.matchDayId=T.games[0].matchday_id),T.games.forEach(R=>{this.roundAbbreviationByGameId.set(R.game_id,f),R.roundAbbreviation=Number.isNaN(g)?g:`J ${g}`,R.roundAbbreviationV2=f,R.scheduleKey=_}),A=A.concat(T.games),A),[]);for(const A of C)(A.game_status!==4||A.is_live)&&(A.score[0]!==0||A.score[1]!==0)&&(_.avaible=!0);m.set(f,_);const E=this.getPages(C);return this.gamesPages.set(f,E),m},new Map).values()),this.tournamentScheduleKeysGoals=Array.from(Object.entries(this.fullTournamentScheduleFullGoals).reduce((m,[f,p])=>{const h=Number(f);let g="";Number.isNaN(h)?g=f:g=h<10?`0${h}`:f;let y=!1;const b=p.reduce((w,_)=>(_.games.forEach(C=>{C.roundAbbreviation=Number.isNaN(h)?h:`J ${h}`}),w=w.concat(_.games),w),[]);for(let w=0;w<b.length;w++)(b[w].game_status!=4||b[w].is_live&&(b[w].score[0]!=0||b[w].score[1]!=0))&&(y=!0);return m.set(f,{key:f,value:h,valueText:g,avaible:y}),m},new Map).values())}setTimeout(()=>{this.isPreviousDataLoaded=!0,this.checkLiveGames(),this.gamesOfTheDayPreMatchIds.size&&this.createGameOfTheDayTimeouts()},500)}catch(i){throw new Error(i)}finally{this.loadingFlag=!1}},createGameOfTheDayTimeouts(){this.gamesOfTheDayPreMatchIds.size&&this.gamesOfTheDayPreMatchIds.forEach(s=>{const e=this.seasonsGamesMap.get(s);if(e){const t=new Date().valueOf();if(60*1e3*30+e.dateTimeMillis-t>0){const i=e.dateTimeMillis-t-3e5;setTimeout(()=>{this.createCheckLiveGamesInterval()},i>0?i:0)}}})},resetCheckGamesLiveInterval(){clearInterval(Vi),Vi=null},createCheckLiveGamesInterval(){this.resetCheckGamesLiveInterval(),Vi||(Vi=setInterval(()=>{this.checkLiveGames()},this.checkLiveGamesIntervalMinutes*60*1e3))},async checkLiveGames(){try{const s=await this.fetchLiveGames(),e=new Set;if(this.allLiveGames=s.data.reduce((t,n)=>(n.games.forEach(i=>{e.add(i.game_id),t.push(i)}),t),[]),this.allLiveGames.length){Mn||await this.fillGameEvents();const t=[];this.gamesOfTheDayPreMatchIds.forEach(n=>{const i=this.seasonsGamesMap.get(n);i&&new Date().valueOf()>i.dateTimeMillis&&t.push(n)}),t.length&&t.every(i=>this.seasonsGamesMap.get(i).isLiveTracked)&&this.resetCheckGamesLiveInterval()}}catch(s){throw new Error(s)}},createGamesEventsInterval(){this.resetGamesLiveInterval(),Mn=setInterval(()=>{this.fillGameEvents()},6e4)},resetGamesLiveInterval(){clearInterval(Mn),Mn=null},removeGameIfFinished(s,e,t=!1){for(const n of e)if(n.category_id===0&&n.game_status_id===13)if(t)this.fetchGames(this.team,this.seasonsSelected);else{const i=this.seasonsGamesMap.get(n.game_id);this.allLiveGames=this.allLiveGames.filter(r=>r.game_id!==s.game_id),i.is_live=0,i.game_status=0,i.scheduleKey&&i.scheduleKey.liveGamesIds.delete(s.game_id)}},async fillGameEvents(){try{const s=[];let e=null;for(const n of this.allLiveGames){n.isLiveTracked=!0,this.gamesOfTheDayPreMatchIds.size&&this.gamesOfTheDayPreMatchIds.delete(n.game_id);const i=this.seasonsGamesMap.get(n.game_id);i&&(i.is_live=1,i.game_status=4,i.scheduleKey&&i.scheduleKey.liveGamesIds.add(n.game_id)),e=this.fullTournamentSchedule&&this.fullTournamentSchedule.data&&this.fullTournamentSchedule.data.prematch?this.fullTournamentSchedule.data.prematch:null,e&&e.game_id===n.game_id&&(e.is_live=1,e.game_status=4),s.push(this.fetchGameEvents(n.game_id))}const t=await Promise.all(s);for(const n of t){const i=this.seasonsGamesMap.get(n.game_id);if(i){const r=r8.get(n.recent_lapse);let o=!1,l=!1,d=!1;for(const f of n.plays){if(f.category_id===0&&f.game_status_id===18){d=!0;break}f.category_id===0&&f.game_status_id===17&&(l=!0)}o=l&&!d,i.currentTimeLive=o?"MT":r&&r<n.minute?`${r}' + ${n.minute-r}'`:`${n.minute}'`;const c=[Number(n.score[i.home_team.team_id.toString()])+Number(n.score[`own_${i.visiting_team.team_id.toString()}`]),Number(n.score[i.visiting_team.team_id.toString()])+Number(n.score[`own_${i.home_team.team_id.toString()}`])],u=c[0],m=c[1];i.score=[Number.isNaN(u)?0:u,Number.isNaN(m)?0:m],this.removeGameIfFinished(i,n.plays),e&&e.game_id===i.game_id&&(e.currentTimeLive=i.currentTimeLive,e.score=i.score,this.removeGameIfFinished(e,n.plays,!0))}}Mn||this.createGamesEventsInterval()}catch(s){throw new Error(s)}},getPages(s){const e=[];if(this.gamesPerMatchDay>0){let t=[];s.forEach((n,i)=>{t.push(n),(i+1)%this.gamesPerMatchDay===0&&(e.push([...t]),t=[])}),t.length&&e.push([...t])}else e.push(s);return e},getNormalClosestRound(s,e=!1){const t=new Date().valueOf(),n=e?this.getOnlyGamesWithGoals(s):s,i=Object.entries(Object.entries(n).reduce((o,[l,d])=>(o[l]=null,d.forEach(c=>{c.games.forEach(u=>{if([1,0].includes(u.game_status)||u.is_live){const m=t-u.dateTimeMillis;(o[l]===null||m<o[l])&&(o[l]=m)}})}),o),{}));if(!i.length)return"1";const r=i.reduce((o,[l,d])=>{if(d!==null){const c=this.tournamentScheduleKeysByKey.get(l);(o.shortestMillisToNow===null||d<o.shortestMillisToNow&&c.index>=o.scheduleKey.index)&&(o.shortestMillisToNow=d,o.round=l,o.scheduleKey=c)}return o},{round:"",shortestMillisToNow:null,scheduleKey:null});return r.shortestMillisToNow!==null?r.round:i[0][0]},getUserTeamClosestRound(s,e=!1){let t=1;const n=e?this.userTeamGamesForVideos:this.userTeamGames;if(n.length){const i=n[0];for(const[r,o]of Object.entries(s))for(const l of o)if(l.games.find(c=>c.game_id===i.game_id))return r}return t},async changeIndexStory(s){if(this.arrayGamesAdd.length>0){let e=-1,t=-1,n=-1;this.arrayGamesAdd.findIndex(i=>i.game_id===this.currentStories[0].gameId)!=-1&&(e=this.arrayGamesAdd.findIndex(i=>i.game_id===this.currentStories[0].gameId)),this.gamesAllStories.findIndex(i=>i.game_id===this.currentStories[0].gameId)!=-1&&(t=this.gamesAllStories.findIndex(i=>i.game_id===this.currentStories[0].gameId)),this.storiesItems.findIndex(i=>i.game_id===this.currentStories[0].gameId)!=-1&&(n=this.storiesItems.findIndex(i=>i.game_id===this.currentStories[0].gameId)),e!=-1&&(this.gamesAllStories[t].is_live===1?this.storiesItems[n].stories.length-1==s&&this.storiesItems[n].stories.length>1?this.arrayGamesAdd[e].last_index=s-1:this.arrayGamesAdd[e].last_index=s:this.arrayGamesAdd[e].last_index=s),n!=-1&&this.arrayGamesAdd[e].status>0&&(this.arrayGamesAdd[e].status=s>=this.storiesItems[n].stories.length-1?0:1)}else{this.arrayGamesAdd=[];for(let e=0;e<this.storiesItems.length;e++)this.arrayGamesAdd.push({game_id:this.storiesItems[e].game_id,last_index:this.currentStories[0].gameId==this.storiesItems[e].game_id?s:0,status:this.currentStories[0].gameId==this.storiesItems[e].game_id&&s>=this.storiesItems[e].stories.length-1?0:1})}await Le.post(`https://ssh88fgvll.execute-api.us-east-2.amazonaws.com/prod/users/${this.user.id}/seasons/${this.seasonsSelected[0].id}/stories`,{stories:this.arrayGamesAdd},{headers:{Authorization:`${this.token}`,"Content-Type":"application/json"}});for(let e=0;e<this.arrayGamesAdd.length;e++)this.gamesAllStories.findIndex(t=>t.game_id===this.arrayGamesAdd[e].game_id)!=-1&&(this.gamesAllStories[this.gamesAllStories.findIndex(t=>t.game_id===this.arrayGamesAdd[e].game_id)].index=this.arrayGamesAdd[e].last_index,this.gamesAllStories[this.gamesAllStories.findIndex(t=>t.game_id===this.arrayGamesAdd[e].game_id)].status_storie=this.arrayGamesAdd[e].status)},async getLiveGamePlays(s){var n=(await Le.create({headers:{Authorization:`${this.token}`}}).get("https://cpj4073446.execute-api.us-east-2.amazonaws.com/prod/live/videos/plays/seasons/"+this.gamesAllStories[s].season_id+"/games/"+this.gamesAllStories[s].game_id)).data.plays.filter(l=>l[0]===607||l[0]===608||l[0]===12||l[0]===55||l[0]===54||l[0]===35||l[0]===15||l[0]===53);let i=n.map(l=>({playId:l[29],gameId:l[3],player:this.seasonPlayersMap.get(l[1]),categoryId:l[0],date:new Date(l[4]+"T"+l[5]),url:"https://falconvideolive.blob.core.windows.net/video-hls-live/"+this.gamesAllStories[s].game_id+"/"+this.gamesAllStories[s].game_id+".m3u8",type:"video",thumbnail:{logoHomeTeam:"https://golstatsimages.blob.core.windows.net/teams-80/"+this.gamesAllStories[s].home_team+".png",logoAwayTeam:"https://golstatsimages.blob.core.windows.net/teams-80/"+this.gamesAllStories[s].visiting_team+".png"},header:{label:this.gamesAllStories[s].home_team_acronym+" "+this.gamesAllStories[s].score[0]+":"+this.gamesAllStories[s].score[1]+" "+this.gamesAllStories[s].visiting_team_acronym+" "+this.gamesAllStories[s].matchday_name.replace("Matchday","JOR").replace("de Final","").replace("Playoffs 1","CFI").replace("Playoffs 2","CFV").replace("Playoffs 3","SFI").replace("Playoffs 4","SFV").replace("Playoffs 5","FI").replace("Playoffs 6","FV")},startTime:this.getPlayTime(l,9),endTime:this.getPlayTime(l,10),duration:Math.floor(this.getTimeSeconds(l[10])-this.getTimeSeconds(l[9]))}));const r={},o=i.filter(l=>r[l.playId]?!1:(r[l.playId]=!0,!0));this.storiesItems[s]={game_id:this.gamesAllStories[s].game_id,stories:o}},async openStory(s){const e={headers:{Authorization:`${this.token}`}},[t]=await Promise.all([Le.get(`https://ts7thxzaik.execute-api.us-west-2.amazonaws.com/prod/players/games/${this.gamesAllStories[s].game_id}`,e)]);t.data&&t.data.players.forEach(n=>{this.seasonPlayersMap.set(n.player_id,{dob:n.dob,first_name:n.first_name,jersey:n.jersey,last_name:n.last_name,name:n.name,player_name:n.name,nationality:n.nationality,nationality_id:n.nationality_id,nationality_photo:n.nationality_photo,photo:n.photo,player_id:n.player_id,position_id:n.position_id,short_name:n.short_name,team_id:n.team_id})}),this.gamesAllStories[s].is_live==1||this.gamesAllStories[s].game_status==0?(await this.getLiveGamePlays(s),setTimeout(()=>{this.currentStoryIndex=s,this.currentStories=this.storiesItems[s].stories,this.currentStoriesLastIndex=this.gamesAllStories[s].index},100)):(this.currentStoryIndex=s,this.currentStories=this.storiesItems[s].stories,this.currentStoriesLastIndex=this.gamesAllStories[s].index),setTimeout(()=>{this.isStoriesVisible=!0},150)},onCloseStories(s){this.currentStoriesLastIndex=0,this.isStoriesVisible=!1,this.$emit("event-posthog-stories",{event:"stories_cerrar",properties:{play_id:s?s.playId:null,game_id:s?s.gameId:null,category_id:s?s.categoryId:null,start_time:s?s.startTime:null,end_time:s?parseInt(s.currentTime):null,percentage_viewed:s?parseInt(s.progress):null}})},closeStories(){this.currentStoriesLastIndex=0,this.currentStoryIndex=null,this.currentStories=[]},onSwipeStories({direction:s,currentPlay:e}){s==="right"?(this.$emit("event-posthog-stories",{event:"stories_video_siguiente_partido",properties:{play_id:e?e.playId:null,game_id:e?e.gameId:null,category_id:e?e.categoryId:null,start_time:e?e.startTime:null,end_time:e?parseInt(e.currentTime):null,percentage_viewed:e?parseInt(e.progress):null}}),this.currentStoryIndex>0&&this.openStory(this.currentStoryIndex-1)):(this.$emit("event-posthog-stories",{event:"stories_video_anterior_partido",properties:{play_id:e?e.playId:null,game_id:e?e.gameId:null,category_id:e?e.categoryId:null,start_time:e?e.startTime:null,end_time:e?parseInt(e.currentTime):null,percentage_viewed:e?parseInt(e.progress):null}}),this.currentStoryIndex<this.storiesItems.length-1&&this.openStory(this.currentStoryIndex+1))},onClickNextBackVideo({eventName:s,currentPlay:e}){this.$emit("event-posthog-stories",{event:s,properties:{play_id:e?e.playId:null,game_id:e?e.gameId:null,category_id:e?e.categoryId:null,start_time:e?e.startTime:null,end_time:e?parseInt(e.currentTime):null,percentage_viewed:e?parseInt(e.progress):null}})},onChangeTournaments(s){this.currentTournaments=s},onClickStories(s){this.$emit("event-posthog-stories",{event:"stories_ver_play",properties:{game_id:s.game_id}})},onVideoPlay(s){this.$emit("event-posthog-stories",{event:"stories_play",properties:{play_id:s.playId,game_id:s.gameId,category_id:s.categoryId,start_time:s.startTime,end_time:s.endTime,percentage_viewed:0}})}},async created(){},beforeUnmount(){this.resetGamesLiveInterval()}},ys=s=>(a.pushScopeId("data-v-56204eeb"),s=s(),a.popScopeId(),s),c8={class:"gsclanding",ref:"landingref"},d8={key:2,class:"play-seeker-image"},u8={class:"play-seeker-image__info"},h8=ys(()=>a.createElementVNode("div",{class:"play-seeker-image__info__ai"},"Inteligencia Artificial",-1)),m8={class:"play-seeker-image__info__legends-and-button"},f8=ys(()=>a.createElementVNode("div",{class:"play-seeker-image__info__legends-and-button__legends"},"LEYENDAS PARA TI",-1)),g8={class:"play-icon"},p8=["src"],y8=ys(()=>a.createElementVNode("div",{class:"text"},"Explora videos",-1)),b8={class:"play-seeker-image__players"},w8=["src"],S8={key:3,class:"container-selectors-mobile"},_8={class:"container-selectors-mobile-tournament"},k8={class:"container-selectors-mobile-season"},E8={key:0,class:"home-item-movil"},T8=ys(()=>a.createElementVNode("div",{class:"home-movil"},"Inicio",-1)),C8={class:"name-user-movil"},x8={key:1,class:"home-item"},A8={key:2,class:"bar-settings"},L8={class:"name-user"},I8={class:"container-selectors"},B8={class:"selector-tournament"},R8={class:"selector-seasons"},v8={key:0,class:"container-games"},N8={key:0,class:"container-games"},D8={key:7,class:"container-players-myteam"},P8={key:2,class:"play-seeker-image"},O8={class:"play-seeker-image__info"},F8=ys(()=>a.createElementVNode("div",{class:"play-seeker-image__info__ai"},"Inteligencia Artificial",-1)),M8={class:"play-seeker-image__info__legends-and-button"},V8=ys(()=>a.createElementVNode("div",{class:"play-seeker-image__info__legends-and-button__legends"},"LEYENDAS PARA TI",-1)),$8={class:"play-icon"},U8=["src"],z8=ys(()=>a.createElementVNode("div",{class:"text"},"Explora videos",-1)),G8={class:"play-seeker-image__players"},j8=["src"],H8={key:3,class:"container-selectors-mobile"},W8={class:"container-selectors-mobile-tournament"},K8={class:"container-selectors-mobile-season"},q8={key:0,class:"home-item-movil"},Y8=ys(()=>a.createElementVNode("div",{class:"home-movil"},"Inicio",-1)),J8={class:"name-user-movil"},X8={key:1,class:"home-item"},Z8={key:2,class:"bar-settings"},Q8={class:"name-user"},eF={class:"container-selectors"},tF={class:"selector-tournament"},sF={class:"selector-seasons"},nF={key:3,class:"container-games"},aF={key:5,class:"container-players"};function iF(s,e,t,n,i,r){const o=a.resolveComponent("Stories"),l=a.resolveComponent("CarouselFullScreen"),d=a.resolveComponent("GSCTournamentSelect"),c=a.resolveComponent("GSCSeasonSelect"),u=a.resolveComponent("GSCGridTeamsMatches"),m=a.resolveComponent("GSCTableCalendar"),f=a.resolveComponent("GSCGames");a.resolveComponent("DiscoverVideos");const p=a.resolveComponent("GSCPlayersLanding"),h=a.resolveComponent("GSCTops");return a.resolveComponent("GSCSlider"),a.openBlock(),a.createElementBlock("div",c8,[t.isplayer?(a.openBlock(),a.createElementBlock(a.Fragment,{key:0},[i.isStoriesVisible&&t.showStories?(a.openBlock(),a.createBlock(o,{key:0,stories:i.currentStories,"start-story-index":i.currentStoriesLastIndex,"is-first-game-stories":i.currentStoryIndex===0,"is-last-game-stories":i.currentStoryIndex===i.storiesItems.length-1,onLastStoryIndex:r.changeIndexStory,onClose:r.onCloseStories,onSwipe:r.onSwipeStories,onVideoNextBack:r.onClickNextBackVideo,onVideoPlay:r.onVideoPlay},null,8,["stories","start-story-index","is-first-game-stories","is-last-game-stories","onLastStoryIndex","onClose","onSwipe","onVideoNextBack","onVideoPlay"])):a.createCommentVNode("",!0),i.isCarouselFullScreenVisible?(a.openBlock(),a.createBlock(l,{key:1,"player-queue":i.carouselPlayerQueue,"is-play-seeker":i.isPlaySeeker,"playlist-index":0,onClose:r.onClickCloseCarousel},null,8,["player-queue","is-play-seeker","onClose"])):a.createCommentVNode("",!0),r.isPlaySeekerAvailable?(a.openBlock(),a.createElementBlock("div",d8,[a.createElementVNode("div",u8,[h8,a.createElementVNode("div",m8,[f8,a.createElementVNode("div",{role:"button",class:"play-seeker-image__info__legends-and-button__button",onClick:e[0]||(e[0]=(...g)=>r.onClickPlaySeeker&&r.onClickPlaySeeker(...g))},[a.createElementVNode("div",g8,[a.createElementVNode("img",{src:`${i.imagesUrl}icn-play.svg`,alt:""},null,8,p8)]),y8])])]),a.createElementVNode("div",b8,[a.createElementVNode("img",{src:`${i.imagesUrl}players@2x.png`,alt:""},null,8,w8)])])):a.createCommentVNode("",!0),n.elementSize.width<=680&&n.elementSize.width>0?(a.openBlock(),a.createElementBlock("div",S8,[a.createElementVNode("div",_8,[a.createVNode(d,{"current-season-id":t.currentSeasonId,width:"100%","api-url":t.tournamentsApiUrl,onInput:r.onInputTournament,onChangeTournaments:r.onChangeTournaments},null,8,["current-season-id","api-url","onInput","onChangeTournaments"])]),a.createElementVNode("div",k8,[a.createVNode(c,{"current-season-id":t.currentSeasonId,width:"100%",seasons:i.tournamentSelectedDropDowns.seasons,onInput:r.onInputSeason},null,8,["current-season-id","seasons","onInput"])])])):a.createCommentVNode("",!0),a.createElementVNode("div",{class:a.normalizeClass(r.containerbackground)},[a.createElementVNode("div",{class:a.normalizeClass(r.containerdata)},[n.elementSize.width<=680?(a.openBlock(),a.createElementBlock("div",E8,[T8,a.createElementVNode("div",C8,[t.isFemale?(a.openBlock(),a.createElementBlock(a.Fragment,{key:0},[a.createTextVNode("Bienvenida ")],64)):(a.openBlock(),a.createElementBlock(a.Fragment,{key:1},[a.createTextVNode("Bienvenido ")],64)),i.is_public?(a.openBlock(),a.createElementBlock(a.Fragment,{key:2},[a.createTextVNode("a GolStats ")],64)):(a.openBlock(),a.createElementBlock(a.Fragment,{key:3},[a.createTextVNode(a.toDisplayString(r.formatUsername(t.user.name)),1)],64))])])):a.createCommentVNode("",!0),n.elementSize.width>680?(a.openBlock(),a.createElementBlock("div",x8,"Inicio")):a.createCommentVNode("",!0),n.elementSize.width>680?(a.openBlock(),a.createElementBlock("div",A8,[a.createElementVNode("div",L8,[t.isFemale?(a.openBlock(),a.createElementBlock(a.Fragment,{key:0},[a.createTextVNode("Bienvenida ")],64)):(a.openBlock(),a.createElementBlock(a.Fragment,{key:1},[a.createTextVNode("Bienvenido ")],64)),i.is_public?(a.openBlock(),a.createElementBlock(a.Fragment,{key:2},[a.createTextVNode("a GolStats ")],64)):(a.openBlock(),a.createElementBlock(a.Fragment,{key:3},[a.createTextVNode(a.toDisplayString(r.formatUsername(t.user.name)),1)],64))]),a.createElementVNode("div",I8,[a.createElementVNode("div",B8,[a.createVNode(d,{"current-season-id":t.currentSeasonId,"api-url":t.tournamentsApiUrl,onInput:r.onInputTournament,onChangeTournaments:r.onChangeTournaments},null,8,["current-season-id","api-url","onInput","onChangeTournaments"])]),a.createElementVNode("div",R8,[a.createVNode(c,{"current-season-id":t.currentSeasonId,seasons:i.tournamentSelectedDropDowns.seasons,onInput:r.onInputSeason},null,8,["current-season-id","seasons","onInput"])])])])):a.createCommentVNode("",!0),t.user.tournament===i.tournamentSelected.id?(a.openBlock(),a.createElementBlock(a.Fragment,{key:3},[a.createElementVNode("div",{class:a.normalizeClass(r.containerGridCalendarTable)},[a.createElementVNode("div",{class:"container-grid",style:a.normalizeStyle([n.elementSize.width<=1e3?"width: 100%; ":"",!(t.isplayer&&!r.isGenericLike)&&r.isGenericLike?"max-height: 380px !important;":"max-height: 480px !important; margin-top: 15px !important;"])},[n.elementSize.width>1e3?(a.openBlock(),a.createBlock(u,{key:0,isPlayer:t.isplayer&&!r.isGenericLike,"player-id":t.user.player,"team-id":t.user.team,"is-female":i.tournamentSelected.is_female==1,"tournament-selected":i.tournamentSelected,"is-public":i.is_public,"season-selected":i.seasonSelected.id,"next-rival-id":Object.keys(i.fullTournamentSchedule).length>0?t.user.team==i.fullTournamentSchedule.data.prematch.home_team?i.fullTournamentSchedule.data.prematch.visiting_team:i.fullTournamentSchedule.data.prematch.home_team:0,"team-img":"https://golstatsimages.blob.core.windows.net/teams-150/"+t.user.team+".png","player-img":"https://golstatsimages.blob.core.windows.net/players-profile/"+t.user.player+".png","rival-img":Object.keys(i.fullTournamentSchedule).length>0?t.user.team==i.fullTournamentSchedule.data.prematch.home_team?"https://golstatsimages.blob.core.windows.net/teams-150/"+i.fullTournamentSchedule.data.prematch.visiting_team+".png":"https://golstatsimages.blob.core.windows.net/teams-150/"+i.fullTournamentSchedule.data.prematch.home_team+".png":"","has-team":!r.isGenericLike,"component-width":n.elementSize.width,onAction:r.clickCard},null,8,["isPlayer","player-id","team-id","is-female","tournament-selected","is-public","season-selected","next-rival-id","team-img","player-img","rival-img","has-team","component-width","onAction"])):(a.openBlock(),a.createBlock(u,{key:1,isPlayer:!1,"player-id":t.user.player,"is-female":i.tournamentSelected.is_female==1,"team-id":t.user.team,"is-player-mobile1":t.isplayer&&!r.isGenericLike,"tournament-selected":i.tournamentSelected,"is-public":i.is_public,"season-selected":i.seasonSelected.id,"next-rival-id":Object.keys(i.fullTournamentSchedule).length>0?t.user.team==i.fullTournamentSchedule.data.prematch.home_team?i.fullTournamentSchedule.data.prematch.visiting_team:i.fullTournamentSchedule.data.prematch.home_team:0,"team-img":"https://golstatsimages.blob.core.windows.net/teams-150/"+t.user.team+".png","player-img":"https://golstatsimages.blob.core.windows.net/players-profile/"+t.user.player+".png","rival-img":Object.keys(i.fullTournamentSchedule).length>0?t.user.team==i.fullTournamentSchedule.data.prematch.home_team?"https://golstatsimages.blob.core.windows.net/teams-150/"+i.fullTournamentSchedule.data.prematch.visiting_team+".png":"https://golstatsimages.blob.core.windows.net/teams-150/"+i.fullTournamentSchedule.data.prematch.home_team+".png":"","has-team":!1,"component-width":n.elementSize.width,onAction:r.clickCard},null,8,["player-id","is-female","team-id","is-player-mobile1","tournament-selected","is-public","season-selected","next-rival-id","team-img","player-img","rival-img","component-width","onAction"]))],4),a.withDirectives(a.createElementVNode("div",{class:"container-calendar-table",style:a.normalizeStyle(n.elementSize.width<1e3?"width: 100%;":"")},[i.isPreviousDataLoaded?(a.openBlock(),a.createBlock(m,{season:i.seasonSelected,seasons:i.seasonsSelected,"tournament-type":i.tournamentType,tournament:i.tournamentSelected.id,privileges:t.privileges,"is-public":i.is_public,"is-player":t.isplayer,"is-player-tournament":t.user.tournament===i.tournamentSelected.id,"is-generic":r.isGenericLike,key:i.updateTableCalendar,"team-id":r.teamSelected,componentWidth:n.elementSize&&n.elementSize.width?n.elementSize.width:0,tournaments:i.currentTournaments,onAction:r.onAction,onOnOpenProfile:r.onOpenProfile,onOpenmedia:r.onOpenMedia},null,8,["season","seasons","tournament-type","tournament","privileges","is-public","is-player","is-player-tournament","is-generic","team-id","componentWidth","tournaments","onAction","onOnOpenProfile","onOpenmedia"])):a.createCommentVNode("",!0)],4),[[a.vShow,n.elementSize.width>1e3]])],2),Object.keys(i.tournamentSelected).length>0?(a.openBlock(),a.createElementBlock("div",v8,[a.createVNode(f,{"component-width":n.elementSize.width,isplayer:t.isplayer,"is-full":r.isGenericLike,data:r.games,"tournament-schedule-keys":i.tournamentScheduleKeys,"default-match-day-key":i.selectedRound,user:t.user,"current-tournament":i.tournamentSelected,"current-season":i.seasonSelected.id,"is-live-button-visible":!!i.allLiveGames.length,onClickCalendar:r.onClickCalendar,onClickMatch:r.onClickMatch,onChangeMatchDay:r.onChangeMatchDayGames,onChangeIsLeagueSelected:r.onChangeIsLeagueSelected,onClickLive:r.onClickLive},null,8,["component-width","isplayer","is-full","data","tournament-schedule-keys","default-match-day-key","user","current-tournament","current-season","is-live-button-visible","onClickCalendar","onClickMatch","onChangeMatchDay","onChangeIsLeagueSelected","onClickLive"])])):a.createCommentVNode("",!0)],64)):(a.openBlock(),a.createElementBlock(a.Fragment,{key:4},[Object.keys(i.tournamentSelected).length>0?(a.openBlock(),a.createElementBlock("div",N8,[a.createVNode(f,{"component-width":n.elementSize.width,isplayer:t.isplayer,"is-full":r.isGenericLike,data:r.games,"tournament-schedule-keys":i.tournamentScheduleKeys,"default-match-day-key":i.selectedRound,user:t.user,"current-tournament":i.tournamentSelected,"current-season":i.seasonSelected.id,"is-live-button-visible":!!i.allLiveGames.length,onClickCalendar:r.onClickCalendar,onClickMatch:r.onClickMatch,onChangeMatchDay:r.onChangeMatchDayGames,onChangeIsLeagueSelected:r.onChangeIsLeagueSelected,onClickLive:r.onClickLive},null,8,["component-width","isplayer","is-full","data","tournament-schedule-keys","default-match-day-key","user","current-tournament","current-season","is-live-button-visible","onClickCalendar","onClickMatch","onChangeMatchDay","onChangeIsLeagueSelected","onClickLive"])])):a.createCommentVNode("",!0),a.createElementVNode("div",{class:a.normalizeClass(r.containerGridCalendarTable)},[a.createElementVNode("div",{class:"container-grid",style:a.normalizeStyle([n.elementSize.width<=1e3?"width: 100%; ":"",!(t.isplayer&&!r.isGenericLike)&&r.isGenericLike?"max-height: 380px !important;":"max-height: 480px !important; margin-top: 15px !important;"])},[a.createVNode(u,{isPlayer:t.isplayer&&!r.isGenericLike,"player-id":t.user.player,"team-id":t.user.team,"tournament-selected":i.tournamentSelected,"is-public":i.is_public,"is-female":i.tournamentSelected.is_female==1,"season-selected":i.seasonSelected.id,"next-rival-id":Object.keys(i.fullTournamentSchedule).length>0?t.user.team==i.fullTournamentSchedule.data.prematch.home_team?i.fullTournamentSchedule.data.prematch.visiting_team:i.fullTournamentSchedule.data.prematch.home_team:0,"team-img":"https://golstatsimages.blob.core.windows.net/teams-150/"+t.user.team+".png","player-img":"https://golstatsimages.blob.core.windows.net/players-profile/"+t.user.player+".png","rival-img":Object.keys(i.fullTournamentSchedule).length>0?t.user.team==i.fullTournamentSchedule.data.prematch.home_team?"https://golstatsimages.blob.core.windows.net/teams-150/"+i.fullTournamentSchedule.data.prematch.visiting_team+".png":"https://golstatsimages.blob.core.windows.net/teams-150/"+i.fullTournamentSchedule.data.prematch.home_team+".png":"","has-team":!r.isGenericLike,"component-width":n.elementSize.width,onAction:r.clickCard},null,8,["isPlayer","player-id","team-id","tournament-selected","is-public","is-female","season-selected","next-rival-id","team-img","player-img","rival-img","has-team","component-width","onAction"])],4),a.withDirectives(a.createElementVNode("div",{class:"container-calendar-table",style:a.normalizeStyle(n.elementSize.width<=1e3?"width: 100%; margin-top: 30px;":"")},[i.isPreviousDataLoaded?(a.openBlock(),a.createBlock(m,{season:i.seasonSelected,seasons:i.seasonsSelected,"tournament-type":i.tournamentType,tournament:i.tournamentSelected.id,privileges:t.privileges,"is-public":i.is_public,"is-player":t.isplayer,"is-player-tournament":t.user.tournament===i.tournamentSelected.id,"is-generic":r.isGenericLike,key:i.updateTableCalendar,"team-id":r.teamSelected,componentWidth:n.elementSize&&n.elementSize.width?n.elementSize.width:0,tournaments:i.currentTournaments,onAction:r.onAction,onOnOpenProfile:r.onOpenProfile,onOpenmedia:r.onOpenMedia},null,8,["season","seasons","tournament-type","tournament","privileges","is-public","is-player","is-player-tournament","is-generic","team-id","componentWidth","tournaments","onAction","onOnOpenProfile","onOpenmedia"])):a.createCommentVNode("",!0)],4),[[a.vShow,n.elementSize.width>1e3]])],2)],64)),a.createCommentVNode("",!0),r.isGenericLike?a.createCommentVNode("",!0):a.withDirectives((a.openBlock(),a.createElementBlock("div",{key:r.teamRival,class:"container-players"},[i.isPreviousDataLoaded?(a.openBlock(),a.createBlock(p,{key:r.teamRival,"tournament-selected":i.tournamentSelected,onClickProfileBtn:r.clickProfileBtn,onViewAll:r.viewAllRival,"is-rival":!0,onTotalPlayers:r.getTotalPlayersRival,"team-id":r.teamRival,"season-id":i.seasonSelected.id,"is-player":!0},null,8,["tournament-selected","onClickProfileBtn","onViewAll","onTotalPlayers","team-id","season-id"])):a.createCommentVNode("",!0)])),[[a.vShow,i.playersLengthRival>0&&r.teamRival>0]]),r.isGenericLike?a.createCommentVNode("",!0):a.withDirectives((a.openBlock(),a.createElementBlock("div",D8,[i.isPreviousDataLoaded?(a.openBlock(),a.createBlock(p,{key:0,"tournament-selected":i.tournamentSelected,onClickProfileBtn:r.clickProfileBtn,onViewAll:r.viewAll,onTotalPlayers:r.getTotalPlayers,"team-id":t.user.team,"season-id":i.seasonSelected.id,"is-player":!!t.user.player},null,8,["tournament-selected","onClickProfileBtn","onViewAll","onTotalPlayers","team-id","season-id","is-player"])):a.createCommentVNode("",!0)],512)),[[a.vShow,i.playersLength>0]]),n.elementSize.width<1e3&&t.isplayer&&!r.isGenericLike?(a.openBlock(),a.createElementBlock("div",{key:8,class:a.normalizeClass(r.containerGridCalendarTable)},[a.createElementVNode("div",{class:"container-grid",style:a.normalizeStyle([n.elementSize.width<=1e3?"width: 100%; ":"",!(t.isplayer&&!r.isGenericLike)&&r.isGenericLike?"max-height: 380px !important;":"max-height: 480px !important; margin-top: 65px !important;"])},[n.elementSize.width<1e3?(a.openBlock(),a.createBlock(u,{key:0,isPlayer:!1,"player-id":t.user.player,"team-id":t.user.team,"is-player-mobile2":t.isplayer&&!r.isGenericLike,"tournament-selected":i.tournamentSelected,"is-public":i.is_public,"is-female":i.tournamentSelected.is_female==1,"season-selected":i.seasonSelected.id,"next-rival-id":Object.keys(i.fullTournamentSchedule).length>0?t.user.team==i.fullTournamentSchedule.data.prematch.home_team?i.fullTournamentSchedule.data.prematch.visiting_team:i.fullTournamentSchedule.data.prematch.home_team:0,"team-img":"https://golstatsimages.blob.core.windows.net/teams-150/"+t.user.team+".png","player-img":"https://golstatsimages.blob.core.windows.net/players-profile/"+t.user.player+".png","rival-img":Object.keys(i.fullTournamentSchedule).length>0?t.user.team==i.fullTournamentSchedule.data.prematch.home_team?"https://golstatsimages.blob.core.windows.net/teams-150/"+i.fullTournamentSchedule.data.prematch.visiting_team+".png":"https://golstatsimages.blob.core.windows.net/teams-150/"+i.fullTournamentSchedule.data.prematch.home_team+".png":"","has-team":!1,"component-width":n.elementSize.width,onAction:r.clickCard},null,8,["player-id","team-id","is-player-mobile2","tournament-selected","is-public","is-female","season-selected","next-rival-id","team-img","player-img","rival-img","component-width","onAction"])):a.createCommentVNode("",!0)],4)],2)):a.createCommentVNode("",!0),a.createElementVNode("div",{class:a.normalizeClass(["container-tops",t.user.tournament===i.tournamentSelected.id?"tops-player":""]),style:a.normalizeStyle(t.isplayer&&!r.isGenericLike&&n.elementSize.width<1e3?"margin-top: 35px !important;":i.playersLengthRival==0&&i.playersLength==0&&n.elementSize.width>1e3?"margin-top: 25px !important;":"")},[i.isPreviousDataLoaded?(a.openBlock(),a.createBlock(h,{key:0,"tournament-selected":i.tournamentSelected,onMore:r.moreTops,"show-switch":!r.isGenericLike,season:i.seasonSelected.id,"show-more":!i.is_public,"team-id":t.user.team,"active-videos":i.is_public?t.privileges.vr_privileges:!0,onOpenmedia:r.onOpenMedia},null,8,["tournament-selected","onMore","show-switch","season","show-more","team-id","active-videos","onOpenmedia"])):a.createCommentVNode("",!0)],6),a.createCommentVNode("",!0),a.withDirectives(a.createElementVNode("div",{class:"container-calendar-table",style:a.normalizeStyle(n.elementSize.width<1e3?"width: 100%; ":"")},[i.isPreviousDataLoaded?(a.openBlock(),a.createBlock(m,{season:i.seasonSelected,seasons:i.seasonsSelected,"tournament-type":i.tournamentType,tournament:i.tournamentSelected.id,privileges:t.privileges,"is-public":i.is_public,"is-player":t.isplayer,"is-player-tournament":t.user.tournament===i.tournamentSelected.id,"is-generic":r.isGenericLike,key:i.updateTableCalendar,"team-id":r.teamSelected,componentWidth:n.elementSize&&n.elementSize.width?n.elementSize.width:0,tournaments:i.currentTournaments,onAction:r.onAction,onOnOpenProfile:r.onOpenProfile,onOpenmedia:r.onOpenMedia},null,8,["season","seasons","tournament-type","tournament","privileges","is-public","is-player","is-player-tournament","is-generic","team-id","componentWidth","tournaments","onAction","onOnOpenProfile","onOpenmedia"])):a.createCommentVNode("",!0)],4),[[a.vShow,n.elementSize.width<1e3]]),i.is_public?(a.openBlock(),a.createElementBlock("div",{key:10,class:"b2c-image",onClick:e[1]||(e[1]=(...g)=>r.abrirNuevaVentana&&r.abrirNuevaVentana(...g))})):a.createCommentVNode("",!0)],2)],2)],64)):(a.openBlock(),a.createElementBlock(a.Fragment,{key:1},[i.isStoriesVisible&&t.showStories?(a.openBlock(),a.createBlock(o,{key:0,stories:i.currentStories,"start-story-index":i.currentStoriesLastIndex,"is-first-game-stories":i.currentStoryIndex===0,"is-last-game-stories":i.currentStoryIndex===i.storiesItems.length-1,onLastStoryIndex:r.changeIndexStory,onClose:r.onCloseStories,onSwipe:r.onSwipeStories,onVideoNextBack:r.onClickNextBackVideo,onVideoPlay:r.onVideoPlay},null,8,["stories","start-story-index","is-first-game-stories","is-last-game-stories","onLastStoryIndex","onClose","onSwipe","onVideoNextBack","onVideoPlay"])):a.createCommentVNode("",!0),i.isCarouselFullScreenVisible?(a.openBlock(),a.createBlock(l,{key:1,"player-queue":i.carouselPlayerQueue,"is-play-seeker":i.isPlaySeeker,"playlist-index":0,onClose:r.onClickCloseCarousel},null,8,["player-queue","is-play-seeker","onClose"])):a.createCommentVNode("",!0),r.isPlaySeekerAvailable?(a.openBlock(),a.createElementBlock("div",P8,[a.createElementVNode("div",O8,[F8,a.createElementVNode("div",M8,[V8,a.createElementVNode("div",{role:"button",class:"play-seeker-image__info__legends-and-button__button",onClick:e[2]||(e[2]=(...g)=>r.onClickPlaySeeker&&r.onClickPlaySeeker(...g))},[a.createElementVNode("div",$8,[a.createElementVNode("img",{src:`${i.imagesUrl}icn-play.svg`,alt:""},null,8,U8)]),z8])])]),a.createElementVNode("div",G8,[a.createElementVNode("img",{src:`${i.imagesUrl}players@2x.png`,alt:""},null,8,j8)])])):a.createCommentVNode("",!0),n.elementSize.width<=680&&n.elementSize.width>0?(a.openBlock(),a.createElementBlock("div",H8,[a.createElementVNode("div",W8,[a.createVNode(d,{"current-season-id":t.currentSeasonId,width:"100%","api-url":t.tournamentsApiUrl,onInput:r.onInputTournament,onChangeTournaments:r.onChangeTournaments},null,8,["current-season-id","api-url","onInput","onChangeTournaments"])]),a.createElementVNode("div",K8,[a.createVNode(c,{"current-season-id":t.currentSeasonId,width:"100%",seasons:i.tournamentSelectedDropDowns.seasons,onInput:r.onInputSeason},null,8,["current-season-id","seasons","onInput"])])])):a.createCommentVNode("",!0),a.createElementVNode("div",{class:a.normalizeClass(r.containerbackground)},[a.createElementVNode("div",{class:a.normalizeClass(r.containerdata)},[n.elementSize.width<=680?(a.openBlock(),a.createElementBlock("div",q8,[Y8,a.createElementVNode("div",J8,[t.isFemale?(a.openBlock(),a.createElementBlock(a.Fragment,{key:0},[a.createTextVNode("Bienvenida ")],64)):(a.openBlock(),a.createElementBlock(a.Fragment,{key:1},[a.createTextVNode("Bienvenido ")],64)),i.is_public?(a.openBlock(),a.createElementBlock(a.Fragment,{key:2},[a.createTextVNode("a GolStats ")],64)):(a.openBlock(),a.createElementBlock(a.Fragment,{key:3},[a.createTextVNode(a.toDisplayString(r.formatUsername(t.user.name)),1)],64))])])):a.createCommentVNode("",!0),n.elementSize.width>680?(a.openBlock(),a.createElementBlock("div",X8,"Inicio")):a.createCommentVNode("",!0),n.elementSize.width>680?(a.openBlock(),a.createElementBlock("div",Z8,[a.createElementVNode("div",Q8,[t.isFemale?(a.openBlock(),a.createElementBlock(a.Fragment,{key:0},[a.createTextVNode("Bienvenida ")],64)):(a.openBlock(),a.createElementBlock(a.Fragment,{key:1},[a.createTextVNode("Bienvenido ")],64)),i.is_public?(a.openBlock(),a.createElementBlock(a.Fragment,{key:2},[a.createTextVNode("a GolStats ")],64)):(a.openBlock(),a.createElementBlock(a.Fragment,{key:3},[a.createTextVNode(a.toDisplayString(r.formatUsername(t.user.name)),1)],64))]),a.createElementVNode("div",eF,[a.createElementVNode("div",tF,[a.createVNode(d,{"current-season-id":t.currentSeasonId,"api-url":t.tournamentsApiUrl,onInput:r.onInputTournament,onChangeTournaments:r.onChangeTournaments},null,8,["current-season-id","api-url","onInput","onChangeTournaments"])]),a.createElementVNode("div",sF,[a.createVNode(c,{"current-season-id":t.currentSeasonId,seasons:i.tournamentSelectedDropDowns.seasons,onInput:r.onInputSeason},null,8,["current-season-id","seasons","onInput"])])])])):a.createCommentVNode("",!0),Object.keys(i.tournamentSelected).length>0?(a.openBlock(),a.createElementBlock("div",nF,[a.createVNode(f,{"component-width":n.elementSize.width,isplayer:t.isplayer,"is-full":r.isGenericLike,data:r.games,"tournament-schedule-keys":i.tournamentScheduleKeys,"default-match-day-key":i.selectedRound,user:t.user,"current-tournament":i.tournamentSelected,"current-season":i.seasonSelected.id,"is-live-button-visible":!!i.allLiveGames.length,onClickCalendar:r.onClickCalendar,onClickMatch:r.onClickMatch,onChangeMatchDay:r.onChangeMatchDayGames,onChangeIsLeagueSelected:r.onChangeIsLeagueSelected,onClickLive:r.onClickLive},null,8,["component-width","isplayer","is-full","data","tournament-schedule-keys","default-match-day-key","user","current-tournament","current-season","is-live-button-visible","onClickCalendar","onClickMatch","onChangeMatchDay","onChangeIsLeagueSelected","onClickLive"])])):a.createCommentVNode("",!0),a.createCommentVNode("",!0),a.createElementVNode("div",{class:a.normalizeClass(r.containerGridCalendarTable)},[a.createElementVNode("div",{class:"container-grid",style:a.normalizeStyle([n.elementSize.width<=1e3?"width: 100%; ":"",!(t.isplayer&&!r.isGenericLike)&&r.isGenericLike?"max-height: 380px !important;":"max-height: 480px !important; margin-top: 15px !important;"])},[a.createVNode(u,{isPlayer:t.isplayer&&!r.isGenericLike,"player-id":t.user.player,"team-id":t.user.team,"is-female":i.tournamentSelected.is_female==1,"tournament-selected":i.tournamentSelected,"is-public":i.is_public,"season-selected":i.seasonSelected.id,"next-rival-id":Object.keys(i.fullTournamentSchedule).length>0?t.user.team==i.fullTournamentSchedule.data.prematch.home_team?i.fullTournamentSchedule.data.prematch.visiting_team:i.fullTournamentSchedule.data.prematch.home_team:0,"team-img":"https://golstatsimages.blob.core.windows.net/teams-150/"+t.user.team+".png","player-img":"https://golstatsimages.blob.core.windows.net/players-profile/"+t.user.player+".png","rival-img":Object.keys(i.fullTournamentSchedule).length>0?t.user.team==i.fullTournamentSchedule.data.prematch.home_team?"https://golstatsimages.blob.core.windows.net/teams-150/"+i.fullTournamentSchedule.data.prematch.visiting_team+".png":"https://golstatsimages.blob.core.windows.net/teams-150/"+i.fullTournamentSchedule.data.prematch.home_team+".png":"","has-team":!r.isGenericLike,"component-width":n.elementSize.width,onAction:r.clickCard},null,8,["isPlayer","player-id","team-id","is-female","tournament-selected","is-public","season-selected","next-rival-id","team-img","player-img","rival-img","has-team","component-width","onAction"])],4),a.withDirectives(a.createElementVNode("div",{class:"container-calendar-table",style:a.normalizeStyle(n.elementSize.width<=1e3?"width: 100%; margin-top: 30px;":"")},[i.isPreviousDataLoaded?(a.openBlock(),a.createBlock(m,{season:i.seasonSelected,seasons:i.seasonsSelected,"tournament-type":i.tournamentType,tournament:i.tournamentSelected.id,privileges:t.privileges,"is-public":i.is_public,"is-player":t.isplayer,"is-player-tournament":t.user.tournament===i.tournamentSelected.id,"is-generic":r.isGenericLike,key:i.updateTableCalendar,"team-id":r.teamSelected,componentWidth:n.elementSize&&n.elementSize.width?n.elementSize.width:0,tournaments:i.currentTournaments,onAction:r.onAction,onOnOpenProfile:r.onOpenProfile,onOpenmedia:r.onOpenMedia},null,8,["season","seasons","tournament-type","tournament","privileges","is-public","is-player","is-player-tournament","is-generic","team-id","componentWidth","tournaments","onAction","onOnOpenProfile","onOpenmedia"])):a.createCommentVNode("",!0)],4),[[a.vShow,n.elementSize.width>1e3]])],2),r.isGenericLike?a.createCommentVNode("",!0):a.withDirectives((a.openBlock(),a.createElementBlock("div",aF,[i.isPreviousDataLoaded?(a.openBlock(),a.createBlock(p,{key:0,"tournament-selected":i.tournamentSelected,onClickProfileBtn:r.clickProfileBtn,onViewAll:r.viewAll,onTotalPlayers:r.getTotalPlayers,"team-id":t.user.team,"season-id":i.seasonSelected.id,"is-player":!!t.user.player},null,8,["tournament-selected","onClickProfileBtn","onViewAll","onTotalPlayers","team-id","season-id","is-player"])):a.createCommentVNode("",!0)],512)),[[a.vShow,i.playersLength>0]]),a.createElementVNode("div",{class:a.normalizeClass(["container-tops",t.user.tournament===i.tournamentSelected.id&&!i.is_public&&!r.isGenericLike?"tops-team":""]),style:a.normalizeStyle(!(t.isplayer&&!r.isGenericLike)&&r.isGenericLike&&n.elementSize.width<=1e3||i.playersLengthRival==0&&i.playersLength==0&&n.elementSize.width>1e3?"margin-top: 25px !important;":"")},[i.isPreviousDataLoaded?(a.openBlock(),a.createBlock(h,{key:0,"tournament-selected":i.tournamentSelected,onMore:r.moreTops,"show-switch":!r.isGenericLike,season:i.seasonSelected.id,"show-more":!i.is_public,"team-id":t.user.team,"active-videos":i.is_public?t.privileges.vr_privileges:!0,onOpenmedia:r.onOpenMedia},null,8,["tournament-selected","onMore","show-switch","season","show-more","team-id","active-videos","onOpenmedia"])):a.createCommentVNode("",!0)],6),a.createCommentVNode("",!0),a.withDirectives(a.createElementVNode("div",{class:"container-calendar-table",style:a.normalizeStyle(n.elementSize.width<=1e3?"width: 100%; ":"")},[i.isPreviousDataLoaded?(a.openBlock(),a.createBlock(m,{season:i.seasonSelected,seasons:i.seasonsSelected,"tournament-type":i.tournamentType,tournament:i.tournamentSelected.id,privileges:t.privileges,"is-public":i.is_public,"is-player":t.isplayer,"is-player-tournament":t.user.tournament===i.tournamentSelected.id,"is-generic":r.isGenericLike,key:i.updateTableCalendar,"team-id":r.teamSelected,componentWidth:n.elementSize&&n.elementSize.width?n.elementSize.width:0,tournaments:i.currentTournaments,onAction:r.onAction,onOnOpenProfile:r.onOpenProfile,onOpenmedia:r.onOpenMedia},null,8,["season","seasons","tournament-type","tournament","privileges","is-public","is-player","is-player-tournament","is-generic","team-id","componentWidth","tournaments","onAction","onOnOpenProfile","onOpenmedia"])):a.createCommentVNode("",!0)],4),[[a.vShow,n.elementSize.width<1e3]]),i.is_public?(a.openBlock(),a.createElementBlock("div",{key:7,class:"b2c-image",onClick:e[3]||(e[3]=(...g)=>r.abrirNuevaVentana&&r.abrirNuevaVentana(...g))})):a.createCommentVNode("",!0)],2)],2)],64))],512)}const rF=et(l8,[["render",iF],["__scopeId","data-v-56204eeb"]]);bs.GSCLanding=rF,Object.defineProperty(bs,Symbol.toStringTag,{value:"Module"})});