@golstats/gsc-game-data 1.0.45 → 1.0.47
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 +24 -33
- package/dist/gsc-game-data.umd.cjs +3 -3
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(a){return a instanceof this?a:new this(a)}static concat(a,...o){const s=new this(a);return o.forEach(n=>s.set(n)),s}static accessor(a){const s=(this[n1]=this[n1]={accessors:{}}).accessors,n=this.prototype;function i(r){const c=Is(r);s[c]||(tV(n,r),s[c]=!0)}return L.isArray(a)?a.forEach(i):i(a),this}}Ri.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),L.reduceDescriptors(Ri.prototype,({value:e},a)=>{let o=a[0].toUpperCase()+a.slice(1);return{get:()=>e,set(s){this[o]=s}}}),L.freezeMethods(Ri);const Va=Ri;function zd(e,a){const o=this||Od,s=a||o,n=Va.from(s.headers);let i=s.data;return L.forEach(e,function(c){i=c.call(o,i,n.normalize(),a?a.status:void 0)}),n.normalize(),i}function i1(e){return!!(e&&e.__CANCEL__)}function As(e,a,o){me.call(this,e??"canceled",me.ERR_CANCELED,a,o),this.name="CanceledError"}L.inherits(As,me,{__CANCEL__:!0});function aV(e,a,o){const s=o.config.validateStatus;!o.status||!s||s(o.status)?e(o):a(new me("Request failed with status code "+o.status,[me.ERR_BAD_REQUEST,me.ERR_BAD_RESPONSE][Math.floor(o.status/100)-4],o.config,o.request,o))}const oV=ea.hasStandardBrowserEnv?{write(e,a,o,s,n,i){const r=[e+"="+encodeURIComponent(a)];L.isNumber(o)&&r.push("expires="+new Date(o).toGMTString()),L.isString(s)&&r.push("path="+s),L.isString(n)&&r.push("domain="+n),i===!0&&r.push("secure"),document.cookie=r.join("; ")},read(e){const a=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return a?decodeURIComponent(a[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function sV(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function nV(e,a){return a?e.replace(/\/?\/$/,"")+"/"+a.replace(/^\/+/,""):e}function r1(e,a){return e&&!sV(a)?nV(e,a):a}const iV=ea.hasStandardBrowserEnv?function(){const a=/(msie|trident)/i.test(navigator.userAgent),o=document.createElement("a");let s;function n(i){let r=i;return a&&(o.setAttribute("href",r),r=o.href),o.setAttribute("href",r),{href:o.href,protocol:o.protocol?o.protocol.replace(/:$/,""):"",host:o.host,search:o.search?o.search.replace(/^\?/,""):"",hash:o.hash?o.hash.replace(/^#/,""):"",hostname:o.hostname,port:o.port,pathname:o.pathname.charAt(0)==="/"?o.pathname:"/"+o.pathname}}return s=n(window.location.href),function(r){const c=L.isString(r)?n(r):r;return c.protocol===s.protocol&&c.host===s.host}}():function(){return function(){return!0}}();function rV(e){const a=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return a&&a[1]||""}function lV(e,a){e=e||10;const o=new Array(e),s=new Array(e);let n=0,i=0,r;return a=a!==void 0?a:1e3,function(g){const d=Date.now(),l=s[i];r||(r=d),o[n]=g,s[n]=d;let m=i,h=0;for(;m!==n;)h+=o[m++],m=m%e;if(n=(n+1)%e,n===i&&(i=(i+1)%e),d-r<a)return;const y=l&&d-l;return y?Math.round(h*1e3/y):void 0}}function l1(e,a){let o=0;const s=lV(50,250);return n=>{const i=n.loaded,r=n.lengthComputable?n.total:void 0,c=i-o,g=s(c),d=i<=r;o=i;const l={loaded:i,total:r,progress:r?i/r:void 0,bytes:c,rate:g||void 0,estimated:g&&r&&d?(r-i)/g:void 0,event:n};l[a?"download":"upload"]=!0,e(l)}}const Fd={http:Dx,xhr:typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(o,s){let n=e.data;const i=Va.from(e.headers).normalize();let{responseType:r,withXSRFToken:c}=e,g;function d(){e.cancelToken&&e.cancelToken.unsubscribe(g),e.signal&&e.signal.removeEventListener("abort",g)}let l;if(L.isFormData(n)){if(ea.hasStandardBrowserEnv||ea.hasStandardBrowserWebWorkerEnv)i.setContentType(!1);else if((l=i.getContentType())!==!1){const[u,...f]=l?l.split(";").map(_=>_.trim()).filter(Boolean):[];i.setContentType([u||"multipart/form-data",...f].join("; "))}}let m=new XMLHttpRequest;if(e.auth){const u=e.auth.username||"",f=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";i.set("Authorization","Basic "+btoa(u+":"+f))}const h=r1(e.baseURL,e.url);m.open(e.method.toUpperCase(),e1(h,e.params,e.paramsSerializer),!0),m.timeout=e.timeout;function y(){if(!m)return;const u=Va.from("getAllResponseHeaders"in m&&m.getAllResponseHeaders()),_={data:!r||r==="text"||r==="json"?m.responseText:m.response,status:m.status,statusText:m.statusText,headers:u,config:e,request:m};aV(function(C){o(C),d()},function(C){s(C),d()},_),m=null}if("onloadend"in m?m.onloadend=y:m.onreadystatechange=function(){!m||m.readyState!==4||m.status===0&&!(m.responseURL&&m.responseURL.indexOf("file:")===0)||setTimeout(y)},m.onabort=function(){m&&(s(new me("Request aborted",me.ECONNABORTED,e,m)),m=null)},m.onerror=function(){s(new me("Network Error",me.ERR_NETWORK,e,m)),m=null},m.ontimeout=function(){let f=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const _=e.transitional||a1;e.timeoutErrorMessage&&(f=e.timeoutErrorMessage),s(new me(f,_.clarifyTimeoutError?me.ETIMEDOUT:me.ECONNABORTED,e,m)),m=null},ea.hasStandardBrowserEnv&&(c&&L.isFunction(c)&&(c=c(e)),c||c!==!1&&iV(h))){const u=e.xsrfHeaderName&&e.xsrfCookieName&&oV.read(e.xsrfCookieName);u&&i.set(e.xsrfHeaderName,u)}n===void 0&&i.setContentType(null),"setRequestHeader"in m&&L.forEach(i.toJSON(),function(f,_){m.setRequestHeader(_,f)}),L.isUndefined(e.withCredentials)||(m.withCredentials=!!e.withCredentials),r&&r!=="json"&&(m.responseType=e.responseType),typeof e.onDownloadProgress=="function"&&m.addEventListener("progress",l1(e.onDownloadProgress,!0)),typeof e.onUploadProgress=="function"&&m.upload&&m.upload.addEventListener("progress",l1(e.onUploadProgress)),(e.cancelToken||e.signal)&&(g=u=>{m&&(s(!u||u.type?new As(null,e,m):u),m.abort(),m=null)},e.cancelToken&&e.cancelToken.subscribe(g),e.signal&&(e.signal.aborted?g():e.signal.addEventListener("abort",g)));const p=rV(h);if(p&&ea.protocols.indexOf(p)===-1){s(new me("Unsupported protocol "+p+":",me.ERR_BAD_REQUEST,e));return}m.send(n||null)})}};L.forEach(Fd,(e,a)=>{if(e){try{Object.defineProperty(e,"name",{value:a})}catch{}Object.defineProperty(e,"adapterName",{value:a})}});const c1=e=>`- ${e}`,cV=e=>L.isFunction(e)||e===null||e===!1,d1={getAdapter:e=>{e=L.isArray(e)?e:[e];const{length:a}=e;let o,s;const n={};for(let i=0;i<a;i++){o=e[i];let r;if(s=o,!cV(o)&&(s=Fd[(r=String(o)).toLowerCase()],s===void 0))throw new me(`Unknown adapter '${r}'`);if(s)break;n[r||"#"+i]=s}if(!s){const i=Object.entries(n).map(([c,g])=>`adapter ${c} `+(g===!1?"is not supported by the environment":"is not available in the build"));let r=a?i.length>1?`since :
|
|
21
21
|
`+i.map(c1).join(`
|
|
22
22
|
`):" "+c1(i[0]):"as no adapter specified";throw new me("There is no suitable adapter to dispatch the request "+r,"ERR_NOT_SUPPORT")}return s},adapters:Fd};function Rd(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new As(null,e)}function m1(e){return Rd(e),e.headers=Va.from(e.headers),e.data=zd.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),d1.getAdapter(e.adapter||Od.adapter)(e).then(function(s){return Rd(e),s.data=zd.call(e,e.transformResponse,s),s.headers=Va.from(s.headers),s},function(s){return i1(s)||(Rd(e),s&&s.response&&(s.response.data=zd.call(e,e.transformResponse,s.response),s.response.headers=Va.from(s.response.headers))),Promise.reject(s)})}const p1=e=>e instanceof Va?e.toJSON():e;function xo(e,a){a=a||{};const o={};function s(d,l,m){return L.isPlainObject(d)&&L.isPlainObject(l)?L.merge.call({caseless:m},d,l):L.isPlainObject(l)?L.merge({},l):L.isArray(l)?l.slice():l}function n(d,l,m){if(L.isUndefined(l)){if(!L.isUndefined(d))return s(void 0,d,m)}else return s(d,l,m)}function i(d,l){if(!L.isUndefined(l))return s(void 0,l)}function r(d,l){if(L.isUndefined(l)){if(!L.isUndefined(d))return s(void 0,d)}else return s(void 0,l)}function c(d,l,m){if(m in a)return s(d,l);if(m in e)return s(void 0,d)}const g={url:i,method:i,data:i,baseURL:r,transformRequest:r,transformResponse:r,paramsSerializer:r,timeout:r,timeoutMessage:r,withCredentials:r,withXSRFToken:r,adapter:r,responseType:r,xsrfCookieName:r,xsrfHeaderName:r,onUploadProgress:r,onDownloadProgress:r,decompress:r,maxContentLength:r,maxBodyLength:r,beforeRedirect:r,transport:r,httpAgent:r,httpsAgent:r,cancelToken:r,socketPath:r,responseEncoding:r,validateStatus:c,headers:(d,l)=>n(p1(d),p1(l),!0)};return L.forEach(Object.keys(Object.assign({},e,a)),function(l){const m=g[l]||n,h=m(e[l],a[l],l);L.isUndefined(h)&&m!==c||(o[l]=h)}),o}const h1="1.6.7",Pd={};["object","boolean","number","function","string","symbol"].forEach((e,a)=>{Pd[e]=function(s){return typeof s===e||"a"+(a<1?"n ":" ")+e}});const g1={};Pd.transitional=function(a,o,s){function n(i,r){return"[Axios v"+h1+"] Transitional option '"+i+"'"+r+(s?". "+s:"")}return(i,r,c)=>{if(a===!1)throw new me(n(r," has been removed"+(o?" in "+o:"")),me.ERR_DEPRECATED);return o&&!g1[r]&&(g1[r]=!0,console.warn(n(r," has been deprecated since v"+o+" and will be removed in the near future"))),a?a(i,r,c):!0}};function dV(e,a,o){if(typeof e!="object")throw new me("options must be an object",me.ERR_BAD_OPTION_VALUE);const s=Object.keys(e);let n=s.length;for(;n-- >0;){const i=s[n],r=a[i];if(r){const c=e[i],g=c===void 0||r(c,i,e);if(g!==!0)throw new me("option "+i+" must be "+g,me.ERR_BAD_OPTION_VALUE);continue}if(o!==!0)throw new me("Unknown option "+i,me.ERR_BAD_OPTION)}}const Dd={assertOptions:dV,validators:Pd},Ga=Dd.validators;class Pi{constructor(a){this.defaults=a,this.interceptors={request:new t1,response:new t1}}async request(a,o){try{return await this._request(a,o)}catch(s){if(s instanceof Error){let n;Error.captureStackTrace?Error.captureStackTrace(n={}):n=new Error;const i=n.stack?n.stack.replace(/^.+\n/,""):"";s.stack?i&&!String(s.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(s.stack+=`
|
|
23
|
-
`+i):s.stack=i}throw s}}_request(a,o){typeof a=="string"?(o=o||{},o.url=a):o=a||{},o=xo(this.defaults,o);const{transitional:s,paramsSerializer:n,headers:i}=o;s!==void 0&&Dd.assertOptions(s,{silentJSONParsing:Ga.transitional(Ga.boolean),forcedJSONParsing:Ga.transitional(Ga.boolean),clarifyTimeoutError:Ga.transitional(Ga.boolean)},!1),n!=null&&(L.isFunction(n)?o.paramsSerializer={serialize:n}:Dd.assertOptions(n,{encode:Ga.function,serialize:Ga.function},!0)),o.method=(o.method||this.defaults.method||"get").toLowerCase();let r=i&&L.merge(i.common,i[o.method]);i&&L.forEach(["delete","get","head","post","put","patch","common"],p=>{delete i[p]}),o.headers=Va.concat(r,i);const c=[];let g=!0;this.interceptors.request.forEach(function(u){typeof u.runWhen=="function"&&u.runWhen(o)===!1||(g=g&&u.synchronous,c.unshift(u.fulfilled,u.rejected))});const d=[];this.interceptors.response.forEach(function(u){d.push(u.fulfilled,u.rejected)});let l,m=0,h;if(!g){const p=[m1.bind(this),void 0];for(p.unshift.apply(p,c),p.push.apply(p,d),h=p.length,l=Promise.resolve(o);m<h;)l=l.then(p[m++],p[m++]);return l}h=c.length;let y=o;for(m=0;m<h;){const p=c[m++],u=c[m++];try{y=p(y)}catch(f){u.call(this,f);break}}try{l=m1.call(this,y)}catch(p){return Promise.reject(p)}for(m=0,h=d.length;m<h;)l=l.then(d[m++],d[m++]);return l}getUri(a){a=xo(this.defaults,a);const o=r1(a.baseURL,a.url);return e1(o,a.params,a.paramsSerializer)}}L.forEach(["delete","get","head","options"],function(a){Pi.prototype[a]=function(o,s){return this.request(xo(s||{},{method:a,url:o,data:(s||{}).data}))}}),L.forEach(["post","put","patch"],function(a){function o(s){return function(i,r,c){return this.request(xo(c||{},{method:a,headers:s?{"Content-Type":"multipart/form-data"}:{},url:i,data:r}))}}Pi.prototype[a]=o(),Pi.prototype[a+"Form"]=o(!0)});const Di=Pi;class Ld{constructor(a){if(typeof a!="function")throw new TypeError("executor must be a function.");let o;this.promise=new Promise(function(i){o=i});const s=this;this.promise.then(n=>{if(!s._listeners)return;let i=s._listeners.length;for(;i-- >0;)s._listeners[i](n);s._listeners=null}),this.promise.then=n=>{let i;const r=new Promise(c=>{s.subscribe(c),i=c}).then(n);return r.cancel=function(){s.unsubscribe(i)},r},a(function(i,r,c){s.reason||(s.reason=new As(i,r,c),o(s.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(a){if(this.reason){a(this.reason);return}this._listeners?this._listeners.push(a):this._listeners=[a]}unsubscribe(a){if(!this._listeners)return;const o=this._listeners.indexOf(a);o!==-1&&this._listeners.splice(o,1)}static source(){let a;return{token:new Ld(function(n){a=n}),cancel:a}}}const mV=Ld;function pV(e){return function(o){return e.apply(null,o)}}function hV(e){return L.isObject(e)&&e.isAxiosError===!0}const jd={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(jd).forEach(([e,a])=>{jd[a]=e});const gV=jd;function y1(e){const a=new Di(e),o=Du(Di.prototype.request,a);return L.extend(o,Di.prototype,a,{allOwnKeys:!0}),L.extend(o,a,null,{allOwnKeys:!0}),o.create=function(n){return y1(xo(e,n))},o}const Me=y1(Od);Me.Axios=Di,Me.CanceledError=As,Me.CancelToken=mV,Me.isCancel=i1,Me.VERSION=h1,Me.toFormData=zi,Me.AxiosError=me,Me.Cancel=Me.CanceledError,Me.all=function(a){return Promise.all(a)},Me.spread=pV,Me.isAxiosError=hV,Me.mergeConfig=xo,Me.AxiosHeaders=Va,Me.formToJSON=e=>s1(L.isHTMLForm(e)?new FormData(e):e),Me.getAdapter=d1.getAdapter,Me.HttpStatusCode=gV,Me.default=Me;const Li=Me,u1="/icn-play.svg",sMe="",yV={components:{BarraLeft:ZB,BarraRight:sx},props:{data:{type:Object,required:!1},showPlayButton:{type:Boolean,value:!0}},data(){return{gamesBySeason:{}}},computed:{...kt("nextGeneral",["gameForAnalysis","seasonId"]),...Te("nextGeneral",["homeTeam","visitingTeam"])},methods:{onclickPlayVideos(e){var a=[];e.type==2?e.position_id==1?e.category==0?a=[55,324,323,608,39,774,802,52,53,40,54]:a=e.category:e.category==0?a=[12,35,10,27,607,61,519,98,101,109,112,121,122,127,128,135,136,141,142,161,170,179,702,730,466,217,211,232,235,239,242,282,284,289,291,296,485,486,487,488,14,15,257]:a=e.category:e.type==3?e.category==0?a=[607,608,12,55,54,35,14,52,15,53,466,477,40,257,39]:a=e.category:e.category!=0?a=e.category:a=[607,608,12,55,54,35,14,52,15,53,466,477];const o=[1,2,3];let s={seasonId:e.season_id,mainSectionType:1,playListType:e.type,categoryIds:a,gameIds:this.gameForAnalysis.game_status!==4?[this.gameForAnalysis.game_id]:null,playerIds:e.position_id!=1?e.player_id?[e.player_id]:[]:[],goalkeeperIds:e.position_id==1?e.player_id?[e.player_id]:[]:[],teamId:e.team_id?e.team_id:0,matchResult:e.matchResult?[e.matchResult]:o,playData:{},advancedFilter:{playListTitle:""}};e.category!==0&&(s.advancedFilter.mainCategoryId=e.category),this.$emit("openmedia",s)},hVal(e){return this.getTeamValue(e,this.gameForAnalysis,"homeTeam")},aVal(e){return this.getTeamValue(e,this.gameForAnalysis,"visitingTeam")},deleteDecimalZero(e){const a=typeof e=="string"?parseFloat(e):e;return typeof a=="number"&&!isNaN(a)?a%1===0?a:a%1===0?Math.floor(a):a:e},formatNumbers(e){return e%1!==0?e.toFixed(1):e},getTeamValue(e,a,o){if(!a.game_id)return this.objectZeroValues;const s=e.generalCategoriesIds.accomplished===3;if(a.is_live){const n=e.homeTeam.accomplished.totalLive+e.visitingTeam.accomplished.totalLive;return n?{numberValue:s?e[o].accomplished.totalLive/n*100:e[o].accomplished.totalLive,numberBarPercent:e[o].accomplished.totalLive/n}:this.objectZeroValues}else if(a.is_live||a.game_status===1){const n=e.homeTeam.accomplished.totalPostGame+e.visitingTeam.accomplished.totalPostGame;return n?{numberValue:s?e[o].accomplished.totalPostGame/n*100:e[o].accomplished.totalPostGame,numberBarPercent:e[o].accomplished.totalPostGame/n}:this.objectZeroValues}if(s){const n=e.homeTeam.accomplished.avgPostGame+e.visitingTeam.accomplished.avgPostGame,i=e[o].accomplished.avgPostGame/n;return e[o].accomplished.avgPostGame?{numberValue:i<1?i*100:i,numberBarPercent:e[o].accomplished.avgPostGame/n}:this.objectZeroValues}else{const n=e.homeTeam.accomplished.avgPostGame+e.visitingTeam.accomplished.avgPostGame;return e[o].accomplished.avgPostGame?{numberValue:e[o].accomplished.avgPostGame,numberBarPercent:e[o].accomplished.avgPostGame/n}:this.objectZeroValues}},async getGamesBySeasonV2(){try{const e={Authorization:this.token},o=`${this.apiUrl}${this.seasonId}/games/${this.gameId}`;return(await Li.get(o,{headers:e})).data}catch(e){return Promise.reject(e)}}},async mounted(){}},f1=e=>(t.pushScopeId("data-v-fec7a523"),e=e(),t.popScopeId(),e),uV={class:"card"},fV={class:"card__header"},_V={class:"card__stats"},bV=["onClick"],wV=[f1(()=>t.createElementVNode("img",{src:u1},null,-1))],CV={key:1,class:"card__stats__stat__button_empty"},kV={class:"card__stats__title"},SV={class:"card__stats__scores"},EV={key:0},NV={key:1},$V={key:2},BV={key:3},xV={class:"card__stats__bars"},VV=["onClick"],IV=[f1(()=>t.createElementVNode("img",{src:u1},null,-1))],AV={key:1,class:"card__stats__stat__button_empty"};function OV(e,a,o,s,n,i){const r=t.resolveComponent("BarraLeft"),c=t.resolveComponent("BarraRight");return t.openBlock(),t.createElementBlock("div",uV,[t.createElementVNode("span",fV,t.toDisplayString(o.data.name),1),t.createElementVNode("div",_V,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.data.subcategories,(g,d)=>(t.openBlock(),t.createElementBlock("div",{key:d,class:"card__stats__stat"},[t.createElementVNode("div",null,[i.hVal(g)&&i.hVal(g).numberValue!="0"?(t.openBlock(),t.createElementBlock("div",{key:0,onClick:l=>i.onclickPlayVideos({category:g.accomplishedCategoryIds,type:3,season_id:e.seasonId,team_id:e.homeTeam.team_id}),class:"card__stats__stat__button card__stats__stat__button_left"},wV,8,bV)):(t.openBlock(),t.createElementBlock("div",CV))]),t.createElementVNode("div",null,[t.createElementVNode("div",kV,t.toDisplayString(g.name)+t.toDisplayString(),1),t.createElementVNode("div",SV,[i.hVal(g)?(t.openBlock(),t.createElementBlock("span",EV,[t.createTextVNode(t.toDisplayString(i.deleteDecimalZero(i.formatNumbers(i.hVal(g).numberValue))),1),g.name=="Posesión"?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createTextVNode("%")],64)):t.createCommentVNode("",!0)])):(t.openBlock(),t.createElementBlock("span",NV,"0")),i.aVal(g)?(t.openBlock(),t.createElementBlock("span",$V,[t.createTextVNode(t.toDisplayString(i.deleteDecimalZero(i.formatNumbers(i.aVal(g).numberValue))),1),g.name=="Posesión"?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createTextVNode("%")],64)):t.createCommentVNode("",!0)])):(t.openBlock(),t.createElementBlock("span",BV,"0"))]),t.createElementVNode("div",xV,[t.createElementVNode("div",null,[i.hVal(g)?(t.openBlock(),t.createBlock(r,{key:0,postmatch:i.hVal(g).numberBarPercent},null,8,["postmatch"])):(t.openBlock(),t.createBlock(r,{key:1,postmatch:0}))]),t.createElementVNode("div",null,[i.aVal(g)?(t.openBlock(),t.createBlock(c,{key:0,postmatch:i.aVal(g).numberBarPercent},null,8,["postmatch"])):(t.openBlock(),t.createBlock(c,{key:1,postmatch:0}))])])]),t.createElementVNode("div",null,[i.aVal(g)&&i.aVal(g).numberValue!="0"?(t.openBlock(),t.createElementBlock("div",{key:0,onClick:l=>i.onclickPlayVideos({category:g.accomplishedCategoryIds,type:3,season_id:e.seasonId,team_id:e.visitingTeam.team_id}),class:"card__stats__stat__button card__stats__stat__button_right"},IV,8,VV)):(t.openBlock(),t.createElementBlock("div",AV))])]))),128))])])}const TV=Ae(yV,[["render",OV],["__scopeId","data-v-fec7a523"]]),rMe="",zV={name:"GscComparative",props:{local:{type:Object,default:()=>{}},away:{type:Object,default:()=>{}},fontFamily:{type:String,default:"inherit"}},data(){return{}},computed:{customStyle(){const e={};return this.fontFamily&&(e["font-family"]=`${this.fontFamily}`),e}},methods:{}},Ia=e=>(t.pushScopeId("data-v-c7dcae1a"),e=e(),t.popScopeId(),e),FV={class:"comparative-card"},RV=Ia(()=>t.createElementVNode("div",{class:"header-title"},[t.createElementVNode("span",null,"Comparativa")],-1)),PV={class:"versus"},DV={class:"team-badge"},LV=["src","alt"],jV=Ia(()=>t.createElementVNode("div",null,[t.createElementVNode("div",null,[t.createElementVNode("div"),t.createElementVNode("div")]),t.createElementVNode("div",null,[t.createElementVNode("div"),t.createElementVNode("div")])],-1)),vV=Ia(()=>t.createElementVNode("span",{class:"vs-text"},"VS",-1)),MV={class:"team-badge"},HV=["src","alt"],UV={class:"details"},GV={key:0},WV=Ia(()=>t.createElementVNode("td",null,"Posición en la tabla",-1)),qV=Ia(()=>t.createElementVNode("td",null,"Puntos",-1)),JV=Ia(()=>t.createElementVNode("td",null,"Partidos jugados",-1)),XV=Ia(()=>t.createElementVNode("td",null,"Partidos ganados",-1)),ZV=Ia(()=>t.createElementVNode("td",null,"Partidos perdidos",-1)),YV=Ia(()=>t.createElementVNode("td",null,"Partidos empatados",-1));function KV(e,a,o,s,n,i){return t.openBlock(),t.createElementBlock("div",{class:"comparative-main",style:t.normalizeStyle(i.customStyle)},[t.createElementVNode("div",FV,[RV,t.createElementVNode("div",PV,[t.createElementVNode("div",DV,[o.local?(t.openBlock(),t.createElementBlock("img",{key:0,class:"team-badge__image",src:o.local.team_logo,alt:o.local.team_name},null,8,LV)):t.createCommentVNode("",!0),jV]),vV,t.createElementVNode("div",MV,[o.away?(t.openBlock(),t.createElementBlock("img",{key:0,class:"team-badge__image",src:o.away.team_logo,alt:o.away.team_name},null,8,HV)):t.createCommentVNode("",!0)])]),t.createElementVNode("div",UV,[o.away&&o.local?(t.openBlock(),t.createElementBlock("table",GV,[t.createElementVNode("tbody",null,[t.createElementVNode("tr",null,[t.createElementVNode("td",null,t.toDisplayString(o.local.table_position),1),WV,t.createElementVNode("td",null,t.toDisplayString(o.away.table_position),1)]),t.createElementVNode("tr",null,[t.createElementVNode("td",null,t.toDisplayString(o.local.points),1),qV,t.createElementVNode("td",null,t.toDisplayString(o.away.points),1)]),t.createElementVNode("tr",null,[t.createElementVNode("td",null,t.toDisplayString(o.local.games_played),1),JV,t.createElementVNode("td",null,t.toDisplayString(o.away.games_played),1)]),t.createElementVNode("tr",null,[t.createElementVNode("td",null,t.toDisplayString(o.local.games_won),1),XV,t.createElementVNode("td",null,t.toDisplayString(o.away.games_won),1)]),t.createElementVNode("tr",null,[t.createElementVNode("td",null,t.toDisplayString(o.local.games_lost),1),ZV,t.createElementVNode("td",null,t.toDisplayString(o.away.games_lost),1)]),t.createElementVNode("tr",null,[t.createElementVNode("td",null,t.toDisplayString(o.local.games_tied),1),YV,t.createElementVNode("td",null,t.toDisplayString(o.away.games_tied),1)])])])):t.createCommentVNode("",!0)])])],4)}const QV=Ae(zV,[["render",KV],["__scopeId","data-v-c7dcae1a"]]),lMe="",eI=(e,a)=>{const o=e.__vccOpts||e;for(const[s,n]of a)o[s]=n;return o},vd={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)}}},_1=()=>{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}))},b1=vd.setup;vd.setup=b1?(e,a)=>(_1(),b1(e,a)):_1;const tI={ref:"gscScrollableContainer",class:"scrollable-container"},aI={class:"scrollable-arrows"},oI=["width","height","viewBox"],sI=["stroke"],nI={class:"scrollable-wrapper"},iI={class:"scrollable-arrows"},rI=["width","height","viewBox"],lI=["stroke"];function cI(e,a,o,s,n,i){return t.openBlock(),t.createElementBlock("div",tI,[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",aI,[(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,sI)],8,oI))])],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",nI,[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",iI,[(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,lI)],8,rI))])],2)):t.createCommentVNode("",!0)],512)}const Md=eI(vd,[["render",cI],["__scopeId","data-v-b548a08d"]]),cMe="";let w1=null;const dI={name:"App",components:{GscLinearTeamStats:TV,TableComparative:QV,GSCSlider:Md},props:{seasonSelected:{type:Object,default:()=>({})}},computed:{...kt("nextGeneral",["gameForAnalysis","seasonId"]),...Te("nextGeneral",["arrayFilledDataSortedByPriority"])},watch:{gameForAnalysis:{handler:function(){this.getTableList()},immediate:!0}},data(){return{gamesContainerWidth:0,token:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MCwibmFtZSI6IlVzdWFyaW8gRnJlZSIsInVzZXJuYW1lIjoiZnJlZUBnb2xzdGF0cy5jb20iLCJlbWFpbCI6ImZyZWVAZ29sc3RhdHMuY29tIiwiaWF0IjoxNjA2NzU4Nzk1LCJleHAiOjE2MzgyOTQ3OTV9.kPNmP7yDtk38cAXrUyc7OHRh6J25VFqy-XUNzbK-4YE",url:"https://jfxv8fqkn3.execute-api.us-west-2.amazonaws.com/prod/generalTable/",gameId:79623,movil:!1,home:null,away:null}},methods:{openmedia(e){this.$emit("openmedia",e)},setUpResizeObserver(){if(window.ResizeObserver)w1=new ResizeObserver(()=>{this.gamesContainerWidth=this.$refs.gamesContainer.clientWidth,this.gamesContainerWidth<680?this.movil=!0:this.movil=!1}),w1.observe(this.$refs.gamesContainer);else throw new Error("Resize observer not supported!")},async getTableList(){try{const a=await Li.create({headers:{Authorization:`${this.token}`}}).get(this.url+this.seasonSelected.id),o=a.data.data.findIndex(n=>n.team_id===this.gameForAnalysis.home_team),s=a.data.data.findIndex(n=>n.team_id===this.gameForAnalysis.visiting_team);this.home=a.data.data[o],this.away=a.data.data[s]}catch(e){console.error(e)}}},mounted(){setTimeout(()=>{this.setUpResizeObserver()},100)}},mI={class:"container",ref:"gamesContainer"},pI={key:0,class:"grid-container"},hI={key:0,class:"item"},gI={class:"item"},yI={class:"item"},uI={class:"item"},fI={class:"item"},_I={class:"item"},bI={class:"item"},wI={class:"grid-container"},CI={key:0,class:"item-comparative"},kI={class:"table-movil-container"};function SI(e,a,o,s,n,i){const r=t.resolveComponent("TableComparative"),c=t.resolveComponent("GscLinearTeamStats"),g=t.resolveComponent("GSCSlider");return t.openBlock(),t.createElementBlock("div",mI,[n.movil?(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createElementVNode("div",wI,[n.home&&n.away?(t.openBlock(),t.createElementBlock("div",CI,[t.createVNode(r,{local:n.home,away:n.away,fontFamily:"Poppins-Light"},null,8,["local","away"])])):t.createCommentVNode("",!0)]),t.createVNode(g,{backgroundColor:"none",pxScroll:300,scrollColor:"none",arrowsPosition:"relative",arrowsScrollHide:!1,arrowsBackground:"rgba(255,255,255,.16)",arrowsContainerBgL:"none",arrowsContainerBgR:"none",arrowsMargin:0,arrowsRadius:"50%",arrowsBorder:"#ddd"},{default:t.withCtx(()=>[t.createElementVNode("div",kI,[t.createElementVNode("div",{class:"item-movil",style:t.normalizeStyle(n.gamesContainerWidth<510&&n.gamesContainerWidth>450?"width: 400px":n.gamesContainerWidth<=450?"width: 360px":"")},[t.createVNode(c,{onOpenmedia:i.openmedia,data:e.arrayFilledDataSortedByPriority[0]},null,8,["onOpenmedia","data"])],4),t.createElementVNode("div",{class:"item-movil",style:t.normalizeStyle(n.gamesContainerWidth<510?"width: 400px":n.gamesContainerWidth<450?"width: 360px":"")},[t.createVNode(c,{onOpenmedia:i.openmedia,data:e.arrayFilledDataSortedByPriority[1]},null,8,["onOpenmedia","data"])],4),t.createElementVNode("div",{class:"item-movil",style:t.normalizeStyle(n.gamesContainerWidth<510?"width: 400px":n.gamesContainerWidth<450?"width: 360px":"")},[t.createVNode(c,{onOpenmedia:i.openmedia,data:e.arrayFilledDataSortedByPriority[2]},null,8,["onOpenmedia","data"])],4),t.createElementVNode("div",{class:"item-movil",style:t.normalizeStyle(n.gamesContainerWidth<510?"width: 400px":n.gamesContainerWidth<450?"width: 360px":"")},[t.createVNode(c,{onOpenmedia:i.openmedia,data:e.arrayFilledDataSortedByPriority[3]},null,8,["onOpenmedia","data"])],4),t.createElementVNode("div",{class:"item-movil",style:t.normalizeStyle(n.gamesContainerWidth<510?"width: 400px":n.gamesContainerWidth<450?"width: 360px":"")},[t.createVNode(c,{onOpenmedia:i.openmedia,data:e.arrayFilledDataSortedByPriority[4]},null,8,["onOpenmedia","data"])],4),t.createElementVNode("div",{class:"item-movil",style:t.normalizeStyle(n.gamesContainerWidth<510?"width: 400px":n.gamesContainerWidth<450?"width: 360px":"")},[t.createVNode(c,{onOpenmedia:i.openmedia,data:e.arrayFilledDataSortedByPriority[5]},null,8,["onOpenmedia","data"])],4)])]),_:1})],64)):(t.openBlock(),t.createElementBlock("div",pI,[n.home&&n.away?(t.openBlock(),t.createElementBlock("div",hI,[t.createVNode(r,{local:n.home,away:n.away,fontFamily:"Poppins-Light"},null,8,["local","away"])])):t.createCommentVNode("",!0),t.createElementVNode("div",gI,[t.createVNode(c,{data:e.arrayFilledDataSortedByPriority[0],onOpenmedia:i.openmedia},null,8,["data","onOpenmedia"])]),t.createElementVNode("div",yI,[t.createVNode(c,{data:e.arrayFilledDataSortedByPriority[1],onOpenmedia:i.openmedia},null,8,["data","onOpenmedia"])]),t.createElementVNode("div",uI,[t.createVNode(c,{data:e.arrayFilledDataSortedByPriority[2],onOpenmedia:i.openmedia},null,8,["data","onOpenmedia"])]),t.createElementVNode("div",fI,[t.createVNode(c,{data:e.arrayFilledDataSortedByPriority[3],onOpenmedia:i.openmedia},null,8,["data","onOpenmedia"])]),t.createElementVNode("div",_I,[t.createVNode(c,{data:e.arrayFilledDataSortedByPriority[4],onOpenmedia:i.openmedia},null,8,["data","onOpenmedia"])]),t.createElementVNode("div",bI,[t.createVNode(c,{data:e.arrayFilledDataSortedByPriority[5],onOpenmedia:i.openmedia},null,8,["data","onOpenmedia"])])]))],512)}const EI=Ae(dI,[["render",SI]]),dMe="",mMe="",C1=["#cbee6b","#0033C5"],NI={name:"distributionchart",components:{},props:{seasonSelected:{type:Object,default:()=>({})}},data(){return{arrayChartTypes:["General","Ofensivo","Defensivo","Posesión","Balón parado","Infracciones"],height:409,updateCategory:0,homeTeamSelectedPlaysType:0,visitingTeamSelectedPlaysType:0,chartKeyCounter:0,homeTeamPlaysTypes:{history:0,live:1},visitingTeamPlaysTypes:{history:0,live:1},tooltip:{show:!1,data:{},names:{},keyName:"",leagueAvg:"",showLiveData:!1,local:!1,x:0,y:0},globals:{x:0,y:0},arrayDataForCharts:[],arrayChartOptions:[],arrayFilledSeries:[]}},watch:{menuOptionActive(){this.idAssetSelected==3},idAssetSelected(){this.idAssetSelected===3&&this.chartKeyCounter++},isMobile(e){this.chartOptions.legend.horizontalAlign=e?"center":"left",this.chartKeyCounter++},arrayFilledDataSortedByPriority:{immediate:!0,deep:!0,handler(){this.fillData(),this.updateCategory++}},showLiveData(){this.fillData()}},computed:{...kt("nextGeneral",["showLiveData","gameForAnalysis"]),...Te("nextGeneral",["idAssetSelected","menuOptionActive","homeTeamStatisticsType","showPostMatchData","visitingTeamStatisticsType","homeTeam","visitingTeam","subcategoryName","accomplished","arrayFilledDataSortedByPriority","filledDataStructure","showPostMatchData"]),isMobile(){return this.$mq==="mobile"},timeLeft(){const e=new Date().getTime(),o=new Date(this.gameForAnalysis.date_time_utc).getTime()-e,s=Math.floor(o/(1e3*60*60*24)),n=Math.floor(o%(1e3*60*60*24)/(1e3*60*60)),i=Math.floor(o%(1e3*60*60)/(1e3*60)),r=Math.floor(o%(1e3*60)/1e3);let c="";return r>0&&(c=r==1?r+" segundo":r+" segundos"),i>0&&(c=i==1?i+" minuto":i+" minutos"),n>0&&(c=n==1?n+" hora":n+" horas"),s>0&&(c=s==1?s+" día":s+" días"),c}},methods:{avg(e,a){return a?e.leagueAccomplishedAvg:e.leagueReceivedAvg},fillData(){this.arrayChartOptions=[],this.arrayFilledDataSortedByPriority&&this.arrayFilledDataSortedByPriority.length&&typeof this.arrayFilledDataSortedByPriority[0].subcategories=="object"?(this.arrayChartOptions=[],this.arrayFilledSeries=[],this.arrayDataForCharts=this.arrayFilledDataSortedByPriority.map(e=>{const a=this.getChartOptions();return this.arrayFilledSeries.push(this.getChartSeries(e.subcategories,a)),this.arrayChartOptions.push(a),e})):this.arrayDataForCharts=[]},getChartOptions(){return{plotOptions:{radar:{size:132,polygons:{strokeColors:"#606971"}}},chart:{type:"radar",height:509,toolbar:{show:!1}},colors:C1,fill:{colors:C1,opacity:.4},legend:{show:!0,position:"bottom",horizontalAlign:"left",fontSize:"11px",fontFamily:"Poppins-Regular",labels:{colors:"#d9d9d9",useSeriesColors:!1}},xaxis:{categories:[],labels:{show:!0,style:{fontSize:"11px",fontFamily:"Poppins-Regular"}}},yaxis:{show:!1},responsive:[{breakpoint:770,options:{chart:{height:300},plotOptions:{radar:{size:100,offsetY:10,polygons:{strokeColors:"#606971"}},bar:{horizontal:!1}},legend:{position:"top",horizontalAlign:"center"},xaxis:{labels:{show:!0,style:{fontSize:"11px"}}}}},{breakpoint:450,options:{plotOptions:{radar:{size:70,offsetY:-20,polygons:{strokeColors:"#dcdcdc"}},bar:{horizontal:!1}},legend:{position:"top",horizontalAlign:"center"},xaxis:{labels:{show:!0,style:{fontSize:"10px"}}}}}],tooltip:{intersect:!0,followCursor:!0,shared:!1,theme:"dark",style:{fontSize:"12px"},custom:function({series:e,seriesIndex:a,dataPointIndex:o,w:s}){const n=s.config.arraySubcategories[o].name,i=s.config.series[a].name,r=s.config.series[a].dataTotal[o],c=e[a][o];return s.config.arraySubcategories[o].id==="3-0"?`
|
|
23
|
+
`+i):s.stack=i}throw s}}_request(a,o){typeof a=="string"?(o=o||{},o.url=a):o=a||{},o=xo(this.defaults,o);const{transitional:s,paramsSerializer:n,headers:i}=o;s!==void 0&&Dd.assertOptions(s,{silentJSONParsing:Ga.transitional(Ga.boolean),forcedJSONParsing:Ga.transitional(Ga.boolean),clarifyTimeoutError:Ga.transitional(Ga.boolean)},!1),n!=null&&(L.isFunction(n)?o.paramsSerializer={serialize:n}:Dd.assertOptions(n,{encode:Ga.function,serialize:Ga.function},!0)),o.method=(o.method||this.defaults.method||"get").toLowerCase();let r=i&&L.merge(i.common,i[o.method]);i&&L.forEach(["delete","get","head","post","put","patch","common"],p=>{delete i[p]}),o.headers=Va.concat(r,i);const c=[];let g=!0;this.interceptors.request.forEach(function(u){typeof u.runWhen=="function"&&u.runWhen(o)===!1||(g=g&&u.synchronous,c.unshift(u.fulfilled,u.rejected))});const d=[];this.interceptors.response.forEach(function(u){d.push(u.fulfilled,u.rejected)});let l,m=0,h;if(!g){const p=[m1.bind(this),void 0];for(p.unshift.apply(p,c),p.push.apply(p,d),h=p.length,l=Promise.resolve(o);m<h;)l=l.then(p[m++],p[m++]);return l}h=c.length;let y=o;for(m=0;m<h;){const p=c[m++],u=c[m++];try{y=p(y)}catch(f){u.call(this,f);break}}try{l=m1.call(this,y)}catch(p){return Promise.reject(p)}for(m=0,h=d.length;m<h;)l=l.then(d[m++],d[m++]);return l}getUri(a){a=xo(this.defaults,a);const o=r1(a.baseURL,a.url);return e1(o,a.params,a.paramsSerializer)}}L.forEach(["delete","get","head","options"],function(a){Pi.prototype[a]=function(o,s){return this.request(xo(s||{},{method:a,url:o,data:(s||{}).data}))}}),L.forEach(["post","put","patch"],function(a){function o(s){return function(i,r,c){return this.request(xo(c||{},{method:a,headers:s?{"Content-Type":"multipart/form-data"}:{},url:i,data:r}))}}Pi.prototype[a]=o(),Pi.prototype[a+"Form"]=o(!0)});const Di=Pi;class Ld{constructor(a){if(typeof a!="function")throw new TypeError("executor must be a function.");let o;this.promise=new Promise(function(i){o=i});const s=this;this.promise.then(n=>{if(!s._listeners)return;let i=s._listeners.length;for(;i-- >0;)s._listeners[i](n);s._listeners=null}),this.promise.then=n=>{let i;const r=new Promise(c=>{s.subscribe(c),i=c}).then(n);return r.cancel=function(){s.unsubscribe(i)},r},a(function(i,r,c){s.reason||(s.reason=new As(i,r,c),o(s.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(a){if(this.reason){a(this.reason);return}this._listeners?this._listeners.push(a):this._listeners=[a]}unsubscribe(a){if(!this._listeners)return;const o=this._listeners.indexOf(a);o!==-1&&this._listeners.splice(o,1)}static source(){let a;return{token:new Ld(function(n){a=n}),cancel:a}}}const mV=Ld;function pV(e){return function(o){return e.apply(null,o)}}function hV(e){return L.isObject(e)&&e.isAxiosError===!0}const jd={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(jd).forEach(([e,a])=>{jd[a]=e});const gV=jd;function y1(e){const a=new Di(e),o=Du(Di.prototype.request,a);return L.extend(o,Di.prototype,a,{allOwnKeys:!0}),L.extend(o,a,null,{allOwnKeys:!0}),o.create=function(n){return y1(xo(e,n))},o}const Me=y1(Od);Me.Axios=Di,Me.CanceledError=As,Me.CancelToken=mV,Me.isCancel=i1,Me.VERSION=h1,Me.toFormData=zi,Me.AxiosError=me,Me.Cancel=Me.CanceledError,Me.all=function(a){return Promise.all(a)},Me.spread=pV,Me.isAxiosError=hV,Me.mergeConfig=xo,Me.AxiosHeaders=Va,Me.formToJSON=e=>s1(L.isHTMLForm(e)?new FormData(e):e),Me.getAdapter=d1.getAdapter,Me.HttpStatusCode=gV,Me.default=Me;const Li=Me,u1="/icn-play.svg",sMe="",yV={components:{BarraLeft:ZB,BarraRight:sx},props:{data:{type:Object,required:!1},showPlayButton:{type:Boolean,value:!0}},data(){return{gamesBySeason:{}}},computed:{...kt("nextGeneral",["gameForAnalysis","seasonId"]),...Te("nextGeneral",["homeTeam","visitingTeam"])},methods:{onclickPlayVideos(e){var a=[];e.type==2?e.position_id==1?e.category==0?a=[55,324,323,608,39,774,802,52,53,40,54]:a=e.category:e.category==0?a=[12,35,10,27,607,61,519,98,101,109,112,121,122,127,128,135,136,141,142,161,170,179,702,730,466,217,211,232,235,239,242,282,284,289,291,296,485,486,487,488,14,15,257]:a=e.category:e.type==3?e.category==0?a=[607,608,12,55,54,35,14,52,15,53,466,477,40,257,39]:a=e.category:e.category!=0?a=e.category:a=[607,608,12,55,54,35,14,52,15,53,466,477];const o=[1,2,3];let s={seasonId:e.season_id,mainSectionType:1,playListType:e.type,categoryIds:a,gameIds:this.gameForAnalysis.game_status!==4?[this.gameForAnalysis.game_id]:null,playerIds:e.position_id!=1?e.player_id?[e.player_id]:[]:[],goalkeeperIds:e.position_id==1?e.player_id?[e.player_id]:[]:[],teamId:e.team_id?e.team_id:0,matchResult:e.matchResult?[e.matchResult]:o,playData:{},advancedFilter:{playListTitle:""}};e.category!==0&&(s.advancedFilter.mainCategoryId=e.category),this.$emit("openmedia",s)},hVal(e){return this.getTeamValue(e,this.gameForAnalysis,"homeTeam")},aVal(e){return this.getTeamValue(e,this.gameForAnalysis,"visitingTeam")},deleteDecimalZero(e){const a=typeof e=="string"?parseFloat(e):e;return typeof a=="number"&&!isNaN(a)?a%1===0?a:a%1===0?Math.floor(a):a:e},formatNumbers(e){return e%1!==0?e.toFixed(1):e},getTeamValue(e,a,o){if(!a.game_id)return this.objectZeroValues;const s=e.generalCategoriesIds.accomplished===3;if(a.is_live){const n=e.homeTeam.accomplished.totalLive+e.visitingTeam.accomplished.totalLive;return n?{numberValue:s?e[o].accomplished.totalLive/n*100:e[o].accomplished.totalLive,numberBarPercent:e[o].accomplished.totalLive/n}:this.objectZeroValues}else if(a.is_live||a.game_status===1){const n=e.homeTeam.accomplished.totalPostGame+e.visitingTeam.accomplished.totalPostGame;return n?{numberValue:s?e[o].accomplished.totalPostGame/n*100:e[o].accomplished.totalPostGame,numberBarPercent:e[o].accomplished.totalPostGame/n}:this.objectZeroValues}if(s){const n=e.homeTeam.accomplished.avgPostGame+e.visitingTeam.accomplished.avgPostGame,i=e[o].accomplished.avgPostGame/n;return e[o].accomplished.avgPostGame?{numberValue:i<1?i*100:i,numberBarPercent:e[o].accomplished.avgPostGame/n}:this.objectZeroValues}else{const n=e.homeTeam.accomplished.avgPostGame+e.visitingTeam.accomplished.avgPostGame;return e[o].accomplished.avgPostGame?{numberValue:e[o].accomplished.avgPostGame,numberBarPercent:e[o].accomplished.avgPostGame/n}:this.objectZeroValues}},async getGamesBySeasonV2(){try{const e={Authorization:this.token},o=`${this.apiUrl}${this.seasonId}/games/${this.gameId}`;return(await Li.get(o,{headers:e})).data}catch(e){return Promise.reject(e)}}},async mounted(){}},f1=e=>(t.pushScopeId("data-v-a93399df"),e=e(),t.popScopeId(),e),uV={class:"card"},fV={class:"card__header"},_V={class:"card__stats"},bV=["onClick"],wV=[f1(()=>t.createElementVNode("img",{src:u1},null,-1))],CV={key:1,class:"card__stats__stat__button_empty"},kV={class:"card__stats__title"},SV={class:"card__stats__scores"},EV={key:0},NV={key:1},$V={key:2},BV={key:3},xV={class:"card__stats__bars"},VV=["onClick"],IV=[f1(()=>t.createElementVNode("img",{src:u1},null,-1))],AV={key:1,class:"card__stats__stat__button_empty"};function OV(e,a,o,s,n,i){const r=t.resolveComponent("BarraLeft"),c=t.resolveComponent("BarraRight");return t.openBlock(),t.createElementBlock("div",uV,[t.createElementVNode("span",fV,t.toDisplayString(o.data.name),1),t.createElementVNode("div",_V,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.data.subcategories,(g,d)=>(t.openBlock(),t.createElementBlock("div",{key:d,class:"card__stats__stat"},[t.createElementVNode("div",null,[i.hVal(g)&&i.hVal(g).numberValue!="0"?(t.openBlock(),t.createElementBlock("div",{key:0,onClick:l=>i.onclickPlayVideos({category:g.accomplishedCategoryIds,type:3,season_id:e.seasonId,team_id:e.homeTeam.team_id}),class:"card__stats__stat__button card__stats__stat__button_left"},wV,8,bV)):(t.openBlock(),t.createElementBlock("div",CV))]),t.createElementVNode("div",null,[t.createElementVNode("div",kV,t.toDisplayString(g.name),1),t.createElementVNode("div",SV,[i.hVal(g)?(t.openBlock(),t.createElementBlock("span",EV,[t.createTextVNode(t.toDisplayString(i.deleteDecimalZero(i.formatNumbers(i.hVal(g).numberValue))),1),g.name=="Posesión"?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createTextVNode("%")],64)):t.createCommentVNode("",!0)])):(t.openBlock(),t.createElementBlock("span",NV,"0")),i.aVal(g)?(t.openBlock(),t.createElementBlock("span",$V,[t.createTextVNode(t.toDisplayString(i.deleteDecimalZero(i.formatNumbers(i.aVal(g).numberValue))),1),g.name=="Posesión"?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createTextVNode("%")],64)):t.createCommentVNode("",!0)])):(t.openBlock(),t.createElementBlock("span",BV,"0"))]),t.createElementVNode("div",xV,[t.createElementVNode("div",null,[i.hVal(g)?(t.openBlock(),t.createBlock(r,{key:0,postmatch:i.hVal(g).numberBarPercent},null,8,["postmatch"])):(t.openBlock(),t.createBlock(r,{key:1,postmatch:0}))]),t.createElementVNode("div",null,[i.aVal(g)?(t.openBlock(),t.createBlock(c,{key:0,postmatch:i.aVal(g).numberBarPercent},null,8,["postmatch"])):(t.openBlock(),t.createBlock(c,{key:1,postmatch:0}))])])]),t.createElementVNode("div",null,[i.aVal(g)&&i.aVal(g).numberValue!="0"?(t.openBlock(),t.createElementBlock("div",{key:0,onClick:l=>i.onclickPlayVideos({category:g.accomplishedCategoryIds,type:3,season_id:e.seasonId,team_id:e.visitingTeam.team_id}),class:"card__stats__stat__button card__stats__stat__button_right"},IV,8,VV)):(t.openBlock(),t.createElementBlock("div",AV))])]))),128))])])}const TV=Ae(yV,[["render",OV],["__scopeId","data-v-a93399df"]]),rMe="",zV={name:"GscComparative",props:{local:{type:Object,default:()=>{}},away:{type:Object,default:()=>{}},fontFamily:{type:String,default:"inherit"}},data(){return{}},computed:{customStyle(){const e={};return this.fontFamily&&(e["font-family"]=`${this.fontFamily}`),e}},methods:{}},Ia=e=>(t.pushScopeId("data-v-c7dcae1a"),e=e(),t.popScopeId(),e),FV={class:"comparative-card"},RV=Ia(()=>t.createElementVNode("div",{class:"header-title"},[t.createElementVNode("span",null,"Comparativa")],-1)),PV={class:"versus"},DV={class:"team-badge"},LV=["src","alt"],jV=Ia(()=>t.createElementVNode("div",null,[t.createElementVNode("div",null,[t.createElementVNode("div"),t.createElementVNode("div")]),t.createElementVNode("div",null,[t.createElementVNode("div"),t.createElementVNode("div")])],-1)),vV=Ia(()=>t.createElementVNode("span",{class:"vs-text"},"VS",-1)),MV={class:"team-badge"},HV=["src","alt"],UV={class:"details"},GV={key:0},WV=Ia(()=>t.createElementVNode("td",null,"Posición en la tabla",-1)),qV=Ia(()=>t.createElementVNode("td",null,"Puntos",-1)),JV=Ia(()=>t.createElementVNode("td",null,"Partidos jugados",-1)),XV=Ia(()=>t.createElementVNode("td",null,"Partidos ganados",-1)),ZV=Ia(()=>t.createElementVNode("td",null,"Partidos perdidos",-1)),YV=Ia(()=>t.createElementVNode("td",null,"Partidos empatados",-1));function KV(e,a,o,s,n,i){return t.openBlock(),t.createElementBlock("div",{class:"comparative-main",style:t.normalizeStyle(i.customStyle)},[t.createElementVNode("div",FV,[RV,t.createElementVNode("div",PV,[t.createElementVNode("div",DV,[o.local?(t.openBlock(),t.createElementBlock("img",{key:0,class:"team-badge__image",src:o.local.team_logo,alt:o.local.team_name},null,8,LV)):t.createCommentVNode("",!0),jV]),vV,t.createElementVNode("div",MV,[o.away?(t.openBlock(),t.createElementBlock("img",{key:0,class:"team-badge__image",src:o.away.team_logo,alt:o.away.team_name},null,8,HV)):t.createCommentVNode("",!0)])]),t.createElementVNode("div",UV,[o.away&&o.local?(t.openBlock(),t.createElementBlock("table",GV,[t.createElementVNode("tbody",null,[t.createElementVNode("tr",null,[t.createElementVNode("td",null,t.toDisplayString(o.local.table_position),1),WV,t.createElementVNode("td",null,t.toDisplayString(o.away.table_position),1)]),t.createElementVNode("tr",null,[t.createElementVNode("td",null,t.toDisplayString(o.local.points),1),qV,t.createElementVNode("td",null,t.toDisplayString(o.away.points),1)]),t.createElementVNode("tr",null,[t.createElementVNode("td",null,t.toDisplayString(o.local.games_played),1),JV,t.createElementVNode("td",null,t.toDisplayString(o.away.games_played),1)]),t.createElementVNode("tr",null,[t.createElementVNode("td",null,t.toDisplayString(o.local.games_won),1),XV,t.createElementVNode("td",null,t.toDisplayString(o.away.games_won),1)]),t.createElementVNode("tr",null,[t.createElementVNode("td",null,t.toDisplayString(o.local.games_lost),1),ZV,t.createElementVNode("td",null,t.toDisplayString(o.away.games_lost),1)]),t.createElementVNode("tr",null,[t.createElementVNode("td",null,t.toDisplayString(o.local.games_tied),1),YV,t.createElementVNode("td",null,t.toDisplayString(o.away.games_tied),1)])])])):t.createCommentVNode("",!0)])])],4)}const QV=Ae(zV,[["render",KV],["__scopeId","data-v-c7dcae1a"]]),lMe="",eI=(e,a)=>{const o=e.__vccOpts||e;for(const[s,n]of a)o[s]=n;return o},vd={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)}}},_1=()=>{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}))},b1=vd.setup;vd.setup=b1?(e,a)=>(_1(),b1(e,a)):_1;const tI={ref:"gscScrollableContainer",class:"scrollable-container"},aI={class:"scrollable-arrows"},oI=["width","height","viewBox"],sI=["stroke"],nI={class:"scrollable-wrapper"},iI={class:"scrollable-arrows"},rI=["width","height","viewBox"],lI=["stroke"];function cI(e,a,o,s,n,i){return t.openBlock(),t.createElementBlock("div",tI,[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",aI,[(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,sI)],8,oI))])],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",nI,[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",iI,[(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,lI)],8,rI))])],2)):t.createCommentVNode("",!0)],512)}const Md=eI(vd,[["render",cI],["__scopeId","data-v-b548a08d"]]),cMe="";let w1=null;const dI={name:"App",components:{GscLinearTeamStats:TV,TableComparative:QV,GSCSlider:Md},props:{seasonSelected:{type:Object,default:()=>({})}},computed:{...kt("nextGeneral",["gameForAnalysis","seasonId"]),...Te("nextGeneral",["arrayFilledDataSortedByPriority"])},watch:{gameForAnalysis:{handler:function(){this.getTableList()},immediate:!0}},data(){return{gamesContainerWidth:0,token:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MCwibmFtZSI6IlVzdWFyaW8gRnJlZSIsInVzZXJuYW1lIjoiZnJlZUBnb2xzdGF0cy5jb20iLCJlbWFpbCI6ImZyZWVAZ29sc3RhdHMuY29tIiwiaWF0IjoxNjA2NzU4Nzk1LCJleHAiOjE2MzgyOTQ3OTV9.kPNmP7yDtk38cAXrUyc7OHRh6J25VFqy-XUNzbK-4YE",url:"https://jfxv8fqkn3.execute-api.us-west-2.amazonaws.com/prod/generalTable/",gameId:79623,movil:!1,home:null,away:null}},methods:{openmedia(e){this.$emit("openmedia",e)},setUpResizeObserver(){if(window.ResizeObserver)w1=new ResizeObserver(()=>{this.gamesContainerWidth=this.$refs.gamesContainer.clientWidth,this.gamesContainerWidth<680?this.movil=!0:this.movil=!1}),w1.observe(this.$refs.gamesContainer);else throw new Error("Resize observer not supported!")},async getTableList(){try{const a=await Li.create({headers:{Authorization:`${this.token}`}}).get(this.url+this.seasonSelected.id),o=a.data.data.findIndex(n=>n.team_id===this.gameForAnalysis.home_team),s=a.data.data.findIndex(n=>n.team_id===this.gameForAnalysis.visiting_team);this.home=a.data.data[o],this.away=a.data.data[s]}catch(e){console.error(e)}}},mounted(){setTimeout(()=>{this.setUpResizeObserver()},100)}},mI={class:"container",ref:"gamesContainer"},pI={key:0,class:"grid-container"},hI={key:0,class:"item"},gI={class:"item"},yI={class:"item"},uI={class:"item"},fI={class:"item"},_I={class:"item"},bI={class:"item"},wI={class:"grid-container"},CI={key:0,class:"item-comparative"},kI={class:"table-movil-container"};function SI(e,a,o,s,n,i){const r=t.resolveComponent("TableComparative"),c=t.resolveComponent("GscLinearTeamStats"),g=t.resolveComponent("GSCSlider");return t.openBlock(),t.createElementBlock("div",mI,[n.movil?(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createElementVNode("div",wI,[n.home&&n.away?(t.openBlock(),t.createElementBlock("div",CI,[t.createVNode(r,{local:n.home,away:n.away,fontFamily:"Poppins-Light"},null,8,["local","away"])])):t.createCommentVNode("",!0)]),t.createVNode(g,{backgroundColor:"none",pxScroll:300,scrollColor:"none",arrowsPosition:"relative",arrowsScrollHide:!1,arrowsBackground:"rgba(255,255,255,.16)",arrowsContainerBgL:"none",arrowsContainerBgR:"none",arrowsMargin:0,arrowsRadius:"50%",arrowsBorder:"#ddd"},{default:t.withCtx(()=>[t.createElementVNode("div",kI,[t.createElementVNode("div",{class:"item-movil",style:t.normalizeStyle(n.gamesContainerWidth<510&&n.gamesContainerWidth>450?"width: 400px":n.gamesContainerWidth<=450?"width: 360px":"")},[t.createVNode(c,{onOpenmedia:i.openmedia,data:e.arrayFilledDataSortedByPriority[0]},null,8,["onOpenmedia","data"])],4),t.createElementVNode("div",{class:"item-movil",style:t.normalizeStyle(n.gamesContainerWidth<510?"width: 400px":n.gamesContainerWidth<450?"width: 360px":"")},[t.createVNode(c,{onOpenmedia:i.openmedia,data:e.arrayFilledDataSortedByPriority[1]},null,8,["onOpenmedia","data"])],4),t.createElementVNode("div",{class:"item-movil",style:t.normalizeStyle(n.gamesContainerWidth<510?"width: 400px":n.gamesContainerWidth<450?"width: 360px":"")},[t.createVNode(c,{onOpenmedia:i.openmedia,data:e.arrayFilledDataSortedByPriority[2]},null,8,["onOpenmedia","data"])],4),t.createElementVNode("div",{class:"item-movil",style:t.normalizeStyle(n.gamesContainerWidth<510?"width: 400px":n.gamesContainerWidth<450?"width: 360px":"")},[t.createVNode(c,{onOpenmedia:i.openmedia,data:e.arrayFilledDataSortedByPriority[3]},null,8,["onOpenmedia","data"])],4),t.createElementVNode("div",{class:"item-movil",style:t.normalizeStyle(n.gamesContainerWidth<510?"width: 400px":n.gamesContainerWidth<450?"width: 360px":"")},[t.createVNode(c,{onOpenmedia:i.openmedia,data:e.arrayFilledDataSortedByPriority[4]},null,8,["onOpenmedia","data"])],4),t.createElementVNode("div",{class:"item-movil",style:t.normalizeStyle(n.gamesContainerWidth<510?"width: 400px":n.gamesContainerWidth<450?"width: 360px":"")},[t.createVNode(c,{onOpenmedia:i.openmedia,data:e.arrayFilledDataSortedByPriority[5]},null,8,["onOpenmedia","data"])],4)])]),_:1})],64)):(t.openBlock(),t.createElementBlock("div",pI,[n.home&&n.away?(t.openBlock(),t.createElementBlock("div",hI,[t.createVNode(r,{local:n.home,away:n.away,fontFamily:"Poppins-Light"},null,8,["local","away"])])):t.createCommentVNode("",!0),t.createElementVNode("div",gI,[t.createVNode(c,{data:e.arrayFilledDataSortedByPriority[0],onOpenmedia:i.openmedia},null,8,["data","onOpenmedia"])]),t.createElementVNode("div",yI,[t.createVNode(c,{data:e.arrayFilledDataSortedByPriority[1],onOpenmedia:i.openmedia},null,8,["data","onOpenmedia"])]),t.createElementVNode("div",uI,[t.createVNode(c,{data:e.arrayFilledDataSortedByPriority[2],onOpenmedia:i.openmedia},null,8,["data","onOpenmedia"])]),t.createElementVNode("div",fI,[t.createVNode(c,{data:e.arrayFilledDataSortedByPriority[3],onOpenmedia:i.openmedia},null,8,["data","onOpenmedia"])]),t.createElementVNode("div",_I,[t.createVNode(c,{data:e.arrayFilledDataSortedByPriority[4],onOpenmedia:i.openmedia},null,8,["data","onOpenmedia"])]),t.createElementVNode("div",bI,[t.createVNode(c,{data:e.arrayFilledDataSortedByPriority[5],onOpenmedia:i.openmedia},null,8,["data","onOpenmedia"])])]))],512)}const EI=Ae(dI,[["render",SI]]),dMe="",mMe="",C1=["#cbee6b","#0033C5"],NI={name:"distributionchart",components:{},props:{seasonSelected:{type:Object,default:()=>({})}},data(){return{arrayChartTypes:["General","Ofensivo","Defensivo","Posesión","Balón parado","Infracciones"],height:409,updateCategory:0,homeTeamSelectedPlaysType:0,visitingTeamSelectedPlaysType:0,chartKeyCounter:0,homeTeamPlaysTypes:{history:0,live:1},visitingTeamPlaysTypes:{history:0,live:1},tooltip:{show:!1,data:{},names:{},keyName:"",leagueAvg:"",showLiveData:!1,local:!1,x:0,y:0},globals:{x:0,y:0},arrayDataForCharts:[],arrayChartOptions:[],arrayFilledSeries:[]}},watch:{menuOptionActive(){this.idAssetSelected==3},idAssetSelected(){this.idAssetSelected===3&&this.chartKeyCounter++},isMobile(e){this.chartOptions.legend.horizontalAlign=e?"center":"left",this.chartKeyCounter++},arrayFilledDataSortedByPriority:{immediate:!0,deep:!0,handler(){this.fillData(),this.updateCategory++}},showLiveData(){this.fillData()}},computed:{...kt("nextGeneral",["showLiveData","gameForAnalysis"]),...Te("nextGeneral",["idAssetSelected","menuOptionActive","homeTeamStatisticsType","showPostMatchData","visitingTeamStatisticsType","homeTeam","visitingTeam","subcategoryName","accomplished","arrayFilledDataSortedByPriority","filledDataStructure","showPostMatchData"]),isMobile(){return this.$mq==="mobile"},timeLeft(){const e=new Date().getTime(),o=new Date(this.gameForAnalysis.date_time_utc).getTime()-e,s=Math.floor(o/(1e3*60*60*24)),n=Math.floor(o%(1e3*60*60*24)/(1e3*60*60)),i=Math.floor(o%(1e3*60*60)/(1e3*60)),r=Math.floor(o%(1e3*60)/1e3);let c="";return r>0&&(c=r==1?r+" segundo":r+" segundos"),i>0&&(c=i==1?i+" minuto":i+" minutos"),n>0&&(c=n==1?n+" hora":n+" horas"),s>0&&(c=s==1?s+" día":s+" días"),c}},methods:{avg(e,a){return a?e.leagueAccomplishedAvg:e.leagueReceivedAvg},fillData(){this.arrayChartOptions=[],this.arrayFilledDataSortedByPriority&&this.arrayFilledDataSortedByPriority.length&&typeof this.arrayFilledDataSortedByPriority[0].subcategories=="object"?(this.arrayChartOptions=[],this.arrayFilledSeries=[],this.arrayDataForCharts=this.arrayFilledDataSortedByPriority.map(e=>{const a=this.getChartOptions();return this.arrayFilledSeries.push(this.getChartSeries(e.subcategories,a)),this.arrayChartOptions.push(a),e})):this.arrayDataForCharts=[]},getChartOptions(){return{plotOptions:{radar:{size:132,polygons:{strokeColors:"#606971"}}},chart:{type:"radar",height:509,toolbar:{show:!1}},colors:C1,fill:{colors:C1,opacity:.4},legend:{show:!0,position:"bottom",horizontalAlign:"left",fontSize:"11px",fontFamily:"Poppins-Regular",labels:{colors:"#d9d9d9",useSeriesColors:!1}},xaxis:{categories:[],labels:{show:!0,style:{fontSize:"11px",fontFamily:"Poppins-Regular"}}},yaxis:{show:!1},responsive:[{breakpoint:770,options:{chart:{height:300},plotOptions:{radar:{size:100,offsetY:10,polygons:{strokeColors:"#606971"}},bar:{horizontal:!1}},legend:{position:"top",horizontalAlign:"center"},xaxis:{labels:{show:!0,style:{fontSize:"11px"}}}}},{breakpoint:450,options:{plotOptions:{radar:{size:70,offsetY:-20,polygons:{strokeColors:"#dcdcdc"}},bar:{horizontal:!1}},legend:{position:"top",horizontalAlign:"center"},xaxis:{labels:{show:!0,style:{fontSize:"10px"}}}}}],tooltip:{intersect:!0,followCursor:!0,shared:!1,theme:"dark",style:{fontSize:"12px"},custom:function({series:e,seriesIndex:a,dataPointIndex:o,w:s}){const n=s.config.arraySubcategories[o].name,i=s.config.series[a].name,r=s.config.series[a].dataTotal[o],c=e[a][o];return s.config.arraySubcategories[o].id==="3-0"?`
|
|
24
24
|
<div class="custom-tooltip-apexchart" style="display: none !important;">
|
|
25
25
|
<div class="__title">${n}:</div>
|
|
26
26
|
<div class="__totals">${i}: ${c}%</div>
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
<div class="__title">${n}:</div>
|
|
31
31
|
<div class="__totals">${i}: ${r}</div>
|
|
32
32
|
</div>
|
|
33
|
-
`}}}},getChartSeries(e,a){let o,s;return this.showPostMatchData?(o={name:`${this.homeTeam.acronym}`,data:[],dataTotal:[]},s={name:`${this.visitingTeam.acronym}`,data:[],dataTotal:[]},a.arraySubcategories=[],Object.values(e).forEach((n,i)=>{a.xaxis.categories.push(this.prepareLabels(n,i)),a.arraySubcategories.push(n);const r=n.homeTeam[this.homeTeamStatisticsType].totalPostGame+n.visitingTeam[this.visitingTeamStatisticsType].totalPostGame;o.data.push(Math.round(120*(r?n.homeTeam[this.homeTeamStatisticsType].totalPostGame/r:0))),o.dataTotal.push(n.homeTeam[this.homeTeamStatisticsType].totalPostGame),s.data.push(Math.round(120*(r?n.visitingTeam[this.visitingTeamStatisticsType].totalPostGame/r:0))),s.dataTotal.push(n.visitingTeam[this.visitingTeamStatisticsType].totalPostGame)})):(o={name:`${this.showLiveData?"Live":"Histórico"} ${this.homeTeam.acronym}`,data:[],dataTotal:[]},s={name:`${this.showLiveData?"Live":"Histórico"} ${this.visitingTeam.acronym}`,data:[],dataTotal:[]},a.arraySubcategories=[],Object.values(e).forEach((n,i)=>{a.xaxis.categories.push(this.prepareLabels(n,i)),a.arraySubcategories.push(n);let r,c,g,d;n.homeTeam[this.homeTeamStatisticsType].leader.points,n.visitingTeam[this.visitingTeamStatisticsType].leader.points;const l=n.homeTeam.accomplished.avgPostGame+n.visitingTeam.accomplished.avgPostGame;if(!this.showLiveData)this.gameForAnalysis.game_status!==1&&n.generalCategoriesIds.accomplished===3?(r=n.homeTeam.accomplished.avgPostGame/l,g=n.homeTeam.accomplished.totalPostGame):(r=l?n.homeTeam[this.homeTeamStatisticsType].avgPostGame/l:0,g=n.homeTeam[this.homeTeamStatisticsType].totalPostGame);else{const m=n.homeTeam[this.homeTeamStatisticsType].totalLive+n.visitingTeam[this.visitingTeamStatisticsType].totalLive;r=m?n.homeTeam[this.homeTeamStatisticsType].totalLive/m:0,g=n.homeTeam[this.homeTeamStatisticsType].totalLive}if(!this.showLiveData)this.gameForAnalysis.game_status!==1&&n.generalCategoriesIds.accomplished===3?(c=n.visitingTeam.accomplished.avgPostGame/l,d=n.visitingTeam.accomplished.totalPostGame):(c=l?n.visitingTeam[this.visitingTeamStatisticsType].avgPostGame/l:0,d=n.visitingTeam[this.visitingTeamStatisticsType].totalPostGame);else{const m=n.homeTeam[this.homeTeamStatisticsType].totalLive+n.visitingTeam[this.visitingTeamStatisticsType].totalLive;c=m?n.visitingTeam[this.visitingTeamStatisticsType].totalLive/m:0,d=n.visitingTeam[this.visitingTeamStatisticsType].totalLive}o.data.push(Math.round(120*r)),o.dataTotal.push(Math.round(g)),s.data.push(Math.round(120*c)),s.dataTotal.push(Math.round(d))})),[o,s]},onHomeTeamPlaysTypeChanged(e){this.homeTeamSelectedPlaysType=e},onVisitingTeamPlaysTypeChanged(e){this.visitingTeamSelectedPlaysType=e},getSubcategoryData(e,a="homeTeam"){return e.id==="3-0"&&(e[a].accomplished.totalLiveBothTeams=e.homeTeam.accomplished.totalLive+e.visitingTeam.accomplished.totalLive),e[a].accomplished||0},showModal(e,a,o){const s=o===0?"homeTeam":"visitingTeam",n=e.config.arraySubcategories[a]||{};this.tooltip.isLeagueAvgVisible=n.id!=="3-0",this.tooltip.data=this.getSubcategoryData(n,s),this.tooltip.local=o===0,this.tooltip.names=n.names,this.tooltip.keyName=this.subcategoryName,this.tooltip.leagueAvg=this.leagueAvg(n);const i=e.globals.clientX||0,r=e.globals.clientY||0;this.globals.x=i,this.globals.y=r,this.tooltip.x=i,this.tooltip.y=r>700?r-250:r;const c=n.generalCategoriesIds.accomplished===3;if(c){const g=n.homeTeam.accomplished.avgPostGame+n.visitingTeam.accomplished.avgPostGame;this.tooltip.numberValue=g?n[s].accomplished.avgPostGame/g*100:0}else this.tooltip.numberValue=null;return this.tooltip.booleanIsPercent=c,this.tooltip.show=!0,this.tooltip.data},updateTooltip(e){const o=Math.abs(e.clientX-this.globals.x),s=Math.abs(e.clientY-this.globals.y);(o>5||s>5)&&(this.tooltip.show=!1)},prepareLabels(e,a){let o=e.name||e.names[this.subcategoryName]||e.names["0-0"];if(a===0)return o;const s=13;if(o.length>s){let n=o.split(" ");o=[];let i="",r="",c=n.slice(-1)[0];n.forEach(g=>{i+=` ${g} `,i.length>s&&(o.push(r.trim()),i=g),r=i,c===g&&o.push(r.trim())})}return o},leagueAvg(e){return e.generalCategoriesIds.accomplished===3?(e.homeTeam.accomplished.arrayRankings.reduce((a,o)=>a+o.points,0)/e.homeTeam.accomplished.arrayRankings.length*100).toFixed(2):this.avg(e,this.accomplished)}}},k1=e=>(t.pushScopeId("data-v-383baec7"),e=e(),t.popScopeId(),e),$I={key:0,class:"distribution-leyend"},BI=k1(()=>t.createElementVNode("br",null,null,-1)),xI={class:"distribution"},VI={class:"distribution__container"},II={class:"distribution__container__chart-type__title"},AI=k1(()=>t.createElementVNode("div",{class:"distribution__container__chart-type__controls"},null,-1)),OI={class:"distribution__container__chart-type__chart"};function TI(e,a,o,s,n,i){const r=t.resolveComponent("apexchart");return t.openBlock(),t.createElementBlock(t.Fragment,null,[e.gameForAnalysis.game_status==4?(t.openBlock(),t.createElementBlock("div",$I,[t.createTextVNode("Faltan "),t.createElementVNode("span",null,t.toDisplayString(i.timeLeft),1),t.createTextVNode(" para el inicio."),BI,t.createTextVNode("Las estadísticas corresponden a sus promedios por partido del torneo "),t.createElementVNode("span",null,t.toDisplayString(o.seasonSelected.name),1)])):t.createCommentVNode("",!0),t.createElementVNode("div",xI,[t.createElementVNode("div",VI,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(n.arrayDataForCharts,(c,g)=>(t.openBlock(),t.createElementBlock("div",{class:"distribution__container__chart-type",key:g},[t.createElementVNode("div",II,t.toDisplayString(c.name),1),AI,t.createElementVNode("div",OI,[(t.openBlock(),t.createBlock(r,{type:"radar",height:n.height,options:n.arrayChartOptions[g],series:n.arrayFilledSeries[g],key:n.chartKeyCounter+n.updateCategory+g},null,8,["height","options","series"]))])]))),128))])])],64)}const zI=Ae(NI,[["render",TI],["__scopeId","data-v-383baec7"]]),FI=(e,a)=>{const o=e.__vccOpts||e;for(const[s,n]of a)o[s]=n;return o},Hd={props:{textOptionLeft:String,valueDefault:{type:String,default:""},textOptionRight:String,hiddenLabels:{type:Boolean,default:!1},width:{type:String,default:"50px"},height:{type:String,default:"32px"},heightCircle:{type:String,default:"24px"},widthCircle:{type:String,default:"24px"},widthIcons:{type:String,default:"22"},borderRadius:{type:String,default:"30px"},borderType:{type:String,default:"solid"},borderWidth:{type:Number,default:1},borderColor:{type:String,default:"#FFFFFF"},fontSize:{type:String,default:"14px"},fontColor:{type:String,default:"#000000"},iconA:{type:String,default:""},iconB:{type:String,default:""},fontFamily:{type:String,default:"Poppins-Regular"},backgroundColor:{type:String,default:"#2e3b46"},circleColorSwitch:{type:String,default:"#FFFFFF"}},data(){return{OptionDefault:!1}},watch:{valueDefault:{immediate:!0,handler:async function(e){try{e==this.textOptionLeft&&(this.OptionDefault=!1),e==this.textOptionRight&&(this.OptionDefault=!0)}catch(a){throw new Error(a)}}}},computed:{customStyle(){return{width:this.width,height:this.height,borderRadius:this.borderRadius,border:`${this.borderType} ${this.borderWidth}px ${this.borderColor}`,backgroundColor:this.backgroundColor,circleColor:this.circleColorSwitch}},customText(){return{color:this.fontColor,fontSize:this.fontSize,fontFamily:`${this.fontFamily} !important`}}},methods:{handleSwitchChange(e){e.target.checked?this.$emit("change",this.textOptionRight):this.$emit("change",this.textOptionLeft)}}},S1=()=>{t.useCssVars(e=>({"1b04779e":e.widthCircle,c974bf22:e.heightCircle}))},E1=Hd.setup;Hd.setup=E1?(e,a)=>(S1(),E1(e,a)):S1;const RI={key:0,class:"text-left"},PI=["width","src"],DI=["checked"],LI=["width","src"],jI={key:3,class:"text-right"};function vI(e,a,o,s,n,i){return t.openBlock(),t.createElementBlock("div",{class:"gsc-switch-radio",style:t.normalizeStyle(i.customText)},[o.textOptionLeft!=""&&!o.hiddenLabels?(t.openBlock(),t.createElementBlock("span",RI,t.toDisplayString(o.textOptionLeft),1)):t.createCommentVNode("",!0),o.iconA!=""?(t.openBlock(),t.createElementBlock("img",{key:1,width:o.widthIcons,src:o.iconA},null,8,PI)):t.createCommentVNode("",!0),t.createElementVNode("input",{type:"checkbox",id:"toggle-btn",onChange:a[0]||(a[0]=(...r)=>i.handleSwitchChange&&i.handleSwitchChange(...r)),checked:n.OptionDefault},null,40,DI),t.createElementVNode("label",{for:"toggle-btn",style:t.normalizeStyle([i.customStyle,{"--circle-color":o.circleColorSwitch}])},null,4),o.iconB!=""?(t.openBlock(),t.createElementBlock("img",{key:2,width:o.widthIcons,src:o.iconB},null,8,LI)):t.createCommentVNode("",!0),o.textOptionRight!=""&&!o.hiddenLabels?(t.openBlock(),t.createElementBlock("span",jI,t.toDisplayString(o.textOptionRight),1)):t.createCommentVNode("",!0)],4)}const MI=FI(Hd,[["render",vI],["__scopeId","data-v-e2a20444"]]),pMe="",hMe="",HI={name:"tooltip",props:{data:{type:Object,required:!0}},computed:{positionTooltip(){return{top:`${this.data.y}px`,left:`${this.data.x}px`}},showTooltip(){return{visible:this.data.visible}}},methods:{tooltipClick:function(e){this.visible=!1}}};function UI(e,a,o,s,n,i){return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["box-tooltip",i.showTooltip]),style:t.normalizeStyle(i.positionTooltip),onClick:a[0]||(a[0]=(...r)=>i.tooltipClick&&i.tooltipClick(...r))},[t.renderSlot(e.$slots,"default",{},void 0,!0)],6)}const N1=Ae(HI,[["render",UI],["__scopeId","data-v-33a39744"]]),gMe="",GI={name:"SoccerChalkboard",components:{Tooltip:N1},props:{plays:{type:Array,required:!0},categories:{type:Array,required:!0},team:{type:String,required:!0}},data(){return{negativeColor:"red",data:{x:0,y:0,visible:!1},dataPlay:{playerName:"",photo:"",minute:0,rivalLogo:"",rivalName:"",categoryName:"",xGi:0,xGf:0,isOwnGoal:!1}}},computed:{...Te("nextGeneral",["homeTeam","visitingTeam"]),preparedPlays(){return this.plays.map(e=>({...e,playingAs:e.playing_as,teamId:e.team_id,photo:e.photo,categoryId:e.category_id,matchResult:e.match_result,matchLapse:e.matchlapse,x1:e.x1*100,y1:e.y1*100,x2:e.x2*100,y2:e.y2*100,x3:e.x3*100,y3:e.y3*100,xGi:e.xG1,xGf:e.xG2}))},localCategories(){return this.categories.map((e,a)=>({id:a,name:e.name,negative:e.negative||!1,color:e.color,points:e.points,numPoints:e.points.length,categories:e.categories,invert:e.invert||[]}))},graphPlays(){let e=this.localCategories.reduce((s,n)=>[...s,n.categories],[]);return this.preparedPlays.filter(s=>this.findCategoryInPlay(e,s)).reduce((s,n)=>{let i=this.localCategories.find(r=>this.findCategoryInPlay(r.categories,n));if(i){let r={category:i.id,categoryName:i.name,arrowColor:i.negative?this.negativeColor:i.color,arrowMarkerColor:i.negative?"url(#arrow-negative)":`url(#arrow-${i.id})`,markerColor:i.color,jersey:n.jersey_number,matchlapse:n.matchLapse,playerName:n.player_name,photo:n.photo,rivalLogo:n.rival_id,x1:i.invert.includes(n.categoryId)?100-n[`x${i.points[0]}`]:n[`x${i.points[0]}`],y1:i.invert.includes(n.categoryId)?100-n[`y${i.points[0]}`]:n[`y${i.points[0]}`],x2:i.invert.includes(n.categoryId)?100-n[`x${i.points[1]}`]:n[`x${i.points[1]}`],y2:i.invert.includes(n.categoryId)?100-n[`y${i.points[1]}`]:n[`y${i.points[1]}`],x3:i.invert.includes(n.categoryId)?100-n[`x${i.points[2]}`]:n[`x${i.points[2]}`],y3:i.invert.includes(n.categoryId)?100-n[`y${i.points[2]}`]:n[`y${i.points[2]}`],momentOfPlay:n.moment_of_play,isOwnGoal:i.invert.includes(n.categoryId),xGi:n.xGi,xGf:n.xGf};s.push(r)}return s},[])}},methods:{findCategoryInPlay(e,a){return e.find(o=>typeof o=="number"?o===a.categoryId:o.includes(a.categoryId))},onMouseOver(e,a){this.dataPlay.playerName=a.playerName||"",this.dataPlay.photo=a.photo||"",this.dataPlay.minute=parseInt(a.momentOfPlay.split(":")[0])||"",this.dataPlay.rivalLogo=a.rivalLogo||"",this.dataPlay.categoryName=a.categoryName||"",this.dataPlay.rivalName=this.team=="Visiting"?this.homeTeam.colloquial_name:this.visitingTeam.colloquial_name,this.dataPlay.xGi=String(a.xGi),this.dataPlay.xGf=String(a.xGf),this.dataPlay.isOwnGoal=a.isOwnGoal,this.data.visible=!0},onMouseLeave(){this.data.visible=!1}}},Os=e=>(t.pushScopeId("data-v-883eff7a"),e=e(),t.popScopeId(),e),WI={class:"soccer-chalkboard-xg"},qI={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 490 684","xmlns:xlink":"http://www.w3.org/1999/xlink",class:"soccer-chalkboard"},JI={xmlns:"http://www.w3.org/2000/svg",viewBox:"30 0 452 684","xmlns:xlink":"http://www.w3.org/1999/xlink"},XI=Os(()=>t.createElementVNode("marker",{id:"arrow-negative",viewBox:"0 0 10 10",refX:"5",refY:"5",markerWidth:"6",markerHeight:"6",markerUnits:"strokeWidth",orient:"auto"},[t.createElementVNode("path",{d:"M 0 0 L 10 5 L 0 10 z","stroke-width":"2",fill:"red"})],-1)),ZI=["id"],YI=["fill"],KI=Os(()=>t.createElementVNode("pattern",{id:"fieldBackground",width:"1",height:"1",viewBox:"0 0 100 100",preserveAspectRatio:"none"},[t.createElementVNode("image",{"xlink:href":"https://az755631.vo.msecnd.net/todoelfut/fieldbg.png",width:"100",height:"100",preserveAspectRatio:"none",id:"image2"})],-1)),QI=["id"],eA=["x1","y1","x2","y2","stroke"],tA=["x1","y1","x2","y2","stroke","marker-end"],aA=["onMouseover"],oA=["x","y","fill"],sA=["x","y"],nA={class:"tooltip-data has-text-left"},iA={class:"bold"},rA={class:"tooltip-image"},lA={class:"tooltip-image"},cA=["src"],dA={class:"tooltip-xg"},mA={key:0},pA=Os(()=>t.createElementVNode("span",null,"xGi:",-1)),hA=Os(()=>t.createElementVNode("div",{class:"tooltip-xg-separator"},null,-1)),gA={key:1},yA=Os(()=>t.createElementVNode("span",null,"xGf:",-1));function uA(e,a,o,s,n,i){const r=t.resolveComponent("Tooltip");return t.openBlock(),t.createElementBlock("div",WI,[(t.openBlock(),t.createElementBlock("svg",qI,[(t.openBlock(),t.createElementBlock("svg",JI,[t.createElementVNode("defs",null,[XI,(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(i.localCategories,c=>(t.openBlock(),t.createElementBlock("marker",{key:`arrow-color-${c.id}`,id:`arrow-${c.id}`,viewBox:"0 0 10 10",refX:"5",refY:"5",markerWidth:"6",markerHeight:"6",markerUnits:"strokeWidth",orient:"auto"},[t.createElementVNode("path",{d:"M 0 0 L 10 5 L 0 10 z","stroke-width":"2",fill:c.color},null,8,YI)],8,ZI))),128)),KI]),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(i.graphPlays,c=>(t.openBlock(),t.createElementBlock("g",{key:c.id,id:`play-${c.playId}`},[t.createElementVNode("line",{x1:`${c.x1}%`,y1:`${c.y1}%`,x2:`${c.x2}%`,y2:`${c.y2}%`,stroke:c.arrowColor,"stroke-width":"2"},null,8,eA),t.createElementVNode("line",{x1:`${c.x2}%`,y1:`${c.y2}%`,x2:`${c.x3}%`,y2:`${c.y3}%`,stroke:c.arrowColor,"stroke-width":"2","marker-end":c.arrowMarkerColor},null,8,tA),t.createElementVNode("g",{onMouseover:g=>i.onMouseOver(g,c),onMouseleave:a[0]||(a[0]=(...g)=>i.onMouseLeave&&i.onMouseLeave(...g)),class:"is-pointer"},[t.createElementVNode("rect",{x:`${c.x1}%`,y:`${c.y1}%`,transform:"translate(-14, -14)",height:"28",width:"28","stroke-width":"2",fill:c.markerColor,stroke:"#999",rx:"14",ry:"14"},null,8,oA),t.createElementVNode("text",{"text-anchor":"middle","dominant-baseline":"middle",x:`${c.x1}%`,y:`${c.y1}%`,dy:"1","font-size":"15",fill:"#fff","font-family":"'Poppins-SemiBold', sans-serif"},t.toDisplayString(c.jersey),9,sA)],40,aA)],8,QI))),128))]))])),t.createVNode(r,{data:n.data},{default:t.withCtx(()=>[t.createElementVNode("div",nA,[t.createElementVNode("div",null,[t.createElementVNode("span",iA,t.toDisplayString(n.dataPlay.isOwnGoal?"Autogol":n.dataPlay.categoryName),1)]),t.createElementVNode("div",null,[t.createTextVNode(t.toDisplayString(n.dataPlay.playerName)+" ",1),t.createElementVNode("div",rA,[t.createElementVNode("div",{class:"tooltip-image-player",style:t.normalizeStyle("background: url("+n.dataPlay.photo+") top")},null,4)])]),t.createElementVNode("div",null,"Minuto: "+t.toDisplayString(n.dataPlay.minute)+"'",1),t.createElementVNode("div",null,[t.createTextVNode(" Rival: "),t.createElementVNode("div",lA,[t.createElementVNode("img",{src:n.dataPlay.rivalLogo},null,8,cA)])]),t.createElementVNode("div",dA,[/^[+]?([0-1]+(?:[\.][0-9]*)?|\.[0-9]+)$/.test(n.dataPlay.xGi)&&n.dataPlay.xGi<=1&&!n.dataPlay.isOwnGoal?(t.openBlock(),t.createElementBlock("div",mA,[pA,t.createTextVNode(" "+t.toDisplayString(Number(n.dataPlay.xGi)),1)])):t.createCommentVNode("",!0),hA,/^[+]?([0-1]+(?:[\.][0-9]*)?|\.[0-9]+)$/.test(n.dataPlay.xGf)&&n.dataPlay.xGf<=1&&!n.dataPlay.isOwnGoal?(t.openBlock(),t.createElementBlock("div",gA,[yA,t.createTextVNode(" "+t.toDisplayString(Number(n.dataPlay.xGf)),1)])):t.createCommentVNode("",!0)])])]),_:1},8,["data"])])}const $1=Ae(GI,[["render",uA],["__scopeId","data-v-883eff7a"]]),ji=[{name:"Goles",color:"#336DFF",points:[1,2,3],categories:[12,55,35,54],invert:[35,54],negative:!1},{name:"Tiros a gol",color:"#7ED321",points:[1,2,3],categories:[12,55,35,54,510]}],yMe="",fA={name:"Xg",components:{SoccerChalkboard:$1},props:{},data(){return{categories:ji}},computed:{...kt("nextGeneral",["usePastSeasonId","pastSeasonId","gameId"]),...kt("general",["booleanIsStatisticModalOpen"]),...Te("xgGeneral",["playsLocal","goalsQtyLocal","shotsOnGoalQtyLocal","xGLocal"]),...Te("nextGeneral",["getSeasonId","homeTeam","visitingTeam","showPostMatchData"]),...Te("loginGeneral",["getPremiumAccount","getIsGolstats"]),...Te("general",["getPreviewSectionAnalytics"]),stringSelectedTeamLogo(){return this.homeTeam.logo},windowWidth(){return this.$store.state.windowWidth},gxInfoItems(){return[{title:"Goles",value:this.goalsQtyLocal},{title:"Tiros a Gol",value:this.shotsOnGoalQtyLocal},{title:"Goles esperados (xG)",value:this.xGLocal}]}},watch:{visitingTeam:{deep:!0,handler(e){e&&this.fillXgPlays()}},showPostMatchData:{handler(e,a){e!==a&&this.fillXgPlays()}}},methods:{...Ua("general",["setVideoSrc","setVideoModalVisibility"]),...Ua("xgGeneral",["setTeamSelected"]),...Ni("xgGeneral",["getXgPlays"]),openXgVideo(){this.setVideoSrc(""),this.setVideoModalVisibility(!0)},getTeamId(){return this.homeTeam.team_id},fillXgPlays(){this.showPostMatchData?this.getXgPlays({seasonId:this.gameId,localTeamId:this.homeTeam.team_id,visitingTeamId:this.visitingTeam.team_id,postMatch:this.showPostMatchData}):this.getXgPlays({seasonId:this.usePastSeasonId?this.pastSeasonId:this.getSeasonId,localTeamId:this.homeTeam.team_id,visitingTeamId:this.visitingTeam.team_id})}},beforeMount(){this.fillXgPlays()}},B1=e=>(t.pushScopeId("data-v-7a0399e9"),e=e(),t.popScopeId(),e),_A={class:"xg-container"},bA={class:"xg-container__info"},wA=B1(()=>t.createElementVNode("div",{class:"title"},"Goles esperados (xG)",-1)),CA={class:"table"},kA={class:"table__row"},SA={class:"table__row__title"},EA={class:"table__row__value"},NA=["src"],$A={class:"table__row"},BA={class:"table__row__title"},xA={class:"table__row__value"},VA={class:"table__row"},IA={class:"table__row__title"},AA={class:"table__row__value"},OA=B1(()=>t.createElementVNode("div",{class:"table-description"},[t.createElementVNode("span",null,"xG:"),t.createTextVNode(" es la medida para estimar la probabilidad de que un tiro o una jugada termine en gol, basándose en factores como la ubicación y la dificultad de la acción. ")],-1)),TA={class:"xg-container__field"};function zA(e,a,o,s,n,i){const r=t.resolveComponent("SoccerChalkboard");return t.openBlock(),t.createElementBlock("div",_A,[t.createElementVNode("div",bA,[wA,t.createElementVNode("div",CA,[t.createElementVNode("div",kA,[t.createElementVNode("div",SA,t.toDisplayString(i.gxInfoItems[0].title),1),t.createElementVNode("div",EA,[t.createTextVNode(t.toDisplayString(i.gxInfoItems[0].value),1),t.createElementVNode("img",{class:"img-abs",src:i.stringSelectedTeamLogo},null,8,NA)])]),t.createElementVNode("div",$A,[t.createElementVNode("div",BA,t.toDisplayString(i.gxInfoItems[1].title),1),t.createElementVNode("div",xA,t.toDisplayString(i.gxInfoItems[1].value),1)]),t.createElementVNode("div",VA,[t.createElementVNode("div",IA,t.toDisplayString(i.gxInfoItems[2].title),1),t.createElementVNode("div",AA,t.toDisplayString(i.gxInfoItems[2].value),1)])]),OA]),t.createElementVNode("div",TA,[t.createVNode(r,{plays:e.playsLocal,categories:n.categories,team:e.team},null,8,["plays","categories","team"])])])}const FA=Ae(fA,[["render",zA],["__scopeId","data-v-7a0399e9"]]),uMe="",RA={name:"Xg",components:{SoccerChalkboard:$1},props:{team:{type:String,default:"Visiting"}},data(){return{categories:ji}},computed:{...kt("nextGeneral",["usePastSeasonId","pastSeasonId","gameId"]),...kt("general",["booleanIsStatisticModalOpen"]),...Te("xgGeneral",["playsAway","goalsQtyAway","shotsOnGoalQtyAway","xGAway"]),...Te("nextGeneral",["getSeasonId","homeTeam","visitingTeam","showPostMatchData"]),...Te("loginGeneral",["getPremiumAccount","getIsGolstats"]),...Te("general",["getPreviewSectionAnalytics"]),stringSelectedTeamLogo(){return this.visitingTeam.logo},windowWidth(){return this.$store.state.windowWidth},gxInfoItems(){return[{title:"Goles",value:this.goalsQtyAway},{title:"Tiros a Gol",value:this.shotsOnGoalQtyAway},{title:"Goles esperados (xG)",value:this.xGAway}]}},watch:{visitingTeam:{deep:!0,handler(e){e&&this.fillXgPlays()}},showPostMatchData:{handler(e,a){e!==a&&this.fillXgPlays()}}},methods:{...Ua("general",["setVideoSrc","setVideoModalVisibility"]),...Ua("xgGeneral",["setTeamSelected"]),...Ni("xgGeneral",["getXgPlays"]),openXgVideo(){this.setVideoSrc(""),this.setVideoModalVisibility(!0)},getTeamId(){return this.visitingTeam.team_id},fillXgPlays(){this.showPostMatchData?this.getXgPlays({seasonId:this.gameId,localTeamId:this.homeTeam.team_id,visitingTeamId:this.visitingTeam.team_id,postMatch:this.showPostMatchData}):this.getXgPlays({seasonId:this.usePastSeasonId?this.pastSeasonId:this.getSeasonId,localTeamId:this.homeTeam.team_id,visitingTeamId:this.visitingTeam.team_id})}},beforeMount(){this.setTeamSelected("Visiting"),this.fillXgPlays()}},x1=e=>(t.pushScopeId("data-v-ec94eadc"),e=e(),t.popScopeId(),e),PA={class:"xg-container"},DA={class:"xg-container__info"},LA=x1(()=>t.createElementVNode("div",{class:"title"},"Goles esperados (xG)",-1)),jA={class:"table"},vA={class:"table__row"},MA={class:"table__row__title"},HA={class:"table__row__value"},UA=["src"],GA={class:"table__row"},WA={class:"table__row__title"},qA={class:"table__row__value"},JA={class:"table__row"},XA={class:"table__row__title"},ZA={class:"table__row__value"},YA=x1(()=>t.createElementVNode("div",{class:"table-description"},[t.createElementVNode("span",null,"xG:"),t.createTextVNode(" es la medida para estimar la probabilidad de que un tiro o una jugada termine en gol, basándose en factores como la ubicación y la dificultad de la acción. ")],-1)),KA={class:"xg-container__field"};function QA(e,a,o,s,n,i){const r=t.resolveComponent("SoccerChalkboard");return t.openBlock(),t.createElementBlock("div",null,[t.createElementVNode("div",PA,[t.createElementVNode("div",DA,[LA,t.createElementVNode("div",jA,[t.createElementVNode("div",vA,[t.createElementVNode("div",MA,t.toDisplayString(i.gxInfoItems[0].title),1),t.createElementVNode("div",HA,[t.createTextVNode(t.toDisplayString(i.gxInfoItems[0].value),1),t.createElementVNode("img",{class:"img-abs",src:i.stringSelectedTeamLogo},null,8,UA)])]),t.createElementVNode("div",GA,[t.createElementVNode("div",WA,t.toDisplayString(i.gxInfoItems[1].title),1),t.createElementVNode("div",qA,t.toDisplayString(i.gxInfoItems[1].value),1)]),t.createElementVNode("div",JA,[t.createElementVNode("div",XA,t.toDisplayString(i.gxInfoItems[2].title),1),t.createElementVNode("div",ZA,t.toDisplayString(i.gxInfoItems[2].value),1)])]),YA]),t.createElementVNode("div",KA,[t.createVNode(r,{plays:e.playsAway,categories:n.categories,team:o.team},null,8,["plays","categories","team"])])])])}const eO=Ae(RA,[["render",QA],["__scopeId","data-v-ec94eadc"]]),fMe="",tO={name:"SoccerChalkboard",components:{Tooltip:N1},props:{plays:{type:Array,required:!0},categories:{type:Array,required:!0},team:{type:String,required:!0}},data(){return{negativeColor:"red",data:{x:0,y:0,visible:!1},dataPlay:{playerName:"",photo:"",minute:0,rivalLogo:"",rivalName:"",categoryName:"",xGi:0,xGf:0,isOwnGoal:!1}}},computed:{...Te("nextGeneral",["homeTeam","visitingTeam"]),preparedPlays(){return this.plays.map(e=>({...e,playingAs:e.playing_as,teamId:e.team_id,photo:e.photo,categoryId:e.category_id,matchResult:e.match_result,matchLapse:e.matchlapse,x1:e.x1*100,y1:e.y1*100,x2:e.x2*100,y2:e.y2*100,x3:e.x3*100,y3:e.y3*100,xGi:e.xG1,xGf:e.xG2}))},localCategories(){return this.categories.map((e,a)=>({id:a,name:e.name,negative:e.negative||!1,color:e.color,points:e.points,numPoints:e.points.length,categories:e.categories,invert:e.invert||[]}))},graphPlays(){let e=this.localCategories.reduce((s,n)=>[...s,n.categories],[]);return this.preparedPlays.filter(s=>this.findCategoryInPlay(e,s)).reduce((s,n)=>{let i=this.localCategories.find(r=>this.findCategoryInPlay(r.categories,n));if(i){let r={category:i.id,categoryName:i.name,arrowColor:i.negative?this.negativeColor:i.color,arrowMarkerColor:i.negative?"url(#arrow-negative)":`url(#arrow-${i.id})`,markerColor:i.color,jersey:n.jersey_number,matchlapse:n.matchLapse,playerName:n.player_name,photo:n.photo,rivalLogo:n.rival_id,x1:i.invert.includes(n.categoryId)?100-n[`x${i.points[0]}`]:n[`x${i.points[0]}`],y1:i.invert.includes(n.categoryId)?100-n[`y${i.points[0]}`]:n[`y${i.points[0]}`],x2:i.invert.includes(n.categoryId)?100-n[`x${i.points[1]}`]:n[`x${i.points[1]}`],y2:i.invert.includes(n.categoryId)?100-n[`y${i.points[1]}`]:n[`y${i.points[1]}`],x3:i.invert.includes(n.categoryId)?100-n[`x${i.points[2]}`]:n[`x${i.points[2]}`],y3:i.invert.includes(n.categoryId)?100-n[`y${i.points[2]}`]:n[`y${i.points[2]}`],momentOfPlay:n.moment_of_play,isOwnGoal:i.invert.includes(n.categoryId),xGi:n.xGi,xGf:n.xGf};s.push(r)}return s},[])}},methods:{findCategoryInPlay(e,a){return e.find(o=>typeof o=="number"?o===a.categoryId:o.includes(a.categoryId))},onMouseOver(e,a){this.dataPlay.playerName=a.playerName||"",this.dataPlay.photo=a.photo||"",this.dataPlay.minute=parseInt(a.momentOfPlay.split(":")[0])||"",this.dataPlay.rivalLogo=a.rivalLogo||"",this.dataPlay.categoryName=a.categoryName||"",this.dataPlay.rivalName=this.team=="Visiting"?this.homeTeam.team_name:this.visitingTeam.team_name,this.dataPlay.xGi=String(a.xGi),this.dataPlay.xGf=String(a.xGf),this.dataPlay.isOwnGoal=a.isOwnGoal,this.data.x=e.pageX<135?e.pageX-50:e.layerX-50,this.data.y=e.layerY+130,this.data.visible=!0},onMouseLeave(){this.data.visible=!1}}},Ts=e=>(t.pushScopeId("data-v-f6c30694"),e=e(),t.popScopeId(),e),aO={class:"soccer-chalkboard-xg"},oO={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 490 684","xmlns:xlink":"http://www.w3.org/1999/xlink",class:"soccer-chalkboard"},sO={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 452 684","xmlns:xlink":"http://www.w3.org/1999/xlink"},nO=Ts(()=>t.createElementVNode("marker",{id:"arrow-negative",viewBox:"0 0 10 10",refX:"5",refY:"5",markerWidth:"6",markerHeight:"6",markerUnits:"strokeWidth",orient:"auto"},[t.createElementVNode("path",{d:"M 0 0 L 10 5 L 0 10 z","stroke-width":"2",fill:"red"})],-1)),iO=["id"],rO=["fill"],lO=Ts(()=>t.createElementVNode("pattern",{id:"fieldBackground",width:"1",height:"1",viewBox:"0 0 100 100",preserveAspectRatio:"none"},[t.createElementVNode("image",{"xlink:href":"https://az755631.vo.msecnd.net/todoelfut/fieldbg.png",width:"100",height:"100",preserveAspectRatio:"none",id:"image2"})],-1)),cO=["id"],dO=["x1","y1","x2","y2","stroke"],mO=["x1","y1","x2","y2","stroke","marker-end"],pO=["onMouseover"],hO=["x","y","fill"],gO=["x","y"],yO={class:"tooltip-data has-text-left"},uO={class:"bold"},fO={class:"tooltip-image"},_O={class:"tooltip-image"},bO=["src"],wO={class:"tooltip-xg"},CO={key:0},kO=Ts(()=>t.createElementVNode("span",null,"xGi:",-1)),SO=Ts(()=>t.createElementVNode("div",{class:"tooltip-xg-separator"},null,-1)),EO={key:1},NO=Ts(()=>t.createElementVNode("span",null,"xGf:",-1));function $O(e,a,o,s,n,i){const r=t.resolveComponent("Tooltip");return t.openBlock(),t.createElementBlock("div",aO,[(t.openBlock(),t.createElementBlock("svg",oO,[(t.openBlock(),t.createElementBlock("svg",sO,[t.createElementVNode("defs",null,[nO,(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(i.localCategories,c=>(t.openBlock(),t.createElementBlock("marker",{key:`arrow-color-${c.id}`,id:`arrow-${c.id}`,viewBox:"0 0 10 10",refX:"5",refY:"5",markerWidth:"6",markerHeight:"6",markerUnits:"strokeWidth",orient:"auto"},[t.createElementVNode("path",{d:"M 0 0 L 10 5 L 0 10 z","stroke-width":"2",fill:c.color},null,8,rO)],8,iO))),128)),lO]),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(i.graphPlays,c=>(t.openBlock(),t.createElementBlock("g",{key:c.id,id:`play-${c.playId}`},[t.createElementVNode("line",{x1:`${c.x1}%`,y1:`${c.y1}%`,x2:`${c.x2}%`,y2:`${c.y2}%`,stroke:c.arrowColor,"stroke-width":"2"},null,8,dO),t.createElementVNode("line",{x1:`${c.x2}%`,y1:`${c.y2}%`,x2:`${c.x3}%`,y2:`${c.y3}%`,stroke:c.arrowColor,"stroke-width":"2","marker-end":c.arrowMarkerColor},null,8,mO),t.createElementVNode("g",{onMouseover:g=>i.onMouseOver(g,c),onMouseleave:a[0]||(a[0]=(...g)=>i.onMouseLeave&&i.onMouseLeave(...g)),class:"is-pointer"},[t.createElementVNode("rect",{x:`${c.x1}%`,y:`${c.y1}%`,transform:"translate(-14, -14)",height:"28",width:"28","stroke-width":"2",fill:c.markerColor,stroke:"#aaa",rx:"14",ry:"14"},null,8,hO),t.createElementVNode("text",{"text-anchor":"middle","dominant-baseline":"middle",x:`${c.x1}%`,y:`${c.y1}%`,dy:"1","font-size":"15",stroke:"white","font-family":"Poppins, sans-serif"},t.toDisplayString(c.jersey),9,gO)],40,pO)],8,cO))),128))]))])),t.createVNode(r,{data:n.data},{default:t.withCtx(()=>[t.createElementVNode("div",yO,[t.createElementVNode("div",null,[t.createElementVNode("span",uO,t.toDisplayString(n.dataPlay.isOwnGoal?"Autogol":n.dataPlay.categoryName),1)]),t.createElementVNode("div",null,[t.createTextVNode(t.toDisplayString(n.dataPlay.playerName)+" ",1),t.createElementVNode("div",fO,[t.createElementVNode("div",{class:"tooltip-image-player",style:t.normalizeStyle("background: url("+n.dataPlay.photo+") top")},null,4)])]),t.createElementVNode("div",null,"Minuto: "+t.toDisplayString(n.dataPlay.minute)+"'",1),t.createElementVNode("div",null,[t.createTextVNode(" Rival: "),t.createElementVNode("div",_O,[t.createElementVNode("img",{src:n.dataPlay.rivalLogo},null,8,bO)])]),t.createElementVNode("div",wO,[/^[+]?([0-1]+(?:[\.][0-9]*)?|\.[0-9]+)$/.test(n.dataPlay.xGi)&&n.dataPlay.xGi<=1&&!n.dataPlay.isOwnGoal?(t.openBlock(),t.createElementBlock("div",CO,[kO,t.createTextVNode(" "+t.toDisplayString(Number(n.dataPlay.xGi)),1)])):t.createCommentVNode("",!0),SO,/^[+]?([0-1]+(?:[\.][0-9]*)?|\.[0-9]+)$/.test(n.dataPlay.xGf)&&n.dataPlay.xGf<=1&&!n.dataPlay.isOwnGoal?(t.openBlock(),t.createElementBlock("div",EO,[NO,t.createTextVNode(" "+t.toDisplayString(Number(n.dataPlay.xGf)),1)])):t.createCommentVNode("",!0)])])]),_:1},8,["data"])])}const V1=Ae(tO,[["render",$O],["__scopeId","data-v-f6c30694"]]),_Me="",BO={name:"Xg",components:{SoccerChalkboard:V1},props:{},data(){return{categories:ji}},computed:{...kt("nextGeneral",["usePastSeasonId","pastSeasonId","gameId"]),...kt("general",["booleanIsStatisticModalOpen"]),...Te("xgGeneral",["playsLocal","goalsQtyLocal","shotsOnGoalQtyLocal","xGLocal"]),...Te("nextGeneral",["getSeasonId","homeTeam","visitingTeam","showPostMatchData"]),...Te("loginGeneral",["getPremiumAccount","getIsGolstats"]),...Te("general",["getPreviewSectionAnalytics"]),stringSelectedTeamLogo(){return this.homeTeam.logo},windowWidth(){return this.$store.state.windowWidth},gxInfoItems(){return[{title:"Goles",value:this.goalsQtyLocal},{title:"Tiros a Gol",value:this.shotsOnGoalQtyLocal},{title:"Goles esperados (xG)",value:this.xGLocal}]}},watch:{visitingTeam:{deep:!0,handler(e){e&&this.fillXgPlays()}},showPostMatchData:{handler(e,a){e!==a&&this.fillXgPlays()}}},methods:{...Ua("general",["setVideoSrc","setVideoModalVisibility"]),...Ua("xgGeneral",["setTeamSelected"]),...Ni("xgGeneral",["getXgPlays"]),openXgVideo(){this.setVideoSrc(""),this.setVideoModalVisibility(!0)},getTeamId(){return this.homeTeam.team_id},fillXgPlays(){this.showPostMatchData?this.getXgPlays({seasonId:this.gameId,localTeamId:this.homeTeam.team_id,visitingTeamId:this.visitingTeam.team_id,postMatch:this.showPostMatchData}):this.getXgPlays({seasonId:this.usePastSeasonId?this.pastSeasonId:this.getSeasonId,localTeamId:this.homeTeam.team_id,visitingTeamId:this.visitingTeam.team_id})}},beforeMount(){this.fillXgPlays()}},I1=e=>(t.pushScopeId("data-v-fb5342de"),e=e(),t.popScopeId(),e),xO={class:"xg-container"},VO=I1(()=>t.createElementVNode("div",{class:"title"},"Goles esperados (xG)",-1)),IO={class:"xg-container__field"},AO={class:"xg-container__info"},OO={class:"table"},TO={class:"table__row"},zO={class:"table__row__title"},FO={class:"table__row__value"},RO=["src"],PO={class:"table__row"},DO={class:"table__row__title"},LO={class:"table__row__value"},jO={class:"table__row"},vO={class:"table__row__title"},MO={class:"table__row__value"},HO=I1(()=>t.createElementVNode("div",{class:"table-description"},[t.createElementVNode("span",null,"xG:"),t.createTextVNode(" es la medida para estimar la probabilidad de que un tiro o una jugada termine en gol, basándose en factores como la ubicación y la dificultad de la acción. ")],-1));function UO(e,a,o,s,n,i){const r=t.resolveComponent("SoccerChalkboard");return t.openBlock(),t.createElementBlock("div",xO,[VO,t.createElementVNode("div",IO,[t.createVNode(r,{plays:e.playsLocal,categories:n.categories,team:e.team},null,8,["plays","categories","team"])]),t.createElementVNode("div",AO,[t.createElementVNode("div",OO,[t.createElementVNode("div",TO,[t.createElementVNode("div",zO,t.toDisplayString(i.gxInfoItems[0].title),1),t.createElementVNode("div",FO,[t.createTextVNode(t.toDisplayString(i.gxInfoItems[0].value),1),t.createElementVNode("img",{class:"img-abs",src:i.stringSelectedTeamLogo},null,8,RO)])]),t.createElementVNode("div",PO,[t.createElementVNode("div",DO,t.toDisplayString(i.gxInfoItems[1].title),1),t.createElementVNode("div",LO,t.toDisplayString(i.gxInfoItems[1].value),1)]),t.createElementVNode("div",jO,[t.createElementVNode("div",vO,t.toDisplayString(i.gxInfoItems[2].title),1),t.createElementVNode("div",MO,t.toDisplayString(i.gxInfoItems[2].value),1)])]),HO])])}const GO=Ae(BO,[["render",UO],["__scopeId","data-v-fb5342de"]]),bMe="",WO={name:"Xg",components:{SoccerChalkboard:V1},props:{},data(){return{categories:ji}},computed:{...kt("nextGeneral",["usePastSeasonId","pastSeasonId","gameId"]),...kt("general",["booleanIsStatisticModalOpen"]),...Te("xgGeneral",["playsAway","goalsQtyAway","shotsOnGoalQtyAway","xGAway"]),...Te("nextGeneral",["getSeasonId","homeTeam","visitingTeam","showPostMatchData"]),...Te("loginGeneral",["getPremiumAccount","getIsGolstats"]),...Te("general",["getPreviewSectionAnalytics"]),stringSelectedTeamLogo(){return this.visitingTeam.logo},windowWidth(){return this.$store.state.windowWidth},gxInfoItems(){return[{title:"Goles",value:this.goalsQtyAway},{title:"Tiros a Gol",value:this.shotsOnGoalQtyAway},{title:"Goles esperados (xG)",value:this.xGAway}]}},watch:{visitingTeam:{deep:!0,handler(e){e&&this.fillXgPlays()}},showPostMatchData:{handler(e,a){e!==a&&this.fillXgPlays()}}},methods:{...Ua("general",["setVideoSrc","setVideoModalVisibility"]),...Ua("xgGeneral",["setTeamSelected"]),...Ni("xgGeneral",["getXgPlays"]),openXgVideo(){this.setVideoSrc(""),this.setVideoModalVisibility(!0)},getTeamId(){return this.homeTeam.team_id},fillXgPlays(){this.showPostMatchData?this.getXgPlays({seasonId:this.gameId,AwayTeamId:this.homeTeam.team_id,visitingTeamId:this.visitingTeam.team_id,postMatch:this.showPostMatchData}):this.getXgPlays({seasonId:this.usePastSeasonId?this.pastSeasonId:this.getSeasonId,AwayTeamId:this.homeTeam.team_id,visitingTeamId:this.visitingTeam.team_id})}},beforeMount(){this.fillXgPlays()}},A1=e=>(t.pushScopeId("data-v-38eed9b5"),e=e(),t.popScopeId(),e),qO={class:"xg-container"},JO=A1(()=>t.createElementVNode("div",{class:"title"},"Goles esperados (xG)",-1)),XO={class:"xg-container__field"},ZO={class:"xg-container__info"},YO={class:"table"},KO={class:"table__row"},QO={class:"table__row__title"},eT={class:"table__row__value"},tT=["src"],aT={class:"table__row"},oT={class:"table__row__title"},sT={class:"table__row__value"},nT={class:"table__row"},iT={class:"table__row__title"},rT={class:"table__row__value"},lT=A1(()=>t.createElementVNode("div",{class:"table-description"},[t.createElementVNode("span",null,"xG:"),t.createTextVNode(" es la medida para estimar la probabilidad de que un tiro o una jugada termine en gol, basándose en factores como la ubicación y la dificultad de la acción. ")],-1));function cT(e,a,o,s,n,i){const r=t.resolveComponent("SoccerChalkboard");return t.openBlock(),t.createElementBlock("div",qO,[JO,t.createElementVNode("div",XO,[t.createVNode(r,{plays:e.playsAway,categories:n.categories,team:e.team},null,8,["plays","categories","team"])]),t.createElementVNode("div",ZO,[t.createElementVNode("div",YO,[t.createElementVNode("div",KO,[t.createElementVNode("div",QO,t.toDisplayString(i.gxInfoItems[0].title),1),t.createElementVNode("div",eT,[t.createTextVNode(t.toDisplayString(i.gxInfoItems[0].value),1),t.createElementVNode("img",{class:"img-abs",src:i.stringSelectedTeamLogo},null,8,tT)])]),t.createElementVNode("div",aT,[t.createElementVNode("div",oT,t.toDisplayString(i.gxInfoItems[1].title),1),t.createElementVNode("div",sT,t.toDisplayString(i.gxInfoItems[1].value),1)]),t.createElementVNode("div",nT,[t.createElementVNode("div",iT,t.toDisplayString(i.gxInfoItems[2].title),1),t.createElementVNode("div",rT,t.toDisplayString(i.gxInfoItems[2].value),1)])]),lT])])}const dT=Ae(WO,[["render",cT],["__scopeId","data-v-38eed9b5"]]),wMe="";let O1=null;const mT={name:"XgMain",components:{GSCSwitchRadio:MI,SoccerChalkboardLocal:FA,SoccerChalkboardAway:eO,SoccerChalkboardLocalMobile:GO,SoccerChalkboardAwayMobile:dT},props:{game:{type:Number,default:0}},data(){return{gamesContainerWidth:0,teamSelect:"local",teamDefault:""}},computed:{...Te("nextGeneral",["homeTeam","visitingTeam"])},watch:{},methods:{onChangeTeam(e){e instanceof Object||(this.teamSelect=e),this.teamDefault=e},setUpResizeObserver(){if(window.ResizeObserver)O1=new ResizeObserver(()=>{this.gamesContainerWidth=this.$refs.gamesContainer.clientWidth,this.gamesContainerWidth<680?this.movil=!0:this.movil=!1}),O1.observe(this.$refs.gamesContainer);else throw new Error("Resize observer not supported!")}},mounted(){this.teamSelect=this.homeTeam.colloquial_name,this.teamLocal=this.homeTeam.colloquial_name,setTimeout(()=>{this.setUpResizeObserver()},100)},updated(){this.teamSelect!=this.homeTeam.colloquial_name&&this.teamSelect!=this.visitingTeam.colloquial_name&&(this.teamSelect=this.homeTeam.colloquial_name,this.onChangeTeam(this.teamSelect))}},pT={class:"xg",ref:"gamesContainer"},hT={key:0,class:"selector-team"};function gT(e,a,o,s,n,i){const r=t.resolveComponent("GSCSwitchRadio"),c=t.resolveComponent("SoccerChalkboardLocal"),g=t.resolveComponent("SoccerChalkboardAway"),d=t.resolveComponent("SoccerChalkboardLocalMobile"),l=t.resolveComponent("SoccerChalkboardAwayMobile");return t.openBlock(),t.createElementBlock("div",pT,[n.gamesContainerWidth<655?(t.openBlock(),t.createElementBlock("div",hT,[t.createVNode(r,{width:"42px",height:"20px",heightCircle:"16px",widthCircle:"16px","circle-color-switch":"#cbee6b",valueDefault:n.teamDefault,"text-option-left":e.homeTeam.colloquial_name,"text-option-right":e.visitingTeam.colloquial_name,"font-color":"white","hidden-labels":!1,"icon-a":e.homeTeam.logo,"icon-b":e.visitingTeam.logo,onChange:i.onChangeTeam},null,8,["valueDefault","text-option-left","text-option-right","icon-a","icon-b","onChange"])])):t.createCommentVNode("",!0),n.gamesContainerWidth>=655?(t.openBlock(),t.createBlock(c,{key:1,class:"local"})):t.createCommentVNode("",!0),n.gamesContainerWidth>=655?(t.openBlock(),t.createBlock(g,{key:2,class:"away"})):t.createCommentVNode("",!0),n.gamesContainerWidth<655&&n.teamSelect==e.homeTeam.colloquial_name?(t.openBlock(),t.createBlock(d,{key:3})):t.createCommentVNode("",!0),n.gamesContainerWidth<655&&n.teamSelect==e.visitingTeam.colloquial_name?(t.openBlock(),t.createBlock(l,{key:4})):t.createCommentVNode("",!0)],512)}const yT=Ae(mT,[["render",gT],["__scopeId","data-v-20bd873f"]]),CMe="",uT={class:"statistics-main"},fT={class:"statistics-main__header"},_T={class:"statistics-main__header__filter"},bT=t.defineComponent({name:"TemplateVideos",components:{TrendLive:MB,Comparative:EI,Distribution:zI,GSCSlider:Md,XG:yT}}),wT=Ae(Object.assign(bT,{props:{game:{type:Object,default:()=>({gameId:79623,seasonId:1772,status:1,dateTimeUTC:"2023-10-01T22:20:00Z",homeTeam:{logo:"https://az755631.vo.msecnd.net/teams-80/18.png",team_id:10,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"}})},subsection:{type:String,default:""},seasonSelected:{type:Object,default:()=>({})}},emits:["openmedia"],setup(e,{emit:a}){const o=e,s=fu(),n=t.ref({width:"fit-content",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",padding:"0 16px"}),i=t.ref({}),r=t.ref(null),c=t.ref([{id:"st1",name:"Comparativa",componentName:"Comparative"},{id:"st2",name:"Distribución",componentName:"Distribution"},{id:"st3",name:"Tendencia LIVE",componentName:"TrendLive"},{id:"st4",name:"Goles esperados (xG)",componentName:"XG"}]);let g=t.ref(c.value[0]),d=t.ref(0);t.watch(()=>o.game,p=>{const u={...p};l(u),d.value++},{deep:!0,immediate:!0});async function l(p){try{i.value.gameId!==p.gameId&&(i.value=p,await s.dispatch("nextGeneral/cleanStats"),await s.dispatch("nextGeneral/checkState",{gameId:p.gameId,currentSeasonId:p.seasonId,isTeamsAnalysis:!0,defaultFilter:r.value,gameInfo:p}))}catch(u){throw new Error(u)}}function m(p){g.value=p}function h(){s.commit("nextGeneral/updateFilters",{filters:{local:{playingAs:[1,2],statistics:{},matchResult:[1,2,3],firstHalf:[1,2,3],secondHalf:[4,5,6]},visit:{playingAs:[1,2],statistics:{},matchResult:[1,2,3],firstHalf:[1,2,3],secondHalf:[4,5,6]}},needsFormat:!0})}function y(p){a("openmedia",p)}return t.onUnmounted(()=>{a("resetSubsection")}),t.onMounted(()=>{o.subsection==="Comparativa"&&(g.value.id="st1",g.value.name="Comparativa",g.value.componentName="Comparative")}),h(),(p,u)=>(t.openBlock(),t.createElementBlock("div",uT,[t.createElementVNode("div",fT,[t.createVNode(t.unref(Md),{backgroundColor:"none",arrows:!1},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(c.value,f=>(t.openBlock(),t.createElementBlock("div",{key:f.id,class:"game-time-line__options__option"},[t.createVNode(hu,t.mergeProps(n.value,{text:f.name,"is-active":t.unref(g).id===f.id,onClick:_=>m(f)}),null,16,["text","is-active","onClick"])]))),128))]),_:1}),t.withDirectives(t.createElementVNode("div",_T,[t.createVNode(E$)],512),[[t.vShow,!1]])]),(t.openBlock(),t.createElementBlock("div",{class:"statistics-main__body",key:t.unref(d)},[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(t.unref(g).componentName),{seasonSelected:e.seasonSelected,game:e.game,onOpenmedia:y},null,40,["seasonSelected","game"]))]))]))}}),[["__scopeId","data-v-524c07a0"]]);function T1(e,a){return function(){return e.apply(a,arguments)}}const{toString:CT}=Object.prototype,{getPrototypeOf:Ud}=Object,vi=(e=>a=>{const o=CT.call(a);return e[o]||(e[o]=o.slice(8,-1).toLowerCase())})(Object.create(null)),ta=e=>(e=e.toLowerCase(),a=>vi(a)===e),Mi=e=>a=>typeof a===e,{isArray:Vo}=Array,zs=Mi("undefined");function kT(e){return e!==null&&!zs(e)&&e.constructor!==null&&!zs(e.constructor)&&$t(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const z1=ta("ArrayBuffer");function ST(e){let a;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?a=ArrayBuffer.isView(e):a=e&&e.buffer&&z1(e.buffer),a}const ET=Mi("string"),$t=Mi("function"),F1=Mi("number"),Hi=e=>e!==null&&typeof e=="object",NT=e=>e===!0||e===!1,Ui=e=>{if(vi(e)!=="object")return!1;const a=Ud(e);return(a===null||a===Object.prototype||Object.getPrototypeOf(a)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},$T=ta("Date"),BT=ta("File"),xT=ta("Blob"),VT=ta("FileList"),IT=e=>Hi(e)&&$t(e.pipe),AT=e=>{let a;return e&&(typeof FormData=="function"&&e instanceof FormData||$t(e.append)&&((a=vi(e))==="formdata"||a==="object"&&$t(e.toString)&&e.toString()==="[object FormData]"))},OT=ta("URLSearchParams"),TT=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Fs(e,a,{allOwnKeys:o=!1}={}){if(e===null||typeof e>"u")return;let s,n;if(typeof e!="object"&&(e=[e]),Vo(e))for(s=0,n=e.length;s<n;s++)a.call(null,e[s],s,e);else{const i=o?Object.getOwnPropertyNames(e):Object.keys(e),r=i.length;let c;for(s=0;s<r;s++)c=i[s],a.call(null,e[c],c,e)}}function R1(e,a){a=a.toLowerCase();const o=Object.keys(e);let s=o.length,n;for(;s-- >0;)if(n=o[s],a===n.toLowerCase())return n;return null}const P1=(()=>typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global)(),D1=e=>!zs(e)&&e!==P1;function Gd(){const{caseless:e}=D1(this)&&this||{},a={},o=(s,n)=>{const i=e&&R1(a,n)||n;Ui(a[i])&&Ui(s)?a[i]=Gd(a[i],s):Ui(s)?a[i]=Gd({},s):Vo(s)?a[i]=s.slice():a[i]=s};for(let s=0,n=arguments.length;s<n;s++)arguments[s]&&Fs(arguments[s],o);return a}const zT=(e,a,o,{allOwnKeys:s}={})=>(Fs(a,(n,i)=>{o&&$t(n)?e[i]=T1(n,o):e[i]=n},{allOwnKeys:s}),e),FT=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),RT=(e,a,o,s)=>{e.prototype=Object.create(a.prototype,s),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:a.prototype}),o&&Object.assign(e.prototype,o)},PT=(e,a,o,s)=>{let n,i,r;const c={};if(a=a||{},e==null)return a;do{for(n=Object.getOwnPropertyNames(e),i=n.length;i-- >0;)r=n[i],(!s||s(r,e,a))&&!c[r]&&(a[r]=e[r],c[r]=!0);e=o!==!1&&Ud(e)}while(e&&(!o||o(e,a))&&e!==Object.prototype);return a},DT=(e,a,o)=>{e=String(e),(o===void 0||o>e.length)&&(o=e.length),o-=a.length;const s=e.indexOf(a,o);return s!==-1&&s===o},LT=e=>{if(!e)return null;if(Vo(e))return e;let a=e.length;if(!F1(a))return null;const o=new Array(a);for(;a-- >0;)o[a]=e[a];return o},jT=(e=>a=>e&&a instanceof e)(typeof Uint8Array<"u"&&Ud(Uint8Array)),vT=(e,a)=>{const o=(e&&e[Symbol.iterator]).call(e);let s;for(;(s=o.next())&&!s.done;){const n=s.value;a.call(e,n[0],n[1])}},MT=(e,a)=>{let o;const s=[];for(;(o=e.exec(a))!==null;)s.push(o);return s},HT=ta("HTMLFormElement"),UT=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(a,o,s){return o.toUpperCase()+s}),L1=(({hasOwnProperty:e})=>(a,o)=>e.call(a,o))(Object.prototype),GT=ta("RegExp"),j1=(e,a)=>{const o=Object.getOwnPropertyDescriptors(e),s={};Fs(o,(n,i)=>{let r;(r=a(n,i,e))!==!1&&(s[i]=r||n)}),Object.defineProperties(e,s)},WT=e=>{j1(e,(a,o)=>{if($t(e)&&["arguments","caller","callee"].indexOf(o)!==-1)return!1;const s=e[o];if($t(s)){if(a.enumerable=!1,"writable"in a){a.writable=!1;return}a.set||(a.set=()=>{throw Error("Can not rewrite read-only method '"+o+"'")})}})},qT=(e,a)=>{const o={},s=n=>{n.forEach(i=>{o[i]=!0})};return Vo(e)?s(e):s(String(e).split(a)),o},JT=()=>{},XT=(e,a)=>(e=+e,Number.isFinite(e)?e:a),Wd="abcdefghijklmnopqrstuvwxyz",v1="0123456789",M1={DIGIT:v1,ALPHA:Wd,ALPHA_DIGIT:Wd+Wd.toUpperCase()+v1},ZT=(e=16,a=M1.ALPHA_DIGIT)=>{let o="";const{length:s}=a;for(;e--;)o+=a[Math.random()*s|0];return o};function YT(e){return!!(e&&$t(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const KT=e=>{const a=new Array(10),o=(s,n)=>{if(Hi(s)){if(a.indexOf(s)>=0)return;if(!("toJSON"in s)){a[n]=s;const i=Vo(s)?[]:{};return Fs(s,(r,c)=>{const g=o(r,n+1);!zs(g)&&(i[c]=g)}),a[n]=void 0,i}}return s};return o(e,0)},QT=ta("AsyncFunction"),ez=e=>e&&(Hi(e)||$t(e))&&$t(e.then)&&$t(e.catch),j={isArray:Vo,isArrayBuffer:z1,isBuffer:kT,isFormData:AT,isArrayBufferView:ST,isString:ET,isNumber:F1,isBoolean:NT,isObject:Hi,isPlainObject:Ui,isUndefined:zs,isDate:$T,isFile:BT,isBlob:xT,isRegExp:GT,isFunction:$t,isStream:IT,isURLSearchParams:OT,isTypedArray:jT,isFileList:VT,forEach:Fs,merge:Gd,extend:zT,trim:TT,stripBOM:FT,inherits:RT,toFlatObject:PT,kindOf:vi,kindOfTest:ta,endsWith:DT,toArray:LT,forEachEntry:vT,matchAll:MT,isHTMLForm:HT,hasOwnProperty:L1,hasOwnProp:L1,reduceDescriptors:j1,freezeMethods:WT,toObjectSet:qT,toCamelCase:UT,noop:JT,toFiniteNumber:XT,findKey:R1,global:P1,isContextDefined:D1,ALPHABET:M1,generateString:ZT,isSpecCompliantForm:YT,toJSONObject:KT,isAsyncFn:QT,isThenable:ez};function pe(e,a,o,s,n){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",a&&(this.code=a),o&&(this.config=o),s&&(this.request=s),n&&(this.response=n)}j.inherits(pe,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:j.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const H1=pe.prototype,U1={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{U1[e]={value:e}}),Object.defineProperties(pe,U1),Object.defineProperty(H1,"isAxiosError",{value:!0}),pe.from=(e,a,o,s,n,i)=>{const r=Object.create(H1);return j.toFlatObject(e,r,function(c){return c!==Error.prototype},c=>c!=="isAxiosError"),pe.call(r,e.message,a,o,s,n),r.cause=e,r.name=e.name,i&&Object.assign(r,i),r};const tz=null;function qd(e){return j.isPlainObject(e)||j.isArray(e)}function G1(e){return j.endsWith(e,"[]")?e.slice(0,-2):e}function W1(e,a,o){return e?e.concat(a).map(function(s,n){return s=G1(s),!o&&n?"["+s+"]":s}).join(o?".":""):a}function az(e){return j.isArray(e)&&!e.some(qd)}const oz=j.toFlatObject(j,{},null,function(e){return/^is[A-Z]/.test(e)});function Gi(e,a,o){if(!j.isObject(e))throw new TypeError("target must be an object");a=a||new FormData,o=j.toFlatObject(o,{metaTokens:!0,dots:!1,indexes:!1},!1,function(y,p){return!j.isUndefined(p[y])});const s=o.metaTokens,n=o.visitor||d,i=o.dots,r=o.indexes,c=(o.Blob||typeof Blob<"u"&&Blob)&&j.isSpecCompliantForm(a);if(!j.isFunction(n))throw new TypeError("visitor must be a function");function g(y){if(y===null)return"";if(j.isDate(y))return y.toISOString();if(!c&&j.isBlob(y))throw new pe("Blob is not supported. Use a Buffer instead.");return j.isArrayBuffer(y)||j.isTypedArray(y)?c&&typeof Blob=="function"?new Blob([y]):Buffer.from(y):y}function d(y,p,u){let f=y;if(y&&!u&&typeof y=="object"){if(j.endsWith(p,"{}"))p=s?p:p.slice(0,-2),y=JSON.stringify(y);else if(j.isArray(y)&&az(y)||(j.isFileList(y)||j.endsWith(p,"[]"))&&(f=j.toArray(y)))return p=G1(p),f.forEach(function(_,k){!(j.isUndefined(_)||_===null)&&a.append(r===!0?W1([p],k,i):r===null?p:p+"[]",g(_))}),!1}return qd(y)?!0:(a.append(W1(u,p,i),g(y)),!1)}const l=[],m=Object.assign(oz,{defaultVisitor:d,convertValue:g,isVisitable:qd});function h(y,p){if(!j.isUndefined(y)){if(l.indexOf(y)!==-1)throw Error("Circular reference detected in "+p.join("."));l.push(y),j.forEach(y,function(u,f){(!(j.isUndefined(u)||u===null)&&n.call(a,u,j.isString(f)?f.trim():f,p,m))===!0&&h(u,p?p.concat(f):[f])}),l.pop()}}if(!j.isObject(e))throw new TypeError("data must be an object");return h(e),a}function q1(e){const a={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(o){return a[o]})}function Jd(e,a){this._pairs=[],e&&Gi(e,this,a)}const J1=Jd.prototype;J1.append=function(e,a){this._pairs.push([e,a])},J1.toString=function(e){const a=e?function(o){return e.call(this,o,q1)}:q1;return this._pairs.map(function(o){return a(o[0])+"="+a(o[1])},"").join("&")};function sz(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function X1(e,a,o){if(!a)return e;const s=o&&o.encode||sz,n=o&&o.serialize;let i;if(n?i=n(a,o):i=j.isURLSearchParams(a)?a.toString():new Jd(a,o).toString(s),i){const r=e.indexOf("#");r!==-1&&(e=e.slice(0,r)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}const Z1=class{constructor(){this.handlers=[]}use(a,o,s){return this.handlers.push({fulfilled:a,rejected:o,synchronous:s?s.synchronous:!1,runWhen:s?s.runWhen:null}),this.handlers.length-1}eject(a){this.handlers[a]&&(this.handlers[a]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(a){j.forEach(this.handlers,function(o){o!==null&&a(o)})}},Y1={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},nz=typeof URLSearchParams<"u"?URLSearchParams:Jd,iz=typeof FormData<"u"?FormData:null,rz=typeof Blob<"u"?Blob:null,lz={isBrowser:!0,classes:{URLSearchParams:nz,FormData:iz,Blob:rz},protocols:["http","https","file","blob","url","data"]},K1=typeof window<"u"&&typeof document<"u",cz=(e=>K1&&["ReactNative","NativeScript","NS"].indexOf(e)<0)(typeof navigator<"u"&&navigator.product),dz=(()=>typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function")(),mz=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:K1,hasStandardBrowserEnv:cz,hasStandardBrowserWebWorkerEnv:dz},Symbol.toStringTag,{value:"Module"})),aa={...mz,...lz};function pz(e,a){return Gi(e,new aa.classes.URLSearchParams,Object.assign({visitor:function(o,s,n,i){return aa.isNode&&j.isBuffer(o)?(this.append(s,o.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)}},a))}function hz(e){return j.matchAll(/\w+|\[(\w*)]/g,e).map(a=>a[0]==="[]"?"":a[1]||a[0])}function gz(e){const a={},o=Object.keys(e);let s;const n=o.length;let i;for(s=0;s<n;s++)i=o[s],a[i]=e[i];return a}function Q1(e){function a(o,s,n,i){let r=o[i++];if(r==="__proto__")return!0;const c=Number.isFinite(+r),g=i>=o.length;return r=!r&&j.isArray(n)?n.length:r,g?(j.hasOwnProp(n,r)?n[r]=[n[r],s]:n[r]=s,!c):((!n[r]||!j.isObject(n[r]))&&(n[r]=[]),a(o,s,n[r],i)&&j.isArray(n[r])&&(n[r]=gz(n[r])),!c)}if(j.isFormData(e)&&j.isFunction(e.entries)){const o={};return j.forEachEntry(e,(s,n)=>{a(hz(s),n,o,0)}),o}return null}function yz(e,a,o){if(j.isString(e))try{return(a||JSON.parse)(e),j.trim(e)}catch(s){if(s.name!=="SyntaxError")throw s}return(o||JSON.stringify)(e)}const Xd={transitional:Y1,adapter:["xhr","http"],transformRequest:[function(e,a){const o=a.getContentType()||"",s=o.indexOf("application/json")>-1,n=j.isObject(e);if(n&&j.isHTMLForm(e)&&(e=new FormData(e)),j.isFormData(e))return s?JSON.stringify(Q1(e)):e;if(j.isArrayBuffer(e)||j.isBuffer(e)||j.isStream(e)||j.isFile(e)||j.isBlob(e))return e;if(j.isArrayBufferView(e))return e.buffer;if(j.isURLSearchParams(e))return a.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let i;if(n){if(o.indexOf("application/x-www-form-urlencoded")>-1)return pz(e,this.formSerializer).toString();if((i=j.isFileList(e))||o.indexOf("multipart/form-data")>-1){const r=this.env&&this.env.FormData;return Gi(i?{"files[]":e}:e,r&&new r,this.formSerializer)}}return n||s?(a.setContentType("application/json",!1),yz(e)):e}],transformResponse:[function(e){const a=this.transitional||Xd.transitional,o=a&&a.forcedJSONParsing,s=this.responseType==="json";if(e&&j.isString(e)&&(o&&!this.responseType||s)){const n=!(a&&a.silentJSONParsing)&&s;try{return JSON.parse(e)}catch(i){if(n)throw i.name==="SyntaxError"?pe.from(i,pe.ERR_BAD_RESPONSE,this,null,this.response):i}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:aa.classes.FormData,Blob:aa.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};j.forEach(["delete","get","head","post","put","patch"],e=>{Xd.headers[e]={}});const Zd=Xd,uz=j.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),fz=e=>{const a={};let o,s,n;return e&&e.split(`
|
|
33
|
+
`}}}},getChartSeries(e,a){let o,s;return this.showPostMatchData?(o={name:`${this.homeTeam.acronym}`,data:[],dataTotal:[]},s={name:`${this.visitingTeam.acronym}`,data:[],dataTotal:[]},a.arraySubcategories=[],Object.values(e).forEach((n,i)=>{a.xaxis.categories.push(this.prepareLabels(n,i)),a.arraySubcategories.push(n);const r=n.homeTeam[this.homeTeamStatisticsType].totalPostGame+n.visitingTeam[this.visitingTeamStatisticsType].totalPostGame;o.data.push(Math.round(120*(r?n.homeTeam[this.homeTeamStatisticsType].totalPostGame/r:0))),o.dataTotal.push(n.homeTeam[this.homeTeamStatisticsType].totalPostGame),s.data.push(Math.round(120*(r?n.visitingTeam[this.visitingTeamStatisticsType].totalPostGame/r:0))),s.dataTotal.push(n.visitingTeam[this.visitingTeamStatisticsType].totalPostGame)})):(o={name:`${this.showLiveData?"Live":"Histórico"} ${this.homeTeam.acronym}`,data:[],dataTotal:[]},s={name:`${this.showLiveData?"Live":"Histórico"} ${this.visitingTeam.acronym}`,data:[],dataTotal:[]},a.arraySubcategories=[],Object.values(e).forEach((n,i)=>{a.xaxis.categories.push(this.prepareLabels(n,i)),a.arraySubcategories.push(n);let r,c,g,d;n.homeTeam[this.homeTeamStatisticsType].leader.points,n.visitingTeam[this.visitingTeamStatisticsType].leader.points;const l=n.homeTeam.accomplished.avgPostGame+n.visitingTeam.accomplished.avgPostGame;if(!this.showLiveData)this.gameForAnalysis.game_status!==1&&n.generalCategoriesIds.accomplished===3?(r=n.homeTeam.accomplished.avgPostGame/l,g=n.homeTeam.accomplished.totalPostGame):(r=l?n.homeTeam[this.homeTeamStatisticsType].avgPostGame/l:0,g=n.homeTeam[this.homeTeamStatisticsType].totalPostGame);else{const m=n.homeTeam[this.homeTeamStatisticsType].totalLive+n.visitingTeam[this.visitingTeamStatisticsType].totalLive;r=m?n.homeTeam[this.homeTeamStatisticsType].totalLive/m:0,g=n.homeTeam[this.homeTeamStatisticsType].totalLive}if(!this.showLiveData)this.gameForAnalysis.game_status!==1&&n.generalCategoriesIds.accomplished===3?(c=n.visitingTeam.accomplished.avgPostGame/l,d=n.visitingTeam.accomplished.totalPostGame):(c=l?n.visitingTeam[this.visitingTeamStatisticsType].avgPostGame/l:0,d=n.visitingTeam[this.visitingTeamStatisticsType].totalPostGame);else{const m=n.homeTeam[this.homeTeamStatisticsType].totalLive+n.visitingTeam[this.visitingTeamStatisticsType].totalLive;c=m?n.visitingTeam[this.visitingTeamStatisticsType].totalLive/m:0,d=n.visitingTeam[this.visitingTeamStatisticsType].totalLive}o.data.push(Math.round(120*r)),o.dataTotal.push(Math.round(g)),s.data.push(Math.round(120*c)),s.dataTotal.push(Math.round(d))})),[o,s]},onHomeTeamPlaysTypeChanged(e){this.homeTeamSelectedPlaysType=e},onVisitingTeamPlaysTypeChanged(e){this.visitingTeamSelectedPlaysType=e},getSubcategoryData(e,a="homeTeam"){return e.id==="3-0"&&(e[a].accomplished.totalLiveBothTeams=e.homeTeam.accomplished.totalLive+e.visitingTeam.accomplished.totalLive),e[a].accomplished||0},showModal(e,a,o){const s=o===0?"homeTeam":"visitingTeam",n=e.config.arraySubcategories[a]||{};this.tooltip.isLeagueAvgVisible=n.id!=="3-0",this.tooltip.data=this.getSubcategoryData(n,s),this.tooltip.local=o===0,this.tooltip.names=n.names,this.tooltip.keyName=this.subcategoryName,this.tooltip.leagueAvg=this.leagueAvg(n);const i=e.globals.clientX||0,r=e.globals.clientY||0;this.globals.x=i,this.globals.y=r,this.tooltip.x=i,this.tooltip.y=r>700?r-250:r;const c=n.generalCategoriesIds.accomplished===3;if(c){const g=n.homeTeam.accomplished.avgPostGame+n.visitingTeam.accomplished.avgPostGame;this.tooltip.numberValue=g?n[s].accomplished.avgPostGame/g*100:0}else this.tooltip.numberValue=null;return this.tooltip.booleanIsPercent=c,this.tooltip.show=!0,this.tooltip.data},updateTooltip(e){const o=Math.abs(e.clientX-this.globals.x),s=Math.abs(e.clientY-this.globals.y);(o>5||s>5)&&(this.tooltip.show=!1)},prepareLabels(e,a){let o=e.name||e.names[this.subcategoryName]||e.names["0-0"];if(a===0)return o;const s=13;if(o.length>s){let n=o.split(" ");o=[];let i="",r="",c=n.slice(-1)[0];n.forEach(g=>{i+=` ${g} `,i.length>s&&(o.push(r.trim()),i=g),r=i,c===g&&o.push(r.trim())})}return o},leagueAvg(e){return e.generalCategoriesIds.accomplished===3?(e.homeTeam.accomplished.arrayRankings.reduce((a,o)=>a+o.points,0)/e.homeTeam.accomplished.arrayRankings.length*100).toFixed(2):this.avg(e,this.accomplished)}}},k1=e=>(t.pushScopeId("data-v-383baec7"),e=e(),t.popScopeId(),e),$I={key:0,class:"distribution-leyend"},BI=k1(()=>t.createElementVNode("br",null,null,-1)),xI={class:"distribution"},VI={class:"distribution__container"},II={class:"distribution__container__chart-type__title"},AI=k1(()=>t.createElementVNode("div",{class:"distribution__container__chart-type__controls"},null,-1)),OI={class:"distribution__container__chart-type__chart"};function TI(e,a,o,s,n,i){const r=t.resolveComponent("apexchart");return t.openBlock(),t.createElementBlock(t.Fragment,null,[e.gameForAnalysis.game_status==4?(t.openBlock(),t.createElementBlock("div",$I,[t.createTextVNode("Faltan "),t.createElementVNode("span",null,t.toDisplayString(i.timeLeft),1),t.createTextVNode(" para el inicio."),BI,t.createTextVNode("Las estadísticas corresponden a sus promedios por partido del torneo "),t.createElementVNode("span",null,t.toDisplayString(o.seasonSelected.name),1)])):t.createCommentVNode("",!0),t.createElementVNode("div",xI,[t.createElementVNode("div",VI,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(n.arrayDataForCharts,(c,g)=>(t.openBlock(),t.createElementBlock("div",{class:"distribution__container__chart-type",key:g},[t.createElementVNode("div",II,t.toDisplayString(c.name),1),AI,t.createElementVNode("div",OI,[(t.openBlock(),t.createBlock(r,{type:"radar",height:n.height,options:n.arrayChartOptions[g],series:n.arrayFilledSeries[g],key:n.chartKeyCounter+n.updateCategory+g},null,8,["height","options","series"]))])]))),128))])])],64)}const zI=Ae(NI,[["render",TI],["__scopeId","data-v-383baec7"]]),FI=(e,a)=>{const o=e.__vccOpts||e;for(const[s,n]of a)o[s]=n;return o},Hd={props:{textOptionLeft:String,valueDefault:{type:String,default:""},textOptionRight:String,hiddenLabels:{type:Boolean,default:!1},width:{type:String,default:"50px"},height:{type:String,default:"32px"},heightCircle:{type:String,default:"24px"},widthCircle:{type:String,default:"24px"},widthIcons:{type:String,default:"22"},borderRadius:{type:String,default:"30px"},borderType:{type:String,default:"solid"},borderWidth:{type:Number,default:1},borderColor:{type:String,default:"#FFFFFF"},fontSize:{type:String,default:"14px"},fontColor:{type:String,default:"#000000"},iconA:{type:String,default:""},iconB:{type:String,default:""},fontFamily:{type:String,default:"Poppins-Regular"},backgroundColor:{type:String,default:"#2e3b46"},circleColorSwitch:{type:String,default:"#FFFFFF"}},data(){return{OptionDefault:!1}},watch:{valueDefault:{immediate:!0,handler:async function(e){try{e==this.textOptionLeft&&(this.OptionDefault=!1),e==this.textOptionRight&&(this.OptionDefault=!0)}catch(a){throw new Error(a)}}}},computed:{customStyle(){return{width:this.width,height:this.height,borderRadius:this.borderRadius,border:`${this.borderType} ${this.borderWidth}px ${this.borderColor}`,backgroundColor:this.backgroundColor,circleColor:this.circleColorSwitch}},customText(){return{color:this.fontColor,fontSize:this.fontSize,fontFamily:`${this.fontFamily} !important`}}},methods:{handleSwitchChange(e){e.target.checked?this.$emit("change",this.textOptionRight):this.$emit("change",this.textOptionLeft)}}},S1=()=>{t.useCssVars(e=>({"1b04779e":e.widthCircle,c974bf22:e.heightCircle}))},E1=Hd.setup;Hd.setup=E1?(e,a)=>(S1(),E1(e,a)):S1;const RI={key:0,class:"text-left"},PI=["width","src"],DI=["checked"],LI=["width","src"],jI={key:3,class:"text-right"};function vI(e,a,o,s,n,i){return t.openBlock(),t.createElementBlock("div",{class:"gsc-switch-radio",style:t.normalizeStyle(i.customText)},[o.textOptionLeft!=""&&!o.hiddenLabels?(t.openBlock(),t.createElementBlock("span",RI,t.toDisplayString(o.textOptionLeft),1)):t.createCommentVNode("",!0),o.iconA!=""?(t.openBlock(),t.createElementBlock("img",{key:1,width:o.widthIcons,src:o.iconA},null,8,PI)):t.createCommentVNode("",!0),t.createElementVNode("input",{type:"checkbox",id:"toggle-btn",onChange:a[0]||(a[0]=(...r)=>i.handleSwitchChange&&i.handleSwitchChange(...r)),checked:n.OptionDefault},null,40,DI),t.createElementVNode("label",{for:"toggle-btn",style:t.normalizeStyle([i.customStyle,{"--circle-color":o.circleColorSwitch}])},null,4),o.iconB!=""?(t.openBlock(),t.createElementBlock("img",{key:2,width:o.widthIcons,src:o.iconB},null,8,LI)):t.createCommentVNode("",!0),o.textOptionRight!=""&&!o.hiddenLabels?(t.openBlock(),t.createElementBlock("span",jI,t.toDisplayString(o.textOptionRight),1)):t.createCommentVNode("",!0)],4)}const MI=FI(Hd,[["render",vI],["__scopeId","data-v-e2a20444"]]),pMe="",hMe="",HI={name:"tooltip",props:{data:{type:Object,required:!0}},computed:{positionTooltip(){return{top:`${this.data.y}px`,left:`${this.data.x}px`}},showTooltip(){return{visible:this.data.visible}}},methods:{tooltipClick:function(e){this.visible=!1}}};function UI(e,a,o,s,n,i){return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["box-tooltip",i.showTooltip]),style:t.normalizeStyle(i.positionTooltip),onClick:a[0]||(a[0]=(...r)=>i.tooltipClick&&i.tooltipClick(...r))},[t.renderSlot(e.$slots,"default",{},void 0,!0)],6)}const N1=Ae(HI,[["render",UI],["__scopeId","data-v-33a39744"]]),gMe="",GI={name:"SoccerChalkboard",components:{Tooltip:N1},props:{plays:{type:Array,required:!0},categories:{type:Array,required:!0},team:{type:String,required:!0}},data(){return{negativeColor:"red",data:{x:0,y:0,visible:!1},dataPlay:{playerName:"",photo:"",minute:0,rivalLogo:"",rivalName:"",categoryName:"",xGi:0,xGf:0,isOwnGoal:!1}}},computed:{...Te("nextGeneral",["homeTeam","visitingTeam"]),preparedPlays(){return this.plays.map(e=>({...e,playingAs:e.playing_as,teamId:e.team_id,photo:e.photo,categoryId:e.category_id,matchResult:e.match_result,matchLapse:e.matchlapse,x1:e.x1*100,y1:e.y1*100,x2:e.x2*100,y2:e.y2*100,x3:e.x3*100,y3:e.y3*100,xGi:e.xG1,xGf:e.xG2}))},localCategories(){return this.categories.map((e,a)=>({id:a,name:e.name,negative:e.negative||!1,color:e.color,points:e.points,numPoints:e.points.length,categories:e.categories,invert:e.invert||[]}))},graphPlays(){let e=this.localCategories.reduce((s,n)=>[...s,n.categories],[]);return this.preparedPlays.filter(s=>this.findCategoryInPlay(e,s)).reduce((s,n)=>{let i=this.localCategories.find(r=>this.findCategoryInPlay(r.categories,n));if(i){let r={category:i.id,categoryName:i.name,arrowColor:i.negative?this.negativeColor:i.color,arrowMarkerColor:i.negative?"url(#arrow-negative)":`url(#arrow-${i.id})`,markerColor:i.color,jersey:n.jersey_number,matchlapse:n.matchLapse,playerName:n.player_name,photo:n.photo,rivalLogo:n.rival_id,x1:i.invert.includes(n.categoryId)?100-n[`x${i.points[0]}`]:n[`x${i.points[0]}`],y1:i.invert.includes(n.categoryId)?100-n[`y${i.points[0]}`]:n[`y${i.points[0]}`],x2:i.invert.includes(n.categoryId)?100-n[`x${i.points[1]}`]:n[`x${i.points[1]}`],y2:i.invert.includes(n.categoryId)?100-n[`y${i.points[1]}`]:n[`y${i.points[1]}`],x3:i.invert.includes(n.categoryId)?100-n[`x${i.points[2]}`]:n[`x${i.points[2]}`],y3:i.invert.includes(n.categoryId)?100-n[`y${i.points[2]}`]:n[`y${i.points[2]}`],momentOfPlay:n.moment_of_play,isOwnGoal:i.invert.includes(n.categoryId),xGi:n.xGi,xGf:n.xGf};s.push(r)}return s},[])}},methods:{findCategoryInPlay(e,a){return e.find(o=>typeof o=="number"?o===a.categoryId:o.includes(a.categoryId))},onMouseOver(e,a){this.dataPlay.playerName=a.playerName||"",this.dataPlay.photo=a.photo||"",this.dataPlay.minute=parseInt(a.momentOfPlay.split(":")[0])||"",this.dataPlay.rivalLogo=a.rivalLogo||"",this.dataPlay.categoryName=a.categoryName||"",this.dataPlay.rivalName=this.team=="Visiting"?this.homeTeam.colloquial_name:this.visitingTeam.colloquial_name,this.dataPlay.xGi=String(a.xGi),this.dataPlay.xGf=String(a.xGf),this.dataPlay.isOwnGoal=a.isOwnGoal,this.data.visible=!0},onMouseLeave(){this.data.visible=!1}}},Os=e=>(t.pushScopeId("data-v-883eff7a"),e=e(),t.popScopeId(),e),WI={class:"soccer-chalkboard-xg"},qI={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 490 684","xmlns:xlink":"http://www.w3.org/1999/xlink",class:"soccer-chalkboard"},JI={xmlns:"http://www.w3.org/2000/svg",viewBox:"30 0 452 684","xmlns:xlink":"http://www.w3.org/1999/xlink"},XI=Os(()=>t.createElementVNode("marker",{id:"arrow-negative",viewBox:"0 0 10 10",refX:"5",refY:"5",markerWidth:"6",markerHeight:"6",markerUnits:"strokeWidth",orient:"auto"},[t.createElementVNode("path",{d:"M 0 0 L 10 5 L 0 10 z","stroke-width":"2",fill:"red"})],-1)),ZI=["id"],YI=["fill"],KI=Os(()=>t.createElementVNode("pattern",{id:"fieldBackground",width:"1",height:"1",viewBox:"0 0 100 100",preserveAspectRatio:"none"},[t.createElementVNode("image",{"xlink:href":"https://az755631.vo.msecnd.net/todoelfut/fieldbg.png",width:"100",height:"100",preserveAspectRatio:"none",id:"image2"})],-1)),QI=["id"],eA=["x1","y1","x2","y2","stroke"],tA=["x1","y1","x2","y2","stroke","marker-end"],aA=["onMouseover"],oA=["x","y","fill"],sA=["x","y"],nA={class:"tooltip-data has-text-left"},iA={class:"bold"},rA={class:"tooltip-image"},lA={class:"tooltip-image"},cA=["src"],dA={class:"tooltip-xg"},mA={key:0},pA=Os(()=>t.createElementVNode("span",null,"xGi:",-1)),hA=Os(()=>t.createElementVNode("div",{class:"tooltip-xg-separator"},null,-1)),gA={key:1},yA=Os(()=>t.createElementVNode("span",null,"xGf:",-1));function uA(e,a,o,s,n,i){const r=t.resolveComponent("Tooltip");return t.openBlock(),t.createElementBlock("div",WI,[(t.openBlock(),t.createElementBlock("svg",qI,[(t.openBlock(),t.createElementBlock("svg",JI,[t.createElementVNode("defs",null,[XI,(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(i.localCategories,c=>(t.openBlock(),t.createElementBlock("marker",{key:`arrow-color-${c.id}`,id:`arrow-${c.id}`,viewBox:"0 0 10 10",refX:"5",refY:"5",markerWidth:"6",markerHeight:"6",markerUnits:"strokeWidth",orient:"auto"},[t.createElementVNode("path",{d:"M 0 0 L 10 5 L 0 10 z","stroke-width":"2",fill:c.color},null,8,YI)],8,ZI))),128)),KI]),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(i.graphPlays,c=>(t.openBlock(),t.createElementBlock("g",{key:c.id,id:`play-${c.playId}`},[t.createElementVNode("line",{x1:`${c.x1}%`,y1:`${c.y1}%`,x2:`${c.x2}%`,y2:`${c.y2}%`,stroke:c.arrowColor,"stroke-width":"2"},null,8,eA),t.createElementVNode("line",{x1:`${c.x2}%`,y1:`${c.y2}%`,x2:`${c.x3}%`,y2:`${c.y3}%`,stroke:c.arrowColor,"stroke-width":"2","marker-end":c.arrowMarkerColor},null,8,tA),t.createElementVNode("g",{onMouseover:g=>i.onMouseOver(g,c),onMouseleave:a[0]||(a[0]=(...g)=>i.onMouseLeave&&i.onMouseLeave(...g)),class:"is-pointer"},[t.createElementVNode("rect",{x:`${c.x1}%`,y:`${c.y1}%`,transform:"translate(-14, -14)",height:"28",width:"28","stroke-width":"2",fill:c.markerColor,stroke:"#999",rx:"14",ry:"14"},null,8,oA),t.createElementVNode("text",{"text-anchor":"middle","dominant-baseline":"middle",x:`${c.x1}%`,y:`${c.y1}%`,dy:"1","font-size":"15",fill:"#fff","font-family":"'Poppins-SemiBold', sans-serif"},t.toDisplayString(c.jersey),9,sA)],40,aA)],8,QI))),128))]))])),t.createVNode(r,{data:n.data},{default:t.withCtx(()=>[t.createElementVNode("div",nA,[t.createElementVNode("div",null,[t.createElementVNode("span",iA,t.toDisplayString(n.dataPlay.isOwnGoal?"Autogol":n.dataPlay.categoryName),1)]),t.createElementVNode("div",null,[t.createTextVNode(t.toDisplayString(n.dataPlay.playerName)+" ",1),t.createElementVNode("div",rA,[t.createElementVNode("div",{class:"tooltip-image-player",style:t.normalizeStyle("background: url("+n.dataPlay.photo+") top")},null,4)])]),t.createElementVNode("div",null,"Minuto: "+t.toDisplayString(n.dataPlay.minute)+"'",1),t.createElementVNode("div",null,[t.createTextVNode(" Rival: "),t.createElementVNode("div",lA,[t.createElementVNode("img",{src:n.dataPlay.rivalLogo},null,8,cA)])]),t.createElementVNode("div",dA,[/^[+]?([0-1]+(?:[\.][0-9]*)?|\.[0-9]+)$/.test(n.dataPlay.xGi)&&n.dataPlay.xGi<=1&&!n.dataPlay.isOwnGoal?(t.openBlock(),t.createElementBlock("div",mA,[pA,t.createTextVNode(" "+t.toDisplayString(Number(n.dataPlay.xGi)),1)])):t.createCommentVNode("",!0),hA,/^[+]?([0-1]+(?:[\.][0-9]*)?|\.[0-9]+)$/.test(n.dataPlay.xGf)&&n.dataPlay.xGf<=1&&!n.dataPlay.isOwnGoal?(t.openBlock(),t.createElementBlock("div",gA,[yA,t.createTextVNode(" "+t.toDisplayString(Number(n.dataPlay.xGf)),1)])):t.createCommentVNode("",!0)])])]),_:1},8,["data"])])}const $1=Ae(GI,[["render",uA],["__scopeId","data-v-883eff7a"]]),ji=[{name:"Goles",color:"#336DFF",points:[1,2,3],categories:[12,55,35,54],invert:[35,54],negative:!1},{name:"Tiros a gol",color:"#7ED321",points:[1,2,3],categories:[12,55,35,54,510]}],yMe="",fA={name:"Xg",components:{SoccerChalkboard:$1},props:{},data(){return{categories:ji}},computed:{...kt("nextGeneral",["usePastSeasonId","pastSeasonId","gameId"]),...kt("general",["booleanIsStatisticModalOpen"]),...Te("xgGeneral",["playsLocal","goalsQtyLocal","shotsOnGoalQtyLocal","xGLocal"]),...Te("nextGeneral",["getSeasonId","homeTeam","visitingTeam","showPostMatchData","game","getGameForAnalysis"]),...Te("loginGeneral",["getPremiumAccount","getIsGolstats"]),...Te("general",["getPreviewSectionAnalytics"]),stringSelectedTeamLogo(){return this.homeTeam.logo},windowWidth(){return this.$store.state.windowWidth},gxInfoItems(){return[{title:"Goles",value:this.goalsQtyLocal},{title:"Tiros a Gol",value:this.shotsOnGoalQtyLocal},{title:"Goles esperados (xG)",value:this.xGLocal}]}},watch:{getGameForAnalysis:{deep:!0,handler(e){e&&this.fillXgPlays()}}},methods:{...Ua("general",["setVideoSrc","setVideoModalVisibility"]),...Ua("xgGeneral",["setTeamSelected"]),...Ni("xgGeneral",["getXgPlays"]),openXgVideo(){this.setVideoSrc(""),this.setVideoModalVisibility(!0)},getTeamId(){return this.homeTeam.team_id},fillXgPlays(){this.getGameForAnalysis.game_status!=1?this.getXgPlays({seasonId:this.usePastSeasonId?this.pastSeasonId:this.getSeasonId,localTeamId:this.homeTeam.team_id,visitingTeamId:this.visitingTeam.team_id}):this.getXgPlays({seasonId:this.gameId,localTeamId:this.homeTeam.team_id,visitingTeamId:this.visitingTeam.team_id,postMatch:!0})}},beforeMount(){this.fillXgPlays()}},B1=e=>(t.pushScopeId("data-v-6fa9fc78"),e=e(),t.popScopeId(),e),_A={class:"xg-container"},bA={class:"xg-container__info"},wA=B1(()=>t.createElementVNode("div",{class:"title"},"Goles esperados (xG)",-1)),CA={class:"table"},kA={class:"table__row"},SA={class:"table__row__title"},EA={class:"table__row__value"},NA=["src"],$A={class:"table__row"},BA={class:"table__row__title"},xA={class:"table__row__value"},VA={class:"table__row"},IA={class:"table__row__title"},AA={class:"table__row__value"},OA=B1(()=>t.createElementVNode("div",{class:"table-description"},[t.createElementVNode("span",null,"xG:"),t.createTextVNode(" es la medida para estimar la probabilidad de que un tiro o una jugada termine en gol, basándose en factores como la ubicación y la dificultad de la acción. ")],-1)),TA={class:"xg-container__field"};function zA(e,a,o,s,n,i){const r=t.resolveComponent("SoccerChalkboard");return t.openBlock(),t.createElementBlock("div",_A,[t.createElementVNode("div",bA,[wA,t.createElementVNode("div",CA,[t.createElementVNode("div",kA,[t.createElementVNode("div",SA,t.toDisplayString(i.gxInfoItems[0].title),1),t.createElementVNode("div",EA,[t.createTextVNode(t.toDisplayString(i.gxInfoItems[0].value),1),t.createElementVNode("img",{class:"img-abs",src:i.stringSelectedTeamLogo},null,8,NA)])]),t.createElementVNode("div",$A,[t.createElementVNode("div",BA,t.toDisplayString(i.gxInfoItems[1].title),1),t.createElementVNode("div",xA,t.toDisplayString(i.gxInfoItems[1].value),1)]),t.createElementVNode("div",VA,[t.createElementVNode("div",IA,t.toDisplayString(i.gxInfoItems[2].title),1),t.createElementVNode("div",AA,t.toDisplayString(i.gxInfoItems[2].value),1)])]),OA]),t.createElementVNode("div",TA,[t.createVNode(r,{plays:e.playsLocal,categories:n.categories,team:e.team},null,8,["plays","categories","team"])])])}const FA=Ae(fA,[["render",zA],["__scopeId","data-v-6fa9fc78"]]),uMe="",RA={name:"Xg",components:{SoccerChalkboard:$1},props:{team:{type:String,default:"Visiting"}},data(){return{categories:ji}},computed:{...kt("nextGeneral",["usePastSeasonId","pastSeasonId","gameId"]),...kt("general",["booleanIsStatisticModalOpen"]),...Te("xgGeneral",["playsAway","goalsQtyAway","shotsOnGoalQtyAway","xGAway"]),...Te("nextGeneral",["getSeasonId","homeTeam","visitingTeam","showPostMatchData","game","getGameForAnalysis"]),...Te("loginGeneral",["getPremiumAccount","getIsGolstats"]),...Te("general",["getPreviewSectionAnalytics"]),stringSelectedTeamLogo(){return this.visitingTeam.logo},windowWidth(){return this.$store.state.windowWidth},gxInfoItems(){return[{title:"Goles",value:this.goalsQtyAway},{title:"Tiros a Gol",value:this.shotsOnGoalQtyAway},{title:"Goles esperados (xG)",value:this.xGAway}]}},watch:{getGameForAnalysis:{deep:!0,handler(e){e&&this.fillXgPlays()}}},methods:{...Ua("general",["setVideoSrc","setVideoModalVisibility"]),...Ua("xgGeneral",["setTeamSelected"]),...Ni("xgGeneral",["getXgPlays"]),openXgVideo(){this.setVideoSrc(""),this.setVideoModalVisibility(!0)},getTeamId(){return this.visitingTeam.team_id},fillXgPlays(){this.getGameForAnalysis.game_status!=1?this.getXgPlays({seasonId:this.usePastSeasonId?this.pastSeasonId:this.getSeasonId,localTeamId:this.homeTeam.team_id,visitingTeamId:this.visitingTeam.team_id}):this.getXgPlays({seasonId:this.gameId,localTeamId:this.homeTeam.team_id,visitingTeamId:this.visitingTeam.team_id,postMatch:!0})}},beforeMount(){this.setTeamSelected("Visiting"),this.fillXgPlays()}},x1=e=>(t.pushScopeId("data-v-03602455"),e=e(),t.popScopeId(),e),PA={class:"xg-container"},DA={class:"xg-container__info"},LA=x1(()=>t.createElementVNode("div",{class:"title"},"Goles esperados (xG)",-1)),jA={class:"table"},vA={class:"table__row"},MA={class:"table__row__title"},HA={class:"table__row__value"},UA=["src"],GA={class:"table__row"},WA={class:"table__row__title"},qA={class:"table__row__value"},JA={class:"table__row"},XA={class:"table__row__title"},ZA={class:"table__row__value"},YA=x1(()=>t.createElementVNode("div",{class:"table-description"},[t.createElementVNode("span",null,"xG:"),t.createTextVNode(" es la medida para estimar la probabilidad de que un tiro o una jugada termine en gol, basándose en factores como la ubicación y la dificultad de la acción. ")],-1)),KA={class:"xg-container__field"};function QA(e,a,o,s,n,i){const r=t.resolveComponent("SoccerChalkboard");return t.openBlock(),t.createElementBlock("div",null,[t.createElementVNode("div",PA,[t.createElementVNode("div",DA,[LA,t.createElementVNode("div",jA,[t.createElementVNode("div",vA,[t.createElementVNode("div",MA,t.toDisplayString(i.gxInfoItems[0].title),1),t.createElementVNode("div",HA,[t.createTextVNode(t.toDisplayString(i.gxInfoItems[0].value),1),t.createElementVNode("img",{class:"img-abs",src:i.stringSelectedTeamLogo},null,8,UA)])]),t.createElementVNode("div",GA,[t.createElementVNode("div",WA,t.toDisplayString(i.gxInfoItems[1].title),1),t.createElementVNode("div",qA,t.toDisplayString(i.gxInfoItems[1].value),1)]),t.createElementVNode("div",JA,[t.createElementVNode("div",XA,t.toDisplayString(i.gxInfoItems[2].title),1),t.createElementVNode("div",ZA,t.toDisplayString(i.gxInfoItems[2].value),1)])]),YA]),t.createElementVNode("div",KA,[t.createVNode(r,{plays:e.playsAway,categories:n.categories,team:o.team},null,8,["plays","categories","team"])])])])}const eO=Ae(RA,[["render",QA],["__scopeId","data-v-03602455"]]),fMe="",tO={name:"SoccerChalkboard",components:{Tooltip:N1},props:{plays:{type:Array,required:!0},categories:{type:Array,required:!0},team:{type:String,required:!0}},data(){return{negativeColor:"red",data:{x:0,y:0,visible:!1},dataPlay:{playerName:"",photo:"",minute:0,rivalLogo:"",rivalName:"",categoryName:"",xGi:0,xGf:0,isOwnGoal:!1}}},computed:{...Te("nextGeneral",["homeTeam","visitingTeam"]),preparedPlays(){return this.plays.map(e=>({...e,playingAs:e.playing_as,teamId:e.team_id,photo:e.photo,categoryId:e.category_id,matchResult:e.match_result,matchLapse:e.matchlapse,x1:e.x1*100,y1:e.y1*100,x2:e.x2*100,y2:e.y2*100,x3:e.x3*100,y3:e.y3*100,xGi:e.xG1,xGf:e.xG2}))},localCategories(){return this.categories.map((e,a)=>({id:a,name:e.name,negative:e.negative||!1,color:e.color,points:e.points,numPoints:e.points.length,categories:e.categories,invert:e.invert||[]}))},graphPlays(){let e=this.localCategories.reduce((s,n)=>[...s,n.categories],[]);return this.preparedPlays.filter(s=>this.findCategoryInPlay(e,s)).reduce((s,n)=>{let i=this.localCategories.find(r=>this.findCategoryInPlay(r.categories,n));if(i){let r={category:i.id,categoryName:i.name,arrowColor:i.negative?this.negativeColor:i.color,arrowMarkerColor:i.negative?"url(#arrow-negative)":`url(#arrow-${i.id})`,markerColor:i.color,jersey:n.jersey_number,matchlapse:n.matchLapse,playerName:n.player_name,photo:n.photo,rivalLogo:n.rival_id,x1:i.invert.includes(n.categoryId)?100-n[`x${i.points[0]}`]:n[`x${i.points[0]}`],y1:i.invert.includes(n.categoryId)?100-n[`y${i.points[0]}`]:n[`y${i.points[0]}`],x2:i.invert.includes(n.categoryId)?100-n[`x${i.points[1]}`]:n[`x${i.points[1]}`],y2:i.invert.includes(n.categoryId)?100-n[`y${i.points[1]}`]:n[`y${i.points[1]}`],x3:i.invert.includes(n.categoryId)?100-n[`x${i.points[2]}`]:n[`x${i.points[2]}`],y3:i.invert.includes(n.categoryId)?100-n[`y${i.points[2]}`]:n[`y${i.points[2]}`],momentOfPlay:n.moment_of_play,isOwnGoal:i.invert.includes(n.categoryId),xGi:n.xGi,xGf:n.xGf};s.push(r)}return s},[])}},methods:{findCategoryInPlay(e,a){return e.find(o=>typeof o=="number"?o===a.categoryId:o.includes(a.categoryId))},onMouseOver(e,a){this.dataPlay.playerName=a.playerName||"",this.dataPlay.photo=a.photo||"",this.dataPlay.minute=parseInt(a.momentOfPlay.split(":")[0])||"",this.dataPlay.rivalLogo=a.rivalLogo||"",this.dataPlay.categoryName=a.categoryName||"",this.dataPlay.rivalName=this.team=="Visiting"?this.homeTeam.team_name:this.visitingTeam.team_name,this.dataPlay.xGi=String(a.xGi),this.dataPlay.xGf=String(a.xGf),this.dataPlay.isOwnGoal=a.isOwnGoal,this.data.x=e.pageX<135?e.pageX-50:e.layerX-50,this.data.y=e.layerY+130,this.data.visible=!0},onMouseLeave(){this.data.visible=!1}}},Ts=e=>(t.pushScopeId("data-v-f6c30694"),e=e(),t.popScopeId(),e),aO={class:"soccer-chalkboard-xg"},oO={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 490 684","xmlns:xlink":"http://www.w3.org/1999/xlink",class:"soccer-chalkboard"},sO={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 452 684","xmlns:xlink":"http://www.w3.org/1999/xlink"},nO=Ts(()=>t.createElementVNode("marker",{id:"arrow-negative",viewBox:"0 0 10 10",refX:"5",refY:"5",markerWidth:"6",markerHeight:"6",markerUnits:"strokeWidth",orient:"auto"},[t.createElementVNode("path",{d:"M 0 0 L 10 5 L 0 10 z","stroke-width":"2",fill:"red"})],-1)),iO=["id"],rO=["fill"],lO=Ts(()=>t.createElementVNode("pattern",{id:"fieldBackground",width:"1",height:"1",viewBox:"0 0 100 100",preserveAspectRatio:"none"},[t.createElementVNode("image",{"xlink:href":"https://az755631.vo.msecnd.net/todoelfut/fieldbg.png",width:"100",height:"100",preserveAspectRatio:"none",id:"image2"})],-1)),cO=["id"],dO=["x1","y1","x2","y2","stroke"],mO=["x1","y1","x2","y2","stroke","marker-end"],pO=["onMouseover"],hO=["x","y","fill"],gO=["x","y"],yO={class:"tooltip-data has-text-left"},uO={class:"bold"},fO={class:"tooltip-image"},_O={class:"tooltip-image"},bO=["src"],wO={class:"tooltip-xg"},CO={key:0},kO=Ts(()=>t.createElementVNode("span",null,"xGi:",-1)),SO=Ts(()=>t.createElementVNode("div",{class:"tooltip-xg-separator"},null,-1)),EO={key:1},NO=Ts(()=>t.createElementVNode("span",null,"xGf:",-1));function $O(e,a,o,s,n,i){const r=t.resolveComponent("Tooltip");return t.openBlock(),t.createElementBlock("div",aO,[(t.openBlock(),t.createElementBlock("svg",oO,[(t.openBlock(),t.createElementBlock("svg",sO,[t.createElementVNode("defs",null,[nO,(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(i.localCategories,c=>(t.openBlock(),t.createElementBlock("marker",{key:`arrow-color-${c.id}`,id:`arrow-${c.id}`,viewBox:"0 0 10 10",refX:"5",refY:"5",markerWidth:"6",markerHeight:"6",markerUnits:"strokeWidth",orient:"auto"},[t.createElementVNode("path",{d:"M 0 0 L 10 5 L 0 10 z","stroke-width":"2",fill:c.color},null,8,rO)],8,iO))),128)),lO]),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(i.graphPlays,c=>(t.openBlock(),t.createElementBlock("g",{key:c.id,id:`play-${c.playId}`},[t.createElementVNode("line",{x1:`${c.x1}%`,y1:`${c.y1}%`,x2:`${c.x2}%`,y2:`${c.y2}%`,stroke:c.arrowColor,"stroke-width":"2"},null,8,dO),t.createElementVNode("line",{x1:`${c.x2}%`,y1:`${c.y2}%`,x2:`${c.x3}%`,y2:`${c.y3}%`,stroke:c.arrowColor,"stroke-width":"2","marker-end":c.arrowMarkerColor},null,8,mO),t.createElementVNode("g",{onMouseover:g=>i.onMouseOver(g,c),onMouseleave:a[0]||(a[0]=(...g)=>i.onMouseLeave&&i.onMouseLeave(...g)),class:"is-pointer"},[t.createElementVNode("rect",{x:`${c.x1}%`,y:`${c.y1}%`,transform:"translate(-14, -14)",height:"28",width:"28","stroke-width":"2",fill:c.markerColor,stroke:"#aaa",rx:"14",ry:"14"},null,8,hO),t.createElementVNode("text",{"text-anchor":"middle","dominant-baseline":"middle",x:`${c.x1}%`,y:`${c.y1}%`,dy:"1","font-size":"15",stroke:"white","font-family":"Poppins, sans-serif"},t.toDisplayString(c.jersey),9,gO)],40,pO)],8,cO))),128))]))])),t.createVNode(r,{data:n.data},{default:t.withCtx(()=>[t.createElementVNode("div",yO,[t.createElementVNode("div",null,[t.createElementVNode("span",uO,t.toDisplayString(n.dataPlay.isOwnGoal?"Autogol":n.dataPlay.categoryName),1)]),t.createElementVNode("div",null,[t.createTextVNode(t.toDisplayString(n.dataPlay.playerName)+" ",1),t.createElementVNode("div",fO,[t.createElementVNode("div",{class:"tooltip-image-player",style:t.normalizeStyle("background: url("+n.dataPlay.photo+") top")},null,4)])]),t.createElementVNode("div",null,"Minuto: "+t.toDisplayString(n.dataPlay.minute)+"'",1),t.createElementVNode("div",null,[t.createTextVNode(" Rival: "),t.createElementVNode("div",_O,[t.createElementVNode("img",{src:n.dataPlay.rivalLogo},null,8,bO)])]),t.createElementVNode("div",wO,[/^[+]?([0-1]+(?:[\.][0-9]*)?|\.[0-9]+)$/.test(n.dataPlay.xGi)&&n.dataPlay.xGi<=1&&!n.dataPlay.isOwnGoal?(t.openBlock(),t.createElementBlock("div",CO,[kO,t.createTextVNode(" "+t.toDisplayString(Number(n.dataPlay.xGi)),1)])):t.createCommentVNode("",!0),SO,/^[+]?([0-1]+(?:[\.][0-9]*)?|\.[0-9]+)$/.test(n.dataPlay.xGf)&&n.dataPlay.xGf<=1&&!n.dataPlay.isOwnGoal?(t.openBlock(),t.createElementBlock("div",EO,[NO,t.createTextVNode(" "+t.toDisplayString(Number(n.dataPlay.xGf)),1)])):t.createCommentVNode("",!0)])])]),_:1},8,["data"])])}const V1=Ae(tO,[["render",$O],["__scopeId","data-v-f6c30694"]]),_Me="",BO={name:"Xg",components:{SoccerChalkboard:V1},props:{},data(){return{categories:ji}},computed:{...kt("nextGeneral",["usePastSeasonId","pastSeasonId","gameId"]),...kt("general",["booleanIsStatisticModalOpen"]),...Te("xgGeneral",["playsLocal","goalsQtyLocal","shotsOnGoalQtyLocal","xGLocal"]),...Te("nextGeneral",["getSeasonId","homeTeam","visitingTeam","showPostMatchData"]),...Te("loginGeneral",["getPremiumAccount","getIsGolstats"]),...Te("general",["getPreviewSectionAnalytics"]),stringSelectedTeamLogo(){return this.homeTeam.logo},windowWidth(){return this.$store.state.windowWidth},gxInfoItems(){return[{title:"Goles",value:this.goalsQtyLocal},{title:"Tiros a Gol",value:this.shotsOnGoalQtyLocal},{title:"Goles esperados (xG)",value:this.xGLocal}]}},watch:{visitingTeam:{deep:!0,handler(e){e&&this.fillXgPlays()}},showPostMatchData:{handler(e,a){e!==a&&this.fillXgPlays()}}},methods:{...Ua("general",["setVideoSrc","setVideoModalVisibility"]),...Ua("xgGeneral",["setTeamSelected"]),...Ni("xgGeneral",["getXgPlays"]),openXgVideo(){this.setVideoSrc(""),this.setVideoModalVisibility(!0)},getTeamId(){return this.homeTeam.team_id},fillXgPlays(){this.showPostMatchData?this.getXgPlays({seasonId:this.gameId,localTeamId:this.homeTeam.team_id,visitingTeamId:this.visitingTeam.team_id,postMatch:this.showPostMatchData}):this.getXgPlays({seasonId:this.usePastSeasonId?this.pastSeasonId:this.getSeasonId,localTeamId:this.homeTeam.team_id,visitingTeamId:this.visitingTeam.team_id})}},beforeMount(){this.fillXgPlays()}},I1=e=>(t.pushScopeId("data-v-fb5342de"),e=e(),t.popScopeId(),e),xO={class:"xg-container"},VO=I1(()=>t.createElementVNode("div",{class:"title"},"Goles esperados (xG)",-1)),IO={class:"xg-container__field"},AO={class:"xg-container__info"},OO={class:"table"},TO={class:"table__row"},zO={class:"table__row__title"},FO={class:"table__row__value"},RO=["src"],PO={class:"table__row"},DO={class:"table__row__title"},LO={class:"table__row__value"},jO={class:"table__row"},vO={class:"table__row__title"},MO={class:"table__row__value"},HO=I1(()=>t.createElementVNode("div",{class:"table-description"},[t.createElementVNode("span",null,"xG:"),t.createTextVNode(" es la medida para estimar la probabilidad de que un tiro o una jugada termine en gol, basándose en factores como la ubicación y la dificultad de la acción. ")],-1));function UO(e,a,o,s,n,i){const r=t.resolveComponent("SoccerChalkboard");return t.openBlock(),t.createElementBlock("div",xO,[VO,t.createElementVNode("div",IO,[t.createVNode(r,{plays:e.playsLocal,categories:n.categories,team:e.team},null,8,["plays","categories","team"])]),t.createElementVNode("div",AO,[t.createElementVNode("div",OO,[t.createElementVNode("div",TO,[t.createElementVNode("div",zO,t.toDisplayString(i.gxInfoItems[0].title),1),t.createElementVNode("div",FO,[t.createTextVNode(t.toDisplayString(i.gxInfoItems[0].value),1),t.createElementVNode("img",{class:"img-abs",src:i.stringSelectedTeamLogo},null,8,RO)])]),t.createElementVNode("div",PO,[t.createElementVNode("div",DO,t.toDisplayString(i.gxInfoItems[1].title),1),t.createElementVNode("div",LO,t.toDisplayString(i.gxInfoItems[1].value),1)]),t.createElementVNode("div",jO,[t.createElementVNode("div",vO,t.toDisplayString(i.gxInfoItems[2].title),1),t.createElementVNode("div",MO,t.toDisplayString(i.gxInfoItems[2].value),1)])]),HO])])}const GO=Ae(BO,[["render",UO],["__scopeId","data-v-fb5342de"]]),bMe="",WO={name:"Xg",components:{SoccerChalkboard:V1},props:{},data(){return{categories:ji}},computed:{...kt("nextGeneral",["usePastSeasonId","pastSeasonId","gameId"]),...kt("general",["booleanIsStatisticModalOpen"]),...Te("xgGeneral",["playsAway","goalsQtyAway","shotsOnGoalQtyAway","xGAway"]),...Te("nextGeneral",["getSeasonId","homeTeam","visitingTeam","showPostMatchData"]),...Te("loginGeneral",["getPremiumAccount","getIsGolstats"]),...Te("general",["getPreviewSectionAnalytics"]),stringSelectedTeamLogo(){return this.visitingTeam.logo},windowWidth(){return this.$store.state.windowWidth},gxInfoItems(){return[{title:"Goles",value:this.goalsQtyAway},{title:"Tiros a Gol",value:this.shotsOnGoalQtyAway},{title:"Goles esperados (xG)",value:this.xGAway}]}},watch:{visitingTeam:{deep:!0,handler(e){e&&this.fillXgPlays()}},showPostMatchData:{handler(e,a){e!==a&&this.fillXgPlays()}}},methods:{...Ua("general",["setVideoSrc","setVideoModalVisibility"]),...Ua("xgGeneral",["setTeamSelected"]),...Ni("xgGeneral",["getXgPlays"]),openXgVideo(){this.setVideoSrc(""),this.setVideoModalVisibility(!0)},getTeamId(){return this.homeTeam.team_id},fillXgPlays(){this.showPostMatchData?this.getXgPlays({seasonId:this.gameId,AwayTeamId:this.homeTeam.team_id,visitingTeamId:this.visitingTeam.team_id,postMatch:this.showPostMatchData}):this.getXgPlays({seasonId:this.usePastSeasonId?this.pastSeasonId:this.getSeasonId,AwayTeamId:this.homeTeam.team_id,visitingTeamId:this.visitingTeam.team_id})}},beforeMount(){this.fillXgPlays()}},A1=e=>(t.pushScopeId("data-v-38eed9b5"),e=e(),t.popScopeId(),e),qO={class:"xg-container"},JO=A1(()=>t.createElementVNode("div",{class:"title"},"Goles esperados (xG)",-1)),XO={class:"xg-container__field"},ZO={class:"xg-container__info"},YO={class:"table"},KO={class:"table__row"},QO={class:"table__row__title"},eT={class:"table__row__value"},tT=["src"],aT={class:"table__row"},oT={class:"table__row__title"},sT={class:"table__row__value"},nT={class:"table__row"},iT={class:"table__row__title"},rT={class:"table__row__value"},lT=A1(()=>t.createElementVNode("div",{class:"table-description"},[t.createElementVNode("span",null,"xG:"),t.createTextVNode(" es la medida para estimar la probabilidad de que un tiro o una jugada termine en gol, basándose en factores como la ubicación y la dificultad de la acción. ")],-1));function cT(e,a,o,s,n,i){const r=t.resolveComponent("SoccerChalkboard");return t.openBlock(),t.createElementBlock("div",qO,[JO,t.createElementVNode("div",XO,[t.createVNode(r,{plays:e.playsAway,categories:n.categories,team:e.team},null,8,["plays","categories","team"])]),t.createElementVNode("div",ZO,[t.createElementVNode("div",YO,[t.createElementVNode("div",KO,[t.createElementVNode("div",QO,t.toDisplayString(i.gxInfoItems[0].title),1),t.createElementVNode("div",eT,[t.createTextVNode(t.toDisplayString(i.gxInfoItems[0].value),1),t.createElementVNode("img",{class:"img-abs",src:i.stringSelectedTeamLogo},null,8,tT)])]),t.createElementVNode("div",aT,[t.createElementVNode("div",oT,t.toDisplayString(i.gxInfoItems[1].title),1),t.createElementVNode("div",sT,t.toDisplayString(i.gxInfoItems[1].value),1)]),t.createElementVNode("div",nT,[t.createElementVNode("div",iT,t.toDisplayString(i.gxInfoItems[2].title),1),t.createElementVNode("div",rT,t.toDisplayString(i.gxInfoItems[2].value),1)])]),lT])])}const dT=Ae(WO,[["render",cT],["__scopeId","data-v-38eed9b5"]]),wMe="";let O1=null;const mT={name:"XgMain",components:{GSCSwitchRadio:MI,SoccerChalkboardLocal:FA,SoccerChalkboardAway:eO,SoccerChalkboardLocalMobile:GO,SoccerChalkboardAwayMobile:dT},props:{game:{type:Number,default:0}},data(){return{gamesContainerWidth:0,teamSelect:"local",teamDefault:""}},computed:{...Te("nextGeneral",["homeTeam","visitingTeam"])},watch:{},methods:{onChangeTeam(e){e instanceof Object||(this.teamSelect=e),this.teamDefault=e},setUpResizeObserver(){if(window.ResizeObserver)O1=new ResizeObserver(()=>{this.gamesContainerWidth=this.$refs.gamesContainer.clientWidth,this.gamesContainerWidth<680?this.movil=!0:this.movil=!1}),O1.observe(this.$refs.gamesContainer);else throw new Error("Resize observer not supported!")}},mounted(){this.teamSelect=this.homeTeam.colloquial_name,this.teamLocal=this.homeTeam.colloquial_name,setTimeout(()=>{this.setUpResizeObserver()},100)},updated(){this.teamSelect!=this.homeTeam.colloquial_name&&this.teamSelect!=this.visitingTeam.colloquial_name&&(this.teamSelect=this.homeTeam.colloquial_name,this.onChangeTeam(this.teamSelect))}},pT={class:"xg",ref:"gamesContainer"},hT={key:0,class:"selector-team"};function gT(e,a,o,s,n,i){const r=t.resolveComponent("GSCSwitchRadio"),c=t.resolveComponent("SoccerChalkboardLocal"),g=t.resolveComponent("SoccerChalkboardAway"),d=t.resolveComponent("SoccerChalkboardLocalMobile"),l=t.resolveComponent("SoccerChalkboardAwayMobile");return t.openBlock(),t.createElementBlock("div",pT,[n.gamesContainerWidth<655?(t.openBlock(),t.createElementBlock("div",hT,[t.createVNode(r,{width:"42px",height:"20px",heightCircle:"16px",widthCircle:"16px","circle-color-switch":"#cbee6b",valueDefault:n.teamDefault,"text-option-left":e.homeTeam.colloquial_name,"text-option-right":e.visitingTeam.colloquial_name,"font-color":"white","hidden-labels":!1,"icon-a":e.homeTeam.logo,"icon-b":e.visitingTeam.logo,onChange:i.onChangeTeam},null,8,["valueDefault","text-option-left","text-option-right","icon-a","icon-b","onChange"])])):t.createCommentVNode("",!0),n.gamesContainerWidth>=655?(t.openBlock(),t.createBlock(c,{key:1,class:"local"})):t.createCommentVNode("",!0),n.gamesContainerWidth>=655?(t.openBlock(),t.createBlock(g,{key:2,class:"away"})):t.createCommentVNode("",!0),n.gamesContainerWidth<655&&n.teamSelect==e.homeTeam.colloquial_name?(t.openBlock(),t.createBlock(d,{key:3})):t.createCommentVNode("",!0),n.gamesContainerWidth<655&&n.teamSelect==e.visitingTeam.colloquial_name?(t.openBlock(),t.createBlock(l,{key:4})):t.createCommentVNode("",!0)],512)}const yT=Ae(mT,[["render",gT],["__scopeId","data-v-20bd873f"]]),CMe="",uT={class:"statistics-main"},fT={class:"statistics-main__header"},_T={class:"statistics-main__header__filter"},bT=t.defineComponent({name:"TemplateVideos",components:{TrendLive:MB,Comparative:EI,Distribution:zI,GSCSlider:Md,XG:yT}}),wT=Ae(Object.assign(bT,{props:{game:{type:Object,default:()=>({gameId:79623,seasonId:1772,status:1,dateTimeUTC:"2023-10-01T22:20:00Z",homeTeam:{logo:"https://az755631.vo.msecnd.net/teams-80/18.png",team_id:10,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"}})},subsection:{type:String,default:""},seasonSelected:{type:Object,default:()=>({})}},emits:["openmedia"],setup(e,{emit:a}){const o=e,s=fu(),n=t.ref({width:"fit-content",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",padding:"0 16px"}),i=t.ref({}),r=t.ref(null),c=t.ref([{id:"st1",name:"Comparativa",componentName:"Comparative"},{id:"st2",name:"Distribución",componentName:"Distribution"},{id:"st3",name:"Tendencia LIVE",componentName:"TrendLive"},{id:"st4",name:"Goles esperados (xG)",componentName:"XG"}]);let g=t.ref(c.value[0]),d=t.ref(0);t.watch(()=>o.game,p=>{const u={...p};l(u),d.value++},{deep:!0,immediate:!0});async function l(p){try{i.value.gameId!==p.gameId&&(i.value=p,await s.dispatch("nextGeneral/cleanStats"),await s.dispatch("nextGeneral/checkState",{gameId:p.gameId,currentSeasonId:p.seasonId,isTeamsAnalysis:!0,defaultFilter:r.value,gameInfo:p}))}catch(u){throw new Error(u)}}function m(p){g.value=p}function h(){s.commit("nextGeneral/updateFilters",{filters:{local:{playingAs:[1,2],statistics:{},matchResult:[1,2,3],firstHalf:[1,2,3],secondHalf:[4,5,6]},visit:{playingAs:[1,2],statistics:{},matchResult:[1,2,3],firstHalf:[1,2,3],secondHalf:[4,5,6]}},needsFormat:!0})}function y(p){a("openmedia",p)}return t.onUnmounted(()=>{a("resetSubsection")}),t.onMounted(()=>{o.subsection==="Comparativa"&&(g.value.id="st1",g.value.name="Comparativa",g.value.componentName="Comparative")}),h(),(p,u)=>(t.openBlock(),t.createElementBlock("div",uT,[t.createElementVNode("div",fT,[t.createVNode(t.unref(Md),{backgroundColor:"none",arrows:!1},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(c.value,f=>(t.openBlock(),t.createElementBlock("div",{key:f.id,class:"game-time-line__options__option"},[t.createVNode(hu,t.mergeProps(n.value,{text:f.name,"is-active":t.unref(g).id===f.id,onClick:_=>m(f)}),null,16,["text","is-active","onClick"])]))),128))]),_:1}),t.withDirectives(t.createElementVNode("div",_T,[t.createVNode(E$)],512),[[t.vShow,!1]])]),(t.openBlock(),t.createElementBlock("div",{class:"statistics-main__body",key:t.unref(d)},[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(t.unref(g).componentName),{seasonSelected:e.seasonSelected,game:e.game,onOpenmedia:y},null,40,["seasonSelected","game"]))]))]))}}),[["__scopeId","data-v-524c07a0"]]);function T1(e,a){return function(){return e.apply(a,arguments)}}const{toString:CT}=Object.prototype,{getPrototypeOf:Ud}=Object,vi=(e=>a=>{const o=CT.call(a);return e[o]||(e[o]=o.slice(8,-1).toLowerCase())})(Object.create(null)),ta=e=>(e=e.toLowerCase(),a=>vi(a)===e),Mi=e=>a=>typeof a===e,{isArray:Vo}=Array,zs=Mi("undefined");function kT(e){return e!==null&&!zs(e)&&e.constructor!==null&&!zs(e.constructor)&&$t(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const z1=ta("ArrayBuffer");function ST(e){let a;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?a=ArrayBuffer.isView(e):a=e&&e.buffer&&z1(e.buffer),a}const ET=Mi("string"),$t=Mi("function"),F1=Mi("number"),Hi=e=>e!==null&&typeof e=="object",NT=e=>e===!0||e===!1,Ui=e=>{if(vi(e)!=="object")return!1;const a=Ud(e);return(a===null||a===Object.prototype||Object.getPrototypeOf(a)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},$T=ta("Date"),BT=ta("File"),xT=ta("Blob"),VT=ta("FileList"),IT=e=>Hi(e)&&$t(e.pipe),AT=e=>{let a;return e&&(typeof FormData=="function"&&e instanceof FormData||$t(e.append)&&((a=vi(e))==="formdata"||a==="object"&&$t(e.toString)&&e.toString()==="[object FormData]"))},OT=ta("URLSearchParams"),TT=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Fs(e,a,{allOwnKeys:o=!1}={}){if(e===null||typeof e>"u")return;let s,n;if(typeof e!="object"&&(e=[e]),Vo(e))for(s=0,n=e.length;s<n;s++)a.call(null,e[s],s,e);else{const i=o?Object.getOwnPropertyNames(e):Object.keys(e),r=i.length;let c;for(s=0;s<r;s++)c=i[s],a.call(null,e[c],c,e)}}function R1(e,a){a=a.toLowerCase();const o=Object.keys(e);let s=o.length,n;for(;s-- >0;)if(n=o[s],a===n.toLowerCase())return n;return null}const P1=(()=>typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global)(),D1=e=>!zs(e)&&e!==P1;function Gd(){const{caseless:e}=D1(this)&&this||{},a={},o=(s,n)=>{const i=e&&R1(a,n)||n;Ui(a[i])&&Ui(s)?a[i]=Gd(a[i],s):Ui(s)?a[i]=Gd({},s):Vo(s)?a[i]=s.slice():a[i]=s};for(let s=0,n=arguments.length;s<n;s++)arguments[s]&&Fs(arguments[s],o);return a}const zT=(e,a,o,{allOwnKeys:s}={})=>(Fs(a,(n,i)=>{o&&$t(n)?e[i]=T1(n,o):e[i]=n},{allOwnKeys:s}),e),FT=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),RT=(e,a,o,s)=>{e.prototype=Object.create(a.prototype,s),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:a.prototype}),o&&Object.assign(e.prototype,o)},PT=(e,a,o,s)=>{let n,i,r;const c={};if(a=a||{},e==null)return a;do{for(n=Object.getOwnPropertyNames(e),i=n.length;i-- >0;)r=n[i],(!s||s(r,e,a))&&!c[r]&&(a[r]=e[r],c[r]=!0);e=o!==!1&&Ud(e)}while(e&&(!o||o(e,a))&&e!==Object.prototype);return a},DT=(e,a,o)=>{e=String(e),(o===void 0||o>e.length)&&(o=e.length),o-=a.length;const s=e.indexOf(a,o);return s!==-1&&s===o},LT=e=>{if(!e)return null;if(Vo(e))return e;let a=e.length;if(!F1(a))return null;const o=new Array(a);for(;a-- >0;)o[a]=e[a];return o},jT=(e=>a=>e&&a instanceof e)(typeof Uint8Array<"u"&&Ud(Uint8Array)),vT=(e,a)=>{const o=(e&&e[Symbol.iterator]).call(e);let s;for(;(s=o.next())&&!s.done;){const n=s.value;a.call(e,n[0],n[1])}},MT=(e,a)=>{let o;const s=[];for(;(o=e.exec(a))!==null;)s.push(o);return s},HT=ta("HTMLFormElement"),UT=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(a,o,s){return o.toUpperCase()+s}),L1=(({hasOwnProperty:e})=>(a,o)=>e.call(a,o))(Object.prototype),GT=ta("RegExp"),j1=(e,a)=>{const o=Object.getOwnPropertyDescriptors(e),s={};Fs(o,(n,i)=>{let r;(r=a(n,i,e))!==!1&&(s[i]=r||n)}),Object.defineProperties(e,s)},WT=e=>{j1(e,(a,o)=>{if($t(e)&&["arguments","caller","callee"].indexOf(o)!==-1)return!1;const s=e[o];if($t(s)){if(a.enumerable=!1,"writable"in a){a.writable=!1;return}a.set||(a.set=()=>{throw Error("Can not rewrite read-only method '"+o+"'")})}})},qT=(e,a)=>{const o={},s=n=>{n.forEach(i=>{o[i]=!0})};return Vo(e)?s(e):s(String(e).split(a)),o},JT=()=>{},XT=(e,a)=>(e=+e,Number.isFinite(e)?e:a),Wd="abcdefghijklmnopqrstuvwxyz",v1="0123456789",M1={DIGIT:v1,ALPHA:Wd,ALPHA_DIGIT:Wd+Wd.toUpperCase()+v1},ZT=(e=16,a=M1.ALPHA_DIGIT)=>{let o="";const{length:s}=a;for(;e--;)o+=a[Math.random()*s|0];return o};function YT(e){return!!(e&&$t(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const KT=e=>{const a=new Array(10),o=(s,n)=>{if(Hi(s)){if(a.indexOf(s)>=0)return;if(!("toJSON"in s)){a[n]=s;const i=Vo(s)?[]:{};return Fs(s,(r,c)=>{const g=o(r,n+1);!zs(g)&&(i[c]=g)}),a[n]=void 0,i}}return s};return o(e,0)},QT=ta("AsyncFunction"),ez=e=>e&&(Hi(e)||$t(e))&&$t(e.then)&&$t(e.catch),j={isArray:Vo,isArrayBuffer:z1,isBuffer:kT,isFormData:AT,isArrayBufferView:ST,isString:ET,isNumber:F1,isBoolean:NT,isObject:Hi,isPlainObject:Ui,isUndefined:zs,isDate:$T,isFile:BT,isBlob:xT,isRegExp:GT,isFunction:$t,isStream:IT,isURLSearchParams:OT,isTypedArray:jT,isFileList:VT,forEach:Fs,merge:Gd,extend:zT,trim:TT,stripBOM:FT,inherits:RT,toFlatObject:PT,kindOf:vi,kindOfTest:ta,endsWith:DT,toArray:LT,forEachEntry:vT,matchAll:MT,isHTMLForm:HT,hasOwnProperty:L1,hasOwnProp:L1,reduceDescriptors:j1,freezeMethods:WT,toObjectSet:qT,toCamelCase:UT,noop:JT,toFiniteNumber:XT,findKey:R1,global:P1,isContextDefined:D1,ALPHABET:M1,generateString:ZT,isSpecCompliantForm:YT,toJSONObject:KT,isAsyncFn:QT,isThenable:ez};function pe(e,a,o,s,n){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",a&&(this.code=a),o&&(this.config=o),s&&(this.request=s),n&&(this.response=n)}j.inherits(pe,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:j.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const H1=pe.prototype,U1={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{U1[e]={value:e}}),Object.defineProperties(pe,U1),Object.defineProperty(H1,"isAxiosError",{value:!0}),pe.from=(e,a,o,s,n,i)=>{const r=Object.create(H1);return j.toFlatObject(e,r,function(c){return c!==Error.prototype},c=>c!=="isAxiosError"),pe.call(r,e.message,a,o,s,n),r.cause=e,r.name=e.name,i&&Object.assign(r,i),r};const tz=null;function qd(e){return j.isPlainObject(e)||j.isArray(e)}function G1(e){return j.endsWith(e,"[]")?e.slice(0,-2):e}function W1(e,a,o){return e?e.concat(a).map(function(s,n){return s=G1(s),!o&&n?"["+s+"]":s}).join(o?".":""):a}function az(e){return j.isArray(e)&&!e.some(qd)}const oz=j.toFlatObject(j,{},null,function(e){return/^is[A-Z]/.test(e)});function Gi(e,a,o){if(!j.isObject(e))throw new TypeError("target must be an object");a=a||new FormData,o=j.toFlatObject(o,{metaTokens:!0,dots:!1,indexes:!1},!1,function(y,p){return!j.isUndefined(p[y])});const s=o.metaTokens,n=o.visitor||d,i=o.dots,r=o.indexes,c=(o.Blob||typeof Blob<"u"&&Blob)&&j.isSpecCompliantForm(a);if(!j.isFunction(n))throw new TypeError("visitor must be a function");function g(y){if(y===null)return"";if(j.isDate(y))return y.toISOString();if(!c&&j.isBlob(y))throw new pe("Blob is not supported. Use a Buffer instead.");return j.isArrayBuffer(y)||j.isTypedArray(y)?c&&typeof Blob=="function"?new Blob([y]):Buffer.from(y):y}function d(y,p,u){let f=y;if(y&&!u&&typeof y=="object"){if(j.endsWith(p,"{}"))p=s?p:p.slice(0,-2),y=JSON.stringify(y);else if(j.isArray(y)&&az(y)||(j.isFileList(y)||j.endsWith(p,"[]"))&&(f=j.toArray(y)))return p=G1(p),f.forEach(function(_,k){!(j.isUndefined(_)||_===null)&&a.append(r===!0?W1([p],k,i):r===null?p:p+"[]",g(_))}),!1}return qd(y)?!0:(a.append(W1(u,p,i),g(y)),!1)}const l=[],m=Object.assign(oz,{defaultVisitor:d,convertValue:g,isVisitable:qd});function h(y,p){if(!j.isUndefined(y)){if(l.indexOf(y)!==-1)throw Error("Circular reference detected in "+p.join("."));l.push(y),j.forEach(y,function(u,f){(!(j.isUndefined(u)||u===null)&&n.call(a,u,j.isString(f)?f.trim():f,p,m))===!0&&h(u,p?p.concat(f):[f])}),l.pop()}}if(!j.isObject(e))throw new TypeError("data must be an object");return h(e),a}function q1(e){const a={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(o){return a[o]})}function Jd(e,a){this._pairs=[],e&&Gi(e,this,a)}const J1=Jd.prototype;J1.append=function(e,a){this._pairs.push([e,a])},J1.toString=function(e){const a=e?function(o){return e.call(this,o,q1)}:q1;return this._pairs.map(function(o){return a(o[0])+"="+a(o[1])},"").join("&")};function sz(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function X1(e,a,o){if(!a)return e;const s=o&&o.encode||sz,n=o&&o.serialize;let i;if(n?i=n(a,o):i=j.isURLSearchParams(a)?a.toString():new Jd(a,o).toString(s),i){const r=e.indexOf("#");r!==-1&&(e=e.slice(0,r)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}const Z1=class{constructor(){this.handlers=[]}use(a,o,s){return this.handlers.push({fulfilled:a,rejected:o,synchronous:s?s.synchronous:!1,runWhen:s?s.runWhen:null}),this.handlers.length-1}eject(a){this.handlers[a]&&(this.handlers[a]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(a){j.forEach(this.handlers,function(o){o!==null&&a(o)})}},Y1={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},nz=typeof URLSearchParams<"u"?URLSearchParams:Jd,iz=typeof FormData<"u"?FormData:null,rz=typeof Blob<"u"?Blob:null,lz={isBrowser:!0,classes:{URLSearchParams:nz,FormData:iz,Blob:rz},protocols:["http","https","file","blob","url","data"]},K1=typeof window<"u"&&typeof document<"u",cz=(e=>K1&&["ReactNative","NativeScript","NS"].indexOf(e)<0)(typeof navigator<"u"&&navigator.product),dz=(()=>typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function")(),mz=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:K1,hasStandardBrowserEnv:cz,hasStandardBrowserWebWorkerEnv:dz},Symbol.toStringTag,{value:"Module"})),aa={...mz,...lz};function pz(e,a){return Gi(e,new aa.classes.URLSearchParams,Object.assign({visitor:function(o,s,n,i){return aa.isNode&&j.isBuffer(o)?(this.append(s,o.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)}},a))}function hz(e){return j.matchAll(/\w+|\[(\w*)]/g,e).map(a=>a[0]==="[]"?"":a[1]||a[0])}function gz(e){const a={},o=Object.keys(e);let s;const n=o.length;let i;for(s=0;s<n;s++)i=o[s],a[i]=e[i];return a}function Q1(e){function a(o,s,n,i){let r=o[i++];if(r==="__proto__")return!0;const c=Number.isFinite(+r),g=i>=o.length;return r=!r&&j.isArray(n)?n.length:r,g?(j.hasOwnProp(n,r)?n[r]=[n[r],s]:n[r]=s,!c):((!n[r]||!j.isObject(n[r]))&&(n[r]=[]),a(o,s,n[r],i)&&j.isArray(n[r])&&(n[r]=gz(n[r])),!c)}if(j.isFormData(e)&&j.isFunction(e.entries)){const o={};return j.forEachEntry(e,(s,n)=>{a(hz(s),n,o,0)}),o}return null}function yz(e,a,o){if(j.isString(e))try{return(a||JSON.parse)(e),j.trim(e)}catch(s){if(s.name!=="SyntaxError")throw s}return(o||JSON.stringify)(e)}const Xd={transitional:Y1,adapter:["xhr","http"],transformRequest:[function(e,a){const o=a.getContentType()||"",s=o.indexOf("application/json")>-1,n=j.isObject(e);if(n&&j.isHTMLForm(e)&&(e=new FormData(e)),j.isFormData(e))return s?JSON.stringify(Q1(e)):e;if(j.isArrayBuffer(e)||j.isBuffer(e)||j.isStream(e)||j.isFile(e)||j.isBlob(e))return e;if(j.isArrayBufferView(e))return e.buffer;if(j.isURLSearchParams(e))return a.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let i;if(n){if(o.indexOf("application/x-www-form-urlencoded")>-1)return pz(e,this.formSerializer).toString();if((i=j.isFileList(e))||o.indexOf("multipart/form-data")>-1){const r=this.env&&this.env.FormData;return Gi(i?{"files[]":e}:e,r&&new r,this.formSerializer)}}return n||s?(a.setContentType("application/json",!1),yz(e)):e}],transformResponse:[function(e){const a=this.transitional||Xd.transitional,o=a&&a.forcedJSONParsing,s=this.responseType==="json";if(e&&j.isString(e)&&(o&&!this.responseType||s)){const n=!(a&&a.silentJSONParsing)&&s;try{return JSON.parse(e)}catch(i){if(n)throw i.name==="SyntaxError"?pe.from(i,pe.ERR_BAD_RESPONSE,this,null,this.response):i}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:aa.classes.FormData,Blob:aa.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};j.forEach(["delete","get","head","post","put","patch"],e=>{Xd.headers[e]={}});const Zd=Xd,uz=j.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),fz=e=>{const a={};let o,s,n;return e&&e.split(`
|
|
34
34
|
`).forEach(function(i){n=i.indexOf(":"),o=i.substring(0,n).trim().toLowerCase(),s=i.substring(n+1).trim(),!(!o||a[o]&&uz[o])&&(o==="set-cookie"?a[o]?a[o].push(s):a[o]=[s]:a[o]=a[o]?a[o]+", "+s:s)}),a},ef=Symbol("internals");function Rs(e){return e&&String(e).trim().toLowerCase()}function Wi(e){return e===!1||e==null?e:j.isArray(e)?e.map(Wi):String(e)}function _z(e){const a=Object.create(null),o=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let s;for(;s=o.exec(e);)a[s[1]]=s[2];return a}const bz=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Yd(e,a,o,s,n){if(j.isFunction(s))return s.call(this,a,o);if(n&&(a=o),!!j.isString(a)){if(j.isString(s))return a.indexOf(s)!==-1;if(j.isRegExp(s))return s.test(a)}}function wz(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(a,o,s)=>o.toUpperCase()+s)}function Cz(e,a){const o=j.toCamelCase(" "+a);["get","set","has"].forEach(s=>{Object.defineProperty(e,s+o,{value:function(n,i,r){return this[s].call(this,a,n,i,r)},configurable:!0})})}let qi=class{constructor(a){a&&this.set(a)}set(a,o,s){const n=this;function i(c,g,d){const l=Rs(g);if(!l)throw new Error("header name must be a non-empty string");const m=j.findKey(n,l);(!m||n[m]===void 0||d===!0||d===void 0&&n[m]!==!1)&&(n[m||g]=Wi(c))}const r=(c,g)=>j.forEach(c,(d,l)=>i(d,l,g));return j.isPlainObject(a)||a instanceof this.constructor?r(a,o):j.isString(a)&&(a=a.trim())&&!bz(a)?r(fz(a),o):a!=null&&i(o,a,s),this}get(a,o){if(a=Rs(a),a){const s=j.findKey(this,a);if(s){const n=this[s];if(!o)return n;if(o===!0)return _z(n);if(j.isFunction(o))return o.call(this,n,s);if(j.isRegExp(o))return o.exec(n);throw new TypeError("parser must be boolean|regexp|function")}}}has(a,o){if(a=Rs(a),a){const s=j.findKey(this,a);return!!(s&&this[s]!==void 0&&(!o||Yd(this,this[s],s,o)))}return!1}delete(a,o){const s=this;let n=!1;function i(r){if(r=Rs(r),r){const c=j.findKey(s,r);c&&(!o||Yd(s,s[c],c,o))&&(delete s[c],n=!0)}}return j.isArray(a)?a.forEach(i):i(a),n}clear(a){const o=Object.keys(this);let s=o.length,n=!1;for(;s--;){const i=o[s];(!a||Yd(this,this[i],i,a,!0))&&(delete this[i],n=!0)}return n}normalize(a){const o=this,s={};return j.forEach(this,(n,i)=>{const r=j.findKey(s,i);if(r){o[r]=Wi(n),delete o[i];return}const c=a?wz(i):String(i).trim();c!==i&&delete o[i],o[c]=Wi(n),s[c]=!0}),this}concat(...a){return this.constructor.concat(this,...a)}toJSON(a){const o=Object.create(null);return j.forEach(this,(s,n)=>{s!=null&&s!==!1&&(o[n]=a&&j.isArray(s)?s.join(", "):s)}),o}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([a,o])=>a+": "+o).join(`
|
|
35
35
|
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(a){return a instanceof this?a:new this(a)}static concat(a,...o){const s=new this(a);return o.forEach(n=>s.set(n)),s}static accessor(a){const o=(this[ef]=this[ef]={accessors:{}}).accessors,s=this.prototype;function n(i){const r=Rs(i);o[r]||(Cz(s,i),o[r]=!0)}return j.isArray(a)?a.forEach(n):n(a),this}};qi.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),j.reduceDescriptors(qi.prototype,({value:e},a)=>{let o=a[0].toUpperCase()+a.slice(1);return{get:()=>e,set(s){this[o]=s}}}),j.freezeMethods(qi);const Aa=qi;function Kd(e,a){const o=this||Zd,s=a||o,n=Aa.from(s.headers);let i=s.data;return j.forEach(e,function(r){i=r.call(o,i,n.normalize(),a?a.status:void 0)}),n.normalize(),i}function tf(e){return!!(e&&e.__CANCEL__)}function Ps(e,a,o){pe.call(this,e??"canceled",pe.ERR_CANCELED,a,o),this.name="CanceledError"}j.inherits(Ps,pe,{__CANCEL__:!0});function kz(e,a,o){const s=o.config.validateStatus;!o.status||!s||s(o.status)?e(o):a(new pe("Request failed with status code "+o.status,[pe.ERR_BAD_REQUEST,pe.ERR_BAD_RESPONSE][Math.floor(o.status/100)-4],o.config,o.request,o))}const Sz=aa.hasStandardBrowserEnv?{write(e,a,o,s,n,i){const r=[e+"="+encodeURIComponent(a)];j.isNumber(o)&&r.push("expires="+new Date(o).toGMTString()),j.isString(s)&&r.push("path="+s),j.isString(n)&&r.push("domain="+n),i===!0&&r.push("secure"),document.cookie=r.join("; ")},read(e){const a=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return a?decodeURIComponent(a[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function Ez(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Nz(e,a){return a?e.replace(/\/?\/$/,"")+"/"+a.replace(/^\/+/,""):e}function af(e,a){return e&&!Ez(a)?Nz(e,a):a}const $z=aa.hasStandardBrowserEnv?function(){const e=/(msie|trident)/i.test(navigator.userAgent),a=document.createElement("a");let o;function s(n){let i=n;return e&&(a.setAttribute("href",i),i=a.href),a.setAttribute("href",i),{href:a.href,protocol:a.protocol?a.protocol.replace(/:$/,""):"",host:a.host,search:a.search?a.search.replace(/^\?/,""):"",hash:a.hash?a.hash.replace(/^#/,""):"",hostname:a.hostname,port:a.port,pathname:a.pathname.charAt(0)==="/"?a.pathname:"/"+a.pathname}}return o=s(window.location.href),function(n){const i=j.isString(n)?s(n):n;return i.protocol===o.protocol&&i.host===o.host}}():function(){return function(){return!0}}();function Bz(e){const a=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return a&&a[1]||""}function xz(e,a){e=e||10;const o=new Array(e),s=new Array(e);let n=0,i=0,r;return a=a!==void 0?a:1e3,function(c){const g=Date.now(),d=s[i];r||(r=g),o[n]=c,s[n]=g;let l=i,m=0;for(;l!==n;)m+=o[l++],l=l%e;if(n=(n+1)%e,n===i&&(i=(i+1)%e),g-r<a)return;const h=d&&g-d;return h?Math.round(m*1e3/h):void 0}}function of(e,a){let o=0;const s=xz(50,250);return n=>{const i=n.loaded,r=n.lengthComputable?n.total:void 0,c=i-o,g=s(c),d=i<=r;o=i;const l={loaded:i,total:r,progress:r?i/r:void 0,bytes:c,rate:g||void 0,estimated:g&&r&&d?(r-i)/g:void 0,event:n};l[a?"download":"upload"]=!0,e(l)}}const Vz=typeof XMLHttpRequest<"u",Iz=Vz&&function(e){return new Promise(function(a,o){let s=e.data;const n=Aa.from(e.headers).normalize();let{responseType:i,withXSRFToken:r}=e,c;function g(){e.cancelToken&&e.cancelToken.unsubscribe(c),e.signal&&e.signal.removeEventListener("abort",c)}let d;if(j.isFormData(s)){if(aa.hasStandardBrowserEnv||aa.hasStandardBrowserWebWorkerEnv)n.setContentType(!1);else if((d=n.getContentType())!==!1){const[p,...u]=d?d.split(";").map(f=>f.trim()).filter(Boolean):[];n.setContentType([p||"multipart/form-data",...u].join("; "))}}let l=new XMLHttpRequest;if(e.auth){const p=e.auth.username||"",u=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";n.set("Authorization","Basic "+btoa(p+":"+u))}const m=af(e.baseURL,e.url);l.open(e.method.toUpperCase(),X1(m,e.params,e.paramsSerializer),!0),l.timeout=e.timeout;function h(){if(!l)return;const p=Aa.from("getAllResponseHeaders"in l&&l.getAllResponseHeaders()),u={data:!i||i==="text"||i==="json"?l.responseText:l.response,status:l.status,statusText:l.statusText,headers:p,config:e,request:l};kz(function(f){a(f),g()},function(f){o(f),g()},u),l=null}if("onloadend"in l?l.onloadend=h:l.onreadystatechange=function(){!l||l.readyState!==4||l.status===0&&!(l.responseURL&&l.responseURL.indexOf("file:")===0)||setTimeout(h)},l.onabort=function(){l&&(o(new pe("Request aborted",pe.ECONNABORTED,e,l)),l=null)},l.onerror=function(){o(new pe("Network Error",pe.ERR_NETWORK,e,l)),l=null},l.ontimeout=function(){let p=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const u=e.transitional||Y1;e.timeoutErrorMessage&&(p=e.timeoutErrorMessage),o(new pe(p,u.clarifyTimeoutError?pe.ETIMEDOUT:pe.ECONNABORTED,e,l)),l=null},aa.hasStandardBrowserEnv&&(r&&j.isFunction(r)&&(r=r(e)),r||r!==!1&&$z(m))){const p=e.xsrfHeaderName&&e.xsrfCookieName&&Sz.read(e.xsrfCookieName);p&&n.set(e.xsrfHeaderName,p)}s===void 0&&n.setContentType(null),"setRequestHeader"in l&&j.forEach(n.toJSON(),function(p,u){l.setRequestHeader(u,p)}),j.isUndefined(e.withCredentials)||(l.withCredentials=!!e.withCredentials),i&&i!=="json"&&(l.responseType=e.responseType),typeof e.onDownloadProgress=="function"&&l.addEventListener("progress",of(e.onDownloadProgress,!0)),typeof e.onUploadProgress=="function"&&l.upload&&l.upload.addEventListener("progress",of(e.onUploadProgress)),(e.cancelToken||e.signal)&&(c=p=>{l&&(o(!p||p.type?new Ps(null,e,l):p),l.abort(),l=null)},e.cancelToken&&e.cancelToken.subscribe(c),e.signal&&(e.signal.aborted?c():e.signal.addEventListener("abort",c)));const y=Bz(m);if(y&&aa.protocols.indexOf(y)===-1){o(new pe("Unsupported protocol "+y+":",pe.ERR_BAD_REQUEST,e));return}l.send(s||null)})},Qd={http:tz,xhr:Iz};j.forEach(Qd,(e,a)=>{if(e){try{Object.defineProperty(e,"name",{value:a})}catch{}Object.defineProperty(e,"adapterName",{value:a})}});const sf=e=>`- ${e}`,Az=e=>j.isFunction(e)||e===null||e===!1,nf={getAdapter:e=>{e=j.isArray(e)?e:[e];const{length:a}=e;let o,s;const n={};for(let i=0;i<a;i++){o=e[i];let r;if(s=o,!Az(o)&&(s=Qd[(r=String(o)).toLowerCase()],s===void 0))throw new pe(`Unknown adapter '${r}'`);if(s)break;n[r||"#"+i]=s}if(!s){const i=Object.entries(n).map(([c,g])=>`adapter ${c} `+(g===!1?"is not supported by the environment":"is not available in the build"));let r=a?i.length>1?`since :
|
|
36
36
|
`+i.map(sf).join(`
|
|
@@ -116,4 +116,4 @@
|
|
|
116
116
|
* vuex v4.0.2
|
|
117
117
|
* (c) 2021 Evan You
|
|
118
118
|
* @license MIT
|
|
119
|
-
*/var xDe="store";function _o(e,a){Object.keys(e).forEach(function(o){return a(e[o],o)})}function X6(e){return e!==null&&typeof e=="object"}function VDe(e){return e&&typeof e.then=="function"}function Xt(e,a){if(!e)throw new Error("[vuex] "+a)}function IDe(e,a){return function(){return e(a)}}function Z6(e,a,o){return a.indexOf(e)<0&&(o&&o.prepend?a.unshift(e):a.push(e)),function(){var s=a.indexOf(e);s>-1&&a.splice(s,1)}}function Y6(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;Gc(e,o,[],e._modules.root,!0),i0(e,o,a)}function i0(e,a,o){var s=e._state;e.getters={},e._makeLocalGettersCache=Object.create(null);var n=e._wrappedGetters,i={};_o(n,function(r,c){i[c]=IDe(r,e),Object.defineProperty(e.getters,c,{get:function(){return i[c]()},enumerable:!0})}),e._state=t.reactive({data:a}),e.strict&&FDe(e),s&&o&&e._withCommit(function(){s.data=null})}function Gc(e,a,o,s,n){var i=!o.length,r=e._modules.getNamespace(o);if(s.namespaced&&(e._modulesNamespaceMap[r]&&process.env.NODE_ENV!=="production"&&console.error("[vuex] duplicate namespace "+r+" for the namespaced module "+o.join("/")),e._modulesNamespaceMap[r]=s),!i&&!n){var c=r0(a,o.slice(0,-1)),g=o[o.length-1];e._withCommit(function(){process.env.NODE_ENV!=="production"&&g in c&&console.warn('[vuex] state field "'+g+'" was overridden by a module with the same name at "'+o.join(".")+'"'),c[g]=s.state})}var d=s.context=ADe(e,r,o);s.forEachMutation(function(l,m){var h=r+m;ODe(e,h,l,d)}),s.forEachAction(function(l,m){var h=l.root?m:r+m,y=l.handler||l;TDe(e,h,y,d)}),s.forEachGetter(function(l,m){var h=r+m;zDe(e,h,l,d)}),s.forEachChild(function(l,m){Gc(e,a,o.concat(m),l,n)})}function ADe(e,a,o){var s=a==="",n={dispatch:s?e.dispatch:function(i,r,c){var g=Wc(i,r,c),d=g.payload,l=g.options,m=g.type;if((!l||!l.root)&&(m=a+m,process.env.NODE_ENV!=="production"&&!e._actions[m])){console.error("[vuex] unknown local action type: "+g.type+", global type: "+m);return}return e.dispatch(m,d)},commit:s?e.commit:function(i,r,c){var g=Wc(i,r,c),d=g.payload,l=g.options,m=g.type;if((!l||!l.root)&&(m=a+m,process.env.NODE_ENV!=="production"&&!e._mutations[m])){console.error("[vuex] unknown local mutation type: "+g.type+", global type: "+m);return}e.commit(m,d,l)}};return Object.defineProperties(n,{getters:{get:s?function(){return e.getters}:function(){return K6(e,a)}},state:{get:function(){return r0(e.state,o)}}}),n}function K6(e,a){if(!e._makeLocalGettersCache[a]){var o={},s=a.length;Object.keys(e.getters).forEach(function(n){if(n.slice(0,s)===a){var i=n.slice(s);Object.defineProperty(o,i,{get:function(){return e.getters[n]},enumerable:!0})}}),e._makeLocalGettersCache[a]=o}return e._makeLocalGettersCache[a]}function ODe(e,a,o,s){var n=e._mutations[a]||(e._mutations[a]=[]);n.push(function(i){o.call(e,s.state,i)})}function TDe(e,a,o,s){var n=e._actions[a]||(e._actions[a]=[]);n.push(function(i){var r=o.call(e,{dispatch:s.dispatch,commit:s.commit,getters:s.getters,state:s.state,rootGetters:e.getters,rootState:e.state},i);return VDe(r)||(r=Promise.resolve(r)),e._devtoolHook?r.catch(function(c){throw e._devtoolHook.emit("vuex:error",c),c}):r})}function zDe(e,a,o,s){if(e._wrappedGetters[a]){process.env.NODE_ENV!=="production"&&console.error("[vuex] duplicate getter key: "+a);return}e._wrappedGetters[a]=function(n){return o(s.state,s.getters,n.state,n.getters)}}function FDe(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 r0(e,a){return a.reduce(function(o,s){return o[s]},e)}function Wc(e,a,o){return X6(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 RDe="vuex bindings",Q6="vuex:mutations",l0="vuex:actions",ks="vuex",PDe=0;function DDe(e,a){BDe({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:[RDe]},function(o){o.addTimelineLayer({id:Q6,label:"Vuex Mutations",color:ek}),o.addTimelineLayer({id:l0,label:"Vuex Actions",color:ek}),o.addInspector({id:ks,label:"Vuex",icon:"storage",treeFilterPlaceholder:"Filter stores..."}),o.on.getInspectorTree(function(s){if(s.app===e&&s.inspectorId===ks)if(s.filter){var n=[];sk(n,a._modules.root,s.filter,""),s.rootNodes=n}else s.rootNodes=[ok(a._modules.root,"")]}),o.on.getInspectorState(function(s){if(s.app===e&&s.inspectorId===ks){var n=s.nodeId;K6(a,n),s.state=vDe(HDe(a._modules,n),n==="root"?a.getters:a._makeLocalGettersCache,n)}}),o.on.editInspectorState(function(s){if(s.app===e&&s.inspectorId===ks){var n=s.nodeId,i=s.path;n!=="root"&&(i=n.split("/").filter(Boolean).concat(i)),a._withCommit(function(){s.set(a._state.data,i,s.state.value)})}}),a.subscribe(function(s,n){var i={};s.payload&&(i.payload=s.payload),i.state=n,o.notifyComponentUpdate(),o.sendInspectorTree(ks),o.sendInspectorState(ks),o.addTimelineEvent({layerId:Q6,event:{time:Date.now(),title:s.type,data:i}})}),a.subscribeAction({before:function(s,n){var i={};s.payload&&(i.payload=s.payload),s._id=PDe++,s._time=Date.now(),i.state=n,o.addTimelineEvent({layerId:l0,event:{time:s._time,title:s.type,groupId:s._id,subtitle:"start",data:i}})},after:function(s,n){var i={},r=Date.now()-s._time;i.duration={_custom:{type:"duration",display:r+"ms",tooltip:"Action duration",value:r}},s.payload&&(i.payload=s.payload),i.state=n,o.addTimelineEvent({layerId:l0,event:{time:Date.now(),title:s.type,groupId:s._id,subtitle:"end",data:i}})}})})}var ek=8702998,LDe=6710886,jDe=16777215,tk={label:"namespaced",textColor:jDe,backgroundColor:LDe};function ak(e){return e&&e!=="root"?e.split("/").slice(-2,-1)[0]:"Root"}function ok(e,a){return{id:a||"root",label:ak(a),tags:e.namespaced?[tk]:[],children:Object.keys(e._children).map(function(o){return ok(e._children[o],a+o+"/")})}}function sk(e,a,o,s){s.includes(o)&&e.push({id:s||"root",label:s.endsWith("/")?s.slice(0,s.length-1):s||"Root",tags:a.namespaced?[tk]:[]}),Object.keys(a._children).forEach(function(n){sk(e,a._children[n],o,s+n+"/")})}function vDe(e,a,o){a=o==="root"?a:a[o];var s=Object.keys(a),n={state:Object.keys(e.state).map(function(r){return{key:r,editable:!0,value:e.state[r]}})};if(s.length){var i=MDe(a);n.getters=Object.keys(i).map(function(r){return{key:r.endsWith("/")?ak(r):r,editable:!1,value:c0(function(){return i[r]})}})}return n}function MDe(e){var a={};return Object.keys(e).forEach(function(o){var s=o.split("/");if(s.length>1){var n=a,i=s.pop();s.forEach(function(r){n[r]||(n[r]={_custom:{value:{},display:r,tooltip:"Module",abstract:!0}}),n=n[r]._custom.value}),n[i]=c0(function(){return e[o]})}else a[o]=c0(function(){return e[o]})}),a}function HDe(e,a){var o=a.split("/").filter(function(s){return s});return o.reduce(function(s,n,i){var r=s[n];if(!r)throw new Error('Missing module "'+n+'" for path "'+a+'".');return i===o.length-1?r:r._children},a==="root"?e:e.root._children)}function c0(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)||{}},nk={namespaced:{configurable:!0}};nk.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){_o(this._children,e)},Zt.prototype.forEachGetter=function(e){this._rawModule.getters&&_o(this._rawModule.getters,e)},Zt.prototype.forEachAction=function(e){this._rawModule.actions&&_o(this._rawModule.actions,e)},Zt.prototype.forEachMutation=function(e){this._rawModule.mutations&&_o(this._rawModule.mutations,e)},Object.defineProperties(Zt.prototype,nk);var bo=function(e){this.register([],e,!1)};bo.prototype.get=function(e){return e.reduce(function(a,o){return a.getChild(o)},this.root)},bo.prototype.getNamespace=function(e){var a=this.root;return e.reduce(function(o,s){return a=a.getChild(s),o+(a.namespaced?s+"/":"")},"")},bo.prototype.update=function(e){ik([],this.root,e)},bo.prototype.register=function(e,a,o){var s=this;o===void 0&&(o=!0),process.env.NODE_ENV!=="production"&&ck(e,a);var n=new Zt(a,o);if(e.length===0)this.root=n;else{var i=this.get(e.slice(0,-1));i.addChild(e[e.length-1],n)}a.modules&&_o(a.modules,function(r,c){s.register(e.concat(c),r,o)})},bo.prototype.unregister=function(e){var a=this.get(e.slice(0,-1)),o=e[e.length-1],s=a.getChild(o);if(!s){process.env.NODE_ENV!=="production"&&console.warn("[vuex] trying to unregister module '"+o+"', which is not registered");return}s.runtime&&a.removeChild(o)},bo.prototype.isRegistered=function(e){var a=this.get(e.slice(0,-1)),o=e[e.length-1];return a?a.hasChild(o):!1};function ik(e,a,o){if(process.env.NODE_ENV!=="production"&&ck(e,o),a.update(o),o.modules)for(var s in o.modules){if(!a.getChild(s)){process.env.NODE_ENV!=="production"&&console.warn("[vuex] trying to add a new module '"+s+"' on hot reloading, manual reload is needed");return}ik(e.concat(s),a.getChild(s),o.modules[s])}}var rk={assert:function(e){return typeof e=="function"},expected:"function"},UDe={assert:function(e){return typeof e=="function"||typeof e=="object"&&typeof e.handler=="function"},expected:'function or object with "handler" function'},lk={getters:rk,mutations:rk,actions:UDe};function ck(e,a){Object.keys(lk).forEach(function(o){if(a[o]){var s=lk[o];_o(a[o],function(n,i){Xt(s.assert(n),GDe(e,o,i,n,s.expected))})}})}function GDe(e,a,o,s,n){var i=a+" should be "+n+' but "'+a+"."+o+'"';return e.length>0&&(i+=' in module "'+e.join(".")+'"'),i+=" is "+JSON.stringify(s)+".",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 s=a.plugins;s===void 0&&(s=[]);var n=a.strict;n===void 0&&(n=!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 bo(a),this._modulesNamespaceMap=Object.create(null),this._subscribers=[],this._makeLocalGettersCache=Object.create(null),this._devtools=i;var r=this,c=this,g=c.dispatch,d=c.commit;this.dispatch=function(m,h){return g.call(r,m,h)},this.commit=function(m,h,y){return d.call(r,m,h,y)},this.strict=n;var l=this._modules.root.state;Gc(this,l,[],this._modules.root),i0(this,l),s.forEach(function(m){return m(o)})},d0={state:{configurable:!0}};St.prototype.install=function(e,a){e.provide(a||xDe,this),e.config.globalProperties.$store=this;var o=this._devtools!==void 0?this._devtools:process.env.NODE_ENV!=="production"||!1;o&&DDe(e,this)},d0.state.get=function(){return this._state.data},d0.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 s=this,n=Wc(e,a,o),i=n.type,r=n.payload,c=n.options,g={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(g,s.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,s=Wc(e,a),n=s.type,i=s.payload,r={type:n,payload:i},c=this._actions[n];if(!c){process.env.NODE_ENV!=="production"&&console.error("[vuex] unknown action type: "+n);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 g=c.length>1?Promise.all(c.map(function(d){return d(i)})):c[0](i);return new Promise(function(d,l){g.then(function(m){try{o._actionSubscribers.filter(function(h){return h.after}).forEach(function(h){return h.after(r,o.state)})}catch(h){process.env.NODE_ENV!=="production"&&(console.warn("[vuex] error in after action subscribers: "),console.error(h))}d(m)},function(m){try{o._actionSubscribers.filter(function(h){return h.error}).forEach(function(h){return h.error(r,o.state,m)})}catch(h){process.env.NODE_ENV!=="production"&&(console.warn("[vuex] error in error action subscribers: "),console.error(h))}l(m)})})},St.prototype.subscribe=function(e,a){return Z6(e,this._subscribers,a)},St.prototype.subscribeAction=function(e,a){var o=typeof e=="function"?{before:e}:e;return Z6(o,this._actionSubscribers,a)},St.prototype.watch=function(e,a,o){var s=this;return process.env.NODE_ENV!=="production"&&Xt(typeof e=="function","store.watch only accepts a function."),t.watch(function(){return e(s.state,s.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),Gc(this,this.state,e,this._modules.get(e),o.preserveState),i0(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=r0(a.state,e.slice(0,-1));delete o[e[e.length-1]]}),Y6(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),Y6(this,!0)},St.prototype._withCommit=function(e){var a=this._committing;this._committing=!0,e(),this._committing=a},Object.defineProperties(St.prototype,d0);var WDe=JDe(function(e,a){var o={};return process.env.NODE_ENV!=="production"&&!dk(a)&&console.error("[vuex] mapMutations: mapper parameter must be either an Array or an Object"),qDe(a).forEach(function(s){var n=s.key,i=s.val;o[n]=function(){for(var r=[],c=arguments.length;c--;)r[c]=arguments[c];var g=this.$store.commit;if(e){var d=XDe(this.$store,"mapMutations",e);if(!d)return;g=d.context.commit}return typeof i=="function"?i.apply(this,[g].concat(r)):g.apply(this.$store,[i].concat(r))}}),o});function qDe(e){return dk(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 dk(e){return Array.isArray(e)||X6(e)}function JDe(e){return function(a,o){return typeof a!="string"?(o=a,a=""):a.charAt(a.length-1)!=="/"&&(a+="/"),e(a,o)}}function XDe(e,a,o){var s=e._modulesNamespaceMap[o];return process.env.NODE_ENV!=="production"&&!s&&console.error("[vuex] module namespace not found in "+a+"(): "+o),s}const ZDe="/icn-play.svg",YDe="/icn-tiros-de-esquina.svg",KDe="/icn-tiro-a-porteria.svg",QDe="/icn-cambio.svg",eLe="/icn-falta.svg",tLe="/atajada.svg",aLe="/fuera-de-lugar.svg",m0="/gol.svg",oLe="/var.png",sLe="/tiempo-agregado.svg",nLe="/jugada-peligrosa.svg",iLe="/penal-marcado.svg",rLe="/penal-fallado.svg",lLe="/inicia-el-partido.svg",cLe="/fin-del-partido.svg",dLe="/icn-tarjeta-amarilla.svg",mLe="/icn-tarjeta-roja.svg",pLe=[1,2,3,4,6],hLe={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 s0.GOAL_IDS.includes(a)?(e.push("is-main-event"),e.push("goal")):s0.YELLOW_CARD_IDS.includes(a)?(e.push("is-main-event"),e.push("yellow-card")):s0.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=>bDe(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||pLe.includes(this.gameEvent.event_type_id)?"":this.gameEvent.player_name}},watch:{width(){this.emitHeight()},gameEvent:{deep:!0,handler(){this.gameEventKey++}}},methods:{...WDe("general",["setVideoModalVisibility","setVideoSrc"]),thumbnailClick(e,a){(a==="Gol"||a==="Tarjeta")&&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})}}},gLe=e=>(t.pushScopeId("data-v-f8cd0c73"),e=e(),t.popScopeId(),e),yLe={class:"time-line-event__details"},uLe={width:"127",preload:"metadata",style:{"border-radius":"8px"}},fLe=["src"],_Le=gLe(()=>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)),bLe={class:"time-line-event__details__info"},wLe={key:0,class:"time-line-event__details__info__header__players"},CLe={class:"time-line-event__details__info__header__players__div-img"},kLe=["src"],SLe={class:"time-line-event__details__info__body"},ELe={class:"time-line-event__details__info__body__comment"},NLe={class:"time-line-event__minute__container"},$Le={class:"time-line-event__minute__container__text"},BLe={class:"time-line-event__minute__container__icon-container"},xLe={class:"time-line-event__minute__container__icon-container__icon"},VLe={key:0,src:YDe,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},ILe={key:1,src:KDe,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},ALe={key:2,src:QDe,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},OLe={key:3,src:eLe,class:"time-line-event__minute__container__icon-container__icon__img",alt:"Event icon"},TLe={key:4,src:tLe,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},zLe={key:5,src:aLe,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},FLe={key:6,src:m0,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},RLe={key:7,src:m0,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},PLe={key:8,src:m0,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},DLe={key:9,src:oLe,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},LLe={key:10,src:sLe,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},jLe={key:11,src:nLe,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},vLe={key:12,src:iLe,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},MLe={key:13,src:rLe,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},HLe={key:14,src:lLe,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},ULe={key:15,src:cLe,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},GLe={key:16,src:dLe,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},WLe={key:17,src:mLe,class:"time-line-event__minute__container__icon-container__icon__img",alt:"Event icon"},qLe={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 JLe(e,a,o,s,n,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:n.gameEventKey},[t.createElementVNode("div",yLe,[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",uLe,[t.createElementVNode("source",{src:o.gameEvent.video_link+"#t=0.1",type:"video/mp4"},null,8,fLe)]),_Le])):t.createCommentVNode("",!0),t.createElementVNode("div",bLe,[t.createElementVNode("div",{class:t.normalizeClass(["time-line-event__details__info__header",i.teamTypeClasses2])},[o.gameEvent.video_link=="-"?(t.openBlock(),t.createElementBlock("div",wLe,[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",CLe,[t.createElementVNode("img",{src:r,alt:""},null,8,kLe)])],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:ZDe,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",SLe,[t.createElementVNode("div",ELe,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",NLe,[t.createElementVNode("div",$Le,t.toDisplayString(o.gameEvent.minute)+"'",1),t.createElementVNode("div",BLe,[t.createElementVNode("div",xLe,[o.gameEvent.category_id==18?(t.openBlock(),t.createElementBlock("img",VLe)):o.gameEvent.category_id==20?(t.openBlock(),t.createElementBlock("img",ILe)):o.gameEvent.category_id==10?(t.openBlock(),t.createElementBlock("img",ALe)):o.gameEvent.category_id==21?(t.openBlock(),t.createElementBlock("img",OLe)):o.gameEvent.category_id==27?(t.openBlock(),t.createElementBlock("img",TLe)):o.gameEvent.category_id==17?(t.openBlock(),t.createElementBlock("img",zLe)):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",FLe)):o.gameEvent.category_id==4?(t.openBlock(),t.createElementBlock("img",RLe)):o.gameEvent.category_id==13||o.gameEvent.category_id==16?(t.openBlock(),t.createElementBlock("img",PLe)):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",DLe)):o.gameEvent.category_id==28?(t.openBlock(),t.createElementBlock("img",LLe)):o.gameEvent.category_id==26?(t.openBlock(),t.createElementBlock("img",jLe)):o.gameEvent.category_id==22?(t.openBlock(),t.createElementBlock("img",vLe)):o.gameEvent.category_id==15||o.gameEvent.category_id==23?(t.openBlock(),t.createElementBlock("img",MLe)):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",HLe)):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",ULe)):o.gameEvent.category_id==8?(t.openBlock(),t.createElementBlock("img",GLe)):o.gameEvent.category_id==9?(t.openBlock(),t.createElementBlock("img",WLe)):(t.openBlock(),t.createElementBlock("img",qLe))])])])],2)],6)}const XLe=ii(hLe,[["render",JLe],["__scopeId","data-v-f8cd0c73"]]),ZLe={"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"},YLe={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 qc=null;const KLe={name:"TimeLine",components:{Tooltip:yDe,TimeLineEvent:XLe},mixins:[fDe],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":ZLe[`${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 G6.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)qc=new ResizeObserver(()=>{this.timeLineWidth=this.$refs.timeLine.clientWidth}),qc.observe(this.$refs.timeLine);else throw new Error("Resize observer not supported!")},updateContainerHeight(e,a){const o=this.$refs[`gameEventDiv${a}`][0],s=this.$refs[`gameEventLine${a}`]?this.$refs[`gameEventLine${a}`][0]:null,n=e+12;o&&(o.style.height=`${n}px`),s&&(s.style.height=`${n}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=YLe[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 _De(a)},thumbnailClick(e){this.dataVideo.link=e,this.dataVideo.visible=!0}},mounted(){this.$nextTick(()=>{this.setUpResizeObserver()})},beforeUnmount(){qc&&qc.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)}}},mk=e=>(t.pushScopeId("data-v-a31f9d54"),e=e(),t.popScopeId(),e),QLe={ref:"timeLine",class:"time-line"},eje={class:"time-line__header"},tje={class:"time-line__header__dot"},aje={class:"time-line__header__dot__home-team team-logo"},oje=["src"],sje={class:"time-line__header__dot__away-team team-logo"},nje=["src"],ije={class:"time-line__game-events"},rje={key:1,class:"start-line"},lje=mk(()=>t.createElementVNode("div",null,null,-1)),cje=mk(()=>t.createElementVNode("div",null,null,-1)),dje=[lje,cje],mje={key:1,class:"noEventText"},pje={class:"tooltip-data"},hje=["src"];function gje(e,a,o,s,n,i){const r=t.resolveComponent("TimeLineEvent"),c=t.resolveComponent("Tooltip");return t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createElementVNode("div",QLe,[t.createElementVNode("div",eje,[t.createElementVNode("div",tje,[t.createElementVNode("div",aje,[t.createElementVNode("img",{src:i.getTeamLogoSrc("homeTeam"),alt:""},null,8,oje)]),t.createElementVNode("div",sje,[t.createElementVNode("img",{src:i.getTeamLogoSrc("awayTeam"),alt:""},null,8,nje)])])]),t.createElementVNode("div",ije,[o.gameData.status!==4?(t.openBlock(),t.createBlock(t.TransitionGroup,{key:0,name:n.transitionName,tag:"div"},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(i.gameEventsToShow,(g,d)=>(t.openBlock(),t.createElementBlock("div",{class:"time-line__game-events__grid",key:g.play_id},[t.createElementVNode("div",{ref_for:!0,ref:`gameEventDiv${d}`,class:t.normalizeClass(i.getGameEventClassAndSetIcon(g,d))},[t.createElementVNode("div",{class:t.normalizeClass(i.getEventContainerClass(g))},[t.createVNode(r,{"game-event":g,"is-mobile":i.isMobile,"time-line-width":n.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",rje,dje)):t.createCommentVNode("",!0)],2)]))),128))]),_:1},8,["name"])):(t.openBlock(),t.createElementBlock("div",mje," Aún no comienza el partido "))])],512),t.createVNode(c,{data:n.dataVideo},{default:t.withCtx(()=>[t.createElementVNode("div",pje,[t.createElementVNode("div",null,[t.createElementVNode("video",{class:"tooltip-video",controls:"",autoplay:"",src:n.dataVideo.link,format:"video/mp4"},null,8,hje)])])]),_:1},8,["data"])],64)}const yje=ii(KLe,[["render",gje],["__scopeId","data-v-a31f9d54"]]),uje={class:"game-time-line__options"},fje={class:"game-time-line__timeline"},_je={__name:"GSC-GameTimeLine",props:{game:{type:Object,default:()=>({id:79601,seasonId:1772,status:1,dateTimeUTC:"2023-10-01T22:20:00Z",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){G6.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 s=null;const n=t.ref(["Todo","1er tiempo","2do tiempo"]),i=t.ref("Todo"),r=t.ref({}),c=t.ref(null),g=t.ref(0),d=t.computed(()=>{let p="all";return i.value==="1er tiempo"||i.value==="1er"?p="firstHalf":(i.value==="2do tiempo"||i.value==="2do")&&(p="secondHalf"),p}),l=t.computed(()=>g.value<500);function m(p){i.value=p}function h(p){r.value=p}function y(){if(window.ResizeObserver)s=new ResizeObserver(()=>{g.value=c.value.clientWidth}),s.observe(c.value);else throw new Error("Resize observer not supported!")}return t.onMounted(()=>{y()}),t.onBeforeUnmount(()=>{s&&s.unobserve(c.value)}),(p,u)=>(t.openBlock(),t.createElementBlock("div",{ref_key:"gameTimeLine",ref:c,class:"game-time-line"},[t.createElementVNode("div",uje,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(n.value,f=>(t.openBlock(),t.createElementBlock("div",{key:f,class:"game-time-line__options__option"},[t.createVNode(XRe,t.mergeProps(g.value<390?o.value:a.value,{text:f=="Todo"?f:g.value<390?f.substring(0,3):f,"is-active":i.value===f,onClick:_=>m(f)}),null,16,["text","is-active","onClick"])]))),128))]),t.createElementVNode("div",fje,[t.createVNode(yje,{"game-data":e.game,"time-line-period":d.value,"is-mobile":l.value,onGameEventsByPeriodFilled:h},null,8,["game-data","time-line-period","is-mobile"])])],512))}},bje=ii(_je,[["__scopeId","data-v-52261d5c"]]);function wje(e){const a=t.ref({width:0,height:0});function o(){const s=e.value.getBoundingClientRect();a.value.width=s.width,a.value.height=s.height}return t.onMounted(()=>{o(),window.addEventListener("resize",o)}),t.onUnmounted(()=>{window.removeEventListener("resize",o)}),{elementSize:a}}const Cje=(e,a)=>{const o=e.__vccOpts||e;for(const[s,n]of a)o[s]=n;return o},p0={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)}}},pk=()=>{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}))},hk=p0.setup;p0.setup=hk?(e,a)=>(pk(),hk(e,a)):pk;const kje={ref:"gscScrollableContainer",class:"scrollable-container"},Sje={class:"scrollable-arrows"},Eje=["width","height","viewBox"],Nje=["stroke"],$je={class:"scrollable-wrapper"},Bje={class:"scrollable-arrows"},xje=["width","height","viewBox"],Vje=["stroke"];function Ije(e,a,o,s,n,i){return t.openBlock(),t.createElementBlock("div",kje,[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",Sje,[(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,Nje)],8,Eje))])],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",$je,[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",Bje,[(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,Vje)],8,xje))])],2)):t.createCommentVNode("",!0)],512)}const Aje=Cje(p0,[["render",Ije],["__scopeId","data-v-b548a08d"]]),Oje=(e,a)=>{const o=e.__vccOpts||e;for(const[s,n]of a)o[s]=n;return o},h0={components:{GSCSlider:Aje},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}=wje(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}}},gk=()=>{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}))},yk=h0.setup;h0.setup=yk?(e,a)=>(gk(),yk(e,a)):gk;const Tje={ref:"myDivRef"},zje={key:0,class:"gs-switch-container"},Fje=["onClick"],Rje={key:1,class:"gs-switch-container-type"},Pje=["onClick"],Dje={key:2,class:"gs-switch-container-carousel"},Lje=["onClick"];function jje(e,a,o,s,n,i){const r=t.resolveComponent("GSCSlider");return t.openBlock(),t.createElementBlock("div",Tje,[o.type==0?(t.openBlock(),t.createElementBlock("div",zje,[t.createElementVNode("div",{class:"gs-switch-container__control",style:t.normalizeStyle([i.customGrid(s.elementSize)])},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.buttons,(c,g)=>(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:g,onClick:d=>(o.selectedOption=c,i.clickEmitEvent(c))},t.toDisplayString(c),13,Fje))),128))],4),t.renderSlot(e.$slots,o.selectedOption,{},void 0,!0)])):t.createCommentVNode("",!0),o.type==1?(t.openBlock(),t.createElementBlock("div",Rje,[t.createElementVNode("div",{class:"gs-switch-container-type__control",style:t.normalizeStyle([i.customGrid(s.elementSize)])},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.buttons,(c,g)=>(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:g,onClick:d=>(o.selectedOption=c,i.clickEmitEvent(c))},t.toDisplayString(c),13,Pje))),128))],4)])):t.createCommentVNode("",!0),o.type==2?(t.openBlock(),t.createElementBlock("div",Dje,[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,g)=>(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:g,onClick:d=>(o.selectedOption=c,i.clickEmitEvent(c))},t.toDisplayString(c),13,Lje))),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 uk=Oje(h0,[["render",jje],["__scopeId","data-v-8a86dfaf"]]),QMe="",vje={class:"game-data__header"},Mje={class:"game-data__header__tournament-season-dropdown"},Hje={class:"game-data__header__teams-carousel"},Uje={class:"game-data__body"},Gje={class:"game-data__body__menu"},Wje={class:"game-data__body__menu__contmenuswitch"};Li.defaults.headers.common.Authorization="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MCwibmFtZSI6IlVzdWFyaW8gRnJlZSIsInVzZXJuYW1lIjoiZnJlZUBnb2xzdGF0cy5jb20iLCJlbWFpbCI6ImZyZWVAZ29sc3RhdHMuY29tIiwiaWF0IjoxNjA2NzU4Nzk1LCJleHAiOjE2MzgyOTQ3OTV9.kPNmP7yDtk38cAXrUyc7OHRh6J25VFqy-XUNzbK-4YE";const qje=t.defineComponent({name:"TemplateVideos",components:{StatisticsMain:wT,GSCGameTimeLine:bje,GscSwitchComponent:uk,GSCLineupsMain:OX,GSCDatosGSMain:xne,GSCVideoGame:L0e,GSCSummaryMain:qRe}}),Jje=Ae(Object.assign(qje,{props:{currentSeasonId:{type:Number,default:0},defaultGameId:{type:Number,default:0,validator(e){return!Number.isNaN(e)&&e>=0}}},emits:["openmedia","change-season-id"],setup(e,{emit:a}){const o=e,s=t.ref({season:[]}),n=t.ref({}),i=t.ref({}),r=t.ref(!0),c=t.ref("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MCwibmFtZSI6IlVzdWFyaW8gRnJlZSIsInVzZXJuYW1lIjoiZnJlZUBnb2xzdGF0cy5jb20iLCJlbWFpbCI6ImZyZWVAZ29sc3RhdHMuY29tIiwiaWF0IjoxNjA2NzU4Nzk1LCJleHAiOjE2MzgyOTQ3OTV9.kPNmP7yDtk38cAXrUyc7OHRh6J25VFqy-XUNzbK-4YE"),g=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),m=t.ref(0),h=t.ref(g.value[0]);let y=t.ref("");const p=t.computed(()=>{const $=[];return n.value&&n.value.id&&($.push({id:n.value.id,name:n.value.name,type:n.value.type}),n.value.related_seasons&&n.value.related_seasons.forEach(F=>{$.push({id:F.id,type:F.type})})),$});function u(){d=new ResizeObserver($=>{for(const F of $)m.value=F.contentRect.width}),d.observe(l.value)}const f=t.computed(()=>{let $={};return i.value&&i.value.game_id&&($={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}),$});function _($){s.value=$,$.is_captured===0?r.value=!1:r.value=!0,s.value.id!==$.id&&(s.value=$)}function k($){a("openmedia",$)}function C($){V($),$=="Estadísticas"&&(y.value="Comparativa")}function b(){y.value=""}function E($){n.value.id!==$.id&&(n.value=$,a("change-season-id",$.id))}const x=t.computed(()=>g.value.map($=>{if(r.value)return $.name;if($.id!==5&&$.id!==6)return $.name}).filter($=>$!=null));function V($){h.value=g.value.find(F=>F.name===$)||g.value[0]}t.onMounted(()=>{u()});function B($){i.value=$}return($,F)=>(t.openBlock(),t.createElementBlock("div",{class:"game-data",ref_key:"gamedata",ref:l},[t.createElementVNode("div",vje,[t.createElementVNode("div",Mje,[t.createVNode(t.unref(r7),{"current-season-id":e.currentSeasonId,onInput:_},null,8,["current-season-id"]),t.createVNode(t.unref(I7),{"current-season-id":e.currentSeasonId,seasons:s.value.seasons,onInput:E},null,8,["current-season-id","seasons"])]),t.createElementVNode("div",Hje,[t.createVNode(t.unref(LN),{token:c.value,"await-for-seasons":"",seasons:p.value,"is-pagination-visible":!1,"are-games-carousel-type":"",onChangeGameCarousel:B,"default-game-id":o.defaultGameId},null,8,["token","seasons","default-game-id"])])]),t.createElementVNode("div",Uje,[t.createElementVNode("div",Gje,[t.createElementVNode("div",Wje,[t.createVNode(t.unref(uk),{type:2,buttons:x.value,"font-family":"Poppins-Regular","font-size":"16px",width:m.value<400||m.value<700?"max-content":m.value<840||m.value<1050?"155px":"165px","selected-option":h.value.name,borderWidth:"1px",arrow:!1,height:"30px",onInput:V},null,8,["buttons","width","selected-option"])])]),(t.openBlock(),t.createBlock(t.resolveDynamicComponent(h.value.componentName),{game:f.value,subsection:t.unref(y),seasonSelected:n.value,showLineups:r.value,onResetSubsection:b,onOpenmedia:k,onChangeToTab:C},null,40,["game","subsection","seasonSelected","showLineups"]))])],512))}}),[["__scopeId","data-v-7bbaaf14"]]);async function ut({url:e,options:a={},retries:o=3}){return await Li.get(e,a).then(s=>s).catch(s=>o>0?ut({url:e,options:a,retries:o-1}):s)}async function fk({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:s}}=await ut(o);return s}catch(o){if(a)return fk({seasonId:e},!1);throw new Error(o)}}async function Xje({seasonId:e}){try{return(await ut({url:`https://iwxfzq6e2h.execute-api.us-west-2.amazonaws.com/prod/v2/statisticsLeagueBySeason/${e}`})).data.data}catch(a){return Promise.reject(a)}}async function Zje({seasonId:e}){try{return(await ut({url:`https://sqf4rkvoge.execute-api.us-west-2.amazonaws.com/prod/v3/statisticsGroupedBySeason/${e}`})).data.data}catch(a){return Promise.reject(a)}}function Yje(e,a,o,s,n,i,r=!1){const c=o.map(g=>g===1?2:g===2?1:3);return e.filter(g=>{const d=i&&g[n.teamId]?g[n.teamId]!==i:!1,l=a===1?2:1;return(r||s.includes(g[n.gameId]))&&(!a||(d?l:a)===g[n.playingAs])&&(o.includes(g[n.matchResult])&&g[n.teamId]===i||c.includes(g[n.matchResult])&&g[n.teamId]!==i)})}function _k(e,a,o,s,n){return a.length===2&&o.length===3&&s.length===6?e:e.filter(i=>a.includes(i[n.playingAs])&&o.includes(i[n.matchResult])&&s.includes(i[n.section]))}async function bk({seasonId:e}){try{const a=`https://8tvo5bp9ai.execute-api.us-west-2.amazonaws.com/prod/gamesBySeason/${e}`;return(await ut({url:a})).data}catch(a){return Promise.reject(a)}}async function Kje({seasonId:e,gameId:a}){try{const o=`https://iwxfzq6e2h.execute-api.us-west-2.amazonaws.com/prod/v2/statisticsLeagueBySeason/${e}/games/${a}`,{data:s}=await ut({url:o});return s}catch(o){return Promise.reject(o)}}async function Qje({gameId:e}){try{const a=`https://2uj7ojhmt5.execute-api.us-west-2.amazonaws.com/prod/V2/statisticsLive/${e}`;return(await ut({url:a})).data.data}catch(a){return Promise.reject(a)}}async function eve({gameId:e}){try{const a=`https://55sbpmq0f5.execute-api.us-west-2.amazonaws.com/prod/specialMentions/${e}`;return(await ut({url:a})).data.data||[]}catch(a){return Promise.reject(a)}}const tve=["categoryId","matchLapse","section","matchResult","playingAs","total"];let g0=null;function wk(){return g0||(g0=Vi(tve)),g0}async function ave(e){try{const a=`https://d2oco6mqmc.execute-api.us-west-2.amazonaws.com/prod/teamsBySeason/${e.seasonId}`;return(await ut({url:a})).data}catch(a){return Promise.reject(a)}}async function Ck({seasonId:e,teamId:a}){try{return await ut({url:`https://a4dcb6avog.execute-api.us-west-2.amazonaws.com/prod/v2/statisticsTeamBySeason/${e}/${a}`})}catch(o){return Promise.reject(o)}}async function ove(e){try{const a=`https://yjeig444bb.execute-api.us-west-2.amazonaws.com/prod/teamsBySeason/${e.seasonId}`;return await ut({url:a})}catch(a){return Promise.reject(a)}}async function sve(e){try{return await ut({url:`https://nckawv8v3b.execute-api.us-west-2.amazonaws.com/prod/v2/statisticsByGame/${e.gameId}`})}catch(a){return Promise.reject(a)}}const nve={leagueGeneral:{namespaced:!0,state:{seasonPlays:[],currentSeasonGames:[],currentSeasonTeams:[],selectedRound:1,booleanAreLiveGames:!1,booleanIsLiveGamesModalOpen:!1},getters:{seasonPlays:e=>e.seasonPlays,filteredPlaysStack(e,a,o,s){return Yje(e.seasonPlays,s["filterGeneral/getPlayingAs"],s["filterGeneral/getResults"],s["filterGeneral/getSelectedGamesIds"],wk(),s["teamsGeneral/team"].team_id,!0)},nextGamesSchedule(e){const a=e.currentSeasonGames.reduce((o,s)=>{const n={...s};return n.home_team=e.currentSeasonTeams.find(i=>i.team_id===s.home_team),n.visiting_team=e.currentSeasonTeams.find(i=>i.team_id===s.visiting_team),o[s.matchday_abbreviation]?o[s.matchday_abbreviation][s.game_status===3?"canceled":s.date]?o[s.matchday_abbreviation][s.game_status===3?"canceled":s.date].push(n):o[s.matchday_abbreviation][s.game_status===3?"canceled":s.date]=[n]:o[s.matchday_abbreviation]={[s.game_status===3?"canceled":s.date]:[n]},o},{});for(let[o,s]of Object.entries(a))a[o]=Object.entries(s).map(([n,i])=>({date:n,games:i})),a[o].sort((n,i)=>n.date<i.date?-1:n.date>i.date?1:0);return a},matchdaysDates(e,a){let o=[];if(a.nextGamesSchedule){let s=Object.keys(a.nextGamesSchedule);for(let n of s){let i=Number(n.replace("M","")),r=a.nextGamesSchedule[n].map(c=>({matchday:i,date:new Date(c.date)}));o=o.concat(r)}}return o},closestMatchDay(e,a){let o=new Date,s=0,n=-new Date(0,0,0).valueOf(),i=a.matchdaysDates,r=i.length;for(let c=0;c<i.length;c++)s=Math.abs(i[c].date-o),s<n&&(r=c,n=s);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 s=await fk({seasonId:a["filterGeneral/getSeasonId"]});if(o)return s;e("updateSeasonPlays",s)}catch(s){return Promise.reject(s)}},async getCurrentSeasonGames({commit:e,rootGetters:a}){try{const o=await bk({seasonId:a["loginGeneral/seasonId"]});e("updateCurrentSeasonGames",o)}catch(o){return Promise.reject(o)}},async getCurrentSeasonTeams({commit:e,rootGetters:a}){try{const o=await ave({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 s=[void 0,void 0];return e.currentSeasonGames.length===0&&(s[0]=a("getCurrentSeasonGames")),e.currentSeasonTeams.length===0&&(s[1]=a("getCurrentSeasonTeams")),await Promise.all(s),!1}catch(s){throw new Error(s)}}}}};async function ive({filter:e}){try{const a=`https://n7ielynjxk.execute-api.us-east-2.amazonaws.com/qa/filters?filters=${e}`,{data:o}=await ut({url:a});return o}catch(a){return Promise.reject(a)}}const rve=["categoryId","teamId","matchResult","playingAs","matchLapse","section","total"];let y0=null;function lve(){return y0||(y0=Vi(rve)),y0}class Jc{constructor(){Oe(this,"maximumLiveSection",1);Oe(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:[]});Oe(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,s){s&&(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,s){s&&(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,s){for(let n=o-1;n<a.accumulated.length;n++)a.accumulated[n]+=s}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,s){for(let n=a.accumulated.length-1;n>=o-1;n--)a.accumulated[n]-=s}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(s=>s/o)}calculateRanking(a,o,s,n,i,r,c,g){let d=[];n===3&&a&&a.length&&(s.playingAs.length!==2||s.matchResult.length!==3)?d=Array.from(a.reduce((m,h)=>{const y=h[o.playingAs]===1,p=y?"1":"2",u=m.get(h[o.gameId]);if(u)u[p]?u[p].arrayPlays.push(h):u[p]={numberTeamId:h[o.teamId],arrayPlays:[h]};else{const f={numberMatchResult:h[o.matchResult]};y&&(f[1]={numberTeamId:h[o.teamId],arrayPlays:[h]}),m.set(h[o.gameId],f)}return m},new Map).values()).reduce((m,h)=>{const y=s.playingAs.length===2?"both":s.playingAs[0].toString();return(y==="both"&&(h[1].numberTeamId===s.teamId||h[2].numberTeamId===s.teamId)||y!=="both"&&h[y].numberTeamId===s.teamId)&&s.matchResult.includes(h.numberMatchResult)&&m.push(...h[1].arrayPlays,...h[2].arrayPlays),m},[]).filter(m=>s.sections.includes(m[o.section])):(d=a?[...a]:[],c&&a&&(d=a.filter(l=>s.playingAs.includes(l[o.playingAs])&&s.matchResult.includes(l[o.matchResult])&&s.sections.includes(l[o.section])))),this.setTeamRanking(d,n,o,s.teamId,r,"accomplished",g)}setTeamRanking(a,o,s,n,i,r,c){let g=null,d=null;o===3&&(g=new Map,d={},a.forEach(h=>{const y=g.get(h[s.gameId]);y?y[h[s.teamId.toString()]]?y[h[s.teamId.toString()]]+=h[s.total]:y[h[s.teamId.toString()]]=h[s.total]:g.set(h[s.gameId],{[h[s.teamId.toString()]]:h[s.total]})}),Array.from(g.values()).forEach(h=>{const[y,p]=Object.keys(h).map(f=>f),u=h[y]+h[p];this.addPassesAvgByTeam(d,y,u?h[y]/u:0),this.addPassesAvgByTeam(d,p,u?h[p]/u:0)}));const l=i.sort((h,y)=>h.team_id-y.team_id).map(h=>{if(o===3){const y=d[h.team_id.toString()];return{teamId:h.team_id,points:y?y.numberTotalPassesAvg/y.numberGamesCount:0,total:y?y.numberTotalPassesAvg:0}}else{const y=a.reduce((p,u)=>u[s.teamId]===h.team_id&&o===u[s.categoryId]?p+u[s.total]:p,0);return{teamId:h.team_id,points:h[`${c}FilterGames`]?y/h[`${c}FilterGames`]:0,total:y}}}).sort((h,y)=>y.points-h.points);this.accomplished.arrayRankings=l;const m=l.findIndex(h=>h.teamId===n);o===3&&(this.accomplished.avgPreGame=l[m].points),this[r].ranking=m+1,this[r].leader=l[0]}addPassesAvgByTeam(a,o,s){a[o]?(a[o].numberGamesCount+=1,a[o].numberTotalPassesAvg+=s):a[o]={numberGamesCount:1,numberTotalPassesAvg:s}}}class re{constructor(a,o,s,n,i,r,c,g,d,l){Oe(this,"id","");Oe(this,"generalId",0);Oe(this,"name","");Oe(this,"names",{"0-0":"","1-1":"","0-1":"","1-0":""});Oe(this,"mentions",{"0-0":"","1-1":"","0-1":"","1-0":""});Oe(this,"accomplishedCategoryIds",[]);Oe(this,"receivedCategoryIds",[]);Oe(this,"generalCategoriesIds",{accomplished:0,received:0});Oe(this,"specialMention","");Oe(this,"homeTeam",new Jc);Oe(this,"visitingTeam",new Jc);Oe(this,"isLeagueDataCalculated",!1);Oe(this,"leagueAccomplishedMax",0);Oe(this,"leagueReceivedMax",0);Oe(this,"leagueAccomplishedAvg",0);Oe(this,"leagueReceivedAvg",0);Oe(this,"leagueAccomplishedAccumulator",0);Oe(this,"leagueReceivedAccumulator",0);Oe(this,"homeTeamType","homeTeam");Oe(this,"visitingTeamType","visitingTeam");Oe(this,"betOnly",!1);Oe(this,"isPercent",!1);this.id=`${s.accomplished}-${s.received}`,this.accomplishedCategoryIds=a||[],this.receivedCategoryIds=o||[],this.generalCategoriesIds=s||{accomplished:0,received:0},this.name=n,this.names["0-0"]=n||"",this.names["1-1"]=i||"",this.names["0-1"]=r||"",this.names["1-0"]=c||"",this.generalId=g||0,this.betOnly=d||!1,this.isPercent=l||!1}addLeaguePlays(a,o,s){a.length===0||!s||this.isLeagueDataCalculated||(a.forEach(n=>{this.isAccomplishedLeaguePlay(n[o.categoryId])&&(this.leagueAccomplishedAccumulator+=n[o.total]),this.isReceivedLeaguePlay(n[o.categoryId])&&(this.leagueReceivedAccumulator+=n[o.total])}),this.leagueAccomplishedAvg=(this.leagueAccomplishedAccumulator/(2*s)).toFixed(2),this.leagueAccomplishedMax=Math.round(this.leagueAccomplishedAvg*1.5),this.leagueReceivedAvg=(this.leagueReceivedAccumulator/(2*s)).toFixed(2),this.leagueReceivedMax=Math.round(this.leagueReceivedAvg*1.5),this.isLeagueDataCalculated=!0)}addSpecialMention(a,o,s){let n="-";for(const[i,r]of Object.entries(this.generalCategoriesIds))a===r&&(n=`${i==="accomplished"?"0":"1"}${n}`),o===r&&(n=`${n}${i==="accomplished"?"0":"1"}`);n.length===3&&(this.mentions[n]=s)}resetMentions(){this.mentions={"0-0":"","1-1":"","0-1":"","1-0":""}}addTeamPlays(a,o,s,n,i){!s||!i||a!==this.homeTeamType&&a!==this.visitingTeamType||(s.forEach(r=>{this.isAccomplishedPlay(r[n.categoryId])?this[a].increaseAccomplishedByOne(r[n.section],r[n.total]):this.isReceivedPlay(r[n.categoryId])&&this[a].increaseReceivedByOne(r[n.section],r[n.total])}),this[a].calculateAvg(i))}addLivePlay(a,o,s,n,i=!1,r=!1){(a===this.homeTeamType||a===this.visitingTeamType)&&s[n.categoryId].includes(this.generalCategoriesIds.accomplished)&&this[a].increaseAccomplishedByOne(s[n.section],s[n.total],!0)}subtractLivePlay(a,o,s,n,i){(a===this.homeTeamType||a===this.visitingTeamType)&&(this.isAccomplishedPlay(s[n.categoryId])&&!i?this[a].decreaseAccomplishedLiveByOne(s[n.section],s[n.total]):this.isReceivedPlay(s[n.categoryId])&&i&&this[a].decreaseReceivedLiveByOne(s[n.section],s[n.total]))}isAccomplishedLeaguePlay(a){return!!(this.receivedCategoryIds[0]===40?this.receivedCategoryIds:this.accomplishedCategoryIds).find(s=>a===s||`${a}_r`===s)}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,s,n,i,r=!1){this[this.homeTeamType].calculateRanking(a,o,s,this.generalCategoriesIds.accomplished,this.generalCategoriesIds.received,i,r,this.homeTeamType),this[this.visitingTeamType].calculateRanking(a,o,n,this.generalCategoriesIds.accomplished,this.generalCategoriesIds.received,i,r,this.visitingTeamType)}resetData(){this.homeTeam=new Jc,this.visitingTeam=new Jc,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 cve={general:{name:"General",priority:1,parentInfo:{parentAnalysis:[1],analysisTypeBlocks:[1]},subcategories:{goals:new re([12,55,"35_r","54_r"],null,{accomplished:1,received:0},"Goles","Goles recibidos","Goles realizados / recibidos","Goles recibidos / realizados",1),shotToGoal:new re([91,95,158,167,176,343,330,333,423],null,{accomplished:2,received:0},"Remates a destino","","","",1),possession:new re([2,3,20,21],null,{accomplished:3,received:0},"Posesión","","","",1,!1,!0),yellowCards:new re([14,52],null,{accomplished:4,received:0},"Tarjetas amarillas","","","",1),redCards:new re([15,53],null,{accomplished:5,received:0},"Tarjetas rojas","","","",1),centerCrosses:new re([13,25],null,{accomplished:6,received:0},"Centros totales","","","",1)}},offensive:{name:"Ofensivo",priority:2,parentInfo:{parentAnalysis:[1],analysisTypeBlocks:[1]},subcategories:{shotsOnGoal:new re([19],null,{accomplished:7,received:0},"Tiros a gol","","","",1),shotsOnGoalDestination:new re([91,95],null,{accomplished:8,received:0},"Tiros a gol destino","","","",1),shotToGoal:new re([91,95,158,167,176,343,330,333,423],null,{accomplished:2,received:0},"Remates a destino","","","",1),ballsWonOpponentPenaltyBox:new re([11],null,{accomplished:10,received:0},"Balones ganados área rival","","","",1),centersFromRight:new re([25],null,{accomplished:11,received:0},"Centros por derecha","","","",1),centersFromLeft:new re([13],null,{accomplished:12,received:0},"Centros por izquierda","","","",1),success1VS1:new re([4],null,{accomplished:13,received:0},"Enfrentamientos ofensivos exitosos","","","",1),unsuccess1VS1:new re([209],null,{accomplished:14,received:0},"Enfrentamientos ofensivos no exitosos","","","",1)}},defensive:{name:"Defensivo",priority:3,parentInfo:{parentAnalysis:[1],analysisTypeBlocks:[1]},subcategories:{saves:new re([39],null,{accomplished:15,received:0},"Atajadas","","","",1),ballsWonOwnPenaltyBox:new re([23],null,{accomplished:16,received:0},"Balones ganados área propia","","","",1),success1VS1:new re([5],null,{accomplished:17,received:0},"Enfrentamientos defensivos exitosos","","","",1),unsuccess1VS1:new re([209],null,{accomplished:18,received:0},"Enfrentamientos defensivos no exitosos","","","",1),aerialGame:new re([24],null,{accomplished:19,received:0},"Juego aéreo resto del campo","","","",1),clearances:new re([34],null,{accomplished:20,received:0},"Rechaces","","","",1)}},possession:{name:"Posesión",priority:4,parentInfo:{parentAnalysis:[1],analysisTypeBlocks:[1]},subcategories:{totalPasses:new re([2,3,20,21],null,{accomplished:21,received:0},"Pases totales","","","",1),successPasses:new re([2,20],null,{accomplished:22,received:0},"Pases acertados","","","",1),successPassesRivalHalf:new re([20],null,{accomplished:23,received:0},"Pases acertados en cancha rival","","","",1),ballsRecoveredInChallenge:new re([483],null,{accomplished:24,received:0},"Balones recuperados en disputa","","","",1),ballsRecoveredWithoutChallenge:new re([484],null,{accomplished:25,received:0},"Balones recuperados sin disputa","","","",1),ballsLostInChallenge:new re([494],null,{accomplished:26,received:0},"Balones perdidos en disputa","","","",1),ballsLostWithoutChallenge:new re([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 re([155,164,173,362,371,380],null,{accomplished:28,received:0},"Tiros libres 4/4","","","",1),freeKick34:new re([150,357],null,{accomplished:29,received:0},"Tiros libres 3/4","","","",1),freeKickOwnHalf:new re([149,356],null,{accomplished:30,received:0},"Tiros libres cancha propia","","","",1),cornerFromRight:new re([32],null,{accomplished:31,received:0},"Tiros de esquina por derecha","","","",1),cornerFromLeft:new re([31],null,{accomplished:32,received:0},"Tiros de esquina por izquierda","","","",1),goalKick:new re([264,28],null,{accomplished:33,received:0},"Saques de meta","","","",1)}},penalties:{name:"Infracciones",priority:6,parentInfo:{parentAnalysis:[1],analysisTypeBlocks:[1]},subcategories:{totalFouls:new re([17,50],null,{accomplished:34,received:0},"Faltas totales","","","",1),foulOwnGoal:new re([348,478],null,{accomplished:35,received:0},"Faltas cerca de su propia portería","","","",1),fieldFouls:new re([349,350,479,480],null,{accomplished:36,received:0},"Faltas resto del campo","","","",1),penaltyKick:new re([461,481],null,{accomplished:37,received:0},"Penales cometidos","","","",1),offside:new re([33],null,{accomplished:38,received:0},"Fueras de lugar","","","",1)}}},dve=[{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}],mve=["teamId","categoryId","matchlapse","section","matchResult","playingAs","total","gameId"];let u0=null;function pve(){return u0||(u0=Vi(mve)),u0}const hve=["playId","gameId","teamId","playerId","momentOfPlay","categoryId","categoryType","matchLapse","section","matchResult","playingAs","total","coordinate1X","coordinate1Y","coordinate2X","coordinate2Y","coordinate3X","coordinate3Y"];let f0=null;function gve(){return f0||(f0=Vi(hve)),f0}function Xc(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 kk(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 _0(e,a,o){let s=[...a];return e[o.categoryId]===2&&(s[0]=14),e[o.categoryId]===20&&(s[0]=15),[14,15].includes(s[0])?s:null}const yve=[{name:"Liga MX",id:1},{name:"Liga MX Femenil",id:1001},{name:"Liga Expansión MX",id:1071}],uve={nextGeneral:{namespaced:!0,state:{seasonId:0,pastSeasonId:0,usePastSeasonId:!1,isSocketConnected:!1,indexesLP:wk(),indexesTSP:lve(),indexesLS:pve(),indexesTLP:gve(),nextGamesDataStructure:cve,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,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 dve.filter(a=>a.parentAnalysis.includes(e.selectedAnalysis.id))},homeTeamFilteredPlays(e){if(e.homeTeamFilter.requiresPlaysFiltering)return _k(e.homeTeamPlays,e.homeTeamFilter.playingAs,e.homeTeamFilter.matchResult,e.homeTeamFilter.sections,e.indexesTSP)},visitingTeamFilteredPlays(e){if(e.visitingTeamFilter.requiresPlaysFiltering)return _k(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 s of Object.values(o.subcategories))e.homeTeamFilter.requiresPlaysFiltering&&s.homeTeam.resetTotals(),e.visitingTeamFilter.requiresPlaysFiltering&&s.visitingTeam.resetTotals(),s.addLeaguePlays(e.currentSeasonPlays,e.indexesLP,e.totalSeasonFinishedGames),s.addTeamPlays(s.homeTeamType,e.gameForAnalysis.home_team,a.homeTeamFilteredPlays,e.indexesTSP,e.showPostMatch?1:a.totalFilteredHomeGames),s.addTeamPlays(s.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,s)=>o.priority-s.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((s,n)=>{if(n.game_status===1&&(n.home_team===o.team_id||n.visiting_team===o.team_id)){const i=n.score[0]-n.score[1],r=n.home_team===o.team_id;s.push({playingAs:r?1:2,matchResult:i===0?3:r?i>0?1:2:i<0?1:2})}return s},[])})},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=Tu(e.homeTeamFilter,a.local,e.gameForAnalysis.home_team),e.visitingTeamFilter=Tu(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(s=>{for(const n of Object.values(s.subcategories))n.resetMentions()}),o.forEach(s=>{for(const n of a)for(const i of Object.values(s.subcategories))i.addSpecialMention(n[0],n[1],n[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 s=Xc(a,e.indexesTLP,e.categoriesMap);for(const n of Object.values(e.nextGamesDataStructure))for(const i of Object.values(n.subcategories))i.addLivePlay(e.gameForAnalysis.home_team===s[e.indexesTSP.teamId]?"homeTeam":"visitingTeam",s[e.indexesTSP.teamId],s,e.indexesTSP,e.isLive,!1)}},updateLiveGamePlay(e,a){const o=!!a[e.indexesTLP.length],s=e.livePlays.get(a[e.indexesTLP.playId]);if(rB(s,a))return;let n="";const i=e.gameForAnalysis.home_team===a[e.indexesTLP.teamId]?"homeTeam":"visitingTeam";s&&(n=e.gameForAnalysis.home_team===s[e.indexesTLP.teamId]?"homeTeam":"visitingTeam");const r=Xc(s,e.indexesTLP,e.categoriesMap),c=_0(s,r,e.indexesTLP),g=Xc(a,e.indexesTLP,e.categoriesMap),d=_0(a,g,e.indexesTLP);for(const l of Object.values(e.nextGamesDataStructure))for(const m of Object.values(l.subcategories))s&&(m.subtractLivePlay(n,r[e.indexesTSP.teamId],r,e.indexesTSP,o),c&&m.subtractLivePlay(n,c[e.indexesTSP.teamId],c,e.indexesTSP,o)),m.addLivePlay(i,g[e.indexesTSP.teamId],g,e.indexesTSP,e.isLive,o),d&&m.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],s=e.livePlays.get(a[e.indexesTLP.playId]);let n="";if(s){n=e.gameForAnalysis.home_team===s[e.indexesTLP.teamId]?"homeTeam":"visitingTeam",e.livePlays.delete(s[e.indexesTLP.playId]);const i=Xc(s,e.indexesTLP,e.categoriesMap),r=_0(a,i,e.indexesTLP);for(const c of Object.values(e.nextGamesDataStructure))for(const g of Object.values(c.subcategories))g.subtractLivePlay(n,i[e.indexesTSP.teamId],i,e.indexesTSP,o),r&&g.subtractLivePlay(n,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 s=[],n=new Map;for(const i of Object.values(e.nextGamesDataStructure))for(const r of Object.values(i.subcategories))s.push(r);a.rankingData.forEach(i=>{for(const r of s)if(r.isInGeneralCategory(i[e.indexesLS.categoryId])){n.has(r.id)?n.get(r.id).push(i):n.set(r.id,[i]);break}})},prepareCleanAllStatistics(e){e.homeTeamFilter.requiresPlaysFiltering=!0,e.visitingTeamFilter.requiresPlaysFiltering=!0},setHomeGames(e,a){e.homeGames=kk(a)},setVisitingGames(e,a){e.visitingGames=kk(a)},generateCategoriesMap(e){for(const a of Object.values(e.nextGamesDataStructure))for(const o of Object.values(a.subcategories))o.accomplishedCategoryIds.forEach(s=>{const n=e.categoriesMap.get(s);n?n.push(o.generalCategoriesIds.accomplished):e.categoriesMap.set(s,[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 sve({gameId:a.gameId});if(r){var o=[],s=[],n={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),s=r.data.data.filter(c=>c[1]==a.awayTeam),n=r.data.games,i=r.data.games),e("updateHomeTeamPlays",o),e("updateVisitingTeamPlays",s),e("setHomeGames",n),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 s=[];e("updateGameForAnalysis",o.gameInfo),s.push(a("setAndGetStatsPostMatch",{gameId:o.game,homeTeam:o.homeTeam,awayTeam:o.awayTeam})),await Promise.all(s)}catch(s){throw new Error(s)}finally{e("setIsSectionLoading",!1,{root:!0})}},async checkState({state:e,dispatch:a,commit:o},{gameId:s,isTeamsAnalysis:n,currentSeasonId:i,isLoginChanged:r=!1,defaultFilter:c=null,gameInfo:g=null,isCupGame:d=!1}){try{let l={},m=e.seasonId!==Number(i);const h=[];o("setIsSectionLoading",!0,{root:!0}),o("setUsePastSeasonId",!1),m&&o("setSeasonId",i),o("updateGameId",Number(s)),e.oldSeasonId!==e.seasonId&&o("resetNextGamesDataStructure");const y=await a("getCurrentSeasonGames",Number(s));if(o("leagueGeneral/updateCurrentSeasonGames",y,{root:!0}),l=y.find(p=>p.game_id===Number(s)),!l&&g&&(l=g),l&&o("updateGameForAnalysis",l),l.game_status!==1&&(d||await a("checkTeamsData",{gameId:s,isFromBet:!!c}),(r||e.oldSeasonId!==e.seasonId||e.statistics.length===0)&&h.push(a("getSeasonStatistics")),(r||e.categoriesMap.size===0)&&o("generateCategoriesMap")),e.usePastSeasonId){const p=await a("getCurrentSeasonGamesLast");o("leagueGeneral/updateCurrentSeasonGames",p,{root:!0})}(r||e.currentSeasonTeams.length===0||!e.currentSeasonTeams.find(p=>l.home_team===p.team_id))&&h.push(a("getCurrentSeasonTeams")),o("setHomeResultGame",l.score[0]),o("setAwayResultGame",l.score[1]),n?l.game_status!==1?(await a("fillStatisticData",{gameId:s,gameinfo:l,promises:h,defaultFilter:c}),o("updateShowPostMatchData",!1)):(o("updateStats",[]),o("updateShowPostMatchData",!0),h.push(a("fillStatisticDataPostMatch",{game:s,homeTeam:l.home_team,awayTeam:l.visiting_team,gameInfo:l})),await Promise.all(h)):o("setIsSectionLoading",!1,{root:!0})}catch(l){return Promise.reject(l)}},async fillStatisticData({commit:e,dispatch:a,getters:o,rootGetters:s,state:n},{gameId:i,gameinfo:r,promises:c=[],defaultFilter:g=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")),g&&c.push(ive(g)),d=await Promise.all(c)}catch(l){throw new Error(l)}finally{setTimeout(()=>{if(e("addRankingInSubcategories",{getters:o,isPremiumAccount:s["loginGeneral/getPremiumAccount"]}),g){const[l]=d.pop();l&&(e("setBetSubcategories",l.categories),e("setBetDescription",l.sectionDescription),e("setDefaultFilter",l.params),e("updateFilterAux"),e("updateFilters",{filters:n.defaultFilter,needsFormat:!1}),a("updateRankingInSubcategories"))}},100),e("setIsSectionLoading",!1,{root:!0})}},async checkTeamsData({state:e,dispatch:a,rootState:o,commit:s},{gameId:n,isFromBet:i}){try{const r=Number(n);if(o.general.tournaments&&o.general.tournaments.length){await a("general/fetchTournaments",null,{root:!0});const c=o.general.tournaments.find(g=>{for(const d of g.seasons)if(d.id===e.seasonId)return!0;return!1});s("general/setTournamentSelected",c||{},{root:!0})}if(e.pastSeasonId){s("nextGeneral/setPastSeasonId",e.pastSeasonId,{root:!0});const c=o.leagueGeneral.currentSeasonGames.find(g=>g.game_id===r);c&&s("updateGameForAnalysis",c),await Promise.all([a("getHomeTeamPlays"),a("getVisitingTeamPlays")]),s("setUsePastSeasonId",i||(!e.homeTeamPlays||e.homeTeamPlays.length===0)&&(!e.visitingTeamPlays||e.visitingTeamPlays.length===0))}else s("setUsePastSeasonId",!1)}catch(r){throw new Error(r)}},async getSpecialMentionsByGame({commit:e},a){try{const o=await eve({gameId:a});e("addSpecialMentions",o)}catch(o){return Promise.reject(o)}},async getCurrentSeasonGames({commit:e,state:a},o){try{const{teams:s,games:n,past_season_id:i,tournament_id:r}=await Kje({seasonId:a.usePastSeasonId?a.pastSeasonId:a.seasonId,gameId:o}),c=yve.find(g=>g.id===r);return c&&e("setCurrentTournamentName",c.name),e("setHome",s[0]),e("setAway",s[1]),a.usePastSeasonId||e("setPastSeasonId",i),await e("updateCurrentSeasonGames",n),n&&Array.isArray(n)&&e("updateFinishedGames",n.reduce((g,d)=>(d.game_status===1&&(g+=1),g),0)),n}catch(s){return Promise.reject(s)}},async getCurrentSeasonGamesLast({commit:e,state:a}){try{const{games:o,past_season_id:s}=await bk({seasonId:a.usePastSeasonId?a.pastSeasonId:a.seasonId});return a.usePastSeasonId||e("setPastSeasonId",s),await e("updateCurrentSeasonGames",o),o&&Array.isArray(o)&&e("updateFinishedGames",o.reduce((n,i)=>(i.game_status===1&&(n+=1),n),0)),o}catch(o){return Promise.reject(o)}},async getCurrentSeasonTeams({commit:e,state:a}){try{const o=await ove({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,s=await Zje({seasonId:o});e("updateSeasonStatistics",s),e("updateOldSeasonId",o)}catch(o){return Promise.reject(o)}},updateRankingInSubcategories({state:e,commit:a,getters:o,rootGetters:s}){e.currentSeasonGames.length>0&&a("addRankingInSubcategories",{getters:o,isPremiumAccount:s["loginGeneral/getPremiumAccount"]})},async getHomeTeamPlays({commit:e,state:a}){try{const o=await Ck({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 Ck({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 Xje({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 s=await Qje({gameId:o});e.livePlays=new Map,s.forEach(n=>{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("addLiveGamePlay",n)})}catch(s){throw new Error(s)}},socket_new({state:e,commit:a},o){const s=o[1];(e.gameForAnalysis.home_team===s[e.indexesTLP.teamId]||e.gameForAnalysis.visiting_team===s[e.indexesTLP.teamId])&&a("addLiveGamePlay",s)},socket_update({state:e,commit:a},o){const s=o[1];e.gameForAnalysis.game_id===s[e.indexesTLP.gameId]&&(e.gameForAnalysis.home_team===s[e.indexesTLP.teamId]||e.gameForAnalysis.visitingTeam===s[e.indexesTLP.teamId])&&a("updateLiveGamePlay",s)},socket_delete({state:e,commit:a},o){const s=o[1];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("deleteLiveGamePlay",s)},exitChannel({state:e,getters:a,rootState:o,rootGetters:s,commit:n}){const i=s["loginGeneral/getPremiumAccount"];a.isLive&&i&&(n("updateShowLiveData",!1),n("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 s of Object.values(o.subcategories))s.homeTeam.resetTotals(),s.visitingTeam.resetTotals(),s.homeTeam.resetTotalsLive(),s.visitingTeam.resetTotalsLive(),s.isBetMainSubcategory=!1;Object.values(e.nextGamesDataStructure).forEach(o=>{for(const s of Object.values(o.subcategories))s.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 s of Object.values(o.subcategories))s.homeTeam.resetTotals(),s.visitingTeam.resetTotals(),s.isBetMainSubcategory=!1;Object.values(e.nextGamesDataStructure).forEach(o=>{for(const s of Object.values(o.subcategories))s.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 fve(){try{const{data:e}=await ut({url:"https://kefloixzy1.execute-api.us-west-2.amazonaws.com/prod/tournaments"});return e}catch(e){throw new Error(e)}}const _ve={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 fve();a("setTournaments",o)}}catch(o){throw new Error(o)}}}};async function bve({seasonId:e,localTeamId:a,visitingTeamId:o}){try{const s=`https://bzznnzehtf.execute-api.us-west-2.amazonaws.com/prod/xg/seasons/${e}/teams/${a}/${o}`;return(await ut({url:s})).data}catch(s){return Promise.reject(s)}}async function wve({seasonId:e,localTeamId:a,visitingTeamId:o}){try{const s=`https://bzznnzehtf.execute-api.us-west-2.amazonaws.com/prod/xg/game/${e}/teams/${a}/${o}`;return(await ut({url:s})).data}catch(s){return Promise.reject(s)}}const Sk=(e,a)=>{let o={};return e.forEach((s,n)=>{n==3&&(a[0]==35||a[0]==54)&&(a[n]==2?a[n]=1:a[n]=2),n==2&&(a[0]==35||a[0]==54)&&(a[n]==1?a[n]=2:a[n]==2&&(a[n]=1)),o[s]=a[n]}),o},Ek=(e,a)=>e.filter(s=>{const n=a.playingAs.includes(s.playing_as),i=a.matchResult.includes(s.match_result),r=a.sections.includes(s.section);return n&&i&&r}),Nk=[{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,s){return typeof s>"u"||+s==0?Math[a](o):(o=+o,s=+s,isNaN(o)||!(typeof s=="number"&&s%1===0)?NaN:(o=o.toString().split("e"),o=Math[a](+(o[0]+"e"+(o[1]?+o[1]-s:-s))),o=o.toString().split("e"),+(o[0]+"e"+(o[1]?+o[1]+s:s))))}Math.ceil10||(Math.ceil10=function(a,o){return e("ceil",a,o)})})();function $k(e,a){let o=a*-1;return Math.ceil10(e,o)}const Cve={general:_ve,...nve,...uve,...{xgGeneral:{namespaced:!0,state:{teamSelected:"Local",xGLocalPlays:[],xGVisitingPlays:[]},getters:{playsLocal:(e,a,o)=>{const s=e.xGLocalPlays,n="homeTeamFilter",i=o.nextGeneral[n];return Ek(s,i)},playsAway:(e,a,o)=>{const s=e.xGVisitingPlays,n="visitingTeamFilter",i=o.nextGeneral[n];return Ek(s,i)},goalsQtyLocal:(e,a)=>{const o=Nk.find(s=>s.name==="Goles");return a.playsLocal.filter(s=>o.categories.includes(s.category_id)).length},goalsQtyAway:(e,a)=>{const o=Nk.find(s=>s.name==="Goles");return a.playsAway.filter(s=>o.categories.includes(s.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 s=a.playsLocal.reduce((n,i)=>(o.has(i.moment_of_play)||(o.add(i.moment_of_play),n+=i.xG2),n),0);return $k(s,2)},xGAway:(e,a)=>{const o=new Set;let s=a.playsAway.reduce((n,i)=>(o.has(i.moment_of_play)||(o.add(i.moment_of_play),n+=i.xG2),n),0);return $k(s,2)}},mutations:{setTeamSelected(e,a){e.teamSelected=a},setPlays(e,a){e.xGLocalPlays=a.local_team.map(o=>Sk(a.data_headers,o)),e.xGVisitingPlays=a.visiting_team.map(o=>Sk(a.data_headers,o))},cleanXgStore(e){e.localStorage="Local",e.xGLocalPlays=[],e.xGVisitingPlays=[]}},actions:{async getXgPlays({commit:e},{seasonId:a,localTeamId:o,visitingTeamId:s,postMatch:n=!1}){try{var i={};n?i=await wve({seasonId:a,localTeamId:o,visitingTeamId:s}):i=await bve({seasonId:a,localTeamId:o,visitingTeamId:s}),e("setPlays",i)}catch(r){return Promise.reject(r)}}}}}};function kve(e){for(const[a,o]of Object.entries(Cve))e.hasModule(a)||e.registerModule(a,o)}_t.GSCGameData=Jje,_t.registerStoreModules=kve,Object.defineProperty(_t,Symbol.toStringTag,{value:"Module"})});
|
|
119
|
+
*/var xDe="store";function _o(e,a){Object.keys(e).forEach(function(o){return a(e[o],o)})}function X6(e){return e!==null&&typeof e=="object"}function VDe(e){return e&&typeof e.then=="function"}function Xt(e,a){if(!e)throw new Error("[vuex] "+a)}function IDe(e,a){return function(){return e(a)}}function Z6(e,a,o){return a.indexOf(e)<0&&(o&&o.prepend?a.unshift(e):a.push(e)),function(){var s=a.indexOf(e);s>-1&&a.splice(s,1)}}function Y6(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;Gc(e,o,[],e._modules.root,!0),i0(e,o,a)}function i0(e,a,o){var s=e._state;e.getters={},e._makeLocalGettersCache=Object.create(null);var n=e._wrappedGetters,i={};_o(n,function(r,c){i[c]=IDe(r,e),Object.defineProperty(e.getters,c,{get:function(){return i[c]()},enumerable:!0})}),e._state=t.reactive({data:a}),e.strict&&FDe(e),s&&o&&e._withCommit(function(){s.data=null})}function Gc(e,a,o,s,n){var i=!o.length,r=e._modules.getNamespace(o);if(s.namespaced&&(e._modulesNamespaceMap[r]&&process.env.NODE_ENV!=="production"&&console.error("[vuex] duplicate namespace "+r+" for the namespaced module "+o.join("/")),e._modulesNamespaceMap[r]=s),!i&&!n){var c=r0(a,o.slice(0,-1)),g=o[o.length-1];e._withCommit(function(){process.env.NODE_ENV!=="production"&&g in c&&console.warn('[vuex] state field "'+g+'" was overridden by a module with the same name at "'+o.join(".")+'"'),c[g]=s.state})}var d=s.context=ADe(e,r,o);s.forEachMutation(function(l,m){var h=r+m;ODe(e,h,l,d)}),s.forEachAction(function(l,m){var h=l.root?m:r+m,y=l.handler||l;TDe(e,h,y,d)}),s.forEachGetter(function(l,m){var h=r+m;zDe(e,h,l,d)}),s.forEachChild(function(l,m){Gc(e,a,o.concat(m),l,n)})}function ADe(e,a,o){var s=a==="",n={dispatch:s?e.dispatch:function(i,r,c){var g=Wc(i,r,c),d=g.payload,l=g.options,m=g.type;if((!l||!l.root)&&(m=a+m,process.env.NODE_ENV!=="production"&&!e._actions[m])){console.error("[vuex] unknown local action type: "+g.type+", global type: "+m);return}return e.dispatch(m,d)},commit:s?e.commit:function(i,r,c){var g=Wc(i,r,c),d=g.payload,l=g.options,m=g.type;if((!l||!l.root)&&(m=a+m,process.env.NODE_ENV!=="production"&&!e._mutations[m])){console.error("[vuex] unknown local mutation type: "+g.type+", global type: "+m);return}e.commit(m,d,l)}};return Object.defineProperties(n,{getters:{get:s?function(){return e.getters}:function(){return K6(e,a)}},state:{get:function(){return r0(e.state,o)}}}),n}function K6(e,a){if(!e._makeLocalGettersCache[a]){var o={},s=a.length;Object.keys(e.getters).forEach(function(n){if(n.slice(0,s)===a){var i=n.slice(s);Object.defineProperty(o,i,{get:function(){return e.getters[n]},enumerable:!0})}}),e._makeLocalGettersCache[a]=o}return e._makeLocalGettersCache[a]}function ODe(e,a,o,s){var n=e._mutations[a]||(e._mutations[a]=[]);n.push(function(i){o.call(e,s.state,i)})}function TDe(e,a,o,s){var n=e._actions[a]||(e._actions[a]=[]);n.push(function(i){var r=o.call(e,{dispatch:s.dispatch,commit:s.commit,getters:s.getters,state:s.state,rootGetters:e.getters,rootState:e.state},i);return VDe(r)||(r=Promise.resolve(r)),e._devtoolHook?r.catch(function(c){throw e._devtoolHook.emit("vuex:error",c),c}):r})}function zDe(e,a,o,s){if(e._wrappedGetters[a]){process.env.NODE_ENV!=="production"&&console.error("[vuex] duplicate getter key: "+a);return}e._wrappedGetters[a]=function(n){return o(s.state,s.getters,n.state,n.getters)}}function FDe(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 r0(e,a){return a.reduce(function(o,s){return o[s]},e)}function Wc(e,a,o){return X6(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 RDe="vuex bindings",Q6="vuex:mutations",l0="vuex:actions",ks="vuex",PDe=0;function DDe(e,a){BDe({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:[RDe]},function(o){o.addTimelineLayer({id:Q6,label:"Vuex Mutations",color:ek}),o.addTimelineLayer({id:l0,label:"Vuex Actions",color:ek}),o.addInspector({id:ks,label:"Vuex",icon:"storage",treeFilterPlaceholder:"Filter stores..."}),o.on.getInspectorTree(function(s){if(s.app===e&&s.inspectorId===ks)if(s.filter){var n=[];sk(n,a._modules.root,s.filter,""),s.rootNodes=n}else s.rootNodes=[ok(a._modules.root,"")]}),o.on.getInspectorState(function(s){if(s.app===e&&s.inspectorId===ks){var n=s.nodeId;K6(a,n),s.state=vDe(HDe(a._modules,n),n==="root"?a.getters:a._makeLocalGettersCache,n)}}),o.on.editInspectorState(function(s){if(s.app===e&&s.inspectorId===ks){var n=s.nodeId,i=s.path;n!=="root"&&(i=n.split("/").filter(Boolean).concat(i)),a._withCommit(function(){s.set(a._state.data,i,s.state.value)})}}),a.subscribe(function(s,n){var i={};s.payload&&(i.payload=s.payload),i.state=n,o.notifyComponentUpdate(),o.sendInspectorTree(ks),o.sendInspectorState(ks),o.addTimelineEvent({layerId:Q6,event:{time:Date.now(),title:s.type,data:i}})}),a.subscribeAction({before:function(s,n){var i={};s.payload&&(i.payload=s.payload),s._id=PDe++,s._time=Date.now(),i.state=n,o.addTimelineEvent({layerId:l0,event:{time:s._time,title:s.type,groupId:s._id,subtitle:"start",data:i}})},after:function(s,n){var i={},r=Date.now()-s._time;i.duration={_custom:{type:"duration",display:r+"ms",tooltip:"Action duration",value:r}},s.payload&&(i.payload=s.payload),i.state=n,o.addTimelineEvent({layerId:l0,event:{time:Date.now(),title:s.type,groupId:s._id,subtitle:"end",data:i}})}})})}var ek=8702998,LDe=6710886,jDe=16777215,tk={label:"namespaced",textColor:jDe,backgroundColor:LDe};function ak(e){return e&&e!=="root"?e.split("/").slice(-2,-1)[0]:"Root"}function ok(e,a){return{id:a||"root",label:ak(a),tags:e.namespaced?[tk]:[],children:Object.keys(e._children).map(function(o){return ok(e._children[o],a+o+"/")})}}function sk(e,a,o,s){s.includes(o)&&e.push({id:s||"root",label:s.endsWith("/")?s.slice(0,s.length-1):s||"Root",tags:a.namespaced?[tk]:[]}),Object.keys(a._children).forEach(function(n){sk(e,a._children[n],o,s+n+"/")})}function vDe(e,a,o){a=o==="root"?a:a[o];var s=Object.keys(a),n={state:Object.keys(e.state).map(function(r){return{key:r,editable:!0,value:e.state[r]}})};if(s.length){var i=MDe(a);n.getters=Object.keys(i).map(function(r){return{key:r.endsWith("/")?ak(r):r,editable:!1,value:c0(function(){return i[r]})}})}return n}function MDe(e){var a={};return Object.keys(e).forEach(function(o){var s=o.split("/");if(s.length>1){var n=a,i=s.pop();s.forEach(function(r){n[r]||(n[r]={_custom:{value:{},display:r,tooltip:"Module",abstract:!0}}),n=n[r]._custom.value}),n[i]=c0(function(){return e[o]})}else a[o]=c0(function(){return e[o]})}),a}function HDe(e,a){var o=a.split("/").filter(function(s){return s});return o.reduce(function(s,n,i){var r=s[n];if(!r)throw new Error('Missing module "'+n+'" for path "'+a+'".');return i===o.length-1?r:r._children},a==="root"?e:e.root._children)}function c0(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)||{}},nk={namespaced:{configurable:!0}};nk.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){_o(this._children,e)},Zt.prototype.forEachGetter=function(e){this._rawModule.getters&&_o(this._rawModule.getters,e)},Zt.prototype.forEachAction=function(e){this._rawModule.actions&&_o(this._rawModule.actions,e)},Zt.prototype.forEachMutation=function(e){this._rawModule.mutations&&_o(this._rawModule.mutations,e)},Object.defineProperties(Zt.prototype,nk);var bo=function(e){this.register([],e,!1)};bo.prototype.get=function(e){return e.reduce(function(a,o){return a.getChild(o)},this.root)},bo.prototype.getNamespace=function(e){var a=this.root;return e.reduce(function(o,s){return a=a.getChild(s),o+(a.namespaced?s+"/":"")},"")},bo.prototype.update=function(e){ik([],this.root,e)},bo.prototype.register=function(e,a,o){var s=this;o===void 0&&(o=!0),process.env.NODE_ENV!=="production"&&ck(e,a);var n=new Zt(a,o);if(e.length===0)this.root=n;else{var i=this.get(e.slice(0,-1));i.addChild(e[e.length-1],n)}a.modules&&_o(a.modules,function(r,c){s.register(e.concat(c),r,o)})},bo.prototype.unregister=function(e){var a=this.get(e.slice(0,-1)),o=e[e.length-1],s=a.getChild(o);if(!s){process.env.NODE_ENV!=="production"&&console.warn("[vuex] trying to unregister module '"+o+"', which is not registered");return}s.runtime&&a.removeChild(o)},bo.prototype.isRegistered=function(e){var a=this.get(e.slice(0,-1)),o=e[e.length-1];return a?a.hasChild(o):!1};function ik(e,a,o){if(process.env.NODE_ENV!=="production"&&ck(e,o),a.update(o),o.modules)for(var s in o.modules){if(!a.getChild(s)){process.env.NODE_ENV!=="production"&&console.warn("[vuex] trying to add a new module '"+s+"' on hot reloading, manual reload is needed");return}ik(e.concat(s),a.getChild(s),o.modules[s])}}var rk={assert:function(e){return typeof e=="function"},expected:"function"},UDe={assert:function(e){return typeof e=="function"||typeof e=="object"&&typeof e.handler=="function"},expected:'function or object with "handler" function'},lk={getters:rk,mutations:rk,actions:UDe};function ck(e,a){Object.keys(lk).forEach(function(o){if(a[o]){var s=lk[o];_o(a[o],function(n,i){Xt(s.assert(n),GDe(e,o,i,n,s.expected))})}})}function GDe(e,a,o,s,n){var i=a+" should be "+n+' but "'+a+"."+o+'"';return e.length>0&&(i+=' in module "'+e.join(".")+'"'),i+=" is "+JSON.stringify(s)+".",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 s=a.plugins;s===void 0&&(s=[]);var n=a.strict;n===void 0&&(n=!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 bo(a),this._modulesNamespaceMap=Object.create(null),this._subscribers=[],this._makeLocalGettersCache=Object.create(null),this._devtools=i;var r=this,c=this,g=c.dispatch,d=c.commit;this.dispatch=function(m,h){return g.call(r,m,h)},this.commit=function(m,h,y){return d.call(r,m,h,y)},this.strict=n;var l=this._modules.root.state;Gc(this,l,[],this._modules.root),i0(this,l),s.forEach(function(m){return m(o)})},d0={state:{configurable:!0}};St.prototype.install=function(e,a){e.provide(a||xDe,this),e.config.globalProperties.$store=this;var o=this._devtools!==void 0?this._devtools:process.env.NODE_ENV!=="production"||!1;o&&DDe(e,this)},d0.state.get=function(){return this._state.data},d0.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 s=this,n=Wc(e,a,o),i=n.type,r=n.payload,c=n.options,g={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(g,s.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,s=Wc(e,a),n=s.type,i=s.payload,r={type:n,payload:i},c=this._actions[n];if(!c){process.env.NODE_ENV!=="production"&&console.error("[vuex] unknown action type: "+n);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 g=c.length>1?Promise.all(c.map(function(d){return d(i)})):c[0](i);return new Promise(function(d,l){g.then(function(m){try{o._actionSubscribers.filter(function(h){return h.after}).forEach(function(h){return h.after(r,o.state)})}catch(h){process.env.NODE_ENV!=="production"&&(console.warn("[vuex] error in after action subscribers: "),console.error(h))}d(m)},function(m){try{o._actionSubscribers.filter(function(h){return h.error}).forEach(function(h){return h.error(r,o.state,m)})}catch(h){process.env.NODE_ENV!=="production"&&(console.warn("[vuex] error in error action subscribers: "),console.error(h))}l(m)})})},St.prototype.subscribe=function(e,a){return Z6(e,this._subscribers,a)},St.prototype.subscribeAction=function(e,a){var o=typeof e=="function"?{before:e}:e;return Z6(o,this._actionSubscribers,a)},St.prototype.watch=function(e,a,o){var s=this;return process.env.NODE_ENV!=="production"&&Xt(typeof e=="function","store.watch only accepts a function."),t.watch(function(){return e(s.state,s.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),Gc(this,this.state,e,this._modules.get(e),o.preserveState),i0(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=r0(a.state,e.slice(0,-1));delete o[e[e.length-1]]}),Y6(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),Y6(this,!0)},St.prototype._withCommit=function(e){var a=this._committing;this._committing=!0,e(),this._committing=a},Object.defineProperties(St.prototype,d0);var WDe=JDe(function(e,a){var o={};return process.env.NODE_ENV!=="production"&&!dk(a)&&console.error("[vuex] mapMutations: mapper parameter must be either an Array or an Object"),qDe(a).forEach(function(s){var n=s.key,i=s.val;o[n]=function(){for(var r=[],c=arguments.length;c--;)r[c]=arguments[c];var g=this.$store.commit;if(e){var d=XDe(this.$store,"mapMutations",e);if(!d)return;g=d.context.commit}return typeof i=="function"?i.apply(this,[g].concat(r)):g.apply(this.$store,[i].concat(r))}}),o});function qDe(e){return dk(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 dk(e){return Array.isArray(e)||X6(e)}function JDe(e){return function(a,o){return typeof a!="string"?(o=a,a=""):a.charAt(a.length-1)!=="/"&&(a+="/"),e(a,o)}}function XDe(e,a,o){var s=e._modulesNamespaceMap[o];return process.env.NODE_ENV!=="production"&&!s&&console.error("[vuex] module namespace not found in "+a+"(): "+o),s}const ZDe="/icn-play.svg",YDe="/icn-tiros-de-esquina.svg",KDe="/icn-tiro-a-porteria.svg",QDe="/icn-cambio.svg",eLe="/icn-falta.svg",tLe="/atajada.svg",aLe="/fuera-de-lugar.svg",m0="/gol.svg",oLe="/var.png",sLe="/tiempo-agregado.svg",nLe="/jugada-peligrosa.svg",iLe="/penal-marcado.svg",rLe="/penal-fallado.svg",lLe="/inicia-el-partido.svg",cLe="/fin-del-partido.svg",dLe="/icn-tarjeta-amarilla.svg",mLe="/icn-tarjeta-roja.svg",pLe=[1,2,3,4,6],hLe={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 s0.GOAL_IDS.includes(a)?(e.push("is-main-event"),e.push("goal")):s0.YELLOW_CARD_IDS.includes(a)?(e.push("is-main-event"),e.push("yellow-card")):s0.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=>bDe(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||pLe.includes(this.gameEvent.event_type_id)?"":this.gameEvent.player_name}},watch:{width(){this.emitHeight()},gameEvent:{deep:!0,handler(){this.gameEventKey++}}},methods:{...WDe("general",["setVideoModalVisibility","setVideoSrc"]),thumbnailClick(e,a){(a==="Gol"||a==="Tarjeta")&&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})}}},gLe=e=>(t.pushScopeId("data-v-f8cd0c73"),e=e(),t.popScopeId(),e),yLe={class:"time-line-event__details"},uLe={width:"127",preload:"metadata",style:{"border-radius":"8px"}},fLe=["src"],_Le=gLe(()=>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)),bLe={class:"time-line-event__details__info"},wLe={key:0,class:"time-line-event__details__info__header__players"},CLe={class:"time-line-event__details__info__header__players__div-img"},kLe=["src"],SLe={class:"time-line-event__details__info__body"},ELe={class:"time-line-event__details__info__body__comment"},NLe={class:"time-line-event__minute__container"},$Le={class:"time-line-event__minute__container__text"},BLe={class:"time-line-event__minute__container__icon-container"},xLe={class:"time-line-event__minute__container__icon-container__icon"},VLe={key:0,src:YDe,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},ILe={key:1,src:KDe,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},ALe={key:2,src:QDe,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},OLe={key:3,src:eLe,class:"time-line-event__minute__container__icon-container__icon__img",alt:"Event icon"},TLe={key:4,src:tLe,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},zLe={key:5,src:aLe,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},FLe={key:6,src:m0,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},RLe={key:7,src:m0,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},PLe={key:8,src:m0,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},DLe={key:9,src:oLe,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},LLe={key:10,src:sLe,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},jLe={key:11,src:nLe,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},vLe={key:12,src:iLe,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},MLe={key:13,src:rLe,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},HLe={key:14,src:lLe,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},ULe={key:15,src:cLe,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},GLe={key:16,src:dLe,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},WLe={key:17,src:mLe,class:"time-line-event__minute__container__icon-container__icon__img",alt:"Event icon"},qLe={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 JLe(e,a,o,s,n,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:n.gameEventKey},[t.createElementVNode("div",yLe,[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",uLe,[t.createElementVNode("source",{src:o.gameEvent.video_link+"#t=0.1",type:"video/mp4"},null,8,fLe)]),_Le])):t.createCommentVNode("",!0),t.createElementVNode("div",bLe,[t.createElementVNode("div",{class:t.normalizeClass(["time-line-event__details__info__header",i.teamTypeClasses2])},[o.gameEvent.video_link=="-"?(t.openBlock(),t.createElementBlock("div",wLe,[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",CLe,[t.createElementVNode("img",{src:r,alt:""},null,8,kLe)])],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:ZDe,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",SLe,[t.createElementVNode("div",ELe,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",NLe,[t.createElementVNode("div",$Le,t.toDisplayString(o.gameEvent.minute)+"'",1),t.createElementVNode("div",BLe,[t.createElementVNode("div",xLe,[o.gameEvent.category_id==18?(t.openBlock(),t.createElementBlock("img",VLe)):o.gameEvent.category_id==20?(t.openBlock(),t.createElementBlock("img",ILe)):o.gameEvent.category_id==10?(t.openBlock(),t.createElementBlock("img",ALe)):o.gameEvent.category_id==21?(t.openBlock(),t.createElementBlock("img",OLe)):o.gameEvent.category_id==27?(t.openBlock(),t.createElementBlock("img",TLe)):o.gameEvent.category_id==17?(t.openBlock(),t.createElementBlock("img",zLe)):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",FLe)):o.gameEvent.category_id==4?(t.openBlock(),t.createElementBlock("img",RLe)):o.gameEvent.category_id==13||o.gameEvent.category_id==16?(t.openBlock(),t.createElementBlock("img",PLe)):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",DLe)):o.gameEvent.category_id==28?(t.openBlock(),t.createElementBlock("img",LLe)):o.gameEvent.category_id==26?(t.openBlock(),t.createElementBlock("img",jLe)):o.gameEvent.category_id==22?(t.openBlock(),t.createElementBlock("img",vLe)):o.gameEvent.category_id==15||o.gameEvent.category_id==23?(t.openBlock(),t.createElementBlock("img",MLe)):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",HLe)):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",ULe)):o.gameEvent.category_id==8?(t.openBlock(),t.createElementBlock("img",GLe)):o.gameEvent.category_id==9?(t.openBlock(),t.createElementBlock("img",WLe)):(t.openBlock(),t.createElementBlock("img",qLe))])])])],2)],6)}const XLe=ii(hLe,[["render",JLe],["__scopeId","data-v-f8cd0c73"]]),ZLe={"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"},YLe={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 qc=null;const KLe={name:"TimeLine",components:{Tooltip:yDe,TimeLineEvent:XLe},mixins:[fDe],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":ZLe[`${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 G6.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)qc=new ResizeObserver(()=>{this.timeLineWidth=this.$refs.timeLine.clientWidth}),qc.observe(this.$refs.timeLine);else throw new Error("Resize observer not supported!")},updateContainerHeight(e,a){const o=this.$refs[`gameEventDiv${a}`][0],s=this.$refs[`gameEventLine${a}`]?this.$refs[`gameEventLine${a}`][0]:null,n=e+12;o&&(o.style.height=`${n}px`),s&&(s.style.height=`${n}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=YLe[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 _De(a)},thumbnailClick(e){this.dataVideo.link=e,this.dataVideo.visible=!0}},mounted(){this.$nextTick(()=>{this.setUpResizeObserver()})},beforeUnmount(){qc&&qc.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)}}},mk=e=>(t.pushScopeId("data-v-a31f9d54"),e=e(),t.popScopeId(),e),QLe={ref:"timeLine",class:"time-line"},eje={class:"time-line__header"},tje={class:"time-line__header__dot"},aje={class:"time-line__header__dot__home-team team-logo"},oje=["src"],sje={class:"time-line__header__dot__away-team team-logo"},nje=["src"],ije={class:"time-line__game-events"},rje={key:1,class:"start-line"},lje=mk(()=>t.createElementVNode("div",null,null,-1)),cje=mk(()=>t.createElementVNode("div",null,null,-1)),dje=[lje,cje],mje={key:1,class:"noEventText"},pje={class:"tooltip-data"},hje=["src"];function gje(e,a,o,s,n,i){const r=t.resolveComponent("TimeLineEvent"),c=t.resolveComponent("Tooltip");return t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createElementVNode("div",QLe,[t.createElementVNode("div",eje,[t.createElementVNode("div",tje,[t.createElementVNode("div",aje,[t.createElementVNode("img",{src:i.getTeamLogoSrc("homeTeam"),alt:""},null,8,oje)]),t.createElementVNode("div",sje,[t.createElementVNode("img",{src:i.getTeamLogoSrc("awayTeam"),alt:""},null,8,nje)])])]),t.createElementVNode("div",ije,[o.gameData.status!==4?(t.openBlock(),t.createBlock(t.TransitionGroup,{key:0,name:n.transitionName,tag:"div"},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(i.gameEventsToShow,(g,d)=>(t.openBlock(),t.createElementBlock("div",{class:"time-line__game-events__grid",key:g.play_id},[t.createElementVNode("div",{ref_for:!0,ref:`gameEventDiv${d}`,class:t.normalizeClass(i.getGameEventClassAndSetIcon(g,d))},[t.createElementVNode("div",{class:t.normalizeClass(i.getEventContainerClass(g))},[t.createVNode(r,{"game-event":g,"is-mobile":i.isMobile,"time-line-width":n.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",rje,dje)):t.createCommentVNode("",!0)],2)]))),128))]),_:1},8,["name"])):(t.openBlock(),t.createElementBlock("div",mje," Aún no comienza el partido "))])],512),t.createVNode(c,{data:n.dataVideo},{default:t.withCtx(()=>[t.createElementVNode("div",pje,[t.createElementVNode("div",null,[t.createElementVNode("video",{class:"tooltip-video",controls:"",autoplay:"",src:n.dataVideo.link,format:"video/mp4"},null,8,hje)])])]),_:1},8,["data"])],64)}const yje=ii(KLe,[["render",gje],["__scopeId","data-v-a31f9d54"]]),uje={class:"game-time-line__options"},fje={class:"game-time-line__timeline"},_je={__name:"GSC-GameTimeLine",props:{game:{type:Object,default:()=>({id:79601,seasonId:1772,status:1,dateTimeUTC:"2023-10-01T22:20:00Z",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){G6.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 s=null;const n=t.ref(["Todo","1er tiempo","2do tiempo"]),i=t.ref("Todo"),r=t.ref({}),c=t.ref(null),g=t.ref(0),d=t.computed(()=>{let p="all";return i.value==="1er tiempo"||i.value==="1er"?p="firstHalf":(i.value==="2do tiempo"||i.value==="2do")&&(p="secondHalf"),p}),l=t.computed(()=>g.value<500);function m(p){i.value=p}function h(p){r.value=p}function y(){if(window.ResizeObserver)s=new ResizeObserver(()=>{g.value=c.value.clientWidth}),s.observe(c.value);else throw new Error("Resize observer not supported!")}return t.onMounted(()=>{y()}),t.onBeforeUnmount(()=>{s&&s.unobserve(c.value)}),(p,u)=>(t.openBlock(),t.createElementBlock("div",{ref_key:"gameTimeLine",ref:c,class:"game-time-line"},[t.createElementVNode("div",uje,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(n.value,f=>(t.openBlock(),t.createElementBlock("div",{key:f,class:"game-time-line__options__option"},[t.createVNode(XRe,t.mergeProps(g.value<390?o.value:a.value,{text:f=="Todo"?f:g.value<390?f.substring(0,3):f,"is-active":i.value===f,onClick:_=>m(f)}),null,16,["text","is-active","onClick"])]))),128))]),t.createElementVNode("div",fje,[t.createVNode(yje,{"game-data":e.game,"time-line-period":d.value,"is-mobile":l.value,onGameEventsByPeriodFilled:h},null,8,["game-data","time-line-period","is-mobile"])])],512))}},bje=ii(_je,[["__scopeId","data-v-52261d5c"]]);function wje(e){const a=t.ref({width:0,height:0});function o(){const s=e.value.getBoundingClientRect();a.value.width=s.width,a.value.height=s.height}return t.onMounted(()=>{o(),window.addEventListener("resize",o)}),t.onUnmounted(()=>{window.removeEventListener("resize",o)}),{elementSize:a}}const Cje=(e,a)=>{const o=e.__vccOpts||e;for(const[s,n]of a)o[s]=n;return o},p0={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)}}},pk=()=>{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}))},hk=p0.setup;p0.setup=hk?(e,a)=>(pk(),hk(e,a)):pk;const kje={ref:"gscScrollableContainer",class:"scrollable-container"},Sje={class:"scrollable-arrows"},Eje=["width","height","viewBox"],Nje=["stroke"],$je={class:"scrollable-wrapper"},Bje={class:"scrollable-arrows"},xje=["width","height","viewBox"],Vje=["stroke"];function Ije(e,a,o,s,n,i){return t.openBlock(),t.createElementBlock("div",kje,[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",Sje,[(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,Nje)],8,Eje))])],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",$je,[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",Bje,[(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,Vje)],8,xje))])],2)):t.createCommentVNode("",!0)],512)}const Aje=Cje(p0,[["render",Ije],["__scopeId","data-v-b548a08d"]]),Oje=(e,a)=>{const o=e.__vccOpts||e;for(const[s,n]of a)o[s]=n;return o},h0={components:{GSCSlider:Aje},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}=wje(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}}},gk=()=>{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}))},yk=h0.setup;h0.setup=yk?(e,a)=>(gk(),yk(e,a)):gk;const Tje={ref:"myDivRef"},zje={key:0,class:"gs-switch-container"},Fje=["onClick"],Rje={key:1,class:"gs-switch-container-type"},Pje=["onClick"],Dje={key:2,class:"gs-switch-container-carousel"},Lje=["onClick"];function jje(e,a,o,s,n,i){const r=t.resolveComponent("GSCSlider");return t.openBlock(),t.createElementBlock("div",Tje,[o.type==0?(t.openBlock(),t.createElementBlock("div",zje,[t.createElementVNode("div",{class:"gs-switch-container__control",style:t.normalizeStyle([i.customGrid(s.elementSize)])},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.buttons,(c,g)=>(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:g,onClick:d=>(o.selectedOption=c,i.clickEmitEvent(c))},t.toDisplayString(c),13,Fje))),128))],4),t.renderSlot(e.$slots,o.selectedOption,{},void 0,!0)])):t.createCommentVNode("",!0),o.type==1?(t.openBlock(),t.createElementBlock("div",Rje,[t.createElementVNode("div",{class:"gs-switch-container-type__control",style:t.normalizeStyle([i.customGrid(s.elementSize)])},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.buttons,(c,g)=>(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:g,onClick:d=>(o.selectedOption=c,i.clickEmitEvent(c))},t.toDisplayString(c),13,Pje))),128))],4)])):t.createCommentVNode("",!0),o.type==2?(t.openBlock(),t.createElementBlock("div",Dje,[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,g)=>(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:g,onClick:d=>(o.selectedOption=c,i.clickEmitEvent(c))},t.toDisplayString(c),13,Lje))),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 uk=Oje(h0,[["render",jje],["__scopeId","data-v-8a86dfaf"]]),QMe="",vje={class:"game-data__header"},Mje={class:"game-data__header__tournament-season-dropdown"},Hje={class:"game-data__header__teams-carousel"},Uje={class:"game-data__body"},Gje={class:"game-data__body__menu"},Wje={class:"game-data__body__menu__contmenuswitch"};Li.defaults.headers.common.Authorization="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MCwibmFtZSI6IlVzdWFyaW8gRnJlZSIsInVzZXJuYW1lIjoiZnJlZUBnb2xzdGF0cy5jb20iLCJlbWFpbCI6ImZyZWVAZ29sc3RhdHMuY29tIiwiaWF0IjoxNjA2NzU4Nzk1LCJleHAiOjE2MzgyOTQ3OTV9.kPNmP7yDtk38cAXrUyc7OHRh6J25VFqy-XUNzbK-4YE";const qje=t.defineComponent({name:"TemplateVideos",components:{StatisticsMain:wT,GSCGameTimeLine:bje,GscSwitchComponent:uk,GSCLineupsMain:OX,GSCDatosGSMain:xne,GSCVideoGame:L0e,GSCSummaryMain:qRe}}),Jje=Ae(Object.assign(qje,{props:{currentSeasonId:{type:Number,default:0},defaultGameId:{type:Number,default:0,validator(e){return!Number.isNaN(e)&&e>=0}}},emits:["openmedia","change-season-id"],setup(e,{emit:a}){const o=e,s=t.ref({season:[]}),n=t.ref({}),i=t.ref({}),r=t.ref(!0),c=t.ref("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MCwibmFtZSI6IlVzdWFyaW8gRnJlZSIsInVzZXJuYW1lIjoiZnJlZUBnb2xzdGF0cy5jb20iLCJlbWFpbCI6ImZyZWVAZ29sc3RhdHMuY29tIiwiaWF0IjoxNjA2NzU4Nzk1LCJleHAiOjE2MzgyOTQ3OTV9.kPNmP7yDtk38cAXrUyc7OHRh6J25VFqy-XUNzbK-4YE"),g=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),m=t.ref(0),h=t.ref(g.value[0]);let y=t.ref("");const p=t.computed(()=>{const $=[];return n.value&&n.value.id&&($.push({id:n.value.id,name:n.value.name,type:n.value.type}),n.value.related_seasons&&n.value.related_seasons.forEach(F=>{$.push({id:F.id,type:F.type})})),$});function u(){d=new ResizeObserver($=>{for(const F of $)m.value=F.contentRect.width}),d.observe(l.value)}const f=t.computed(()=>{let $={};return i.value&&i.value.game_id&&($={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}),$});function _($){s.value=$,$.is_captured===0?r.value=!1:r.value=!0,s.value.id!==$.id&&(s.value=$)}function k($){a("openmedia",$)}function C($){V($),$=="Estadísticas"&&(y.value="Comparativa")}function b(){y.value=""}function E($){n.value.id!==$.id&&(n.value=$,a("change-season-id",$.id))}const x=t.computed(()=>g.value.map($=>{if(r.value)return $.name;if($.id!==5&&$.id!==6)return $.name}).filter($=>$!=null));function V($){h.value=g.value.find(F=>F.name===$)||g.value[0]}t.onMounted(()=>{u()});function B($){i.value=$}return($,F)=>(t.openBlock(),t.createElementBlock("div",{class:"game-data",ref_key:"gamedata",ref:l},[t.createElementVNode("div",vje,[t.createElementVNode("div",Mje,[t.createVNode(t.unref(r7),{"current-season-id":e.currentSeasonId,onInput:_},null,8,["current-season-id"]),t.createVNode(t.unref(I7),{"current-season-id":e.currentSeasonId,seasons:s.value.seasons,onInput:E},null,8,["current-season-id","seasons"])]),t.createElementVNode("div",Hje,[t.createVNode(t.unref(LN),{token:c.value,"await-for-seasons":"",seasons:p.value,"is-pagination-visible":!1,"are-games-carousel-type":"",onChangeGameCarousel:B,"default-game-id":o.defaultGameId},null,8,["token","seasons","default-game-id"])])]),t.createElementVNode("div",Uje,[t.createElementVNode("div",Gje,[t.createElementVNode("div",Wje,[t.createVNode(t.unref(uk),{type:2,buttons:x.value,"font-family":"Poppins-Regular","font-size":"16px",width:m.value<400||m.value<700?"max-content":m.value<840||m.value<1050?"155px":"165px","selected-option":h.value.name,borderWidth:"1px",arrow:!1,height:"30px",onInput:V},null,8,["buttons","width","selected-option"])])]),(t.openBlock(),t.createBlock(t.resolveDynamicComponent(h.value.componentName),{game:f.value,subsection:t.unref(y),seasonSelected:n.value,showLineups:r.value,onResetSubsection:b,onOpenmedia:k,onChangeToTab:C},null,40,["game","subsection","seasonSelected","showLineups"]))])],512))}}),[["__scopeId","data-v-7bbaaf14"]]);async function ut({url:e,options:a={},retries:o=3}){return await Li.get(e,a).then(s=>s).catch(s=>o>0?ut({url:e,options:a,retries:o-1}):s)}async function fk({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:s}}=await ut(o);return s}catch(o){if(a)return fk({seasonId:e},!1);throw new Error(o)}}async function Xje({seasonId:e}){try{return(await ut({url:`https://iwxfzq6e2h.execute-api.us-west-2.amazonaws.com/prod/v2/statisticsLeagueBySeason/${e}`})).data.data}catch(a){return Promise.reject(a)}}async function Zje({seasonId:e}){try{return(await ut({url:`https://sqf4rkvoge.execute-api.us-west-2.amazonaws.com/prod/v3/statisticsGroupedBySeason/${e}`})).data.data}catch(a){return Promise.reject(a)}}function Yje(e,a,o,s,n,i,r=!1){const c=o.map(g=>g===1?2:g===2?1:3);return e.filter(g=>{const d=i&&g[n.teamId]?g[n.teamId]!==i:!1,l=a===1?2:1;return(r||s.includes(g[n.gameId]))&&(!a||(d?l:a)===g[n.playingAs])&&(o.includes(g[n.matchResult])&&g[n.teamId]===i||c.includes(g[n.matchResult])&&g[n.teamId]!==i)})}function _k(e,a,o,s,n){return a.length===2&&o.length===3&&s.length===6?e:e.filter(i=>a.includes(i[n.playingAs])&&o.includes(i[n.matchResult])&&s.includes(i[n.section]))}async function bk({seasonId:e}){try{const a=`https://8tvo5bp9ai.execute-api.us-west-2.amazonaws.com/prod/gamesBySeason/${e}`;return(await ut({url:a})).data}catch(a){return Promise.reject(a)}}async function Kje({seasonId:e,gameId:a}){try{const o=`https://iwxfzq6e2h.execute-api.us-west-2.amazonaws.com/prod/v2/statisticsLeagueBySeason/${e}/games/${a}`,{data:s}=await ut({url:o});return s}catch(o){return Promise.reject(o)}}async function Qje({gameId:e}){try{const a=`https://2uj7ojhmt5.execute-api.us-west-2.amazonaws.com/prod/V2/statisticsLive/${e}`;return(await ut({url:a})).data.data}catch(a){return Promise.reject(a)}}async function eve({gameId:e}){try{const a=`https://55sbpmq0f5.execute-api.us-west-2.amazonaws.com/prod/specialMentions/${e}`;return(await ut({url:a})).data.data||[]}catch(a){return Promise.reject(a)}}const tve=["categoryId","matchLapse","section","matchResult","playingAs","total"];let g0=null;function wk(){return g0||(g0=Vi(tve)),g0}async function ave(e){try{const a=`https://d2oco6mqmc.execute-api.us-west-2.amazonaws.com/prod/teamsBySeason/${e.seasonId}`;return(await ut({url:a})).data}catch(a){return Promise.reject(a)}}async function Ck({seasonId:e,teamId:a}){try{return await ut({url:`https://a4dcb6avog.execute-api.us-west-2.amazonaws.com/prod/v2/statisticsTeamBySeason/${e}/${a}`})}catch(o){return Promise.reject(o)}}async function ove(e){try{const a=`https://yjeig444bb.execute-api.us-west-2.amazonaws.com/prod/teamsBySeason/${e.seasonId}`;return await ut({url:a})}catch(a){return Promise.reject(a)}}async function sve(e){try{return await ut({url:`https://nckawv8v3b.execute-api.us-west-2.amazonaws.com/prod/v2/statisticsByGame/${e.gameId}`})}catch(a){return Promise.reject(a)}}const nve={leagueGeneral:{namespaced:!0,state:{seasonPlays:[],currentSeasonGames:[],currentSeasonTeams:[],selectedRound:1,booleanAreLiveGames:!1,booleanIsLiveGamesModalOpen:!1},getters:{seasonPlays:e=>e.seasonPlays,filteredPlaysStack(e,a,o,s){return Yje(e.seasonPlays,s["filterGeneral/getPlayingAs"],s["filterGeneral/getResults"],s["filterGeneral/getSelectedGamesIds"],wk(),s["teamsGeneral/team"].team_id,!0)},nextGamesSchedule(e){const a=e.currentSeasonGames.reduce((o,s)=>{const n={...s};return n.home_team=e.currentSeasonTeams.find(i=>i.team_id===s.home_team),n.visiting_team=e.currentSeasonTeams.find(i=>i.team_id===s.visiting_team),o[s.matchday_abbreviation]?o[s.matchday_abbreviation][s.game_status===3?"canceled":s.date]?o[s.matchday_abbreviation][s.game_status===3?"canceled":s.date].push(n):o[s.matchday_abbreviation][s.game_status===3?"canceled":s.date]=[n]:o[s.matchday_abbreviation]={[s.game_status===3?"canceled":s.date]:[n]},o},{});for(let[o,s]of Object.entries(a))a[o]=Object.entries(s).map(([n,i])=>({date:n,games:i})),a[o].sort((n,i)=>n.date<i.date?-1:n.date>i.date?1:0);return a},matchdaysDates(e,a){let o=[];if(a.nextGamesSchedule){let s=Object.keys(a.nextGamesSchedule);for(let n of s){let i=Number(n.replace("M","")),r=a.nextGamesSchedule[n].map(c=>({matchday:i,date:new Date(c.date)}));o=o.concat(r)}}return o},closestMatchDay(e,a){let o=new Date,s=0,n=-new Date(0,0,0).valueOf(),i=a.matchdaysDates,r=i.length;for(let c=0;c<i.length;c++)s=Math.abs(i[c].date-o),s<n&&(r=c,n=s);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 s=await fk({seasonId:a["filterGeneral/getSeasonId"]});if(o)return s;e("updateSeasonPlays",s)}catch(s){return Promise.reject(s)}},async getCurrentSeasonGames({commit:e,rootGetters:a}){try{const o=await bk({seasonId:a["loginGeneral/seasonId"]});e("updateCurrentSeasonGames",o)}catch(o){return Promise.reject(o)}},async getCurrentSeasonTeams({commit:e,rootGetters:a}){try{const o=await ave({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 s=[void 0,void 0];return e.currentSeasonGames.length===0&&(s[0]=a("getCurrentSeasonGames")),e.currentSeasonTeams.length===0&&(s[1]=a("getCurrentSeasonTeams")),await Promise.all(s),!1}catch(s){throw new Error(s)}}}}};async function ive({filter:e}){try{const a=`https://n7ielynjxk.execute-api.us-east-2.amazonaws.com/qa/filters?filters=${e}`,{data:o}=await ut({url:a});return o}catch(a){return Promise.reject(a)}}const rve=["categoryId","teamId","matchResult","playingAs","matchLapse","section","total"];let y0=null;function lve(){return y0||(y0=Vi(rve)),y0}class Jc{constructor(){Oe(this,"maximumLiveSection",1);Oe(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:[]});Oe(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,s){s&&(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,s){s&&(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,s){for(let n=o-1;n<a.accumulated.length;n++)a.accumulated[n]+=s}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,s){for(let n=a.accumulated.length-1;n>=o-1;n--)a.accumulated[n]-=s}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(s=>s/o)}calculateRanking(a,o,s,n,i,r,c,g){let d=[];n===3&&a&&a.length&&(s.playingAs.length!==2||s.matchResult.length!==3)?d=Array.from(a.reduce((m,h)=>{const y=h[o.playingAs]===1,p=y?"1":"2",u=m.get(h[o.gameId]);if(u)u[p]?u[p].arrayPlays.push(h):u[p]={numberTeamId:h[o.teamId],arrayPlays:[h]};else{const f={numberMatchResult:h[o.matchResult]};y&&(f[1]={numberTeamId:h[o.teamId],arrayPlays:[h]}),m.set(h[o.gameId],f)}return m},new Map).values()).reduce((m,h)=>{const y=s.playingAs.length===2?"both":s.playingAs[0].toString();return(y==="both"&&(h[1].numberTeamId===s.teamId||h[2].numberTeamId===s.teamId)||y!=="both"&&h[y].numberTeamId===s.teamId)&&s.matchResult.includes(h.numberMatchResult)&&m.push(...h[1].arrayPlays,...h[2].arrayPlays),m},[]).filter(m=>s.sections.includes(m[o.section])):(d=a?[...a]:[],c&&a&&(d=a.filter(l=>s.playingAs.includes(l[o.playingAs])&&s.matchResult.includes(l[o.matchResult])&&s.sections.includes(l[o.section])))),this.setTeamRanking(d,n,o,s.teamId,r,"accomplished",g)}setTeamRanking(a,o,s,n,i,r,c){let g=null,d=null;o===3&&(g=new Map,d={},a.forEach(h=>{const y=g.get(h[s.gameId]);y?y[h[s.teamId.toString()]]?y[h[s.teamId.toString()]]+=h[s.total]:y[h[s.teamId.toString()]]=h[s.total]:g.set(h[s.gameId],{[h[s.teamId.toString()]]:h[s.total]})}),Array.from(g.values()).forEach(h=>{const[y,p]=Object.keys(h).map(f=>f),u=h[y]+h[p];this.addPassesAvgByTeam(d,y,u?h[y]/u:0),this.addPassesAvgByTeam(d,p,u?h[p]/u:0)}));const l=i.sort((h,y)=>h.team_id-y.team_id).map(h=>{if(o===3){const y=d[h.team_id.toString()];return{teamId:h.team_id,points:y?y.numberTotalPassesAvg/y.numberGamesCount:0,total:y?y.numberTotalPassesAvg:0}}else{const y=a.reduce((p,u)=>u[s.teamId]===h.team_id&&o===u[s.categoryId]?p+u[s.total]:p,0);return{teamId:h.team_id,points:h[`${c}FilterGames`]?y/h[`${c}FilterGames`]:0,total:y}}}).sort((h,y)=>y.points-h.points);this.accomplished.arrayRankings=l;const m=l.findIndex(h=>h.teamId===n);o===3&&(this.accomplished.avgPreGame=l[m].points),this[r].ranking=m+1,this[r].leader=l[0]}addPassesAvgByTeam(a,o,s){a[o]?(a[o].numberGamesCount+=1,a[o].numberTotalPassesAvg+=s):a[o]={numberGamesCount:1,numberTotalPassesAvg:s}}}class re{constructor(a,o,s,n,i,r,c,g,d,l){Oe(this,"id","");Oe(this,"generalId",0);Oe(this,"name","");Oe(this,"names",{"0-0":"","1-1":"","0-1":"","1-0":""});Oe(this,"mentions",{"0-0":"","1-1":"","0-1":"","1-0":""});Oe(this,"accomplishedCategoryIds",[]);Oe(this,"receivedCategoryIds",[]);Oe(this,"generalCategoriesIds",{accomplished:0,received:0});Oe(this,"specialMention","");Oe(this,"homeTeam",new Jc);Oe(this,"visitingTeam",new Jc);Oe(this,"isLeagueDataCalculated",!1);Oe(this,"leagueAccomplishedMax",0);Oe(this,"leagueReceivedMax",0);Oe(this,"leagueAccomplishedAvg",0);Oe(this,"leagueReceivedAvg",0);Oe(this,"leagueAccomplishedAccumulator",0);Oe(this,"leagueReceivedAccumulator",0);Oe(this,"homeTeamType","homeTeam");Oe(this,"visitingTeamType","visitingTeam");Oe(this,"betOnly",!1);Oe(this,"isPercent",!1);this.id=`${s.accomplished}-${s.received}`,this.accomplishedCategoryIds=a||[],this.receivedCategoryIds=o||[],this.generalCategoriesIds=s||{accomplished:0,received:0},this.name=n,this.names["0-0"]=n||"",this.names["1-1"]=i||"",this.names["0-1"]=r||"",this.names["1-0"]=c||"",this.generalId=g||0,this.betOnly=d||!1,this.isPercent=l||!1}addLeaguePlays(a,o,s){a.length===0||!s||this.isLeagueDataCalculated||(a.forEach(n=>{this.isAccomplishedLeaguePlay(n[o.categoryId])&&(this.leagueAccomplishedAccumulator+=n[o.total]),this.isReceivedLeaguePlay(n[o.categoryId])&&(this.leagueReceivedAccumulator+=n[o.total])}),this.leagueAccomplishedAvg=(this.leagueAccomplishedAccumulator/(2*s)).toFixed(2),this.leagueAccomplishedMax=Math.round(this.leagueAccomplishedAvg*1.5),this.leagueReceivedAvg=(this.leagueReceivedAccumulator/(2*s)).toFixed(2),this.leagueReceivedMax=Math.round(this.leagueReceivedAvg*1.5),this.isLeagueDataCalculated=!0)}addSpecialMention(a,o,s){let n="-";for(const[i,r]of Object.entries(this.generalCategoriesIds))a===r&&(n=`${i==="accomplished"?"0":"1"}${n}`),o===r&&(n=`${n}${i==="accomplished"?"0":"1"}`);n.length===3&&(this.mentions[n]=s)}resetMentions(){this.mentions={"0-0":"","1-1":"","0-1":"","1-0":""}}addTeamPlays(a,o,s,n,i){!s||!i||a!==this.homeTeamType&&a!==this.visitingTeamType||(s.forEach(r=>{this.isAccomplishedPlay(r[n.categoryId])?this[a].increaseAccomplishedByOne(r[n.section],r[n.total]):this.isReceivedPlay(r[n.categoryId])&&this[a].increaseReceivedByOne(r[n.section],r[n.total])}),this[a].calculateAvg(i))}addLivePlay(a,o,s,n,i=!1,r=!1){(a===this.homeTeamType||a===this.visitingTeamType)&&s[n.categoryId].includes(this.generalCategoriesIds.accomplished)&&this[a].increaseAccomplishedByOne(s[n.section],s[n.total],!0)}subtractLivePlay(a,o,s,n,i){(a===this.homeTeamType||a===this.visitingTeamType)&&(this.isAccomplishedPlay(s[n.categoryId])&&!i?this[a].decreaseAccomplishedLiveByOne(s[n.section],s[n.total]):this.isReceivedPlay(s[n.categoryId])&&i&&this[a].decreaseReceivedLiveByOne(s[n.section],s[n.total]))}isAccomplishedLeaguePlay(a){return!!(this.receivedCategoryIds[0]===40?this.receivedCategoryIds:this.accomplishedCategoryIds).find(s=>a===s||`${a}_r`===s)}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,s,n,i,r=!1){this[this.homeTeamType].calculateRanking(a,o,s,this.generalCategoriesIds.accomplished,this.generalCategoriesIds.received,i,r,this.homeTeamType),this[this.visitingTeamType].calculateRanking(a,o,n,this.generalCategoriesIds.accomplished,this.generalCategoriesIds.received,i,r,this.visitingTeamType)}resetData(){this.homeTeam=new Jc,this.visitingTeam=new Jc,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 cve={general:{name:"General",priority:1,parentInfo:{parentAnalysis:[1],analysisTypeBlocks:[1]},subcategories:{goals:new re([12,55,"35_r","54_r"],null,{accomplished:1,received:0},"Goles","Goles recibidos","Goles realizados / recibidos","Goles recibidos / realizados",1),shotToGoal:new re([91,95,158,167,176,343,330,333,423],null,{accomplished:2,received:0},"Remates a destino","","","",1),possession:new re([2,3,20,21],null,{accomplished:3,received:0},"Posesión","","","",1,!1,!0),yellowCards:new re([14,52],null,{accomplished:4,received:0},"Tarjetas amarillas","","","",1),redCards:new re([15,53],null,{accomplished:5,received:0},"Tarjetas rojas","","","",1),centerCrosses:new re([13,25],null,{accomplished:6,received:0},"Centros totales","","","",1)}},offensive:{name:"Ofensivo",priority:2,parentInfo:{parentAnalysis:[1],analysisTypeBlocks:[1]},subcategories:{shotsOnGoal:new re([19],null,{accomplished:7,received:0},"Tiros a gol","","","",1),shotsOnGoalDestination:new re([91,95],null,{accomplished:8,received:0},"Tiros a gol destino","","","",1),shotToGoal:new re([91,95,158,167,176,343,330,333,423],null,{accomplished:2,received:0},"Remates a destino","","","",1),ballsWonOpponentPenaltyBox:new re([11],null,{accomplished:10,received:0},"Balones ganados área rival","","","",1),centersFromRight:new re([25],null,{accomplished:11,received:0},"Centros por derecha","","","",1),centersFromLeft:new re([13],null,{accomplished:12,received:0},"Centros por izquierda","","","",1),success1VS1:new re([4],null,{accomplished:13,received:0},"Enfrentamientos ofensivos exitosos","","","",1),unsuccess1VS1:new re([209],null,{accomplished:14,received:0},"Enfrentamientos ofensivos no exitosos","","","",1)}},defensive:{name:"Defensivo",priority:3,parentInfo:{parentAnalysis:[1],analysisTypeBlocks:[1]},subcategories:{saves:new re([39],null,{accomplished:15,received:0},"Atajadas","","","",1),ballsWonOwnPenaltyBox:new re([23],null,{accomplished:16,received:0},"Balones ganados área propia","","","",1),success1VS1:new re([5],null,{accomplished:17,received:0},"Enfrentamientos defensivos exitosos","","","",1),unsuccess1VS1:new re([209],null,{accomplished:18,received:0},"Enfrentamientos defensivos no exitosos","","","",1),aerialGame:new re([24],null,{accomplished:19,received:0},"Juego aéreo resto del campo","","","",1),clearances:new re([34],null,{accomplished:20,received:0},"Rechaces","","","",1)}},possession:{name:"Posesión",priority:4,parentInfo:{parentAnalysis:[1],analysisTypeBlocks:[1]},subcategories:{totalPasses:new re([2,3,20,21],null,{accomplished:21,received:0},"Pases totales","","","",1),successPasses:new re([2,20],null,{accomplished:22,received:0},"Pases acertados","","","",1),successPassesRivalHalf:new re([20],null,{accomplished:23,received:0},"Pases acertados en cancha rival","","","",1),ballsRecoveredInChallenge:new re([483],null,{accomplished:24,received:0},"Balones recuperados en disputa","","","",1),ballsRecoveredWithoutChallenge:new re([484],null,{accomplished:25,received:0},"Balones recuperados sin disputa","","","",1),ballsLostInChallenge:new re([494],null,{accomplished:26,received:0},"Balones perdidos en disputa","","","",1),ballsLostWithoutChallenge:new re([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 re([155,164,173,362,371,380],null,{accomplished:28,received:0},"Tiros libres 4/4","","","",1),freeKick34:new re([150,357],null,{accomplished:29,received:0},"Tiros libres 3/4","","","",1),freeKickOwnHalf:new re([149,356],null,{accomplished:30,received:0},"Tiros libres cancha propia","","","",1),cornerFromRight:new re([32],null,{accomplished:31,received:0},"Tiros de esquina por derecha","","","",1),cornerFromLeft:new re([31],null,{accomplished:32,received:0},"Tiros de esquina por izquierda","","","",1),goalKick:new re([264,28],null,{accomplished:33,received:0},"Saques de meta","","","",1)}},penalties:{name:"Infracciones",priority:6,parentInfo:{parentAnalysis:[1],analysisTypeBlocks:[1]},subcategories:{totalFouls:new re([17,50],null,{accomplished:34,received:0},"Faltas totales","","","",1),foulOwnGoal:new re([348,478],null,{accomplished:35,received:0},"Faltas cerca de su propia portería","","","",1),fieldFouls:new re([349,350,479,480],null,{accomplished:36,received:0},"Faltas resto del campo","","","",1),penaltyKick:new re([461,481],null,{accomplished:37,received:0},"Penales cometidos","","","",1),offside:new re([33],null,{accomplished:38,received:0},"Fueras de lugar","","","",1)}}},dve=[{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}],mve=["teamId","categoryId","matchlapse","section","matchResult","playingAs","total","gameId"];let u0=null;function pve(){return u0||(u0=Vi(mve)),u0}const hve=["playId","gameId","teamId","playerId","momentOfPlay","categoryId","categoryType","matchLapse","section","matchResult","playingAs","total","coordinate1X","coordinate1Y","coordinate2X","coordinate2Y","coordinate3X","coordinate3Y"];let f0=null;function gve(){return f0||(f0=Vi(hve)),f0}function Xc(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 kk(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 _0(e,a,o){let s=[...a];return e[o.categoryId]===2&&(s[0]=14),e[o.categoryId]===20&&(s[0]=15),[14,15].includes(s[0])?s:null}const yve=[{name:"Liga MX",id:1},{name:"Liga MX Femenil",id:1001},{name:"Liga Expansión MX",id:1071}],uve={nextGeneral:{namespaced:!0,state:{seasonId:0,pastSeasonId:0,usePastSeasonId:!1,isSocketConnected:!1,indexesLP:wk(),indexesTSP:lve(),indexesLS:pve(),indexesTLP:gve(),nextGamesDataStructure:cve,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 dve.filter(a=>a.parentAnalysis.includes(e.selectedAnalysis.id))},homeTeamFilteredPlays(e){if(e.homeTeamFilter.requiresPlaysFiltering)return _k(e.homeTeamPlays,e.homeTeamFilter.playingAs,e.homeTeamFilter.matchResult,e.homeTeamFilter.sections,e.indexesTSP)},visitingTeamFilteredPlays(e){if(e.visitingTeamFilter.requiresPlaysFiltering)return _k(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 s of Object.values(o.subcategories))e.homeTeamFilter.requiresPlaysFiltering&&s.homeTeam.resetTotals(),e.visitingTeamFilter.requiresPlaysFiltering&&s.visitingTeam.resetTotals(),s.addLeaguePlays(e.currentSeasonPlays,e.indexesLP,e.totalSeasonFinishedGames),s.addTeamPlays(s.homeTeamType,e.gameForAnalysis.home_team,a.homeTeamFilteredPlays,e.indexesTSP,e.showPostMatch?1:a.totalFilteredHomeGames),s.addTeamPlays(s.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,s)=>o.priority-s.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((s,n)=>{if(n.game_status===1&&(n.home_team===o.team_id||n.visiting_team===o.team_id)){const i=n.score[0]-n.score[1],r=n.home_team===o.team_id;s.push({playingAs:r?1:2,matchResult:i===0?3:r?i>0?1:2:i<0?1:2})}return s},[])})},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=Tu(e.homeTeamFilter,a.local,e.gameForAnalysis.home_team),e.visitingTeamFilter=Tu(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(s=>{for(const n of Object.values(s.subcategories))n.resetMentions()}),o.forEach(s=>{for(const n of a)for(const i of Object.values(s.subcategories))i.addSpecialMention(n[0],n[1],n[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 s=Xc(a,e.indexesTLP,e.categoriesMap);for(const n of Object.values(e.nextGamesDataStructure))for(const i of Object.values(n.subcategories))i.addLivePlay(e.gameForAnalysis.home_team===s[e.indexesTSP.teamId]?"homeTeam":"visitingTeam",s[e.indexesTSP.teamId],s,e.indexesTSP,e.isLive,!1)}},updateLiveGamePlay(e,a){const o=!!a[e.indexesTLP.length],s=e.livePlays.get(a[e.indexesTLP.playId]);if(rB(s,a))return;let n="";const i=e.gameForAnalysis.home_team===a[e.indexesTLP.teamId]?"homeTeam":"visitingTeam";s&&(n=e.gameForAnalysis.home_team===s[e.indexesTLP.teamId]?"homeTeam":"visitingTeam");const r=Xc(s,e.indexesTLP,e.categoriesMap),c=_0(s,r,e.indexesTLP),g=Xc(a,e.indexesTLP,e.categoriesMap),d=_0(a,g,e.indexesTLP);for(const l of Object.values(e.nextGamesDataStructure))for(const m of Object.values(l.subcategories))s&&(m.subtractLivePlay(n,r[e.indexesTSP.teamId],r,e.indexesTSP,o),c&&m.subtractLivePlay(n,c[e.indexesTSP.teamId],c,e.indexesTSP,o)),m.addLivePlay(i,g[e.indexesTSP.teamId],g,e.indexesTSP,e.isLive,o),d&&m.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],s=e.livePlays.get(a[e.indexesTLP.playId]);let n="";if(s){n=e.gameForAnalysis.home_team===s[e.indexesTLP.teamId]?"homeTeam":"visitingTeam",e.livePlays.delete(s[e.indexesTLP.playId]);const i=Xc(s,e.indexesTLP,e.categoriesMap),r=_0(a,i,e.indexesTLP);for(const c of Object.values(e.nextGamesDataStructure))for(const g of Object.values(c.subcategories))g.subtractLivePlay(n,i[e.indexesTSP.teamId],i,e.indexesTSP,o),r&&g.subtractLivePlay(n,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 s=[],n=new Map;for(const i of Object.values(e.nextGamesDataStructure))for(const r of Object.values(i.subcategories))s.push(r);a.rankingData.forEach(i=>{for(const r of s)if(r.isInGeneralCategory(i[e.indexesLS.categoryId])){n.has(r.id)?n.get(r.id).push(i):n.set(r.id,[i]);break}})},prepareCleanAllStatistics(e){e.homeTeamFilter.requiresPlaysFiltering=!0,e.visitingTeamFilter.requiresPlaysFiltering=!0},setHomeGames(e,a){e.homeGames=kk(a)},setVisitingGames(e,a){e.visitingGames=kk(a)},generateCategoriesMap(e){for(const a of Object.values(e.nextGamesDataStructure))for(const o of Object.values(a.subcategories))o.accomplishedCategoryIds.forEach(s=>{const n=e.categoriesMap.get(s);n?n.push(o.generalCategoriesIds.accomplished):e.categoriesMap.set(s,[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 sve({gameId:a.gameId});if(r){var o=[],s=[],n={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),s=r.data.data.filter(c=>c[1]==a.awayTeam),n=r.data.games,i=r.data.games),e("updateHomeTeamPlays",o),e("updateVisitingTeamPlays",s),e("setHomeGames",n),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 s=[];e("updateGameForAnalysis",o.gameInfo),s.push(a("setAndGetStatsPostMatch",{gameId:o.game,homeTeam:o.homeTeam,awayTeam:o.awayTeam})),await Promise.all(s)}catch(s){throw new Error(s)}finally{e("setIsSectionLoading",!1,{root:!0})}},async checkState({state:e,dispatch:a,commit:o},{gameId:s,isTeamsAnalysis:n,currentSeasonId:i,isLoginChanged:r=!1,defaultFilter:c=null,gameInfo:g=null,isCupGame:d=!1}){try{let l={},m=e.seasonId!==Number(i);const h=[];o("setIsSectionLoading",!0,{root:!0}),o("setUsePastSeasonId",!1),m&&o("setSeasonId",i),o("updateGameId",Number(s)),e.oldSeasonId!==e.seasonId&&o("resetNextGamesDataStructure");const y=await a("getCurrentSeasonGames",Number(s));if(o("leagueGeneral/updateCurrentSeasonGames",y,{root:!0}),l=y.find(p=>p.game_id===Number(s)),!l&&g&&(l=g),l&&o("updateGameForAnalysis",l),l.game_status!==1&&(d||await a("checkTeamsData",{gameId:s,isFromBet:!!c}),(r||e.oldSeasonId!==e.seasonId||e.statistics.length===0)&&h.push(a("getSeasonStatistics")),(r||e.categoriesMap.size===0)&&o("generateCategoriesMap")),e.usePastSeasonId){const p=await a("getCurrentSeasonGamesLast");o("leagueGeneral/updateCurrentSeasonGames",p,{root:!0})}(r||e.currentSeasonTeams.length===0||!e.currentSeasonTeams.find(p=>l.home_team===p.team_id))&&h.push(a("getCurrentSeasonTeams")),o("setHomeResultGame",l.score[0]),o("setAwayResultGame",l.score[1]),n?l.game_status!==1?(await a("fillStatisticData",{gameId:s,gameinfo:l,promises:h,defaultFilter:c}),o("updateShowPostMatchData",!1)):(o("updateStats",[]),o("updateShowPostMatchData",!0),h.push(a("fillStatisticDataPostMatch",{game:s,homeTeam:l.home_team,awayTeam:l.visiting_team,gameInfo:l})),await Promise.all(h)):o("setIsSectionLoading",!1,{root:!0})}catch(l){return Promise.reject(l)}},async fillStatisticData({commit:e,dispatch:a,getters:o,rootGetters:s,state:n},{gameId:i,gameinfo:r,promises:c=[],defaultFilter:g=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")),g&&c.push(ive(g)),d=await Promise.all(c)}catch(l){throw new Error(l)}finally{setTimeout(()=>{if(e("addRankingInSubcategories",{getters:o,isPremiumAccount:s["loginGeneral/getPremiumAccount"]}),g){const[l]=d.pop();l&&(e("setBetSubcategories",l.categories),e("setBetDescription",l.sectionDescription),e("setDefaultFilter",l.params),e("updateFilterAux"),e("updateFilters",{filters:n.defaultFilter,needsFormat:!1}),a("updateRankingInSubcategories"))}},100),e("setIsSectionLoading",!1,{root:!0})}},async checkTeamsData({state:e,dispatch:a,rootState:o,commit:s},{gameId:n,isFromBet:i}){try{const r=Number(n);if(o.general.tournaments&&o.general.tournaments.length){await a("general/fetchTournaments",null,{root:!0});const c=o.general.tournaments.find(g=>{for(const d of g.seasons)if(d.id===e.seasonId)return!0;return!1});s("general/setTournamentSelected",c||{},{root:!0})}if(e.pastSeasonId){s("nextGeneral/setPastSeasonId",e.pastSeasonId,{root:!0});const c=o.leagueGeneral.currentSeasonGames.find(g=>g.game_id===r);c&&s("updateGameForAnalysis",c),await Promise.all([a("getHomeTeamPlays"),a("getVisitingTeamPlays")]),s("setUsePastSeasonId",i||(!e.homeTeamPlays||e.homeTeamPlays.length===0)&&(!e.visitingTeamPlays||e.visitingTeamPlays.length===0))}else s("setUsePastSeasonId",!1)}catch(r){throw new Error(r)}},async getSpecialMentionsByGame({commit:e},a){try{const o=await eve({gameId:a});e("addSpecialMentions",o)}catch(o){return Promise.reject(o)}},async getCurrentSeasonGames({commit:e,state:a},o){try{const{teams:s,games:n,past_season_id:i,tournament_id:r}=await Kje({seasonId:a.usePastSeasonId?a.pastSeasonId:a.seasonId,gameId:o}),c=yve.find(g=>g.id===r);return c&&e("setCurrentTournamentName",c.name),e("setHome",s[0]),e("setAway",s[1]),a.usePastSeasonId||e("setPastSeasonId",i),await e("updateCurrentSeasonGames",n),n&&Array.isArray(n)&&e("updateFinishedGames",n.reduce((g,d)=>(d.game_status===1&&(g+=1),g),0)),n}catch(s){return Promise.reject(s)}},async getCurrentSeasonGamesLast({commit:e,state:a}){try{const{games:o,past_season_id:s}=await bk({seasonId:a.usePastSeasonId?a.pastSeasonId:a.seasonId});return a.usePastSeasonId||e("setPastSeasonId",s),await e("updateCurrentSeasonGames",o),o&&Array.isArray(o)&&e("updateFinishedGames",o.reduce((n,i)=>(i.game_status===1&&(n+=1),n),0)),o}catch(o){return Promise.reject(o)}},async getCurrentSeasonTeams({commit:e,state:a}){try{const o=await ove({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,s=await Zje({seasonId:o});e("updateSeasonStatistics",s),e("updateOldSeasonId",o)}catch(o){return Promise.reject(o)}},updateRankingInSubcategories({state:e,commit:a,getters:o,rootGetters:s}){e.currentSeasonGames.length>0&&a("addRankingInSubcategories",{getters:o,isPremiumAccount:s["loginGeneral/getPremiumAccount"]})},async getHomeTeamPlays({commit:e,state:a}){try{const o=await Ck({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 Ck({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 Xje({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 s=await Qje({gameId:o});e.livePlays=new Map,s.forEach(n=>{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("addLiveGamePlay",n)})}catch(s){throw new Error(s)}},socket_new({state:e,commit:a},o){const s=o[1];(e.gameForAnalysis.home_team===s[e.indexesTLP.teamId]||e.gameForAnalysis.visiting_team===s[e.indexesTLP.teamId])&&a("addLiveGamePlay",s)},socket_update({state:e,commit:a},o){const s=o[1];e.gameForAnalysis.game_id===s[e.indexesTLP.gameId]&&(e.gameForAnalysis.home_team===s[e.indexesTLP.teamId]||e.gameForAnalysis.visitingTeam===s[e.indexesTLP.teamId])&&a("updateLiveGamePlay",s)},socket_delete({state:e,commit:a},o){const s=o[1];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("deleteLiveGamePlay",s)},exitChannel({state:e,getters:a,rootState:o,rootGetters:s,commit:n}){const i=s["loginGeneral/getPremiumAccount"];a.isLive&&i&&(n("updateShowLiveData",!1),n("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 s of Object.values(o.subcategories))s.homeTeam.resetTotals(),s.visitingTeam.resetTotals(),s.homeTeam.resetTotalsLive(),s.visitingTeam.resetTotalsLive(),s.isBetMainSubcategory=!1;Object.values(e.nextGamesDataStructure).forEach(o=>{for(const s of Object.values(o.subcategories))s.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 s of Object.values(o.subcategories))s.homeTeam.resetTotals(),s.visitingTeam.resetTotals(),s.isBetMainSubcategory=!1;Object.values(e.nextGamesDataStructure).forEach(o=>{for(const s of Object.values(o.subcategories))s.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 fve(){try{const{data:e}=await ut({url:"https://kefloixzy1.execute-api.us-west-2.amazonaws.com/prod/tournaments"});return e}catch(e){throw new Error(e)}}const _ve={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 fve();a("setTournaments",o)}}catch(o){throw new Error(o)}}}};async function bve({seasonId:e,localTeamId:a,visitingTeamId:o}){try{const s=`https://bzznnzehtf.execute-api.us-west-2.amazonaws.com/prod/xg/seasons/${e}/teams/${a}/${o}`;return(await ut({url:s})).data}catch(s){return Promise.reject(s)}}async function wve({seasonId:e,localTeamId:a,visitingTeamId:o}){try{const s=`https://bzznnzehtf.execute-api.us-west-2.amazonaws.com/prod/xg/game/${e}/teams/${a}/${o}`;return(await ut({url:s})).data}catch(s){return Promise.reject(s)}}const Sk=(e,a)=>{let o={};return e.forEach((s,n)=>{n==3&&(a[0]==35||a[0]==54)&&(a[n]==2?a[n]=1:a[n]=2),n==2&&(a[0]==35||a[0]==54)&&(a[n]==1?a[n]=2:a[n]==2&&(a[n]=1)),o[s]=a[n]}),o},Ek=(e,a)=>e.filter(s=>{const n=a.playingAs.includes(s.playing_as),i=a.matchResult.includes(s.match_result),r=a.sections.includes(s.section);return n&&i&&r}),Nk=[{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,s){return typeof s>"u"||+s==0?Math[a](o):(o=+o,s=+s,isNaN(o)||!(typeof s=="number"&&s%1===0)?NaN:(o=o.toString().split("e"),o=Math[a](+(o[0]+"e"+(o[1]?+o[1]-s:-s))),o=o.toString().split("e"),+(o[0]+"e"+(o[1]?+o[1]+s:s))))}Math.ceil10||(Math.ceil10=function(a,o){return e("ceil",a,o)})})();function $k(e,a){let o=a*-1;return Math.ceil10(e,o)}const Cve={general:_ve,...nve,...uve,...{xgGeneral:{namespaced:!0,state:{teamSelected:"Local",xGLocalPlays:[],xGVisitingPlays:[]},getters:{playsLocal:(e,a,o)=>{const s=e.xGLocalPlays,n="homeTeamFilter",i=o.nextGeneral[n];return Ek(s,i)},playsAway:(e,a,o)=>{const s=e.xGVisitingPlays,n="visitingTeamFilter",i=o.nextGeneral[n];return Ek(s,i)},goalsQtyLocal:(e,a)=>{const o=Nk.find(s=>s.name==="Goles");return a.playsLocal.filter(s=>o.categories.includes(s.category_id)).length},goalsQtyAway:(e,a)=>{const o=Nk.find(s=>s.name==="Goles");return a.playsAway.filter(s=>o.categories.includes(s.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 s=a.playsLocal.reduce((n,i)=>(o.has(i.moment_of_play)||(o.add(i.moment_of_play),n+=i.xG2),n),0);return $k(s,2)},xGAway:(e,a)=>{const o=new Set;let s=a.playsAway.reduce((n,i)=>(o.has(i.moment_of_play)||(o.add(i.moment_of_play),n+=i.xG2),n),0);return $k(s,2)}},mutations:{setTeamSelected(e,a){e.teamSelected=a},setPlays(e,a){e.xGLocalPlays=a.local_team.map(o=>Sk(a.data_headers,o)),e.xGVisitingPlays=a.visiting_team.map(o=>Sk(a.data_headers,o))},cleanXgStore(e){e.localStorage="Local",e.xGLocalPlays=[],e.xGVisitingPlays=[]}},actions:{async getXgPlays({commit:e},{seasonId:a,localTeamId:o,visitingTeamId:s,postMatch:n=!1}){try{var i={};n?i=await wve({seasonId:a,localTeamId:o,visitingTeamId:s}):i=await bve({seasonId:a,localTeamId:o,visitingTeamId:s}),e("setPlays",i)}catch(r){return Promise.reject(r)}}}}}};function kve(e){for(const[a,o]of Object.entries(Cve))e.hasModule(a)||e.registerModule(a,o)}_t.GSCGameData=Jje,_t.registerStoreModules=kve,Object.defineProperty(_t,Symbol.toStringTag,{value:"Module"})});
|