@golstats/gsc-game-data 1.0.80 → 1.0.81

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.
@@ -20,7 +20,7 @@
20
20
  `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...o){const n=new this(t);return o.forEach(s=>n.set(s)),n}static accessor(t){const n=(this[D1]=this[D1]={accessors:{}}).accessors,s=this.prototype;function i(r){const c=Kn(r);n[c]||(bA(s,r),n[c]=!0)}return v.isArray(t)?t.forEach(i):i(t),this}}gr.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),v.reduceDescriptors(gr.prototype,({value:e},t)=>{let o=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(n){this[o]=n}}}),v.freezeMethods(gr);const Da=gr;function Om(e,t){const o=this||Vm,n=t||o,s=Da.from(n.headers);let i=n.data;return v.forEach(e,function(c){i=c.call(o,i,s.normalize(),t?t.status:void 0)}),s.normalize(),i}function R1(e){return!!(e&&e.__CANCEL__)}function Qn(e,t,o){ue.call(this,e??"canceled",ue.ERR_CANCELED,t,o),this.name="CanceledError"}v.inherits(Qn,ue,{__CANCEL__:!0});function wA(e,t,o){const n=o.config.validateStatus;!o.status||!n||n(o.status)?e(o):t(new ue("Request failed with status code "+o.status,[ue.ERR_BAD_REQUEST,ue.ERR_BAD_RESPONSE][Math.floor(o.status/100)-4],o.config,o.request,o))}const CA=ra.hasStandardBrowserEnv?{write(e,t,o,n,s,i){const r=[e+"="+encodeURIComponent(t)];v.isNumber(o)&&r.push("expires="+new Date(o).toGMTString()),v.isString(n)&&r.push("path="+n),v.isString(s)&&r.push("domain="+s),i===!0&&r.push("secure"),document.cookie=r.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function kA(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function SA(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function v1(e,t){return e&&!kA(t)?SA(e,t):t}const EA=ra.hasStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),o=document.createElement("a");let n;function s(i){let r=i;return t&&(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 n=s(window.location.href),function(r){const c=v.isString(r)?s(r):r;return c.protocol===n.protocol&&c.host===n.host}}():function(){return function(){return!0}}();function NA(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function xA(e,t){e=e||10;const o=new Array(e),n=new Array(e);let s=0,i=0,r;return t=t!==void 0?t:1e3,function(h){const d=Date.now(),l=n[i];r||(r=d),o[s]=h,n[s]=d;let p=i,g=0;for(;p!==s;)g+=o[p++],p=p%e;if(s=(s+1)%e,s===i&&(i=(i+1)%e),d-r<t)return;const m=l&&d-l;return m?Math.round(g*1e3/m):void 0}}function L1(e,t){let o=0;const n=xA(50,250);return s=>{const i=s.loaded,r=s.lengthComputable?s.total:void 0,c=i-o,h=n(c),d=i<=r;o=i;const l={loaded:i,total:r,progress:r?i/r:void 0,bytes:c,rate:h||void 0,estimated:h&&r&&d?(r-i)/h:void 0,event:s};l[t?"download":"upload"]=!0,e(l)}}const Tm={http:aA,xhr:typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(o,n){let s=e.data;const i=Da.from(e.headers).normalize();let{responseType:r,withXSRFToken:c}=e,h;function d(){e.cancelToken&&e.cancelToken.unsubscribe(h),e.signal&&e.signal.removeEventListener("abort",h)}let l;if(v.isFormData(s)){if(ra.hasStandardBrowserEnv||ra.hasStandardBrowserWebWorkerEnv)i.setContentType(!1);else if((l=i.getContentType())!==!1){const[u,...f]=l?l.split(";").map(b=>b.trim()).filter(Boolean):[];i.setContentType([u||"multipart/form-data",...f].join("; "))}}let p=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 g=v1(e.baseURL,e.url);p.open(e.method.toUpperCase(),O1(g,e.params,e.paramsSerializer),!0),p.timeout=e.timeout;function m(){if(!p)return;const u=Da.from("getAllResponseHeaders"in p&&p.getAllResponseHeaders()),b={data:!r||r==="text"||r==="json"?p.responseText:p.response,status:p.status,statusText:p.statusText,headers:u,config:e,request:p};wA(function(w){o(w),d()},function(w){n(w),d()},b),p=null}if("onloadend"in p?p.onloadend=m:p.onreadystatechange=function(){!p||p.readyState!==4||p.status===0&&!(p.responseURL&&p.responseURL.indexOf("file:")===0)||setTimeout(m)},p.onabort=function(){p&&(n(new ue("Request aborted",ue.ECONNABORTED,e,p)),p=null)},p.onerror=function(){n(new ue("Network Error",ue.ERR_NETWORK,e,p)),p=null},p.ontimeout=function(){let f=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const b=e.transitional||F1;e.timeoutErrorMessage&&(f=e.timeoutErrorMessage),n(new ue(f,b.clarifyTimeoutError?ue.ETIMEDOUT:ue.ECONNABORTED,e,p)),p=null},ra.hasStandardBrowserEnv&&(c&&v.isFunction(c)&&(c=c(e)),c||c!==!1&&EA(g))){const u=e.xsrfHeaderName&&e.xsrfCookieName&&CA.read(e.xsrfCookieName);u&&i.set(e.xsrfHeaderName,u)}s===void 0&&i.setContentType(null),"setRequestHeader"in p&&v.forEach(i.toJSON(),function(f,b){p.setRequestHeader(b,f)}),v.isUndefined(e.withCredentials)||(p.withCredentials=!!e.withCredentials),r&&r!=="json"&&(p.responseType=e.responseType),typeof e.onDownloadProgress=="function"&&p.addEventListener("progress",L1(e.onDownloadProgress,!0)),typeof e.onUploadProgress=="function"&&p.upload&&p.upload.addEventListener("progress",L1(e.onUploadProgress)),(e.cancelToken||e.signal)&&(h=u=>{p&&(n(!u||u.type?new Qn(null,e,p):u),p.abort(),p=null)},e.cancelToken&&e.cancelToken.subscribe(h),e.signal&&(e.signal.aborted?h():e.signal.addEventListener("abort",h)));const y=NA(g);if(y&&ra.protocols.indexOf(y)===-1){n(new ue("Unsupported protocol "+y+":",ue.ERR_BAD_REQUEST,e));return}p.send(s||null)})}};v.forEach(Tm,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const j1=e=>`- ${e}`,BA=e=>v.isFunction(e)||e===null||e===!1,M1={getAdapter:e=>{e=v.isArray(e)?e:[e];const{length:t}=e;let o,n;const s={};for(let i=0;i<t;i++){o=e[i];let r;if(n=o,!BA(o)&&(n=Tm[(r=String(o)).toLowerCase()],n===void 0))throw new ue(`Unknown adapter '${r}'`);if(n)break;s[r||"#"+i]=n}if(!n){const i=Object.entries(s).map(([c,h])=>`adapter ${c} `+(h===!1?"is not supported by the environment":"is not available in the build"));let r=t?i.length>1?`since :
21
21
  `+i.map(j1).join(`
22
22
  `):" "+j1(i[0]):"as no adapter specified";throw new ue("There is no suitable adapter to dispatch the request "+r,"ERR_NOT_SUPPORT")}return n},adapters:Tm};function Fm(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Qn(null,e)}function H1(e){return Fm(e),e.headers=Da.from(e.headers),e.data=Om.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),M1.getAdapter(e.adapter||Vm.adapter)(e).then(function(n){return Fm(e),n.data=Om.call(e,e.transformResponse,n),n.headers=Da.from(n.headers),n},function(n){return R1(n)||(Fm(e),n&&n.response&&(n.response.data=Om.call(e,e.transformResponse,n.response),n.response.headers=Da.from(n.response.headers))),Promise.reject(n)})}const U1=e=>e instanceof Da?{...e}:e;function Ho(e,t){t=t||{};const o={};function n(d,l,p){return v.isPlainObject(d)&&v.isPlainObject(l)?v.merge.call({caseless:p},d,l):v.isPlainObject(l)?v.merge({},l):v.isArray(l)?l.slice():l}function s(d,l,p){if(v.isUndefined(l)){if(!v.isUndefined(d))return n(void 0,d,p)}else return n(d,l,p)}function i(d,l){if(!v.isUndefined(l))return n(void 0,l)}function r(d,l){if(v.isUndefined(l)){if(!v.isUndefined(d))return n(void 0,d)}else return n(void 0,l)}function c(d,l,p){if(p in t)return n(d,l);if(p in e)return n(void 0,d)}const h={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)=>s(U1(d),U1(l),!0)};return v.forEach(Object.keys(Object.assign({},e,t)),function(l){const p=h[l]||s,g=p(e[l],t[l],l);v.isUndefined(g)&&p!==c||(o[l]=g)}),o}const G1="1.6.8",zm={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{zm[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});const W1={};zm.transitional=function(t,o,n){function s(i,r){return"[Axios v"+G1+"] Transitional option '"+i+"'"+r+(n?". "+n:"")}return(i,r,c)=>{if(t===!1)throw new ue(s(r," has been removed"+(o?" in "+o:"")),ue.ERR_DEPRECATED);return o&&!W1[r]&&(W1[r]=!0,console.warn(s(r," has been deprecated since v"+o+" and will be removed in the near future"))),t?t(i,r,c):!0}};function $A(e,t,o){if(typeof e!="object")throw new ue("options must be an object",ue.ERR_BAD_OPTION_VALUE);const n=Object.keys(e);let s=n.length;for(;s-- >0;){const i=n[s],r=t[i];if(r){const c=e[i],h=c===void 0||r(c,i,e);if(h!==!0)throw new ue("option "+i+" must be "+h,ue.ERR_BAD_OPTION_VALUE);continue}if(o!==!0)throw new ue("Unknown option "+i,ue.ERR_BAD_OPTION)}}const Pm={assertOptions:$A,validators:zm},Qa=Pm.validators;class ur{constructor(t){this.defaults=t,this.interceptors={request:new T1,response:new T1}}async request(t,o){try{return await this._request(t,o)}catch(n){if(n instanceof Error){let s;Error.captureStackTrace?Error.captureStackTrace(s={}):s=new Error;const i=s.stack?s.stack.replace(/^.+\n/,""):"";n.stack?i&&!String(n.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(n.stack+=`
23
- `+i):n.stack=i}throw n}}_request(t,o){typeof t=="string"?(o=o||{},o.url=t):o=t||{},o=Ho(this.defaults,o);const{transitional:n,paramsSerializer:s,headers:i}=o;n!==void 0&&Pm.assertOptions(n,{silentJSONParsing:Qa.transitional(Qa.boolean),forcedJSONParsing:Qa.transitional(Qa.boolean),clarifyTimeoutError:Qa.transitional(Qa.boolean)},!1),s!=null&&(v.isFunction(s)?o.paramsSerializer={serialize:s}:Pm.assertOptions(s,{encode:Qa.function,serialize:Qa.function},!0)),o.method=(o.method||this.defaults.method||"get").toLowerCase();let r=i&&v.merge(i.common,i[o.method]);i&&v.forEach(["delete","get","head","post","put","patch","common"],y=>{delete i[y]}),o.headers=Da.concat(r,i);const c=[];let h=!0;this.interceptors.request.forEach(function(u){typeof u.runWhen=="function"&&u.runWhen(o)===!1||(h=h&&u.synchronous,c.unshift(u.fulfilled,u.rejected))});const d=[];this.interceptors.response.forEach(function(u){d.push(u.fulfilled,u.rejected)});let l,p=0,g;if(!h){const y=[H1.bind(this),void 0];for(y.unshift.apply(y,c),y.push.apply(y,d),g=y.length,l=Promise.resolve(o);p<g;)l=l.then(y[p++],y[p++]);return l}g=c.length;let m=o;for(p=0;p<g;){const y=c[p++],u=c[p++];try{m=y(m)}catch(f){u.call(this,f);break}}try{l=H1.call(this,m)}catch(y){return Promise.reject(y)}for(p=0,g=d.length;p<g;)l=l.then(d[p++],d[p++]);return l}getUri(t){t=Ho(this.defaults,t);const o=v1(t.baseURL,t.url);return O1(o,t.params,t.paramsSerializer)}}v.forEach(["delete","get","head","options"],function(t){ur.prototype[t]=function(o,n){return this.request(Ho(n||{},{method:t,url:o,data:(n||{}).data}))}}),v.forEach(["post","put","patch"],function(t){function o(n){return function(i,r,c){return this.request(Ho(c||{},{method:t,headers:n?{"Content-Type":"multipart/form-data"}:{},url:i,data:r}))}}ur.prototype[t]=o(),ur.prototype[t+"Form"]=o(!0)});const fr=ur;class Dm{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let o;this.promise=new Promise(function(i){o=i});const n=this;this.promise.then(s=>{if(!n._listeners)return;let i=n._listeners.length;for(;i-- >0;)n._listeners[i](s);n._listeners=null}),this.promise.then=s=>{let i;const r=new Promise(c=>{n.subscribe(c),i=c}).then(s);return r.cancel=function(){n.unsubscribe(i)},r},t(function(i,r,c){n.reason||(n.reason=new Qn(i,r,c),o(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const o=this._listeners.indexOf(t);o!==-1&&this._listeners.splice(o,1)}static source(){let t;return{token:new Dm(function(s){t=s}),cancel:t}}}const IA=Dm;function VA(e){return function(o){return e.apply(null,o)}}function AA(e){return v.isObject(e)&&e.isAxiosError===!0}const Rm={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(Rm).forEach(([e,t])=>{Rm[t]=e});const OA=Rm;function q1(e){const t=new fr(e),o=u1(fr.prototype.request,t);return v.extend(o,fr.prototype,t,{allOwnKeys:!0}),v.extend(o,t,null,{allOwnKeys:!0}),o.create=function(s){return q1(Ho(e,s))},o}const Ge=q1(Vm);Ge.Axios=fr,Ge.CanceledError=Qn,Ge.CancelToken=IA,Ge.isCancel=R1,Ge.VERSION=G1,Ge.toFormData=hr,Ge.AxiosError=ue,Ge.Cancel=Ge.CanceledError,Ge.all=function(t){return Promise.all(t)},Ge.spread=VA,Ge.isAxiosError=AA,Ge.mergeConfig=Ho,Ge.AxiosHeaders=Da,Ge.formToJSON=e=>P1(v.isHTMLForm(e)?new FormData(e):e),Ge.getAdapter=M1.getAdapter,Ge.HttpStatusCode=OA,Ge.default=Ge;const _r=Ge,J1="/icn-play.svg",mqe="",TA={components:{BarraLeft:yV,BarraRight:kV},props:{data:{type:Object,required:!1},showPlayButton:{type:Boolean,value:!0}},data(){return{gamesBySeason:{}}},computed:{...Bt("nextGeneral",["gameForAnalysis","seasonId"]),...Me("nextGeneral",["homeTeam","visitingTeam"])},methods:{onclickPlayVideos(e){var t=[];e.type==2?e.position_id==1?e.category==0?t=[55,324,323,608,39,774,802,52,53,40,54]:t=e.category:e.category==0?t=[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]:t=e.category:e.type==3?e.category==0?t=[607,608,12,55,54,35,14,52,15,53,466,477,40,257,39]:t=e.category:e.category!=0?t=e.category:t=[607,608,12,55,54,35,14,52,15,53,466,477];const o=[1,2,3];let n={seasonId:e.season_id,mainSectionType:1,playListType:e.type,categoryIds:t,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&&(n.advancedFilter.mainCategoryId=e.category),this.$emit("openmedia",n)},hVal(e){return this.getTeamValue(e,this.gameForAnalysis,"homeTeam")},aVal(e){return this.getTeamValue(e,this.gameForAnalysis,"visitingTeam")},deleteDecimalZero(e){const t=typeof e=="string"?parseFloat(e):e;return typeof t=="number"&&!isNaN(t)?t%1===0?t:t%1===0?Math.floor(t):t:e},formatNumbers(e){return e%1!==0?e.toFixed(1):e},getTeamValue(e,t,o){if(!t.game_id)return this.objectZeroValues;const n=e.generalCategoriesIds.accomplished===3;if(t.is_live){const s=e.homeTeam.accomplished.totalLive+e.visitingTeam.accomplished.totalLive;return s?{numberValue:n?e[o].accomplished.totalLive/s*100:e[o].accomplished.totalLive,numberBarPercent:e[o].accomplished.totalLive/s}:this.objectZeroValues}else if(t.is_live||t.game_status===1){const s=e.homeTeam.accomplished.totalPostGame+e.visitingTeam.accomplished.totalPostGame;return s?{numberValue:n?e[o].accomplished.totalPostGame/s*100:e[o].accomplished.totalPostGame,numberBarPercent:e[o].accomplished.totalPostGame/s}:this.objectZeroValues}if(n){const s=e.homeTeam.accomplished.avgPostGame+e.visitingTeam.accomplished.avgPostGame,i=e[o].accomplished.avgPostGame/s;return e[o].accomplished.avgPostGame?{numberValue:i<1?i*100:i,numberBarPercent:e[o].accomplished.avgPostGame/s}:this.objectZeroValues}else{const s=e.homeTeam.accomplished.avgPostGame+e.visitingTeam.accomplished.avgPostGame;return e[o].accomplished.avgPostGame?{numberValue:e[o].accomplished.avgPostGame,numberBarPercent:e[o].accomplished.avgPostGame/s}:this.objectZeroValues}},async getGamesBySeasonV2(){try{const e={Authorization:this.token},o=`${this.apiUrl}${this.seasonId}/games/${this.gameId}`;return(await _r.get(o,{headers:e})).data}catch(e){return Promise.reject(e)}}},async mounted(){}},X1=e=>(a.pushScopeId("data-v-9ca70fd7"),e=e(),a.popScopeId(),e),FA={class:"card"},zA={class:"card__header"},PA={class:"card__stats"},DA=["onClick"],RA=[X1(()=>a.createElementVNode("img",{src:J1},null,-1))],vA={key:1,class:"card__stats__stat__button_empty"},LA={class:"card__stats__title"},jA={class:"card__stats__scores"},MA={key:0},HA={key:1},UA={key:2},GA={key:3},WA={class:"card__stats__bars"},qA=["onClick"],JA=[X1(()=>a.createElementVNode("img",{src:J1},null,-1))],XA={key:1,class:"card__stats__stat__button_empty"};function ZA(e,t,o,n,s,i){const r=a.resolveComponent("BarraLeft"),c=a.resolveComponent("BarraRight");return a.openBlock(),a.createElementBlock("div",FA,[a.createElementVNode("span",zA,a.toDisplayString(o.data.name),1),a.createElementVNode("div",PA,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(o.data.subcategories,(h,d)=>(a.openBlock(),a.createElementBlock("div",{key:d,class:"card__stats__stat"},[a.createElementVNode("div",null,[i.hVal(h)&&i.hVal(h).numberValue!="0"?(a.openBlock(),a.createElementBlock("div",{key:0,onClick:l=>i.onclickPlayVideos({category:h.accomplishedCategoryIds,type:3,season_id:e.seasonId,team_id:e.homeTeam.team_id}),class:"card__stats__stat__button card__stats__stat__button_left"},RA,8,DA)):(a.openBlock(),a.createElementBlock("div",vA))]),a.createElementVNode("div",null,[a.createElementVNode("div",LA,a.toDisplayString(h.name),1),a.createElementVNode("div",jA,[i.hVal(h)?(a.openBlock(),a.createElementBlock("span",MA,[a.createTextVNode(a.toDisplayString(i.deleteDecimalZero(i.formatNumbers(i.hVal(h).numberValue))),1),h.name=="Posesión"?(a.openBlock(),a.createElementBlock(a.Fragment,{key:0},[a.createTextVNode("%")],64)):a.createCommentVNode("",!0)])):(a.openBlock(),a.createElementBlock("span",HA,"0")),i.aVal(h)?(a.openBlock(),a.createElementBlock("span",UA,[a.createTextVNode(a.toDisplayString(i.deleteDecimalZero(i.formatNumbers(i.aVal(h).numberValue))),1),h.name=="Posesión"?(a.openBlock(),a.createElementBlock(a.Fragment,{key:0},[a.createTextVNode("%")],64)):a.createCommentVNode("",!0)])):(a.openBlock(),a.createElementBlock("span",GA,"0"))]),a.createElementVNode("div",WA,[a.createElementVNode("div",null,[i.hVal(h)?(a.openBlock(),a.createBlock(r,{key:0,postmatch:i.hVal(h).numberBarPercent},null,8,["postmatch"])):(a.openBlock(),a.createBlock(r,{key:1,postmatch:0}))]),a.createElementVNode("div",null,[i.aVal(h)?(a.openBlock(),a.createBlock(c,{key:0,postmatch:i.aVal(h).numberBarPercent},null,8,["postmatch"])):(a.openBlock(),a.createBlock(c,{key:1,postmatch:0}))])])]),a.createElementVNode("div",null,[i.aVal(h)&&i.aVal(h).numberValue!="0"?(a.openBlock(),a.createElementBlock("div",{key:0,onClick:l=>i.onclickPlayVideos({category:h.accomplishedCategoryIds,type:3,season_id:e.seasonId,team_id:e.visitingTeam.team_id}),class:"card__stats__stat__button card__stats__stat__button_right"},JA,8,qA)):(a.openBlock(),a.createElementBlock("div",XA))])]))),128))])])}const YA=De(TA,[["render",ZA],["__scopeId","data-v-9ca70fd7"]]),yqe="",KA={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:{}},Ra=e=>(a.pushScopeId("data-v-1222217b"),e=e(),a.popScopeId(),e),QA={class:"comparative-card"},eO=Ra(()=>a.createElementVNode("div",{class:"header-title"},[a.createElementVNode("span",null,"Comparativa")],-1)),tO={class:"versus"},aO={class:"team-badge"},oO=["src","alt"],nO=Ra(()=>a.createElementVNode("div",null,[a.createElementVNode("div",null,[a.createElementVNode("div"),a.createElementVNode("div")]),a.createElementVNode("div",null,[a.createElementVNode("div"),a.createElementVNode("div")])],-1)),sO=Ra(()=>a.createElementVNode("span",{class:"vs-text"},"VS",-1)),iO={class:"team-badge"},rO=["src","alt"],lO={class:"details"},cO={key:0},dO=Ra(()=>a.createElementVNode("td",null,"Posición en la tabla",-1)),mO=Ra(()=>a.createElementVNode("td",null,"Puntos",-1)),pO=Ra(()=>a.createElementVNode("td",null,"Partidos jugados",-1)),hO=Ra(()=>a.createElementVNode("td",null,"Partidos ganados",-1)),yO=Ra(()=>a.createElementVNode("td",null,"Partidos perdidos",-1)),gO=Ra(()=>a.createElementVNode("td",null,"Partidos empatados",-1));function uO(e,t,o,n,s,i){return a.openBlock(),a.createElementBlock("div",{class:"comparative-main",style:a.normalizeStyle(i.customStyle)},[a.createElementVNode("div",QA,[eO,a.createElementVNode("div",tO,[a.createElementVNode("div",aO,[o.local?(a.openBlock(),a.createElementBlock("img",{key:0,class:"team-badge__image",src:o.local.team_logo,alt:o.local.team_name},null,8,oO)):a.createCommentVNode("",!0),nO]),sO,a.createElementVNode("div",iO,[o.away?(a.openBlock(),a.createElementBlock("img",{key:0,class:"team-badge__image",src:o.away.team_logo,alt:o.away.team_name},null,8,rO)):a.createCommentVNode("",!0)])]),a.createElementVNode("div",lO,[o.away&&o.local?(a.openBlock(),a.createElementBlock("table",cO,[a.createElementVNode("tbody",null,[a.createElementVNode("tr",null,[a.createElementVNode("td",null,a.toDisplayString(o.local.table_position),1),dO,a.createElementVNode("td",null,a.toDisplayString(o.away.table_position),1)]),a.createElementVNode("tr",null,[a.createElementVNode("td",null,a.toDisplayString(o.local.points),1),mO,a.createElementVNode("td",null,a.toDisplayString(o.away.points),1)]),a.createElementVNode("tr",null,[a.createElementVNode("td",null,a.toDisplayString(o.local.games_played),1),pO,a.createElementVNode("td",null,a.toDisplayString(o.away.games_played),1)]),a.createElementVNode("tr",null,[a.createElementVNode("td",null,a.toDisplayString(o.local.games_won),1),hO,a.createElementVNode("td",null,a.toDisplayString(o.away.games_won),1)]),a.createElementVNode("tr",null,[a.createElementVNode("td",null,a.toDisplayString(o.local.games_lost),1),yO,a.createElementVNode("td",null,a.toDisplayString(o.away.games_lost),1)]),a.createElementVNode("tr",null,[a.createElementVNode("td",null,a.toDisplayString(o.local.games_tied),1),gO,a.createElementVNode("td",null,a.toDisplayString(o.away.games_tied),1)])])])):a.createCommentVNode("",!0)])])],4)}const fO=De(KA,[["render",uO],["__scopeId","data-v-1222217b"]]),gqe="",_O=(e,t)=>{const o=e.__vccOpts||e;for(const[n,s]of t)o[n]=s;return o},vm={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,t=this.$refs.content.scrollWidth;t>0&&e>0&&(t>e?(this.showRightArrow=!0,clearInterval(this.intervalid1)):clearInterval(this.intervalid1))}).bind(this),3e3)}}},Z1=()=>{a.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}))},Y1=vm.setup;vm.setup=Y1?(e,t)=>(Z1(),Y1(e,t)):Z1;const bO={ref:"gscScrollableContainer",class:"scrollable-container"},wO={class:"scrollable-arrows"},CO=["width","height","viewBox"],kO=["stroke"],SO={class:"scrollable-wrapper"},EO={class:"scrollable-arrows"},NO=["width","height","viewBox"],xO=["stroke"];function BO(e,t,o,n,s,i){return a.openBlock(),a.createElementBlock("div",bO,[o.arrows?(a.openBlock(),a.createElementBlock("div",{key:0,class:a.normalizeClass(["arrows-container",i.hideShowLeftArrow]),onClick:t[0]||(t[0]=(...r)=>i.scrollLeft&&i.scrollLeft(...r))},[a.createElementVNode("div",wO,[(a.openBlock(),a.createElementBlock("svg",{width:o.arrowsWidth,height:o.arrowsHeight,viewBox:i.getViewBox,fill:"none",xmlns:"http://www.w3.org/2000/svg"},[a.createElementVNode("path",{d:"M6.36523 13.788L1.10146 8.52429C0.479824 7.90265 0.479824 6.88541 1.10147 6.26377L6.36523 1",stroke:o.arrowsColor},null,8,kO)],8,CO))])],2)):a.createCommentVNode("",!0),a.createElementVNode("div",{class:"scrollable-content scrollable-content-slider",ref:"content",onScroll:t[1]||(t[1]=(...r)=>i.getScroll&&i.getScroll(...r))},[a.createElementVNode("div",SO,[a.renderSlot(e.$slots,"default",{},void 0,!0)])],544),o.arrows?(a.openBlock(),a.createElementBlock("div",{key:1,id:"arrows-container-right",class:a.normalizeClass(["arrows-container",i.hideShowRightArrow]),onClick:t[2]||(t[2]=(...r)=>i.scrollRight&&i.scrollRight(...r))},[a.createElementVNode("div",EO,[(a.openBlock(),a.createElementBlock("svg",{width:o.arrowsWidth,height:o.arrowsHeight,viewBox:i.getViewBox,fill:"none",xmlns:"http://www.w3.org/2000/svg"},[a.createElementVNode("path",{d:"M0.634765 1.21195L5.89853 6.47571C6.52018 7.09735 6.52018 8.11459 5.89853 8.73623L0.634766 14",stroke:o.arrowsColor},null,8,xO)],8,NO))])],2)):a.createCommentVNode("",!0)],512)}const Lm=_O(vm,[["render",BO],["__scopeId","data-v-b548a08d"]]),uqe="";let K1=null;const $O={name:"App",components:{GscLinearTeamStats:YA,TableComparative:fO,GSCSlider:Lm},props:{seasonSelected:{type:Object,default:()=>({})}},computed:{...Bt("nextGeneral",["gameForAnalysis","seasonId"]),...Me("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)K1=new ResizeObserver(()=>{this.gamesContainerWidth=this.$refs.gamesContainer.clientWidth,this.gamesContainerWidth<680?this.movil=!0:this.movil=!1}),K1.observe(this.$refs.gamesContainer);else throw new Error("Resize observer not supported!")},async getTableList(){try{const t=await _r.create({headers:{Authorization:`${this.token}`}}).get(this.url+this.seasonSelected.id),o=t.data.data.findIndex(s=>s.team_id===this.gameForAnalysis.home_team),n=t.data.data.findIndex(s=>s.team_id===this.gameForAnalysis.visiting_team);this.home=t.data.data[o],this.away=t.data.data[n]}catch(e){console.error(e)}}},mounted(){setTimeout(()=>{this.setUpResizeObserver()},100)}},IO={class:"container",ref:"gamesContainer"},VO={key:0,class:"grid-container"},AO={key:0,class:"item"},OO={class:"item"},TO={class:"item"},FO={class:"item"},zO={class:"item"},PO={class:"item"},DO={class:"item"},RO={class:"grid-container"},vO={key:0,class:"item-comparative"},LO={class:"table-movil-container"};function jO(e,t,o,n,s,i){const r=a.resolveComponent("TableComparative"),c=a.resolveComponent("GscLinearTeamStats"),h=a.resolveComponent("GSCSlider");return a.openBlock(),a.createElementBlock("div",IO,[s.movil?(a.openBlock(),a.createElementBlock(a.Fragment,{key:1},[a.createElementVNode("div",RO,[s.home&&s.away?(a.openBlock(),a.createElementBlock("div",vO,[a.createVNode(r,{local:s.home,away:s.away,fontFamily:"Poppins-Light"},null,8,["local","away"])])):a.createCommentVNode("",!0)]),a.createVNode(h,{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:a.withCtx(()=>[a.createElementVNode("div",LO,[a.createElementVNode("div",{class:"item-movil",style:a.normalizeStyle(s.gamesContainerWidth<510&&s.gamesContainerWidth>450?"width: 400px":s.gamesContainerWidth<=450?"width: 360px":"")},[a.createVNode(c,{onOpenmedia:i.openmedia,data:e.arrayFilledDataSortedByPriority[0]},null,8,["onOpenmedia","data"])],4),a.createElementVNode("div",{class:"item-movil",style:a.normalizeStyle(s.gamesContainerWidth<510?"width: 400px":s.gamesContainerWidth<450?"width: 360px":"")},[a.createVNode(c,{onOpenmedia:i.openmedia,data:e.arrayFilledDataSortedByPriority[1]},null,8,["onOpenmedia","data"])],4),a.createElementVNode("div",{class:"item-movil",style:a.normalizeStyle(s.gamesContainerWidth<510?"width: 400px":s.gamesContainerWidth<450?"width: 360px":"")},[a.createVNode(c,{onOpenmedia:i.openmedia,data:e.arrayFilledDataSortedByPriority[2]},null,8,["onOpenmedia","data"])],4),a.createElementVNode("div",{class:"item-movil",style:a.normalizeStyle(s.gamesContainerWidth<510?"width: 400px":s.gamesContainerWidth<450?"width: 360px":"")},[a.createVNode(c,{onOpenmedia:i.openmedia,data:e.arrayFilledDataSortedByPriority[3]},null,8,["onOpenmedia","data"])],4),a.createElementVNode("div",{class:"item-movil",style:a.normalizeStyle(s.gamesContainerWidth<510?"width: 400px":s.gamesContainerWidth<450?"width: 360px":"")},[a.createVNode(c,{onOpenmedia:i.openmedia,data:e.arrayFilledDataSortedByPriority[4]},null,8,["onOpenmedia","data"])],4),a.createElementVNode("div",{class:"item-movil",style:a.normalizeStyle(s.gamesContainerWidth<510?"width: 400px":s.gamesContainerWidth<450?"width: 360px":"")},[a.createVNode(c,{onOpenmedia:i.openmedia,data:e.arrayFilledDataSortedByPriority[5]},null,8,["onOpenmedia","data"])],4)])]),_:1})],64)):(a.openBlock(),a.createElementBlock("div",VO,[s.home&&s.away?(a.openBlock(),a.createElementBlock("div",AO,[a.createVNode(r,{local:s.home,away:s.away,fontFamily:"Poppins-Light"},null,8,["local","away"])])):a.createCommentVNode("",!0),a.createElementVNode("div",OO,[a.createVNode(c,{data:e.arrayFilledDataSortedByPriority[0],onOpenmedia:i.openmedia},null,8,["data","onOpenmedia"])]),a.createElementVNode("div",TO,[a.createVNode(c,{data:e.arrayFilledDataSortedByPriority[1],onOpenmedia:i.openmedia},null,8,["data","onOpenmedia"])]),a.createElementVNode("div",FO,[a.createVNode(c,{data:e.arrayFilledDataSortedByPriority[2],onOpenmedia:i.openmedia},null,8,["data","onOpenmedia"])]),a.createElementVNode("div",zO,[a.createVNode(c,{data:e.arrayFilledDataSortedByPriority[3],onOpenmedia:i.openmedia},null,8,["data","onOpenmedia"])]),a.createElementVNode("div",PO,[a.createVNode(c,{data:e.arrayFilledDataSortedByPriority[4],onOpenmedia:i.openmedia},null,8,["data","onOpenmedia"])]),a.createElementVNode("div",DO,[a.createVNode(c,{data:e.arrayFilledDataSortedByPriority[5],onOpenmedia:i.openmedia},null,8,["data","onOpenmedia"])])]))],512)}const MO=De($O,[["render",jO]]),fqe="",_qe="",Q1=["#cbee6b","#0033C5"],HO={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:{...Bt("nextGeneral",["showLiveData","gameForAnalysis"]),...Me("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,n=Math.floor(o/(1e3*60*60*24)),s=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"),s>0&&(c=s==1?s+" hora":s+" horas"),n>0&&(c=n==1?n+" día":n+" días"),c}},methods:{avg(e,t){return t?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 t=this.getChartOptions();return this.arrayFilledSeries.push(this.getChartSeries(e.subcategories,t)),this.arrayChartOptions.push(t),e})):this.arrayDataForCharts=[]},getChartOptions(){return{plotOptions:{radar:{size:132,polygons:{strokeColors:"#606971"}}},chart:{type:"radar",height:509,toolbar:{show:!1}},colors:Q1,fill:{colors:Q1,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:t,dataPointIndex:o,w:n}){const s=n.config.arraySubcategories[o].name,i=n.config.series[t].name,r=n.config.series[t].dataTotal[o],c=e[t][o];return n.config.arraySubcategories[o].id==="3-0"?`
23
+ `+i):n.stack=i}throw n}}_request(t,o){typeof t=="string"?(o=o||{},o.url=t):o=t||{},o=Ho(this.defaults,o);const{transitional:n,paramsSerializer:s,headers:i}=o;n!==void 0&&Pm.assertOptions(n,{silentJSONParsing:Qa.transitional(Qa.boolean),forcedJSONParsing:Qa.transitional(Qa.boolean),clarifyTimeoutError:Qa.transitional(Qa.boolean)},!1),s!=null&&(v.isFunction(s)?o.paramsSerializer={serialize:s}:Pm.assertOptions(s,{encode:Qa.function,serialize:Qa.function},!0)),o.method=(o.method||this.defaults.method||"get").toLowerCase();let r=i&&v.merge(i.common,i[o.method]);i&&v.forEach(["delete","get","head","post","put","patch","common"],y=>{delete i[y]}),o.headers=Da.concat(r,i);const c=[];let h=!0;this.interceptors.request.forEach(function(u){typeof u.runWhen=="function"&&u.runWhen(o)===!1||(h=h&&u.synchronous,c.unshift(u.fulfilled,u.rejected))});const d=[];this.interceptors.response.forEach(function(u){d.push(u.fulfilled,u.rejected)});let l,p=0,g;if(!h){const y=[H1.bind(this),void 0];for(y.unshift.apply(y,c),y.push.apply(y,d),g=y.length,l=Promise.resolve(o);p<g;)l=l.then(y[p++],y[p++]);return l}g=c.length;let m=o;for(p=0;p<g;){const y=c[p++],u=c[p++];try{m=y(m)}catch(f){u.call(this,f);break}}try{l=H1.call(this,m)}catch(y){return Promise.reject(y)}for(p=0,g=d.length;p<g;)l=l.then(d[p++],d[p++]);return l}getUri(t){t=Ho(this.defaults,t);const o=v1(t.baseURL,t.url);return O1(o,t.params,t.paramsSerializer)}}v.forEach(["delete","get","head","options"],function(t){ur.prototype[t]=function(o,n){return this.request(Ho(n||{},{method:t,url:o,data:(n||{}).data}))}}),v.forEach(["post","put","patch"],function(t){function o(n){return function(i,r,c){return this.request(Ho(c||{},{method:t,headers:n?{"Content-Type":"multipart/form-data"}:{},url:i,data:r}))}}ur.prototype[t]=o(),ur.prototype[t+"Form"]=o(!0)});const fr=ur;class Dm{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let o;this.promise=new Promise(function(i){o=i});const n=this;this.promise.then(s=>{if(!n._listeners)return;let i=n._listeners.length;for(;i-- >0;)n._listeners[i](s);n._listeners=null}),this.promise.then=s=>{let i;const r=new Promise(c=>{n.subscribe(c),i=c}).then(s);return r.cancel=function(){n.unsubscribe(i)},r},t(function(i,r,c){n.reason||(n.reason=new Qn(i,r,c),o(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const o=this._listeners.indexOf(t);o!==-1&&this._listeners.splice(o,1)}static source(){let t;return{token:new Dm(function(s){t=s}),cancel:t}}}const IA=Dm;function VA(e){return function(o){return e.apply(null,o)}}function AA(e){return v.isObject(e)&&e.isAxiosError===!0}const Rm={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(Rm).forEach(([e,t])=>{Rm[t]=e});const OA=Rm;function q1(e){const t=new fr(e),o=u1(fr.prototype.request,t);return v.extend(o,fr.prototype,t,{allOwnKeys:!0}),v.extend(o,t,null,{allOwnKeys:!0}),o.create=function(s){return q1(Ho(e,s))},o}const Ge=q1(Vm);Ge.Axios=fr,Ge.CanceledError=Qn,Ge.CancelToken=IA,Ge.isCancel=R1,Ge.VERSION=G1,Ge.toFormData=hr,Ge.AxiosError=ue,Ge.Cancel=Ge.CanceledError,Ge.all=function(t){return Promise.all(t)},Ge.spread=VA,Ge.isAxiosError=AA,Ge.mergeConfig=Ho,Ge.AxiosHeaders=Da,Ge.formToJSON=e=>P1(v.isHTMLForm(e)?new FormData(e):e),Ge.getAdapter=M1.getAdapter,Ge.HttpStatusCode=OA,Ge.default=Ge;const _r=Ge,J1="/icn-play.svg",mqe="",TA={components:{BarraLeft:yV,BarraRight:kV},props:{data:{type:Object,required:!1},showPlayButton:{type:Boolean,value:!0}},data(){return{gamesBySeason:{}}},computed:{...Bt("nextGeneral",["gameForAnalysis","seasonId"]),...Me("nextGeneral",["homeTeam","visitingTeam"])},methods:{onclickPlayVideos(e){var t=[];e.type==2?e.position_id==1?e.category==0?t=[55,324,323,608,39,774,802,52,53,40,54]:t=e.category:e.category==0?t=[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]:t=e.category:e.type==3?e.category==0?t=[607,608,12,55,54,35,14,52,15,53,466,477,40,257,39]:t=e.category:e.category!=0?t=e.category:t=[607,608,12,55,54,35,14,52,15,53,466,477];const o=[1,2,3];let n={seasonId:e.season_id,mainSectionType:1,playListType:e.type,categoryIds:t,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&&(n.advancedFilter.mainCategoryId=e.category),this.$emit("openmedia",n)},hVal(e){return this.getTeamValue(e,this.gameForAnalysis,"homeTeam")},aVal(e){return this.getTeamValue(e,this.gameForAnalysis,"visitingTeam")},deleteDecimalZero(e){const t=typeof e=="string"?parseFloat(e):e;return typeof t=="number"&&!isNaN(t)?t%1===0?t:t%1===0?Math.floor(t):t:e},formatNumbers(e){return e%1!==0?e.toFixed(1):e},getTeamValue(e,t,o){if(!t.game_id)return this.objectZeroValues;const n=e.generalCategoriesIds.accomplished===3;if(t.is_live){const s=e.homeTeam.accomplished.totalLive+e.visitingTeam.accomplished.totalLive;return s?{numberValue:n?e[o].accomplished.totalLive/s*100:e[o].accomplished.totalLive,numberBarPercent:e[o].accomplished.totalLive/s}:this.objectZeroValues}else if(t.is_live||t.game_status===1){const s=e.homeTeam.accomplished.totalPostGame+e.visitingTeam.accomplished.totalPostGame;return s?{numberValue:n?e[o].accomplished.totalPostGame/s*100:e[o].accomplished.totalPostGame,numberBarPercent:e[o].accomplished.totalPostGame/s}:this.objectZeroValues}if(n){const s=e.homeTeam.accomplished.avgPostGame+e.visitingTeam.accomplished.avgPostGame,i=e[o].accomplished.avgPostGame/s;return e[o].accomplished.avgPostGame?{numberValue:i<1?i*100:i,numberBarPercent:e[o].accomplished.avgPostGame/s}:this.objectZeroValues}else{const s=e.homeTeam.accomplished.avgPostGame+e.visitingTeam.accomplished.avgPostGame;return e[o].accomplished.avgPostGame?{numberValue:e[o].accomplished.avgPostGame,numberBarPercent:e[o].accomplished.avgPostGame/s}:this.objectZeroValues}},async getGamesBySeasonV2(){try{const e={Authorization:this.token},o=`${this.apiUrl}${this.seasonId}/games/${this.gameId}`;return(await _r.get(o,{headers:e})).data}catch(e){return Promise.reject(e)}}},async mounted(){}},X1=e=>(a.pushScopeId("data-v-9ca70fd7"),e=e(),a.popScopeId(),e),FA={class:"card"},zA={class:"card__header"},PA={class:"card__stats"},DA=["onClick"],RA=[X1(()=>a.createElementVNode("img",{src:J1},null,-1))],vA={key:1,class:"card__stats__stat__button_empty"},LA={class:"card__stats__title"},jA={class:"card__stats__scores"},MA={key:0},HA={key:1},UA={key:2},GA={key:3},WA={class:"card__stats__bars"},qA=["onClick"],JA=[X1(()=>a.createElementVNode("img",{src:J1},null,-1))],XA={key:1,class:"card__stats__stat__button_empty"};function ZA(e,t,o,n,s,i){const r=a.resolveComponent("BarraLeft"),c=a.resolveComponent("BarraRight");return a.openBlock(),a.createElementBlock("div",FA,[a.createElementVNode("span",zA,a.toDisplayString(o.data.name),1),a.createElementVNode("div",PA,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(o.data.subcategories,(h,d)=>(a.openBlock(),a.createElementBlock("div",{key:d,class:"card__stats__stat"},[a.createElementVNode("div",null,[i.hVal(h)&&i.hVal(h).numberValue!="0"?(a.openBlock(),a.createElementBlock("div",{key:0,onClick:l=>i.onclickPlayVideos({category:h.accomplishedCategoryIds,type:3,season_id:e.seasonId,team_id:e.homeTeam.team_id}),class:"card__stats__stat__button card__stats__stat__button_left"},RA,8,DA)):(a.openBlock(),a.createElementBlock("div",vA))]),a.createElementVNode("div",null,[a.createElementVNode("div",LA,a.toDisplayString(h.name),1),a.createElementVNode("div",jA,[i.hVal(h)?(a.openBlock(),a.createElementBlock("span",MA,[a.createTextVNode(a.toDisplayString(i.deleteDecimalZero(i.formatNumbers(i.hVal(h).numberValue))),1),h.name=="Posesión"?(a.openBlock(),a.createElementBlock(a.Fragment,{key:0},[a.createTextVNode("%")],64)):a.createCommentVNode("",!0)])):(a.openBlock(),a.createElementBlock("span",HA,"0")),i.aVal(h)?(a.openBlock(),a.createElementBlock("span",UA,[a.createTextVNode(a.toDisplayString(i.deleteDecimalZero(i.formatNumbers(i.aVal(h).numberValue))),1),h.name=="Posesión"?(a.openBlock(),a.createElementBlock(a.Fragment,{key:0},[a.createTextVNode("%")],64)):a.createCommentVNode("",!0)])):(a.openBlock(),a.createElementBlock("span",GA,"0"))]),a.createElementVNode("div",WA,[a.createElementVNode("div",null,[i.hVal(h)?(a.openBlock(),a.createBlock(r,{key:0,postmatch:i.hVal(h).numberBarPercent},null,8,["postmatch"])):(a.openBlock(),a.createBlock(r,{key:1,postmatch:0}))]),a.createElementVNode("div",null,[i.aVal(h)?(a.openBlock(),a.createBlock(c,{key:0,postmatch:i.aVal(h).numberBarPercent},null,8,["postmatch"])):(a.openBlock(),a.createBlock(c,{key:1,postmatch:0}))])])]),a.createElementVNode("div",null,[i.aVal(h)&&i.aVal(h).numberValue!="0"?(a.openBlock(),a.createElementBlock("div",{key:0,onClick:l=>i.onclickPlayVideos({category:h.accomplishedCategoryIds,type:3,season_id:e.seasonId,team_id:e.visitingTeam.team_id}),class:"card__stats__stat__button card__stats__stat__button_right"},JA,8,qA)):(a.openBlock(),a.createElementBlock("div",XA))])]))),128))])])}const YA=De(TA,[["render",ZA],["__scopeId","data-v-9ca70fd7"]]),yqe="",KA={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:{}},Ra=e=>(a.pushScopeId("data-v-1222217b"),e=e(),a.popScopeId(),e),QA={class:"comparative-card"},eO=Ra(()=>a.createElementVNode("div",{class:"header-title"},[a.createElementVNode("span",null,"Comparativa")],-1)),tO={class:"versus"},aO={class:"team-badge"},oO=["src","alt"],nO=Ra(()=>a.createElementVNode("div",null,[a.createElementVNode("div",null,[a.createElementVNode("div"),a.createElementVNode("div")]),a.createElementVNode("div",null,[a.createElementVNode("div"),a.createElementVNode("div")])],-1)),sO=Ra(()=>a.createElementVNode("span",{class:"vs-text"},"VS",-1)),iO={class:"team-badge"},rO=["src","alt"],lO={class:"details"},cO={key:0},dO=Ra(()=>a.createElementVNode("td",null,"Posición en la tabla",-1)),mO=Ra(()=>a.createElementVNode("td",null,"Puntos",-1)),pO=Ra(()=>a.createElementVNode("td",null,"Partidos jugados",-1)),hO=Ra(()=>a.createElementVNode("td",null,"Partidos ganados",-1)),yO=Ra(()=>a.createElementVNode("td",null,"Partidos perdidos",-1)),gO=Ra(()=>a.createElementVNode("td",null,"Partidos empatados",-1));function uO(e,t,o,n,s,i){return a.openBlock(),a.createElementBlock("div",{class:"comparative-main",style:a.normalizeStyle(i.customStyle)},[a.createElementVNode("div",QA,[eO,a.createElementVNode("div",tO,[a.createElementVNode("div",aO,[o.local?(a.openBlock(),a.createElementBlock("img",{key:0,class:"team-badge__image",src:o.local.team_logo,alt:o.local.team_name},null,8,oO)):a.createCommentVNode("",!0),nO]),sO,a.createElementVNode("div",iO,[o.away?(a.openBlock(),a.createElementBlock("img",{key:0,class:"team-badge__image",src:o.away.team_logo,alt:o.away.team_name},null,8,rO)):a.createCommentVNode("",!0)])]),a.createElementVNode("div",lO,[o.away&&o.local?(a.openBlock(),a.createElementBlock("table",cO,[a.createElementVNode("tbody",null,[a.createElementVNode("tr",null,[a.createElementVNode("td",null,a.toDisplayString(o.local.table_position),1),dO,a.createElementVNode("td",null,a.toDisplayString(o.away.table_position),1)]),a.createElementVNode("tr",null,[a.createElementVNode("td",null,a.toDisplayString(o.local.points),1),mO,a.createElementVNode("td",null,a.toDisplayString(o.away.points),1)]),a.createElementVNode("tr",null,[a.createElementVNode("td",null,a.toDisplayString(o.local.games_played),1),pO,a.createElementVNode("td",null,a.toDisplayString(o.away.games_played),1)]),a.createElementVNode("tr",null,[a.createElementVNode("td",null,a.toDisplayString(o.local.games_won),1),hO,a.createElementVNode("td",null,a.toDisplayString(o.away.games_won),1)]),a.createElementVNode("tr",null,[a.createElementVNode("td",null,a.toDisplayString(o.local.games_lost),1),yO,a.createElementVNode("td",null,a.toDisplayString(o.away.games_lost),1)]),a.createElementVNode("tr",null,[a.createElementVNode("td",null,a.toDisplayString(o.local.games_tied),1),gO,a.createElementVNode("td",null,a.toDisplayString(o.away.games_tied),1)])])])):a.createCommentVNode("",!0)])])],4)}const fO=De(KA,[["render",uO],["__scopeId","data-v-1222217b"]]),gqe="",_O=(e,t)=>{const o=e.__vccOpts||e;for(const[n,s]of t)o[n]=s;return o},vm={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,t=this.$refs.content.scrollWidth;t>0&&e>0&&(t>e?(this.showRightArrow=!0,clearInterval(this.intervalid1)):clearInterval(this.intervalid1))}).bind(this),3e3)}}},Z1=()=>{a.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}))},Y1=vm.setup;vm.setup=Y1?(e,t)=>(Z1(),Y1(e,t)):Z1;const bO={ref:"gscScrollableContainer",class:"scrollable-container"},wO={class:"scrollable-arrows"},CO=["width","height","viewBox"],kO=["stroke"],SO={class:"scrollable-wrapper"},EO={class:"scrollable-arrows"},NO=["width","height","viewBox"],xO=["stroke"];function BO(e,t,o,n,s,i){return a.openBlock(),a.createElementBlock("div",bO,[o.arrows?(a.openBlock(),a.createElementBlock("div",{key:0,class:a.normalizeClass(["arrows-container",i.hideShowLeftArrow]),onClick:t[0]||(t[0]=(...r)=>i.scrollLeft&&i.scrollLeft(...r))},[a.createElementVNode("div",wO,[(a.openBlock(),a.createElementBlock("svg",{width:o.arrowsWidth,height:o.arrowsHeight,viewBox:i.getViewBox,fill:"none",xmlns:"http://www.w3.org/2000/svg"},[a.createElementVNode("path",{d:"M6.36523 13.788L1.10146 8.52429C0.479824 7.90265 0.479824 6.88541 1.10147 6.26377L6.36523 1",stroke:o.arrowsColor},null,8,kO)],8,CO))])],2)):a.createCommentVNode("",!0),a.createElementVNode("div",{class:"scrollable-content scrollable-content-slider",ref:"content",onScroll:t[1]||(t[1]=(...r)=>i.getScroll&&i.getScroll(...r))},[a.createElementVNode("div",SO,[a.renderSlot(e.$slots,"default",{},void 0,!0)])],544),o.arrows?(a.openBlock(),a.createElementBlock("div",{key:1,id:"arrows-container-right",class:a.normalizeClass(["arrows-container",i.hideShowRightArrow]),onClick:t[2]||(t[2]=(...r)=>i.scrollRight&&i.scrollRight(...r))},[a.createElementVNode("div",EO,[(a.openBlock(),a.createElementBlock("svg",{width:o.arrowsWidth,height:o.arrowsHeight,viewBox:i.getViewBox,fill:"none",xmlns:"http://www.w3.org/2000/svg"},[a.createElementVNode("path",{d:"M0.634765 1.21195L5.89853 6.47571C6.52018 7.09735 6.52018 8.11459 5.89853 8.73623L0.634766 14",stroke:o.arrowsColor},null,8,xO)],8,NO))])],2)):a.createCommentVNode("",!0)],512)}const Lm=_O(vm,[["render",BO],["__scopeId","data-v-b548a08d"]]),uqe="";let K1=null;const $O={name:"App",components:{GscLinearTeamStats:YA,TableComparative:fO,GSCSlider:Lm},props:{seasonSelected:{type:Object,default:()=>({})}},computed:{...Bt("nextGeneral",["gameForAnalysis","seasonId"]),...Me("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)K1=new ResizeObserver(()=>{this.gamesContainerWidth=this.$refs.gamesContainer.clientWidth,this.movil=this.gamesContainerWidth<680}),K1.observe(this.$refs.gamesContainer);else throw new Error("Resize observer not supported!")},async getTableList(){try{const t=await _r.create({headers:{Authorization:`${this.token}`}}).get(this.url+this.seasonSelected.id),o=t.data.data.findIndex(s=>s.team_id===this.gameForAnalysis.home_team),n=t.data.data.findIndex(s=>s.team_id===this.gameForAnalysis.visiting_team);this.home=t.data.data[o],this.away=t.data.data[n]}catch(e){console.error(e)}}},mounted(){setTimeout(()=>{this.setUpResizeObserver()},100)}},IO={class:"container",ref:"gamesContainer"},VO={key:0,class:"grid-container"},AO={key:0,class:"item"},OO={class:"item"},TO={class:"item"},FO={class:"item"},zO={class:"item"},PO={class:"item"},DO={class:"item"},RO={class:"grid-container"},vO={key:0,class:"item-comparative"},LO={class:"table-movil-container"};function jO(e,t,o,n,s,i){const r=a.resolveComponent("TableComparative"),c=a.resolveComponent("GscLinearTeamStats"),h=a.resolveComponent("GSCSlider");return a.openBlock(),a.createElementBlock("div",IO,[s.movil?(a.openBlock(),a.createElementBlock(a.Fragment,{key:1},[a.createElementVNode("div",RO,[s.home&&s.away?(a.openBlock(),a.createElementBlock("div",vO,[a.createVNode(r,{local:s.home,away:s.away,fontFamily:"Poppins-Light"},null,8,["local","away"])])):a.createCommentVNode("",!0)]),a.createVNode(h,{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:a.withCtx(()=>[a.createElementVNode("div",LO,[a.createElementVNode("div",{class:"item-movil",style:a.normalizeStyle(s.gamesContainerWidth<510&&s.gamesContainerWidth>450?"width: 400px":s.gamesContainerWidth<=450?"width: 360px":"")},[a.createVNode(c,{onOpenmedia:i.openmedia,data:e.arrayFilledDataSortedByPriority[0]},null,8,["onOpenmedia","data"])],4),a.createElementVNode("div",{class:"item-movil",style:a.normalizeStyle(s.gamesContainerWidth<510?"width: 400px":s.gamesContainerWidth<450?"width: 360px":"")},[a.createVNode(c,{onOpenmedia:i.openmedia,data:e.arrayFilledDataSortedByPriority[1]},null,8,["onOpenmedia","data"])],4),a.createElementVNode("div",{class:"item-movil",style:a.normalizeStyle(s.gamesContainerWidth<510?"width: 400px":s.gamesContainerWidth<450?"width: 360px":"")},[a.createVNode(c,{onOpenmedia:i.openmedia,data:e.arrayFilledDataSortedByPriority[2]},null,8,["onOpenmedia","data"])],4),a.createElementVNode("div",{class:"item-movil",style:a.normalizeStyle(s.gamesContainerWidth<510?"width: 400px":s.gamesContainerWidth<450?"width: 360px":"")},[a.createVNode(c,{onOpenmedia:i.openmedia,data:e.arrayFilledDataSortedByPriority[3]},null,8,["onOpenmedia","data"])],4),a.createElementVNode("div",{class:"item-movil",style:a.normalizeStyle(s.gamesContainerWidth<510?"width: 400px":s.gamesContainerWidth<450?"width: 360px":"")},[a.createVNode(c,{onOpenmedia:i.openmedia,data:e.arrayFilledDataSortedByPriority[4]},null,8,["onOpenmedia","data"])],4),a.createElementVNode("div",{class:"item-movil",style:a.normalizeStyle(s.gamesContainerWidth<510?"width: 400px":s.gamesContainerWidth<450?"width: 360px":"")},[a.createVNode(c,{onOpenmedia:i.openmedia,data:e.arrayFilledDataSortedByPriority[5]},null,8,["onOpenmedia","data"])],4)])]),_:1})],64)):(a.openBlock(),a.createElementBlock("div",VO,[s.home&&s.away?(a.openBlock(),a.createElementBlock("div",AO,[a.createVNode(r,{local:s.home,away:s.away,fontFamily:"Poppins-Light"},null,8,["local","away"])])):a.createCommentVNode("",!0),a.createElementVNode("div",OO,[a.createVNode(c,{data:e.arrayFilledDataSortedByPriority[0],onOpenmedia:i.openmedia},null,8,["data","onOpenmedia"])]),a.createElementVNode("div",TO,[a.createVNode(c,{data:e.arrayFilledDataSortedByPriority[1],onOpenmedia:i.openmedia},null,8,["data","onOpenmedia"])]),a.createElementVNode("div",FO,[a.createVNode(c,{data:e.arrayFilledDataSortedByPriority[2],onOpenmedia:i.openmedia},null,8,["data","onOpenmedia"])]),a.createElementVNode("div",zO,[a.createVNode(c,{data:e.arrayFilledDataSortedByPriority[3],onOpenmedia:i.openmedia},null,8,["data","onOpenmedia"])]),a.createElementVNode("div",PO,[a.createVNode(c,{data:e.arrayFilledDataSortedByPriority[4],onOpenmedia:i.openmedia},null,8,["data","onOpenmedia"])]),a.createElementVNode("div",DO,[a.createVNode(c,{data:e.arrayFilledDataSortedByPriority[5],onOpenmedia:i.openmedia},null,8,["data","onOpenmedia"])])]))],512)}const MO=De($O,[["render",jO]]),fqe="",_qe="",Q1=["#cbee6b","#0033C5"],HO={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:{...Bt("nextGeneral",["showLiveData","gameForAnalysis"]),...Me("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,n=Math.floor(o/(1e3*60*60*24)),s=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"),s>0&&(c=s==1?s+" hora":s+" horas"),n>0&&(c=n==1?n+" día":n+" días"),c}},methods:{avg(e,t){return t?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 t=this.getChartOptions();return this.arrayFilledSeries.push(this.getChartSeries(e.subcategories,t)),this.arrayChartOptions.push(t),e})):this.arrayDataForCharts=[]},getChartOptions(){return{plotOptions:{radar:{size:132,polygons:{strokeColors:"#606971"}}},chart:{type:"radar",height:509,toolbar:{show:!1}},colors:Q1,fill:{colors:Q1,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:t,dataPointIndex:o,w:n}){const s=n.config.arraySubcategories[o].name,i=n.config.series[t].name,r=n.config.series[t].dataTotal[o],c=e[t][o];return n.config.arraySubcategories[o].id==="3-0"?`
24
24
  <div class="custom-tooltip-apexchart" style="display: none !important;">
25
25
  <div class="__title">${s}:</div>
26
26
  <div class="__totals">${i}: ${c}%</div>
@@ -118,5 +118,5 @@
118
118
  * vuex v4.0.2
119
119
  * (c) 2021 Evan You
120
120
  * @license MIT
121
- */var Lje="store";function Oo(e,t){Object.keys(e).forEach(function(o){return t(e[o],o)})}function I7(e){return e!==null&&typeof e=="object"}function jje(e){return e&&typeof e.then=="function"}function ta(e,t){if(!e)throw new Error("[vuex] "+t)}function Mje(e,t){return function(){return e(t)}}function V7(e,t,o){return t.indexOf(e)<0&&(o&&o.prepend?t.unshift(e):t.push(e)),function(){var n=t.indexOf(e);n>-1&&t.splice(n,1)}}function A7(e,t){e._actions=Object.create(null),e._mutations=Object.create(null),e._wrappedGetters=Object.create(null),e._modulesNamespaceMap=Object.create(null);var o=e.state;Ed(e,o,[],e._modules.root,!0),c0(e,o,t)}function c0(e,t,o){var n=e._state;e.getters={},e._makeLocalGettersCache=Object.create(null);var s=e._wrappedGetters,i={};Oo(s,function(r,c){i[c]=Mje(r,e),Object.defineProperty(e.getters,c,{get:function(){return i[c]()},enumerable:!0})}),e._state=a.reactive({data:t}),e.strict&&qje(e),n&&o&&e._withCommit(function(){n.data=null})}function Ed(e,t,o,n,s){var i=!o.length,r=e._modules.getNamespace(o);if(n.namespaced&&(e._modulesNamespaceMap[r]&&process.env.NODE_ENV!=="production"&&console.error("[vuex] duplicate namespace "+r+" for the namespaced module "+o.join("/")),e._modulesNamespaceMap[r]=n),!i&&!s){var c=d0(t,o.slice(0,-1)),h=o[o.length-1];e._withCommit(function(){process.env.NODE_ENV!=="production"&&h in c&&console.warn('[vuex] state field "'+h+'" was overridden by a module with the same name at "'+o.join(".")+'"'),c[h]=n.state})}var d=n.context=Hje(e,r,o);n.forEachMutation(function(l,p){var g=r+p;Uje(e,g,l,d)}),n.forEachAction(function(l,p){var g=l.root?p:r+p,m=l.handler||l;Gje(e,g,m,d)}),n.forEachGetter(function(l,p){var g=r+p;Wje(e,g,l,d)}),n.forEachChild(function(l,p){Ed(e,t,o.concat(p),l,s)})}function Hje(e,t,o){var n=t==="",s={dispatch:n?e.dispatch:function(i,r,c){var h=Nd(i,r,c),d=h.payload,l=h.options,p=h.type;if((!l||!l.root)&&(p=t+p,process.env.NODE_ENV!=="production"&&!e._actions[p])){console.error("[vuex] unknown local action type: "+h.type+", global type: "+p);return}return e.dispatch(p,d)},commit:n?e.commit:function(i,r,c){var h=Nd(i,r,c),d=h.payload,l=h.options,p=h.type;if((!l||!l.root)&&(p=t+p,process.env.NODE_ENV!=="production"&&!e._mutations[p])){console.error("[vuex] unknown local mutation type: "+h.type+", global type: "+p);return}e.commit(p,d,l)}};return Object.defineProperties(s,{getters:{get:n?function(){return e.getters}:function(){return O7(e,t)}},state:{get:function(){return d0(e.state,o)}}}),s}function O7(e,t){if(!e._makeLocalGettersCache[t]){var o={},n=t.length;Object.keys(e.getters).forEach(function(s){if(s.slice(0,n)===t){var i=s.slice(n);Object.defineProperty(o,i,{get:function(){return e.getters[s]},enumerable:!0})}}),e._makeLocalGettersCache[t]=o}return e._makeLocalGettersCache[t]}function Uje(e,t,o,n){var s=e._mutations[t]||(e._mutations[t]=[]);s.push(function(i){o.call(e,n.state,i)})}function Gje(e,t,o,n){var s=e._actions[t]||(e._actions[t]=[]);s.push(function(i){var r=o.call(e,{dispatch:n.dispatch,commit:n.commit,getters:n.getters,state:n.state,rootGetters:e.getters,rootState:e.state},i);return jje(r)||(r=Promise.resolve(r)),e._devtoolHook?r.catch(function(c){throw e._devtoolHook.emit("vuex:error",c),c}):r})}function Wje(e,t,o,n){if(e._wrappedGetters[t]){process.env.NODE_ENV!=="production"&&console.error("[vuex] duplicate getter key: "+t);return}e._wrappedGetters[t]=function(s){return o(n.state,n.getters,s.state,s.getters)}}function qje(e){a.watch(function(){return e._state.data},function(){process.env.NODE_ENV!=="production"&&ta(e._committing,"do not mutate vuex store state outside mutation handlers.")},{deep:!0,flush:"sync"})}function d0(e,t){return t.reduce(function(o,n){return o[n]},e)}function Nd(e,t,o){return I7(e)&&e.type&&(o=t,t=e,e=e.type),process.env.NODE_ENV!=="production"&&ta(typeof e=="string","expects string as the type, but found "+typeof e+"."),{type:e,payload:t,options:o}}var Jje="vuex bindings",T7="vuex:mutations",m0="vuex:actions",Pn="vuex",Xje=0;function Zje(e,t){vje({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:[Jje]},function(o){o.addTimelineLayer({id:T7,label:"Vuex Mutations",color:F7}),o.addTimelineLayer({id:m0,label:"Vuex Actions",color:F7}),o.addInspector({id:Pn,label:"Vuex",icon:"storage",treeFilterPlaceholder:"Filter stores..."}),o.on.getInspectorTree(function(n){if(n.app===e&&n.inspectorId===Pn)if(n.filter){var s=[];R7(s,t._modules.root,n.filter,""),n.rootNodes=s}else n.rootNodes=[D7(t._modules.root,"")]}),o.on.getInspectorState(function(n){if(n.app===e&&n.inspectorId===Pn){var s=n.nodeId;O7(t,s),n.state=Qje(tMe(t._modules,s),s==="root"?t.getters:t._makeLocalGettersCache,s)}}),o.on.editInspectorState(function(n){if(n.app===e&&n.inspectorId===Pn){var s=n.nodeId,i=n.path;s!=="root"&&(i=s.split("/").filter(Boolean).concat(i)),t._withCommit(function(){n.set(t._state.data,i,n.state.value)})}}),t.subscribe(function(n,s){var i={};n.payload&&(i.payload=n.payload),i.state=s,o.notifyComponentUpdate(),o.sendInspectorTree(Pn),o.sendInspectorState(Pn),o.addTimelineEvent({layerId:T7,event:{time:Date.now(),title:n.type,data:i}})}),t.subscribeAction({before:function(n,s){var i={};n.payload&&(i.payload=n.payload),n._id=Xje++,n._time=Date.now(),i.state=s,o.addTimelineEvent({layerId:m0,event:{time:n._time,title:n.type,groupId:n._id,subtitle:"start",data:i}})},after:function(n,s){var i={},r=Date.now()-n._time;i.duration={_custom:{type:"duration",display:r+"ms",tooltip:"Action duration",value:r}},n.payload&&(i.payload=n.payload),i.state=s,o.addTimelineEvent({layerId:m0,event:{time:Date.now(),title:n.type,groupId:n._id,subtitle:"end",data:i}})}})})}var F7=8702998,Yje=6710886,Kje=16777215,z7={label:"namespaced",textColor:Kje,backgroundColor:Yje};function P7(e){return e&&e!=="root"?e.split("/").slice(-2,-1)[0]:"Root"}function D7(e,t){return{id:t||"root",label:P7(t),tags:e.namespaced?[z7]:[],children:Object.keys(e._children).map(function(o){return D7(e._children[o],t+o+"/")})}}function R7(e,t,o,n){n.includes(o)&&e.push({id:n||"root",label:n.endsWith("/")?n.slice(0,n.length-1):n||"Root",tags:t.namespaced?[z7]:[]}),Object.keys(t._children).forEach(function(s){R7(e,t._children[s],o,n+s+"/")})}function Qje(e,t,o){t=o==="root"?t:t[o];var n=Object.keys(t),s={state:Object.keys(e.state).map(function(r){return{key:r,editable:!0,value:e.state[r]}})};if(n.length){var i=eMe(t);s.getters=Object.keys(i).map(function(r){return{key:r.endsWith("/")?P7(r):r,editable:!1,value:p0(function(){return i[r]})}})}return s}function eMe(e){var t={};return Object.keys(e).forEach(function(o){var n=o.split("/");if(n.length>1){var s=t,i=n.pop();n.forEach(function(r){s[r]||(s[r]={_custom:{value:{},display:r,tooltip:"Module",abstract:!0}}),s=s[r]._custom.value}),s[i]=p0(function(){return e[o]})}else t[o]=p0(function(){return e[o]})}),t}function tMe(e,t){var o=t.split("/").filter(function(n){return n});return o.reduce(function(n,s,i){var r=n[s];if(!r)throw new Error('Missing module "'+s+'" for path "'+t+'".');return i===o.length-1?r:r._children},t==="root"?e:e.root._children)}function p0(e){try{return e()}catch(t){return t}}var aa=function(e,t){this.runtime=t,this._children=Object.create(null),this._rawModule=e;var o=e.state;this.state=(typeof o=="function"?o():o)||{}},v7={namespaced:{configurable:!0}};v7.namespaced.get=function(){return!!this._rawModule.namespaced},aa.prototype.addChild=function(e,t){this._children[e]=t},aa.prototype.removeChild=function(e){delete this._children[e]},aa.prototype.getChild=function(e){return this._children[e]},aa.prototype.hasChild=function(e){return e in this._children},aa.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)},aa.prototype.forEachChild=function(e){Oo(this._children,e)},aa.prototype.forEachGetter=function(e){this._rawModule.getters&&Oo(this._rawModule.getters,e)},aa.prototype.forEachAction=function(e){this._rawModule.actions&&Oo(this._rawModule.actions,e)},aa.prototype.forEachMutation=function(e){this._rawModule.mutations&&Oo(this._rawModule.mutations,e)},Object.defineProperties(aa.prototype,v7);var To=function(e){this.register([],e,!1)};To.prototype.get=function(e){return e.reduce(function(t,o){return t.getChild(o)},this.root)},To.prototype.getNamespace=function(e){var t=this.root;return e.reduce(function(o,n){return t=t.getChild(n),o+(t.namespaced?n+"/":"")},"")},To.prototype.update=function(e){L7([],this.root,e)},To.prototype.register=function(e,t,o){var n=this;o===void 0&&(o=!0),process.env.NODE_ENV!=="production"&&H7(e,t);var s=new aa(t,o);if(e.length===0)this.root=s;else{var i=this.get(e.slice(0,-1));i.addChild(e[e.length-1],s)}t.modules&&Oo(t.modules,function(r,c){n.register(e.concat(c),r,o)})},To.prototype.unregister=function(e){var t=this.get(e.slice(0,-1)),o=e[e.length-1],n=t.getChild(o);if(!n){process.env.NODE_ENV!=="production"&&console.warn("[vuex] trying to unregister module '"+o+"', which is not registered");return}n.runtime&&t.removeChild(o)},To.prototype.isRegistered=function(e){var t=this.get(e.slice(0,-1)),o=e[e.length-1];return t?t.hasChild(o):!1};function L7(e,t,o){if(process.env.NODE_ENV!=="production"&&H7(e,o),t.update(o),o.modules)for(var n in o.modules){if(!t.getChild(n)){process.env.NODE_ENV!=="production"&&console.warn("[vuex] trying to add a new module '"+n+"' on hot reloading, manual reload is needed");return}L7(e.concat(n),t.getChild(n),o.modules[n])}}var j7={assert:function(e){return typeof e=="function"},expected:"function"},aMe={assert:function(e){return typeof e=="function"||typeof e=="object"&&typeof e.handler=="function"},expected:'function or object with "handler" function'},M7={getters:j7,mutations:j7,actions:aMe};function H7(e,t){Object.keys(M7).forEach(function(o){if(t[o]){var n=M7[o];Oo(t[o],function(s,i){ta(n.assert(s),oMe(e,o,i,s,n.expected))})}})}function oMe(e,t,o,n,s){var i=t+" should be "+s+' but "'+t+"."+o+'"';return e.length>0&&(i+=' in module "'+e.join(".")+'"'),i+=" is "+JSON.stringify(n)+".",i}var $t=function e(t){var o=this;t===void 0&&(t={}),process.env.NODE_ENV!=="production"&&(ta(typeof Promise<"u","vuex requires a Promise polyfill in this browser."),ta(this instanceof e,"store must be called with the new operator."));var n=t.plugins;n===void 0&&(n=[]);var s=t.strict;s===void 0&&(s=!1);var i=t.devtools;this._committing=!1,this._actions=Object.create(null),this._actionSubscribers=[],this._mutations=Object.create(null),this._wrappedGetters=Object.create(null),this._modules=new To(t),this._modulesNamespaceMap=Object.create(null),this._subscribers=[],this._makeLocalGettersCache=Object.create(null),this._devtools=i;var r=this,c=this,h=c.dispatch,d=c.commit;this.dispatch=function(p,g){return h.call(r,p,g)},this.commit=function(p,g,m){return d.call(r,p,g,m)},this.strict=s;var l=this._modules.root.state;Ed(this,l,[],this._modules.root),c0(this,l),n.forEach(function(p){return p(o)})},h0={state:{configurable:!0}};$t.prototype.install=function(e,t){e.provide(t||Lje,this),e.config.globalProperties.$store=this;var o=this._devtools!==void 0?this._devtools:process.env.NODE_ENV!=="production"||!1;o&&Zje(e,this)},h0.state.get=function(){return this._state.data},h0.state.set=function(e){process.env.NODE_ENV!=="production"&&ta(!1,"use store.replaceState() to explicit replace store state.")},$t.prototype.commit=function(e,t,o){var n=this,s=Nd(e,t,o),i=s.type,r=s.payload,c=s.options,h={type:i,payload:r},d=this._mutations[i];if(!d){process.env.NODE_ENV!=="production"&&console.error("[vuex] unknown mutation type: "+i);return}this._withCommit(function(){d.forEach(function(l){l(r)})}),this._subscribers.slice().forEach(function(l){return l(h,n.state)}),process.env.NODE_ENV!=="production"&&c&&c.silent&&console.warn("[vuex] mutation type: "+i+". Silent option has been removed. Use the filter functionality in the vue-devtools")},$t.prototype.dispatch=function(e,t){var o=this,n=Nd(e,t),s=n.type,i=n.payload,r={type:s,payload:i},c=this._actions[s];if(!c){process.env.NODE_ENV!=="production"&&console.error("[vuex] unknown action type: "+s);return}try{this._actionSubscribers.slice().filter(function(d){return d.before}).forEach(function(d){return d.before(r,o.state)})}catch(d){process.env.NODE_ENV!=="production"&&(console.warn("[vuex] error in before action subscribers: "),console.error(d))}var h=c.length>1?Promise.all(c.map(function(d){return d(i)})):c[0](i);return new Promise(function(d,l){h.then(function(p){try{o._actionSubscribers.filter(function(g){return g.after}).forEach(function(g){return g.after(r,o.state)})}catch(g){process.env.NODE_ENV!=="production"&&(console.warn("[vuex] error in after action subscribers: "),console.error(g))}d(p)},function(p){try{o._actionSubscribers.filter(function(g){return g.error}).forEach(function(g){return g.error(r,o.state,p)})}catch(g){process.env.NODE_ENV!=="production"&&(console.warn("[vuex] error in error action subscribers: "),console.error(g))}l(p)})})},$t.prototype.subscribe=function(e,t){return V7(e,this._subscribers,t)},$t.prototype.subscribeAction=function(e,t){var o=typeof e=="function"?{before:e}:e;return V7(o,this._actionSubscribers,t)},$t.prototype.watch=function(e,t,o){var n=this;return process.env.NODE_ENV!=="production"&&ta(typeof e=="function","store.watch only accepts a function."),a.watch(function(){return e(n.state,n.getters)},t,Object.assign({},o))},$t.prototype.replaceState=function(e){var t=this;this._withCommit(function(){t._state.data=e})},$t.prototype.registerModule=function(e,t,o){o===void 0&&(o={}),typeof e=="string"&&(e=[e]),process.env.NODE_ENV!=="production"&&(ta(Array.isArray(e),"module path must be a string or an Array."),ta(e.length>0,"cannot register the root module by using registerModule.")),this._modules.register(e,t),Ed(this,this.state,e,this._modules.get(e),o.preserveState),c0(this,this.state)},$t.prototype.unregisterModule=function(e){var t=this;typeof e=="string"&&(e=[e]),process.env.NODE_ENV!=="production"&&ta(Array.isArray(e),"module path must be a string or an Array."),this._modules.unregister(e),this._withCommit(function(){var o=d0(t.state,e.slice(0,-1));delete o[e[e.length-1]]}),A7(this)},$t.prototype.hasModule=function(e){return typeof e=="string"&&(e=[e]),process.env.NODE_ENV!=="production"&&ta(Array.isArray(e),"module path must be a string or an Array."),this._modules.isRegistered(e)},$t.prototype.hotUpdate=function(e){this._modules.update(e),A7(this,!0)},$t.prototype._withCommit=function(e){var t=this._committing;this._committing=!0,e(),this._committing=t},Object.defineProperties($t.prototype,h0);var nMe=iMe(function(e,t){var o={};return process.env.NODE_ENV!=="production"&&!U7(t)&&console.error("[vuex] mapMutations: mapper parameter must be either an Array or an Object"),sMe(t).forEach(function(n){var s=n.key,i=n.val;o[s]=function(){for(var r=[],c=arguments.length;c--;)r[c]=arguments[c];var h=this.$store.commit;if(e){var d=rMe(this.$store,"mapMutations",e);if(!d)return;h=d.context.commit}return typeof i=="function"?i.apply(this,[h].concat(r)):h.apply(this.$store,[i].concat(r))}}),o});function sMe(e){return U7(e)?Array.isArray(e)?e.map(function(t){return{key:t,val:t}}):Object.keys(e).map(function(t){return{key:t,val:e[t]}}):[]}function U7(e){return Array.isArray(e)||I7(e)}function iMe(e){return function(t,o){return typeof t!="string"?(o=t,t=""):t.charAt(t.length-1)!=="/"&&(t+="/"),e(t,o)}}function rMe(e,t,o){var n=e._modulesNamespaceMap[o];return process.env.NODE_ENV!=="production"&&!n&&console.error("[vuex] module namespace not found in "+t+"(): "+o),n}const lMe="/icn-play.svg",cMe="/icn-tiros-de-esquina.svg",dMe="/icn-tiro-a-porteria.svg",mMe="/icn-cambio.svg",pMe="/icn-falta.svg",hMe="/atajada.svg",yMe="/fuera-de-lugar.svg",y0="/gol.svg",gMe="/var.png",uMe="/tiempo-agregado.svg",fMe="/jugada-peligrosa.svg",_Me="/penal-marcado.svg",bMe="/penal-fallado.svg",wMe="/inicia-el-partido.svg",CMe="/fin-del-partido.svg",kMe="/icn-tarjeta-amarilla.svg",SMe="/icn-tarjeta-roja.svg",EMe=[1,2,3,4,6],NMe={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=[],t=`${this.gameEvent.event_type_id}-${this.gameEvent.category_id}`;return r0.GOAL_IDS.includes(t)?(e.push("is-main-event"),e.push("goal")):r0.YELLOW_CARD_IDS.includes(t)?(e.push("is-main-event"),e.push("yellow-card")):r0.RED_CARD_IDS.includes(t)?(e.push("is-main-event"),e.push("red-card")):this.gameEvent.video_link!=="-"&&(e.push("is-main-event"),e.push("normal-video")),this.gameEvent.teamType===1?e.push("time-line-event--home-team"):e.push("time-line-event--away-team"),e},srcImgPlayers(){let e=null;return this.gameEvent.player_id&&this.gameEvent.player_id!=="-"&&(e=this.gameEvent.player_id.split("@"),e=e.map(t=>Aje(t))),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||EMe.includes(this.gameEvent.event_type_id)?"":this.gameEvent.player_name}},watch:{width(){this.emitHeight()},gameEvent:{deep:!0,handler(){this.gameEventKey++}}},methods:{...nMe("general",["setVideoModalVisibility","setVideoSrc"]),thumbnailClick(e){e!=="-"&&this.$emit("thumbnail-click",e)},showVideoTimeline(e){this.setVideoSrc(e),this.setVideoModalVisibility(!0)},getIconClasses(){return["time-line-event__icon--desktop",`time-line-event__icon--desktop-${this.gameEvent.teamType===1?"home":"away"}-team`]},emitHeight(){setTimeout(()=>{this.$refs.timeLineEvent&&this.$refs.timeLineEvent.clientHeight&&this.$refs.timeLineEvent.clientHeight!==this.lastHeight&&(this.lastHeight=this.$refs.timeLineEvent.clientHeight,this.$emit("event-height",this.lastHeight))},500)}},mounted(){if(this.emitHeight(),this.gameEvent.event_type_id===3){const[e,t]=this.gameEvent.player_id.split("@");this.$emit("player-changed",{playerOut:Number(e),playerIn:Number(t),teamId:this.gameEvent.team_id})}}},xMe=e=>(a.pushScopeId("data-v-d760bda0"),e=e(),a.popScopeId(),e),BMe={class:"time-line-event__details"},$Me={width:"127",preload:"metadata",style:{"border-radius":"8px"}},IMe=["src"],VMe=xMe(()=>a.createElementVNode("div",{class:"time-line-event__details__video-thumbnail__gradient"},[a.createElementVNode("div",{class:"time-line-event__details__video-thumbnail__gradient__button-play"},[a.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none"},[a.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)),AMe={class:"time-line-event__details__info"},OMe={key:0,class:"time-line-event__details__info__header__players"},TMe={class:"time-line-event__details__info__header__players__div-img"},FMe=["src"],zMe={class:"time-line-event__details__info__body"},PMe={class:"time-line-event__details__info__body__comment"},DMe={class:"time-line-event__minute__container"},RMe={class:"time-line-event__minute__container__text"},vMe={class:"time-line-event__minute__container__icon-container"},LMe={class:"time-line-event__minute__container__icon-container__icon"},jMe={key:0,src:cMe,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},MMe={key:1,src:dMe,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},HMe={key:2,src:mMe,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},UMe={key:3,src:pMe,class:"time-line-event__minute__container__icon-container__icon__img",alt:"Event icon"},GMe={key:4,src:hMe,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},WMe={key:5,src:yMe,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},qMe={key:6,src:y0,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},JMe={key:7,src:y0,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},XMe={key:8,src:y0,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},ZMe={key:9,src:gMe,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},YMe={key:10,src:uMe,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},KMe={key:11,src:fMe,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},QMe={key:12,src:_Me,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},eHe={key:13,src:bMe,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},tHe={key:14,src:wMe,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},aHe={key:15,src:CMe,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},oHe={key:16,src:kMe,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},nHe={key:17,src:SMe,class:"time-line-event__minute__container__icon-container__icon__img",alt:"Event icon"},sHe={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 iHe(e,t,o,n,s,i){return a.openBlock(),a.createElementBlock("div",{ref:"timeLineEvent",class:a.normalizeClass(["time-line-event",i.teamTypeClasses]),style:a.normalizeStyle({width:`${o.width}px`}),key:s.gameEventKey},[a.createElementVNode("div",BMe,[o.gameEvent.video_link!=="-"&&o.timeLineWidth>700?(a.openBlock(),a.createElementBlock("div",{key:0,class:"time-line-event__details__video-thumbnail",onClick:t[0]||(t[0]=r=>i.thumbnailClick(o.gameEvent.video_link,o.gameEvent.event_type_name))},[a.createElementVNode("video",$Me,[a.createElementVNode("source",{src:o.gameEvent.video_link+"#t=0.1",type:"video/mp4"},null,8,IMe)]),VMe])):a.createCommentVNode("",!0),a.createElementVNode("div",AMe,[a.createElementVNode("div",{class:a.normalizeClass(["time-line-event__details__info__header",i.teamTypeClasses2])},[o.gameEvent.video_link=="-"?(a.openBlock(),a.createElementBlock("div",OMe,[i.srcImgPlayers?(a.openBlock(!0),a.createElementBlock(a.Fragment,{key:0},a.renderList(i.srcImgPlayers,(r,c)=>(a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass(["img-player",{"second-player":c===1}]),key:c},[a.createElementVNode("div",TMe,[a.createElementVNode("img",{src:r,alt:""},null,8,FMe)])],2))),128)):a.createCommentVNode("",!0)])):a.createCommentVNode("",!0),a.createElementVNode("div",{class:a.normalizeClass(["time-line-event__details__info__header__event-name",i.nameClasses]),onClick:t[1]||(t[1]=r=>i.thumbnailClick(o.gameEvent.video_link,o.gameEvent.event_type_name))},[a.createElementVNode("img",{src:lMe,class:a.normalizeClass(`time-line-event__details__info__header__event-play ${[1,2].includes(o.gameEvent.event_type_id)?`time-line-event__details__info__header__event-play__${o.gameEvent.event_type_name}`:o.gameEvent.video_link!=="-"?"time-line-event__details__info__header__event-play__normal-video":""}`)},null,2),a.createTextVNode(" "+a.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),a.createElementVNode("div",zMe,[a.createElementVNode("div",PMe,a.toDisplayString(this.gameEvent.category_id?`${this.gameEvent.comments}`:""),1)])])]),a.createElementVNode("div",{class:a.normalizeClass(["time-line-event__minute",i.minuteClasses])},[a.createElementVNode("div",DMe,[a.createElementVNode("div",RMe,a.toDisplayString(o.gameEvent.minute)+"'",1),a.createElementVNode("div",vMe,[a.createElementVNode("div",LMe,[o.gameEvent.category_id==18?(a.openBlock(),a.createElementBlock("img",jMe)):o.gameEvent.category_id==20?(a.openBlock(),a.createElementBlock("img",MMe)):o.gameEvent.category_id==10?(a.openBlock(),a.createElementBlock("img",HMe)):o.gameEvent.category_id==21?(a.openBlock(),a.createElementBlock("img",UMe)):o.gameEvent.category_id==27?(a.openBlock(),a.createElementBlock("img",GMe)):o.gameEvent.category_id==17?(a.openBlock(),a.createElementBlock("img",WMe)):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?(a.openBlock(),a.createElementBlock("img",qMe)):o.gameEvent.category_id==4?(a.openBlock(),a.createElementBlock("img",JMe)):o.gameEvent.category_id==13||o.gameEvent.category_id==16?(a.openBlock(),a.createElementBlock("img",XMe)):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?(a.openBlock(),a.createElementBlock("img",ZMe)):o.gameEvent.category_id==28?(a.openBlock(),a.createElementBlock("img",YMe)):o.gameEvent.category_id==26?(a.openBlock(),a.createElementBlock("img",KMe)):o.gameEvent.category_id==22?(a.openBlock(),a.createElementBlock("img",QMe)):o.gameEvent.category_id==15||o.gameEvent.category_id==23?(a.openBlock(),a.createElementBlock("img",eHe)):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?(a.openBlock(),a.createElementBlock("img",tHe)):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?(a.openBlock(),a.createElementBlock("img",aHe)):o.gameEvent.category_id==8?(a.openBlock(),a.createElementBlock("img",oHe)):o.gameEvent.category_id==9?(a.openBlock(),a.createElementBlock("img",nHe)):(a.openBlock(),a.createElementBlock("img",sHe))])])])],2)],6)}const rHe=Bi(NMe,[["render",iHe],["__scopeId","data-v-d760bda0"]]),lHe={"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"},cHe={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 xd=null;const dHe={name:"TimeLine",components:{Tooltip:Bje,TimeLineEvent:rHe},mixins:[Ije],props:{gameData:{type:Object,required:!0},timeLinePeriod:{type:String,default:"all"},socket:{type:Object,default:()=>({})}},data(){return{gameEvents:[],gameEventsByPeriod:{firstHalf:[],secondHalf:[]},dataVideo:{visible:!1,link:""},gameEventsQueue:[],gameEventsUrl:"https://al2nv2dmkc.execute-api.us-west-2.amazonaws.com/prod/mxm/",transitionName:"",subscriptionInfo:{gameId:0,isSubscribed:!1},areGameEventsFilled:!1,timeLineWidth:812,eventContainerWidth:0,channelName:"",timeLineStatus:"awaiting",timeLeft:"",lastMinute:0,timeLineStatuses:[],currentStatus:{abbreviation:""},timer:"00:00"}},computed:{isMobile(){return this.timeLineWidth<580},gameEventWidth(){return this.timeLineWidth/2-30},gameEventsToShow(){return this.timeLinePeriod==="all"?this.gameEvents:this.gameEventsByPeriod[this.timeLinePeriod]}},watch:{gameData:{deep:!0,immediate:!0,handler(e){e&&e.id&&(this.gameDateTime=new Date(this.gameData.dateTimeUTC),this.gameEventsQueue=[],this.timeLineStatuses=[],this.transitionName="",this.checkTimeLeft(),e.status!==1&&this.socket&&this.socket.connected?this.subscribeToMXMChannel():this.timeLineStatus="finished",this.fillGameEvents(e.id))}},"socket.connected":{immediate:!0,handler(e){e&&this.gameData.id&&this.gameData.status!==1&&this.subscribeToMXMChannel()}},gameEvents(e){e.length&&this.gameData.status!==1&&(this.timeLineStatus="live")}},methods:{async fillGameEvents(e){try{const t=await this.fetchGameEvents(e);t?(this.gameEvents=[...t],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(t){throw new Error(t)}},getGameEventClassAndSetIcon(e,t){return e.icon=t===0?"inicio_del_partido":lHe[`${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:t}}=await N7.get(`${this.gameEventsUrl}${e}`);return t}catch(t){throw new Error(t)}},subscribeToMXMChannel(){this.channelName=`mxm.game.${this.gameData.id}`,this.socket.emit("subscribe",{channel:this.channelName}),this.isSubscribed=!0},checkGameEventsQueue(){this.gameEventsQueue.length&&this.gameEvents.push(...this.gameEventsQueue),this.areGameEventsFilled=!0},setUpResizeObserver(){if(window.ResizeObserver)xd=new ResizeObserver(()=>{this.timeLineWidth=this.$refs.timeLine.clientWidth}),xd.observe(this.$refs.timeLine);else throw new Error("Resize observer not supported!")},updateContainerHeight(e,t){const o=this.$refs[`gameEventDiv${t}`][0],n=this.$refs[`gameEventLine${t}`]?this.$refs[`gameEventLine${t}`][0]:null,s=e+12;o&&(o.style.height=`${s}px`),n&&(n.style.height=`${s}px`)},sortGameEvents(){this.gameEvents.sort((e,t)=>this.getMatchLapseMinutes(e.match_lapse)+Number(e.minute)-(this.getMatchLapseMinutes(t.match_lapse)+Number(t.minute))),this.gameEvents.forEach(e=>{this.gameEventsByPeriod[e.match_lapse===1?"firstHalf":"secondHalf"].push(e)})},getMatchLapseMinutes(e){let t=0;switch(e){case 1:t=0;break;case 2:t=45;break;case 3:t=90;break;case 4:t=105;break;case 5:t=120;break}return t},addGameEventFromChannel(e){this.areGameEventsFilled?(this.gameEvents.push(e),this.sortGameEvents()):this.gameEventsQueue.push(e)},deleteGameEventFromChannel(e){const t=this.gameEvents.findIndex(o=>o.play_id===e.play_id);t&&this.gameEvents.splice(t,1)},checkTimeLineStatus(){this.gameEvents.forEach(t=>{const o=cHe[t.game_status];o&&this.timeLineStatuses.push({...o,gameEvent:t})}),this.timeLineStatuses.sort((t,o)=>o.weight-t.weight);const e=this.timeLineStatuses[0];e&&(this.currentStatus=e,e.playTimer&&this.startTimer())},startTimer(){},getTeamLogoSrc(e="homeTeam"){const t=this.gameData[e].team_id;return Vje(t)},thumbnailClick(e){this.dataVideo.link=e,this.dataVideo.visible=!0}},mounted(){this.$nextTick(()=>{this.setUpResizeObserver()})},beforeUnmount(){xd&&xd.unobserve(this.$refs.timeLine)},sockets:{new_mxm([e,t]){this.channelName===e&&this.addGameEventFromChannel(t)},update_mxm([e,t]){this.channelName===e&&(this.deleteGameEventFromChannel(t),this.addGameEventFromChannel(t))},delete_mxm([e,t]){this.channelName===e&&this.deleteGameEventFromChannel(t)}}},G7=e=>(a.pushScopeId("data-v-71abb175"),e=e(),a.popScopeId(),e),mHe={ref:"timeLine",class:"time-line"},pHe={class:"time-line__header"},hHe={class:"time-line__header__dot"},yHe={class:"time-line__header__dot__home-team team-logo"},gHe=["src"],uHe={class:"time-line__header__dot__away-team team-logo"},fHe=["src"],_He={class:"time-line__game-events"},bHe={key:1,class:"start-line"},wHe=G7(()=>a.createElementVNode("div",null,null,-1)),CHe=G7(()=>a.createElementVNode("div",null,null,-1)),kHe=[wHe,CHe],SHe={key:1,class:"noEventText"},EHe={class:"tooltip-data"},NHe=["src"];function xHe(e,t,o,n,s,i){const r=a.resolveComponent("TimeLineEvent"),c=a.resolveComponent("Tooltip");return a.openBlock(),a.createElementBlock(a.Fragment,null,[a.createElementVNode("div",mHe,[a.createElementVNode("div",pHe,[a.createElementVNode("div",hHe,[a.createElementVNode("div",yHe,[a.createElementVNode("img",{src:i.getTeamLogoSrc("homeTeam"),alt:""},null,8,gHe)]),a.createElementVNode("div",uHe,[a.createElementVNode("img",{src:i.getTeamLogoSrc("awayTeam"),alt:""},null,8,fHe)])])]),a.createElementVNode("div",_He,[o.gameData.status!==4||o.gameData.is_live?(a.openBlock(),a.createBlock(a.TransitionGroup,{key:0,name:s.transitionName,tag:"div"},{default:a.withCtx(()=>[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(i.gameEventsToShow,(h,d)=>(a.openBlock(),a.createElementBlock("div",{class:"time-line__game-events__grid",key:h.play_id},[a.createElementVNode("div",{ref_for:!0,ref:`gameEventDiv${d}`,class:a.normalizeClass(i.getGameEventClassAndSetIcon(h,d))},[a.createElementVNode("div",{class:a.normalizeClass(i.getEventContainerClass(h))},[a.createVNode(r,{"game-event":h,"is-mobile":i.isMobile,"time-line-width":s.timeLineWidth,width:i.gameEventWidth,onEventHeight:l=>i.updateContainerHeight(l,d),onPlayerChanged:t[0]||(t[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?(a.openBlock(),a.createElementBlock("div",{key:0,ref_for:!0,ref:`gameEventLine${d}`,class:"line"},null,512)):a.createCommentVNode("",!0),o.gameData.status===1&&d===i.gameEventsToShow.length-1?(a.openBlock(),a.createElementBlock("div",bHe,kHe)):a.createCommentVNode("",!0)],2)]))),128))]),_:1},8,["name"])):(a.openBlock(),a.createElementBlock("div",SHe,"Aún no comienza el partido"))])],512),a.createVNode(c,{data:s.dataVideo},{default:a.withCtx(()=>[a.createElementVNode("div",EHe,[a.createElementVNode("div",null,[a.createElementVNode("video",{class:"tooltip-video",controls:"",autoplay:"",src:s.dataVideo.link,format:"video/mp4"},null,8,NHe)])])]),_:1},8,["data"])],64)}const BHe=Bi(dHe,[["render",xHe],["__scopeId","data-v-71abb175"]]),$He={class:"game-time-line__options"},IHe={class:"game-time-line__timeline"},VHe={__name:"GSC-GameTimeLine",props:{game:{type:Object,default:()=>({id:79601,seasonId:1772,status:1,dateTimeUTC:"2023-10-01T22:20:00Z",is_live:0,homeTeam:{logo:"https://az755631.vo.msecnd.net/teams-80/18.png",team_id:18,provisional_logo:"https://az755631.vo.msecnd.net/teams-provisional/18.png",colloquial_name:"Toluca",acronym:"TOL",team_name:"Toluca"},awayTeam:{logo:"https://az755631.vo.msecnd.net/teams-80/1.png",team_id:1,provisional_logo:"https://az755631.vo.msecnd.net/teams-provisional/1.png",colloquial_name:"Chivas",acronym:"CHI",team_name:"Guadalajara"}})},socket:{type:Object,default:()=>({})}},setup(e){N7.defaults.headers.common.Authorization="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MCwibmFtZSI6IlVzdWFyaW8gRnJlZSIsInVzZXJuYW1lIjoiZnJlZUBnb2xzdGF0cy5jb20iLCJlbWFpbCI6ImZyZWVAZ29sc3RhdHMuY29tIiwiaWF0IjoxNjA2NzU4Nzk1LCJleHAiOjE2MzgyOTQ3OTV9.kPNmP7yDtk38cAXrUyc7OHRh6J25VFqy-XUNzbK-4YE";const t=a.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=a.ref({width:"auto",height:"30px",padding:"0px 20px",borderRadius:"50px",borderColor:"#8a8a8a",borderWidth:"0.5px",backgroundColor:"rgba(255, 255, 255, 0.04)",fontSize:"14px",fontFamily:"Poppins-Regular, sans-serif",fontColor:"rgba(255, 255, 255, 0.5)",activeFontColor:"#FFFFFF",activeBorderColor:"#cbee6b"});let n=null;const s=a.ref(["Todo","1er tiempo","2do tiempo"]),i=a.ref("Todo"),r=a.ref({}),c=a.ref(null),h=a.ref(0),d=a.computed(()=>{let y="all";return i.value==="1er tiempo"||i.value==="1er"?y="firstHalf":(i.value==="2do tiempo"||i.value==="2do")&&(y="secondHalf"),y}),l=a.computed(()=>h.value<500);function p(y){i.value=y}function g(y){r.value=y}function m(){if(window.ResizeObserver)n=new ResizeObserver(()=>{h.value=c.value.clientWidth}),n.observe(c.value);else throw new Error("Resize observer not supported!")}return a.onMounted(()=>{m()}),a.onBeforeUnmount(()=>{n&&n.unobserve(c.value)}),(y,u)=>(a.openBlock(),a.createElementBlock("div",{ref_key:"gameTimeLine",ref:c,class:"game-time-line"},[a.createElementVNode("div",$He,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(s.value,f=>(a.openBlock(),a.createElementBlock("div",{key:f,class:"game-time-line__options__option"},[a.createVNode(rLe,a.mergeProps(h.value<390?o.value:t.value,{text:f=="Todo"?f:h.value<390?f.substring(0,3):f,"is-active":i.value===f,onClick:b=>p(f)}),null,16,["text","is-active","onClick"])]))),128))]),a.createElementVNode("div",IHe,[a.createVNode(BHe,{"game-data":e.game,"time-line-period":d.value,"is-mobile":l.value,socket:e.socket,onGameEventsByPeriodFilled:g},null,8,["game-data","time-line-period","is-mobile","socket"])])],512))}},AHe=Bi(VHe,[["__scopeId","data-v-787294df"]]);function OHe(e){const t=a.ref({width:0,height:0});function o(){const n=e.value.getBoundingClientRect();t.value.width=n.width,t.value.height=n.height}return a.onMounted(()=>{o(),window.addEventListener("resize",o)}),a.onUnmounted(()=>{window.removeEventListener("resize",o)}),{elementSize:t}}const THe=(e,t)=>{const o=e.__vccOpts||e;for(const[n,s]of t)o[n]=s;return o},g0={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,t=this.$refs.content.scrollWidth;t>0&&e>0&&(t>e?(this.showRightArrow=!0,clearInterval(this.intervalid1)):clearInterval(this.intervalid1))}).bind(this),3e3)}}},W7=()=>{a.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}))},q7=g0.setup;g0.setup=q7?(e,t)=>(W7(),q7(e,t)):W7;const FHe={ref:"gscScrollableContainer",class:"scrollable-container"},zHe={class:"scrollable-arrows"},PHe=["width","height","viewBox"],DHe=["stroke"],RHe={class:"scrollable-wrapper"},vHe={class:"scrollable-arrows"},LHe=["width","height","viewBox"],jHe=["stroke"];function MHe(e,t,o,n,s,i){return a.openBlock(),a.createElementBlock("div",FHe,[o.arrows?(a.openBlock(),a.createElementBlock("div",{key:0,class:a.normalizeClass(["arrows-container",i.hideShowLeftArrow]),onClick:t[0]||(t[0]=(...r)=>i.scrollLeft&&i.scrollLeft(...r))},[a.createElementVNode("div",zHe,[(a.openBlock(),a.createElementBlock("svg",{width:o.arrowsWidth,height:o.arrowsHeight,viewBox:i.getViewBox,fill:"none",xmlns:"http://www.w3.org/2000/svg"},[a.createElementVNode("path",{d:"M6.36523 13.788L1.10146 8.52429C0.479824 7.90265 0.479824 6.88541 1.10147 6.26377L6.36523 1",stroke:o.arrowsColor},null,8,DHe)],8,PHe))])],2)):a.createCommentVNode("",!0),a.createElementVNode("div",{class:"scrollable-content scrollable-content-slider",ref:"content",onScroll:t[1]||(t[1]=(...r)=>i.getScroll&&i.getScroll(...r))},[a.createElementVNode("div",RHe,[a.renderSlot(e.$slots,"default",{},void 0,!0)])],544),o.arrows?(a.openBlock(),a.createElementBlock("div",{key:1,id:"arrows-container-right",class:a.normalizeClass(["arrows-container",i.hideShowRightArrow]),onClick:t[2]||(t[2]=(...r)=>i.scrollRight&&i.scrollRight(...r))},[a.createElementVNode("div",vHe,[(a.openBlock(),a.createElementBlock("svg",{width:o.arrowsWidth,height:o.arrowsHeight,viewBox:i.getViewBox,fill:"none",xmlns:"http://www.w3.org/2000/svg"},[a.createElementVNode("path",{d:"M0.634765 1.21195L5.89853 6.47571C6.52018 7.09735 6.52018 8.11459 5.89853 8.73623L0.634766 14",stroke:o.arrowsColor},null,8,jHe)],8,LHe))])],2)):a.createCommentVNode("",!0)],512)}const HHe=THe(g0,[["render",MHe],["__scopeId","data-v-b548a08d"]]),UHe=(e,t)=>{const o=e.__vccOpts||e;for(const[n,s]of t)o[n]=s;return o},u0={components:{GSCSlider:HHe},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=a.ref("myDivRef"),{elementSize:t}=OHe(e);return{myDivRef:e,elementSize:t}},methods:{clickEmitEvent(e){this.$emit("input",e)},customGrid(e){var t={};return e.width>768?t={fontSize:"16px"}:e.width>480?t={fontSize:"14px"}:t={fontSize:"12px"},t}}},J7=()=>{a.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}))},X7=u0.setup;u0.setup=X7?(e,t)=>(J7(),X7(e,t)):J7;const GHe={ref:"myDivRef"},WHe={key:0,class:"gs-switch-container"},qHe=["onClick"],JHe={key:1,class:"gs-switch-container-type"},XHe=["onClick"],ZHe={key:2,class:"gs-switch-container-carousel"},YHe=["onClick"];function KHe(e,t,o,n,s,i){const r=a.resolveComponent("GSCSlider");return a.openBlock(),a.createElementBlock("div",GHe,[o.type==0?(a.openBlock(),a.createElementBlock("div",WHe,[a.createElementVNode("div",{class:"gs-switch-container__control",style:a.normalizeStyle([i.customGrid(n.elementSize)])},[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(o.buttons,(c,h)=>(a.openBlock(),a.createElementBlock("div",{class:"gs-switch-container__control__button-option",style:a.normalizeStyle([{height:o.height},o.selectedOption==c?{borderColor:o.colorOptionActive,color:o.colorFont+"!important",background:o.backgroundOptionActive}:{borderColor:o.colorOptionDisable,color:"grey !important"}]),key:h,onClick:d=>(o.selectedOption=c,i.clickEmitEvent(c))},a.toDisplayString(c),13,qHe))),128))],4),a.renderSlot(e.$slots,o.selectedOption,{},void 0,!0)])):a.createCommentVNode("",!0),o.type==1?(a.openBlock(),a.createElementBlock("div",JHe,[a.createElementVNode("div",{class:"gs-switch-container-type__control",style:a.normalizeStyle([i.customGrid(n.elementSize)])},[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(o.buttons,(c,h)=>(a.openBlock(),a.createElementBlock("div",{class:"gs-switch-container-type__control__button-option-type",style:a.normalizeStyle([{height:o.height},o.selectedOption==c?{borderColor:o.colorOptionActive,color:o.colorFont+"!important",background:o.backgroundOptionActive}:{borderColor:o.colorOptionDisable,borderWidth:"0px",borderWidth:"0px !important",color:"grey !important",background:o.backgroundOptionDisable}]),key:h,onClick:d=>(o.selectedOption=c,i.clickEmitEvent(c))},a.toDisplayString(c),13,XHe))),128))],4)])):a.createCommentVNode("",!0),o.type==2?(a.openBlock(),a.createElementBlock("div",ZHe,[a.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:a.withCtx(()=>[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(o.buttons,(c,h)=>(a.openBlock(),a.createElementBlock("div",{class:"button-option-multi",style:a.normalizeStyle([{height:o.height},o.selectedOption==c?{borderColor:o.colorOptionActive,color:o.colorFont+"!important",background:o.backgroundOptionActive}:{borderColor:o.colorOptionDisable,color:"grey !important"}]),key:h,onClick:d=>(o.selectedOption=c,i.clickEmitEvent(c))},a.toDisplayString(c),13,YHe))),128))]),_:1},8,["arrows","background-color","px-scroll","scroll-color","arrows-position","arrowsScrollHide","arrows-background","arrows-container-bg-l","arrows-container-bg-r","arrows-margin","arrows-radius","arrows-border"])])):a.createCommentVNode("",!0)],512)}const Z7=UHe(u0,[["render",KHe],["__scopeId","data-v-8a86dfaf"]]);function Y7(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function QHe(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var o=function n(){return this instanceof n?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};o.prototype=t.prototype}else o={};return Object.defineProperty(o,"__esModule",{value:!0}),Object.keys(e).forEach(function(n){var s=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(o,n,s.get?s:{enumerable:!0,get:function(){return e[n]}})}),o}var f0={exports:{}};function _0(){}_0.prototype={on:function(e,t,o){var n=this.e||(this.e={});return(n[e]||(n[e]=[])).push({fn:t,ctx:o}),this},once:function(e,t,o){var n=this;function s(){n.off(e,s),t.apply(o,arguments)}return s._=t,this.on(e,s,o)},emit:function(e){var t=[].slice.call(arguments,1),o=((this.e||(this.e={}))[e]||[]).slice(),n=0,s=o.length;for(n;n<s;n++)o[n].fn.apply(o[n].ctx,t);return this},off:function(e,t){var o=this.e||(this.e={}),n=o[e],s=[];if(n&&t)for(var i=0,r=n.length;i<r;i++)n[i].fn!==t&&n[i].fn._!==t&&s.push(n[i]);return s.length?o[e]=s:delete o[e],this}},f0.exports=_0,f0.exports.TinyEmitter=_0;var eUe=f0.exports,tUe=eUe,aUe=new tUe;const Bd=Y7(aUe),rJe="",oUe={class:"game-data__header"},nUe={class:"game-data__header__tournament-season-dropdown"},sUe={class:"game-data__header__teams-carousel"},iUe={class:"game-data__body"},rUe={class:"game-data__body__menu"},lUe={class:"game-data__body__menu__contmenuswitch"};_r.defaults.headers.common.Authorization="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MCwibmFtZSI6IlVzdWFyaW8gRnJlZSIsInVzZXJuYW1lIjoiZnJlZUBnb2xzdGF0cy5jb20iLCJlbWFpbCI6ImZyZWVAZ29sc3RhdHMuY29tIiwiaWF0IjoxNjA2NzU4Nzk1LCJleHAiOjE2MzgyOTQ3OTV9.kPNmP7yDtk38cAXrUyc7OHRh6J25VFqy-XUNzbK-4YE";const cUe=a.defineComponent({name:"TemplateVideos",components:{StatisticsMain:Rz,GSCGameTimeLine:AHe,GscSwitchComponent:Z7,GSCLineupsMain:iK,GSCDatosGSMain:Yre,GSCVideoGame:S1e,GSCSummaryMain:sLe}}),dUe=De(Object.assign(cUe,{props:{currentSeasonId:{type:Number,default:0},defaultGameId:{type:Number,default:0,validator(e){return!Number.isNaN(e)&&e>=0}},sortCalendar:{type:Boolean,default:!0},socket:{type:Object,default:()=>({})}},emits:["openmedia","change-season-id","onOpenProfile"],setup(e,{emit:t}){const o=e,n=fm();Bd.on("socket-connected",()=>{n.commit("nextGeneral/updateIsSocketConnected",o.socket.connected)});const s=a.ref({season:[]}),i=a.ref({}),r=a.ref({}),c=a.ref(!0),h=a.ref("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MCwibmFtZSI6IlVzdWFyaW8gRnJlZSIsInVzZXJuYW1lIjoiZnJlZUBnb2xzdGF0cy5jb20iLCJlbWFpbCI6ImZyZWVAZ29sc3RhdHMuY29tIiwiaWF0IjoxNjA2NzU4Nzk1LCJleHAiOjE2MzgyOTQ3OTV9.kPNmP7yDtk38cAXrUyc7OHRh6J25VFqy-XUNzbK-4YE"),d=a.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 l=null;const p=a.ref(null),g=a.ref(0),m=a.ref(d.value[0]);let y=a.ref("");const u=a.computed(()=>{const V=[];return i.value&&i.value.id&&(V.push({id:i.value.id,name:i.value.name,type:i.value.type}),i.value.related_seasons&&i.value.related_seasons.forEach(A=>{V.push({id:A.id,type:A.type})})),V});function f(){l=new ResizeObserver(V=>{for(const A of V)g.value=A.contentRect.width}),l.observe(p.value)}const b=a.computed(()=>{let V={};return r.value&&r.value.game_id&&(V={gameId:r.value.game_id,id:r.value.game_id,seasonId:r.value.season_id,status:r.value.game_status,game_status:r.value.game_status==0?4:r.value.game_status,dateTimeUTC:r.value.date_time_utc,homeTeam:r.value.home_team,awayTeam:r.value.visiting_team,is_live:r.value.is_live}),V});a.watch(()=>n.state.nextGeneral.gameForAnalysis,()=>{n.commit("nextGeneral/updateIsSocketConnected",o.socket.connected)},{deep:!0,immediate:!0});function C(V){s.value=V,V.is_captured===0?c.value=!1:c.value=!0,s.value.id!==V.id&&(s.value=V)}function w(V){t("openmedia",V)}function _(V){t("onOpenProfile",V)}function k(V){$(V),V=="Estadísticas"&&(y.value="Comparativa")}function x(){y.value=""}function I(V){i.value.id!==V.id&&(i.value=V,t("change-season-id",V.id))}const E=a.computed(()=>d.value.map(V=>{if(c.value)return V.name;if(V.id!==5&&V.id!==6)return V.name}).filter(V=>V!=null));function $(V){m.value=d.value.find(A=>A.name===V)||d.value[0]}a.onMounted(()=>{f()}),a.onBeforeUnmount(()=>{l&&l.disconnect()});function O(V){r.value=V}return(V,A)=>(a.openBlock(),a.createElementBlock("div",{class:"game-data",ref_key:"gamedata",ref:p},[a.createElementVNode("div",oUe,[a.createElementVNode("div",nUe,[a.createVNode(a.unref(N9),{"current-season-id":e.currentSeasonId,onInput:C},null,8,["current-season-id"]),a.createVNode(a.unref(J9),{"current-season-id":e.currentSeasonId,seasons:s.value.seasons,onInput:I},null,8,["current-season-id","seasons"])]),a.createElementVNode("div",sUe,[a.createVNode(a.unref(o$),{token:h.value,"await-for-seasons":"",seasons:u.value,"is-pagination-visible":!1,"are-games-carousel-type":"","default-game-id":o.defaultGameId,"sort-calendar":o.sortCalendar,onChangeGameCarousel:O},null,8,["token","seasons","default-game-id","sort-calendar"])])]),a.createElementVNode("div",iUe,[a.createElementVNode("div",rUe,[a.createElementVNode("div",lUe,[a.createVNode(a.unref(Z7),{type:2,buttons:E.value,"font-family":"Poppins-Regular","font-size":"16px",width:g.value<400||g.value<700?"max-content":g.value<840||g.value<1050?"155px":"165px","selected-option":m.value.name,borderWidth:"1px",arrow:!1,height:"30px",onInput:$},null,8,["buttons","width","selected-option"])])]),(a.openBlock(),a.createBlock(a.resolveDynamicComponent(m.value.componentName),{game:b.value,subsection:a.unref(y),seasonSelected:i.value,showLineups:c.value,onResetSubsection:x,onOpenmedia:w,onOnOpenProfile:_,onChangeToTab:k,socket:e.socket},null,40,["game","subsection","seasonSelected","showLineups","socket"]))])],512))}}),[["__scopeId","data-v-2fe621c6"]]);async function Ct({url:e,options:t={},retries:o=3}){return await _r.get(e,t).then(n=>n).catch(n=>o>0?Ct({url:e,options:t,retries:o-1}):n)}async function K7({seasonId:e},t=!0){try{const o={url:`https://b5lrr2nc0h.execute-api.us-west-2.amazonaws.com/prod/statisticsLeagueBySeason/${e}`};t&&(o.url=`https://golstats-microservices.s3-us-west-2.amazonaws.com/statsLeagueBySeason-${e}.json`,o.retries=1);const{data:{data:n}}=await Ct(o);return n}catch(o){if(t)return K7({seasonId:e},!1);throw new Error(o)}}async function mUe({seasonId:e}){try{return(await Ct({url:`https://iwxfzq6e2h.execute-api.us-west-2.amazonaws.com/prod/v2/statisticsLeagueBySeason/${e}`})).data.data}catch(t){return Promise.reject(t)}}async function pUe({seasonId:e}){try{return(await Ct({url:`https://sqf4rkvoge.execute-api.us-west-2.amazonaws.com/prod/v3/statisticsGroupedBySeason/${e}`})).data.data}catch(t){return Promise.reject(t)}}function hUe(e,t,o,n,s,i,r=!1){const c=o.map(h=>h===1?2:h===2?1:3);return e.filter(h=>{const d=i&&h[s.teamId]?h[s.teamId]!==i:!1,l=t===1?2:1;return(r||n.includes(h[s.gameId]))&&(!t||(d?l:t)===h[s.playingAs])&&(o.includes(h[s.matchResult])&&h[s.teamId]===i||c.includes(h[s.matchResult])&&h[s.teamId]!==i)})}function Q7(e,t,o,n,s){return t.length===2&&o.length===3&&n.length===6?e:e.filter(i=>t.includes(i[s.playingAs])&&o.includes(i[s.matchResult])&&n.includes(i[s.section]))}async function eS({seasonId:e}){try{const t=`https://8tvo5bp9ai.execute-api.us-west-2.amazonaws.com/prod/gamesBySeason/${e}`;return(await Ct({url:t})).data}catch(t){return Promise.reject(t)}}async function yUe({seasonId:e,gameId:t}){try{const o=`https://iwxfzq6e2h.execute-api.us-west-2.amazonaws.com/prod/v2/statisticsLeagueBySeason/${e}/games/${t}`,{data:n}=await Ct({url:o});return n}catch(o){return Promise.reject(o)}}async function gUe({gameId:e}){try{const t=`https://2uj7ojhmt5.execute-api.us-west-2.amazonaws.com/prod/V2/statisticsLive/${e}`;return(await Ct({url:t})).data.data}catch(t){return Promise.reject(t)}}async function uUe({gameId:e}){try{const t=`https://55sbpmq0f5.execute-api.us-west-2.amazonaws.com/prod/specialMentions/${e}`;return(await Ct({url:t})).data.data||[]}catch(t){return Promise.reject(t)}}const fUe=["categoryId","matchLapse","section","matchResult","playingAs","total"];let b0=null;function tS(){return b0||(b0=lr(fUe)),b0}async function _Ue(e){try{const t=`https://d2oco6mqmc.execute-api.us-west-2.amazonaws.com/prod/teamsBySeason/${e.seasonId}`;return(await Ct({url:t})).data}catch(t){return Promise.reject(t)}}async function aS({seasonId:e,teamId:t}){try{return await Ct({url:`https://a4dcb6avog.execute-api.us-west-2.amazonaws.com/prod/v2/statisticsTeamBySeason/${e}/${t}`})}catch(o){return Promise.reject(o)}}async function bUe(e){try{const t=`https://yjeig444bb.execute-api.us-west-2.amazonaws.com/prod/teamsBySeason/${e.seasonId}`;return await Ct({url:t})}catch(t){return Promise.reject(t)}}async function wUe(e){try{return await Ct({url:`https://nckawv8v3b.execute-api.us-west-2.amazonaws.com/prod/v2/statisticsByGame/${e.gameId}`})}catch(t){return Promise.reject(t)}}const CUe={leagueGeneral:{namespaced:!0,state:{seasonPlays:[],currentSeasonGames:[],currentSeasonTeams:[],selectedRound:1,booleanAreLiveGames:!1,booleanIsLiveGamesModalOpen:!1},getters:{seasonPlays:e=>e.seasonPlays,filteredPlaysStack(e,t,o,n){return hUe(e.seasonPlays,n["filterGeneral/getPlayingAs"],n["filterGeneral/getResults"],n["filterGeneral/getSelectedGamesIds"],tS(),n["teamsGeneral/team"].team_id,!0)},nextGamesSchedule(e){const t=e.currentSeasonGames.reduce((o,n)=>{const s={...n};return s.home_team=e.currentSeasonTeams.find(i=>i.team_id===n.home_team),s.visiting_team=e.currentSeasonTeams.find(i=>i.team_id===n.visiting_team),o[n.matchday_abbreviation]?o[n.matchday_abbreviation][n.game_status===3?"canceled":n.date]?o[n.matchday_abbreviation][n.game_status===3?"canceled":n.date].push(s):o[n.matchday_abbreviation][n.game_status===3?"canceled":n.date]=[s]:o[n.matchday_abbreviation]={[n.game_status===3?"canceled":n.date]:[s]},o},{});for(let[o,n]of Object.entries(t))t[o]=Object.entries(n).map(([s,i])=>({date:s,games:i})),t[o].sort((s,i)=>s.date<i.date?-1:s.date>i.date?1:0);return t},matchdaysDates(e,t){let o=[];if(t.nextGamesSchedule){let n=Object.keys(t.nextGamesSchedule);for(let s of n){let i=Number(s.replace("M","")),r=t.nextGamesSchedule[s].map(c=>({matchday:i,date:new Date(c.date)}));o=o.concat(r)}}return o},closestMatchDay(e,t){let o=new Date,n=0,s=-new Date(0,0,0).valueOf(),i=t.matchdaysDates,r=i.length;for(let c=0;c<i.length;c++)n=Math.abs(i[c].date-o),n<s&&(r=c,s=n);return i[r]?i[r].matchday:1}},mutations:{setBooleanIsLiveGamesModalOpen(e,t){e.booleanIsLiveGamesModalOpen=t},setBooleanAreLiveGames(e,t){e.booleanAreLiveGames=t},updateSeasonPlays(e,t){e.seasonPlays=t},updateCurrentSeasonTeams(e,t){e.currentSeasonTeams=t},updateCurrentSeasonGames(e,t){e.currentSeasonGames=t},updateSelectedRound(e,t){e.selectedRound=t}},actions:{async getSeasonPlays({commit:e,rootGetters:t},o=!1){try{const n=await K7({seasonId:t["filterGeneral/getSeasonId"]});if(o)return n;e("updateSeasonPlays",n)}catch(n){return Promise.reject(n)}},async getCurrentSeasonGames({commit:e,rootGetters:t}){try{const o=await eS({seasonId:t["loginGeneral/seasonId"]});e("updateCurrentSeasonGames",o)}catch(o){return Promise.reject(o)}},async getCurrentSeasonTeams({commit:e,rootGetters:t}){try{const o=await _Ue({seasonId:t["loginGeneral/seasonId"]});e("updateCurrentSeasonTeams",o.teams)}catch(o){return Promise.reject(o)}},async isDataFilled({state:e,dispatch:t,commit:o}){try{if(e.currentSeasonGames.length>0&&e.currentSeasonTeams.length>0)return o("setIsSectionLoading",!1,{root:!0}),!0;const n=[void 0,void 0];return e.currentSeasonGames.length===0&&(n[0]=t("getCurrentSeasonGames")),e.currentSeasonTeams.length===0&&(n[1]=t("getCurrentSeasonTeams")),await Promise.all(n),!1}catch(n){throw new Error(n)}}}}};async function kUe({filter:e}){try{const t=`https://n7ielynjxk.execute-api.us-east-2.amazonaws.com/qa/filters?filters=${e}`,{data:o}=await Ct({url:t});return o}catch(t){return Promise.reject(t)}}const SUe=["categoryId","teamId","matchResult","playingAs","matchLapse","section","total"];let w0=null;function EUe(){return w0||(w0=lr(SUe)),w0}class $d{constructor(){Le(this,"maximumLiveSection",1);Le(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:[]});Le(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(t){t>this.maximumLiveSection&&(this.maximumLiveSection=t)}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(t,o,n){n&&(this.setMaximumLiveSection(t),this.accomplished.totalLive+=o,this.accomplished.totalsLiveTrendLive.sections[t-1]+=o,this.increaseTrendLiveAccumulatedByOne(this.accomplished.totalsLiveTrendLive,t,o)),this.accomplished.totalPostGame+=o,this.accomplished.avgPostGameTrendLive.sections[t-1]+=o,this.increaseTrendLiveAccumulatedByOne(this.accomplished.avgPostGameTrendLive,t,o)}increaseReceivedByOne(t,o,n){n&&(this.setMaximumLiveSection(t),this.received.totalLive+=o,this.received.totalsLiveTrendLive.sections[t-1]+=o,this.increaseTrendLiveAccumulatedByOne(this.received.totalsLiveTrendLive,t,o)),this.received.totalPostGame+=o,this.received.avgPostGameTrendLive.sections[t-1]+=o,this.increaseTrendLiveAccumulatedByOne(this.received.avgPostGameTrendLive,t,o)}increaseTrendLiveAccumulatedByOne(t,o,n){for(let s=o-1;s<t.accumulated.length;s++)t.accumulated[s]+=n}decreaseAccomplishedLiveByOne(t,o){this.accomplished.totalLive>0&&(this.accomplished.totalLive-=o),this.accomplished.totalsLiveTrendLive.sections[t-1]>0&&(this.accomplished.totalsLiveTrendLive.sections[t-1]-=o,this.decreaseTotalsLiveTrendLiveAccumulatedByOne(this.accomplished.totalsLiveTrendLive,t,o))}decreaseReceivedLiveByOne(t,o){this.received.totalLive>0&&(this.received.totalLive-=o),this.received.totalsLiveTrendLive.sections[t-1]>0&&(this.received.totalsLiveTrendLive.sections[t-1]-=o,this.decreaseTotalsLiveTrendLiveAccumulatedByOne(this.received.totalsLiveTrendLive,t,o))}decreaseTotalsLiveTrendLiveAccumulatedByOne(t,o,n){for(let s=t.accumulated.length-1;s>=o-1;s--)t.accumulated[s]-=n}calculateAvg(t){t&&(this.accomplished.avgPostGame=this.accomplished.totalPostGame/t,this.received.avgPostGame=this.received.totalPostGame/t,this.accomplished.avgPostGameTrendLive.sections=this.getAvgPostGameTrendLiveAvg(this.accomplished.avgPostGameTrendLive.sections,t),this.accomplished.avgPostGameTrendLive.accumulated=this.getAvgPostGameTrendLiveAvg(this.accomplished.avgPostGameTrendLive.accumulated,t),this.received.avgPostGameTrendLive.sections=this.getAvgPostGameTrendLiveAvg(this.received.avgPostGameTrendLive.sections,t),this.received.avgPostGameTrendLive.accumulated=this.getAvgPostGameTrendLiveAvg(this.received.avgPostGameTrendLive.accumulated,t))}getAvgPostGameTrendLiveAvg(t,o){return t.map(n=>n/o)}calculateRanking(t,o,n,s,i,r,c,h){let d=[];s===3&&t&&t.length&&(n.playingAs.length!==2||n.matchResult.length!==3)?d=Array.from(t.reduce((p,g)=>{const m=g[o.playingAs]===1,y=m?"1":"2",u=p.get(g[o.gameId]);if(u)u[y]?u[y].arrayPlays.push(g):u[y]={numberTeamId:g[o.teamId],arrayPlays:[g]};else{const f={numberMatchResult:g[o.matchResult]};m&&(f[1]={numberTeamId:g[o.teamId],arrayPlays:[g]}),p.set(g[o.gameId],f)}return p},new Map).values()).reduce((p,g)=>{const m=n.playingAs.length===2?"both":n.playingAs[0].toString();return(m==="both"&&(g[1].numberTeamId===n.teamId||g[2].numberTeamId===n.teamId)||m!=="both"&&g[m].numberTeamId===n.teamId)&&n.matchResult.includes(g.numberMatchResult)&&p.push(...g[1].arrayPlays,...g[2].arrayPlays),p},[]).filter(p=>n.sections.includes(p[o.section])):(d=t?[...t]:[],c&&t&&(d=t.filter(l=>n.playingAs.includes(l[o.playingAs])&&n.matchResult.includes(l[o.matchResult])&&n.sections.includes(l[o.section])))),this.setTeamRanking(d,s,o,n.teamId,r,"accomplished",h)}setTeamRanking(t,o,n,s,i,r,c){let h=null,d=null;o===3&&(h=new Map,d={},t.forEach(g=>{const m=h.get(g[n.gameId]);m?m[g[n.teamId.toString()]]?m[g[n.teamId.toString()]]+=g[n.total]:m[g[n.teamId.toString()]]=g[n.total]:h.set(g[n.gameId],{[g[n.teamId.toString()]]:g[n.total]})}),Array.from(h.values()).forEach(g=>{const[m,y]=Object.keys(g).map(f=>f),u=g[m]+g[y];this.addPassesAvgByTeam(d,m,u?g[m]/u:0),this.addPassesAvgByTeam(d,y,u?g[y]/u:0)}));const l=i.sort((g,m)=>g.team_id-m.team_id).map(g=>{if(o===3){const m=d[g.team_id.toString()];return{teamId:g.team_id,points:m?m.numberTotalPassesAvg/m.numberGamesCount:0,total:m?m.numberTotalPassesAvg:0}}else{const m=t.reduce((y,u)=>u[n.teamId]===g.team_id&&o===u[n.categoryId]?y+u[n.total]:y,0);return{teamId:g.team_id,points:g[`${c}FilterGames`]?m/g[`${c}FilterGames`]:0,total:m}}}).sort((g,m)=>m.points-g.points);this.accomplished.arrayRankings=l;const p=l.findIndex(g=>g.teamId===s);o===3&&(this.accomplished.avgPreGame=l[p].points),this[r].ranking=p+1,this[r].leader=l[0]}addPassesAvgByTeam(t,o,n){t[o]?(t[o].numberGamesCount+=1,t[o].numberTotalPassesAvg+=n):t[o]={numberGamesCount:1,numberTotalPassesAvg:n}}}class de{constructor(t,o,n,s,i,r,c,h,d,l){Le(this,"id","");Le(this,"generalId",0);Le(this,"name","");Le(this,"names",{"0-0":"","1-1":"","0-1":"","1-0":""});Le(this,"mentions",{"0-0":"","1-1":"","0-1":"","1-0":""});Le(this,"accomplishedCategoryIds",[]);Le(this,"receivedCategoryIds",[]);Le(this,"generalCategoriesIds",{accomplished:0,received:0});Le(this,"specialMention","");Le(this,"homeTeam",new $d);Le(this,"visitingTeam",new $d);Le(this,"isLeagueDataCalculated",!1);Le(this,"leagueAccomplishedMax",0);Le(this,"leagueReceivedMax",0);Le(this,"leagueAccomplishedAvg",0);Le(this,"leagueReceivedAvg",0);Le(this,"leagueAccomplishedAccumulator",0);Le(this,"leagueReceivedAccumulator",0);Le(this,"homeTeamType","homeTeam");Le(this,"visitingTeamType","visitingTeam");Le(this,"betOnly",!1);Le(this,"isPercent",!1);this.id=`${n.accomplished}-${n.received}`,this.accomplishedCategoryIds=t||[],this.receivedCategoryIds=o||[],this.generalCategoriesIds=n||{accomplished:0,received:0},this.name=s,this.names["0-0"]=s||"",this.names["1-1"]=i||"",this.names["0-1"]=r||"",this.names["1-0"]=c||"",this.generalId=h||0,this.betOnly=d||!1,this.isPercent=l||!1}addLeaguePlays(t,o,n){t.length===0||!n||this.isLeagueDataCalculated||(t.forEach(s=>{this.isAccomplishedLeaguePlay(s[o.categoryId])&&(this.leagueAccomplishedAccumulator+=s[o.total]),this.isReceivedLeaguePlay(s[o.categoryId])&&(this.leagueReceivedAccumulator+=s[o.total])}),this.leagueAccomplishedAvg=(this.leagueAccomplishedAccumulator/(2*n)).toFixed(2),this.leagueAccomplishedMax=Math.round(this.leagueAccomplishedAvg*1.5),this.leagueReceivedAvg=(this.leagueReceivedAccumulator/(2*n)).toFixed(2),this.leagueReceivedMax=Math.round(this.leagueReceivedAvg*1.5),this.isLeagueDataCalculated=!0)}addSpecialMention(t,o,n){let s="-";for(const[i,r]of Object.entries(this.generalCategoriesIds))t===r&&(s=`${i==="accomplished"?"0":"1"}${s}`),o===r&&(s=`${s}${i==="accomplished"?"0":"1"}`);s.length===3&&(this.mentions[s]=n)}resetMentions(){this.mentions={"0-0":"","1-1":"","0-1":"","1-0":""}}addTeamPlays(t,o,n,s,i){!n||!i||t!==this.homeTeamType&&t!==this.visitingTeamType||(n.forEach(r=>{this.isAccomplishedPlay(r[s.categoryId])?this[t].increaseAccomplishedByOne(r[s.section],r[s.total]):this.isReceivedPlay(r[s.categoryId])&&this[t].increaseReceivedByOne(r[s.section],r[s.total])}),this[t].calculateAvg(i))}addLivePlay(t,o,n,s,i=!1,r=!1){(t===this.homeTeamType||t===this.visitingTeamType)&&n[s.categoryId].includes(this.generalCategoriesIds.accomplished)&&this[t].increaseAccomplishedByOne(n[s.section],n[s.total],!0)}subtractLivePlay(t,o,n,s,i){(t===this.homeTeamType||t===this.visitingTeamType)&&(this.isAccomplishedPlay(n[s.categoryId])&&!i?this[t].decreaseAccomplishedLiveByOne(n[s.section],n[s.total]):this.isReceivedPlay(n[s.categoryId])&&i&&this[t].decreaseReceivedLiveByOne(n[s.section],n[s.total]))}isAccomplishedLeaguePlay(t){return!!(this.receivedCategoryIds[0]===40?this.receivedCategoryIds:this.accomplishedCategoryIds).find(n=>t===n||`${t}_r`===n)}isReceivedLeaguePlay(t){return!!this.receivedCategoryIds.find(o=>t===o)}isAccomplishedPlay(t){return this.generalCategoriesIds.accomplished===t}isReceivedPlay(t){return this.generalCategoriesIds.received===t}calcRankingLeague(t,o,n,s,i,r=!1){this[this.homeTeamType].calculateRanking(t,o,n,this.generalCategoriesIds.accomplished,this.generalCategoriesIds.received,i,r,this.homeTeamType),this[this.visitingTeamType].calculateRanking(t,o,s,this.generalCategoriesIds.accomplished,this.generalCategoriesIds.received,i,r,this.visitingTeamType)}resetData(){this.homeTeam=new $d,this.visitingTeam=new $d,this.isLeagueDataCalculated=!1,this.leagueAccomplishedMax=0,this.leagueReceivedMax=0,this.leagueAccomplishedAvg=0,this.leagueReceivedAvg=0,this.leagueAccomplishedAccumulator=0,this.leagueReceivedAccumulator=0}isInGeneralCategory(t){return this.generalCategoriesIds.accomplished===t||this.generalCategoriesIds.received===t}}const NUe={general:{name:"General",priority:1,parentInfo:{parentAnalysis:[1],analysisTypeBlocks:[1]},subcategories:{goals:new de([12,55,"35_r","54_r"],null,{accomplished:1,received:0},"Goles","Goles recibidos","Goles realizados / recibidos","Goles recibidos / realizados",1),shotToGoal:new de([91,95,158,167,176,343,330,333,423],null,{accomplished:2,received:0},"Remates a destino","","","",1),possession:new de([2,3,20,21],null,{accomplished:3,received:0},"Posesión","","","",1,!1,!0),yellowCards:new de([14,52],null,{accomplished:4,received:0},"Tarjetas amarillas","","","",1),redCards:new de([15,53],null,{accomplished:5,received:0},"Tarjetas rojas","","","",1),centerCrosses:new de([13,25],null,{accomplished:6,received:0},"Centros totales","","","",1)}},offensive:{name:"Ofensivo",priority:2,parentInfo:{parentAnalysis:[1],analysisTypeBlocks:[1]},subcategories:{shotsOnGoal:new de([19],null,{accomplished:7,received:0},"Tiros a gol","","","",1),shotsOnGoalDestination:new de([91,95],null,{accomplished:8,received:0},"Tiros a gol destino","","","",1),shotToGoal:new de([91,95,158,167,176,343,330,333,423],null,{accomplished:2,received:0},"Remates a destino","","","",1),ballsWonOpponentPenaltyBox:new de([11],null,{accomplished:10,received:0},"Balones ganados área rival","","","",1),centersFromRight:new de([25],null,{accomplished:11,received:0},"Centros por derecha","","","",1),centersFromLeft:new de([13],null,{accomplished:12,received:0},"Centros por izquierda","","","",1),success1VS1:new de([4],null,{accomplished:13,received:0},"Enfrentamientos ofensivos exitosos","","","",1),unsuccess1VS1:new de([209],null,{accomplished:14,received:0},"Enfrentamientos ofensivos no exitosos","","","",1)}},defensive:{name:"Defensivo",priority:3,parentInfo:{parentAnalysis:[1],analysisTypeBlocks:[1]},subcategories:{saves:new de([39],null,{accomplished:15,received:0},"Atajadas","","","",1),ballsWonOwnPenaltyBox:new de([23],null,{accomplished:16,received:0},"Balones ganados área propia","","","",1),success1VS1:new de([5],null,{accomplished:17,received:0},"Enfrentamientos defensivos exitosos","","","",1),unsuccess1VS1:new de([209],null,{accomplished:18,received:0},"Enfrentamientos defensivos no exitosos","","","",1),aerialGame:new de([24],null,{accomplished:19,received:0},"Juego aéreo resto del campo","","","",1),clearances:new de([34],null,{accomplished:20,received:0},"Rechaces","","","",1)}},possession:{name:"Posesión",priority:4,parentInfo:{parentAnalysis:[1],analysisTypeBlocks:[1]},subcategories:{totalPasses:new de([2,3,20,21],null,{accomplished:21,received:0},"Pases totales","","","",1),successPasses:new de([2,20],null,{accomplished:22,received:0},"Pases acertados","","","",1),successPassesRivalHalf:new de([20],null,{accomplished:23,received:0},"Pases acertados en cancha rival","","","",1),ballsRecoveredInChallenge:new de([483],null,{accomplished:24,received:0},"Balones recuperados en disputa","","","",1),ballsRecoveredWithoutChallenge:new de([484],null,{accomplished:25,received:0},"Balones recuperados sin disputa","","","",1),ballsLostInChallenge:new de([494],null,{accomplished:26,received:0},"Balones perdidos en disputa","","","",1),ballsLostWithoutChallenge:new de([495],null,{accomplished:27,received:0},"Balones perdidos sin disputa","","","",1)}},stoppedBall:{name:"Balón parado",priority:5,parentInfo:{parentAnalysis:[1],analysisTypeBlocks:[1]},subcategories:{freeKick44:new de([155,164,173,362,371,380],null,{accomplished:28,received:0},"Tiros libres 4/4","","","",1),freeKick34:new de([150,357],null,{accomplished:29,received:0},"Tiros libres 3/4","","","",1),freeKickOwnHalf:new de([149,356],null,{accomplished:30,received:0},"Tiros libres cancha propia","","","",1),cornerFromRight:new de([32],null,{accomplished:31,received:0},"Tiros de esquina por derecha","","","",1),cornerFromLeft:new de([31],null,{accomplished:32,received:0},"Tiros de esquina por izquierda","","","",1),goalKick:new de([264,28],null,{accomplished:33,received:0},"Saques de meta","","","",1)}},penalties:{name:"Infracciones",priority:6,parentInfo:{parentAnalysis:[1],analysisTypeBlocks:[1]},subcategories:{totalFouls:new de([17,50],null,{accomplished:34,received:0},"Faltas totales","","","",1),foulOwnGoal:new de([348,478],null,{accomplished:35,received:0},"Faltas cerca de su propia portería","","","",1),fieldFouls:new de([349,350,479,480],null,{accomplished:36,received:0},"Faltas resto del campo","","","",1),penaltyKick:new de([461,481],null,{accomplished:37,received:0},"Penales cometidos","","","",1),offside:new de([33],null,{accomplished:38,received:0},"Fueras de lugar","","","",1)}}},xUe=[{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}],BUe=["teamId","categoryId","matchlapse","section","matchResult","playingAs","total","gameId"];let C0=null;function $Ue(){return C0||(C0=lr(BUe)),C0}const IUe=["playId","gameId","teamId","playerId","momentOfPlay","categoryId","categoryType","matchLapse","section","matchResult","playingAs","total","coordinate1X","coordinate1Y","coordinate2X","coordinate2Y","coordinate3X","coordinate3Y"];let k0=null;function VUe(){return k0||(k0=lr(IUe)),k0}function Id(e,t,o){return[o.get(e[t.categoryId])||[],e[t.teamId],e[t.matchResult],e[t.playingAs],e[t.matchLapse],e[t.section],e[t.total]]}function oS(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 S0(e,t,o){let n=[...t];return e[o.categoryId]===2&&(n[0]=14),e[o.categoryId]===20&&(n[0]=15),[14,15].includes(n[0])?n:null}var E0={exports:{}},AUe=/^(?:(?![^:@]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,OUe=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],nS=function(t){var o=t,n=t.indexOf("["),s=t.indexOf("]");n!=-1&&s!=-1&&(t=t.substring(0,n)+t.substring(n,s).replace(/:/g,";")+t.substring(s,t.length));for(var i=AUe.exec(t||""),r={},c=14;c--;)r[OUe[c]]=i[c]||"";return n!=-1&&s!=-1&&(r.source=o,r.host=r.host.substring(1,r.host.length-1).replace(/;/g,":"),r.authority=r.authority.replace("[","").replace("]","").replace(/;/g,":"),r.ipv6uri=!0),r.pathNames=TUe(r,r.path),r.queryKey=FUe(r,r.query),r};function TUe(e,t){var o=/\/{2,9}/g,n=t.replace(o,"/").split("/");return(t.substr(0,1)=="/"||t.length===0)&&n.splice(0,1),t.substr(t.length-1,1)=="/"&&n.splice(n.length-1,1),n}function FUe(e,t){var o={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(n,s,i){s&&(o[s]=i)}),o}var N0={exports:{}},x0={exports:{}},Ti=1e3,Fi=Ti*60,zi=Fi*60,Pi=zi*24,zUe=Pi*365.25,PUe=function(e,t){t=t||{};var o=typeof e;if(o==="string"&&e.length>0)return DUe(e);if(o==="number"&&isNaN(e)===!1)return t.long?vUe(e):RUe(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function DUe(e){if(e=String(e),!(e.length>100)){var t=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(e);if(t){var o=parseFloat(t[1]),n=(t[2]||"ms").toLowerCase();switch(n){case"years":case"year":case"yrs":case"yr":case"y":return o*zUe;case"days":case"day":case"d":return o*Pi;case"hours":case"hour":case"hrs":case"hr":case"h":return o*zi;case"minutes":case"minute":case"mins":case"min":case"m":return o*Fi;case"seconds":case"second":case"secs":case"sec":case"s":return o*Ti;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return o;default:return}}}}function RUe(e){return e>=Pi?Math.round(e/Pi)+"d":e>=zi?Math.round(e/zi)+"h":e>=Fi?Math.round(e/Fi)+"m":e>=Ti?Math.round(e/Ti)+"s":e+"ms"}function vUe(e){return Vd(e,Pi,"day")||Vd(e,zi,"hour")||Vd(e,Fi,"minute")||Vd(e,Ti,"second")||e+" ms"}function Vd(e,t,o){if(!(e<t))return e<t*1.5?Math.floor(e/t)+" "+o:Math.ceil(e/t)+" "+o+"s"}(function(e,t){t=e.exports=n.debug=n.default=n,t.coerce=h,t.disable=r,t.enable=i,t.enabled=c,t.humanize=PUe,t.instances=[],t.names=[],t.skips=[],t.formatters={};function o(d){var l=0,p;for(p in d)l=(l<<5)-l+d.charCodeAt(p),l|=0;return t.colors[Math.abs(l)%t.colors.length]}function n(d){var l;function p(){if(p.enabled){var g=p,m=+new Date,y=m-(l||m);g.diff=y,g.prev=l,g.curr=m,l=m;for(var u=new Array(arguments.length),f=0;f<u.length;f++)u[f]=arguments[f];u[0]=t.coerce(u[0]),typeof u[0]!="string"&&u.unshift("%O");var b=0;u[0]=u[0].replace(/%([a-zA-Z%])/g,function(w,_){if(w==="%%")return w;b++;var k=t.formatters[_];if(typeof k=="function"){var x=u[b];w=k.call(g,x),u.splice(b,1),b--}return w}),t.formatArgs.call(g,u);var C=p.log||t.log||console.log.bind(console);C.apply(g,u)}}return p.namespace=d,p.enabled=t.enabled(d),p.useColors=t.useColors(),p.color=o(d),p.destroy=s,typeof t.init=="function"&&t.init(p),t.instances.push(p),p}function s(){var d=t.instances.indexOf(this);return d!==-1?(t.instances.splice(d,1),!0):!1}function i(d){t.save(d),t.names=[],t.skips=[];var l,p=(typeof d=="string"?d:"").split(/[\s,]+/),g=p.length;for(l=0;l<g;l++)p[l]&&(d=p[l].replace(/\*/g,".*?"),d[0]==="-"?t.skips.push(new RegExp("^"+d.substr(1)+"$")):t.names.push(new RegExp("^"+d+"$")));for(l=0;l<t.instances.length;l++){var m=t.instances[l];m.enabled=t.enabled(m.namespace)}}function r(){t.enable("")}function c(d){if(d[d.length-1]==="*")return!0;var l,p;for(l=0,p=t.skips.length;l<p;l++)if(t.skips[l].test(d))return!1;for(l=0,p=t.names.length;l<p;l++)if(t.names[l].test(d))return!0;return!1}function h(d){return d instanceof Error?d.stack||d.message:d}})(x0,x0.exports);var LUe=x0.exports;(function(e,t){t=e.exports=LUe,t.log=s,t.formatArgs=n,t.save=i,t.load=r,t.useColors=o,t.storage=typeof chrome<"u"&&typeof chrome.storage<"u"?chrome.storage.local:c(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function o(){return typeof window<"u"&&window.process&&window.process.type==="renderer"?!0:typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)?!1:typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}t.formatters.j=function(h){try{return JSON.stringify(h)}catch(d){return"[UnexpectedJSONParseError]: "+d.message}};function n(h){var d=this.useColors;if(h[0]=(d?"%c":"")+this.namespace+(d?" %c":" ")+h[0]+(d?"%c ":" ")+"+"+t.humanize(this.diff),!!d){var l="color: "+this.color;h.splice(1,0,l,"color: inherit");var p=0,g=0;h[0].replace(/%[a-zA-Z%]/g,function(m){m!=="%%"&&(p++,m==="%c"&&(g=p))}),h.splice(g,0,l)}}function s(){return typeof console=="object"&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function i(h){try{h==null?t.storage.removeItem("debug"):t.storage.debug=h}catch{}}function r(){var h;try{h=t.storage.debug}catch{}return!h&&typeof process<"u"&&"env"in process&&(h=process.env.DEBUG),h}t.enable(r());function c(){try{return window.localStorage}catch{}}})(N0,N0.exports);var Ad=N0.exports,jUe=nS,sS=Ad("socket.io-client:url"),MUe=HUe;function HUe(e,t){var o=e;t=t||typeof location<"u"&&location,e==null&&(e=t.protocol+"//"+t.host),typeof e=="string"&&(e.charAt(0)==="/"&&(e.charAt(1)==="/"?e=t.protocol+e:e=t.host+e),/^(https?|wss?):\/\//.test(e)||(sS("protocol-less url %s",e),typeof t<"u"?e=t.protocol+"//"+e:e="https://"+e),sS("parse %s",e),o=jUe(e)),o.port||(/^(http|ws)$/.test(o.protocol)?o.port="80":/^(http|ws)s$/.test(o.protocol)&&(o.port="443")),o.path=o.path||"/";var n=o.host.indexOf(":")!==-1,s=n?"["+o.host+"]":o.host;return o.id=o.protocol+"://"+s+":"+o.port,o.href=o.protocol+"://"+s+(t&&t.port===o.port?"":":"+o.port),o}var Od={},B0={exports:{}},$0={exports:{}},Di=1e3,Ri=Di*60,vi=Ri*60,Li=vi*24,UUe=Li*365.25,GUe=function(e,t){t=t||{};var o=typeof e;if(o==="string"&&e.length>0)return WUe(e);if(o==="number"&&isNaN(e)===!1)return t.long?JUe(e):qUe(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function WUe(e){if(e=String(e),!(e.length>100)){var t=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(e);if(t){var o=parseFloat(t[1]),n=(t[2]||"ms").toLowerCase();switch(n){case"years":case"year":case"yrs":case"yr":case"y":return o*UUe;case"days":case"day":case"d":return o*Li;case"hours":case"hour":case"hrs":case"hr":case"h":return o*vi;case"minutes":case"minute":case"mins":case"min":case"m":return o*Ri;case"seconds":case"second":case"secs":case"sec":case"s":return o*Di;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return o;default:return}}}}function qUe(e){return e>=Li?Math.round(e/Li)+"d":e>=vi?Math.round(e/vi)+"h":e>=Ri?Math.round(e/Ri)+"m":e>=Di?Math.round(e/Di)+"s":e+"ms"}function JUe(e){return Td(e,Li,"day")||Td(e,vi,"hour")||Td(e,Ri,"minute")||Td(e,Di,"second")||e+" ms"}function Td(e,t,o){if(!(e<t))return e<t*1.5?Math.floor(e/t)+" "+o:Math.ceil(e/t)+" "+o+"s"}(function(e,t){t=e.exports=n.debug=n.default=n,t.coerce=h,t.disable=r,t.enable=i,t.enabled=c,t.humanize=GUe,t.instances=[],t.names=[],t.skips=[],t.formatters={};function o(d){var l=0,p;for(p in d)l=(l<<5)-l+d.charCodeAt(p),l|=0;return t.colors[Math.abs(l)%t.colors.length]}function n(d){var l;function p(){if(p.enabled){var g=p,m=+new Date,y=m-(l||m);g.diff=y,g.prev=l,g.curr=m,l=m;for(var u=new Array(arguments.length),f=0;f<u.length;f++)u[f]=arguments[f];u[0]=t.coerce(u[0]),typeof u[0]!="string"&&u.unshift("%O");var b=0;u[0]=u[0].replace(/%([a-zA-Z%])/g,function(w,_){if(w==="%%")return w;b++;var k=t.formatters[_];if(typeof k=="function"){var x=u[b];w=k.call(g,x),u.splice(b,1),b--}return w}),t.formatArgs.call(g,u);var C=p.log||t.log||console.log.bind(console);C.apply(g,u)}}return p.namespace=d,p.enabled=t.enabled(d),p.useColors=t.useColors(),p.color=o(d),p.destroy=s,typeof t.init=="function"&&t.init(p),t.instances.push(p),p}function s(){var d=t.instances.indexOf(this);return d!==-1?(t.instances.splice(d,1),!0):!1}function i(d){t.save(d),t.names=[],t.skips=[];var l,p=(typeof d=="string"?d:"").split(/[\s,]+/),g=p.length;for(l=0;l<g;l++)p[l]&&(d=p[l].replace(/\*/g,".*?"),d[0]==="-"?t.skips.push(new RegExp("^"+d.substr(1)+"$")):t.names.push(new RegExp("^"+d+"$")));for(l=0;l<t.instances.length;l++){var m=t.instances[l];m.enabled=t.enabled(m.namespace)}}function r(){t.enable("")}function c(d){if(d[d.length-1]==="*")return!0;var l,p;for(l=0,p=t.skips.length;l<p;l++)if(t.skips[l].test(d))return!1;for(l=0,p=t.names.length;l<p;l++)if(t.names[l].test(d))return!0;return!1}function h(d){return d instanceof Error?d.stack||d.message:d}})($0,$0.exports);var XUe=$0.exports;(function(e,t){t=e.exports=XUe,t.log=s,t.formatArgs=n,t.save=i,t.load=r,t.useColors=o,t.storage=typeof chrome<"u"&&typeof chrome.storage<"u"?chrome.storage.local:c(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function o(){return typeof window<"u"&&window.process&&window.process.type==="renderer"?!0:typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)?!1:typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}t.formatters.j=function(h){try{return JSON.stringify(h)}catch(d){return"[UnexpectedJSONParseError]: "+d.message}};function n(h){var d=this.useColors;if(h[0]=(d?"%c":"")+this.namespace+(d?" %c":" ")+h[0]+(d?"%c ":" ")+"+"+t.humanize(this.diff),!!d){var l="color: "+this.color;h.splice(1,0,l,"color: inherit");var p=0,g=0;h[0].replace(/%[a-zA-Z%]/g,function(m){m!=="%%"&&(p++,m==="%c"&&(g=p))}),h.splice(g,0,l)}}function s(){return typeof console=="object"&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function i(h){try{h==null?t.storage.removeItem("debug"):t.storage.debug=h}catch{}}function r(){var h;try{h=t.storage.debug}catch{}return!h&&typeof process<"u"&&"env"in process&&(h=process.env.DEBUG),h}t.enable(r());function c(){try{return window.localStorage}catch{}}})(B0,B0.exports);var ZUe=B0.exports,iS={exports:{}};(function(e){e.exports=t;function t(n){if(n)return o(n)}function o(n){for(var s in t.prototype)n[s]=t.prototype[s];return n}t.prototype.on=t.prototype.addEventListener=function(n,s){return this._callbacks=this._callbacks||{},(this._callbacks["$"+n]=this._callbacks["$"+n]||[]).push(s),this},t.prototype.once=function(n,s){function i(){this.off(n,i),s.apply(this,arguments)}return i.fn=s,this.on(n,i),this},t.prototype.off=t.prototype.removeListener=t.prototype.removeAllListeners=t.prototype.removeEventListener=function(n,s){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var i=this._callbacks["$"+n];if(!i)return this;if(arguments.length==1)return delete this._callbacks["$"+n],this;for(var r,c=0;c<i.length;c++)if(r=i[c],r===s||r.fn===s){i.splice(c,1);break}return i.length===0&&delete this._callbacks["$"+n],this},t.prototype.emit=function(n){this._callbacks=this._callbacks||{};for(var s=new Array(arguments.length-1),i=this._callbacks["$"+n],r=1;r<arguments.length;r++)s[r-1]=arguments[r];if(i){i=i.slice(0);for(var r=0,c=i.length;r<c;++r)i[r].apply(this,s)}return this},t.prototype.listeners=function(n){return this._callbacks=this._callbacks||{},this._callbacks["$"+n]||[]},t.prototype.hasListeners=function(n){return!!this.listeners(n).length}})(iS);var Dn=iS.exports,Fd={},YUe={}.toString,I0=Array.isArray||function(e){return YUe.call(e)=="[object Array]"},rS=tGe,KUe=typeof Buffer=="function"&&typeof Buffer.isBuffer=="function",QUe=typeof ArrayBuffer=="function",eGe=function(e){return typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer};function tGe(e){return KUe&&Buffer.isBuffer(e)||QUe&&(e instanceof ArrayBuffer||eGe(e))}var V0=I0,lS=rS,cS=Object.prototype.toString,aGe=typeof Blob=="function"||typeof Blob<"u"&&cS.call(Blob)==="[object BlobConstructor]",oGe=typeof File=="function"||typeof File<"u"&&cS.call(File)==="[object FileConstructor]";Fd.deconstructPacket=function(e){var t=[],o=e.data,n=e;return n.data=A0(o,t),n.attachments=t.length,{packet:n,buffers:t}};function A0(e,t){if(!e)return e;if(lS(e)){var o={_placeholder:!0,num:t.length};return t.push(e),o}else if(V0(e)){for(var n=new Array(e.length),s=0;s<e.length;s++)n[s]=A0(e[s],t);return n}else if(typeof e=="object"&&!(e instanceof Date)){var n={};for(var i in e)n[i]=A0(e[i],t);return n}return e}Fd.reconstructPacket=function(e,t){return e.data=O0(e.data,t),e.attachments=void 0,e};function O0(e,t){if(!e)return e;if(e&&e._placeholder===!0){var o=typeof e.num=="number"&&e.num>=0&&e.num<t.length;if(o)return t[e.num];throw new Error("illegal attachments")}else if(V0(e))for(var n=0;n<e.length;n++)e[n]=O0(e[n],t);else if(typeof e=="object")for(var s in e)e[s]=O0(e[s],t);return e}Fd.removeBlobs=function(e,t){function o(i,r,c){if(!i)return i;if(aGe&&i instanceof Blob||oGe&&i instanceof File){n++;var h=new FileReader;h.onload=function(){c?c[r]=this.result:s=this.result,--n||t(s)},h.readAsArrayBuffer(i)}else if(V0(i))for(var d=0;d<i.length;d++)o(i[d],d,i);else if(typeof i=="object"&&!lS(i))for(var l in i)o(i[l],l,i)}var n=0,s=e;o(s),n||t(s)},function(e){var t=ZUe("socket.io-parser"),o=Dn,n=Fd,s=I0,i=rS;e.protocol=4,e.types=["CONNECT","DISCONNECT","EVENT","ACK","ERROR","BINARY_EVENT","BINARY_ACK"],e.CONNECT=0,e.DISCONNECT=1,e.EVENT=2,e.ACK=3,e.ERROR=4,e.BINARY_EVENT=5,e.BINARY_ACK=6,e.Encoder=r,e.Decoder=p;function r(){}var c=e.ERROR+'"encode error"';r.prototype.encode=function(f,b){if(t("encoding packet %j",f),e.BINARY_EVENT===f.type||e.BINARY_ACK===f.type)l(f,b);else{var C=h(f);b([C])}};function h(f){var b=""+f.type;if((e.BINARY_EVENT===f.type||e.BINARY_ACK===f.type)&&(b+=f.attachments+"-"),f.nsp&&f.nsp!=="/"&&(b+=f.nsp+","),f.id!=null&&(b+=f.id),f.data!=null){var C=d(f.data);if(C!==!1)b+=C;else return c}return t("encoded %j as %s",f,b),b}function d(f){try{return JSON.stringify(f)}catch{return!1}}function l(f,b){function C(w){var _=n.deconstructPacket(w),k=h(_.packet),x=_.buffers;x.unshift(k),b(x)}n.removeBlobs(f,C)}function p(){this.reconstructor=null}o(p.prototype),p.prototype.add=function(f){var b;if(typeof f=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");b=g(f),e.BINARY_EVENT===b.type||e.BINARY_ACK===b.type?(this.reconstructor=new y(b),this.reconstructor.reconPack.attachments===0&&this.emit("decoded",b)):this.emit("decoded",b)}else if(i(f)||f.base64)if(this.reconstructor)b=this.reconstructor.takeBinaryData(f),b&&(this.reconstructor=null,this.emit("decoded",b));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+f)};function g(f){var b=0,C={type:Number(f.charAt(0))};if(e.types[C.type]==null)return u("unknown packet type "+C.type);if(e.BINARY_EVENT===C.type||e.BINARY_ACK===C.type){for(var w=b+1;f.charAt(++b)!=="-"&&b!=f.length;);var _=f.substring(w,b);if(_!=Number(_)||f.charAt(b)!=="-")throw new Error("Illegal attachments");C.attachments=Number(_)}if(f.charAt(b+1)==="/"){for(var w=b+1;++b;){var k=f.charAt(b);if(k===","||b===f.length)break}C.nsp=f.substring(w,b)}else C.nsp="/";var x=f.charAt(b+1);if(x!==""&&Number(x)==x){for(var w=b+1;++b;){var k=f.charAt(b);if(k==null||Number(k)!=k){--b;break}if(b===f.length)break}C.id=Number(f.substring(w,b+1))}if(f.charAt(++b)){var I=m(f.substr(b)),E=I!==!1&&(C.type===e.ERROR||s(I));if(E)C.data=I;else return u("invalid payload")}return t("decoded %s as %j",f,C),C}function m(f){try{return JSON.parse(f)}catch{return!1}}p.prototype.destroy=function(){this.reconstructor&&this.reconstructor.finishedReconstruction()};function y(f){this.reconPack=f,this.buffers=[]}y.prototype.takeBinaryData=function(f){if(this.buffers.push(f),this.buffers.length===this.reconPack.attachments){var b=n.reconstructPacket(this.reconPack,this.buffers);return this.finishedReconstruction(),b}return null},y.prototype.finishedReconstruction=function(){this.reconPack=null,this.buffers=[]};function u(f){return{type:e.ERROR,data:"parser error: "+f}}}(Od);var T0={exports:{}},zd={},F0={exports:{}};try{F0.exports=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{F0.exports=!1}var nGe=F0.exports,z0=function(){return typeof self<"u"?self:typeof window<"u"?window:Function("return this")()}(),sGe=nGe,iGe=z0,P0=function(e){var t=e.xdomain,o=e.xscheme,n=e.enablesXDR;try{if(typeof XMLHttpRequest<"u"&&(!t||sGe))return new XMLHttpRequest}catch{}try{if(typeof XDomainRequest<"u"&&!o&&n)return new XDomainRequest}catch{}if(!t)try{return new iGe[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}},D0={exports:{}},Fo={},rGe=Object.keys||function(t){var o=[],n=Object.prototype.hasOwnProperty;for(var s in t)n.call(t,s)&&o.push(s);return o},lGe=I0,dS=Object.prototype.toString,cGe=typeof Blob=="function"||typeof Blob<"u"&&dS.call(Blob)==="[object BlobConstructor]",dGe=typeof File=="function"||typeof File<"u"&&dS.call(File)==="[object FileConstructor]",mS=Pd;function Pd(e){if(!e||typeof e!="object")return!1;if(lGe(e)){for(var t=0,o=e.length;t<o;t++)if(Pd(e[t]))return!0;return!1}if(typeof Buffer=="function"&&Buffer.isBuffer&&Buffer.isBuffer(e)||typeof ArrayBuffer=="function"&&e instanceof ArrayBuffer||cGe&&e instanceof Blob||dGe&&e instanceof File)return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return Pd(e.toJSON(),!0);for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&Pd(e[n]))return!0;return!1}var mGe=function(e,t,o){var n=e.byteLength;if(t=t||0,o=o||n,e.slice)return e.slice(t,o);if(t<0&&(t+=n),o<0&&(o+=n),o>n&&(o=n),t>=n||t>=o||n===0)return new ArrayBuffer(0);for(var s=new Uint8Array(e),i=new Uint8Array(o-t),r=t,c=0;r<o;r++,c++)i[c]=s[r];return i.buffer},pGe=hGe;function hGe(e,t,o){var n=!1;return o=o||yGe,s.count=e,e===0?t():s;function s(i,r){if(s.count<=0)throw new Error("after called too many times");--s.count,i?(n=!0,t(i),t=o):s.count===0&&!n&&t(null,r)}}function yGe(){}/*! https://mths.be/utf8js v2.1.2 by @mathias */var Co=String.fromCharCode;function pS(e){for(var t=[],o=0,n=e.length,s,i;o<n;)s=e.charCodeAt(o++),s>=55296&&s<=56319&&o<n?(i=e.charCodeAt(o++),(i&64512)==56320?t.push(((s&1023)<<10)+(i&1023)+65536):(t.push(s),o--)):t.push(s);return t}function gGe(e){for(var t=e.length,o=-1,n,s="";++o<t;)n=e[o],n>65535&&(n-=65536,s+=Co(n>>>10&1023|55296),n=56320|n&1023),s+=Co(n);return s}function hS(e,t){if(e>=55296&&e<=57343){if(t)throw Error("Lone surrogate U+"+e.toString(16).toUpperCase()+" is not a scalar value");return!1}return!0}function R0(e,t){return Co(e>>t&63|128)}function uGe(e,t){if(!(e&4294967168))return Co(e);var o="";return e&4294965248?e&4294901760?e&4292870144||(o=Co(e>>18&7|240),o+=R0(e,12),o+=R0(e,6)):(hS(e,t)||(e=65533),o=Co(e>>12&15|224),o+=R0(e,6)):o=Co(e>>6&31|192),o+=Co(e&63|128),o}function fGe(e,t){t=t||{};for(var o=t.strict!==!1,n=pS(e),s=n.length,i=-1,r,c="";++i<s;)r=n[i],c+=uGe(r,o);return c}function Rn(){if(ko>=Rd)throw Error("Invalid byte index");var e=Dd[ko]&255;if(ko++,(e&192)==128)return e&63;throw Error("Invalid continuation byte")}function _Ge(e){var t,o,n,s,i;if(ko>Rd)throw Error("Invalid byte index");if(ko==Rd)return!1;if(t=Dd[ko]&255,ko++,!(t&128))return t;if((t&224)==192){if(o=Rn(),i=(t&31)<<6|o,i>=128)return i;throw Error("Invalid continuation byte")}if((t&240)==224){if(o=Rn(),n=Rn(),i=(t&15)<<12|o<<6|n,i>=2048)return hS(i,e)?i:65533;throw Error("Invalid continuation byte")}if((t&248)==240&&(o=Rn(),n=Rn(),s=Rn(),i=(t&7)<<18|o<<12|n<<6|s,i>=65536&&i<=1114111))return i;throw Error("Invalid UTF-8 detected")}var Dd,Rd,ko;function bGe(e,t){t=t||{};var o=t.strict!==!1;Dd=pS(e),Rd=Dd.length,ko=0;for(var n=[],s;(s=_Ge(o))!==!1;)n.push(s);return gGe(n)}var wGe={version:"2.1.2",encode:fGe,decode:bGe},vd={},yS;function CGe(){return yS||(yS=1,function(e){vd.encode=function(t){var o=new Uint8Array(t),n,s=o.length,i="";for(n=0;n<s;n+=3)i+=e[o[n]>>2],i+=e[(o[n]&3)<<4|o[n+1]>>4],i+=e[(o[n+1]&15)<<2|o[n+2]>>6],i+=e[o[n+2]&63];return s%3===2?i=i.substring(0,i.length-1)+"=":s%3===1&&(i=i.substring(0,i.length-2)+"=="),i},vd.decode=function(t){var o=t.length*.75,n=t.length,s,i=0,r,c,h,d;t[t.length-1]==="="&&(o--,t[t.length-2]==="="&&o--);var l=new ArrayBuffer(o),p=new Uint8Array(l);for(s=0;s<n;s+=4)r=e.indexOf(t[s]),c=e.indexOf(t[s+1]),h=e.indexOf(t[s+2]),d=e.indexOf(t[s+3]),p[i++]=r<<2|c>>4,p[i++]=(c&15)<<4|h>>2,p[i++]=(h&3)<<6|d&63;return l}}("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/")),vd}var v0,gS;function kGe(){if(gS)return v0;gS=1;var e=typeof e<"u"?e:typeof WebKitBlobBuilder<"u"?WebKitBlobBuilder:typeof MSBlobBuilder<"u"?MSBlobBuilder:typeof MozBlobBuilder<"u"?MozBlobBuilder:!1,t=function(){try{var c=new Blob(["hi"]);return c.size===2}catch{return!1}}(),o=t&&function(){try{var c=new Blob([new Uint8Array([1,2])]);return c.size===2}catch{return!1}}(),n=e&&e.prototype.append&&e.prototype.getBlob;function s(c){return c.map(function(h){if(h.buffer instanceof ArrayBuffer){var d=h.buffer;if(h.byteLength!==d.byteLength){var l=new Uint8Array(h.byteLength);l.set(new Uint8Array(d,h.byteOffset,h.byteLength)),d=l.buffer}return d}return h})}function i(c,h){h=h||{};var d=new e;return s(c).forEach(function(l){d.append(l)}),h.type?d.getBlob(h.type):d.getBlob()}function r(c,h){return new Blob(s(c),h||{})}return typeof Blob<"u"&&(i.prototype=Blob.prototype,r.prototype=Blob.prototype),v0=function(){return t?o?Blob:r:n?i:void 0}(),v0}(function(e){var t=rGe,o=mS,n=mGe,s=pGe,i=wGe,r;typeof ArrayBuffer<"u"&&(r=CGe());var c=typeof navigator<"u"&&/Android/i.test(navigator.userAgent),h=typeof navigator<"u"&&/PhantomJS/i.test(navigator.userAgent),d=c||h;e.protocol=3;var l=e.packets={open:0,close:1,ping:2,pong:3,message:4,upgrade:5,noop:6},p=t(l),g={type:"error",data:"parser error"},m=kGe();e.encodePacket=function(_,k,x,I){typeof k=="function"&&(I=k,k=!1),typeof x=="function"&&(I=x,x=null);var E=_.data===void 0?void 0:_.data.buffer||_.data;if(typeof ArrayBuffer<"u"&&E instanceof ArrayBuffer)return u(_,k,I);if(typeof m<"u"&&E instanceof m)return b(_,k,I);if(E&&E.base64)return y(_,I);var $=l[_.type];return _.data!==void 0&&($+=x?i.encode(String(_.data),{strict:!1}):String(_.data)),I(""+$)};function y(_,k){var x="b"+e.packets[_.type]+_.data.data;return k(x)}function u(_,k,x){if(!k)return e.encodeBase64Packet(_,x);var I=_.data,E=new Uint8Array(I),$=new Uint8Array(1+I.byteLength);$[0]=l[_.type];for(var O=0;O<E.length;O++)$[O+1]=E[O];return x($.buffer)}function f(_,k,x){if(!k)return e.encodeBase64Packet(_,x);var I=new FileReader;return I.onload=function(){e.encodePacket({type:_.type,data:I.result},k,!0,x)},I.readAsArrayBuffer(_.data)}function b(_,k,x){if(!k)return e.encodeBase64Packet(_,x);if(d)return f(_,k,x);var I=new Uint8Array(1);I[0]=l[_.type];var E=new m([I.buffer,_.data]);return x(E)}e.encodeBase64Packet=function(_,k){var x="b"+e.packets[_.type];if(typeof m<"u"&&_.data instanceof m){var I=new FileReader;return I.onload=function(){var A=I.result.split(",")[1];k(x+A)},I.readAsDataURL(_.data)}var E;try{E=String.fromCharCode.apply(null,new Uint8Array(_.data))}catch{for(var $=new Uint8Array(_.data),O=new Array($.length),V=0;V<$.length;V++)O[V]=$[V];E=String.fromCharCode.apply(null,O)}return x+=btoa(E),k(x)},e.decodePacket=function(_,k,x){if(_===void 0)return g;if(typeof _=="string"){if(_.charAt(0)==="b")return e.decodeBase64Packet(_.substr(1),k);if(x&&(_=C(_),_===!1))return g;var E=_.charAt(0);return Number(E)!=E||!p[E]?g:_.length>1?{type:p[E],data:_.substring(1)}:{type:p[E]}}var I=new Uint8Array(_),E=I[0],$=n(_,1);return m&&k==="blob"&&($=new m([$])),{type:p[E],data:$}};function C(_){try{_=i.decode(_,{strict:!1})}catch{return!1}return _}e.decodeBase64Packet=function(_,k){var x=p[_.charAt(0)];if(!r)return{type:x,data:{base64:!0,data:_.substr(1)}};var I=r.decode(_.substr(1));return k==="blob"&&m&&(I=new m([I])),{type:x,data:I}},e.encodePayload=function(_,k,x){typeof k=="function"&&(x=k,k=null);var I=o(_);if(k&&I)return m&&!d?e.encodePayloadAsBlob(_,x):e.encodePayloadAsArrayBuffer(_,x);if(!_.length)return x("0:");function E(O){return O.length+":"+O}function $(O,V){e.encodePacket(O,I?k:!1,!1,function(A){V(null,E(A))})}w(_,$,function(O,V){return x(V.join(""))})};function w(_,k,x){for(var I=new Array(_.length),E=s(_.length,x),$=function(V,A,z){k(A,function(Q,ne){I[V]=ne,z(Q,I)})},O=0;O<_.length;O++)$(O,_[O],E)}e.decodePayload=function(_,k,x){if(typeof _!="string")return e.decodePayloadAsBinary(_,k,x);typeof k=="function"&&(x=k,k=null);var I;if(_==="")return x(g,0,1);for(var E="",$,O,V=0,A=_.length;V<A;V++){var z=_.charAt(V);if(z!==":"){E+=z;continue}if(E===""||E!=($=Number(E))||(O=_.substr(V+1,$),E!=O.length))return x(g,0,1);if(O.length){if(I=e.decodePacket(O,k,!1),g.type===I.type&&g.data===I.data)return x(g,0,1);var Q=x(I,V+$,A);if(Q===!1)return}V+=$,E=""}if(E!=="")return x(g,0,1)},e.encodePayloadAsArrayBuffer=function(_,k){if(!_.length)return k(new ArrayBuffer(0));function x(I,E){e.encodePacket(I,!0,!0,function($){return E(null,$)})}w(_,x,function(I,E){var $=E.reduce(function(A,z){var Q;return typeof z=="string"?Q=z.length:Q=z.byteLength,A+Q.toString().length+Q+2},0),O=new Uint8Array($),V=0;return E.forEach(function(A){var z=typeof A=="string",Q=A;if(z){for(var S=new Uint8Array(A.length),ne=0;ne<A.length;ne++)S[ne]=A.charCodeAt(ne);Q=S.buffer}z?O[V++]=0:O[V++]=1;for(var ee=Q.byteLength.toString(),ne=0;ne<ee.length;ne++)O[V++]=parseInt(ee[ne]);O[V++]=255;for(var S=new Uint8Array(Q),ne=0;ne<S.length;ne++)O[V++]=S[ne]}),k(O.buffer)})},e.encodePayloadAsBlob=function(_,k){function x(I,E){e.encodePacket(I,!0,!0,function($){var O=new Uint8Array(1);if(O[0]=1,typeof $=="string"){for(var V=new Uint8Array($.length),A=0;A<$.length;A++)V[A]=$.charCodeAt(A);$=V.buffer,O[0]=0}for(var z=$ instanceof ArrayBuffer?$.byteLength:$.size,Q=z.toString(),ne=new Uint8Array(Q.length+1),A=0;A<Q.length;A++)ne[A]=parseInt(Q[A]);if(ne[Q.length]=255,m){var ee=new m([O.buffer,ne.buffer,$]);E(null,ee)}})}w(_,x,function(I,E){return k(new m(E))})},e.decodePayloadAsBinary=function(_,k,x){typeof k=="function"&&(x=k,k=null);for(var I=_,E=[];I.byteLength>0;){for(var $=new Uint8Array(I),O=$[0]===0,V="",A=1;$[A]!==255;A++){if(V.length>310)return x(g,0,1);V+=$[A]}I=n(I,2+V.length),V=parseInt(V);var z=n(I,0,V);if(O)try{z=String.fromCharCode.apply(null,new Uint8Array(z))}catch{var Q=new Uint8Array(z);z="";for(var A=0;A<Q.length;A++)z+=String.fromCharCode(Q[A])}E.push(z),I=n(I,V)}var ne=E.length;E.forEach(function(ee,S){x(e.decodePacket(ee,k,!0),S,ne)})}})(Fo);var L0,uS;function j0(){if(uS)return L0;uS=1;var e=Fo,t=Dn;L0=o;function o(n){this.path=n.path,this.hostname=n.hostname,this.port=n.port,this.secure=n.secure,this.query=n.query,this.timestampParam=n.timestampParam,this.timestampRequests=n.timestampRequests,this.readyState="",this.agent=n.agent||!1,this.socket=n.socket,this.enablesXDR=n.enablesXDR,this.withCredentials=n.withCredentials,this.pfx=n.pfx,this.key=n.key,this.passphrase=n.passphrase,this.cert=n.cert,this.ca=n.ca,this.ciphers=n.ciphers,this.rejectUnauthorized=n.rejectUnauthorized,this.forceNode=n.forceNode,this.isReactNative=n.isReactNative,this.extraHeaders=n.extraHeaders,this.localAddress=n.localAddress}return t(o.prototype),o.prototype.onError=function(n,s){var i=new Error(n);return i.type="TransportError",i.description=s,this.emit("error",i),this},o.prototype.open=function(){return(this.readyState==="closed"||this.readyState==="")&&(this.readyState="opening",this.doOpen()),this},o.prototype.close=function(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this},o.prototype.send=function(n){if(this.readyState==="open")this.write(n);else throw new Error("Transport not open")},o.prototype.onOpen=function(){this.readyState="open",this.writable=!0,this.emit("open")},o.prototype.onData=function(n){var s=e.decodePacket(n,this.socket.binaryType);this.onPacket(s)},o.prototype.onPacket=function(n){this.emit("packet",n)},o.prototype.onClose=function(){this.readyState="closed",this.emit("close")},L0}var vn={};vn.encode=function(e){var t="";for(var o in e)e.hasOwnProperty(o)&&(t.length&&(t+="&"),t+=encodeURIComponent(o)+"="+encodeURIComponent(e[o]));return t},vn.decode=function(e){for(var t={},o=e.split("&"),n=0,s=o.length;n<s;n++){var i=o[n].split("=");t[decodeURIComponent(i[0])]=decodeURIComponent(i[1])}return t};var Ld=function(e,t){var o=function(){};o.prototype=t.prototype,e.prototype=new o,e.prototype.constructor=e},fS="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),jd=64,_S={},bS=0,So=0,wS;function M0(e){var t="";do t=fS[e%jd]+t,e=Math.floor(e/jd);while(e>0);return t}function SGe(e){var t=0;for(So=0;So<e.length;So++)t=t*jd+_S[e.charAt(So)];return t}function H0(){var e=M0(+new Date);return e!==wS?(bS=0,wS=e):e+"."+M0(bS++)}for(;So<jd;So++)_S[fS[So]]=So;H0.encode=M0,H0.decode=SGe;var CS=H0,U0={exports:{}},G0={exports:{}},ji=1e3,Mi=ji*60,Hi=Mi*60,Ui=Hi*24,EGe=Ui*365.25,NGe=function(e,t){t=t||{};var o=typeof e;if(o==="string"&&e.length>0)return xGe(e);if(o==="number"&&isNaN(e)===!1)return t.long?$Ge(e):BGe(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function xGe(e){if(e=String(e),!(e.length>100)){var t=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(e);if(t){var o=parseFloat(t[1]),n=(t[2]||"ms").toLowerCase();switch(n){case"years":case"year":case"yrs":case"yr":case"y":return o*EGe;case"days":case"day":case"d":return o*Ui;case"hours":case"hour":case"hrs":case"hr":case"h":return o*Hi;case"minutes":case"minute":case"mins":case"min":case"m":return o*Mi;case"seconds":case"second":case"secs":case"sec":case"s":return o*ji;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return o;default:return}}}}function BGe(e){return e>=Ui?Math.round(e/Ui)+"d":e>=Hi?Math.round(e/Hi)+"h":e>=Mi?Math.round(e/Mi)+"m":e>=ji?Math.round(e/ji)+"s":e+"ms"}function $Ge(e){return Md(e,Ui,"day")||Md(e,Hi,"hour")||Md(e,Mi,"minute")||Md(e,ji,"second")||e+" ms"}function Md(e,t,o){if(!(e<t))return e<t*1.5?Math.floor(e/t)+" "+o:Math.ceil(e/t)+" "+o+"s"}(function(e,t){t=e.exports=n.debug=n.default=n,t.coerce=h,t.disable=r,t.enable=i,t.enabled=c,t.humanize=NGe,t.instances=[],t.names=[],t.skips=[],t.formatters={};function o(d){var l=0,p;for(p in d)l=(l<<5)-l+d.charCodeAt(p),l|=0;return t.colors[Math.abs(l)%t.colors.length]}function n(d){var l;function p(){if(p.enabled){var g=p,m=+new Date,y=m-(l||m);g.diff=y,g.prev=l,g.curr=m,l=m;for(var u=new Array(arguments.length),f=0;f<u.length;f++)u[f]=arguments[f];u[0]=t.coerce(u[0]),typeof u[0]!="string"&&u.unshift("%O");var b=0;u[0]=u[0].replace(/%([a-zA-Z%])/g,function(w,_){if(w==="%%")return w;b++;var k=t.formatters[_];if(typeof k=="function"){var x=u[b];w=k.call(g,x),u.splice(b,1),b--}return w}),t.formatArgs.call(g,u);var C=p.log||t.log||console.log.bind(console);C.apply(g,u)}}return p.namespace=d,p.enabled=t.enabled(d),p.useColors=t.useColors(),p.color=o(d),p.destroy=s,typeof t.init=="function"&&t.init(p),t.instances.push(p),p}function s(){var d=t.instances.indexOf(this);return d!==-1?(t.instances.splice(d,1),!0):!1}function i(d){t.save(d),t.names=[],t.skips=[];var l,p=(typeof d=="string"?d:"").split(/[\s,]+/),g=p.length;for(l=0;l<g;l++)p[l]&&(d=p[l].replace(/\*/g,".*?"),d[0]==="-"?t.skips.push(new RegExp("^"+d.substr(1)+"$")):t.names.push(new RegExp("^"+d+"$")));for(l=0;l<t.instances.length;l++){var m=t.instances[l];m.enabled=t.enabled(m.namespace)}}function r(){t.enable("")}function c(d){if(d[d.length-1]==="*")return!0;var l,p;for(l=0,p=t.skips.length;l<p;l++)if(t.skips[l].test(d))return!1;for(l=0,p=t.names.length;l<p;l++)if(t.names[l].test(d))return!0;return!1}function h(d){return d instanceof Error?d.stack||d.message:d}})(G0,G0.exports);var IGe=G0.exports;(function(e,t){t=e.exports=IGe,t.log=s,t.formatArgs=n,t.save=i,t.load=r,t.useColors=o,t.storage=typeof chrome<"u"&&typeof chrome.storage<"u"?chrome.storage.local:c(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function o(){return typeof window<"u"&&window.process&&window.process.type==="renderer"?!0:typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)?!1:typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}t.formatters.j=function(h){try{return JSON.stringify(h)}catch(d){return"[UnexpectedJSONParseError]: "+d.message}};function n(h){var d=this.useColors;if(h[0]=(d?"%c":"")+this.namespace+(d?" %c":" ")+h[0]+(d?"%c ":" ")+"+"+t.humanize(this.diff),!!d){var l="color: "+this.color;h.splice(1,0,l,"color: inherit");var p=0,g=0;h[0].replace(/%[a-zA-Z%]/g,function(m){m!=="%%"&&(p++,m==="%c"&&(g=p))}),h.splice(g,0,l)}}function s(){return typeof console=="object"&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function i(h){try{h==null?t.storage.removeItem("debug"):t.storage.debug=h}catch{}}function r(){var h;try{h=t.storage.debug}catch{}return!h&&typeof process<"u"&&"env"in process&&(h=process.env.DEBUG),h}t.enable(r());function c(){try{return window.localStorage}catch{}}})(U0,U0.exports);var Hd=U0.exports,kS=j0(),VGe=vn,SS=Fo,AGe=Ld,OGe=CS,oa=Hd("engine.io-client:polling"),ES=za,TGe=function(){var e=P0,t=new e({xdomain:!1});return t.responseType!=null}();function za(e){var t=e&&e.forceBase64;(!TGe||t)&&(this.supportsBinary=!1),kS.call(this,e)}AGe(za,kS),za.prototype.name="polling",za.prototype.doOpen=function(){this.poll()},za.prototype.pause=function(e){var t=this;this.readyState="pausing";function o(){oa("paused"),t.readyState="paused",e()}if(this.polling||!this.writable){var n=0;this.polling&&(oa("we are currently polling - waiting to pause"),n++,this.once("pollComplete",function(){oa("pre-pause polling complete"),--n||o()})),this.writable||(oa("we are currently writing - waiting to pause"),n++,this.once("drain",function(){oa("pre-pause writing complete"),--n||o()}))}else o()},za.prototype.poll=function(){oa("polling"),this.polling=!0,this.doPoll(),this.emit("poll")},za.prototype.onData=function(e){var t=this;oa("polling got data %s",e);var o=function(n,s,i){if(t.readyState==="opening"&&n.type==="open"&&t.onOpen(),n.type==="close")return t.onClose(),!1;t.onPacket(n)};SS.decodePayload(e,this.socket.binaryType,o),this.readyState!=="closed"&&(this.polling=!1,this.emit("pollComplete"),this.readyState==="open"?this.poll():oa('ignoring poll - transport state "%s"',this.readyState))},za.prototype.doClose=function(){var e=this;function t(){oa("writing close packet"),e.write([{type:"close"}])}this.readyState==="open"?(oa("transport open - closing"),t()):(oa("transport not open - deferring close"),this.once("open",t))},za.prototype.write=function(e){var t=this;this.writable=!1;var o=function(){t.writable=!0,t.emit("drain")};SS.encodePayload(e,this.supportsBinary,function(n){t.doWrite(n,o)})},za.prototype.uri=function(){var e=this.query||{},t=this.secure?"https":"http",o="";this.timestampRequests!==!1&&(e[this.timestampParam]=OGe()),!this.supportsBinary&&!e.sid&&(e.b64=1),e=VGe.encode(e),this.port&&(t==="https"&&Number(this.port)!==443||t==="http"&&Number(this.port)!==80)&&(o=":"+this.port),e.length&&(e="?"+e);var n=this.hostname.indexOf(":")!==-1;return t+"://"+(n?"["+this.hostname+"]":this.hostname)+o+this.path+e};var FGe=P0,NS=ES,zGe=Dn,PGe=Ld,W0=Hd("engine.io-client:polling-xhr"),DGe=z0;D0.exports=Ln,D0.exports.Request=dt;function xS(){}function Ln(e){if(NS.call(this,e),this.requestTimeout=e.requestTimeout,this.extraHeaders=e.extraHeaders,typeof location<"u"){var t=location.protocol==="https:",o=location.port;o||(o=t?443:80),this.xd=typeof location<"u"&&e.hostname!==location.hostname||o!==e.port,this.xs=e.secure!==t}}PGe(Ln,NS),Ln.prototype.supportsBinary=!0,Ln.prototype.request=function(e){return e=e||{},e.uri=this.uri(),e.xd=this.xd,e.xs=this.xs,e.agent=this.agent||!1,e.supportsBinary=this.supportsBinary,e.enablesXDR=this.enablesXDR,e.withCredentials=this.withCredentials,e.pfx=this.pfx,e.key=this.key,e.passphrase=this.passphrase,e.cert=this.cert,e.ca=this.ca,e.ciphers=this.ciphers,e.rejectUnauthorized=this.rejectUnauthorized,e.requestTimeout=this.requestTimeout,e.extraHeaders=this.extraHeaders,new dt(e)},Ln.prototype.doWrite=function(e,t){var o=typeof e!="string"&&e!==void 0,n=this.request({method:"POST",data:e,isBinary:o}),s=this;n.on("success",t),n.on("error",function(i){s.onError("xhr post error",i)}),this.sendXhr=n},Ln.prototype.doPoll=function(){W0("xhr poll");var e=this.request(),t=this;e.on("data",function(o){t.onData(o)}),e.on("error",function(o){t.onError("xhr poll error",o)}),this.pollXhr=e};function dt(e){this.method=e.method||"GET",this.uri=e.uri,this.xd=!!e.xd,this.xs=!!e.xs,this.async=e.async!==!1,this.data=e.data!==void 0?e.data:null,this.agent=e.agent,this.isBinary=e.isBinary,this.supportsBinary=e.supportsBinary,this.enablesXDR=e.enablesXDR,this.withCredentials=e.withCredentials,this.requestTimeout=e.requestTimeout,this.pfx=e.pfx,this.key=e.key,this.passphrase=e.passphrase,this.cert=e.cert,this.ca=e.ca,this.ciphers=e.ciphers,this.rejectUnauthorized=e.rejectUnauthorized,this.extraHeaders=e.extraHeaders,this.create()}if(zGe(dt.prototype),dt.prototype.create=function(){var e={agent:this.agent,xdomain:this.xd,xscheme:this.xs,enablesXDR:this.enablesXDR};e.pfx=this.pfx,e.key=this.key,e.passphrase=this.passphrase,e.cert=this.cert,e.ca=this.ca,e.ciphers=this.ciphers,e.rejectUnauthorized=this.rejectUnauthorized;var t=this.xhr=new FGe(e),o=this;try{W0("xhr open %s: %s",this.method,this.uri),t.open(this.method,this.uri,this.async);try{if(this.extraHeaders){t.setDisableHeaderCheck&&t.setDisableHeaderCheck(!0);for(var n in this.extraHeaders)this.extraHeaders.hasOwnProperty(n)&&t.setRequestHeader(n,this.extraHeaders[n])}}catch{}if(this.method==="POST")try{this.isBinary?t.setRequestHeader("Content-type","application/octet-stream"):t.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{t.setRequestHeader("Accept","*/*")}catch{}"withCredentials"in t&&(t.withCredentials=this.withCredentials),this.requestTimeout&&(t.timeout=this.requestTimeout),this.hasXDR()?(t.onload=function(){o.onLoad()},t.onerror=function(){o.onError(t.responseText)}):t.onreadystatechange=function(){if(t.readyState===2)try{var s=t.getResponseHeader("Content-Type");(o.supportsBinary&&s==="application/octet-stream"||s==="application/octet-stream; charset=UTF-8")&&(t.responseType="arraybuffer")}catch{}t.readyState===4&&(t.status===200||t.status===1223?o.onLoad():setTimeout(function(){o.onError(typeof t.status=="number"?t.status:0)},0))},W0("xhr data %s",this.data),t.send(this.data)}catch(s){setTimeout(function(){o.onError(s)},0);return}typeof document<"u"&&(this.index=dt.requestsCount++,dt.requests[this.index]=this)},dt.prototype.onSuccess=function(){this.emit("success"),this.cleanup()},dt.prototype.onData=function(e){this.emit("data",e),this.onSuccess()},dt.prototype.onError=function(e){this.emit("error",e),this.cleanup(!0)},dt.prototype.cleanup=function(e){if(!(typeof this.xhr>"u"||this.xhr===null)){if(this.hasXDR()?this.xhr.onload=this.xhr.onerror=xS:this.xhr.onreadystatechange=xS,e)try{this.xhr.abort()}catch{}typeof document<"u"&&delete dt.requests[this.index],this.xhr=null}},dt.prototype.onLoad=function(){var e;try{var t;try{t=this.xhr.getResponseHeader("Content-Type")}catch{}t==="application/octet-stream"||t==="application/octet-stream; charset=UTF-8"?e=this.xhr.response||this.xhr.responseText:e=this.xhr.responseText}catch(o){this.onError(o)}e!=null&&this.onData(e)},dt.prototype.hasXDR=function(){return typeof XDomainRequest<"u"&&!this.xs&&this.enablesXDR},dt.prototype.abort=function(){this.cleanup()},dt.requestsCount=0,dt.requests={},typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",BS);else if(typeof addEventListener=="function"){var RGe="onpagehide"in DGe?"pagehide":"unload";addEventListener(RGe,BS,!1)}}function BS(){for(var e in dt.requests)dt.requests.hasOwnProperty(e)&&dt.requests[e].abort()}var vGe=D0.exports,q0=ES,LGe=Ld,$S=z0,jGe=jn,MGe=/\n/g,HGe=/\\n/g,Ud;function UGe(){}function jn(e){q0.call(this,e),this.query=this.query||{},Ud||(Ud=$S.___eio=$S.___eio||[]),this.index=Ud.length;var t=this;Ud.push(function(o){t.onData(o)}),this.query.j=this.index,typeof addEventListener=="function"&&addEventListener("beforeunload",function(){t.script&&(t.script.onerror=UGe)},!1)}LGe(jn,q0),jn.prototype.supportsBinary=!1,jn.prototype.doClose=function(){this.script&&(this.script.parentNode.removeChild(this.script),this.script=null),this.form&&(this.form.parentNode.removeChild(this.form),this.form=null,this.iframe=null),q0.prototype.doClose.call(this)},jn.prototype.doPoll=function(){var e=this,t=document.createElement("script");this.script&&(this.script.parentNode.removeChild(this.script),this.script=null),t.async=!0,t.src=this.uri(),t.onerror=function(s){e.onError("jsonp poll error",s)};var o=document.getElementsByTagName("script")[0];o?o.parentNode.insertBefore(t,o):(document.head||document.body).appendChild(t),this.script=t;var n=typeof navigator<"u"&&/gecko/i.test(navigator.userAgent);n&&setTimeout(function(){var s=document.createElement("iframe");document.body.appendChild(s),document.body.removeChild(s)},100)},jn.prototype.doWrite=function(e,t){var o=this;if(!this.form){var n=document.createElement("form"),s=document.createElement("textarea"),i=this.iframeId="eio_iframe_"+this.index,r;n.className="socketio",n.style.position="absolute",n.style.top="-1000px",n.style.left="-1000px",n.target=i,n.method="POST",n.setAttribute("accept-charset","utf-8"),s.name="d",n.appendChild(s),document.body.appendChild(n),this.form=n,this.area=s}this.form.action=this.uri();function c(){h(),t()}function h(){if(o.iframe)try{o.form.removeChild(o.iframe)}catch(l){o.onError("jsonp polling iframe removal error",l)}try{var d='<iframe src="javascript:0" name="'+o.iframeId+'">';r=document.createElement(d)}catch{r=document.createElement("iframe"),r.name=o.iframeId,r.src="javascript:0"}r.id=o.iframeId,o.form.appendChild(r),o.iframe=r}h(),e=e.replace(HGe,`\\
121
+ */var Lje="store";function Oo(e,t){Object.keys(e).forEach(function(o){return t(e[o],o)})}function I7(e){return e!==null&&typeof e=="object"}function jje(e){return e&&typeof e.then=="function"}function ta(e,t){if(!e)throw new Error("[vuex] "+t)}function Mje(e,t){return function(){return e(t)}}function V7(e,t,o){return t.indexOf(e)<0&&(o&&o.prepend?t.unshift(e):t.push(e)),function(){var n=t.indexOf(e);n>-1&&t.splice(n,1)}}function A7(e,t){e._actions=Object.create(null),e._mutations=Object.create(null),e._wrappedGetters=Object.create(null),e._modulesNamespaceMap=Object.create(null);var o=e.state;Ed(e,o,[],e._modules.root,!0),c0(e,o,t)}function c0(e,t,o){var n=e._state;e.getters={},e._makeLocalGettersCache=Object.create(null);var s=e._wrappedGetters,i={};Oo(s,function(r,c){i[c]=Mje(r,e),Object.defineProperty(e.getters,c,{get:function(){return i[c]()},enumerable:!0})}),e._state=a.reactive({data:t}),e.strict&&qje(e),n&&o&&e._withCommit(function(){n.data=null})}function Ed(e,t,o,n,s){var i=!o.length,r=e._modules.getNamespace(o);if(n.namespaced&&(e._modulesNamespaceMap[r]&&process.env.NODE_ENV!=="production"&&console.error("[vuex] duplicate namespace "+r+" for the namespaced module "+o.join("/")),e._modulesNamespaceMap[r]=n),!i&&!s){var c=d0(t,o.slice(0,-1)),h=o[o.length-1];e._withCommit(function(){process.env.NODE_ENV!=="production"&&h in c&&console.warn('[vuex] state field "'+h+'" was overridden by a module with the same name at "'+o.join(".")+'"'),c[h]=n.state})}var d=n.context=Hje(e,r,o);n.forEachMutation(function(l,p){var g=r+p;Uje(e,g,l,d)}),n.forEachAction(function(l,p){var g=l.root?p:r+p,m=l.handler||l;Gje(e,g,m,d)}),n.forEachGetter(function(l,p){var g=r+p;Wje(e,g,l,d)}),n.forEachChild(function(l,p){Ed(e,t,o.concat(p),l,s)})}function Hje(e,t,o){var n=t==="",s={dispatch:n?e.dispatch:function(i,r,c){var h=Nd(i,r,c),d=h.payload,l=h.options,p=h.type;if((!l||!l.root)&&(p=t+p,process.env.NODE_ENV!=="production"&&!e._actions[p])){console.error("[vuex] unknown local action type: "+h.type+", global type: "+p);return}return e.dispatch(p,d)},commit:n?e.commit:function(i,r,c){var h=Nd(i,r,c),d=h.payload,l=h.options,p=h.type;if((!l||!l.root)&&(p=t+p,process.env.NODE_ENV!=="production"&&!e._mutations[p])){console.error("[vuex] unknown local mutation type: "+h.type+", global type: "+p);return}e.commit(p,d,l)}};return Object.defineProperties(s,{getters:{get:n?function(){return e.getters}:function(){return O7(e,t)}},state:{get:function(){return d0(e.state,o)}}}),s}function O7(e,t){if(!e._makeLocalGettersCache[t]){var o={},n=t.length;Object.keys(e.getters).forEach(function(s){if(s.slice(0,n)===t){var i=s.slice(n);Object.defineProperty(o,i,{get:function(){return e.getters[s]},enumerable:!0})}}),e._makeLocalGettersCache[t]=o}return e._makeLocalGettersCache[t]}function Uje(e,t,o,n){var s=e._mutations[t]||(e._mutations[t]=[]);s.push(function(i){o.call(e,n.state,i)})}function Gje(e,t,o,n){var s=e._actions[t]||(e._actions[t]=[]);s.push(function(i){var r=o.call(e,{dispatch:n.dispatch,commit:n.commit,getters:n.getters,state:n.state,rootGetters:e.getters,rootState:e.state},i);return jje(r)||(r=Promise.resolve(r)),e._devtoolHook?r.catch(function(c){throw e._devtoolHook.emit("vuex:error",c),c}):r})}function Wje(e,t,o,n){if(e._wrappedGetters[t]){process.env.NODE_ENV!=="production"&&console.error("[vuex] duplicate getter key: "+t);return}e._wrappedGetters[t]=function(s){return o(n.state,n.getters,s.state,s.getters)}}function qje(e){a.watch(function(){return e._state.data},function(){process.env.NODE_ENV!=="production"&&ta(e._committing,"do not mutate vuex store state outside mutation handlers.")},{deep:!0,flush:"sync"})}function d0(e,t){return t.reduce(function(o,n){return o[n]},e)}function Nd(e,t,o){return I7(e)&&e.type&&(o=t,t=e,e=e.type),process.env.NODE_ENV!=="production"&&ta(typeof e=="string","expects string as the type, but found "+typeof e+"."),{type:e,payload:t,options:o}}var Jje="vuex bindings",T7="vuex:mutations",m0="vuex:actions",Pn="vuex",Xje=0;function Zje(e,t){vje({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:[Jje]},function(o){o.addTimelineLayer({id:T7,label:"Vuex Mutations",color:F7}),o.addTimelineLayer({id:m0,label:"Vuex Actions",color:F7}),o.addInspector({id:Pn,label:"Vuex",icon:"storage",treeFilterPlaceholder:"Filter stores..."}),o.on.getInspectorTree(function(n){if(n.app===e&&n.inspectorId===Pn)if(n.filter){var s=[];R7(s,t._modules.root,n.filter,""),n.rootNodes=s}else n.rootNodes=[D7(t._modules.root,"")]}),o.on.getInspectorState(function(n){if(n.app===e&&n.inspectorId===Pn){var s=n.nodeId;O7(t,s),n.state=Qje(tMe(t._modules,s),s==="root"?t.getters:t._makeLocalGettersCache,s)}}),o.on.editInspectorState(function(n){if(n.app===e&&n.inspectorId===Pn){var s=n.nodeId,i=n.path;s!=="root"&&(i=s.split("/").filter(Boolean).concat(i)),t._withCommit(function(){n.set(t._state.data,i,n.state.value)})}}),t.subscribe(function(n,s){var i={};n.payload&&(i.payload=n.payload),i.state=s,o.notifyComponentUpdate(),o.sendInspectorTree(Pn),o.sendInspectorState(Pn),o.addTimelineEvent({layerId:T7,event:{time:Date.now(),title:n.type,data:i}})}),t.subscribeAction({before:function(n,s){var i={};n.payload&&(i.payload=n.payload),n._id=Xje++,n._time=Date.now(),i.state=s,o.addTimelineEvent({layerId:m0,event:{time:n._time,title:n.type,groupId:n._id,subtitle:"start",data:i}})},after:function(n,s){var i={},r=Date.now()-n._time;i.duration={_custom:{type:"duration",display:r+"ms",tooltip:"Action duration",value:r}},n.payload&&(i.payload=n.payload),i.state=s,o.addTimelineEvent({layerId:m0,event:{time:Date.now(),title:n.type,groupId:n._id,subtitle:"end",data:i}})}})})}var F7=8702998,Yje=6710886,Kje=16777215,z7={label:"namespaced",textColor:Kje,backgroundColor:Yje};function P7(e){return e&&e!=="root"?e.split("/").slice(-2,-1)[0]:"Root"}function D7(e,t){return{id:t||"root",label:P7(t),tags:e.namespaced?[z7]:[],children:Object.keys(e._children).map(function(o){return D7(e._children[o],t+o+"/")})}}function R7(e,t,o,n){n.includes(o)&&e.push({id:n||"root",label:n.endsWith("/")?n.slice(0,n.length-1):n||"Root",tags:t.namespaced?[z7]:[]}),Object.keys(t._children).forEach(function(s){R7(e,t._children[s],o,n+s+"/")})}function Qje(e,t,o){t=o==="root"?t:t[o];var n=Object.keys(t),s={state:Object.keys(e.state).map(function(r){return{key:r,editable:!0,value:e.state[r]}})};if(n.length){var i=eMe(t);s.getters=Object.keys(i).map(function(r){return{key:r.endsWith("/")?P7(r):r,editable:!1,value:p0(function(){return i[r]})}})}return s}function eMe(e){var t={};return Object.keys(e).forEach(function(o){var n=o.split("/");if(n.length>1){var s=t,i=n.pop();n.forEach(function(r){s[r]||(s[r]={_custom:{value:{},display:r,tooltip:"Module",abstract:!0}}),s=s[r]._custom.value}),s[i]=p0(function(){return e[o]})}else t[o]=p0(function(){return e[o]})}),t}function tMe(e,t){var o=t.split("/").filter(function(n){return n});return o.reduce(function(n,s,i){var r=n[s];if(!r)throw new Error('Missing module "'+s+'" for path "'+t+'".');return i===o.length-1?r:r._children},t==="root"?e:e.root._children)}function p0(e){try{return e()}catch(t){return t}}var aa=function(e,t){this.runtime=t,this._children=Object.create(null),this._rawModule=e;var o=e.state;this.state=(typeof o=="function"?o():o)||{}},v7={namespaced:{configurable:!0}};v7.namespaced.get=function(){return!!this._rawModule.namespaced},aa.prototype.addChild=function(e,t){this._children[e]=t},aa.prototype.removeChild=function(e){delete this._children[e]},aa.prototype.getChild=function(e){return this._children[e]},aa.prototype.hasChild=function(e){return e in this._children},aa.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)},aa.prototype.forEachChild=function(e){Oo(this._children,e)},aa.prototype.forEachGetter=function(e){this._rawModule.getters&&Oo(this._rawModule.getters,e)},aa.prototype.forEachAction=function(e){this._rawModule.actions&&Oo(this._rawModule.actions,e)},aa.prototype.forEachMutation=function(e){this._rawModule.mutations&&Oo(this._rawModule.mutations,e)},Object.defineProperties(aa.prototype,v7);var To=function(e){this.register([],e,!1)};To.prototype.get=function(e){return e.reduce(function(t,o){return t.getChild(o)},this.root)},To.prototype.getNamespace=function(e){var t=this.root;return e.reduce(function(o,n){return t=t.getChild(n),o+(t.namespaced?n+"/":"")},"")},To.prototype.update=function(e){L7([],this.root,e)},To.prototype.register=function(e,t,o){var n=this;o===void 0&&(o=!0),process.env.NODE_ENV!=="production"&&H7(e,t);var s=new aa(t,o);if(e.length===0)this.root=s;else{var i=this.get(e.slice(0,-1));i.addChild(e[e.length-1],s)}t.modules&&Oo(t.modules,function(r,c){n.register(e.concat(c),r,o)})},To.prototype.unregister=function(e){var t=this.get(e.slice(0,-1)),o=e[e.length-1],n=t.getChild(o);if(!n){process.env.NODE_ENV!=="production"&&console.warn("[vuex] trying to unregister module '"+o+"', which is not registered");return}n.runtime&&t.removeChild(o)},To.prototype.isRegistered=function(e){var t=this.get(e.slice(0,-1)),o=e[e.length-1];return t?t.hasChild(o):!1};function L7(e,t,o){if(process.env.NODE_ENV!=="production"&&H7(e,o),t.update(o),o.modules)for(var n in o.modules){if(!t.getChild(n)){process.env.NODE_ENV!=="production"&&console.warn("[vuex] trying to add a new module '"+n+"' on hot reloading, manual reload is needed");return}L7(e.concat(n),t.getChild(n),o.modules[n])}}var j7={assert:function(e){return typeof e=="function"},expected:"function"},aMe={assert:function(e){return typeof e=="function"||typeof e=="object"&&typeof e.handler=="function"},expected:'function or object with "handler" function'},M7={getters:j7,mutations:j7,actions:aMe};function H7(e,t){Object.keys(M7).forEach(function(o){if(t[o]){var n=M7[o];Oo(t[o],function(s,i){ta(n.assert(s),oMe(e,o,i,s,n.expected))})}})}function oMe(e,t,o,n,s){var i=t+" should be "+s+' but "'+t+"."+o+'"';return e.length>0&&(i+=' in module "'+e.join(".")+'"'),i+=" is "+JSON.stringify(n)+".",i}var $t=function e(t){var o=this;t===void 0&&(t={}),process.env.NODE_ENV!=="production"&&(ta(typeof Promise<"u","vuex requires a Promise polyfill in this browser."),ta(this instanceof e,"store must be called with the new operator."));var n=t.plugins;n===void 0&&(n=[]);var s=t.strict;s===void 0&&(s=!1);var i=t.devtools;this._committing=!1,this._actions=Object.create(null),this._actionSubscribers=[],this._mutations=Object.create(null),this._wrappedGetters=Object.create(null),this._modules=new To(t),this._modulesNamespaceMap=Object.create(null),this._subscribers=[],this._makeLocalGettersCache=Object.create(null),this._devtools=i;var r=this,c=this,h=c.dispatch,d=c.commit;this.dispatch=function(p,g){return h.call(r,p,g)},this.commit=function(p,g,m){return d.call(r,p,g,m)},this.strict=s;var l=this._modules.root.state;Ed(this,l,[],this._modules.root),c0(this,l),n.forEach(function(p){return p(o)})},h0={state:{configurable:!0}};$t.prototype.install=function(e,t){e.provide(t||Lje,this),e.config.globalProperties.$store=this;var o=this._devtools!==void 0?this._devtools:process.env.NODE_ENV!=="production"||!1;o&&Zje(e,this)},h0.state.get=function(){return this._state.data},h0.state.set=function(e){process.env.NODE_ENV!=="production"&&ta(!1,"use store.replaceState() to explicit replace store state.")},$t.prototype.commit=function(e,t,o){var n=this,s=Nd(e,t,o),i=s.type,r=s.payload,c=s.options,h={type:i,payload:r},d=this._mutations[i];if(!d){process.env.NODE_ENV!=="production"&&console.error("[vuex] unknown mutation type: "+i);return}this._withCommit(function(){d.forEach(function(l){l(r)})}),this._subscribers.slice().forEach(function(l){return l(h,n.state)}),process.env.NODE_ENV!=="production"&&c&&c.silent&&console.warn("[vuex] mutation type: "+i+". Silent option has been removed. Use the filter functionality in the vue-devtools")},$t.prototype.dispatch=function(e,t){var o=this,n=Nd(e,t),s=n.type,i=n.payload,r={type:s,payload:i},c=this._actions[s];if(!c){process.env.NODE_ENV!=="production"&&console.error("[vuex] unknown action type: "+s);return}try{this._actionSubscribers.slice().filter(function(d){return d.before}).forEach(function(d){return d.before(r,o.state)})}catch(d){process.env.NODE_ENV!=="production"&&(console.warn("[vuex] error in before action subscribers: "),console.error(d))}var h=c.length>1?Promise.all(c.map(function(d){return d(i)})):c[0](i);return new Promise(function(d,l){h.then(function(p){try{o._actionSubscribers.filter(function(g){return g.after}).forEach(function(g){return g.after(r,o.state)})}catch(g){process.env.NODE_ENV!=="production"&&(console.warn("[vuex] error in after action subscribers: "),console.error(g))}d(p)},function(p){try{o._actionSubscribers.filter(function(g){return g.error}).forEach(function(g){return g.error(r,o.state,p)})}catch(g){process.env.NODE_ENV!=="production"&&(console.warn("[vuex] error in error action subscribers: "),console.error(g))}l(p)})})},$t.prototype.subscribe=function(e,t){return V7(e,this._subscribers,t)},$t.prototype.subscribeAction=function(e,t){var o=typeof e=="function"?{before:e}:e;return V7(o,this._actionSubscribers,t)},$t.prototype.watch=function(e,t,o){var n=this;return process.env.NODE_ENV!=="production"&&ta(typeof e=="function","store.watch only accepts a function."),a.watch(function(){return e(n.state,n.getters)},t,Object.assign({},o))},$t.prototype.replaceState=function(e){var t=this;this._withCommit(function(){t._state.data=e})},$t.prototype.registerModule=function(e,t,o){o===void 0&&(o={}),typeof e=="string"&&(e=[e]),process.env.NODE_ENV!=="production"&&(ta(Array.isArray(e),"module path must be a string or an Array."),ta(e.length>0,"cannot register the root module by using registerModule.")),this._modules.register(e,t),Ed(this,this.state,e,this._modules.get(e),o.preserveState),c0(this,this.state)},$t.prototype.unregisterModule=function(e){var t=this;typeof e=="string"&&(e=[e]),process.env.NODE_ENV!=="production"&&ta(Array.isArray(e),"module path must be a string or an Array."),this._modules.unregister(e),this._withCommit(function(){var o=d0(t.state,e.slice(0,-1));delete o[e[e.length-1]]}),A7(this)},$t.prototype.hasModule=function(e){return typeof e=="string"&&(e=[e]),process.env.NODE_ENV!=="production"&&ta(Array.isArray(e),"module path must be a string or an Array."),this._modules.isRegistered(e)},$t.prototype.hotUpdate=function(e){this._modules.update(e),A7(this,!0)},$t.prototype._withCommit=function(e){var t=this._committing;this._committing=!0,e(),this._committing=t},Object.defineProperties($t.prototype,h0);var nMe=iMe(function(e,t){var o={};return process.env.NODE_ENV!=="production"&&!U7(t)&&console.error("[vuex] mapMutations: mapper parameter must be either an Array or an Object"),sMe(t).forEach(function(n){var s=n.key,i=n.val;o[s]=function(){for(var r=[],c=arguments.length;c--;)r[c]=arguments[c];var h=this.$store.commit;if(e){var d=rMe(this.$store,"mapMutations",e);if(!d)return;h=d.context.commit}return typeof i=="function"?i.apply(this,[h].concat(r)):h.apply(this.$store,[i].concat(r))}}),o});function sMe(e){return U7(e)?Array.isArray(e)?e.map(function(t){return{key:t,val:t}}):Object.keys(e).map(function(t){return{key:t,val:e[t]}}):[]}function U7(e){return Array.isArray(e)||I7(e)}function iMe(e){return function(t,o){return typeof t!="string"?(o=t,t=""):t.charAt(t.length-1)!=="/"&&(t+="/"),e(t,o)}}function rMe(e,t,o){var n=e._modulesNamespaceMap[o];return process.env.NODE_ENV!=="production"&&!n&&console.error("[vuex] module namespace not found in "+t+"(): "+o),n}const lMe="/icn-play.svg",cMe="/icn-tiros-de-esquina.svg",dMe="/icn-tiro-a-porteria.svg",mMe="/icn-cambio.svg",pMe="/icn-falta.svg",hMe="/atajada.svg",yMe="/fuera-de-lugar.svg",y0="/gol.svg",gMe="/var.png",uMe="/tiempo-agregado.svg",fMe="/jugada-peligrosa.svg",_Me="/penal-marcado.svg",bMe="/penal-fallado.svg",wMe="/inicia-el-partido.svg",CMe="/fin-del-partido.svg",kMe="/icn-tarjeta-amarilla.svg",SMe="/icn-tarjeta-roja.svg",EMe=[1,2,3,4,6],NMe={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=[],t=`${this.gameEvent.event_type_id}-${this.gameEvent.category_id}`;return r0.GOAL_IDS.includes(t)?(e.push("is-main-event"),e.push("goal")):r0.YELLOW_CARD_IDS.includes(t)?(e.push("is-main-event"),e.push("yellow-card")):r0.RED_CARD_IDS.includes(t)?(e.push("is-main-event"),e.push("red-card")):this.gameEvent.video_link!=="-"&&(e.push("is-main-event"),e.push("normal-video")),this.gameEvent.teamType===1?e.push("time-line-event--home-team"):e.push("time-line-event--away-team"),e},srcImgPlayers(){let e=null;return this.gameEvent.player_id&&this.gameEvent.player_id!=="-"&&(e=this.gameEvent.player_id.split("@"),e=e.map(t=>Aje(t))),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||EMe.includes(this.gameEvent.event_type_id)?"":this.gameEvent.player_name}},watch:{width(){this.emitHeight()},gameEvent:{deep:!0,handler(){this.gameEventKey++}}},methods:{...nMe("general",["setVideoModalVisibility","setVideoSrc"]),thumbnailClick(e){e!=="-"&&this.$emit("thumbnail-click",e)},showVideoTimeline(e){this.setVideoSrc(e),this.setVideoModalVisibility(!0)},getIconClasses(){return["time-line-event__icon--desktop",`time-line-event__icon--desktop-${this.gameEvent.teamType===1?"home":"away"}-team`]},emitHeight(){setTimeout(()=>{this.$refs.timeLineEvent&&this.$refs.timeLineEvent.clientHeight&&this.$refs.timeLineEvent.clientHeight!==this.lastHeight&&(this.lastHeight=this.$refs.timeLineEvent.clientHeight,this.$emit("event-height",this.lastHeight))},500)}},mounted(){if(this.emitHeight(),this.gameEvent.event_type_id===3){const[e,t]=this.gameEvent.player_id.split("@");this.$emit("player-changed",{playerOut:Number(e),playerIn:Number(t),teamId:this.gameEvent.team_id})}}},xMe=e=>(a.pushScopeId("data-v-c284b7dc"),e=e(),a.popScopeId(),e),BMe={class:"time-line-event__details"},$Me={width:"127",preload:"metadata",style:{"border-radius":"8px"}},IMe=["src"],VMe=xMe(()=>a.createElementVNode("div",{class:"time-line-event__details__video-thumbnail__gradient"},[a.createElementVNode("div",{class:"time-line-event__details__video-thumbnail__gradient__button-play"},[a.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none"},[a.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)),AMe={class:"time-line-event__details__info"},OMe={key:0,class:"time-line-event__details__info__header__players"},TMe={class:"time-line-event__details__info__header__players__div-img"},FMe=["src"],zMe={class:"time-line-event__details__info__body"},PMe={class:"time-line-event__details__info__body__comment"},DMe={class:"time-line-event__minute__container"},RMe={class:"time-line-event__minute__container__text"},vMe={class:"time-line-event__minute__container__icon-container"},LMe={class:"time-line-event__minute__container__icon-container__icon"},jMe={key:0,src:cMe,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},MMe={key:1,src:dMe,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},HMe={key:2,src:mMe,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},UMe={key:3,src:pMe,class:"time-line-event__minute__container__icon-container__icon__img",alt:"Event icon"},GMe={key:4,src:hMe,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},WMe={key:5,src:yMe,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},qMe={key:6,src:y0,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},JMe={key:7,src:y0,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},XMe={key:8,src:y0,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},ZMe={key:9,src:gMe,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},YMe={key:10,src:uMe,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},KMe={key:11,src:fMe,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},QMe={key:12,src:_Me,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},eHe={key:13,src:bMe,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},tHe={key:14,src:wMe,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},aHe={key:15,src:CMe,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},oHe={key:16,src:kMe,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},nHe={key:17,src:SMe,class:"time-line-event__minute__container__icon-container__icon__img",alt:"Event icon"},sHe={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 iHe(e,t,o,n,s,i){return a.openBlock(),a.createElementBlock("div",{ref:"timeLineEvent",class:a.normalizeClass(["time-line-event",i.teamTypeClasses]),style:a.normalizeStyle({width:`${o.width}px`}),key:s.gameEventKey},[a.createElementVNode("div",BMe,[o.gameEvent.video_link!=="-"&&o.timeLineWidth>700?(a.openBlock(),a.createElementBlock("div",{key:0,class:"time-line-event__details__video-thumbnail",onClick:t[0]||(t[0]=r=>i.thumbnailClick(o.gameEvent.video_link,o.gameEvent.event_type_name))},[a.createElementVNode("video",$Me,[a.createElementVNode("source",{src:o.gameEvent.video_link+"#t=0.1",type:"video/mp4"},null,8,IMe)]),VMe])):a.createCommentVNode("",!0),a.createElementVNode("div",AMe,[a.createElementVNode("div",{class:a.normalizeClass(["time-line-event__details__info__header",i.teamTypeClasses2])},[o.gameEvent.video_link=="-"?(a.openBlock(),a.createElementBlock("div",OMe,[i.srcImgPlayers?(a.openBlock(!0),a.createElementBlock(a.Fragment,{key:0},a.renderList(i.srcImgPlayers,(r,c)=>(a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass(["img-player",{"second-player":c===1}]),key:c},[a.createElementVNode("div",TMe,[a.createElementVNode("img",{src:r,alt:""},null,8,FMe)])],2))),128)):a.createCommentVNode("",!0)])):a.createCommentVNode("",!0),a.createElementVNode("div",{class:a.normalizeClass(["time-line-event__details__info__header__event-name",i.nameClasses]),onClick:t[1]||(t[1]=r=>i.thumbnailClick(o.gameEvent.video_link,o.gameEvent.event_type_name))},[o.gameEvent.video_link!=="-"?(a.openBlock(),a.createElementBlock("img",{key:0,src:lMe,class:a.normalizeClass(`time-line-event__details__info__header__event-play ${[1,2].includes(o.gameEvent.event_type_id)?`time-line-event__details__info__header__event-play__${o.gameEvent.event_type_name}`:o.gameEvent.video_link!=="-"?"time-line-event__details__info__header__event-play__normal-video":""}`)},null,2)):a.createCommentVNode("",!0),a.createTextVNode(" "+a.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),a.createElementVNode("div",zMe,[a.createElementVNode("div",PMe,a.toDisplayString(this.gameEvent.category_id?`${this.gameEvent.comments}`:""),1)])])]),a.createElementVNode("div",{class:a.normalizeClass(["time-line-event__minute",i.minuteClasses])},[a.createElementVNode("div",DMe,[a.createElementVNode("div",RMe,a.toDisplayString(o.gameEvent.minute)+"'",1),a.createElementVNode("div",vMe,[a.createElementVNode("div",LMe,[o.gameEvent.category_id==18?(a.openBlock(),a.createElementBlock("img",jMe)):o.gameEvent.category_id==20?(a.openBlock(),a.createElementBlock("img",MMe)):o.gameEvent.category_id==10?(a.openBlock(),a.createElementBlock("img",HMe)):o.gameEvent.category_id==21?(a.openBlock(),a.createElementBlock("img",UMe)):o.gameEvent.category_id==27?(a.openBlock(),a.createElementBlock("img",GMe)):o.gameEvent.category_id==17?(a.openBlock(),a.createElementBlock("img",WMe)):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?(a.openBlock(),a.createElementBlock("img",qMe)):o.gameEvent.category_id==4?(a.openBlock(),a.createElementBlock("img",JMe)):o.gameEvent.category_id==13||o.gameEvent.category_id==16?(a.openBlock(),a.createElementBlock("img",XMe)):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?(a.openBlock(),a.createElementBlock("img",ZMe)):o.gameEvent.category_id==28?(a.openBlock(),a.createElementBlock("img",YMe)):o.gameEvent.category_id==26?(a.openBlock(),a.createElementBlock("img",KMe)):o.gameEvent.category_id==22?(a.openBlock(),a.createElementBlock("img",QMe)):o.gameEvent.category_id==15||o.gameEvent.category_id==23?(a.openBlock(),a.createElementBlock("img",eHe)):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?(a.openBlock(),a.createElementBlock("img",tHe)):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?(a.openBlock(),a.createElementBlock("img",aHe)):o.gameEvent.category_id==8?(a.openBlock(),a.createElementBlock("img",oHe)):o.gameEvent.category_id==9?(a.openBlock(),a.createElementBlock("img",nHe)):(a.openBlock(),a.createElementBlock("img",sHe))])])])],2)],6)}const rHe=Bi(NMe,[["render",iHe],["__scopeId","data-v-c284b7dc"]]),lHe={"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"},cHe={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 xd=null;const dHe={name:"TimeLine",components:{Tooltip:Bje,TimeLineEvent:rHe},mixins:[Ije],props:{gameData:{type:Object,required:!0},timeLinePeriod:{type:String,default:"all"},socket:{type:Object,default:()=>({})}},data(){return{gameEvents:[],gameEventsByPeriod:{firstHalf:[],secondHalf:[]},dataVideo:{visible:!1,link:""},gameEventsQueue:[],gameEventsUrl:"https://al2nv2dmkc.execute-api.us-west-2.amazonaws.com/prod/mxm/",transitionName:"",subscriptionInfo:{gameId:0,isSubscribed:!1},areGameEventsFilled:!1,timeLineWidth:812,eventContainerWidth:0,channelName:"",timeLineStatus:"awaiting",timeLeft:"",lastMinute:0,timeLineStatuses:[],currentStatus:{abbreviation:""},timer:"00:00"}},computed:{isMobile(){return this.timeLineWidth<580},gameEventWidth(){return this.timeLineWidth/2-30},gameEventsToShow(){return this.timeLinePeriod==="all"?this.gameEvents:this.gameEventsByPeriod[this.timeLinePeriod]}},watch:{gameData:{deep:!0,immediate:!0,handler(e){e&&e.id&&(this.gameDateTime=new Date(this.gameData.dateTimeUTC),this.gameEventsQueue=[],this.timeLineStatuses=[],this.transitionName="",this.checkTimeLeft(),e.status!==1&&this.socket&&this.socket.connected?this.subscribeToMXMChannel():this.timeLineStatus="finished",this.fillGameEvents(e.id))}},"socket.connected":{immediate:!0,handler(e){e&&this.gameData.id&&this.gameData.status!==1&&this.subscribeToMXMChannel()}},gameEvents(e){e.length&&this.gameData.status!==1&&(this.timeLineStatus="live")}},methods:{async fillGameEvents(e){try{const t=await this.fetchGameEvents(e);t?(this.gameEvents=[...t],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(t){throw new Error(t)}},getGameEventClassAndSetIcon(e,t){return e.icon=t===0?"inicio_del_partido":lHe[`${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:t}}=await N7.get(`${this.gameEventsUrl}${e}`);return t}catch(t){throw new Error(t)}},subscribeToMXMChannel(){this.channelName=`mxm.game.${this.gameData.id}`,this.socket.emit("subscribe",{channel:this.channelName}),this.isSubscribed=!0},checkGameEventsQueue(){this.gameEventsQueue.length&&this.gameEvents.push(...this.gameEventsQueue),this.areGameEventsFilled=!0},setUpResizeObserver(){if(window.ResizeObserver)xd=new ResizeObserver(()=>{this.timeLineWidth=this.$refs.timeLine.clientWidth}),xd.observe(this.$refs.timeLine);else throw new Error("Resize observer not supported!")},updateContainerHeight(e,t){const o=this.$refs[`gameEventDiv${t}`][0],n=this.$refs[`gameEventLine${t}`]?this.$refs[`gameEventLine${t}`][0]:null,s=e+12;o&&(o.style.height=`${s}px`),n&&(n.style.height=`${s}px`)},sortGameEvents(){this.gameEvents.sort((e,t)=>this.getMatchLapseMinutes(e.match_lapse)+Number(e.minute)-(this.getMatchLapseMinutes(t.match_lapse)+Number(t.minute))),this.gameEventsByPeriod={firstHalf:[],secondHalf:[]},this.gameEvents.forEach(e=>{this.gameEventsByPeriod[e.match_lapse===1?"firstHalf":"secondHalf"].push(e)})},getMatchLapseMinutes(e){let t=0;switch(e){case 1:t=0;break;case 2:t=45;break;case 3:t=90;break;case 4:t=105;break;case 5:t=120;break}return t},addGameEventFromChannel(e){this.areGameEventsFilled?(this.gameEvents.push(e),this.sortGameEvents()):this.gameEventsQueue.push(e)},deleteGameEventFromChannel(e){const t=this.gameEvents.findIndex(o=>o.play_id===e.play_id);t&&this.gameEvents.splice(t,1)},checkTimeLineStatus(){this.gameEvents.forEach(t=>{const o=cHe[t.game_status];o&&this.timeLineStatuses.push({...o,gameEvent:t})}),this.timeLineStatuses.sort((t,o)=>o.weight-t.weight);const e=this.timeLineStatuses[0];e&&(this.currentStatus=e,e.playTimer&&this.startTimer())},startTimer(){},getTeamLogoSrc(e="homeTeam"){const t=this.gameData[e].team_id;return Vje(t)},thumbnailClick(e){this.dataVideo.link=e,this.dataVideo.visible=!0}},mounted(){this.$nextTick(()=>{this.setUpResizeObserver()})},beforeUnmount(){xd&&xd.unobserve(this.$refs.timeLine)},sockets:{new_mxm([e,t]){this.channelName===e&&this.addGameEventFromChannel(t)},update_mxm([e,t]){this.channelName===e&&(this.deleteGameEventFromChannel(t),this.addGameEventFromChannel(t))},delete_mxm([e,t]){this.channelName===e&&this.deleteGameEventFromChannel(t)}}},G7=e=>(a.pushScopeId("data-v-f6284340"),e=e(),a.popScopeId(),e),mHe={ref:"timeLine",class:"time-line"},pHe={class:"time-line__header"},hHe={class:"time-line__header__dot"},yHe={class:"time-line__header__dot__home-team team-logo"},gHe=["src"],uHe={class:"time-line__header__dot__away-team team-logo"},fHe=["src"],_He={class:"time-line__game-events"},bHe={key:1,class:"start-line"},wHe=G7(()=>a.createElementVNode("div",null,null,-1)),CHe=G7(()=>a.createElementVNode("div",null,null,-1)),kHe=[wHe,CHe],SHe={key:1,class:"noEventText"},EHe={class:"tooltip-data"},NHe=["src"];function xHe(e,t,o,n,s,i){const r=a.resolveComponent("TimeLineEvent"),c=a.resolveComponent("Tooltip");return a.openBlock(),a.createElementBlock(a.Fragment,null,[a.createElementVNode("div",mHe,[a.createElementVNode("div",pHe,[a.createElementVNode("div",hHe,[a.createElementVNode("div",yHe,[a.createElementVNode("img",{src:i.getTeamLogoSrc("homeTeam"),alt:""},null,8,gHe)]),a.createElementVNode("div",uHe,[a.createElementVNode("img",{src:i.getTeamLogoSrc("awayTeam"),alt:""},null,8,fHe)])])]),a.createElementVNode("div",_He,[o.gameData.status!==4||o.gameData.is_live?(a.openBlock(),a.createBlock(a.TransitionGroup,{key:0,name:s.transitionName,tag:"div"},{default:a.withCtx(()=>[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(i.gameEventsToShow,(h,d)=>(a.openBlock(),a.createElementBlock("div",{class:"time-line__game-events__grid",key:h.play_id},[a.createElementVNode("div",{ref_for:!0,ref:`gameEventDiv${d}`,class:a.normalizeClass(i.getGameEventClassAndSetIcon(h,d))},[a.createElementVNode("div",{class:a.normalizeClass(i.getEventContainerClass(h))},[a.createVNode(r,{"game-event":h,"is-mobile":i.isMobile,"time-line-width":s.timeLineWidth,width:i.gameEventWidth,onEventHeight:l=>i.updateContainerHeight(l,d),onPlayerChanged:t[0]||(t[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?(a.openBlock(),a.createElementBlock("div",{key:0,ref_for:!0,ref:`gameEventLine${d}`,class:"line"},null,512)):a.createCommentVNode("",!0),o.gameData.status===1&&d===i.gameEventsToShow.length-1?(a.openBlock(),a.createElementBlock("div",bHe,kHe)):a.createCommentVNode("",!0)],2)]))),128))]),_:1},8,["name"])):(a.openBlock(),a.createElementBlock("div",SHe,"Aún no comienza el partido"))])],512),a.createVNode(c,{data:s.dataVideo},{default:a.withCtx(()=>[a.createElementVNode("div",EHe,[a.createElementVNode("div",null,[a.createElementVNode("video",{class:"tooltip-video",controls:"",autoplay:"",src:s.dataVideo.link,format:"video/mp4"},null,8,NHe)])])]),_:1},8,["data"])],64)}const BHe=Bi(dHe,[["render",xHe],["__scopeId","data-v-f6284340"]]),$He={class:"game-time-line__options"},IHe={class:"game-time-line__timeline"},VHe={__name:"GSC-GameTimeLine",props:{game:{type:Object,default:()=>({id:79601,seasonId:1772,status:1,dateTimeUTC:"2023-10-01T22:20:00Z",is_live:0,homeTeam:{logo:"https://az755631.vo.msecnd.net/teams-80/18.png",team_id:18,provisional_logo:"https://az755631.vo.msecnd.net/teams-provisional/18.png",colloquial_name:"Toluca",acronym:"TOL",team_name:"Toluca"},awayTeam:{logo:"https://az755631.vo.msecnd.net/teams-80/1.png",team_id:1,provisional_logo:"https://az755631.vo.msecnd.net/teams-provisional/1.png",colloquial_name:"Chivas",acronym:"CHI",team_name:"Guadalajara"}})},socket:{type:Object,default:()=>({})}},setup(e){N7.defaults.headers.common.Authorization="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MCwibmFtZSI6IlVzdWFyaW8gRnJlZSIsInVzZXJuYW1lIjoiZnJlZUBnb2xzdGF0cy5jb20iLCJlbWFpbCI6ImZyZWVAZ29sc3RhdHMuY29tIiwiaWF0IjoxNjA2NzU4Nzk1LCJleHAiOjE2MzgyOTQ3OTV9.kPNmP7yDtk38cAXrUyc7OHRh6J25VFqy-XUNzbK-4YE";const t=a.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=a.ref({width:"auto",height:"30px",padding:"0px 20px",borderRadius:"50px",borderColor:"#8a8a8a",borderWidth:"0.5px",backgroundColor:"rgba(255, 255, 255, 0.04)",fontSize:"14px",fontFamily:"Poppins-Regular, sans-serif",fontColor:"rgba(255, 255, 255, 0.5)",activeFontColor:"#FFFFFF",activeBorderColor:"#cbee6b"});let n=null;const s=a.ref(["Todo","1er tiempo","2do tiempo"]),i=a.ref("Todo"),r=a.ref({}),c=a.ref(null),h=a.ref(0),d=a.computed(()=>{let y="all";return i.value==="1er tiempo"||i.value==="1er"?y="firstHalf":(i.value==="2do tiempo"||i.value==="2do")&&(y="secondHalf"),y}),l=a.computed(()=>h.value<500);function p(y){i.value=y}function g(y){r.value=y}function m(){if(window.ResizeObserver)n=new ResizeObserver(()=>{h.value=c.value.clientWidth}),n.observe(c.value);else throw new Error("Resize observer not supported!")}return a.onMounted(()=>{m()}),a.onBeforeUnmount(()=>{n&&n.unobserve(c.value)}),(y,u)=>(a.openBlock(),a.createElementBlock("div",{ref_key:"gameTimeLine",ref:c,class:"game-time-line"},[a.createElementVNode("div",$He,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(s.value,f=>(a.openBlock(),a.createElementBlock("div",{key:f,class:"game-time-line__options__option"},[a.createVNode(rLe,a.mergeProps(h.value<390?o.value:t.value,{text:f=="Todo"?f:h.value<390?f.substring(0,3):f,"is-active":i.value===f,onClick:b=>p(f)}),null,16,["text","is-active","onClick"])]))),128))]),a.createElementVNode("div",IHe,[a.createVNode(BHe,{"game-data":e.game,"time-line-period":d.value,"is-mobile":l.value,socket:e.socket,onGameEventsByPeriodFilled:g},null,8,["game-data","time-line-period","is-mobile","socket"])])],512))}},AHe=Bi(VHe,[["__scopeId","data-v-787294df"]]);function OHe(e){const t=a.ref({width:0,height:0});function o(){const n=e.value.getBoundingClientRect();t.value.width=n.width,t.value.height=n.height}return a.onMounted(()=>{o(),window.addEventListener("resize",o)}),a.onUnmounted(()=>{window.removeEventListener("resize",o)}),{elementSize:t}}const THe=(e,t)=>{const o=e.__vccOpts||e;for(const[n,s]of t)o[n]=s;return o},g0={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,t=this.$refs.content.scrollWidth;t>0&&e>0&&(t>e?(this.showRightArrow=!0,clearInterval(this.intervalid1)):clearInterval(this.intervalid1))}).bind(this),3e3)}}},W7=()=>{a.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}))},q7=g0.setup;g0.setup=q7?(e,t)=>(W7(),q7(e,t)):W7;const FHe={ref:"gscScrollableContainer",class:"scrollable-container"},zHe={class:"scrollable-arrows"},PHe=["width","height","viewBox"],DHe=["stroke"],RHe={class:"scrollable-wrapper"},vHe={class:"scrollable-arrows"},LHe=["width","height","viewBox"],jHe=["stroke"];function MHe(e,t,o,n,s,i){return a.openBlock(),a.createElementBlock("div",FHe,[o.arrows?(a.openBlock(),a.createElementBlock("div",{key:0,class:a.normalizeClass(["arrows-container",i.hideShowLeftArrow]),onClick:t[0]||(t[0]=(...r)=>i.scrollLeft&&i.scrollLeft(...r))},[a.createElementVNode("div",zHe,[(a.openBlock(),a.createElementBlock("svg",{width:o.arrowsWidth,height:o.arrowsHeight,viewBox:i.getViewBox,fill:"none",xmlns:"http://www.w3.org/2000/svg"},[a.createElementVNode("path",{d:"M6.36523 13.788L1.10146 8.52429C0.479824 7.90265 0.479824 6.88541 1.10147 6.26377L6.36523 1",stroke:o.arrowsColor},null,8,DHe)],8,PHe))])],2)):a.createCommentVNode("",!0),a.createElementVNode("div",{class:"scrollable-content scrollable-content-slider",ref:"content",onScroll:t[1]||(t[1]=(...r)=>i.getScroll&&i.getScroll(...r))},[a.createElementVNode("div",RHe,[a.renderSlot(e.$slots,"default",{},void 0,!0)])],544),o.arrows?(a.openBlock(),a.createElementBlock("div",{key:1,id:"arrows-container-right",class:a.normalizeClass(["arrows-container",i.hideShowRightArrow]),onClick:t[2]||(t[2]=(...r)=>i.scrollRight&&i.scrollRight(...r))},[a.createElementVNode("div",vHe,[(a.openBlock(),a.createElementBlock("svg",{width:o.arrowsWidth,height:o.arrowsHeight,viewBox:i.getViewBox,fill:"none",xmlns:"http://www.w3.org/2000/svg"},[a.createElementVNode("path",{d:"M0.634765 1.21195L5.89853 6.47571C6.52018 7.09735 6.52018 8.11459 5.89853 8.73623L0.634766 14",stroke:o.arrowsColor},null,8,jHe)],8,LHe))])],2)):a.createCommentVNode("",!0)],512)}const HHe=THe(g0,[["render",MHe],["__scopeId","data-v-b548a08d"]]),UHe=(e,t)=>{const o=e.__vccOpts||e;for(const[n,s]of t)o[n]=s;return o},u0={components:{GSCSlider:HHe},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=a.ref("myDivRef"),{elementSize:t}=OHe(e);return{myDivRef:e,elementSize:t}},methods:{clickEmitEvent(e){this.$emit("input",e)},customGrid(e){var t={};return e.width>768?t={fontSize:"16px"}:e.width>480?t={fontSize:"14px"}:t={fontSize:"12px"},t}}},J7=()=>{a.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}))},X7=u0.setup;u0.setup=X7?(e,t)=>(J7(),X7(e,t)):J7;const GHe={ref:"myDivRef"},WHe={key:0,class:"gs-switch-container"},qHe=["onClick"],JHe={key:1,class:"gs-switch-container-type"},XHe=["onClick"],ZHe={key:2,class:"gs-switch-container-carousel"},YHe=["onClick"];function KHe(e,t,o,n,s,i){const r=a.resolveComponent("GSCSlider");return a.openBlock(),a.createElementBlock("div",GHe,[o.type==0?(a.openBlock(),a.createElementBlock("div",WHe,[a.createElementVNode("div",{class:"gs-switch-container__control",style:a.normalizeStyle([i.customGrid(n.elementSize)])},[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(o.buttons,(c,h)=>(a.openBlock(),a.createElementBlock("div",{class:"gs-switch-container__control__button-option",style:a.normalizeStyle([{height:o.height},o.selectedOption==c?{borderColor:o.colorOptionActive,color:o.colorFont+"!important",background:o.backgroundOptionActive}:{borderColor:o.colorOptionDisable,color:"grey !important"}]),key:h,onClick:d=>(o.selectedOption=c,i.clickEmitEvent(c))},a.toDisplayString(c),13,qHe))),128))],4),a.renderSlot(e.$slots,o.selectedOption,{},void 0,!0)])):a.createCommentVNode("",!0),o.type==1?(a.openBlock(),a.createElementBlock("div",JHe,[a.createElementVNode("div",{class:"gs-switch-container-type__control",style:a.normalizeStyle([i.customGrid(n.elementSize)])},[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(o.buttons,(c,h)=>(a.openBlock(),a.createElementBlock("div",{class:"gs-switch-container-type__control__button-option-type",style:a.normalizeStyle([{height:o.height},o.selectedOption==c?{borderColor:o.colorOptionActive,color:o.colorFont+"!important",background:o.backgroundOptionActive}:{borderColor:o.colorOptionDisable,borderWidth:"0px",borderWidth:"0px !important",color:"grey !important",background:o.backgroundOptionDisable}]),key:h,onClick:d=>(o.selectedOption=c,i.clickEmitEvent(c))},a.toDisplayString(c),13,XHe))),128))],4)])):a.createCommentVNode("",!0),o.type==2?(a.openBlock(),a.createElementBlock("div",ZHe,[a.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:a.withCtx(()=>[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(o.buttons,(c,h)=>(a.openBlock(),a.createElementBlock("div",{class:"button-option-multi",style:a.normalizeStyle([{height:o.height},o.selectedOption==c?{borderColor:o.colorOptionActive,color:o.colorFont+"!important",background:o.backgroundOptionActive}:{borderColor:o.colorOptionDisable,color:"grey !important"}]),key:h,onClick:d=>(o.selectedOption=c,i.clickEmitEvent(c))},a.toDisplayString(c),13,YHe))),128))]),_:1},8,["arrows","background-color","px-scroll","scroll-color","arrows-position","arrowsScrollHide","arrows-background","arrows-container-bg-l","arrows-container-bg-r","arrows-margin","arrows-radius","arrows-border"])])):a.createCommentVNode("",!0)],512)}const Z7=UHe(u0,[["render",KHe],["__scopeId","data-v-8a86dfaf"]]);function Y7(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function QHe(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var o=function n(){return this instanceof n?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};o.prototype=t.prototype}else o={};return Object.defineProperty(o,"__esModule",{value:!0}),Object.keys(e).forEach(function(n){var s=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(o,n,s.get?s:{enumerable:!0,get:function(){return e[n]}})}),o}var f0={exports:{}};function _0(){}_0.prototype={on:function(e,t,o){var n=this.e||(this.e={});return(n[e]||(n[e]=[])).push({fn:t,ctx:o}),this},once:function(e,t,o){var n=this;function s(){n.off(e,s),t.apply(o,arguments)}return s._=t,this.on(e,s,o)},emit:function(e){var t=[].slice.call(arguments,1),o=((this.e||(this.e={}))[e]||[]).slice(),n=0,s=o.length;for(n;n<s;n++)o[n].fn.apply(o[n].ctx,t);return this},off:function(e,t){var o=this.e||(this.e={}),n=o[e],s=[];if(n&&t)for(var i=0,r=n.length;i<r;i++)n[i].fn!==t&&n[i].fn._!==t&&s.push(n[i]);return s.length?o[e]=s:delete o[e],this}},f0.exports=_0,f0.exports.TinyEmitter=_0;var eUe=f0.exports,tUe=eUe,aUe=new tUe;const Bd=Y7(aUe),rJe="",oUe={class:"game-data__header"},nUe={class:"game-data__header__tournament-season-dropdown"},sUe={class:"game-data__header__teams-carousel"},iUe={class:"game-data__body"},rUe={class:"game-data__body__menu"},lUe={class:"game-data__body__menu__contmenuswitch"};_r.defaults.headers.common.Authorization="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MCwibmFtZSI6IlVzdWFyaW8gRnJlZSIsInVzZXJuYW1lIjoiZnJlZUBnb2xzdGF0cy5jb20iLCJlbWFpbCI6ImZyZWVAZ29sc3RhdHMuY29tIiwiaWF0IjoxNjA2NzU4Nzk1LCJleHAiOjE2MzgyOTQ3OTV9.kPNmP7yDtk38cAXrUyc7OHRh6J25VFqy-XUNzbK-4YE";const cUe=a.defineComponent({name:"TemplateVideos",components:{StatisticsMain:Rz,GSCGameTimeLine:AHe,GscSwitchComponent:Z7,GSCLineupsMain:iK,GSCDatosGSMain:Yre,GSCVideoGame:S1e,GSCSummaryMain:sLe}}),dUe=De(Object.assign(cUe,{props:{currentSeasonId:{type:Number,default:0},defaultGameId:{type:Number,default:0,validator(e){return!Number.isNaN(e)&&e>=0}},sortCalendar:{type:Boolean,default:!0},socket:{type:Object,default:()=>({})}},emits:["openmedia","change-season-id","onOpenProfile"],setup(e,{emit:t}){const o=e,n=fm();Bd.on("socket-connected",()=>{n.commit("nextGeneral/updateIsSocketConnected",o.socket.connected)});const s=a.ref({season:[]}),i=a.ref({}),r=a.ref({}),c=a.ref(!0),h=a.ref("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MCwibmFtZSI6IlVzdWFyaW8gRnJlZSIsInVzZXJuYW1lIjoiZnJlZUBnb2xzdGF0cy5jb20iLCJlbWFpbCI6ImZyZWVAZ29sc3RhdHMuY29tIiwiaWF0IjoxNjA2NzU4Nzk1LCJleHAiOjE2MzgyOTQ3OTV9.kPNmP7yDtk38cAXrUyc7OHRh6J25VFqy-XUNzbK-4YE"),d=a.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 l=null;const p=a.ref(null),g=a.ref(0),m=a.ref(d.value[0]);let y=a.ref("");const u=a.computed(()=>{const V=[];return i.value&&i.value.id&&(V.push({id:i.value.id,name:i.value.name,type:i.value.type}),i.value.related_seasons&&i.value.related_seasons.forEach(A=>{V.push({id:A.id,type:A.type})})),V});function f(){l=new ResizeObserver(V=>{for(const A of V)g.value=A.contentRect.width}),l.observe(p.value)}const b=a.computed(()=>{let V={};return r.value&&r.value.game_id&&(V={gameId:r.value.game_id,id:r.value.game_id,seasonId:r.value.season_id,status:r.value.game_status,game_status:r.value.game_status==0?4:r.value.game_status,dateTimeUTC:r.value.date_time_utc,homeTeam:r.value.home_team,awayTeam:r.value.visiting_team,is_live:r.value.is_live}),V});a.watch(()=>n.state.nextGeneral.gameForAnalysis,()=>{n.commit("nextGeneral/updateIsSocketConnected",o.socket.connected)},{deep:!0,immediate:!0});function C(V){s.value=V,V.is_captured===0?c.value=!1:c.value=!0,s.value.id!==V.id&&(s.value=V)}function w(V){t("openmedia",V)}function _(V){t("onOpenProfile",V)}function k(V){$(V),V=="Estadísticas"&&(y.value="Comparativa")}function x(){y.value=""}function I(V){i.value.id!==V.id&&(i.value=V,t("change-season-id",V.id))}const E=a.computed(()=>d.value.map(V=>{if(c.value)return V.name;if(V.id!==5&&V.id!==6)return V.name}).filter(V=>V!=null));function $(V){m.value=d.value.find(A=>A.name===V)||d.value[0]}a.onMounted(()=>{f()}),a.onBeforeUnmount(()=>{l&&l.disconnect()});function O(V){r.value=V}return(V,A)=>(a.openBlock(),a.createElementBlock("div",{class:"game-data",ref_key:"gamedata",ref:p},[a.createElementVNode("div",oUe,[a.createElementVNode("div",nUe,[a.createVNode(a.unref(N9),{"current-season-id":e.currentSeasonId,onInput:C},null,8,["current-season-id"]),a.createVNode(a.unref(J9),{"current-season-id":e.currentSeasonId,seasons:s.value.seasons,onInput:I},null,8,["current-season-id","seasons"])]),a.createElementVNode("div",sUe,[a.createVNode(a.unref(o$),{token:h.value,"await-for-seasons":"",seasons:u.value,"is-pagination-visible":!1,"are-games-carousel-type":"","default-game-id":o.defaultGameId,"sort-calendar":o.sortCalendar,onChangeGameCarousel:O},null,8,["token","seasons","default-game-id","sort-calendar"])])]),a.createElementVNode("div",iUe,[a.createElementVNode("div",rUe,[a.createElementVNode("div",lUe,[a.createVNode(a.unref(Z7),{type:2,buttons:E.value,"font-family":"Poppins-Regular","font-size":"16px",width:g.value<400||g.value<700?"max-content":g.value<840||g.value<1050?"155px":"165px","selected-option":m.value.name,borderWidth:"1px",arrow:!1,height:"30px",onInput:$},null,8,["buttons","width","selected-option"])])]),(a.openBlock(),a.createBlock(a.resolveDynamicComponent(m.value.componentName),{game:b.value,subsection:a.unref(y),seasonSelected:i.value,showLineups:c.value,onResetSubsection:x,onOpenmedia:w,onOnOpenProfile:_,onChangeToTab:k,socket:e.socket},null,40,["game","subsection","seasonSelected","showLineups","socket"]))])],512))}}),[["__scopeId","data-v-2fe621c6"]]);async function Ct({url:e,options:t={},retries:o=3}){return await _r.get(e,t).then(n=>n).catch(n=>o>0?Ct({url:e,options:t,retries:o-1}):n)}async function K7({seasonId:e},t=!0){try{const o={url:`https://b5lrr2nc0h.execute-api.us-west-2.amazonaws.com/prod/statisticsLeagueBySeason/${e}`};t&&(o.url=`https://golstats-microservices.s3-us-west-2.amazonaws.com/statsLeagueBySeason-${e}.json`,o.retries=1);const{data:{data:n}}=await Ct(o);return n}catch(o){if(t)return K7({seasonId:e},!1);throw new Error(o)}}async function mUe({seasonId:e}){try{return(await Ct({url:`https://iwxfzq6e2h.execute-api.us-west-2.amazonaws.com/prod/v2/statisticsLeagueBySeason/${e}`})).data.data}catch(t){return Promise.reject(t)}}async function pUe({seasonId:e}){try{return(await Ct({url:`https://sqf4rkvoge.execute-api.us-west-2.amazonaws.com/prod/v3/statisticsGroupedBySeason/${e}`})).data.data}catch(t){return Promise.reject(t)}}function hUe(e,t,o,n,s,i,r=!1){const c=o.map(h=>h===1?2:h===2?1:3);return e.filter(h=>{const d=i&&h[s.teamId]?h[s.teamId]!==i:!1,l=t===1?2:1;return(r||n.includes(h[s.gameId]))&&(!t||(d?l:t)===h[s.playingAs])&&(o.includes(h[s.matchResult])&&h[s.teamId]===i||c.includes(h[s.matchResult])&&h[s.teamId]!==i)})}function Q7(e,t,o,n,s){return t.length===2&&o.length===3&&n.length===6?e:e.filter(i=>t.includes(i[s.playingAs])&&o.includes(i[s.matchResult])&&n.includes(i[s.section]))}async function eS({seasonId:e}){try{const t=`https://8tvo5bp9ai.execute-api.us-west-2.amazonaws.com/prod/gamesBySeason/${e}`;return(await Ct({url:t})).data}catch(t){return Promise.reject(t)}}async function yUe({seasonId:e,gameId:t}){try{const o=`https://iwxfzq6e2h.execute-api.us-west-2.amazonaws.com/prod/v2/statisticsLeagueBySeason/${e}/games/${t}`,{data:n}=await Ct({url:o});return n}catch(o){return Promise.reject(o)}}async function gUe({gameId:e}){try{const t=`https://2uj7ojhmt5.execute-api.us-west-2.amazonaws.com/prod/V2/statisticsLive/${e}`;return(await Ct({url:t})).data.data}catch(t){return Promise.reject(t)}}async function uUe({gameId:e}){try{const t=`https://55sbpmq0f5.execute-api.us-west-2.amazonaws.com/prod/specialMentions/${e}`;return(await Ct({url:t})).data.data||[]}catch(t){return Promise.reject(t)}}const fUe=["categoryId","matchLapse","section","matchResult","playingAs","total"];let b0=null;function tS(){return b0||(b0=lr(fUe)),b0}async function _Ue(e){try{const t=`https://d2oco6mqmc.execute-api.us-west-2.amazonaws.com/prod/teamsBySeason/${e.seasonId}`;return(await Ct({url:t})).data}catch(t){return Promise.reject(t)}}async function aS({seasonId:e,teamId:t}){try{return await Ct({url:`https://a4dcb6avog.execute-api.us-west-2.amazonaws.com/prod/v2/statisticsTeamBySeason/${e}/${t}`})}catch(o){return Promise.reject(o)}}async function bUe(e){try{const t=`https://yjeig444bb.execute-api.us-west-2.amazonaws.com/prod/teamsBySeason/${e.seasonId}`;return await Ct({url:t})}catch(t){return Promise.reject(t)}}async function wUe(e){try{return await Ct({url:`https://nckawv8v3b.execute-api.us-west-2.amazonaws.com/prod/v2/statisticsByGame/${e.gameId}`})}catch(t){return Promise.reject(t)}}const CUe={leagueGeneral:{namespaced:!0,state:{seasonPlays:[],currentSeasonGames:[],currentSeasonTeams:[],selectedRound:1,booleanAreLiveGames:!1,booleanIsLiveGamesModalOpen:!1},getters:{seasonPlays:e=>e.seasonPlays,filteredPlaysStack(e,t,o,n){return hUe(e.seasonPlays,n["filterGeneral/getPlayingAs"],n["filterGeneral/getResults"],n["filterGeneral/getSelectedGamesIds"],tS(),n["teamsGeneral/team"].team_id,!0)},nextGamesSchedule(e){const t=e.currentSeasonGames.reduce((o,n)=>{const s={...n};return s.home_team=e.currentSeasonTeams.find(i=>i.team_id===n.home_team),s.visiting_team=e.currentSeasonTeams.find(i=>i.team_id===n.visiting_team),o[n.matchday_abbreviation]?o[n.matchday_abbreviation][n.game_status===3?"canceled":n.date]?o[n.matchday_abbreviation][n.game_status===3?"canceled":n.date].push(s):o[n.matchday_abbreviation][n.game_status===3?"canceled":n.date]=[s]:o[n.matchday_abbreviation]={[n.game_status===3?"canceled":n.date]:[s]},o},{});for(let[o,n]of Object.entries(t))t[o]=Object.entries(n).map(([s,i])=>({date:s,games:i})),t[o].sort((s,i)=>s.date<i.date?-1:s.date>i.date?1:0);return t},matchdaysDates(e,t){let o=[];if(t.nextGamesSchedule){let n=Object.keys(t.nextGamesSchedule);for(let s of n){let i=Number(s.replace("M","")),r=t.nextGamesSchedule[s].map(c=>({matchday:i,date:new Date(c.date)}));o=o.concat(r)}}return o},closestMatchDay(e,t){let o=new Date,n=0,s=-new Date(0,0,0).valueOf(),i=t.matchdaysDates,r=i.length;for(let c=0;c<i.length;c++)n=Math.abs(i[c].date-o),n<s&&(r=c,s=n);return i[r]?i[r].matchday:1}},mutations:{setBooleanIsLiveGamesModalOpen(e,t){e.booleanIsLiveGamesModalOpen=t},setBooleanAreLiveGames(e,t){e.booleanAreLiveGames=t},updateSeasonPlays(e,t){e.seasonPlays=t},updateCurrentSeasonTeams(e,t){e.currentSeasonTeams=t},updateCurrentSeasonGames(e,t){e.currentSeasonGames=t},updateSelectedRound(e,t){e.selectedRound=t}},actions:{async getSeasonPlays({commit:e,rootGetters:t},o=!1){try{const n=await K7({seasonId:t["filterGeneral/getSeasonId"]});if(o)return n;e("updateSeasonPlays",n)}catch(n){return Promise.reject(n)}},async getCurrentSeasonGames({commit:e,rootGetters:t}){try{const o=await eS({seasonId:t["loginGeneral/seasonId"]});e("updateCurrentSeasonGames",o)}catch(o){return Promise.reject(o)}},async getCurrentSeasonTeams({commit:e,rootGetters:t}){try{const o=await _Ue({seasonId:t["loginGeneral/seasonId"]});e("updateCurrentSeasonTeams",o.teams)}catch(o){return Promise.reject(o)}},async isDataFilled({state:e,dispatch:t,commit:o}){try{if(e.currentSeasonGames.length>0&&e.currentSeasonTeams.length>0)return o("setIsSectionLoading",!1,{root:!0}),!0;const n=[void 0,void 0];return e.currentSeasonGames.length===0&&(n[0]=t("getCurrentSeasonGames")),e.currentSeasonTeams.length===0&&(n[1]=t("getCurrentSeasonTeams")),await Promise.all(n),!1}catch(n){throw new Error(n)}}}}};async function kUe({filter:e}){try{const t=`https://n7ielynjxk.execute-api.us-east-2.amazonaws.com/qa/filters?filters=${e}`,{data:o}=await Ct({url:t});return o}catch(t){return Promise.reject(t)}}const SUe=["categoryId","teamId","matchResult","playingAs","matchLapse","section","total"];let w0=null;function EUe(){return w0||(w0=lr(SUe)),w0}class $d{constructor(){Le(this,"maximumLiveSection",1);Le(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:[]});Le(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(t){t>this.maximumLiveSection&&(this.maximumLiveSection=t)}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(t,o,n){n&&(this.setMaximumLiveSection(t),this.accomplished.totalLive+=o,this.accomplished.totalsLiveTrendLive.sections[t-1]+=o,this.increaseTrendLiveAccumulatedByOne(this.accomplished.totalsLiveTrendLive,t,o)),this.accomplished.totalPostGame+=o,this.accomplished.avgPostGameTrendLive.sections[t-1]+=o,this.increaseTrendLiveAccumulatedByOne(this.accomplished.avgPostGameTrendLive,t,o)}increaseReceivedByOne(t,o,n){n&&(this.setMaximumLiveSection(t),this.received.totalLive+=o,this.received.totalsLiveTrendLive.sections[t-1]+=o,this.increaseTrendLiveAccumulatedByOne(this.received.totalsLiveTrendLive,t,o)),this.received.totalPostGame+=o,this.received.avgPostGameTrendLive.sections[t-1]+=o,this.increaseTrendLiveAccumulatedByOne(this.received.avgPostGameTrendLive,t,o)}increaseTrendLiveAccumulatedByOne(t,o,n){for(let s=o-1;s<t.accumulated.length;s++)t.accumulated[s]+=n}decreaseAccomplishedLiveByOne(t,o){this.accomplished.totalLive>0&&(this.accomplished.totalLive-=o),this.accomplished.totalsLiveTrendLive.sections[t-1]>0&&(this.accomplished.totalsLiveTrendLive.sections[t-1]-=o,this.decreaseTotalsLiveTrendLiveAccumulatedByOne(this.accomplished.totalsLiveTrendLive,t,o))}decreaseReceivedLiveByOne(t,o){this.received.totalLive>0&&(this.received.totalLive-=o),this.received.totalsLiveTrendLive.sections[t-1]>0&&(this.received.totalsLiveTrendLive.sections[t-1]-=o,this.decreaseTotalsLiveTrendLiveAccumulatedByOne(this.received.totalsLiveTrendLive,t,o))}decreaseTotalsLiveTrendLiveAccumulatedByOne(t,o,n){for(let s=t.accumulated.length-1;s>=o-1;s--)t.accumulated[s]-=n}calculateAvg(t){t&&(this.accomplished.avgPostGame=this.accomplished.totalPostGame/t,this.received.avgPostGame=this.received.totalPostGame/t,this.accomplished.avgPostGameTrendLive.sections=this.getAvgPostGameTrendLiveAvg(this.accomplished.avgPostGameTrendLive.sections,t),this.accomplished.avgPostGameTrendLive.accumulated=this.getAvgPostGameTrendLiveAvg(this.accomplished.avgPostGameTrendLive.accumulated,t),this.received.avgPostGameTrendLive.sections=this.getAvgPostGameTrendLiveAvg(this.received.avgPostGameTrendLive.sections,t),this.received.avgPostGameTrendLive.accumulated=this.getAvgPostGameTrendLiveAvg(this.received.avgPostGameTrendLive.accumulated,t))}getAvgPostGameTrendLiveAvg(t,o){return t.map(n=>n/o)}calculateRanking(t,o,n,s,i,r,c,h){let d=[];s===3&&t&&t.length&&(n.playingAs.length!==2||n.matchResult.length!==3)?d=Array.from(t.reduce((p,g)=>{const m=g[o.playingAs]===1,y=m?"1":"2",u=p.get(g[o.gameId]);if(u)u[y]?u[y].arrayPlays.push(g):u[y]={numberTeamId:g[o.teamId],arrayPlays:[g]};else{const f={numberMatchResult:g[o.matchResult]};m&&(f[1]={numberTeamId:g[o.teamId],arrayPlays:[g]}),p.set(g[o.gameId],f)}return p},new Map).values()).reduce((p,g)=>{const m=n.playingAs.length===2?"both":n.playingAs[0].toString();return(m==="both"&&(g[1].numberTeamId===n.teamId||g[2].numberTeamId===n.teamId)||m!=="both"&&g[m].numberTeamId===n.teamId)&&n.matchResult.includes(g.numberMatchResult)&&p.push(...g[1].arrayPlays,...g[2].arrayPlays),p},[]).filter(p=>n.sections.includes(p[o.section])):(d=t?[...t]:[],c&&t&&(d=t.filter(l=>n.playingAs.includes(l[o.playingAs])&&n.matchResult.includes(l[o.matchResult])&&n.sections.includes(l[o.section])))),this.setTeamRanking(d,s,o,n.teamId,r,"accomplished",h)}setTeamRanking(t,o,n,s,i,r,c){let h=null,d=null;o===3&&(h=new Map,d={},t.forEach(g=>{const m=h.get(g[n.gameId]);m?m[g[n.teamId.toString()]]?m[g[n.teamId.toString()]]+=g[n.total]:m[g[n.teamId.toString()]]=g[n.total]:h.set(g[n.gameId],{[g[n.teamId.toString()]]:g[n.total]})}),Array.from(h.values()).forEach(g=>{const[m,y]=Object.keys(g).map(f=>f),u=g[m]+g[y];this.addPassesAvgByTeam(d,m,u?g[m]/u:0),this.addPassesAvgByTeam(d,y,u?g[y]/u:0)}));const l=i.sort((g,m)=>g.team_id-m.team_id).map(g=>{if(o===3){const m=d[g.team_id.toString()];return{teamId:g.team_id,points:m?m.numberTotalPassesAvg/m.numberGamesCount:0,total:m?m.numberTotalPassesAvg:0}}else{const m=t.reduce((y,u)=>u[n.teamId]===g.team_id&&o===u[n.categoryId]?y+u[n.total]:y,0);return{teamId:g.team_id,points:g[`${c}FilterGames`]?m/g[`${c}FilterGames`]:0,total:m}}}).sort((g,m)=>m.points-g.points);this.accomplished.arrayRankings=l;const p=l.findIndex(g=>g.teamId===s);o===3&&(this.accomplished.avgPreGame=l[p].points),this[r].ranking=p+1,this[r].leader=l[0]}addPassesAvgByTeam(t,o,n){t[o]?(t[o].numberGamesCount+=1,t[o].numberTotalPassesAvg+=n):t[o]={numberGamesCount:1,numberTotalPassesAvg:n}}}class de{constructor(t,o,n,s,i,r,c,h,d,l){Le(this,"id","");Le(this,"generalId",0);Le(this,"name","");Le(this,"names",{"0-0":"","1-1":"","0-1":"","1-0":""});Le(this,"mentions",{"0-0":"","1-1":"","0-1":"","1-0":""});Le(this,"accomplishedCategoryIds",[]);Le(this,"receivedCategoryIds",[]);Le(this,"generalCategoriesIds",{accomplished:0,received:0});Le(this,"specialMention","");Le(this,"homeTeam",new $d);Le(this,"visitingTeam",new $d);Le(this,"isLeagueDataCalculated",!1);Le(this,"leagueAccomplishedMax",0);Le(this,"leagueReceivedMax",0);Le(this,"leagueAccomplishedAvg",0);Le(this,"leagueReceivedAvg",0);Le(this,"leagueAccomplishedAccumulator",0);Le(this,"leagueReceivedAccumulator",0);Le(this,"homeTeamType","homeTeam");Le(this,"visitingTeamType","visitingTeam");Le(this,"betOnly",!1);Le(this,"isPercent",!1);this.id=`${n.accomplished}-${n.received}`,this.accomplishedCategoryIds=t||[],this.receivedCategoryIds=o||[],this.generalCategoriesIds=n||{accomplished:0,received:0},this.name=s,this.names["0-0"]=s||"",this.names["1-1"]=i||"",this.names["0-1"]=r||"",this.names["1-0"]=c||"",this.generalId=h||0,this.betOnly=d||!1,this.isPercent=l||!1}addLeaguePlays(t,o,n){t.length===0||!n||this.isLeagueDataCalculated||(t.forEach(s=>{this.isAccomplishedLeaguePlay(s[o.categoryId])&&(this.leagueAccomplishedAccumulator+=s[o.total]),this.isReceivedLeaguePlay(s[o.categoryId])&&(this.leagueReceivedAccumulator+=s[o.total])}),this.leagueAccomplishedAvg=(this.leagueAccomplishedAccumulator/(2*n)).toFixed(2),this.leagueAccomplishedMax=Math.round(this.leagueAccomplishedAvg*1.5),this.leagueReceivedAvg=(this.leagueReceivedAccumulator/(2*n)).toFixed(2),this.leagueReceivedMax=Math.round(this.leagueReceivedAvg*1.5),this.isLeagueDataCalculated=!0)}addSpecialMention(t,o,n){let s="-";for(const[i,r]of Object.entries(this.generalCategoriesIds))t===r&&(s=`${i==="accomplished"?"0":"1"}${s}`),o===r&&(s=`${s}${i==="accomplished"?"0":"1"}`);s.length===3&&(this.mentions[s]=n)}resetMentions(){this.mentions={"0-0":"","1-1":"","0-1":"","1-0":""}}addTeamPlays(t,o,n,s,i){!n||!i||t!==this.homeTeamType&&t!==this.visitingTeamType||(n.forEach(r=>{this.isAccomplishedPlay(r[s.categoryId])?this[t].increaseAccomplishedByOne(r[s.section],r[s.total]):this.isReceivedPlay(r[s.categoryId])&&this[t].increaseReceivedByOne(r[s.section],r[s.total])}),this[t].calculateAvg(i))}addLivePlay(t,o,n,s,i=!1,r=!1){(t===this.homeTeamType||t===this.visitingTeamType)&&n[s.categoryId].includes(this.generalCategoriesIds.accomplished)&&this[t].increaseAccomplishedByOne(n[s.section],n[s.total],!0)}subtractLivePlay(t,o,n,s,i){(t===this.homeTeamType||t===this.visitingTeamType)&&(this.isAccomplishedPlay(n[s.categoryId])&&!i?this[t].decreaseAccomplishedLiveByOne(n[s.section],n[s.total]):this.isReceivedPlay(n[s.categoryId])&&i&&this[t].decreaseReceivedLiveByOne(n[s.section],n[s.total]))}isAccomplishedLeaguePlay(t){return!!(this.receivedCategoryIds[0]===40?this.receivedCategoryIds:this.accomplishedCategoryIds).find(n=>t===n||`${t}_r`===n)}isReceivedLeaguePlay(t){return!!this.receivedCategoryIds.find(o=>t===o)}isAccomplishedPlay(t){return this.generalCategoriesIds.accomplished===t}isReceivedPlay(t){return this.generalCategoriesIds.received===t}calcRankingLeague(t,o,n,s,i,r=!1){this[this.homeTeamType].calculateRanking(t,o,n,this.generalCategoriesIds.accomplished,this.generalCategoriesIds.received,i,r,this.homeTeamType),this[this.visitingTeamType].calculateRanking(t,o,s,this.generalCategoriesIds.accomplished,this.generalCategoriesIds.received,i,r,this.visitingTeamType)}resetData(){this.homeTeam=new $d,this.visitingTeam=new $d,this.isLeagueDataCalculated=!1,this.leagueAccomplishedMax=0,this.leagueReceivedMax=0,this.leagueAccomplishedAvg=0,this.leagueReceivedAvg=0,this.leagueAccomplishedAccumulator=0,this.leagueReceivedAccumulator=0}isInGeneralCategory(t){return this.generalCategoriesIds.accomplished===t||this.generalCategoriesIds.received===t}}const NUe={general:{name:"General",priority:1,parentInfo:{parentAnalysis:[1],analysisTypeBlocks:[1]},subcategories:{goals:new de([12,55,"35_r","54_r"],null,{accomplished:1,received:0},"Goles","Goles recibidos","Goles realizados / recibidos","Goles recibidos / realizados",1),shotToGoal:new de([91,95,158,167,176,343,330,333,423],null,{accomplished:2,received:0},"Remates a destino","","","",1),possession:new de([2,3,20,21],null,{accomplished:3,received:0},"Posesión","","","",1,!1,!0),yellowCards:new de([14,52],null,{accomplished:4,received:0},"Tarjetas amarillas","","","",1),redCards:new de([15,53],null,{accomplished:5,received:0},"Tarjetas rojas","","","",1),centerCrosses:new de([13,25],null,{accomplished:6,received:0},"Centros totales","","","",1)}},offensive:{name:"Ofensivo",priority:2,parentInfo:{parentAnalysis:[1],analysisTypeBlocks:[1]},subcategories:{shotsOnGoal:new de([19],null,{accomplished:7,received:0},"Tiros a gol","","","",1),shotsOnGoalDestination:new de([91,95],null,{accomplished:8,received:0},"Tiros a gol destino","","","",1),shotToGoal:new de([91,95,158,167,176,343,330,333,423],null,{accomplished:2,received:0},"Remates a destino","","","",1),ballsWonOpponentPenaltyBox:new de([11],null,{accomplished:10,received:0},"Balones ganados área rival","","","",1),centersFromRight:new de([25],null,{accomplished:11,received:0},"Centros por derecha","","","",1),centersFromLeft:new de([13],null,{accomplished:12,received:0},"Centros por izquierda","","","",1),success1VS1:new de([4],null,{accomplished:13,received:0},"Enfrentamientos ofensivos exitosos","","","",1),unsuccess1VS1:new de([209],null,{accomplished:14,received:0},"Enfrentamientos ofensivos no exitosos","","","",1)}},defensive:{name:"Defensivo",priority:3,parentInfo:{parentAnalysis:[1],analysisTypeBlocks:[1]},subcategories:{saves:new de([39],null,{accomplished:15,received:0},"Atajadas","","","",1),ballsWonOwnPenaltyBox:new de([23],null,{accomplished:16,received:0},"Balones ganados área propia","","","",1),success1VS1:new de([5],null,{accomplished:17,received:0},"Enfrentamientos defensivos exitosos","","","",1),unsuccess1VS1:new de([209],null,{accomplished:18,received:0},"Enfrentamientos defensivos no exitosos","","","",1),aerialGame:new de([24],null,{accomplished:19,received:0},"Juego aéreo resto del campo","","","",1),clearances:new de([34],null,{accomplished:20,received:0},"Rechaces","","","",1)}},possession:{name:"Posesión",priority:4,parentInfo:{parentAnalysis:[1],analysisTypeBlocks:[1]},subcategories:{totalPasses:new de([2,3,20,21],null,{accomplished:21,received:0},"Pases totales","","","",1),successPasses:new de([2,20],null,{accomplished:22,received:0},"Pases acertados","","","",1),successPassesRivalHalf:new de([20],null,{accomplished:23,received:0},"Pases acertados en cancha rival","","","",1),ballsRecoveredInChallenge:new de([483],null,{accomplished:24,received:0},"Balones recuperados en disputa","","","",1),ballsRecoveredWithoutChallenge:new de([484],null,{accomplished:25,received:0},"Balones recuperados sin disputa","","","",1),ballsLostInChallenge:new de([494],null,{accomplished:26,received:0},"Balones perdidos en disputa","","","",1),ballsLostWithoutChallenge:new de([495],null,{accomplished:27,received:0},"Balones perdidos sin disputa","","","",1)}},stoppedBall:{name:"Balón parado",priority:5,parentInfo:{parentAnalysis:[1],analysisTypeBlocks:[1]},subcategories:{freeKick44:new de([155,164,173,362,371,380],null,{accomplished:28,received:0},"Tiros libres 4/4","","","",1),freeKick34:new de([150,357],null,{accomplished:29,received:0},"Tiros libres 3/4","","","",1),freeKickOwnHalf:new de([149,356],null,{accomplished:30,received:0},"Tiros libres cancha propia","","","",1),cornerFromRight:new de([32],null,{accomplished:31,received:0},"Tiros de esquina por derecha","","","",1),cornerFromLeft:new de([31],null,{accomplished:32,received:0},"Tiros de esquina por izquierda","","","",1),goalKick:new de([264,28],null,{accomplished:33,received:0},"Saques de meta","","","",1)}},penalties:{name:"Infracciones",priority:6,parentInfo:{parentAnalysis:[1],analysisTypeBlocks:[1]},subcategories:{totalFouls:new de([17,50],null,{accomplished:34,received:0},"Faltas totales","","","",1),foulOwnGoal:new de([348,478],null,{accomplished:35,received:0},"Faltas cerca de su propia portería","","","",1),fieldFouls:new de([349,350,479,480],null,{accomplished:36,received:0},"Faltas resto del campo","","","",1),penaltyKick:new de([461,481],null,{accomplished:37,received:0},"Penales cometidos","","","",1),offside:new de([33],null,{accomplished:38,received:0},"Fueras de lugar","","","",1)}}},xUe=[{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}],BUe=["teamId","categoryId","matchlapse","section","matchResult","playingAs","total","gameId"];let C0=null;function $Ue(){return C0||(C0=lr(BUe)),C0}const IUe=["playId","gameId","teamId","playerId","momentOfPlay","categoryId","categoryType","matchLapse","section","matchResult","playingAs","total","coordinate1X","coordinate1Y","coordinate2X","coordinate2Y","coordinate3X","coordinate3Y"];let k0=null;function VUe(){return k0||(k0=lr(IUe)),k0}function Id(e,t,o){return[o.get(e[t.categoryId])||[],e[t.teamId],e[t.matchResult],e[t.playingAs],e[t.matchLapse],e[t.section],e[t.total]]}function oS(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 S0(e,t,o){let n=[...t];return e[o.categoryId]===2&&(n[0]=14),e[o.categoryId]===20&&(n[0]=15),[14,15].includes(n[0])?n:null}var E0={exports:{}},AUe=/^(?:(?![^:@]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,OUe=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],nS=function(t){var o=t,n=t.indexOf("["),s=t.indexOf("]");n!=-1&&s!=-1&&(t=t.substring(0,n)+t.substring(n,s).replace(/:/g,";")+t.substring(s,t.length));for(var i=AUe.exec(t||""),r={},c=14;c--;)r[OUe[c]]=i[c]||"";return n!=-1&&s!=-1&&(r.source=o,r.host=r.host.substring(1,r.host.length-1).replace(/;/g,":"),r.authority=r.authority.replace("[","").replace("]","").replace(/;/g,":"),r.ipv6uri=!0),r.pathNames=TUe(r,r.path),r.queryKey=FUe(r,r.query),r};function TUe(e,t){var o=/\/{2,9}/g,n=t.replace(o,"/").split("/");return(t.substr(0,1)=="/"||t.length===0)&&n.splice(0,1),t.substr(t.length-1,1)=="/"&&n.splice(n.length-1,1),n}function FUe(e,t){var o={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(n,s,i){s&&(o[s]=i)}),o}var N0={exports:{}},x0={exports:{}},Ti=1e3,Fi=Ti*60,zi=Fi*60,Pi=zi*24,zUe=Pi*365.25,PUe=function(e,t){t=t||{};var o=typeof e;if(o==="string"&&e.length>0)return DUe(e);if(o==="number"&&isNaN(e)===!1)return t.long?vUe(e):RUe(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function DUe(e){if(e=String(e),!(e.length>100)){var t=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(e);if(t){var o=parseFloat(t[1]),n=(t[2]||"ms").toLowerCase();switch(n){case"years":case"year":case"yrs":case"yr":case"y":return o*zUe;case"days":case"day":case"d":return o*Pi;case"hours":case"hour":case"hrs":case"hr":case"h":return o*zi;case"minutes":case"minute":case"mins":case"min":case"m":return o*Fi;case"seconds":case"second":case"secs":case"sec":case"s":return o*Ti;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return o;default:return}}}}function RUe(e){return e>=Pi?Math.round(e/Pi)+"d":e>=zi?Math.round(e/zi)+"h":e>=Fi?Math.round(e/Fi)+"m":e>=Ti?Math.round(e/Ti)+"s":e+"ms"}function vUe(e){return Vd(e,Pi,"day")||Vd(e,zi,"hour")||Vd(e,Fi,"minute")||Vd(e,Ti,"second")||e+" ms"}function Vd(e,t,o){if(!(e<t))return e<t*1.5?Math.floor(e/t)+" "+o:Math.ceil(e/t)+" "+o+"s"}(function(e,t){t=e.exports=n.debug=n.default=n,t.coerce=h,t.disable=r,t.enable=i,t.enabled=c,t.humanize=PUe,t.instances=[],t.names=[],t.skips=[],t.formatters={};function o(d){var l=0,p;for(p in d)l=(l<<5)-l+d.charCodeAt(p),l|=0;return t.colors[Math.abs(l)%t.colors.length]}function n(d){var l;function p(){if(p.enabled){var g=p,m=+new Date,y=m-(l||m);g.diff=y,g.prev=l,g.curr=m,l=m;for(var u=new Array(arguments.length),f=0;f<u.length;f++)u[f]=arguments[f];u[0]=t.coerce(u[0]),typeof u[0]!="string"&&u.unshift("%O");var b=0;u[0]=u[0].replace(/%([a-zA-Z%])/g,function(w,_){if(w==="%%")return w;b++;var k=t.formatters[_];if(typeof k=="function"){var x=u[b];w=k.call(g,x),u.splice(b,1),b--}return w}),t.formatArgs.call(g,u);var C=p.log||t.log||console.log.bind(console);C.apply(g,u)}}return p.namespace=d,p.enabled=t.enabled(d),p.useColors=t.useColors(),p.color=o(d),p.destroy=s,typeof t.init=="function"&&t.init(p),t.instances.push(p),p}function s(){var d=t.instances.indexOf(this);return d!==-1?(t.instances.splice(d,1),!0):!1}function i(d){t.save(d),t.names=[],t.skips=[];var l,p=(typeof d=="string"?d:"").split(/[\s,]+/),g=p.length;for(l=0;l<g;l++)p[l]&&(d=p[l].replace(/\*/g,".*?"),d[0]==="-"?t.skips.push(new RegExp("^"+d.substr(1)+"$")):t.names.push(new RegExp("^"+d+"$")));for(l=0;l<t.instances.length;l++){var m=t.instances[l];m.enabled=t.enabled(m.namespace)}}function r(){t.enable("")}function c(d){if(d[d.length-1]==="*")return!0;var l,p;for(l=0,p=t.skips.length;l<p;l++)if(t.skips[l].test(d))return!1;for(l=0,p=t.names.length;l<p;l++)if(t.names[l].test(d))return!0;return!1}function h(d){return d instanceof Error?d.stack||d.message:d}})(x0,x0.exports);var LUe=x0.exports;(function(e,t){t=e.exports=LUe,t.log=s,t.formatArgs=n,t.save=i,t.load=r,t.useColors=o,t.storage=typeof chrome<"u"&&typeof chrome.storage<"u"?chrome.storage.local:c(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function o(){return typeof window<"u"&&window.process&&window.process.type==="renderer"?!0:typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)?!1:typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}t.formatters.j=function(h){try{return JSON.stringify(h)}catch(d){return"[UnexpectedJSONParseError]: "+d.message}};function n(h){var d=this.useColors;if(h[0]=(d?"%c":"")+this.namespace+(d?" %c":" ")+h[0]+(d?"%c ":" ")+"+"+t.humanize(this.diff),!!d){var l="color: "+this.color;h.splice(1,0,l,"color: inherit");var p=0,g=0;h[0].replace(/%[a-zA-Z%]/g,function(m){m!=="%%"&&(p++,m==="%c"&&(g=p))}),h.splice(g,0,l)}}function s(){return typeof console=="object"&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function i(h){try{h==null?t.storage.removeItem("debug"):t.storage.debug=h}catch{}}function r(){var h;try{h=t.storage.debug}catch{}return!h&&typeof process<"u"&&"env"in process&&(h=process.env.DEBUG),h}t.enable(r());function c(){try{return window.localStorage}catch{}}})(N0,N0.exports);var Ad=N0.exports,jUe=nS,sS=Ad("socket.io-client:url"),MUe=HUe;function HUe(e,t){var o=e;t=t||typeof location<"u"&&location,e==null&&(e=t.protocol+"//"+t.host),typeof e=="string"&&(e.charAt(0)==="/"&&(e.charAt(1)==="/"?e=t.protocol+e:e=t.host+e),/^(https?|wss?):\/\//.test(e)||(sS("protocol-less url %s",e),typeof t<"u"?e=t.protocol+"//"+e:e="https://"+e),sS("parse %s",e),o=jUe(e)),o.port||(/^(http|ws)$/.test(o.protocol)?o.port="80":/^(http|ws)s$/.test(o.protocol)&&(o.port="443")),o.path=o.path||"/";var n=o.host.indexOf(":")!==-1,s=n?"["+o.host+"]":o.host;return o.id=o.protocol+"://"+s+":"+o.port,o.href=o.protocol+"://"+s+(t&&t.port===o.port?"":":"+o.port),o}var Od={},B0={exports:{}},$0={exports:{}},Di=1e3,Ri=Di*60,vi=Ri*60,Li=vi*24,UUe=Li*365.25,GUe=function(e,t){t=t||{};var o=typeof e;if(o==="string"&&e.length>0)return WUe(e);if(o==="number"&&isNaN(e)===!1)return t.long?JUe(e):qUe(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function WUe(e){if(e=String(e),!(e.length>100)){var t=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(e);if(t){var o=parseFloat(t[1]),n=(t[2]||"ms").toLowerCase();switch(n){case"years":case"year":case"yrs":case"yr":case"y":return o*UUe;case"days":case"day":case"d":return o*Li;case"hours":case"hour":case"hrs":case"hr":case"h":return o*vi;case"minutes":case"minute":case"mins":case"min":case"m":return o*Ri;case"seconds":case"second":case"secs":case"sec":case"s":return o*Di;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return o;default:return}}}}function qUe(e){return e>=Li?Math.round(e/Li)+"d":e>=vi?Math.round(e/vi)+"h":e>=Ri?Math.round(e/Ri)+"m":e>=Di?Math.round(e/Di)+"s":e+"ms"}function JUe(e){return Td(e,Li,"day")||Td(e,vi,"hour")||Td(e,Ri,"minute")||Td(e,Di,"second")||e+" ms"}function Td(e,t,o){if(!(e<t))return e<t*1.5?Math.floor(e/t)+" "+o:Math.ceil(e/t)+" "+o+"s"}(function(e,t){t=e.exports=n.debug=n.default=n,t.coerce=h,t.disable=r,t.enable=i,t.enabled=c,t.humanize=GUe,t.instances=[],t.names=[],t.skips=[],t.formatters={};function o(d){var l=0,p;for(p in d)l=(l<<5)-l+d.charCodeAt(p),l|=0;return t.colors[Math.abs(l)%t.colors.length]}function n(d){var l;function p(){if(p.enabled){var g=p,m=+new Date,y=m-(l||m);g.diff=y,g.prev=l,g.curr=m,l=m;for(var u=new Array(arguments.length),f=0;f<u.length;f++)u[f]=arguments[f];u[0]=t.coerce(u[0]),typeof u[0]!="string"&&u.unshift("%O");var b=0;u[0]=u[0].replace(/%([a-zA-Z%])/g,function(w,_){if(w==="%%")return w;b++;var k=t.formatters[_];if(typeof k=="function"){var x=u[b];w=k.call(g,x),u.splice(b,1),b--}return w}),t.formatArgs.call(g,u);var C=p.log||t.log||console.log.bind(console);C.apply(g,u)}}return p.namespace=d,p.enabled=t.enabled(d),p.useColors=t.useColors(),p.color=o(d),p.destroy=s,typeof t.init=="function"&&t.init(p),t.instances.push(p),p}function s(){var d=t.instances.indexOf(this);return d!==-1?(t.instances.splice(d,1),!0):!1}function i(d){t.save(d),t.names=[],t.skips=[];var l,p=(typeof d=="string"?d:"").split(/[\s,]+/),g=p.length;for(l=0;l<g;l++)p[l]&&(d=p[l].replace(/\*/g,".*?"),d[0]==="-"?t.skips.push(new RegExp("^"+d.substr(1)+"$")):t.names.push(new RegExp("^"+d+"$")));for(l=0;l<t.instances.length;l++){var m=t.instances[l];m.enabled=t.enabled(m.namespace)}}function r(){t.enable("")}function c(d){if(d[d.length-1]==="*")return!0;var l,p;for(l=0,p=t.skips.length;l<p;l++)if(t.skips[l].test(d))return!1;for(l=0,p=t.names.length;l<p;l++)if(t.names[l].test(d))return!0;return!1}function h(d){return d instanceof Error?d.stack||d.message:d}})($0,$0.exports);var XUe=$0.exports;(function(e,t){t=e.exports=XUe,t.log=s,t.formatArgs=n,t.save=i,t.load=r,t.useColors=o,t.storage=typeof chrome<"u"&&typeof chrome.storage<"u"?chrome.storage.local:c(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function o(){return typeof window<"u"&&window.process&&window.process.type==="renderer"?!0:typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)?!1:typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}t.formatters.j=function(h){try{return JSON.stringify(h)}catch(d){return"[UnexpectedJSONParseError]: "+d.message}};function n(h){var d=this.useColors;if(h[0]=(d?"%c":"")+this.namespace+(d?" %c":" ")+h[0]+(d?"%c ":" ")+"+"+t.humanize(this.diff),!!d){var l="color: "+this.color;h.splice(1,0,l,"color: inherit");var p=0,g=0;h[0].replace(/%[a-zA-Z%]/g,function(m){m!=="%%"&&(p++,m==="%c"&&(g=p))}),h.splice(g,0,l)}}function s(){return typeof console=="object"&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function i(h){try{h==null?t.storage.removeItem("debug"):t.storage.debug=h}catch{}}function r(){var h;try{h=t.storage.debug}catch{}return!h&&typeof process<"u"&&"env"in process&&(h=process.env.DEBUG),h}t.enable(r());function c(){try{return window.localStorage}catch{}}})(B0,B0.exports);var ZUe=B0.exports,iS={exports:{}};(function(e){e.exports=t;function t(n){if(n)return o(n)}function o(n){for(var s in t.prototype)n[s]=t.prototype[s];return n}t.prototype.on=t.prototype.addEventListener=function(n,s){return this._callbacks=this._callbacks||{},(this._callbacks["$"+n]=this._callbacks["$"+n]||[]).push(s),this},t.prototype.once=function(n,s){function i(){this.off(n,i),s.apply(this,arguments)}return i.fn=s,this.on(n,i),this},t.prototype.off=t.prototype.removeListener=t.prototype.removeAllListeners=t.prototype.removeEventListener=function(n,s){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var i=this._callbacks["$"+n];if(!i)return this;if(arguments.length==1)return delete this._callbacks["$"+n],this;for(var r,c=0;c<i.length;c++)if(r=i[c],r===s||r.fn===s){i.splice(c,1);break}return i.length===0&&delete this._callbacks["$"+n],this},t.prototype.emit=function(n){this._callbacks=this._callbacks||{};for(var s=new Array(arguments.length-1),i=this._callbacks["$"+n],r=1;r<arguments.length;r++)s[r-1]=arguments[r];if(i){i=i.slice(0);for(var r=0,c=i.length;r<c;++r)i[r].apply(this,s)}return this},t.prototype.listeners=function(n){return this._callbacks=this._callbacks||{},this._callbacks["$"+n]||[]},t.prototype.hasListeners=function(n){return!!this.listeners(n).length}})(iS);var Dn=iS.exports,Fd={},YUe={}.toString,I0=Array.isArray||function(e){return YUe.call(e)=="[object Array]"},rS=tGe,KUe=typeof Buffer=="function"&&typeof Buffer.isBuffer=="function",QUe=typeof ArrayBuffer=="function",eGe=function(e){return typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer};function tGe(e){return KUe&&Buffer.isBuffer(e)||QUe&&(e instanceof ArrayBuffer||eGe(e))}var V0=I0,lS=rS,cS=Object.prototype.toString,aGe=typeof Blob=="function"||typeof Blob<"u"&&cS.call(Blob)==="[object BlobConstructor]",oGe=typeof File=="function"||typeof File<"u"&&cS.call(File)==="[object FileConstructor]";Fd.deconstructPacket=function(e){var t=[],o=e.data,n=e;return n.data=A0(o,t),n.attachments=t.length,{packet:n,buffers:t}};function A0(e,t){if(!e)return e;if(lS(e)){var o={_placeholder:!0,num:t.length};return t.push(e),o}else if(V0(e)){for(var n=new Array(e.length),s=0;s<e.length;s++)n[s]=A0(e[s],t);return n}else if(typeof e=="object"&&!(e instanceof Date)){var n={};for(var i in e)n[i]=A0(e[i],t);return n}return e}Fd.reconstructPacket=function(e,t){return e.data=O0(e.data,t),e.attachments=void 0,e};function O0(e,t){if(!e)return e;if(e&&e._placeholder===!0){var o=typeof e.num=="number"&&e.num>=0&&e.num<t.length;if(o)return t[e.num];throw new Error("illegal attachments")}else if(V0(e))for(var n=0;n<e.length;n++)e[n]=O0(e[n],t);else if(typeof e=="object")for(var s in e)e[s]=O0(e[s],t);return e}Fd.removeBlobs=function(e,t){function o(i,r,c){if(!i)return i;if(aGe&&i instanceof Blob||oGe&&i instanceof File){n++;var h=new FileReader;h.onload=function(){c?c[r]=this.result:s=this.result,--n||t(s)},h.readAsArrayBuffer(i)}else if(V0(i))for(var d=0;d<i.length;d++)o(i[d],d,i);else if(typeof i=="object"&&!lS(i))for(var l in i)o(i[l],l,i)}var n=0,s=e;o(s),n||t(s)},function(e){var t=ZUe("socket.io-parser"),o=Dn,n=Fd,s=I0,i=rS;e.protocol=4,e.types=["CONNECT","DISCONNECT","EVENT","ACK","ERROR","BINARY_EVENT","BINARY_ACK"],e.CONNECT=0,e.DISCONNECT=1,e.EVENT=2,e.ACK=3,e.ERROR=4,e.BINARY_EVENT=5,e.BINARY_ACK=6,e.Encoder=r,e.Decoder=p;function r(){}var c=e.ERROR+'"encode error"';r.prototype.encode=function(f,b){if(t("encoding packet %j",f),e.BINARY_EVENT===f.type||e.BINARY_ACK===f.type)l(f,b);else{var C=h(f);b([C])}};function h(f){var b=""+f.type;if((e.BINARY_EVENT===f.type||e.BINARY_ACK===f.type)&&(b+=f.attachments+"-"),f.nsp&&f.nsp!=="/"&&(b+=f.nsp+","),f.id!=null&&(b+=f.id),f.data!=null){var C=d(f.data);if(C!==!1)b+=C;else return c}return t("encoded %j as %s",f,b),b}function d(f){try{return JSON.stringify(f)}catch{return!1}}function l(f,b){function C(w){var _=n.deconstructPacket(w),k=h(_.packet),x=_.buffers;x.unshift(k),b(x)}n.removeBlobs(f,C)}function p(){this.reconstructor=null}o(p.prototype),p.prototype.add=function(f){var b;if(typeof f=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");b=g(f),e.BINARY_EVENT===b.type||e.BINARY_ACK===b.type?(this.reconstructor=new y(b),this.reconstructor.reconPack.attachments===0&&this.emit("decoded",b)):this.emit("decoded",b)}else if(i(f)||f.base64)if(this.reconstructor)b=this.reconstructor.takeBinaryData(f),b&&(this.reconstructor=null,this.emit("decoded",b));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+f)};function g(f){var b=0,C={type:Number(f.charAt(0))};if(e.types[C.type]==null)return u("unknown packet type "+C.type);if(e.BINARY_EVENT===C.type||e.BINARY_ACK===C.type){for(var w=b+1;f.charAt(++b)!=="-"&&b!=f.length;);var _=f.substring(w,b);if(_!=Number(_)||f.charAt(b)!=="-")throw new Error("Illegal attachments");C.attachments=Number(_)}if(f.charAt(b+1)==="/"){for(var w=b+1;++b;){var k=f.charAt(b);if(k===","||b===f.length)break}C.nsp=f.substring(w,b)}else C.nsp="/";var x=f.charAt(b+1);if(x!==""&&Number(x)==x){for(var w=b+1;++b;){var k=f.charAt(b);if(k==null||Number(k)!=k){--b;break}if(b===f.length)break}C.id=Number(f.substring(w,b+1))}if(f.charAt(++b)){var I=m(f.substr(b)),E=I!==!1&&(C.type===e.ERROR||s(I));if(E)C.data=I;else return u("invalid payload")}return t("decoded %s as %j",f,C),C}function m(f){try{return JSON.parse(f)}catch{return!1}}p.prototype.destroy=function(){this.reconstructor&&this.reconstructor.finishedReconstruction()};function y(f){this.reconPack=f,this.buffers=[]}y.prototype.takeBinaryData=function(f){if(this.buffers.push(f),this.buffers.length===this.reconPack.attachments){var b=n.reconstructPacket(this.reconPack,this.buffers);return this.finishedReconstruction(),b}return null},y.prototype.finishedReconstruction=function(){this.reconPack=null,this.buffers=[]};function u(f){return{type:e.ERROR,data:"parser error: "+f}}}(Od);var T0={exports:{}},zd={},F0={exports:{}};try{F0.exports=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{F0.exports=!1}var nGe=F0.exports,z0=function(){return typeof self<"u"?self:typeof window<"u"?window:Function("return this")()}(),sGe=nGe,iGe=z0,P0=function(e){var t=e.xdomain,o=e.xscheme,n=e.enablesXDR;try{if(typeof XMLHttpRequest<"u"&&(!t||sGe))return new XMLHttpRequest}catch{}try{if(typeof XDomainRequest<"u"&&!o&&n)return new XDomainRequest}catch{}if(!t)try{return new iGe[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}},D0={exports:{}},Fo={},rGe=Object.keys||function(t){var o=[],n=Object.prototype.hasOwnProperty;for(var s in t)n.call(t,s)&&o.push(s);return o},lGe=I0,dS=Object.prototype.toString,cGe=typeof Blob=="function"||typeof Blob<"u"&&dS.call(Blob)==="[object BlobConstructor]",dGe=typeof File=="function"||typeof File<"u"&&dS.call(File)==="[object FileConstructor]",mS=Pd;function Pd(e){if(!e||typeof e!="object")return!1;if(lGe(e)){for(var t=0,o=e.length;t<o;t++)if(Pd(e[t]))return!0;return!1}if(typeof Buffer=="function"&&Buffer.isBuffer&&Buffer.isBuffer(e)||typeof ArrayBuffer=="function"&&e instanceof ArrayBuffer||cGe&&e instanceof Blob||dGe&&e instanceof File)return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return Pd(e.toJSON(),!0);for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&Pd(e[n]))return!0;return!1}var mGe=function(e,t,o){var n=e.byteLength;if(t=t||0,o=o||n,e.slice)return e.slice(t,o);if(t<0&&(t+=n),o<0&&(o+=n),o>n&&(o=n),t>=n||t>=o||n===0)return new ArrayBuffer(0);for(var s=new Uint8Array(e),i=new Uint8Array(o-t),r=t,c=0;r<o;r++,c++)i[c]=s[r];return i.buffer},pGe=hGe;function hGe(e,t,o){var n=!1;return o=o||yGe,s.count=e,e===0?t():s;function s(i,r){if(s.count<=0)throw new Error("after called too many times");--s.count,i?(n=!0,t(i),t=o):s.count===0&&!n&&t(null,r)}}function yGe(){}/*! https://mths.be/utf8js v2.1.2 by @mathias */var Co=String.fromCharCode;function pS(e){for(var t=[],o=0,n=e.length,s,i;o<n;)s=e.charCodeAt(o++),s>=55296&&s<=56319&&o<n?(i=e.charCodeAt(o++),(i&64512)==56320?t.push(((s&1023)<<10)+(i&1023)+65536):(t.push(s),o--)):t.push(s);return t}function gGe(e){for(var t=e.length,o=-1,n,s="";++o<t;)n=e[o],n>65535&&(n-=65536,s+=Co(n>>>10&1023|55296),n=56320|n&1023),s+=Co(n);return s}function hS(e,t){if(e>=55296&&e<=57343){if(t)throw Error("Lone surrogate U+"+e.toString(16).toUpperCase()+" is not a scalar value");return!1}return!0}function R0(e,t){return Co(e>>t&63|128)}function uGe(e,t){if(!(e&4294967168))return Co(e);var o="";return e&4294965248?e&4294901760?e&4292870144||(o=Co(e>>18&7|240),o+=R0(e,12),o+=R0(e,6)):(hS(e,t)||(e=65533),o=Co(e>>12&15|224),o+=R0(e,6)):o=Co(e>>6&31|192),o+=Co(e&63|128),o}function fGe(e,t){t=t||{};for(var o=t.strict!==!1,n=pS(e),s=n.length,i=-1,r,c="";++i<s;)r=n[i],c+=uGe(r,o);return c}function Rn(){if(ko>=Rd)throw Error("Invalid byte index");var e=Dd[ko]&255;if(ko++,(e&192)==128)return e&63;throw Error("Invalid continuation byte")}function _Ge(e){var t,o,n,s,i;if(ko>Rd)throw Error("Invalid byte index");if(ko==Rd)return!1;if(t=Dd[ko]&255,ko++,!(t&128))return t;if((t&224)==192){if(o=Rn(),i=(t&31)<<6|o,i>=128)return i;throw Error("Invalid continuation byte")}if((t&240)==224){if(o=Rn(),n=Rn(),i=(t&15)<<12|o<<6|n,i>=2048)return hS(i,e)?i:65533;throw Error("Invalid continuation byte")}if((t&248)==240&&(o=Rn(),n=Rn(),s=Rn(),i=(t&7)<<18|o<<12|n<<6|s,i>=65536&&i<=1114111))return i;throw Error("Invalid UTF-8 detected")}var Dd,Rd,ko;function bGe(e,t){t=t||{};var o=t.strict!==!1;Dd=pS(e),Rd=Dd.length,ko=0;for(var n=[],s;(s=_Ge(o))!==!1;)n.push(s);return gGe(n)}var wGe={version:"2.1.2",encode:fGe,decode:bGe},vd={},yS;function CGe(){return yS||(yS=1,function(e){vd.encode=function(t){var o=new Uint8Array(t),n,s=o.length,i="";for(n=0;n<s;n+=3)i+=e[o[n]>>2],i+=e[(o[n]&3)<<4|o[n+1]>>4],i+=e[(o[n+1]&15)<<2|o[n+2]>>6],i+=e[o[n+2]&63];return s%3===2?i=i.substring(0,i.length-1)+"=":s%3===1&&(i=i.substring(0,i.length-2)+"=="),i},vd.decode=function(t){var o=t.length*.75,n=t.length,s,i=0,r,c,h,d;t[t.length-1]==="="&&(o--,t[t.length-2]==="="&&o--);var l=new ArrayBuffer(o),p=new Uint8Array(l);for(s=0;s<n;s+=4)r=e.indexOf(t[s]),c=e.indexOf(t[s+1]),h=e.indexOf(t[s+2]),d=e.indexOf(t[s+3]),p[i++]=r<<2|c>>4,p[i++]=(c&15)<<4|h>>2,p[i++]=(h&3)<<6|d&63;return l}}("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/")),vd}var v0,gS;function kGe(){if(gS)return v0;gS=1;var e=typeof e<"u"?e:typeof WebKitBlobBuilder<"u"?WebKitBlobBuilder:typeof MSBlobBuilder<"u"?MSBlobBuilder:typeof MozBlobBuilder<"u"?MozBlobBuilder:!1,t=function(){try{var c=new Blob(["hi"]);return c.size===2}catch{return!1}}(),o=t&&function(){try{var c=new Blob([new Uint8Array([1,2])]);return c.size===2}catch{return!1}}(),n=e&&e.prototype.append&&e.prototype.getBlob;function s(c){return c.map(function(h){if(h.buffer instanceof ArrayBuffer){var d=h.buffer;if(h.byteLength!==d.byteLength){var l=new Uint8Array(h.byteLength);l.set(new Uint8Array(d,h.byteOffset,h.byteLength)),d=l.buffer}return d}return h})}function i(c,h){h=h||{};var d=new e;return s(c).forEach(function(l){d.append(l)}),h.type?d.getBlob(h.type):d.getBlob()}function r(c,h){return new Blob(s(c),h||{})}return typeof Blob<"u"&&(i.prototype=Blob.prototype,r.prototype=Blob.prototype),v0=function(){return t?o?Blob:r:n?i:void 0}(),v0}(function(e){var t=rGe,o=mS,n=mGe,s=pGe,i=wGe,r;typeof ArrayBuffer<"u"&&(r=CGe());var c=typeof navigator<"u"&&/Android/i.test(navigator.userAgent),h=typeof navigator<"u"&&/PhantomJS/i.test(navigator.userAgent),d=c||h;e.protocol=3;var l=e.packets={open:0,close:1,ping:2,pong:3,message:4,upgrade:5,noop:6},p=t(l),g={type:"error",data:"parser error"},m=kGe();e.encodePacket=function(_,k,x,I){typeof k=="function"&&(I=k,k=!1),typeof x=="function"&&(I=x,x=null);var E=_.data===void 0?void 0:_.data.buffer||_.data;if(typeof ArrayBuffer<"u"&&E instanceof ArrayBuffer)return u(_,k,I);if(typeof m<"u"&&E instanceof m)return b(_,k,I);if(E&&E.base64)return y(_,I);var $=l[_.type];return _.data!==void 0&&($+=x?i.encode(String(_.data),{strict:!1}):String(_.data)),I(""+$)};function y(_,k){var x="b"+e.packets[_.type]+_.data.data;return k(x)}function u(_,k,x){if(!k)return e.encodeBase64Packet(_,x);var I=_.data,E=new Uint8Array(I),$=new Uint8Array(1+I.byteLength);$[0]=l[_.type];for(var O=0;O<E.length;O++)$[O+1]=E[O];return x($.buffer)}function f(_,k,x){if(!k)return e.encodeBase64Packet(_,x);var I=new FileReader;return I.onload=function(){e.encodePacket({type:_.type,data:I.result},k,!0,x)},I.readAsArrayBuffer(_.data)}function b(_,k,x){if(!k)return e.encodeBase64Packet(_,x);if(d)return f(_,k,x);var I=new Uint8Array(1);I[0]=l[_.type];var E=new m([I.buffer,_.data]);return x(E)}e.encodeBase64Packet=function(_,k){var x="b"+e.packets[_.type];if(typeof m<"u"&&_.data instanceof m){var I=new FileReader;return I.onload=function(){var A=I.result.split(",")[1];k(x+A)},I.readAsDataURL(_.data)}var E;try{E=String.fromCharCode.apply(null,new Uint8Array(_.data))}catch{for(var $=new Uint8Array(_.data),O=new Array($.length),V=0;V<$.length;V++)O[V]=$[V];E=String.fromCharCode.apply(null,O)}return x+=btoa(E),k(x)},e.decodePacket=function(_,k,x){if(_===void 0)return g;if(typeof _=="string"){if(_.charAt(0)==="b")return e.decodeBase64Packet(_.substr(1),k);if(x&&(_=C(_),_===!1))return g;var E=_.charAt(0);return Number(E)!=E||!p[E]?g:_.length>1?{type:p[E],data:_.substring(1)}:{type:p[E]}}var I=new Uint8Array(_),E=I[0],$=n(_,1);return m&&k==="blob"&&($=new m([$])),{type:p[E],data:$}};function C(_){try{_=i.decode(_,{strict:!1})}catch{return!1}return _}e.decodeBase64Packet=function(_,k){var x=p[_.charAt(0)];if(!r)return{type:x,data:{base64:!0,data:_.substr(1)}};var I=r.decode(_.substr(1));return k==="blob"&&m&&(I=new m([I])),{type:x,data:I}},e.encodePayload=function(_,k,x){typeof k=="function"&&(x=k,k=null);var I=o(_);if(k&&I)return m&&!d?e.encodePayloadAsBlob(_,x):e.encodePayloadAsArrayBuffer(_,x);if(!_.length)return x("0:");function E(O){return O.length+":"+O}function $(O,V){e.encodePacket(O,I?k:!1,!1,function(A){V(null,E(A))})}w(_,$,function(O,V){return x(V.join(""))})};function w(_,k,x){for(var I=new Array(_.length),E=s(_.length,x),$=function(V,A,z){k(A,function(Q,ne){I[V]=ne,z(Q,I)})},O=0;O<_.length;O++)$(O,_[O],E)}e.decodePayload=function(_,k,x){if(typeof _!="string")return e.decodePayloadAsBinary(_,k,x);typeof k=="function"&&(x=k,k=null);var I;if(_==="")return x(g,0,1);for(var E="",$,O,V=0,A=_.length;V<A;V++){var z=_.charAt(V);if(z!==":"){E+=z;continue}if(E===""||E!=($=Number(E))||(O=_.substr(V+1,$),E!=O.length))return x(g,0,1);if(O.length){if(I=e.decodePacket(O,k,!1),g.type===I.type&&g.data===I.data)return x(g,0,1);var Q=x(I,V+$,A);if(Q===!1)return}V+=$,E=""}if(E!=="")return x(g,0,1)},e.encodePayloadAsArrayBuffer=function(_,k){if(!_.length)return k(new ArrayBuffer(0));function x(I,E){e.encodePacket(I,!0,!0,function($){return E(null,$)})}w(_,x,function(I,E){var $=E.reduce(function(A,z){var Q;return typeof z=="string"?Q=z.length:Q=z.byteLength,A+Q.toString().length+Q+2},0),O=new Uint8Array($),V=0;return E.forEach(function(A){var z=typeof A=="string",Q=A;if(z){for(var S=new Uint8Array(A.length),ne=0;ne<A.length;ne++)S[ne]=A.charCodeAt(ne);Q=S.buffer}z?O[V++]=0:O[V++]=1;for(var ee=Q.byteLength.toString(),ne=0;ne<ee.length;ne++)O[V++]=parseInt(ee[ne]);O[V++]=255;for(var S=new Uint8Array(Q),ne=0;ne<S.length;ne++)O[V++]=S[ne]}),k(O.buffer)})},e.encodePayloadAsBlob=function(_,k){function x(I,E){e.encodePacket(I,!0,!0,function($){var O=new Uint8Array(1);if(O[0]=1,typeof $=="string"){for(var V=new Uint8Array($.length),A=0;A<$.length;A++)V[A]=$.charCodeAt(A);$=V.buffer,O[0]=0}for(var z=$ instanceof ArrayBuffer?$.byteLength:$.size,Q=z.toString(),ne=new Uint8Array(Q.length+1),A=0;A<Q.length;A++)ne[A]=parseInt(Q[A]);if(ne[Q.length]=255,m){var ee=new m([O.buffer,ne.buffer,$]);E(null,ee)}})}w(_,x,function(I,E){return k(new m(E))})},e.decodePayloadAsBinary=function(_,k,x){typeof k=="function"&&(x=k,k=null);for(var I=_,E=[];I.byteLength>0;){for(var $=new Uint8Array(I),O=$[0]===0,V="",A=1;$[A]!==255;A++){if(V.length>310)return x(g,0,1);V+=$[A]}I=n(I,2+V.length),V=parseInt(V);var z=n(I,0,V);if(O)try{z=String.fromCharCode.apply(null,new Uint8Array(z))}catch{var Q=new Uint8Array(z);z="";for(var A=0;A<Q.length;A++)z+=String.fromCharCode(Q[A])}E.push(z),I=n(I,V)}var ne=E.length;E.forEach(function(ee,S){x(e.decodePacket(ee,k,!0),S,ne)})}})(Fo);var L0,uS;function j0(){if(uS)return L0;uS=1;var e=Fo,t=Dn;L0=o;function o(n){this.path=n.path,this.hostname=n.hostname,this.port=n.port,this.secure=n.secure,this.query=n.query,this.timestampParam=n.timestampParam,this.timestampRequests=n.timestampRequests,this.readyState="",this.agent=n.agent||!1,this.socket=n.socket,this.enablesXDR=n.enablesXDR,this.withCredentials=n.withCredentials,this.pfx=n.pfx,this.key=n.key,this.passphrase=n.passphrase,this.cert=n.cert,this.ca=n.ca,this.ciphers=n.ciphers,this.rejectUnauthorized=n.rejectUnauthorized,this.forceNode=n.forceNode,this.isReactNative=n.isReactNative,this.extraHeaders=n.extraHeaders,this.localAddress=n.localAddress}return t(o.prototype),o.prototype.onError=function(n,s){var i=new Error(n);return i.type="TransportError",i.description=s,this.emit("error",i),this},o.prototype.open=function(){return(this.readyState==="closed"||this.readyState==="")&&(this.readyState="opening",this.doOpen()),this},o.prototype.close=function(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this},o.prototype.send=function(n){if(this.readyState==="open")this.write(n);else throw new Error("Transport not open")},o.prototype.onOpen=function(){this.readyState="open",this.writable=!0,this.emit("open")},o.prototype.onData=function(n){var s=e.decodePacket(n,this.socket.binaryType);this.onPacket(s)},o.prototype.onPacket=function(n){this.emit("packet",n)},o.prototype.onClose=function(){this.readyState="closed",this.emit("close")},L0}var vn={};vn.encode=function(e){var t="";for(var o in e)e.hasOwnProperty(o)&&(t.length&&(t+="&"),t+=encodeURIComponent(o)+"="+encodeURIComponent(e[o]));return t},vn.decode=function(e){for(var t={},o=e.split("&"),n=0,s=o.length;n<s;n++){var i=o[n].split("=");t[decodeURIComponent(i[0])]=decodeURIComponent(i[1])}return t};var Ld=function(e,t){var o=function(){};o.prototype=t.prototype,e.prototype=new o,e.prototype.constructor=e},fS="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),jd=64,_S={},bS=0,So=0,wS;function M0(e){var t="";do t=fS[e%jd]+t,e=Math.floor(e/jd);while(e>0);return t}function SGe(e){var t=0;for(So=0;So<e.length;So++)t=t*jd+_S[e.charAt(So)];return t}function H0(){var e=M0(+new Date);return e!==wS?(bS=0,wS=e):e+"."+M0(bS++)}for(;So<jd;So++)_S[fS[So]]=So;H0.encode=M0,H0.decode=SGe;var CS=H0,U0={exports:{}},G0={exports:{}},ji=1e3,Mi=ji*60,Hi=Mi*60,Ui=Hi*24,EGe=Ui*365.25,NGe=function(e,t){t=t||{};var o=typeof e;if(o==="string"&&e.length>0)return xGe(e);if(o==="number"&&isNaN(e)===!1)return t.long?$Ge(e):BGe(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function xGe(e){if(e=String(e),!(e.length>100)){var t=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(e);if(t){var o=parseFloat(t[1]),n=(t[2]||"ms").toLowerCase();switch(n){case"years":case"year":case"yrs":case"yr":case"y":return o*EGe;case"days":case"day":case"d":return o*Ui;case"hours":case"hour":case"hrs":case"hr":case"h":return o*Hi;case"minutes":case"minute":case"mins":case"min":case"m":return o*Mi;case"seconds":case"second":case"secs":case"sec":case"s":return o*ji;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return o;default:return}}}}function BGe(e){return e>=Ui?Math.round(e/Ui)+"d":e>=Hi?Math.round(e/Hi)+"h":e>=Mi?Math.round(e/Mi)+"m":e>=ji?Math.round(e/ji)+"s":e+"ms"}function $Ge(e){return Md(e,Ui,"day")||Md(e,Hi,"hour")||Md(e,Mi,"minute")||Md(e,ji,"second")||e+" ms"}function Md(e,t,o){if(!(e<t))return e<t*1.5?Math.floor(e/t)+" "+o:Math.ceil(e/t)+" "+o+"s"}(function(e,t){t=e.exports=n.debug=n.default=n,t.coerce=h,t.disable=r,t.enable=i,t.enabled=c,t.humanize=NGe,t.instances=[],t.names=[],t.skips=[],t.formatters={};function o(d){var l=0,p;for(p in d)l=(l<<5)-l+d.charCodeAt(p),l|=0;return t.colors[Math.abs(l)%t.colors.length]}function n(d){var l;function p(){if(p.enabled){var g=p,m=+new Date,y=m-(l||m);g.diff=y,g.prev=l,g.curr=m,l=m;for(var u=new Array(arguments.length),f=0;f<u.length;f++)u[f]=arguments[f];u[0]=t.coerce(u[0]),typeof u[0]!="string"&&u.unshift("%O");var b=0;u[0]=u[0].replace(/%([a-zA-Z%])/g,function(w,_){if(w==="%%")return w;b++;var k=t.formatters[_];if(typeof k=="function"){var x=u[b];w=k.call(g,x),u.splice(b,1),b--}return w}),t.formatArgs.call(g,u);var C=p.log||t.log||console.log.bind(console);C.apply(g,u)}}return p.namespace=d,p.enabled=t.enabled(d),p.useColors=t.useColors(),p.color=o(d),p.destroy=s,typeof t.init=="function"&&t.init(p),t.instances.push(p),p}function s(){var d=t.instances.indexOf(this);return d!==-1?(t.instances.splice(d,1),!0):!1}function i(d){t.save(d),t.names=[],t.skips=[];var l,p=(typeof d=="string"?d:"").split(/[\s,]+/),g=p.length;for(l=0;l<g;l++)p[l]&&(d=p[l].replace(/\*/g,".*?"),d[0]==="-"?t.skips.push(new RegExp("^"+d.substr(1)+"$")):t.names.push(new RegExp("^"+d+"$")));for(l=0;l<t.instances.length;l++){var m=t.instances[l];m.enabled=t.enabled(m.namespace)}}function r(){t.enable("")}function c(d){if(d[d.length-1]==="*")return!0;var l,p;for(l=0,p=t.skips.length;l<p;l++)if(t.skips[l].test(d))return!1;for(l=0,p=t.names.length;l<p;l++)if(t.names[l].test(d))return!0;return!1}function h(d){return d instanceof Error?d.stack||d.message:d}})(G0,G0.exports);var IGe=G0.exports;(function(e,t){t=e.exports=IGe,t.log=s,t.formatArgs=n,t.save=i,t.load=r,t.useColors=o,t.storage=typeof chrome<"u"&&typeof chrome.storage<"u"?chrome.storage.local:c(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function o(){return typeof window<"u"&&window.process&&window.process.type==="renderer"?!0:typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)?!1:typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}t.formatters.j=function(h){try{return JSON.stringify(h)}catch(d){return"[UnexpectedJSONParseError]: "+d.message}};function n(h){var d=this.useColors;if(h[0]=(d?"%c":"")+this.namespace+(d?" %c":" ")+h[0]+(d?"%c ":" ")+"+"+t.humanize(this.diff),!!d){var l="color: "+this.color;h.splice(1,0,l,"color: inherit");var p=0,g=0;h[0].replace(/%[a-zA-Z%]/g,function(m){m!=="%%"&&(p++,m==="%c"&&(g=p))}),h.splice(g,0,l)}}function s(){return typeof console=="object"&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function i(h){try{h==null?t.storage.removeItem("debug"):t.storage.debug=h}catch{}}function r(){var h;try{h=t.storage.debug}catch{}return!h&&typeof process<"u"&&"env"in process&&(h=process.env.DEBUG),h}t.enable(r());function c(){try{return window.localStorage}catch{}}})(U0,U0.exports);var Hd=U0.exports,kS=j0(),VGe=vn,SS=Fo,AGe=Ld,OGe=CS,oa=Hd("engine.io-client:polling"),ES=za,TGe=function(){var e=P0,t=new e({xdomain:!1});return t.responseType!=null}();function za(e){var t=e&&e.forceBase64;(!TGe||t)&&(this.supportsBinary=!1),kS.call(this,e)}AGe(za,kS),za.prototype.name="polling",za.prototype.doOpen=function(){this.poll()},za.prototype.pause=function(e){var t=this;this.readyState="pausing";function o(){oa("paused"),t.readyState="paused",e()}if(this.polling||!this.writable){var n=0;this.polling&&(oa("we are currently polling - waiting to pause"),n++,this.once("pollComplete",function(){oa("pre-pause polling complete"),--n||o()})),this.writable||(oa("we are currently writing - waiting to pause"),n++,this.once("drain",function(){oa("pre-pause writing complete"),--n||o()}))}else o()},za.prototype.poll=function(){oa("polling"),this.polling=!0,this.doPoll(),this.emit("poll")},za.prototype.onData=function(e){var t=this;oa("polling got data %s",e);var o=function(n,s,i){if(t.readyState==="opening"&&n.type==="open"&&t.onOpen(),n.type==="close")return t.onClose(),!1;t.onPacket(n)};SS.decodePayload(e,this.socket.binaryType,o),this.readyState!=="closed"&&(this.polling=!1,this.emit("pollComplete"),this.readyState==="open"?this.poll():oa('ignoring poll - transport state "%s"',this.readyState))},za.prototype.doClose=function(){var e=this;function t(){oa("writing close packet"),e.write([{type:"close"}])}this.readyState==="open"?(oa("transport open - closing"),t()):(oa("transport not open - deferring close"),this.once("open",t))},za.prototype.write=function(e){var t=this;this.writable=!1;var o=function(){t.writable=!0,t.emit("drain")};SS.encodePayload(e,this.supportsBinary,function(n){t.doWrite(n,o)})},za.prototype.uri=function(){var e=this.query||{},t=this.secure?"https":"http",o="";this.timestampRequests!==!1&&(e[this.timestampParam]=OGe()),!this.supportsBinary&&!e.sid&&(e.b64=1),e=VGe.encode(e),this.port&&(t==="https"&&Number(this.port)!==443||t==="http"&&Number(this.port)!==80)&&(o=":"+this.port),e.length&&(e="?"+e);var n=this.hostname.indexOf(":")!==-1;return t+"://"+(n?"["+this.hostname+"]":this.hostname)+o+this.path+e};var FGe=P0,NS=ES,zGe=Dn,PGe=Ld,W0=Hd("engine.io-client:polling-xhr"),DGe=z0;D0.exports=Ln,D0.exports.Request=dt;function xS(){}function Ln(e){if(NS.call(this,e),this.requestTimeout=e.requestTimeout,this.extraHeaders=e.extraHeaders,typeof location<"u"){var t=location.protocol==="https:",o=location.port;o||(o=t?443:80),this.xd=typeof location<"u"&&e.hostname!==location.hostname||o!==e.port,this.xs=e.secure!==t}}PGe(Ln,NS),Ln.prototype.supportsBinary=!0,Ln.prototype.request=function(e){return e=e||{},e.uri=this.uri(),e.xd=this.xd,e.xs=this.xs,e.agent=this.agent||!1,e.supportsBinary=this.supportsBinary,e.enablesXDR=this.enablesXDR,e.withCredentials=this.withCredentials,e.pfx=this.pfx,e.key=this.key,e.passphrase=this.passphrase,e.cert=this.cert,e.ca=this.ca,e.ciphers=this.ciphers,e.rejectUnauthorized=this.rejectUnauthorized,e.requestTimeout=this.requestTimeout,e.extraHeaders=this.extraHeaders,new dt(e)},Ln.prototype.doWrite=function(e,t){var o=typeof e!="string"&&e!==void 0,n=this.request({method:"POST",data:e,isBinary:o}),s=this;n.on("success",t),n.on("error",function(i){s.onError("xhr post error",i)}),this.sendXhr=n},Ln.prototype.doPoll=function(){W0("xhr poll");var e=this.request(),t=this;e.on("data",function(o){t.onData(o)}),e.on("error",function(o){t.onError("xhr poll error",o)}),this.pollXhr=e};function dt(e){this.method=e.method||"GET",this.uri=e.uri,this.xd=!!e.xd,this.xs=!!e.xs,this.async=e.async!==!1,this.data=e.data!==void 0?e.data:null,this.agent=e.agent,this.isBinary=e.isBinary,this.supportsBinary=e.supportsBinary,this.enablesXDR=e.enablesXDR,this.withCredentials=e.withCredentials,this.requestTimeout=e.requestTimeout,this.pfx=e.pfx,this.key=e.key,this.passphrase=e.passphrase,this.cert=e.cert,this.ca=e.ca,this.ciphers=e.ciphers,this.rejectUnauthorized=e.rejectUnauthorized,this.extraHeaders=e.extraHeaders,this.create()}if(zGe(dt.prototype),dt.prototype.create=function(){var e={agent:this.agent,xdomain:this.xd,xscheme:this.xs,enablesXDR:this.enablesXDR};e.pfx=this.pfx,e.key=this.key,e.passphrase=this.passphrase,e.cert=this.cert,e.ca=this.ca,e.ciphers=this.ciphers,e.rejectUnauthorized=this.rejectUnauthorized;var t=this.xhr=new FGe(e),o=this;try{W0("xhr open %s: %s",this.method,this.uri),t.open(this.method,this.uri,this.async);try{if(this.extraHeaders){t.setDisableHeaderCheck&&t.setDisableHeaderCheck(!0);for(var n in this.extraHeaders)this.extraHeaders.hasOwnProperty(n)&&t.setRequestHeader(n,this.extraHeaders[n])}}catch{}if(this.method==="POST")try{this.isBinary?t.setRequestHeader("Content-type","application/octet-stream"):t.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{t.setRequestHeader("Accept","*/*")}catch{}"withCredentials"in t&&(t.withCredentials=this.withCredentials),this.requestTimeout&&(t.timeout=this.requestTimeout),this.hasXDR()?(t.onload=function(){o.onLoad()},t.onerror=function(){o.onError(t.responseText)}):t.onreadystatechange=function(){if(t.readyState===2)try{var s=t.getResponseHeader("Content-Type");(o.supportsBinary&&s==="application/octet-stream"||s==="application/octet-stream; charset=UTF-8")&&(t.responseType="arraybuffer")}catch{}t.readyState===4&&(t.status===200||t.status===1223?o.onLoad():setTimeout(function(){o.onError(typeof t.status=="number"?t.status:0)},0))},W0("xhr data %s",this.data),t.send(this.data)}catch(s){setTimeout(function(){o.onError(s)},0);return}typeof document<"u"&&(this.index=dt.requestsCount++,dt.requests[this.index]=this)},dt.prototype.onSuccess=function(){this.emit("success"),this.cleanup()},dt.prototype.onData=function(e){this.emit("data",e),this.onSuccess()},dt.prototype.onError=function(e){this.emit("error",e),this.cleanup(!0)},dt.prototype.cleanup=function(e){if(!(typeof this.xhr>"u"||this.xhr===null)){if(this.hasXDR()?this.xhr.onload=this.xhr.onerror=xS:this.xhr.onreadystatechange=xS,e)try{this.xhr.abort()}catch{}typeof document<"u"&&delete dt.requests[this.index],this.xhr=null}},dt.prototype.onLoad=function(){var e;try{var t;try{t=this.xhr.getResponseHeader("Content-Type")}catch{}t==="application/octet-stream"||t==="application/octet-stream; charset=UTF-8"?e=this.xhr.response||this.xhr.responseText:e=this.xhr.responseText}catch(o){this.onError(o)}e!=null&&this.onData(e)},dt.prototype.hasXDR=function(){return typeof XDomainRequest<"u"&&!this.xs&&this.enablesXDR},dt.prototype.abort=function(){this.cleanup()},dt.requestsCount=0,dt.requests={},typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",BS);else if(typeof addEventListener=="function"){var RGe="onpagehide"in DGe?"pagehide":"unload";addEventListener(RGe,BS,!1)}}function BS(){for(var e in dt.requests)dt.requests.hasOwnProperty(e)&&dt.requests[e].abort()}var vGe=D0.exports,q0=ES,LGe=Ld,$S=z0,jGe=jn,MGe=/\n/g,HGe=/\\n/g,Ud;function UGe(){}function jn(e){q0.call(this,e),this.query=this.query||{},Ud||(Ud=$S.___eio=$S.___eio||[]),this.index=Ud.length;var t=this;Ud.push(function(o){t.onData(o)}),this.query.j=this.index,typeof addEventListener=="function"&&addEventListener("beforeunload",function(){t.script&&(t.script.onerror=UGe)},!1)}LGe(jn,q0),jn.prototype.supportsBinary=!1,jn.prototype.doClose=function(){this.script&&(this.script.parentNode.removeChild(this.script),this.script=null),this.form&&(this.form.parentNode.removeChild(this.form),this.form=null,this.iframe=null),q0.prototype.doClose.call(this)},jn.prototype.doPoll=function(){var e=this,t=document.createElement("script");this.script&&(this.script.parentNode.removeChild(this.script),this.script=null),t.async=!0,t.src=this.uri(),t.onerror=function(s){e.onError("jsonp poll error",s)};var o=document.getElementsByTagName("script")[0];o?o.parentNode.insertBefore(t,o):(document.head||document.body).appendChild(t),this.script=t;var n=typeof navigator<"u"&&/gecko/i.test(navigator.userAgent);n&&setTimeout(function(){var s=document.createElement("iframe");document.body.appendChild(s),document.body.removeChild(s)},100)},jn.prototype.doWrite=function(e,t){var o=this;if(!this.form){var n=document.createElement("form"),s=document.createElement("textarea"),i=this.iframeId="eio_iframe_"+this.index,r;n.className="socketio",n.style.position="absolute",n.style.top="-1000px",n.style.left="-1000px",n.target=i,n.method="POST",n.setAttribute("accept-charset","utf-8"),s.name="d",n.appendChild(s),document.body.appendChild(n),this.form=n,this.area=s}this.form.action=this.uri();function c(){h(),t()}function h(){if(o.iframe)try{o.form.removeChild(o.iframe)}catch(l){o.onError("jsonp polling iframe removal error",l)}try{var d='<iframe src="javascript:0" name="'+o.iframeId+'">';r=document.createElement(d)}catch{r=document.createElement("iframe"),r.name=o.iframeId,r.src="javascript:0"}r.id=o.iframeId,o.form.appendChild(r),o.iframe=r}h(),e=e.replace(HGe,`\\
122
122
  `),this.area.value=e.replace(MGe,"\\n");try{this.form.submit()}catch{}this.iframe.attachEvent?this.iframe.onreadystatechange=function(){o.iframe.readyState==="complete"&&c()}:this.iframe.onload=c};const GGe=QHe(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var J0=j0(),WGe=Fo,qGe=vn,JGe=Ld,XGe=CS,ZGe=Hd("engine.io-client:websocket"),Gd,X0;if(typeof WebSocket<"u"?Gd=WebSocket:typeof self<"u"&&(Gd=self.WebSocket||self.MozWebSocket),typeof window>"u")try{X0=GGe}catch{}var Mn=Gd||X0,YGe=Jt;function Jt(e){var t=e&&e.forceBase64;t&&(this.supportsBinary=!1),this.perMessageDeflate=e.perMessageDeflate,this.usingBrowserWebSocket=Gd&&!e.forceNode,this.protocols=e.protocols,this.usingBrowserWebSocket||(Mn=X0),J0.call(this,e)}JGe(Jt,J0),Jt.prototype.name="websocket",Jt.prototype.supportsBinary=!0,Jt.prototype.doOpen=function(){if(this.check()){var e=this.uri(),t=this.protocols,o={};this.isReactNative||(o.agent=this.agent,o.perMessageDeflate=this.perMessageDeflate,o.pfx=this.pfx,o.key=this.key,o.passphrase=this.passphrase,o.cert=this.cert,o.ca=this.ca,o.ciphers=this.ciphers,o.rejectUnauthorized=this.rejectUnauthorized),this.extraHeaders&&(o.headers=this.extraHeaders),this.localAddress&&(o.localAddress=this.localAddress);try{this.ws=this.usingBrowserWebSocket&&!this.isReactNative?t?new Mn(e,t):new Mn(e):new Mn(e,t,o)}catch(n){return this.emit("error",n)}this.ws.binaryType===void 0&&(this.supportsBinary=!1),this.ws.supports&&this.ws.supports.binary?(this.supportsBinary=!0,this.ws.binaryType="nodebuffer"):this.ws.binaryType="arraybuffer",this.addEventListeners()}},Jt.prototype.addEventListeners=function(){var e=this;this.ws.onopen=function(){e.onOpen()},this.ws.onclose=function(){e.onClose()},this.ws.onmessage=function(t){e.onData(t.data)},this.ws.onerror=function(t){e.onError("websocket error",t)}},Jt.prototype.write=function(e){var t=this;this.writable=!1;for(var o=e.length,n=0,s=o;n<s;n++)(function(r){WGe.encodePacket(r,t.supportsBinary,function(c){if(!t.usingBrowserWebSocket){var h={};if(r.options&&(h.compress=r.options.compress),t.perMessageDeflate){var d=typeof c=="string"?Buffer.byteLength(c):c.length;d<t.perMessageDeflate.threshold&&(h.compress=!1)}}try{t.usingBrowserWebSocket?t.ws.send(c):t.ws.send(c,h)}catch{ZGe("websocket closed before onclose event")}--o||i()})})(e[n]);function i(){t.emit("flush"),setTimeout(function(){t.writable=!0,t.emit("drain")},0)}},Jt.prototype.onClose=function(){J0.prototype.onClose.call(this)},Jt.prototype.doClose=function(){typeof this.ws<"u"&&this.ws.close()},Jt.prototype.uri=function(){var e=this.query||{},t=this.secure?"wss":"ws",o="";this.port&&(t==="wss"&&Number(this.port)!==443||t==="ws"&&Number(this.port)!==80)&&(o=":"+this.port),this.timestampRequests&&(e[this.timestampParam]=XGe()),this.supportsBinary||(e.b64=1),e=qGe.encode(e),e.length&&(e="?"+e);var n=this.hostname.indexOf(":")!==-1;return t+"://"+(n?"["+this.hostname+"]":this.hostname)+o+this.path+e},Jt.prototype.check=function(){return!!Mn&&!("__initialize"in Mn&&this.name===Jt.prototype.name)};var KGe=P0,QGe=vGe,eWe=jGe,tWe=YGe;zd.polling=aWe,zd.websocket=tWe;function aWe(e){var t,o=!1,n=!1,s=e.jsonp!==!1;if(typeof location<"u"){var i=location.protocol==="https:",r=location.port;r||(r=i?443:80),o=e.hostname!==location.hostname||r!==e.port,n=e.secure!==i}if(e.xdomain=o,e.xscheme=n,t=new KGe(e),"open"in t&&!e.forceJSONP)return new QGe(e);if(!s)throw new Error("JSONP disabled");return new eWe(e)}var oWe=[].indexOf,IS=function(e,t){if(oWe)return e.indexOf(t);for(var o=0;o<e.length;++o)if(e[o]===t)return o;return-1},nWe=zd,sWe=Dn,it=Hd("engine.io-client:socket"),iWe=IS,VS=Fo,AS=nS,rWe=vn,lWe=ye;function ye(e,t){if(!(this instanceof ye))return new ye(e,t);t=t||{},e&&typeof e=="object"&&(t=e,e=null),e?(e=AS(e),t.hostname=e.host,t.secure=e.protocol==="https"||e.protocol==="wss",t.port=e.port,e.query&&(t.query=e.query)):t.host&&(t.hostname=AS(t.host).host),this.secure=t.secure!=null?t.secure:typeof location<"u"&&location.protocol==="https:",t.hostname&&!t.port&&(t.port=this.secure?"443":"80"),this.agent=t.agent||!1,this.hostname=t.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=t.port||(typeof location<"u"&&location.port?location.port:this.secure?443:80),this.query=t.query||{},typeof this.query=="string"&&(this.query=rWe.decode(this.query)),this.upgrade=t.upgrade!==!1,this.path=(t.path||"/engine.io").replace(/\/$/,"")+"/",this.forceJSONP=!!t.forceJSONP,this.jsonp=t.jsonp!==!1,this.forceBase64=!!t.forceBase64,this.enablesXDR=!!t.enablesXDR,this.withCredentials=t.withCredentials!==!1,this.timestampParam=t.timestampParam||"t",this.timestampRequests=t.timestampRequests,this.transports=t.transports||["polling","websocket"],this.transportOptions=t.transportOptions||{},this.readyState="",this.writeBuffer=[],this.prevBufferLen=0,this.policyPort=t.policyPort||843,this.rememberUpgrade=t.rememberUpgrade||!1,this.binaryType=null,this.onlyBinaryUpgrades=t.onlyBinaryUpgrades,this.perMessageDeflate=t.perMessageDeflate!==!1?t.perMessageDeflate||{}:!1,this.perMessageDeflate===!0&&(this.perMessageDeflate={}),this.perMessageDeflate&&this.perMessageDeflate.threshold==null&&(this.perMessageDeflate.threshold=1024),this.pfx=t.pfx||void 0,this.key=t.key||void 0,this.passphrase=t.passphrase||void 0,this.cert=t.cert||void 0,this.ca=t.ca||void 0,this.ciphers=t.ciphers||void 0,this.rejectUnauthorized=t.rejectUnauthorized===void 0?!0:t.rejectUnauthorized,this.forceNode=!!t.forceNode,this.isReactNative=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative",(typeof self>"u"||this.isReactNative)&&(t.extraHeaders&&Object.keys(t.extraHeaders).length>0&&(this.extraHeaders=t.extraHeaders),t.localAddress&&(this.localAddress=t.localAddress)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingIntervalTimer=null,this.pingTimeoutTimer=null,this.open()}ye.priorWebsocketSuccess=!1,sWe(ye.prototype),ye.protocol=VS.protocol,ye.Socket=ye,ye.Transport=j0(),ye.transports=zd,ye.parser=Fo,ye.prototype.createTransport=function(e){it('creating transport "%s"',e);var t=cWe(this.query);t.EIO=VS.protocol,t.transport=e;var o=this.transportOptions[e]||{};this.id&&(t.sid=this.id);var n=new nWe[e]({query:t,socket:this,agent:o.agent||this.agent,hostname:o.hostname||this.hostname,port:o.port||this.port,secure:o.secure||this.secure,path:o.path||this.path,forceJSONP:o.forceJSONP||this.forceJSONP,jsonp:o.jsonp||this.jsonp,forceBase64:o.forceBase64||this.forceBase64,enablesXDR:o.enablesXDR||this.enablesXDR,withCredentials:o.withCredentials||this.withCredentials,timestampRequests:o.timestampRequests||this.timestampRequests,timestampParam:o.timestampParam||this.timestampParam,policyPort:o.policyPort||this.policyPort,pfx:o.pfx||this.pfx,key:o.key||this.key,passphrase:o.passphrase||this.passphrase,cert:o.cert||this.cert,ca:o.ca||this.ca,ciphers:o.ciphers||this.ciphers,rejectUnauthorized:o.rejectUnauthorized||this.rejectUnauthorized,perMessageDeflate:o.perMessageDeflate||this.perMessageDeflate,extraHeaders:o.extraHeaders||this.extraHeaders,forceNode:o.forceNode||this.forceNode,localAddress:o.localAddress||this.localAddress,requestTimeout:o.requestTimeout||this.requestTimeout,protocols:o.protocols||void 0,isReactNative:this.isReactNative});return n};function cWe(e){var t={};for(var o in e)e.hasOwnProperty(o)&&(t[o]=e[o]);return t}ye.prototype.open=function(){var e;if(this.rememberUpgrade&&ye.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1)e="websocket";else if(this.transports.length===0){var t=this;setTimeout(function(){t.emit("error","No transports available")},0);return}else e=this.transports[0];this.readyState="opening";try{e=this.createTransport(e)}catch{this.transports.shift(),this.open();return}e.open(),this.setTransport(e)},ye.prototype.setTransport=function(e){it("setting transport %s",e.name);var t=this;this.transport&&(it("clearing existing transport %s",this.transport.name),this.transport.removeAllListeners()),this.transport=e,e.on("drain",function(){t.onDrain()}).on("packet",function(o){t.onPacket(o)}).on("error",function(o){t.onError(o)}).on("close",function(){t.onClose("transport close")})},ye.prototype.probe=function(e){it('probing transport "%s"',e);var t=this.createTransport(e,{probe:1}),o=!1,n=this;ye.priorWebsocketSuccess=!1;function s(){if(n.onlyBinaryUpgrades){var p=!this.supportsBinary&&n.transport.supportsBinary;o=o||p}o||(it('probe transport "%s" opened',e),t.send([{type:"ping",data:"probe"}]),t.once("packet",function(g){if(!o)if(g.type==="pong"&&g.data==="probe"){if(it('probe transport "%s" pong',e),n.upgrading=!0,n.emit("upgrading",t),!t)return;ye.priorWebsocketSuccess=t.name==="websocket",it('pausing current transport "%s"',n.transport.name),n.transport.pause(function(){o||n.readyState!=="closed"&&(it("changing transport and sending upgrade packet"),l(),n.setTransport(t),t.send([{type:"upgrade"}]),n.emit("upgrade",t),t=null,n.upgrading=!1,n.flush())})}else{it('probe transport "%s" failed',e);var m=new Error("probe error");m.transport=t.name,n.emit("upgradeError",m)}}))}function i(){o||(o=!0,l(),t.close(),t=null)}function r(p){var g=new Error("probe error: "+p);g.transport=t.name,i(),it('probe transport "%s" failed because of error: %s',e,p),n.emit("upgradeError",g)}function c(){r("transport closed")}function h(){r("socket closed")}function d(p){t&&p.name!==t.name&&(it('"%s" works - aborting "%s"',p.name,t.name),i())}function l(){t.removeListener("open",s),t.removeListener("error",r),t.removeListener("close",c),n.removeListener("close",h),n.removeListener("upgrading",d)}t.once("open",s),t.once("error",r),t.once("close",c),this.once("close",h),this.once("upgrading",d),t.open()},ye.prototype.onOpen=function(){if(it("socket open"),this.readyState="open",ye.priorWebsocketSuccess=this.transport.name==="websocket",this.emit("open"),this.flush(),this.readyState==="open"&&this.upgrade&&this.transport.pause){it("starting upgrade probes");for(var e=0,t=this.upgrades.length;e<t;e++)this.probe(this.upgrades[e])}},ye.prototype.onPacket=function(e){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(it('socket receive: type "%s", data "%s"',e.type,e.data),this.emit("packet",e),this.emit("heartbeat"),e.type){case"open":this.onHandshake(JSON.parse(e.data));break;case"pong":this.setPing(),this.emit("pong");break;case"error":var t=new Error("server error");t.code=e.data,this.onError(t);break;case"message":this.emit("data",e.data),this.emit("message",e.data);break}else it('packet received with socket readyState "%s"',this.readyState)},ye.prototype.onHandshake=function(e){this.emit("handshake",e),this.id=e.sid,this.transport.query.sid=e.sid,this.upgrades=this.filterUpgrades(e.upgrades),this.pingInterval=e.pingInterval,this.pingTimeout=e.pingTimeout,this.onOpen(),this.readyState!=="closed"&&(this.setPing(),this.removeListener("heartbeat",this.onHeartbeat),this.on("heartbeat",this.onHeartbeat))},ye.prototype.onHeartbeat=function(e){clearTimeout(this.pingTimeoutTimer);var t=this;t.pingTimeoutTimer=setTimeout(function(){t.readyState!=="closed"&&t.onClose("ping timeout")},e||t.pingInterval+t.pingTimeout)},ye.prototype.setPing=function(){var e=this;clearTimeout(e.pingIntervalTimer),e.pingIntervalTimer=setTimeout(function(){it("writing ping packet - expecting pong within %sms",e.pingTimeout),e.ping(),e.onHeartbeat(e.pingTimeout)},e.pingInterval)},ye.prototype.ping=function(){var e=this;this.sendPacket("ping",function(){e.emit("ping")})},ye.prototype.onDrain=function(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,this.writeBuffer.length===0?this.emit("drain"):this.flush()},ye.prototype.flush=function(){this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length&&(it("flushing %d packets in socket",this.writeBuffer.length),this.transport.send(this.writeBuffer),this.prevBufferLen=this.writeBuffer.length,this.emit("flush"))},ye.prototype.write=ye.prototype.send=function(e,t,o){return this.sendPacket("message",e,t,o),this},ye.prototype.sendPacket=function(e,t,o,n){if(typeof t=="function"&&(n=t,t=void 0),typeof o=="function"&&(n=o,o=null),!(this.readyState==="closing"||this.readyState==="closed")){o=o||{},o.compress=o.compress!==!1;var s={type:e,data:t,options:o};this.emit("packetCreate",s),this.writeBuffer.push(s),n&&this.once("flush",n),this.flush()}},ye.prototype.close=function(){if(this.readyState==="opening"||this.readyState==="open"){this.readyState="closing";var e=this;this.writeBuffer.length?this.once("drain",function(){this.upgrading?n():t()}):this.upgrading?n():t()}function t(){e.onClose("forced close"),it("socket closing - telling transport to close"),e.transport.close()}function o(){e.removeListener("upgrade",o),e.removeListener("upgradeError",o),t()}function n(){e.once("upgrade",o),e.once("upgradeError",o)}return this},ye.prototype.onError=function(e){it("socket error %j",e),ye.priorWebsocketSuccess=!1,this.emit("error",e),this.onClose("transport error",e)},ye.prototype.onClose=function(e,t){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){it('socket close with reason: "%s"',e);var o=this;clearTimeout(this.pingIntervalTimer),clearTimeout(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),this.readyState="closed",this.id=null,this.emit("close",e,t),o.writeBuffer=[],o.prevBufferLen=0}},ye.prototype.filterUpgrades=function(e){for(var t=[],o=0,n=e.length;o<n;o++)~iWe(this.transports,e[o])&&t.push(e[o]);return t},T0.exports=lWe,T0.exports.parser=Fo;var dWe=T0.exports,OS={exports:{}},mWe=pWe;function pWe(e,t){var o=[];t=t||0;for(var n=t||0;n<e.length;n++)o[n-t]=e[n];return o}var TS=hWe;function hWe(e,t,o){return e.on(t,o),{destroy:function(){e.removeListener(t,o)}}}var FS=[].slice,zS=function(e,t){if(typeof t=="string"&&(t=e[t]),typeof t!="function")throw new Error("bind() requires a function");var o=FS.call(arguments,2);return function(){return t.apply(e,o.concat(FS.call(arguments)))}};(function(e,t){var o=Od,n=Dn,s=mWe,i=TS,r=zS,c=Ad("socket.io-client:socket"),h=vn,d=mS;e.exports=g;var l={connect:1,connect_error:1,connect_timeout:1,connecting:1,disconnect:1,error:1,reconnect:1,reconnect_attempt:1,reconnect_failed:1,reconnect_error:1,reconnecting:1,ping:1,pong:1},p=n.prototype.emit;function g(m,y,u){this.io=m,this.nsp=y,this.json=this,this.ids=0,this.acks={},this.receiveBuffer=[],this.sendBuffer=[],this.connected=!1,this.disconnected=!0,this.flags={},u&&u.query&&(this.query=u.query),this.io.autoConnect&&this.open()}n(g.prototype),g.prototype.subEvents=function(){if(!this.subs){var m=this.io;this.subs=[i(m,"open",r(this,"onopen")),i(m,"packet",r(this,"onpacket")),i(m,"close",r(this,"onclose"))]}},g.prototype.open=g.prototype.connect=function(){return this.connected?this:(this.subEvents(),this.io.reconnecting||this.io.open(),this.io.readyState==="open"&&this.onopen(),this.emit("connecting"),this)},g.prototype.send=function(){var m=s(arguments);return m.unshift("message"),this.emit.apply(this,m),this},g.prototype.emit=function(m){if(l.hasOwnProperty(m))return p.apply(this,arguments),this;var y=s(arguments),u={type:(this.flags.binary!==void 0?this.flags.binary:d(y))?o.BINARY_EVENT:o.EVENT,data:y};return u.options={},u.options.compress=!this.flags||this.flags.compress!==!1,typeof y[y.length-1]=="function"&&(c("emitting packet with ack id %d",this.ids),this.acks[this.ids]=y.pop(),u.id=this.ids++),this.connected?this.packet(u):this.sendBuffer.push(u),this.flags={},this},g.prototype.packet=function(m){m.nsp=this.nsp,this.io.packet(m)},g.prototype.onopen=function(){if(c("transport is open - connecting"),this.nsp!=="/")if(this.query){var m=typeof this.query=="object"?h.encode(this.query):this.query;c("sending connect packet with query %s",m),this.packet({type:o.CONNECT,query:m})}else this.packet({type:o.CONNECT})},g.prototype.onclose=function(m){c("close (%s)",m),this.connected=!1,this.disconnected=!0,delete this.id,this.emit("disconnect",m)},g.prototype.onpacket=function(m){var y=m.nsp===this.nsp,u=m.type===o.ERROR&&m.nsp==="/";if(!(!y&&!u))switch(m.type){case o.CONNECT:this.onconnect();break;case o.EVENT:this.onevent(m);break;case o.BINARY_EVENT:this.onevent(m);break;case o.ACK:this.onack(m);break;case o.BINARY_ACK:this.onack(m);break;case o.DISCONNECT:this.ondisconnect();break;case o.ERROR:this.emit("error",m.data);break}},g.prototype.onevent=function(m){var y=m.data||[];c("emitting event %j",y),m.id!=null&&(c("attaching ack callback to event"),y.push(this.ack(m.id))),this.connected?p.apply(this,y):this.receiveBuffer.push(y)},g.prototype.ack=function(m){var y=this,u=!1;return function(){if(!u){u=!0;var f=s(arguments);c("sending ack %j",f),y.packet({type:d(f)?o.BINARY_ACK:o.ACK,id:m,data:f})}}},g.prototype.onack=function(m){var y=this.acks[m.id];typeof y=="function"?(c("calling ack %s with %j",m.id,m.data),y.apply(this,m.data),delete this.acks[m.id]):c("bad ack %s",m.id)},g.prototype.onconnect=function(){this.connected=!0,this.disconnected=!1,this.emitBuffered(),this.emit("connect")},g.prototype.emitBuffered=function(){var m;for(m=0;m<this.receiveBuffer.length;m++)p.apply(this,this.receiveBuffer[m]);for(this.receiveBuffer=[],m=0;m<this.sendBuffer.length;m++)this.packet(this.sendBuffer[m]);this.sendBuffer=[]},g.prototype.ondisconnect=function(){c("server disconnect (%s)",this.nsp),this.destroy(),this.onclose("io server disconnect")},g.prototype.destroy=function(){if(this.subs){for(var m=0;m<this.subs.length;m++)this.subs[m].destroy();this.subs=null}this.io.destroy(this)},g.prototype.close=g.prototype.disconnect=function(){return this.connected&&(c("performing disconnect (%s)",this.nsp),this.packet({type:o.DISCONNECT})),this.destroy(),this.connected&&this.onclose("io client disconnect"),this},g.prototype.compress=function(m){return this.flags.compress=m,this},g.prototype.binary=function(m){return this.flags.binary=m,this}})(OS);var PS=OS.exports,yWe=Hn;function Hn(e){e=e||{},this.ms=e.min||100,this.max=e.max||1e4,this.factor=e.factor||2,this.jitter=e.jitter>0&&e.jitter<=1?e.jitter:0,this.attempts=0}Hn.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),o=Math.floor(t*this.jitter*e);e=Math.floor(t*10)&1?e+o:e-o}return Math.min(e,this.max)|0},Hn.prototype.reset=function(){this.attempts=0},Hn.prototype.setMin=function(e){this.ms=e},Hn.prototype.setMax=function(e){this.max=e},Hn.prototype.setJitter=function(e){this.jitter=e};var gWe=dWe,uWe=PS,fWe=Dn,_We=Od,Eo=TS,Un=zS,kt=Ad("socket.io-client:manager"),DS=IS,bWe=yWe,RS=Object.prototype.hasOwnProperty,vS=Oe;function Oe(e,t){if(!(this instanceof Oe))return new Oe(e,t);e&&typeof e=="object"&&(t=e,e=void 0),t=t||{},t.path=t.path||"/socket.io",this.nsps={},this.subs=[],this.opts=t,this.reconnection(t.reconnection!==!1),this.reconnectionAttempts(t.reconnectionAttempts||1/0),this.reconnectionDelay(t.reconnectionDelay||1e3),this.reconnectionDelayMax(t.reconnectionDelayMax||5e3),this.randomizationFactor(t.randomizationFactor||.5),this.backoff=new bWe({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(t.timeout==null?2e4:t.timeout),this.readyState="closed",this.uri=e,this.connecting=[],this.lastPing=null,this.encoding=!1,this.packetBuffer=[];var o=t.parser||_We;this.encoder=new o.Encoder,this.decoder=new o.Decoder,this.autoConnect=t.autoConnect!==!1,this.autoConnect&&this.open()}Oe.prototype.emitAll=function(){this.emit.apply(this,arguments);for(var e in this.nsps)RS.call(this.nsps,e)&&this.nsps[e].emit.apply(this.nsps[e],arguments)},Oe.prototype.updateSocketIds=function(){for(var e in this.nsps)RS.call(this.nsps,e)&&(this.nsps[e].id=this.generateId(e))},Oe.prototype.generateId=function(e){return(e==="/"?"":e+"#")+this.engine.id},fWe(Oe.prototype),Oe.prototype.reconnection=function(e){return arguments.length?(this._reconnection=!!e,this):this._reconnection},Oe.prototype.reconnectionAttempts=function(e){return arguments.length?(this._reconnectionAttempts=e,this):this._reconnectionAttempts},Oe.prototype.reconnectionDelay=function(e){return arguments.length?(this._reconnectionDelay=e,this.backoff&&this.backoff.setMin(e),this):this._reconnectionDelay},Oe.prototype.randomizationFactor=function(e){return arguments.length?(this._randomizationFactor=e,this.backoff&&this.backoff.setJitter(e),this):this._randomizationFactor},Oe.prototype.reconnectionDelayMax=function(e){return arguments.length?(this._reconnectionDelayMax=e,this.backoff&&this.backoff.setMax(e),this):this._reconnectionDelayMax},Oe.prototype.timeout=function(e){return arguments.length?(this._timeout=e,this):this._timeout},Oe.prototype.maybeReconnectOnOpen=function(){!this.reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()},Oe.prototype.open=Oe.prototype.connect=function(e,t){if(kt("readyState %s",this.readyState),~this.readyState.indexOf("open"))return this;kt("opening %s",this.uri),this.engine=gWe(this.uri,this.opts);var o=this.engine,n=this;this.readyState="opening",this.skipReconnect=!1;var s=Eo(o,"open",function(){n.onopen(),e&&e()}),i=Eo(o,"error",function(h){if(kt("connect_error"),n.cleanup(),n.readyState="closed",n.emitAll("connect_error",h),e){var d=new Error("Connection error");d.data=h,e(d)}else n.maybeReconnectOnOpen()});if(this._timeout!==!1){var r=this._timeout;kt("connect attempt will timeout after %d",r),r===0&&s.destroy();var c=setTimeout(function(){kt("connect attempt timed out after %d",r),s.destroy(),o.close(),o.emit("error","timeout"),n.emitAll("connect_timeout",r)},r);this.subs.push({destroy:function(){clearTimeout(c)}})}return this.subs.push(s),this.subs.push(i),this},Oe.prototype.onopen=function(){kt("open"),this.cleanup(),this.readyState="open",this.emit("open");var e=this.engine;this.subs.push(Eo(e,"data",Un(this,"ondata"))),this.subs.push(Eo(e,"ping",Un(this,"onping"))),this.subs.push(Eo(e,"pong",Un(this,"onpong"))),this.subs.push(Eo(e,"error",Un(this,"onerror"))),this.subs.push(Eo(e,"close",Un(this,"onclose"))),this.subs.push(Eo(this.decoder,"decoded",Un(this,"ondecoded")))},Oe.prototype.onping=function(){this.lastPing=new Date,this.emitAll("ping")},Oe.prototype.onpong=function(){this.emitAll("pong",new Date-this.lastPing)},Oe.prototype.ondata=function(e){this.decoder.add(e)},Oe.prototype.ondecoded=function(e){this.emit("packet",e)},Oe.prototype.onerror=function(e){kt("error",e),this.emitAll("error",e)},Oe.prototype.socket=function(e,t){var o=this.nsps[e];if(!o){o=new uWe(this,e,t),this.nsps[e]=o;var n=this;o.on("connecting",s),o.on("connect",function(){o.id=n.generateId(e)}),this.autoConnect&&s()}function s(){~DS(n.connecting,o)||n.connecting.push(o)}return o},Oe.prototype.destroy=function(e){var t=DS(this.connecting,e);~t&&this.connecting.splice(t,1),!this.connecting.length&&this.close()},Oe.prototype.packet=function(e){kt("writing packet %j",e);var t=this;e.query&&e.type===0&&(e.nsp+="?"+e.query),t.encoding?t.packetBuffer.push(e):(t.encoding=!0,this.encoder.encode(e,function(o){for(var n=0;n<o.length;n++)t.engine.write(o[n],e.options);t.encoding=!1,t.processPacketQueue()}))},Oe.prototype.processPacketQueue=function(){if(this.packetBuffer.length>0&&!this.encoding){var e=this.packetBuffer.shift();this.packet(e)}},Oe.prototype.cleanup=function(){kt("cleanup");for(var e=this.subs.length,t=0;t<e;t++){var o=this.subs.shift();o.destroy()}this.packetBuffer=[],this.encoding=!1,this.lastPing=null,this.decoder.destroy()},Oe.prototype.close=Oe.prototype.disconnect=function(){kt("disconnect"),this.skipReconnect=!0,this.reconnecting=!1,this.readyState==="opening"&&this.cleanup(),this.backoff.reset(),this.readyState="closed",this.engine&&this.engine.close()},Oe.prototype.onclose=function(e){kt("onclose"),this.cleanup(),this.backoff.reset(),this.readyState="closed",this.emit("close",e),this._reconnection&&!this.skipReconnect&&this.reconnect()},Oe.prototype.reconnect=function(){if(this.reconnecting||this.skipReconnect)return this;var e=this;if(this.backoff.attempts>=this._reconnectionAttempts)kt("reconnect failed"),this.backoff.reset(),this.emitAll("reconnect_failed"),this.reconnecting=!1;else{var t=this.backoff.duration();kt("will wait %dms before reconnect attempt",t),this.reconnecting=!0;var o=setTimeout(function(){e.skipReconnect||(kt("attempting reconnect"),e.emitAll("reconnect_attempt",e.backoff.attempts),e.emitAll("reconnecting",e.backoff.attempts),!e.skipReconnect&&e.open(function(n){n?(kt("reconnect attempt error"),e.reconnecting=!1,e.reconnect(),e.emitAll("reconnect_error",n.data)):(kt("reconnect success"),e.onreconnect())}))},t);this.subs.push({destroy:function(){clearTimeout(o)}})}},Oe.prototype.onreconnect=function(){var e=this.backoff.attempts;this.reconnecting=!1,this.backoff.reset(),this.updateSocketIds(),this.emitAll("reconnect",e)},function(e,t){var o=MUe,n=Od,s=vS,i=Ad("socket.io-client");e.exports=t=c;var r=t.managers={};function c(h,d){typeof h=="object"&&(d=h,h=void 0),d=d||{};var l=o(h),p=l.source,g=l.id,m=l.path,y=r[g]&&m in r[g].nsps,u=d.forceNew||d["force new connection"]||d.multiplex===!1||y,f;return u?(i("ignoring socket cache for %s",p),f=s(p,d)):(r[g]||(i("new io instance for %s",p),r[g]=s(p,d)),f=r[g]),l.query&&!d.query&&(d.query=l.query),f.socket(l.path,d)}t.protocol=n.protocol,t.connect=c,t.Manager=vS,t.Socket=PS}(E0,E0.exports);var wWe=E0.exports;const Wd=Y7(wWe)("https://golstats-live-server-sockets.azurewebsites.net",{autoConnect:!1,transports:["websocket"]});function CWe(){return Wd}Wd.on("connect",()=>{Bd.emit("socket-connected")}),Wd.on("disconnect",()=>{Bd.emit("socket-disconnected")}),Wd.on("reconnect",()=>{Bd.emit("socket-reconnected")});const Z0=CWe(),kWe=[{name:"Liga MX",id:1},{name:"Liga MX Femenil",id:1001},{name:"Liga Expansión MX",id:1071}],SWe={nextGeneral:{namespaced:!0,state:{seasonId:0,pastSeasonId:0,usePastSeasonId:!1,isSocketConnected:!1,indexesLP:tS(),indexesTSP:EUe(),indexesLS:$Ue(),indexesTLP:VUe(),nextGamesDataStructure:NUe,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(t=>t.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 xUe.filter(t=>t.parentAnalysis.includes(e.selectedAnalysis.id))},homeTeamFilteredPlays(e){if(e.homeTeamFilter.requiresPlaysFiltering)return Q7(e.homeTeamPlays,e.homeTeamFilter.playingAs,e.homeTeamFilter.matchResult,e.homeTeamFilter.sections,e.indexesTSP)},visitingTeamFilteredPlays(e){if(e.visitingTeamFilter.requiresPlaysFiltering)return Q7(e.visitingTeamPlays,e.visitingTeamFilter.playingAs,e.visitingTeamFilter.matchResult,e.visitingTeamFilter.sections,e.indexesTSP)},currentSeasonTeamsIds(e){return e.currentSeasonTeams.map(t=>t.team_id)},canFilledStructure(e){return e.homeTeamFilter.requiresPlaysFiltering||e.visitingTeamFilter.requiresPlaysFiltering},totalFilteredHomeGames(e){return e.homeGames.filter(t=>e.homeTeamFilter.playingAs.includes(t[0])).filter(t=>e.homeTeamFilter.matchResult.includes(t[1])).reduce((t,o)=>t+o[2],0)},totalFilteredVisitingGames(e){return e.visitingGames.filter(t=>e.visitingTeamFilter.playingAs.includes(t[0])).filter(t=>e.visitingTeamFilter.matchResult.includes(t[1])).reduce((t,o)=>t+o[2],0)},filledDataStructure(e,t){if(e.currentSeasonPlays)for(const o of Object.values(e.nextGamesDataStructure))for(const n of Object.values(o.subcategories))e.homeTeamFilter.requiresPlaysFiltering&&n.homeTeam.resetTotals(),e.visitingTeamFilter.requiresPlaysFiltering&&n.visitingTeam.resetTotals(),n.addLeaguePlays(e.currentSeasonPlays,e.indexesLP,e.totalSeasonFinishedGames),n.addTeamPlays(n.homeTeamType,e.gameForAnalysis.home_team,t.homeTeamFilteredPlays,e.indexesTSP,e.showPostMatch?1:t.totalFilteredHomeGames),n.addTeamPlays(n.visitingTeamType,e.gameForAnalysis.visiting_team,t.visitingTeamFilteredPlays,e.indexesTSP,e.showPostMatch?1:t.totalFilteredVisitingGames);return e.nextGamesDataStructure},arrayFilledDataSortedByPriority(e,t){return Object.values(t.filledDataStructure).sort((o,n)=>o.priority-n.priority)},statisticData(e,t){for(const o of Object.values(t.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,t){e.currentTournamentName=t},setBetSubcategoriesObjects(e,t){e.betSubcategoriesObjects=t},setRegularSeasonName(e,t){e.regularSeasonName=t},setBetSubcategories(e,t){e.betSubcategories=t},setBetDescription(e,t){e.betDescription=t},setSeasonId(e,t){e.seasonId=Number(t)},setHome(e,t){e.homeTeamInfo=t},setAway(e,t){e.awayTeamInfo=t},setMenuOptionActive(e,t){e.menuOptionActive=t},setPastSeasonId(e,t){e.pastSeasonId=t},setUsePastSeasonId(e,t){e.usePastSeasonId=t,t&&(e.oldSeasonId=e.pastSeasonId)},updateShowPostMatchData(e,t){e.showPostMatch=t},setHomeResultGame(e,t){e.homeResultGame=t},setAwayResultGame(e,t){e.awayResultGame=t},updateIsSocketConnected(e,t){e.isSocketConnected=t,t&&Z0.emit("subscribe",{channel:`game.${e.gameForAnalysis.game_id}.v2`})},updateCurrentSeasonTeams(e,t){e.currentSeasonTeams=t,e.currentSeasonTeams.forEach(o=>{o.playedGames=e.currentSeasonGames.reduce((n,s)=>{if(s.game_status===1&&(s.home_team===o.team_id||s.visiting_team===o.team_id)){const i=s.score[0]-s.score[1],r=s.home_team===o.team_id;n.push({playingAs:r?1:2,matchResult:i===0?3:r?i>0?1:2:i<0?1:2})}return n},[])})},updateCurrentSeasonGames(e,t){e.currentSeasonGames=t},updateGameId(e,t){e.gameId=t},updateGameForAnalysis(e,t){e.gameForAnalysis=t,e.homeTeamFilter.teamId=e.gameForAnalysis.home_team,e.visitingTeamFilter.teamId=e.gameForAnalysis.visiting_team,e.gameForAnalysis.is_live===1&&e.isSocketConnected&&Z0.client.emit("subscribe",{channel:`game.${e.gameForAnalysis.game_id}.v2`})},updateSelectedAnalysis(e,t){e.selectedAnalysis=t},updateShowLiveData(e,t){e.showLiveData=t},toggleShowLiveData(e){e.showLiveData=!e.showLiveData},toggleAdvanceFilter(e){e.showAdvanceFilter=!e.showAdvanceFilter},updateIdAssetSelected(e,t){e.idAssetSelected=t},updateStats(e,t){e.currentSeasonPlays=t},updateFilterAux(e){e.filterAux||(e.filterAux={homeTeamFilter:{...e.homeTeamFilter},visitingTeamFilter:{...e.visitingTeamFilter}})},updateFilters(e,{filters:t,needsFormat:o=!1}){if(o){if(!t||!t.local||!t.local.statistics||!t.visit||!t.visit.statistics)return;e.homeTeamFilter=m1(e.homeTeamFilter,t.local,e.gameForAnalysis.home_team),e.visitingTeamFilter=m1(e.visitingTeamFilter,t.visit,e.gameForAnalysis.visiting_team),e.selectedStatisticTypeBlock!==t.local.statistics.block&&(e.selectedStatisticTypeBlock=t.local.statistics.block)}else e.homeTeamFilter={...t.homeTeamFilter,statistics:0},e.visitingTeamFilter={...t.visitingTeamFilter,statistics:0}},updateFinishedGames(e,t){e.totalSeasonFinishedGames=t},updateHomeTeamPlays(e,t){e.homeTeamPlays=t},updateVisitingTeamPlays(e,t){e.visitingTeamPlays=t},addSpecialMentions(e,t){const o=Object.values(e.nextGamesDataStructure);o.forEach(n=>{for(const s of Object.values(n.subcategories))s.resetMentions()}),o.forEach(n=>{for(const s of t)for(const i of Object.values(n.subcategories))i.addSpecialMention(s[0],s[1],s[2])})},setDefaultFilter(e,t){e.defaultFilter={homeTeamFilter:{...t.homeTeamFilter,teamId:e.gameForAnalysis.home_team},visitingTeamFilter:{...t.awayTeamFilter,teamId:e.gameForAnalysis.visiting_team}}},addLiveGamePlay(e,t){if(!e.livePlays.has(t[e.indexesTLP.playId])){e.livePlays.set(t[e.indexesTLP.playId],t);const n=Id(t,e.indexesTLP,e.categoriesMap);for(const s of Object.values(e.nextGamesDataStructure))for(const i of Object.values(s.subcategories))i.addLivePlay(e.gameForAnalysis.home_team===n[e.indexesTSP.teamId]?"homeTeam":"visitingTeam",n[e.indexesTSP.teamId],n,e.indexesTSP,e.isLive,!1)}},updateLiveGamePlay(e,t){const o=!!t[e.indexesTLP.length],n=e.livePlays.get(t[e.indexesTLP.playId]);if(NI(n,t))return;let s="";const i=e.gameForAnalysis.home_team===t[e.indexesTLP.teamId]?"homeTeam":"visitingTeam";n&&(s=e.gameForAnalysis.home_team===n[e.indexesTLP.teamId]?"homeTeam":"visitingTeam");const r=Id(n,e.indexesTLP,e.categoriesMap),c=S0(n,r,e.indexesTLP),h=Id(t,e.indexesTLP,e.categoriesMap),d=S0(t,h,e.indexesTLP);for(const l of Object.values(e.nextGamesDataStructure))for(const p of Object.values(l.subcategories))n&&(p.subtractLivePlay(s,r[e.indexesTSP.teamId],r,e.indexesTSP,o),c&&p.subtractLivePlay(s,c[e.indexesTSP.teamId],c,e.indexesTSP,o)),p.addLivePlay(i,h[e.indexesTSP.teamId],h,e.indexesTSP,e.isLive,o),d&&p.addLivePlay(i,d[e.indexesTSP.teamId],d,e.indexesTSP,e.isLive,o);e.livePlays.set(t[e.indexesTLP.playId],t)},deleteLiveGamePlay(e,t){const o=!!t[e.indexesTLP.length],n=e.livePlays.get(t[e.indexesTLP.playId]);let s="";if(n){s=e.gameForAnalysis.home_team===n[e.indexesTLP.teamId]?"homeTeam":"visitingTeam",e.livePlays.delete(n[e.indexesTLP.playId]);const i=Id(n,e.indexesTLP,e.categoriesMap),r=S0(t,i,e.indexesTLP);for(const c of Object.values(e.nextGamesDataStructure))for(const h of Object.values(c.subcategories))h.subtractLivePlay(s,i[e.indexesTSP.teamId],i,e.indexesTSP,o),r&&h.subtractLivePlay(s,r[e.indexesTSP.teamId],r,e.indexesTSP,o)}},clearLiveTotals(e){for(const t of Object.values(e.nextGamesDataStructure))for(const o of Object.values(t.subcategories))o.homeTeam.resetTotalsLive(),o.visitingTeam.resetTotalsLive()},updateSeasonStatistics(e,t){e.statistics=t},updateOldSeasonId(e,t){e.oldSeasonId=t},addRankingInSubcategories(e,{getters:t,isPremiumAccount:o}){if(!(e.homeTeamFilter.teamId&&e.visitingTeamFilter.teamId))return;e.isRankingCalculating=!1,e.currentSeasonTeams.forEach(i=>{i.homeTeamFilterGames=i.playedGames.filter(r=>e.homeTeamFilter.playingAs.includes(r.playingAs)&&e.homeTeamFilter.matchResult.includes(r.matchResult)).length,i.visitingTeamFilterGames=i.playedGames.filter(r=>e.visitingTeamFilter.playingAs.includes(r.playingAs)&&e.visitingTeamFilter.matchResult.includes(r.matchResult)).length});const n=[],s=new Map;for(const i of Object.values(e.nextGamesDataStructure))for(const r of Object.values(i.subcategories))n.push(r);t.rankingData.forEach(i=>{for(const r of n)if(r.isInGeneralCategory(i[e.indexesLS.categoryId])){s.has(r.id)?s.get(r.id).push(i):s.set(r.id,[i]);break}})},prepareCleanAllStatistics(e){e.homeTeamFilter.requiresPlaysFiltering=!0,e.visitingTeamFilter.requiresPlaysFiltering=!0},setHomeGames(e,t){e.homeGames=oS(t)},setVisitingGames(e,t){e.visitingGames=oS(t)},generateCategoriesMap(e){for(const t of Object.values(e.nextGamesDataStructure))for(const o of Object.values(t.subcategories))o.accomplishedCategoryIds.forEach(n=>{const s=e.categoriesMap.get(n);s?s.push(o.generalCategoriesIds.accomplished):e.categoriesMap.set(n,[o.generalCategoriesIds.accomplished])})},resetNextGamesDataStructure(e){for(const t of Object.values(e.nextGamesDataStructure))for(const o of Object.values(t.subcategories))o.resetData()}},actions:{turnOnOffDefaultFilters({state:e,commit:t},{command:o}){o==="on"?t("updateFilters",{filters:e.defaultFilter,needsFormat:!1}):t("updateFilters",{filters:e.filterAux,needsFormat:!1})},async setAndGetStatsPostMatch({commit:e},t){try{const r=await wUe({gameId:t.gameId});if(r){var o=[],n=[],s={season:0,total:0,visit:{total:0,draw:0,win:0,lose:0},played:0,local:{total:0,draw:0,win:0,lose:0}},i={season:0,total:0,visit:{total:0,draw:0,win:0,lose:0},played:0,local:{total:0,draw:0,win:0,lose:0}};Object.keys(r.data).length!==0&&(o=r.data.data.filter(c=>c[1]==t.homeTeam),n=r.data.data.filter(c=>c[1]==t.awayTeam),s=r.data.games,i=r.data.games),e("updateHomeTeamPlays",o),e("updateVisitingTeamPlays",n),e("setHomeGames",s),e("setVisitingGames",i)}else e("updateHomeTeamPlays",[]),e("updateVisitingTeamPlays",[])}catch(r){return Promise.reject(r)}},async fillStatisticDataPostMatch({commit:e,dispatch:t},o){e("prepareCleanAllStatistics"),e("updateHomeTeamPlays",[]),e("updateVisitingTeamPlays",[]),e("setIsSectionLoading",!0,{root:!0});try{let n=[];e("updateGameForAnalysis",o.gameInfo),n.push(t("setAndGetStatsPostMatch",{gameId:o.game,homeTeam:o.homeTeam,awayTeam:o.awayTeam})),await Promise.all(n)}catch(n){throw new Error(n)}finally{e("setIsSectionLoading",!1,{root:!0})}},async checkState({state:e,dispatch:t,commit:o},{gameId:n,isTeamsAnalysis:s,currentSeasonId:i,isLoginChanged:r=!1,defaultFilter:c=null,gameInfo:h=null,isCupGame:d=!1}){try{let l={},p=e.seasonId!==Number(i);const g=[];o("setIsSectionLoading",!0,{root:!0}),o("setUsePastSeasonId",!1),p&&o("setSeasonId",i),o("updateGameId",Number(n)),e.oldSeasonId!==e.seasonId&&o("resetNextGamesDataStructure");const m=await t("getCurrentSeasonGames",Number(n));if(o("leagueGeneral/updateCurrentSeasonGames",m,{root:!0}),l=m.find(y=>y.game_id===Number(n)),!l&&h&&(l=h),l&&o("updateGameForAnalysis",l),l.game_status!==1&&(d||await t("checkTeamsData",{gameId:n,isFromBet:!!c}),(r||e.oldSeasonId!==e.seasonId||e.statistics.length===0)&&g.push(t("getSeasonStatistics")),(r||e.categoriesMap.size===0)&&o("generateCategoriesMap")),e.usePastSeasonId){const y=await t("getCurrentSeasonGamesLast");o("leagueGeneral/updateCurrentSeasonGames",y,{root:!0})}(r||e.currentSeasonTeams.length===0||!e.currentSeasonTeams.find(y=>l.home_team===y.team_id))&&g.push(t("getCurrentSeasonTeams")),o("setHomeResultGame",l.score[0]),o("setAwayResultGame",l.score[1]),s?l.game_status!==1?(await t("fillStatisticData",{gameId:n,gameinfo:l,promises:g,defaultFilter:c}),o("updateShowPostMatchData",!1)):(o("updateStats",[]),o("updateShowPostMatchData",!0),g.push(t("fillStatisticDataPostMatch",{game:n,homeTeam:l.home_team,awayTeam:l.visiting_team,gameInfo:l})),await Promise.all(g)):o("setIsSectionLoading",!1,{root:!0})}catch(l){return Promise.reject(l)}},async fillStatisticData({commit:e,dispatch:t,getters:o,rootGetters:n,state:s},{gameId:i,gameinfo:r,promises:c=[],defaultFilter:h=null}){let d=null;try{e("setIsSectionLoading",!0,{root:!0}),e("prepareCleanAllStatistics"),e("updateHomeTeamPlays",[]),e("updateVisitingTeamPlays",[]),e("updateGameForAnalysis",r),r.is_live&&c.push(t("getCurrentLiveGamePlays",i)),c.push(t("getSpecialMentionsByGame",i)),c.push(t("getHomeTeamPlays")),c.push(t("getVisitingTeamPlays")),c.push(t("getCurrentSeasonPlays")),h&&c.push(kUe(h)),d=await Promise.all(c)}catch(l){throw new Error(l)}finally{setTimeout(()=>{if(e("addRankingInSubcategories",{getters:o,isPremiumAccount:n["loginGeneral/getPremiumAccount"]}),h){const[l]=d.pop();l&&(e("setBetSubcategories",l.categories),e("setBetDescription",l.sectionDescription),e("setDefaultFilter",l.params),e("updateFilterAux"),e("updateFilters",{filters:s.defaultFilter,needsFormat:!1}),t("updateRankingInSubcategories"))}},100),e("setIsSectionLoading",!1,{root:!0})}},async checkTeamsData({state:e,dispatch:t,rootState:o,commit:n},{gameId:s,isFromBet:i}){try{const r=Number(s);if(o.general.tournaments&&o.general.tournaments.length){await t("general/fetchTournaments",null,{root:!0});const c=o.general.tournaments.find(h=>{for(const d of h.seasons)if(d.id===e.seasonId)return!0;return!1});n("general/setTournamentSelected",c||{},{root:!0})}if(e.pastSeasonId){n("nextGeneral/setPastSeasonId",e.pastSeasonId,{root:!0});const c=o.leagueGeneral.currentSeasonGames.find(h=>h.game_id===r);c&&n("updateGameForAnalysis",c),await Promise.all([t("getHomeTeamPlays"),t("getVisitingTeamPlays")]),n("setUsePastSeasonId",i||(!e.homeTeamPlays||e.homeTeamPlays.length===0)&&(!e.visitingTeamPlays||e.visitingTeamPlays.length===0))}else n("setUsePastSeasonId",!1)}catch(r){throw new Error(r)}},async getSpecialMentionsByGame({commit:e},t){try{const o=await uUe({gameId:t});e("addSpecialMentions",o)}catch(o){return Promise.reject(o)}},async getCurrentSeasonGames({commit:e,state:t},o){try{const{teams:n,games:s,past_season_id:i,tournament_id:r}=await yUe({seasonId:t.usePastSeasonId?t.pastSeasonId:t.seasonId,gameId:o}),c=kWe.find(h=>h.id===r);return c&&e("setCurrentTournamentName",c.name),e("setHome",n[0]),e("setAway",n[1]),t.usePastSeasonId||e("setPastSeasonId",i),await e("updateCurrentSeasonGames",s),s&&Array.isArray(s)&&e("updateFinishedGames",s.reduce((h,d)=>(d.game_status===1&&(h+=1),h),0)),s}catch(n){return Promise.reject(n)}},async getCurrentSeasonGamesLast({commit:e,state:t}){try{const{games:o,past_season_id:n}=await eS({seasonId:t.usePastSeasonId?t.pastSeasonId:t.seasonId});return t.usePastSeasonId||e("setPastSeasonId",n),await e("updateCurrentSeasonGames",o),o&&Array.isArray(o)&&e("updateFinishedGames",o.reduce((s,i)=>(i.game_status===1&&(s+=1),s),0)),o}catch(o){return Promise.reject(o)}},async getCurrentSeasonTeams({commit:e,state:t}){try{const o=await bUe({seasonId:t.usePastSeasonId?t.pastSeasonId:t.seasonId});e("updateCurrentSeasonTeams",o.data.teams)}catch{}},async getSeasonStatistics({commit:e,state:t}){try{const o=t.usePastSeasonId?t.pastSeasonId:t.seasonId,n=await pUe({seasonId:o});e("updateSeasonStatistics",n),e("updateOldSeasonId",o)}catch(o){return Promise.reject(o)}},updateRankingInSubcategories({state:e,commit:t,getters:o,rootGetters:n}){e.currentSeasonGames.length>0&&t("addRankingInSubcategories",{getters:o,isPremiumAccount:n["loginGeneral/getPremiumAccount"]})},async getHomeTeamPlays({commit:e,state:t}){try{const o=await aS({seasonId:t.usePastSeasonId?t.pastSeasonId:t.seasonId,teamId:t.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:t}){try{const o=await aS({seasonId:t.usePastSeasonId?t.pastSeasonId:t.seasonId,teamId:t.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:t}){try{const o=await mUe({seasonId:t.usePastSeasonId?t.pastSeasonId:t.seasonId});e("updateStats",o)}catch(o){return Promise.reject(new Error(o))}},async getCurrentLiveGamePlays({state:e,commit:t},o){try{const n=await gUe({gameId:o});e.livePlays=new Map,n.forEach(s=>{e.gameForAnalysis.game_id===s[e.indexesTLP.gameId]&&(e.gameForAnalysis.home_team===s[e.indexesTLP.teamId]||e.gameForAnalysis.visiting_team===s[e.indexesTLP.teamId])&&t("addLiveGamePlay",s)})}catch(n){throw new Error(n)}},socket_new({state:e,commit:t},o){const n=o[1];(e.gameForAnalysis.home_team===n[e.indexesTLP.teamId]||e.gameForAnalysis.visiting_team===n[e.indexesTLP.teamId])&&t("addLiveGamePlay",n)},socket_update({state:e,commit:t},o){const n=o[1];e.gameForAnalysis.game_id===n[e.indexesTLP.gameId]&&(e.gameForAnalysis.home_team===n[e.indexesTLP.teamId]||e.gameForAnalysis.visitingTeam===n[e.indexesTLP.teamId])&&t("updateLiveGamePlay",n)},socket_delete({state:e,commit:t},o){const n=o[1];e.gameForAnalysis.game_id===n[e.indexesTLP.gameId]&&(e.gameForAnalysis.home_team===n[e.indexesTLP.teamId]||e.gameForAnalysis.visiting_team===n[e.indexesTLP.teamId])&&t("deleteLiveGamePlay",n)},exitChannel({state:e,getters:t,rootState:o,rootGetters:n,commit:s}){const i=n["loginGeneral/getPremiumAccount"];t.isLive&&i&&(s("updateShowLiveData",!1),s("clearLiveTotals"),e.livePlays.clear(),Z0.emit("unsubscribe",{channel:`game.${e.gameForAnalysis.game_id}.v2`}))},cleanStats({state:e}){for(const o of Object.values(e.nextGamesDataStructure))for(const n of Object.values(o.subcategories))n.homeTeam.resetTotals(),n.visitingTeam.resetTotals(),n.homeTeam.resetTotalsLive(),n.visitingTeam.resetTotalsLive(),n.isBetMainSubcategory=!1;Object.values(e.nextGamesDataStructure).forEach(o=>{for(const n of Object.values(o.subcategories))n.resetMentions()}),e.currentSeasonPlays=null,e.homeTeamPlays=[],e.visitingTeamPlays=[],e.homeTeamFilter.requiresPlaysFiltering=!0,e.visitingTeamFilter.requiresPlaysFiltering=!0,e.isRankingCalculating=!0},cleanAllStats({state:e}){for(const o of Object.values(e.nextGamesDataStructure))for(const n of Object.values(o.subcategories))n.homeTeam.resetTotals(),n.visitingTeam.resetTotals(),n.isBetMainSubcategory=!1;Object.values(e.nextGamesDataStructure).forEach(o=>{for(const n of Object.values(o.subcategories))n.resetMentions()}),e.currentSeasonGames=[],e.currentSeasonTeams=[],e.gameForAnalysis={},e.homeTeamPlays=[],e.visitingTeamPlays=[],e.currentSeasonPlays=null,e.totalSeasonFinishedGames=0,e.totalHomeTeamFinishedGames=0,e.totalVisitingTeamFinishedGames=0,e.homeGames=[],e.showPostMatch=!1,e.homeResultGame=null,e.awayResultGame=null,e.visitingGames=[],e.idAssetSelected=1,e.showAdvanceFilter=!1,e.selectedAnalysis={},e.homeTeamFilter={teamId:0,statistics:0,playingAs:[],matchResult:[],sections:[],requiresPlaysFiltering:!0},e.visitingTeamFilter={teamId:0,statistics:0,playingAs:[],matchResult:[],sections:[],requiresPlaysFiltering:!0},e.isRankingCalculating=!0}}}};async function EWe(){try{const{data:e}=await Ct({url:"https://kefloixzy1.execute-api.us-west-2.amazonaws.com/prod/tournaments"});return e}catch(e){throw new Error(e)}}const NWe={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,t){e.booleanIsStatisticModalOpen=t},setSectionRef(e,t){e.sectionRef=t},setSectionAnalytics(e,t){e.sectionAnalytics=t},setSeccionBetsGolTipster(e,t){e.seccionBetsGolTipster=t},setPreviewSectionAnalytics(e,t){e.previewSectionAnalytics=t},setVideoSrc(e,t){e.videoSrc=t},setVideoModalVisibility(e,t){e.isVideoModalVisible=t},setSelectedTournament(e,t){e.selectedTournament=t},setTournaments(e,t){e.tournaments=t.map(o=>({...o.tournament,seasons:o.seasons})),e.tournamentSelected=e.tournaments[0]},setTournamentSelected(e,t){e.tournamentSelected=t}},actions:{async fetchTournaments({state:e,commit:t}){try{if(e.tournaments.length===0){const o=await EWe();t("setTournaments",o)}}catch(o){throw new Error(o)}}}};async function xWe({seasonId:e,localTeamId:t,visitingTeamId:o}){try{const n=`https://bzznnzehtf.execute-api.us-west-2.amazonaws.com/prod/xg/seasons/${e}/teams/${t}/${o}`;return(await Ct({url:n})).data}catch(n){return Promise.reject(n)}}async function BWe({seasonId:e,localTeamId:t,visitingTeamId:o}){try{const n=`https://bzznnzehtf.execute-api.us-west-2.amazonaws.com/prod/xg/game/${e}/teams/${t}/${o}`;return(await Ct({url:n})).data}catch(n){return Promise.reject(n)}}const LS=(e,t)=>{let o={};return e.forEach((n,s)=>{s==3&&(t[0]==35||t[0]==54)&&(t[s]==2?t[s]=1:t[s]=2),s==2&&(t[0]==35||t[0]==54)&&(t[s]==1?t[s]=2:t[s]==2&&(t[s]=1)),o[n]=t[s]}),o},jS=(e,t)=>e.filter(n=>{const s=t.playingAs.includes(n.playing_as),i=t.matchResult.includes(n.match_result),r=t.sections.includes(n.section);return s&&i&&r}),MS=[{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(t,o,n){return typeof n>"u"||+n==0?Math[t](o):(o=+o,n=+n,isNaN(o)||!(typeof n=="number"&&n%1===0)?NaN:(o=o.toString().split("e"),o=Math[t](+(o[0]+"e"+(o[1]?+o[1]-n:-n))),o=o.toString().split("e"),+(o[0]+"e"+(o[1]?+o[1]+n:n))))}Math.ceil10||(Math.ceil10=function(t,o){return e("ceil",t,o)})})();function HS(e,t){let o=t*-1;return Math.ceil10(e,o)}const $We={general:NWe,...CUe,...SWe,...{xgGeneral:{namespaced:!0,state:{teamSelected:"Local",xGLocalPlays:[],xGVisitingPlays:[]},getters:{playsLocal:(e,t,o)=>{const n=e.xGLocalPlays,s="homeTeamFilter",i=o.nextGeneral[s];return jS(n,i)},playsAway:(e,t,o)=>{const n=e.xGVisitingPlays,s="visitingTeamFilter",i=o.nextGeneral[s];return jS(n,i)},goalsQtyLocal:(e,t)=>{const o=MS.find(n=>n.name==="Goles");return t.playsLocal.filter(n=>o.categories.includes(n.category_id)).length},goalsQtyAway:(e,t)=>{const o=MS.find(n=>n.name==="Goles");return t.playsAway.filter(n=>o.categories.includes(n.category_id)).length},shotsOnGoalQtyLocal:(e,t)=>t.playsLocal.filter(o=>o.category_id===510).length,shotsOnGoalQtyAway:(e,t)=>t.playsAway.filter(o=>o.category_id===510).length,xGLocal:(e,t)=>{const o=new Set;let n=t.playsLocal.reduce((s,i)=>(o.has(i.moment_of_play)||(o.add(i.moment_of_play),s+=i.xG2),s),0);return HS(n,2)},xGAway:(e,t)=>{const o=new Set;let n=t.playsAway.reduce((s,i)=>(o.has(i.moment_of_play)||(o.add(i.moment_of_play),s+=i.xG2),s),0);return HS(n,2)}},mutations:{setTeamSelected(e,t){e.teamSelected=t},setPlays(e,t){e.xGLocalPlays=t.local_team.map(o=>LS(t.data_headers,o)),e.xGVisitingPlays=t.visiting_team.map(o=>LS(t.data_headers,o))},cleanXgStore(e){e.localStorage="Local",e.xGLocalPlays=[],e.xGVisitingPlays=[]}},actions:{async getXgPlays({commit:e},{seasonId:t,localTeamId:o,visitingTeamId:n,postMatch:s=!1}){try{var i={};s?i=await BWe({seasonId:t,localTeamId:o,visitingTeamId:n}):i=await xWe({seasonId:t,localTeamId:o,visitingTeamId:n}),e("setPlays",i)}catch(r){return Promise.reject(r)}}}}}};function IWe(e){for(const[t,o]of Object.entries($We))e.hasModule(t)||e.registerModule(t,o)}St.GSCGameData=dUe,St.registerStoreModules=IWe,Object.defineProperty(St,Symbol.toStringTag,{value:"Module"})});