@golstats/gsc-game-data 1.0.208 → 1.0.209
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.
- package/dist/{FilterConditions-3aab28df-a842ed38.js → FilterConditions-3aab28df-aadfa5cb.js} +1 -1
- package/dist/{FilterConditions-dc6b25de-DOW3ApFh-536663e0.js → FilterConditions-dc6b25de-DOW3ApFh-7bacec34.js} +1 -1
- package/dist/{FilterField-37ad154d-CGBI29FT-73129596.js → FilterField-37ad154d-CGBI29FT-664c36a0.js} +1 -1
- package/dist/{FilterField-c27c9666-634f6f4d.js → FilterField-c27c9666-3f1b9aa5.js} +1 -1
- package/dist/{FilterSubcategories-5a4d9250-e2bbe921.js → FilterSubcategories-5a4d9250-ee3e1359.js} +1 -1
- package/dist/{FilterSubcategories-a7b96423-Dq4ouXsj-536e6475.js → FilterSubcategories-a7b96423-Dq4ouXsj-ab88d248.js} +1 -1
- package/dist/gsc-game-data.js +1 -1
- package/dist/gsc-game-data.umd.cjs +1 -1
- package/dist/{index-98b24835.js → index-ad983495.js} +8 -8
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -7041,4 +7041,4 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
7041
7041
|
* vuex v4.0.2
|
|
7042
7042
|
* (c) 2021 Evan You
|
|
7043
7043
|
* @license MIT
|
|
7044
|
-
*/var Fla="store";function Pm(e,n){Object.keys(e).forEach(function(r){return n(e[r],r)})}function sJ(e){return e!==null&&typeof e=="object"}function Dla(e){return e&&typeof e.then=="function"}function xh(e,n){if(!e)throw new Error("[vuex] "+n)}function Vla(e,n){return function(){return e(n)}}function lJ(e,n,r){return n.indexOf(e)<0&&(r&&r.prepend?n.unshift(e):n.push(e)),function(){var I=n.indexOf(e);I>-1&&n.splice(I,1)}}function cJ(e,n){e._actions=Object.create(null),e._mutations=Object.create(null),e._wrappedGetters=Object.create(null),e._modulesNamespaceMap=Object.create(null);var r=e.state;N5(e,r,[],e._modules.root,!0),CE(e,r,n)}function CE(e,n,r){var I=e._state;e.getters={},e._makeLocalGettersCache=Object.create(null);var L=e._wrappedGetters,d={};Pm(L,function(g,a){d[a]=Vla(g,e),Object.defineProperty(e.getters,a,{get:function(){return d[a]()},enumerable:!0})}),e._state=t.reactive({data:n}),e.strict&&Hla(e),I&&r&&e._withCommit(function(){I.data=null})}function N5(e,n,r,I,L){var d=!r.length,g=e._modules.getNamespace(r);if(I.namespaced&&(e._modulesNamespaceMap[g]&&process.env.NODE_ENV!=="production"&&console.error("[vuex] duplicate namespace "+g+" for the namespaced module "+r.join("/")),e._modulesNamespaceMap[g]=I),!d&&!L){var a=TE(n,r.slice(0,-1)),b=r[r.length-1];e._withCommit(function(){process.env.NODE_ENV!=="production"&&b in a&&console.warn('[vuex] state field "'+b+'" was overridden by a module with the same name at "'+r.join(".")+'"'),a[b]=I.state})}var m=I.context=Rla(e,g,r);I.forEachMutation(function(i,v){var _=g+v;$la(e,_,i,m)}),I.forEachAction(function(i,v){var _=i.root?v:g+v,c=i.handler||i;jla(e,_,c,m)}),I.forEachGetter(function(i,v){var _=g+v;Ula(e,_,i,m)}),I.forEachChild(function(i,v){N5(e,n,r.concat(v),i,L)})}function Rla(e,n,r){var I=n==="",L={dispatch:I?e.dispatch:function(d,g,a){var b=B5(d,g,a),m=b.payload,i=b.options,v=b.type;if((!i||!i.root)&&(v=n+v,process.env.NODE_ENV!=="production"&&!e._actions[v])){console.error("[vuex] unknown local action type: "+b.type+", global type: "+v);return}return e.dispatch(v,m)},commit:I?e.commit:function(d,g,a){var b=B5(d,g,a),m=b.payload,i=b.options,v=b.type;if((!i||!i.root)&&(v=n+v,process.env.NODE_ENV!=="production"&&!e._mutations[v])){console.error("[vuex] unknown local mutation type: "+b.type+", global type: "+v);return}e.commit(v,m,i)}};return Object.defineProperties(L,{getters:{get:I?function(){return e.getters}:function(){return dJ(e,n)}},state:{get:function(){return TE(e.state,r)}}}),L}function dJ(e,n){if(!e._makeLocalGettersCache[n]){var r={},I=n.length;Object.keys(e.getters).forEach(function(L){if(L.slice(0,I)===n){var d=L.slice(I);Object.defineProperty(r,d,{get:function(){return e.getters[L]},enumerable:!0})}}),e._makeLocalGettersCache[n]=r}return e._makeLocalGettersCache[n]}function $la(e,n,r,I){var L=e._mutations[n]||(e._mutations[n]=[]);L.push(function(d){r.call(e,I.state,d)})}function jla(e,n,r,I){var L=e._actions[n]||(e._actions[n]=[]);L.push(function(d){var g=r.call(e,{dispatch:I.dispatch,commit:I.commit,getters:I.getters,state:I.state,rootGetters:e.getters,rootState:e.state},d);return Dla(g)||(g=Promise.resolve(g)),e._devtoolHook?g.catch(function(a){throw e._devtoolHook.emit("vuex:error",a),a}):g})}function Ula(e,n,r,I){if(e._wrappedGetters[n]){process.env.NODE_ENV!=="production"&&console.error("[vuex] duplicate getter key: "+n);return}e._wrappedGetters[n]=function(L){return r(I.state,I.getters,L.state,L.getters)}}function Hla(e){t.watch(function(){return e._state.data},function(){process.env.NODE_ENV!=="production"&&xh(e._committing,"do not mutate vuex store state outside mutation handlers.")},{deep:!0,flush:"sync"})}function TE(e,n){return n.reduce(function(r,I){return r[I]},e)}function B5(e,n,r){return sJ(e)&&e.type&&(r=n,n=e,e=e.type),process.env.NODE_ENV!=="production"&&xh(typeof e=="string","expects string as the type, but found "+typeof e+"."),{type:e,payload:n,options:r}}var Gla="vuex bindings",uJ="vuex:mutations",SE="vuex:actions",K1="vuex",Wla=0;function qla(e,n){Lla({id:"org.vuejs.vuex",app:e,label:"Vuex",homepage:"https://next.vuex.vuejs.org/",logo:"https://vuejs.org/images/icons/favicon-96x96.png",packageName:"vuex",componentStateTypes:[Gla]},function(r){r.addTimelineLayer({id:uJ,label:"Vuex Mutations",color:hJ}),r.addTimelineLayer({id:SE,label:"Vuex Actions",color:hJ}),r.addInspector({id:K1,label:"Vuex",icon:"storage",treeFilterPlaceholder:"Filter stores..."}),r.on.getInspectorTree(function(I){if(I.app===e&&I.inspectorId===K1)if(I.filter){var L=[];gJ(L,n._modules.root,I.filter,""),I.rootNodes=L}else I.rootNodes=[mJ(n._modules.root,"")]}),r.on.getInspectorState(function(I){if(I.app===e&&I.inspectorId===K1){var L=I.nodeId;dJ(n,L),I.state=Jla(Kla(n._modules,L),L==="root"?n.getters:n._makeLocalGettersCache,L)}}),r.on.editInspectorState(function(I){if(I.app===e&&I.inspectorId===K1){var L=I.nodeId,d=I.path;L!=="root"&&(d=L.split("/").filter(Boolean).concat(d)),n._withCommit(function(){I.set(n._state.data,d,I.state.value)})}}),n.subscribe(function(I,L){var d={};I.payload&&(d.payload=I.payload),d.state=L,r.notifyComponentUpdate(),r.sendInspectorTree(K1),r.sendInspectorState(K1),r.addTimelineEvent({layerId:uJ,event:{time:Date.now(),title:I.type,data:d}})}),n.subscribeAction({before:function(I,L){var d={};I.payload&&(d.payload=I.payload),I._id=Wla++,I._time=Date.now(),d.state=L,r.addTimelineEvent({layerId:SE,event:{time:I._time,title:I.type,groupId:I._id,subtitle:"start",data:d}})},after:function(I,L){var d={},g=Date.now()-I._time;d.duration={_custom:{type:"duration",display:g+"ms",tooltip:"Action duration",value:g}},I.payload&&(d.payload=I.payload),d.state=L,r.addTimelineEvent({layerId:SE,event:{time:Date.now(),title:I.type,groupId:I._id,subtitle:"end",data:d}})}})})}var hJ=8702998,Yla=6710886,Zla=16777215,pJ={label:"namespaced",textColor:Zla,backgroundColor:Yla};function fJ(e){return e&&e!=="root"?e.split("/").slice(-2,-1)[0]:"Root"}function mJ(e,n){return{id:n||"root",label:fJ(n),tags:e.namespaced?[pJ]:[],children:Object.keys(e._children).map(function(r){return mJ(e._children[r],n+r+"/")})}}function gJ(e,n,r,I){I.includes(r)&&e.push({id:I||"root",label:I.endsWith("/")?I.slice(0,I.length-1):I||"Root",tags:n.namespaced?[pJ]:[]}),Object.keys(n._children).forEach(function(L){gJ(e,n._children[L],r,I+L+"/")})}function Jla(e,n,r){n=r==="root"?n:n[r];var I=Object.keys(n),L={state:Object.keys(e.state).map(function(g){return{key:g,editable:!0,value:e.state[g]}})};if(I.length){var d=Xla(n);L.getters=Object.keys(d).map(function(g){return{key:g.endsWith("/")?fJ(g):g,editable:!1,value:EE(function(){return d[g]})}})}return L}function Xla(e){var n={};return Object.keys(e).forEach(function(r){var I=r.split("/");if(I.length>1){var L=n,d=I.pop();I.forEach(function(g){L[g]||(L[g]={_custom:{value:{},display:g,tooltip:"Module",abstract:!0}}),L=L[g]._custom.value}),L[d]=EE(function(){return e[r]})}else n[r]=EE(function(){return e[r]})}),n}function Kla(e,n){var r=n.split("/").filter(function(I){return I});return r.reduce(function(I,L,d){var g=I[L];if(!g)throw new Error('Missing module "'+L+'" for path "'+n+'".');return d===r.length-1?g:g._children},n==="root"?e:e.root._children)}function EE(e){try{return e()}catch(n){return n}}var wh=function(e,n){this.runtime=n,this._children=Object.create(null),this._rawModule=e;var r=e.state;this.state=(typeof r=="function"?r():r)||{}},yJ={namespaced:{configurable:!0}};yJ.namespaced.get=function(){return!!this._rawModule.namespaced},wh.prototype.addChild=function(e,n){this._children[e]=n},wh.prototype.removeChild=function(e){delete this._children[e]},wh.prototype.getChild=function(e){return this._children[e]},wh.prototype.hasChild=function(e){return e in this._children},wh.prototype.update=function(e){this._rawModule.namespaced=e.namespaced,e.actions&&(this._rawModule.actions=e.actions),e.mutations&&(this._rawModule.mutations=e.mutations),e.getters&&(this._rawModule.getters=e.getters)},wh.prototype.forEachChild=function(e){Pm(this._children,e)},wh.prototype.forEachGetter=function(e){this._rawModule.getters&&Pm(this._rawModule.getters,e)},wh.prototype.forEachAction=function(e){this._rawModule.actions&&Pm(this._rawModule.actions,e)},wh.prototype.forEachMutation=function(e){this._rawModule.mutations&&Pm(this._rawModule.mutations,e)},Object.defineProperties(wh.prototype,yJ);var Nm=function(e){this.register([],e,!1)};Nm.prototype.get=function(e){return e.reduce(function(n,r){return n.getChild(r)},this.root)},Nm.prototype.getNamespace=function(e){var n=this.root;return e.reduce(function(r,I){return n=n.getChild(I),r+(n.namespaced?I+"/":"")},"")},Nm.prototype.update=function(e){vJ([],this.root,e)},Nm.prototype.register=function(e,n,r){var I=this;r===void 0&&(r=!0),process.env.NODE_ENV!=="production"&&xJ(e,n);var L=new wh(n,r);if(e.length===0)this.root=L;else{var d=this.get(e.slice(0,-1));d.addChild(e[e.length-1],L)}n.modules&&Pm(n.modules,function(g,a){I.register(e.concat(a),g,r)})},Nm.prototype.unregister=function(e){var n=this.get(e.slice(0,-1)),r=e[e.length-1],I=n.getChild(r);if(!I){process.env.NODE_ENV!=="production"&&console.warn("[vuex] trying to unregister module '"+r+"', which is not registered");return}I.runtime&&n.removeChild(r)},Nm.prototype.isRegistered=function(e){var n=this.get(e.slice(0,-1)),r=e[e.length-1];return n?n.hasChild(r):!1};function vJ(e,n,r){if(process.env.NODE_ENV!=="production"&&xJ(e,r),n.update(r),r.modules)for(var I in r.modules){if(!n.getChild(I)){process.env.NODE_ENV!=="production"&&console.warn("[vuex] trying to add a new module '"+I+"' on hot reloading, manual reload is needed");return}vJ(e.concat(I),n.getChild(I),r.modules[I])}}var _J={assert:function(e){return typeof e=="function"},expected:"function"},Qla={assert:function(e){return typeof e=="function"||typeof e=="object"&&typeof e.handler=="function"},expected:'function or object with "handler" function'},bJ={getters:_J,mutations:_J,actions:Qla};function xJ(e,n){Object.keys(bJ).forEach(function(r){if(n[r]){var I=bJ[r];Pm(n[r],function(L,d){xh(I.assert(L),eca(e,r,d,L,I.expected))})}})}function eca(e,n,r,I,L){var d=n+" should be "+L+' but "'+n+"."+r+'"';return e.length>0&&(d+=' in module "'+e.join(".")+'"'),d+=" is "+JSON.stringify(I)+".",d}var Ud=function e(n){var r=this;n===void 0&&(n={}),process.env.NODE_ENV!=="production"&&(xh(typeof Promise<"u","vuex requires a Promise polyfill in this browser."),xh(this instanceof e,"store must be called with the new operator."));var I=n.plugins;I===void 0&&(I=[]);var L=n.strict;L===void 0&&(L=!1);var d=n.devtools;this._committing=!1,this._actions=Object.create(null),this._actionSubscribers=[],this._mutations=Object.create(null),this._wrappedGetters=Object.create(null),this._modules=new Nm(n),this._modulesNamespaceMap=Object.create(null),this._subscribers=[],this._makeLocalGettersCache=Object.create(null),this._devtools=d;var g=this,a=this,b=a.dispatch,m=a.commit;this.dispatch=function(v,_){return b.call(g,v,_)},this.commit=function(v,_,c){return m.call(g,v,_,c)},this.strict=L;var i=this._modules.root.state;N5(this,i,[],this._modules.root),CE(this,i),I.forEach(function(v){return v(r)})},AE={state:{configurable:!0}};Ud.prototype.install=function(e,n){e.provide(n||Fla,this),e.config.globalProperties.$store=this;var r=this._devtools!==void 0?this._devtools:process.env.NODE_ENV!=="production"||!1;r&&qla(e,this)},AE.state.get=function(){return this._state.data},AE.state.set=function(e){process.env.NODE_ENV!=="production"&&xh(!1,"use store.replaceState() to explicit replace store state.")},Ud.prototype.commit=function(e,n,r){var I=this,L=B5(e,n,r),d=L.type,g=L.payload,a=L.options,b={type:d,payload:g},m=this._mutations[d];if(!m){process.env.NODE_ENV!=="production"&&console.error("[vuex] unknown mutation type: "+d);return}this._withCommit(function(){m.forEach(function(i){i(g)})}),this._subscribers.slice().forEach(function(i){return i(b,I.state)}),process.env.NODE_ENV!=="production"&&a&&a.silent&&console.warn("[vuex] mutation type: "+d+". Silent option has been removed. Use the filter functionality in the vue-devtools")},Ud.prototype.dispatch=function(e,n){var r=this,I=B5(e,n),L=I.type,d=I.payload,g={type:L,payload:d},a=this._actions[L];if(!a){process.env.NODE_ENV!=="production"&&console.error("[vuex] unknown action type: "+L);return}try{this._actionSubscribers.slice().filter(function(m){return m.before}).forEach(function(m){return m.before(g,r.state)})}catch(m){process.env.NODE_ENV!=="production"&&(console.warn("[vuex] error in before action subscribers: "),console.error(m))}var b=a.length>1?Promise.all(a.map(function(m){return m(d)})):a[0](d);return new Promise(function(m,i){b.then(function(v){try{r._actionSubscribers.filter(function(_){return _.after}).forEach(function(_){return _.after(g,r.state)})}catch(_){process.env.NODE_ENV!=="production"&&(console.warn("[vuex] error in after action subscribers: "),console.error(_))}m(v)},function(v){try{r._actionSubscribers.filter(function(_){return _.error}).forEach(function(_){return _.error(g,r.state,v)})}catch(_){process.env.NODE_ENV!=="production"&&(console.warn("[vuex] error in error action subscribers: "),console.error(_))}i(v)})})},Ud.prototype.subscribe=function(e,n){return lJ(e,this._subscribers,n)},Ud.prototype.subscribeAction=function(e,n){var r=typeof e=="function"?{before:e}:e;return lJ(r,this._actionSubscribers,n)},Ud.prototype.watch=function(e,n,r){var I=this;return process.env.NODE_ENV!=="production"&&xh(typeof e=="function","store.watch only accepts a function."),t.watch(function(){return e(I.state,I.getters)},n,Object.assign({},r))},Ud.prototype.replaceState=function(e){var n=this;this._withCommit(function(){n._state.data=e})},Ud.prototype.registerModule=function(e,n,r){r===void 0&&(r={}),typeof e=="string"&&(e=[e]),process.env.NODE_ENV!=="production"&&(xh(Array.isArray(e),"module path must be a string or an Array."),xh(e.length>0,"cannot register the root module by using registerModule.")),this._modules.register(e,n),N5(this,this.state,e,this._modules.get(e),r.preserveState),CE(this,this.state)},Ud.prototype.unregisterModule=function(e){var n=this;typeof e=="string"&&(e=[e]),process.env.NODE_ENV!=="production"&&xh(Array.isArray(e),"module path must be a string or an Array."),this._modules.unregister(e),this._withCommit(function(){var r=TE(n.state,e.slice(0,-1));delete r[e[e.length-1]]}),cJ(this)},Ud.prototype.hasModule=function(e){return typeof e=="string"&&(e=[e]),process.env.NODE_ENV!=="production"&&xh(Array.isArray(e),"module path must be a string or an Array."),this._modules.isRegistered(e)},Ud.prototype.hotUpdate=function(e){this._modules.update(e),cJ(this,!0)},Ud.prototype._withCommit=function(e){var n=this._committing;this._committing=!0,e(),this._committing=n},Object.defineProperties(Ud.prototype,AE);var tca=nca(function(e,n){var r={};return process.env.NODE_ENV!=="production"&&!wJ(n)&&console.error("[vuex] mapMutations: mapper parameter must be either an Array or an Object"),aca(n).forEach(function(I){var L=I.key,d=I.val;r[L]=function(){for(var g=[],a=arguments.length;a--;)g[a]=arguments[a];var b=this.$store.commit;if(e){var m=rca(this.$store,"mapMutations",e);if(!m)return;b=m.context.commit}return typeof d=="function"?d.apply(this,[b].concat(g)):b.apply(this.$store,[d].concat(g))}}),r});function aca(e){return wJ(e)?Array.isArray(e)?e.map(function(n){return{key:n,val:n}}):Object.keys(e).map(function(n){return{key:n,val:e[n]}}):[]}function wJ(e){return Array.isArray(e)||sJ(e)}function nca(e){return function(n,r){return typeof n!="string"?(r=n,n=""):n.charAt(n.length-1)!=="/"&&(n+="/"),e(n,r)}}function rca(e,n,r){var I=e._modulesNamespaceMap[r];return process.env.NODE_ENV!=="production"&&!I&&console.error("[vuex] module namespace not found in "+n+"(): "+r),I}const ica="/icn-play.svg",oca="/icn-tiros-de-esquina.svg",sca="/icn-tiro-a-porteria.svg",lca="/icn-cambio.svg",cca="/icn-falta.svg",dca="/atajada.svg",uca="/fuera-de-lugar.svg",ME="/gol.svg",hca="/var.png",pca="/tiempo-agregado.svg",fca="/jugada-peligrosa.svg",mca="/penal-marcado.svg",gca="/penal-fallado.svg",yca="/inicia-el-partido.svg",vca="/fin-del-partido.svg",_ca="/icn-tarjeta-amarilla.svg",bca="/icn-tarjeta-roja.svg",xca=[1,2,3,4,6],wca={name:"TimeLineEvent",props:{gameEvent:{type:Object,required:!0},isMobile:{type:Boolean,default:!1},width:{type:Number,default:352},timeLineWidth:{type:Number,default:0},canPlayVideos:{type:Boolean,default:!0}},data(){return{lastHeight:0,gameEventKey:0}},computed:{nameClasses(){const e=[],n=`${this.gameEvent.event_type_id}-${this.gameEvent.category_id}`;return wE.GOAL_IDS.includes(n)?(e.push("is-main-event"),e.push("goal")):wE.YELLOW_CARD_IDS.includes(n)?(e.push("is-main-event"),e.push("yellow-card")):wE.RED_CARD_IDS.includes(n)?(e.push("is-main-event"),e.push("red-card")):this.gameEvent.video_link!=="-"&&(e.push("is-main-event"),e.push("normal-video")),this.gameEvent.teamType===1?e.push("time-line-event--home-team"):e.push("time-line-event--away-team"),e},srcImgPlayers(){let e=null;return this.gameEvent.player_id&&this.gameEvent.player_id!=="-"&&(e=this.gameEvent.player_id.split("@"),e=e.map(n=>Ala(n))),e},teamTypeClasses(){const e=`time-line-event--${this.gameEvent.teamType===1?"home":"away"}-team`;return[e,`${e}-desktop`]},teamTypeClasses2(){return[`time-line-event--info--${this.gameEvent.teamType===1?"home":"away"}-team`]},minuteClasses(){const e=[`time-line-event__minute--desktop-${this.gameEvent.teamType===1?"home":"away"}-team`];return e.push("time-line-event__minute--desktop"),e},playerName(){return this.gameEvent.category_id===28||xca.includes(this.gameEvent.event_type_id)?"":this.gameEvent.player_name}},watch:{width(){this.emitHeight()},gameEvent:{deep:!0,handler(){this.gameEventKey++}}},methods:{...tca("general",["setVideoModalVisibility","setVideoSrc"]),thumbnailClick(e){e!=="-"&&this.$emit("thumbnail-click",e)},showVideoTimeline(e){this.setVideoSrc(e),this.setVideoModalVisibility(!0)},getIconClasses(){return["time-line-event__icon--desktop",`time-line-event__icon--desktop-${this.gameEvent.teamType===1?"home":"away"}-team`]},emitHeight(){setTimeout(()=>{this.$refs.timeLineEvent&&this.$refs.timeLineEvent.clientHeight&&this.$refs.timeLineEvent.clientHeight!==this.lastHeight&&(this.lastHeight=this.$refs.timeLineEvent.clientHeight,this.$emit("event-height",this.lastHeight))},500)}},mounted(){if(this.emitHeight(),this.gameEvent.event_type_id===3){const[e,n]=this.gameEvent.player_id.split("@");this.$emit("player-changed",{playerOut:Number(e),playerIn:Number(n),teamId:this.gameEvent.team_id})}}},kca=e=>(t.pushScopeId("data-v-9943063a"),e=e(),t.popScopeId(),e),Cca={class:"time-line-event__details"},Tca={width:"127",preload:"metadata",style:{"border-radius":"8px"}},Sca=["src"],Eca=kca(()=>t.createElementVNode("div",{class:"time-line-event__details__video-thumbnail__gradient"},[t.createElementVNode("div",{class:"time-line-event__details__video-thumbnail__gradient__button-play"},[t.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none"},[t.createElementVNode("path",{d:"M6.6041 22.8554C6.42105 22.7512 6.26805 22.5956 6.1616 22.4053C6.05515 22.215 5.99927 21.9973 6.00001 21.7755V2.22137C6.00026 2.00039 6.0565 1.78362 6.16274 1.59409C6.26899 1.40456 6.42127 1.24936 6.6034 1.14499C6.78553 1.04062 6.9907 0.990981 7.1971 1.00135C7.4035 1.01171 7.60342 1.0817 7.77561 1.20386L21.4907 10.9821C21.6473 11.0935 21.7758 11.2446 21.8646 11.4219C21.9535 11.5992 22 11.7973 22 11.9985C22 12.1996 21.9535 12.3977 21.8646 12.575C21.7758 12.7523 21.6473 12.9034 21.4907 13.0148L7.77561 22.7954C7.60369 22.9178 7.40392 22.988 7.19761 22.9986C6.9913 23.0092 6.78617 22.9597 6.6041 22.8554ZM7.14347 21.7779L20.8585 11.9996L7.14347 21.7779Z",fill:"#CBEE6B"})])])],-1)),Aca={class:"time-line-event__details__info"},Mca={key:0,class:"time-line-event__details__info__header__players"},Ica={class:"time-line-event__details__info__header__players__div-img"},Pca=["src"],Nca={class:"time-line-event__details__info__body"},Bca={class:"time-line-event__details__info__body__comment"},Oca={class:"time-line-event__minute__container"},zca={class:"time-line-event__minute__container__text"},Lca={class:"time-line-event__minute__container__icon-container"},Fca={class:"time-line-event__minute__container__icon-container__icon"},Dca={key:0,src:oca,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},Vca={key:1,src:sca,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},Rca={key:2,src:lca,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},$ca={key:3,src:cca,class:"time-line-event__minute__container__icon-container__icon__img",alt:"Event icon"},jca={key:4,src:dca,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},Uca={key:5,src:uca,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},Hca={key:6,src:ME,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},Gca={key:7,src:ME,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},Wca={key:8,src:ME,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},qca={key:9,src:hca,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},Yca={key:10,src:pca,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},Zca={key:11,src:fca,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},Jca={key:12,src:mca,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},Xca={key:13,src:gca,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},Kca={key:14,src:yca,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},Qca={key:15,src:vca,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},eda={key:16,src:_ca,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},tda={key:17,src:bca,class:"time-line-event__minute__container__icon-container__icon__img",alt:"Event icon"},ada={key:18,src:"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg id='Layer_2' data-name='Layer 2' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'%3E%3Cdefs%3E%3Cstyle%3E .cls-1 %7B fill: %23fff; %7D .cls-2 %7B fill: %23172531; %7D %3C/style%3E%3C/defs%3E%3Cg id='Layer_1-2' data-name='Layer 1'%3E%3Cg%3E%3Cg id='Oval'%3E%3Ccircle class='cls-2' cx='24' cy='24' r='24'/%3E%3C/g%3E%3Cg id='Group-19'%3E%3Cg id='Path-16'%3E%3Cpath class='cls-1' d='M32.85,36.6H15.15c-.41,0-.75-.34-.75-.75s.34-.75,.75-.75h17.69c.41,0,.75,.34,.75,.75s-.34,.75-.75,.75Z'/%3E%3C/g%3E%3C/g%3E%3Cg id='Rectangle'%3E%3Cg id='path-1'%3E%3Cpath class='cls-1' d='M38.02,32.62H9.98V13.43h28.04v19.19Zm-26.54-1.5h25.04V14.93H11.48V31.12Z'/%3E%3C/g%3E%3C/g%3E%3C/g%3E%3C/g%3E%3C/svg%3E",alt:"Event icon"};function nda(e,n,r,I,L,d){return t.openBlock(),t.createElementBlock("div",{ref:"timeLineEvent",class:t.normalizeClass(["time-line-event",d.teamTypeClasses]),style:t.normalizeStyle({width:`${r.width}px`}),key:L.gameEventKey},[t.createElementVNode("div",Cca,[r.canPlayVideos&&r.gameEvent.video_link!=="-"&&r.timeLineWidth>700?(t.openBlock(),t.createElementBlock("div",{key:0,class:"time-line-event__details__video-thumbnail",onClick:n[0]||(n[0]=g=>d.thumbnailClick(r.gameEvent.video_link,r.gameEvent.event_type_name))},[t.createElementVNode("video",Tca,[t.createElementVNode("source",{src:r.gameEvent.video_link+"#t=0.1",type:"video/mp4"},null,8,Sca)]),Eca])):t.createCommentVNode("",!0),t.createElementVNode("div",Aca,[t.createElementVNode("div",{class:t.normalizeClass(["time-line-event__details__info__header",d.teamTypeClasses2])},[r.gameEvent.video_link=="-"?(t.openBlock(),t.createElementBlock("div",Mca,[d.srcImgPlayers?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:0},t.renderList(d.srcImgPlayers,(g,a)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["img-player",{"second-player":a===1}]),key:a},[t.createElementVNode("div",Ica,[t.createElementVNode("img",{src:g,alt:""},null,8,Pca)])],2))),128)):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0),t.createElementVNode("div",{class:t.normalizeClass(["time-line-event__details__info__header__event-name",d.nameClasses]),onClick:n[1]||(n[1]=g=>d.thumbnailClick(r.gameEvent.video_link,r.gameEvent.event_type_name))},[r.canPlayVideos&&r.gameEvent.video_link!=="-"?(t.openBlock(),t.createElementBlock("img",{key:0,src:ica,class:t.normalizeClass(`time-line-event__details__info__header__event-play ${[1,2].includes(r.gameEvent.event_type_id)?`time-line-event__details__info__header__event-play__${r.gameEvent.event_type_name}`:r.gameEvent.video_link!=="-"?"time-line-event__details__info__header__event-play__normal-video":""}`)},null,2)):t.createCommentVNode("",!0),t.createTextVNode(" "+t.toDisplayString(r.gameEvent.category_id?r.gameEvent.event_type_id===5?r.gameEvent.category_name:r.gameEvent.event_type_name==="Gol"?r.gameEvent.event_type_name+" de "+r.gameEvent.team_name:r.gameEvent.event_type_name:r.gameEvent.comments),1)],2)],2),t.createElementVNode("div",Nca,[t.createElementVNode("div",Bca,t.toDisplayString(this.gameEvent.category_id?`${this.gameEvent.comments}`:""),1)])])]),t.createElementVNode("div",{class:t.normalizeClass(["time-line-event__minute",d.minuteClasses])},[t.createElementVNode("div",Oca,[t.createElementVNode("div",zca,t.toDisplayString(r.gameEvent.minute)+"'",1),t.createElementVNode("div",Lca,[t.createElementVNode("div",Fca,[r.gameEvent.category_id==18?(t.openBlock(),t.createElementBlock("img",Dca)):r.gameEvent.category_id==20?(t.openBlock(),t.createElementBlock("img",Vca)):r.gameEvent.category_id==10?(t.openBlock(),t.createElementBlock("img",Rca)):r.gameEvent.category_id==21?(t.openBlock(),t.createElementBlock("img",$ca)):r.gameEvent.category_id==27?(t.openBlock(),t.createElementBlock("img",jca)):r.gameEvent.category_id==17?(t.openBlock(),t.createElementBlock("img",Uca)):r.gameEvent.category_id==6&&r.gameEvent.event_type_id==1||r.gameEvent.category_id==5&&r.gameEvent.event_type_id==1||r.gameEvent.category_id==1&&r.gameEvent.event_type_id==1||r.gameEvent.category_id==2&&r.gameEvent.event_type_id==1||r.gameEvent.category_id==3&&r.gameEvent.event_type_id==1||r.gameEvent.category_id==7&&r.gameEvent.event_type_id==1||r.gameEvent.category_id==12&&r.gameEvent.event_type_id==1?(t.openBlock(),t.createElementBlock("img",Hca)):r.gameEvent.category_id==4?(t.openBlock(),t.createElementBlock("img",Gca)):r.gameEvent.category_id==13||r.gameEvent.category_id==16?(t.openBlock(),t.createElementBlock("img",Wca)):r.gameEvent.category_id==30||r.gameEvent.category_id==31||r.gameEvent.category_id==32||r.gameEvent.category_id==33||r.gameEvent.category_id==34||r.gameEvent.category_id==35||r.gameEvent.category_id==36||r.gameEvent.category_id==37||r.gameEvent.category_id==38||r.gameEvent.category_id==39||r.gameEvent.category_id==40?(t.openBlock(),t.createElementBlock("img",qca)):r.gameEvent.category_id==28?(t.openBlock(),t.createElementBlock("img",Yca)):r.gameEvent.category_id==26?(t.openBlock(),t.createElementBlock("img",Zca)):r.gameEvent.category_id==22?(t.openBlock(),t.createElementBlock("img",Jca)):r.gameEvent.category_id==15||r.gameEvent.category_id==23?(t.openBlock(),t.createElementBlock("img",Xca)):r.gameEvent.category_id==0&&r.gameEvent.game_status_id==16||r.gameEvent.category_id==0&&r.gameEvent.game_status_id==18||r.gameEvent.category_id==0&&r.gameEvent.game_status_id==20||r.gameEvent.category_id==0&&r.gameEvent.game_status_id==22?(t.openBlock(),t.createElementBlock("img",Kca)):r.gameEvent.category_id==0&&r.gameEvent.game_status_id==13||r.gameEvent.category_id==0&&r.gameEvent.game_status_id==17||r.gameEvent.category_id==0&&r.gameEvent.game_status_id==19||r.gameEvent.category_id==0&&r.gameEvent.game_status_id==21||r.gameEvent.category_id==0&&r.gameEvent.game_status_id==23?(t.openBlock(),t.createElementBlock("img",Qca)):r.gameEvent.category_id==8?(t.openBlock(),t.createElementBlock("img",eda)):r.gameEvent.category_id==9?(t.openBlock(),t.createElementBlock("img",tda)):(t.openBlock(),t.createElementBlock("img",ada))])])])],2)],6)}const rda=kv(wca,[["render",nda],["__scopeId","data-v-9943063a"]]),ida={"1-1":"gol","1-2":"gol","1-3":"gol","1-4":"gol","1-5":"gol","1-6":"gol","1-7":"gol","1-12":"gol","1-13":"gol","1-16":"gol","2-8":"amonestacion","2-9":"expulsion","3-10":"cambio_de_jugador","3-11":"cambio_de_jugador","4-14":"gol","4-15":"penal_fallado","5-17":"fuera_de_lugar","5-18":"tiro_de_esquina","5-20":"tiro_a_gol","5-21":"falta_cometida","5-22":"penal_marcado","5-23":"penal_fallado","5-24":"","5-25":"","5-26":"jugada_peligro_dentro_area","5-27":"atajada","5-28":"tiempo_agregado","5-29":"presion_para_anotar","7-30":"revision_var","7-31":"revision_var","7-32":"revision_var","7-33":"revision_var","7-34":"revision_var"},oda={3:{name:"Inicia Primer Tiempo",weight:1,playTimer:1,abbreviation:"1T:"},4:{name:"Final Primer Tiempo",weight:2,playTimer:0,abbreviation:"1T:"},5:{name:"Inicia Segundo Tiempo",weight:3,playTimer:1,abbreviation:"2T:"},8:{name:"Final Segundo Tiempo",weight:4,playTimer:0,abbreviation:"2T:"},9:{name:"Inicia Primer Tiempo Extra",weight:5,playTimer:1,abbreviation:"1T extra:"},12:{name:"Final Primer Tiempo Extra",weight:6,playTimer:0,abbreviation:"1T extra:"},10:{name:"Inicia Segundo Tiempo Extra",weight:7,playTimer:1,abbreviation:"2T extra:"},13:{name:"Final Segundo Tiempo Extra",weight:8,playTimer:0,abbreviation:"2T extra:"},11:{name:"Inicia Tanda de Penales",weight:9,playTimer:1,abbreviation:"Penales:"},15:{name:"Final Tanda de Penales",weight:10,playTimer:0,abbreviation:"Penales:"},6:{name:"Marcador Final",weight:11,playTimer:0,abbreviation:"Final"}};let O5=null;const sda={name:"TimeLine",components:{Tooltip:Cla,TimeLineEvent:rda},mixins:[Sla],props:{gameData:{type:Object,required:!0},timeLinePeriod:{type:String,default:"all"},socket:{type:Object,default:()=>({})},canPlayVideos:{type:Boolean,default:!0}},data(){return{gameEvents:[],gameEventsByPeriod:{firstHalf:[],secondHalf:[]},dataVideo:{visible:!1,link:""},gameEventsQueue:[],gameEventsUrl:"https://al2nv2dmkc.execute-api.us-west-2.amazonaws.com/prod/mxm/",transitionName:"",subscriptionInfo:{gameId:0,isSubscribed:!1},areGameEventsFilled:!1,timeLineWidth:812,eventContainerWidth:0,channelName:"",timeLineStatus:"awaiting",timeLeft:"",lastMinute:0,timeLineStatuses:[],currentStatus:{abbreviation:""},timer:"00:00"}},computed:{isMobile(){return this.timeLineWidth<580},gameEventWidth(){return this.timeLineWidth/2-30},gameEventsToShow(){return this.timeLinePeriod==="all"?this.gameEvents:this.gameEventsByPeriod[this.timeLinePeriod]}},watch:{gameData:{deep:!0,immediate:!0,handler(e){e&&e.id&&(this.gameDateTime=new Date(this.gameData.dateTimeUTC),this.gameEventsQueue=[],this.timeLineStatuses=[],this.transitionName="",this.checkTimeLeft(),e.status!==1&&this.socket&&this.socket.connected?this.subscribeToMXMChannel():this.timeLineStatus="finished",this.fillGameEvents(e.id))}},"socket.connected":{immediate:!0,handler(e){e&&this.gameData.id&&this.gameData.status!==1&&this.subscribeToMXMChannel()}},gameEvents(e){e.length&&this.gameData.status!==1&&(this.timeLineStatus="live")}},methods:{async fillGameEvents(e){try{const n=await this.fetchGameEvents(e);n?(this.gameEvents=[...n],this.checkGameEventsQueue(),this.sortGameEvents(),setTimeout(()=>{this.transitionName="list"},500)):this.gameEvents=[],this.gameData.status===1?this.lastMinute=`${this.gameEvents[this.gameEvents.length-1].minute}'`:this.checkTimeLineStatus()}catch(n){throw new Error(n)}},getGameEventClassAndSetIcon(e,n){return e.icon=n===0?"inicio_del_partido":ida[`${e.event_type_id}-${e.category_id}`],e.team_id===this.gameData.homeTeam.team_id||!e.team_id?(e.teamType=1,["home-team-event"]):(e.teamType=2,["away-team-event"])},getEventContainerClass(){return this.isMobile,["time-line-event__container--desktop"]},async fetchGameEvents(e){try{const{data:{plays:n}}=await nJ.get(`${this.gameEventsUrl}${e}`);return n}catch(n){throw new Error(n)}},subscribeToMXMChannel(){this.channelName=`mxm.game.${this.gameData.id}`,this.socket.emit("subscribe",{channel:this.channelName}),this.isSubscribed=!0},checkGameEventsQueue(){this.gameEventsQueue.length&&this.gameEvents.push(...this.gameEventsQueue),this.areGameEventsFilled=!0},setUpResizeObserver(){if(window.ResizeObserver)O5=new ResizeObserver(()=>{this.timeLineWidth=this.$refs.timeLine.clientWidth}),O5.observe(this.$refs.timeLine);else throw new Error("Resize observer not supported!")},updateContainerHeight(e,n){const r=this.$refs[`gameEventDiv${n}`][0],I=this.$refs[`gameEventLine${n}`]?this.$refs[`gameEventLine${n}`][0]:null,L=e+12;r&&(r.style.height=`${L}px`),I&&(I.style.height=`${L}px`)},sortGameEvents(){this.gameEvents.sort((e,n)=>this.getMatchLapseMinutes(e.match_lapse)+Number(e.minute)-(this.getMatchLapseMinutes(n.match_lapse)+Number(n.minute))),this.gameEventsByPeriod={firstHalf:[],secondHalf:[]},this.gameEvents.forEach(e=>{this.gameEventsByPeriod[e.match_lapse===1?"firstHalf":"secondHalf"].push(e)})},getMatchLapseMinutes(e){let n=0;switch(e){case 1:n=0;break;case 2:n=45;break;case 3:n=90;break;case 4:n=105;break;case 5:n=120;break}return n},addGameEventFromChannel(e){this.areGameEventsFilled?(this.gameEvents.push(e),this.sortGameEvents()):this.gameEventsQueue.push(e)},deleteGameEventFromChannel(e){const n=this.gameEvents.findIndex(r=>r.play_id===e.play_id);n&&this.gameEvents.splice(n,1)},checkTimeLineStatus(){this.gameEvents.forEach(n=>{const r=oda[n.game_status];r&&this.timeLineStatuses.push({...r,gameEvent:n})}),this.timeLineStatuses.sort((n,r)=>r.weight-n.weight);const e=this.timeLineStatuses[0];e&&(this.currentStatus=e,e.playTimer&&this.startTimer())},startTimer(){},getTeamLogoSrc(e="homeTeam"){const n=this.gameData[e].team_id;return Ela(n)},thumbnailClick(e){this.canPlayVideos&&(this.dataVideo.link=e,this.dataVideo.visible=!0)}},mounted(){this.$nextTick(()=>{this.setUpResizeObserver()})},beforeUnmount(){O5&&O5.unobserve(this.$refs.timeLine)},sockets:{new_mxm([e,n]){this.channelName===e&&this.addGameEventFromChannel(n)},update_mxm([e,n]){this.channelName===e&&(this.deleteGameEventFromChannel(n),this.addGameEventFromChannel(n))},delete_mxm([e,n]){this.channelName===e&&this.deleteGameEventFromChannel(n)}}},kJ=e=>(t.pushScopeId("data-v-2574e576"),e=e(),t.popScopeId(),e),lda={ref:"timeLine",class:"time-line"},cda={class:"time-line__header"},dda={class:"time-line__header__dot"},uda={class:"time-line__header__dot__home-team team-logo"},hda=["src"],pda={class:"time-line__header__dot__away-team team-logo"},fda=["src"],mda={key:1,class:"start-line"},gda=kJ(()=>t.createElementVNode("div",null,null,-1)),yda=kJ(()=>t.createElementVNode("div",null,null,-1)),vda=[gda,yda],_da={key:1,class:"noEventText"},bda={class:"tooltip-data"},xda=["src"];function wda(e,n,r,I,L,d){const g=t.resolveComponent("TimeLineEvent"),a=t.resolveComponent("Tooltip");return t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createElementVNode("div",lda,[t.createElementVNode("div",cda,[t.createElementVNode("div",dda,[t.createElementVNode("div",uda,[t.createElementVNode("img",{src:d.getTeamLogoSrc("homeTeam"),alt:""},null,8,hda)]),t.createElementVNode("div",pda,[t.createElementVNode("img",{src:d.getTeamLogoSrc("awayTeam"),alt:""},null,8,fda)])])]),(t.openBlock(),t.createElementBlock("div",{class:"time-line__game-events",key:`tlk-${L.gameEvents.length}`},[r.gameData.status!==4||r.gameData.is_live?(t.openBlock(),t.createBlock(t.TransitionGroup,{key:0,name:L.transitionName,tag:"div"},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(d.gameEventsToShow,(b,m)=>(t.openBlock(),t.createElementBlock("div",{class:"time-line__game-events__grid",key:b.play_id},[t.createElementVNode("div",{ref_for:!0,ref:`gameEventDiv${m}`,class:t.normalizeClass(d.getGameEventClassAndSetIcon(b,m))},[t.createElementVNode("div",{class:t.normalizeClass(d.getEventContainerClass(b))},[t.createVNode(g,{"game-event":b,"is-mobile":d.isMobile,"time-line-width":L.timeLineWidth,width:d.gameEventWidth,"can-play-videos":r.canPlayVideos,onEventHeight:i=>d.updateContainerHeight(i,m),onPlayerChanged:n[0]||(n[0]=i=>e.$emit("player-changed",i)),onThumbnailClick:d.thumbnailClick},null,8,["game-event","is-mobile","time-line-width","width","can-play-videos","onEventHeight","onThumbnailClick"])],2),m>0?(t.openBlock(),t.createElementBlock("div",{key:0,ref_for:!0,ref:`gameEventLine${m}`,class:"line"},null,512)):t.createCommentVNode("",!0),r.gameData.status===1&&m===d.gameEventsToShow.length-1?(t.openBlock(),t.createElementBlock("div",mda,vda)):t.createCommentVNode("",!0)],2)]))),128))]),_:1},8,["name"])):(t.openBlock(),t.createElementBlock("div",_da,"Aún no comienza el partido"))]))],512),t.createVNode(a,{data:L.dataVideo},{default:t.withCtx(()=>[t.createElementVNode("div",bda,[t.createElementVNode("div",null,[t.createElementVNode("video",{class:"tooltip-video",controls:"",autoplay:"",src:L.dataVideo.link,format:"video/mp4"},null,8,xda)])])]),_:1},8,["data"])],64)}const kda=kv(sda,[["render",wda],["__scopeId","data-v-2574e576"]]),Cda={class:"game-time-line__options"},Tda={class:"game-time-line__timeline"},Sda={__name:"GSC-GameTimeLine",props:{game:{type:Object,default:()=>({id:79601,seasonId:1772,status:1,dateTimeUTC:"2023-10-01T22:20:00Z",is_live:0,homeTeam:{logo:"https://az755631.vo.msecnd.net/teams-80/18.png",team_id:18,provisional_logo:"https://az755631.vo.msecnd.net/teams-provisional/18.png",colloquial_name:"Toluca",acronym:"TOL",team_name:"Toluca"},awayTeam:{logo:"https://az755631.vo.msecnd.net/teams-80/1.png",team_id:1,provisional_logo:"https://az755631.vo.msecnd.net/teams-provisional/1.png",colloquial_name:"Chivas",acronym:"CHI",team_name:"Guadalajara"}})},socket:{type:Object,default:()=>({})},canPlayVideos:{type:Boolean,default:!0}},setup(e){nJ.defaults.headers.common.Authorization="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MCwibmFtZSI6IlVzdWFyaW8gRnJlZSIsInVzZXJuYW1lIjoiZnJlZUBnb2xzdGF0cy5jb20iLCJlbWFpbCI6ImZyZWVAZ29sc3RhdHMuY29tIiwiaWF0IjoxNjA2NzU4Nzk1LCJleHAiOjE2MzgyOTQ3OTV9.kPNmP7yDtk38cAXrUyc7OHRh6J25VFqy-XUNzbK-4YE";const n=t.ref({width:"103px",height:"30px",borderRadius:"50px",borderColor:"#8a8a8a",borderWidth:"0.5px",backgroundColor:"rgba(255, 255, 255, 0.04)",fontSize:"14px",fontFamily:"Poppins-Regular, sans-serif",fontColor:"rgba(255, 255, 255, 0.5)",activeFontColor:"#FFFFFF",activeBorderColor:"#cbee6b"}),r=t.ref({width:"auto",height:"30px",padding:"0px 20px",borderRadius:"50px",borderColor:"#8a8a8a",borderWidth:"0.5px",backgroundColor:"rgba(255, 255, 255, 0.04)",fontSize:"14px",fontFamily:"Poppins-Regular, sans-serif",fontColor:"rgba(255, 255, 255, 0.5)",activeFontColor:"#FFFFFF",activeBorderColor:"#cbee6b"});let I=null;const L=t.ref(["Todo","1er tiempo","2do tiempo"]),d=t.ref("Todo"),g=t.ref({}),a=t.ref(null),b=t.ref(0),m=t.computed(()=>{let s="all";return d.value==="1er tiempo"||d.value==="1er"?s="firstHalf":(d.value==="2do tiempo"||d.value==="2do")&&(s="secondHalf"),s}),i=t.computed(()=>b.value<500);function v(s){d.value=s}function _(s){g.value=s}function c(){if(window.ResizeObserver)I=new ResizeObserver(()=>{b.value=a.value.clientWidth}),I.observe(a.value);else throw new Error("Resize observer not supported!")}return t.onMounted(()=>{c()}),t.onBeforeUnmount(()=>{I&&I.unobserve(a.value)}),(s,o)=>(t.openBlock(),t.createElementBlock("div",{ref_key:"gameTimeLine",ref:a,class:"game-time-line"},[t.createElementVNode("div",Cda,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(L.value,l=>(t.openBlock(),t.createElementBlock("div",{key:l,class:"game-time-line__options__option"},[t.createVNode(rsa,t.mergeProps(b.value<390?r.value:n.value,{text:l=="Todo"?l:b.value<390?l.substring(0,3):l,"is-active":d.value===l,onClick:u=>v(l)}),null,16,["text","is-active","onClick"])]))),128))]),t.createElementVNode("div",Tda,[t.createVNode(kda,{"game-data":e.game,"time-line-period":m.value,"is-mobile":i.value,socket:e.socket,"can-play-videos":e.canPlayVideos,onGameEventsByPeriodFilled:_},null,8,["game-data","time-line-period","is-mobile","socket","can-play-videos"])])],512))}},Eda=kv(Sda,[["__scopeId","data-v-f42d0c90"]]),tba="",Ada={class:"game-data__header"},Mda={class:"game-data__header__tournament-season-dropdown"},Ida={class:"game-data__header__teams-carousel"},Pda={class:"game-data__body"},Nda={class:"game-data__body__menu"},Bda={class:"game-data__body__menu__contmenuswitch"};cl.defaults.headers.common.Authorization="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MCwibmFtZSI6IlVzdWFyaW8gRnJlZSIsInVzZXJuYW1lIjoiZnJlZUBnb2xzdGF0cy5jb20iLCJlbWFpbCI6ImZyZWVAZ29sc3RhdHMuY29tIiwiaWF0IjoxNjA2NzU4Nzk1LCJleHAiOjE2MzgyOTQ3OTV9.kPNmP7yDtk38cAXrUyc7OHRh6J25VFqy-XUNzbK-4YE";const Oda=t.defineComponent({name:"TemplateVideos",components:{StatisticsMain:Ihe,GSCGameTimeLine:Eda,GscSwitchComponent:tS,GSCLineupsMain:u6e,GSCDatosGSMain:mMe,GSCVideoGame:K$e,ModalEvents:VD,GSCSummaryMain:Jyt,GSCTacticaFijaMain:asa,GSCProminentMain:GIt,GSCComparative:TOt}}),zda=Gr(Object.assign(Oda,{props:{tournamentsApiUrl:{type:String,default:""},currentSeasonId:{type:Number,default:0},defaultGameId:{type:Number,default:0,validator(e){return!Number.isNaN(e)&&e>=0}},sortCalendar:{type:Boolean,default:!0},socket:{type:Object,default:()=>null},isSynchronization:{type:Boolean,default:!1},isTeamGamePerPage:{type:Boolean,default:!1},clientPrivilegesBySeasons:{type:Object,default:()=>null},areTournamentAndSeasonSelectsVisible:{type:Boolean,default:!0},disabledSectionsIds:{type:Array,default:()=>[]},tournamentsIdsToInclude:{type:Set,default:()=>new Set}},emits:["openmedia","change-season-id","onOpenProfile","openProfileTeam","openProfilePlayer"],setup(e,{emit:n}){const r=e,I=ag();pu.on("socket-connected",()=>{I.commit("nextGeneral/updateIsSocketConnected",r.socket.connected)});const L=t.ref("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6NTg2LCJuYW1lIjoiSkFTIEdvbFN0YXRzIiwidXNlcm5hbWUiOiJ5YXRlYW1lcmljYSIsImVtYWlsIjoiIiwicHJvdmlkZXJfaWQiOjEsImxvZ2luX2dvbHN0YXRzIjoxLCJpYXQiOjE2OTYzNjU1ODcsImV4cCI6MTcyNzkwMTU4N30.jynRtgtFM8sf8gtqZJ-1gHLc2Ws13TIykXcfrlOvv1g"),d=t.ref({season:[]}),g=t.ref({}),a=t.ref(!1),b=t.ref({}),m=t.ref(1),i=t.ref(null),v=t.ref(null),_=t.ref(null),c=t.ref([]),s=t.ref(null),o=t.ref(!0),l=t.ref(new Set([1,2])),u=t.ref({}),h=t.ref({minute:"",recent_lapse:0,score:{}}),p=t.ref(0),f=t.ref("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MCwibmFtZSI6IlVzdWFyaW8gRnJlZSIsInVzZXJuYW1lIjoiZnJlZUBnb2xzdGF0cy5jb20iLCJlbWFpbCI6ImZyZWVAZ29sc3RhdHMuY29tIiwiaWF0IjoxNjA2NzU4Nzk1LCJleHAiOjE2MzgyOTQ3OTV9.kPNmP7yDtk38cAXrUyc7OHRh6J25VFqy-XUNzbK-4YE"),y=t.ref([{componentName:"GSCProminentMain",name:"Destacado",id:1},{componentName:"GSCVideoGame",name:"Video",id:2},{componentName:"StatisticsMain",name:"Estadísticas",id:4},{componentName:"GSCComparative",name:"Comparativa",id:3},{componentName:"GSCGameTimeLine",name:"Minuto a Minuto",id:5},{componentName:"GSCLineupsMain",name:"Alineaciones",id:6},{componentName:"GSCTacticaFijaMain",name:"Táctica Fija",id:7}]),w=t.ref([{componentName:"GSCProminentMain",name:"Destacado",id:1},{componentName:"GSCVideoGame",name:"Video",id:2},{componentName:"StatisticsMain",name:"Estadísticas",id:3},{componentName:"GSCComparative",name:"Comparativa",id:4},{componentName:"GSCGameTimeLine",name:"Minuto a Minuto",id:5},{componentName:"GSCLineupsMain",name:"Alineaciones",id:6},{componentName:"GSCTacticaFijaMain",name:"Táctica Fija",id:7}]),x=t.ref([{componentName:"GSCProminentMain",name:"Destacado",id:1},{componentName:"GSCVideoGame",name:"Video",id:2},{componentName:"StatisticsMain",name:"Estadísticas",id:3},{componentName:"GSCComparative",name:"Comparativa",id:4},{componentName:"GSCGameTimeLine",name:"Minuto a Minuto",id:5},{componentName:"GSCLineupsMain",name:"Alineaciones",id:6},{componentName:"GSCTacticaFijaMain",name:"Táctica Fija",id:7}]);t.ref([{componentName:"GSCProminentMain",name:"Destacado",id:1},{componentName:"GSCVideoGame",name:"Video",id:2},{componentName:"StatisticsMain",name:"Estadísticas",id:3},{componentName:"GSCComparative",name:"Comparativa",id:4},{componentName:"GSCGameTimeLine",name:"Minuto a Minuto",id:5},{componentName:"GSCLineupsMain",name:"Alineaciones",id:6},{componentName:"GSCTacticaFijaMain",name:"Táctica Fija",id:7}]);const M=t.ref(0);let k=null;const T=t.ref(null),S=t.ref(0),A=t.ref(w.value[0]),E=t.ref([]);let N=t.ref("");const C={seasonAndPrivileges:null,canPrivilegesTeamPlayVideos:!1,homeTeamDetails:{canPlayVideos:!1,team:{}},awayTeamDetails:{canPlayVideos:!1,team:{}}},z=t.computed(()=>{const be=[];return g.value&&g.value.id&&(be.push({id:g.value.id,name:g.value.name,type:g.value.type}),g.value.related_seasons&&g.value.related_seasons.forEach(pe=>{be.push({id:pe.id,type:pe.type})})),be}),P=t.computed(()=>{if(r.clientPrivilegesBySeasons){const be=r.clientPrivilegesBySeasons.seasonsAndPrivileges.get(g.value.id);if(be)return be.teamId}return 0});function O(){a.value=!1}function D(be){const pe=be.split(",");return!(pe.length<2||pe[1].split(" ").length<2)}function V(be){i.value=be}function R(be){c.value.push(be)}function j(be){s.value=be}function q(be){_.value=be}function $(be){v.value=be}function G(be){if(!D(be))return"";const pe=H(be);return`${Z(be)}. ${pe}`}function Z(be){return be.split(",")[1].split(" ")[1][0]}function H(be){const pe=be.split(",")[0].split(" ");return pe[0].length<=3&&pe.length>1?`${pe[0]} ${pe[1]}`:pe[0]}async function Y(be){try{const pe=cl.create({headers:{Authorization:`${L.value}`}});u.value={};const ce=await pe.get("https://al2nv2dmkc.execute-api.us-west-2.amazonaws.com/prod/mxm/"+be.game_id);u.value[be.home_team.team_id]=[],u.value[be.home_team.team_id].team={name:be.home_team.acronym,logo:be.home_team.logo},u.value[be.home_team.team_id].goals=[],u.value[be.home_team.team_id].red=[],u.value[be.home_team.team_id].yellow=[],u.value[be.visiting_team.team_id]=[],u.value[be.visiting_team.team_id].team={name:be.visiting_team.acronym,logo:be.visiting_team.logo},u.value[be.visiting_team.team_id].goals=[],u.value[be.visiting_team.team_id].red=[],u.value[be.visiting_team.team_id].yellow=[],ce.data.minute!=null&&(h.value={minute:ce.data.minute,recent_lapse:ce.data.recent_lapse,score:ce.data.score});for(let _e=0;_e<ce.data.plays.length;_e++)ce.data.plays[_e].category_name=="Roja"&&ce.data.plays[_e].status==1&&(be.home_team.team_id==ce.data.plays[_e].team_id?(G(ce.data.plays[_e].player_name)in u.value[be.home_team.team_id].red||(u.value[be.home_team.team_id].red[G(ce.data.plays[_e].player_name)]={},u.value[be.home_team.team_id].red[G(ce.data.plays[_e].player_name)].event=[],u.value[be.home_team.team_id].red[G(ce.data.plays[_e].player_name)].name=G(ce.data.plays[_e].player_name)),u.value[be.home_team.team_id].red[G(ce.data.plays[_e].player_name)].event.push(ce.data.plays[_e].minute)):(G(ce.data.plays[_e].player_name)in u.value[be.visiting_team.team_id].red||(u.value[be.visiting_team.team_id].red[G(ce.data.plays[_e].player_name)]={},u.value[be.visiting_team.team_id].red[G(ce.data.plays[_e].player_name)].event=[],u.value[be.visiting_team.team_id].red[G(ce.data.plays[_e].player_name)].name=G(ce.data.plays[_e].player_name)),u.value[be.visiting_team.team_id].red[G(ce.data.plays[_e].player_name)].event.push(ce.data.plays[_e].minute))),ce.data.plays[_e].category_name=="Amarilla"&&ce.data.plays[_e].status==1&&(be.home_team.team_id==ce.data.plays[_e].team_id?(G(ce.data.plays[_e].player_name)in u.value[be.home_team.team_id].yellow||(u.value[be.home_team.team_id].yellow[G(ce.data.plays[_e].player_name)]={},u.value[be.home_team.team_id].yellow[G(ce.data.plays[_e].player_name)].event=[],u.value[be.home_team.team_id].yellow[G(ce.data.plays[_e].player_name)].name=G(ce.data.plays[_e].player_name)),u.value[be.home_team.team_id].yellow[G(ce.data.plays[_e].player_name)].event.push(ce.data.plays[_e].minute)):(G(ce.data.plays[_e].player_name)in u.value[be.visiting_team.team_id].yellow||(u.value[be.visiting_team.team_id].yellow[G(ce.data.plays[_e].player_name)]={},u.value[be.visiting_team.team_id].yellow[G(ce.data.plays[_e].player_name)].event=[],u.value[be.visiting_team.team_id].yellow[G(ce.data.plays[_e].player_name)].name=G(ce.data.plays[_e].player_name)),u.value[be.visiting_team.team_id].yellow[G(ce.data.plays[_e].player_name)].event.push(ce.data.plays[_e].minute))),ce.data.plays[_e].event_type_name=="Gol"&&ce.data.plays[_e].status==1&&(be.home_team.team_id==ce.data.plays[_e].team_id?ce.data.plays[_e].category_name=="Autogol"?(G(ce.data.plays[_e].player_name)in u.value[be.visiting_team.team_id].goals||(u.value[be.visiting_team.team_id].goals[G(ce.data.plays[_e].player_name)]={},u.value[be.visiting_team.team_id].goals[G(ce.data.plays[_e].player_name)].event=[],u.value[be.visiting_team.team_id].goals[G(ce.data.plays[_e].player_name)].name=G(ce.data.plays[_e].player_name)),u.value[be.visiting_team.team_id].goals[G(ce.data.plays[_e].player_name)].event.push(ce.data.plays[_e].minute)):(G(ce.data.plays[_e].player_name)in u.value[be.home_team.team_id].goals||(u.value[be.home_team.team_id].goals[G(ce.data.plays[_e].player_name)]={},u.value[be.home_team.team_id].goals[G(ce.data.plays[_e].player_name)].event=[],u.value[be.home_team.team_id].goals[G(ce.data.plays[_e].player_name)].name=G(ce.data.plays[_e].player_name)),u.value[be.home_team.team_id].goals[G(ce.data.plays[_e].player_name)].event.push(ce.data.plays[_e].minute)):ce.data.plays[_e].category_name=="Autogol"?(G(ce.data.plays[_e].player_name)in u.value[be.home_team.team_id].goals||(u.value[be.home_team.team_id].goals[G(ce.data.plays[_e].player_name)]={},u.value[be.home_team.team_id].goals[G(ce.data.plays[_e].player_name)].event=[],u.value[be.home_team.team_id].goals[G(ce.data.plays[_e].player_name)].name=G(ce.data.plays[_e].player_name)),u.value[be.home_team.team_id].goals[G(ce.data.plays[_e].player_name)].event.push(ce.data.plays[_e].minute)):(G(ce.data.plays[_e].player_name)in u.value[be.visiting_team.team_id].goals||(u.value[be.visiting_team.team_id].goals[G(ce.data.plays[_e].player_name)]={},u.value[be.visiting_team.team_id].goals[G(ce.data.plays[_e].player_name)].event=[],u.value[be.visiting_team.team_id].goals[G(ce.data.plays[_e].player_name)].name=G(ce.data.plays[_e].player_name)),u.value[be.visiting_team.team_id].goals[G(ce.data.plays[_e].player_name)].event.push(ce.data.plays[_e].minute)))}catch(pe){return Promise.reject(pe)}}function K(be){a.value=!0,be.is_live!=1&&(be.game_status==4||Object.keys(be.minutes).length>0)?(p.value=1,u.value={plays:be.minutes,home_team:be.home_team,visiting_team:be.visiting_team}):(p.value=0,Y(be))}function le(){k=new ResizeObserver(be=>{for(const pe of be)S.value=pe.contentRect.width}),k.observe(T.value)}const oe=t.computed(()=>{let be={};return b.value&&b.value.game_id&&(be={gameId:b.value.game_id,id:b.value.game_id,seasonId:b.value.season_id,status:b.value.game_status,game_status:b.value.game_status==0?4:b.value.game_status,dateTimeUTC:b.value.date_time_utc,homeTeam:b.value.home_team,awayTeam:b.value.visiting_team,is_live:b.value.is_live,minutes:b.value.minutes}),be});t.watch(()=>oe,be=>{Object.keys(be.value).length>0&&(w.value=[],be.value.is_live==1||be.value.game_status==4?(w.value=[...y.value],A.value=y.value[0]):(w.value=[...x.value],A.value=x.value[0]),g.value.is_tactic_available==0&&w.value.pop(),M.value+=1,Y({game_id:be.value.gameId,home_team:be.value.homeTeam,visiting_team:be.value.awayTeam}),be.value.is_live==1&&setInterval(()=>{p.value=0,Y({game_id:be.value.gameId,home_team:be.value.homeTeam,visiting_team:be.value.awayTeam})},3e5))},{deep:!0,immediate:!0}),t.watch(()=>I.state.nextGeneral.gameForAnalysis,()=>{I.commit("nextGeneral/updateIsSocketConnected",r.socket.connected)},{deep:!0,immediate:!0});function ne(be){m.value=be.is_captured,o.value=be.is_captured!==0,d.value.id!==be.id&&(d.value=be,I.commit("gameGlobal/setTournamentType",be.tournament_type))}function re(be){ve.value&&!ve.value.canPrivilegesTeamPlayVideos||((b.value.is_live||b.value.game_status===0)&&(be.liveGameConfig={gameId:b.value.game_id}),n("openmedia",be))}function te(be){n("onOpenProfile",be)}function ee(be){n("openProfileTeam",be)}function se(be){n("openProfilePlayer",be)}function he(be){Ce(be),be=="Estadísticas"&&(N.value="Comparativa")}function ue(){N.value=""}function fe(be){g.value.id!==be.id&&(g.value=be,n("change-season-id",be.id))}const ge=t.computed(()=>w.value.reduce((be,pe)=>(r.disabledSectionsIds.includes(pe.id)||ve.value&&!ve.value.canPrivilegesTeamPlayVideos&&pe.id===2||r.clientPrivilegesBySeasons&&pe.id===7||(o.value||pe.id!==5&&pe.id!==6)&&be.push(pe.name),be),[])),ve=t.computed(()=>{if(r.clientPrivilegesBySeasons){if(g.value&&b.value&&b.value.game_id){const be=r.clientPrivilegesBySeasons.seasonsAndPrivileges.get(g.value.id);if(be)if(ke(be.playingAs),b.value.game_status===1){const pe=be.playingAs.has(b.value.playingAs);return{seasonAndPrivileges:be,canPrivilegesTeamPlayVideos:r.clientPrivilegesBySeasons.canPlayVideos&&pe,isPrivilegesTeamOnly:!1,isPrivilegesTeamHome:b.value.home_team.team_id===be.teamId,homeTeamDetails:{canPlayVideos:pe,team:b.value.home_team},awayTeamDetails:{canPlayVideos:pe,team:b.value.visiting_team}}}else{const pe=b.value.home_team.team_id===be.teamId,ce=we.value.filter(Ne=>be.playingAs.has(Ne.playingAs));return{seasonAndPrivileges:be,canPrivilegesTeamPlayVideos:r.clientPrivilegesBySeasons.canPlayVideos&&ce.length>0,isPrivilegesTeamOnly:!0,isPrivilegesTeamHome:pe,homeTeamDetails:{canPlayVideos:r.clientPrivilegesBySeasons.canPlayVideos&&pe&&ce.length>0,team:b.value.home_team},awayTeamDetails:{canPlayVideos:r.clientPrivilegesBySeasons.canPlayVideos&&!pe&&ce.length>0,team:b.value.visiting_team}}}ke(new Set)}return C}return null}),we=t.computed(()=>{if(r.clientPrivilegesBySeasons){if(g.value){const be=r.clientPrivilegesBySeasons.seasonsAndPrivileges.get(g.value.id);if(be)return E.value.filter(pe=>pe.game_status===1&&be.playingAs.has(pe.playingAs))}return[]}return[]});t.watch(ge,()=>{ve.value&&!ve.value.canPrivilegesTeamPlayVideos&&A.value.id===2&&Ce("Resumen")},{deep:!0,immediate:!0});function ke(be){l.value=be}function Ce(be){if(i.value!=null&&(clearInterval(i.value),i.value=null),v.value!=null&&(clearInterval(v.value),v.value=null),_.value!=null&&(clearInterval(_.value),_.value=null),s.value!=null&&(clearInterval(s.value),s.value=null),c.value.length>0){for(let pe of c.value)clearInterval(pe);c.value=[]}A.value=w.value.find(pe=>pe.name===be)||w.value[0]}t.onMounted(()=>{le(),t.nextTick(()=>{r.isSynchronization&&Ce("Táctica Fija")})}),t.onBeforeUnmount(()=>{if(k&&k.disconnect(),i.value!=null&&(clearInterval(i.value),i.value=null),v.value!=null&&(clearInterval(v.value),v.value=null),_.value!=null&&(clearInterval(_.value),_.value=null),s.value!=null&&(clearInterval(s.value),s.value=null),c.value.length>0){for(let be of c.value)clearInterval(be);c.value=[]}iie()});function Ie(be){if(be.playingAs||(be.playingAs=P.value?be.home_team.team_id===P.value?1:2:0),i.value!=null&&(clearInterval(i.value),i.value=null),v.value!=null&&(clearInterval(v.value),v.value=null),_.value!=null&&(clearInterval(_.value),_.value=null),s.value!=null&&(clearInterval(s.value),s.value=null),c.value.length>0){for(let pe of c.value)clearInterval(pe);c.value=[]}b.value=be}function Ve(be){E.value=be.map(pe=>{const ce={...pe};return P.value&&(ce.playingAs=ce.home_team.team_id===P.value?1:2),ce})}return(be,pe)=>(t.openBlock(),t.createElementBlock("div",{class:"game-data",ref_key:"gamedata",ref:T},[t.createElementVNode("div",Ada,[t.withDirectives(t.createElementVNode("div",Mda,[t.createVNode(t.unref(CM),{"current-season-id":e.currentSeasonId,onInput:ne,"tournaments-ids-to-include":e.tournamentsIdsToInclude,"api-url":e.tournamentsApiUrl},null,8,["current-season-id","tournaments-ids-to-include","api-url"]),t.createVNode(t.unref(EM),{"current-season-id":e.currentSeasonId,seasons:d.value.seasons,onInput:fe},null,8,["current-season-id","seasons"])],512),[[t.vShow,e.areTournamentAndSeasonSelectsVisible]]),t.createElementVNode("div",Ida,[t.createVNode(t.unref(Oae),{"plays-live":u.value,"info-live":h.value,token:f.value,is_captured:m.value,"await-for-seasons":"",seasons:z.value,"is-pagination-visible":!1,"are-games-carousel-type":"","default-game-id":e.defaultGameId,"sort-calendar":e.sortCalendar,"is-team-game-per-page":e.isTeamGamePerPage,"client-privileges-team-id":P.value,"only-games-team-id":P.value,"tournament-type":t.unref(I).state.gameGlobal.tournamentType,onChangeGameCarousel:Ie,onOpenModalEvent:K,onChangeGamesByClientPrivileges:Ve},null,8,["plays-live","info-live","token","is_captured","seasons","default-game-id","sort-calendar","is-team-game-per-page","client-privileges-team-id","only-games-team-id","tournament-type"])])]),a.value?(t.openBlock(),t.createBlock(VD,{key:0,width:S.value,onCloseModalEventsLive:O,plays:u.value,game:b.value,type:p.value},null,8,["width","plays","game","type"])):t.createCommentVNode("",!0),t.createElementVNode("div",Pda,[t.createElementVNode("div",Nda,[t.createElementVNode("div",Bda,[t.createVNode(t.unref(tS),{type:2,buttons:ge.value,"font-family":"Poppins-Regular","font-size":"16px",width:S.value<400||S.value<700?"max-content":S.value<840||S.value<1050?"155px":"165px","selected-option":A.value.name,borderWidth:"1px",arrow:!1,height:"30px",onInput:Ce},null,8,["buttons","width","selected-option"])])]),oe.value&&oe.value.gameId?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(A.value.componentName),{key:M.value,game:oe.value,onIntervalid:V,onIntervalidpossesion:$,onIntervalidhighlive:q,onIntervalidtops:R,onIntervalidgs:j,subsection:t.unref(N),seasonSelected:g.value,tournamentSelected:d.value,showLineups:o.value,socket:e.socket,is_captured:m.value,"is-tactic-visible":!!g.value.show_tactic,"is-synchronization":e.isSynchronization,"can-play-videos":ve.value?ve.value.canPrivilegesTeamPlayVideos:!0,"video-privileges-playing-as":l.value,"client-privileges-team-id":P.value,"play-videos-privileges":ve.value,token:f.value,onResetSubsection:ue,onOpenmedia:re,onOnOpenProfile:te,onOpenProfileTeam:ee,onOpenProfilePlayer:se,onChangeToTab:he,onOpenMediaPlayer:re},null,40,["game","subsection","seasonSelected","tournamentSelected","showLineups","socket","is_captured","is-tactic-visible","is-synchronization","can-play-videos","video-privileges-playing-as","client-privileges-team-id","play-videos-privileges","token"])):t.createCommentVNode("",!0)])],512))}}),[["__scopeId","data-v-a4bdf6bb"]]);async function gd({url:e,options:n={},retries:r=3}){return await cl.get(e,n).then(I=>I).catch(I=>r>0?gd({url:e,options:n,retries:r-1}):I)}async function CJ({seasonId:e},n=!0){try{return(await(await fetch(`https://golstats-microservices.s3-us-west-2.amazonaws.com/statsLeagueBySeason-${e}.json`)).json()).data}catch(r){if(n)return CJ({seasonId:e},!1);throw new Error(r)}}async function Lda({seasonId:e}){try{return(await gd({url:`https://iwxfzq6e2h.execute-api.us-west-2.amazonaws.com/prod/v2/statisticsLeagueBySeason/${e}`})).data.data}catch(n){return Promise.reject(n)}}async function Fda({seasonId:e}){try{return(await gd({url:`https://sqf4rkvoge.execute-api.us-west-2.amazonaws.com/prod/v3/statisticsGroupedBySeason/${e}`})).data.data}catch(n){return Promise.reject(n)}}function Dda(e,n,r,I,L,d,g=!1){const a=r.map(b=>b===1?2:b===2?1:3);return e.filter(b=>{const m=d&&b[L.teamId]?b[L.teamId]!==d:!1,i=n===1?2:1;return(g||I.includes(b[L.gameId]))&&(!n||(m?i:n)===b[L.playingAs])&&(r.includes(b[L.matchResult])&&b[L.teamId]===d||a.includes(b[L.matchResult])&&b[L.teamId]!==d)})}function TJ(e,n,r,I,L){return n.length===2&&r.length===3&&I.length===6?e:e.filter(d=>n.includes(d[L.playingAs])&&r.includes(d[L.matchResult])&&I.includes(d[L.section]))}async function SJ({seasonId:e}){try{const n=`https://8tvo5bp9ai.execute-api.us-west-2.amazonaws.com/prod/gamesBySeason/${e}`;return(await gd({url:n})).data}catch(n){return Promise.reject(n)}}async function Vda({seasonId:e,gameId:n}){try{const r=`https://iwxfzq6e2h.execute-api.us-west-2.amazonaws.com/prod/v2/statisticsLeagueBySeason/${e}/games/${n}`,{data:I}=await gd({url:r});return I}catch(r){return Promise.reject(r)}}async function Rda({gameId:e}){try{const n=`https://2uj7ojhmt5.execute-api.us-west-2.amazonaws.com/prod/V2/statisticsLive/${e}`;return(await gd({url:n})).data.data}catch(n){return Promise.reject(n)}}async function $da({gameId:e}){try{const n=`https://55sbpmq0f5.execute-api.us-west-2.amazonaws.com/prod/specialMentions/${e}`;return(await gd({url:n})).data.data||[]}catch(n){return Promise.reject(n)}}const jda=["categoryId","matchLapse","section","matchResult","playingAs","total"];let IE=null;function EJ(){return IE||(IE=z0(jda)),IE}async function Uda(e){try{const n=`https://d2oco6mqmc.execute-api.us-west-2.amazonaws.com/prod/teamsBySeason/${e.seasonId}`;return(await gd({url:n})).data}catch(n){return Promise.reject(n)}}async function AJ({seasonId:e,teamId:n}){try{return await gd({url:`https://a4dcb6avog.execute-api.us-west-2.amazonaws.com/prod/v2/statisticsTeamBySeason/${e}/${n}`})}catch(r){return Promise.reject(r)}}async function Hda(e){try{const n=`https://yjeig444bb.execute-api.us-west-2.amazonaws.com/prod/teamsBySeason/${e.seasonId}`;return await gd({url:n})}catch(n){return Promise.reject(n)}}async function Gda(e){try{return await gd({url:`https://nckawv8v3b.execute-api.us-west-2.amazonaws.com/prod/v2/statisticsByGame/${e.gameId}`})}catch(n){return Promise.reject(n)}}const Wda={leagueGeneral:{namespaced:!0,state:{seasonPlays:[],currentSeasonGames:[],currentSeasonTeams:[],selectedRound:1,booleanAreLiveGames:!1,booleanIsLiveGamesModalOpen:!1},getters:{seasonPlays:e=>e.seasonPlays,filteredPlaysStack(e,n,r,I){return Dda(e.seasonPlays,I["filterGeneral/getPlayingAs"],I["filterGeneral/getResults"],I["filterGeneral/getSelectedGamesIds"],EJ(),I["teamsGeneral/team"].team_id,!0)},nextGamesSchedule(e){const n=e.currentSeasonGames.reduce((r,I)=>{const L={...I};return L.home_team=e.currentSeasonTeams.find(d=>d.team_id===I.home_team),L.visiting_team=e.currentSeasonTeams.find(d=>d.team_id===I.visiting_team),r[I.matchday_abbreviation]?r[I.matchday_abbreviation][I.game_status===3?"canceled":I.date]?r[I.matchday_abbreviation][I.game_status===3?"canceled":I.date].push(L):r[I.matchday_abbreviation][I.game_status===3?"canceled":I.date]=[L]:r[I.matchday_abbreviation]={[I.game_status===3?"canceled":I.date]:[L]},r},{});for(let[r,I]of Object.entries(n))n[r]=Object.entries(I).map(([L,d])=>({date:L,games:d})),n[r].sort((L,d)=>L.date<d.date?-1:L.date>d.date?1:0);return n},matchdaysDates(e,n){let r=[];if(n.nextGamesSchedule){let I=Object.keys(n.nextGamesSchedule);for(let L of I){let d=Number(L.replace("M","")),g=n.nextGamesSchedule[L].map(a=>({matchday:d,date:new Date(a.date)}));r=r.concat(g)}}return r},closestMatchDay(e,n){let r=new Date,I=0,L=-new Date(0,0,0).valueOf(),d=n.matchdaysDates,g=d.length;for(let a=0;a<d.length;a++)I=Math.abs(d[a].date-r),I<L&&(g=a,L=I);return d[g]?d[g].matchday:1}},mutations:{setBooleanIsLiveGamesModalOpen(e,n){e.booleanIsLiveGamesModalOpen=n},setBooleanAreLiveGames(e,n){e.booleanAreLiveGames=n},updateSeasonPlays(e,n){e.seasonPlays=n},updateCurrentSeasonTeams(e,n){e.currentSeasonTeams=n},updateCurrentSeasonGames(e,n){e.currentSeasonGames=n},updateSelectedRound(e,n){e.selectedRound=n}},actions:{async getSeasonPlays({commit:e,rootGetters:n},r=!1){try{const I=await CJ({seasonId:n["filterGeneral/getSeasonId"]});if(r)return I;e("updateSeasonPlays",I)}catch(I){return Promise.reject(I)}},async getCurrentSeasonGames({commit:e,rootGetters:n}){try{const r=await SJ({seasonId:n["loginGeneral/seasonId"]});e("updateCurrentSeasonGames",r)}catch(r){return Promise.reject(r)}},async getCurrentSeasonTeams({commit:e,rootGetters:n}){try{const r=await Uda({seasonId:n["loginGeneral/seasonId"]});e("updateCurrentSeasonTeams",r.teams)}catch(r){return Promise.reject(r)}},async isDataFilled({state:e,dispatch:n,commit:r}){try{if(e.currentSeasonGames.length>0&&e.currentSeasonTeams.length>0)return r("setIsSectionLoading",!1,{root:!0}),!0;const I=[void 0,void 0];return e.currentSeasonGames.length===0&&(I[0]=n("getCurrentSeasonGames")),e.currentSeasonTeams.length===0&&(I[1]=n("getCurrentSeasonTeams")),await Promise.all(I),!1}catch(I){throw new Error(I)}}}}};async function qda({filter:e}){try{const n=`https://n7ielynjxk.execute-api.us-east-2.amazonaws.com/qa/filters?filters=${e}`,{data:r}=await gd({url:n});return r}catch(n){return Promise.reject(n)}}const Yda=["categoryId","teamId","matchResult","playingAs","matchLapse","section","total"];let PE=null;function Zda(){return PE||(PE=z0(Yda)),PE}class z5{constructor(){ll(this,"maximumLiveSection",1);ll(this,"accomplished",{totalPostGame:0,avgPostGame:0,avgPreGame:0,totalLive:0,avgPostGameTrendLive:{accumulated:this.getZeroTotalsTrendSections(),sections:this.getZeroTotalsTrendSections()},totalsLiveTrendLive:{accumulated:this.getZeroTotalsTrendSections(),sections:this.getZeroTotalsTrendSections()},ranking:null,leader:{},arrayRankings:[]});ll(this,"received",{totalPostGame:0,avgPostGame:0,totalLive:0,avgPostGameTrendLive:{accumulated:this.getZeroTotalsTrendSections(),sections:this.getZeroTotalsTrendSections()},totalsLiveTrendLive:{accumulated:this.getZeroTotalsTrendSections(),sections:this.getZeroTotalsTrendSections()},ranking:null,leader:{}})}setMaximumLiveSection(n){n>this.maximumLiveSection&&(this.maximumLiveSection=n)}getZeroTotalsTrendSections(){return[0,0,0,0,0,0]}resetTotals(){this.accomplished.totalPostGame=0,this.accomplished.avgPostGame=0,this.received.totalPostGame=0,this.received.avgPostGame=0,this.accomplished.avgPostGameTrendLive.sections=this.getZeroTotalsTrendSections(),this.accomplished.avgPostGameTrendLive.accumulated=this.getZeroTotalsTrendSections(),this.received.avgPostGameTrendLive.sections=this.getZeroTotalsTrendSections(),this.received.avgPostGameTrendLive.accumulated=this.getZeroTotalsTrendSections()}resetTotalsLive(){this.accomplished.totalLive=0,this.received.totalLive=0,this.accomplished.totalsLiveTrendLive.sections=this.getZeroTotalsTrendSections(),this.accomplished.totalsLiveTrendLive.accumulated=this.getZeroTotalsTrendSections(),this.received.totalsLiveTrendLive.sections=this.getZeroTotalsTrendSections(),this.received.totalsLiveTrendLive.accumulated=this.getZeroTotalsTrendSections()}increaseAccomplishedByOne(n,r,I){I&&(this.setMaximumLiveSection(n),this.accomplished.totalLive+=r,this.accomplished.totalsLiveTrendLive.sections[n-1]+=r,this.increaseTrendLiveAccumulatedByOne(this.accomplished.totalsLiveTrendLive,n,r)),this.accomplished.totalPostGame+=r,this.accomplished.avgPostGameTrendLive.sections[n-1]+=r,this.increaseTrendLiveAccumulatedByOne(this.accomplished.avgPostGameTrendLive,n,r)}increaseReceivedByOne(n,r,I){I&&(this.setMaximumLiveSection(n),this.received.totalLive+=r,this.received.totalsLiveTrendLive.sections[n-1]+=r,this.increaseTrendLiveAccumulatedByOne(this.received.totalsLiveTrendLive,n,r)),this.received.totalPostGame+=r,this.received.avgPostGameTrendLive.sections[n-1]+=r,this.increaseTrendLiveAccumulatedByOne(this.received.avgPostGameTrendLive,n,r)}increaseTrendLiveAccumulatedByOne(n,r,I){for(let L=r-1;L<n.accumulated.length;L++)n.accumulated[L]+=I}decreaseAccomplishedLiveByOne(n,r){this.accomplished.totalLive>0&&(this.accomplished.totalLive-=r),this.accomplished.totalsLiveTrendLive.sections[n-1]>0&&(this.accomplished.totalsLiveTrendLive.sections[n-1]-=r,this.decreaseTotalsLiveTrendLiveAccumulatedByOne(this.accomplished.totalsLiveTrendLive,n,r))}decreaseReceivedLiveByOne(n,r){this.received.totalLive>0&&(this.received.totalLive-=r),this.received.totalsLiveTrendLive.sections[n-1]>0&&(this.received.totalsLiveTrendLive.sections[n-1]-=r,this.decreaseTotalsLiveTrendLiveAccumulatedByOne(this.received.totalsLiveTrendLive,n,r))}decreaseTotalsLiveTrendLiveAccumulatedByOne(n,r,I){for(let L=n.accumulated.length-1;L>=r-1;L--)n.accumulated[L]-=I}calculateAvg(n){n&&(this.accomplished.avgPostGame=this.accomplished.totalPostGame/n,this.received.avgPostGame=this.received.totalPostGame/n,this.accomplished.avgPostGameTrendLive.sections=this.getAvgPostGameTrendLiveAvg(this.accomplished.avgPostGameTrendLive.sections,n),this.accomplished.avgPostGameTrendLive.accumulated=this.getAvgPostGameTrendLiveAvg(this.accomplished.avgPostGameTrendLive.accumulated,n),this.received.avgPostGameTrendLive.sections=this.getAvgPostGameTrendLiveAvg(this.received.avgPostGameTrendLive.sections,n),this.received.avgPostGameTrendLive.accumulated=this.getAvgPostGameTrendLiveAvg(this.received.avgPostGameTrendLive.accumulated,n))}getAvgPostGameTrendLiveAvg(n,r){return n.map(I=>I/r)}calculateRanking(n,r,I,L,d,g,a,b){let m=[];L===3&&n&&n.length&&(I.playingAs.length!==2||I.matchResult.length!==3)?m=Array.from(n.reduce((v,_)=>{const c=_[r.playingAs]===1,s=c?"1":"2",o=v.get(_[r.gameId]);if(o)o[s]?o[s].arrayPlays.push(_):o[s]={numberTeamId:_[r.teamId],arrayPlays:[_]};else{const l={numberMatchResult:_[r.matchResult]};c&&(l[1]={numberTeamId:_[r.teamId],arrayPlays:[_]}),v.set(_[r.gameId],l)}return v},new Map).values()).reduce((v,_)=>{const c=I.playingAs.length===2?"both":I.playingAs[0].toString();return(c==="both"&&(_[1].numberTeamId===I.teamId||_[2].numberTeamId===I.teamId)||c!=="both"&&_[c].numberTeamId===I.teamId)&&I.matchResult.includes(_.numberMatchResult)&&v.push(..._[1].arrayPlays,..._[2].arrayPlays),v},[]).filter(v=>I.sections.includes(v[r.section])):(m=n?[...n]:[],a&&n&&(m=n.filter(i=>I.playingAs.includes(i[r.playingAs])&&I.matchResult.includes(i[r.matchResult])&&I.sections.includes(i[r.section])))),this.setTeamRanking(m,L,r,I.teamId,g,"accomplished",b)}setTeamRanking(n,r,I,L,d,g,a){let b=null,m=null;r===3&&(b=new Map,m={},n.forEach(_=>{const c=b.get(_[I.gameId]);c?c[_[I.teamId.toString()]]?c[_[I.teamId.toString()]]+=_[I.total]:c[_[I.teamId.toString()]]=_[I.total]:b.set(_[I.gameId],{[_[I.teamId.toString()]]:_[I.total]})}),Array.from(b.values()).forEach(_=>{const[c,s]=Object.keys(_).map(l=>l),o=_[c]+_[s];this.addPassesAvgByTeam(m,c,o?_[c]/o:0),this.addPassesAvgByTeam(m,s,o?_[s]/o:0)}));const i=d.sort((_,c)=>_.team_id-c.team_id).map(_=>{if(r===3){const c=m[_.team_id.toString()];return{teamId:_.team_id,points:c?c.numberTotalPassesAvg/c.numberGamesCount:0,total:c?c.numberTotalPassesAvg:0}}else{const c=n.reduce((s,o)=>o[I.teamId]===_.team_id&&r===o[I.categoryId]?s+o[I.total]:s,0);return{teamId:_.team_id,points:_[`${a}FilterGames`]?c/_[`${a}FilterGames`]:0,total:c}}}).sort((_,c)=>c.points-_.points);this.accomplished.arrayRankings=i;const v=i.findIndex(_=>_.teamId===L);r===3&&(this.accomplished.avgPreGame=i[v].points),this[g].ranking=v+1,this[g].leader=i[0]}addPassesAvgByTeam(n,r,I){n[r]?(n[r].numberGamesCount+=1,n[r].numberTotalPassesAvg+=I):n[r]={numberGamesCount:1,numberTotalPassesAvg:I}}}class po{constructor(n,r,I,L,d,g,a,b,m,i){ll(this,"id","");ll(this,"generalId",0);ll(this,"name","");ll(this,"names",{"0-0":"","1-1":"","0-1":"","1-0":""});ll(this,"mentions",{"0-0":"","1-1":"","0-1":"","1-0":""});ll(this,"accomplishedCategoryIds",[]);ll(this,"receivedCategoryIds",[]);ll(this,"generalCategoriesIds",{accomplished:0,received:0});ll(this,"specialMention","");ll(this,"homeTeam",new z5);ll(this,"visitingTeam",new z5);ll(this,"isLeagueDataCalculated",!1);ll(this,"leagueAccomplishedMax",0);ll(this,"leagueReceivedMax",0);ll(this,"leagueAccomplishedAvg",0);ll(this,"leagueReceivedAvg",0);ll(this,"leagueAccomplishedAccumulator",0);ll(this,"leagueReceivedAccumulator",0);ll(this,"homeTeamType","homeTeam");ll(this,"visitingTeamType","visitingTeam");ll(this,"betOnly",!1);ll(this,"isPercent",!1);this.id=`${I.accomplished}-${I.received}`,this.accomplishedCategoryIds=n||[],this.receivedCategoryIds=r||[],this.generalCategoriesIds=I||{accomplished:0,received:0},this.name=L,this.names["0-0"]=L||"",this.names["1-1"]=d||"",this.names["0-1"]=g||"",this.names["1-0"]=a||"",this.generalId=b||0,this.betOnly=m||!1,this.isPercent=i||!1}addLeaguePlays(n,r,I){n.length===0||!I||this.isLeagueDataCalculated||(n.forEach(L=>{this.isAccomplishedLeaguePlay(L[r.categoryId])&&(this.leagueAccomplishedAccumulator+=L[r.total]),this.isReceivedLeaguePlay(L[r.categoryId])&&(this.leagueReceivedAccumulator+=L[r.total])}),this.leagueAccomplishedAvg=(this.leagueAccomplishedAccumulator/(2*I)).toFixed(2),this.leagueAccomplishedMax=Math.round(this.leagueAccomplishedAvg*1.5),this.leagueReceivedAvg=(this.leagueReceivedAccumulator/(2*I)).toFixed(2),this.leagueReceivedMax=Math.round(this.leagueReceivedAvg*1.5),this.isLeagueDataCalculated=!0)}addSpecialMention(n,r,I){let L="-";for(const[d,g]of Object.entries(this.generalCategoriesIds))n===g&&(L=`${d==="accomplished"?"0":"1"}${L}`),r===g&&(L=`${L}${d==="accomplished"?"0":"1"}`);L.length===3&&(this.mentions[L]=I)}resetMentions(){this.mentions={"0-0":"","1-1":"","0-1":"","1-0":""}}addTeamPlays(n,r,I,L,d){!I||!d||n!==this.homeTeamType&&n!==this.visitingTeamType||(I.forEach(g=>{this.isAccomplishedPlay(g[L.categoryId])?this[n].increaseAccomplishedByOne(g[L.section],g[L.total]):this.isReceivedPlay(g[L.categoryId])&&this[n].increaseReceivedByOne(g[L.section],g[L.total])}),this[n].calculateAvg(d))}addLivePlay(n,r,I,L,d=!1,g=!1){(n===this.homeTeamType||n===this.visitingTeamType)&&I[L.categoryId].includes(this.generalCategoriesIds.accomplished)&&this[n].increaseAccomplishedByOne(I[L.section],I[L.total],!0)}subtractLivePlay(n,r,I,L,d){(n===this.homeTeamType||n===this.visitingTeamType)&&(this.isAccomplishedPlay(I[L.categoryId])&&!d?this[n].decreaseAccomplishedLiveByOne(I[L.section],I[L.total]):this.isReceivedPlay(I[L.categoryId])&&d&&this[n].decreaseReceivedLiveByOne(I[L.section],I[L.total]))}isAccomplishedLeaguePlay(n){return!!(this.receivedCategoryIds[0]===40?this.receivedCategoryIds:this.accomplishedCategoryIds).find(I=>n===I||`${n}_r`===I)}isReceivedLeaguePlay(n){return!!this.receivedCategoryIds.find(r=>n===r)}isAccomplishedPlay(n){return this.generalCategoriesIds.accomplished===n}isReceivedPlay(n){return this.generalCategoriesIds.received===n}calcRankingLeague(n,r,I,L,d,g=!1){this[this.homeTeamType].calculateRanking(n,r,I,this.generalCategoriesIds.accomplished,this.generalCategoriesIds.received,d,g,this.homeTeamType),this[this.visitingTeamType].calculateRanking(n,r,L,this.generalCategoriesIds.accomplished,this.generalCategoriesIds.received,d,g,this.visitingTeamType)}resetData(){this.homeTeam=new z5,this.visitingTeam=new z5,this.isLeagueDataCalculated=!1,this.leagueAccomplishedMax=0,this.leagueReceivedMax=0,this.leagueAccomplishedAvg=0,this.leagueReceivedAvg=0,this.leagueAccomplishedAccumulator=0,this.leagueReceivedAccumulator=0}isInGeneralCategory(n){return this.generalCategoriesIds.accomplished===n||this.generalCategoriesIds.received===n}}const Jda={general:{name:"General",priority:1,parentInfo:{parentAnalysis:[1],analysisTypeBlocks:[1]},subcategories:{goals:new po([12,55,"35_r","54_r"],null,{accomplished:1,received:0},"Goles","Goles recibidos","Goles realizados / recibidos","Goles recibidos / realizados",1),shotToGoal:new po([91,95,158,167,176,343,330,333,423],null,{accomplished:2,received:0},"Remates a destino","","","",1),possession:new po([2,3,20,21],null,{accomplished:3,received:0},"Posesión","","","",1,!1,!0),yellowCards:new po([14,52],null,{accomplished:4,received:0},"Tarjetas amarillas","","","",1),redCards:new po([15,53],null,{accomplished:5,received:0},"Tarjetas rojas","","","",1),centerCrosses:new po([13,25],null,{accomplished:6,received:0},"Centros totales","","","",1)}},offensive:{name:"Ofensivo",priority:2,parentInfo:{parentAnalysis:[1],analysisTypeBlocks:[1]},subcategories:{shotsOnGoal:new po([19],null,{accomplished:7,received:0},"Tiros a gol","","","",1),shotsOnGoalDestination:new po([91,95],null,{accomplished:8,received:0},"Tiros a gol destino","","","",1),shotToGoal:new po([91,95,158,167,176,343,330,333,423],null,{accomplished:2,received:0},"Remates a destino","","","",1),ballsWonOpponentPenaltyBox:new po([11],null,{accomplished:10,received:0},"Balones ganados área rival","","","",1),centersFromRight:new po([25],null,{accomplished:11,received:0},"Centros por derecha","","","",1),centersFromLeft:new po([13],null,{accomplished:12,received:0},"Centros por izquierda","","","",1),success1VS1:new po([4],null,{accomplished:13,received:0},"Enfrentamientos ofensivos exitosos","","","",1),unsuccess1VS1:new po([209],null,{accomplished:14,received:0},"Enfrentamientos ofensivos no exitosos","","","",1)}},defensive:{name:"Defensivo",priority:3,parentInfo:{parentAnalysis:[1],analysisTypeBlocks:[1]},subcategories:{saves:new po([39],null,{accomplished:15,received:0},"Atajadas","","","",1),ballsWonOwnPenaltyBox:new po([23],null,{accomplished:16,received:0},"Balones ganados área propia","","","",1),success1VS1:new po([5],null,{accomplished:17,received:0},"Enfrentamientos defensivos exitosos","","","",1),unsuccess1VS1:new po([209],null,{accomplished:18,received:0},"Enfrentamientos defensivos no exitosos","","","",1),aerialGame:new po([24],null,{accomplished:19,received:0},"Juego aéreo resto del campo","","","",1),clearances:new po([34],null,{accomplished:20,received:0},"Rechaces","","","",1)}},possession:{name:"Posesión",priority:4,parentInfo:{parentAnalysis:[1],analysisTypeBlocks:[1]},subcategories:{totalPasses:new po([2,3,20,21],null,{accomplished:21,received:0},"Pases totales","","","",1),successPasses:new po([2,20],null,{accomplished:22,received:0},"Pases acertados","","","",1),successPassesRivalHalf:new po([20],null,{accomplished:23,received:0},"Pases acertados en cancha rival","","","",1),ballsRecoveredInChallenge:new po([483],null,{accomplished:24,received:0},"Balones recuperados en disputa","","","",1),ballsRecoveredWithoutChallenge:new po([484],null,{accomplished:25,received:0},"Balones recuperados sin disputa","","","",1),ballsLostInChallenge:new po([494],null,{accomplished:26,received:0},"Balones perdidos en disputa","","","",1),ballsLostWithoutChallenge:new po([495],null,{accomplished:27,received:0},"Balones perdidos sin disputa","","","",1)}},stoppedBall:{name:"Balón parado",priority:5,parentInfo:{parentAnalysis:[1],analysisTypeBlocks:[1]},subcategories:{freeKick44:new po([155,164,173,362,371,380],null,{accomplished:28,received:0},"Tiros libres 4/4","","","",1),freeKick34:new po([150,357],null,{accomplished:29,received:0},"Tiros libres 3/4","","","",1),freeKickOwnHalf:new po([149,356],null,{accomplished:30,received:0},"Tiros libres cancha propia","","","",1),cornerFromRight:new po([32],null,{accomplished:31,received:0},"Tiros de esquina por derecha","","","",1),cornerFromLeft:new po([31],null,{accomplished:32,received:0},"Tiros de esquina por izquierda","","","",1),goalKick:new po([264,28],null,{accomplished:33,received:0},"Saques de meta","","","",1)}},penalties:{name:"Infracciones",priority:6,parentInfo:{parentAnalysis:[1],analysisTypeBlocks:[1]},subcategories:{totalFouls:new po([17,50],null,{accomplished:34,received:0},"Faltas totales","","","",1),foulOwnGoal:new po([348,478],null,{accomplished:35,received:0},"Faltas cerca de su propia portería","","","",1),fieldFouls:new po([349,350,479,480],null,{accomplished:36,received:0},"Faltas resto del campo","","","",1),penaltyKick:new po([461,481],null,{accomplished:37,received:0},"Penales cometidos","","","",1),offside:new po([33],null,{accomplished:38,received:0},"Fueras de lugar","","","",1)}}},Xda=[{parentAnalysis:[1,2,3],value:0,text:"Realizado",block:1},{parentAnalysis:[1,2,3],value:1,text:"Recibido",block:1},{parentAnalysis:[1],value:0,text:"Posesión",block:2},{parentAnalysis:[1,2],value:0,text:"Origen de gol realizado",block:3},{parentAnalysis:[1,2],value:1,text:"Origen de gol recibido",block:3}],Kda=["teamId","categoryId","matchlapse","section","matchResult","playingAs","total","gameId"];let NE=null;function Qda(){return NE||(NE=z0(Kda)),NE}const eua=["playId","gameId","teamId","playerId","momentOfPlay","categoryId","categoryType","matchLapse","section","matchResult","playingAs","total","coordinate1X","coordinate1Y","coordinate2X","coordinate2Y","coordinate3X","coordinate3Y"];let BE=null;function tua(){return BE||(BE=z0(eua)),BE}function L5(e,n,r){return[r.get(e[n.categoryId])||[],e[n.teamId],e[n.matchResult],e[n.playingAs],e[n.matchLapse],e[n.section],e[n.total]]}function MJ(e){return[[1,1,e.local.win],[1,2,e.local.lose],[1,3,e.local.draw],[2,1,e.visit.win],[2,2,e.visit.lose],[2,3,e.visit.draw]]}function OE(e,n,r){let I=[...n];return e[r.categoryId]===2&&(I[0]=14),e[r.categoryId]===20&&(I[0]=15),[14,15].includes(I[0])?I:null}const aua=wP(),nua=[{name:"Liga MX",id:1},{name:"Liga MX Femenil",id:1001},{name:"Liga Expansión MX",id:1071}],rua={nextGeneral:{namespaced:!0,state:{seasonId:0,pastSeasonId:0,usePastSeasonId:!1,isSocketConnected:!1,indexesLP:EJ(),indexesTSP:Zda(),indexesLS:Qda(),indexesTLP:tua(),nextGamesDataStructure:Jda,currentSeasonGames:[],currentSeasonTeams:[],gameForAnalysis:{},showPostMatch:!1,homeResultGame:null,awayResultGame:null,selectedAnalysis:{},selectedStatisticTypeBlock:1,gameId:null,game:{},games:[],homeTeamPlays:[],visitingTeamPlays:[],currentSeasonPlays:[],livePlays:new Map,totalSeasonFinishedGames:0,totalHomeTeamFinishedGames:0,totalVisitingTeamFinishedGames:0,homeGames:[],homeTeamInfo:{},awayTeamInfo:{},visitingGames:[],idAssetSelected:1,isLive:!1,menuOptionActive:"",showLiveData:!1,showAdvanceFilter:!1,homeTeamFilter:{teamId:0,statistics:0,playingAs:[],matchResult:[],sections:[],requiresPlaysFiltering:!0},visitingTeamFilter:{teamId:0,statistics:0,playingAs:[],matchResult:[],sections:[],requiresPlaysFiltering:!0},oldSeasonId:0,statistics:[],isRankingCalculating:!0,categoriesMap:new Map,defaultFilter:null,filterAux:null,betSubcategories:[],betDescription:{},regularSeasonName:"",betSubcategoriesObjects:[],currentTournamentName:"",toBackRouteName:"home"},getters:{betSubcategoriesIds(e){return e.betSubcategories.map(n=>n.id)},showPostMatchData:e=>e.showPostMatch,getHomeResultGame:e=>e.homeResultGame,getAwayResultGame:e=>e.awayResultGame,getSeasonId:e=>e.seasonId,getGameForAnalysis:e=>e.gameForAnalysis,isLive:e=>e.isLive,showLive:e=>e.gameForAnalysis.game_status===4&&e.gameForAnalysis.is_live,menuOptionActive:e=>e.menuOptionActive,showLiveData:e=>e.showLiveData,showAdvanceFilter:e=>e.showAdvanceFilter,idAssetSelected:e=>e.idAssetSelected,gameId:e=>e.gameId,game:e=>e.game,homeTeam(e){return e.homeTeamInfo},visitingTeam(e){return e.awayTeamInfo},rankingData(e){return e.statistics},homeTeamStatisticsType(e){return e.homeTeamFilter.statistics?"received":"accomplished"},visitingTeamStatisticsType(e){return e.visitingTeamFilter.statistics?"received":"accomplished"},subcategoryName(e){return`${e.homeTeamFilter.statistics}-${e.visitingTeamFilter.statistics}`},statisticsTypes(e){return Xda.filter(n=>n.parentAnalysis.includes(e.selectedAnalysis.id))},homeTeamFilteredPlays(e){if(e.homeTeamFilter.requiresPlaysFiltering)return TJ(e.homeTeamPlays,e.homeTeamFilter.playingAs,e.homeTeamFilter.matchResult,e.homeTeamFilter.sections,e.indexesTSP)},visitingTeamFilteredPlays(e){if(e.visitingTeamFilter.requiresPlaysFiltering)return TJ(e.visitingTeamPlays,e.visitingTeamFilter.playingAs,e.visitingTeamFilter.matchResult,e.visitingTeamFilter.sections,e.indexesTSP)},currentSeasonTeamsIds(e){return e.currentSeasonTeams.map(n=>n.team_id)},canFilledStructure(e){return e.homeTeamFilter.requiresPlaysFiltering||e.visitingTeamFilter.requiresPlaysFiltering},totalFilteredHomeGames(e){return e.homeGames.filter(n=>e.homeTeamFilter.playingAs.includes(n[0])).filter(n=>e.homeTeamFilter.matchResult.includes(n[1])).reduce((n,r)=>n+r[2],0)},totalFilteredVisitingGames(e){return e.visitingGames.filter(n=>e.visitingTeamFilter.playingAs.includes(n[0])).filter(n=>e.visitingTeamFilter.matchResult.includes(n[1])).reduce((n,r)=>n+r[2],0)},filledDataStructure(e,n){if(e.currentSeasonPlays)for(const r of Object.values(e.nextGamesDataStructure))for(const I of Object.values(r.subcategories))e.homeTeamFilter.requiresPlaysFiltering&&I.homeTeam.resetTotals(),e.visitingTeamFilter.requiresPlaysFiltering&&I.visitingTeam.resetTotals(),I.addLeaguePlays(e.currentSeasonPlays,e.indexesLP,e.totalSeasonFinishedGames),I.addTeamPlays(I.homeTeamType,e.gameForAnalysis.home_team,n.homeTeamFilteredPlays,e.indexesTSP,e.showPostMatch?1:n.totalFilteredHomeGames),I.addTeamPlays(I.visitingTeamType,e.gameForAnalysis.visiting_team,n.visitingTeamFilteredPlays,e.indexesTSP,e.showPostMatch?1:n.totalFilteredVisitingGames);return e.nextGamesDataStructure},arrayFilledDataSortedByPriority(e,n){return Object.values(n.filledDataStructure).sort((r,I)=>r.priority-I.priority)},statisticData(e,n){for(const r of Object.values(n.filledDataStructure))if(r.parentInfo.parentAnalysis.includes(e.selectedAnalysis.id)&&r.parentInfo.analysisTypeBlocks.includes(e.selectedStatisticTypeBlock))return r.subcategories;return{}},accomplished(e){return e.homeTeamFilter.statistics===0}},mutations:{setCurrentTournamentName(e,n){e.currentTournamentName=n},setBetSubcategoriesObjects(e,n){e.betSubcategoriesObjects=n},setRegularSeasonName(e,n){e.regularSeasonName=n},setBetSubcategories(e,n){e.betSubcategories=n},setBetDescription(e,n){e.betDescription=n},setSeasonId(e,n){e.seasonId=Number(n)},setHome(e,n){e.homeTeamInfo=n},setAway(e,n){e.awayTeamInfo=n},setMenuOptionActive(e,n){e.menuOptionActive=n},setPastSeasonId(e,n){e.pastSeasonId=n},setUsePastSeasonId(e,n){e.usePastSeasonId=n,n&&(e.oldSeasonId=e.pastSeasonId)},updateShowPostMatchData(e,n){e.showPostMatch=n},setHomeResultGame(e,n){e.homeResultGame=n},setAwayResultGame(e,n){e.awayResultGame=n},updateIsSocketConnected(e,n){e.isSocketConnected=n,n&&e.gameForAnalysis.is_live&&rie(`game.${e.gameForAnalysis.game_id}.v2`)},updateCurrentSeasonTeams(e,n){e.currentSeasonTeams=n,e.currentSeasonTeams.forEach(r=>{r.playedGames=e.currentSeasonGames.reduce((I,L)=>{if(L.game_status===1&&(L.home_team===r.team_id||L.visiting_team===r.team_id)){const d=L.score[0]-L.score[1],g=L.home_team===r.team_id;I.push({playingAs:g?1:2,matchResult:d===0?3:g?d>0?1:2:d<0?1:2})}return I},[])})},updateCurrentSeasonGames(e,n){e.currentSeasonGames=n},updateGameId(e,n){e.gameId=n},updateGameForAnalysis(e,n){e.gameForAnalysis=n,e.isLive=!!n.is_live,e.homeTeamFilter.teamId=e.gameForAnalysis.home_team,e.visitingTeamFilter.teamId=e.gameForAnalysis.visiting_team},updateSelectedAnalysis(e,n){e.selectedAnalysis=n},updateShowLiveData(e,n){e.showLiveData=n},toggleShowLiveData(e){e.showLiveData=!e.showLiveData},toggleAdvanceFilter(e){e.showAdvanceFilter=!e.showAdvanceFilter},updateIdAssetSelected(e,n){e.idAssetSelected=n},updateStats(e,n){e.currentSeasonPlays=n},updateFilterAux(e){e.filterAux||(e.filterAux={homeTeamFilter:{...e.homeTeamFilter},visitingTeamFilter:{...e.visitingTeamFilter}})},updateFilters(e,{filters:n,needsFormat:r=!1}){if(r){if(!n||!n.local||!n.local.statistics||!n.visit||!n.visit.statistics)return;e.homeTeamFilter=EP(e.homeTeamFilter,n.local,e.gameForAnalysis.home_team),e.visitingTeamFilter=EP(e.visitingTeamFilter,n.visit,e.gameForAnalysis.visiting_team),e.selectedStatisticTypeBlock!==n.local.statistics.block&&(e.selectedStatisticTypeBlock=n.local.statistics.block)}else e.homeTeamFilter={...n.homeTeamFilter,statistics:0},e.visitingTeamFilter={...n.visitingTeamFilter,statistics:0}},updateFinishedGames(e,n){e.totalSeasonFinishedGames=n},updateHomeTeamPlays(e,n){e.homeTeamPlays=n},updateVisitingTeamPlays(e,n){e.visitingTeamPlays=n},addSpecialMentions(e,n){const r=Object.values(e.nextGamesDataStructure);r.forEach(I=>{for(const L of Object.values(I.subcategories))L.resetMentions()}),r.forEach(I=>{for(const L of n)for(const d of Object.values(I.subcategories))d.addSpecialMention(L[0],L[1],L[2])})},setDefaultFilter(e,n){e.defaultFilter={homeTeamFilter:{...n.homeTeamFilter,teamId:e.gameForAnalysis.home_team},visitingTeamFilter:{...n.awayTeamFilter,teamId:e.gameForAnalysis.visiting_team}}},addLiveGamePlay(e,n){if(!e.livePlays.has(n[e.indexesTLP.playId])){e.livePlays.set(n[e.indexesTLP.playId],n);const I=L5(n,e.indexesTLP,e.categoriesMap);for(const L of Object.values(e.nextGamesDataStructure))for(const d of Object.values(L.subcategories))d.addLivePlay(e.gameForAnalysis.home_team===I[e.indexesTSP.teamId]?"homeTeam":"visitingTeam",I[e.indexesTSP.teamId],I,e.indexesTSP,e.isLive,!1)}},updateLiveGamePlay(e,n){const r=!!n[e.indexesTLP.length],I=e.livePlays.get(n[e.indexesTLP.playId]);if(eoe(I,n))return;let L="";const d=e.gameForAnalysis.home_team===n[e.indexesTLP.teamId]?"homeTeam":"visitingTeam";I&&(L=e.gameForAnalysis.home_team===I[e.indexesTLP.teamId]?"homeTeam":"visitingTeam");const g=L5(I,e.indexesTLP,e.categoriesMap),a=OE(I,g,e.indexesTLP),b=L5(n,e.indexesTLP,e.categoriesMap),m=OE(n,b,e.indexesTLP);for(const i of Object.values(e.nextGamesDataStructure))for(const v of Object.values(i.subcategories))I&&(v.subtractLivePlay(L,g[e.indexesTSP.teamId],g,e.indexesTSP,r),a&&v.subtractLivePlay(L,a[e.indexesTSP.teamId],a,e.indexesTSP,r)),v.addLivePlay(d,b[e.indexesTSP.teamId],b,e.indexesTSP,e.isLive,r),m&&v.addLivePlay(d,m[e.indexesTSP.teamId],m,e.indexesTSP,e.isLive,r);e.livePlays.set(n[e.indexesTLP.playId],n)},deleteLiveGamePlay(e,n){const r=!!n[e.indexesTLP.length],I=e.livePlays.get(n[e.indexesTLP.playId]);let L="";if(I){L=e.gameForAnalysis.home_team===I[e.indexesTLP.teamId]?"homeTeam":"visitingTeam",e.livePlays.delete(I[e.indexesTLP.playId]);const d=L5(I,e.indexesTLP,e.categoriesMap),g=OE(n,d,e.indexesTLP);for(const a of Object.values(e.nextGamesDataStructure))for(const b of Object.values(a.subcategories))b.subtractLivePlay(L,d[e.indexesTSP.teamId],d,e.indexesTSP,r),g&&b.subtractLivePlay(L,g[e.indexesTSP.teamId],g,e.indexesTSP,r)}},clearLiveTotals(e){for(const n of Object.values(e.nextGamesDataStructure))for(const r of Object.values(n.subcategories))r.homeTeam.resetTotalsLive(),r.visitingTeam.resetTotalsLive()},updateSeasonStatistics(e,n){e.statistics=n},updateOldSeasonId(e,n){e.oldSeasonId=n},addRankingInSubcategories(e,{getters:n,isPremiumAccount:r}){if(!(e.homeTeamFilter.teamId&&e.visitingTeamFilter.teamId))return;e.isRankingCalculating=!1,e.currentSeasonTeams.forEach(d=>{d.homeTeamFilterGames=d.playedGames.filter(g=>e.homeTeamFilter.playingAs.includes(g.playingAs)&&e.homeTeamFilter.matchResult.includes(g.matchResult)).length,d.visitingTeamFilterGames=d.playedGames.filter(g=>e.visitingTeamFilter.playingAs.includes(g.playingAs)&&e.visitingTeamFilter.matchResult.includes(g.matchResult)).length});const I=[],L=new Map;for(const d of Object.values(e.nextGamesDataStructure))for(const g of Object.values(d.subcategories))I.push(g);n.rankingData.forEach(d=>{for(const g of I)if(g.isInGeneralCategory(d[e.indexesLS.categoryId])){L.has(g.id)?L.get(g.id).push(d):L.set(g.id,[d]);break}})},prepareCleanAllStatistics(e){e.homeTeamFilter.requiresPlaysFiltering=!0,e.visitingTeamFilter.requiresPlaysFiltering=!0},setHomeGames(e,n){e.homeGames=MJ(n)},setVisitingGames(e,n){e.visitingGames=MJ(n)},generateCategoriesMap(e){for(const n of Object.values(e.nextGamesDataStructure))for(const r of Object.values(n.subcategories))r.accomplishedCategoryIds.forEach(I=>{const L=e.categoriesMap.get(I);L?L.push(r.generalCategoriesIds.accomplished):e.categoriesMap.set(I,[r.generalCategoriesIds.accomplished])})},resetNextGamesDataStructure(e){for(const n of Object.values(e.nextGamesDataStructure))for(const r of Object.values(n.subcategories))r.resetData()}},actions:{turnOnOffDefaultFilters({state:e,commit:n},{command:r}){r==="on"?n("updateFilters",{filters:e.defaultFilter,needsFormat:!1}):n("updateFilters",{filters:e.filterAux,needsFormat:!1})},async setAndGetStatsPostMatch({commit:e},n){try{const g=await Gda({gameId:n.gameId});if(g){var r=[],I=[],L={season:0,total:0,visit:{total:0,draw:0,win:0,lose:0},played:0,local:{total:0,draw:0,win:0,lose:0}},d={season:0,total:0,visit:{total:0,draw:0,win:0,lose:0},played:0,local:{total:0,draw:0,win:0,lose:0}};Object.keys(g.data).length!==0&&(r=g.data.data.filter(a=>a[1]==n.homeTeam),I=g.data.data.filter(a=>a[1]==n.awayTeam),L=g.data.games,d=g.data.games),e("updateHomeTeamPlays",r),e("updateVisitingTeamPlays",I),e("setHomeGames",L),e("setVisitingGames",d)}else e("updateHomeTeamPlays",[]),e("updateVisitingTeamPlays",[])}catch(g){return Promise.reject(g)}},async fillStatisticDataPostMatch({commit:e,dispatch:n},r){e("prepareCleanAllStatistics"),e("updateHomeTeamPlays",[]),e("updateVisitingTeamPlays",[]),e("setIsSectionLoading",!0,{root:!0});try{let I=[];e("updateGameForAnalysis",r.gameInfo),I.push(n("setAndGetStatsPostMatch",{gameId:r.game,homeTeam:r.homeTeam,awayTeam:r.awayTeam})),await Promise.all(I)}catch(I){throw new Error(I)}finally{e("setIsSectionLoading",!1,{root:!0})}},async checkState({state:e,dispatch:n,commit:r},{gameId:I,isTeamsAnalysis:L,currentSeasonId:d,isLoginChanged:g=!1,defaultFilter:a=null,gameInfo:b=null,isCupGame:m=!1}){try{let i={},v=e.seasonId!==Number(d);const _=[];r("setIsSectionLoading",!0,{root:!0}),r("setUsePastSeasonId",!1),v&&r("setSeasonId",d),r("updateGameId",Number(I)),e.oldSeasonId!==e.seasonId&&r("resetNextGamesDataStructure");const c=await n("getCurrentSeasonGames",Number(I));if(r("leagueGeneral/updateCurrentSeasonGames",c,{root:!0}),i=c.find(s=>s.game_id===Number(I)),!i&&b&&(i=b),i&&r("updateGameForAnalysis",i),i.game_status!==1&&((g||e.categoriesMap.size===0)&&r("generateCategoriesMap"),m||await n("checkTeamsData",{gameId:I,isFromBet:!!a}),(g||e.oldSeasonId!==e.seasonId||e.statistics.length===0)&&_.push(n("getSeasonStatistics"))),e.usePastSeasonId){const s=await n("getCurrentSeasonGamesLast");r("leagueGeneral/updateCurrentSeasonGames",s,{root:!0})}(g||e.currentSeasonTeams.length===0||!e.currentSeasonTeams.find(s=>i.home_team===s.team_id))&&_.push(n("getCurrentSeasonTeams")),r("setHomeResultGame",i.score[0]),r("setAwayResultGame",i.score[1]),L?i.game_status!==1?(await n("fillStatisticData",{gameId:I,gameinfo:i,promises:_,defaultFilter:a}),r("updateShowPostMatchData",!1)):(r("updateStats",[]),r("updateShowPostMatchData",!0),_.push(n("fillStatisticDataPostMatch",{game:I,homeTeam:i.home_team,awayTeam:i.visiting_team,gameInfo:i})),await Promise.all(_)):r("setIsSectionLoading",!1,{root:!0})}catch(i){return Promise.reject(i)}},async fillStatisticData({commit:e,dispatch:n,getters:r,rootGetters:I,state:L},{gameId:d,gameinfo:g,promises:a=[],defaultFilter:b=null}){let m=null;try{e("setIsSectionLoading",!0,{root:!0}),e("prepareCleanAllStatistics"),e("updateHomeTeamPlays",[]),e("updateVisitingTeamPlays",[]),e("updateGameForAnalysis",g),g.is_live&&a.push(n("getCurrentLiveGamePlays",d)),a.push(n("getSpecialMentionsByGame",d)),a.push(n("getHomeTeamPlays")),a.push(n("getVisitingTeamPlays")),a.push(n("getCurrentSeasonPlays")),b&&a.push(qda(b)),m=await Promise.all(a)}catch(i){throw new Error(i)}finally{setTimeout(()=>{if(e("addRankingInSubcategories",{getters:r,isPremiumAccount:I["loginGeneral/getPremiumAccount"]}),b){const[i]=m.pop();i&&(e("setBetSubcategories",i.categories),e("setBetDescription",i.sectionDescription),e("setDefaultFilter",i.params),e("updateFilterAux"),e("updateFilters",{filters:L.defaultFilter,needsFormat:!1}),n("updateRankingInSubcategories"))}},100),e("setIsSectionLoading",!1,{root:!0})}},async checkTeamsData({state:e,dispatch:n,rootState:r,commit:I},{gameId:L,isFromBet:d}){try{I("setUsePastSeasonId",!1)}catch(g){throw new Error(g)}},async getSpecialMentionsByGame({commit:e},n){try{const r=await $da({gameId:n});e("addSpecialMentions",r)}catch(r){return Promise.reject(r)}},async getCurrentSeasonGames({commit:e,state:n},r){try{const{teams:I,games:L,past_season_id:d,tournament_id:g}=await Vda({seasonId:n.usePastSeasonId?n.pastSeasonId:n.seasonId,gameId:r}),a=nua.find(b=>b.id===g);return a&&e("setCurrentTournamentName",a.name),e("setHome",I[0]),e("setAway",I[1]),n.usePastSeasonId||e("setPastSeasonId",d),await e("updateCurrentSeasonGames",L),L&&Array.isArray(L)&&e("updateFinishedGames",L.reduce((b,m)=>(m.game_status===1&&(b+=1),b),0)),L}catch(I){return Promise.reject(I)}},async getCurrentSeasonGamesLast({commit:e,state:n}){try{const{games:r,past_season_id:I}=await SJ({seasonId:n.usePastSeasonId?n.pastSeasonId:n.seasonId});return n.usePastSeasonId||e("setPastSeasonId",I),await e("updateCurrentSeasonGames",r),r&&Array.isArray(r)&&e("updateFinishedGames",r.reduce((L,d)=>(d.game_status===1&&(L+=1),L),0)),r}catch(r){return Promise.reject(r)}},async getCurrentSeasonTeams({commit:e,state:n}){try{const r=await Hda({seasonId:n.usePastSeasonId?n.pastSeasonId:n.seasonId});e("updateCurrentSeasonTeams",r.data.teams)}catch{}},async getSeasonStatistics({commit:e,state:n}){try{const r=n.usePastSeasonId?n.pastSeasonId:n.seasonId,I=await Fda({seasonId:r});e("updateSeasonStatistics",I),e("updateOldSeasonId",r)}catch(r){return Promise.reject(r)}},updateRankingInSubcategories({state:e,commit:n,getters:r,rootGetters:I}){e.currentSeasonGames.length>0&&n("addRankingInSubcategories",{getters:r,isPremiumAccount:I["loginGeneral/getPremiumAccount"]})},async getHomeTeamPlays({commit:e,state:n}){try{const r=await AJ({seasonId:n.usePastSeasonId?n.pastSeasonId:n.seasonId,teamId:n.gameForAnalysis.home_team});r.data&&(e("updateHomeTeamPlays",r.data.data),e("setHomeGames",r.data.games))}catch(r){return Promise.reject(r)}},async getVisitingTeamPlays({commit:e,state:n}){try{const r=await AJ({seasonId:n.usePastSeasonId?n.pastSeasonId:n.seasonId,teamId:n.gameForAnalysis.visiting_team});r.data&&(e("updateVisitingTeamPlays",r.data.data),e("setVisitingGames",r.data.games))}catch(r){return Promise.reject(r)}},async getCurrentSeasonPlays({commit:e,state:n}){try{const r=await Lda({seasonId:n.usePastSeasonId?n.pastSeasonId:n.seasonId});e("updateStats",r)}catch(r){return Promise.reject(new Error(r))}},async getCurrentLiveGamePlays({state:e,commit:n},r){try{const I=await Rda({gameId:r});e.livePlays=new Map,I.forEach(L=>{e.gameForAnalysis.game_id===L[e.indexesTLP.gameId]&&(e.gameForAnalysis.home_team===L[e.indexesTLP.teamId]||e.gameForAnalysis.visiting_team===L[e.indexesTLP.teamId])&&n("addLiveGamePlay",L)})}catch(I){throw new Error(I)}},socket_new({state:e,commit:n},r){const I=r[1];(e.gameForAnalysis.home_team===I[e.indexesTLP.teamId]||e.gameForAnalysis.visiting_team===I[e.indexesTLP.teamId])&&n("addLiveGamePlay",I)},socket_update({state:e,commit:n},r){const I=r[1];e.gameForAnalysis.game_id===I[e.indexesTLP.gameId]&&(e.gameForAnalysis.home_team===I[e.indexesTLP.teamId]||e.gameForAnalysis.visitingTeam===I[e.indexesTLP.teamId])&&n("updateLiveGamePlay",I)},socket_delete({state:e,commit:n},r){const I=r[1];e.gameForAnalysis.game_id===I[e.indexesTLP.gameId]&&(e.gameForAnalysis.home_team===I[e.indexesTLP.teamId]||e.gameForAnalysis.visiting_team===I[e.indexesTLP.teamId])&&n("deleteLiveGamePlay",I)},exitChannel({state:e,getters:n,rootState:r,rootGetters:I,commit:L}){const d=I["loginGeneral/getPremiumAccount"];n.isLive&&d&&(L("updateShowLiveData",!1),L("clearLiveTotals"),e.livePlays.clear(),aua.emit("unsubscribe",{channel:`game.${e.gameForAnalysis.game_id}.v2`}))},cleanStats({state:e}){for(const r of Object.values(e.nextGamesDataStructure))for(const I of Object.values(r.subcategories))I.homeTeam.resetTotals(),I.visitingTeam.resetTotals(),I.homeTeam.resetTotalsLive(),I.visitingTeam.resetTotalsLive(),I.isBetMainSubcategory=!1;Object.values(e.nextGamesDataStructure).forEach(r=>{for(const I of Object.values(r.subcategories))I.resetMentions()}),e.currentSeasonPlays=null,e.homeTeamPlays=[],e.visitingTeamPlays=[],e.homeTeamFilter.requiresPlaysFiltering=!0,e.visitingTeamFilter.requiresPlaysFiltering=!0,e.isRankingCalculating=!0},cleanAllStats({state:e}){for(const r of Object.values(e.nextGamesDataStructure))for(const I of Object.values(r.subcategories))I.homeTeam.resetTotals(),I.visitingTeam.resetTotals(),I.isBetMainSubcategory=!1;Object.values(e.nextGamesDataStructure).forEach(r=>{for(const I of Object.values(r.subcategories))I.resetMentions()}),e.currentSeasonGames=[],e.currentSeasonTeams=[],e.gameForAnalysis={},e.homeTeamPlays=[],e.visitingTeamPlays=[],e.currentSeasonPlays=null,e.totalSeasonFinishedGames=0,e.totalHomeTeamFinishedGames=0,e.totalVisitingTeamFinishedGames=0,e.homeGames=[],e.showPostMatch=!1,e.homeResultGame=null,e.awayResultGame=null,e.visitingGames=[],e.idAssetSelected=1,e.showAdvanceFilter=!1,e.selectedAnalysis={},e.homeTeamFilter={teamId:0,statistics:0,playingAs:[],matchResult:[],sections:[],requiresPlaysFiltering:!0},e.visitingTeamFilter={teamId:0,statistics:0,playingAs:[],matchResult:[],sections:[],requiresPlaysFiltering:!0},e.isRankingCalculating=!0}}}};async function iua(){try{const{data:e}=await gd({url:"https://kefloixzy1.execute-api.us-west-2.amazonaws.com/prod/tournaments"});return e}catch(e){throw new Error(e)}}const oua={gameGlobal:{namespaced:!0,state:{videoSrc:null,isVideoModalVisible:!1,tournaments:[],seccionBetsGolTipster:1,tournamentSelected:{},tournamentType:0,sectionAnalytics:"Banner_Home",previewSectionAnalytics:"",sectionRef:"",booleanIsStatisticModalOpen:!1},getters:{getTournamentType:e=>e.tournamentType,getSectionAnalytics(e){return e.sectionAnalytics},getPreviewSectionAnalytics(e){return e.previewSectionAnalytics},getSeccionBetsGolTipster(e){return e.seccionBetsGolTipster}},mutations:{setBooleanIsStatisticModalOpen(e,n){e.booleanIsStatisticModalOpen=n},setTournamentType(e,n){e.tournamentType=n},setSectionRef(e,n){e.sectionRef=n},setSectionAnalytics(e,n){e.sectionAnalytics=n},setSeccionBetsGolTipster(e,n){e.seccionBetsGolTipster=n},setPreviewSectionAnalytics(e,n){e.previewSectionAnalytics=n},setVideoSrc(e,n){e.videoSrc=n},setVideoModalVisibility(e,n){e.isVideoModalVisible=n},setSelectedTournament(e,n){e.selectedTournament=n},setTournaments(e,n){e.tournaments=n.map(r=>({...r.tournament,seasons:r.seasons})),e.tournamentSelected=e.tournaments[0]},setTournamentSelected(e,n){e.tournamentSelected=n}},actions:{async fetchTournaments({state:e,commit:n}){try{if(e.tournaments.length===0){const r=await iua();n("setTournaments",r)}}catch(r){throw new Error(r)}}}}};async function sua({seasonId:e,localTeamId:n,visitingTeamId:r}){try{const I=`https://bzznnzehtf.execute-api.us-west-2.amazonaws.com/prod/xg/seasons/${e}/teams/${n}/${r}`;return(await gd({url:I})).data}catch(I){return Promise.reject(I)}}async function lua({seasonId:e,localTeamId:n,visitingTeamId:r}){try{const I=`https://bzznnzehtf.execute-api.us-west-2.amazonaws.com/prod/xg/game/${e}/teams/${n}/${r}`;return(await gd({url:I})).data}catch(I){return Promise.reject(I)}}const IJ=(e,n)=>{let r={};return e.forEach((I,L)=>{L==3&&(n[0]==35||n[0]==54)&&(n[L]==2?n[L]=1:n[L]=2),L==2&&(n[0]==35||n[0]==54)&&(n[L]==1?n[L]=2:n[L]==2&&(n[L]=1)),r[I]=n[L]}),r},PJ=(e,n)=>e.filter(I=>{const L=n.playingAs.includes(I.playing_as),d=n.matchResult.includes(I.match_result),g=n.sections.includes(I.section);return L&&d&&g}),NJ=[{name:"Goles",color:"#4A90E2",points:[1,2,3],categories:[12,55,35,54],invert:[35,54],negative:!1},{name:"Tiros a gol",color:"#FF8000",points:[1,2,3],categories:[12,55,35,54,510]}];(function(){function e(n,r,I){return typeof I>"u"||+I==0?Math[n](r):(r=+r,I=+I,isNaN(r)||!(typeof I=="number"&&I%1===0)?NaN:(r=r.toString().split("e"),r=Math[n](+(r[0]+"e"+(r[1]?+r[1]-I:-I))),r=r.toString().split("e"),+(r[0]+"e"+(r[1]?+r[1]+I:I))))}Math.ceil10||(Math.ceil10=function(n,r){return e("ceil",n,r)})})();function BJ(e,n){let r=n*-1;return Math.ceil10(e,r)}const cua={...oua,...Wda,...rua,...{xgGeneral:{namespaced:!0,state:{teamSelected:"Local",xGLocalPlays:[],xGVisitingPlays:[]},getters:{playsLocal:(e,n,r)=>{const I=e.xGLocalPlays,L="homeTeamFilter",d=r.nextGeneral[L];return PJ(I,d)},playsAway:(e,n,r)=>{const I=e.xGVisitingPlays,L="visitingTeamFilter",d=r.nextGeneral[L];return PJ(I,d)},goalsQtyLocal:(e,n)=>{const r=NJ.find(I=>I.name==="Goles");return n.playsLocal.filter(I=>r.categories.includes(I.category_id)).length},goalsQtyAway:(e,n)=>{const r=NJ.find(I=>I.name==="Goles");return n.playsAway.filter(I=>r.categories.includes(I.category_id)).length},shotsOnGoalQtyLocal:(e,n)=>n.playsLocal.filter(r=>r.category_id===510).length,shotsOnGoalQtyAway:(e,n)=>n.playsAway.filter(r=>r.category_id===510).length,xGLocal:(e,n)=>{const r=new Set;let I=n.playsLocal.reduce((L,d)=>(r.has(d.moment_of_play)||(r.add(d.moment_of_play),L+=d.xG2),L),0);return BJ(I,2)},xGAway:(e,n)=>{const r=new Set;let I=n.playsAway.reduce((L,d)=>(r.has(d.moment_of_play)||(r.add(d.moment_of_play),L+=d.xG2),L),0);return BJ(I,2)}},mutations:{setTeamSelected(e,n){e.teamSelected=n},setPlays(e,n){e.xGLocalPlays=n.local_team.map(r=>IJ(n.data_headers,r)),e.xGVisitingPlays=n.visiting_team.map(r=>IJ(n.data_headers,r))},cleanXgStore(e){e.localStorage="Local",e.xGLocalPlays=[],e.xGVisitingPlays=[]}},actions:{async getXgPlays({commit:e},{seasonId:n,localTeamId:r,visitingTeamId:I,postMatch:L=!1}){try{var d={};L?d=await lua({seasonId:n,localTeamId:r,visitingTeamId:I}):d=await sua({seasonId:n,localTeamId:r,visitingTeamId:I}),e("setPlays",d)}catch(g){return Promise.reject(g)}}}}}};function dua(e){for(const[n,r]of Object.entries(cua))e.hasModule(n)||e.registerModule(n,r)}const uua={class:"subcategory-group"},hua={__name:"SubcategoryGroup",props:{subcategoryGroup:{type:Array,default:()=>[]}},setup(e){return(n,r)=>(t.openBlock(),t.createElementBlock("div",uua,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.subcategoryGroup,I=>(t.openBlock(),t.createBlock(t.unref(uo),{key:I.id,modelValue:I.isSelected,"onUpdate:modelValue":L=>I.isSelected=L,label:I.name},null,8,["modelValue","onUpdate:modelValue","label"]))),128))]))}},pua=Ao(hua,[["__scopeId","data-v-ae6f3d72"]]),fua={class:"filter-subcategories"},mua=Object.freeze(Object.defineProperty({__proto__:null,default:Ao({__name:"FilterSubcategories",props:{subcategoryGroups:{type:Array,default:()=>[]}},setup(e){return(n,r)=>(t.openBlock(),t.createElementBlock("div",fua,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.subcategoryGroups,I=>(t.openBlock(),t.createElementBlock("div",{key:I.id,class:"filter-subcategories__group"},[t.createVNode(pua,{subcategoryGroup:I},null,8,["subcategoryGroup"])]))),128))]))}},[["__scopeId","data-v-5edaefc2"]])},Symbol.toStringTag,{value:"Module"})),F5=e=>(t.pushScopeId("data-v-80d9c265"),e=e(),t.popScopeId(),e),gua={class:"details__header"},yua=F5(()=>t.createElementVNode("div",{class:"details__header__title"},"Jugando como",-1)),vua={class:"details__header__checkbox"},_ua={class:"details__body"},bua={class:"details__body__playing-as"},xua=["onClick"],wua={class:"details__header"},kua=F5(()=>t.createElementVNode("div",{class:"details__header__title"},"En: (Elige el lapso de tiempo)",-1)),Cua={class:"details__header__checkbox"},Tua={class:"details__body"},Sua=F5(()=>t.createElementVNode("div",{class:"details__body__title"},"1er tiempo",-1)),Eua={class:"details__body__game-section"},Aua=["onClick"],Mua={class:"details__body"},Iua=F5(()=>t.createElementVNode("div",{class:"details__body__title"},"2do tiempo",-1)),Pua={class:"details__body__game-section"},Nua=["onClick"],Bua=Object.freeze(Object.defineProperty({__proto__:null,default:Ao({__name:"FilterConditions",props:{playingAs:{type:Array,default:()=>[{name:"Local",isSelected:!0},{name:"Visitante",isSelected:!0}]},gameSections:{type:Array,default:()=>[{text:"0-15",value:1,isSelected:!0},{text:"16-30",value:2,isSelected:!0},{text:"31-45",value:3,isSelected:!0},{text:"46-60",value:4,isSelected:!0},{text:"61-75",value:5,isSelected:!0},{text:"76-90",value:6,isSelected:!0}]},buttonsBackgroundColor:{type:String,default:"rgba(255, 255, 255, 0)"},buttonsBackgroundColorActive:{type:String,default:"rgba(203, 238, 107, 0.05)"},buttonsTextColor:{type:String,default:"rgba(255, 255, 255, 0.8)"},buttonsTextColorActive:{type:String,default:"rgba(255, 255, 255, 1)"},buttonsBorderColor:{type:String,default:"#8ea2ab"},buttonsBorderColorActive:{type:String,default:"#cbee6b"},buttonsBorderWidth:{type:String,default:"0.8px"},buttonsBorderWidthActive:{type:String,default:"1px"},buttonsBorderRadius:{type:String,default:"4px"}},setup(e){const n=e;t.useCssVars(i=>({"49cba245":e.buttonsBackgroundColor,"52f02da6":e.buttonsTextColor,"7d3f686a":e.buttonsBorderWidth,"7c286a07":e.buttonsBorderColor,"24a6f4aa":e.buttonsBackgroundColorActive,cd8d7768:e.buttonsTextColorActive,"35fa5c10":e.buttonsBorderWidthActive,"0cde1826":e.buttonsBorderColorActive}));const r=t.computed(()=>n.playingAs.every(i=>i.isSelected)),I=t.computed(()=>n.gameSections.every(i=>i.isSelected)),L=t.computed(()=>n.gameSections.reduce((i,v)=>(v.value<=3?i.firstHalf.push(v):i.secondHalf.push(v),i),{firstHalf:[],secondHalf:[]})),d=t.computed(()=>({"--border-radius-first-button":`${n.buttonsBorderRadius} 0 0 ${n.buttonsBorderRadius}`,"--border-radius-last-button":`0 ${n.buttonsBorderRadius} ${n.buttonsBorderRadius} 0`}));function g(i){i?n.playingAs.forEach(v=>{v.isSelected=!0}):n.playingAs.forEach((v,_)=>{v.isSelected=_===0})}function a(i){n.playingAs.filter(v=>v.isSelected).length===1&&i.isSelected||(i.isSelected=!i.isSelected)}function b(i){n.gameSections.filter(v=>v.isSelected).length===1&&i.isSelected||(i.isSelected=!i.isSelected)}function m(i){i?n.gameSections.forEach(v=>{v.isSelected=!0}):n.gameSections.forEach((v,_)=>{v.isSelected=_===0})}return(i,v)=>(t.openBlock(),t.createElementBlock("div",{class:"details",style:t.normalizeStyle(d.value)},[t.createElementVNode("div",gua,[yua,t.createElementVNode("div",vua,[t.createVNode(t.unref(uo),{label:"Todos","model-value":r.value,"onUpdate:modelValue":g},null,8,["model-value"])])]),t.createElementVNode("div",_ua,[t.createElementVNode("div",bua,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(n.playingAs,(_,c)=>(t.openBlock(),t.createElementBlock("div",{key:`pa${c}`,class:t.normalizeClass(["details__body__button",{active:_.isSelected}]),onClick:s=>a(_)},t.toDisplayString(_.name),11,xua))),128))])]),t.createElementVNode("div",wua,[kua,t.createElementVNode("div",Cua,[t.createVNode(t.unref(uo),{label:"Todos","model-value":I.value,"onUpdate:modelValue":m},null,8,["model-value"])])]),t.createElementVNode("div",Tua,[Sua,t.createElementVNode("div",Eua,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(L.value.firstHalf,(_,c)=>(t.openBlock(),t.createElementBlock("div",{key:`pa${c}`,class:t.normalizeClass(["details__body__button",{active:_.isSelected}]),onClick:s=>b(_)},t.toDisplayString(_.text),11,Aua))),128))])]),t.createElementVNode("div",Mua,[Iua,t.createElementVNode("div",Pua,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(L.value.secondHalf,(_,c)=>(t.openBlock(),t.createElementBlock("div",{key:`pa${c}`,class:t.normalizeClass(["details__body__button",{active:_.isSelected}]),onClick:s=>b(_)},t.toDisplayString(_.text),11,Nua))),128))])])],4))}},[["__scopeId","data-v-80d9c265"]])},Symbol.toStringTag,{value:"Module"})),Oua={class:"filter-field"},zua=Object.freeze(Object.defineProperty({__proto__:null,default:Ao({__name:"FilterField",setup(e){const n=t.ref(Array.from({length:16},(I,L)=>L+1));function r(){}return(I,L)=>(t.openBlock(),t.createElementBlock("div",Oua,[t.createVNode(t.unref(sG),{width:"100%","background-color":"#2E3B46",value:n.value,"onUpdate:modelValue":r},null,8,["value"])]))}},[["__scopeId","data-v-8103c3e1"]])},Symbol.toStringTag,{value:"Module"})),Lua={class:"subcategory-group"},Fua={__name:"SubcategoryGroup",props:{subcategoryGroup:{type:Array,default:()=>[]}},setup(e){return(n,r)=>(t.openBlock(),t.createElementBlock("div",Lua,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.subcategoryGroup,I=>(t.openBlock(),t.createBlock(t.unref(ho),{key:I.id,modelValue:I.isSelected,"onUpdate:modelValue":L=>I.isSelected=L,label:I.name},null,8,["modelValue","onUpdate:modelValue","label"]))),128))]))}},Dua=Mo(Fua,[["__scopeId","data-v-ae6f3d72"]]),Vua={class:"filter-subcategories"},Rua=Object.freeze(Object.defineProperty({__proto__:null,default:Mo({__name:"FilterSubcategories",props:{subcategoryGroups:{type:Array,default:()=>[]}},setup(e){return(n,r)=>(t.openBlock(),t.createElementBlock("div",Vua,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.subcategoryGroups,I=>(t.openBlock(),t.createElementBlock("div",{key:I.id,class:"filter-subcategories__group"},[t.createVNode(Dua,{subcategoryGroup:I},null,8,["subcategoryGroup"])]))),128))]))}},[["__scopeId","data-v-5edaefc2"]])},Symbol.toStringTag,{value:"Module"})),D5=e=>(t.pushScopeId("data-v-80d9c265"),e=e(),t.popScopeId(),e),$ua={class:"details__header"},jua=D5(()=>t.createElementVNode("div",{class:"details__header__title"},"Jugando como",-1)),Uua={class:"details__header__checkbox"},Hua={class:"details__body"},Gua={class:"details__body__playing-as"},Wua=["onClick"],qua={class:"details__header"},Yua=D5(()=>t.createElementVNode("div",{class:"details__header__title"},"En: (Elige el lapso de tiempo)",-1)),Zua={class:"details__header__checkbox"},Jua={class:"details__body"},Xua=D5(()=>t.createElementVNode("div",{class:"details__body__title"},"1er tiempo",-1)),Kua={class:"details__body__game-section"},Qua=["onClick"],eha={class:"details__body"},tha=D5(()=>t.createElementVNode("div",{class:"details__body__title"},"2do tiempo",-1)),aha={class:"details__body__game-section"},nha=["onClick"],rha=Object.freeze(Object.defineProperty({__proto__:null,default:Mo({__name:"FilterConditions",props:{playingAs:{type:Array,default:()=>[{name:"Local",isSelected:!0},{name:"Visitante",isSelected:!0}]},gameSections:{type:Array,default:()=>[{text:"0-15",value:1,isSelected:!0},{text:"16-30",value:2,isSelected:!0},{text:"31-45",value:3,isSelected:!0},{text:"46-60",value:4,isSelected:!0},{text:"61-75",value:5,isSelected:!0},{text:"76-90",value:6,isSelected:!0}]},buttonsBackgroundColor:{type:String,default:"rgba(255, 255, 255, 0)"},buttonsBackgroundColorActive:{type:String,default:"rgba(203, 238, 107, 0.05)"},buttonsTextColor:{type:String,default:"rgba(255, 255, 255, 0.8)"},buttonsTextColorActive:{type:String,default:"rgba(255, 255, 255, 1)"},buttonsBorderColor:{type:String,default:"#8ea2ab"},buttonsBorderColorActive:{type:String,default:"#cbee6b"},buttonsBorderWidth:{type:String,default:"0.8px"},buttonsBorderWidthActive:{type:String,default:"1px"},buttonsBorderRadius:{type:String,default:"4px"}},setup(e){const n=e;t.useCssVars(i=>({"49cba245":e.buttonsBackgroundColor,"52f02da6":e.buttonsTextColor,"7d3f686a":e.buttonsBorderWidth,"7c286a07":e.buttonsBorderColor,"24a6f4aa":e.buttonsBackgroundColorActive,cd8d7768:e.buttonsTextColorActive,"35fa5c10":e.buttonsBorderWidthActive,"0cde1826":e.buttonsBorderColorActive}));const r=t.computed(()=>n.playingAs.every(i=>i.isSelected)),I=t.computed(()=>n.gameSections.every(i=>i.isSelected)),L=t.computed(()=>n.gameSections.reduce((i,v)=>(v.value<=3?i.firstHalf.push(v):i.secondHalf.push(v),i),{firstHalf:[],secondHalf:[]})),d=t.computed(()=>({"--border-radius-first-button":`${n.buttonsBorderRadius} 0 0 ${n.buttonsBorderRadius}`,"--border-radius-last-button":`0 ${n.buttonsBorderRadius} ${n.buttonsBorderRadius} 0`}));function g(i){i?n.playingAs.forEach(v=>{v.isSelected=!0}):n.playingAs.forEach((v,_)=>{v.isSelected=_===0})}function a(i){n.playingAs.filter(v=>v.isSelected).length===1&&i.isSelected||(i.isSelected=!i.isSelected)}function b(i){n.gameSections.filter(v=>v.isSelected).length===1&&i.isSelected||(i.isSelected=!i.isSelected)}function m(i){i?n.gameSections.forEach(v=>{v.isSelected=!0}):n.gameSections.forEach((v,_)=>{v.isSelected=_===0})}return(i,v)=>(t.openBlock(),t.createElementBlock("div",{class:"details",style:t.normalizeStyle(d.value)},[t.createElementVNode("div",$ua,[jua,t.createElementVNode("div",Uua,[t.createVNode(t.unref(ho),{label:"Todos","model-value":r.value,"onUpdate:modelValue":g},null,8,["model-value"])])]),t.createElementVNode("div",Hua,[t.createElementVNode("div",Gua,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(n.playingAs,(_,c)=>(t.openBlock(),t.createElementBlock("div",{key:`pa${c}`,class:t.normalizeClass(["details__body__button",{active:_.isSelected}]),onClick:s=>a(_)},t.toDisplayString(_.name),11,Wua))),128))])]),t.createElementVNode("div",qua,[Yua,t.createElementVNode("div",Zua,[t.createVNode(t.unref(ho),{label:"Todos","model-value":I.value,"onUpdate:modelValue":m},null,8,["model-value"])])]),t.createElementVNode("div",Jua,[Xua,t.createElementVNode("div",Kua,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(L.value.firstHalf,(_,c)=>(t.openBlock(),t.createElementBlock("div",{key:`pa${c}`,class:t.normalizeClass(["details__body__button",{active:_.isSelected}]),onClick:s=>b(_)},t.toDisplayString(_.text),11,Qua))),128))])]),t.createElementVNode("div",eha,[tha,t.createElementVNode("div",aha,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(L.value.secondHalf,(_,c)=>(t.openBlock(),t.createElementBlock("div",{key:`pa${c}`,class:t.normalizeClass(["details__body__button",{active:_.isSelected}]),onClick:s=>b(_)},t.toDisplayString(_.text),11,nha))),128))])])],4))}},[["__scopeId","data-v-80d9c265"]])},Symbol.toStringTag,{value:"Module"})),iha={class:"filter-field"},oha=Object.freeze(Object.defineProperty({__proto__:null,default:Mo({__name:"FilterField",setup(e){const n=t.ref(Array.from({length:16},(I,L)=>L+1));function r(){}return(I,L)=>(t.openBlock(),t.createElementBlock("div",iha,[t.createVNode(t.unref(Jq),{width:"100%","background-color":"#2E3B46",value:n.value,"onUpdate:modelValue":r},null,8,["value"])]))}},[["__scopeId","data-v-8103c3e1"]])},Symbol.toStringTag,{value:"Module"}));Uc.GSCGameData=zda,Uc.connectSocket=aie,Uc.disconnectSocket=nie,Uc.getSocket=wP,Uc.registerStoreModules=dua,Object.defineProperty(Uc,Symbol.toStringTag,{value:"Module"})});
|
|
7044
|
+
*/var Fla="store";function Pm(e,n){Object.keys(e).forEach(function(r){return n(e[r],r)})}function sJ(e){return e!==null&&typeof e=="object"}function Dla(e){return e&&typeof e.then=="function"}function xh(e,n){if(!e)throw new Error("[vuex] "+n)}function Vla(e,n){return function(){return e(n)}}function lJ(e,n,r){return n.indexOf(e)<0&&(r&&r.prepend?n.unshift(e):n.push(e)),function(){var I=n.indexOf(e);I>-1&&n.splice(I,1)}}function cJ(e,n){e._actions=Object.create(null),e._mutations=Object.create(null),e._wrappedGetters=Object.create(null),e._modulesNamespaceMap=Object.create(null);var r=e.state;N5(e,r,[],e._modules.root,!0),CE(e,r,n)}function CE(e,n,r){var I=e._state;e.getters={},e._makeLocalGettersCache=Object.create(null);var L=e._wrappedGetters,d={};Pm(L,function(g,a){d[a]=Vla(g,e),Object.defineProperty(e.getters,a,{get:function(){return d[a]()},enumerable:!0})}),e._state=t.reactive({data:n}),e.strict&&Hla(e),I&&r&&e._withCommit(function(){I.data=null})}function N5(e,n,r,I,L){var d=!r.length,g=e._modules.getNamespace(r);if(I.namespaced&&(e._modulesNamespaceMap[g]&&process.env.NODE_ENV!=="production"&&console.error("[vuex] duplicate namespace "+g+" for the namespaced module "+r.join("/")),e._modulesNamespaceMap[g]=I),!d&&!L){var a=TE(n,r.slice(0,-1)),b=r[r.length-1];e._withCommit(function(){process.env.NODE_ENV!=="production"&&b in a&&console.warn('[vuex] state field "'+b+'" was overridden by a module with the same name at "'+r.join(".")+'"'),a[b]=I.state})}var m=I.context=Rla(e,g,r);I.forEachMutation(function(i,v){var _=g+v;$la(e,_,i,m)}),I.forEachAction(function(i,v){var _=i.root?v:g+v,c=i.handler||i;jla(e,_,c,m)}),I.forEachGetter(function(i,v){var _=g+v;Ula(e,_,i,m)}),I.forEachChild(function(i,v){N5(e,n,r.concat(v),i,L)})}function Rla(e,n,r){var I=n==="",L={dispatch:I?e.dispatch:function(d,g,a){var b=B5(d,g,a),m=b.payload,i=b.options,v=b.type;if((!i||!i.root)&&(v=n+v,process.env.NODE_ENV!=="production"&&!e._actions[v])){console.error("[vuex] unknown local action type: "+b.type+", global type: "+v);return}return e.dispatch(v,m)},commit:I?e.commit:function(d,g,a){var b=B5(d,g,a),m=b.payload,i=b.options,v=b.type;if((!i||!i.root)&&(v=n+v,process.env.NODE_ENV!=="production"&&!e._mutations[v])){console.error("[vuex] unknown local mutation type: "+b.type+", global type: "+v);return}e.commit(v,m,i)}};return Object.defineProperties(L,{getters:{get:I?function(){return e.getters}:function(){return dJ(e,n)}},state:{get:function(){return TE(e.state,r)}}}),L}function dJ(e,n){if(!e._makeLocalGettersCache[n]){var r={},I=n.length;Object.keys(e.getters).forEach(function(L){if(L.slice(0,I)===n){var d=L.slice(I);Object.defineProperty(r,d,{get:function(){return e.getters[L]},enumerable:!0})}}),e._makeLocalGettersCache[n]=r}return e._makeLocalGettersCache[n]}function $la(e,n,r,I){var L=e._mutations[n]||(e._mutations[n]=[]);L.push(function(d){r.call(e,I.state,d)})}function jla(e,n,r,I){var L=e._actions[n]||(e._actions[n]=[]);L.push(function(d){var g=r.call(e,{dispatch:I.dispatch,commit:I.commit,getters:I.getters,state:I.state,rootGetters:e.getters,rootState:e.state},d);return Dla(g)||(g=Promise.resolve(g)),e._devtoolHook?g.catch(function(a){throw e._devtoolHook.emit("vuex:error",a),a}):g})}function Ula(e,n,r,I){if(e._wrappedGetters[n]){process.env.NODE_ENV!=="production"&&console.error("[vuex] duplicate getter key: "+n);return}e._wrappedGetters[n]=function(L){return r(I.state,I.getters,L.state,L.getters)}}function Hla(e){t.watch(function(){return e._state.data},function(){process.env.NODE_ENV!=="production"&&xh(e._committing,"do not mutate vuex store state outside mutation handlers.")},{deep:!0,flush:"sync"})}function TE(e,n){return n.reduce(function(r,I){return r[I]},e)}function B5(e,n,r){return sJ(e)&&e.type&&(r=n,n=e,e=e.type),process.env.NODE_ENV!=="production"&&xh(typeof e=="string","expects string as the type, but found "+typeof e+"."),{type:e,payload:n,options:r}}var Gla="vuex bindings",uJ="vuex:mutations",SE="vuex:actions",K1="vuex",Wla=0;function qla(e,n){Lla({id:"org.vuejs.vuex",app:e,label:"Vuex",homepage:"https://next.vuex.vuejs.org/",logo:"https://vuejs.org/images/icons/favicon-96x96.png",packageName:"vuex",componentStateTypes:[Gla]},function(r){r.addTimelineLayer({id:uJ,label:"Vuex Mutations",color:hJ}),r.addTimelineLayer({id:SE,label:"Vuex Actions",color:hJ}),r.addInspector({id:K1,label:"Vuex",icon:"storage",treeFilterPlaceholder:"Filter stores..."}),r.on.getInspectorTree(function(I){if(I.app===e&&I.inspectorId===K1)if(I.filter){var L=[];gJ(L,n._modules.root,I.filter,""),I.rootNodes=L}else I.rootNodes=[mJ(n._modules.root,"")]}),r.on.getInspectorState(function(I){if(I.app===e&&I.inspectorId===K1){var L=I.nodeId;dJ(n,L),I.state=Jla(Kla(n._modules,L),L==="root"?n.getters:n._makeLocalGettersCache,L)}}),r.on.editInspectorState(function(I){if(I.app===e&&I.inspectorId===K1){var L=I.nodeId,d=I.path;L!=="root"&&(d=L.split("/").filter(Boolean).concat(d)),n._withCommit(function(){I.set(n._state.data,d,I.state.value)})}}),n.subscribe(function(I,L){var d={};I.payload&&(d.payload=I.payload),d.state=L,r.notifyComponentUpdate(),r.sendInspectorTree(K1),r.sendInspectorState(K1),r.addTimelineEvent({layerId:uJ,event:{time:Date.now(),title:I.type,data:d}})}),n.subscribeAction({before:function(I,L){var d={};I.payload&&(d.payload=I.payload),I._id=Wla++,I._time=Date.now(),d.state=L,r.addTimelineEvent({layerId:SE,event:{time:I._time,title:I.type,groupId:I._id,subtitle:"start",data:d}})},after:function(I,L){var d={},g=Date.now()-I._time;d.duration={_custom:{type:"duration",display:g+"ms",tooltip:"Action duration",value:g}},I.payload&&(d.payload=I.payload),d.state=L,r.addTimelineEvent({layerId:SE,event:{time:Date.now(),title:I.type,groupId:I._id,subtitle:"end",data:d}})}})})}var hJ=8702998,Yla=6710886,Zla=16777215,pJ={label:"namespaced",textColor:Zla,backgroundColor:Yla};function fJ(e){return e&&e!=="root"?e.split("/").slice(-2,-1)[0]:"Root"}function mJ(e,n){return{id:n||"root",label:fJ(n),tags:e.namespaced?[pJ]:[],children:Object.keys(e._children).map(function(r){return mJ(e._children[r],n+r+"/")})}}function gJ(e,n,r,I){I.includes(r)&&e.push({id:I||"root",label:I.endsWith("/")?I.slice(0,I.length-1):I||"Root",tags:n.namespaced?[pJ]:[]}),Object.keys(n._children).forEach(function(L){gJ(e,n._children[L],r,I+L+"/")})}function Jla(e,n,r){n=r==="root"?n:n[r];var I=Object.keys(n),L={state:Object.keys(e.state).map(function(g){return{key:g,editable:!0,value:e.state[g]}})};if(I.length){var d=Xla(n);L.getters=Object.keys(d).map(function(g){return{key:g.endsWith("/")?fJ(g):g,editable:!1,value:EE(function(){return d[g]})}})}return L}function Xla(e){var n={};return Object.keys(e).forEach(function(r){var I=r.split("/");if(I.length>1){var L=n,d=I.pop();I.forEach(function(g){L[g]||(L[g]={_custom:{value:{},display:g,tooltip:"Module",abstract:!0}}),L=L[g]._custom.value}),L[d]=EE(function(){return e[r]})}else n[r]=EE(function(){return e[r]})}),n}function Kla(e,n){var r=n.split("/").filter(function(I){return I});return r.reduce(function(I,L,d){var g=I[L];if(!g)throw new Error('Missing module "'+L+'" for path "'+n+'".');return d===r.length-1?g:g._children},n==="root"?e:e.root._children)}function EE(e){try{return e()}catch(n){return n}}var wh=function(e,n){this.runtime=n,this._children=Object.create(null),this._rawModule=e;var r=e.state;this.state=(typeof r=="function"?r():r)||{}},yJ={namespaced:{configurable:!0}};yJ.namespaced.get=function(){return!!this._rawModule.namespaced},wh.prototype.addChild=function(e,n){this._children[e]=n},wh.prototype.removeChild=function(e){delete this._children[e]},wh.prototype.getChild=function(e){return this._children[e]},wh.prototype.hasChild=function(e){return e in this._children},wh.prototype.update=function(e){this._rawModule.namespaced=e.namespaced,e.actions&&(this._rawModule.actions=e.actions),e.mutations&&(this._rawModule.mutations=e.mutations),e.getters&&(this._rawModule.getters=e.getters)},wh.prototype.forEachChild=function(e){Pm(this._children,e)},wh.prototype.forEachGetter=function(e){this._rawModule.getters&&Pm(this._rawModule.getters,e)},wh.prototype.forEachAction=function(e){this._rawModule.actions&&Pm(this._rawModule.actions,e)},wh.prototype.forEachMutation=function(e){this._rawModule.mutations&&Pm(this._rawModule.mutations,e)},Object.defineProperties(wh.prototype,yJ);var Nm=function(e){this.register([],e,!1)};Nm.prototype.get=function(e){return e.reduce(function(n,r){return n.getChild(r)},this.root)},Nm.prototype.getNamespace=function(e){var n=this.root;return e.reduce(function(r,I){return n=n.getChild(I),r+(n.namespaced?I+"/":"")},"")},Nm.prototype.update=function(e){vJ([],this.root,e)},Nm.prototype.register=function(e,n,r){var I=this;r===void 0&&(r=!0),process.env.NODE_ENV!=="production"&&xJ(e,n);var L=new wh(n,r);if(e.length===0)this.root=L;else{var d=this.get(e.slice(0,-1));d.addChild(e[e.length-1],L)}n.modules&&Pm(n.modules,function(g,a){I.register(e.concat(a),g,r)})},Nm.prototype.unregister=function(e){var n=this.get(e.slice(0,-1)),r=e[e.length-1],I=n.getChild(r);if(!I){process.env.NODE_ENV!=="production"&&console.warn("[vuex] trying to unregister module '"+r+"', which is not registered");return}I.runtime&&n.removeChild(r)},Nm.prototype.isRegistered=function(e){var n=this.get(e.slice(0,-1)),r=e[e.length-1];return n?n.hasChild(r):!1};function vJ(e,n,r){if(process.env.NODE_ENV!=="production"&&xJ(e,r),n.update(r),r.modules)for(var I in r.modules){if(!n.getChild(I)){process.env.NODE_ENV!=="production"&&console.warn("[vuex] trying to add a new module '"+I+"' on hot reloading, manual reload is needed");return}vJ(e.concat(I),n.getChild(I),r.modules[I])}}var _J={assert:function(e){return typeof e=="function"},expected:"function"},Qla={assert:function(e){return typeof e=="function"||typeof e=="object"&&typeof e.handler=="function"},expected:'function or object with "handler" function'},bJ={getters:_J,mutations:_J,actions:Qla};function xJ(e,n){Object.keys(bJ).forEach(function(r){if(n[r]){var I=bJ[r];Pm(n[r],function(L,d){xh(I.assert(L),eca(e,r,d,L,I.expected))})}})}function eca(e,n,r,I,L){var d=n+" should be "+L+' but "'+n+"."+r+'"';return e.length>0&&(d+=' in module "'+e.join(".")+'"'),d+=" is "+JSON.stringify(I)+".",d}var Ud=function e(n){var r=this;n===void 0&&(n={}),process.env.NODE_ENV!=="production"&&(xh(typeof Promise<"u","vuex requires a Promise polyfill in this browser."),xh(this instanceof e,"store must be called with the new operator."));var I=n.plugins;I===void 0&&(I=[]);var L=n.strict;L===void 0&&(L=!1);var d=n.devtools;this._committing=!1,this._actions=Object.create(null),this._actionSubscribers=[],this._mutations=Object.create(null),this._wrappedGetters=Object.create(null),this._modules=new Nm(n),this._modulesNamespaceMap=Object.create(null),this._subscribers=[],this._makeLocalGettersCache=Object.create(null),this._devtools=d;var g=this,a=this,b=a.dispatch,m=a.commit;this.dispatch=function(v,_){return b.call(g,v,_)},this.commit=function(v,_,c){return m.call(g,v,_,c)},this.strict=L;var i=this._modules.root.state;N5(this,i,[],this._modules.root),CE(this,i),I.forEach(function(v){return v(r)})},AE={state:{configurable:!0}};Ud.prototype.install=function(e,n){e.provide(n||Fla,this),e.config.globalProperties.$store=this;var r=this._devtools!==void 0?this._devtools:process.env.NODE_ENV!=="production"||!1;r&&qla(e,this)},AE.state.get=function(){return this._state.data},AE.state.set=function(e){process.env.NODE_ENV!=="production"&&xh(!1,"use store.replaceState() to explicit replace store state.")},Ud.prototype.commit=function(e,n,r){var I=this,L=B5(e,n,r),d=L.type,g=L.payload,a=L.options,b={type:d,payload:g},m=this._mutations[d];if(!m){process.env.NODE_ENV!=="production"&&console.error("[vuex] unknown mutation type: "+d);return}this._withCommit(function(){m.forEach(function(i){i(g)})}),this._subscribers.slice().forEach(function(i){return i(b,I.state)}),process.env.NODE_ENV!=="production"&&a&&a.silent&&console.warn("[vuex] mutation type: "+d+". Silent option has been removed. Use the filter functionality in the vue-devtools")},Ud.prototype.dispatch=function(e,n){var r=this,I=B5(e,n),L=I.type,d=I.payload,g={type:L,payload:d},a=this._actions[L];if(!a){process.env.NODE_ENV!=="production"&&console.error("[vuex] unknown action type: "+L);return}try{this._actionSubscribers.slice().filter(function(m){return m.before}).forEach(function(m){return m.before(g,r.state)})}catch(m){process.env.NODE_ENV!=="production"&&(console.warn("[vuex] error in before action subscribers: "),console.error(m))}var b=a.length>1?Promise.all(a.map(function(m){return m(d)})):a[0](d);return new Promise(function(m,i){b.then(function(v){try{r._actionSubscribers.filter(function(_){return _.after}).forEach(function(_){return _.after(g,r.state)})}catch(_){process.env.NODE_ENV!=="production"&&(console.warn("[vuex] error in after action subscribers: "),console.error(_))}m(v)},function(v){try{r._actionSubscribers.filter(function(_){return _.error}).forEach(function(_){return _.error(g,r.state,v)})}catch(_){process.env.NODE_ENV!=="production"&&(console.warn("[vuex] error in error action subscribers: "),console.error(_))}i(v)})})},Ud.prototype.subscribe=function(e,n){return lJ(e,this._subscribers,n)},Ud.prototype.subscribeAction=function(e,n){var r=typeof e=="function"?{before:e}:e;return lJ(r,this._actionSubscribers,n)},Ud.prototype.watch=function(e,n,r){var I=this;return process.env.NODE_ENV!=="production"&&xh(typeof e=="function","store.watch only accepts a function."),t.watch(function(){return e(I.state,I.getters)},n,Object.assign({},r))},Ud.prototype.replaceState=function(e){var n=this;this._withCommit(function(){n._state.data=e})},Ud.prototype.registerModule=function(e,n,r){r===void 0&&(r={}),typeof e=="string"&&(e=[e]),process.env.NODE_ENV!=="production"&&(xh(Array.isArray(e),"module path must be a string or an Array."),xh(e.length>0,"cannot register the root module by using registerModule.")),this._modules.register(e,n),N5(this,this.state,e,this._modules.get(e),r.preserveState),CE(this,this.state)},Ud.prototype.unregisterModule=function(e){var n=this;typeof e=="string"&&(e=[e]),process.env.NODE_ENV!=="production"&&xh(Array.isArray(e),"module path must be a string or an Array."),this._modules.unregister(e),this._withCommit(function(){var r=TE(n.state,e.slice(0,-1));delete r[e[e.length-1]]}),cJ(this)},Ud.prototype.hasModule=function(e){return typeof e=="string"&&(e=[e]),process.env.NODE_ENV!=="production"&&xh(Array.isArray(e),"module path must be a string or an Array."),this._modules.isRegistered(e)},Ud.prototype.hotUpdate=function(e){this._modules.update(e),cJ(this,!0)},Ud.prototype._withCommit=function(e){var n=this._committing;this._committing=!0,e(),this._committing=n},Object.defineProperties(Ud.prototype,AE);var tca=nca(function(e,n){var r={};return process.env.NODE_ENV!=="production"&&!wJ(n)&&console.error("[vuex] mapMutations: mapper parameter must be either an Array or an Object"),aca(n).forEach(function(I){var L=I.key,d=I.val;r[L]=function(){for(var g=[],a=arguments.length;a--;)g[a]=arguments[a];var b=this.$store.commit;if(e){var m=rca(this.$store,"mapMutations",e);if(!m)return;b=m.context.commit}return typeof d=="function"?d.apply(this,[b].concat(g)):b.apply(this.$store,[d].concat(g))}}),r});function aca(e){return wJ(e)?Array.isArray(e)?e.map(function(n){return{key:n,val:n}}):Object.keys(e).map(function(n){return{key:n,val:e[n]}}):[]}function wJ(e){return Array.isArray(e)||sJ(e)}function nca(e){return function(n,r){return typeof n!="string"?(r=n,n=""):n.charAt(n.length-1)!=="/"&&(n+="/"),e(n,r)}}function rca(e,n,r){var I=e._modulesNamespaceMap[r];return process.env.NODE_ENV!=="production"&&!I&&console.error("[vuex] module namespace not found in "+n+"(): "+r),I}const ica="/icn-play.svg",oca="/icn-tiros-de-esquina.svg",sca="/icn-tiro-a-porteria.svg",lca="/icn-cambio.svg",cca="/icn-falta.svg",dca="/atajada.svg",uca="/fuera-de-lugar.svg",ME="/gol.svg",hca="/var.png",pca="/tiempo-agregado.svg",fca="/jugada-peligrosa.svg",mca="/penal-marcado.svg",gca="/penal-fallado.svg",yca="/inicia-el-partido.svg",vca="/fin-del-partido.svg",_ca="/icn-tarjeta-amarilla.svg",bca="/icn-tarjeta-roja.svg",xca=[1,2,3,4,6],wca={name:"TimeLineEvent",props:{gameEvent:{type:Object,required:!0},isMobile:{type:Boolean,default:!1},width:{type:Number,default:352},timeLineWidth:{type:Number,default:0},canPlayVideos:{type:Boolean,default:!0}},data(){return{lastHeight:0,gameEventKey:0}},computed:{nameClasses(){const e=[],n=`${this.gameEvent.event_type_id}-${this.gameEvent.category_id}`;return wE.GOAL_IDS.includes(n)?(e.push("is-main-event"),e.push("goal")):wE.YELLOW_CARD_IDS.includes(n)?(e.push("is-main-event"),e.push("yellow-card")):wE.RED_CARD_IDS.includes(n)?(e.push("is-main-event"),e.push("red-card")):this.gameEvent.video_link!=="-"&&(e.push("is-main-event"),e.push("normal-video")),this.gameEvent.teamType===1?e.push("time-line-event--home-team"):e.push("time-line-event--away-team"),e},srcImgPlayers(){let e=null;return this.gameEvent.player_id&&this.gameEvent.player_id!=="-"&&(e=this.gameEvent.player_id.split("@"),e=e.map(n=>Ala(n))),e},teamTypeClasses(){const e=`time-line-event--${this.gameEvent.teamType===1?"home":"away"}-team`;return[e,`${e}-desktop`]},teamTypeClasses2(){return[`time-line-event--info--${this.gameEvent.teamType===1?"home":"away"}-team`]},minuteClasses(){const e=[`time-line-event__minute--desktop-${this.gameEvent.teamType===1?"home":"away"}-team`];return e.push("time-line-event__minute--desktop"),e},playerName(){return this.gameEvent.category_id===28||xca.includes(this.gameEvent.event_type_id)?"":this.gameEvent.player_name}},watch:{width(){this.emitHeight()},gameEvent:{deep:!0,handler(){this.gameEventKey++}}},methods:{...tca("general",["setVideoModalVisibility","setVideoSrc"]),thumbnailClick(e){e!=="-"&&this.$emit("thumbnail-click",e)},showVideoTimeline(e){this.setVideoSrc(e),this.setVideoModalVisibility(!0)},getIconClasses(){return["time-line-event__icon--desktop",`time-line-event__icon--desktop-${this.gameEvent.teamType===1?"home":"away"}-team`]},emitHeight(){setTimeout(()=>{this.$refs.timeLineEvent&&this.$refs.timeLineEvent.clientHeight&&this.$refs.timeLineEvent.clientHeight!==this.lastHeight&&(this.lastHeight=this.$refs.timeLineEvent.clientHeight,this.$emit("event-height",this.lastHeight))},500)}},mounted(){if(this.emitHeight(),this.gameEvent.event_type_id===3){const[e,n]=this.gameEvent.player_id.split("@");this.$emit("player-changed",{playerOut:Number(e),playerIn:Number(n),teamId:this.gameEvent.team_id})}}},kca=e=>(t.pushScopeId("data-v-9943063a"),e=e(),t.popScopeId(),e),Cca={class:"time-line-event__details"},Tca={width:"127",preload:"metadata",style:{"border-radius":"8px"}},Sca=["src"],Eca=kca(()=>t.createElementVNode("div",{class:"time-line-event__details__video-thumbnail__gradient"},[t.createElementVNode("div",{class:"time-line-event__details__video-thumbnail__gradient__button-play"},[t.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none"},[t.createElementVNode("path",{d:"M6.6041 22.8554C6.42105 22.7512 6.26805 22.5956 6.1616 22.4053C6.05515 22.215 5.99927 21.9973 6.00001 21.7755V2.22137C6.00026 2.00039 6.0565 1.78362 6.16274 1.59409C6.26899 1.40456 6.42127 1.24936 6.6034 1.14499C6.78553 1.04062 6.9907 0.990981 7.1971 1.00135C7.4035 1.01171 7.60342 1.0817 7.77561 1.20386L21.4907 10.9821C21.6473 11.0935 21.7758 11.2446 21.8646 11.4219C21.9535 11.5992 22 11.7973 22 11.9985C22 12.1996 21.9535 12.3977 21.8646 12.575C21.7758 12.7523 21.6473 12.9034 21.4907 13.0148L7.77561 22.7954C7.60369 22.9178 7.40392 22.988 7.19761 22.9986C6.9913 23.0092 6.78617 22.9597 6.6041 22.8554ZM7.14347 21.7779L20.8585 11.9996L7.14347 21.7779Z",fill:"#CBEE6B"})])])],-1)),Aca={class:"time-line-event__details__info"},Mca={key:0,class:"time-line-event__details__info__header__players"},Ica={class:"time-line-event__details__info__header__players__div-img"},Pca=["src"],Nca={class:"time-line-event__details__info__body"},Bca={class:"time-line-event__details__info__body__comment"},Oca={class:"time-line-event__minute__container"},zca={class:"time-line-event__minute__container__text"},Lca={class:"time-line-event__minute__container__icon-container"},Fca={class:"time-line-event__minute__container__icon-container__icon"},Dca={key:0,src:oca,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},Vca={key:1,src:sca,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},Rca={key:2,src:lca,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},$ca={key:3,src:cca,class:"time-line-event__minute__container__icon-container__icon__img",alt:"Event icon"},jca={key:4,src:dca,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},Uca={key:5,src:uca,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},Hca={key:6,src:ME,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},Gca={key:7,src:ME,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},Wca={key:8,src:ME,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},qca={key:9,src:hca,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},Yca={key:10,src:pca,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},Zca={key:11,src:fca,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},Jca={key:12,src:mca,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},Xca={key:13,src:gca,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},Kca={key:14,src:yca,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},Qca={key:15,src:vca,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},eda={key:16,src:_ca,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},tda={key:17,src:bca,class:"time-line-event__minute__container__icon-container__icon__img",alt:"Event icon"},ada={key:18,src:"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg id='Layer_2' data-name='Layer 2' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'%3E%3Cdefs%3E%3Cstyle%3E .cls-1 %7B fill: %23fff; %7D .cls-2 %7B fill: %23172531; %7D %3C/style%3E%3C/defs%3E%3Cg id='Layer_1-2' data-name='Layer 1'%3E%3Cg%3E%3Cg id='Oval'%3E%3Ccircle class='cls-2' cx='24' cy='24' r='24'/%3E%3C/g%3E%3Cg id='Group-19'%3E%3Cg id='Path-16'%3E%3Cpath class='cls-1' d='M32.85,36.6H15.15c-.41,0-.75-.34-.75-.75s.34-.75,.75-.75h17.69c.41,0,.75,.34,.75,.75s-.34,.75-.75,.75Z'/%3E%3C/g%3E%3C/g%3E%3Cg id='Rectangle'%3E%3Cg id='path-1'%3E%3Cpath class='cls-1' d='M38.02,32.62H9.98V13.43h28.04v19.19Zm-26.54-1.5h25.04V14.93H11.48V31.12Z'/%3E%3C/g%3E%3C/g%3E%3C/g%3E%3C/g%3E%3C/svg%3E",alt:"Event icon"};function nda(e,n,r,I,L,d){return t.openBlock(),t.createElementBlock("div",{ref:"timeLineEvent",class:t.normalizeClass(["time-line-event",d.teamTypeClasses]),style:t.normalizeStyle({width:`${r.width}px`}),key:L.gameEventKey},[t.createElementVNode("div",Cca,[r.canPlayVideos&&r.gameEvent.video_link!=="-"&&r.timeLineWidth>700?(t.openBlock(),t.createElementBlock("div",{key:0,class:"time-line-event__details__video-thumbnail",onClick:n[0]||(n[0]=g=>d.thumbnailClick(r.gameEvent.video_link,r.gameEvent.event_type_name))},[t.createElementVNode("video",Tca,[t.createElementVNode("source",{src:r.gameEvent.video_link+"#t=0.1",type:"video/mp4"},null,8,Sca)]),Eca])):t.createCommentVNode("",!0),t.createElementVNode("div",Aca,[t.createElementVNode("div",{class:t.normalizeClass(["time-line-event__details__info__header",d.teamTypeClasses2])},[r.gameEvent.video_link=="-"?(t.openBlock(),t.createElementBlock("div",Mca,[d.srcImgPlayers?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:0},t.renderList(d.srcImgPlayers,(g,a)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["img-player",{"second-player":a===1}]),key:a},[t.createElementVNode("div",Ica,[t.createElementVNode("img",{src:g,alt:""},null,8,Pca)])],2))),128)):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0),t.createElementVNode("div",{class:t.normalizeClass(["time-line-event__details__info__header__event-name",d.nameClasses]),onClick:n[1]||(n[1]=g=>d.thumbnailClick(r.gameEvent.video_link,r.gameEvent.event_type_name))},[r.canPlayVideos&&r.gameEvent.video_link!=="-"?(t.openBlock(),t.createElementBlock("img",{key:0,src:ica,class:t.normalizeClass(`time-line-event__details__info__header__event-play ${[1,2].includes(r.gameEvent.event_type_id)?`time-line-event__details__info__header__event-play__${r.gameEvent.event_type_name}`:r.gameEvent.video_link!=="-"?"time-line-event__details__info__header__event-play__normal-video":""}`)},null,2)):t.createCommentVNode("",!0),t.createTextVNode(" "+t.toDisplayString(r.gameEvent.category_id?r.gameEvent.event_type_id===5?r.gameEvent.category_name:r.gameEvent.event_type_name==="Gol"?r.gameEvent.event_type_name+" de "+r.gameEvent.team_name:r.gameEvent.event_type_name:r.gameEvent.comments),1)],2)],2),t.createElementVNode("div",Nca,[t.createElementVNode("div",Bca,t.toDisplayString(this.gameEvent.category_id?`${this.gameEvent.comments}`:""),1)])])]),t.createElementVNode("div",{class:t.normalizeClass(["time-line-event__minute",d.minuteClasses])},[t.createElementVNode("div",Oca,[t.createElementVNode("div",zca,t.toDisplayString(r.gameEvent.minute)+"'",1),t.createElementVNode("div",Lca,[t.createElementVNode("div",Fca,[r.gameEvent.category_id==18?(t.openBlock(),t.createElementBlock("img",Dca)):r.gameEvent.category_id==20?(t.openBlock(),t.createElementBlock("img",Vca)):r.gameEvent.category_id==10?(t.openBlock(),t.createElementBlock("img",Rca)):r.gameEvent.category_id==21?(t.openBlock(),t.createElementBlock("img",$ca)):r.gameEvent.category_id==27?(t.openBlock(),t.createElementBlock("img",jca)):r.gameEvent.category_id==17?(t.openBlock(),t.createElementBlock("img",Uca)):r.gameEvent.category_id==6&&r.gameEvent.event_type_id==1||r.gameEvent.category_id==5&&r.gameEvent.event_type_id==1||r.gameEvent.category_id==1&&r.gameEvent.event_type_id==1||r.gameEvent.category_id==2&&r.gameEvent.event_type_id==1||r.gameEvent.category_id==3&&r.gameEvent.event_type_id==1||r.gameEvent.category_id==7&&r.gameEvent.event_type_id==1||r.gameEvent.category_id==12&&r.gameEvent.event_type_id==1?(t.openBlock(),t.createElementBlock("img",Hca)):r.gameEvent.category_id==4?(t.openBlock(),t.createElementBlock("img",Gca)):r.gameEvent.category_id==13||r.gameEvent.category_id==16?(t.openBlock(),t.createElementBlock("img",Wca)):r.gameEvent.category_id==30||r.gameEvent.category_id==31||r.gameEvent.category_id==32||r.gameEvent.category_id==33||r.gameEvent.category_id==34||r.gameEvent.category_id==35||r.gameEvent.category_id==36||r.gameEvent.category_id==37||r.gameEvent.category_id==38||r.gameEvent.category_id==39||r.gameEvent.category_id==40?(t.openBlock(),t.createElementBlock("img",qca)):r.gameEvent.category_id==28?(t.openBlock(),t.createElementBlock("img",Yca)):r.gameEvent.category_id==26?(t.openBlock(),t.createElementBlock("img",Zca)):r.gameEvent.category_id==22?(t.openBlock(),t.createElementBlock("img",Jca)):r.gameEvent.category_id==15||r.gameEvent.category_id==23?(t.openBlock(),t.createElementBlock("img",Xca)):r.gameEvent.category_id==0&&r.gameEvent.game_status_id==16||r.gameEvent.category_id==0&&r.gameEvent.game_status_id==18||r.gameEvent.category_id==0&&r.gameEvent.game_status_id==20||r.gameEvent.category_id==0&&r.gameEvent.game_status_id==22?(t.openBlock(),t.createElementBlock("img",Kca)):r.gameEvent.category_id==0&&r.gameEvent.game_status_id==13||r.gameEvent.category_id==0&&r.gameEvent.game_status_id==17||r.gameEvent.category_id==0&&r.gameEvent.game_status_id==19||r.gameEvent.category_id==0&&r.gameEvent.game_status_id==21||r.gameEvent.category_id==0&&r.gameEvent.game_status_id==23?(t.openBlock(),t.createElementBlock("img",Qca)):r.gameEvent.category_id==8?(t.openBlock(),t.createElementBlock("img",eda)):r.gameEvent.category_id==9?(t.openBlock(),t.createElementBlock("img",tda)):(t.openBlock(),t.createElementBlock("img",ada))])])])],2)],6)}const rda=kv(wca,[["render",nda],["__scopeId","data-v-9943063a"]]),ida={"1-1":"gol","1-2":"gol","1-3":"gol","1-4":"gol","1-5":"gol","1-6":"gol","1-7":"gol","1-12":"gol","1-13":"gol","1-16":"gol","2-8":"amonestacion","2-9":"expulsion","3-10":"cambio_de_jugador","3-11":"cambio_de_jugador","4-14":"gol","4-15":"penal_fallado","5-17":"fuera_de_lugar","5-18":"tiro_de_esquina","5-20":"tiro_a_gol","5-21":"falta_cometida","5-22":"penal_marcado","5-23":"penal_fallado","5-24":"","5-25":"","5-26":"jugada_peligro_dentro_area","5-27":"atajada","5-28":"tiempo_agregado","5-29":"presion_para_anotar","7-30":"revision_var","7-31":"revision_var","7-32":"revision_var","7-33":"revision_var","7-34":"revision_var"},oda={3:{name:"Inicia Primer Tiempo",weight:1,playTimer:1,abbreviation:"1T:"},4:{name:"Final Primer Tiempo",weight:2,playTimer:0,abbreviation:"1T:"},5:{name:"Inicia Segundo Tiempo",weight:3,playTimer:1,abbreviation:"2T:"},8:{name:"Final Segundo Tiempo",weight:4,playTimer:0,abbreviation:"2T:"},9:{name:"Inicia Primer Tiempo Extra",weight:5,playTimer:1,abbreviation:"1T extra:"},12:{name:"Final Primer Tiempo Extra",weight:6,playTimer:0,abbreviation:"1T extra:"},10:{name:"Inicia Segundo Tiempo Extra",weight:7,playTimer:1,abbreviation:"2T extra:"},13:{name:"Final Segundo Tiempo Extra",weight:8,playTimer:0,abbreviation:"2T extra:"},11:{name:"Inicia Tanda de Penales",weight:9,playTimer:1,abbreviation:"Penales:"},15:{name:"Final Tanda de Penales",weight:10,playTimer:0,abbreviation:"Penales:"},6:{name:"Marcador Final",weight:11,playTimer:0,abbreviation:"Final"}};let O5=null;const sda={name:"TimeLine",components:{Tooltip:Cla,TimeLineEvent:rda},mixins:[Sla],props:{gameData:{type:Object,required:!0},timeLinePeriod:{type:String,default:"all"},socket:{type:Object,default:()=>({})},canPlayVideos:{type:Boolean,default:!0}},data(){return{gameEvents:[],gameEventsByPeriod:{firstHalf:[],secondHalf:[]},dataVideo:{visible:!1,link:""},gameEventsQueue:[],gameEventsUrl:"https://al2nv2dmkc.execute-api.us-west-2.amazonaws.com/prod/mxm/",transitionName:"",subscriptionInfo:{gameId:0,isSubscribed:!1},areGameEventsFilled:!1,timeLineWidth:812,eventContainerWidth:0,channelName:"",timeLineStatus:"awaiting",timeLeft:"",lastMinute:0,timeLineStatuses:[],currentStatus:{abbreviation:""},timer:"00:00"}},computed:{isMobile(){return this.timeLineWidth<580},gameEventWidth(){return this.timeLineWidth/2-30},gameEventsToShow(){return this.timeLinePeriod==="all"?this.gameEvents:this.gameEventsByPeriod[this.timeLinePeriod]}},watch:{gameData:{deep:!0,immediate:!0,handler(e){e&&e.id&&(this.gameDateTime=new Date(this.gameData.dateTimeUTC),this.gameEventsQueue=[],this.timeLineStatuses=[],this.transitionName="",this.checkTimeLeft(),e.status!==1&&this.socket&&this.socket.connected?this.subscribeToMXMChannel():this.timeLineStatus="finished",this.fillGameEvents(e.id))}},"socket.connected":{immediate:!0,handler(e){e&&this.gameData.id&&this.gameData.status!==1&&this.subscribeToMXMChannel()}},gameEvents(e){e.length&&this.gameData.status!==1&&(this.timeLineStatus="live")}},methods:{async fillGameEvents(e){try{const n=await this.fetchGameEvents(e);n?(this.gameEvents=[...n],this.checkGameEventsQueue(),this.sortGameEvents(),setTimeout(()=>{this.transitionName="list"},500)):this.gameEvents=[],this.gameData.status===1?this.lastMinute=`${this.gameEvents[this.gameEvents.length-1].minute}'`:this.checkTimeLineStatus()}catch(n){throw new Error(n)}},getGameEventClassAndSetIcon(e,n){return e.icon=n===0?"inicio_del_partido":ida[`${e.event_type_id}-${e.category_id}`],e.team_id===this.gameData.homeTeam.team_id||!e.team_id?(e.teamType=1,["home-team-event"]):(e.teamType=2,["away-team-event"])},getEventContainerClass(){return this.isMobile,["time-line-event__container--desktop"]},async fetchGameEvents(e){try{const{data:{plays:n}}=await nJ.get(`${this.gameEventsUrl}${e}`);return n}catch(n){throw new Error(n)}},subscribeToMXMChannel(){this.channelName=`mxm.game.${this.gameData.id}`,this.socket.emit("subscribe",{channel:this.channelName}),this.isSubscribed=!0},checkGameEventsQueue(){this.gameEventsQueue.length&&this.gameEvents.push(...this.gameEventsQueue),this.areGameEventsFilled=!0},setUpResizeObserver(){if(window.ResizeObserver)O5=new ResizeObserver(()=>{this.timeLineWidth=this.$refs.timeLine.clientWidth}),O5.observe(this.$refs.timeLine);else throw new Error("Resize observer not supported!")},updateContainerHeight(e,n){const r=this.$refs[`gameEventDiv${n}`][0],I=this.$refs[`gameEventLine${n}`]?this.$refs[`gameEventLine${n}`][0]:null,L=e+12;r&&(r.style.height=`${L}px`),I&&(I.style.height=`${L}px`)},sortGameEvents(){this.gameEvents.sort((e,n)=>this.getMatchLapseMinutes(e.match_lapse)+Number(e.minute)-(this.getMatchLapseMinutes(n.match_lapse)+Number(n.minute))),this.gameEventsByPeriod={firstHalf:[],secondHalf:[]},this.gameEvents.forEach(e=>{this.gameEventsByPeriod[e.match_lapse===1?"firstHalf":"secondHalf"].push(e)})},getMatchLapseMinutes(e){let n=0;switch(e){case 1:n=0;break;case 2:n=45;break;case 3:n=90;break;case 4:n=105;break;case 5:n=120;break}return n},addGameEventFromChannel(e){this.areGameEventsFilled?(this.gameEvents.push(e),this.sortGameEvents()):this.gameEventsQueue.push(e)},deleteGameEventFromChannel(e){const n=this.gameEvents.findIndex(r=>r.play_id===e.play_id);n&&this.gameEvents.splice(n,1)},checkTimeLineStatus(){this.gameEvents.forEach(n=>{const r=oda[n.game_status];r&&this.timeLineStatuses.push({...r,gameEvent:n})}),this.timeLineStatuses.sort((n,r)=>r.weight-n.weight);const e=this.timeLineStatuses[0];e&&(this.currentStatus=e,e.playTimer&&this.startTimer())},startTimer(){},getTeamLogoSrc(e="homeTeam"){const n=this.gameData[e].team_id;return Ela(n)},thumbnailClick(e){this.canPlayVideos&&(this.dataVideo.link=e,this.dataVideo.visible=!0)}},mounted(){this.$nextTick(()=>{this.setUpResizeObserver()})},beforeUnmount(){O5&&O5.unobserve(this.$refs.timeLine)},sockets:{new_mxm([e,n]){this.channelName===e&&this.addGameEventFromChannel(n)},update_mxm([e,n]){this.channelName===e&&(this.deleteGameEventFromChannel(n),this.addGameEventFromChannel(n))},delete_mxm([e,n]){this.channelName===e&&this.deleteGameEventFromChannel(n)}}},kJ=e=>(t.pushScopeId("data-v-2574e576"),e=e(),t.popScopeId(),e),lda={ref:"timeLine",class:"time-line"},cda={class:"time-line__header"},dda={class:"time-line__header__dot"},uda={class:"time-line__header__dot__home-team team-logo"},hda=["src"],pda={class:"time-line__header__dot__away-team team-logo"},fda=["src"],mda={key:1,class:"start-line"},gda=kJ(()=>t.createElementVNode("div",null,null,-1)),yda=kJ(()=>t.createElementVNode("div",null,null,-1)),vda=[gda,yda],_da={key:1,class:"noEventText"},bda={class:"tooltip-data"},xda=["src"];function wda(e,n,r,I,L,d){const g=t.resolveComponent("TimeLineEvent"),a=t.resolveComponent("Tooltip");return t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createElementVNode("div",lda,[t.createElementVNode("div",cda,[t.createElementVNode("div",dda,[t.createElementVNode("div",uda,[t.createElementVNode("img",{src:d.getTeamLogoSrc("homeTeam"),alt:""},null,8,hda)]),t.createElementVNode("div",pda,[t.createElementVNode("img",{src:d.getTeamLogoSrc("awayTeam"),alt:""},null,8,fda)])])]),(t.openBlock(),t.createElementBlock("div",{class:"time-line__game-events",key:`tlk-${L.gameEvents.length}`},[r.gameData.status!==4||r.gameData.is_live?(t.openBlock(),t.createBlock(t.TransitionGroup,{key:0,name:L.transitionName,tag:"div"},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(d.gameEventsToShow,(b,m)=>(t.openBlock(),t.createElementBlock("div",{class:"time-line__game-events__grid",key:b.play_id},[t.createElementVNode("div",{ref_for:!0,ref:`gameEventDiv${m}`,class:t.normalizeClass(d.getGameEventClassAndSetIcon(b,m))},[t.createElementVNode("div",{class:t.normalizeClass(d.getEventContainerClass(b))},[t.createVNode(g,{"game-event":b,"is-mobile":d.isMobile,"time-line-width":L.timeLineWidth,width:d.gameEventWidth,"can-play-videos":r.canPlayVideos,onEventHeight:i=>d.updateContainerHeight(i,m),onPlayerChanged:n[0]||(n[0]=i=>e.$emit("player-changed",i)),onThumbnailClick:d.thumbnailClick},null,8,["game-event","is-mobile","time-line-width","width","can-play-videos","onEventHeight","onThumbnailClick"])],2),m>0?(t.openBlock(),t.createElementBlock("div",{key:0,ref_for:!0,ref:`gameEventLine${m}`,class:"line"},null,512)):t.createCommentVNode("",!0),r.gameData.status===1&&m===d.gameEventsToShow.length-1?(t.openBlock(),t.createElementBlock("div",mda,vda)):t.createCommentVNode("",!0)],2)]))),128))]),_:1},8,["name"])):(t.openBlock(),t.createElementBlock("div",_da,"Aún no comienza el partido"))]))],512),t.createVNode(a,{data:L.dataVideo},{default:t.withCtx(()=>[t.createElementVNode("div",bda,[t.createElementVNode("div",null,[t.createElementVNode("video",{class:"tooltip-video",controls:"",autoplay:"",src:L.dataVideo.link,format:"video/mp4"},null,8,xda)])])]),_:1},8,["data"])],64)}const kda=kv(sda,[["render",wda],["__scopeId","data-v-2574e576"]]),Cda={class:"game-time-line__options"},Tda={class:"game-time-line__timeline"},Sda={__name:"GSC-GameTimeLine",props:{game:{type:Object,default:()=>({id:79601,seasonId:1772,status:1,dateTimeUTC:"2023-10-01T22:20:00Z",is_live:0,homeTeam:{logo:"https://az755631.vo.msecnd.net/teams-80/18.png",team_id:18,provisional_logo:"https://az755631.vo.msecnd.net/teams-provisional/18.png",colloquial_name:"Toluca",acronym:"TOL",team_name:"Toluca"},awayTeam:{logo:"https://az755631.vo.msecnd.net/teams-80/1.png",team_id:1,provisional_logo:"https://az755631.vo.msecnd.net/teams-provisional/1.png",colloquial_name:"Chivas",acronym:"CHI",team_name:"Guadalajara"}})},socket:{type:Object,default:()=>({})},canPlayVideos:{type:Boolean,default:!0}},setup(e){nJ.defaults.headers.common.Authorization="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MCwibmFtZSI6IlVzdWFyaW8gRnJlZSIsInVzZXJuYW1lIjoiZnJlZUBnb2xzdGF0cy5jb20iLCJlbWFpbCI6ImZyZWVAZ29sc3RhdHMuY29tIiwiaWF0IjoxNjA2NzU4Nzk1LCJleHAiOjE2MzgyOTQ3OTV9.kPNmP7yDtk38cAXrUyc7OHRh6J25VFqy-XUNzbK-4YE";const n=t.ref({width:"103px",height:"30px",borderRadius:"50px",borderColor:"#8a8a8a",borderWidth:"0.5px",backgroundColor:"rgba(255, 255, 255, 0.04)",fontSize:"14px",fontFamily:"Poppins-Regular, sans-serif",fontColor:"rgba(255, 255, 255, 0.5)",activeFontColor:"#FFFFFF",activeBorderColor:"#cbee6b"}),r=t.ref({width:"auto",height:"30px",padding:"0px 20px",borderRadius:"50px",borderColor:"#8a8a8a",borderWidth:"0.5px",backgroundColor:"rgba(255, 255, 255, 0.04)",fontSize:"14px",fontFamily:"Poppins-Regular, sans-serif",fontColor:"rgba(255, 255, 255, 0.5)",activeFontColor:"#FFFFFF",activeBorderColor:"#cbee6b"});let I=null;const L=t.ref(["Todo","1er tiempo","2do tiempo"]),d=t.ref("Todo"),g=t.ref({}),a=t.ref(null),b=t.ref(0),m=t.computed(()=>{let s="all";return d.value==="1er tiempo"||d.value==="1er"?s="firstHalf":(d.value==="2do tiempo"||d.value==="2do")&&(s="secondHalf"),s}),i=t.computed(()=>b.value<500);function v(s){d.value=s}function _(s){g.value=s}function c(){if(window.ResizeObserver)I=new ResizeObserver(()=>{b.value=a.value.clientWidth}),I.observe(a.value);else throw new Error("Resize observer not supported!")}return t.onMounted(()=>{c()}),t.onBeforeUnmount(()=>{I&&I.unobserve(a.value)}),(s,o)=>(t.openBlock(),t.createElementBlock("div",{ref_key:"gameTimeLine",ref:a,class:"game-time-line"},[t.createElementVNode("div",Cda,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(L.value,l=>(t.openBlock(),t.createElementBlock("div",{key:l,class:"game-time-line__options__option"},[t.createVNode(rsa,t.mergeProps(b.value<390?r.value:n.value,{text:l=="Todo"?l:b.value<390?l.substring(0,3):l,"is-active":d.value===l,onClick:u=>v(l)}),null,16,["text","is-active","onClick"])]))),128))]),t.createElementVNode("div",Tda,[t.createVNode(kda,{"game-data":e.game,"time-line-period":m.value,"is-mobile":i.value,socket:e.socket,"can-play-videos":e.canPlayVideos,onGameEventsByPeriodFilled:_},null,8,["game-data","time-line-period","is-mobile","socket","can-play-videos"])])],512))}},Eda=kv(Sda,[["__scopeId","data-v-f42d0c90"]]),tba="",Ada={class:"game-data__header"},Mda={class:"game-data__header__tournament-season-dropdown"},Ida={class:"game-data__header__teams-carousel"},Pda={class:"game-data__body"},Nda={class:"game-data__body__menu"},Bda={class:"game-data__body__menu__contmenuswitch"};cl.defaults.headers.common.Authorization="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MCwibmFtZSI6IlVzdWFyaW8gRnJlZSIsInVzZXJuYW1lIjoiZnJlZUBnb2xzdGF0cy5jb20iLCJlbWFpbCI6ImZyZWVAZ29sc3RhdHMuY29tIiwiaWF0IjoxNjA2NzU4Nzk1LCJleHAiOjE2MzgyOTQ3OTV9.kPNmP7yDtk38cAXrUyc7OHRh6J25VFqy-XUNzbK-4YE";const Oda=t.defineComponent({name:"TemplateVideos",components:{StatisticsMain:Ihe,GSCGameTimeLine:Eda,GscSwitchComponent:tS,GSCLineupsMain:u6e,GSCDatosGSMain:mMe,GSCVideoGame:K$e,ModalEvents:VD,GSCSummaryMain:Jyt,GSCTacticaFijaMain:asa,GSCProminentMain:GIt,GSCComparative:TOt}}),zda=Gr(Object.assign(Oda,{props:{tournamentsApiUrl:{type:String,default:""},currentSeasonId:{type:Number,default:0},defaultGameId:{type:Number,default:0,validator(e){return!Number.isNaN(e)&&e>=0}},sortCalendar:{type:Boolean,default:!0},socket:{type:Object,default:()=>null},isSynchronization:{type:Boolean,default:!1},isTeamGamePerPage:{type:Boolean,default:!1},clientPrivilegesBySeasons:{type:Object,default:()=>null},areTournamentAndSeasonSelectsVisible:{type:Boolean,default:!0},disabledSectionsIds:{type:Array,default:()=>[]},tournamentsIdsToInclude:{type:Set,default:()=>new Set}},emits:["openmedia","change-season-id","onOpenProfile","openProfileTeam","openProfilePlayer"],setup(e,{emit:n}){const r=e,I=ag();pu.on("socket-connected",()=>{I.commit("nextGeneral/updateIsSocketConnected",r.socket.connected)});const L=t.ref("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6NTg2LCJuYW1lIjoiSkFTIEdvbFN0YXRzIiwidXNlcm5hbWUiOiJ5YXRlYW1lcmljYSIsImVtYWlsIjoiIiwicHJvdmlkZXJfaWQiOjEsImxvZ2luX2dvbHN0YXRzIjoxLCJpYXQiOjE2OTYzNjU1ODcsImV4cCI6MTcyNzkwMTU4N30.jynRtgtFM8sf8gtqZJ-1gHLc2Ws13TIykXcfrlOvv1g"),d=t.ref({season:[]}),g=t.ref({}),a=t.ref(!1),b=t.ref({}),m=t.ref(1),i=t.ref(null),v=t.ref(null),_=t.ref(null),c=t.ref([]),s=t.ref(null),o=t.ref(!0),l=t.ref(new Set([1,2])),u=t.ref({}),h=t.ref({minute:"",recent_lapse:0,score:{}}),p=t.ref(0),f=t.ref("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MCwibmFtZSI6IlVzdWFyaW8gRnJlZSIsInVzZXJuYW1lIjoiZnJlZUBnb2xzdGF0cy5jb20iLCJlbWFpbCI6ImZyZWVAZ29sc3RhdHMuY29tIiwiaWF0IjoxNjA2NzU4Nzk1LCJleHAiOjE2MzgyOTQ3OTV9.kPNmP7yDtk38cAXrUyc7OHRh6J25VFqy-XUNzbK-4YE"),y=t.ref([{componentName:"GSCProminentMain",name:"Destacado",id:1},{componentName:"GSCVideoGame",name:"Video",id:2},{componentName:"StatisticsMain",name:"Estadísticas",id:4},{componentName:"GSCComparative",name:"Comparativa",id:3},{componentName:"GSCGameTimeLine",name:"Minuto a Minuto",id:5},{componentName:"GSCLineupsMain",name:"Alineaciones",id:6},{componentName:"GSCTacticaFijaMain",name:"Táctica Fija",id:7}]),w=t.ref([{componentName:"GSCProminentMain",name:"Destacado",id:1},{componentName:"GSCVideoGame",name:"Video",id:2},{componentName:"StatisticsMain",name:"Estadísticas",id:3},{componentName:"GSCComparative",name:"Comparativa",id:4},{componentName:"GSCGameTimeLine",name:"Minuto a Minuto",id:5},{componentName:"GSCLineupsMain",name:"Alineaciones",id:6},{componentName:"GSCTacticaFijaMain",name:"Táctica Fija",id:7}]),x=t.ref([{componentName:"GSCProminentMain",name:"Destacado",id:1},{componentName:"GSCVideoGame",name:"Video",id:2},{componentName:"StatisticsMain",name:"Estadísticas",id:3},{componentName:"GSCComparative",name:"Comparativa",id:4},{componentName:"GSCGameTimeLine",name:"Minuto a Minuto",id:5},{componentName:"GSCLineupsMain",name:"Alineaciones",id:6},{componentName:"GSCTacticaFijaMain",name:"Táctica Fija",id:7}]);t.ref([{componentName:"GSCProminentMain",name:"Destacado",id:1},{componentName:"GSCVideoGame",name:"Video",id:2},{componentName:"StatisticsMain",name:"Estadísticas",id:3},{componentName:"GSCComparative",name:"Comparativa",id:4},{componentName:"GSCGameTimeLine",name:"Minuto a Minuto",id:5},{componentName:"GSCLineupsMain",name:"Alineaciones",id:6},{componentName:"GSCTacticaFijaMain",name:"Táctica Fija",id:7}]);const M=t.ref(0);let k=null;const T=t.ref(null),S=t.ref(0),A=t.ref(w.value[0]),E=t.ref([]);let N=t.ref("");const C={seasonAndPrivileges:null,canPrivilegesTeamPlayVideos:!1,homeTeamDetails:{canPlayVideos:!1,team:{}},awayTeamDetails:{canPlayVideos:!1,team:{}}},z=t.computed(()=>{const be=[];return g.value&&g.value.id&&(be.push({id:g.value.id,name:g.value.name,type:g.value.type}),g.value.related_seasons&&g.value.related_seasons.forEach(pe=>{be.push({id:pe.id,type:pe.type})})),be}),P=t.computed(()=>{if(r.clientPrivilegesBySeasons){const be=r.clientPrivilegesBySeasons.seasonsAndPrivileges.get(g.value.id);if(be)return be.teamId}return 0});function O(){a.value=!1}function D(be){const pe=be.split(",");return!(pe.length<2||pe[1].split(" ").length<2)}function V(be){i.value=be}function R(be){c.value.push(be)}function j(be){s.value=be}function q(be){_.value=be}function $(be){v.value=be}function G(be){if(!D(be))return"";const pe=H(be);return`${Z(be)}. ${pe}`}function Z(be){return be.split(",")[1].split(" ")[1][0]}function H(be){const pe=be.split(",")[0].split(" ");return pe[0].length<=3&&pe.length>1?`${pe[0]} ${pe[1]}`:pe[0]}async function Y(be){try{const pe=cl.create({headers:{Authorization:`${L.value}`}});u.value={};const ce=await pe.get("https://al2nv2dmkc.execute-api.us-west-2.amazonaws.com/prod/mxm/"+be.game_id);u.value[be.home_team.team_id]=[],u.value[be.home_team.team_id].team={name:be.home_team.acronym,logo:be.home_team.logo},u.value[be.home_team.team_id].goals=[],u.value[be.home_team.team_id].red=[],u.value[be.home_team.team_id].yellow=[],u.value[be.visiting_team.team_id]=[],u.value[be.visiting_team.team_id].team={name:be.visiting_team.acronym,logo:be.visiting_team.logo},u.value[be.visiting_team.team_id].goals=[],u.value[be.visiting_team.team_id].red=[],u.value[be.visiting_team.team_id].yellow=[],ce.data.minute!=null&&(h.value={minute:ce.data.minute,recent_lapse:ce.data.recent_lapse,score:ce.data.score});for(let _e=0;_e<ce.data.plays.length;_e++)ce.data.plays[_e].category_name=="Roja"&&ce.data.plays[_e].status==1&&(be.home_team.team_id==ce.data.plays[_e].team_id?(G(ce.data.plays[_e].player_name)in u.value[be.home_team.team_id].red||(u.value[be.home_team.team_id].red[G(ce.data.plays[_e].player_name)]={},u.value[be.home_team.team_id].red[G(ce.data.plays[_e].player_name)].event=[],u.value[be.home_team.team_id].red[G(ce.data.plays[_e].player_name)].name=G(ce.data.plays[_e].player_name)),u.value[be.home_team.team_id].red[G(ce.data.plays[_e].player_name)].event.push(ce.data.plays[_e].minute)):(G(ce.data.plays[_e].player_name)in u.value[be.visiting_team.team_id].red||(u.value[be.visiting_team.team_id].red[G(ce.data.plays[_e].player_name)]={},u.value[be.visiting_team.team_id].red[G(ce.data.plays[_e].player_name)].event=[],u.value[be.visiting_team.team_id].red[G(ce.data.plays[_e].player_name)].name=G(ce.data.plays[_e].player_name)),u.value[be.visiting_team.team_id].red[G(ce.data.plays[_e].player_name)].event.push(ce.data.plays[_e].minute))),ce.data.plays[_e].category_name=="Amarilla"&&ce.data.plays[_e].status==1&&(be.home_team.team_id==ce.data.plays[_e].team_id?(G(ce.data.plays[_e].player_name)in u.value[be.home_team.team_id].yellow||(u.value[be.home_team.team_id].yellow[G(ce.data.plays[_e].player_name)]={},u.value[be.home_team.team_id].yellow[G(ce.data.plays[_e].player_name)].event=[],u.value[be.home_team.team_id].yellow[G(ce.data.plays[_e].player_name)].name=G(ce.data.plays[_e].player_name)),u.value[be.home_team.team_id].yellow[G(ce.data.plays[_e].player_name)].event.push(ce.data.plays[_e].minute)):(G(ce.data.plays[_e].player_name)in u.value[be.visiting_team.team_id].yellow||(u.value[be.visiting_team.team_id].yellow[G(ce.data.plays[_e].player_name)]={},u.value[be.visiting_team.team_id].yellow[G(ce.data.plays[_e].player_name)].event=[],u.value[be.visiting_team.team_id].yellow[G(ce.data.plays[_e].player_name)].name=G(ce.data.plays[_e].player_name)),u.value[be.visiting_team.team_id].yellow[G(ce.data.plays[_e].player_name)].event.push(ce.data.plays[_e].minute))),ce.data.plays[_e].event_type_name=="Gol"&&ce.data.plays[_e].status==1&&(be.home_team.team_id==ce.data.plays[_e].team_id?ce.data.plays[_e].category_name=="Autogol"?(G(ce.data.plays[_e].player_name)in u.value[be.visiting_team.team_id].goals||(u.value[be.visiting_team.team_id].goals[G(ce.data.plays[_e].player_name)]={},u.value[be.visiting_team.team_id].goals[G(ce.data.plays[_e].player_name)].event=[],u.value[be.visiting_team.team_id].goals[G(ce.data.plays[_e].player_name)].name=G(ce.data.plays[_e].player_name)),u.value[be.visiting_team.team_id].goals[G(ce.data.plays[_e].player_name)].event.push(ce.data.plays[_e].minute)):(G(ce.data.plays[_e].player_name)in u.value[be.home_team.team_id].goals||(u.value[be.home_team.team_id].goals[G(ce.data.plays[_e].player_name)]={},u.value[be.home_team.team_id].goals[G(ce.data.plays[_e].player_name)].event=[],u.value[be.home_team.team_id].goals[G(ce.data.plays[_e].player_name)].name=G(ce.data.plays[_e].player_name)),u.value[be.home_team.team_id].goals[G(ce.data.plays[_e].player_name)].event.push(ce.data.plays[_e].minute)):ce.data.plays[_e].category_name=="Autogol"?(G(ce.data.plays[_e].player_name)in u.value[be.home_team.team_id].goals||(u.value[be.home_team.team_id].goals[G(ce.data.plays[_e].player_name)]={},u.value[be.home_team.team_id].goals[G(ce.data.plays[_e].player_name)].event=[],u.value[be.home_team.team_id].goals[G(ce.data.plays[_e].player_name)].name=G(ce.data.plays[_e].player_name)),u.value[be.home_team.team_id].goals[G(ce.data.plays[_e].player_name)].event.push(ce.data.plays[_e].minute)):(G(ce.data.plays[_e].player_name)in u.value[be.visiting_team.team_id].goals||(u.value[be.visiting_team.team_id].goals[G(ce.data.plays[_e].player_name)]={},u.value[be.visiting_team.team_id].goals[G(ce.data.plays[_e].player_name)].event=[],u.value[be.visiting_team.team_id].goals[G(ce.data.plays[_e].player_name)].name=G(ce.data.plays[_e].player_name)),u.value[be.visiting_team.team_id].goals[G(ce.data.plays[_e].player_name)].event.push(ce.data.plays[_e].minute)))}catch(pe){return Promise.reject(pe)}}function K(be){a.value=!0,be.is_live!=1&&(be.game_status==4||Object.keys(be.minutes).length>0)?(p.value=1,u.value={plays:be.minutes,home_team:be.home_team,visiting_team:be.visiting_team}):(p.value=0,Y(be))}function le(){k=new ResizeObserver(be=>{for(const pe of be)S.value=pe.contentRect.width}),k.observe(T.value)}const oe=t.computed(()=>{let be={};return b.value&&b.value.game_id&&(be={gameId:b.value.game_id,id:b.value.game_id,seasonId:b.value.season_id,status:b.value.game_status,game_status:b.value.game_status==0?4:b.value.game_status,dateTimeUTC:b.value.date_time_utc,homeTeam:b.value.home_team,awayTeam:b.value.visiting_team,is_live:b.value.is_live,minutes:b.value.minutes}),be});t.watch(()=>oe,be=>{Object.keys(be.value).length>0&&(w.value=[],be.value.is_live==1||be.value.game_status==4?(w.value=[...y.value],A.value=y.value[0]):(w.value=[...x.value],A.value=x.value[0]),g.value.is_tactic_available==0&&w.value.pop(),M.value+=1,Y({game_id:be.value.gameId,home_team:be.value.homeTeam,visiting_team:be.value.awayTeam}),be.value.is_live==1&&setInterval(()=>{p.value=0,Y({game_id:be.value.gameId,home_team:be.value.homeTeam,visiting_team:be.value.awayTeam})},6e4))},{deep:!0,immediate:!0}),t.watch(()=>I.state.nextGeneral.gameForAnalysis,()=>{I.commit("nextGeneral/updateIsSocketConnected",r.socket.connected)},{deep:!0,immediate:!0});function ne(be){m.value=be.is_captured,o.value=be.is_captured!==0,d.value.id!==be.id&&(d.value=be,I.commit("gameGlobal/setTournamentType",be.tournament_type))}function re(be){ve.value&&!ve.value.canPrivilegesTeamPlayVideos||((b.value.is_live||b.value.game_status===0)&&(be.liveGameConfig={gameId:b.value.game_id}),n("openmedia",be))}function te(be){n("onOpenProfile",be)}function ee(be){n("openProfileTeam",be)}function se(be){n("openProfilePlayer",be)}function he(be){Ce(be),be=="Estadísticas"&&(N.value="Comparativa")}function ue(){N.value=""}function fe(be){g.value.id!==be.id&&(g.value=be,n("change-season-id",be.id))}const ge=t.computed(()=>w.value.reduce((be,pe)=>(r.disabledSectionsIds.includes(pe.id)||ve.value&&!ve.value.canPrivilegesTeamPlayVideos&&pe.id===2||r.clientPrivilegesBySeasons&&pe.id===7||(o.value||pe.id!==5&&pe.id!==6)&&be.push(pe.name),be),[])),ve=t.computed(()=>{if(r.clientPrivilegesBySeasons){if(g.value&&b.value&&b.value.game_id){const be=r.clientPrivilegesBySeasons.seasonsAndPrivileges.get(g.value.id);if(be)if(ke(be.playingAs),b.value.game_status===1){const pe=be.playingAs.has(b.value.playingAs);return{seasonAndPrivileges:be,canPrivilegesTeamPlayVideos:r.clientPrivilegesBySeasons.canPlayVideos&&pe,isPrivilegesTeamOnly:!1,isPrivilegesTeamHome:b.value.home_team.team_id===be.teamId,homeTeamDetails:{canPlayVideos:pe,team:b.value.home_team},awayTeamDetails:{canPlayVideos:pe,team:b.value.visiting_team}}}else{const pe=b.value.home_team.team_id===be.teamId,ce=we.value.filter(Ne=>be.playingAs.has(Ne.playingAs));return{seasonAndPrivileges:be,canPrivilegesTeamPlayVideos:r.clientPrivilegesBySeasons.canPlayVideos&&ce.length>0,isPrivilegesTeamOnly:!0,isPrivilegesTeamHome:pe,homeTeamDetails:{canPlayVideos:r.clientPrivilegesBySeasons.canPlayVideos&&pe&&ce.length>0,team:b.value.home_team},awayTeamDetails:{canPlayVideos:r.clientPrivilegesBySeasons.canPlayVideos&&!pe&&ce.length>0,team:b.value.visiting_team}}}ke(new Set)}return C}return null}),we=t.computed(()=>{if(r.clientPrivilegesBySeasons){if(g.value){const be=r.clientPrivilegesBySeasons.seasonsAndPrivileges.get(g.value.id);if(be)return E.value.filter(pe=>pe.game_status===1&&be.playingAs.has(pe.playingAs))}return[]}return[]});t.watch(ge,()=>{ve.value&&!ve.value.canPrivilegesTeamPlayVideos&&A.value.id===2&&Ce("Resumen")},{deep:!0,immediate:!0});function ke(be){l.value=be}function Ce(be){if(i.value!=null&&(clearInterval(i.value),i.value=null),v.value!=null&&(clearInterval(v.value),v.value=null),_.value!=null&&(clearInterval(_.value),_.value=null),s.value!=null&&(clearInterval(s.value),s.value=null),c.value.length>0){for(let pe of c.value)clearInterval(pe);c.value=[]}A.value=w.value.find(pe=>pe.name===be)||w.value[0]}t.onMounted(()=>{le(),t.nextTick(()=>{r.isSynchronization&&Ce("Táctica Fija")})}),t.onBeforeUnmount(()=>{if(k&&k.disconnect(),i.value!=null&&(clearInterval(i.value),i.value=null),v.value!=null&&(clearInterval(v.value),v.value=null),_.value!=null&&(clearInterval(_.value),_.value=null),s.value!=null&&(clearInterval(s.value),s.value=null),c.value.length>0){for(let be of c.value)clearInterval(be);c.value=[]}iie()});function Ie(be){if(be.playingAs||(be.playingAs=P.value?be.home_team.team_id===P.value?1:2:0),i.value!=null&&(clearInterval(i.value),i.value=null),v.value!=null&&(clearInterval(v.value),v.value=null),_.value!=null&&(clearInterval(_.value),_.value=null),s.value!=null&&(clearInterval(s.value),s.value=null),c.value.length>0){for(let pe of c.value)clearInterval(pe);c.value=[]}b.value=be}function Ve(be){E.value=be.map(pe=>{const ce={...pe};return P.value&&(ce.playingAs=ce.home_team.team_id===P.value?1:2),ce})}return(be,pe)=>(t.openBlock(),t.createElementBlock("div",{class:"game-data",ref_key:"gamedata",ref:T},[t.createElementVNode("div",Ada,[t.withDirectives(t.createElementVNode("div",Mda,[t.createVNode(t.unref(CM),{"current-season-id":e.currentSeasonId,onInput:ne,"tournaments-ids-to-include":e.tournamentsIdsToInclude,"api-url":e.tournamentsApiUrl},null,8,["current-season-id","tournaments-ids-to-include","api-url"]),t.createVNode(t.unref(EM),{"current-season-id":e.currentSeasonId,seasons:d.value.seasons,onInput:fe},null,8,["current-season-id","seasons"])],512),[[t.vShow,e.areTournamentAndSeasonSelectsVisible]]),t.createElementVNode("div",Ida,[t.createVNode(t.unref(Oae),{"plays-live":u.value,"info-live":h.value,token:f.value,is_captured:m.value,"await-for-seasons":"",seasons:z.value,"is-pagination-visible":!1,"are-games-carousel-type":"","default-game-id":e.defaultGameId,"sort-calendar":e.sortCalendar,"is-team-game-per-page":e.isTeamGamePerPage,"client-privileges-team-id":P.value,"only-games-team-id":P.value,"tournament-type":t.unref(I).state.gameGlobal.tournamentType,onChangeGameCarousel:Ie,onOpenModalEvent:K,onChangeGamesByClientPrivileges:Ve},null,8,["plays-live","info-live","token","is_captured","seasons","default-game-id","sort-calendar","is-team-game-per-page","client-privileges-team-id","only-games-team-id","tournament-type"])])]),a.value?(t.openBlock(),t.createBlock(VD,{key:0,width:S.value,onCloseModalEventsLive:O,plays:u.value,game:b.value,type:p.value},null,8,["width","plays","game","type"])):t.createCommentVNode("",!0),t.createElementVNode("div",Pda,[t.createElementVNode("div",Nda,[t.createElementVNode("div",Bda,[t.createVNode(t.unref(tS),{type:2,buttons:ge.value,"font-family":"Poppins-Regular","font-size":"16px",width:S.value<400||S.value<700?"max-content":S.value<840||S.value<1050?"155px":"165px","selected-option":A.value.name,borderWidth:"1px",arrow:!1,height:"30px",onInput:Ce},null,8,["buttons","width","selected-option"])])]),oe.value&&oe.value.gameId?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(A.value.componentName),{key:M.value,game:oe.value,onIntervalid:V,onIntervalidpossesion:$,onIntervalidhighlive:q,onIntervalidtops:R,onIntervalidgs:j,subsection:t.unref(N),seasonSelected:g.value,tournamentSelected:d.value,showLineups:o.value,socket:e.socket,is_captured:m.value,"is-tactic-visible":!!g.value.show_tactic,"is-synchronization":e.isSynchronization,"can-play-videos":ve.value?ve.value.canPrivilegesTeamPlayVideos:!0,"video-privileges-playing-as":l.value,"client-privileges-team-id":P.value,"play-videos-privileges":ve.value,token:f.value,onResetSubsection:ue,onOpenmedia:re,onOnOpenProfile:te,onOpenProfileTeam:ee,onOpenProfilePlayer:se,onChangeToTab:he,onOpenMediaPlayer:re},null,40,["game","subsection","seasonSelected","tournamentSelected","showLineups","socket","is_captured","is-tactic-visible","is-synchronization","can-play-videos","video-privileges-playing-as","client-privileges-team-id","play-videos-privileges","token"])):t.createCommentVNode("",!0)])],512))}}),[["__scopeId","data-v-133a243f"]]);async function gd({url:e,options:n={},retries:r=3}){return await cl.get(e,n).then(I=>I).catch(I=>r>0?gd({url:e,options:n,retries:r-1}):I)}async function CJ({seasonId:e},n=!0){try{return(await(await fetch(`https://golstats-microservices.s3-us-west-2.amazonaws.com/statsLeagueBySeason-${e}.json`)).json()).data}catch(r){if(n)return CJ({seasonId:e},!1);throw new Error(r)}}async function Lda({seasonId:e}){try{return(await gd({url:`https://iwxfzq6e2h.execute-api.us-west-2.amazonaws.com/prod/v2/statisticsLeagueBySeason/${e}`})).data.data}catch(n){return Promise.reject(n)}}async function Fda({seasonId:e}){try{return(await gd({url:`https://sqf4rkvoge.execute-api.us-west-2.amazonaws.com/prod/v3/statisticsGroupedBySeason/${e}`})).data.data}catch(n){return Promise.reject(n)}}function Dda(e,n,r,I,L,d,g=!1){const a=r.map(b=>b===1?2:b===2?1:3);return e.filter(b=>{const m=d&&b[L.teamId]?b[L.teamId]!==d:!1,i=n===1?2:1;return(g||I.includes(b[L.gameId]))&&(!n||(m?i:n)===b[L.playingAs])&&(r.includes(b[L.matchResult])&&b[L.teamId]===d||a.includes(b[L.matchResult])&&b[L.teamId]!==d)})}function TJ(e,n,r,I,L){return n.length===2&&r.length===3&&I.length===6?e:e.filter(d=>n.includes(d[L.playingAs])&&r.includes(d[L.matchResult])&&I.includes(d[L.section]))}async function SJ({seasonId:e}){try{const n=`https://8tvo5bp9ai.execute-api.us-west-2.amazonaws.com/prod/gamesBySeason/${e}`;return(await gd({url:n})).data}catch(n){return Promise.reject(n)}}async function Vda({seasonId:e,gameId:n}){try{const r=`https://iwxfzq6e2h.execute-api.us-west-2.amazonaws.com/prod/v2/statisticsLeagueBySeason/${e}/games/${n}`,{data:I}=await gd({url:r});return I}catch(r){return Promise.reject(r)}}async function Rda({gameId:e}){try{const n=`https://2uj7ojhmt5.execute-api.us-west-2.amazonaws.com/prod/V2/statisticsLive/${e}`;return(await gd({url:n})).data.data}catch(n){return Promise.reject(n)}}async function $da({gameId:e}){try{const n=`https://55sbpmq0f5.execute-api.us-west-2.amazonaws.com/prod/specialMentions/${e}`;return(await gd({url:n})).data.data||[]}catch(n){return Promise.reject(n)}}const jda=["categoryId","matchLapse","section","matchResult","playingAs","total"];let IE=null;function EJ(){return IE||(IE=z0(jda)),IE}async function Uda(e){try{const n=`https://d2oco6mqmc.execute-api.us-west-2.amazonaws.com/prod/teamsBySeason/${e.seasonId}`;return(await gd({url:n})).data}catch(n){return Promise.reject(n)}}async function AJ({seasonId:e,teamId:n}){try{return await gd({url:`https://a4dcb6avog.execute-api.us-west-2.amazonaws.com/prod/v2/statisticsTeamBySeason/${e}/${n}`})}catch(r){return Promise.reject(r)}}async function Hda(e){try{const n=`https://yjeig444bb.execute-api.us-west-2.amazonaws.com/prod/teamsBySeason/${e.seasonId}`;return await gd({url:n})}catch(n){return Promise.reject(n)}}async function Gda(e){try{return await gd({url:`https://nckawv8v3b.execute-api.us-west-2.amazonaws.com/prod/v2/statisticsByGame/${e.gameId}`})}catch(n){return Promise.reject(n)}}const Wda={leagueGeneral:{namespaced:!0,state:{seasonPlays:[],currentSeasonGames:[],currentSeasonTeams:[],selectedRound:1,booleanAreLiveGames:!1,booleanIsLiveGamesModalOpen:!1},getters:{seasonPlays:e=>e.seasonPlays,filteredPlaysStack(e,n,r,I){return Dda(e.seasonPlays,I["filterGeneral/getPlayingAs"],I["filterGeneral/getResults"],I["filterGeneral/getSelectedGamesIds"],EJ(),I["teamsGeneral/team"].team_id,!0)},nextGamesSchedule(e){const n=e.currentSeasonGames.reduce((r,I)=>{const L={...I};return L.home_team=e.currentSeasonTeams.find(d=>d.team_id===I.home_team),L.visiting_team=e.currentSeasonTeams.find(d=>d.team_id===I.visiting_team),r[I.matchday_abbreviation]?r[I.matchday_abbreviation][I.game_status===3?"canceled":I.date]?r[I.matchday_abbreviation][I.game_status===3?"canceled":I.date].push(L):r[I.matchday_abbreviation][I.game_status===3?"canceled":I.date]=[L]:r[I.matchday_abbreviation]={[I.game_status===3?"canceled":I.date]:[L]},r},{});for(let[r,I]of Object.entries(n))n[r]=Object.entries(I).map(([L,d])=>({date:L,games:d})),n[r].sort((L,d)=>L.date<d.date?-1:L.date>d.date?1:0);return n},matchdaysDates(e,n){let r=[];if(n.nextGamesSchedule){let I=Object.keys(n.nextGamesSchedule);for(let L of I){let d=Number(L.replace("M","")),g=n.nextGamesSchedule[L].map(a=>({matchday:d,date:new Date(a.date)}));r=r.concat(g)}}return r},closestMatchDay(e,n){let r=new Date,I=0,L=-new Date(0,0,0).valueOf(),d=n.matchdaysDates,g=d.length;for(let a=0;a<d.length;a++)I=Math.abs(d[a].date-r),I<L&&(g=a,L=I);return d[g]?d[g].matchday:1}},mutations:{setBooleanIsLiveGamesModalOpen(e,n){e.booleanIsLiveGamesModalOpen=n},setBooleanAreLiveGames(e,n){e.booleanAreLiveGames=n},updateSeasonPlays(e,n){e.seasonPlays=n},updateCurrentSeasonTeams(e,n){e.currentSeasonTeams=n},updateCurrentSeasonGames(e,n){e.currentSeasonGames=n},updateSelectedRound(e,n){e.selectedRound=n}},actions:{async getSeasonPlays({commit:e,rootGetters:n},r=!1){try{const I=await CJ({seasonId:n["filterGeneral/getSeasonId"]});if(r)return I;e("updateSeasonPlays",I)}catch(I){return Promise.reject(I)}},async getCurrentSeasonGames({commit:e,rootGetters:n}){try{const r=await SJ({seasonId:n["loginGeneral/seasonId"]});e("updateCurrentSeasonGames",r)}catch(r){return Promise.reject(r)}},async getCurrentSeasonTeams({commit:e,rootGetters:n}){try{const r=await Uda({seasonId:n["loginGeneral/seasonId"]});e("updateCurrentSeasonTeams",r.teams)}catch(r){return Promise.reject(r)}},async isDataFilled({state:e,dispatch:n,commit:r}){try{if(e.currentSeasonGames.length>0&&e.currentSeasonTeams.length>0)return r("setIsSectionLoading",!1,{root:!0}),!0;const I=[void 0,void 0];return e.currentSeasonGames.length===0&&(I[0]=n("getCurrentSeasonGames")),e.currentSeasonTeams.length===0&&(I[1]=n("getCurrentSeasonTeams")),await Promise.all(I),!1}catch(I){throw new Error(I)}}}}};async function qda({filter:e}){try{const n=`https://n7ielynjxk.execute-api.us-east-2.amazonaws.com/qa/filters?filters=${e}`,{data:r}=await gd({url:n});return r}catch(n){return Promise.reject(n)}}const Yda=["categoryId","teamId","matchResult","playingAs","matchLapse","section","total"];let PE=null;function Zda(){return PE||(PE=z0(Yda)),PE}class z5{constructor(){ll(this,"maximumLiveSection",1);ll(this,"accomplished",{totalPostGame:0,avgPostGame:0,avgPreGame:0,totalLive:0,avgPostGameTrendLive:{accumulated:this.getZeroTotalsTrendSections(),sections:this.getZeroTotalsTrendSections()},totalsLiveTrendLive:{accumulated:this.getZeroTotalsTrendSections(),sections:this.getZeroTotalsTrendSections()},ranking:null,leader:{},arrayRankings:[]});ll(this,"received",{totalPostGame:0,avgPostGame:0,totalLive:0,avgPostGameTrendLive:{accumulated:this.getZeroTotalsTrendSections(),sections:this.getZeroTotalsTrendSections()},totalsLiveTrendLive:{accumulated:this.getZeroTotalsTrendSections(),sections:this.getZeroTotalsTrendSections()},ranking:null,leader:{}})}setMaximumLiveSection(n){n>this.maximumLiveSection&&(this.maximumLiveSection=n)}getZeroTotalsTrendSections(){return[0,0,0,0,0,0]}resetTotals(){this.accomplished.totalPostGame=0,this.accomplished.avgPostGame=0,this.received.totalPostGame=0,this.received.avgPostGame=0,this.accomplished.avgPostGameTrendLive.sections=this.getZeroTotalsTrendSections(),this.accomplished.avgPostGameTrendLive.accumulated=this.getZeroTotalsTrendSections(),this.received.avgPostGameTrendLive.sections=this.getZeroTotalsTrendSections(),this.received.avgPostGameTrendLive.accumulated=this.getZeroTotalsTrendSections()}resetTotalsLive(){this.accomplished.totalLive=0,this.received.totalLive=0,this.accomplished.totalsLiveTrendLive.sections=this.getZeroTotalsTrendSections(),this.accomplished.totalsLiveTrendLive.accumulated=this.getZeroTotalsTrendSections(),this.received.totalsLiveTrendLive.sections=this.getZeroTotalsTrendSections(),this.received.totalsLiveTrendLive.accumulated=this.getZeroTotalsTrendSections()}increaseAccomplishedByOne(n,r,I){I&&(this.setMaximumLiveSection(n),this.accomplished.totalLive+=r,this.accomplished.totalsLiveTrendLive.sections[n-1]+=r,this.increaseTrendLiveAccumulatedByOne(this.accomplished.totalsLiveTrendLive,n,r)),this.accomplished.totalPostGame+=r,this.accomplished.avgPostGameTrendLive.sections[n-1]+=r,this.increaseTrendLiveAccumulatedByOne(this.accomplished.avgPostGameTrendLive,n,r)}increaseReceivedByOne(n,r,I){I&&(this.setMaximumLiveSection(n),this.received.totalLive+=r,this.received.totalsLiveTrendLive.sections[n-1]+=r,this.increaseTrendLiveAccumulatedByOne(this.received.totalsLiveTrendLive,n,r)),this.received.totalPostGame+=r,this.received.avgPostGameTrendLive.sections[n-1]+=r,this.increaseTrendLiveAccumulatedByOne(this.received.avgPostGameTrendLive,n,r)}increaseTrendLiveAccumulatedByOne(n,r,I){for(let L=r-1;L<n.accumulated.length;L++)n.accumulated[L]+=I}decreaseAccomplishedLiveByOne(n,r){this.accomplished.totalLive>0&&(this.accomplished.totalLive-=r),this.accomplished.totalsLiveTrendLive.sections[n-1]>0&&(this.accomplished.totalsLiveTrendLive.sections[n-1]-=r,this.decreaseTotalsLiveTrendLiveAccumulatedByOne(this.accomplished.totalsLiveTrendLive,n,r))}decreaseReceivedLiveByOne(n,r){this.received.totalLive>0&&(this.received.totalLive-=r),this.received.totalsLiveTrendLive.sections[n-1]>0&&(this.received.totalsLiveTrendLive.sections[n-1]-=r,this.decreaseTotalsLiveTrendLiveAccumulatedByOne(this.received.totalsLiveTrendLive,n,r))}decreaseTotalsLiveTrendLiveAccumulatedByOne(n,r,I){for(let L=n.accumulated.length-1;L>=r-1;L--)n.accumulated[L]-=I}calculateAvg(n){n&&(this.accomplished.avgPostGame=this.accomplished.totalPostGame/n,this.received.avgPostGame=this.received.totalPostGame/n,this.accomplished.avgPostGameTrendLive.sections=this.getAvgPostGameTrendLiveAvg(this.accomplished.avgPostGameTrendLive.sections,n),this.accomplished.avgPostGameTrendLive.accumulated=this.getAvgPostGameTrendLiveAvg(this.accomplished.avgPostGameTrendLive.accumulated,n),this.received.avgPostGameTrendLive.sections=this.getAvgPostGameTrendLiveAvg(this.received.avgPostGameTrendLive.sections,n),this.received.avgPostGameTrendLive.accumulated=this.getAvgPostGameTrendLiveAvg(this.received.avgPostGameTrendLive.accumulated,n))}getAvgPostGameTrendLiveAvg(n,r){return n.map(I=>I/r)}calculateRanking(n,r,I,L,d,g,a,b){let m=[];L===3&&n&&n.length&&(I.playingAs.length!==2||I.matchResult.length!==3)?m=Array.from(n.reduce((v,_)=>{const c=_[r.playingAs]===1,s=c?"1":"2",o=v.get(_[r.gameId]);if(o)o[s]?o[s].arrayPlays.push(_):o[s]={numberTeamId:_[r.teamId],arrayPlays:[_]};else{const l={numberMatchResult:_[r.matchResult]};c&&(l[1]={numberTeamId:_[r.teamId],arrayPlays:[_]}),v.set(_[r.gameId],l)}return v},new Map).values()).reduce((v,_)=>{const c=I.playingAs.length===2?"both":I.playingAs[0].toString();return(c==="both"&&(_[1].numberTeamId===I.teamId||_[2].numberTeamId===I.teamId)||c!=="both"&&_[c].numberTeamId===I.teamId)&&I.matchResult.includes(_.numberMatchResult)&&v.push(..._[1].arrayPlays,..._[2].arrayPlays),v},[]).filter(v=>I.sections.includes(v[r.section])):(m=n?[...n]:[],a&&n&&(m=n.filter(i=>I.playingAs.includes(i[r.playingAs])&&I.matchResult.includes(i[r.matchResult])&&I.sections.includes(i[r.section])))),this.setTeamRanking(m,L,r,I.teamId,g,"accomplished",b)}setTeamRanking(n,r,I,L,d,g,a){let b=null,m=null;r===3&&(b=new Map,m={},n.forEach(_=>{const c=b.get(_[I.gameId]);c?c[_[I.teamId.toString()]]?c[_[I.teamId.toString()]]+=_[I.total]:c[_[I.teamId.toString()]]=_[I.total]:b.set(_[I.gameId],{[_[I.teamId.toString()]]:_[I.total]})}),Array.from(b.values()).forEach(_=>{const[c,s]=Object.keys(_).map(l=>l),o=_[c]+_[s];this.addPassesAvgByTeam(m,c,o?_[c]/o:0),this.addPassesAvgByTeam(m,s,o?_[s]/o:0)}));const i=d.sort((_,c)=>_.team_id-c.team_id).map(_=>{if(r===3){const c=m[_.team_id.toString()];return{teamId:_.team_id,points:c?c.numberTotalPassesAvg/c.numberGamesCount:0,total:c?c.numberTotalPassesAvg:0}}else{const c=n.reduce((s,o)=>o[I.teamId]===_.team_id&&r===o[I.categoryId]?s+o[I.total]:s,0);return{teamId:_.team_id,points:_[`${a}FilterGames`]?c/_[`${a}FilterGames`]:0,total:c}}}).sort((_,c)=>c.points-_.points);this.accomplished.arrayRankings=i;const v=i.findIndex(_=>_.teamId===L);r===3&&(this.accomplished.avgPreGame=i[v].points),this[g].ranking=v+1,this[g].leader=i[0]}addPassesAvgByTeam(n,r,I){n[r]?(n[r].numberGamesCount+=1,n[r].numberTotalPassesAvg+=I):n[r]={numberGamesCount:1,numberTotalPassesAvg:I}}}class po{constructor(n,r,I,L,d,g,a,b,m,i){ll(this,"id","");ll(this,"generalId",0);ll(this,"name","");ll(this,"names",{"0-0":"","1-1":"","0-1":"","1-0":""});ll(this,"mentions",{"0-0":"","1-1":"","0-1":"","1-0":""});ll(this,"accomplishedCategoryIds",[]);ll(this,"receivedCategoryIds",[]);ll(this,"generalCategoriesIds",{accomplished:0,received:0});ll(this,"specialMention","");ll(this,"homeTeam",new z5);ll(this,"visitingTeam",new z5);ll(this,"isLeagueDataCalculated",!1);ll(this,"leagueAccomplishedMax",0);ll(this,"leagueReceivedMax",0);ll(this,"leagueAccomplishedAvg",0);ll(this,"leagueReceivedAvg",0);ll(this,"leagueAccomplishedAccumulator",0);ll(this,"leagueReceivedAccumulator",0);ll(this,"homeTeamType","homeTeam");ll(this,"visitingTeamType","visitingTeam");ll(this,"betOnly",!1);ll(this,"isPercent",!1);this.id=`${I.accomplished}-${I.received}`,this.accomplishedCategoryIds=n||[],this.receivedCategoryIds=r||[],this.generalCategoriesIds=I||{accomplished:0,received:0},this.name=L,this.names["0-0"]=L||"",this.names["1-1"]=d||"",this.names["0-1"]=g||"",this.names["1-0"]=a||"",this.generalId=b||0,this.betOnly=m||!1,this.isPercent=i||!1}addLeaguePlays(n,r,I){n.length===0||!I||this.isLeagueDataCalculated||(n.forEach(L=>{this.isAccomplishedLeaguePlay(L[r.categoryId])&&(this.leagueAccomplishedAccumulator+=L[r.total]),this.isReceivedLeaguePlay(L[r.categoryId])&&(this.leagueReceivedAccumulator+=L[r.total])}),this.leagueAccomplishedAvg=(this.leagueAccomplishedAccumulator/(2*I)).toFixed(2),this.leagueAccomplishedMax=Math.round(this.leagueAccomplishedAvg*1.5),this.leagueReceivedAvg=(this.leagueReceivedAccumulator/(2*I)).toFixed(2),this.leagueReceivedMax=Math.round(this.leagueReceivedAvg*1.5),this.isLeagueDataCalculated=!0)}addSpecialMention(n,r,I){let L="-";for(const[d,g]of Object.entries(this.generalCategoriesIds))n===g&&(L=`${d==="accomplished"?"0":"1"}${L}`),r===g&&(L=`${L}${d==="accomplished"?"0":"1"}`);L.length===3&&(this.mentions[L]=I)}resetMentions(){this.mentions={"0-0":"","1-1":"","0-1":"","1-0":""}}addTeamPlays(n,r,I,L,d){!I||!d||n!==this.homeTeamType&&n!==this.visitingTeamType||(I.forEach(g=>{this.isAccomplishedPlay(g[L.categoryId])?this[n].increaseAccomplishedByOne(g[L.section],g[L.total]):this.isReceivedPlay(g[L.categoryId])&&this[n].increaseReceivedByOne(g[L.section],g[L.total])}),this[n].calculateAvg(d))}addLivePlay(n,r,I,L,d=!1,g=!1){(n===this.homeTeamType||n===this.visitingTeamType)&&I[L.categoryId].includes(this.generalCategoriesIds.accomplished)&&this[n].increaseAccomplishedByOne(I[L.section],I[L.total],!0)}subtractLivePlay(n,r,I,L,d){(n===this.homeTeamType||n===this.visitingTeamType)&&(this.isAccomplishedPlay(I[L.categoryId])&&!d?this[n].decreaseAccomplishedLiveByOne(I[L.section],I[L.total]):this.isReceivedPlay(I[L.categoryId])&&d&&this[n].decreaseReceivedLiveByOne(I[L.section],I[L.total]))}isAccomplishedLeaguePlay(n){return!!(this.receivedCategoryIds[0]===40?this.receivedCategoryIds:this.accomplishedCategoryIds).find(I=>n===I||`${n}_r`===I)}isReceivedLeaguePlay(n){return!!this.receivedCategoryIds.find(r=>n===r)}isAccomplishedPlay(n){return this.generalCategoriesIds.accomplished===n}isReceivedPlay(n){return this.generalCategoriesIds.received===n}calcRankingLeague(n,r,I,L,d,g=!1){this[this.homeTeamType].calculateRanking(n,r,I,this.generalCategoriesIds.accomplished,this.generalCategoriesIds.received,d,g,this.homeTeamType),this[this.visitingTeamType].calculateRanking(n,r,L,this.generalCategoriesIds.accomplished,this.generalCategoriesIds.received,d,g,this.visitingTeamType)}resetData(){this.homeTeam=new z5,this.visitingTeam=new z5,this.isLeagueDataCalculated=!1,this.leagueAccomplishedMax=0,this.leagueReceivedMax=0,this.leagueAccomplishedAvg=0,this.leagueReceivedAvg=0,this.leagueAccomplishedAccumulator=0,this.leagueReceivedAccumulator=0}isInGeneralCategory(n){return this.generalCategoriesIds.accomplished===n||this.generalCategoriesIds.received===n}}const Jda={general:{name:"General",priority:1,parentInfo:{parentAnalysis:[1],analysisTypeBlocks:[1]},subcategories:{goals:new po([12,55,"35_r","54_r"],null,{accomplished:1,received:0},"Goles","Goles recibidos","Goles realizados / recibidos","Goles recibidos / realizados",1),shotToGoal:new po([91,95,158,167,176,343,330,333,423],null,{accomplished:2,received:0},"Remates a destino","","","",1),possession:new po([2,3,20,21],null,{accomplished:3,received:0},"Posesión","","","",1,!1,!0),yellowCards:new po([14,52],null,{accomplished:4,received:0},"Tarjetas amarillas","","","",1),redCards:new po([15,53],null,{accomplished:5,received:0},"Tarjetas rojas","","","",1),centerCrosses:new po([13,25],null,{accomplished:6,received:0},"Centros totales","","","",1)}},offensive:{name:"Ofensivo",priority:2,parentInfo:{parentAnalysis:[1],analysisTypeBlocks:[1]},subcategories:{shotsOnGoal:new po([19],null,{accomplished:7,received:0},"Tiros a gol","","","",1),shotsOnGoalDestination:new po([91,95],null,{accomplished:8,received:0},"Tiros a gol destino","","","",1),shotToGoal:new po([91,95,158,167,176,343,330,333,423],null,{accomplished:2,received:0},"Remates a destino","","","",1),ballsWonOpponentPenaltyBox:new po([11],null,{accomplished:10,received:0},"Balones ganados área rival","","","",1),centersFromRight:new po([25],null,{accomplished:11,received:0},"Centros por derecha","","","",1),centersFromLeft:new po([13],null,{accomplished:12,received:0},"Centros por izquierda","","","",1),success1VS1:new po([4],null,{accomplished:13,received:0},"Enfrentamientos ofensivos exitosos","","","",1),unsuccess1VS1:new po([209],null,{accomplished:14,received:0},"Enfrentamientos ofensivos no exitosos","","","",1)}},defensive:{name:"Defensivo",priority:3,parentInfo:{parentAnalysis:[1],analysisTypeBlocks:[1]},subcategories:{saves:new po([39],null,{accomplished:15,received:0},"Atajadas","","","",1),ballsWonOwnPenaltyBox:new po([23],null,{accomplished:16,received:0},"Balones ganados área propia","","","",1),success1VS1:new po([5],null,{accomplished:17,received:0},"Enfrentamientos defensivos exitosos","","","",1),unsuccess1VS1:new po([209],null,{accomplished:18,received:0},"Enfrentamientos defensivos no exitosos","","","",1),aerialGame:new po([24],null,{accomplished:19,received:0},"Juego aéreo resto del campo","","","",1),clearances:new po([34],null,{accomplished:20,received:0},"Rechaces","","","",1)}},possession:{name:"Posesión",priority:4,parentInfo:{parentAnalysis:[1],analysisTypeBlocks:[1]},subcategories:{totalPasses:new po([2,3,20,21],null,{accomplished:21,received:0},"Pases totales","","","",1),successPasses:new po([2,20],null,{accomplished:22,received:0},"Pases acertados","","","",1),successPassesRivalHalf:new po([20],null,{accomplished:23,received:0},"Pases acertados en cancha rival","","","",1),ballsRecoveredInChallenge:new po([483],null,{accomplished:24,received:0},"Balones recuperados en disputa","","","",1),ballsRecoveredWithoutChallenge:new po([484],null,{accomplished:25,received:0},"Balones recuperados sin disputa","","","",1),ballsLostInChallenge:new po([494],null,{accomplished:26,received:0},"Balones perdidos en disputa","","","",1),ballsLostWithoutChallenge:new po([495],null,{accomplished:27,received:0},"Balones perdidos sin disputa","","","",1)}},stoppedBall:{name:"Balón parado",priority:5,parentInfo:{parentAnalysis:[1],analysisTypeBlocks:[1]},subcategories:{freeKick44:new po([155,164,173,362,371,380],null,{accomplished:28,received:0},"Tiros libres 4/4","","","",1),freeKick34:new po([150,357],null,{accomplished:29,received:0},"Tiros libres 3/4","","","",1),freeKickOwnHalf:new po([149,356],null,{accomplished:30,received:0},"Tiros libres cancha propia","","","",1),cornerFromRight:new po([32],null,{accomplished:31,received:0},"Tiros de esquina por derecha","","","",1),cornerFromLeft:new po([31],null,{accomplished:32,received:0},"Tiros de esquina por izquierda","","","",1),goalKick:new po([264,28],null,{accomplished:33,received:0},"Saques de meta","","","",1)}},penalties:{name:"Infracciones",priority:6,parentInfo:{parentAnalysis:[1],analysisTypeBlocks:[1]},subcategories:{totalFouls:new po([17,50],null,{accomplished:34,received:0},"Faltas totales","","","",1),foulOwnGoal:new po([348,478],null,{accomplished:35,received:0},"Faltas cerca de su propia portería","","","",1),fieldFouls:new po([349,350,479,480],null,{accomplished:36,received:0},"Faltas resto del campo","","","",1),penaltyKick:new po([461,481],null,{accomplished:37,received:0},"Penales cometidos","","","",1),offside:new po([33],null,{accomplished:38,received:0},"Fueras de lugar","","","",1)}}},Xda=[{parentAnalysis:[1,2,3],value:0,text:"Realizado",block:1},{parentAnalysis:[1,2,3],value:1,text:"Recibido",block:1},{parentAnalysis:[1],value:0,text:"Posesión",block:2},{parentAnalysis:[1,2],value:0,text:"Origen de gol realizado",block:3},{parentAnalysis:[1,2],value:1,text:"Origen de gol recibido",block:3}],Kda=["teamId","categoryId","matchlapse","section","matchResult","playingAs","total","gameId"];let NE=null;function Qda(){return NE||(NE=z0(Kda)),NE}const eua=["playId","gameId","teamId","playerId","momentOfPlay","categoryId","categoryType","matchLapse","section","matchResult","playingAs","total","coordinate1X","coordinate1Y","coordinate2X","coordinate2Y","coordinate3X","coordinate3Y"];let BE=null;function tua(){return BE||(BE=z0(eua)),BE}function L5(e,n,r){return[r.get(e[n.categoryId])||[],e[n.teamId],e[n.matchResult],e[n.playingAs],e[n.matchLapse],e[n.section],e[n.total]]}function MJ(e){return[[1,1,e.local.win],[1,2,e.local.lose],[1,3,e.local.draw],[2,1,e.visit.win],[2,2,e.visit.lose],[2,3,e.visit.draw]]}function OE(e,n,r){let I=[...n];return e[r.categoryId]===2&&(I[0]=14),e[r.categoryId]===20&&(I[0]=15),[14,15].includes(I[0])?I:null}const aua=wP(),nua=[{name:"Liga MX",id:1},{name:"Liga MX Femenil",id:1001},{name:"Liga Expansión MX",id:1071}],rua={nextGeneral:{namespaced:!0,state:{seasonId:0,pastSeasonId:0,usePastSeasonId:!1,isSocketConnected:!1,indexesLP:EJ(),indexesTSP:Zda(),indexesLS:Qda(),indexesTLP:tua(),nextGamesDataStructure:Jda,currentSeasonGames:[],currentSeasonTeams:[],gameForAnalysis:{},showPostMatch:!1,homeResultGame:null,awayResultGame:null,selectedAnalysis:{},selectedStatisticTypeBlock:1,gameId:null,game:{},games:[],homeTeamPlays:[],visitingTeamPlays:[],currentSeasonPlays:[],livePlays:new Map,totalSeasonFinishedGames:0,totalHomeTeamFinishedGames:0,totalVisitingTeamFinishedGames:0,homeGames:[],homeTeamInfo:{},awayTeamInfo:{},visitingGames:[],idAssetSelected:1,isLive:!1,menuOptionActive:"",showLiveData:!1,showAdvanceFilter:!1,homeTeamFilter:{teamId:0,statistics:0,playingAs:[],matchResult:[],sections:[],requiresPlaysFiltering:!0},visitingTeamFilter:{teamId:0,statistics:0,playingAs:[],matchResult:[],sections:[],requiresPlaysFiltering:!0},oldSeasonId:0,statistics:[],isRankingCalculating:!0,categoriesMap:new Map,defaultFilter:null,filterAux:null,betSubcategories:[],betDescription:{},regularSeasonName:"",betSubcategoriesObjects:[],currentTournamentName:"",toBackRouteName:"home"},getters:{betSubcategoriesIds(e){return e.betSubcategories.map(n=>n.id)},showPostMatchData:e=>e.showPostMatch,getHomeResultGame:e=>e.homeResultGame,getAwayResultGame:e=>e.awayResultGame,getSeasonId:e=>e.seasonId,getGameForAnalysis:e=>e.gameForAnalysis,isLive:e=>e.isLive,showLive:e=>e.gameForAnalysis.game_status===4&&e.gameForAnalysis.is_live,menuOptionActive:e=>e.menuOptionActive,showLiveData:e=>e.showLiveData,showAdvanceFilter:e=>e.showAdvanceFilter,idAssetSelected:e=>e.idAssetSelected,gameId:e=>e.gameId,game:e=>e.game,homeTeam(e){return e.homeTeamInfo},visitingTeam(e){return e.awayTeamInfo},rankingData(e){return e.statistics},homeTeamStatisticsType(e){return e.homeTeamFilter.statistics?"received":"accomplished"},visitingTeamStatisticsType(e){return e.visitingTeamFilter.statistics?"received":"accomplished"},subcategoryName(e){return`${e.homeTeamFilter.statistics}-${e.visitingTeamFilter.statistics}`},statisticsTypes(e){return Xda.filter(n=>n.parentAnalysis.includes(e.selectedAnalysis.id))},homeTeamFilteredPlays(e){if(e.homeTeamFilter.requiresPlaysFiltering)return TJ(e.homeTeamPlays,e.homeTeamFilter.playingAs,e.homeTeamFilter.matchResult,e.homeTeamFilter.sections,e.indexesTSP)},visitingTeamFilteredPlays(e){if(e.visitingTeamFilter.requiresPlaysFiltering)return TJ(e.visitingTeamPlays,e.visitingTeamFilter.playingAs,e.visitingTeamFilter.matchResult,e.visitingTeamFilter.sections,e.indexesTSP)},currentSeasonTeamsIds(e){return e.currentSeasonTeams.map(n=>n.team_id)},canFilledStructure(e){return e.homeTeamFilter.requiresPlaysFiltering||e.visitingTeamFilter.requiresPlaysFiltering},totalFilteredHomeGames(e){return e.homeGames.filter(n=>e.homeTeamFilter.playingAs.includes(n[0])).filter(n=>e.homeTeamFilter.matchResult.includes(n[1])).reduce((n,r)=>n+r[2],0)},totalFilteredVisitingGames(e){return e.visitingGames.filter(n=>e.visitingTeamFilter.playingAs.includes(n[0])).filter(n=>e.visitingTeamFilter.matchResult.includes(n[1])).reduce((n,r)=>n+r[2],0)},filledDataStructure(e,n){if(e.currentSeasonPlays)for(const r of Object.values(e.nextGamesDataStructure))for(const I of Object.values(r.subcategories))e.homeTeamFilter.requiresPlaysFiltering&&I.homeTeam.resetTotals(),e.visitingTeamFilter.requiresPlaysFiltering&&I.visitingTeam.resetTotals(),I.addLeaguePlays(e.currentSeasonPlays,e.indexesLP,e.totalSeasonFinishedGames),I.addTeamPlays(I.homeTeamType,e.gameForAnalysis.home_team,n.homeTeamFilteredPlays,e.indexesTSP,e.showPostMatch?1:n.totalFilteredHomeGames),I.addTeamPlays(I.visitingTeamType,e.gameForAnalysis.visiting_team,n.visitingTeamFilteredPlays,e.indexesTSP,e.showPostMatch?1:n.totalFilteredVisitingGames);return e.nextGamesDataStructure},arrayFilledDataSortedByPriority(e,n){return Object.values(n.filledDataStructure).sort((r,I)=>r.priority-I.priority)},statisticData(e,n){for(const r of Object.values(n.filledDataStructure))if(r.parentInfo.parentAnalysis.includes(e.selectedAnalysis.id)&&r.parentInfo.analysisTypeBlocks.includes(e.selectedStatisticTypeBlock))return r.subcategories;return{}},accomplished(e){return e.homeTeamFilter.statistics===0}},mutations:{setCurrentTournamentName(e,n){e.currentTournamentName=n},setBetSubcategoriesObjects(e,n){e.betSubcategoriesObjects=n},setRegularSeasonName(e,n){e.regularSeasonName=n},setBetSubcategories(e,n){e.betSubcategories=n},setBetDescription(e,n){e.betDescription=n},setSeasonId(e,n){e.seasonId=Number(n)},setHome(e,n){e.homeTeamInfo=n},setAway(e,n){e.awayTeamInfo=n},setMenuOptionActive(e,n){e.menuOptionActive=n},setPastSeasonId(e,n){e.pastSeasonId=n},setUsePastSeasonId(e,n){e.usePastSeasonId=n,n&&(e.oldSeasonId=e.pastSeasonId)},updateShowPostMatchData(e,n){e.showPostMatch=n},setHomeResultGame(e,n){e.homeResultGame=n},setAwayResultGame(e,n){e.awayResultGame=n},updateIsSocketConnected(e,n){e.isSocketConnected=n,n&&e.gameForAnalysis.is_live&&rie(`game.${e.gameForAnalysis.game_id}.v2`)},updateCurrentSeasonTeams(e,n){e.currentSeasonTeams=n,e.currentSeasonTeams.forEach(r=>{r.playedGames=e.currentSeasonGames.reduce((I,L)=>{if(L.game_status===1&&(L.home_team===r.team_id||L.visiting_team===r.team_id)){const d=L.score[0]-L.score[1],g=L.home_team===r.team_id;I.push({playingAs:g?1:2,matchResult:d===0?3:g?d>0?1:2:d<0?1:2})}return I},[])})},updateCurrentSeasonGames(e,n){e.currentSeasonGames=n},updateGameId(e,n){e.gameId=n},updateGameForAnalysis(e,n){e.gameForAnalysis=n,e.isLive=!!n.is_live,e.homeTeamFilter.teamId=e.gameForAnalysis.home_team,e.visitingTeamFilter.teamId=e.gameForAnalysis.visiting_team},updateSelectedAnalysis(e,n){e.selectedAnalysis=n},updateShowLiveData(e,n){e.showLiveData=n},toggleShowLiveData(e){e.showLiveData=!e.showLiveData},toggleAdvanceFilter(e){e.showAdvanceFilter=!e.showAdvanceFilter},updateIdAssetSelected(e,n){e.idAssetSelected=n},updateStats(e,n){e.currentSeasonPlays=n},updateFilterAux(e){e.filterAux||(e.filterAux={homeTeamFilter:{...e.homeTeamFilter},visitingTeamFilter:{...e.visitingTeamFilter}})},updateFilters(e,{filters:n,needsFormat:r=!1}){if(r){if(!n||!n.local||!n.local.statistics||!n.visit||!n.visit.statistics)return;e.homeTeamFilter=EP(e.homeTeamFilter,n.local,e.gameForAnalysis.home_team),e.visitingTeamFilter=EP(e.visitingTeamFilter,n.visit,e.gameForAnalysis.visiting_team),e.selectedStatisticTypeBlock!==n.local.statistics.block&&(e.selectedStatisticTypeBlock=n.local.statistics.block)}else e.homeTeamFilter={...n.homeTeamFilter,statistics:0},e.visitingTeamFilter={...n.visitingTeamFilter,statistics:0}},updateFinishedGames(e,n){e.totalSeasonFinishedGames=n},updateHomeTeamPlays(e,n){e.homeTeamPlays=n},updateVisitingTeamPlays(e,n){e.visitingTeamPlays=n},addSpecialMentions(e,n){const r=Object.values(e.nextGamesDataStructure);r.forEach(I=>{for(const L of Object.values(I.subcategories))L.resetMentions()}),r.forEach(I=>{for(const L of n)for(const d of Object.values(I.subcategories))d.addSpecialMention(L[0],L[1],L[2])})},setDefaultFilter(e,n){e.defaultFilter={homeTeamFilter:{...n.homeTeamFilter,teamId:e.gameForAnalysis.home_team},visitingTeamFilter:{...n.awayTeamFilter,teamId:e.gameForAnalysis.visiting_team}}},addLiveGamePlay(e,n){if(!e.livePlays.has(n[e.indexesTLP.playId])){e.livePlays.set(n[e.indexesTLP.playId],n);const I=L5(n,e.indexesTLP,e.categoriesMap);for(const L of Object.values(e.nextGamesDataStructure))for(const d of Object.values(L.subcategories))d.addLivePlay(e.gameForAnalysis.home_team===I[e.indexesTSP.teamId]?"homeTeam":"visitingTeam",I[e.indexesTSP.teamId],I,e.indexesTSP,e.isLive,!1)}},updateLiveGamePlay(e,n){const r=!!n[e.indexesTLP.length],I=e.livePlays.get(n[e.indexesTLP.playId]);if(eoe(I,n))return;let L="";const d=e.gameForAnalysis.home_team===n[e.indexesTLP.teamId]?"homeTeam":"visitingTeam";I&&(L=e.gameForAnalysis.home_team===I[e.indexesTLP.teamId]?"homeTeam":"visitingTeam");const g=L5(I,e.indexesTLP,e.categoriesMap),a=OE(I,g,e.indexesTLP),b=L5(n,e.indexesTLP,e.categoriesMap),m=OE(n,b,e.indexesTLP);for(const i of Object.values(e.nextGamesDataStructure))for(const v of Object.values(i.subcategories))I&&(v.subtractLivePlay(L,g[e.indexesTSP.teamId],g,e.indexesTSP,r),a&&v.subtractLivePlay(L,a[e.indexesTSP.teamId],a,e.indexesTSP,r)),v.addLivePlay(d,b[e.indexesTSP.teamId],b,e.indexesTSP,e.isLive,r),m&&v.addLivePlay(d,m[e.indexesTSP.teamId],m,e.indexesTSP,e.isLive,r);e.livePlays.set(n[e.indexesTLP.playId],n)},deleteLiveGamePlay(e,n){const r=!!n[e.indexesTLP.length],I=e.livePlays.get(n[e.indexesTLP.playId]);let L="";if(I){L=e.gameForAnalysis.home_team===I[e.indexesTLP.teamId]?"homeTeam":"visitingTeam",e.livePlays.delete(I[e.indexesTLP.playId]);const d=L5(I,e.indexesTLP,e.categoriesMap),g=OE(n,d,e.indexesTLP);for(const a of Object.values(e.nextGamesDataStructure))for(const b of Object.values(a.subcategories))b.subtractLivePlay(L,d[e.indexesTSP.teamId],d,e.indexesTSP,r),g&&b.subtractLivePlay(L,g[e.indexesTSP.teamId],g,e.indexesTSP,r)}},clearLiveTotals(e){for(const n of Object.values(e.nextGamesDataStructure))for(const r of Object.values(n.subcategories))r.homeTeam.resetTotalsLive(),r.visitingTeam.resetTotalsLive()},updateSeasonStatistics(e,n){e.statistics=n},updateOldSeasonId(e,n){e.oldSeasonId=n},addRankingInSubcategories(e,{getters:n,isPremiumAccount:r}){if(!(e.homeTeamFilter.teamId&&e.visitingTeamFilter.teamId))return;e.isRankingCalculating=!1,e.currentSeasonTeams.forEach(d=>{d.homeTeamFilterGames=d.playedGames.filter(g=>e.homeTeamFilter.playingAs.includes(g.playingAs)&&e.homeTeamFilter.matchResult.includes(g.matchResult)).length,d.visitingTeamFilterGames=d.playedGames.filter(g=>e.visitingTeamFilter.playingAs.includes(g.playingAs)&&e.visitingTeamFilter.matchResult.includes(g.matchResult)).length});const I=[],L=new Map;for(const d of Object.values(e.nextGamesDataStructure))for(const g of Object.values(d.subcategories))I.push(g);n.rankingData.forEach(d=>{for(const g of I)if(g.isInGeneralCategory(d[e.indexesLS.categoryId])){L.has(g.id)?L.get(g.id).push(d):L.set(g.id,[d]);break}})},prepareCleanAllStatistics(e){e.homeTeamFilter.requiresPlaysFiltering=!0,e.visitingTeamFilter.requiresPlaysFiltering=!0},setHomeGames(e,n){e.homeGames=MJ(n)},setVisitingGames(e,n){e.visitingGames=MJ(n)},generateCategoriesMap(e){for(const n of Object.values(e.nextGamesDataStructure))for(const r of Object.values(n.subcategories))r.accomplishedCategoryIds.forEach(I=>{const L=e.categoriesMap.get(I);L?L.push(r.generalCategoriesIds.accomplished):e.categoriesMap.set(I,[r.generalCategoriesIds.accomplished])})},resetNextGamesDataStructure(e){for(const n of Object.values(e.nextGamesDataStructure))for(const r of Object.values(n.subcategories))r.resetData()}},actions:{turnOnOffDefaultFilters({state:e,commit:n},{command:r}){r==="on"?n("updateFilters",{filters:e.defaultFilter,needsFormat:!1}):n("updateFilters",{filters:e.filterAux,needsFormat:!1})},async setAndGetStatsPostMatch({commit:e},n){try{const g=await Gda({gameId:n.gameId});if(g){var r=[],I=[],L={season:0,total:0,visit:{total:0,draw:0,win:0,lose:0},played:0,local:{total:0,draw:0,win:0,lose:0}},d={season:0,total:0,visit:{total:0,draw:0,win:0,lose:0},played:0,local:{total:0,draw:0,win:0,lose:0}};Object.keys(g.data).length!==0&&(r=g.data.data.filter(a=>a[1]==n.homeTeam),I=g.data.data.filter(a=>a[1]==n.awayTeam),L=g.data.games,d=g.data.games),e("updateHomeTeamPlays",r),e("updateVisitingTeamPlays",I),e("setHomeGames",L),e("setVisitingGames",d)}else e("updateHomeTeamPlays",[]),e("updateVisitingTeamPlays",[])}catch(g){return Promise.reject(g)}},async fillStatisticDataPostMatch({commit:e,dispatch:n},r){e("prepareCleanAllStatistics"),e("updateHomeTeamPlays",[]),e("updateVisitingTeamPlays",[]),e("setIsSectionLoading",!0,{root:!0});try{let I=[];e("updateGameForAnalysis",r.gameInfo),I.push(n("setAndGetStatsPostMatch",{gameId:r.game,homeTeam:r.homeTeam,awayTeam:r.awayTeam})),await Promise.all(I)}catch(I){throw new Error(I)}finally{e("setIsSectionLoading",!1,{root:!0})}},async checkState({state:e,dispatch:n,commit:r},{gameId:I,isTeamsAnalysis:L,currentSeasonId:d,isLoginChanged:g=!1,defaultFilter:a=null,gameInfo:b=null,isCupGame:m=!1}){try{let i={},v=e.seasonId!==Number(d);const _=[];r("setIsSectionLoading",!0,{root:!0}),r("setUsePastSeasonId",!1),v&&r("setSeasonId",d),r("updateGameId",Number(I)),e.oldSeasonId!==e.seasonId&&r("resetNextGamesDataStructure");const c=await n("getCurrentSeasonGames",Number(I));if(r("leagueGeneral/updateCurrentSeasonGames",c,{root:!0}),i=c.find(s=>s.game_id===Number(I)),!i&&b&&(i=b),i&&r("updateGameForAnalysis",i),i.game_status!==1&&((g||e.categoriesMap.size===0)&&r("generateCategoriesMap"),m||await n("checkTeamsData",{gameId:I,isFromBet:!!a}),(g||e.oldSeasonId!==e.seasonId||e.statistics.length===0)&&_.push(n("getSeasonStatistics"))),e.usePastSeasonId){const s=await n("getCurrentSeasonGamesLast");r("leagueGeneral/updateCurrentSeasonGames",s,{root:!0})}(g||e.currentSeasonTeams.length===0||!e.currentSeasonTeams.find(s=>i.home_team===s.team_id))&&_.push(n("getCurrentSeasonTeams")),r("setHomeResultGame",i.score[0]),r("setAwayResultGame",i.score[1]),L?i.game_status!==1?(await n("fillStatisticData",{gameId:I,gameinfo:i,promises:_,defaultFilter:a}),r("updateShowPostMatchData",!1)):(r("updateStats",[]),r("updateShowPostMatchData",!0),_.push(n("fillStatisticDataPostMatch",{game:I,homeTeam:i.home_team,awayTeam:i.visiting_team,gameInfo:i})),await Promise.all(_)):r("setIsSectionLoading",!1,{root:!0})}catch(i){return Promise.reject(i)}},async fillStatisticData({commit:e,dispatch:n,getters:r,rootGetters:I,state:L},{gameId:d,gameinfo:g,promises:a=[],defaultFilter:b=null}){let m=null;try{e("setIsSectionLoading",!0,{root:!0}),e("prepareCleanAllStatistics"),e("updateHomeTeamPlays",[]),e("updateVisitingTeamPlays",[]),e("updateGameForAnalysis",g),g.is_live&&a.push(n("getCurrentLiveGamePlays",d)),a.push(n("getSpecialMentionsByGame",d)),a.push(n("getHomeTeamPlays")),a.push(n("getVisitingTeamPlays")),a.push(n("getCurrentSeasonPlays")),b&&a.push(qda(b)),m=await Promise.all(a)}catch(i){throw new Error(i)}finally{setTimeout(()=>{if(e("addRankingInSubcategories",{getters:r,isPremiumAccount:I["loginGeneral/getPremiumAccount"]}),b){const[i]=m.pop();i&&(e("setBetSubcategories",i.categories),e("setBetDescription",i.sectionDescription),e("setDefaultFilter",i.params),e("updateFilterAux"),e("updateFilters",{filters:L.defaultFilter,needsFormat:!1}),n("updateRankingInSubcategories"))}},100),e("setIsSectionLoading",!1,{root:!0})}},async checkTeamsData({state:e,dispatch:n,rootState:r,commit:I},{gameId:L,isFromBet:d}){try{I("setUsePastSeasonId",!1)}catch(g){throw new Error(g)}},async getSpecialMentionsByGame({commit:e},n){try{const r=await $da({gameId:n});e("addSpecialMentions",r)}catch(r){return Promise.reject(r)}},async getCurrentSeasonGames({commit:e,state:n},r){try{const{teams:I,games:L,past_season_id:d,tournament_id:g}=await Vda({seasonId:n.usePastSeasonId?n.pastSeasonId:n.seasonId,gameId:r}),a=nua.find(b=>b.id===g);return a&&e("setCurrentTournamentName",a.name),e("setHome",I[0]),e("setAway",I[1]),n.usePastSeasonId||e("setPastSeasonId",d),await e("updateCurrentSeasonGames",L),L&&Array.isArray(L)&&e("updateFinishedGames",L.reduce((b,m)=>(m.game_status===1&&(b+=1),b),0)),L}catch(I){return Promise.reject(I)}},async getCurrentSeasonGamesLast({commit:e,state:n}){try{const{games:r,past_season_id:I}=await SJ({seasonId:n.usePastSeasonId?n.pastSeasonId:n.seasonId});return n.usePastSeasonId||e("setPastSeasonId",I),await e("updateCurrentSeasonGames",r),r&&Array.isArray(r)&&e("updateFinishedGames",r.reduce((L,d)=>(d.game_status===1&&(L+=1),L),0)),r}catch(r){return Promise.reject(r)}},async getCurrentSeasonTeams({commit:e,state:n}){try{const r=await Hda({seasonId:n.usePastSeasonId?n.pastSeasonId:n.seasonId});e("updateCurrentSeasonTeams",r.data.teams)}catch{}},async getSeasonStatistics({commit:e,state:n}){try{const r=n.usePastSeasonId?n.pastSeasonId:n.seasonId,I=await Fda({seasonId:r});e("updateSeasonStatistics",I),e("updateOldSeasonId",r)}catch(r){return Promise.reject(r)}},updateRankingInSubcategories({state:e,commit:n,getters:r,rootGetters:I}){e.currentSeasonGames.length>0&&n("addRankingInSubcategories",{getters:r,isPremiumAccount:I["loginGeneral/getPremiumAccount"]})},async getHomeTeamPlays({commit:e,state:n}){try{const r=await AJ({seasonId:n.usePastSeasonId?n.pastSeasonId:n.seasonId,teamId:n.gameForAnalysis.home_team});r.data&&(e("updateHomeTeamPlays",r.data.data),e("setHomeGames",r.data.games))}catch(r){return Promise.reject(r)}},async getVisitingTeamPlays({commit:e,state:n}){try{const r=await AJ({seasonId:n.usePastSeasonId?n.pastSeasonId:n.seasonId,teamId:n.gameForAnalysis.visiting_team});r.data&&(e("updateVisitingTeamPlays",r.data.data),e("setVisitingGames",r.data.games))}catch(r){return Promise.reject(r)}},async getCurrentSeasonPlays({commit:e,state:n}){try{const r=await Lda({seasonId:n.usePastSeasonId?n.pastSeasonId:n.seasonId});e("updateStats",r)}catch(r){return Promise.reject(new Error(r))}},async getCurrentLiveGamePlays({state:e,commit:n},r){try{const I=await Rda({gameId:r});e.livePlays=new Map,I.forEach(L=>{e.gameForAnalysis.game_id===L[e.indexesTLP.gameId]&&(e.gameForAnalysis.home_team===L[e.indexesTLP.teamId]||e.gameForAnalysis.visiting_team===L[e.indexesTLP.teamId])&&n("addLiveGamePlay",L)})}catch(I){throw new Error(I)}},socket_new({state:e,commit:n},r){const I=r[1];(e.gameForAnalysis.home_team===I[e.indexesTLP.teamId]||e.gameForAnalysis.visiting_team===I[e.indexesTLP.teamId])&&n("addLiveGamePlay",I)},socket_update({state:e,commit:n},r){const I=r[1];e.gameForAnalysis.game_id===I[e.indexesTLP.gameId]&&(e.gameForAnalysis.home_team===I[e.indexesTLP.teamId]||e.gameForAnalysis.visitingTeam===I[e.indexesTLP.teamId])&&n("updateLiveGamePlay",I)},socket_delete({state:e,commit:n},r){const I=r[1];e.gameForAnalysis.game_id===I[e.indexesTLP.gameId]&&(e.gameForAnalysis.home_team===I[e.indexesTLP.teamId]||e.gameForAnalysis.visiting_team===I[e.indexesTLP.teamId])&&n("deleteLiveGamePlay",I)},exitChannel({state:e,getters:n,rootState:r,rootGetters:I,commit:L}){const d=I["loginGeneral/getPremiumAccount"];n.isLive&&d&&(L("updateShowLiveData",!1),L("clearLiveTotals"),e.livePlays.clear(),aua.emit("unsubscribe",{channel:`game.${e.gameForAnalysis.game_id}.v2`}))},cleanStats({state:e}){for(const r of Object.values(e.nextGamesDataStructure))for(const I of Object.values(r.subcategories))I.homeTeam.resetTotals(),I.visitingTeam.resetTotals(),I.homeTeam.resetTotalsLive(),I.visitingTeam.resetTotalsLive(),I.isBetMainSubcategory=!1;Object.values(e.nextGamesDataStructure).forEach(r=>{for(const I of Object.values(r.subcategories))I.resetMentions()}),e.currentSeasonPlays=null,e.homeTeamPlays=[],e.visitingTeamPlays=[],e.homeTeamFilter.requiresPlaysFiltering=!0,e.visitingTeamFilter.requiresPlaysFiltering=!0,e.isRankingCalculating=!0},cleanAllStats({state:e}){for(const r of Object.values(e.nextGamesDataStructure))for(const I of Object.values(r.subcategories))I.homeTeam.resetTotals(),I.visitingTeam.resetTotals(),I.isBetMainSubcategory=!1;Object.values(e.nextGamesDataStructure).forEach(r=>{for(const I of Object.values(r.subcategories))I.resetMentions()}),e.currentSeasonGames=[],e.currentSeasonTeams=[],e.gameForAnalysis={},e.homeTeamPlays=[],e.visitingTeamPlays=[],e.currentSeasonPlays=null,e.totalSeasonFinishedGames=0,e.totalHomeTeamFinishedGames=0,e.totalVisitingTeamFinishedGames=0,e.homeGames=[],e.showPostMatch=!1,e.homeResultGame=null,e.awayResultGame=null,e.visitingGames=[],e.idAssetSelected=1,e.showAdvanceFilter=!1,e.selectedAnalysis={},e.homeTeamFilter={teamId:0,statistics:0,playingAs:[],matchResult:[],sections:[],requiresPlaysFiltering:!0},e.visitingTeamFilter={teamId:0,statistics:0,playingAs:[],matchResult:[],sections:[],requiresPlaysFiltering:!0},e.isRankingCalculating=!0}}}};async function iua(){try{const{data:e}=await gd({url:"https://kefloixzy1.execute-api.us-west-2.amazonaws.com/prod/tournaments"});return e}catch(e){throw new Error(e)}}const oua={gameGlobal:{namespaced:!0,state:{videoSrc:null,isVideoModalVisible:!1,tournaments:[],seccionBetsGolTipster:1,tournamentSelected:{},tournamentType:0,sectionAnalytics:"Banner_Home",previewSectionAnalytics:"",sectionRef:"",booleanIsStatisticModalOpen:!1},getters:{getTournamentType:e=>e.tournamentType,getSectionAnalytics(e){return e.sectionAnalytics},getPreviewSectionAnalytics(e){return e.previewSectionAnalytics},getSeccionBetsGolTipster(e){return e.seccionBetsGolTipster}},mutations:{setBooleanIsStatisticModalOpen(e,n){e.booleanIsStatisticModalOpen=n},setTournamentType(e,n){e.tournamentType=n},setSectionRef(e,n){e.sectionRef=n},setSectionAnalytics(e,n){e.sectionAnalytics=n},setSeccionBetsGolTipster(e,n){e.seccionBetsGolTipster=n},setPreviewSectionAnalytics(e,n){e.previewSectionAnalytics=n},setVideoSrc(e,n){e.videoSrc=n},setVideoModalVisibility(e,n){e.isVideoModalVisible=n},setSelectedTournament(e,n){e.selectedTournament=n},setTournaments(e,n){e.tournaments=n.map(r=>({...r.tournament,seasons:r.seasons})),e.tournamentSelected=e.tournaments[0]},setTournamentSelected(e,n){e.tournamentSelected=n}},actions:{async fetchTournaments({state:e,commit:n}){try{if(e.tournaments.length===0){const r=await iua();n("setTournaments",r)}}catch(r){throw new Error(r)}}}}};async function sua({seasonId:e,localTeamId:n,visitingTeamId:r}){try{const I=`https://bzznnzehtf.execute-api.us-west-2.amazonaws.com/prod/xg/seasons/${e}/teams/${n}/${r}`;return(await gd({url:I})).data}catch(I){return Promise.reject(I)}}async function lua({seasonId:e,localTeamId:n,visitingTeamId:r}){try{const I=`https://bzznnzehtf.execute-api.us-west-2.amazonaws.com/prod/xg/game/${e}/teams/${n}/${r}`;return(await gd({url:I})).data}catch(I){return Promise.reject(I)}}const IJ=(e,n)=>{let r={};return e.forEach((I,L)=>{L==3&&(n[0]==35||n[0]==54)&&(n[L]==2?n[L]=1:n[L]=2),L==2&&(n[0]==35||n[0]==54)&&(n[L]==1?n[L]=2:n[L]==2&&(n[L]=1)),r[I]=n[L]}),r},PJ=(e,n)=>e.filter(I=>{const L=n.playingAs.includes(I.playing_as),d=n.matchResult.includes(I.match_result),g=n.sections.includes(I.section);return L&&d&&g}),NJ=[{name:"Goles",color:"#4A90E2",points:[1,2,3],categories:[12,55,35,54],invert:[35,54],negative:!1},{name:"Tiros a gol",color:"#FF8000",points:[1,2,3],categories:[12,55,35,54,510]}];(function(){function e(n,r,I){return typeof I>"u"||+I==0?Math[n](r):(r=+r,I=+I,isNaN(r)||!(typeof I=="number"&&I%1===0)?NaN:(r=r.toString().split("e"),r=Math[n](+(r[0]+"e"+(r[1]?+r[1]-I:-I))),r=r.toString().split("e"),+(r[0]+"e"+(r[1]?+r[1]+I:I))))}Math.ceil10||(Math.ceil10=function(n,r){return e("ceil",n,r)})})();function BJ(e,n){let r=n*-1;return Math.ceil10(e,r)}const cua={...oua,...Wda,...rua,...{xgGeneral:{namespaced:!0,state:{teamSelected:"Local",xGLocalPlays:[],xGVisitingPlays:[]},getters:{playsLocal:(e,n,r)=>{const I=e.xGLocalPlays,L="homeTeamFilter",d=r.nextGeneral[L];return PJ(I,d)},playsAway:(e,n,r)=>{const I=e.xGVisitingPlays,L="visitingTeamFilter",d=r.nextGeneral[L];return PJ(I,d)},goalsQtyLocal:(e,n)=>{const r=NJ.find(I=>I.name==="Goles");return n.playsLocal.filter(I=>r.categories.includes(I.category_id)).length},goalsQtyAway:(e,n)=>{const r=NJ.find(I=>I.name==="Goles");return n.playsAway.filter(I=>r.categories.includes(I.category_id)).length},shotsOnGoalQtyLocal:(e,n)=>n.playsLocal.filter(r=>r.category_id===510).length,shotsOnGoalQtyAway:(e,n)=>n.playsAway.filter(r=>r.category_id===510).length,xGLocal:(e,n)=>{const r=new Set;let I=n.playsLocal.reduce((L,d)=>(r.has(d.moment_of_play)||(r.add(d.moment_of_play),L+=d.xG2),L),0);return BJ(I,2)},xGAway:(e,n)=>{const r=new Set;let I=n.playsAway.reduce((L,d)=>(r.has(d.moment_of_play)||(r.add(d.moment_of_play),L+=d.xG2),L),0);return BJ(I,2)}},mutations:{setTeamSelected(e,n){e.teamSelected=n},setPlays(e,n){e.xGLocalPlays=n.local_team.map(r=>IJ(n.data_headers,r)),e.xGVisitingPlays=n.visiting_team.map(r=>IJ(n.data_headers,r))},cleanXgStore(e){e.localStorage="Local",e.xGLocalPlays=[],e.xGVisitingPlays=[]}},actions:{async getXgPlays({commit:e},{seasonId:n,localTeamId:r,visitingTeamId:I,postMatch:L=!1}){try{var d={};L?d=await lua({seasonId:n,localTeamId:r,visitingTeamId:I}):d=await sua({seasonId:n,localTeamId:r,visitingTeamId:I}),e("setPlays",d)}catch(g){return Promise.reject(g)}}}}}};function dua(e){for(const[n,r]of Object.entries(cua))e.hasModule(n)||e.registerModule(n,r)}const uua={class:"subcategory-group"},hua={__name:"SubcategoryGroup",props:{subcategoryGroup:{type:Array,default:()=>[]}},setup(e){return(n,r)=>(t.openBlock(),t.createElementBlock("div",uua,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.subcategoryGroup,I=>(t.openBlock(),t.createBlock(t.unref(uo),{key:I.id,modelValue:I.isSelected,"onUpdate:modelValue":L=>I.isSelected=L,label:I.name},null,8,["modelValue","onUpdate:modelValue","label"]))),128))]))}},pua=Ao(hua,[["__scopeId","data-v-ae6f3d72"]]),fua={class:"filter-subcategories"},mua=Object.freeze(Object.defineProperty({__proto__:null,default:Ao({__name:"FilterSubcategories",props:{subcategoryGroups:{type:Array,default:()=>[]}},setup(e){return(n,r)=>(t.openBlock(),t.createElementBlock("div",fua,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.subcategoryGroups,I=>(t.openBlock(),t.createElementBlock("div",{key:I.id,class:"filter-subcategories__group"},[t.createVNode(pua,{subcategoryGroup:I},null,8,["subcategoryGroup"])]))),128))]))}},[["__scopeId","data-v-5edaefc2"]])},Symbol.toStringTag,{value:"Module"})),F5=e=>(t.pushScopeId("data-v-80d9c265"),e=e(),t.popScopeId(),e),gua={class:"details__header"},yua=F5(()=>t.createElementVNode("div",{class:"details__header__title"},"Jugando como",-1)),vua={class:"details__header__checkbox"},_ua={class:"details__body"},bua={class:"details__body__playing-as"},xua=["onClick"],wua={class:"details__header"},kua=F5(()=>t.createElementVNode("div",{class:"details__header__title"},"En: (Elige el lapso de tiempo)",-1)),Cua={class:"details__header__checkbox"},Tua={class:"details__body"},Sua=F5(()=>t.createElementVNode("div",{class:"details__body__title"},"1er tiempo",-1)),Eua={class:"details__body__game-section"},Aua=["onClick"],Mua={class:"details__body"},Iua=F5(()=>t.createElementVNode("div",{class:"details__body__title"},"2do tiempo",-1)),Pua={class:"details__body__game-section"},Nua=["onClick"],Bua=Object.freeze(Object.defineProperty({__proto__:null,default:Ao({__name:"FilterConditions",props:{playingAs:{type:Array,default:()=>[{name:"Local",isSelected:!0},{name:"Visitante",isSelected:!0}]},gameSections:{type:Array,default:()=>[{text:"0-15",value:1,isSelected:!0},{text:"16-30",value:2,isSelected:!0},{text:"31-45",value:3,isSelected:!0},{text:"46-60",value:4,isSelected:!0},{text:"61-75",value:5,isSelected:!0},{text:"76-90",value:6,isSelected:!0}]},buttonsBackgroundColor:{type:String,default:"rgba(255, 255, 255, 0)"},buttonsBackgroundColorActive:{type:String,default:"rgba(203, 238, 107, 0.05)"},buttonsTextColor:{type:String,default:"rgba(255, 255, 255, 0.8)"},buttonsTextColorActive:{type:String,default:"rgba(255, 255, 255, 1)"},buttonsBorderColor:{type:String,default:"#8ea2ab"},buttonsBorderColorActive:{type:String,default:"#cbee6b"},buttonsBorderWidth:{type:String,default:"0.8px"},buttonsBorderWidthActive:{type:String,default:"1px"},buttonsBorderRadius:{type:String,default:"4px"}},setup(e){const n=e;t.useCssVars(i=>({"49cba245":e.buttonsBackgroundColor,"52f02da6":e.buttonsTextColor,"7d3f686a":e.buttonsBorderWidth,"7c286a07":e.buttonsBorderColor,"24a6f4aa":e.buttonsBackgroundColorActive,cd8d7768:e.buttonsTextColorActive,"35fa5c10":e.buttonsBorderWidthActive,"0cde1826":e.buttonsBorderColorActive}));const r=t.computed(()=>n.playingAs.every(i=>i.isSelected)),I=t.computed(()=>n.gameSections.every(i=>i.isSelected)),L=t.computed(()=>n.gameSections.reduce((i,v)=>(v.value<=3?i.firstHalf.push(v):i.secondHalf.push(v),i),{firstHalf:[],secondHalf:[]})),d=t.computed(()=>({"--border-radius-first-button":`${n.buttonsBorderRadius} 0 0 ${n.buttonsBorderRadius}`,"--border-radius-last-button":`0 ${n.buttonsBorderRadius} ${n.buttonsBorderRadius} 0`}));function g(i){i?n.playingAs.forEach(v=>{v.isSelected=!0}):n.playingAs.forEach((v,_)=>{v.isSelected=_===0})}function a(i){n.playingAs.filter(v=>v.isSelected).length===1&&i.isSelected||(i.isSelected=!i.isSelected)}function b(i){n.gameSections.filter(v=>v.isSelected).length===1&&i.isSelected||(i.isSelected=!i.isSelected)}function m(i){i?n.gameSections.forEach(v=>{v.isSelected=!0}):n.gameSections.forEach((v,_)=>{v.isSelected=_===0})}return(i,v)=>(t.openBlock(),t.createElementBlock("div",{class:"details",style:t.normalizeStyle(d.value)},[t.createElementVNode("div",gua,[yua,t.createElementVNode("div",vua,[t.createVNode(t.unref(uo),{label:"Todos","model-value":r.value,"onUpdate:modelValue":g},null,8,["model-value"])])]),t.createElementVNode("div",_ua,[t.createElementVNode("div",bua,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(n.playingAs,(_,c)=>(t.openBlock(),t.createElementBlock("div",{key:`pa${c}`,class:t.normalizeClass(["details__body__button",{active:_.isSelected}]),onClick:s=>a(_)},t.toDisplayString(_.name),11,xua))),128))])]),t.createElementVNode("div",wua,[kua,t.createElementVNode("div",Cua,[t.createVNode(t.unref(uo),{label:"Todos","model-value":I.value,"onUpdate:modelValue":m},null,8,["model-value"])])]),t.createElementVNode("div",Tua,[Sua,t.createElementVNode("div",Eua,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(L.value.firstHalf,(_,c)=>(t.openBlock(),t.createElementBlock("div",{key:`pa${c}`,class:t.normalizeClass(["details__body__button",{active:_.isSelected}]),onClick:s=>b(_)},t.toDisplayString(_.text),11,Aua))),128))])]),t.createElementVNode("div",Mua,[Iua,t.createElementVNode("div",Pua,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(L.value.secondHalf,(_,c)=>(t.openBlock(),t.createElementBlock("div",{key:`pa${c}`,class:t.normalizeClass(["details__body__button",{active:_.isSelected}]),onClick:s=>b(_)},t.toDisplayString(_.text),11,Nua))),128))])])],4))}},[["__scopeId","data-v-80d9c265"]])},Symbol.toStringTag,{value:"Module"})),Oua={class:"filter-field"},zua=Object.freeze(Object.defineProperty({__proto__:null,default:Ao({__name:"FilterField",setup(e){const n=t.ref(Array.from({length:16},(I,L)=>L+1));function r(){}return(I,L)=>(t.openBlock(),t.createElementBlock("div",Oua,[t.createVNode(t.unref(sG),{width:"100%","background-color":"#2E3B46",value:n.value,"onUpdate:modelValue":r},null,8,["value"])]))}},[["__scopeId","data-v-8103c3e1"]])},Symbol.toStringTag,{value:"Module"})),Lua={class:"subcategory-group"},Fua={__name:"SubcategoryGroup",props:{subcategoryGroup:{type:Array,default:()=>[]}},setup(e){return(n,r)=>(t.openBlock(),t.createElementBlock("div",Lua,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.subcategoryGroup,I=>(t.openBlock(),t.createBlock(t.unref(ho),{key:I.id,modelValue:I.isSelected,"onUpdate:modelValue":L=>I.isSelected=L,label:I.name},null,8,["modelValue","onUpdate:modelValue","label"]))),128))]))}},Dua=Mo(Fua,[["__scopeId","data-v-ae6f3d72"]]),Vua={class:"filter-subcategories"},Rua=Object.freeze(Object.defineProperty({__proto__:null,default:Mo({__name:"FilterSubcategories",props:{subcategoryGroups:{type:Array,default:()=>[]}},setup(e){return(n,r)=>(t.openBlock(),t.createElementBlock("div",Vua,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.subcategoryGroups,I=>(t.openBlock(),t.createElementBlock("div",{key:I.id,class:"filter-subcategories__group"},[t.createVNode(Dua,{subcategoryGroup:I},null,8,["subcategoryGroup"])]))),128))]))}},[["__scopeId","data-v-5edaefc2"]])},Symbol.toStringTag,{value:"Module"})),D5=e=>(t.pushScopeId("data-v-80d9c265"),e=e(),t.popScopeId(),e),$ua={class:"details__header"},jua=D5(()=>t.createElementVNode("div",{class:"details__header__title"},"Jugando como",-1)),Uua={class:"details__header__checkbox"},Hua={class:"details__body"},Gua={class:"details__body__playing-as"},Wua=["onClick"],qua={class:"details__header"},Yua=D5(()=>t.createElementVNode("div",{class:"details__header__title"},"En: (Elige el lapso de tiempo)",-1)),Zua={class:"details__header__checkbox"},Jua={class:"details__body"},Xua=D5(()=>t.createElementVNode("div",{class:"details__body__title"},"1er tiempo",-1)),Kua={class:"details__body__game-section"},Qua=["onClick"],eha={class:"details__body"},tha=D5(()=>t.createElementVNode("div",{class:"details__body__title"},"2do tiempo",-1)),aha={class:"details__body__game-section"},nha=["onClick"],rha=Object.freeze(Object.defineProperty({__proto__:null,default:Mo({__name:"FilterConditions",props:{playingAs:{type:Array,default:()=>[{name:"Local",isSelected:!0},{name:"Visitante",isSelected:!0}]},gameSections:{type:Array,default:()=>[{text:"0-15",value:1,isSelected:!0},{text:"16-30",value:2,isSelected:!0},{text:"31-45",value:3,isSelected:!0},{text:"46-60",value:4,isSelected:!0},{text:"61-75",value:5,isSelected:!0},{text:"76-90",value:6,isSelected:!0}]},buttonsBackgroundColor:{type:String,default:"rgba(255, 255, 255, 0)"},buttonsBackgroundColorActive:{type:String,default:"rgba(203, 238, 107, 0.05)"},buttonsTextColor:{type:String,default:"rgba(255, 255, 255, 0.8)"},buttonsTextColorActive:{type:String,default:"rgba(255, 255, 255, 1)"},buttonsBorderColor:{type:String,default:"#8ea2ab"},buttonsBorderColorActive:{type:String,default:"#cbee6b"},buttonsBorderWidth:{type:String,default:"0.8px"},buttonsBorderWidthActive:{type:String,default:"1px"},buttonsBorderRadius:{type:String,default:"4px"}},setup(e){const n=e;t.useCssVars(i=>({"49cba245":e.buttonsBackgroundColor,"52f02da6":e.buttonsTextColor,"7d3f686a":e.buttonsBorderWidth,"7c286a07":e.buttonsBorderColor,"24a6f4aa":e.buttonsBackgroundColorActive,cd8d7768:e.buttonsTextColorActive,"35fa5c10":e.buttonsBorderWidthActive,"0cde1826":e.buttonsBorderColorActive}));const r=t.computed(()=>n.playingAs.every(i=>i.isSelected)),I=t.computed(()=>n.gameSections.every(i=>i.isSelected)),L=t.computed(()=>n.gameSections.reduce((i,v)=>(v.value<=3?i.firstHalf.push(v):i.secondHalf.push(v),i),{firstHalf:[],secondHalf:[]})),d=t.computed(()=>({"--border-radius-first-button":`${n.buttonsBorderRadius} 0 0 ${n.buttonsBorderRadius}`,"--border-radius-last-button":`0 ${n.buttonsBorderRadius} ${n.buttonsBorderRadius} 0`}));function g(i){i?n.playingAs.forEach(v=>{v.isSelected=!0}):n.playingAs.forEach((v,_)=>{v.isSelected=_===0})}function a(i){n.playingAs.filter(v=>v.isSelected).length===1&&i.isSelected||(i.isSelected=!i.isSelected)}function b(i){n.gameSections.filter(v=>v.isSelected).length===1&&i.isSelected||(i.isSelected=!i.isSelected)}function m(i){i?n.gameSections.forEach(v=>{v.isSelected=!0}):n.gameSections.forEach((v,_)=>{v.isSelected=_===0})}return(i,v)=>(t.openBlock(),t.createElementBlock("div",{class:"details",style:t.normalizeStyle(d.value)},[t.createElementVNode("div",$ua,[jua,t.createElementVNode("div",Uua,[t.createVNode(t.unref(ho),{label:"Todos","model-value":r.value,"onUpdate:modelValue":g},null,8,["model-value"])])]),t.createElementVNode("div",Hua,[t.createElementVNode("div",Gua,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(n.playingAs,(_,c)=>(t.openBlock(),t.createElementBlock("div",{key:`pa${c}`,class:t.normalizeClass(["details__body__button",{active:_.isSelected}]),onClick:s=>a(_)},t.toDisplayString(_.name),11,Wua))),128))])]),t.createElementVNode("div",qua,[Yua,t.createElementVNode("div",Zua,[t.createVNode(t.unref(ho),{label:"Todos","model-value":I.value,"onUpdate:modelValue":m},null,8,["model-value"])])]),t.createElementVNode("div",Jua,[Xua,t.createElementVNode("div",Kua,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(L.value.firstHalf,(_,c)=>(t.openBlock(),t.createElementBlock("div",{key:`pa${c}`,class:t.normalizeClass(["details__body__button",{active:_.isSelected}]),onClick:s=>b(_)},t.toDisplayString(_.text),11,Qua))),128))])]),t.createElementVNode("div",eha,[tha,t.createElementVNode("div",aha,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(L.value.secondHalf,(_,c)=>(t.openBlock(),t.createElementBlock("div",{key:`pa${c}`,class:t.normalizeClass(["details__body__button",{active:_.isSelected}]),onClick:s=>b(_)},t.toDisplayString(_.text),11,nha))),128))])])],4))}},[["__scopeId","data-v-80d9c265"]])},Symbol.toStringTag,{value:"Module"})),iha={class:"filter-field"},oha=Object.freeze(Object.defineProperty({__proto__:null,default:Mo({__name:"FilterField",setup(e){const n=t.ref(Array.from({length:16},(I,L)=>L+1));function r(){}return(I,L)=>(t.openBlock(),t.createElementBlock("div",iha,[t.createVNode(t.unref(Jq),{width:"100%","background-color":"#2E3B46",value:n.value,"onUpdate:modelValue":r},null,8,["value"])]))}},[["__scopeId","data-v-8103c3e1"]])},Symbol.toStringTag,{value:"Module"}));Uc.GSCGameData=zda,Uc.connectSocket=aie,Uc.disconnectSocket=nie,Uc.getSocket=wP,Uc.registerStoreModules=dua,Object.defineProperty(Uc,Symbol.toStringTag,{value:"Module"})});
|