@golstats/gsc-game-data 1.0.358 → 1.0.360

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.
@@ -4141,7 +4141,7 @@ uniform ${De} ${He} u_${rt};
4141
4141
  `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(o){return o instanceof this?o:new this(o)}static concat(o,...s){const z=new this(o);return s.forEach(W=>z.set(W)),z}static accessor(o){const s=(this[tV]=this[tV]={accessors:{}}).accessors,z=this.prototype;function W(v){const g=ab(v);s[g]||(gft(z,v),s[g]=!0)}return An.isArray(o)?o.forEach(W):W(o),this}};mp.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),An.reduceDescriptors(mp.prototype,({value:e},o)=>{let s=o[0].toUpperCase()+o.slice(1);return{get:()=>e,set(z){this[s]=z}}}),An.freezeMethods(mp);function Kk(e,o){const s=this||tb,z=o||s,W=mp.from(z.headers);let v=z.data;return An.forEach(e,function(g){v=g.call(s,v,W.normalize(),o?o.status:void 0)}),W.normalize(),v}function aV(e){return!!(e&&e.__CANCEL__)}function l2(e,o,s){vl.call(this,e??"canceled",vl.ERR_CANCELED,o,s),this.name="CanceledError"}An.inherits(l2,vl,{__CANCEL__:!0});function rV(e,o,s){const z=s.config.validateStatus;!s.status||!z||z(s.status)?e(s):o(new vl("Request failed with status code "+s.status,[vl.ERR_BAD_REQUEST,vl.ERR_BAD_RESPONSE][Math.floor(s.status/100)-4],s.config,s.request,s))}function yft(e){const o=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return o&&o[1]||""}function vft(e,o){e=e||10;const s=new Array(e),z=new Array(e);let W=0,v=0,g;return o=o!==void 0?o:1e3,function(r){const b=Date.now(),d=z[v];g||(g=b),s[W]=r,z[W]=b;let a=v,_=0;for(;a!==W;)_+=s[a++],a=a%e;if(W=(W+1)%e,W===v&&(v=(v+1)%e),b-g<o)return;const y=d&&b-d;return y?Math.round(_*1e3/y):void 0}}function bft(e,o){let s=0,z=1e3/o,W,v;const g=(r,b=Date.now())=>{s=b,W=null,v&&(clearTimeout(v),v=null),e(...r)};return[(...r)=>{const b=Date.now(),d=b-s;d>=z?g(r,b):(W=r,v||(v=setTimeout(()=>{v=null,g(W)},z-d)))},()=>W&&g(W)]}const L5=(e,o,s=3)=>{let z=0;const W=vft(50,250);return bft(v=>{const g=v.loaded,r=v.lengthComputable?v.total:void 0,b=g-z,d=W(b),a=g<=r;z=g;const _={loaded:g,total:r,progress:r?g/r:void 0,bytes:b,rate:d||void 0,estimated:d&&r&&a?(r-g)/d:void 0,event:v,lengthComputable:r!=null,[o?"download":"upload"]:!0};e(_)},s)},nV=(e,o)=>{const s=e!=null;return[z=>o[0]({lengthComputable:s,total:e,loaded:z}),o[1]]},iV=e=>(...o)=>An.asap(()=>e(...o)),xft=wh.hasStandardBrowserEnv?((e,o)=>s=>(s=new URL(s,wh.origin),e.protocol===s.protocol&&e.host===s.host&&(o||e.port===s.port)))(new URL(wh.origin),wh.navigator&&/(msie|trident)/i.test(wh.navigator.userAgent)):()=>!0,_ft=wh.hasStandardBrowserEnv?{write(e,o,s,z,W,v,g){if(typeof document>"u")return;const r=[`${e}=${encodeURIComponent(o)}`];An.isNumber(s)&&r.push(`expires=${new Date(s).toUTCString()}`),An.isString(z)&&r.push(`path=${z}`),An.isString(W)&&r.push(`domain=${W}`),v===!0&&r.push("secure"),An.isString(g)&&r.push(`SameSite=${g}`),document.cookie=r.join("; ")},read(e){if(typeof document>"u")return null;const o=document.cookie.match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return o?decodeURIComponent(o[1]):null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function wft(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function kft(e,o){return o?e.replace(/\/?\/$/,"")+"/"+o.replace(/^\/+/,""):e}function oV(e,o,s){let z=!wft(o);return e&&(z||s==!1)?kft(e,o):o}const sV=e=>e instanceof mp?{...e}:e;function tg(e,o){o=o||{};const s={};function z(d,a,_,y){return An.isPlainObject(d)&&An.isPlainObject(a)?An.merge.call({caseless:y},d,a):An.isPlainObject(a)?An.merge({},a):An.isArray(a)?a.slice():a}function W(d,a,_,y){if(An.isUndefined(a)){if(!An.isUndefined(d))return z(void 0,d,_,y)}else return z(d,a,_,y)}function v(d,a){if(!An.isUndefined(a))return z(void 0,a)}function g(d,a){if(An.isUndefined(a)){if(!An.isUndefined(d))return z(void 0,d)}else return z(void 0,a)}function r(d,a,_){if(_ in o)return z(d,a);if(_ in e)return z(void 0,d)}const b={url:v,method:v,data:v,baseURL:g,transformRequest:g,transformResponse:g,paramsSerializer:g,timeout:g,timeoutMessage:g,withCredentials:g,withXSRFToken:g,adapter:g,responseType:g,xsrfCookieName:g,xsrfHeaderName:g,onUploadProgress:g,onDownloadProgress:g,decompress:g,maxContentLength:g,maxBodyLength:g,beforeRedirect:g,transport:g,httpAgent:g,httpsAgent:g,cancelToken:g,socketPath:g,responseEncoding:g,validateStatus:r,headers:(d,a,_)=>W(sV(d),sV(a),_,!0)};return An.forEach(Object.keys({...e,...o}),function(d){const a=b[d]||W,_=a(e[d],o[d],d);An.isUndefined(_)&&a!==r||(s[d]=_)}),s}const lV=e=>{const o=tg({},e);let{data:s,withXSRFToken:z,xsrfHeaderName:W,xsrfCookieName:v,headers:g,auth:r}=o;if(o.headers=g=mp.from(g),o.url=$R(oV(o.baseURL,o.url,o.allowAbsoluteUrls),e.params,e.paramsSerializer),r&&g.set("Authorization","Basic "+btoa((r.username||"")+":"+(r.password?unescape(encodeURIComponent(r.password)):""))),An.isFormData(s)){if(wh.hasStandardBrowserEnv||wh.hasStandardBrowserWebWorkerEnv)g.setContentType(void 0);else if(An.isFunction(s.getHeaders)){const b=s.getHeaders(),d=["content-type","content-length"];Object.entries(b).forEach(([a,_])=>{d.includes(a.toLowerCase())&&g.set(a,_)})}}if(wh.hasStandardBrowserEnv&&(z&&An.isFunction(z)&&(z=z(o)),z||z!==!1&&xft(o.url))){const b=W&&v&&_ft.read(v);b&&g.set(W,b)}return o},Sft=typeof XMLHttpRequest<"u",Tft=Sft&&function(e){return new Promise(function(o,s){const z=lV(e);let W=z.data;const v=mp.from(z.headers).normalize();let{responseType:g,onUploadProgress:r,onDownloadProgress:b}=z,d,a,_,y,x;function u(){y&&y(),x&&x(),z.cancelToken&&z.cancelToken.unsubscribe(d),z.signal&&z.signal.removeEventListener("abort",d)}let n=new XMLHttpRequest;n.open(z.method.toUpperCase(),z.url,!0),n.timeout=z.timeout;function i(){if(!n)return;const l=mp.from("getAllResponseHeaders"in n&&n.getAllResponseHeaders()),h={data:!g||g==="text"||g==="json"?n.responseText:n.response,status:n.status,statusText:n.statusText,headers:l,config:e,request:n};rV(function(m){o(m),u()},function(m){s(m),u()},h),n=null}"onloadend"in n?n.onloadend=i:n.onreadystatechange=function(){!n||n.readyState!==4||n.status===0&&!(n.responseURL&&n.responseURL.indexOf("file:")===0)||setTimeout(i)},n.onabort=function(){n&&(s(new vl("Request aborted",vl.ECONNABORTED,e,n)),n=null)},n.onerror=function(l){const h=l&&l.message?l.message:"Network Error",m=new vl(h,vl.ERR_NETWORK,e,n);m.event=l||null,s(m),n=null},n.ontimeout=function(){let l=z.timeout?"timeout of "+z.timeout+"ms exceeded":"timeout exceeded";const h=z.transitional||QR;z.timeoutErrorMessage&&(l=z.timeoutErrorMessage),s(new vl(l,h.clarifyTimeoutError?vl.ETIMEDOUT:vl.ECONNABORTED,e,n)),n=null},W===void 0&&v.setContentType(null),"setRequestHeader"in n&&An.forEach(v.toJSON(),function(l,h){n.setRequestHeader(h,l)}),An.isUndefined(z.withCredentials)||(n.withCredentials=!!z.withCredentials),g&&g!=="json"&&(n.responseType=z.responseType),b&&([_,x]=L5(b,!0),n.addEventListener("progress",_)),r&&n.upload&&([a,y]=L5(r),n.upload.addEventListener("progress",a),n.upload.addEventListener("loadend",y)),(z.cancelToken||z.signal)&&(d=l=>{n&&(s(!l||l.type?new l2(null,e,n):l),n.abort(),n=null)},z.cancelToken&&z.cancelToken.subscribe(d),z.signal&&(z.signal.aborted?d():z.signal.addEventListener("abort",d)));const f=yft(z.url);if(f&&wh.protocols.indexOf(f)===-1){s(new vl("Unsupported protocol "+f+":",vl.ERR_BAD_REQUEST,e));return}n.send(W||null)})},Cft=(e,o)=>{const{length:s}=e=e?e.filter(Boolean):[];if(o||s){let z=new AbortController,W;const v=function(d){if(!W){W=!0,r();const a=d instanceof Error?d:this.reason;z.abort(a instanceof vl?a:new l2(a instanceof Error?a.message:a))}};let g=o&&setTimeout(()=>{g=null,v(new vl(`timeout ${o} of ms exceeded`,vl.ETIMEDOUT))},o);const r=()=>{e&&(g&&clearTimeout(g),g=null,e.forEach(d=>{d.unsubscribe?d.unsubscribe(v):d.removeEventListener("abort",v)}),e=null)};e.forEach(d=>d.addEventListener("abort",v));const{signal:b}=z;return b.unsubscribe=()=>An.asap(r),b}},Eft=function*(e,o){let s=e.byteLength;if(s<o){yield e;return}let z=0,W;for(;z<s;)W=z+o,yield e.slice(z,W),z=W},Aft=async function*(e,o){for await(const s of Mft(e))yield*Eft(s,o)},Mft=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const o=e.getReader();try{for(;;){const{done:s,value:z}=await o.read();if(s)break;yield z}}finally{await o.cancel()}},cV=(e,o,s,z)=>{const W=Aft(e,o);let v=0,g,r=b=>{g||(g=!0,z&&z(b))};return new ReadableStream({async pull(b){try{const{done:d,value:a}=await W.next();if(d){r(),b.close();return}let _=a.byteLength;if(s){let y=v+=_;s(y)}b.enqueue(new Uint8Array(a))}catch(d){throw r(d),d}},cancel(b){return r(b),W.return()}},{highWaterMark:2})},uV=64*1024,{isFunction:B5}=An,Pft=(({Request:e,Response:o})=>({Request:e,Response:o}))(An.global),{ReadableStream:dV,TextEncoder:hV}=An.global,pV=(e,...o)=>{try{return!!e(...o)}catch{return!1}},Ift=e=>{e=An.merge.call({skipUndefined:!0},Pft,e);const{fetch:o,Request:s,Response:z}=e,W=o?B5(o):typeof fetch=="function",v=B5(s),g=B5(z);if(!W)return!1;const r=W&&B5(dV),b=W&&(typeof hV=="function"?(u=>n=>u.encode(n))(new hV):async u=>new Uint8Array(await new s(u).arrayBuffer())),d=v&&r&&pV(()=>{let u=!1;const n=new s(wh.origin,{body:new dV,method:"POST",get duplex(){return u=!0,"half"}}).headers.has("Content-Type");return u&&!n}),a=g&&r&&pV(()=>An.isReadableStream(new z("").body)),_={stream:a&&(u=>u.body)};W&&["text","arrayBuffer","blob","formData","stream"].forEach(u=>{!_[u]&&(_[u]=(n,i)=>{let f=n&&n[u];if(f)return f.call(n);throw new vl(`Response type '${u}' is not supported`,vl.ERR_NOT_SUPPORT,i)})});const y=async u=>{if(u==null)return 0;if(An.isBlob(u))return u.size;if(An.isSpecCompliantForm(u))return(await new s(wh.origin,{method:"POST",body:u}).arrayBuffer()).byteLength;if(An.isArrayBufferView(u)||An.isArrayBuffer(u))return u.byteLength;if(An.isURLSearchParams(u)&&(u=u+""),An.isString(u))return(await b(u)).byteLength},x=async(u,n)=>An.toFiniteNumber(u.getContentLength())??y(n);return async u=>{let{url:n,method:i,data:f,signal:l,cancelToken:h,timeout:m,onDownloadProgress:w,onUploadProgress:T,responseType:A,headers:C,withCredentials:I="same-origin",fetchOptions:L}=lV(u),E=o||fetch;A=A?(A+"").toLowerCase():"text";let P=Cft([l,h&&h.toAbortSignal()],m),M=null;const S=P&&P.unsubscribe&&(()=>{P.unsubscribe()});let B;try{if(T&&d&&i!=="get"&&i!=="head"&&(B=await x(C,f))!==0){let H=new s(n,{method:"POST",body:f,duplex:"half"}),U;if(An.isFormData(f)&&(U=H.headers.get("content-type"))&&C.setContentType(U),H.body){const[J,re]=nV(B,L5(iV(T)));f=cV(H.body,uV,J,re)}}An.isString(I)||(I=I?"include":"omit");const k=v&&"credentials"in s.prototype,O={...L,signal:P,method:i.toUpperCase(),headers:C.normalize().toJSON(),body:f,duplex:"half",credentials:k?I:void 0};M=v&&new s(n,O);let D=await(v?E(M,L):E(n,O));const V=a&&(A==="stream"||A==="response");if(a&&(w||V&&S)){const H={};["status","statusText","headers"].forEach(q=>{H[q]=D[q]});const U=An.toFiniteNumber(D.headers.get("content-length")),[J,re]=w&&nV(U,L5(iV(w),!0))||[];D=new z(cV(D.body,uV,J,()=>{re&&re(),S&&S()}),H)}A=A||"text";let G=await _[An.findKey(_,A)||"text"](D,u);return!V&&S&&S(),await new Promise((H,U)=>{rV(H,U,{data:G,headers:mp.from(D.headers),status:D.status,statusText:D.statusText,config:u,request:M})})}catch(k){throw S&&S(),k&&k.name==="TypeError"&&/Load failed|fetch/i.test(k.message)?Object.assign(new vl("Network Error",vl.ERR_NETWORK,u,M),{cause:k.cause||k}):vl.from(k,k&&k.code,u,M)}}},Lft=new Map,fV=e=>{let o=e&&e.env||{};const{fetch:s,Request:z,Response:W}=o,v=[z,W,s];let g=v.length,r=g,b,d,a=Lft;for(;r--;)b=v[r],d=a.get(b),d===void 0&&a.set(b,d=r?new Map:Ift(o)),a=d;return d};fV();const Qk={http:Ypt,xhr:Tft,fetch:{get:fV}};An.forEach(Qk,(e,o)=>{if(e){try{Object.defineProperty(e,"name",{value:o})}catch{}Object.defineProperty(e,"adapterName",{value:o})}});const mV=e=>`- ${e}`,Bft=e=>An.isFunction(e)||e===null||e===!1;function Oft(e,o){e=An.isArray(e)?e:[e];const{length:s}=e;let z,W;const v={};for(let g=0;g<s;g++){z=e[g];let r;if(W=z,!Bft(z)&&(W=Qk[(r=String(z)).toLowerCase()],W===void 0))throw new vl(`Unknown adapter '${r}'`);if(W&&(An.isFunction(W)||(W=W.get(o))))break;v[r||"#"+g]=W}if(!W){const g=Object.entries(v).map(([b,d])=>`adapter ${b} `+(d===!1?"is not supported by the environment":"is not available in the build"));let r=s?g.length>1?`since :
4142
4142
  `+g.map(mV).join(`
4143
4143
  `):" "+mV(g[0]):"as no adapter specified";throw new vl("There is no suitable adapter to dispatch the request "+r,"ERR_NOT_SUPPORT")}return W}const gV={getAdapter:Oft,adapters:Qk};function eS(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new l2(null,e)}function yV(e){return eS(e),e.headers=mp.from(e.headers),e.data=Kk.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),gV.getAdapter(e.adapter||tb.adapter,e)(e).then(function(o){return eS(e),o.data=Kk.call(e,e.transformResponse,o),o.headers=mp.from(o.headers),o},function(o){return aV(o)||(eS(e),o&&o.response&&(o.response.data=Kk.call(e,e.transformResponse,o.response),o.response.headers=mp.from(o.response.headers))),Promise.reject(o)})}const vV="1.13.1",O5={};["object","boolean","number","function","string","symbol"].forEach((e,o)=>{O5[e]=function(s){return typeof s===e||"a"+(o<1?"n ":" ")+e}});const bV={};O5.transitional=function(e,o,s){function z(W,v){return"[Axios v"+vV+"] Transitional option '"+W+"'"+v+(s?". "+s:"")}return(W,v,g)=>{if(e===!1)throw new vl(z(v," has been removed"+(o?" in "+o:"")),vl.ERR_DEPRECATED);return o&&!bV[v]&&(bV[v]=!0,console.warn(z(v," has been deprecated since v"+o+" and will be removed in the near future"))),e?e(W,v,g):!0}},O5.spelling=function(e){return(o,s)=>(console.warn(`${s} is likely a misspelling of ${e}`),!0)};function zft(e,o,s){if(typeof e!="object")throw new vl("options must be an object",vl.ERR_BAD_OPTION_VALUE);const z=Object.keys(e);let W=z.length;for(;W-- >0;){const v=z[W],g=o[v];if(g){const r=e[v],b=r===void 0||g(r,v,e);if(b!==!0)throw new vl("option "+v+" must be "+b,vl.ERR_BAD_OPTION_VALUE);continue}if(s!==!0)throw new vl("Unknown option "+v,vl.ERR_BAD_OPTION)}}const z5={assertOptions:zft,validators:O5},X0=z5.validators;let ag=class{constructor(o){this.defaults=o||{},this.interceptors={request:new KR,response:new KR}}async request(o,s){try{return await this._request(o,s)}catch(z){if(z instanceof Error){let W={};Error.captureStackTrace?Error.captureStackTrace(W):W=new Error;const v=W.stack?W.stack.replace(/^.+\n/,""):"";try{z.stack?v&&!String(z.stack).endsWith(v.replace(/^.+\n.+\n/,""))&&(z.stack+=`
4144
- `+v):z.stack=v}catch{}}throw z}}_request(o,s){typeof o=="string"?(s=s||{},s.url=o):s=o||{},s=tg(this.defaults,s);const{transitional:z,paramsSerializer:W,headers:v}=s;z!==void 0&&z5.assertOptions(z,{silentJSONParsing:X0.transitional(X0.boolean),forcedJSONParsing:X0.transitional(X0.boolean),clarifyTimeoutError:X0.transitional(X0.boolean)},!1),W!=null&&(An.isFunction(W)?s.paramsSerializer={serialize:W}:z5.assertOptions(W,{encode:X0.function,serialize:X0.function},!0)),s.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?s.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:s.allowAbsoluteUrls=!0),z5.assertOptions(s,{baseUrl:X0.spelling("baseURL"),withXsrfToken:X0.spelling("withXSRFToken")},!0),s.method=(s.method||this.defaults.method||"get").toLowerCase();let g=v&&An.merge(v.common,v[s.method]);v&&An.forEach(["delete","get","head","post","put","patch","common"],u=>{delete v[u]}),s.headers=mp.concat(g,v);const r=[];let b=!0;this.interceptors.request.forEach(function(u){typeof u.runWhen=="function"&&u.runWhen(s)===!1||(b=b&&u.synchronous,r.unshift(u.fulfilled,u.rejected))});const d=[];this.interceptors.response.forEach(function(u){d.push(u.fulfilled,u.rejected)});let a,_=0,y;if(!b){const u=[yV.bind(this),void 0];for(u.unshift(...r),u.push(...d),y=u.length,a=Promise.resolve(s);_<y;)a=a.then(u[_++],u[_++]);return a}y=r.length;let x=s;for(;_<y;){const u=r[_++],n=r[_++];try{x=u(x)}catch(i){n.call(this,i);break}}try{a=yV.call(this,x)}catch(u){return Promise.reject(u)}for(_=0,y=d.length;_<y;)a=a.then(d[_++],d[_++]);return a}getUri(o){o=tg(this.defaults,o);const s=oV(o.baseURL,o.url,o.allowAbsoluteUrls);return $R(s,o.params,o.paramsSerializer)}};An.forEach(["delete","get","head","options"],function(e){ag.prototype[e]=function(o,s){return this.request(tg(s||{},{method:e,url:o,data:(s||{}).data}))}}),An.forEach(["post","put","patch"],function(e){function o(s){return function(z,W,v){return this.request(tg(v||{},{method:e,headers:s?{"Content-Type":"multipart/form-data"}:{},url:z,data:W}))}}ag.prototype[e]=o(),ag.prototype[e+"Form"]=o(!0)});let Nft=class GH{constructor(o){if(typeof o!="function")throw new TypeError("executor must be a function.");let s;this.promise=new Promise(function(W){s=W});const z=this;this.promise.then(W=>{if(!z._listeners)return;let v=z._listeners.length;for(;v-- >0;)z._listeners[v](W);z._listeners=null}),this.promise.then=W=>{let v;const g=new Promise(r=>{z.subscribe(r),v=r}).then(W);return g.cancel=function(){z.unsubscribe(v)},g},o(function(W,v,g){z.reason||(z.reason=new l2(W,v,g),s(z.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(o){if(this.reason){o(this.reason);return}this._listeners?this._listeners.push(o):this._listeners=[o]}unsubscribe(o){if(!this._listeners)return;const s=this._listeners.indexOf(o);s!==-1&&this._listeners.splice(s,1)}toAbortSignal(){const o=new AbortController,s=z=>{o.abort(z)};return this.subscribe(s),o.signal.unsubscribe=()=>this.unsubscribe(s),o.signal}static source(){let o;return{token:new GH(function(s){o=s}),cancel:o}}};function Dft(e){return function(o){return e.apply(null,o)}}function Fft(e){return An.isObject(e)&&e.isAxiosError===!0}const tS={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,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(tS).forEach(([e,o])=>{tS[o]=e});function xV(e){const o=new ag(e),s=NR(ag.prototype.request,o);return An.extend(s,ag.prototype,o,{allOwnKeys:!0}),An.extend(s,o,null,{allOwnKeys:!0}),s.create=function(z){return xV(tg(e,z))},s}const md=xV(tb);md.Axios=ag,md.CanceledError=l2,md.CancelToken=Nft,md.isCancel=aV,md.VERSION=vV,md.toFormData=P5,md.AxiosError=vl,md.Cancel=md.CanceledError,md.all=function(e){return Promise.all(e)},md.spread=Dft,md.isAxiosError=Fft,md.mergeConfig=tg,md.AxiosHeaders=mp,md.formToJSON=e=>eV(An.isHTMLForm(e)?new FormData(e):e),md.getAdapter=gV.getAdapter,md.HttpStatusCode=tS,md.default=md;const Rft={class:"header-row controls-row"},Vft={class:"input-wrapper"},jft={class:"input-container"},Uft=["min","max"],Gft={class:"input-wrapper"},Hft={class:"input-container"},Zft=["min","max"],Wft={class:"timeline-container"},Xft={class:"team-circle team-circle-top"},qft=["src"],Yft={class:"team-circle team-circle-bottom"},Jft=["src"],$ft={class:"timeline-line"},Kft={key:0,class:"event-icon event-icon-top"},Qft={key:0,width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e0t={key:1,width:"23",height:"23",viewBox:"0 0 23 23",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t0t={key:2,width:"24",height:"24",viewBox:"0 0 48 48",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a0t={key:3,width:"24",height:"24",viewBox:"0 0 48 48",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r0t={class:"minute-ball minute-ball-center"},n0t={key:1,class:"event-icon event-icon-bottom"},i0t={key:0,width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o0t={key:1,width:"23",height:"23",viewBox:"0 0 23 23",fill:"none",xmlns:"http://www.w3.org/2000/svg"},s0t={key:2,width:"24",height:"24",viewBox:"0 0 48 48",fill:"none",xmlns:"http://www.w3.org/2000/svg"},l0t={key:3,width:"24",height:"24",viewBox:"0 0 48 48",fill:"none",xmlns:"http://www.w3.org/2000/svg"},c0t={width:"10",height:"6",viewBox:"0 0 12 8",style:{display:"block",margin:"0 auto",position:"relative",left:"-4.3px",top:"-5.5px"},fill:"#bfcf4c",xmlns:"http://www.w3.org/2000/svg"},u0t={width:"10",height:"6",viewBox:"0 0 12 8",style:{display:"block",margin:"0 auto",position:"relative",left:"-4.3px",top:"5.5px",transform:"rotate(180deg)"},fill:"#bfcf4c",xmlns:"http://www.w3.org/2000/svg"},d0t={width:"10",height:"6",viewBox:"0 0 12 8",style:{display:"block",margin:"0 auto",position:"relative",left:"-4.3px",top:"-5.5px"},fill:"#bfcf4c",xmlns:"http://www.w3.org/2000/svg"},h0t={width:"10",height:"6",viewBox:"0 0 12 8",style:{display:"block",margin:"0 auto",position:"relative",left:"-4.3px",top:"5.5px",transform:"rotate(180deg)"},fill:"#bfcf4c",xmlns:"http://www.w3.org/2000/svg"},p0t={__name:"TimeLine",props:{timelineWidth:{type:Number,required:!0,default:1010},gameId:{type:Number,required:!0},homeTeam:{type:Number,required:!0},awayTeam:{type:Number,required:!0},token:{type:String,required:!0}},emits:["range-change"],setup(e,{emit:o}){const s=t.ref(0),z=t.ref(96),W=t.ref("1"),v=t.ref("2"),g=t.ref(0),r=t.ref(45),b=t.ref(96),d=t.ref(0),a=t.ref(0),_=t.ref("0px"),y=t.ref([]),x=o,u=e,n=md.create({headers:{Authorization:`${u.token}`}}),i=t.ref([]);let f=null;const l=t.ref(null),h=t.ref(!1),m=t.ref(0),w=t.ref(0),T=t.ref(!1),A=t.ref(!1);let C=!1,I=0;const L=t.ref(0),E=t.ref(!1),P=t.ref(!1),M=t.ref(96),S=t.ref(null);function B(){if(S.value){const pe=S.value,ne=pe.scrollWidth-pe.clientWidth,le=pe.scrollLeft,ie=pe.scrollWidth>pe.clientWidth;T.value=ie&&le>0,A.value=ie&&Math.ceil(le)<Math.floor(ne)}}function k(){if(l.value){const pe=l.value.parentElement.clientWidth;m.value=pe,w.value===0&&(w.value=pe-90),t.nextTick(()=>{B()})}}function O(){if(i.value.length>0){const pe=Math.max(...i.value.map(ne=>ne.minute));M.value=pe,z.value=M.value}}async function D(){try{const pe=await n.get(`https://al2nv2dmkc.execute-api.us-west-2.amazonaws.com/prod/mxm/${u.gameId}`);if(pe.data&&pe.data.plays){const ne=pe.data.plays.find(ie=>{var me;return ie.event_type_id===6&&((me=ie.comments)==null?void 0:me.includes("El árbitro silba el Final del Primer Tiempo"))});ne&&(g.value=ne.minute);const le=Math.max(...pe.data.plays.map(ie=>ie.minute));b.value=le,M.value=le,z.value=M.value,y.value=[];for(let ie=0;ie<=g.value;ie++){const me=pe.data.plays.filter(ye=>{var ke;return ye.minute===ie&&ye.match_lapse===1&&(ye.category_id===9||ye.category_id===3||ye.event_type_id===1||ye.category_id===10||ye.category_id===13||ye.event_type_id===6&&((ke=ye.comments)==null?void 0:ke.includes("El árbitro silba el Final del Primer Tiempo")))}),ve=[];me.forEach(ye=>{ve.push({minute:ye.minute,minuteLabel:ye.event_type_id===6?"MT":ye.minute.toString(),icon:V(ye.event_type_id===1?ye.event_type_id:ye.category_id),team:ye.team_id===u.homeTeam?ye.category_id===13?"visitante":"local":ye.category_id===13?"local":"visitante",match_lapse:ye.match_lapse})}),y.value.push({minute:ie,match_lapse:1,event:ve.length>0?ve:null})}for(let ie=r.value;ie<=b.value;ie++){const me=pe.data.plays.filter(ye=>ye.minute===ie&&ye.match_lapse===2&&(ye.category_id===9||ye.category_id===3||ye.event_type_id===1||ye.category_id===10||ye.category_id===13)),ve=[];me.forEach(ye=>{ve.push({minute:ye.minute,minuteLabel:ye.event_type_id===6?"MT":ye.minute.toString(),icon:V(ye.event_type_id===1?ye.event_type_id:ye.category_id),team:ye.team_id===u.homeTeam?ye.category_id===13?"visitante":"local":ye.category_id===13?"local":"visitante",match_lapse:ye.match_lapse})}),y.value.push({minute:ie,match_lapse:2,event:ve.length>0?ve:null})}if(i.value=y.value.filter(ie=>ie.event!==null).map(ie=>ie.event),y.value.length>0){const ie=y.value.filter(ke=>ke.match_lapse===1);if(ie.length>0){const ke=ie[0];s.value=ke.minute,W.value="1",d.value=y.value.findIndex(Ee=>Ee.minute===ke.minute&&Ee.match_lapse===1)}const me=y.value.filter(ke=>ke.match_lapse===2);if(me.length>0){const ke=me[me.length-1];z.value=ke.minute,v.value="2",a.value=y.value.findIndex(Ee=>Ee.minute===ke.minute&&Ee.match_lapse===2)}const ve=y.value.findIndex(ke=>ke.minute===s.value&&ke.match_lapse===parseInt(W.value)),ye=y.value.findIndex(ke=>ke.minute===z.value&&ke.match_lapse===parseInt(v.value));if(ve!==-1&&ye!==-1&&ve<ye){const ke=y.value.length,Ee=ve/(ke-1)*(u.timelineWidth-40),Te=ye/(ke-1)*(u.timelineWidth-40);_.value=`${Te-Ee}px`}}}}catch(pe){console.error("Error al obtener los datos del partido:",pe)}}function V(pe){return{3:"icon-goal",1:"icon-goal",13:"icon-goal",10:"icon-change",9:"icon-red-card"}[pe]||""}t.onMounted(()=>{O(),k(),D(),t.nextTick(()=>{B()}),window.addEventListener("resize",()=>{k()})}),t.onBeforeUnmount(()=>{window.removeEventListener("resize",B)}),t.watch(i,()=>{t.nextTick(()=>{B()})},{deep:!0}),t.watch([s,z,W,v],()=>{ce()},{immediate:!0}),t.watch([W],()=>{if(!(P.value||h.value)){if(parseInt(W.value)>parseInt(v.value)&&(v.value=W.value,E.value=!0),E.value){if(W.value==="1"){const pe=y.value.filter(ne=>ne.match_lapse===1);if(pe.length>0){const ne=pe[0],le=pe[pe.length-1];(s.value<ne.minute||s.value>le.minute)&&(s.value=ne.minute);const ie=y.value.findIndex(me=>me.minute===s.value&&me.match_lapse===1);ie!==-1&&(d.value=ie)}}else if(W.value==="2"){const pe=y.value.filter(ne=>ne.match_lapse===2);if(pe.length>0){const ne=pe[0],le=pe[pe.length-1];(s.value<ne.minute||s.value>le.minute)&&(s.value=ne.minute);const ie=y.value.findIndex(me=>me.minute===s.value&&me.match_lapse===2);ie!==-1&&(d.value=ie)}}}else if(W.value==="1"){const pe=y.value.filter(ne=>ne.match_lapse===1);if(pe.length>0){const ne=pe[0];s.value=ne.minute;const le=y.value.findIndex(ie=>ie.minute===ne.minute&&ie.match_lapse===1);le!==-1&&(d.value=le)}}else if(W.value==="2"){const pe=y.value.filter(ne=>ne.match_lapse===2);if(pe.length>0){const ne=pe[0];s.value=ne.minute;const le=y.value.findIndex(ie=>ie.minute===ne.minute&&ie.match_lapse===2);le!==-1&&(d.value=le)}}E.value=!1,de()}},{immediate:!0}),t.watch([v],()=>{if(!(P.value||h.value)){if(parseInt(v.value)<parseInt(W.value)&&(W.value=v.value,E.value=!0),E.value){if(v.value==="1"){const pe=y.value.filter(ne=>ne.match_lapse===1);if(pe.length>0){const ne=pe[0],le=pe[pe.length-1];(z.value<ne.minute||z.value>le.minute)&&(z.value=le.minute);const ie=y.value.findIndex(me=>me.minute===z.value&&me.match_lapse===1);ie!==-1&&(a.value=ie)}}else if(v.value==="2"){const pe=y.value.filter(ne=>ne.match_lapse===2);if(pe.length>0){const ne=pe[0],le=pe[pe.length-1];(z.value<ne.minute||z.value>le.minute)&&(z.value=le.minute);const ie=y.value.findIndex(me=>me.minute===z.value&&me.match_lapse===2);ie!==-1&&(a.value=ie)}}}else if(v.value==="1"){const pe=y.value.filter(ne=>ne.match_lapse===1);if(pe.length>0){const ne=pe[pe.length-1];z.value=ne.minute;const le=y.value.findIndex(ie=>ie.minute===ne.minute&&ie.match_lapse===1);le!==-1&&(a.value=le)}}else if(v.value==="2"){const pe=y.value.filter(ne=>ne.match_lapse===2);if(pe.length>0){const ne=pe[pe.length-1];z.value=ne.minute;const le=y.value.findIndex(ie=>ie.minute===ne.minute&&ie.match_lapse===2);le!==-1&&(a.value=le)}}E.value=!1,de()}},{immediate:!0}),t.watch([s],()=>{if(!(P.value||h.value)){if(W.value==="1"){const pe=y.value.filter(ne=>ne.match_lapse===1);if(pe.length>0){const ne=pe[0],le=pe[pe.length-1];s.value<ne.minute?s.value=ne.minute:s.value>le.minute&&(s.value=le.minute);const ie=y.value.findIndex(me=>me.minute===s.value&&me.match_lapse===1);ie!==-1&&(d.value=ie)}}else if(W.value==="2"){const pe=y.value.filter(ne=>ne.match_lapse===2);if(pe.length>0){const ne=pe[0],le=pe[pe.length-1];s.value<ne.minute?s.value=ne.minute:s.value>le.minute&&(s.value=le.minute);const ie=y.value.findIndex(me=>me.minute===s.value&&me.match_lapse===2);ie!==-1&&(d.value=ie)}}if(W.value===v.value&&s.value>=z.value){if(v.value==="1"){const pe=y.value.filter(ne=>ne.match_lapse===1);if(pe.length>0){const ne=pe[pe.length-1];z.value=Math.min(ne.minute,s.value+1)}}else if(v.value==="2"){const pe=y.value.filter(ne=>ne.match_lapse===2);if(pe.length>0){const ne=pe[pe.length-1];z.value=Math.min(ne.minute,s.value+1)}}}de()}}),t.watch([z],()=>{if(!(P.value||h.value)){if(v.value==="1"){const pe=y.value.filter(ne=>ne.match_lapse===1);if(pe.length>0){const ne=pe[0],le=pe[pe.length-1];z.value<ne.minute?z.value=ne.minute:z.value>le.minute&&(z.value=le.minute);const ie=y.value.findIndex(me=>me.minute===z.value&&me.match_lapse===1);ie!==-1&&(a.value=ie)}}else if(v.value==="2"){const pe=y.value.filter(ne=>ne.match_lapse===2);if(pe.length>0){const ne=pe[0],le=pe[pe.length-1];z.value<ne.minute?z.value=ne.minute:z.value>le.minute&&(z.value=le.minute);const ie=y.value.findIndex(me=>me.minute===z.value&&me.match_lapse===2);ie!==-1&&(a.value=ie)}}if(W.value===v.value&&z.value<=s.value){if(W.value==="1"){const pe=y.value.filter(ne=>ne.match_lapse===1);if(pe.length>0){const ne=pe[0];s.value=Math.max(ne.minute,z.value-1)}}else if(W.value==="2"){const pe=y.value.filter(ne=>ne.match_lapse===2);if(pe.length>0){const ne=pe[0];s.value=Math.max(ne.minute,z.value-1)}}}de()}});function G(pe){const ne=y.value.length;return pe<0||ne===0||ne===1?"0px":`${pe/(ne-1)*(u.timelineWidth-40)}px`}function H(pe,ne){ne.preventDefault(),f=pe,I=ne.type.includes("touch")?ne.touches[0].clientX:ne.clientX,C=!1,pe==="left"?L.value=d.value:pe==="right"&&(L.value=a.value),document.addEventListener("mousemove",U),document.addEventListener("touchmove",U,{passive:!1}),document.addEventListener("mouseup",J),document.addEventListener("touchend",J),h.value=!0}function U(pe){if(!f)return;pe.preventDefault();const ne=pe.type.includes("touch")?pe.touches[0].clientX:pe.clientX;if(!C){if(Math.abs(ne-I)<5)return;C=!0}const le=Q(),ie=y.value.length,me=ne-I,ve=le/(ie-1),ye=Math.round(me/ve);let ke=L.value+ye;const Ee=Math.max(0,Math.min(ke,ie-1));if(f==="left"){const Be=y.value.findIndex(je=>je.minute===z.value&&je.match_lapse===parseInt(v.value));if(Ee>=Be-1)return;const Le=y.value[Ee];h.value=!0,d.value=Ee,s.value=Le.minute,W.value=Le.match_lapse.toString(),E.value=!0}else if(f==="right"){const Be=y.value.findIndex(je=>je.minute===s.value&&je.match_lapse===parseInt(W.value));if(Ee<=Be+1)return;const Le=y.value[Ee];h.value=!0,a.value=Ee,z.value=Le.minute,v.value=Le.match_lapse.toString(),E.value=!0}const Te=y.value.findIndex(Be=>Be.minute===s.value&&Be.match_lapse===parseInt(W.value)),Pe=y.value.findIndex(Be=>Be.minute===z.value&&Be.match_lapse===parseInt(v.value));if(Te!==-1&&Pe!==-1&&Te<Pe){const Be=y.value.length,Le=Te/(Be-1)*(u.timelineWidth-40),je=Pe/(Be-1)*(u.timelineWidth-40);_.value=`${je-Le}px`}t.nextTick(()=>{ce()})}function J(){f&&(s.value<0&&(s.value=0),z.value>M.value&&(z.value=M.value),t.nextTick(()=>{h.value=!1,E.value=!1}),ce()),f=null,document.removeEventListener("mousemove",U),document.removeEventListener("touchmove",U),document.removeEventListener("mouseup",J),document.removeEventListener("touchend",J)}function re(){if(s.value>0){P.value=!0;let pe=s.value-1,ne=!1,le=W.value;if(W.value==="1"){const me=y.value.filter(ve=>ve.match_lapse===1);if(me.length>0){const ve=me[0];pe<ve.minute&&(pe=ve.minute)}}else if(W.value==="2"){const me=y.value.filter(ve=>ve.match_lapse===2);if(me.length>0){const ve=me[0];if(pe<ve.minute){le="1",ne=!0;const ye=y.value.filter(ke=>ke.match_lapse===1);ye.length>0&&(pe=ye[ye.length-1].minute)}}}const ie=y.value.findIndex(me=>me.minute===pe&&me.match_lapse===parseInt(le));ie!==-1&&(d.value=ie,s.value=pe,ne&&(W.value=le,E.value=!0),de()),t.nextTick(()=>{P.value=!1})}}function q(){if(z.value<M.value){P.value=!0;let pe=z.value+1,ne=!1,le=v.value;if(le===W.value&&pe<=s.value){t.nextTick(()=>{P.value=!1});return}if(v.value==="1"){const me=y.value.filter(ve=>ve.match_lapse===1);if(me.length>0){const ve=me[me.length-1];if(pe>ve.minute){le="2",ne=!0;const ye=y.value.filter(ke=>ke.match_lapse===2);ye.length>0&&(pe=ye[0].minute)}}}else if(v.value==="2"){const me=y.value.filter(ve=>ve.match_lapse===2);if(me.length>0){const ve=me[me.length-1];pe>ve.minute&&(pe=ve.minute)}}if(parseInt(le)<parseInt(W.value)){if(W.value=le,E.value=!0,le==="1"){const me=y.value.filter(ve=>ve.match_lapse===1);if(me.length>0){const ve=me[0];s.value>pe&&(s.value=ve.minute)}}else if(le==="2"){const me=y.value.filter(ve=>ve.match_lapse===2);if(me.length>0){const ve=me[0];s.value>pe&&(s.value=ve.minute)}}}const ie=y.value.findIndex(me=>me.minute===pe&&me.match_lapse===parseInt(le));ie!==-1&&(a.value=ie,z.value=pe,ne&&(v.value=le,E.value=!0),de()),t.nextTick(()=>{P.value=!1})}}function ae(){let pe=!1,ne=z.value-1,le=v.value;if(!(le===W.value&&ne<=s.value)){if(v.value==="1"){const ie=y.value.filter(me=>me.match_lapse===1);if(ie.length>0){const me=ie[0];ne>=me.minute&&(pe=!0)}}else if(v.value==="2"){const ie=y.value.filter(me=>me.match_lapse===2);if(ie.length>0){const me=ie[0];if(ne>=me.minute)pe=!0;else{const ve=y.value.filter(ye=>ye.match_lapse===1);if(ve.length>0){const ye=ve[ve.length-1];le="1",ne=ye.minute,pe=!0}}}}if(pe){P.value=!0;let ie=!1;le!==v.value&&(ie=!0);const me=y.value.findIndex(ve=>ve.minute===ne&&ve.match_lapse===parseInt(le));me!==-1&&(a.value=me,z.value=ne,ie&&(v.value=le,E.value=!0),de()),t.nextTick(()=>{P.value=!1})}}}function ee(){const pe=document.querySelector(".timeline-scroll");if(pe){const ne=pe.scrollLeft,le=Math.max(0,ne-150);pe.scrollTo({left:le,behavior:"smooth"}),setTimeout(B,300)}}function $(){const pe=document.querySelector(".timeline-scroll");if(pe){const ne=pe.scrollLeft,le=pe.scrollWidth-pe.clientWidth,ie=Math.min(le,ne+150);pe.scrollTo({left:ie,behavior:"smooth"}),setTimeout(B,300)}}function Q(){return l.value?l.value.getBoundingClientRect().width:600}function ce(){const pe=s.value*60,ne=z.value*60;x("range-change",{start:{minutes:s.value,seconds:pe,time:W.value,match_lapse:parseInt(W.value)},end:{minutes:z.value,seconds:ne,time:v.value,match_lapse:parseInt(v.value)}})}function de(){const pe=y.value.findIndex(le=>le.minute===s.value&&le.match_lapse===parseInt(W.value)),ne=y.value.findIndex(le=>le.minute===z.value&&le.match_lapse===parseInt(v.value));if(pe!==-1&&ne!==-1&&pe<ne){const le=y.value.length,ie=pe/(le-1)*(u.timelineWidth-40),me=ne/(le-1)*(u.timelineWidth-40);_.value=`${me-ie}px`}}function he(){P.value=!0;let pe=s.value+1,ne=!1,le=W.value;if(le===v.value&&pe>=z.value){t.nextTick(()=>{P.value=!1});return}if(W.value==="1"){const me=y.value.filter(ve=>ve.match_lapse===1);if(me.length>0){const ve=me[me.length-1];if(pe>ve.minute){le="2",ne=!0;const ye=y.value.filter(ke=>ke.match_lapse===2);ye.length>0&&(pe=ye[0].minute)}}}else if(W.value==="2"){const me=y.value.filter(ve=>ve.match_lapse===2);if(me.length>0){const ve=me[me.length-1];pe>ve.minute&&(pe=ve.minute)}}if(parseInt(le)>parseInt(v.value)){if(v.value=le,E.value=!0,le==="1"){const me=y.value.filter(ve=>ve.match_lapse===1);if(me.length>0){const ve=me[me.length-1];z.value<pe&&(z.value=ve.minute)}}else if(le==="2"){const me=y.value.filter(ve=>ve.match_lapse===2);if(me.length>0){const ve=me[me.length-1];z.value<pe&&(z.value=ve.minute)}}}const ie=y.value.findIndex(me=>me.minute===pe&&me.match_lapse===parseInt(le));ie!==-1&&(d.value=ie,s.value=pe,ne&&(W.value=le,E.value=!0),de()),t.nextTick(()=>{P.value=!1})}return(pe,ne)=>{var le,ie,me,ve,ye,ke,Ee,Te;return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["timeline",{"is-dragging":h.value}]),ref_key:"timelineRef",ref:l,style:t.normalizeStyle({width:`${m.value}px`})},[t.createElementVNode("div",{class:t.normalizeClass(["timeline-header responsive-header",{"small-screen":m.value<470,"very-small-screen":m.value<420,"extra-small-screen":m.value<370,"mobile-column":m.value<500,"tablet-layout":m.value<800,"mobile-layout":m.value<580}])},[ne[21]||(ne[21]=t.createElementVNode("div",{class:"header-row"},[t.createElementVNode("span",{class:"header-title"},"Considerar eventos del ")],-1)),t.createElementVNode("div",Rft,[t.withDirectives(t.createElementVNode("select",{"onUpdate:modelValue":ne[0]||(ne[0]=Pe=>W.value=Pe),class:"time-select"},[...ne[12]||(ne[12]=[t.createElementVNode("option",{value:"1"},"Primer tiempo",-1),t.createElementVNode("option",{value:"2"},"Segundo tiempo",-1)])],512),[[t.vModelSelect,W.value]]),t.createElementVNode("div",Vft,[t.createElementVNode("div",jft,[ne[15]||(ne[15]=t.createElementVNode("span",{class:"input-label"},"min",-1)),t.withDirectives(t.createElementVNode("input",{type:"number","onUpdate:modelValue":ne[1]||(ne[1]=Pe=>s.value=Pe),readonly:"",min:W.value==="1"?((le=y.value.filter(Pe=>Pe.match_lapse===1)[0])==null?void 0:le.minute)||0:((ie=y.value.filter(Pe=>Pe.match_lapse===2)[0])==null?void 0:ie.minute)||45,max:W.value==="1"?((me=y.value.filter(Pe=>Pe.match_lapse===1).slice(-1)[0])==null?void 0:me.minute)||45:((ve=y.value.filter(Pe=>Pe.match_lapse===2).slice(-1)[0])==null?void 0:ve.minute)||96},null,8,Uft),[[t.vModelText,s.value]]),t.createElementVNode("div",{class:"input-arrows"},[t.createElementVNode("button",{class:"arrow-up",onClick:he},[...ne[13]||(ne[13]=[t.createElementVNode("svg",{width:"10",height:"6",viewBox:"0 0 10 6",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t.createElementVNode("path",{d:"M1 5L5 1L9 5",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])]),t.createElementVNode("button",{class:"arrow-down",onClick:re},[...ne[14]||(ne[14]=[t.createElementVNode("svg",{width:"10",height:"6",viewBox:"0 0 10 6",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t.createElementVNode("path",{d:"M1 1L5 5L9 1",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])])])])]),ne[20]||(ne[20]=t.createElementVNode("span",{class:"to-text"},"al",-1)),t.withDirectives(t.createElementVNode("select",{"onUpdate:modelValue":ne[2]||(ne[2]=Pe=>v.value=Pe),class:"time-select"},[...ne[16]||(ne[16]=[t.createElementVNode("option",{value:"1"},"Primer tiempo",-1),t.createElementVNode("option",{value:"2"},"Segundo tiempo",-1)])],512),[[t.vModelSelect,v.value]]),t.createElementVNode("div",Gft,[t.createElementVNode("div",Hft,[ne[19]||(ne[19]=t.createElementVNode("span",{class:"input-label"},"min",-1)),t.withDirectives(t.createElementVNode("input",{type:"number","onUpdate:modelValue":ne[3]||(ne[3]=Pe=>z.value=Pe),readonly:"",min:v.value==="1"?((ye=y.value.filter(Pe=>Pe.match_lapse===1)[0])==null?void 0:ye.minute)||0:((ke=y.value.filter(Pe=>Pe.match_lapse===2)[0])==null?void 0:ke.minute)||45,max:v.value==="1"?((Ee=y.value.filter(Pe=>Pe.match_lapse===1).slice(-1)[0])==null?void 0:Ee.minute)||45:((Te=y.value.filter(Pe=>Pe.match_lapse===2).slice(-1)[0])==null?void 0:Te.minute)||96},null,8,Zft),[[t.vModelText,z.value]]),t.createElementVNode("div",{class:"input-arrows"},[t.createElementVNode("button",{class:"arrow-up",onClick:q},[...ne[17]||(ne[17]=[t.createElementVNode("svg",{width:"10",height:"6",viewBox:"0 0 10 6",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t.createElementVNode("path",{d:"M1 5L5 1L9 5",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])]),t.createElementVNode("button",{class:"arrow-down",onClick:ae},[...ne[18]||(ne[18]=[t.createElementVNode("svg",{width:"10",height:"6",viewBox:"0 0 10 6",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t.createElementVNode("path",{d:"M1 1L5 5L9 1",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])])])])])])],2),t.createElementVNode("div",Wft,[t.withDirectives(t.createElementVNode("button",{class:"scroll-arrow scroll-left",onClick:ee},[...ne[22]||(ne[22]=[t.createElementVNode("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none"},[t.createElementVNode("path",{d:"M15 18L9 12L15 6",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])],512),[[t.vShow,T.value]]),t.createElementVNode("div",{class:"timeline-scroll",ref_key:"scrollContainer",ref:S,onScroll:B},[t.createElementVNode("div",{class:t.normalizeClass(["timeline-bar",{"has-scroll":T.value||A.value}]),style:t.normalizeStyle({width:`${e.timelineWidth}px`})},[t.createElementVNode("div",Xft,[t.createElementVNode("img",{src:`https://golstatsimages.blob.core.windows.net/teams-80/${u.homeTeam}.png`,alt:"Equipo local"},null,8,qft)]),t.createElementVNode("div",Yft,[t.createElementVNode("img",{src:`https://golstatsimages.blob.core.windows.net/teams-80/${u.awayTeam}.png`,alt:"Equipo visitante"},null,8,Jft)]),t.createElementVNode("div",$ft,[ne[38]||(ne[38]=t.createElementVNode("div",{class:"line"},null,-1)),t.createElementVNode("span",{class:"minute-ball minute-ball-initial minute-ball-center",style:t.normalizeStyle({left:G(0)})},"0'",4),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(y.value,(Pe,Be)=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(Pe.event,(Le,je)=>(t.openBlock(),t.createElementBlock("div",{key:"event-"+Be+"-"+je,class:"event",style:t.normalizeStyle({left:G(je===0?Be-1.5:Be-1.5+je*.3)})},[(Le==null?void 0:Le.team)==="local"?(t.openBlock(),t.createElementBlock("span",Kft,[(Le==null?void 0:Le.icon)==="icon-yellow-card"?(t.openBlock(),t.createElementBlock("svg",Qft,[...ne[23]||(ne[23]=[t.createElementVNode("rect",{x:"0.507812",y:"0.375488",width:"22.7873",height:"22.8364",rx:"11.3937",fill:"none"},null,-1),t.createElementVNode("rect",{x:"8",y:"7",width:"6.8362",height:"9.13458",rx:"2.28119",fill:"#F7C330"},null,-1)])])):(Le==null?void 0:Le.icon)==="icon-red-card"?(t.openBlock(),t.createElementBlock("svg",e0t,[...ne[24]||(ne[24]=[t.createElementVNode("rect",{width:"22.7873",height:"22.8364",rx:"11.3937",fill:"none"},null,-1),t.createElementVNode("rect",{x:"8",y:"7",width:"6.8362",height:"9.13458",rx:"2.28119",fill:"#E5152D"},null,-1)])])):(Le==null?void 0:Le.icon)==="icon-goal"?(t.openBlock(),t.createElementBlock("svg",t0t,[...ne[25]||(ne[25]=[t.createStaticVNode('<circle fill="none" cx="24" cy="24" r="24" data-v-e9ea1aeb></circle><ellipse fill="none" cx="24" cy="24" rx="14.82" ry="14.85" data-v-e9ea1aeb></ellipse><path fill="#fff" d="M24.03,36.05c-6.65,0-12.05-5.41-12.05-12.05s5.41-12.05,12.05-12.05,12.05,5.41,12.05,12.05-5.41,12.05-12.05,12.05Zm0-23.1c-6.1,0-11.05,4.96-11.05,11.05s4.96,11.05,11.05,11.05,11.05-4.96,11.05-11.05-4.96-11.05-11.05-11.05Z" data-v-e9ea1aeb></path><path fill="#fff" d="M27.22,29.38h-6.35c-.22,0-.41-.14-.48-.35l-1.96-6.06c-.07-.21,0-.43,.18-.56l5.14-3.74c.18-.13,.41-.13,.59,0l5.14,3.74c.17,.13,.25,.35,.18,.56l-1.96,6.06c-.07,.21-.26,.35-.48,.35Zm-5.99-1h5.62l1.74-5.37-4.55-3.32-4.55,3.32,1.74,5.37Z" data-v-e9ea1aeb></path><path fill="#fff" d="M24.06,15.71c-.07,0-.13-.01-.2-.04l-4.38-1.87c-.25-.11-.37-.4-.26-.66,.11-.25,.4-.37,.66-.26l4.18,1.78,4.18-1.78c.25-.11,.55,0,.66,.26,.11,.25,0,.55-.26,.66l-4.38,1.87c-.06,.03-.13,.04-.2,.04Z" data-v-e9ea1aeb></path><path fill="#fff" d="M12.62,25.37c-.12,0-.23-.04-.33-.12-.21-.18-.23-.5-.05-.71l2.99-3.44-.4-4.54c-.02-.27,.18-.52,.45-.54,.27-.03,.52,.18,.54,.45l.42,4.75c.01,.14-.03,.27-.12,.37l-3.12,3.6c-.1,.11-.24,.17-.38,.17Z" data-v-e9ea1aeb></path><path fill="#fff" d="M21.37,35.66c-.17,0-.34-.09-.43-.24l-2.34-3.91-4.43-1.02c-.27-.06-.44-.33-.38-.6s.33-.44,.6-.38l4.64,1.07c.13,.03,.25,.11,.32,.23l2.45,4.09c.14,.24,.06,.54-.17,.69-.08,.05-.17,.07-.26,.07Z" data-v-e9ea1aeb></path><path fill="#fff" d="M26.75,35.66c-.09,0-.18-.02-.26-.07-.24-.14-.31-.45-.17-.69l2.44-4.09c.07-.12,.18-.2,.32-.23l4.63-1.07c.27-.06,.54,.11,.6,.38s-.11,.54-.38,.6l-4.43,1.02-2.33,3.91c-.09,.16-.26,.24-.43,.24Z" data-v-e9ea1aeb></path><path fill="#fff" d="M35.5,25.37c-.14,0-.28-.06-.38-.17l-3.13-3.6c-.09-.1-.13-.24-.12-.37l.42-4.75c.02-.27,.27-.48,.54-.45,.28,.02,.48,.27,.45,.54l-.4,4.54,2.99,3.44c.18,.21,.16,.52-.05,.71-.09,.08-.21,.12-.33,.12Z" data-v-e9ea1aeb></path><path fill="#fff" d="M24.05,19.58c-.28,0-.5-.22-.5-.5v-3.87c0-.28,.22-.5,.5-.5s.5,.22,.5,.5v3.87c0,.28-.22,.5-.5,.5Z" data-v-e9ea1aeb></path><path fill="#fff" d="M29.21,23.47c-.18,0-.35-.1-.44-.26-.13-.24-.04-.55,.2-.68l3.17-1.7c.25-.13,.55-.04,.68,.2,.13,.24,.04,.55-.2,.68l-3.17,1.7c-.08,.04-.16,.06-.24,.06Z" data-v-e9ea1aeb></path><path fill="#fff" d="M29.2,31.57c-.14,0-.27-.06-.37-.17l-1.96-2.19c-.18-.21-.17-.52,.04-.71,.21-.18,.52-.17,.71,.04l1.96,2.19c.18,.21,.17,.52-.04,.71-.1,.09-.21,.13-.33,.13Z" data-v-e9ea1aeb></path><path fill="#fff" d="M18.91,31.57c-.12,0-.24-.04-.33-.13-.21-.18-.22-.5-.04-.71l1.96-2.19c.19-.21,.5-.22,.71-.04,.21,.18,.22,.5,.04,.71l-1.96,2.19c-.1,.11-.24,.17-.37,.17Z" data-v-e9ea1aeb></path><path fill="#fff" d="M18.93,23.32c-.07,0-.15-.02-.22-.05l-3.17-1.55c-.25-.12-.35-.42-.23-.67,.12-.25,.42-.35,.67-.23l3.17,1.55c.25,.12,.35,.42,.23,.67-.09,.18-.26,.28-.45,.28Z" data-v-e9ea1aeb></path>',14)])])):(Le==null?void 0:Le.icon)==="icon-change"?(t.openBlock(),t.createElementBlock("svg",a0t,[...ne[26]||(ne[26]=[t.createStaticVNode('<circle fill="none" cx="24" cy="24" r="24" data-v-e9ea1aeb></circle><path fill="#fff" d="M31.62,23.86c-.19,0-.37-.07-.52-.21-.3-.29-.31-.76-.03-1.06l2.89-3.04-2.89-3.04c-.29-.3-.27-.77,.03-1.06,.3-.29,.77-.27,1.06,.03l3.39,3.56c.28,.29,.28,.74,0,1.03l-3.39,3.56c-.15,.15-.34,.23-.54,.23Z" data-v-e9ea1aeb></path><path fill="#fff" d="M34.99,20.31H16.37c-.41,0-.75-.34-.75-.75s.34-.75,.75-.75h18.62c.41,0,.75,.34,.75,.75s-.34,.75-.75,.75Z" data-v-e9ea1aeb></path><path fill="#fff" d="M16.38,32.75c-.2,0-.4-.08-.54-.23l-3.38-3.56c-.28-.29-.28-.74,0-1.03l3.38-3.56c.28-.3,.76-.31,1.06-.03,.3,.29,.31,.76,.03,1.06l-2.89,3.04,2.89,3.04c.29,.3,.27,.78-.03,1.06-.15,.14-.33,.21-.52,.21Z" data-v-e9ea1aeb></path><path fill="#fff" d="M31.62,29.19H13c-.41,0-.75-.34-.75-.75s.34-.75,.75-.75H31.62c.41,0,.75,.34,.75,.75s-.34,.75-.75,.75Z" data-v-e9ea1aeb></path>',5)])])):(t.openBlock(),t.createElementBlock("span",{key:4,class:t.normalizeClass(Le==null?void 0:Le.icon)},null,2))])):t.createCommentVNode("",!0),t.createElementVNode("span",r0t,t.toDisplayString((Le==null?void 0:Le.minuteLabel)||Pe.minute)+"'",1),(Le==null?void 0:Le.team)==="visitante"?(t.openBlock(),t.createElementBlock("span",n0t,[(Le==null?void 0:Le.icon)==="icon-yellow-card"?(t.openBlock(),t.createElementBlock("svg",i0t,[...ne[27]||(ne[27]=[t.createElementVNode("rect",{x:"0.507812",y:"0.375488",width:"22.7873",height:"22.8364",rx:"11.3937",fill:"none"},null,-1),t.createElementVNode("rect",{x:"8",y:"7",width:"6.8362",height:"9.13458",rx:"2.28119",fill:"#F7C330"},null,-1)])])):(Le==null?void 0:Le.icon)==="icon-red-card"?(t.openBlock(),t.createElementBlock("svg",o0t,[...ne[28]||(ne[28]=[t.createElementVNode("rect",{width:"22.7873",height:"22.8364",rx:"11.3937",fill:"none"},null,-1),t.createElementVNode("rect",{x:"8",y:"7",width:"6.8362",height:"9.13458",rx:"2.28119",fill:"#E5152D"},null,-1)])])):(Le==null?void 0:Le.icon)==="icon-goal"?(t.openBlock(),t.createElementBlock("svg",s0t,[...ne[29]||(ne[29]=[t.createStaticVNode('<circle fill="none" cx="24" cy="24" r="24" data-v-e9ea1aeb></circle><ellipse fill="none" cx="24" cy="24" rx="14.82" ry="14.85" data-v-e9ea1aeb></ellipse><path fill="#fff" d="M24.03,36.05c-6.65,0-12.05-5.41-12.05-12.05s5.41-12.05,12.05-12.05,12.05,5.41,12.05,12.05-5.41,12.05-12.05,12.05Zm0-23.1c-6.1,0-11.05,4.96-11.05,11.05s4.96,11.05,11.05,11.05,11.05-4.96,11.05-11.05-4.96-11.05-11.05-11.05Z" data-v-e9ea1aeb></path><path fill="#fff" d="M27.22,29.38h-6.35c-.22,0-.41-.14-.48-.35l-1.96-6.06c-.07-.21,0-.43,.18-.56l5.14-3.74c.18-.13,.41-.13,.59,0l5.14,3.74c.17,.13,.25,.35,.18,.56l-1.96,6.06c-.07,.21-.26,.35-.48,.35Zm-5.99-1h5.62l1.74-5.37-4.55-3.32-4.55,3.32,1.74,5.37Z" data-v-e9ea1aeb></path><path fill="#fff" d="M24.06,15.71c-.07,0-.13-.01-.2-.04l-4.38-1.87c-.25-.11-.37-.4-.26-.66,.11-.25,.4-.37,.66-.26l4.18,1.78,4.18-1.78c.25-.11,.55,0,.66,.26,.11,.25,0,.55-.26,.66l-4.38,1.87c-.06,.03-.13,.04-.2,.04Z" data-v-e9ea1aeb></path><path fill="#fff" d="M12.62,25.37c-.12,0-.23-.04-.33-.12-.21-.18-.23-.5-.05-.71l2.99-3.44-.4-4.54c-.02-.27,.18-.52,.45-.54,.27-.03,.52,.18,.54,.45l.42,4.75c.01,.14-.03,.27-.12,.37l-3.12,3.6c-.1,.11-.24,.17-.38,.17Z" data-v-e9ea1aeb></path><path fill="#fff" d="M21.37,35.66c-.17,0-.34-.09-.43-.24l-2.34-3.91-4.43-1.02c-.27-.06-.44-.33-.38-.6s.33-.44,.6-.38l4.64,1.07c.13,.03,.25,.11,.32,.23l2.45,4.09c.14,.24,.06,.54-.17,.69-.08,.05-.17,.07-.26,.07Z" data-v-e9ea1aeb></path><path fill="#fff" d="M26.75,35.66c-.09,0-.18-.02-.26-.07-.24-.14-.31-.45-.17-.69l2.44-4.09c.07-.12,.18-.2,.32-.23l4.63-1.07c.27-.06,.54,.11,.6,.38s-.11,.54-.38,.6l-4.43,1.02-2.33,3.91c-.09,.16-.26,.24-.43,.24Z" data-v-e9ea1aeb></path><path fill="#fff" d="M35.5,25.37c-.14,0-.28-.06-.38-.17l-3.13-3.6c-.09-.1-.13-.24-.12-.37l.42-4.75c.02-.27,.27-.48,.54-.45,.28,.02,.48,.27,.45,.54l-.4,4.54,2.99,3.44c.18,.21,.16,.52-.05,.71-.09,.08-.21,.12-.33,.12Z" data-v-e9ea1aeb></path><path fill="#fff" d="M24.05,19.58c-.28,0-.5-.22-.5-.5v-3.87c0-.28,.22-.5,.5-.5s.5,.22,.5,.5v3.87c0,.28-.22,.5-.5,.5Z" data-v-e9ea1aeb></path><path fill="#fff" d="M29.21,23.47c-.18,0-.35-.1-.44-.26-.13-.24-.04-.55,.2-.68l3.17-1.7c.25-.13,.55-.04,.68,.2,.13,.24,.04,.55-.2,.68l-3.17,1.7c-.08,.04-.16,.06-.24,.06Z" data-v-e9ea1aeb></path><path fill="#fff" d="M29.2,31.57c-.14,0-.27-.06-.37-.17l-1.96-2.19c-.18-.21-.17-.52,.04-.71,.21-.18,.52-.17,.71,.04l1.96,2.19c.18,.21,.17,.52-.04,.71-.1,.09-.21,.13-.33,.13Z" data-v-e9ea1aeb></path><path fill="#fff" d="M18.91,31.57c-.12,0-.24-.04-.33-.13-.21-.18-.22-.5-.04-.71l1.96-2.19c.19-.21,.5-.22,.71-.04,.21,.18,.22,.5,.04,.71l-1.96,2.19c-.1,.11-.24,.17-.37,.17Z" data-v-e9ea1aeb></path><path fill="#fff" d="M18.93,23.32c-.07,0-.15-.02-.22-.05l-3.17-1.55c-.25-.12-.35-.42-.23-.67,.12-.25,.42-.35,.67-.23l3.17,1.55c.25,.12,.35,.42,.23,.67-.09,.18-.26,.28-.45,.28Z" data-v-e9ea1aeb></path>',14)])])):(Le==null?void 0:Le.icon)==="icon-change"?(t.openBlock(),t.createElementBlock("svg",l0t,[...ne[30]||(ne[30]=[t.createStaticVNode('<circle fill="none" cx="24" cy="24" r="24" data-v-e9ea1aeb></circle><path fill="#fff" d="M31.62,23.86c-.19,0-.37-.07-.52-.21-.3-.29-.31-.76-.03-1.06l2.89-3.04-2.89-3.04c-.29-.3-.27-.77,.03-1.06,.3-.29,.77-.27,1.06,.03l3.39,3.56c.28,.29,.28,.74,0,1.03l-3.39,3.56c-.15,.15-.34,.23-.54,.23Z" data-v-e9ea1aeb></path><path fill="#fff" d="M34.99,20.31H16.37c-.41,0-.75-.34-.75-.75s.34-.75,.75-.75h18.62c.41,0,.75,.34,.75,.75s-.34,.75-.75,.75Z" data-v-e9ea1aeb></path><path fill="#fff" d="M16.38,32.75c-.2,0-.4-.08-.54-.23l-3.38-3.56c-.28-.29-.28-.74,0-1.03l3.38-3.56c.28-.3,.76-.31,1.06-.03,.3,.29,.31,.76,.03,1.06l-2.89,3.04,2.89,3.04c.29,.3,.27,.78-.03,1.06-.15,.14-.33,.21-.52,.21Z" data-v-e9ea1aeb></path><path fill="#fff" d="M31.62,29.19H13c-.41,0-.75-.34-.75-.75s.34-.75,.75-.75H31.62c.41,0,.75,.34,.75,.75s-.34,.75-.75,.75Z" data-v-e9ea1aeb></path>',5)])])):(t.openBlock(),t.createElementBlock("span",{key:4,class:t.normalizeClass(Le==null?void 0:Le.icon)},null,2))])):t.createCommentVNode("",!0)],4))),128))],64))),256)),t.createElementVNode("span",{class:"minute-ball minute-ball-edge minute-ball-center",style:t.normalizeStyle({left:G(y.value.length-1)})},t.toDisplayString(b.value)+"'",5),t.createElementVNode("div",{class:"range-indicator",style:t.normalizeStyle({left:G(d.value),width:_.value})},[t.createElementVNode("div",{class:"handle left",onMousedown:ne[4]||(ne[4]=Pe=>H("left",Pe)),onTouchstart:ne[5]||(ne[5]=Pe=>H("left",Pe))},[(t.openBlock(),t.createElementBlock("svg",c0t,[...ne[31]||(ne[31]=[t.createElementVNode("polygon",{points:"6,8 0,0 12,0"},null,-1)])])),ne[33]||(ne[33]=t.createElementVNode("div",{style:{flex:"1"}},null,-1)),(t.openBlock(),t.createElementBlock("svg",u0t,[...ne[32]||(ne[32]=[t.createElementVNode("polygon",{points:"6,8 0,0 12,0"},null,-1)])]))],32),t.createElementVNode("span",{class:"range-dot range-dot-left",onMousedown:ne[6]||(ne[6]=Pe=>H("left",Pe)),onTouchstart:ne[7]||(ne[7]=Pe=>H("left",Pe))},null,32),ne[37]||(ne[37]=t.createElementVNode("div",{class:"range-line"},null,-1)),t.createElementVNode("span",{class:"range-dot range-dot-right",onMousedown:ne[8]||(ne[8]=Pe=>H("right",Pe)),onTouchstart:ne[9]||(ne[9]=Pe=>H("right",Pe))},null,32),t.createElementVNode("div",{class:"handle right",onMousedown:ne[10]||(ne[10]=Pe=>H("right",Pe)),onTouchstart:ne[11]||(ne[11]=Pe=>H("right",Pe))},[(t.openBlock(),t.createElementBlock("svg",d0t,[...ne[34]||(ne[34]=[t.createElementVNode("polygon",{points:"6,8 0,0 12,0"},null,-1)])])),ne[36]||(ne[36]=t.createElementVNode("div",{style:{flex:"1"}},null,-1)),(t.openBlock(),t.createElementBlock("svg",h0t,[...ne[35]||(ne[35]=[t.createElementVNode("polygon",{points:"6,8 0,0 12,0"},null,-1)])]))],32)],4)])],6)],544),t.withDirectives(t.createElementVNode("button",{class:"scroll-arrow scroll-right",onClick:$},[...ne[39]||(ne[39]=[t.createElementVNode("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none"},[t.createElementVNode("path",{d:"M9 6L15 12L9 18",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])],512),[[t.vShow,A.value]])])],6)}}},_V=du(p0t,[["__scopeId","data-v-e9ea1aeb"]]),f0t={class:"expandible-timeline"},m0t={class:"expandible-timeline__content"},g0t={__name:"ExpandibleTimeline",props:{game:{type:Object,default:()=>({gameId:0,homeTeam:{team_id:0},awayTeam:{team_id:0}})},token:{type:String,default:""}},emits:["range-change"],setup(e,{emit:o}){const s=o;function z(W){s("range-change",W)}return(W,v)=>(t.openBlock(),t.createElementBlock("div",f0t,[t.createVNode($v,{"header-text":"Timeline de eventos","border-radius":"8px",onToggle:v[0]||(v[0]=g=>W.$emit("toggle"))},{default:t.withCtx(()=>[t.createElementVNode("div",m0t,[t.createVNode(_V,{"timeline-width":539,"game-id":e.game.gameId,"home-team":e.game.homeTeam.team_id,"away-team":e.game.awayTeam.team_id,token:e.token,onRangeChange:z},null,8,["game-id","home-team","away-team","token"])])]),_:1})]))}},y0t=du(g0t,[["__scopeId","data-v-be176377"]]),v0t={class:"filter-shadows-filters"},b0t={class:"filter-shadows-filters__timeline"},x0t={class:"filter-shadows-filters__filters"},_0t={__name:"FilterShadowsFilters",props:{game:{type:Object,default:()=>({gameId:0,homeTeam:{team_id:0},awayTeam:{team_id:0}})},selectedTeamTab:{type:Number,default:0},token:{type:String,default:""}},emits:["handleShadowsPossessionChange","handleShadowsExcludedFirstSecondsChange","handleShadowsExcludedLastSecondsChange","handleShadowsChainInitialZonesChange","handleShadowsChainFinalZonesChange","handleShadowsBallInterestZonesChange","handleShadowsDurationChange","range-change"],setup(e,{emit:o}){const s=o,z=_=>{s("handleShadowsPossessionChange",_)},W=(_,y)=>{s("handleShadowsDurationChange",_,y)},v=_=>{s("handleShadowsExcludedFirstSecondsChange",_)},g=_=>{s("handleShadowsExcludedLastSecondsChange",_)},r=_=>{s("handleShadowsChainInitialZonesChange",_)},b=_=>{s("handleShadowsChainFinalZonesChange",_)},d=_=>{s("handleShadowsBallInterestZonesChange",_)},a=_=>{s("range-change",_)};return(_,y)=>(t.openBlock(),t.createElementBlock("div",v0t,[t.createElementVNode("div",b0t,[t.createVNode(y0t,{token:e.token,game:e.game,onRangeChange:a},null,8,["token","game"])]),t.createElementVNode("div",x0t,[t.withDirectives(t.createVNode(T5,{"team-id":e.game.homeTeam.team_id,"is-shadows":!0,game:e.game,onChangePossession:z,onChangeDuration:W,onChangeExcludedFirstSeconds:v,onChangeExcludedLastSeconds:g,onChangeChainInitialZones:r,onChangeChainFinalZones:b,onChangeBallInterestZones:d},null,8,["team-id","game"]),[[t.vShow,e.selectedTeamTab===e.game.homeTeam.team_id]]),t.withDirectives(t.createVNode(T5,{"team-id":e.game.awayTeam.team_id,"is-shadows":!0,game:e.game,onChangePossession:z,onChangeDuration:W,onChangeExcludedFirstSeconds:v,onChangeExcludedLastSeconds:g,onChangeChainInitialZones:r,onChangeChainFinalZones:b,onChangeBallInterestZones:d},null,8,["team-id","game"]),[[t.vShow,e.selectedTeamTab===e.game.awayTeam.team_id]])])]))}},wV=du(_0t,[["__scopeId","data-v-f148e6b3"]]),w0t={class:"filter-events"},k0t={class:"events-section"},S0t={class:"section-header"},T0t={class:"all-toggle"},C0t={class:"events-list"},E0t={class:"events-section"},A0t={class:"section-header"},M0t={class:"events-list"},P0t={__name:"FilterEventsShadows",props:{startedCategories:{type:Array,default:()=>[]},endedCategories:{type:Array,default:()=>[]},allStartEventsSelected:{type:Boolean,default:!1},allEndEventsSelected:{type:Boolean,default:!1}},emits:["toggle-all-start-events","toggle-all-end-events","update-start-event","update-end-event"],setup(e,{emit:o}){const s=o,z=e,W=t.ref(z.allStartEventsSelected),v=t.ref(z.allEndEventsSelected);t.watch(()=>z.allStartEventsSelected,a=>{W.value=a},{immediate:!0}),t.watch(()=>z.allEndEventsSelected,a=>{v.value=a},{immediate:!0});function g(a){W.value=a,s("toggle-all-start-events",a)}function r(a){v.value=a,s("toggle-all-end-events",a)}function b(a,_){s("update-start-event",a,_)}function d(a,_){s("update-end-event",a,_)}return(a,_)=>(t.openBlock(),t.createElementBlock("div",w0t,[t.createElementVNode("div",k0t,[t.createElementVNode("div",S0t,[_[0]||(_[0]=t.createElementVNode("span",{class:"section-title"},"Jugadas que empiezan con:",-1)),t.createElementVNode("label",T0t,[t.createVNode(t.unref(pp),{label:"Todas","box-position":"right","model-value":W.value,"onUpdate:modelValue":g},null,8,["model-value"])])]),t.createElementVNode("div",C0t,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(z.startedCategories,y=>(t.openBlock(),t.createElementBlock("div",{key:y.id,class:"category-item"},[t.createVNode(t.unref(pp),{"model-value":y.isSelected,label:y.name,"onUpdate:modelValue":x=>b(x,y)},null,8,["model-value","label","onUpdate:modelValue"])]))),128))])]),t.createElementVNode("div",E0t,[t.createElementVNode("div",A0t,[_[1]||(_[1]=t.createElementVNode("span",{class:"section-title"},"Jugadas que terminan con:",-1)),t.createVNode(t.unref(pp),{label:"Todas","box-position":"right","model-value":v.value,"onUpdate:modelValue":r},null,8,["model-value"])]),t.createElementVNode("div",M0t,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(z.endedCategories,y=>(t.openBlock(),t.createElementBlock("div",{key:y.id,class:"category-item"},[t.createVNode(t.unref(pp),{"model-value":y.isSelected,label:y.name,"onUpdate:modelValue":x=>d(x,y)},null,8,["model-value","label","onUpdate:modelValue"])]))),128))])])]))}},kV=du(P0t,[["__scopeId","data-v-4232de5a"]]),I0t={class:"expandible-players"},L0t={class:"expandible-players__list"},B0t={class:"all-players list-item"},O0t={class:"player-item__checkbox"},z0t={class:"player-item__photo"},N0t=["src"],D0t={class:"player-item__info"},F0t={class:"player-item__info__name"},R0t={class:"player-item__info__secondary-info"},V0t={class:"player-item__info__secondary-info__nationality"},j0t=["src"],U0t={class:"player-item__info__secondary-info__position"},G0t={__name:"ExpandiblePlayers",props:{players:{type:Array,default:()=>[]},arePlayersTitular:{type:Boolean,default:!1}},setup(e){const o=e,s=t.computed(()=>o.arePlayersTitular?"Titulares:":"Cambios:"),z=t.computed(()=>`Todos los ${s.value.toLowerCase()}`);function W(v){v?o.players.forEach(g=>{g.isSelected=!0}):o.players.forEach((g,r)=>{g.isSelected=r===0})}return(v,g)=>(t.openBlock(),t.createElementBlock("div",I0t,[t.createVNode($v,{"border-radius":"8px","header-text":s.value,onToggle:g[0]||(g[0]=r=>v.$emit("toggle"))},{default:t.withCtx(()=>[t.createElementVNode("div",L0t,[t.createElementVNode("div",B0t,[t.createVNode(t.unref(pp),{"model-value":o.players.every(r=>r.isSelected),label:z.value,"onUpdate:modelValue":W},null,8,["model-value","label"])]),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.players,r=>(t.openBlock(),t.createElementBlock("div",{key:r.player_id,class:"list-item player-item"},[t.createElementVNode("div",O0t,[t.createVNode(t.unref(pp),{modelValue:r.isSelected,"onUpdate:modelValue":b=>r.isSelected=b},null,8,["modelValue","onUpdate:modelValue"])]),t.createElementVNode("div",z0t,[t.createElementVNode("img",{src:r.player_photo||r.photo},null,8,N0t)]),t.createElementVNode("div",D0t,[t.createElementVNode("div",F0t,t.toDisplayString(r.short_name||r.name||r.player_name),1),t.createElementVNode("div",R0t,[t.createElementVNode("div",V0t,[t.createElementVNode("img",{src:r.player_country_flag||r.nationality_photo||r.countryFlag},null,8,j0t)]),t.createElementVNode("div",U0t,t.toDisplayString(r.positionName||r.position_name||r.position),1)])])]))),128))])]),_:1},8,["header-text"])]))}},SV=du(G0t,[["__scopeId","data-v-bb8595b9"]]),H0t={class:"filter-players"},Z0t={__name:"FilterPlayers",props:{players:{type:Array,default:()=>[]}},setup(e){const o=e,s=t.computed(()=>o.players.filter(W=>W.is_titular)),z=t.computed(()=>o.players.filter(W=>!W.is_titular));return(W,v)=>(t.openBlock(),t.createElementBlock("div",H0t,[t.createVNode(SV,{players:s.value,"are-players-titular":""},null,8,["players"]),t.createVNode(SV,{players:z.value,"are-players-titular":!1},null,8,["players"])]))}},N5=du(Z0t,[["__scopeId","data-v-44980c4e"]]);let W0t=class{constructor(){this.dataByTimePoint=new Map,this.playerPositions=new Map,this.ballPositions=new Map,this.matchlapseIndex=new Map,this.secondIndex=new Map}processPositions(o){return this.dataByTimePoint.clear(),this.playerPositions.clear(),this.ballPositions.clear(),this.matchlapseIndex.clear(),this.secondIndex.clear(),!o.info_by_second||!Array.isArray(o.info_by_second)?(console.error("No se encontraron datos válidos en info_by_second"),this):(o.info_by_second.forEach(s=>{const[z,W,v,g]=s,[r,b,d]=v,a=`${W}:${z}`;this.dataByTimePoint.set(a,{second:z,matchLapse:W,timeKey:a,ball:{x:r,y:b,zone:d},players:new Map}),this.ballPositions.set(a,{x:r,y:b,zone:d,second:z,matchLapse:W}),this.matchlapseIndex.has(W)||this.matchlapseIndex.set(W,new Set),this.matchlapseIndex.get(W).add(z),this.secondIndex.has(z)||this.secondIndex.set(z,new Set),this.secondIndex.get(z).add(W),Array.isArray(g)&&g.forEach(_=>{const[y,x,u,n,i]=_;this.dataByTimePoint.get(a).players.set(y,{playerId:y,teamId:x,x:u,y:n,zone:i,second:z,matchLapse:W,timeKey:a}),this.playerPositions.has(y)||this.playerPositions.set(y,[]),this.playerPositions.get(y).push({second:z,matchLapse:W,timeKey:a,teamId:x,x:u,y:n,zone:i})})}),this)}filterData(o={}){const{timeRanges:s=null,ballZones:z=null}=o,W=new Map;let v=[];return s&&s.length>0&&s.forEach(g=>{const{match_lapse:r,start:b,end:d}=g;this.matchlapseIndex.has(r)?Array.from(this.matchlapseIndex.get(r)).filter(a=>a>=b&&a<=d).forEach(a=>{v.push(`${r}:${a}`)}):console.error(`Matchlapse ${r} no encontrado en índice`)}),z&&z.length>0&&(v=v.filter(g=>{const r=this.ballPositions.get(g);return r&&z.includes(r.zone)})),v.forEach(g=>{const r=this.dataByTimePoint.get(g);if(!r)return;const b=new Map;r.players.forEach((d,a)=>{b.set(a,d)}),b.size>0&&W.set(g,{...r,players:b})}),W}calculatePlayerAverages(o){const s=new Map;o.forEach(W=>{W.players.forEach((v,g)=>{s.has(g)||s.set(g,{playerId:g,teamId:v.teamId,totalX:0,totalY:0,count:0,positions:[],matchlapses:new Set});const r=s.get(g);r.totalX+=v.x,r.totalY+=v.y,r.count++,r.matchlapses.add(v.matchLapse),r.positions.push({second:v.second,matchLapse:v.matchLapse,timeKey:v.timeKey,x:v.x,y:v.y,quadrant:v.quadrant})})});const z=new Map;return s.forEach((W,v)=>{z.set(v,{playerId:W.playerId,teamId:W.teamId,avgX:W.totalX/W.count,avgY:W.totalY/W.count,dataPoints:W.count,matchlapses:Array.from(W.matchlapses),positions:W.positions,id:W.playerId,name:`Jugador #${W.playerId}`,selected:!1,photo:null})}),z}getPlayerAverages(o={}){const s=this.filterData(o);return this.calculatePlayerAverages(s)}},X0t=class{constructor(){this.chains=[],this.indexedByInitialCategories=new Map,this.indexedByEndingCategories=new Map,this.indexedByTeam=new Map,this.indexedByMatchLapse=new Map,this.indexedByBallZones=new Map,this.indexedByBallInitialZones=new Map,this.indexedByBallFinalZones=new Map}processChains(o){return this.chains=Array.isArray(o)?o:[],this.createIndexes(),this.chains}createIndexes(){this.chains.forEach(o=>{o.initial_category_ids&&Array.isArray(o.initial_category_ids)&&o.initial_category_ids.forEach(s=>{this.indexedByInitialCategories.has(s)||this.indexedByInitialCategories.set(s,new Set),this.indexedByInitialCategories.get(s).add(o.id)}),o.ending_category_ids&&Array.isArray(o.ending_category_ids)&&o.ending_category_ids.forEach(s=>{this.indexedByEndingCategories.has(s)||this.indexedByEndingCategories.set(s,new Set),this.indexedByEndingCategories.get(s).add(o.id)}),o.team_id&&(this.indexedByTeam.has(o.team_id)||this.indexedByTeam.set(o.team_id,new Set),this.indexedByTeam.get(o.team_id).add(o.id)),o.match_lapse&&(this.indexedByMatchLapse.has(o.match_lapse)||this.indexedByMatchLapse.set(o.match_lapse,new Set),this.indexedByMatchLapse.get(o.match_lapse).add(o.id)),o.quadrant_ids&&Array.isArray(o.quadrant_ids)&&o.quadrant_ids.forEach(s=>{this.indexedByBallZones.has(s)||this.indexedByBallZones.set(s,new Set),this.indexedByBallZones.get(s).add(o.id)}),o.ball_initial_quadrant_id&&(this.indexedByBallInitialZones.has(o.ball_initial_quadrant_id)||this.indexedByBallInitialZones.set(o.ball_initial_quadrant_id,new Set),this.indexedByBallInitialZones.get(o.ball_initial_quadrant_id).add(o.id)),o.ball_ending_quadrant_id&&(this.indexedByBallFinalZones.has(o.ball_ending_quadrant_id)||this.indexedByBallFinalZones.set(o.ball_ending_quadrant_id,new Set),this.indexedByBallFinalZones.get(o.ball_ending_quadrant_id).add(o.id))})}getFilteredChains(o={}){let s=new Set(this.chains.map(W=>W.id));if(o.excludedStartCategories&&o.excludedStartCategories.length>0||o.startCategories&&o.startCategories.length>0){const W=new Set,v=new Set;let g=new Set,r=new Set;o.excludedStartCategories&&o.excludedStartCategories.length>0&&(o.excludedStartCategories.forEach(b=>{const d=this.indexedByInitialCategories.get(b);d&&d.forEach(a=>W.add(a))}),g=new Set([...s].filter(b=>!W.has(b)))),o.startCategories&&o.startCategories.length>0&&(o.startCategories.forEach(b=>{const d=this.indexedByInitialCategories.get(b);d&&d.forEach(a=>v.add(a))}),r=new Set([...s].filter(b=>v.has(b)))),s=new Set([...g,...r])}if(o.excludedEndCategories&&o.excludedEndCategories.length>0||o.endCategories&&o.endCategories.length>0){const W=new Set,v=new Set;let g=new Set,r=new Set;o.excludedEndCategories&&o.excludedEndCategories.length>0&&(o.excludedEndCategories.forEach(b=>{const d=this.indexedByEndingCategories.get(b);d&&d.forEach(a=>W.add(a))}),g=new Set([...s].filter(b=>!W.has(b)))),o.endCategories&&o.endCategories.length>0&&(o.endCategories.forEach(b=>{const d=this.indexedByEndingCategories.get(b);d&&d.forEach(a=>v.add(a))}),r=new Set([...s].filter(b=>v.has(b)))),s=new Set([...g,...r])}if(o.chainInitialZones&&o.chainInitialZones.length>0){const W=new Set;o.chainInitialZones.forEach(v=>{const g=this.indexedByBallInitialZones.get(v);g&&g.forEach(r=>W.add(r))}),s=new Set([...s].filter(v=>W.has(v)))}if(o.chainFinalZones&&o.chainFinalZones.length>0){const W=new Set;o.chainFinalZones.forEach(v=>{const g=this.indexedByBallFinalZones.get(v);g&&g.forEach(r=>W.add(r))}),s=new Set([...s].filter(v=>W.has(v)))}if(o.ballInterestZones&&o.ballInterestZones.length>0){const W=new Set;o.ballInterestZones.forEach(v=>{const g=this.indexedByBallZones.get(v);g&&g.forEach(r=>W.add(r))}),s=new Set([...s].filter(v=>W.has(v)))}if(o.startTime&&o.endTime&&o.startTime.match_lapse!==void 0&&o.endTime.match_lapse!==void 0){const{match_lapse:W}=o.startTime,{match_lapse:v}=o.endTime,g=this.indexedByMatchLapse.get(W),r=this.indexedByMatchLapse.get(v);g&&r?s=new Set([...s].filter(b=>g.has(b)||r.has(b))):s=new Set}if(o.teamId){const W=this.indexedByTeam.get(o.teamId);W?s=new Set([...s].filter(v=>W.has(v))):s=new Set}let z=this.chains.filter(W=>s.has(W.id));if(o.minDuration!==void 0&&(z=z.filter(W=>W.duration>=o.minDuration)),o.maxDuration!==void 0&&(z=z.filter(W=>W.duration<=o.maxDuration)),o.startTime&&o.endTime&&o.startTime.seconds!==void 0&&o.endTime.seconds!==void 0&&o.startTime.match_lapse!==void 0&&o.endTime.match_lapse!==void 0){const{seconds:W}=o.startTime,{seconds:v}=o.endTime,{match_lapse:g}=o.startTime,{match_lapse:r}=o.endTime;z=z.filter(b=>{if(g===r&&b.starting_second>=W&&b.starting_second<=v||b.ending_second>=W&&b.ending_second<=v)return!0;if(g!==r){if(v>W){if(b.starting_second>=W&&b.starting_second<=v||b.ending_second>=W&&b.ending_second<=v)return!0}else if(b.match_lapse===g&&b.starting_second>=W||b.match_lapse===r&&b.ending_second<=v)return!0}return!1})}return(o.excludedFirstSeconds!==void 0||o.excludedLastSeconds!==void 0)&&(z=z.map(W=>{const v=o.excludedFirstSeconds!==void 0?W.starting_second+o.excludedFirstSeconds:W.starting_second;let g=W.ending_second;return W.duration>o.excludedLastSeconds&&(g=W.starting_second+o.excludedLastSeconds),v>=g||v<0||g<0?null:{...W,starting_second:v,ending_second:g}}).filter(W=>W!==null)),z}getChainStats(o={}){const s=this.getFilteredChains(o);return s.length===0?{totalChains:0,averageDuration:0,totalSeconds:0,totalDurationChains:0}:{totalChains:s.length,averageDuration:s.reduce((z,W)=>z+W.duration,0)/s.length,totalSeconds:s.reduce((z,W)=>z+(W.ending_second-W.starting_second),0),totalDurationChains:s.reduce((z,W)=>z+W.duration,0)}}mapFilterCategoriesToIds(o,s){const z=[];return o.forEach(W=>{const v=s.find(g=>g.id===W);v&&v.category_ids&&z.push(...v.category_ids)}),z}mapFilterExcludedCategoriesToIds(o,s){const z=[];return o.forEach(W=>{const v=s.find(g=>g.id===W);v&&v.excluded_category_ids&&z.push(...v.excluded_category_ids)}),z}};const TV="https://d1cfezxa8pcy7l.cloudfront.net",q0t="chains_by_game.json",Y0t="positions_by_second.json",CV="==GolStatsHatTrick!";let Cp=class{static resetCache(){this._playersRawData=null,this._playersProcessedData=null,this._chainsRawData=null}static async _loadChainsData(o){if(this._chainsRawData)return this._chainsRawData;try{const s=await fetch(`${TV}/${o}/${q0t}`,{headers:{"x-api-key":`${CV}`}});if(!s.ok)throw new Error(`Error fetching game events: ${s.status}`);const z=await s.json();return this._chainsRawData=z,z}catch(s){throw console.error("Error fetching game events:",s),s}}static async _loadPlayersData(o){if(o!==void 0){if(this._playersRawData)return this._playersProcessedData;try{const s=await fetch(`${TV}/${o}/${Y0t}`,{headers:{"x-api-key":`${CV}`}});if(!s.ok)throw new Error(`Error fetching game players: ${s.status}`);const z=await s.json(),W=new W0t;return W.processPositions(z),this._playersRawData=z,this._playersProcessedData=W,W}catch(s){throw console.error("Error loading players data:",s),s}}}static async getPositions(o,s){try{return(await this._loadPlayersData(o)).getPlayerAverages(s)}catch(z){return console.error("Error getting positions:",z),new Map}}static getStartedCategories(){return[{id:1,category_ids:[6,312],name:"Balón recuperado",isSelected:!0},{id:2,category_ids:[28,264],name:"Saque de meta",isSelected:!0},{id:3,category_ids:[30,355],name:"Tiro libre",isSelected:!0},{id:4,category_ids:[210,212,854],name:"Saque de banda",isSelected:!0},{id:5,category_ids:[-1],excluded_category_ids:[6,312,28,264,30,355,210,212,854],name:"Otras",isSelected:!0}]}static getEndedCategories(){return[{id:1,category_ids:[13,25],name:"Centros",isSelected:!0},{id:2,category_ids:[607,608],name:"Oportunidades de gol",isSelected:!0},{id:3,category_ids:[-1],excluded_category_ids:[13,25,607,608],name:"Otras",isSelected:!0}]}static async getProcessedChains(o,s={}){try{const z=await this._loadChainsData(o),W=new X0t;W.processChains(z);const v={...s};return s.startCategories&&s.startCategories.length>0&&(v.startCategories=W.mapFilterCategoriesToIds(s.startCategories,this.getStartedCategories()),v.excludedStartCategories=W.mapFilterExcludedCategoriesToIds(s.startCategories,this.getStartedCategories())),s.endCategories&&s.endCategories.length>0&&(v.endCategories=W.mapFilterCategoriesToIds(s.endCategories,this.getEndedCategories()),v.excludedEndCategories=W.mapFilterExcludedCategoriesToIds(s.endCategories,this.getEndedCategories())),{chains:W.getFilteredChains(v),stats:W.getChainStats(v),totalChains:z.length,processor:W}}catch(z){throw console.error("Error processing chains:",z),z}}};jk(Cp,"_playersRawData",null),jk(Cp,"_playersProcessedData",null),jk(Cp,"_chainsRawData",null);function EV(e){const o=t.ref([]),s=t.ref(null),z=t.ref(null),W=t.ref(!1),v=t.ref([]),g=t.ref(null),r=t.ref([]),b=t.ref([]),d=t.ref(null),a=t.ref({min:5,max:null}),_=t.ref(5),y=t.ref(5),x=t.ref([]),u=t.ref([]),n=t.ref([]);return{isDataLoaded:W,selectedStartCategories:r,selectedEndCategories:b,selectedPossessionTeamId:d,durationRange:a,loadInitialData:async()=>{if(!(W.value||!e))try{const i=await Cp.getProcessedChains(e,{});z.value=i.processor,v.value=i.chains,g.value=i.stats,o.value=v.value,s.value=g.value}catch(i){console.error("Error loading data:",i)}finally{W.value=!0}},applyFilters:(i={})=>{if(!(!z.value||!W.value))try{const f=Object.keys(i).length>0?i:{startCategories:r.value,endCategories:b.value,teamId:d.value,minDuration:a.value.min,maxDuration:a.value.max,excludedFirstSeconds:_.value,excludedLastSeconds:y.value,chainInitialZones:x.value,chainFinalZones:u.value,ballInterestZones:n.value};o.value=z.value.getFilteredChains(f),s.value=z.value.getChainStats(f)}catch(f){console.error("Error aplicando filtros:",f)}},getFilteredData:(i={})=>{if(!W.value)return null;const{startCategories:f=[],endCategories:l=[],teamId:h=null,minDuration:m=null,maxDuration:w=null,excludedFirstSeconds:T=null,excludedLastSeconds:A=null,chainInitialZones:C=[],chainFinalZones:I=[],ballInterestZones:L=[],timeFromTimeline:E={}}=i,P={};if(f.length>0&&(P.startCategories=z.value.mapFilterCategoriesToIds(f,Cp.getStartedCategories()),P.excludedStartCategories=z.value.mapFilterExcludedCategoriesToIds(f,Cp.getStartedCategories())),l.length>0&&(P.endCategories=z.value.mapFilterCategoriesToIds(l,Cp.getEndedCategories()),P.excludedEndCategories=z.value.mapFilterExcludedCategoriesToIds(l,Cp.getEndedCategories())),h&&(P.teamId=h),m!==null&&(P.minDuration=parseInt(m)),w!==null&&(P.maxDuration=parseInt(w)),T!==null&&(P.excludedFirstSeconds=parseInt(T)),A!==null&&(P.excludedLastSeconds=parseInt(A)),C.length>0&&(P.chainInitialZones=C),I.length>0&&(P.chainFinalZones=I),L.length>0&&(P.ballInterestZones=L),Object.keys(E).length>0&&Object.keys(E.end).length>0&&Object.keys(E.start).length>0){const{start:M,end:S}=E;P.startTime={seconds:M.seconds,match_lapse:M.match_lapse},P.endTime={seconds:S.seconds,match_lapse:S.match_lapse}}return{chains:z.value.getFilteredChains(P),stats:z.value.getChainStats(P)}}}}const J0t={class:"shadows"},$0t={class:"menu-content-shadows"},K0t={class:"menu-shadows-teams"},Q0t={class:"team-switch-container"},emt={class:"team-switch team-switch-toggle"},tmt={class:"team-content"},amt=["src"],rmt={class:"team-label"},nmt={class:"team-content"},imt={class:"team-label"},omt=["src"],smt={class:"menu-shadows-tabs"},lmt={class:"menu-shadows-tab-content"},cmt={key:0},umt={key:1,class:"filter-events-container"},dmt={key:2},hmt={__name:"FilterShadows",props:{startedCategories:{type:Array,default:()=>[]},endedCategories:{type:Array,default:()=>[]},defaultShadowsFilters:{type:Object,default:()=>({})},game:{type:Object,default:()=>({gameId:0,homeTeam:{team_id:0},awayTeam:{team_id:0}})},token:{type:String,default:""},players:{type:Array,default:()=>[]},containerWidth:{type:Number,default:0},filterButtonProps:{type:Object,default:()=>({fontSize:"13px",gap:"6px",padding:"11px 12px"})}},emits:["home-chains-shadows-filtered","away-chains-shadows-filtered","is-shadows-selected","home-ball-zones-shadows-filtered","away-ball-zones-shadows-filtered","home-range-change-shadows","away-range-change-shadows"],setup(e,{emit:o}){const s=e,z=o,W=t.ref(!1),v=t.ref(!1),g=t.ref(["Filtros","Eventos","Jugadores"]),r=t.ref(g.value[0]),b=t.ref({...s.defaultShadowsFilters}),d=t.ref({...s.defaultShadowsFilters}),a=t.ref(structuredClone(s.startedCategories)),_=t.ref(structuredClone(s.endedCategories)),y=t.ref(structuredClone(s.startedCategories)),x=t.ref(structuredClone(s.endedCategories)),u=t.ref(!0),n=t.ref(!0),i=t.ref(!0),f=t.ref(!0),l=t.ref(s.game.homeTeam.team_id),h=t.ref(!0),{selectedStartCategories:m,selectedEndCategories:w,isDataLoaded:T,loadInitialData:A,getFilteredData:C}=EV(s.game.gameId),I=m,L=w,E=t.ref(null),P=t.ref(!1),M=t.computed(()=>s.containerWidth>650?"650px":`${s.containerWidth-20}px`),S=he=>{const pe=he===s.game.homeTeam.team_id?b.value:d.value,ne={startCategories:pe.startCategories,endCategories:pe.endCategories,teamId:pe.possessionTeamId,minDuration:pe.durationRange.min,maxDuration:pe.durationRange.max,excludedFirstSeconds:pe.excludedFirstSeconds,excludedLastSeconds:pe.excludedLastSeconds,chainInitialZones:pe.chainInitialZones,chainFinalZones:pe.chainFinalZones,ballInterestZones:pe.ballInterestZones,timeFromTimeline:pe.timeFromTimeline},le=C(ne);le&&(he===s.game.homeTeam.team_id?(z("home-chains-shadows-filtered",le.chains,he),z("home-ball-zones-shadows-filtered",ne.ballInterestZones,he),z("home-range-change-shadows",ne.timeFromTimeline,he)):(z("away-chains-shadows-filtered",le.chains,he),z("away-ball-zones-shadows-filtered",ne.ballInterestZones,he),z("away-range-change-shadows",ne.timeFromTimeline,he)))},B=he=>{const pe=l.value===s.game.homeTeam.team_id?b.value:d.value;switch(he){case"home":pe.possessionTeamId=s.game.homeTeam.team_id;break;case"away":pe.possessionTeamId=s.game.awayTeam.team_id;break;case"both":pe.possessionTeamId=null;break}S(l.value)},k=(he,pe)=>{const ne=l.value===s.game.homeTeam.team_id?b.value:d.value;he==="less-than"?ne.durationRange={min:null,max:pe}:ne.durationRange={min:pe,max:null},S(l.value)},O=he=>{const pe=l.value===s.game.homeTeam.team_id?b.value:d.value;pe.excludedFirstSeconds=he,S(l.value)},D=he=>{const pe=l.value===s.game.homeTeam.team_id?b.value:d.value;pe.excludedLastSeconds=he,S(l.value)},V=he=>{const pe=l.value===s.game.homeTeam.team_id?b.value:d.value;pe.chainInitialZones=he,S(l.value)},G=he=>{const pe=l.value===s.game.homeTeam.team_id?b.value:d.value;pe.chainFinalZones=he,S(l.value)},H=he=>{const pe=l.value===s.game.homeTeam.team_id?b.value:d.value;pe.ballInterestZones=he,S(l.value)};function U(he,pe){const ne=l.value===s.game.homeTeam.team_id?b.value:d.value,le=(l.value===s.game.homeTeam.team_id?a.value:y.value).find(ie=>ie.id===pe.id);le&&(le.isSelected=he),he?ne.startCategories.includes(pe.id)||ne.startCategories.push(pe.id):ne.startCategories=ne.startCategories.filter(ie=>ie!==pe.id),l.value===s.game.homeTeam.team_id?u.value=ne.startCategories.length===a.value.length:i.value=ne.startCategories.length===y.value.length,S(l.value)}function J(he,pe){const ne=l.value===s.game.homeTeam.team_id?b.value:d.value,le=(l.value===s.game.homeTeam.team_id?_.value:x.value).find(ie=>ie.id===pe.id);le&&(le.isSelected=he),he?ne.endCategories.includes(pe.id)||ne.endCategories.push(pe.id):ne.endCategories=ne.endCategories.filter(ie=>ie!==pe.id),l.value===s.game.homeTeam.team_id?n.value=ne.endCategories.length===_.value.length:f.value=ne.endCategories.length===x.value.length,S(l.value)}const re=he=>{const pe=l.value===s.game.homeTeam.team_id?b.value:d.value,ne=l.value===s.game.homeTeam.team_id?a.value:y.value;ne.forEach(le=>le.isSelected=he),he?pe.startCategories=ne.map(le=>le.id):pe.startCategories=[],l.value===s.game.homeTeam.team_id?u.value=he:i.value=he,S(l.value)},q=he=>{const pe=l.value===s.game.homeTeam.team_id?b.value:d.value,ne=l.value===s.game.homeTeam.team_id?_.value:x.value;ne.forEach(le=>le.isSelected=he),he?pe.endCategories=ne.map(le=>le.id):pe.endCategories=[],l.value===s.game.homeTeam.team_id?n.value=he:f.value=he,S(l.value)},ae=he=>{const pe=l.value===s.game.homeTeam.team_id?b.value:d.value;pe.timeFromTimeline=he,S(l.value)},ee=t.computed(()=>s.startedCategories.length>0?l.value===s.game.homeTeam.team_id?a.value:y.value:[]),$=t.computed(()=>s.endedCategories.length>0?l.value===s.game.homeTeam.team_id?_.value:x.value:[]);t.watch([I,L],()=>{I.value.length===0&&(I.value=ee.value.map(he=>he.id)),L.value.length===0&&(L.value=$.value.map(he=>he.id))},{immediate:!0}),t.watch(()=>T.value,async he=>{he||(await A(),h.value?(S(s.game.homeTeam.team_id),S(s.game.awayTeam.team_id),h.value=!1):S(l.value))},{immediate:!0}),t.watch(W,he=>{P.value=he});function Q(he){he?W.value=!0:W.value=!1}function ce(he){v.value=he,z("is-shadows-selected",he)}function de(he){r.value=he}return(he,pe)=>(t.openBlock(),t.createElementBlock("div",J0t,[t.createElementVNode("div",{ref_key:"filterContainerRef",ref:E,class:"filter-container"},[t.createVNode(S5,t.mergeProps(e.filterButtonProps,{text:"Shadows","is-active":P.value,onExpand:Q,onChangeSelected:ce}),null,16,["is-active"]),e.containerWidth>550?(t.openBlock(),t.createBlock(vht,{key:0})):t.createCommentVNode("",!0)],512),t.createVNode(t.unref(Uk),{modelValue:W.value,"onUpdate:modelValue":pe[2]||(pe[2]=ne=>W.value=ne),width:"fit-content","menu-width":M.value,"left-menu":"unset","menu-margin-top":8,"trigger-element":E.value,"z-index-open":15},{trigger:t.withCtx(()=>[...pe[3]||(pe[3]=[t.createElementVNode("div",{style:{display:"none"}},null,-1)])]),menu:t.withCtx(()=>[t.createElementVNode("div",$0t,[pe[4]||(pe[4]=t.createElementVNode("div",{class:"menu-shadows-header"},[t.createElementVNode("div",{class:"menu-shadows-header__title"}," Filtros shadows ")],-1)),t.createElementVNode("div",K0t,[t.createElementVNode("div",Q0t,[t.createElementVNode("div",emt,[t.createElementVNode("div",{class:"team-thumb",style:t.normalizeStyle({left:l.value===e.game.homeTeam.team_id?"0px":"calc(50%)",width:"calc(50%)"})},null,4),t.createElementVNode("button",{class:t.normalizeClass(["team-btn",{active:l.value===e.game.homeTeam.team_id}]),onClick:pe[0]||(pe[0]=ne=>l.value=e.game.homeTeam.team_id),type:"button"},[t.createElementVNode("span",tmt,[t.createElementVNode("img",{src:`https://golstatsimages.blob.core.windows.net/teams-80/${e.game.homeTeam.team_id}.png`,alt:"Escudo local",class:"team-logo"},null,8,amt),t.createElementVNode("span",rmt,t.toDisplayString(e.game.homeTeam.colloquial_name),1)])],2),t.createElementVNode("button",{class:t.normalizeClass(["team-btn",{active:l.value===e.game.awayTeam.team_id}]),onClick:pe[1]||(pe[1]=ne=>l.value=e.game.awayTeam.team_id),type:"button"},[t.createElementVNode("span",nmt,[t.createElementVNode("span",imt,t.toDisplayString(e.game.awayTeam.colloquial_name),1),t.createElementVNode("img",{src:`https://golstatsimages.blob.core.windows.net/teams-80/${e.game.awayTeam.team_id}.png`,alt:"Escudo visitante",class:"team-logo"},null,8,omt)])],2)])])]),t.createElementVNode("div",smt,[t.createVNode(kht,{tabs:g.value,onChangeTab:de},null,8,["tabs"])]),t.createElementVNode("div",lmt,[r.value===g.value[0]?(t.openBlock(),t.createElementBlock("div",cmt,[t.withDirectives(t.createVNode(wV,{game:e.game,token:e.token,"selected-team-tab":l.value,onHandleShadowsPossessionChange:B,onHandleShadowsDurationChange:k,onHandleShadowsExcludedFirstSecondsChange:O,onHandleShadowsExcludedLastSecondsChange:D,onHandleShadowsChainInitialZonesChange:V,onHandleShadowsChainFinalZonesChange:G,onHandleShadowsBallInterestZonesChange:H,onRangeChange:ae},null,8,["game","token","selected-team-tab"]),[[t.vShow,l.value===e.game.homeTeam.team_id]]),t.withDirectives(t.createVNode(wV,{game:e.game,token:e.token,"selected-team-tab":l.value,onHandleShadowsPossessionChange:B,onHandleShadowsDurationChange:k,onHandleShadowsExcludedFirstSecondsChange:O,onHandleShadowsExcludedLastSecondsChange:D,onHandleShadowsChainInitialZonesChange:V,onHandleShadowsChainFinalZonesChange:G,onHandleShadowsBallInterestZonesChange:H,onRangeChange:ae},null,8,["game","token","selected-team-tab"]),[[t.vShow,l.value===e.game.awayTeam.team_id]])])):r.value===g.value[1]?(t.openBlock(),t.createElementBlock("div",umt,[t.withDirectives(t.createVNode(kV,{"started-categories":ee.value,"ended-categories":$.value,"all-start-events-selected":u.value,"all-end-events-selected":n.value,onToggleAllStartEvents:re,onToggleAllEndEvents:q,onUpdateStartEvent:U,onUpdateEndEvent:J},null,8,["started-categories","ended-categories","all-start-events-selected","all-end-events-selected"]),[[t.vShow,l.value===e.game.homeTeam.team_id]]),t.withDirectives(t.createVNode(kV,{"started-categories":ee.value,"ended-categories":$.value,"all-start-events-selected":i.value,"all-end-events-selected":f.value,onToggleAllStartEvents:re,onToggleAllEndEvents:q,onUpdateStartEvent:U,onUpdateEndEvent:J},null,8,["started-categories","ended-categories","all-start-events-selected","all-end-events-selected"]),[[t.vShow,l.value===e.game.awayTeam.team_id]])])):r.value===g.value[2]?(t.openBlock(),t.createElementBlock("div",dmt,[t.withDirectives(t.createVNode(N5,{players:e.players.filter(ne=>ne.team_id===e.game.homeTeam.team_id)},null,8,["players"]),[[t.vShow,l.value===e.game.homeTeam.team_id]]),t.withDirectives(t.createVNode(N5,{players:e.players.filter(ne=>ne.team_id===e.game.awayTeam.team_id)},null,8,["players"]),[[t.vShow,l.value===e.game.awayTeam.team_id]])])):t.createCommentVNode("",!0)]),pe[5]||(pe[5]=t.createElementVNode("div",{class:"menu-shadows-tab-footer"},null,-1))])]),_:1},8,["modelValue","menu-width","trigger-element"])]))}},pmt=du(hmt,[["__scopeId","data-v-a8d58dcd"]]),fmt={__name:"TopFilters",props:{game:{type:Object,default:()=>({gameId:0,homeTeam:{team_id:0},awayTeam:{team_id:0}})},token:{type:String,default:""},players:{type:Array,default:()=>[]},containerWidth:{type:Number,default:0},defaultShadowsFilters:{type:Object,default:()=>({})},startedCategories:{type:Array,default:()=>[]},endedCategories:{type:Array,default:()=>[]}},emits:["change-connections","change-distance","change-distance-custom","home-chains-shadows-filtered","away-chains-shadows-filtered","is-shadows-selected","home-range-change-shadows","away-range-change-shadows","home-ball-zones-shadows-filtered","away-ball-zones-shadows-filtered"],setup(e,{emit:o}){let s=null;const z=e,W=o,v=t.ref(null),g=t.ref(0),r=t.computed(()=>"Distancia entre jugadores"),b=t.computed(()=>z.containerWidth<480?{fontSize:"10px",gap:"4px",padding:"8px 6px"}:{fontSize:"13px",gap:"6px",padding:"11px 12px"});function d(m){W("change-connections",m)}function a(m){W("change-distance-custom",m)}function _(m){W("change-distance",m)}function y(m,w){W("home-chains-shadows-filtered",m,w)}function x(m,w){W("away-chains-shadows-filtered",m,w)}function u(m,w){W("home-ball-zones-shadows-filtered",m,w)}function n(m,w){W("away-ball-zones-shadows-filtered",m,w)}function i(m){W("is-shadows-selected",m)}function f(m,w){W("home-range-change-shadows",m,w)}function l(m,w){W("away-range-change-shadows",m,w)}function h(){v.value&&(s=new ResizeObserver(m=>{for(let w of m)g.value=w.contentRect.width}),s.observe(v.value))}return t.onMounted(()=>{h()}),(m,w)=>(t.openBlock(),t.createElementBlock("div",{ref_key:"filters",ref:v,class:"filters"},[w[0]||(w[0]=t.createElementVNode("div",{class:"filters__text"}," Mostrar: ",-1)),t.createVNode(aht,{game:e.game,"filter-button-props":b.value,onApply:d},null,8,["game","filter-button-props"]),t.createVNode(S5,t.mergeProps(b.value,{text:r.value,"is-arrow-visible":!1,onChangeSelected:_}),null,16,["text"]),t.createVNode(mht,{game:e.game,"filter-button-props":b.value,"container-width":e.containerWidth,onApply:a},null,8,["game","filter-button-props","container-width"]),t.createVNode(pmt,{game:e.game,token:e.token,"container-width":e.containerWidth,"default-shadows-filters":e.defaultShadowsFilters,"started-categories":e.startedCategories,"ended-categories":e.endedCategories,players:e.players,"filter-button-props":b.value,onHomeChainsShadowsFiltered:y,onAwayChainsShadowsFiltered:x,onHomeBallZonesShadowsFiltered:u,onAwayBallZonesShadowsFiltered:n,onHomeRangeChangeShadows:f,onAwayRangeChangeShadows:l,onIsShadowsSelected:i},null,8,["game","token","container-width","default-shadows-filters","started-categories","ended-categories","players","filter-button-props"])],512))}},mmt=du(fmt,[["__scopeId","data-v-28d461d8"]]),gmt={class:"page-header"},ymt={class:"page-header__time"},vmt={class:"value"},bmt={class:"value"},xmt={__name:"SectionHeader",props:{totalChains:{type:Number,default:0},totalSeconds:{type:Number,default:0},totalDurationChains:{type:Number,default:0}},emits:["update:selectedTeam"],setup(e){return(o,s)=>(t.openBlock(),t.createElementBlock("header",gmt,[s[2]||(s[2]=t.createElementVNode("div",{class:"page-header__title"},[t.createElementVNode("span",{class:"label"},"Posicionamiento y conexiones")],-1)),t.createElementVNode("div",ymt,[s[0]||(s[0]=t.createElementVNode("span",{class:"label"},"Estás viendo:",-1)),t.createElementVNode("span",vmt,t.toDisplayString(e.totalChains)+" posesiones",1),s[1]||(s[1]=t.createElementVNode("span",{class:"separator"},"|",-1)),t.createElementVNode("span",bmt,t.toDisplayString(e.totalSeconds)+" segundos",1)])]))}},_mt=du(xmt,[["__scopeId","data-v-4218da77"]]);function AV(){const e=t.ref(!1),o=t.ref(null),s=t.ref([]);async function z(v){e.value=!1,o.value=null;try{const g=await Cp._loadChainsData(v);s.value=g||[]}catch(g){o.value=g.message,console.error("Error cargando datos del juego:",g)}finally{e.value=!0}}async function W(v,g){return await Cp.getPositions(v,g)}return{isDataLoaded:e,startedCategories:Cp.getStartedCategories(),endedCategories:Cp.getEndedCategories(),loadGameData:z,getPositions:W}}const wmt={class:"tooltip-content-row"},kmt=["src"],Smt={class:"tooltip-content"},Tmt={class:"player-name"},Cmt={class:"minutes-played"},Emt={class:"minutes-number"},Amt={key:0,class:"entry-exit"},Mmt={key:0,class:"entry-block"},Pmt={class:"entry-minute"},Imt={key:1,class:"exit-block"},Lmt={class:"exit-minute"},Bmt={key:1,class:"sub-info"},Omt={key:0},zmt={class:"sub-name"},Nmt={key:1},Dmt={class:"sub-name"},Fmt={__name:"TooltipPlayer",props:{show:Boolean,x:Number,y:Number,player:{type:Object,default:()=>({name:"Brian Rodríguez",minutes:26,inMinute:"Min 33",outMinute:"Min 22",subFor:"A. Zendejas"})}},setup(e){function o(s){if(!s)return"";const z=s.trim().split(",");if(z.length>=2){const W=z[0].trim().split(" ")[0];return`${z[1].trim().split(" ")[0].charAt(0)}. ${W}`}return s}return(s,z)=>e.show?(t.openBlock(),t.createElementBlock("div",{key:0,class:"tooltip-box animated-tooltip",style:t.normalizeStyle({position:"fixed",left:e.x+"px",top:e.y+"px",transform:"translate(-50%, -105%)",zIndex:1e3})},[t.renderSlot(s.$slots,"default",{},()=>[t.createElementVNode("div",wmt,[t.createElementVNode("div",{class:t.normalizeClass(["player-photo",{"player-photo--no-move":!e.player.player_in&&!e.player.player_out,"player-photo--move":e.player.player_in||e.player.player_out}])},[t.createElementVNode("img",{src:e.player.photo||"https://i.imgur.com/1Q9Z1Zm.png",alt:"Foto jugador"},null,8,kmt)],2),t.createElementVNode("div",Smt,[t.createElementVNode("div",Tmt,t.toDisplayString(e.player.formattedName),1),t.createElementVNode("div",Cmt,[t.createElementVNode("span",Emt,t.toDisplayString(e.player.minutes_played),1),z[0]||(z[0]=t.createElementVNode("span",{class:"minutes-label"},"Minutos Jugados",-1))]),z[7]||(z[7]=t.createElementVNode("div",{class:"separator"},null,-1)),e.player.player_in||e.player.player_out?(t.openBlock(),t.createElementBlock("div",Amt,[e.player.is_titular?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",Mmt,[z[1]||(z[1]=t.createElementVNode("span",{class:"entry-label"},"Entró",-1)),t.createElementVNode("span",Pmt,"Min "+t.toDisplayString(e.player.player_in.minute),1)])),e.player.is_titular?(t.openBlock(),t.createElementBlock("div",Imt,[z[2]||(z[2]=t.createElementVNode("span",{class:"exit-label"},"Salió",-1)),t.createElementVNode("span",Lmt,"Min "+t.toDisplayString(e.player.player_out.minute),1)])):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0),z[8]||(z[8]=t.createElementVNode("div",{class:"separator"},null,-1)),e.player.player_in||e.player.player_out?(t.openBlock(),t.createElementBlock("div",Bmt,[e.player.is_titular?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",Omt,[z[4]||(z[4]=t.createElementVNode("span",null,"Entró por:",-1)),t.createElementVNode("span",zmt,[t.createTextVNode(t.toDisplayString(o(e.player.player_in.player_name_to_in))+" ",1),z[3]||(z[3]=t.createStaticVNode('<span class="sub-circle-icon" data-v-ab5e17c5><svg width="16" height="16" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg" data-v-ab5e17c5><circle fill="#172531" cx="24" cy="24" r="24" data-v-ab5e17c5></circle><path fill="#fff" d="M31.62,23.86c-.19,0-.37-.07-.52-.21-.3-.29-.31-.76-.03-1.06l2.89-3.04-2.89-3.04c-.29-.3-.27-.77,.03-1.06,.3-.29,.77-.27,1.06,.03l3.39,3.56c.28,.29,.28,.74,0,1.03l-3.39,3.56c-.15,.15-.34,.23-.54,.23Z" data-v-ab5e17c5></path><path fill="#fff" d="M34.99,20.31H16.37c-.41,0-.75-.34-.75-.75s.34-.75,.75-.75h18.62c.41,0,.75,.34,.75,.75s-.34,.75-.75,.75Z" data-v-ab5e17c5></path><path fill="#fff" d="M16.38,32.75c-.2,0-.4-.08-.54-.23l-3.38-3.56c-.28-.29-.28-.74,0-1.03l3.38-3.56c.28-.3,.76-.31,1.06-.03,.3,.29,.31,.76,.03,1.06l-2.89,3.04,2.89,3.04c.29,.3,.27,.78-.03,1.06-.15,.14-.33,.21-.52,.21Z" data-v-ab5e17c5></path><path fill="#fff" d="M31.62,29.19H13c-.41,0-.75-.34-.75-.75s.34-.75,.75-.75H31.62c.41,0,.75,.34,.75,.75s-.34,.75-.75,.75Z" data-v-ab5e17c5></path></svg></span>',1))])])),e.player.is_titular?(t.openBlock(),t.createElementBlock("div",Nmt,[z[6]||(z[6]=t.createElementVNode("span",null,"Salio por:",-1)),t.createElementVNode("span",Dmt,[t.createTextVNode(t.toDisplayString(o(e.player.player_out.player_name_to_out))+" ",1),z[5]||(z[5]=t.createStaticVNode('<span class="sub-circle-icon" data-v-ab5e17c5><svg width="16" height="16" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg" data-v-ab5e17c5><circle fill="#172531" cx="24" cy="24" r="24" data-v-ab5e17c5></circle><path fill="#fff" d="M31.62,23.86c-.19,0-.37-.07-.52-.21-.3-.29-.31-.76-.03-1.06l2.89-3.04-2.89-3.04c-.29-.3-.27-.77,.03-1.06,.3-.29,.77-.27,1.06,.03l3.39,3.56c.28,.29,.28,.74,0,1.03l-3.39,3.56c-.15,.15-.34,.23-.54,.23Z" data-v-ab5e17c5></path><path fill="#fff" d="M34.99,20.31H16.37c-.41,0-.75-.34-.75-.75s.34-.75,.75-.75h18.62c.41,0,.75,.34,.75,.75s-.34,.75-.75,.75Z" data-v-ab5e17c5></path><path fill="#fff" d="M16.38,32.75c-.2,0-.4-.08-.54-.23l-3.38-3.56c-.28-.29-.28-.74,0-1.03l3.38-3.56c.28-.3,.76-.31,1.06-.03,.3,.29,.31,.76,.03,1.06l-2.89,3.04,2.89,3.04c.29,.3,.27,.78-.03,1.06-.15,.14-.33,.21-.52,.21Z" data-v-ab5e17c5></path><path fill="#fff" d="M31.62,29.19H13c-.41,0-.75-.34-.75-.75s.34-.75,.75-.75H31.62c.41,0,.75,.34,.75,.75s-.34,.75-.75,.75Z" data-v-ab5e17c5></path></svg></span>',1))])])):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0)])])],!0)],4)):t.createCommentVNode("",!0)}},Rmt=du(Fmt,[["__scopeId","data-v-ab5e17c5"]]),Vmt={class:"soccer-field__container"},jmt={class:"field"},Umt={key:0,class:"loading-positions"},Gmt={class:"players-container"},Hmt={viewBox:"0 0 611 407",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:"svg-field-overlay"},Zmt=["d","stroke","stroke-opacity","onMouseover","onMouseout","onClick"],Wmt=["id","d"],Xmt=["id","d"],qmt=["xlink:href"],Ymt=["xlink:href"],Jmt=["x","y","stroke-width","fill","opacity"],$mt=["x","y","fill","opacity"],Kmt=["onMouseenter","onMouseleave","onClick"],Qmt=["x","y","stroke-width","fill","stroke","opacity"],e1t=["x","y","fill","opacity"],t1t={key:0},a1t=["width","x"],r1t=["x1","x2"],n1t=["x"],i1t=["x"],o1t=["x"],s1t=["height","y"],l1t=["y1","y2"],c1t=["y"],u1t=["y"],d1t=["y"],h1t={key:1},p1t=["width","x"],f1t=["x1","x2"],m1t=["x"],g1t=["x"],y1t=["x"],v1t=["height","y"],b1t=["y1","y2"],x1t=["y"],_1t=["y"],w1t=["y"],k1t=["d"],S1t=["d"],T1t=["d"],C1t=["d","stroke","stroke-opacity","onMouseover","onMouseout","onClick"],E1t=["x1","y1","x2","y2"],A1t=["onMouseenter","onMouseleave","onClick"],M1t=["x","y","stroke-width","fill","stroke","opacity"],P1t=["x","y","fill","opacity"],I1t=["onMouseenter","onMouseleave","onClick"],L1t=["x","y","stroke-width","fill","stroke","opacity"],B1t=["x","y","fill","opacity"],O1t=["onMouseenter","onClick"],z1t=["x","y","stroke"],N1t=["x","y","fill"],D1t=["x","y"],F1t=105,R1t=68,MV=611,PV=407,IV=3,V1t={__name:"SoccerField",props:{gameId:{type:Number,default:88247},playersSelected:{type:Array,default:()=>[]},playersSelectedShadows:{type:Array,default:()=>[]},homeTeamId:{type:Number,default:1},awayTeamId:{type:Number,default:5},homeFilteredChains:{type:Array,default:()=>[]},awayFilteredChains:{type:Array,default:()=>[]},homeFilteredBallZones:{type:Array,default:()=>[]},awayFilteredBallZones:{type:Array,default:()=>[]},homeFilteredChainsShadows:{type:Array,default:()=>[]},awayFilteredChainsShadows:{type:Array,default:()=>[]},homeFilteredBallZonesShadows:{type:Array,default:()=>[]},awayFilteredBallZonesShadows:{type:Array,default:()=>[]},isDataLoaded:{type:Boolean,default:!1},areConnectionsVisible:{type:Boolean,default:!1},isDistanceVisible:{type:Boolean,default:!1},showShadows:{type:Boolean,default:!1},playersInfo:{type:Object,default:()=>({homeTeam:[],awayTeam:[]})},isHomeTeamVisible:{type:Boolean,default:!0},isAwayTeamVisible:{type:Boolean,default:!0},timeFromTimeline:{type:Object,default:()=>({})},timeFromTimelineShadowsHome:{type:Object,default:()=>({})},timeFromTimelineShadowsAway:{type:Object,default:()=>({})},customDistance:{type:String,default:null}},emits:["home-possession-total-seconds","away-possession-total-seconds","change-custom-distances"],setup(e,{expose:o,emit:s}){const z=t.ref(!1),W=t.ref([]),v=t.ref([]),g=t.ref([]),r=AV(),b=t.ref({show:!1,x:0,y:0,player:{}}),d=t.ref(null),a=e,_=s,y=t.ref(F1t/611),x=t.ref(R1t/407),u=t.ref([{id:"h1",d:"M24 16H588",topRaw:16,type:"line",isVisible:!0,players:[],block:[]},{id:"h2",d:"M24 380H588",topRaw:380,type:"line",isVisible:!0,players:[],block:[]},{id:"v1",d:"M25 380V16.5",leftRaw:25,type:"line",isVisible:!0,players:[],block:[]},{id:"v2",d:"M86 380V16.5",leftRaw:86,type:"line",isVisible:!0,players:[],block:[]},{id:"v3",d:"M130.5 380V16.5",leftRaw:130.5,type:"line",isVisible:!0,players:[],block:[]},{id:"v4",d:"M479.5 380V16.5",leftRaw:479.5,type:"line",isVisible:!0,players:[],block:[]},{id:"v5",d:"M526 380V16.5",leftRaw:526,type:"line",isVisible:!0,players:[],block:[]},{id:"v6",d:"M588 380V16.5",leftRaw:588,type:"line",isVisible:!0,players:[],block:[]}]),n=t.ref(null),i=t.ref(null),f=t.ref([]),l=t.ref([]),h=t.ref(U()),m=t.ref(U()),w=t.ref([]),T=t.ref(null),A=t.ref(null);function C(Ze){A.value=Ze.id}function I(){A.value=null}function L(Ze){return A.value&&A.value!==Ze.id?.1:T.value?Ze.isCandidateToDelete?1:.2:1}function E(Ze){return A.value?.1:T.value?Ze.isCandidateToDelete?1:.2:1}const P=t.computed(()=>{if(a.customDistance){if(a.customDistance==="players")return f.value;if(a.customDistance==="block")return l.value}return[]});t.watch(()=>a.isAwayTeamVisible,(Ze,xe)=>{Ze!==xe&&H(h,m)},{immediate:!0}),t.watch(()=>a.isHomeTeamVisible,(Ze,xe)=>{Ze!==xe&&H(h,m)},{immediate:!0}),t.watch(m,()=>{H(h,m)},{immediate:!0,deep:!0});const M=t.computed(()=>{if(a.customDistance&&a.customDistance==="block"||W.value.length===0||!a.isHomeTeamVisible&&!a.isAwayTeamVisible)return[];let Ze=[...W.value];return a.isHomeTeamVisible&&a.isAwayTeamVisible?(W.value.forEach(xe=>{xe.isVisible=a.playersSelected.includes(xe.id)}),W.value):(a.isHomeTeamVisible?Ze=Ze.filter(xe=>(xe.isVisible=xe.is_home&&a.playersSelected.includes(xe.id),xe.isVisible)):a.isAwayTeamVisible&&(Ze=Ze.filter(xe=>(xe.isVisible=!xe.is_home&&a.playersSelected.includes(xe.id),xe.isVisible))),Ce(),Ze)}),S=t.computed(()=>({"--cursor-svg-field-overlay":a.customDistance?"url('https://golstatsimages.blob.core.windows.net/todoelfut/cursor-02.svg') 17 17, pointer":"inherit"})),B=t.computed(()=>`activeDistances${a.customDistance.charAt(0).toUpperCase()+a.customDistance.slice(1)}`),k=t.computed(()=>a.customDistance?u.value:[]),O=t.computed(()=>{if(a.customDistance&&a.customDistance==="block"||v.value.length===0||!a.showShadows||!a.isHomeTeamVisible&&!a.isAwayTeamVisible)return[];let Ze=[...v.value];return a.isHomeTeamVisible&&a.isAwayTeamVisible?v.value:(a.isHomeTeamVisible?Ze=Ze.filter(xe=>xe.is_home):a.isAwayTeamVisible&&(Ze=Ze.filter(xe=>xe.is_home===!1)),Ze)}),D=t.computed(()=>new Map(M.value.map(Ze=>[Ze.id,Ze]))),V=t.computed(()=>a.isHomeTeamVisible&&W.value.some(Ze=>Ze.is_home&&a.playersSelected.includes(Ze.id)&&Ze.position!==1)),G=t.computed(()=>a.isAwayTeamVisible&&W.value.some(Ze=>!Ze.is_home&&a.playersSelected.includes(Ze.id)&&Ze.position!==1));function H(Ze,xe){const Oe=[{id:"aB1",d:`M${xe.value.minimumX} ${xe.value.minimumY}H${xe.value.maximumX}`,topRaw:xe.value.minimumY,leftRaw:xe.value.minimumX+(xe.value.maximumX-xe.value.minimumX)/2,isVisible:a.isAwayTeamVisible,type:"boundary"},{id:"aB2",d:`M${xe.value.maximumX} ${xe.value.minimumY}V${xe.value.maximumY}`,topRaw:xe.value.minimumY+(xe.value.maximumY-xe.value.minimumY)/2,leftRaw:xe.value.maximumX,isVisible:a.isAwayTeamVisible,type:"boundary"},{id:"aB3",d:`M${xe.value.maximumX} ${xe.value.maximumY}H${xe.value.minimumX}`,topRaw:xe.value.maximumY,leftRaw:xe.value.minimumX+(xe.value.maximumX-xe.value.minimumX)/2,isVisible:a.isAwayTeamVisible,type:"boundary"},{id:"aB4",d:`M${xe.value.minimumX} ${xe.value.maximumY}V${xe.value.minimumY}`,topRaw:xe.value.minimumY+(xe.value.maximumY-xe.value.minimumY)/2,leftRaw:xe.value.minimumX,isVisible:a.isAwayTeamVisible,type:"boundary"},{id:"hB1",d:`M${Ze.value.minimumX} ${Ze.value.minimumY}H${Ze.value.maximumX}`,topRaw:Ze.value.minimumY,leftRaw:Ze.value.minimumX+(Ze.value.maximumX-Ze.value.minimumX)/2,isVisible:a.isHomeTeamVisible,type:"boundary"},{id:"hB2",d:`M${Ze.value.maximumX} ${Ze.value.minimumY}V${Ze.value.maximumY}`,topRaw:Ze.value.minimumY+(Ze.value.maximumY-Ze.value.minimumY)/2,leftRaw:Ze.value.maximumX,isVisible:a.isHomeTeamVisible,type:"boundary"},{id:"hB3",d:`M${Ze.value.maximumX} ${Ze.value.maximumY}H${Ze.value.minimumX}`,topRaw:Ze.value.maximumY,leftRaw:Ze.value.minimumX+(Ze.value.maximumX-Ze.value.minimumX)/2,isVisible:a.isHomeTeamVisible,type:"boundary"},{id:"hB4",d:`M${Ze.value.minimumX} ${Ze.value.maximumY}V${Ze.value.minimumY}`,topRaw:Ze.value.minimumY+(Ze.value.maximumY-Ze.value.minimumY)/2,leftRaw:Ze.value.minimumX,isVisible:a.isHomeTeamVisible,type:"boundary"}];w.value.length===0?w.value=[...Oe]:w.value.forEach(Fe=>{const We=Oe.find(et=>et.id===Fe.id);We&&(Fe.d=We.d,Fe.topRaw=We.topRaw,Fe.leftRaw=We.leftRaw,Fe.isVisible=We.isVisible)}),l.value.forEach(Fe=>{const We=w.value.find(tt=>tt.id===Fe.from.id),et=w.value.find(tt=>tt.id===Fe.to.id);We&&(Fe.from.d=We.d,Fe.from.topRaw=We.topRaw,Fe.from.leftRaw=We.leftRaw,Fe.from.isVisible=We.isVisible),et&&(Fe.to.d=et.d,Fe.to.topRaw=et.topRaw,Fe.to.leftRaw=et.leftRaw,Fe.to.isVisible=et.isVisible),ge(Fe.from,Fe.to,!0)}),setTimeout(()=>{Ce()},1e3)}function U(){return{minimumX:0,maximumX:MV,minimumY:0,maximumY:PV,isVisible:!0}}function J(Ze,xe){if(!Ze||Ze.length===0)return[];let Oe=null,Fe=null,We=null,et=null;xe.start&&xe.end&&(Oe=xe.start.match_lapse,Fe=xe.end.match_lapse,We=xe.start.seconds,et=xe.end.seconds);const tt=[];return Ze.forEach(ot=>{if(ot.starting_second!==void 0&&ot.ending_second!==void 0){let vt=ot.starting_second,yt=ot.ending_second;Oe!==null&&Fe!==null&&We!==null&&et!==null&&(Oe===Fe||et>We?(vt<We&&(vt=We),yt>et&&(yt=et)):(ot.match_lapse===Oe&&vt<We&&(vt=We),ot.match_lapse===Fe&&yt>et&&(yt=et))),tt.push({match_lapse:ot.match_lapse,start:vt,end:yt})}}),tt}function re(Ze){return Ze.reduce((xe,Oe)=>xe+(Oe.end-Oe.start),0)}const q=new Map,ae=new Map;async function ee(){try{q.clear(),ae.clear(),h.value=U(),m.value=U();const Ze=a.homeFilteredChains.length>0?J(a.homeFilteredChains,a.timeFromTimeline):[],xe=a.awayFilteredChains.length>0?J(a.awayFilteredChains,a.timeFromTimeline):[],Oe=a.homeFilteredChainsShadows.length>0?J(a.homeFilteredChainsShadows,a.timeFromTimelineShadowsHome):[],Fe=a.awayFilteredChainsShadows.length>0?J(a.awayFilteredChainsShadows,a.timeFromTimelineShadowsAway):[],We={timeRanges:Ze,teams:[a.homeTeamId],ballZones:a.homeFilteredBallZones},et={timeRanges:xe,teams:[a.awayTeamId],ballZones:a.awayFilteredBallZones},tt={timeRanges:Oe,teams:[a.homeTeamId],ballZones:a.homeFilteredBallZonesShadows},ot={timeRanges:Fe,teams:[a.awayTeamId],ballZones:a.awayFilteredBallZonesShadows},vt=[],yt=[],It=[],Ut=[],Gt=Ze.length>0?await r.getPositions(a.gameId,We):[],st=xe.length>0?await r.getPositions(a.gameId,et):[],Ke=Oe.length>0?await r.getPositions(a.gameId,tt):[],ht=Fe.length>0?await r.getPositions(a.gameId,ot):[];Gt&&Gt.size>0&&Gt.forEach(mt=>{if(mt.teamId===a.homeTeamId){const Pt={id:mt.playerId,team:mt.teamId,is_home:!0,is_titular:ce(mt.playerId),number:Q(mt.playerId),position:$(mt.playerId),top:`${(1-mt.avgY)*100}%`,left:`${mt.avgX*100}%`,topRaw:(1-mt.avgY)*407,leftRaw:mt.avgX*611,isVisible:a.playersSelected.includes(mt.id)};de(Pt),vt.push(Pt),q.set(mt.playerId,Pt)}}),st&&st.size>0&&st.forEach(mt=>{if(mt.teamId===a.awayTeamId){const Pt={id:mt.playerId,team:mt.teamId,is_home:!1,is_titular:ce(mt.playerId),number:Q(mt.playerId),position:$(mt.playerId),top:`${(1-mt.avgY)*100}%`,left:`${mt.avgX*100}%`,topRaw:(1-mt.avgY)*407,leftRaw:mt.avgX*611,isVisible:a.playersSelected.includes(mt.id)};de(Pt),yt.push(Pt),q.set(mt.playerId,Pt)}}),Ke&&Ke.size>0&&Ke.forEach(mt=>{if(mt.teamId===a.homeTeamId){const Pt={id:mt.playerId,team:mt.teamId,is_home:!0,is_titular:ce(mt.playerId),number:Q(mt.playerId),position:$(mt.playerId),top:`${(1-mt.avgY)*100}%`,left:`${mt.avgX*100}%`,topRaw:(1-mt.avgY)*407,leftRaw:mt.avgX*611};It.push(Pt),ae.set(mt.playerId,Pt)}}),ht&&ht.size>0&&ht.forEach(mt=>{if(mt.teamId===a.awayTeamId){const Pt={id:mt.playerId,team:mt.teamId,is_home:!1,is_titular:ce(mt.playerId),number:Q(mt.playerId),position:$(mt.playerId),top:`${(1-mt.avgY)*100}%`,left:`${mt.avgX*100}%`,topRaw:(1-mt.avgY)*407,leftRaw:mt.avgX*611};Ut.push(Pt),ae.set(mt.playerId,Pt)}}),_("home-possession-total-seconds",re(Ze),a.homeTeamId),_("away-possession-total-seconds",re(xe),a.awayTeamId),W.value.length===0?W.value=[...yt,...vt]:W.value.forEach(mt=>{const Pt=q.get(mt.id);Pt&&(mt.top=Pt.top,mt.left=Pt.left,mt.topRaw=Pt.topRaw,mt.leftRaw=Pt.leftRaw,mt.isVisible=Pt.isVisible,mt.number=Pt.number,mt.team=Pt.team,mt.position=Pt.position,mt.is_home=Pt.is_home,mt.is_titular=Pt.is_titular),f.value.forEach(Et=>{const nt=Et.from.id===mt.id?Et.from:null,ct=Et.to.id===mt.id?Et.to:null;(nt||ct)&&(nt&&(Et.from=mt),ct&&(Et.to=mt),ge(Et.from,Et.to,!0))}),l.value.forEach(Et=>{(Et.from.id===mt.id?Et.from:Et.to.id===mt.id&&Et.to)&&ge(Et.from,Et.to,!0)})}),v.value=[...Ut,...It]}catch(Ze){console.error("Error calculating filtered positions:",Ze),W.value=[],v.value=[],h.value=U(),m.value=U()}}function $(Ze){if(!Ze||!a.playersInfo)return 0;const{homeTeam:xe,awayTeam:Oe}=a.playersInfo,Fe=xe.find(We=>We.player_id===Ze)||Oe.find(We=>We.player_id===Ze);return Fe?Fe.position_id:0}function Q(Ze){if(!Ze||!a.playersInfo)return 0;const{homeTeam:xe,awayTeam:Oe}=a.playersInfo,Fe=xe.find(We=>We.player_id===Ze)||Oe.find(We=>We.player_id===Ze);return Fe?Fe.jersey:0}function ce(Ze){if(!Ze||!a.playersInfo)return!1;const xe=a.playersInfo.homeTeam.find(Oe=>Oe.player_id===Ze)||a.playersInfo.awayTeam.find(Oe=>Oe.player_id===Ze);return xe?xe.is_titular:!1}function de(Ze){if(!Ze||!a.playersSelected.includes(Ze.id)||Ze.position===1)return;const xe=Ze.is_home?h:m;xe.value||(xe.value=U()),(xe.value.minimumX===0||xe.value.minimumX>Ze.leftRaw)&&(xe.value.minimumX=Ze.leftRaw),(xe.value.maximumX===MV||xe.value.maximumX<Ze.leftRaw)&&(xe.value.maximumX=Ze.leftRaw),(xe.value.minimumY===0||xe.value.minimumY>Ze.topRaw)&&(xe.value.minimumY=Ze.topRaw),(xe.value.maximumY===PV||xe.value.maximumY<Ze.topRaw)&&(xe.value.maximumY=Ze.topRaw)}t.watch(()=>[a.homeFilteredChains,a.awayFilteredChains,a.homeFilteredChainsShadows,a.awayFilteredChainsShadows,z.value,a.isDataLoaded,a.playersInfo],()=>{a.isDataLoaded&&ee()},{immediate:!0,deep:!0});function he(Ze,xe,Oe,Fe,We=!1){const et=Oe-Ze,tt=Fe-xe;let ot=Math.atan2(tt,et)*(180/Math.PI);return We&&(ot+=90),ot}function pe(Ze){return Ze*(Math.PI/180)}function ne(Ze){if(!g.value||g.value.length===0)return 1;const xe=Math.max(...g.value.map(We=>We.count||1));if(xe<=0)return 1;const Oe=Ze.count||1;if(xe===1)return 5;const Fe=Oe/xe*5;return Fe<.5?.5:Fe}function le(Ze){return ne(Ze)>=3.5?Ze.is_home?"white":"black":""}const ie=t.computed(()=>{if(a.customDistance&&a.customDistance==="block"||!a.areConnectionsVisible||g.value.length===0||!D.value.size)return[];const Ze=g.value.reduce((xe,Oe)=>{if(D.value.has(Oe.to)&&D.value.has(Oe.from)&&a.playersSelected.includes(Oe.from)&&a.playersSelected.includes(Oe.to)){const Fe=`${Oe.from}-${Oe.to}`,We=`${Oe.to}-${Oe.from}`,et=xe.get(Fe)||xe.get(We),tt=D.value.get(Oe.from).leftRaw,ot=D.value.get(Oe.from).topRaw,vt=D.value.get(Oe.to).leftRaw,yt=D.value.get(Oe.to).topRaw,It=he(tt,ot,vt,yt,!0),Ut=pe(It),Gt=Math.cos(Ut)*IV,st=Math.sin(Ut)*IV;et?et.left?et.right={...Oe,playerFrom:D.value.get(Oe.from),playerTo:D.value.get(Oe.to),is_titular:D.value.get(Oe.from).is_titular,is_home:D.value.get(Oe.from).is_home,x1:tt+Gt,y1:ot+st,x2:vt+Gt,y2:yt+st}:et.left={...Oe,playerFrom:D.value.get(Oe.from),playerTo:D.value.get(Oe.to),is_titular:D.value.get(Oe.from).is_titular,is_home:D.value.get(Oe.from).is_home,x1:tt+Gt,y1:ot+st,x2:vt+Gt,y2:yt+st}:xe.set(Fe,{left:{...Oe,playerFrom:D.value.get(Oe.from),playerTo:D.value.get(Oe.to),is_titular:D.value.get(Oe.from).is_titular,is_home:D.value.get(Oe.from).is_home,x1:tt+Gt,y1:ot+st,x2:vt+Gt,y2:yt+st},right:null})}return xe},new Map);return Array.from(Ze.values()).filter(xe=>xe.left||xe.right)});function me(Ze){g.value=Ze}const ve=t.computed(()=>Ze=>Ze.isCandidateToDelete?"#F7A138":P.value.length>0&&(Ze.isDistanceActive||Ze.isDistanceCandidate||Ze.isDistanceSelected)?"#44E3E7":"#fff"),ye=t.computed(()=>(Ze,xe=!1)=>Ze.isDistanceActive?"#41AAEB":Ze.is_home?xe?"#797E89":Ze.is_titular?"#2d65d4":"#20539F":xe?"#515869":Ze.is_titular?"#CBEE6B":"#789626"),ke=t.computed(()=>Ze=>Ze.is_home?Ze.is_titular?"#6891F8":"#4376F6":Ze.is_titular?"#CBEE6B":"#789626"),Ee=t.computed(()=>(Ze,xe=!1)=>Ze.is_home||Ze.isDistanceActive||xe?"#fff":Ze.is_titular?"#000":"#fff");function Te(Ze){if(!Ze)return"";const xe=Ze.trim().split(",");if(xe.length>=2){const Oe=xe[0].trim().split(" ")[0];return`${xe[1].trim().split(" ")[0].charAt(0)}. ${Oe}`}return Ze}function Pe(Ze,xe){a.customDistance?(xe.isDistanceCandidate=!0,i.value=xe):Le(Ze,xe)}function Be(Ze){a.customDistance?(Ze.isDistanceCandidate=!1,i.value=null):je()}function Le(Ze,xe){const{homeTeam:Oe,awayTeam:Fe}=a.playersInfo,We=Oe.find(tt=>tt.player_id===xe.id)||Fe.find(tt=>tt.player_id===xe.id);We&&We.name&&(We.formattedName=Te(We.name));const et=Ze.target.getBoundingClientRect();b.value={show:!0,x:et.left+et.width/2,y:et.top,player:We||xe},t.nextTick(()=>{if(d.value){const tt=d.value.offsetHeight;b.value.y=et.top-tt-5}})}function je(){b.value.show=!1}function Me(Ze){!a.customDistance||T.value||(Ze.isDistanceCandidate=!0,i.value=Ze)}function Re(Ze){Ze.isDistanceActive||(Ze.isDistanceCandidate=!1,i.value=null)}function Ie(Ze){const xe=Ze.from,Oe=Ze.to,Fe=xe.type==="line"?xe:Oe.type==="line"?Oe:null,We=xe.type!=="line"?xe:Oe.type!=="line"?Oe:null;if(Fe&&We){const et=Fe[a.customDistance];et&&(et.find(tt=>tt.id===We.id)||et.push(We))}}function ge(Ze,xe,Oe=!1){if(!(Ze.type==="line"&&xe.type==="line")&&Ze&&xe){const Fe=`${Ze.id}-${xe.id}`;if(!Oe){if(Ze[B.value]&&Ze[B.value].includes(Fe))return;Ze[B.value]?Ze[B.value].push(Fe):Ze[B.value]=[Fe],xe[B.value]?xe[B.value].push(Fe):xe[B.value]=[Fe],Ze.isDistanceActive=!1,Ze.isDistanceSelected=!0,xe.isDistanceActive=!1,xe.isDistanceSelected=!0}Ze.distanceLeft=Ze.leftRaw||xe.leftRaw,Ze.distanceTop=Ze.topRaw||xe.topRaw,xe.distanceLeft=xe.leftRaw||Ze.leftRaw,xe.distanceTop=xe.topRaw||Ze.topRaw;const We=Math.abs(Ze.distanceLeft-xe.distanceLeft),et=Math.abs(Ze.distanceTop-xe.distanceTop),tt=We*y.value,ot=et*x.value,vt=Math.sqrt(tt*tt+ot*ot).toFixed(0),yt=Math.min(Ze.distanceLeft,xe.distanceLeft),It=Math.min(Ze.distanceTop,xe.distanceTop),Ut=yt+Math.abs(Ze.distanceLeft-xe.distanceLeft)/2,Gt=It+Math.abs(Ze.distanceTop-xe.distanceTop)/2,st=yt===Ze.distanceLeft,Ke=It===Ze.distanceTop,ht=0,mt=0,Pt=st?Ze.distanceLeft+ht:Ze.distanceLeft-ht,Et=Ke?Ze.distanceTop+mt:Ze.distanceTop-mt,nt=st?xe.distanceLeft-ht:xe.distanceLeft+ht,ct=Ke?xe.distanceTop-mt:xe.distanceTop+mt,Ye={from:Ze,to:xe,distanceInMeters:vt,lineLabelLeft:Ut,lineLabelTop:Gt,fromLineLeft:Pt,fromLineTop:Et,toLineLeft:nt,toLineTop:ct,id:Fe};if(a.customDistance==="block")if(Oe){const lt=l.value.find(wt=>wt.id===Fe);lt&&(lt.from=Ze,lt.to=xe,lt.distanceInMeters=vt,lt.lineLabelLeft=Ut,lt.lineLabelTop=Gt,lt.fromLineLeft=Pt,lt.fromLineTop=Et,lt.toLineLeft=nt,lt.toLineTop=ct)}else l.value.push(Ye),Ie(Ye);else if(a.customDistance==="players")if(Oe){const lt=f.value.find(wt=>wt.id===Fe);lt&&(lt.from=Ze,lt.to=xe,lt.distanceInMeters=vt,lt.lineLabelLeft=Ut,lt.lineLabelTop=Gt,lt.fromLineLeft=Pt,lt.fromLineTop=Et,lt.toLineLeft=nt,lt.toLineTop=ct)}else f.value.push(Ye),Ie(Ye);Ce(),n.value=null,i.value=null}}function Ce(){const Ze=l.value.filter(Oe=>{let Fe=Oe.from.isVisible!==!1,We=Oe.to.isVisible!==!1;return Oe.from.type==="line"&&Oe.from.block&&(Fe=Oe.from.block.some(et=>et.isVisible!==!1)),Oe.to.type==="line"&&Oe.to.block&&(We=Oe.to.block.some(et=>et.isVisible!==!1)),Fe&&We}),xe=f.value.filter(Oe=>{let Fe=Oe.from.isVisible,We=Oe.to.isVisible;return Oe.from.type==="line"&&Oe.from.players&&(Fe=Oe.from.players.some(et=>et.isVisible)),Oe.to.type==="line"&&Oe.to.players&&(We=Oe.to.players.some(et=>et.isVisible)),Fe&&We});_("change-custom-distances",{blockDistancesTotal:Ze.length,playerDistancesTotal:xe.length})}function we(Ze){!a.customDistance||T.value||n.value&&n.value.type==="line"&&Ze.type==="line"||(Ze.isDistanceActive=!0,n.value&&!n.value.team?ge(n.value,Ze):(n.value=Ze,i.value=null))}function Ve(Ze){!a.customDistance||T.value||(Ze.isDistanceActive=!Ze.isDistanceActive,n.value&&n.value.id!==Ze.id&&(ge(n.value,Ze),n.value&&(n.value.isDistanceActive=!1,n.value.isDistanceSelected=!0)),n.value=Ze.isDistanceActive?Ze:null)}function Ne(){a.customDistance&&(a.customDistance==="players"?(f.value.forEach(Ze=>{Ze.from.isDistanceActive=!1,Ze.from.isDistanceSelected=!1,Ze.to.isDistanceActive=!1,Ze.to.isDistanceSelected=!1,delete Ze.from.activeDistancesPlayers,delete Ze.to.activeDistancesPlayers,T.value&&T.value.id===Ze.id&&(T.value=null,Ze.isCandidateToDelete=!1,Ze.from.isCandidateToDelete=!1,Ze.to.isCandidateToDelete=!1);const xe=Ze.from.type==="line"?Ze.from:Ze.to.type==="line"?Ze.to:null;xe&&xe.players&&(xe.players=[])}),f.value=[]):a.customDistance==="block"&&(l.value.forEach(Ze=>{Ze.from.isDistanceActive=!1,Ze.from.isDistanceSelected=!1,Ze.to.isDistanceActive=!1,Ze.to.isDistanceSelected=!1,delete Ze.from.activeDistancesBlock,delete Ze.to.activeDistancesBlock,T.value&&T.value.id===Ze.id&&(T.value=null,Ze.isCandidateToDelete=!1,Ze.from.isCandidateToDelete=!1,Ze.to.isCandidateToDelete=!1);const xe=Ze.from.type==="line"?Ze.from:Ze.to.type==="line"?Ze.to:null;xe&&xe.block&&(xe.block=[])}),l.value=[]),u.value.forEach(Ze=>{Ze.isDistanceActive=!1,Ze.isDistanceCandidate=!1,Ze.isDistanceSelected=!1,Ze.isCandidateToDelete=!1,delete Ze.activeDistancesPlayers,delete Ze.activeDistancesBlock}),w.value.forEach(Ze=>{Ze.isDistanceActive=!1,Ze.isDistanceCandidate=!1,Ze.isDistanceSelected=!1,Ze.isCandidateToDelete=!1,delete Ze.activeDistancesPlayers,delete Ze.activeDistancesBlock}),n.value=null,i.value=null,T.value=null,Ce())}function Ue(Ze){if(!(T.value&&T.value.id!==Ze.id))if(!Ze.isCandidateToDelete)T.value=Ze,Ze.isCandidateToDelete=!0,Ze.from.isCandidateToDelete=!0,Ze.to.isCandidateToDelete=!0;else{const xe=Ze.from.type==="line"?Ze.from:Ze.to.type==="line"?Ze.to:null,Oe=Ze.from.type!=="line"?Ze.from:Ze.to.type!=="line"?Ze.to:null;if(xe&&Oe){const Fe=xe[a.customDistance];Fe&&(xe[a.customDistance]=Fe.filter(We=>We.id!==Oe.id))}a.customDistance==="players"?f.value=f.value.filter(Fe=>Fe.id!==Ze.id):a.customDistance==="block"&&(l.value=l.value.filter(Fe=>Fe.id!==Ze.id)),Ze.from.isDistanceActive=!1,Ze.from.isCandidateToDelete=!1,Ze.from.isDistanceCandidate=!1,Ze.to.isDistanceActive=!1,Ze.to.isCandidateToDelete=!1,Ze.to.isDistanceCandidate=!1,Ze.isCandidateToDelete=!1,T.value=null,Ze.from[B.value]=Ze.from[B.value].filter(Fe=>Fe!==Ze.id),Ze.to[B.value]=Ze.to[B.value].filter(Fe=>Fe!==Ze.id),Ze.from.isDistanceSelected=Ze.from[B.value].length>0,Ze.to.isDistanceSelected=Ze.to[B.value].length>0,Ce()}}function Xe(){T.value&&(T.value.isCandidateToDelete=!1,T.value.from.isCandidateToDelete=!1,T.value.to.isCandidateToDelete=!1,T.value=null)}return t.onMounted(()=>{document.addEventListener("click",Xe)}),t.onBeforeUnmount(()=>{document.removeEventListener("click",Xe)}),o({setConnections:me,clearCustomDistances:Ne}),(Ze,xe)=>(t.openBlock(),t.createElementBlock("div",{class:"soccer-field",style:t.normalizeStyle(S.value)},[b.value.show?(t.openBlock(),t.createBlock(Rmt,{key:`tooltip-${b.value.player.id}`,show:b.value.show,player:b.value.player,x:b.value.x,y:b.value.y,ref_key:"tooltipBoxRef",ref:d},null,8,["show","player","x","y"])):t.createCommentVNode("",!0),t.createElementVNode("div",Vmt,[t.createElementVNode("div",jmt,[a.isDataLoaded?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",Umt,[...xe[1]||(xe[1]=[t.createElementVNode("div",{class:"loading-spinner-small"},"⚡",-1),t.createElementVNode("span",null,"Calculando posiciones...",-1)])])),t.createElementVNode("div",Gmt,[(t.openBlock(),t.createElementBlock("svg",Hmt,[xe[2]||(xe[2]=t.createStaticVNode('<defs data-v-0cf54bed><marker id="arrow-left-home" markerWidth="20" markerHeight="20" refX="5" refY="8" orient="auto" markerUnits="strokeWidth" data-v-0cf54bed><path d="M8.8771 15.8791C8.44757 16.3086 7.75102 16.3085 7.32144 15.8791L0.321438 8.87808C-0.108139 8.4485 -0.108139 7.75297 0.321438 7.32339L7.32144 0.322414C7.75102 -0.107031 8.44757 -0.107119 8.8771 0.322414C9.30663 0.751947 9.30655 1.44849 8.8771 1.87808L2.84878 7.9064L2.84878 8.29507L8.8771 14.3234C9.30655 14.753 9.30663 15.4495 8.8771 15.8791Z" fill="#33E4FF" data-v-0cf54bed></path></marker><marker id="arrow-right-home" markerWidth="20" markerHeight="20" refX="8" refY="8" orient="auto" markerUnits="strokeWidth" data-v-0cf54bed><path d="M0.322117 15.8791C0.75165 16.3086 1.44819 16.3085 1.87778 15.8791L8.87778 8.87808C9.30736 8.4485 9.30736 7.75297 8.87778 7.32339L1.87778 0.322414C1.44819 -0.107031 0.75165 -0.107119 0.322117 0.322414C-0.107416 0.751947 -0.107329 1.44849 0.322117 1.87808L6.35044 7.9064L6.35044 8.29507L0.322117 14.3234C-0.107329 14.753 -0.107416 15.4495 0.322117 15.8791Z" fill="#33E4FF" data-v-0cf54bed></path></marker><marker id="arrow-left-away" markerWidth="20" markerHeight="20" refX="5" refY="8" orient="auto" markerUnits="strokeWidth" data-v-0cf54bed><path d="M8.8771 15.8791C8.44757 16.3086 7.75102 16.3085 7.32144 15.8791L0.321438 8.87808C-0.108139 8.4485 -0.108139 7.75297 0.321438 7.32339L7.32144 0.322414C7.75102 -0.107031 8.44757 -0.107119 8.8771 0.322414C9.30663 0.751947 9.30655 1.44849 8.8771 1.87808L2.84878 7.9064L2.84878 8.29507L8.8771 14.3234C9.30655 14.753 9.30663 15.4495 8.8771 15.8791Z" fill="#CBEE6B" data-v-0cf54bed></path></marker><marker id="arrow-right-away" markerWidth="20" markerHeight="20" refX="8" refY="8" orient="auto" markerUnits="strokeWidth" data-v-0cf54bed><path d="M0.322117 15.8791C0.75165 16.3086 1.44819 16.3085 1.87778 15.8791L8.87778 8.87808C9.30736 8.4485 9.30736 7.75297 8.87778 7.32339L1.87778 0.322414C1.44819 -0.107031 0.75165 -0.107119 0.322117 0.322414C-0.107416 0.751947 -0.107329 1.44849 0.322117 1.87808L6.35044 7.9064L6.35044 8.29507L0.322117 14.3234C-0.107329 14.753 -0.107416 15.4495 0.322117 15.8791Z" fill="#CBEE6B" data-v-0cf54bed></path></marker></defs>',1)),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(k.value,Oe=>(t.openBlock(),t.createElementBlock("path",{key:Oe.id,d:Oe.d,stroke:Oe.isCandidateToDelete?"#F7A138":"#4AC9FF","stroke-width":"3","stroke-opacity":T.value?Oe.isCandidateToDelete?1:0:Oe.isDistanceActive||Oe.isDistanceCandidate||Oe[e.customDistance].some(Fe=>Fe&&Fe.isVisible)?1:0,class:"distance-line",onMouseover:Fe=>Me(Oe),onMouseout:Fe=>Re(Oe),onClick:t.withModifiers(Fe=>we(Oe),["prevent","stop"])},null,40,Zmt))),128)),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(ie.value,(Oe,Fe)=>(t.openBlock(),t.createElementBlock("g",{key:`cc-${Fe}`},[Oe.left?(t.openBlock(),t.createElementBlock("path",{key:0,id:`pl-${Fe}`,d:`M ${Oe.left.x1} ${Oe.left.y1} L ${Oe.left.x2} ${Oe.left.y2}`,style:t.normalizeStyle({stroke:ke.value(Oe.left),"stroke-width":ne(Oe.left)})},null,12,Wmt)):t.createCommentVNode("",!0),Oe.right?(t.openBlock(),t.createElementBlock("path",{key:1,id:`pr-${Fe}`,d:`M ${Oe.right.x1} ${Oe.right.y1} L ${Oe.right.x2} ${Oe.right.y2}`,style:t.normalizeStyle({stroke:ke.value(Oe.right),"stroke-width":ne(Oe.right)})},null,12,Xmt)):t.createCommentVNode("",!0),Oe.left?(t.openBlock(),t.createElementBlock("text",{key:2,style:t.normalizeStyle({fill:ke.value(Oe.left),"font-size":"8px","dominant-baseline":"central",stroke:le(Oe.left),"stroke-width":ne(Oe.left)>=3.5?"1":"0"})},[t.createElementVNode("textPath",{"xlink:href":`#pl-${Fe}`,startOffset:"40%"},"➤",8,qmt)],4)):t.createCommentVNode("",!0),Oe.right?(t.openBlock(),t.createElementBlock("text",{key:3,style:t.normalizeStyle({fill:ke.value(Oe.right),"font-size":"8px","dominant-baseline":"central",stroke:le(Oe.right),"stroke-width":ne(Oe.right)>=3.5?"1":"0"})},[t.createElementVNode("textPath",{"xlink:href":`#pr-${Fe}`,startOffset:"40%"},"➤",8,Ymt)],4)):t.createCommentVNode("",!0)]))),128)),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(O.value,Oe=>(t.openBlock(),t.createElementBlock("g",{key:Oe.id},[t.createElementVNode("rect",{x:Oe.leftRaw,y:Oe.topRaw,transform:"translate(-18, -18)",height:"36",width:"36","stroke-width":Oe.is_titular?2:1,fill:ye.value(Oe,!0),stroke:"#fff",opacity:Oe.is_titular?1:.8,rx:"18",ry:"18",class:t.normalizeClass({"player-marker__hidden":!a.playersSelectedShadows.includes(Oe.id)})},null,10,Jmt),t.createElementVNode("text",{x:Oe.leftRaw,y:Oe.topRaw,"text-anchor":"middle","dominant-baseline":"middle",dy:"1","font-size":"18",fill:Ee.value(Oe,!0),opacity:Oe.is_titular?1:.8,"font-family":"'Poppins-SemiBold', sans-serif",class:t.normalizeClass({"player-marker__hidden":!a.playersSelectedShadows.includes(Oe.id)})},t.toDisplayString(Oe.number),11,$mt)]))),128)),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(M.value,Oe=>(t.openBlock(),t.createElementBlock("g",{key:Oe.id,style:t.normalizeStyle({opacity:E(Oe)}),class:t.normalizeClass({"player-marker__hidden":!Oe.isVisible}),onMouseenter:Fe=>Pe(Fe,Oe),onMouseleave:Fe=>Be(Oe),onClick:t.withModifiers(Fe=>Ve(Oe),["prevent","stop"])},[t.createElementVNode("rect",{x:Oe.leftRaw,y:Oe.topRaw,transform:"translate(-18, -18)",height:"36",width:"36","stroke-width":Oe.is_titular?2:1,fill:ye.value(Oe),stroke:ve.value(Oe),opacity:Oe.is_titular?1:.8,rx:"18",ry:"18",style:t.normalizeStyle({cursor:e.customDistance?"inherit":"pointer","pointer-events":"all"})},null,12,Qmt),t.createElementVNode("text",{x:Oe.leftRaw,y:Oe.topRaw,"text-anchor":"middle","dominant-baseline":"middle",dy:"1","font-size":"18",fill:Ee.value(Oe),opacity:Oe.is_titular?1:.8,"font-family":"'Poppins-SemiBold', sans-serif",style:t.normalizeStyle({cursor:e.customDistance?"inherit":"pointer","pointer-events":"all"})},t.toDisplayString(Oe.number),13,e1t)],46,Kmt))),128)),e.isDistanceVisible&&V.value?(t.openBlock(),t.createElementBlock("g",t1t,[t.createElementVNode("rect",{width:`${h.value.maximumX-h.value.minimumX}`,height:"24",x:h.value.minimumX,y:"5",rx:"0",ry:"0",fill:"#20539F"},null,8,a1t),t.createElementVNode("line",{style:{stroke:"#33E4FF","stroke-width":1.5,opacity:"1"},"stroke-dasharray":"5,5",x1:h.value.minimumX,y1:"16",x2:h.value.maximumX,y2:"16","marker-start":"url(#arrow-left-home)","marker-end":"url(#arrow-right-home)"},null,8,r1t),t.createElementVNode("g",null,[t.createElementVNode("rect",{x:h.value.minimumX+(h.value.maximumX-h.value.minimumX)/2-41.5979,y:"5",width:"83.1958",height:"23.1958",rx:"11.5979",stroke:"#33E4FF","stroke-width":"0.804237"},null,8,n1t),t.createElementVNode("rect",{x:h.value.minimumX+(h.value.maximumX-h.value.minimumX)/2-41.5979,y:"5",width:"83.1958",height:"23.1958",rx:"11.5979",fill:"#547CB1","fill-opacity":"1"},null,8,i1t),t.createElementVNode("text",{x:h.value.minimumX+(h.value.maximumX-h.value.minimumX)/2,y:"18","text-anchor":"middle","dominant-baseline":"middle","font-size":"15",fill:"white"},t.toDisplayString(((h.value.maximumX-h.value.minimumX)*y.value).toFixed(0))+" m ",9,o1t)]),t.createElementVNode("rect",{width:24,height:`${h.value.maximumY-h.value.minimumY}`,x:"15",y:h.value.minimumY,rx:"0",ry:"0",fill:"#20539F"},null,8,s1t),t.createElementVNode("line",{style:{stroke:"#33E4FF","stroke-width":1.5,opacity:"1"},"stroke-dasharray":"5,5",x1:"25",y1:h.value.minimumY,x2:"25",y2:h.value.maximumY,"marker-start":"url(#arrow-left-home)","marker-end":"url(#arrow-right-home)"},null,8,l1t),t.createElementVNode("g",null,[t.createElementVNode("rect",{x:"15",y:h.value.minimumY+(h.value.maximumY-h.value.minimumY)/2-41.5979,width:"23.1958",height:"83.1958",rx:"11.5979",stroke:"#33E4FF","stroke-width":"0.804237"},null,8,c1t),t.createElementVNode("rect",{x:"15",y:h.value.minimumY+(h.value.maximumY-h.value.minimumY)/2-41.5979,width:"23.1958",height:"83.1958",rx:"11.5979",fill:"#547CB1","fill-opacity":"1"},null,8,u1t),t.createElementVNode("text",{x:"24",y:h.value.minimumY+(h.value.maximumY-h.value.minimumY)/2,"text-anchor":"middle","dominant-baseline":"middle","font-size":"15",fill:"white","writing-mode":"vertical-lr"},t.toDisplayString(((h.value.maximumY-h.value.minimumY)*x.value).toFixed(0))+" m ",9,d1t)])])):t.createCommentVNode("",!0),e.isDistanceVisible&&G.value?(t.openBlock(),t.createElementBlock("g",h1t,[t.createElementVNode("rect",{width:`${m.value.maximumX-m.value.minimumX}`,height:"24",x:m.value.minimumX,y:"368",rx:"0",ry:"0",fill:"#20539F"},null,8,p1t),t.createElementVNode("line",{style:{stroke:"#cbee6b","stroke-width":1.5,opacity:"1"},"stroke-dasharray":"5,5",x1:m.value.minimumX,y1:"379",x2:m.value.maximumX,y2:"379","marker-start":"url(#arrow-left-away)","marker-end":"url(#arrow-right-away)"},null,8,f1t),t.createElementVNode("g",null,[t.createElementVNode("rect",{x:m.value.minimumX+(m.value.maximumX-m.value.minimumX)/2-41.5979,y:"368",width:"83.1958",height:"23.1958",rx:"11.5979",stroke:"#CBEE6B","stroke-width":"0.804237"},null,8,m1t),t.createElementVNode("rect",{x:m.value.minimumX+(m.value.maximumX-m.value.minimumX)/2-41.5979,y:"368",width:"83.1958",height:"23.1958",rx:"11.5979",fill:"#547CB1","fill-opacity":"1"},null,8,g1t),t.createElementVNode("text",{x:m.value.minimumX+(m.value.maximumX-m.value.minimumX)/2,y:"381","text-anchor":"middle","dominant-baseline":"middle","font-size":"15",fill:"white"},t.toDisplayString(((m.value.maximumX-m.value.minimumX)*y.value).toFixed(0))+" m ",9,y1t)]),t.createElementVNode("rect",{width:24,height:`${m.value.maximumY-m.value.minimumY}`,x:"578",y:m.value.minimumY,rx:"0",ry:"0",fill:"#20539F"},null,8,v1t),t.createElementVNode("line",{style:{stroke:"#cbee6b","stroke-width":1.5,opacity:"1"},"stroke-dasharray":"5,5",x1:"588",y1:m.value.minimumY,x2:"588",y2:m.value.maximumY,"marker-start":"url(#arrow-left-away)","marker-end":"url(#arrow-right-away)"},null,8,b1t),t.createElementVNode("g",null,[t.createElementVNode("rect",{x:"576",y:m.value.minimumY+(m.value.maximumY-m.value.minimumY)/2-41.5979,width:"23.1958",height:"83.1958",rx:"11.5979",stroke:"#CBEE6B","stroke-width":"0.804237"},null,8,x1t),t.createElementVNode("rect",{x:"576",y:m.value.minimumY+(m.value.maximumY-m.value.minimumY)/2-41.5979,width:"23.1958",height:"83.1958",rx:"11.5979",fill:"#547CB1","fill-opacity":"1"},null,8,_1t),t.createElementVNode("text",{x:"586",y:m.value.minimumY+(m.value.maximumY-m.value.minimumY)/2,"text-anchor":"middle","dominant-baseline":"middle","font-size":"15",fill:"white","writing-mode":"vertical-lr"},t.toDisplayString(((m.value.maximumY-m.value.minimumY)*x.value).toFixed(0))+" m ",9,w1t)])])):t.createCommentVNode("",!0),n.value&&i.value?(t.openBlock(),t.createElementBlock("path",{key:2,d:`M ${n.value.leftRaw||i.value.leftRaw} ${n.value.topRaw||i.value.topRaw} L ${i.value.leftRaw||n.value.leftRaw} ${i.value.topRaw||n.value.topRaw}`,style:{stroke:"#44E3E7","stroke-width":2}},null,8,k1t)):t.createCommentVNode("",!0),e.customDistance&&e.customDistance==="block"?(t.openBlock(),t.createElementBlock(t.Fragment,{key:3},[e.isAwayTeamVisible?(t.openBlock(),t.createElementBlock("path",{key:0,d:`M${m.value.minimumX} ${m.value.minimumY}H${m.value.maximumX}V${m.value.maximumY}H${m.value.minimumX}`,fill:"#CBEE6B","fill-opacity":"0.4"},null,8,S1t)):t.createCommentVNode("",!0),e.isHomeTeamVisible?(t.openBlock(),t.createElementBlock("path",{key:1,d:`M${h.value.minimumX} ${h.value.minimumY}H${h.value.maximumX}V${h.value.maximumY}H${h.value.minimumX}`,fill:"#33C9FF","fill-opacity":"0.4"},null,8,T1t)):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(w.value,(Oe,Fe)=>(t.openBlock(),t.createElementBlock("path",{key:`bloc-boundary-${Fe}`,d:Oe.d,stroke:Oe.isCandidateToDelete?"#F7A138":"#33E4FF","stroke-width":"4","stroke-opacity":T.value?Oe.isCandidateToDelete?1:0:(Oe.isDistanceActive||Oe.isDistanceCandidate||Oe.isDistanceSelected)&&Oe.isVisible?1:0,onMouseover:We=>Me(Oe),onMouseout:We=>Re(Oe),onClick:t.withModifiers(We=>we(Oe),["prevent","stop"])},null,40,C1t))),128))],64)):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(P.value,(Oe,Fe)=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:`active-distance-${Fe}`},[Oe.from.isVisible&&Oe.to.isVisible?(t.openBlock(),t.createElementBlock("line",{key:0,style:t.normalizeStyle({stroke:Oe.isCandidateToDelete?"#F7A138":"#38F3F7","stroke-width":2,opacity:L(Oe)}),"stroke-dasharray":"2,2",x1:Oe.fromLineLeft,y1:Oe.fromLineTop,x2:Oe.toLineLeft,y2:Oe.toLineTop},null,12,E1t)):t.createCommentVNode("",!0),Oe.from.team?(t.openBlock(),t.createElementBlock("g",{key:1,style:t.normalizeStyle({opacity:L(Oe)}),class:t.normalizeClass({"player-marker__hidden":!Oe.from.isVisible}),onMouseenter:We=>{C(Oe),Pe(We,Oe.from)},onMouseleave:We=>{I(),Be(Oe.from)},onClick:t.withModifiers(We=>Ve(Oe.from),["prevent","stop"])},[t.createElementVNode("rect",{x:Oe.from.leftRaw,y:Oe.from.topRaw,transform:"translate(-18, -18)",height:"36",width:"36","stroke-width":Oe.from.is_titular?2:1,fill:ye.value(Oe.from),stroke:ve.value(Oe.from),opacity:Oe.from.is_titular?1:.8,rx:"18",ry:"18",style:t.normalizeStyle({cursor:e.customDistance?"inherit":"pointer","pointer-events":"all"})},null,12,M1t),t.createElementVNode("text",{x:Oe.from.leftRaw,y:Oe.from.topRaw,"text-anchor":"middle","dominant-baseline":"middle",dy:"1","font-size":"18",fill:Ee.value(Oe.from),opacity:Oe.from.is_titular?1:.8,"font-family":"'Poppins-SemiBold', sans-serif",style:t.normalizeStyle({cursor:e.customDistance?"inherit":"pointer","pointer-events":"all"})},t.toDisplayString(Oe.from.number),13,P1t)],46,A1t)):t.createCommentVNode("",!0),Oe.to.team?(t.openBlock(),t.createElementBlock("g",{key:2,style:t.normalizeStyle({opacity:L(Oe)}),class:t.normalizeClass({"player-marker__hidden":!Oe.to.isVisible}),onMouseenter:We=>{C(Oe),Pe(We,Oe.to)},onMouseleave:We=>{I(),Be(Oe.to)},onClick:t.withModifiers(We=>Ve(Oe.to),["prevent","stop"])},[t.createElementVNode("rect",{x:Oe.to.leftRaw,y:Oe.to.topRaw,transform:"translate(-18, -18)",height:"36",width:"36","stroke-width":Oe.to.is_titular?2:1,fill:ye.value(Oe.to),stroke:ve.value(Oe.to),opacity:Oe.to.is_titular?1:.8,rx:"18",ry:"18",style:t.normalizeStyle({cursor:e.customDistance?"inherit":"pointer","pointer-events":"all"})},null,12,L1t),t.createElementVNode("text",{x:Oe.to.leftRaw,y:Oe.to.topRaw,"text-anchor":"middle","dominant-baseline":"middle",dy:"1","font-size":"18",fill:Ee.value(Oe.to),opacity:Oe.to.is_titular?1:.8,"font-family":"'Poppins-SemiBold', sans-serif",style:t.normalizeStyle({cursor:e.customDistance?"inherit":"pointer","pointer-events":"all"})},t.toDisplayString(Oe.to.number),13,B1t)],46,I1t)):t.createCommentVNode("",!0),Oe.from.isVisible&&Oe.to.isVisible?(t.openBlock(),t.createElementBlock("g",{key:3,class:"is-pointer",onMouseenter:We=>C(Oe),onMouseleave:xe[0]||(xe[0]=We=>I()),onClick:t.withModifiers(We=>Ue(Oe),["prevent","stop"])},[t.createElementVNode("rect",{x:Oe.lineLabelLeft-24,y:Oe.lineLabelTop-11.5,style:t.normalizeStyle({opacity:L(Oe)}),width:"48",height:"23",rx:"11.5979",stroke:Oe.isCandidateToDelete?"#F7A138":"#44E3E7","stroke-width":"2"},null,12,z1t),t.createElementVNode("rect",{x:Oe.lineLabelLeft-24,y:Oe.lineLabelTop-11.5,width:"48",height:"23",rx:"11.5979",style:t.normalizeStyle({opacity:L(Oe)}),fill:Oe.isCandidateToDelete?"#F7A138":"#264F8C","fill-opacity":"1"},null,12,N1t),t.createElementVNode("text",{x:Oe.lineLabelLeft,y:Oe.lineLabelTop+1,"text-anchor":"middle","dominant-baseline":"middle","font-size":"13",fill:"white",style:t.normalizeStyle({opacity:L(Oe)})},t.toDisplayString(Oe.isCandidateToDelete?"X":`${Oe.distanceInMeters} m`),13,D1t)],40,O1t)):t.createCommentVNode("",!0)],64))),128))]))])])])],4))}},j1t=du(V1t,[["__scopeId","data-v-0cf54bed"]]),U1t={class:"filters-container"},G1t={class:"events-section"},H1t={class:"section-header"},Z1t={class:"all-toggle"},W1t={class:"events-list"},X1t={class:"events-section"},q1t={class:"section-header"},Y1t={class:"events-list"},J1t={__name:"FilterEvents",props:{startedCategories:{type:Array,default:()=>[]},endedCategories:{type:Array,default:()=>[]},allStartEventsSelected:{type:Boolean,default:!1},allEndEventsSelected:{type:Boolean,default:!1}},emits:["update-start-event","update-end-event","toggle-all-start-events","toggle-all-end-events"],setup(e,{emit:o}){const s=o,z=e,W=t.ref(z.allStartEventsSelected),v=t.ref(z.allEndEventsSelected);t.watch(()=>z.allStartEventsSelected,a=>{W.value=a},{immediate:!0}),t.watch(()=>z.allEndEventsSelected,a=>{v.value=a},{immediate:!0});function g(a){W.value=a,s("toggle-all-start-events",a)}function r(a){v.value=a,s("toggle-all-end-events",a)}function b(a,_){s("update-start-event",a,_)}function d(a,_){s("update-end-event",a,_)}return(a,_)=>(t.openBlock(),t.createElementBlock("div",U1t,[t.createElementVNode("div",G1t,[t.createElementVNode("div",H1t,[_[0]||(_[0]=t.createElementVNode("span",{class:"section-title"},"Jugadas que empiezan con:",-1)),t.createElementVNode("label",Z1t,[t.createVNode(t.unref(pp),{label:"Todas","box-position":"right","model-value":W.value,"onUpdate:modelValue":g},null,8,["model-value"])])]),t.createElementVNode("div",W1t,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(z.startedCategories,y=>(t.openBlock(),t.createElementBlock("div",{key:y.id,class:"category-item"},[t.createVNode(t.unref(pp),{"model-value":y.isSelected,label:y.name,"onUpdate:modelValue":x=>b(x,y)},null,8,["model-value","label","onUpdate:modelValue"])]))),128))])]),t.createElementVNode("div",X1t,[t.createElementVNode("div",q1t,[_[1]||(_[1]=t.createElementVNode("span",{class:"section-title"},"Jugadas que terminan con:",-1)),t.createVNode(t.unref(pp),{label:"Todas","box-position":"right","model-value":v.value,"onUpdate:modelValue":r},null,8,["model-value"])]),t.createElementVNode("div",Y1t,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(z.endedCategories,y=>(t.openBlock(),t.createElementBlock("div",{key:y.id,class:"category-item"},[t.createVNode(t.unref(pp),{"model-value":y.isSelected,label:y.name,"onUpdate:modelValue":x=>d(x,y)},null,8,["model-value","label","onUpdate:modelValue"])]))),128))])])]))}},LV=du(J1t,[["__scopeId","data-v-4a62a51c"]]),$1t={class:"side-filters"},K1t={class:"team-switch-container"},Q1t={class:"team-switch team-switch-toggle"},egt={class:"team-content"},tgt=["src"],agt={class:"team-label"},rgt={class:"team-content"},ngt={class:"team-label"},igt=["src"],ogt={class:"team-visible-checkbox"},sgt={class:"checkbox-container"},lgt=["checked"],cgt=["checked"],ugt={class:"side-filters__tabs"},dgt={class:"tabs-container"},hgt={class:"side-filters__content"},pgt={__name:"SideFilters",props:{startedCategories:{type:Array,default:()=>[]},endedCategories:{type:Array,default:()=>[]},defaultChainsFilters:{type:Object,default:()=>({})},homeTeamId:{type:Number,default:1},nameHomeTeam:{type:String,default:""},nameAwayTeam:{type:String,default:""},awayTeamId:{type:Number,default:5},gameId:{type:Number,default:88247},players:{type:Array,default:()=>[]},isHomeTeamVisible:{type:Boolean,default:!0},isAwayTeamVisible:{type:Boolean,default:!0},timeFromTimeline:{type:Object,default:()=>({})},game:{type:Object,default:()=>({})}},emits:["home-chains-filtered","away-chains-filtered","home-ball-zones-filtered","away-ball-zones-filtered","home-stats-updated","away-stats-updated","selected-team-tab","home-team-visibility","away-team-visibility","update:isHomeTeamVisible","update:isAwayTeamVisible"],setup(e,{emit:o}){const s=e,z=t.ref("chains"),W=t.ref(!0),{selectedStartCategories:v,selectedEndCategories:g,isDataLoaded:r,loadInitialData:b,getFilteredData:d}=EV(s.gameId),a=t.ref({...s.defaultChainsFilters}),_=t.ref({...s.defaultChainsFilters}),y=t.ref(structuredClone(s.startedCategories)),x=t.ref(structuredClone(s.endedCategories)),u=t.ref(structuredClone(s.startedCategories)),n=t.ref(structuredClone(s.endedCategories)),i=t.ref(!0),f=t.ref(!0),l=t.ref(!0),h=t.ref(!0),m=t.ref(s.homeTeamId),w=o,T=U=>{const J=U===s.homeTeamId?a.value:_.value,re={startCategories:J.startCategories,endCategories:J.endCategories,teamId:J.possessionTeamId,minDuration:J.durationRange.min,maxDuration:J.durationRange.max,excludedFirstSeconds:J.excludedFirstSeconds,excludedLastSeconds:J.excludedLastSeconds,chainInitialZones:J.chainInitialZones,chainFinalZones:J.chainFinalZones,ballInterestZones:J.ballInterestZones,timeFromTimeline:s.timeFromTimeline},q=d(re);q&&(U===s.homeTeamId?(w("home-chains-filtered",q.chains,U),w("home-ball-zones-filtered",re.ballInterestZones,U),w("home-stats-updated",q.stats,U)):(w("away-chains-filtered",q.chains,U),w("away-ball-zones-filtered",re.ballInterestZones,U),w("away-stats-updated",q.stats,U)))},A=U=>{const J=m.value===s.homeTeamId?a.value:_.value;switch(U){case"home":J.possessionTeamId=s.homeTeamId;break;case"away":J.possessionTeamId=s.awayTeamId;break;case"both":J.possessionTeamId=null;break}T(m.value)},C=(U,J)=>{const re=m.value===s.homeTeamId?a.value:_.value;U==="less-than"?re.durationRange={min:null,max:J}:re.durationRange={min:J,max:null},T(m.value)};function I(U,J){const re=m.value===s.homeTeamId?a.value:_.value,q=(m.value===s.homeTeamId?y.value:u.value).find(ae=>ae.id===J.id);q&&(q.isSelected=U),U?re.startCategories.includes(J.id)||re.startCategories.push(J.id):re.startCategories=re.startCategories.filter(ae=>ae!==J.id),m.value===s.homeTeamId?i.value=re.startCategories.length===y.value.length:l.value=re.startCategories.length===u.value.length,T(m.value)}function L(U,J){const re=m.value===s.homeTeamId?a.value:_.value,q=(m.value===s.homeTeamId?x.value:n.value).find(ae=>ae.id===J.id);q&&(q.isSelected=U),U?re.endCategories.includes(J.id)||re.endCategories.push(J.id):re.endCategories=re.endCategories.filter(ae=>ae!==J.id),m.value===s.homeTeamId?f.value=re.endCategories.length===x.value.length:h.value=re.endCategories.length===n.value.length,T(m.value)}const E=U=>{const J=m.value===s.homeTeamId?a.value:_.value,re=m.value===s.homeTeamId?y.value:u.value;re.forEach(q=>q.isSelected=U),U?J.startCategories=re.map(q=>q.id):J.startCategories=[],m.value===s.homeTeamId?i.value=U:l.value=U,T(m.value)},P=U=>{const J=m.value===s.homeTeamId?a.value:_.value,re=m.value===s.homeTeamId?x.value:n.value;re.forEach(q=>q.isSelected=U),U?J.endCategories=re.map(q=>q.id):J.endCategories=[],m.value===s.homeTeamId?f.value=U:h.value=U,T(m.value)},M=U=>{const J=m.value===s.homeTeamId?a.value:_.value;J.excludedFirstSeconds=U,T(m.value)},S=U=>{const J=m.value===s.homeTeamId?a.value:_.value;J.excludedLastSeconds=U,T(m.value)},B=U=>{const J=m.value===s.homeTeamId?a.value:_.value;J.chainInitialZones=U,T(m.value)},k=U=>{const J=m.value===s.homeTeamId?a.value:_.value;J.chainFinalZones=U,T(m.value)},O=U=>{const J=m.value===s.homeTeamId?a.value:_.value;J.ballInterestZones=U,T(m.value)},D=v,V=g;t.watch(()=>r.value,async U=>{U||(await b(),W.value?(T(s.homeTeamId),T(s.awayTeamId),W.value=!1):T(m.value))},{immediate:!0}),t.watch(()=>s.timeFromTimeline,()=>{T(s.homeTeamId),T(s.awayTeamId)},{immediate:!1});const G=t.computed(()=>s.startedCategories.length>0?m.value===s.homeTeamId?y.value:u.value:[]),H=t.computed(()=>s.endedCategories.length>0?m.value===s.homeTeamId?x.value:n.value:[]);return t.watch([D,V],()=>{D.value.length===0&&(D.value=G.value.map(U=>U.id)),V.value.length===0&&(V.value=H.value.map(U=>U.id))},{immediate:!0}),t.watch([m],([U])=>{w("selected-team-tab",U)},{immediate:!0}),(U,J)=>(t.openBlock(),t.createElementBlock("div",$1t,[t.createElementVNode("div",K1t,[t.createElementVNode("div",Q1t,[t.createElementVNode("div",{class:"team-thumb",style:t.normalizeStyle({left:m.value===s.homeTeamId?"0px":"calc(50%)",width:"calc(50%)"})},null,4),t.createElementVNode("button",{class:t.normalizeClass(["team-btn",{active:m.value===s.homeTeamId}]),onClick:J[0]||(J[0]=re=>m.value=s.homeTeamId),type:"button"},[t.createElementVNode("span",egt,[t.createElementVNode("img",{src:`https://golstatsimages.blob.core.windows.net/teams-80/${s.homeTeamId}.png`,alt:"Escudo local",class:"team-logo"},null,8,tgt),t.createElementVNode("span",agt,t.toDisplayString(e.nameHomeTeam),1)])],2),t.createElementVNode("button",{class:t.normalizeClass(["team-btn",{active:m.value===s.awayTeamId}]),onClick:J[1]||(J[1]=re=>m.value=s.awayTeamId),type:"button"},[t.createElementVNode("span",rgt,[t.createElementVNode("span",ngt,t.toDisplayString(e.nameAwayTeam),1),t.createElementVNode("img",{src:`https://golstatsimages.blob.core.windows.net/teams-80/${s.awayTeamId}.png`,alt:"Escudo visitante",class:"team-logo"},null,8,igt)])],2)])]),t.createElementVNode("div",ogt,[t.createElementVNode("div",sgt,[t.withDirectives(t.createElementVNode("label",null,[t.createElementVNode("input",{type:"checkbox",checked:s.isHomeTeamVisible,onChange:J[2]||(J[2]=re=>w("update:isHomeTeamVisible",re.target.checked))},null,40,lgt),J[7]||(J[7]=t.createElementVNode("span",{class:"custom-checkbox"},null,-1)),t.createElementVNode("span",null,t.toDisplayString(e.nameHomeTeam)+" visible",1)],512),[[t.vShow,m.value===s.homeTeamId]]),t.withDirectives(t.createElementVNode("label",null,[t.createElementVNode("input",{type:"checkbox",checked:s.isAwayTeamVisible,onChange:J[3]||(J[3]=re=>w("update:isAwayTeamVisible",re.target.checked))},null,40,cgt),J[8]||(J[8]=t.createElementVNode("span",{class:"custom-checkbox"},null,-1)),t.createElementVNode("span",null,t.toDisplayString(e.nameAwayTeam)+" visible",1)],512),[[t.vShow,m.value===s.awayTeamId]])])]),t.createElementVNode("div",ugt,[t.createElementVNode("div",dgt,[t.createElementVNode("button",{class:t.normalizeClass(["tab-button",{active:z.value==="chains"}]),onClick:J[4]||(J[4]=re=>z.value="chains")}," Filtros ",2),t.createElementVNode("button",{class:t.normalizeClass(["tab-button",{active:z.value==="events"}]),onClick:J[5]||(J[5]=re=>z.value="events")}," Eventos ",2),t.createElementVNode("button",{class:t.normalizeClass(["tab-button",{active:z.value==="players"}]),onClick:J[6]||(J[6]=re=>z.value="players")}," Jugadores ",2)])]),t.createElementVNode("div",hgt,[t.withDirectives(t.createElementVNode("div",null,[t.withDirectives(t.createVNode(T5,{"team-id":s.homeTeamId,"home-team-id":s.homeTeamId,"away-team-id":s.awayTeamId,game:s.game,onChangePossession:A,onChangeDuration:C,onChangeExcludedFirstSeconds:M,onChangeExcludedLastSeconds:S,onChangeChainInitialZones:B,onChangeChainFinalZones:k,onChangeBallInterestZones:O},null,8,["team-id","home-team-id","away-team-id","game"]),[[t.vShow,m.value===s.homeTeamId]]),t.withDirectives(t.createVNode(T5,{"team-id":s.awayTeamId,"home-team-id":s.homeTeamId,"away-team-id":s.awayTeamId,game:s.game,onChangePossession:A,onChangeDuration:C,onChangeExcludedFirstSeconds:M,onChangeExcludedLastSeconds:S,onChangeChainInitialZones:B,onChangeChainFinalZones:k,onChangeBallInterestZones:O},null,8,["team-id","home-team-id","away-team-id","game"]),[[t.vShow,m.value===s.awayTeamId]])],512),[[t.vShow,z.value==="chains"]]),t.withDirectives(t.createElementVNode("div",null,[t.withDirectives(t.createVNode(LV,{"started-categories":G.value,"ended-categories":H.value,"all-start-events-selected":i.value,"all-end-events-selected":f.value,onToggleAllStartEvents:E,onToggleAllEndEvents:P,onUpdateStartEvent:I,onUpdateEndEvent:L},null,8,["started-categories","ended-categories","all-start-events-selected","all-end-events-selected"]),[[t.vShow,m.value===s.homeTeamId]]),t.withDirectives(t.createVNode(LV,{"started-categories":G.value,"ended-categories":H.value,"all-start-events-selected":l.value,"all-end-events-selected":h.value,onToggleAllStartEvents:E,onToggleAllEndEvents:P,onUpdateStartEvent:I,onUpdateEndEvent:L},null,8,["started-categories","ended-categories","all-start-events-selected","all-end-events-selected"]),[[t.vShow,m.value===s.awayTeamId]])],512),[[t.vShow,z.value==="events"]]),t.withDirectives(t.createElementVNode("div",null,[t.withDirectives(t.createVNode(N5,{players:e.players.filter(re=>re.team_id===s.homeTeamId)},null,8,["players"]),[[t.vShow,m.value===s.homeTeamId]]),t.withDirectives(t.createVNode(N5,{players:e.players.filter(re=>re.team_id===s.awayTeamId)},null,8,["players"]),[[t.vShow,m.value===s.awayTeamId]])],512),[[t.vShow,z.value==="players"]])])]))}},fgt=du(pgt,[["__scopeId","data-v-c043c4cf"]]),mgt={class:"team team-left"},ggt={class:"team-header"},ygt={class:"team-logo",style:{"margin-left":"-7px"}},vgt=["src","alt"],bgt={class:"team team-right"},xgt={class:"team-header"},_gt={class:"team-logo",style:{"margin-right":"4px"}},wgt=["src","alt"],kgt={class:"roles-section"},Sgt={class:"role-label local"},Tgt={class:"team-logo small"},Cgt=["src","alt"],Egt={class:"role-details"},Agt={width:"35",height:"10",viewBox:"0 0 35 10",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Mgt=["opacity"],Pgt={width:"18",height:"12",viewBox:"0 0 18 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Igt=["opacity"],Lgt={key:0,class:"mobile-vertical-line",style:{position:"absolute",height:"44px",left:"43px",top:"20px",bottom:"0",width:"1px","border-left":"1.5px dashed #b6b6b6"}},Bgt={class:"role-label visitante"},Ogt={class:"team-logo small"},zgt=["src","alt"],Ngt={class:"role-details"},Dgt={width:"35",height:"10",viewBox:"0 0 35 10",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Fgt=["opacity"],Rgt={width:"18",height:"12",viewBox:"0 0 18 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Vgt=["opacity"],jgt={key:0,class:"mobile-vertical-line",style:{position:"absolute",height:"44px",left:"46px",top:"20px",bottom:"0",width:"1px","border-left":"1.5px dashed #b6b6b6"}},Ugt={__name:"LabelsTool",props:{game:{type:Object,required:!0},isMobile:{type:Boolean,default:!1},players:{type:Array,default:()=>[]},showPases:{type:Boolean,default:!1},showDistancia:{type:Boolean,default:!1},showShadows:{type:Boolean,default:!1},isHomeTeamVisible:{type:Boolean,default:!0},isAwayTeamVisible:{type:Boolean,default:!0},isDeleteVisible:{type:Boolean,default:!1}},emits:["update:isHomeTeamVisible","update:isAwayTeamVisible","delete-distances"],setup(e,{emit:o}){const s=e,z=o,W=t.ref(s.isHomeTeamVisible),v=t.ref(s.isAwayTeamVisible),g=t.ref({local:{titular:!1,cambios:!1,pases:s.showPases,distancia:s.showDistancia,shadows:s.showShadows},visitante:{titular:!1,cambios:!1,pases:s.showPases,distancia:s.showDistancia,shadows:s.showShadows}}),r=t.computed(()=>({"--grid-template-columns":s.isMobile?"40px 1fr":"80px 1fr"})),b=t.computed(()=>{const _=s.players.filter(y=>y.team_id===s.game.homeTeam.team_id);return{titulares:_.filter(y=>y.is_titular).length,cambios:_.filter(y=>!y.is_titular).length,selectedTitulares:s.isHomeTeamVisible?_.filter(y=>y.is_titular&&y.isSelected).length:0,selectedCambios:s.isHomeTeamVisible?_.filter(y=>!y.is_titular&&y.isSelected).length:0}}),d=t.computed(()=>{const _=s.players.filter(y=>y.team_id===s.game.awayTeam.team_id);return{titulares:_.filter(y=>y.is_titular).length,cambios:_.filter(y=>!y.is_titular).length,selectedTitulares:s.isAwayTeamVisible?_.filter(y=>y.is_titular&&y.isSelected).length:0,selectedCambios:s.isAwayTeamVisible?_.filter(y=>!y.is_titular&&y.isSelected).length:0}});t.watch(()=>s.players,()=>{g.value.local.titular=b.value.selectedTitulares>0&&s.isHomeTeamVisible,g.value.local.cambios=b.value.selectedCambios>0&&s.isHomeTeamVisible,g.value.visitante.titular=d.value.selectedTitulares>0&&s.isAwayTeamVisible,g.value.visitante.cambios=d.value.selectedCambios>0&&s.isAwayTeamVisible},{deep:!0,immediate:!0}),t.watch(()=>s.showPases,_=>{g.value.local.pases=_&&s.isHomeTeamVisible,g.value.visitante.pases=_&&s.isAwayTeamVisible}),t.watch(()=>s.showDistancia,_=>{g.value.local.distancia=_&&s.isHomeTeamVisible,g.value.visitante.distancia=_&&s.isAwayTeamVisible}),t.watch(()=>s.showShadows,_=>{g.value.local.shadows=_&&s.isHomeTeamVisible,g.value.visitante.shadows=_&&s.isAwayTeamVisible},{immediate:!0}),t.watch(()=>s.isHomeTeamVisible,_=>{W.value=_,g.value.local.pases=s.showPases&&_,g.value.local.distancia=s.showDistancia&&_,g.value.local.shadows=s.showShadows&&_,g.value.local.titular=b.value.selectedTitulares>0&&_,g.value.local.cambios=b.value.selectedCambios>0&&_}),t.watch(()=>s.isAwayTeamVisible,_=>{v.value=_,g.value.visitante.pases=s.showPases&&_,g.value.visitante.distancia=s.showDistancia&&_,g.value.visitante.shadows=s.showShadows&&_,g.value.visitante.titular=d.value.selectedTitulares>0&&_,g.value.visitante.cambios=d.value.selectedCambios>0&&_}),t.watch(W,_=>{z("update:isHomeTeamVisible",_)}),t.watch(v,_=>{z("update:isAwayTeamVisible",_)});function a(){z("delete-distances")}return(_,y)=>(t.openBlock(),t.createElementBlock("div",{class:"labels-tool",style:t.normalizeStyle(r.value)},[t.createElementVNode("div",{class:"teams-header",style:t.normalizeStyle(e.isMobile?"gap:0px":"")},[t.createElementVNode("div",mgt,[t.createElementVNode("div",ggt,[t.createVNode(t.unref(pp),{modelValue:W.value,"onUpdate:modelValue":y[0]||(y[0]=x=>W.value=x)},null,8,["modelValue"]),t.createElementVNode("div",ygt,[t.createElementVNode("img",{src:`https://golstatsimages.blob.core.windows.net/teams-80/${s.game.homeTeam.team_id}.png`,alt:s.game.homeTeam.colloquial_name},null,8,vgt)]),t.createElementVNode("div",{class:"team-name",style:t.normalizeStyle({fontSize:e.isMobile?"10px":"12px"})},t.toDisplayString(s.game.homeTeam.colloquial_name),5),y[2]||(y[2]=t.createElementVNode("div",{class:"home-arrow"},[t.createElementVNode("svg",{width:"89",height:"6",viewBox:"0 0 89 6",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t.createElementVNode("path",{d:"M88.499 2.88087L83.499 5.76759L83.499 3.38087L6.11719 3.38086C5.88303 4.61447 4.80077 5.54785 3.49902 5.54785C2.02626 5.54785 0.832031 4.35362 0.832031 2.88086C0.832031 1.4081 2.02626 0.213867 3.49902 0.213867C4.80077 0.213868 5.88303 1.14725 6.11719 2.38086L83.499 2.38087L83.499 -0.00585215L88.499 2.88087Z",fill:"#336DFF"})])],-1))]),y[3]||(y[3]=t.createElementVNode("div",{class:"team-arrow blue"},null,-1))]),e.isDeleteVisible?(t.openBlock(),t.createElementBlock("div",{key:0,role:"button",class:"delete-button",onClick:a},[...y[4]||(y[4]=[t.createElementVNode("svg",{width:"16",height:"18",viewBox:"0 0 16 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t.createElementVNode("path",{d:"M10.549.91v.957h4.487v1.628h-.897v12.588c0 .472-.177.924-.488 1.256-.31.33-.73.514-1.164.514H3.513c-.435 0-.854-.183-1.164-.514a1.839 1.839 0 0 1-.488-1.256V3.495H.964V1.867H5.45V.91h5.098zm-7.18 15.316h9.262V3.495H3.369v12.731zm7.18-10.53v8.328H9.04V5.696h1.508zm-3.59 0v8.328H5.451V5.696H6.96z",fill:"#fff",stroke:"#2E3B46","stroke-width":".287"})],-1)])])):t.createCommentVNode("",!0),t.createElementVNode("div",bgt,[t.createElementVNode("div",xgt,[t.createElementVNode("div",{class:"team-name",style:t.normalizeStyle({fontSize:e.isMobile?"10px":"12px"})},t.toDisplayString(s.game.awayTeam.colloquial_name),5),t.createElementVNode("div",_gt,[t.createElementVNode("img",{src:`https://golstatsimages.blob.core.windows.net/teams-80/${s.game.awayTeam.team_id}.png`,alt:s.game.awayTeam.colloquial_name},null,8,wgt)]),t.createVNode(t.unref(pp),{modelValue:v.value,"onUpdate:modelValue":y[1]||(y[1]=x=>v.value=x)},null,8,["modelValue"]),y[5]||(y[5]=t.createElementVNode("div",{class:"away-arrow"},[t.createElementVNode("svg",{class:"arrow-svg right",width:"89",height:"6",viewBox:"0 0 89 6",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t.createElementVNode("path",{d:"M0.500977 2.88087L5.50098 5.76759L5.50098 3.38087L82.8828 3.38086C83.117 4.61447 84.1992 5.54785 85.501 5.54785C86.9737 5.54785 88.168 4.35362 88.168 2.88086C88.168 1.4081 86.9737 0.213867 85.501 0.213867C84.1992 0.213868 83.117 1.14725 82.8828 2.38086L5.50098 2.38087L5.50098 -0.00585215L0.500977 2.88087Z",fill:"#CBEE6B"})])],-1))]),y[6]||(y[6]=t.createElementVNode("div",{class:"team-arrow green"},null,-1))])],4),t.createElementVNode("div",kgt,[t.createElementVNode("div",{class:t.normalizeClass(["role-row",{"mobile-layout":e.isMobile}]),style:t.normalizeStyle(e.isMobile?{position:"relative"}:{})},[t.createElementVNode("div",Sgt,[t.createElementVNode("div",Tgt,[t.createElementVNode("img",{src:`https://golstatsimages.blob.core.windows.net/teams-80/${s.game.homeTeam.team_id}.png`,alt:s.game.homeTeam.colloquial_name},null,8,Cgt)]),t.createElementVNode("div",{class:"locality",style:t.normalizeStyle({"min-width":e.isMobile?"fit-content":"50px"})},t.toDisplayString(e.isMobile?"L":"LOCAL"),5)]),t.createElementVNode("div",Egt,[t.createElementVNode("div",{class:"role-separator",style:t.normalizeStyle(e.isMobile?{visibility:"hidden"}:{})},null,4),t.createElementVNode("div",{class:"role-team",style:t.normalizeStyle(e.isMobile?{"margin-left":"15px"}:{})},[t.createElementVNode("div",{class:t.normalizeClass(["circle blue",{inactive:!g.value.local.titular}])},"8",2),t.createElementVNode("span",{class:t.normalizeClass(["role-text",{inactive:!g.value.local.titular}])},"Titular",2),t.createElementVNode("div",{class:t.normalizeClass(["circle blue-substitution substitution-circle",{inactive:!g.value.local.cambios}])},"8",2),t.createElementVNode("span",{class:t.normalizeClass(["role-text",{inactive:!g.value.local.cambios}])},"Cambios",2)],4),t.createElementVNode("div",{class:t.normalizeClass(["role-options",{"mobile-layout":e.isMobile}])},[t.createElementVNode("span",{class:t.normalizeClass(["arrow blue",{inactive:!g.value.local.pases}])},[(t.openBlock(),t.createElementBlock("svg",Agt,[t.createElementVNode("path",{d:"M27.2383 5.75879L0.902344 5.75879V4.27832L27.2383 4.27832V0.744141L34.6426 5.01855L27.2383 9.29297V5.75879Z",fill:"#6891F8",opacity:g.value.local.pases?1:.4},null,8,Mgt)]))],2),t.createElementVNode("span",{class:t.normalizeClass(["role-text",{inactive:!g.value.local.pases}]),style:{"margin-left":"3px"}},"Pases",2),(t.openBlock(),t.createElementBlock("svg",Pgt,[t.createElementVNode("path",{d:"M12.5419 10.752C12.2528 11.041 11.7842 11.0411 11.4951 10.752C11.206 10.4629 11.2061 9.99424 11.4951 9.70509L15.3974 5.80275L15.3974 5.23048L11.4951 1.32814C11.2061 1.03899 11.206 0.570355 11.4951 0.281262C11.7842 -0.00783105 12.2528 -0.00774079 12.5419 0.281262L17.2538 4.99318C17.543 5.28231 17.543 5.75091 17.2538 6.04005L12.5419 10.752ZM10.0634 6.25685L10.0634 4.77638L12.7304 4.77638L12.7304 6.25685L10.0634 6.25685ZM4.73041 6.25685L4.73041 4.77638L7.3974 4.77638L7.3974 6.25685L4.73041 6.25685ZM0.730411 6.25685L0.654239 6.25294C0.281131 6.2148 -0.00982329 5.89979 -0.00982332 5.51661C-0.00982336 5.13344 0.281131 4.81843 0.654239 4.78029L0.730411 4.77638L2.06342 4.77638L2.06342 6.25685L0.730411 6.25685Z",fill:"#33E4FF",opacity:g.value.local.distancia?1:.4},null,8,Igt)])),t.createElementVNode("span",{class:t.normalizeClass(["role-text",{inactive:!g.value.local.distancia}])},"Distancia",2),t.createElementVNode("div",{class:t.normalizeClass(["circle gray substitution-circle",{inactive:!g.value.local.shadows}])},"8",2),t.createElementVNode("span",{class:t.normalizeClass(["role-text",{inactive:!g.value.local.shadows}])},"Shadows",2)],2)]),e.isMobile?(t.openBlock(),t.createElementBlock("div",Lgt)):t.createCommentVNode("",!0)],6),t.createElementVNode("div",{class:t.normalizeClass(["role-row",{"mobile-layout":e.isMobile}]),style:t.normalizeStyle(e.isMobile?{position:"relative"}:{})},[t.createElementVNode("div",Bgt,[t.createElementVNode("div",Ogt,[t.createElementVNode("img",{src:`https://golstatsimages.blob.core.windows.net/teams-80/${s.game.awayTeam.team_id}.png`,alt:s.game.awayTeam.colloquial_name},null,8,zgt)]),t.createElementVNode("div",{class:"locality",style:t.normalizeStyle({"min-width":e.isMobile?"fit-content":"50px"})},t.toDisplayString(e.isMobile?"V":"VISITANTE"),5)]),t.createElementVNode("div",Ngt,[t.createElementVNode("div",{class:"role-separator",style:t.normalizeStyle(e.isMobile?{visibility:"hidden"}:{})},null,4),t.createElementVNode("div",{class:"role-team",style:t.normalizeStyle(e.isMobile?{"margin-left":"15px"}:{})},[t.createElementVNode("div",{class:t.normalizeClass(["circle green",{inactive:!g.value.visitante.titular}])},"8",2),t.createElementVNode("span",{class:t.normalizeClass(["role-text",{inactive:!g.value.visitante.titular}])},"Titular",2),t.createElementVNode("div",{class:t.normalizeClass(["circle green-substitution substitution-circle",{inactive:!g.value.visitante.cambios}])},"8",2),t.createElementVNode("span",{class:t.normalizeClass(["role-text",{inactive:!g.value.visitante.cambios}])},"Cambios",2)],4),t.createElementVNode("div",{class:t.normalizeClass(["role-options",{"mobile-layout":e.isMobile}])},[t.createElementVNode("span",{class:t.normalizeClass(["arrow green",{inactive:!g.value.visitante.pases}])},[(t.openBlock(),t.createElementBlock("svg",Dgt,[t.createElementVNode("path",{d:"M27.2383 5.75879L0.902344 5.75879V4.27832L27.2383 4.27832V0.744141L34.6426 5.01855L27.2383 9.29297V5.75879Z",fill:"#CBEE6B",opacity:g.value.visitante.pases?1:.4},null,8,Fgt)]))],2),t.createElementVNode("span",{class:t.normalizeClass(["role-text",{inactive:!g.value.visitante.pases}]),style:{"margin-left":"3px"}},"Pases",2),(t.openBlock(),t.createElementBlock("svg",Rgt,[t.createElementVNode("path",{d:"M12.5419 11.252C12.2528 11.541 11.7842 11.5411 11.4951 11.252C11.206 10.9629 11.2061 10.4942 11.4951 10.2051L15.3974 6.30275L15.3974 5.73048L11.4951 1.82814C11.2061 1.53899 11.206 1.07035 11.4951 0.781262C11.7842 0.492169 12.2528 0.492259 12.5419 0.781262L17.2538 5.49318C17.543 5.78231 17.543 6.25091 17.2538 6.54005L12.5419 11.252ZM10.0634 6.75685L10.0634 5.27638L12.7304 5.27638L12.7304 6.75685L10.0634 6.75685ZM4.73041 6.75685L4.73041 5.27638L7.3974 5.27638L7.3974 6.75685L4.73041 6.75685ZM0.730411 6.75685L0.654239 6.75294C0.281131 6.7148 -0.00982329 6.39979 -0.00982332 6.01661C-0.00982336 5.63344 0.281131 5.31843 0.654239 5.28029L0.730411 5.27638L2.06342 5.27638L2.06342 6.75685L0.730411 6.75685Z",fill:"#CBEE6B",opacity:g.value.visitante.distancia?1:.4},null,8,Vgt)])),t.createElementVNode("span",{class:t.normalizeClass(["role-text",{inactive:!g.value.visitante.distancia}])},"Distancia",2),t.createElementVNode("div",{class:t.normalizeClass(["circle gray substitution-circle",{inactive:!g.value.visitante.shadows}])},"8",2),t.createElementVNode("span",{class:t.normalizeClass(["role-text",{inactive:!g.value.visitante.shadows}])},"Shadows",2)],2)]),e.isMobile?(t.openBlock(),t.createElementBlock("div",jgt)):t.createCommentVNode("",!0)],6)])],4))}},Ggt=du(Ugt,[["__scopeId","data-v-8ecea783"]]),Hgt={__name:"ModalConfirm",props:{isVisible:{type:Boolean,default:!1}},emits:["close","delete"],setup(e,{emit:o}){const s=o;function z(){s("close")}function W(){s("delete"),z()}return(v,g)=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[(t.openBlock(),t.createBlock(t.Teleport,{to:"body"},[t.createVNode(t.Transition,null,{default:t.withCtx(()=>[e.isVisible?(t.openBlock(),t.createElementBlock("div",{key:0,class:"modal-overlay",onClick:z},[t.createElementVNode("div",{ref:"modalContent",class:"modal-content",onClick:g[0]||(g[0]=t.withModifiers(()=>{},["stop"]))},[g[1]||(g[1]=t.createElementVNode("div",{class:"header"},[t.createElementVNode("svg",{width:"12",height:"14",viewBox:"0 0 12 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t.createElementVNode("path",{d:"M7.904.116v.779h3.646v1.322h-.729v10.227c0 .384-.144.751-.396 1.02a1.297 1.297 0 0 1-.946.42H2.188c-.354 0-.695-.15-.947-.42a1.494 1.494 0 0 1-.395-1.02V2.217h-.73V.895h3.647V.116h4.141zM2.071 12.562h7.525V2.216H2.07v10.345zm5.833-8.556v6.767H6.68V4.006h1.225zm-2.917 0v6.767H3.763V4.006h1.224z",fill:"#fff",stroke:"#2E3B46","stroke-width":".233"})]),t.createElementVNode("div",null," Eliminar distancias ")],-1)),g[2]||(g[2]=t.createElementVNode("div",{class:"body"}," ¿Seguro que desea eliminar las distancias personalizadas? ",-1)),t.createElementVNode("div",{class:"footer"},[t.createElementVNode("div",{class:"cancel-button is-pointer",onClick:z}," Cancelar "),t.createElementVNode("div",{role:"button",class:"delete-button is-pointer",onClick:W}," Eliminar ")])],512)])):t.createCommentVNode("",!0)]),_:1})])),g[3]||(g[3]=t.createElementVNode("div",null,null,-1))],64))}},Zgt=du(Hgt,[["__scopeId","data-v-9d263082"]]),Wgt=new Map([[1,"Portero"],[2,"Defensa Central"],[3,"Lateral por izquierda"],[4,"Lateral por derecha"],[5,"Volante por izquierda"],[6,"Volante por derecha"],[7,"Volante defensivo"],[8,"Volante ofensivo"],[9,"Delantero"]]),Xgt={class:"positions-container__body"},qgt={class:"positions-container__filters"},Ygt={class:"main-content"},Jgt={class:"left-content"},$gt={class:"labels-tool-container"},Kgt={class:"right-content"},Qgt={class:"timeline-container"},eyt={__name:"GSC-PositionsAndConnections",props:{game:{type:Object,default:()=>({gameId:88247,homeTeam:{team_id:1,name:"Chivas"},awayTeam:{team_id:5,name:"Cruz Azul"}})},token:{type:String,default:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MCwibmFtZSI6IlVzdWFyaW8gRnJlZSIsInVzZXJuYW1lIjoiZnJlZUBnb2xzdGF0cy5jb20iLCJlbWFpbCI6ImZyZWVAZ29sc3RhdHMuY29tIiwiaWF0IjoxNjA2NzU4Nzk1LCJleHAiOjE2MzgyOTQ3OTV9.kPNmP7yDtk38cAXrUyc7OHRh6J25VFqy-XUNzbK-4YE"}},setup(e){const o=e,{endedCategories:s,startedCategories:z,loadGameData:W,isDataLoaded:v}=AV(),g=t.ref(null),r=t.ref([]),b=t.ref([]),d=t.ref([]),a=t.ref([]),_=t.ref([]),y=t.ref([]),x=t.ref([]),u=t.ref([]),n=t.ref({}),i=t.ref({}),f=t.ref({}),l=t.ref([]),h=t.ref([]),m=t.ref(o.game.homeTeam.team_id),w=t.ref(new Map),T=t.ref(new Map),A=t.ref([]),C=t.ref(!1),I=t.ref(!1),L=t.ref(!1),E=t.ref({originSections:[],destinationSections:[],distanceRange:{minValue:5,maxValue:30},isSelected:!1}),P=t.ref(!1),M=t.ref(!0),S=t.ref(!0),B=t.ref({startCategories:[1,2,3,4,5],endCategories:[1,2,3],durationRange:{min:1,max:null},possessionTeamId:null,excludedFirstSeconds:0,excludedLastSeconds:200,chainInitialZones:[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16],chainFinalZones:[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16],ballInterestZones:[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16],timeFromTimeline:{}}),k=t.ref(null),O=t.ref(!1),D=t.ref({blockDistancesTotal:0,passDistancesTotal:0}),V=t.computed(()=>k.value==="block"&&D.value.blockDistancesTotal>0||k.value==="players"&&D.value.playerDistancesTotal>0),G=t.computed(()=>w.value.size?w.value.get(m.value)||[]:[]),H=t.computed(()=>{const we=w.value.get(o.game.homeTeam.team_id)||[],Ve=w.value.get(o.game.awayTeam.team_id)||[];return[...we,...Ve]}),U=t.computed(()=>{const we=T.value.get(o.game.homeTeam.team_id)||[],Ve=T.value.get(o.game.awayTeam.team_id)||[];return[...we,...Ve]}),J=t.computed(()=>({homeTeam:w.value.get(o.game.homeTeam.team_id)||[],awayTeam:w.value.get(o.game.awayTeam.team_id)||[]})),re=t.computed(()=>H.value.filter(we=>we.isSelected).map(we=>we.player_id)),q=t.computed(()=>U.value.filter(we=>we.isSelected).map(we=>we.player_id));let ae=null;const ee=t.ref(null),$=t.ref(0);function Q(){ee.value&&(ae=new ResizeObserver(we=>{for(const Ve of we)Ve.contentRect.width!==$.value&&($.value=Ve.contentRect.width)}),ae.observe(ee.value))}t.onMounted(async()=>{await W(o.game.gameId),Q()});const ce=t.computed(()=>$.value<560);t.watch(()=>$.value,we=>{},{immediate:!0}),t.watch(()=>o.game.gameId,async we=>{we&&(Cp.resetCache(),await W(we),await ie(),await me())},{immediate:!0});function de(we,Ve){Ve===o.game.homeTeam.team_id?r.value=we:b.value=we}function he(we,Ve){Ve===o.game.homeTeam.team_id?d.value=we:a.value=we}function pe(we,Ve){Ve===o.game.homeTeam.team_id?l.value=we:h.value=we}async function ne(we){try{return(await(await fetch(`https://ts7thxzaik.execute-api.us-west-2.amazonaws.com/prod/v2/players/games/${we}`,{headers:{Authorization:o.token}})).json()).players||[]}catch(Ve){console.error("Error fetching players:",Ve)}}async function le(we){try{const Ve=await(await fetch(`https://nckawv8v3b.execute-api.us-west-2.amazonaws.com/prod/connections/${we}`,{headers:{Authorization:o.token}})).json();return Ve.data&&Ve.headers?Ve.data.reduce((Ne,Ue)=>(Ne.push(Ue.reduce((Xe,Ze,xe)=>(Xe[Ve.headers[xe]]=Ze,Xe),{})),Ne),[]):[]}catch(Ve){console.error("Error fetching game connections:",Ve)}}async function ie(){try{const we=await ne(o.game.gameId);o.game.homeTeam&&o.game.awayTeam&&(w.value.clear(),w.value.set(o.game.homeTeam.team_id,[]),w.value.set(o.game.awayTeam.team_id,[]),T.value.clear(),T.value.set(o.game.homeTeam.team_id,[]),T.value.set(o.game.awayTeam.team_id,[]),we.forEach(Ve=>{if(Ve.positionName=Wgt.get(Ve.position_id),Ve.team_id===o.game.homeTeam.team_id){const Ne=w.value.get(o.game.homeTeam.team_id);Ne&&(Ve.isSelected=Ve.is_titular,Ne.push(Ve));const Ue=T.value.get(o.game.homeTeam.team_id);if(Ue){const Xe={...Ve};Xe.isSelected=Ve.is_titular,Ue.push(Xe)}}else if(Ve.team_id===o.game.awayTeam.team_id){const Ne=w.value.get(o.game.awayTeam.team_id);Ne&&(Ve.isSelected=Ve.is_titular,Ne.push(Ve));const Ue=T.value.get(o.game.awayTeam.team_id);if(Ue){const Xe={...Ve};Xe.isSelected=Ve.is_titular,Ue.push(Xe)}}}))}catch(we){console.error("Error filling game players:",we)}}async function me(){try{const we=await le(o.game.gameId);we&&we.length>0?A.value=we:A.value=[]}catch(we){console.error("Error filling game passes:",we)}}function ve(we){if(we.isSelected){if(E.value.isSelected=we.isSelected,C.value=!0,JSON.stringify(we.originSections)!==JSON.stringify(E.value.originSections)||JSON.stringify(we.destinationSections)!==JSON.stringify(E.value.destinationSections)||JSON.stringify(we.distanceRange)!==JSON.stringify(E.value.distanceRange)&&g.value){E.value.originSections=[...we.originSections],E.value.destinationSections=[...we.destinationSections],E.value.distanceRange={...we.distanceRange};const Ve=A.value.filter(Ne=>E.value.originSections.includes(Ne.section_origin)&&E.value.destinationSections.includes(Ne.section_destination)&&Ne.distance>=E.value.distanceRange.minValue&&Ne.distance<=E.value.distanceRange.maxValue).reduce((Ne,Ue)=>{const Xe=`${Ue.player_id}-${Ue.receiver_id}`,Ze=Ne.get(Xe);return Ze?Ze.count+=1:Ne.set(Xe,{to:Ue.receiver_id,from:Ue.player_id,count:1}),Ne},new Map);g.value.setConnections(Array.from(Ve.values()))}}else E.value.isSelected=!1,C.value=!1}function ye(we){P.value=we,I.value=we}function ke(we){k.value=we}function Ee(we){m.value=we}function Te(we){L.value=we}function Pe(we,Ve){Ve===o.game.homeTeam.team_id?_.value=we:y.value=we}function Be(we,Ve){Ve===o.game.homeTeam.team_id?x.value=we:u.value=we}function Le(we){n.value=we}function je(we,Ve){Ve===o.game.homeTeam.team_id?i.value=we:f.value=we}function Me(we,Ve){Ve===o.game.homeTeam.team_id?l.value.totalSeconds=we:h.value.totalSeconds=we}function Re(){O.value=!0}function Ie(){O.value=!1}function ge(){g.value&&g.value.clearCustomDistances()}function Ce(we){D.value=we}return(we,Ve)=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createVNode(Zgt,{"is-visible":O.value,onClose:Ie,onDelete:ge},null,8,["is-visible"]),t.createElementVNode("div",{ref_key:"positionsContainer",ref:ee,class:"positions-container"},[t.createVNode(_mt,{"total-seconds":m.value===e.game.homeTeam.team_id?l.value.totalSeconds:h.value.totalSeconds,"total-chains":m.value===e.game.homeTeam.team_id?l.value.totalChains:h.value.totalChains,"total-duration-chains":m.value===e.game.homeTeam.team_id?l.value.totalDurationChains:h.value.totalDurationChains},null,8,["total-seconds","total-chains","total-duration-chains"]),t.createElementVNode("div",Xgt,[t.createElementVNode("div",qgt,[t.createVNode(mmt,{game:e.game,token:e.token,players:U.value,"container-width":$.value,"default-shadows-filters":B.value,"started-categories":t.unref(z),"ended-categories":t.unref(s),onChangeConnections:ve,onChangeDistance:ye,onChangeDistanceCustom:ke,onIsShadowsSelected:Te,onHomeChainsShadowsFiltered:he,onAwayChainsShadowsFiltered:he,onHomeBallZonesShadowsFiltered:Be,onAwayBallZonesShadowsFiltered:Be,onHomeRangeChangeShadows:je,onAwayRangeChangeShadows:je},null,8,["game","token","players","container-width","default-shadows-filters","started-categories","ended-categories"])]),t.createElementVNode("main",Ygt,[t.createElementVNode("div",Jgt,[t.createVNode(j1t,{ref_key:"soccerField",ref:g,"game-id":e.game.gameId,"home-team-id":e.game.homeTeam.team_id,"away-team-id":e.game.awayTeam.team_id,"home-filtered-chains":r.value,"away-filtered-chains":b.value,"home-filtered-chains-shadows":d.value,"away-filtered-chains-shadows":a.value,"home-filtered-ball-zones":_.value,"away-filtered-ball-zones":y.value,"home-filtered-ball-zones-shadows":x.value,"away-filtered-ball-zones-shadows":u.value,"time-from-timeline":n.value,"time-from-timeline-shadows-home":i.value,"time-from-timeline-shadows-away":f.value,"show-shadows":L.value,"players-selected":re.value,"players-selected-shadows":q.value,"players-info":J.value,"is-data-loaded":t.unref(v),"are-connections-visible":E.value.isSelected,"is-distance-visible":P.value,"is-home-team-visible":M.value,"is-away-team-visible":S.value,"custom-distance":k.value,onHomePossessionTotalSeconds:Me,onAwayPossessionTotalSeconds:Me,onChangeCustomDistances:Ce},null,8,["game-id","home-team-id","away-team-id","home-filtered-chains","away-filtered-chains","home-filtered-chains-shadows","away-filtered-chains-shadows","home-filtered-ball-zones","away-filtered-ball-zones","home-filtered-ball-zones-shadows","away-filtered-ball-zones-shadows","time-from-timeline","time-from-timeline-shadows-home","time-from-timeline-shadows-away","show-shadows","players-selected","players-selected-shadows","players-info","is-data-loaded","are-connections-visible","is-distance-visible","is-home-team-visible","is-away-team-visible","custom-distance"]),t.createElementVNode("div",$gt,[t.createVNode(Ggt,{"is-mobile":ce.value,game:e.game,players:H.value,"show-pases":C.value,"show-distancia":I.value,"show-shadows":L.value,"is-delete-visible":V.value,isHomeTeamVisible:M.value,"onUpdate:isHomeTeamVisible":Ve[0]||(Ve[0]=Ne=>M.value=Ne),isAwayTeamVisible:S.value,"onUpdate:isAwayTeamVisible":Ve[1]||(Ve[1]=Ne=>S.value=Ne),onDeleteDistances:Re},null,8,["is-mobile","game","players","show-pases","show-distancia","show-shadows","is-delete-visible","isHomeTeamVisible","isAwayTeamVisible"])])]),t.createElementVNode("div",Kgt,[t.createVNode(fgt,{game:e.game,players:G.value,"started-categories":t.unref(z),"ended-categories":t.unref(s),"default-chains-filters":B.value,"home-team-id":e.game.homeTeam.team_id,"away-team-id":e.game.awayTeam.team_id,"name-home-team":e.game.homeTeam.colloquial_name,"name-away-team":e.game.awayTeam.colloquial_name,"game-id":e.game.gameId,"time-from-timeline":n.value,"is-data-loaded":t.unref(v),isHomeTeamVisible:M.value,"onUpdate:isHomeTeamVisible":Ve[2]||(Ve[2]=Ne=>M.value=Ne),isAwayTeamVisible:S.value,"onUpdate:isAwayTeamVisible":Ve[3]||(Ve[3]=Ne=>S.value=Ne),onHomeChainsFiltered:de,onAwayChainsFiltered:de,onHomeStatsUpdated:pe,onAwayStatsUpdated:pe,onHomeBallZonesFiltered:Pe,onAwayBallZonesFiltered:Pe,onSelectedTeamTab:Ee},null,8,["game","players","started-categories","ended-categories","default-chains-filters","home-team-id","away-team-id","name-home-team","name-away-team","game-id","time-from-timeline","is-data-loaded","isHomeTeamVisible","isAwayTeamVisible"])])]),t.createElementVNode("div",Qgt,[t.createVNode(_V,{"timeline-width":940,"game-id":e.game.gameId,"home-team":e.game.homeTeam.team_id,"away-team":e.game.awayTeam.team_id,token:o.token,onRangeChange:Le},null,8,["game-id","home-team","away-team","token"])])])],512)],64))}},tyt=du(eyt,[["__scopeId","data-v-c28ec97b"]]),ayt=(e,o)=>{const s=e.__vccOpts||e;for(const[z,W]of o)s[z]=W;return s},ryt={__name:"gsc-positioning",props:{game:{type:Object,default:()=>({})}},setup(e){const o=t.ref(0);let s=null;const z=t.ref(null);function W(){s=new ResizeObserver(v=>{for(const g of v)o.value=g.contentRect.width}),s.observe(z.value)}return t.onMounted(()=>{W()}),t.onBeforeUnmount(()=>{s&&s.disconnect()}),(v,g)=>(t.openBlock(),t.createElementBlock("div",{class:"gsc-positioning",ref_key:"positioning",ref:z,style:t.normalizeStyle(o.value<700?"padding: 25px 0":"")},[t.createVNode(t.unref(Yut),{game:e.game},null,8,["game"]),t.createVNode(t.unref(tyt),{game:e.game},null,8,["game"])],4))}},nyt=ayt(ryt,[["__scopeId","data-v-60e35461"]]),QYt="",eJt="",iyt={class:"datagame-container"},oyt=$i({__name:"GSCPositining",props:{game:{type:Object,default:()=>({})}},setup(e){return(o,s)=>(t.openBlock(),t.createElementBlock("div",iyt,[t.createVNode(t.unref(nyt),{game:e.game},null,8,["game"])]))}},[["__scopeId","data-v-9a84d21f"]]);function BV(e,o){return function(){return e.apply(o,arguments)}}const{toString:syt}=Object.prototype,{getPrototypeOf:aS}=Object,{iterator:D5,toStringTag:OV}=Symbol,F5=(e=>o=>{const s=syt.call(o);return e[s]||(e[s]=s.slice(8,-1).toLowerCase())})(Object.create(null)),Rf=e=>(e=e.toLowerCase(),o=>F5(o)===e),R5=e=>o=>typeof o===e,{isArray:c2}=Array,u2=R5("undefined");function rb(e){return e!==null&&!u2(e)&&e.constructor!==null&&!u2(e.constructor)&&gp(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const zV=Rf("ArrayBuffer");function lyt(e){let o;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?o=ArrayBuffer.isView(e):o=e&&e.buffer&&zV(e.buffer),o}const cyt=R5("string"),gp=R5("function"),NV=R5("number"),nb=e=>e!==null&&typeof e=="object",uyt=e=>e===!0||e===!1,V5=e=>{if(F5(e)!=="object")return!1;const o=aS(e);return(o===null||o===Object.prototype||Object.getPrototypeOf(o)===null)&&!(OV in e)&&!(D5 in e)},dyt=e=>{if(!nb(e)||rb(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},hyt=Rf("Date"),pyt=Rf("File"),fyt=e=>!!(e&&typeof e.uri<"u"),myt=e=>e&&typeof e.getParts<"u",gyt=Rf("Blob"),yyt=Rf("FileList"),vyt=e=>nb(e)&&gp(e.pipe);function byt(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}const DV=byt(),FV=typeof DV.FormData<"u"?DV.FormData:void 0,xyt=e=>{let o;return e&&(FV&&e instanceof FV||gp(e.append)&&((o=F5(e))==="formdata"||o==="object"&&gp(e.toString)&&e.toString()==="[object FormData]"))},_yt=Rf("URLSearchParams"),[wyt,kyt,Syt,Tyt]=["ReadableStream","Request","Response","Headers"].map(Rf),Cyt=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function ib(e,o,{allOwnKeys:s=!1}={}){if(e===null||typeof e>"u")return;let z,W;if(typeof e!="object"&&(e=[e]),c2(e))for(z=0,W=e.length;z<W;z++)o.call(null,e[z],z,e);else{if(rb(e))return;const v=s?Object.getOwnPropertyNames(e):Object.keys(e),g=v.length;let r;for(z=0;z<g;z++)r=v[z],o.call(null,e[r],r,e)}}function RV(e,o){if(rb(e))return null;o=o.toLowerCase();const s=Object.keys(e);let z=s.length,W;for(;z-- >0;)if(W=s[z],o===W.toLowerCase())return W;return null}const rg=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,VV=e=>!u2(e)&&e!==rg;function rS(){const{caseless:e,skipUndefined:o}=VV(this)&&this||{},s={},z=(W,v)=>{if(v==="__proto__"||v==="constructor"||v==="prototype")return;const g=e&&RV(s,v)||v;V5(s[g])&&V5(W)?s[g]=rS(s[g],W):V5(W)?s[g]=rS({},W):c2(W)?s[g]=W.slice():(!o||!u2(W))&&(s[g]=W)};for(let W=0,v=arguments.length;W<v;W++)arguments[W]&&ib(arguments[W],z);return s}const Eyt=(e,o,s,{allOwnKeys:z}={})=>(ib(o,(W,v)=>{s&&gp(W)?Object.defineProperty(e,v,{value:BV(W,s),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,v,{value:W,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:z}),e),Ayt=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Myt=(e,o,s,z)=>{e.prototype=Object.create(o.prototype,z),Object.defineProperty(e.prototype,"constructor",{value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{value:o.prototype}),s&&Object.assign(e.prototype,s)},Pyt=(e,o,s,z)=>{let W,v,g;const r={};if(o=o||{},e==null)return o;do{for(W=Object.getOwnPropertyNames(e),v=W.length;v-- >0;)g=W[v],(!z||z(g,e,o))&&!r[g]&&(o[g]=e[g],r[g]=!0);e=s!==!1&&aS(e)}while(e&&(!s||s(e,o))&&e!==Object.prototype);return o},Iyt=(e,o,s)=>{e=String(e),(s===void 0||s>e.length)&&(s=e.length),s-=o.length;const z=e.indexOf(o,s);return z!==-1&&z===s},Lyt=e=>{if(!e)return null;if(c2(e))return e;let o=e.length;if(!NV(o))return null;const s=new Array(o);for(;o-- >0;)s[o]=e[o];return s},Byt=(e=>o=>e&&o instanceof e)(typeof Uint8Array<"u"&&aS(Uint8Array)),Oyt=(e,o)=>{const s=(e&&e[D5]).call(e);let z;for(;(z=s.next())&&!z.done;){const W=z.value;o.call(e,W[0],W[1])}},zyt=(e,o)=>{let s;const z=[];for(;(s=e.exec(o))!==null;)z.push(s);return z},Nyt=Rf("HTMLFormElement"),Dyt=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(o,s,z){return s.toUpperCase()+z}),jV=(({hasOwnProperty:e})=>(o,s)=>e.call(o,s))(Object.prototype),Fyt=Rf("RegExp"),UV=(e,o)=>{const s=Object.getOwnPropertyDescriptors(e),z={};ib(s,(W,v)=>{let g;(g=o(W,v,e))!==!1&&(z[v]=g||W)}),Object.defineProperties(e,z)},Ryt=e=>{UV(e,(o,s)=>{if(gp(e)&&["arguments","caller","callee"].indexOf(s)!==-1)return!1;const z=e[s];if(gp(z)){if(o.enumerable=!1,"writable"in o){o.writable=!1;return}o.set||(o.set=()=>{throw Error("Can not rewrite read-only method '"+s+"'")})}})},Vyt=(e,o)=>{const s={},z=W=>{W.forEach(v=>{s[v]=!0})};return c2(e)?z(e):z(String(e).split(o)),s},jyt=()=>{},Uyt=(e,o)=>e!=null&&Number.isFinite(e=+e)?e:o;function Gyt(e){return!!(e&&gp(e.append)&&e[OV]==="FormData"&&e[D5])}const Hyt=e=>{const o=new Array(10),s=(z,W)=>{if(nb(z)){if(o.indexOf(z)>=0)return;if(rb(z))return z;if(!("toJSON"in z)){o[W]=z;const v=c2(z)?[]:{};return ib(z,(g,r)=>{const b=s(g,W+1);!u2(b)&&(v[r]=b)}),o[W]=void 0,v}}return z};return s(e,0)},Zyt=Rf("AsyncFunction"),Wyt=e=>e&&(nb(e)||gp(e))&&gp(e.then)&&gp(e.catch),GV=((e,o)=>e?setImmediate:o?((s,z)=>(rg.addEventListener("message",({source:W,data:v})=>{W===rg&&v===s&&z.length&&z.shift()()},!1),W=>{z.push(W),rg.postMessage(s,"*")}))(`axios@${Math.random()}`,[]):s=>setTimeout(s))(typeof setImmediate=="function",gp(rg.postMessage)),Xyt=typeof queueMicrotask<"u"?queueMicrotask.bind(rg):typeof process<"u"&&process.nextTick||GV,qyt=e=>e!=null&&gp(e[D5]),Mn={isArray:c2,isArrayBuffer:zV,isBuffer:rb,isFormData:xyt,isArrayBufferView:lyt,isString:cyt,isNumber:NV,isBoolean:uyt,isObject:nb,isPlainObject:V5,isEmptyObject:dyt,isReadableStream:wyt,isRequest:kyt,isResponse:Syt,isHeaders:Tyt,isUndefined:u2,isDate:hyt,isFile:pyt,isReactNativeBlob:fyt,isReactNative:myt,isBlob:gyt,isRegExp:Fyt,isFunction:gp,isStream:vyt,isURLSearchParams:_yt,isTypedArray:Byt,isFileList:yyt,forEach:ib,merge:rS,extend:Eyt,trim:Cyt,stripBOM:Ayt,inherits:Myt,toFlatObject:Pyt,kindOf:F5,kindOfTest:Rf,endsWith:Iyt,toArray:Lyt,forEachEntry:Oyt,matchAll:zyt,isHTMLForm:Nyt,hasOwnProperty:jV,hasOwnProp:jV,reduceDescriptors:UV,freezeMethods:Ryt,toObjectSet:Vyt,toCamelCase:Dyt,noop:jyt,toFiniteNumber:Uyt,findKey:RV,global:rg,isContextDefined:VV,isSpecCompliantForm:Gyt,toJSONObject:Hyt,isAsyncFn:Zyt,isThenable:Wyt,setImmediate:GV,asap:Xyt,isIterable:qyt};let ms=class HH extends Error{static from(o,s,z,W,v,g){const r=new HH(o.message,s||o.code,z,W,v);return r.cause=o,r.name=o.name,o.status!=null&&r.status==null&&(r.status=o.status),g&&Object.assign(r,g),r}constructor(o,s,z,W,v){super(o),Object.defineProperty(this,"message",{value:o,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,s&&(this.code=s),z&&(this.config=z),W&&(this.request=W),v&&(this.response=v,this.status=v.status)}toJSON(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:Mn.toJSONObject(this.config),code:this.code,status:this.status}}};ms.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",ms.ERR_BAD_OPTION="ERR_BAD_OPTION",ms.ECONNABORTED="ECONNABORTED",ms.ETIMEDOUT="ETIMEDOUT",ms.ERR_NETWORK="ERR_NETWORK",ms.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",ms.ERR_DEPRECATED="ERR_DEPRECATED",ms.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",ms.ERR_BAD_REQUEST="ERR_BAD_REQUEST",ms.ERR_CANCELED="ERR_CANCELED",ms.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",ms.ERR_INVALID_URL="ERR_INVALID_URL";const Yyt=null;function nS(e){return Mn.isPlainObject(e)||Mn.isArray(e)}function HV(e){return Mn.endsWith(e,"[]")?e.slice(0,-2):e}function iS(e,o,s){return e?e.concat(o).map(function(z,W){return z=HV(z),!s&&W?"["+z+"]":z}).join(s?".":""):o}function Jyt(e){return Mn.isArray(e)&&!e.some(nS)}const $yt=Mn.toFlatObject(Mn,{},null,function(e){return/^is[A-Z]/.test(e)});function j5(e,o,s){if(!Mn.isObject(e))throw new TypeError("target must be an object");o=o||new FormData,s=Mn.toFlatObject(s,{metaTokens:!0,dots:!1,indexes:!1},!1,function(x,u){return!Mn.isUndefined(u[x])});const z=s.metaTokens,W=s.visitor||d,v=s.dots,g=s.indexes,r=(s.Blob||typeof Blob<"u"&&Blob)&&Mn.isSpecCompliantForm(o);if(!Mn.isFunction(W))throw new TypeError("visitor must be a function");function b(x){if(x===null)return"";if(Mn.isDate(x))return x.toISOString();if(Mn.isBoolean(x))return x.toString();if(!r&&Mn.isBlob(x))throw new ms("Blob is not supported. Use a Buffer instead.");return Mn.isArrayBuffer(x)||Mn.isTypedArray(x)?r&&typeof Blob=="function"?new Blob([x]):Buffer.from(x):x}function d(x,u,n){let i=x;if(Mn.isReactNative(o)&&Mn.isReactNativeBlob(x))return o.append(iS(n,u,v),b(x)),!1;if(x&&!n&&typeof x=="object"){if(Mn.endsWith(u,"{}"))u=z?u:u.slice(0,-2),x=JSON.stringify(x);else if(Mn.isArray(x)&&Jyt(x)||(Mn.isFileList(x)||Mn.endsWith(u,"[]"))&&(i=Mn.toArray(x)))return u=HV(u),i.forEach(function(f,l){!(Mn.isUndefined(f)||f===null)&&o.append(g===!0?iS([u],l,v):g===null?u:u+"[]",b(f))}),!1}return nS(x)?!0:(o.append(iS(n,u,v),b(x)),!1)}const a=[],_=Object.assign($yt,{defaultVisitor:d,convertValue:b,isVisitable:nS});function y(x,u){if(!Mn.isUndefined(x)){if(a.indexOf(x)!==-1)throw Error("Circular reference detected in "+u.join("."));a.push(x),Mn.forEach(x,function(n,i){(!(Mn.isUndefined(n)||n===null)&&W.call(o,n,Mn.isString(i)?i.trim():i,u,_))===!0&&y(n,u?u.concat(i):[i])}),a.pop()}}if(!Mn.isObject(e))throw new TypeError("data must be an object");return y(e),o}function ZV(e){const o={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(s){return o[s]})}function oS(e,o){this._pairs=[],e&&j5(e,this,o)}const WV=oS.prototype;WV.append=function(e,o){this._pairs.push([e,o])},WV.toString=function(e){const o=e?function(s){return e.call(this,s,ZV)}:ZV;return this._pairs.map(function(s){return o(s[0])+"="+o(s[1])},"").join("&")};function Kyt(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function XV(e,o,s){if(!o)return e;const z=s&&s.encode||Kyt,W=Mn.isFunction(s)?{serialize:s}:s,v=W&&W.serialize;let g;if(v?g=v(o,W):g=Mn.isURLSearchParams(o)?o.toString():new oS(o,W).toString(z),g){const r=e.indexOf("#");r!==-1&&(e=e.slice(0,r)),e+=(e.indexOf("?")===-1?"?":"&")+g}return e}class qV{constructor(){this.handlers=[]}use(o,s,z){return this.handlers.push({fulfilled:o,rejected:s,synchronous:z?z.synchronous:!1,runWhen:z?z.runWhen:null}),this.handlers.length-1}eject(o){this.handlers[o]&&(this.handlers[o]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(o){Mn.forEach(this.handlers,function(s){s!==null&&o(s)})}}const sS={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0},Qyt=typeof URLSearchParams<"u"?URLSearchParams:oS,e2t=typeof FormData<"u"?FormData:null,t2t=typeof Blob<"u"?Blob:null,a2t={isBrowser:!0,classes:{URLSearchParams:Qyt,FormData:e2t,Blob:t2t},protocols:["http","https","file","blob","url","data"]},lS=typeof window<"u"&&typeof document<"u",cS=typeof navigator=="object"&&navigator||void 0,r2t=lS&&(!cS||["ReactNative","NativeScript","NS"].indexOf(cS.product)<0),n2t=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",i2t=lS&&window.location.href||"http://localhost",o2t=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:lS,hasStandardBrowserEnv:r2t,hasStandardBrowserWebWorkerEnv:n2t,navigator:cS,origin:i2t},Symbol.toStringTag,{value:"Module"})),kh={...o2t,...a2t};function s2t(e,o){return j5(e,new kh.classes.URLSearchParams,{visitor:function(s,z,W,v){return kh.isNode&&Mn.isBuffer(s)?(this.append(z,s.toString("base64")),!1):v.defaultVisitor.apply(this,arguments)},...o})}function l2t(e){return Mn.matchAll(/\w+|\[(\w*)]/g,e).map(o=>o[0]==="[]"?"":o[1]||o[0])}function c2t(e){const o={},s=Object.keys(e);let z;const W=s.length;let v;for(z=0;z<W;z++)v=s[z],o[v]=e[v];return o}function YV(e){function o(s,z,W,v){let g=s[v++];if(g==="__proto__")return!0;const r=Number.isFinite(+g),b=v>=s.length;return g=!g&&Mn.isArray(W)?W.length:g,b?(Mn.hasOwnProp(W,g)?W[g]=[W[g],z]:W[g]=z,!r):((!W[g]||!Mn.isObject(W[g]))&&(W[g]=[]),o(s,z,W[g],v)&&Mn.isArray(W[g])&&(W[g]=c2t(W[g])),!r)}if(Mn.isFormData(e)&&Mn.isFunction(e.entries)){const s={};return Mn.forEachEntry(e,(z,W)=>{o(l2t(z),W,s,0)}),s}return null}function u2t(e,o,s){if(Mn.isString(e))try{return(o||JSON.parse)(e),Mn.trim(e)}catch(z){if(z.name!=="SyntaxError")throw z}return(s||JSON.stringify)(e)}const ob={transitional:sS,adapter:["xhr","http","fetch"],transformRequest:[function(e,o){const s=o.getContentType()||"",z=s.indexOf("application/json")>-1,W=Mn.isObject(e);if(W&&Mn.isHTMLForm(e)&&(e=new FormData(e)),Mn.isFormData(e))return z?JSON.stringify(YV(e)):e;if(Mn.isArrayBuffer(e)||Mn.isBuffer(e)||Mn.isStream(e)||Mn.isFile(e)||Mn.isBlob(e)||Mn.isReadableStream(e))return e;if(Mn.isArrayBufferView(e))return e.buffer;if(Mn.isURLSearchParams(e))return o.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let v;if(W){if(s.indexOf("application/x-www-form-urlencoded")>-1)return s2t(e,this.formSerializer).toString();if((v=Mn.isFileList(e))||s.indexOf("multipart/form-data")>-1){const g=this.env&&this.env.FormData;return j5(v?{"files[]":e}:e,g&&new g,this.formSerializer)}}return W||z?(o.setContentType("application/json",!1),u2t(e)):e}],transformResponse:[function(e){const o=this.transitional||ob.transitional,s=o&&o.forcedJSONParsing,z=this.responseType==="json";if(Mn.isResponse(e)||Mn.isReadableStream(e))return e;if(e&&Mn.isString(e)&&(s&&!this.responseType||z)){const W=!(o&&o.silentJSONParsing)&&z;try{return JSON.parse(e,this.parseReviver)}catch(v){if(W)throw v.name==="SyntaxError"?ms.from(v,ms.ERR_BAD_RESPONSE,this,null,this.response):v}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:kh.classes.FormData,Blob:kh.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};Mn.forEach(["delete","get","head","post","put","patch"],e=>{ob.headers[e]={}});const d2t=Mn.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),h2t=e=>{const o={};let s,z,W;return e&&e.split(`
4144
+ `+v):z.stack=v}catch{}}throw z}}_request(o,s){typeof o=="string"?(s=s||{},s.url=o):s=o||{},s=tg(this.defaults,s);const{transitional:z,paramsSerializer:W,headers:v}=s;z!==void 0&&z5.assertOptions(z,{silentJSONParsing:X0.transitional(X0.boolean),forcedJSONParsing:X0.transitional(X0.boolean),clarifyTimeoutError:X0.transitional(X0.boolean)},!1),W!=null&&(An.isFunction(W)?s.paramsSerializer={serialize:W}:z5.assertOptions(W,{encode:X0.function,serialize:X0.function},!0)),s.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?s.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:s.allowAbsoluteUrls=!0),z5.assertOptions(s,{baseUrl:X0.spelling("baseURL"),withXsrfToken:X0.spelling("withXSRFToken")},!0),s.method=(s.method||this.defaults.method||"get").toLowerCase();let g=v&&An.merge(v.common,v[s.method]);v&&An.forEach(["delete","get","head","post","put","patch","common"],u=>{delete v[u]}),s.headers=mp.concat(g,v);const r=[];let b=!0;this.interceptors.request.forEach(function(u){typeof u.runWhen=="function"&&u.runWhen(s)===!1||(b=b&&u.synchronous,r.unshift(u.fulfilled,u.rejected))});const d=[];this.interceptors.response.forEach(function(u){d.push(u.fulfilled,u.rejected)});let a,_=0,y;if(!b){const u=[yV.bind(this),void 0];for(u.unshift(...r),u.push(...d),y=u.length,a=Promise.resolve(s);_<y;)a=a.then(u[_++],u[_++]);return a}y=r.length;let x=s;for(;_<y;){const u=r[_++],n=r[_++];try{x=u(x)}catch(i){n.call(this,i);break}}try{a=yV.call(this,x)}catch(u){return Promise.reject(u)}for(_=0,y=d.length;_<y;)a=a.then(d[_++],d[_++]);return a}getUri(o){o=tg(this.defaults,o);const s=oV(o.baseURL,o.url,o.allowAbsoluteUrls);return $R(s,o.params,o.paramsSerializer)}};An.forEach(["delete","get","head","options"],function(e){ag.prototype[e]=function(o,s){return this.request(tg(s||{},{method:e,url:o,data:(s||{}).data}))}}),An.forEach(["post","put","patch"],function(e){function o(s){return function(z,W,v){return this.request(tg(v||{},{method:e,headers:s?{"Content-Type":"multipart/form-data"}:{},url:z,data:W}))}}ag.prototype[e]=o(),ag.prototype[e+"Form"]=o(!0)});let Nft=class GH{constructor(o){if(typeof o!="function")throw new TypeError("executor must be a function.");let s;this.promise=new Promise(function(W){s=W});const z=this;this.promise.then(W=>{if(!z._listeners)return;let v=z._listeners.length;for(;v-- >0;)z._listeners[v](W);z._listeners=null}),this.promise.then=W=>{let v;const g=new Promise(r=>{z.subscribe(r),v=r}).then(W);return g.cancel=function(){z.unsubscribe(v)},g},o(function(W,v,g){z.reason||(z.reason=new l2(W,v,g),s(z.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(o){if(this.reason){o(this.reason);return}this._listeners?this._listeners.push(o):this._listeners=[o]}unsubscribe(o){if(!this._listeners)return;const s=this._listeners.indexOf(o);s!==-1&&this._listeners.splice(s,1)}toAbortSignal(){const o=new AbortController,s=z=>{o.abort(z)};return this.subscribe(s),o.signal.unsubscribe=()=>this.unsubscribe(s),o.signal}static source(){let o;return{token:new GH(function(s){o=s}),cancel:o}}};function Dft(e){return function(o){return e.apply(null,o)}}function Fft(e){return An.isObject(e)&&e.isAxiosError===!0}const tS={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,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(tS).forEach(([e,o])=>{tS[o]=e});function xV(e){const o=new ag(e),s=NR(ag.prototype.request,o);return An.extend(s,ag.prototype,o,{allOwnKeys:!0}),An.extend(s,o,null,{allOwnKeys:!0}),s.create=function(z){return xV(tg(e,z))},s}const md=xV(tb);md.Axios=ag,md.CanceledError=l2,md.CancelToken=Nft,md.isCancel=aV,md.VERSION=vV,md.toFormData=P5,md.AxiosError=vl,md.Cancel=md.CanceledError,md.all=function(e){return Promise.all(e)},md.spread=Dft,md.isAxiosError=Fft,md.mergeConfig=tg,md.AxiosHeaders=mp,md.formToJSON=e=>eV(An.isHTMLForm(e)?new FormData(e):e),md.getAdapter=gV.getAdapter,md.HttpStatusCode=tS,md.default=md;const Rft={class:"header-row controls-row"},Vft={class:"input-wrapper"},jft={class:"input-container"},Uft=["min","max"],Gft={class:"input-wrapper"},Hft={class:"input-container"},Zft=["min","max"],Wft={class:"timeline-container"},Xft={class:"team-circle team-circle-top"},qft=["src"],Yft={class:"team-circle team-circle-bottom"},Jft=["src"],$ft={class:"timeline-line"},Kft={key:0,class:"event-icon event-icon-top"},Qft={key:0,width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e0t={key:1,width:"23",height:"23",viewBox:"0 0 23 23",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t0t={key:2,width:"24",height:"24",viewBox:"0 0 48 48",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a0t={key:3,width:"24",height:"24",viewBox:"0 0 48 48",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r0t={class:"minute-ball minute-ball-center"},n0t={key:1,class:"event-icon event-icon-bottom"},i0t={key:0,width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o0t={key:1,width:"23",height:"23",viewBox:"0 0 23 23",fill:"none",xmlns:"http://www.w3.org/2000/svg"},s0t={key:2,width:"24",height:"24",viewBox:"0 0 48 48",fill:"none",xmlns:"http://www.w3.org/2000/svg"},l0t={key:3,width:"24",height:"24",viewBox:"0 0 48 48",fill:"none",xmlns:"http://www.w3.org/2000/svg"},c0t={width:"10",height:"6",viewBox:"0 0 12 8",style:{display:"block",margin:"0 auto",position:"relative",left:"-4.3px",top:"-5.5px"},fill:"#bfcf4c",xmlns:"http://www.w3.org/2000/svg"},u0t={width:"10",height:"6",viewBox:"0 0 12 8",style:{display:"block",margin:"0 auto",position:"relative",left:"-4.3px",top:"5.5px",transform:"rotate(180deg)"},fill:"#bfcf4c",xmlns:"http://www.w3.org/2000/svg"},d0t={width:"10",height:"6",viewBox:"0 0 12 8",style:{display:"block",margin:"0 auto",position:"relative",left:"-4.3px",top:"-5.5px"},fill:"#bfcf4c",xmlns:"http://www.w3.org/2000/svg"},h0t={width:"10",height:"6",viewBox:"0 0 12 8",style:{display:"block",margin:"0 auto",position:"relative",left:"-4.3px",top:"5.5px",transform:"rotate(180deg)"},fill:"#bfcf4c",xmlns:"http://www.w3.org/2000/svg"},p0t={__name:"TimeLine",props:{timelineWidth:{type:Number,required:!0,default:1010},gameId:{type:Number,required:!0},homeTeam:{type:Number,required:!0},awayTeam:{type:Number,required:!0},token:{type:String,required:!0}},emits:["range-change"],setup(e,{emit:o}){const s=t.ref(0),z=t.ref(96),W=t.ref("1"),v=t.ref("2"),g=t.ref(0),r=t.ref(45),b=t.ref(96),d=t.ref(0),a=t.ref(0),_=t.ref("0px"),y=t.ref([]),x=o,u=e,n=md.create({headers:{Authorization:`${u.token}`}}),i=t.ref([]);let f=null;const l=t.ref(null),h=t.ref(!1),m=t.ref(0),w=t.ref(0),T=t.ref(!1),A=t.ref(!1);let C=!1,I=0;const L=t.ref(0),E=t.ref(!1),P=t.ref(!1),M=t.ref(96),S=t.ref(null);function B(){if(S.value){const pe=S.value,ne=pe.scrollWidth-pe.clientWidth,le=pe.scrollLeft,ie=pe.scrollWidth>pe.clientWidth;T.value=ie&&le>0,A.value=ie&&Math.ceil(le)<Math.floor(ne)}}function k(){if(l.value){const pe=l.value.parentElement.clientWidth;m.value=pe,w.value===0&&(w.value=pe-90),t.nextTick(()=>{B()})}}function O(){if(i.value.length>0){const pe=Math.max(...i.value.map(ne=>ne.minute));M.value=pe,z.value=M.value}}async function D(){try{const pe=await n.get(`https://al2nv2dmkc.execute-api.us-west-2.amazonaws.com/prod/mxm/${u.gameId}`);if(pe.data&&pe.data.plays){const ne=pe.data.plays.find(ie=>{var me;return ie.event_type_id===6&&((me=ie.comments)==null?void 0:me.includes("El árbitro silba el Final del Primer Tiempo"))});ne&&(g.value=ne.minute);const le=Math.max(...pe.data.plays.map(ie=>ie.minute));b.value=le,M.value=le,z.value=M.value,y.value=[];for(let ie=0;ie<=g.value;ie++){const me=pe.data.plays.filter(ye=>{var ke;return ye.minute===ie&&ye.match_lapse===1&&(ye.category_id===9||ye.category_id===3||ye.event_type_id===1||ye.category_id===10||ye.category_id===13||ye.event_type_id===6&&((ke=ye.comments)==null?void 0:ke.includes("El árbitro silba el Final del Primer Tiempo")))}),ve=[];me.forEach(ye=>{ve.push({minute:ye.minute,minuteLabel:ye.event_type_id===6?"MT":ye.minute.toString(),icon:V(ye.event_type_id===1?ye.event_type_id:ye.category_id),team:ye.team_id===u.homeTeam?ye.category_id===13?"visitante":"local":ye.category_id===13?"local":"visitante",match_lapse:ye.match_lapse})}),y.value.push({minute:ie,match_lapse:1,event:ve.length>0?ve:null})}for(let ie=r.value;ie<=b.value;ie++){const me=pe.data.plays.filter(ye=>ye.minute===ie&&ye.match_lapse===2&&(ye.category_id===9||ye.category_id===3||ye.event_type_id===1||ye.category_id===10||ye.category_id===13)),ve=[];me.forEach(ye=>{ve.push({minute:ye.minute,minuteLabel:ye.event_type_id===6?"MT":ye.minute.toString(),icon:V(ye.event_type_id===1?ye.event_type_id:ye.category_id),team:ye.team_id===u.homeTeam?ye.category_id===13?"visitante":"local":ye.category_id===13?"local":"visitante",match_lapse:ye.match_lapse})}),y.value.push({minute:ie,match_lapse:2,event:ve.length>0?ve:null})}if(i.value=y.value.filter(ie=>ie.event!==null).map(ie=>ie.event),y.value.length>0){const ie=y.value.filter(ke=>ke.match_lapse===1);if(ie.length>0){const ke=ie[0];s.value=ke.minute,W.value="1",d.value=y.value.findIndex(Ee=>Ee.minute===ke.minute&&Ee.match_lapse===1)}const me=y.value.filter(ke=>ke.match_lapse===2);if(me.length>0){const ke=me[me.length-1];z.value=ke.minute,v.value="2",a.value=y.value.findIndex(Ee=>Ee.minute===ke.minute&&Ee.match_lapse===2)}const ve=y.value.findIndex(ke=>ke.minute===s.value&&ke.match_lapse===parseInt(W.value)),ye=y.value.findIndex(ke=>ke.minute===z.value&&ke.match_lapse===parseInt(v.value));if(ve!==-1&&ye!==-1&&ve<ye){const ke=y.value.length,Ee=ve/(ke-1)*(u.timelineWidth-40),Te=ye/(ke-1)*(u.timelineWidth-40);_.value=`${Te-Ee}px`}}}}catch(pe){console.error("Error al obtener los datos del partido:",pe)}}function V(pe){return{3:"icon-goal",1:"icon-goal",13:"icon-goal",10:"icon-change",9:"icon-red-card"}[pe]||""}t.onMounted(()=>{O(),k(),D(),t.nextTick(()=>{B()}),window.addEventListener("resize",()=>{k()})}),t.onBeforeUnmount(()=>{window.removeEventListener("resize",B)}),t.watch(i,()=>{t.nextTick(()=>{B()})},{deep:!0}),t.watch([s,z,W,v],()=>{ce()},{immediate:!0}),t.watch([W],()=>{if(!(P.value||h.value)){if(parseInt(W.value)>parseInt(v.value)&&(v.value=W.value,E.value=!0),E.value){if(W.value==="1"){const pe=y.value.filter(ne=>ne.match_lapse===1);if(pe.length>0){const ne=pe[0],le=pe[pe.length-1];(s.value<ne.minute||s.value>le.minute)&&(s.value=ne.minute);const ie=y.value.findIndex(me=>me.minute===s.value&&me.match_lapse===1);ie!==-1&&(d.value=ie)}}else if(W.value==="2"){const pe=y.value.filter(ne=>ne.match_lapse===2);if(pe.length>0){const ne=pe[0],le=pe[pe.length-1];(s.value<ne.minute||s.value>le.minute)&&(s.value=ne.minute);const ie=y.value.findIndex(me=>me.minute===s.value&&me.match_lapse===2);ie!==-1&&(d.value=ie)}}}else if(W.value==="1"){const pe=y.value.filter(ne=>ne.match_lapse===1);if(pe.length>0){const ne=pe[0];s.value=ne.minute;const le=y.value.findIndex(ie=>ie.minute===ne.minute&&ie.match_lapse===1);le!==-1&&(d.value=le)}}else if(W.value==="2"){const pe=y.value.filter(ne=>ne.match_lapse===2);if(pe.length>0){const ne=pe[0];s.value=ne.minute;const le=y.value.findIndex(ie=>ie.minute===ne.minute&&ie.match_lapse===2);le!==-1&&(d.value=le)}}E.value=!1,de()}},{immediate:!0}),t.watch([v],()=>{if(!(P.value||h.value)){if(parseInt(v.value)<parseInt(W.value)&&(W.value=v.value,E.value=!0),E.value){if(v.value==="1"){const pe=y.value.filter(ne=>ne.match_lapse===1);if(pe.length>0){const ne=pe[0],le=pe[pe.length-1];(z.value<ne.minute||z.value>le.minute)&&(z.value=le.minute);const ie=y.value.findIndex(me=>me.minute===z.value&&me.match_lapse===1);ie!==-1&&(a.value=ie)}}else if(v.value==="2"){const pe=y.value.filter(ne=>ne.match_lapse===2);if(pe.length>0){const ne=pe[0],le=pe[pe.length-1];(z.value<ne.minute||z.value>le.minute)&&(z.value=le.minute);const ie=y.value.findIndex(me=>me.minute===z.value&&me.match_lapse===2);ie!==-1&&(a.value=ie)}}}else if(v.value==="1"){const pe=y.value.filter(ne=>ne.match_lapse===1);if(pe.length>0){const ne=pe[pe.length-1];z.value=ne.minute;const le=y.value.findIndex(ie=>ie.minute===ne.minute&&ie.match_lapse===1);le!==-1&&(a.value=le)}}else if(v.value==="2"){const pe=y.value.filter(ne=>ne.match_lapse===2);if(pe.length>0){const ne=pe[pe.length-1];z.value=ne.minute;const le=y.value.findIndex(ie=>ie.minute===ne.minute&&ie.match_lapse===2);le!==-1&&(a.value=le)}}E.value=!1,de()}},{immediate:!0}),t.watch([s],()=>{if(!(P.value||h.value)){if(W.value==="1"){const pe=y.value.filter(ne=>ne.match_lapse===1);if(pe.length>0){const ne=pe[0],le=pe[pe.length-1];s.value<ne.minute?s.value=ne.minute:s.value>le.minute&&(s.value=le.minute);const ie=y.value.findIndex(me=>me.minute===s.value&&me.match_lapse===1);ie!==-1&&(d.value=ie)}}else if(W.value==="2"){const pe=y.value.filter(ne=>ne.match_lapse===2);if(pe.length>0){const ne=pe[0],le=pe[pe.length-1];s.value<ne.minute?s.value=ne.minute:s.value>le.minute&&(s.value=le.minute);const ie=y.value.findIndex(me=>me.minute===s.value&&me.match_lapse===2);ie!==-1&&(d.value=ie)}}if(W.value===v.value&&s.value>=z.value){if(v.value==="1"){const pe=y.value.filter(ne=>ne.match_lapse===1);if(pe.length>0){const ne=pe[pe.length-1];z.value=Math.min(ne.minute,s.value+1)}}else if(v.value==="2"){const pe=y.value.filter(ne=>ne.match_lapse===2);if(pe.length>0){const ne=pe[pe.length-1];z.value=Math.min(ne.minute,s.value+1)}}}de()}}),t.watch([z],()=>{if(!(P.value||h.value)){if(v.value==="1"){const pe=y.value.filter(ne=>ne.match_lapse===1);if(pe.length>0){const ne=pe[0],le=pe[pe.length-1];z.value<ne.minute?z.value=ne.minute:z.value>le.minute&&(z.value=le.minute);const ie=y.value.findIndex(me=>me.minute===z.value&&me.match_lapse===1);ie!==-1&&(a.value=ie)}}else if(v.value==="2"){const pe=y.value.filter(ne=>ne.match_lapse===2);if(pe.length>0){const ne=pe[0],le=pe[pe.length-1];z.value<ne.minute?z.value=ne.minute:z.value>le.minute&&(z.value=le.minute);const ie=y.value.findIndex(me=>me.minute===z.value&&me.match_lapse===2);ie!==-1&&(a.value=ie)}}if(W.value===v.value&&z.value<=s.value){if(W.value==="1"){const pe=y.value.filter(ne=>ne.match_lapse===1);if(pe.length>0){const ne=pe[0];s.value=Math.max(ne.minute,z.value-1)}}else if(W.value==="2"){const pe=y.value.filter(ne=>ne.match_lapse===2);if(pe.length>0){const ne=pe[0];s.value=Math.max(ne.minute,z.value-1)}}}de()}});function G(pe){const ne=y.value.length;return pe<0||ne===0||ne===1?"0px":`${pe/(ne-1)*(u.timelineWidth-40)}px`}function H(pe,ne){ne.preventDefault(),f=pe,I=ne.type.includes("touch")?ne.touches[0].clientX:ne.clientX,C=!1,pe==="left"?L.value=d.value:pe==="right"&&(L.value=a.value),document.addEventListener("mousemove",U),document.addEventListener("touchmove",U,{passive:!1}),document.addEventListener("mouseup",J),document.addEventListener("touchend",J),h.value=!0}function U(pe){if(!f)return;pe.preventDefault();const ne=pe.type.includes("touch")?pe.touches[0].clientX:pe.clientX;if(!C){if(Math.abs(ne-I)<5)return;C=!0}const le=Q(),ie=y.value.length,me=ne-I,ve=le/(ie-1),ye=Math.round(me/ve);let ke=L.value+ye;const Ee=Math.max(0,Math.min(ke,ie-1));if(f==="left"){const Be=y.value.findIndex(je=>je.minute===z.value&&je.match_lapse===parseInt(v.value));if(Ee>=Be-1)return;const Le=y.value[Ee];h.value=!0,d.value=Ee,s.value=Le.minute,W.value=Le.match_lapse.toString(),E.value=!0}else if(f==="right"){const Be=y.value.findIndex(je=>je.minute===s.value&&je.match_lapse===parseInt(W.value));if(Ee<=Be+1)return;const Le=y.value[Ee];h.value=!0,a.value=Ee,z.value=Le.minute,v.value=Le.match_lapse.toString(),E.value=!0}const Te=y.value.findIndex(Be=>Be.minute===s.value&&Be.match_lapse===parseInt(W.value)),Pe=y.value.findIndex(Be=>Be.minute===z.value&&Be.match_lapse===parseInt(v.value));if(Te!==-1&&Pe!==-1&&Te<Pe){const Be=y.value.length,Le=Te/(Be-1)*(u.timelineWidth-40),je=Pe/(Be-1)*(u.timelineWidth-40);_.value=`${je-Le}px`}t.nextTick(()=>{ce()})}function J(){f&&(s.value<0&&(s.value=0),z.value>M.value&&(z.value=M.value),t.nextTick(()=>{h.value=!1,E.value=!1}),ce()),f=null,document.removeEventListener("mousemove",U),document.removeEventListener("touchmove",U),document.removeEventListener("mouseup",J),document.removeEventListener("touchend",J)}function re(){if(s.value>0){P.value=!0;let pe=s.value-1,ne=!1,le=W.value;if(W.value==="1"){const me=y.value.filter(ve=>ve.match_lapse===1);if(me.length>0){const ve=me[0];pe<ve.minute&&(pe=ve.minute)}}else if(W.value==="2"){const me=y.value.filter(ve=>ve.match_lapse===2);if(me.length>0){const ve=me[0];if(pe<ve.minute){le="1",ne=!0;const ye=y.value.filter(ke=>ke.match_lapse===1);ye.length>0&&(pe=ye[ye.length-1].minute)}}}const ie=y.value.findIndex(me=>me.minute===pe&&me.match_lapse===parseInt(le));ie!==-1&&(d.value=ie,s.value=pe,ne&&(W.value=le,E.value=!0),de()),t.nextTick(()=>{P.value=!1})}}function q(){if(z.value<M.value){P.value=!0;let pe=z.value+1,ne=!1,le=v.value;if(le===W.value&&pe<=s.value){t.nextTick(()=>{P.value=!1});return}if(v.value==="1"){const me=y.value.filter(ve=>ve.match_lapse===1);if(me.length>0){const ve=me[me.length-1];if(pe>ve.minute){le="2",ne=!0;const ye=y.value.filter(ke=>ke.match_lapse===2);ye.length>0&&(pe=ye[0].minute)}}}else if(v.value==="2"){const me=y.value.filter(ve=>ve.match_lapse===2);if(me.length>0){const ve=me[me.length-1];pe>ve.minute&&(pe=ve.minute)}}if(parseInt(le)<parseInt(W.value)){if(W.value=le,E.value=!0,le==="1"){const me=y.value.filter(ve=>ve.match_lapse===1);if(me.length>0){const ve=me[0];s.value>pe&&(s.value=ve.minute)}}else if(le==="2"){const me=y.value.filter(ve=>ve.match_lapse===2);if(me.length>0){const ve=me[0];s.value>pe&&(s.value=ve.minute)}}}const ie=y.value.findIndex(me=>me.minute===pe&&me.match_lapse===parseInt(le));ie!==-1&&(a.value=ie,z.value=pe,ne&&(v.value=le,E.value=!0),de()),t.nextTick(()=>{P.value=!1})}}function ae(){let pe=!1,ne=z.value-1,le=v.value;if(!(le===W.value&&ne<=s.value)){if(v.value==="1"){const ie=y.value.filter(me=>me.match_lapse===1);if(ie.length>0){const me=ie[0];ne>=me.minute&&(pe=!0)}}else if(v.value==="2"){const ie=y.value.filter(me=>me.match_lapse===2);if(ie.length>0){const me=ie[0];if(ne>=me.minute)pe=!0;else{const ve=y.value.filter(ye=>ye.match_lapse===1);if(ve.length>0){const ye=ve[ve.length-1];le="1",ne=ye.minute,pe=!0}}}}if(pe){P.value=!0;let ie=!1;le!==v.value&&(ie=!0);const me=y.value.findIndex(ve=>ve.minute===ne&&ve.match_lapse===parseInt(le));me!==-1&&(a.value=me,z.value=ne,ie&&(v.value=le,E.value=!0),de()),t.nextTick(()=>{P.value=!1})}}}function ee(){const pe=document.querySelector(".timeline-scroll");if(pe){const ne=pe.scrollLeft,le=Math.max(0,ne-150);pe.scrollTo({left:le,behavior:"smooth"}),setTimeout(B,300)}}function $(){const pe=document.querySelector(".timeline-scroll");if(pe){const ne=pe.scrollLeft,le=pe.scrollWidth-pe.clientWidth,ie=Math.min(le,ne+150);pe.scrollTo({left:ie,behavior:"smooth"}),setTimeout(B,300)}}function Q(){return l.value?l.value.getBoundingClientRect().width:600}function ce(){const pe=s.value*60,ne=z.value*60;x("range-change",{start:{minutes:s.value,seconds:pe,time:W.value,match_lapse:parseInt(W.value)},end:{minutes:z.value,seconds:ne,time:v.value,match_lapse:parseInt(v.value)}})}function de(){const pe=y.value.findIndex(le=>le.minute===s.value&&le.match_lapse===parseInt(W.value)),ne=y.value.findIndex(le=>le.minute===z.value&&le.match_lapse===parseInt(v.value));if(pe!==-1&&ne!==-1&&pe<ne){const le=y.value.length,ie=pe/(le-1)*(u.timelineWidth-40),me=ne/(le-1)*(u.timelineWidth-40);_.value=`${me-ie}px`}}function he(){P.value=!0;let pe=s.value+1,ne=!1,le=W.value;if(le===v.value&&pe>=z.value){t.nextTick(()=>{P.value=!1});return}if(W.value==="1"){const me=y.value.filter(ve=>ve.match_lapse===1);if(me.length>0){const ve=me[me.length-1];if(pe>ve.minute){le="2",ne=!0;const ye=y.value.filter(ke=>ke.match_lapse===2);ye.length>0&&(pe=ye[0].minute)}}}else if(W.value==="2"){const me=y.value.filter(ve=>ve.match_lapse===2);if(me.length>0){const ve=me[me.length-1];pe>ve.minute&&(pe=ve.minute)}}if(parseInt(le)>parseInt(v.value)){if(v.value=le,E.value=!0,le==="1"){const me=y.value.filter(ve=>ve.match_lapse===1);if(me.length>0){const ve=me[me.length-1];z.value<pe&&(z.value=ve.minute)}}else if(le==="2"){const me=y.value.filter(ve=>ve.match_lapse===2);if(me.length>0){const ve=me[me.length-1];z.value<pe&&(z.value=ve.minute)}}}const ie=y.value.findIndex(me=>me.minute===pe&&me.match_lapse===parseInt(le));ie!==-1&&(d.value=ie,s.value=pe,ne&&(W.value=le,E.value=!0),de()),t.nextTick(()=>{P.value=!1})}return(pe,ne)=>{var le,ie,me,ve,ye,ke,Ee,Te;return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["timeline",{"is-dragging":h.value}]),ref_key:"timelineRef",ref:l,style:t.normalizeStyle({width:`${m.value}px`})},[t.createElementVNode("div",{class:t.normalizeClass(["timeline-header responsive-header",{"small-screen":m.value<470,"very-small-screen":m.value<420,"extra-small-screen":m.value<370,"mobile-column":m.value<500,"tablet-layout":m.value<800,"mobile-layout":m.value<580}])},[ne[21]||(ne[21]=t.createElementVNode("div",{class:"header-row"},[t.createElementVNode("span",{class:"header-title"},"Considerar eventos del ")],-1)),t.createElementVNode("div",Rft,[t.withDirectives(t.createElementVNode("select",{"onUpdate:modelValue":ne[0]||(ne[0]=Pe=>W.value=Pe),class:"time-select"},[...ne[12]||(ne[12]=[t.createElementVNode("option",{value:"1"},"Primer tiempo",-1),t.createElementVNode("option",{value:"2"},"Segundo tiempo",-1)])],512),[[t.vModelSelect,W.value]]),t.createElementVNode("div",Vft,[t.createElementVNode("div",jft,[ne[15]||(ne[15]=t.createElementVNode("span",{class:"input-label"},"min",-1)),t.withDirectives(t.createElementVNode("input",{type:"number","onUpdate:modelValue":ne[1]||(ne[1]=Pe=>s.value=Pe),readonly:"",min:W.value==="1"?((le=y.value.filter(Pe=>Pe.match_lapse===1)[0])==null?void 0:le.minute)||0:((ie=y.value.filter(Pe=>Pe.match_lapse===2)[0])==null?void 0:ie.minute)||45,max:W.value==="1"?((me=y.value.filter(Pe=>Pe.match_lapse===1).slice(-1)[0])==null?void 0:me.minute)||45:((ve=y.value.filter(Pe=>Pe.match_lapse===2).slice(-1)[0])==null?void 0:ve.minute)||96},null,8,Uft),[[t.vModelText,s.value]]),t.createElementVNode("div",{class:"input-arrows"},[t.createElementVNode("button",{class:"arrow-up",onClick:he},[...ne[13]||(ne[13]=[t.createElementVNode("svg",{width:"10",height:"6",viewBox:"0 0 10 6",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t.createElementVNode("path",{d:"M1 5L5 1L9 5",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])]),t.createElementVNode("button",{class:"arrow-down",onClick:re},[...ne[14]||(ne[14]=[t.createElementVNode("svg",{width:"10",height:"6",viewBox:"0 0 10 6",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t.createElementVNode("path",{d:"M1 1L5 5L9 1",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])])])])]),ne[20]||(ne[20]=t.createElementVNode("span",{class:"to-text"},"al",-1)),t.withDirectives(t.createElementVNode("select",{"onUpdate:modelValue":ne[2]||(ne[2]=Pe=>v.value=Pe),class:"time-select"},[...ne[16]||(ne[16]=[t.createElementVNode("option",{value:"1"},"Primer tiempo",-1),t.createElementVNode("option",{value:"2"},"Segundo tiempo",-1)])],512),[[t.vModelSelect,v.value]]),t.createElementVNode("div",Gft,[t.createElementVNode("div",Hft,[ne[19]||(ne[19]=t.createElementVNode("span",{class:"input-label"},"min",-1)),t.withDirectives(t.createElementVNode("input",{type:"number","onUpdate:modelValue":ne[3]||(ne[3]=Pe=>z.value=Pe),readonly:"",min:v.value==="1"?((ye=y.value.filter(Pe=>Pe.match_lapse===1)[0])==null?void 0:ye.minute)||0:((ke=y.value.filter(Pe=>Pe.match_lapse===2)[0])==null?void 0:ke.minute)||45,max:v.value==="1"?((Ee=y.value.filter(Pe=>Pe.match_lapse===1).slice(-1)[0])==null?void 0:Ee.minute)||45:((Te=y.value.filter(Pe=>Pe.match_lapse===2).slice(-1)[0])==null?void 0:Te.minute)||96},null,8,Zft),[[t.vModelText,z.value]]),t.createElementVNode("div",{class:"input-arrows"},[t.createElementVNode("button",{class:"arrow-up",onClick:q},[...ne[17]||(ne[17]=[t.createElementVNode("svg",{width:"10",height:"6",viewBox:"0 0 10 6",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t.createElementVNode("path",{d:"M1 5L5 1L9 5",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])]),t.createElementVNode("button",{class:"arrow-down",onClick:ae},[...ne[18]||(ne[18]=[t.createElementVNode("svg",{width:"10",height:"6",viewBox:"0 0 10 6",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t.createElementVNode("path",{d:"M1 1L5 5L9 1",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])])])])])])],2),t.createElementVNode("div",Wft,[t.withDirectives(t.createElementVNode("button",{class:"scroll-arrow scroll-left",onClick:ee},[...ne[22]||(ne[22]=[t.createElementVNode("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none"},[t.createElementVNode("path",{d:"M15 18L9 12L15 6",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])],512),[[t.vShow,T.value]]),t.createElementVNode("div",{class:"timeline-scroll",ref_key:"scrollContainer",ref:S,onScroll:B},[t.createElementVNode("div",{class:t.normalizeClass(["timeline-bar",{"has-scroll":T.value||A.value}]),style:t.normalizeStyle({width:`${e.timelineWidth}px`})},[t.createElementVNode("div",Xft,[t.createElementVNode("img",{src:`https://golstatsimages.blob.core.windows.net/teams-80/${u.homeTeam}.png`,alt:"Equipo local"},null,8,qft)]),t.createElementVNode("div",Yft,[t.createElementVNode("img",{src:`https://golstatsimages.blob.core.windows.net/teams-80/${u.awayTeam}.png`,alt:"Equipo visitante"},null,8,Jft)]),t.createElementVNode("div",$ft,[ne[38]||(ne[38]=t.createElementVNode("div",{class:"line"},null,-1)),t.createElementVNode("span",{class:"minute-ball minute-ball-initial minute-ball-center",style:t.normalizeStyle({left:G(0)})},"0'",4),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(y.value,(Pe,Be)=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(Pe.event,(Le,je)=>(t.openBlock(),t.createElementBlock("div",{key:"event-"+Be+"-"+je,class:"event",style:t.normalizeStyle({left:G(je===0?Be-1.5:Be-1.5+je*.3)})},[(Le==null?void 0:Le.team)==="local"?(t.openBlock(),t.createElementBlock("span",Kft,[(Le==null?void 0:Le.icon)==="icon-yellow-card"?(t.openBlock(),t.createElementBlock("svg",Qft,[...ne[23]||(ne[23]=[t.createElementVNode("rect",{x:"0.507812",y:"0.375488",width:"22.7873",height:"22.8364",rx:"11.3937",fill:"none"},null,-1),t.createElementVNode("rect",{x:"8",y:"7",width:"6.8362",height:"9.13458",rx:"2.28119",fill:"#F7C330"},null,-1)])])):(Le==null?void 0:Le.icon)==="icon-red-card"?(t.openBlock(),t.createElementBlock("svg",e0t,[...ne[24]||(ne[24]=[t.createElementVNode("rect",{width:"22.7873",height:"22.8364",rx:"11.3937",fill:"none"},null,-1),t.createElementVNode("rect",{x:"8",y:"7",width:"6.8362",height:"9.13458",rx:"2.28119",fill:"#E5152D"},null,-1)])])):(Le==null?void 0:Le.icon)==="icon-goal"?(t.openBlock(),t.createElementBlock("svg",t0t,[...ne[25]||(ne[25]=[t.createStaticVNode('<circle fill="none" cx="24" cy="24" r="24" data-v-e9ea1aeb></circle><ellipse fill="none" cx="24" cy="24" rx="14.82" ry="14.85" data-v-e9ea1aeb></ellipse><path fill="#fff" d="M24.03,36.05c-6.65,0-12.05-5.41-12.05-12.05s5.41-12.05,12.05-12.05,12.05,5.41,12.05,12.05-5.41,12.05-12.05,12.05Zm0-23.1c-6.1,0-11.05,4.96-11.05,11.05s4.96,11.05,11.05,11.05,11.05-4.96,11.05-11.05-4.96-11.05-11.05-11.05Z" data-v-e9ea1aeb></path><path fill="#fff" d="M27.22,29.38h-6.35c-.22,0-.41-.14-.48-.35l-1.96-6.06c-.07-.21,0-.43,.18-.56l5.14-3.74c.18-.13,.41-.13,.59,0l5.14,3.74c.17,.13,.25,.35,.18,.56l-1.96,6.06c-.07,.21-.26,.35-.48,.35Zm-5.99-1h5.62l1.74-5.37-4.55-3.32-4.55,3.32,1.74,5.37Z" data-v-e9ea1aeb></path><path fill="#fff" d="M24.06,15.71c-.07,0-.13-.01-.2-.04l-4.38-1.87c-.25-.11-.37-.4-.26-.66,.11-.25,.4-.37,.66-.26l4.18,1.78,4.18-1.78c.25-.11,.55,0,.66,.26,.11,.25,0,.55-.26,.66l-4.38,1.87c-.06,.03-.13,.04-.2,.04Z" data-v-e9ea1aeb></path><path fill="#fff" d="M12.62,25.37c-.12,0-.23-.04-.33-.12-.21-.18-.23-.5-.05-.71l2.99-3.44-.4-4.54c-.02-.27,.18-.52,.45-.54,.27-.03,.52,.18,.54,.45l.42,4.75c.01,.14-.03,.27-.12,.37l-3.12,3.6c-.1,.11-.24,.17-.38,.17Z" data-v-e9ea1aeb></path><path fill="#fff" d="M21.37,35.66c-.17,0-.34-.09-.43-.24l-2.34-3.91-4.43-1.02c-.27-.06-.44-.33-.38-.6s.33-.44,.6-.38l4.64,1.07c.13,.03,.25,.11,.32,.23l2.45,4.09c.14,.24,.06,.54-.17,.69-.08,.05-.17,.07-.26,.07Z" data-v-e9ea1aeb></path><path fill="#fff" d="M26.75,35.66c-.09,0-.18-.02-.26-.07-.24-.14-.31-.45-.17-.69l2.44-4.09c.07-.12,.18-.2,.32-.23l4.63-1.07c.27-.06,.54,.11,.6,.38s-.11,.54-.38,.6l-4.43,1.02-2.33,3.91c-.09,.16-.26,.24-.43,.24Z" data-v-e9ea1aeb></path><path fill="#fff" d="M35.5,25.37c-.14,0-.28-.06-.38-.17l-3.13-3.6c-.09-.1-.13-.24-.12-.37l.42-4.75c.02-.27,.27-.48,.54-.45,.28,.02,.48,.27,.45,.54l-.4,4.54,2.99,3.44c.18,.21,.16,.52-.05,.71-.09,.08-.21,.12-.33,.12Z" data-v-e9ea1aeb></path><path fill="#fff" d="M24.05,19.58c-.28,0-.5-.22-.5-.5v-3.87c0-.28,.22-.5,.5-.5s.5,.22,.5,.5v3.87c0,.28-.22,.5-.5,.5Z" data-v-e9ea1aeb></path><path fill="#fff" d="M29.21,23.47c-.18,0-.35-.1-.44-.26-.13-.24-.04-.55,.2-.68l3.17-1.7c.25-.13,.55-.04,.68,.2,.13,.24,.04,.55-.2,.68l-3.17,1.7c-.08,.04-.16,.06-.24,.06Z" data-v-e9ea1aeb></path><path fill="#fff" d="M29.2,31.57c-.14,0-.27-.06-.37-.17l-1.96-2.19c-.18-.21-.17-.52,.04-.71,.21-.18,.52-.17,.71,.04l1.96,2.19c.18,.21,.17,.52-.04,.71-.1,.09-.21,.13-.33,.13Z" data-v-e9ea1aeb></path><path fill="#fff" d="M18.91,31.57c-.12,0-.24-.04-.33-.13-.21-.18-.22-.5-.04-.71l1.96-2.19c.19-.21,.5-.22,.71-.04,.21,.18,.22,.5,.04,.71l-1.96,2.19c-.1,.11-.24,.17-.37,.17Z" data-v-e9ea1aeb></path><path fill="#fff" d="M18.93,23.32c-.07,0-.15-.02-.22-.05l-3.17-1.55c-.25-.12-.35-.42-.23-.67,.12-.25,.42-.35,.67-.23l3.17,1.55c.25,.12,.35,.42,.23,.67-.09,.18-.26,.28-.45,.28Z" data-v-e9ea1aeb></path>',14)])])):(Le==null?void 0:Le.icon)==="icon-change"?(t.openBlock(),t.createElementBlock("svg",a0t,[...ne[26]||(ne[26]=[t.createStaticVNode('<circle fill="none" cx="24" cy="24" r="24" data-v-e9ea1aeb></circle><path fill="#fff" d="M31.62,23.86c-.19,0-.37-.07-.52-.21-.3-.29-.31-.76-.03-1.06l2.89-3.04-2.89-3.04c-.29-.3-.27-.77,.03-1.06,.3-.29,.77-.27,1.06,.03l3.39,3.56c.28,.29,.28,.74,0,1.03l-3.39,3.56c-.15,.15-.34,.23-.54,.23Z" data-v-e9ea1aeb></path><path fill="#fff" d="M34.99,20.31H16.37c-.41,0-.75-.34-.75-.75s.34-.75,.75-.75h18.62c.41,0,.75,.34,.75,.75s-.34,.75-.75,.75Z" data-v-e9ea1aeb></path><path fill="#fff" d="M16.38,32.75c-.2,0-.4-.08-.54-.23l-3.38-3.56c-.28-.29-.28-.74,0-1.03l3.38-3.56c.28-.3,.76-.31,1.06-.03,.3,.29,.31,.76,.03,1.06l-2.89,3.04,2.89,3.04c.29,.3,.27,.78-.03,1.06-.15,.14-.33,.21-.52,.21Z" data-v-e9ea1aeb></path><path fill="#fff" d="M31.62,29.19H13c-.41,0-.75-.34-.75-.75s.34-.75,.75-.75H31.62c.41,0,.75,.34,.75,.75s-.34,.75-.75,.75Z" data-v-e9ea1aeb></path>',5)])])):(t.openBlock(),t.createElementBlock("span",{key:4,class:t.normalizeClass(Le==null?void 0:Le.icon)},null,2))])):t.createCommentVNode("",!0),t.createElementVNode("span",r0t,t.toDisplayString((Le==null?void 0:Le.minuteLabel)||Pe.minute)+"'",1),(Le==null?void 0:Le.team)==="visitante"?(t.openBlock(),t.createElementBlock("span",n0t,[(Le==null?void 0:Le.icon)==="icon-yellow-card"?(t.openBlock(),t.createElementBlock("svg",i0t,[...ne[27]||(ne[27]=[t.createElementVNode("rect",{x:"0.507812",y:"0.375488",width:"22.7873",height:"22.8364",rx:"11.3937",fill:"none"},null,-1),t.createElementVNode("rect",{x:"8",y:"7",width:"6.8362",height:"9.13458",rx:"2.28119",fill:"#F7C330"},null,-1)])])):(Le==null?void 0:Le.icon)==="icon-red-card"?(t.openBlock(),t.createElementBlock("svg",o0t,[...ne[28]||(ne[28]=[t.createElementVNode("rect",{width:"22.7873",height:"22.8364",rx:"11.3937",fill:"none"},null,-1),t.createElementVNode("rect",{x:"8",y:"7",width:"6.8362",height:"9.13458",rx:"2.28119",fill:"#E5152D"},null,-1)])])):(Le==null?void 0:Le.icon)==="icon-goal"?(t.openBlock(),t.createElementBlock("svg",s0t,[...ne[29]||(ne[29]=[t.createStaticVNode('<circle fill="none" cx="24" cy="24" r="24" data-v-e9ea1aeb></circle><ellipse fill="none" cx="24" cy="24" rx="14.82" ry="14.85" data-v-e9ea1aeb></ellipse><path fill="#fff" d="M24.03,36.05c-6.65,0-12.05-5.41-12.05-12.05s5.41-12.05,12.05-12.05,12.05,5.41,12.05,12.05-5.41,12.05-12.05,12.05Zm0-23.1c-6.1,0-11.05,4.96-11.05,11.05s4.96,11.05,11.05,11.05,11.05-4.96,11.05-11.05-4.96-11.05-11.05-11.05Z" data-v-e9ea1aeb></path><path fill="#fff" d="M27.22,29.38h-6.35c-.22,0-.41-.14-.48-.35l-1.96-6.06c-.07-.21,0-.43,.18-.56l5.14-3.74c.18-.13,.41-.13,.59,0l5.14,3.74c.17,.13,.25,.35,.18,.56l-1.96,6.06c-.07,.21-.26,.35-.48,.35Zm-5.99-1h5.62l1.74-5.37-4.55-3.32-4.55,3.32,1.74,5.37Z" data-v-e9ea1aeb></path><path fill="#fff" d="M24.06,15.71c-.07,0-.13-.01-.2-.04l-4.38-1.87c-.25-.11-.37-.4-.26-.66,.11-.25,.4-.37,.66-.26l4.18,1.78,4.18-1.78c.25-.11,.55,0,.66,.26,.11,.25,0,.55-.26,.66l-4.38,1.87c-.06,.03-.13,.04-.2,.04Z" data-v-e9ea1aeb></path><path fill="#fff" d="M12.62,25.37c-.12,0-.23-.04-.33-.12-.21-.18-.23-.5-.05-.71l2.99-3.44-.4-4.54c-.02-.27,.18-.52,.45-.54,.27-.03,.52,.18,.54,.45l.42,4.75c.01,.14-.03,.27-.12,.37l-3.12,3.6c-.1,.11-.24,.17-.38,.17Z" data-v-e9ea1aeb></path><path fill="#fff" d="M21.37,35.66c-.17,0-.34-.09-.43-.24l-2.34-3.91-4.43-1.02c-.27-.06-.44-.33-.38-.6s.33-.44,.6-.38l4.64,1.07c.13,.03,.25,.11,.32,.23l2.45,4.09c.14,.24,.06,.54-.17,.69-.08,.05-.17,.07-.26,.07Z" data-v-e9ea1aeb></path><path fill="#fff" d="M26.75,35.66c-.09,0-.18-.02-.26-.07-.24-.14-.31-.45-.17-.69l2.44-4.09c.07-.12,.18-.2,.32-.23l4.63-1.07c.27-.06,.54,.11,.6,.38s-.11,.54-.38,.6l-4.43,1.02-2.33,3.91c-.09,.16-.26,.24-.43,.24Z" data-v-e9ea1aeb></path><path fill="#fff" d="M35.5,25.37c-.14,0-.28-.06-.38-.17l-3.13-3.6c-.09-.1-.13-.24-.12-.37l.42-4.75c.02-.27,.27-.48,.54-.45,.28,.02,.48,.27,.45,.54l-.4,4.54,2.99,3.44c.18,.21,.16,.52-.05,.71-.09,.08-.21,.12-.33,.12Z" data-v-e9ea1aeb></path><path fill="#fff" d="M24.05,19.58c-.28,0-.5-.22-.5-.5v-3.87c0-.28,.22-.5,.5-.5s.5,.22,.5,.5v3.87c0,.28-.22,.5-.5,.5Z" data-v-e9ea1aeb></path><path fill="#fff" d="M29.21,23.47c-.18,0-.35-.1-.44-.26-.13-.24-.04-.55,.2-.68l3.17-1.7c.25-.13,.55-.04,.68,.2,.13,.24,.04,.55-.2,.68l-3.17,1.7c-.08,.04-.16,.06-.24,.06Z" data-v-e9ea1aeb></path><path fill="#fff" d="M29.2,31.57c-.14,0-.27-.06-.37-.17l-1.96-2.19c-.18-.21-.17-.52,.04-.71,.21-.18,.52-.17,.71,.04l1.96,2.19c.18,.21,.17,.52-.04,.71-.1,.09-.21,.13-.33,.13Z" data-v-e9ea1aeb></path><path fill="#fff" d="M18.91,31.57c-.12,0-.24-.04-.33-.13-.21-.18-.22-.5-.04-.71l1.96-2.19c.19-.21,.5-.22,.71-.04,.21,.18,.22,.5,.04,.71l-1.96,2.19c-.1,.11-.24,.17-.37,.17Z" data-v-e9ea1aeb></path><path fill="#fff" d="M18.93,23.32c-.07,0-.15-.02-.22-.05l-3.17-1.55c-.25-.12-.35-.42-.23-.67,.12-.25,.42-.35,.67-.23l3.17,1.55c.25,.12,.35,.42,.23,.67-.09,.18-.26,.28-.45,.28Z" data-v-e9ea1aeb></path>',14)])])):(Le==null?void 0:Le.icon)==="icon-change"?(t.openBlock(),t.createElementBlock("svg",l0t,[...ne[30]||(ne[30]=[t.createStaticVNode('<circle fill="none" cx="24" cy="24" r="24" data-v-e9ea1aeb></circle><path fill="#fff" d="M31.62,23.86c-.19,0-.37-.07-.52-.21-.3-.29-.31-.76-.03-1.06l2.89-3.04-2.89-3.04c-.29-.3-.27-.77,.03-1.06,.3-.29,.77-.27,1.06,.03l3.39,3.56c.28,.29,.28,.74,0,1.03l-3.39,3.56c-.15,.15-.34,.23-.54,.23Z" data-v-e9ea1aeb></path><path fill="#fff" d="M34.99,20.31H16.37c-.41,0-.75-.34-.75-.75s.34-.75,.75-.75h18.62c.41,0,.75,.34,.75,.75s-.34,.75-.75,.75Z" data-v-e9ea1aeb></path><path fill="#fff" d="M16.38,32.75c-.2,0-.4-.08-.54-.23l-3.38-3.56c-.28-.29-.28-.74,0-1.03l3.38-3.56c.28-.3,.76-.31,1.06-.03,.3,.29,.31,.76,.03,1.06l-2.89,3.04,2.89,3.04c.29,.3,.27,.78-.03,1.06-.15,.14-.33,.21-.52,.21Z" data-v-e9ea1aeb></path><path fill="#fff" d="M31.62,29.19H13c-.41,0-.75-.34-.75-.75s.34-.75,.75-.75H31.62c.41,0,.75,.34,.75,.75s-.34,.75-.75,.75Z" data-v-e9ea1aeb></path>',5)])])):(t.openBlock(),t.createElementBlock("span",{key:4,class:t.normalizeClass(Le==null?void 0:Le.icon)},null,2))])):t.createCommentVNode("",!0)],4))),128))],64))),256)),t.createElementVNode("span",{class:"minute-ball minute-ball-edge minute-ball-center",style:t.normalizeStyle({left:G(y.value.length-1)})},t.toDisplayString(b.value)+"'",5),t.createElementVNode("div",{class:"range-indicator",style:t.normalizeStyle({left:G(d.value),width:_.value})},[t.createElementVNode("div",{class:"handle left",onMousedown:ne[4]||(ne[4]=Pe=>H("left",Pe)),onTouchstart:ne[5]||(ne[5]=Pe=>H("left",Pe))},[(t.openBlock(),t.createElementBlock("svg",c0t,[...ne[31]||(ne[31]=[t.createElementVNode("polygon",{points:"6,8 0,0 12,0"},null,-1)])])),ne[33]||(ne[33]=t.createElementVNode("div",{style:{flex:"1"}},null,-1)),(t.openBlock(),t.createElementBlock("svg",u0t,[...ne[32]||(ne[32]=[t.createElementVNode("polygon",{points:"6,8 0,0 12,0"},null,-1)])]))],32),t.createElementVNode("span",{class:"range-dot range-dot-left",onMousedown:ne[6]||(ne[6]=Pe=>H("left",Pe)),onTouchstart:ne[7]||(ne[7]=Pe=>H("left",Pe))},null,32),ne[37]||(ne[37]=t.createElementVNode("div",{class:"range-line"},null,-1)),t.createElementVNode("span",{class:"range-dot range-dot-right",onMousedown:ne[8]||(ne[8]=Pe=>H("right",Pe)),onTouchstart:ne[9]||(ne[9]=Pe=>H("right",Pe))},null,32),t.createElementVNode("div",{class:"handle right",onMousedown:ne[10]||(ne[10]=Pe=>H("right",Pe)),onTouchstart:ne[11]||(ne[11]=Pe=>H("right",Pe))},[(t.openBlock(),t.createElementBlock("svg",d0t,[...ne[34]||(ne[34]=[t.createElementVNode("polygon",{points:"6,8 0,0 12,0"},null,-1)])])),ne[36]||(ne[36]=t.createElementVNode("div",{style:{flex:"1"}},null,-1)),(t.openBlock(),t.createElementBlock("svg",h0t,[...ne[35]||(ne[35]=[t.createElementVNode("polygon",{points:"6,8 0,0 12,0"},null,-1)])]))],32)],4)])],6)],544),t.withDirectives(t.createElementVNode("button",{class:"scroll-arrow scroll-right",onClick:$},[...ne[39]||(ne[39]=[t.createElementVNode("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none"},[t.createElementVNode("path",{d:"M9 6L15 12L9 18",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])],512),[[t.vShow,A.value]])])],6)}}},_V=du(p0t,[["__scopeId","data-v-e9ea1aeb"]]),f0t={class:"expandible-timeline"},m0t={class:"expandible-timeline__content"},g0t={__name:"ExpandibleTimeline",props:{game:{type:Object,default:()=>({gameId:0,homeTeam:{team_id:0},awayTeam:{team_id:0}})},token:{type:String,default:""}},emits:["range-change"],setup(e,{emit:o}){const s=o;function z(W){s("range-change",W)}return(W,v)=>(t.openBlock(),t.createElementBlock("div",f0t,[t.createVNode($v,{"header-text":"Timeline de eventos","border-radius":"8px",onToggle:v[0]||(v[0]=g=>W.$emit("toggle"))},{default:t.withCtx(()=>[t.createElementVNode("div",m0t,[t.createVNode(_V,{"timeline-width":539,"game-id":e.game.gameId,"home-team":e.game.homeTeam.team_id,"away-team":e.game.awayTeam.team_id,token:e.token,onRangeChange:z},null,8,["game-id","home-team","away-team","token"])])]),_:1})]))}},y0t=du(g0t,[["__scopeId","data-v-be176377"]]),v0t={class:"filter-shadows-filters"},b0t={class:"filter-shadows-filters__timeline"},x0t={class:"filter-shadows-filters__filters"},_0t={__name:"FilterShadowsFilters",props:{game:{type:Object,default:()=>({gameId:0,homeTeam:{team_id:0},awayTeam:{team_id:0}})},selectedTeamTab:{type:Number,default:0},token:{type:String,default:""}},emits:["handleShadowsPossessionChange","handleShadowsExcludedFirstSecondsChange","handleShadowsExcludedLastSecondsChange","handleShadowsChainInitialZonesChange","handleShadowsChainFinalZonesChange","handleShadowsBallInterestZonesChange","handleShadowsDurationChange","range-change"],setup(e,{emit:o}){const s=o,z=_=>{s("handleShadowsPossessionChange",_)},W=(_,y)=>{s("handleShadowsDurationChange",_,y)},v=_=>{s("handleShadowsExcludedFirstSecondsChange",_)},g=_=>{s("handleShadowsExcludedLastSecondsChange",_)},r=_=>{s("handleShadowsChainInitialZonesChange",_)},b=_=>{s("handleShadowsChainFinalZonesChange",_)},d=_=>{s("handleShadowsBallInterestZonesChange",_)},a=_=>{s("range-change",_)};return(_,y)=>(t.openBlock(),t.createElementBlock("div",v0t,[t.createElementVNode("div",b0t,[t.createVNode(y0t,{token:e.token,game:e.game,onRangeChange:a},null,8,["token","game"])]),t.createElementVNode("div",x0t,[t.withDirectives(t.createVNode(T5,{"team-id":e.game.homeTeam.team_id,"is-shadows":!0,game:e.game,onChangePossession:z,onChangeDuration:W,onChangeExcludedFirstSeconds:v,onChangeExcludedLastSeconds:g,onChangeChainInitialZones:r,onChangeChainFinalZones:b,onChangeBallInterestZones:d},null,8,["team-id","game"]),[[t.vShow,e.selectedTeamTab===e.game.homeTeam.team_id]]),t.withDirectives(t.createVNode(T5,{"team-id":e.game.awayTeam.team_id,"is-shadows":!0,game:e.game,onChangePossession:z,onChangeDuration:W,onChangeExcludedFirstSeconds:v,onChangeExcludedLastSeconds:g,onChangeChainInitialZones:r,onChangeChainFinalZones:b,onChangeBallInterestZones:d},null,8,["team-id","game"]),[[t.vShow,e.selectedTeamTab===e.game.awayTeam.team_id]])])]))}},wV=du(_0t,[["__scopeId","data-v-f148e6b3"]]),w0t={class:"filter-events"},k0t={class:"events-section"},S0t={class:"section-header"},T0t={class:"all-toggle"},C0t={class:"events-list"},E0t={class:"events-section"},A0t={class:"section-header"},M0t={class:"events-list"},P0t={__name:"FilterEventsShadows",props:{startedCategories:{type:Array,default:()=>[]},endedCategories:{type:Array,default:()=>[]},allStartEventsSelected:{type:Boolean,default:!1},allEndEventsSelected:{type:Boolean,default:!1}},emits:["toggle-all-start-events","toggle-all-end-events","update-start-event","update-end-event"],setup(e,{emit:o}){const s=o,z=e,W=t.ref(z.allStartEventsSelected),v=t.ref(z.allEndEventsSelected);t.watch(()=>z.allStartEventsSelected,a=>{W.value=a},{immediate:!0}),t.watch(()=>z.allEndEventsSelected,a=>{v.value=a},{immediate:!0});function g(a){W.value=a,s("toggle-all-start-events",a)}function r(a){v.value=a,s("toggle-all-end-events",a)}function b(a,_){s("update-start-event",a,_)}function d(a,_){s("update-end-event",a,_)}return(a,_)=>(t.openBlock(),t.createElementBlock("div",w0t,[t.createElementVNode("div",k0t,[t.createElementVNode("div",S0t,[_[0]||(_[0]=t.createElementVNode("span",{class:"section-title"},"Jugadas que empiezan con:",-1)),t.createElementVNode("label",T0t,[t.createVNode(t.unref(pp),{label:"Todas","box-position":"right","model-value":W.value,"onUpdate:modelValue":g},null,8,["model-value"])])]),t.createElementVNode("div",C0t,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(z.startedCategories,y=>(t.openBlock(),t.createElementBlock("div",{key:y.id,class:"category-item"},[t.createVNode(t.unref(pp),{"model-value":y.isSelected,label:y.name,"onUpdate:modelValue":x=>b(x,y)},null,8,["model-value","label","onUpdate:modelValue"])]))),128))])]),t.createElementVNode("div",E0t,[t.createElementVNode("div",A0t,[_[1]||(_[1]=t.createElementVNode("span",{class:"section-title"},"Jugadas que terminan con:",-1)),t.createVNode(t.unref(pp),{label:"Todas","box-position":"right","model-value":v.value,"onUpdate:modelValue":r},null,8,["model-value"])]),t.createElementVNode("div",M0t,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(z.endedCategories,y=>(t.openBlock(),t.createElementBlock("div",{key:y.id,class:"category-item"},[t.createVNode(t.unref(pp),{"model-value":y.isSelected,label:y.name,"onUpdate:modelValue":x=>d(x,y)},null,8,["model-value","label","onUpdate:modelValue"])]))),128))])])]))}},kV=du(P0t,[["__scopeId","data-v-4232de5a"]]),I0t={class:"expandible-players"},L0t={class:"expandible-players__list"},B0t={class:"all-players list-item"},O0t={class:"player-item__checkbox"},z0t={class:"player-item__photo"},N0t=["src"],D0t={class:"player-item__info"},F0t={class:"player-item__info__name"},R0t={class:"player-item__info__secondary-info"},V0t={class:"player-item__info__secondary-info__nationality"},j0t=["src"],U0t={class:"player-item__info__secondary-info__position"},G0t={__name:"ExpandiblePlayers",props:{players:{type:Array,default:()=>[]},arePlayersTitular:{type:Boolean,default:!1}},setup(e){const o=e,s=t.computed(()=>o.arePlayersTitular?"Titulares:":"Cambios:"),z=t.computed(()=>`Todos los ${s.value.toLowerCase()}`);function W(v){v?o.players.forEach(g=>{g.isSelected=!0}):o.players.forEach((g,r)=>{g.isSelected=r===0})}return(v,g)=>(t.openBlock(),t.createElementBlock("div",I0t,[t.createVNode($v,{"border-radius":"8px","header-text":s.value,onToggle:g[0]||(g[0]=r=>v.$emit("toggle"))},{default:t.withCtx(()=>[t.createElementVNode("div",L0t,[t.createElementVNode("div",B0t,[t.createVNode(t.unref(pp),{"model-value":o.players.every(r=>r.isSelected),label:z.value,"onUpdate:modelValue":W},null,8,["model-value","label"])]),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.players,r=>(t.openBlock(),t.createElementBlock("div",{key:r.player_id,class:"list-item player-item"},[t.createElementVNode("div",O0t,[t.createVNode(t.unref(pp),{modelValue:r.isSelected,"onUpdate:modelValue":b=>r.isSelected=b},null,8,["modelValue","onUpdate:modelValue"])]),t.createElementVNode("div",z0t,[t.createElementVNode("img",{src:r.player_photo||r.photo},null,8,N0t)]),t.createElementVNode("div",D0t,[t.createElementVNode("div",F0t,t.toDisplayString(r.short_name||r.name||r.player_name),1),t.createElementVNode("div",R0t,[t.createElementVNode("div",V0t,[t.createElementVNode("img",{src:r.player_country_flag||r.nationality_photo||r.countryFlag},null,8,j0t)]),t.createElementVNode("div",U0t,t.toDisplayString(r.positionName||r.position_name||r.position),1)])])]))),128))])]),_:1},8,["header-text"])]))}},SV=du(G0t,[["__scopeId","data-v-bb8595b9"]]),H0t={class:"filter-players"},Z0t={__name:"FilterPlayers",props:{players:{type:Array,default:()=>[]}},setup(e){const o=e,s=t.computed(()=>o.players.filter(W=>W.is_titular)),z=t.computed(()=>o.players.filter(W=>!W.is_titular));return(W,v)=>(t.openBlock(),t.createElementBlock("div",H0t,[t.createVNode(SV,{players:s.value,"are-players-titular":""},null,8,["players"]),t.createVNode(SV,{players:z.value,"are-players-titular":!1},null,8,["players"])]))}},N5=du(Z0t,[["__scopeId","data-v-44980c4e"]]);let W0t=class{constructor(){this.dataByTimePoint=new Map,this.playerPositions=new Map,this.ballPositions=new Map,this.matchlapseIndex=new Map,this.secondIndex=new Map}processPositions(o){return this.dataByTimePoint.clear(),this.playerPositions.clear(),this.ballPositions.clear(),this.matchlapseIndex.clear(),this.secondIndex.clear(),!o.info_by_second||!Array.isArray(o.info_by_second)?(console.error("No se encontraron datos válidos en info_by_second"),this):(o.info_by_second.forEach(s=>{const[z,W,v,g]=s,[r,b,d]=v,a=`${W}:${z}`;this.dataByTimePoint.set(a,{second:z,matchLapse:W,timeKey:a,ball:{x:r,y:b,zone:d},players:new Map}),this.ballPositions.set(a,{x:r,y:b,zone:d,second:z,matchLapse:W}),this.matchlapseIndex.has(W)||this.matchlapseIndex.set(W,new Set),this.matchlapseIndex.get(W).add(z),this.secondIndex.has(z)||this.secondIndex.set(z,new Set),this.secondIndex.get(z).add(W),Array.isArray(g)&&g.forEach(_=>{const[y,x,u,n,i]=_;this.dataByTimePoint.get(a).players.set(y,{playerId:y,teamId:x,x:u,y:n,zone:i,second:z,matchLapse:W,timeKey:a}),this.playerPositions.has(y)||this.playerPositions.set(y,[]),this.playerPositions.get(y).push({second:z,matchLapse:W,timeKey:a,teamId:x,x:u,y:n,zone:i})})}),this)}filterData(o={}){const{timeRanges:s=null,ballZones:z=null}=o,W=new Map;let v=[];return s&&s.length>0&&s.forEach(g=>{const{match_lapse:r,start:b,end:d}=g;this.matchlapseIndex.has(r)?Array.from(this.matchlapseIndex.get(r)).filter(a=>a>=b&&a<=d).forEach(a=>{v.push(`${r}:${a}`)}):console.error(`Matchlapse ${r} no encontrado en índice`)}),z&&z.length>0&&(v=v.filter(g=>{const r=this.ballPositions.get(g);return r&&z.includes(r.zone)})),v.forEach(g=>{const r=this.dataByTimePoint.get(g);if(!r)return;const b=new Map;r.players.forEach((d,a)=>{b.set(a,d)}),b.size>0&&W.set(g,{...r,players:b})}),W}calculatePlayerAverages(o){const s=new Map;o.forEach(W=>{W.players.forEach((v,g)=>{s.has(g)||s.set(g,{playerId:g,teamId:v.teamId,totalX:0,totalY:0,count:0,positions:[],matchlapses:new Set});const r=s.get(g);r.totalX+=v.x,r.totalY+=v.y,r.count++,r.matchlapses.add(v.matchLapse),r.positions.push({second:v.second,matchLapse:v.matchLapse,timeKey:v.timeKey,x:v.x,y:v.y,quadrant:v.quadrant})})});const z=new Map;return s.forEach((W,v)=>{z.set(v,{playerId:W.playerId,teamId:W.teamId,avgX:W.totalX/W.count,avgY:W.totalY/W.count,dataPoints:W.count,matchlapses:Array.from(W.matchlapses),positions:W.positions,id:W.playerId,name:`Jugador #${W.playerId}`,selected:!1,photo:null})}),z}getPlayerAverages(o={}){const s=this.filterData(o);return this.calculatePlayerAverages(s)}},X0t=class{constructor(){this.chains=[],this.indexedByInitialCategories=new Map,this.indexedByEndingCategories=new Map,this.indexedByTeam=new Map,this.indexedByMatchLapse=new Map,this.indexedByBallZones=new Map,this.indexedByBallInitialZones=new Map,this.indexedByBallFinalZones=new Map}processChains(o){return this.chains=Array.isArray(o)?o:[],this.createIndexes(),this.chains}createIndexes(){this.chains.forEach(o=>{o.initial_category_ids&&Array.isArray(o.initial_category_ids)&&o.initial_category_ids.forEach(s=>{this.indexedByInitialCategories.has(s)||this.indexedByInitialCategories.set(s,new Set),this.indexedByInitialCategories.get(s).add(o.id)}),o.ending_category_ids&&Array.isArray(o.ending_category_ids)&&o.ending_category_ids.forEach(s=>{this.indexedByEndingCategories.has(s)||this.indexedByEndingCategories.set(s,new Set),this.indexedByEndingCategories.get(s).add(o.id)}),o.team_id&&(this.indexedByTeam.has(o.team_id)||this.indexedByTeam.set(o.team_id,new Set),this.indexedByTeam.get(o.team_id).add(o.id)),o.match_lapse&&(this.indexedByMatchLapse.has(o.match_lapse)||this.indexedByMatchLapse.set(o.match_lapse,new Set),this.indexedByMatchLapse.get(o.match_lapse).add(o.id)),o.quadrant_ids&&Array.isArray(o.quadrant_ids)&&o.quadrant_ids.forEach(s=>{this.indexedByBallZones.has(s)||this.indexedByBallZones.set(s,new Set),this.indexedByBallZones.get(s).add(o.id)}),o.ball_initial_quadrant_id&&(this.indexedByBallInitialZones.has(o.ball_initial_quadrant_id)||this.indexedByBallInitialZones.set(o.ball_initial_quadrant_id,new Set),this.indexedByBallInitialZones.get(o.ball_initial_quadrant_id).add(o.id)),o.ball_ending_quadrant_id&&(this.indexedByBallFinalZones.has(o.ball_ending_quadrant_id)||this.indexedByBallFinalZones.set(o.ball_ending_quadrant_id,new Set),this.indexedByBallFinalZones.get(o.ball_ending_quadrant_id).add(o.id))})}getFilteredChains(o={}){let s=new Set(this.chains.map(W=>W.id));if(o.excludedStartCategories&&o.excludedStartCategories.length>0||o.startCategories&&o.startCategories.length>0){const W=new Set,v=new Set;let g=new Set,r=new Set;o.excludedStartCategories&&o.excludedStartCategories.length>0&&(o.excludedStartCategories.forEach(b=>{const d=this.indexedByInitialCategories.get(b);d&&d.forEach(a=>W.add(a))}),g=new Set([...s].filter(b=>!W.has(b)))),o.startCategories&&o.startCategories.length>0&&(o.startCategories.forEach(b=>{const d=this.indexedByInitialCategories.get(b);d&&d.forEach(a=>v.add(a))}),r=new Set([...s].filter(b=>v.has(b)))),s=new Set([...g,...r])}if(o.excludedEndCategories&&o.excludedEndCategories.length>0||o.endCategories&&o.endCategories.length>0){const W=new Set,v=new Set;let g=new Set,r=new Set;o.excludedEndCategories&&o.excludedEndCategories.length>0&&(o.excludedEndCategories.forEach(b=>{const d=this.indexedByEndingCategories.get(b);d&&d.forEach(a=>W.add(a))}),g=new Set([...s].filter(b=>!W.has(b)))),o.endCategories&&o.endCategories.length>0&&(o.endCategories.forEach(b=>{const d=this.indexedByEndingCategories.get(b);d&&d.forEach(a=>v.add(a))}),r=new Set([...s].filter(b=>v.has(b)))),s=new Set([...g,...r])}if(o.chainInitialZones&&o.chainInitialZones.length>0){const W=new Set;o.chainInitialZones.forEach(v=>{const g=this.indexedByBallInitialZones.get(v);g&&g.forEach(r=>W.add(r))}),s=new Set([...s].filter(v=>W.has(v)))}if(o.chainFinalZones&&o.chainFinalZones.length>0){const W=new Set;o.chainFinalZones.forEach(v=>{const g=this.indexedByBallFinalZones.get(v);g&&g.forEach(r=>W.add(r))}),s=new Set([...s].filter(v=>W.has(v)))}if(o.ballInterestZones&&o.ballInterestZones.length>0){const W=new Set;o.ballInterestZones.forEach(v=>{const g=this.indexedByBallZones.get(v);g&&g.forEach(r=>W.add(r))}),s=new Set([...s].filter(v=>W.has(v)))}if(o.startTime&&o.endTime&&o.startTime.match_lapse!==void 0&&o.endTime.match_lapse!==void 0){const{match_lapse:W}=o.startTime,{match_lapse:v}=o.endTime,g=this.indexedByMatchLapse.get(W),r=this.indexedByMatchLapse.get(v);g&&r?s=new Set([...s].filter(b=>g.has(b)||r.has(b))):s=new Set}if(o.teamId){const W=this.indexedByTeam.get(o.teamId);W?s=new Set([...s].filter(v=>W.has(v))):s=new Set}let z=this.chains.filter(W=>s.has(W.id));if(o.minDuration!==void 0&&(z=z.filter(W=>W.duration>=o.minDuration)),o.maxDuration!==void 0&&(z=z.filter(W=>W.duration<=o.maxDuration)),o.startTime&&o.endTime&&o.startTime.seconds!==void 0&&o.endTime.seconds!==void 0&&o.startTime.match_lapse!==void 0&&o.endTime.match_lapse!==void 0){const{seconds:W}=o.startTime,{seconds:v}=o.endTime,{match_lapse:g}=o.startTime,{match_lapse:r}=o.endTime;z=z.filter(b=>{if(g===r&&b.starting_second>=W&&b.starting_second<=v||b.ending_second>=W&&b.ending_second<=v)return!0;if(g!==r){if(v>W){if(b.starting_second>=W&&b.starting_second<=v||b.ending_second>=W&&b.ending_second<=v)return!0}else if(b.match_lapse===g&&b.starting_second>=W||b.match_lapse===r&&b.ending_second<=v)return!0}return!1})}return(o.excludedFirstSeconds!==void 0||o.excludedLastSeconds!==void 0)&&(z=z.map(W=>{const v=o.excludedFirstSeconds!==void 0?W.starting_second+o.excludedFirstSeconds:W.starting_second;let g=W.ending_second;return W.duration>o.excludedLastSeconds&&(g=W.starting_second+o.excludedLastSeconds),v>=g||v<0||g<0?null:{...W,starting_second:v,ending_second:g}}).filter(W=>W!==null)),z}getChainStats(o={}){const s=this.getFilteredChains(o);return s.length===0?{totalChains:0,averageDuration:0,totalSeconds:0,totalDurationChains:0}:{totalChains:s.length,averageDuration:s.reduce((z,W)=>z+W.duration,0)/s.length,totalSeconds:s.reduce((z,W)=>z+(W.ending_second-W.starting_second),0),totalDurationChains:s.reduce((z,W)=>z+W.duration,0)}}mapFilterCategoriesToIds(o,s){const z=[];return o.forEach(W=>{const v=s.find(g=>g.id===W);v&&v.category_ids&&z.push(...v.category_ids)}),z}mapFilterExcludedCategoriesToIds(o,s){const z=[];return o.forEach(W=>{const v=s.find(g=>g.id===W);v&&v.excluded_category_ids&&z.push(...v.excluded_category_ids)}),z}};const TV="https://d1cfezxa8pcy7l.cloudfront.net",q0t="chains_by_game.json",Y0t="positions_by_second.json",CV="==GolStatsHatTrick!";let Cp=class{static resetCache(){this._playersRawData=null,this._playersProcessedData=null,this._chainsRawData=null}static async _loadChainsData(o){if(this._chainsRawData)return this._chainsRawData;try{const s=await fetch(`${TV}/${o}/${q0t}`,{headers:{"x-api-key":`${CV}`}});if(!s.ok)throw new Error(`Error fetching game events: ${s.status}`);const z=await s.json();return this._chainsRawData=z,z}catch(s){throw console.error("Error fetching game events:",s),s}}static async _loadPlayersData(o){if(o!==void 0){if(this._playersRawData)return this._playersProcessedData;try{const s=await fetch(`${TV}/${o}/${Y0t}`,{headers:{"x-api-key":`${CV}`}});if(!s.ok)throw new Error(`Error fetching game players: ${s.status}`);const z=await s.json(),W=new W0t;return W.processPositions(z),this._playersRawData=z,this._playersProcessedData=W,W}catch(s){throw console.error("Error loading players data:",s),s}}}static async getPositions(o,s){try{return(await this._loadPlayersData(o)).getPlayerAverages(s)}catch(z){return console.error("Error getting positions:",z),new Map}}static getStartedCategories(){return[{id:1,category_ids:[6,312],name:"Balón recuperado",isSelected:!0},{id:2,category_ids:[28,264],name:"Saque de meta",isSelected:!0},{id:3,category_ids:[30,355],name:"Tiro libre",isSelected:!0},{id:4,category_ids:[210,212,854],name:"Saque de banda",isSelected:!0},{id:5,category_ids:[-1],excluded_category_ids:[6,312,28,264,30,355,210,212,854],name:"Otras",isSelected:!0}]}static getEndedCategories(){return[{id:1,category_ids:[13,25],name:"Centros",isSelected:!0},{id:2,category_ids:[607,608],name:"Oportunidades de gol",isSelected:!0},{id:3,category_ids:[-1],excluded_category_ids:[13,25,607,608],name:"Otras",isSelected:!0}]}static async getProcessedChains(o,s={}){try{const z=await this._loadChainsData(o),W=new X0t;W.processChains(z);const v={...s};return s.startCategories&&s.startCategories.length>0&&(v.startCategories=W.mapFilterCategoriesToIds(s.startCategories,this.getStartedCategories()),v.excludedStartCategories=W.mapFilterExcludedCategoriesToIds(s.startCategories,this.getStartedCategories())),s.endCategories&&s.endCategories.length>0&&(v.endCategories=W.mapFilterCategoriesToIds(s.endCategories,this.getEndedCategories()),v.excludedEndCategories=W.mapFilterExcludedCategoriesToIds(s.endCategories,this.getEndedCategories())),{chains:W.getFilteredChains(v),stats:W.getChainStats(v),totalChains:z.length,processor:W}}catch(z){throw console.error("Error processing chains:",z),z}}};jk(Cp,"_playersRawData",null),jk(Cp,"_playersProcessedData",null),jk(Cp,"_chainsRawData",null);function EV(e){const o=t.ref([]),s=t.ref(null),z=t.ref(null),W=t.ref(!1),v=t.ref([]),g=t.ref(null),r=t.ref([]),b=t.ref([]),d=t.ref(null),a=t.ref({min:5,max:null}),_=t.ref(5),y=t.ref(5),x=t.ref([]),u=t.ref([]),n=t.ref([]);return{isDataLoaded:W,selectedStartCategories:r,selectedEndCategories:b,selectedPossessionTeamId:d,durationRange:a,loadInitialData:async()=>{if(!(W.value||!e))try{const i=await Cp.getProcessedChains(e,{});z.value=i.processor,v.value=i.chains,g.value=i.stats,o.value=v.value,s.value=g.value}catch(i){console.error("Error loading data:",i)}finally{W.value=!0}},applyFilters:(i={})=>{if(!(!z.value||!W.value))try{const f=Object.keys(i).length>0?i:{startCategories:r.value,endCategories:b.value,teamId:d.value,minDuration:a.value.min,maxDuration:a.value.max,excludedFirstSeconds:_.value,excludedLastSeconds:y.value,chainInitialZones:x.value,chainFinalZones:u.value,ballInterestZones:n.value};o.value=z.value.getFilteredChains(f),s.value=z.value.getChainStats(f)}catch(f){console.error("Error aplicando filtros:",f)}},getFilteredData:(i={})=>{if(!W.value)return null;const{startCategories:f=[],endCategories:l=[],teamId:h=null,minDuration:m=null,maxDuration:w=null,excludedFirstSeconds:T=null,excludedLastSeconds:A=null,chainInitialZones:C=[],chainFinalZones:I=[],ballInterestZones:L=[],timeFromTimeline:E={}}=i,P={};if(f.length>0&&(P.startCategories=z.value.mapFilterCategoriesToIds(f,Cp.getStartedCategories()),P.excludedStartCategories=z.value.mapFilterExcludedCategoriesToIds(f,Cp.getStartedCategories())),l.length>0&&(P.endCategories=z.value.mapFilterCategoriesToIds(l,Cp.getEndedCategories()),P.excludedEndCategories=z.value.mapFilterExcludedCategoriesToIds(l,Cp.getEndedCategories())),h&&(P.teamId=h),m!==null&&(P.minDuration=parseInt(m)),w!==null&&(P.maxDuration=parseInt(w)),T!==null&&(P.excludedFirstSeconds=parseInt(T)),A!==null&&(P.excludedLastSeconds=parseInt(A)),C.length>0&&(P.chainInitialZones=C),I.length>0&&(P.chainFinalZones=I),L.length>0&&(P.ballInterestZones=L),Object.keys(E).length>0&&Object.keys(E.end).length>0&&Object.keys(E.start).length>0){const{start:M,end:S}=E;P.startTime={seconds:M.seconds,match_lapse:M.match_lapse},P.endTime={seconds:S.seconds,match_lapse:S.match_lapse}}return{chains:z.value.getFilteredChains(P),stats:z.value.getChainStats(P)}}}}const J0t={class:"shadows"},$0t={class:"menu-content-shadows"},K0t={class:"menu-shadows-teams"},Q0t={class:"team-switch-container"},emt={class:"team-switch team-switch-toggle"},tmt={class:"team-content"},amt=["src"],rmt={class:"team-label"},nmt={class:"team-content"},imt={class:"team-label"},omt=["src"],smt={class:"menu-shadows-tabs"},lmt={class:"menu-shadows-tab-content"},cmt={key:0},umt={key:1,class:"filter-events-container"},dmt={key:2},hmt={__name:"FilterShadows",props:{startedCategories:{type:Array,default:()=>[]},endedCategories:{type:Array,default:()=>[]},defaultShadowsFilters:{type:Object,default:()=>({})},game:{type:Object,default:()=>({gameId:0,homeTeam:{team_id:0},awayTeam:{team_id:0}})},token:{type:String,default:""},players:{type:Array,default:()=>[]},containerWidth:{type:Number,default:0},filterButtonProps:{type:Object,default:()=>({fontSize:"13px",gap:"6px",padding:"11px 12px"})}},emits:["home-chains-shadows-filtered","away-chains-shadows-filtered","is-shadows-selected","home-ball-zones-shadows-filtered","away-ball-zones-shadows-filtered","home-range-change-shadows","away-range-change-shadows"],setup(e,{emit:o}){const s=e,z=o,W=t.ref(!1),v=t.ref(!1),g=t.ref(["Filtros","Eventos","Jugadores"]),r=t.ref(g.value[0]),b=t.ref({...s.defaultShadowsFilters}),d=t.ref({...s.defaultShadowsFilters}),a=t.ref(structuredClone(s.startedCategories)),_=t.ref(structuredClone(s.endedCategories)),y=t.ref(structuredClone(s.startedCategories)),x=t.ref(structuredClone(s.endedCategories)),u=t.ref(!0),n=t.ref(!0),i=t.ref(!0),f=t.ref(!0),l=t.ref(s.game.homeTeam.team_id),h=t.ref(!0),{selectedStartCategories:m,selectedEndCategories:w,isDataLoaded:T,loadInitialData:A,getFilteredData:C}=EV(s.game.gameId),I=m,L=w,E=t.ref(null),P=t.ref(!1),M=t.computed(()=>s.containerWidth>650?"650px":`${s.containerWidth-20}px`),S=he=>{const pe=he===s.game.homeTeam.team_id?b.value:d.value,ne={startCategories:pe.startCategories,endCategories:pe.endCategories,teamId:pe.possessionTeamId,minDuration:pe.durationRange.min,maxDuration:pe.durationRange.max,excludedFirstSeconds:pe.excludedFirstSeconds,excludedLastSeconds:pe.excludedLastSeconds,chainInitialZones:pe.chainInitialZones,chainFinalZones:pe.chainFinalZones,ballInterestZones:pe.ballInterestZones,timeFromTimeline:pe.timeFromTimeline},le=C(ne);le&&(he===s.game.homeTeam.team_id?(z("home-chains-shadows-filtered",le.chains,he),z("home-ball-zones-shadows-filtered",ne.ballInterestZones,he),z("home-range-change-shadows",ne.timeFromTimeline,he)):(z("away-chains-shadows-filtered",le.chains,he),z("away-ball-zones-shadows-filtered",ne.ballInterestZones,he),z("away-range-change-shadows",ne.timeFromTimeline,he)))},B=he=>{const pe=l.value===s.game.homeTeam.team_id?b.value:d.value;switch(he){case"home":pe.possessionTeamId=s.game.homeTeam.team_id;break;case"away":pe.possessionTeamId=s.game.awayTeam.team_id;break;case"both":pe.possessionTeamId=null;break}S(l.value)},k=(he,pe)=>{const ne=l.value===s.game.homeTeam.team_id?b.value:d.value;he==="less-than"?ne.durationRange={min:null,max:pe}:ne.durationRange={min:pe,max:null},S(l.value)},O=he=>{const pe=l.value===s.game.homeTeam.team_id?b.value:d.value;pe.excludedFirstSeconds=he,S(l.value)},D=he=>{const pe=l.value===s.game.homeTeam.team_id?b.value:d.value;pe.excludedLastSeconds=he,S(l.value)},V=he=>{const pe=l.value===s.game.homeTeam.team_id?b.value:d.value;pe.chainInitialZones=he,S(l.value)},G=he=>{const pe=l.value===s.game.homeTeam.team_id?b.value:d.value;pe.chainFinalZones=he,S(l.value)},H=he=>{const pe=l.value===s.game.homeTeam.team_id?b.value:d.value;pe.ballInterestZones=he,S(l.value)};function U(he,pe){const ne=l.value===s.game.homeTeam.team_id?b.value:d.value,le=(l.value===s.game.homeTeam.team_id?a.value:y.value).find(ie=>ie.id===pe.id);le&&(le.isSelected=he),he?ne.startCategories.includes(pe.id)||ne.startCategories.push(pe.id):ne.startCategories=ne.startCategories.filter(ie=>ie!==pe.id),l.value===s.game.homeTeam.team_id?u.value=ne.startCategories.length===a.value.length:i.value=ne.startCategories.length===y.value.length,S(l.value)}function J(he,pe){const ne=l.value===s.game.homeTeam.team_id?b.value:d.value,le=(l.value===s.game.homeTeam.team_id?_.value:x.value).find(ie=>ie.id===pe.id);le&&(le.isSelected=he),he?ne.endCategories.includes(pe.id)||ne.endCategories.push(pe.id):ne.endCategories=ne.endCategories.filter(ie=>ie!==pe.id),l.value===s.game.homeTeam.team_id?n.value=ne.endCategories.length===_.value.length:f.value=ne.endCategories.length===x.value.length,S(l.value)}const re=he=>{const pe=l.value===s.game.homeTeam.team_id?b.value:d.value,ne=l.value===s.game.homeTeam.team_id?a.value:y.value;ne.forEach(le=>le.isSelected=he),he?pe.startCategories=ne.map(le=>le.id):pe.startCategories=[],l.value===s.game.homeTeam.team_id?u.value=he:i.value=he,S(l.value)},q=he=>{const pe=l.value===s.game.homeTeam.team_id?b.value:d.value,ne=l.value===s.game.homeTeam.team_id?_.value:x.value;ne.forEach(le=>le.isSelected=he),he?pe.endCategories=ne.map(le=>le.id):pe.endCategories=[],l.value===s.game.homeTeam.team_id?n.value=he:f.value=he,S(l.value)},ae=he=>{const pe=l.value===s.game.homeTeam.team_id?b.value:d.value;pe.timeFromTimeline=he,S(l.value)},ee=t.computed(()=>s.startedCategories.length>0?l.value===s.game.homeTeam.team_id?a.value:y.value:[]),$=t.computed(()=>s.endedCategories.length>0?l.value===s.game.homeTeam.team_id?_.value:x.value:[]);t.watch([I,L],()=>{I.value.length===0&&(I.value=ee.value.map(he=>he.id)),L.value.length===0&&(L.value=$.value.map(he=>he.id))},{immediate:!0}),t.watch(()=>T.value,async he=>{he||(await A(),h.value?(S(s.game.homeTeam.team_id),S(s.game.awayTeam.team_id),h.value=!1):S(l.value))},{immediate:!0}),t.watch(W,he=>{P.value=he});function Q(he){he?W.value=!0:W.value=!1}function ce(he){v.value=he,z("is-shadows-selected",he)}function de(he){r.value=he}return(he,pe)=>(t.openBlock(),t.createElementBlock("div",J0t,[t.createElementVNode("div",{ref_key:"filterContainerRef",ref:E,class:"filter-container"},[t.createVNode(S5,t.mergeProps(e.filterButtonProps,{text:"Shadows","is-active":P.value,onExpand:Q,onChangeSelected:ce}),null,16,["is-active"]),e.containerWidth>550?(t.openBlock(),t.createBlock(vht,{key:0})):t.createCommentVNode("",!0)],512),t.createVNode(t.unref(Uk),{modelValue:W.value,"onUpdate:modelValue":pe[2]||(pe[2]=ne=>W.value=ne),width:"fit-content","menu-width":M.value,"left-menu":"unset","menu-margin-top":8,"trigger-element":E.value,"z-index-open":15},{trigger:t.withCtx(()=>[...pe[3]||(pe[3]=[t.createElementVNode("div",{style:{display:"none"}},null,-1)])]),menu:t.withCtx(()=>[t.createElementVNode("div",$0t,[pe[4]||(pe[4]=t.createElementVNode("div",{class:"menu-shadows-header"},[t.createElementVNode("div",{class:"menu-shadows-header__title"}," Filtros shadows ")],-1)),t.createElementVNode("div",K0t,[t.createElementVNode("div",Q0t,[t.createElementVNode("div",emt,[t.createElementVNode("div",{class:"team-thumb",style:t.normalizeStyle({left:l.value===e.game.homeTeam.team_id?"0px":"calc(50%)",width:"calc(50%)"})},null,4),t.createElementVNode("button",{class:t.normalizeClass(["team-btn",{active:l.value===e.game.homeTeam.team_id}]),onClick:pe[0]||(pe[0]=ne=>l.value=e.game.homeTeam.team_id),type:"button"},[t.createElementVNode("span",tmt,[t.createElementVNode("img",{src:`https://golstatsimages.blob.core.windows.net/teams-80/${e.game.homeTeam.team_id}.png`,alt:"Escudo local",class:"team-logo"},null,8,amt),t.createElementVNode("span",rmt,t.toDisplayString(e.game.homeTeam.colloquial_name),1)])],2),t.createElementVNode("button",{class:t.normalizeClass(["team-btn",{active:l.value===e.game.awayTeam.team_id}]),onClick:pe[1]||(pe[1]=ne=>l.value=e.game.awayTeam.team_id),type:"button"},[t.createElementVNode("span",nmt,[t.createElementVNode("span",imt,t.toDisplayString(e.game.awayTeam.colloquial_name),1),t.createElementVNode("img",{src:`https://golstatsimages.blob.core.windows.net/teams-80/${e.game.awayTeam.team_id}.png`,alt:"Escudo visitante",class:"team-logo"},null,8,omt)])],2)])])]),t.createElementVNode("div",smt,[t.createVNode(kht,{tabs:g.value,onChangeTab:de},null,8,["tabs"])]),t.createElementVNode("div",lmt,[r.value===g.value[0]?(t.openBlock(),t.createElementBlock("div",cmt,[t.withDirectives(t.createVNode(wV,{game:e.game,token:e.token,"selected-team-tab":l.value,onHandleShadowsPossessionChange:B,onHandleShadowsDurationChange:k,onHandleShadowsExcludedFirstSecondsChange:O,onHandleShadowsExcludedLastSecondsChange:D,onHandleShadowsChainInitialZonesChange:V,onHandleShadowsChainFinalZonesChange:G,onHandleShadowsBallInterestZonesChange:H,onRangeChange:ae},null,8,["game","token","selected-team-tab"]),[[t.vShow,l.value===e.game.homeTeam.team_id]]),t.withDirectives(t.createVNode(wV,{game:e.game,token:e.token,"selected-team-tab":l.value,onHandleShadowsPossessionChange:B,onHandleShadowsDurationChange:k,onHandleShadowsExcludedFirstSecondsChange:O,onHandleShadowsExcludedLastSecondsChange:D,onHandleShadowsChainInitialZonesChange:V,onHandleShadowsChainFinalZonesChange:G,onHandleShadowsBallInterestZonesChange:H,onRangeChange:ae},null,8,["game","token","selected-team-tab"]),[[t.vShow,l.value===e.game.awayTeam.team_id]])])):r.value===g.value[1]?(t.openBlock(),t.createElementBlock("div",umt,[t.withDirectives(t.createVNode(kV,{"started-categories":ee.value,"ended-categories":$.value,"all-start-events-selected":u.value,"all-end-events-selected":n.value,onToggleAllStartEvents:re,onToggleAllEndEvents:q,onUpdateStartEvent:U,onUpdateEndEvent:J},null,8,["started-categories","ended-categories","all-start-events-selected","all-end-events-selected"]),[[t.vShow,l.value===e.game.homeTeam.team_id]]),t.withDirectives(t.createVNode(kV,{"started-categories":ee.value,"ended-categories":$.value,"all-start-events-selected":i.value,"all-end-events-selected":f.value,onToggleAllStartEvents:re,onToggleAllEndEvents:q,onUpdateStartEvent:U,onUpdateEndEvent:J},null,8,["started-categories","ended-categories","all-start-events-selected","all-end-events-selected"]),[[t.vShow,l.value===e.game.awayTeam.team_id]])])):r.value===g.value[2]?(t.openBlock(),t.createElementBlock("div",dmt,[t.withDirectives(t.createVNode(N5,{players:e.players.filter(ne=>ne.team_id===e.game.homeTeam.team_id)},null,8,["players"]),[[t.vShow,l.value===e.game.homeTeam.team_id]]),t.withDirectives(t.createVNode(N5,{players:e.players.filter(ne=>ne.team_id===e.game.awayTeam.team_id)},null,8,["players"]),[[t.vShow,l.value===e.game.awayTeam.team_id]])])):t.createCommentVNode("",!0)]),pe[5]||(pe[5]=t.createElementVNode("div",{class:"menu-shadows-tab-footer"},null,-1))])]),_:1},8,["modelValue","menu-width","trigger-element"])]))}},pmt=du(hmt,[["__scopeId","data-v-a8d58dcd"]]),fmt={__name:"TopFilters",props:{game:{type:Object,default:()=>({gameId:0,homeTeam:{team_id:0},awayTeam:{team_id:0}})},token:{type:String,default:""},players:{type:Array,default:()=>[]},containerWidth:{type:Number,default:0},defaultShadowsFilters:{type:Object,default:()=>({})},startedCategories:{type:Array,default:()=>[]},endedCategories:{type:Array,default:()=>[]}},emits:["change-connections","change-distance","change-distance-custom","home-chains-shadows-filtered","away-chains-shadows-filtered","is-shadows-selected","home-range-change-shadows","away-range-change-shadows","home-ball-zones-shadows-filtered","away-ball-zones-shadows-filtered"],setup(e,{emit:o}){let s=null;const z=e,W=o,v=t.ref(null),g=t.ref(0),r=t.computed(()=>"Distancia entre jugadores"),b=t.computed(()=>z.containerWidth<480?{fontSize:"10px",gap:"4px",padding:"8px 6px"}:{fontSize:"13px",gap:"6px",padding:"11px 12px"});function d(m){W("change-connections",m)}function a(m){W("change-distance-custom",m)}function _(m){W("change-distance",m)}function y(m,w){W("home-chains-shadows-filtered",m,w)}function x(m,w){W("away-chains-shadows-filtered",m,w)}function u(m,w){W("home-ball-zones-shadows-filtered",m,w)}function n(m,w){W("away-ball-zones-shadows-filtered",m,w)}function i(m){W("is-shadows-selected",m)}function f(m,w){W("home-range-change-shadows",m,w)}function l(m,w){W("away-range-change-shadows",m,w)}function h(){v.value&&(s=new ResizeObserver(m=>{for(let w of m)g.value=w.contentRect.width}),s.observe(v.value))}return t.onMounted(()=>{h()}),(m,w)=>(t.openBlock(),t.createElementBlock("div",{ref_key:"filters",ref:v,class:"filters"},[w[0]||(w[0]=t.createElementVNode("div",{class:"filters__text"}," Mostrar: ",-1)),t.createVNode(aht,{game:e.game,"filter-button-props":b.value,onApply:d},null,8,["game","filter-button-props"]),t.createVNode(S5,t.mergeProps(b.value,{text:r.value,"is-arrow-visible":!1,onChangeSelected:_}),null,16,["text"]),t.createVNode(mht,{game:e.game,"filter-button-props":b.value,"container-width":e.containerWidth,onApply:a},null,8,["game","filter-button-props","container-width"]),t.createVNode(pmt,{game:e.game,token:e.token,"container-width":e.containerWidth,"default-shadows-filters":e.defaultShadowsFilters,"started-categories":e.startedCategories,"ended-categories":e.endedCategories,players:e.players,"filter-button-props":b.value,onHomeChainsShadowsFiltered:y,onAwayChainsShadowsFiltered:x,onHomeBallZonesShadowsFiltered:u,onAwayBallZonesShadowsFiltered:n,onHomeRangeChangeShadows:f,onAwayRangeChangeShadows:l,onIsShadowsSelected:i},null,8,["game","token","container-width","default-shadows-filters","started-categories","ended-categories","players","filter-button-props"])],512))}},mmt=du(fmt,[["__scopeId","data-v-28d461d8"]]),gmt={class:"page-header"},ymt={class:"page-header__time"},vmt={class:"value"},bmt={class:"value"},xmt={__name:"SectionHeader",props:{totalChains:{type:Number,default:0},totalSeconds:{type:Number,default:0},totalDurationChains:{type:Number,default:0}},emits:["update:selectedTeam"],setup(e){return(o,s)=>(t.openBlock(),t.createElementBlock("header",gmt,[s[2]||(s[2]=t.createElementVNode("div",{class:"page-header__title"},[t.createElementVNode("span",{class:"label"},"Posicionamiento y conexiones")],-1)),t.createElementVNode("div",ymt,[s[0]||(s[0]=t.createElementVNode("span",{class:"label"},"Estás viendo:",-1)),t.createElementVNode("span",vmt,t.toDisplayString(e.totalChains)+" posesiones",1),s[1]||(s[1]=t.createElementVNode("span",{class:"separator"},"|",-1)),t.createElementVNode("span",bmt,t.toDisplayString(e.totalSeconds)+" segundos",1)])]))}},_mt=du(xmt,[["__scopeId","data-v-4218da77"]]);function AV(){const e=t.ref(!1),o=t.ref(null),s=t.ref([]);async function z(v){e.value=!1,o.value=null;try{const g=await Cp._loadChainsData(v);s.value=g||[]}catch(g){o.value=g.message,console.error("Error cargando datos del juego:",g)}finally{e.value=!0}}async function W(v,g){return await Cp.getPositions(v,g)}return{isDataLoaded:e,startedCategories:Cp.getStartedCategories(),endedCategories:Cp.getEndedCategories(),loadGameData:z,getPositions:W}}const wmt={class:"tooltip-content-row"},kmt=["src"],Smt={class:"tooltip-content"},Tmt={class:"player-name"},Cmt={class:"minutes-played"},Emt={class:"minutes-number"},Amt={key:0,class:"entry-exit"},Mmt={key:0,class:"entry-block"},Pmt={class:"entry-minute"},Imt={key:1,class:"exit-block"},Lmt={class:"exit-minute"},Bmt={key:1,class:"sub-info"},Omt={key:0},zmt={class:"sub-name"},Nmt={key:1},Dmt={class:"sub-name"},Fmt={__name:"TooltipPlayer",props:{show:Boolean,x:Number,y:Number,player:{type:Object,default:()=>({name:"Brian Rodríguez",minutes:26,inMinute:"Min 33",outMinute:"Min 22",subFor:"A. Zendejas"})}},setup(e){function o(s){if(!s)return"";const z=s.trim().split(",");if(z.length>=2){const W=z[0].trim().split(" ")[0];return`${z[1].trim().split(" ")[0].charAt(0)}. ${W}`}return s}return(s,z)=>e.show?(t.openBlock(),t.createElementBlock("div",{key:0,class:"tooltip-box animated-tooltip",style:t.normalizeStyle({position:"fixed",left:e.x+"px",top:e.y+"px",transform:"translate(-50%, -105%)",zIndex:1e3})},[t.renderSlot(s.$slots,"default",{},()=>[t.createElementVNode("div",wmt,[t.createElementVNode("div",{class:t.normalizeClass(["player-photo",{"player-photo--no-move":!e.player.player_in&&!e.player.player_out,"player-photo--move":e.player.player_in||e.player.player_out}])},[t.createElementVNode("img",{src:e.player.photo||"https://i.imgur.com/1Q9Z1Zm.png",alt:"Foto jugador"},null,8,kmt)],2),t.createElementVNode("div",Smt,[t.createElementVNode("div",Tmt,t.toDisplayString(e.player.formattedName),1),t.createElementVNode("div",Cmt,[t.createElementVNode("span",Emt,t.toDisplayString(e.player.minutes_played),1),z[0]||(z[0]=t.createElementVNode("span",{class:"minutes-label"},"Minutos Jugados",-1))]),z[7]||(z[7]=t.createElementVNode("div",{class:"separator"},null,-1)),e.player.player_in||e.player.player_out?(t.openBlock(),t.createElementBlock("div",Amt,[e.player.is_titular?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",Mmt,[z[1]||(z[1]=t.createElementVNode("span",{class:"entry-label"},"Entró",-1)),t.createElementVNode("span",Pmt,"Min "+t.toDisplayString(e.player.player_in.minute),1)])),e.player.is_titular?(t.openBlock(),t.createElementBlock("div",Imt,[z[2]||(z[2]=t.createElementVNode("span",{class:"exit-label"},"Salió",-1)),t.createElementVNode("span",Lmt,"Min "+t.toDisplayString(e.player.player_out.minute),1)])):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0),z[8]||(z[8]=t.createElementVNode("div",{class:"separator"},null,-1)),e.player.player_in||e.player.player_out?(t.openBlock(),t.createElementBlock("div",Bmt,[e.player.is_titular?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",Omt,[z[4]||(z[4]=t.createElementVNode("span",null,"Entró por:",-1)),t.createElementVNode("span",zmt,[t.createTextVNode(t.toDisplayString(o(e.player.player_in.player_name_to_in))+" ",1),z[3]||(z[3]=t.createStaticVNode('<span class="sub-circle-icon" data-v-ab5e17c5><svg width="16" height="16" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg" data-v-ab5e17c5><circle fill="#172531" cx="24" cy="24" r="24" data-v-ab5e17c5></circle><path fill="#fff" d="M31.62,23.86c-.19,0-.37-.07-.52-.21-.3-.29-.31-.76-.03-1.06l2.89-3.04-2.89-3.04c-.29-.3-.27-.77,.03-1.06,.3-.29,.77-.27,1.06,.03l3.39,3.56c.28,.29,.28,.74,0,1.03l-3.39,3.56c-.15,.15-.34,.23-.54,.23Z" data-v-ab5e17c5></path><path fill="#fff" d="M34.99,20.31H16.37c-.41,0-.75-.34-.75-.75s.34-.75,.75-.75h18.62c.41,0,.75,.34,.75,.75s-.34,.75-.75,.75Z" data-v-ab5e17c5></path><path fill="#fff" d="M16.38,32.75c-.2,0-.4-.08-.54-.23l-3.38-3.56c-.28-.29-.28-.74,0-1.03l3.38-3.56c.28-.3,.76-.31,1.06-.03,.3,.29,.31,.76,.03,1.06l-2.89,3.04,2.89,3.04c.29,.3,.27,.78-.03,1.06-.15,.14-.33,.21-.52,.21Z" data-v-ab5e17c5></path><path fill="#fff" d="M31.62,29.19H13c-.41,0-.75-.34-.75-.75s.34-.75,.75-.75H31.62c.41,0,.75,.34,.75,.75s-.34,.75-.75,.75Z" data-v-ab5e17c5></path></svg></span>',1))])])),e.player.is_titular?(t.openBlock(),t.createElementBlock("div",Nmt,[z[6]||(z[6]=t.createElementVNode("span",null,"Salio por:",-1)),t.createElementVNode("span",Dmt,[t.createTextVNode(t.toDisplayString(o(e.player.player_out.player_name_to_out))+" ",1),z[5]||(z[5]=t.createStaticVNode('<span class="sub-circle-icon" data-v-ab5e17c5><svg width="16" height="16" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg" data-v-ab5e17c5><circle fill="#172531" cx="24" cy="24" r="24" data-v-ab5e17c5></circle><path fill="#fff" d="M31.62,23.86c-.19,0-.37-.07-.52-.21-.3-.29-.31-.76-.03-1.06l2.89-3.04-2.89-3.04c-.29-.3-.27-.77,.03-1.06,.3-.29,.77-.27,1.06,.03l3.39,3.56c.28,.29,.28,.74,0,1.03l-3.39,3.56c-.15,.15-.34,.23-.54,.23Z" data-v-ab5e17c5></path><path fill="#fff" d="M34.99,20.31H16.37c-.41,0-.75-.34-.75-.75s.34-.75,.75-.75h18.62c.41,0,.75,.34,.75,.75s-.34,.75-.75,.75Z" data-v-ab5e17c5></path><path fill="#fff" d="M16.38,32.75c-.2,0-.4-.08-.54-.23l-3.38-3.56c-.28-.29-.28-.74,0-1.03l3.38-3.56c.28-.3,.76-.31,1.06-.03,.3,.29,.31,.76,.03,1.06l-2.89,3.04,2.89,3.04c.29,.3,.27,.78-.03,1.06-.15,.14-.33,.21-.52,.21Z" data-v-ab5e17c5></path><path fill="#fff" d="M31.62,29.19H13c-.41,0-.75-.34-.75-.75s.34-.75,.75-.75H31.62c.41,0,.75,.34,.75,.75s-.34,.75-.75,.75Z" data-v-ab5e17c5></path></svg></span>',1))])])):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0)])])],!0)],4)):t.createCommentVNode("",!0)}},Rmt=du(Fmt,[["__scopeId","data-v-ab5e17c5"]]),Vmt={class:"soccer-field__container"},jmt={class:"field"},Umt={key:0,class:"loading-positions"},Gmt={class:"players-container"},Hmt={viewBox:"0 0 611 407",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:"svg-field-overlay"},Zmt=["d","stroke","stroke-opacity","onMouseover","onMouseout","onClick"],Wmt=["id","d"],Xmt=["id","d"],qmt=["xlink:href"],Ymt=["xlink:href"],Jmt=["x","y","stroke-width","fill","opacity"],$mt=["x","y","fill","opacity"],Kmt=["onMouseenter","onMouseleave","onClick"],Qmt=["x","y","stroke-width","fill","stroke","opacity"],e1t=["x","y","fill","opacity"],t1t={key:0},a1t=["width","x"],r1t=["x1","x2"],n1t=["x"],i1t=["x"],o1t=["x"],s1t=["height","y"],l1t=["y1","y2"],c1t=["y"],u1t=["y"],d1t=["y"],h1t={key:1},p1t=["width","x"],f1t=["x1","x2"],m1t=["x"],g1t=["x"],y1t=["x"],v1t=["height","y"],b1t=["y1","y2"],x1t=["y"],_1t=["y"],w1t=["y"],k1t=["d"],S1t=["d"],T1t=["d"],C1t=["d","stroke","stroke-opacity","onMouseover","onMouseout","onClick"],E1t=["x1","y1","x2","y2"],A1t=["onMouseenter","onMouseleave","onClick"],M1t=["x","y","stroke-width","fill","stroke","opacity"],P1t=["x","y","fill","opacity"],I1t=["onMouseenter","onMouseleave","onClick"],L1t=["x","y","stroke-width","fill","stroke","opacity"],B1t=["x","y","fill","opacity"],O1t=["onMouseenter","onClick"],z1t=["x","y","stroke"],N1t=["x","y","fill"],D1t=["x","y"],F1t=105,R1t=68,MV=611,PV=407,IV=3,V1t={__name:"SoccerField",props:{gameId:{type:Number,default:88247},playersSelected:{type:Array,default:()=>[]},playersSelectedShadows:{type:Array,default:()=>[]},homeTeamId:{type:Number,default:1},awayTeamId:{type:Number,default:5},homeFilteredChains:{type:Array,default:()=>[]},awayFilteredChains:{type:Array,default:()=>[]},homeFilteredBallZones:{type:Array,default:()=>[]},awayFilteredBallZones:{type:Array,default:()=>[]},homeFilteredChainsShadows:{type:Array,default:()=>[]},awayFilteredChainsShadows:{type:Array,default:()=>[]},homeFilteredBallZonesShadows:{type:Array,default:()=>[]},awayFilteredBallZonesShadows:{type:Array,default:()=>[]},isDataLoaded:{type:Boolean,default:!1},areConnectionsVisible:{type:Boolean,default:!1},isDistanceVisible:{type:Boolean,default:!1},showShadows:{type:Boolean,default:!1},playersInfo:{type:Object,default:()=>({homeTeam:[],awayTeam:[]})},isHomeTeamVisible:{type:Boolean,default:!0},isAwayTeamVisible:{type:Boolean,default:!0},timeFromTimeline:{type:Object,default:()=>({})},timeFromTimelineShadowsHome:{type:Object,default:()=>({})},timeFromTimelineShadowsAway:{type:Object,default:()=>({})},customDistance:{type:String,default:null}},emits:["home-possession-total-seconds","away-possession-total-seconds","change-custom-distances"],setup(e,{expose:o,emit:s}){const z=t.ref(!1),W=t.ref([]),v=t.ref([]),g=t.ref([]),r=AV(),b=t.ref({show:!1,x:0,y:0,player:{}}),d=t.ref(null),a=e,_=s,y=t.ref(F1t/611),x=t.ref(R1t/407),u=t.ref([{id:"h1",d:"M24 16H588",topRaw:16,type:"line",isVisible:!0,players:[],block:[]},{id:"h2",d:"M24 380H588",topRaw:380,type:"line",isVisible:!0,players:[],block:[]},{id:"v1",d:"M25 380V16.5",leftRaw:25,type:"line",isVisible:!0,players:[],block:[]},{id:"v2",d:"M86 380V16.5",leftRaw:86,type:"line",isVisible:!0,players:[],block:[]},{id:"v3",d:"M130.5 380V16.5",leftRaw:130.5,type:"line",isVisible:!0,players:[],block:[]},{id:"v4",d:"M479.5 380V16.5",leftRaw:479.5,type:"line",isVisible:!0,players:[],block:[]},{id:"v5",d:"M526 380V16.5",leftRaw:526,type:"line",isVisible:!0,players:[],block:[]},{id:"v6",d:"M588 380V16.5",leftRaw:588,type:"line",isVisible:!0,players:[],block:[]}]),n=t.ref(null),i=t.ref(null),f=t.ref([]),l=t.ref([]),h=t.ref(U()),m=t.ref(U()),w=t.ref([]),T=t.ref(null),A=t.ref(null);function C(Ze){A.value=Ze.id}function I(){A.value=null}function L(Ze){return A.value&&A.value!==Ze.id?.1:T.value?Ze.isCandidateToDelete?1:.2:1}function E(Ze){return A.value?.1:T.value?Ze.isCandidateToDelete?1:.2:1}const P=t.computed(()=>{if(a.customDistance){if(a.customDistance==="players")return f.value;if(a.customDistance==="block")return l.value}return[]});t.watch(()=>a.isAwayTeamVisible,(Ze,xe)=>{Ze!==xe&&H(h,m)},{immediate:!0}),t.watch(()=>a.isHomeTeamVisible,(Ze,xe)=>{Ze!==xe&&H(h,m)},{immediate:!0}),t.watch(m,()=>{H(h,m)},{immediate:!0,deep:!0});const M=t.computed(()=>{if(a.customDistance&&a.customDistance==="block"||W.value.length===0||!a.isHomeTeamVisible&&!a.isAwayTeamVisible)return[];let Ze=[...W.value];return a.isHomeTeamVisible&&a.isAwayTeamVisible?(W.value.forEach(xe=>{xe.isVisible=a.playersSelected.includes(xe.id)}),W.value):(a.isHomeTeamVisible?Ze=Ze.filter(xe=>(xe.isVisible=xe.is_home&&a.playersSelected.includes(xe.id),xe.isVisible)):a.isAwayTeamVisible&&(Ze=Ze.filter(xe=>(xe.isVisible=!xe.is_home&&a.playersSelected.includes(xe.id),xe.isVisible))),Ce(),Ze)}),S=t.computed(()=>({"--cursor-svg-field-overlay":a.customDistance?"url('https://golstatsimages.blob.core.windows.net/todoelfut/cursor-02.svg') 17 17, pointer":"inherit"})),B=t.computed(()=>`activeDistances${a.customDistance.charAt(0).toUpperCase()+a.customDistance.slice(1)}`),k=t.computed(()=>a.customDistance?u.value:[]),O=t.computed(()=>{if(a.customDistance&&a.customDistance==="block"||v.value.length===0||!a.showShadows||!a.isHomeTeamVisible&&!a.isAwayTeamVisible)return[];let Ze=[...v.value];return a.isHomeTeamVisible&&a.isAwayTeamVisible?v.value:(a.isHomeTeamVisible?Ze=Ze.filter(xe=>xe.is_home):a.isAwayTeamVisible&&(Ze=Ze.filter(xe=>xe.is_home===!1)),Ze)}),D=t.computed(()=>new Map(M.value.map(Ze=>[Ze.id,Ze]))),V=t.computed(()=>a.isHomeTeamVisible&&W.value.some(Ze=>Ze.is_home&&a.playersSelected.includes(Ze.id)&&Ze.position!==1)),G=t.computed(()=>a.isAwayTeamVisible&&W.value.some(Ze=>!Ze.is_home&&a.playersSelected.includes(Ze.id)&&Ze.position!==1));function H(Ze,xe){const Oe=[{id:"aB1",d:`M${xe.value.minimumX} ${xe.value.minimumY}H${xe.value.maximumX}`,topRaw:xe.value.minimumY,leftRaw:xe.value.minimumX+(xe.value.maximumX-xe.value.minimumX)/2,isVisible:a.isAwayTeamVisible,type:"boundary"},{id:"aB2",d:`M${xe.value.maximumX} ${xe.value.minimumY}V${xe.value.maximumY}`,topRaw:xe.value.minimumY+(xe.value.maximumY-xe.value.minimumY)/2,leftRaw:xe.value.maximumX,isVisible:a.isAwayTeamVisible,type:"boundary"},{id:"aB3",d:`M${xe.value.maximumX} ${xe.value.maximumY}H${xe.value.minimumX}`,topRaw:xe.value.maximumY,leftRaw:xe.value.minimumX+(xe.value.maximumX-xe.value.minimumX)/2,isVisible:a.isAwayTeamVisible,type:"boundary"},{id:"aB4",d:`M${xe.value.minimumX} ${xe.value.maximumY}V${xe.value.minimumY}`,topRaw:xe.value.minimumY+(xe.value.maximumY-xe.value.minimumY)/2,leftRaw:xe.value.minimumX,isVisible:a.isAwayTeamVisible,type:"boundary"},{id:"hB1",d:`M${Ze.value.minimumX} ${Ze.value.minimumY}H${Ze.value.maximumX}`,topRaw:Ze.value.minimumY,leftRaw:Ze.value.minimumX+(Ze.value.maximumX-Ze.value.minimumX)/2,isVisible:a.isHomeTeamVisible,type:"boundary"},{id:"hB2",d:`M${Ze.value.maximumX} ${Ze.value.minimumY}V${Ze.value.maximumY}`,topRaw:Ze.value.minimumY+(Ze.value.maximumY-Ze.value.minimumY)/2,leftRaw:Ze.value.maximumX,isVisible:a.isHomeTeamVisible,type:"boundary"},{id:"hB3",d:`M${Ze.value.maximumX} ${Ze.value.maximumY}H${Ze.value.minimumX}`,topRaw:Ze.value.maximumY,leftRaw:Ze.value.minimumX+(Ze.value.maximumX-Ze.value.minimumX)/2,isVisible:a.isHomeTeamVisible,type:"boundary"},{id:"hB4",d:`M${Ze.value.minimumX} ${Ze.value.maximumY}V${Ze.value.minimumY}`,topRaw:Ze.value.minimumY+(Ze.value.maximumY-Ze.value.minimumY)/2,leftRaw:Ze.value.minimumX,isVisible:a.isHomeTeamVisible,type:"boundary"}];w.value.length===0?w.value=[...Oe]:w.value.forEach(Fe=>{const We=Oe.find(et=>et.id===Fe.id);We&&(Fe.d=We.d,Fe.topRaw=We.topRaw,Fe.leftRaw=We.leftRaw,Fe.isVisible=We.isVisible)}),l.value.forEach(Fe=>{const We=w.value.find(tt=>tt.id===Fe.from.id),et=w.value.find(tt=>tt.id===Fe.to.id);We&&(Fe.from.d=We.d,Fe.from.topRaw=We.topRaw,Fe.from.leftRaw=We.leftRaw,Fe.from.isVisible=We.isVisible),et&&(Fe.to.d=et.d,Fe.to.topRaw=et.topRaw,Fe.to.leftRaw=et.leftRaw,Fe.to.isVisible=et.isVisible),ge(Fe.from,Fe.to,!0)}),setTimeout(()=>{Ce()},1e3)}function U(){return{minimumX:0,maximumX:MV,minimumY:0,maximumY:PV,isVisible:!0}}function J(Ze,xe){if(!Ze||Ze.length===0)return[];let Oe=null,Fe=null,We=null,et=null;xe.start&&xe.end&&(Oe=xe.start.match_lapse,Fe=xe.end.match_lapse,We=xe.start.seconds,et=xe.end.seconds);const tt=[];return Ze.forEach(ot=>{if(ot.starting_second!==void 0&&ot.ending_second!==void 0){let vt=ot.starting_second,yt=ot.ending_second;Oe!==null&&Fe!==null&&We!==null&&et!==null&&(Oe===Fe||et>We?(vt<We&&(vt=We),yt>et&&(yt=et)):(ot.match_lapse===Oe&&vt<We&&(vt=We),ot.match_lapse===Fe&&yt>et&&(yt=et))),tt.push({match_lapse:ot.match_lapse,start:vt,end:yt})}}),tt}function re(Ze){return Ze.reduce((xe,Oe)=>xe+(Oe.end-Oe.start),0)}const q=new Map,ae=new Map;async function ee(){try{q.clear(),ae.clear(),h.value=U(),m.value=U();const Ze=a.homeFilteredChains.length>0?J(a.homeFilteredChains,a.timeFromTimeline):[],xe=a.awayFilteredChains.length>0?J(a.awayFilteredChains,a.timeFromTimeline):[],Oe=a.homeFilteredChainsShadows.length>0?J(a.homeFilteredChainsShadows,a.timeFromTimelineShadowsHome):[],Fe=a.awayFilteredChainsShadows.length>0?J(a.awayFilteredChainsShadows,a.timeFromTimelineShadowsAway):[],We={timeRanges:Ze,teams:[a.homeTeamId],ballZones:a.homeFilteredBallZones},et={timeRanges:xe,teams:[a.awayTeamId],ballZones:a.awayFilteredBallZones},tt={timeRanges:Oe,teams:[a.homeTeamId],ballZones:a.homeFilteredBallZonesShadows},ot={timeRanges:Fe,teams:[a.awayTeamId],ballZones:a.awayFilteredBallZonesShadows},vt=[],yt=[],It=[],Ut=[],Gt=Ze.length>0?await r.getPositions(a.gameId,We):[],st=xe.length>0?await r.getPositions(a.gameId,et):[],Ke=Oe.length>0?await r.getPositions(a.gameId,tt):[],ht=Fe.length>0?await r.getPositions(a.gameId,ot):[];Gt&&Gt.size>0&&Gt.forEach(mt=>{if(mt.teamId===a.homeTeamId){const Pt={id:mt.playerId,team:mt.teamId,is_home:!0,is_titular:ce(mt.playerId),number:Q(mt.playerId),position:$(mt.playerId),top:`${(1-mt.avgY)*100}%`,left:`${mt.avgX*100}%`,topRaw:(1-mt.avgY)*407,leftRaw:mt.avgX*611,isVisible:a.playersSelected.includes(mt.id)};de(Pt),vt.push(Pt),q.set(mt.playerId,Pt)}}),st&&st.size>0&&st.forEach(mt=>{if(mt.teamId===a.awayTeamId){const Pt={id:mt.playerId,team:mt.teamId,is_home:!1,is_titular:ce(mt.playerId),number:Q(mt.playerId),position:$(mt.playerId),top:`${(1-mt.avgY)*100}%`,left:`${mt.avgX*100}%`,topRaw:(1-mt.avgY)*407,leftRaw:mt.avgX*611,isVisible:a.playersSelected.includes(mt.id)};de(Pt),yt.push(Pt),q.set(mt.playerId,Pt)}}),Ke&&Ke.size>0&&Ke.forEach(mt=>{if(mt.teamId===a.homeTeamId){const Pt={id:mt.playerId,team:mt.teamId,is_home:!0,is_titular:ce(mt.playerId),number:Q(mt.playerId),position:$(mt.playerId),top:`${(1-mt.avgY)*100}%`,left:`${mt.avgX*100}%`,topRaw:(1-mt.avgY)*407,leftRaw:mt.avgX*611};It.push(Pt),ae.set(mt.playerId,Pt)}}),ht&&ht.size>0&&ht.forEach(mt=>{if(mt.teamId===a.awayTeamId){const Pt={id:mt.playerId,team:mt.teamId,is_home:!1,is_titular:ce(mt.playerId),number:Q(mt.playerId),position:$(mt.playerId),top:`${(1-mt.avgY)*100}%`,left:`${mt.avgX*100}%`,topRaw:(1-mt.avgY)*407,leftRaw:mt.avgX*611};Ut.push(Pt),ae.set(mt.playerId,Pt)}}),_("home-possession-total-seconds",re(Ze),a.homeTeamId),_("away-possession-total-seconds",re(xe),a.awayTeamId),W.value.length===0?W.value=[...yt,...vt]:W.value.forEach(mt=>{const Pt=q.get(mt.id);Pt&&(mt.top=Pt.top,mt.left=Pt.left,mt.topRaw=Pt.topRaw,mt.leftRaw=Pt.leftRaw,mt.isVisible=Pt.isVisible,mt.number=Pt.number,mt.team=Pt.team,mt.position=Pt.position,mt.is_home=Pt.is_home,mt.is_titular=Pt.is_titular),f.value.forEach(Et=>{const nt=Et.from.id===mt.id?Et.from:null,ct=Et.to.id===mt.id?Et.to:null;(nt||ct)&&(nt&&(Et.from=mt),ct&&(Et.to=mt),ge(Et.from,Et.to,!0))}),l.value.forEach(Et=>{(Et.from.id===mt.id?Et.from:Et.to.id===mt.id&&Et.to)&&ge(Et.from,Et.to,!0)})}),v.value=[...Ut,...It]}catch(Ze){console.error("Error calculating filtered positions:",Ze),W.value=[],v.value=[],h.value=U(),m.value=U()}}function $(Ze){if(!Ze||!a.playersInfo)return 0;const{homeTeam:xe,awayTeam:Oe}=a.playersInfo,Fe=xe.find(We=>We.player_id===Ze)||Oe.find(We=>We.player_id===Ze);return Fe?Fe.position_id:0}function Q(Ze){if(!Ze||!a.playersInfo)return 0;const{homeTeam:xe,awayTeam:Oe}=a.playersInfo,Fe=xe.find(We=>We.player_id===Ze)||Oe.find(We=>We.player_id===Ze);return Fe?Fe.jersey:0}function ce(Ze){if(!Ze||!a.playersInfo)return!1;const xe=a.playersInfo.homeTeam.find(Oe=>Oe.player_id===Ze)||a.playersInfo.awayTeam.find(Oe=>Oe.player_id===Ze);return xe?xe.is_titular:!1}function de(Ze){if(!Ze||!a.playersSelected.includes(Ze.id)||Ze.position===1)return;const xe=Ze.is_home?h:m;xe.value||(xe.value=U()),(xe.value.minimumX===0||xe.value.minimumX>Ze.leftRaw)&&(xe.value.minimumX=Ze.leftRaw),(xe.value.maximumX===MV||xe.value.maximumX<Ze.leftRaw)&&(xe.value.maximumX=Ze.leftRaw),(xe.value.minimumY===0||xe.value.minimumY>Ze.topRaw)&&(xe.value.minimumY=Ze.topRaw),(xe.value.maximumY===PV||xe.value.maximumY<Ze.topRaw)&&(xe.value.maximumY=Ze.topRaw)}t.watch(()=>[a.homeFilteredChains,a.awayFilteredChains,a.homeFilteredChainsShadows,a.awayFilteredChainsShadows,z.value,a.isDataLoaded,a.playersInfo],()=>{a.isDataLoaded&&ee()},{immediate:!0,deep:!0});function he(Ze,xe,Oe,Fe,We=!1){const et=Oe-Ze,tt=Fe-xe;let ot=Math.atan2(tt,et)*(180/Math.PI);return We&&(ot+=90),ot}function pe(Ze){return Ze*(Math.PI/180)}function ne(Ze){if(!g.value||g.value.length===0)return 1;const xe=Math.max(...g.value.map(We=>We.count||1));if(xe<=0)return 1;const Oe=Ze.count||1;if(xe===1)return 5;const Fe=Oe/xe*5;return Fe<.5?.5:Fe}function le(Ze){return ne(Ze)>=3.5?Ze.is_home?"white":"black":""}const ie=t.computed(()=>{if(a.customDistance&&a.customDistance==="block"||!a.areConnectionsVisible||g.value.length===0||!D.value.size)return[];const Ze=g.value.reduce((xe,Oe)=>{if(D.value.has(Oe.to)&&D.value.has(Oe.from)&&a.playersSelected.includes(Oe.from)&&a.playersSelected.includes(Oe.to)){const Fe=`${Oe.from}-${Oe.to}`,We=`${Oe.to}-${Oe.from}`,et=xe.get(Fe)||xe.get(We),tt=D.value.get(Oe.from).leftRaw,ot=D.value.get(Oe.from).topRaw,vt=D.value.get(Oe.to).leftRaw,yt=D.value.get(Oe.to).topRaw,It=he(tt,ot,vt,yt,!0),Ut=pe(It),Gt=Math.cos(Ut)*IV,st=Math.sin(Ut)*IV;et?et.left?et.right={...Oe,playerFrom:D.value.get(Oe.from),playerTo:D.value.get(Oe.to),is_titular:D.value.get(Oe.from).is_titular,is_home:D.value.get(Oe.from).is_home,x1:tt+Gt,y1:ot+st,x2:vt+Gt,y2:yt+st}:et.left={...Oe,playerFrom:D.value.get(Oe.from),playerTo:D.value.get(Oe.to),is_titular:D.value.get(Oe.from).is_titular,is_home:D.value.get(Oe.from).is_home,x1:tt+Gt,y1:ot+st,x2:vt+Gt,y2:yt+st}:xe.set(Fe,{left:{...Oe,playerFrom:D.value.get(Oe.from),playerTo:D.value.get(Oe.to),is_titular:D.value.get(Oe.from).is_titular,is_home:D.value.get(Oe.from).is_home,x1:tt+Gt,y1:ot+st,x2:vt+Gt,y2:yt+st},right:null})}return xe},new Map);return Array.from(Ze.values()).filter(xe=>xe.left||xe.right)});function me(Ze){g.value=Ze}const ve=t.computed(()=>Ze=>Ze.isCandidateToDelete?"#F7A138":P.value.length>0&&(Ze.isDistanceActive||Ze.isDistanceCandidate||Ze.isDistanceSelected)?"#44E3E7":"#fff"),ye=t.computed(()=>(Ze,xe=!1)=>Ze.isDistanceActive?"#41AAEB":Ze.is_home?xe?"#797E89":Ze.is_titular?"#2d65d4":"#20539F":xe?"#515869":Ze.is_titular?"#CBEE6B":"#789626"),ke=t.computed(()=>Ze=>Ze.is_home?Ze.is_titular?"#6891F8":"#4376F6":Ze.is_titular?"#CBEE6B":"#789626"),Ee=t.computed(()=>(Ze,xe=!1)=>Ze.is_home||Ze.isDistanceActive||xe?"#fff":Ze.is_titular?"#000":"#fff");function Te(Ze){if(!Ze)return"";const xe=Ze.trim().split(",");if(xe.length>=2){const Oe=xe[0].trim().split(" ")[0];return`${xe[1].trim().split(" ")[0].charAt(0)}. ${Oe}`}return Ze}function Pe(Ze,xe){a.customDistance?(xe.isDistanceCandidate=!0,i.value=xe):Le(Ze,xe)}function Be(Ze){a.customDistance?(Ze.isDistanceCandidate=!1,i.value=null):je()}function Le(Ze,xe){const{homeTeam:Oe,awayTeam:Fe}=a.playersInfo,We=Oe.find(tt=>tt.player_id===xe.id)||Fe.find(tt=>tt.player_id===xe.id);We&&We.name&&(We.formattedName=Te(We.name));const et=Ze.target.getBoundingClientRect();b.value={show:!0,x:et.left+et.width/2,y:et.top,player:We||xe},t.nextTick(()=>{if(d.value){const tt=d.value.offsetHeight;b.value.y=et.top-tt-5}})}function je(){b.value.show=!1}function Me(Ze){!a.customDistance||T.value||(Ze.isDistanceCandidate=!0,i.value=Ze)}function Re(Ze){Ze.isDistanceActive||(Ze.isDistanceCandidate=!1,i.value=null)}function Ie(Ze){const xe=Ze.from,Oe=Ze.to,Fe=xe.type==="line"?xe:Oe.type==="line"?Oe:null,We=xe.type!=="line"?xe:Oe.type!=="line"?Oe:null;if(Fe&&We){const et=Fe[a.customDistance];et&&(et.find(tt=>tt.id===We.id)||et.push(We))}}function ge(Ze,xe,Oe=!1){if(!(Ze.type==="line"&&xe.type==="line")&&Ze&&xe){const Fe=`${Ze.id}-${xe.id}`;if(!Oe){if(Ze[B.value]&&Ze[B.value].includes(Fe))return;Ze[B.value]?Ze[B.value].push(Fe):Ze[B.value]=[Fe],xe[B.value]?xe[B.value].push(Fe):xe[B.value]=[Fe],Ze.isDistanceActive=!1,Ze.isDistanceSelected=!0,xe.isDistanceActive=!1,xe.isDistanceSelected=!0}Ze.distanceLeft=Ze.leftRaw||xe.leftRaw,Ze.distanceTop=Ze.topRaw||xe.topRaw,xe.distanceLeft=xe.leftRaw||Ze.leftRaw,xe.distanceTop=xe.topRaw||Ze.topRaw;const We=Math.abs(Ze.distanceLeft-xe.distanceLeft),et=Math.abs(Ze.distanceTop-xe.distanceTop),tt=We*y.value,ot=et*x.value,vt=Math.sqrt(tt*tt+ot*ot).toFixed(0),yt=Math.min(Ze.distanceLeft,xe.distanceLeft),It=Math.min(Ze.distanceTop,xe.distanceTop),Ut=yt+Math.abs(Ze.distanceLeft-xe.distanceLeft)/2,Gt=It+Math.abs(Ze.distanceTop-xe.distanceTop)/2,st=yt===Ze.distanceLeft,Ke=It===Ze.distanceTop,ht=0,mt=0,Pt=st?Ze.distanceLeft+ht:Ze.distanceLeft-ht,Et=Ke?Ze.distanceTop+mt:Ze.distanceTop-mt,nt=st?xe.distanceLeft-ht:xe.distanceLeft+ht,ct=Ke?xe.distanceTop-mt:xe.distanceTop+mt,Ye={from:Ze,to:xe,distanceInMeters:vt,lineLabelLeft:Ut,lineLabelTop:Gt,fromLineLeft:Pt,fromLineTop:Et,toLineLeft:nt,toLineTop:ct,id:Fe};if(a.customDistance==="block")if(Oe){const lt=l.value.find(wt=>wt.id===Fe);lt&&(lt.from=Ze,lt.to=xe,lt.distanceInMeters=vt,lt.lineLabelLeft=Ut,lt.lineLabelTop=Gt,lt.fromLineLeft=Pt,lt.fromLineTop=Et,lt.toLineLeft=nt,lt.toLineTop=ct)}else l.value.push(Ye),Ie(Ye);else if(a.customDistance==="players")if(Oe){const lt=f.value.find(wt=>wt.id===Fe);lt&&(lt.from=Ze,lt.to=xe,lt.distanceInMeters=vt,lt.lineLabelLeft=Ut,lt.lineLabelTop=Gt,lt.fromLineLeft=Pt,lt.fromLineTop=Et,lt.toLineLeft=nt,lt.toLineTop=ct)}else f.value.push(Ye),Ie(Ye);Ce(),n.value=null,i.value=null}}function Ce(){const Ze=l.value.filter(Oe=>{let Fe=Oe.from.isVisible!==!1,We=Oe.to.isVisible!==!1;return Oe.from.type==="line"&&Oe.from.block&&(Fe=Oe.from.block.some(et=>et.isVisible!==!1)),Oe.to.type==="line"&&Oe.to.block&&(We=Oe.to.block.some(et=>et.isVisible!==!1)),Fe&&We}),xe=f.value.filter(Oe=>{let Fe=Oe.from.isVisible,We=Oe.to.isVisible;return Oe.from.type==="line"&&Oe.from.players&&(Fe=Oe.from.players.some(et=>et.isVisible)),Oe.to.type==="line"&&Oe.to.players&&(We=Oe.to.players.some(et=>et.isVisible)),Fe&&We});_("change-custom-distances",{blockDistancesTotal:Ze.length,playerDistancesTotal:xe.length})}function we(Ze){!a.customDistance||T.value||n.value&&n.value.type==="line"&&Ze.type==="line"||(Ze.isDistanceActive=!0,n.value&&!n.value.team?ge(n.value,Ze):(n.value=Ze,i.value=null))}function Ve(Ze){!a.customDistance||T.value||(Ze.isDistanceActive=!Ze.isDistanceActive,n.value&&n.value.id!==Ze.id&&(ge(n.value,Ze),n.value&&(n.value.isDistanceActive=!1,n.value.isDistanceSelected=!0)),n.value=Ze.isDistanceActive?Ze:null)}function Ne(){a.customDistance&&(a.customDistance==="players"?(f.value.forEach(Ze=>{Ze.from.isDistanceActive=!1,Ze.from.isDistanceSelected=!1,Ze.to.isDistanceActive=!1,Ze.to.isDistanceSelected=!1,delete Ze.from.activeDistancesPlayers,delete Ze.to.activeDistancesPlayers,T.value&&T.value.id===Ze.id&&(T.value=null,Ze.isCandidateToDelete=!1,Ze.from.isCandidateToDelete=!1,Ze.to.isCandidateToDelete=!1);const xe=Ze.from.type==="line"?Ze.from:Ze.to.type==="line"?Ze.to:null;xe&&xe.players&&(xe.players=[])}),f.value=[]):a.customDistance==="block"&&(l.value.forEach(Ze=>{Ze.from.isDistanceActive=!1,Ze.from.isDistanceSelected=!1,Ze.to.isDistanceActive=!1,Ze.to.isDistanceSelected=!1,delete Ze.from.activeDistancesBlock,delete Ze.to.activeDistancesBlock,T.value&&T.value.id===Ze.id&&(T.value=null,Ze.isCandidateToDelete=!1,Ze.from.isCandidateToDelete=!1,Ze.to.isCandidateToDelete=!1);const xe=Ze.from.type==="line"?Ze.from:Ze.to.type==="line"?Ze.to:null;xe&&xe.block&&(xe.block=[])}),l.value=[]),u.value.forEach(Ze=>{Ze.isDistanceActive=!1,Ze.isDistanceCandidate=!1,Ze.isDistanceSelected=!1,Ze.isCandidateToDelete=!1,delete Ze.activeDistancesPlayers,delete Ze.activeDistancesBlock}),w.value.forEach(Ze=>{Ze.isDistanceActive=!1,Ze.isDistanceCandidate=!1,Ze.isDistanceSelected=!1,Ze.isCandidateToDelete=!1,delete Ze.activeDistancesPlayers,delete Ze.activeDistancesBlock}),n.value=null,i.value=null,T.value=null,Ce())}function Ue(Ze){if(!(T.value&&T.value.id!==Ze.id))if(!Ze.isCandidateToDelete)T.value=Ze,Ze.isCandidateToDelete=!0,Ze.from.isCandidateToDelete=!0,Ze.to.isCandidateToDelete=!0;else{const xe=Ze.from.type==="line"?Ze.from:Ze.to.type==="line"?Ze.to:null,Oe=Ze.from.type!=="line"?Ze.from:Ze.to.type!=="line"?Ze.to:null;if(xe&&Oe){const Fe=xe[a.customDistance];Fe&&(xe[a.customDistance]=Fe.filter(We=>We.id!==Oe.id))}a.customDistance==="players"?f.value=f.value.filter(Fe=>Fe.id!==Ze.id):a.customDistance==="block"&&(l.value=l.value.filter(Fe=>Fe.id!==Ze.id)),Ze.from.isDistanceActive=!1,Ze.from.isCandidateToDelete=!1,Ze.from.isDistanceCandidate=!1,Ze.to.isDistanceActive=!1,Ze.to.isCandidateToDelete=!1,Ze.to.isDistanceCandidate=!1,Ze.isCandidateToDelete=!1,T.value=null,Ze.from[B.value]=Ze.from[B.value].filter(Fe=>Fe!==Ze.id),Ze.to[B.value]=Ze.to[B.value].filter(Fe=>Fe!==Ze.id),Ze.from.isDistanceSelected=Ze.from[B.value].length>0,Ze.to.isDistanceSelected=Ze.to[B.value].length>0,A.value=null,Ce()}}function Xe(){T.value&&(T.value.isCandidateToDelete=!1,T.value.from.isCandidateToDelete=!1,T.value.to.isCandidateToDelete=!1,T.value=null)}return t.onMounted(()=>{document.addEventListener("click",Xe)}),t.onBeforeUnmount(()=>{document.removeEventListener("click",Xe)}),o({setConnections:me,clearCustomDistances:Ne}),(Ze,xe)=>(t.openBlock(),t.createElementBlock("div",{class:"soccer-field",style:t.normalizeStyle(S.value)},[b.value.show?(t.openBlock(),t.createBlock(Rmt,{key:`tooltip-${b.value.player.id}`,show:b.value.show,player:b.value.player,x:b.value.x,y:b.value.y,ref_key:"tooltipBoxRef",ref:d},null,8,["show","player","x","y"])):t.createCommentVNode("",!0),t.createElementVNode("div",Vmt,[t.createElementVNode("div",jmt,[a.isDataLoaded?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",Umt,[...xe[1]||(xe[1]=[t.createElementVNode("div",{class:"loading-spinner-small"},"⚡",-1),t.createElementVNode("span",null,"Calculando posiciones...",-1)])])),t.createElementVNode("div",Gmt,[(t.openBlock(),t.createElementBlock("svg",Hmt,[xe[2]||(xe[2]=t.createStaticVNode('<defs data-v-2aa801ce><marker id="arrow-left-home" markerWidth="20" markerHeight="20" refX="5" refY="8" orient="auto" markerUnits="strokeWidth" data-v-2aa801ce><path d="M8.8771 15.8791C8.44757 16.3086 7.75102 16.3085 7.32144 15.8791L0.321438 8.87808C-0.108139 8.4485 -0.108139 7.75297 0.321438 7.32339L7.32144 0.322414C7.75102 -0.107031 8.44757 -0.107119 8.8771 0.322414C9.30663 0.751947 9.30655 1.44849 8.8771 1.87808L2.84878 7.9064L2.84878 8.29507L8.8771 14.3234C9.30655 14.753 9.30663 15.4495 8.8771 15.8791Z" fill="#33E4FF" data-v-2aa801ce></path></marker><marker id="arrow-right-home" markerWidth="20" markerHeight="20" refX="8" refY="8" orient="auto" markerUnits="strokeWidth" data-v-2aa801ce><path d="M0.322117 15.8791C0.75165 16.3086 1.44819 16.3085 1.87778 15.8791L8.87778 8.87808C9.30736 8.4485 9.30736 7.75297 8.87778 7.32339L1.87778 0.322414C1.44819 -0.107031 0.75165 -0.107119 0.322117 0.322414C-0.107416 0.751947 -0.107329 1.44849 0.322117 1.87808L6.35044 7.9064L6.35044 8.29507L0.322117 14.3234C-0.107329 14.753 -0.107416 15.4495 0.322117 15.8791Z" fill="#33E4FF" data-v-2aa801ce></path></marker><marker id="arrow-left-away" markerWidth="20" markerHeight="20" refX="5" refY="8" orient="auto" markerUnits="strokeWidth" data-v-2aa801ce><path d="M8.8771 15.8791C8.44757 16.3086 7.75102 16.3085 7.32144 15.8791L0.321438 8.87808C-0.108139 8.4485 -0.108139 7.75297 0.321438 7.32339L7.32144 0.322414C7.75102 -0.107031 8.44757 -0.107119 8.8771 0.322414C9.30663 0.751947 9.30655 1.44849 8.8771 1.87808L2.84878 7.9064L2.84878 8.29507L8.8771 14.3234C9.30655 14.753 9.30663 15.4495 8.8771 15.8791Z" fill="#CBEE6B" data-v-2aa801ce></path></marker><marker id="arrow-right-away" markerWidth="20" markerHeight="20" refX="8" refY="8" orient="auto" markerUnits="strokeWidth" data-v-2aa801ce><path d="M0.322117 15.8791C0.75165 16.3086 1.44819 16.3085 1.87778 15.8791L8.87778 8.87808C9.30736 8.4485 9.30736 7.75297 8.87778 7.32339L1.87778 0.322414C1.44819 -0.107031 0.75165 -0.107119 0.322117 0.322414C-0.107416 0.751947 -0.107329 1.44849 0.322117 1.87808L6.35044 7.9064L6.35044 8.29507L0.322117 14.3234C-0.107329 14.753 -0.107416 15.4495 0.322117 15.8791Z" fill="#CBEE6B" data-v-2aa801ce></path></marker></defs>',1)),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(k.value,Oe=>(t.openBlock(),t.createElementBlock("path",{key:Oe.id,d:Oe.d,stroke:Oe.isCandidateToDelete?"#F7A138":"#4AC9FF","stroke-width":"3","stroke-opacity":T.value?Oe.isCandidateToDelete?1:0:Oe.isDistanceActive||Oe.isDistanceCandidate||Oe[e.customDistance].some(Fe=>Fe&&Fe.isVisible)?1:0,class:"distance-line",onMouseover:Fe=>Me(Oe),onMouseout:Fe=>Re(Oe),onClick:t.withModifiers(Fe=>we(Oe),["prevent","stop"])},null,40,Zmt))),128)),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(ie.value,(Oe,Fe)=>(t.openBlock(),t.createElementBlock("g",{key:`cc-${Fe}`},[Oe.left?(t.openBlock(),t.createElementBlock("path",{key:0,id:`pl-${Fe}`,d:`M ${Oe.left.x1} ${Oe.left.y1} L ${Oe.left.x2} ${Oe.left.y2}`,style:t.normalizeStyle({stroke:ke.value(Oe.left),"stroke-width":ne(Oe.left)})},null,12,Wmt)):t.createCommentVNode("",!0),Oe.right?(t.openBlock(),t.createElementBlock("path",{key:1,id:`pr-${Fe}`,d:`M ${Oe.right.x1} ${Oe.right.y1} L ${Oe.right.x2} ${Oe.right.y2}`,style:t.normalizeStyle({stroke:ke.value(Oe.right),"stroke-width":ne(Oe.right)})},null,12,Xmt)):t.createCommentVNode("",!0),Oe.left?(t.openBlock(),t.createElementBlock("text",{key:2,style:t.normalizeStyle({fill:ke.value(Oe.left),"font-size":"8px","dominant-baseline":"central",stroke:le(Oe.left),"stroke-width":ne(Oe.left)>=3.5?"1":"0"})},[t.createElementVNode("textPath",{"xlink:href":`#pl-${Fe}`,startOffset:"40%"},"➤",8,qmt)],4)):t.createCommentVNode("",!0),Oe.right?(t.openBlock(),t.createElementBlock("text",{key:3,style:t.normalizeStyle({fill:ke.value(Oe.right),"font-size":"8px","dominant-baseline":"central",stroke:le(Oe.right),"stroke-width":ne(Oe.right)>=3.5?"1":"0"})},[t.createElementVNode("textPath",{"xlink:href":`#pr-${Fe}`,startOffset:"40%"},"➤",8,Ymt)],4)):t.createCommentVNode("",!0)]))),128)),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(O.value,Oe=>(t.openBlock(),t.createElementBlock("g",{key:Oe.id},[t.createElementVNode("rect",{x:Oe.leftRaw,y:Oe.topRaw,transform:"translate(-18, -18)",height:"36",width:"36","stroke-width":Oe.is_titular?2:1,fill:ye.value(Oe,!0),stroke:"#fff",opacity:Oe.is_titular?1:.8,rx:"18",ry:"18",class:t.normalizeClass({"player-marker__hidden":!a.playersSelectedShadows.includes(Oe.id)})},null,10,Jmt),t.createElementVNode("text",{x:Oe.leftRaw,y:Oe.topRaw,"text-anchor":"middle","dominant-baseline":"middle",dy:"1","font-size":"18",fill:Ee.value(Oe,!0),opacity:Oe.is_titular?1:.8,"font-family":"'Poppins-SemiBold', sans-serif",class:t.normalizeClass({"player-marker__hidden":!a.playersSelectedShadows.includes(Oe.id)})},t.toDisplayString(Oe.number),11,$mt)]))),128)),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(M.value,Oe=>(t.openBlock(),t.createElementBlock("g",{key:Oe.id,style:t.normalizeStyle({opacity:E(Oe)}),class:t.normalizeClass({"player-marker__hidden":!Oe.isVisible}),onMouseenter:Fe=>Pe(Fe,Oe),onMouseleave:Fe=>Be(Oe),onClick:t.withModifiers(Fe=>Ve(Oe),["prevent","stop"])},[t.createElementVNode("rect",{x:Oe.leftRaw,y:Oe.topRaw,transform:"translate(-18, -18)",height:"36",width:"36","stroke-width":Oe.is_titular?2:1,fill:ye.value(Oe),stroke:ve.value(Oe),opacity:Oe.is_titular?1:.8,rx:"18",ry:"18",style:t.normalizeStyle({cursor:e.customDistance?"inherit":"pointer","pointer-events":"all"})},null,12,Qmt),t.createElementVNode("text",{x:Oe.leftRaw,y:Oe.topRaw,"text-anchor":"middle","dominant-baseline":"middle",dy:"1","font-size":"18",fill:Ee.value(Oe),opacity:Oe.is_titular?1:.8,"font-family":"'Poppins-SemiBold', sans-serif",style:t.normalizeStyle({cursor:e.customDistance?"inherit":"pointer","pointer-events":"all"})},t.toDisplayString(Oe.number),13,e1t)],46,Kmt))),128)),e.isDistanceVisible&&V.value?(t.openBlock(),t.createElementBlock("g",t1t,[t.createElementVNode("rect",{width:`${h.value.maximumX-h.value.minimumX}`,height:"24",x:h.value.minimumX,y:"5",rx:"0",ry:"0",fill:"#20539F"},null,8,a1t),t.createElementVNode("line",{style:{stroke:"#33E4FF","stroke-width":1.5,opacity:"1"},"stroke-dasharray":"5,5",x1:h.value.minimumX,y1:"16",x2:h.value.maximumX,y2:"16","marker-start":"url(#arrow-left-home)","marker-end":"url(#arrow-right-home)"},null,8,r1t),t.createElementVNode("g",null,[t.createElementVNode("rect",{x:h.value.minimumX+(h.value.maximumX-h.value.minimumX)/2-41.5979,y:"5",width:"83.1958",height:"23.1958",rx:"11.5979",stroke:"#33E4FF","stroke-width":"0.804237"},null,8,n1t),t.createElementVNode("rect",{x:h.value.minimumX+(h.value.maximumX-h.value.minimumX)/2-41.5979,y:"5",width:"83.1958",height:"23.1958",rx:"11.5979",fill:"#547CB1","fill-opacity":"1"},null,8,i1t),t.createElementVNode("text",{x:h.value.minimumX+(h.value.maximumX-h.value.minimumX)/2,y:"18","text-anchor":"middle","dominant-baseline":"middle","font-size":"15",fill:"white"},t.toDisplayString(((h.value.maximumX-h.value.minimumX)*y.value).toFixed(0))+" m ",9,o1t)]),t.createElementVNode("rect",{width:24,height:`${h.value.maximumY-h.value.minimumY}`,x:"15",y:h.value.minimumY,rx:"0",ry:"0",fill:"#20539F"},null,8,s1t),t.createElementVNode("line",{style:{stroke:"#33E4FF","stroke-width":1.5,opacity:"1"},"stroke-dasharray":"5,5",x1:"25",y1:h.value.minimumY,x2:"25",y2:h.value.maximumY,"marker-start":"url(#arrow-left-home)","marker-end":"url(#arrow-right-home)"},null,8,l1t),t.createElementVNode("g",null,[t.createElementVNode("rect",{x:"15",y:h.value.minimumY+(h.value.maximumY-h.value.minimumY)/2-41.5979,width:"23.1958",height:"83.1958",rx:"11.5979",stroke:"#33E4FF","stroke-width":"0.804237"},null,8,c1t),t.createElementVNode("rect",{x:"15",y:h.value.minimumY+(h.value.maximumY-h.value.minimumY)/2-41.5979,width:"23.1958",height:"83.1958",rx:"11.5979",fill:"#547CB1","fill-opacity":"1"},null,8,u1t),t.createElementVNode("text",{x:"24",y:h.value.minimumY+(h.value.maximumY-h.value.minimumY)/2,"text-anchor":"middle","dominant-baseline":"middle","font-size":"15",fill:"white","writing-mode":"vertical-lr"},t.toDisplayString(((h.value.maximumY-h.value.minimumY)*x.value).toFixed(0))+" m ",9,d1t)])])):t.createCommentVNode("",!0),e.isDistanceVisible&&G.value?(t.openBlock(),t.createElementBlock("g",h1t,[t.createElementVNode("rect",{width:`${m.value.maximumX-m.value.minimumX}`,height:"24",x:m.value.minimumX,y:"368",rx:"0",ry:"0",fill:"#20539F"},null,8,p1t),t.createElementVNode("line",{style:{stroke:"#cbee6b","stroke-width":1.5,opacity:"1"},"stroke-dasharray":"5,5",x1:m.value.minimumX,y1:"379",x2:m.value.maximumX,y2:"379","marker-start":"url(#arrow-left-away)","marker-end":"url(#arrow-right-away)"},null,8,f1t),t.createElementVNode("g",null,[t.createElementVNode("rect",{x:m.value.minimumX+(m.value.maximumX-m.value.minimumX)/2-41.5979,y:"368",width:"83.1958",height:"23.1958",rx:"11.5979",stroke:"#CBEE6B","stroke-width":"0.804237"},null,8,m1t),t.createElementVNode("rect",{x:m.value.minimumX+(m.value.maximumX-m.value.minimumX)/2-41.5979,y:"368",width:"83.1958",height:"23.1958",rx:"11.5979",fill:"#547CB1","fill-opacity":"1"},null,8,g1t),t.createElementVNode("text",{x:m.value.minimumX+(m.value.maximumX-m.value.minimumX)/2,y:"381","text-anchor":"middle","dominant-baseline":"middle","font-size":"15",fill:"white"},t.toDisplayString(((m.value.maximumX-m.value.minimumX)*y.value).toFixed(0))+" m ",9,y1t)]),t.createElementVNode("rect",{width:24,height:`${m.value.maximumY-m.value.minimumY}`,x:"578",y:m.value.minimumY,rx:"0",ry:"0",fill:"#20539F"},null,8,v1t),t.createElementVNode("line",{style:{stroke:"#cbee6b","stroke-width":1.5,opacity:"1"},"stroke-dasharray":"5,5",x1:"588",y1:m.value.minimumY,x2:"588",y2:m.value.maximumY,"marker-start":"url(#arrow-left-away)","marker-end":"url(#arrow-right-away)"},null,8,b1t),t.createElementVNode("g",null,[t.createElementVNode("rect",{x:"576",y:m.value.minimumY+(m.value.maximumY-m.value.minimumY)/2-41.5979,width:"23.1958",height:"83.1958",rx:"11.5979",stroke:"#CBEE6B","stroke-width":"0.804237"},null,8,x1t),t.createElementVNode("rect",{x:"576",y:m.value.minimumY+(m.value.maximumY-m.value.minimumY)/2-41.5979,width:"23.1958",height:"83.1958",rx:"11.5979",fill:"#547CB1","fill-opacity":"1"},null,8,_1t),t.createElementVNode("text",{x:"586",y:m.value.minimumY+(m.value.maximumY-m.value.minimumY)/2,"text-anchor":"middle","dominant-baseline":"middle","font-size":"15",fill:"white","writing-mode":"vertical-lr"},t.toDisplayString(((m.value.maximumY-m.value.minimumY)*x.value).toFixed(0))+" m ",9,w1t)])])):t.createCommentVNode("",!0),n.value&&i.value?(t.openBlock(),t.createElementBlock("path",{key:2,d:`M ${n.value.leftRaw||i.value.leftRaw} ${n.value.topRaw||i.value.topRaw} L ${i.value.leftRaw||n.value.leftRaw} ${i.value.topRaw||n.value.topRaw}`,style:{stroke:"#44E3E7","stroke-width":2}},null,8,k1t)):t.createCommentVNode("",!0),e.customDistance&&e.customDistance==="block"?(t.openBlock(),t.createElementBlock(t.Fragment,{key:3},[e.isAwayTeamVisible?(t.openBlock(),t.createElementBlock("path",{key:0,d:`M${m.value.minimumX} ${m.value.minimumY}H${m.value.maximumX}V${m.value.maximumY}H${m.value.minimumX}`,fill:"#CBEE6B","fill-opacity":"0.4"},null,8,S1t)):t.createCommentVNode("",!0),e.isHomeTeamVisible?(t.openBlock(),t.createElementBlock("path",{key:1,d:`M${h.value.minimumX} ${h.value.minimumY}H${h.value.maximumX}V${h.value.maximumY}H${h.value.minimumX}`,fill:"#33C9FF","fill-opacity":"0.4"},null,8,T1t)):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(w.value,(Oe,Fe)=>(t.openBlock(),t.createElementBlock("path",{key:`bloc-boundary-${Fe}`,d:Oe.d,stroke:Oe.isCandidateToDelete?"#F7A138":"#33E4FF","stroke-width":"4","stroke-opacity":T.value?Oe.isCandidateToDelete?1:0:(Oe.isDistanceActive||Oe.isDistanceCandidate||Oe.isDistanceSelected)&&Oe.isVisible?1:0,onMouseover:We=>Me(Oe),onMouseout:We=>Re(Oe),onClick:t.withModifiers(We=>we(Oe),["prevent","stop"])},null,40,C1t))),128))],64)):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(P.value,(Oe,Fe)=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:`active-distance-${Fe}`},[Oe.from.isVisible&&Oe.to.isVisible?(t.openBlock(),t.createElementBlock("line",{key:0,style:t.normalizeStyle({stroke:Oe.isCandidateToDelete?"#F7A138":"#38F3F7","stroke-width":2,opacity:L(Oe)}),"stroke-dasharray":"2,2",x1:Oe.fromLineLeft,y1:Oe.fromLineTop,x2:Oe.toLineLeft,y2:Oe.toLineTop},null,12,E1t)):t.createCommentVNode("",!0),Oe.from.team?(t.openBlock(),t.createElementBlock("g",{key:1,style:t.normalizeStyle({opacity:L(Oe)}),class:t.normalizeClass({"player-marker__hidden":!Oe.from.isVisible}),onMouseenter:We=>{C(Oe),Pe(We,Oe.from)},onMouseleave:We=>{I(),Be(Oe.from)},onClick:t.withModifiers(We=>Ve(Oe.from),["prevent","stop"])},[t.createElementVNode("rect",{x:Oe.from.leftRaw,y:Oe.from.topRaw,transform:"translate(-18, -18)",height:"36",width:"36","stroke-width":Oe.from.is_titular?2:1,fill:ye.value(Oe.from),stroke:ve.value(Oe.from),opacity:Oe.from.is_titular?1:.8,rx:"18",ry:"18",style:t.normalizeStyle({cursor:e.customDistance?"inherit":"pointer","pointer-events":"all"})},null,12,M1t),t.createElementVNode("text",{x:Oe.from.leftRaw,y:Oe.from.topRaw,"text-anchor":"middle","dominant-baseline":"middle",dy:"1","font-size":"18",fill:Ee.value(Oe.from),opacity:Oe.from.is_titular?1:.8,"font-family":"'Poppins-SemiBold', sans-serif",style:t.normalizeStyle({cursor:e.customDistance?"inherit":"pointer","pointer-events":"all"})},t.toDisplayString(Oe.from.number),13,P1t)],46,A1t)):t.createCommentVNode("",!0),Oe.to.team?(t.openBlock(),t.createElementBlock("g",{key:2,style:t.normalizeStyle({opacity:L(Oe)}),class:t.normalizeClass({"player-marker__hidden":!Oe.to.isVisible}),onMouseenter:We=>{C(Oe),Pe(We,Oe.to)},onMouseleave:We=>{I(),Be(Oe.to)},onClick:t.withModifiers(We=>Ve(Oe.to),["prevent","stop"])},[t.createElementVNode("rect",{x:Oe.to.leftRaw,y:Oe.to.topRaw,transform:"translate(-18, -18)",height:"36",width:"36","stroke-width":Oe.to.is_titular?2:1,fill:ye.value(Oe.to),stroke:ve.value(Oe.to),opacity:Oe.to.is_titular?1:.8,rx:"18",ry:"18",style:t.normalizeStyle({cursor:e.customDistance?"inherit":"pointer","pointer-events":"all"})},null,12,L1t),t.createElementVNode("text",{x:Oe.to.leftRaw,y:Oe.to.topRaw,"text-anchor":"middle","dominant-baseline":"middle",dy:"1","font-size":"18",fill:Ee.value(Oe.to),opacity:Oe.to.is_titular?1:.8,"font-family":"'Poppins-SemiBold', sans-serif",style:t.normalizeStyle({cursor:e.customDistance?"inherit":"pointer","pointer-events":"all"})},t.toDisplayString(Oe.to.number),13,B1t)],46,I1t)):t.createCommentVNode("",!0),Oe.from.isVisible&&Oe.to.isVisible?(t.openBlock(),t.createElementBlock("g",{key:3,class:"is-pointer",onMouseenter:We=>C(Oe),onMouseleave:xe[0]||(xe[0]=We=>I()),onClick:t.withModifiers(We=>Ue(Oe),["prevent","stop"])},[t.createElementVNode("rect",{x:Oe.lineLabelLeft-24,y:Oe.lineLabelTop-11.5,style:t.normalizeStyle({opacity:L(Oe)}),width:"48",height:"23",rx:"11.5979",stroke:Oe.isCandidateToDelete?"#F7A138":"#44E3E7","stroke-width":"2"},null,12,z1t),t.createElementVNode("rect",{x:Oe.lineLabelLeft-24,y:Oe.lineLabelTop-11.5,width:"48",height:"23",rx:"11.5979",style:t.normalizeStyle({opacity:L(Oe)}),fill:Oe.isCandidateToDelete?"#F7A138":"#264F8C","fill-opacity":"1"},null,12,N1t),t.createElementVNode("text",{x:Oe.lineLabelLeft,y:Oe.lineLabelTop+1,"text-anchor":"middle","dominant-baseline":"middle","font-size":"13",fill:"white",style:t.normalizeStyle({opacity:L(Oe)})},t.toDisplayString(Oe.isCandidateToDelete?"X":`${Oe.distanceInMeters} m`),13,D1t)],40,O1t)):t.createCommentVNode("",!0)],64))),128))]))])])])],4))}},j1t=du(V1t,[["__scopeId","data-v-2aa801ce"]]),U1t={class:"filters-container"},G1t={class:"events-section"},H1t={class:"section-header"},Z1t={class:"all-toggle"},W1t={class:"events-list"},X1t={class:"events-section"},q1t={class:"section-header"},Y1t={class:"events-list"},J1t={__name:"FilterEvents",props:{startedCategories:{type:Array,default:()=>[]},endedCategories:{type:Array,default:()=>[]},allStartEventsSelected:{type:Boolean,default:!1},allEndEventsSelected:{type:Boolean,default:!1}},emits:["update-start-event","update-end-event","toggle-all-start-events","toggle-all-end-events"],setup(e,{emit:o}){const s=o,z=e,W=t.ref(z.allStartEventsSelected),v=t.ref(z.allEndEventsSelected);t.watch(()=>z.allStartEventsSelected,a=>{W.value=a},{immediate:!0}),t.watch(()=>z.allEndEventsSelected,a=>{v.value=a},{immediate:!0});function g(a){W.value=a,s("toggle-all-start-events",a)}function r(a){v.value=a,s("toggle-all-end-events",a)}function b(a,_){s("update-start-event",a,_)}function d(a,_){s("update-end-event",a,_)}return(a,_)=>(t.openBlock(),t.createElementBlock("div",U1t,[t.createElementVNode("div",G1t,[t.createElementVNode("div",H1t,[_[0]||(_[0]=t.createElementVNode("span",{class:"section-title"},"Jugadas que empiezan con:",-1)),t.createElementVNode("label",Z1t,[t.createVNode(t.unref(pp),{label:"Todas","box-position":"right","model-value":W.value,"onUpdate:modelValue":g},null,8,["model-value"])])]),t.createElementVNode("div",W1t,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(z.startedCategories,y=>(t.openBlock(),t.createElementBlock("div",{key:y.id,class:"category-item"},[t.createVNode(t.unref(pp),{"model-value":y.isSelected,label:y.name,"onUpdate:modelValue":x=>b(x,y)},null,8,["model-value","label","onUpdate:modelValue"])]))),128))])]),t.createElementVNode("div",X1t,[t.createElementVNode("div",q1t,[_[1]||(_[1]=t.createElementVNode("span",{class:"section-title"},"Jugadas que terminan con:",-1)),t.createVNode(t.unref(pp),{label:"Todas","box-position":"right","model-value":v.value,"onUpdate:modelValue":r},null,8,["model-value"])]),t.createElementVNode("div",Y1t,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(z.endedCategories,y=>(t.openBlock(),t.createElementBlock("div",{key:y.id,class:"category-item"},[t.createVNode(t.unref(pp),{"model-value":y.isSelected,label:y.name,"onUpdate:modelValue":x=>d(x,y)},null,8,["model-value","label","onUpdate:modelValue"])]))),128))])])]))}},LV=du(J1t,[["__scopeId","data-v-4a62a51c"]]),$1t={class:"side-filters"},K1t={class:"team-switch-container"},Q1t={class:"team-switch team-switch-toggle"},egt={class:"team-content"},tgt=["src"],agt={class:"team-label"},rgt={class:"team-content"},ngt={class:"team-label"},igt=["src"],ogt={class:"team-visible-checkbox"},sgt={class:"checkbox-container"},lgt=["checked"],cgt=["checked"],ugt={class:"side-filters__tabs"},dgt={class:"tabs-container"},hgt={class:"side-filters__content"},pgt={__name:"SideFilters",props:{startedCategories:{type:Array,default:()=>[]},endedCategories:{type:Array,default:()=>[]},defaultChainsFilters:{type:Object,default:()=>({})},homeTeamId:{type:Number,default:1},nameHomeTeam:{type:String,default:""},nameAwayTeam:{type:String,default:""},awayTeamId:{type:Number,default:5},gameId:{type:Number,default:88247},players:{type:Array,default:()=>[]},isHomeTeamVisible:{type:Boolean,default:!0},isAwayTeamVisible:{type:Boolean,default:!0},timeFromTimeline:{type:Object,default:()=>({})},game:{type:Object,default:()=>({})}},emits:["home-chains-filtered","away-chains-filtered","home-ball-zones-filtered","away-ball-zones-filtered","home-stats-updated","away-stats-updated","selected-team-tab","home-team-visibility","away-team-visibility","update:isHomeTeamVisible","update:isAwayTeamVisible"],setup(e,{emit:o}){const s=e,z=t.ref("chains"),W=t.ref(!0),{selectedStartCategories:v,selectedEndCategories:g,isDataLoaded:r,loadInitialData:b,getFilteredData:d}=EV(s.gameId),a=t.ref({...s.defaultChainsFilters}),_=t.ref({...s.defaultChainsFilters}),y=t.ref(structuredClone(s.startedCategories)),x=t.ref(structuredClone(s.endedCategories)),u=t.ref(structuredClone(s.startedCategories)),n=t.ref(structuredClone(s.endedCategories)),i=t.ref(!0),f=t.ref(!0),l=t.ref(!0),h=t.ref(!0),m=t.ref(s.homeTeamId),w=o,T=U=>{const J=U===s.homeTeamId?a.value:_.value,re={startCategories:J.startCategories,endCategories:J.endCategories,teamId:J.possessionTeamId,minDuration:J.durationRange.min,maxDuration:J.durationRange.max,excludedFirstSeconds:J.excludedFirstSeconds,excludedLastSeconds:J.excludedLastSeconds,chainInitialZones:J.chainInitialZones,chainFinalZones:J.chainFinalZones,ballInterestZones:J.ballInterestZones,timeFromTimeline:s.timeFromTimeline},q=d(re);q&&(U===s.homeTeamId?(w("home-chains-filtered",q.chains,U),w("home-ball-zones-filtered",re.ballInterestZones,U),w("home-stats-updated",q.stats,U)):(w("away-chains-filtered",q.chains,U),w("away-ball-zones-filtered",re.ballInterestZones,U),w("away-stats-updated",q.stats,U)))},A=U=>{const J=m.value===s.homeTeamId?a.value:_.value;switch(U){case"home":J.possessionTeamId=s.homeTeamId;break;case"away":J.possessionTeamId=s.awayTeamId;break;case"both":J.possessionTeamId=null;break}T(m.value)},C=(U,J)=>{const re=m.value===s.homeTeamId?a.value:_.value;U==="less-than"?re.durationRange={min:null,max:J}:re.durationRange={min:J,max:null},T(m.value)};function I(U,J){const re=m.value===s.homeTeamId?a.value:_.value,q=(m.value===s.homeTeamId?y.value:u.value).find(ae=>ae.id===J.id);q&&(q.isSelected=U),U?re.startCategories.includes(J.id)||re.startCategories.push(J.id):re.startCategories=re.startCategories.filter(ae=>ae!==J.id),m.value===s.homeTeamId?i.value=re.startCategories.length===y.value.length:l.value=re.startCategories.length===u.value.length,T(m.value)}function L(U,J){const re=m.value===s.homeTeamId?a.value:_.value,q=(m.value===s.homeTeamId?x.value:n.value).find(ae=>ae.id===J.id);q&&(q.isSelected=U),U?re.endCategories.includes(J.id)||re.endCategories.push(J.id):re.endCategories=re.endCategories.filter(ae=>ae!==J.id),m.value===s.homeTeamId?f.value=re.endCategories.length===x.value.length:h.value=re.endCategories.length===n.value.length,T(m.value)}const E=U=>{const J=m.value===s.homeTeamId?a.value:_.value,re=m.value===s.homeTeamId?y.value:u.value;re.forEach(q=>q.isSelected=U),U?J.startCategories=re.map(q=>q.id):J.startCategories=[],m.value===s.homeTeamId?i.value=U:l.value=U,T(m.value)},P=U=>{const J=m.value===s.homeTeamId?a.value:_.value,re=m.value===s.homeTeamId?x.value:n.value;re.forEach(q=>q.isSelected=U),U?J.endCategories=re.map(q=>q.id):J.endCategories=[],m.value===s.homeTeamId?f.value=U:h.value=U,T(m.value)},M=U=>{const J=m.value===s.homeTeamId?a.value:_.value;J.excludedFirstSeconds=U,T(m.value)},S=U=>{const J=m.value===s.homeTeamId?a.value:_.value;J.excludedLastSeconds=U,T(m.value)},B=U=>{const J=m.value===s.homeTeamId?a.value:_.value;J.chainInitialZones=U,T(m.value)},k=U=>{const J=m.value===s.homeTeamId?a.value:_.value;J.chainFinalZones=U,T(m.value)},O=U=>{const J=m.value===s.homeTeamId?a.value:_.value;J.ballInterestZones=U,T(m.value)},D=v,V=g;t.watch(()=>r.value,async U=>{U||(await b(),W.value?(T(s.homeTeamId),T(s.awayTeamId),W.value=!1):T(m.value))},{immediate:!0}),t.watch(()=>s.timeFromTimeline,()=>{T(s.homeTeamId),T(s.awayTeamId)},{immediate:!1});const G=t.computed(()=>s.startedCategories.length>0?m.value===s.homeTeamId?y.value:u.value:[]),H=t.computed(()=>s.endedCategories.length>0?m.value===s.homeTeamId?x.value:n.value:[]);return t.watch([D,V],()=>{D.value.length===0&&(D.value=G.value.map(U=>U.id)),V.value.length===0&&(V.value=H.value.map(U=>U.id))},{immediate:!0}),t.watch([m],([U])=>{w("selected-team-tab",U)},{immediate:!0}),(U,J)=>(t.openBlock(),t.createElementBlock("div",$1t,[t.createElementVNode("div",K1t,[t.createElementVNode("div",Q1t,[t.createElementVNode("div",{class:"team-thumb",style:t.normalizeStyle({left:m.value===s.homeTeamId?"0px":"calc(50%)",width:"calc(50%)"})},null,4),t.createElementVNode("button",{class:t.normalizeClass(["team-btn",{active:m.value===s.homeTeamId}]),onClick:J[0]||(J[0]=re=>m.value=s.homeTeamId),type:"button"},[t.createElementVNode("span",egt,[t.createElementVNode("img",{src:`https://golstatsimages.blob.core.windows.net/teams-80/${s.homeTeamId}.png`,alt:"Escudo local",class:"team-logo"},null,8,tgt),t.createElementVNode("span",agt,t.toDisplayString(e.nameHomeTeam),1)])],2),t.createElementVNode("button",{class:t.normalizeClass(["team-btn",{active:m.value===s.awayTeamId}]),onClick:J[1]||(J[1]=re=>m.value=s.awayTeamId),type:"button"},[t.createElementVNode("span",rgt,[t.createElementVNode("span",ngt,t.toDisplayString(e.nameAwayTeam),1),t.createElementVNode("img",{src:`https://golstatsimages.blob.core.windows.net/teams-80/${s.awayTeamId}.png`,alt:"Escudo visitante",class:"team-logo"},null,8,igt)])],2)])]),t.createElementVNode("div",ogt,[t.createElementVNode("div",sgt,[t.withDirectives(t.createElementVNode("label",null,[t.createElementVNode("input",{type:"checkbox",checked:s.isHomeTeamVisible,onChange:J[2]||(J[2]=re=>w("update:isHomeTeamVisible",re.target.checked))},null,40,lgt),J[7]||(J[7]=t.createElementVNode("span",{class:"custom-checkbox"},null,-1)),t.createElementVNode("span",null,t.toDisplayString(e.nameHomeTeam)+" visible",1)],512),[[t.vShow,m.value===s.homeTeamId]]),t.withDirectives(t.createElementVNode("label",null,[t.createElementVNode("input",{type:"checkbox",checked:s.isAwayTeamVisible,onChange:J[3]||(J[3]=re=>w("update:isAwayTeamVisible",re.target.checked))},null,40,cgt),J[8]||(J[8]=t.createElementVNode("span",{class:"custom-checkbox"},null,-1)),t.createElementVNode("span",null,t.toDisplayString(e.nameAwayTeam)+" visible",1)],512),[[t.vShow,m.value===s.awayTeamId]])])]),t.createElementVNode("div",ugt,[t.createElementVNode("div",dgt,[t.createElementVNode("button",{class:t.normalizeClass(["tab-button",{active:z.value==="chains"}]),onClick:J[4]||(J[4]=re=>z.value="chains")}," Filtros ",2),t.createElementVNode("button",{class:t.normalizeClass(["tab-button",{active:z.value==="events"}]),onClick:J[5]||(J[5]=re=>z.value="events")}," Eventos ",2),t.createElementVNode("button",{class:t.normalizeClass(["tab-button",{active:z.value==="players"}]),onClick:J[6]||(J[6]=re=>z.value="players")}," Jugadores ",2)])]),t.createElementVNode("div",hgt,[t.withDirectives(t.createElementVNode("div",null,[t.withDirectives(t.createVNode(T5,{"team-id":s.homeTeamId,"home-team-id":s.homeTeamId,"away-team-id":s.awayTeamId,game:s.game,onChangePossession:A,onChangeDuration:C,onChangeExcludedFirstSeconds:M,onChangeExcludedLastSeconds:S,onChangeChainInitialZones:B,onChangeChainFinalZones:k,onChangeBallInterestZones:O},null,8,["team-id","home-team-id","away-team-id","game"]),[[t.vShow,m.value===s.homeTeamId]]),t.withDirectives(t.createVNode(T5,{"team-id":s.awayTeamId,"home-team-id":s.homeTeamId,"away-team-id":s.awayTeamId,game:s.game,onChangePossession:A,onChangeDuration:C,onChangeExcludedFirstSeconds:M,onChangeExcludedLastSeconds:S,onChangeChainInitialZones:B,onChangeChainFinalZones:k,onChangeBallInterestZones:O},null,8,["team-id","home-team-id","away-team-id","game"]),[[t.vShow,m.value===s.awayTeamId]])],512),[[t.vShow,z.value==="chains"]]),t.withDirectives(t.createElementVNode("div",null,[t.withDirectives(t.createVNode(LV,{"started-categories":G.value,"ended-categories":H.value,"all-start-events-selected":i.value,"all-end-events-selected":f.value,onToggleAllStartEvents:E,onToggleAllEndEvents:P,onUpdateStartEvent:I,onUpdateEndEvent:L},null,8,["started-categories","ended-categories","all-start-events-selected","all-end-events-selected"]),[[t.vShow,m.value===s.homeTeamId]]),t.withDirectives(t.createVNode(LV,{"started-categories":G.value,"ended-categories":H.value,"all-start-events-selected":l.value,"all-end-events-selected":h.value,onToggleAllStartEvents:E,onToggleAllEndEvents:P,onUpdateStartEvent:I,onUpdateEndEvent:L},null,8,["started-categories","ended-categories","all-start-events-selected","all-end-events-selected"]),[[t.vShow,m.value===s.awayTeamId]])],512),[[t.vShow,z.value==="events"]]),t.withDirectives(t.createElementVNode("div",null,[t.withDirectives(t.createVNode(N5,{players:e.players.filter(re=>re.team_id===s.homeTeamId)},null,8,["players"]),[[t.vShow,m.value===s.homeTeamId]]),t.withDirectives(t.createVNode(N5,{players:e.players.filter(re=>re.team_id===s.awayTeamId)},null,8,["players"]),[[t.vShow,m.value===s.awayTeamId]])],512),[[t.vShow,z.value==="players"]])])]))}},fgt=du(pgt,[["__scopeId","data-v-c043c4cf"]]),mgt={class:"team team-left"},ggt={class:"team-header"},ygt={class:"team-logo",style:{"margin-left":"-7px"}},vgt=["src","alt"],bgt={class:"team team-right"},xgt={class:"team-header"},_gt={class:"team-logo",style:{"margin-right":"4px"}},wgt=["src","alt"],kgt={class:"roles-section"},Sgt={class:"role-label local"},Tgt={class:"team-logo small"},Cgt=["src","alt"],Egt={class:"role-details"},Agt={width:"35",height:"10",viewBox:"0 0 35 10",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Mgt=["opacity"],Pgt={width:"18",height:"12",viewBox:"0 0 18 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Igt=["opacity"],Lgt={key:0,class:"mobile-vertical-line",style:{position:"absolute",height:"44px",left:"43px",top:"20px",bottom:"0",width:"1px","border-left":"1.5px dashed #b6b6b6"}},Bgt={class:"role-label visitante"},Ogt={class:"team-logo small"},zgt=["src","alt"],Ngt={class:"role-details"},Dgt={width:"35",height:"10",viewBox:"0 0 35 10",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Fgt=["opacity"],Rgt={width:"18",height:"12",viewBox:"0 0 18 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Vgt=["opacity"],jgt={key:0,class:"mobile-vertical-line",style:{position:"absolute",height:"44px",left:"46px",top:"20px",bottom:"0",width:"1px","border-left":"1.5px dashed #b6b6b6"}},Ugt={__name:"LabelsTool",props:{game:{type:Object,required:!0},isMobile:{type:Boolean,default:!1},players:{type:Array,default:()=>[]},showPases:{type:Boolean,default:!1},showDistancia:{type:Boolean,default:!1},showShadows:{type:Boolean,default:!1},isHomeTeamVisible:{type:Boolean,default:!0},isAwayTeamVisible:{type:Boolean,default:!0},isDeleteVisible:{type:Boolean,default:!1}},emits:["update:isHomeTeamVisible","update:isAwayTeamVisible","delete-distances"],setup(e,{emit:o}){const s=e,z=o,W=t.ref(s.isHomeTeamVisible),v=t.ref(s.isAwayTeamVisible),g=t.ref({local:{titular:!1,cambios:!1,pases:s.showPases,distancia:s.showDistancia,shadows:s.showShadows},visitante:{titular:!1,cambios:!1,pases:s.showPases,distancia:s.showDistancia,shadows:s.showShadows}}),r=t.computed(()=>({"--grid-template-columns":s.isMobile?"40px 1fr":"80px 1fr"})),b=t.computed(()=>{const _=s.players.filter(y=>y.team_id===s.game.homeTeam.team_id);return{titulares:_.filter(y=>y.is_titular).length,cambios:_.filter(y=>!y.is_titular).length,selectedTitulares:s.isHomeTeamVisible?_.filter(y=>y.is_titular&&y.isSelected).length:0,selectedCambios:s.isHomeTeamVisible?_.filter(y=>!y.is_titular&&y.isSelected).length:0}}),d=t.computed(()=>{const _=s.players.filter(y=>y.team_id===s.game.awayTeam.team_id);return{titulares:_.filter(y=>y.is_titular).length,cambios:_.filter(y=>!y.is_titular).length,selectedTitulares:s.isAwayTeamVisible?_.filter(y=>y.is_titular&&y.isSelected).length:0,selectedCambios:s.isAwayTeamVisible?_.filter(y=>!y.is_titular&&y.isSelected).length:0}});t.watch(()=>s.players,()=>{g.value.local.titular=b.value.selectedTitulares>0&&s.isHomeTeamVisible,g.value.local.cambios=b.value.selectedCambios>0&&s.isHomeTeamVisible,g.value.visitante.titular=d.value.selectedTitulares>0&&s.isAwayTeamVisible,g.value.visitante.cambios=d.value.selectedCambios>0&&s.isAwayTeamVisible},{deep:!0,immediate:!0}),t.watch(()=>s.showPases,_=>{g.value.local.pases=_&&s.isHomeTeamVisible,g.value.visitante.pases=_&&s.isAwayTeamVisible}),t.watch(()=>s.showDistancia,_=>{g.value.local.distancia=_&&s.isHomeTeamVisible,g.value.visitante.distancia=_&&s.isAwayTeamVisible}),t.watch(()=>s.showShadows,_=>{g.value.local.shadows=_&&s.isHomeTeamVisible,g.value.visitante.shadows=_&&s.isAwayTeamVisible},{immediate:!0}),t.watch(()=>s.isHomeTeamVisible,_=>{W.value=_,g.value.local.pases=s.showPases&&_,g.value.local.distancia=s.showDistancia&&_,g.value.local.shadows=s.showShadows&&_,g.value.local.titular=b.value.selectedTitulares>0&&_,g.value.local.cambios=b.value.selectedCambios>0&&_}),t.watch(()=>s.isAwayTeamVisible,_=>{v.value=_,g.value.visitante.pases=s.showPases&&_,g.value.visitante.distancia=s.showDistancia&&_,g.value.visitante.shadows=s.showShadows&&_,g.value.visitante.titular=d.value.selectedTitulares>0&&_,g.value.visitante.cambios=d.value.selectedCambios>0&&_}),t.watch(W,_=>{z("update:isHomeTeamVisible",_)}),t.watch(v,_=>{z("update:isAwayTeamVisible",_)});function a(){z("delete-distances")}return(_,y)=>(t.openBlock(),t.createElementBlock("div",{class:"labels-tool",style:t.normalizeStyle(r.value)},[t.createElementVNode("div",{class:"teams-header",style:t.normalizeStyle(e.isMobile?"gap:0px":"")},[t.createElementVNode("div",mgt,[t.createElementVNode("div",ggt,[t.createVNode(t.unref(pp),{modelValue:W.value,"onUpdate:modelValue":y[0]||(y[0]=x=>W.value=x)},null,8,["modelValue"]),t.createElementVNode("div",ygt,[t.createElementVNode("img",{src:`https://golstatsimages.blob.core.windows.net/teams-80/${s.game.homeTeam.team_id}.png`,alt:s.game.homeTeam.colloquial_name},null,8,vgt)]),t.createElementVNode("div",{class:"team-name",style:t.normalizeStyle({fontSize:e.isMobile?"10px":"12px"})},t.toDisplayString(s.game.homeTeam.colloquial_name),5),y[2]||(y[2]=t.createElementVNode("div",{class:"home-arrow"},[t.createElementVNode("svg",{width:"89",height:"6",viewBox:"0 0 89 6",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t.createElementVNode("path",{d:"M88.499 2.88087L83.499 5.76759L83.499 3.38087L6.11719 3.38086C5.88303 4.61447 4.80077 5.54785 3.49902 5.54785C2.02626 5.54785 0.832031 4.35362 0.832031 2.88086C0.832031 1.4081 2.02626 0.213867 3.49902 0.213867C4.80077 0.213868 5.88303 1.14725 6.11719 2.38086L83.499 2.38087L83.499 -0.00585215L88.499 2.88087Z",fill:"#336DFF"})])],-1))]),y[3]||(y[3]=t.createElementVNode("div",{class:"team-arrow blue"},null,-1))]),e.isDeleteVisible?(t.openBlock(),t.createElementBlock("div",{key:0,role:"button",class:"delete-button",onClick:a},[...y[4]||(y[4]=[t.createElementVNode("svg",{width:"16",height:"18",viewBox:"0 0 16 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t.createElementVNode("path",{d:"M10.549.91v.957h4.487v1.628h-.897v12.588c0 .472-.177.924-.488 1.256-.31.33-.73.514-1.164.514H3.513c-.435 0-.854-.183-1.164-.514a1.839 1.839 0 0 1-.488-1.256V3.495H.964V1.867H5.45V.91h5.098zm-7.18 15.316h9.262V3.495H3.369v12.731zm7.18-10.53v8.328H9.04V5.696h1.508zm-3.59 0v8.328H5.451V5.696H6.96z",fill:"#fff",stroke:"#2E3B46","stroke-width":".287"})],-1)])])):t.createCommentVNode("",!0),t.createElementVNode("div",bgt,[t.createElementVNode("div",xgt,[t.createElementVNode("div",{class:"team-name",style:t.normalizeStyle({fontSize:e.isMobile?"10px":"12px"})},t.toDisplayString(s.game.awayTeam.colloquial_name),5),t.createElementVNode("div",_gt,[t.createElementVNode("img",{src:`https://golstatsimages.blob.core.windows.net/teams-80/${s.game.awayTeam.team_id}.png`,alt:s.game.awayTeam.colloquial_name},null,8,wgt)]),t.createVNode(t.unref(pp),{modelValue:v.value,"onUpdate:modelValue":y[1]||(y[1]=x=>v.value=x)},null,8,["modelValue"]),y[5]||(y[5]=t.createElementVNode("div",{class:"away-arrow"},[t.createElementVNode("svg",{class:"arrow-svg right",width:"89",height:"6",viewBox:"0 0 89 6",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t.createElementVNode("path",{d:"M0.500977 2.88087L5.50098 5.76759L5.50098 3.38087L82.8828 3.38086C83.117 4.61447 84.1992 5.54785 85.501 5.54785C86.9737 5.54785 88.168 4.35362 88.168 2.88086C88.168 1.4081 86.9737 0.213867 85.501 0.213867C84.1992 0.213868 83.117 1.14725 82.8828 2.38086L5.50098 2.38087L5.50098 -0.00585215L0.500977 2.88087Z",fill:"#CBEE6B"})])],-1))]),y[6]||(y[6]=t.createElementVNode("div",{class:"team-arrow green"},null,-1))])],4),t.createElementVNode("div",kgt,[t.createElementVNode("div",{class:t.normalizeClass(["role-row",{"mobile-layout":e.isMobile}]),style:t.normalizeStyle(e.isMobile?{position:"relative"}:{})},[t.createElementVNode("div",Sgt,[t.createElementVNode("div",Tgt,[t.createElementVNode("img",{src:`https://golstatsimages.blob.core.windows.net/teams-80/${s.game.homeTeam.team_id}.png`,alt:s.game.homeTeam.colloquial_name},null,8,Cgt)]),t.createElementVNode("div",{class:"locality",style:t.normalizeStyle({"min-width":e.isMobile?"fit-content":"50px"})},t.toDisplayString(e.isMobile?"L":"LOCAL"),5)]),t.createElementVNode("div",Egt,[t.createElementVNode("div",{class:"role-separator",style:t.normalizeStyle(e.isMobile?{visibility:"hidden"}:{})},null,4),t.createElementVNode("div",{class:"role-team",style:t.normalizeStyle(e.isMobile?{"margin-left":"15px"}:{})},[t.createElementVNode("div",{class:t.normalizeClass(["circle blue",{inactive:!g.value.local.titular}])},"8",2),t.createElementVNode("span",{class:t.normalizeClass(["role-text",{inactive:!g.value.local.titular}])},"Titular",2),t.createElementVNode("div",{class:t.normalizeClass(["circle blue-substitution substitution-circle",{inactive:!g.value.local.cambios}])},"8",2),t.createElementVNode("span",{class:t.normalizeClass(["role-text",{inactive:!g.value.local.cambios}])},"Cambios",2)],4),t.createElementVNode("div",{class:t.normalizeClass(["role-options",{"mobile-layout":e.isMobile}])},[t.createElementVNode("span",{class:t.normalizeClass(["arrow blue",{inactive:!g.value.local.pases}])},[(t.openBlock(),t.createElementBlock("svg",Agt,[t.createElementVNode("path",{d:"M27.2383 5.75879L0.902344 5.75879V4.27832L27.2383 4.27832V0.744141L34.6426 5.01855L27.2383 9.29297V5.75879Z",fill:"#6891F8",opacity:g.value.local.pases?1:.4},null,8,Mgt)]))],2),t.createElementVNode("span",{class:t.normalizeClass(["role-text",{inactive:!g.value.local.pases}]),style:{"margin-left":"3px"}},"Pases",2),(t.openBlock(),t.createElementBlock("svg",Pgt,[t.createElementVNode("path",{d:"M12.5419 10.752C12.2528 11.041 11.7842 11.0411 11.4951 10.752C11.206 10.4629 11.2061 9.99424 11.4951 9.70509L15.3974 5.80275L15.3974 5.23048L11.4951 1.32814C11.2061 1.03899 11.206 0.570355 11.4951 0.281262C11.7842 -0.00783105 12.2528 -0.00774079 12.5419 0.281262L17.2538 4.99318C17.543 5.28231 17.543 5.75091 17.2538 6.04005L12.5419 10.752ZM10.0634 6.25685L10.0634 4.77638L12.7304 4.77638L12.7304 6.25685L10.0634 6.25685ZM4.73041 6.25685L4.73041 4.77638L7.3974 4.77638L7.3974 6.25685L4.73041 6.25685ZM0.730411 6.25685L0.654239 6.25294C0.281131 6.2148 -0.00982329 5.89979 -0.00982332 5.51661C-0.00982336 5.13344 0.281131 4.81843 0.654239 4.78029L0.730411 4.77638L2.06342 4.77638L2.06342 6.25685L0.730411 6.25685Z",fill:"#33E4FF",opacity:g.value.local.distancia?1:.4},null,8,Igt)])),t.createElementVNode("span",{class:t.normalizeClass(["role-text",{inactive:!g.value.local.distancia}])},"Distancia",2),t.createElementVNode("div",{class:t.normalizeClass(["circle gray substitution-circle",{inactive:!g.value.local.shadows}])},"8",2),t.createElementVNode("span",{class:t.normalizeClass(["role-text",{inactive:!g.value.local.shadows}])},"Shadows",2)],2)]),e.isMobile?(t.openBlock(),t.createElementBlock("div",Lgt)):t.createCommentVNode("",!0)],6),t.createElementVNode("div",{class:t.normalizeClass(["role-row",{"mobile-layout":e.isMobile}]),style:t.normalizeStyle(e.isMobile?{position:"relative"}:{})},[t.createElementVNode("div",Bgt,[t.createElementVNode("div",Ogt,[t.createElementVNode("img",{src:`https://golstatsimages.blob.core.windows.net/teams-80/${s.game.awayTeam.team_id}.png`,alt:s.game.awayTeam.colloquial_name},null,8,zgt)]),t.createElementVNode("div",{class:"locality",style:t.normalizeStyle({"min-width":e.isMobile?"fit-content":"50px"})},t.toDisplayString(e.isMobile?"V":"VISITANTE"),5)]),t.createElementVNode("div",Ngt,[t.createElementVNode("div",{class:"role-separator",style:t.normalizeStyle(e.isMobile?{visibility:"hidden"}:{})},null,4),t.createElementVNode("div",{class:"role-team",style:t.normalizeStyle(e.isMobile?{"margin-left":"15px"}:{})},[t.createElementVNode("div",{class:t.normalizeClass(["circle green",{inactive:!g.value.visitante.titular}])},"8",2),t.createElementVNode("span",{class:t.normalizeClass(["role-text",{inactive:!g.value.visitante.titular}])},"Titular",2),t.createElementVNode("div",{class:t.normalizeClass(["circle green-substitution substitution-circle",{inactive:!g.value.visitante.cambios}])},"8",2),t.createElementVNode("span",{class:t.normalizeClass(["role-text",{inactive:!g.value.visitante.cambios}])},"Cambios",2)],4),t.createElementVNode("div",{class:t.normalizeClass(["role-options",{"mobile-layout":e.isMobile}])},[t.createElementVNode("span",{class:t.normalizeClass(["arrow green",{inactive:!g.value.visitante.pases}])},[(t.openBlock(),t.createElementBlock("svg",Dgt,[t.createElementVNode("path",{d:"M27.2383 5.75879L0.902344 5.75879V4.27832L27.2383 4.27832V0.744141L34.6426 5.01855L27.2383 9.29297V5.75879Z",fill:"#CBEE6B",opacity:g.value.visitante.pases?1:.4},null,8,Fgt)]))],2),t.createElementVNode("span",{class:t.normalizeClass(["role-text",{inactive:!g.value.visitante.pases}]),style:{"margin-left":"3px"}},"Pases",2),(t.openBlock(),t.createElementBlock("svg",Rgt,[t.createElementVNode("path",{d:"M12.5419 11.252C12.2528 11.541 11.7842 11.5411 11.4951 11.252C11.206 10.9629 11.2061 10.4942 11.4951 10.2051L15.3974 6.30275L15.3974 5.73048L11.4951 1.82814C11.2061 1.53899 11.206 1.07035 11.4951 0.781262C11.7842 0.492169 12.2528 0.492259 12.5419 0.781262L17.2538 5.49318C17.543 5.78231 17.543 6.25091 17.2538 6.54005L12.5419 11.252ZM10.0634 6.75685L10.0634 5.27638L12.7304 5.27638L12.7304 6.75685L10.0634 6.75685ZM4.73041 6.75685L4.73041 5.27638L7.3974 5.27638L7.3974 6.75685L4.73041 6.75685ZM0.730411 6.75685L0.654239 6.75294C0.281131 6.7148 -0.00982329 6.39979 -0.00982332 6.01661C-0.00982336 5.63344 0.281131 5.31843 0.654239 5.28029L0.730411 5.27638L2.06342 5.27638L2.06342 6.75685L0.730411 6.75685Z",fill:"#CBEE6B",opacity:g.value.visitante.distancia?1:.4},null,8,Vgt)])),t.createElementVNode("span",{class:t.normalizeClass(["role-text",{inactive:!g.value.visitante.distancia}])},"Distancia",2),t.createElementVNode("div",{class:t.normalizeClass(["circle gray substitution-circle",{inactive:!g.value.visitante.shadows}])},"8",2),t.createElementVNode("span",{class:t.normalizeClass(["role-text",{inactive:!g.value.visitante.shadows}])},"Shadows",2)],2)]),e.isMobile?(t.openBlock(),t.createElementBlock("div",jgt)):t.createCommentVNode("",!0)],6)])],4))}},Ggt=du(Ugt,[["__scopeId","data-v-8ecea783"]]),Hgt={__name:"ModalConfirm",props:{isVisible:{type:Boolean,default:!1}},emits:["close","delete"],setup(e,{emit:o}){const s=o;function z(){s("close")}function W(){s("delete"),z()}return(v,g)=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[(t.openBlock(),t.createBlock(t.Teleport,{to:"body"},[t.createVNode(t.Transition,null,{default:t.withCtx(()=>[e.isVisible?(t.openBlock(),t.createElementBlock("div",{key:0,class:"modal-overlay",onClick:z},[t.createElementVNode("div",{ref:"modalContent",class:"modal-content",onClick:g[0]||(g[0]=t.withModifiers(()=>{},["stop"]))},[g[1]||(g[1]=t.createElementVNode("div",{class:"header"},[t.createElementVNode("svg",{width:"12",height:"14",viewBox:"0 0 12 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t.createElementVNode("path",{d:"M7.904.116v.779h3.646v1.322h-.729v10.227c0 .384-.144.751-.396 1.02a1.297 1.297 0 0 1-.946.42H2.188c-.354 0-.695-.15-.947-.42a1.494 1.494 0 0 1-.395-1.02V2.217h-.73V.895h3.647V.116h4.141zM2.071 12.562h7.525V2.216H2.07v10.345zm5.833-8.556v6.767H6.68V4.006h1.225zm-2.917 0v6.767H3.763V4.006h1.224z",fill:"#fff",stroke:"#2E3B46","stroke-width":".233"})]),t.createElementVNode("div",null," Eliminar distancias ")],-1)),g[2]||(g[2]=t.createElementVNode("div",{class:"body"}," ¿Seguro que desea eliminar las distancias personalizadas? ",-1)),t.createElementVNode("div",{class:"footer"},[t.createElementVNode("div",{class:"cancel-button is-pointer",onClick:z}," Cancelar "),t.createElementVNode("div",{role:"button",class:"delete-button is-pointer",onClick:W}," Eliminar ")])],512)])):t.createCommentVNode("",!0)]),_:1})])),g[3]||(g[3]=t.createElementVNode("div",null,null,-1))],64))}},Zgt=du(Hgt,[["__scopeId","data-v-9d263082"]]),Wgt=new Map([[1,"Portero"],[2,"Defensa Central"],[3,"Lateral por izquierda"],[4,"Lateral por derecha"],[5,"Volante por izquierda"],[6,"Volante por derecha"],[7,"Volante defensivo"],[8,"Volante ofensivo"],[9,"Delantero"]]),Xgt={class:"positions-container__body"},qgt={class:"positions-container__filters"},Ygt={class:"main-content"},Jgt={class:"left-content"},$gt={class:"labels-tool-container"},Kgt={class:"right-content"},Qgt={class:"timeline-container"},eyt={__name:"GSC-PositionsAndConnections",props:{game:{type:Object,default:()=>({gameId:88247,homeTeam:{team_id:1,name:"Chivas"},awayTeam:{team_id:5,name:"Cruz Azul"}})},token:{type:String,default:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MCwibmFtZSI6IlVzdWFyaW8gRnJlZSIsInVzZXJuYW1lIjoiZnJlZUBnb2xzdGF0cy5jb20iLCJlbWFpbCI6ImZyZWVAZ29sc3RhdHMuY29tIiwiaWF0IjoxNjA2NzU4Nzk1LCJleHAiOjE2MzgyOTQ3OTV9.kPNmP7yDtk38cAXrUyc7OHRh6J25VFqy-XUNzbK-4YE"}},setup(e){const o=e,{endedCategories:s,startedCategories:z,loadGameData:W,isDataLoaded:v}=AV(),g=t.ref(null),r=t.ref([]),b=t.ref([]),d=t.ref([]),a=t.ref([]),_=t.ref([]),y=t.ref([]),x=t.ref([]),u=t.ref([]),n=t.ref({}),i=t.ref({}),f=t.ref({}),l=t.ref([]),h=t.ref([]),m=t.ref(o.game.homeTeam.team_id),w=t.ref(new Map),T=t.ref(new Map),A=t.ref([]),C=t.ref(!1),I=t.ref(!1),L=t.ref(!1),E=t.ref({originSections:[],destinationSections:[],distanceRange:{minValue:5,maxValue:30},isSelected:!1}),P=t.ref(!1),M=t.ref(!0),S=t.ref(!0),B=t.ref({startCategories:[1,2,3,4,5],endCategories:[1,2,3],durationRange:{min:1,max:null},possessionTeamId:null,excludedFirstSeconds:0,excludedLastSeconds:200,chainInitialZones:[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16],chainFinalZones:[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16],ballInterestZones:[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16],timeFromTimeline:{}}),k=t.ref(null),O=t.ref(!1),D=t.ref({blockDistancesTotal:0,passDistancesTotal:0}),V=t.computed(()=>k.value==="block"&&D.value.blockDistancesTotal>0||k.value==="players"&&D.value.playerDistancesTotal>0),G=t.computed(()=>w.value.size?w.value.get(m.value)||[]:[]),H=t.computed(()=>{const we=w.value.get(o.game.homeTeam.team_id)||[],Ve=w.value.get(o.game.awayTeam.team_id)||[];return[...we,...Ve]}),U=t.computed(()=>{const we=T.value.get(o.game.homeTeam.team_id)||[],Ve=T.value.get(o.game.awayTeam.team_id)||[];return[...we,...Ve]}),J=t.computed(()=>({homeTeam:w.value.get(o.game.homeTeam.team_id)||[],awayTeam:w.value.get(o.game.awayTeam.team_id)||[]})),re=t.computed(()=>H.value.filter(we=>we.isSelected).map(we=>we.player_id)),q=t.computed(()=>U.value.filter(we=>we.isSelected).map(we=>we.player_id));let ae=null;const ee=t.ref(null),$=t.ref(0);function Q(){ee.value&&(ae=new ResizeObserver(we=>{for(const Ve of we)Ve.contentRect.width!==$.value&&($.value=Ve.contentRect.width)}),ae.observe(ee.value))}t.onMounted(async()=>{await W(o.game.gameId),Q()});const ce=t.computed(()=>$.value<560);t.watch(()=>$.value,we=>{},{immediate:!0}),t.watch(()=>o.game.gameId,async we=>{we&&(Cp.resetCache(),await W(we),await ie(),await me())},{immediate:!0});function de(we,Ve){Ve===o.game.homeTeam.team_id?r.value=we:b.value=we}function he(we,Ve){Ve===o.game.homeTeam.team_id?d.value=we:a.value=we}function pe(we,Ve){Ve===o.game.homeTeam.team_id?l.value=we:h.value=we}async function ne(we){try{return(await(await fetch(`https://ts7thxzaik.execute-api.us-west-2.amazonaws.com/prod/v2/players/games/${we}`,{headers:{Authorization:o.token}})).json()).players||[]}catch(Ve){console.error("Error fetching players:",Ve)}}async function le(we){try{const Ve=await(await fetch(`https://nckawv8v3b.execute-api.us-west-2.amazonaws.com/prod/connections/${we}`,{headers:{Authorization:o.token}})).json();return Ve.data&&Ve.headers?Ve.data.reduce((Ne,Ue)=>(Ne.push(Ue.reduce((Xe,Ze,xe)=>(Xe[Ve.headers[xe]]=Ze,Xe),{})),Ne),[]):[]}catch(Ve){console.error("Error fetching game connections:",Ve)}}async function ie(){try{const we=await ne(o.game.gameId);o.game.homeTeam&&o.game.awayTeam&&(w.value.clear(),w.value.set(o.game.homeTeam.team_id,[]),w.value.set(o.game.awayTeam.team_id,[]),T.value.clear(),T.value.set(o.game.homeTeam.team_id,[]),T.value.set(o.game.awayTeam.team_id,[]),we.forEach(Ve=>{if(Ve.positionName=Wgt.get(Ve.position_id),Ve.team_id===o.game.homeTeam.team_id){const Ne=w.value.get(o.game.homeTeam.team_id);Ne&&(Ve.isSelected=Ve.is_titular,Ne.push(Ve));const Ue=T.value.get(o.game.homeTeam.team_id);if(Ue){const Xe={...Ve};Xe.isSelected=Ve.is_titular,Ue.push(Xe)}}else if(Ve.team_id===o.game.awayTeam.team_id){const Ne=w.value.get(o.game.awayTeam.team_id);Ne&&(Ve.isSelected=Ve.is_titular,Ne.push(Ve));const Ue=T.value.get(o.game.awayTeam.team_id);if(Ue){const Xe={...Ve};Xe.isSelected=Ve.is_titular,Ue.push(Xe)}}}))}catch(we){console.error("Error filling game players:",we)}}async function me(){try{const we=await le(o.game.gameId);we&&we.length>0?A.value=we:A.value=[]}catch(we){console.error("Error filling game passes:",we)}}function ve(we){if(we.isSelected){if(E.value.isSelected=we.isSelected,C.value=!0,JSON.stringify(we.originSections)!==JSON.stringify(E.value.originSections)||JSON.stringify(we.destinationSections)!==JSON.stringify(E.value.destinationSections)||JSON.stringify(we.distanceRange)!==JSON.stringify(E.value.distanceRange)&&g.value){E.value.originSections=[...we.originSections],E.value.destinationSections=[...we.destinationSections],E.value.distanceRange={...we.distanceRange};const Ve=A.value.filter(Ne=>E.value.originSections.includes(Ne.section_origin)&&E.value.destinationSections.includes(Ne.section_destination)&&Ne.distance>=E.value.distanceRange.minValue&&Ne.distance<=E.value.distanceRange.maxValue).reduce((Ne,Ue)=>{const Xe=`${Ue.player_id}-${Ue.receiver_id}`,Ze=Ne.get(Xe);return Ze?Ze.count+=1:Ne.set(Xe,{to:Ue.receiver_id,from:Ue.player_id,count:1}),Ne},new Map);g.value.setConnections(Array.from(Ve.values()))}}else E.value.isSelected=!1,C.value=!1}function ye(we){P.value=we,I.value=we}function ke(we){k.value=we}function Ee(we){m.value=we}function Te(we){L.value=we}function Pe(we,Ve){Ve===o.game.homeTeam.team_id?_.value=we:y.value=we}function Be(we,Ve){Ve===o.game.homeTeam.team_id?x.value=we:u.value=we}function Le(we){n.value=we}function je(we,Ve){Ve===o.game.homeTeam.team_id?i.value=we:f.value=we}function Me(we,Ve){Ve===o.game.homeTeam.team_id?l.value.totalSeconds=we:h.value.totalSeconds=we}function Re(){O.value=!0}function Ie(){O.value=!1}function ge(){g.value&&g.value.clearCustomDistances()}function Ce(we){D.value=we}return(we,Ve)=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createVNode(Zgt,{"is-visible":O.value,onClose:Ie,onDelete:ge},null,8,["is-visible"]),t.createElementVNode("div",{ref_key:"positionsContainer",ref:ee,class:"positions-container"},[t.createVNode(_mt,{"total-seconds":m.value===e.game.homeTeam.team_id?l.value.totalSeconds:h.value.totalSeconds,"total-chains":m.value===e.game.homeTeam.team_id?l.value.totalChains:h.value.totalChains,"total-duration-chains":m.value===e.game.homeTeam.team_id?l.value.totalDurationChains:h.value.totalDurationChains},null,8,["total-seconds","total-chains","total-duration-chains"]),t.createElementVNode("div",Xgt,[t.createElementVNode("div",qgt,[t.createVNode(mmt,{game:e.game,token:e.token,players:U.value,"container-width":$.value,"default-shadows-filters":B.value,"started-categories":t.unref(z),"ended-categories":t.unref(s),onChangeConnections:ve,onChangeDistance:ye,onChangeDistanceCustom:ke,onIsShadowsSelected:Te,onHomeChainsShadowsFiltered:he,onAwayChainsShadowsFiltered:he,onHomeBallZonesShadowsFiltered:Be,onAwayBallZonesShadowsFiltered:Be,onHomeRangeChangeShadows:je,onAwayRangeChangeShadows:je},null,8,["game","token","players","container-width","default-shadows-filters","started-categories","ended-categories"])]),t.createElementVNode("main",Ygt,[t.createElementVNode("div",Jgt,[t.createVNode(j1t,{ref_key:"soccerField",ref:g,"game-id":e.game.gameId,"home-team-id":e.game.homeTeam.team_id,"away-team-id":e.game.awayTeam.team_id,"home-filtered-chains":r.value,"away-filtered-chains":b.value,"home-filtered-chains-shadows":d.value,"away-filtered-chains-shadows":a.value,"home-filtered-ball-zones":_.value,"away-filtered-ball-zones":y.value,"home-filtered-ball-zones-shadows":x.value,"away-filtered-ball-zones-shadows":u.value,"time-from-timeline":n.value,"time-from-timeline-shadows-home":i.value,"time-from-timeline-shadows-away":f.value,"show-shadows":L.value,"players-selected":re.value,"players-selected-shadows":q.value,"players-info":J.value,"is-data-loaded":t.unref(v),"are-connections-visible":E.value.isSelected,"is-distance-visible":P.value,"is-home-team-visible":M.value,"is-away-team-visible":S.value,"custom-distance":k.value,onHomePossessionTotalSeconds:Me,onAwayPossessionTotalSeconds:Me,onChangeCustomDistances:Ce},null,8,["game-id","home-team-id","away-team-id","home-filtered-chains","away-filtered-chains","home-filtered-chains-shadows","away-filtered-chains-shadows","home-filtered-ball-zones","away-filtered-ball-zones","home-filtered-ball-zones-shadows","away-filtered-ball-zones-shadows","time-from-timeline","time-from-timeline-shadows-home","time-from-timeline-shadows-away","show-shadows","players-selected","players-selected-shadows","players-info","is-data-loaded","are-connections-visible","is-distance-visible","is-home-team-visible","is-away-team-visible","custom-distance"]),t.createElementVNode("div",$gt,[t.createVNode(Ggt,{"is-mobile":ce.value,game:e.game,players:H.value,"show-pases":C.value,"show-distancia":I.value,"show-shadows":L.value,"is-delete-visible":V.value,isHomeTeamVisible:M.value,"onUpdate:isHomeTeamVisible":Ve[0]||(Ve[0]=Ne=>M.value=Ne),isAwayTeamVisible:S.value,"onUpdate:isAwayTeamVisible":Ve[1]||(Ve[1]=Ne=>S.value=Ne),onDeleteDistances:Re},null,8,["is-mobile","game","players","show-pases","show-distancia","show-shadows","is-delete-visible","isHomeTeamVisible","isAwayTeamVisible"])])]),t.createElementVNode("div",Kgt,[t.createVNode(fgt,{game:e.game,players:G.value,"started-categories":t.unref(z),"ended-categories":t.unref(s),"default-chains-filters":B.value,"home-team-id":e.game.homeTeam.team_id,"away-team-id":e.game.awayTeam.team_id,"name-home-team":e.game.homeTeam.colloquial_name,"name-away-team":e.game.awayTeam.colloquial_name,"game-id":e.game.gameId,"time-from-timeline":n.value,"is-data-loaded":t.unref(v),isHomeTeamVisible:M.value,"onUpdate:isHomeTeamVisible":Ve[2]||(Ve[2]=Ne=>M.value=Ne),isAwayTeamVisible:S.value,"onUpdate:isAwayTeamVisible":Ve[3]||(Ve[3]=Ne=>S.value=Ne),onHomeChainsFiltered:de,onAwayChainsFiltered:de,onHomeStatsUpdated:pe,onAwayStatsUpdated:pe,onHomeBallZonesFiltered:Pe,onAwayBallZonesFiltered:Pe,onSelectedTeamTab:Ee},null,8,["game","players","started-categories","ended-categories","default-chains-filters","home-team-id","away-team-id","name-home-team","name-away-team","game-id","time-from-timeline","is-data-loaded","isHomeTeamVisible","isAwayTeamVisible"])])]),t.createElementVNode("div",Qgt,[t.createVNode(_V,{"timeline-width":940,"game-id":e.game.gameId,"home-team":e.game.homeTeam.team_id,"away-team":e.game.awayTeam.team_id,token:o.token,onRangeChange:Le},null,8,["game-id","home-team","away-team","token"])])])],512)],64))}},tyt=du(eyt,[["__scopeId","data-v-c28ec97b"]]),ayt=(e,o)=>{const s=e.__vccOpts||e;for(const[z,W]of o)s[z]=W;return s},ryt={__name:"gsc-positioning",props:{game:{type:Object,default:()=>({})}},setup(e){const o=t.ref(0);let s=null;const z=t.ref(null);function W(){s=new ResizeObserver(v=>{for(const g of v)o.value=g.contentRect.width}),s.observe(z.value)}return t.onMounted(()=>{W()}),t.onBeforeUnmount(()=>{s&&s.disconnect()}),(v,g)=>(t.openBlock(),t.createElementBlock("div",{class:"gsc-positioning",ref_key:"positioning",ref:z,style:t.normalizeStyle(o.value<700?"padding: 25px 0":"")},[t.createVNode(t.unref(Yut),{game:e.game},null,8,["game"]),t.createVNode(t.unref(tyt),{game:e.game},null,8,["game"])],4))}},nyt=ayt(ryt,[["__scopeId","data-v-60e35461"]]),QYt="",eJt="",iyt={class:"datagame-container"},oyt=$i({__name:"GSCPositining",props:{game:{type:Object,default:()=>({})}},setup(e){return(o,s)=>(t.openBlock(),t.createElementBlock("div",iyt,[t.createVNode(t.unref(nyt),{game:e.game},null,8,["game"])]))}},[["__scopeId","data-v-9a84d21f"]]);function BV(e,o){return function(){return e.apply(o,arguments)}}const{toString:syt}=Object.prototype,{getPrototypeOf:aS}=Object,{iterator:D5,toStringTag:OV}=Symbol,F5=(e=>o=>{const s=syt.call(o);return e[s]||(e[s]=s.slice(8,-1).toLowerCase())})(Object.create(null)),Rf=e=>(e=e.toLowerCase(),o=>F5(o)===e),R5=e=>o=>typeof o===e,{isArray:c2}=Array,u2=R5("undefined");function rb(e){return e!==null&&!u2(e)&&e.constructor!==null&&!u2(e.constructor)&&gp(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const zV=Rf("ArrayBuffer");function lyt(e){let o;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?o=ArrayBuffer.isView(e):o=e&&e.buffer&&zV(e.buffer),o}const cyt=R5("string"),gp=R5("function"),NV=R5("number"),nb=e=>e!==null&&typeof e=="object",uyt=e=>e===!0||e===!1,V5=e=>{if(F5(e)!=="object")return!1;const o=aS(e);return(o===null||o===Object.prototype||Object.getPrototypeOf(o)===null)&&!(OV in e)&&!(D5 in e)},dyt=e=>{if(!nb(e)||rb(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},hyt=Rf("Date"),pyt=Rf("File"),fyt=e=>!!(e&&typeof e.uri<"u"),myt=e=>e&&typeof e.getParts<"u",gyt=Rf("Blob"),yyt=Rf("FileList"),vyt=e=>nb(e)&&gp(e.pipe);function byt(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}const DV=byt(),FV=typeof DV.FormData<"u"?DV.FormData:void 0,xyt=e=>{let o;return e&&(FV&&e instanceof FV||gp(e.append)&&((o=F5(e))==="formdata"||o==="object"&&gp(e.toString)&&e.toString()==="[object FormData]"))},_yt=Rf("URLSearchParams"),[wyt,kyt,Syt,Tyt]=["ReadableStream","Request","Response","Headers"].map(Rf),Cyt=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function ib(e,o,{allOwnKeys:s=!1}={}){if(e===null||typeof e>"u")return;let z,W;if(typeof e!="object"&&(e=[e]),c2(e))for(z=0,W=e.length;z<W;z++)o.call(null,e[z],z,e);else{if(rb(e))return;const v=s?Object.getOwnPropertyNames(e):Object.keys(e),g=v.length;let r;for(z=0;z<g;z++)r=v[z],o.call(null,e[r],r,e)}}function RV(e,o){if(rb(e))return null;o=o.toLowerCase();const s=Object.keys(e);let z=s.length,W;for(;z-- >0;)if(W=s[z],o===W.toLowerCase())return W;return null}const rg=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,VV=e=>!u2(e)&&e!==rg;function rS(){const{caseless:e,skipUndefined:o}=VV(this)&&this||{},s={},z=(W,v)=>{if(v==="__proto__"||v==="constructor"||v==="prototype")return;const g=e&&RV(s,v)||v;V5(s[g])&&V5(W)?s[g]=rS(s[g],W):V5(W)?s[g]=rS({},W):c2(W)?s[g]=W.slice():(!o||!u2(W))&&(s[g]=W)};for(let W=0,v=arguments.length;W<v;W++)arguments[W]&&ib(arguments[W],z);return s}const Eyt=(e,o,s,{allOwnKeys:z}={})=>(ib(o,(W,v)=>{s&&gp(W)?Object.defineProperty(e,v,{value:BV(W,s),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,v,{value:W,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:z}),e),Ayt=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Myt=(e,o,s,z)=>{e.prototype=Object.create(o.prototype,z),Object.defineProperty(e.prototype,"constructor",{value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{value:o.prototype}),s&&Object.assign(e.prototype,s)},Pyt=(e,o,s,z)=>{let W,v,g;const r={};if(o=o||{},e==null)return o;do{for(W=Object.getOwnPropertyNames(e),v=W.length;v-- >0;)g=W[v],(!z||z(g,e,o))&&!r[g]&&(o[g]=e[g],r[g]=!0);e=s!==!1&&aS(e)}while(e&&(!s||s(e,o))&&e!==Object.prototype);return o},Iyt=(e,o,s)=>{e=String(e),(s===void 0||s>e.length)&&(s=e.length),s-=o.length;const z=e.indexOf(o,s);return z!==-1&&z===s},Lyt=e=>{if(!e)return null;if(c2(e))return e;let o=e.length;if(!NV(o))return null;const s=new Array(o);for(;o-- >0;)s[o]=e[o];return s},Byt=(e=>o=>e&&o instanceof e)(typeof Uint8Array<"u"&&aS(Uint8Array)),Oyt=(e,o)=>{const s=(e&&e[D5]).call(e);let z;for(;(z=s.next())&&!z.done;){const W=z.value;o.call(e,W[0],W[1])}},zyt=(e,o)=>{let s;const z=[];for(;(s=e.exec(o))!==null;)z.push(s);return z},Nyt=Rf("HTMLFormElement"),Dyt=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(o,s,z){return s.toUpperCase()+z}),jV=(({hasOwnProperty:e})=>(o,s)=>e.call(o,s))(Object.prototype),Fyt=Rf("RegExp"),UV=(e,o)=>{const s=Object.getOwnPropertyDescriptors(e),z={};ib(s,(W,v)=>{let g;(g=o(W,v,e))!==!1&&(z[v]=g||W)}),Object.defineProperties(e,z)},Ryt=e=>{UV(e,(o,s)=>{if(gp(e)&&["arguments","caller","callee"].indexOf(s)!==-1)return!1;const z=e[s];if(gp(z)){if(o.enumerable=!1,"writable"in o){o.writable=!1;return}o.set||(o.set=()=>{throw Error("Can not rewrite read-only method '"+s+"'")})}})},Vyt=(e,o)=>{const s={},z=W=>{W.forEach(v=>{s[v]=!0})};return c2(e)?z(e):z(String(e).split(o)),s},jyt=()=>{},Uyt=(e,o)=>e!=null&&Number.isFinite(e=+e)?e:o;function Gyt(e){return!!(e&&gp(e.append)&&e[OV]==="FormData"&&e[D5])}const Hyt=e=>{const o=new Array(10),s=(z,W)=>{if(nb(z)){if(o.indexOf(z)>=0)return;if(rb(z))return z;if(!("toJSON"in z)){o[W]=z;const v=c2(z)?[]:{};return ib(z,(g,r)=>{const b=s(g,W+1);!u2(b)&&(v[r]=b)}),o[W]=void 0,v}}return z};return s(e,0)},Zyt=Rf("AsyncFunction"),Wyt=e=>e&&(nb(e)||gp(e))&&gp(e.then)&&gp(e.catch),GV=((e,o)=>e?setImmediate:o?((s,z)=>(rg.addEventListener("message",({source:W,data:v})=>{W===rg&&v===s&&z.length&&z.shift()()},!1),W=>{z.push(W),rg.postMessage(s,"*")}))(`axios@${Math.random()}`,[]):s=>setTimeout(s))(typeof setImmediate=="function",gp(rg.postMessage)),Xyt=typeof queueMicrotask<"u"?queueMicrotask.bind(rg):typeof process<"u"&&process.nextTick||GV,qyt=e=>e!=null&&gp(e[D5]),Mn={isArray:c2,isArrayBuffer:zV,isBuffer:rb,isFormData:xyt,isArrayBufferView:lyt,isString:cyt,isNumber:NV,isBoolean:uyt,isObject:nb,isPlainObject:V5,isEmptyObject:dyt,isReadableStream:wyt,isRequest:kyt,isResponse:Syt,isHeaders:Tyt,isUndefined:u2,isDate:hyt,isFile:pyt,isReactNativeBlob:fyt,isReactNative:myt,isBlob:gyt,isRegExp:Fyt,isFunction:gp,isStream:vyt,isURLSearchParams:_yt,isTypedArray:Byt,isFileList:yyt,forEach:ib,merge:rS,extend:Eyt,trim:Cyt,stripBOM:Ayt,inherits:Myt,toFlatObject:Pyt,kindOf:F5,kindOfTest:Rf,endsWith:Iyt,toArray:Lyt,forEachEntry:Oyt,matchAll:zyt,isHTMLForm:Nyt,hasOwnProperty:jV,hasOwnProp:jV,reduceDescriptors:UV,freezeMethods:Ryt,toObjectSet:Vyt,toCamelCase:Dyt,noop:jyt,toFiniteNumber:Uyt,findKey:RV,global:rg,isContextDefined:VV,isSpecCompliantForm:Gyt,toJSONObject:Hyt,isAsyncFn:Zyt,isThenable:Wyt,setImmediate:GV,asap:Xyt,isIterable:qyt};let ms=class HH extends Error{static from(o,s,z,W,v,g){const r=new HH(o.message,s||o.code,z,W,v);return r.cause=o,r.name=o.name,o.status!=null&&r.status==null&&(r.status=o.status),g&&Object.assign(r,g),r}constructor(o,s,z,W,v){super(o),Object.defineProperty(this,"message",{value:o,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,s&&(this.code=s),z&&(this.config=z),W&&(this.request=W),v&&(this.response=v,this.status=v.status)}toJSON(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:Mn.toJSONObject(this.config),code:this.code,status:this.status}}};ms.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",ms.ERR_BAD_OPTION="ERR_BAD_OPTION",ms.ECONNABORTED="ECONNABORTED",ms.ETIMEDOUT="ETIMEDOUT",ms.ERR_NETWORK="ERR_NETWORK",ms.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",ms.ERR_DEPRECATED="ERR_DEPRECATED",ms.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",ms.ERR_BAD_REQUEST="ERR_BAD_REQUEST",ms.ERR_CANCELED="ERR_CANCELED",ms.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",ms.ERR_INVALID_URL="ERR_INVALID_URL";const Yyt=null;function nS(e){return Mn.isPlainObject(e)||Mn.isArray(e)}function HV(e){return Mn.endsWith(e,"[]")?e.slice(0,-2):e}function iS(e,o,s){return e?e.concat(o).map(function(z,W){return z=HV(z),!s&&W?"["+z+"]":z}).join(s?".":""):o}function Jyt(e){return Mn.isArray(e)&&!e.some(nS)}const $yt=Mn.toFlatObject(Mn,{},null,function(e){return/^is[A-Z]/.test(e)});function j5(e,o,s){if(!Mn.isObject(e))throw new TypeError("target must be an object");o=o||new FormData,s=Mn.toFlatObject(s,{metaTokens:!0,dots:!1,indexes:!1},!1,function(x,u){return!Mn.isUndefined(u[x])});const z=s.metaTokens,W=s.visitor||d,v=s.dots,g=s.indexes,r=(s.Blob||typeof Blob<"u"&&Blob)&&Mn.isSpecCompliantForm(o);if(!Mn.isFunction(W))throw new TypeError("visitor must be a function");function b(x){if(x===null)return"";if(Mn.isDate(x))return x.toISOString();if(Mn.isBoolean(x))return x.toString();if(!r&&Mn.isBlob(x))throw new ms("Blob is not supported. Use a Buffer instead.");return Mn.isArrayBuffer(x)||Mn.isTypedArray(x)?r&&typeof Blob=="function"?new Blob([x]):Buffer.from(x):x}function d(x,u,n){let i=x;if(Mn.isReactNative(o)&&Mn.isReactNativeBlob(x))return o.append(iS(n,u,v),b(x)),!1;if(x&&!n&&typeof x=="object"){if(Mn.endsWith(u,"{}"))u=z?u:u.slice(0,-2),x=JSON.stringify(x);else if(Mn.isArray(x)&&Jyt(x)||(Mn.isFileList(x)||Mn.endsWith(u,"[]"))&&(i=Mn.toArray(x)))return u=HV(u),i.forEach(function(f,l){!(Mn.isUndefined(f)||f===null)&&o.append(g===!0?iS([u],l,v):g===null?u:u+"[]",b(f))}),!1}return nS(x)?!0:(o.append(iS(n,u,v),b(x)),!1)}const a=[],_=Object.assign($yt,{defaultVisitor:d,convertValue:b,isVisitable:nS});function y(x,u){if(!Mn.isUndefined(x)){if(a.indexOf(x)!==-1)throw Error("Circular reference detected in "+u.join("."));a.push(x),Mn.forEach(x,function(n,i){(!(Mn.isUndefined(n)||n===null)&&W.call(o,n,Mn.isString(i)?i.trim():i,u,_))===!0&&y(n,u?u.concat(i):[i])}),a.pop()}}if(!Mn.isObject(e))throw new TypeError("data must be an object");return y(e),o}function ZV(e){const o={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(s){return o[s]})}function oS(e,o){this._pairs=[],e&&j5(e,this,o)}const WV=oS.prototype;WV.append=function(e,o){this._pairs.push([e,o])},WV.toString=function(e){const o=e?function(s){return e.call(this,s,ZV)}:ZV;return this._pairs.map(function(s){return o(s[0])+"="+o(s[1])},"").join("&")};function Kyt(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function XV(e,o,s){if(!o)return e;const z=s&&s.encode||Kyt,W=Mn.isFunction(s)?{serialize:s}:s,v=W&&W.serialize;let g;if(v?g=v(o,W):g=Mn.isURLSearchParams(o)?o.toString():new oS(o,W).toString(z),g){const r=e.indexOf("#");r!==-1&&(e=e.slice(0,r)),e+=(e.indexOf("?")===-1?"?":"&")+g}return e}class qV{constructor(){this.handlers=[]}use(o,s,z){return this.handlers.push({fulfilled:o,rejected:s,synchronous:z?z.synchronous:!1,runWhen:z?z.runWhen:null}),this.handlers.length-1}eject(o){this.handlers[o]&&(this.handlers[o]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(o){Mn.forEach(this.handlers,function(s){s!==null&&o(s)})}}const sS={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0},Qyt=typeof URLSearchParams<"u"?URLSearchParams:oS,e2t=typeof FormData<"u"?FormData:null,t2t=typeof Blob<"u"?Blob:null,a2t={isBrowser:!0,classes:{URLSearchParams:Qyt,FormData:e2t,Blob:t2t},protocols:["http","https","file","blob","url","data"]},lS=typeof window<"u"&&typeof document<"u",cS=typeof navigator=="object"&&navigator||void 0,r2t=lS&&(!cS||["ReactNative","NativeScript","NS"].indexOf(cS.product)<0),n2t=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",i2t=lS&&window.location.href||"http://localhost",o2t=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:lS,hasStandardBrowserEnv:r2t,hasStandardBrowserWebWorkerEnv:n2t,navigator:cS,origin:i2t},Symbol.toStringTag,{value:"Module"})),kh={...o2t,...a2t};function s2t(e,o){return j5(e,new kh.classes.URLSearchParams,{visitor:function(s,z,W,v){return kh.isNode&&Mn.isBuffer(s)?(this.append(z,s.toString("base64")),!1):v.defaultVisitor.apply(this,arguments)},...o})}function l2t(e){return Mn.matchAll(/\w+|\[(\w*)]/g,e).map(o=>o[0]==="[]"?"":o[1]||o[0])}function c2t(e){const o={},s=Object.keys(e);let z;const W=s.length;let v;for(z=0;z<W;z++)v=s[z],o[v]=e[v];return o}function YV(e){function o(s,z,W,v){let g=s[v++];if(g==="__proto__")return!0;const r=Number.isFinite(+g),b=v>=s.length;return g=!g&&Mn.isArray(W)?W.length:g,b?(Mn.hasOwnProp(W,g)?W[g]=[W[g],z]:W[g]=z,!r):((!W[g]||!Mn.isObject(W[g]))&&(W[g]=[]),o(s,z,W[g],v)&&Mn.isArray(W[g])&&(W[g]=c2t(W[g])),!r)}if(Mn.isFormData(e)&&Mn.isFunction(e.entries)){const s={};return Mn.forEachEntry(e,(z,W)=>{o(l2t(z),W,s,0)}),s}return null}function u2t(e,o,s){if(Mn.isString(e))try{return(o||JSON.parse)(e),Mn.trim(e)}catch(z){if(z.name!=="SyntaxError")throw z}return(s||JSON.stringify)(e)}const ob={transitional:sS,adapter:["xhr","http","fetch"],transformRequest:[function(e,o){const s=o.getContentType()||"",z=s.indexOf("application/json")>-1,W=Mn.isObject(e);if(W&&Mn.isHTMLForm(e)&&(e=new FormData(e)),Mn.isFormData(e))return z?JSON.stringify(YV(e)):e;if(Mn.isArrayBuffer(e)||Mn.isBuffer(e)||Mn.isStream(e)||Mn.isFile(e)||Mn.isBlob(e)||Mn.isReadableStream(e))return e;if(Mn.isArrayBufferView(e))return e.buffer;if(Mn.isURLSearchParams(e))return o.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let v;if(W){if(s.indexOf("application/x-www-form-urlencoded")>-1)return s2t(e,this.formSerializer).toString();if((v=Mn.isFileList(e))||s.indexOf("multipart/form-data")>-1){const g=this.env&&this.env.FormData;return j5(v?{"files[]":e}:e,g&&new g,this.formSerializer)}}return W||z?(o.setContentType("application/json",!1),u2t(e)):e}],transformResponse:[function(e){const o=this.transitional||ob.transitional,s=o&&o.forcedJSONParsing,z=this.responseType==="json";if(Mn.isResponse(e)||Mn.isReadableStream(e))return e;if(e&&Mn.isString(e)&&(s&&!this.responseType||z)){const W=!(o&&o.silentJSONParsing)&&z;try{return JSON.parse(e,this.parseReviver)}catch(v){if(W)throw v.name==="SyntaxError"?ms.from(v,ms.ERR_BAD_RESPONSE,this,null,this.response):v}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:kh.classes.FormData,Blob:kh.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};Mn.forEach(["delete","get","head","post","put","patch"],e=>{ob.headers[e]={}});const d2t=Mn.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),h2t=e=>{const o={};let s,z,W;return e&&e.split(`
4145
4145
  `).forEach(function(v){W=v.indexOf(":"),s=v.substring(0,W).trim().toLowerCase(),z=v.substring(W+1).trim(),!(!s||o[s]&&d2t[s])&&(s==="set-cookie"?o[s]?o[s].push(z):o[s]=[z]:o[s]=o[s]?o[s]+", "+z:z)}),o},JV=Symbol("internals");function sb(e){return e&&String(e).trim().toLowerCase()}function U5(e){return e===!1||e==null?e:Mn.isArray(e)?e.map(U5):String(e)}function p2t(e){const o=Object.create(null),s=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let z;for(;z=s.exec(e);)o[z[1]]=z[2];return o}const f2t=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function uS(e,o,s,z,W){if(Mn.isFunction(z))return z.call(this,o,s);if(W&&(o=s),!!Mn.isString(o)){if(Mn.isString(z))return o.indexOf(z)!==-1;if(Mn.isRegExp(z))return z.test(o)}}function m2t(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(o,s,z)=>s.toUpperCase()+z)}function g2t(e,o){const s=Mn.toCamelCase(" "+o);["get","set","has"].forEach(z=>{Object.defineProperty(e,z+s,{value:function(W,v,g){return this[z].call(this,o,W,v,g)},configurable:!0})})}let yp=class{constructor(e){e&&this.set(e)}set(e,o,s){const z=this;function W(g,r,b){const d=sb(r);if(!d)throw new Error("header name must be a non-empty string");const a=Mn.findKey(z,d);(!a||z[a]===void 0||b===!0||b===void 0&&z[a]!==!1)&&(z[a||r]=U5(g))}const v=(g,r)=>Mn.forEach(g,(b,d)=>W(b,d,r));if(Mn.isPlainObject(e)||e instanceof this.constructor)v(e,o);else if(Mn.isString(e)&&(e=e.trim())&&!f2t(e))v(h2t(e),o);else if(Mn.isObject(e)&&Mn.isIterable(e)){let g={},r,b;for(const d of e){if(!Mn.isArray(d))throw TypeError("Object iterator must return a key-value pair");g[b=d[0]]=(r=g[b])?Mn.isArray(r)?[...r,d[1]]:[r,d[1]]:d[1]}v(g,o)}else e!=null&&W(o,e,s);return this}get(e,o){if(e=sb(e),e){const s=Mn.findKey(this,e);if(s){const z=this[s];if(!o)return z;if(o===!0)return p2t(z);if(Mn.isFunction(o))return o.call(this,z,s);if(Mn.isRegExp(o))return o.exec(z);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,o){if(e=sb(e),e){const s=Mn.findKey(this,e);return!!(s&&this[s]!==void 0&&(!o||uS(this,this[s],s,o)))}return!1}delete(e,o){const s=this;let z=!1;function W(v){if(v=sb(v),v){const g=Mn.findKey(s,v);g&&(!o||uS(s,s[g],g,o))&&(delete s[g],z=!0)}}return Mn.isArray(e)?e.forEach(W):W(e),z}clear(e){const o=Object.keys(this);let s=o.length,z=!1;for(;s--;){const W=o[s];(!e||uS(this,this[W],W,e,!0))&&(delete this[W],z=!0)}return z}normalize(e){const o=this,s={};return Mn.forEach(this,(z,W)=>{const v=Mn.findKey(s,W);if(v){o[v]=U5(z),delete o[W];return}const g=e?m2t(W):String(W).trim();g!==W&&delete o[W],o[g]=U5(z),s[g]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const o=Object.create(null);return Mn.forEach(this,(s,z)=>{s!=null&&s!==!1&&(o[z]=e&&Mn.isArray(s)?s.join(", "):s)}),o}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,o])=>e+": "+o).join(`
4146
4146
  `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...o){const s=new this(e);return o.forEach(z=>s.set(z)),s}static accessor(e){const o=(this[JV]=this[JV]={accessors:{}}).accessors,s=this.prototype;function z(W){const v=sb(W);o[v]||(g2t(s,W),o[v]=!0)}return Mn.isArray(e)?e.forEach(z):z(e),this}};yp.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),Mn.reduceDescriptors(yp.prototype,({value:e},o)=>{let s=o[0].toUpperCase()+o.slice(1);return{get:()=>e,set(z){this[s]=z}}}),Mn.freezeMethods(yp);function dS(e,o){const s=this||ob,z=o||s,W=yp.from(z.headers);let v=z.data;return Mn.forEach(e,function(g){v=g.call(s,v,W.normalize(),o?o.status:void 0)}),W.normalize(),v}function $V(e){return!!(e&&e.__CANCEL__)}let lb=class extends ms{constructor(e,o,s){super(e??"canceled",ms.ERR_CANCELED,o,s),this.name="CanceledError",this.__CANCEL__=!0}};function KV(e,o,s){const z=s.config.validateStatus;!s.status||!z||z(s.status)?e(s):o(new ms("Request failed with status code "+s.status,[ms.ERR_BAD_REQUEST,ms.ERR_BAD_RESPONSE][Math.floor(s.status/100)-4],s.config,s.request,s))}function y2t(e){const o=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return o&&o[1]||""}function v2t(e,o){e=e||10;const s=new Array(e),z=new Array(e);let W=0,v=0,g;return o=o!==void 0?o:1e3,function(r){const b=Date.now(),d=z[v];g||(g=b),s[W]=r,z[W]=b;let a=v,_=0;for(;a!==W;)_+=s[a++],a=a%e;if(W=(W+1)%e,W===v&&(v=(v+1)%e),b-g<o)return;const y=d&&b-d;return y?Math.round(_*1e3/y):void 0}}function b2t(e,o){let s=0,z=1e3/o,W,v;const g=(r,b=Date.now())=>{s=b,W=null,v&&(clearTimeout(v),v=null),e(...r)};return[(...r)=>{const b=Date.now(),d=b-s;d>=z?g(r,b):(W=r,v||(v=setTimeout(()=>{v=null,g(W)},z-d)))},()=>W&&g(W)]}const G5=(e,o,s=3)=>{let z=0;const W=v2t(50,250);return b2t(v=>{const g=v.loaded,r=v.lengthComputable?v.total:void 0,b=g-z,d=W(b),a=g<=r;z=g;const _={loaded:g,total:r,progress:r?g/r:void 0,bytes:b,rate:d||void 0,estimated:d&&r&&a?(r-g)/d:void 0,event:v,lengthComputable:r!=null,[o?"download":"upload"]:!0};e(_)},s)},QV=(e,o)=>{const s=e!=null;return[z=>o[0]({lengthComputable:s,total:e,loaded:z}),o[1]]},ej=e=>(...o)=>Mn.asap(()=>e(...o)),x2t=kh.hasStandardBrowserEnv?((e,o)=>s=>(s=new URL(s,kh.origin),e.protocol===s.protocol&&e.host===s.host&&(o||e.port===s.port)))(new URL(kh.origin),kh.navigator&&/(msie|trident)/i.test(kh.navigator.userAgent)):()=>!0,_2t=kh.hasStandardBrowserEnv?{write(e,o,s,z,W,v,g){if(typeof document>"u")return;const r=[`${e}=${encodeURIComponent(o)}`];Mn.isNumber(s)&&r.push(`expires=${new Date(s).toUTCString()}`),Mn.isString(z)&&r.push(`path=${z}`),Mn.isString(W)&&r.push(`domain=${W}`),v===!0&&r.push("secure"),Mn.isString(g)&&r.push(`SameSite=${g}`),document.cookie=r.join("; ")},read(e){if(typeof document>"u")return null;const o=document.cookie.match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return o?decodeURIComponent(o[1]):null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function w2t(e){return typeof e!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function k2t(e,o){return o?e.replace(/\/?\/$/,"")+"/"+o.replace(/^\/+/,""):e}function tj(e,o,s){let z=!w2t(o);return e&&(z||s==!1)?k2t(e,o):o}const aj=e=>e instanceof yp?{...e}:e;function ng(e,o){o=o||{};const s={};function z(d,a,_,y){return Mn.isPlainObject(d)&&Mn.isPlainObject(a)?Mn.merge.call({caseless:y},d,a):Mn.isPlainObject(a)?Mn.merge({},a):Mn.isArray(a)?a.slice():a}function W(d,a,_,y){if(Mn.isUndefined(a)){if(!Mn.isUndefined(d))return z(void 0,d,_,y)}else return z(d,a,_,y)}function v(d,a){if(!Mn.isUndefined(a))return z(void 0,a)}function g(d,a){if(Mn.isUndefined(a)){if(!Mn.isUndefined(d))return z(void 0,d)}else return z(void 0,a)}function r(d,a,_){if(_ in o)return z(d,a);if(_ in e)return z(void 0,d)}const b={url:v,method:v,data:v,baseURL:g,transformRequest:g,transformResponse:g,paramsSerializer:g,timeout:g,timeoutMessage:g,withCredentials:g,withXSRFToken:g,adapter:g,responseType:g,xsrfCookieName:g,xsrfHeaderName:g,onUploadProgress:g,onDownloadProgress:g,decompress:g,maxContentLength:g,maxBodyLength:g,beforeRedirect:g,transport:g,httpAgent:g,httpsAgent:g,cancelToken:g,socketPath:g,responseEncoding:g,validateStatus:r,headers:(d,a,_)=>W(aj(d),aj(a),_,!0)};return Mn.forEach(Object.keys({...e,...o}),function(d){if(d==="__proto__"||d==="constructor"||d==="prototype")return;const a=Mn.hasOwnProp(b,d)?b[d]:W,_=a(e[d],o[d],d);Mn.isUndefined(_)&&a!==r||(s[d]=_)}),s}const rj=e=>{const o=ng({},e);let{data:s,withXSRFToken:z,xsrfHeaderName:W,xsrfCookieName:v,headers:g,auth:r}=o;if(o.headers=g=yp.from(g),o.url=XV(tj(o.baseURL,o.url,o.allowAbsoluteUrls),e.params,e.paramsSerializer),r&&g.set("Authorization","Basic "+btoa((r.username||"")+":"+(r.password?unescape(encodeURIComponent(r.password)):""))),Mn.isFormData(s)){if(kh.hasStandardBrowserEnv||kh.hasStandardBrowserWebWorkerEnv)g.setContentType(void 0);else if(Mn.isFunction(s.getHeaders)){const b=s.getHeaders(),d=["content-type","content-length"];Object.entries(b).forEach(([a,_])=>{d.includes(a.toLowerCase())&&g.set(a,_)})}}if(kh.hasStandardBrowserEnv&&(z&&Mn.isFunction(z)&&(z=z(o)),z||z!==!1&&x2t(o.url))){const b=W&&v&&_2t.read(v);b&&g.set(W,b)}return o},S2t=typeof XMLHttpRequest<"u",T2t=S2t&&function(e){return new Promise(function(o,s){const z=rj(e);let W=z.data;const v=yp.from(z.headers).normalize();let{responseType:g,onUploadProgress:r,onDownloadProgress:b}=z,d,a,_,y,x;function u(){y&&y(),x&&x(),z.cancelToken&&z.cancelToken.unsubscribe(d),z.signal&&z.signal.removeEventListener("abort",d)}let n=new XMLHttpRequest;n.open(z.method.toUpperCase(),z.url,!0),n.timeout=z.timeout;function i(){if(!n)return;const l=yp.from("getAllResponseHeaders"in n&&n.getAllResponseHeaders()),h={data:!g||g==="text"||g==="json"?n.responseText:n.response,status:n.status,statusText:n.statusText,headers:l,config:e,request:n};KV(function(m){o(m),u()},function(m){s(m),u()},h),n=null}"onloadend"in n?n.onloadend=i:n.onreadystatechange=function(){!n||n.readyState!==4||n.status===0&&!(n.responseURL&&n.responseURL.indexOf("file:")===0)||setTimeout(i)},n.onabort=function(){n&&(s(new ms("Request aborted",ms.ECONNABORTED,e,n)),n=null)},n.onerror=function(l){const h=l&&l.message?l.message:"Network Error",m=new ms(h,ms.ERR_NETWORK,e,n);m.event=l||null,s(m),n=null},n.ontimeout=function(){let l=z.timeout?"timeout of "+z.timeout+"ms exceeded":"timeout exceeded";const h=z.transitional||sS;z.timeoutErrorMessage&&(l=z.timeoutErrorMessage),s(new ms(l,h.clarifyTimeoutError?ms.ETIMEDOUT:ms.ECONNABORTED,e,n)),n=null},W===void 0&&v.setContentType(null),"setRequestHeader"in n&&Mn.forEach(v.toJSON(),function(l,h){n.setRequestHeader(h,l)}),Mn.isUndefined(z.withCredentials)||(n.withCredentials=!!z.withCredentials),g&&g!=="json"&&(n.responseType=z.responseType),b&&([_,x]=G5(b,!0),n.addEventListener("progress",_)),r&&n.upload&&([a,y]=G5(r),n.upload.addEventListener("progress",a),n.upload.addEventListener("loadend",y)),(z.cancelToken||z.signal)&&(d=l=>{n&&(s(!l||l.type?new lb(null,e,n):l),n.abort(),n=null)},z.cancelToken&&z.cancelToken.subscribe(d),z.signal&&(z.signal.aborted?d():z.signal.addEventListener("abort",d)));const f=y2t(z.url);if(f&&kh.protocols.indexOf(f)===-1){s(new ms("Unsupported protocol "+f+":",ms.ERR_BAD_REQUEST,e));return}n.send(W||null)})},C2t=(e,o)=>{const{length:s}=e=e?e.filter(Boolean):[];if(o||s){let z=new AbortController,W;const v=function(d){if(!W){W=!0,r();const a=d instanceof Error?d:this.reason;z.abort(a instanceof ms?a:new lb(a instanceof Error?a.message:a))}};let g=o&&setTimeout(()=>{g=null,v(new ms(`timeout of ${o}ms exceeded`,ms.ETIMEDOUT))},o);const r=()=>{e&&(g&&clearTimeout(g),g=null,e.forEach(d=>{d.unsubscribe?d.unsubscribe(v):d.removeEventListener("abort",v)}),e=null)};e.forEach(d=>d.addEventListener("abort",v));const{signal:b}=z;return b.unsubscribe=()=>Mn.asap(r),b}},E2t=function*(e,o){let s=e.byteLength;if(s<o){yield e;return}let z=0,W;for(;z<s;)W=z+o,yield e.slice(z,W),z=W},A2t=async function*(e,o){for await(const s of M2t(e))yield*E2t(s,o)},M2t=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const o=e.getReader();try{for(;;){const{done:s,value:z}=await o.read();if(s)break;yield z}}finally{await o.cancel()}},nj=(e,o,s,z)=>{const W=A2t(e,o);let v=0,g,r=b=>{g||(g=!0,z&&z(b))};return new ReadableStream({async pull(b){try{const{done:d,value:a}=await W.next();if(d){r(),b.close();return}let _=a.byteLength;if(s){let y=v+=_;s(y)}b.enqueue(new Uint8Array(a))}catch(d){throw r(d),d}},cancel(b){return r(b),W.return()}},{highWaterMark:2})},ij=64*1024,{isFunction:H5}=Mn,P2t=(({Request:e,Response:o})=>({Request:e,Response:o}))(Mn.global),{ReadableStream:oj,TextEncoder:sj}=Mn.global,lj=(e,...o)=>{try{return!!e(...o)}catch{return!1}},I2t=e=>{e=Mn.merge.call({skipUndefined:!0},P2t,e);const{fetch:o,Request:s,Response:z}=e,W=o?H5(o):typeof fetch=="function",v=H5(s),g=H5(z);if(!W)return!1;const r=W&&H5(oj),b=W&&(typeof sj=="function"?(u=>n=>u.encode(n))(new sj):async u=>new Uint8Array(await new s(u).arrayBuffer())),d=v&&r&&lj(()=>{let u=!1;const n=new s(kh.origin,{body:new oj,method:"POST",get duplex(){return u=!0,"half"}}).headers.has("Content-Type");return u&&!n}),a=g&&r&&lj(()=>Mn.isReadableStream(new z("").body)),_={stream:a&&(u=>u.body)};W&&["text","arrayBuffer","blob","formData","stream"].forEach(u=>{!_[u]&&(_[u]=(n,i)=>{let f=n&&n[u];if(f)return f.call(n);throw new ms(`Response type '${u}' is not supported`,ms.ERR_NOT_SUPPORT,i)})});const y=async u=>{if(u==null)return 0;if(Mn.isBlob(u))return u.size;if(Mn.isSpecCompliantForm(u))return(await new s(kh.origin,{method:"POST",body:u}).arrayBuffer()).byteLength;if(Mn.isArrayBufferView(u)||Mn.isArrayBuffer(u))return u.byteLength;if(Mn.isURLSearchParams(u)&&(u=u+""),Mn.isString(u))return(await b(u)).byteLength},x=async(u,n)=>Mn.toFiniteNumber(u.getContentLength())??y(n);return async u=>{let{url:n,method:i,data:f,signal:l,cancelToken:h,timeout:m,onDownloadProgress:w,onUploadProgress:T,responseType:A,headers:C,withCredentials:I="same-origin",fetchOptions:L}=rj(u),E=o||fetch;A=A?(A+"").toLowerCase():"text";let P=C2t([l,h&&h.toAbortSignal()],m),M=null;const S=P&&P.unsubscribe&&(()=>{P.unsubscribe()});let B;try{if(T&&d&&i!=="get"&&i!=="head"&&(B=await x(C,f))!==0){let H=new s(n,{method:"POST",body:f,duplex:"half"}),U;if(Mn.isFormData(f)&&(U=H.headers.get("content-type"))&&C.setContentType(U),H.body){const[J,re]=QV(B,G5(ej(T)));f=nj(H.body,ij,J,re)}}Mn.isString(I)||(I=I?"include":"omit");const k=v&&"credentials"in s.prototype,O={...L,signal:P,method:i.toUpperCase(),headers:C.normalize().toJSON(),body:f,duplex:"half",credentials:k?I:void 0};M=v&&new s(n,O);let D=await(v?E(M,L):E(n,O));const V=a&&(A==="stream"||A==="response");if(a&&(w||V&&S)){const H={};["status","statusText","headers"].forEach(q=>{H[q]=D[q]});const U=Mn.toFiniteNumber(D.headers.get("content-length")),[J,re]=w&&QV(U,G5(ej(w),!0))||[];D=new z(nj(D.body,ij,J,()=>{re&&re(),S&&S()}),H)}A=A||"text";let G=await _[Mn.findKey(_,A)||"text"](D,u);return!V&&S&&S(),await new Promise((H,U)=>{KV(H,U,{data:G,headers:yp.from(D.headers),status:D.status,statusText:D.statusText,config:u,request:M})})}catch(k){throw S&&S(),k&&k.name==="TypeError"&&/Load failed|fetch/i.test(k.message)?Object.assign(new ms("Network Error",ms.ERR_NETWORK,u,M,k&&k.response),{cause:k.cause||k}):ms.from(k,k&&k.code,u,M,k&&k.response)}}},L2t=new Map,cj=e=>{let o=e&&e.env||{};const{fetch:s,Request:z,Response:W}=o,v=[z,W,s];let g=v.length,r=g,b,d,a=L2t;for(;r--;)b=v[r],d=a.get(b),d===void 0&&a.set(b,d=r?new Map:I2t(o)),a=d;return d};cj();const hS={http:Yyt,xhr:T2t,fetch:{get:cj}};Mn.forEach(hS,(e,o)=>{if(e){try{Object.defineProperty(e,"name",{value:o})}catch{}Object.defineProperty(e,"adapterName",{value:o})}});const uj=e=>`- ${e}`,B2t=e=>Mn.isFunction(e)||e===null||e===!1;function O2t(e,o){e=Mn.isArray(e)?e:[e];const{length:s}=e;let z,W;const v={};for(let g=0;g<s;g++){z=e[g];let r;if(W=z,!B2t(z)&&(W=hS[(r=String(z)).toLowerCase()],W===void 0))throw new ms(`Unknown adapter '${r}'`);if(W&&(Mn.isFunction(W)||(W=W.get(o))))break;v[r||"#"+g]=W}if(!W){const g=Object.entries(v).map(([b,d])=>`adapter ${b} `+(d===!1?"is not supported by the environment":"is not available in the build"));let r=s?g.length>1?`since :
4147
4147
  `+g.map(uj).join(`
@@ -8189,4 +8189,4 @@ uniform ${De} ${He} u_${rt};
8189
8189
  * vuex v4.0.2
8190
8190
  * (c) 2021 Evan You
8191
8191
  * @license MIT
8192
- */var tH="store";function Kzt(e){return e===void 0&&(e=null),t.inject(e!==null?e:tH)}function yg(e,o){Object.keys(e).forEach(function(s){return o(e[s],s)})}function aH(e){return e!==null&&typeof e=="object"}function Qzt(e){return e&&typeof e.then=="function"}function Zf(e,o){if(!e)throw new Error("[vuex] "+o)}function eNt(e,o){return function(){return e(o)}}function rH(e,o,s){return o.indexOf(e)<0&&(s&&s.prepend?o.unshift(e):o.push(e)),function(){var z=o.indexOf(e);z>-1&&o.splice(z,1)}}function nH(e,o){e._actions=Object.create(null),e._mutations=Object.create(null),e._wrappedGetters=Object.create(null),e._modulesNamespaceMap=Object.create(null);var s=e.state;z4(e,s,[],e._modules.root,!0),xT(e,s,o)}function xT(e,o,s){var z=e._state;e.getters={},e._makeLocalGettersCache=Object.create(null);var W=e._wrappedGetters,v={};yg(W,function(g,r){v[r]=eNt(g,e),Object.defineProperty(e.getters,r,{get:function(){return v[r]()},enumerable:!0})}),e._state=t.reactive({data:o}),e.strict&&iNt(e),z&&s&&e._withCommit(function(){z.data=null})}function z4(e,o,s,z,W){var v=!s.length,g=e._modules.getNamespace(s);if(z.namespaced&&(e._modulesNamespaceMap[g]&&process.env.NODE_ENV!=="production"&&console.error("[vuex] duplicate namespace "+g+" for the namespaced module "+s.join("/")),e._modulesNamespaceMap[g]=z),!v&&!W){var r=_T(o,s.slice(0,-1)),b=s[s.length-1];e._withCommit(function(){process.env.NODE_ENV!=="production"&&b in r&&console.warn('[vuex] state field "'+b+'" was overridden by a module with the same name at "'+s.join(".")+'"'),r[b]=z.state})}var d=z.context=tNt(e,g,s);z.forEachMutation(function(a,_){var y=g+_;aNt(e,y,a,d)}),z.forEachAction(function(a,_){var y=a.root?_:g+_,x=a.handler||a;rNt(e,y,x,d)}),z.forEachGetter(function(a,_){var y=g+_;nNt(e,y,a,d)}),z.forEachChild(function(a,_){z4(e,o,s.concat(_),a,W)})}function tNt(e,o,s){var z=o==="",W={dispatch:z?e.dispatch:function(v,g,r){var b=N4(v,g,r),d=b.payload,a=b.options,_=b.type;if((!a||!a.root)&&(_=o+_,process.env.NODE_ENV!=="production"&&!e._actions[_])){console.error("[vuex] unknown local action type: "+b.type+", global type: "+_);return}return e.dispatch(_,d)},commit:z?e.commit:function(v,g,r){var b=N4(v,g,r),d=b.payload,a=b.options,_=b.type;if((!a||!a.root)&&(_=o+_,process.env.NODE_ENV!=="production"&&!e._mutations[_])){console.error("[vuex] unknown local mutation type: "+b.type+", global type: "+_);return}e.commit(_,d,a)}};return Object.defineProperties(W,{getters:{get:z?function(){return e.getters}:function(){return iH(e,o)}},state:{get:function(){return _T(e.state,s)}}}),W}function iH(e,o){if(!e._makeLocalGettersCache[o]){var s={},z=o.length;Object.keys(e.getters).forEach(function(W){if(W.slice(0,z)===o){var v=W.slice(z);Object.defineProperty(s,v,{get:function(){return e.getters[W]},enumerable:!0})}}),e._makeLocalGettersCache[o]=s}return e._makeLocalGettersCache[o]}function aNt(e,o,s,z){var W=e._mutations[o]||(e._mutations[o]=[]);W.push(function(v){s.call(e,z.state,v)})}function rNt(e,o,s,z){var W=e._actions[o]||(e._actions[o]=[]);W.push(function(v){var g=s.call(e,{dispatch:z.dispatch,commit:z.commit,getters:z.getters,state:z.state,rootGetters:e.getters,rootState:e.state},v);return Qzt(g)||(g=Promise.resolve(g)),e._devtoolHook?g.catch(function(r){throw e._devtoolHook.emit("vuex:error",r),r}):g})}function nNt(e,o,s,z){if(e._wrappedGetters[o]){process.env.NODE_ENV!=="production"&&console.error("[vuex] duplicate getter key: "+o);return}e._wrappedGetters[o]=function(W){return s(z.state,z.getters,W.state,W.getters)}}function iNt(e){t.watch(function(){return e._state.data},function(){process.env.NODE_ENV!=="production"&&Zf(e._committing,"do not mutate vuex store state outside mutation handlers.")},{deep:!0,flush:"sync"})}function _T(e,o){return o.reduce(function(s,z){return s[z]},e)}function N4(e,o,s){return aH(e)&&e.type&&(s=o,o=e,e=e.type),process.env.NODE_ENV!=="production"&&Zf(typeof e=="string","expects string as the type, but found "+typeof e+"."),{type:e,payload:o,options:s}}var oNt="vuex bindings",oH="vuex:mutations",wT="vuex:actions",_2="vuex",sNt=0;function lNt(e,o){$zt({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:[oNt]},function(s){s.addTimelineLayer({id:oH,label:"Vuex Mutations",color:sH}),s.addTimelineLayer({id:wT,label:"Vuex Actions",color:sH}),s.addInspector({id:_2,label:"Vuex",icon:"storage",treeFilterPlaceholder:"Filter stores..."}),s.on.getInspectorTree(function(z){if(z.app===e&&z.inspectorId===_2)if(z.filter){var W=[];dH(W,o._modules.root,z.filter,""),z.rootNodes=W}else z.rootNodes=[uH(o._modules.root,"")]}),s.on.getInspectorState(function(z){if(z.app===e&&z.inspectorId===_2){var W=z.nodeId;iH(o,W),z.state=dNt(pNt(o._modules,W),W==="root"?o.getters:o._makeLocalGettersCache,W)}}),s.on.editInspectorState(function(z){if(z.app===e&&z.inspectorId===_2){var W=z.nodeId,v=z.path;W!=="root"&&(v=W.split("/").filter(Boolean).concat(v)),o._withCommit(function(){z.set(o._state.data,v,z.state.value)})}}),o.subscribe(function(z,W){var v={};z.payload&&(v.payload=z.payload),v.state=W,s.notifyComponentUpdate(),s.sendInspectorTree(_2),s.sendInspectorState(_2),s.addTimelineEvent({layerId:oH,event:{time:Date.now(),title:z.type,data:v}})}),o.subscribeAction({before:function(z,W){var v={};z.payload&&(v.payload=z.payload),z._id=sNt++,z._time=Date.now(),v.state=W,s.addTimelineEvent({layerId:wT,event:{time:z._time,title:z.type,groupId:z._id,subtitle:"start",data:v}})},after:function(z,W){var v={},g=Date.now()-z._time;v.duration={_custom:{type:"duration",display:g+"ms",tooltip:"Action duration",value:g}},z.payload&&(v.payload=z.payload),v.state=W,s.addTimelineEvent({layerId:wT,event:{time:Date.now(),title:z.type,groupId:z._id,subtitle:"end",data:v}})}})})}var sH=8702998,cNt=6710886,uNt=16777215,lH={label:"namespaced",textColor:uNt,backgroundColor:cNt};function cH(e){return e&&e!=="root"?e.split("/").slice(-2,-1)[0]:"Root"}function uH(e,o){return{id:o||"root",label:cH(o),tags:e.namespaced?[lH]:[],children:Object.keys(e._children).map(function(s){return uH(e._children[s],o+s+"/")})}}function dH(e,o,s,z){z.includes(s)&&e.push({id:z||"root",label:z.endsWith("/")?z.slice(0,z.length-1):z||"Root",tags:o.namespaced?[lH]:[]}),Object.keys(o._children).forEach(function(W){dH(e,o._children[W],s,z+W+"/")})}function dNt(e,o,s){o=s==="root"?o:o[s];var z=Object.keys(o),W={state:Object.keys(e.state).map(function(g){return{key:g,editable:!0,value:e.state[g]}})};if(z.length){var v=hNt(o);W.getters=Object.keys(v).map(function(g){return{key:g.endsWith("/")?cH(g):g,editable:!1,value:kT(function(){return v[g]})}})}return W}function hNt(e){var o={};return Object.keys(e).forEach(function(s){var z=s.split("/");if(z.length>1){var W=o,v=z.pop();z.forEach(function(g){W[g]||(W[g]={_custom:{value:{},display:g,tooltip:"Module",abstract:!0}}),W=W[g]._custom.value}),W[v]=kT(function(){return e[s]})}else o[s]=kT(function(){return e[s]})}),o}function pNt(e,o){var s=o.split("/").filter(function(z){return z});return s.reduce(function(z,W,v){var g=z[W];if(!g)throw new Error('Missing module "'+W+'" for path "'+o+'".');return v===s.length-1?g:g._children},o==="root"?e:e.root._children)}function kT(e){try{return e()}catch(o){return o}}var Wf=function(e,o){this.runtime=o,this._children=Object.create(null),this._rawModule=e;var s=e.state;this.state=(typeof s=="function"?s():s)||{}},hH={namespaced:{configurable:!0}};hH.namespaced.get=function(){return!!this._rawModule.namespaced},Wf.prototype.addChild=function(e,o){this._children[e]=o},Wf.prototype.removeChild=function(e){delete this._children[e]},Wf.prototype.getChild=function(e){return this._children[e]},Wf.prototype.hasChild=function(e){return e in this._children},Wf.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)},Wf.prototype.forEachChild=function(e){yg(this._children,e)},Wf.prototype.forEachGetter=function(e){this._rawModule.getters&&yg(this._rawModule.getters,e)},Wf.prototype.forEachAction=function(e){this._rawModule.actions&&yg(this._rawModule.actions,e)},Wf.prototype.forEachMutation=function(e){this._rawModule.mutations&&yg(this._rawModule.mutations,e)},Object.defineProperties(Wf.prototype,hH);var vg=function(e){this.register([],e,!1)};vg.prototype.get=function(e){return e.reduce(function(o,s){return o.getChild(s)},this.root)},vg.prototype.getNamespace=function(e){var o=this.root;return e.reduce(function(s,z){return o=o.getChild(z),s+(o.namespaced?z+"/":"")},"")},vg.prototype.update=function(e){pH([],this.root,e)},vg.prototype.register=function(e,o,s){var z=this;s===void 0&&(s=!0),process.env.NODE_ENV!=="production"&&gH(e,o);var W=new Wf(o,s);if(e.length===0)this.root=W;else{var v=this.get(e.slice(0,-1));v.addChild(e[e.length-1],W)}o.modules&&yg(o.modules,function(g,r){z.register(e.concat(r),g,s)})},vg.prototype.unregister=function(e){var o=this.get(e.slice(0,-1)),s=e[e.length-1],z=o.getChild(s);if(!z){process.env.NODE_ENV!=="production"&&console.warn("[vuex] trying to unregister module '"+s+"', which is not registered");return}z.runtime&&o.removeChild(s)},vg.prototype.isRegistered=function(e){var o=this.get(e.slice(0,-1)),s=e[e.length-1];return o?o.hasChild(s):!1};function pH(e,o,s){if(process.env.NODE_ENV!=="production"&&gH(e,s),o.update(s),s.modules)for(var z in s.modules){if(!o.getChild(z)){process.env.NODE_ENV!=="production"&&console.warn("[vuex] trying to add a new module '"+z+"' on hot reloading, manual reload is needed");return}pH(e.concat(z),o.getChild(z),s.modules[z])}}var fH={assert:function(e){return typeof e=="function"},expected:"function"},fNt={assert:function(e){return typeof e=="function"||typeof e=="object"&&typeof e.handler=="function"},expected:'function or object with "handler" function'},mH={getters:fH,mutations:fH,actions:fNt};function gH(e,o){Object.keys(mH).forEach(function(s){if(o[s]){var z=mH[s];yg(o[s],function(W,v){Zf(z.assert(W),mNt(e,s,v,W,z.expected))})}})}function mNt(e,o,s,z,W){var v=o+" should be "+W+' but "'+o+"."+s+'"';return e.length>0&&(v+=' in module "'+e.join(".")+'"'),v+=" is "+JSON.stringify(z)+".",v}var Ap=function e(o){var s=this;o===void 0&&(o={}),process.env.NODE_ENV!=="production"&&(Zf(typeof Promise<"u","vuex requires a Promise polyfill in this browser."),Zf(this instanceof e,"store must be called with the new operator."));var z=o.plugins;z===void 0&&(z=[]);var W=o.strict;W===void 0&&(W=!1);var v=o.devtools;this._committing=!1,this._actions=Object.create(null),this._actionSubscribers=[],this._mutations=Object.create(null),this._wrappedGetters=Object.create(null),this._modules=new vg(o),this._modulesNamespaceMap=Object.create(null),this._subscribers=[],this._makeLocalGettersCache=Object.create(null),this._devtools=v;var g=this,r=this,b=r.dispatch,d=r.commit;this.dispatch=function(_,y){return b.call(g,_,y)},this.commit=function(_,y,x){return d.call(g,_,y,x)},this.strict=W;var a=this._modules.root.state;z4(this,a,[],this._modules.root),xT(this,a),z.forEach(function(_){return _(s)})},ST={state:{configurable:!0}};Ap.prototype.install=function(e,o){e.provide(o||tH,this),e.config.globalProperties.$store=this;var s=this._devtools!==void 0?this._devtools:process.env.NODE_ENV!=="production"||!1;s&&lNt(e,this)},ST.state.get=function(){return this._state.data},ST.state.set=function(e){process.env.NODE_ENV!=="production"&&Zf(!1,"use store.replaceState() to explicit replace store state.")},Ap.prototype.commit=function(e,o,s){var z=this,W=N4(e,o,s),v=W.type,g=W.payload,r=W.options,b={type:v,payload:g},d=this._mutations[v];if(!d){process.env.NODE_ENV!=="production"&&console.error("[vuex] unknown mutation type: "+v);return}this._withCommit(function(){d.forEach(function(a){a(g)})}),this._subscribers.slice().forEach(function(a){return a(b,z.state)}),process.env.NODE_ENV!=="production"&&r&&r.silent&&console.warn("[vuex] mutation type: "+v+". Silent option has been removed. Use the filter functionality in the vue-devtools")},Ap.prototype.dispatch=function(e,o){var s=this,z=N4(e,o),W=z.type,v=z.payload,g={type:W,payload:v},r=this._actions[W];if(!r){process.env.NODE_ENV!=="production"&&console.error("[vuex] unknown action type: "+W);return}try{this._actionSubscribers.slice().filter(function(d){return d.before}).forEach(function(d){return d.before(g,s.state)})}catch(d){process.env.NODE_ENV!=="production"&&(console.warn("[vuex] error in before action subscribers: "),console.error(d))}var b=r.length>1?Promise.all(r.map(function(d){return d(v)})):r[0](v);return new Promise(function(d,a){b.then(function(_){try{s._actionSubscribers.filter(function(y){return y.after}).forEach(function(y){return y.after(g,s.state)})}catch(y){process.env.NODE_ENV!=="production"&&(console.warn("[vuex] error in after action subscribers: "),console.error(y))}d(_)},function(_){try{s._actionSubscribers.filter(function(y){return y.error}).forEach(function(y){return y.error(g,s.state,_)})}catch(y){process.env.NODE_ENV!=="production"&&(console.warn("[vuex] error in error action subscribers: "),console.error(y))}a(_)})})},Ap.prototype.subscribe=function(e,o){return rH(e,this._subscribers,o)},Ap.prototype.subscribeAction=function(e,o){var s=typeof e=="function"?{before:e}:e;return rH(s,this._actionSubscribers,o)},Ap.prototype.watch=function(e,o,s){var z=this;return process.env.NODE_ENV!=="production"&&Zf(typeof e=="function","store.watch only accepts a function."),t.watch(function(){return e(z.state,z.getters)},o,Object.assign({},s))},Ap.prototype.replaceState=function(e){var o=this;this._withCommit(function(){o._state.data=e})},Ap.prototype.registerModule=function(e,o,s){s===void 0&&(s={}),typeof e=="string"&&(e=[e]),process.env.NODE_ENV!=="production"&&(Zf(Array.isArray(e),"module path must be a string or an Array."),Zf(e.length>0,"cannot register the root module by using registerModule.")),this._modules.register(e,o),z4(this,this.state,e,this._modules.get(e),s.preserveState),xT(this,this.state)},Ap.prototype.unregisterModule=function(e){var o=this;typeof e=="string"&&(e=[e]),process.env.NODE_ENV!=="production"&&Zf(Array.isArray(e),"module path must be a string or an Array."),this._modules.unregister(e),this._withCommit(function(){var s=_T(o.state,e.slice(0,-1));delete s[e[e.length-1]]}),nH(this)},Ap.prototype.hasModule=function(e){return typeof e=="string"&&(e=[e]),process.env.NODE_ENV!=="production"&&Zf(Array.isArray(e),"module path must be a string or an Array."),this._modules.isRegistered(e)},Ap.prototype.hotUpdate=function(e){this._modules.update(e),nH(this,!0)},Ap.prototype._withCommit=function(e){var o=this._committing;this._committing=!0,e(),this._committing=o},Object.defineProperties(Ap.prototype,ST);var gNt=vNt(function(e,o){var s={};return process.env.NODE_ENV!=="production"&&!yH(o)&&console.error("[vuex] mapMutations: mapper parameter must be either an Array or an Object"),yNt(o).forEach(function(z){var W=z.key,v=z.val;s[W]=function(){for(var g=[],r=arguments.length;r--;)g[r]=arguments[r];var b=this.$store.commit;if(e){var d=bNt(this.$store,"mapMutations",e);if(!d)return;b=d.context.commit}return typeof v=="function"?v.apply(this,[b].concat(g)):b.apply(this.$store,[v].concat(g))}}),s});function yNt(e){return yH(e)?Array.isArray(e)?e.map(function(o){return{key:o,val:o}}):Object.keys(e).map(function(o){return{key:o,val:e[o]}}):[]}function yH(e){return Array.isArray(e)||aH(e)}function vNt(e){return function(o,s){return typeof o!="string"?(s=o,o=""):o.charAt(o.length-1)!=="/"&&(o+="/"),e(o,s)}}function bNt(e,o,s){var z=e._modulesNamespaceMap[s];return process.env.NODE_ENV!=="production"&&!z&&console.error("[vuex] module namespace not found in "+o+"(): "+s),z}const xNt={name:"tooltip",props:{data:{type:Object,required:!0}},computed:{showTooltip(){return{visible:this.data.visible}}},methods:{tooltipClick:function(e){},closeClick:function(e){this.data.link="",this.data.visible=!1}}};function _Nt(e,o,s,z,W,v){return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["back-tooltip",v.showTooltip])},[t.createElementVNode("div",{class:t.normalizeClass(["box-tooltip",v.showTooltip]),onClick:o[1]||(o[1]=(...g)=>v.tooltipClick&&v.tooltipClick(...g))},[t.createElementVNode("span",{class:"box-tooltip-close",onClick:o[0]||(o[0]=(...g)=>v.closeClick&&v.closeClick(...g))},"×"),t.renderSlot(e.$slots,"default",{},void 0,!0)],2)],2)}const wNt=vb(xNt,[["render",_Nt],["__scopeId","data-v-0336fa9c"]]),kNt=/^https:\/\/[a-z0-9]+\.execute-api\.[a-z0-9-]+\.amazonaws\.com\/(prod|qa\d*)\//,SNt=/^https:\/\/golstats-microservices\.s3[.-]us-west-2\.amazonaws\.com\//,TNt="https://apis.golstats.com",CNt="https://dev-apis.golstats.com";function ENt(e,o,s=!1){if(!o||o===1)return e;const z=s?CNt:TNt,W=e.match(kNt);if(W){const g=e.replace(W[0],"");return`${z}/${o}/${g}`}const v=e.match(SNt);if(v){const g=e.replace(v[0],"");return`${z}/${o}/${g}`}return e}const ANt=1e3,vH=ANt*60,TT=vH*60,bH=TT*24,MNt={data(){return{timeLeft:"",currentTime:new Date().valueOf(),interval:null,gameDateTime:new Date,now:new Date}},computed:{isToday(){return`${this.now.getFullYear()}.${this.now.getMonth()}.${this.now.getDate()}`==`${this.gameDateTime.getFullYear()}.${this.gameDateTime.getMonth()}.${this.gameDateTime.getDate()}`},gameStart(){return this.gameDateTime.toTimeString().slice(0,5)}},methods:{checkTimeLeft(){const e=new Date(this.gameData.dateTimeUTC).valueOf();e>this.currentTime?(this.timeLeft=this.getTimeLeft(e),this.interval=setInterval(()=>{this.timeLeft=this.getTimeLeft(e)},6e4)):this.timeLeft="00:00 hrs"},getTimeLeft(e){let o=e.valueOf()-this.currentTime;const s=Math.floor(o/bH);o=o-s*bH;const z=Math.floor(o/TT);o=o-z*TT;const W=Math.floor(o/vH);return`${s?`${s} dias `:""}${z<10?`0${z}`:z}:${W<10?`0${W}`:W} hrs.`}},beforeDestroy(){this.interval&&clearInterval(this.interval)}};function PNt(e){return`${{}.TEAM_LOGOS_URL||"https://golstatsimages.blob.core.windows.net/teams-80/"}${e}.png`}function INt(e){return`${{}.PROFILE_PHOTO_PLAYER||"https://golstatsimages.blob.core.windows.net/players-profile/"}${e}.png`}const CT={GOAL_IDS:["1-1","1-2","1-3","1-4","1-5","1-6","1-7","1-12","1-13","1-16","4-14"],YELLOW_CARD_IDS:["2-8"],RED_CARD_IDS:["2-9"]},LNt="/icn-play.svg",BNt="/icn-tiros-de-esquina.svg",ONt="/icn-tiro-a-porteria.svg",zNt="/icn-cambio.svg",NNt="/icn-falta.svg",DNt="/atajada.svg",FNt="/fuera-de-lugar.svg",ET="/gol.svg",RNt="/var.png",VNt="/tiempo-agregado.svg",jNt="/jugada-peligrosa.svg",UNt="/penal-marcado.svg",GNt="/penal-fallado.svg",HNt="/inicia-el-partido.svg",ZNt="/fin-del-partido.svg",WNt="/icn-tarjeta-amarilla.svg",XNt="/icn-tarjeta-roja.svg",qNt=[1,2,3,4,6],YNt={name:"TimeLineEvent",props:{gameEvent:{type:Object,required:!0},isMobile:{type:Boolean,default:!1},width:{type:Number,default:352},timeLineWidth:{type:Number,default:0},canPlayVideos:{type:Boolean,default:!0}},data(){return{lastHeight:0,gameEventKey:0}},computed:{nameClasses(){const e=[],o=`${this.gameEvent.event_type_id}-${this.gameEvent.category_id}`;return CT.GOAL_IDS.includes(o)?(e.push("is-main-event"),e.push("goal")):CT.YELLOW_CARD_IDS.includes(o)?(e.push("is-main-event"),e.push("yellow-card")):CT.RED_CARD_IDS.includes(o)?(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(o=>INt(o))),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||qNt.includes(this.gameEvent.event_type_id)?"":this.gameEvent.player_name}},watch:{width(){this.emitHeight()},gameEvent:{deep:!0,handler(){this.gameEventKey++}}},methods:{...gNt("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,o]=this.gameEvent.player_id.split("@");this.$emit("player-changed",{playerOut:Number(e),playerIn:Number(o),teamId:this.gameEvent.team_id})}}},JNt=e=>(t.pushScopeId("data-v-f8c0f071"),e=e(),t.popScopeId(),e),$Nt={class:"time-line-event__details"},KNt={width:"127",preload:"metadata",style:{"border-radius":"8px"}},QNt=["src"],eDt=JNt(()=>t.createElementVNode("div",{class:"time-line-event__details__video-thumbnail__gradient"},[t.createElementVNode("div",{class:"time-line-event__details__video-thumbnail__gradient__button-play"},[t.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none"},[t.createElementVNode("path",{d:"M6.6041 22.8554C6.42105 22.7512 6.26805 22.5956 6.1616 22.4053C6.05515 22.215 5.99927 21.9973 6.00001 21.7755V2.22137C6.00026 2.00039 6.0565 1.78362 6.16274 1.59409C6.26899 1.40456 6.42127 1.24936 6.6034 1.14499C6.78553 1.04062 6.9907 0.990981 7.1971 1.00135C7.4035 1.01171 7.60342 1.0817 7.77561 1.20386L21.4907 10.9821C21.6473 11.0935 21.7758 11.2446 21.8646 11.4219C21.9535 11.5992 22 11.7973 22 11.9985C22 12.1996 21.9535 12.3977 21.8646 12.575C21.7758 12.7523 21.6473 12.9034 21.4907 13.0148L7.77561 22.7954C7.60369 22.9178 7.40392 22.988 7.19761 22.9986C6.9913 23.0092 6.78617 22.9597 6.6041 22.8554ZM7.14347 21.7779L20.8585 11.9996L7.14347 21.7779Z",fill:"#CBEE6B"})])])],-1)),tDt={class:"time-line-event__details__info"},aDt={key:0,class:"time-line-event__details__info__header__players"},rDt={class:"time-line-event__details__info__header__players__div-img"},nDt=["src"],iDt={class:"time-line-event__details__info__body"},oDt={class:"time-line-event__details__info__body__comment"},sDt={class:"time-line-event__minute__container"},lDt={class:"time-line-event__minute__container__text"},cDt={class:"time-line-event__minute__container__icon-container"},uDt={class:"time-line-event__minute__container__icon-container__icon"},dDt={key:0,src:BNt,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},hDt={key:1,src:ONt,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},pDt={key:2,src:zNt,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},fDt={key:3,src:NNt,class:"time-line-event__minute__container__icon-container__icon__img",alt:"Event icon"},mDt={key:4,src:DNt,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},gDt={key:5,src:FNt,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},yDt={key:6,src:ET,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},vDt={key:7,src:ET,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},bDt={key:8,src:ET,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},xDt={key:9,src:RNt,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},_Dt={key:10,src:VNt,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},wDt={key:11,src:jNt,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},kDt={key:12,src:UNt,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},SDt={key:13,src:GNt,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},TDt={key:14,src:HNt,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},CDt={key:15,src:ZNt,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},EDt={key:16,src:WNt,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},ADt={key:17,src:XNt,class:"time-line-event__minute__container__icon-container__icon__img",alt:"Event icon"},MDt={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 PDt(e,o,s,z,W,v){return t.openBlock(),t.createElementBlock("div",{ref:"timeLineEvent",class:t.normalizeClass(["time-line-event",v.teamTypeClasses]),style:t.normalizeStyle({width:`${s.width}px`}),key:W.gameEventKey},[t.createElementVNode("div",$Nt,[s.canPlayVideos&&s.gameEvent.video_link!=="-"&&s.timeLineWidth>700?(t.openBlock(),t.createElementBlock("div",{key:0,class:"time-line-event__details__video-thumbnail",onClick:o[0]||(o[0]=g=>v.thumbnailClick(s.gameEvent.video_link,s.gameEvent.event_type_name))},[t.createElementVNode("video",KNt,[t.createElementVNode("source",{src:s.gameEvent.video_link+"#t=0.1",type:"video/mp4"},null,8,QNt)]),eDt])):t.createCommentVNode("",!0),t.createElementVNode("div",tDt,[t.createElementVNode("div",{class:t.normalizeClass(["time-line-event__details__info__header",v.teamTypeClasses2])},[s.gameEvent.video_link=="-"?(t.openBlock(),t.createElementBlock("div",aDt,[v.srcImgPlayers?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:0},t.renderList(v.srcImgPlayers,(g,r)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["img-player",{"second-player":r===1}]),key:r},[t.createElementVNode("div",rDt,[t.createElementVNode("img",{src:g,alt:""},null,8,nDt)])],2))),128)):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0),t.createElementVNode("div",{class:t.normalizeClass(["time-line-event__details__info__header__event-name",v.nameClasses]),onClick:o[1]||(o[1]=g=>v.thumbnailClick(s.gameEvent.video_link,s.gameEvent.event_type_name))},[s.canPlayVideos&&s.gameEvent.video_link!=="-"?(t.openBlock(),t.createElementBlock("img",{key:0,src:LNt,class:t.normalizeClass(`time-line-event__details__info__header__event-play ${[1,2].includes(s.gameEvent.event_type_id)?`time-line-event__details__info__header__event-play__${s.gameEvent.event_type_name}`:s.gameEvent.video_link!=="-"?"time-line-event__details__info__header__event-play__normal-video":""}`)},null,2)):t.createCommentVNode("",!0),t.createTextVNode(" "+t.toDisplayString(s.gameEvent.category_id?s.gameEvent.event_type_id===5?s.gameEvent.category_name:s.gameEvent.event_type_name==="Gol"?`${[13,16].includes(s.gameEvent.category_id)?"Autogol":"Gol"} de `+s.gameEvent.team_name:s.gameEvent.event_type_name:s.gameEvent.comments),1)],2)],2),t.createElementVNode("div",iDt,[t.createElementVNode("div",oDt,t.toDisplayString(this.gameEvent.category_id?`${this.gameEvent.comments}`:""),1)])])]),t.createElementVNode("div",{class:t.normalizeClass(["time-line-event__minute",v.minuteClasses])},[t.createElementVNode("div",sDt,[t.createElementVNode("div",lDt,t.toDisplayString(s.gameEvent.minute)+"'",1),t.createElementVNode("div",cDt,[t.createElementVNode("div",uDt,[s.gameEvent.category_id==18?(t.openBlock(),t.createElementBlock("img",dDt)):s.gameEvent.category_id==20?(t.openBlock(),t.createElementBlock("img",hDt)):s.gameEvent.category_id==10?(t.openBlock(),t.createElementBlock("img",pDt)):s.gameEvent.category_id==21?(t.openBlock(),t.createElementBlock("img",fDt)):s.gameEvent.category_id==27?(t.openBlock(),t.createElementBlock("img",mDt)):s.gameEvent.category_id==17?(t.openBlock(),t.createElementBlock("img",gDt)):s.gameEvent.category_id==6&&s.gameEvent.event_type_id==1||s.gameEvent.category_id==5&&s.gameEvent.event_type_id==1||s.gameEvent.category_id==1&&s.gameEvent.event_type_id==1||s.gameEvent.category_id==2&&s.gameEvent.event_type_id==1||s.gameEvent.category_id==3&&s.gameEvent.event_type_id==1||s.gameEvent.category_id==7&&s.gameEvent.event_type_id==1||s.gameEvent.category_id==12&&s.gameEvent.event_type_id==1?(t.openBlock(),t.createElementBlock("img",yDt)):s.gameEvent.category_id==4?(t.openBlock(),t.createElementBlock("img",vDt)):s.gameEvent.category_id==13||s.gameEvent.category_id==16?(t.openBlock(),t.createElementBlock("img",bDt)):s.gameEvent.category_id==30||s.gameEvent.category_id==31||s.gameEvent.category_id==32||s.gameEvent.category_id==33||s.gameEvent.category_id==34||s.gameEvent.category_id==35||s.gameEvent.category_id==36||s.gameEvent.category_id==37||s.gameEvent.category_id==38||s.gameEvent.category_id==39||s.gameEvent.category_id==40?(t.openBlock(),t.createElementBlock("img",xDt)):s.gameEvent.category_id==28?(t.openBlock(),t.createElementBlock("img",_Dt)):s.gameEvent.category_id==26?(t.openBlock(),t.createElementBlock("img",wDt)):s.gameEvent.category_id==22?(t.openBlock(),t.createElementBlock("img",kDt)):s.gameEvent.category_id==15||s.gameEvent.category_id==23?(t.openBlock(),t.createElementBlock("img",SDt)):s.gameEvent.category_id==0&&s.gameEvent.game_status_id==16||s.gameEvent.category_id==0&&s.gameEvent.game_status_id==18||s.gameEvent.category_id==0&&s.gameEvent.game_status_id==20||s.gameEvent.category_id==0&&s.gameEvent.game_status_id==22?(t.openBlock(),t.createElementBlock("img",TDt)):s.gameEvent.category_id==0&&s.gameEvent.game_status_id==13||s.gameEvent.category_id==0&&s.gameEvent.game_status_id==17||s.gameEvent.category_id==0&&s.gameEvent.game_status_id==19||s.gameEvent.category_id==0&&s.gameEvent.game_status_id==21||s.gameEvent.category_id==0&&s.gameEvent.game_status_id==23?(t.openBlock(),t.createElementBlock("img",CDt)):s.gameEvent.category_id==8?(t.openBlock(),t.createElementBlock("img",EDt)):s.gameEvent.category_id==9?(t.openBlock(),t.createElementBlock("img",ADt)):(t.openBlock(),t.createElementBlock("img",MDt))])])])],2)],6)}const IDt=vb(YNt,[["render",PDt],["__scopeId","data-v-f8c0f071"]]),LDt={"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"},BDt={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 D4=null;const ODt={name:"TimeLine",components:{Tooltip:wNt,TimeLineEvent:IDt},mixins:[MNt],props:{gameData:{type:Object,required:!0},timeLinePeriod:{type:String,default:"all"},socket:{type:Object,default:()=>({})},canPlayVideos:{type:Boolean,default:!0}},data(){return{gameEvents:[],gameEventsByPeriod:{firstHalf:[],secondHalf:[]},dataVideo:{visible:!1,link:""},gameEventsQueue:[],gameEventsUrl:"https://al2nv2dmkc.execute-api.us-west-2.amazonaws.com/prod/mxm/",transitionName:"",subscriptionInfo:{gameId:0,isSubscribed:!1},areGameEventsFilled:!1,timeLineWidth:812,eventContainerWidth:0,channelName:"",timeLineStatus:"awaiting",timeLeft:"",lastMinute:0,timeLineStatuses:[],currentStatus:{abbreviation:""},timer:"00:00"}},computed:{isMobile(){return this.timeLineWidth<580},gameEventWidth(){return this.timeLineWidth/2-30},gameEventsToShow(){return this.timeLinePeriod==="all"?this.gameEvents:this.gameEventsByPeriod[this.timeLinePeriod]}},watch:{gameData:{deep:!0,immediate:!0,handler(e){e&&e.id&&(this.gameDateTime=new Date(this.gameData.dateTimeUTC),this.gameEventsQueue=[],this.timeLineStatuses=[],this.transitionName="",this.checkTimeLeft(),e.status!==1&&this.socket&&this.socket.connected?this.subscribeToMXMChannel():this.timeLineStatus="finished",this.fillGameEvents(e.id))}},"socket.connected":{immediate:!0,handler(e){e&&this.gameData.id&&this.gameData.status!==1&&this.subscribeToMXMChannel()}},gameEvents(e){e.length&&this.gameData.status!==1&&(this.timeLineStatus="live")}},methods:{async fillGameEvents(e){try{const o=await this.fetchGameEvents(e);o?(this.gameEvents=[...o],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(o){throw new Error(o)}},getGameEventClassAndSetIcon(e,o){return e.icon=o===0?"inicio_del_partido":LDt[`${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 o=this.$store.getters.getProviderId,s=this.$store.getters.getIsDevApis,z=ENt(`${this.gameEventsUrl}${e}`,o,s),{data:{plays:W}}=await QG.get(z);return W}catch(o){throw new Error(o)}},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)D4=new ResizeObserver(()=>{this.timeLineWidth=this.$refs.timeLine.clientWidth}),D4.observe(this.$refs.timeLine);else throw new Error("Resize observer not supported!")},updateContainerHeight(e,o){const s=this.$refs[`gameEventDiv${o}`][0],z=this.$refs[`gameEventLine${o}`]?this.$refs[`gameEventLine${o}`][0]:null,W=e+12;s&&(s.style.height=`${W}px`),z&&(z.style.height=`${W}px`)},sortGameEvents(){this.gameEvents.sort((e,o)=>this.getMatchLapseMinutes(e.match_lapse)+Number(e.minute)-(this.getMatchLapseMinutes(o.match_lapse)+Number(o.minute))),this.gameEventsByPeriod={firstHalf:[],secondHalf:[]},this.gameEvents.forEach(e=>{this.gameEventsByPeriod[e.match_lapse===1?"firstHalf":"secondHalf"].push(e)})},getMatchLapseMinutes(e){let o=0;switch(e){case 1:o=0;break;case 2:o=45;break;case 3:o=90;break;case 4:o=105;break;case 5:o=120;break}return o},addGameEventFromChannel(e){this.areGameEventsFilled?(this.gameEvents.push(e),this.sortGameEvents()):this.gameEventsQueue.push(e)},deleteGameEventFromChannel(e){const o=this.gameEvents.findIndex(s=>s.play_id===e.play_id);o&&this.gameEvents.splice(o,1)},checkTimeLineStatus(){this.gameEvents.forEach(o=>{const s=BDt[o.game_status];s&&this.timeLineStatuses.push({...s,gameEvent:o})}),this.timeLineStatuses.sort((o,s)=>s.weight-o.weight);const e=this.timeLineStatuses[0];e&&(this.currentStatus=e,e.playTimer&&this.startTimer())},startTimer(){},getTeamLogoSrc(e="homeTeam"){const o=this.gameData[e].team_id;return PNt(o)},thumbnailClick(e){this.canPlayVideos&&(this.dataVideo.link=e,this.dataVideo.visible=!0)}},mounted(){this.$nextTick(()=>{this.setUpResizeObserver()})},beforeUnmount(){D4&&D4.unobserve(this.$refs.timeLine)},sockets:{new_mxm([e,o]){this.channelName===e&&this.addGameEventFromChannel(o)},update_mxm([e,o]){this.channelName===e&&(this.deleteGameEventFromChannel(o),this.addGameEventFromChannel(o))},delete_mxm([e,o]){this.channelName===e&&this.deleteGameEventFromChannel(o)}}},xH=e=>(t.pushScopeId("data-v-0c454414"),e=e(),t.popScopeId(),e),zDt={ref:"timeLine",class:"time-line"},NDt={class:"time-line__header"},DDt={class:"time-line__header__dot"},FDt={class:"time-line__header__dot__home-team team-logo"},RDt=["src"],VDt={class:"time-line__header__dot__away-team team-logo"},jDt=["src"],UDt={key:1,class:"start-line"},GDt=xH(()=>t.createElementVNode("div",null,null,-1)),HDt=xH(()=>t.createElementVNode("div",null,null,-1)),ZDt=[GDt,HDt],WDt={key:1,class:"noEventText"},XDt={class:"tooltip-data"},qDt=["src"];function YDt(e,o,s,z,W,v){const g=t.resolveComponent("TimeLineEvent"),r=t.resolveComponent("Tooltip");return t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createElementVNode("div",zDt,[t.createElementVNode("div",NDt,[t.createElementVNode("div",DDt,[t.createElementVNode("div",FDt,[t.createElementVNode("img",{src:v.getTeamLogoSrc("homeTeam"),alt:""},null,8,RDt)]),t.createElementVNode("div",VDt,[t.createElementVNode("img",{src:v.getTeamLogoSrc("awayTeam"),alt:""},null,8,jDt)])])]),(t.openBlock(),t.createElementBlock("div",{class:"time-line__game-events",key:`tlk-${W.gameEvents.length}`},[s.gameData.status!==4||s.gameData.is_live?(t.openBlock(),t.createBlock(t.TransitionGroup,{key:0,name:W.transitionName,tag:"div"},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(v.gameEventsToShow,(b,d)=>(t.openBlock(),t.createElementBlock("div",{class:"time-line__game-events__grid",key:b.play_id},[t.createElementVNode("div",{ref_for:!0,ref:`gameEventDiv${d}`,class:t.normalizeClass(v.getGameEventClassAndSetIcon(b,d))},[t.createElementVNode("div",{class:t.normalizeClass(v.getEventContainerClass(b))},[t.createVNode(g,{"game-event":b,"is-mobile":v.isMobile,"time-line-width":W.timeLineWidth,width:v.gameEventWidth,"can-play-videos":s.canPlayVideos,onEventHeight:a=>v.updateContainerHeight(a,d),onPlayerChanged:o[0]||(o[0]=a=>e.$emit("player-changed",a)),onThumbnailClick:v.thumbnailClick},null,8,["game-event","is-mobile","time-line-width","width","can-play-videos","onEventHeight","onThumbnailClick"])],2),d>0?(t.openBlock(),t.createElementBlock("div",{key:0,ref_for:!0,ref:`gameEventLine${d}`,class:"line"},null,512)):t.createCommentVNode("",!0),s.gameData.status===1&&d===v.gameEventsToShow.length-1?(t.openBlock(),t.createElementBlock("div",UDt,ZDt)):t.createCommentVNode("",!0)],2)]))),128))]),_:1},8,["name"])):(t.openBlock(),t.createElementBlock("div",WDt,"Aún no comienza el partido"))]))],512),t.createVNode(r,{data:W.dataVideo},{default:t.withCtx(()=>[t.createElementVNode("div",XDt,[t.createElementVNode("div",null,[t.createElementVNode("video",{class:"tooltip-video",controls:"",autoplay:"",src:W.dataVideo.link,format:"video/mp4"},null,8,qDt)])])]),_:1},8,["data"])],64)}const JDt=vb(ODt,[["render",YDt],["__scopeId","data-v-0c454414"]]),$Dt={class:"game-time-line__options"},KDt={class:"game-time-line__timeline"},QDt={__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://golstatsimages.blob.core.windows.net/teams-80/18.png",team_id:18,provisional_logo:"https://golstatsimages.blob.core.windows.net/teams-provisional/18.png",colloquial_name:"Toluca",acronym:"TOL",team_name:"Toluca"},awayTeam:{logo:"https://golstatsimages.blob.core.windows.net/teams-80/1.png",team_id:1,provisional_logo:"https://golstatsimages.blob.core.windows.net/teams-provisional/1.png",colloquial_name:"Chivas",acronym:"CHI",team_name:"Guadalajara"}})},socket:{type:Object,default:()=>({})},canPlayVideos:{type:Boolean,default:!0},providerId:{type:Number,default:0},isDevApis:{type:Boolean,default:!1}},setup(e){const o=e;QG.defaults.headers.common.Authorization="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MCwibmFtZSI6IlVzdWFyaW8gRnJlZSIsInVzZXJuYW1lIjoiZnJlZUBnb2xzdGF0cy5jb20iLCJlbWFpbCI6ImZyZWVAZ29sc3RhdHMuY29tIiwiaWF0IjoxNjA2NzU4Nzk1LCJleHAiOjE2MzgyOTQ3OTV9.kPNmP7yDtk38cAXrUyc7OHRh6J25VFqy-XUNzbK-4YE";const s=t.ref({width:"103px",height:"30px",borderRadius:"50px",borderColor:"#8a8a8a",borderWidth:"0.5px",backgroundColor:"rgba(255, 255, 255, 0.04)",fontSize:"14px",fontFamily:"Poppins-Regular, sans-serif",fontColor:"rgba(255, 255, 255, 0.5)",activeFontColor:"#FFFFFF",activeBorderColor:"#cbee6b"}),z=t.ref({width:"auto",height:"30px",padding:"0px 20px",borderRadius:"50px",borderColor:"#8a8a8a",borderWidth:"0.5px",backgroundColor:"rgba(255, 255, 255, 0.04)",fontSize:"14px",fontFamily:"Poppins-Regular, sans-serif",fontColor:"rgba(255, 255, 255, 0.5)",activeFontColor:"#FFFFFF",activeBorderColor:"#cbee6b"});let W=null;const v=Kzt();v.commit("setProviderId",o.providerId),v.commit("setIsDevApis",o.isDevApis);const g=t.ref(["Todo","1er tiempo","2do tiempo"]),r=t.ref("Todo"),b=t.ref({}),d=t.ref(null),a=t.ref(0),_=t.computed(()=>{let i="all";return r.value==="1er tiempo"||r.value==="1er"?i="firstHalf":(r.value==="2do tiempo"||r.value==="2do")&&(i="secondHalf"),i}),y=t.computed(()=>a.value<500);function x(i){r.value=i}function u(i){b.value=i}function n(){if(window.ResizeObserver)W=new ResizeObserver(()=>{a.value=d.value.clientWidth}),W.observe(d.value);else throw new Error("Resize observer not supported!")}return t.onMounted(()=>{n()}),t.onBeforeUnmount(()=>{W&&W.unobserve(d.value)}),(i,f)=>(t.openBlock(),t.createElementBlock("div",{ref_key:"gameTimeLine",ref:d,class:"game-time-line"},[t.createElementVNode("div",$Dt,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(g.value,l=>(t.openBlock(),t.createElementBlock("div",{key:l,class:"game-time-line__options__option"},[t.createVNode(uOt,t.mergeProps(a.value<390?z.value:s.value,{text:l=="Todo"?l:a.value<390?l.substring(0,3):l,"is-active":r.value===l,onClick:h=>x(l)}),null,16,["text","is-active","onClick"])]))),128))]),t.createElementVNode("div",KDt,[t.createVNode(JDt,{"game-data":e.game,"time-line-period":_.value,"is-mobile":y.value,socket:e.socket,"can-play-videos":e.canPlayVideos,onGameEventsByPeriodFilled:u},null,8,["game-data","time-line-period","is-mobile","socket","can-play-videos"])])],512))}},eFt=vb(QDt,[["__scopeId","data-v-2fac45b8"]]),iJt="",tFt={class:"game-data__header"},aFt={class:"game-data__header__tournament-season-dropdown"},rFt={class:"game-data__header__teams-carousel"},nFt={class:"game-data__body"},iFt={key:0,class:"no-stats-container"},oFt={key:1,class:"no-stats-container-mobile"},sFt={class:"game-data__body__menu"},lFt={class:"game-data__body__menu__contmenuswitch"};bu.defaults.headers.common.Authorization="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MCwibmFtZSI6IlVzdWFyaW8gRnJlZSIsInVzZXJuYW1lIjoiZnJlZUBnb2xzdGF0cy5jb20iLCJlbWFpbCI6ImZyZWVAZ29sc3RhdHMuY29tIiwiaWF0IjoxNjA2NzU4Nzk1LCJleHAiOjE2MzgyOTQ3OTV9.kPNmP7yDtk38cAXrUyc7OHRh6J25VFqy-XUNzbK-4YE";const cFt=t.defineComponent({name:"GSC-GameData",components:{StatisticsMain:Wse,GSCGameTimeLine:eFt,GscSwitchComponent:Ek,GSCLineupsMain:N_e,GSCPositining:oyt,GSCDatosGSMain:FTe,GSCVideoGame:iFe,ModalEvents:Rz,GSCTacticaFijaMain:lOt,GSCProminentMain:Oit,GSCComparative:Vlt}}),uFt=$i(Object.assign(cFt,{props:{tournamentsApiUrl:{type:String,default:""},areFemaleTournamentsVisible:{type:Boolean,default:!0},currentSeasonId:{type:Number,default:0},isClubes:{type:Boolean,default:!1},defaultGameId:{type:Number,default:0,validator(e){return!Number.isNaN(e)&&e>=0}},sortCalendar:{type:Boolean,default:!0},isWidget:{type:Boolean,default:!1},teamWidget:{type:Number,default:0},socket:{type:Object,default:()=>null},isSynchronization:{type:Boolean,default:!1},isTeamGamePerPage:{type:Boolean,default:!1},clientPrivilegesBySeasons:{type:Object,default:()=>null},areTournamentAndSeasonSelectsVisible:{type:Boolean,default:!0},disabledSectionsIds:{type:Array,default:()=>[]},tournamentsIdsToInclude:{type:Set,default:()=>new Set},volumetricFieldIntervalMinutes:{type:Number,default:2},chalkboardIntervalMinutes:{type:Number,default:2},gameEventsIntervalMinutes:{type:Number,default:1},isFemaleMode:{type:Boolean,default:!1}},emits:["openmedia","change-season-id","onOpenProfile","openProfileTeam","openProfilePlayer"],setup(e,{emit:o}){const s=pw();let z=null;Nd.on("socket-connected",()=>{s.commit("nextGeneral/updateIsSocketConnected",W.socket.connected)});const W=e,v=t.ref("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MCwibmFtZSI6IlVzdWFyaW8gRnJlZSIsInVzZXJuYW1lIjoiZnJlZUBnb2xzdGF0cy5jb20iLCJlbWFpbCI6ImZyZWVAZ29sc3RhdHMuY29tIiwiaWF0IjoxNjA2NzU4Nzk1LCJleHAiOjE2MzgyOTQ3OTV9.kPNmP7yDtk38cAXrUyc7OHRh6J25VFqy-XUNzbK-4YE"),g=t.ref({season:[]}),r=t.ref({}),b=t.ref(!1),d=t.ref({}),a=t.ref(1),_=t.ref(0),y=3e4,x=3e4,u=3e4,n=3e4,i=3e4,f=3e4,l=3e4,h=3e4,m=6e4,w=t.ref(null),T=t.ref(null),A=t.ref(null),C=t.ref([]),I=t.ref(null),L=t.ref(!0),E=t.ref(new Set([1,2])),P=t.ref({}),M=t.ref({minute:"",recent_lapse:0,score:{}}),S=t.ref(0),B=t.ref("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MCwibmFtZSI6IlVzdWFyaW8gRnJlZSIsInVzZXJuYW1lIjoiZnJlZUBnb2xzdGF0cy5jb20iLCJlbWFpbCI6ImZyZWVAZ29sc3RhdHMuY29tIiwiaWF0IjoxNjA2NzU4Nzk1LCJleHAiOjE2MzgyOTQ3OTV9.kPNmP7yDtk38cAXrUyc7OHRh6J25VFqy-XUNzbK-4YE"),k=t.ref(W.isWidget?[{componentName:"GSCProminentMain",name:"Generales",id:1},{componentName:"GSCVideoGame",name:"Más Videos",id:2},{componentName:"StatisticsMain",name:"Estadísticas",id:3},{componentName:"GSCComparative",name:W.isWidget?"Destacados":"Comparativa",id:4},{componentName:"GSCGameTimeLine",name:"Minuto a Minuto",id:5},{componentName:"GSCLineupsMain",name:"Alineaciones",id:6}]:[{componentName:"GSCProminentMain",name:"Destacado",id:1},{componentName:"GSCVideoGame",name:"Más Videos",id:2},{componentName:"StatisticsMain",name:"Estadísticas",id:4},{componentName:"GSCComparative",name:W.isWidget?"Destacados":"Comparativa",id:3},{componentName:"GSCGameTimeLine",name:"Minuto a Minuto",id:5},{componentName:"GSCLineupsMain",name:"Alineaciones",id:6},{componentName:"GSCTacticaFijaMain",name:"Táctica Fija",id:7}]),O=t.ref(W.isWidget?[{componentName:"GSCProminentMain",name:"Generales",id:1},{componentName:"GSCVideoGame",name:"Más Videos",id:2},{componentName:"StatisticsMain",name:"Estadísticas",id:3},{componentName:"GSCComparative",name:W.isWidget?"Destacados":"Comparativa",id:4},{componentName:"GSCGameTimeLine",name:"Minuto a Minuto",id:5},{componentName:"GSCLineupsMain",name:"Alineaciones",id:6}]:[{componentName:"GSCProminentMain",name:"Destacado",id:1},{componentName:"GSCVideoGame",name:"Más Videos",id:2},{componentName:"StatisticsMain",name:"Estadísticas",id:3},{componentName:"GSCComparative",name:W.isWidget?"Destacados":"Comparativa",id:4},{componentName:"GSCGameTimeLine",name:"Minuto a Minuto",id:5},{componentName:"GSCLineupsMain",name:"Alineaciones",id:6},{componentName:"GSCTacticaFijaMain",name:"Táctica Fija",id:7}]),D=t.ref(W.isWidget?[{componentName:"GSCProminentMain",name:"Generales",id:1},{componentName:"GSCVideoGame",name:"Más Videos",id:2},{componentName:"StatisticsMain",name:"Estadísticas",id:3},{componentName:"GSCComparative",name:W.isWidget?"Destacados":"Comparativa",id:4},{componentName:"GSCGameTimeLine",name:"Minuto a Minuto",id:5},{componentName:"GSCLineupsMain",name:"Alineaciones",id:6}]:[{componentName:"GSCProminentMain",name:"Destacado",id:1},{componentName:"GSCVideoGame",name:"Más Videos",id:2},{componentName:"StatisticsMain",name:"Estadísticas",id:3},{componentName:"GSCComparative",name:W.isWidget?"Destacados":"Comparativa",id:4},{componentName:"GSCGameTimeLine",name:"Minuto a Minuto",id:5},{componentName:"GSCLineupsMain",name:"Alineaciones",id:6},{componentName:"GSCTacticaFijaMain",name:"Táctica Fija",id:7}]);t.ref(W.isWidget?[{componentName:"GSCProminentMain",name:"Generales",id:1},{componentName:"GSCVideoGame",name:"Más Videos",id:2},{componentName:"StatisticsMain",name:"Estadísticas",id:3},{componentName:"GSCComparative",name:W.isWidget?"Destacados":"Comparativa",id:4},{componentName:"GSCGameTimeLine",name:"Minuto a Minuto",id:5},{componentName:"GSCLineupsMain",name:"Alineaciones",id:6}]:[{componentName:"GSCProminentMain",name:"Destacado",id:1},{componentName:"GSCVideoGame",name:"Más Videos",id:2},{componentName:"StatisticsMain",name:"Estadísticas",id:3},{componentName:"GSCComparative",name:W.isWidget?"Destacados":"Comparativa",id:4},{componentName:"GSCGameTimeLine",name:"Minuto a Minuto",id:5},{componentName:"GSCLineupsMain",name:"Alineaciones",id:6},{componentName:"GSCTacticaFijaMain",name:"Táctica Fija",id:7}]);const V=t.ref(0);let G=null;const H=t.ref(null),U=t.ref(0),J=t.ref(O.value[0]),re=t.ref([]);let q=t.ref("");const ae={seasonAndPrivileges:null,canPrivilegesTeamPlayVideos:!1,homeTeamDetails:{canPlayVideos:!1,team:{}},awayTeamDetails:{canPlayVideos:!1,team:{}}},ee=t.computed(()=>{const ot=[];return r.value&&r.value.id&&(ot.push({id:r.value.id,name:r.value.name,type:r.value.type}),r.value.related_seasons&&r.value.related_seasons.forEach(vt=>{ot.push({id:vt.id,type:vt.type})})),ot}),$=t.computed(()=>{if(W.clientPrivilegesBySeasons){const ot=W.clientPrivilegesBySeasons.seasonsAndPrivileges.get(r.value.id);if(ot)return ot.teamId}return 0});function Q(){b.value=!1}function ce(ot){const vt=ot.split(",");return!(vt.length<2||vt[1].split(" ").length<2)}function de(ot){w.value=ot}function he(ot){C.value.push(ot)}function pe(ot){I.value=ot}function ne(ot){A.value=ot}function le(ot){T.value=ot}function ie(ot){if(!ce(ot))return"";const vt=ve(ot);return`${me(ot)}. ${vt}`}function me(ot){return ot.split(",")[1].split(" ")[1][0]}function ve(ot){const vt=ot.split(",")[0].split(" ");return vt[0].length<=3&&vt.length>1?`${vt[0]} ${vt[1]}`:vt[0]}async function ye(ot){try{const vt=bu.create({headers:{Authorization:`${v.value}`}});P.value={};const yt=await vt.get("https://al2nv2dmkc.execute-api.us-west-2.amazonaws.com/prod/mxm/"+ot.game_id);if(P.value[ot.home_team.team_id]=[],P.value[ot.home_team.team_id].team={name:ot.home_team.acronym,logo:ot.home_team.logo},P.value[ot.home_team.team_id].goals=[],P.value[ot.home_team.team_id].red=[],P.value[ot.home_team.team_id].yellow=[],P.value[ot.visiting_team.team_id]=[],P.value[ot.visiting_team.team_id].team={name:ot.visiting_team.acronym,logo:ot.visiting_team.logo},P.value[ot.visiting_team.team_id].goals=[],P.value[ot.visiting_team.team_id].red=[],P.value[ot.visiting_team.team_id].yellow=[],yt.data.minute!=null&&(M.value={minute:yt.data.minute,recent_lapse:yt.data.recent_lapse,score:yt.data.score}),yt.data.plays)for(let It=0;It<yt.data.plays.length;It++)yt.data.plays[It].category_name=="Roja"&&yt.data.plays[It].status==1&&(ot.home_team.team_id==yt.data.plays[It].team_id?(ie(yt.data.plays[It].player_name)in P.value[ot.home_team.team_id].red||(P.value[ot.home_team.team_id].red[ie(yt.data.plays[It].player_name)]={},P.value[ot.home_team.team_id].red[ie(yt.data.plays[It].player_name)].event=[],P.value[ot.home_team.team_id].red[ie(yt.data.plays[It].player_name)].name=ie(yt.data.plays[It].player_name)),P.value[ot.home_team.team_id].red[ie(yt.data.plays[It].player_name)].event.push(yt.data.plays[It].minute)):(ie(yt.data.plays[It].player_name)in P.value[ot.visiting_team.team_id].red||(P.value[ot.visiting_team.team_id].red[ie(yt.data.plays[It].player_name)]={},P.value[ot.visiting_team.team_id].red[ie(yt.data.plays[It].player_name)].event=[],P.value[ot.visiting_team.team_id].red[ie(yt.data.plays[It].player_name)].name=ie(yt.data.plays[It].player_name)),P.value[ot.visiting_team.team_id].red[ie(yt.data.plays[It].player_name)].event.push(yt.data.plays[It].minute))),yt.data.plays[It].category_name=="Amarilla"&&yt.data.plays[It].status==1&&(ot.home_team.team_id==yt.data.plays[It].team_id?(ie(yt.data.plays[It].player_name)in P.value[ot.home_team.team_id].yellow||(P.value[ot.home_team.team_id].yellow[ie(yt.data.plays[It].player_name)]={},P.value[ot.home_team.team_id].yellow[ie(yt.data.plays[It].player_name)].event=[],P.value[ot.home_team.team_id].yellow[ie(yt.data.plays[It].player_name)].name=ie(yt.data.plays[It].player_name)),P.value[ot.home_team.team_id].yellow[ie(yt.data.plays[It].player_name)].event.push(yt.data.plays[It].minute)):(ie(yt.data.plays[It].player_name)in P.value[ot.visiting_team.team_id].yellow||(P.value[ot.visiting_team.team_id].yellow[ie(yt.data.plays[It].player_name)]={},P.value[ot.visiting_team.team_id].yellow[ie(yt.data.plays[It].player_name)].event=[],P.value[ot.visiting_team.team_id].yellow[ie(yt.data.plays[It].player_name)].name=ie(yt.data.plays[It].player_name)),P.value[ot.visiting_team.team_id].yellow[ie(yt.data.plays[It].player_name)].event.push(yt.data.plays[It].minute))),yt.data.plays[It].event_type_name=="Gol"&&yt.data.plays[It].status==1&&(ot.home_team.team_id==yt.data.plays[It].team_id?yt.data.plays[It].category_name=="Autogol"?(ie(yt.data.plays[It].player_name)in P.value[ot.visiting_team.team_id].goals||(P.value[ot.visiting_team.team_id].goals[ie(yt.data.plays[It].player_name)]={},P.value[ot.visiting_team.team_id].goals[ie(yt.data.plays[It].player_name)].event=[],P.value[ot.visiting_team.team_id].goals[ie(yt.data.plays[It].player_name)].name=ie(yt.data.plays[It].player_name)),P.value[ot.visiting_team.team_id].goals[ie(yt.data.plays[It].player_name)].event.push(yt.data.plays[It].minute)):(ie(yt.data.plays[It].player_name)in P.value[ot.home_team.team_id].goals||(P.value[ot.home_team.team_id].goals[ie(yt.data.plays[It].player_name)]={},P.value[ot.home_team.team_id].goals[ie(yt.data.plays[It].player_name)].event=[],P.value[ot.home_team.team_id].goals[ie(yt.data.plays[It].player_name)].name=ie(yt.data.plays[It].player_name)),P.value[ot.home_team.team_id].goals[ie(yt.data.plays[It].player_name)].event.push(yt.data.plays[It].minute)):yt.data.plays[It].category_name=="Autogol"?(ie(yt.data.plays[It].player_name)in P.value[ot.home_team.team_id].goals||(P.value[ot.home_team.team_id].goals[ie(yt.data.plays[It].player_name)]={},P.value[ot.home_team.team_id].goals[ie(yt.data.plays[It].player_name)].event=[],P.value[ot.home_team.team_id].goals[ie(yt.data.plays[It].player_name)].name=ie(yt.data.plays[It].player_name)),P.value[ot.home_team.team_id].goals[ie(yt.data.plays[It].player_name)].event.push(yt.data.plays[It].minute)):(ie(yt.data.plays[It].player_name)in P.value[ot.visiting_team.team_id].goals||(P.value[ot.visiting_team.team_id].goals[ie(yt.data.plays[It].player_name)]={},P.value[ot.visiting_team.team_id].goals[ie(yt.data.plays[It].player_name)].event=[],P.value[ot.visiting_team.team_id].goals[ie(yt.data.plays[It].player_name)].name=ie(yt.data.plays[It].player_name)),P.value[ot.visiting_team.team_id].goals[ie(yt.data.plays[It].player_name)].event.push(yt.data.plays[It].minute)))}catch(vt){return Promise.reject(vt)}}function ke(ot){b.value=!0,ot.is_live!=1&&ot.game_status!=0&&(ot.game_status==4||Object.keys(ot.minutes).length>0)?(S.value=1,P.value={plays:ot.minutes,home_team:ot.home_team,visiting_team:ot.visiting_team}):(S.value=0,ye(ot))}function Ee(){G=new ResizeObserver(ot=>{for(const vt of ot)U.value=vt.contentRect.width}),G.observe(H.value)}const Te=t.computed(()=>{let ot={};return d.value&&d.value.game_id&&(ot={gameId:d.value.game_id,id:d.value.game_id,seasonId:d.value.season_id,regularSeasonId:d.value.regularSeasonId,matchday_name:d.value.matchday_name,status:d.value.game_status,score:d.value.score,game_status:d.value.game_status,dateTimeUTC:d.value.date_time_utc,homeTeam:d.value.home_team,awayTeam:d.value.visiting_team,is_live:d.value.is_live,minutes:d.value.minutes}),ot});t.watch(()=>d.value.game_id,Le,{immediate:!0}),t.watch(()=>d.value.is_live,je,{immediate:!0}),t.watch(()=>s.state.nextGeneral.gameForAnalysis,()=>{s.commit("nextGeneral/updateIsSocketConnected",W.socket.connected)},{deep:!0,immediate:!0});function Pe(ot){a.value=ot.is_captured,_.value=ot.is_female,L.value=ot.is_captured!==0,g.value.id!==ot.id&&(g.value=ot,s.commit("gameGlobal/setTournamentType",ot.tournament_type))}const Be=o;function Le(ot,vt){s.commit("nextGeneral/updateShowLiveData",!0);const yt=_.value?"Destacados":"Destacadas";O.value.forEach(It=>{It.name===yt&&(It.name=_.value?"Destacadas":"Destacados")}),ye({game_id:d.value.game_id,home_team:d.value.home_team,visiting_team:d.value.visiting_team}),Re(),V.value+=1}function je(ot,vt){if(Re(),s.state.nextGeneral.gameForAnalysis.is_live!==ot&&s.commit("nextGeneral/updateGameForAnalysis",{...s.state.nextGeneral.gameForAnalysis,is_live:d.value.is_live,game_status:d.value.game_status}),ot){const yt=$w();yt.disconnected?Kw():yt.connected&&XE(`game.${d.value.game_id}.v2`),Me(),z=setInterval(()=>{S.value=0,ye({game_id:d.value.game_id,home_team:d.value.home_team,visiting_team:d.value.visiting_team})},6e4)}else Me(),Qw();ot!==vt&&(V.value+=1)}function Me(){z&&clearInterval(z)}function Re(){O.value=[],d.value.is_live||d.value.game_status===4?O.value=[...k.value]:O.value=[...D.value],W.isWidget||((r.value.is_tactic_available===0||d.value.is_live||d.value.game_status===0)&&O.value.pop(),d.value.has_tracking===1&&!(d.value.is_live||d.value.game_status===4)&&O.value.push({componentName:"GSCPositining",name:"Posicionamiento",id:8})),J.value=O.value[0]}function Ie(ot){ot.gameSeasonId=d.value.season_id,ot.gameRegularSeasonId=d.value.regularSeasonId,!(!ot.auxwidget&&xe.value&&!xe.value.canPrivilegesTeamPlayVideos)&&((d.value.is_live||d.value.game_status===0||d.value.game_status===1)&&(ot.gameIdsToFilter=[d.value.game_id]),ot.isLiveAccumulated&&(ot.gameIdsToFilter=null),(d.value.is_live||d.value.game_status===0)&&!ot.isLiveAccumulated&&(ot.liveGameConfig={gameId:d.value.game_id}),Be("openmedia",ot))}function ge(ot){Be("onOpenProfile",ot)}function Ce(ot){Be("openProfileTeam",ot)}function we(ot){Be("openProfilePlayer",ot)}function Ve(ot){We(ot),ot=="Estadísticas"&&(q.value="Comparativa")}function Ne(){q.value=""}function Ue(ot){r.value.id!==ot.id&&(r.value=ot,Be("change-season-id",ot.id))}const Xe=t.computed(()=>O.value.reduce((ot,vt)=>(W.disabledSectionsIds.includes(vt.id)||xe.value&&!xe.value.isVideoTabVisible&&vt.id===2||W.clientPrivilegesBySeasons&&vt.id===7||(L.value||vt.id!==5&&vt.id!==6)&&ot.push(vt.name),ot),[]));function Ze(ot){if(d.value.is_live||d.value.game_status===1||d.value.game_status===0){const vt=ot.playingAs.has(d.value.playingAs);return W.clientPrivilegesBySeasons.canPlayVideos&&vt}else{const vt=Oe.value.filter(yt=>ot.playingAs.has(yt.playingAs));return W.clientPrivilegesBySeasons.canPlayVideos&&vt.length>0}}const xe=t.computed(()=>{if(W.clientPrivilegesBySeasons){if(r.value&&d.value&&d.value.game_id){const ot=W.clientPrivilegesBySeasons.seasonsAndPrivileges.get(r.value.id);if(ot)if(Fe(ot.playingAs),(d.value.is_live||d.value.game_status===1||d.value.game_status===0)&&s.state.nextGeneral.showLiveData){const vt=ot.playingAs.has(d.value.playingAs);return{seasonAndPrivileges:ot,canPrivilegesTeamPlayVideos:W.clientPrivilegesBySeasons.canPlayVideos&&vt,isPrivilegesTeamOnly:!1,isPrivilegesTeamHome:d.value.home_team.team_id===ot.teamId,homeTeamDetails:{canPlayVideos:vt,team:d.value.home_team},awayTeamDetails:{canPlayVideos:vt,team:d.value.visiting_team},isVideoTabVisible:Ze(ot)}}else{const vt=d.value.home_team.team_id===ot.teamId,yt=Oe.value.filter(Ut=>ot.playingAs.has(Ut.playingAs));return{seasonAndPrivileges:ot,canPrivilegesTeamPlayVideos:W.clientPrivilegesBySeasons.canPlayVideos&&yt.length>0,isPrivilegesTeamOnly:!0,isPrivilegesTeamHome:vt,homeTeamDetails:{canPlayVideos:W.clientPrivilegesBySeasons.canPlayVideos&&vt&&yt.length>0,team:d.value.home_team},awayTeamDetails:{canPlayVideos:W.clientPrivilegesBySeasons.canPlayVideos&&!vt&&yt.length>0,team:d.value.visiting_team},isVideoTabVisible:Ze(ot)}}Fe(new Set)}return ae}return null}),Oe=t.computed(()=>{if(W.clientPrivilegesBySeasons){if(r.value){const ot=W.clientPrivilegesBySeasons.seasonsAndPrivileges.get(r.value.id);if(ot)return re.value.filter(vt=>vt.game_status===1&&ot.playingAs.has(vt.playingAs))}return[]}return[]});t.watch(Xe,()=>{xe.value&&!xe.value.canPrivilegesTeamPlayVideos&&(J.value.id===2||J.value.id===7||J.value.id===8)&&We("Resumen")},{deep:!0,immediate:!0});function Fe(ot){E.value=ot}function We(ot){if(s.commit("nextGeneral/updateShowLiveData",!0),w.value!=null&&(clearInterval(w.value),w.value=null),T.value!=null&&(clearInterval(T.value),T.value=null),A.value!=null&&(clearInterval(A.value),A.value=null),I.value!=null&&(clearInterval(I.value),I.value=null),C.value.length>0){for(let vt of C.value)clearInterval(vt);C.value=[]}W.isWidget?J.value=O.value.find(vt=>vt.name===ot)||O.value[1]:J.value=O.value.find(vt=>vt.name===ot)||O.value[0]}t.onMounted(()=>{Ee(),t.nextTick(()=>{W.isSynchronization&&We("Táctica Fija")})}),t.onBeforeUnmount(()=>{if(G&&G.disconnect(),w.value!=null&&(clearInterval(w.value),w.value=null),T.value!=null&&(clearInterval(T.value),T.value=null),A.value!=null&&(clearInterval(A.value),A.value=null),I.value!=null&&(clearInterval(I.value),I.value=null),C.value.length>0){for(let ot of C.value)clearInterval(ot);C.value=[]}e6()});function et(ot){if(ot.playingAs||(ot.playingAs=$.value?ot.home_team.team_id===$.value?1:2:0),w.value!=null&&(clearInterval(w.value),w.value=null),T.value!=null&&(clearInterval(T.value),T.value=null),A.value!=null&&(clearInterval(A.value),A.value=null),I.value!=null&&(clearInterval(I.value),I.value=null),C.value.length>0){for(let vt of C.value)clearInterval(vt);C.value=[]}d.value=ot,ot.is_live&&ot.game_status===4?Kw():Qw()}function tt(ot){re.value=ot.map(vt=>{const yt={...vt};return $.value&&(yt.playingAs=yt.home_team.team_id===$.value?1:2),yt})}return(ot,vt)=>(t.openBlock(),t.createElementBlock("div",{class:"game-data",ref_key:"gamedata",ref:H},[t.createElementVNode("div",tFt,[t.withDirectives(t.createElementVNode("div",aFt,[t.createVNode(t.unref(ZT),{"current-season-id":e.currentSeasonId,"tournaments-ids-to-include":e.tournamentsIdsToInclude,"api-url":e.tournamentsApiUrl,"list-height":"370px","are-female-visible":e.areFemaleTournamentsVisible,"is-clubes-active":e.isClubes,"is-female-mode":e.isFemaleMode,onInput:Pe,onChangeTournaments:Pe},null,8,["current-season-id","tournaments-ids-to-include","api-url","are-female-visible","is-clubes-active","is-female-mode"]),t.createVNode(t.unref(qT),{"current-season-id":e.currentSeasonId,"list-height":"370px",seasons:g.value.seasons,onInput:Ue},null,8,["current-season-id","seasons"])],512),[[t.vShow,e.areTournamentAndSeasonSelectsVisible]]),t.createElementVNode("div",rFt,[t.createVNode(t.unref(iK),{"plays-live":P.value,"info-live":M.value,token:B.value,is_captured:a.value,"await-for-seasons":"",seasons:ee.value,"is-pagination-visible":!1,"are-games-carousel-type":"","default-game-id":e.defaultGameId,"sort-calendar":e.sortCalendar,"is-team-game-per-page":e.isTeamGamePerPage,"client-privileges-team-id":$.value,"only-games-team-id":$.value,"tournament-type":t.unref(s).state.gameGlobal.tournamentType,onChangeGameCarousel:et,onOpenModalEvent:ke,onChangeGamesByClientPrivileges:tt},null,8,["plays-live","info-live","token","is_captured","seasons","default-game-id","sort-calendar","is-team-game-per-page","client-privileges-team-id","only-games-team-id","tournament-type"])])]),b.value?(t.openBlock(),t.createBlock(Rz,{key:0,width:U.value,onCloseModalEventsLive:Q,plays:P.value,game:d.value,type:S.value},null,8,["width","plays","game","type"])):t.createCommentVNode("",!0),t.createElementVNode("div",nFt,[d.value&&"live_stats"in d.value&&d.value.live_stats==0&&d.value.game_status==0?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[U.value>500?(t.openBlock(),t.createElementBlock("div",iFt,vt[0]||(vt[0]=[t.createElementVNode("div",{class:"no-stats-content"},[t.createElementVNode("h2",{class:"no-stats-title"}," Este partido se publicará en un plazo de hasta 72 horas después de finalizada la jornada. ")],-1)]))):(t.openBlock(),t.createElementBlock("div",oFt,vt[1]||(vt[1]=[t.createElementVNode("div",{class:"no-stats-content"},[t.createElementVNode("h2",{class:"no-stats-title"}," Este partido se publicará en un plazo de hasta 72 horas después de finalizada la jornada. ")],-1)])))],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createElementVNode("div",sFt,[t.createElementVNode("div",lFt,[t.createVNode(t.unref(Ek),{type:2,buttons:Xe.value,"font-family":"Poppins-Regular","font-size":"16px",width:U.value<400||U.value<700?"max-content":U.value<840||U.value<1050?"155px":"165px","selected-option":J.value.name,borderWidth:"1px",arrow:!1,height:"30px",onInput:We},null,8,["buttons","width","selected-option"])])]),Te.value&&Te.value.gameId?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(J.value.componentName),{key:V.value,game:Te.value,"is-widget":e.isWidget,"team-widget":e.teamWidget,onIntervalidpossesion:le,onIntervalidhighlive:ne,onIntervalidtops:he,onIntervalidgs:pe,subsection:t.unref(q),seasonSelected:r.value,tournamentSelected:g.value,showLineups:L.value,socket:e.socket,"time-live-prominent-data":y,"time-live-highlights-prominent-and-video":x,"time-live-possesion":u,"time-live-video-goals":n,"time-live-video-best-plays":i,"time-live-video-this-game":f,"time-live-video-specific-plays":l,"time-live-comparative-best-players":h,"time-live-comparative-avanced":m,is_captured:a.value,"is-tactic-visible":!!r.value.show_tactic,"is-synchronization":e.isSynchronization,"can-play-videos":xe.value?xe.value.canPrivilegesTeamPlayVideos:!0,"video-privileges-playing-as":E.value,"client-privileges-team-id":$.value,"play-videos-privileges":xe.value,token:B.value,"game-events-interval-minutes":e.gameEventsIntervalMinutes,"volumetric-field-interval-minutes":e.volumetricFieldIntervalMinutes,"chalkboard-interval-minutes":e.chalkboardIntervalMinutes,"is-female-mode":e.isFemaleMode,onResetSubsection:Ne,onOpenmedia:Ie,onOnOpenProfile:ge,onOpenProfileTeam:Ce,onOpenProfilePlayer:we,onChangeToTab:Ve,onOpenMediaPlayer:Ie,onIntervalid:de},null,40,["game","is-widget","team-widget","subsection","seasonSelected","tournamentSelected","showLineups","socket","is_captured","is-tactic-visible","is-synchronization","can-play-videos","video-privileges-playing-as","client-privileges-team-id","play-videos-privileges","token","game-events-interval-minutes","volumetric-field-interval-minutes","chalkboard-interval-minutes","is-female-mode"])):t.createCommentVNode("",!0)],64))])],512))}}),[["__scopeId","data-v-37215e37"]]);async function Ah({url:e,options:o={},retries:s=3}){return await bu.get(e,o).then(z=>z).catch(z=>s>0?Ah({url:e,options:o,retries:s-1}):z)}async function _H({seasonId:e},o=!0){try{return(await(await fetch(`https://golstats-microservices.s3-us-west-2.amazonaws.com/statsLeagueBySeason-${e}.json`)).json()).data}catch(s){if(o)return _H({seasonId:e},!1);throw new Error(s)}}async function dFt({seasonId:e}){try{return(await Ah({url:`https://iwxfzq6e2h.execute-api.us-west-2.amazonaws.com/prod/v2/statisticsLeagueBySeason/${e}`})).data.data}catch(o){return Promise.reject(o)}}async function hFt({seasonId:e}){try{return(await Ah({url:`https://sqf4rkvoge.execute-api.us-west-2.amazonaws.com/prod/v3/statisticsGroupedBySeason/${e}`})).data.data}catch(o){return Promise.reject(o)}}function pFt(e,o,s,z,W,v,g=!1){const r=s.map(b=>b===1?2:b===2?1:3);return e.filter(b=>{const d=v&&b[W.teamId]?b[W.teamId]!==v:!1,a=o===1?2:1;return(g||z.includes(b[W.gameId]))&&(!o||(d?a:o)===b[W.playingAs])&&(s.includes(b[W.matchResult])&&b[W.teamId]===v||r.includes(b[W.matchResult])&&b[W.teamId]!==v)})}function wH(e,o,s,z,W){return o.length===2&&s.length===3&&z.length===6?e:e.filter(v=>o.includes(v[W.playingAs])&&s.includes(v[W.matchResult])&&z.includes(v[W.section]))}async function kH({seasonId:e}){try{const o=`https://8tvo5bp9ai.execute-api.us-west-2.amazonaws.com/prod/gamesBySeason/${e}`;return(await Ah({url:o})).data}catch(o){return Promise.reject(o)}}async function fFt({seasonId:e,gameId:o}){try{const s=`https://iwxfzq6e2h.execute-api.us-west-2.amazonaws.com/prod/v2/statisticsLeagueBySeason/${e}/games/${o}`,{data:z}=await Ah({url:s});return z}catch(s){return Promise.reject(s)}}async function mFt({gameId:e}){try{const o=`https://2uj7ojhmt5.execute-api.us-west-2.amazonaws.com/prod/V2/statisticsLive/${e}`;return(await Ah({url:o})).data.data}catch(o){return Promise.reject(o)}}async function gFt({gameId:e}){try{const o=`https://55sbpmq0f5.execute-api.us-west-2.amazonaws.com/prod/specialMentions/${e}`;return(await Ah({url:o})).data.data||[]}catch(o){return Promise.reject(o)}}const yFt=["categoryId","matchLapse","section","matchResult","playingAs","total"];let AT=null;function SH(){return AT||(AT=vy(yFt)),AT}async function vFt(e){try{const o=`https://d2oco6mqmc.execute-api.us-west-2.amazonaws.com/prod/teamsBySeason/${e.seasonId}`;return(await Ah({url:o})).data}catch(o){return Promise.reject(o)}}async function TH({seasonId:e,teamId:o}){try{return await Ah({url:`https://a4dcb6avog.execute-api.us-west-2.amazonaws.com/prod/v2/statisticsTeamBySeason/${e}/${o}`})}catch(s){return Promise.reject(s)}}async function bFt(e){try{const o=`https://yjeig444bb.execute-api.us-west-2.amazonaws.com/prod/teamsBySeason/${e.seasonId}`;return await Ah({url:o})}catch(o){return Promise.reject(o)}}async function xFt(e){try{return await Ah({url:`https://nckawv8v3b.execute-api.us-west-2.amazonaws.com/prod/v2/statisticsByGame/${e.gameId}`})}catch(o){return Promise.reject(o)}}const _Ft={leagueGeneral:{namespaced:!0,state:{seasonPlays:[],currentSeasonGames:[],currentSeasonTeams:[],selectedRound:1,booleanAreLiveGames:!1,booleanIsLiveGamesModalOpen:!1},getters:{seasonPlays:e=>e.seasonPlays,filteredPlaysStack(e,o,s,z){return pFt(e.seasonPlays,z["filterGeneral/getPlayingAs"],z["filterGeneral/getResults"],z["filterGeneral/getSelectedGamesIds"],SH(),z["teamsGeneral/team"].team_id,!0)},nextGamesSchedule(e){const o=e.currentSeasonGames.reduce((s,z)=>{const W={...z};return W.home_team=e.currentSeasonTeams.find(v=>v.team_id===z.home_team),W.visiting_team=e.currentSeasonTeams.find(v=>v.team_id===z.visiting_team),s[z.matchday_abbreviation]?s[z.matchday_abbreviation][z.game_status===3?"canceled":z.date]?s[z.matchday_abbreviation][z.game_status===3?"canceled":z.date].push(W):s[z.matchday_abbreviation][z.game_status===3?"canceled":z.date]=[W]:s[z.matchday_abbreviation]={[z.game_status===3?"canceled":z.date]:[W]},s},{});for(let[s,z]of Object.entries(o))o[s]=Object.entries(z).map(([W,v])=>({date:W,games:v})),o[s].sort((W,v)=>W.date<v.date?-1:W.date>v.date?1:0);return o},matchdaysDates(e,o){let s=[];if(o.nextGamesSchedule){let z=Object.keys(o.nextGamesSchedule);for(let W of z){let v=Number(W.replace("M","")),g=o.nextGamesSchedule[W].map(r=>({matchday:v,date:new Date(r.date)}));s=s.concat(g)}}return s},closestMatchDay(e,o){let s=new Date,z=0,W=-new Date(0,0,0).valueOf(),v=o.matchdaysDates,g=v.length;for(let r=0;r<v.length;r++)z=Math.abs(v[r].date-s),z<W&&(g=r,W=z);return v[g]?v[g].matchday:1}},mutations:{setBooleanIsLiveGamesModalOpen(e,o){e.booleanIsLiveGamesModalOpen=o},setBooleanAreLiveGames(e,o){e.booleanAreLiveGames=o},updateSeasonPlays(e,o){e.seasonPlays=o},updateCurrentSeasonTeams(e,o){e.currentSeasonTeams=o},updateCurrentSeasonGames(e,o){e.currentSeasonGames=o},updateSelectedRound(e,o){e.selectedRound=o}},actions:{async getSeasonPlays({commit:e,rootGetters:o},s=!1){try{const z=await _H({seasonId:o["filterGeneral/getSeasonId"]});if(s)return z;e("updateSeasonPlays",z)}catch(z){return Promise.reject(z)}},async getCurrentSeasonGames({commit:e,rootGetters:o}){try{const s=await kH({seasonId:o["loginGeneral/seasonId"]});e("updateCurrentSeasonGames",s)}catch(s){return Promise.reject(s)}},async getCurrentSeasonTeams({commit:e,rootGetters:o}){try{const s=await vFt({seasonId:o["loginGeneral/seasonId"]});e("updateCurrentSeasonTeams",s.teams)}catch(s){return Promise.reject(s)}},async isDataFilled({state:e,dispatch:o,commit:s}){try{if(e.currentSeasonGames.length>0&&e.currentSeasonTeams.length>0)return s("setIsSectionLoading",!1,{root:!0}),!0;const z=[void 0,void 0];return e.currentSeasonGames.length===0&&(z[0]=o("getCurrentSeasonGames")),e.currentSeasonTeams.length===0&&(z[1]=o("getCurrentSeasonTeams")),await Promise.all(z),!1}catch(z){throw new Error(z)}}}}};async function wFt({filter:e}){try{const o=`https://n7ielynjxk.execute-api.us-east-2.amazonaws.com/qa/filters?filters=${e}`,{data:s}=await Ah({url:o});return s}catch(o){return Promise.reject(o)}}const kFt=["categoryId","teamId","matchResult","playingAs","matchLapse","section","total"];let MT=null;function SFt(){return MT||(MT=vy(kFt)),MT}class F4{constructor(){yu(this,"maximumLiveSection",1);yu(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:[]});yu(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(o){o>this.maximumLiveSection&&(this.maximumLiveSection=o)}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(o,s,z){z&&(this.setMaximumLiveSection(o),this.accomplished.totalLive+=s,this.accomplished.totalsLiveTrendLive.sections[o-1]+=s,this.increaseTrendLiveAccumulatedByOne(this.accomplished.totalsLiveTrendLive,o,s)),this.accomplished.totalPostGame+=s,this.accomplished.avgPostGameTrendLive.sections[o-1]+=s,this.increaseTrendLiveAccumulatedByOne(this.accomplished.avgPostGameTrendLive,o,s)}increaseReceivedByOne(o,s,z){z&&(this.setMaximumLiveSection(o),this.received.totalLive+=s,this.received.totalsLiveTrendLive.sections[o-1]+=s,this.increaseTrendLiveAccumulatedByOne(this.received.totalsLiveTrendLive,o,s)),this.received.totalPostGame+=s,this.received.avgPostGameTrendLive.sections[o-1]+=s,this.increaseTrendLiveAccumulatedByOne(this.received.avgPostGameTrendLive,o,s)}increaseTrendLiveAccumulatedByOne(o,s,z){for(let W=s-1;W<o.accumulated.length;W++)o.accumulated[W]+=z}decreaseAccomplishedLiveByOne(o,s){this.accomplished.totalLive>0&&(this.accomplished.totalLive-=s),this.accomplished.totalsLiveTrendLive.sections[o-1]>0&&(this.accomplished.totalsLiveTrendLive.sections[o-1]-=s,this.decreaseTotalsLiveTrendLiveAccumulatedByOne(this.accomplished.totalsLiveTrendLive,o,s))}decreaseReceivedLiveByOne(o,s){this.received.totalLive>0&&(this.received.totalLive-=s),this.received.totalsLiveTrendLive.sections[o-1]>0&&(this.received.totalsLiveTrendLive.sections[o-1]-=s,this.decreaseTotalsLiveTrendLiveAccumulatedByOne(this.received.totalsLiveTrendLive,o,s))}decreaseTotalsLiveTrendLiveAccumulatedByOne(o,s,z){for(let W=o.accumulated.length-1;W>=s-1;W--)o.accumulated[W]-=z}calculateAvg(o){o&&(this.accomplished.avgPostGame=this.accomplished.totalPostGame/o,this.received.avgPostGame=this.received.totalPostGame/o,this.accomplished.avgPostGameTrendLive.sections=this.getAvgPostGameTrendLiveAvg(this.accomplished.avgPostGameTrendLive.sections,o),this.accomplished.avgPostGameTrendLive.accumulated=this.getAvgPostGameTrendLiveAvg(this.accomplished.avgPostGameTrendLive.accumulated,o),this.received.avgPostGameTrendLive.sections=this.getAvgPostGameTrendLiveAvg(this.received.avgPostGameTrendLive.sections,o),this.received.avgPostGameTrendLive.accumulated=this.getAvgPostGameTrendLiveAvg(this.received.avgPostGameTrendLive.accumulated,o))}getAvgPostGameTrendLiveAvg(o,s){return o.map(z=>z/s)}calculateRanking(o,s,z,W,v,g,r,b){let d=[];W===3&&o&&o.length&&(z.playingAs.length!==2||z.matchResult.length!==3)?d=Array.from(o.reduce((_,y)=>{const x=y[s.playingAs]===1,u=x?"1":"2",n=_.get(y[s.gameId]);if(n)n[u]?n[u].arrayPlays.push(y):n[u]={numberTeamId:y[s.teamId],arrayPlays:[y]};else{const i={numberMatchResult:y[s.matchResult]};x&&(i[1]={numberTeamId:y[s.teamId],arrayPlays:[y]}),_.set(y[s.gameId],i)}return _},new Map).values()).reduce((_,y)=>{const x=z.playingAs.length===2?"both":z.playingAs[0].toString();return(x==="both"&&(y[1].numberTeamId===z.teamId||y[2].numberTeamId===z.teamId)||x!=="both"&&y[x].numberTeamId===z.teamId)&&z.matchResult.includes(y.numberMatchResult)&&_.push(...y[1].arrayPlays,...y[2].arrayPlays),_},[]).filter(_=>z.sections.includes(_[s.section])):(d=o?[...o]:[],r&&o&&(d=o.filter(a=>z.playingAs.includes(a[s.playingAs])&&z.matchResult.includes(a[s.matchResult])&&z.sections.includes(a[s.section])))),this.setTeamRanking(d,W,s,z.teamId,g,"accomplished",b)}setTeamRanking(o,s,z,W,v,g,r){let b=null,d=null;s===3&&(b=new Map,d={},o.forEach(y=>{const x=b.get(y[z.gameId]);x?x[y[z.teamId.toString()]]?x[y[z.teamId.toString()]]+=y[z.total]:x[y[z.teamId.toString()]]=y[z.total]:b.set(y[z.gameId],{[y[z.teamId.toString()]]:y[z.total]})}),Array.from(b.values()).forEach(y=>{const[x,u]=Object.keys(y).map(i=>i),n=y[x]+y[u];this.addPassesAvgByTeam(d,x,n?y[x]/n:0),this.addPassesAvgByTeam(d,u,n?y[u]/n:0)}));const a=v.sort((y,x)=>y.team_id-x.team_id).map(y=>{if(s===3){const x=d[y.team_id.toString()];return{teamId:y.team_id,points:x?x.numberTotalPassesAvg/x.numberGamesCount:0,total:x?x.numberTotalPassesAvg:0}}else{const x=o.reduce((u,n)=>n[z.teamId]===y.team_id&&s===n[z.categoryId]?u+n[z.total]:u,0);return{teamId:y.team_id,points:y[`${r}FilterGames`]?x/y[`${r}FilterGames`]:0,total:x}}}).sort((y,x)=>x.points-y.points);this.accomplished.arrayRankings=a;const _=a.findIndex(y=>y.teamId===W);s===3&&(this.accomplished.avgPreGame=a[_].points),this[g].ranking=_+1,this[g].leader=a[0]}addPassesAvgByTeam(o,s,z){o[s]?(o[s].numberGamesCount+=1,o[s].numberTotalPassesAvg+=z):o[s]={numberGamesCount:1,numberTotalPassesAvg:z}}}class nc{constructor(o,s,z,W,v,g,r,b,d,a,_=!0){yu(this,"id","");yu(this,"generalId",0);yu(this,"name","");yu(this,"names",{"0-0":"","1-1":"","0-1":"","1-0":""});yu(this,"mentions",{"0-0":"","1-1":"","0-1":"","1-0":""});yu(this,"accomplishedCategoryIds",[]);yu(this,"receivedCategoryIds",[]);yu(this,"generalCategoriesIds",{accomplished:0,received:0});yu(this,"specialMention","");yu(this,"homeTeam",new F4);yu(this,"visitingTeam",new F4);yu(this,"isLeagueDataCalculated",!1);yu(this,"leagueAccomplishedMax",0);yu(this,"leagueReceivedMax",0);yu(this,"leagueAccomplishedAvg",0);yu(this,"leagueReceivedAvg",0);yu(this,"leagueAccomplishedAccumulator",0);yu(this,"leagueReceivedAccumulator",0);yu(this,"homeTeamType","homeTeam");yu(this,"visitingTeamType","visitingTeam");yu(this,"betOnly",!1);yu(this,"isPercent",!1);this.id=`${z.accomplished}-${z.received}`,this.accomplishedCategoryIds=o||[],this.receivedCategoryIds=s||[],this.generalCategoriesIds=z||{accomplished:0,received:0},this.name=W,this.names["0-0"]=W||"",this.names["1-1"]=v||"",this.names["0-1"]=g||"",this.names["1-0"]=r||"",this.generalId=b||0,this.betOnly=d||!1,this.isPercent=a||!1,this.isVisible=_}addLeaguePlays(o,s,z){o.length===0||!z||this.isLeagueDataCalculated||(o.forEach(W=>{this.isAccomplishedLeaguePlay(W[s.categoryId])&&(this.leagueAccomplishedAccumulator+=W[s.total]),this.isReceivedLeaguePlay(W[s.categoryId])&&(this.leagueReceivedAccumulator+=W[s.total])}),this.leagueAccomplishedAvg=(this.leagueAccomplishedAccumulator/(2*z)).toFixed(2),this.leagueAccomplishedMax=Math.round(this.leagueAccomplishedAvg*1.5),this.leagueReceivedAvg=(this.leagueReceivedAccumulator/(2*z)).toFixed(2),this.leagueReceivedMax=Math.round(this.leagueReceivedAvg*1.5),this.isLeagueDataCalculated=!0)}addSpecialMention(o,s,z){let W="-";for(const[v,g]of Object.entries(this.generalCategoriesIds))o===g&&(W=`${v==="accomplished"?"0":"1"}${W}`),s===g&&(W=`${W}${v==="accomplished"?"0":"1"}`);W.length===3&&(this.mentions[W]=z)}resetMentions(){this.mentions={"0-0":"","1-1":"","0-1":"","1-0":""}}addTeamPlays(o,s,z,W,v){!z||!v||o!==this.homeTeamType&&o!==this.visitingTeamType||(z.forEach(g=>{this.isAccomplishedPlay(g[W.categoryId])?this[o].increaseAccomplishedByOne(g[W.section],g[W.total]):this.isReceivedPlay(g[W.categoryId])&&this[o].increaseReceivedByOne(g[W.section],g[W.total])}),this[o].calculateAvg(v))}addLivePlay(o,s,z,W,v=!1,g=!1){(o===this.homeTeamType||o===this.visitingTeamType)&&z[W.categoryId].includes(this.generalCategoriesIds.accomplished)&&this[o].increaseAccomplishedByOne(z[W.section],z[W.total],!0)}subtractLivePlay(o,s,z,W,v){(o===this.homeTeamType||o===this.visitingTeamType)&&(this.isAccomplishedPlay(z[W.categoryId])&&!v?this[o].decreaseAccomplishedLiveByOne(z[W.section],z[W.total]):this.isReceivedPlay(z[W.categoryId])&&v&&this[o].decreaseReceivedLiveByOne(z[W.section],z[W.total]))}isAccomplishedLeaguePlay(o){return!!(this.receivedCategoryIds[0]===40?this.receivedCategoryIds:this.accomplishedCategoryIds).find(z=>o===z||`${o}_r`===z)}isReceivedLeaguePlay(o){return!!this.receivedCategoryIds.find(s=>o===s)}isAccomplishedPlay(o){return this.generalCategoriesIds.accomplished===o}isReceivedPlay(o){return this.generalCategoriesIds.received===o}calcRankingLeague(o,s,z,W,v,g=!1){this[this.homeTeamType].calculateRanking(o,s,z,this.generalCategoriesIds.accomplished,this.generalCategoriesIds.received,v,g,this.homeTeamType),this[this.visitingTeamType].calculateRanking(o,s,W,this.generalCategoriesIds.accomplished,this.generalCategoriesIds.received,v,g,this.visitingTeamType)}resetData(){this.homeTeam=new F4,this.visitingTeam=new F4,this.isLeagueDataCalculated=!1,this.leagueAccomplishedMax=0,this.leagueReceivedMax=0,this.leagueAccomplishedAvg=0,this.leagueReceivedAvg=0,this.leagueAccomplishedAccumulator=0,this.leagueReceivedAccumulator=0}isInGeneralCategory(o){return this.generalCategoriesIds.accomplished===o||this.generalCategoriesIds.received===o}}const TFt={general:{name:"General",priority:1,parentInfo:{parentAnalysis:[1],analysisTypeBlocks:[1]},subcategories:{goals:new nc([12,55,"35_r","54_r"],null,{accomplished:1,received:0},"Goles","Goles recibidos","Goles realizados / recibidos","Goles recibidos / realizados",1),shotToGoal:new nc([91,95,158,167,176,343,330,333,423],null,{accomplished:2,received:0},"Remates a destino","","","",1),possession:new nc([2,3,20,21],null,{accomplished:3,received:0},"Posesión","","","",1,!1,!0,!1),yellowCards:new nc([14,52],null,{accomplished:4,received:0},"Tarjetas amarillas","","","",1),redCards:new nc([15,53],null,{accomplished:5,received:0},"Tarjetas rojas","","","",1),centerCrosses:new nc([13,25],null,{accomplished:6,received:0},"Centros totales","","","",1)}},offensive:{name:"Ofensivo",priority:2,parentInfo:{parentAnalysis:[1],analysisTypeBlocks:[1]},subcategories:{shotsOnGoal:new nc([19],null,{accomplished:7,received:0},"Tiros a gol","","","",1),shotsOnGoalDestination:new nc([91,95],null,{accomplished:8,received:0},"Tiros a gol destino","","","",1),shotToGoal:new nc([91,95,158,167,176,343,330,333,423],null,{accomplished:2,received:0},"Remates a destino","","","",1),ballsWonOpponentPenaltyBox:new nc([11],null,{accomplished:10,received:0},"Balones ganados área rival","","","",1),centersFromRight:new nc([25],null,{accomplished:11,received:0},"Centros por derecha","","","",1),centersFromLeft:new nc([13],null,{accomplished:12,received:0},"Centros por izquierda","","","",1),success1VS1:new nc([4],null,{accomplished:13,received:0},"Enfrentamientos ofensivos exitosos","","","",1),unsuccess1VS1:new nc([208],null,{accomplished:14,received:0},"Enfrentamientos ofensivos no exitosos","","","",1)}},defensive:{name:"Defensivo",priority:3,parentInfo:{parentAnalysis:[1],analysisTypeBlocks:[1]},subcategories:{saves:new nc([39],null,{accomplished:15,received:0},"Atajadas","","","",1),ballsWonOwnPenaltyBox:new nc([23],null,{accomplished:16,received:0},"Balones ganados área propia","","","",1),success1VS1:new nc([5],null,{accomplished:17,received:0},"Enfrentamientos defensivos exitosos","","","",1),unsuccess1VS1:new nc([209],null,{accomplished:18,received:0},"Enfrentamientos defensivos no exitosos","","","",1),aerialGame:new nc([24],null,{accomplished:19,received:0},"Juego aéreo resto del campo","","","",1),clearances:new nc([34],null,{accomplished:20,received:0},"Rechaces","","","",1)}},possession:{name:"Posesión",priority:4,parentInfo:{parentAnalysis:[1],analysisTypeBlocks:[1]},subcategories:{totalPasses:new nc([2,3,20,21],null,{accomplished:21,received:0},"Pases totales","","","",1),successPasses:new nc([2,20],null,{accomplished:22,received:0},"Pases acertados","","","",1),successPassesRivalHalf:new nc([20],null,{accomplished:23,received:0},"Pases acertados en cancha rival","","","",1),ballsRecoveredInChallenge:new nc([483],null,{accomplished:24,received:0},"Balones recuperados en disputa","","","",1),ballsRecoveredWithoutChallenge:new nc([484],null,{accomplished:25,received:0},"Balones recuperados sin disputa","","","",1),ballsLostInChallenge:new nc([494],null,{accomplished:26,received:0},"Balones perdidos en disputa","","","",1),ballsLostWithoutChallenge:new nc([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 nc([155,164,173,362,371,380],null,{accomplished:28,received:0},"Tiros libres 4/4","","","",1),freeKick34:new nc([150,357],null,{accomplished:29,received:0},"Tiros libres 3/4","","","",1),freeKickOwnHalf:new nc([149,356],null,{accomplished:30,received:0},"Tiros libres cancha propia","","","",1),cornerFromRight:new nc([32],null,{accomplished:31,received:0},"Tiros de esquina por derecha","","","",1),cornerFromLeft:new nc([31],null,{accomplished:32,received:0},"Tiros de esquina por izquierda","","","",1),goalKick:new nc([264,28],null,{accomplished:33,received:0},"Saques de meta","","","",1)}},penalties:{name:"Infracciones",priority:6,parentInfo:{parentAnalysis:[1],analysisTypeBlocks:[1]},subcategories:{totalFouls:new nc([17,50],null,{accomplished:34,received:0},"Faltas totales","","","",1),foulOwnGoal:new nc([348,478],null,{accomplished:35,received:0},"Faltas cerca de su propia portería","","","",1),fieldFouls:new nc([349,350,479,480],null,{accomplished:36,received:0},"Faltas resto del campo","","","",1),penaltyKick:new nc([461,481],null,{accomplished:37,received:0},"Penales cometidos","","","",1),offside:new nc([33],null,{accomplished:38,received:0},"Fueras de lugar","","","",1)}}},CFt=[{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}],EFt=["teamId","categoryId","matchlapse","section","matchResult","playingAs","total","gameId"];let PT=null;function AFt(){return PT||(PT=vy(EFt)),PT}const MFt=["playId","gameId","teamId","playerId","momentOfPlay","categoryId","categoryType","matchLapse","section","matchResult","playingAs","total","coordinate1X","coordinate1Y","coordinate2X","coordinate2Y","coordinate3X","coordinate3Y"];let IT=null;function PFt(){return IT||(IT=vy(MFt)),IT}function R4(e,o,s){return[s.get(e[o.categoryId])||[],e[o.teamId],e[o.matchResult],e[o.playingAs],e[o.matchLapse],e[o.section],e[o.total]]}function CH(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 LT(e,o,s){let z=[...o];return e[s.categoryId]===2&&(z[0]=14),e[s.categoryId]===20&&(z[0]=15),[14,15].includes(z[0])?z:null}const IFt=$w(),LFt=[{name:"Liga MX",id:1},{name:"Liga MX Femenil",id:1001},{name:"Liga Expansión MX",id:1071}],BFt={nextGeneral:{namespaced:!0,state:{seasonId:0,pastSeasonId:0,usePastSeasonId:!1,isSocketConnected:!1,indexesLP:SH(),indexesTSP:SFt(),indexesLS:AFt(),indexesTLP:PFt(),nextGamesDataStructure:TFt,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:!0,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(o=>o.id)},showPostMatchData:e=>e.showPostMatch,getHomeResultGame:e=>e.homeResultGame,getAwayResultGame:e=>e.awayResultGame,getSeasonId:e=>e.seasonId,getGameForAnalysis:e=>e.gameForAnalysis,isLive:e=>e.isLive,showLive:e=>e.gameForAnalysis.game_status===4&&e.gameForAnalysis.is_live,menuOptionActive:e=>e.menuOptionActive,showLiveData:e=>e.showLiveData,showAdvanceFilter:e=>e.showAdvanceFilter,idAssetSelected:e=>e.idAssetSelected,gameId:e=>e.gameId,game:e=>e.game,homeTeam(e){return e.homeTeamInfo},visitingTeam(e){return e.awayTeamInfo},rankingData(e){return e.statistics},homeTeamStatisticsType(e){return e.homeTeamFilter.statistics?"received":"accomplished"},visitingTeamStatisticsType(e){return e.visitingTeamFilter.statistics?"received":"accomplished"},subcategoryName(e){return`${e.homeTeamFilter.statistics}-${e.visitingTeamFilter.statistics}`},statisticsTypes(e){return CFt.filter(o=>o.parentAnalysis.includes(e.selectedAnalysis.id))},homeTeamFilteredPlays(e){if(e.homeTeamFilter.requiresPlaysFiltering)return wH(e.homeTeamPlays,e.homeTeamFilter.playingAs,e.homeTeamFilter.matchResult,e.homeTeamFilter.sections,e.indexesTSP)},visitingTeamFilteredPlays(e){if(e.visitingTeamFilter.requiresPlaysFiltering)return wH(e.visitingTeamPlays,e.visitingTeamFilter.playingAs,e.visitingTeamFilter.matchResult,e.visitingTeamFilter.sections,e.indexesTSP)},currentSeasonTeamsIds(e){return e.currentSeasonTeams.map(o=>o.team_id)},canFilledStructure(e){return e.homeTeamFilter.requiresPlaysFiltering||e.visitingTeamFilter.requiresPlaysFiltering},totalFilteredHomeGames(e){return e.homeGames.filter(o=>e.homeTeamFilter.playingAs.includes(o[0])).filter(o=>e.homeTeamFilter.matchResult.includes(o[1])).reduce((o,s)=>o+s[2],0)},totalFilteredVisitingGames(e){return e.visitingGames.filter(o=>e.visitingTeamFilter.playingAs.includes(o[0])).filter(o=>e.visitingTeamFilter.matchResult.includes(o[1])).reduce((o,s)=>o+s[2],0)},filledDataStructure(e,o){if(e.currentSeasonPlays)for(const s of Object.values(e.nextGamesDataStructure))for(const z of Object.values(s.subcategories))e.homeTeamFilter.requiresPlaysFiltering&&z.homeTeam.resetTotals(),e.visitingTeamFilter.requiresPlaysFiltering&&z.visitingTeam.resetTotals(),z.addLeaguePlays(e.currentSeasonPlays,e.indexesLP,e.totalSeasonFinishedGames),z.addTeamPlays(z.homeTeamType,e.gameForAnalysis.home_team,o.homeTeamFilteredPlays,e.indexesTSP,e.showPostMatch?1:o.totalFilteredHomeGames),z.addTeamPlays(z.visitingTeamType,e.gameForAnalysis.visiting_team,o.visitingTeamFilteredPlays,e.indexesTSP,e.showPostMatch?1:o.totalFilteredVisitingGames);return e.nextGamesDataStructure},arrayFilledDataSortedByPriority(e,o){return Object.values(o.filledDataStructure).sort((s,z)=>s.priority-z.priority)},statisticData(e,o){for(const s of Object.values(o.filledDataStructure))if(s.parentInfo.parentAnalysis.includes(e.selectedAnalysis.id)&&s.parentInfo.analysisTypeBlocks.includes(e.selectedStatisticTypeBlock))return s.subcategories;return{}},accomplished(e){return e.homeTeamFilter.statistics===0}},mutations:{updateGameForAnalysisByProps(e,o){for(const[s,z]of Object.entries(o))e.gameForAnalysis[s]=z},setCurrentTournamentName(e,o){e.currentTournamentName=o},setBetSubcategoriesObjects(e,o){e.betSubcategoriesObjects=o},setRegularSeasonName(e,o){e.regularSeasonName=o},setBetSubcategories(e,o){e.betSubcategories=o},setBetDescription(e,o){e.betDescription=o},setSeasonId(e,o){e.seasonId=Number(o)},setHome(e,o){e.homeTeamInfo=o},setAway(e,o){e.awayTeamInfo=o},setMenuOptionActive(e,o){e.menuOptionActive=o},setPastSeasonId(e,o){e.pastSeasonId=o},setUsePastSeasonId(e,o){e.usePastSeasonId=o,o&&(e.oldSeasonId=e.pastSeasonId)},updateShowPostMatchData(e,o){e.showPostMatch=o},setHomeResultGame(e,o){e.homeResultGame=o},setAwayResultGame(e,o){e.awayResultGame=o},updateIsSocketConnected(e,o){e.isSocketConnected=o,o&&e.gameForAnalysis.is_live&&e.gameForAnalysis.game_status===4&&XE(`game.${e.gameForAnalysis.game_id}.v2`)},updateCurrentSeasonTeams(e,o){e.currentSeasonTeams=o,e.currentSeasonTeams.forEach(s=>{s.playedGames=e.currentSeasonGames.reduce((z,W)=>{if(W.game_status===1&&(W.home_team===s.team_id||W.visiting_team===s.team_id)){const v=W.score[0]-W.score[1],g=W.home_team===s.team_id;z.push({playingAs:g?1:2,matchResult:v===0?3:g?v>0?1:2:v<0?1:2})}return z},[])})},updateCurrentSeasonGames(e,o){e.currentSeasonGames=o},updateGameId(e,o){e.gameId=o},updateGameForAnalysis(e,o){e.gameForAnalysis=o,e.isLive=!!o.is_live,e.homeTeamFilter.teamId=e.gameForAnalysis.home_team,e.visitingTeamFilter.teamId=e.gameForAnalysis.visiting_team},updateSelectedAnalysis(e,o){e.selectedAnalysis=o},updateShowLiveData(e,o){e.showLiveData=o},toggleAdvanceFilter(e){e.showAdvanceFilter=!e.showAdvanceFilter},updateIdAssetSelected(e,o){e.idAssetSelected=o},updateStats(e,o){e.currentSeasonPlays=o},updateFilterAux(e){e.filterAux||(e.filterAux={homeTeamFilter:{...e.homeTeamFilter},visitingTeamFilter:{...e.visitingTeamFilter}})},updateFilters(e,{filters:o,needsFormat:s=!1}){if(s){if(!o||!o.local||!o.local.statistics||!o.visit||!o.visit.statistics)return;e.homeTeamFilter=$E(e.homeTeamFilter,o.local,e.gameForAnalysis.home_team),e.visitingTeamFilter=$E(e.visitingTeamFilter,o.visit,e.gameForAnalysis.visiting_team),e.selectedStatisticTypeBlock!==o.local.statistics.block&&(e.selectedStatisticTypeBlock=o.local.statistics.block)}else e.homeTeamFilter={...o.homeTeamFilter,statistics:0},e.visitingTeamFilter={...o.visitingTeamFilter,statistics:0}},updateFinishedGames(e,o){e.totalSeasonFinishedGames=o},updateHomeTeamPlays(e,o){e.homeTeamPlays=o},updateVisitingTeamPlays(e,o){e.visitingTeamPlays=o},addSpecialMentions(e,o){const s=Object.values(e.nextGamesDataStructure);s.forEach(z=>{for(const W of Object.values(z.subcategories))W.resetMentions()}),s.forEach(z=>{for(const W of o)for(const v of Object.values(z.subcategories))v.addSpecialMention(W[0],W[1],W[2])})},setDefaultFilter(e,o){e.defaultFilter={homeTeamFilter:{...o.homeTeamFilter,teamId:e.gameForAnalysis.home_team},visitingTeamFilter:{...o.awayTeamFilter,teamId:e.gameForAnalysis.visiting_team}}},addLiveGamePlay(e,o){if(!e.livePlays.has(o[e.indexesTLP.playId])){e.livePlays.set(o[e.indexesTLP.playId],o);const z=R4(o,e.indexesTLP,e.categoriesMap);for(const W of Object.values(e.nextGamesDataStructure))for(const v of Object.values(W.subcategories))v.addLivePlay(e.gameForAnalysis.home_team===z[e.indexesTSP.teamId]?"homeTeam":"visitingTeam",z[e.indexesTSP.teamId],z,e.indexesTSP,e.isLive,!1)}},updateLiveGamePlay(e,o){const s=!!o[e.indexesTLP.length],z=e.livePlays.get(o[e.indexesTLP.playId]);if(hte(z,o))return;let W="";const v=e.gameForAnalysis.home_team===o[e.indexesTLP.teamId]?"homeTeam":"visitingTeam";z&&(W=e.gameForAnalysis.home_team===z[e.indexesTLP.teamId]?"homeTeam":"visitingTeam");const g=R4(z,e.indexesTLP,e.categoriesMap),r=LT(z,g,e.indexesTLP),b=R4(o,e.indexesTLP,e.categoriesMap),d=LT(o,b,e.indexesTLP);for(const a of Object.values(e.nextGamesDataStructure))for(const _ of Object.values(a.subcategories))z&&(_.subtractLivePlay(W,g[e.indexesTSP.teamId],g,e.indexesTSP,s),r&&_.subtractLivePlay(W,r[e.indexesTSP.teamId],r,e.indexesTSP,s)),_.addLivePlay(v,b[e.indexesTSP.teamId],b,e.indexesTSP,e.isLive,s),d&&_.addLivePlay(v,d[e.indexesTSP.teamId],d,e.indexesTSP,e.isLive,s);e.livePlays.set(o[e.indexesTLP.playId],o)},deleteLiveGamePlay(e,o){const s=!!o[e.indexesTLP.length],z=e.livePlays.get(o[e.indexesTLP.playId]);let W="";if(z){W=e.gameForAnalysis.home_team===z[e.indexesTLP.teamId]?"homeTeam":"visitingTeam",e.livePlays.delete(z[e.indexesTLP.playId]);const v=R4(z,e.indexesTLP,e.categoriesMap),g=LT(o,v,e.indexesTLP);for(const r of Object.values(e.nextGamesDataStructure))for(const b of Object.values(r.subcategories))b.subtractLivePlay(W,v[e.indexesTSP.teamId],v,e.indexesTSP,s),g&&b.subtractLivePlay(W,g[e.indexesTSP.teamId],g,e.indexesTSP,s)}},clearLiveTotals(e){for(const o of Object.values(e.nextGamesDataStructure))for(const s of Object.values(o.subcategories))s.homeTeam.resetTotalsLive(),s.visitingTeam.resetTotalsLive()},updateSeasonStatistics(e,o){e.statistics=o},updateOldSeasonId(e,o){e.oldSeasonId=o},addRankingInSubcategories(e,{getters:o,isPremiumAccount:s}){if(!(e.homeTeamFilter.teamId&&e.visitingTeamFilter.teamId))return;e.isRankingCalculating=!1,e.currentSeasonTeams.forEach(v=>{v.homeTeamFilterGames=v.playedGames.filter(g=>e.homeTeamFilter.playingAs.includes(g.playingAs)&&e.homeTeamFilter.matchResult.includes(g.matchResult)).length,v.visitingTeamFilterGames=v.playedGames.filter(g=>e.visitingTeamFilter.playingAs.includes(g.playingAs)&&e.visitingTeamFilter.matchResult.includes(g.matchResult)).length});const z=[],W=new Map;for(const v of Object.values(e.nextGamesDataStructure))for(const g of Object.values(v.subcategories))z.push(g);o.rankingData.forEach(v=>{for(const g of z)if(g.isInGeneralCategory(v[e.indexesLS.categoryId])){W.has(g.id)?W.get(g.id).push(v):W.set(g.id,[v]);break}})},prepareCleanAllStatistics(e){e.homeTeamFilter.requiresPlaysFiltering=!0,e.visitingTeamFilter.requiresPlaysFiltering=!0},setHomeGames(e,o){e.homeGames=CH(o)},setVisitingGames(e,o){e.visitingGames=CH(o)},generateCategoriesMap(e){for(const o of Object.values(e.nextGamesDataStructure))for(const s of Object.values(o.subcategories))s.accomplishedCategoryIds.forEach(z=>{const W=e.categoriesMap.get(z);W?W.push(s.generalCategoriesIds.accomplished):e.categoriesMap.set(z,[s.generalCategoriesIds.accomplished])})},resetNextGamesDataStructure(e){for(const o of Object.values(e.nextGamesDataStructure))for(const s of Object.values(o.subcategories))s.resetData()}},actions:{turnOnOffDefaultFilters({state:e,commit:o},{command:s}){s==="on"?o("updateFilters",{filters:e.defaultFilter,needsFormat:!1}):o("updateFilters",{filters:e.filterAux,needsFormat:!1})},async setAndGetStatsPostMatch({commit:e},o){try{const g=await xFt({gameId:o.gameId});if(g){var s=[],z=[],W={season:0,total:0,visit:{total:0,draw:0,win:0,lose:0},played:0,local:{total:0,draw:0,win:0,lose:0}},v={season:0,total:0,visit:{total:0,draw:0,win:0,lose:0},played:0,local:{total:0,draw:0,win:0,lose:0}};Object.keys(g.data).length!==0&&(s=g.data.data.filter(r=>r[1]==o.homeTeam),z=g.data.data.filter(r=>r[1]==o.awayTeam),W=g.data.games,v=g.data.games),e("updateHomeTeamPlays",s),e("updateVisitingTeamPlays",z),e("setHomeGames",W),e("setVisitingGames",v)}else e("updateHomeTeamPlays",[]),e("updateVisitingTeamPlays",[])}catch(g){return Promise.reject(g)}},async fillStatisticDataPostMatch({commit:e,dispatch:o},s){e("prepareCleanAllStatistics"),e("updateHomeTeamPlays",[]),e("updateVisitingTeamPlays",[]),e("setIsSectionLoading",!0,{root:!0});try{let z=[];e("updateGameForAnalysis",s.gameInfo),z.push(o("setAndGetStatsPostMatch",{gameId:s.game,homeTeam:s.homeTeam,awayTeam:s.awayTeam})),await Promise.all(z)}catch(z){throw new Error(z)}finally{e("setIsSectionLoading",!1,{root:!0})}},async checkState({state:e,dispatch:o,commit:s},{gameId:z,isTeamsAnalysis:W,currentSeasonId:v,isLoginChanged:g=!1,defaultFilter:r=null,gameInfo:b=null,isCupGame:d=!1}){try{let a={},_=e.seasonId!==Number(v);const y=[];s("setIsSectionLoading",!0,{root:!0}),s("setUsePastSeasonId",!1),_&&s("setSeasonId",v),s("updateGameId",Number(z)),e.oldSeasonId!==e.seasonId&&s("resetNextGamesDataStructure");const x=await o("getCurrentSeasonGames",Number(z));if(s("leagueGeneral/updateCurrentSeasonGames",x,{root:!0}),a=x.find(u=>u.game_id===Number(z)),!a&&b&&(a=b),a&&s("updateGameForAnalysis",a),a.game_status!==1&&((g||e.categoriesMap.size===0)&&s("generateCategoriesMap"),d||await o("checkTeamsData",{gameId:z,isFromBet:!!r}),(g||e.oldSeasonId!==e.seasonId||e.statistics.length===0)&&y.push(o("getSeasonStatistics"))),e.usePastSeasonId){const u=await o("getCurrentSeasonGamesLast");s("leagueGeneral/updateCurrentSeasonGames",u,{root:!0})}(g||e.currentSeasonTeams.length===0||!e.currentSeasonTeams.find(u=>a.home_team===u.team_id))&&y.push(o("getCurrentSeasonTeams")),s("setHomeResultGame",a.score[0]),s("setAwayResultGame",a.score[1]),W?a.game_status!==1?(await o("fillStatisticData",{gameId:z,gameinfo:a,promises:y,defaultFilter:r}),s("updateShowPostMatchData",!1)):(s("updateStats",[]),s("updateShowPostMatchData",!0),y.push(o("fillStatisticDataPostMatch",{game:z,homeTeam:a.home_team,awayTeam:a.visiting_team,gameInfo:a})),await Promise.all(y)):s("setIsSectionLoading",!1,{root:!0})}catch(a){return Promise.reject(a)}},async fillStatisticData({commit:e,dispatch:o,getters:s,rootGetters:z,state:W},{gameId:v,gameinfo:g,promises:r=[],defaultFilter:b=null}){let d=null;try{e("setIsSectionLoading",!0,{root:!0}),e("prepareCleanAllStatistics"),e("updateHomeTeamPlays",[]),e("updateVisitingTeamPlays",[]),e("updateGameForAnalysis",g),(g.is_live||g.game_status===0)&&r.push(o("getCurrentLiveGamePlays",v)),r.push(o("getSpecialMentionsByGame",v)),r.push(o("getHomeTeamPlays")),r.push(o("getVisitingTeamPlays")),r.push(o("getCurrentSeasonPlays")),b&&r.push(wFt(b)),d=await Promise.all(r)}catch(a){throw new Error(a)}finally{setTimeout(()=>{if(e("addRankingInSubcategories",{getters:s,isPremiumAccount:z["loginGeneral/getPremiumAccount"]}),b){const[a]=d.pop();a&&(e("setBetSubcategories",a.categories),e("setBetDescription",a.sectionDescription),e("setDefaultFilter",a.params),e("updateFilterAux"),e("updateFilters",{filters:W.defaultFilter,needsFormat:!1}),o("updateRankingInSubcategories"))}},100),e("setIsSectionLoading",!1,{root:!0})}},async checkTeamsData({state:e,dispatch:o,rootState:s,commit:z},{gameId:W,isFromBet:v}){try{const g=Number(W);if(e.pastSeasonId){z("setPastSeasonId",e.pastSeasonId,{root:!0});const r=s.leagueGeneral.currentSeasonGames.find(b=>b.game_id===g);r&&z("updateGameForAnalysis",r),await Promise.all([o("getHomeTeamPlays"),o("getVisitingTeamPlays")]),z("setUsePastSeasonId",v||(!e.homeTeamPlays||e.homeTeamPlays.length===0)&&(!e.visitingTeamPlays||e.visitingTeamPlays.length===0))}else z("setUsePastSeasonId",!1)}catch(g){throw new Error(g)}},async getSpecialMentionsByGame({commit:e},o){try{const s=await gFt({gameId:o});e("addSpecialMentions",s)}catch(s){return Promise.reject(s)}},async getCurrentSeasonGames({commit:e,state:o},s){try{const{teams:z,games:W,past_season_id:v,tournament_id:g}=await fFt({seasonId:o.usePastSeasonId?o.pastSeasonId:o.seasonId,gameId:s}),r=LFt.find(b=>b.id===g);return r&&e("setCurrentTournamentName",r.name),e("setHome",z[0]),e("setAway",z[1]),o.usePastSeasonId||e("setPastSeasonId",v),await e("updateCurrentSeasonGames",W),W&&Array.isArray(W)&&e("updateFinishedGames",W.reduce((b,d)=>(d.game_status===1&&(b+=1),b),0)),W}catch(z){return Promise.reject(z)}},async getCurrentSeasonGamesLast({commit:e,state:o}){try{const{games:s,past_season_id:z}=await kH({seasonId:o.usePastSeasonId?o.pastSeasonId:o.seasonId});return o.usePastSeasonId||e("setPastSeasonId",z),await e("updateCurrentSeasonGames",s),s&&Array.isArray(s)&&e("updateFinishedGames",s.reduce((W,v)=>(v.game_status===1&&(W+=1),W),0)),s}catch(s){return Promise.reject(s)}},async getCurrentSeasonTeams({commit:e,state:o}){try{const s=await bFt({seasonId:o.usePastSeasonId?o.pastSeasonId:o.seasonId});e("updateCurrentSeasonTeams",s.data.teams)}catch{}},async getSeasonStatistics({commit:e,state:o}){try{const s=o.usePastSeasonId?o.pastSeasonId:o.seasonId,z=await hFt({seasonId:s});e("updateSeasonStatistics",z),e("updateOldSeasonId",s)}catch(s){return Promise.reject(s)}},updateRankingInSubcategories({state:e,commit:o,getters:s,rootGetters:z}){e.currentSeasonGames.length>0&&o("addRankingInSubcategories",{getters:s,isPremiumAccount:z["loginGeneral/getPremiumAccount"]})},async getHomeTeamPlays({commit:e,state:o}){try{const s=await TH({seasonId:o.usePastSeasonId?o.pastSeasonId:o.seasonId,teamId:o.gameForAnalysis.home_team});s.data&&(e("updateHomeTeamPlays",s.data.data),e("setHomeGames",s.data.games))}catch(s){return Promise.reject(s)}},async getVisitingTeamPlays({commit:e,state:o}){try{const s=await TH({seasonId:o.usePastSeasonId?o.pastSeasonId:o.seasonId,teamId:o.gameForAnalysis.visiting_team});s.data&&(e("updateVisitingTeamPlays",s.data.data),e("setVisitingGames",s.data.games))}catch(s){return Promise.reject(s)}},async getCurrentSeasonPlays({commit:e,state:o}){try{const s=await dFt({seasonId:o.usePastSeasonId?o.pastSeasonId:o.seasonId});e("updateStats",s)}catch(s){return Promise.reject(new Error(s))}},async getCurrentLiveGamePlays({state:e,commit:o},s){try{const z=await mFt({gameId:s});e.livePlays=new Map,z.forEach(W=>{e.gameForAnalysis.game_id===W[e.indexesTLP.gameId]&&(e.gameForAnalysis.home_team===W[e.indexesTLP.teamId]||e.gameForAnalysis.visiting_team===W[e.indexesTLP.teamId])&&o("addLiveGamePlay",W)})}catch(z){throw new Error(z)}},socket_new({state:e,commit:o},s){const z=s[1];(e.gameForAnalysis.home_team===z[e.indexesTLP.teamId]||e.gameForAnalysis.visiting_team===z[e.indexesTLP.teamId])&&o("addLiveGamePlay",z)},socket_update({state:e,commit:o},s){const z=s[1];e.gameForAnalysis.game_id===z[e.indexesTLP.gameId]&&(e.gameForAnalysis.home_team===z[e.indexesTLP.teamId]||e.gameForAnalysis.visitingTeam===z[e.indexesTLP.teamId])&&o("updateLiveGamePlay",z)},socket_delete({state:e,commit:o},s){const z=s[1];e.gameForAnalysis.game_id===z[e.indexesTLP.gameId]&&(e.gameForAnalysis.home_team===z[e.indexesTLP.teamId]||e.gameForAnalysis.visiting_team===z[e.indexesTLP.teamId])&&o("deleteLiveGamePlay",z)},exitChannel({state:e,getters:o,rootState:s,rootGetters:z,commit:W}){const v=z["loginGeneral/getPremiumAccount"];o.isLive&&v&&(W("updateShowLiveData",!0),W("clearLiveTotals"),e.livePlays.clear(),IFt.emit("unsubscribe",{channel:`game.${e.gameForAnalysis.game_id}.v2`}))},cleanStats({state:e}){for(const s of Object.values(e.nextGamesDataStructure))for(const z of Object.values(s.subcategories))z.homeTeam.resetTotals(),z.visitingTeam.resetTotals(),z.homeTeam.resetTotalsLive(),z.visitingTeam.resetTotalsLive(),z.isBetMainSubcategory=!1;Object.values(e.nextGamesDataStructure).forEach(s=>{for(const z of Object.values(s.subcategories))z.resetMentions()}),e.currentSeasonPlays=null,e.homeTeamPlays=[],e.visitingTeamPlays=[],e.homeTeamFilter.requiresPlaysFiltering=!0,e.visitingTeamFilter.requiresPlaysFiltering=!0,e.isRankingCalculating=!0},cleanAllStats({state:e}){for(const s of Object.values(e.nextGamesDataStructure))for(const z of Object.values(s.subcategories))z.homeTeam.resetTotals(),z.visitingTeam.resetTotals(),z.isBetMainSubcategory=!1;Object.values(e.nextGamesDataStructure).forEach(s=>{for(const z of Object.values(s.subcategories))z.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 OFt(){try{const{data:e}=await Ah({url:"https://kefloixzy1.execute-api.us-west-2.amazonaws.com/prod/tournaments"});return e}catch(e){throw new Error(e)}}const zFt={gameGlobal:{namespaced:!0,state:{videoSrc:null,isVideoModalVisible:!1,tournaments:[],seccionBetsGolTipster:1,tournamentSelected:{},tournamentType:0,sectionAnalytics:"Banner_Home",previewSectionAnalytics:"",sectionRef:"",booleanIsStatisticModalOpen:!1},getters:{getTournamentType:e=>e.tournamentType,getSectionAnalytics(e){return e.sectionAnalytics},getPreviewSectionAnalytics(e){return e.previewSectionAnalytics},getSeccionBetsGolTipster(e){return e.seccionBetsGolTipster}},mutations:{setBooleanIsStatisticModalOpen(e,o){e.booleanIsStatisticModalOpen=o},setTournamentType(e,o){e.tournamentType=o},setSectionRef(e,o){e.sectionRef=o},setSectionAnalytics(e,o){e.sectionAnalytics=o},setSeccionBetsGolTipster(e,o){e.seccionBetsGolTipster=o},setPreviewSectionAnalytics(e,o){e.previewSectionAnalytics=o},setVideoSrc(e,o){e.videoSrc=o},setVideoModalVisibility(e,o){e.isVideoModalVisible=o},setSelectedTournament(e,o){e.selectedTournament=o},setTournaments(e,o){e.tournaments=o.map(s=>({...s.tournament,seasons:s.seasons})),e.tournamentSelected=e.tournaments[0]},setTournamentSelected(e,o){e.tournamentSelected=o}},actions:{async fetchTournaments({state:e,commit:o}){try{if(e.tournaments.length===0){const s=await OFt();o("setTournaments",s)}}catch(s){throw new Error(s)}}}}};async function NFt({seasonId:e,localTeamId:o,visitingTeamId:s}){try{const z=`https://bzznnzehtf.execute-api.us-west-2.amazonaws.com/prod/xg/seasons/${e}/teams/${o}/${s}`;return(await Ah({url:z})).data}catch(z){return Promise.reject(z)}}async function DFt({seasonId:e,localTeamId:o,visitingTeamId:s}){try{const z=`https://bzznnzehtf.execute-api.us-west-2.amazonaws.com/prod/xg/game/${e}/teams/${o}/${s}`;return(await Ah({url:z})).data}catch(z){return Promise.reject(z)}}const EH=(e,o)=>{let s={};return e.forEach((z,W)=>{W==3&&(o[0]==35||o[0]==54)&&(o[W]==2?o[W]=1:o[W]=2),W==2&&(o[0]==35||o[0]==54)&&(o[W]==1?o[W]=2:o[W]==2&&(o[W]=1)),s[z]=o[W]}),s},AH=(e,o)=>e.filter(z=>{const W=o.playingAs.includes(z.playing_as),v=o.matchResult.includes(z.match_result),g=o.sections.includes(z.section);return W&&v&&g});(function(){function e(o,s,z){return typeof z>"u"||+z==0?Math[o](s):(s=+s,z=+z,isNaN(s)||!(typeof z=="number"&&z%1===0)?NaN:(s=s.toString().split("e"),s=Math[o](+(s[0]+"e"+(s[1]?+s[1]-z:-z))),s=s.toString().split("e"),+(s[0]+"e"+(s[1]?+s[1]+z:z))))}Math.ceil10||(Math.ceil10=function(o,s){return e("ceil",o,s)})})();function MH(e,o){let s=o*-1;return Math.ceil10(e,s)}const FFt={...zFt,..._Ft,...BFt,...{xgGeneral:{namespaced:!0,state:{teamSelected:"Local",xGLocalPlays:[],xGVisitingPlays:[]},getters:{playsLocal:(e,o,s)=>{const z=e.xGLocalPlays,W="homeTeamFilter",v=s.nextGeneral[W];return AH(z,v)||[]},playsAway:(e,o,s)=>{const z=e.xGVisitingPlays,W="visitingTeamFilter",v=s.nextGeneral[W];return AH(z,v)},goalsQtyLocal:(e,o)=>{const s=N0.find(z=>z.name==="Goles");return o.playsLocal.filter(z=>s.categories.includes(z.category_id)).length},goalsQtyAway:(e,o)=>{const s=N0.find(z=>z.name==="Goles");return o.playsAway.filter(z=>s.categories.includes(z.category_id)).length},shotsOnGoalQtyLocal:(e,o)=>o.playsLocal.filter(s=>s.category_id===510).length,shotsOnGoalQtyAway:(e,o)=>o.playsAway.filter(s=>s.category_id===510).length,headQtyLocal:(e,o)=>{const s=N0.find(z=>z.name==="Remates con cabeza");return o.playsLocal.filter(z=>s.categories.includes(z.category_id)).length},headQtyAway:(e,o)=>{const s=N0.find(z=>z.name==="Remates con cabeza");return o.playsAway.filter(z=>s.categories.includes(z.category_id)).length},penaltiesQtyLocal:(e,o)=>{const s=N0.find(z=>z.name==="Penales");return o.playsLocal.filter(z=>s.categories.includes(z.category_id)).length},penaltiesQtyAway:(e,o)=>{const s=N0.find(z=>z.name==="Penales");return o.playsAway.filter(z=>s.categories.includes(z.category_id)).length},xGLocal:(e,o)=>{const s=new Set;let z=o.playsLocal.reduce((W,v)=>(s.has(v.moment_of_play)||(s.add(v.moment_of_play),W+=v.xG2),W),0);return MH(z,2)},xGAway:(e,o)=>{const s=new Set;let z=o.playsAway.reduce((W,v)=>(s.has(v.moment_of_play)||(s.add(v.moment_of_play),W+=v.xG2),W),0);return MH(z,2)}},mutations:{setTeamSelected(e,o){e.teamSelected=o},setPlays(e,o){const s=o.local_team.map(u=>EH(o.data_headers,u)),z=[],W=[],v=[],g=[],r=new Set;s.forEach(u=>{KA.has(u.category_id)?r.has(u.moment_of_play)||(r.add(u.moment_of_play),z.push(u)):QA.has(u.category_id)?W.push(u):eM.has(u.category_id)?v.push(u):tM.has(u.category_id)&&g.push(u)}),e.xGLocalPlays=[...W,...z,...v,...g];const b=o.visiting_team.map(u=>EH(o.data_headers,u)),d=new Set,a=[],_=[],y=[],x=[];b.forEach(u=>{KA.has(u.category_id)?d.has(u.moment_of_play)||(d.add(u.moment_of_play),a.push(u)):QA.has(u.category_id)?_.push(u):eM.has(u.category_id)?y.push(u):tM.has(u.category_id)&&x.push(u)}),e.xGVisitingPlays=[..._,...a,...y,...x]},cleanXgStore(e){e.localStorage="Local",e.xGLocalPlays=[],e.xGVisitingPlays=[]}},actions:{async getXgPlays({commit:e},{seasonId:o,localTeamId:s,visitingTeamId:z,postMatch:W=!1}){try{let v={};W?v=await DFt({seasonId:o,localTeamId:s,visitingTeamId:z}):v=await NFt({seasonId:o,localTeamId:s,visitingTeamId:z}),e("setPlays",v)}catch(v){return Promise.reject(v)}}}}}};function RFt(e){for(const[o,s]of Object.entries(FFt))e.hasModule(o)||e.registerModule(o,s)}const VFt={class:"subcategory-group"},jFt={__name:"SubcategoryGroup",props:{subcategoryGroup:{type:Array,default:()=>[]}},setup(e){return(o,s)=>(t.openBlock(),t.createElementBlock("div",VFt,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.subcategoryGroup,z=>(t.openBlock(),t.createBlock(t.unref(jl),{key:z.id,modelValue:z.isSelected,"onUpdate:modelValue":W=>z.isSelected=W,label:z.name},null,8,["modelValue","onUpdate:modelValue","label"]))),128))]))}},UFt=ac(jFt,[["__scopeId","data-v-ae6f3d72"]]),GFt={class:"filter-subcategories"},HFt=Object.freeze(Object.defineProperty({__proto__:null,default:ac({__name:"FilterSubcategories",props:{subcategoryGroups:{type:Array,default:()=>[]}},setup(e){return(o,s)=>(t.openBlock(),t.createElementBlock("div",GFt,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.subcategoryGroups,z=>(t.openBlock(),t.createElementBlock("div",{key:z.id,class:"filter-subcategories__group"},[t.createVNode(UFt,{subcategoryGroup:z},null,8,["subcategoryGroup"])]))),128))]))}},[["__scopeId","data-v-5edaefc2"]])},Symbol.toStringTag,{value:"Module"})),V4=e=>(t.pushScopeId("data-v-80d9c265"),e=e(),t.popScopeId(),e),ZFt={class:"details__header"},WFt=V4(()=>t.createElementVNode("div",{class:"details__header__title"},"Jugando como",-1)),XFt={class:"details__header__checkbox"},qFt={class:"details__body"},YFt={class:"details__body__playing-as"},JFt=["onClick"],$Ft={class:"details__header"},KFt=V4(()=>t.createElementVNode("div",{class:"details__header__title"},"En: (Elige el lapso de tiempo)",-1)),QFt={class:"details__header__checkbox"},eRt={class:"details__body"},tRt=V4(()=>t.createElementVNode("div",{class:"details__body__title"},"1er tiempo",-1)),aRt={class:"details__body__game-section"},rRt=["onClick"],nRt={class:"details__body"},iRt=V4(()=>t.createElementVNode("div",{class:"details__body__title"},"2do tiempo",-1)),oRt={class:"details__body__game-section"},sRt=["onClick"],lRt=Object.freeze(Object.defineProperty({__proto__:null,default:ac({__name:"FilterConditions",props:{playingAs:{type:Array,default:()=>[{name:"Local",isSelected:!0},{name:"Visitante",isSelected:!0}]},gameSections:{type:Array,default:()=>[{text:"0-15",value:1,isSelected:!0},{text:"16-30",value:2,isSelected:!0},{text:"31-45",value:3,isSelected:!0},{text:"46-60",value:4,isSelected:!0},{text:"61-75",value:5,isSelected:!0},{text:"76-90",value:6,isSelected:!0}]},buttonsBackgroundColor:{type:String,default:"rgba(255, 255, 255, 0)"},buttonsBackgroundColorActive:{type:String,default:"rgba(203, 238, 107, 0.05)"},buttonsTextColor:{type:String,default:"rgba(255, 255, 255, 0.8)"},buttonsTextColorActive:{type:String,default:"rgba(255, 255, 255, 1)"},buttonsBorderColor:{type:String,default:"#8ea2ab"},buttonsBorderColorActive:{type:String,default:"#cbee6b"},buttonsBorderWidth:{type:String,default:"0.8px"},buttonsBorderWidthActive:{type:String,default:"1px"},buttonsBorderRadius:{type:String,default:"4px"}},setup(e){const o=e;t.useCssVars(a=>({"49cba245":e.buttonsBackgroundColor,"52f02da6":e.buttonsTextColor,"7d3f686a":e.buttonsBorderWidth,"7c286a07":e.buttonsBorderColor,"24a6f4aa":e.buttonsBackgroundColorActive,cd8d7768:e.buttonsTextColorActive,"35fa5c10":e.buttonsBorderWidthActive,"0cde1826":e.buttonsBorderColorActive}));const s=t.computed(()=>o.playingAs.every(a=>a.isSelected)),z=t.computed(()=>o.gameSections.every(a=>a.isSelected)),W=t.computed(()=>o.gameSections.reduce((a,_)=>(_.value<=3?a.firstHalf.push(_):a.secondHalf.push(_),a),{firstHalf:[],secondHalf:[]})),v=t.computed(()=>({"--border-radius-first-button":`${o.buttonsBorderRadius} 0 0 ${o.buttonsBorderRadius}`,"--border-radius-last-button":`0 ${o.buttonsBorderRadius} ${o.buttonsBorderRadius} 0`}));function g(a){a?o.playingAs.forEach(_=>{_.isSelected=!0}):o.playingAs.forEach((_,y)=>{_.isSelected=y===0})}function r(a){o.playingAs.filter(_=>_.isSelected).length===1&&a.isSelected||(a.isSelected=!a.isSelected)}function b(a){o.gameSections.filter(_=>_.isSelected).length===1&&a.isSelected||(a.isSelected=!a.isSelected)}function d(a){a?o.gameSections.forEach(_=>{_.isSelected=!0}):o.gameSections.forEach((_,y)=>{_.isSelected=y===0})}return(a,_)=>(t.openBlock(),t.createElementBlock("div",{class:"details",style:t.normalizeStyle(v.value)},[t.createElementVNode("div",ZFt,[WFt,t.createElementVNode("div",XFt,[t.createVNode(t.unref(jl),{label:"Todos","model-value":s.value,"onUpdate:modelValue":g},null,8,["model-value"])])]),t.createElementVNode("div",qFt,[t.createElementVNode("div",YFt,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.playingAs,(y,x)=>(t.openBlock(),t.createElementBlock("div",{key:`pa${x}`,class:t.normalizeClass(["details__body__button",{active:y.isSelected}]),onClick:u=>r(y)},t.toDisplayString(y.name),11,JFt))),128))])]),t.createElementVNode("div",$Ft,[KFt,t.createElementVNode("div",QFt,[t.createVNode(t.unref(jl),{label:"Todos","model-value":z.value,"onUpdate:modelValue":d},null,8,["model-value"])])]),t.createElementVNode("div",eRt,[tRt,t.createElementVNode("div",aRt,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(W.value.firstHalf,(y,x)=>(t.openBlock(),t.createElementBlock("div",{key:`pa${x}`,class:t.normalizeClass(["details__body__button",{active:y.isSelected}]),onClick:u=>b(y)},t.toDisplayString(y.text),11,rRt))),128))])]),t.createElementVNode("div",nRt,[iRt,t.createElementVNode("div",oRt,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(W.value.secondHalf,(y,x)=>(t.openBlock(),t.createElementBlock("div",{key:`pa${x}`,class:t.normalizeClass(["details__body__button",{active:y.isSelected}]),onClick:u=>b(y)},t.toDisplayString(y.text),11,sRt))),128))])])],4))}},[["__scopeId","data-v-80d9c265"]])},Symbol.toStringTag,{value:"Module"})),cRt={class:"filter-field"},uRt=Object.freeze(Object.defineProperty({__proto__:null,default:ac({__name:"FilterField",setup(e){const o=t.ref(Array.from({length:16},(z,W)=>W+1));function s(){}return(z,W)=>(t.openBlock(),t.createElementBlock("div",cRt,[t.createVNode(t.unref(iD),{width:"100%","background-color":"#2E3B46",value:o.value,"onUpdate:modelValue":s},null,8,["value"])]))}},[["__scopeId","data-v-8103c3e1"]])},Symbol.toStringTag,{value:"Module"})),dRt={class:"subcategory-group"},hRt={__name:"SubcategoryGroup",props:{subcategoryGroup:{type:Array,default:()=>[]}},setup(e){return(o,s)=>(t.openBlock(),t.createElementBlock("div",dRt,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.subcategoryGroup,z=>(t.openBlock(),t.createBlock(t.unref(Ul),{key:z.id,modelValue:z.isSelected,"onUpdate:modelValue":W=>z.isSelected=W,label:z.name},null,8,["modelValue","onUpdate:modelValue","label"]))),128))]))}},pRt=rc(hRt,[["__scopeId","data-v-ae6f3d72"]]),fRt={class:"filter-subcategories"},mRt=Object.freeze(Object.defineProperty({__proto__:null,default:rc({__name:"FilterSubcategories",props:{subcategoryGroups:{type:Array,default:()=>[]}},setup(e){return(o,s)=>(t.openBlock(),t.createElementBlock("div",fRt,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.subcategoryGroups,z=>(t.openBlock(),t.createElementBlock("div",{key:z.id,class:"filter-subcategories__group"},[t.createVNode(pRt,{subcategoryGroup:z},null,8,["subcategoryGroup"])]))),128))]))}},[["__scopeId","data-v-5edaefc2"]])},Symbol.toStringTag,{value:"Module"})),j4=e=>(t.pushScopeId("data-v-80d9c265"),e=e(),t.popScopeId(),e),gRt={class:"details__header"},yRt=j4(()=>t.createElementVNode("div",{class:"details__header__title"},"Jugando como",-1)),vRt={class:"details__header__checkbox"},bRt={class:"details__body"},xRt={class:"details__body__playing-as"},_Rt=["onClick"],wRt={class:"details__header"},kRt=j4(()=>t.createElementVNode("div",{class:"details__header__title"},"En: (Elige el lapso de tiempo)",-1)),SRt={class:"details__header__checkbox"},TRt={class:"details__body"},CRt=j4(()=>t.createElementVNode("div",{class:"details__body__title"},"1er tiempo",-1)),ERt={class:"details__body__game-section"},ARt=["onClick"],MRt={class:"details__body"},PRt=j4(()=>t.createElementVNode("div",{class:"details__body__title"},"2do tiempo",-1)),IRt={class:"details__body__game-section"},LRt=["onClick"],BRt=Object.freeze(Object.defineProperty({__proto__:null,default:rc({__name:"FilterConditions",props:{playingAs:{type:Array,default:()=>[{name:"Local",isSelected:!0},{name:"Visitante",isSelected:!0}]},gameSections:{type:Array,default:()=>[{text:"0-15",value:1,isSelected:!0},{text:"16-30",value:2,isSelected:!0},{text:"31-45",value:3,isSelected:!0},{text:"46-60",value:4,isSelected:!0},{text:"61-75",value:5,isSelected:!0},{text:"76-90",value:6,isSelected:!0}]},buttonsBackgroundColor:{type:String,default:"rgba(255, 255, 255, 0)"},buttonsBackgroundColorActive:{type:String,default:"rgba(203, 238, 107, 0.05)"},buttonsTextColor:{type:String,default:"rgba(255, 255, 255, 0.8)"},buttonsTextColorActive:{type:String,default:"rgba(255, 255, 255, 1)"},buttonsBorderColor:{type:String,default:"#8ea2ab"},buttonsBorderColorActive:{type:String,default:"#cbee6b"},buttonsBorderWidth:{type:String,default:"0.8px"},buttonsBorderWidthActive:{type:String,default:"1px"},buttonsBorderRadius:{type:String,default:"4px"}},setup(e){const o=e;t.useCssVars(a=>({"49cba245":e.buttonsBackgroundColor,"52f02da6":e.buttonsTextColor,"7d3f686a":e.buttonsBorderWidth,"7c286a07":e.buttonsBorderColor,"24a6f4aa":e.buttonsBackgroundColorActive,cd8d7768:e.buttonsTextColorActive,"35fa5c10":e.buttonsBorderWidthActive,"0cde1826":e.buttonsBorderColorActive}));const s=t.computed(()=>o.playingAs.every(a=>a.isSelected)),z=t.computed(()=>o.gameSections.every(a=>a.isSelected)),W=t.computed(()=>o.gameSections.reduce((a,_)=>(_.value<=3?a.firstHalf.push(_):a.secondHalf.push(_),a),{firstHalf:[],secondHalf:[]})),v=t.computed(()=>({"--border-radius-first-button":`${o.buttonsBorderRadius} 0 0 ${o.buttonsBorderRadius}`,"--border-radius-last-button":`0 ${o.buttonsBorderRadius} ${o.buttonsBorderRadius} 0`}));function g(a){a?o.playingAs.forEach(_=>{_.isSelected=!0}):o.playingAs.forEach((_,y)=>{_.isSelected=y===0})}function r(a){o.playingAs.filter(_=>_.isSelected).length===1&&a.isSelected||(a.isSelected=!a.isSelected)}function b(a){o.gameSections.filter(_=>_.isSelected).length===1&&a.isSelected||(a.isSelected=!a.isSelected)}function d(a){a?o.gameSections.forEach(_=>{_.isSelected=!0}):o.gameSections.forEach((_,y)=>{_.isSelected=y===0})}return(a,_)=>(t.openBlock(),t.createElementBlock("div",{class:"details",style:t.normalizeStyle(v.value)},[t.createElementVNode("div",gRt,[yRt,t.createElementVNode("div",vRt,[t.createVNode(t.unref(Ul),{label:"Todos","model-value":s.value,"onUpdate:modelValue":g},null,8,["model-value"])])]),t.createElementVNode("div",bRt,[t.createElementVNode("div",xRt,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.playingAs,(y,x)=>(t.openBlock(),t.createElementBlock("div",{key:`pa${x}`,class:t.normalizeClass(["details__body__button",{active:y.isSelected}]),onClick:u=>r(y)},t.toDisplayString(y.name),11,_Rt))),128))])]),t.createElementVNode("div",wRt,[kRt,t.createElementVNode("div",SRt,[t.createVNode(t.unref(Ul),{label:"Todos","model-value":z.value,"onUpdate:modelValue":d},null,8,["model-value"])])]),t.createElementVNode("div",TRt,[CRt,t.createElementVNode("div",ERt,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(W.value.firstHalf,(y,x)=>(t.openBlock(),t.createElementBlock("div",{key:`pa${x}`,class:t.normalizeClass(["details__body__button",{active:y.isSelected}]),onClick:u=>b(y)},t.toDisplayString(y.text),11,ARt))),128))])]),t.createElementVNode("div",MRt,[PRt,t.createElementVNode("div",IRt,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(W.value.secondHalf,(y,x)=>(t.openBlock(),t.createElementBlock("div",{key:`pa${x}`,class:t.normalizeClass(["details__body__button",{active:y.isSelected}]),onClick:u=>b(y)},t.toDisplayString(y.text),11,LRt))),128))])])],4))}},[["__scopeId","data-v-80d9c265"]])},Symbol.toStringTag,{value:"Module"})),ORt={class:"filter-field"},zRt=Object.freeze(Object.defineProperty({__proto__:null,default:rc({__name:"FilterField",setup(e){const o=t.ref(Array.from({length:16},(z,W)=>W+1));function s(){}return(z,W)=>(t.openBlock(),t.createElementBlock("div",ORt,[t.createVNode(t.unref(Nj),{width:"100%","background-color":"#2E3B46",value:o.value,"onUpdate:modelValue":s},null,8,["value"])]))}},[["__scopeId","data-v-8103c3e1"]])},Symbol.toStringTag,{value:"Module"}));Od.GSCGameData=uFt,Od.connectSocket=Kw,Od.disconnectSocket=Qw,Od.getSocket=$w,Od.registerStoreModules=RFt,Object.defineProperty(Od,Symbol.toStringTag,{value:"Module"})});
8192
+ */var tH="store";function Kzt(e){return e===void 0&&(e=null),t.inject(e!==null?e:tH)}function yg(e,o){Object.keys(e).forEach(function(s){return o(e[s],s)})}function aH(e){return e!==null&&typeof e=="object"}function Qzt(e){return e&&typeof e.then=="function"}function Zf(e,o){if(!e)throw new Error("[vuex] "+o)}function eNt(e,o){return function(){return e(o)}}function rH(e,o,s){return o.indexOf(e)<0&&(s&&s.prepend?o.unshift(e):o.push(e)),function(){var z=o.indexOf(e);z>-1&&o.splice(z,1)}}function nH(e,o){e._actions=Object.create(null),e._mutations=Object.create(null),e._wrappedGetters=Object.create(null),e._modulesNamespaceMap=Object.create(null);var s=e.state;z4(e,s,[],e._modules.root,!0),xT(e,s,o)}function xT(e,o,s){var z=e._state;e.getters={},e._makeLocalGettersCache=Object.create(null);var W=e._wrappedGetters,v={};yg(W,function(g,r){v[r]=eNt(g,e),Object.defineProperty(e.getters,r,{get:function(){return v[r]()},enumerable:!0})}),e._state=t.reactive({data:o}),e.strict&&iNt(e),z&&s&&e._withCommit(function(){z.data=null})}function z4(e,o,s,z,W){var v=!s.length,g=e._modules.getNamespace(s);if(z.namespaced&&(e._modulesNamespaceMap[g]&&process.env.NODE_ENV!=="production"&&console.error("[vuex] duplicate namespace "+g+" for the namespaced module "+s.join("/")),e._modulesNamespaceMap[g]=z),!v&&!W){var r=_T(o,s.slice(0,-1)),b=s[s.length-1];e._withCommit(function(){process.env.NODE_ENV!=="production"&&b in r&&console.warn('[vuex] state field "'+b+'" was overridden by a module with the same name at "'+s.join(".")+'"'),r[b]=z.state})}var d=z.context=tNt(e,g,s);z.forEachMutation(function(a,_){var y=g+_;aNt(e,y,a,d)}),z.forEachAction(function(a,_){var y=a.root?_:g+_,x=a.handler||a;rNt(e,y,x,d)}),z.forEachGetter(function(a,_){var y=g+_;nNt(e,y,a,d)}),z.forEachChild(function(a,_){z4(e,o,s.concat(_),a,W)})}function tNt(e,o,s){var z=o==="",W={dispatch:z?e.dispatch:function(v,g,r){var b=N4(v,g,r),d=b.payload,a=b.options,_=b.type;if((!a||!a.root)&&(_=o+_,process.env.NODE_ENV!=="production"&&!e._actions[_])){console.error("[vuex] unknown local action type: "+b.type+", global type: "+_);return}return e.dispatch(_,d)},commit:z?e.commit:function(v,g,r){var b=N4(v,g,r),d=b.payload,a=b.options,_=b.type;if((!a||!a.root)&&(_=o+_,process.env.NODE_ENV!=="production"&&!e._mutations[_])){console.error("[vuex] unknown local mutation type: "+b.type+", global type: "+_);return}e.commit(_,d,a)}};return Object.defineProperties(W,{getters:{get:z?function(){return e.getters}:function(){return iH(e,o)}},state:{get:function(){return _T(e.state,s)}}}),W}function iH(e,o){if(!e._makeLocalGettersCache[o]){var s={},z=o.length;Object.keys(e.getters).forEach(function(W){if(W.slice(0,z)===o){var v=W.slice(z);Object.defineProperty(s,v,{get:function(){return e.getters[W]},enumerable:!0})}}),e._makeLocalGettersCache[o]=s}return e._makeLocalGettersCache[o]}function aNt(e,o,s,z){var W=e._mutations[o]||(e._mutations[o]=[]);W.push(function(v){s.call(e,z.state,v)})}function rNt(e,o,s,z){var W=e._actions[o]||(e._actions[o]=[]);W.push(function(v){var g=s.call(e,{dispatch:z.dispatch,commit:z.commit,getters:z.getters,state:z.state,rootGetters:e.getters,rootState:e.state},v);return Qzt(g)||(g=Promise.resolve(g)),e._devtoolHook?g.catch(function(r){throw e._devtoolHook.emit("vuex:error",r),r}):g})}function nNt(e,o,s,z){if(e._wrappedGetters[o]){process.env.NODE_ENV!=="production"&&console.error("[vuex] duplicate getter key: "+o);return}e._wrappedGetters[o]=function(W){return s(z.state,z.getters,W.state,W.getters)}}function iNt(e){t.watch(function(){return e._state.data},function(){process.env.NODE_ENV!=="production"&&Zf(e._committing,"do not mutate vuex store state outside mutation handlers.")},{deep:!0,flush:"sync"})}function _T(e,o){return o.reduce(function(s,z){return s[z]},e)}function N4(e,o,s){return aH(e)&&e.type&&(s=o,o=e,e=e.type),process.env.NODE_ENV!=="production"&&Zf(typeof e=="string","expects string as the type, but found "+typeof e+"."),{type:e,payload:o,options:s}}var oNt="vuex bindings",oH="vuex:mutations",wT="vuex:actions",_2="vuex",sNt=0;function lNt(e,o){$zt({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:[oNt]},function(s){s.addTimelineLayer({id:oH,label:"Vuex Mutations",color:sH}),s.addTimelineLayer({id:wT,label:"Vuex Actions",color:sH}),s.addInspector({id:_2,label:"Vuex",icon:"storage",treeFilterPlaceholder:"Filter stores..."}),s.on.getInspectorTree(function(z){if(z.app===e&&z.inspectorId===_2)if(z.filter){var W=[];dH(W,o._modules.root,z.filter,""),z.rootNodes=W}else z.rootNodes=[uH(o._modules.root,"")]}),s.on.getInspectorState(function(z){if(z.app===e&&z.inspectorId===_2){var W=z.nodeId;iH(o,W),z.state=dNt(pNt(o._modules,W),W==="root"?o.getters:o._makeLocalGettersCache,W)}}),s.on.editInspectorState(function(z){if(z.app===e&&z.inspectorId===_2){var W=z.nodeId,v=z.path;W!=="root"&&(v=W.split("/").filter(Boolean).concat(v)),o._withCommit(function(){z.set(o._state.data,v,z.state.value)})}}),o.subscribe(function(z,W){var v={};z.payload&&(v.payload=z.payload),v.state=W,s.notifyComponentUpdate(),s.sendInspectorTree(_2),s.sendInspectorState(_2),s.addTimelineEvent({layerId:oH,event:{time:Date.now(),title:z.type,data:v}})}),o.subscribeAction({before:function(z,W){var v={};z.payload&&(v.payload=z.payload),z._id=sNt++,z._time=Date.now(),v.state=W,s.addTimelineEvent({layerId:wT,event:{time:z._time,title:z.type,groupId:z._id,subtitle:"start",data:v}})},after:function(z,W){var v={},g=Date.now()-z._time;v.duration={_custom:{type:"duration",display:g+"ms",tooltip:"Action duration",value:g}},z.payload&&(v.payload=z.payload),v.state=W,s.addTimelineEvent({layerId:wT,event:{time:Date.now(),title:z.type,groupId:z._id,subtitle:"end",data:v}})}})})}var sH=8702998,cNt=6710886,uNt=16777215,lH={label:"namespaced",textColor:uNt,backgroundColor:cNt};function cH(e){return e&&e!=="root"?e.split("/").slice(-2,-1)[0]:"Root"}function uH(e,o){return{id:o||"root",label:cH(o),tags:e.namespaced?[lH]:[],children:Object.keys(e._children).map(function(s){return uH(e._children[s],o+s+"/")})}}function dH(e,o,s,z){z.includes(s)&&e.push({id:z||"root",label:z.endsWith("/")?z.slice(0,z.length-1):z||"Root",tags:o.namespaced?[lH]:[]}),Object.keys(o._children).forEach(function(W){dH(e,o._children[W],s,z+W+"/")})}function dNt(e,o,s){o=s==="root"?o:o[s];var z=Object.keys(o),W={state:Object.keys(e.state).map(function(g){return{key:g,editable:!0,value:e.state[g]}})};if(z.length){var v=hNt(o);W.getters=Object.keys(v).map(function(g){return{key:g.endsWith("/")?cH(g):g,editable:!1,value:kT(function(){return v[g]})}})}return W}function hNt(e){var o={};return Object.keys(e).forEach(function(s){var z=s.split("/");if(z.length>1){var W=o,v=z.pop();z.forEach(function(g){W[g]||(W[g]={_custom:{value:{},display:g,tooltip:"Module",abstract:!0}}),W=W[g]._custom.value}),W[v]=kT(function(){return e[s]})}else o[s]=kT(function(){return e[s]})}),o}function pNt(e,o){var s=o.split("/").filter(function(z){return z});return s.reduce(function(z,W,v){var g=z[W];if(!g)throw new Error('Missing module "'+W+'" for path "'+o+'".');return v===s.length-1?g:g._children},o==="root"?e:e.root._children)}function kT(e){try{return e()}catch(o){return o}}var Wf=function(e,o){this.runtime=o,this._children=Object.create(null),this._rawModule=e;var s=e.state;this.state=(typeof s=="function"?s():s)||{}},hH={namespaced:{configurable:!0}};hH.namespaced.get=function(){return!!this._rawModule.namespaced},Wf.prototype.addChild=function(e,o){this._children[e]=o},Wf.prototype.removeChild=function(e){delete this._children[e]},Wf.prototype.getChild=function(e){return this._children[e]},Wf.prototype.hasChild=function(e){return e in this._children},Wf.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)},Wf.prototype.forEachChild=function(e){yg(this._children,e)},Wf.prototype.forEachGetter=function(e){this._rawModule.getters&&yg(this._rawModule.getters,e)},Wf.prototype.forEachAction=function(e){this._rawModule.actions&&yg(this._rawModule.actions,e)},Wf.prototype.forEachMutation=function(e){this._rawModule.mutations&&yg(this._rawModule.mutations,e)},Object.defineProperties(Wf.prototype,hH);var vg=function(e){this.register([],e,!1)};vg.prototype.get=function(e){return e.reduce(function(o,s){return o.getChild(s)},this.root)},vg.prototype.getNamespace=function(e){var o=this.root;return e.reduce(function(s,z){return o=o.getChild(z),s+(o.namespaced?z+"/":"")},"")},vg.prototype.update=function(e){pH([],this.root,e)},vg.prototype.register=function(e,o,s){var z=this;s===void 0&&(s=!0),process.env.NODE_ENV!=="production"&&gH(e,o);var W=new Wf(o,s);if(e.length===0)this.root=W;else{var v=this.get(e.slice(0,-1));v.addChild(e[e.length-1],W)}o.modules&&yg(o.modules,function(g,r){z.register(e.concat(r),g,s)})},vg.prototype.unregister=function(e){var o=this.get(e.slice(0,-1)),s=e[e.length-1],z=o.getChild(s);if(!z){process.env.NODE_ENV!=="production"&&console.warn("[vuex] trying to unregister module '"+s+"', which is not registered");return}z.runtime&&o.removeChild(s)},vg.prototype.isRegistered=function(e){var o=this.get(e.slice(0,-1)),s=e[e.length-1];return o?o.hasChild(s):!1};function pH(e,o,s){if(process.env.NODE_ENV!=="production"&&gH(e,s),o.update(s),s.modules)for(var z in s.modules){if(!o.getChild(z)){process.env.NODE_ENV!=="production"&&console.warn("[vuex] trying to add a new module '"+z+"' on hot reloading, manual reload is needed");return}pH(e.concat(z),o.getChild(z),s.modules[z])}}var fH={assert:function(e){return typeof e=="function"},expected:"function"},fNt={assert:function(e){return typeof e=="function"||typeof e=="object"&&typeof e.handler=="function"},expected:'function or object with "handler" function'},mH={getters:fH,mutations:fH,actions:fNt};function gH(e,o){Object.keys(mH).forEach(function(s){if(o[s]){var z=mH[s];yg(o[s],function(W,v){Zf(z.assert(W),mNt(e,s,v,W,z.expected))})}})}function mNt(e,o,s,z,W){var v=o+" should be "+W+' but "'+o+"."+s+'"';return e.length>0&&(v+=' in module "'+e.join(".")+'"'),v+=" is "+JSON.stringify(z)+".",v}var Ap=function e(o){var s=this;o===void 0&&(o={}),process.env.NODE_ENV!=="production"&&(Zf(typeof Promise<"u","vuex requires a Promise polyfill in this browser."),Zf(this instanceof e,"store must be called with the new operator."));var z=o.plugins;z===void 0&&(z=[]);var W=o.strict;W===void 0&&(W=!1);var v=o.devtools;this._committing=!1,this._actions=Object.create(null),this._actionSubscribers=[],this._mutations=Object.create(null),this._wrappedGetters=Object.create(null),this._modules=new vg(o),this._modulesNamespaceMap=Object.create(null),this._subscribers=[],this._makeLocalGettersCache=Object.create(null),this._devtools=v;var g=this,r=this,b=r.dispatch,d=r.commit;this.dispatch=function(_,y){return b.call(g,_,y)},this.commit=function(_,y,x){return d.call(g,_,y,x)},this.strict=W;var a=this._modules.root.state;z4(this,a,[],this._modules.root),xT(this,a),z.forEach(function(_){return _(s)})},ST={state:{configurable:!0}};Ap.prototype.install=function(e,o){e.provide(o||tH,this),e.config.globalProperties.$store=this;var s=this._devtools!==void 0?this._devtools:process.env.NODE_ENV!=="production"||!1;s&&lNt(e,this)},ST.state.get=function(){return this._state.data},ST.state.set=function(e){process.env.NODE_ENV!=="production"&&Zf(!1,"use store.replaceState() to explicit replace store state.")},Ap.prototype.commit=function(e,o,s){var z=this,W=N4(e,o,s),v=W.type,g=W.payload,r=W.options,b={type:v,payload:g},d=this._mutations[v];if(!d){process.env.NODE_ENV!=="production"&&console.error("[vuex] unknown mutation type: "+v);return}this._withCommit(function(){d.forEach(function(a){a(g)})}),this._subscribers.slice().forEach(function(a){return a(b,z.state)}),process.env.NODE_ENV!=="production"&&r&&r.silent&&console.warn("[vuex] mutation type: "+v+". Silent option has been removed. Use the filter functionality in the vue-devtools")},Ap.prototype.dispatch=function(e,o){var s=this,z=N4(e,o),W=z.type,v=z.payload,g={type:W,payload:v},r=this._actions[W];if(!r){process.env.NODE_ENV!=="production"&&console.error("[vuex] unknown action type: "+W);return}try{this._actionSubscribers.slice().filter(function(d){return d.before}).forEach(function(d){return d.before(g,s.state)})}catch(d){process.env.NODE_ENV!=="production"&&(console.warn("[vuex] error in before action subscribers: "),console.error(d))}var b=r.length>1?Promise.all(r.map(function(d){return d(v)})):r[0](v);return new Promise(function(d,a){b.then(function(_){try{s._actionSubscribers.filter(function(y){return y.after}).forEach(function(y){return y.after(g,s.state)})}catch(y){process.env.NODE_ENV!=="production"&&(console.warn("[vuex] error in after action subscribers: "),console.error(y))}d(_)},function(_){try{s._actionSubscribers.filter(function(y){return y.error}).forEach(function(y){return y.error(g,s.state,_)})}catch(y){process.env.NODE_ENV!=="production"&&(console.warn("[vuex] error in error action subscribers: "),console.error(y))}a(_)})})},Ap.prototype.subscribe=function(e,o){return rH(e,this._subscribers,o)},Ap.prototype.subscribeAction=function(e,o){var s=typeof e=="function"?{before:e}:e;return rH(s,this._actionSubscribers,o)},Ap.prototype.watch=function(e,o,s){var z=this;return process.env.NODE_ENV!=="production"&&Zf(typeof e=="function","store.watch only accepts a function."),t.watch(function(){return e(z.state,z.getters)},o,Object.assign({},s))},Ap.prototype.replaceState=function(e){var o=this;this._withCommit(function(){o._state.data=e})},Ap.prototype.registerModule=function(e,o,s){s===void 0&&(s={}),typeof e=="string"&&(e=[e]),process.env.NODE_ENV!=="production"&&(Zf(Array.isArray(e),"module path must be a string or an Array."),Zf(e.length>0,"cannot register the root module by using registerModule.")),this._modules.register(e,o),z4(this,this.state,e,this._modules.get(e),s.preserveState),xT(this,this.state)},Ap.prototype.unregisterModule=function(e){var o=this;typeof e=="string"&&(e=[e]),process.env.NODE_ENV!=="production"&&Zf(Array.isArray(e),"module path must be a string or an Array."),this._modules.unregister(e),this._withCommit(function(){var s=_T(o.state,e.slice(0,-1));delete s[e[e.length-1]]}),nH(this)},Ap.prototype.hasModule=function(e){return typeof e=="string"&&(e=[e]),process.env.NODE_ENV!=="production"&&Zf(Array.isArray(e),"module path must be a string or an Array."),this._modules.isRegistered(e)},Ap.prototype.hotUpdate=function(e){this._modules.update(e),nH(this,!0)},Ap.prototype._withCommit=function(e){var o=this._committing;this._committing=!0,e(),this._committing=o},Object.defineProperties(Ap.prototype,ST);var gNt=vNt(function(e,o){var s={};return process.env.NODE_ENV!=="production"&&!yH(o)&&console.error("[vuex] mapMutations: mapper parameter must be either an Array or an Object"),yNt(o).forEach(function(z){var W=z.key,v=z.val;s[W]=function(){for(var g=[],r=arguments.length;r--;)g[r]=arguments[r];var b=this.$store.commit;if(e){var d=bNt(this.$store,"mapMutations",e);if(!d)return;b=d.context.commit}return typeof v=="function"?v.apply(this,[b].concat(g)):b.apply(this.$store,[v].concat(g))}}),s});function yNt(e){return yH(e)?Array.isArray(e)?e.map(function(o){return{key:o,val:o}}):Object.keys(e).map(function(o){return{key:o,val:e[o]}}):[]}function yH(e){return Array.isArray(e)||aH(e)}function vNt(e){return function(o,s){return typeof o!="string"?(s=o,o=""):o.charAt(o.length-1)!=="/"&&(o+="/"),e(o,s)}}function bNt(e,o,s){var z=e._modulesNamespaceMap[s];return process.env.NODE_ENV!=="production"&&!z&&console.error("[vuex] module namespace not found in "+o+"(): "+s),z}const xNt={name:"tooltip",props:{data:{type:Object,required:!0}},computed:{showTooltip(){return{visible:this.data.visible}}},methods:{tooltipClick:function(e){},closeClick:function(e){this.data.link="",this.data.visible=!1}}};function _Nt(e,o,s,z,W,v){return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["back-tooltip",v.showTooltip])},[t.createElementVNode("div",{class:t.normalizeClass(["box-tooltip",v.showTooltip]),onClick:o[1]||(o[1]=(...g)=>v.tooltipClick&&v.tooltipClick(...g))},[t.createElementVNode("span",{class:"box-tooltip-close",onClick:o[0]||(o[0]=(...g)=>v.closeClick&&v.closeClick(...g))},"×"),t.renderSlot(e.$slots,"default",{},void 0,!0)],2)],2)}const wNt=vb(xNt,[["render",_Nt],["__scopeId","data-v-0336fa9c"]]),kNt=/^https:\/\/[a-z0-9]+\.execute-api\.[a-z0-9-]+\.amazonaws\.com\/(prod|qa\d*)\//,SNt=/^https:\/\/golstats-microservices\.s3[.-]us-west-2\.amazonaws\.com\//,TNt="https://apis.golstats.com",CNt="https://dev-apis.golstats.com";function ENt(e,o,s=!1){if(!o||o===1)return e;const z=s?CNt:TNt,W=e.match(kNt);if(W){const g=e.replace(W[0],"");return`${z}/${o}/${g}`}const v=e.match(SNt);if(v){const g=e.replace(v[0],"");return`${z}/${o}/${g}`}return e}const ANt=1e3,vH=ANt*60,TT=vH*60,bH=TT*24,MNt={data(){return{timeLeft:"",currentTime:new Date().valueOf(),interval:null,gameDateTime:new Date,now:new Date}},computed:{isToday(){return`${this.now.getFullYear()}.${this.now.getMonth()}.${this.now.getDate()}`==`${this.gameDateTime.getFullYear()}.${this.gameDateTime.getMonth()}.${this.gameDateTime.getDate()}`},gameStart(){return this.gameDateTime.toTimeString().slice(0,5)}},methods:{checkTimeLeft(){const e=new Date(this.gameData.dateTimeUTC).valueOf();e>this.currentTime?(this.timeLeft=this.getTimeLeft(e),this.interval=setInterval(()=>{this.timeLeft=this.getTimeLeft(e)},6e4)):this.timeLeft="00:00 hrs"},getTimeLeft(e){let o=e.valueOf()-this.currentTime;const s=Math.floor(o/bH);o=o-s*bH;const z=Math.floor(o/TT);o=o-z*TT;const W=Math.floor(o/vH);return`${s?`${s} dias `:""}${z<10?`0${z}`:z}:${W<10?`0${W}`:W} hrs.`}},beforeDestroy(){this.interval&&clearInterval(this.interval)}};function PNt(e){return`${{}.TEAM_LOGOS_URL||"https://golstatsimages.blob.core.windows.net/teams-80/"}${e}.png`}function INt(e){return`${{}.PROFILE_PHOTO_PLAYER||"https://golstatsimages.blob.core.windows.net/players-profile/"}${e}.png`}const CT={GOAL_IDS:["1-1","1-2","1-3","1-4","1-5","1-6","1-7","1-12","1-13","1-16","4-14"],YELLOW_CARD_IDS:["2-8"],RED_CARD_IDS:["2-9"]},LNt="/icn-play.svg",BNt="/icn-tiros-de-esquina.svg",ONt="/icn-tiro-a-porteria.svg",zNt="/icn-cambio.svg",NNt="/icn-falta.svg",DNt="/atajada.svg",FNt="/fuera-de-lugar.svg",ET="/gol.svg",RNt="/var.png",VNt="/tiempo-agregado.svg",jNt="/jugada-peligrosa.svg",UNt="/penal-marcado.svg",GNt="/penal-fallado.svg",HNt="/inicia-el-partido.svg",ZNt="/fin-del-partido.svg",WNt="/icn-tarjeta-amarilla.svg",XNt="/icn-tarjeta-roja.svg",qNt=[1,2,3,4,6],YNt={name:"TimeLineEvent",props:{gameEvent:{type:Object,required:!0},isMobile:{type:Boolean,default:!1},width:{type:Number,default:352},timeLineWidth:{type:Number,default:0},canPlayVideos:{type:Boolean,default:!0}},data(){return{lastHeight:0,gameEventKey:0}},computed:{nameClasses(){const e=[],o=`${this.gameEvent.event_type_id}-${this.gameEvent.category_id}`;return CT.GOAL_IDS.includes(o)?(e.push("is-main-event"),e.push("goal")):CT.YELLOW_CARD_IDS.includes(o)?(e.push("is-main-event"),e.push("yellow-card")):CT.RED_CARD_IDS.includes(o)?(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(o=>INt(o))),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||qNt.includes(this.gameEvent.event_type_id)?"":this.gameEvent.player_name}},watch:{width(){this.emitHeight()},gameEvent:{deep:!0,handler(){this.gameEventKey++}}},methods:{...gNt("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,o]=this.gameEvent.player_id.split("@");this.$emit("player-changed",{playerOut:Number(e),playerIn:Number(o),teamId:this.gameEvent.team_id})}}},JNt=e=>(t.pushScopeId("data-v-f8c0f071"),e=e(),t.popScopeId(),e),$Nt={class:"time-line-event__details"},KNt={width:"127",preload:"metadata",style:{"border-radius":"8px"}},QNt=["src"],eDt=JNt(()=>t.createElementVNode("div",{class:"time-line-event__details__video-thumbnail__gradient"},[t.createElementVNode("div",{class:"time-line-event__details__video-thumbnail__gradient__button-play"},[t.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none"},[t.createElementVNode("path",{d:"M6.6041 22.8554C6.42105 22.7512 6.26805 22.5956 6.1616 22.4053C6.05515 22.215 5.99927 21.9973 6.00001 21.7755V2.22137C6.00026 2.00039 6.0565 1.78362 6.16274 1.59409C6.26899 1.40456 6.42127 1.24936 6.6034 1.14499C6.78553 1.04062 6.9907 0.990981 7.1971 1.00135C7.4035 1.01171 7.60342 1.0817 7.77561 1.20386L21.4907 10.9821C21.6473 11.0935 21.7758 11.2446 21.8646 11.4219C21.9535 11.5992 22 11.7973 22 11.9985C22 12.1996 21.9535 12.3977 21.8646 12.575C21.7758 12.7523 21.6473 12.9034 21.4907 13.0148L7.77561 22.7954C7.60369 22.9178 7.40392 22.988 7.19761 22.9986C6.9913 23.0092 6.78617 22.9597 6.6041 22.8554ZM7.14347 21.7779L20.8585 11.9996L7.14347 21.7779Z",fill:"#CBEE6B"})])])],-1)),tDt={class:"time-line-event__details__info"},aDt={key:0,class:"time-line-event__details__info__header__players"},rDt={class:"time-line-event__details__info__header__players__div-img"},nDt=["src"],iDt={class:"time-line-event__details__info__body"},oDt={class:"time-line-event__details__info__body__comment"},sDt={class:"time-line-event__minute__container"},lDt={class:"time-line-event__minute__container__text"},cDt={class:"time-line-event__minute__container__icon-container"},uDt={class:"time-line-event__minute__container__icon-container__icon"},dDt={key:0,src:BNt,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},hDt={key:1,src:ONt,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},pDt={key:2,src:zNt,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},fDt={key:3,src:NNt,class:"time-line-event__minute__container__icon-container__icon__img",alt:"Event icon"},mDt={key:4,src:DNt,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},gDt={key:5,src:FNt,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},yDt={key:6,src:ET,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},vDt={key:7,src:ET,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},bDt={key:8,src:ET,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},xDt={key:9,src:RNt,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},_Dt={key:10,src:VNt,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},wDt={key:11,src:jNt,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},kDt={key:12,src:UNt,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},SDt={key:13,src:GNt,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},TDt={key:14,src:HNt,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},CDt={key:15,src:ZNt,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},EDt={key:16,src:WNt,alt:"Event icon",class:"time-line-event__minute__container__icon-container__icon__img"},ADt={key:17,src:XNt,class:"time-line-event__minute__container__icon-container__icon__img",alt:"Event icon"},MDt={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 PDt(e,o,s,z,W,v){return t.openBlock(),t.createElementBlock("div",{ref:"timeLineEvent",class:t.normalizeClass(["time-line-event",v.teamTypeClasses]),style:t.normalizeStyle({width:`${s.width}px`}),key:W.gameEventKey},[t.createElementVNode("div",$Nt,[s.canPlayVideos&&s.gameEvent.video_link!=="-"&&s.timeLineWidth>700?(t.openBlock(),t.createElementBlock("div",{key:0,class:"time-line-event__details__video-thumbnail",onClick:o[0]||(o[0]=g=>v.thumbnailClick(s.gameEvent.video_link,s.gameEvent.event_type_name))},[t.createElementVNode("video",KNt,[t.createElementVNode("source",{src:s.gameEvent.video_link+"#t=0.1",type:"video/mp4"},null,8,QNt)]),eDt])):t.createCommentVNode("",!0),t.createElementVNode("div",tDt,[t.createElementVNode("div",{class:t.normalizeClass(["time-line-event__details__info__header",v.teamTypeClasses2])},[s.gameEvent.video_link=="-"?(t.openBlock(),t.createElementBlock("div",aDt,[v.srcImgPlayers?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:0},t.renderList(v.srcImgPlayers,(g,r)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["img-player",{"second-player":r===1}]),key:r},[t.createElementVNode("div",rDt,[t.createElementVNode("img",{src:g,alt:""},null,8,nDt)])],2))),128)):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0),t.createElementVNode("div",{class:t.normalizeClass(["time-line-event__details__info__header__event-name",v.nameClasses]),onClick:o[1]||(o[1]=g=>v.thumbnailClick(s.gameEvent.video_link,s.gameEvent.event_type_name))},[s.canPlayVideos&&s.gameEvent.video_link!=="-"?(t.openBlock(),t.createElementBlock("img",{key:0,src:LNt,class:t.normalizeClass(`time-line-event__details__info__header__event-play ${[1,2].includes(s.gameEvent.event_type_id)?`time-line-event__details__info__header__event-play__${s.gameEvent.event_type_name}`:s.gameEvent.video_link!=="-"?"time-line-event__details__info__header__event-play__normal-video":""}`)},null,2)):t.createCommentVNode("",!0),t.createTextVNode(" "+t.toDisplayString(s.gameEvent.category_id?s.gameEvent.event_type_id===5?s.gameEvent.category_name:s.gameEvent.event_type_name==="Gol"?`${[13,16].includes(s.gameEvent.category_id)?"Autogol":"Gol"} de `+s.gameEvent.team_name:s.gameEvent.event_type_name:s.gameEvent.comments),1)],2)],2),t.createElementVNode("div",iDt,[t.createElementVNode("div",oDt,t.toDisplayString(this.gameEvent.category_id?`${this.gameEvent.comments}`:""),1)])])]),t.createElementVNode("div",{class:t.normalizeClass(["time-line-event__minute",v.minuteClasses])},[t.createElementVNode("div",sDt,[t.createElementVNode("div",lDt,t.toDisplayString(s.gameEvent.minute)+"'",1),t.createElementVNode("div",cDt,[t.createElementVNode("div",uDt,[s.gameEvent.category_id==18?(t.openBlock(),t.createElementBlock("img",dDt)):s.gameEvent.category_id==20?(t.openBlock(),t.createElementBlock("img",hDt)):s.gameEvent.category_id==10?(t.openBlock(),t.createElementBlock("img",pDt)):s.gameEvent.category_id==21?(t.openBlock(),t.createElementBlock("img",fDt)):s.gameEvent.category_id==27?(t.openBlock(),t.createElementBlock("img",mDt)):s.gameEvent.category_id==17?(t.openBlock(),t.createElementBlock("img",gDt)):s.gameEvent.category_id==6&&s.gameEvent.event_type_id==1||s.gameEvent.category_id==5&&s.gameEvent.event_type_id==1||s.gameEvent.category_id==1&&s.gameEvent.event_type_id==1||s.gameEvent.category_id==2&&s.gameEvent.event_type_id==1||s.gameEvent.category_id==3&&s.gameEvent.event_type_id==1||s.gameEvent.category_id==7&&s.gameEvent.event_type_id==1||s.gameEvent.category_id==12&&s.gameEvent.event_type_id==1?(t.openBlock(),t.createElementBlock("img",yDt)):s.gameEvent.category_id==4?(t.openBlock(),t.createElementBlock("img",vDt)):s.gameEvent.category_id==13||s.gameEvent.category_id==16?(t.openBlock(),t.createElementBlock("img",bDt)):s.gameEvent.category_id==30||s.gameEvent.category_id==31||s.gameEvent.category_id==32||s.gameEvent.category_id==33||s.gameEvent.category_id==34||s.gameEvent.category_id==35||s.gameEvent.category_id==36||s.gameEvent.category_id==37||s.gameEvent.category_id==38||s.gameEvent.category_id==39||s.gameEvent.category_id==40?(t.openBlock(),t.createElementBlock("img",xDt)):s.gameEvent.category_id==28?(t.openBlock(),t.createElementBlock("img",_Dt)):s.gameEvent.category_id==26?(t.openBlock(),t.createElementBlock("img",wDt)):s.gameEvent.category_id==22?(t.openBlock(),t.createElementBlock("img",kDt)):s.gameEvent.category_id==15||s.gameEvent.category_id==23?(t.openBlock(),t.createElementBlock("img",SDt)):s.gameEvent.category_id==0&&s.gameEvent.game_status_id==16||s.gameEvent.category_id==0&&s.gameEvent.game_status_id==18||s.gameEvent.category_id==0&&s.gameEvent.game_status_id==20||s.gameEvent.category_id==0&&s.gameEvent.game_status_id==22?(t.openBlock(),t.createElementBlock("img",TDt)):s.gameEvent.category_id==0&&s.gameEvent.game_status_id==13||s.gameEvent.category_id==0&&s.gameEvent.game_status_id==17||s.gameEvent.category_id==0&&s.gameEvent.game_status_id==19||s.gameEvent.category_id==0&&s.gameEvent.game_status_id==21||s.gameEvent.category_id==0&&s.gameEvent.game_status_id==23?(t.openBlock(),t.createElementBlock("img",CDt)):s.gameEvent.category_id==8?(t.openBlock(),t.createElementBlock("img",EDt)):s.gameEvent.category_id==9?(t.openBlock(),t.createElementBlock("img",ADt)):(t.openBlock(),t.createElementBlock("img",MDt))])])])],2)],6)}const IDt=vb(YNt,[["render",PDt],["__scopeId","data-v-f8c0f071"]]),LDt={"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"},BDt={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 D4=null;const ODt={name:"TimeLine",components:{Tooltip:wNt,TimeLineEvent:IDt},mixins:[MNt],props:{gameData:{type:Object,required:!0},timeLinePeriod:{type:String,default:"all"},socket:{type:Object,default:()=>({})},canPlayVideos:{type:Boolean,default:!0}},data(){return{gameEvents:[],gameEventsByPeriod:{firstHalf:[],secondHalf:[]},dataVideo:{visible:!1,link:""},gameEventsQueue:[],gameEventsUrl:"https://al2nv2dmkc.execute-api.us-west-2.amazonaws.com/prod/mxm/",transitionName:"",subscriptionInfo:{gameId:0,isSubscribed:!1},areGameEventsFilled:!1,timeLineWidth:812,eventContainerWidth:0,channelName:"",timeLineStatus:"awaiting",timeLeft:"",lastMinute:0,timeLineStatuses:[],currentStatus:{abbreviation:""},timer:"00:00"}},computed:{isMobile(){return this.timeLineWidth<580},gameEventWidth(){return this.timeLineWidth/2-30},gameEventsToShow(){return this.timeLinePeriod==="all"?this.gameEvents:this.gameEventsByPeriod[this.timeLinePeriod]}},watch:{gameData:{deep:!0,immediate:!0,handler(e){e&&e.id&&(this.gameDateTime=new Date(this.gameData.dateTimeUTC),this.gameEventsQueue=[],this.timeLineStatuses=[],this.transitionName="",this.checkTimeLeft(),e.status!==1&&this.socket&&this.socket.connected?this.subscribeToMXMChannel():this.timeLineStatus="finished",this.fillGameEvents(e.id))}},"socket.connected":{immediate:!0,handler(e){e&&this.gameData.id&&this.gameData.status!==1&&this.subscribeToMXMChannel()}},gameEvents(e){e.length&&this.gameData.status!==1&&(this.timeLineStatus="live")}},methods:{async fillGameEvents(e){try{const o=await this.fetchGameEvents(e);o?(this.gameEvents=[...o],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(o){throw new Error(o)}},getGameEventClassAndSetIcon(e,o){return e.icon=o===0?"inicio_del_partido":LDt[`${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 o=this.$store.getters.getProviderId,s=this.$store.getters.getIsDevApis,z=ENt(`${this.gameEventsUrl}${e}`,o,s),{data:{plays:W}}=await QG.get(z);return W}catch(o){throw new Error(o)}},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)D4=new ResizeObserver(()=>{this.timeLineWidth=this.$refs.timeLine.clientWidth}),D4.observe(this.$refs.timeLine);else throw new Error("Resize observer not supported!")},updateContainerHeight(e,o){const s=this.$refs[`gameEventDiv${o}`][0],z=this.$refs[`gameEventLine${o}`]?this.$refs[`gameEventLine${o}`][0]:null,W=e+12;s&&(s.style.height=`${W}px`),z&&(z.style.height=`${W}px`)},sortGameEvents(){this.gameEvents.sort((e,o)=>this.getMatchLapseMinutes(e.match_lapse)+Number(e.minute)-(this.getMatchLapseMinutes(o.match_lapse)+Number(o.minute))),this.gameEventsByPeriod={firstHalf:[],secondHalf:[]},this.gameEvents.forEach(e=>{this.gameEventsByPeriod[e.match_lapse===1?"firstHalf":"secondHalf"].push(e)})},getMatchLapseMinutes(e){let o=0;switch(e){case 1:o=0;break;case 2:o=45;break;case 3:o=90;break;case 4:o=105;break;case 5:o=120;break}return o},addGameEventFromChannel(e){this.areGameEventsFilled?(this.gameEvents.push(e),this.sortGameEvents()):this.gameEventsQueue.push(e)},deleteGameEventFromChannel(e){const o=this.gameEvents.findIndex(s=>s.play_id===e.play_id);o&&this.gameEvents.splice(o,1)},checkTimeLineStatus(){this.gameEvents.forEach(o=>{const s=BDt[o.game_status];s&&this.timeLineStatuses.push({...s,gameEvent:o})}),this.timeLineStatuses.sort((o,s)=>s.weight-o.weight);const e=this.timeLineStatuses[0];e&&(this.currentStatus=e,e.playTimer&&this.startTimer())},startTimer(){},getTeamLogoSrc(e="homeTeam"){const o=this.gameData[e].team_id;return PNt(o)},thumbnailClick(e){this.canPlayVideos&&(this.dataVideo.link=e,this.dataVideo.visible=!0)}},mounted(){this.$nextTick(()=>{this.setUpResizeObserver()})},beforeUnmount(){D4&&D4.unobserve(this.$refs.timeLine)},sockets:{new_mxm([e,o]){this.channelName===e&&this.addGameEventFromChannel(o)},update_mxm([e,o]){this.channelName===e&&(this.deleteGameEventFromChannel(o),this.addGameEventFromChannel(o))},delete_mxm([e,o]){this.channelName===e&&this.deleteGameEventFromChannel(o)}}},xH=e=>(t.pushScopeId("data-v-0c454414"),e=e(),t.popScopeId(),e),zDt={ref:"timeLine",class:"time-line"},NDt={class:"time-line__header"},DDt={class:"time-line__header__dot"},FDt={class:"time-line__header__dot__home-team team-logo"},RDt=["src"],VDt={class:"time-line__header__dot__away-team team-logo"},jDt=["src"],UDt={key:1,class:"start-line"},GDt=xH(()=>t.createElementVNode("div",null,null,-1)),HDt=xH(()=>t.createElementVNode("div",null,null,-1)),ZDt=[GDt,HDt],WDt={key:1,class:"noEventText"},XDt={class:"tooltip-data"},qDt=["src"];function YDt(e,o,s,z,W,v){const g=t.resolveComponent("TimeLineEvent"),r=t.resolveComponent("Tooltip");return t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createElementVNode("div",zDt,[t.createElementVNode("div",NDt,[t.createElementVNode("div",DDt,[t.createElementVNode("div",FDt,[t.createElementVNode("img",{src:v.getTeamLogoSrc("homeTeam"),alt:""},null,8,RDt)]),t.createElementVNode("div",VDt,[t.createElementVNode("img",{src:v.getTeamLogoSrc("awayTeam"),alt:""},null,8,jDt)])])]),(t.openBlock(),t.createElementBlock("div",{class:"time-line__game-events",key:`tlk-${W.gameEvents.length}`},[s.gameData.status!==4||s.gameData.is_live?(t.openBlock(),t.createBlock(t.TransitionGroup,{key:0,name:W.transitionName,tag:"div"},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(v.gameEventsToShow,(b,d)=>(t.openBlock(),t.createElementBlock("div",{class:"time-line__game-events__grid",key:b.play_id},[t.createElementVNode("div",{ref_for:!0,ref:`gameEventDiv${d}`,class:t.normalizeClass(v.getGameEventClassAndSetIcon(b,d))},[t.createElementVNode("div",{class:t.normalizeClass(v.getEventContainerClass(b))},[t.createVNode(g,{"game-event":b,"is-mobile":v.isMobile,"time-line-width":W.timeLineWidth,width:v.gameEventWidth,"can-play-videos":s.canPlayVideos,onEventHeight:a=>v.updateContainerHeight(a,d),onPlayerChanged:o[0]||(o[0]=a=>e.$emit("player-changed",a)),onThumbnailClick:v.thumbnailClick},null,8,["game-event","is-mobile","time-line-width","width","can-play-videos","onEventHeight","onThumbnailClick"])],2),d>0?(t.openBlock(),t.createElementBlock("div",{key:0,ref_for:!0,ref:`gameEventLine${d}`,class:"line"},null,512)):t.createCommentVNode("",!0),s.gameData.status===1&&d===v.gameEventsToShow.length-1?(t.openBlock(),t.createElementBlock("div",UDt,ZDt)):t.createCommentVNode("",!0)],2)]))),128))]),_:1},8,["name"])):(t.openBlock(),t.createElementBlock("div",WDt,"Aún no comienza el partido"))]))],512),t.createVNode(r,{data:W.dataVideo},{default:t.withCtx(()=>[t.createElementVNode("div",XDt,[t.createElementVNode("div",null,[t.createElementVNode("video",{class:"tooltip-video",controls:"",autoplay:"",src:W.dataVideo.link,format:"video/mp4"},null,8,qDt)])])]),_:1},8,["data"])],64)}const JDt=vb(ODt,[["render",YDt],["__scopeId","data-v-0c454414"]]),$Dt={class:"game-time-line__options"},KDt={class:"game-time-line__timeline"},QDt={__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://golstatsimages.blob.core.windows.net/teams-80/18.png",team_id:18,provisional_logo:"https://golstatsimages.blob.core.windows.net/teams-provisional/18.png",colloquial_name:"Toluca",acronym:"TOL",team_name:"Toluca"},awayTeam:{logo:"https://golstatsimages.blob.core.windows.net/teams-80/1.png",team_id:1,provisional_logo:"https://golstatsimages.blob.core.windows.net/teams-provisional/1.png",colloquial_name:"Chivas",acronym:"CHI",team_name:"Guadalajara"}})},socket:{type:Object,default:()=>({})},canPlayVideos:{type:Boolean,default:!0},providerId:{type:Number,default:0},isDevApis:{type:Boolean,default:!1}},setup(e){const o=e;QG.defaults.headers.common.Authorization="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MCwibmFtZSI6IlVzdWFyaW8gRnJlZSIsInVzZXJuYW1lIjoiZnJlZUBnb2xzdGF0cy5jb20iLCJlbWFpbCI6ImZyZWVAZ29sc3RhdHMuY29tIiwiaWF0IjoxNjA2NzU4Nzk1LCJleHAiOjE2MzgyOTQ3OTV9.kPNmP7yDtk38cAXrUyc7OHRh6J25VFqy-XUNzbK-4YE";const s=t.ref({width:"103px",height:"30px",borderRadius:"50px",borderColor:"#8a8a8a",borderWidth:"0.5px",backgroundColor:"rgba(255, 255, 255, 0.04)",fontSize:"14px",fontFamily:"Poppins-Regular, sans-serif",fontColor:"rgba(255, 255, 255, 0.5)",activeFontColor:"#FFFFFF",activeBorderColor:"#cbee6b"}),z=t.ref({width:"auto",height:"30px",padding:"0px 20px",borderRadius:"50px",borderColor:"#8a8a8a",borderWidth:"0.5px",backgroundColor:"rgba(255, 255, 255, 0.04)",fontSize:"14px",fontFamily:"Poppins-Regular, sans-serif",fontColor:"rgba(255, 255, 255, 0.5)",activeFontColor:"#FFFFFF",activeBorderColor:"#cbee6b"});let W=null;const v=Kzt();v.commit("setProviderId",o.providerId),v.commit("setIsDevApis",o.isDevApis);const g=t.ref(["Todo","1er tiempo","2do tiempo"]),r=t.ref("Todo"),b=t.ref({}),d=t.ref(null),a=t.ref(0),_=t.computed(()=>{let i="all";return r.value==="1er tiempo"||r.value==="1er"?i="firstHalf":(r.value==="2do tiempo"||r.value==="2do")&&(i="secondHalf"),i}),y=t.computed(()=>a.value<500);function x(i){r.value=i}function u(i){b.value=i}function n(){if(window.ResizeObserver)W=new ResizeObserver(()=>{a.value=d.value.clientWidth}),W.observe(d.value);else throw new Error("Resize observer not supported!")}return t.onMounted(()=>{n()}),t.onBeforeUnmount(()=>{W&&W.unobserve(d.value)}),(i,f)=>(t.openBlock(),t.createElementBlock("div",{ref_key:"gameTimeLine",ref:d,class:"game-time-line"},[t.createElementVNode("div",$Dt,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(g.value,l=>(t.openBlock(),t.createElementBlock("div",{key:l,class:"game-time-line__options__option"},[t.createVNode(uOt,t.mergeProps(a.value<390?z.value:s.value,{text:l=="Todo"?l:a.value<390?l.substring(0,3):l,"is-active":r.value===l,onClick:h=>x(l)}),null,16,["text","is-active","onClick"])]))),128))]),t.createElementVNode("div",KDt,[t.createVNode(JDt,{"game-data":e.game,"time-line-period":_.value,"is-mobile":y.value,socket:e.socket,"can-play-videos":e.canPlayVideos,onGameEventsByPeriodFilled:u},null,8,["game-data","time-line-period","is-mobile","socket","can-play-videos"])])],512))}},eFt=vb(QDt,[["__scopeId","data-v-2fac45b8"]]),iJt="",tFt={class:"game-data__header"},aFt={class:"game-data__header__tournament-season-dropdown"},rFt={class:"game-data__header__teams-carousel"},nFt={class:"game-data__body"},iFt={key:0,class:"no-stats-container"},oFt={key:1,class:"no-stats-container-mobile"},sFt={class:"game-data__body__menu"},lFt={class:"game-data__body__menu__contmenuswitch"};bu.defaults.headers.common.Authorization="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MCwibmFtZSI6IlVzdWFyaW8gRnJlZSIsInVzZXJuYW1lIjoiZnJlZUBnb2xzdGF0cy5jb20iLCJlbWFpbCI6ImZyZWVAZ29sc3RhdHMuY29tIiwiaWF0IjoxNjA2NzU4Nzk1LCJleHAiOjE2MzgyOTQ3OTV9.kPNmP7yDtk38cAXrUyc7OHRh6J25VFqy-XUNzbK-4YE";const cFt=t.defineComponent({name:"GSC-GameData",components:{StatisticsMain:Wse,GSCGameTimeLine:eFt,GscSwitchComponent:Ek,GSCLineupsMain:N_e,GSCPositining:oyt,GSCDatosGSMain:FTe,GSCVideoGame:iFe,ModalEvents:Rz,GSCTacticaFijaMain:lOt,GSCProminentMain:Oit,GSCComparative:Vlt}}),uFt=$i(Object.assign(cFt,{props:{tournamentsApiUrl:{type:String,default:""},areFemaleTournamentsVisible:{type:Boolean,default:!0},currentSeasonId:{type:Number,default:0},isClubes:{type:Boolean,default:!1},defaultGameId:{type:Number,default:0,validator(e){return!Number.isNaN(e)&&e>=0}},sortCalendar:{type:Boolean,default:!0},isWidget:{type:Boolean,default:!1},teamWidget:{type:Number,default:0},socket:{type:Object,default:()=>null},isSynchronization:{type:Boolean,default:!1},isTeamGamePerPage:{type:Boolean,default:!1},clientPrivilegesBySeasons:{type:Object,default:()=>null},areTournamentAndSeasonSelectsVisible:{type:Boolean,default:!0},disabledSectionsIds:{type:Array,default:()=>[]},tournamentsIdsToInclude:{type:Set,default:()=>new Set},volumetricFieldIntervalMinutes:{type:Number,default:2},chalkboardIntervalMinutes:{type:Number,default:2},gameEventsIntervalMinutes:{type:Number,default:1},isFemaleMode:{type:Boolean,default:!1}},emits:["openmedia","change-season-id","onOpenProfile","openProfileTeam","openProfilePlayer"],setup(e,{emit:o}){const s=pw();let z=null;Nd.on("socket-connected",()=>{s.commit("nextGeneral/updateIsSocketConnected",W.socket.connected)});const W=e,v=t.ref("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MCwibmFtZSI6IlVzdWFyaW8gRnJlZSIsInVzZXJuYW1lIjoiZnJlZUBnb2xzdGF0cy5jb20iLCJlbWFpbCI6ImZyZWVAZ29sc3RhdHMuY29tIiwiaWF0IjoxNjA2NzU4Nzk1LCJleHAiOjE2MzgyOTQ3OTV9.kPNmP7yDtk38cAXrUyc7OHRh6J25VFqy-XUNzbK-4YE"),g=t.ref({season:[]}),r=t.ref({}),b=t.ref(!1),d=t.ref({}),a=t.ref(1),_=t.ref(0),y=3e4,x=3e4,u=3e4,n=3e4,i=3e4,f=3e4,l=3e4,h=3e4,m=6e4,w=t.ref(null),T=t.ref(null),A=t.ref(null),C=t.ref([]),I=t.ref(null),L=t.ref(!0),E=t.ref(new Set([1,2])),P=t.ref({}),M=t.ref({minute:"",recent_lapse:0,score:{}}),S=t.ref(0),B=t.ref("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MCwibmFtZSI6IlVzdWFyaW8gRnJlZSIsInVzZXJuYW1lIjoiZnJlZUBnb2xzdGF0cy5jb20iLCJlbWFpbCI6ImZyZWVAZ29sc3RhdHMuY29tIiwiaWF0IjoxNjA2NzU4Nzk1LCJleHAiOjE2MzgyOTQ3OTV9.kPNmP7yDtk38cAXrUyc7OHRh6J25VFqy-XUNzbK-4YE"),k=t.ref(W.isWidget?[{componentName:"GSCProminentMain",name:"Generales",id:1},{componentName:"GSCVideoGame",name:"Más Videos",id:2},{componentName:"StatisticsMain",name:"Estadísticas",id:3},{componentName:"GSCComparative",name:W.isWidget?"Destacados":"Comparativa",id:4},{componentName:"GSCGameTimeLine",name:"Minuto a Minuto",id:5},{componentName:"GSCLineupsMain",name:"Alineaciones",id:6}]:[{componentName:"GSCProminentMain",name:"Destacado",id:1},{componentName:"GSCVideoGame",name:"Más Videos",id:2},{componentName:"StatisticsMain",name:"Estadísticas",id:4},{componentName:"GSCComparative",name:W.isWidget?"Destacados":"Comparativa",id:3},{componentName:"GSCGameTimeLine",name:"Minuto a Minuto",id:5},{componentName:"GSCLineupsMain",name:"Alineaciones",id:6},{componentName:"GSCTacticaFijaMain",name:"Táctica Fija",id:7}]),O=t.ref(W.isWidget?[{componentName:"GSCProminentMain",name:"Generales",id:1},{componentName:"GSCVideoGame",name:"Más Videos",id:2},{componentName:"StatisticsMain",name:"Estadísticas",id:3},{componentName:"GSCComparative",name:W.isWidget?"Destacados":"Comparativa",id:4},{componentName:"GSCGameTimeLine",name:"Minuto a Minuto",id:5},{componentName:"GSCLineupsMain",name:"Alineaciones",id:6}]:[{componentName:"GSCProminentMain",name:"Destacado",id:1},{componentName:"GSCVideoGame",name:"Más Videos",id:2},{componentName:"StatisticsMain",name:"Estadísticas",id:3},{componentName:"GSCComparative",name:W.isWidget?"Destacados":"Comparativa",id:4},{componentName:"GSCGameTimeLine",name:"Minuto a Minuto",id:5},{componentName:"GSCLineupsMain",name:"Alineaciones",id:6},{componentName:"GSCTacticaFijaMain",name:"Táctica Fija",id:7}]),D=t.ref(W.isWidget?[{componentName:"GSCProminentMain",name:"Generales",id:1},{componentName:"GSCVideoGame",name:"Más Videos",id:2},{componentName:"StatisticsMain",name:"Estadísticas",id:3},{componentName:"GSCComparative",name:W.isWidget?"Destacados":"Comparativa",id:4},{componentName:"GSCGameTimeLine",name:"Minuto a Minuto",id:5},{componentName:"GSCLineupsMain",name:"Alineaciones",id:6}]:[{componentName:"GSCProminentMain",name:"Destacado",id:1},{componentName:"GSCVideoGame",name:"Más Videos",id:2},{componentName:"StatisticsMain",name:"Estadísticas",id:3},{componentName:"GSCComparative",name:W.isWidget?"Destacados":"Comparativa",id:4},{componentName:"GSCGameTimeLine",name:"Minuto a Minuto",id:5},{componentName:"GSCLineupsMain",name:"Alineaciones",id:6},{componentName:"GSCTacticaFijaMain",name:"Táctica Fija",id:7}]);t.ref(W.isWidget?[{componentName:"GSCProminentMain",name:"Generales",id:1},{componentName:"GSCVideoGame",name:"Más Videos",id:2},{componentName:"StatisticsMain",name:"Estadísticas",id:3},{componentName:"GSCComparative",name:W.isWidget?"Destacados":"Comparativa",id:4},{componentName:"GSCGameTimeLine",name:"Minuto a Minuto",id:5},{componentName:"GSCLineupsMain",name:"Alineaciones",id:6}]:[{componentName:"GSCProminentMain",name:"Destacado",id:1},{componentName:"GSCVideoGame",name:"Más Videos",id:2},{componentName:"StatisticsMain",name:"Estadísticas",id:3},{componentName:"GSCComparative",name:W.isWidget?"Destacados":"Comparativa",id:4},{componentName:"GSCGameTimeLine",name:"Minuto a Minuto",id:5},{componentName:"GSCLineupsMain",name:"Alineaciones",id:6},{componentName:"GSCTacticaFijaMain",name:"Táctica Fija",id:7}]);const V=t.ref(0);let G=null;const H=t.ref(null),U=t.ref(0),J=t.ref(O.value[0]),re=t.ref([]);let q=t.ref("");const ae={seasonAndPrivileges:null,canPrivilegesTeamPlayVideos:!1,homeTeamDetails:{canPlayVideos:!1,team:{}},awayTeamDetails:{canPlayVideos:!1,team:{}}},ee=t.computed(()=>{const ot=[];return r.value&&r.value.id&&(ot.push({id:r.value.id,name:r.value.name,type:r.value.type}),r.value.related_seasons&&r.value.related_seasons.forEach(vt=>{ot.push({id:vt.id,type:vt.type})})),ot}),$=t.computed(()=>{if(W.clientPrivilegesBySeasons){const ot=W.clientPrivilegesBySeasons.seasonsAndPrivileges.get(r.value.id);if(ot)return ot.teamId}return 0});function Q(){b.value=!1}function ce(ot){const vt=ot.split(",");return!(vt.length<2||vt[1].split(" ").length<2)}function de(ot){w.value=ot}function he(ot){C.value.push(ot)}function pe(ot){I.value=ot}function ne(ot){A.value=ot}function le(ot){T.value=ot}function ie(ot){if(!ce(ot))return"";const vt=ve(ot);return`${me(ot)}. ${vt}`}function me(ot){return ot.split(",")[1].split(" ")[1][0]}function ve(ot){const vt=ot.split(",")[0].split(" ");return vt[0].length<=3&&vt.length>1?`${vt[0]} ${vt[1]}`:vt[0]}async function ye(ot){try{const vt=bu.create({headers:{Authorization:`${v.value}`}});P.value={};const yt=await vt.get("https://al2nv2dmkc.execute-api.us-west-2.amazonaws.com/prod/mxm/"+ot.game_id);if(P.value[ot.home_team.team_id]=[],P.value[ot.home_team.team_id].team={name:ot.home_team.acronym,logo:ot.home_team.logo},P.value[ot.home_team.team_id].goals=[],P.value[ot.home_team.team_id].red=[],P.value[ot.home_team.team_id].yellow=[],P.value[ot.visiting_team.team_id]=[],P.value[ot.visiting_team.team_id].team={name:ot.visiting_team.acronym,logo:ot.visiting_team.logo},P.value[ot.visiting_team.team_id].goals=[],P.value[ot.visiting_team.team_id].red=[],P.value[ot.visiting_team.team_id].yellow=[],yt.data.minute!=null&&(M.value={minute:yt.data.minute,recent_lapse:yt.data.recent_lapse,score:yt.data.score}),yt.data.plays)for(let It=0;It<yt.data.plays.length;It++)yt.data.plays[It].category_name=="Roja"&&yt.data.plays[It].status==1&&(ot.home_team.team_id==yt.data.plays[It].team_id?(ie(yt.data.plays[It].player_name)in P.value[ot.home_team.team_id].red||(P.value[ot.home_team.team_id].red[ie(yt.data.plays[It].player_name)]={},P.value[ot.home_team.team_id].red[ie(yt.data.plays[It].player_name)].event=[],P.value[ot.home_team.team_id].red[ie(yt.data.plays[It].player_name)].name=ie(yt.data.plays[It].player_name)),P.value[ot.home_team.team_id].red[ie(yt.data.plays[It].player_name)].event.push(yt.data.plays[It].minute)):(ie(yt.data.plays[It].player_name)in P.value[ot.visiting_team.team_id].red||(P.value[ot.visiting_team.team_id].red[ie(yt.data.plays[It].player_name)]={},P.value[ot.visiting_team.team_id].red[ie(yt.data.plays[It].player_name)].event=[],P.value[ot.visiting_team.team_id].red[ie(yt.data.plays[It].player_name)].name=ie(yt.data.plays[It].player_name)),P.value[ot.visiting_team.team_id].red[ie(yt.data.plays[It].player_name)].event.push(yt.data.plays[It].minute))),yt.data.plays[It].category_name=="Amarilla"&&yt.data.plays[It].status==1&&(ot.home_team.team_id==yt.data.plays[It].team_id?(ie(yt.data.plays[It].player_name)in P.value[ot.home_team.team_id].yellow||(P.value[ot.home_team.team_id].yellow[ie(yt.data.plays[It].player_name)]={},P.value[ot.home_team.team_id].yellow[ie(yt.data.plays[It].player_name)].event=[],P.value[ot.home_team.team_id].yellow[ie(yt.data.plays[It].player_name)].name=ie(yt.data.plays[It].player_name)),P.value[ot.home_team.team_id].yellow[ie(yt.data.plays[It].player_name)].event.push(yt.data.plays[It].minute)):(ie(yt.data.plays[It].player_name)in P.value[ot.visiting_team.team_id].yellow||(P.value[ot.visiting_team.team_id].yellow[ie(yt.data.plays[It].player_name)]={},P.value[ot.visiting_team.team_id].yellow[ie(yt.data.plays[It].player_name)].event=[],P.value[ot.visiting_team.team_id].yellow[ie(yt.data.plays[It].player_name)].name=ie(yt.data.plays[It].player_name)),P.value[ot.visiting_team.team_id].yellow[ie(yt.data.plays[It].player_name)].event.push(yt.data.plays[It].minute))),yt.data.plays[It].event_type_name=="Gol"&&yt.data.plays[It].status==1&&(ot.home_team.team_id==yt.data.plays[It].team_id?yt.data.plays[It].category_name=="Autogol"?(ie(yt.data.plays[It].player_name)in P.value[ot.visiting_team.team_id].goals||(P.value[ot.visiting_team.team_id].goals[ie(yt.data.plays[It].player_name)]={},P.value[ot.visiting_team.team_id].goals[ie(yt.data.plays[It].player_name)].event=[],P.value[ot.visiting_team.team_id].goals[ie(yt.data.plays[It].player_name)].name=ie(yt.data.plays[It].player_name)),P.value[ot.visiting_team.team_id].goals[ie(yt.data.plays[It].player_name)].event.push(yt.data.plays[It].minute)):(ie(yt.data.plays[It].player_name)in P.value[ot.home_team.team_id].goals||(P.value[ot.home_team.team_id].goals[ie(yt.data.plays[It].player_name)]={},P.value[ot.home_team.team_id].goals[ie(yt.data.plays[It].player_name)].event=[],P.value[ot.home_team.team_id].goals[ie(yt.data.plays[It].player_name)].name=ie(yt.data.plays[It].player_name)),P.value[ot.home_team.team_id].goals[ie(yt.data.plays[It].player_name)].event.push(yt.data.plays[It].minute)):yt.data.plays[It].category_name=="Autogol"?(ie(yt.data.plays[It].player_name)in P.value[ot.home_team.team_id].goals||(P.value[ot.home_team.team_id].goals[ie(yt.data.plays[It].player_name)]={},P.value[ot.home_team.team_id].goals[ie(yt.data.plays[It].player_name)].event=[],P.value[ot.home_team.team_id].goals[ie(yt.data.plays[It].player_name)].name=ie(yt.data.plays[It].player_name)),P.value[ot.home_team.team_id].goals[ie(yt.data.plays[It].player_name)].event.push(yt.data.plays[It].minute)):(ie(yt.data.plays[It].player_name)in P.value[ot.visiting_team.team_id].goals||(P.value[ot.visiting_team.team_id].goals[ie(yt.data.plays[It].player_name)]={},P.value[ot.visiting_team.team_id].goals[ie(yt.data.plays[It].player_name)].event=[],P.value[ot.visiting_team.team_id].goals[ie(yt.data.plays[It].player_name)].name=ie(yt.data.plays[It].player_name)),P.value[ot.visiting_team.team_id].goals[ie(yt.data.plays[It].player_name)].event.push(yt.data.plays[It].minute)))}catch(vt){return Promise.reject(vt)}}function ke(ot){b.value=!0,ot.is_live!=1&&ot.game_status!=0&&(ot.game_status==4||Object.keys(ot.minutes).length>0)?(S.value=1,P.value={plays:ot.minutes,home_team:ot.home_team,visiting_team:ot.visiting_team}):(S.value=0,ye(ot))}function Ee(){G=new ResizeObserver(ot=>{for(const vt of ot)U.value=vt.contentRect.width}),G.observe(H.value)}const Te=t.computed(()=>{let ot={};return d.value&&d.value.game_id&&(ot={gameId:d.value.game_id,id:d.value.game_id,seasonId:d.value.season_id,regularSeasonId:d.value.regularSeasonId,matchday_name:d.value.matchday_name,status:d.value.game_status,score:d.value.score,game_status:d.value.game_status,dateTimeUTC:d.value.date_time_utc,homeTeam:d.value.home_team,awayTeam:d.value.visiting_team,is_live:d.value.is_live,minutes:d.value.minutes}),ot});t.watch(()=>d.value.game_id,Le,{immediate:!0}),t.watch(()=>d.value.is_live,je,{immediate:!0}),t.watch(()=>s.state.nextGeneral.gameForAnalysis,()=>{s.commit("nextGeneral/updateIsSocketConnected",W.socket.connected)},{deep:!0,immediate:!0});function Pe(ot){a.value=ot.is_captured,_.value=ot.is_female,L.value=ot.is_captured!==0,g.value.id!==ot.id&&(g.value=ot,s.commit("gameGlobal/setTournamentType",ot.tournament_type))}const Be=o;function Le(ot,vt){s.commit("nextGeneral/updateShowLiveData",!0);const yt=_.value?"Destacados":"Destacadas";O.value.forEach(It=>{It.name===yt&&(It.name=_.value?"Destacadas":"Destacados")}),ye({game_id:d.value.game_id,home_team:d.value.home_team,visiting_team:d.value.visiting_team}),Re(),V.value+=1}function je(ot,vt){if(Re(),s.state.nextGeneral.gameForAnalysis.is_live!==ot&&s.commit("nextGeneral/updateGameForAnalysis",{...s.state.nextGeneral.gameForAnalysis,is_live:d.value.is_live,game_status:d.value.game_status}),ot){const yt=$w();yt.disconnected?Kw():yt.connected&&XE(`game.${d.value.game_id}.v2`),Me(),z=setInterval(()=>{S.value=0,ye({game_id:d.value.game_id,home_team:d.value.home_team,visiting_team:d.value.visiting_team})},6e4)}else Me(),Qw();ot!==vt&&(V.value+=1)}function Me(){z&&clearInterval(z)}function Re(){O.value=[],d.value.is_live||d.value.game_status===4?O.value=[...k.value]:O.value=[...D.value],W.isWidget||((r.value.is_tactic_available===0||d.value.is_live||d.value.game_status===0)&&O.value.pop(),d.value.has_tracking===1&&!(d.value.is_live||d.value.game_status===4)&&O.value.push({componentName:"GSCPositining",name:"Posicionamiento",id:8})),J.value=O.value[0]}function Ie(ot){ot.gameSeasonId=d.value.season_id,ot.gameRegularSeasonId=d.value.regularSeasonId,!(!ot.auxwidget&&xe.value&&!xe.value.canPrivilegesTeamPlayVideos)&&((d.value.is_live||d.value.game_status===0||d.value.game_status===1)&&(ot.gameIdsToFilter=[d.value.game_id]),ot.isLiveAccumulated&&(ot.gameIdsToFilter=null),(d.value.is_live||d.value.game_status===0)&&!ot.isLiveAccumulated&&(ot.liveGameConfig={gameId:d.value.game_id}),Be("openmedia",ot))}function ge(ot){Be("onOpenProfile",ot)}function Ce(ot){Be("openProfileTeam",ot)}function we(ot){Be("openProfilePlayer",ot)}function Ve(ot){We(ot),ot=="Estadísticas"&&(q.value="Comparativa")}function Ne(){q.value=""}function Ue(ot){r.value.id!==ot.id&&(r.value=ot,Be("change-season-id",ot.id))}const Xe=t.computed(()=>O.value.reduce((ot,vt)=>(W.disabledSectionsIds.includes(vt.id)||xe.value&&!xe.value.isVideoTabVisible&&vt.id===2||W.clientPrivilegesBySeasons&&vt.id===7||(L.value||vt.id!==5&&vt.id!==6)&&ot.push(vt.name),ot),[]));function Ze(ot){if(d.value.is_live||d.value.game_status===1||d.value.game_status===0){const vt=ot.playingAs.has(d.value.playingAs);return W.clientPrivilegesBySeasons.canPlayVideos&&vt}else{const vt=Oe.value.filter(yt=>ot.playingAs.has(yt.playingAs));return W.clientPrivilegesBySeasons.canPlayVideos&&vt.length>0}}const xe=t.computed(()=>{if(W.clientPrivilegesBySeasons){if(r.value&&d.value&&d.value.game_id){const ot=W.clientPrivilegesBySeasons.seasonsAndPrivileges.get(r.value.id);if(ot)if(Fe(ot.playingAs),(d.value.is_live||d.value.game_status===1||d.value.game_status===0)&&s.state.nextGeneral.showLiveData){const vt=ot.playingAs.has(d.value.playingAs);return{seasonAndPrivileges:ot,canPrivilegesTeamPlayVideos:W.clientPrivilegesBySeasons.canPlayVideos&&vt,isPrivilegesTeamOnly:!1,isPrivilegesTeamHome:d.value.home_team.team_id===ot.teamId,homeTeamDetails:{canPlayVideos:vt,team:d.value.home_team},awayTeamDetails:{canPlayVideos:vt,team:d.value.visiting_team},isVideoTabVisible:Ze(ot)}}else{const vt=d.value.home_team.team_id===ot.teamId,yt=Oe.value.filter(Ut=>ot.playingAs.has(Ut.playingAs));return{seasonAndPrivileges:ot,canPrivilegesTeamPlayVideos:W.clientPrivilegesBySeasons.canPlayVideos&&yt.length>0,isPrivilegesTeamOnly:!0,isPrivilegesTeamHome:vt,homeTeamDetails:{canPlayVideos:W.clientPrivilegesBySeasons.canPlayVideos&&vt&&yt.length>0,team:d.value.home_team},awayTeamDetails:{canPlayVideos:W.clientPrivilegesBySeasons.canPlayVideos&&!vt&&yt.length>0,team:d.value.visiting_team},isVideoTabVisible:Ze(ot)}}Fe(new Set)}return ae}return null}),Oe=t.computed(()=>{if(W.clientPrivilegesBySeasons){if(r.value){const ot=W.clientPrivilegesBySeasons.seasonsAndPrivileges.get(r.value.id);if(ot)return re.value.filter(vt=>vt.game_status===1&&ot.playingAs.has(vt.playingAs))}return[]}return[]});t.watch(Xe,()=>{xe.value&&!xe.value.canPrivilegesTeamPlayVideos&&(J.value.id===2||J.value.id===7||J.value.id===8)&&We("Resumen")},{deep:!0,immediate:!0});function Fe(ot){E.value=ot}function We(ot){if(s.commit("nextGeneral/updateShowLiveData",!0),w.value!=null&&(clearInterval(w.value),w.value=null),T.value!=null&&(clearInterval(T.value),T.value=null),A.value!=null&&(clearInterval(A.value),A.value=null),I.value!=null&&(clearInterval(I.value),I.value=null),C.value.length>0){for(let vt of C.value)clearInterval(vt);C.value=[]}W.isWidget?J.value=O.value.find(vt=>vt.name===ot)||O.value[1]:J.value=O.value.find(vt=>vt.name===ot)||O.value[0]}t.onMounted(()=>{Ee(),t.nextTick(()=>{W.isSynchronization&&We("Táctica Fija")})}),t.onBeforeUnmount(()=>{if(G&&G.disconnect(),w.value!=null&&(clearInterval(w.value),w.value=null),T.value!=null&&(clearInterval(T.value),T.value=null),A.value!=null&&(clearInterval(A.value),A.value=null),I.value!=null&&(clearInterval(I.value),I.value=null),C.value.length>0){for(let ot of C.value)clearInterval(ot);C.value=[]}e6()});function et(ot){if(ot.playingAs||(ot.playingAs=$.value?ot.home_team.team_id===$.value?1:2:0),w.value!=null&&(clearInterval(w.value),w.value=null),T.value!=null&&(clearInterval(T.value),T.value=null),A.value!=null&&(clearInterval(A.value),A.value=null),I.value!=null&&(clearInterval(I.value),I.value=null),C.value.length>0){for(let vt of C.value)clearInterval(vt);C.value=[]}d.value=ot,ot.is_live&&ot.game_status===4?Kw():Qw()}function tt(ot){re.value=ot.map(vt=>{const yt={...vt};return $.value&&(yt.playingAs=yt.home_team.team_id===$.value?1:2),yt})}return(ot,vt)=>(t.openBlock(),t.createElementBlock("div",{class:"game-data",ref_key:"gamedata",ref:H},[t.createElementVNode("div",tFt,[t.withDirectives(t.createElementVNode("div",aFt,[t.createVNode(t.unref(ZT),{"current-season-id":e.currentSeasonId,"tournaments-ids-to-include":e.tournamentsIdsToInclude,"api-url":e.tournamentsApiUrl,"list-height":"370px","are-female-visible":e.areFemaleTournamentsVisible,"is-clubes-active":e.isClubes,"is-female-mode":e.isFemaleMode,onInput:Pe,onChangeTournaments:Pe},null,8,["current-season-id","tournaments-ids-to-include","api-url","are-female-visible","is-clubes-active","is-female-mode"]),t.createVNode(t.unref(qT),{"current-season-id":e.currentSeasonId,"list-height":"370px",seasons:g.value.seasons,onInput:Ue},null,8,["current-season-id","seasons"])],512),[[t.vShow,e.areTournamentAndSeasonSelectsVisible]]),t.createElementVNode("div",rFt,[t.createVNode(t.unref(iK),{"plays-live":P.value,"info-live":M.value,token:B.value,is_captured:a.value,"await-for-seasons":"",seasons:ee.value,"is-pagination-visible":!1,"are-games-carousel-type":"","default-game-id":e.defaultGameId,"sort-calendar":e.sortCalendar,"is-team-game-per-page":e.isTeamGamePerPage,"client-privileges-team-id":$.value,"only-games-team-id":$.value,"tournament-type":t.unref(s).state.gameGlobal.tournamentType,onChangeGameCarousel:et,onOpenModalEvent:ke,onChangeGamesByClientPrivileges:tt},null,8,["plays-live","info-live","token","is_captured","seasons","default-game-id","sort-calendar","is-team-game-per-page","client-privileges-team-id","only-games-team-id","tournament-type"])])]),b.value?(t.openBlock(),t.createBlock(Rz,{key:0,width:U.value,onCloseModalEventsLive:Q,plays:P.value,game:d.value,type:S.value},null,8,["width","plays","game","type"])):t.createCommentVNode("",!0),t.createElementVNode("div",nFt,[d.value&&"live_stats"in d.value&&d.value.live_stats==0&&d.value.game_status==0?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[U.value>500?(t.openBlock(),t.createElementBlock("div",iFt,vt[0]||(vt[0]=[t.createElementVNode("div",{class:"no-stats-content"},[t.createElementVNode("h2",{class:"no-stats-title"}," Este partido se publicará en un plazo de hasta 72 horas después de finalizada la jornada. ")],-1)]))):(t.openBlock(),t.createElementBlock("div",oFt,vt[1]||(vt[1]=[t.createElementVNode("div",{class:"no-stats-content"},[t.createElementVNode("h2",{class:"no-stats-title"}," Este partido se publicará en un plazo de hasta 72 horas después de finalizada la jornada. ")],-1)])))],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createElementVNode("div",sFt,[t.createElementVNode("div",lFt,[t.createVNode(t.unref(Ek),{type:2,buttons:Xe.value,"font-family":"Poppins-Regular","font-size":"16px",width:U.value<400||U.value<700?"max-content":U.value<840||U.value<1050?"155px":"165px","selected-option":J.value.name,borderWidth:"1px",arrow:!1,height:"30px",onInput:We},null,8,["buttons","width","selected-option"])])]),Te.value&&Te.value.gameId?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(J.value.componentName),{key:V.value,game:Te.value,"is-widget":e.isWidget,"team-widget":e.teamWidget,onIntervalidpossesion:le,onIntervalidhighlive:ne,onIntervalidtops:he,onIntervalidgs:pe,subsection:t.unref(q),seasonSelected:r.value,tournamentSelected:g.value,showLineups:L.value,socket:e.socket,"time-live-prominent-data":y,"time-live-highlights-prominent-and-video":x,"time-live-possesion":u,"time-live-video-goals":n,"time-live-video-best-plays":i,"time-live-video-this-game":f,"time-live-video-specific-plays":l,"time-live-comparative-best-players":h,"time-live-comparative-avanced":m,is_captured:a.value,"is-tactic-visible":!!r.value.show_tactic,"is-synchronization":e.isSynchronization,"can-play-videos":xe.value?xe.value.canPrivilegesTeamPlayVideos:!0,"video-privileges-playing-as":E.value,"client-privileges-team-id":$.value,"play-videos-privileges":xe.value,token:B.value,"game-events-interval-minutes":e.gameEventsIntervalMinutes,"volumetric-field-interval-minutes":e.volumetricFieldIntervalMinutes,"chalkboard-interval-minutes":e.chalkboardIntervalMinutes,"is-female-mode":e.isFemaleMode,onResetSubsection:Ne,onOpenmedia:Ie,onOnOpenProfile:ge,onOpenProfileTeam:Ce,onOpenProfilePlayer:we,onChangeToTab:Ve,onOpenMediaPlayer:Ie,onIntervalid:de},null,40,["game","is-widget","team-widget","subsection","seasonSelected","tournamentSelected","showLineups","socket","is_captured","is-tactic-visible","is-synchronization","can-play-videos","video-privileges-playing-as","client-privileges-team-id","play-videos-privileges","token","game-events-interval-minutes","volumetric-field-interval-minutes","chalkboard-interval-minutes","is-female-mode"])):t.createCommentVNode("",!0)],64))])],512))}}),[["__scopeId","data-v-37215e37"]]);async function Ah({url:e,options:o={},retries:s=3}){return await bu.get(e,o).then(z=>z).catch(z=>s>0?Ah({url:e,options:o,retries:s-1}):z)}async function _H({seasonId:e},o=!0){try{return(await(await fetch(`https://golstats-microservices.s3-us-west-2.amazonaws.com/statsLeagueBySeason-${e}.json`)).json()).data}catch(s){if(o)return _H({seasonId:e},!1);throw new Error(s)}}async function dFt({seasonId:e}){try{return(await Ah({url:`https://iwxfzq6e2h.execute-api.us-west-2.amazonaws.com/prod/v2/statisticsLeagueBySeason/${e}`})).data.data}catch(o){return Promise.reject(o)}}async function hFt({seasonId:e}){try{return(await Ah({url:`https://sqf4rkvoge.execute-api.us-west-2.amazonaws.com/prod/v3/statisticsGroupedBySeason/${e}`})).data.data}catch(o){return Promise.reject(o)}}function pFt(e,o,s,z,W,v,g=!1){const r=s.map(b=>b===1?2:b===2?1:3);return e.filter(b=>{const d=v&&b[W.teamId]?b[W.teamId]!==v:!1,a=o===1?2:1;return(g||z.includes(b[W.gameId]))&&(!o||(d?a:o)===b[W.playingAs])&&(s.includes(b[W.matchResult])&&b[W.teamId]===v||r.includes(b[W.matchResult])&&b[W.teamId]!==v)})}function wH(e,o,s,z,W){return o.length===2&&s.length===3&&z.length===6?e:e.filter(v=>o.includes(v[W.playingAs])&&s.includes(v[W.matchResult])&&z.includes(v[W.section]))}async function kH({seasonId:e}){try{const o=`https://8tvo5bp9ai.execute-api.us-west-2.amazonaws.com/prod/gamesBySeason/${e}`;return(await Ah({url:o})).data}catch(o){return Promise.reject(o)}}async function fFt({seasonId:e,gameId:o}){try{const s=`https://iwxfzq6e2h.execute-api.us-west-2.amazonaws.com/prod/v2/statisticsLeagueBySeason/${e}/games/${o}`,{data:z}=await Ah({url:s});return z}catch(s){return Promise.reject(s)}}async function mFt({gameId:e}){try{const o=`https://2uj7ojhmt5.execute-api.us-west-2.amazonaws.com/prod/V2/statisticsLive/${e}`;return(await Ah({url:o})).data.data}catch(o){return Promise.reject(o)}}async function gFt({gameId:e}){try{const o=`https://55sbpmq0f5.execute-api.us-west-2.amazonaws.com/prod/specialMentions/${e}`;return(await Ah({url:o})).data.data||[]}catch(o){return Promise.reject(o)}}const yFt=["categoryId","matchLapse","section","matchResult","playingAs","total"];let AT=null;function SH(){return AT||(AT=vy(yFt)),AT}async function vFt(e){try{const o=`https://d2oco6mqmc.execute-api.us-west-2.amazonaws.com/prod/teamsBySeason/${e.seasonId}`;return(await Ah({url:o})).data}catch(o){return Promise.reject(o)}}async function TH({seasonId:e,teamId:o}){try{return await Ah({url:`https://a4dcb6avog.execute-api.us-west-2.amazonaws.com/prod/v2/statisticsTeamBySeason/${e}/${o}`})}catch(s){return Promise.reject(s)}}async function bFt(e){try{const o=`https://yjeig444bb.execute-api.us-west-2.amazonaws.com/prod/teamsBySeason/${e.seasonId}`;return await Ah({url:o})}catch(o){return Promise.reject(o)}}async function xFt(e){try{return await Ah({url:`https://nckawv8v3b.execute-api.us-west-2.amazonaws.com/prod/v2/statisticsByGame/${e.gameId}`})}catch(o){return Promise.reject(o)}}const _Ft={leagueGeneral:{namespaced:!0,state:{seasonPlays:[],currentSeasonGames:[],currentSeasonTeams:[],selectedRound:1,booleanAreLiveGames:!1,booleanIsLiveGamesModalOpen:!1},getters:{seasonPlays:e=>e.seasonPlays,filteredPlaysStack(e,o,s,z){return pFt(e.seasonPlays,z["filterGeneral/getPlayingAs"],z["filterGeneral/getResults"],z["filterGeneral/getSelectedGamesIds"],SH(),z["teamsGeneral/team"].team_id,!0)},nextGamesSchedule(e){const o=e.currentSeasonGames.reduce((s,z)=>{const W={...z};return W.home_team=e.currentSeasonTeams.find(v=>v.team_id===z.home_team),W.visiting_team=e.currentSeasonTeams.find(v=>v.team_id===z.visiting_team),s[z.matchday_abbreviation]?s[z.matchday_abbreviation][z.game_status===3?"canceled":z.date]?s[z.matchday_abbreviation][z.game_status===3?"canceled":z.date].push(W):s[z.matchday_abbreviation][z.game_status===3?"canceled":z.date]=[W]:s[z.matchday_abbreviation]={[z.game_status===3?"canceled":z.date]:[W]},s},{});for(let[s,z]of Object.entries(o))o[s]=Object.entries(z).map(([W,v])=>({date:W,games:v})),o[s].sort((W,v)=>W.date<v.date?-1:W.date>v.date?1:0);return o},matchdaysDates(e,o){let s=[];if(o.nextGamesSchedule){let z=Object.keys(o.nextGamesSchedule);for(let W of z){let v=Number(W.replace("M","")),g=o.nextGamesSchedule[W].map(r=>({matchday:v,date:new Date(r.date)}));s=s.concat(g)}}return s},closestMatchDay(e,o){let s=new Date,z=0,W=-new Date(0,0,0).valueOf(),v=o.matchdaysDates,g=v.length;for(let r=0;r<v.length;r++)z=Math.abs(v[r].date-s),z<W&&(g=r,W=z);return v[g]?v[g].matchday:1}},mutations:{setBooleanIsLiveGamesModalOpen(e,o){e.booleanIsLiveGamesModalOpen=o},setBooleanAreLiveGames(e,o){e.booleanAreLiveGames=o},updateSeasonPlays(e,o){e.seasonPlays=o},updateCurrentSeasonTeams(e,o){e.currentSeasonTeams=o},updateCurrentSeasonGames(e,o){e.currentSeasonGames=o},updateSelectedRound(e,o){e.selectedRound=o}},actions:{async getSeasonPlays({commit:e,rootGetters:o},s=!1){try{const z=await _H({seasonId:o["filterGeneral/getSeasonId"]});if(s)return z;e("updateSeasonPlays",z)}catch(z){return Promise.reject(z)}},async getCurrentSeasonGames({commit:e,rootGetters:o}){try{const s=await kH({seasonId:o["loginGeneral/seasonId"]});e("updateCurrentSeasonGames",s)}catch(s){return Promise.reject(s)}},async getCurrentSeasonTeams({commit:e,rootGetters:o}){try{const s=await vFt({seasonId:o["loginGeneral/seasonId"]});e("updateCurrentSeasonTeams",s.teams)}catch(s){return Promise.reject(s)}},async isDataFilled({state:e,dispatch:o,commit:s}){try{if(e.currentSeasonGames.length>0&&e.currentSeasonTeams.length>0)return s("setIsSectionLoading",!1,{root:!0}),!0;const z=[void 0,void 0];return e.currentSeasonGames.length===0&&(z[0]=o("getCurrentSeasonGames")),e.currentSeasonTeams.length===0&&(z[1]=o("getCurrentSeasonTeams")),await Promise.all(z),!1}catch(z){throw new Error(z)}}}}};async function wFt({filter:e}){try{const o=`https://n7ielynjxk.execute-api.us-east-2.amazonaws.com/qa/filters?filters=${e}`,{data:s}=await Ah({url:o});return s}catch(o){return Promise.reject(o)}}const kFt=["categoryId","teamId","matchResult","playingAs","matchLapse","section","total"];let MT=null;function SFt(){return MT||(MT=vy(kFt)),MT}class F4{constructor(){yu(this,"maximumLiveSection",1);yu(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:[]});yu(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(o){o>this.maximumLiveSection&&(this.maximumLiveSection=o)}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(o,s,z){z&&(this.setMaximumLiveSection(o),this.accomplished.totalLive+=s,this.accomplished.totalsLiveTrendLive.sections[o-1]+=s,this.increaseTrendLiveAccumulatedByOne(this.accomplished.totalsLiveTrendLive,o,s)),this.accomplished.totalPostGame+=s,this.accomplished.avgPostGameTrendLive.sections[o-1]+=s,this.increaseTrendLiveAccumulatedByOne(this.accomplished.avgPostGameTrendLive,o,s)}increaseReceivedByOne(o,s,z){z&&(this.setMaximumLiveSection(o),this.received.totalLive+=s,this.received.totalsLiveTrendLive.sections[o-1]+=s,this.increaseTrendLiveAccumulatedByOne(this.received.totalsLiveTrendLive,o,s)),this.received.totalPostGame+=s,this.received.avgPostGameTrendLive.sections[o-1]+=s,this.increaseTrendLiveAccumulatedByOne(this.received.avgPostGameTrendLive,o,s)}increaseTrendLiveAccumulatedByOne(o,s,z){for(let W=s-1;W<o.accumulated.length;W++)o.accumulated[W]+=z}decreaseAccomplishedLiveByOne(o,s){this.accomplished.totalLive>0&&(this.accomplished.totalLive-=s),this.accomplished.totalsLiveTrendLive.sections[o-1]>0&&(this.accomplished.totalsLiveTrendLive.sections[o-1]-=s,this.decreaseTotalsLiveTrendLiveAccumulatedByOne(this.accomplished.totalsLiveTrendLive,o,s))}decreaseReceivedLiveByOne(o,s){this.received.totalLive>0&&(this.received.totalLive-=s),this.received.totalsLiveTrendLive.sections[o-1]>0&&(this.received.totalsLiveTrendLive.sections[o-1]-=s,this.decreaseTotalsLiveTrendLiveAccumulatedByOne(this.received.totalsLiveTrendLive,o,s))}decreaseTotalsLiveTrendLiveAccumulatedByOne(o,s,z){for(let W=o.accumulated.length-1;W>=s-1;W--)o.accumulated[W]-=z}calculateAvg(o){o&&(this.accomplished.avgPostGame=this.accomplished.totalPostGame/o,this.received.avgPostGame=this.received.totalPostGame/o,this.accomplished.avgPostGameTrendLive.sections=this.getAvgPostGameTrendLiveAvg(this.accomplished.avgPostGameTrendLive.sections,o),this.accomplished.avgPostGameTrendLive.accumulated=this.getAvgPostGameTrendLiveAvg(this.accomplished.avgPostGameTrendLive.accumulated,o),this.received.avgPostGameTrendLive.sections=this.getAvgPostGameTrendLiveAvg(this.received.avgPostGameTrendLive.sections,o),this.received.avgPostGameTrendLive.accumulated=this.getAvgPostGameTrendLiveAvg(this.received.avgPostGameTrendLive.accumulated,o))}getAvgPostGameTrendLiveAvg(o,s){return o.map(z=>z/s)}calculateRanking(o,s,z,W,v,g,r,b){let d=[];W===3&&o&&o.length&&(z.playingAs.length!==2||z.matchResult.length!==3)?d=Array.from(o.reduce((_,y)=>{const x=y[s.playingAs]===1,u=x?"1":"2",n=_.get(y[s.gameId]);if(n)n[u]?n[u].arrayPlays.push(y):n[u]={numberTeamId:y[s.teamId],arrayPlays:[y]};else{const i={numberMatchResult:y[s.matchResult]};x&&(i[1]={numberTeamId:y[s.teamId],arrayPlays:[y]}),_.set(y[s.gameId],i)}return _},new Map).values()).reduce((_,y)=>{const x=z.playingAs.length===2?"both":z.playingAs[0].toString();return(x==="both"&&(y[1].numberTeamId===z.teamId||y[2].numberTeamId===z.teamId)||x!=="both"&&y[x].numberTeamId===z.teamId)&&z.matchResult.includes(y.numberMatchResult)&&_.push(...y[1].arrayPlays,...y[2].arrayPlays),_},[]).filter(_=>z.sections.includes(_[s.section])):(d=o?[...o]:[],r&&o&&(d=o.filter(a=>z.playingAs.includes(a[s.playingAs])&&z.matchResult.includes(a[s.matchResult])&&z.sections.includes(a[s.section])))),this.setTeamRanking(d,W,s,z.teamId,g,"accomplished",b)}setTeamRanking(o,s,z,W,v,g,r){let b=null,d=null;s===3&&(b=new Map,d={},o.forEach(y=>{const x=b.get(y[z.gameId]);x?x[y[z.teamId.toString()]]?x[y[z.teamId.toString()]]+=y[z.total]:x[y[z.teamId.toString()]]=y[z.total]:b.set(y[z.gameId],{[y[z.teamId.toString()]]:y[z.total]})}),Array.from(b.values()).forEach(y=>{const[x,u]=Object.keys(y).map(i=>i),n=y[x]+y[u];this.addPassesAvgByTeam(d,x,n?y[x]/n:0),this.addPassesAvgByTeam(d,u,n?y[u]/n:0)}));const a=v.sort((y,x)=>y.team_id-x.team_id).map(y=>{if(s===3){const x=d[y.team_id.toString()];return{teamId:y.team_id,points:x?x.numberTotalPassesAvg/x.numberGamesCount:0,total:x?x.numberTotalPassesAvg:0}}else{const x=o.reduce((u,n)=>n[z.teamId]===y.team_id&&s===n[z.categoryId]?u+n[z.total]:u,0);return{teamId:y.team_id,points:y[`${r}FilterGames`]?x/y[`${r}FilterGames`]:0,total:x}}}).sort((y,x)=>x.points-y.points);this.accomplished.arrayRankings=a;const _=a.findIndex(y=>y.teamId===W);s===3&&(this.accomplished.avgPreGame=a[_].points),this[g].ranking=_+1,this[g].leader=a[0]}addPassesAvgByTeam(o,s,z){o[s]?(o[s].numberGamesCount+=1,o[s].numberTotalPassesAvg+=z):o[s]={numberGamesCount:1,numberTotalPassesAvg:z}}}class nc{constructor(o,s,z,W,v,g,r,b,d,a,_=!0){yu(this,"id","");yu(this,"generalId",0);yu(this,"name","");yu(this,"names",{"0-0":"","1-1":"","0-1":"","1-0":""});yu(this,"mentions",{"0-0":"","1-1":"","0-1":"","1-0":""});yu(this,"accomplishedCategoryIds",[]);yu(this,"receivedCategoryIds",[]);yu(this,"generalCategoriesIds",{accomplished:0,received:0});yu(this,"specialMention","");yu(this,"homeTeam",new F4);yu(this,"visitingTeam",new F4);yu(this,"isLeagueDataCalculated",!1);yu(this,"leagueAccomplishedMax",0);yu(this,"leagueReceivedMax",0);yu(this,"leagueAccomplishedAvg",0);yu(this,"leagueReceivedAvg",0);yu(this,"leagueAccomplishedAccumulator",0);yu(this,"leagueReceivedAccumulator",0);yu(this,"homeTeamType","homeTeam");yu(this,"visitingTeamType","visitingTeam");yu(this,"betOnly",!1);yu(this,"isPercent",!1);this.id=`${z.accomplished}-${z.received}`,this.accomplishedCategoryIds=o||[],this.receivedCategoryIds=s||[],this.generalCategoriesIds=z||{accomplished:0,received:0},this.name=W,this.names["0-0"]=W||"",this.names["1-1"]=v||"",this.names["0-1"]=g||"",this.names["1-0"]=r||"",this.generalId=b||0,this.betOnly=d||!1,this.isPercent=a||!1,this.isVisible=_}addLeaguePlays(o,s,z){o.length===0||!z||this.isLeagueDataCalculated||(o.forEach(W=>{this.isAccomplishedLeaguePlay(W[s.categoryId])&&(this.leagueAccomplishedAccumulator+=W[s.total]),this.isReceivedLeaguePlay(W[s.categoryId])&&(this.leagueReceivedAccumulator+=W[s.total])}),this.leagueAccomplishedAvg=(this.leagueAccomplishedAccumulator/(2*z)).toFixed(2),this.leagueAccomplishedMax=Math.round(this.leagueAccomplishedAvg*1.5),this.leagueReceivedAvg=(this.leagueReceivedAccumulator/(2*z)).toFixed(2),this.leagueReceivedMax=Math.round(this.leagueReceivedAvg*1.5),this.isLeagueDataCalculated=!0)}addSpecialMention(o,s,z){let W="-";for(const[v,g]of Object.entries(this.generalCategoriesIds))o===g&&(W=`${v==="accomplished"?"0":"1"}${W}`),s===g&&(W=`${W}${v==="accomplished"?"0":"1"}`);W.length===3&&(this.mentions[W]=z)}resetMentions(){this.mentions={"0-0":"","1-1":"","0-1":"","1-0":""}}addTeamPlays(o,s,z,W,v){!z||!v||o!==this.homeTeamType&&o!==this.visitingTeamType||(z.forEach(g=>{this.isAccomplishedPlay(g[W.categoryId])?this[o].increaseAccomplishedByOne(g[W.section],g[W.total]):this.isReceivedPlay(g[W.categoryId])&&this[o].increaseReceivedByOne(g[W.section],g[W.total])}),this[o].calculateAvg(v))}addLivePlay(o,s,z,W,v=!1,g=!1){(o===this.homeTeamType||o===this.visitingTeamType)&&z[W.categoryId].includes(this.generalCategoriesIds.accomplished)&&this[o].increaseAccomplishedByOne(z[W.section],z[W.total],!0)}subtractLivePlay(o,s,z,W,v){(o===this.homeTeamType||o===this.visitingTeamType)&&(this.isAccomplishedPlay(z[W.categoryId])&&!v?this[o].decreaseAccomplishedLiveByOne(z[W.section],z[W.total]):this.isReceivedPlay(z[W.categoryId])&&v&&this[o].decreaseReceivedLiveByOne(z[W.section],z[W.total]))}isAccomplishedLeaguePlay(o){return!!(this.receivedCategoryIds[0]===40?this.receivedCategoryIds:this.accomplishedCategoryIds).find(z=>o===z||`${o}_r`===z)}isReceivedLeaguePlay(o){return!!this.receivedCategoryIds.find(s=>o===s)}isAccomplishedPlay(o){return this.generalCategoriesIds.accomplished===o}isReceivedPlay(o){return this.generalCategoriesIds.received===o}calcRankingLeague(o,s,z,W,v,g=!1){this[this.homeTeamType].calculateRanking(o,s,z,this.generalCategoriesIds.accomplished,this.generalCategoriesIds.received,v,g,this.homeTeamType),this[this.visitingTeamType].calculateRanking(o,s,W,this.generalCategoriesIds.accomplished,this.generalCategoriesIds.received,v,g,this.visitingTeamType)}resetData(){this.homeTeam=new F4,this.visitingTeam=new F4,this.isLeagueDataCalculated=!1,this.leagueAccomplishedMax=0,this.leagueReceivedMax=0,this.leagueAccomplishedAvg=0,this.leagueReceivedAvg=0,this.leagueAccomplishedAccumulator=0,this.leagueReceivedAccumulator=0}isInGeneralCategory(o){return this.generalCategoriesIds.accomplished===o||this.generalCategoriesIds.received===o}}const TFt={general:{name:"General",priority:1,parentInfo:{parentAnalysis:[1],analysisTypeBlocks:[1]},subcategories:{goals:new nc([12,55,"35_r","54_r"],null,{accomplished:1,received:0},"Goles","Goles recibidos","Goles realizados / recibidos","Goles recibidos / realizados",1),shotToGoal:new nc([91,95,158,167,176,343,330,333,423],null,{accomplished:2,received:0},"Remates a destino","","","",1),possession:new nc([2,3,20,21],null,{accomplished:3,received:0},"Posesión","","","",1,!1,!0,!1),yellowCards:new nc([14,52],null,{accomplished:4,received:0},"Tarjetas amarillas","","","",1),redCards:new nc([15,53],null,{accomplished:5,received:0},"Tarjetas rojas","","","",1),centerCrosses:new nc([13,25],null,{accomplished:6,received:0},"Centros totales","","","",1)}},offensive:{name:"Ofensivo",priority:2,parentInfo:{parentAnalysis:[1],analysisTypeBlocks:[1]},subcategories:{shotsOnGoal:new nc([19],null,{accomplished:7,received:0},"Tiros a gol","","","",1),shotsOnGoalDestination:new nc([91,95],null,{accomplished:8,received:0},"Tiros a gol destino","","","",1),shotToGoal:new nc([91,95,158,167,176,343,330,333,423],null,{accomplished:2,received:0},"Remates a destino","","","",1),ballsWonOpponentPenaltyBox:new nc([11],null,{accomplished:10,received:0},"Balones ganados área rival","","","",1),centersFromRight:new nc([25],null,{accomplished:11,received:0},"Centros por derecha","","","",1),centersFromLeft:new nc([13],null,{accomplished:12,received:0},"Centros por izquierda","","","",1),success1VS1:new nc([4],null,{accomplished:13,received:0},"Enfrentamientos ofensivos exitosos","","","",1),unsuccess1VS1:new nc([208],null,{accomplished:14,received:0},"Enfrentamientos ofensivos no exitosos","","","",1)}},defensive:{name:"Defensivo",priority:3,parentInfo:{parentAnalysis:[1],analysisTypeBlocks:[1]},subcategories:{saves:new nc([39],null,{accomplished:15,received:0},"Atajadas","","","",1),ballsWonOwnPenaltyBox:new nc([23],null,{accomplished:16,received:0},"Balones ganados área propia","","","",1),success1VS1:new nc([5],null,{accomplished:17,received:0},"Enfrentamientos defensivos exitosos","","","",1),unsuccess1VS1:new nc([209],null,{accomplished:18,received:0},"Enfrentamientos defensivos no exitosos","","","",1),aerialGame:new nc([24],null,{accomplished:19,received:0},"Juego aéreo resto del campo","","","",1),clearances:new nc([34],null,{accomplished:20,received:0},"Rechaces","","","",1)}},possession:{name:"Posesión",priority:4,parentInfo:{parentAnalysis:[1],analysisTypeBlocks:[1]},subcategories:{totalPasses:new nc([2,3,20,21],null,{accomplished:21,received:0},"Pases totales","","","",1),successPasses:new nc([2,20],null,{accomplished:22,received:0},"Pases acertados","","","",1),successPassesRivalHalf:new nc([20],null,{accomplished:23,received:0},"Pases acertados en cancha rival","","","",1),ballsRecoveredInChallenge:new nc([483],null,{accomplished:24,received:0},"Balones recuperados en disputa","","","",1),ballsRecoveredWithoutChallenge:new nc([484],null,{accomplished:25,received:0},"Balones recuperados sin disputa","","","",1),ballsLostInChallenge:new nc([494],null,{accomplished:26,received:0},"Balones perdidos en disputa","","","",1),ballsLostWithoutChallenge:new nc([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 nc([155,164,173,362,371,380],null,{accomplished:28,received:0},"Tiros libres 4/4","","","",1),freeKick34:new nc([150,357],null,{accomplished:29,received:0},"Tiros libres 3/4","","","",1),freeKickOwnHalf:new nc([149,356],null,{accomplished:30,received:0},"Tiros libres cancha propia","","","",1),cornerFromRight:new nc([32],null,{accomplished:31,received:0},"Tiros de esquina por derecha","","","",1),cornerFromLeft:new nc([31],null,{accomplished:32,received:0},"Tiros de esquina por izquierda","","","",1),goalKick:new nc([264,28],null,{accomplished:33,received:0},"Saques de meta","","","",1)}},penalties:{name:"Infracciones",priority:6,parentInfo:{parentAnalysis:[1],analysisTypeBlocks:[1]},subcategories:{totalFouls:new nc([17,50],null,{accomplished:34,received:0},"Faltas totales","","","",1),foulOwnGoal:new nc([348,478],null,{accomplished:35,received:0},"Faltas cerca de su propia portería","","","",1),fieldFouls:new nc([349,350,479,480],null,{accomplished:36,received:0},"Faltas resto del campo","","","",1),penaltyKick:new nc([465,481],null,{accomplished:37,received:0},"Penales cometidos","","","",1),offside:new nc([33],null,{accomplished:38,received:0},"Fueras de lugar","","","",1)}}},CFt=[{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}],EFt=["teamId","categoryId","matchlapse","section","matchResult","playingAs","total","gameId"];let PT=null;function AFt(){return PT||(PT=vy(EFt)),PT}const MFt=["playId","gameId","teamId","playerId","momentOfPlay","categoryId","categoryType","matchLapse","section","matchResult","playingAs","total","coordinate1X","coordinate1Y","coordinate2X","coordinate2Y","coordinate3X","coordinate3Y"];let IT=null;function PFt(){return IT||(IT=vy(MFt)),IT}function R4(e,o,s){return[s.get(e[o.categoryId])||[],e[o.teamId],e[o.matchResult],e[o.playingAs],e[o.matchLapse],e[o.section],e[o.total]]}function CH(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 LT(e,o,s){let z=[...o];return e[s.categoryId]===2&&(z[0]=14),e[s.categoryId]===20&&(z[0]=15),[14,15].includes(z[0])?z:null}const IFt=$w(),LFt=[{name:"Liga MX",id:1},{name:"Liga MX Femenil",id:1001},{name:"Liga Expansión MX",id:1071}],BFt={nextGeneral:{namespaced:!0,state:{seasonId:0,pastSeasonId:0,usePastSeasonId:!1,isSocketConnected:!1,indexesLP:SH(),indexesTSP:SFt(),indexesLS:AFt(),indexesTLP:PFt(),nextGamesDataStructure:TFt,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:!0,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(o=>o.id)},showPostMatchData:e=>e.showPostMatch,getHomeResultGame:e=>e.homeResultGame,getAwayResultGame:e=>e.awayResultGame,getSeasonId:e=>e.seasonId,getGameForAnalysis:e=>e.gameForAnalysis,isLive:e=>e.isLive,showLive:e=>e.gameForAnalysis.game_status===4&&e.gameForAnalysis.is_live,menuOptionActive:e=>e.menuOptionActive,showLiveData:e=>e.showLiveData,showAdvanceFilter:e=>e.showAdvanceFilter,idAssetSelected:e=>e.idAssetSelected,gameId:e=>e.gameId,game:e=>e.game,homeTeam(e){return e.homeTeamInfo},visitingTeam(e){return e.awayTeamInfo},rankingData(e){return e.statistics},homeTeamStatisticsType(e){return e.homeTeamFilter.statistics?"received":"accomplished"},visitingTeamStatisticsType(e){return e.visitingTeamFilter.statistics?"received":"accomplished"},subcategoryName(e){return`${e.homeTeamFilter.statistics}-${e.visitingTeamFilter.statistics}`},statisticsTypes(e){return CFt.filter(o=>o.parentAnalysis.includes(e.selectedAnalysis.id))},homeTeamFilteredPlays(e){if(e.homeTeamFilter.requiresPlaysFiltering)return wH(e.homeTeamPlays,e.homeTeamFilter.playingAs,e.homeTeamFilter.matchResult,e.homeTeamFilter.sections,e.indexesTSP)},visitingTeamFilteredPlays(e){if(e.visitingTeamFilter.requiresPlaysFiltering)return wH(e.visitingTeamPlays,e.visitingTeamFilter.playingAs,e.visitingTeamFilter.matchResult,e.visitingTeamFilter.sections,e.indexesTSP)},currentSeasonTeamsIds(e){return e.currentSeasonTeams.map(o=>o.team_id)},canFilledStructure(e){return e.homeTeamFilter.requiresPlaysFiltering||e.visitingTeamFilter.requiresPlaysFiltering},totalFilteredHomeGames(e){return e.homeGames.filter(o=>e.homeTeamFilter.playingAs.includes(o[0])).filter(o=>e.homeTeamFilter.matchResult.includes(o[1])).reduce((o,s)=>o+s[2],0)},totalFilteredVisitingGames(e){return e.visitingGames.filter(o=>e.visitingTeamFilter.playingAs.includes(o[0])).filter(o=>e.visitingTeamFilter.matchResult.includes(o[1])).reduce((o,s)=>o+s[2],0)},filledDataStructure(e,o){if(e.currentSeasonPlays)for(const s of Object.values(e.nextGamesDataStructure))for(const z of Object.values(s.subcategories))e.homeTeamFilter.requiresPlaysFiltering&&z.homeTeam.resetTotals(),e.visitingTeamFilter.requiresPlaysFiltering&&z.visitingTeam.resetTotals(),z.addLeaguePlays(e.currentSeasonPlays,e.indexesLP,e.totalSeasonFinishedGames),z.addTeamPlays(z.homeTeamType,e.gameForAnalysis.home_team,o.homeTeamFilteredPlays,e.indexesTSP,e.showPostMatch?1:o.totalFilteredHomeGames),z.addTeamPlays(z.visitingTeamType,e.gameForAnalysis.visiting_team,o.visitingTeamFilteredPlays,e.indexesTSP,e.showPostMatch?1:o.totalFilteredVisitingGames);return e.nextGamesDataStructure},arrayFilledDataSortedByPriority(e,o){return Object.values(o.filledDataStructure).sort((s,z)=>s.priority-z.priority)},statisticData(e,o){for(const s of Object.values(o.filledDataStructure))if(s.parentInfo.parentAnalysis.includes(e.selectedAnalysis.id)&&s.parentInfo.analysisTypeBlocks.includes(e.selectedStatisticTypeBlock))return s.subcategories;return{}},accomplished(e){return e.homeTeamFilter.statistics===0}},mutations:{updateGameForAnalysisByProps(e,o){for(const[s,z]of Object.entries(o))e.gameForAnalysis[s]=z},setCurrentTournamentName(e,o){e.currentTournamentName=o},setBetSubcategoriesObjects(e,o){e.betSubcategoriesObjects=o},setRegularSeasonName(e,o){e.regularSeasonName=o},setBetSubcategories(e,o){e.betSubcategories=o},setBetDescription(e,o){e.betDescription=o},setSeasonId(e,o){e.seasonId=Number(o)},setHome(e,o){e.homeTeamInfo=o},setAway(e,o){e.awayTeamInfo=o},setMenuOptionActive(e,o){e.menuOptionActive=o},setPastSeasonId(e,o){e.pastSeasonId=o},setUsePastSeasonId(e,o){e.usePastSeasonId=o,o&&(e.oldSeasonId=e.pastSeasonId)},updateShowPostMatchData(e,o){e.showPostMatch=o},setHomeResultGame(e,o){e.homeResultGame=o},setAwayResultGame(e,o){e.awayResultGame=o},updateIsSocketConnected(e,o){e.isSocketConnected=o,o&&e.gameForAnalysis.is_live&&e.gameForAnalysis.game_status===4&&XE(`game.${e.gameForAnalysis.game_id}.v2`)},updateCurrentSeasonTeams(e,o){e.currentSeasonTeams=o,e.currentSeasonTeams.forEach(s=>{s.playedGames=e.currentSeasonGames.reduce((z,W)=>{if(W.game_status===1&&(W.home_team===s.team_id||W.visiting_team===s.team_id)){const v=W.score[0]-W.score[1],g=W.home_team===s.team_id;z.push({playingAs:g?1:2,matchResult:v===0?3:g?v>0?1:2:v<0?1:2})}return z},[])})},updateCurrentSeasonGames(e,o){e.currentSeasonGames=o},updateGameId(e,o){e.gameId=o},updateGameForAnalysis(e,o){e.gameForAnalysis=o,e.isLive=!!o.is_live,e.homeTeamFilter.teamId=e.gameForAnalysis.home_team,e.visitingTeamFilter.teamId=e.gameForAnalysis.visiting_team},updateSelectedAnalysis(e,o){e.selectedAnalysis=o},updateShowLiveData(e,o){e.showLiveData=o},toggleAdvanceFilter(e){e.showAdvanceFilter=!e.showAdvanceFilter},updateIdAssetSelected(e,o){e.idAssetSelected=o},updateStats(e,o){e.currentSeasonPlays=o},updateFilterAux(e){e.filterAux||(e.filterAux={homeTeamFilter:{...e.homeTeamFilter},visitingTeamFilter:{...e.visitingTeamFilter}})},updateFilters(e,{filters:o,needsFormat:s=!1}){if(s){if(!o||!o.local||!o.local.statistics||!o.visit||!o.visit.statistics)return;e.homeTeamFilter=$E(e.homeTeamFilter,o.local,e.gameForAnalysis.home_team),e.visitingTeamFilter=$E(e.visitingTeamFilter,o.visit,e.gameForAnalysis.visiting_team),e.selectedStatisticTypeBlock!==o.local.statistics.block&&(e.selectedStatisticTypeBlock=o.local.statistics.block)}else e.homeTeamFilter={...o.homeTeamFilter,statistics:0},e.visitingTeamFilter={...o.visitingTeamFilter,statistics:0}},updateFinishedGames(e,o){e.totalSeasonFinishedGames=o},updateHomeTeamPlays(e,o){e.homeTeamPlays=o},updateVisitingTeamPlays(e,o){e.visitingTeamPlays=o},addSpecialMentions(e,o){const s=Object.values(e.nextGamesDataStructure);s.forEach(z=>{for(const W of Object.values(z.subcategories))W.resetMentions()}),s.forEach(z=>{for(const W of o)for(const v of Object.values(z.subcategories))v.addSpecialMention(W[0],W[1],W[2])})},setDefaultFilter(e,o){e.defaultFilter={homeTeamFilter:{...o.homeTeamFilter,teamId:e.gameForAnalysis.home_team},visitingTeamFilter:{...o.awayTeamFilter,teamId:e.gameForAnalysis.visiting_team}}},addLiveGamePlay(e,o){if(!e.livePlays.has(o[e.indexesTLP.playId])){e.livePlays.set(o[e.indexesTLP.playId],o);const z=R4(o,e.indexesTLP,e.categoriesMap);for(const W of Object.values(e.nextGamesDataStructure))for(const v of Object.values(W.subcategories))v.addLivePlay(e.gameForAnalysis.home_team===z[e.indexesTSP.teamId]?"homeTeam":"visitingTeam",z[e.indexesTSP.teamId],z,e.indexesTSP,e.isLive,!1)}},updateLiveGamePlay(e,o){const s=!!o[e.indexesTLP.length],z=e.livePlays.get(o[e.indexesTLP.playId]);if(hte(z,o))return;let W="";const v=e.gameForAnalysis.home_team===o[e.indexesTLP.teamId]?"homeTeam":"visitingTeam";z&&(W=e.gameForAnalysis.home_team===z[e.indexesTLP.teamId]?"homeTeam":"visitingTeam");const g=R4(z,e.indexesTLP,e.categoriesMap),r=LT(z,g,e.indexesTLP),b=R4(o,e.indexesTLP,e.categoriesMap),d=LT(o,b,e.indexesTLP);for(const a of Object.values(e.nextGamesDataStructure))for(const _ of Object.values(a.subcategories))z&&(_.subtractLivePlay(W,g[e.indexesTSP.teamId],g,e.indexesTSP,s),r&&_.subtractLivePlay(W,r[e.indexesTSP.teamId],r,e.indexesTSP,s)),_.addLivePlay(v,b[e.indexesTSP.teamId],b,e.indexesTSP,e.isLive,s),d&&_.addLivePlay(v,d[e.indexesTSP.teamId],d,e.indexesTSP,e.isLive,s);e.livePlays.set(o[e.indexesTLP.playId],o)},deleteLiveGamePlay(e,o){const s=!!o[e.indexesTLP.length],z=e.livePlays.get(o[e.indexesTLP.playId]);let W="";if(z){W=e.gameForAnalysis.home_team===z[e.indexesTLP.teamId]?"homeTeam":"visitingTeam",e.livePlays.delete(z[e.indexesTLP.playId]);const v=R4(z,e.indexesTLP,e.categoriesMap),g=LT(o,v,e.indexesTLP);for(const r of Object.values(e.nextGamesDataStructure))for(const b of Object.values(r.subcategories))b.subtractLivePlay(W,v[e.indexesTSP.teamId],v,e.indexesTSP,s),g&&b.subtractLivePlay(W,g[e.indexesTSP.teamId],g,e.indexesTSP,s)}},clearLiveTotals(e){for(const o of Object.values(e.nextGamesDataStructure))for(const s of Object.values(o.subcategories))s.homeTeam.resetTotalsLive(),s.visitingTeam.resetTotalsLive()},updateSeasonStatistics(e,o){e.statistics=o},updateOldSeasonId(e,o){e.oldSeasonId=o},addRankingInSubcategories(e,{getters:o,isPremiumAccount:s}){if(!(e.homeTeamFilter.teamId&&e.visitingTeamFilter.teamId))return;e.isRankingCalculating=!1,e.currentSeasonTeams.forEach(v=>{v.homeTeamFilterGames=v.playedGames.filter(g=>e.homeTeamFilter.playingAs.includes(g.playingAs)&&e.homeTeamFilter.matchResult.includes(g.matchResult)).length,v.visitingTeamFilterGames=v.playedGames.filter(g=>e.visitingTeamFilter.playingAs.includes(g.playingAs)&&e.visitingTeamFilter.matchResult.includes(g.matchResult)).length});const z=[],W=new Map;for(const v of Object.values(e.nextGamesDataStructure))for(const g of Object.values(v.subcategories))z.push(g);o.rankingData.forEach(v=>{for(const g of z)if(g.isInGeneralCategory(v[e.indexesLS.categoryId])){W.has(g.id)?W.get(g.id).push(v):W.set(g.id,[v]);break}})},prepareCleanAllStatistics(e){e.homeTeamFilter.requiresPlaysFiltering=!0,e.visitingTeamFilter.requiresPlaysFiltering=!0},setHomeGames(e,o){e.homeGames=CH(o)},setVisitingGames(e,o){e.visitingGames=CH(o)},generateCategoriesMap(e){for(const o of Object.values(e.nextGamesDataStructure))for(const s of Object.values(o.subcategories))s.accomplishedCategoryIds.forEach(z=>{const W=e.categoriesMap.get(z);W?W.push(s.generalCategoriesIds.accomplished):e.categoriesMap.set(z,[s.generalCategoriesIds.accomplished])})},resetNextGamesDataStructure(e){for(const o of Object.values(e.nextGamesDataStructure))for(const s of Object.values(o.subcategories))s.resetData()}},actions:{turnOnOffDefaultFilters({state:e,commit:o},{command:s}){s==="on"?o("updateFilters",{filters:e.defaultFilter,needsFormat:!1}):o("updateFilters",{filters:e.filterAux,needsFormat:!1})},async setAndGetStatsPostMatch({commit:e},o){try{const g=await xFt({gameId:o.gameId});if(g){var s=[],z=[],W={season:0,total:0,visit:{total:0,draw:0,win:0,lose:0},played:0,local:{total:0,draw:0,win:0,lose:0}},v={season:0,total:0,visit:{total:0,draw:0,win:0,lose:0},played:0,local:{total:0,draw:0,win:0,lose:0}};Object.keys(g.data).length!==0&&(s=g.data.data.filter(r=>r[1]==o.homeTeam),z=g.data.data.filter(r=>r[1]==o.awayTeam),W=g.data.games,v=g.data.games),e("updateHomeTeamPlays",s),e("updateVisitingTeamPlays",z),e("setHomeGames",W),e("setVisitingGames",v)}else e("updateHomeTeamPlays",[]),e("updateVisitingTeamPlays",[])}catch(g){return Promise.reject(g)}},async fillStatisticDataPostMatch({commit:e,dispatch:o},s){e("prepareCleanAllStatistics"),e("updateHomeTeamPlays",[]),e("updateVisitingTeamPlays",[]),e("setIsSectionLoading",!0,{root:!0});try{let z=[];e("updateGameForAnalysis",s.gameInfo),z.push(o("setAndGetStatsPostMatch",{gameId:s.game,homeTeam:s.homeTeam,awayTeam:s.awayTeam})),await Promise.all(z)}catch(z){throw new Error(z)}finally{e("setIsSectionLoading",!1,{root:!0})}},async checkState({state:e,dispatch:o,commit:s},{gameId:z,isTeamsAnalysis:W,currentSeasonId:v,isLoginChanged:g=!1,defaultFilter:r=null,gameInfo:b=null,isCupGame:d=!1}){try{let a={},_=e.seasonId!==Number(v);const y=[];s("setIsSectionLoading",!0,{root:!0}),s("setUsePastSeasonId",!1),_&&s("setSeasonId",v),s("updateGameId",Number(z)),e.oldSeasonId!==e.seasonId&&s("resetNextGamesDataStructure");const x=await o("getCurrentSeasonGames",Number(z));if(s("leagueGeneral/updateCurrentSeasonGames",x,{root:!0}),a=x.find(u=>u.game_id===Number(z)),!a&&b&&(a=b),a&&s("updateGameForAnalysis",a),a.game_status!==1&&((g||e.categoriesMap.size===0)&&s("generateCategoriesMap"),d||await o("checkTeamsData",{gameId:z,isFromBet:!!r}),(g||e.oldSeasonId!==e.seasonId||e.statistics.length===0)&&y.push(o("getSeasonStatistics"))),e.usePastSeasonId){const u=await o("getCurrentSeasonGamesLast");s("leagueGeneral/updateCurrentSeasonGames",u,{root:!0})}(g||e.currentSeasonTeams.length===0||!e.currentSeasonTeams.find(u=>a.home_team===u.team_id))&&y.push(o("getCurrentSeasonTeams")),s("setHomeResultGame",a.score[0]),s("setAwayResultGame",a.score[1]),W?a.game_status!==1?(await o("fillStatisticData",{gameId:z,gameinfo:a,promises:y,defaultFilter:r}),s("updateShowPostMatchData",!1)):(s("updateStats",[]),s("updateShowPostMatchData",!0),y.push(o("fillStatisticDataPostMatch",{game:z,homeTeam:a.home_team,awayTeam:a.visiting_team,gameInfo:a})),await Promise.all(y)):s("setIsSectionLoading",!1,{root:!0})}catch(a){return Promise.reject(a)}},async fillStatisticData({commit:e,dispatch:o,getters:s,rootGetters:z,state:W},{gameId:v,gameinfo:g,promises:r=[],defaultFilter:b=null}){let d=null;try{e("setIsSectionLoading",!0,{root:!0}),e("prepareCleanAllStatistics"),e("updateHomeTeamPlays",[]),e("updateVisitingTeamPlays",[]),e("updateGameForAnalysis",g),(g.is_live||g.game_status===0)&&r.push(o("getCurrentLiveGamePlays",v)),r.push(o("getSpecialMentionsByGame",v)),r.push(o("getHomeTeamPlays")),r.push(o("getVisitingTeamPlays")),r.push(o("getCurrentSeasonPlays")),b&&r.push(wFt(b)),d=await Promise.all(r)}catch(a){throw new Error(a)}finally{setTimeout(()=>{if(e("addRankingInSubcategories",{getters:s,isPremiumAccount:z["loginGeneral/getPremiumAccount"]}),b){const[a]=d.pop();a&&(e("setBetSubcategories",a.categories),e("setBetDescription",a.sectionDescription),e("setDefaultFilter",a.params),e("updateFilterAux"),e("updateFilters",{filters:W.defaultFilter,needsFormat:!1}),o("updateRankingInSubcategories"))}},100),e("setIsSectionLoading",!1,{root:!0})}},async checkTeamsData({state:e,dispatch:o,rootState:s,commit:z},{gameId:W,isFromBet:v}){try{const g=Number(W);if(e.pastSeasonId){z("setPastSeasonId",e.pastSeasonId,{root:!0});const r=s.leagueGeneral.currentSeasonGames.find(b=>b.game_id===g);r&&z("updateGameForAnalysis",r),await Promise.all([o("getHomeTeamPlays"),o("getVisitingTeamPlays")]),z("setUsePastSeasonId",v||(!e.homeTeamPlays||e.homeTeamPlays.length===0)&&(!e.visitingTeamPlays||e.visitingTeamPlays.length===0))}else z("setUsePastSeasonId",!1)}catch(g){throw new Error(g)}},async getSpecialMentionsByGame({commit:e},o){try{const s=await gFt({gameId:o});e("addSpecialMentions",s)}catch(s){return Promise.reject(s)}},async getCurrentSeasonGames({commit:e,state:o},s){try{const{teams:z,games:W,past_season_id:v,tournament_id:g}=await fFt({seasonId:o.usePastSeasonId?o.pastSeasonId:o.seasonId,gameId:s}),r=LFt.find(b=>b.id===g);return r&&e("setCurrentTournamentName",r.name),e("setHome",z[0]),e("setAway",z[1]),o.usePastSeasonId||e("setPastSeasonId",v),await e("updateCurrentSeasonGames",W),W&&Array.isArray(W)&&e("updateFinishedGames",W.reduce((b,d)=>(d.game_status===1&&(b+=1),b),0)),W}catch(z){return Promise.reject(z)}},async getCurrentSeasonGamesLast({commit:e,state:o}){try{const{games:s,past_season_id:z}=await kH({seasonId:o.usePastSeasonId?o.pastSeasonId:o.seasonId});return o.usePastSeasonId||e("setPastSeasonId",z),await e("updateCurrentSeasonGames",s),s&&Array.isArray(s)&&e("updateFinishedGames",s.reduce((W,v)=>(v.game_status===1&&(W+=1),W),0)),s}catch(s){return Promise.reject(s)}},async getCurrentSeasonTeams({commit:e,state:o}){try{const s=await bFt({seasonId:o.usePastSeasonId?o.pastSeasonId:o.seasonId});e("updateCurrentSeasonTeams",s.data.teams)}catch{}},async getSeasonStatistics({commit:e,state:o}){try{const s=o.usePastSeasonId?o.pastSeasonId:o.seasonId,z=await hFt({seasonId:s});e("updateSeasonStatistics",z),e("updateOldSeasonId",s)}catch(s){return Promise.reject(s)}},updateRankingInSubcategories({state:e,commit:o,getters:s,rootGetters:z}){e.currentSeasonGames.length>0&&o("addRankingInSubcategories",{getters:s,isPremiumAccount:z["loginGeneral/getPremiumAccount"]})},async getHomeTeamPlays({commit:e,state:o}){try{const s=await TH({seasonId:o.usePastSeasonId?o.pastSeasonId:o.seasonId,teamId:o.gameForAnalysis.home_team});s.data&&(e("updateHomeTeamPlays",s.data.data),e("setHomeGames",s.data.games))}catch(s){return Promise.reject(s)}},async getVisitingTeamPlays({commit:e,state:o}){try{const s=await TH({seasonId:o.usePastSeasonId?o.pastSeasonId:o.seasonId,teamId:o.gameForAnalysis.visiting_team});s.data&&(e("updateVisitingTeamPlays",s.data.data),e("setVisitingGames",s.data.games))}catch(s){return Promise.reject(s)}},async getCurrentSeasonPlays({commit:e,state:o}){try{const s=await dFt({seasonId:o.usePastSeasonId?o.pastSeasonId:o.seasonId});e("updateStats",s)}catch(s){return Promise.reject(new Error(s))}},async getCurrentLiveGamePlays({state:e,commit:o},s){try{const z=await mFt({gameId:s});e.livePlays=new Map,z.forEach(W=>{e.gameForAnalysis.game_id===W[e.indexesTLP.gameId]&&(e.gameForAnalysis.home_team===W[e.indexesTLP.teamId]||e.gameForAnalysis.visiting_team===W[e.indexesTLP.teamId])&&o("addLiveGamePlay",W)})}catch(z){throw new Error(z)}},socket_new({state:e,commit:o},s){const z=s[1];(e.gameForAnalysis.home_team===z[e.indexesTLP.teamId]||e.gameForAnalysis.visiting_team===z[e.indexesTLP.teamId])&&o("addLiveGamePlay",z)},socket_update({state:e,commit:o},s){const z=s[1];e.gameForAnalysis.game_id===z[e.indexesTLP.gameId]&&(e.gameForAnalysis.home_team===z[e.indexesTLP.teamId]||e.gameForAnalysis.visitingTeam===z[e.indexesTLP.teamId])&&o("updateLiveGamePlay",z)},socket_delete({state:e,commit:o},s){const z=s[1];e.gameForAnalysis.game_id===z[e.indexesTLP.gameId]&&(e.gameForAnalysis.home_team===z[e.indexesTLP.teamId]||e.gameForAnalysis.visiting_team===z[e.indexesTLP.teamId])&&o("deleteLiveGamePlay",z)},exitChannel({state:e,getters:o,rootState:s,rootGetters:z,commit:W}){const v=z["loginGeneral/getPremiumAccount"];o.isLive&&v&&(W("updateShowLiveData",!0),W("clearLiveTotals"),e.livePlays.clear(),IFt.emit("unsubscribe",{channel:`game.${e.gameForAnalysis.game_id}.v2`}))},cleanStats({state:e}){for(const s of Object.values(e.nextGamesDataStructure))for(const z of Object.values(s.subcategories))z.homeTeam.resetTotals(),z.visitingTeam.resetTotals(),z.homeTeam.resetTotalsLive(),z.visitingTeam.resetTotalsLive(),z.isBetMainSubcategory=!1;Object.values(e.nextGamesDataStructure).forEach(s=>{for(const z of Object.values(s.subcategories))z.resetMentions()}),e.currentSeasonPlays=null,e.homeTeamPlays=[],e.visitingTeamPlays=[],e.homeTeamFilter.requiresPlaysFiltering=!0,e.visitingTeamFilter.requiresPlaysFiltering=!0,e.isRankingCalculating=!0},cleanAllStats({state:e}){for(const s of Object.values(e.nextGamesDataStructure))for(const z of Object.values(s.subcategories))z.homeTeam.resetTotals(),z.visitingTeam.resetTotals(),z.isBetMainSubcategory=!1;Object.values(e.nextGamesDataStructure).forEach(s=>{for(const z of Object.values(s.subcategories))z.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 OFt(){try{const{data:e}=await Ah({url:"https://kefloixzy1.execute-api.us-west-2.amazonaws.com/prod/tournaments"});return e}catch(e){throw new Error(e)}}const zFt={gameGlobal:{namespaced:!0,state:{videoSrc:null,isVideoModalVisible:!1,tournaments:[],seccionBetsGolTipster:1,tournamentSelected:{},tournamentType:0,sectionAnalytics:"Banner_Home",previewSectionAnalytics:"",sectionRef:"",booleanIsStatisticModalOpen:!1},getters:{getTournamentType:e=>e.tournamentType,getSectionAnalytics(e){return e.sectionAnalytics},getPreviewSectionAnalytics(e){return e.previewSectionAnalytics},getSeccionBetsGolTipster(e){return e.seccionBetsGolTipster}},mutations:{setBooleanIsStatisticModalOpen(e,o){e.booleanIsStatisticModalOpen=o},setTournamentType(e,o){e.tournamentType=o},setSectionRef(e,o){e.sectionRef=o},setSectionAnalytics(e,o){e.sectionAnalytics=o},setSeccionBetsGolTipster(e,o){e.seccionBetsGolTipster=o},setPreviewSectionAnalytics(e,o){e.previewSectionAnalytics=o},setVideoSrc(e,o){e.videoSrc=o},setVideoModalVisibility(e,o){e.isVideoModalVisible=o},setSelectedTournament(e,o){e.selectedTournament=o},setTournaments(e,o){e.tournaments=o.map(s=>({...s.tournament,seasons:s.seasons})),e.tournamentSelected=e.tournaments[0]},setTournamentSelected(e,o){e.tournamentSelected=o}},actions:{async fetchTournaments({state:e,commit:o}){try{if(e.tournaments.length===0){const s=await OFt();o("setTournaments",s)}}catch(s){throw new Error(s)}}}}};async function NFt({seasonId:e,localTeamId:o,visitingTeamId:s}){try{const z=`https://bzznnzehtf.execute-api.us-west-2.amazonaws.com/prod/xg/seasons/${e}/teams/${o}/${s}`;return(await Ah({url:z})).data}catch(z){return Promise.reject(z)}}async function DFt({seasonId:e,localTeamId:o,visitingTeamId:s}){try{const z=`https://bzznnzehtf.execute-api.us-west-2.amazonaws.com/prod/xg/game/${e}/teams/${o}/${s}`;return(await Ah({url:z})).data}catch(z){return Promise.reject(z)}}const EH=(e,o)=>{let s={};return e.forEach((z,W)=>{W==3&&(o[0]==35||o[0]==54)&&(o[W]==2?o[W]=1:o[W]=2),W==2&&(o[0]==35||o[0]==54)&&(o[W]==1?o[W]=2:o[W]==2&&(o[W]=1)),s[z]=o[W]}),s},AH=(e,o)=>e.filter(z=>{const W=o.playingAs.includes(z.playing_as),v=o.matchResult.includes(z.match_result),g=o.sections.includes(z.section);return W&&v&&g});(function(){function e(o,s,z){return typeof z>"u"||+z==0?Math[o](s):(s=+s,z=+z,isNaN(s)||!(typeof z=="number"&&z%1===0)?NaN:(s=s.toString().split("e"),s=Math[o](+(s[0]+"e"+(s[1]?+s[1]-z:-z))),s=s.toString().split("e"),+(s[0]+"e"+(s[1]?+s[1]+z:z))))}Math.ceil10||(Math.ceil10=function(o,s){return e("ceil",o,s)})})();function MH(e,o){let s=o*-1;return Math.ceil10(e,s)}const FFt={...zFt,..._Ft,...BFt,...{xgGeneral:{namespaced:!0,state:{teamSelected:"Local",xGLocalPlays:[],xGVisitingPlays:[]},getters:{playsLocal:(e,o,s)=>{const z=e.xGLocalPlays,W="homeTeamFilter",v=s.nextGeneral[W];return AH(z,v)||[]},playsAway:(e,o,s)=>{const z=e.xGVisitingPlays,W="visitingTeamFilter",v=s.nextGeneral[W];return AH(z,v)},goalsQtyLocal:(e,o)=>{const s=N0.find(z=>z.name==="Goles");return o.playsLocal.filter(z=>s.categories.includes(z.category_id)).length},goalsQtyAway:(e,o)=>{const s=N0.find(z=>z.name==="Goles");return o.playsAway.filter(z=>s.categories.includes(z.category_id)).length},shotsOnGoalQtyLocal:(e,o)=>o.playsLocal.filter(s=>s.category_id===510).length,shotsOnGoalQtyAway:(e,o)=>o.playsAway.filter(s=>s.category_id===510).length,headQtyLocal:(e,o)=>{const s=N0.find(z=>z.name==="Remates con cabeza");return o.playsLocal.filter(z=>s.categories.includes(z.category_id)).length},headQtyAway:(e,o)=>{const s=N0.find(z=>z.name==="Remates con cabeza");return o.playsAway.filter(z=>s.categories.includes(z.category_id)).length},penaltiesQtyLocal:(e,o)=>{const s=N0.find(z=>z.name==="Penales");return o.playsLocal.filter(z=>s.categories.includes(z.category_id)).length},penaltiesQtyAway:(e,o)=>{const s=N0.find(z=>z.name==="Penales");return o.playsAway.filter(z=>s.categories.includes(z.category_id)).length},xGLocal:(e,o)=>{const s=new Set;let z=o.playsLocal.reduce((W,v)=>(s.has(v.moment_of_play)||(s.add(v.moment_of_play),W+=v.xG2),W),0);return MH(z,2)},xGAway:(e,o)=>{const s=new Set;let z=o.playsAway.reduce((W,v)=>(s.has(v.moment_of_play)||(s.add(v.moment_of_play),W+=v.xG2),W),0);return MH(z,2)}},mutations:{setTeamSelected(e,o){e.teamSelected=o},setPlays(e,o){const s=o.local_team.map(u=>EH(o.data_headers,u)),z=[],W=[],v=[],g=[],r=new Set;s.forEach(u=>{KA.has(u.category_id)?r.has(u.moment_of_play)||(r.add(u.moment_of_play),z.push(u)):QA.has(u.category_id)?W.push(u):eM.has(u.category_id)?v.push(u):tM.has(u.category_id)&&g.push(u)}),e.xGLocalPlays=[...W,...z,...v,...g];const b=o.visiting_team.map(u=>EH(o.data_headers,u)),d=new Set,a=[],_=[],y=[],x=[];b.forEach(u=>{KA.has(u.category_id)?d.has(u.moment_of_play)||(d.add(u.moment_of_play),a.push(u)):QA.has(u.category_id)?_.push(u):eM.has(u.category_id)?y.push(u):tM.has(u.category_id)&&x.push(u)}),e.xGVisitingPlays=[..._,...a,...y,...x]},cleanXgStore(e){e.localStorage="Local",e.xGLocalPlays=[],e.xGVisitingPlays=[]}},actions:{async getXgPlays({commit:e},{seasonId:o,localTeamId:s,visitingTeamId:z,postMatch:W=!1}){try{let v={};W?v=await DFt({seasonId:o,localTeamId:s,visitingTeamId:z}):v=await NFt({seasonId:o,localTeamId:s,visitingTeamId:z}),e("setPlays",v)}catch(v){return Promise.reject(v)}}}}}};function RFt(e){for(const[o,s]of Object.entries(FFt))e.hasModule(o)||e.registerModule(o,s)}const VFt={class:"subcategory-group"},jFt={__name:"SubcategoryGroup",props:{subcategoryGroup:{type:Array,default:()=>[]}},setup(e){return(o,s)=>(t.openBlock(),t.createElementBlock("div",VFt,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.subcategoryGroup,z=>(t.openBlock(),t.createBlock(t.unref(jl),{key:z.id,modelValue:z.isSelected,"onUpdate:modelValue":W=>z.isSelected=W,label:z.name},null,8,["modelValue","onUpdate:modelValue","label"]))),128))]))}},UFt=ac(jFt,[["__scopeId","data-v-ae6f3d72"]]),GFt={class:"filter-subcategories"},HFt=Object.freeze(Object.defineProperty({__proto__:null,default:ac({__name:"FilterSubcategories",props:{subcategoryGroups:{type:Array,default:()=>[]}},setup(e){return(o,s)=>(t.openBlock(),t.createElementBlock("div",GFt,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.subcategoryGroups,z=>(t.openBlock(),t.createElementBlock("div",{key:z.id,class:"filter-subcategories__group"},[t.createVNode(UFt,{subcategoryGroup:z},null,8,["subcategoryGroup"])]))),128))]))}},[["__scopeId","data-v-5edaefc2"]])},Symbol.toStringTag,{value:"Module"})),V4=e=>(t.pushScopeId("data-v-80d9c265"),e=e(),t.popScopeId(),e),ZFt={class:"details__header"},WFt=V4(()=>t.createElementVNode("div",{class:"details__header__title"},"Jugando como",-1)),XFt={class:"details__header__checkbox"},qFt={class:"details__body"},YFt={class:"details__body__playing-as"},JFt=["onClick"],$Ft={class:"details__header"},KFt=V4(()=>t.createElementVNode("div",{class:"details__header__title"},"En: (Elige el lapso de tiempo)",-1)),QFt={class:"details__header__checkbox"},eRt={class:"details__body"},tRt=V4(()=>t.createElementVNode("div",{class:"details__body__title"},"1er tiempo",-1)),aRt={class:"details__body__game-section"},rRt=["onClick"],nRt={class:"details__body"},iRt=V4(()=>t.createElementVNode("div",{class:"details__body__title"},"2do tiempo",-1)),oRt={class:"details__body__game-section"},sRt=["onClick"],lRt=Object.freeze(Object.defineProperty({__proto__:null,default:ac({__name:"FilterConditions",props:{playingAs:{type:Array,default:()=>[{name:"Local",isSelected:!0},{name:"Visitante",isSelected:!0}]},gameSections:{type:Array,default:()=>[{text:"0-15",value:1,isSelected:!0},{text:"16-30",value:2,isSelected:!0},{text:"31-45",value:3,isSelected:!0},{text:"46-60",value:4,isSelected:!0},{text:"61-75",value:5,isSelected:!0},{text:"76-90",value:6,isSelected:!0}]},buttonsBackgroundColor:{type:String,default:"rgba(255, 255, 255, 0)"},buttonsBackgroundColorActive:{type:String,default:"rgba(203, 238, 107, 0.05)"},buttonsTextColor:{type:String,default:"rgba(255, 255, 255, 0.8)"},buttonsTextColorActive:{type:String,default:"rgba(255, 255, 255, 1)"},buttonsBorderColor:{type:String,default:"#8ea2ab"},buttonsBorderColorActive:{type:String,default:"#cbee6b"},buttonsBorderWidth:{type:String,default:"0.8px"},buttonsBorderWidthActive:{type:String,default:"1px"},buttonsBorderRadius:{type:String,default:"4px"}},setup(e){const o=e;t.useCssVars(a=>({"49cba245":e.buttonsBackgroundColor,"52f02da6":e.buttonsTextColor,"7d3f686a":e.buttonsBorderWidth,"7c286a07":e.buttonsBorderColor,"24a6f4aa":e.buttonsBackgroundColorActive,cd8d7768:e.buttonsTextColorActive,"35fa5c10":e.buttonsBorderWidthActive,"0cde1826":e.buttonsBorderColorActive}));const s=t.computed(()=>o.playingAs.every(a=>a.isSelected)),z=t.computed(()=>o.gameSections.every(a=>a.isSelected)),W=t.computed(()=>o.gameSections.reduce((a,_)=>(_.value<=3?a.firstHalf.push(_):a.secondHalf.push(_),a),{firstHalf:[],secondHalf:[]})),v=t.computed(()=>({"--border-radius-first-button":`${o.buttonsBorderRadius} 0 0 ${o.buttonsBorderRadius}`,"--border-radius-last-button":`0 ${o.buttonsBorderRadius} ${o.buttonsBorderRadius} 0`}));function g(a){a?o.playingAs.forEach(_=>{_.isSelected=!0}):o.playingAs.forEach((_,y)=>{_.isSelected=y===0})}function r(a){o.playingAs.filter(_=>_.isSelected).length===1&&a.isSelected||(a.isSelected=!a.isSelected)}function b(a){o.gameSections.filter(_=>_.isSelected).length===1&&a.isSelected||(a.isSelected=!a.isSelected)}function d(a){a?o.gameSections.forEach(_=>{_.isSelected=!0}):o.gameSections.forEach((_,y)=>{_.isSelected=y===0})}return(a,_)=>(t.openBlock(),t.createElementBlock("div",{class:"details",style:t.normalizeStyle(v.value)},[t.createElementVNode("div",ZFt,[WFt,t.createElementVNode("div",XFt,[t.createVNode(t.unref(jl),{label:"Todos","model-value":s.value,"onUpdate:modelValue":g},null,8,["model-value"])])]),t.createElementVNode("div",qFt,[t.createElementVNode("div",YFt,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.playingAs,(y,x)=>(t.openBlock(),t.createElementBlock("div",{key:`pa${x}`,class:t.normalizeClass(["details__body__button",{active:y.isSelected}]),onClick:u=>r(y)},t.toDisplayString(y.name),11,JFt))),128))])]),t.createElementVNode("div",$Ft,[KFt,t.createElementVNode("div",QFt,[t.createVNode(t.unref(jl),{label:"Todos","model-value":z.value,"onUpdate:modelValue":d},null,8,["model-value"])])]),t.createElementVNode("div",eRt,[tRt,t.createElementVNode("div",aRt,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(W.value.firstHalf,(y,x)=>(t.openBlock(),t.createElementBlock("div",{key:`pa${x}`,class:t.normalizeClass(["details__body__button",{active:y.isSelected}]),onClick:u=>b(y)},t.toDisplayString(y.text),11,rRt))),128))])]),t.createElementVNode("div",nRt,[iRt,t.createElementVNode("div",oRt,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(W.value.secondHalf,(y,x)=>(t.openBlock(),t.createElementBlock("div",{key:`pa${x}`,class:t.normalizeClass(["details__body__button",{active:y.isSelected}]),onClick:u=>b(y)},t.toDisplayString(y.text),11,sRt))),128))])])],4))}},[["__scopeId","data-v-80d9c265"]])},Symbol.toStringTag,{value:"Module"})),cRt={class:"filter-field"},uRt=Object.freeze(Object.defineProperty({__proto__:null,default:ac({__name:"FilterField",setup(e){const o=t.ref(Array.from({length:16},(z,W)=>W+1));function s(){}return(z,W)=>(t.openBlock(),t.createElementBlock("div",cRt,[t.createVNode(t.unref(iD),{width:"100%","background-color":"#2E3B46",value:o.value,"onUpdate:modelValue":s},null,8,["value"])]))}},[["__scopeId","data-v-8103c3e1"]])},Symbol.toStringTag,{value:"Module"})),dRt={class:"subcategory-group"},hRt={__name:"SubcategoryGroup",props:{subcategoryGroup:{type:Array,default:()=>[]}},setup(e){return(o,s)=>(t.openBlock(),t.createElementBlock("div",dRt,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.subcategoryGroup,z=>(t.openBlock(),t.createBlock(t.unref(Ul),{key:z.id,modelValue:z.isSelected,"onUpdate:modelValue":W=>z.isSelected=W,label:z.name},null,8,["modelValue","onUpdate:modelValue","label"]))),128))]))}},pRt=rc(hRt,[["__scopeId","data-v-ae6f3d72"]]),fRt={class:"filter-subcategories"},mRt=Object.freeze(Object.defineProperty({__proto__:null,default:rc({__name:"FilterSubcategories",props:{subcategoryGroups:{type:Array,default:()=>[]}},setup(e){return(o,s)=>(t.openBlock(),t.createElementBlock("div",fRt,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.subcategoryGroups,z=>(t.openBlock(),t.createElementBlock("div",{key:z.id,class:"filter-subcategories__group"},[t.createVNode(pRt,{subcategoryGroup:z},null,8,["subcategoryGroup"])]))),128))]))}},[["__scopeId","data-v-5edaefc2"]])},Symbol.toStringTag,{value:"Module"})),j4=e=>(t.pushScopeId("data-v-80d9c265"),e=e(),t.popScopeId(),e),gRt={class:"details__header"},yRt=j4(()=>t.createElementVNode("div",{class:"details__header__title"},"Jugando como",-1)),vRt={class:"details__header__checkbox"},bRt={class:"details__body"},xRt={class:"details__body__playing-as"},_Rt=["onClick"],wRt={class:"details__header"},kRt=j4(()=>t.createElementVNode("div",{class:"details__header__title"},"En: (Elige el lapso de tiempo)",-1)),SRt={class:"details__header__checkbox"},TRt={class:"details__body"},CRt=j4(()=>t.createElementVNode("div",{class:"details__body__title"},"1er tiempo",-1)),ERt={class:"details__body__game-section"},ARt=["onClick"],MRt={class:"details__body"},PRt=j4(()=>t.createElementVNode("div",{class:"details__body__title"},"2do tiempo",-1)),IRt={class:"details__body__game-section"},LRt=["onClick"],BRt=Object.freeze(Object.defineProperty({__proto__:null,default:rc({__name:"FilterConditions",props:{playingAs:{type:Array,default:()=>[{name:"Local",isSelected:!0},{name:"Visitante",isSelected:!0}]},gameSections:{type:Array,default:()=>[{text:"0-15",value:1,isSelected:!0},{text:"16-30",value:2,isSelected:!0},{text:"31-45",value:3,isSelected:!0},{text:"46-60",value:4,isSelected:!0},{text:"61-75",value:5,isSelected:!0},{text:"76-90",value:6,isSelected:!0}]},buttonsBackgroundColor:{type:String,default:"rgba(255, 255, 255, 0)"},buttonsBackgroundColorActive:{type:String,default:"rgba(203, 238, 107, 0.05)"},buttonsTextColor:{type:String,default:"rgba(255, 255, 255, 0.8)"},buttonsTextColorActive:{type:String,default:"rgba(255, 255, 255, 1)"},buttonsBorderColor:{type:String,default:"#8ea2ab"},buttonsBorderColorActive:{type:String,default:"#cbee6b"},buttonsBorderWidth:{type:String,default:"0.8px"},buttonsBorderWidthActive:{type:String,default:"1px"},buttonsBorderRadius:{type:String,default:"4px"}},setup(e){const o=e;t.useCssVars(a=>({"49cba245":e.buttonsBackgroundColor,"52f02da6":e.buttonsTextColor,"7d3f686a":e.buttonsBorderWidth,"7c286a07":e.buttonsBorderColor,"24a6f4aa":e.buttonsBackgroundColorActive,cd8d7768:e.buttonsTextColorActive,"35fa5c10":e.buttonsBorderWidthActive,"0cde1826":e.buttonsBorderColorActive}));const s=t.computed(()=>o.playingAs.every(a=>a.isSelected)),z=t.computed(()=>o.gameSections.every(a=>a.isSelected)),W=t.computed(()=>o.gameSections.reduce((a,_)=>(_.value<=3?a.firstHalf.push(_):a.secondHalf.push(_),a),{firstHalf:[],secondHalf:[]})),v=t.computed(()=>({"--border-radius-first-button":`${o.buttonsBorderRadius} 0 0 ${o.buttonsBorderRadius}`,"--border-radius-last-button":`0 ${o.buttonsBorderRadius} ${o.buttonsBorderRadius} 0`}));function g(a){a?o.playingAs.forEach(_=>{_.isSelected=!0}):o.playingAs.forEach((_,y)=>{_.isSelected=y===0})}function r(a){o.playingAs.filter(_=>_.isSelected).length===1&&a.isSelected||(a.isSelected=!a.isSelected)}function b(a){o.gameSections.filter(_=>_.isSelected).length===1&&a.isSelected||(a.isSelected=!a.isSelected)}function d(a){a?o.gameSections.forEach(_=>{_.isSelected=!0}):o.gameSections.forEach((_,y)=>{_.isSelected=y===0})}return(a,_)=>(t.openBlock(),t.createElementBlock("div",{class:"details",style:t.normalizeStyle(v.value)},[t.createElementVNode("div",gRt,[yRt,t.createElementVNode("div",vRt,[t.createVNode(t.unref(Ul),{label:"Todos","model-value":s.value,"onUpdate:modelValue":g},null,8,["model-value"])])]),t.createElementVNode("div",bRt,[t.createElementVNode("div",xRt,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.playingAs,(y,x)=>(t.openBlock(),t.createElementBlock("div",{key:`pa${x}`,class:t.normalizeClass(["details__body__button",{active:y.isSelected}]),onClick:u=>r(y)},t.toDisplayString(y.name),11,_Rt))),128))])]),t.createElementVNode("div",wRt,[kRt,t.createElementVNode("div",SRt,[t.createVNode(t.unref(Ul),{label:"Todos","model-value":z.value,"onUpdate:modelValue":d},null,8,["model-value"])])]),t.createElementVNode("div",TRt,[CRt,t.createElementVNode("div",ERt,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(W.value.firstHalf,(y,x)=>(t.openBlock(),t.createElementBlock("div",{key:`pa${x}`,class:t.normalizeClass(["details__body__button",{active:y.isSelected}]),onClick:u=>b(y)},t.toDisplayString(y.text),11,ARt))),128))])]),t.createElementVNode("div",MRt,[PRt,t.createElementVNode("div",IRt,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(W.value.secondHalf,(y,x)=>(t.openBlock(),t.createElementBlock("div",{key:`pa${x}`,class:t.normalizeClass(["details__body__button",{active:y.isSelected}]),onClick:u=>b(y)},t.toDisplayString(y.text),11,LRt))),128))])])],4))}},[["__scopeId","data-v-80d9c265"]])},Symbol.toStringTag,{value:"Module"})),ORt={class:"filter-field"},zRt=Object.freeze(Object.defineProperty({__proto__:null,default:rc({__name:"FilterField",setup(e){const o=t.ref(Array.from({length:16},(z,W)=>W+1));function s(){}return(z,W)=>(t.openBlock(),t.createElementBlock("div",ORt,[t.createVNode(t.unref(Nj),{width:"100%","background-color":"#2E3B46",value:o.value,"onUpdate:modelValue":s},null,8,["value"])]))}},[["__scopeId","data-v-8103c3e1"]])},Symbol.toStringTag,{value:"Module"}));Od.GSCGameData=uFt,Od.connectSocket=Kw,Od.disconnectSocket=Qw,Od.getSocket=$w,Od.registerStoreModules=RFt,Object.defineProperty(Od,Symbol.toStringTag,{value:"Module"})});