@golstats/gsc-timeline-reports 1.0.4 → 1.0.6
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.
|
@@ -3,4 +3,4 @@
|
|
|
3
3
|
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const s=new this(t);return n.forEach(r=>s.set(r)),s}static accessor(t){const s=(this[lt]=this[lt]={accessors:{}}).accessors,r=this.prototype;function i(o){const f=le(o);s[f]||(An(r,o),s[f]=!0)}return c.isArray(t)?t.forEach(i):i(t),this}};P.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),c.reduceDescriptors(P.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(s){this[n]=s}}}),c.freezeMethods(P);function Ie(e,t){const n=this||ae,s=t||n,r=P.from(s.headers);let i=s.data;return c.forEach(e,function(f){i=f.call(n,i,r.normalize(),t?t.status:void 0)}),r.normalize(),i}function ct(e){return!!(e&&e.__CANCEL__)}function te(e,t,n){S.call(this,e??"canceled",S.ERR_CANCELED,t,n),this.name="CanceledError"}c.inherits(te,S,{__CANCEL__:!0});function ut(e,t,n){const s=n.config.validateStatus;!n.status||!s||s(n.status)?e(n):t(new S("Request failed with status code "+n.status,[S.ERR_BAD_REQUEST,S.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function Bn(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function Cn(e,t){e=e||10;const n=new Array(e),s=new Array(e);let r=0,i=0,o;return t=t!==void 0?t:1e3,function(b){const d=Date.now(),m=s[i];o||(o=d),n[r]=b,s[r]=d;let E=i,p=0;for(;E!==r;)p+=n[E++],E=E%e;if(r=(r+1)%e,r===i&&(i=(i+1)%e),d-o<t)return;const M=m&&d-m;return M?Math.round(p*1e3/M):void 0}}function In(e,t){let n=0,s=1e3/t,r,i;const o=(d,m=Date.now())=>{n=m,r=null,i&&(clearTimeout(i),i=null),e(...d)};return[(...d)=>{const m=Date.now(),E=m-n;E>=s?o(d,m):(r=d,i||(i=setTimeout(()=>{i=null,o(r)},s-E)))},()=>r&&o(r)]}const be=(e,t,n=3)=>{let s=0;const r=Cn(50,250);return In(i=>{const o=i.loaded,f=i.lengthComputable?i.total:void 0,b=o-s,d=r(b),m=o<=f;s=o;const E={loaded:o,total:f,progress:f?o/f:void 0,bytes:b,rate:d||void 0,estimated:d&&f&&m?(f-o)/d:void 0,event:i,lengthComputable:f!=null,[t?"download":"upload"]:!0};e(E)},n)},ft=(e,t)=>{const n=e!=null;return[s=>t[0]({lengthComputable:n,total:e,loaded:s}),t[1]]},dt=e=>(...t)=>c.asap(()=>e(...t)),Pn=C.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,C.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(C.origin),C.navigator&&/(msie|trident)/i.test(C.navigator.userAgent)):()=>!0,Ln=C.hasStandardBrowserEnv?{write(e,t,n,s,r,i){const o=[e+"="+encodeURIComponent(t)];c.isNumber(n)&&o.push("expires="+new Date(n).toGMTString()),c.isString(s)&&o.push("path="+s),c.isString(r)&&o.push("domain="+r),i===!0&&o.push("secure"),document.cookie=o.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function Fn(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Dn(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function mt(e,t,n){let s=!Fn(t);return e&&(s||n==!1)?Dn(e,t):t}const pt=e=>e instanceof P?{...e}:e;function X(e,t){t=t||{};const n={};function s(d,m,E,p){return c.isPlainObject(d)&&c.isPlainObject(m)?c.merge.call({caseless:p},d,m):c.isPlainObject(m)?c.merge({},m):c.isArray(m)?m.slice():m}function r(d,m,E,p){if(c.isUndefined(m)){if(!c.isUndefined(d))return s(void 0,d,E,p)}else return s(d,m,E,p)}function i(d,m){if(!c.isUndefined(m))return s(void 0,m)}function o(d,m){if(c.isUndefined(m)){if(!c.isUndefined(d))return s(void 0,d)}else return s(void 0,m)}function f(d,m,E){if(E in t)return s(d,m);if(E in e)return s(void 0,d)}const b={url:i,method:i,data:i,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:f,headers:(d,m,E)=>r(pt(d),pt(m),E,!0)};return c.forEach(Object.keys({...e,...t}),function(m){const E=b[m]||r,p=E(e[m],t[m],m);c.isUndefined(p)&&E!==f||(n[m]=p)}),n}const ht=e=>{const t=X({},e);let{data:n,withXSRFToken:s,xsrfHeaderName:r,xsrfCookieName:i,headers:o,auth:f}=t;t.headers=o=P.from(o),t.url=rt(mt(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),f&&o.set("Authorization","Basic "+btoa((f.username||"")+":"+(f.password?unescape(encodeURIComponent(f.password)):"")));let b;if(c.isFormData(n)){if(C.hasStandardBrowserEnv||C.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if((b=o.getContentType())!==!1){const[d,...m]=b?b.split(";").map(E=>E.trim()).filter(Boolean):[];o.setContentType([d||"multipart/form-data",...m].join("; "))}}if(C.hasStandardBrowserEnv&&(s&&c.isFunction(s)&&(s=s(t)),s||s!==!1&&Pn(t.url))){const d=r&&i&&Ln.read(i);d&&o.set(r,d)}return t},Un=typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(n,s){const r=ht(e);let i=r.data;const o=P.from(r.headers).normalize();let{responseType:f,onUploadProgress:b,onDownloadProgress:d}=r,m,E,p,M,g;function R(){M&&M(),g&&g(),r.cancelToken&&r.cancelToken.unsubscribe(m),r.signal&&r.signal.removeEventListener("abort",m)}let x=new XMLHttpRequest;x.open(r.method.toUpperCase(),r.url,!0),x.timeout=r.timeout;function _(){if(!x)return;const T=P.from("getAllResponseHeaders"in x&&x.getAllResponseHeaders()),A={data:!f||f==="text"||f==="json"?x.responseText:x.response,status:x.status,statusText:x.statusText,headers:T,config:e,request:x};ut(function(V){n(V),R()},function(V){s(V),R()},A),x=null}"onloadend"in x?x.onloadend=_:x.onreadystatechange=function(){!x||x.readyState!==4||x.status===0&&!(x.responseURL&&x.responseURL.indexOf("file:")===0)||setTimeout(_)},x.onabort=function(){x&&(s(new S("Request aborted",S.ECONNABORTED,e,x)),x=null)},x.onerror=function(){s(new S("Network Error",S.ERR_NETWORK,e,x)),x=null},x.ontimeout=function(){let U=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const A=r.transitional||ot;r.timeoutErrorMessage&&(U=r.timeoutErrorMessage),s(new S(U,A.clarifyTimeoutError?S.ETIMEDOUT:S.ECONNABORTED,e,x)),x=null},i===void 0&&o.setContentType(null),"setRequestHeader"in x&&c.forEach(o.toJSON(),function(U,A){x.setRequestHeader(A,U)}),c.isUndefined(r.withCredentials)||(x.withCredentials=!!r.withCredentials),f&&f!=="json"&&(x.responseType=r.responseType),d&&([p,g]=be(d,!0),x.addEventListener("progress",p)),b&&x.upload&&([E,M]=be(b),x.upload.addEventListener("progress",E),x.upload.addEventListener("loadend",M)),(r.cancelToken||r.signal)&&(m=T=>{x&&(s(!T||T.type?new te(null,e,x):T),x.abort(),x=null)},r.cancelToken&&r.cancelToken.subscribe(m),r.signal&&(r.signal.aborted?m():r.signal.addEventListener("abort",m)));const O=Bn(r.url);if(O&&C.protocols.indexOf(O)===-1){s(new S("Unsupported protocol "+O+":",S.ERR_BAD_REQUEST,e));return}x.send(i||null)})},Hn=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let s=new AbortController,r;const i=function(d){if(!r){r=!0,f();const m=d instanceof Error?d:this.reason;s.abort(m instanceof S?m:new te(m instanceof Error?m.message:m))}};let o=t&&setTimeout(()=>{o=null,i(new S(`timeout ${t} of ms exceeded`,S.ETIMEDOUT))},t);const f=()=>{e&&(o&&clearTimeout(o),o=null,e.forEach(d=>{d.unsubscribe?d.unsubscribe(i):d.removeEventListener("abort",i)}),e=null)};e.forEach(d=>d.addEventListener("abort",i));const{signal:b}=s;return b.unsubscribe=()=>c.asap(f),b}},qn=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let s=0,r;for(;s<n;)r=s+t,yield e.slice(s,r),s=r},jn=async function*(e,t){for await(const n of Vn(e))yield*qn(n,t)},Vn=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:n,value:s}=await t.read();if(n)break;yield s}}finally{await t.cancel()}},gt=(e,t,n,s)=>{const r=jn(e,t);let i=0,o,f=b=>{o||(o=!0,s&&s(b))};return new ReadableStream({async pull(b){try{const{done:d,value:m}=await r.next();if(d){f(),b.close();return}let E=m.byteLength;if(n){let p=i+=E;n(p)}b.enqueue(new Uint8Array(m))}catch(d){throw f(d),d}},cancel(b){return f(b),r.return()}},{highWaterMark:2})},Ee=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",yt=Ee&&typeof ReadableStream=="function",zn=Ee&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),wt=(e,...t)=>{try{return!!e(...t)}catch{return!1}},Wn=yt&&wt(()=>{let e=!1;const t=new Request(C.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),bt=64*1024,Pe=yt&&wt(()=>c.isReadableStream(new Response("").body)),xe={stream:Pe&&(e=>e.body)};Ee&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!xe[t]&&(xe[t]=c.isFunction(e[t])?n=>n[t]():(n,s)=>{throw new S(`Response type '${t}' is not supported`,S.ERR_NOT_SUPPORT,s)})})})(new Response);const $n=async e=>{if(e==null)return 0;if(c.isBlob(e))return e.size;if(c.isSpecCompliantForm(e))return(await new Request(C.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(c.isArrayBufferView(e)||c.isArrayBuffer(e))return e.byteLength;if(c.isURLSearchParams(e)&&(e=e+""),c.isString(e))return(await zn(e)).byteLength},Zn=async(e,t)=>{const n=c.toFiniteNumber(e.getContentLength());return n??$n(t)},Le={http:pn,xhr:Un,fetch:Ee&&(async e=>{let{url:t,method:n,data:s,signal:r,cancelToken:i,timeout:o,onDownloadProgress:f,onUploadProgress:b,responseType:d,headers:m,withCredentials:E="same-origin",fetchOptions:p}=ht(e);d=d?(d+"").toLowerCase():"text";let M=Hn([r,i&&i.toAbortSignal()],o),g;const R=M&&M.unsubscribe&&(()=>{M.unsubscribe()});let x;try{if(b&&Wn&&n!=="get"&&n!=="head"&&(x=await Zn(m,s))!==0){let A=new Request(t,{method:"POST",body:s,duplex:"half"}),j;if(c.isFormData(s)&&(j=A.headers.get("content-type"))&&m.setContentType(j),A.body){const[V,W]=ft(x,be(dt(b)));s=gt(A.body,bt,V,W)}}c.isString(E)||(E=E?"include":"omit");const _="credentials"in Request.prototype;g=new Request(t,{...p,signal:M,method:n.toUpperCase(),headers:m.normalize().toJSON(),body:s,duplex:"half",credentials:_?E:void 0});let O=await fetch(g,p);const T=Pe&&(d==="stream"||d==="response");if(Pe&&(f||T&&R)){const A={};["status","statusText","headers"].forEach(ne=>{A[ne]=O[ne]});const j=c.toFiniteNumber(O.headers.get("content-length")),[V,W]=f&&ft(j,be(dt(f),!0))||[];O=new Response(gt(O.body,bt,V,()=>{W&&W(),R&&R()}),A)}d=d||"text";let U=await xe[c.findKey(xe,d)||"text"](O,e);return!T&&R&&R(),await new Promise((A,j)=>{ut(A,j,{data:U,headers:P.from(O.headers),status:O.status,statusText:O.statusText,config:e,request:g})})}catch(_){throw R&&R(),_&&_.name==="TypeError"&&/Load failed|fetch/i.test(_.message)?Object.assign(new S("Network Error",S.ERR_NETWORK,e,g),{cause:_.cause||_}):S.from(_,_&&_.code,e,g)}})};c.forEach(Le,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const Et=e=>`- ${e}`,Jn=e=>c.isFunction(e)||e===null||e===!1,xt={getAdapter:e=>{e=c.isArray(e)?e:[e];const{length:t}=e;let n,s;const r={};for(let i=0;i<t;i++){n=e[i];let o;if(s=n,!Jn(n)&&(s=Le[(o=String(n)).toLowerCase()],s===void 0))throw new S(`Unknown adapter '${o}'`);if(s)break;r[o||"#"+i]=s}if(!s){const i=Object.entries(r).map(([f,b])=>`adapter ${f} `+(b===!1?"is not supported by the environment":"is not available in the build"));let o=t?i.length>1?`since :
|
|
4
4
|
`+i.map(Et).join(`
|
|
5
5
|
`):" "+Et(i[0]):"as no adapter specified";throw new S("There is no suitable adapter to dispatch the request "+o,"ERR_NOT_SUPPORT")}return s},adapters:Le};function Fe(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new te(null,e)}function vt(e){return Fe(e),e.headers=P.from(e.headers),e.data=Ie.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),xt.getAdapter(e.adapter||ae.adapter)(e).then(function(s){return Fe(e),s.data=Ie.call(e,e.transformResponse,s),s.headers=P.from(s.headers),s},function(s){return ct(s)||(Fe(e),s&&s.response&&(s.response.data=Ie.call(e,e.transformResponse,s.response),s.response.headers=P.from(s.response.headers))),Promise.reject(s)})}const St="1.11.0",ve={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{ve[e]=function(s){return typeof s===e||"a"+(t<1?"n ":" ")+e}});const Rt={};ve.transitional=function(t,n,s){function r(i,o){return"[Axios v"+St+"] Transitional option '"+i+"'"+o+(s?". "+s:"")}return(i,o,f)=>{if(t===!1)throw new S(r(o," has been removed"+(n?" in "+n:"")),S.ERR_DEPRECATED);return n&&!Rt[o]&&(Rt[o]=!0,console.warn(r(o," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(i,o,f):!0}},ve.spelling=function(t){return(n,s)=>(console.warn(`${s} is likely a misspelling of ${t}`),!0)};function Xn(e,t,n){if(typeof e!="object")throw new S("options must be an object",S.ERR_BAD_OPTION_VALUE);const s=Object.keys(e);let r=s.length;for(;r-- >0;){const i=s[r],o=t[i];if(o){const f=e[i],b=f===void 0||o(f,i,e);if(b!==!0)throw new S("option "+i+" must be "+b,S.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new S("Unknown option "+i,S.ERR_BAD_OPTION)}}const Se={assertOptions:Xn,validators:ve},q=Se.validators;let K=class{constructor(t){this.defaults=t||{},this.interceptors={request:new it,response:new it}}async request(t,n){try{return await this._request(t,n)}catch(s){if(s instanceof Error){let r={};Error.captureStackTrace?Error.captureStackTrace(r):r=new Error;const i=r.stack?r.stack.replace(/^.+\n/,""):"";try{s.stack?i&&!String(s.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(s.stack+=`
|
|
6
|
-
`+i):s.stack=i}catch{}}throw s}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=X(this.defaults,n);const{transitional:s,paramsSerializer:r,headers:i}=n;s!==void 0&&Se.assertOptions(s,{silentJSONParsing:q.transitional(q.boolean),forcedJSONParsing:q.transitional(q.boolean),clarifyTimeoutError:q.transitional(q.boolean)},!1),r!=null&&(c.isFunction(r)?n.paramsSerializer={serialize:r}:Se.assertOptions(r,{encode:q.function,serialize:q.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),Se.assertOptions(n,{baseUrl:q.spelling("baseURL"),withXsrfToken:q.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let o=i&&c.merge(i.common,i[n.method]);i&&c.forEach(["delete","get","head","post","put","patch","common"],g=>{delete i[g]}),n.headers=P.concat(o,i);const f=[];let b=!0;this.interceptors.request.forEach(function(R){typeof R.runWhen=="function"&&R.runWhen(n)===!1||(b=b&&R.synchronous,f.unshift(R.fulfilled,R.rejected))});const d=[];this.interceptors.response.forEach(function(R){d.push(R.fulfilled,R.rejected)});let m,E=0,p;if(!b){const g=[vt.bind(this),void 0];for(g.unshift(...f),g.push(...d),p=g.length,m=Promise.resolve(n);E<p;)m=m.then(g[E++],g[E++]);return m}p=f.length;let M=n;for(E=0;E<p;){const g=f[E++],R=f[E++];try{M=g(M)}catch(x){R.call(this,x);break}}try{m=vt.call(this,M)}catch(g){return Promise.reject(g)}for(E=0,p=d.length;E<p;)m=m.then(d[E++],d[E++]);return m}getUri(t){t=X(this.defaults,t);const n=mt(t.baseURL,t.url,t.allowAbsoluteUrls);return rt(n,t.params,t.paramsSerializer)}};c.forEach(["delete","get","head","options"],function(t){K.prototype[t]=function(n,s){return this.request(X(s||{},{method:t,url:n,data:(s||{}).data}))}}),c.forEach(["post","put","patch"],function(t){function n(s){return function(i,o,f){return this.request(X(f||{},{method:t,headers:s?{"Content-Type":"multipart/form-data"}:{},url:i,data:o}))}}K.prototype[t]=n(),K.prototype[t+"Form"]=n(!0)});let Kn=class kt{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(i){n=i});const s=this;this.promise.then(r=>{if(!s._listeners)return;let i=s._listeners.length;for(;i-- >0;)s._listeners[i](r);s._listeners=null}),this.promise.then=r=>{let i;const o=new Promise(f=>{s.subscribe(f),i=f}).then(r);return o.cancel=function(){s.unsubscribe(i)},o},t(function(i,o,f){s.reason||(s.reason=new te(i,o,f),n(s.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=s=>{t.abort(s)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new kt(function(r){t=r}),cancel:t}}};function Gn(e){return function(n){return e.apply(null,n)}}function Qn(e){return c.isObject(e)&&e.isAxiosError===!0}const De={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(De).forEach(([e,t])=>{De[t]=e});function _t(e){const t=new K(e),n=Ve(K.prototype.request,t);return c.extend(n,K.prototype,t,{allOwnKeys:!0}),c.extend(n,t,null,{allOwnKeys:!0}),n.create=function(r){return _t(X(e,r))},n}const N=_t(ae);N.Axios=K,N.CanceledError=te,N.CancelToken=Kn,N.isCancel=ct,N.VERSION=St,N.toFormData=ye,N.AxiosError=S,N.Cancel=N.CanceledError,N.all=function(t){return Promise.all(t)},N.spread=Gn,N.isAxiosError=Qn,N.mergeConfig=X,N.AxiosHeaders=P,N.formToJSON=e=>at(c.isHTMLForm(e)?new FormData(e):e),N.getAdapter=xt.getAdapter,N.HttpStatusCode=De,N.default=N;const{Axios:Cs,AxiosError:Is,CanceledError:Ps,isCancel:Ls,CancelToken:Fs,VERSION:Ds,all:Us,Cancel:Hs,isAxiosError:qs,spread:js,toFormData:Vs,AxiosHeaders:zs,HttpStatusCode:Ws,formToJSON:$s,getAdapter:Zs,mergeConfig:Js}=N,Yn=(e,t)=>{const n=e.__vccOpts||e;for(const[s,r]of t)n[s]=r;return n},es={class:"timeline-container"},ts={class:"team-circle team-circle-top"},ns=["src"],ss={class:"team-circle team-circle-bottom"},rs=["src"],is={class:"timeline-line"},os={key:0,class:"event-icon event-icon-top"},as={key:0,width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},ls={key:1,width:"23",height:"23",viewBox:"0 0 23 23",fill:"none",xmlns:"http://www.w3.org/2000/svg"},cs={key:2,width:"24",height:"24",viewBox:"0 0 48 48",fill:"none",xmlns:"http://www.w3.org/2000/svg"},us={key:3,width:"24",height:"24",viewBox:"0 0 48 48",fill:"none",xmlns:"http://www.w3.org/2000/svg"},fs={class:"minute-ball minute-ball-center"},ds={key:1,class:"event-icon event-icon-bottom"},ms={key:0,width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},ps={key:1,width:"23",height:"23",viewBox:"0 0 23 23",fill:"none",xmlns:"http://www.w3.org/2000/svg"},hs={key:2,width:"24",height:"24",viewBox:"0 0 48 48",fill:"none",xmlns:"http://www.w3.org/2000/svg"},gs={key:3,width:"24",height:"24",viewBox:"0 0 48 48",fill:"none",xmlns:"http://www.w3.org/2000/svg"},ys={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"},ws={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"},bs={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"},Es={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"},xs=Yn({__name:"gsc-timeline",props:{timelineWidth:{type:Number,required:!0,default:1010},gameId:{type:Number,required:!0},homeTeam:{type:Number,required:!0},isDefault:{type:Boolean,required:!1},awayTeam:{type:Number,required:!0},token:{type:String,required:!0}},emits:["range-change"],setup(e,{emit:t}){const n=a.ref(0),s=a.ref(96),r=a.ref("1"),i=a.ref("2"),o=a.ref(0),f=a.ref(45),b=a.ref(96),d=a.ref(0),m=a.ref(0),E=a.ref("0px"),p=a.ref([]),M=t,g=e,R=N.create({headers:{Authorization:`${g.token}`}}),x=a.ref([]);let _=null;const O=a.ref(null),T=a.ref(!1),U=a.ref(0),A=a.ref(0),j=a.ref(!1),V=a.ref(!1);let W=!1,ne=0;const Ue=a.ref(0),z=a.ref(!1),Re=a.ref(!1),G=a.ref(96),He=a.ref(null),F=[{minute:16,match_lapse:1,event:[{minute:16,minuteLabel:"16",icon:"icon-goal",team:"local",match_lapse:1}]},{minute:25,match_lapse:1,event:[{minute:25,minuteLabel:"25",icon:"icon-red-card",team:"visitante",match_lapse:1}]},{minute:45,match_lapse:1,event:[{minute:45,minuteLabel:"45",icon:"icon-change",team:"local",match_lapse:1}]},{minute:55,match_lapse:2,event:[{minute:55,minuteLabel:"55",icon:"icon-goal",team:"visitante",match_lapse:2}]},{minute:90,match_lapse:2,event:[{minute:90,minuteLabel:"80",icon:"icon-goal",team:"local",match_lapse:2}]}];function ce(){if(He.value){const u=He.value,l=u.scrollWidth-u.clientWidth,y=u.scrollLeft,w=u.scrollWidth>u.clientWidth;j.value=w&&y>0,V.value=w&&Math.ceil(y)<Math.floor(l)}}function Tt(){if(O.value){const u=O.value.parentElement.clientWidth;U.value=u,A.value===0&&(A.value=u-90),a.nextTick(()=>{ce()})}}function Ss(){if(x.value.length>0){const u=Math.max(...x.value.map(l=>l.minute));G.value=u,s.value=G.value}}async function Rs(){if(g.isDefault){p.value=F,x.value=F.map(u=>u.event),n.value=F[0].minute,s.value=F[F.length-1].minute,r.value=F[0].match_lapse.toString(),i.value=F[F.length-1].match_lapse.toString(),d.value=0,m.value=F.length-1,b.value=F[F.length-1].minute,G.value=F[F.length-1].minute,fe();return}try{const u=await R.get(`https://al2nv2dmkc.execute-api.us-west-2.amazonaws.com/prod/mxm/${g.gameId}`);if(u.data&&u.data.plays){const l=u.data.plays.find(w=>{var h;return w.event_type_id===6&&((h=w.comments)==null?void 0:h.includes("El árbitro silba el Final del Primer Tiempo"))});l&&(o.value=l.minute);const y=Math.max(...u.data.plays.map(w=>w.minute));b.value=y,G.value=y,s.value=G.value,p.value=[];for(let w=0;w<=o.value;w++){const h=u.data.plays.filter(v=>{var k;return v.minute===w&&v.match_lapse===1&&(v.category_id===9||v.category_id===3||v.event_type_id===1||v.category_id===10||v.category_id===13||v.event_type_id===6&&((k=v.comments)==null?void 0:k.includes("El árbitro silba el Final del Primer Tiempo")))}),B=[];h.forEach(v=>{B.push({minute:v.minute,minuteLabel:v.event_type_id===6?"MT":v.minute.toString(),icon:Ot(v.event_type_id===1?v.event_type_id:v.category_id),team:v.team_id===g.homeTeam?v.category_id===13?"visitante":"local":v.category_id===13?"local":"visitante",match_lapse:v.match_lapse})}),p.value.push({minute:w,match_lapse:1,event:B.length>0?B:null})}for(let w=f.value;w<=b.value;w++){const h=u.data.plays.filter(v=>v.minute===w&&v.match_lapse===2&&(v.category_id===9||v.category_id===3||v.event_type_id===1||v.category_id===10||v.category_id===13)),B=[];h.forEach(v=>{B.push({minute:v.minute,minuteLabel:v.event_type_id===6?"MT":v.minute.toString(),icon:Ot(v.event_type_id===1?v.event_type_id:v.category_id),team:v.team_id===g.homeTeam?v.category_id===13?"visitante":"local":v.category_id===13?"local":"visitante",match_lapse:v.match_lapse})}),p.value.push({minute:w,match_lapse:2,event:B.length>0?B:null})}if(x.value=p.value.filter(w=>w.event!==null).map(w=>w.event),p.value.length>0){const w=p.value.filter(k=>k.match_lapse===1);if(w.length>0){const k=w[0];n.value=k.minute,r.value="1",d.value=p.value.findIndex(L=>L.minute===k.minute&&L.match_lapse===1)}const h=p.value.filter(k=>k.match_lapse===2);if(h.length>0){const k=h[h.length-1];s.value=k.minute,i.value="2",m.value=p.value.findIndex(L=>L.minute===k.minute&&L.match_lapse===2)}const B=p.value.findIndex(k=>k.minute===n.value&&k.match_lapse===parseInt(r.value)),v=p.value.findIndex(k=>k.minute===s.value&&k.match_lapse===parseInt(i.value));if(B!==-1&&v!==-1&&B<v){const k=p.value.length,L=B/(k-1)*(g.timelineWidth-40),de=v/(k-1)*(g.timelineWidth-40);E.value=`${de-L}px`}}}}catch(u){console.error("Error al obtener los datos del partido:",u)}}function Ot(u){return{3:"icon-goal",1:"icon-goal",13:"icon-goal",10:"icon-change",9:"icon-red-card"}[u]||""}a.onMounted(()=>{Ss(),Tt(),Rs(),a.nextTick(()=>{ce()}),window.addEventListener("resize",()=>{Tt()})}),a.onBeforeUnmount(()=>{window.removeEventListener("resize",ce)}),a.watch(x,()=>{a.nextTick(()=>{ce()})},{deep:!0}),a.watch([n,s,r,i],()=>{qe()},{immediate:!0}),a.watch([r],()=>{if(!(Re.value||T.value)){if(parseInt(r.value)>parseInt(i.value)&&(i.value=r.value,z.value=!0),z.value){if(r.value==="1"){const u=p.value.filter(l=>l.match_lapse===1);if(u.length>0){const l=u[0],y=u[u.length-1];(n.value<l.minute||n.value>y.minute)&&(n.value=l.minute);const w=p.value.findIndex(h=>h.minute===n.value&&h.match_lapse===1);w!==-1&&(d.value=w)}}else if(r.value==="2"){const u=p.value.filter(l=>l.match_lapse===2);if(u.length>0){const l=u[0],y=u[u.length-1];(n.value<l.minute||n.value>y.minute)&&(n.value=l.minute);const w=p.value.findIndex(h=>h.minute===n.value&&h.match_lapse===2);w!==-1&&(d.value=w)}}}else if(r.value==="1"){const u=p.value.filter(l=>l.match_lapse===1);if(u.length>0){const l=u[0];n.value=l.minute;const y=p.value.findIndex(w=>w.minute===l.minute&&w.match_lapse===1);y!==-1&&(d.value=y)}}else if(r.value==="2"){const u=p.value.filter(l=>l.match_lapse===2);if(u.length>0){const l=u[0];n.value=l.minute;const y=p.value.findIndex(w=>w.minute===l.minute&&w.match_lapse===2);y!==-1&&(d.value=y)}}z.value=!1,fe()}},{immediate:!0}),a.watch([i],()=>{if(!(Re.value||T.value)){if(parseInt(i.value)<parseInt(r.value)&&(r.value=i.value,z.value=!0),z.value){if(i.value==="1"){const u=p.value.filter(l=>l.match_lapse===1);if(u.length>0){const l=u[0],y=u[u.length-1];(s.value<l.minute||s.value>y.minute)&&(s.value=y.minute);const w=p.value.findIndex(h=>h.minute===s.value&&h.match_lapse===1);w!==-1&&(m.value=w)}}else if(i.value==="2"){const u=p.value.filter(l=>l.match_lapse===2);if(u.length>0){const l=u[0],y=u[u.length-1];(s.value<l.minute||s.value>y.minute)&&(s.value=y.minute);const w=p.value.findIndex(h=>h.minute===s.value&&h.match_lapse===2);w!==-1&&(m.value=w)}}}else if(i.value==="1"){const u=p.value.filter(l=>l.match_lapse===1);if(u.length>0){const l=u[u.length-1];s.value=l.minute;const y=p.value.findIndex(w=>w.minute===l.minute&&w.match_lapse===1);y!==-1&&(m.value=y)}}else if(i.value==="2"){const u=p.value.filter(l=>l.match_lapse===2);if(u.length>0){const l=u[u.length-1];s.value=l.minute;const y=p.value.findIndex(w=>w.minute===l.minute&&w.match_lapse===2);y!==-1&&(m.value=y)}}z.value=!1,fe()}},{immediate:!0}),a.watch([n],()=>{if(!(Re.value||T.value)){if(r.value==="1"){const u=p.value.filter(l=>l.match_lapse===1);if(u.length>0){const l=u[0],y=u[u.length-1];n.value<l.minute?n.value=l.minute:n.value>y.minute&&(n.value=y.minute);const w=p.value.findIndex(h=>h.minute===n.value&&h.match_lapse===1);w!==-1&&(d.value=w)}}else if(r.value==="2"){const u=p.value.filter(l=>l.match_lapse===2);if(u.length>0){const l=u[0],y=u[u.length-1];n.value<l.minute?n.value=l.minute:n.value>y.minute&&(n.value=y.minute);const w=p.value.findIndex(h=>h.minute===n.value&&h.match_lapse===2);w!==-1&&(d.value=w)}}if(r.value===i.value&&n.value>=s.value){if(i.value==="1"){const u=p.value.filter(l=>l.match_lapse===1);if(u.length>0){const l=u[u.length-1];s.value=Math.min(l.minute,n.value+1)}}else if(i.value==="2"){const u=p.value.filter(l=>l.match_lapse===2);if(u.length>0){const l=u[u.length-1];s.value=Math.min(l.minute,n.value+1)}}}fe()}}),a.watch([s],()=>{if(!(Re.value||T.value)){if(i.value==="1"){const u=p.value.filter(l=>l.match_lapse===1);if(u.length>0){const l=u[0],y=u[u.length-1];s.value<l.minute?s.value=l.minute:s.value>y.minute&&(s.value=y.minute);const w=p.value.findIndex(h=>h.minute===s.value&&h.match_lapse===1);w!==-1&&(m.value=w)}}else if(i.value==="2"){const u=p.value.filter(l=>l.match_lapse===2);if(u.length>0){const l=u[0],y=u[u.length-1];s.value<l.minute?s.value=l.minute:s.value>y.minute&&(s.value=y.minute);const w=p.value.findIndex(h=>h.minute===s.value&&h.match_lapse===2);w!==-1&&(m.value=w)}}if(r.value===i.value&&s.value<=n.value){if(r.value==="1"){const u=p.value.filter(l=>l.match_lapse===1);if(u.length>0){const l=u[0];n.value=Math.max(l.minute,s.value-1)}}else if(r.value==="2"){const u=p.value.filter(l=>l.match_lapse===2);if(u.length>0){const l=u[0];n.value=Math.max(l.minute,s.value-1)}}}fe()}});function ue(u){const l=p.value.length;return u<0||l===0||l===1?"0px":`${u/(l-1)*(g.timelineWidth-40)}px`}function $(u,l){l.preventDefault(),_=u,ne=l.type.includes("touch")?l.touches[0].clientX:l.clientX,W=!1,u==="left"?Ue.value=d.value:u==="right"&&(Ue.value=m.value),document.addEventListener("mousemove",_e),document.addEventListener("touchmove",_e,{passive:!1}),document.addEventListener("mouseup",Te),document.addEventListener("touchend",Te),T.value=!0}function _e(u){if(!_)return;u.preventDefault();const l=u.type.includes("touch")?u.touches[0].clientX:u.clientX;if(!W){if(Math.abs(l-ne)<5)return;W=!0}const y=_s(),w=p.value.length,h=l-ne,B=y/(w-1),v=Math.round(h/B);let k=Ue.value+v;const L=Math.max(0,Math.min(k,w-1));if(_==="left"){const D=p.value.findIndex(Y=>Y.minute===s.value&&Y.match_lapse===parseInt(i.value));if(L>=D-1)return;const Q=p.value[L];T.value=!0,d.value=L,n.value=Q.minute,r.value=Q.match_lapse.toString(),z.value=!0}else if(_==="right"){const D=p.value.findIndex(Y=>Y.minute===n.value&&Y.match_lapse===parseInt(r.value));if(L<=D+1)return;const Q=p.value[L];T.value=!0,m.value=L,s.value=Q.minute,i.value=Q.match_lapse.toString(),z.value=!0}const de=p.value.findIndex(D=>D.minute===n.value&&D.match_lapse===parseInt(r.value)),je=p.value.findIndex(D=>D.minute===s.value&&D.match_lapse===parseInt(i.value));if(de!==-1&&je!==-1&&de<je){const D=p.value.length,Q=de/(D-1)*(g.timelineWidth-40),Y=je/(D-1)*(g.timelineWidth-40);E.value=`${Y-Q}px`}a.nextTick(()=>{qe()})}function Te(){_&&(n.value<0&&(n.value=0),s.value>G.value&&(s.value=G.value),a.nextTick(()=>{T.value=!1,z.value=!1}),qe()),_=null,document.removeEventListener("mousemove",_e),document.removeEventListener("touchmove",_e),document.removeEventListener("mouseup",Te),document.removeEventListener("touchend",Te)}function _s(){return O.value?O.value.getBoundingClientRect().width:600}function qe(){const u=n.value*60,l=s.value*60;M("range-change",{start:{minutes:n.value,seconds:u,time:r.value,match_lapse:parseInt(r.value)},end:{minutes:s.value,seconds:l,time:i.value,match_lapse:parseInt(i.value)}})}function fe(){const u=p.value.findIndex(y=>y.minute===n.value&&y.match_lapse===parseInt(r.value)),l=p.value.findIndex(y=>y.minute===s.value&&y.match_lapse===parseInt(i.value));if(u!==-1&&l!==-1&&u<l){const y=p.value.length,w=u/(y-1)*(g.timelineWidth-40),h=l/(y-1)*(g.timelineWidth-40);E.value=`${h-w}px`}}return(u,l)=>(a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass(["timeline",{"is-dragging":T.value}]),ref_key:"timelineRef",ref:O,style:a.normalizeStyle({width:`${U.value}px`})},[a.createCommentVNode("",!0),a.createElementVNode("div",es,[a.createElementVNode("div",{class:"timeline-scroll no-scrollbar",ref_key:"scrollContainer",ref:He,onScroll:ce},[a.createElementVNode("div",{class:"timeline-bar",style:a.normalizeStyle({width:`${e.timelineWidth}px`})},[a.createElementVNode("div",ts,[a.createElementVNode("img",{src:g.isDefault?"https://golstatsimages.blob.core.windows.net/todoelfut/lineups/escudo1.png":`https://golstatsimages.blob.core.windows.net/teams-80/${g.homeTeam}.png`,alt:"Equipo local"},null,8,ns)]),a.createElementVNode("div",ss,[a.createElementVNode("img",{src:g.isDefault?"https://golstatsimages.blob.core.windows.net/todoelfut/lineups/escudo2.png":`https://golstatsimages.blob.core.windows.net/teams-80/${g.awayTeam}.png`,alt:"Equipo visitante"},null,8,rs)]),a.createElementVNode("div",is,[l[37]||(l[37]=a.createElementVNode("div",{class:"line"},null,-1)),a.createElementVNode("span",{class:"minute-ball minute-ball-initial minute-ball-center",style:a.normalizeStyle({left:ue(0)})},"0'",4),(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(p.value,(y,w)=>(a.openBlock(),a.createElementBlock(a.Fragment,null,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(y.event,(h,B)=>(a.openBlock(),a.createElementBlock("div",{key:"event-"+w+"-"+B,class:"event",style:a.normalizeStyle({left:ue(B===0?w-1.5:w-1.5+B*.3)})},[(h==null?void 0:h.team)==="local"?(a.openBlock(),a.createElementBlock("span",os,[(h==null?void 0:h.icon)==="icon-yellow-card"?(a.openBlock(),a.createElementBlock("svg",as,l[22]||(l[22]=[a.createElementVNode("rect",{x:"0.507812",y:"0.375488",width:"22.7873",height:"22.8364",rx:"11.3937",fill:"none"},null,-1),a.createElementVNode("rect",{x:"8",y:"7",width:"6.8362",height:"9.13458",rx:"2.28119",fill:"#F7C330"},null,-1)]))):(h==null?void 0:h.icon)==="icon-red-card"?(a.openBlock(),a.createElementBlock("svg",ls,l[23]||(l[23]=[a.createElementVNode("rect",{width:"22.7873",height:"22.8364",rx:"11.3937",fill:"none"},null,-1),a.createElementVNode("rect",{x:"8",y:"7",width:"6.8362",height:"9.13458",rx:"2.28119",fill:"#E5152D"},null,-1)]))):(h==null?void 0:h.icon)==="icon-goal"?(a.openBlock(),a.createElementBlock("svg",cs,l[24]||(l[24]=[a.createStaticVNode('<circle fill="none" cx="24" cy="24" r="24" data-v-a59a9277></circle><ellipse fill="none" cx="24" cy="24" rx="14.82" ry="14.85" data-v-a59a9277></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-a59a9277></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-a59a9277></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-a59a9277></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-a59a9277></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-a59a9277></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-a59a9277></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-a59a9277></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-a59a9277></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-a59a9277></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-a59a9277></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-a59a9277></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-a59a9277></path>',14)]))):(h==null?void 0:h.icon)==="icon-change"?(a.openBlock(),a.createElementBlock("svg",us,l[25]||(l[25]=[a.createStaticVNode('<circle fill="none" cx="24" cy="24" r="24" data-v-a59a9277></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-a59a9277></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-a59a9277></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-a59a9277></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-a59a9277></path>',5)]))):(a.openBlock(),a.createElementBlock("span",{key:4,class:a.normalizeClass(h==null?void 0:h.icon)},null,2))])):a.createCommentVNode("",!0),a.createElementVNode("span",fs,a.toDisplayString((h==null?void 0:h.minuteLabel)||y.minute)+"'",1),(h==null?void 0:h.team)==="visitante"?(a.openBlock(),a.createElementBlock("span",ds,[(h==null?void 0:h.icon)==="icon-yellow-card"?(a.openBlock(),a.createElementBlock("svg",ms,l[26]||(l[26]=[a.createElementVNode("rect",{x:"0.507812",y:"0.375488",width:"22.7873",height:"22.8364",rx:"11.3937",fill:"none"},null,-1),a.createElementVNode("rect",{x:"8",y:"7",width:"6.8362",height:"9.13458",rx:"2.28119",fill:"#F7C330"},null,-1)]))):(h==null?void 0:h.icon)==="icon-red-card"?(a.openBlock(),a.createElementBlock("svg",ps,l[27]||(l[27]=[a.createElementVNode("rect",{width:"22.7873",height:"22.8364",rx:"11.3937",fill:"none"},null,-1),a.createElementVNode("rect",{x:"8",y:"7",width:"6.8362",height:"9.13458",rx:"2.28119",fill:"#E5152D"},null,-1)]))):(h==null?void 0:h.icon)==="icon-goal"?(a.openBlock(),a.createElementBlock("svg",hs,l[28]||(l[28]=[a.createStaticVNode('<circle fill="none" cx="24" cy="24" r="24" data-v-a59a9277></circle><ellipse fill="none" cx="24" cy="24" rx="14.82" ry="14.85" data-v-a59a9277></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-a59a9277></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-a59a9277></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-a59a9277></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-a59a9277></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-a59a9277></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-a59a9277></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-a59a9277></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-a59a9277></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-a59a9277></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-a59a9277></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-a59a9277></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-a59a9277></path>',14)]))):(h==null?void 0:h.icon)==="icon-change"?(a.openBlock(),a.createElementBlock("svg",gs,l[29]||(l[29]=[a.createStaticVNode('<circle fill="none" cx="24" cy="24" r="24" data-v-a59a9277></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-a59a9277></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-a59a9277></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-a59a9277></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-a59a9277></path>',5)]))):(a.openBlock(),a.createElementBlock("span",{key:4,class:a.normalizeClass(h==null?void 0:h.icon)},null,2))])):a.createCommentVNode("",!0)],4))),128))],64))),256)),a.createElementVNode("span",{class:"minute-ball minute-ball-edge minute-ball-center",style:a.normalizeStyle({left:ue(p.value.length-1)})},a.toDisplayString(b.value)+"'",5),a.createElementVNode("div",{class:"range-indicator",style:a.normalizeStyle({left:ue(d.value),width:E.value})},[a.createElementVNode("div",{class:"handle left",onMousedown:l[4]||(l[4]=y=>$("left",y)),onTouchstart:l[5]||(l[5]=y=>$("left",y))},[(a.openBlock(),a.createElementBlock("svg",ys,l[30]||(l[30]=[a.createElementVNode("polygon",{points:"6,8 0,0 12,0"},null,-1)]))),l[32]||(l[32]=a.createElementVNode("div",{style:{flex:"1"}},null,-1)),(a.openBlock(),a.createElementBlock("svg",ws,l[31]||(l[31]=[a.createElementVNode("polygon",{points:"6,8 0,0 12,0"},null,-1)])))],32),a.createElementVNode("span",{class:"range-dot range-dot-left",onMousedown:l[6]||(l[6]=y=>$("left",y)),onTouchstart:l[7]||(l[7]=y=>$("left",y))},null,32),l[36]||(l[36]=a.createElementVNode("div",{class:"range-line"},null,-1)),a.createElementVNode("span",{class:"range-dot range-dot-right",onMousedown:l[8]||(l[8]=y=>$("right",y)),onTouchstart:l[9]||(l[9]=y=>$("right",y))},null,32),a.createElementVNode("div",{class:"handle right",onMousedown:l[10]||(l[10]=y=>$("right",y)),onTouchstart:l[11]||(l[11]=y=>$("right",y))},[(a.openBlock(),a.createElementBlock("svg",bs,l[33]||(l[33]=[a.createElementVNode("polygon",{points:"6,8 0,0 12,0"},null,-1)]))),l[35]||(l[35]=a.createElementVNode("div",{style:{flex:"1"}},null,-1)),(a.openBlock(),a.createElementBlock("svg",Es,l[34]||(l[34]=[a.createElementVNode("polygon",{points:"6,8 0,0 12,0"},null,-1)])))],32)],4)])],4)],544)])],6))}},[["__scopeId","data-v-a59a9277"]]),vs={__name:"gsc-timeline-reports",props:{gameId:{type:Number,required:!0},homeTeam:{type:Number,required:!0},awayTeam:{type:Number,required:!0},isDefault:{type:Boolean,required:!1},token:{type:String,default:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MCwibmFtZSI6IlVzdWFyaW8gRnJlZSIsInVzZXJuYW1lIjoiZnJlZUBnb2xzdGF0cy5jb20iLCJlbWFpbCI6ImZyZWVAZ29sc3RhdHMuY29tIiwiaWF0IjoxNjA2NzU4Nzk1LCJleHAiOjE2MzgyOTQ3OTV9.kPNmP7yDtk38cAXrUyc7OHRh6J25VFqy-XUNzbK-4YE"}},setup(e){const t=e,n=a.ref(null),s=a.ref(0),r=a.ref(0);let i=null;function o(){if(n.value){const f=n.value.offsetWidth;s.value=f>0?f-80:0,console.log("LLEgo auqi en 0: ",s.value)}}return a.watch(s,(f,b)=>{f!==b&&setTimeout(()=>{r.value++},100)}),a.onMounted(()=>{a.nextTick(()=>{setTimeout(()=>{o()},100),n.value&&window.ResizeObserver&&(i=new ResizeObserver(()=>{o()}),i.observe(n.value)),window.addEventListener("resize",o)})}),a.onBeforeUnmount(()=>{i&&i.disconnect(),window.removeEventListener("resize",o)}),(f,b)=>(a.openBlock(),a.createElementBlock("div",{class:"container-fullwidth",ref_key:"containerRef",ref:n},[(a.openBlock(),a.createBlock(xs,{"is-default":e.isDefault,key:s.value,"timeline-width":s.value,"game-id":t.gameId,"home-team":t.homeTeam,"away-team":t.awayTeam,token:t.token},null,8,["is-default","timeline-width","game-id","home-team","away-team","token"]))],512))}};Z.GSCTimelineReports=vs,Object.defineProperty(Z,Symbol.toStringTag,{value:"Module"})});
|
|
6
|
+
`+i):s.stack=i}catch{}}throw s}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=X(this.defaults,n);const{transitional:s,paramsSerializer:r,headers:i}=n;s!==void 0&&Se.assertOptions(s,{silentJSONParsing:q.transitional(q.boolean),forcedJSONParsing:q.transitional(q.boolean),clarifyTimeoutError:q.transitional(q.boolean)},!1),r!=null&&(c.isFunction(r)?n.paramsSerializer={serialize:r}:Se.assertOptions(r,{encode:q.function,serialize:q.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),Se.assertOptions(n,{baseUrl:q.spelling("baseURL"),withXsrfToken:q.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let o=i&&c.merge(i.common,i[n.method]);i&&c.forEach(["delete","get","head","post","put","patch","common"],g=>{delete i[g]}),n.headers=P.concat(o,i);const f=[];let b=!0;this.interceptors.request.forEach(function(R){typeof R.runWhen=="function"&&R.runWhen(n)===!1||(b=b&&R.synchronous,f.unshift(R.fulfilled,R.rejected))});const d=[];this.interceptors.response.forEach(function(R){d.push(R.fulfilled,R.rejected)});let m,E=0,p;if(!b){const g=[vt.bind(this),void 0];for(g.unshift(...f),g.push(...d),p=g.length,m=Promise.resolve(n);E<p;)m=m.then(g[E++],g[E++]);return m}p=f.length;let M=n;for(E=0;E<p;){const g=f[E++],R=f[E++];try{M=g(M)}catch(x){R.call(this,x);break}}try{m=vt.call(this,M)}catch(g){return Promise.reject(g)}for(E=0,p=d.length;E<p;)m=m.then(d[E++],d[E++]);return m}getUri(t){t=X(this.defaults,t);const n=mt(t.baseURL,t.url,t.allowAbsoluteUrls);return rt(n,t.params,t.paramsSerializer)}};c.forEach(["delete","get","head","options"],function(t){K.prototype[t]=function(n,s){return this.request(X(s||{},{method:t,url:n,data:(s||{}).data}))}}),c.forEach(["post","put","patch"],function(t){function n(s){return function(i,o,f){return this.request(X(f||{},{method:t,headers:s?{"Content-Type":"multipart/form-data"}:{},url:i,data:o}))}}K.prototype[t]=n(),K.prototype[t+"Form"]=n(!0)});let Kn=class kt{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(i){n=i});const s=this;this.promise.then(r=>{if(!s._listeners)return;let i=s._listeners.length;for(;i-- >0;)s._listeners[i](r);s._listeners=null}),this.promise.then=r=>{let i;const o=new Promise(f=>{s.subscribe(f),i=f}).then(r);return o.cancel=function(){s.unsubscribe(i)},o},t(function(i,o,f){s.reason||(s.reason=new te(i,o,f),n(s.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=s=>{t.abort(s)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new kt(function(r){t=r}),cancel:t}}};function Gn(e){return function(n){return e.apply(null,n)}}function Qn(e){return c.isObject(e)&&e.isAxiosError===!0}const De={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(De).forEach(([e,t])=>{De[t]=e});function _t(e){const t=new K(e),n=Ve(K.prototype.request,t);return c.extend(n,K.prototype,t,{allOwnKeys:!0}),c.extend(n,t,null,{allOwnKeys:!0}),n.create=function(r){return _t(X(e,r))},n}const N=_t(ae);N.Axios=K,N.CanceledError=te,N.CancelToken=Kn,N.isCancel=ct,N.VERSION=St,N.toFormData=ye,N.AxiosError=S,N.Cancel=N.CanceledError,N.all=function(t){return Promise.all(t)},N.spread=Gn,N.isAxiosError=Qn,N.mergeConfig=X,N.AxiosHeaders=P,N.formToJSON=e=>at(c.isHTMLForm(e)?new FormData(e):e),N.getAdapter=xt.getAdapter,N.HttpStatusCode=De,N.default=N;const{Axios:Cs,AxiosError:Is,CanceledError:Ps,isCancel:Ls,CancelToken:Fs,VERSION:Ds,all:Us,Cancel:Hs,isAxiosError:qs,spread:js,toFormData:Vs,AxiosHeaders:zs,HttpStatusCode:Ws,formToJSON:$s,getAdapter:Zs,mergeConfig:Js}=N,Yn=(e,t)=>{const n=e.__vccOpts||e;for(const[s,r]of t)n[s]=r;return n},es={class:"timeline-container"},ts={class:"team-circle team-circle-top"},ns=["src"],ss={class:"team-circle team-circle-bottom"},rs=["src"],is={class:"timeline-line"},os={key:0,class:"event-icon event-icon-top"},as={key:0,width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},ls={key:1,width:"23",height:"23",viewBox:"0 0 23 23",fill:"none",xmlns:"http://www.w3.org/2000/svg"},cs={key:2,width:"24",height:"24",viewBox:"0 0 48 48",fill:"none",xmlns:"http://www.w3.org/2000/svg"},us={key:3,width:"24",height:"24",viewBox:"0 0 48 48",fill:"none",xmlns:"http://www.w3.org/2000/svg"},fs={class:"minute-ball minute-ball-center"},ds={key:1,class:"event-icon event-icon-bottom"},ms={key:0,width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},ps={key:1,width:"23",height:"23",viewBox:"0 0 23 23",fill:"none",xmlns:"http://www.w3.org/2000/svg"},hs={key:2,width:"24",height:"24",viewBox:"0 0 48 48",fill:"none",xmlns:"http://www.w3.org/2000/svg"},gs={key:3,width:"24",height:"24",viewBox:"0 0 48 48",fill:"none",xmlns:"http://www.w3.org/2000/svg"},ys={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"},ws={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"},bs={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"},Es={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"},xs=Yn({__name:"gsc-timeline",props:{timelineWidth:{type:Number,required:!0,default:1010},gameId:{type:Number,required:!0},homeTeam:{type:Number,required:!0},isDefault:{type:Boolean,required:!1},awayTeam:{type:Number,required:!0},token:{type:String,required:!0}},emits:["range-change"],setup(e,{emit:t}){const n=a.ref(0),s=a.ref(96),r=a.ref("1"),i=a.ref("2"),o=a.ref(0),f=a.ref(45),b=a.ref(96),d=a.ref(0),m=a.ref(0),E=a.ref("0px"),p=a.ref([]),M=t,g=e,R=N.create({headers:{Authorization:`${g.token}`}}),x=a.ref([]);let _=null;const O=a.ref(null),T=a.ref(!1),U=a.ref(0),A=a.ref(0),j=a.ref(!1),V=a.ref(!1);let W=!1,ne=0;const Ue=a.ref(0),z=a.ref(!1),Re=a.ref(!1),G=a.ref(96),He=a.ref(null),F=[{minute:16,match_lapse:1,event:[{minute:16,minuteLabel:"16",icon:"icon-goal",team:"local",match_lapse:1}]},{minute:25,match_lapse:1,event:[{minute:25,minuteLabel:"25",icon:"icon-red-card",team:"visitante",match_lapse:1}]},{minute:45,match_lapse:1,event:[{minute:45,minuteLabel:"45",icon:"icon-change",team:"local",match_lapse:1}]},{minute:55,match_lapse:2,event:[{minute:55,minuteLabel:"55",icon:"icon-goal",team:"visitante",match_lapse:2}]},{minute:90,match_lapse:2,event:[{minute:90,minuteLabel:"80",icon:"icon-goal",team:"local",match_lapse:2}]}];function ce(){if(He.value){const u=He.value,l=u.scrollWidth-u.clientWidth,y=u.scrollLeft,w=u.scrollWidth>u.clientWidth;j.value=w&&y>0,V.value=w&&Math.ceil(y)<Math.floor(l)}}function Tt(){if(O.value){const u=O.value.parentElement.clientWidth;U.value=u,A.value===0&&(A.value=u-90),a.nextTick(()=>{ce()})}}function Ss(){if(x.value.length>0){const u=Math.max(...x.value.map(l=>l.minute));G.value=u,s.value=G.value}}async function Rs(){if(g.isDefault){p.value=F,x.value=F.map(u=>u.event),n.value=F[0].minute,s.value=F[F.length-1].minute,r.value=F[0].match_lapse.toString(),i.value=F[F.length-1].match_lapse.toString(),d.value=0,m.value=F.length-1,b.value=F[F.length-1].minute,G.value=F[F.length-1].minute,fe();return}try{console.log("///////////////////////////////////////////////// Componente de timeline: ",g.token);const u=await R.get(`https://al2nv2dmkc.execute-api.us-west-2.amazonaws.com/prod/mxm/${g.gameId}`);if(u.data&&u.data.plays){const l=u.data.plays.find(w=>{var h;return w.event_type_id===6&&((h=w.comments)==null?void 0:h.includes("El árbitro silba el Final del Primer Tiempo"))});l&&(o.value=l.minute);const y=Math.max(...u.data.plays.map(w=>w.minute));b.value=y,G.value=y,s.value=G.value,p.value=[];for(let w=0;w<=o.value;w++){const h=u.data.plays.filter(v=>{var k;return v.minute===w&&v.match_lapse===1&&(v.category_id===9||v.category_id===3||v.event_type_id===1||v.category_id===10||v.category_id===13||v.event_type_id===6&&((k=v.comments)==null?void 0:k.includes("El árbitro silba el Final del Primer Tiempo")))}),B=[];h.forEach(v=>{B.push({minute:v.minute,minuteLabel:v.event_type_id===6?"MT":v.minute.toString(),icon:Ot(v.event_type_id===1?v.event_type_id:v.category_id),team:v.team_id===g.homeTeam?v.category_id===13?"visitante":"local":v.category_id===13?"local":"visitante",match_lapse:v.match_lapse})}),p.value.push({minute:w,match_lapse:1,event:B.length>0?B:null})}for(let w=f.value;w<=b.value;w++){const h=u.data.plays.filter(v=>v.minute===w&&v.match_lapse===2&&(v.category_id===9||v.category_id===3||v.event_type_id===1||v.category_id===10||v.category_id===13)),B=[];h.forEach(v=>{B.push({minute:v.minute,minuteLabel:v.event_type_id===6?"MT":v.minute.toString(),icon:Ot(v.event_type_id===1?v.event_type_id:v.category_id),team:v.team_id===g.homeTeam?v.category_id===13?"visitante":"local":v.category_id===13?"local":"visitante",match_lapse:v.match_lapse})}),p.value.push({minute:w,match_lapse:2,event:B.length>0?B:null})}if(x.value=p.value.filter(w=>w.event!==null).map(w=>w.event),p.value.length>0){const w=p.value.filter(k=>k.match_lapse===1);if(w.length>0){const k=w[0];n.value=k.minute,r.value="1",d.value=p.value.findIndex(L=>L.minute===k.minute&&L.match_lapse===1)}const h=p.value.filter(k=>k.match_lapse===2);if(h.length>0){const k=h[h.length-1];s.value=k.minute,i.value="2",m.value=p.value.findIndex(L=>L.minute===k.minute&&L.match_lapse===2)}const B=p.value.findIndex(k=>k.minute===n.value&&k.match_lapse===parseInt(r.value)),v=p.value.findIndex(k=>k.minute===s.value&&k.match_lapse===parseInt(i.value));if(B!==-1&&v!==-1&&B<v){const k=p.value.length,L=B/(k-1)*(g.timelineWidth-40),de=v/(k-1)*(g.timelineWidth-40);E.value=`${de-L}px`}}}}catch(u){console.error("Error al obtener los datos del partido:",u)}}function Ot(u){return{3:"icon-goal",1:"icon-goal",13:"icon-goal",10:"icon-change",9:"icon-red-card"}[u]||""}a.onMounted(()=>{Ss(),Tt(),Rs(),a.nextTick(()=>{ce()}),window.addEventListener("resize",()=>{Tt()})}),a.onBeforeUnmount(()=>{window.removeEventListener("resize",ce)}),a.watch(x,()=>{a.nextTick(()=>{ce()})},{deep:!0}),a.watch([n,s,r,i],()=>{qe()},{immediate:!0}),a.watch([r],()=>{if(!(Re.value||T.value)){if(parseInt(r.value)>parseInt(i.value)&&(i.value=r.value,z.value=!0),z.value){if(r.value==="1"){const u=p.value.filter(l=>l.match_lapse===1);if(u.length>0){const l=u[0],y=u[u.length-1];(n.value<l.minute||n.value>y.minute)&&(n.value=l.minute);const w=p.value.findIndex(h=>h.minute===n.value&&h.match_lapse===1);w!==-1&&(d.value=w)}}else if(r.value==="2"){const u=p.value.filter(l=>l.match_lapse===2);if(u.length>0){const l=u[0],y=u[u.length-1];(n.value<l.minute||n.value>y.minute)&&(n.value=l.minute);const w=p.value.findIndex(h=>h.minute===n.value&&h.match_lapse===2);w!==-1&&(d.value=w)}}}else if(r.value==="1"){const u=p.value.filter(l=>l.match_lapse===1);if(u.length>0){const l=u[0];n.value=l.minute;const y=p.value.findIndex(w=>w.minute===l.minute&&w.match_lapse===1);y!==-1&&(d.value=y)}}else if(r.value==="2"){const u=p.value.filter(l=>l.match_lapse===2);if(u.length>0){const l=u[0];n.value=l.minute;const y=p.value.findIndex(w=>w.minute===l.minute&&w.match_lapse===2);y!==-1&&(d.value=y)}}z.value=!1,fe()}},{immediate:!0}),a.watch([i],()=>{if(!(Re.value||T.value)){if(parseInt(i.value)<parseInt(r.value)&&(r.value=i.value,z.value=!0),z.value){if(i.value==="1"){const u=p.value.filter(l=>l.match_lapse===1);if(u.length>0){const l=u[0],y=u[u.length-1];(s.value<l.minute||s.value>y.minute)&&(s.value=y.minute);const w=p.value.findIndex(h=>h.minute===s.value&&h.match_lapse===1);w!==-1&&(m.value=w)}}else if(i.value==="2"){const u=p.value.filter(l=>l.match_lapse===2);if(u.length>0){const l=u[0],y=u[u.length-1];(s.value<l.minute||s.value>y.minute)&&(s.value=y.minute);const w=p.value.findIndex(h=>h.minute===s.value&&h.match_lapse===2);w!==-1&&(m.value=w)}}}else if(i.value==="1"){const u=p.value.filter(l=>l.match_lapse===1);if(u.length>0){const l=u[u.length-1];s.value=l.minute;const y=p.value.findIndex(w=>w.minute===l.minute&&w.match_lapse===1);y!==-1&&(m.value=y)}}else if(i.value==="2"){const u=p.value.filter(l=>l.match_lapse===2);if(u.length>0){const l=u[u.length-1];s.value=l.minute;const y=p.value.findIndex(w=>w.minute===l.minute&&w.match_lapse===2);y!==-1&&(m.value=y)}}z.value=!1,fe()}},{immediate:!0}),a.watch([n],()=>{if(!(Re.value||T.value)){if(r.value==="1"){const u=p.value.filter(l=>l.match_lapse===1);if(u.length>0){const l=u[0],y=u[u.length-1];n.value<l.minute?n.value=l.minute:n.value>y.minute&&(n.value=y.minute);const w=p.value.findIndex(h=>h.minute===n.value&&h.match_lapse===1);w!==-1&&(d.value=w)}}else if(r.value==="2"){const u=p.value.filter(l=>l.match_lapse===2);if(u.length>0){const l=u[0],y=u[u.length-1];n.value<l.minute?n.value=l.minute:n.value>y.minute&&(n.value=y.minute);const w=p.value.findIndex(h=>h.minute===n.value&&h.match_lapse===2);w!==-1&&(d.value=w)}}if(r.value===i.value&&n.value>=s.value){if(i.value==="1"){const u=p.value.filter(l=>l.match_lapse===1);if(u.length>0){const l=u[u.length-1];s.value=Math.min(l.minute,n.value+1)}}else if(i.value==="2"){const u=p.value.filter(l=>l.match_lapse===2);if(u.length>0){const l=u[u.length-1];s.value=Math.min(l.minute,n.value+1)}}}fe()}}),a.watch([s],()=>{if(!(Re.value||T.value)){if(i.value==="1"){const u=p.value.filter(l=>l.match_lapse===1);if(u.length>0){const l=u[0],y=u[u.length-1];s.value<l.minute?s.value=l.minute:s.value>y.minute&&(s.value=y.minute);const w=p.value.findIndex(h=>h.minute===s.value&&h.match_lapse===1);w!==-1&&(m.value=w)}}else if(i.value==="2"){const u=p.value.filter(l=>l.match_lapse===2);if(u.length>0){const l=u[0],y=u[u.length-1];s.value<l.minute?s.value=l.minute:s.value>y.minute&&(s.value=y.minute);const w=p.value.findIndex(h=>h.minute===s.value&&h.match_lapse===2);w!==-1&&(m.value=w)}}if(r.value===i.value&&s.value<=n.value){if(r.value==="1"){const u=p.value.filter(l=>l.match_lapse===1);if(u.length>0){const l=u[0];n.value=Math.max(l.minute,s.value-1)}}else if(r.value==="2"){const u=p.value.filter(l=>l.match_lapse===2);if(u.length>0){const l=u[0];n.value=Math.max(l.minute,s.value-1)}}}fe()}});function ue(u){const l=p.value.length;return u<0||l===0||l===1?"0px":`${u/(l-1)*(g.timelineWidth-40)}px`}function $(u,l){l.preventDefault(),_=u,ne=l.type.includes("touch")?l.touches[0].clientX:l.clientX,W=!1,u==="left"?Ue.value=d.value:u==="right"&&(Ue.value=m.value),document.addEventListener("mousemove",_e),document.addEventListener("touchmove",_e,{passive:!1}),document.addEventListener("mouseup",Te),document.addEventListener("touchend",Te),T.value=!0}function _e(u){if(!_)return;u.preventDefault();const l=u.type.includes("touch")?u.touches[0].clientX:u.clientX;if(!W){if(Math.abs(l-ne)<5)return;W=!0}const y=_s(),w=p.value.length,h=l-ne,B=y/(w-1),v=Math.round(h/B);let k=Ue.value+v;const L=Math.max(0,Math.min(k,w-1));if(_==="left"){const D=p.value.findIndex(Y=>Y.minute===s.value&&Y.match_lapse===parseInt(i.value));if(L>=D-1)return;const Q=p.value[L];T.value=!0,d.value=L,n.value=Q.minute,r.value=Q.match_lapse.toString(),z.value=!0}else if(_==="right"){const D=p.value.findIndex(Y=>Y.minute===n.value&&Y.match_lapse===parseInt(r.value));if(L<=D+1)return;const Q=p.value[L];T.value=!0,m.value=L,s.value=Q.minute,i.value=Q.match_lapse.toString(),z.value=!0}const de=p.value.findIndex(D=>D.minute===n.value&&D.match_lapse===parseInt(r.value)),je=p.value.findIndex(D=>D.minute===s.value&&D.match_lapse===parseInt(i.value));if(de!==-1&&je!==-1&&de<je){const D=p.value.length,Q=de/(D-1)*(g.timelineWidth-40),Y=je/(D-1)*(g.timelineWidth-40);E.value=`${Y-Q}px`}a.nextTick(()=>{qe()})}function Te(){_&&(n.value<0&&(n.value=0),s.value>G.value&&(s.value=G.value),a.nextTick(()=>{T.value=!1,z.value=!1}),qe()),_=null,document.removeEventListener("mousemove",_e),document.removeEventListener("touchmove",_e),document.removeEventListener("mouseup",Te),document.removeEventListener("touchend",Te)}function _s(){return O.value?O.value.getBoundingClientRect().width:600}function qe(){const u=n.value*60,l=s.value*60;M("range-change",{start:{minutes:n.value,seconds:u,time:r.value,match_lapse:parseInt(r.value)},end:{minutes:s.value,seconds:l,time:i.value,match_lapse:parseInt(i.value)}})}function fe(){const u=p.value.findIndex(y=>y.minute===n.value&&y.match_lapse===parseInt(r.value)),l=p.value.findIndex(y=>y.minute===s.value&&y.match_lapse===parseInt(i.value));if(u!==-1&&l!==-1&&u<l){const y=p.value.length,w=u/(y-1)*(g.timelineWidth-40),h=l/(y-1)*(g.timelineWidth-40);E.value=`${h-w}px`}}return(u,l)=>(a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass(["timeline",{"is-dragging":T.value}]),ref_key:"timelineRef",ref:O,style:a.normalizeStyle({width:`${U.value}px`})},[a.createCommentVNode("",!0),a.createElementVNode("div",es,[a.createElementVNode("div",{class:"timeline-scroll no-scrollbar",ref_key:"scrollContainer",ref:He,onScroll:ce},[a.createElementVNode("div",{class:"timeline-bar",style:a.normalizeStyle({width:`${e.timelineWidth}px`})},[a.createElementVNode("div",ts,[a.createElementVNode("img",{src:g.isDefault?"https://golstatsimages.blob.core.windows.net/todoelfut/lineups/escudo1.png":`https://golstatsimages.blob.core.windows.net/teams-80/${g.homeTeam}.png`,alt:"Equipo local"},null,8,ns)]),a.createElementVNode("div",ss,[a.createElementVNode("img",{src:g.isDefault?"https://golstatsimages.blob.core.windows.net/todoelfut/lineups/escudo2.png":`https://golstatsimages.blob.core.windows.net/teams-80/${g.awayTeam}.png`,alt:"Equipo visitante"},null,8,rs)]),a.createElementVNode("div",is,[l[37]||(l[37]=a.createElementVNode("div",{class:"line"},null,-1)),a.createElementVNode("span",{class:"minute-ball minute-ball-initial minute-ball-center",style:a.normalizeStyle({left:ue(0)})},"0'",4),(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(p.value,(y,w)=>(a.openBlock(),a.createElementBlock(a.Fragment,null,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(y.event,(h,B)=>(a.openBlock(),a.createElementBlock("div",{key:"event-"+w+"-"+B,class:"event",style:a.normalizeStyle({left:ue(B===0?w-1.5:w-1.5+B*.3)})},[(h==null?void 0:h.team)==="local"?(a.openBlock(),a.createElementBlock("span",os,[(h==null?void 0:h.icon)==="icon-yellow-card"?(a.openBlock(),a.createElementBlock("svg",as,l[22]||(l[22]=[a.createElementVNode("rect",{x:"0.507812",y:"0.375488",width:"22.7873",height:"22.8364",rx:"11.3937",fill:"none"},null,-1),a.createElementVNode("rect",{x:"8",y:"7",width:"6.8362",height:"9.13458",rx:"2.28119",fill:"#F7C330"},null,-1)]))):(h==null?void 0:h.icon)==="icon-red-card"?(a.openBlock(),a.createElementBlock("svg",ls,l[23]||(l[23]=[a.createElementVNode("rect",{width:"22.7873",height:"22.8364",rx:"11.3937",fill:"none"},null,-1),a.createElementVNode("rect",{x:"8",y:"7",width:"6.8362",height:"9.13458",rx:"2.28119",fill:"#E5152D"},null,-1)]))):(h==null?void 0:h.icon)==="icon-goal"?(a.openBlock(),a.createElementBlock("svg",cs,l[24]||(l[24]=[a.createStaticVNode('<circle fill="none" cx="24" cy="24" r="24" data-v-df04468e></circle><ellipse fill="none" cx="24" cy="24" rx="14.82" ry="14.85" data-v-df04468e></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-df04468e></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-df04468e></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-df04468e></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-df04468e></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-df04468e></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-df04468e></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-df04468e></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-df04468e></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-df04468e></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-df04468e></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-df04468e></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-df04468e></path>',14)]))):(h==null?void 0:h.icon)==="icon-change"?(a.openBlock(),a.createElementBlock("svg",us,l[25]||(l[25]=[a.createStaticVNode('<circle fill="none" cx="24" cy="24" r="24" data-v-df04468e></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-df04468e></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-df04468e></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-df04468e></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-df04468e></path>',5)]))):(a.openBlock(),a.createElementBlock("span",{key:4,class:a.normalizeClass(h==null?void 0:h.icon)},null,2))])):a.createCommentVNode("",!0),a.createElementVNode("span",fs,a.toDisplayString((h==null?void 0:h.minuteLabel)||y.minute)+"'",1),(h==null?void 0:h.team)==="visitante"?(a.openBlock(),a.createElementBlock("span",ds,[(h==null?void 0:h.icon)==="icon-yellow-card"?(a.openBlock(),a.createElementBlock("svg",ms,l[26]||(l[26]=[a.createElementVNode("rect",{x:"0.507812",y:"0.375488",width:"22.7873",height:"22.8364",rx:"11.3937",fill:"none"},null,-1),a.createElementVNode("rect",{x:"8",y:"7",width:"6.8362",height:"9.13458",rx:"2.28119",fill:"#F7C330"},null,-1)]))):(h==null?void 0:h.icon)==="icon-red-card"?(a.openBlock(),a.createElementBlock("svg",ps,l[27]||(l[27]=[a.createElementVNode("rect",{width:"22.7873",height:"22.8364",rx:"11.3937",fill:"none"},null,-1),a.createElementVNode("rect",{x:"8",y:"7",width:"6.8362",height:"9.13458",rx:"2.28119",fill:"#E5152D"},null,-1)]))):(h==null?void 0:h.icon)==="icon-goal"?(a.openBlock(),a.createElementBlock("svg",hs,l[28]||(l[28]=[a.createStaticVNode('<circle fill="none" cx="24" cy="24" r="24" data-v-df04468e></circle><ellipse fill="none" cx="24" cy="24" rx="14.82" ry="14.85" data-v-df04468e></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-df04468e></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-df04468e></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-df04468e></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-df04468e></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-df04468e></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-df04468e></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-df04468e></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-df04468e></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-df04468e></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-df04468e></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-df04468e></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-df04468e></path>',14)]))):(h==null?void 0:h.icon)==="icon-change"?(a.openBlock(),a.createElementBlock("svg",gs,l[29]||(l[29]=[a.createStaticVNode('<circle fill="none" cx="24" cy="24" r="24" data-v-df04468e></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-df04468e></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-df04468e></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-df04468e></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-df04468e></path>',5)]))):(a.openBlock(),a.createElementBlock("span",{key:4,class:a.normalizeClass(h==null?void 0:h.icon)},null,2))])):a.createCommentVNode("",!0)],4))),128))],64))),256)),a.createElementVNode("span",{class:"minute-ball minute-ball-edge minute-ball-center",style:a.normalizeStyle({left:ue(p.value.length-1)})},a.toDisplayString(b.value)+"'",5),a.createElementVNode("div",{class:"range-indicator",style:a.normalizeStyle({left:ue(d.value),width:E.value})},[a.createElementVNode("div",{class:"handle left",onMousedown:l[4]||(l[4]=y=>$("left",y)),onTouchstart:l[5]||(l[5]=y=>$("left",y))},[(a.openBlock(),a.createElementBlock("svg",ys,l[30]||(l[30]=[a.createElementVNode("polygon",{points:"6,8 0,0 12,0"},null,-1)]))),l[32]||(l[32]=a.createElementVNode("div",{style:{flex:"1"}},null,-1)),(a.openBlock(),a.createElementBlock("svg",ws,l[31]||(l[31]=[a.createElementVNode("polygon",{points:"6,8 0,0 12,0"},null,-1)])))],32),a.createElementVNode("span",{class:"range-dot range-dot-left",onMousedown:l[6]||(l[6]=y=>$("left",y)),onTouchstart:l[7]||(l[7]=y=>$("left",y))},null,32),l[36]||(l[36]=a.createElementVNode("div",{class:"range-line"},null,-1)),a.createElementVNode("span",{class:"range-dot range-dot-right",onMousedown:l[8]||(l[8]=y=>$("right",y)),onTouchstart:l[9]||(l[9]=y=>$("right",y))},null,32),a.createElementVNode("div",{class:"handle right",onMousedown:l[10]||(l[10]=y=>$("right",y)),onTouchstart:l[11]||(l[11]=y=>$("right",y))},[(a.openBlock(),a.createElementBlock("svg",bs,l[33]||(l[33]=[a.createElementVNode("polygon",{points:"6,8 0,0 12,0"},null,-1)]))),l[35]||(l[35]=a.createElementVNode("div",{style:{flex:"1"}},null,-1)),(a.openBlock(),a.createElementBlock("svg",Es,l[34]||(l[34]=[a.createElementVNode("polygon",{points:"6,8 0,0 12,0"},null,-1)])))],32)],4)])],4)],544)])],6))}},[["__scopeId","data-v-df04468e"]]),vs={__name:"gsc-timeline-reports",props:{gameId:{type:Number,required:!0},homeTeam:{type:Number,required:!0},awayTeam:{type:Number,required:!0},isDefault:{type:Boolean,required:!1},token:{type:String,default:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MCwibmFtZSI6IlVzdWFyaW8gRnJlZSIsInVzZXJuYW1lIjoiZnJlZUBnb2xzdGF0cy5jb20iLCJlbWFpbCI6ImZyZWVAZ29sc3RhdHMuY29tIiwiaWF0IjoxNjA2NzU4Nzk1LCJleHAiOjE2MzgyOTQ3OTV9.kPNmP7yDtk38cAXrUyc7OHRh6J25VFqy-XUNzbK-4YE"}},setup(e){const t=e,n=a.ref(null),s=a.ref(0),r=a.ref(0);let i=null;function o(){if(n.value){const f=n.value.offsetWidth;s.value=f>0?f-80:0,console.log("LLEgo auqi en 0: ",s.value)}}return a.watch(s,(f,b)=>{f!==b&&setTimeout(()=>{r.value++},100)}),a.onMounted(()=>{a.nextTick(()=>{setTimeout(()=>{o()},100),n.value&&window.ResizeObserver&&(i=new ResizeObserver(()=>{o()}),i.observe(n.value)),window.addEventListener("resize",o)})}),a.onBeforeUnmount(()=>{i&&i.disconnect(),window.removeEventListener("resize",o)}),(f,b)=>(a.openBlock(),a.createElementBlock("div",{class:"container-fullwidth",ref_key:"containerRef",ref:n},[(a.openBlock(),a.createBlock(xs,{"is-default":e.isDefault,key:s.value,"timeline-width":s.value,"game-id":t.gameId,"home-team":t.homeTeam,"away-team":t.awayTeam,token:t.token},null,8,["is-default","timeline-width","game-id","home-team","away-team","token"]))],512))}};Z.GSCTimelineReports=vs,Object.defineProperty(Z,Symbol.toStringTag,{value:"Module"})});
|
package/package.json
CHANGED
package/src/App.vue
CHANGED
|
@@ -43,11 +43,10 @@ const gameData = {
|
|
|
43
43
|
<div style="max-width: 968px; width: 100%">
|
|
44
44
|
<GSCTimelineReports
|
|
45
45
|
:key="true"
|
|
46
|
-
:is-default="
|
|
46
|
+
:is-default="false"
|
|
47
47
|
:game-id="gameData.gameId"
|
|
48
48
|
:home-team="gameData.homeTeam.team_id"
|
|
49
49
|
:away-team="gameData.awayTeam.team_id"
|
|
50
|
-
token="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6Mzg4NjYsIm5hbWUiOiJMaWxsaW5pIiwidXNlcm5hbWUiOiJsaWxsaW5pdGVzdCIsImVtYWlsIjoiIiwicHJvdmlkZXJfaWQiOjEsImxvZ2luX2dvbHN0YXRzIjoxLCJpYXQiOjE3NDkwMTgyODIsImV4cCI6MTc4MDU1NDI4Mn0.bvqTlPHVO6vHtuZu8S5EEdHbgpgiMuwO-DvEENnXvhA"
|
|
51
50
|
/>
|
|
52
51
|
</div>
|
|
53
52
|
</template>
|
|
@@ -213,6 +213,10 @@ async function fetchGameData() {
|
|
|
213
213
|
return
|
|
214
214
|
}
|
|
215
215
|
try {
|
|
216
|
+
console.log(
|
|
217
|
+
'///////////////////////////////////////////////// Componente de timeline: ',
|
|
218
|
+
props.token,
|
|
219
|
+
)
|
|
216
220
|
const response = await axiosInstance.get(
|
|
217
221
|
`https://al2nv2dmkc.execute-api.us-west-2.amazonaws.com/prod/mxm/${props.gameId}`,
|
|
218
222
|
)
|