@golstats/gsc-game-data 1.0.59 → 1.0.60
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/gsc-game-data.js +9 -11
- package/dist/gsc-game-data.umd.cjs +1 -1
- package/dist/style.css +1 -1
- package/package.json +2 -2
|
@@ -117,4 +117,4 @@
|
|
|
117
117
|
* vuex v4.0.2
|
|
118
118
|
* (c) 2021 Evan You
|
|
119
119
|
* @license MIT
|
|
120
|
-
*/var yLe="store";function wo(e,a){Object.keys(e).forEach(function(o){return a(e[o],o)})}function sk(e){return e!==null&&typeof e=="object"}function uLe(e){return e&&typeof e.then=="function"}function Xt(e,a){if(!e)throw new Error("[vuex] "+a)}function fLe(e,a){return function(){return e(a)}}function ik(e,a,o){return a.indexOf(e)<0&&(o&&o.prepend?a.unshift(e):a.push(e)),function(){var n=a.indexOf(e);n>-1&&a.splice(n,1)}}function rk(e,a){e._actions=Object.create(null),e._mutations=Object.create(null),e._wrappedGetters=Object.create(null),e._modulesNamespaceMap=Object.create(null);var o=e.state;qc(e,o,[],e._modules.root,!0),d0(e,o,a)}function d0(e,a,o){var n=e._state;e.getters={},e._makeLocalGettersCache=Object.create(null);var s=e._wrappedGetters,i={};wo(s,function(r,c){i[c]=fLe(r,e),Object.defineProperty(e.getters,c,{get:function(){return i[c]()},enumerable:!0})}),e._state=t.reactive({data:a}),e.strict&&kLe(e),n&&o&&e._withCommit(function(){n.data=null})}function qc(e,a,o,n,s){var i=!o.length,r=e._modules.getNamespace(o);if(n.namespaced&&(e._modulesNamespaceMap[r]&&process.env.NODE_ENV!=="production"&&console.error("[vuex] duplicate namespace "+r+" for the namespaced module "+o.join("/")),e._modulesNamespaceMap[r]=n),!i&&!s){var c=m0(a,o.slice(0,-1)),h=o[o.length-1];e._withCommit(function(){process.env.NODE_ENV!=="production"&&h in c&&console.warn('[vuex] state field "'+h+'" was overridden by a module with the same name at "'+o.join(".")+'"'),c[h]=n.state})}var d=n.context=_Le(e,r,o);n.forEachMutation(function(l,p){var y=r+p;bLe(e,y,l,d)}),n.forEachAction(function(l,p){var y=l.root?p:r+p,m=l.handler||l;wLe(e,y,m,d)}),n.forEachGetter(function(l,p){var y=r+p;CLe(e,y,l,d)}),n.forEachChild(function(l,p){qc(e,a,o.concat(p),l,s)})}function _Le(e,a,o){var n=a==="",s={dispatch:n?e.dispatch:function(i,r,c){var h=Jc(i,r,c),d=h.payload,l=h.options,p=h.type;if((!l||!l.root)&&(p=a+p,process.env.NODE_ENV!=="production"&&!e._actions[p])){console.error("[vuex] unknown local action type: "+h.type+", global type: "+p);return}return e.dispatch(p,d)},commit:n?e.commit:function(i,r,c){var h=Jc(i,r,c),d=h.payload,l=h.options,p=h.type;if((!l||!l.root)&&(p=a+p,process.env.NODE_ENV!=="production"&&!e._mutations[p])){console.error("[vuex] unknown local mutation type: "+h.type+", global type: "+p);return}e.commit(p,d,l)}};return Object.defineProperties(s,{getters:{get:n?function(){return e.getters}:function(){return lk(e,a)}},state:{get:function(){return m0(e.state,o)}}}),s}function lk(e,a){if(!e._makeLocalGettersCache[a]){var o={},n=a.length;Object.keys(e.getters).forEach(function(s){if(s.slice(0,n)===a){var i=s.slice(n);Object.defineProperty(o,i,{get:function(){return e.getters[s]},enumerable:!0})}}),e._makeLocalGettersCache[a]=o}return e._makeLocalGettersCache[a]}function bLe(e,a,o,n){var s=e._mutations[a]||(e._mutations[a]=[]);s.push(function(i){o.call(e,n.state,i)})}function wLe(e,a,o,n){var s=e._actions[a]||(e._actions[a]=[]);s.push(function(i){var r=o.call(e,{dispatch:n.dispatch,commit:n.commit,getters:n.getters,state:n.state,rootGetters:e.getters,rootState:e.state},i);return uLe(r)||(r=Promise.resolve(r)),e._devtoolHook?r.catch(function(c){throw e._devtoolHook.emit("vuex:error",c),c}):r})}function CLe(e,a,o,n){if(e._wrappedGetters[a]){process.env.NODE_ENV!=="production"&&console.error("[vuex] duplicate getter key: "+a);return}e._wrappedGetters[a]=function(s){return o(n.state,n.getters,s.state,s.getters)}}function kLe(e){t.watch(function(){return e._state.data},function(){process.env.NODE_ENV!=="production"&&Xt(e._committing,"do not mutate vuex store state outside mutation handlers.")},{deep:!0,flush:"sync"})}function m0(e,a){return a.reduce(function(o,n){return o[n]},e)}function Jc(e,a,o){return sk(e)&&e.type&&(o=a,a=e,e=e.type),process.env.NODE_ENV!=="production"&&Xt(typeof e=="string","expects string as the type, but found "+typeof e+"."),{type:e,payload:a,options:o}}var SLe="vuex bindings",ck="vuex:mutations",p0="vuex:actions",Sn="vuex",ELe=0;function NLe(e,a){gLe({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:[SLe]},function(o){o.addTimelineLayer({id:ck,label:"Vuex Mutations",color:dk}),o.addTimelineLayer({id:p0,label:"Vuex Actions",color:dk}),o.addInspector({id:Sn,label:"Vuex",icon:"storage",treeFilterPlaceholder:"Filter stores..."}),o.on.getInspectorTree(function(n){if(n.app===e&&n.inspectorId===Sn)if(n.filter){var s=[];gk(s,a._modules.root,n.filter,""),n.rootNodes=s}else n.rootNodes=[hk(a._modules.root,"")]}),o.on.getInspectorState(function(n){if(n.app===e&&n.inspectorId===Sn){var s=n.nodeId;lk(a,s),n.state=xLe(ILe(a._modules,s),s==="root"?a.getters:a._makeLocalGettersCache,s)}}),o.on.editInspectorState(function(n){if(n.app===e&&n.inspectorId===Sn){var s=n.nodeId,i=n.path;s!=="root"&&(i=s.split("/").filter(Boolean).concat(i)),a._withCommit(function(){n.set(a._state.data,i,n.state.value)})}}),a.subscribe(function(n,s){var i={};n.payload&&(i.payload=n.payload),i.state=s,o.notifyComponentUpdate(),o.sendInspectorTree(Sn),o.sendInspectorState(Sn),o.addTimelineEvent({layerId:ck,event:{time:Date.now(),title:n.type,data:i}})}),a.subscribeAction({before:function(n,s){var i={};n.payload&&(i.payload=n.payload),n._id=ELe++,n._time=Date.now(),i.state=s,o.addTimelineEvent({layerId:p0,event:{time:n._time,title:n.type,groupId:n._id,subtitle:"start",data:i}})},after:function(n,s){var i={},r=Date.now()-n._time;i.duration={_custom:{type:"duration",display:r+"ms",tooltip:"Action duration",value:r}},n.payload&&(i.payload=n.payload),i.state=s,o.addTimelineEvent({layerId:p0,event:{time:Date.now(),title:n.type,groupId:n._id,subtitle:"end",data:i}})}})})}var dk=8702998,BLe=6710886,$Le=16777215,mk={label:"namespaced",textColor:$Le,backgroundColor:BLe};function pk(e){return e&&e!=="root"?e.split("/").slice(-2,-1)[0]:"Root"}function hk(e,a){return{id:a||"root",label:pk(a),tags:e.namespaced?[mk]:[],children:Object.keys(e._children).map(function(o){return hk(e._children[o],a+o+"/")})}}function gk(e,a,o,n){n.includes(o)&&e.push({id:n||"root",label:n.endsWith("/")?n.slice(0,n.length-1):n||"Root",tags:a.namespaced?[mk]:[]}),Object.keys(a._children).forEach(function(s){gk(e,a._children[s],o,n+s+"/")})}function xLe(e,a,o){a=o==="root"?a:a[o];var n=Object.keys(a),s={state:Object.keys(e.state).map(function(r){return{key:r,editable:!0,value:e.state[r]}})};if(n.length){var i=VLe(a);s.getters=Object.keys(i).map(function(r){return{key:r.endsWith("/")?pk(r):r,editable:!1,value:h0(function(){return i[r]})}})}return s}function VLe(e){var a={};return Object.keys(e).forEach(function(o){var n=o.split("/");if(n.length>1){var s=a,i=n.pop();n.forEach(function(r){s[r]||(s[r]={_custom:{value:{},display:r,tooltip:"Module",abstract:!0}}),s=s[r]._custom.value}),s[i]=h0(function(){return e[o]})}else a[o]=h0(function(){return e[o]})}),a}function ILe(e,a){var o=a.split("/").filter(function(n){return n});return o.reduce(function(n,s,i){var r=n[s];if(!r)throw new Error('Missing module "'+s+'" for path "'+a+'".');return i===o.length-1?r:r._children},a==="root"?e:e.root._children)}function h0(e){try{return e()}catch(a){return a}}var Zt=function(e,a){this.runtime=a,this._children=Object.create(null),this._rawModule=e;var o=e.state;this.state=(typeof o=="function"?o():o)||{}},yk={namespaced:{configurable:!0}};yk.namespaced.get=function(){return!!this._rawModule.namespaced},Zt.prototype.addChild=function(e,a){this._children[e]=a},Zt.prototype.removeChild=function(e){delete this._children[e]},Zt.prototype.getChild=function(e){return this._children[e]},Zt.prototype.hasChild=function(e){return e in this._children},Zt.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)},Zt.prototype.forEachChild=function(e){wo(this._children,e)},Zt.prototype.forEachGetter=function(e){this._rawModule.getters&&wo(this._rawModule.getters,e)},Zt.prototype.forEachAction=function(e){this._rawModule.actions&&wo(this._rawModule.actions,e)},Zt.prototype.forEachMutation=function(e){this._rawModule.mutations&&wo(this._rawModule.mutations,e)},Object.defineProperties(Zt.prototype,yk);var Co=function(e){this.register([],e,!1)};Co.prototype.get=function(e){return e.reduce(function(a,o){return a.getChild(o)},this.root)},Co.prototype.getNamespace=function(e){var a=this.root;return e.reduce(function(o,n){return a=a.getChild(n),o+(a.namespaced?n+"/":"")},"")},Co.prototype.update=function(e){uk([],this.root,e)},Co.prototype.register=function(e,a,o){var n=this;o===void 0&&(o=!0),process.env.NODE_ENV!=="production"&&bk(e,a);var s=new Zt(a,o);if(e.length===0)this.root=s;else{var i=this.get(e.slice(0,-1));i.addChild(e[e.length-1],s)}a.modules&&wo(a.modules,function(r,c){n.register(e.concat(c),r,o)})},Co.prototype.unregister=function(e){var a=this.get(e.slice(0,-1)),o=e[e.length-1],n=a.getChild(o);if(!n){process.env.NODE_ENV!=="production"&&console.warn("[vuex] trying to unregister module '"+o+"', which is not registered");return}n.runtime&&a.removeChild(o)},Co.prototype.isRegistered=function(e){var a=this.get(e.slice(0,-1)),o=e[e.length-1];return a?a.hasChild(o):!1};function uk(e,a,o){if(process.env.NODE_ENV!=="production"&&bk(e,o),a.update(o),o.modules)for(var n in o.modules){if(!a.getChild(n)){process.env.NODE_ENV!=="production"&&console.warn("[vuex] trying to add a new module '"+n+"' on hot reloading, manual reload is needed");return}uk(e.concat(n),a.getChild(n),o.modules[n])}}var fk={assert:function(e){return typeof e=="function"},expected:"function"},ALe={assert:function(e){return typeof e=="function"||typeof e=="object"&&typeof e.handler=="function"},expected:'function or object with "handler" function'},_k={getters:fk,mutations:fk,actions:ALe};function bk(e,a){Object.keys(_k).forEach(function(o){if(a[o]){var n=_k[o];wo(a[o],function(s,i){Xt(n.assert(s),OLe(e,o,i,s,n.expected))})}})}function OLe(e,a,o,n,s){var i=a+" should be "+s+' but "'+a+"."+o+'"';return e.length>0&&(i+=' in module "'+e.join(".")+'"'),i+=" is "+JSON.stringify(n)+".",i}var St=function e(a){var o=this;a===void 0&&(a={}),process.env.NODE_ENV!=="production"&&(Xt(typeof Promise<"u","vuex requires a Promise polyfill in this browser."),Xt(this instanceof e,"store must be called with the new operator."));var n=a.plugins;n===void 0&&(n=[]);var s=a.strict;s===void 0&&(s=!1);var i=a.devtools;this._committing=!1,this._actions=Object.create(null),this._actionSubscribers=[],this._mutations=Object.create(null),this._wrappedGetters=Object.create(null),this._modules=new Co(a),this._modulesNamespaceMap=Object.create(null),this._subscribers=[],this._makeLocalGettersCache=Object.create(null),this._devtools=i;var r=this,c=this,h=c.dispatch,d=c.commit;this.dispatch=function(p,y){return h.call(r,p,y)},this.commit=function(p,y,m){return d.call(r,p,y,m)},this.strict=s;var l=this._modules.root.state;qc(this,l,[],this._modules.root),d0(this,l),n.forEach(function(p){return p(o)})},g0={state:{configurable:!0}};St.prototype.install=function(e,a){e.provide(a||yLe,this),e.config.globalProperties.$store=this;var o=this._devtools!==void 0?this._devtools:process.env.NODE_ENV!=="production"||!1;o&&NLe(e,this)},g0.state.get=function(){return this._state.data},g0.state.set=function(e){process.env.NODE_ENV!=="production"&&Xt(!1,"use store.replaceState() to explicit replace store state.")},St.prototype.commit=function(e,a,o){var n=this,s=Jc(e,a,o),i=s.type,r=s.payload,c=s.options,h={type:i,payload:r},d=this._mutations[i];if(!d){process.env.NODE_ENV!=="production"&&console.error("[vuex] unknown mutation type: "+i);return}this._withCommit(function(){d.forEach(function(l){l(r)})}),this._subscribers.slice().forEach(function(l){return l(h,n.state)}),process.env.NODE_ENV!=="production"&&c&&c.silent&&console.warn("[vuex] mutation type: "+i+". Silent option has been removed. Use the filter functionality in the vue-devtools")},St.prototype.dispatch=function(e,a){var o=this,n=Jc(e,a),s=n.type,i=n.payload,r={type:s,payload:i},c=this._actions[s];if(!c){process.env.NODE_ENV!=="production"&&console.error("[vuex] unknown action type: "+s);return}try{this._actionSubscribers.slice().filter(function(d){return d.before}).forEach(function(d){return d.before(r,o.state)})}catch(d){process.env.NODE_ENV!=="production"&&(console.warn("[vuex] error in before action subscribers: "),console.error(d))}var h=c.length>1?Promise.all(c.map(function(d){return d(i)})):c[0](i);return new Promise(function(d,l){h.then(function(p){try{o._actionSubscribers.filter(function(y){return y.after}).forEach(function(y){return y.after(r,o.state)})}catch(y){process.env.NODE_ENV!=="production"&&(console.warn("[vuex] error in after action subscribers: "),console.error(y))}d(p)},function(p){try{o._actionSubscribers.filter(function(y){return y.error}).forEach(function(y){return y.error(r,o.state,p)})}catch(y){process.env.NODE_ENV!=="production"&&(console.warn("[vuex] error in error action subscribers: "),console.error(y))}l(p)})})},St.prototype.subscribe=function(e,a){return ik(e,this._subscribers,a)},St.prototype.subscribeAction=function(e,a){var o=typeof e=="function"?{before:e}:e;return ik(o,this._actionSubscribers,a)},St.prototype.watch=function(e,a,o){var n=this;return process.env.NODE_ENV!=="production"&&Xt(typeof e=="function","store.watch only accepts a function."),t.watch(function(){return e(n.state,n.getters)},a,Object.assign({},o))},St.prototype.replaceState=function(e){var a=this;this._withCommit(function(){a._state.data=e})},St.prototype.registerModule=function(e,a,o){o===void 0&&(o={}),typeof e=="string"&&(e=[e]),process.env.NODE_ENV!=="production"&&(Xt(Array.isArray(e),"module path must be a string or an Array."),Xt(e.length>0,"cannot register the root module by using registerModule.")),this._modules.register(e,a),qc(this,this.state,e,this._modules.get(e),o.preserveState),d0(this,this.state)},St.prototype.unregisterModule=function(e){var a=this;typeof e=="string"&&(e=[e]),process.env.NODE_ENV!=="production"&&Xt(Array.isArray(e),"module path must be a string or an Array."),this._modules.unregister(e),this._withCommit(function(){var o=m0(a.state,e.slice(0,-1));delete o[e[e.length-1]]}),rk(this)},St.prototype.hasModule=function(e){return typeof e=="string"&&(e=[e]),process.env.NODE_ENV!=="production"&&Xt(Array.isArray(e),"module path must be a string or an Array."),this._modules.isRegistered(e)},St.prototype.hotUpdate=function(e){this._modules.update(e),rk(this,!0)},St.prototype._withCommit=function(e){var a=this._committing;this._committing=!0,e(),this._committing=a},Object.defineProperties(St.prototype,g0);var TLe=FLe(function(e,a){var o={};return process.env.NODE_ENV!=="production"&&!wk(a)&&console.error("[vuex] mapMutations: mapper parameter must be either an Array or an Object"),zLe(a).forEach(function(n){var s=n.key,i=n.val;o[s]=function(){for(var r=[],c=arguments.length;c--;)r[c]=arguments[c];var h=this.$store.commit;if(e){var d=PLe(this.$store,"mapMutations",e);if(!d)return;h=d.context.commit}return typeof i=="function"?i.apply(this,[h].concat(r)):h.apply(this.$store,[i].concat(r))}}),o});function zLe(e){return wk(e)?Array.isArray(e)?e.map(function(a){return{key:a,val:a}}):Object.keys(e).map(function(a){return{key:a,val:e[a]}}):[]}function wk(e){return Array.isArray(e)||sk(e)}function FLe(e){return function(a,o){return typeof a!="string"?(o=a,a=""):a.charAt(a.length-1)!=="/"&&(a+="/"),e(a,o)}}function PLe(e,a,o){var n=e._modulesNamespaceMap[o];return process.env.NODE_ENV!=="production"&&!n&&console.error("[vuex] module namespace not found in "+a+"(): "+o),n}const RLe="/icn-play.svg",DLe="/icn-tiros-de-esquina.svg",LLe="/icn-tiro-a-porteria.svg",vLe="/icn-cambio.svg",jLe="/icn-falta.svg",MLe="/atajada.svg",HLe="/fuera-de-lugar.svg",y0="/gol.svg",ULe="/var.png",GLe="/tiempo-agregado.svg",WLe="/jugada-peligrosa.svg",qLe="/penal-marcado.svg",JLe="/penal-fallado.svg",XLe="/inicia-el-partido.svg",ZLe="/fin-del-partido.svg",YLe="/icn-tarjeta-amarilla.svg",KLe="/icn-tarjeta-roja.svg",QLe=[1,2,3,4,6],eve={name:"TimeLineEvent",props:{gameEvent:{type:Object,required:!0},isMobile:{type:Boolean,default:!1},width:{type:Number,default:352},timeLineWidth:{type:Number,default:0}},data(){return{lastHeight:0,gameEventKey:0}},computed:{nameClasses(){const e=[],a=`${this.gameEvent.event_type_id}-${this.gameEvent.category_id}`;return l0.GOAL_IDS.includes(a)?(e.push("is-main-event"),e.push("goal")):l0.YELLOW_CARD_IDS.includes(a)?(e.push("is-main-event"),e.push("yellow-card")):l0.RED_CARD_IDS.includes(a)&&(e.push("is-main-event"),e.push("red-card")),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(a=>iLe(a))),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||QLe.includes(this.gameEvent.event_type_id)?"":this.gameEvent.player_name}},watch:{width(){this.emitHeight()},gameEvent:{deep:!0,handler(){this.gameEventKey++}}},methods:{...TLe("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,a]=this.gameEvent.player_id.split("@");this.$emit("player-changed",{playerOut:Number(e),playerIn:Number(a),teamId:this.gameEvent.team_id})}}},tve=e=>(t.pushScopeId("data-v-4a7434a2"),e=e(),t.popScopeId(),e),ave={class:"time-line-event__details"},ove={width:"127",preload:"metadata",style:{"border-radius":"8px"}},nve=["src"],sve=tve(()=>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)),ive={class:"time-line-event__details__info"},rve={key:0,class:"time-line-event__details__info__header__players"},lve={class:"time-line-event__details__info__header__players__div-img"},cve=["src"],dve={class:"time-line-event__details__info__body"},mve={class:"time-line-event__details__info__body__comment"},pve={class:"time-line-event__minute__container"},hve={class:"time-line-event__minute__container__text"},gve={class:"time-line-event__minute__container__icon-container"},yve={class:"time-line-event__minute__container__icon-container__icon"},uve={key:0,src:DLe,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},fve={key:1,src:LLe,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},_ve={key:2,src:vLe,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},bve={key:3,src:jLe,class:"time-line-event__minute__container__icon-container__icon__img",alt:"Event icon"},wve={key:4,src:MLe,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},Cve={key:5,src:HLe,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},kve={key:6,src:y0,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},Sve={key:7,src:y0,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},Eve={key:8,src:y0,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},Nve={key:9,src:ULe,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},Bve={key:10,src:GLe,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},$ve={key:11,src:WLe,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},xve={key:12,src:qLe,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},Vve={key:13,src:JLe,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},Ive={key:14,src:XLe,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},Ave={key:15,src:ZLe,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},Ove={key:16,src:YLe,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},Tve={key:17,src:KLe,class:"time-line-event__minute__container__icon-container__icon__img",alt:"Event icon"},zve={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 Fve(e,a,o,n,s,i){return t.openBlock(),t.createElementBlock("div",{ref:"timeLineEvent",class:t.normalizeClass(["time-line-event",i.teamTypeClasses]),style:t.normalizeStyle({width:`${o.width}px`}),key:s.gameEventKey},[t.createElementVNode("div",ave,[o.gameEvent.video_link!=="-"&&o.timeLineWidth>700?(t.openBlock(),t.createElementBlock("div",{key:0,class:"time-line-event__details__video-thumbnail",onClick:a[0]||(a[0]=r=>i.thumbnailClick(o.gameEvent.video_link,o.gameEvent.event_type_name))},[t.createElementVNode("video",ove,[t.createElementVNode("source",{src:o.gameEvent.video_link+"#t=0.1",type:"video/mp4"},null,8,nve)]),sve])):t.createCommentVNode("",!0),t.createElementVNode("div",ive,[t.createElementVNode("div",{class:t.normalizeClass(["time-line-event__details__info__header",i.teamTypeClasses2])},[o.gameEvent.video_link=="-"?(t.openBlock(),t.createElementBlock("div",rve,[i.srcImgPlayers?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:0},t.renderList(i.srcImgPlayers,(r,c)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["img-player",{"second-player":c===1}]),key:c},[t.createElementVNode("div",lve,[t.createElementVNode("img",{src:r,alt:""},null,8,cve)])],2))),128)):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0),t.createElementVNode("div",{class:t.normalizeClass(["time-line-event__details__info__header__event-name",i.nameClasses]),onClick:a[1]||(a[1]=r=>i.thumbnailClick(o.gameEvent.video_link,o.gameEvent.event_type_name))},[t.createElementVNode("img",{src:RLe,class:t.normalizeClass("time-line-event__details__info__header__event-play time-line-event__details__info__header__event-play__"+o.gameEvent.event_type_name)},null,2),t.createTextVNode(" "+t.toDisplayString(o.gameEvent.category_id?o.gameEvent.event_type_id===5?o.gameEvent.category_name:o.gameEvent.event_type_name==="Gol"?o.gameEvent.event_type_name+" de "+o.gameEvent.team_name:o.gameEvent.event_type_name:o.gameEvent.comments),1)],2)],2),t.createElementVNode("div",dve,[t.createElementVNode("div",mve,t.toDisplayString(this.gameEvent.category_id?`${this.gameEvent.comments}`:""),1)])])]),t.createElementVNode("div",{class:t.normalizeClass(["time-line-event__minute",i.minuteClasses])},[t.createElementVNode("div",pve,[t.createElementVNode("div",hve,t.toDisplayString(o.gameEvent.minute)+"'",1),t.createElementVNode("div",gve,[t.createElementVNode("div",yve,[o.gameEvent.category_id==18?(t.openBlock(),t.createElementBlock("img",uve)):o.gameEvent.category_id==20?(t.openBlock(),t.createElementBlock("img",fve)):o.gameEvent.category_id==10?(t.openBlock(),t.createElementBlock("img",_ve)):o.gameEvent.category_id==21?(t.openBlock(),t.createElementBlock("img",bve)):o.gameEvent.category_id==27?(t.openBlock(),t.createElementBlock("img",wve)):o.gameEvent.category_id==17?(t.openBlock(),t.createElementBlock("img",Cve)):o.gameEvent.category_id==6&&o.gameEvent.event_type_id==1||o.gameEvent.category_id==5&&o.gameEvent.event_type_id==1||o.gameEvent.category_id==1&&o.gameEvent.event_type_id==1||o.gameEvent.category_id==2&&o.gameEvent.event_type_id==1||o.gameEvent.category_id==3&&o.gameEvent.event_type_id==1||o.gameEvent.category_id==7&&o.gameEvent.event_type_id==1||o.gameEvent.category_id==12&&o.gameEvent.event_type_id==1?(t.openBlock(),t.createElementBlock("img",kve)):o.gameEvent.category_id==4?(t.openBlock(),t.createElementBlock("img",Sve)):o.gameEvent.category_id==13||o.gameEvent.category_id==16?(t.openBlock(),t.createElementBlock("img",Eve)):o.gameEvent.category_id==30||o.gameEvent.category_id==31||o.gameEvent.category_id==32||o.gameEvent.category_id==33||o.gameEvent.category_id==34||o.gameEvent.category_id==35||o.gameEvent.category_id==36||o.gameEvent.category_id==37||o.gameEvent.category_id==38||o.gameEvent.category_id==39||o.gameEvent.category_id==40?(t.openBlock(),t.createElementBlock("img",Nve)):o.gameEvent.category_id==28?(t.openBlock(),t.createElementBlock("img",Bve)):o.gameEvent.category_id==26?(t.openBlock(),t.createElementBlock("img",$ve)):o.gameEvent.category_id==22?(t.openBlock(),t.createElementBlock("img",xve)):o.gameEvent.category_id==15||o.gameEvent.category_id==23?(t.openBlock(),t.createElementBlock("img",Vve)):o.gameEvent.category_id==0&&o.gameEvent.game_status_id==16||o.gameEvent.category_id==0&&o.gameEvent.game_status_id==18||o.gameEvent.category_id==0&&o.gameEvent.game_status_id==20||o.gameEvent.category_id==0&&o.gameEvent.game_status_id==22?(t.openBlock(),t.createElementBlock("img",Ive)):o.gameEvent.category_id==0&&o.gameEvent.game_status_id==13||o.gameEvent.category_id==0&&o.gameEvent.game_status_id==17||o.gameEvent.category_id==0&&o.gameEvent.game_status_id==19||o.gameEvent.category_id==0&&o.gameEvent.game_status_id==21||o.gameEvent.category_id==0&&o.gameEvent.game_status_id==23?(t.openBlock(),t.createElementBlock("img",Ave)):o.gameEvent.category_id==8?(t.openBlock(),t.createElementBlock("img",Ove)):o.gameEvent.category_id==9?(t.openBlock(),t.createElementBlock("img",Tve)):(t.openBlock(),t.createElementBlock("img",zve))])])])],2)],6)}const Pve=ii(eve,[["render",Fve],["__scopeId","data-v-4a7434a2"]]),Rve={"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"},Dve={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 Xc=null;const Lve={name:"TimeLine",components:{Tooltip:aLe,TimeLineEvent:Pve},mixins:[nLe],props:{gameData:{type:Object,required:!0},timeLinePeriod:{type:String,default:"all"}},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.timeLineStatus="finished"),this.fillGameEvents(e.id))}},"$socket.connected":{immediate:!0,handler(e){e&&this.gameData.id&&this.subscribeToMXMChannel()}},gameEvents(e){e.length&&this.gameData.status!==1&&(this.timeLineStatus="live")}},methods:{async fillGameEvents(e){try{const a=await this.fetchGameEvents(e);a?(this.gameEvents=[...a],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(a){throw new Error(a)}},getGameEventClassAndSetIcon(e,a){return e.icon=a===0?"inicio_del_partido":Rve[`${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:a}}=await tk.get(`${this.gameEventsUrl}${e}`);return a}catch(a){throw new Error(a)}},subscribeToMXMChannel(){this.channelName=`mxm.game.${this.gameData.id}`,this.$socket.client.emit("subscribe",{channel:this.channelName}),this.isSubscribed=!0},checkGameEventsQueue(){this.gameEventsQueue.length&&this.gameEvents.push(...this.gameEventsQueue),this.areGameEventsFilled=!0},setUpResizeObserver(){if(window.ResizeObserver)Xc=new ResizeObserver(()=>{this.timeLineWidth=this.$refs.timeLine.clientWidth}),Xc.observe(this.$refs.timeLine);else throw new Error("Resize observer not supported!")},updateContainerHeight(e,a){const o=this.$refs[`gameEventDiv${a}`][0],n=this.$refs[`gameEventLine${a}`]?this.$refs[`gameEventLine${a}`][0]:null,s=e+12;o&&(o.style.height=`${s}px`),n&&(n.style.height=`${s}px`)},sortGameEvents(){this.gameEvents.sort((e,a)=>this.getMatchLapseMinutes(e.match_lapse)+Number(e.minute)-(this.getMatchLapseMinutes(a.match_lapse)+Number(a.minute))),this.gameEvents.forEach(e=>{this.gameEventsByPeriod[e.match_lapse===1?"firstHalf":"secondHalf"].push(e)})},getMatchLapseMinutes(e){let a=0;switch(e){case 1:a=0;break;case 2:a=45;break;case 3:a=90;break;case 4:a=105;break;case 5:a=120;break}return a},addGameEventFromChannel(e){this.areGameEventsFilled?(this.gameEvents.push(e),this.sortGameEvents()):this.gameEventsQueue.push(e)},deleteGameEventFromChannel(e){const a=this.gameEvents.findIndex(o=>o.play_id===e.play_id);a&&this.gameEvents.splice(a,1)},checkTimeLineStatus(){this.gameEvents.forEach(a=>{const o=Dve[a.game_status];o&&this.timeLineStatuses.push({...o,gameEvent:a})}),this.timeLineStatuses.sort((a,o)=>o.weight-a.weight);const e=this.timeLineStatuses[0];e&&(this.currentStatus=e,e.playTimer&&this.startTimer())},startTimer(){},getTeamLogoSrc(e="homeTeam"){const a=this.gameData[e].team_id;return sLe(a)},thumbnailClick(e){this.dataVideo.link=e,this.dataVideo.visible=!0}},mounted(){this.$nextTick(()=>{this.setUpResizeObserver()})},beforeUnmount(){Xc&&Xc.unobserve(this.$refs.timeLine)},sockets:{new_mxm(e,a){this.channelName===e&&this.addGameEventFromChannel(a)},update_mxm(e,a){this.channelName===e&&(this.deleteGameEventFromChannel(a),this.addGameEventFromChannel(a))},delete_mxm(e,a){this.channelName===e&&this.deleteGameEventFromChannel(a)}}},Ck=e=>(t.pushScopeId("data-v-00f10598"),e=e(),t.popScopeId(),e),vve={ref:"timeLine",class:"time-line"},jve={class:"time-line__header"},Mve={class:"time-line__header__dot"},Hve={class:"time-line__header__dot__home-team team-logo"},Uve=["src"],Gve={class:"time-line__header__dot__away-team team-logo"},Wve=["src"],qve={class:"time-line__game-events"},Jve={key:1,class:"start-line"},Xve=Ck(()=>t.createElementVNode("div",null,null,-1)),Zve=Ck(()=>t.createElementVNode("div",null,null,-1)),Yve=[Xve,Zve],Kve={key:1,class:"noEventText"},Qve={class:"tooltip-data"},eje=["src"];function tje(e,a,o,n,s,i){const r=t.resolveComponent("TimeLineEvent"),c=t.resolveComponent("Tooltip");return t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createElementVNode("div",vve,[t.createElementVNode("div",jve,[t.createElementVNode("div",Mve,[t.createElementVNode("div",Hve,[t.createElementVNode("img",{src:i.getTeamLogoSrc("homeTeam"),alt:""},null,8,Uve)]),t.createElementVNode("div",Gve,[t.createElementVNode("img",{src:i.getTeamLogoSrc("awayTeam"),alt:""},null,8,Wve)])])]),t.createElementVNode("div",qve,[o.gameData.status!==4||o.gameData.is_live?(t.openBlock(),t.createBlock(t.TransitionGroup,{key:0,name:s.transitionName,tag:"div"},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(i.gameEventsToShow,(h,d)=>(t.openBlock(),t.createElementBlock("div",{class:"time-line__game-events__grid",key:h.play_id},[t.createElementVNode("div",{ref_for:!0,ref:`gameEventDiv${d}`,class:t.normalizeClass(i.getGameEventClassAndSetIcon(h,d))},[t.createElementVNode("div",{class:t.normalizeClass(i.getEventContainerClass(h))},[t.createVNode(r,{"game-event":h,"is-mobile":i.isMobile,"time-line-width":s.timeLineWidth,width:i.gameEventWidth,onEventHeight:l=>i.updateContainerHeight(l,d),onPlayerChanged:a[0]||(a[0]=l=>e.$emit("player-changed",l)),onThumbnailClick:i.thumbnailClick},null,8,["game-event","is-mobile","time-line-width","width","onEventHeight","onThumbnailClick"])],2),d>0?(t.openBlock(),t.createElementBlock("div",{key:0,ref_for:!0,ref:`gameEventLine${d}`,class:"line"},null,512)):t.createCommentVNode("",!0),o.gameData.status===1&&d===i.gameEventsToShow.length-1?(t.openBlock(),t.createElementBlock("div",Jve,Yve)):t.createCommentVNode("",!0)],2)]))),128))]),_:1},8,["name"])):(t.openBlock(),t.createElementBlock("div",Kve," Aún no comienza el partido "))])],512),t.createVNode(c,{data:s.dataVideo},{default:t.withCtx(()=>[t.createElementVNode("div",Qve,[t.createElementVNode("div",null,[t.createElementVNode("video",{class:"tooltip-video",controls:"",autoplay:"",src:s.dataVideo.link,format:"video/mp4"},null,8,eje)])])]),_:1},8,["data"])],64)}const aje=ii(Lve,[["render",tje],["__scopeId","data-v-00f10598"]]),oje={class:"game-time-line__options"},nje={class:"game-time-line__timeline"},sje={__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"}})}},setup(e){tk.defaults.headers.common.Authorization="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MCwibmFtZSI6IlVzdWFyaW8gRnJlZSIsInVzZXJuYW1lIjoiZnJlZUBnb2xzdGF0cy5jb20iLCJlbWFpbCI6ImZyZWVAZ29sc3RhdHMuY29tIiwiaWF0IjoxNjA2NzU4Nzk1LCJleHAiOjE2MzgyOTQ3OTV9.kPNmP7yDtk38cAXrUyc7OHRh6J25VFqy-XUNzbK-4YE";const a=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"}),o=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 n=null;const s=t.ref(["Todo","1er tiempo","2do tiempo"]),i=t.ref("Todo"),r=t.ref({}),c=t.ref(null),h=t.ref(0),d=t.computed(()=>{let g="all";return i.value==="1er tiempo"||i.value==="1er"?g="firstHalf":(i.value==="2do tiempo"||i.value==="2do")&&(g="secondHalf"),g}),l=t.computed(()=>h.value<500);function p(g){i.value=g}function y(g){r.value=g}function m(){if(window.ResizeObserver)n=new ResizeObserver(()=>{h.value=c.value.clientWidth}),n.observe(c.value);else throw new Error("Resize observer not supported!")}return t.onMounted(()=>{m()}),t.onBeforeUnmount(()=>{n&&n.unobserve(c.value)}),(g,u)=>(t.openBlock(),t.createElementBlock("div",{ref_key:"gameTimeLine",ref:c,class:"game-time-line"},[t.createElementVNode("div",oje,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(s.value,f=>(t.openBlock(),t.createElementBlock("div",{key:f,class:"game-time-line__options__option"},[t.createVNode(PRe,t.mergeProps(h.value<390?o.value:a.value,{text:f=="Todo"?f:h.value<390?f.substring(0,3):f,"is-active":i.value===f,onClick:_=>p(f)}),null,16,["text","is-active","onClick"])]))),128))]),t.createElementVNode("div",nje,[t.createVNode(aje,{"game-data":e.game,"time-line-period":d.value,"is-mobile":l.value,onGameEventsByPeriodFilled:y},null,8,["game-data","time-line-period","is-mobile"])])],512))}},ije=ii(sje,[["__scopeId","data-v-bfaa6d14"]]);function rje(e){const a=t.ref({width:0,height:0});function o(){const n=e.value.getBoundingClientRect();a.value.width=n.width,a.value.height=n.height}return t.onMounted(()=>{o(),window.addEventListener("resize",o)}),t.onUnmounted(()=>{window.removeEventListener("resize",o)}),{elementSize:a}}const lje=(e,a)=>{const o=e.__vccOpts||e;for(const[n,s]of a)o[n]=s;return o},u0={name:"ScrollableContainer",props:{backgroundColor:{type:String,default:"#0D1D29"},pxScroll:{type:Number,default:100},arrows:{type:Boolean,default:!0},arrowsHideOnNoScroll:{type:Boolean,default:!1},arrowsScrollHide:{type:Boolean,default:!1},arrowsColor:{type:String,default:"#CBEE6B"},arrowsHeight:{type:Number,default:15},arrowsWidth:{type:Number,default:15},arrowsPadding:{type:Number,default:5},arrowsMargin:{type:Number,default:10},arrowsRadius:{type:String,default:"0%"},arrowsBorder:{type:String,default:"none"},arrowsBackground:{type:String,default:"#0D1D29"},arrowsContainerBgL:{type:String,default:"#0D1D29"},arrowsContainerBgR:{type:String,default:"#0D1D29"},scrollColor:{type:String,default:"#c3e569"},arrowsPosition:{type:String,default:"relative"},height:{type:String,default:"100%"}},data(){return{showLeftArrow:!1,showRightArrow:!0,intervalid1:""}},mounted(){this.getScroll(),this.arrowsHideOnNoScroll&&window.addEventListener("resize",this.resizeSlider),this.arrowsHideOnNoScroll&&this.listenerLoad()},beforeUnmount(){this.arrowsHideOnNoScroll&&window.removeEventListener("resize",this.resizeSlider),this.arrowsHideOnNoScroll&&clearInterval(this.intervalid1)},computed:{getViewBox(){return`-2 0 ${this.arrowsWidth} ${this.arrowsHeight}`},hideShowLeftArrow(){let e="";return this.arrowsPosition=="absolute"?e="leftAbsolute":e="leftRelative",this.arrowsScrollHide?this.showLeftArrow?e+=" showArrowSlide":e+=" hideArrowSlide":e+=" showArrowSlide",e},hideShowRightArrow(){let e="";return this.arrowsPosition=="absolute"?e="rightAbsolute":e="rightRelative",this.arrowsScrollHide?this.showRightArrow?e+=" showArrowSlide":e+=" hideArrowSlide":e+=" showArrowSlide",e}},methods:{scrollLeft(){this.$refs.content.scrollLeft-=this.pxScroll},scrollRight(){this.$refs.content.scrollLeft+=this.pxScroll},getScroll(){let e=0;this.arrowsPosition=="relative"?e=this.$refs.content.scrollWidth-this.$el.clientWidth+this.arrowsMargin*2+this.arrowsWidth*4:e=this.$refs.content.scrollWidth-this.$el.clientWidth,this.$refs.content.scrollLeft==0?this.showLeftArrow=!1:this.showLeftArrow=!0,e>0&&(this.$refs.content.scrollLeft==e?this.showRightArrow=!1:this.showRightArrow=!0),this.arrowsHideOnNoScroll&&this.$refs.content.clientWidth===this.$refs.content.scrollWidth&&(this.showRightArrow=!1)},resizeSlider(){this.getScroll();let e;clearTimeout(e),e=setTimeout(this.getScroll,1e3)},listenerLoad(){this.intervalid1=setInterval((function(){var e=this.$el.clientWidth,a=this.$refs.content.scrollWidth;a>0&&e>0&&(a>e?(this.showRightArrow=!0,clearInterval(this.intervalid1)):clearInterval(this.intervalid1))}).bind(this),3e3)}}},kk=()=>{t.useCssVars(e=>({"42d3dba6":e.backgroundColor,"4de5d2cf":e.height,"67bafa7b":e.arrowsPosition,"61e1032e":e.arrowsPadding+"px","79a4ac00":e.arrowsBackground,"6b8355c6":e.arrowsHeight*2+"px","29a58368":e.arrowsWidth*2+"px","3622fa64":e.arrowsRadius,"1ba101fe":e.arrowsBorder,"0bafb5e6":e.arrowsMargin+"px","423a44b8":e.arrowsContainerBgL,"423a44be":e.arrowsContainerBgR,"10b117ee":e.scrollColor}))},Sk=u0.setup;u0.setup=Sk?(e,a)=>(kk(),Sk(e,a)):kk;const cje={ref:"gscScrollableContainer",class:"scrollable-container"},dje={class:"scrollable-arrows"},mje=["width","height","viewBox"],pje=["stroke"],hje={class:"scrollable-wrapper"},gje={class:"scrollable-arrows"},yje=["width","height","viewBox"],uje=["stroke"];function fje(e,a,o,n,s,i){return t.openBlock(),t.createElementBlock("div",cje,[o.arrows?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(["arrows-container",i.hideShowLeftArrow]),onClick:a[0]||(a[0]=(...r)=>i.scrollLeft&&i.scrollLeft(...r))},[t.createElementVNode("div",dje,[(t.openBlock(),t.createElementBlock("svg",{width:o.arrowsWidth,height:o.arrowsHeight,viewBox:i.getViewBox,fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t.createElementVNode("path",{d:"M6.36523 13.788L1.10146 8.52429C0.479824 7.90265 0.479824 6.88541 1.10147 6.26377L6.36523 1",stroke:o.arrowsColor},null,8,pje)],8,mje))])],2)):t.createCommentVNode("",!0),t.createElementVNode("div",{class:"scrollable-content scrollable-content-slider",ref:"content",onScroll:a[1]||(a[1]=(...r)=>i.getScroll&&i.getScroll(...r))},[t.createElementVNode("div",hje,[t.renderSlot(e.$slots,"default",{},void 0,!0)])],544),o.arrows?(t.openBlock(),t.createElementBlock("div",{key:1,id:"arrows-container-right",class:t.normalizeClass(["arrows-container",i.hideShowRightArrow]),onClick:a[2]||(a[2]=(...r)=>i.scrollRight&&i.scrollRight(...r))},[t.createElementVNode("div",gje,[(t.openBlock(),t.createElementBlock("svg",{width:o.arrowsWidth,height:o.arrowsHeight,viewBox:i.getViewBox,fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t.createElementVNode("path",{d:"M0.634765 1.21195L5.89853 6.47571C6.52018 7.09735 6.52018 8.11459 5.89853 8.73623L0.634766 14",stroke:o.arrowsColor},null,8,uje)],8,yje))])],2)):t.createCommentVNode("",!0)],512)}const _je=lje(u0,[["render",fje],["__scopeId","data-v-b548a08d"]]),bje=(e,a)=>{const o=e.__vccOpts||e;for(const[n,s]of a)o[n]=s;return o},f0={components:{GSCSlider:_je},props:{arrow:{type:Boolean,required:!0},buttons:{type:Array,required:!0},width:{type:String,default:"300px"},height:{type:String,default:"80px"},fontSize:{type:String,default:"16px"},colorFont:{type:String,default:"#ffffff"},backgroundOptionActive:{type:String,default:"#0d1d29"},colorOptionActive:{type:String,default:"#cbee6b"},colorOptionDisable:{type:String,default:"gray"},backgroundOptionDisable:{type:String,default:"#0d1d29"},fontFamily:{type:String,default:"Poppins-Semibold"},borderWidth:{type:String,default:"3px"},borderRadius:{type:String,default:"0px"},selectedOption:{type:String,default:""},type:{type:Number,default:0},borderWidthContainer:{type:String,default:"1px"},background:{type:String,default:"#0d1d29"},borderColorContainer:{type:String,default:"#505355"},pxScroll:{type:Number,default:100},scrollColor:{type:String,default:"#c3e569"},arrowsPosition:{type:String,default:"relative"},arrowsScrollHide:{type:Boolean,default:!1},arrowsBackground:{type:String,default:"#0D1D29"},arrowsContainerBgL:{type:String,default:"#0D1D29"},arrowsContainerBgR:{type:String,default:"#0D1D29"},arrowsMargin:{type:Number,default:10},arrowsRadius:{type:String,default:"0%"},arrowsBorder:{type:String,default:"none"}},setup(){const e=t.ref("myDivRef"),{elementSize:a}=rje(e);return{myDivRef:e,elementSize:a}},methods:{clickEmitEvent(e){this.$emit("input",e)},customGrid(e){var a={};return e.width>768?a={fontSize:"16px"}:e.width>480?a={fontSize:"14px"}:a={fontSize:"12px"},a}}},Ek=()=>{t.useCssVars(e=>({cff4a118:e.fontSize,"42aab7f6":e.borderWidth,d29bcbd2:e.fontFamily,df6c5a9c:e.background,"09b32862":e.borderRadius,"8c0d6daa":e.borderWidthContainer,e8a86fa4:e.borderColorContainer,"179494da":e.colorOptionActive,cea5647c:e.width}))},Nk=f0.setup;f0.setup=Nk?(e,a)=>(Ek(),Nk(e,a)):Ek;const wje={ref:"myDivRef"},Cje={key:0,class:"gs-switch-container"},kje=["onClick"],Sje={key:1,class:"gs-switch-container-type"},Eje=["onClick"],Nje={key:2,class:"gs-switch-container-carousel"},Bje=["onClick"];function $je(e,a,o,n,s,i){const r=t.resolveComponent("GSCSlider");return t.openBlock(),t.createElementBlock("div",wje,[o.type==0?(t.openBlock(),t.createElementBlock("div",Cje,[t.createElementVNode("div",{class:"gs-switch-container__control",style:t.normalizeStyle([i.customGrid(n.elementSize)])},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.buttons,(c,h)=>(t.openBlock(),t.createElementBlock("div",{class:"gs-switch-container__control__button-option",style:t.normalizeStyle([{height:o.height},o.selectedOption==c?{borderColor:o.colorOptionActive,color:o.colorFont+"!important",background:o.backgroundOptionActive}:{borderColor:o.colorOptionDisable,color:"grey !important"}]),key:h,onClick:d=>(o.selectedOption=c,i.clickEmitEvent(c))},t.toDisplayString(c),13,kje))),128))],4),t.renderSlot(e.$slots,o.selectedOption,{},void 0,!0)])):t.createCommentVNode("",!0),o.type==1?(t.openBlock(),t.createElementBlock("div",Sje,[t.createElementVNode("div",{class:"gs-switch-container-type__control",style:t.normalizeStyle([i.customGrid(n.elementSize)])},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.buttons,(c,h)=>(t.openBlock(),t.createElementBlock("div",{class:"gs-switch-container-type__control__button-option-type",style:t.normalizeStyle([{height:o.height},o.selectedOption==c?{borderColor:o.colorOptionActive,color:o.colorFont+"!important",background:o.backgroundOptionActive}:{borderColor:o.colorOptionDisable,borderWidth:"0px",borderWidth:"0px !important",color:"grey !important",background:o.backgroundOptionDisable}]),key:h,onClick:d=>(o.selectedOption=c,i.clickEmitEvent(c))},t.toDisplayString(c),13,Eje))),128))],4)])):t.createCommentVNode("",!0),o.type==2?(t.openBlock(),t.createElementBlock("div",Nje,[t.createVNode(r,{arrows:o.arrow,"background-color":o.background,"px-scroll":o.pxScroll,"scroll-color":o.scrollColor,"arrows-position":o.arrowsPosition,arrowsScrollHide:o.arrowsScrollHide,"arrows-background":o.arrowsBackground,"arrows-container-bg-l":o.arrowsContainerBgL,"arrows-container-bg-r":o.arrowsContainerBgR,"arrows-margin":o.arrowsMargin,"arrows-radius":o.arrowsRadius,"arrows-border":o.arrowsBorder},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.buttons,(c,h)=>(t.openBlock(),t.createElementBlock("div",{class:"button-option-multi",style:t.normalizeStyle([{height:o.height},o.selectedOption==c?{borderColor:o.colorOptionActive,color:o.colorFont+"!important",background:o.backgroundOptionActive}:{borderColor:o.colorOptionDisable,color:"grey !important"}]),key:h,onClick:d=>(o.selectedOption=c,i.clickEmitEvent(c))},t.toDisplayString(c),13,Bje))),128))]),_:1},8,["arrows","background-color","px-scroll","scroll-color","arrows-position","arrowsScrollHide","arrows-background","arrows-container-bg-l","arrows-container-bg-r","arrows-margin","arrows-radius","arrows-border"])])):t.createCommentVNode("",!0)],512)}const Bk=bje(f0,[["render",$je],["__scopeId","data-v-8a86dfaf"]]),vHe="",xje={class:"game-data__header"},Vje={class:"game-data__header__tournament-season-dropdown"},Ije={class:"game-data__header__teams-carousel"},Aje={class:"game-data__body"},Oje={class:"game-data__body__menu"},Tje={class:"game-data__body__menu__contmenuswitch"};Li.defaults.headers.common.Authorization="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MCwibmFtZSI6IlVzdWFyaW8gRnJlZSIsInVzZXJuYW1lIjoiZnJlZUBnb2xzdGF0cy5jb20iLCJlbWFpbCI6ImZyZWVAZ29sc3RhdHMuY29tIiwiaWF0IjoxNjA2NzU4Nzk1LCJleHAiOjE2MzgyOTQ3OTV9.kPNmP7yDtk38cAXrUyc7OHRh6J25VFqy-XUNzbK-4YE";const zje=t.defineComponent({name:"TemplateVideos",components:{StatisticsMain:IT,GSCGameTimeLine:ije,GscSwitchComponent:Bk,GSCLineupsMain:MX,GSCDatosGSMain:Dse,GSCVideoGame:due,GSCSummaryMain:zRe}}),Fje=Fe(Object.assign(zje,{props:{currentSeasonId:{type:Number,default:0},defaultGameId:{type:Number,default:0,validator(e){return!Number.isNaN(e)&&e>=0}},sortCalendar:{type:Boolean,default:!0}},emits:["openmedia","change-season-id"],setup(e,{emit:a}){const o=e,n=t.ref({season:[]}),s=t.ref({}),i=t.ref({}),r=t.ref(!0),c=t.ref("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MCwibmFtZSI6IlVzdWFyaW8gRnJlZSIsInVzZXJuYW1lIjoiZnJlZUBnb2xzdGF0cy5jb20iLCJlbWFpbCI6ImZyZWVAZ29sc3RhdHMuY29tIiwiaWF0IjoxNjA2NzU4Nzk1LCJleHAiOjE2MzgyOTQ3OTV9.kPNmP7yDtk38cAXrUyc7OHRh6J25VFqy-XUNzbK-4YE"),h=t.ref([{componentName:"GSCSummaryMain",name:"Resumen",id:1},{componentName:"GSCVideoGame",name:"Video",id:2},{componentName:"GSCDatosGSMain",name:"Datos Golstats",id:3},{componentName:"StatisticsMain",name:"Estadísticas",id:4},{componentName:"GSCGameTimeLine",name:"Minuto a Minuto",id:5},{componentName:"GSCLineupsMain",name:"Alineaciones",id:6}]);let d=null;const l=t.ref(null),p=t.ref(0),y=t.ref(h.value[0]);let m=t.ref("");const g=t.computed(()=>{const B=[];return s.value&&s.value.id&&(B.push({id:s.value.id,name:s.value.name,type:s.value.type}),s.value.related_seasons&&s.value.related_seasons.forEach(z=>{B.push({id:z.id,type:z.type})})),B});function u(){d=new ResizeObserver(B=>{for(const z of B)p.value=z.contentRect.width}),d.observe(l.value)}const f=t.computed(()=>{let B={};return i.value&&i.value.game_id&&(B={gameId:i.value.game_id,id:i.value.game_id,seasonId:i.value.season_id,status:i.value.game_status,game_status:i.value.game_status==0?4:i.value.game_status,dateTimeUTC:i.value.date_time_utc,homeTeam:i.value.home_team,awayTeam:i.value.visiting_team,is_live:i.value.is_live}),B});function _(B){n.value=B,B.is_captured===0?r.value=!1:r.value=!0,n.value.id!==B.id&&(n.value=B)}function k(B){a("openmedia",B)}function w(B){V(B),B=="Estadísticas"&&(m.value="Comparativa")}function b(){m.value=""}function E(B){s.value.id!==B.id&&(s.value=B,a("change-season-id",B.id))}const x=t.computed(()=>h.value.map(B=>{if(r.value)return B.name;if(B.id!==5&&B.id!==6)return B.name}).filter(B=>B!=null));function V(B){y.value=h.value.find(z=>z.name===B)||h.value[0]}t.onMounted(()=>{u()});function $(B){i.value=B}return(B,z)=>(t.openBlock(),t.createElementBlock("div",{class:"game-data",ref_key:"gamedata",ref:l},[t.createElementVNode("div",xje,[t.createElementVNode("div",Vje,[t.createVNode(t.unref(f7),{"current-season-id":e.currentSeasonId,onInput:_},null,8,["current-season-id"]),t.createVNode(t.unref(v7),{"current-season-id":e.currentSeasonId,seasons:n.value.seasons,onInput:E},null,8,["current-season-id","seasons"])]),t.createElementVNode("div",Ije,[t.createVNode(t.unref(XN),{token:c.value,"await-for-seasons":"",seasons:g.value,"is-pagination-visible":!1,"are-games-carousel-type":"",onChangeGameCarousel:$,"default-game-id":o.defaultGameId,"sort-calendar":o.sortCalendar},null,8,["token","seasons","default-game-id","sort-calendar"])])]),t.createElementVNode("div",Aje,[t.createElementVNode("div",Oje,[t.createElementVNode("div",Tje,[t.createVNode(t.unref(Bk),{type:2,buttons:x.value,"font-family":"Poppins-Regular","font-size":"16px",width:p.value<400||p.value<700?"max-content":p.value<840||p.value<1050?"155px":"165px","selected-option":y.value.name,borderWidth:"1px",arrow:!1,height:"30px",onInput:V},null,8,["buttons","width","selected-option"])])]),(t.openBlock(),t.createBlock(t.resolveDynamicComponent(y.value.componentName),{game:f.value,subsection:t.unref(m),seasonSelected:s.value,showLineups:r.value,onResetSubsection:b,onOpenmedia:k,onChangeToTab:w},null,40,["game","subsection","seasonSelected","showLineups"]))])],512))}}),[["__scopeId","data-v-96da925c"]]);async function ft({url:e,options:a={},retries:o=3}){return await Li.get(e,a).then(n=>n).catch(n=>o>0?ft({url:e,options:a,retries:o-1}):n)}async function $k({seasonId:e},a=!0){try{const o={url:`https://b5lrr2nc0h.execute-api.us-west-2.amazonaws.com/prod/statisticsLeagueBySeason/${e}`};a&&(o.url=`https://golstats-microservices.s3-us-west-2.amazonaws.com/statsLeagueBySeason-${e}.json`,o.retries=1);const{data:{data:n}}=await ft(o);return n}catch(o){if(a)return $k({seasonId:e},!1);throw new Error(o)}}async function Pje({seasonId:e}){try{return(await ft({url:`https://iwxfzq6e2h.execute-api.us-west-2.amazonaws.com/prod/v2/statisticsLeagueBySeason/${e}`})).data.data}catch(a){return Promise.reject(a)}}async function Rje({seasonId:e}){try{return(await ft({url:`https://sqf4rkvoge.execute-api.us-west-2.amazonaws.com/prod/v3/statisticsGroupedBySeason/${e}`})).data.data}catch(a){return Promise.reject(a)}}function Dje(e,a,o,n,s,i,r=!1){const c=o.map(h=>h===1?2:h===2?1:3);return e.filter(h=>{const d=i&&h[s.teamId]?h[s.teamId]!==i:!1,l=a===1?2:1;return(r||n.includes(h[s.gameId]))&&(!a||(d?l:a)===h[s.playingAs])&&(o.includes(h[s.matchResult])&&h[s.teamId]===i||c.includes(h[s.matchResult])&&h[s.teamId]!==i)})}function xk(e,a,o,n,s){return a.length===2&&o.length===3&&n.length===6?e:e.filter(i=>a.includes(i[s.playingAs])&&o.includes(i[s.matchResult])&&n.includes(i[s.section]))}async function Vk({seasonId:e}){try{const a=`https://8tvo5bp9ai.execute-api.us-west-2.amazonaws.com/prod/gamesBySeason/${e}`;return(await ft({url:a})).data}catch(a){return Promise.reject(a)}}async function Lje({seasonId:e,gameId:a}){try{const o=`https://iwxfzq6e2h.execute-api.us-west-2.amazonaws.com/prod/v2/statisticsLeagueBySeason/${e}/games/${a}`,{data:n}=await ft({url:o});return n}catch(o){return Promise.reject(o)}}async function vje({gameId:e}){try{const a=`https://2uj7ojhmt5.execute-api.us-west-2.amazonaws.com/prod/V2/statisticsLive/${e}`;return(await ft({url:a})).data.data}catch(a){return Promise.reject(a)}}async function jje({gameId:e}){try{const a=`https://55sbpmq0f5.execute-api.us-west-2.amazonaws.com/prod/specialMentions/${e}`;return(await ft({url:a})).data.data||[]}catch(a){return Promise.reject(a)}}const Mje=["categoryId","matchLapse","section","matchResult","playingAs","total"];let _0=null;function Ik(){return _0||(_0=Vi(Mje)),_0}async function Hje(e){try{const a=`https://d2oco6mqmc.execute-api.us-west-2.amazonaws.com/prod/teamsBySeason/${e.seasonId}`;return(await ft({url:a})).data}catch(a){return Promise.reject(a)}}async function Ak({seasonId:e,teamId:a}){try{return await ft({url:`https://a4dcb6avog.execute-api.us-west-2.amazonaws.com/prod/v2/statisticsTeamBySeason/${e}/${a}`})}catch(o){return Promise.reject(o)}}async function Uje(e){try{const a=`https://yjeig444bb.execute-api.us-west-2.amazonaws.com/prod/teamsBySeason/${e.seasonId}`;return await ft({url:a})}catch(a){return Promise.reject(a)}}async function Gje(e){try{return await ft({url:`https://nckawv8v3b.execute-api.us-west-2.amazonaws.com/prod/v2/statisticsByGame/${e.gameId}`})}catch(a){return Promise.reject(a)}}const Wje={leagueGeneral:{namespaced:!0,state:{seasonPlays:[],currentSeasonGames:[],currentSeasonTeams:[],selectedRound:1,booleanAreLiveGames:!1,booleanIsLiveGamesModalOpen:!1},getters:{seasonPlays:e=>e.seasonPlays,filteredPlaysStack(e,a,o,n){return Dje(e.seasonPlays,n["filterGeneral/getPlayingAs"],n["filterGeneral/getResults"],n["filterGeneral/getSelectedGamesIds"],Ik(),n["teamsGeneral/team"].team_id,!0)},nextGamesSchedule(e){const a=e.currentSeasonGames.reduce((o,n)=>{const s={...n};return s.home_team=e.currentSeasonTeams.find(i=>i.team_id===n.home_team),s.visiting_team=e.currentSeasonTeams.find(i=>i.team_id===n.visiting_team),o[n.matchday_abbreviation]?o[n.matchday_abbreviation][n.game_status===3?"canceled":n.date]?o[n.matchday_abbreviation][n.game_status===3?"canceled":n.date].push(s):o[n.matchday_abbreviation][n.game_status===3?"canceled":n.date]=[s]:o[n.matchday_abbreviation]={[n.game_status===3?"canceled":n.date]:[s]},o},{});for(let[o,n]of Object.entries(a))a[o]=Object.entries(n).map(([s,i])=>({date:s,games:i})),a[o].sort((s,i)=>s.date<i.date?-1:s.date>i.date?1:0);return a},matchdaysDates(e,a){let o=[];if(a.nextGamesSchedule){let n=Object.keys(a.nextGamesSchedule);for(let s of n){let i=Number(s.replace("M","")),r=a.nextGamesSchedule[s].map(c=>({matchday:i,date:new Date(c.date)}));o=o.concat(r)}}return o},closestMatchDay(e,a){let o=new Date,n=0,s=-new Date(0,0,0).valueOf(),i=a.matchdaysDates,r=i.length;for(let c=0;c<i.length;c++)n=Math.abs(i[c].date-o),n<s&&(r=c,s=n);return i[r]?i[r].matchday:1}},mutations:{setBooleanIsLiveGamesModalOpen(e,a){e.booleanIsLiveGamesModalOpen=a},setBooleanAreLiveGames(e,a){e.booleanAreLiveGames=a},updateSeasonPlays(e,a){e.seasonPlays=a},updateCurrentSeasonTeams(e,a){e.currentSeasonTeams=a},updateCurrentSeasonGames(e,a){e.currentSeasonGames=a},updateSelectedRound(e,a){e.selectedRound=a}},actions:{async getSeasonPlays({commit:e,rootGetters:a},o=!1){try{const n=await $k({seasonId:a["filterGeneral/getSeasonId"]});if(o)return n;e("updateSeasonPlays",n)}catch(n){return Promise.reject(n)}},async getCurrentSeasonGames({commit:e,rootGetters:a}){try{const o=await Vk({seasonId:a["loginGeneral/seasonId"]});e("updateCurrentSeasonGames",o)}catch(o){return Promise.reject(o)}},async getCurrentSeasonTeams({commit:e,rootGetters:a}){try{const o=await Hje({seasonId:a["loginGeneral/seasonId"]});e("updateCurrentSeasonTeams",o.teams)}catch(o){return Promise.reject(o)}},async isDataFilled({state:e,dispatch:a,commit:o}){try{if(e.currentSeasonGames.length>0&&e.currentSeasonTeams.length>0)return o("setIsSectionLoading",!1,{root:!0}),!0;const n=[void 0,void 0];return e.currentSeasonGames.length===0&&(n[0]=a("getCurrentSeasonGames")),e.currentSeasonTeams.length===0&&(n[1]=a("getCurrentSeasonTeams")),await Promise.all(n),!1}catch(n){throw new Error(n)}}}}};async function qje({filter:e}){try{const a=`https://n7ielynjxk.execute-api.us-east-2.amazonaws.com/qa/filters?filters=${e}`,{data:o}=await ft({url:a});return o}catch(a){return Promise.reject(a)}}const Jje=["categoryId","teamId","matchResult","playingAs","matchLapse","section","total"];let b0=null;function Xje(){return b0||(b0=Vi(Jje)),b0}class Zc{constructor(){De(this,"maximumLiveSection",1);De(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:[]});De(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(a){a>this.maximumLiveSection&&(this.maximumLiveSection=a)}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(a,o,n){n&&(this.setMaximumLiveSection(a),this.accomplished.totalLive+=o,this.accomplished.totalsLiveTrendLive.sections[a-1]+=o,this.increaseTrendLiveAccumulatedByOne(this.accomplished.totalsLiveTrendLive,a,o)),this.accomplished.totalPostGame+=o,this.accomplished.avgPostGameTrendLive.sections[a-1]+=o,this.increaseTrendLiveAccumulatedByOne(this.accomplished.avgPostGameTrendLive,a,o)}increaseReceivedByOne(a,o,n){n&&(this.setMaximumLiveSection(a),this.received.totalLive+=o,this.received.totalsLiveTrendLive.sections[a-1]+=o,this.increaseTrendLiveAccumulatedByOne(this.received.totalsLiveTrendLive,a,o)),this.received.totalPostGame+=o,this.received.avgPostGameTrendLive.sections[a-1]+=o,this.increaseTrendLiveAccumulatedByOne(this.received.avgPostGameTrendLive,a,o)}increaseTrendLiveAccumulatedByOne(a,o,n){for(let s=o-1;s<a.accumulated.length;s++)a.accumulated[s]+=n}decreaseAccomplishedLiveByOne(a,o){this.accomplished.totalLive>0&&(this.accomplished.totalLive-=o),this.accomplished.totalsLiveTrendLive.sections[a-1]>0&&(this.accomplished.totalsLiveTrendLive.sections[a-1]-=o,this.decreaseTotalsLiveTrendLiveAccumulatedByOne(this.accomplished.totalsLiveTrendLive,a,o))}decreaseReceivedLiveByOne(a,o){this.received.totalLive>0&&(this.received.totalLive-=o),this.received.totalsLiveTrendLive.sections[a-1]>0&&(this.received.totalsLiveTrendLive.sections[a-1]-=o,this.decreaseTotalsLiveTrendLiveAccumulatedByOne(this.received.totalsLiveTrendLive,a,o))}decreaseTotalsLiveTrendLiveAccumulatedByOne(a,o,n){for(let s=a.accumulated.length-1;s>=o-1;s--)a.accumulated[s]-=n}calculateAvg(a){a&&(this.accomplished.avgPostGame=this.accomplished.totalPostGame/a,this.received.avgPostGame=this.received.totalPostGame/a,this.accomplished.avgPostGameTrendLive.sections=this.getAvgPostGameTrendLiveAvg(this.accomplished.avgPostGameTrendLive.sections,a),this.accomplished.avgPostGameTrendLive.accumulated=this.getAvgPostGameTrendLiveAvg(this.accomplished.avgPostGameTrendLive.accumulated,a),this.received.avgPostGameTrendLive.sections=this.getAvgPostGameTrendLiveAvg(this.received.avgPostGameTrendLive.sections,a),this.received.avgPostGameTrendLive.accumulated=this.getAvgPostGameTrendLiveAvg(this.received.avgPostGameTrendLive.accumulated,a))}getAvgPostGameTrendLiveAvg(a,o){return a.map(n=>n/o)}calculateRanking(a,o,n,s,i,r,c,h){let d=[];s===3&&a&&a.length&&(n.playingAs.length!==2||n.matchResult.length!==3)?d=Array.from(a.reduce((p,y)=>{const m=y[o.playingAs]===1,g=m?"1":"2",u=p.get(y[o.gameId]);if(u)u[g]?u[g].arrayPlays.push(y):u[g]={numberTeamId:y[o.teamId],arrayPlays:[y]};else{const f={numberMatchResult:y[o.matchResult]};m&&(f[1]={numberTeamId:y[o.teamId],arrayPlays:[y]}),p.set(y[o.gameId],f)}return p},new Map).values()).reduce((p,y)=>{const m=n.playingAs.length===2?"both":n.playingAs[0].toString();return(m==="both"&&(y[1].numberTeamId===n.teamId||y[2].numberTeamId===n.teamId)||m!=="both"&&y[m].numberTeamId===n.teamId)&&n.matchResult.includes(y.numberMatchResult)&&p.push(...y[1].arrayPlays,...y[2].arrayPlays),p},[]).filter(p=>n.sections.includes(p[o.section])):(d=a?[...a]:[],c&&a&&(d=a.filter(l=>n.playingAs.includes(l[o.playingAs])&&n.matchResult.includes(l[o.matchResult])&&n.sections.includes(l[o.section])))),this.setTeamRanking(d,s,o,n.teamId,r,"accomplished",h)}setTeamRanking(a,o,n,s,i,r,c){let h=null,d=null;o===3&&(h=new Map,d={},a.forEach(y=>{const m=h.get(y[n.gameId]);m?m[y[n.teamId.toString()]]?m[y[n.teamId.toString()]]+=y[n.total]:m[y[n.teamId.toString()]]=y[n.total]:h.set(y[n.gameId],{[y[n.teamId.toString()]]:y[n.total]})}),Array.from(h.values()).forEach(y=>{const[m,g]=Object.keys(y).map(f=>f),u=y[m]+y[g];this.addPassesAvgByTeam(d,m,u?y[m]/u:0),this.addPassesAvgByTeam(d,g,u?y[g]/u:0)}));const l=i.sort((y,m)=>y.team_id-m.team_id).map(y=>{if(o===3){const m=d[y.team_id.toString()];return{teamId:y.team_id,points:m?m.numberTotalPassesAvg/m.numberGamesCount:0,total:m?m.numberTotalPassesAvg:0}}else{const m=a.reduce((g,u)=>u[n.teamId]===y.team_id&&o===u[n.categoryId]?g+u[n.total]:g,0);return{teamId:y.team_id,points:y[`${c}FilterGames`]?m/y[`${c}FilterGames`]:0,total:m}}}).sort((y,m)=>m.points-y.points);this.accomplished.arrayRankings=l;const p=l.findIndex(y=>y.teamId===s);o===3&&(this.accomplished.avgPreGame=l[p].points),this[r].ranking=p+1,this[r].leader=l[0]}addPassesAvgByTeam(a,o,n){a[o]?(a[o].numberGamesCount+=1,a[o].numberTotalPassesAvg+=n):a[o]={numberGamesCount:1,numberTotalPassesAvg:n}}}class de{constructor(a,o,n,s,i,r,c,h,d,l){De(this,"id","");De(this,"generalId",0);De(this,"name","");De(this,"names",{"0-0":"","1-1":"","0-1":"","1-0":""});De(this,"mentions",{"0-0":"","1-1":"","0-1":"","1-0":""});De(this,"accomplishedCategoryIds",[]);De(this,"receivedCategoryIds",[]);De(this,"generalCategoriesIds",{accomplished:0,received:0});De(this,"specialMention","");De(this,"homeTeam",new Zc);De(this,"visitingTeam",new Zc);De(this,"isLeagueDataCalculated",!1);De(this,"leagueAccomplishedMax",0);De(this,"leagueReceivedMax",0);De(this,"leagueAccomplishedAvg",0);De(this,"leagueReceivedAvg",0);De(this,"leagueAccomplishedAccumulator",0);De(this,"leagueReceivedAccumulator",0);De(this,"homeTeamType","homeTeam");De(this,"visitingTeamType","visitingTeam");De(this,"betOnly",!1);De(this,"isPercent",!1);this.id=`${n.accomplished}-${n.received}`,this.accomplishedCategoryIds=a||[],this.receivedCategoryIds=o||[],this.generalCategoriesIds=n||{accomplished:0,received:0},this.name=s,this.names["0-0"]=s||"",this.names["1-1"]=i||"",this.names["0-1"]=r||"",this.names["1-0"]=c||"",this.generalId=h||0,this.betOnly=d||!1,this.isPercent=l||!1}addLeaguePlays(a,o,n){a.length===0||!n||this.isLeagueDataCalculated||(a.forEach(s=>{this.isAccomplishedLeaguePlay(s[o.categoryId])&&(this.leagueAccomplishedAccumulator+=s[o.total]),this.isReceivedLeaguePlay(s[o.categoryId])&&(this.leagueReceivedAccumulator+=s[o.total])}),this.leagueAccomplishedAvg=(this.leagueAccomplishedAccumulator/(2*n)).toFixed(2),this.leagueAccomplishedMax=Math.round(this.leagueAccomplishedAvg*1.5),this.leagueReceivedAvg=(this.leagueReceivedAccumulator/(2*n)).toFixed(2),this.leagueReceivedMax=Math.round(this.leagueReceivedAvg*1.5),this.isLeagueDataCalculated=!0)}addSpecialMention(a,o,n){let s="-";for(const[i,r]of Object.entries(this.generalCategoriesIds))a===r&&(s=`${i==="accomplished"?"0":"1"}${s}`),o===r&&(s=`${s}${i==="accomplished"?"0":"1"}`);s.length===3&&(this.mentions[s]=n)}resetMentions(){this.mentions={"0-0":"","1-1":"","0-1":"","1-0":""}}addTeamPlays(a,o,n,s,i){!n||!i||a!==this.homeTeamType&&a!==this.visitingTeamType||(n.forEach(r=>{this.isAccomplishedPlay(r[s.categoryId])?this[a].increaseAccomplishedByOne(r[s.section],r[s.total]):this.isReceivedPlay(r[s.categoryId])&&this[a].increaseReceivedByOne(r[s.section],r[s.total])}),this[a].calculateAvg(i))}addLivePlay(a,o,n,s,i=!1,r=!1){(a===this.homeTeamType||a===this.visitingTeamType)&&n[s.categoryId].includes(this.generalCategoriesIds.accomplished)&&this[a].increaseAccomplishedByOne(n[s.section],n[s.total],!0)}subtractLivePlay(a,o,n,s,i){(a===this.homeTeamType||a===this.visitingTeamType)&&(this.isAccomplishedPlay(n[s.categoryId])&&!i?this[a].decreaseAccomplishedLiveByOne(n[s.section],n[s.total]):this.isReceivedPlay(n[s.categoryId])&&i&&this[a].decreaseReceivedLiveByOne(n[s.section],n[s.total]))}isAccomplishedLeaguePlay(a){return!!(this.receivedCategoryIds[0]===40?this.receivedCategoryIds:this.accomplishedCategoryIds).find(n=>a===n||`${a}_r`===n)}isReceivedLeaguePlay(a){return!!this.receivedCategoryIds.find(o=>a===o)}isAccomplishedPlay(a){return this.generalCategoriesIds.accomplished===a}isReceivedPlay(a){return this.generalCategoriesIds.received===a}calcRankingLeague(a,o,n,s,i,r=!1){this[this.homeTeamType].calculateRanking(a,o,n,this.generalCategoriesIds.accomplished,this.generalCategoriesIds.received,i,r,this.homeTeamType),this[this.visitingTeamType].calculateRanking(a,o,s,this.generalCategoriesIds.accomplished,this.generalCategoriesIds.received,i,r,this.visitingTeamType)}resetData(){this.homeTeam=new Zc,this.visitingTeam=new Zc,this.isLeagueDataCalculated=!1,this.leagueAccomplishedMax=0,this.leagueReceivedMax=0,this.leagueAccomplishedAvg=0,this.leagueReceivedAvg=0,this.leagueAccomplishedAccumulator=0,this.leagueReceivedAccumulator=0}isInGeneralCategory(a){return this.generalCategoriesIds.accomplished===a||this.generalCategoriesIds.received===a}}const Zje={general:{name:"General",priority:1,parentInfo:{parentAnalysis:[1],analysisTypeBlocks:[1]},subcategories:{goals:new de([12,55,"35_r","54_r"],null,{accomplished:1,received:0},"Goles","Goles recibidos","Goles realizados / recibidos","Goles recibidos / realizados",1),shotToGoal:new de([91,95,158,167,176,343,330,333,423],null,{accomplished:2,received:0},"Remates a destino","","","",1),possession:new de([2,3,20,21],null,{accomplished:3,received:0},"Posesión","","","",1,!1,!0),yellowCards:new de([14,52],null,{accomplished:4,received:0},"Tarjetas amarillas","","","",1),redCards:new de([15,53],null,{accomplished:5,received:0},"Tarjetas rojas","","","",1),centerCrosses:new de([13,25],null,{accomplished:6,received:0},"Centros totales","","","",1)}},offensive:{name:"Ofensivo",priority:2,parentInfo:{parentAnalysis:[1],analysisTypeBlocks:[1]},subcategories:{shotsOnGoal:new de([19],null,{accomplished:7,received:0},"Tiros a gol","","","",1),shotsOnGoalDestination:new de([91,95],null,{accomplished:8,received:0},"Tiros a gol destino","","","",1),shotToGoal:new de([91,95,158,167,176,343,330,333,423],null,{accomplished:2,received:0},"Remates a destino","","","",1),ballsWonOpponentPenaltyBox:new de([11],null,{accomplished:10,received:0},"Balones ganados área rival","","","",1),centersFromRight:new de([25],null,{accomplished:11,received:0},"Centros por derecha","","","",1),centersFromLeft:new de([13],null,{accomplished:12,received:0},"Centros por izquierda","","","",1),success1VS1:new de([4],null,{accomplished:13,received:0},"Enfrentamientos ofensivos exitosos","","","",1),unsuccess1VS1:new de([209],null,{accomplished:14,received:0},"Enfrentamientos ofensivos no exitosos","","","",1)}},defensive:{name:"Defensivo",priority:3,parentInfo:{parentAnalysis:[1],analysisTypeBlocks:[1]},subcategories:{saves:new de([39],null,{accomplished:15,received:0},"Atajadas","","","",1),ballsWonOwnPenaltyBox:new de([23],null,{accomplished:16,received:0},"Balones ganados área propia","","","",1),success1VS1:new de([5],null,{accomplished:17,received:0},"Enfrentamientos defensivos exitosos","","","",1),unsuccess1VS1:new de([209],null,{accomplished:18,received:0},"Enfrentamientos defensivos no exitosos","","","",1),aerialGame:new de([24],null,{accomplished:19,received:0},"Juego aéreo resto del campo","","","",1),clearances:new de([34],null,{accomplished:20,received:0},"Rechaces","","","",1)}},possession:{name:"Posesión",priority:4,parentInfo:{parentAnalysis:[1],analysisTypeBlocks:[1]},subcategories:{totalPasses:new de([2,3,20,21],null,{accomplished:21,received:0},"Pases totales","","","",1),successPasses:new de([2,20],null,{accomplished:22,received:0},"Pases acertados","","","",1),successPassesRivalHalf:new de([20],null,{accomplished:23,received:0},"Pases acertados en cancha rival","","","",1),ballsRecoveredInChallenge:new de([483],null,{accomplished:24,received:0},"Balones recuperados en disputa","","","",1),ballsRecoveredWithoutChallenge:new de([484],null,{accomplished:25,received:0},"Balones recuperados sin disputa","","","",1),ballsLostInChallenge:new de([494],null,{accomplished:26,received:0},"Balones perdidos en disputa","","","",1),ballsLostWithoutChallenge:new de([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 de([155,164,173,362,371,380],null,{accomplished:28,received:0},"Tiros libres 4/4","","","",1),freeKick34:new de([150,357],null,{accomplished:29,received:0},"Tiros libres 3/4","","","",1),freeKickOwnHalf:new de([149,356],null,{accomplished:30,received:0},"Tiros libres cancha propia","","","",1),cornerFromRight:new de([32],null,{accomplished:31,received:0},"Tiros de esquina por derecha","","","",1),cornerFromLeft:new de([31],null,{accomplished:32,received:0},"Tiros de esquina por izquierda","","","",1),goalKick:new de([264,28],null,{accomplished:33,received:0},"Saques de meta","","","",1)}},penalties:{name:"Infracciones",priority:6,parentInfo:{parentAnalysis:[1],analysisTypeBlocks:[1]},subcategories:{totalFouls:new de([17,50],null,{accomplished:34,received:0},"Faltas totales","","","",1),foulOwnGoal:new de([348,478],null,{accomplished:35,received:0},"Faltas cerca de su propia portería","","","",1),fieldFouls:new de([349,350,479,480],null,{accomplished:36,received:0},"Faltas resto del campo","","","",1),penaltyKick:new de([461,481],null,{accomplished:37,received:0},"Penales cometidos","","","",1),offside:new de([33],null,{accomplished:38,received:0},"Fueras de lugar","","","",1)}}},Yje=[{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}],Kje=["teamId","categoryId","matchlapse","section","matchResult","playingAs","total","gameId"];let w0=null;function Qje(){return w0||(w0=Vi(Kje)),w0}const eMe=["playId","gameId","teamId","playerId","momentOfPlay","categoryId","categoryType","matchLapse","section","matchResult","playingAs","total","coordinate1X","coordinate1Y","coordinate2X","coordinate2Y","coordinate3X","coordinate3Y"];let C0=null;function tMe(){return C0||(C0=Vi(eMe)),C0}function Yc(e,a,o){return[o.get(e[a.categoryId])||[],e[a.teamId],e[a.matchResult],e[a.playingAs],e[a.matchLapse],e[a.section],e[a.total]]}function Ok(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 k0(e,a,o){let n=[...a];return e[o.categoryId]===2&&(n[0]=14),e[o.categoryId]===20&&(n[0]=15),[14,15].includes(n[0])?n:null}const aMe=[{name:"Liga MX",id:1},{name:"Liga MX Femenil",id:1001},{name:"Liga Expansión MX",id:1071}],oMe={nextGeneral:{namespaced:!0,state:{seasonId:0,pastSeasonId:0,usePastSeasonId:!1,isSocketConnected:!1,indexesLP:Ik(),indexesTSP:Xje(),indexesLS:Qje(),indexesTLP:tMe(),nextGamesDataStructure:Zje,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(a=>a.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=!!e.gameForAnalysis.is_live,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 Yje.filter(a=>a.parentAnalysis.includes(e.selectedAnalysis.id))},homeTeamFilteredPlays(e){if(e.homeTeamFilter.requiresPlaysFiltering)return xk(e.homeTeamPlays,e.homeTeamFilter.playingAs,e.homeTeamFilter.matchResult,e.homeTeamFilter.sections,e.indexesTSP)},visitingTeamFilteredPlays(e){if(e.visitingTeamFilter.requiresPlaysFiltering)return xk(e.visitingTeamPlays,e.visitingTeamFilter.playingAs,e.visitingTeamFilter.matchResult,e.visitingTeamFilter.sections,e.indexesTSP)},currentSeasonTeamsIds(e){return e.currentSeasonTeams.map(a=>a.team_id)},canFilledStructure(e){return e.homeTeamFilter.requiresPlaysFiltering||e.visitingTeamFilter.requiresPlaysFiltering},totalFilteredHomeGames(e){return e.homeGames.filter(a=>e.homeTeamFilter.playingAs.includes(a[0])).filter(a=>e.homeTeamFilter.matchResult.includes(a[1])).reduce((a,o)=>a+o[2],0)},totalFilteredVisitingGames(e){return e.visitingGames.filter(a=>e.visitingTeamFilter.playingAs.includes(a[0])).filter(a=>e.visitingTeamFilter.matchResult.includes(a[1])).reduce((a,o)=>a+o[2],0)},filledDataStructure(e,a){if(e.currentSeasonPlays)for(const o of Object.values(e.nextGamesDataStructure))for(const n of Object.values(o.subcategories))e.homeTeamFilter.requiresPlaysFiltering&&n.homeTeam.resetTotals(),e.visitingTeamFilter.requiresPlaysFiltering&&n.visitingTeam.resetTotals(),n.addLeaguePlays(e.currentSeasonPlays,e.indexesLP,e.totalSeasonFinishedGames),n.addTeamPlays(n.homeTeamType,e.gameForAnalysis.home_team,a.homeTeamFilteredPlays,e.indexesTSP,e.showPostMatch?1:a.totalFilteredHomeGames),n.addTeamPlays(n.visitingTeamType,e.gameForAnalysis.visiting_team,a.visitingTeamFilteredPlays,e.indexesTSP,e.showPostMatch?1:a.totalFilteredVisitingGames);return e.nextGamesDataStructure},arrayFilledDataSortedByPriority(e,a){return Object.values(a.filledDataStructure).sort((o,n)=>o.priority-n.priority)},statisticData(e,a){for(const o of Object.values(a.filledDataStructure))if(o.parentInfo.parentAnalysis.includes(e.selectedAnalysis.id)&&o.parentInfo.analysisTypeBlocks.includes(e.selectedStatisticTypeBlock))return o.subcategories;return{}},accomplished(e){return e.homeTeamFilter.statistics===0}},mutations:{setCurrentTournamentName(e,a){e.currentTournamentName=a},setBetSubcategoriesObjects(e,a){e.betSubcategoriesObjects=a},setRegularSeasonName(e,a){e.regularSeasonName=a},setBetSubcategories(e,a){e.betSubcategories=a},setBetDescription(e,a){e.betDescription=a},setSeasonId(e,a){e.seasonId=Number(a)},setHome(e,a){e.homeTeamInfo=a},setAway(e,a){e.awayTeamInfo=a},setMenuOptionActive(e,a){e.menuOptionActive=a},setPastSeasonId(e,a){e.pastSeasonId=a},setUsePastSeasonId(e,a){e.usePastSeasonId=a,a&&(e.oldSeasonId=e.pastSeasonId)},updateShowPostMatchData(e,a){e.showPostMatch=a},setHomeResultGame(e,a){e.homeResultGame=a},setAwayResultGame(e,a){e.awayResultGame=a},updateIsSocketConnected(e,a){e.isSocketConnected=a,!a&&e.gameForAnalysis.is_live&&this._vm.$socket.client.emit("subscribe",{channel:`game.${e.gameForAnalysis.game_id}.v2`})},updateCurrentSeasonTeams(e,a){e.currentSeasonTeams=a,e.currentSeasonTeams.forEach(o=>{o.playedGames=e.currentSeasonGames.reduce((n,s)=>{if(s.game_status===1&&(s.home_team===o.team_id||s.visiting_team===o.team_id)){const i=s.score[0]-s.score[1],r=s.home_team===o.team_id;n.push({playingAs:r?1:2,matchResult:i===0?3:r?i>0?1:2:i<0?1:2})}return n},[])})},updateCurrentSeasonGames(e,a){e.currentSeasonGames=a},updateGameId(e,a){e.gameId=a},updateGameForAnalysis(e,a){e.gameForAnalysis=a,e.homeTeamFilter.teamId=e.gameForAnalysis.home_team,e.visitingTeamFilter.teamId=e.gameForAnalysis.visiting_team,e.gameForAnalysis.is_live===1&&e.isSocketConnected&&this._vm.$socket.client.emit("subscribe",{channel:`game.${e.gameForAnalysis.game_id}.v2`})},updateSelectedAnalysis(e,a){e.selectedAnalysis=a},updateShowLiveData(e,a){e.showLiveData=a},toggleShowLiveData(e){e.showLiveData=!e.showLiveData},toggleAdvanceFilter(e){e.showAdvanceFilter=!e.showAdvanceFilter},updateIdAssetSelected(e,a){e.idAssetSelected=a},updateStats(e,a){e.currentSeasonPlays=a},updateFilterAux(e){e.filterAux||(e.filterAux={homeTeamFilter:{...e.homeTeamFilter},visitingTeamFilter:{...e.visitingTeamFilter}})},updateFilters(e,{filters:a,needsFormat:o=!1}){if(o){if(!a||!a.local||!a.local.statistics||!a.visit||!a.visit.statistics)return;e.homeTeamFilter=Ru(e.homeTeamFilter,a.local,e.gameForAnalysis.home_team),e.visitingTeamFilter=Ru(e.visitingTeamFilter,a.visit,e.gameForAnalysis.visiting_team),e.selectedStatisticTypeBlock!==a.local.statistics.block&&(e.selectedStatisticTypeBlock=a.local.statistics.block)}else e.homeTeamFilter={...a.homeTeamFilter,statistics:0},e.visitingTeamFilter={...a.visitingTeamFilter,statistics:0}},updateFinishedGames(e,a){e.totalSeasonFinishedGames=a},updateHomeTeamPlays(e,a){e.homeTeamPlays=a},updateVisitingTeamPlays(e,a){e.visitingTeamPlays=a},addSpecialMentions(e,a){const o=Object.values(e.nextGamesDataStructure);o.forEach(n=>{for(const s of Object.values(n.subcategories))s.resetMentions()}),o.forEach(n=>{for(const s of a)for(const i of Object.values(n.subcategories))i.addSpecialMention(s[0],s[1],s[2])})},setDefaultFilter(e,a){e.defaultFilter={homeTeamFilter:{...a.homeTeamFilter,teamId:e.gameForAnalysis.home_team},visitingTeamFilter:{...a.awayTeamFilter,teamId:e.gameForAnalysis.visiting_team}}},addLiveGamePlay(e,a){if(!e.livePlays.has(a[e.indexesTLP.playId])){e.livePlays.set(a[e.indexesTLP.playId],a);const n=Yc(a,e.indexesTLP,e.categoriesMap);for(const s of Object.values(e.nextGamesDataStructure))for(const i of Object.values(s.subcategories))i.addLivePlay(e.gameForAnalysis.home_team===n[e.indexesTSP.teamId]?"homeTeam":"visitingTeam",n[e.indexesTSP.teamId],n,e.indexesTSP,e.isLive,!1)}},updateLiveGamePlay(e,a){const o=!!a[e.indexesTLP.length],n=e.livePlays.get(a[e.indexesTLP.playId]);if(f$(n,a))return;let s="";const i=e.gameForAnalysis.home_team===a[e.indexesTLP.teamId]?"homeTeam":"visitingTeam";n&&(s=e.gameForAnalysis.home_team===n[e.indexesTLP.teamId]?"homeTeam":"visitingTeam");const r=Yc(n,e.indexesTLP,e.categoriesMap),c=k0(n,r,e.indexesTLP),h=Yc(a,e.indexesTLP,e.categoriesMap),d=k0(a,h,e.indexesTLP);for(const l of Object.values(e.nextGamesDataStructure))for(const p of Object.values(l.subcategories))n&&(p.subtractLivePlay(s,r[e.indexesTSP.teamId],r,e.indexesTSP,o),c&&p.subtractLivePlay(s,c[e.indexesTSP.teamId],c,e.indexesTSP,o)),p.addLivePlay(i,h[e.indexesTSP.teamId],h,e.indexesTSP,e.isLive,o),d&&p.addLivePlay(i,d[e.indexesTSP.teamId],d,e.indexesTSP,e.isLive,o);e.livePlays.set(a[e.indexesTLP.playId],a)},deleteLiveGamePlay(e,a){const o=!!a[e.indexesTLP.length],n=e.livePlays.get(a[e.indexesTLP.playId]);let s="";if(n){s=e.gameForAnalysis.home_team===n[e.indexesTLP.teamId]?"homeTeam":"visitingTeam",e.livePlays.delete(n[e.indexesTLP.playId]);const i=Yc(n,e.indexesTLP,e.categoriesMap),r=k0(a,i,e.indexesTLP);for(const c of Object.values(e.nextGamesDataStructure))for(const h of Object.values(c.subcategories))h.subtractLivePlay(s,i[e.indexesTSP.teamId],i,e.indexesTSP,o),r&&h.subtractLivePlay(s,r[e.indexesTSP.teamId],r,e.indexesTSP,o)}},clearLiveTotals(e){for(const a of Object.values(e.nextGamesDataStructure))for(const o of Object.values(a.subcategories))o.homeTeam.resetTotalsLive(),o.visitingTeam.resetTotalsLive()},updateSeasonStatistics(e,a){e.statistics=a},updateOldSeasonId(e,a){e.oldSeasonId=a},addRankingInSubcategories(e,{getters:a,isPremiumAccount:o}){if(!(e.homeTeamFilter.teamId&&e.visitingTeamFilter.teamId))return;e.isRankingCalculating=!1,e.currentSeasonTeams.forEach(i=>{i.homeTeamFilterGames=i.playedGames.filter(r=>e.homeTeamFilter.playingAs.includes(r.playingAs)&&e.homeTeamFilter.matchResult.includes(r.matchResult)).length,i.visitingTeamFilterGames=i.playedGames.filter(r=>e.visitingTeamFilter.playingAs.includes(r.playingAs)&&e.visitingTeamFilter.matchResult.includes(r.matchResult)).length});const n=[],s=new Map;for(const i of Object.values(e.nextGamesDataStructure))for(const r of Object.values(i.subcategories))n.push(r);a.rankingData.forEach(i=>{for(const r of n)if(r.isInGeneralCategory(i[e.indexesLS.categoryId])){s.has(r.id)?s.get(r.id).push(i):s.set(r.id,[i]);break}})},prepareCleanAllStatistics(e){e.homeTeamFilter.requiresPlaysFiltering=!0,e.visitingTeamFilter.requiresPlaysFiltering=!0},setHomeGames(e,a){e.homeGames=Ok(a)},setVisitingGames(e,a){e.visitingGames=Ok(a)},generateCategoriesMap(e){for(const a of Object.values(e.nextGamesDataStructure))for(const o of Object.values(a.subcategories))o.accomplishedCategoryIds.forEach(n=>{const s=e.categoriesMap.get(n);s?s.push(o.generalCategoriesIds.accomplished):e.categoriesMap.set(n,[o.generalCategoriesIds.accomplished])})},resetNextGamesDataStructure(e){for(const a of Object.values(e.nextGamesDataStructure))for(const o of Object.values(a.subcategories))o.resetData()}},actions:{turnOnOffDefaultFilters({state:e,commit:a},{command:o}){o==="on"?a("updateFilters",{filters:e.defaultFilter,needsFormat:!1}):a("updateFilters",{filters:e.filterAux,needsFormat:!1})},async setAndGetStatsPostMatch({commit:e},a){try{const r=await Gje({gameId:a.gameId});if(r){var o=[],n=[],s={season:0,total:0,visit:{total:0,draw:0,win:0,lose:0},played:0,local:{total:0,draw:0,win:0,lose:0}},i={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(r.data).length!==0&&(o=r.data.data.filter(c=>c[1]==a.homeTeam),n=r.data.data.filter(c=>c[1]==a.awayTeam),s=r.data.games,i=r.data.games),e("updateHomeTeamPlays",o),e("updateVisitingTeamPlays",n),e("setHomeGames",s),e("setVisitingGames",i)}else e("updateHomeTeamPlays",[]),e("updateVisitingTeamPlays",[])}catch(r){return Promise.reject(r)}},async fillStatisticDataPostMatch({commit:e,dispatch:a},o){e("prepareCleanAllStatistics"),e("updateHomeTeamPlays",[]),e("updateVisitingTeamPlays",[]),e("setIsSectionLoading",!0,{root:!0});try{let n=[];e("updateGameForAnalysis",o.gameInfo),n.push(a("setAndGetStatsPostMatch",{gameId:o.game,homeTeam:o.homeTeam,awayTeam:o.awayTeam})),await Promise.all(n)}catch(n){throw new Error(n)}finally{e("setIsSectionLoading",!1,{root:!0})}},async checkState({state:e,dispatch:a,commit:o},{gameId:n,isTeamsAnalysis:s,currentSeasonId:i,isLoginChanged:r=!1,defaultFilter:c=null,gameInfo:h=null,isCupGame:d=!1}){try{let l={},p=e.seasonId!==Number(i);const y=[];o("setIsSectionLoading",!0,{root:!0}),o("setUsePastSeasonId",!1),p&&o("setSeasonId",i),o("updateGameId",Number(n)),e.oldSeasonId!==e.seasonId&&o("resetNextGamesDataStructure");const m=await a("getCurrentSeasonGames",Number(n));if(o("leagueGeneral/updateCurrentSeasonGames",m,{root:!0}),l=m.find(g=>g.game_id===Number(n)),!l&&h&&(l=h),l&&o("updateGameForAnalysis",l),l.game_status!==1&&(d||await a("checkTeamsData",{gameId:n,isFromBet:!!c}),(r||e.oldSeasonId!==e.seasonId||e.statistics.length===0)&&y.push(a("getSeasonStatistics")),(r||e.categoriesMap.size===0)&&o("generateCategoriesMap")),e.usePastSeasonId){const g=await a("getCurrentSeasonGamesLast");o("leagueGeneral/updateCurrentSeasonGames",g,{root:!0})}(r||e.currentSeasonTeams.length===0||!e.currentSeasonTeams.find(g=>l.home_team===g.team_id))&&y.push(a("getCurrentSeasonTeams")),o("setHomeResultGame",l.score[0]),o("setAwayResultGame",l.score[1]),s?l.game_status!==1?(await a("fillStatisticData",{gameId:n,gameinfo:l,promises:y,defaultFilter:c}),o("updateShowPostMatchData",!1)):(o("updateStats",[]),o("updateShowPostMatchData",!0),y.push(a("fillStatisticDataPostMatch",{game:n,homeTeam:l.home_team,awayTeam:l.visiting_team,gameInfo:l})),await Promise.all(y)):o("setIsSectionLoading",!1,{root:!0})}catch(l){return Promise.reject(l)}},async fillStatisticData({commit:e,dispatch:a,getters:o,rootGetters:n,state:s},{gameId:i,gameinfo:r,promises:c=[],defaultFilter:h=null}){let d=null;try{e("setIsSectionLoading",!0,{root:!0}),e("prepareCleanAllStatistics"),e("updateHomeTeamPlays",[]),e("updateVisitingTeamPlays",[]),e("updateGameForAnalysis",r),r.is_live&&c.push(a("getCurrentLiveGamePlays",i)),c.push(a("getSpecialMentionsByGame",i)),c.push(a("getHomeTeamPlays")),c.push(a("getVisitingTeamPlays")),c.push(a("getCurrentSeasonPlays")),h&&c.push(qje(h)),d=await Promise.all(c)}catch(l){throw new Error(l)}finally{setTimeout(()=>{if(e("addRankingInSubcategories",{getters:o,isPremiumAccount:n["loginGeneral/getPremiumAccount"]}),h){const[l]=d.pop();l&&(e("setBetSubcategories",l.categories),e("setBetDescription",l.sectionDescription),e("setDefaultFilter",l.params),e("updateFilterAux"),e("updateFilters",{filters:s.defaultFilter,needsFormat:!1}),a("updateRankingInSubcategories"))}},100),e("setIsSectionLoading",!1,{root:!0})}},async checkTeamsData({state:e,dispatch:a,rootState:o,commit:n},{gameId:s,isFromBet:i}){try{const r=Number(s);if(o.general.tournaments&&o.general.tournaments.length){await a("general/fetchTournaments",null,{root:!0});const c=o.general.tournaments.find(h=>{for(const d of h.seasons)if(d.id===e.seasonId)return!0;return!1});n("general/setTournamentSelected",c||{},{root:!0})}if(e.pastSeasonId){n("nextGeneral/setPastSeasonId",e.pastSeasonId,{root:!0});const c=o.leagueGeneral.currentSeasonGames.find(h=>h.game_id===r);c&&n("updateGameForAnalysis",c),await Promise.all([a("getHomeTeamPlays"),a("getVisitingTeamPlays")]),n("setUsePastSeasonId",i||(!e.homeTeamPlays||e.homeTeamPlays.length===0)&&(!e.visitingTeamPlays||e.visitingTeamPlays.length===0))}else n("setUsePastSeasonId",!1)}catch(r){throw new Error(r)}},async getSpecialMentionsByGame({commit:e},a){try{const o=await jje({gameId:a});e("addSpecialMentions",o)}catch(o){return Promise.reject(o)}},async getCurrentSeasonGames({commit:e,state:a},o){try{const{teams:n,games:s,past_season_id:i,tournament_id:r}=await Lje({seasonId:a.usePastSeasonId?a.pastSeasonId:a.seasonId,gameId:o}),c=aMe.find(h=>h.id===r);return c&&e("setCurrentTournamentName",c.name),e("setHome",n[0]),e("setAway",n[1]),a.usePastSeasonId||e("setPastSeasonId",i),await e("updateCurrentSeasonGames",s),s&&Array.isArray(s)&&e("updateFinishedGames",s.reduce((h,d)=>(d.game_status===1&&(h+=1),h),0)),s}catch(n){return Promise.reject(n)}},async getCurrentSeasonGamesLast({commit:e,state:a}){try{const{games:o,past_season_id:n}=await Vk({seasonId:a.usePastSeasonId?a.pastSeasonId:a.seasonId});return a.usePastSeasonId||e("setPastSeasonId",n),await e("updateCurrentSeasonGames",o),o&&Array.isArray(o)&&e("updateFinishedGames",o.reduce((s,i)=>(i.game_status===1&&(s+=1),s),0)),o}catch(o){return Promise.reject(o)}},async getCurrentSeasonTeams({commit:e,state:a}){try{const o=await Uje({seasonId:a.usePastSeasonId?a.pastSeasonId:a.seasonId});e("updateCurrentSeasonTeams",o.data.teams)}catch{}},async getSeasonStatistics({commit:e,state:a}){try{const o=a.usePastSeasonId?a.pastSeasonId:a.seasonId,n=await Rje({seasonId:o});e("updateSeasonStatistics",n),e("updateOldSeasonId",o)}catch(o){return Promise.reject(o)}},updateRankingInSubcategories({state:e,commit:a,getters:o,rootGetters:n}){e.currentSeasonGames.length>0&&a("addRankingInSubcategories",{getters:o,isPremiumAccount:n["loginGeneral/getPremiumAccount"]})},async getHomeTeamPlays({commit:e,state:a}){try{const o=await Ak({seasonId:a.usePastSeasonId?a.pastSeasonId:a.seasonId,teamId:a.gameForAnalysis.home_team});o.data&&(e("updateHomeTeamPlays",o.data.data),e("setHomeGames",o.data.games))}catch(o){return Promise.reject(o)}},async getVisitingTeamPlays({commit:e,state:a}){try{const o=await Ak({seasonId:a.usePastSeasonId?a.pastSeasonId:a.seasonId,teamId:a.gameForAnalysis.visiting_team});o.data&&(e("updateVisitingTeamPlays",o.data.data),e("setVisitingGames",o.data.games))}catch(o){return Promise.reject(o)}},async getCurrentSeasonPlays({commit:e,state:a}){try{const o=await Pje({seasonId:a.usePastSeasonId?a.pastSeasonId:a.seasonId});e("updateStats",o)}catch(o){return Promise.reject(new Error(o))}},async getCurrentLiveGamePlays({state:e,commit:a},o){try{const n=await vje({gameId:o});e.livePlays=new Map,n.forEach(s=>{e.gameForAnalysis.game_id===s[e.indexesTLP.gameId]&&(e.gameForAnalysis.home_team===s[e.indexesTLP.teamId]||e.gameForAnalysis.visiting_team===s[e.indexesTLP.teamId])&&a("addLiveGamePlay",s)})}catch(n){throw new Error(n)}},socket_new({state:e,commit:a},o){const n=o[1];(e.gameForAnalysis.home_team===n[e.indexesTLP.teamId]||e.gameForAnalysis.visiting_team===n[e.indexesTLP.teamId])&&a("addLiveGamePlay",n)},socket_update({state:e,commit:a},o){const n=o[1];e.gameForAnalysis.game_id===n[e.indexesTLP.gameId]&&(e.gameForAnalysis.home_team===n[e.indexesTLP.teamId]||e.gameForAnalysis.visitingTeam===n[e.indexesTLP.teamId])&&a("updateLiveGamePlay",n)},socket_delete({state:e,commit:a},o){const n=o[1];e.gameForAnalysis.game_id===n[e.indexesTLP.gameId]&&(e.gameForAnalysis.home_team===n[e.indexesTLP.teamId]||e.gameForAnalysis.visiting_team===n[e.indexesTLP.teamId])&&a("deleteLiveGamePlay",n)},exitChannel({state:e,getters:a,rootState:o,rootGetters:n,commit:s}){const i=n["loginGeneral/getPremiumAccount"];a.isLive&&i&&(s("updateShowLiveData",!1),s("clearLiveTotals"),e.livePlays.clear(),this._vm.$socket.client.emit("unsubscribe",{channel:`game.${e.gameForAnalysis.game_id}.v2`}))},cleanStats({state:e}){for(const o of Object.values(e.nextGamesDataStructure))for(const n of Object.values(o.subcategories))n.homeTeam.resetTotals(),n.visitingTeam.resetTotals(),n.homeTeam.resetTotalsLive(),n.visitingTeam.resetTotalsLive(),n.isBetMainSubcategory=!1;Object.values(e.nextGamesDataStructure).forEach(o=>{for(const n of Object.values(o.subcategories))n.resetMentions()}),e.currentSeasonPlays=null,e.homeTeamPlays=[],e.visitingTeamPlays=[],e.homeTeamFilter.requiresPlaysFiltering=!0,e.visitingTeamFilter.requiresPlaysFiltering=!0,e.isRankingCalculating=!0},cleanAllStats({state:e}){for(const o of Object.values(e.nextGamesDataStructure))for(const n of Object.values(o.subcategories))n.homeTeam.resetTotals(),n.visitingTeam.resetTotals(),n.isBetMainSubcategory=!1;Object.values(e.nextGamesDataStructure).forEach(o=>{for(const n of Object.values(o.subcategories))n.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 nMe(){try{const{data:e}=await ft({url:"https://kefloixzy1.execute-api.us-west-2.amazonaws.com/prod/tournaments"});return e}catch(e){throw new Error(e)}}const sMe={namespaced:!0,state:{videoSrc:null,isVideoModalVisible:!1,tournaments:[],seccionBetsGolTipster:1,tournamentSelected:{},sectionAnalytics:"Banner_Home",previewSectionAnalytics:"",sectionRef:"",booleanIsStatisticModalOpen:!1},getters:{getSectionAnalytics(e){return e.sectionAnalytics},getPreviewSectionAnalytics(e){return e.previewSectionAnalytics},getSeccionBetsGolTipster(e){return e.seccionBetsGolTipster}},mutations:{setBooleanIsStatisticModalOpen(e,a){e.booleanIsStatisticModalOpen=a},setSectionRef(e,a){e.sectionRef=a},setSectionAnalytics(e,a){e.sectionAnalytics=a},setSeccionBetsGolTipster(e,a){e.seccionBetsGolTipster=a},setPreviewSectionAnalytics(e,a){e.previewSectionAnalytics=a},setVideoSrc(e,a){e.videoSrc=a},setVideoModalVisibility(e,a){e.isVideoModalVisible=a},setSelectedTournament(e,a){e.selectedTournament=a},setTournaments(e,a){e.tournaments=a.map(o=>({...o.tournament,seasons:o.seasons})),e.tournamentSelected=e.tournaments[0]},setTournamentSelected(e,a){e.tournamentSelected=a}},actions:{async fetchTournaments({state:e,commit:a}){try{if(e.tournaments.length===0){const o=await nMe();a("setTournaments",o)}}catch(o){throw new Error(o)}}}};async function iMe({seasonId:e,localTeamId:a,visitingTeamId:o}){try{const n=`https://bzznnzehtf.execute-api.us-west-2.amazonaws.com/prod/xg/seasons/${e}/teams/${a}/${o}`;return(await ft({url:n})).data}catch(n){return Promise.reject(n)}}async function rMe({seasonId:e,localTeamId:a,visitingTeamId:o}){try{const n=`https://bzznnzehtf.execute-api.us-west-2.amazonaws.com/prod/xg/game/${e}/teams/${a}/${o}`;return(await ft({url:n})).data}catch(n){return Promise.reject(n)}}const Tk=(e,a)=>{let o={};return e.forEach((n,s)=>{s==3&&(a[0]==35||a[0]==54)&&(a[s]==2?a[s]=1:a[s]=2),s==2&&(a[0]==35||a[0]==54)&&(a[s]==1?a[s]=2:a[s]==2&&(a[s]=1)),o[n]=a[s]}),o},zk=(e,a)=>e.filter(n=>{const s=a.playingAs.includes(n.playing_as),i=a.matchResult.includes(n.match_result),r=a.sections.includes(n.section);return s&&i&&r}),Fk=[{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(a,o,n){return typeof n>"u"||+n==0?Math[a](o):(o=+o,n=+n,isNaN(o)||!(typeof n=="number"&&n%1===0)?NaN:(o=o.toString().split("e"),o=Math[a](+(o[0]+"e"+(o[1]?+o[1]-n:-n))),o=o.toString().split("e"),+(o[0]+"e"+(o[1]?+o[1]+n:n))))}Math.ceil10||(Math.ceil10=function(a,o){return e("ceil",a,o)})})();function Pk(e,a){let o=a*-1;return Math.ceil10(e,o)}const lMe={general:sMe,...Wje,...oMe,...{xgGeneral:{namespaced:!0,state:{teamSelected:"Local",xGLocalPlays:[],xGVisitingPlays:[]},getters:{playsLocal:(e,a,o)=>{const n=e.xGLocalPlays,s="homeTeamFilter",i=o.nextGeneral[s];return zk(n,i)},playsAway:(e,a,o)=>{const n=e.xGVisitingPlays,s="visitingTeamFilter",i=o.nextGeneral[s];return zk(n,i)},goalsQtyLocal:(e,a)=>{const o=Fk.find(n=>n.name==="Goles");return a.playsLocal.filter(n=>o.categories.includes(n.category_id)).length},goalsQtyAway:(e,a)=>{const o=Fk.find(n=>n.name==="Goles");return a.playsAway.filter(n=>o.categories.includes(n.category_id)).length},shotsOnGoalQtyLocal:(e,a)=>a.playsLocal.filter(o=>o.category_id===510).length,shotsOnGoalQtyAway:(e,a)=>a.playsAway.filter(o=>o.category_id===510).length,xGLocal:(e,a)=>{const o=new Set;let n=a.playsLocal.reduce((s,i)=>(o.has(i.moment_of_play)||(o.add(i.moment_of_play),s+=i.xG2),s),0);return Pk(n,2)},xGAway:(e,a)=>{const o=new Set;let n=a.playsAway.reduce((s,i)=>(o.has(i.moment_of_play)||(o.add(i.moment_of_play),s+=i.xG2),s),0);return Pk(n,2)}},mutations:{setTeamSelected(e,a){e.teamSelected=a},setPlays(e,a){e.xGLocalPlays=a.local_team.map(o=>Tk(a.data_headers,o)),e.xGVisitingPlays=a.visiting_team.map(o=>Tk(a.data_headers,o))},cleanXgStore(e){e.localStorage="Local",e.xGLocalPlays=[],e.xGVisitingPlays=[]}},actions:{async getXgPlays({commit:e},{seasonId:a,localTeamId:o,visitingTeamId:n,postMatch:s=!1}){try{var i={};s?i=await rMe({seasonId:a,localTeamId:o,visitingTeamId:n}):i=await iMe({seasonId:a,localTeamId:o,visitingTeamId:n}),e("setPlays",i)}catch(r){return Promise.reject(r)}}}}}};function cMe(e){for(const[a,o]of Object.entries(lMe))e.hasModule(a)||e.registerModule(a,o)}_t.GSCGameData=Fje,_t.registerStoreModules=cMe,Object.defineProperty(_t,Symbol.toStringTag,{value:"Module"})});
|
|
120
|
+
*/var yLe="store";function wo(e,a){Object.keys(e).forEach(function(o){return a(e[o],o)})}function sk(e){return e!==null&&typeof e=="object"}function uLe(e){return e&&typeof e.then=="function"}function Xt(e,a){if(!e)throw new Error("[vuex] "+a)}function fLe(e,a){return function(){return e(a)}}function ik(e,a,o){return a.indexOf(e)<0&&(o&&o.prepend?a.unshift(e):a.push(e)),function(){var n=a.indexOf(e);n>-1&&a.splice(n,1)}}function rk(e,a){e._actions=Object.create(null),e._mutations=Object.create(null),e._wrappedGetters=Object.create(null),e._modulesNamespaceMap=Object.create(null);var o=e.state;qc(e,o,[],e._modules.root,!0),d0(e,o,a)}function d0(e,a,o){var n=e._state;e.getters={},e._makeLocalGettersCache=Object.create(null);var s=e._wrappedGetters,i={};wo(s,function(r,c){i[c]=fLe(r,e),Object.defineProperty(e.getters,c,{get:function(){return i[c]()},enumerable:!0})}),e._state=t.reactive({data:a}),e.strict&&kLe(e),n&&o&&e._withCommit(function(){n.data=null})}function qc(e,a,o,n,s){var i=!o.length,r=e._modules.getNamespace(o);if(n.namespaced&&(e._modulesNamespaceMap[r]&&process.env.NODE_ENV!=="production"&&console.error("[vuex] duplicate namespace "+r+" for the namespaced module "+o.join("/")),e._modulesNamespaceMap[r]=n),!i&&!s){var c=m0(a,o.slice(0,-1)),h=o[o.length-1];e._withCommit(function(){process.env.NODE_ENV!=="production"&&h in c&&console.warn('[vuex] state field "'+h+'" was overridden by a module with the same name at "'+o.join(".")+'"'),c[h]=n.state})}var d=n.context=_Le(e,r,o);n.forEachMutation(function(l,p){var y=r+p;bLe(e,y,l,d)}),n.forEachAction(function(l,p){var y=l.root?p:r+p,m=l.handler||l;wLe(e,y,m,d)}),n.forEachGetter(function(l,p){var y=r+p;CLe(e,y,l,d)}),n.forEachChild(function(l,p){qc(e,a,o.concat(p),l,s)})}function _Le(e,a,o){var n=a==="",s={dispatch:n?e.dispatch:function(i,r,c){var h=Jc(i,r,c),d=h.payload,l=h.options,p=h.type;if((!l||!l.root)&&(p=a+p,process.env.NODE_ENV!=="production"&&!e._actions[p])){console.error("[vuex] unknown local action type: "+h.type+", global type: "+p);return}return e.dispatch(p,d)},commit:n?e.commit:function(i,r,c){var h=Jc(i,r,c),d=h.payload,l=h.options,p=h.type;if((!l||!l.root)&&(p=a+p,process.env.NODE_ENV!=="production"&&!e._mutations[p])){console.error("[vuex] unknown local mutation type: "+h.type+", global type: "+p);return}e.commit(p,d,l)}};return Object.defineProperties(s,{getters:{get:n?function(){return e.getters}:function(){return lk(e,a)}},state:{get:function(){return m0(e.state,o)}}}),s}function lk(e,a){if(!e._makeLocalGettersCache[a]){var o={},n=a.length;Object.keys(e.getters).forEach(function(s){if(s.slice(0,n)===a){var i=s.slice(n);Object.defineProperty(o,i,{get:function(){return e.getters[s]},enumerable:!0})}}),e._makeLocalGettersCache[a]=o}return e._makeLocalGettersCache[a]}function bLe(e,a,o,n){var s=e._mutations[a]||(e._mutations[a]=[]);s.push(function(i){o.call(e,n.state,i)})}function wLe(e,a,o,n){var s=e._actions[a]||(e._actions[a]=[]);s.push(function(i){var r=o.call(e,{dispatch:n.dispatch,commit:n.commit,getters:n.getters,state:n.state,rootGetters:e.getters,rootState:e.state},i);return uLe(r)||(r=Promise.resolve(r)),e._devtoolHook?r.catch(function(c){throw e._devtoolHook.emit("vuex:error",c),c}):r})}function CLe(e,a,o,n){if(e._wrappedGetters[a]){process.env.NODE_ENV!=="production"&&console.error("[vuex] duplicate getter key: "+a);return}e._wrappedGetters[a]=function(s){return o(n.state,n.getters,s.state,s.getters)}}function kLe(e){t.watch(function(){return e._state.data},function(){process.env.NODE_ENV!=="production"&&Xt(e._committing,"do not mutate vuex store state outside mutation handlers.")},{deep:!0,flush:"sync"})}function m0(e,a){return a.reduce(function(o,n){return o[n]},e)}function Jc(e,a,o){return sk(e)&&e.type&&(o=a,a=e,e=e.type),process.env.NODE_ENV!=="production"&&Xt(typeof e=="string","expects string as the type, but found "+typeof e+"."),{type:e,payload:a,options:o}}var SLe="vuex bindings",ck="vuex:mutations",p0="vuex:actions",Sn="vuex",ELe=0;function NLe(e,a){gLe({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:[SLe]},function(o){o.addTimelineLayer({id:ck,label:"Vuex Mutations",color:dk}),o.addTimelineLayer({id:p0,label:"Vuex Actions",color:dk}),o.addInspector({id:Sn,label:"Vuex",icon:"storage",treeFilterPlaceholder:"Filter stores..."}),o.on.getInspectorTree(function(n){if(n.app===e&&n.inspectorId===Sn)if(n.filter){var s=[];gk(s,a._modules.root,n.filter,""),n.rootNodes=s}else n.rootNodes=[hk(a._modules.root,"")]}),o.on.getInspectorState(function(n){if(n.app===e&&n.inspectorId===Sn){var s=n.nodeId;lk(a,s),n.state=xLe(ILe(a._modules,s),s==="root"?a.getters:a._makeLocalGettersCache,s)}}),o.on.editInspectorState(function(n){if(n.app===e&&n.inspectorId===Sn){var s=n.nodeId,i=n.path;s!=="root"&&(i=s.split("/").filter(Boolean).concat(i)),a._withCommit(function(){n.set(a._state.data,i,n.state.value)})}}),a.subscribe(function(n,s){var i={};n.payload&&(i.payload=n.payload),i.state=s,o.notifyComponentUpdate(),o.sendInspectorTree(Sn),o.sendInspectorState(Sn),o.addTimelineEvent({layerId:ck,event:{time:Date.now(),title:n.type,data:i}})}),a.subscribeAction({before:function(n,s){var i={};n.payload&&(i.payload=n.payload),n._id=ELe++,n._time=Date.now(),i.state=s,o.addTimelineEvent({layerId:p0,event:{time:n._time,title:n.type,groupId:n._id,subtitle:"start",data:i}})},after:function(n,s){var i={},r=Date.now()-n._time;i.duration={_custom:{type:"duration",display:r+"ms",tooltip:"Action duration",value:r}},n.payload&&(i.payload=n.payload),i.state=s,o.addTimelineEvent({layerId:p0,event:{time:Date.now(),title:n.type,groupId:n._id,subtitle:"end",data:i}})}})})}var dk=8702998,BLe=6710886,$Le=16777215,mk={label:"namespaced",textColor:$Le,backgroundColor:BLe};function pk(e){return e&&e!=="root"?e.split("/").slice(-2,-1)[0]:"Root"}function hk(e,a){return{id:a||"root",label:pk(a),tags:e.namespaced?[mk]:[],children:Object.keys(e._children).map(function(o){return hk(e._children[o],a+o+"/")})}}function gk(e,a,o,n){n.includes(o)&&e.push({id:n||"root",label:n.endsWith("/")?n.slice(0,n.length-1):n||"Root",tags:a.namespaced?[mk]:[]}),Object.keys(a._children).forEach(function(s){gk(e,a._children[s],o,n+s+"/")})}function xLe(e,a,o){a=o==="root"?a:a[o];var n=Object.keys(a),s={state:Object.keys(e.state).map(function(r){return{key:r,editable:!0,value:e.state[r]}})};if(n.length){var i=VLe(a);s.getters=Object.keys(i).map(function(r){return{key:r.endsWith("/")?pk(r):r,editable:!1,value:h0(function(){return i[r]})}})}return s}function VLe(e){var a={};return Object.keys(e).forEach(function(o){var n=o.split("/");if(n.length>1){var s=a,i=n.pop();n.forEach(function(r){s[r]||(s[r]={_custom:{value:{},display:r,tooltip:"Module",abstract:!0}}),s=s[r]._custom.value}),s[i]=h0(function(){return e[o]})}else a[o]=h0(function(){return e[o]})}),a}function ILe(e,a){var o=a.split("/").filter(function(n){return n});return o.reduce(function(n,s,i){var r=n[s];if(!r)throw new Error('Missing module "'+s+'" for path "'+a+'".');return i===o.length-1?r:r._children},a==="root"?e:e.root._children)}function h0(e){try{return e()}catch(a){return a}}var Zt=function(e,a){this.runtime=a,this._children=Object.create(null),this._rawModule=e;var o=e.state;this.state=(typeof o=="function"?o():o)||{}},yk={namespaced:{configurable:!0}};yk.namespaced.get=function(){return!!this._rawModule.namespaced},Zt.prototype.addChild=function(e,a){this._children[e]=a},Zt.prototype.removeChild=function(e){delete this._children[e]},Zt.prototype.getChild=function(e){return this._children[e]},Zt.prototype.hasChild=function(e){return e in this._children},Zt.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)},Zt.prototype.forEachChild=function(e){wo(this._children,e)},Zt.prototype.forEachGetter=function(e){this._rawModule.getters&&wo(this._rawModule.getters,e)},Zt.prototype.forEachAction=function(e){this._rawModule.actions&&wo(this._rawModule.actions,e)},Zt.prototype.forEachMutation=function(e){this._rawModule.mutations&&wo(this._rawModule.mutations,e)},Object.defineProperties(Zt.prototype,yk);var Co=function(e){this.register([],e,!1)};Co.prototype.get=function(e){return e.reduce(function(a,o){return a.getChild(o)},this.root)},Co.prototype.getNamespace=function(e){var a=this.root;return e.reduce(function(o,n){return a=a.getChild(n),o+(a.namespaced?n+"/":"")},"")},Co.prototype.update=function(e){uk([],this.root,e)},Co.prototype.register=function(e,a,o){var n=this;o===void 0&&(o=!0),process.env.NODE_ENV!=="production"&&bk(e,a);var s=new Zt(a,o);if(e.length===0)this.root=s;else{var i=this.get(e.slice(0,-1));i.addChild(e[e.length-1],s)}a.modules&&wo(a.modules,function(r,c){n.register(e.concat(c),r,o)})},Co.prototype.unregister=function(e){var a=this.get(e.slice(0,-1)),o=e[e.length-1],n=a.getChild(o);if(!n){process.env.NODE_ENV!=="production"&&console.warn("[vuex] trying to unregister module '"+o+"', which is not registered");return}n.runtime&&a.removeChild(o)},Co.prototype.isRegistered=function(e){var a=this.get(e.slice(0,-1)),o=e[e.length-1];return a?a.hasChild(o):!1};function uk(e,a,o){if(process.env.NODE_ENV!=="production"&&bk(e,o),a.update(o),o.modules)for(var n in o.modules){if(!a.getChild(n)){process.env.NODE_ENV!=="production"&&console.warn("[vuex] trying to add a new module '"+n+"' on hot reloading, manual reload is needed");return}uk(e.concat(n),a.getChild(n),o.modules[n])}}var fk={assert:function(e){return typeof e=="function"},expected:"function"},ALe={assert:function(e){return typeof e=="function"||typeof e=="object"&&typeof e.handler=="function"},expected:'function or object with "handler" function'},_k={getters:fk,mutations:fk,actions:ALe};function bk(e,a){Object.keys(_k).forEach(function(o){if(a[o]){var n=_k[o];wo(a[o],function(s,i){Xt(n.assert(s),OLe(e,o,i,s,n.expected))})}})}function OLe(e,a,o,n,s){var i=a+" should be "+s+' but "'+a+"."+o+'"';return e.length>0&&(i+=' in module "'+e.join(".")+'"'),i+=" is "+JSON.stringify(n)+".",i}var St=function e(a){var o=this;a===void 0&&(a={}),process.env.NODE_ENV!=="production"&&(Xt(typeof Promise<"u","vuex requires a Promise polyfill in this browser."),Xt(this instanceof e,"store must be called with the new operator."));var n=a.plugins;n===void 0&&(n=[]);var s=a.strict;s===void 0&&(s=!1);var i=a.devtools;this._committing=!1,this._actions=Object.create(null),this._actionSubscribers=[],this._mutations=Object.create(null),this._wrappedGetters=Object.create(null),this._modules=new Co(a),this._modulesNamespaceMap=Object.create(null),this._subscribers=[],this._makeLocalGettersCache=Object.create(null),this._devtools=i;var r=this,c=this,h=c.dispatch,d=c.commit;this.dispatch=function(p,y){return h.call(r,p,y)},this.commit=function(p,y,m){return d.call(r,p,y,m)},this.strict=s;var l=this._modules.root.state;qc(this,l,[],this._modules.root),d0(this,l),n.forEach(function(p){return p(o)})},g0={state:{configurable:!0}};St.prototype.install=function(e,a){e.provide(a||yLe,this),e.config.globalProperties.$store=this;var o=this._devtools!==void 0?this._devtools:process.env.NODE_ENV!=="production"||!1;o&&NLe(e,this)},g0.state.get=function(){return this._state.data},g0.state.set=function(e){process.env.NODE_ENV!=="production"&&Xt(!1,"use store.replaceState() to explicit replace store state.")},St.prototype.commit=function(e,a,o){var n=this,s=Jc(e,a,o),i=s.type,r=s.payload,c=s.options,h={type:i,payload:r},d=this._mutations[i];if(!d){process.env.NODE_ENV!=="production"&&console.error("[vuex] unknown mutation type: "+i);return}this._withCommit(function(){d.forEach(function(l){l(r)})}),this._subscribers.slice().forEach(function(l){return l(h,n.state)}),process.env.NODE_ENV!=="production"&&c&&c.silent&&console.warn("[vuex] mutation type: "+i+". Silent option has been removed. Use the filter functionality in the vue-devtools")},St.prototype.dispatch=function(e,a){var o=this,n=Jc(e,a),s=n.type,i=n.payload,r={type:s,payload:i},c=this._actions[s];if(!c){process.env.NODE_ENV!=="production"&&console.error("[vuex] unknown action type: "+s);return}try{this._actionSubscribers.slice().filter(function(d){return d.before}).forEach(function(d){return d.before(r,o.state)})}catch(d){process.env.NODE_ENV!=="production"&&(console.warn("[vuex] error in before action subscribers: "),console.error(d))}var h=c.length>1?Promise.all(c.map(function(d){return d(i)})):c[0](i);return new Promise(function(d,l){h.then(function(p){try{o._actionSubscribers.filter(function(y){return y.after}).forEach(function(y){return y.after(r,o.state)})}catch(y){process.env.NODE_ENV!=="production"&&(console.warn("[vuex] error in after action subscribers: "),console.error(y))}d(p)},function(p){try{o._actionSubscribers.filter(function(y){return y.error}).forEach(function(y){return y.error(r,o.state,p)})}catch(y){process.env.NODE_ENV!=="production"&&(console.warn("[vuex] error in error action subscribers: "),console.error(y))}l(p)})})},St.prototype.subscribe=function(e,a){return ik(e,this._subscribers,a)},St.prototype.subscribeAction=function(e,a){var o=typeof e=="function"?{before:e}:e;return ik(o,this._actionSubscribers,a)},St.prototype.watch=function(e,a,o){var n=this;return process.env.NODE_ENV!=="production"&&Xt(typeof e=="function","store.watch only accepts a function."),t.watch(function(){return e(n.state,n.getters)},a,Object.assign({},o))},St.prototype.replaceState=function(e){var a=this;this._withCommit(function(){a._state.data=e})},St.prototype.registerModule=function(e,a,o){o===void 0&&(o={}),typeof e=="string"&&(e=[e]),process.env.NODE_ENV!=="production"&&(Xt(Array.isArray(e),"module path must be a string or an Array."),Xt(e.length>0,"cannot register the root module by using registerModule.")),this._modules.register(e,a),qc(this,this.state,e,this._modules.get(e),o.preserveState),d0(this,this.state)},St.prototype.unregisterModule=function(e){var a=this;typeof e=="string"&&(e=[e]),process.env.NODE_ENV!=="production"&&Xt(Array.isArray(e),"module path must be a string or an Array."),this._modules.unregister(e),this._withCommit(function(){var o=m0(a.state,e.slice(0,-1));delete o[e[e.length-1]]}),rk(this)},St.prototype.hasModule=function(e){return typeof e=="string"&&(e=[e]),process.env.NODE_ENV!=="production"&&Xt(Array.isArray(e),"module path must be a string or an Array."),this._modules.isRegistered(e)},St.prototype.hotUpdate=function(e){this._modules.update(e),rk(this,!0)},St.prototype._withCommit=function(e){var a=this._committing;this._committing=!0,e(),this._committing=a},Object.defineProperties(St.prototype,g0);var TLe=FLe(function(e,a){var o={};return process.env.NODE_ENV!=="production"&&!wk(a)&&console.error("[vuex] mapMutations: mapper parameter must be either an Array or an Object"),zLe(a).forEach(function(n){var s=n.key,i=n.val;o[s]=function(){for(var r=[],c=arguments.length;c--;)r[c]=arguments[c];var h=this.$store.commit;if(e){var d=PLe(this.$store,"mapMutations",e);if(!d)return;h=d.context.commit}return typeof i=="function"?i.apply(this,[h].concat(r)):h.apply(this.$store,[i].concat(r))}}),o});function zLe(e){return wk(e)?Array.isArray(e)?e.map(function(a){return{key:a,val:a}}):Object.keys(e).map(function(a){return{key:a,val:e[a]}}):[]}function wk(e){return Array.isArray(e)||sk(e)}function FLe(e){return function(a,o){return typeof a!="string"?(o=a,a=""):a.charAt(a.length-1)!=="/"&&(a+="/"),e(a,o)}}function PLe(e,a,o){var n=e._modulesNamespaceMap[o];return process.env.NODE_ENV!=="production"&&!n&&console.error("[vuex] module namespace not found in "+a+"(): "+o),n}const RLe="/icn-play.svg",DLe="/icn-tiros-de-esquina.svg",LLe="/icn-tiro-a-porteria.svg",vLe="/icn-cambio.svg",jLe="/icn-falta.svg",MLe="/atajada.svg",HLe="/fuera-de-lugar.svg",y0="/gol.svg",ULe="/var.png",GLe="/tiempo-agregado.svg",WLe="/jugada-peligrosa.svg",qLe="/penal-marcado.svg",JLe="/penal-fallado.svg",XLe="/inicia-el-partido.svg",ZLe="/fin-del-partido.svg",YLe="/icn-tarjeta-amarilla.svg",KLe="/icn-tarjeta-roja.svg",QLe=[1,2,3,4,6],eve={name:"TimeLineEvent",props:{gameEvent:{type:Object,required:!0},isMobile:{type:Boolean,default:!1},width:{type:Number,default:352},timeLineWidth:{type:Number,default:0}},data(){return{lastHeight:0,gameEventKey:0}},computed:{nameClasses(){const e=[],a=`${this.gameEvent.event_type_id}-${this.gameEvent.category_id}`;return l0.GOAL_IDS.includes(a)?(e.push("is-main-event"),e.push("goal")):l0.YELLOW_CARD_IDS.includes(a)?(e.push("is-main-event"),e.push("yellow-card")):l0.RED_CARD_IDS.includes(a)?(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(a=>iLe(a))),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||QLe.includes(this.gameEvent.event_type_id)?"":this.gameEvent.player_name}},watch:{width(){this.emitHeight()},gameEvent:{deep:!0,handler(){this.gameEventKey++}}},methods:{...TLe("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,a]=this.gameEvent.player_id.split("@");this.$emit("player-changed",{playerOut:Number(e),playerIn:Number(a),teamId:this.gameEvent.team_id})}}},tve=e=>(t.pushScopeId("data-v-d760bda0"),e=e(),t.popScopeId(),e),ave={class:"time-line-event__details"},ove={width:"127",preload:"metadata",style:{"border-radius":"8px"}},nve=["src"],sve=tve(()=>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)),ive={class:"time-line-event__details__info"},rve={key:0,class:"time-line-event__details__info__header__players"},lve={class:"time-line-event__details__info__header__players__div-img"},cve=["src"],dve={class:"time-line-event__details__info__body"},mve={class:"time-line-event__details__info__body__comment"},pve={class:"time-line-event__minute__container"},hve={class:"time-line-event__minute__container__text"},gve={class:"time-line-event__minute__container__icon-container"},yve={class:"time-line-event__minute__container__icon-container__icon"},uve={key:0,src:DLe,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},fve={key:1,src:LLe,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},_ve={key:2,src:vLe,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},bve={key:3,src:jLe,class:"time-line-event__minute__container__icon-container__icon__img",alt:"Event icon"},wve={key:4,src:MLe,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},Cve={key:5,src:HLe,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},kve={key:6,src:y0,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},Sve={key:7,src:y0,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},Eve={key:8,src:y0,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},Nve={key:9,src:ULe,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},Bve={key:10,src:GLe,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},$ve={key:11,src:WLe,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},xve={key:12,src:qLe,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},Vve={key:13,src:JLe,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},Ive={key:14,src:XLe,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},Ave={key:15,src:ZLe,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},Ove={key:16,src:YLe,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},Tve={key:17,src:KLe,class:"time-line-event__minute__container__icon-container__icon__img",alt:"Event icon"},zve={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 Fve(e,a,o,n,s,i){return t.openBlock(),t.createElementBlock("div",{ref:"timeLineEvent",class:t.normalizeClass(["time-line-event",i.teamTypeClasses]),style:t.normalizeStyle({width:`${o.width}px`}),key:s.gameEventKey},[t.createElementVNode("div",ave,[o.gameEvent.video_link!=="-"&&o.timeLineWidth>700?(t.openBlock(),t.createElementBlock("div",{key:0,class:"time-line-event__details__video-thumbnail",onClick:a[0]||(a[0]=r=>i.thumbnailClick(o.gameEvent.video_link,o.gameEvent.event_type_name))},[t.createElementVNode("video",ove,[t.createElementVNode("source",{src:o.gameEvent.video_link+"#t=0.1",type:"video/mp4"},null,8,nve)]),sve])):t.createCommentVNode("",!0),t.createElementVNode("div",ive,[t.createElementVNode("div",{class:t.normalizeClass(["time-line-event__details__info__header",i.teamTypeClasses2])},[o.gameEvent.video_link=="-"?(t.openBlock(),t.createElementBlock("div",rve,[i.srcImgPlayers?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:0},t.renderList(i.srcImgPlayers,(r,c)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["img-player",{"second-player":c===1}]),key:c},[t.createElementVNode("div",lve,[t.createElementVNode("img",{src:r,alt:""},null,8,cve)])],2))),128)):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0),t.createElementVNode("div",{class:t.normalizeClass(["time-line-event__details__info__header__event-name",i.nameClasses]),onClick:a[1]||(a[1]=r=>i.thumbnailClick(o.gameEvent.video_link,o.gameEvent.event_type_name))},[t.createElementVNode("img",{src:RLe,class:t.normalizeClass(`time-line-event__details__info__header__event-play ${[1,2].includes(o.gameEvent.event_type_id)?`time-line-event__details__info__header__event-play__${o.gameEvent.event_type_name}`:o.gameEvent.video_link!=="-"?"time-line-event__details__info__header__event-play__normal-video":""}`)},null,2),t.createTextVNode(" "+t.toDisplayString(o.gameEvent.category_id?o.gameEvent.event_type_id===5?o.gameEvent.category_name:o.gameEvent.event_type_name==="Gol"?o.gameEvent.event_type_name+" de "+o.gameEvent.team_name:o.gameEvent.event_type_name:o.gameEvent.comments),1)],2)],2),t.createElementVNode("div",dve,[t.createElementVNode("div",mve,t.toDisplayString(this.gameEvent.category_id?`${this.gameEvent.comments}`:""),1)])])]),t.createElementVNode("div",{class:t.normalizeClass(["time-line-event__minute",i.minuteClasses])},[t.createElementVNode("div",pve,[t.createElementVNode("div",hve,t.toDisplayString(o.gameEvent.minute)+"'",1),t.createElementVNode("div",gve,[t.createElementVNode("div",yve,[o.gameEvent.category_id==18?(t.openBlock(),t.createElementBlock("img",uve)):o.gameEvent.category_id==20?(t.openBlock(),t.createElementBlock("img",fve)):o.gameEvent.category_id==10?(t.openBlock(),t.createElementBlock("img",_ve)):o.gameEvent.category_id==21?(t.openBlock(),t.createElementBlock("img",bve)):o.gameEvent.category_id==27?(t.openBlock(),t.createElementBlock("img",wve)):o.gameEvent.category_id==17?(t.openBlock(),t.createElementBlock("img",Cve)):o.gameEvent.category_id==6&&o.gameEvent.event_type_id==1||o.gameEvent.category_id==5&&o.gameEvent.event_type_id==1||o.gameEvent.category_id==1&&o.gameEvent.event_type_id==1||o.gameEvent.category_id==2&&o.gameEvent.event_type_id==1||o.gameEvent.category_id==3&&o.gameEvent.event_type_id==1||o.gameEvent.category_id==7&&o.gameEvent.event_type_id==1||o.gameEvent.category_id==12&&o.gameEvent.event_type_id==1?(t.openBlock(),t.createElementBlock("img",kve)):o.gameEvent.category_id==4?(t.openBlock(),t.createElementBlock("img",Sve)):o.gameEvent.category_id==13||o.gameEvent.category_id==16?(t.openBlock(),t.createElementBlock("img",Eve)):o.gameEvent.category_id==30||o.gameEvent.category_id==31||o.gameEvent.category_id==32||o.gameEvent.category_id==33||o.gameEvent.category_id==34||o.gameEvent.category_id==35||o.gameEvent.category_id==36||o.gameEvent.category_id==37||o.gameEvent.category_id==38||o.gameEvent.category_id==39||o.gameEvent.category_id==40?(t.openBlock(),t.createElementBlock("img",Nve)):o.gameEvent.category_id==28?(t.openBlock(),t.createElementBlock("img",Bve)):o.gameEvent.category_id==26?(t.openBlock(),t.createElementBlock("img",$ve)):o.gameEvent.category_id==22?(t.openBlock(),t.createElementBlock("img",xve)):o.gameEvent.category_id==15||o.gameEvent.category_id==23?(t.openBlock(),t.createElementBlock("img",Vve)):o.gameEvent.category_id==0&&o.gameEvent.game_status_id==16||o.gameEvent.category_id==0&&o.gameEvent.game_status_id==18||o.gameEvent.category_id==0&&o.gameEvent.game_status_id==20||o.gameEvent.category_id==0&&o.gameEvent.game_status_id==22?(t.openBlock(),t.createElementBlock("img",Ive)):o.gameEvent.category_id==0&&o.gameEvent.game_status_id==13||o.gameEvent.category_id==0&&o.gameEvent.game_status_id==17||o.gameEvent.category_id==0&&o.gameEvent.game_status_id==19||o.gameEvent.category_id==0&&o.gameEvent.game_status_id==21||o.gameEvent.category_id==0&&o.gameEvent.game_status_id==23?(t.openBlock(),t.createElementBlock("img",Ave)):o.gameEvent.category_id==8?(t.openBlock(),t.createElementBlock("img",Ove)):o.gameEvent.category_id==9?(t.openBlock(),t.createElementBlock("img",Tve)):(t.openBlock(),t.createElementBlock("img",zve))])])])],2)],6)}const Pve=ii(eve,[["render",Fve],["__scopeId","data-v-d760bda0"]]),Rve={"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"},Dve={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 Xc=null;const Lve={name:"TimeLine",components:{Tooltip:aLe,TimeLineEvent:Pve},mixins:[nLe],props:{gameData:{type:Object,required:!0},timeLinePeriod:{type:String,default:"all"}},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.timeLineStatus="finished"),this.fillGameEvents(e.id))}},"$socket.connected":{immediate:!0,handler(e){e&&this.gameData.id&&this.subscribeToMXMChannel()}},gameEvents(e){e.length&&this.gameData.status!==1&&(this.timeLineStatus="live")}},methods:{async fillGameEvents(e){try{const a=await this.fetchGameEvents(e);a?(this.gameEvents=[...a],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(a){throw new Error(a)}},getGameEventClassAndSetIcon(e,a){return e.icon=a===0?"inicio_del_partido":Rve[`${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:a}}=await tk.get(`${this.gameEventsUrl}${e}`);return a}catch(a){throw new Error(a)}},subscribeToMXMChannel(){this.channelName=`mxm.game.${this.gameData.id}`,this.$socket.client.emit("subscribe",{channel:this.channelName}),this.isSubscribed=!0},checkGameEventsQueue(){this.gameEventsQueue.length&&this.gameEvents.push(...this.gameEventsQueue),this.areGameEventsFilled=!0},setUpResizeObserver(){if(window.ResizeObserver)Xc=new ResizeObserver(()=>{this.timeLineWidth=this.$refs.timeLine.clientWidth}),Xc.observe(this.$refs.timeLine);else throw new Error("Resize observer not supported!")},updateContainerHeight(e,a){const o=this.$refs[`gameEventDiv${a}`][0],n=this.$refs[`gameEventLine${a}`]?this.$refs[`gameEventLine${a}`][0]:null,s=e+12;o&&(o.style.height=`${s}px`),n&&(n.style.height=`${s}px`)},sortGameEvents(){this.gameEvents.sort((e,a)=>this.getMatchLapseMinutes(e.match_lapse)+Number(e.minute)-(this.getMatchLapseMinutes(a.match_lapse)+Number(a.minute))),this.gameEvents.forEach(e=>{this.gameEventsByPeriod[e.match_lapse===1?"firstHalf":"secondHalf"].push(e)})},getMatchLapseMinutes(e){let a=0;switch(e){case 1:a=0;break;case 2:a=45;break;case 3:a=90;break;case 4:a=105;break;case 5:a=120;break}return a},addGameEventFromChannel(e){this.areGameEventsFilled?(this.gameEvents.push(e),this.sortGameEvents()):this.gameEventsQueue.push(e)},deleteGameEventFromChannel(e){const a=this.gameEvents.findIndex(o=>o.play_id===e.play_id);a&&this.gameEvents.splice(a,1)},checkTimeLineStatus(){this.gameEvents.forEach(a=>{const o=Dve[a.game_status];o&&this.timeLineStatuses.push({...o,gameEvent:a})}),this.timeLineStatuses.sort((a,o)=>o.weight-a.weight);const e=this.timeLineStatuses[0];e&&(this.currentStatus=e,e.playTimer&&this.startTimer())},startTimer(){},getTeamLogoSrc(e="homeTeam"){const a=this.gameData[e].team_id;return sLe(a)},thumbnailClick(e){this.dataVideo.link=e,this.dataVideo.visible=!0}},mounted(){this.$nextTick(()=>{this.setUpResizeObserver()})},beforeUnmount(){Xc&&Xc.unobserve(this.$refs.timeLine)},sockets:{new_mxm(e,a){this.channelName===e&&this.addGameEventFromChannel(a)},update_mxm(e,a){this.channelName===e&&(this.deleteGameEventFromChannel(a),this.addGameEventFromChannel(a))},delete_mxm(e,a){this.channelName===e&&this.deleteGameEventFromChannel(a)}}},Ck=e=>(t.pushScopeId("data-v-00f10598"),e=e(),t.popScopeId(),e),vve={ref:"timeLine",class:"time-line"},jve={class:"time-line__header"},Mve={class:"time-line__header__dot"},Hve={class:"time-line__header__dot__home-team team-logo"},Uve=["src"],Gve={class:"time-line__header__dot__away-team team-logo"},Wve=["src"],qve={class:"time-line__game-events"},Jve={key:1,class:"start-line"},Xve=Ck(()=>t.createElementVNode("div",null,null,-1)),Zve=Ck(()=>t.createElementVNode("div",null,null,-1)),Yve=[Xve,Zve],Kve={key:1,class:"noEventText"},Qve={class:"tooltip-data"},eje=["src"];function tje(e,a,o,n,s,i){const r=t.resolveComponent("TimeLineEvent"),c=t.resolveComponent("Tooltip");return t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createElementVNode("div",vve,[t.createElementVNode("div",jve,[t.createElementVNode("div",Mve,[t.createElementVNode("div",Hve,[t.createElementVNode("img",{src:i.getTeamLogoSrc("homeTeam"),alt:""},null,8,Uve)]),t.createElementVNode("div",Gve,[t.createElementVNode("img",{src:i.getTeamLogoSrc("awayTeam"),alt:""},null,8,Wve)])])]),t.createElementVNode("div",qve,[o.gameData.status!==4||o.gameData.is_live?(t.openBlock(),t.createBlock(t.TransitionGroup,{key:0,name:s.transitionName,tag:"div"},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(i.gameEventsToShow,(h,d)=>(t.openBlock(),t.createElementBlock("div",{class:"time-line__game-events__grid",key:h.play_id},[t.createElementVNode("div",{ref_for:!0,ref:`gameEventDiv${d}`,class:t.normalizeClass(i.getGameEventClassAndSetIcon(h,d))},[t.createElementVNode("div",{class:t.normalizeClass(i.getEventContainerClass(h))},[t.createVNode(r,{"game-event":h,"is-mobile":i.isMobile,"time-line-width":s.timeLineWidth,width:i.gameEventWidth,onEventHeight:l=>i.updateContainerHeight(l,d),onPlayerChanged:a[0]||(a[0]=l=>e.$emit("player-changed",l)),onThumbnailClick:i.thumbnailClick},null,8,["game-event","is-mobile","time-line-width","width","onEventHeight","onThumbnailClick"])],2),d>0?(t.openBlock(),t.createElementBlock("div",{key:0,ref_for:!0,ref:`gameEventLine${d}`,class:"line"},null,512)):t.createCommentVNode("",!0),o.gameData.status===1&&d===i.gameEventsToShow.length-1?(t.openBlock(),t.createElementBlock("div",Jve,Yve)):t.createCommentVNode("",!0)],2)]))),128))]),_:1},8,["name"])):(t.openBlock(),t.createElementBlock("div",Kve," Aún no comienza el partido "))])],512),t.createVNode(c,{data:s.dataVideo},{default:t.withCtx(()=>[t.createElementVNode("div",Qve,[t.createElementVNode("div",null,[t.createElementVNode("video",{class:"tooltip-video",controls:"",autoplay:"",src:s.dataVideo.link,format:"video/mp4"},null,8,eje)])])]),_:1},8,["data"])],64)}const aje=ii(Lve,[["render",tje],["__scopeId","data-v-00f10598"]]),oje={class:"game-time-line__options"},nje={class:"game-time-line__timeline"},sje={__name:"GSC-GameTimeLine",props:{game:{type:Object,default:()=>({id:83103,seasonId:1836,status:1,dateTimeUTC:"2023-10-01T22:20:00Z",is_live:0,homeTeam:{logo:"https://az755631.vo.msecnd.net/teams-80/18.png",team_id:12,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:13,provisional_logo:"https://az755631.vo.msecnd.net/teams-provisional/1.png",colloquial_name:"Chivas",acronym:"CHI",team_name:"Guadalajara"}})}},setup(e){tk.defaults.headers.common.Authorization="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MCwibmFtZSI6IlVzdWFyaW8gRnJlZSIsInVzZXJuYW1lIjoiZnJlZUBnb2xzdGF0cy5jb20iLCJlbWFpbCI6ImZyZWVAZ29sc3RhdHMuY29tIiwiaWF0IjoxNjA2NzU4Nzk1LCJleHAiOjE2MzgyOTQ3OTV9.kPNmP7yDtk38cAXrUyc7OHRh6J25VFqy-XUNzbK-4YE";const a=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"}),o=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 n=null;const s=t.ref(["Todo","1er tiempo","2do tiempo"]),i=t.ref("Todo"),r=t.ref({}),c=t.ref(null),h=t.ref(0),d=t.computed(()=>{let g="all";return i.value==="1er tiempo"||i.value==="1er"?g="firstHalf":(i.value==="2do tiempo"||i.value==="2do")&&(g="secondHalf"),g}),l=t.computed(()=>h.value<500);function p(g){i.value=g}function y(g){r.value=g}function m(){if(window.ResizeObserver)n=new ResizeObserver(()=>{h.value=c.value.clientWidth}),n.observe(c.value);else throw new Error("Resize observer not supported!")}return t.onMounted(()=>{m()}),t.onBeforeUnmount(()=>{n&&n.unobserve(c.value)}),(g,u)=>(t.openBlock(),t.createElementBlock("div",{ref_key:"gameTimeLine",ref:c,class:"game-time-line"},[t.createElementVNode("div",oje,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(s.value,f=>(t.openBlock(),t.createElementBlock("div",{key:f,class:"game-time-line__options__option"},[t.createVNode(PRe,t.mergeProps(h.value<390?o.value:a.value,{text:f=="Todo"?f:h.value<390?f.substring(0,3):f,"is-active":i.value===f,onClick:_=>p(f)}),null,16,["text","is-active","onClick"])]))),128))]),t.createElementVNode("div",nje,[t.createVNode(aje,{"game-data":e.game,"time-line-period":d.value,"is-mobile":l.value,onGameEventsByPeriodFilled:y},null,8,["game-data","time-line-period","is-mobile"])])],512))}},ije=ii(sje,[["__scopeId","data-v-09c2f83c"]]);function rje(e){const a=t.ref({width:0,height:0});function o(){const n=e.value.getBoundingClientRect();a.value.width=n.width,a.value.height=n.height}return t.onMounted(()=>{o(),window.addEventListener("resize",o)}),t.onUnmounted(()=>{window.removeEventListener("resize",o)}),{elementSize:a}}const lje=(e,a)=>{const o=e.__vccOpts||e;for(const[n,s]of a)o[n]=s;return o},u0={name:"ScrollableContainer",props:{backgroundColor:{type:String,default:"#0D1D29"},pxScroll:{type:Number,default:100},arrows:{type:Boolean,default:!0},arrowsHideOnNoScroll:{type:Boolean,default:!1},arrowsScrollHide:{type:Boolean,default:!1},arrowsColor:{type:String,default:"#CBEE6B"},arrowsHeight:{type:Number,default:15},arrowsWidth:{type:Number,default:15},arrowsPadding:{type:Number,default:5},arrowsMargin:{type:Number,default:10},arrowsRadius:{type:String,default:"0%"},arrowsBorder:{type:String,default:"none"},arrowsBackground:{type:String,default:"#0D1D29"},arrowsContainerBgL:{type:String,default:"#0D1D29"},arrowsContainerBgR:{type:String,default:"#0D1D29"},scrollColor:{type:String,default:"#c3e569"},arrowsPosition:{type:String,default:"relative"},height:{type:String,default:"100%"}},data(){return{showLeftArrow:!1,showRightArrow:!0,intervalid1:""}},mounted(){this.getScroll(),this.arrowsHideOnNoScroll&&window.addEventListener("resize",this.resizeSlider),this.arrowsHideOnNoScroll&&this.listenerLoad()},beforeUnmount(){this.arrowsHideOnNoScroll&&window.removeEventListener("resize",this.resizeSlider),this.arrowsHideOnNoScroll&&clearInterval(this.intervalid1)},computed:{getViewBox(){return`-2 0 ${this.arrowsWidth} ${this.arrowsHeight}`},hideShowLeftArrow(){let e="";return this.arrowsPosition=="absolute"?e="leftAbsolute":e="leftRelative",this.arrowsScrollHide?this.showLeftArrow?e+=" showArrowSlide":e+=" hideArrowSlide":e+=" showArrowSlide",e},hideShowRightArrow(){let e="";return this.arrowsPosition=="absolute"?e="rightAbsolute":e="rightRelative",this.arrowsScrollHide?this.showRightArrow?e+=" showArrowSlide":e+=" hideArrowSlide":e+=" showArrowSlide",e}},methods:{scrollLeft(){this.$refs.content.scrollLeft-=this.pxScroll},scrollRight(){this.$refs.content.scrollLeft+=this.pxScroll},getScroll(){let e=0;this.arrowsPosition=="relative"?e=this.$refs.content.scrollWidth-this.$el.clientWidth+this.arrowsMargin*2+this.arrowsWidth*4:e=this.$refs.content.scrollWidth-this.$el.clientWidth,this.$refs.content.scrollLeft==0?this.showLeftArrow=!1:this.showLeftArrow=!0,e>0&&(this.$refs.content.scrollLeft==e?this.showRightArrow=!1:this.showRightArrow=!0),this.arrowsHideOnNoScroll&&this.$refs.content.clientWidth===this.$refs.content.scrollWidth&&(this.showRightArrow=!1)},resizeSlider(){this.getScroll();let e;clearTimeout(e),e=setTimeout(this.getScroll,1e3)},listenerLoad(){this.intervalid1=setInterval((function(){var e=this.$el.clientWidth,a=this.$refs.content.scrollWidth;a>0&&e>0&&(a>e?(this.showRightArrow=!0,clearInterval(this.intervalid1)):clearInterval(this.intervalid1))}).bind(this),3e3)}}},kk=()=>{t.useCssVars(e=>({"42d3dba6":e.backgroundColor,"4de5d2cf":e.height,"67bafa7b":e.arrowsPosition,"61e1032e":e.arrowsPadding+"px","79a4ac00":e.arrowsBackground,"6b8355c6":e.arrowsHeight*2+"px","29a58368":e.arrowsWidth*2+"px","3622fa64":e.arrowsRadius,"1ba101fe":e.arrowsBorder,"0bafb5e6":e.arrowsMargin+"px","423a44b8":e.arrowsContainerBgL,"423a44be":e.arrowsContainerBgR,"10b117ee":e.scrollColor}))},Sk=u0.setup;u0.setup=Sk?(e,a)=>(kk(),Sk(e,a)):kk;const cje={ref:"gscScrollableContainer",class:"scrollable-container"},dje={class:"scrollable-arrows"},mje=["width","height","viewBox"],pje=["stroke"],hje={class:"scrollable-wrapper"},gje={class:"scrollable-arrows"},yje=["width","height","viewBox"],uje=["stroke"];function fje(e,a,o,n,s,i){return t.openBlock(),t.createElementBlock("div",cje,[o.arrows?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(["arrows-container",i.hideShowLeftArrow]),onClick:a[0]||(a[0]=(...r)=>i.scrollLeft&&i.scrollLeft(...r))},[t.createElementVNode("div",dje,[(t.openBlock(),t.createElementBlock("svg",{width:o.arrowsWidth,height:o.arrowsHeight,viewBox:i.getViewBox,fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t.createElementVNode("path",{d:"M6.36523 13.788L1.10146 8.52429C0.479824 7.90265 0.479824 6.88541 1.10147 6.26377L6.36523 1",stroke:o.arrowsColor},null,8,pje)],8,mje))])],2)):t.createCommentVNode("",!0),t.createElementVNode("div",{class:"scrollable-content scrollable-content-slider",ref:"content",onScroll:a[1]||(a[1]=(...r)=>i.getScroll&&i.getScroll(...r))},[t.createElementVNode("div",hje,[t.renderSlot(e.$slots,"default",{},void 0,!0)])],544),o.arrows?(t.openBlock(),t.createElementBlock("div",{key:1,id:"arrows-container-right",class:t.normalizeClass(["arrows-container",i.hideShowRightArrow]),onClick:a[2]||(a[2]=(...r)=>i.scrollRight&&i.scrollRight(...r))},[t.createElementVNode("div",gje,[(t.openBlock(),t.createElementBlock("svg",{width:o.arrowsWidth,height:o.arrowsHeight,viewBox:i.getViewBox,fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t.createElementVNode("path",{d:"M0.634765 1.21195L5.89853 6.47571C6.52018 7.09735 6.52018 8.11459 5.89853 8.73623L0.634766 14",stroke:o.arrowsColor},null,8,uje)],8,yje))])],2)):t.createCommentVNode("",!0)],512)}const _je=lje(u0,[["render",fje],["__scopeId","data-v-b548a08d"]]),bje=(e,a)=>{const o=e.__vccOpts||e;for(const[n,s]of a)o[n]=s;return o},f0={components:{GSCSlider:_je},props:{arrow:{type:Boolean,required:!0},buttons:{type:Array,required:!0},width:{type:String,default:"300px"},height:{type:String,default:"80px"},fontSize:{type:String,default:"16px"},colorFont:{type:String,default:"#ffffff"},backgroundOptionActive:{type:String,default:"#0d1d29"},colorOptionActive:{type:String,default:"#cbee6b"},colorOptionDisable:{type:String,default:"gray"},backgroundOptionDisable:{type:String,default:"#0d1d29"},fontFamily:{type:String,default:"Poppins-Semibold"},borderWidth:{type:String,default:"3px"},borderRadius:{type:String,default:"0px"},selectedOption:{type:String,default:""},type:{type:Number,default:0},borderWidthContainer:{type:String,default:"1px"},background:{type:String,default:"#0d1d29"},borderColorContainer:{type:String,default:"#505355"},pxScroll:{type:Number,default:100},scrollColor:{type:String,default:"#c3e569"},arrowsPosition:{type:String,default:"relative"},arrowsScrollHide:{type:Boolean,default:!1},arrowsBackground:{type:String,default:"#0D1D29"},arrowsContainerBgL:{type:String,default:"#0D1D29"},arrowsContainerBgR:{type:String,default:"#0D1D29"},arrowsMargin:{type:Number,default:10},arrowsRadius:{type:String,default:"0%"},arrowsBorder:{type:String,default:"none"}},setup(){const e=t.ref("myDivRef"),{elementSize:a}=rje(e);return{myDivRef:e,elementSize:a}},methods:{clickEmitEvent(e){this.$emit("input",e)},customGrid(e){var a={};return e.width>768?a={fontSize:"16px"}:e.width>480?a={fontSize:"14px"}:a={fontSize:"12px"},a}}},Ek=()=>{t.useCssVars(e=>({cff4a118:e.fontSize,"42aab7f6":e.borderWidth,d29bcbd2:e.fontFamily,df6c5a9c:e.background,"09b32862":e.borderRadius,"8c0d6daa":e.borderWidthContainer,e8a86fa4:e.borderColorContainer,"179494da":e.colorOptionActive,cea5647c:e.width}))},Nk=f0.setup;f0.setup=Nk?(e,a)=>(Ek(),Nk(e,a)):Ek;const wje={ref:"myDivRef"},Cje={key:0,class:"gs-switch-container"},kje=["onClick"],Sje={key:1,class:"gs-switch-container-type"},Eje=["onClick"],Nje={key:2,class:"gs-switch-container-carousel"},Bje=["onClick"];function $je(e,a,o,n,s,i){const r=t.resolveComponent("GSCSlider");return t.openBlock(),t.createElementBlock("div",wje,[o.type==0?(t.openBlock(),t.createElementBlock("div",Cje,[t.createElementVNode("div",{class:"gs-switch-container__control",style:t.normalizeStyle([i.customGrid(n.elementSize)])},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.buttons,(c,h)=>(t.openBlock(),t.createElementBlock("div",{class:"gs-switch-container__control__button-option",style:t.normalizeStyle([{height:o.height},o.selectedOption==c?{borderColor:o.colorOptionActive,color:o.colorFont+"!important",background:o.backgroundOptionActive}:{borderColor:o.colorOptionDisable,color:"grey !important"}]),key:h,onClick:d=>(o.selectedOption=c,i.clickEmitEvent(c))},t.toDisplayString(c),13,kje))),128))],4),t.renderSlot(e.$slots,o.selectedOption,{},void 0,!0)])):t.createCommentVNode("",!0),o.type==1?(t.openBlock(),t.createElementBlock("div",Sje,[t.createElementVNode("div",{class:"gs-switch-container-type__control",style:t.normalizeStyle([i.customGrid(n.elementSize)])},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.buttons,(c,h)=>(t.openBlock(),t.createElementBlock("div",{class:"gs-switch-container-type__control__button-option-type",style:t.normalizeStyle([{height:o.height},o.selectedOption==c?{borderColor:o.colorOptionActive,color:o.colorFont+"!important",background:o.backgroundOptionActive}:{borderColor:o.colorOptionDisable,borderWidth:"0px",borderWidth:"0px !important",color:"grey !important",background:o.backgroundOptionDisable}]),key:h,onClick:d=>(o.selectedOption=c,i.clickEmitEvent(c))},t.toDisplayString(c),13,Eje))),128))],4)])):t.createCommentVNode("",!0),o.type==2?(t.openBlock(),t.createElementBlock("div",Nje,[t.createVNode(r,{arrows:o.arrow,"background-color":o.background,"px-scroll":o.pxScroll,"scroll-color":o.scrollColor,"arrows-position":o.arrowsPosition,arrowsScrollHide:o.arrowsScrollHide,"arrows-background":o.arrowsBackground,"arrows-container-bg-l":o.arrowsContainerBgL,"arrows-container-bg-r":o.arrowsContainerBgR,"arrows-margin":o.arrowsMargin,"arrows-radius":o.arrowsRadius,"arrows-border":o.arrowsBorder},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.buttons,(c,h)=>(t.openBlock(),t.createElementBlock("div",{class:"button-option-multi",style:t.normalizeStyle([{height:o.height},o.selectedOption==c?{borderColor:o.colorOptionActive,color:o.colorFont+"!important",background:o.backgroundOptionActive}:{borderColor:o.colorOptionDisable,color:"grey !important"}]),key:h,onClick:d=>(o.selectedOption=c,i.clickEmitEvent(c))},t.toDisplayString(c),13,Bje))),128))]),_:1},8,["arrows","background-color","px-scroll","scroll-color","arrows-position","arrowsScrollHide","arrows-background","arrows-container-bg-l","arrows-container-bg-r","arrows-margin","arrows-radius","arrows-border"])])):t.createCommentVNode("",!0)],512)}const Bk=bje(f0,[["render",$je],["__scopeId","data-v-8a86dfaf"]]),vHe="",xje={class:"game-data__header"},Vje={class:"game-data__header__tournament-season-dropdown"},Ije={class:"game-data__header__teams-carousel"},Aje={class:"game-data__body"},Oje={class:"game-data__body__menu"},Tje={class:"game-data__body__menu__contmenuswitch"};Li.defaults.headers.common.Authorization="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MCwibmFtZSI6IlVzdWFyaW8gRnJlZSIsInVzZXJuYW1lIjoiZnJlZUBnb2xzdGF0cy5jb20iLCJlbWFpbCI6ImZyZWVAZ29sc3RhdHMuY29tIiwiaWF0IjoxNjA2NzU4Nzk1LCJleHAiOjE2MzgyOTQ3OTV9.kPNmP7yDtk38cAXrUyc7OHRh6J25VFqy-XUNzbK-4YE";const zje=t.defineComponent({name:"TemplateVideos",components:{StatisticsMain:IT,GSCGameTimeLine:ije,GscSwitchComponent:Bk,GSCLineupsMain:MX,GSCDatosGSMain:Dse,GSCVideoGame:due,GSCSummaryMain:zRe}}),Fje=Fe(Object.assign(zje,{props:{currentSeasonId:{type:Number,default:0},defaultGameId:{type:Number,default:0,validator(e){return!Number.isNaN(e)&&e>=0}},sortCalendar:{type:Boolean,default:!0}},emits:["openmedia","change-season-id"],setup(e,{emit:a}){const o=e,n=t.ref({season:[]}),s=t.ref({}),i=t.ref({}),r=t.ref(!0),c=t.ref("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MCwibmFtZSI6IlVzdWFyaW8gRnJlZSIsInVzZXJuYW1lIjoiZnJlZUBnb2xzdGF0cy5jb20iLCJlbWFpbCI6ImZyZWVAZ29sc3RhdHMuY29tIiwiaWF0IjoxNjA2NzU4Nzk1LCJleHAiOjE2MzgyOTQ3OTV9.kPNmP7yDtk38cAXrUyc7OHRh6J25VFqy-XUNzbK-4YE"),h=t.ref([{componentName:"GSCSummaryMain",name:"Resumen",id:1},{componentName:"GSCVideoGame",name:"Video",id:2},{componentName:"GSCDatosGSMain",name:"Datos Golstats",id:3},{componentName:"StatisticsMain",name:"Estadísticas",id:4},{componentName:"GSCGameTimeLine",name:"Minuto a Minuto",id:5},{componentName:"GSCLineupsMain",name:"Alineaciones",id:6}]);let d=null;const l=t.ref(null),p=t.ref(0),y=t.ref(h.value[0]);let m=t.ref("");const g=t.computed(()=>{const B=[];return s.value&&s.value.id&&(B.push({id:s.value.id,name:s.value.name,type:s.value.type}),s.value.related_seasons&&s.value.related_seasons.forEach(z=>{B.push({id:z.id,type:z.type})})),B});function u(){d=new ResizeObserver(B=>{for(const z of B)p.value=z.contentRect.width}),d.observe(l.value)}const f=t.computed(()=>{let B={};return i.value&&i.value.game_id&&(B={gameId:i.value.game_id,id:i.value.game_id,seasonId:i.value.season_id,status:i.value.game_status,game_status:i.value.game_status==0?4:i.value.game_status,dateTimeUTC:i.value.date_time_utc,homeTeam:i.value.home_team,awayTeam:i.value.visiting_team,is_live:i.value.is_live}),B});function _(B){n.value=B,B.is_captured===0?r.value=!1:r.value=!0,n.value.id!==B.id&&(n.value=B)}function k(B){a("openmedia",B)}function w(B){V(B),B=="Estadísticas"&&(m.value="Comparativa")}function b(){m.value=""}function E(B){s.value.id!==B.id&&(s.value=B,a("change-season-id",B.id))}const x=t.computed(()=>h.value.map(B=>{if(r.value)return B.name;if(B.id!==5&&B.id!==6)return B.name}).filter(B=>B!=null));function V(B){y.value=h.value.find(z=>z.name===B)||h.value[0]}t.onMounted(()=>{u()});function $(B){i.value=B}return(B,z)=>(t.openBlock(),t.createElementBlock("div",{class:"game-data",ref_key:"gamedata",ref:l},[t.createElementVNode("div",xje,[t.createElementVNode("div",Vje,[t.createVNode(t.unref(f7),{"current-season-id":e.currentSeasonId,onInput:_},null,8,["current-season-id"]),t.createVNode(t.unref(v7),{"current-season-id":e.currentSeasonId,seasons:n.value.seasons,onInput:E},null,8,["current-season-id","seasons"])]),t.createElementVNode("div",Ije,[t.createVNode(t.unref(XN),{token:c.value,"await-for-seasons":"",seasons:g.value,"is-pagination-visible":!1,"are-games-carousel-type":"",onChangeGameCarousel:$,"default-game-id":o.defaultGameId,"sort-calendar":o.sortCalendar},null,8,["token","seasons","default-game-id","sort-calendar"])])]),t.createElementVNode("div",Aje,[t.createElementVNode("div",Oje,[t.createElementVNode("div",Tje,[t.createVNode(t.unref(Bk),{type:2,buttons:x.value,"font-family":"Poppins-Regular","font-size":"16px",width:p.value<400||p.value<700?"max-content":p.value<840||p.value<1050?"155px":"165px","selected-option":y.value.name,borderWidth:"1px",arrow:!1,height:"30px",onInput:V},null,8,["buttons","width","selected-option"])])]),(t.openBlock(),t.createBlock(t.resolveDynamicComponent(y.value.componentName),{game:f.value,subsection:t.unref(m),seasonSelected:s.value,showLineups:r.value,onResetSubsection:b,onOpenmedia:k,onChangeToTab:w},null,40,["game","subsection","seasonSelected","showLineups"]))])],512))}}),[["__scopeId","data-v-96da925c"]]);async function ft({url:e,options:a={},retries:o=3}){return await Li.get(e,a).then(n=>n).catch(n=>o>0?ft({url:e,options:a,retries:o-1}):n)}async function $k({seasonId:e},a=!0){try{const o={url:`https://b5lrr2nc0h.execute-api.us-west-2.amazonaws.com/prod/statisticsLeagueBySeason/${e}`};a&&(o.url=`https://golstats-microservices.s3-us-west-2.amazonaws.com/statsLeagueBySeason-${e}.json`,o.retries=1);const{data:{data:n}}=await ft(o);return n}catch(o){if(a)return $k({seasonId:e},!1);throw new Error(o)}}async function Pje({seasonId:e}){try{return(await ft({url:`https://iwxfzq6e2h.execute-api.us-west-2.amazonaws.com/prod/v2/statisticsLeagueBySeason/${e}`})).data.data}catch(a){return Promise.reject(a)}}async function Rje({seasonId:e}){try{return(await ft({url:`https://sqf4rkvoge.execute-api.us-west-2.amazonaws.com/prod/v3/statisticsGroupedBySeason/${e}`})).data.data}catch(a){return Promise.reject(a)}}function Dje(e,a,o,n,s,i,r=!1){const c=o.map(h=>h===1?2:h===2?1:3);return e.filter(h=>{const d=i&&h[s.teamId]?h[s.teamId]!==i:!1,l=a===1?2:1;return(r||n.includes(h[s.gameId]))&&(!a||(d?l:a)===h[s.playingAs])&&(o.includes(h[s.matchResult])&&h[s.teamId]===i||c.includes(h[s.matchResult])&&h[s.teamId]!==i)})}function xk(e,a,o,n,s){return a.length===2&&o.length===3&&n.length===6?e:e.filter(i=>a.includes(i[s.playingAs])&&o.includes(i[s.matchResult])&&n.includes(i[s.section]))}async function Vk({seasonId:e}){try{const a=`https://8tvo5bp9ai.execute-api.us-west-2.amazonaws.com/prod/gamesBySeason/${e}`;return(await ft({url:a})).data}catch(a){return Promise.reject(a)}}async function Lje({seasonId:e,gameId:a}){try{const o=`https://iwxfzq6e2h.execute-api.us-west-2.amazonaws.com/prod/v2/statisticsLeagueBySeason/${e}/games/${a}`,{data:n}=await ft({url:o});return n}catch(o){return Promise.reject(o)}}async function vje({gameId:e}){try{const a=`https://2uj7ojhmt5.execute-api.us-west-2.amazonaws.com/prod/V2/statisticsLive/${e}`;return(await ft({url:a})).data.data}catch(a){return Promise.reject(a)}}async function jje({gameId:e}){try{const a=`https://55sbpmq0f5.execute-api.us-west-2.amazonaws.com/prod/specialMentions/${e}`;return(await ft({url:a})).data.data||[]}catch(a){return Promise.reject(a)}}const Mje=["categoryId","matchLapse","section","matchResult","playingAs","total"];let _0=null;function Ik(){return _0||(_0=Vi(Mje)),_0}async function Hje(e){try{const a=`https://d2oco6mqmc.execute-api.us-west-2.amazonaws.com/prod/teamsBySeason/${e.seasonId}`;return(await ft({url:a})).data}catch(a){return Promise.reject(a)}}async function Ak({seasonId:e,teamId:a}){try{return await ft({url:`https://a4dcb6avog.execute-api.us-west-2.amazonaws.com/prod/v2/statisticsTeamBySeason/${e}/${a}`})}catch(o){return Promise.reject(o)}}async function Uje(e){try{const a=`https://yjeig444bb.execute-api.us-west-2.amazonaws.com/prod/teamsBySeason/${e.seasonId}`;return await ft({url:a})}catch(a){return Promise.reject(a)}}async function Gje(e){try{return await ft({url:`https://nckawv8v3b.execute-api.us-west-2.amazonaws.com/prod/v2/statisticsByGame/${e.gameId}`})}catch(a){return Promise.reject(a)}}const Wje={leagueGeneral:{namespaced:!0,state:{seasonPlays:[],currentSeasonGames:[],currentSeasonTeams:[],selectedRound:1,booleanAreLiveGames:!1,booleanIsLiveGamesModalOpen:!1},getters:{seasonPlays:e=>e.seasonPlays,filteredPlaysStack(e,a,o,n){return Dje(e.seasonPlays,n["filterGeneral/getPlayingAs"],n["filterGeneral/getResults"],n["filterGeneral/getSelectedGamesIds"],Ik(),n["teamsGeneral/team"].team_id,!0)},nextGamesSchedule(e){const a=e.currentSeasonGames.reduce((o,n)=>{const s={...n};return s.home_team=e.currentSeasonTeams.find(i=>i.team_id===n.home_team),s.visiting_team=e.currentSeasonTeams.find(i=>i.team_id===n.visiting_team),o[n.matchday_abbreviation]?o[n.matchday_abbreviation][n.game_status===3?"canceled":n.date]?o[n.matchday_abbreviation][n.game_status===3?"canceled":n.date].push(s):o[n.matchday_abbreviation][n.game_status===3?"canceled":n.date]=[s]:o[n.matchday_abbreviation]={[n.game_status===3?"canceled":n.date]:[s]},o},{});for(let[o,n]of Object.entries(a))a[o]=Object.entries(n).map(([s,i])=>({date:s,games:i})),a[o].sort((s,i)=>s.date<i.date?-1:s.date>i.date?1:0);return a},matchdaysDates(e,a){let o=[];if(a.nextGamesSchedule){let n=Object.keys(a.nextGamesSchedule);for(let s of n){let i=Number(s.replace("M","")),r=a.nextGamesSchedule[s].map(c=>({matchday:i,date:new Date(c.date)}));o=o.concat(r)}}return o},closestMatchDay(e,a){let o=new Date,n=0,s=-new Date(0,0,0).valueOf(),i=a.matchdaysDates,r=i.length;for(let c=0;c<i.length;c++)n=Math.abs(i[c].date-o),n<s&&(r=c,s=n);return i[r]?i[r].matchday:1}},mutations:{setBooleanIsLiveGamesModalOpen(e,a){e.booleanIsLiveGamesModalOpen=a},setBooleanAreLiveGames(e,a){e.booleanAreLiveGames=a},updateSeasonPlays(e,a){e.seasonPlays=a},updateCurrentSeasonTeams(e,a){e.currentSeasonTeams=a},updateCurrentSeasonGames(e,a){e.currentSeasonGames=a},updateSelectedRound(e,a){e.selectedRound=a}},actions:{async getSeasonPlays({commit:e,rootGetters:a},o=!1){try{const n=await $k({seasonId:a["filterGeneral/getSeasonId"]});if(o)return n;e("updateSeasonPlays",n)}catch(n){return Promise.reject(n)}},async getCurrentSeasonGames({commit:e,rootGetters:a}){try{const o=await Vk({seasonId:a["loginGeneral/seasonId"]});e("updateCurrentSeasonGames",o)}catch(o){return Promise.reject(o)}},async getCurrentSeasonTeams({commit:e,rootGetters:a}){try{const o=await Hje({seasonId:a["loginGeneral/seasonId"]});e("updateCurrentSeasonTeams",o.teams)}catch(o){return Promise.reject(o)}},async isDataFilled({state:e,dispatch:a,commit:o}){try{if(e.currentSeasonGames.length>0&&e.currentSeasonTeams.length>0)return o("setIsSectionLoading",!1,{root:!0}),!0;const n=[void 0,void 0];return e.currentSeasonGames.length===0&&(n[0]=a("getCurrentSeasonGames")),e.currentSeasonTeams.length===0&&(n[1]=a("getCurrentSeasonTeams")),await Promise.all(n),!1}catch(n){throw new Error(n)}}}}};async function qje({filter:e}){try{const a=`https://n7ielynjxk.execute-api.us-east-2.amazonaws.com/qa/filters?filters=${e}`,{data:o}=await ft({url:a});return o}catch(a){return Promise.reject(a)}}const Jje=["categoryId","teamId","matchResult","playingAs","matchLapse","section","total"];let b0=null;function Xje(){return b0||(b0=Vi(Jje)),b0}class Zc{constructor(){De(this,"maximumLiveSection",1);De(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:[]});De(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(a){a>this.maximumLiveSection&&(this.maximumLiveSection=a)}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(a,o,n){n&&(this.setMaximumLiveSection(a),this.accomplished.totalLive+=o,this.accomplished.totalsLiveTrendLive.sections[a-1]+=o,this.increaseTrendLiveAccumulatedByOne(this.accomplished.totalsLiveTrendLive,a,o)),this.accomplished.totalPostGame+=o,this.accomplished.avgPostGameTrendLive.sections[a-1]+=o,this.increaseTrendLiveAccumulatedByOne(this.accomplished.avgPostGameTrendLive,a,o)}increaseReceivedByOne(a,o,n){n&&(this.setMaximumLiveSection(a),this.received.totalLive+=o,this.received.totalsLiveTrendLive.sections[a-1]+=o,this.increaseTrendLiveAccumulatedByOne(this.received.totalsLiveTrendLive,a,o)),this.received.totalPostGame+=o,this.received.avgPostGameTrendLive.sections[a-1]+=o,this.increaseTrendLiveAccumulatedByOne(this.received.avgPostGameTrendLive,a,o)}increaseTrendLiveAccumulatedByOne(a,o,n){for(let s=o-1;s<a.accumulated.length;s++)a.accumulated[s]+=n}decreaseAccomplishedLiveByOne(a,o){this.accomplished.totalLive>0&&(this.accomplished.totalLive-=o),this.accomplished.totalsLiveTrendLive.sections[a-1]>0&&(this.accomplished.totalsLiveTrendLive.sections[a-1]-=o,this.decreaseTotalsLiveTrendLiveAccumulatedByOne(this.accomplished.totalsLiveTrendLive,a,o))}decreaseReceivedLiveByOne(a,o){this.received.totalLive>0&&(this.received.totalLive-=o),this.received.totalsLiveTrendLive.sections[a-1]>0&&(this.received.totalsLiveTrendLive.sections[a-1]-=o,this.decreaseTotalsLiveTrendLiveAccumulatedByOne(this.received.totalsLiveTrendLive,a,o))}decreaseTotalsLiveTrendLiveAccumulatedByOne(a,o,n){for(let s=a.accumulated.length-1;s>=o-1;s--)a.accumulated[s]-=n}calculateAvg(a){a&&(this.accomplished.avgPostGame=this.accomplished.totalPostGame/a,this.received.avgPostGame=this.received.totalPostGame/a,this.accomplished.avgPostGameTrendLive.sections=this.getAvgPostGameTrendLiveAvg(this.accomplished.avgPostGameTrendLive.sections,a),this.accomplished.avgPostGameTrendLive.accumulated=this.getAvgPostGameTrendLiveAvg(this.accomplished.avgPostGameTrendLive.accumulated,a),this.received.avgPostGameTrendLive.sections=this.getAvgPostGameTrendLiveAvg(this.received.avgPostGameTrendLive.sections,a),this.received.avgPostGameTrendLive.accumulated=this.getAvgPostGameTrendLiveAvg(this.received.avgPostGameTrendLive.accumulated,a))}getAvgPostGameTrendLiveAvg(a,o){return a.map(n=>n/o)}calculateRanking(a,o,n,s,i,r,c,h){let d=[];s===3&&a&&a.length&&(n.playingAs.length!==2||n.matchResult.length!==3)?d=Array.from(a.reduce((p,y)=>{const m=y[o.playingAs]===1,g=m?"1":"2",u=p.get(y[o.gameId]);if(u)u[g]?u[g].arrayPlays.push(y):u[g]={numberTeamId:y[o.teamId],arrayPlays:[y]};else{const f={numberMatchResult:y[o.matchResult]};m&&(f[1]={numberTeamId:y[o.teamId],arrayPlays:[y]}),p.set(y[o.gameId],f)}return p},new Map).values()).reduce((p,y)=>{const m=n.playingAs.length===2?"both":n.playingAs[0].toString();return(m==="both"&&(y[1].numberTeamId===n.teamId||y[2].numberTeamId===n.teamId)||m!=="both"&&y[m].numberTeamId===n.teamId)&&n.matchResult.includes(y.numberMatchResult)&&p.push(...y[1].arrayPlays,...y[2].arrayPlays),p},[]).filter(p=>n.sections.includes(p[o.section])):(d=a?[...a]:[],c&&a&&(d=a.filter(l=>n.playingAs.includes(l[o.playingAs])&&n.matchResult.includes(l[o.matchResult])&&n.sections.includes(l[o.section])))),this.setTeamRanking(d,s,o,n.teamId,r,"accomplished",h)}setTeamRanking(a,o,n,s,i,r,c){let h=null,d=null;o===3&&(h=new Map,d={},a.forEach(y=>{const m=h.get(y[n.gameId]);m?m[y[n.teamId.toString()]]?m[y[n.teamId.toString()]]+=y[n.total]:m[y[n.teamId.toString()]]=y[n.total]:h.set(y[n.gameId],{[y[n.teamId.toString()]]:y[n.total]})}),Array.from(h.values()).forEach(y=>{const[m,g]=Object.keys(y).map(f=>f),u=y[m]+y[g];this.addPassesAvgByTeam(d,m,u?y[m]/u:0),this.addPassesAvgByTeam(d,g,u?y[g]/u:0)}));const l=i.sort((y,m)=>y.team_id-m.team_id).map(y=>{if(o===3){const m=d[y.team_id.toString()];return{teamId:y.team_id,points:m?m.numberTotalPassesAvg/m.numberGamesCount:0,total:m?m.numberTotalPassesAvg:0}}else{const m=a.reduce((g,u)=>u[n.teamId]===y.team_id&&o===u[n.categoryId]?g+u[n.total]:g,0);return{teamId:y.team_id,points:y[`${c}FilterGames`]?m/y[`${c}FilterGames`]:0,total:m}}}).sort((y,m)=>m.points-y.points);this.accomplished.arrayRankings=l;const p=l.findIndex(y=>y.teamId===s);o===3&&(this.accomplished.avgPreGame=l[p].points),this[r].ranking=p+1,this[r].leader=l[0]}addPassesAvgByTeam(a,o,n){a[o]?(a[o].numberGamesCount+=1,a[o].numberTotalPassesAvg+=n):a[o]={numberGamesCount:1,numberTotalPassesAvg:n}}}class de{constructor(a,o,n,s,i,r,c,h,d,l){De(this,"id","");De(this,"generalId",0);De(this,"name","");De(this,"names",{"0-0":"","1-1":"","0-1":"","1-0":""});De(this,"mentions",{"0-0":"","1-1":"","0-1":"","1-0":""});De(this,"accomplishedCategoryIds",[]);De(this,"receivedCategoryIds",[]);De(this,"generalCategoriesIds",{accomplished:0,received:0});De(this,"specialMention","");De(this,"homeTeam",new Zc);De(this,"visitingTeam",new Zc);De(this,"isLeagueDataCalculated",!1);De(this,"leagueAccomplishedMax",0);De(this,"leagueReceivedMax",0);De(this,"leagueAccomplishedAvg",0);De(this,"leagueReceivedAvg",0);De(this,"leagueAccomplishedAccumulator",0);De(this,"leagueReceivedAccumulator",0);De(this,"homeTeamType","homeTeam");De(this,"visitingTeamType","visitingTeam");De(this,"betOnly",!1);De(this,"isPercent",!1);this.id=`${n.accomplished}-${n.received}`,this.accomplishedCategoryIds=a||[],this.receivedCategoryIds=o||[],this.generalCategoriesIds=n||{accomplished:0,received:0},this.name=s,this.names["0-0"]=s||"",this.names["1-1"]=i||"",this.names["0-1"]=r||"",this.names["1-0"]=c||"",this.generalId=h||0,this.betOnly=d||!1,this.isPercent=l||!1}addLeaguePlays(a,o,n){a.length===0||!n||this.isLeagueDataCalculated||(a.forEach(s=>{this.isAccomplishedLeaguePlay(s[o.categoryId])&&(this.leagueAccomplishedAccumulator+=s[o.total]),this.isReceivedLeaguePlay(s[o.categoryId])&&(this.leagueReceivedAccumulator+=s[o.total])}),this.leagueAccomplishedAvg=(this.leagueAccomplishedAccumulator/(2*n)).toFixed(2),this.leagueAccomplishedMax=Math.round(this.leagueAccomplishedAvg*1.5),this.leagueReceivedAvg=(this.leagueReceivedAccumulator/(2*n)).toFixed(2),this.leagueReceivedMax=Math.round(this.leagueReceivedAvg*1.5),this.isLeagueDataCalculated=!0)}addSpecialMention(a,o,n){let s="-";for(const[i,r]of Object.entries(this.generalCategoriesIds))a===r&&(s=`${i==="accomplished"?"0":"1"}${s}`),o===r&&(s=`${s}${i==="accomplished"?"0":"1"}`);s.length===3&&(this.mentions[s]=n)}resetMentions(){this.mentions={"0-0":"","1-1":"","0-1":"","1-0":""}}addTeamPlays(a,o,n,s,i){!n||!i||a!==this.homeTeamType&&a!==this.visitingTeamType||(n.forEach(r=>{this.isAccomplishedPlay(r[s.categoryId])?this[a].increaseAccomplishedByOne(r[s.section],r[s.total]):this.isReceivedPlay(r[s.categoryId])&&this[a].increaseReceivedByOne(r[s.section],r[s.total])}),this[a].calculateAvg(i))}addLivePlay(a,o,n,s,i=!1,r=!1){(a===this.homeTeamType||a===this.visitingTeamType)&&n[s.categoryId].includes(this.generalCategoriesIds.accomplished)&&this[a].increaseAccomplishedByOne(n[s.section],n[s.total],!0)}subtractLivePlay(a,o,n,s,i){(a===this.homeTeamType||a===this.visitingTeamType)&&(this.isAccomplishedPlay(n[s.categoryId])&&!i?this[a].decreaseAccomplishedLiveByOne(n[s.section],n[s.total]):this.isReceivedPlay(n[s.categoryId])&&i&&this[a].decreaseReceivedLiveByOne(n[s.section],n[s.total]))}isAccomplishedLeaguePlay(a){return!!(this.receivedCategoryIds[0]===40?this.receivedCategoryIds:this.accomplishedCategoryIds).find(n=>a===n||`${a}_r`===n)}isReceivedLeaguePlay(a){return!!this.receivedCategoryIds.find(o=>a===o)}isAccomplishedPlay(a){return this.generalCategoriesIds.accomplished===a}isReceivedPlay(a){return this.generalCategoriesIds.received===a}calcRankingLeague(a,o,n,s,i,r=!1){this[this.homeTeamType].calculateRanking(a,o,n,this.generalCategoriesIds.accomplished,this.generalCategoriesIds.received,i,r,this.homeTeamType),this[this.visitingTeamType].calculateRanking(a,o,s,this.generalCategoriesIds.accomplished,this.generalCategoriesIds.received,i,r,this.visitingTeamType)}resetData(){this.homeTeam=new Zc,this.visitingTeam=new Zc,this.isLeagueDataCalculated=!1,this.leagueAccomplishedMax=0,this.leagueReceivedMax=0,this.leagueAccomplishedAvg=0,this.leagueReceivedAvg=0,this.leagueAccomplishedAccumulator=0,this.leagueReceivedAccumulator=0}isInGeneralCategory(a){return this.generalCategoriesIds.accomplished===a||this.generalCategoriesIds.received===a}}const Zje={general:{name:"General",priority:1,parentInfo:{parentAnalysis:[1],analysisTypeBlocks:[1]},subcategories:{goals:new de([12,55,"35_r","54_r"],null,{accomplished:1,received:0},"Goles","Goles recibidos","Goles realizados / recibidos","Goles recibidos / realizados",1),shotToGoal:new de([91,95,158,167,176,343,330,333,423],null,{accomplished:2,received:0},"Remates a destino","","","",1),possession:new de([2,3,20,21],null,{accomplished:3,received:0},"Posesión","","","",1,!1,!0),yellowCards:new de([14,52],null,{accomplished:4,received:0},"Tarjetas amarillas","","","",1),redCards:new de([15,53],null,{accomplished:5,received:0},"Tarjetas rojas","","","",1),centerCrosses:new de([13,25],null,{accomplished:6,received:0},"Centros totales","","","",1)}},offensive:{name:"Ofensivo",priority:2,parentInfo:{parentAnalysis:[1],analysisTypeBlocks:[1]},subcategories:{shotsOnGoal:new de([19],null,{accomplished:7,received:0},"Tiros a gol","","","",1),shotsOnGoalDestination:new de([91,95],null,{accomplished:8,received:0},"Tiros a gol destino","","","",1),shotToGoal:new de([91,95,158,167,176,343,330,333,423],null,{accomplished:2,received:0},"Remates a destino","","","",1),ballsWonOpponentPenaltyBox:new de([11],null,{accomplished:10,received:0},"Balones ganados área rival","","","",1),centersFromRight:new de([25],null,{accomplished:11,received:0},"Centros por derecha","","","",1),centersFromLeft:new de([13],null,{accomplished:12,received:0},"Centros por izquierda","","","",1),success1VS1:new de([4],null,{accomplished:13,received:0},"Enfrentamientos ofensivos exitosos","","","",1),unsuccess1VS1:new de([209],null,{accomplished:14,received:0},"Enfrentamientos ofensivos no exitosos","","","",1)}},defensive:{name:"Defensivo",priority:3,parentInfo:{parentAnalysis:[1],analysisTypeBlocks:[1]},subcategories:{saves:new de([39],null,{accomplished:15,received:0},"Atajadas","","","",1),ballsWonOwnPenaltyBox:new de([23],null,{accomplished:16,received:0},"Balones ganados área propia","","","",1),success1VS1:new de([5],null,{accomplished:17,received:0},"Enfrentamientos defensivos exitosos","","","",1),unsuccess1VS1:new de([209],null,{accomplished:18,received:0},"Enfrentamientos defensivos no exitosos","","","",1),aerialGame:new de([24],null,{accomplished:19,received:0},"Juego aéreo resto del campo","","","",1),clearances:new de([34],null,{accomplished:20,received:0},"Rechaces","","","",1)}},possession:{name:"Posesión",priority:4,parentInfo:{parentAnalysis:[1],analysisTypeBlocks:[1]},subcategories:{totalPasses:new de([2,3,20,21],null,{accomplished:21,received:0},"Pases totales","","","",1),successPasses:new de([2,20],null,{accomplished:22,received:0},"Pases acertados","","","",1),successPassesRivalHalf:new de([20],null,{accomplished:23,received:0},"Pases acertados en cancha rival","","","",1),ballsRecoveredInChallenge:new de([483],null,{accomplished:24,received:0},"Balones recuperados en disputa","","","",1),ballsRecoveredWithoutChallenge:new de([484],null,{accomplished:25,received:0},"Balones recuperados sin disputa","","","",1),ballsLostInChallenge:new de([494],null,{accomplished:26,received:0},"Balones perdidos en disputa","","","",1),ballsLostWithoutChallenge:new de([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 de([155,164,173,362,371,380],null,{accomplished:28,received:0},"Tiros libres 4/4","","","",1),freeKick34:new de([150,357],null,{accomplished:29,received:0},"Tiros libres 3/4","","","",1),freeKickOwnHalf:new de([149,356],null,{accomplished:30,received:0},"Tiros libres cancha propia","","","",1),cornerFromRight:new de([32],null,{accomplished:31,received:0},"Tiros de esquina por derecha","","","",1),cornerFromLeft:new de([31],null,{accomplished:32,received:0},"Tiros de esquina por izquierda","","","",1),goalKick:new de([264,28],null,{accomplished:33,received:0},"Saques de meta","","","",1)}},penalties:{name:"Infracciones",priority:6,parentInfo:{parentAnalysis:[1],analysisTypeBlocks:[1]},subcategories:{totalFouls:new de([17,50],null,{accomplished:34,received:0},"Faltas totales","","","",1),foulOwnGoal:new de([348,478],null,{accomplished:35,received:0},"Faltas cerca de su propia portería","","","",1),fieldFouls:new de([349,350,479,480],null,{accomplished:36,received:0},"Faltas resto del campo","","","",1),penaltyKick:new de([461,481],null,{accomplished:37,received:0},"Penales cometidos","","","",1),offside:new de([33],null,{accomplished:38,received:0},"Fueras de lugar","","","",1)}}},Yje=[{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}],Kje=["teamId","categoryId","matchlapse","section","matchResult","playingAs","total","gameId"];let w0=null;function Qje(){return w0||(w0=Vi(Kje)),w0}const eMe=["playId","gameId","teamId","playerId","momentOfPlay","categoryId","categoryType","matchLapse","section","matchResult","playingAs","total","coordinate1X","coordinate1Y","coordinate2X","coordinate2Y","coordinate3X","coordinate3Y"];let C0=null;function tMe(){return C0||(C0=Vi(eMe)),C0}function Yc(e,a,o){return[o.get(e[a.categoryId])||[],e[a.teamId],e[a.matchResult],e[a.playingAs],e[a.matchLapse],e[a.section],e[a.total]]}function Ok(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 k0(e,a,o){let n=[...a];return e[o.categoryId]===2&&(n[0]=14),e[o.categoryId]===20&&(n[0]=15),[14,15].includes(n[0])?n:null}const aMe=[{name:"Liga MX",id:1},{name:"Liga MX Femenil",id:1001},{name:"Liga Expansión MX",id:1071}],oMe={nextGeneral:{namespaced:!0,state:{seasonId:0,pastSeasonId:0,usePastSeasonId:!1,isSocketConnected:!1,indexesLP:Ik(),indexesTSP:Xje(),indexesLS:Qje(),indexesTLP:tMe(),nextGamesDataStructure:Zje,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(a=>a.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=!!e.gameForAnalysis.is_live,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 Yje.filter(a=>a.parentAnalysis.includes(e.selectedAnalysis.id))},homeTeamFilteredPlays(e){if(e.homeTeamFilter.requiresPlaysFiltering)return xk(e.homeTeamPlays,e.homeTeamFilter.playingAs,e.homeTeamFilter.matchResult,e.homeTeamFilter.sections,e.indexesTSP)},visitingTeamFilteredPlays(e){if(e.visitingTeamFilter.requiresPlaysFiltering)return xk(e.visitingTeamPlays,e.visitingTeamFilter.playingAs,e.visitingTeamFilter.matchResult,e.visitingTeamFilter.sections,e.indexesTSP)},currentSeasonTeamsIds(e){return e.currentSeasonTeams.map(a=>a.team_id)},canFilledStructure(e){return e.homeTeamFilter.requiresPlaysFiltering||e.visitingTeamFilter.requiresPlaysFiltering},totalFilteredHomeGames(e){return e.homeGames.filter(a=>e.homeTeamFilter.playingAs.includes(a[0])).filter(a=>e.homeTeamFilter.matchResult.includes(a[1])).reduce((a,o)=>a+o[2],0)},totalFilteredVisitingGames(e){return e.visitingGames.filter(a=>e.visitingTeamFilter.playingAs.includes(a[0])).filter(a=>e.visitingTeamFilter.matchResult.includes(a[1])).reduce((a,o)=>a+o[2],0)},filledDataStructure(e,a){if(e.currentSeasonPlays)for(const o of Object.values(e.nextGamesDataStructure))for(const n of Object.values(o.subcategories))e.homeTeamFilter.requiresPlaysFiltering&&n.homeTeam.resetTotals(),e.visitingTeamFilter.requiresPlaysFiltering&&n.visitingTeam.resetTotals(),n.addLeaguePlays(e.currentSeasonPlays,e.indexesLP,e.totalSeasonFinishedGames),n.addTeamPlays(n.homeTeamType,e.gameForAnalysis.home_team,a.homeTeamFilteredPlays,e.indexesTSP,e.showPostMatch?1:a.totalFilteredHomeGames),n.addTeamPlays(n.visitingTeamType,e.gameForAnalysis.visiting_team,a.visitingTeamFilteredPlays,e.indexesTSP,e.showPostMatch?1:a.totalFilteredVisitingGames);return e.nextGamesDataStructure},arrayFilledDataSortedByPriority(e,a){return Object.values(a.filledDataStructure).sort((o,n)=>o.priority-n.priority)},statisticData(e,a){for(const o of Object.values(a.filledDataStructure))if(o.parentInfo.parentAnalysis.includes(e.selectedAnalysis.id)&&o.parentInfo.analysisTypeBlocks.includes(e.selectedStatisticTypeBlock))return o.subcategories;return{}},accomplished(e){return e.homeTeamFilter.statistics===0}},mutations:{setCurrentTournamentName(e,a){e.currentTournamentName=a},setBetSubcategoriesObjects(e,a){e.betSubcategoriesObjects=a},setRegularSeasonName(e,a){e.regularSeasonName=a},setBetSubcategories(e,a){e.betSubcategories=a},setBetDescription(e,a){e.betDescription=a},setSeasonId(e,a){e.seasonId=Number(a)},setHome(e,a){e.homeTeamInfo=a},setAway(e,a){e.awayTeamInfo=a},setMenuOptionActive(e,a){e.menuOptionActive=a},setPastSeasonId(e,a){e.pastSeasonId=a},setUsePastSeasonId(e,a){e.usePastSeasonId=a,a&&(e.oldSeasonId=e.pastSeasonId)},updateShowPostMatchData(e,a){e.showPostMatch=a},setHomeResultGame(e,a){e.homeResultGame=a},setAwayResultGame(e,a){e.awayResultGame=a},updateIsSocketConnected(e,a){e.isSocketConnected=a,!a&&e.gameForAnalysis.is_live&&this._vm.$socket.client.emit("subscribe",{channel:`game.${e.gameForAnalysis.game_id}.v2`})},updateCurrentSeasonTeams(e,a){e.currentSeasonTeams=a,e.currentSeasonTeams.forEach(o=>{o.playedGames=e.currentSeasonGames.reduce((n,s)=>{if(s.game_status===1&&(s.home_team===o.team_id||s.visiting_team===o.team_id)){const i=s.score[0]-s.score[1],r=s.home_team===o.team_id;n.push({playingAs:r?1:2,matchResult:i===0?3:r?i>0?1:2:i<0?1:2})}return n},[])})},updateCurrentSeasonGames(e,a){e.currentSeasonGames=a},updateGameId(e,a){e.gameId=a},updateGameForAnalysis(e,a){e.gameForAnalysis=a,e.homeTeamFilter.teamId=e.gameForAnalysis.home_team,e.visitingTeamFilter.teamId=e.gameForAnalysis.visiting_team,e.gameForAnalysis.is_live===1&&e.isSocketConnected&&this._vm.$socket.client.emit("subscribe",{channel:`game.${e.gameForAnalysis.game_id}.v2`})},updateSelectedAnalysis(e,a){e.selectedAnalysis=a},updateShowLiveData(e,a){e.showLiveData=a},toggleShowLiveData(e){e.showLiveData=!e.showLiveData},toggleAdvanceFilter(e){e.showAdvanceFilter=!e.showAdvanceFilter},updateIdAssetSelected(e,a){e.idAssetSelected=a},updateStats(e,a){e.currentSeasonPlays=a},updateFilterAux(e){e.filterAux||(e.filterAux={homeTeamFilter:{...e.homeTeamFilter},visitingTeamFilter:{...e.visitingTeamFilter}})},updateFilters(e,{filters:a,needsFormat:o=!1}){if(o){if(!a||!a.local||!a.local.statistics||!a.visit||!a.visit.statistics)return;e.homeTeamFilter=Ru(e.homeTeamFilter,a.local,e.gameForAnalysis.home_team),e.visitingTeamFilter=Ru(e.visitingTeamFilter,a.visit,e.gameForAnalysis.visiting_team),e.selectedStatisticTypeBlock!==a.local.statistics.block&&(e.selectedStatisticTypeBlock=a.local.statistics.block)}else e.homeTeamFilter={...a.homeTeamFilter,statistics:0},e.visitingTeamFilter={...a.visitingTeamFilter,statistics:0}},updateFinishedGames(e,a){e.totalSeasonFinishedGames=a},updateHomeTeamPlays(e,a){e.homeTeamPlays=a},updateVisitingTeamPlays(e,a){e.visitingTeamPlays=a},addSpecialMentions(e,a){const o=Object.values(e.nextGamesDataStructure);o.forEach(n=>{for(const s of Object.values(n.subcategories))s.resetMentions()}),o.forEach(n=>{for(const s of a)for(const i of Object.values(n.subcategories))i.addSpecialMention(s[0],s[1],s[2])})},setDefaultFilter(e,a){e.defaultFilter={homeTeamFilter:{...a.homeTeamFilter,teamId:e.gameForAnalysis.home_team},visitingTeamFilter:{...a.awayTeamFilter,teamId:e.gameForAnalysis.visiting_team}}},addLiveGamePlay(e,a){if(!e.livePlays.has(a[e.indexesTLP.playId])){e.livePlays.set(a[e.indexesTLP.playId],a);const n=Yc(a,e.indexesTLP,e.categoriesMap);for(const s of Object.values(e.nextGamesDataStructure))for(const i of Object.values(s.subcategories))i.addLivePlay(e.gameForAnalysis.home_team===n[e.indexesTSP.teamId]?"homeTeam":"visitingTeam",n[e.indexesTSP.teamId],n,e.indexesTSP,e.isLive,!1)}},updateLiveGamePlay(e,a){const o=!!a[e.indexesTLP.length],n=e.livePlays.get(a[e.indexesTLP.playId]);if(f$(n,a))return;let s="";const i=e.gameForAnalysis.home_team===a[e.indexesTLP.teamId]?"homeTeam":"visitingTeam";n&&(s=e.gameForAnalysis.home_team===n[e.indexesTLP.teamId]?"homeTeam":"visitingTeam");const r=Yc(n,e.indexesTLP,e.categoriesMap),c=k0(n,r,e.indexesTLP),h=Yc(a,e.indexesTLP,e.categoriesMap),d=k0(a,h,e.indexesTLP);for(const l of Object.values(e.nextGamesDataStructure))for(const p of Object.values(l.subcategories))n&&(p.subtractLivePlay(s,r[e.indexesTSP.teamId],r,e.indexesTSP,o),c&&p.subtractLivePlay(s,c[e.indexesTSP.teamId],c,e.indexesTSP,o)),p.addLivePlay(i,h[e.indexesTSP.teamId],h,e.indexesTSP,e.isLive,o),d&&p.addLivePlay(i,d[e.indexesTSP.teamId],d,e.indexesTSP,e.isLive,o);e.livePlays.set(a[e.indexesTLP.playId],a)},deleteLiveGamePlay(e,a){const o=!!a[e.indexesTLP.length],n=e.livePlays.get(a[e.indexesTLP.playId]);let s="";if(n){s=e.gameForAnalysis.home_team===n[e.indexesTLP.teamId]?"homeTeam":"visitingTeam",e.livePlays.delete(n[e.indexesTLP.playId]);const i=Yc(n,e.indexesTLP,e.categoriesMap),r=k0(a,i,e.indexesTLP);for(const c of Object.values(e.nextGamesDataStructure))for(const h of Object.values(c.subcategories))h.subtractLivePlay(s,i[e.indexesTSP.teamId],i,e.indexesTSP,o),r&&h.subtractLivePlay(s,r[e.indexesTSP.teamId],r,e.indexesTSP,o)}},clearLiveTotals(e){for(const a of Object.values(e.nextGamesDataStructure))for(const o of Object.values(a.subcategories))o.homeTeam.resetTotalsLive(),o.visitingTeam.resetTotalsLive()},updateSeasonStatistics(e,a){e.statistics=a},updateOldSeasonId(e,a){e.oldSeasonId=a},addRankingInSubcategories(e,{getters:a,isPremiumAccount:o}){if(!(e.homeTeamFilter.teamId&&e.visitingTeamFilter.teamId))return;e.isRankingCalculating=!1,e.currentSeasonTeams.forEach(i=>{i.homeTeamFilterGames=i.playedGames.filter(r=>e.homeTeamFilter.playingAs.includes(r.playingAs)&&e.homeTeamFilter.matchResult.includes(r.matchResult)).length,i.visitingTeamFilterGames=i.playedGames.filter(r=>e.visitingTeamFilter.playingAs.includes(r.playingAs)&&e.visitingTeamFilter.matchResult.includes(r.matchResult)).length});const n=[],s=new Map;for(const i of Object.values(e.nextGamesDataStructure))for(const r of Object.values(i.subcategories))n.push(r);a.rankingData.forEach(i=>{for(const r of n)if(r.isInGeneralCategory(i[e.indexesLS.categoryId])){s.has(r.id)?s.get(r.id).push(i):s.set(r.id,[i]);break}})},prepareCleanAllStatistics(e){e.homeTeamFilter.requiresPlaysFiltering=!0,e.visitingTeamFilter.requiresPlaysFiltering=!0},setHomeGames(e,a){e.homeGames=Ok(a)},setVisitingGames(e,a){e.visitingGames=Ok(a)},generateCategoriesMap(e){for(const a of Object.values(e.nextGamesDataStructure))for(const o of Object.values(a.subcategories))o.accomplishedCategoryIds.forEach(n=>{const s=e.categoriesMap.get(n);s?s.push(o.generalCategoriesIds.accomplished):e.categoriesMap.set(n,[o.generalCategoriesIds.accomplished])})},resetNextGamesDataStructure(e){for(const a of Object.values(e.nextGamesDataStructure))for(const o of Object.values(a.subcategories))o.resetData()}},actions:{turnOnOffDefaultFilters({state:e,commit:a},{command:o}){o==="on"?a("updateFilters",{filters:e.defaultFilter,needsFormat:!1}):a("updateFilters",{filters:e.filterAux,needsFormat:!1})},async setAndGetStatsPostMatch({commit:e},a){try{const r=await Gje({gameId:a.gameId});if(r){var o=[],n=[],s={season:0,total:0,visit:{total:0,draw:0,win:0,lose:0},played:0,local:{total:0,draw:0,win:0,lose:0}},i={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(r.data).length!==0&&(o=r.data.data.filter(c=>c[1]==a.homeTeam),n=r.data.data.filter(c=>c[1]==a.awayTeam),s=r.data.games,i=r.data.games),e("updateHomeTeamPlays",o),e("updateVisitingTeamPlays",n),e("setHomeGames",s),e("setVisitingGames",i)}else e("updateHomeTeamPlays",[]),e("updateVisitingTeamPlays",[])}catch(r){return Promise.reject(r)}},async fillStatisticDataPostMatch({commit:e,dispatch:a},o){e("prepareCleanAllStatistics"),e("updateHomeTeamPlays",[]),e("updateVisitingTeamPlays",[]),e("setIsSectionLoading",!0,{root:!0});try{let n=[];e("updateGameForAnalysis",o.gameInfo),n.push(a("setAndGetStatsPostMatch",{gameId:o.game,homeTeam:o.homeTeam,awayTeam:o.awayTeam})),await Promise.all(n)}catch(n){throw new Error(n)}finally{e("setIsSectionLoading",!1,{root:!0})}},async checkState({state:e,dispatch:a,commit:o},{gameId:n,isTeamsAnalysis:s,currentSeasonId:i,isLoginChanged:r=!1,defaultFilter:c=null,gameInfo:h=null,isCupGame:d=!1}){try{let l={},p=e.seasonId!==Number(i);const y=[];o("setIsSectionLoading",!0,{root:!0}),o("setUsePastSeasonId",!1),p&&o("setSeasonId",i),o("updateGameId",Number(n)),e.oldSeasonId!==e.seasonId&&o("resetNextGamesDataStructure");const m=await a("getCurrentSeasonGames",Number(n));if(o("leagueGeneral/updateCurrentSeasonGames",m,{root:!0}),l=m.find(g=>g.game_id===Number(n)),!l&&h&&(l=h),l&&o("updateGameForAnalysis",l),l.game_status!==1&&(d||await a("checkTeamsData",{gameId:n,isFromBet:!!c}),(r||e.oldSeasonId!==e.seasonId||e.statistics.length===0)&&y.push(a("getSeasonStatistics")),(r||e.categoriesMap.size===0)&&o("generateCategoriesMap")),e.usePastSeasonId){const g=await a("getCurrentSeasonGamesLast");o("leagueGeneral/updateCurrentSeasonGames",g,{root:!0})}(r||e.currentSeasonTeams.length===0||!e.currentSeasonTeams.find(g=>l.home_team===g.team_id))&&y.push(a("getCurrentSeasonTeams")),o("setHomeResultGame",l.score[0]),o("setAwayResultGame",l.score[1]),s?l.game_status!==1?(await a("fillStatisticData",{gameId:n,gameinfo:l,promises:y,defaultFilter:c}),o("updateShowPostMatchData",!1)):(o("updateStats",[]),o("updateShowPostMatchData",!0),y.push(a("fillStatisticDataPostMatch",{game:n,homeTeam:l.home_team,awayTeam:l.visiting_team,gameInfo:l})),await Promise.all(y)):o("setIsSectionLoading",!1,{root:!0})}catch(l){return Promise.reject(l)}},async fillStatisticData({commit:e,dispatch:a,getters:o,rootGetters:n,state:s},{gameId:i,gameinfo:r,promises:c=[],defaultFilter:h=null}){let d=null;try{e("setIsSectionLoading",!0,{root:!0}),e("prepareCleanAllStatistics"),e("updateHomeTeamPlays",[]),e("updateVisitingTeamPlays",[]),e("updateGameForAnalysis",r),r.is_live&&c.push(a("getCurrentLiveGamePlays",i)),c.push(a("getSpecialMentionsByGame",i)),c.push(a("getHomeTeamPlays")),c.push(a("getVisitingTeamPlays")),c.push(a("getCurrentSeasonPlays")),h&&c.push(qje(h)),d=await Promise.all(c)}catch(l){throw new Error(l)}finally{setTimeout(()=>{if(e("addRankingInSubcategories",{getters:o,isPremiumAccount:n["loginGeneral/getPremiumAccount"]}),h){const[l]=d.pop();l&&(e("setBetSubcategories",l.categories),e("setBetDescription",l.sectionDescription),e("setDefaultFilter",l.params),e("updateFilterAux"),e("updateFilters",{filters:s.defaultFilter,needsFormat:!1}),a("updateRankingInSubcategories"))}},100),e("setIsSectionLoading",!1,{root:!0})}},async checkTeamsData({state:e,dispatch:a,rootState:o,commit:n},{gameId:s,isFromBet:i}){try{const r=Number(s);if(o.general.tournaments&&o.general.tournaments.length){await a("general/fetchTournaments",null,{root:!0});const c=o.general.tournaments.find(h=>{for(const d of h.seasons)if(d.id===e.seasonId)return!0;return!1});n("general/setTournamentSelected",c||{},{root:!0})}if(e.pastSeasonId){n("nextGeneral/setPastSeasonId",e.pastSeasonId,{root:!0});const c=o.leagueGeneral.currentSeasonGames.find(h=>h.game_id===r);c&&n("updateGameForAnalysis",c),await Promise.all([a("getHomeTeamPlays"),a("getVisitingTeamPlays")]),n("setUsePastSeasonId",i||(!e.homeTeamPlays||e.homeTeamPlays.length===0)&&(!e.visitingTeamPlays||e.visitingTeamPlays.length===0))}else n("setUsePastSeasonId",!1)}catch(r){throw new Error(r)}},async getSpecialMentionsByGame({commit:e},a){try{const o=await jje({gameId:a});e("addSpecialMentions",o)}catch(o){return Promise.reject(o)}},async getCurrentSeasonGames({commit:e,state:a},o){try{const{teams:n,games:s,past_season_id:i,tournament_id:r}=await Lje({seasonId:a.usePastSeasonId?a.pastSeasonId:a.seasonId,gameId:o}),c=aMe.find(h=>h.id===r);return c&&e("setCurrentTournamentName",c.name),e("setHome",n[0]),e("setAway",n[1]),a.usePastSeasonId||e("setPastSeasonId",i),await e("updateCurrentSeasonGames",s),s&&Array.isArray(s)&&e("updateFinishedGames",s.reduce((h,d)=>(d.game_status===1&&(h+=1),h),0)),s}catch(n){return Promise.reject(n)}},async getCurrentSeasonGamesLast({commit:e,state:a}){try{const{games:o,past_season_id:n}=await Vk({seasonId:a.usePastSeasonId?a.pastSeasonId:a.seasonId});return a.usePastSeasonId||e("setPastSeasonId",n),await e("updateCurrentSeasonGames",o),o&&Array.isArray(o)&&e("updateFinishedGames",o.reduce((s,i)=>(i.game_status===1&&(s+=1),s),0)),o}catch(o){return Promise.reject(o)}},async getCurrentSeasonTeams({commit:e,state:a}){try{const o=await Uje({seasonId:a.usePastSeasonId?a.pastSeasonId:a.seasonId});e("updateCurrentSeasonTeams",o.data.teams)}catch{}},async getSeasonStatistics({commit:e,state:a}){try{const o=a.usePastSeasonId?a.pastSeasonId:a.seasonId,n=await Rje({seasonId:o});e("updateSeasonStatistics",n),e("updateOldSeasonId",o)}catch(o){return Promise.reject(o)}},updateRankingInSubcategories({state:e,commit:a,getters:o,rootGetters:n}){e.currentSeasonGames.length>0&&a("addRankingInSubcategories",{getters:o,isPremiumAccount:n["loginGeneral/getPremiumAccount"]})},async getHomeTeamPlays({commit:e,state:a}){try{const o=await Ak({seasonId:a.usePastSeasonId?a.pastSeasonId:a.seasonId,teamId:a.gameForAnalysis.home_team});o.data&&(e("updateHomeTeamPlays",o.data.data),e("setHomeGames",o.data.games))}catch(o){return Promise.reject(o)}},async getVisitingTeamPlays({commit:e,state:a}){try{const o=await Ak({seasonId:a.usePastSeasonId?a.pastSeasonId:a.seasonId,teamId:a.gameForAnalysis.visiting_team});o.data&&(e("updateVisitingTeamPlays",o.data.data),e("setVisitingGames",o.data.games))}catch(o){return Promise.reject(o)}},async getCurrentSeasonPlays({commit:e,state:a}){try{const o=await Pje({seasonId:a.usePastSeasonId?a.pastSeasonId:a.seasonId});e("updateStats",o)}catch(o){return Promise.reject(new Error(o))}},async getCurrentLiveGamePlays({state:e,commit:a},o){try{const n=await vje({gameId:o});e.livePlays=new Map,n.forEach(s=>{e.gameForAnalysis.game_id===s[e.indexesTLP.gameId]&&(e.gameForAnalysis.home_team===s[e.indexesTLP.teamId]||e.gameForAnalysis.visiting_team===s[e.indexesTLP.teamId])&&a("addLiveGamePlay",s)})}catch(n){throw new Error(n)}},socket_new({state:e,commit:a},o){const n=o[1];(e.gameForAnalysis.home_team===n[e.indexesTLP.teamId]||e.gameForAnalysis.visiting_team===n[e.indexesTLP.teamId])&&a("addLiveGamePlay",n)},socket_update({state:e,commit:a},o){const n=o[1];e.gameForAnalysis.game_id===n[e.indexesTLP.gameId]&&(e.gameForAnalysis.home_team===n[e.indexesTLP.teamId]||e.gameForAnalysis.visitingTeam===n[e.indexesTLP.teamId])&&a("updateLiveGamePlay",n)},socket_delete({state:e,commit:a},o){const n=o[1];e.gameForAnalysis.game_id===n[e.indexesTLP.gameId]&&(e.gameForAnalysis.home_team===n[e.indexesTLP.teamId]||e.gameForAnalysis.visiting_team===n[e.indexesTLP.teamId])&&a("deleteLiveGamePlay",n)},exitChannel({state:e,getters:a,rootState:o,rootGetters:n,commit:s}){const i=n["loginGeneral/getPremiumAccount"];a.isLive&&i&&(s("updateShowLiveData",!1),s("clearLiveTotals"),e.livePlays.clear(),this._vm.$socket.client.emit("unsubscribe",{channel:`game.${e.gameForAnalysis.game_id}.v2`}))},cleanStats({state:e}){for(const o of Object.values(e.nextGamesDataStructure))for(const n of Object.values(o.subcategories))n.homeTeam.resetTotals(),n.visitingTeam.resetTotals(),n.homeTeam.resetTotalsLive(),n.visitingTeam.resetTotalsLive(),n.isBetMainSubcategory=!1;Object.values(e.nextGamesDataStructure).forEach(o=>{for(const n of Object.values(o.subcategories))n.resetMentions()}),e.currentSeasonPlays=null,e.homeTeamPlays=[],e.visitingTeamPlays=[],e.homeTeamFilter.requiresPlaysFiltering=!0,e.visitingTeamFilter.requiresPlaysFiltering=!0,e.isRankingCalculating=!0},cleanAllStats({state:e}){for(const o of Object.values(e.nextGamesDataStructure))for(const n of Object.values(o.subcategories))n.homeTeam.resetTotals(),n.visitingTeam.resetTotals(),n.isBetMainSubcategory=!1;Object.values(e.nextGamesDataStructure).forEach(o=>{for(const n of Object.values(o.subcategories))n.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 nMe(){try{const{data:e}=await ft({url:"https://kefloixzy1.execute-api.us-west-2.amazonaws.com/prod/tournaments"});return e}catch(e){throw new Error(e)}}const sMe={namespaced:!0,state:{videoSrc:null,isVideoModalVisible:!1,tournaments:[],seccionBetsGolTipster:1,tournamentSelected:{},sectionAnalytics:"Banner_Home",previewSectionAnalytics:"",sectionRef:"",booleanIsStatisticModalOpen:!1},getters:{getSectionAnalytics(e){return e.sectionAnalytics},getPreviewSectionAnalytics(e){return e.previewSectionAnalytics},getSeccionBetsGolTipster(e){return e.seccionBetsGolTipster}},mutations:{setBooleanIsStatisticModalOpen(e,a){e.booleanIsStatisticModalOpen=a},setSectionRef(e,a){e.sectionRef=a},setSectionAnalytics(e,a){e.sectionAnalytics=a},setSeccionBetsGolTipster(e,a){e.seccionBetsGolTipster=a},setPreviewSectionAnalytics(e,a){e.previewSectionAnalytics=a},setVideoSrc(e,a){e.videoSrc=a},setVideoModalVisibility(e,a){e.isVideoModalVisible=a},setSelectedTournament(e,a){e.selectedTournament=a},setTournaments(e,a){e.tournaments=a.map(o=>({...o.tournament,seasons:o.seasons})),e.tournamentSelected=e.tournaments[0]},setTournamentSelected(e,a){e.tournamentSelected=a}},actions:{async fetchTournaments({state:e,commit:a}){try{if(e.tournaments.length===0){const o=await nMe();a("setTournaments",o)}}catch(o){throw new Error(o)}}}};async function iMe({seasonId:e,localTeamId:a,visitingTeamId:o}){try{const n=`https://bzznnzehtf.execute-api.us-west-2.amazonaws.com/prod/xg/seasons/${e}/teams/${a}/${o}`;return(await ft({url:n})).data}catch(n){return Promise.reject(n)}}async function rMe({seasonId:e,localTeamId:a,visitingTeamId:o}){try{const n=`https://bzznnzehtf.execute-api.us-west-2.amazonaws.com/prod/xg/game/${e}/teams/${a}/${o}`;return(await ft({url:n})).data}catch(n){return Promise.reject(n)}}const Tk=(e,a)=>{let o={};return e.forEach((n,s)=>{s==3&&(a[0]==35||a[0]==54)&&(a[s]==2?a[s]=1:a[s]=2),s==2&&(a[0]==35||a[0]==54)&&(a[s]==1?a[s]=2:a[s]==2&&(a[s]=1)),o[n]=a[s]}),o},zk=(e,a)=>e.filter(n=>{const s=a.playingAs.includes(n.playing_as),i=a.matchResult.includes(n.match_result),r=a.sections.includes(n.section);return s&&i&&r}),Fk=[{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(a,o,n){return typeof n>"u"||+n==0?Math[a](o):(o=+o,n=+n,isNaN(o)||!(typeof n=="number"&&n%1===0)?NaN:(o=o.toString().split("e"),o=Math[a](+(o[0]+"e"+(o[1]?+o[1]-n:-n))),o=o.toString().split("e"),+(o[0]+"e"+(o[1]?+o[1]+n:n))))}Math.ceil10||(Math.ceil10=function(a,o){return e("ceil",a,o)})})();function Pk(e,a){let o=a*-1;return Math.ceil10(e,o)}const lMe={general:sMe,...Wje,...oMe,...{xgGeneral:{namespaced:!0,state:{teamSelected:"Local",xGLocalPlays:[],xGVisitingPlays:[]},getters:{playsLocal:(e,a,o)=>{const n=e.xGLocalPlays,s="homeTeamFilter",i=o.nextGeneral[s];return zk(n,i)},playsAway:(e,a,o)=>{const n=e.xGVisitingPlays,s="visitingTeamFilter",i=o.nextGeneral[s];return zk(n,i)},goalsQtyLocal:(e,a)=>{const o=Fk.find(n=>n.name==="Goles");return a.playsLocal.filter(n=>o.categories.includes(n.category_id)).length},goalsQtyAway:(e,a)=>{const o=Fk.find(n=>n.name==="Goles");return a.playsAway.filter(n=>o.categories.includes(n.category_id)).length},shotsOnGoalQtyLocal:(e,a)=>a.playsLocal.filter(o=>o.category_id===510).length,shotsOnGoalQtyAway:(e,a)=>a.playsAway.filter(o=>o.category_id===510).length,xGLocal:(e,a)=>{const o=new Set;let n=a.playsLocal.reduce((s,i)=>(o.has(i.moment_of_play)||(o.add(i.moment_of_play),s+=i.xG2),s),0);return Pk(n,2)},xGAway:(e,a)=>{const o=new Set;let n=a.playsAway.reduce((s,i)=>(o.has(i.moment_of_play)||(o.add(i.moment_of_play),s+=i.xG2),s),0);return Pk(n,2)}},mutations:{setTeamSelected(e,a){e.teamSelected=a},setPlays(e,a){e.xGLocalPlays=a.local_team.map(o=>Tk(a.data_headers,o)),e.xGVisitingPlays=a.visiting_team.map(o=>Tk(a.data_headers,o))},cleanXgStore(e){e.localStorage="Local",e.xGLocalPlays=[],e.xGVisitingPlays=[]}},actions:{async getXgPlays({commit:e},{seasonId:a,localTeamId:o,visitingTeamId:n,postMatch:s=!1}){try{var i={};s?i=await rMe({seasonId:a,localTeamId:o,visitingTeamId:n}):i=await iMe({seasonId:a,localTeamId:o,visitingTeamId:n}),e("setPlays",i)}catch(r){return Promise.reject(r)}}}}}};function cMe(e){for(const[a,o]of Object.entries(lMe))e.hasModule(a)||e.registerModule(a,o)}_t.GSCGameData=Fje,_t.registerStoreModules=cMe,Object.defineProperty(_t,Symbol.toStringTag,{value:"Module"})});
|